vue-data-ui 2.3.73 → 2.3.75
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-B9ZuNkP-.js → Arrow-BTG7M25z.js} +1 -1
- package/dist/{Arrow-B8nZeqNJ.cjs → Arrow-CZK77NmC.cjs} +1 -1
- package/dist/{BaseIcon-CXbZK6D-.cjs → BaseIcon--PMhZ3f-.cjs} +1 -1
- package/dist/{BaseIcon-_V_BEdy8.js → BaseIcon-BAOfPaXs.js} +1 -1
- package/dist/{DataTable-BOdJVZzF.js → DataTable-CQANRZju.js} +2 -2
- package/dist/{DataTable-wmKwMbsJ.cjs → DataTable-DjQzrklZ.cjs} +1 -1
- package/dist/{Legend-DdndVhHV.cjs → Legend-CtbPB0Bo.cjs} +1 -1
- package/dist/{Legend-CHd5QFPM.js → Legend-DX1kv21U.js} +1 -1
- package/dist/{Shape-CLRxBhyM.cjs → Shape-CadGs1Am.cjs} +1 -1
- package/dist/{Shape-DNbJlwSU.js → Shape-kqcyauhC.js} +1 -1
- package/dist/{Slicer-Dts-BToH.cjs → Slicer-i_oECHxH.cjs} +1 -1
- package/dist/{Slicer-8Gg45iGX.js → Slicer-yaJs-izT.js} +2 -2
- package/dist/{Title-Ngy9HNqO.js → Title-C26I_HC3.js} +1 -1
- package/dist/{Title-CujodUjt.cjs → Title-XBiDFYKD.cjs} +1 -1
- package/dist/{Tooltip-BCtg7xYX.js → Tooltip-CH8GmDCG.js} +1 -1
- package/dist/{Tooltip-DsmWz8gF.cjs → Tooltip-DxtWkIt5.cjs} +1 -1
- package/dist/{index-Dvs5Ra-u.js → index-Cm4Iry5c.js} +1 -1
- package/dist/{index-sFjJ2dIj.cjs → index-DYUBiaGS.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-UohhCyBz.js → useNestedProp-CurQIHTa.js} +1 -1
- package/dist/{useNestedProp-ir0jEo5M.cjs → useNestedProp-w7AMWWmz.cjs} +1 -1
- package/dist/{usePrinter-B8-keRMa.js → usePrinter-B8RnF8_q.js} +1 -1
- package/dist/{usePrinter-DSMMs1w9.cjs → usePrinter-ZlHxdaEz.cjs} +1 -1
- package/dist/{vue-data-ui-NvV5qa--.cjs → vue-data-ui-B7amrpT-.cjs} +1 -1
- package/dist/{vue-data-ui-Bgo6YUhl.js → vue-data-ui-Bj6kEIpq.js} +57 -57
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/vue-ui-3d-bar-BAz41kL7.cjs +19 -0
- package/dist/{vue-ui-3d-bar-DckNIYgA.js → vue-ui-3d-bar-Bg9IgVVc.js} +499 -486
- package/dist/{vue-ui-accordion-RuCkf_li.cjs → vue-ui-accordion-1WxrfiCH.cjs} +1 -1
- package/dist/{vue-ui-accordion-C-qAry7P.js → vue-ui-accordion-Cb6XBCbu.js} +3 -3
- package/dist/{vue-ui-age-pyramid-CamjaXUw.js → vue-ui-age-pyramid-BhwmnQru.js} +182 -169
- package/dist/vue-ui-age-pyramid-CHNvRXx8.cjs +1 -0
- package/dist/{vue-ui-annotator-D0kYZ56C.cjs → vue-ui-annotator-B22cdlhA.cjs} +1 -1
- package/dist/{vue-ui-annotator-DMmdqorj.js → vue-ui-annotator-BiHQvMdW.js} +1 -1
- package/dist/{vue-ui-candlestick-DRi8lDTn.js → vue-ui-candlestick-Cl9dyh4l.js} +295 -279
- package/dist/vue-ui-candlestick-D7DjdYyw.cjs +2 -0
- package/dist/vue-ui-carousel-table-Do5cYRqN.cjs +1 -0
- package/dist/{vue-ui-carousel-table-u5OoOMr1.js → vue-ui-carousel-table-QsONwqNz.js} +106 -91
- package/dist/vue-ui-chestnut-CyE8MafY.cjs +6 -0
- package/dist/{vue-ui-chestnut-D5a4OH1D.js → vue-ui-chestnut-Drb01WMC.js} +215 -204
- package/dist/{vue-ui-cursor-Bp_PHbz4.js → vue-ui-cursor-BP04_XbB.js} +2 -2
- package/dist/{vue-ui-cursor-DpBsZNEE.cjs → vue-ui-cursor-DZeTQBKz.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BwBYH8V_.js → vue-ui-dashboard-BWdx5gjZ.js} +2 -2
- package/dist/{vue-ui-dashboard--kjU0uMc.cjs → vue-ui-dashboard-Z63RE1XS.cjs} +1 -1
- package/dist/{vue-ui-digits-CIV9J3SW.cjs → vue-ui-digits-CBQaHW6a.cjs} +1 -1
- package/dist/{vue-ui-digits-t2G4B6uD.js → vue-ui-digits-DUhkLcmd.js} +2 -2
- package/dist/vue-ui-donut-D2YJYgOB.cjs +1 -0
- package/dist/{vue-ui-donut-BTug2gsP.js → vue-ui-donut-DRPSwmGr.js} +376 -362
- package/dist/{vue-ui-donut-evolution-DTD0Hfgh.js → vue-ui-donut-evolution-gRXAyxq8.js} +270 -255
- package/dist/vue-ui-donut-evolution-jAMVgNHQ.cjs +1 -0
- package/dist/{vue-ui-dumbbell-BZw7lntE.js → vue-ui-dumbbell-CQo5jqSK.js} +232 -213
- package/dist/vue-ui-dumbbell-DLfZcrXq.cjs +9 -0
- package/dist/vue-ui-flow-BQ3UbMUb.js +481 -0
- package/dist/vue-ui-flow-BlX2-eEC.cjs +1 -0
- package/dist/{vue-ui-galaxy-Bjlm3WtB.js → vue-ui-galaxy-BHWugUKG.js} +175 -162
- package/dist/vue-ui-galaxy-Cax5o6Yl.cjs +1 -0
- package/dist/vue-ui-gauge-DG6_kvKh.js +500 -0
- package/dist/vue-ui-gauge-DpGcv_00.cjs +1 -0
- package/dist/vue-ui-gizmo-D9Vh9Rmr.cjs +1 -0
- package/dist/{vue-ui-gizmo-CiutQM-A.js → vue-ui-gizmo-bV148qAf.js} +66 -53
- package/dist/{vue-ui-heatmap-C933pQPU.js → vue-ui-heatmap-BZZUvnMa.js} +157 -143
- package/dist/vue-ui-heatmap-B_ELXKKV.cjs +1 -0
- package/dist/vue-ui-kpi-C5v7qQvZ.js +98 -0
- package/dist/vue-ui-kpi-CwVAvTB2.cjs +1 -0
- package/dist/{vue-ui-mini-loader-B5XG2gKd.js → vue-ui-mini-loader-BdKizX_J.js} +2 -2
- package/dist/{vue-ui-mini-loader-C67Z1C6r.cjs → vue-ui-mini-loader-DZNY-3rr.cjs} +1 -1
- package/dist/{vue-ui-molecule-DzIeuL8t.js → vue-ui-molecule-MKyrhqqm.js} +177 -167
- package/dist/vue-ui-molecule-bva6OvPc.cjs +1 -0
- package/dist/{vue-ui-mood-radar-02L4M-n_.js → vue-ui-mood-radar-BNIFFvq0.js} +172 -161
- package/dist/vue-ui-mood-radar-CzQOAyNI.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-BY50trfJ.js → vue-ui-nested-donuts-BDAlZrMF.js} +377 -364
- package/dist/vue-ui-nested-donuts-CxdZC6JF.cjs +17 -0
- package/dist/{vue-ui-onion-BmQ7B9xY.js → vue-ui-onion-CFa4VD-w.js} +191 -177
- package/dist/vue-ui-onion-Df7YcsVR.cjs +5 -0
- package/dist/vue-ui-parallel-coordinate-plot-D7Q2zfcR.cjs +8 -0
- package/dist/{vue-ui-parallel-coordinate-plot-BdfcqlfT.js → vue-ui-parallel-coordinate-plot-DmqYXT-U.js} +298 -284
- package/dist/{vue-ui-quadrant-CLimyRoA.js → vue-ui-quadrant-D5jHkq9g.js} +347 -334
- package/dist/vue-ui-quadrant-ZqhcVYf5.cjs +1 -0
- package/dist/{vue-ui-quick-chart-CX8Kas-o.js → vue-ui-quick-chart-BjXXSx7V.js} +483 -469
- package/dist/vue-ui-quick-chart-Dt9AsEU6.cjs +15 -0
- package/dist/vue-ui-radar-2EuZr7i2.cjs +1 -0
- package/dist/{vue-ui-radar-CK0PB5oY.js → vue-ui-radar-CW8EKW4o.js} +202 -189
- package/dist/{vue-ui-rating-Ceu3pXmF.cjs → vue-ui-rating-DrtLvVA0.cjs} +1 -1
- package/dist/{vue-ui-rating-BnqWN2ui.js → vue-ui-rating-eSWsmJUU.js} +2 -2
- package/dist/vue-ui-relation-circle-C60OTe88.cjs +1 -0
- package/dist/vue-ui-relation-circle-DiUCpEqa.js +322 -0
- package/dist/{vue-ui-rings-CYthauSM.js → vue-ui-rings-BxhLbyG0.js} +203 -189
- package/dist/vue-ui-rings-CHq-a5ZS.cjs +2 -0
- package/dist/{vue-ui-scatter-Cxr9eymz.js → vue-ui-scatter-DQchX_mM.js} +284 -270
- package/dist/vue-ui-scatter-DZUZUbnk.cjs +1 -0
- package/dist/{vue-ui-screenshot-CVWC5rbJ.js → vue-ui-screenshot-CLa9vMzM.js} +1 -1
- package/dist/{vue-ui-screenshot-sBd8-Oyh.cjs → vue-ui-screenshot-SLSIpqx2.cjs} +1 -1
- package/dist/{vue-ui-skeleton-CAvlIcgk.js → vue-ui-skeleton-C1oUnz7R.js} +2 -2
- package/dist/{vue-ui-skeleton-CqF0NJ4g.cjs → vue-ui-skeleton-ClpTCY1x.cjs} +1 -1
- package/dist/{vue-ui-smiley-CXbipVsb.js → vue-ui-smiley-CmWHSt1S.js} +2 -2
- package/dist/{vue-ui-smiley-c_I60YOy.cjs → vue-ui-smiley-Daw8fPDy.cjs} +1 -1
- package/dist/vue-ui-spark-trend-CO69Dg31.js +263 -0
- package/dist/vue-ui-spark-trend-DmDlv8ie.cjs +1 -0
- package/dist/{vue-ui-sparkbar-Dm-2_5Ef.js → vue-ui-sparkbar-BRlqpe4e.js} +95 -87
- package/dist/vue-ui-sparkbar-BUGdi0BY.cjs +1 -0
- package/dist/vue-ui-sparkgauge-CCxKzDjT.cjs +1 -0
- package/dist/vue-ui-sparkgauge-CbuFESsM.js +178 -0
- package/dist/{vue-ui-sparkhistogram-qf87TXA-.js → vue-ui-sparkhistogram-B4-hrDHz.js} +79 -68
- package/dist/vue-ui-sparkhistogram-XtqX10_t.cjs +1 -0
- package/dist/vue-ui-sparkline-BZTEi9YC.cjs +1 -0
- package/dist/{vue-ui-sparkline-CZBgvY1A.js → vue-ui-sparkline-DlXNmG6M.js} +142 -123
- package/dist/vue-ui-sparkstackbar-CDmZeXnq.cjs +1 -0
- package/dist/{vue-ui-sparkstackbar-GtkDZDXZ.js → vue-ui-sparkstackbar-J1YowQmP.js} +120 -104
- package/dist/{vue-ui-stackbar-D_Ui7xec.js → vue-ui-stackbar-CKIDqkkY.js} +235 -222
- package/dist/vue-ui-stackbar-CXGWukoJ.cjs +6 -0
- package/dist/vue-ui-strip-plot-CvmoRcYN.cjs +1 -0
- package/dist/{vue-ui-strip-plot--VJ3f5UV.js → vue-ui-strip-plot-JVLwIy0j.js} +246 -232
- package/dist/{vue-ui-table-BCQ7voEV.js → vue-ui-table-BSi_cHh7.js} +1 -1
- package/dist/{vue-ui-table-B_6N0VOD.cjs → vue-ui-table-Dqi64VE7.cjs} +1 -1
- package/dist/vue-ui-table-heatmap-BwghEh5t.cjs +1 -0
- package/dist/{vue-ui-table-heatmap-UwpQQMHB.js → vue-ui-table-heatmap-CfvW3rcm.js} +106 -95
- package/dist/{vue-ui-table-sparkline-Bzqs2Hcp.js → vue-ui-table-sparkline-Y6Lrrzxy.js} +151 -138
- package/dist/vue-ui-table-sparkline-bIy3kkHB.cjs +1 -0
- package/dist/{vue-ui-thermometer-BQbYzsSV.js → vue-ui-thermometer-BPTs7Nxc.js} +116 -104
- package/dist/vue-ui-thermometer-DDtxYr7w.cjs +1 -0
- package/dist/{vue-ui-timer-KGEswANF.js → vue-ui-timer-CkB7eZaE.js} +191 -176
- package/dist/vue-ui-timer-DRSSYxOX.cjs +64 -0
- package/dist/{vue-ui-tiremarks-BSkMCIu1.js → vue-ui-tiremarks-BbOaoY8S.js} +115 -103
- package/dist/vue-ui-tiremarks-Bttwg3-p.cjs +1 -0
- package/dist/vue-ui-treemap-Chq0WQPe.cjs +1 -0
- package/dist/{vue-ui-treemap-DIWveOrq.js → vue-ui-treemap-CoaK3wBl.js} +251 -237
- package/dist/{vue-ui-vertical-bar-Dx6wReOw.js → vue-ui-vertical-bar-BA43_uHV.js} +374 -358
- package/dist/vue-ui-vertical-bar-BLIUt-HT.cjs +4 -0
- package/dist/{vue-ui-waffle-D3jMPOd3.js → vue-ui-waffle-BoEf8CcG.js} +285 -265
- package/dist/vue-ui-waffle-NBjY0mko.cjs +1 -0
- package/dist/vue-ui-wheel-Bgo2jpj0.js +255 -0
- package/dist/vue-ui-wheel-t5bI4a-P.cjs +1 -0
- package/dist/vue-ui-word-cloud-DPW_-Hzz.cjs +1 -0
- package/dist/vue-ui-word-cloud-Jd9_JUyi.js +512 -0
- package/dist/{vue-ui-xy-9_2IHEOX.js → vue-ui-xy-BMBYAC4z.js} +300 -274
- package/dist/vue-ui-xy-CBHEBcZK.cjs +3 -0
- package/dist/vue-ui-xy-canvas-D5FqRF4p.cjs +9 -0
- package/dist/{vue-ui-xy-canvas-DGuGy69l.js → vue-ui-xy-canvas-LOsQ_DM-.js} +345 -327
- package/package.json +1 -1
- package/dist/vue-ui-3d-bar-DhzN0gd4.cjs +0 -19
- package/dist/vue-ui-age-pyramid-CfUUEeKt.cjs +0 -1
- package/dist/vue-ui-candlestick-DJIJnnI_.cjs +0 -2
- package/dist/vue-ui-carousel-table-uYt1zVjx.cjs +0 -1
- package/dist/vue-ui-chestnut-CG5krVO-.cjs +0 -6
- package/dist/vue-ui-donut-D6SrEIEJ.cjs +0 -1
- package/dist/vue-ui-donut-evolution-Cb45erSA.cjs +0 -1
- package/dist/vue-ui-dumbbell-DVabaAYH.cjs +0 -9
- package/dist/vue-ui-flow-Bn1EP9Z1.cjs +0 -1
- package/dist/vue-ui-flow-Cz_xaLAs.js +0 -469
- package/dist/vue-ui-galaxy-Drnhlmmw.cjs +0 -1
- package/dist/vue-ui-gauge-CxIVYnG2.js +0 -488
- package/dist/vue-ui-gauge-D2reVZ-b.cjs +0 -1
- package/dist/vue-ui-gizmo-B6ZwXwFY.cjs +0 -1
- package/dist/vue-ui-heatmap-ClFm7qUu.cjs +0 -1
- package/dist/vue-ui-kpi-CdPFWSHA.cjs +0 -1
- package/dist/vue-ui-kpi-ClreiT4V.js +0 -84
- package/dist/vue-ui-molecule-JJQ3af-R.cjs +0 -1
- package/dist/vue-ui-mood-radar-DT4JU_6B.cjs +0 -1
- package/dist/vue-ui-nested-donuts-D6Dihmne.cjs +0 -17
- package/dist/vue-ui-onion-DoNDCpth.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-CJMjEDXR.cjs +0 -8
- package/dist/vue-ui-quadrant-DWqmU3-5.cjs +0 -1
- package/dist/vue-ui-quick-chart-CB5VelG0.cjs +0 -15
- package/dist/vue-ui-radar-aTceo-HQ.cjs +0 -1
- package/dist/vue-ui-relation-circle-D1z8MBVH.js +0 -310
- package/dist/vue-ui-relation-circle-DWGtziD_.cjs +0 -1
- package/dist/vue-ui-rings-gp0sEMy6.cjs +0 -2
- package/dist/vue-ui-scatter-BKl2fUIR.cjs +0 -1
- package/dist/vue-ui-spark-trend-C3sBXu8D.js +0 -251
- package/dist/vue-ui-spark-trend-CXkkMK6N.cjs +0 -1
- package/dist/vue-ui-sparkbar-BkN5iTUq.cjs +0 -1
- package/dist/vue-ui-sparkgauge-D4EqU3x3.cjs +0 -1
- package/dist/vue-ui-sparkgauge-FKTXvE7e.js +0 -167
- package/dist/vue-ui-sparkhistogram-BkJz2dBD.cjs +0 -1
- package/dist/vue-ui-sparkline-TPkuvKtA.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-CzzfnPDS.cjs +0 -1
- package/dist/vue-ui-stackbar-NHgsl2-Z.cjs +0 -6
- package/dist/vue-ui-strip-plot-CU6OtKt7.cjs +0 -1
- package/dist/vue-ui-table-heatmap-DFMF1RZ0.cjs +0 -1
- package/dist/vue-ui-table-sparkline-DWvOKdPb.cjs +0 -1
- package/dist/vue-ui-thermometer-BOuuVWuf.cjs +0 -1
- package/dist/vue-ui-timer-BCiMjXdm.cjs +0 -64
- package/dist/vue-ui-tiremarks-DuEz8cO5.cjs +0 -1
- package/dist/vue-ui-treemap-BO8gKQ4O.cjs +0 -1
- package/dist/vue-ui-vertical-bar-Dpzyha_P.cjs +0 -4
- package/dist/vue-ui-waffle-C0-IVDjk.cjs +0 -1
- package/dist/vue-ui-wheel-B10kCoLD.js +0 -242
- package/dist/vue-ui-wheel-mWdIHlXV.cjs +0 -1
- package/dist/vue-ui-word-cloud-CYtRxpdV.cjs +0 -1
- package/dist/vue-ui-word-cloud-rhrsHes4.js +0 -498
- package/dist/vue-ui-xy-CFqs5rtd.cjs +0 -3
- package/dist/vue-ui-xy-canvas-sLH0pM-i.cjs +0 -9
|
@@ -1 +0,0 @@
|
|
|
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,242 +0,0 @@
|
|
|
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-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
|
-
import { t as ye, u as fe } from "./useResponsive-NZB-WLRF.js";
|
|
6
|
-
import me from "./vue-ui-skeleton-CAvlIcgk.js";
|
|
7
|
-
import { u as B } from "./useNestedProp-UohhCyBz.js";
|
|
8
|
-
import { _ as ge } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
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
|
-
key: 3,
|
|
11
|
-
class: "vue-data-ui-watermark"
|
|
12
|
-
}, xe = {
|
|
13
|
-
__name: "vue-ui-wheel",
|
|
14
|
-
props: {
|
|
15
|
-
config: {
|
|
16
|
-
type: Object,
|
|
17
|
-
default() {
|
|
18
|
-
return {};
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
dataset: {
|
|
22
|
-
type: Object,
|
|
23
|
-
default() {
|
|
24
|
-
return {};
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
setup(G, { expose: T }) {
|
|
29
|
-
const h = G, { vue_ui_wheel: E } = le(), k = p(() => !!h.dataset && Object.keys(h.dataset).length), w = r(se()), j = r(null), x = r(0), f = r(null), I = r(null), e = p(() => {
|
|
30
|
-
const t = B({
|
|
31
|
-
userConfig: h.config,
|
|
32
|
-
defaultConfig: E
|
|
33
|
-
});
|
|
34
|
-
return t.theme ? {
|
|
35
|
-
...B({
|
|
36
|
-
userConfig: ne.vue_ui_wheel[t.theme] || h.config,
|
|
37
|
-
defaultConfig: t
|
|
38
|
-
})
|
|
39
|
-
} : t;
|
|
40
|
-
}), { isPrinting: $, isImaging: F, generatePdf: P, generateImage: z } = ve({
|
|
41
|
-
elementId: w.value,
|
|
42
|
-
fileName: e.value.style.chart.title.text || "vue-ui-wheel"
|
|
43
|
-
}), l = r({
|
|
44
|
-
size: 360,
|
|
45
|
-
height: 360,
|
|
46
|
-
width: 360
|
|
47
|
-
}), b = r(e.value.style.chart.layout.percentage.fontSize), o = p(() => ({
|
|
48
|
-
radius: Math.min(l.value.width, l.value.height) * 0.9 / 2,
|
|
49
|
-
centerX: l.value.width / 2,
|
|
50
|
-
centerY: l.value.height / 2
|
|
51
|
-
}));
|
|
52
|
-
function O(t, i = 1) {
|
|
53
|
-
return {
|
|
54
|
-
x: o.value.centerX + o.value.radius * Math.cos(29.85 + t * Math.PI / 180) * i,
|
|
55
|
-
y: o.value.centerY + o.value.radius * Math.sin(29.85 + t * Math.PI / 180) * i
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
const s = r(e.value.style.chart.animation.use ? 0 : h.dataset.percentage || 0);
|
|
59
|
-
J(() => h.dataset, (t) => {
|
|
60
|
-
e.value.style.chart.animation.use ? S(t.percentage) : s.value = t.percentage || 0;
|
|
61
|
-
}, { deep: !0 });
|
|
62
|
-
const m = r(null);
|
|
63
|
-
K(() => {
|
|
64
|
-
if (oe(h.dataset) && re({
|
|
65
|
-
componentName: "VueUiWheel",
|
|
66
|
-
type: "dataset"
|
|
67
|
-
}), S(h.dataset.percentage || 0), e.value.responsive) {
|
|
68
|
-
const t = ye(() => {
|
|
69
|
-
const { width: i, height: a } = fe({
|
|
70
|
-
chart: f.value,
|
|
71
|
-
title: e.value.style.chart.title.text ? I.value : null
|
|
72
|
-
});
|
|
73
|
-
l.value.width = i, l.value.height = a, b.value = e.value.style.chart.layout.percentage.fontSize / 360 * Math.min(i, a);
|
|
74
|
-
});
|
|
75
|
-
m.value = new ResizeObserver(t), m.value.observe(f.value.parentNode);
|
|
76
|
-
}
|
|
77
|
-
}), Q(() => {
|
|
78
|
-
m.value && m.value.disconnect();
|
|
79
|
-
});
|
|
80
|
-
function S(t) {
|
|
81
|
-
let i = e.value.style.chart.animation.speed;
|
|
82
|
-
const a = Math.abs(t - s.value) / (i * 120);
|
|
83
|
-
function c() {
|
|
84
|
-
s.value < t ? s.value = Math.min(s.value + a, t) : s.value > t && (s.value = Math.max(s.value - a, t)), s.value !== t && requestAnimationFrame(c);
|
|
85
|
-
}
|
|
86
|
-
c();
|
|
87
|
-
}
|
|
88
|
-
const D = p(() => {
|
|
89
|
-
const t = [];
|
|
90
|
-
for (let a = 0; a < 100; a += 1) {
|
|
91
|
-
const c = s.value > a ? e.value.style.chart.layout.wheel.ticks.activeColor : e.value.style.chart.layout.wheel.ticks.inactiveColor, { x: Y, y: H } = O(l.value.size / 100 * a), { x: W, y: q } = O(l.value.size / 100 * a, 0.9);
|
|
92
|
-
t.push({
|
|
93
|
-
x1: Y,
|
|
94
|
-
y1: H,
|
|
95
|
-
x2: W,
|
|
96
|
-
y2: q,
|
|
97
|
-
color: e.value.style.chart.layout.wheel.ticks.gradient.show ? U(c, a / 100 * (e.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity / 100)) : c
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
return t;
|
|
101
|
-
}), g = r(!1);
|
|
102
|
-
function R(t) {
|
|
103
|
-
g.value = t, x.value += 1;
|
|
104
|
-
}
|
|
105
|
-
return T({
|
|
106
|
-
generatePdf: P,
|
|
107
|
-
generateImage: z
|
|
108
|
-
}), (t, i) => (u(), v("div", {
|
|
109
|
-
class: "vue-ui-wheel",
|
|
110
|
-
ref_key: "wheelChart",
|
|
111
|
-
ref: f,
|
|
112
|
-
id: w.value,
|
|
113
|
-
style: C(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height:100%" : ""}`)
|
|
114
|
-
}, [
|
|
115
|
-
e.value.style.chart.title.text ? (u(), v("div", {
|
|
116
|
-
key: 0,
|
|
117
|
-
ref_key: "chartTitle",
|
|
118
|
-
ref: I,
|
|
119
|
-
style: C(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:12px`)
|
|
120
|
-
}, [
|
|
121
|
-
Z(he, {
|
|
122
|
-
config: {
|
|
123
|
-
title: {
|
|
124
|
-
cy: "wheel-title",
|
|
125
|
-
...e.value.style.chart.title
|
|
126
|
-
},
|
|
127
|
-
subtitle: {
|
|
128
|
-
cy: "wheel-subtitle",
|
|
129
|
-
...e.value.style.chart.title.subtitle
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}, null, 8, ["config"])
|
|
133
|
-
], 4)) : d("", !0),
|
|
134
|
-
e.value.userOptions.show && k.value ? (u(), M(de, {
|
|
135
|
-
ref_key: "details",
|
|
136
|
-
ref: j,
|
|
137
|
-
key: `user_options_${x.value}`,
|
|
138
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
139
|
-
color: e.value.style.chart.color,
|
|
140
|
-
isPrinting: n($),
|
|
141
|
-
isImaging: n(F),
|
|
142
|
-
uid: w.value,
|
|
143
|
-
hasPdf: e.value.userOptions.buttons.pdf,
|
|
144
|
-
hasImg: e.value.userOptions.buttons.img,
|
|
145
|
-
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
146
|
-
hasXls: !1,
|
|
147
|
-
isFullscreen: g.value,
|
|
148
|
-
titles: { ...e.value.userOptions.buttonTitles },
|
|
149
|
-
chartElement: f.value,
|
|
150
|
-
onToggleFullscreen: R,
|
|
151
|
-
onGeneratePdf: n(P),
|
|
152
|
-
onGenerateImage: n(z)
|
|
153
|
-
}, V({ _: 2 }, [
|
|
154
|
-
t.$slots.optionPdf ? {
|
|
155
|
-
name: "optionPdf",
|
|
156
|
-
fn: _(() => [
|
|
157
|
-
y(t.$slots, "optionPdf", {}, void 0, !0)
|
|
158
|
-
]),
|
|
159
|
-
key: "0"
|
|
160
|
-
} : void 0,
|
|
161
|
-
t.$slots.optionImg ? {
|
|
162
|
-
name: "optionImg",
|
|
163
|
-
fn: _(() => [
|
|
164
|
-
y(t.$slots, "optionImg", {}, void 0, !0)
|
|
165
|
-
]),
|
|
166
|
-
key: "1"
|
|
167
|
-
} : void 0,
|
|
168
|
-
t.$slots.optionFullscreen ? {
|
|
169
|
-
name: "optionFullscreen",
|
|
170
|
-
fn: _(({ toggleFullscreen: a, isFullscreen: c }) => [
|
|
171
|
-
y(t.$slots, "optionFullscreen", N(A({ toggleFullscreen: a, isFullscreen: c })), void 0, !0)
|
|
172
|
-
]),
|
|
173
|
-
key: "2"
|
|
174
|
-
} : void 0
|
|
175
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : d("", !0),
|
|
176
|
-
k.value ? (u(), v("svg", {
|
|
177
|
-
key: 2,
|
|
178
|
-
xmlns: n(ue),
|
|
179
|
-
class: L({ "vue-data-ui-fullscreen--on": g.value, "vue-data-ui-fulscreen--off": !g.value }),
|
|
180
|
-
viewBox: `0 0 ${l.value.width <= 0 ? 10 : l.value.width} ${l.value.height <= 0 ? 10 : l.value.height}`,
|
|
181
|
-
style: C(`max-width:100%;overflow:visible;background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
|
|
182
|
-
}, [
|
|
183
|
-
(u(!0), v(ee, null, te(D.value, (a, c) => (u(), v("line", {
|
|
184
|
-
x1: a.x1,
|
|
185
|
-
x2: a.x2,
|
|
186
|
-
y1: a.y1,
|
|
187
|
-
y2: a.y2,
|
|
188
|
-
stroke: a.color,
|
|
189
|
-
"stroke-width": 5 / 360 * Math.min(l.value.width, l.value.height),
|
|
190
|
-
"stroke-linecap": e.value.style.chart.layout.wheel.ticks.rounded ? "round" : "butt",
|
|
191
|
-
class: L({ "vue-ui-tick-animated": e.value.style.chart.animation.use && c <= s.value })
|
|
192
|
-
}, null, 10, we))), 256)),
|
|
193
|
-
e.value.style.chart.layout.innerCircle.show ? (u(), v("circle", {
|
|
194
|
-
key: 0,
|
|
195
|
-
cx: o.value.centerX,
|
|
196
|
-
cy: o.value.centerY,
|
|
197
|
-
r: o.value.radius * 0.8 <= 0 ? 1e-4 : o.value.radius * 0.8,
|
|
198
|
-
stroke: e.value.style.chart.layout.innerCircle.stroke,
|
|
199
|
-
"stroke-width": e.value.style.chart.layout.innerCircle.strokeWidth,
|
|
200
|
-
fill: "none"
|
|
201
|
-
}, null, 8, be)) : d("", !0),
|
|
202
|
-
e.value.style.chart.layout.percentage.show ? (u(), v("text", {
|
|
203
|
-
key: 1,
|
|
204
|
-
x: o.value.centerX,
|
|
205
|
-
y: o.value.centerY + b.value / 3,
|
|
206
|
-
"font-size": b.value,
|
|
207
|
-
fill: e.value.style.chart.layout.wheel.ticks.gradient.show ? n(U)(e.value.style.chart.layout.wheel.ticks.activeColor, s.value / 100 * (e.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.layout.wheel.ticks.activeColor,
|
|
208
|
-
"text-anchor": "middle",
|
|
209
|
-
"font-weight": e.value.style.chart.layout.percentage.bold ? "bold" : "normal",
|
|
210
|
-
style: { "font-variant-numeric": "tabluar-nums" }
|
|
211
|
-
}, ae(n(ie)(
|
|
212
|
-
e.value.style.chart.layout.percentage.formatter,
|
|
213
|
-
n(X)(s.value),
|
|
214
|
-
n(ce)({
|
|
215
|
-
v: n(X)(s.value),
|
|
216
|
-
s: "%",
|
|
217
|
-
r: e.value.style.chart.layout.percentage.rounding
|
|
218
|
-
})
|
|
219
|
-
)), 9, Ce)) : d("", !0),
|
|
220
|
-
y(t.$slots, "svg", { svg: l.value }, void 0, !0)
|
|
221
|
-
], 14, ke)) : d("", !0),
|
|
222
|
-
t.$slots.watermark ? (u(), v("div", _e, [
|
|
223
|
-
y(t.$slots, "watermark", N(A({ isPrinting: n($) || n(F) })), void 0, !0)
|
|
224
|
-
])) : d("", !0),
|
|
225
|
-
k.value ? d("", !0) : (u(), M(me, {
|
|
226
|
-
key: 4,
|
|
227
|
-
config: {
|
|
228
|
-
type: "wheel",
|
|
229
|
-
style: {
|
|
230
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
231
|
-
wheel: {
|
|
232
|
-
color: "#CCCCCC"
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
}, null, 8, ["config"]))
|
|
237
|
-
], 12, pe));
|
|
238
|
-
}
|
|
239
|
-
}, Ne = /* @__PURE__ */ ge(xe, [["__scopeId", "data-v-929bab56"]]);
|
|
240
|
-
export {
|
|
241
|
-
Ne as default
|
|
242
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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;
|