vue-data-ui 2.6.22 → 2.6.24
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-Cf2BhlTz.js → Arrow-CF3NjnkA.js} +1 -1
- package/dist/{Arrow-Dkww_cPT.cjs → Arrow-wDaSVoPf.cjs} +1 -1
- package/dist/{BaseIcon-sQ0Yl3WG.js → BaseIcon-BtcvUPWF.js} +1 -1
- package/dist/{BaseIcon-CMg_B1n7.cjs → BaseIcon-C4WRCMmb.cjs} +1 -1
- package/dist/{DataTable-2Igu4lk9.js → DataTable-ByaBWEYb.js} +2 -2
- package/dist/{DataTable-CdAOPHJa.cjs → DataTable-CdCwimMg.cjs} +1 -1
- package/dist/{Legend-CWcXXd69.cjs → Legend-BSYRK6Q_.cjs} +1 -1
- package/dist/{Legend-BSuEi9g7.js → Legend-C-2SfIPW.js} +2 -2
- package/dist/{PackageVersion-D9dPTMdO.cjs → PackageVersion-BOKy76ww.cjs} +1 -1
- package/dist/{PackageVersion-V-_CbVlt.js → PackageVersion-BiK7Dx4X.js} +1 -1
- package/dist/{PenAndPaper-Cpwa77pt.cjs → PenAndPaper-DOWIdZvQ.cjs} +1 -1
- package/dist/{PenAndPaper-Dq-ECAue.js → PenAndPaper-f3zHe5BC.js} +3 -3
- package/dist/{PenAndPaper.vue_vue_type_style_index_0_scoped_3cea7589_lang-ByFB8slT.cjs → PenAndPaper.vue_vue_type_style_index_0_scoped_3cea7589_lang-D0PiYPFe.cjs} +1 -1
- package/dist/{PenAndPaper.vue_vue_type_style_index_0_scoped_3cea7589_lang-DKbZbPIn.js → PenAndPaper.vue_vue_type_style_index_0_scoped_3cea7589_lang-DHVJRD8Q.js} +3 -3
- package/dist/{Shape-BPvU0s7x.js → Shape-BDGST5GY.js} +1 -1
- package/dist/{Shape-Ca9CTckg.cjs → Shape-coApcye5.cjs} +1 -1
- package/dist/{Slicer-DXEJzT3U.cjs → Slicer-BXJXxW-u.cjs} +1 -1
- package/dist/{Slicer-CATr5IB9.js → Slicer-DH7c09Nd.js} +2 -2
- package/dist/{Title-CUbvh4nY.js → Title-BVFJm0A0.js} +1 -1
- package/dist/{Title-Vp8RX2Nj.cjs → Title-BnX-oH1C.cjs} +1 -1
- package/dist/{Tooltip-CYcP5JH9.js → Tooltip-BGERkvjK.js} +1 -1
- package/dist/{Tooltip-D6K610_p.cjs → Tooltip-CeVBkaaR.cjs} +1 -1
- package/dist/{index-BVM1Hjat.js → index-DemRsUvG.js} +1 -1
- package/dist/{index-BCAY_TBF.cjs → index-inkOR4zq.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-Ces_ZEmq.cjs → useNestedProp-C8eIYJIz.cjs} +1 -1
- package/dist/{useNestedProp-B7524T_I.js → useNestedProp-DvO0Mp94.js} +1 -1
- package/dist/{usePrinter-CMRlY9rc.cjs → usePrinter-D6taMMgW.cjs} +1 -1
- package/dist/{usePrinter-BuEZ1Mqw.js → usePrinter-DMfMqFyO.js} +1 -1
- package/dist/{vue-data-ui-CMHydJ3z.js → vue-data-ui-BEuKSdnW.js} +61 -61
- package/dist/{vue-data-ui-Cl21-Qn-.cjs → vue-data-ui-BtJq8Z8S.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-BB9IHMFV.cjs → vue-ui-3d-bar-D3mGE27n.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-CiVt8Lvp.js → vue-ui-3d-bar-dKnpTu5u.js} +9 -9
- package/dist/{vue-ui-accordion-Zeu2qcSI.js → vue-ui-accordion-C0kWmaMq.js} +3 -3
- package/dist/{vue-ui-accordion-D86VhQnK.cjs → vue-ui-accordion-D4bxWDy8.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-CaZSG2fN.js → vue-ui-age-pyramid-DFUCuJHW.js} +10 -10
- package/dist/{vue-ui-age-pyramid-t5v8gG7E.cjs → vue-ui-age-pyramid-DTBDqmNa.cjs} +1 -1
- package/dist/{vue-ui-annotator-DqMnXHaK.js → vue-ui-annotator-BrATC8rJ.js} +1 -1
- package/dist/{vue-ui-annotator-DPQRwLra.cjs → vue-ui-annotator-DoVhDHt5.cjs} +1 -1
- package/dist/{vue-ui-bullet-oN99bgSq.js → vue-ui-bullet-B3BiTbbB.js} +8 -8
- package/dist/{vue-ui-bullet-DfJ9YR2-.cjs → vue-ui-bullet-bGgUZsv1.cjs} +1 -1
- package/dist/{vue-ui-candlestick-BIznNizW.js → vue-ui-candlestick-CRPzO3jV.js} +11 -11
- package/dist/{vue-ui-candlestick-CbvO_6uK.cjs → vue-ui-candlestick-DKN07ffF.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-DKQSfGt-.cjs → vue-ui-carousel-table-Czyd-yQT.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-DjWEv7sx.js → vue-ui-carousel-table-yJ1cZ2SB.js} +4 -4
- package/dist/{vue-ui-chestnut-DJsFMi3a.cjs → vue-ui-chestnut-Bj4tpH0Z.cjs} +1 -1
- package/dist/{vue-ui-chestnut-DtC70R0X.js → vue-ui-chestnut-DRsZmKvi.js} +8 -8
- package/dist/vue-ui-circle-pack-BBvHAYcK.cjs +1 -0
- package/dist/vue-ui-circle-pack-XwKYgJdF.js +658 -0
- package/dist/{vue-ui-cursor-Bh3F6uU7.cjs → vue-ui-cursor-5bSGnkYd.cjs} +1 -1
- package/dist/{vue-ui-cursor-BbrupWFh.js → vue-ui-cursor-iTemcqMh.js} +2 -2
- package/dist/{vue-ui-dashboard-he9hja0v.js → vue-ui-dashboard-By4J6P3X.js} +2 -2
- package/dist/{vue-ui-dashboard-CR09TdSL.cjs → vue-ui-dashboard-DcnZVhVH.cjs} +1 -1
- package/dist/{vue-ui-digits-eow8_8IF.js → vue-ui-digits-CkiC_YMf.js} +2 -2
- package/dist/{vue-ui-digits-CrQuYkCF.cjs → vue-ui-digits-DG65Tfkm.cjs} +1 -1
- package/dist/{vue-ui-donut-C2Ab0qsE.js → vue-ui-donut-BXIjFGJB.js} +12 -12
- package/dist/{vue-ui-donut-evolution-C4ZSty9k.js → vue-ui-donut-evolution-Bv2oM81w.js} +11 -11
- package/dist/{vue-ui-donut-evolution-CwPKiglD.cjs → vue-ui-donut-evolution-kg8wqJDB.cjs} +1 -1
- package/dist/{vue-ui-donut-Dh75AMUR.cjs → vue-ui-donut-mCho6qBB.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-CafiAGaw.cjs → vue-ui-dumbbell-CBN-X80u.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-BN8fJSvG.js → vue-ui-dumbbell-o4QpOynw.js} +10 -10
- package/dist/{vue-ui-flow-DKpHc3FI.js → vue-ui-flow-CncXcy0d.js} +9 -9
- package/dist/{vue-ui-flow-BWm4K97n.cjs → vue-ui-flow-DR5034H5.cjs} +1 -1
- package/dist/{vue-ui-funnel-DkmKmnNf.js → vue-ui-funnel-B5w0-4vu.js} +9 -9
- package/dist/{vue-ui-funnel-C25z-XuU.cjs → vue-ui-funnel-D_S6rQ9k.cjs} +1 -1
- package/dist/{vue-ui-galaxy-wgZKEqln.cjs → vue-ui-galaxy-DS3XMtZa.cjs} +1 -1
- package/dist/{vue-ui-galaxy-oV4efmeX.js → vue-ui-galaxy-DXE6dFTu.js} +11 -11
- package/dist/{vue-ui-gauge-CzA2PhpW.cjs → vue-ui-gauge-V2uXgW7I.cjs} +1 -1
- package/dist/{vue-ui-gauge-DEKM0_3Q.js → vue-ui-gauge-VkQfLBcb.js} +7 -7
- package/dist/{vue-ui-gizmo-UO3Zkeme.js → vue-ui-gizmo-Cj9PY8rs.js} +3 -3
- package/dist/{vue-ui-gizmo-DlNuWEmn.cjs → vue-ui-gizmo-bCgG-r_M.cjs} +1 -1
- package/dist/{vue-ui-heatmap-E_CcRS7D.js → vue-ui-heatmap-36GeFTus.js} +10 -10
- package/dist/{vue-ui-heatmap-dnvzPPoV.cjs → vue-ui-heatmap-C7gBu19g.cjs} +1 -1
- package/dist/{vue-ui-history-plot-DRbZ8X1X.js → vue-ui-history-plot-B8wCm4rL.js} +11 -11
- package/dist/{vue-ui-history-plot-EWyGCjPe.cjs → vue-ui-history-plot-Ba2F3ma5.cjs} +1 -1
- package/dist/{vue-ui-kpi-DWJbsdvG.cjs → vue-ui-kpi-C7blSAMJ.cjs} +1 -1
- package/dist/{vue-ui-kpi-BZxftzEv.js → vue-ui-kpi-zSGrUH-l.js} +3 -3
- package/dist/{vue-ui-mini-loader-BvWPS_gQ.cjs → vue-ui-mini-loader-3cvYovRy.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DsCVKpe9.js → vue-ui-mini-loader-BD7Ie55D.js} +2 -2
- package/dist/{vue-ui-molecule-BnYkqFk0.js → vue-ui-molecule-CNAG2Nyi.js} +10 -10
- package/dist/{vue-ui-molecule-BdANdT7O.cjs → vue-ui-molecule-DTVrFf15.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-Cgn-5GqE.js → vue-ui-mood-radar-CuVymXcE.js} +11 -11
- package/dist/{vue-ui-mood-radar-D_uLYLXE.cjs → vue-ui-mood-radar-DFHVK8CB.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-BzOUk2Kz.cjs → vue-ui-nested-donuts-BFXA48jU.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-BP9UnBkw.js → vue-ui-nested-donuts-BRDod5S4.js} +11 -11
- package/dist/{vue-ui-onion-vu27Cwcx.js → vue-ui-onion-BeULK855.js} +11 -11
- package/dist/{vue-ui-onion-DGw3Ce3f.cjs → vue-ui-onion-jLEkENH3.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-Dy3yQFd1.js → vue-ui-parallel-coordinate-plot-BQK1LFap.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-Bo-yxxDH.cjs → vue-ui-parallel-coordinate-plot-vH5KDV5C.cjs} +1 -1
- package/dist/{vue-ui-quadrant-B9GkwB5l.cjs → vue-ui-quadrant-BUJ_2TfY.cjs} +1 -1
- package/dist/{vue-ui-quadrant-DgQqkCxk.js → vue-ui-quadrant-yN--29xI.js} +12 -12
- package/dist/{vue-ui-quick-chart-DcpVDq8t.js → vue-ui-quick-chart-B8s0HfLG.js} +9 -9
- package/dist/{vue-ui-quick-chart-CMQFeKWK.cjs → vue-ui-quick-chart-Dy5e9EbI.cjs} +1 -1
- package/dist/{vue-ui-radar-cwhwGVar.js → vue-ui-radar-DNVE3P2u.js} +12 -12
- package/dist/{vue-ui-radar-CnqMJrEU.cjs → vue-ui-radar-DqWSc0Ri.cjs} +1 -1
- package/dist/{vue-ui-rating-Bub3mYba.cjs → vue-ui-rating-BzoHa_Xm.cjs} +1 -1
- package/dist/{vue-ui-rating-BmtemUqF.js → vue-ui-rating-pEtSN7qF.js} +2 -2
- package/dist/{vue-ui-relation-circle-D0py_PRH.cjs → vue-ui-relation-circle-CkCpcFUh.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-BerdR_4-.js → vue-ui-relation-circle-Db5QIgyX.js} +7 -7
- package/dist/{vue-ui-rings-BSm_KC-r.js → vue-ui-rings-CCYGbn-w.js} +12 -12
- package/dist/{vue-ui-rings-zQ-4JnNS.cjs → vue-ui-rings-Dcx1RI3v.cjs} +1 -1
- package/dist/{vue-ui-scatter-D0dIO0lS.js → vue-ui-scatter-DJWbwJc-.js} +12 -12
- package/dist/{vue-ui-scatter-DXAm7w2U.cjs → vue-ui-scatter-DhPfwLTo.cjs} +1 -1
- package/dist/{vue-ui-screenshot-_KsufqYT.js → vue-ui-screenshot-Bbkc82hY.js} +1 -1
- package/dist/{vue-ui-screenshot-BdJzHzn9.cjs → vue-ui-screenshot-jKerg5g_.cjs} +1 -1
- package/dist/{vue-ui-skeleton-CjC_RR5C.js → vue-ui-skeleton-5TjpkMTD.js} +3 -3
- package/dist/{vue-ui-skeleton-CNtHe3B_.cjs → vue-ui-skeleton-pv3sv7Lv.cjs} +1 -1
- package/dist/{vue-ui-smiley-CdYhD3n7.js → vue-ui-smiley-Cmr-yvoN.js} +2 -2
- package/dist/{vue-ui-smiley-C-dKXMYz.cjs → vue-ui-smiley-DwyVZnbf.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-ZSffEbvM.cjs → vue-ui-spark-trend-BfpC69Rf.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-DT0q7zha.js → vue-ui-spark-trend-CdR_LNbz.js} +5 -5
- package/dist/{vue-ui-sparkbar-hm3wy78R.js → vue-ui-sparkbar-CCHf1UWo.js} +4 -4
- package/dist/{vue-ui-sparkbar-Ca8RoM26.cjs → vue-ui-sparkbar-xD5Yd7Z-.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-Dsy3BtE1.js → vue-ui-sparkgauge-BhdOefUS.js} +4 -4
- package/dist/{vue-ui-sparkgauge-Wzb-9Nec.cjs → vue-ui-sparkgauge-LCYwqBpU.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-CcyyqdgC.cjs → vue-ui-sparkhistogram-BYnq8406.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-DIccfqcP.js → vue-ui-sparkhistogram-nkPBrovr.js} +5 -5
- package/dist/{vue-ui-sparkline-edCpjS99.js → vue-ui-sparkline-B85oZ43L.js} +4 -4
- package/dist/{vue-ui-sparkline-CJfM9R-P.cjs → vue-ui-sparkline-DXP4hIdC.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-UzWOXV8T.js → vue-ui-sparkstackbar-V7INAzpf.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-BCkwH7OH.cjs → vue-ui-sparkstackbar-ilI8fpIz.cjs} +1 -1
- package/dist/{vue-ui-stackbar-DtxiLdkG.js → vue-ui-stackbar-BtKP5hCO.js} +13 -13
- package/dist/{vue-ui-stackbar-DLw1lhqT.cjs → vue-ui-stackbar-DaAsN81z.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-DZBPceJC.js → vue-ui-strip-plot-D20CENu1.js} +11 -11
- package/dist/{vue-ui-strip-plot-Bot6lWVZ.cjs → vue-ui-strip-plot-DRF_yjql.cjs} +1 -1
- package/dist/{vue-ui-table-DR-vUv2U.js → vue-ui-table-BXFPiplW.js} +1 -1
- package/dist/{vue-ui-table-CyT0sQtg.cjs → vue-ui-table-DZ4sqrq2.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-D4JBAEBg.js → vue-ui-table-heatmap-BzRvSr0i.js} +4 -4
- package/dist/{vue-ui-table-heatmap-IsfxseMB.cjs → vue-ui-table-heatmap-TvLepJ62.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-Do9vWT7v.cjs → vue-ui-table-sparkline-BT-AdDNH.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-ClYyMljO.js → vue-ui-table-sparkline-BUXOBLm6.js} +5 -5
- package/dist/{vue-ui-thermometer-CkN0NXuR.cjs → vue-ui-thermometer-BQq7s9zK.cjs} +1 -1
- package/dist/{vue-ui-thermometer-CY0Gi2uj.js → vue-ui-thermometer-ClhSAGOe.js} +7 -7
- package/dist/{vue-ui-timer-Zx3zQyAq.cjs → vue-ui-timer-Brw77esz.cjs} +1 -1
- package/dist/{vue-ui-timer-t0fSn-_9.js → vue-ui-timer-C8bnmq5H.js} +5 -5
- package/dist/{vue-ui-tiremarks-0JbzmUh6.cjs → vue-ui-tiremarks-B3RRA7SW.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-5YPN_NoO.js → vue-ui-tiremarks-iQunddHD.js} +7 -7
- package/dist/{vue-ui-treemap-kwbjdy0P.js → vue-ui-treemap-DPrymyeh.js} +11 -11
- package/dist/{vue-ui-treemap-B4BUhmni.cjs → vue-ui-treemap-DqPXxUyM.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-DRuH5f-B.js → vue-ui-vertical-bar-67sEQw3O.js} +12 -12
- package/dist/{vue-ui-vertical-bar-CCNvuAMI.cjs → vue-ui-vertical-bar-DAIV8bL-.cjs} +1 -1
- package/dist/{vue-ui-waffle-CqVwTFrC.cjs → vue-ui-waffle-Bzb83CXy.cjs} +1 -1
- package/dist/{vue-ui-waffle-B9zlDgeL.js → vue-ui-waffle-DGUdtn0S.js} +12 -12
- package/dist/{vue-ui-wheel-CAS9hnki.js → vue-ui-wheel-BWgZoCqk.js} +7 -7
- package/dist/{vue-ui-wheel-CGWDNbH-.cjs → vue-ui-wheel-BvtzwkQ7.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-BKRBPyWR.js → vue-ui-word-cloud-DztNBq0w.js} +10 -10
- package/dist/{vue-ui-word-cloud-CxbTioTG.cjs → vue-ui-word-cloud-U21NvaCz.cjs} +1 -1
- package/dist/{vue-ui-xy-D_OI_ry8.js → vue-ui-xy-CHyiFCbV.js} +14 -14
- package/dist/{vue-ui-xy-DRn-1RsC.cjs → vue-ui-xy-DB4EGI04.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-DXDh8Vzd.js → vue-ui-xy-canvas-BXV5dpRc.js} +12 -12
- package/dist/{vue-ui-xy-canvas-DrjjMaQM.cjs → vue-ui-xy-canvas-CyvhHbkZ.cjs} +1 -1
- package/package.json +1 -1
- package/dist/vue-ui-circle-pack-Bi3Usmkl.js +0 -648
- package/dist/vue-ui-circle-pack-KCMKYM9w.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BCAY_TBF.cjs"),he=require("./Title-Vp8RX2Nj.cjs"),ae=require("./usePrinter-CMRlY9rc.cjs"),fe=require("./Tooltip-D6K610_p.cjs"),ge=require("./vue-ui-skeleton-CNtHe3B_.cjs"),me=require("./BaseIcon-CMg_B1n7.cjs"),be=require("./vue-ui-accordion-D86VhQnK.cjs"),oe=require("./useNestedProp-Ces_ZEmq.cjs"),ke=require("./PackageVersion-D9dPTMdO.cjs"),xe=require("./PenAndPaper-Cpwa77pt.cjs"),we=require("./useUserOptionState-BgepsfED.cjs"),Ce=require("./useChartAccessibility-Cm7nkzTG.cjs"),_e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ne=["id"],Be={key:2,style:"width:100%;background:transparent"},Le=["xmlns","viewBox"],$e=["width","height"],Ve=["x","y","width","height","fill","stroke","stroke-width"],Ee=["x","y","width","height","fill","stroke","stroke-width"],Se=["font-size","font-weight","fill","x","y"],Ae=["x","y","width","height","onMouseover"],ze={key:0},Te=["font-size","fill","x","y","font-weight"],Oe={key:1},Me=["text-anchor","font-size","fill","font-weight","transform"],Pe={key:2},Fe=["x","y","width","height","stroke","stroke-width"],De={key:3},Ie=["id"],Re=["stop-color"],qe=["stop-color"],Ue=["x","y","font-size","fill"],He=["x","y","height","rx","fill"],Ge=["x","y","font-size","fill"],Xe=["stroke","x1","x2","y1","y2"],je=["fill","d"],We={key:4},Ye={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},Ke=["stop-color"],Je=["stop-color"],Qe=["x","y","width","height","rx"],Ze=["x","y","font-size","fill"],et=["x","y","font-size","fill"],tt=["stroke","x1","x2","y1","y2"],lt=["fill","d"],at={key:5,class:"vue-data-ui-watermark"},ot={key:6,ref:"source",dir:"auto"},st={class:"vue-ui-data-table"},ut={key:0},nt=["data-cell"],rt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},it=["data-cell"],dt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ct={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(L,{expose:se}){e.useCssVars(l=>({d6e15a20:l.tdo}));const{vue_ui_heatmap:ue}=s.useConfig(),r=L,$=e.computed(()=>!!r.dataset&&r.dataset.length);s.objectIsEmpty(r.dataset)&&s.error({componentName:"VueUiHeatmap",type:"dataset"});const w=e.ref(s.createUid()),A=e.ref(null),ne=e.ref(null),z=e.ref(!1),T=e.ref(""),R=e.ref(void 0),C=e.ref(null),q=e.ref(0),U=e.ref(null),re=e.ref(null),H=e.ref(!1),G=e.ref(0),t=e.computed({get:()=>Y(),set:l=>l}),{userOptionsVisible:O,setUserOptionsVisibility:X,keepUserOptionState:j}=we.useUserOptionState({config:t.value}),{svgRef:W}=Ce.useChartAccessibility({config:t.value.style.title});function Y(){const l=oe.useNestedProp({userConfig:r.config,defaultConfig:ue});let a={};return l.theme?a={...oe.useNestedProp({userConfig:s.themes.vue_ui_heatmap[l.theme]||r.config,defaultConfig:l})}:a=l,r.config&&s.hasDeepProperty(r.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?a.style.layout.dataLabels.xAxis.showOnlyAtModulo=r.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:a.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,a}e.watch(()=>r.config,l=>{t.value=Y(),O.value=!t.value.userOptions.showOnChartHover,M(),G.value+=1,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.tooltip.show},{deep:!0}),e.watch(()=>r.dataset,()=>{M()},{deep:!0});const{isPrinting:K,isImaging:J,generatePdf:Q,generateImage:Z}=ae.usePrinter({elementId:`heatmap__${w.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),ie=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),de=e.computed(()=>t.value.table.responsiveBreakpoint);function ce(){new ResizeObserver(a=>{a.forEach(u=>{H.value=u.contentRect.width<de.value})}).observe(U.value)}e.onMounted(M);function M(){ce()}const k=e.computed(()=>Math.max(...r.dataset.flatMap(l=>(l.values||[]).length))),y=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+r.dataset.length*t.value.style.layout.cells.height,a=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(k.value<r.dataset.length?r.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:a}}),V=e.computed(()=>t.value.style.legend.position),o=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:y.value.width-t.value.style.layout.padding.right-(V.value==="right"&&t.value.style.legend.show?92:0),bottom:y.value.height-t.value.style.layout.padding.bottom,height:y.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:y.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-(V.value==="right"&&t.value.style.legend.show?92:0)})),P=e.computed(()=>i.value.height*r.dataset.length),p=e.computed(()=>Math.max(...r.dataset.flatMap(l=>l.values))),m=e.computed(()=>Math.min(...r.dataset.flatMap(l=>l.values))),b=e.computed(()=>{const l=r.dataset.flatMap(u=>u.values);return l.reduce((u,n)=>u+n,0)/l.length}),i=e.computed(()=>({width:o.value.width/k.value,height:o.value.width/(k.value<r.dataset.length?r.dataset.length:k.value)})),h=e.computed(()=>{const l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:r.dataset.map(u=>u.name),a=t.value.style.layout.dataLabels.xAxis.values;return{yLabels:l,xLabels:a.slice(0,k.value)}}),E=e.computed(()=>(r.dataset.forEach((l,a)=>{s.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(u=>{s.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:a})})}),r.dataset.map(l=>({...l,temperatures:(l.values||[]).map((a,u)=>a>=b.value?{side:"up",color:s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,p.value,a),ratio:Math.abs(Math.abs(a-b.value)/Math.abs(p.value-b.value))>1?1:Math.abs(Math.abs(a-b.value)/Math.abs(p.value-b.value)),value:a,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${s.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(a)/Math.abs(b.value))>1?1:Math.abs(1-Math.abs(a)/Math.abs(b.value)),color:s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,p.value,a),value:a,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${s.createUid()}`})})))),f=e.ref(null),_=e.ref(null);function ve(l,a,u,n){C.value={x:u,y:n};const{value:d,yAxisName:c,xAxisName:g,id:pe}=l;R.value=pe,f.value=d,_.value={datapoint:l,seriesIndex:a,series:E.value,config:t.value},z.value=!0;let D="";const I=t.value.style.tooltip.customFormat;s.isFunction(I)&&s.functionReturnsString(()=>I({datapoint:l,seriesIndex:a,series:E.value,config:t.value}))?T.value=I({datapoint:l,seriesIndex:a,series:E.value,config:t.value}):(D+=`<div>${c} ${g?`${g}`:""}</div>`,D+=`<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:${s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,p.value,d)}">⬤</span><span>${isNaN(d)?"-":s.applyDataLabel(t.value.style.layout.cells.value.formatter,d,s.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:a})}</span></div>`,T.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${D}</div>`)}const N=e.computed(()=>o.value.top+P.value*(1-f.value/p.value)),B=e.computed(()=>o.value.left+(y.value.width-o.value.left-t.value.style.layout.padding.right)*(f.value/p.value));e.computed(()=>{const l=r.dataset.map(u=>({name:u.name})),a=r.dataset.map(u=>u.values);return{head:l,body:a}});function ee(){e.nextTick(()=>{const l=["",...r.dataset.map((d,c)=>d.name)],a=[];for(let d=0;d<h.value.xLabels.length;d+=1){const c=[h.value.xLabels[d]];for(let g=0;g<r.dataset.length;g+=1)c.push([r.dataset[g].values[d]]);a.push(c)}const u=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(a),n=s.createCsvContent(u);s.downloadCsv({csvContent:n,title:t.value.style.title.text||"vue-ui-heatmap"})})}const x=e.ref(!1);function ye(l){x.value=l,q.value+=1}function te(){v.value.showTable=!v.value.showTable}function le(){v.value.showTooltip=!v.value.showTooltip}const S=e.ref(!1);function F(){S.value=!S.value}return se({generatePdf:Q,generateCsv:ee,generateImage:Z,toggleTable:te,toggleTooltip:le,toggleAnnotator:F}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:A,class:e.normalizeClass(`vue-ui-heatmap ${x.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__${w.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(X)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(xe.PenAndPaper,{key:0,svgRef:e.unref(W),backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:S.value,onClose:F},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ie.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:re,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",Be,[(e.openBlock(),e.createBlock(he._sfc_main,{key:`title_${G.value}`,config:{title:{cy:"heatmap-div-title",...t.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value&&(e.unref(j)||e.unref(O))?(e.openBlock(),e.createBlock(ae.UserOptions,{ref_key:"details",ref:ne,key:`user_options_${q.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(J),isPrinting:e.unref(K),uid:w.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:x.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:A.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:S.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(Q),onGenerateCsv:ee,onGenerateImage:e.unref(Z),onToggleTable:te,onToggleTooltip:le,onToggleAnnotator:F,style:e.normalizeStyle({visibility:e.unref(j)?e.unref(O)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:u,color:n})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:u,color:n})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:u,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:u,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:u,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:u,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:W,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${y.value.width} ${y.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(ke._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:y.value.width,height:y.value.heightWithLegend,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,$e)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(u,n)=>(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:o.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+i.value.height*n+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,Ve),e.createElementVNode("rect",{x:o.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+i.value.height*n+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,Ee),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(s.adaptColorToBackground)(d.color),x:o.value.left+i.value.width*c+i.value.width/2,y:o.value.top+i.value.height*n+i.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,d.value,e.unref(s.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,Se)):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:o.value.left+i.value.width*c,y:o.value.top+i.value.height*n,width:i.value.width,height:i.value.height,fill:"transparent",stroke:"none",onMouseover:g=>ve(d,n,o.value.left+i.value.width*c,o.value.top+i.value.height*n),onMouseout:a[0]||(a[0]=g=>{z.value=!1,R.value=void 0,f.value=null,C.value=null})},null,40,Ae)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",ze,[e.createElementVNode("text",{"font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:o.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:o.value.top+i.value.height*n+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[n]),9,Te)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&n%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(${o.value.left+i.value.width/2+o.value.width/h.value.xLabels.length*n+t.value.style.layout.dataLabels.xAxis.offsetX}, ${o.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6}), rotate(${t.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(u),9,Me)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("g",Pe,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:C.value.x-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,y:C.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,Fe)])):e.createCommentVNode("",!0),t.value.style.legend.show&&V.value==="right"?(e.openBlock(),e.createElementBlock("g",De,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${w.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Re),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,qe)],8,Ie)]),e.createElementVNode("text",{x:o.value.right+36+18,y:o.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(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(p.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(p.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ue),e.createElementVNode("rect",{x:o.value.right+36,y:o.value.top,width:36,height:P.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${w.value})`},null,8,He),e.createElementVNode("text",{x:o.value.right+36+18,y:o.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(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ge),f.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(s.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:o.value.right+36,x2:o.value.right+72,y1:N.value,y2:N.value},null,8,Xe)):e.createCommentVNode("",!0),f.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${o.value.right+36},${N.value} ${o.value.right+26},${N.value-8} ${o.value.right+26},${N.value+8}z`},null,8,je)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&V.value==="bottom"?(e.openBlock(),e.createElementBlock("g",We,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",Ye,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Ke),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Je)])]),e.createElementVNode("rect",{x:o.value.left,y:o.value.bottom+t.value.style.layout.cells.height,width:y.value.width-o.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,Qe),e.createElementVNode("text",{x:o.value.left,y:o.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(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ze),e.createElementVNode("text",{x:o.value.right,y:o.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(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(p.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(p.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,et),f.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(s.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:B.value,x2:B.value,y1:o.value.bottom+t.value.style.layout.cells.height,y2:o.value.bottom+t.value.style.layout.cells.height*2},null,8,tt)):e.createCommentVNode("",!0),f.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${B.value},${o.value.bottom+t.value.style.layout.cells.height} ${B.value-12},${o.value.bottom+t.value.style.layout.cells.height-20} ${B.value+12},${o.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,lt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:y.value},void 0,!0)],14,Le)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",at,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(K)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",ot,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ge.default,{key:7,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(fe._sfc_main,{show:v.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:A.value,content:T.value,isFullscreen:x.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),$.value?(e.openBlock(),e.createBlock(be.default,{key:8,hideDetails:"",config:{open:v.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:U,class:"vue-ui-heatmap-table atom-data-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:a[1]||(a[1]=u=>v.value.showTable=!1),onKeypress:a[2]||(a[2]=e.withKeys(u=>v.value.showTable=!1,["enter"]))},[e.createVNode(me.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",st,[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",ut,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,n)=>(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,n)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%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",rt,e.toDisplayString(u),1)],12,nt),(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",dt,e.toDisplayString(isNaN(d.values[n])?"-":e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.values[n],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,it))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ne))}},vt=_e._export_sfc(ct,[["__scopeId","data-v-83ad9004"]]);exports.default=vt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-inkOR4zq.cjs"),he=require("./Title-BnX-oH1C.cjs"),ae=require("./usePrinter-D6taMMgW.cjs"),fe=require("./Tooltip-CeVBkaaR.cjs"),ge=require("./vue-ui-skeleton-pv3sv7Lv.cjs"),me=require("./BaseIcon-C4WRCMmb.cjs"),be=require("./vue-ui-accordion-D4bxWDy8.cjs"),oe=require("./useNestedProp-C8eIYJIz.cjs"),ke=require("./PackageVersion-BOKy76ww.cjs"),xe=require("./PenAndPaper-DOWIdZvQ.cjs"),we=require("./useUserOptionState-BgepsfED.cjs"),Ce=require("./useChartAccessibility-Cm7nkzTG.cjs"),_e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ne=["id"],Be={key:2,style:"width:100%;background:transparent"},Le=["xmlns","viewBox"],$e=["width","height"],Ve=["x","y","width","height","fill","stroke","stroke-width"],Ee=["x","y","width","height","fill","stroke","stroke-width"],Se=["font-size","font-weight","fill","x","y"],Ae=["x","y","width","height","onMouseover"],ze={key:0},Te=["font-size","fill","x","y","font-weight"],Oe={key:1},Me=["text-anchor","font-size","fill","font-weight","transform"],Pe={key:2},Fe=["x","y","width","height","stroke","stroke-width"],De={key:3},Ie=["id"],Re=["stop-color"],qe=["stop-color"],Ue=["x","y","font-size","fill"],He=["x","y","height","rx","fill"],Ge=["x","y","font-size","fill"],Xe=["stroke","x1","x2","y1","y2"],je=["fill","d"],We={key:4},Ye={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},Ke=["stop-color"],Je=["stop-color"],Qe=["x","y","width","height","rx"],Ze=["x","y","font-size","fill"],et=["x","y","font-size","fill"],tt=["stroke","x1","x2","y1","y2"],lt=["fill","d"],at={key:5,class:"vue-data-ui-watermark"},ot={key:6,ref:"source",dir:"auto"},st={class:"vue-ui-data-table"},ut={key:0},nt=["data-cell"],rt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},it=["data-cell"],dt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ct={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(L,{expose:se}){e.useCssVars(l=>({d6e15a20:l.tdo}));const{vue_ui_heatmap:ue}=s.useConfig(),r=L,$=e.computed(()=>!!r.dataset&&r.dataset.length);s.objectIsEmpty(r.dataset)&&s.error({componentName:"VueUiHeatmap",type:"dataset"});const w=e.ref(s.createUid()),A=e.ref(null),ne=e.ref(null),z=e.ref(!1),T=e.ref(""),R=e.ref(void 0),C=e.ref(null),q=e.ref(0),U=e.ref(null),re=e.ref(null),H=e.ref(!1),G=e.ref(0),t=e.computed({get:()=>Y(),set:l=>l}),{userOptionsVisible:O,setUserOptionsVisibility:X,keepUserOptionState:j}=we.useUserOptionState({config:t.value}),{svgRef:W}=Ce.useChartAccessibility({config:t.value.style.title});function Y(){const l=oe.useNestedProp({userConfig:r.config,defaultConfig:ue});let a={};return l.theme?a={...oe.useNestedProp({userConfig:s.themes.vue_ui_heatmap[l.theme]||r.config,defaultConfig:l})}:a=l,r.config&&s.hasDeepProperty(r.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?a.style.layout.dataLabels.xAxis.showOnlyAtModulo=r.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:a.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,a}e.watch(()=>r.config,l=>{t.value=Y(),O.value=!t.value.userOptions.showOnChartHover,M(),G.value+=1,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.tooltip.show},{deep:!0}),e.watch(()=>r.dataset,()=>{M()},{deep:!0});const{isPrinting:K,isImaging:J,generatePdf:Q,generateImage:Z}=ae.usePrinter({elementId:`heatmap__${w.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),ie=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),de=e.computed(()=>t.value.table.responsiveBreakpoint);function ce(){new ResizeObserver(a=>{a.forEach(u=>{H.value=u.contentRect.width<de.value})}).observe(U.value)}e.onMounted(M);function M(){ce()}const k=e.computed(()=>Math.max(...r.dataset.flatMap(l=>(l.values||[]).length))),y=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+r.dataset.length*t.value.style.layout.cells.height,a=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(k.value<r.dataset.length?r.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:a}}),V=e.computed(()=>t.value.style.legend.position),o=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:y.value.width-t.value.style.layout.padding.right-(V.value==="right"&&t.value.style.legend.show?92:0),bottom:y.value.height-t.value.style.layout.padding.bottom,height:y.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:y.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-(V.value==="right"&&t.value.style.legend.show?92:0)})),P=e.computed(()=>i.value.height*r.dataset.length),p=e.computed(()=>Math.max(...r.dataset.flatMap(l=>l.values))),m=e.computed(()=>Math.min(...r.dataset.flatMap(l=>l.values))),b=e.computed(()=>{const l=r.dataset.flatMap(u=>u.values);return l.reduce((u,n)=>u+n,0)/l.length}),i=e.computed(()=>({width:o.value.width/k.value,height:o.value.width/(k.value<r.dataset.length?r.dataset.length:k.value)})),h=e.computed(()=>{const l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:r.dataset.map(u=>u.name),a=t.value.style.layout.dataLabels.xAxis.values;return{yLabels:l,xLabels:a.slice(0,k.value)}}),E=e.computed(()=>(r.dataset.forEach((l,a)=>{s.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(u=>{s.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:a})})}),r.dataset.map(l=>({...l,temperatures:(l.values||[]).map((a,u)=>a>=b.value?{side:"up",color:s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,p.value,a),ratio:Math.abs(Math.abs(a-b.value)/Math.abs(p.value-b.value))>1?1:Math.abs(Math.abs(a-b.value)/Math.abs(p.value-b.value)),value:a,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${s.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(a)/Math.abs(b.value))>1?1:Math.abs(1-Math.abs(a)/Math.abs(b.value)),color:s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,p.value,a),value:a,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${s.createUid()}`})})))),f=e.ref(null),_=e.ref(null);function ve(l,a,u,n){C.value={x:u,y:n};const{value:d,yAxisName:c,xAxisName:g,id:pe}=l;R.value=pe,f.value=d,_.value={datapoint:l,seriesIndex:a,series:E.value,config:t.value},z.value=!0;let D="";const I=t.value.style.tooltip.customFormat;s.isFunction(I)&&s.functionReturnsString(()=>I({datapoint:l,seriesIndex:a,series:E.value,config:t.value}))?T.value=I({datapoint:l,seriesIndex:a,series:E.value,config:t.value}):(D+=`<div>${c} ${g?`${g}`:""}</div>`,D+=`<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:${s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,p.value,d)}">⬤</span><span>${isNaN(d)?"-":s.applyDataLabel(t.value.style.layout.cells.value.formatter,d,s.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:a})}</span></div>`,T.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${D}</div>`)}const N=e.computed(()=>o.value.top+P.value*(1-f.value/p.value)),B=e.computed(()=>o.value.left+(y.value.width-o.value.left-t.value.style.layout.padding.right)*(f.value/p.value));e.computed(()=>{const l=r.dataset.map(u=>({name:u.name})),a=r.dataset.map(u=>u.values);return{head:l,body:a}});function ee(){e.nextTick(()=>{const l=["",...r.dataset.map((d,c)=>d.name)],a=[];for(let d=0;d<h.value.xLabels.length;d+=1){const c=[h.value.xLabels[d]];for(let g=0;g<r.dataset.length;g+=1)c.push([r.dataset[g].values[d]]);a.push(c)}const u=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(a),n=s.createCsvContent(u);s.downloadCsv({csvContent:n,title:t.value.style.title.text||"vue-ui-heatmap"})})}const x=e.ref(!1);function ye(l){x.value=l,q.value+=1}function te(){v.value.showTable=!v.value.showTable}function le(){v.value.showTooltip=!v.value.showTooltip}const S=e.ref(!1);function F(){S.value=!S.value}return se({generatePdf:Q,generateCsv:ee,generateImage:Z,toggleTable:te,toggleTooltip:le,toggleAnnotator:F}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:A,class:e.normalizeClass(`vue-ui-heatmap ${x.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__${w.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(X)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(xe.PenAndPaper,{key:0,svgRef:e.unref(W),backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:S.value,onClose:F},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ie.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:re,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",Be,[(e.openBlock(),e.createBlock(he._sfc_main,{key:`title_${G.value}`,config:{title:{cy:"heatmap-div-title",...t.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value&&(e.unref(j)||e.unref(O))?(e.openBlock(),e.createBlock(ae.UserOptions,{ref_key:"details",ref:ne,key:`user_options_${q.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(J),isPrinting:e.unref(K),uid:w.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:x.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:A.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:S.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(Q),onGenerateCsv:ee,onGenerateImage:e.unref(Z),onToggleTable:te,onToggleTooltip:le,onToggleAnnotator:F,style:e.normalizeStyle({visibility:e.unref(j)?e.unref(O)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:u,color:n})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:u,color:n})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:u,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:u,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:u,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:u,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:W,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${y.value.width} ${y.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(ke._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:y.value.width,height:y.value.heightWithLegend,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,$e)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(u,n)=>(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:o.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+i.value.height*n+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,Ve),e.createElementVNode("rect",{x:o.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+i.value.height*n+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,Ee),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(s.adaptColorToBackground)(d.color),x:o.value.left+i.value.width*c+i.value.width/2,y:o.value.top+i.value.height*n+i.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,d.value,e.unref(s.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,Se)):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:o.value.left+i.value.width*c,y:o.value.top+i.value.height*n,width:i.value.width,height:i.value.height,fill:"transparent",stroke:"none",onMouseover:g=>ve(d,n,o.value.left+i.value.width*c,o.value.top+i.value.height*n),onMouseout:a[0]||(a[0]=g=>{z.value=!1,R.value=void 0,f.value=null,C.value=null})},null,40,Ae)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",ze,[e.createElementVNode("text",{"font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:o.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:o.value.top+i.value.height*n+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[n]),9,Te)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&n%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(${o.value.left+i.value.width/2+o.value.width/h.value.xLabels.length*n+t.value.style.layout.dataLabels.xAxis.offsetX}, ${o.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6}), rotate(${t.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(u),9,Me)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("g",Pe,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:C.value.x-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,y:C.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,Fe)])):e.createCommentVNode("",!0),t.value.style.legend.show&&V.value==="right"?(e.openBlock(),e.createElementBlock("g",De,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${w.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Re),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,qe)],8,Ie)]),e.createElementVNode("text",{x:o.value.right+36+18,y:o.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(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(p.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(p.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ue),e.createElementVNode("rect",{x:o.value.right+36,y:o.value.top,width:36,height:P.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${w.value})`},null,8,He),e.createElementVNode("text",{x:o.value.right+36+18,y:o.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(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ge),f.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(s.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:o.value.right+36,x2:o.value.right+72,y1:N.value,y2:N.value},null,8,Xe)):e.createCommentVNode("",!0),f.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${o.value.right+36},${N.value} ${o.value.right+26},${N.value-8} ${o.value.right+26},${N.value+8}z`},null,8,je)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&V.value==="bottom"?(e.openBlock(),e.createElementBlock("g",We,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",Ye,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Ke),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Je)])]),e.createElementVNode("rect",{x:o.value.left,y:o.value.bottom+t.value.style.layout.cells.height,width:y.value.width-o.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,Qe),e.createElementVNode("text",{x:o.value.left,y:o.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(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ze),e.createElementVNode("text",{x:o.value.right,y:o.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(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(p.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(p.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,et),f.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(s.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:B.value,x2:B.value,y1:o.value.bottom+t.value.style.layout.cells.height,y2:o.value.bottom+t.value.style.layout.cells.height*2},null,8,tt)):e.createCommentVNode("",!0),f.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${B.value},${o.value.bottom+t.value.style.layout.cells.height} ${B.value-12},${o.value.bottom+t.value.style.layout.cells.height-20} ${B.value+12},${o.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,lt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:y.value},void 0,!0)],14,Le)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",at,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(K)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",ot,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ge.default,{key:7,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(fe._sfc_main,{show:v.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:A.value,content:T.value,isFullscreen:x.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),$.value?(e.openBlock(),e.createBlock(be.default,{key:8,hideDetails:"",config:{open:v.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:U,class:"vue-ui-heatmap-table atom-data-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:a[1]||(a[1]=u=>v.value.showTable=!1),onKeypress:a[2]||(a[2]=e.withKeys(u=>v.value.showTable=!1,["enter"]))},[e.createVNode(me.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",st,[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",ut,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,n)=>(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,n)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%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",rt,e.toDisplayString(u),1)],12,nt),(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",dt,e.toDisplayString(isNaN(d.values[n])?"-":e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.values[n],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,it))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ne))}},vt=_e._export_sfc(ct,[["__scopeId","data-v-83ad9004"]]);exports.default=vt;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ref as c, computed as f, onMounted as We, onBeforeUnmount as He, watch as Ee, createElementBlock as r, openBlock as s, unref as h, normalizeStyle as M, normalizeClass as I, renderSlot as x, createBlock as z, createCommentVNode as v, createElementVNode as T, createVNode as we, createSlots as Ge, withCtx as m, normalizeProps as O, guardReactiveProps as P, Fragment as b, renderList as k, toDisplayString as L, createTextVNode as Ve, nextTick as qe } from "vue";
|
|
2
|
-
import { u as Ze, c as Ce, o as Je, e as _e, g as Ke, b as Qe, d as et, p as H, D as $e, i as F, f as X, X as tt, l as lt, h as at, G as st, F as N, t as ot, a as rt, C as E, q as nt, r as ut, x as it } from "./index-
|
|
3
|
-
import { u as Me } from "./useNestedProp-
|
|
4
|
-
import { u as ct, U as vt } from "./usePrinter-
|
|
5
|
-
import { _ as ht } from "./PackageVersion-
|
|
6
|
-
import { L as yt } from "./Legend-
|
|
7
|
-
import { _ as dt } from "./Title-
|
|
8
|
-
import { _ as ft } from "./Tooltip-
|
|
9
|
-
import { D as xt } from "./DataTable-
|
|
10
|
-
import pt from "./vue-ui-accordion-
|
|
11
|
-
import { P as mt } from "./PenAndPaper-
|
|
12
|
-
import gt from "./vue-ui-skeleton-
|
|
2
|
+
import { u as Ze, c as Ce, o as Je, e as _e, g as Ke, b as Qe, d as et, p as H, D as $e, i as F, f as X, X as tt, l as lt, h as at, G as st, F as N, t as ot, a as rt, C as E, q as nt, r as ut, x as it } from "./index-DemRsUvG.js";
|
|
3
|
+
import { u as Me } from "./useNestedProp-DvO0Mp94.js";
|
|
4
|
+
import { u as ct, U as vt } from "./usePrinter-DMfMqFyO.js";
|
|
5
|
+
import { _ as ht } from "./PackageVersion-BiK7Dx4X.js";
|
|
6
|
+
import { L as yt } from "./Legend-C-2SfIPW.js";
|
|
7
|
+
import { _ as dt } from "./Title-BVFJm0A0.js";
|
|
8
|
+
import { _ as ft } from "./Tooltip-BGERkvjK.js";
|
|
9
|
+
import { D as xt } from "./DataTable-ByaBWEYb.js";
|
|
10
|
+
import pt from "./vue-ui-accordion-C0kWmaMq.js";
|
|
11
|
+
import { P as mt } from "./PenAndPaper-f3zHe5BC.js";
|
|
12
|
+
import gt from "./vue-ui-skeleton-5TjpkMTD.js";
|
|
13
13
|
import { t as bt, u as kt } from "./useResponsive-vZgZwV-S.js";
|
|
14
14
|
import { u as wt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
15
|
import { u as Ct } from "./useChartAccessibility-BWojgys7.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BCAY_TBF.cjs"),le=require("./useNestedProp-Ces_ZEmq.cjs"),ae=require("./usePrinter-CMRlY9rc.cjs"),Ce=require("./PackageVersion-D9dPTMdO.cjs"),we=require("./Legend-CWcXXd69.cjs"),Be=require("./Title-Vp8RX2Nj.cjs"),Se=require("./Tooltip-D6K610_p.cjs"),_e=require("./DataTable-CdAOPHJa.cjs"),Ne=require("./vue-ui-accordion-D86VhQnK.cjs"),ze=require("./PenAndPaper-Cpwa77pt.cjs"),$e=require("./vue-ui-skeleton-CNtHe3B_.cjs"),oe=require("./useResponsive-N8jl0-aC.cjs"),Le=require("./useUserOptionState-BgepsfED.cjs"),Ee=require("./useChartAccessibility-Cm7nkzTG.cjs"),Me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Te=["id"],Ae=["xmlns","viewBox"],Pe=["x","y","width","height"],Ve={key:1},Fe=["id"],Oe=["stop-color"],De=["stop-color"],Ie=["stop-color"],Xe={key:2},qe=["x1","x2","y1","y2","stroke","stroke-width"],Ye={key:3},Re=["x","y","fill","font-size"],je=["transform","font-size","fill","font-weight"],Ue={key:5},He=["x1","x2","y1","y2","stroke","stroke-width"],We={key:6},Ge=["transform","fill","font-size","text-anchor"],Ze=["x","y","font-size","fill","font-weight"],Je=["x1","x2","y1","y2","stroke","stroke-width"],Ke=["x1","x2","y1","y2","stroke","stroke-width"],Qe=["d","stroke","stroke-width"],et=["d","stroke","stroke-width"],tt=["cx","cy","fill","r"],lt=["cx","cy","fill","r","stroke","stroke-width"],at={key:1},ot=["x","y","font-size","fill","font-weight"],st={key:2},rt=["x","y","font-size","font-weight","fill"],nt=["cx","cy","r","onMouseenter","onClick"],it={key:5,class:"vue-data-ui-watermark"},ut=["onClick"],ct=["innerHTML"],vt={__name:"vue-ui-history-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(se,{expose:re,emit:ne}){const{vue_ui_history_plot:ie}=r.useConfig(),c=se,k=e.ref(null),M=e.ref(null),T=e.ref(0),A=e.ref(null),P=e.ref(0),V=e.ref(0),F=e.ref(0),w=e.ref(null),O=e.ref(null),b=e.ref(r.createUid()),N=e.ref(!1),z=e.ref(""),h=e.ref([]),B=e.ref(!1),p=e.ref(null),C=e.ref(!1),D=e.ref(null),y=e.computed({get:()=>!!c.dataset&&c.dataset.length,set:l=>l}),I=ne;e.onMounted(X),e.onBeforeUnmount(()=>{w.value&&w.value.disconnect()});function X(){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=oe.throttle(()=>{const{width:o,height:a}=oe.useResponsive({chart:k.value,title:t.value.style.chart.title.text?M.value:null,noTitle:O.value,legend:t.value.style.chart.legend.show?A.value:null,source:D.value});requestAnimationFrame(()=>{v.value.width=o,v.value.height=a,i.value.plots=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.radius,threshold:3,fallback:3}),i.value.indexLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.indexLabels.fontSize,threshold:6,fallback:6}),i.value.labels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.labels.fontSize,threshold:6,fallback:6}),i.value.xAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.labels.fontSize,threshold:6,fallback:6}),i.value.xAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.name.fontSize,threshold:6,fallback:6}),i.value.yAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.labels.fontSize,threshold:6,fallback:6}),i.value.yAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.name.fontSize,threshold:6,fallback:6})})});w.value=new ResizeObserver(l),w.value.observe(k.value.parentNode)}}function q(){const l=le.useNestedProp({userConfig:c.config,defaultConfig:ie});let o={};return l.theme?o={...le.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:()=>q(),set:l=>l}),{userOptionsVisible:$,setUserOptionsVisibility:Y,keepUserOptionState:R}=Le.useUserOptionState({config:t.value}),{svgRef:j}=Ee.useChartAccessibility({config:t.value.style.chart.title});e.watch(()=>c.config,l=>{t.value=q(),$.value=!t.value.userOptions.showOnChartHover,X(),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,i.value.plots=t.value.style.chart.plots.radius,i.value.indexLabels=t.value.style.chart.plots.indexLabels.fontSize,i.value.labels=t.value.style.chart.plots.labels.fontSize,i.value.xAxisLabels=t.value.style.chart.axes.x.labels.fontSize,i.value.xAxisName=t.value.style.chart.axes.x.name.fontSize,i.value.yAxisLabels=t.value.style.chart.axes.y.labels.fontSize,i.value.yAxisName=t.value.style.chart.axes.y.name.fontSize,f.value.showTable=t.value.table.show,f.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:U,isImaging:H,generatePdf:W,generateImage:G}=ae.usePrinter({elementId:`history_plot_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-history-plot"}),ue=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ce=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}),n=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}}),i=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):ce.value[o]||r.palette[o]||r.palette[o%r.palette.length],seriesIndex:o})):[]),ve=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.x))):1),de=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}),he=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.y))):1),ye=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?de.value:t.value.style.chart.axes.x.scaleMin,t.value.style.chart.axes.x.scaleMax===null?ve.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?ye.value:t.value.style.chart.axes.y.scaleMin,t.value.style.chart.axes.y.scaleMax===null?he.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:n.value.left+(a-l.min)/(l.max-l.min)*n.value.width,y1:n.value.top,y2:n.value.bottom,value:a})),tickY:o.ticks.map(a=>({y:n.value.bottom-(a-o.min)/(o.max-o.min)*n.value.height,x1:n.value.left,x2:n.value.right,value:a}))}});function fe(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 n.value.left+((l||0)+o)/(d.value.x.max+o)*n.value.width}function me(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 n.value.bottom-((l||0)+o)/(d.value.y.max+o)*n.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:fe(s.x),y:me(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 Z(l){h.value.includes(l)?h.value=h.value.filter(o=>o!==l):h.value.push(l)}const J=e.computed(()=>x.value.map(l=>({...l,opacity:h.value.includes(l.seriesIndex)?.5:1,segregate:()=>Z(l.seriesIndex),isSegregated:h.value.includes(l.seriesIndex),shape:"circle"}))),pe=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 xe(l){I("selectDatapoint",l)}function K(l){I("selectLegend",{...l,isSegregated:!l.isSegregated,opacity:l.isSegregated?1:.5})}function ge(l){B.value=l,F.value+=1}const L=e.ref(null);function ke({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"&&(z.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>`,z.value=`<div>${s}</div>`}N.value=!0}e.computed(()=>({head:g.value.map(o=>({name:o.name,color:o.color}))}));const S=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 Q(){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 E(){_.value=!_.value}function ee(){f.value.showTable=!f.value.showTable}function te(){f.value.showTooltip=!f.value.showTooltip}function be(){return g.value}return re({getData:be,generatePdf:W,generateCsv:Q,generateImage:G,toggleTable:ee,toggleTooltip:te,toggleAnnotator:E}),(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":B.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%":""}`),onMouseenter:o[3]||(o[3]=()=>e.unref(Y)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(Y)(!1))},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ze.PenAndPaper,{key:0,svgRef:e.unref(j),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:_.value,onClose:E},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ue.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:O,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(Be._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.unref(R)||e.unref($))?(e.openBlock(),e.createBlock(ae.UserOptions,{ref:"details",key:`user_option_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(H),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:B.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:ge,onGeneratePdf:e.unref(W),onGenerateCsv:Q,onGenerateImage:e.unref(G),onToggleTable:ee,onToggleTooltip:te,onToggleAnnotator:E,style:e.normalizeStyle({visibility:e.unref(R)?e.unref($)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:u})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:u})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}: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:"6"}: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:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:j,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(Ce._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:n.value.left,y:n.value.top,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Pe)):e.createCommentVNode("",!0),t.value.style.chart.plots.gradient.show?(e.openBlock(),e.createElementBlock("defs",Ve,[(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,Oe),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(r.darkenHexColor)(a.color,.1)},null,8,De),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Ie)],8,Fe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalLines.show?(e.openBlock(),e.createElementBlock("g",Xe,[(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,qe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.labels.show?(e.openBlock(),e.createElementBlock("g",Ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickY,a=>(e.openBlock(),e.createElementBlock("text",{x:n.value.left+t.value.style.chart.axes.y.labels.offsetX-4,y:a.y+i.value.yAxisLabels/3,fill:t.value.style.chart.axes.y.labels.color,"font-size":i.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,Re))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.name.text?(e.openBlock(),e.createElementBlock("text",{key:4,transform:`translate(${t.value.style.chart.axes.y.name.offsetX+i.value.yAxisName}, ${v.value.height/2+t.value.style.chart.axes.y.name.offsetY}), rotate(-90)`,"font-size":i.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,je)):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalLines.show?(e.openBlock(),e.createElementBlock("g",Ue,[(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,He))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.labels.show?(e.openBlock(),e.createElementBlock("g",We,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickX,a=>(e.openBlock(),e.createElementBlock("text",{transform:`translate(${a.x}, ${n.value.bottom+t.value.style.chart.axes.x.labels.offsetY+i.value.xAxisLabels}), rotate(${t.value.style.chart.axes.x.labels.rotation})`,fill:t.value.style.chart.axes.x.labels.color,"font-size":i.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,Ge))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.name.text?(e.openBlock(),e.createElementBlock("text",{key:7,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":i.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,Ze)):e.createCommentVNode("",!0),t.value.style.chart.grid.xAxis.show?(e.openBlock(),e.createElementBlock("line",{key:8,x1:n.value.left,x2:n.value.left+n.value.width,y1:n.value.bottom,y2:n.value.bottom,stroke:t.value.style.chart.grid.xAxis.stroke,"stroke-width":t.value.style.chart.grid.xAxis.strokeWidth,"stroke-linecap":"round"},null,8,Je)):e.createCommentVNode("",!0),t.value.style.chart.grid.yAxis.show?(e.openBlock(),e.createElementBlock("line",{key:9,x1:n.value.left,x2:n.value.left,y1:n.value.top,y2:n.value.bottom,stroke:t.value.style.chart.grid.yAxis.stroke,"stroke-width":t.value.style.chart.grid.yAxis.strokeWidth,"stroke-linecap":"round"},null,8,Ke)):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,Qe),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,et)],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:i.value.plots,stroke:"none"},null,8,tt))),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:i.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,lt))),256)),t.value.style.chart.plots.labels.show?(e.openBlock(),e.createElementBlock("g",at,[(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+i.value.plots+i.value.labels,"font-size":i.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,ot))),256))])):e.createCommentVNode("",!0),t.value.style.chart.plots.indexLabels.show?(e.openBlock(),e.createElementBlock("g",st,[(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+i.value.indexLabels/3,"font-size":i.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,rt))),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:i.value.plots,stroke:"none",onMouseenter:m=>ke({datapoint:u,plotIndex:s,seriesIndex:a.seriesIndex}),onMouseleave:o[0]||(o[0]=m=>{N.value=!1,p.value=null}),onClick:()=>xe(u)},null,40,nt))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:v.value},void 0,!0)],12,Ae)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",it,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(H)})),void 0,!0)])):e.createCommentVNode("",!0),y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($e.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(we.Legend,{key:`legend_${P.value}`,legendSet:J.value,config:pe.value,onClickMarker:o[1]||(o[1]=({legend:a})=>{Z(a.seriesIndex),K(a)})},{item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:s=>{a.segregate(),K(a)},style:e.normalizeStyle(`opacity:${h.value.includes(a.seriesIndex)?.5:1}`)},e.toDisplayString(a.name),13,ut)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:J.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:D,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Se._sfc_main,{show:f.value.showTooltip&&N.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:z.value,isCustom:C.value,isFullscreen:B.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","isFullscreen"]),y.value?(e.openBlock(),e.createBlock(Ne.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(_e.DataTable,{key:`table_${V.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.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,ct)]),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)],46,Te))}},dt=Me._export_sfc(vt,[["__scopeId","data-v-8852c1fd"]]);exports.default=dt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-inkOR4zq.cjs"),le=require("./useNestedProp-C8eIYJIz.cjs"),ae=require("./usePrinter-D6taMMgW.cjs"),Ce=require("./PackageVersion-BOKy76ww.cjs"),we=require("./Legend-BSYRK6Q_.cjs"),Be=require("./Title-BnX-oH1C.cjs"),Se=require("./Tooltip-CeVBkaaR.cjs"),_e=require("./DataTable-CdCwimMg.cjs"),Ne=require("./vue-ui-accordion-D4bxWDy8.cjs"),ze=require("./PenAndPaper-DOWIdZvQ.cjs"),$e=require("./vue-ui-skeleton-pv3sv7Lv.cjs"),oe=require("./useResponsive-N8jl0-aC.cjs"),Le=require("./useUserOptionState-BgepsfED.cjs"),Ee=require("./useChartAccessibility-Cm7nkzTG.cjs"),Me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Te=["id"],Ae=["xmlns","viewBox"],Pe=["x","y","width","height"],Ve={key:1},Fe=["id"],Oe=["stop-color"],De=["stop-color"],Ie=["stop-color"],Xe={key:2},qe=["x1","x2","y1","y2","stroke","stroke-width"],Ye={key:3},Re=["x","y","fill","font-size"],je=["transform","font-size","fill","font-weight"],Ue={key:5},He=["x1","x2","y1","y2","stroke","stroke-width"],We={key:6},Ge=["transform","fill","font-size","text-anchor"],Ze=["x","y","font-size","fill","font-weight"],Je=["x1","x2","y1","y2","stroke","stroke-width"],Ke=["x1","x2","y1","y2","stroke","stroke-width"],Qe=["d","stroke","stroke-width"],et=["d","stroke","stroke-width"],tt=["cx","cy","fill","r"],lt=["cx","cy","fill","r","stroke","stroke-width"],at={key:1},ot=["x","y","font-size","fill","font-weight"],st={key:2},rt=["x","y","font-size","font-weight","fill"],nt=["cx","cy","r","onMouseenter","onClick"],it={key:5,class:"vue-data-ui-watermark"},ut=["onClick"],ct=["innerHTML"],vt={__name:"vue-ui-history-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(se,{expose:re,emit:ne}){const{vue_ui_history_plot:ie}=r.useConfig(),c=se,k=e.ref(null),M=e.ref(null),T=e.ref(0),A=e.ref(null),P=e.ref(0),V=e.ref(0),F=e.ref(0),w=e.ref(null),O=e.ref(null),b=e.ref(r.createUid()),N=e.ref(!1),z=e.ref(""),h=e.ref([]),B=e.ref(!1),p=e.ref(null),C=e.ref(!1),D=e.ref(null),y=e.computed({get:()=>!!c.dataset&&c.dataset.length,set:l=>l}),I=ne;e.onMounted(X),e.onBeforeUnmount(()=>{w.value&&w.value.disconnect()});function X(){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=oe.throttle(()=>{const{width:o,height:a}=oe.useResponsive({chart:k.value,title:t.value.style.chart.title.text?M.value:null,noTitle:O.value,legend:t.value.style.chart.legend.show?A.value:null,source:D.value});requestAnimationFrame(()=>{v.value.width=o,v.value.height=a,i.value.plots=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.radius,threshold:3,fallback:3}),i.value.indexLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.indexLabels.fontSize,threshold:6,fallback:6}),i.value.labels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.labels.fontSize,threshold:6,fallback:6}),i.value.xAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.labels.fontSize,threshold:6,fallback:6}),i.value.xAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.name.fontSize,threshold:6,fallback:6}),i.value.yAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.labels.fontSize,threshold:6,fallback:6}),i.value.yAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.name.fontSize,threshold:6,fallback:6})})});w.value=new ResizeObserver(l),w.value.observe(k.value.parentNode)}}function q(){const l=le.useNestedProp({userConfig:c.config,defaultConfig:ie});let o={};return l.theme?o={...le.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:()=>q(),set:l=>l}),{userOptionsVisible:$,setUserOptionsVisibility:Y,keepUserOptionState:R}=Le.useUserOptionState({config:t.value}),{svgRef:j}=Ee.useChartAccessibility({config:t.value.style.chart.title});e.watch(()=>c.config,l=>{t.value=q(),$.value=!t.value.userOptions.showOnChartHover,X(),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,i.value.plots=t.value.style.chart.plots.radius,i.value.indexLabels=t.value.style.chart.plots.indexLabels.fontSize,i.value.labels=t.value.style.chart.plots.labels.fontSize,i.value.xAxisLabels=t.value.style.chart.axes.x.labels.fontSize,i.value.xAxisName=t.value.style.chart.axes.x.name.fontSize,i.value.yAxisLabels=t.value.style.chart.axes.y.labels.fontSize,i.value.yAxisName=t.value.style.chart.axes.y.name.fontSize,f.value.showTable=t.value.table.show,f.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:U,isImaging:H,generatePdf:W,generateImage:G}=ae.usePrinter({elementId:`history_plot_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-history-plot"}),ue=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ce=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}),n=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}}),i=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):ce.value[o]||r.palette[o]||r.palette[o%r.palette.length],seriesIndex:o})):[]),ve=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.x))):1),de=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}),he=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.y))):1),ye=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?de.value:t.value.style.chart.axes.x.scaleMin,t.value.style.chart.axes.x.scaleMax===null?ve.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?ye.value:t.value.style.chart.axes.y.scaleMin,t.value.style.chart.axes.y.scaleMax===null?he.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:n.value.left+(a-l.min)/(l.max-l.min)*n.value.width,y1:n.value.top,y2:n.value.bottom,value:a})),tickY:o.ticks.map(a=>({y:n.value.bottom-(a-o.min)/(o.max-o.min)*n.value.height,x1:n.value.left,x2:n.value.right,value:a}))}});function fe(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 n.value.left+((l||0)+o)/(d.value.x.max+o)*n.value.width}function me(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 n.value.bottom-((l||0)+o)/(d.value.y.max+o)*n.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:fe(s.x),y:me(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 Z(l){h.value.includes(l)?h.value=h.value.filter(o=>o!==l):h.value.push(l)}const J=e.computed(()=>x.value.map(l=>({...l,opacity:h.value.includes(l.seriesIndex)?.5:1,segregate:()=>Z(l.seriesIndex),isSegregated:h.value.includes(l.seriesIndex),shape:"circle"}))),pe=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 xe(l){I("selectDatapoint",l)}function K(l){I("selectLegend",{...l,isSegregated:!l.isSegregated,opacity:l.isSegregated?1:.5})}function ge(l){B.value=l,F.value+=1}const L=e.ref(null);function ke({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"&&(z.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>`,z.value=`<div>${s}</div>`}N.value=!0}e.computed(()=>({head:g.value.map(o=>({name:o.name,color:o.color}))}));const S=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 Q(){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 E(){_.value=!_.value}function ee(){f.value.showTable=!f.value.showTable}function te(){f.value.showTooltip=!f.value.showTooltip}function be(){return g.value}return re({getData:be,generatePdf:W,generateCsv:Q,generateImage:G,toggleTable:ee,toggleTooltip:te,toggleAnnotator:E}),(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":B.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%":""}`),onMouseenter:o[3]||(o[3]=()=>e.unref(Y)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(Y)(!1))},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ze.PenAndPaper,{key:0,svgRef:e.unref(j),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:_.value,onClose:E},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ue.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:O,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(Be._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.unref(R)||e.unref($))?(e.openBlock(),e.createBlock(ae.UserOptions,{ref:"details",key:`user_option_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(H),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:B.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:ge,onGeneratePdf:e.unref(W),onGenerateCsv:Q,onGenerateImage:e.unref(G),onToggleTable:ee,onToggleTooltip:te,onToggleAnnotator:E,style:e.normalizeStyle({visibility:e.unref(R)?e.unref($)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:u})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:u})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}: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:"6"}: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:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:j,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(Ce._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:n.value.left,y:n.value.top,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Pe)):e.createCommentVNode("",!0),t.value.style.chart.plots.gradient.show?(e.openBlock(),e.createElementBlock("defs",Ve,[(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,Oe),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(r.darkenHexColor)(a.color,.1)},null,8,De),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Ie)],8,Fe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalLines.show?(e.openBlock(),e.createElementBlock("g",Xe,[(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,qe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.labels.show?(e.openBlock(),e.createElementBlock("g",Ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickY,a=>(e.openBlock(),e.createElementBlock("text",{x:n.value.left+t.value.style.chart.axes.y.labels.offsetX-4,y:a.y+i.value.yAxisLabels/3,fill:t.value.style.chart.axes.y.labels.color,"font-size":i.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,Re))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.name.text?(e.openBlock(),e.createElementBlock("text",{key:4,transform:`translate(${t.value.style.chart.axes.y.name.offsetX+i.value.yAxisName}, ${v.value.height/2+t.value.style.chart.axes.y.name.offsetY}), rotate(-90)`,"font-size":i.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,je)):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalLines.show?(e.openBlock(),e.createElementBlock("g",Ue,[(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,He))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.labels.show?(e.openBlock(),e.createElementBlock("g",We,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickX,a=>(e.openBlock(),e.createElementBlock("text",{transform:`translate(${a.x}, ${n.value.bottom+t.value.style.chart.axes.x.labels.offsetY+i.value.xAxisLabels}), rotate(${t.value.style.chart.axes.x.labels.rotation})`,fill:t.value.style.chart.axes.x.labels.color,"font-size":i.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,Ge))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.name.text?(e.openBlock(),e.createElementBlock("text",{key:7,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":i.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,Ze)):e.createCommentVNode("",!0),t.value.style.chart.grid.xAxis.show?(e.openBlock(),e.createElementBlock("line",{key:8,x1:n.value.left,x2:n.value.left+n.value.width,y1:n.value.bottom,y2:n.value.bottom,stroke:t.value.style.chart.grid.xAxis.stroke,"stroke-width":t.value.style.chart.grid.xAxis.strokeWidth,"stroke-linecap":"round"},null,8,Je)):e.createCommentVNode("",!0),t.value.style.chart.grid.yAxis.show?(e.openBlock(),e.createElementBlock("line",{key:9,x1:n.value.left,x2:n.value.left,y1:n.value.top,y2:n.value.bottom,stroke:t.value.style.chart.grid.yAxis.stroke,"stroke-width":t.value.style.chart.grid.yAxis.strokeWidth,"stroke-linecap":"round"},null,8,Ke)):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,Qe),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,et)],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:i.value.plots,stroke:"none"},null,8,tt))),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:i.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,lt))),256)),t.value.style.chart.plots.labels.show?(e.openBlock(),e.createElementBlock("g",at,[(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+i.value.plots+i.value.labels,"font-size":i.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,ot))),256))])):e.createCommentVNode("",!0),t.value.style.chart.plots.indexLabels.show?(e.openBlock(),e.createElementBlock("g",st,[(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+i.value.indexLabels/3,"font-size":i.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,rt))),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:i.value.plots,stroke:"none",onMouseenter:m=>ke({datapoint:u,plotIndex:s,seriesIndex:a.seriesIndex}),onMouseleave:o[0]||(o[0]=m=>{N.value=!1,p.value=null}),onClick:()=>xe(u)},null,40,nt))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:v.value},void 0,!0)],12,Ae)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",it,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(H)})),void 0,!0)])):e.createCommentVNode("",!0),y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($e.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(we.Legend,{key:`legend_${P.value}`,legendSet:J.value,config:pe.value,onClickMarker:o[1]||(o[1]=({legend:a})=>{Z(a.seriesIndex),K(a)})},{item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:s=>{a.segregate(),K(a)},style:e.normalizeStyle(`opacity:${h.value.includes(a.seriesIndex)?.5:1}`)},e.toDisplayString(a.name),13,ut)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:J.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:D,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Se._sfc_main,{show:f.value.showTooltip&&N.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:z.value,isCustom:C.value,isFullscreen:B.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","isFullscreen"]),y.value?(e.openBlock(),e.createBlock(Ne.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(_e.DataTable,{key:`table_${V.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.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,ct)]),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)],46,Te))}},dt=Me._export_sfc(vt,[["__scopeId","data-v-8852c1fd"]]);exports.default=dt;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./useNestedProp-C8eIYJIz.cjs"),u=require("./index-inkOR4zq.cjs"),y=require("./vue-ui-digits-DG65Tfkm.cjs"),C={__name:"vue-ui-kpi",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(n){const{vue_ui_kpi:m}=u.useConfig(),o=n,a=e.computed({get:()=>i(),set:t=>t}),f=e.useSlots();e.onMounted(()=>{f["chart-background"]&&console.warn("VueUiKpi does not support the #chart-background slot.")});function i(){return p.useNestedProp({userConfig:o.config,defaultConfig:m})}e.watch(()=>o.config,t=>{a.value=i(),r()},{deep:!0});const g=e.ref((typeof o.dataset=="number",o.dataset)),l=e.ref(a.value.useAnimation?a.value.animationValueStart:g.value),s=t=>{const v=a.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()};e.onMounted(()=>{r()});function r(){a.value.useAnimation?(l.value=a.value.animationValueStart,s(o.dataset)):l.value=o.dataset}return e.watch(()=>o.dataset,t=>{a.value.useAnimation?s(t):l.value=t}),(t,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-kpi ${a.value.layoutClass}`),style:e.normalizeStyle(`background:${a.value.backgroundColor}; ${a.value.layoutCss}`)},[e.createElementVNode("div",{class:e.normalizeClass(`vue-ui-kpi-title ${a.value.titleClass}`),style:e.normalizeStyle(`font-family: ${a.value.fontFamily}; font-size:${a.value.titleFontSize}px; color:${a.value.titleColor}; font-weight:${a.value.titleBold?"bold":"normal"}; ${a.value.titleCss}`)},[e.renderSlot(t.$slots,"title",{comment:n.dataset}),e.createTextVNode(" "+e.toDisplayString(a.value.title),1)],6),e.renderSlot(t.$slots,"comment-before",{comment:n.dataset}),e.createElementVNode("div",{class:e.normalizeClass(`vue-ui-kpi-value ${a.value.valueClass}`),style:e.normalizeStyle(`font-family: ${a.value.fontFamily}; font-size:${a.value.valueFontSize}px; color:${a.value.valueColor}; font-weight:${a.value.valueBold?"bold":"normal"}; ${a.value.valueCss}`)},[e.renderSlot(t.$slots,"value",{comment:n.dataset}),a.value.analogDigits.show?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({height:a.value.analogDigits.height+"px"})},[e.createVNode(y.default,{dataset:Number(l.value.toFixed(a.value.valueRounding)),config:{backgroundColor:a.value.backgroundColor,digits:{color:a.value.analogDigits.color,skeletonColor:a.value.analogDigits.skeletonColor}}},null,8,["dataset","config"])],4)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(e.unref(u.applyDataLabel)(a.value.formatter,l.value,e.unref(u.dataLabel)({p:a.value.prefix,v:l.value,s:a.value.suffix,r:a.value.valueRounding}))),1)],64))],6),e.renderSlot(t.$slots,"comment-after",{comment:n.dataset})],6))}};exports.default=C;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed as D, useSlots as x, onMounted as g, watch as C, ref as $, createElementBlock as i, openBlock as s, normalizeStyle as u, normalizeClass as r, createElementVNode as k, renderSlot as n, createTextVNode as y, toDisplayString as h, createVNode as z, Fragment as A, unref as b } from "vue";
|
|
2
|
-
import { u as w } from "./useNestedProp-
|
|
3
|
-
import { u as B, i as L, f as M } from "./index-
|
|
4
|
-
import E from "./vue-ui-digits-
|
|
2
|
+
import { u as w } from "./useNestedProp-DvO0Mp94.js";
|
|
3
|
+
import { u as B, i as L, f as M } from "./index-DemRsUvG.js";
|
|
4
|
+
import E from "./vue-ui-digits-CkiC_YMf.js";
|
|
5
5
|
const G = {
|
|
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-C8eIYJIz.cjs"),n=require("./index-inkOR4zq.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){e.useCssVars(k=>({"4430a3e6":c.value,"056a6732":d.value,"7f3540a4":p.value}));const{vue_ui_mini_loader:a}=n.useConfig(),i=u,t=e.computed(()=>v.useNestedProp({userConfig:i.config,defaultConfig:a})),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",{class:"vue-ui-mini-loader",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-3b670831"]]);exports.default=N;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCssVars as h, computed as r, ref as f, createElementBlock as n, openBlock as u, unref as M, createCommentVNode as a, createElementVNode as t, normalizeStyle as l } 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-DvO0Mp94.js";
|
|
3
|
+
import { u as y, X as L } from "./index-DemRsUvG.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,14 +1,14 @@
|
|
|
1
1
|
import { toRef as de, resolveComponent as ve, createElementBlock as d, openBlock as s, Fragment as k, renderList as _, createCommentVNode as m, createBlock as R, createElementVNode as V, withModifiers as ze, renderSlot as $, mergeProps as Ce, withCtx as T, toDisplayString as Te, ref as p, onMounted as Le, onUnmounted as He, watchEffect as Be, computed as N, watch as Ge, unref as b, normalizeStyle as ce, normalizeClass as we, createVNode as ae, createSlots as Ve, normalizeProps as B, guardReactiveProps as G, createTextVNode as Xe, nextTick as je } from "vue";
|
|
2
|
-
import { u as qe, o as Ye, e as We, c as $e, t as Ze, p as xe, a as Qe, b as Je, X as Ke, l as et, P as tt, q as ot, r as lt, x as st, y as at } from "./index-
|
|
3
|
-
import { _ as nt } from "./Title-
|
|
4
|
-
import { u as rt, U as it } from "./usePrinter-
|
|
5
|
-
import { D as ut } from "./DataTable-
|
|
6
|
-
import { _ as ct } from "./Tooltip-
|
|
7
|
-
import dt from "./vue-ui-skeleton-
|
|
8
|
-
import vt from "./vue-ui-accordion-
|
|
9
|
-
import { u as Pe } from "./useNestedProp-
|
|
10
|
-
import { _ as ht } from "./PackageVersion-
|
|
11
|
-
import { P as ft } from "./PenAndPaper-
|
|
2
|
+
import { u as qe, o as Ye, e as We, c as $e, t as Ze, p as xe, a as Qe, b as Je, X as Ke, l as et, P as tt, q as ot, r as lt, x as st, y as at } from "./index-DemRsUvG.js";
|
|
3
|
+
import { _ as nt } from "./Title-BVFJm0A0.js";
|
|
4
|
+
import { u as rt, U as it } from "./usePrinter-DMfMqFyO.js";
|
|
5
|
+
import { D as ut } from "./DataTable-ByaBWEYb.js";
|
|
6
|
+
import { _ as ct } from "./Tooltip-BGERkvjK.js";
|
|
7
|
+
import dt from "./vue-ui-skeleton-5TjpkMTD.js";
|
|
8
|
+
import vt from "./vue-ui-accordion-C0kWmaMq.js";
|
|
9
|
+
import { u as Pe } from "./useNestedProp-DvO0Mp94.js";
|
|
10
|
+
import { _ as ht } from "./PackageVersion-BiK7Dx4X.js";
|
|
11
|
+
import { P as ft } from "./PenAndPaper-f3zHe5BC.js";
|
|
12
12
|
import { u as yt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
13
13
|
import { u as pt } from "./useChartAccessibility-BWojgys7.js";
|
|
14
14
|
import { _ as mt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),y=require("./index-BCAY_TBF.cjs"),ke=require("./Title-Vp8RX2Nj.cjs"),re=require("./usePrinter-CMRlY9rc.cjs"),be=require("./DataTable-CdAOPHJa.cjs"),Ce=require("./Tooltip-D6K610_p.cjs"),we=require("./vue-ui-skeleton-CNtHe3B_.cjs"),Be=require("./vue-ui-accordion-D86VhQnK.cjs"),ae=require("./useNestedProp-Ces_ZEmq.cjs"),Pe=require("./PackageVersion-D9dPTMdO.cjs"),xe=require("./PenAndPaper-Cpwa77pt.cjs"),Ee=require("./useUserOptionState-BgepsfED.cjs"),$e=require("./useChartAccessibility-Cm7nkzTG.cjs"),Fe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Ne=["x","y","height","width","onClick","onMouseover"],Te={__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:["click","hover"],setup(s,{emit:N}){const T=s,P=N;function a(r){P("click",r)}function p(r){P("hover",r)}return e.toRef(T,"dataset").value.forEach(r=>{r.nodes&&r.nodes.length>0&&r.nodes.forEach(v=>{v.ancestor=r})}),(r,v)=>{const L=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.dataset,i=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.polygonPath&&i.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.polygonPath.coordinates,(k,$)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("circle",{cx:k.x,cy:k.y,r:i.circleRadius,fill:`url(#gradient_${i.color})`,stroke:s.hoveredUid&&s.hoveredUid===i.uid?s.strokeHovered:s.stroke,"stroke-width":s.hoveredUid&&s.hoveredUid===i.uid?i.circleRadius/6:i.circleRadius/12,style:{cursor:"pointer"},onClick:x=>a(i),onMouseover:x=>p(i),onMouseleave:v[0]||(v[0]=x=>p(null))},null,40,Se),r.$slots.node?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:k.x-i.circleRadius,y:k.y-i.circleRadius,height:i.circleRadius*2,width:i.circleRadius*2,style:{overflow:"visible"},onClick:e.withModifiers(x=>a(i),["stop"]),onMouseover:x=>p(i),onMouseleave:v[1]||(v[1]=x=>p(null))},[e.renderSlot(r.$slots,"node",e.mergeProps({ref_for:!0},{node:i}))],40,Ne)):e.createCommentVNode("",!0)],64))),256)),i.nodes&&i.nodes.length>0?(e.openBlock(),e.createBlock(L,{key:0,dataset:i.nodes,color:s.color,stroke:s.stroke,strokeHovered:s.strokeHovered,hoveredUid:s.hoveredUid,onClick:a,onHover:p},{node:e.withCtx(({node:k})=>[e.renderSlot(r.$slots,"node",e.mergeProps({ref_for:!0},{node:k}))]),_:2},1032,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Le=["x1","y1","x2","y2","stroke","stroke-width"],Ve=["x1","y1","x2","y2","stroke","stroke-width"],Re={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(s){const N=s;return e.toRef(N,"dataset").value.forEach(P=>{P.nodes&&P.nodes.length>0&&P.nodes.forEach(a=>{a.ancestor=P})}),(P,a)=>{const p=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.dataset,c=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[c.polygonPath&&c.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(c.polygonPath.coordinates,(r,v)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[c.ancestor&&c.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:r.x,y1:r.y,x2:c.ancestor.polygonPath.coordinates[0].x,y2:c.ancestor.polygonPath.coordinates[0].y,stroke:s.backgroundColor,"stroke-width":c.circleRadius/1.5},null,8,Le),e.createElementVNode("line",{x1:r.x,y1:r.y,x2:c.ancestor.polygonPath.coordinates[0].x,y2:c.ancestor.polygonPath.coordinates[0].y,stroke:s.color,"stroke-width":c.circleRadius/2},null,8,Ve)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.dataset,c=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[c.polygonPath&&c.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[c.nodes&&c.nodes.length>0?(e.openBlock(),e.createBlock(p,{key:0,dataset:c.nodes,color:s.color,backgroundColor:s.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},Oe=["x","y","fill","font-size"],Ue={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(s,{emit:N}){const T=s;return e.toRef(T,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(p=>{p.ancestor=a})}),(a,p)=>{const c=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.dataset,r=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[r.polygonPath&&r.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.polygonPath.coordinates,v=>(e.openBlock(),e.createElementBlock("text",{x:v.x,y:v.y+r.circleRadius*2,fill:s.color,"font-size":r.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(r.name),9,Oe))),256)),r.nodes&&r.nodes.length>0?(e.openBlock(),e.createBlock(c,{key:0,dataset:r.nodes,color:s.color,hoveredUid:s.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}};function De(s,N={x:0,y:0,width:100,height:100},T=1,P){const a=e.ref({...N}),p=e.ref(1),c=e.ref(!1),r=e.ref({x:0,y:0});let v={x:0,y:0},L=null,i=null;function k(l){var E;const d=s.value;if(!d)return{x:0,y:0};const m=d.createSVGPoint();m.x=l.clientX,m.y=l.clientY;const C=(E=d.getScreenCTM())==null?void 0:E.inverse();return C?m.matrixTransform(C):{x:0,y:0}}function $(l){c.value=!0;const d=k(l.touches?l.touches[0]:l);r.value={x:d.x,y:d.y},v={x:0,y:0}}function x(l){if(!c.value)return;const d=k(l.touches?l.touches[0]:l);let m=d.x-r.value.x,C=d.y-r.value.y;Math.abs(m)<.3&&Math.abs(C)<.3||(v.x=m*.8+v.x*.2,v.y=C*.8+v.y*.2,r.value=d,L||(L=requestAnimationFrame(q)))}function q(){a.value.x-=v.x,a.value.y-=v.y,L=null}function F(){c.value=!1}function t(l){l.preventDefault();const d=l.deltaY>0?.9:1.1;R(d,k(l))}function V(l){l.preventDefault();const d=k(l),m=1.02*(1+T/100);H(m,d)}function H(l,d){i&&cancelAnimationFrame(i);let m=p.value,C=m*l,E=0;const g=()=>{E+=.02;let U=m+(C-m)*G(E);if(E>=1){p.value=C,i=null;return}R(U/m,d),i=requestAnimationFrame(g)};g()}const G=l=>l<.5?2*l*l:-1+(4-2*l)*l;function R(l,d){const m=p.value*l,C=m/p.value,E=a.value.width/C,g=a.value.height/C,U=(d.x-a.value.x)*(1-1/C),X=(d.y-a.value.y)*(1-1/C);a.value.x+=U,a.value.y+=X,a.value.width=E,a.value.height=g,p.value=m}e.onMounted(A),e.onUnmounted(O);function A(){const l=s.value;l&&(l.addEventListener("mousedown",$),l.addEventListener("mousemove",x),l.addEventListener("mouseup",F),l.addEventListener("mouseleave",F),l.addEventListener("wheel",t,{passive:!1}),l.addEventListener("dblclick",V),l.addEventListener("touchstart",d=>{d.preventDefault(),$(d)},{passive:!1}),l.addEventListener("touchmove",d=>{d.preventDefault(),x(d)},{passive:!1}),l.addEventListener("touchend",F))}function O(){const l=s.value;l&&(l.removeEventListener("mousedown",$),l.removeEventListener("mousemove",x),l.removeEventListener("mouseup",F),l.removeEventListener("mouseleave",F),l.removeEventListener("wheel",t),l.removeEventListener("dblclick",V),l.removeEventListener("touchstart",$),l.removeEventListener("touchmove",x),l.removeEventListener("touchend",F))}return e.watchEffect(()=>(P.value?A():O(),()=>{O()})),{viewBox:a}}const Ae=["id"],ze={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},Ie={key:2,style:"width:100%;background:transparent;"},Me=["xmlns","viewBox"],_e=["width","height"],qe=["id"],He=["stop-color"],Ge=["stop-color"],je={key:5,class:"vue-data-ui-watermark"},Xe={key:7,ref:"source",dir:"auto"},Ye=["innerHTML"],We={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectNode"],setup(s,{expose:N,emit:T}){const{vue_ui_molecule:P}=y.useConfig(),a=s,p=T,c=e.computed(()=>!!a.dataset&&a.dataset.length);e.onMounted(()=>{r()});function r(){y.objectIsEmpty(a.dataset)&&y.error({componentName:"VueUiMolecule",type:"dataset"})}const v=e.ref(y.createUid()),L=e.ref(null),i=e.ref(!1),k=e.ref(""),$=e.ref(null),x=e.ref(0),q=e.ref(0),F=e.ref(0),t=e.computed({get:()=>A(),set:o=>o}),{userOptionsVisible:V,setUserOptionsVisibility:H,keepUserOptionState:G}=Ee.useUserOptionState({config:t.value}),{svgRef:R}=$e.useChartAccessibility({config:t.value.style.chart.title});function A(){const o=ae.useNestedProp({userConfig:a.config,defaultConfig:P});return o.theme?{...ae.useNestedProp({userConfig:y.themes.vue_ui_molecule[o.theme]||a.config,defaultConfig:o}),customPalette:y.themePalettes[o.theme]||y.palette}:o}e.watch(()=>a.config,o=>{t.value=A(),V.value=!t.value.userOptions.showOnChartHover,r(),q.value+=1,F.value+=1,g.value.showTable=t.value.table.show,g.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:O,isImaging:l,generatePdf:d,generateImage:m}=re.usePrinter({elementId:`cluster_${v.value}`,fileName:t.value.style.chart.title.text||"vue-ui-molecule"}),C=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),E=e.computed(()=>y.convertCustomPalette(t.value.customPalette)),g=e.ref({showTable:t.value.table.show,showDataLabels:!0,showTooltip:t.value.style.chart.tooltip.show});function U(o,u=0){return Array.isArray(o)&&o.length>0&&o[0].nodes?U(o[0].nodes,u+1):u}function X(){const o=U(a.dataset);let u=100,n=u;for(let h=0;h<o;h+=1)u/=1,n+=u;return{height:n,width:n}}const w=e.ref(X());e.ref(`0 0 ${w.value.width} ${w.value.height}`);function Q(o,u={x:-w.value.width/2.43,y:w.value.height/2},n=w.value.width/1.1,h=24,f=0,b=0,Z="#BBBBBB"){if(o&&o.length>0){const ge=y.createPolygonPath({plot:u,radius:n,sides:o.length,rotation:f});o.forEach((B,le)=>{const ne=ge.coordinates[le];let _;if(B.ancestor?B.ancestor.ancestor?_=B.ancestor.color||Z:(_=E.value[b]||y.palette[b]||Z,b+=1):_=Z,B.polygonPath={coordinates:[ne]},B.circleRadius=h,B.color=_,B.uid=y.createUid(),B.nodes&&B.nodes.length>0){const ye=!B.ancestor||!B.ancestor.ancestor?b:0;B.nodes=Q(B.nodes,ne,n/2.9,h/2.2,f+Math.PI*le/B.nodes.length,ye,_)}})}return o}function se(o){const u=new Set;function n(f){f.forEach(b=>{b.color&&!u.has(b.color)&&u.add(b.color),b.nodes&&b.nodes.length>0&&n(b.nodes)})}n(o);const h={};return Array.from(u).forEach((f,b)=>{h[f]=`gradient_${b}`}),h}const ie=e.computed(()=>se(S.value)),S=e.computed(()=>Q(a.dataset)),Y=e.ref(null);function ue(o){Y.value={datapoint:o,seriesIndex:-1,series:S.value,config:t.value};const u=t.value.style.chart.tooltip.customFormat;if(y.isFunction(u)&&y.functionReturnsString(()=>u({seriesIndex:-1,datapoint:o,series:S.value,config:t.value})))k.value=u({seriesIndex:-1,datapoint:o,series:S.value,config:t.value});else{let n="";n+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${o.color}">⬤</div><div>${o.name}</div></div>`,o.details&&(n+=`<div style="width:100%;border-top:1px solid ${t.value.style.chart.tooltip.borderColor};margin-top: 2px">${o.details}</div>`),k.value=`<div style="font-family:inherit">${n}</div>`}}const J=e.ref(null),z=e.ref(null);function ce(o){J.value=o,o?(i.value=!0,ue(o),z.value=o.uid):(i.value=!1,k.value="",z.value=null)}function de(o){const u=[];function n(h){h.forEach(f=>{const b={name:f.name,details:f.details||"-",ancestor:f.ancestor&&f.ancestor.name||"-",color:f.color||""};u.push(b),f.nodes&&f.nodes.length>0&&n(f.nodes,f.name)})}return n(o),u}const ve=e.computed(()=>de(S.value)),D=e.computed(()=>{const o=[t.value.table.translations.nodeName,t.value.table.translations.details,t.value.table.translations.ancestor],u=ve.value.map((f,b)=>[{color:f.color,name:f.name},f.details,f.ancestor||""]),n={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},h=[t.value.table.translations.nodeName,t.value.table.translations.details,t.value.table.translations.ancestor];return{head:o,body:u,config:n,colNames:h}});function K(){e.nextTick(()=>{const o=D.value.body.map((h,f)=>[[h[0].name],[h[1]],[h[2]]]),u=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[...D.value.head]]].concat(o),n=y.createCsvContent(u);y.downloadCsv({csvContent:n,title:t.value.style.chart.title.text||"vue-ui-molecule"})})}function he(){return S.value}const I=e.ref(!1);function fe(o){I.value=o,x.value+=1}function ee(){g.value.showTable=!g.value.showTable}function te(){g.value.showDataLabels=!g.value.showDataLabels}function oe(){g.value.showTooltip=!g.value.showTooltip}const M=e.ref(!1);function W(){M.value=!M.value}const me=e.computed(()=>!M.value),{viewBox:j}=De(R,{x:0,y:0,width:w.value.width<=0?10:w.value.width,height:w.value.height<=0?10:w.value.height},t.value.style.chart.zoom.speed,me);function pe(o){p("selectNode",o)}return N({getData:he,generatePdf:d,generateCsv:K,generateImage:m,toggleTable:ee,toggleLabels:te,toggleTooltip:oe,toggleAnnotator:W}),(o,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"moleculeChart",ref:$,class:e.normalizeClass(`vue-ui-molecule ${I.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`cluster_${v.value}`,onMouseleave:u[1]||(u[1]=n=>{J.value=null,z.value=null,e.unref(H)(!1)}),onMouseenter:u[2]||(u[2]=()=>e.unref(H)(!0))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(xe.PenAndPaper,{key:0,svgRef:e.unref(R),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:M.value,onClose:W},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("div",ze,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Ie,[(e.openBlock(),e.createBlock(ke._sfc_main,{key:`title_${q.value}`,config:{title:{cy:"molecule-div-title",...t.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&c.value&&(e.unref(G)||e.unref(V))?(e.openBlock(),e.createBlock(re.UserOptions,{ref_key:"details",ref:L,key:`user_options_${x.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(O),isImaging:e.unref(l),uid:v.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:g.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:$.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:M.value,onToggleFullscreen:fe,onGeneratePdf:e.unref(d),onGenerateCsv:K,onGenerateImage:e.unref(m),onToggleTable:ee,onToggleLabels:te,onToggleTooltip:oe,onToggleAnnotator:W,style:e.normalizeStyle({visibility:e.unref(G)?e.unref(V)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:n,color:h})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:n,color:h})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:h})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:h})),void 0,!0)]),key:"7"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:n,isAnnotator:h})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:n,isAnnotator:h})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:R,xmlns:e.unref(y.XMLNS),viewBox:`${e.unref(j).x} ${e.unref(j).y} ${e.unref(j).width} ${e.unref(j).height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":I.value,"vue-data-ui-fulscreen--off":!I.value}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Pe._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:w.value.width<=0?10:w.value.width,height:w.value.height<=0?10:w.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,_e)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(ie.value),n=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${n}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(y.lightenHexColor)(n,.5)},null,8,He),e.createElementVNode("stop",{offset:"100%","stop-color":n},null,8,Ge)],8,qe))),256))]),e.createVNode(Re,{dataset:S.value,color:t.value.style.chart.links.stroke,backgroundColor:t.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Te,{dataset:S.value,hoveredUid:z.value,stroke:t.value.style.chart.nodes.stroke,strokeHovered:t.value.style.chart.nodes.strokeHovered,onClick:pe,onHover:ce},{node:e.withCtx(({node:n})=>[e.renderSlot(o.$slots,"node",e.normalizeProps(e.guardReactiveProps({node:n})),void 0,!0)]),_:3},8,["dataset","hoveredUid","stroke","strokeHovered"]),g.value.showDataLabels?(e.openBlock(),e.createBlock(Ue,{key:1,dataset:S.value,color:t.value.style.chart.color,hoveredUid:z.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:w.value},void 0,!0)],14,Me)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",je,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(l)})),void 0,!0)])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(we.default,{key:6,config:{type:"molecule",style:{backgroundColor:t.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),o.$slots.source?(e.openBlock(),e.createElementBlock("div",Xe,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Ce._sfc_main,{show:g.value.showTooltip&&i.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:$.value,content:k.value,isFullscreen:I.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Y.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Y.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),c.value?(e.openBlock(),e.createBlock(Be.default,{key:8,hideDetails:"",config:{open:g.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_${F.value}`,colNames:D.value.colNames,head:D.value.head,body:D.value.body,config:D.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:u[0]||(u[0]=n=>g.value.showTable=!1)},{th:e.withCtx(({th:n})=>[e.createElementVNode("div",{innerHTML:n,style:{display:"flex","align-items":"center"}},null,8,Ye)]),td:e.withCtx(({td:n})=>[e.createTextVNode(e.toDisplayString(n.name||n),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ae))}},Ze=Fe._export_sfc(We,[["__scopeId","data-v-c4dc9cf3"]]);exports.default=Ze;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),y=require("./index-inkOR4zq.cjs"),ke=require("./Title-BnX-oH1C.cjs"),re=require("./usePrinter-D6taMMgW.cjs"),be=require("./DataTable-CdCwimMg.cjs"),Ce=require("./Tooltip-CeVBkaaR.cjs"),we=require("./vue-ui-skeleton-pv3sv7Lv.cjs"),Be=require("./vue-ui-accordion-D4bxWDy8.cjs"),ae=require("./useNestedProp-C8eIYJIz.cjs"),Pe=require("./PackageVersion-BOKy76ww.cjs"),xe=require("./PenAndPaper-DOWIdZvQ.cjs"),Ee=require("./useUserOptionState-BgepsfED.cjs"),$e=require("./useChartAccessibility-Cm7nkzTG.cjs"),Fe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Ne=["x","y","height","width","onClick","onMouseover"],Te={__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:["click","hover"],setup(s,{emit:N}){const T=s,P=N;function a(r){P("click",r)}function p(r){P("hover",r)}return e.toRef(T,"dataset").value.forEach(r=>{r.nodes&&r.nodes.length>0&&r.nodes.forEach(v=>{v.ancestor=r})}),(r,v)=>{const L=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.dataset,i=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.polygonPath&&i.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.polygonPath.coordinates,(k,$)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("circle",{cx:k.x,cy:k.y,r:i.circleRadius,fill:`url(#gradient_${i.color})`,stroke:s.hoveredUid&&s.hoveredUid===i.uid?s.strokeHovered:s.stroke,"stroke-width":s.hoveredUid&&s.hoveredUid===i.uid?i.circleRadius/6:i.circleRadius/12,style:{cursor:"pointer"},onClick:x=>a(i),onMouseover:x=>p(i),onMouseleave:v[0]||(v[0]=x=>p(null))},null,40,Se),r.$slots.node?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:k.x-i.circleRadius,y:k.y-i.circleRadius,height:i.circleRadius*2,width:i.circleRadius*2,style:{overflow:"visible"},onClick:e.withModifiers(x=>a(i),["stop"]),onMouseover:x=>p(i),onMouseleave:v[1]||(v[1]=x=>p(null))},[e.renderSlot(r.$slots,"node",e.mergeProps({ref_for:!0},{node:i}))],40,Ne)):e.createCommentVNode("",!0)],64))),256)),i.nodes&&i.nodes.length>0?(e.openBlock(),e.createBlock(L,{key:0,dataset:i.nodes,color:s.color,stroke:s.stroke,strokeHovered:s.strokeHovered,hoveredUid:s.hoveredUid,onClick:a,onHover:p},{node:e.withCtx(({node:k})=>[e.renderSlot(r.$slots,"node",e.mergeProps({ref_for:!0},{node:k}))]),_:2},1032,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Le=["x1","y1","x2","y2","stroke","stroke-width"],Ve=["x1","y1","x2","y2","stroke","stroke-width"],Re={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(s){const N=s;return e.toRef(N,"dataset").value.forEach(P=>{P.nodes&&P.nodes.length>0&&P.nodes.forEach(a=>{a.ancestor=P})}),(P,a)=>{const p=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.dataset,c=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[c.polygonPath&&c.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(c.polygonPath.coordinates,(r,v)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[c.ancestor&&c.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:r.x,y1:r.y,x2:c.ancestor.polygonPath.coordinates[0].x,y2:c.ancestor.polygonPath.coordinates[0].y,stroke:s.backgroundColor,"stroke-width":c.circleRadius/1.5},null,8,Le),e.createElementVNode("line",{x1:r.x,y1:r.y,x2:c.ancestor.polygonPath.coordinates[0].x,y2:c.ancestor.polygonPath.coordinates[0].y,stroke:s.color,"stroke-width":c.circleRadius/2},null,8,Ve)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.dataset,c=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[c.polygonPath&&c.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[c.nodes&&c.nodes.length>0?(e.openBlock(),e.createBlock(p,{key:0,dataset:c.nodes,color:s.color,backgroundColor:s.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},Oe=["x","y","fill","font-size"],Ue={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(s,{emit:N}){const T=s;return e.toRef(T,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(p=>{p.ancestor=a})}),(a,p)=>{const c=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.dataset,r=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[r.polygonPath&&r.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.polygonPath.coordinates,v=>(e.openBlock(),e.createElementBlock("text",{x:v.x,y:v.y+r.circleRadius*2,fill:s.color,"font-size":r.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(r.name),9,Oe))),256)),r.nodes&&r.nodes.length>0?(e.openBlock(),e.createBlock(c,{key:0,dataset:r.nodes,color:s.color,hoveredUid:s.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}};function De(s,N={x:0,y:0,width:100,height:100},T=1,P){const a=e.ref({...N}),p=e.ref(1),c=e.ref(!1),r=e.ref({x:0,y:0});let v={x:0,y:0},L=null,i=null;function k(l){var E;const d=s.value;if(!d)return{x:0,y:0};const m=d.createSVGPoint();m.x=l.clientX,m.y=l.clientY;const C=(E=d.getScreenCTM())==null?void 0:E.inverse();return C?m.matrixTransform(C):{x:0,y:0}}function $(l){c.value=!0;const d=k(l.touches?l.touches[0]:l);r.value={x:d.x,y:d.y},v={x:0,y:0}}function x(l){if(!c.value)return;const d=k(l.touches?l.touches[0]:l);let m=d.x-r.value.x,C=d.y-r.value.y;Math.abs(m)<.3&&Math.abs(C)<.3||(v.x=m*.8+v.x*.2,v.y=C*.8+v.y*.2,r.value=d,L||(L=requestAnimationFrame(q)))}function q(){a.value.x-=v.x,a.value.y-=v.y,L=null}function F(){c.value=!1}function t(l){l.preventDefault();const d=l.deltaY>0?.9:1.1;R(d,k(l))}function V(l){l.preventDefault();const d=k(l),m=1.02*(1+T/100);H(m,d)}function H(l,d){i&&cancelAnimationFrame(i);let m=p.value,C=m*l,E=0;const g=()=>{E+=.02;let U=m+(C-m)*G(E);if(E>=1){p.value=C,i=null;return}R(U/m,d),i=requestAnimationFrame(g)};g()}const G=l=>l<.5?2*l*l:-1+(4-2*l)*l;function R(l,d){const m=p.value*l,C=m/p.value,E=a.value.width/C,g=a.value.height/C,U=(d.x-a.value.x)*(1-1/C),X=(d.y-a.value.y)*(1-1/C);a.value.x+=U,a.value.y+=X,a.value.width=E,a.value.height=g,p.value=m}e.onMounted(A),e.onUnmounted(O);function A(){const l=s.value;l&&(l.addEventListener("mousedown",$),l.addEventListener("mousemove",x),l.addEventListener("mouseup",F),l.addEventListener("mouseleave",F),l.addEventListener("wheel",t,{passive:!1}),l.addEventListener("dblclick",V),l.addEventListener("touchstart",d=>{d.preventDefault(),$(d)},{passive:!1}),l.addEventListener("touchmove",d=>{d.preventDefault(),x(d)},{passive:!1}),l.addEventListener("touchend",F))}function O(){const l=s.value;l&&(l.removeEventListener("mousedown",$),l.removeEventListener("mousemove",x),l.removeEventListener("mouseup",F),l.removeEventListener("mouseleave",F),l.removeEventListener("wheel",t),l.removeEventListener("dblclick",V),l.removeEventListener("touchstart",$),l.removeEventListener("touchmove",x),l.removeEventListener("touchend",F))}return e.watchEffect(()=>(P.value?A():O(),()=>{O()})),{viewBox:a}}const Ae=["id"],ze={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},Ie={key:2,style:"width:100%;background:transparent;"},Me=["xmlns","viewBox"],_e=["width","height"],qe=["id"],He=["stop-color"],Ge=["stop-color"],je={key:5,class:"vue-data-ui-watermark"},Xe={key:7,ref:"source",dir:"auto"},Ye=["innerHTML"],We={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectNode"],setup(s,{expose:N,emit:T}){const{vue_ui_molecule:P}=y.useConfig(),a=s,p=T,c=e.computed(()=>!!a.dataset&&a.dataset.length);e.onMounted(()=>{r()});function r(){y.objectIsEmpty(a.dataset)&&y.error({componentName:"VueUiMolecule",type:"dataset"})}const v=e.ref(y.createUid()),L=e.ref(null),i=e.ref(!1),k=e.ref(""),$=e.ref(null),x=e.ref(0),q=e.ref(0),F=e.ref(0),t=e.computed({get:()=>A(),set:o=>o}),{userOptionsVisible:V,setUserOptionsVisibility:H,keepUserOptionState:G}=Ee.useUserOptionState({config:t.value}),{svgRef:R}=$e.useChartAccessibility({config:t.value.style.chart.title});function A(){const o=ae.useNestedProp({userConfig:a.config,defaultConfig:P});return o.theme?{...ae.useNestedProp({userConfig:y.themes.vue_ui_molecule[o.theme]||a.config,defaultConfig:o}),customPalette:y.themePalettes[o.theme]||y.palette}:o}e.watch(()=>a.config,o=>{t.value=A(),V.value=!t.value.userOptions.showOnChartHover,r(),q.value+=1,F.value+=1,g.value.showTable=t.value.table.show,g.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:O,isImaging:l,generatePdf:d,generateImage:m}=re.usePrinter({elementId:`cluster_${v.value}`,fileName:t.value.style.chart.title.text||"vue-ui-molecule"}),C=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),E=e.computed(()=>y.convertCustomPalette(t.value.customPalette)),g=e.ref({showTable:t.value.table.show,showDataLabels:!0,showTooltip:t.value.style.chart.tooltip.show});function U(o,u=0){return Array.isArray(o)&&o.length>0&&o[0].nodes?U(o[0].nodes,u+1):u}function X(){const o=U(a.dataset);let u=100,n=u;for(let h=0;h<o;h+=1)u/=1,n+=u;return{height:n,width:n}}const w=e.ref(X());e.ref(`0 0 ${w.value.width} ${w.value.height}`);function Q(o,u={x:-w.value.width/2.43,y:w.value.height/2},n=w.value.width/1.1,h=24,f=0,b=0,Z="#BBBBBB"){if(o&&o.length>0){const ge=y.createPolygonPath({plot:u,radius:n,sides:o.length,rotation:f});o.forEach((B,le)=>{const ne=ge.coordinates[le];let _;if(B.ancestor?B.ancestor.ancestor?_=B.ancestor.color||Z:(_=E.value[b]||y.palette[b]||Z,b+=1):_=Z,B.polygonPath={coordinates:[ne]},B.circleRadius=h,B.color=_,B.uid=y.createUid(),B.nodes&&B.nodes.length>0){const ye=!B.ancestor||!B.ancestor.ancestor?b:0;B.nodes=Q(B.nodes,ne,n/2.9,h/2.2,f+Math.PI*le/B.nodes.length,ye,_)}})}return o}function se(o){const u=new Set;function n(f){f.forEach(b=>{b.color&&!u.has(b.color)&&u.add(b.color),b.nodes&&b.nodes.length>0&&n(b.nodes)})}n(o);const h={};return Array.from(u).forEach((f,b)=>{h[f]=`gradient_${b}`}),h}const ie=e.computed(()=>se(S.value)),S=e.computed(()=>Q(a.dataset)),Y=e.ref(null);function ue(o){Y.value={datapoint:o,seriesIndex:-1,series:S.value,config:t.value};const u=t.value.style.chart.tooltip.customFormat;if(y.isFunction(u)&&y.functionReturnsString(()=>u({seriesIndex:-1,datapoint:o,series:S.value,config:t.value})))k.value=u({seriesIndex:-1,datapoint:o,series:S.value,config:t.value});else{let n="";n+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${o.color}">⬤</div><div>${o.name}</div></div>`,o.details&&(n+=`<div style="width:100%;border-top:1px solid ${t.value.style.chart.tooltip.borderColor};margin-top: 2px">${o.details}</div>`),k.value=`<div style="font-family:inherit">${n}</div>`}}const J=e.ref(null),z=e.ref(null);function ce(o){J.value=o,o?(i.value=!0,ue(o),z.value=o.uid):(i.value=!1,k.value="",z.value=null)}function de(o){const u=[];function n(h){h.forEach(f=>{const b={name:f.name,details:f.details||"-",ancestor:f.ancestor&&f.ancestor.name||"-",color:f.color||""};u.push(b),f.nodes&&f.nodes.length>0&&n(f.nodes,f.name)})}return n(o),u}const ve=e.computed(()=>de(S.value)),D=e.computed(()=>{const o=[t.value.table.translations.nodeName,t.value.table.translations.details,t.value.table.translations.ancestor],u=ve.value.map((f,b)=>[{color:f.color,name:f.name},f.details,f.ancestor||""]),n={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},h=[t.value.table.translations.nodeName,t.value.table.translations.details,t.value.table.translations.ancestor];return{head:o,body:u,config:n,colNames:h}});function K(){e.nextTick(()=>{const o=D.value.body.map((h,f)=>[[h[0].name],[h[1]],[h[2]]]),u=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[...D.value.head]]].concat(o),n=y.createCsvContent(u);y.downloadCsv({csvContent:n,title:t.value.style.chart.title.text||"vue-ui-molecule"})})}function he(){return S.value}const I=e.ref(!1);function fe(o){I.value=o,x.value+=1}function ee(){g.value.showTable=!g.value.showTable}function te(){g.value.showDataLabels=!g.value.showDataLabels}function oe(){g.value.showTooltip=!g.value.showTooltip}const M=e.ref(!1);function W(){M.value=!M.value}const me=e.computed(()=>!M.value),{viewBox:j}=De(R,{x:0,y:0,width:w.value.width<=0?10:w.value.width,height:w.value.height<=0?10:w.value.height},t.value.style.chart.zoom.speed,me);function pe(o){p("selectNode",o)}return N({getData:he,generatePdf:d,generateCsv:K,generateImage:m,toggleTable:ee,toggleLabels:te,toggleTooltip:oe,toggleAnnotator:W}),(o,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"moleculeChart",ref:$,class:e.normalizeClass(`vue-ui-molecule ${I.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`cluster_${v.value}`,onMouseleave:u[1]||(u[1]=n=>{J.value=null,z.value=null,e.unref(H)(!1)}),onMouseenter:u[2]||(u[2]=()=>e.unref(H)(!0))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(xe.PenAndPaper,{key:0,svgRef:e.unref(R),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:M.value,onClose:W},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("div",ze,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Ie,[(e.openBlock(),e.createBlock(ke._sfc_main,{key:`title_${q.value}`,config:{title:{cy:"molecule-div-title",...t.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&c.value&&(e.unref(G)||e.unref(V))?(e.openBlock(),e.createBlock(re.UserOptions,{ref_key:"details",ref:L,key:`user_options_${x.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(O),isImaging:e.unref(l),uid:v.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:g.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:$.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:M.value,onToggleFullscreen:fe,onGeneratePdf:e.unref(d),onGenerateCsv:K,onGenerateImage:e.unref(m),onToggleTable:ee,onToggleLabels:te,onToggleTooltip:oe,onToggleAnnotator:W,style:e.normalizeStyle({visibility:e.unref(G)?e.unref(V)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:n,color:h})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:n,color:h})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:h})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:h})),void 0,!0)]),key:"7"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:n,isAnnotator:h})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:n,isAnnotator:h})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:R,xmlns:e.unref(y.XMLNS),viewBox:`${e.unref(j).x} ${e.unref(j).y} ${e.unref(j).width} ${e.unref(j).height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":I.value,"vue-data-ui-fulscreen--off":!I.value}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Pe._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:w.value.width<=0?10:w.value.width,height:w.value.height<=0?10:w.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,_e)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(ie.value),n=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${n}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(y.lightenHexColor)(n,.5)},null,8,He),e.createElementVNode("stop",{offset:"100%","stop-color":n},null,8,Ge)],8,qe))),256))]),e.createVNode(Re,{dataset:S.value,color:t.value.style.chart.links.stroke,backgroundColor:t.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Te,{dataset:S.value,hoveredUid:z.value,stroke:t.value.style.chart.nodes.stroke,strokeHovered:t.value.style.chart.nodes.strokeHovered,onClick:pe,onHover:ce},{node:e.withCtx(({node:n})=>[e.renderSlot(o.$slots,"node",e.normalizeProps(e.guardReactiveProps({node:n})),void 0,!0)]),_:3},8,["dataset","hoveredUid","stroke","strokeHovered"]),g.value.showDataLabels?(e.openBlock(),e.createBlock(Ue,{key:1,dataset:S.value,color:t.value.style.chart.color,hoveredUid:z.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:w.value},void 0,!0)],14,Me)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",je,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(l)})),void 0,!0)])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(we.default,{key:6,config:{type:"molecule",style:{backgroundColor:t.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),o.$slots.source?(e.openBlock(),e.createElementBlock("div",Xe,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Ce._sfc_main,{show:g.value.showTooltip&&i.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:$.value,content:k.value,isFullscreen:I.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Y.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Y.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),c.value?(e.openBlock(),e.createBlock(Be.default,{key:8,hideDetails:"",config:{open:g.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_${F.value}`,colNames:D.value.colNames,head:D.value.head,body:D.value.body,config:D.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:u[0]||(u[0]=n=>g.value.showTable=!1)},{th:e.withCtx(({th:n})=>[e.createElementVNode("div",{innerHTML:n,style:{display:"flex","align-items":"center"}},null,8,Ye)]),td:e.withCtx(({td:n})=>[e.createTextVNode(e.toDisplayString(n.name||n),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ae))}},Ze=Fe._export_sfc(We,[["__scopeId","data-v-c4dc9cf3"]]);exports.default=Ze;
|