vue-data-ui 2.4.12 → 2.4.13
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-CGKCROwz.js → Arrow-Bj-fZHYt.js} +1 -1
- package/dist/{Arrow-CtkFVr5U.cjs → Arrow-D-arGVx0.cjs} +1 -1
- package/dist/{BaseIcon-C4ndCspW.js → BaseIcon-CJw1rm7G.js} +1 -1
- package/dist/{BaseIcon-CLoM8DDe.cjs → BaseIcon-bxNR7IJr.cjs} +1 -1
- package/dist/{DataTable-C1e5i-AQ.cjs → DataTable-DPFAxETx.cjs} +1 -1
- package/dist/{DataTable-CveCk6xW.js → DataTable-DSmlK27d.js} +2 -2
- package/dist/{Legend-DDWzCGWe.js → Legend-CjRX0KB0.js} +1 -1
- package/dist/{Legend-XfQwPnB6.cjs → Legend-pFwNBjPs.cjs} +1 -1
- package/dist/{PackageVersion-Bi8RUX5W.js → PackageVersion-6g32vfzE.js} +1 -1
- package/dist/{PackageVersion-BzA9shEH.cjs → PackageVersion-Bdfz6JAs.cjs} +1 -1
- package/dist/{PenAndPaper-DnMUcq2C.js → PenAndPaper-Bxz6JnY-.js} +2 -2
- package/dist/{PenAndPaper-DolOORON.cjs → PenAndPaper-qO8pMTxM.cjs} +1 -1
- package/dist/{Shape-BvB4qzcw.js → Shape-B9d1hhZS.js} +1 -1
- package/dist/{Shape-CmAme9xi.cjs → Shape-tOhcWMkG.cjs} +1 -1
- package/dist/{Slicer-Be_ldy79.js → Slicer-BzuIYjHU.js} +2 -2
- package/dist/{Slicer-BVuY0EjX.cjs → Slicer-CiHJ4t5H.cjs} +1 -1
- package/dist/{Title-CAfojmIe.js → Title-CFHy9-HZ.js} +1 -1
- package/dist/{Title-CYDoc6j3.cjs → Title-DPx1SQ60.cjs} +1 -1
- package/dist/{Tooltip-BABZKovD.cjs → Tooltip-BxmlUqdH.cjs} +1 -1
- package/dist/{Tooltip-v1xcr7vF.js → Tooltip-DLCVqP66.js} +1 -1
- package/dist/{index-CFa1LJja.js → index-DwLdoaoI.js} +1 -1
- package/dist/{index-KDxAXZXP.cjs → index-YfDOzIGL.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-DtAqKb0W.js → useNestedProp-BE-9rWPi.js} +1 -1
- package/dist/{useNestedProp-CXjSKjKD.cjs → useNestedProp-WJ8kD00a.cjs} +1 -1
- package/dist/{usePrinter-l7v2Rcgc.cjs → usePrinter-BfKKkLev.cjs} +1 -1
- package/dist/{usePrinter-DEvTXkt_.js → usePrinter-QQ8sIBRI.js} +1 -1
- package/dist/{vue-data-ui-C1RPDTzl.cjs → vue-data-ui-B8pOC7vP.cjs} +1 -1
- package/dist/{vue-data-ui-CXYOFCkg.js → vue-data-ui-a0ppZO9B.js} +58 -58
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-BCaGJcxZ.cjs → vue-ui-3d-bar-BLM0gdFx.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-BSiHb8c-.js → vue-ui-3d-bar-cP2pNaKD.js} +9 -9
- package/dist/{vue-ui-accordion-BjK5Zqcp.js → vue-ui-accordion-BCbBgQnM.js} +3 -3
- package/dist/{vue-ui-accordion-D5b-rLq8.cjs → vue-ui-accordion-BDO_Zh68.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-DaAUzEm9.js → vue-ui-age-pyramid-CrCircJT.js} +10 -10
- package/dist/{vue-ui-age-pyramid-DfYUkpdC.cjs → vue-ui-age-pyramid-D83sx902.cjs} +1 -1
- package/dist/{vue-ui-annotator-BdKHB-q4.js → vue-ui-annotator-Bsxswk9y.js} +1 -1
- package/dist/{vue-ui-annotator-Cb0lPmzD.cjs → vue-ui-annotator-CPc0zP6z.cjs} +1 -1
- package/dist/{vue-ui-bullet-wx_gocM4.cjs → vue-ui-bullet-0uF7uLzI.cjs} +1 -1
- package/dist/{vue-ui-bullet-C-nXv9dy.js → vue-ui-bullet-Y-4z-p0q.js} +8 -8
- package/dist/{vue-ui-candlestick-DB00WcCz.cjs → vue-ui-candlestick-DEf62bqT.cjs} +1 -1
- package/dist/{vue-ui-candlestick-DWO7x9nX.js → vue-ui-candlestick-DgcbuAOG.js} +11 -11
- package/dist/{vue-ui-carousel-table-F-DEBome.cjs → vue-ui-carousel-table-D5mhqTJP.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-BLBPwKS8.js → vue-ui-carousel-table-JVCaW1uQ.js} +4 -4
- package/dist/{vue-ui-chestnut-CXlm92u0.js → vue-ui-chestnut-Bf-i3FaN.js} +8 -8
- package/dist/{vue-ui-chestnut-CzFwENN8.cjs → vue-ui-chestnut-BzIsyDCJ.cjs} +1 -1
- package/dist/{vue-ui-cursor-DJLKYGcb.cjs → vue-ui-cursor-BbkGAq5Z.cjs} +1 -1
- package/dist/{vue-ui-cursor-D_pO4Spk.js → vue-ui-cursor-QzjfpeEf.js} +2 -2
- package/dist/{vue-ui-dashboard-COKACbCL.js → vue-ui-dashboard-BRi99J78.js} +2 -2
- package/dist/{vue-ui-dashboard-4NILx623.cjs → vue-ui-dashboard-DCU5dw0v.cjs} +1 -1
- package/dist/{vue-ui-digits-BPL49_3d.js → vue-ui-digits-C2fR0QCG.js} +2 -2
- package/dist/{vue-ui-digits-BTTzz0k1.cjs → vue-ui-digits-RFS4E6dl.cjs} +1 -1
- package/dist/{vue-ui-donut-DqJKys7z.js → vue-ui-donut-BC07kmTG.js} +11 -11
- package/dist/{vue-ui-donut-DcEFUd-o.cjs → vue-ui-donut-C2yuDXOJ.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-BJhAsLVn.cjs → vue-ui-donut-evolution-D0aPzssn.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-CYsUMYt3.js → vue-ui-donut-evolution-DxdShz3M.js} +11 -11
- package/dist/{vue-ui-dumbbell-Be6aaQry.js → vue-ui-dumbbell-5moTjRU_.js} +10 -10
- package/dist/{vue-ui-dumbbell-By2gkcbi.cjs → vue-ui-dumbbell-DQq-pgEi.cjs} +1 -1
- package/dist/{vue-ui-flow-Bu2IHLu9.js → vue-ui-flow-CJVI2R0U.js} +9 -9
- package/dist/{vue-ui-flow-CJNjrSDE.cjs → vue-ui-flow-EMWBDlYH.cjs} +1 -1
- package/dist/{vue-ui-galaxy-Bl6v7ahB.cjs → vue-ui-galaxy-0PGxS1cN.cjs} +1 -1
- package/dist/{vue-ui-galaxy--W8nCy3k.js → vue-ui-galaxy-xrPaGHQg.js} +11 -11
- package/dist/{vue-ui-gauge-D9dkzTLj.cjs → vue-ui-gauge-CS3jqlat.cjs} +1 -1
- package/dist/{vue-ui-gauge-CAKo27_R.js → vue-ui-gauge-UDtF52j4.js} +7 -7
- package/dist/{vue-ui-gizmo-CGSp6322.js → vue-ui-gizmo-1NLXOp5J.js} +3 -3
- package/dist/{vue-ui-gizmo-BnrcwQ_f.cjs → vue-ui-gizmo-BvSR_xyA.cjs} +1 -1
- package/dist/{vue-ui-heatmap-CGiaD-XX.js → vue-ui-heatmap-Dm0WDiz1.js} +10 -10
- package/dist/{vue-ui-heatmap-5NsMNQC1.cjs → vue-ui-heatmap-DyDsLNJO.cjs} +1 -1
- package/dist/{vue-ui-kpi-_o8oGkDo.js → vue-ui-kpi-DJjEfWZh.js} +3 -3
- package/dist/{vue-ui-kpi-DcvKKcCZ.cjs → vue-ui-kpi-DX6XNFXG.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BnWpe-Jx.cjs → vue-ui-mini-loader-CILHcM-o.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BwahnZ5M.js → vue-ui-mini-loader-izD98Oto.js} +2 -2
- package/dist/{vue-ui-molecule-DW45rSTG.js → vue-ui-molecule-BwmpBwnD.js} +11 -11
- package/dist/{vue-ui-molecule-EI0QZuPn.cjs → vue-ui-molecule-D8tlnNvH.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-Sia4EwXF.js → vue-ui-mood-radar-CorAQOLG.js} +11 -11
- package/dist/{vue-ui-mood-radar-Bgunn4sw.cjs → vue-ui-mood-radar-iFQR2rec.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-tWesxUCT.cjs → vue-ui-nested-donuts-3tDIUZ4K.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-Cf7hGnwG.js → vue-ui-nested-donuts-DmHkGxsD.js} +11 -11
- package/dist/{vue-ui-onion-C6MaVU1K.cjs → vue-ui-onion-CqdVnbs9.cjs} +1 -1
- package/dist/{vue-ui-onion-BaZ_wTbo.js → vue-ui-onion-vTqEZNQz.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-BtIKgxvv.js → vue-ui-parallel-coordinate-plot-BgOxX64T.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-DrV9F60N.cjs → vue-ui-parallel-coordinate-plot-DfMN7jaW.cjs} +1 -1
- package/dist/{vue-ui-quadrant-Cle11mCD.cjs → vue-ui-quadrant-BI_7I8Yj.cjs} +1 -1
- package/dist/{vue-ui-quadrant-L6SfZjpt.js → vue-ui-quadrant-BWQq4PHY.js} +12 -12
- package/dist/{vue-ui-quick-chart-DYu27_hL.js → vue-ui-quick-chart-CqHSqq5T.js} +9 -9
- package/dist/{vue-ui-quick-chart-CqS3PeU-.cjs → vue-ui-quick-chart-N-1EOfxf.cjs} +1 -1
- package/dist/{vue-ui-radar-DSrgQE0m.cjs → vue-ui-radar-B-jTKgCL.cjs} +1 -1
- package/dist/{vue-ui-radar-BHirHWDO.js → vue-ui-radar-DXS1Am0r.js} +12 -12
- package/dist/{vue-ui-rating-BJHo9SsT.cjs → vue-ui-rating-CWLJYf2s.cjs} +1 -1
- package/dist/{vue-ui-rating-BBRC3Fex.js → vue-ui-rating-DjuCoq0M.js} +2 -2
- package/dist/{vue-ui-relation-circle-CpGiH1jp.js → vue-ui-relation-circle-AK--8JLM.js} +7 -7
- package/dist/{vue-ui-relation-circle-DzRQKnES.cjs → vue-ui-relation-circle-Ql6ZFkYK.cjs} +1 -1
- package/dist/{vue-ui-rings-DT_F10Cs.cjs → vue-ui-rings-DlszOdMT.cjs} +1 -1
- package/dist/{vue-ui-rings-B7tPoi26.js → vue-ui-rings-lOFH_to8.js} +11 -11
- package/dist/{vue-ui-scatter-B5G15tC4.cjs → vue-ui-scatter-DldUTIFq.cjs} +1 -1
- package/dist/{vue-ui-scatter-CTk2BZ_d.js → vue-ui-scatter-l-l8Cllm.js} +12 -12
- package/dist/{vue-ui-screenshot-CZr_osbk.js → vue-ui-screenshot-BiVtkpB9.js} +1 -1
- package/dist/{vue-ui-screenshot-DRe3Coog.cjs → vue-ui-screenshot-CrvTcVxC.cjs} +1 -1
- package/dist/{vue-ui-skeleton-CdeslaC3.cjs → vue-ui-skeleton-BypGpnGR.cjs} +1 -1
- package/dist/{vue-ui-skeleton-CHLsECtI.js → vue-ui-skeleton-C7cQjNuh.js} +3 -3
- package/dist/{vue-ui-smiley-BcgpnSoO.cjs → vue-ui-smiley-BBUWMyj5.cjs} +1 -1
- package/dist/{vue-ui-smiley-esJYBMWC.js → vue-ui-smiley-C0P-U_YM.js} +2 -2
- package/dist/{vue-ui-spark-trend-B744D8Vm.cjs → vue-ui-spark-trend-Pohir-w4.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-CLLnG7sn.js → vue-ui-spark-trend-jPUjOnKd.js} +5 -5
- package/dist/{vue-ui-sparkbar-DP4IIvXP.js → vue-ui-sparkbar-DRGrJShZ.js} +4 -4
- package/dist/{vue-ui-sparkbar-sM0UolJY.cjs → vue-ui-sparkbar-DSIgmn4z.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-CdCvjUt1.cjs → vue-ui-sparkgauge-Bb_GeFli.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-DxXLjj0m.js → vue-ui-sparkgauge-KMNHHr4A.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-BKH_x2YZ.cjs → vue-ui-sparkhistogram-BqwrB7j-.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-eiNFDU7_.js → vue-ui-sparkhistogram-CMvUAyiv.js} +5 -5
- package/dist/{vue-ui-sparkline-B2O2Ltg7.cjs → vue-ui-sparkline-BGV0iTE1.cjs} +1 -1
- package/dist/{vue-ui-sparkline-5JHLo5sp.js → vue-ui-sparkline-ptuGTvxy.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-5yePKW_I.cjs → vue-ui-sparkstackbar-B0yQaDMk.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-R08GxmHX.js → vue-ui-sparkstackbar-Bg-rRMOG.js} +5 -5
- package/dist/{vue-ui-stackbar-DLdmXSKP.js → vue-ui-stackbar-B4iWyEBr.js} +12 -12
- package/dist/{vue-ui-stackbar-7KA0-619.cjs → vue-ui-stackbar-BhcvcsKz.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-5JzjqmSe.js → vue-ui-strip-plot-BEj83Tgt.js} +11 -11
- package/dist/{vue-ui-strip-plot-iJg6nab9.cjs → vue-ui-strip-plot-CteBC2Pl.cjs} +1 -1
- package/dist/{vue-ui-table-DBuVWV5Y.js → vue-ui-table-BUeJnxZj.js} +1 -1
- package/dist/{vue-ui-table-BwjCx5AH.cjs → vue-ui-table-CVvMDfob.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-DYCUCDMQ.js → vue-ui-table-heatmap-B49k29Rh.js} +4 -4
- package/dist/{vue-ui-table-heatmap-_bASSmfs.cjs → vue-ui-table-heatmap-CBbrj4Q-.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-BvozgKWZ.js → vue-ui-table-sparkline-Dvbvgw65.js} +5 -5
- package/dist/{vue-ui-table-sparkline-BEJ__c2i.cjs → vue-ui-table-sparkline-ycJMm1Hk.cjs} +1 -1
- package/dist/{vue-ui-thermometer-1HmsfwA6.js → vue-ui-thermometer-CV1MMj-E.js} +7 -7
- package/dist/{vue-ui-thermometer-Dc49W_uX.cjs → vue-ui-thermometer-CkRdpjaQ.cjs} +1 -1
- package/dist/{vue-ui-timer-ccFYaDXI.js → vue-ui-timer-BN12JB4S.js} +5 -5
- package/dist/{vue-ui-timer-CzsWb_ok.cjs → vue-ui-timer-DaBdNn36.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-CMQ6uKOm.js → vue-ui-tiremarks-ClWPLlir.js} +7 -7
- package/dist/{vue-ui-tiremarks-CqjOSr6y.cjs → vue-ui-tiremarks-DHXn5sWw.cjs} +1 -1
- package/dist/{vue-ui-treemap-Dbkr_rdH.js → vue-ui-treemap-1uBqR8E7.js} +11 -11
- package/dist/{vue-ui-treemap-CLTdGsvf.cjs → vue-ui-treemap-DWq5_ImB.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-DzWoUrXd.cjs → vue-ui-vertical-bar-CTEo3CxB.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-BzIh5UUg.js → vue-ui-vertical-bar-DV8c2BrB.js} +11 -11
- package/dist/{vue-ui-waffle-GvNWX9QC.cjs → vue-ui-waffle-CuA3KaoT.cjs} +1 -1
- package/dist/{vue-ui-waffle-CQw6Qf9H.js → vue-ui-waffle-fXL2N03M.js} +11 -11
- package/dist/{vue-ui-wheel-CXmf0H03.js → vue-ui-wheel-Buw3ZXPa.js} +7 -7
- package/dist/{vue-ui-wheel-Cafjyq_O.cjs → vue-ui-wheel-D3l8Zj6H.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-B-5D28w8.cjs → vue-ui-word-cloud-B8VMBqal.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-CAJ-pqpM.js → vue-ui-word-cloud-Xqjh9Q30.js} +10 -10
- package/dist/{vue-ui-xy-DejNMLt_.cjs → vue-ui-xy-BSvt9roY.cjs} +2 -2
- package/dist/{vue-ui-xy-BNCxzo7p.js → vue-ui-xy-Cr_UmMcD.js} +16 -16
- package/dist/{vue-ui-xy-canvas-cnjS60Rg.js → vue-ui-xy-canvas-B82jCvbc.js} +11 -11
- package/dist/{vue-ui-xy-canvas-BCMw2wOS.cjs → vue-ui-xy-canvas-CBxPjJOJ.cjs} +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-KDxAXZXP.cjs"),ae=require("./useResponsive-BJ7DTGpm.cjs"),ke=require("./Title-CYDoc6j3.cjs"),le=require("./usePrinter-l7v2Rcgc.cjs"),be=require("./Tooltip-BABZKovD.cjs"),Ce=require("./vue-ui-sparkbar-sM0UolJY.cjs"),we=require("./Legend-XfQwPnB6.cjs"),Be=require("./DataTable-C1e5i-AQ.cjs"),_e=require("./vue-ui-skeleton-CdeslaC3.cjs"),Pe=require("./vue-ui-accordion-D5b-rLq8.cjs"),re=require("./useNestedProp-CXjSKjKD.cjs"),$e=require("./PackageVersion-BzA9shEH.cjs"),xe=require("./PenAndPaper-DolOORON.cjs"),Ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Te=["id"],Se=["xmlns","viewBox"],Ee=["id"],Ve=["stop-color"],Ae=["stop-color"],Oe={key:0},Fe=["x1","y1","x2","y2","stroke","stroke-width"],Le={key:0},ze=["d","stroke","stroke-width"],Ie=["d","stroke","stroke-width"],Re={key:1},qe=["x","y","text-anchor","font-size","fill","onMouseenter"],De=["points","stroke","stroke-width"],Me=["points","stroke","stroke-width","fill"],Ue={key:2},Ge=["cx","cy","fill","r","stroke"],We={key:5,class:"vue-data-ui-watermark"},He=["onClick"],Xe={key:0,style:{"max-width":"200px",margin:"0 auto"}},je={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(ne,{expose:ue,emit:se}){const d=ne,{vue_ui_radar:ie}=n.useConfig(),b=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),m=e.ref(n.createUid()),ce=e.ref(null),x=e.ref(!1),N=e.ref(""),F=e.ref(0),f=e.ref(null),L=e.ref(null),z=e.ref(null),I=e.ref(null),R=e.ref(null),q=e.ref(0),D=e.ref(0),M=e.ref(0),t=e.computed({get:()=>U(),set:o=>o});function U(){const o=re.useNestedProp({userConfig:d.config,defaultConfig:ie});return o.theme?{...re.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}e.watch(()=>d.config,o=>{t.value=U(),G(),q.value+=1,D.value+=1,M.value+=1},{deep:!0});const B=e.ref(null);function G(){if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=ae.throttle(()=>{const{width:a,height:l}=ae.useResponsive({chart:f.value,title:t.value.style.chart.title.text?L.value:null,legend:t.value.style.chart.legend.show?z.value:null,source:I.value,noTitle:R.value});s.value.width=a,s.value.height=l});B.value=new ResizeObserver(o),B.value.observe(f.value.parentNode)}}e.onMounted(()=>{G()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:W,isImaging:H,generatePdf:X,generateImage:j}=le.usePrinter({elementId:`vue-ui-radar_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),de=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Y=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),g=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),ve=e.computed(()=>({style:{backgroundColor:t.value.style.chart.tooltip.backgroundColor,animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),s=e.ref({height:312,width:512}),i=e.ref([]),C=e.ref(null),y=e.ref(!1);function J(o){y.value=!0,i.value.includes(o)?(C.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{y.value=!1,C.value=null},500)):(i.value.push(o),setTimeout(()=>{y.value=!1},500)),se("selectLegend",k.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function pe(){return k.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const v=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?n.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${l} at index ${a}`,index:a})})}),[null,void 0].includes(d.dataset.series)?n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:l,index:a})})}),d.dataset.categories.map((o,a)=>({name:o.name,categoryId:`radar_category_${m.value}_${a}`,color:n.convertColorToHex(o.color)||Y.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),p=e.computed(()=>b.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||Y.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${m.value}_${a}`,formatter:o.formatter||null})):[]),K=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),Q=e.computed(()=>p.value.length),T=e.computed(()=>Math.min(s.value.width,s.value.height)/3),Z=e.computed(()=>n.createPolygonPath({plot:{x:s.value.width/2,y:s.value.height/2},radius:T.value,sides:Q.value,rotation:0})),ge=e.computed(()=>{const o=[];for(let a=0;a<T.value;a+=T.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),h=e.computed(()=>Z.value.coordinates.map((o,a)=>{const l=p.value[a].values.map(r=>he({centerX:s.value.width/2,centerY:s.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(p.value[a].target||K.value)}));return{...o,...p.value[a],plots:l}}));function S({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>s.value.width/2&&(o+=12,l="start"),o<s.value.width/2&&(o-=12,l="end"),a>s.value.height/2&&(a+=20),a<s.value.height/2&&(a-=12),a===s.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function he({centerX:o,centerY:a,apexX:l,apexY:r,proportion:u}){return{x:o+(l-o)*u,y:a+(r-a)*u}}const k=e.computed(()=>{const o=p.value.map((a,l)=>a.values.map(r=>r/(a.target||K.value)));return v.value.map((a,l)=>({...a,totalProportion:n.checkNaN(o.map(r=>r[l]).reduce((r,u)=>r+u,0)/p.value.length),shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>J(l),isSegregated:i.value.includes(l)}))}),me=e.computed(()=>({cy:"radar-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":""})),_=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...k.value],a=d.dataset.series.map(r=>[r.name,n.applyDataLabel(r.formatter,r.target,n.dataLabel({p:r.prefix,v:r.target,s:r.suffix,r:t.value.table.td.roundingValue})),...r.values.map((u,c)=>`${n.applyDataLabel(r.formatter,u,n.dataLabel({p:v.value[c].prefix,v:u,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(u/r.target)?"":n.dataLabel({v:u/r.target*100,s:"%",r:t.value.table.td.roundingPercentage})})`)]),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{head:o,body:a,config:l,colNames:o}}),P=e.ref(null),E=e.ref([]),V=e.ref(null);function fe(o,a){E.value=[],P.value=a,x.value=!0;let l="";V.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value})))N.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value});else{l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`;for(let u=0;u<o.values.length;u+=1)i.value.includes(u)||E.value.push({name:v.value[u].name,value:o.values[u]/o.target*100,color:v.value[u].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[u].prefix??"",v:o.values[u],s:v.value[u].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});N.value=l}}function ee(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...k.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,Je)=>[c.name,c.target,...c.values.flatMap(O=>[O,isNaN(O/c.target)?"":O/c.target*100])]),r=o.concat([a]).concat(l),u=n.createCsvContent(r);n.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const w=e.ref(!1);function ye(o){w.value=o,F.value+=1}function te(){g.value.showTable=!g.value.showTable}function oe(){g.value.showTooltip=!g.value.showTooltip}const $=e.ref(!1);function A(){$.value=!$.value}return ue({getData:pe,generatePdf:X,generateCsv:ee,generateImage:j,toggleTable:te,toggleTooltip:oe,toggleAnnotator:A}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${w.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:f,id:`vue-ui-radar_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(xe.PenAndPaper,{key:0,parent:f.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:A},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),de.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:R,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:L,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(ke._sfc_main,{key:`title_${q.value}`,config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(le.UserOptions,{ref_key:"details",ref:ce,key:`user_options_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(H),isPrinting:e.unref(W),uid:m.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:w.value,isTooltip:g.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:f.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(X),onGenerateCsv:ee,onGenerateImage:e.unref(j),onToggleTable:te,onToggleTooltip:oe,onToggleAnnotator:A},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":w.value,"vue-data-ui-fulscreen--off":!w.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode($e._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${m.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.05),t.value.style.chart.layout.dataPolygon.opacity)},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Ae)],8,Ee))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.width/2,y1:s.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Fe))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",Le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ge.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:s.value.width/2,y:s.value.height/2},radius:l,sides:Q.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,ze))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:Z.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Ie),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:S(l).x,y:S(l).y,"text-anchor":S(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:u=>fe(l,r),onMouseleave:a[0]||(a[0]=u=>{x.value=!1,P.value=null})},e.toDisplayString(l.name),41,qe))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-radar-path":"",points:e.unref(n.makePath)(h.value.map(u=>u.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":y.value&&C.value===r&&t.value.useCssAnimation})},null,10,De)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,"data-cy-radar-path":"",points:e.unref(n.makePath)(h.value.map(u=>u.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${m.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity),class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":y.value&&C.value===r&&t.value.useCssAnimation})},null,10,Me)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(u,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:P.value!==null&&P.value===r?t.value.style.chart.layout.plots.radius*1.6:t.value.style.chart.layout.plots.radius,stroke:i.value.includes(c)?"transparent":t.value.style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":i.value.includes(c)&&t.value.useCssAnimation,"animated-in":y.value&&C.value===c&&t.value.useCssAnimation})},null,10,Ge))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:s.value},void 0,!0)],14,Se)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",We,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(W)||e.unref(H)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(_e.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:t.value.style.chart.layout.outerPolygon.stroke},shapes:{color:t.value.style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:z},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(we.Legend,{key:`legend_${M.value}`,legendSet:k.value,config:me.value,onClickMarker:a[1]||(a[1]=({i:l})=>J(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({v:l.totalProportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})),13,He)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:k.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:I,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(be._sfc_main,{show:g.value.showTooltip&&x.value,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,fontSize:t.value.style.chart.tooltip.fontSize,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:f.value,content:N.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...V.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof t.value.style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Xe,[e.createVNode(Ce.default,{dataset:E.value,config:ve.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity},null,8,["dataset","config","backgroundOpacity"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...V.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isCustom"]),b.value?(e.openBlock(),e.createBlock(Pe.default,{key:8,hideDetails:"",config:{open:g.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(Be.DataTable,{key:`table_${D.value}`,colNames:_.value.colNames,head:_.value.head,body:_.value.body,config:_.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[2]||(a[2]=l=>g.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Te))}},Ye=Ne._export_sfc(je,[["__scopeId","data-v-e797ea4b"]]);exports.default=Ye;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-YfDOzIGL.cjs"),ae=require("./useResponsive-BJ7DTGpm.cjs"),ke=require("./Title-DPx1SQ60.cjs"),le=require("./usePrinter-BfKKkLev.cjs"),be=require("./Tooltip-BxmlUqdH.cjs"),Ce=require("./vue-ui-sparkbar-DSIgmn4z.cjs"),we=require("./Legend-pFwNBjPs.cjs"),Be=require("./DataTable-DPFAxETx.cjs"),_e=require("./vue-ui-skeleton-BypGpnGR.cjs"),Pe=require("./vue-ui-accordion-BDO_Zh68.cjs"),re=require("./useNestedProp-WJ8kD00a.cjs"),$e=require("./PackageVersion-Bdfz6JAs.cjs"),xe=require("./PenAndPaper-qO8pMTxM.cjs"),Ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Te=["id"],Se=["xmlns","viewBox"],Ee=["id"],Ve=["stop-color"],Ae=["stop-color"],Oe={key:0},Fe=["x1","y1","x2","y2","stroke","stroke-width"],Le={key:0},ze=["d","stroke","stroke-width"],Ie=["d","stroke","stroke-width"],Re={key:1},qe=["x","y","text-anchor","font-size","fill","onMouseenter"],De=["points","stroke","stroke-width"],Me=["points","stroke","stroke-width","fill"],Ue={key:2},Ge=["cx","cy","fill","r","stroke"],We={key:5,class:"vue-data-ui-watermark"},He=["onClick"],Xe={key:0,style:{"max-width":"200px",margin:"0 auto"}},je={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(ne,{expose:ue,emit:se}){const d=ne,{vue_ui_radar:ie}=n.useConfig(),b=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),m=e.ref(n.createUid()),ce=e.ref(null),x=e.ref(!1),N=e.ref(""),F=e.ref(0),f=e.ref(null),L=e.ref(null),z=e.ref(null),I=e.ref(null),R=e.ref(null),q=e.ref(0),D=e.ref(0),M=e.ref(0),t=e.computed({get:()=>U(),set:o=>o});function U(){const o=re.useNestedProp({userConfig:d.config,defaultConfig:ie});return o.theme?{...re.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}e.watch(()=>d.config,o=>{t.value=U(),G(),q.value+=1,D.value+=1,M.value+=1},{deep:!0});const B=e.ref(null);function G(){if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=ae.throttle(()=>{const{width:a,height:l}=ae.useResponsive({chart:f.value,title:t.value.style.chart.title.text?L.value:null,legend:t.value.style.chart.legend.show?z.value:null,source:I.value,noTitle:R.value});s.value.width=a,s.value.height=l});B.value=new ResizeObserver(o),B.value.observe(f.value.parentNode)}}e.onMounted(()=>{G()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:W,isImaging:H,generatePdf:X,generateImage:j}=le.usePrinter({elementId:`vue-ui-radar_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),de=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Y=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),g=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),ve=e.computed(()=>({style:{backgroundColor:t.value.style.chart.tooltip.backgroundColor,animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),s=e.ref({height:312,width:512}),i=e.ref([]),C=e.ref(null),y=e.ref(!1);function J(o){y.value=!0,i.value.includes(o)?(C.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{y.value=!1,C.value=null},500)):(i.value.push(o),setTimeout(()=>{y.value=!1},500)),se("selectLegend",k.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function pe(){return k.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const v=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?n.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${l} at index ${a}`,index:a})})}),[null,void 0].includes(d.dataset.series)?n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:l,index:a})})}),d.dataset.categories.map((o,a)=>({name:o.name,categoryId:`radar_category_${m.value}_${a}`,color:n.convertColorToHex(o.color)||Y.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),p=e.computed(()=>b.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||Y.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${m.value}_${a}`,formatter:o.formatter||null})):[]),K=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),Q=e.computed(()=>p.value.length),T=e.computed(()=>Math.min(s.value.width,s.value.height)/3),Z=e.computed(()=>n.createPolygonPath({plot:{x:s.value.width/2,y:s.value.height/2},radius:T.value,sides:Q.value,rotation:0})),ge=e.computed(()=>{const o=[];for(let a=0;a<T.value;a+=T.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),h=e.computed(()=>Z.value.coordinates.map((o,a)=>{const l=p.value[a].values.map(r=>he({centerX:s.value.width/2,centerY:s.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(p.value[a].target||K.value)}));return{...o,...p.value[a],plots:l}}));function S({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>s.value.width/2&&(o+=12,l="start"),o<s.value.width/2&&(o-=12,l="end"),a>s.value.height/2&&(a+=20),a<s.value.height/2&&(a-=12),a===s.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function he({centerX:o,centerY:a,apexX:l,apexY:r,proportion:u}){return{x:o+(l-o)*u,y:a+(r-a)*u}}const k=e.computed(()=>{const o=p.value.map((a,l)=>a.values.map(r=>r/(a.target||K.value)));return v.value.map((a,l)=>({...a,totalProportion:n.checkNaN(o.map(r=>r[l]).reduce((r,u)=>r+u,0)/p.value.length),shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>J(l),isSegregated:i.value.includes(l)}))}),me=e.computed(()=>({cy:"radar-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":""})),_=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...k.value],a=d.dataset.series.map(r=>[r.name,n.applyDataLabel(r.formatter,r.target,n.dataLabel({p:r.prefix,v:r.target,s:r.suffix,r:t.value.table.td.roundingValue})),...r.values.map((u,c)=>`${n.applyDataLabel(r.formatter,u,n.dataLabel({p:v.value[c].prefix,v:u,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(u/r.target)?"":n.dataLabel({v:u/r.target*100,s:"%",r:t.value.table.td.roundingPercentage})})`)]),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{head:o,body:a,config:l,colNames:o}}),P=e.ref(null),E=e.ref([]),V=e.ref(null);function fe(o,a){E.value=[],P.value=a,x.value=!0;let l="";V.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value})))N.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value});else{l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`;for(let u=0;u<o.values.length;u+=1)i.value.includes(u)||E.value.push({name:v.value[u].name,value:o.values[u]/o.target*100,color:v.value[u].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[u].prefix??"",v:o.values[u],s:v.value[u].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});N.value=l}}function ee(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...k.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,Je)=>[c.name,c.target,...c.values.flatMap(O=>[O,isNaN(O/c.target)?"":O/c.target*100])]),r=o.concat([a]).concat(l),u=n.createCsvContent(r);n.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const w=e.ref(!1);function ye(o){w.value=o,F.value+=1}function te(){g.value.showTable=!g.value.showTable}function oe(){g.value.showTooltip=!g.value.showTooltip}const $=e.ref(!1);function A(){$.value=!$.value}return ue({getData:pe,generatePdf:X,generateCsv:ee,generateImage:j,toggleTable:te,toggleTooltip:oe,toggleAnnotator:A}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${w.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:f,id:`vue-ui-radar_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(xe.PenAndPaper,{key:0,parent:f.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:A},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),de.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:R,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:L,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(ke._sfc_main,{key:`title_${q.value}`,config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(le.UserOptions,{ref_key:"details",ref:ce,key:`user_options_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(H),isPrinting:e.unref(W),uid:m.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:w.value,isTooltip:g.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:f.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(X),onGenerateCsv:ee,onGenerateImage:e.unref(j),onToggleTable:te,onToggleTooltip:oe,onToggleAnnotator:A},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":w.value,"vue-data-ui-fulscreen--off":!w.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode($e._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${m.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.05),t.value.style.chart.layout.dataPolygon.opacity)},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Ae)],8,Ee))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.width/2,y1:s.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Fe))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",Le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ge.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:s.value.width/2,y:s.value.height/2},radius:l,sides:Q.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,ze))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:Z.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Ie),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:S(l).x,y:S(l).y,"text-anchor":S(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:u=>fe(l,r),onMouseleave:a[0]||(a[0]=u=>{x.value=!1,P.value=null})},e.toDisplayString(l.name),41,qe))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-radar-path":"",points:e.unref(n.makePath)(h.value.map(u=>u.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":y.value&&C.value===r&&t.value.useCssAnimation})},null,10,De)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,"data-cy-radar-path":"",points:e.unref(n.makePath)(h.value.map(u=>u.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${m.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity),class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":y.value&&C.value===r&&t.value.useCssAnimation})},null,10,Me)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(u,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:P.value!==null&&P.value===r?t.value.style.chart.layout.plots.radius*1.6:t.value.style.chart.layout.plots.radius,stroke:i.value.includes(c)?"transparent":t.value.style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":i.value.includes(c)&&t.value.useCssAnimation,"animated-in":y.value&&C.value===c&&t.value.useCssAnimation})},null,10,Ge))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:s.value},void 0,!0)],14,Se)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",We,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(W)||e.unref(H)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(_e.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:t.value.style.chart.layout.outerPolygon.stroke},shapes:{color:t.value.style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:z},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(we.Legend,{key:`legend_${M.value}`,legendSet:k.value,config:me.value,onClickMarker:a[1]||(a[1]=({i:l})=>J(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({v:l.totalProportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})),13,He)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:k.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:I,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(be._sfc_main,{show:g.value.showTooltip&&x.value,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,fontSize:t.value.style.chart.tooltip.fontSize,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:f.value,content:N.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...V.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof t.value.style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Xe,[e.createVNode(Ce.default,{dataset:E.value,config:ve.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity},null,8,["dataset","config","backgroundOpacity"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...V.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isCustom"]),b.value?(e.openBlock(),e.createBlock(Pe.default,{key:8,hideDetails:"",config:{open:g.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(Be.DataTable,{key:`table_${D.value}`,colNames:_.value.colNames,head:_.value.head,body:_.value.body,config:_.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[2]||(a[2]=l=>g.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Te))}},Ye=Ne._export_sfc(je,[["__scopeId","data-v-e797ea4b"]]);exports.default=Ye;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { computed as v, ref as u, watch as Ge, onMounted as We, onBeforeUnmount as Xe, openBlock as r, createElementBlock as s, normalizeClass as z, normalizeStyle as Q, createBlock as w, createCommentVNode as p, unref as g, createSlots as Ye, withCtx as y, renderSlot as m, normalizeProps as R, guardReactiveProps as M, createVNode as Z, createElementVNode as $, Fragment as P, renderList as T, toDisplayString as V, createTextVNode as we, nextTick as je } from "vue";
|
|
2
|
-
import { u as qe, c as He, t as Je, a as Ke, p as x, o as Qe, e as S, b as Ze, g as $e, d as Pe, O as Te, v as et, i as xe, f as U, X as tt, s as ee, w as at, P as Ae, x as ot, y as lt, q as rt, r as nt } from "./index-
|
|
2
|
+
import { u as qe, c as He, t as Je, a as Ke, p as x, o as Qe, e as S, b as Ze, g as $e, d as Pe, O as Te, v as et, i as xe, f as U, X as tt, s as ee, w as at, P as Ae, x as ot, y as lt, q as rt, r as nt } from "./index-DwLdoaoI.js";
|
|
3
3
|
import { t as st, u as ut } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as it } from "./Title-
|
|
5
|
-
import { u as ct, U as dt } from "./usePrinter-
|
|
6
|
-
import { _ as vt } from "./Tooltip-
|
|
7
|
-
import pt from "./vue-ui-sparkbar-
|
|
8
|
-
import { L as ht } from "./Legend-
|
|
9
|
-
import { D as gt } from "./DataTable-
|
|
10
|
-
import ft from "./vue-ui-skeleton-
|
|
11
|
-
import yt from "./vue-ui-accordion-
|
|
12
|
-
import { u as Oe } from "./useNestedProp-
|
|
13
|
-
import { _ as mt } from "./PackageVersion-
|
|
14
|
-
import { P as bt } from "./PenAndPaper-
|
|
4
|
+
import { _ as it } from "./Title-CFHy9-HZ.js";
|
|
5
|
+
import { u as ct, U as dt } from "./usePrinter-QQ8sIBRI.js";
|
|
6
|
+
import { _ as vt } from "./Tooltip-DLCVqP66.js";
|
|
7
|
+
import pt from "./vue-ui-sparkbar-DRGrJShZ.js";
|
|
8
|
+
import { L as ht } from "./Legend-CjRX0KB0.js";
|
|
9
|
+
import { D as gt } from "./DataTable-DSmlK27d.js";
|
|
10
|
+
import ft from "./vue-ui-skeleton-C7cQjNuh.js";
|
|
11
|
+
import yt from "./vue-ui-accordion-BCbBgQnM.js";
|
|
12
|
+
import { u as Oe } from "./useNestedProp-BE-9rWPi.js";
|
|
13
|
+
import { _ as mt } from "./PackageVersion-6g32vfzE.js";
|
|
14
|
+
import { P as bt } from "./PenAndPaper-Bxz6JnY-.js";
|
|
15
15
|
import { _ as kt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
16
|
const Ct = ["id"], _t = ["xmlns", "viewBox"], wt = ["id"], $t = ["stop-color"], Pt = ["stop-color"], Tt = { key: 0 }, xt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], At = { key: 0 }, Ot = ["d", "stroke", "stroke-width"], Nt = ["d", "stroke", "stroke-width"], St = { key: 1 }, Ft = ["x", "y", "text-anchor", "font-size", "fill", "onMouseenter"], It = ["points", "stroke", "stroke-width"], Lt = ["points", "stroke", "stroke-width", "fill"], zt = { key: 2 }, Rt = ["cx", "cy", "fill", "r", "stroke"], Mt = {
|
|
17
17
|
key: 5,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-KDxAXZXP.cjs"),L=require("./useNestedProp-CXjSKjKD.cjs"),D=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},A=["src","height","width"],R=["xmlns","height","width"],X=["id"],j=["stop-color"],F=["stop-color"],I=["points","fill","stroke","stroke-width"],O=["src","alt","height","width","id"],Y=["xmlns","viewBox","height","id"],G=["id"],q=["stop-color"],U=["stop-color"],H=["points","fill","stroke"],K=["xmlns","height"],P=["onClick","onMouseenter","onKeyup"],T=["onMouseenter"],W={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(k,{expose:_,emit:S}){const i=k,{vue_ui_rating:z}=a.useConfig(),d=e.ref(a.createUid()),f=e.ref(!1),s=e.ref(void 0),y=e.ref([]),t=e.computed({get:()=>g(),set:o=>o});function g(){return L.useNestedProp({userConfig:i.config,defaultConfig:z})}e.watch(()=>i.config,o=>{t.value=g(),h()},{deep:!0});const w=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)?N(i.dataset.rating):i.dataset.rating),B=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)),r=e.ref(w.value),m=e.computed(()=>t.value.type==="image"),c=e.computed(()=>t.value.readonly);function N(o){let n=0,l=0;for(const u in o){const V=parseInt(u),b=o[u];n+=V*b,l+=b}if(l===0)return 0;const v=n/l;return Math.min(t.value.to,Math.max(t.value.from,v))}e.onMounted(()=>{h()});function h(){a.objectIsEmpty(i.dataset)&&a.error({componentName:"VueUiRating",type:"dataset"}),y.value=[];for(let o=t.value.from;o<=t.value.to;o+=1)y.value.push(o)}function p(o,n=!1){return o>s.value||c.value?n?t.value.style.image.inactiveOpacity:t.value.style.star.inactiveColor:n?1:t.value.style.star.useGradient?`url(#star_gradient_under_${d.value})`:t.value.style.star.activeColor}function x(o,n=!1){const l=r.value-o,v=n?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*v;default:return l*v}}function $(o){c.value||(r.value=o,S("rate",o))}function C(){return r.value}function E(o=!0){c.value=o}return _({getData:C,toggleReadonly:E}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:n[2]||(n[2]=l=>f.value=!0),onMouseleave:n[3]||(n[3]=l=>{f.value=!1,s.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:e.normalizeStyle(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,v)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:e.normalizeStyle(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)},[m.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.value.style.image.src,height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(s.value)?t.value.style.image.inactiveOpacity:p(l,!0)}`)},null,12,A)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,j),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,F)],8,X)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(s.value)?t.value.style.star.inactiveColor:p(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:s.value?p(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,I)],8,R)),m.value?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.style.image.src,alt:`${t.value.style.image.alt} ${l}`,height:t.value.style.itemSize,width:t.value.style.itemSize,id:`active_${d.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${x(v,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,O)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${x(v)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${d.value}_${l}`,style:{position:"absolute",top:"0",left:"0"}},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,q),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,U)],8,G)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:t.value.style.star.useGradient?`url(#star_gradient_over_${d.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,H)],8,Y)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;${c.value?"":"cursor:pointer"}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:u=>$(l),onMouseenter:u=>s.value=l,onMouseleave:n[0]||(n[0]=u=>s.value=void 0),tabindex:"0",onKeyup:e.withKeys(u=>$(l),["enter"])},null,40,P)),c.value?(e.openBlock(),e.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:u=>s.value=l,onMouseleave:n[1]||(n[1]=u=>s.value=void 0)},null,40,T)):e.createCommentVNode("",!0)],12,K)),t.value.style.tooltip.show&&B.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:4,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${s.value===l?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(l)+":",5),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[l],e.unref(a.dataLabel)({v:i.dataset.rating[l],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0)],4))),256)),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],36))}},J=D._export_sfc(W,[["__scopeId","data-v-d90e158f"]]);exports.default=J;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-YfDOzIGL.cjs"),L=require("./useNestedProp-WJ8kD00a.cjs"),D=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},A=["src","height","width"],R=["xmlns","height","width"],X=["id"],j=["stop-color"],F=["stop-color"],I=["points","fill","stroke","stroke-width"],O=["src","alt","height","width","id"],Y=["xmlns","viewBox","height","id"],G=["id"],q=["stop-color"],U=["stop-color"],H=["points","fill","stroke"],K=["xmlns","height"],P=["onClick","onMouseenter","onKeyup"],T=["onMouseenter"],W={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(k,{expose:_,emit:S}){const i=k,{vue_ui_rating:z}=a.useConfig(),d=e.ref(a.createUid()),f=e.ref(!1),s=e.ref(void 0),y=e.ref([]),t=e.computed({get:()=>g(),set:o=>o});function g(){return L.useNestedProp({userConfig:i.config,defaultConfig:z})}e.watch(()=>i.config,o=>{t.value=g(),h()},{deep:!0});const w=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)?N(i.dataset.rating):i.dataset.rating),B=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)),r=e.ref(w.value),m=e.computed(()=>t.value.type==="image"),c=e.computed(()=>t.value.readonly);function N(o){let n=0,l=0;for(const u in o){const V=parseInt(u),b=o[u];n+=V*b,l+=b}if(l===0)return 0;const v=n/l;return Math.min(t.value.to,Math.max(t.value.from,v))}e.onMounted(()=>{h()});function h(){a.objectIsEmpty(i.dataset)&&a.error({componentName:"VueUiRating",type:"dataset"}),y.value=[];for(let o=t.value.from;o<=t.value.to;o+=1)y.value.push(o)}function p(o,n=!1){return o>s.value||c.value?n?t.value.style.image.inactiveOpacity:t.value.style.star.inactiveColor:n?1:t.value.style.star.useGradient?`url(#star_gradient_under_${d.value})`:t.value.style.star.activeColor}function x(o,n=!1){const l=r.value-o,v=n?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*v;default:return l*v}}function $(o){c.value||(r.value=o,S("rate",o))}function C(){return r.value}function E(o=!0){c.value=o}return _({getData:C,toggleReadonly:E}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:n[2]||(n[2]=l=>f.value=!0),onMouseleave:n[3]||(n[3]=l=>{f.value=!1,s.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:e.normalizeStyle(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,v)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:e.normalizeStyle(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)},[m.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.value.style.image.src,height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(s.value)?t.value.style.image.inactiveOpacity:p(l,!0)}`)},null,12,A)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,j),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,F)],8,X)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(s.value)?t.value.style.star.inactiveColor:p(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:s.value?p(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,I)],8,R)),m.value?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.style.image.src,alt:`${t.value.style.image.alt} ${l}`,height:t.value.style.itemSize,width:t.value.style.itemSize,id:`active_${d.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${x(v,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,O)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${x(v)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${d.value}_${l}`,style:{position:"absolute",top:"0",left:"0"}},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,q),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,U)],8,G)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:t.value.style.star.useGradient?`url(#star_gradient_over_${d.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,H)],8,Y)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;${c.value?"":"cursor:pointer"}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:u=>$(l),onMouseenter:u=>s.value=l,onMouseleave:n[0]||(n[0]=u=>s.value=void 0),tabindex:"0",onKeyup:e.withKeys(u=>$(l),["enter"])},null,40,P)),c.value?(e.openBlock(),e.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:u=>s.value=l,onMouseleave:n[1]||(n[1]=u=>s.value=void 0)},null,40,T)):e.createCommentVNode("",!0)],12,K)),t.value.style.tooltip.show&&B.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:4,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${s.value===l?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(l)+":",5),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[l],e.unref(a.dataLabel)({v:i.dataset.rating[l],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0)],4))),256)),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],36))}},J=D._export_sfc(W,[["__scopeId","data-v-d90e158f"]]);exports.default=J;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as h, computed as x, watch as U, onMounted as K, openBlock as a, createElementBlock as i, normalizeStyle as o, createElementVNode as r, toDisplayString as g, createCommentVNode as d, unref as s, Fragment as T, renderList as H, withKeys as P } from "vue";
|
|
2
|
-
import { u as W, c as q, o as J, e as Q, i as $, f as _, X as k, w as R, V as F } from "./index-
|
|
3
|
-
import { u as Z } from "./useNestedProp-
|
|
2
|
+
import { u as W, c as q, o as J, e as Q, i as $, f as _, X as k, w as R, V as F } from "./index-DwLdoaoI.js";
|
|
3
|
+
import { u as Z } from "./useNestedProp-BE-9rWPi.js";
|
|
4
4
|
import { _ as tt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const et = {
|
|
6
6
|
key: 0,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useCssVars as xe, computed as c, ref as a, watch as be, onMounted as Ae, onBeforeUnmount as Oe, openBlock as n, createElementBlock as i, normalizeStyle as C, createBlock as A, createCommentVNode as f, unref as y, createSlots as Pe, withCtx as O, renderSlot as m, normalizeProps as N, guardReactiveProps as S, normalizeClass as R, createVNode as Ie, createElementVNode as Fe, Fragment as P, renderList as I, toDisplayString as Te } from "vue";
|
|
2
|
-
import { u as Ee, c as ze, t as Le, a as Ne, p as ne, b as Se, o as Re, e as re, g as Me, X as je } from "./index-
|
|
2
|
+
import { u as Ee, c as ze, t as Le, a as Ne, p as ne, b as Se, o as Re, e as re, g as Me, X as je } from "./index-DwLdoaoI.js";
|
|
3
3
|
import { t as Be, u as Ge } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as Ue } from "./Title-
|
|
5
|
-
import { u as De, U as Ve } from "./usePrinter-
|
|
6
|
-
import We from "./vue-ui-skeleton-
|
|
7
|
-
import { u as se } from "./useNestedProp-
|
|
8
|
-
import { _ as Xe } from "./PackageVersion-
|
|
9
|
-
import { P as Ye } from "./PenAndPaper-
|
|
4
|
+
import { _ as Ue } from "./Title-CFHy9-HZ.js";
|
|
5
|
+
import { u as De, U as Ve } from "./usePrinter-QQ8sIBRI.js";
|
|
6
|
+
import We from "./vue-ui-skeleton-C7cQjNuh.js";
|
|
7
|
+
import { u as se } from "./useNestedProp-BE-9rWPi.js";
|
|
8
|
+
import { _ as Xe } from "./PackageVersion-6g32vfzE.js";
|
|
9
|
+
import { P as Ye } from "./PenAndPaper-Bxz6JnY-.js";
|
|
10
10
|
import { _ as qe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
11
|
const He = ["id"], Je = ["xmlns", "viewBox"], Ke = ["cx", "cy", "r", "stroke", "stroke-width"], Qe = { key: 0 }, Ze = ["stroke", "d", "stroke-width"], et = { key: 1 }, tt = ["stroke", "x1", "x2", "y1", "y2"], lt = ["text-anchor", "transform", "x", "y", "onClick", "font-weight", "font-size", "fill"], nt = ["cx", "cy", "fill", "onClick", "r"], rt = {
|
|
12
12
|
key: 5,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-KDxAXZXP.cjs"),U=require("./useResponsive-BJ7DTGpm.cjs"),de=require("./Title-CYDoc6j3.cjs"),D=require("./usePrinter-l7v2Rcgc.cjs"),ve=require("./vue-ui-skeleton-CdeslaC3.cjs"),W=require("./useNestedProp-CXjSKjKD.cjs"),fe=require("./PackageVersion-BzA9shEH.cjs"),ge=require("./PenAndPaper-DolOORON.cjs"),me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ye=["id"],he=["xmlns","viewBox"],ke=["cx","cy","r","stroke","stroke-width"],pe={key:0},Ce=["stroke","d","stroke-width"],_e={key:1},$e=["stroke","x1","x2","y1","y2"],xe=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],we=["cx","cy","fill","onClick","r"],Be={key:5,class:"vue-data-ui-watermark"},be={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(X,{expose:Y}){const u=X;e.useCssVars(t=>({"47419f48":ee.value,"77774d27":Z.value,df46026e:te.value}));const{vue_ui_relation_circle:H}=i.useConfig(),C=e.computed(()=>!!u.dataset&&Object.keys(u.dataset).length),g=e.ref(i.createUid()),B=e.ref(0),m=e.ref(null),b=e.ref(null),P=e.ref(null),A=e.ref(null),O=e.ref(0),n=e.computed({get:()=>E(),set:t=>t});function E(){const t=W.useNestedProp({userConfig:u.config,defaultConfig:H});return t.theme?{...W.useNestedProp({userConfig:i.themes.vue_ui_relation_circle[t.theme]||u.config,defaultConfig:t}),customPalette:i.themePalettes[t.theme]||i.palette}:t}e.watch(()=>u.config,t=>{n.value=E(),T(),O.value+=1},{deep:!0});const{isPrinting:S,isImaging:I,generatePdf:N,generateImage:z}=D.usePrinter({elementId:`relation_circle_${g.value}`,fileName:n.value.style.title.text||"vue-ui-relation-circle"}),J=e.computed(()=>n.value.userOptions.show&&!n.value.style.title.text),F=e.computed(()=>i.convertCustomPalette(n.value.customPalette)),d=e.ref([]),f=e.ref([]),a=e.ref({}),c=e.ref([]),K=e.ref(0),_=e.computed(()=>u.dataset.slice(0,n.value.style.limit)),$=e.ref(n.value.style.size),s=e.ref({height:n.value.style.size,width:n.value.style.size}),v=e.computed({get(){return $.value*n.value.style.circle.radiusProportion},set(t){return t}}),Q=e.computed(()=>n.value.style.links.curved),Z=e.computed(()=>`${n.value.style.animation.speedMs}ms`),ee=e.computed(()=>v.value*2),te=e.computed(()=>v.value*4),h=e.ref(null);e.onMounted(()=>{T(),document.getElementById(`relation_circle_${g.value}`).addEventListener("click",L)});function T(){if(i.objectIsEmpty(u.dataset)?i.error({componentName:"VueUiRelationCircle",type:"dataset"}):u.dataset.forEach((t,r)=>{i.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(l=>{i.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:l,index:r})})}),n.value.responsive){const t=U.throttle(()=>{const{width:r,height:l}=U.useResponsive({chart:m.value,title:n.value.style.title.text?b.value:null,source:P.value,noTitle:A.value});$.value=Math.min(r,l),s.value.width=r,s.value.height=l,v.value=$.value*n.value.style.circle.radiusProportion,d.value=[],f.value=[],V(),R()});h.value=new ResizeObserver(t),h.value.observe(m.value.parentNode)}else d.value=[],f.value=[],V(),R()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${g.value}`).removeEventListener("click",L),h.value&&h.value.disconnect()});function L(t){const r=t.target;r&&Array.from(r.classList).includes("vue-ui-user-options")||r&&Array.from(r.classList).includes("vue-ui-user-options-summary")||r&&Array.from(r.classList).includes("vue-data-ui-button")||r&&Array.from(r.classList).includes("vue-ui-relation-circle-legend")||(a.value={},c.value=[])}function V(){const t=6.28319/_.value.length,r=360/_.value.length;let l=0,o=0;_.value.forEach((y,w)=>{const ue=v.value*Math.cos(l)+s.value.width/2,ce=v.value*Math.sin(l)+s.value.height/2+n.value.style.circle.offsetY;d.value.push({x:ue,y:ce,...y,color:y.color?y.color:F.value[w]?F.value[w]:i.palette[w],regAngle:o}),l+=t,o+=r})}function R(){d.value.forEach(t=>{d.value.filter(l=>l.relations.includes(t.id)).forEach((l,o)=>{f.value.push({weight:t.weights&&t.weights[o]?t.weights[o]:1,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,...t})})})}const le=e.computed(()=>Math.max(...f.value.map(t=>t.weight)));function ne(t){return Object.hasOwn(a.value,"x")?c.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function q(t){return Object.hasOwn(a.value,"x")?t.colorTarget:t.colorSource}function M(t){return Object.hasOwn(a.value,"x")?c.value.includes(t.id)&&t.relationId===`${t.id}_${a.value.id}`||t.relationId===`${a.value.id}_${t.id}`?`opacity:1;stroke-width:${G(t)}`:"opacity: 0":"opacity: 1"}function re(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function oe(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function ae(t){return Object.hasOwn(a.value,"x")?a.value.id===t.id||c.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function se(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function j(t){K.value=360-t.regAngle,a.value.id&&t.id===a.value.id?(a.value={},c.value=[]):(a.value=t,c.value=[...t.relations])}function G(t){return t.weight/le.value*n.value.style.links.maxWidth}const k=e.ref(!1);function ie(t){k.value=t,B.value+=1}const p=e.ref(!1);function x(){p.value=!p.value}return Y({generatePdf:N,generateImage:z,toggleAnnotator:x}),(t,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:m,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${n.value.style.backgroundColor};text-align:center;${n.value.responsive?"height: 100%":""}`),id:`relation_circle_${g.value}`},[n.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ge.PenAndPaper,{key:0,parent:m.value,backgroundColor:n.value.style.backgroundColor,color:n.value.style.color,active:p.value,onClose:x},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),J.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:A,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),n.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:b,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(de._sfc_main,{key:`title_${O.value}`,config:{title:{cy:"relation-div-title",...n.value.style.title},subtitle:{cy:"relation-div-subtitle",...n.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),n.value.userOptions.show&&C.value?(e.openBlock(),e.createBlock(D.UserOptions,{ref:"details",key:`user_options_${B.value}`,backgroundColor:n.value.style.backgroundColor,color:n.value.style.color,isPrinting:e.unref(S),isImaging:e.unref(I),uid:g.value,hasPdf:n.value.userOptions.buttons.pdf,hasImg:n.value.userOptions.buttons.img,hasFullscreen:n.value.userOptions.buttons.img,hasXls:!1,isFullscreen:k.value,titles:{...n.value.userOptions.buttonTitles},chartElement:m.value,position:n.value.userOptions.position,hasAnnotator:n.value.userOptions.buttons.annotator,isAnnotation:p.value,onToggleFullscreen:ie,onGeneratePdf:e.unref(N),onGenerateImage:e.unref(z),onToggleAnnotator:x},e.createSlots({_:2},[t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"2"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:o})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:o})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(i.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value},"relation-circle"]),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,width:"100%",style:"user-select:none; background:transparent"},[e.createVNode(fe._sfc_main),e.createElementVNode("circle",{cx:(s.value.width<=0?1e-4:s.value.width)/2,cy:(s.value.height<=0?1e-4:s.value.height)/2+n.value.style.circle.offsetY,r:v.value<=0?1e-4:v.value,stroke:n.value.style.circle.stroke,"stroke-width":n.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,ke),Q.value?(e.openBlock(),e.createElementBlock("g",pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,o)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${o}`,style:e.normalizeStyle(M(l)),stroke:q(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":a.value.hasOwnProperty("id")&&c.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${s.value.width/2},${s.value.height/2+n.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":G(l),"stroke-linecap":"round"},null,14,Ce))),128))])):(e.openBlock(),e.createElementBlock("g",_e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,o)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${o}`,stroke:q(l),style:e.normalizeStyle(M(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":a.value.hasOwnProperty("id")&&c.value.includes(l.id)}),"stroke-linecap":"round"},null,14,$e))),128))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${o}`,"text-anchor":re(l),transform:se(l),x:oe(l),y:l.y+5,onClick:y=>j(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":a.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${n.value.style.fontFamily};${ae(l)}`),"font-size":n.value.style.labels.fontSize,fill:n.value.style.labels.color},e.toDisplayString(l.label),13,xe))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${o}`,style:e.normalizeStyle(ne(l)),class:"vue-ui-relation-circle-plot",fill:n.value.style.plot.color,onClick:y=>j(l),r:n.value.style.plot.radius},null,12,we))),128)),e.renderSlot(t.$slots,"svg",{svg:s.value},void 0,!0)],10,he)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Be,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(S)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:P,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),C.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ve.default,{key:7,config:{type:"relationCircle",style:{backgroundColor:n.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],12,ye))}},Pe=me._export_sfc(be,[["__scopeId","data-v-a4837ff7"]]);exports.default=Pe;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-YfDOzIGL.cjs"),U=require("./useResponsive-BJ7DTGpm.cjs"),de=require("./Title-DPx1SQ60.cjs"),D=require("./usePrinter-BfKKkLev.cjs"),ve=require("./vue-ui-skeleton-BypGpnGR.cjs"),W=require("./useNestedProp-WJ8kD00a.cjs"),fe=require("./PackageVersion-Bdfz6JAs.cjs"),ge=require("./PenAndPaper-qO8pMTxM.cjs"),me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ye=["id"],he=["xmlns","viewBox"],ke=["cx","cy","r","stroke","stroke-width"],pe={key:0},Ce=["stroke","d","stroke-width"],_e={key:1},$e=["stroke","x1","x2","y1","y2"],xe=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],we=["cx","cy","fill","onClick","r"],Be={key:5,class:"vue-data-ui-watermark"},be={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(X,{expose:Y}){const u=X;e.useCssVars(t=>({"47419f48":ee.value,"77774d27":Z.value,df46026e:te.value}));const{vue_ui_relation_circle:H}=i.useConfig(),C=e.computed(()=>!!u.dataset&&Object.keys(u.dataset).length),g=e.ref(i.createUid()),B=e.ref(0),m=e.ref(null),b=e.ref(null),P=e.ref(null),A=e.ref(null),O=e.ref(0),n=e.computed({get:()=>E(),set:t=>t});function E(){const t=W.useNestedProp({userConfig:u.config,defaultConfig:H});return t.theme?{...W.useNestedProp({userConfig:i.themes.vue_ui_relation_circle[t.theme]||u.config,defaultConfig:t}),customPalette:i.themePalettes[t.theme]||i.palette}:t}e.watch(()=>u.config,t=>{n.value=E(),T(),O.value+=1},{deep:!0});const{isPrinting:S,isImaging:I,generatePdf:N,generateImage:z}=D.usePrinter({elementId:`relation_circle_${g.value}`,fileName:n.value.style.title.text||"vue-ui-relation-circle"}),J=e.computed(()=>n.value.userOptions.show&&!n.value.style.title.text),F=e.computed(()=>i.convertCustomPalette(n.value.customPalette)),d=e.ref([]),f=e.ref([]),a=e.ref({}),c=e.ref([]),K=e.ref(0),_=e.computed(()=>u.dataset.slice(0,n.value.style.limit)),$=e.ref(n.value.style.size),s=e.ref({height:n.value.style.size,width:n.value.style.size}),v=e.computed({get(){return $.value*n.value.style.circle.radiusProportion},set(t){return t}}),Q=e.computed(()=>n.value.style.links.curved),Z=e.computed(()=>`${n.value.style.animation.speedMs}ms`),ee=e.computed(()=>v.value*2),te=e.computed(()=>v.value*4),h=e.ref(null);e.onMounted(()=>{T(),document.getElementById(`relation_circle_${g.value}`).addEventListener("click",L)});function T(){if(i.objectIsEmpty(u.dataset)?i.error({componentName:"VueUiRelationCircle",type:"dataset"}):u.dataset.forEach((t,r)=>{i.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(l=>{i.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:l,index:r})})}),n.value.responsive){const t=U.throttle(()=>{const{width:r,height:l}=U.useResponsive({chart:m.value,title:n.value.style.title.text?b.value:null,source:P.value,noTitle:A.value});$.value=Math.min(r,l),s.value.width=r,s.value.height=l,v.value=$.value*n.value.style.circle.radiusProportion,d.value=[],f.value=[],V(),R()});h.value=new ResizeObserver(t),h.value.observe(m.value.parentNode)}else d.value=[],f.value=[],V(),R()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${g.value}`).removeEventListener("click",L),h.value&&h.value.disconnect()});function L(t){const r=t.target;r&&Array.from(r.classList).includes("vue-ui-user-options")||r&&Array.from(r.classList).includes("vue-ui-user-options-summary")||r&&Array.from(r.classList).includes("vue-data-ui-button")||r&&Array.from(r.classList).includes("vue-ui-relation-circle-legend")||(a.value={},c.value=[])}function V(){const t=6.28319/_.value.length,r=360/_.value.length;let l=0,o=0;_.value.forEach((y,w)=>{const ue=v.value*Math.cos(l)+s.value.width/2,ce=v.value*Math.sin(l)+s.value.height/2+n.value.style.circle.offsetY;d.value.push({x:ue,y:ce,...y,color:y.color?y.color:F.value[w]?F.value[w]:i.palette[w],regAngle:o}),l+=t,o+=r})}function R(){d.value.forEach(t=>{d.value.filter(l=>l.relations.includes(t.id)).forEach((l,o)=>{f.value.push({weight:t.weights&&t.weights[o]?t.weights[o]:1,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,...t})})})}const le=e.computed(()=>Math.max(...f.value.map(t=>t.weight)));function ne(t){return Object.hasOwn(a.value,"x")?c.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function q(t){return Object.hasOwn(a.value,"x")?t.colorTarget:t.colorSource}function M(t){return Object.hasOwn(a.value,"x")?c.value.includes(t.id)&&t.relationId===`${t.id}_${a.value.id}`||t.relationId===`${a.value.id}_${t.id}`?`opacity:1;stroke-width:${G(t)}`:"opacity: 0":"opacity: 1"}function re(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function oe(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function ae(t){return Object.hasOwn(a.value,"x")?a.value.id===t.id||c.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function se(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function j(t){K.value=360-t.regAngle,a.value.id&&t.id===a.value.id?(a.value={},c.value=[]):(a.value=t,c.value=[...t.relations])}function G(t){return t.weight/le.value*n.value.style.links.maxWidth}const k=e.ref(!1);function ie(t){k.value=t,B.value+=1}const p=e.ref(!1);function x(){p.value=!p.value}return Y({generatePdf:N,generateImage:z,toggleAnnotator:x}),(t,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:m,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${n.value.style.backgroundColor};text-align:center;${n.value.responsive?"height: 100%":""}`),id:`relation_circle_${g.value}`},[n.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ge.PenAndPaper,{key:0,parent:m.value,backgroundColor:n.value.style.backgroundColor,color:n.value.style.color,active:p.value,onClose:x},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),J.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:A,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),n.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:b,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(de._sfc_main,{key:`title_${O.value}`,config:{title:{cy:"relation-div-title",...n.value.style.title},subtitle:{cy:"relation-div-subtitle",...n.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),n.value.userOptions.show&&C.value?(e.openBlock(),e.createBlock(D.UserOptions,{ref:"details",key:`user_options_${B.value}`,backgroundColor:n.value.style.backgroundColor,color:n.value.style.color,isPrinting:e.unref(S),isImaging:e.unref(I),uid:g.value,hasPdf:n.value.userOptions.buttons.pdf,hasImg:n.value.userOptions.buttons.img,hasFullscreen:n.value.userOptions.buttons.img,hasXls:!1,isFullscreen:k.value,titles:{...n.value.userOptions.buttonTitles},chartElement:m.value,position:n.value.userOptions.position,hasAnnotator:n.value.userOptions.buttons.annotator,isAnnotation:p.value,onToggleFullscreen:ie,onGeneratePdf:e.unref(N),onGenerateImage:e.unref(z),onToggleAnnotator:x},e.createSlots({_:2},[t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"2"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:o})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:o})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(i.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value},"relation-circle"]),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,width:"100%",style:"user-select:none; background:transparent"},[e.createVNode(fe._sfc_main),e.createElementVNode("circle",{cx:(s.value.width<=0?1e-4:s.value.width)/2,cy:(s.value.height<=0?1e-4:s.value.height)/2+n.value.style.circle.offsetY,r:v.value<=0?1e-4:v.value,stroke:n.value.style.circle.stroke,"stroke-width":n.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,ke),Q.value?(e.openBlock(),e.createElementBlock("g",pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,o)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${o}`,style:e.normalizeStyle(M(l)),stroke:q(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":a.value.hasOwnProperty("id")&&c.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${s.value.width/2},${s.value.height/2+n.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":G(l),"stroke-linecap":"round"},null,14,Ce))),128))])):(e.openBlock(),e.createElementBlock("g",_e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,o)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${o}`,stroke:q(l),style:e.normalizeStyle(M(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":a.value.hasOwnProperty("id")&&c.value.includes(l.id)}),"stroke-linecap":"round"},null,14,$e))),128))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${o}`,"text-anchor":re(l),transform:se(l),x:oe(l),y:l.y+5,onClick:y=>j(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":a.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${n.value.style.fontFamily};${ae(l)}`),"font-size":n.value.style.labels.fontSize,fill:n.value.style.labels.color},e.toDisplayString(l.label),13,xe))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${o}`,style:e.normalizeStyle(ne(l)),class:"vue-ui-relation-circle-plot",fill:n.value.style.plot.color,onClick:y=>j(l),r:n.value.style.plot.radius},null,12,we))),128)),e.renderSlot(t.$slots,"svg",{svg:s.value},void 0,!0)],10,he)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Be,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(S)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:P,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),C.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ve.default,{key:7,config:{type:"relationCircle",style:{backgroundColor:n.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],12,ye))}},Pe=me._export_sfc(be,[["__scopeId","data-v-a4837ff7"]]);exports.default=Pe;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-YfDOzIGL.cjs"),Z=require("./useResponsive-BJ7DTGpm.cjs"),ge=require("./Title-DPx1SQ60.cjs"),ee=require("./usePrinter-BfKKkLev.cjs"),fe=require("./Tooltip-BxmlUqdH.cjs"),me=require("./DataTable-DPFAxETx.cjs"),ye=require("./Legend-pFwNBjPs.cjs"),be=require("./vue-ui-skeleton-BypGpnGR.cjs"),ke=require("./vue-ui-accordion-BDO_Zh68.cjs"),te=require("./useNestedProp-WJ8kD00a.cjs"),Ce=require("./PackageVersion-Bdfz6JAs.cjs"),we=require("./PenAndPaper-qO8pMTxM.cjs"),Te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),xe=["id"],Ne=["xmlns","viewBox"],$e=["id"],Se=["stop-color"],Be=["stop-color"],Pe=["stroke","cx","cy","r","fill"],_e=["stroke","stroke-width","cx","cy","r","fill"],Le=["cx","cy","r","onMouseenter"],Ve={key:5,class:"vue-data-ui-watermark"},Ee=["onClick"],Ae={key:0},Oe={key:1},ze=["innerHTML"],Fe={__name:"vue-ui-rings",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(oe,{expose:le,emit:ae}){const v=oe,{vue_ui_rings:re}=r.useConfig(),b=e.ref(!1),T=e.computed(()=>!!v.dataset&&v.dataset.length),k=e.ref(r.createUid()),ne=e.ref(null),x=e.ref(!1),P=e.ref(""),m=e.ref(null),E=e.ref(0),y=e.ref(null),A=e.ref(null),O=e.ref(null),z=e.ref(null),F=e.ref(null),I=e.ref(0),R=e.ref(0),M=e.ref(0),t=e.computed({get:()=>q(),set:o=>o});function q(){const o=te.useNestedProp({userConfig:v.config,defaultConfig:re});return o.theme?{...te.useNestedProp({userConfig:r.themes.vue_ui_rings[o.theme]||v.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}e.watch(()=>v.config,o=>{t.value=q(),D(),I.value+=1,R.value+=1,M.value+=1},{deep:!0});const N=e.ref(null);e.onMounted(()=>{D()});function D(){if(r.objectIsEmpty(v.dataset)?r.error({componentName:"VueUiRings",type:"dataset"}):v.dataset.forEach((o,a)=>{o.values.length||r.error({componentName:"VueUiRings",type:"dataset"}),r.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values"]}).forEach(l=>{r.error({componentName:"VueUiRings",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive){const o=Z.throttle(()=>{const{width:a,height:l}=Z.useResponsive({chart:y.value,title:t.value.style.chart.title.text?A.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:z.value,noTitle:F.value});s.value.width=a,s.value.height=l});N.value=new ResizeObserver(o),N.value.observe(y.value.parentNode)}setTimeout(()=>{b.value=!0},600)}e.onBeforeUnmount(()=>{N.value&&N.value.disconnect()});const{isPrinting:U,isImaging:H,generatePdf:W,generateImage:G}=ee.usePrinter({elementId:`rings_${k.value}`,fileName:t.value.style.chart.title.text||"vue-ui-rings"}),ue=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),j=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),g=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),s=e.ref({height:360,width:360}),se=e.computed(()=>Math.min(s.value.height,s.value.width)),i=e.ref([]);function _(o){i.value.includes(o)?i.value=i.value.filter(a=>a!==o):i.value.push(o),ae("selectLegend",c.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const ie=e.computed(()=>Math.max(...$.value.filter(o=>!i.value.includes(o.uid)).map(({value:o})=>o)));function X(o){return o/ie.value}const $=e.computed(()=>v.dataset.map(({values:o,name:a,color:l=null},n)=>{const u=r.sanitizeArray(o).reduce((h,w)=>h+w,0);return{name:a,color:l||r.convertColorToHex(l)||j.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:u,proportion:u/v.dataset.map(h=>(h.values||[]).reduce((w,he)=>w+he,0)).reduce((h,w)=>h+w,0),uid:r.createUid()}})),Y=e.computed(()=>$.value.map(o=>({...o,shape:"circle",opacity:i.value.includes(o.uid)?.5:1,segregate:()=>_(o.uid),isSegregated:i.value.includes(o.uid)})).toSorted((o,a)=>a.value-o.value)),ce=e.computed(()=>({cy:"rings-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":""})),p=e.computed(()=>$.value.filter(o=>!i.value.includes(o.uid)).map(({value:o})=>o).reduce((o,a)=>o+a,0)),c=e.computed(()=>$.value.filter(o=>!i.value.includes(o.uid)).map(({name:o,value:a,color:l=null,uid:n},u)=>({uid:n,name:o,color:l||r.convertColorToHex(l)||j.value[u]||r.palette[u]||r.palette[u%r.palette.length],value:a,proportion:X(a),percentage:a/p.value*100,strokeWidth:t.value.style.chart.layout.rings.strokeWidth*X(a)})).toSorted((o,a)=>a.value-o.value));function de(){return c.value.map(({name:o,color:a,value:l,absoluteValues:n,percentage:u})=>({name:o,color:a,value:l,absoluteValues:n,percentage:u}))}const d=e.computed(()=>se.value-t.value.style.chart.layout.rings.strokeWidth*2),L=e.ref(null);function ve(o,a){if(i.value.length===v.dataset.length)return;L.value={datapoint:a,seriesIndex:o,series:c.value,config:t.value},m.value=o;const l=c.value[o],n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:o,datapoint:a,series:c.value,config:t.value})))P.value=n({seriesIndex:o,datapoint:a,series:c.value,config:t.value});else{let u="";u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}" /></svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:o})}
|
|
2
2
|
</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${r.dataLabel({v:l.value/p.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:u+=`<b>${r.dataLabel({v:l.value/p.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),P.value=u}x.value=!0}const f=e.computed(()=>{const o=c.value.map(l=>({name:l.name,color:l.color})),a=c.value.map(l=>l.value);return{head:o,body:a}}),S=e.computed(()=>{const o=[' <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>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:p.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=f.value.head.map((u,h)=>[{color:u.color,name:u.name},r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:f.value.body[h],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),isNaN(f.value.body[h]/p.value)?"-":(f.value.body[h]/p.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),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},n=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:o,body:a,config:l,colNames:n}});function J(){e.nextTick(()=>{const o=f.value.head.map((n,u)=>[[n.name],[f.value.body[u]],[isNaN(f.value.body[u]/p.value)?"-":f.value.body[u]/p.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=r.createCsvContent(a);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-rings"})})}const C=e.ref(!1);function pe(o){C.value=o,E.value+=1}function K(){g.value.showTable=!g.value.showTable}function Q(){g.value.showTooltip=!g.value.showTooltip}const B=e.ref(!1);function V(){B.value=!B.value}return le({getData:de,generatePdf:W,generateCsv:J,generateImage:G,toggleTable:K,toggleTooltip:Q,toggleAnnotator:V}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"ringsChart",ref:y,class:e.normalizeClass(`vue-ui-rings ${C.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};text-align:center;width:100%;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),id:`rings_${k.value}`,onMouseleave:a[3]||(a[3]=l=>{m.value=null,x.value=!1})},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(we.PenAndPaper,{key:0,parent:y.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:V},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ue.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:F,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:A,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(ge._sfc_main,{key:`title_${I.value}`,config:{title:{cy:"rings-div-title",...t.value.style.chart.title},subtitle:{cy:"rings-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&T.value?(e.openBlock(),e.createBlock(ee.UserOptions,{ref_key:"details",ref:ne,key:`user_options_${E.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(H),uid:k.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,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,isTooltip:g.value.showTooltip,isFullscreen:C.value,titles:{...t.value.userOptions.buttonTitles},chartElement:y.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(W),onGenerateCsv:J,onGenerateImage:e.unref(G),onToggleTable:K,onToggleTooltip:Q,onToggleAnnotator:V},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),T.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ce._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(l,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${k.value}_${n}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(l.color,.05),100-t.value.style.chart.layout.rings.gradient.intensity)},null,8,Se),e.createElementVNode("stop",{offset:"100%","stop-color":l.color},null,8,Be)],8,$e))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":b.value&&t.value.useCssAnimation,"vue-rings-item-onload":!b.value&&t.value.useCssAnimation,"vue-ui-rings-opacity":m.value!==null&&m.value!==n}),style:e.normalizeStyle(`animation-delay:${n*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*l.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*l.proportion/2*.9<=0?1e-4:d.value*l.proportion/2*.9),fill:t.value.style.chart.layout.rings.gradient.underlayerColor},null,14,Pe),e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":b.value&&t.value.useCssAnimation,"vue-rings-item-onload":!b.value&&t.value.useCssAnimation,"vue-ui-rings-shadow":t.value.style.chart.layout.rings.useShadow,"vue-ui-rings-blur":m.value!==null&&m.value!==n}),style:e.normalizeStyle(`animation-delay:${n*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,"stroke-width":l.strokeWidth<.5?.5:l.strokeWidth,cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*l.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*l.proportion/2*.9<=0?1e-4:d.value*l.proportion/2*.9),fill:t.value.style.chart.layout.rings.gradient.show?`url(#gradient_${k.value}_${n})`:l.color},null,14,_e),e.createElementVNode("circle",{"data-cy-trap":"",stroke:"none",cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*l.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*l.proportion/2*.9<=0?1e-4:d.value*l.proportion/2*.9),fill:"transparent",onMouseenter:u=>ve(n,l),onMouseleave:a[0]||(a[0]=u=>{m.value=null,x.value=!1})},null,40,Le)]))),256)),e.renderSlot(o.$slots,"svg",{svg:s.value},void 0,!0)],14,Ne)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ve,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(H)})),void 0,!0)])):e.createCommentVNode("",!0),T.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(be.default,{key:6,config:{type:"rings",style:{backgroundColor:t.value.style.chart.backgroundColor,rings:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:O},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ye.Legend,{key:`legend_${M.value}`,legendSet:Y.value,config:ce.value,onClickMarker:a[1]||(a[1]=({legend:l})=>_(l.uid))},{item:e.withCtx(({legend:l,index:n})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>_(l.uid),style:e.normalizeStyle(`opacity:${i.value.includes(l.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:n}))+" ",1),i.value.includes(l.uid)?(e.openBlock(),e.createElementBlock("span",Oe," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Ae," ("+e.toDisplayString(isNaN(l.value/p.value)?"-":e.unref(r.dataLabel)({v:l.value/p.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ee)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:Y.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:z,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(fe._sfc_main,{show:g.value.showTooltip&&x.value&&i.value.length<v.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,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:y.value,content:P.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),T.value?(e.openBlock(),e.createBlock(ke.default,{key:8,hideDetails:"",config:{open:g.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(me.DataTable,{key:`table_${R.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.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[2]||(a[2]=l=>g.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,ze)]),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)],46,xe))}},Ie=Te._export_sfc(Fe,[["__scopeId","data-v-2a4f4cb4"]]);exports.default=Ie;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { ref as n, computed as v, watch as Re, onMounted as Ve, onBeforeUnmount as Be, openBlock as r, createElementBlock as f, normalizeClass as W, normalizeStyle as I, createBlock as _, createCommentVNode as k, unref as i, createSlots as De, withCtx as p, renderSlot as h, normalizeProps as F, guardReactiveProps as M, createVNode as fe, createElementVNode as C, Fragment as ye, renderList as me, createTextVNode as be, toDisplayString as E, nextTick as Ue } from "vue";
|
|
2
|
-
import { u as We, c as ke, t as Ee, a as Ge, p as x, o as He, e as Y, g as Xe, b as je, I as Ye, d as Ce, f as N, X as qe, s as Je, w as Ke, v as q, i as we, x as Qe, y as Ze, q as et, r as tt } from "./index-
|
|
2
|
+
import { u as We, c as ke, t as Ee, a as Ge, p as x, o as He, e as Y, g as Xe, b as je, I as Ye, d as Ce, f as N, X as qe, s as Je, w as Ke, v as q, i as we, x as Qe, y as Ze, q as et, r as tt } from "./index-DwLdoaoI.js";
|
|
3
3
|
import { t as lt, u as ot } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as at } from "./Title-
|
|
5
|
-
import { u as st, U as nt } from "./usePrinter-
|
|
6
|
-
import { _ as rt } from "./Tooltip-
|
|
7
|
-
import { D as ut } from "./DataTable-
|
|
8
|
-
import { L as it } from "./Legend-
|
|
9
|
-
import vt from "./vue-ui-skeleton-
|
|
10
|
-
import ct from "./vue-ui-accordion-
|
|
11
|
-
import { u as $e } from "./useNestedProp-
|
|
12
|
-
import { _ as dt } from "./PackageVersion-
|
|
13
|
-
import { P as pt } from "./PenAndPaper-
|
|
4
|
+
import { _ as at } from "./Title-CFHy9-HZ.js";
|
|
5
|
+
import { u as st, U as nt } from "./usePrinter-QQ8sIBRI.js";
|
|
6
|
+
import { _ as rt } from "./Tooltip-DLCVqP66.js";
|
|
7
|
+
import { D as ut } from "./DataTable-DSmlK27d.js";
|
|
8
|
+
import { L as it } from "./Legend-CjRX0KB0.js";
|
|
9
|
+
import vt from "./vue-ui-skeleton-C7cQjNuh.js";
|
|
10
|
+
import ct from "./vue-ui-accordion-BCbBgQnM.js";
|
|
11
|
+
import { u as $e } from "./useNestedProp-BE-9rWPi.js";
|
|
12
|
+
import { _ as dt } from "./PackageVersion-6g32vfzE.js";
|
|
13
|
+
import { P as pt } from "./PenAndPaper-Bxz6JnY-.js";
|
|
14
14
|
import { _ as ht } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
15
|
const gt = ["id"], ft = ["xmlns", "viewBox"], yt = ["id"], mt = ["stop-color"], bt = ["stop-color"], kt = ["stroke", "cx", "cy", "r", "fill"], Ct = ["stroke", "stroke-width", "cx", "cy", "r", "fill"], wt = ["cx", "cy", "r", "onMouseenter"], $t = {
|
|
16
16
|
key: 5,
|