vue-data-ui 2.3.5 → 2.3.7
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-BSOdhAJO.cjs → Arrow-BZtTM41y.cjs} +1 -1
- package/dist/{Arrow-BjDVSrfA.js → Arrow-nwrjVtgP.js} +1 -1
- package/dist/{BaseIcon-vmmfWlyR.js → BaseIcon-DLlcdgWI.js} +4 -3
- package/dist/{BaseIcon-BoKtpbrI.cjs → BaseIcon-DWx8aSo2.cjs} +1 -1
- package/dist/{DataTable-CaB7GIwQ.js → DataTable-BFsn-W_6.js} +2 -2
- package/dist/{DataTable-ssrNbONo.cjs → DataTable-BSoyXOFT.cjs} +1 -1
- package/dist/{Legend-DHpoRTAE.js → Legend-DThjLfzi.js} +1 -1
- package/dist/{Legend-Dl5IYoxK.cjs → Legend-DZhpxKg4.cjs} +1 -1
- package/dist/{Shape-CaF4pvOn.cjs → Shape-CoCdB8es.cjs} +1 -1
- package/dist/{Shape-CQT4S7N-.js → Shape-DdhpbOB2.js} +1 -1
- package/dist/{Slicer-QC8nTm24.cjs → Slicer-Bb7zhtxv.cjs} +1 -1
- package/dist/{Slicer-Bdb1BlrC.js → Slicer-CBsGmIKc.js} +1 -1
- package/dist/{Title-BNPZwnkp.js → Title-CfofmWzW.js} +1 -1
- package/dist/{Title-Cj_xubjI.cjs → Title-Ci74YZxW.cjs} +1 -1
- package/dist/{Tooltip-CdJ5hegk.cjs → Tooltip-BNMjZUBc.cjs} +1 -1
- package/dist/{Tooltip-ZnJAz6dl.js → Tooltip-cIpD1ChA.js} +1 -1
- package/dist/{index-BMCvLyab.js → index-CGb3gF5A.js} +1 -1
- package/dist/{index-BkomIE9L.cjs → index-DFXgoR1T.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +1 -1
- package/dist/types/vue-data-ui.d.ts +1 -1
- package/dist/{useNestedProp-BMxXyPbW.cjs → useNestedProp-CbZUIZc0.cjs} +1 -1
- package/dist/{useNestedProp-CkP8xhG_.js → useNestedProp-DCBzUHfz.js} +1 -1
- package/dist/{usePrinter-r6uHYEcR.cjs → usePrinter-DoFYRZKM.cjs} +1 -1
- package/dist/{usePrinter-BuuBz5JR.js → usePrinter-VlAyPtaS.js} +1 -1
- package/dist/{vue-data-ui-Bc5U1cOP.cjs → vue-data-ui-DT5BwtL1.cjs} +1 -1
- package/dist/{vue-data-ui-DxeO0iaC.js → vue-data-ui-DkU-TK4x.js} +55 -55
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-32wM0tiX.js → vue-ui-3d-bar-B2ZdZ5yW.js} +7 -7
- package/dist/{vue-ui-3d-bar-CgB0fLQT.cjs → vue-ui-3d-bar-BwdmaNwO.cjs} +1 -1
- package/dist/{vue-ui-accordion-CLlVxx3Q.js → vue-ui-accordion-Br7xhAKF.js} +3 -3
- package/dist/{vue-ui-accordion-SXsobrUt.cjs → vue-ui-accordion-P9OYffC3.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-DqiwcOIr.cjs → vue-ui-age-pyramid-CJGz5iEy.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-D_CY99xF.js → vue-ui-age-pyramid-D_GP1VkP.js} +8 -8
- package/dist/{vue-ui-annotator-DvP-IxDm.js → vue-ui-annotator-BHI5Uicp.js} +1 -1
- package/dist/{vue-ui-annotator-mntqd3q_.cjs → vue-ui-annotator-C9I6Zikz.cjs} +1 -1
- package/dist/{vue-ui-candlestick-C_TvUQvH.cjs → vue-ui-candlestick-B3Z-Zw-o.cjs} +1 -1
- package/dist/{vue-ui-candlestick-C-5u3i-1.js → vue-ui-candlestick-BMz6lY9I.js} +9 -9
- package/dist/{vue-ui-carousel-table-CAqhsLVx.js → vue-ui-carousel-table-9W-FPpp4.js} +114 -104
- package/dist/vue-ui-carousel-table-ZyIsiWGm.cjs +1 -0
- package/dist/{vue-ui-chestnut-DhWlw2MD.cjs → vue-ui-chestnut-C4vJDydB.cjs} +1 -1
- package/dist/{vue-ui-chestnut-DylSfYMB.js → vue-ui-chestnut-DikFweqJ.js} +6 -6
- package/dist/{vue-ui-cursor-DTYEMgbU.js → vue-ui-cursor-CmWl10Om.js} +2 -2
- package/dist/{vue-ui-cursor-B04HJQVl.cjs → vue-ui-cursor-CxvSx8wW.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DFIYwP1s.cjs → vue-ui-dashboard-BRZFA0Yv.cjs} +1 -1
- package/dist/{vue-ui-dashboard-Bd0-cmSZ.js → vue-ui-dashboard-CqNO4CkA.js} +2 -2
- package/dist/{vue-ui-digits-Ced5mBJZ.cjs → vue-ui-digits-B5AQ1wb4.cjs} +1 -1
- package/dist/{vue-ui-digits-CW5qNMIk.js → vue-ui-digits-Bq86VtLg.js} +2 -2
- package/dist/{vue-ui-donut-EeVmrVJs.js → vue-ui-donut-BSM49MRr.js} +9 -9
- package/dist/{vue-ui-donut-evolution-Ct6KAzs-.cjs → vue-ui-donut-evolution-D4vsG4oJ.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-BN08Y2hy.js → vue-ui-donut-evolution-hXH6wndl.js} +9 -9
- package/dist/{vue-ui-donut-DIhhgvWp.cjs → vue-ui-donut-fUSFXY5z.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-pextarqH.cjs → vue-ui-dumbbell-CSxoMYt4.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-BMlxS1Nq.js → vue-ui-dumbbell-DF7resYk.js} +8 -8
- package/dist/{vue-ui-flow-CHmkgfyb.js → vue-ui-flow-2Wc505ek.js} +7 -7
- package/dist/{vue-ui-flow-BXVsbmyb.cjs → vue-ui-flow-qhWWfhM9.cjs} +1 -1
- package/dist/{vue-ui-galaxy-kiVOZOBz.js → vue-ui-galaxy-C1tqFf2k.js} +9 -9
- package/dist/{vue-ui-galaxy-D4xyd-J1.cjs → vue-ui-galaxy-DTYcNRMO.cjs} +1 -1
- package/dist/{vue-ui-gauge-DPFBsbFj.cjs → vue-ui-gauge-4oL43tii.cjs} +1 -1
- package/dist/{vue-ui-gauge-BcO-z97J.js → vue-ui-gauge-qkz3wSir.js} +4 -4
- package/dist/{vue-ui-heatmap-DBOKYaJz.cjs → vue-ui-heatmap-B8vDpGuW.cjs} +1 -1
- package/dist/{vue-ui-heatmap-DD-Bzddj.js → vue-ui-heatmap-SUwlu7rR.js} +8 -8
- package/dist/{vue-ui-kpi-BEgf5yDv.cjs → vue-ui-kpi-Bw-xbRgX.cjs} +1 -1
- package/dist/{vue-ui-kpi-BS0o7zb9.js → vue-ui-kpi-jQgfkbVw.js} +2 -2
- package/dist/{vue-ui-mini-loader-DJEvG6ju.js → vue-ui-mini-loader-5YEExcv8.js} +2 -2
- package/dist/{vue-ui-mini-loader-Bm5EJxtG.cjs → vue-ui-mini-loader-DT-Ww_uE.cjs} +1 -1
- package/dist/{vue-ui-molecule-DzUqcaxd.cjs → vue-ui-molecule-DA0NQGMP.cjs} +1 -1
- package/dist/{vue-ui-molecule-DdwnFEBJ.js → vue-ui-molecule-sddRGEOr.js} +9 -9
- package/dist/{vue-ui-mood-radar-B9Gczs_Z.js → vue-ui-mood-radar-BlwtCy7m.js} +9 -9
- package/dist/{vue-ui-mood-radar-DbB7m4Ku.cjs → vue-ui-mood-radar-CUfTRsXf.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-CVQ1CaXo.js → vue-ui-nested-donuts-BYDoEtqK.js} +9 -9
- package/dist/{vue-ui-nested-donuts-BSINf8hd.cjs → vue-ui-nested-donuts-CyhCktfb.cjs} +1 -1
- package/dist/{vue-ui-onion-Ut75t7hB.js → vue-ui-onion-BiS7G_xb.js} +9 -9
- package/dist/{vue-ui-onion-D3-6Tv4u.cjs → vue-ui-onion-DKjJWVtm.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-Bjo09ZTX.js → vue-ui-parallel-coordinate-plot-BcZOH5MA.js} +10 -10
- package/dist/{vue-ui-parallel-coordinate-plot-CJGkoIgN.cjs → vue-ui-parallel-coordinate-plot-CB5WohUW.cjs} +1 -1
- package/dist/{vue-ui-quadrant-Du9PKvlO.js → vue-ui-quadrant-BX2Z_BiG.js} +10 -10
- package/dist/{vue-ui-quadrant-CzCvejGn.cjs → vue-ui-quadrant-aRRuJrr1.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-BsxsPbjz.cjs → vue-ui-quick-chart-BSov5yuk.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-u0cPmD3q.js → vue-ui-quick-chart-aCDLYVC0.js} +6 -6
- package/dist/{vue-ui-radar-DIpCrj1h.cjs → vue-ui-radar-B3DWzSx8.cjs} +1 -1
- package/dist/{vue-ui-radar-CBrpuE5r.js → vue-ui-radar-DGhNZx7E.js} +10 -10
- package/dist/{vue-ui-rating-D8fJC8Yt.cjs → vue-ui-rating-DI2herA3.cjs} +1 -1
- package/dist/{vue-ui-rating-CaeGGlCw.js → vue-ui-rating-QJp1mzIX.js} +2 -2
- package/dist/{vue-ui-relation-circle-5DNf880s.js → vue-ui-relation-circle-DRKymwCT.js} +5 -5
- package/dist/{vue-ui-relation-circle-Ky3nPk6S.cjs → vue-ui-relation-circle-Dgk6ILFm.cjs} +1 -1
- package/dist/{vue-ui-rings-IE3IdNRF.js → vue-ui-rings-Dc_Xgav-.js} +9 -9
- package/dist/{vue-ui-rings-CffZ4T2S.cjs → vue-ui-rings-m9Gm4w5-.cjs} +1 -1
- package/dist/{vue-ui-scatter-C4GCZm0V.js → vue-ui-scatter-3p_U1RQz.js} +10 -10
- package/dist/{vue-ui-scatter-TsX5dW9l.cjs → vue-ui-scatter-CwNnmbpv.cjs} +1 -1
- package/dist/{vue-ui-screenshot-Bzpg6yof.cjs → vue-ui-screenshot-Bdg6KSR_.cjs} +1 -1
- package/dist/{vue-ui-screenshot-Bl3oooKI.js → vue-ui-screenshot-DjN1leGW.js} +1 -1
- package/dist/{vue-ui-skeleton-BisWX1sO.js → vue-ui-skeleton-B0udzFdQ.js} +2 -2
- package/dist/{vue-ui-skeleton-JmGp11-u.cjs → vue-ui-skeleton-CmABeGyu.cjs} +1 -1
- package/dist/{vue-ui-smiley-Sth2pqG1.js → vue-ui-smiley-BJdbZUnl.js} +2 -2
- package/dist/{vue-ui-smiley-BhSrt9f-.cjs → vue-ui-smiley-CIMwndRh.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-C8NSz4l8.cjs → vue-ui-spark-trend-BiqhJCi0.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-DAqO0TW2.js → vue-ui-spark-trend-Bs8wWJc2.js} +4 -4
- package/dist/{vue-ui-sparkbar-hL1Q6ObK.cjs → vue-ui-sparkbar-C2YT0NxS.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-B0zX7NU7.js → vue-ui-sparkbar-CDi8i8_Q.js} +3 -3
- package/dist/{vue-ui-sparkgauge-CWR8zJnU.js → vue-ui-sparkgauge-11o7Kgbf.js} +3 -3
- package/dist/{vue-ui-sparkgauge-tbVqaLCK.cjs → vue-ui-sparkgauge-D7sVelKC.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-Dv-lml4g.cjs → vue-ui-sparkhistogram-C6nnvqeP.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-DxqCtDpw.js → vue-ui-sparkhistogram-DW4yBl5Z.js} +4 -4
- package/dist/{vue-ui-sparkline-BpL1jn7F.js → vue-ui-sparkline-B-jMIILk.js} +3 -3
- package/dist/{vue-ui-sparkline-B6pvaBY_.cjs → vue-ui-sparkline-Bnc9Cv0E.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-CQ2TEi4p.cjs → vue-ui-sparkstackbar-CVyS6viy.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-BzbuBNIV.js → vue-ui-sparkstackbar-cUpn5wUS.js} +3 -3
- package/dist/{vue-ui-strip-plot-DCcbD6UE.js → vue-ui-strip-plot-CpfV9-gw.js} +9 -9
- package/dist/{vue-ui-strip-plot-DCC6F4VM.cjs → vue-ui-strip-plot-Dc1Y7Lfz.cjs} +1 -1
- package/dist/{vue-ui-table-CseaFWgX.cjs → vue-ui-table-BHENqbW6.cjs} +1 -1
- package/dist/{vue-ui-table-CFqIWfxl.js → vue-ui-table-CaCOIekW.js} +1 -1
- package/dist/{vue-ui-table-heatmap-Bwut-V1D.cjs → vue-ui-table-heatmap-r9XRz_dD.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-Bz8KYDxr.js → vue-ui-table-heatmap-s7r2sGYk.js} +4 -4
- package/dist/{vue-ui-table-sparkline-z29ND2lq.js → vue-ui-table-sparkline-BS7VAPDv.js} +5 -5
- package/dist/{vue-ui-table-sparkline-CJBU3y8-.cjs → vue-ui-table-sparkline-Dk_FjirH.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BNAITzJa.js → vue-ui-thermometer-BQLqVj-X.js} +5 -5
- package/dist/{vue-ui-thermometer-DM2IKhqN.cjs → vue-ui-thermometer-DU49ev3a.cjs} +1 -1
- package/dist/{vue-ui-timer-DLfXuW8T.cjs → vue-ui-timer-9QQVkkbc.cjs} +1 -1
- package/dist/{vue-ui-timer-DV6lQVHU.js → vue-ui-timer-DGM9AHJ5.js} +4 -4
- package/dist/{vue-ui-tiremarks-WyQPg7yo.js → vue-ui-tiremarks-Bxop3uDk.js} +5 -5
- package/dist/{vue-ui-tiremarks-B1bd1jPf.cjs → vue-ui-tiremarks-CJ9xiM-i.cjs} +1 -1
- package/dist/{vue-ui-treemap-BZGmoDHb.cjs → vue-ui-treemap-BOEC1m08.cjs} +1 -1
- package/dist/{vue-ui-treemap-DKmBhzV-.js → vue-ui-treemap-CQ9rJnkn.js} +9 -9
- package/dist/{vue-ui-vertical-bar-Bi-0rRN3.cjs → vue-ui-vertical-bar-BBHN-hhJ.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-C-ySfrhJ.js → vue-ui-vertical-bar-CwcIKeM-.js} +9 -9
- package/dist/{vue-ui-waffle-VLYkR-YZ.cjs → vue-ui-waffle-Bg_hB8yK.cjs} +1 -1
- package/dist/{vue-ui-waffle-CGRWu-da.js → vue-ui-waffle-DB3cEJx6.js} +9 -9
- package/dist/{vue-ui-wheel-Pj9OPk9f.js → vue-ui-wheel-CF6psk6N.js} +5 -5
- package/dist/{vue-ui-wheel-D2q5vy5V.cjs → vue-ui-wheel-DpTCJpZn.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-Ba4BjatU.cjs → vue-ui-word-cloud-DVu3gTbu.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-8Vr-jo1p.js → vue-ui-word-cloud-QlpZWR2c.js} +6 -6
- package/dist/{vue-ui-xy-qToggEfh.js → vue-ui-xy-CpcGvBUq.js} +12 -12
- package/dist/{vue-ui-xy-C4QW5Lfl.cjs → vue-ui-xy-DFiOxWGU.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-DnLWrf0e.js → vue-ui-xy-canvas-CBlzHZ_m.js} +10 -10
- package/dist/{vue-ui-xy-canvas-Be-Da_0x.cjs → vue-ui-xy-canvas-DR_8n36F.cjs} +1 -1
- package/package.json +1 -1
- package/dist/vue-ui-carousel-table-BCePqkuz.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),d=require("./index-BkomIE9L.cjs"),ae=require("./Title-Cj_xubjI.cjs"),X=require("./usePrinter-r6uHYEcR.cjs"),se=require("./Tooltip-CdJ5hegk.cjs"),ue=require("./vue-ui-skeleton-JmGp11-u.cjs"),ne=require("./BaseIcon-BoKtpbrI.cjs"),re=require("./vue-ui-accordion-SXsobrUt.cjs"),j=require("./useNestedProp-BMxXyPbW.cjs"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),de=["id"],ce=["xmlns","viewBox"],ve=["x","y","width","height","fill","stroke","stroke-width"],ye=["x","y","width","height","fill","stroke","stroke-width"],he=["font-size","font-weight","fill","x","y"],pe=["x","y","width","height","onMouseover"],ge={key:0},me=["font-size","fill","x","y","font-weight"],fe={key:0},be=["x","y","font-size","fill","font-weight"],xe={key:1},ke=["x","y","width","height","stroke","stroke-width"],we={key:2},_e=["id"],Ce=["stop-color"],Ne=["stop-color"],Be=["x","y","font-size","fill"],Se=["x","y","height","rx","fill"],Ve=["x","y","font-size","fill"],$e=["stroke","x1","x2","y1","y2"],Ee=["fill","d"],ze={key:3},Le={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},Te=["stop-color"],Fe=["stop-color"],Ae=["x","y","width","height","rx"],Me=["x","y","font-size","fill"],Pe=["x","y","font-size","fill"],De=["stroke","x1","x2","y1","y2"],Ie=["fill","d"],Oe={class:"vue-ui-data-table"},Re={key:0},qe=["data-cell"],He={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ue=["data-cell"],Ge={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Xe={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(B,{expose:W}){const r=B;e.useCssVars(l=>({"2d7e5208":l.tdo}));const{vue_ui_heatmap:Y}=d.useConfig(),S=e.computed(()=>!!r.dataset&&r.dataset.length);d.objectIsEmpty(r.dataset)&&d.error({componentName:"VueUiHeatmap",type:"dataset"});const x=e.ref(d.createUid()),E=e.ref(null),K=e.ref(null),z=e.ref(!1),L=e.ref(""),P=e.ref(void 0),k=e.ref(null),D=e.ref(0),I=e.ref(null),O=e.ref(!1),t=e.computed(()=>{const l=j.useNestedProp({userConfig:r.config,defaultConfig:Y});return l.theme?{...j.useNestedProp({userConfig:d.themes.vue_ui_heatmap[l.theme]||r.config,defaultConfig:l})}:l}),{isPrinting:J,isImaging:Q,generatePdf:R,generateImage:q}=X.usePrinter({elementId:`heatmap__${x.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),Z=e.computed(()=>t.value.table.responsiveBreakpoint);function ee(){new ResizeObserver(a=>{a.forEach(s=>{O.value=s.contentRect.width<Z.value})}).observe(I.value)}e.onMounted(ee);const b=e.computed(()=>Math.max(...r.dataset.flatMap(l=>(l.values||[]).length))),y=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+r.dataset.length*t.value.style.layout.cells.height,a=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(b.value<r.dataset.length?r.dataset.length:b.value)*t.value.style.layout.cells.height,s=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:s,width:a}}),V=e.computed(()=>t.value.style.legend.position),o=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:y.value.width-t.value.style.layout.padding.right-(V.value==="right"&&t.value.style.legend.show?92:0),bottom:y.value.height-t.value.style.layout.padding.bottom,height:y.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:y.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-(V.value==="right"&&t.value.style.legend.show?92:0)})),T=e.computed(()=>u.value.height*r.dataset.length),h=e.computed(()=>Math.max(...r.dataset.flatMap(l=>l.values))),w=e.computed(()=>Math.min(...r.dataset.flatMap(l=>l.values))),f=e.computed(()=>{const l=r.dataset.flatMap(s=>s.values);return l.reduce((s,n)=>s+n,0)/l.length}),u=e.computed(()=>({width:o.value.width/b.value,height:o.value.width/(b.value<r.dataset.length?r.dataset.length:b.value)})),p=e.computed(()=>{const l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:r.dataset.map(s=>s.name),a=t.value.style.layout.dataLabels.xAxis.values;return{yLabels:l,xLabels:a.slice(0,b.value)}}),$=e.computed(()=>(r.dataset.forEach((l,a)=>{d.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(s=>{d.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:a})})}),r.dataset.map(l=>({...l,temperatures:(l.values||[]).map((a,s)=>a>=f.value?{side:"up",color:d.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,w.value,h.value,a),ratio:Math.abs(Math.abs(a-f.value)/Math.abs(h.value-f.value))>1?1:Math.abs(Math.abs(a-f.value)/Math.abs(h.value-f.value)),value:a,yAxisName:l.name,xAxisName:p.value.xLabels[s],id:`vue-data-ui-heatmap-cell-${d.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(a)/Math.abs(f.value))>1?1:Math.abs(1-Math.abs(a)/Math.abs(f.value)),color:d.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,w.value,h.value,a),value:a,yAxisName:l.name,xAxisName:p.value.xLabels[s],id:`vue-data-ui-heatmap-cell-${d.createUid()}`})})))),g=e.ref(null),F=e.ref(null);function te(l,a,s,n){k.value={x:s,y:n},console.log(l);const{value:i,yAxisName:c,xAxisName:m,id:oe}=l;P.value=oe,g.value=i,F.value={datapoint:l,seriesIndex:a,series:$.value,config:t.value},z.value=!0;let A="";const M=t.value.style.tooltip.customFormat;d.isFunction(M)&&d.functionReturnsString(()=>M({datapoint:l,seriesIndex:a,series:$.value,config:t.value}))?L.value=M({datapoint:l,seriesIndex:a,series:$.value,config:t.value}):(A+=`<div>${c} ${m?`${m}`:""}</div>`,A+=`<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:${d.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,w.value,h.value,i)}">⬤</span><span>${isNaN(i)?"-":d.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:i,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.tooltip.roundingValue})}</span></div>`,L.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${A}</div>`)}const _=e.computed(()=>o.value.top+T.value*(1-g.value/h.value)),C=e.computed(()=>o.value.left+(y.value.width-o.value.left-t.value.style.layout.padding.right)*(g.value/h.value));e.computed(()=>{const l=r.dataset.map(s=>({name:s.name})),a=r.dataset.map(s=>s.values);return{head:l,body:a}});function H(){e.nextTick(()=>{const l=["",...r.dataset.map((i,c)=>i.name)],a=[];for(let i=0;i<p.value.xLabels.length;i+=1){const c=[p.value.xLabels[i]];for(let m=0;m<r.dataset.length;m+=1)c.push([r.dataset[m].values[i]]);a.push(c)}const s=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(a),n=d.createCsvContent(s);d.downloadCsv({csvContent:n,title:t.value.style.title.text||"vue-ui-heatmap"})})}const N=e.ref(!1);function le(l){N.value=l,D.value+=1}function U(){v.value.showTable=!v.value.showTable}function G(){v.value.showTooltip=!v.value.showTooltip}return W({generatePdf:R,generateCsv:H,generateImage:q,toggleTable:U,toggleTooltip:G}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:E,class:e.normalizeClass(`vue-ui-heatmap ${N.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__${x.value}`},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor}`)},[e.createVNode(ae._sfc_main,{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&&S.value?(e.openBlock(),e.createBlock(X.UserOptions,{ref_key:"details",ref:K,key:`user_options_${D.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(Q),isPrinting:e.unref(J),uid:x.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:N.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:E.value,onToggleFullscreen:le,onGeneratePdf:e.unref(R),onGenerateCsv:H,onGenerateImage:e.unref(q),onToggleTable:U,onToggleTooltip:G},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:s,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:s,isFullscreen:n})),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),S.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(d.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":N.value,"vue-data-ui-fulscreen--off":!N.value}),viewBox:`0 0 ${y.value.width} ${y.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($.value,(s,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.temperatures,(i,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.value.left+u.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+u.value.height*n+t.value.style.layout.cells.spacing/2,width:u.value.width-t.value.style.layout.cells.spacing,height:u.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,ve),e.createElementVNode("rect",{x:o.value.left+u.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+u.value.height*n+t.value.style.layout.cells.spacing/2,width:u.value.width-t.value.style.layout.cells.spacing,height:u.value.height-t.value.style.layout.cells.spacing,fill:i.color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,ye),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(d.adaptColorToBackground)(i.color),x:o.value.left+u.value.width*c+u.value.width/2,y:o.value.top+u.value.height*n+u.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(t.value.style.layout.dataLabels.prefix)+e.toDisplayString(Number(i.value.toFixed(t.value.style.layout.cells.value.roundingValue)).toLocaleString())+e.toDisplayString(t.value.style.layout.dataLabels.suffix),9,he)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.temperatures,(i,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.value.left+u.value.width*c,y:o.value.top+u.value.height*n,width:u.value.width,height:u.value.height,fill:"transparent",stroke:"none",onMouseover:m=>te(i,n,o.value.left+u.value.width*c,o.value.top+u.value.height*n),onMouseout:a[0]||(a[0]=m=>{z.value=!1,P.value=void 0,g.value=null,k.value=null})},null,40,pe)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",ge,[e.createElementVNode("text",{"font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:o.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:o.value.top+u.value.height*n+u.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[n]),9,me)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.xLabels,(s,n)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left+u.value.width/2+o.value.width/p.value.xLabels.length*n+t.value.style.layout.dataLabels.xAxis.offsetX,y:o.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6,"text-anchor":"middle","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"},e.toDisplayString(s),9,be))),256))])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("g",xe,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:k.value.x-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,y:k.value.y-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,width:u.value.width-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,height:u.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,ke)])):e.createCommentVNode("",!0),t.value.style.legend.show&&V.value==="right"?(e.openBlock(),e.createElementBlock("g",we,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${x.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Ce),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Ne)],8,_e)]),e.createElementVNode("text",{x:o.value.right+36+18,y:o.value.top-t.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(Number(h.value.toFixed(t.value.style.legend.roundingValue)).toLocaleString()),9,Be),e.createElementVNode("rect",{x:o.value.right+36,y:o.value.top,width:36,height:T.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${x.value})`},null,8,Se),e.createElementVNode("text",{x:o.value.right+36+18,y:o.value.top+T.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(Number(w.value.toFixed(t.value.style.legend.roundingValue)).toLocaleString()),9,Ve),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:t.value.style.backgroundColor,"stroke-width":"2",x1:o.value.right+36,x2:o.value.right+72,y1:_.value,y2:_.value},null,8,$e)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${o.value.right+36},${_.value} ${o.value.right+26},${_.value-8} ${o.value.right+26},${_.value+8}z`},null,8,Ee)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&V.value==="bottom"?(e.openBlock(),e.createElementBlock("g",ze,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",Le,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Te),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Fe)])]),e.createElementVNode("rect",{x:o.value.left,y:o.value.bottom+t.value.style.layout.cells.height,width:y.value.width-o.value.left-t.value.style.layout.padding.right,height:t.value.style.layout.cells.height,rx:t.value.style.legend.scaleBorderRadius>t.value.style.layout.cells.height/2?t.value.style.layout.cells.height/2:t.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,Ae),e.createElementVNode("text",{x:o.value.left,y:o.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"start","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(Number(w.value.toFixed(t.value.style.legend.roundingValue)).toLocaleString()),9,Me),e.createElementVNode("text",{x:o.value.right,y:o.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"end","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(Number(h.value.toFixed(t.value.style.legend.roundingValue)).toLocaleString()),9,Pe),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:t.value.style.backgroundColor,"stroke-width":"2",x1:C.value,x2:C.value,y1:o.value.bottom+t.value.style.layout.cells.height,y2:o.value.bottom+t.value.style.layout.cells.height*2},null,8,De)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${C.value},${o.value.bottom+t.value.style.layout.cells.height} ${C.value-12},${o.value.bottom+t.value.style.layout.cells.height-20} ${C.value+12},${o.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,Ie)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:y.value},void 0,!0)],14,ce)):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ue.default,{key:3,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(se._sfc_main,{show:v.value.showTooltip&&z.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,parent:E.value,content:L.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({...F.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","parent","content","isCustom"]),S.value?(e.openBlock(),e.createBlock(re.default,{key:4,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref: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":O.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:a[1]||(a[1]=s=>v.value.showTable=!1),onKeypress:a[2]||(a[2]=e.withKeys(s=>v.value.showTable=!1,["enter"]))},[e.createVNode(ne.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",Oe,[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",Re,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,(s,n)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},e.toDisplayString(s.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.xLabels,(s,n)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":t.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",He,e.toDisplayString(s),1)],12,qe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.dataset,(i,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",Ge,e.toDisplayString(isNaN(i.values[n])?"-":e.unref(d.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:i.values[n],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,Ue))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,de))}},je=ie._export_sfc(Xe,[["__scopeId","data-v-52af0be2"]]);exports.default=je;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),d=require("./index-DFXgoR1T.cjs"),ae=require("./Title-Ci74YZxW.cjs"),X=require("./usePrinter-DoFYRZKM.cjs"),se=require("./Tooltip-BNMjZUBc.cjs"),ue=require("./vue-ui-skeleton-CmABeGyu.cjs"),ne=require("./BaseIcon-DWx8aSo2.cjs"),re=require("./vue-ui-accordion-P9OYffC3.cjs"),j=require("./useNestedProp-CbZUIZc0.cjs"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),de=["id"],ce=["xmlns","viewBox"],ve=["x","y","width","height","fill","stroke","stroke-width"],ye=["x","y","width","height","fill","stroke","stroke-width"],he=["font-size","font-weight","fill","x","y"],pe=["x","y","width","height","onMouseover"],ge={key:0},me=["font-size","fill","x","y","font-weight"],fe={key:0},be=["x","y","font-size","fill","font-weight"],xe={key:1},ke=["x","y","width","height","stroke","stroke-width"],we={key:2},_e=["id"],Ce=["stop-color"],Ne=["stop-color"],Be=["x","y","font-size","fill"],Se=["x","y","height","rx","fill"],Ve=["x","y","font-size","fill"],$e=["stroke","x1","x2","y1","y2"],Ee=["fill","d"],ze={key:3},Le={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},Te=["stop-color"],Fe=["stop-color"],Ae=["x","y","width","height","rx"],Me=["x","y","font-size","fill"],Pe=["x","y","font-size","fill"],De=["stroke","x1","x2","y1","y2"],Ie=["fill","d"],Oe={class:"vue-ui-data-table"},Re={key:0},qe=["data-cell"],He={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ue=["data-cell"],Ge={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Xe={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(B,{expose:W}){const r=B;e.useCssVars(l=>({"2d7e5208":l.tdo}));const{vue_ui_heatmap:Y}=d.useConfig(),S=e.computed(()=>!!r.dataset&&r.dataset.length);d.objectIsEmpty(r.dataset)&&d.error({componentName:"VueUiHeatmap",type:"dataset"});const x=e.ref(d.createUid()),E=e.ref(null),K=e.ref(null),z=e.ref(!1),L=e.ref(""),P=e.ref(void 0),k=e.ref(null),D=e.ref(0),I=e.ref(null),O=e.ref(!1),t=e.computed(()=>{const l=j.useNestedProp({userConfig:r.config,defaultConfig:Y});return l.theme?{...j.useNestedProp({userConfig:d.themes.vue_ui_heatmap[l.theme]||r.config,defaultConfig:l})}:l}),{isPrinting:J,isImaging:Q,generatePdf:R,generateImage:q}=X.usePrinter({elementId:`heatmap__${x.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),Z=e.computed(()=>t.value.table.responsiveBreakpoint);function ee(){new ResizeObserver(a=>{a.forEach(s=>{O.value=s.contentRect.width<Z.value})}).observe(I.value)}e.onMounted(ee);const b=e.computed(()=>Math.max(...r.dataset.flatMap(l=>(l.values||[]).length))),y=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+r.dataset.length*t.value.style.layout.cells.height,a=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(b.value<r.dataset.length?r.dataset.length:b.value)*t.value.style.layout.cells.height,s=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:s,width:a}}),V=e.computed(()=>t.value.style.legend.position),o=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:y.value.width-t.value.style.layout.padding.right-(V.value==="right"&&t.value.style.legend.show?92:0),bottom:y.value.height-t.value.style.layout.padding.bottom,height:y.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:y.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-(V.value==="right"&&t.value.style.legend.show?92:0)})),T=e.computed(()=>u.value.height*r.dataset.length),h=e.computed(()=>Math.max(...r.dataset.flatMap(l=>l.values))),w=e.computed(()=>Math.min(...r.dataset.flatMap(l=>l.values))),f=e.computed(()=>{const l=r.dataset.flatMap(s=>s.values);return l.reduce((s,n)=>s+n,0)/l.length}),u=e.computed(()=>({width:o.value.width/b.value,height:o.value.width/(b.value<r.dataset.length?r.dataset.length:b.value)})),p=e.computed(()=>{const l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:r.dataset.map(s=>s.name),a=t.value.style.layout.dataLabels.xAxis.values;return{yLabels:l,xLabels:a.slice(0,b.value)}}),$=e.computed(()=>(r.dataset.forEach((l,a)=>{d.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(s=>{d.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:a})})}),r.dataset.map(l=>({...l,temperatures:(l.values||[]).map((a,s)=>a>=f.value?{side:"up",color:d.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,w.value,h.value,a),ratio:Math.abs(Math.abs(a-f.value)/Math.abs(h.value-f.value))>1?1:Math.abs(Math.abs(a-f.value)/Math.abs(h.value-f.value)),value:a,yAxisName:l.name,xAxisName:p.value.xLabels[s],id:`vue-data-ui-heatmap-cell-${d.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(a)/Math.abs(f.value))>1?1:Math.abs(1-Math.abs(a)/Math.abs(f.value)),color:d.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,w.value,h.value,a),value:a,yAxisName:l.name,xAxisName:p.value.xLabels[s],id:`vue-data-ui-heatmap-cell-${d.createUid()}`})})))),g=e.ref(null),F=e.ref(null);function te(l,a,s,n){k.value={x:s,y:n},console.log(l);const{value:i,yAxisName:c,xAxisName:m,id:oe}=l;P.value=oe,g.value=i,F.value={datapoint:l,seriesIndex:a,series:$.value,config:t.value},z.value=!0;let A="";const M=t.value.style.tooltip.customFormat;d.isFunction(M)&&d.functionReturnsString(()=>M({datapoint:l,seriesIndex:a,series:$.value,config:t.value}))?L.value=M({datapoint:l,seriesIndex:a,series:$.value,config:t.value}):(A+=`<div>${c} ${m?`${m}`:""}</div>`,A+=`<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:${d.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,w.value,h.value,i)}">⬤</span><span>${isNaN(i)?"-":d.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:i,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.tooltip.roundingValue})}</span></div>`,L.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${A}</div>`)}const _=e.computed(()=>o.value.top+T.value*(1-g.value/h.value)),C=e.computed(()=>o.value.left+(y.value.width-o.value.left-t.value.style.layout.padding.right)*(g.value/h.value));e.computed(()=>{const l=r.dataset.map(s=>({name:s.name})),a=r.dataset.map(s=>s.values);return{head:l,body:a}});function H(){e.nextTick(()=>{const l=["",...r.dataset.map((i,c)=>i.name)],a=[];for(let i=0;i<p.value.xLabels.length;i+=1){const c=[p.value.xLabels[i]];for(let m=0;m<r.dataset.length;m+=1)c.push([r.dataset[m].values[i]]);a.push(c)}const s=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(a),n=d.createCsvContent(s);d.downloadCsv({csvContent:n,title:t.value.style.title.text||"vue-ui-heatmap"})})}const N=e.ref(!1);function le(l){N.value=l,D.value+=1}function U(){v.value.showTable=!v.value.showTable}function G(){v.value.showTooltip=!v.value.showTooltip}return W({generatePdf:R,generateCsv:H,generateImage:q,toggleTable:U,toggleTooltip:G}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:E,class:e.normalizeClass(`vue-ui-heatmap ${N.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__${x.value}`},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor}`)},[e.createVNode(ae._sfc_main,{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&&S.value?(e.openBlock(),e.createBlock(X.UserOptions,{ref_key:"details",ref:K,key:`user_options_${D.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(Q),isPrinting:e.unref(J),uid:x.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:N.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:E.value,onToggleFullscreen:le,onGeneratePdf:e.unref(R),onGenerateCsv:H,onGenerateImage:e.unref(q),onToggleTable:U,onToggleTooltip:G},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:s,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:s,isFullscreen:n})),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),S.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(d.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":N.value,"vue-data-ui-fulscreen--off":!N.value}),viewBox:`0 0 ${y.value.width} ${y.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($.value,(s,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.temperatures,(i,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.value.left+u.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+u.value.height*n+t.value.style.layout.cells.spacing/2,width:u.value.width-t.value.style.layout.cells.spacing,height:u.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,ve),e.createElementVNode("rect",{x:o.value.left+u.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+u.value.height*n+t.value.style.layout.cells.spacing/2,width:u.value.width-t.value.style.layout.cells.spacing,height:u.value.height-t.value.style.layout.cells.spacing,fill:i.color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,ye),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(d.adaptColorToBackground)(i.color),x:o.value.left+u.value.width*c+u.value.width/2,y:o.value.top+u.value.height*n+u.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(t.value.style.layout.dataLabels.prefix)+e.toDisplayString(Number(i.value.toFixed(t.value.style.layout.cells.value.roundingValue)).toLocaleString())+e.toDisplayString(t.value.style.layout.dataLabels.suffix),9,he)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.temperatures,(i,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.value.left+u.value.width*c,y:o.value.top+u.value.height*n,width:u.value.width,height:u.value.height,fill:"transparent",stroke:"none",onMouseover:m=>te(i,n,o.value.left+u.value.width*c,o.value.top+u.value.height*n),onMouseout:a[0]||(a[0]=m=>{z.value=!1,P.value=void 0,g.value=null,k.value=null})},null,40,pe)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",ge,[e.createElementVNode("text",{"font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:o.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:o.value.top+u.value.height*n+u.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[n]),9,me)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.xLabels,(s,n)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left+u.value.width/2+o.value.width/p.value.xLabels.length*n+t.value.style.layout.dataLabels.xAxis.offsetX,y:o.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6,"text-anchor":"middle","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"},e.toDisplayString(s),9,be))),256))])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("g",xe,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:k.value.x-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,y:k.value.y-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,width:u.value.width-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,height:u.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,ke)])):e.createCommentVNode("",!0),t.value.style.legend.show&&V.value==="right"?(e.openBlock(),e.createElementBlock("g",we,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${x.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Ce),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Ne)],8,_e)]),e.createElementVNode("text",{x:o.value.right+36+18,y:o.value.top-t.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(Number(h.value.toFixed(t.value.style.legend.roundingValue)).toLocaleString()),9,Be),e.createElementVNode("rect",{x:o.value.right+36,y:o.value.top,width:36,height:T.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${x.value})`},null,8,Se),e.createElementVNode("text",{x:o.value.right+36+18,y:o.value.top+T.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(Number(w.value.toFixed(t.value.style.legend.roundingValue)).toLocaleString()),9,Ve),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:t.value.style.backgroundColor,"stroke-width":"2",x1:o.value.right+36,x2:o.value.right+72,y1:_.value,y2:_.value},null,8,$e)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${o.value.right+36},${_.value} ${o.value.right+26},${_.value-8} ${o.value.right+26},${_.value+8}z`},null,8,Ee)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&V.value==="bottom"?(e.openBlock(),e.createElementBlock("g",ze,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",Le,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Te),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Fe)])]),e.createElementVNode("rect",{x:o.value.left,y:o.value.bottom+t.value.style.layout.cells.height,width:y.value.width-o.value.left-t.value.style.layout.padding.right,height:t.value.style.layout.cells.height,rx:t.value.style.legend.scaleBorderRadius>t.value.style.layout.cells.height/2?t.value.style.layout.cells.height/2:t.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,Ae),e.createElementVNode("text",{x:o.value.left,y:o.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"start","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(Number(w.value.toFixed(t.value.style.legend.roundingValue)).toLocaleString()),9,Me),e.createElementVNode("text",{x:o.value.right,y:o.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"end","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(Number(h.value.toFixed(t.value.style.legend.roundingValue)).toLocaleString()),9,Pe),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:t.value.style.backgroundColor,"stroke-width":"2",x1:C.value,x2:C.value,y1:o.value.bottom+t.value.style.layout.cells.height,y2:o.value.bottom+t.value.style.layout.cells.height*2},null,8,De)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${C.value},${o.value.bottom+t.value.style.layout.cells.height} ${C.value-12},${o.value.bottom+t.value.style.layout.cells.height-20} ${C.value+12},${o.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,Ie)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:y.value},void 0,!0)],14,ce)):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ue.default,{key:3,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(se._sfc_main,{show:v.value.showTooltip&&z.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,parent:E.value,content:L.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({...F.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","parent","content","isCustom"]),S.value?(e.openBlock(),e.createBlock(re.default,{key:4,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref: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":O.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:a[1]||(a[1]=s=>v.value.showTable=!1),onKeypress:a[2]||(a[2]=e.withKeys(s=>v.value.showTable=!1,["enter"]))},[e.createVNode(ne.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",Oe,[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",Re,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,(s,n)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},e.toDisplayString(s.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.xLabels,(s,n)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":t.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",He,e.toDisplayString(s),1)],12,qe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.dataset,(i,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",Ge,e.toDisplayString(isNaN(i.values[n])?"-":e.unref(d.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:i.values[n],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,Ue))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,de))}},je=ie._export_sfc(Xe,[["__scopeId","data-v-52af0be2"]]);exports.default=je;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useCssVars as ke, computed as c, ref as g, onMounted as Ce, openBlock as s, createElementBlock as n, normalizeClass as G, normalizeStyle as f, createVNode as q, createCommentVNode as y, createBlock as K, unref as z, createSlots as $e, withCtx as w, renderSlot as _, normalizeProps as J, guardReactiveProps as Q, Fragment as T, renderList as S, createElementVNode as u, toDisplayString as p, withKeys as Le, createTextVNode as ze, nextTick as Te } from "vue";
|
|
2
|
-
import { u as Se, o as Ae, e as de, c as Z, t as Ne, g as Me, H as ee, X as Fe, C as Ve, f as ve, v as Ie, w as Oe, n as Pe, q as Be } from "./index-
|
|
3
|
-
import { _ as Re } from "./Title-
|
|
4
|
-
import { u as Ee, U as Ge } from "./usePrinter-
|
|
5
|
-
import { _ as He } from "./Tooltip-
|
|
6
|
-
import Xe from "./vue-ui-skeleton-
|
|
7
|
-
import Ue from "./BaseIcon-
|
|
8
|
-
import je from "./vue-ui-accordion-
|
|
9
|
-
import { u as ce } from "./useNestedProp-
|
|
2
|
+
import { u as Se, o as Ae, e as de, c as Z, t as Ne, g as Me, H as ee, X as Fe, C as Ve, f as ve, v as Ie, w as Oe, n as Pe, q as Be } from "./index-CGb3gF5A.js";
|
|
3
|
+
import { _ as Re } from "./Title-CfofmWzW.js";
|
|
4
|
+
import { u as Ee, U as Ge } from "./usePrinter-VlAyPtaS.js";
|
|
5
|
+
import { _ as He } from "./Tooltip-cIpD1ChA.js";
|
|
6
|
+
import Xe from "./vue-ui-skeleton-B0udzFdQ.js";
|
|
7
|
+
import Ue from "./BaseIcon-DLlcdgWI.js";
|
|
8
|
+
import je from "./vue-ui-accordion-Br7xhAKF.js";
|
|
9
|
+
import { u as ce } from "./useNestedProp-DCBzUHfz.js";
|
|
10
10
|
import { _ as De } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
11
|
const We = ["id"], Ye = ["xmlns", "viewBox"], qe = ["x", "y", "width", "height", "fill", "stroke", "stroke-width"], Ke = ["x", "y", "width", "height", "fill", "stroke", "stroke-width"], Je = ["font-size", "font-weight", "fill", "x", "y"], Qe = ["x", "y", "width", "height", "onMouseover"], Ze = { key: 0 }, el = ["font-size", "fill", "x", "y", "font-weight"], ll = { key: 0 }, tl = ["x", "y", "font-size", "fill", "font-weight"], al = { key: 1 }, ol = ["x", "y", "width", "height", "stroke", "stroke-width"], sl = { key: 2 }, ul = ["id"], nl = ["stop-color"], il = ["stop-color"], rl = ["x", "y", "font-size", "fill"], dl = ["x", "y", "height", "rx", "fill"], vl = ["x", "y", "font-size", "fill"], cl = ["stroke", "x1", "x2", "y1", "y2"], yl = ["fill", "d"], hl = { key: 3 }, gl = {
|
|
12
12
|
id: "colorScaleHorizontal",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),d=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),d=require("./useNestedProp-CbZUIZc0.cjs"),i=require("./index-DFXgoR1T.cjs"),m={__name:"vue-ui-kpi",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(o){const a=o,{vue_ui_kpi:r}=i.useConfig(),e=t.computed(()=>d.useNestedProp({userConfig:a.config,defaultConfig:r})),v=t.ref((typeof a.dataset=="number",a.dataset)),u=t.ref(e.value.useAnimation?e.value.animationValueStart:v.value);return t.onMounted(()=>{const l=e.value.animationFrames,n=a.dataset/l;function s(){u.value+=n,u.value<a.dataset?requestAnimationFrame(s):u.value=a.dataset}e.value.useAnimation&&(u.value=0,s())}),(l,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(`vue-ui-kpi ${e.value.layoutClass}`),style:t.normalizeStyle(`background:${e.value.backgroundColor}; ${e.value.layoutCss}`)},[t.createElementVNode("div",{class:t.normalizeClass(`vue-ui-kpi-title ${e.value.titleClass}`),style:t.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}`)},[t.renderSlot(l.$slots,"title",{comment:o.dataset}),t.createTextVNode(" "+t.toDisplayString(e.value.title),1)],6),t.renderSlot(l.$slots,"comment-before",{comment:o.dataset}),t.createElementVNode("div",{class:t.normalizeClass(`vue-ui-kpi-value ${e.value.valueClass}`),style:t.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}`)},[t.renderSlot(l.$slots,"value",{comment:o.dataset}),t.createTextVNode(" "+t.toDisplayString(t.unref(i.dataLabel)({p:e.value.prefix,v:u.value,s:e.value.suffix,r:e.value.valueRounding})),1)],6),t.renderSlot(l.$slots,"comment-after",{comment:o.dataset})],6))}};exports.default=m;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed as p, ref as r, onMounted as y, openBlock as C, createElementBlock as g, normalizeClass as s, normalizeStyle as n, createElementVNode as m, renderSlot as u, createTextVNode as f, toDisplayString as d, unref as k } from "vue";
|
|
2
|
-
import { u as F } from "./useNestedProp-
|
|
3
|
-
import { u as b, f as N } from "./index-
|
|
2
|
+
import { u as F } from "./useNestedProp-DCBzUHfz.js";
|
|
3
|
+
import { u as b, f as N } from "./index-CGb3gF5A.js";
|
|
4
4
|
const A = {
|
|
5
5
|
__name: "vue-ui-kpi",
|
|
6
6
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCssVars as h, computed as r, ref as f, openBlock as n, createElementBlock as u, unref as M, createElementVNode as t, normalizeStyle as l, createCommentVNode as a } from "vue";
|
|
2
|
-
import { u as m } from "./useNestedProp-
|
|
3
|
-
import { u as y, X as L } from "./index-
|
|
2
|
+
import { u as m } from "./useNestedProp-DCBzUHfz.js";
|
|
3
|
+
import { u as y, X as L } from "./index-CGb3gF5A.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-CbZUIZc0.cjs"),n=require("./index-DFXgoR1T.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 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./index-BkomIE9L.cjs"),we=require("./Title-Cj_xubjI.cjs"),oe=require("./usePrinter-r6uHYEcR.cjs"),$e=require("./DataTable-ssrNbONo.cjs"),Fe=require("./Tooltip-CdJ5hegk.cjs"),z=require("./BaseIcon-BoKtpbrI.cjs"),Pe=require("./vue-ui-skeleton-JmGp11-u.cjs"),Ne=require("./vue-ui-accordion-SXsobrUt.cjs"),le=require("./useNestedProp-BMxXyPbW.cjs"),Te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ee=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Se={__name:"RecursiveCircles",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null},linkColor:{type:String,default:"#CCCCCC"},stroke:{type:String,default:"#FFFFFF"},strokeHovered:{type:String,default:"#000000"}},emits:["zoom","hover"],setup(r,{emit:g}){const y=r;function u(a){g("zoom",a)}function c(a){g("hover",a)}return e.toRef(y,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(i=>{i.ancestor=a})}),(a,i)=>{const b=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,v=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.polygonPath&&v.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.polygonPath.coordinates,(F,P)=>(e.openBlock(),e.createElementBlock("circle",{cx:F.x,cy:F.y,r:v.circleRadius,fill:`url(#gradient_${v.color})`,stroke:r.hoveredUid&&r.hoveredUid===v.uid?r.strokeHovered:r.stroke,"stroke-width":r.hoveredUid&&r.hoveredUid===v.uid?v.circleRadius/6:v.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(h=>u(v),["stop"]),onMouseover:h=>c(v),onMouseleave:i[0]||(i[0]=h=>c(null))},null,40,Ee))),256)),v.nodes&&v.nodes.length>0?(e.openBlock(),e.createBlock(b,{key:0,dataset:v.nodes,color:r.color,stroke:r.stroke,strokeHovered:r.strokeHovered,hoveredUid:r.hoveredUid,onZoom:u,onHover:c},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Ve=["x1","y1","x2","y2","stroke","stroke-width"],Re=["x1","y1","x2","y2","stroke","stroke-width"],Le={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(r){const g=r;return e.toRef(g,"dataset").value.forEach(u=>{u.nodes&&u.nodes.length>0&&u.nodes.forEach(c=>{c.ancestor=u})}),(u,c)=>{const B=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.polygonPath.coordinates,(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:r.backgroundColor,"stroke-width":a.circleRadius/1.5},null,8,Ve),e.createElementVNode("line",{x1:i.x,y1:i.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:r.color,"stroke-width":a.circleRadius/2},null,8,Re)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.nodes&&a.nodes.length>0?(e.openBlock(),e.createBlock(B,{key:0,dataset:a.nodes,color:r.color,backgroundColor:r.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},ze=["x","y","fill","font-size"],Me={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(r,{emit:g}){const y=r;return e.toRef(y,"dataset").value.forEach(c=>{c.nodes&&c.nodes.length>0&&c.nodes.forEach(B=>{B.ancestor=c})}),(c,B)=>{const a=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.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:r.color,"font-size":i.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(i.name),9,ze))),256)),i.nodes&&i.nodes.length>0?(e.openBlock(),e.createBlock(a,{key:0,dataset:i.nodes,color:r.color,hoveredUid:r.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},De={style:{position:"relative",height:"100%",width:"100%"}},Ue={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(r,{emit:g}){return(y,u)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`position: ${r.isFullscreen?"fixed":"absolute"};bottom:0;right:${r.isFullscreen?"12px":"0"};width:80px;height:80px`),"data-html2canvas-ignore":""},[e.createElementVNode("div",De,[e.createElementVNode("button",{onClick:u[0]||(u[0]=e.withModifiers(c=>g("moveLeft"),["stop"])),style:{position:"absolute",left:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowLeft",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[1]||(u[1]=e.withModifiers(c=>g("moveTop"),["stop"])),style:{position:"absolute",top:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowTop",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[2]||(u[2]=e.withModifiers(c=>g("moveRight"),["stop"])),style:{position:"absolute",right:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowRight",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[3]||(u[3]=e.withModifiers(c=>g("moveBottom"),["stop"])),style:{position:"absolute",bottom:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowBottom",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[4]||(u[4]=e.withModifiers(c=>g("reset"),["stop"])),style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"close",style:{cursor:"pointer"},strokeWidth:2},null,8,["stroke"])])])],4))}},Ie=["id"],Oe=["xmlns","viewBox"],He=["id"],qe=["stop-color"],Ae=["stop-color"],je=["innerHTML"],Ge={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(r,{expose:g}){const y=r,{vue_ui_molecule:u}=p.useConfig(),c=e.computed(()=>!!y.dataset&&y.dataset.length);e.onMounted(()=>{p.objectIsEmpty(y.dataset)&&p.error({componentName:"VueUiMolecule",type:"dataset"})});const B=e.ref(p.createUid()),a=e.ref(null),i=e.ref(!1),b=e.ref(""),v=e.ref(null),F=e.ref(null),P=e.ref(!1),h=e.ref(null),G=e.ref(null),D=e.ref(0),o=e.computed(()=>{const t=le.useNestedProp({userConfig:y.config,defaultConfig:u});return t.theme?{...le.useNestedProp({userConfig:p.themes.vue_ui_molecule[t.theme]||y.config,defaultConfig:t}),customPalette:p.themePalettes[t.theme]||p.palette}:t}),{isPrinting:ne,isImaging:re,generatePdf:X,generateImage:W}=oe.usePrinter({elementId:`cluster_${B.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),ae=e.computed(()=>p.convertCustomPalette(o.value.customPalette)),k=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function Y(t,l=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?Y(t[0].nodes,l+1):l}function se(){const t=Y(y.dataset);let l=100,n=l;for(let d=0;d<t;d+=1)l/=1,n+=l;return{height:n,width:n}}const x=e.ref(se()),U=e.ref(`0 0 ${x.value.width} ${x.value.height}`);function Z(t,l={x:-x.value.width/2.43,y:x.value.height/2},n=x.value.width/1.1,d=24,s=0,m=0,V="#BBBBBB"){if(t&&t.length>0){const A=p.createPolygonPath({plot:l,radius:n,sides:t.length,rotation:s});t.forEach((f,$)=>{const R=A.coordinates[$];let w;if(f.ancestor?f.ancestor.ancestor?w=f.ancestor.color||V:(w=ae.value[m]||p.palette[m]||V,m+=1):w=V,f.polygonPath={coordinates:[R]},f.circleRadius=d,f.color=w,f.uid=p.createUid(),f.nodes&&f.nodes.length>0){const j=!f.ancestor||!f.ancestor.ancestor?m:0;f.nodes=Z(f.nodes,R,n/2.9,d/2.2,s+Math.PI*$/f.nodes.length,j,w)}})}return t}function ie(t){const l=new Set;function n(s){s.forEach(m=>{m.color&&!l.has(m.color)&&l.add(m.color),m.nodes&&m.nodes.length>0&&n(m.nodes)})}n(t);const d={};return Array.from(l).forEach((s,m)=>{d[s]=`gradient_${m}`}),d}const ue=e.computed(()=>ie(C.value)),C=e.computed(()=>Z(y.dataset));function I(){P.value=!1,F.value=null,G.value=null,h.value=null,H({polygonPath:{coordinates:[{x:x.value.width/2,y:x.value.height/2}]},circleRadius:24})}const O=e.ref(null);function H(t){v.value.focus(),e.nextTick(()=>{O.value&&cancelAnimationFrame(O.value);const l=U.value.split(" "),n=parseFloat(l[0]),d=parseFloat(l[1]),s=parseFloat(l[2]),m=parseFloat(l[3]),{x:V,y:A}=t.polygonPath.coordinates[0],{circleRadius:f}=t,$=8.34,R=V-f*$,w=A-f*$,j=f*$*2,ye=f*$*2,ke=Math.sqrt((R-n)**2+(w-d)**2),L=Math.min(1200,Math.max(20,Math.floor(ke/10))),be=(R-n)/L,Ce=(w-d)/L,Be=(j-s)/L,xe=(ye-m)/L;let T=0;function te(){U.value=`${n+be*T} ${d+Ce*T} ${s+Be*T} ${m+xe*T}`,T+=o.value.style.chart.zoom.speed,T<=L&&(O.value=requestAnimationFrame(te))}te()})}function ce(t){F.value===t.uid?I():(F.value=t.uid,G.value=t,h.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},H(t),P.value=t.uid!==C.value[0].uid)}function de(t){if(t.target.nodeName!=="circle")I(),P.value=!1;else return}const q=e.ref(null);function ve(t){q.value={datapoint:t,seriesIndex:-1,series:C.value,config:o.value};const l=o.value.style.chart.tooltip.customFormat;if(p.isFunction(l)&&p.functionReturnsString(()=>l({seriesIndex:-1,datapoint:t,series:C.value,config:o.value})))b.value=l({seriesIndex:-1,datapoint:t,series:C.value,config:o.value});else{let n="";n+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`,t.details&&(n+=`<div style="width:100%;border-top:1px solid ${o.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`),b.value=`<div style="font-family:inherit">${n}</div>`}}const J=e.ref(null),E=e.ref(null);function me(t){J.value=t,t?(i.value=!0,ve(t),E.value=t.uid):(i.value=!1,b.value="",E.value=null)}function M(t){t==="right"&&(h.value.polygonPath.coordinates[0].x+=h.value.circleRadius),t==="left"&&(h.value.polygonPath.coordinates[0].x-=h.value.circleRadius),t==="top"&&(h.value.polygonPath.coordinates[0].y-=h.value.circleRadius),t==="bottom"&&(h.value.polygonPath.coordinates[0].y+=h.value.circleRadius),H(h.value)}function fe(t){const l=[];function n(d){d.forEach(s=>{const m={name:s.name,details:s.details||"-",ancestor:s.ancestor&&s.ancestor.name||"-",color:s.color||""};l.push(m),s.nodes&&s.nodes.length>0&&n(s.nodes,s.name)})}return n(t),l}const pe=e.computed(()=>fe(C.value)),N=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],l=pe.value.map((s,m)=>[{color:s.color,name:s.name},s.details,s.ancestor||""]),n={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint},d=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor];return{head:t,body:l,config:n,colNames:d}});function K(){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),n=p.createCsvContent(l);p.downloadCsv({csvContent:n,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function he(){return C.value}const S=e.ref(!1);function ge(t){S.value=t,D.value+=1}function Q(){k.value.showTable=!k.value.showTable}function _(){k.value.showDataLabels=!k.value.showDataLabels}function ee(){k.value.showTooltip=!k.value.showTooltip}return g({getData:he,generatePdf:X,generateCsv:K,generateImage:W,toggleTable:Q,toggleLabels:_,toggleTooltip:ee}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{onMouseleave:l[7]||(l[7]=n=>{J.value=null,E.value=null}),ref_key:"moleculeChart",ref:v,class:e.normalizeClass(`vue-ui-molecule ${S.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`cluster_${B.value}`},[o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${o.value.style.chart.backgroundColor};`)},[e.createVNode(we._sfc_main,{config:{title:{cy:"molecule-div-title",...o.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),o.value.userOptions.show&&c.value?(e.openBlock(),e.createBlock(oe.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(ne),isImaging:e.unref(re),uid:B.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasLabel:o.value.userOptions.buttons.labels,hasFullscreen:o.value.userOptions.buttons.fullscreen,isTooltip:k.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:v.value,onToggleFullscreen:ge,onGeneratePdf:e.unref(X),onGenerateCsv:K,onGenerateImage:e.unref(W),onToggleTable:Q,onToggleLabels:_,onToggleTooltip:ee},e.createSlots({_:2},[t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:d})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,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(n=>de(n),["stop"]))},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(ue.value),n=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${n}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(p.lightenHexColor)(n,.5)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":n},null,8,Ae)],8,He))),256))]),e.createVNode(Le,{dataset:C.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Se,{dataset:C.value,hoveredUid:E.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:ce,onHover:me},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),k.value.showDataLabels?(e.openBlock(),e.createBlock(Me,{key:0,dataset:C.value,color:o.value.style.chart.color,hoveredUid:E.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:x.value},void 0,!0)],14,Oe)):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createBlock(Ue,{key:`direction_pad_${D.value}`,color:o.value.style.chart.color,isFullscreen:S.value,onMoveLeft:l[1]||(l[1]=n=>M("left")),onMoveRight:l[2]||(l[2]=n=>M("right")),onMoveTop:l[3]||(l[3]=n=>M("top")),onMoveBottom:l[4]||(l[4]=n=>M("bottom")),onReset:l[5]||(l[5]=n=>{I(),P.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Pe.default,{key:4,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Fe._sfc_main,{show:k.value.showTooltip&&i.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,fontSize:o.value.style.chart.tooltip.fontSize,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,parent:v.value,content:b.value,isCustom:o.value.style.chart.tooltip.customFormat&&typeof o.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...q.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...q.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","parent","content","isCustom"]),c.value?(e.openBlock(),e.createBlock(Ne.default,{key:5,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode($e.DataTable,{colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:l[6]||(l[6]=n=>k.value.showTable=!1)},{th:e.withCtx(({th:n})=>[e.createElementVNode("div",{innerHTML:n,style:{display:"flex","align-items":"center"}},null,8,je)]),td:e.withCtx(({td:n})=>[e.createTextVNode(e.toDisplayString(n.name||n),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ie))}},Xe=Te._export_sfc(Ge,[["__scopeId","data-v-a51864fb"]]);exports.default=Xe;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./index-DFXgoR1T.cjs"),we=require("./Title-Ci74YZxW.cjs"),oe=require("./usePrinter-DoFYRZKM.cjs"),$e=require("./DataTable-BSoyXOFT.cjs"),Fe=require("./Tooltip-BNMjZUBc.cjs"),z=require("./BaseIcon-DWx8aSo2.cjs"),Pe=require("./vue-ui-skeleton-CmABeGyu.cjs"),Ne=require("./vue-ui-accordion-P9OYffC3.cjs"),le=require("./useNestedProp-CbZUIZc0.cjs"),Te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ee=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Se={__name:"RecursiveCircles",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null},linkColor:{type:String,default:"#CCCCCC"},stroke:{type:String,default:"#FFFFFF"},strokeHovered:{type:String,default:"#000000"}},emits:["zoom","hover"],setup(r,{emit:g}){const y=r;function u(a){g("zoom",a)}function c(a){g("hover",a)}return e.toRef(y,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(i=>{i.ancestor=a})}),(a,i)=>{const b=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,v=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.polygonPath&&v.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.polygonPath.coordinates,(F,P)=>(e.openBlock(),e.createElementBlock("circle",{cx:F.x,cy:F.y,r:v.circleRadius,fill:`url(#gradient_${v.color})`,stroke:r.hoveredUid&&r.hoveredUid===v.uid?r.strokeHovered:r.stroke,"stroke-width":r.hoveredUid&&r.hoveredUid===v.uid?v.circleRadius/6:v.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(h=>u(v),["stop"]),onMouseover:h=>c(v),onMouseleave:i[0]||(i[0]=h=>c(null))},null,40,Ee))),256)),v.nodes&&v.nodes.length>0?(e.openBlock(),e.createBlock(b,{key:0,dataset:v.nodes,color:r.color,stroke:r.stroke,strokeHovered:r.strokeHovered,hoveredUid:r.hoveredUid,onZoom:u,onHover:c},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Ve=["x1","y1","x2","y2","stroke","stroke-width"],Re=["x1","y1","x2","y2","stroke","stroke-width"],Le={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(r){const g=r;return e.toRef(g,"dataset").value.forEach(u=>{u.nodes&&u.nodes.length>0&&u.nodes.forEach(c=>{c.ancestor=u})}),(u,c)=>{const B=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.polygonPath.coordinates,(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:r.backgroundColor,"stroke-width":a.circleRadius/1.5},null,8,Ve),e.createElementVNode("line",{x1:i.x,y1:i.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:r.color,"stroke-width":a.circleRadius/2},null,8,Re)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.nodes&&a.nodes.length>0?(e.openBlock(),e.createBlock(B,{key:0,dataset:a.nodes,color:r.color,backgroundColor:r.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},ze=["x","y","fill","font-size"],Me={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(r,{emit:g}){const y=r;return e.toRef(y,"dataset").value.forEach(c=>{c.nodes&&c.nodes.length>0&&c.nodes.forEach(B=>{B.ancestor=c})}),(c,B)=>{const a=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.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:r.color,"font-size":i.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(i.name),9,ze))),256)),i.nodes&&i.nodes.length>0?(e.openBlock(),e.createBlock(a,{key:0,dataset:i.nodes,color:r.color,hoveredUid:r.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},De={style:{position:"relative",height:"100%",width:"100%"}},Ue={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(r,{emit:g}){return(y,u)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`position: ${r.isFullscreen?"fixed":"absolute"};bottom:0;right:${r.isFullscreen?"12px":"0"};width:80px;height:80px`),"data-html2canvas-ignore":""},[e.createElementVNode("div",De,[e.createElementVNode("button",{onClick:u[0]||(u[0]=e.withModifiers(c=>g("moveLeft"),["stop"])),style:{position:"absolute",left:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowLeft",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[1]||(u[1]=e.withModifiers(c=>g("moveTop"),["stop"])),style:{position:"absolute",top:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowTop",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[2]||(u[2]=e.withModifiers(c=>g("moveRight"),["stop"])),style:{position:"absolute",right:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowRight",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[3]||(u[3]=e.withModifiers(c=>g("moveBottom"),["stop"])),style:{position:"absolute",bottom:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowBottom",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[4]||(u[4]=e.withModifiers(c=>g("reset"),["stop"])),style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"close",style:{cursor:"pointer"},strokeWidth:2},null,8,["stroke"])])])],4))}},Ie=["id"],Oe=["xmlns","viewBox"],He=["id"],qe=["stop-color"],Ae=["stop-color"],je=["innerHTML"],Ge={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(r,{expose:g}){const y=r,{vue_ui_molecule:u}=p.useConfig(),c=e.computed(()=>!!y.dataset&&y.dataset.length);e.onMounted(()=>{p.objectIsEmpty(y.dataset)&&p.error({componentName:"VueUiMolecule",type:"dataset"})});const B=e.ref(p.createUid()),a=e.ref(null),i=e.ref(!1),b=e.ref(""),v=e.ref(null),F=e.ref(null),P=e.ref(!1),h=e.ref(null),G=e.ref(null),D=e.ref(0),o=e.computed(()=>{const t=le.useNestedProp({userConfig:y.config,defaultConfig:u});return t.theme?{...le.useNestedProp({userConfig:p.themes.vue_ui_molecule[t.theme]||y.config,defaultConfig:t}),customPalette:p.themePalettes[t.theme]||p.palette}:t}),{isPrinting:ne,isImaging:re,generatePdf:X,generateImage:W}=oe.usePrinter({elementId:`cluster_${B.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),ae=e.computed(()=>p.convertCustomPalette(o.value.customPalette)),k=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function Y(t,l=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?Y(t[0].nodes,l+1):l}function se(){const t=Y(y.dataset);let l=100,n=l;for(let d=0;d<t;d+=1)l/=1,n+=l;return{height:n,width:n}}const x=e.ref(se()),U=e.ref(`0 0 ${x.value.width} ${x.value.height}`);function Z(t,l={x:-x.value.width/2.43,y:x.value.height/2},n=x.value.width/1.1,d=24,s=0,m=0,V="#BBBBBB"){if(t&&t.length>0){const A=p.createPolygonPath({plot:l,radius:n,sides:t.length,rotation:s});t.forEach((f,$)=>{const R=A.coordinates[$];let w;if(f.ancestor?f.ancestor.ancestor?w=f.ancestor.color||V:(w=ae.value[m]||p.palette[m]||V,m+=1):w=V,f.polygonPath={coordinates:[R]},f.circleRadius=d,f.color=w,f.uid=p.createUid(),f.nodes&&f.nodes.length>0){const j=!f.ancestor||!f.ancestor.ancestor?m:0;f.nodes=Z(f.nodes,R,n/2.9,d/2.2,s+Math.PI*$/f.nodes.length,j,w)}})}return t}function ie(t){const l=new Set;function n(s){s.forEach(m=>{m.color&&!l.has(m.color)&&l.add(m.color),m.nodes&&m.nodes.length>0&&n(m.nodes)})}n(t);const d={};return Array.from(l).forEach((s,m)=>{d[s]=`gradient_${m}`}),d}const ue=e.computed(()=>ie(C.value)),C=e.computed(()=>Z(y.dataset));function I(){P.value=!1,F.value=null,G.value=null,h.value=null,H({polygonPath:{coordinates:[{x:x.value.width/2,y:x.value.height/2}]},circleRadius:24})}const O=e.ref(null);function H(t){v.value.focus(),e.nextTick(()=>{O.value&&cancelAnimationFrame(O.value);const l=U.value.split(" "),n=parseFloat(l[0]),d=parseFloat(l[1]),s=parseFloat(l[2]),m=parseFloat(l[3]),{x:V,y:A}=t.polygonPath.coordinates[0],{circleRadius:f}=t,$=8.34,R=V-f*$,w=A-f*$,j=f*$*2,ye=f*$*2,ke=Math.sqrt((R-n)**2+(w-d)**2),L=Math.min(1200,Math.max(20,Math.floor(ke/10))),be=(R-n)/L,Ce=(w-d)/L,Be=(j-s)/L,xe=(ye-m)/L;let T=0;function te(){U.value=`${n+be*T} ${d+Ce*T} ${s+Be*T} ${m+xe*T}`,T+=o.value.style.chart.zoom.speed,T<=L&&(O.value=requestAnimationFrame(te))}te()})}function ce(t){F.value===t.uid?I():(F.value=t.uid,G.value=t,h.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},H(t),P.value=t.uid!==C.value[0].uid)}function de(t){if(t.target.nodeName!=="circle")I(),P.value=!1;else return}const q=e.ref(null);function ve(t){q.value={datapoint:t,seriesIndex:-1,series:C.value,config:o.value};const l=o.value.style.chart.tooltip.customFormat;if(p.isFunction(l)&&p.functionReturnsString(()=>l({seriesIndex:-1,datapoint:t,series:C.value,config:o.value})))b.value=l({seriesIndex:-1,datapoint:t,series:C.value,config:o.value});else{let n="";n+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`,t.details&&(n+=`<div style="width:100%;border-top:1px solid ${o.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`),b.value=`<div style="font-family:inherit">${n}</div>`}}const J=e.ref(null),E=e.ref(null);function me(t){J.value=t,t?(i.value=!0,ve(t),E.value=t.uid):(i.value=!1,b.value="",E.value=null)}function M(t){t==="right"&&(h.value.polygonPath.coordinates[0].x+=h.value.circleRadius),t==="left"&&(h.value.polygonPath.coordinates[0].x-=h.value.circleRadius),t==="top"&&(h.value.polygonPath.coordinates[0].y-=h.value.circleRadius),t==="bottom"&&(h.value.polygonPath.coordinates[0].y+=h.value.circleRadius),H(h.value)}function fe(t){const l=[];function n(d){d.forEach(s=>{const m={name:s.name,details:s.details||"-",ancestor:s.ancestor&&s.ancestor.name||"-",color:s.color||""};l.push(m),s.nodes&&s.nodes.length>0&&n(s.nodes,s.name)})}return n(t),l}const pe=e.computed(()=>fe(C.value)),N=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],l=pe.value.map((s,m)=>[{color:s.color,name:s.name},s.details,s.ancestor||""]),n={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint},d=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor];return{head:t,body:l,config:n,colNames:d}});function K(){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),n=p.createCsvContent(l);p.downloadCsv({csvContent:n,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function he(){return C.value}const S=e.ref(!1);function ge(t){S.value=t,D.value+=1}function Q(){k.value.showTable=!k.value.showTable}function _(){k.value.showDataLabels=!k.value.showDataLabels}function ee(){k.value.showTooltip=!k.value.showTooltip}return g({getData:he,generatePdf:X,generateCsv:K,generateImage:W,toggleTable:Q,toggleLabels:_,toggleTooltip:ee}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{onMouseleave:l[7]||(l[7]=n=>{J.value=null,E.value=null}),ref_key:"moleculeChart",ref:v,class:e.normalizeClass(`vue-ui-molecule ${S.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`cluster_${B.value}`},[o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${o.value.style.chart.backgroundColor};`)},[e.createVNode(we._sfc_main,{config:{title:{cy:"molecule-div-title",...o.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),o.value.userOptions.show&&c.value?(e.openBlock(),e.createBlock(oe.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(ne),isImaging:e.unref(re),uid:B.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasLabel:o.value.userOptions.buttons.labels,hasFullscreen:o.value.userOptions.buttons.fullscreen,isTooltip:k.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:v.value,onToggleFullscreen:ge,onGeneratePdf:e.unref(X),onGenerateCsv:K,onGenerateImage:e.unref(W),onToggleTable:Q,onToggleLabels:_,onToggleTooltip:ee},e.createSlots({_:2},[t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:d})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,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(n=>de(n),["stop"]))},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(ue.value),n=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${n}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(p.lightenHexColor)(n,.5)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":n},null,8,Ae)],8,He))),256))]),e.createVNode(Le,{dataset:C.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Se,{dataset:C.value,hoveredUid:E.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:ce,onHover:me},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),k.value.showDataLabels?(e.openBlock(),e.createBlock(Me,{key:0,dataset:C.value,color:o.value.style.chart.color,hoveredUid:E.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:x.value},void 0,!0)],14,Oe)):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createBlock(Ue,{key:`direction_pad_${D.value}`,color:o.value.style.chart.color,isFullscreen:S.value,onMoveLeft:l[1]||(l[1]=n=>M("left")),onMoveRight:l[2]||(l[2]=n=>M("right")),onMoveTop:l[3]||(l[3]=n=>M("top")),onMoveBottom:l[4]||(l[4]=n=>M("bottom")),onReset:l[5]||(l[5]=n=>{I(),P.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Pe.default,{key:4,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Fe._sfc_main,{show:k.value.showTooltip&&i.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,fontSize:o.value.style.chart.tooltip.fontSize,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,parent:v.value,content:b.value,isCustom:o.value.style.chart.tooltip.customFormat&&typeof o.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...q.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...q.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","parent","content","isCustom"]),c.value?(e.openBlock(),e.createBlock(Ne.default,{key:5,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode($e.DataTable,{colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:l[6]||(l[6]=n=>k.value.showTable=!1)},{th:e.withCtx(({th:n})=>[e.createElementVNode("div",{innerHTML:n,style:{display:"flex","align-items":"center"}},null,8,je)]),td:e.withCtx(({td:n})=>[e.createTextVNode(e.toDisplayString(n.name||n),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ie))}},Xe=Te._export_sfc(Ge,[["__scopeId","data-v-a51864fb"]]);exports.default=Xe;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { toRef as ne, resolveComponent as re, openBlock as s, createElementBlock as i, Fragment as y, renderList as U, withModifiers as B, createBlock as I, createCommentVNode as m, createElementVNode as x, toDisplayString as we, normalizeStyle as Z, createVNode as R, computed as z, onMounted as Ve, ref as g, normalizeClass as be, unref as A, createSlots as We, withCtx as $, renderSlot as F, normalizeProps as ae, guardReactiveProps as se, createTextVNode as qe, nextTick as ke } from "vue";
|
|
2
|
-
import { u as Ye, o as Ze, e as Je, c as Ce, t as Ke, a as Qe, p as $e, b as _e, X as et, l as tt, I as ot, n as lt, q as at, v as st, w as nt } from "./index-
|
|
3
|
-
import { _ as rt } from "./Title-
|
|
4
|
-
import { u as it, U as ut } from "./usePrinter-
|
|
5
|
-
import { D as ct } from "./DataTable-
|
|
6
|
-
import { _ as dt } from "./Tooltip-
|
|
7
|
-
import q from "./BaseIcon-
|
|
8
|
-
import vt from "./vue-ui-skeleton-
|
|
9
|
-
import ft from "./vue-ui-accordion-
|
|
10
|
-
import { u as xe } from "./useNestedProp-
|
|
2
|
+
import { u as Ye, o as Ze, e as Je, c as Ce, t as Ke, a as Qe, p as $e, b as _e, X as et, l as tt, I as ot, n as lt, q as at, v as st, w as nt } from "./index-CGb3gF5A.js";
|
|
3
|
+
import { _ as rt } from "./Title-CfofmWzW.js";
|
|
4
|
+
import { u as it, U as ut } from "./usePrinter-VlAyPtaS.js";
|
|
5
|
+
import { D as ct } from "./DataTable-BFsn-W_6.js";
|
|
6
|
+
import { _ as dt } from "./Tooltip-cIpD1ChA.js";
|
|
7
|
+
import q from "./BaseIcon-DLlcdgWI.js";
|
|
8
|
+
import vt from "./vue-ui-skeleton-B0udzFdQ.js";
|
|
9
|
+
import ft from "./vue-ui-accordion-Br7xhAKF.js";
|
|
10
|
+
import { u as xe } from "./useNestedProp-DCBzUHfz.js";
|
|
11
11
|
import { _ as ht } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMouseover"], gt = {
|
|
13
13
|
__name: "RecursiveCircles",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { computed as u, onMounted as se, ref as C, openBlock as r, createElementBlock as p, normalizeClass as W, normalizeStyle as F, createVNode as z, createCommentVNode as i, createBlock as h, unref as d, createSlots as re, withCtx as m, renderSlot as b, normalizeProps as ne, guardReactiveProps as ue, createElementVNode as a, Fragment as D, renderList as G, toDisplayString as $, createTextVNode as E, nextTick as ie } from "vue";
|
|
2
|
-
import { u as de, o as ce, e as U, c as ye, t as ve, I as he, X as me, r as I, s as fe, J as ge, n as ke, q as pe } from "./index-
|
|
3
|
-
import { _ as be } from "./Title-
|
|
4
|
-
import { u as Ce, U as xe } from "./usePrinter-
|
|
5
|
-
import { L as _e } from "./Legend-
|
|
6
|
-
import M from "./BaseIcon-
|
|
7
|
-
import { D as we } from "./DataTable-
|
|
8
|
-
import $e from "./vue-ui-skeleton-
|
|
9
|
-
import Me from "./vue-ui-accordion-
|
|
10
|
-
import { u as H } from "./useNestedProp-
|
|
2
|
+
import { u as de, o as ce, e as U, c as ye, t as ve, I as he, X as me, r as I, s as fe, J as ge, n as ke, q as pe } from "./index-CGb3gF5A.js";
|
|
3
|
+
import { _ as be } from "./Title-CfofmWzW.js";
|
|
4
|
+
import { u as Ce, U as xe } from "./usePrinter-VlAyPtaS.js";
|
|
5
|
+
import { L as _e } from "./Legend-DThjLfzi.js";
|
|
6
|
+
import M from "./BaseIcon-DLlcdgWI.js";
|
|
7
|
+
import { D as we } from "./DataTable-BFsn-W_6.js";
|
|
8
|
+
import $e from "./vue-ui-skeleton-B0udzFdQ.js";
|
|
9
|
+
import Me from "./vue-ui-accordion-Br7xhAKF.js";
|
|
10
|
+
import { u as H } from "./useNestedProp-DCBzUHfz.js";
|
|
11
11
|
import { _ as Ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
const Pe = ["id"], Te = ["xmlns", "viewBox"], Fe = ["id"], Ae = ["stop-color"], Ie = ["stop-color"], Le = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Oe = ["d", "stroke", "stroke-width"], Se = ["stroke"], je = ["fill"], Ve = ["stroke"], Be = ["fill"], We = ["stroke"], ze = ["fill"], De = ["stroke"], Ge = ["fill"], Ee = ["stroke"], Ue = ["fill"], He = ["d", "stroke", "stroke-width", "fill"], Re = ["x1", "y1", "stroke"], Xe = ["cx", "cy", "fill", "stroke"], Ke = ["fill", "stroke"], qe = ["y", "fill", "font-weight"], Je = ["y", "fill"], Ye = ["onClick"], Qe = { style: { "font-weight": "bold" } }, Ze = ["innerHTML"], et = {
|
|
13
13
|
__name: "vue-ui-mood-radar",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-BkomIE9L.cjs"),W=require("./Title-Cj_xubjI.cjs"),M=require("./usePrinter-r6uHYEcR.cjs"),G=require("./Legend-Dl5IYoxK.cjs"),p=require("./BaseIcon-BoKtpbrI.cjs"),U=require("./DataTable-ssrNbONo.cjs"),H=require("./vue-ui-skeleton-JmGp11-u.cjs"),R=require("./vue-ui-accordion-SXsobrUt.cjs"),B=require("./useNestedProp-BMxXyPbW.cjs"),X=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),K=["id"],Y=["xmlns","viewBox"],J=["id"],Q=["stop-color"],Z=["stop-color"],ee=["x1","y1","x2","y2","stroke","stroke-width"],te=["d","stroke","stroke-width"],oe=["stroke"],le=["fill"],ae=["stroke"],re=["fill"],ne=["stroke"],se=["fill"],ue=["stroke"],ie=["fill"],ce=["stroke"],de=["fill"],ye=["d","stroke","stroke-width","fill"],ve=["x1","y1","stroke"],me=["cx","cy","fill","stroke"],he=["fill","stroke"],ke=["y","fill","font-weight"],pe=["y","fill"],fe=["onClick"],ge={style:{"font-weight":"bold"}},be=["innerHTML"],Ce={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(P,{expose:E}){const s=P,{vue_ui_mood_radar:S}=n.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{n.objectIsEmpty(s.dataset)&&n.error({componentName:"VueUiMoodRadar",type:"dataset"})});const h=e.ref(n.createUid()),N=e.ref(null),T=e.ref(null),r=e.ref(null),t=e.computed(()=>{const l=B.useNestedProp({userConfig:s.config,defaultConfig:S});return l.theme?{...B.useNestedProp({userConfig:n.themes.vue_ui_mood_radar[l.theme]||s.config,defaultConfig:l})}:l}),{isPrinting:F,isImaging:A,generatePdf:x,generateImage:w}=M.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),f=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),C=e.computed(()=>n.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function L({centerX:l,centerY:a,apexX:o,apexY:i,proportion:c,key:k,value:q}){return{x:l+(o-l)*c,y:a+(i-a)*c,key:k,value:q}}const I=e.computed(()=>Math.max(...Object.values(s.dataset).map(l=>isNaN(l)?0:l))),v=e.computed(()=>Object.values(s.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),u=e.computed(()=>Object.keys(s.dataset).map((l,a)=>{const o=typeof s.dataset[l]!="number"||isNaN(s.dataset[l])?0:s.dataset[l];return{index:a,key:l,value:o,proportion:o/v.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),_=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(s.dataset[l])&&n.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),C.value.coordinates.map((l,a)=>{const o=L({centerX:d.value.width/2,centerY:d.value.height/2,apexX:l.x,apexY:l.y,proportion:u.value[a].value/I.value,key:u.value[a].key,value:u.value[a].value});return{...l,plots:o,key:u.value[a].key}})):[]),O=e.computed(()=>({cy:"mood-radar-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function z(l){l===r.value?r.value=null:r.value=l}const y=e.computed(()=>{const l=u.value.map(o=>({name:o.key,color:o.color})),a=u.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function V(){e.nextTick(()=>{const l=y.value.head.map((i,c)=>[[i.name],[y.value.body[c]],[isNaN(y.value.body[c]/v.value)?"-":y.value.body[c]/v.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=n.createCsvContent(a);n.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-mood-radar"})})}const g=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',Number(v.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=y.value.head.map((c,k)=>[{color:c.color,name:c.name},y.value.body[k].toFixed(t.value.table.td.roundingValue),isNaN(y.value.body[k]/v.value)?"-":(y.value.body[k]/v.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},i=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:i}});function D(){return u.value}function $(){f.value.showTable=!f.value.showTable}const b=e.ref(!1);function j(l){b.value=l}return E({getData:D,generatePdf:x,generateCsv:V,generateImage:w,toggleTable:$}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-mood-radar ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"moodRadarChart",ref:N,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`)},[e.createVNode(W._sfc_main,{config:{title:{cy:"mood-radar-title",...t.value.style.chart.title},subtitle:{cy:"mood-radar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(M.UserOptions,{key:1,ref_key:"details",ref:T,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(A),uid:h.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,onToggleFullscreen:j,onGeneratePdf:e.unref(x),onGenerateCsv:V,onGenerateImage:e.unref(w),onToggleTable:$},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:i})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:i})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${d.value.width} ${d.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`mood_radar_gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.layout.dataPolygon.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,Q),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(n.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100)}${e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]}`},null,8,Z)],8,J)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.width/2,y1:d.value.height/2,x2:o.x,y2:o.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,ee))),256)),e.createElementVNode("path",{d:C.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,te),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[5],"stroke-width":"1","stroke-linecap":"round",d:"M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22"},null,8,oe),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=o=>r.value=5),onMouseleave:a[1]||(a[1]=o=>r.value=null),cx:"128",cy:"25",r:"20",fill:r.value===5?t.value.style.chart.layout.smileys.colors[5]+"33":"transparent"},null,40,le),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[4],"stroke-width":"1","stroke-linecap":"round",d:"M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92"},null,8,ae),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=o=>r.value=4),onMouseleave:a[3]||(a[3]=o=>r.value=null),cx:"227",cy:"95.5",r:"20",fill:r.value===4?t.value.style.chart.layout.smileys.colors[4]+"33":"transparent"},null,40,re),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[3],"stroke-width":"1","stroke-linecap":"round",d:"M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215"},null,8,ne),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=o=>r.value=3),onMouseleave:a[5]||(a[5]=o=>r.value=null),cx:"190",cy:"213.5",r:"20",fill:r.value===3?t.value.style.chart.layout.smileys.colors[3]+"33":"transparent"},null,40,se),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[2],"stroke-width":"1","stroke-linecap":"round",d:"M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210"},null,8,ue),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=o=>r.value=2),onMouseleave:a[7]||(a[7]=o=>r.value=null),cx:"65",cy:"213.5",r:"20",fill:r.value===2?t.value.style.chart.layout.smileys.colors[2]+"33":"transparent"},null,40,ie),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[1],"stroke-width":"1","stroke-linecap":"round",d:"M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93"},null,8,ce),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=o=>r.value=1),onMouseleave:a[9]||(a[9]=o=>r.value=null),cx:"29",cy:"95.5",r:"20",fill:r.value===1?t.value.style.chart.layout.smileys.colors[1]+"33":"transparent"},null,40,de),e.createElementVNode("path",{d:e.unref(n.makePath)(_.value.map(o=>o.plots)),stroke:t.value.style.chart.layout.dataPolygon.stroke,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.chart.layout.dataPolygon.gradient.show?`url(#mood_radar_gradient_${h.value})`:t.value.style.chart.layout.dataPolygon.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,ye),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value.map(o=>o.plots),(o,i)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${r.value==o.key?"1":"0"}`)},[e.createElementVNode("line",{x1:o.x,y1:o.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,ve),e.createElementVNode("circle",{cx:o.x,cy:o.y,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,me),e.createElementVNode("circle",{cx:128,cy:128,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,he),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?145:120,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle","font-weight":t.value.style.chart.layout.dataLabel.bold?"bold":"normal"},e.toDisplayString(Number(o.value.toFixed(t.value.style.chart.layout.dataLabel.roundingValue)).toLocaleString()),9,ke),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(Number((o.value/v.value*100).toFixed(t.value.style.chart.layout.dataLabel.roundingPercentage)).toLocaleString())+"%) ",9,pe)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,Y)):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(H.default,{key:3,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:"#CCCCCC"},shapes:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(G.Legend,{key:4,legendSet:u.value,config:O.value,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:i})=>[e.createElementVNode("div",{onClick:()=>z(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(p.default,{key:0,strokeWidth:1,name:"moodSad",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==2?(e.openBlock(),e.createBlock(p.default,{key:1,strokeWidth:1,name:"moodFlat",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==3?(e.openBlock(),e.createBlock(p.default,{key:2,strokeWidth:1,name:"moodNeutral",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==4?(e.openBlock(),e.createBlock(p.default,{key:3,strokeWidth:1,name:"smiley",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==5?(e.openBlock(),e.createBlock(p.default,{key:4,strokeWidth:1,name:"moodHappy",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),e.createElementVNode("span",ge,e.toDisplayString(o.value),1),e.createTextVNode(" ("+e.toDisplayString((isNaN(o.proportion)?0:o.proportion*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1)],8,fe)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:u.value},void 0,!0),m.value?(e.openBlock(),e.createBlock(R.default,{key:5,hideDetails:"",config:{open:f.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(U.DataTable,{colNames:g.value.colNames,head:g.value.head,body:g.value.body,config:g.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[10]||(a[10]=o=>f.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,be)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,K))}},Ne=X._export_sfc(Ce,[["__scopeId","data-v-81cc3908"]]);exports.default=Ne;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-DFXgoR1T.cjs"),W=require("./Title-Ci74YZxW.cjs"),M=require("./usePrinter-DoFYRZKM.cjs"),G=require("./Legend-DZhpxKg4.cjs"),p=require("./BaseIcon-DWx8aSo2.cjs"),U=require("./DataTable-BSoyXOFT.cjs"),H=require("./vue-ui-skeleton-CmABeGyu.cjs"),R=require("./vue-ui-accordion-P9OYffC3.cjs"),B=require("./useNestedProp-CbZUIZc0.cjs"),X=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),K=["id"],Y=["xmlns","viewBox"],J=["id"],Q=["stop-color"],Z=["stop-color"],ee=["x1","y1","x2","y2","stroke","stroke-width"],te=["d","stroke","stroke-width"],oe=["stroke"],le=["fill"],ae=["stroke"],re=["fill"],ne=["stroke"],se=["fill"],ue=["stroke"],ie=["fill"],ce=["stroke"],de=["fill"],ye=["d","stroke","stroke-width","fill"],ve=["x1","y1","stroke"],me=["cx","cy","fill","stroke"],he=["fill","stroke"],ke=["y","fill","font-weight"],pe=["y","fill"],fe=["onClick"],ge={style:{"font-weight":"bold"}},be=["innerHTML"],Ce={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(P,{expose:E}){const s=P,{vue_ui_mood_radar:S}=n.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{n.objectIsEmpty(s.dataset)&&n.error({componentName:"VueUiMoodRadar",type:"dataset"})});const h=e.ref(n.createUid()),N=e.ref(null),T=e.ref(null),r=e.ref(null),t=e.computed(()=>{const l=B.useNestedProp({userConfig:s.config,defaultConfig:S});return l.theme?{...B.useNestedProp({userConfig:n.themes.vue_ui_mood_radar[l.theme]||s.config,defaultConfig:l})}:l}),{isPrinting:F,isImaging:A,generatePdf:x,generateImage:w}=M.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),f=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),C=e.computed(()=>n.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function L({centerX:l,centerY:a,apexX:o,apexY:i,proportion:c,key:k,value:q}){return{x:l+(o-l)*c,y:a+(i-a)*c,key:k,value:q}}const I=e.computed(()=>Math.max(...Object.values(s.dataset).map(l=>isNaN(l)?0:l))),v=e.computed(()=>Object.values(s.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),u=e.computed(()=>Object.keys(s.dataset).map((l,a)=>{const o=typeof s.dataset[l]!="number"||isNaN(s.dataset[l])?0:s.dataset[l];return{index:a,key:l,value:o,proportion:o/v.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),_=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(s.dataset[l])&&n.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),C.value.coordinates.map((l,a)=>{const o=L({centerX:d.value.width/2,centerY:d.value.height/2,apexX:l.x,apexY:l.y,proportion:u.value[a].value/I.value,key:u.value[a].key,value:u.value[a].value});return{...l,plots:o,key:u.value[a].key}})):[]),O=e.computed(()=>({cy:"mood-radar-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function z(l){l===r.value?r.value=null:r.value=l}const y=e.computed(()=>{const l=u.value.map(o=>({name:o.key,color:o.color})),a=u.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function V(){e.nextTick(()=>{const l=y.value.head.map((i,c)=>[[i.name],[y.value.body[c]],[isNaN(y.value.body[c]/v.value)?"-":y.value.body[c]/v.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=n.createCsvContent(a);n.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-mood-radar"})})}const g=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',Number(v.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=y.value.head.map((c,k)=>[{color:c.color,name:c.name},y.value.body[k].toFixed(t.value.table.td.roundingValue),isNaN(y.value.body[k]/v.value)?"-":(y.value.body[k]/v.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},i=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:i}});function D(){return u.value}function $(){f.value.showTable=!f.value.showTable}const b=e.ref(!1);function j(l){b.value=l}return E({getData:D,generatePdf:x,generateCsv:V,generateImage:w,toggleTable:$}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-mood-radar ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"moodRadarChart",ref:N,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`)},[e.createVNode(W._sfc_main,{config:{title:{cy:"mood-radar-title",...t.value.style.chart.title},subtitle:{cy:"mood-radar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(M.UserOptions,{key:1,ref_key:"details",ref:T,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(A),uid:h.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,onToggleFullscreen:j,onGeneratePdf:e.unref(x),onGenerateCsv:V,onGenerateImage:e.unref(w),onToggleTable:$},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:i})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:i})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${d.value.width} ${d.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`mood_radar_gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.layout.dataPolygon.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,Q),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(n.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100)}${e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]}`},null,8,Z)],8,J)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.width/2,y1:d.value.height/2,x2:o.x,y2:o.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,ee))),256)),e.createElementVNode("path",{d:C.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,te),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[5],"stroke-width":"1","stroke-linecap":"round",d:"M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22"},null,8,oe),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=o=>r.value=5),onMouseleave:a[1]||(a[1]=o=>r.value=null),cx:"128",cy:"25",r:"20",fill:r.value===5?t.value.style.chart.layout.smileys.colors[5]+"33":"transparent"},null,40,le),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[4],"stroke-width":"1","stroke-linecap":"round",d:"M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92"},null,8,ae),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=o=>r.value=4),onMouseleave:a[3]||(a[3]=o=>r.value=null),cx:"227",cy:"95.5",r:"20",fill:r.value===4?t.value.style.chart.layout.smileys.colors[4]+"33":"transparent"},null,40,re),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[3],"stroke-width":"1","stroke-linecap":"round",d:"M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215"},null,8,ne),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=o=>r.value=3),onMouseleave:a[5]||(a[5]=o=>r.value=null),cx:"190",cy:"213.5",r:"20",fill:r.value===3?t.value.style.chart.layout.smileys.colors[3]+"33":"transparent"},null,40,se),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[2],"stroke-width":"1","stroke-linecap":"round",d:"M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210"},null,8,ue),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=o=>r.value=2),onMouseleave:a[7]||(a[7]=o=>r.value=null),cx:"65",cy:"213.5",r:"20",fill:r.value===2?t.value.style.chart.layout.smileys.colors[2]+"33":"transparent"},null,40,ie),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[1],"stroke-width":"1","stroke-linecap":"round",d:"M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93"},null,8,ce),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=o=>r.value=1),onMouseleave:a[9]||(a[9]=o=>r.value=null),cx:"29",cy:"95.5",r:"20",fill:r.value===1?t.value.style.chart.layout.smileys.colors[1]+"33":"transparent"},null,40,de),e.createElementVNode("path",{d:e.unref(n.makePath)(_.value.map(o=>o.plots)),stroke:t.value.style.chart.layout.dataPolygon.stroke,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.chart.layout.dataPolygon.gradient.show?`url(#mood_radar_gradient_${h.value})`:t.value.style.chart.layout.dataPolygon.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,ye),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value.map(o=>o.plots),(o,i)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${r.value==o.key?"1":"0"}`)},[e.createElementVNode("line",{x1:o.x,y1:o.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,ve),e.createElementVNode("circle",{cx:o.x,cy:o.y,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,me),e.createElementVNode("circle",{cx:128,cy:128,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,he),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?145:120,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle","font-weight":t.value.style.chart.layout.dataLabel.bold?"bold":"normal"},e.toDisplayString(Number(o.value.toFixed(t.value.style.chart.layout.dataLabel.roundingValue)).toLocaleString()),9,ke),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(Number((o.value/v.value*100).toFixed(t.value.style.chart.layout.dataLabel.roundingPercentage)).toLocaleString())+"%) ",9,pe)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,Y)):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(H.default,{key:3,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:"#CCCCCC"},shapes:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(G.Legend,{key:4,legendSet:u.value,config:O.value,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:i})=>[e.createElementVNode("div",{onClick:()=>z(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(p.default,{key:0,strokeWidth:1,name:"moodSad",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==2?(e.openBlock(),e.createBlock(p.default,{key:1,strokeWidth:1,name:"moodFlat",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==3?(e.openBlock(),e.createBlock(p.default,{key:2,strokeWidth:1,name:"moodNeutral",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==4?(e.openBlock(),e.createBlock(p.default,{key:3,strokeWidth:1,name:"smiley",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==5?(e.openBlock(),e.createBlock(p.default,{key:4,strokeWidth:1,name:"moodHappy",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),e.createElementVNode("span",ge,e.toDisplayString(o.value),1),e.createTextVNode(" ("+e.toDisplayString((isNaN(o.proportion)?0:o.proportion*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1)],8,fe)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:u.value},void 0,!0),m.value?(e.openBlock(),e.createBlock(R.default,{key:5,hideDetails:"",config:{open:f.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(U.DataTable,{colNames:g.value.colNames,head:g.value.head,body:g.value.body,config:g.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[10]||(a[10]=o=>f.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,be)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,K))}},Ne=X._export_sfc(Ce,[["__scopeId","data-v-81cc3908"]]);exports.default=Ne;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { computed as k, ref as d, onMounted as Me, onBeforeUnmount as Be, watch as Ue, openBlock as u, createElementBlock as n, normalizeClass as O, normalizeStyle as le, createVNode as ae, createCommentVNode as y, createBlock as W, unref as c, createSlots as Ee, withCtx as m, renderSlot as C, normalizeProps as oe, guardReactiveProps as se, createElementVNode as b, Fragment as x, renderList as $, toDisplayString as N, createTextVNode as H, nextTick as Re, pushScopeId as Ge, popScopeId as Xe } from "vue";
|
|
2
|
-
import { u as Ye, c as We, t as He, a as qe, p as q, o as je, e as P, b as Je, d as Ke, m as ke, f as T, X as Qe, E as Ze, j as A, k as ue, v as $e, w as et, n as tt, q as lt } from "./index-
|
|
2
|
+
import { u as Ye, c as We, t as He, a as qe, p as q, o as je, e as P, b as Je, d as Ke, m as ke, f as T, X as Qe, E as Ze, j as A, k as ue, v as $e, w as et, n as tt, q as lt } from "./index-CGb3gF5A.js";
|
|
3
3
|
import { t as at, u as ot } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as st } from "./Title-
|
|
5
|
-
import { u as ut, U as nt } from "./usePrinter-
|
|
6
|
-
import { D as rt } from "./DataTable-
|
|
7
|
-
import { _ as it } from "./Tooltip-
|
|
8
|
-
import { L as dt } from "./Legend-
|
|
9
|
-
import ct from "./vue-ui-skeleton-
|
|
10
|
-
import vt from "./vue-ui-accordion-
|
|
11
|
-
import { u as Ce } from "./useNestedProp-
|
|
4
|
+
import { _ as st } from "./Title-CfofmWzW.js";
|
|
5
|
+
import { u as ut, U as nt } from "./usePrinter-VlAyPtaS.js";
|
|
6
|
+
import { D as rt } from "./DataTable-BFsn-W_6.js";
|
|
7
|
+
import { _ as it } from "./Tooltip-cIpD1ChA.js";
|
|
8
|
+
import { L as dt } from "./Legend-DThjLfzi.js";
|
|
9
|
+
import ct from "./vue-ui-skeleton-B0udzFdQ.js";
|
|
10
|
+
import vt from "./vue-ui-accordion-Br7xhAKF.js";
|
|
11
|
+
import { u as Ce } from "./useNestedProp-DCBzUHfz.js";
|
|
12
12
|
import { _ as ht } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
const ne = (V) => (Ge("data-v-fbefb973"), V = V(), Xe(), V), ft = ["id"], yt = ["xmlns", "viewBox"], bt = ["id", "fr"], pt = /* @__PURE__ */ ne(() => /* @__PURE__ */ b("stop", {
|
|
14
14
|
offset: "0%",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DFXgoR1T.cjs"),te=require("./useResponsive-B3TrDDIG.cjs"),ye=require("./Title-Ci74YZxW.cjs"),le=require("./usePrinter-DoFYRZKM.cjs"),me=require("./DataTable-BSoyXOFT.cjs"),be=require("./Tooltip-BNMjZUBc.cjs"),ge=require("./Legend-DZhpxKg4.cjs"),ke=require("./vue-ui-skeleton-CmABeGyu.cjs"),Ce=require("./vue-ui-accordion-P9OYffC3.cjs"),ae=require("./useNestedProp-CbZUIZc0.cjs"),xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A=w=>(e.pushScopeId("data-v-fbefb973"),w=w(),e.popScopeId(),w),we=["id"],Le=["xmlns","viewBox"],Be=["id","fr"],_e=A(()=>e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Ne=["offset","stop-opacity"],$e=A(()=>e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Se=["id"],Ee=["id"],Fe=A(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Ve=["id"],Te=["flood-color"],ze=["cx","cy","r","fill","filter"],De=["d","fill","stroke","stroke-width","filter"],Oe={key:0},Pe=["d","fill"],Ie={key:1},Ae=["x","y","font-size","font-weight","fill"],Me={key:2},Re=["filter"],Ue=["text-anchor","x","y","fill","font-size","font-weight"],qe=["text-anchor","x","y","fill","font-size","font-weight"],Xe=["text-anchor","x","y","fill","font-size","font-weight"],Ge=["d","fill","onMouseenter","onClick"],Ye={key:0,class:"vue-ui-nested-donuts-legend-title"},We=["onClick"],He=["innerHTML"],je={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(w,{expose:oe,emit:M}){const C=w,{vue_ui_nested_donuts:ne}=r.useConfig(),N=e.computed(()=>!!C.dataset&&C.dataset.length),f=e.ref(r.createUid()),V=e.ref(!1),T=e.ref(""),re=e.ref(null),R=e.ref(0),L=e.ref(null),U=e.ref(null),z=e.ref(null),B=e.ref(!1);function se(l){B.value=l,R.value+=1}const t=e.computed(()=>{const l=ae.useNestedProp({userConfig:C.config,defaultConfig:ne});return l.theme?{...ae.useNestedProp({userConfig:r.themes.vue_ui_nested_donuts[l.theme]||C.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),$=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(C.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=te.throttle(()=>{const{width:s,height:a}=te.useResponsive({chart:L.value,title:t.value.style.chart.title.text?U.value:null,legend:t.value.style.chart.legend.show?z.value:null});c.value.width=s,c.value.height=a});$.value=new ResizeObserver(l),$.value.observe(L.value.parentNode)}}),e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:ue,isImaging:ie,generatePdf:q,generateImage:X}=le.usePrinter({elementId:`nested_donuts_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts"}),ce=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),p=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),c=e.ref({height:512,width:512});function de({datapoint:l,index:s}){M("selectDatapoint",{datapoint:l,index:s})}const v=e.ref([]),m=e.computed(()=>(C.dataset.forEach((l,s)=>{[null,void 0].includes(l.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:s}),[null,void 0].includes(l.series)?r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:s}):l.series.length===0?r.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${s}`}):l.series.forEach((a,o)=>{[null,void 0].includes(a.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:o,key:"serie"}),[null,void 0].includes(a.values)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:o,key:"serie"})})}),C.dataset.map((l,s)=>({...l,total:l.series.filter(a=>!v.value.includes(a.id)).map(a=>(a.values||[]).reduce((o,n)=>o+n,0)).reduce((a,o)=>a+o,0),datasetIndex:s,id:`${f.value}_${s}`,series:l.series.map((a,o)=>({name:a.name,arcOf:l.name,arcOfId:`${f.value}_${s}`,id:`${f.value}_${s}_${o}`,seriesIndex:o,datasetIndex:s,color:r.convertColorToHex(a.color)||ce.value[o]||r.palette[o]||r.palette[o%r.palette.length],value:(a.values||[]).reduce((n,u)=>n+u,0),absoluteValues:a.values||[]}))}))));e.ref(t.value.style.chart.layout.donut.strokeWidth);const b=e.computed(()=>Math.min(c.value.height,c.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),G=e.computed(()=>[...m.value].map((l,s)=>{const a=l.series.filter(o=>!v.value.includes(o.id)).map(o=>o.value).reduce((o,n)=>o+n,0);return{...l,total:a,series:l.series.filter(o=>!v.value.includes(o.id)).map(o=>({...o,proportion:o.value/a}))}}));function ve(l,s,a){let o=0;for(let n=0;n<l.length;n+=1)a.includes(l[n])&&(o+=1);return o<s}const d=e.ref(G.value);e.watch(()=>G.value,l=>d.value=l);const Y=e.ref(null),W=e.ref(null);function D(l){M("selectLegend",l);const s=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),a=d.value.flatMap(i=>i.series).find(i=>i.id===l.id);let n=a?a.value:0;const u=m.value.find(i=>i.id===s.arcOfId).series.map(i=>i.id),h=ve(u,u.length-1,v.value);if(v.value.includes(l.id)){let i=function(){n>s.value?(cancelAnimationFrame(Y.value),d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(n+=s.value*.025,d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:n}:g)})),Y.value=requestAnimationFrame(i))};v.value=v.value.filter(y=>y!==l.id),i()}else if(h){let i=function(){n<.1?(cancelAnimationFrame(W.value),v.value.push(l.id),d.value=d.value.map((y,g)=>({...y,series:y.series.map(x=>x.id===l.id?{...x,value:0}:x)}))):(n/=1.1,d.value=d.value.map((y,g)=>({...y,series:y.series.map(x=>x.id===l.id?{...x,value:n}:x)})),W.value=requestAnimationFrame(i))};i()}}const _=e.computed(()=>d.value.map((l,s)=>{const a=s*b.value/m.value.length;return{...l,radius:b.value-a,donut:r.makeDonut({series:l.series},c.value.width/2,c.value.height/2,b.value-a,b.value-a,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)}})),H=e.computed(()=>[...m.value].map((l,s)=>{const a=s*b.value/m.value.length;return{sizeRatio:a,donut:r.makeDonut({series:[{value:1}]},c.value.width/2,c.value.height/2,b.value-a,b.value-a,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),j=e.ref(null),S=e.ref(null),E=e.ref(null),O=e.ref(null);function fe({datapoint:l,_relativeIndex:s,seriesIndex:a}){j.value=l.arcOfId,S.value=l.id,E.value=a,O.value={datapoint:l,seriesIndex:a,series:d.value,config:t.value};const o=t.value.style.chart.tooltip.customFormat;if(r.isFunction(o)&&r.functionReturnsString(()=>o({seriesIndex:a,datapoint:l,series:d.value,config:t.value})))T.value=o({seriesIndex:a,datapoint:l,series:d.value,config:t.value});else{let n="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&v.value.length===0){const u=d.value.map(h=>h.series.find(i=>i.seriesIndex===a));u.forEach((h,i)=>{if(!h)return"";n+=`
|
|
2
2
|
<div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${i<u.length-1?`border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor}`:""}">
|
|
3
3
|
<div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
|
|
4
4
|
<svg viewBox="0 0 20 20" height="${t.value.style.chart.tooltip.fontSize}" width="${t.value.style.chart.tooltip.fontSize}">
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { computed as d, ref as n, onMounted as _e, onBeforeUnmount as Oe, watch as Pe, openBlock as u, createElementBlock as i, normalizeClass as A, normalizeStyle as D, createVNode as E, createCommentVNode as b, createBlock as L, unref as x, createSlots as Fe, withCtx as v, renderSlot as g, normalizeProps as H, guardReactiveProps as W, Fragment as F, renderList as I, createElementVNode as C, toDisplayString as T, createTextVNode as Ie, nextTick as Se } from "vue";
|
|
2
|
-
import { u as Me, c as Ne, t as Re, a as Ae, p as re, b as De, o as Le, e as j, d as ze, X as Be, v as ue, n as Ve, q as Xe, w as Ge, f as ne } from "./index-
|
|
2
|
+
import { u as Me, c as Ne, t as Re, a as Ae, p as re, b as De, o as Le, e as j, d as ze, X as Be, v as ue, n as Ve, q as Xe, w as Ge, f as ne } from "./index-CGb3gF5A.js";
|
|
3
3
|
import { t as Ue, u as Ye } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as Ee } from "./Title-
|
|
5
|
-
import { u as He, U as We } from "./usePrinter-
|
|
6
|
-
import { L as je } from "./Legend-
|
|
7
|
-
import { D as qe } from "./DataTable-
|
|
8
|
-
import { _ as Je } from "./Tooltip-
|
|
9
|
-
import Ke from "./vue-ui-skeleton-
|
|
10
|
-
import Qe from "./vue-ui-accordion-
|
|
11
|
-
import { u as se } from "./useNestedProp-
|
|
4
|
+
import { _ as Ee } from "./Title-CfofmWzW.js";
|
|
5
|
+
import { u as He, U as We } from "./usePrinter-VlAyPtaS.js";
|
|
6
|
+
import { L as je } from "./Legend-DThjLfzi.js";
|
|
7
|
+
import { D as qe } from "./DataTable-BFsn-W_6.js";
|
|
8
|
+
import { _ as Je } from "./Tooltip-cIpD1ChA.js";
|
|
9
|
+
import Ke from "./vue-ui-skeleton-B0udzFdQ.js";
|
|
10
|
+
import Qe from "./vue-ui-accordion-Br7xhAKF.js";
|
|
11
|
+
import { u as se } from "./useNestedProp-DCBzUHfz.js";
|
|
12
12
|
import { _ as Ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
const et = ["id"], tt = ["xmlns", "viewBox"], at = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], lt = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], ot = ["id"], rt = ["stdDeviation"], ut = ["filter"], nt = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], st = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset", "onMouseenter"], it = { key: 1 }, ct = ["onMouseenter"], dt = ["x", "y", "font-size", "fill", "font-weight"], vt = ["onClick"], ht = ["innerHTML"], gt = {
|
|
14
14
|
__name: "vue-ui-onion",
|