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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-DYUBiaGS.cjs"),ie=require("./useResponsive-B3TrDDIG.cjs"),_e=require("./Title-XBiDFYKD.cjs"),ce=require("./usePrinter-ZlHxdaEz.cjs"),Se=require("./Tooltip-DxtWkIt5.cjs"),$e=require("./DataTable-DjQzrklZ.cjs"),Ne=require("./Legend-CtbPB0Bo.cjs"),Le=require("./vue-ui-skeleton-ClpTCY1x.cjs"),Te=require("./vue-ui-accordion-1WxrfiCH.cjs"),ve=require("./useNestedProp-w7AMWWmz.cjs"),Pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),de=S=>(e.pushScopeId("data-v-eaa613a1"),S=S(),e.popScopeId(),S),Ie=["id"],Ve=["xmlns","viewBox"],Ee=["id"],ze=["stop-color"],Fe=["stop-color"],De=["id"],Oe=de(()=>e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2},null,-1)),Ae=de(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Me=[Oe,Ae],qe=["x","y","height","width"],Re=["height","width"],Ue=["rx","x","y","height","width","stroke","stroke-width","filter"],je=["rx","x","y","height","width","fill","stroke","stroke-width","filter"],Ge=["x","y","height","width","filter"],We={key:0},He={key:1},Ye={key:2},Xe={key:3},Je=["onMouseover","x","y","height","width"],Ke={key:3,class:"vue-data-ui-watermark"},Qe=["onClick"],Ze={key:0},et={key:1},tt=["innerHTML"],lt={__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(S,{expose:pe,emit:he}){const p=S,{vue_ui_waffle:fe}=n.useConfig(),I=e.computed(()=>!!p.dataset&&p.dataset.length),b=e.ref(n.createUid()),ye=e.ref(null),F=e.ref(!1),D=e.ref(""),B=e.ref(null),q=e.ref(0),$=e.ref(null),R=e.ref(null),U=e.ref(null),j=e.ref(0),G=e.ref(0),W=e.ref(0),t=e.computed({get:()=>H(),set:l=>l});function H(){const l=ve.useNestedProp({userConfig:p.config,defaultConfig:fe});return l.theme?{...ve.useNestedProp({userConfig:n.themes.vue_ui_waffle[l.theme]||p.config,defaultConfig:l}),customPalette:n.themePalettes[l.theme]||n.palette}:l}e.watch(()=>p.config,l=>{t.value=H(),Y(),j.value+=1,G.value+=1,W.value+=1},{deep:!0});const V=e.ref(null);function Y(){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=ie.throttle(()=>{const{width:r,height:a}=ie.useResponsive({chart:$.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,f.value.width=r,f.value.height=a});V.value=new ResizeObserver(l),V.value.observe($.value.parentNode)}}e.onMounted(()=>{Y()}),e.onBeforeUnmount(()=>{V.value&&V.value.disconnect()});const{isPrinting:X,isImaging:J,generatePdf:K,generateImage:Q}=ce.usePrinter({elementId:`vue-ui-waffle_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-waffle"}),Z=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}),f=e.ref({top:0,left:0,height:512,width:512}),w=e.computed(()=>(f.value.width-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),C=e.computed(()=>(f.value.height-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),N=e.computed(()=>f.value.width/t.value.style.chart.layout.grid.size),E=e.computed(()=>f.value.height/t.value.style.chart.layout.grid.size);function ee(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}function te(){return p.dataset.map((l,r)=>({...l,color:n.convertColorToHex(l.color)||Z.value[r]||n.palette[r]||n.palette[r%n.palette.length],uid:`serie_${r}`,absoluteIndex:r}))}const le=e.computed(()=>te()),c=e.ref(le.value);e.watch(()=>p.dataset,l=>{c.value=te()},{deep:!0});const ge=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 ee(l)}),me=e.computed(()=>{const l=c.value.map((r,a)=>(r.values||[]).reduce((o,u)=>o+u));return ee(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:ge.value[r]})))),be=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:me.value[r]})));function ke(){return be.value.map(l=>({name:l.name,color:l.color,value:l.value,proportion:l.proportion}))}const we=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(()=>we.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)*(C.value+t.value.style.chart.layout.grid.spaceBetween)+f.value.top});return l}),v=e.ref([]),x=e.ref(!1),ae=e.ref(null),oe=e.ref(null);function re(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=le.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(ae.value),c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[u]}:d),x.value=!1):(x.value=!0,o+=u*.025,c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[o]}:d),ae.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(oe.value),v.value.push(l),c.value=c.value.map((i,d)=>i.uid===l?{...i,values:[0]}:i),x.value=!1):(x.value=!0,o/=1.5,c.value=c.value.map((i,d)=>i.uid===l?{...i,values:[o]}:i),oe.value=requestAnimationFrame(u))};u()}he("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||Z[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:()=>re(l.uid),isSegregated:v.value.includes(l.uid)}))),Ce=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":""})),y=e.computed(()=>L.value.map(l=>l.value).reduce((l,r)=>l+r,0)),O=e.ref(null);function xe(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/y.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 ue(){e.nextTick(()=>{const l=g.value.head.map((o,u)=>[[o.name],[g.value.body[u]],[isNaN(g.value.body[u]/y.value)?"-":g.value.body[u]/y.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,y.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:y.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]/y.value)?"-":n.dataLabel({v:g.value.body[i]/y.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}}),P=e.ref(!1);function Be(l){P.value=l,q.value+=1}function ne(){m.value.showTable=!m.value.showTable}function se(){m.value.showTooltip=!m.value.showTooltip}return pe({getData:ke,generatePdf:K,generateCsv:ue,generateImage:Q,toggleTable:ne,toggleTooltip:se}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-waffle ${P.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"waffleChart",ref:$,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.openBlock(),e.createBlock(_e._sfc_main,{key:`title_${j.value}`,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&&I.value?(e.openBlock(),e.createBlock(ce.UserOptions,{ref_key:"details",ref:ye,key:`user_options_${q.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(X),isImaging:e.unref(J),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:P.value,isTooltip:m.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:$.value,onToggleFullscreen:Be,onGeneratePdf:e.unref(K),onGenerateCsv:ue,onGenerateImage:e.unref(Q),onToggleTable:ne,onToggleTooltip:se},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),I.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":P.value,"vue-data-ui-fulscreen--off":!P.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,ze),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Fe)],8,Ee))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${b.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},Me,8,De)]),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:C.value<=0?1e-4:C.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,qe))),256)):e.createCommentVNode("",!0),!s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock("rect",{key:1,x:12,y:12,height:f.value.height-24,width:f.value.width-24,rx:3,fill:"none",stroke:"black"},null,8,Re)):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:C.value<=0?1e-4:C.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,Ue))),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:C.value<=0?1e-4:C.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,je))),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&&!x.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:N.value*t.value.style.chart.layout.grid.size<=0?1e-4:N.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 ${N.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",We,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",He,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",Ye," ("+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",Xe,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,Ge)):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=>xe(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:N.value<=0?1e-4:N.value,fill:"transparent",stroke:"none"},null,40,Je))),256)),e.renderSlot(l.$slots,"svg",{svg:k.value},void 0,!0)],14,Ve)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ke,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(X)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),I.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Le.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(Ne.Legend,{key:`legend_${W.value}`,legendSet:_.value,config:Ce.value,onClickMarker:r[1]||(r[1]=({legend:a})=>re(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:x.value}),{datapoint:a}))+" ",1),v.value.includes(a.uid)?(e.openBlock(),e.createElementBlock("span",et," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Ze," ("+e.toDisplayString(isNaN(a.value/y.value)?"-":e.unref(n.dataLabel)({v:a.value/y.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage,isAnimating:x.value}))+") ",1))],12,Qe)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:_.value},void 0,!0)],512),e.createVNode(Se._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:$.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"]),I.value?(e.openBlock(),e.createBlock(Te.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.openBlock(),e.createBlock($e.DataTable,{key:`table_${G.value}`,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,tt)]),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,Ie))}},at=Pe._export_sfc(lt,[["__scopeId","data-v-eaa613a1"]]);exports.default=at;
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
import { computed as p, ref as o, watch as U, onMounted as V, onBeforeUnmount as ee, openBlock as r, createElementBlock as v, normalizeStyle as C, createBlock as _, createCommentVNode as d, unref as n, createSlots as te, withCtx as x, renderSlot as f, normalizeProps as X, guardReactiveProps as B, normalizeClass as G, Fragment as ae, renderList as le, toDisplayString as se } from "vue";
|
|
2
|
+
import { u as ne, c as oe, t as re, o as ue, e as ie, v as T, X as ce, i as he, s as E, f as ve } from "./index-Cm4Iry5c.js";
|
|
3
|
+
import { _ as de } from "./Title-C26I_HC3.js";
|
|
4
|
+
import { u as fe, U as ye } from "./usePrinter-B8RnF8_q.js";
|
|
5
|
+
import { t as ge, u as me } from "./useResponsive-NZB-WLRF.js";
|
|
6
|
+
import pe from "./vue-ui-skeleton-C1oUnz7R.js";
|
|
7
|
+
import { u as j } from "./useNestedProp-CurQIHTa.js";
|
|
8
|
+
import { _ as ke } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
|
+
const we = ["id"], be = ["xmlns", "viewBox"], Ce = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-linecap"], _e = ["cx", "cy", "r", "stroke", "stroke-width"], xe = ["x", "y", "font-size", "fill", "font-weight"], Ie = {
|
|
10
|
+
key: 3,
|
|
11
|
+
class: "vue-data-ui-watermark"
|
|
12
|
+
}, $e = {
|
|
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(D, { expose: R }) {
|
|
29
|
+
const i = D, { vue_ui_wheel: Y } = ne(), k = p(() => !!i.dataset && Object.keys(i.dataset).length), w = o(oe()), H = o(null), I = o(0), y = o(null), $ = o(null), F = o(0), e = p({
|
|
30
|
+
get: () => P(),
|
|
31
|
+
set: (t) => t
|
|
32
|
+
});
|
|
33
|
+
function P() {
|
|
34
|
+
const t = j({
|
|
35
|
+
userConfig: i.config,
|
|
36
|
+
defaultConfig: Y
|
|
37
|
+
});
|
|
38
|
+
return t.theme ? {
|
|
39
|
+
...j({
|
|
40
|
+
userConfig: re.vue_ui_wheel[t.theme] || i.config,
|
|
41
|
+
defaultConfig: t
|
|
42
|
+
})
|
|
43
|
+
} : t;
|
|
44
|
+
}
|
|
45
|
+
U(() => i.config, (t) => {
|
|
46
|
+
e.value = P(), A(), F.value += 1;
|
|
47
|
+
}, { deep: !0 });
|
|
48
|
+
const { isPrinting: z, isImaging: S, generatePdf: O, generateImage: M } = fe({
|
|
49
|
+
elementId: w.value,
|
|
50
|
+
fileName: e.value.style.chart.title.text || "vue-ui-wheel"
|
|
51
|
+
}), l = o({
|
|
52
|
+
size: 360,
|
|
53
|
+
height: 360,
|
|
54
|
+
width: 360
|
|
55
|
+
}), b = o(e.value.style.chart.layout.percentage.fontSize), u = p(() => ({
|
|
56
|
+
radius: Math.min(l.value.width, l.value.height) * 0.9 / 2,
|
|
57
|
+
centerX: l.value.width / 2,
|
|
58
|
+
centerY: l.value.height / 2
|
|
59
|
+
}));
|
|
60
|
+
function N(t, c = 1) {
|
|
61
|
+
return {
|
|
62
|
+
x: u.value.centerX + u.value.radius * Math.cos(29.85 + t * Math.PI / 180) * c,
|
|
63
|
+
y: u.value.centerY + u.value.radius * Math.sin(29.85 + t * Math.PI / 180) * c
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
const s = o(e.value.style.chart.animation.use ? 0 : i.dataset.percentage || 0);
|
|
67
|
+
U(() => i.dataset, (t) => {
|
|
68
|
+
e.value.style.chart.animation.use ? L(t.percentage) : s.value = t.percentage || 0;
|
|
69
|
+
}, { deep: !0 });
|
|
70
|
+
const g = o(null);
|
|
71
|
+
V(() => {
|
|
72
|
+
A();
|
|
73
|
+
});
|
|
74
|
+
function A() {
|
|
75
|
+
if (ue(i.dataset) && ie({
|
|
76
|
+
componentName: "VueUiWheel",
|
|
77
|
+
type: "dataset"
|
|
78
|
+
}), L(i.dataset.percentage || 0), e.value.responsive) {
|
|
79
|
+
const t = ge(() => {
|
|
80
|
+
const { width: c, height: a } = me({
|
|
81
|
+
chart: y.value,
|
|
82
|
+
title: e.value.style.chart.title.text ? $.value : null
|
|
83
|
+
});
|
|
84
|
+
l.value.width = c, l.value.height = a, b.value = e.value.style.chart.layout.percentage.fontSize / 360 * Math.min(c, a);
|
|
85
|
+
});
|
|
86
|
+
g.value = new ResizeObserver(t), g.value.observe(y.value.parentNode);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
ee(() => {
|
|
90
|
+
g.value && g.value.disconnect();
|
|
91
|
+
});
|
|
92
|
+
function L(t) {
|
|
93
|
+
let c = e.value.style.chart.animation.speed;
|
|
94
|
+
const a = Math.abs(t - s.value) / (c * 120);
|
|
95
|
+
function h() {
|
|
96
|
+
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(h);
|
|
97
|
+
}
|
|
98
|
+
h();
|
|
99
|
+
}
|
|
100
|
+
const W = p(() => {
|
|
101
|
+
const t = [];
|
|
102
|
+
for (let a = 0; a < 100; a += 1) {
|
|
103
|
+
const h = s.value > a ? e.value.style.chart.layout.wheel.ticks.activeColor : e.value.style.chart.layout.wheel.ticks.inactiveColor, { x: J, y: K } = N(l.value.size / 100 * a), { x: Q, y: Z } = N(l.value.size / 100 * a, 0.9);
|
|
104
|
+
t.push({
|
|
105
|
+
x1: J,
|
|
106
|
+
y1: K,
|
|
107
|
+
x2: Q,
|
|
108
|
+
y2: Z,
|
|
109
|
+
color: e.value.style.chart.layout.wheel.ticks.gradient.show ? T(h, a / 100 * (e.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity / 100)) : h
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
return t;
|
|
113
|
+
}), m = o(!1);
|
|
114
|
+
function q(t) {
|
|
115
|
+
m.value = t, I.value += 1;
|
|
116
|
+
}
|
|
117
|
+
return R({
|
|
118
|
+
generatePdf: O,
|
|
119
|
+
generateImage: M
|
|
120
|
+
}), (t, c) => (r(), v("div", {
|
|
121
|
+
class: "vue-ui-wheel",
|
|
122
|
+
ref_key: "wheelChart",
|
|
123
|
+
ref: y,
|
|
124
|
+
id: w.value,
|
|
125
|
+
style: C(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height:100%" : ""}`)
|
|
126
|
+
}, [
|
|
127
|
+
e.value.style.chart.title.text ? (r(), v("div", {
|
|
128
|
+
key: 0,
|
|
129
|
+
ref_key: "chartTitle",
|
|
130
|
+
ref: $,
|
|
131
|
+
style: C(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:12px`)
|
|
132
|
+
}, [
|
|
133
|
+
(r(), _(de, {
|
|
134
|
+
key: `title_${F.value}`,
|
|
135
|
+
config: {
|
|
136
|
+
title: {
|
|
137
|
+
cy: "wheel-title",
|
|
138
|
+
...e.value.style.chart.title
|
|
139
|
+
},
|
|
140
|
+
subtitle: {
|
|
141
|
+
cy: "wheel-subtitle",
|
|
142
|
+
...e.value.style.chart.title.subtitle
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}, null, 8, ["config"]))
|
|
146
|
+
], 4)) : d("", !0),
|
|
147
|
+
e.value.userOptions.show && k.value ? (r(), _(ye, {
|
|
148
|
+
ref_key: "details",
|
|
149
|
+
ref: H,
|
|
150
|
+
key: `user_options_${I.value}`,
|
|
151
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
152
|
+
color: e.value.style.chart.color,
|
|
153
|
+
isPrinting: n(z),
|
|
154
|
+
isImaging: n(S),
|
|
155
|
+
uid: w.value,
|
|
156
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
157
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
158
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
159
|
+
hasXls: !1,
|
|
160
|
+
isFullscreen: m.value,
|
|
161
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
162
|
+
chartElement: y.value,
|
|
163
|
+
onToggleFullscreen: q,
|
|
164
|
+
onGeneratePdf: n(O),
|
|
165
|
+
onGenerateImage: n(M)
|
|
166
|
+
}, te({ _: 2 }, [
|
|
167
|
+
t.$slots.optionPdf ? {
|
|
168
|
+
name: "optionPdf",
|
|
169
|
+
fn: x(() => [
|
|
170
|
+
f(t.$slots, "optionPdf", {}, void 0, !0)
|
|
171
|
+
]),
|
|
172
|
+
key: "0"
|
|
173
|
+
} : void 0,
|
|
174
|
+
t.$slots.optionImg ? {
|
|
175
|
+
name: "optionImg",
|
|
176
|
+
fn: x(() => [
|
|
177
|
+
f(t.$slots, "optionImg", {}, void 0, !0)
|
|
178
|
+
]),
|
|
179
|
+
key: "1"
|
|
180
|
+
} : void 0,
|
|
181
|
+
t.$slots.optionFullscreen ? {
|
|
182
|
+
name: "optionFullscreen",
|
|
183
|
+
fn: x(({ toggleFullscreen: a, isFullscreen: h }) => [
|
|
184
|
+
f(t.$slots, "optionFullscreen", X(B({ toggleFullscreen: a, isFullscreen: h })), void 0, !0)
|
|
185
|
+
]),
|
|
186
|
+
key: "2"
|
|
187
|
+
} : void 0
|
|
188
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : d("", !0),
|
|
189
|
+
k.value ? (r(), v("svg", {
|
|
190
|
+
key: 2,
|
|
191
|
+
xmlns: n(ce),
|
|
192
|
+
class: G({ "vue-data-ui-fullscreen--on": m.value, "vue-data-ui-fulscreen--off": !m.value }),
|
|
193
|
+
viewBox: `0 0 ${l.value.width <= 0 ? 10 : l.value.width} ${l.value.height <= 0 ? 10 : l.value.height}`,
|
|
194
|
+
style: C(`max-width:100%;overflow:visible;background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
|
|
195
|
+
}, [
|
|
196
|
+
(r(!0), v(ae, null, le(W.value, (a, h) => (r(), v("line", {
|
|
197
|
+
x1: a.x1,
|
|
198
|
+
x2: a.x2,
|
|
199
|
+
y1: a.y1,
|
|
200
|
+
y2: a.y2,
|
|
201
|
+
stroke: a.color,
|
|
202
|
+
"stroke-width": 5 / 360 * Math.min(l.value.width, l.value.height),
|
|
203
|
+
"stroke-linecap": e.value.style.chart.layout.wheel.ticks.rounded ? "round" : "butt",
|
|
204
|
+
class: G({ "vue-ui-tick-animated": e.value.style.chart.animation.use && h <= s.value })
|
|
205
|
+
}, null, 10, Ce))), 256)),
|
|
206
|
+
e.value.style.chart.layout.innerCircle.show ? (r(), v("circle", {
|
|
207
|
+
key: 0,
|
|
208
|
+
cx: u.value.centerX,
|
|
209
|
+
cy: u.value.centerY,
|
|
210
|
+
r: u.value.radius * 0.8 <= 0 ? 1e-4 : u.value.radius * 0.8,
|
|
211
|
+
stroke: e.value.style.chart.layout.innerCircle.stroke,
|
|
212
|
+
"stroke-width": e.value.style.chart.layout.innerCircle.strokeWidth,
|
|
213
|
+
fill: "none"
|
|
214
|
+
}, null, 8, _e)) : d("", !0),
|
|
215
|
+
e.value.style.chart.layout.percentage.show ? (r(), v("text", {
|
|
216
|
+
key: 1,
|
|
217
|
+
x: u.value.centerX,
|
|
218
|
+
y: u.value.centerY + b.value / 3,
|
|
219
|
+
"font-size": b.value,
|
|
220
|
+
fill: e.value.style.chart.layout.wheel.ticks.gradient.show ? n(T)(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,
|
|
221
|
+
"text-anchor": "middle",
|
|
222
|
+
"font-weight": e.value.style.chart.layout.percentage.bold ? "bold" : "normal",
|
|
223
|
+
style: { "font-variant-numeric": "tabluar-nums" }
|
|
224
|
+
}, se(n(he)(
|
|
225
|
+
e.value.style.chart.layout.percentage.formatter,
|
|
226
|
+
n(E)(s.value),
|
|
227
|
+
n(ve)({
|
|
228
|
+
v: n(E)(s.value),
|
|
229
|
+
s: "%",
|
|
230
|
+
r: e.value.style.chart.layout.percentage.rounding
|
|
231
|
+
})
|
|
232
|
+
)), 9, xe)) : d("", !0),
|
|
233
|
+
f(t.$slots, "svg", { svg: l.value }, void 0, !0)
|
|
234
|
+
], 14, be)) : d("", !0),
|
|
235
|
+
t.$slots.watermark ? (r(), v("div", Ie, [
|
|
236
|
+
f(t.$slots, "watermark", X(B({ isPrinting: n(z) || n(S) })), void 0, !0)
|
|
237
|
+
])) : d("", !0),
|
|
238
|
+
k.value ? d("", !0) : (r(), _(pe, {
|
|
239
|
+
key: 4,
|
|
240
|
+
config: {
|
|
241
|
+
type: "wheel",
|
|
242
|
+
style: {
|
|
243
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
244
|
+
wheel: {
|
|
245
|
+
color: "#CCCCCC"
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}, null, 8, ["config"]))
|
|
250
|
+
], 12, we));
|
|
251
|
+
}
|
|
252
|
+
}, Le = /* @__PURE__ */ ke($e, [["__scopeId", "data-v-355bd3d3"]]);
|
|
253
|
+
export {
|
|
254
|
+
Le as default
|
|
255
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DYUBiaGS.cjs"),G=require("./Title-XBiDFYKD.cjs"),I=require("./usePrinter-ZlHxdaEz.cjs"),N=require("./useResponsive-B3TrDDIG.cjs"),R=require("./vue-ui-skeleton-ClpTCY1x.cjs"),$=require("./useNestedProp-w7AMWWmz.cjs"),X=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),j=["id"],H=["xmlns","viewBox"],V=["x1","x2","y1","y2","stroke","stroke-width","stroke-linecap"],D=["cx","cy","r","stroke","stroke-width"],Y=["x","y","font-size","fill","font-weight"],W={key:3,class:"vue-data-ui-watermark"},J={__name:"vue-ui-wheel",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(z,{expose:F}){const s=z,{vue_ui_wheel:O}=r.useConfig(),f=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length),y=e.ref(r.createUid()),M=e.ref(null),g=e.ref(0),h=e.ref(null),p=e.ref(null),k=e.ref(0),t=e.computed({get:()=>w(),set:l=>l});function w(){const l=$.useNestedProp({userConfig:s.config,defaultConfig:O});return l.theme?{...$.useNestedProp({userConfig:r.themes.vue_ui_wheel[l.theme]||s.config,defaultConfig:l})}:l}e.watch(()=>s.config,l=>{t.value=w(),P(),k.value+=1},{deep:!0});const{isPrinting:C,isImaging:b,generatePdf:_,generateImage:x}=I.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 B(l,i=1){return{x:u.value.centerX+u.value.radius*Math.cos(29.85+l*Math.PI/180)*i,y:u.value.centerY+u.value.radius*Math.sin(29.85+l*Math.PI/180)*i}}const o=e.ref(t.value.style.chart.animation.use?0:s.dataset.percentage||0);e.watch(()=>s.dataset,l=>{t.value.style.chart.animation.use?S(l.percentage):o.value=l.percentage||0},{deep:!0});const v=e.ref(null);e.onMounted(()=>{P()});function P(){if(r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiWheel",type:"dataset"}),S(s.dataset.percentage||0),t.value.responsive){const l=N.throttle(()=>{const{width:i,height:a}=N.useResponsive({chart:h.value,title:t.value.style.chart.title.text?p.value:null});n.value.width=i,n.value.height=a,m.value=t.value.style.chart.layout.percentage.fontSize/360*Math.min(i,a)});v.value=new ResizeObserver(l),v.value.observe(h.value.parentNode)}}e.onBeforeUnmount(()=>{v.value&&v.value.disconnect()});function S(l){let i=t.value.style.chart.animation.speed;const a=Math.abs(l-o.value)/(i*120);function c(){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(c)}c()}const E=e.computed(()=>{const l=[];for(let a=0;a<100;a+=1){const c=o.value>a?t.value.style.chart.layout.wheel.ticks.activeColor:t.value.style.chart.layout.wheel.ticks.inactiveColor,{x:q,y:T}=B(n.value.size/100*a),{x:L,y:U}=B(n.value.size/100*a,.9);l.push({x1:q,y1:T,x2:L,y2:U,color:t.value.style.chart.layout.wheel.ticks.gradient.show?r.shiftHue(c,a/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):c})}return l}),d=e.ref(!1);function A(l){d.value=l,g.value+=1}return F({generatePdf:_,generateImage:x}),(l,i)=>(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.openBlock(),e.createBlock(G._sfc_main,{key:`title_${k.value}`,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(I.UserOptions,{ref_key:"details",ref:M,key:`user_options_${g.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(C),isImaging:e.unref(b),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:A,onGeneratePdf:e.unref(_),onGenerateImage:e.unref(x)},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:c})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:c})),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(E.value,(a,c)=>(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&&c<=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,D)):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,Y)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],14,H)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",W,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(C)||e.unref(b)})),void 0,!0)])):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(R.default,{key:4,config:{type:"wheel",style:{backgroundColor:t.value.style.chart.backgroundColor,wheel:{color:"#CCCCCC"}}}},null,8,["config"]))],12,j))}},K=X._export_sfc(J,[["__scopeId","data-v-355bd3d3"]]);exports.default=K;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-DYUBiaGS.cjs"),ie=require("./Title-XBiDFYKD.cjs"),j=require("./usePrinter-ZlHxdaEz.cjs"),A=require("./useResponsive-B3TrDDIG.cjs"),ce=require("./vue-ui-accordion-1WxrfiCH.cjs"),de=require("./DataTable-DjQzrklZ.cjs"),ve=require("./BaseIcon--PMhZ3f-.cjs"),Y=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),H=require("./useNestedProp-w7AMWWmz.cjs"),he=i=>(e.pushScopeId("data-v-3fd7d274"),i=i(),e.popScopeId(),i),me={"data-html2canvas-ignore":""},fe={key:0,class:"reset-wrapper"},ge={key:1,class:"reset-wrapper"},pe={class:"mono-slicer"},ye=he(()=>e.createElementVNode("div",{class:"slider-track"},null,-1)),be=["min","max","value"],Ce={__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:$}){const r=i;e.useCssVars(f=>({"90ad3208":T.value,"4f9eef70":w.value,"6e07ae3e":k.value,"2fd430a0":i.selectColor,"6b8169a4":g.value}));const T=e.computed(()=>r.inputColor),g=e.computed(()=>r.background),k=e.computed(()=>`${r.selectColor}33`),w=e.computed(()=>r.borderColor);function x(){$("reset")}const p=e.computed(()=>{const f=r.max-r.min,h=0,y=(r.value-r.min)/f*100;return{left:`${h}%`,width:`${y-h}%`,background:r.selectColor}});return(f,h)=>(e.openBlock(),e.createElementBlock("div",me,[i.value!==i.source?(e.openBlock(),e.createElementBlock("div",fe,[i.useResetSlot?e.renderSlot(f.$slots,"reset-action",{key:1,reset:x},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",onClick:x},[e.createVNode(ve.default,{name:"refresh",stroke:i.textColor},null,8,["stroke"])]))])):(e.openBlock(),e.createElementBlock("div",ge)),e.createElementVNode("div",pe,[ye,e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(p.value)},null,4),e.createElementVNode("input",{type:"range",min:i.min,max:i.max,value:Number(i.value),onInput:h[0]||(h[0]=y=>$("update:value",Number(y.target.value)))},null,40,be)])]))}},ke=Y._export_sfc(Ce,[["__scopeId","data-v-3fd7d274"]]),we=["id"],xe=["xmlns","viewBox"],Se=["transform"],$e=["fill","font-weight","x","y","font-size","transform"],Ne={key:3,class:"vue-data-ui-watermark"},Be=["innerHTML"],Fe={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(i,{expose:$}){const r=i,{vue_ui_word_cloud:T}=u.useConfig(),g=e.computed({get(){return!!r.dataset&&r.dataset.length},set(o){return o}}),k=e.ref(typeof r.dataset=="string"?u.createWordCloudDatasetFromPlainText(r.dataset):r.dataset.map(o=>({...o,value:u.checkNaN(o.value)}))),w=e.ref(u.createUid()),x=e.ref(0),p=e.ref(null),f=e.ref(null),h=e.ref(0),y=e.ref(0),t=e.computed({get:()=>O(),set:o=>o});function O(){const o=H.useNestedProp({userConfig:r.config,defaultConfig:T});return o.theme?{...H.useNestedProp({userConfig:u.themes.vue_ui_word_cloud[o.theme]||r.config,defaultConfig:o}),customPalette:u.themePalettes[o.theme]||u.palette}:o}e.watch(()=>r.config,o=>{t.value=O(),R(),h.value+=1,y.value+=1,v.value=t.value.style.chart.width},{deep:!0});const M=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}),J=A.throttle(()=>{const{width:o,height:a}=A.useResponsive({chart:p.value,title:t.value.style.chart.title.text?f.value:null,slicer:t.value.style.chart.zoom.show&&M.value});s.value.width=o,s.value.height=a,e.nextTick(E)});e.watch(()=>v.value,()=>{K()});const K=A.debounce(()=>{s.value.width=Number(v.value),s.value.height=t.value.style.chart.height/t.value.style.chart.height*Number(v.value),E()},10);function Q(){v.value=t.value.style.chart.width}const N=e.ref(null);e.onMounted(()=>{R()});function R(){u.objectIsEmpty(r.dataset)?u.error({componentName:"VueUiWordCloud",type:"dataset"}):k.value.forEach((o,a)=>{u.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{g.value=!1,u.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive&&(N.value=new ResizeObserver(J),N.value.observe(p.value.parentNode))}e.onBeforeUnmount(()=>{N.value&&N.value.disconnect()});const{isPrinting:q,isImaging:D,generatePdf:U,generateImage:W}=j.usePrinter({elementId:`wordCloud_${w.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud"}),B=e.ref({showTable:t.value.table.show});function Z(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 ee(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 te(o,a,l){const c=[],n={x:-a/2,y:-l/2,width:a,height:l},d=0,b=0;return o.forEach(C=>{let I=!1;for(let z=0;z<Math.max(a,l)/2&&!I;z+=t.value.style.chart.words.packingWeight)for(let V=0;V<360&&!I;V+=t.value.style.chart.words.packingWeight){const X=V*Math.PI/180,ae=d+z*Math.cos(X)-C.width/2,ne=b+z*Math.sin(X)-C.height/2,m={...C,x:ae,y:ne},re=m.x>=n.x&&m.y>=n.y&&m.x+m.width<=n.x+n.width&&m.y+m.height<=n.y+n.height,se=c.some(ue=>ee(m,ue));re&&!se&&(c.push(m),I=!0)}}),c}const S=e.ref([]);e.watch(()=>r.dataset,E,{immediate:!0});function E(){const o=k.value.map(n=>n.value),a=Math.max(...o),l=Math.min(...o),c=k.value.map((n,d)=>{const b=(n.value-l)/(a-l)*(s.value.maxFontSize-s.value.minFontSize)+s.value.minFontSize,C=Z(n.name,b);return{...n,id:u.createUid(),fontSize:b,width:C.width,height:C.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}});S.value=te(c,s.value.width,s.value.height).sort((n,d)=>d.fontSize-n.fontSize)}const F=e.computed(()=>{const o=S.value.map(l=>({name:l.name,color:l.color})),a=S.value.map(l=>l.value);return{head:o,body:a}});function G(){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 b=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},b]}),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}}),_=e.ref(!1);function oe(o){_.value=o,x.value+=1}function le(){return S.value}function L(){B.value.showTable=!B.value.showTable}return $({getData:le,generateCsv:G,generatePdf:U,generateImage:W,toggleTable:L}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:p,id:`wordCloud_${w.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:f,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[(e.openBlock(),e.createBlock(ie._sfc_main,{key:`title_${h.value}`,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&&g.value?(e.openBlock(),e.createBlock(j.UserOptions,{ref:"details",key:`user_option_${x.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(q),isImaging:e.unref(D),uid:w.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:_.value,titles:{...t.value.userOptions.buttonTitles},chartElement:p.value,onToggleFullscreen:oe,onGeneratePdf:e.unref(U),onGenerateCsv:G,onGenerateImage:e.unref(W),onToggleTable:L},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),g.value?(e.openBlock(),e.createElementBlock("svg",{key:2,class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.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(S.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,$e))]))),256))],8,Se),e.renderSlot(o.$slots,"svg",{svg:{height:s.value.height,width:s.value.width}},void 0,!0)],14,xe)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ne,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(q)||e.unref(D)})),void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"chartSlicer",ref:M,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(ke,{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:Q},{"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),g.value?(e.openBlock(),e.createBlock(ce.default,{key:4,hideDetails:"",config:{open:B.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(de.DataTable,{key:`table_${y.value}`,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=>B.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Be)]),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,we))}},Pe=Y._export_sfc(Fe,[["__scopeId","data-v-99140d4f"]]);exports.default=Pe;
|