vue-data-ui 2.3.76 → 2.3.78
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-DY9RKUmG.js → Arrow-BCYtOwX7.js} +1 -1
- package/dist/{Arrow-D7M4-bW7.cjs → Arrow-DWkvIpW8.cjs} +1 -1
- package/dist/{BaseIcon-rwm-10Hu.js → BaseIcon-BIQXWVMS.js} +1 -1
- package/dist/{BaseIcon-DB7Apwv_.cjs → BaseIcon-Bcpzfk34.cjs} +1 -1
- package/dist/{DataTable-CsNozyz7.cjs → DataTable-C5TOiC61.cjs} +1 -1
- package/dist/{DataTable-e2fnfjXV.js → DataTable-y1lX5jVj.js} +2 -2
- package/dist/{Legend-5cQ0xZjK.js → Legend-BLXcdrri.js} +1 -1
- package/dist/{Legend-DgFd-O0m.cjs → Legend-CGGD8NhP.cjs} +1 -1
- package/dist/{Shape-CiTElr_0.js → Shape-CsoTtJx6.js} +1 -1
- package/dist/{Shape-yPECDLiP.cjs → Shape-qJYTY2BC.cjs} +1 -1
- package/dist/{Slicer-DaZgCKV7.cjs → Slicer-CZJXKSeE.cjs} +1 -1
- package/dist/{Slicer-DwBBu3kB.js → Slicer-DzJZ4axa.js} +12 -12
- package/dist/{Title-3EduyW4p.cjs → Title-BSpa3uge.cjs} +1 -1
- package/dist/{Title-gUz6GDA3.js → Title-Bx-VO3md.js} +1 -1
- package/dist/{Tooltip-DfSM1mNP.js → Tooltip-Dk-cimhQ.js} +23 -23
- package/dist/Tooltip-rmhZhv96.cjs +1 -0
- package/dist/index-CzjC8LfY.cjs +4 -0
- package/dist/{index-CaV1s-yZ.js → index-DP8dqFNd.js} +1147 -1145
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-tWCzZrLx.js → useNestedProp-B-oZxD4x.js} +1 -1
- package/dist/{useNestedProp-CisbRRo_.cjs → useNestedProp-CY7DebVH.cjs} +1 -1
- package/dist/{usePrinter-DzTaA1eh.cjs → usePrinter-DiLM6jav.cjs} +1 -1
- package/dist/{usePrinter-rvJyT65A.js → usePrinter-DiuHo4LO.js} +1 -1
- package/dist/{vue-data-ui-BGkWRPUY.cjs → vue-data-ui-Ce5IFSYA.cjs} +1 -1
- package/dist/{vue-data-ui-BO89gTtq.js → vue-data-ui-Ct7n5wkM.js} +57 -57
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +9 -9
- package/dist/vue-ui-3d-bar-B_i2EoFu.cjs +19 -0
- package/dist/{vue-ui-3d-bar-CcTMIHiB.js → vue-ui-3d-bar-O3fB5J7V.js} +342 -342
- package/dist/{vue-ui-accordion-CpzGQ63y.js → vue-ui-accordion-Dl8zkZPk.js} +3 -3
- package/dist/{vue-ui-accordion-7e4Myhcg.cjs → vue-ui-accordion-DpI7fTKZ.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-D71ZLkVV.js → vue-ui-age-pyramid-BeiREI6d.js} +22 -22
- package/dist/vue-ui-age-pyramid-BsAfxkN4.cjs +1 -0
- package/dist/{vue-ui-annotator-B8Iu6cYt.js → vue-ui-annotator-0yje27Qq.js} +39 -39
- package/dist/{vue-ui-annotator-BKQrweqm.cjs → vue-ui-annotator-DpN-6IwB.cjs} +2 -2
- package/dist/{vue-ui-candlestick-Bx4QVkY0.js → vue-ui-candlestick-D9UteVvx.js} +34 -34
- package/dist/{vue-ui-candlestick-DAc1FQ-i.cjs → vue-ui-candlestick-lv78wnpS.cjs} +2 -2
- package/dist/{vue-ui-carousel-table-uFRqkghO.cjs → vue-ui-carousel-table-Br6FwMKM.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-xuQG6bcH.js → vue-ui-carousel-table-jxZ3h5pq.js} +31 -31
- package/dist/{vue-ui-chestnut-Bo6rDcU7.js → vue-ui-chestnut-DXuHRJy4.js} +291 -288
- package/dist/vue-ui-chestnut-DbYHeNaL.cjs +6 -0
- package/dist/{vue-ui-cursor-C0KOqEOq.js → vue-ui-cursor-BzPbdVRJ.js} +20 -20
- package/dist/vue-ui-cursor-iss6SJ1Y.cjs +1 -0
- package/dist/{vue-ui-dashboard-BT71xS7P.js → vue-ui-dashboard-CGjWuFrI.js} +2 -2
- package/dist/{vue-ui-dashboard-0Hsjx-bO.cjs → vue-ui-dashboard-DKT82yQ4.cjs} +1 -1
- package/dist/{vue-ui-digits-BRqpKYvD.js → vue-ui-digits-BCguvLxB.js} +2 -2
- package/dist/{vue-ui-digits-C2ReH6w0.cjs → vue-ui-digits-BfwDCfYp.cjs} +1 -1
- package/dist/{vue-ui-donut-NQW-3prf.js → vue-ui-donut-DJTeGLVG.js} +209 -212
- package/dist/{vue-ui-donut-evolution-jbXQQGTc.js → vue-ui-donut-evolution-BaLDZNDG.js} +106 -106
- package/dist/vue-ui-donut-evolution-Bil1AIhX.cjs +1 -0
- package/dist/vue-ui-donut-uVPdO4UH.cjs +1 -0
- package/dist/{vue-ui-dumbbell-Dyz8xdtC.js → vue-ui-dumbbell-BqtDdV5w.js} +17 -17
- package/dist/{vue-ui-dumbbell-DXQSg6wa.cjs → vue-ui-dumbbell-DiL3xhKY.cjs} +1 -1
- package/dist/{vue-ui-flow-UqSNwH9d.cjs → vue-ui-flow-BVTbbsCK.cjs} +1 -1
- package/dist/{vue-ui-flow-BL3JWW1m.js → vue-ui-flow-zfTGon4s.js} +28 -28
- package/dist/{vue-ui-galaxy-Dx9nsOuM.js → vue-ui-galaxy-5iRb5sQ-.js} +22 -22
- package/dist/{vue-ui-galaxy-DTQWGvRH.cjs → vue-ui-galaxy-GSO_6KIe.cjs} +1 -1
- package/dist/vue-ui-gauge-Bz7oLa51.cjs +1 -0
- package/dist/{vue-ui-gauge-CLaKGi0-.js → vue-ui-gauge-DljHYdCS.js} +101 -110
- package/dist/{vue-ui-gizmo-of-4s5HG.js → vue-ui-gizmo-B-fxFOZy.js} +2 -2
- package/dist/{vue-ui-gizmo-Kitfqu0J.cjs → vue-ui-gizmo-KL0OJY2K.cjs} +1 -1
- package/dist/{vue-ui-heatmap-BIzjOMXO.js → vue-ui-heatmap-ketn_NV3.js} +17 -17
- package/dist/{vue-ui-heatmap-DUw2350O.cjs → vue-ui-heatmap-thMJPCfo.cjs} +1 -1
- package/dist/{vue-ui-kpi-By3YPwgo.js → vue-ui-kpi-Bxu8uZ21.js} +3 -3
- package/dist/{vue-ui-kpi-DyL2Hcz-.cjs → vue-ui-kpi-e1QWa8D4.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DnK3V2z2.js → vue-ui-mini-loader-BZ_2aV8O.js} +2 -2
- package/dist/{vue-ui-mini-loader-C048-8Kd.cjs → vue-ui-mini-loader-paRZQU8H.cjs} +1 -1
- package/dist/{vue-ui-molecule-BfhbIqa5.js → vue-ui-molecule-Bpp5unvI.js} +33 -33
- package/dist/{vue-ui-molecule-D-ahly6R.cjs → vue-ui-molecule-VOBL4Osc.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-DXxEKr3x.js → vue-ui-mood-radar-BY8XP_Q5.js} +129 -132
- package/dist/vue-ui-mood-radar-CwtMLwP8.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-BdUdHFd-.js → vue-ui-nested-donuts-5uuLi3If.js} +98 -98
- package/dist/{vue-ui-nested-donuts-C7qM_FRw.cjs → vue-ui-nested-donuts-CLnVnAiD.cjs} +2 -2
- package/dist/{vue-ui-onion-DX3gofXZ.cjs → vue-ui-onion-CMSPSSSG.cjs} +1 -1
- package/dist/{vue-ui-onion-D0vF5jBt.js → vue-ui-onion-zDy4ecPl.js} +9 -9
- package/dist/{vue-ui-parallel-coordinate-plot-DEx5kFYd.cjs → vue-ui-parallel-coordinate-plot-1PFxiI__.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-CTZY-pY8.js → vue-ui-parallel-coordinate-plot-BeEkL7Dq.js} +24 -24
- package/dist/vue-ui-quadrant-Cx5z_c90.cjs +1 -0
- package/dist/{vue-ui-quadrant-ByY8GP3y.js → vue-ui-quadrant-MCIlbbsW.js} +35 -35
- package/dist/{vue-ui-quick-chart-DWZEgUJF.cjs → vue-ui-quick-chart-Xn-47NQG.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-DTxJ__7j.js → vue-ui-quick-chart-r6Qa7qg_.js} +69 -69
- package/dist/{vue-ui-radar-DEED0rTz.cjs → vue-ui-radar-ANQ1wXFc.cjs} +1 -1
- package/dist/{vue-ui-radar-5UBmAU6W.js → vue-ui-radar-DFV5cFkl.js} +39 -39
- package/dist/{vue-ui-rating-Ce_Ewqtl.cjs → vue-ui-rating-BVzCbQbv.cjs} +1 -1
- package/dist/{vue-ui-rating-Dr6jquxh.js → vue-ui-rating-DYu1EuJF.js} +6 -6
- package/dist/{vue-ui-relation-circle-BU8i2miI.js → vue-ui-relation-circle-BAcmDQB_.js} +29 -29
- package/dist/vue-ui-relation-circle-DEM6C6Or.cjs +1 -0
- package/dist/{vue-ui-rings-Ctl3Jywh.js → vue-ui-rings-BiLlYpgu.js} +31 -31
- package/dist/{vue-ui-rings-OQ8a1Ruw.cjs → vue-ui-rings-Ce4G4hat.cjs} +2 -2
- package/dist/{vue-ui-scatter-BwJ_koWT.js → vue-ui-scatter-D2ndYfkQ.js} +95 -95
- package/dist/vue-ui-scatter-OtlcTCUF.cjs +1 -0
- package/dist/{vue-ui-screenshot-BS3L5vhN.js → vue-ui-screenshot-CKCNPn-e.js} +4 -4
- package/dist/{vue-ui-screenshot-bAVk3EPl.cjs → vue-ui-screenshot-DTQx4VsM.cjs} +1 -1
- package/dist/{vue-ui-skeleton-CvFX_ExX.js → vue-ui-skeleton-B30ZhUV7.js} +96 -96
- package/dist/vue-ui-skeleton-CwqzJlQf.cjs +41 -0
- package/dist/{vue-ui-smiley-CGYZpNt9.js → vue-ui-smiley-DzLvZR1k.js} +2 -2
- package/dist/{vue-ui-smiley-sF8QIso1.cjs → vue-ui-smiley-L6o24M6h.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-B4XSSKl9.js → vue-ui-spark-trend-BKsmENbH.js} +21 -21
- package/dist/vue-ui-spark-trend-BoWeviHk.cjs +1 -0
- package/dist/{vue-ui-sparkbar-BbsJGDMZ.js → vue-ui-sparkbar-DNzZkp8z.js} +10 -10
- package/dist/vue-ui-sparkbar-DY3iOLo4.cjs +1 -0
- package/dist/{vue-ui-sparkgauge-D4w_i_QJ.js → vue-ui-sparkgauge-B2DngjVP.js} +8 -8
- package/dist/{vue-ui-sparkgauge-BKyQoI7C.cjs → vue-ui-sparkgauge-BlZ-lJm4.cjs} +1 -1
- package/dist/vue-ui-sparkhistogram-BUBewgdH.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-CYybrW-6.js → vue-ui-sparkhistogram-Co9N3BeQ.js} +111 -101
- package/dist/vue-ui-sparkline-BhL0mxXD.cjs +1 -0
- package/dist/{vue-ui-sparkline-DjN1SVdO.js → vue-ui-sparkline-Dpqo4aRJ.js} +34 -34
- package/dist/{vue-ui-sparkstackbar-BZ2bESBi.cjs → vue-ui-sparkstackbar-DtNbx3EV.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-BLMhJxaN.js → vue-ui-sparkstackbar-_JwfRxF8.js} +5 -5
- package/dist/{vue-ui-stackbar-BTKOHUYc.js → vue-ui-stackbar-BtN7ZM7-.js} +202 -200
- package/dist/{vue-ui-stackbar-DRHaJFR8.cjs → vue-ui-stackbar-C7AWHP6m.cjs} +2 -2
- package/dist/{vue-ui-strip-plot-o6GTsGAT.js → vue-ui-strip-plot-6L9a7BSw.js} +26 -26
- package/dist/{vue-ui-strip-plot-DxQxFbWg.cjs → vue-ui-strip-plot-cgOFTunJ.cjs} +1 -1
- package/dist/{vue-ui-table-BFIj1Rgh.cjs → vue-ui-table-4Pf9tmFg.cjs} +1 -1
- package/dist/{vue-ui-table-CnquiTpr.js → vue-ui-table-BFYHRMCS.js} +1 -1
- package/dist/{vue-ui-table-heatmap-CZRIwv-Q.js → vue-ui-table-heatmap--kPCu8mA.js} +24 -24
- package/dist/{vue-ui-table-heatmap-CCGK12Fa.cjs → vue-ui-table-heatmap-CltKb2V9.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-DYmgfHz4.cjs → vue-ui-table-sparkline-B5OjJud8.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-B3zEeq6Z.js → vue-ui-table-sparkline-CsWx1Ksy.js} +26 -26
- package/dist/{vue-ui-thermometer-CzPRBt6c.cjs → vue-ui-thermometer-62_4QovL.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BopiohUh.js → vue-ui-thermometer-nTD7sp8r.js} +40 -40
- package/dist/{vue-ui-timer-Bonw69Lt.cjs → vue-ui-timer-BU0s7Vt9.cjs} +1 -1
- package/dist/{vue-ui-timer-C7WkW8hK.js → vue-ui-timer-DMFHjnzA.js} +8 -8
- package/dist/{vue-ui-tiremarks-BurRtFv4.js → vue-ui-tiremarks-1X9B1VKM.js} +18 -18
- package/dist/{vue-ui-tiremarks-DkIGfq8t.cjs → vue-ui-tiremarks-mwBeBMJY.cjs} +1 -1
- package/dist/{vue-ui-treemap-DWy4voIr.js → vue-ui-treemap-CVTwqPFA.js} +29 -29
- package/dist/{vue-ui-treemap-CalhJmnp.cjs → vue-ui-treemap-DQmBbm7e.cjs} +1 -1
- package/dist/vue-ui-vertical-bar-BXiy8KRC.cjs +4 -0
- package/dist/{vue-ui-vertical-bar-CJW1YhtY.js → vue-ui-vertical-bar-Br6Z0A3F.js} +14 -14
- package/dist/{vue-ui-waffle-faQMBYNx.cjs → vue-ui-waffle-CLCsHw9j.cjs} +1 -1
- package/dist/{vue-ui-waffle-DB7X6nTS.js → vue-ui-waffle-DEXMh07q.js} +84 -84
- package/dist/{vue-ui-wheel-CryKap2E.js → vue-ui-wheel-CwjuVi6U.js} +24 -24
- package/dist/{vue-ui-wheel-BzjbGP6a.cjs → vue-ui-wheel-DSFKKX65.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-COqUkvei.js → vue-ui-word-cloud-BKeD3fHb.js} +19 -19
- package/dist/{vue-ui-word-cloud-DJN9I4q4.cjs → vue-ui-word-cloud-DZS4hCeR.cjs} +1 -1
- package/dist/vue-ui-xy-B5aCogSL.cjs +3 -0
- package/dist/{vue-ui-xy-b1Z_HPsx.js → vue-ui-xy-DA3qqL8u.js} +351 -350
- package/dist/{vue-ui-xy-canvas-BgbLnY5B.js → vue-ui-xy-canvas-B7DH4RK5.js} +18 -18
- package/dist/vue-ui-xy-canvas-heCdqh5X.cjs +9 -0
- package/package.json +1 -1
- package/dist/Tooltip-DScSrYXJ.cjs +0 -1
- package/dist/index-BTgtr0F8.cjs +0 -4
- package/dist/vue-ui-3d-bar-DzmcGuqh.cjs +0 -19
- package/dist/vue-ui-age-pyramid-C7qr9EwB.cjs +0 -1
- package/dist/vue-ui-chestnut-DJkm72oD.cjs +0 -6
- package/dist/vue-ui-cursor-BQbeuW-k.cjs +0 -1
- package/dist/vue-ui-donut-evolution-DOe-cwLi.cjs +0 -1
- package/dist/vue-ui-donut-v81suIOX.cjs +0 -1
- package/dist/vue-ui-gauge-BUB7H0qA.cjs +0 -1
- package/dist/vue-ui-mood-radar-DD8R9BpJ.cjs +0 -1
- package/dist/vue-ui-quadrant-CgApzie6.cjs +0 -1
- package/dist/vue-ui-relation-circle-CRcQ6Zcy.cjs +0 -1
- package/dist/vue-ui-scatter-B8StSjt8.cjs +0 -1
- package/dist/vue-ui-skeleton-CMQzFTs9.cjs +0 -41
- package/dist/vue-ui-spark-trend-CdIoxaqb.cjs +0 -1
- package/dist/vue-ui-sparkbar-C3i1K7hi.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-CvTYEmbz.cjs +0 -1
- package/dist/vue-ui-sparkline-CDowaDRS.cjs +0 -1
- package/dist/vue-ui-vertical-bar-rwWp-sai.cjs +0 -4
- package/dist/vue-ui-xy-BmA0tspd.cjs +0 -3
- package/dist/vue-ui-xy-canvas-DOM2Kq_s.cjs +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-BTgtr0F8.cjs"),ne=require("./Title-3EduyW4p.cjs"),J=require("./usePrinter-DzTaA1eh.cjs"),re=require("./Tooltip-DScSrYXJ.cjs"),ie=require("./vue-ui-skeleton-CMQzFTs9.cjs"),de=require("./BaseIcon-DB7Apwv_.cjs"),ce=require("./vue-ui-accordion-7e4Myhcg.cjs"),Q=require("./useNestedProp-CisbRRo_.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ye=["id"],he=["xmlns","viewBox"],pe=["x","y","width","height","fill","stroke","stroke-width"],ge=["x","y","width","height","fill","stroke","stroke-width"],fe=["font-size","font-weight","fill","x","y"],me=["x","y","width","height","onMouseover"],be={key:0},xe=["font-size","fill","x","y","font-weight"],ke={key:0},we=["text-anchor","font-size","fill","font-weight","transform"],_e={key:1},Ce=["x","y","width","height","stroke","stroke-width"],Ne={key:2},Le=["id"],Be=["stop-color"],$e=["stop-color"],Ve=["x","y","font-size","fill"],Ee=["x","y","height","rx","fill"],Se=["x","y","font-size","fill"],ze=["stroke","x1","x2","y1","y2"],Ae=["fill","d"],Te={key:3},Me={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},Fe=["stop-color"],Pe=["stop-color"],Oe=["x","y","width","height","rx"],De=["x","y","font-size","fill"],Ie=["x","y","font-size","fill"],Re=["stroke","x1","x2","y1","y2"],qe=["fill","d"],He={key:3,class:"vue-data-ui-watermark"},Ue={class:"vue-ui-data-table"},Ge={key:0},Xe=["data-cell"],je={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ye=["data-cell"],We={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ke={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(B,{expose:Z}){const n=B;e.useCssVars(l=>({"53660b06":l.tdo}));const{vue_ui_heatmap:ee}=o.useConfig(),$=e.computed(()=>!!n.dataset&&n.dataset.length);o.objectIsEmpty(n.dataset)&&o.error({componentName:"VueUiHeatmap",type:"dataset"});const k=e.ref(o.createUid()),S=e.ref(null),te=e.ref(null),z=e.ref(!1),A=e.ref(""),O=e.ref(void 0),w=e.ref(null),D=e.ref(0),I=e.ref(null),R=e.ref(!1),q=e.ref(0),t=e.computed({get:()=>H(),set:l=>l});function H(){const l=Q.useNestedProp({userConfig:n.config,defaultConfig:ee});let s={};return l.theme?s={...Q.useNestedProp({userConfig:o.themes.vue_ui_heatmap[l.theme]||n.config,defaultConfig:l})}:s=l,n.config&&o.hasDeepProperty(n.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?s.style.layout.dataLabels.xAxis.showOnlyAtModulo=n.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:s.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,s}e.watch(()=>n.config,l=>{t.value=H(),T(),q.value+=1},{deep:!0}),e.watch(()=>n.dataset,()=>{T()},{deep:!0});const{isPrinting:U,isImaging:G,generatePdf:X,generateImage:j}=J.usePrinter({elementId:`heatmap__${k.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),le=e.computed(()=>t.value.table.responsiveBreakpoint);function ae(){new ResizeObserver(s=>{s.forEach(u=>{R.value=u.contentRect.width<le.value})}).observe(I.value)}e.onMounted(T);function T(){ae()}const x=e.computed(()=>Math.max(...n.dataset.flatMap(l=>(l.values||[]).length))),h=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+n.dataset.length*t.value.style.layout.cells.height,s=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(x.value<n.dataset.length?n.dataset.length:x.value)*t.value.style.layout.cells.height,u=l+(t.value.style.legend.show?t.value.style.legend.position==="right"?0:t.value.style.layout.cells.height*2:0);return{height:l,heightWithLegend:u,width:s}}),V=e.computed(()=>t.value.style.legend.position),a=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:h.value.width-t.value.style.layout.padding.right-(V.value==="right"&&t.value.style.legend.show?92:0),bottom:h.value.height-t.value.style.layout.padding.bottom,height:h.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:h.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-(V.value==="right"&&t.value.style.legend.show?92:0)})),M=e.computed(()=>i.value.height*n.dataset.length),v=e.computed(()=>Math.max(...n.dataset.flatMap(l=>l.values))),m=e.computed(()=>Math.min(...n.dataset.flatMap(l=>l.values))),b=e.computed(()=>{const l=n.dataset.flatMap(u=>u.values);return l.reduce((u,r)=>u+r,0)/l.length}),i=e.computed(()=>({width:a.value.width/x.value,height:a.value.width/(x.value<n.dataset.length?n.dataset.length:x.value)})),p=e.computed(()=>{const l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:n.dataset.map(u=>u.name),s=t.value.style.layout.dataLabels.xAxis.values;return{yLabels:l,xLabels:s.slice(0,x.value)}}),E=e.computed(()=>(n.dataset.forEach((l,s)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(u=>{o.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:s})})}),n.dataset.map(l=>({...l,temperatures:(l.values||[]).map((s,u)=>s>=b.value?{side:"up",color:o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,s),ratio:Math.abs(Math.abs(s-b.value)/Math.abs(v.value-b.value))>1?1:Math.abs(Math.abs(s-b.value)/Math.abs(v.value-b.value)),value:s,yAxisName:l.name,xAxisName:p.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${o.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(s)/Math.abs(b.value))>1?1:Math.abs(1-Math.abs(s)/Math.abs(b.value)),color:o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,s),value:s,yAxisName:l.name,xAxisName:p.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${o.createUid()}`})})))),g=e.ref(null),_=e.ref(null);function oe(l,s,u,r){w.value={x:u,y:r};const{value:d,yAxisName:c,xAxisName:f,id:ue}=l;O.value=ue,g.value=d,_.value={datapoint:l,seriesIndex:s,series:E.value,config:t.value},z.value=!0;let F="";const P=t.value.style.tooltip.customFormat;o.isFunction(P)&&o.functionReturnsString(()=>P({datapoint:l,seriesIndex:s,series:E.value,config:t.value}))?A.value=P({datapoint:l,seriesIndex:s,series:E.value,config:t.value}):(F+=`<div>${c} ${f?`${f}`:""}</div>`,F+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,d)}">⬤</span><span>${isNaN(d)?"-":o.applyDataLabel(t.value.style.layout.cells.value.formatter,d,o.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:d,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:s})}</span></div>`,A.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${F}</div>`)}const C=e.computed(()=>a.value.top+M.value*(1-g.value/v.value)),N=e.computed(()=>a.value.left+(h.value.width-a.value.left-t.value.style.layout.padding.right)*(g.value/v.value));e.computed(()=>{const l=n.dataset.map(u=>({name:u.name})),s=n.dataset.map(u=>u.values);return{head:l,body:s}});function Y(){e.nextTick(()=>{const l=["",...n.dataset.map((d,c)=>d.name)],s=[];for(let d=0;d<p.value.xLabels.length;d+=1){const c=[p.value.xLabels[d]];for(let f=0;f<n.dataset.length;f+=1)c.push([n.dataset[f].values[d]]);s.push(c)}const u=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(s),r=o.createCsvContent(u);o.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const L=e.ref(!1);function se(l){L.value=l,D.value+=1}function W(){y.value.showTable=!y.value.showTable}function K(){y.value.showTooltip=!y.value.showTooltip}return Z({generatePdf:X,generateCsv:Y,generateImage:j,toggleTable:W,toggleTooltip:K}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:S,class:e.normalizeClass(`vue-ui-heatmap ${L.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor}`),id:`heatmap__${k.value}`},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor}`)},[(e.openBlock(),e.createBlock(ne._sfc_main,{key:`title_${q.value}`,config:{title:{cy:"heatmap-div-title",...t.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(J.UserOptions,{ref_key:"details",ref:te,key:`user_options_${D.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(G),isPrinting:e.unref(U),uid:k.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:L.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:S.value,onToggleFullscreen:se,onGeneratePdf:e.unref(X),onGenerateCsv:Y,onGenerateImage:e.unref(j),onToggleTable:W,onToggleTooltip:K},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:u,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:u,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":L.value,"vue-data-ui-fulscreen--off":!L.value}),viewBox:`0 0 ${h.value.width} ${h.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.backgroundColor};color:${t.value.style.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(u,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:a.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,pe),e.createElementVNode("rect",{x:a.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:a.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:d.color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,ge),t.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":t.value.style.layout.cells.value.fontSize,"font-weight":t.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(o.adaptColorToBackground)(d.color),x:a.value.left+i.value.width*c+i.value.width/2,y:a.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,d.value,e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.value,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.layout.cells.value.roundingValue}),{datapoint:d})),9,fe)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+i.value.width*c,y:a.value.top+i.value.height*r,width:i.value.width,height:i.value.height,fill:"transparent",stroke:"none",onMouseover:f=>oe(d,r,a.value.left+i.value.width*c,a.value.top+i.value.height*r),onMouseout:s[0]||(s[0]=f=>{z.value=!1,O.value=void 0,g.value=null,w.value=null})},null,40,me)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",be,[e.createElementVNode("text",{"font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:a.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:a.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.dataLabels.yAxis.fontSize/3+t.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(p.value.yLabels[r]),9,xe)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&r%t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo===0?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.layout.dataLabels.xAxis.rotation===0?"middle":t.value.style.layout.dataLabels.xAxis.rotation<0?"start":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${a.value.left+i.value.width/2+a.value.width/p.value.xLabels.length*r+t.value.style.layout.dataLabels.xAxis.offsetX}, ${a.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6}), rotate(${t.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(u),9,we)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createElementBlock("g",_e,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:w.value.x-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,y:w.value.y-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,width:i.value.width-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,fill:"transparent",stroke:t.value.style.layout.cells.selected.color,"stroke-width":t.value.style.layout.cells.selected.border,rx:1},null,8,Ce)])):e.createCommentVNode("",!0),t.value.style.legend.show&&V.value==="right"?(e.openBlock(),e.createElementBlock("g",Ne,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${k.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Be),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,$e)],8,Le)]),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top-t.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(v.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ve),e.createElementVNode("rect",{x:a.value.right+36,y:a.value.top,width:36,height:M.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${k.value})`},null,8,Ee),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top+M.value+t.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(m.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Se),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(o.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:a.value.right+36,x2:a.value.right+72,y1:C.value,y2:C.value},null,8,ze)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${a.value.right+36},${C.value} ${a.value.right+26},${C.value-8} ${a.value.right+26},${C.value+8}z`},null,8,Ae)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&V.value==="bottom"?(e.openBlock(),e.createElementBlock("g",Te,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",Me,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Fe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Pe)])]),e.createElementVNode("rect",{x:a.value.left,y:a.value.bottom+t.value.style.layout.cells.height,width:h.value.width-a.value.left-t.value.style.layout.padding.right,height:t.value.style.layout.cells.height,rx:t.value.style.legend.scaleBorderRadius>t.value.style.layout.cells.height/2?t.value.style.layout.cells.height/2:t.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,Oe),e.createElementVNode("text",{x:a.value.left,y:a.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"start","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(m.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,De),e.createElementVNode("text",{x:a.value.right,y:a.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"end","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(v.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ie),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(o.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:N.value,x2:N.value,y1:a.value.bottom+t.value.style.layout.cells.height,y2:a.value.bottom+t.value.style.layout.cells.height*2},null,8,Re)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${N.value},${a.value.bottom+t.value.style.layout.cells.height} ${N.value-12},${a.value.bottom+t.value.style.layout.cells.height-20} ${N.value+12},${a.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,qe)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:h.value},void 0,!0)],14,he)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",He,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie.default,{key:4,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(re._sfc_main,{show:y.value.showTooltip&&z.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:S.value,content:A.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),$.value?(e.openBlock(),e.createBlock(ce.default,{key:5,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:I,class:"vue-ui-heatmap-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":R.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:s[1]||(s[1]=u=>y.value.showTable=!1),onKeypress:s[2]||(s[2]=e.withKeys(u=>y.value.showTable=!1,["enter"]))},[e.createVNode(de.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",Ue,[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",Ge,e.toDisplayString(t.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.dataset,(u,r)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},e.toDisplayString(u.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":t.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",je,e.toDisplayString(u),1)],12,Xe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.dataset,(d,c)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":B.dataset[c].name,style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",We,e.toDisplayString(isNaN(d.values[r])?"-":e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.values[r],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,Ye))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ye))}},Je=ve._export_sfc(Ke,[["__scopeId","data-v-bbdd6ca7"]]);exports.default=Je;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-CzjC8LfY.cjs"),ne=require("./Title-BSpa3uge.cjs"),J=require("./usePrinter-DiLM6jav.cjs"),re=require("./Tooltip-rmhZhv96.cjs"),ie=require("./vue-ui-skeleton-CwqzJlQf.cjs"),de=require("./BaseIcon-Bcpzfk34.cjs"),ce=require("./vue-ui-accordion-DpI7fTKZ.cjs"),Q=require("./useNestedProp-CY7DebVH.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ye=["id"],he=["xmlns","viewBox"],pe=["x","y","width","height","fill","stroke","stroke-width"],ge=["x","y","width","height","fill","stroke","stroke-width"],fe=["font-size","font-weight","fill","x","y"],me=["x","y","width","height","onMouseover"],be={key:0},xe=["font-size","fill","x","y","font-weight"],ke={key:0},we=["text-anchor","font-size","fill","font-weight","transform"],_e={key:1},Ce=["x","y","width","height","stroke","stroke-width"],Ne={key:2},Le=["id"],Be=["stop-color"],$e=["stop-color"],Ve=["x","y","font-size","fill"],Ee=["x","y","height","rx","fill"],Se=["x","y","font-size","fill"],ze=["stroke","x1","x2","y1","y2"],Ae=["fill","d"],Te={key:3},Me={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},Fe=["stop-color"],Pe=["stop-color"],Oe=["x","y","width","height","rx"],De=["x","y","font-size","fill"],Ie=["x","y","font-size","fill"],Re=["stroke","x1","x2","y1","y2"],qe=["fill","d"],He={key:3,class:"vue-data-ui-watermark"},Ue={class:"vue-ui-data-table"},Ge={key:0},Xe=["data-cell"],je={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ye=["data-cell"],We={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ke={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(B,{expose:Z}){const n=B;e.useCssVars(l=>({"53660b06":l.tdo}));const{vue_ui_heatmap:ee}=o.useConfig(),$=e.computed(()=>!!n.dataset&&n.dataset.length);o.objectIsEmpty(n.dataset)&&o.error({componentName:"VueUiHeatmap",type:"dataset"});const k=e.ref(o.createUid()),S=e.ref(null),te=e.ref(null),z=e.ref(!1),A=e.ref(""),O=e.ref(void 0),w=e.ref(null),D=e.ref(0),I=e.ref(null),R=e.ref(!1),q=e.ref(0),t=e.computed({get:()=>H(),set:l=>l});function H(){const l=Q.useNestedProp({userConfig:n.config,defaultConfig:ee});let s={};return l.theme?s={...Q.useNestedProp({userConfig:o.themes.vue_ui_heatmap[l.theme]||n.config,defaultConfig:l})}:s=l,n.config&&o.hasDeepProperty(n.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?s.style.layout.dataLabels.xAxis.showOnlyAtModulo=n.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:s.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,s}e.watch(()=>n.config,l=>{t.value=H(),T(),q.value+=1},{deep:!0}),e.watch(()=>n.dataset,()=>{T()},{deep:!0});const{isPrinting:U,isImaging:G,generatePdf:X,generateImage:j}=J.usePrinter({elementId:`heatmap__${k.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),le=e.computed(()=>t.value.table.responsiveBreakpoint);function ae(){new ResizeObserver(s=>{s.forEach(u=>{R.value=u.contentRect.width<le.value})}).observe(I.value)}e.onMounted(T);function T(){ae()}const x=e.computed(()=>Math.max(...n.dataset.flatMap(l=>(l.values||[]).length))),h=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+n.dataset.length*t.value.style.layout.cells.height,s=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(x.value<n.dataset.length?n.dataset.length:x.value)*t.value.style.layout.cells.height,u=l+(t.value.style.legend.show?t.value.style.legend.position==="right"?0:t.value.style.layout.cells.height*2:0);return{height:l,heightWithLegend:u,width:s}}),V=e.computed(()=>t.value.style.legend.position),a=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:h.value.width-t.value.style.layout.padding.right-(V.value==="right"&&t.value.style.legend.show?92:0),bottom:h.value.height-t.value.style.layout.padding.bottom,height:h.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:h.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-(V.value==="right"&&t.value.style.legend.show?92:0)})),M=e.computed(()=>i.value.height*n.dataset.length),v=e.computed(()=>Math.max(...n.dataset.flatMap(l=>l.values))),m=e.computed(()=>Math.min(...n.dataset.flatMap(l=>l.values))),b=e.computed(()=>{const l=n.dataset.flatMap(u=>u.values);return l.reduce((u,r)=>u+r,0)/l.length}),i=e.computed(()=>({width:a.value.width/x.value,height:a.value.width/(x.value<n.dataset.length?n.dataset.length:x.value)})),p=e.computed(()=>{const l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:n.dataset.map(u=>u.name),s=t.value.style.layout.dataLabels.xAxis.values;return{yLabels:l,xLabels:s.slice(0,x.value)}}),E=e.computed(()=>(n.dataset.forEach((l,s)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(u=>{o.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:s})})}),n.dataset.map(l=>({...l,temperatures:(l.values||[]).map((s,u)=>s>=b.value?{side:"up",color:o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,s),ratio:Math.abs(Math.abs(s-b.value)/Math.abs(v.value-b.value))>1?1:Math.abs(Math.abs(s-b.value)/Math.abs(v.value-b.value)),value:s,yAxisName:l.name,xAxisName:p.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${o.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(s)/Math.abs(b.value))>1?1:Math.abs(1-Math.abs(s)/Math.abs(b.value)),color:o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,s),value:s,yAxisName:l.name,xAxisName:p.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${o.createUid()}`})})))),g=e.ref(null),_=e.ref(null);function oe(l,s,u,r){w.value={x:u,y:r};const{value:d,yAxisName:c,xAxisName:f,id:ue}=l;O.value=ue,g.value=d,_.value={datapoint:l,seriesIndex:s,series:E.value,config:t.value},z.value=!0;let F="";const P=t.value.style.tooltip.customFormat;o.isFunction(P)&&o.functionReturnsString(()=>P({datapoint:l,seriesIndex:s,series:E.value,config:t.value}))?A.value=P({datapoint:l,seriesIndex:s,series:E.value,config:t.value}):(F+=`<div>${c} ${f?`${f}`:""}</div>`,F+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,d)}">⬤</span><span>${isNaN(d)?"-":o.applyDataLabel(t.value.style.layout.cells.value.formatter,d,o.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:d,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:s})}</span></div>`,A.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${F}</div>`)}const C=e.computed(()=>a.value.top+M.value*(1-g.value/v.value)),N=e.computed(()=>a.value.left+(h.value.width-a.value.left-t.value.style.layout.padding.right)*(g.value/v.value));e.computed(()=>{const l=n.dataset.map(u=>({name:u.name})),s=n.dataset.map(u=>u.values);return{head:l,body:s}});function Y(){e.nextTick(()=>{const l=["",...n.dataset.map((d,c)=>d.name)],s=[];for(let d=0;d<p.value.xLabels.length;d+=1){const c=[p.value.xLabels[d]];for(let f=0;f<n.dataset.length;f+=1)c.push([n.dataset[f].values[d]]);s.push(c)}const u=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(s),r=o.createCsvContent(u);o.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const L=e.ref(!1);function se(l){L.value=l,D.value+=1}function W(){y.value.showTable=!y.value.showTable}function K(){y.value.showTooltip=!y.value.showTooltip}return Z({generatePdf:X,generateCsv:Y,generateImage:j,toggleTable:W,toggleTooltip:K}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:S,class:e.normalizeClass(`vue-ui-heatmap ${L.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor}`),id:`heatmap__${k.value}`},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor}`)},[(e.openBlock(),e.createBlock(ne._sfc_main,{key:`title_${q.value}`,config:{title:{cy:"heatmap-div-title",...t.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(J.UserOptions,{ref_key:"details",ref:te,key:`user_options_${D.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(G),isPrinting:e.unref(U),uid:k.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:L.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:S.value,onToggleFullscreen:se,onGeneratePdf:e.unref(X),onGenerateCsv:Y,onGenerateImage:e.unref(j),onToggleTable:W,onToggleTooltip:K},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:u,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:u,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":L.value,"vue-data-ui-fulscreen--off":!L.value}),viewBox:`0 0 ${h.value.width} ${h.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.backgroundColor};color:${t.value.style.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(u,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:a.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,pe),e.createElementVNode("rect",{x:a.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:a.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:d.color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,ge),t.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":t.value.style.layout.cells.value.fontSize,"font-weight":t.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(o.adaptColorToBackground)(d.color),x:a.value.left+i.value.width*c+i.value.width/2,y:a.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,d.value,e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.value,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.layout.cells.value.roundingValue}),{datapoint:d})),9,fe)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+i.value.width*c,y:a.value.top+i.value.height*r,width:i.value.width,height:i.value.height,fill:"transparent",stroke:"none",onMouseover:f=>oe(d,r,a.value.left+i.value.width*c,a.value.top+i.value.height*r),onMouseout:s[0]||(s[0]=f=>{z.value=!1,O.value=void 0,g.value=null,w.value=null})},null,40,me)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",be,[e.createElementVNode("text",{"font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:a.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:a.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.dataLabels.yAxis.fontSize/3+t.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(p.value.yLabels[r]),9,xe)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&r%t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo===0?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.layout.dataLabels.xAxis.rotation===0?"middle":t.value.style.layout.dataLabels.xAxis.rotation<0?"start":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${a.value.left+i.value.width/2+a.value.width/p.value.xLabels.length*r+t.value.style.layout.dataLabels.xAxis.offsetX}, ${a.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6}), rotate(${t.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(u),9,we)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createElementBlock("g",_e,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:w.value.x-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,y:w.value.y-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,width:i.value.width-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,fill:"transparent",stroke:t.value.style.layout.cells.selected.color,"stroke-width":t.value.style.layout.cells.selected.border,rx:1},null,8,Ce)])):e.createCommentVNode("",!0),t.value.style.legend.show&&V.value==="right"?(e.openBlock(),e.createElementBlock("g",Ne,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${k.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Be),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,$e)],8,Le)]),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top-t.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(v.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ve),e.createElementVNode("rect",{x:a.value.right+36,y:a.value.top,width:36,height:M.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${k.value})`},null,8,Ee),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top+M.value+t.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(m.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Se),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(o.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:a.value.right+36,x2:a.value.right+72,y1:C.value,y2:C.value},null,8,ze)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${a.value.right+36},${C.value} ${a.value.right+26},${C.value-8} ${a.value.right+26},${C.value+8}z`},null,8,Ae)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&V.value==="bottom"?(e.openBlock(),e.createElementBlock("g",Te,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",Me,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Fe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Pe)])]),e.createElementVNode("rect",{x:a.value.left,y:a.value.bottom+t.value.style.layout.cells.height,width:h.value.width-a.value.left-t.value.style.layout.padding.right,height:t.value.style.layout.cells.height,rx:t.value.style.legend.scaleBorderRadius>t.value.style.layout.cells.height/2?t.value.style.layout.cells.height/2:t.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,Oe),e.createElementVNode("text",{x:a.value.left,y:a.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"start","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(m.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,De),e.createElementVNode("text",{x:a.value.right,y:a.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"end","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(v.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ie),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(o.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:N.value,x2:N.value,y1:a.value.bottom+t.value.style.layout.cells.height,y2:a.value.bottom+t.value.style.layout.cells.height*2},null,8,Re)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${N.value},${a.value.bottom+t.value.style.layout.cells.height} ${N.value-12},${a.value.bottom+t.value.style.layout.cells.height-20} ${N.value+12},${a.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,qe)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:h.value},void 0,!0)],14,he)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",He,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie.default,{key:4,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(re._sfc_main,{show:y.value.showTooltip&&z.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:S.value,content:A.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),$.value?(e.openBlock(),e.createBlock(ce.default,{key:5,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:I,class:"vue-ui-heatmap-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":R.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:s[1]||(s[1]=u=>y.value.showTable=!1),onKeypress:s[2]||(s[2]=e.withKeys(u=>y.value.showTable=!1,["enter"]))},[e.createVNode(de.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",Ue,[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",Ge,e.toDisplayString(t.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.dataset,(u,r)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},e.toDisplayString(u.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":t.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",je,e.toDisplayString(u),1)],12,Xe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.dataset,(d,c)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":B.dataset[c].name,style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",We,e.toDisplayString(isNaN(d.values[r])?"-":e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.values[r],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,Ye))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ye))}},Je=ve._export_sfc(Ke,[["__scopeId","data-v-bbdd6ca7"]]);exports.default=Je;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed as N, watch as p, ref as C, onMounted as D, openBlock as i, createElementBlock as s, normalizeClass as v, normalizeStyle as u, createElementVNode as $, renderSlot as n, createTextVNode as y, toDisplayString as k, createVNode as S, Fragment as x, unref as h } from "vue";
|
|
2
|
-
import { u as z } from "./useNestedProp-
|
|
3
|
-
import { u as A, i as w, f as B } from "./index-
|
|
4
|
-
import L from "./vue-ui-digits-
|
|
2
|
+
import { u as z } from "./useNestedProp-B-oZxD4x.js";
|
|
3
|
+
import { u as A, i as w, f as B } from "./index-DP8dqFNd.js";
|
|
4
|
+
import L from "./vue-ui-digits-BCguvLxB.js";
|
|
5
5
|
const T = {
|
|
6
6
|
__name: "vue-ui-kpi",
|
|
7
7
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),g=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),g=require("./useNestedProp-CY7DebVH.cjs"),u=require("./index-CzjC8LfY.cjs"),p=require("./vue-ui-digits-BfwDCfYp.cjs"),y={__name:"vue-ui-kpi",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(n){const o=n,{vue_ui_kpi:m}=u.useConfig(),e=a.computed({get:()=>i(),set:t=>t});function i(){return g.useNestedProp({userConfig:o.config,defaultConfig:m})}a.watch(()=>o.config,t=>{e.value=i(),r()},{deep:!0});const f=a.ref((typeof o.dataset=="number",o.dataset)),l=a.ref(e.value.useAnimation?e.value.animationValueStart:f.value),s=t=>{const v=e.value.animationFrames,c=Math.abs(t-l.value)/v;function d(){l.value<t?l.value=Math.min(l.value+c,t):l.value>t&&(l.value=Math.max(l.value-c,t)),l.value!==t&&requestAnimationFrame(d)}d()};a.onMounted(()=>{r()});function r(){e.value.useAnimation?(l.value=e.value.animationValueStart,s(o.dataset)):l.value=o.dataset}return a.watch(()=>o.dataset,t=>{e.value.useAnimation?s(t):l.value=t}),(t,v)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(`vue-ui-kpi ${e.value.layoutClass}`),style:a.normalizeStyle(`background:${e.value.backgroundColor}; ${e.value.layoutCss}`)},[a.createElementVNode("div",{class:a.normalizeClass(`vue-ui-kpi-title ${e.value.titleClass}`),style:a.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.titleFontSize}px; color:${e.value.titleColor}; font-weight:${e.value.titleBold?"bold":"normal"}; ${e.value.titleCss}`)},[a.renderSlot(t.$slots,"title",{comment:n.dataset}),a.createTextVNode(" "+a.toDisplayString(e.value.title),1)],6),a.renderSlot(t.$slots,"comment-before",{comment:n.dataset}),a.createElementVNode("div",{class:a.normalizeClass(`vue-ui-kpi-value ${e.value.valueClass}`),style:a.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.valueFontSize}px; color:${e.value.valueColor}; font-weight:${e.value.valueBold?"bold":"normal"}; ${e.value.valueCss}`)},[a.renderSlot(t.$slots,"value",{comment:n.dataset}),e.value.analogDigits.show?(a.openBlock(),a.createElementBlock("div",{key:0,style:a.normalizeStyle({height:e.value.analogDigits.height+"px"})},[a.createVNode(p.default,{dataset:Number(l.value.toFixed(e.value.valueRounding)),config:{backgroundColor:e.value.backgroundColor,digits:{color:e.value.analogDigits.color,skeletonColor:e.value.analogDigits.skeletonColor}}},null,8,["dataset","config"])],4)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(a.unref(u.applyDataLabel)(e.value.formatter,l.value,a.unref(u.dataLabel)({p:e.value.prefix,v:l.value,s:e.value.suffix,r:e.value.valueRounding}))),1)],64))],6),a.renderSlot(t.$slots,"comment-after",{comment:n.dataset})],6))}};exports.default=y;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCssVars as h, computed as r, ref as f, openBlock as n, createElementBlock as u, unref as M, createElementVNode as t, normalizeStyle as l, createCommentVNode as a } from "vue";
|
|
2
|
-
import { u as m } from "./useNestedProp-
|
|
3
|
-
import { u as y, X as L } from "./index-
|
|
2
|
+
import { u as m } from "./useNestedProp-B-oZxD4x.js";
|
|
3
|
+
import { u as y, X as L } from "./index-DP8dqFNd.js";
|
|
4
4
|
import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const b = ["xmlns", "viewBox"], x = { key: 0 }, $ = ["stroke"], w = ["stroke"], A = ["stroke"], N = { key: 1 }, O = ["stroke"], S = { key: 2 }, F = ["stroke"], I = {
|
|
6
6
|
__name: "vue-ui-mini-loader",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./useNestedProp-CY7DebVH.cjs"),n=require("./index-CzjC8LfY.cjs"),m=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=["xmlns","viewBox"],C={key:0},_=["stroke"],h=["stroke"],M=["stroke"],y={key:1},B=["stroke"],f={key:2},L=["stroke"],b={__name:"vue-ui-mini-loader",props:{config:{type:Object,default(){return{}}}},setup(u){const a=u;e.useCssVars(k=>({"221651ee":c.value,d11bae38:d.value,d85c00de:p.value}));const{vue_ui_mini_loader:i}=n.useConfig(),t=e.computed(()=>v.useNestedProp({userConfig:a.config,defaultConfig:i})),s=e.ref({onion:"-10 -10 84 84",line:"-10 -10 112 84",bar:"-10 -10 106 84"}),r=e.computed(()=>({gutter:`stroke:${t.value.line.gutterColor};opacity:${t.value.line.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.line.gutterBlur}px);`})),l=e.computed(()=>({gutter:`stroke:${t.value.bar.gutterColor};opacity:${t.value.bar.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.bar.gutterBlur}px);`})),o=e.computed(()=>({gutter:`stroke:${t.value.onion.gutterColor};opacity:${t.value.onion.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.onion.gutterBlur}px);`})),c=e.computed(()=>`blur(${t.value.onion.trackBlur}px) hue-rotate(${t.value.onion.trackHueRotate}deg)`),d=e.computed(()=>`blur(${t.value.line.trackBlur}px) hue-rotate(${t.value.line.trackHueRotate}deg)`),p=e.computed(()=>`blur(${t.value.bar.trackBlur}px) hue-rotate(${t.value.bar.trackHueRotate}deg)`);return(k,x)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(n.XMLNS),viewBox:s.value[t.value.type],style:{background:"transparent"},width:"100%"},[t.value.type==="onion"?(e.openBlock(),e.createElementBlock("g",C,[e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,_),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,h),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,M)])):e.createCommentVNode("",!0),t.value.type==="line"?(e.openBlock(),e.createElementBlock("g",y,[e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(r.value.gutter+r.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5",stroke:t.value.line.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"line-animated"},null,8,B)])):e.createCommentVNode("",!0),t.value.type==="bar"?(e.openBlock(),e.createElementBlock("g",f,[e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(l.value.gutter+l.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5",stroke:t.value.bar.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"bar-animated"},null,8,L)])):e.createCommentVNode("",!0)],8,g))}},N=m._export_sfc(b,[["__scopeId","data-v-20f54e0e"]]);exports.default=N;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { toRef as ne, resolveComponent as re, openBlock as s, createElementBlock as r, Fragment as y, renderList as
|
|
2
|
-
import { u as Qe, o as _e, e as et, c as Te, t as tt, a as ot, p as Fe, b as lt, X as at, l as st,
|
|
3
|
-
import { _ as dt } from "./Title-
|
|
4
|
-
import { u as vt, U as ft } from "./usePrinter-
|
|
5
|
-
import { D as ht } from "./DataTable-
|
|
6
|
-
import { _ as pt } from "./Tooltip-
|
|
7
|
-
import W from "./BaseIcon-
|
|
8
|
-
import gt from "./vue-ui-skeleton-
|
|
9
|
-
import yt from "./vue-ui-accordion-
|
|
10
|
-
import { u as Re } from "./useNestedProp-
|
|
1
|
+
import { toRef as ne, resolveComponent as re, openBlock as s, createElementBlock as r, Fragment as y, renderList as U, withModifiers as M, createBlock as R, createCommentVNode as m, createElementVNode as x, toDisplayString as Se, normalizeStyle as K, createVNode as N, computed as B, onMounted as qe, ref as f, watch as Ze, normalizeClass as we, unref as I, createSlots as Je, withCtx as $, renderSlot as P, normalizeProps as Z, guardReactiveProps as J, createTextVNode as Ke, nextTick as Pe } from "vue";
|
|
2
|
+
import { u as Qe, o as _e, e as et, c as Te, t as tt, a as ot, p as Fe, b as lt, X as at, l as st, N as nt, q as rt, r as it, x as ut, y as ct } from "./index-DP8dqFNd.js";
|
|
3
|
+
import { _ as dt } from "./Title-Bx-VO3md.js";
|
|
4
|
+
import { u as vt, U as ft } from "./usePrinter-DiuHo4LO.js";
|
|
5
|
+
import { D as ht } from "./DataTable-y1lX5jVj.js";
|
|
6
|
+
import { _ as pt } from "./Tooltip-Dk-cimhQ.js";
|
|
7
|
+
import W from "./BaseIcon-BIQXWVMS.js";
|
|
8
|
+
import gt from "./vue-ui-skeleton-B30ZhUV7.js";
|
|
9
|
+
import yt from "./vue-ui-accordion-Dl8zkZPk.js";
|
|
10
|
+
import { u as Re } from "./useNestedProp-B-oZxD4x.js";
|
|
11
11
|
import { _ as mt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
const bt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMouseover"], kt = {
|
|
13
13
|
__name: "RecursiveCircles",
|
|
@@ -52,9 +52,9 @@ const bt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
52
52
|
});
|
|
53
53
|
}), (n, u) => {
|
|
54
54
|
const T = re("RecursiveCircles", !0);
|
|
55
|
-
return s(!0), r(y, null,
|
|
55
|
+
return s(!0), r(y, null, U(a.dataset, (h) => (s(), r(y, null, [
|
|
56
56
|
h.polygonPath && h.polygonPath.coordinates ? (s(), r(y, { key: 0 }, [
|
|
57
|
-
(s(!0), r(y, null,
|
|
57
|
+
(s(!0), r(y, null, U(h.polygonPath.coordinates, (O, H) => (s(), r("circle", {
|
|
58
58
|
cx: O.x,
|
|
59
59
|
cy: O.y,
|
|
60
60
|
r: h.circleRadius,
|
|
@@ -104,8 +104,8 @@ const bt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
104
104
|
}), (c, d) => {
|
|
105
105
|
const S = re("RecursiveLinks", !0);
|
|
106
106
|
return s(), r(y, null, [
|
|
107
|
-
(s(!0), r(y, null,
|
|
108
|
-
n.polygonPath && n.polygonPath.coordinates ? (s(!0), r(y, { key: 0 },
|
|
107
|
+
(s(!0), r(y, null, U(a.dataset, (n) => (s(), r(y, null, [
|
|
108
|
+
n.polygonPath && n.polygonPath.coordinates ? (s(!0), r(y, { key: 0 }, U(n.polygonPath.coordinates, (u, T) => (s(), r(y, null, [
|
|
109
109
|
n.ancestor && n.ancestor.polygonPath ? (s(), r(y, { key: 0 }, [
|
|
110
110
|
x("line", {
|
|
111
111
|
x1: u.x,
|
|
@@ -126,7 +126,7 @@ const bt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
126
126
|
], 64)) : m("", !0)
|
|
127
127
|
], 64))), 256)) : m("", !0)
|
|
128
128
|
], 64))), 256)),
|
|
129
|
-
(s(!0), r(y, null,
|
|
129
|
+
(s(!0), r(y, null, U(a.dataset, (n) => (s(), r(y, null, [
|
|
130
130
|
n.polygonPath && n.polygonPath.coordinates ? (s(), r(y, { key: 0 }, [
|
|
131
131
|
n.nodes && n.nodes.length > 0 ? (s(), R(S, {
|
|
132
132
|
key: 0,
|
|
@@ -163,9 +163,9 @@ const bt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
163
163
|
});
|
|
164
164
|
}), (d, S) => {
|
|
165
165
|
const n = re("RecursiveLabels", !0);
|
|
166
|
-
return s(!0), r(y, null,
|
|
166
|
+
return s(!0), r(y, null, U(a.dataset, (u) => (s(), r(y, null, [
|
|
167
167
|
u.polygonPath && u.polygonPath.coordinates ? (s(), r(y, { key: 0 }, [
|
|
168
|
-
(s(!0), r(y, null,
|
|
168
|
+
(s(!0), r(y, null, U(u.polygonPath.coordinates, (T) => (s(), r("text", {
|
|
169
169
|
x: T.x,
|
|
170
170
|
y: T.y + u.circleRadius * 2,
|
|
171
171
|
fill: a.color,
|
|
@@ -206,7 +206,7 @@ const bt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
206
206
|
onClick: c[0] || (c[0] = M((d) => C("moveLeft"), ["stop"])),
|
|
207
207
|
style: { position: "absolute", left: "0", top: "50%", transform: "translateY(-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
|
|
208
208
|
}, [
|
|
209
|
-
|
|
209
|
+
N(W, {
|
|
210
210
|
stroke: a.color,
|
|
211
211
|
name: "arrowLeft",
|
|
212
212
|
style: { cursor: "pointer" }
|
|
@@ -216,7 +216,7 @@ const bt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
216
216
|
onClick: c[1] || (c[1] = M((d) => C("moveTop"), ["stop"])),
|
|
217
217
|
style: { position: "absolute", top: "0", left: "50%", transform: "translateX(-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
|
|
218
218
|
}, [
|
|
219
|
-
|
|
219
|
+
N(W, {
|
|
220
220
|
stroke: a.color,
|
|
221
221
|
name: "arrowTop",
|
|
222
222
|
style: { cursor: "pointer" }
|
|
@@ -226,7 +226,7 @@ const bt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
226
226
|
onClick: c[2] || (c[2] = M((d) => C("moveRight"), ["stop"])),
|
|
227
227
|
style: { position: "absolute", right: "0", top: "50%", transform: "translateY(-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
|
|
228
228
|
}, [
|
|
229
|
-
|
|
229
|
+
N(W, {
|
|
230
230
|
stroke: a.color,
|
|
231
231
|
name: "arrowRight",
|
|
232
232
|
style: { cursor: "pointer" }
|
|
@@ -236,7 +236,7 @@ const bt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
236
236
|
onClick: c[3] || (c[3] = M((d) => C("moveBottom"), ["stop"])),
|
|
237
237
|
style: { position: "absolute", bottom: "0", left: "50%", transform: "translateX(-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
|
|
238
238
|
}, [
|
|
239
|
-
|
|
239
|
+
N(W, {
|
|
240
240
|
stroke: a.color,
|
|
241
241
|
name: "arrowBottom",
|
|
242
242
|
style: { cursor: "pointer" }
|
|
@@ -246,7 +246,7 @@ const bt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
246
246
|
onClick: c[4] || (c[4] = M((d) => C("reset"), ["stop"])),
|
|
247
247
|
style: { position: "absolute", top: "50%", left: "50%", transform: "translate(-50%,-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
|
|
248
248
|
}, [
|
|
249
|
-
|
|
249
|
+
N(W, {
|
|
250
250
|
stroke: a.color,
|
|
251
251
|
name: "close",
|
|
252
252
|
style: { cursor: "pointer" },
|
|
@@ -256,10 +256,10 @@ const bt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
256
256
|
])
|
|
257
257
|
], 4));
|
|
258
258
|
}
|
|
259
|
-
}, Rt = ["id"], St = ["xmlns", "viewBox"], Lt = ["id"], Dt = ["stop-color"], It = ["stop-color"],
|
|
259
|
+
}, Rt = ["id"], St = ["xmlns", "viewBox"], Lt = ["id"], Dt = ["stop-color"], It = ["stop-color"], Nt = {
|
|
260
260
|
key: 4,
|
|
261
261
|
class: "vue-data-ui-watermark"
|
|
262
|
-
},
|
|
262
|
+
}, Ut = ["innerHTML"], zt = {
|
|
263
263
|
__name: "vue-ui-molecule",
|
|
264
264
|
props: {
|
|
265
265
|
config: {
|
|
@@ -367,7 +367,7 @@ const bt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
367
367
|
v[i] = `gradient_${p}`;
|
|
368
368
|
}), v;
|
|
369
369
|
}
|
|
370
|
-
const
|
|
370
|
+
const Ne = B(() => Ie(F.value)), F = B(() => ye(k.dataset));
|
|
371
371
|
function ee() {
|
|
372
372
|
H.value = !1, O.value = null, ie.value = null, b.value = null, oe({
|
|
373
373
|
polygonPath: {
|
|
@@ -388,7 +388,7 @@ const bt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
388
388
|
xe();
|
|
389
389
|
});
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function Ue(e) {
|
|
392
392
|
O.value === e.uid ? ee() : (O.value = e.uid, ie.value = e, b.value = {
|
|
393
393
|
circleRadius: e.circleRadius,
|
|
394
394
|
polygonPath: {
|
|
@@ -631,7 +631,7 @@ const bt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
631
631
|
onClick: o[0] || (o[0] = M((l) => ze(l), ["stop"]))
|
|
632
632
|
}, [
|
|
633
633
|
x("defs", null, [
|
|
634
|
-
(s(!0), r(y, null,
|
|
634
|
+
(s(!0), r(y, null, U(Object.keys(Ne.value), (l) => (s(), r("radialGradient", {
|
|
635
635
|
id: `gradient_${l}`,
|
|
636
636
|
cx: "50%",
|
|
637
637
|
cy: "30%",
|
|
@@ -649,17 +649,17 @@ const bt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
649
649
|
}, null, 8, It)
|
|
650
650
|
], 8, Lt))), 256))
|
|
651
651
|
]),
|
|
652
|
-
|
|
652
|
+
N(xt, {
|
|
653
653
|
dataset: F.value,
|
|
654
654
|
color: t.value.style.chart.links.stroke,
|
|
655
655
|
backgroundColor: t.value.style.chart.backgroundColor
|
|
656
656
|
}, null, 8, ["dataset", "color", "backgroundColor"]),
|
|
657
|
-
|
|
657
|
+
N(kt, {
|
|
658
658
|
dataset: F.value,
|
|
659
659
|
hoveredUid: X.value,
|
|
660
660
|
stroke: t.value.style.chart.nodes.stroke,
|
|
661
661
|
strokeHovered: t.value.style.chart.nodes.strokeHovered,
|
|
662
|
-
onZoom:
|
|
662
|
+
onZoom: Ue,
|
|
663
663
|
onHover: Me
|
|
664
664
|
}, null, 8, ["dataset", "hoveredUid", "stroke", "strokeHovered"]),
|
|
665
665
|
w.value.showDataLabels ? (s(), R(Pt, {
|
|
@@ -682,7 +682,7 @@ const bt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
682
682
|
ee(), H.value = !1;
|
|
683
683
|
})
|
|
684
684
|
}, null, 8, ["color", "isFullscreen"])) : m("", !0),
|
|
685
|
-
e.$slots.watermark ? (s(), r("div",
|
|
685
|
+
e.$slots.watermark ? (s(), r("div", Nt, [
|
|
686
686
|
P(e.$slots, "watermark", Z(J({ isPrinting: I(ve) || I(fe) })), void 0, !0)
|
|
687
687
|
])) : m("", !0),
|
|
688
688
|
d.value ? m("", !0) : (s(), R(gt, {
|
|
@@ -697,7 +697,7 @@ const bt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
697
697
|
}
|
|
698
698
|
}
|
|
699
699
|
}, null, 8, ["config"])),
|
|
700
|
-
|
|
700
|
+
N(pt, {
|
|
701
701
|
show: w.value.showTooltip && u.value,
|
|
702
702
|
backgroundColor: t.value.style.chart.tooltip.backgroundColor,
|
|
703
703
|
color: t.value.style.chart.tooltip.color,
|
|
@@ -750,7 +750,7 @@ const bt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
750
750
|
x("div", {
|
|
751
751
|
innerHTML: l,
|
|
752
752
|
style: { display: "flex", "align-items": "center" }
|
|
753
|
-
}, null, 8,
|
|
753
|
+
}, null, 8, Ut)
|
|
754
754
|
]),
|
|
755
755
|
td: $(({ td: l }) => [
|
|
756
756
|
Ke(Se(l.name || l), 1)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./index-BTgtr0F8.cjs"),Pe=require("./Title-3EduyW4p.cjs"),se=require("./usePrinter-DzTaA1eh.cjs"),Ne=require("./DataTable-CsNozyz7.cjs"),Ee=require("./Tooltip-DScSrYXJ.cjs"),z=require("./BaseIcon-DB7Apwv_.cjs"),Te=require("./vue-ui-skeleton-CMQzFTs9.cjs"),Se=require("./vue-ui-accordion-7e4Myhcg.cjs"),ie=require("./useNestedProp-CisbRRo_.cjs"),Ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Re=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Le={__name:"RecursiveCircles",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null},linkColor:{type:String,default:"#CCCCCC"},stroke:{type:String,default:"#FFFFFF"},strokeHovered:{type:String,default:"#000000"}},emits:["zoom","hover"],setup(n,{emit:y}){const h=n;function u(a){y("zoom",a)}function c(a){y("hover",a)}return e.toRef(h,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(i=>{i.ancestor=a})}),(a,i)=>{const b=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,v=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.polygonPath&&v.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.polygonPath.coordinates,(F,P)=>(e.openBlock(),e.createElementBlock("circle",{cx:F.x,cy:F.y,r:v.circleRadius,fill:`url(#gradient_${v.color})`,stroke:n.hoveredUid&&n.hoveredUid===v.uid?n.strokeHovered:n.stroke,"stroke-width":n.hoveredUid&&n.hoveredUid===v.uid?v.circleRadius/6:v.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(g=>u(v),["stop"]),onMouseover:g=>c(v),onMouseleave:i[0]||(i[0]=g=>c(null))},null,40,Re))),256)),v.nodes&&v.nodes.length>0?(e.openBlock(),e.createBlock(b,{key:0,dataset:v.nodes,color:n.color,stroke:n.stroke,strokeHovered:n.strokeHovered,hoveredUid:n.hoveredUid,onZoom:u,onHover:c},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},ze=["x1","y1","x2","y2","stroke","stroke-width"],Me=["x1","y1","x2","y2","stroke","stroke-width"],De={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(n){const y=n;return e.toRef(y,"dataset").value.forEach(u=>{u.nodes&&u.nodes.length>0&&u.nodes.forEach(c=>{c.ancestor=u})}),(u,c)=>{const B=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.polygonPath.coordinates,(i,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.ancestor&&a.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:i.x,y1:i.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:n.backgroundColor,"stroke-width":a.circleRadius/1.5},null,8,ze),e.createElementVNode("line",{x1:i.x,y1:i.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:n.color,"stroke-width":a.circleRadius/2},null,8,Me)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.nodes&&a.nodes.length>0?(e.openBlock(),e.createBlock(B,{key:0,dataset:a.nodes,color:n.color,backgroundColor:n.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},Ue=["x","y","fill","font-size"],Ie={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(n,{emit:y}){const h=n;return e.toRef(h,"dataset").value.forEach(c=>{c.nodes&&c.nodes.length>0&&c.nodes.forEach(B=>{B.ancestor=c})}),(c,B)=>{const a=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,i=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.polygonPath&&i.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.polygonPath.coordinates,b=>(e.openBlock(),e.createElementBlock("text",{x:b.x,y:b.y+i.circleRadius*2,fill:n.color,"font-size":i.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(i.name),9,Ue))),256)),i.nodes&&i.nodes.length>0?(e.openBlock(),e.createBlock(a,{key:0,dataset:i.nodes,color:n.color,hoveredUid:n.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Oe={style:{position:"relative",height:"100%",width:"100%"}},He={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(n,{emit:y}){return(h,u)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`position: ${n.isFullscreen?"fixed":"absolute"};bottom:0;right:${n.isFullscreen?"12px":"0"};width:80px;height:80px`),"data-html2canvas-ignore":""},[e.createElementVNode("div",Oe,[e.createElementVNode("button",{onClick:u[0]||(u[0]=e.withModifiers(c=>y("moveLeft"),["stop"])),style:{position:"absolute",left:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowLeft",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[1]||(u[1]=e.withModifiers(c=>y("moveTop"),["stop"])),style:{position:"absolute",top:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowTop",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[2]||(u[2]=e.withModifiers(c=>y("moveRight"),["stop"])),style:{position:"absolute",right:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowRight",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[3]||(u[3]=e.withModifiers(c=>y("moveBottom"),["stop"])),style:{position:"absolute",bottom:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowBottom",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[4]||(u[4]=e.withModifiers(c=>y("reset"),["stop"])),style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"close",style:{cursor:"pointer"},strokeWidth:2},null,8,["stroke"])])])],4))}},qe=["id"],Ae=["xmlns","viewBox"],je=["id"],Ge=["stop-color"],Xe=["stop-color"],Ye={key:4,class:"vue-data-ui-watermark"},We=["innerHTML"],Ze={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(n,{expose:y}){const h=n,{vue_ui_molecule:u}=p.useConfig(),c=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{p.objectIsEmpty(h.dataset)&&p.error({componentName:"VueUiMolecule",type:"dataset"})});const B=e.ref(p.createUid()),a=e.ref(null),i=e.ref(!1),b=e.ref(""),v=e.ref(null),F=e.ref(null),P=e.ref(!1),g=e.ref(null),G=e.ref(null),D=e.ref(0),X=e.ref(0),Y=e.ref(0),o=e.computed({get:()=>W(),set:t=>t});function W(){const t=ie.useNestedProp({userConfig:h.config,defaultConfig:u});return t.theme?{...ie.useNestedProp({userConfig:p.themes.vue_ui_molecule[t.theme]||h.config,defaultConfig:t}),customPalette:p.themePalettes[t.theme]||p.palette}:t}e.watch(()=>h.config,t=>{o.value=W(),prepareChart(),X.value+=1,Y.value+=1},{deep:!0});const{isPrinting:Z,isImaging:J,generatePdf:K,generateImage:Q}=se.usePrinter({elementId:`cluster_${B.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),ue=e.computed(()=>p.convertCustomPalette(o.value.customPalette)),k=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function _(t,l=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?_(t[0].nodes,l+1):l}function ce(){const t=_(h.dataset);let l=100,r=l;for(let d=0;d<t;d+=1)l/=1,r+=l;return{height:r,width:r}}const x=e.ref(ce()),U=e.ref(`0 0 ${x.value.width} ${x.value.height}`);function ee(t,l={x:-x.value.width/2.43,y:x.value.height/2},r=x.value.width/1.1,d=24,s=0,f=0,V="#BBBBBB"){if(t&&t.length>0){const A=p.createPolygonPath({plot:l,radius:r,sides:t.length,rotation:s});t.forEach((m,$)=>{const R=A.coordinates[$];let w;if(m.ancestor?m.ancestor.ancestor?w=m.ancestor.color||V:(w=ue.value[f]||p.palette[f]||V,f+=1):w=V,m.polygonPath={coordinates:[R]},m.circleRadius=d,m.color=w,m.uid=p.createUid(),m.nodes&&m.nodes.length>0){const j=!m.ancestor||!m.ancestor.ancestor?f:0;m.nodes=ee(m.nodes,R,r/2.9,d/2.2,s+Math.PI*$/m.nodes.length,j,w)}})}return t}function de(t){const l=new Set;function r(s){s.forEach(f=>{f.color&&!l.has(f.color)&&l.add(f.color),f.nodes&&f.nodes.length>0&&r(f.nodes)})}r(t);const d={};return Array.from(l).forEach((s,f)=>{d[s]=`gradient_${f}`}),d}const ve=e.computed(()=>de(C.value)),C=e.computed(()=>ee(h.dataset));function I(){P.value=!1,F.value=null,G.value=null,g.value=null,H({polygonPath:{coordinates:[{x:x.value.width/2,y:x.value.height/2}]},circleRadius:24})}const O=e.ref(null);function H(t){v.value.focus(),e.nextTick(()=>{O.value&&cancelAnimationFrame(O.value);const l=U.value.split(" "),r=parseFloat(l[0]),d=parseFloat(l[1]),s=parseFloat(l[2]),f=parseFloat(l[3]),{x:V,y:A}=t.polygonPath.coordinates[0],{circleRadius:m}=t,$=8.34,R=V-m*$,w=A-m*$,j=m*$*2,Ce=m*$*2,Be=Math.sqrt((R-r)**2+(w-d)**2),L=Math.min(1200,Math.max(20,Math.floor(Be/10))),xe=(R-r)/L,we=(w-d)/L,$e=(j-s)/L,Fe=(Ce-f)/L;let E=0;function ae(){U.value=`${r+xe*E} ${d+we*E} ${s+$e*E} ${f+Fe*E}`,E+=o.value.style.chart.zoom.speed,E<=L&&(O.value=requestAnimationFrame(ae))}ae()})}function fe(t){F.value===t.uid?I():(F.value=t.uid,G.value=t,g.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},H(t),P.value=t.uid!==C.value[0].uid)}function me(t){if(t.target.nodeName!=="circle")I(),P.value=!1;else return}const q=e.ref(null);function pe(t){q.value={datapoint:t,seriesIndex:-1,series:C.value,config:o.value};const l=o.value.style.chart.tooltip.customFormat;if(p.isFunction(l)&&p.functionReturnsString(()=>l({seriesIndex:-1,datapoint:t,series:C.value,config:o.value})))b.value=l({seriesIndex:-1,datapoint:t,series:C.value,config:o.value});else{let r="";r+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`,t.details&&(r+=`<div style="width:100%;border-top:1px solid ${o.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`),b.value=`<div style="font-family:inherit">${r}</div>`}}const te=e.ref(null),T=e.ref(null);function he(t){te.value=t,t?(i.value=!0,pe(t),T.value=t.uid):(i.value=!1,b.value="",T.value=null)}function M(t){t==="right"&&(g.value.polygonPath.coordinates[0].x+=g.value.circleRadius),t==="left"&&(g.value.polygonPath.coordinates[0].x-=g.value.circleRadius),t==="top"&&(g.value.polygonPath.coordinates[0].y-=g.value.circleRadius),t==="bottom"&&(g.value.polygonPath.coordinates[0].y+=g.value.circleRadius),H(g.value)}function ge(t){const l=[];function r(d){d.forEach(s=>{const f={name:s.name,details:s.details||"-",ancestor:s.ancestor&&s.ancestor.name||"-",color:s.color||""};l.push(f),s.nodes&&s.nodes.length>0&&r(s.nodes,s.name)})}return r(t),l}const ye=e.computed(()=>ge(C.value)),N=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],l=ye.value.map((s,f)=>[{color:s.color,name:s.name},s.details,s.ancestor||""]),r={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint},d=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor];return{head:t,body:l,config:r,colNames:d}});function oe(){e.nextTick(()=>{const t=N.value.body.map((d,s)=>[[d[0].name],[d[1]],[d[2]]]),l=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(t),r=p.createCsvContent(l);p.downloadCsv({csvContent:r,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function ke(){return C.value}const S=e.ref(!1);function be(t){S.value=t,D.value+=1}function le(){k.value.showTable=!k.value.showTable}function re(){k.value.showDataLabels=!k.value.showDataLabels}function ne(){k.value.showTooltip=!k.value.showTooltip}return y({getData:ke,generatePdf:K,generateCsv:oe,generateImage:Q,toggleTable:le,toggleLabels:re,toggleTooltip:ne}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{onMouseleave:l[7]||(l[7]=r=>{te.value=null,T.value=null}),ref_key:"moleculeChart",ref:v,class:e.normalizeClass(`vue-ui-molecule ${S.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`cluster_${B.value}`},[o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${o.value.style.chart.backgroundColor};`)},[(e.openBlock(),e.createBlock(Pe._sfc_main,{key:`title_${X.value}`,config:{title:{cy:"molecule-div-title",...o.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),o.value.userOptions.show&&c.value?(e.openBlock(),e.createBlock(se.UserOptions,{ref_key:"details",ref:a,key:`user_options_${D.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(Z),isImaging:e.unref(J),uid:B.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasLabel:o.value.userOptions.buttons.labels,hasFullscreen:o.value.userOptions.buttons.fullscreen,isTooltip:k.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:v.value,onToggleFullscreen:be,onGeneratePdf:e.unref(K),onGenerateCsv:oe,onGenerateImage:e.unref(Q),onToggleTable:le,onToggleLabels:re,onToggleTooltip:ne},e.createSlots({_:2},[t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:r,isFullscreen:d})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:d})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(p.XMLNS),viewBox:U.value,class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),style:e.normalizeStyle(`overflow: hidden; background:${o.value.style.chart.backgroundColor};color:${o.value.style.chart.color}`),onClick:l[0]||(l[0]=e.withModifiers(r=>me(r),["stop"]))},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(ve.value),r=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${r}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(p.lightenHexColor)(r,.5)},null,8,Ge),e.createElementVNode("stop",{offset:"100%","stop-color":r},null,8,Xe)],8,je))),256))]),e.createVNode(De,{dataset:C.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Le,{dataset:C.value,hoveredUid:T.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:fe,onHover:he},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),k.value.showDataLabels?(e.openBlock(),e.createBlock(Ie,{key:0,dataset:C.value,color:o.value.style.chart.color,hoveredUid:T.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:x.value},void 0,!0)],14,Ae)):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createBlock(He,{key:`direction_pad_${D.value}`,color:o.value.style.chart.color,isFullscreen:S.value,onMoveLeft:l[1]||(l[1]=r=>M("left")),onMoveRight:l[2]||(l[2]=r=>M("right")),onMoveTop:l[3]||(l[3]=r=>M("top")),onMoveBottom:l[4]||(l[4]=r=>M("bottom")),onReset:l[5]||(l[5]=r=>{I(),P.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ye,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Z)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te.default,{key:5,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Ee._sfc_main,{show:k.value.showTooltip&&i.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,fontSize:o.value.style.chart.tooltip.fontSize,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:v.value,content:b.value,isCustom:o.value.style.chart.tooltip.customFormat&&typeof o.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...q.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...q.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),c.value?(e.openBlock(),e.createBlock(Se.default,{key:6,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ne.DataTable,{key:`table_${Y.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:l[6]||(l[6]=r=>k.value.showTable=!1)},{th:e.withCtx(({th:r})=>[e.createElementVNode("div",{innerHTML:r,style:{display:"flex","align-items":"center"}},null,8,We)]),td:e.withCtx(({td:r})=>[e.createTextVNode(e.toDisplayString(r.name||r),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,qe))}},Je=Ve._export_sfc(Ze,[["__scopeId","data-v-2555e7ea"]]);exports.default=Je;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./index-CzjC8LfY.cjs"),Pe=require("./Title-BSpa3uge.cjs"),se=require("./usePrinter-DiLM6jav.cjs"),Ne=require("./DataTable-C5TOiC61.cjs"),Ee=require("./Tooltip-rmhZhv96.cjs"),z=require("./BaseIcon-Bcpzfk34.cjs"),Te=require("./vue-ui-skeleton-CwqzJlQf.cjs"),Se=require("./vue-ui-accordion-DpI7fTKZ.cjs"),ie=require("./useNestedProp-CY7DebVH.cjs"),Ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Re=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Le={__name:"RecursiveCircles",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null},linkColor:{type:String,default:"#CCCCCC"},stroke:{type:String,default:"#FFFFFF"},strokeHovered:{type:String,default:"#000000"}},emits:["zoom","hover"],setup(n,{emit:y}){const h=n;function u(a){y("zoom",a)}function c(a){y("hover",a)}return e.toRef(h,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(i=>{i.ancestor=a})}),(a,i)=>{const b=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,v=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.polygonPath&&v.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.polygonPath.coordinates,(F,P)=>(e.openBlock(),e.createElementBlock("circle",{cx:F.x,cy:F.y,r:v.circleRadius,fill:`url(#gradient_${v.color})`,stroke:n.hoveredUid&&n.hoveredUid===v.uid?n.strokeHovered:n.stroke,"stroke-width":n.hoveredUid&&n.hoveredUid===v.uid?v.circleRadius/6:v.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(g=>u(v),["stop"]),onMouseover:g=>c(v),onMouseleave:i[0]||(i[0]=g=>c(null))},null,40,Re))),256)),v.nodes&&v.nodes.length>0?(e.openBlock(),e.createBlock(b,{key:0,dataset:v.nodes,color:n.color,stroke:n.stroke,strokeHovered:n.strokeHovered,hoveredUid:n.hoveredUid,onZoom:u,onHover:c},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},ze=["x1","y1","x2","y2","stroke","stroke-width"],Me=["x1","y1","x2","y2","stroke","stroke-width"],De={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(n){const y=n;return e.toRef(y,"dataset").value.forEach(u=>{u.nodes&&u.nodes.length>0&&u.nodes.forEach(c=>{c.ancestor=u})}),(u,c)=>{const B=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.polygonPath.coordinates,(i,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.ancestor&&a.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:i.x,y1:i.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:n.backgroundColor,"stroke-width":a.circleRadius/1.5},null,8,ze),e.createElementVNode("line",{x1:i.x,y1:i.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:n.color,"stroke-width":a.circleRadius/2},null,8,Me)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.nodes&&a.nodes.length>0?(e.openBlock(),e.createBlock(B,{key:0,dataset:a.nodes,color:n.color,backgroundColor:n.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},Ue=["x","y","fill","font-size"],Ie={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(n,{emit:y}){const h=n;return e.toRef(h,"dataset").value.forEach(c=>{c.nodes&&c.nodes.length>0&&c.nodes.forEach(B=>{B.ancestor=c})}),(c,B)=>{const a=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,i=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.polygonPath&&i.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.polygonPath.coordinates,b=>(e.openBlock(),e.createElementBlock("text",{x:b.x,y:b.y+i.circleRadius*2,fill:n.color,"font-size":i.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(i.name),9,Ue))),256)),i.nodes&&i.nodes.length>0?(e.openBlock(),e.createBlock(a,{key:0,dataset:i.nodes,color:n.color,hoveredUid:n.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Oe={style:{position:"relative",height:"100%",width:"100%"}},He={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(n,{emit:y}){return(h,u)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`position: ${n.isFullscreen?"fixed":"absolute"};bottom:0;right:${n.isFullscreen?"12px":"0"};width:80px;height:80px`),"data-html2canvas-ignore":""},[e.createElementVNode("div",Oe,[e.createElementVNode("button",{onClick:u[0]||(u[0]=e.withModifiers(c=>y("moveLeft"),["stop"])),style:{position:"absolute",left:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowLeft",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[1]||(u[1]=e.withModifiers(c=>y("moveTop"),["stop"])),style:{position:"absolute",top:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowTop",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[2]||(u[2]=e.withModifiers(c=>y("moveRight"),["stop"])),style:{position:"absolute",right:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowRight",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[3]||(u[3]=e.withModifiers(c=>y("moveBottom"),["stop"])),style:{position:"absolute",bottom:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowBottom",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[4]||(u[4]=e.withModifiers(c=>y("reset"),["stop"])),style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"close",style:{cursor:"pointer"},strokeWidth:2},null,8,["stroke"])])])],4))}},qe=["id"],Ae=["xmlns","viewBox"],je=["id"],Ge=["stop-color"],Xe=["stop-color"],Ye={key:4,class:"vue-data-ui-watermark"},We=["innerHTML"],Ze={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(n,{expose:y}){const h=n,{vue_ui_molecule:u}=p.useConfig(),c=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{p.objectIsEmpty(h.dataset)&&p.error({componentName:"VueUiMolecule",type:"dataset"})});const B=e.ref(p.createUid()),a=e.ref(null),i=e.ref(!1),b=e.ref(""),v=e.ref(null),F=e.ref(null),P=e.ref(!1),g=e.ref(null),G=e.ref(null),D=e.ref(0),X=e.ref(0),Y=e.ref(0),o=e.computed({get:()=>W(),set:t=>t});function W(){const t=ie.useNestedProp({userConfig:h.config,defaultConfig:u});return t.theme?{...ie.useNestedProp({userConfig:p.themes.vue_ui_molecule[t.theme]||h.config,defaultConfig:t}),customPalette:p.themePalettes[t.theme]||p.palette}:t}e.watch(()=>h.config,t=>{o.value=W(),prepareChart(),X.value+=1,Y.value+=1},{deep:!0});const{isPrinting:Z,isImaging:J,generatePdf:K,generateImage:Q}=se.usePrinter({elementId:`cluster_${B.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),ue=e.computed(()=>p.convertCustomPalette(o.value.customPalette)),k=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function _(t,l=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?_(t[0].nodes,l+1):l}function ce(){const t=_(h.dataset);let l=100,r=l;for(let d=0;d<t;d+=1)l/=1,r+=l;return{height:r,width:r}}const x=e.ref(ce()),U=e.ref(`0 0 ${x.value.width} ${x.value.height}`);function ee(t,l={x:-x.value.width/2.43,y:x.value.height/2},r=x.value.width/1.1,d=24,s=0,f=0,V="#BBBBBB"){if(t&&t.length>0){const A=p.createPolygonPath({plot:l,radius:r,sides:t.length,rotation:s});t.forEach((m,$)=>{const R=A.coordinates[$];let w;if(m.ancestor?m.ancestor.ancestor?w=m.ancestor.color||V:(w=ue.value[f]||p.palette[f]||V,f+=1):w=V,m.polygonPath={coordinates:[R]},m.circleRadius=d,m.color=w,m.uid=p.createUid(),m.nodes&&m.nodes.length>0){const j=!m.ancestor||!m.ancestor.ancestor?f:0;m.nodes=ee(m.nodes,R,r/2.9,d/2.2,s+Math.PI*$/m.nodes.length,j,w)}})}return t}function de(t){const l=new Set;function r(s){s.forEach(f=>{f.color&&!l.has(f.color)&&l.add(f.color),f.nodes&&f.nodes.length>0&&r(f.nodes)})}r(t);const d={};return Array.from(l).forEach((s,f)=>{d[s]=`gradient_${f}`}),d}const ve=e.computed(()=>de(C.value)),C=e.computed(()=>ee(h.dataset));function I(){P.value=!1,F.value=null,G.value=null,g.value=null,H({polygonPath:{coordinates:[{x:x.value.width/2,y:x.value.height/2}]},circleRadius:24})}const O=e.ref(null);function H(t){v.value.focus(),e.nextTick(()=>{O.value&&cancelAnimationFrame(O.value);const l=U.value.split(" "),r=parseFloat(l[0]),d=parseFloat(l[1]),s=parseFloat(l[2]),f=parseFloat(l[3]),{x:V,y:A}=t.polygonPath.coordinates[0],{circleRadius:m}=t,$=8.34,R=V-m*$,w=A-m*$,j=m*$*2,Ce=m*$*2,Be=Math.sqrt((R-r)**2+(w-d)**2),L=Math.min(1200,Math.max(20,Math.floor(Be/10))),xe=(R-r)/L,we=(w-d)/L,$e=(j-s)/L,Fe=(Ce-f)/L;let E=0;function ae(){U.value=`${r+xe*E} ${d+we*E} ${s+$e*E} ${f+Fe*E}`,E+=o.value.style.chart.zoom.speed,E<=L&&(O.value=requestAnimationFrame(ae))}ae()})}function fe(t){F.value===t.uid?I():(F.value=t.uid,G.value=t,g.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},H(t),P.value=t.uid!==C.value[0].uid)}function me(t){if(t.target.nodeName!=="circle")I(),P.value=!1;else return}const q=e.ref(null);function pe(t){q.value={datapoint:t,seriesIndex:-1,series:C.value,config:o.value};const l=o.value.style.chart.tooltip.customFormat;if(p.isFunction(l)&&p.functionReturnsString(()=>l({seriesIndex:-1,datapoint:t,series:C.value,config:o.value})))b.value=l({seriesIndex:-1,datapoint:t,series:C.value,config:o.value});else{let r="";r+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`,t.details&&(r+=`<div style="width:100%;border-top:1px solid ${o.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`),b.value=`<div style="font-family:inherit">${r}</div>`}}const te=e.ref(null),T=e.ref(null);function he(t){te.value=t,t?(i.value=!0,pe(t),T.value=t.uid):(i.value=!1,b.value="",T.value=null)}function M(t){t==="right"&&(g.value.polygonPath.coordinates[0].x+=g.value.circleRadius),t==="left"&&(g.value.polygonPath.coordinates[0].x-=g.value.circleRadius),t==="top"&&(g.value.polygonPath.coordinates[0].y-=g.value.circleRadius),t==="bottom"&&(g.value.polygonPath.coordinates[0].y+=g.value.circleRadius),H(g.value)}function ge(t){const l=[];function r(d){d.forEach(s=>{const f={name:s.name,details:s.details||"-",ancestor:s.ancestor&&s.ancestor.name||"-",color:s.color||""};l.push(f),s.nodes&&s.nodes.length>0&&r(s.nodes,s.name)})}return r(t),l}const ye=e.computed(()=>ge(C.value)),N=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],l=ye.value.map((s,f)=>[{color:s.color,name:s.name},s.details,s.ancestor||""]),r={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint},d=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor];return{head:t,body:l,config:r,colNames:d}});function oe(){e.nextTick(()=>{const t=N.value.body.map((d,s)=>[[d[0].name],[d[1]],[d[2]]]),l=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(t),r=p.createCsvContent(l);p.downloadCsv({csvContent:r,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function ke(){return C.value}const S=e.ref(!1);function be(t){S.value=t,D.value+=1}function le(){k.value.showTable=!k.value.showTable}function re(){k.value.showDataLabels=!k.value.showDataLabels}function ne(){k.value.showTooltip=!k.value.showTooltip}return y({getData:ke,generatePdf:K,generateCsv:oe,generateImage:Q,toggleTable:le,toggleLabels:re,toggleTooltip:ne}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{onMouseleave:l[7]||(l[7]=r=>{te.value=null,T.value=null}),ref_key:"moleculeChart",ref:v,class:e.normalizeClass(`vue-ui-molecule ${S.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`cluster_${B.value}`},[o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${o.value.style.chart.backgroundColor};`)},[(e.openBlock(),e.createBlock(Pe._sfc_main,{key:`title_${X.value}`,config:{title:{cy:"molecule-div-title",...o.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),o.value.userOptions.show&&c.value?(e.openBlock(),e.createBlock(se.UserOptions,{ref_key:"details",ref:a,key:`user_options_${D.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(Z),isImaging:e.unref(J),uid:B.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasLabel:o.value.userOptions.buttons.labels,hasFullscreen:o.value.userOptions.buttons.fullscreen,isTooltip:k.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:v.value,onToggleFullscreen:be,onGeneratePdf:e.unref(K),onGenerateCsv:oe,onGenerateImage:e.unref(Q),onToggleTable:le,onToggleLabels:re,onToggleTooltip:ne},e.createSlots({_:2},[t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:r,isFullscreen:d})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:d})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(p.XMLNS),viewBox:U.value,class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),style:e.normalizeStyle(`overflow: hidden; background:${o.value.style.chart.backgroundColor};color:${o.value.style.chart.color}`),onClick:l[0]||(l[0]=e.withModifiers(r=>me(r),["stop"]))},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(ve.value),r=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${r}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(p.lightenHexColor)(r,.5)},null,8,Ge),e.createElementVNode("stop",{offset:"100%","stop-color":r},null,8,Xe)],8,je))),256))]),e.createVNode(De,{dataset:C.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Le,{dataset:C.value,hoveredUid:T.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:fe,onHover:he},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),k.value.showDataLabels?(e.openBlock(),e.createBlock(Ie,{key:0,dataset:C.value,color:o.value.style.chart.color,hoveredUid:T.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:x.value},void 0,!0)],14,Ae)):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createBlock(He,{key:`direction_pad_${D.value}`,color:o.value.style.chart.color,isFullscreen:S.value,onMoveLeft:l[1]||(l[1]=r=>M("left")),onMoveRight:l[2]||(l[2]=r=>M("right")),onMoveTop:l[3]||(l[3]=r=>M("top")),onMoveBottom:l[4]||(l[4]=r=>M("bottom")),onReset:l[5]||(l[5]=r=>{I(),P.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ye,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Z)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te.default,{key:5,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Ee._sfc_main,{show:k.value.showTooltip&&i.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,fontSize:o.value.style.chart.tooltip.fontSize,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:v.value,content:b.value,isCustom:o.value.style.chart.tooltip.customFormat&&typeof o.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...q.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...q.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),c.value?(e.openBlock(),e.createBlock(Se.default,{key:6,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ne.DataTable,{key:`table_${Y.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:l[6]||(l[6]=r=>k.value.showTable=!1)},{th:e.withCtx(({th:r})=>[e.createElementVNode("div",{innerHTML:r,style:{display:"flex","align-items":"center"}},null,8,We)]),td:e.withCtx(({td:r})=>[e.createTextVNode(e.toDisplayString(r.name||r),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,qe))}},Je=Ve._export_sfc(Ze,[["__scopeId","data-v-2555e7ea"]]);exports.default=Je;
|