vue-data-ui 2.3.71 → 2.3.73
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-Oo-m4d4_.cjs → Arrow-B8nZeqNJ.cjs} +1 -1
- package/dist/{Arrow-KrMJ-mLA.js → Arrow-B9ZuNkP-.js} +1 -1
- package/dist/{BaseIcon-r6sTvN4e.cjs → BaseIcon-CXbZK6D-.cjs} +1 -1
- package/dist/{BaseIcon-Dn--aRqh.js → BaseIcon-_V_BEdy8.js} +1 -1
- package/dist/{DataTable-BwSXMffc.js → DataTable-BOdJVZzF.js} +2 -2
- package/dist/{DataTable-jPEnygiD.cjs → DataTable-wmKwMbsJ.cjs} +1 -1
- package/dist/{Legend-BdmTE8wl.js → Legend-CHd5QFPM.js} +1 -1
- package/dist/{Legend-DYpbZAKy.cjs → Legend-DdndVhHV.cjs} +1 -1
- package/dist/{Shape-DwABde7t.cjs → Shape-CLRxBhyM.cjs} +1 -1
- package/dist/{Shape-ttH7p_HL.js → Shape-DNbJlwSU.js} +1 -1
- package/dist/{Slicer-jPgByZe4.js → Slicer-8Gg45iGX.js} +2 -2
- package/dist/{Slicer-C2YiwjYs.cjs → Slicer-Dts-BToH.cjs} +1 -1
- package/dist/{Title-NxuZWg-H.cjs → Title-CujodUjt.cjs} +1 -1
- package/dist/{Title-CJpYIMsB.js → Title-Ngy9HNqO.js} +1 -1
- package/dist/{Tooltip-CPnJc4M4.js → Tooltip-BCtg7xYX.js} +1 -1
- package/dist/{Tooltip-D5XlXHnd.cjs → Tooltip-DsmWz8gF.cjs} +1 -1
- package/dist/{index-tBV7ojX4.js → index-Dvs5Ra-u.js} +1 -1
- package/dist/{index-DC98WFA9.cjs → index-sFjJ2dIj.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +7 -7
- package/dist/types/vue-data-ui.d.ts +7 -7
- package/dist/{useNestedProp-DLR5FOhw.js → useNestedProp-UohhCyBz.js} +1 -1
- package/dist/{useNestedProp-DLm4WQqO.cjs → useNestedProp-ir0jEo5M.cjs} +1 -1
- package/dist/{usePrinter-BiDlcasQ.js → usePrinter-B8-keRMa.js} +1 -1
- package/dist/{usePrinter-DOwo3slV.cjs → usePrinter-DSMMs1w9.cjs} +1 -1
- package/dist/{vue-data-ui-YqFsylnG.js → vue-data-ui-Bgo6YUhl.js} +57 -57
- package/dist/{vue-data-ui-CO5NlA8S.cjs → vue-data-ui-NvV5qa--.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-B7UPDxaJ.js → vue-ui-3d-bar-DckNIYgA.js} +7 -7
- package/dist/{vue-ui-3d-bar-C6QkJ9TS.cjs → vue-ui-3d-bar-DhzN0gd4.cjs} +1 -1
- package/dist/{vue-ui-accordion-3GMC-9lb.js → vue-ui-accordion-C-qAry7P.js} +3 -3
- package/dist/{vue-ui-accordion-Bw-stCgX.cjs → vue-ui-accordion-RuCkf_li.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-EI3_8UiR.js → vue-ui-age-pyramid-CamjaXUw.js} +8 -8
- package/dist/{vue-ui-age-pyramid-d6zQr_wc.cjs → vue-ui-age-pyramid-CfUUEeKt.cjs} +1 -1
- package/dist/{vue-ui-annotator-D5woo_-l.cjs → vue-ui-annotator-D0kYZ56C.cjs} +1 -1
- package/dist/{vue-ui-annotator-BrDoAda_.js → vue-ui-annotator-DMmdqorj.js} +1 -1
- package/dist/{vue-ui-candlestick-DXTTu6k1.cjs → vue-ui-candlestick-DJIJnnI_.cjs} +1 -1
- package/dist/{vue-ui-candlestick-DF6Jhe1t.js → vue-ui-candlestick-DRi8lDTn.js} +9 -9
- package/dist/{vue-ui-carousel-table-DNiD6oCm.js → vue-ui-carousel-table-u5OoOMr1.js} +4 -4
- package/dist/{vue-ui-carousel-table-CMTquEa-.cjs → vue-ui-carousel-table-uYt1zVjx.cjs} +1 -1
- package/dist/{vue-ui-chestnut-CiYsTJB1.cjs → vue-ui-chestnut-CG5krVO-.cjs} +1 -1
- package/dist/{vue-ui-chestnut-DF9jomRx.js → vue-ui-chestnut-D5a4OH1D.js} +6 -6
- package/dist/{vue-ui-cursor-BH1rYbdI.js → vue-ui-cursor-Bp_PHbz4.js} +2 -2
- package/dist/{vue-ui-cursor-BghIGRgY.cjs → vue-ui-cursor-DpBsZNEE.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BD6fnLMr.cjs → vue-ui-dashboard--kjU0uMc.cjs} +1 -1
- package/dist/{vue-ui-dashboard-PDxIaYy1.js → vue-ui-dashboard-BwBYH8V_.js} +2 -2
- package/dist/{vue-ui-digits-BLChn-JX.cjs → vue-ui-digits-CIV9J3SW.cjs} +1 -1
- package/dist/{vue-ui-digits-PP7pTKNs.js → vue-ui-digits-t2G4B6uD.js} +2 -2
- package/dist/{vue-ui-donut-Cfbb9d7V.js → vue-ui-donut-BTug2gsP.js} +9 -9
- package/dist/{vue-ui-donut-BR1c-VMi.cjs → vue-ui-donut-D6SrEIEJ.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-fmJj_9qP.cjs → vue-ui-donut-evolution-Cb45erSA.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-BnuxOElp.js → vue-ui-donut-evolution-DTD0Hfgh.js} +9 -9
- package/dist/{vue-ui-dumbbell-Bt41GKHc.js → vue-ui-dumbbell-BZw7lntE.js} +8 -8
- package/dist/{vue-ui-dumbbell-B5zjcvBX.cjs → vue-ui-dumbbell-DVabaAYH.cjs} +1 -1
- package/dist/{vue-ui-flow-BhXEWkDg.cjs → vue-ui-flow-Bn1EP9Z1.cjs} +1 -1
- package/dist/{vue-ui-flow-DFJwsU9T.js → vue-ui-flow-Cz_xaLAs.js} +7 -7
- package/dist/{vue-ui-galaxy-Ckhh5tv9.js → vue-ui-galaxy-Bjlm3WtB.js} +9 -9
- package/dist/{vue-ui-galaxy-Cv4hGLlH.cjs → vue-ui-galaxy-Drnhlmmw.cjs} +1 -1
- package/dist/{vue-ui-gauge-L06i_lqx.js → vue-ui-gauge-CxIVYnG2.js} +5 -5
- package/dist/{vue-ui-gauge-B8Db6IYI.cjs → vue-ui-gauge-D2reVZ-b.cjs} +1 -1
- package/dist/{vue-ui-gizmo-Dax5RGrp.cjs → vue-ui-gizmo-B6ZwXwFY.cjs} +1 -1
- package/dist/{vue-ui-gizmo-nkBDlE7k.js → vue-ui-gizmo-CiutQM-A.js} +2 -2
- package/dist/{vue-ui-heatmap-dwBcSf2r.js → vue-ui-heatmap-C933pQPU.js} +8 -8
- package/dist/{vue-ui-heatmap-Del_S9Ig.cjs → vue-ui-heatmap-ClFm7qUu.cjs} +1 -1
- package/dist/{vue-ui-kpi-CCVBFFTs.cjs → vue-ui-kpi-CdPFWSHA.cjs} +1 -1
- package/dist/{vue-ui-kpi-F5q_gEuh.js → vue-ui-kpi-ClreiT4V.js} +3 -3
- package/dist/{vue-ui-mini-loader-11ecJZC0.js → vue-ui-mini-loader-B5XG2gKd.js} +2 -2
- package/dist/{vue-ui-mini-loader-DAG8Gufj.cjs → vue-ui-mini-loader-C67Z1C6r.cjs} +1 -1
- package/dist/{vue-ui-molecule-DkCIlJU8.js → vue-ui-molecule-DzIeuL8t.js} +9 -9
- package/dist/{vue-ui-molecule-BTLP20Mz.cjs → vue-ui-molecule-JJQ3af-R.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-ghquf2Zg.js → vue-ui-mood-radar-02L4M-n_.js} +9 -9
- package/dist/{vue-ui-mood-radar-CF_kZ6bH.cjs → vue-ui-mood-radar-DT4JU_6B.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-CRdtJZWs.js → vue-ui-nested-donuts-BY50trfJ.js} +9 -9
- package/dist/{vue-ui-nested-donuts-B-7xB4wI.cjs → vue-ui-nested-donuts-D6Dihmne.cjs} +1 -1
- package/dist/{vue-ui-onion-CUYgS0n0.js → vue-ui-onion-BmQ7B9xY.js} +9 -9
- package/dist/{vue-ui-onion-BoYq6jVn.cjs → vue-ui-onion-DoNDCpth.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-CDRIN2Aj.js → vue-ui-parallel-coordinate-plot-BdfcqlfT.js} +10 -10
- package/dist/{vue-ui-parallel-coordinate-plot-BGvSRauT.cjs → vue-ui-parallel-coordinate-plot-CJMjEDXR.cjs} +1 -1
- package/dist/{vue-ui-quadrant-CndKtGze.js → vue-ui-quadrant-CLimyRoA.js} +10 -10
- package/dist/{vue-ui-quadrant-DXbOfhjV.cjs → vue-ui-quadrant-DWqmU3-5.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-CqaLgRB6.cjs → vue-ui-quick-chart-CB5VelG0.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-p7cKzBJk.js → vue-ui-quick-chart-CX8Kas-o.js} +7 -7
- package/dist/{vue-ui-radar-BB5qmv_O.js → vue-ui-radar-CK0PB5oY.js} +10 -10
- package/dist/{vue-ui-radar-B9fCmqTj.cjs → vue-ui-radar-aTceo-HQ.cjs} +1 -1
- package/dist/{vue-ui-rating-CrVheC-i.js → vue-ui-rating-BnqWN2ui.js} +2 -2
- package/dist/{vue-ui-rating-DAjzsg87.cjs → vue-ui-rating-Ceu3pXmF.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-BPiudHHA.js → vue-ui-relation-circle-D1z8MBVH.js} +5 -5
- package/dist/{vue-ui-relation-circle-DTS27L71.cjs → vue-ui-relation-circle-DWGtziD_.cjs} +1 -1
- package/dist/{vue-ui-rings-BfXc8iuJ.js → vue-ui-rings-CYthauSM.js} +9 -9
- package/dist/{vue-ui-rings-DjjBsl87.cjs → vue-ui-rings-gp0sEMy6.cjs} +1 -1
- package/dist/{vue-ui-scatter-DoBFZghX.cjs → vue-ui-scatter-BKl2fUIR.cjs} +1 -1
- package/dist/{vue-ui-scatter-DWxuW3q1.js → vue-ui-scatter-Cxr9eymz.js} +10 -10
- package/dist/{vue-ui-screenshot-RRWLPlkg.js → vue-ui-screenshot-CVWC5rbJ.js} +1 -1
- package/dist/{vue-ui-screenshot-BT1WVBvi.cjs → vue-ui-screenshot-sBd8-Oyh.cjs} +1 -1
- package/dist/{vue-ui-skeleton-XKmaSsvx.js → vue-ui-skeleton-CAvlIcgk.js} +2 -2
- package/dist/{vue-ui-skeleton-gtTH6DCC.cjs → vue-ui-skeleton-CqF0NJ4g.cjs} +1 -1
- package/dist/{vue-ui-smiley-B1vjfemq.js → vue-ui-smiley-CXbipVsb.js} +2 -2
- package/dist/{vue-ui-smiley-D7i2I9tM.cjs → vue-ui-smiley-c_I60YOy.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-sUDUdqWE.js → vue-ui-spark-trend-C3sBXu8D.js} +4 -4
- package/dist/{vue-ui-spark-trend-CtM9OeDS.cjs → vue-ui-spark-trend-CXkkMK6N.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-D3s8g7yn.cjs → vue-ui-sparkbar-BkN5iTUq.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-C-1_gl5N.js → vue-ui-sparkbar-Dm-2_5Ef.js} +3 -3
- package/dist/{vue-ui-sparkgauge-Cp0q0GBQ.cjs → vue-ui-sparkgauge-D4EqU3x3.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge--pRWYVlV.js → vue-ui-sparkgauge-FKTXvE7e.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-BQoZSojK.cjs → vue-ui-sparkhistogram-BkJz2dBD.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-Cj4l6Yjl.js → vue-ui-sparkhistogram-qf87TXA-.js} +4 -4
- package/dist/{vue-ui-sparkline-DF15b4Xf.js → vue-ui-sparkline-CZBgvY1A.js} +3 -3
- package/dist/{vue-ui-sparkline-B8PjCxHf.cjs → vue-ui-sparkline-TPkuvKtA.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-C9XuPPoc.cjs → vue-ui-sparkstackbar-CzzfnPDS.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-BTb70s92.js → vue-ui-sparkstackbar-GtkDZDXZ.js} +3 -3
- package/dist/{vue-ui-stackbar-x-l6aDiU.js → vue-ui-stackbar-D_Ui7xec.js} +10 -10
- package/dist/{vue-ui-stackbar-BVI0SEu4.cjs → vue-ui-stackbar-NHgsl2-Z.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-CoKwhwfl.js → vue-ui-strip-plot--VJ3f5UV.js} +9 -9
- package/dist/{vue-ui-strip-plot-DRjnZEYt.cjs → vue-ui-strip-plot-CU6OtKt7.cjs} +1 -1
- package/dist/{vue-ui-table-u_43joWk.js → vue-ui-table-BCQ7voEV.js} +1 -1
- package/dist/{vue-ui-table-CW_ZEFkz.cjs → vue-ui-table-B_6N0VOD.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-DDS3tKIQ.cjs → vue-ui-table-heatmap-DFMF1RZ0.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-D3cF_M_O.js → vue-ui-table-heatmap-UwpQQMHB.js} +4 -4
- package/dist/{vue-ui-table-sparkline-B_UKul0q.js → vue-ui-table-sparkline-Bzqs2Hcp.js} +5 -5
- package/dist/{vue-ui-table-sparkline-DP9_axVg.cjs → vue-ui-table-sparkline-DWvOKdPb.cjs} +1 -1
- package/dist/{vue-ui-thermometer-LN3eKoob.cjs → vue-ui-thermometer-BOuuVWuf.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BazPTNdQ.js → vue-ui-thermometer-BQbYzsSV.js} +5 -5
- package/dist/{vue-ui-timer-P0Gep-MP.cjs → vue-ui-timer-BCiMjXdm.cjs} +1 -1
- package/dist/{vue-ui-timer-DEv_fTNE.js → vue-ui-timer-KGEswANF.js} +4 -4
- package/dist/{vue-ui-tiremarks-B4zO1f7e.js → vue-ui-tiremarks-BSkMCIu1.js} +5 -5
- package/dist/{vue-ui-tiremarks-DEr3ryms.cjs → vue-ui-tiremarks-DuEz8cO5.cjs} +1 -1
- package/dist/{vue-ui-treemap-CWuA7766.cjs → vue-ui-treemap-BO8gKQ4O.cjs} +1 -1
- package/dist/{vue-ui-treemap-iRa3YIot.js → vue-ui-treemap-DIWveOrq.js} +9 -9
- package/dist/{vue-ui-vertical-bar-CoUXP9x3.cjs → vue-ui-vertical-bar-Dpzyha_P.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-ByKc0QdH.js → vue-ui-vertical-bar-Dx6wReOw.js} +9 -9
- package/dist/{vue-ui-waffle-DGy82Mae.cjs → vue-ui-waffle-C0-IVDjk.cjs} +1 -1
- package/dist/{vue-ui-waffle-qWPaEfOg.js → vue-ui-waffle-D3jMPOd3.js} +9 -9
- package/dist/{vue-ui-wheel-SXnsdXa_.js → vue-ui-wheel-B10kCoLD.js} +5 -5
- package/dist/{vue-ui-wheel-D77Z5zB1.cjs → vue-ui-wheel-mWdIHlXV.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-BEiSiNk_.cjs → vue-ui-word-cloud-CYtRxpdV.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-BfLh5qUJ.js → vue-ui-word-cloud-rhrsHes4.js} +7 -7
- package/dist/{vue-ui-xy-JHEKn-fb.js → vue-ui-xy-9_2IHEOX.js} +391 -391
- package/dist/vue-ui-xy-CFqs5rtd.cjs +3 -0
- package/dist/{vue-ui-xy-canvas-B4H-9OtC.js → vue-ui-xy-canvas-DGuGy69l.js} +10 -10
- package/dist/{vue-ui-xy-canvas-CkAFPHse.cjs → vue-ui-xy-canvas-sLH0pM-i.cjs} +1 -1
- package/package.json +1 -1
- package/dist/vue-ui-xy-CXlGidia.cjs +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-DC98WFA9.cjs"),ae=require("./useResponsive-B3TrDDIG.cjs"),be=require("./Title-NxuZWg-H.cjs"),oe=require("./usePrinter-DOwo3slV.cjs"),ke=require("./Tooltip-D5XlXHnd.cjs"),we=require("./DataTable-jPEnygiD.cjs"),xe=require("./Legend-DYpbZAKy.cjs"),Ce=require("./vue-ui-skeleton-gtTH6DCC.cjs"),Be=require("./vue-ui-accordion-Bw-stCgX.cjs"),re=require("./useNestedProp-DLm4WQqO.cjs"),_e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ue=S=>(e.pushScopeId("data-v-876ae247"),S=S(),e.popScopeId(),S),Se=["id"],Ne=["xmlns","viewBox"],$e=["id"],Le=["stop-color"],Te=["stop-color"],Ve=["id"],Pe=ue(()=>e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2},null,-1)),Ie=ue(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Ee=[Pe,Ie],ze=["x","y","height","width"],Fe=["height","width"],De=["rx","x","y","height","width","stroke","stroke-width","filter"],Oe=["rx","x","y","height","width","fill","stroke","stroke-width","filter"],Ae=["x","y","height","width","filter"],Me={key:0},qe={key:1},Re={key:2},Ue={key:3},je=["onMouseover","x","y","height","width"],Ge={key:3,class:"vue-data-ui-watermark"},We=["onClick"],He={key:0},Ye={key:1},Xe=["innerHTML"],Je={__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(S,{expose:ne,emit:se}){const p=S,{vue_ui_waffle:ie}=n.useConfig(),P=e.computed(()=>!!p.dataset&&p.dataset.length),b=e.ref(n.createUid()),ce=e.ref(null),F=e.ref(!1),D=e.ref(""),B=e.ref(null),q=e.ref(0),N=e.ref(null),R=e.ref(null),U=e.ref(null),t=e.computed(()=>{const l=re.useNestedProp({userConfig:p.config,defaultConfig:ie});return l.theme?{...re.useNestedProp({userConfig:n.themes.vue_ui_waffle[l.theme]||p.config,defaultConfig:l}),customPalette:n.themePalettes[l.theme]||n.palette}:l}),I=e.ref(null);e.onMounted(()=>{if(n.objectIsEmpty(p.dataset)?n.error({componentName:"VueUiWaffle",type:"dataset"}):p.dataset.forEach((l,r)=>{n.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{n.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:a,index:r})})}),t.value.responsive){const l=ae.throttle(()=>{const{width:r,height:a}=ae.useResponsive({chart:N.value,title:t.value.style.chart.title.text?R.value:null,legend:t.value.style.chart.legend.show?U.value:null});k.value.width=r,k.value.height=a,y.value.width=r,y.value.height=a});I.value=new ResizeObserver(l),I.value.observe(N.value.parentNode)}}),e.onBeforeUnmount(()=>{I.value&&I.value.disconnect()});const{isPrinting:j,isImaging:G,generatePdf:W,generateImage:H}=oe.usePrinter({elementId:`vue-ui-waffle_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-waffle"}),Y=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),m=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),k=e.ref({height:512,width:512}),y=e.ref({top:0,left:0,height:512,width:512}),w=e.computed(()=>(y.value.width-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),x=e.computed(()=>(y.value.height-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),$=e.computed(()=>y.value.width/t.value.style.chart.layout.grid.size),E=e.computed(()=>y.value.height/t.value.style.chart.layout.grid.size);function X(l){const r=t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.size,a=l.reduce((h,M)=>h+M,0),o=l.map(h=>h/a*r),u=o.map(Math.floor),i=o.map(h=>h%1);let d=r-u.reduce((h,M)=>h+M,0);for(;d>0;){let h=i.indexOf(Math.max(...i));u[h]+=1,i[h]=0,d-=1}return u}const J=e.computed(()=>p.dataset.map((l,r)=>({...l,color:n.convertColorToHex(l.color)||Y.value[r]||n.palette[r]||n.palette[r%n.palette.length],uid:`serie_${r}`,absoluteIndex:r}))),c=e.ref(J.value),ve=e.computed(()=>{const l=c.value.filter((r,a)=>!v.value.includes(r.uid)).map((r,a)=>(r.values||[]).reduce((o,u)=>o+u,0));return X(l)}),de=e.computed(()=>{const l=c.value.map((r,a)=>(r.values||[]).reduce((o,u)=>o+u));return X(l)}),L=e.computed(()=>(p.dataset.forEach((l,r)=>{[null,void 0].includes(l.values)&&n.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:"values (number[])",index:r})}),c.value.filter((l,r)=>!v.value.includes(l.uid)).map((l,r)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,o)=>a+o,0),absoluteValues:l.values||[],proportion:ve.value[r]})))),he=e.computed(()=>c.value.map((l,r)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,o)=>a+o,0),absoluteValues:l.values||[],proportion:de.value[r]})));function pe(){return he.value.map(l=>({name:l.name,color:l.color,value:l.value,proportion:l.proportion}))}const ye=e.computed(()=>{let l=0;return L.value.map((r,a)=>{const o=l,u=o+r.proportion,i=[];for(let d=Math.floor(o);d<Math.floor(u);d+=1)i.push(d);return l=u,{...r,start:o,rects:i}})}),s=e.computed(()=>ye.value.flatMap((l,r)=>l.rects.map((a,o)=>({isFirst:o===0,isLongEnough:a.length>2,name:l.name,color:l.color,value:l.value,serieIndex:r,absoluteStartIndex:o<3,serieId:l.uid,...l}))).map((l,r)=>({...l,isAbsoluteFirst:r%t.value.style.chart.layout.grid.size===0}))),T=e.computed(()=>{const l=[];for(let r=0;r<t.value.style.chart.layout.grid.size;r+=1)for(let a=0;a<t.value.style.chart.layout.grid.size;a+=1)l.push({isStartOfLine:a===0,position:t.value.style.chart.layout.grid.vertical?r:a,x:(t.value.style.chart.layout.grid.vertical?r:a)*(w.value+t.value.style.chart.layout.grid.spaceBetween),y:(t.value.style.chart.layout.grid.vertical?a:r)*(x.value+t.value.style.chart.layout.grid.spaceBetween)+y.value.top});return l}),v=e.ref([]),C=e.ref(!1),K=e.ref(null),Q=e.ref(null);function Z(l){if(!t.value.useAnimation){v.value.includes(l)?v.value=v.value.filter(u=>u!==l):v.value.length<_.value.length-1&&_.value.length>1&&v.value.push(l);return}const r=J.value.find(u=>u.uid===l).values.reduce((u,i)=>u+i,0);let o=c.value.find(u=>u.uid===l).values.reduce((u,i)=>u+i,0);if(v.value.includes(l)){let i=function(){o>u?(cancelAnimationFrame(K.value),c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[u]}:d),C.value=!1):(C.value=!0,o+=u*.025,c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[o]}:d),K.value=requestAnimationFrame(i))};v.value=v.value.filter(d=>d!==l);const u=r;i()}else if(v.value.length<_.value.length-1&&_.value.length>1){let u=function(){o<.1?(cancelAnimationFrame(Q.value),v.value.push(l),c.value=c.value.map((i,d)=>i.uid===l?{...i,values:[0]}:i),C.value=!1):(C.value=!0,o/=1.5,c.value=c.value.map((i,d)=>i.uid===l?{...i,values:[o]}:i),Q.value=requestAnimationFrame(u))};u()}se("selectLegend",L.value.map(u=>({name:u.name,color:u.color,value:u.value,proportion:u.proportion/Math.pow(t.value.style.chart.layout.grid.size,2)})))}const _=e.computed(()=>c.value.map((l,r)=>({name:l.name,color:l.color||Y[r]||n.palette[r]||n.palette[r%n.palette.length],value:(l.values||[]).reduce((a,o)=>a+o,0),uid:l.uid,shape:"square"})).map((l,r)=>({...l,proportion:l.value/c.value.map(a=>(a.values||[]).reduce((o,u)=>o+u,0)).reduce((a,o)=>a+o,0),opacity:v.value.includes(l.uid)?.5:1,segregate:()=>Z(l.uid),isSegregated:v.value.includes(l.uid)}))),fe=e.computed(()=>({cy:"waffle-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),f=e.computed(()=>L.value.map(l=>l.value).reduce((l,r)=>l+r,0)),O=e.ref(null);function ge(l){if(v.value.length===p.dataset.length)return;const r=s.value[l];O.value={datapoint:r,seriesIndex:r.absoluteIndex,series:c.value,config:t.value},F.value=!0,B.value=s.value[l].serieIndex;const a=t.value.style.chart.tooltip.customFormat;if(n.isFunction(a)&&n.functionReturnsString(()=>a({seriesIndex:s.value[l].absoluteIndex,datapoint:r,series:c.value,config:t.value})))D.value=a({seriesIndex:s.value[l].absoluteIndex,datapoint:r,series:c.value,config:t.value});else{let o="";if(o+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${r.name}</div>`,o+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" rx="1" fill="${r.color}" /></svg>`,t.value.style.chart.tooltip.showValue&&(o+=`<b>${n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,r.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:r.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:r,seriesIndex:s.value[l].absoluteIndex,series:c.value})}</b>`),t.value.style.chart.tooltip.showPercentage){const u=n.dataLabel({v:r.value/f.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage});t.value.style.chart.tooltip.showValue?o+=`<span>(${u})</span></div>`:o+=`<b>${u}%</b></div>`}D.value=o}}const g=e.computed(()=>{const l=L.value.map(a=>({name:a.name,color:a.color})),r=L.value.map(a=>a.value);return{head:l,body:r}});function A(l){return t.value.useBlurOnHover&&![null,void 0].includes(B.value)&&B.value!==l?`url(#blur_${b.value})`:""}function ee(){e.nextTick(()=>{const l=g.value.head.map((o,u)=>[[o.name],[g.value.body[u]],[isNaN(g.value.body[u]/f.value)?"-":g.value.body[u]/f.value*100]]),r=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),a=n.createCsvContent(r);n.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-waffle"})})}const z=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>',n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,f.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:f.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),"100%"],r=g.value.head.map((u,i)=>[{color:u.color,name:u.name},n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,g.value.body[i],n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:g.value.body[i],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),isNaN(g.value.body[i]/f.value)?"-":n.dataLabel({v:g.value.body[i]/f.value*100,s:"%",r:t.value.table.td.roundingPercentage})]),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},shape:"square",breakpoint:t.value.table.responsiveBreakpoint},o=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:r,config:a,colNames:o}}),V=e.ref(!1);function me(l){V.value=l,q.value+=1}function te(){m.value.showTable=!m.value.showTable}function le(){m.value.showTooltip=!m.value.showTooltip}return ne({getData:pe,generatePdf:W,generateCsv:ee,generateImage:H,toggleTable:te,toggleTooltip:le}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-waffle ${V.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"waffleChart",ref:N,id:`vue-ui-waffle_${b.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.responsive?"height: 100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:R,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(be._sfc_main,{config:{title:{cy:"waffle-title",...t.value.style.chart.title},subtitle:{cy:"waffle-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&P.value?(e.openBlock(),e.createBlock(oe.UserOptions,{ref_key:"details",ref:ce,key:`user_options_${q.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(j),isImaging:e.unref(G),uid:b.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.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:V.value,isTooltip:m.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,onToggleFullscreen:me,onGeneratePdf:e.unref(W),onGenerateCsv:ee,onGenerateImage:e.unref(H),onToggleTable:te,onToggleTooltip:le},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:o})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(a,o)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${b.value}_${o}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(a.color,.05)}${e.unref(n.opacity)[100-t.value.style.chart.layout.rect.gradientIntensity]}`},null,8,Le),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Te)],8,$e))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${b.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},Ee,8,Ve)]),t.value.useCustomCells&&s.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(T.value,(a,o)=>(e.openBlock(),e.createElementBlock("foreignObject",{x:a.x,y:a.y,height:x.value<=0?1e-4:x.value,width:w.value<=0?1e-4:w.value,class:"vue-ui-waffle-custom-cell-foreignObject"},[e.renderSlot(l.$slots,"cell",e.normalizeProps(e.guardReactiveProps({cell:{...a,color:s.value[o].color,...s.value[o]},isSelected:[null,void 0].includes(B.value)?!0:s.value[o].serieIndex===B.value})),void 0,!0)],8,ze))),256)):e.createCommentVNode("",!0),!s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock("rect",{key:1,x:12,y:12,height:y.value.height-24,width:y.value.width-24,rx:3,fill:"none",stroke:"black"},null,8,Fe)):s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,o)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:x.value<=0?1e-4:x.value,width:w.value<=0?1e-4:w.value,fill:"white",stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:A(s.value[o].serieIndex)},null,8,De))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,o)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:x.value<=0?1e-4:x.value,width:w.value<=0?1e-4:w.value,fill:t.value.style.chart.layout.rect.useGradient&&t.value.style.chart.layout.rect.gradientIntensity>0?`url(#gradient_${b.value}_${o})`:s.value[o].color,stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:A(s.value[o].serieIndex)},null,8,Oe))),256))],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value.length&&!C.value&&!t.value.style.chart.layout.grid.vertical&&t.value.style.chart.layout.labels.captions.show&&(s.value[o].isFirst&&a.position<t.value.style.chart.layout.grid.size-2||s.value[o].isAbsoluteFirst&&o%t.value.style.chart.layout.grid.size===0&&s.value[o].absoluteStartIndex)?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:a.x+t.value.style.chart.layout.labels.captions.offsetX+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.labels.captions.offsetY+t.value.style.chart.layout.grid.spaceBetween/2,height:E.value<=0?1e-4:E.value,width:$.value*t.value.style.chart.layout.grid.size<=0?1e-4:$.value*t.value.style.chart.layout.grid.size,filter:A(s.value[o].serieIndex)},[e.createElementVNode("div",{class:"vue-ui-waffle-caption",style:e.normalizeStyle(`height: 100%; width: 100%; font-size:${t.value.style.chart.layout.labels.captions.fontSize}px;display:flex;align-items:center;justify-content:flex-start;padding: 0 ${$.value/12}px;color:${e.unref(n.adaptColorToBackground)(s.value[o].color)};gap:2px`)},[t.value.style.chart.layout.labels.captions.showSerieName?(e.openBlock(),e.createElementBlock("span",Me,e.toDisplayString(t.value.style.chart.layout.labels.captions.serieNameAbbreviation?e.unref(n.abbreviate)({source:s.value[o].name,length:t.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize}):s.value[o].name)+": ",1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage?(e.openBlock(),e.createElementBlock("span",qe,e.toDisplayString(e.unref(n.dataLabel)({v:s.value[o].proportion,s:"%",r:t.value.style.chart.layout.labels.captions.roundingPercentage})),1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",Re," ("+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[o].value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[o].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[o],position:a}))+") ",1)):e.createCommentVNode("",!0),!t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",Ue,e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[o].value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[o].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[o],position:a})),1)):e.createCommentVNode("",!0)],4)],8,Ae)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,o)=>(e.openBlock(),e.createElementBlock("rect",{onMouseover:u=>ge(o),onMouseleave:r[0]||(r[0]=u=>{F.value=!1,B.value=null}),x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:E.value<=0?1e-4:E.value,width:$.value<=0?1e-4:$.value,fill:"transparent",stroke:"none"},null,40,je))),256)),e.renderSlot(l.$slots,"svg",{svg:k.value},void 0,!0)],14,Ne)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(j)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),P.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ce.default,{key:4,config:{type:"waffle",style:{backgroundColor:t.value.style.chart.backgroundColor,waffle:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:U},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(xe.Legend,{key:0,legendSet:_.value,config:fe.value,onClickMarker:r[1]||(r[1]=({legend:a})=>Z(a.uid))},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:o=>a.segregate(),style:e.normalizeStyle(`opacity:${v.value.includes(a.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue,isAnimating:C.value}),{datapoint:a}))+" ",1),v.value.includes(a.uid)?(e.openBlock(),e.createElementBlock("span",Ye," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",He," ("+e.toDisplayString(isNaN(a.value/f.value)?"-":e.unref(n.dataLabel)({v:a.value/f.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage,isAnimating:C.value}))+") ",1))],12,We)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:_.value},void 0,!0)],512),e.createVNode(ke._sfc_main,{show:m.value.showTooltip&&F.value&&v.value.length<p.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:N.value,content:D.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function",fontSize:t.value.style.chart.tooltip.fontSize},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","fontSize"]),P.value?(e.openBlock(),e.createBlock(Be.default,{key:5,hideDetails:"",config:{open:m.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(we.DataTable,{colNames:z.value.colNames,head:z.value.head,body:z.value.body,config:z.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[2]||(r[2]=a=>m.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,Xe)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Se))}},Ke=_e._export_sfc(Je,[["__scopeId","data-v-876ae247"]]);exports.default=Ke;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-sFjJ2dIj.cjs"),ae=require("./useResponsive-B3TrDDIG.cjs"),be=require("./Title-CujodUjt.cjs"),oe=require("./usePrinter-DSMMs1w9.cjs"),ke=require("./Tooltip-DsmWz8gF.cjs"),we=require("./DataTable-wmKwMbsJ.cjs"),xe=require("./Legend-DdndVhHV.cjs"),Ce=require("./vue-ui-skeleton-CqF0NJ4g.cjs"),Be=require("./vue-ui-accordion-RuCkf_li.cjs"),re=require("./useNestedProp-ir0jEo5M.cjs"),_e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ue=S=>(e.pushScopeId("data-v-876ae247"),S=S(),e.popScopeId(),S),Se=["id"],Ne=["xmlns","viewBox"],$e=["id"],Le=["stop-color"],Te=["stop-color"],Ve=["id"],Pe=ue(()=>e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2},null,-1)),Ie=ue(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Ee=[Pe,Ie],ze=["x","y","height","width"],Fe=["height","width"],De=["rx","x","y","height","width","stroke","stroke-width","filter"],Oe=["rx","x","y","height","width","fill","stroke","stroke-width","filter"],Ae=["x","y","height","width","filter"],Me={key:0},qe={key:1},Re={key:2},Ue={key:3},je=["onMouseover","x","y","height","width"],Ge={key:3,class:"vue-data-ui-watermark"},We=["onClick"],He={key:0},Ye={key:1},Xe=["innerHTML"],Je={__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(S,{expose:ne,emit:se}){const p=S,{vue_ui_waffle:ie}=n.useConfig(),P=e.computed(()=>!!p.dataset&&p.dataset.length),b=e.ref(n.createUid()),ce=e.ref(null),F=e.ref(!1),D=e.ref(""),B=e.ref(null),q=e.ref(0),N=e.ref(null),R=e.ref(null),U=e.ref(null),t=e.computed(()=>{const l=re.useNestedProp({userConfig:p.config,defaultConfig:ie});return l.theme?{...re.useNestedProp({userConfig:n.themes.vue_ui_waffle[l.theme]||p.config,defaultConfig:l}),customPalette:n.themePalettes[l.theme]||n.palette}:l}),I=e.ref(null);e.onMounted(()=>{if(n.objectIsEmpty(p.dataset)?n.error({componentName:"VueUiWaffle",type:"dataset"}):p.dataset.forEach((l,r)=>{n.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{n.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:a,index:r})})}),t.value.responsive){const l=ae.throttle(()=>{const{width:r,height:a}=ae.useResponsive({chart:N.value,title:t.value.style.chart.title.text?R.value:null,legend:t.value.style.chart.legend.show?U.value:null});k.value.width=r,k.value.height=a,y.value.width=r,y.value.height=a});I.value=new ResizeObserver(l),I.value.observe(N.value.parentNode)}}),e.onBeforeUnmount(()=>{I.value&&I.value.disconnect()});const{isPrinting:j,isImaging:G,generatePdf:W,generateImage:H}=oe.usePrinter({elementId:`vue-ui-waffle_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-waffle"}),Y=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),m=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),k=e.ref({height:512,width:512}),y=e.ref({top:0,left:0,height:512,width:512}),w=e.computed(()=>(y.value.width-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),x=e.computed(()=>(y.value.height-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),$=e.computed(()=>y.value.width/t.value.style.chart.layout.grid.size),E=e.computed(()=>y.value.height/t.value.style.chart.layout.grid.size);function X(l){const r=t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.size,a=l.reduce((h,M)=>h+M,0),o=l.map(h=>h/a*r),u=o.map(Math.floor),i=o.map(h=>h%1);let d=r-u.reduce((h,M)=>h+M,0);for(;d>0;){let h=i.indexOf(Math.max(...i));u[h]+=1,i[h]=0,d-=1}return u}const J=e.computed(()=>p.dataset.map((l,r)=>({...l,color:n.convertColorToHex(l.color)||Y.value[r]||n.palette[r]||n.palette[r%n.palette.length],uid:`serie_${r}`,absoluteIndex:r}))),c=e.ref(J.value),ve=e.computed(()=>{const l=c.value.filter((r,a)=>!v.value.includes(r.uid)).map((r,a)=>(r.values||[]).reduce((o,u)=>o+u,0));return X(l)}),de=e.computed(()=>{const l=c.value.map((r,a)=>(r.values||[]).reduce((o,u)=>o+u));return X(l)}),L=e.computed(()=>(p.dataset.forEach((l,r)=>{[null,void 0].includes(l.values)&&n.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:"values (number[])",index:r})}),c.value.filter((l,r)=>!v.value.includes(l.uid)).map((l,r)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,o)=>a+o,0),absoluteValues:l.values||[],proportion:ve.value[r]})))),he=e.computed(()=>c.value.map((l,r)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,o)=>a+o,0),absoluteValues:l.values||[],proportion:de.value[r]})));function pe(){return he.value.map(l=>({name:l.name,color:l.color,value:l.value,proportion:l.proportion}))}const ye=e.computed(()=>{let l=0;return L.value.map((r,a)=>{const o=l,u=o+r.proportion,i=[];for(let d=Math.floor(o);d<Math.floor(u);d+=1)i.push(d);return l=u,{...r,start:o,rects:i}})}),s=e.computed(()=>ye.value.flatMap((l,r)=>l.rects.map((a,o)=>({isFirst:o===0,isLongEnough:a.length>2,name:l.name,color:l.color,value:l.value,serieIndex:r,absoluteStartIndex:o<3,serieId:l.uid,...l}))).map((l,r)=>({...l,isAbsoluteFirst:r%t.value.style.chart.layout.grid.size===0}))),T=e.computed(()=>{const l=[];for(let r=0;r<t.value.style.chart.layout.grid.size;r+=1)for(let a=0;a<t.value.style.chart.layout.grid.size;a+=1)l.push({isStartOfLine:a===0,position:t.value.style.chart.layout.grid.vertical?r:a,x:(t.value.style.chart.layout.grid.vertical?r:a)*(w.value+t.value.style.chart.layout.grid.spaceBetween),y:(t.value.style.chart.layout.grid.vertical?a:r)*(x.value+t.value.style.chart.layout.grid.spaceBetween)+y.value.top});return l}),v=e.ref([]),C=e.ref(!1),K=e.ref(null),Q=e.ref(null);function Z(l){if(!t.value.useAnimation){v.value.includes(l)?v.value=v.value.filter(u=>u!==l):v.value.length<_.value.length-1&&_.value.length>1&&v.value.push(l);return}const r=J.value.find(u=>u.uid===l).values.reduce((u,i)=>u+i,0);let o=c.value.find(u=>u.uid===l).values.reduce((u,i)=>u+i,0);if(v.value.includes(l)){let i=function(){o>u?(cancelAnimationFrame(K.value),c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[u]}:d),C.value=!1):(C.value=!0,o+=u*.025,c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[o]}:d),K.value=requestAnimationFrame(i))};v.value=v.value.filter(d=>d!==l);const u=r;i()}else if(v.value.length<_.value.length-1&&_.value.length>1){let u=function(){o<.1?(cancelAnimationFrame(Q.value),v.value.push(l),c.value=c.value.map((i,d)=>i.uid===l?{...i,values:[0]}:i),C.value=!1):(C.value=!0,o/=1.5,c.value=c.value.map((i,d)=>i.uid===l?{...i,values:[o]}:i),Q.value=requestAnimationFrame(u))};u()}se("selectLegend",L.value.map(u=>({name:u.name,color:u.color,value:u.value,proportion:u.proportion/Math.pow(t.value.style.chart.layout.grid.size,2)})))}const _=e.computed(()=>c.value.map((l,r)=>({name:l.name,color:l.color||Y[r]||n.palette[r]||n.palette[r%n.palette.length],value:(l.values||[]).reduce((a,o)=>a+o,0),uid:l.uid,shape:"square"})).map((l,r)=>({...l,proportion:l.value/c.value.map(a=>(a.values||[]).reduce((o,u)=>o+u,0)).reduce((a,o)=>a+o,0),opacity:v.value.includes(l.uid)?.5:1,segregate:()=>Z(l.uid),isSegregated:v.value.includes(l.uid)}))),fe=e.computed(()=>({cy:"waffle-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),f=e.computed(()=>L.value.map(l=>l.value).reduce((l,r)=>l+r,0)),O=e.ref(null);function ge(l){if(v.value.length===p.dataset.length)return;const r=s.value[l];O.value={datapoint:r,seriesIndex:r.absoluteIndex,series:c.value,config:t.value},F.value=!0,B.value=s.value[l].serieIndex;const a=t.value.style.chart.tooltip.customFormat;if(n.isFunction(a)&&n.functionReturnsString(()=>a({seriesIndex:s.value[l].absoluteIndex,datapoint:r,series:c.value,config:t.value})))D.value=a({seriesIndex:s.value[l].absoluteIndex,datapoint:r,series:c.value,config:t.value});else{let o="";if(o+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${r.name}</div>`,o+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" rx="1" fill="${r.color}" /></svg>`,t.value.style.chart.tooltip.showValue&&(o+=`<b>${n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,r.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:r.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:r,seriesIndex:s.value[l].absoluteIndex,series:c.value})}</b>`),t.value.style.chart.tooltip.showPercentage){const u=n.dataLabel({v:r.value/f.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage});t.value.style.chart.tooltip.showValue?o+=`<span>(${u})</span></div>`:o+=`<b>${u}%</b></div>`}D.value=o}}const g=e.computed(()=>{const l=L.value.map(a=>({name:a.name,color:a.color})),r=L.value.map(a=>a.value);return{head:l,body:r}});function A(l){return t.value.useBlurOnHover&&![null,void 0].includes(B.value)&&B.value!==l?`url(#blur_${b.value})`:""}function ee(){e.nextTick(()=>{const l=g.value.head.map((o,u)=>[[o.name],[g.value.body[u]],[isNaN(g.value.body[u]/f.value)?"-":g.value.body[u]/f.value*100]]),r=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),a=n.createCsvContent(r);n.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-waffle"})})}const z=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>',n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,f.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:f.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),"100%"],r=g.value.head.map((u,i)=>[{color:u.color,name:u.name},n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,g.value.body[i],n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:g.value.body[i],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),isNaN(g.value.body[i]/f.value)?"-":n.dataLabel({v:g.value.body[i]/f.value*100,s:"%",r:t.value.table.td.roundingPercentage})]),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},shape:"square",breakpoint:t.value.table.responsiveBreakpoint},o=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:r,config:a,colNames:o}}),V=e.ref(!1);function me(l){V.value=l,q.value+=1}function te(){m.value.showTable=!m.value.showTable}function le(){m.value.showTooltip=!m.value.showTooltip}return ne({getData:pe,generatePdf:W,generateCsv:ee,generateImage:H,toggleTable:te,toggleTooltip:le}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-waffle ${V.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"waffleChart",ref:N,id:`vue-ui-waffle_${b.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.responsive?"height: 100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:R,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(be._sfc_main,{config:{title:{cy:"waffle-title",...t.value.style.chart.title},subtitle:{cy:"waffle-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&P.value?(e.openBlock(),e.createBlock(oe.UserOptions,{ref_key:"details",ref:ce,key:`user_options_${q.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(j),isImaging:e.unref(G),uid:b.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.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:V.value,isTooltip:m.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,onToggleFullscreen:me,onGeneratePdf:e.unref(W),onGenerateCsv:ee,onGenerateImage:e.unref(H),onToggleTable:te,onToggleTooltip:le},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:o})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(a,o)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${b.value}_${o}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(a.color,.05)}${e.unref(n.opacity)[100-t.value.style.chart.layout.rect.gradientIntensity]}`},null,8,Le),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Te)],8,$e))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${b.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},Ee,8,Ve)]),t.value.useCustomCells&&s.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(T.value,(a,o)=>(e.openBlock(),e.createElementBlock("foreignObject",{x:a.x,y:a.y,height:x.value<=0?1e-4:x.value,width:w.value<=0?1e-4:w.value,class:"vue-ui-waffle-custom-cell-foreignObject"},[e.renderSlot(l.$slots,"cell",e.normalizeProps(e.guardReactiveProps({cell:{...a,color:s.value[o].color,...s.value[o]},isSelected:[null,void 0].includes(B.value)?!0:s.value[o].serieIndex===B.value})),void 0,!0)],8,ze))),256)):e.createCommentVNode("",!0),!s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock("rect",{key:1,x:12,y:12,height:y.value.height-24,width:y.value.width-24,rx:3,fill:"none",stroke:"black"},null,8,Fe)):s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,o)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:x.value<=0?1e-4:x.value,width:w.value<=0?1e-4:w.value,fill:"white",stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:A(s.value[o].serieIndex)},null,8,De))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,o)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:x.value<=0?1e-4:x.value,width:w.value<=0?1e-4:w.value,fill:t.value.style.chart.layout.rect.useGradient&&t.value.style.chart.layout.rect.gradientIntensity>0?`url(#gradient_${b.value}_${o})`:s.value[o].color,stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:A(s.value[o].serieIndex)},null,8,Oe))),256))],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value.length&&!C.value&&!t.value.style.chart.layout.grid.vertical&&t.value.style.chart.layout.labels.captions.show&&(s.value[o].isFirst&&a.position<t.value.style.chart.layout.grid.size-2||s.value[o].isAbsoluteFirst&&o%t.value.style.chart.layout.grid.size===0&&s.value[o].absoluteStartIndex)?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:a.x+t.value.style.chart.layout.labels.captions.offsetX+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.labels.captions.offsetY+t.value.style.chart.layout.grid.spaceBetween/2,height:E.value<=0?1e-4:E.value,width:$.value*t.value.style.chart.layout.grid.size<=0?1e-4:$.value*t.value.style.chart.layout.grid.size,filter:A(s.value[o].serieIndex)},[e.createElementVNode("div",{class:"vue-ui-waffle-caption",style:e.normalizeStyle(`height: 100%; width: 100%; font-size:${t.value.style.chart.layout.labels.captions.fontSize}px;display:flex;align-items:center;justify-content:flex-start;padding: 0 ${$.value/12}px;color:${e.unref(n.adaptColorToBackground)(s.value[o].color)};gap:2px`)},[t.value.style.chart.layout.labels.captions.showSerieName?(e.openBlock(),e.createElementBlock("span",Me,e.toDisplayString(t.value.style.chart.layout.labels.captions.serieNameAbbreviation?e.unref(n.abbreviate)({source:s.value[o].name,length:t.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize}):s.value[o].name)+": ",1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage?(e.openBlock(),e.createElementBlock("span",qe,e.toDisplayString(e.unref(n.dataLabel)({v:s.value[o].proportion,s:"%",r:t.value.style.chart.layout.labels.captions.roundingPercentage})),1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",Re," ("+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[o].value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[o].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[o],position:a}))+") ",1)):e.createCommentVNode("",!0),!t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",Ue,e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[o].value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[o].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[o],position:a})),1)):e.createCommentVNode("",!0)],4)],8,Ae)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,o)=>(e.openBlock(),e.createElementBlock("rect",{onMouseover:u=>ge(o),onMouseleave:r[0]||(r[0]=u=>{F.value=!1,B.value=null}),x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:E.value<=0?1e-4:E.value,width:$.value<=0?1e-4:$.value,fill:"transparent",stroke:"none"},null,40,je))),256)),e.renderSlot(l.$slots,"svg",{svg:k.value},void 0,!0)],14,Ne)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(j)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),P.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ce.default,{key:4,config:{type:"waffle",style:{backgroundColor:t.value.style.chart.backgroundColor,waffle:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:U},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(xe.Legend,{key:0,legendSet:_.value,config:fe.value,onClickMarker:r[1]||(r[1]=({legend:a})=>Z(a.uid))},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:o=>a.segregate(),style:e.normalizeStyle(`opacity:${v.value.includes(a.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue,isAnimating:C.value}),{datapoint:a}))+" ",1),v.value.includes(a.uid)?(e.openBlock(),e.createElementBlock("span",Ye," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",He," ("+e.toDisplayString(isNaN(a.value/f.value)?"-":e.unref(n.dataLabel)({v:a.value/f.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage,isAnimating:C.value}))+") ",1))],12,We)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:_.value},void 0,!0)],512),e.createVNode(ke._sfc_main,{show:m.value.showTooltip&&F.value&&v.value.length<p.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:N.value,content:D.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function",fontSize:t.value.style.chart.tooltip.fontSize},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","fontSize"]),P.value?(e.openBlock(),e.createBlock(Be.default,{key:5,hideDetails:"",config:{open:m.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(we.DataTable,{colNames:z.value.colNames,head:z.value.head,body:z.value.body,config:z.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[2]||(r[2]=a=>m.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,Xe)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Se))}},Ke=_e._export_sfc(Je,[["__scopeId","data-v-876ae247"]]);exports.default=Ke;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { computed as c, ref as v, onMounted as Me, onBeforeUnmount as De, openBlock as r, createElementBlock as i, normalizeClass as xe, normalizeStyle as W, createVNode as oe, createCommentVNode as p, createBlock as Q, unref as h, createSlots as Ee, withCtx as m, renderSlot as b, normalizeProps as q, guardReactiveProps as H, createElementVNode as w, Fragment as T, renderList as V, toDisplayString as S, createTextVNode as Ce, nextTick as Ge, pushScopeId as Re, popScopeId as Ue } from "vue";
|
|
2
|
-
import { u as je, c as We, t as qe, a as He, p as B, o as Xe, e as ue, g as Ye, b as Je, d as Ke, i as M, f as x, X as Qe, v as Ze, w as et, E as tt, H as lt, x as at, y as ot, q as ut, r as st } from "./index-
|
|
2
|
+
import { u as je, c as We, t as qe, a as He, p as B, o as Xe, e as ue, g as Ye, b as Je, d as Ke, i as M, f as x, X as Qe, v as Ze, w as et, E as tt, H as lt, x as at, y as ot, q as ut, r as st } from "./index-Dvs5Ra-u.js";
|
|
3
3
|
import { t as rt, u as nt } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as it } from "./Title-
|
|
5
|
-
import { u as ct, U as vt } from "./usePrinter-
|
|
6
|
-
import { _ as dt } from "./Tooltip-
|
|
7
|
-
import { D as ht } from "./DataTable-
|
|
8
|
-
import { L as yt } from "./Legend-
|
|
9
|
-
import ft from "./vue-ui-skeleton-
|
|
10
|
-
import pt from "./vue-ui-accordion-
|
|
11
|
-
import { u as _e } from "./useNestedProp-
|
|
4
|
+
import { _ as it } from "./Title-Ngy9HNqO.js";
|
|
5
|
+
import { u as ct, U as vt } from "./usePrinter-B8-keRMa.js";
|
|
6
|
+
import { _ as dt } from "./Tooltip-BCtg7xYX.js";
|
|
7
|
+
import { D as ht } from "./DataTable-BOdJVZzF.js";
|
|
8
|
+
import { L as yt } from "./Legend-CHd5QFPM.js";
|
|
9
|
+
import ft from "./vue-ui-skeleton-CAvlIcgk.js";
|
|
10
|
+
import pt from "./vue-ui-accordion-C-qAry7P.js";
|
|
11
|
+
import { u as _e } from "./useNestedProp-UohhCyBz.js";
|
|
12
12
|
import { _ as gt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
const $e = (D) => (Re("data-v-876ae247"), D = D(), Ue(), D), mt = ["id"], bt = ["xmlns", "viewBox"], wt = ["id"], kt = ["stop-color"], xt = ["stop-color"], Ct = ["id"], _t = /* @__PURE__ */ $e(() => /* @__PURE__ */ w("feGaussianBlur", {
|
|
14
14
|
in: "SourceGraphic",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { computed as p, ref as r, watch as J, onMounted as K, onBeforeUnmount as Q, openBlock as u, createElementBlock as v, normalizeStyle as C, createVNode as Z, createCommentVNode as d, createBlock as M, unref as n, createSlots as V, withCtx as _, renderSlot as y, normalizeProps as N, guardReactiveProps as A, normalizeClass as L, Fragment as ee, renderList as te, toDisplayString as ae } from "vue";
|
|
2
|
-
import { u as le, c as se, t as ne, o as oe, e as re, v as U, X as ue, i as ie, s as X, f as ce } from "./index-
|
|
3
|
-
import { _ as he } from "./Title-
|
|
4
|
-
import { u as ve, U as de } from "./usePrinter-
|
|
2
|
+
import { u as le, c as se, t as ne, o as oe, e as re, v as U, X as ue, i as ie, s as X, f as ce } from "./index-Dvs5Ra-u.js";
|
|
3
|
+
import { _ as he } from "./Title-Ngy9HNqO.js";
|
|
4
|
+
import { u as ve, U as de } from "./usePrinter-B8-keRMa.js";
|
|
5
5
|
import { t as ye, u as fe } from "./useResponsive-NZB-WLRF.js";
|
|
6
|
-
import me from "./vue-ui-skeleton-
|
|
7
|
-
import { u as B } from "./useNestedProp-
|
|
6
|
+
import me from "./vue-ui-skeleton-CAvlIcgk.js";
|
|
7
|
+
import { u as B } from "./useNestedProp-UohhCyBz.js";
|
|
8
8
|
import { _ as ge } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
9
|
const pe = ["id"], ke = ["xmlns", "viewBox"], we = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-linecap"], be = ["cx", "cy", "r", "stroke", "stroke-width"], Ce = ["x", "y", "font-size", "fill", "font-weight"], _e = {
|
|
10
10
|
key: 3,
|
|
@@ -1 +1 @@
|
|
|
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-sFjJ2dIj.cjs"),T=require("./Title-CujodUjt.cjs"),P=require("./usePrinter-DSMMs1w9.cjs"),B=require("./useResponsive-B3TrDDIG.cjs"),L=require("./vue-ui-skeleton-CqF0NJ4g.cjs"),N=require("./useNestedProp-ir0jEo5M.cjs"),U=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),G=["id"],R=["xmlns","viewBox"],V=["x1","x2","y1","y2","stroke","stroke-width","stroke-linecap"],X=["cx","cy","r","stroke","stroke-width"],j=["x","y","font-size","fill","font-weight"],H={key:3,class:"vue-data-ui-watermark"},D={__name:"vue-ui-wheel",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(I,{expose:S}){const c=I,{vue_ui_wheel:z}=r.useConfig(),f=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length),y=e.ref(r.createUid()),F=e.ref(null),g=e.ref(0),h=e.ref(null),p=e.ref(null),t=e.computed(()=>{const l=N.useNestedProp({userConfig:c.config,defaultConfig:z});return l.theme?{...N.useNestedProp({userConfig:r.themes.vue_ui_wheel[l.theme]||c.config,defaultConfig:l})}:l}),{isPrinting:k,isImaging:w,generatePdf:C,generateImage:b}=P.usePrinter({elementId:y.value,fileName:t.value.style.chart.title.text||"vue-ui-wheel"}),n=e.ref({size:360,height:360,width:360}),m=e.ref(t.value.style.chart.layout.percentage.fontSize),u=e.computed(()=>({radius:Math.min(n.value.width,n.value.height)*.9/2,centerX:n.value.width/2,centerY:n.value.height/2}));function _(l,s=1){return{x:u.value.centerX+u.value.radius*Math.cos(29.85+l*Math.PI/180)*s,y:u.value.centerY+u.value.radius*Math.sin(29.85+l*Math.PI/180)*s}}const o=e.ref(t.value.style.chart.animation.use?0:c.dataset.percentage||0);e.watch(()=>c.dataset,l=>{t.value.style.chart.animation.use?x(l.percentage):o.value=l.percentage||0},{deep:!0});const v=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(c.dataset)&&r.error({componentName:"VueUiWheel",type:"dataset"}),x(c.dataset.percentage||0),t.value.responsive){const l=B.throttle(()=>{const{width:s,height:a}=B.useResponsive({chart:h.value,title:t.value.style.chart.title.text?p.value:null});n.value.width=s,n.value.height=a,m.value=t.value.style.chart.layout.percentage.fontSize/360*Math.min(s,a)});v.value=new ResizeObserver(l),v.value.observe(h.value.parentNode)}}),e.onBeforeUnmount(()=>{v.value&&v.value.disconnect()});function x(l){let s=t.value.style.chart.animation.speed;const a=Math.abs(l-o.value)/(s*120);function i(){o.value<l?o.value=Math.min(o.value+a,l):o.value>l&&(o.value=Math.max(o.value-a,l)),o.value!==l&&requestAnimationFrame(i)}i()}const $=e.computed(()=>{const l=[];for(let a=0;a<100;a+=1){const i=o.value>a?t.value.style.chart.layout.wheel.ticks.activeColor:t.value.style.chart.layout.wheel.ticks.inactiveColor,{x:M,y:E}=_(n.value.size/100*a),{x:A,y:q}=_(n.value.size/100*a,.9);l.push({x1:M,y1:E,x2:A,y2:q,color:t.value.style.chart.layout.wheel.ticks.gradient.show?r.shiftHue(i,a/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):i})}return l}),d=e.ref(!1);function O(l){d.value=l,g.value+=1}return S({generatePdf:C,generateImage:b}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-wheel",ref_key:"wheelChart",ref:h,id:y.value,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:p,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(T._sfc_main,{config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&f.value?(e.openBlock(),e.createBlock(P.UserOptions,{ref_key:"details",ref:F,key:`user_options_${g.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(k),isImaging:e.unref(w),uid:y.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:d.value,titles:{...t.value.userOptions.buttonTitles},chartElement:h.value,onToggleFullscreen:O,onGeneratePdf:e.unref(C),onGenerateImage:e.unref(b)},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.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:i})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:i})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":d.value,"vue-data-ui-fulscreen--off":!d.value}),viewBox:`0 0 ${n.value.width<=0?10:n.value.width} ${n.value.height<=0?10:n.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(a,i)=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y1,y2:a.y2,stroke:a.color,"stroke-width":5/360*Math.min(n.value.width,n.value.height),"stroke-linecap":t.value.style.chart.layout.wheel.ticks.rounded?"round":"butt",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&i<=o.value})},null,10,V))),256)),t.value.style.chart.layout.innerCircle.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:u.value.centerX,cy:u.value.centerY,r:u.value.radius*.8<=0?1e-4:u.value.radius*.8,stroke:t.value.style.chart.layout.innerCircle.stroke,"stroke-width":t.value.style.chart.layout.innerCircle.strokeWidth,fill:"none"},null,8,X)):e.createCommentVNode("",!0),t.value.style.chart.layout.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:1,x:u.value.centerX,y:u.value.centerY+m.value/3,"font-size":m.value,fill:t.value.style.chart.layout.wheel.ticks.gradient.show?e.unref(r.shiftHue)(t.value.style.chart.layout.wheel.ticks.activeColor,o.value/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.wheel.ticks.activeColor,"text-anchor":"middle","font-weight":t.value.style.chart.layout.percentage.bold?"bold":"normal",style:{"font-variant-numeric":"tabluar-nums"}},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.percentage.formatter,e.unref(r.checkNaN)(o.value),e.unref(r.dataLabel)({v:e.unref(r.checkNaN)(o.value),s:"%",r:t.value.style.chart.layout.percentage.rounding}))),9,j)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],14,R)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",H,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(k)||e.unref(w)})),void 0,!0)])):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(L.default,{key:4,config:{type:"wheel",style:{backgroundColor:t.value.style.chart.backgroundColor,wheel:{color:"#CCCCCC"}}}},null,8,["config"]))],12,G))}},Y=U._export_sfc(D,[["__scopeId","data-v-929bab56"]]);exports.default=Y;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-DC98WFA9.cjs"),ne=require("./Title-NxuZWg-H.cjs"),W=require("./usePrinter-DOwo3slV.cjs"),V=require("./useResponsive-B3TrDDIG.cjs"),re=require("./vue-ui-accordion-Bw-stCgX.cjs"),se=require("./DataTable-jPEnygiD.cjs"),ue=require("./BaseIcon-r6sTvN4e.cjs"),L=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),G=require("./useNestedProp-DLm4WQqO.cjs"),ie=i=>(e.pushScopeId("data-v-3fd7d274"),i=i(),e.popScopeId(),i),ce={"data-html2canvas-ignore":""},de={key:0,class:"reset-wrapper"},ve={key:1,class:"reset-wrapper"},he={class:"mono-slicer"},me=ie(()=>e.createElementVNode("div",{class:"slider-track"},null,-1)),fe=["min","max","value"],ge={__name:"MonoSlicer",props:{min:{type:Number,default:0},max:{type:Number,default:0},inputColor:{type:String,default:"#1A1A1A"},background:{type:String,default:"#FFFFFF"},borderColor:{type:String,default:"#FFFFFF"},selectColor:{type:String,default:"#4A4A4A"},textColor:{type:String,default:"#1A1A1A"},useResetSlot:{type:Boolean,default:!1},value:{type:Number,default:0},source:{type:Number,default:0}},emits:["update:value","reset"],setup(i,{emit:S}){const r=i;e.useCssVars(m=>({"90ad3208":_.value,"4f9eef70":k.value,"6e07ae3e":C.value,"2fd430a0":i.selectColor,"6b8169a4":f.value}));const _=e.computed(()=>r.inputColor),f=e.computed(()=>r.background),C=e.computed(()=>`${r.selectColor}33`),k=e.computed(()=>r.borderColor);function w(){S("reset")}const g=e.computed(()=>{const m=r.max-r.min,t=0,p=(r.value-r.min)/m*100;return{left:`${t}%`,width:`${p-t}%`,background:r.selectColor}});return(m,t)=>(e.openBlock(),e.createElementBlock("div",ce,[i.value!==i.source?(e.openBlock(),e.createElementBlock("div",de,[i.useResetSlot?e.renderSlot(m.$slots,"reset-action",{key:1,reset:w},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",onClick:w},[e.createVNode(ue.default,{name:"refresh",stroke:i.textColor},null,8,["stroke"])]))])):(e.openBlock(),e.createElementBlock("div",ve)),e.createElementVNode("div",he,[me,e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(g.value)},null,4),e.createElementVNode("input",{type:"range",min:i.min,max:i.max,value:Number(i.value),onInput:t[0]||(t[0]=p=>S("update:value",Number(p.target.value)))},null,40,fe)])]))}},pe=L._export_sfc(ge,[["__scopeId","data-v-3fd7d274"]]),ye=["id"],be=["xmlns","viewBox"],Ce=["transform"],ke=["fill","font-weight","x","y","font-size","transform"],we={key:3,class:"vue-data-ui-watermark"},xe=["innerHTML"],Se={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(i,{expose:S}){const r=i,{vue_ui_word_cloud:_}=u.useConfig(),f=e.computed({get(){return!!r.dataset&&r.dataset.length},set(o){return o}}),C=e.ref(typeof r.dataset=="string"?u.createWordCloudDatasetFromPlainText(r.dataset):r.dataset.map(o=>({...o,value:u.checkNaN(o.value)}))),k=e.ref(u.createUid()),w=e.ref(0),g=e.ref(null),m=e.ref(null),t=e.computed(()=>{const o=G.useNestedProp({userConfig:r.config,defaultConfig:_});return o.theme?{...G.useNestedProp({userConfig:u.themes.vue_ui_word_cloud[o.theme]||r.config,defaultConfig:o}),customPalette:u.themePalettes[o.theme]||u.palette}:o}),p=e.ref(null),v=e.ref(t.value.style.chart.width),s=e.ref({width:v.value,height:t.value.style.chart.height/t.value.style.chart.height*v.value,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize}),X=V.throttle(()=>{const{width:o,height:a}=V.useResponsive({chart:g.value,title:t.value.style.chart.title.text?m.value:null,slicer:t.value.style.chart.zoom.show&&p.value});s.value.width=o,s.value.height=a,e.nextTick(T)});e.watch(()=>v.value,()=>{j()});const j=V.debounce(()=>{s.value.width=Number(v.value),s.value.height=t.value.style.chart.height/t.value.style.chart.height*Number(v.value),T()},10);function H(){v.value=t.value.style.chart.width}const N=e.ref(null);e.onMounted(()=>{u.objectIsEmpty(r.dataset)?u.error({componentName:"VueUiWordCloud",type:"dataset"}):C.value.forEach((o,a)=>{u.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{f.value=!1,u.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive&&(N.value=new ResizeObserver(X),N.value.observe(g.value.parentNode))}),e.onBeforeUnmount(()=>{N.value&&N.value.disconnect()});const{isPrinting:A,isImaging:O,generatePdf:M,generateImage:R}=W.usePrinter({elementId:`wordCloud_${k.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud"}),$=e.ref({showTable:t.value.table.show});function Y(o,a,l="Arial"){const n=document.createElement("canvas").getContext("2d");return n.font=`${a}px ${t.value.style.chart.words.bold?"bold":"normal"} ${l}`,{width:n.measureText(o).width+t.value.style.chart.words.proximity,height:a}}function J(o,a){return o.x<a.x+a.width&&o.x+o.width>a.x&&o.y<a.y+a.height&&o.y+o.height>a.y}function K(o,a,l){const c=[],n={x:-a/2,y:-l/2,width:a,height:l},d=0,y=0;return o.forEach(b=>{let E=!1;for(let z=0;z<Math.max(a,l)/2&&!E;z+=t.value.style.chart.words.packingWeight)for(let I=0;I<360&&!E;I+=t.value.style.chart.words.packingWeight){const U=I*Math.PI/180,ee=d+z*Math.cos(U)-b.width/2,te=y+z*Math.sin(U)-b.height/2,h={...b,x:ee,y:te},oe=h.x>=n.x&&h.y>=n.y&&h.x+h.width<=n.x+n.width&&h.y+h.height<=n.y+n.height,le=c.some(ae=>J(h,ae));oe&&!le&&(c.push(h),E=!0)}}),c}const x=e.ref([]);e.watch(()=>r.dataset,T,{immediate:!0});function T(){const o=C.value.map(n=>n.value),a=Math.max(...o),l=Math.min(...o),c=C.value.map((n,d)=>{const y=(n.value-l)/(a-l)*(s.value.maxFontSize-s.value.minFontSize)+s.value.minFontSize,b=Y(n.name,y);return{...n,id:u.createUid(),fontSize:y,width:b.width,height:b.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[d]||t.value.customPalette[d%t.value.customPalette.length]||u.palette[d]||u.palette[d%u.palette.length]:t.value.style.chart.words.color}});x.value=K(c,s.value.width,s.value.height).sort((n,d)=>d.fontSize-n.fontSize)}const F=e.computed(()=>{const o=x.value.map(l=>({name:l.name,color:l.color})),a=x.value.map(l=>l.value);return{head:o,body:a}});function q(){e.nextTick(()=>{const o=F.value.head.map((c,n)=>[[c.name],[F.value.body[n]]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=u.createCsvContent(a);u.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const P=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=F.value.head.map((n,d)=>{const y=u.dataLabel({p:t.value.table.td.prefix,v:F.value.body[d],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},y]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:a,config:l}}),B=e.ref(!1);function Q(o){B.value=o,w.value+=1}function Z(){return x.value}function D(){$.value.showTable=!$.value.showTable}return S({getData:Z,generateCsv:q,generatePdf:M,generateImage:R,toggleTable:D}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:g,id:`wordCloud_${k.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:m,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(ne._sfc_main,{config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&f.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref:"details",key:`user_option_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(A),isImaging:e.unref(O),uid:k.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,isFullscreen:B.value,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,onToggleFullscreen:Q,onGeneratePdf:e.unref(M),onGenerateCsv:q,onGenerateImage:e.unref(R),onToggleTable:D},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:c})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:c})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:2,class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.value}),xmlns:e.unref(u.XMLNS),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`overflow:visible;background:${t.value.style.chart.backgroundColor};`)},[e.createElementVNode("g",{transform:`translate(${(s.value.width<=0?10:s.value.width)/2}, ${(s.value.height<=0?10:s.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,c)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(),e.createElementBlock("text",{fill:l.color,"font-weight":t.value.style.chart.words.bold?"bold":"normal",key:c,x:l.x,y:l.y,"font-size":l.fontSize,transform:`translate(${l.width/2}, ${l.height/2})`,style:e.normalizeStyle(`animation-delay:${c*t.value.animationDelayMs}ms !important`),class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":"middle","dominant-baseline":"middle"},e.toDisplayString(l.name),15,ke))]))),256))],8,Ce),e.renderSlot(o.$slots,"svg",{svg:{height:s.value.height,width:s.value.width}},void 0,!0)],14,be)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",we,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(A)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"chartSlicer",ref:p,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(pe,{key:0,value:v.value,"onUpdate:value":a[0]||(a[0]=l=>v.value=l),min:100,max:t.value.style.chart.width*3,textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,useResetSlot:t.value.style.chart.zoom.useResetSlot,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,source:t.value.style.chart.width,onReset:H},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["value","max","textColor","inputColor","selectColor","useResetSlot","background","borderColor","source"])):e.createCommentVNode("",!0)],4),f.value?(e.openBlock(),e.createBlock(re.default,{key:4,hideDetails:"",config:{open:$.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(se.DataTable,{colNames:P.value.colNames,head:P.value.head,body:P.value.body,config:P.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[1]||(a[1]=l=>$.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,xe)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],12,ye))}},Ne=L._export_sfc(Se,[["__scopeId","data-v-4e5216cf"]]);exports.default=Ne;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-sFjJ2dIj.cjs"),ne=require("./Title-CujodUjt.cjs"),W=require("./usePrinter-DSMMs1w9.cjs"),V=require("./useResponsive-B3TrDDIG.cjs"),re=require("./vue-ui-accordion-RuCkf_li.cjs"),se=require("./DataTable-wmKwMbsJ.cjs"),ue=require("./BaseIcon-CXbZK6D-.cjs"),L=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),G=require("./useNestedProp-ir0jEo5M.cjs"),ie=i=>(e.pushScopeId("data-v-3fd7d274"),i=i(),e.popScopeId(),i),ce={"data-html2canvas-ignore":""},de={key:0,class:"reset-wrapper"},ve={key:1,class:"reset-wrapper"},he={class:"mono-slicer"},me=ie(()=>e.createElementVNode("div",{class:"slider-track"},null,-1)),fe=["min","max","value"],ge={__name:"MonoSlicer",props:{min:{type:Number,default:0},max:{type:Number,default:0},inputColor:{type:String,default:"#1A1A1A"},background:{type:String,default:"#FFFFFF"},borderColor:{type:String,default:"#FFFFFF"},selectColor:{type:String,default:"#4A4A4A"},textColor:{type:String,default:"#1A1A1A"},useResetSlot:{type:Boolean,default:!1},value:{type:Number,default:0},source:{type:Number,default:0}},emits:["update:value","reset"],setup(i,{emit:S}){const r=i;e.useCssVars(m=>({"90ad3208":_.value,"4f9eef70":k.value,"6e07ae3e":C.value,"2fd430a0":i.selectColor,"6b8169a4":f.value}));const _=e.computed(()=>r.inputColor),f=e.computed(()=>r.background),C=e.computed(()=>`${r.selectColor}33`),k=e.computed(()=>r.borderColor);function w(){S("reset")}const g=e.computed(()=>{const m=r.max-r.min,t=0,p=(r.value-r.min)/m*100;return{left:`${t}%`,width:`${p-t}%`,background:r.selectColor}});return(m,t)=>(e.openBlock(),e.createElementBlock("div",ce,[i.value!==i.source?(e.openBlock(),e.createElementBlock("div",de,[i.useResetSlot?e.renderSlot(m.$slots,"reset-action",{key:1,reset:w},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",onClick:w},[e.createVNode(ue.default,{name:"refresh",stroke:i.textColor},null,8,["stroke"])]))])):(e.openBlock(),e.createElementBlock("div",ve)),e.createElementVNode("div",he,[me,e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(g.value)},null,4),e.createElementVNode("input",{type:"range",min:i.min,max:i.max,value:Number(i.value),onInput:t[0]||(t[0]=p=>S("update:value",Number(p.target.value)))},null,40,fe)])]))}},pe=L._export_sfc(ge,[["__scopeId","data-v-3fd7d274"]]),ye=["id"],be=["xmlns","viewBox"],Ce=["transform"],ke=["fill","font-weight","x","y","font-size","transform"],we={key:3,class:"vue-data-ui-watermark"},xe=["innerHTML"],Se={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(i,{expose:S}){const r=i,{vue_ui_word_cloud:_}=u.useConfig(),f=e.computed({get(){return!!r.dataset&&r.dataset.length},set(o){return o}}),C=e.ref(typeof r.dataset=="string"?u.createWordCloudDatasetFromPlainText(r.dataset):r.dataset.map(o=>({...o,value:u.checkNaN(o.value)}))),k=e.ref(u.createUid()),w=e.ref(0),g=e.ref(null),m=e.ref(null),t=e.computed(()=>{const o=G.useNestedProp({userConfig:r.config,defaultConfig:_});return o.theme?{...G.useNestedProp({userConfig:u.themes.vue_ui_word_cloud[o.theme]||r.config,defaultConfig:o}),customPalette:u.themePalettes[o.theme]||u.palette}:o}),p=e.ref(null),v=e.ref(t.value.style.chart.width),s=e.ref({width:v.value,height:t.value.style.chart.height/t.value.style.chart.height*v.value,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize}),X=V.throttle(()=>{const{width:o,height:a}=V.useResponsive({chart:g.value,title:t.value.style.chart.title.text?m.value:null,slicer:t.value.style.chart.zoom.show&&p.value});s.value.width=o,s.value.height=a,e.nextTick(T)});e.watch(()=>v.value,()=>{j()});const j=V.debounce(()=>{s.value.width=Number(v.value),s.value.height=t.value.style.chart.height/t.value.style.chart.height*Number(v.value),T()},10);function H(){v.value=t.value.style.chart.width}const N=e.ref(null);e.onMounted(()=>{u.objectIsEmpty(r.dataset)?u.error({componentName:"VueUiWordCloud",type:"dataset"}):C.value.forEach((o,a)=>{u.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{f.value=!1,u.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive&&(N.value=new ResizeObserver(X),N.value.observe(g.value.parentNode))}),e.onBeforeUnmount(()=>{N.value&&N.value.disconnect()});const{isPrinting:A,isImaging:O,generatePdf:M,generateImage:R}=W.usePrinter({elementId:`wordCloud_${k.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud"}),$=e.ref({showTable:t.value.table.show});function Y(o,a,l="Arial"){const n=document.createElement("canvas").getContext("2d");return n.font=`${a}px ${t.value.style.chart.words.bold?"bold":"normal"} ${l}`,{width:n.measureText(o).width+t.value.style.chart.words.proximity,height:a}}function J(o,a){return o.x<a.x+a.width&&o.x+o.width>a.x&&o.y<a.y+a.height&&o.y+o.height>a.y}function K(o,a,l){const c=[],n={x:-a/2,y:-l/2,width:a,height:l},d=0,y=0;return o.forEach(b=>{let E=!1;for(let z=0;z<Math.max(a,l)/2&&!E;z+=t.value.style.chart.words.packingWeight)for(let I=0;I<360&&!E;I+=t.value.style.chart.words.packingWeight){const U=I*Math.PI/180,ee=d+z*Math.cos(U)-b.width/2,te=y+z*Math.sin(U)-b.height/2,h={...b,x:ee,y:te},oe=h.x>=n.x&&h.y>=n.y&&h.x+h.width<=n.x+n.width&&h.y+h.height<=n.y+n.height,le=c.some(ae=>J(h,ae));oe&&!le&&(c.push(h),E=!0)}}),c}const x=e.ref([]);e.watch(()=>r.dataset,T,{immediate:!0});function T(){const o=C.value.map(n=>n.value),a=Math.max(...o),l=Math.min(...o),c=C.value.map((n,d)=>{const y=(n.value-l)/(a-l)*(s.value.maxFontSize-s.value.minFontSize)+s.value.minFontSize,b=Y(n.name,y);return{...n,id:u.createUid(),fontSize:y,width:b.width,height:b.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[d]||t.value.customPalette[d%t.value.customPalette.length]||u.palette[d]||u.palette[d%u.palette.length]:t.value.style.chart.words.color}});x.value=K(c,s.value.width,s.value.height).sort((n,d)=>d.fontSize-n.fontSize)}const F=e.computed(()=>{const o=x.value.map(l=>({name:l.name,color:l.color})),a=x.value.map(l=>l.value);return{head:o,body:a}});function q(){e.nextTick(()=>{const o=F.value.head.map((c,n)=>[[c.name],[F.value.body[n]]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=u.createCsvContent(a);u.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const P=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=F.value.head.map((n,d)=>{const y=u.dataLabel({p:t.value.table.td.prefix,v:F.value.body[d],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},y]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:a,config:l}}),B=e.ref(!1);function Q(o){B.value=o,w.value+=1}function Z(){return x.value}function D(){$.value.showTable=!$.value.showTable}return S({getData:Z,generateCsv:q,generatePdf:M,generateImage:R,toggleTable:D}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:g,id:`wordCloud_${k.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:m,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(ne._sfc_main,{config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&f.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref:"details",key:`user_option_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(A),isImaging:e.unref(O),uid:k.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,isFullscreen:B.value,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,onToggleFullscreen:Q,onGeneratePdf:e.unref(M),onGenerateCsv:q,onGenerateImage:e.unref(R),onToggleTable:D},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:c})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:c})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:2,class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.value}),xmlns:e.unref(u.XMLNS),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`overflow:visible;background:${t.value.style.chart.backgroundColor};`)},[e.createElementVNode("g",{transform:`translate(${(s.value.width<=0?10:s.value.width)/2}, ${(s.value.height<=0?10:s.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,c)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(),e.createElementBlock("text",{fill:l.color,"font-weight":t.value.style.chart.words.bold?"bold":"normal",key:c,x:l.x,y:l.y,"font-size":l.fontSize,transform:`translate(${l.width/2}, ${l.height/2})`,style:e.normalizeStyle(`animation-delay:${c*t.value.animationDelayMs}ms !important`),class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":"middle","dominant-baseline":"middle"},e.toDisplayString(l.name),15,ke))]))),256))],8,Ce),e.renderSlot(o.$slots,"svg",{svg:{height:s.value.height,width:s.value.width}},void 0,!0)],14,be)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",we,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(A)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"chartSlicer",ref:p,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(pe,{key:0,value:v.value,"onUpdate:value":a[0]||(a[0]=l=>v.value=l),min:100,max:t.value.style.chart.width*3,textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,useResetSlot:t.value.style.chart.zoom.useResetSlot,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,source:t.value.style.chart.width,onReset:H},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["value","max","textColor","inputColor","selectColor","useResetSlot","background","borderColor","source"])):e.createCommentVNode("",!0)],4),f.value?(e.openBlock(),e.createBlock(re.default,{key:4,hideDetails:"",config:{open:$.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(se.DataTable,{colNames:P.value.colNames,head:P.value.head,body:P.value.body,config:P.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[1]||(a[1]=l=>$.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,xe)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],12,ye))}},Ne=L._export_sfc(Se,[["__scopeId","data-v-4e5216cf"]]);exports.default=Ne;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { useCssVars as we, computed as f, openBlock as i, createElementBlock as v, createVNode as q, renderSlot as m, createElementVNode as C, normalizeStyle as N, pushScopeId as xe, popScopeId as $e, ref as c, watch as te, onMounted as Se, onBeforeUnmount as Fe, createCommentVNode as F, createBlock as L, unref as p, createSlots as Ne, withCtx as h, normalizeProps as X, guardReactiveProps as j, normalizeClass as ae, Fragment as _e, renderList as Pe, toDisplayString as oe, createTextVNode as Te, nextTick as le } from "vue";
|
|
2
|
-
import { u as ze, W as Ie, s as Ae, c as se, t as Oe, a as Me, p as E, o as We, e as ne, g as De, f as Be, X as Ee, q as Re, r as Ue } from "./index-
|
|
3
|
-
import { _ as Ve } from "./Title-
|
|
4
|
-
import { u as Ge, U as Le } from "./usePrinter-
|
|
2
|
+
import { u as ze, W as Ie, s as Ae, c as se, t as Oe, a as Me, p as E, o as We, e as ne, g as De, f as Be, X as Ee, q as Re, r as Ue } from "./index-Dvs5Ra-u.js";
|
|
3
|
+
import { _ as Ve } from "./Title-Ngy9HNqO.js";
|
|
4
|
+
import { u as Ge, U as Le } from "./usePrinter-B8-keRMa.js";
|
|
5
5
|
import { d as Xe, t as je, u as qe } from "./useResponsive-NZB-WLRF.js";
|
|
6
|
-
import He from "./vue-ui-accordion-
|
|
7
|
-
import { D as Ye } from "./DataTable-
|
|
8
|
-
import Je from "./BaseIcon-
|
|
6
|
+
import He from "./vue-ui-accordion-C-qAry7P.js";
|
|
7
|
+
import { D as Ye } from "./DataTable-BOdJVZzF.js";
|
|
8
|
+
import Je from "./BaseIcon-_V_BEdy8.js";
|
|
9
9
|
import { _ as ue } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
|
-
import { u as re } from "./useNestedProp-
|
|
10
|
+
import { u as re } from "./useNestedProp-UohhCyBz.js";
|
|
11
11
|
const Ke = (r) => (xe("data-v-3fd7d274"), r = r(), $e(), r), Qe = { "data-html2canvas-ignore": "" }, Ze = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "reset-wrapper"
|