vue-data-ui 2.3.22 → 2.3.24
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-DxXzMXB1.js → Arrow-BzYehwRw.js} +1 -1
- package/dist/{Arrow-BOSHa3Ag.cjs → Arrow-DfxwtZYG.cjs} +1 -1
- package/dist/{BaseIcon-C-k_mqXL.cjs → BaseIcon-eEUOqFAE.cjs} +1 -1
- package/dist/{BaseIcon-DuMfKUDs.js → BaseIcon-y4nt-SIh.js} +1 -1
- package/dist/{DataTable-CHXdpx94.cjs → DataTable-Ckvkqg78.cjs} +1 -1
- package/dist/{DataTable-DKHF_NH2.js → DataTable-DVpbqbwp.js} +2 -2
- package/dist/{Legend-BqqpwXbu.js → Legend-Crc6SgWK.js} +1 -1
- package/dist/{Legend-BwrzHxLy.cjs → Legend-DA1uCuos.cjs} +1 -1
- package/dist/{Shape-DW18-C9f.cjs → Shape-DaECX0MP.cjs} +1 -1
- package/dist/{Shape-Ccky9omb.js → Shape-_K1DD00e.js} +1 -1
- package/dist/{Slicer-BDsv196Y.js → Slicer-BL7ysGrk.js} +1 -1
- package/dist/{Slicer-xKlzke1v.cjs → Slicer-BeTiFzmi.cjs} +1 -1
- package/dist/{Title-Bx2ibobQ.js → Title-CMEhX9eJ.js} +1 -1
- package/dist/{Title-DxNugmhI.cjs → Title-D9E4eBNp.cjs} +1 -1
- package/dist/{Tooltip-DOEMrisX.js → Tooltip-B2XPbRE_.js} +1 -1
- package/dist/{Tooltip-BC2Wlz7P.cjs → Tooltip-C6EZFw-G.cjs} +1 -1
- package/dist/{index-BvjCO-wv.js → index-BbBCE1pM.js} +1 -1
- package/dist/{index-oufiZvaS.cjs → index-BcLWKvbg.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +1 -1
- package/dist/types/vue-data-ui.d.ts +1 -1
- package/dist/{useNestedProp-CmTItGss.cjs → useNestedProp-BcuQPNiW.cjs} +1 -1
- package/dist/{useNestedProp-2KJaYPfM.js → useNestedProp-QJwLGaK5.js} +1 -1
- package/dist/{usePrinter-Cc8ufBvU.cjs → usePrinter-BWCvrSz2.cjs} +1 -1
- package/dist/{usePrinter-CaKXrCiB.js → usePrinter-CnT0_Cbi.js} +1 -1
- package/dist/{vue-data-ui-DnlOZVL-.js → vue-data-ui-DfTF5XN4.js} +56 -56
- package/dist/{vue-data-ui-D5LrE3dP.cjs → vue-data-ui-JnBZ4O4G.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-Cma1NB-u.cjs → vue-ui-3d-bar-Cmj5FUss.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-qegO2SzJ.js → vue-ui-3d-bar-qtJF55BB.js} +7 -7
- package/dist/{vue-ui-accordion-DiR0dVog.cjs → vue-ui-accordion-BOEIWXgn.cjs} +1 -1
- package/dist/{vue-ui-accordion-q-bLDiD3.js → vue-ui-accordion-CM8Lp-MV.js} +3 -3
- package/dist/{vue-ui-age-pyramid-vQvy7rWY.js → vue-ui-age-pyramid-CVELozuZ.js} +8 -8
- package/dist/{vue-ui-age-pyramid-xk6Gt1LJ.cjs → vue-ui-age-pyramid-ZTUAsVJ3.cjs} +1 -1
- package/dist/{vue-ui-annotator-LwO1PGoN.cjs → vue-ui-annotator-BN1e8QBk.cjs} +1 -1
- package/dist/{vue-ui-annotator-BYT8v1SY.js → vue-ui-annotator-Cfl6lVxC.js} +1 -1
- package/dist/{vue-ui-candlestick-zvv6_kwp.js → vue-ui-candlestick-BhfanGOK.js} +9 -9
- package/dist/{vue-ui-candlestick-CmM0kwJR.cjs → vue-ui-candlestick-g0uWwqCg.cjs} +1 -1
- package/dist/vue-ui-carousel-table-CXmHksHV.js +346 -0
- package/dist/vue-ui-carousel-table-Ccc8TeFs.cjs +1 -0
- package/dist/{vue-ui-chestnut-A9asY_42.js → vue-ui-chestnut-Bw6l763j.js} +6 -6
- package/dist/{vue-ui-chestnut-4MvRD28_.cjs → vue-ui-chestnut-DHa1RSdI.cjs} +1 -1
- package/dist/{vue-ui-cursor-DusWgM7W.cjs → vue-ui-cursor-BGv7dDr-.cjs} +1 -1
- package/dist/{vue-ui-cursor-CPPPIH2W.js → vue-ui-cursor-BK77V_9W.js} +2 -2
- package/dist/{vue-ui-dashboard-CuQ81BKN.js → vue-ui-dashboard-CshdP-o6.js} +2 -2
- package/dist/{vue-ui-dashboard-ZTzEd521.cjs → vue-ui-dashboard-fqSrgnC8.cjs} +1 -1
- package/dist/{vue-ui-digits-DlupvOo-.cjs → vue-ui-digits-BFiCPsVU.cjs} +1 -1
- package/dist/{vue-ui-digits-Czkbi2AR.js → vue-ui-digits-tFHIZZ9N.js} +2 -2
- package/dist/{vue-ui-donut-DA5YfWlL.cjs → vue-ui-donut-BOq5T2_k.cjs} +1 -1
- package/dist/{vue-ui-donut-Cis7kzDB.js → vue-ui-donut-DwCC5FLx.js} +9 -9
- package/dist/{vue-ui-donut-evolution-BigmUCTm.cjs → vue-ui-donut-evolution-Bg70zsf9.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-D2I4ZD5a.js → vue-ui-donut-evolution-CysSbRMg.js} +9 -9
- package/dist/{vue-ui-dumbbell-D8ZSCX0H.cjs → vue-ui-dumbbell-DIbbkhZs.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-fdV94xQB.js → vue-ui-dumbbell-Df9_opHf.js} +8 -8
- package/dist/{vue-ui-flow-CH6PmIBT.cjs → vue-ui-flow-BYvtiYei.cjs} +1 -1
- package/dist/{vue-ui-flow-C1PVwgKX.js → vue-ui-flow-DtZGgvJy.js} +7 -7
- package/dist/{vue-ui-galaxy-IFmqHh3R.cjs → vue-ui-galaxy-B2fbFVWs.cjs} +1 -1
- package/dist/{vue-ui-galaxy-DzWOfvyj.js → vue-ui-galaxy-DqiIk9DH.js} +9 -9
- package/dist/{vue-ui-gauge-Bbda2H3b.cjs → vue-ui-gauge-Ce80Waly.cjs} +1 -1
- package/dist/{vue-ui-gauge-CeGa1oMf.js → vue-ui-gauge-CkWosWjO.js} +5 -5
- package/dist/{vue-ui-gizmo-DyJngE0E.cjs → vue-ui-gizmo-Clsm9g4j.cjs} +1 -1
- package/dist/{vue-ui-gizmo-BILyJylm.js → vue-ui-gizmo-Cz_vLQob.js} +2 -2
- package/dist/{vue-ui-heatmap-Dp68UbGB.cjs → vue-ui-heatmap-C5C46dEp.cjs} +1 -1
- package/dist/{vue-ui-heatmap-DRk0VXaJ.js → vue-ui-heatmap-DPIUcnuz.js} +8 -8
- package/dist/{vue-ui-kpi-Mbre-_3M.cjs → vue-ui-kpi-D1ViyJSz.cjs} +1 -1
- package/dist/{vue-ui-kpi-u5GBFKBR.js → vue-ui-kpi-DUDYmxGM.js} +2 -2
- package/dist/{vue-ui-mini-loader-DLXv9Seq.js → vue-ui-mini-loader-WhdcL_Ka.js} +2 -2
- package/dist/{vue-ui-mini-loader-CXiMb5pi.cjs → vue-ui-mini-loader-ggvINlYv.cjs} +1 -1
- package/dist/{vue-ui-molecule-JlPbVJ8I.js → vue-ui-molecule-DJvkH7pt.js} +9 -9
- package/dist/{vue-ui-molecule-DOwGWqSR.cjs → vue-ui-molecule-fzhl4bdu.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-C3Boyr96.js → vue-ui-mood-radar-D_5uqQQu.js} +9 -9
- package/dist/{vue-ui-mood-radar-BF3WqcyN.cjs → vue-ui-mood-radar-Dtk9oVC5.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-DkGXmwTg.cjs → vue-ui-nested-donuts-Ds13H5z7.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-C9CFBzvj.js → vue-ui-nested-donuts-XAlzU4h6.js} +9 -9
- package/dist/{vue-ui-onion-COYhqrEx.cjs → vue-ui-onion-DbkWcknp.cjs} +1 -1
- package/dist/{vue-ui-onion-BqzUINBq.js → vue-ui-onion-Dkg0bF7v.js} +9 -9
- package/dist/{vue-ui-parallel-coordinate-plot-BE8Bf0MQ.cjs → vue-ui-parallel-coordinate-plot-GFBhsvzT.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-DtXx6zpM.js → vue-ui-parallel-coordinate-plot-VSLNUybk.js} +10 -10
- package/dist/{vue-ui-quadrant-g34Ky2Hq.cjs → vue-ui-quadrant-ByC7oL_6.cjs} +1 -1
- package/dist/{vue-ui-quadrant-Cr2jm-2w.js → vue-ui-quadrant-Dd6rn_Pi.js} +10 -10
- package/dist/{vue-ui-quick-chart-gurflOrc.js → vue-ui-quick-chart-Bu6exyaS.js} +6 -6
- package/dist/{vue-ui-quick-chart-BEXF1YLk.cjs → vue-ui-quick-chart-Dc71ePSN.cjs} +1 -1
- package/dist/{vue-ui-radar-DGXj7kOe.js → vue-ui-radar-CxJWvM3Y.js} +10 -10
- package/dist/{vue-ui-radar-B77sXFJD.cjs → vue-ui-radar-D8CnwaFE.cjs} +1 -1
- package/dist/{vue-ui-rating-J4wpjGDw.cjs → vue-ui-rating-CESNVfXP.cjs} +1 -1
- package/dist/{vue-ui-rating-D2wmEDux.js → vue-ui-rating-DS1AG6Jp.js} +2 -2
- package/dist/{vue-ui-relation-circle-8hDVUqzX.js → vue-ui-relation-circle-CDCF4oQw.js} +5 -5
- package/dist/{vue-ui-relation-circle-CkO4PvuL.cjs → vue-ui-relation-circle-DVhnxuiU.cjs} +1 -1
- package/dist/{vue-ui-rings-Bt4lsykR.cjs → vue-ui-rings-BfUQSnuu.cjs} +1 -1
- package/dist/{vue-ui-rings-Bs4I_DFj.js → vue-ui-rings-DluO88_f.js} +9 -9
- package/dist/{vue-ui-scatter-pnVV0nUg.cjs → vue-ui-scatter-CI0FcEEN.cjs} +1 -1
- package/dist/{vue-ui-scatter-BcuxFe_0.js → vue-ui-scatter-DWutde89.js} +10 -10
- package/dist/{vue-ui-screenshot-Q4jzniKW.cjs → vue-ui-screenshot-B3nuvgoB.cjs} +1 -1
- package/dist/{vue-ui-screenshot-CkunIVDh.js → vue-ui-screenshot-QZKcfcQz.js} +1 -1
- package/dist/{vue-ui-skeleton-Fsru0dbb.cjs → vue-ui-skeleton-BG428rdQ.cjs} +1 -1
- package/dist/{vue-ui-skeleton-jYHncdu5.js → vue-ui-skeleton-BYBsAUyH.js} +2 -2
- package/dist/{vue-ui-smiley-B3gIeKih.js → vue-ui-smiley-DlM_vi6f.js} +2 -2
- package/dist/{vue-ui-smiley-Bd3lgUj_.cjs → vue-ui-smiley-rIdwAdX9.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-DfD8Q9Zl.cjs → vue-ui-spark-trend-vKIobiEO.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-CgEi2LBP.js → vue-ui-spark-trend-z0SJASPo.js} +4 -4
- package/dist/{vue-ui-sparkbar-Bu_TX-tQ.js → vue-ui-sparkbar-8UFAzq_D.js} +3 -3
- package/dist/{vue-ui-sparkbar-BCmLvKvU.cjs → vue-ui-sparkbar-nRQoMePg.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-Cml4o6Bs.js → vue-ui-sparkgauge-Dek8oWQO.js} +3 -3
- package/dist/{vue-ui-sparkgauge-C_DSQGId.cjs → vue-ui-sparkgauge-JqAOrMu8.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-BsyOeGbq.js → vue-ui-sparkhistogram-T-HHiCJz.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-BZDofxtq.cjs → vue-ui-sparkhistogram-hffqVDLl.cjs} +1 -1
- package/dist/{vue-ui-sparkline-DOsWIDug.js → vue-ui-sparkline-5f5eFY-F.js} +3 -3
- package/dist/{vue-ui-sparkline-twqIgYC3.cjs → vue-ui-sparkline-CJpMZzGq.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DTgoeXjb.cjs → vue-ui-sparkstackbar-B__Fucjz.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DeWgfL12.js → vue-ui-sparkstackbar-OLeLCAfa.js} +3 -3
- package/dist/{vue-ui-strip-plot-BV27VHWB.cjs → vue-ui-strip-plot-DaIXrnMv.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-Ci-hICkJ.js → vue-ui-strip-plot-ozTKwGJu.js} +9 -9
- package/dist/{vue-ui-table-R_KFQoq4.js → vue-ui-table-CSd6SuV6.js} +1 -1
- package/dist/{vue-ui-table-Bd9ddVGy.cjs → vue-ui-table-DEjTd9bz.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-TYLCpM_Y.js → vue-ui-table-heatmap-BCwbIRjJ.js} +4 -4
- package/dist/{vue-ui-table-heatmap-CPOETxT8.cjs → vue-ui-table-heatmap-Ch3DNTwB.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-H_qcrFc0.cjs → vue-ui-table-sparkline-BamEvqqU.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-B-qJP3Yr.js → vue-ui-table-sparkline-pqkWVgDE.js} +5 -5
- package/dist/{vue-ui-thermometer-fV6P7B8U.js → vue-ui-thermometer-BNKjEKa5.js} +5 -5
- package/dist/{vue-ui-thermometer-CBybvctJ.cjs → vue-ui-thermometer-j0imZL11.cjs} +1 -1
- package/dist/{vue-ui-timer-CU-tJV53.js → vue-ui-timer-UN1HRKqX.js} +4 -4
- package/dist/{vue-ui-timer-CwQteT9E.cjs → vue-ui-timer-y8-BpbDO.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-Dxy0W8kp.js → vue-ui-tiremarks-BgPY-Xdg.js} +5 -5
- package/dist/{vue-ui-tiremarks-Ba1Er97s.cjs → vue-ui-tiremarks-Br8VFETW.cjs} +1 -1
- package/dist/{vue-ui-treemap-CFqf6BUd.js → vue-ui-treemap-DarcNBcD.js} +9 -9
- package/dist/{vue-ui-treemap-CpPqA91r.cjs → vue-ui-treemap-eOm05Tfs.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-Px2OPOQp.cjs → vue-ui-vertical-bar-BcM0OUyM.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-CpIgWUoF.js → vue-ui-vertical-bar-eHmn-md4.js} +9 -9
- package/dist/{vue-ui-waffle-DbR7pPaP.js → vue-ui-waffle-DWLU2K8D.js} +9 -9
- package/dist/{vue-ui-waffle-BEOhRYhC.cjs → vue-ui-waffle-rTt5NUn9.cjs} +1 -1
- package/dist/{vue-ui-wheel-BkbAV9mu.js → vue-ui-wheel-DDLbFhWQ.js} +5 -5
- package/dist/{vue-ui-wheel-C4H-fBbx.cjs → vue-ui-wheel-hSoxrrRg.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-704bFMO3.js → vue-ui-word-cloud-Cxbw7xOK.js} +6 -6
- package/dist/{vue-ui-word-cloud-B8vX27Pz.cjs → vue-ui-word-cloud-FbXg9B5l.cjs} +1 -1
- package/dist/{vue-ui-xy-kFskWWiT.js → vue-ui-xy-B5D5L9TB.js} +12 -12
- package/dist/{vue-ui-xy-B8qzx04X.cjs → vue-ui-xy-BZrKDy2O.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-CJO0hp3z.js → vue-ui-xy-canvas-BZ3uoI37.js} +10 -10
- package/dist/{vue-ui-xy-canvas-BVhRHPYN.cjs → vue-ui-xy-canvas-BmaDU5gm.cjs} +1 -1
- package/package.json +1 -1
- package/dist/vue-ui-carousel-table-FMfXIF7s.cjs +0 -1
- package/dist/vue-ui-carousel-table-S3daEHYR.js +0 -330
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-oufiZvaS.cjs"),j=require("./useResponsive-B3TrDDIG.cjs"),re=require("./Title-DxNugmhI.cjs"),X=require("./usePrinter-Cc8ufBvU.cjs"),se=require("./Tooltip-BC2Wlz7P.cjs"),ne=require("./DataTable-CHXdpx94.cjs"),ue=require("./vue-ui-skeleton-Fsru0dbb.cjs"),ie=require("./Shape-DW18-C9f.cjs"),ce=require("./vue-ui-accordion-DiR0dVog.cjs"),Y=require("./useNestedProp-CmTItGss.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),de=["id"],he=["xmlns","viewBox"],pe={key:0},me={key:0},fe=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ye={key:1},be=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ge=["x1","x2","y1","y2","stroke","stroke-width"],ke=["x1","x2","y1","y2","stroke","stroke-width"],xe=["x","y","fill","font-size"],Ce=["x","y","font-size","fill"],we=["fill","font-size","transform"],Be=["fill","font-size","x","y"],_e=["x1","x2","y1","y2","stroke"],$e=["cx","cy","fill"],Ne=["cx","cy","fill"],Se=["id"],Le=["stop-color"],Te=["stop-color"],Pe=["stop-color"],Ee={key:0},ze=["x","y","font-size","fill"],Ve={key:3,class:"vue-data-ui-watermark"},Ae=["innerHTML"],Fe={__name:"vue-ui-strip-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(J,{expose:K,emit:Q}){const d=J,{vue_ui_strip_plot:Z}=r.useConfig(),p=e.computed({get(){return!!d.dataset&&d.dataset.length},set(l){return l}}),L=e.ref(r.createUid()),V=e.ref(0),T=e.ref(!1),P=e.ref(""),b=e.ref(null),A=e.ref(null),F=e.ref(!1),t=e.computed(()=>{const l=Y.useNestedProp({userConfig:d.config,defaultConfig:Z});return l.theme?{...Y.useNestedProp({userConfig:r.themes.vue_ui_strip_plot[l.theme]||d.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),C=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(d.dataset)?r.error({componentName:"VueUiStripPlot",type:"dataset"}):d.dataset.forEach((l,s)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","plots"]}).forEach(a=>{p.value=!1,r.error({componentName:"VueUiStripPlot",type:"datasetSerieAttribute",property:a,index:s})}),l.plots&&l.plots.forEach((a,n)=>{r.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","value"]}).forEach(u=>{p.value=!1,r.error({componentName:"VueUiStripPlot",type:"datasetSerieAttribute",property:u,index:`${s},${n}`})})})}),t.value.responsive){const l=j.throttle(()=>{const{width:s,height:a}=j.useResponsive({chart:b.value,title:t.value.style.chart.title.text?A.value:null});w.value=a,f.value.width=s,f.value.height=a,k.value=(s-v.value.left-v.value.right)/d.dataset.length,B.value=r.translateSize({relator:Math.min(a,s),adjuster:600,source:t.value.style.chart.plots.radius,threshold:6,fallback:6})});C.value=new ResizeObserver(l),C.value.observe(b.value.parentNode)}F.value=!0,setTimeout(()=>{g.value=!1},ee.value*50)}),e.onBeforeUnmount(()=>{C.value&&C.value.disconnect()});const{isPrinting:O,isImaging:D,generatePdf:M,generateImage:W}=X.usePrinter({elementId:`strip-plot_${L.value}`,fileName:t.value.style.chart.title.text||"vue-ui-strip-plot"}),I=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),g=e.ref(t.value.useCssAnimation),c=e.ref({showTable:t.value.table.show,dataLabels:{show:t.value.style.chart.labels.bestPlotLabel.show},showTooltip:t.value.style.chart.tooltip.show}),v=e.ref({top:t.value.style.chart.padding.top,bottom:t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right}),k=e.ref(t.value.style.chart.stripWidth),w=e.ref(t.value.style.chart.height),B=e.ref(t.value.style.chart.plots.radius),f=e.ref({width:k.value*d.dataset.length+v.value.left+v.value.right,height:t.value.style.chart.height}),o=e.computed(()=>{const l=k.value*d.dataset.length+v.value.left+v.value.right;return{left:v.value.left,right:l-v.value.right,top:v.value.top,bottom:w.value-v.value.bottom,width:k.value*d.dataset.length,height:w.value-v.value.top-v.value.bottom,stripWidth:k.value,absoluteHeight:w.value,absoluteWidth:l}}),_=e.computed(()=>p.value?d.dataset.map((l,s)=>{const a=r.createUid();return{...l,id:a,color:l.color?r.convertColorToHex(l.color):I.value[s]||r.palette[s]||r.palette[s%r.palette.length],plots:l.plots.map(n=>({...n,parentId:a,color:l.color?r.convertColorToHex(l.color):I.value[s]||r.palette[s]||r.palette[s%r.palette.length],id:r.createUid()})).sort((n,u)=>n.value-u.value)}}):null),h=e.computed(()=>(_.value||[]).map((l,s)=>({...l,plots:l.plots.map(a=>({...a,x:o.value.left+(s+1)*o.value.stripWidth-o.value.stripWidth/2}))}))),ee=e.computed(()=>Math.max(...h.value.map(l=>l.plots.length))),E=e.computed(()=>{const l=h.value.flatMap(s=>s.plots.map(a=>a.value));return{max:Math.max(...l),min:Math.min(...l)}}),m=e.computed(()=>r.calculateNiceScale(E.value.min<0?E.value.min:0,E.value.max,t.value.style.chart.grid.scaleSteps)),te=e.computed(()=>(h.value||[]).map((l,s)=>({...l,plots:l.plots.map(a=>({...a,y:o.value.bottom-(a.value+Math.abs(m.value.min))/(m.value.max+Math.abs(m.value.min))*o.value.height}))}))),G=e.computed(()=>m.value.ticks.map(l=>({y:o.value.bottom-o.value.height*((l+Math.abs(m.value.min))/(m.value.max+Math.abs(m.value.min))),x1:o.value.left,x2:o.value.right,value:l}))),z=e.ref(null),i=e.ref(null);function le({datapoint:l,seriesIndex:s}){z.value={datapoint:l,seriesIndex:s,config:t.value,series:_.value},T.value=!0,i.value=l;const a=t.value.style.chart.tooltip.customFormat;if(r.isFunction(a)&&r.functionReturnsString(()=>a({seriesIndex:s,datapoint:l,series:_.value,config:t.value})))P.value=a({seriesIndex:s,datapoint:l,series:_.value,config:t.value});else{let n="";n+=`<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="${t.value.style.chart.plots.gradient.show?`url(#${l.parentId})`:l.color}"/></svg>${l.name}</div>`,n+=`<div>${r.dataLabel({p:t.value.style.chart.labels.prefix,v:l.value,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.tooltip.roundingValue})}</div>`,P.value=`<div>${n}</div>`}}const $=e.computed(()=>{const l=h.value.flatMap(a=>JSON.parse(JSON.stringify(a.plots)).sort((n,u)=>u.value-n.value).map(n=>({name:`${a.name} - ${n.name}`,color:n.color}))),s=h.value.flatMap(a=>JSON.parse(JSON.stringify(a.plots)).sort((n,u)=>u.value-n.value).map(n=>n.value));return{head:l,body:s}});function q(){e.nextTick(()=>{const l=$.value.head.map((n,u)=>[[n.name],[$.value.body[u]]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.value]]].concat(l),a=r.createCsvContent(s);r.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-strip-plot"})})}const N=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value],s=$.value.head.map((u,y)=>{const S=r.dataLabel({p:t.value.style.chart.labels.prefix,v:$.value.body[y],s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue});return[{color:u.color,name:u.name},S]}),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:l,body:s,config:a}}),x=e.ref(!1);function ae(l){x.value=l,V.value+=1}function oe(){return h.value}function R(){c.value.showTable=!c.value.showTable}function U(){c.value.dataLabels.show=!c.value.dataLabels.show}function H(){c.value.showTooltip=!c.value.showTooltip}return K({getData:oe,generatePdf:M,generateCsv:q,generateImage:W,toggleTable:R,toggleLabels:U,toggleTooltip:H}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"stripPlotChart",ref:b,class:e.normalizeClass(`vue-ui-strip-plot ${x.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`strip-plot_${L.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:A,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(re._sfc_main,{config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&p.value?(e.openBlock(),e.createBlock(X.UserOptions,{ref:"details",key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(O),isImaging:e.unref(D),uid:L.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,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:c.value.showTooltip,isFullscreen:x.value,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,onToggleFullscreen:ae,onGeneratePdf:e.unref(M),onGenerateCsv:q,onGenerateImage:e.unref(W),onToggleTable:R,onToggleLabels:U,onToggleTooltip:H},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${f.value.width<=0?10:f.value.width} ${f.value.height<=0?10:f.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};`)},[t.value.style.chart.grid.show?(e.openBlock(),e.createElementBlock("g",pe,[t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G.value,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray,"stroke-linecap":"round"},null,8,fe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,n)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left+(n+1)*o.value.stripWidth,x2:o.value.left+(n+1)*o.value.stripWidth,y1:o.value.top,y2:o.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray,"stroke-linecap":"round"},null,8,be))),256))])):e.createCommentVNode("",!0),e.createElementVNode("line",{x1:o.value.left,x2:o.value.left,y1:o.value.top,y2:o.value.bottom,stroke:t.value.style.chart.grid.stroke,"stroke-width":t.value.style.chart.grid.strokeWidth,"stroke-linecap":"round"},null,8,ge),e.createElementVNode("line",{x1:o.value.left,x2:o.value.right,y1:o.value.bottom,y2:o.value.bottom,stroke:t.value.style.chart.grid.stroke,"stroke-width":t.value.style.chart.grid.strokeWidth,"stroke-linecap":"round"},null,8,ke)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(G.value,a=>(e.openBlock(),e.createElementBlock("text",{x:a.x1-t.value.style.chart.labels.yAxisLabels.fontSize/2+t.value.style.chart.labels.yAxisLabels.offsetX,y:a.y+t.value.style.chart.labels.yAxisLabels.fontSize/3,fill:t.value.style.chart.labels.yAxisLabels.color,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,"text-anchor":"end"},e.toDisplayString(e.unref(r.dataLabel)({p:t.value.style.chart.labels.prefix,v:a.value,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.yAxisLabels.rounding})),9,xe))),256)):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(h.value,(a,n)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left+(n+1)*o.value.stripWidth-o.value.stripWidth/2,y:o.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize*2+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"text-anchor":"middle"},e.toDisplayString(a.name),9,Ce))),256)):e.createCommentVNode("",!0),t.value.style.chart.labels.axis.yLabel?(e.openBlock(),e.createElementBlock("text",{key:3,fill:t.value.style.chart.labels.axis.color,"font-size":t.value.style.chart.labels.axis.fontSize,transform:`translate(${t.value.style.chart.labels.axis.fontSize+t.value.style.chart.labels.axis.yLabelOffsetX}, ${o.value.top+o.value.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(t.value.style.chart.labels.axis.yLabel),9,we)):e.createCommentVNode("",!0),t.value.style.chart.labels.axis.xLabel?(e.openBlock(),e.createElementBlock("text",{key:4,fill:t.value.style.chart.labels.axis.color,"font-size":t.value.style.chart.labels.axis.fontSize,x:o.value.left+o.value.width/2,y:o.value.absoluteHeight,"text-anchor":"middle"},e.toDisplayString(t.value.style.chart.labels.axis.xLabel),9,Be)):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createElementVNode("line",{x1:o.value.left,x2:o.value.right,y1:i.value.y,y2:i.value.y,stroke:i.value.color,"stroke-width":1,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,_e),e.createElementVNode("circle",{cx:o.value.left,cy:i.value.y,r:3,fill:i.value.color,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,$e),e.createElementVNode("circle",{cx:o.value.right,cy:i.value.y,r:3,fill:i.value.color,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,Ne)],64)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,a=>(e.openBlock(),e.createElementBlock("radialGradient",{id:a.id,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(r.lightenHexColor)(a.color,t.value.style.chart.plots.gradient.intensity/100)},null,8,Le),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(r.darkenHexColor)(a.color,.1)},null,8,Te),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Pe)],8,Se))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.value,(a,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,y)=>(e.openBlock(),e.createBlock(ie._sfc_main,e.mergeProps({plot:{x:u.x,y:F.value?u.y:o.value.top},radius:i.value&&i.value.id===u.id?B.value*1.5:B.value,shape:t.value.style.chart.plots.shape,stroke:t.value.style.chart.plots.stroke,strokeWidth:t.value.style.chart.plots.strokeWidth,color:t.value.style.chart.plots.gradient.show?`url(#${a.id})`:a.color,onMouseenter:S=>le({datapoint:u,seriesIndex:y}),onMouseleave:s[0]||(s[0]=S=>{T.value=!1,i.value=null}),onClick:S=>Q("selectDatapoint",u),style:`transition: all 0.2s ease-in-out; opacity:${i.value?i.value.id===u.id?1:.2:t.value.style.chart.plots.opacity};${g.value?`transition-delay:${y*50}ms`:""}`,class:{"vue-ui-strip-plot-animated":t.value.useCssAnimation&&g.value,"vue-ui-strip-plot-select-circle":t.value.useCssAnimation&&!g.value}},l.$attrs),null,16,["plot","radius","shape","stroke","strokeWidth","color","onMouseenter","onClick","style","class"]))),256)),c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[y===a.plots.length-1||i.value&&i.value.id===u.id&&!c.value.showTooltip?(e.openBlock(),e.createElementBlock("text",{key:0,x:u.x,y:u.y+t.value.style.chart.labels.bestPlotLabel.offsetY-B.value*(i.value&&i.value.id===u.id&&!c.value.showTooltip?2:1.5),"font-size":t.value.style.chart.labels.bestPlotLabel.fontSize,fill:t.value.style.chart.labels.bestPlotLabel.color,"text-anchor":"middle",style:e.normalizeStyle(`opacity:${t.value.useCssAnimation&&g.value?0:1};transition:opacity 0.2s ease-in;`)},e.toDisplayString(u.name)+" "+e.toDisplayString(t.value.style.chart.labels.bestPlotLabel.showValue?e.unref(r.dataLabel)({p:`(${t.value.style.chart.labels.prefix}`,v:u.value,s:`${t.value.style.chart.labels.suffix})`,r:t.value.style.chart.labels.bestPlotLabel.rounding}):""),13,ze)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)],64))),256)),e.renderSlot(l.$slots,"svg",{svg:o.value},void 0,!0)],14,he)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ve,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(D)})),void 0,!0)])):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ue.default,{key:4,config:{type:"stripPlot",style:{backgroundColor:t.value.style.chart.backgroundColor,stripPlot:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(se._sfc_main,{show:c.value.showTooltip&&T.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,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:b.value,content:P.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...z.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...z.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),p.value?(e.openBlock(),e.createBlock(ce.default,{key:5,hideDetails:"",config:{open:c.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ne.DataTable,{colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[1]||(s[1]=a=>c.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,Ae)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,de))}},Oe=ve._export_sfc(Fe,[["__scopeId","data-v-5307a92e"]]);exports.default=Oe;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BcLWKvbg.cjs"),j=require("./useResponsive-B3TrDDIG.cjs"),re=require("./Title-D9E4eBNp.cjs"),X=require("./usePrinter-BWCvrSz2.cjs"),se=require("./Tooltip-C6EZFw-G.cjs"),ne=require("./DataTable-Ckvkqg78.cjs"),ue=require("./vue-ui-skeleton-BG428rdQ.cjs"),ie=require("./Shape-DaECX0MP.cjs"),ce=require("./vue-ui-accordion-BOEIWXgn.cjs"),Y=require("./useNestedProp-BcuQPNiW.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),de=["id"],he=["xmlns","viewBox"],pe={key:0},me={key:0},fe=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ye={key:1},be=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ge=["x1","x2","y1","y2","stroke","stroke-width"],ke=["x1","x2","y1","y2","stroke","stroke-width"],xe=["x","y","fill","font-size"],Ce=["x","y","font-size","fill"],we=["fill","font-size","transform"],Be=["fill","font-size","x","y"],_e=["x1","x2","y1","y2","stroke"],$e=["cx","cy","fill"],Ne=["cx","cy","fill"],Se=["id"],Le=["stop-color"],Te=["stop-color"],Pe=["stop-color"],Ee={key:0},ze=["x","y","font-size","fill"],Ve={key:3,class:"vue-data-ui-watermark"},Ae=["innerHTML"],Fe={__name:"vue-ui-strip-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(J,{expose:K,emit:Q}){const d=J,{vue_ui_strip_plot:Z}=r.useConfig(),p=e.computed({get(){return!!d.dataset&&d.dataset.length},set(l){return l}}),L=e.ref(r.createUid()),V=e.ref(0),T=e.ref(!1),P=e.ref(""),b=e.ref(null),A=e.ref(null),F=e.ref(!1),t=e.computed(()=>{const l=Y.useNestedProp({userConfig:d.config,defaultConfig:Z});return l.theme?{...Y.useNestedProp({userConfig:r.themes.vue_ui_strip_plot[l.theme]||d.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),C=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(d.dataset)?r.error({componentName:"VueUiStripPlot",type:"dataset"}):d.dataset.forEach((l,s)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","plots"]}).forEach(a=>{p.value=!1,r.error({componentName:"VueUiStripPlot",type:"datasetSerieAttribute",property:a,index:s})}),l.plots&&l.plots.forEach((a,n)=>{r.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","value"]}).forEach(u=>{p.value=!1,r.error({componentName:"VueUiStripPlot",type:"datasetSerieAttribute",property:u,index:`${s},${n}`})})})}),t.value.responsive){const l=j.throttle(()=>{const{width:s,height:a}=j.useResponsive({chart:b.value,title:t.value.style.chart.title.text?A.value:null});w.value=a,f.value.width=s,f.value.height=a,k.value=(s-v.value.left-v.value.right)/d.dataset.length,B.value=r.translateSize({relator:Math.min(a,s),adjuster:600,source:t.value.style.chart.plots.radius,threshold:6,fallback:6})});C.value=new ResizeObserver(l),C.value.observe(b.value.parentNode)}F.value=!0,setTimeout(()=>{g.value=!1},ee.value*50)}),e.onBeforeUnmount(()=>{C.value&&C.value.disconnect()});const{isPrinting:O,isImaging:D,generatePdf:M,generateImage:W}=X.usePrinter({elementId:`strip-plot_${L.value}`,fileName:t.value.style.chart.title.text||"vue-ui-strip-plot"}),I=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),g=e.ref(t.value.useCssAnimation),c=e.ref({showTable:t.value.table.show,dataLabels:{show:t.value.style.chart.labels.bestPlotLabel.show},showTooltip:t.value.style.chart.tooltip.show}),v=e.ref({top:t.value.style.chart.padding.top,bottom:t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right}),k=e.ref(t.value.style.chart.stripWidth),w=e.ref(t.value.style.chart.height),B=e.ref(t.value.style.chart.plots.radius),f=e.ref({width:k.value*d.dataset.length+v.value.left+v.value.right,height:t.value.style.chart.height}),o=e.computed(()=>{const l=k.value*d.dataset.length+v.value.left+v.value.right;return{left:v.value.left,right:l-v.value.right,top:v.value.top,bottom:w.value-v.value.bottom,width:k.value*d.dataset.length,height:w.value-v.value.top-v.value.bottom,stripWidth:k.value,absoluteHeight:w.value,absoluteWidth:l}}),_=e.computed(()=>p.value?d.dataset.map((l,s)=>{const a=r.createUid();return{...l,id:a,color:l.color?r.convertColorToHex(l.color):I.value[s]||r.palette[s]||r.palette[s%r.palette.length],plots:l.plots.map(n=>({...n,parentId:a,color:l.color?r.convertColorToHex(l.color):I.value[s]||r.palette[s]||r.palette[s%r.palette.length],id:r.createUid()})).sort((n,u)=>n.value-u.value)}}):null),h=e.computed(()=>(_.value||[]).map((l,s)=>({...l,plots:l.plots.map(a=>({...a,x:o.value.left+(s+1)*o.value.stripWidth-o.value.stripWidth/2}))}))),ee=e.computed(()=>Math.max(...h.value.map(l=>l.plots.length))),E=e.computed(()=>{const l=h.value.flatMap(s=>s.plots.map(a=>a.value));return{max:Math.max(...l),min:Math.min(...l)}}),m=e.computed(()=>r.calculateNiceScale(E.value.min<0?E.value.min:0,E.value.max,t.value.style.chart.grid.scaleSteps)),te=e.computed(()=>(h.value||[]).map((l,s)=>({...l,plots:l.plots.map(a=>({...a,y:o.value.bottom-(a.value+Math.abs(m.value.min))/(m.value.max+Math.abs(m.value.min))*o.value.height}))}))),G=e.computed(()=>m.value.ticks.map(l=>({y:o.value.bottom-o.value.height*((l+Math.abs(m.value.min))/(m.value.max+Math.abs(m.value.min))),x1:o.value.left,x2:o.value.right,value:l}))),z=e.ref(null),i=e.ref(null);function le({datapoint:l,seriesIndex:s}){z.value={datapoint:l,seriesIndex:s,config:t.value,series:_.value},T.value=!0,i.value=l;const a=t.value.style.chart.tooltip.customFormat;if(r.isFunction(a)&&r.functionReturnsString(()=>a({seriesIndex:s,datapoint:l,series:_.value,config:t.value})))P.value=a({seriesIndex:s,datapoint:l,series:_.value,config:t.value});else{let n="";n+=`<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="${t.value.style.chart.plots.gradient.show?`url(#${l.parentId})`:l.color}"/></svg>${l.name}</div>`,n+=`<div>${r.dataLabel({p:t.value.style.chart.labels.prefix,v:l.value,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.tooltip.roundingValue})}</div>`,P.value=`<div>${n}</div>`}}const $=e.computed(()=>{const l=h.value.flatMap(a=>JSON.parse(JSON.stringify(a.plots)).sort((n,u)=>u.value-n.value).map(n=>({name:`${a.name} - ${n.name}`,color:n.color}))),s=h.value.flatMap(a=>JSON.parse(JSON.stringify(a.plots)).sort((n,u)=>u.value-n.value).map(n=>n.value));return{head:l,body:s}});function q(){e.nextTick(()=>{const l=$.value.head.map((n,u)=>[[n.name],[$.value.body[u]]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.value]]].concat(l),a=r.createCsvContent(s);r.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-strip-plot"})})}const N=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value],s=$.value.head.map((u,y)=>{const S=r.dataLabel({p:t.value.style.chart.labels.prefix,v:$.value.body[y],s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue});return[{color:u.color,name:u.name},S]}),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:l,body:s,config:a}}),x=e.ref(!1);function ae(l){x.value=l,V.value+=1}function oe(){return h.value}function R(){c.value.showTable=!c.value.showTable}function U(){c.value.dataLabels.show=!c.value.dataLabels.show}function H(){c.value.showTooltip=!c.value.showTooltip}return K({getData:oe,generatePdf:M,generateCsv:q,generateImage:W,toggleTable:R,toggleLabels:U,toggleTooltip:H}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"stripPlotChart",ref:b,class:e.normalizeClass(`vue-ui-strip-plot ${x.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`strip-plot_${L.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:A,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(re._sfc_main,{config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&p.value?(e.openBlock(),e.createBlock(X.UserOptions,{ref:"details",key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(O),isImaging:e.unref(D),uid:L.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,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:c.value.showTooltip,isFullscreen:x.value,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,onToggleFullscreen:ae,onGeneratePdf:e.unref(M),onGenerateCsv:q,onGenerateImage:e.unref(W),onToggleTable:R,onToggleLabels:U,onToggleTooltip:H},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${f.value.width<=0?10:f.value.width} ${f.value.height<=0?10:f.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};`)},[t.value.style.chart.grid.show?(e.openBlock(),e.createElementBlock("g",pe,[t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G.value,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray,"stroke-linecap":"round"},null,8,fe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,n)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left+(n+1)*o.value.stripWidth,x2:o.value.left+(n+1)*o.value.stripWidth,y1:o.value.top,y2:o.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray,"stroke-linecap":"round"},null,8,be))),256))])):e.createCommentVNode("",!0),e.createElementVNode("line",{x1:o.value.left,x2:o.value.left,y1:o.value.top,y2:o.value.bottom,stroke:t.value.style.chart.grid.stroke,"stroke-width":t.value.style.chart.grid.strokeWidth,"stroke-linecap":"round"},null,8,ge),e.createElementVNode("line",{x1:o.value.left,x2:o.value.right,y1:o.value.bottom,y2:o.value.bottom,stroke:t.value.style.chart.grid.stroke,"stroke-width":t.value.style.chart.grid.strokeWidth,"stroke-linecap":"round"},null,8,ke)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(G.value,a=>(e.openBlock(),e.createElementBlock("text",{x:a.x1-t.value.style.chart.labels.yAxisLabels.fontSize/2+t.value.style.chart.labels.yAxisLabels.offsetX,y:a.y+t.value.style.chart.labels.yAxisLabels.fontSize/3,fill:t.value.style.chart.labels.yAxisLabels.color,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,"text-anchor":"end"},e.toDisplayString(e.unref(r.dataLabel)({p:t.value.style.chart.labels.prefix,v:a.value,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.yAxisLabels.rounding})),9,xe))),256)):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(h.value,(a,n)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left+(n+1)*o.value.stripWidth-o.value.stripWidth/2,y:o.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize*2+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"text-anchor":"middle"},e.toDisplayString(a.name),9,Ce))),256)):e.createCommentVNode("",!0),t.value.style.chart.labels.axis.yLabel?(e.openBlock(),e.createElementBlock("text",{key:3,fill:t.value.style.chart.labels.axis.color,"font-size":t.value.style.chart.labels.axis.fontSize,transform:`translate(${t.value.style.chart.labels.axis.fontSize+t.value.style.chart.labels.axis.yLabelOffsetX}, ${o.value.top+o.value.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(t.value.style.chart.labels.axis.yLabel),9,we)):e.createCommentVNode("",!0),t.value.style.chart.labels.axis.xLabel?(e.openBlock(),e.createElementBlock("text",{key:4,fill:t.value.style.chart.labels.axis.color,"font-size":t.value.style.chart.labels.axis.fontSize,x:o.value.left+o.value.width/2,y:o.value.absoluteHeight,"text-anchor":"middle"},e.toDisplayString(t.value.style.chart.labels.axis.xLabel),9,Be)):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createElementVNode("line",{x1:o.value.left,x2:o.value.right,y1:i.value.y,y2:i.value.y,stroke:i.value.color,"stroke-width":1,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,_e),e.createElementVNode("circle",{cx:o.value.left,cy:i.value.y,r:3,fill:i.value.color,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,$e),e.createElementVNode("circle",{cx:o.value.right,cy:i.value.y,r:3,fill:i.value.color,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,Ne)],64)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,a=>(e.openBlock(),e.createElementBlock("radialGradient",{id:a.id,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(r.lightenHexColor)(a.color,t.value.style.chart.plots.gradient.intensity/100)},null,8,Le),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(r.darkenHexColor)(a.color,.1)},null,8,Te),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Pe)],8,Se))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.value,(a,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,y)=>(e.openBlock(),e.createBlock(ie._sfc_main,e.mergeProps({plot:{x:u.x,y:F.value?u.y:o.value.top},radius:i.value&&i.value.id===u.id?B.value*1.5:B.value,shape:t.value.style.chart.plots.shape,stroke:t.value.style.chart.plots.stroke,strokeWidth:t.value.style.chart.plots.strokeWidth,color:t.value.style.chart.plots.gradient.show?`url(#${a.id})`:a.color,onMouseenter:S=>le({datapoint:u,seriesIndex:y}),onMouseleave:s[0]||(s[0]=S=>{T.value=!1,i.value=null}),onClick:S=>Q("selectDatapoint",u),style:`transition: all 0.2s ease-in-out; opacity:${i.value?i.value.id===u.id?1:.2:t.value.style.chart.plots.opacity};${g.value?`transition-delay:${y*50}ms`:""}`,class:{"vue-ui-strip-plot-animated":t.value.useCssAnimation&&g.value,"vue-ui-strip-plot-select-circle":t.value.useCssAnimation&&!g.value}},l.$attrs),null,16,["plot","radius","shape","stroke","strokeWidth","color","onMouseenter","onClick","style","class"]))),256)),c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[y===a.plots.length-1||i.value&&i.value.id===u.id&&!c.value.showTooltip?(e.openBlock(),e.createElementBlock("text",{key:0,x:u.x,y:u.y+t.value.style.chart.labels.bestPlotLabel.offsetY-B.value*(i.value&&i.value.id===u.id&&!c.value.showTooltip?2:1.5),"font-size":t.value.style.chart.labels.bestPlotLabel.fontSize,fill:t.value.style.chart.labels.bestPlotLabel.color,"text-anchor":"middle",style:e.normalizeStyle(`opacity:${t.value.useCssAnimation&&g.value?0:1};transition:opacity 0.2s ease-in;`)},e.toDisplayString(u.name)+" "+e.toDisplayString(t.value.style.chart.labels.bestPlotLabel.showValue?e.unref(r.dataLabel)({p:`(${t.value.style.chart.labels.prefix}`,v:u.value,s:`${t.value.style.chart.labels.suffix})`,r:t.value.style.chart.labels.bestPlotLabel.rounding}):""),13,ze)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)],64))),256)),e.renderSlot(l.$slots,"svg",{svg:o.value},void 0,!0)],14,he)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ve,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(D)})),void 0,!0)])):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ue.default,{key:4,config:{type:"stripPlot",style:{backgroundColor:t.value.style.chart.backgroundColor,stripPlot:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(se._sfc_main,{show:c.value.showTooltip&&T.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,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:b.value,content:P.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...z.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...z.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),p.value?(e.openBlock(),e.createBlock(ce.default,{key:5,hideDetails:"",config:{open:c.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ne.DataTable,{colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[1]||(s[1]=a=>c.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,Ae)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,de))}},Oe=ve._export_sfc(Fe,[["__scopeId","data-v-5307a92e"]]);exports.default=Oe;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { computed as d, ref as c, onMounted as Te, onBeforeUnmount as Le, openBlock as s, createElementBlock as u, normalizeClass as O, normalizeStyle as V, createVNode as K, createCommentVNode as v, createBlock as B, unref as y, createSlots as Pe, withCtx as f, renderSlot as m, normalizeProps as H, guardReactiveProps as R, Fragment as g, renderList as C, createElementVNode as x, toDisplayString as $, mergeProps as Se, createTextVNode as ze, nextTick as Ae } from "vue";
|
|
2
|
-
import { u as Ne, c as Q, t as Oe, a as Fe, p as T, o as We, e as Z, g as de, b as Me, d as pe, z as Ie, f as U, X as De, l as Ge, h as Ee, v as ye, w as Ve, n as Be, q as He, B as Re } from "./index-
|
|
2
|
+
import { u as Ne, c as Q, t as Oe, a as Fe, p as T, o as We, e as Z, g as de, b as Me, d as pe, z as Ie, f as U, X as De, l as Ge, h as Ee, v as ye, w as Ve, n as Be, q as He, B as Re } from "./index-BbBCE1pM.js";
|
|
3
3
|
import { t as Ue, u as Xe } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as je } from "./Title-
|
|
5
|
-
import { u as Ye, U as Je } from "./usePrinter-
|
|
6
|
-
import { _ as qe } from "./Tooltip-
|
|
7
|
-
import { D as Ke } from "./DataTable-
|
|
8
|
-
import Qe from "./vue-ui-skeleton-
|
|
9
|
-
import { _ as Ze } from "./Shape-
|
|
10
|
-
import et from "./vue-ui-accordion-
|
|
11
|
-
import { u as fe } from "./useNestedProp-
|
|
4
|
+
import { _ as je } from "./Title-CMEhX9eJ.js";
|
|
5
|
+
import { u as Ye, U as Je } from "./usePrinter-CnT0_Cbi.js";
|
|
6
|
+
import { _ as qe } from "./Tooltip-B2XPbRE_.js";
|
|
7
|
+
import { D as Ke } from "./DataTable-DVpbqbwp.js";
|
|
8
|
+
import Qe from "./vue-ui-skeleton-BYBsAUyH.js";
|
|
9
|
+
import { _ as Ze } from "./Shape-_K1DD00e.js";
|
|
10
|
+
import et from "./vue-ui-accordion-CM8Lp-MV.js";
|
|
11
|
+
import { u as fe } from "./useNestedProp-QJwLGaK5.js";
|
|
12
12
|
import { _ as tt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
const lt = ["id"], at = ["xmlns", "viewBox"], ot = { key: 0 }, st = { key: 0 }, rt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], ut = { key: 1 }, it = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], nt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ct = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], vt = ["x", "y", "fill", "font-size"], ht = ["x", "y", "font-size", "fill"], dt = ["fill", "font-size", "transform"], pt = ["fill", "font-size", "x", "y"], yt = ["x1", "x2", "y1", "y2", "stroke"], ft = ["cx", "cy", "fill"], bt = ["cx", "cy", "fill"], mt = ["id"], gt = ["stop-color"], xt = ["stop-color"], kt = ["stop-color"], Ct = { key: 0 }, wt = ["x", "y", "font-size", "fill"], _t = {
|
|
14
14
|
key: 3,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as D, u as x, x as G, m as M, d as T, y as E, n as z, q as B, R as H } from "./index-
|
|
1
|
+
import { p as D, u as x, x as G, m as M, d as T, y as E, n as z, q as B, R as H } from "./index-BbBCE1pM.js";
|
|
2
2
|
import { openBlock as i, createElementBlock as c, normalizeStyle as g, createElementVNode as a, toDisplayString as u, Fragment as b, renderList as _, normalizeClass as f, createTextVNode as I, createCommentVNode as N, withDirectives as k, vModelText as w, withKeys as S, withModifiers as O, vModelSelect as R, createStaticVNode as P, pushScopeId as U, popScopeId as V } from "vue";
|
|
3
3
|
import { _ as j } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
const X = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index-BcLWKvbg.cjs"),e=require("vue"),b=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),C={name:"vue-ui-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},data(){return{uid:`vue-ui-table-${Math.random()}`,bodyCopy:JSON.parse(JSON.stringify(this.dataset.body)).map((l,o)=>({...l,absoluteIndex:o})),buttonTimeout:null,canMoveChart:!1,chart:{height:316,type:"bar",width:512},constants:{ASC:1,BAR:"bar",DATE:"date",DESC:-1,DONUT:"donut",LINE:"line",NUMERIC:"numeric",PERCENTAGE:"percentage",TEXT:"text"},clientX:100,clientY:100,cssClass:{CELL:"smart-td-selected",FIRST_TD:"smart-td-selected-first",LAST_TD:"smart-td-selected-last",ROW:"smart-td-selected-neighbor"},currentDonut:void 0,currentFilter:void 0,currentSearch:void 0,currentSelectionSpan:{col:void 0,rows:[]},currentPage:0,dates:{},filteredDatesIndexes:{},hasNaN:{},iconColor:"#2D353C",iconSize:20,immutableRangeFilters:{},isExportRequest:!1,isLoading:!1,itemsPerPage:this.config.rowsPerPage?this.config.rowsPerPage:25,multiselects:{},paginatorOptions:[...new Set([10,25,50,100,250,500,this.config.rowsPerPage?this.config.rowsPerPage:25,this.dataset.body.length])].sort((l,o)=>l-o),palette:g.palette,percentages:{},rafId:null,rangeFilters:{},searches:{},selectedColumn:void 0,selectedDonutCategory:void 0,selectedPlot:void 0,showChart:!1,showDonutOptions:!1,sorts:{},tableBody:JSON.parse(JSON.stringify(this.dataset.body)).map((l,o)=>({...l,absoluteIndex:o})),tableHead:JSON.parse(JSON.stringify(this.dataset.header)).map(l=>({average:Object.hasOwn(l,"average")?l.average:!1,decimals:Object.hasOwn(l,"decimals")?l.decimals:0,isMultiselect:Object.hasOwn(l,"isMultiselect")?l.isMultiselect:!1,isPercentage:Object.hasOwn(l,"isPercentage")?l.isPercentage:!1,isSearch:Object.hasOwn(l,"isSearch")?l.isSearch:!1,isSort:Object.hasOwn(l,"isSort")?l.isSort:!1,name:l.name,percentageTo:Object.hasOwn(l,"percentageTo")?l.percentageTo:void 0,prefix:Object.hasOwn(l,"prefix")?l.prefix:"",rangeFilter:Object.hasOwn(l,"rangeFilter")?l.rangeFilter:!1,suffix:Object.hasOwn(l,"suffix")?l.suffix:"",sum:Object.hasOwn(l,"sum")?l.sum:!1,type:l.type}))}},mounted(){if(this.dataset.header.length===0)throw new Error(`vue-ui-table error: missing header data.
|
|
2
2
|
Provide an array of objects of type:
|
|
3
3
|
{
|
|
4
4
|
name: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useCssVars as Q, ref as h, computed as c, onMounted as J, openBlock as n, createElementBlock as l, normalizeStyle as $, normalizeClass as V, createBlock as K, unref as g, createSlots as Y, withCtx as C, renderSlot as r, normalizeProps as v, guardReactiveProps as f, createCommentVNode as p, createElementVNode as b, Fragment as _, renderList as w, createVNode as Z, mergeProps as z, nextTick as j } from "vue";
|
|
2
|
-
import { u as ee, c as E, t as te, o as ae, e as oe, Q as se, C as ne, H as le, n as re, q as ue } from "./index-
|
|
3
|
-
import { u as M } from "./useNestedProp-
|
|
4
|
-
import { u as ie, U as de } from "./usePrinter-
|
|
5
|
-
import { _ as ce } from "./Shape-
|
|
2
|
+
import { u as ee, c as E, t as te, o as ae, e as oe, Q as se, C as ne, H as le, n as re, q as ue } from "./index-BbBCE1pM.js";
|
|
3
|
+
import { u as M } from "./useNestedProp-QJwLGaK5.js";
|
|
4
|
+
import { u as ie, U as de } from "./usePrinter-CnT0_Cbi.js";
|
|
5
|
+
import { _ as ce } from "./Shape-_K1DD00e.js";
|
|
6
6
|
import { _ as ve } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
7
|
const pe = ["id"], me = { role: "cell" }, fe = { role: "row" }, he = ["data-cell"], ge = {
|
|
8
8
|
key: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BcLWKvbg.cjs"),C=require("./useNestedProp-BcuQPNiW.cjs"),P=require("./usePrinter-BWCvrSz2.cjs"),z=require("./Shape-DaECX0MP.cjs"),R=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),O=["id"],T={role:"cell"},M={role:"row"},G=["data-cell"],q={key:0,style:{display:"flex","flex-direction":"row",gap:"2px","align-items":"center"}},U=["height","width"],L={key:0,role:"cell","data-cell":"sum"},A={key:1,role:"cell","data-cell":"average"},D={key:2,role:"cell","data-cell":"median"},H={__name:"vue-ui-table-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(_,{expose:B}){const d=_;e.useCssVars(t=>({bb8dc4a0:V.value,"44bd448b":S.value}));const{vue_ui_table_heatmap:I}=r.useConfig(),p=e.ref(r.createUid()),s=e.ref(!1),c=e.ref(null),m=e.ref(!1),v=e.ref(0),o=e.computed(()=>{const t=C.useNestedProp({userConfig:d.config,defaultConfig:I});return t.theme?{...C.useNestedProp({userConfig:r.themes.vue_ui_table_heatmap[t.theme]||d.config,defaultConfig:t})}:t}),{isPrinting:$,isImaging:N,generatePdf:f,generateImage:g}=P.usePrinter({elementId:`table_heatmap_${p.value}`,fileName:"vue-ui-table-heatmap"}),x=e.computed(()=>o.value.table.responsiveBreakpoint),E=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(()=>{r.objectIsEmpty(d.dataset)&&r.error({componentName:"VueUiTableHeatmap",type:"dataset"});const t=new ResizeObserver(l=>{l.forEach(a=>{s.value=a.contentRect.width<x.value})});c.value&&t.observe(c.value)});const h=e.computed(()=>d.dataset.map(t=>{const l=t.values.map(n=>isNaN(n)?0:n),a=l.reduce((n,i)=>n+i,0);return{...t,values:l,serieExtremes:{max:Math.max(...l),min:Math.min(...l)},sum:a,average:a/l.length,median:r.calcMedian(l),displayValues:[t.name,...t.values],id:r.createUid()}})),b=e.computed(()=>{const t=h.value.flatMap(l=>l.values);return{min:Math.min(...t),max:Math.max(...t)}});function w(t,l){const a=o.value.style.heatmapColors.useIndividualScale;return r.interpolateColorHex(o.value.style.heatmapColors.min,o.value.style.heatmapColors.max,a?l.min:b.value.min,a?l.max:b.value.max,t)}const y=e.computed(()=>h.value.map(t=>({...t,colors:t.displayValues.map(l=>isNaN(l)?o.value.style.backgroundColor:w(l,t.serieExtremes))}))),S=e.computed(()=>o.value.style.backgroundColor),V=e.computed(()=>`${o.value.table.borderWidth}px`);function k(){e.nextTick(()=>{const t=y.value.map(n=>[[n.name],n.displayValues,[n.sum],[n.average],[n.median]]),l=[[[""],o.value.table.head.values,["sum"],["average"],["median"]]].concat(t),a=r.createCsvContent(l);r.downloadCsv({csvContent:a,title:"vue-ui-table-heatmap"})})}function F(t){m.value=t,v.value+=1}return B({generatePdf:f,generateCsv:k,generateImage:g}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:c,style:e.normalizeStyle(`width:100%; overflow-x:auto; container-type: inline-size;padding-top:${o.value.userOptions.show?"36px":""}; ${m.value?"vue-data-ui-wrapper-fullscreen":""}; position:relative;`),class:e.normalizeClass({"vue-ui-responsive":s.value}),id:`table_heatmap_${p.value}`},[o.value.userOptions.show&&E.value?(e.openBlock(),e.createBlock(P.UserOptions,{ref:"details",key:`user_option_${v.value}`,backgroundColor:o.value.style.backgroundColor,color:o.value.style.color,isPrinting:e.unref($),isImaging:e.unref(N),uid:p.value,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasFullscreen:o.value.userOptions.buttons.fullscreen,isFullscreen:m.value,titles:{...o.value.userOptions.buttonTitles},chartElement:c.value,onToggleFullscreen:F,onGeneratePdf:e.unref(f),onGenerateCsv:k,onGenerateImage:e.unref(g)},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.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:n})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:n})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),e.createElementVNode("table",{class:e.normalizeClass({"vue-ui-table-heatmap":!0}),style:e.normalizeStyle(`width:100%;font-family:${o.value.style.fontFamily};background:${o.value.style.backgroundColor};`)},[e.createElementVNode("caption",null,[e.renderSlot(t.$slots,"caption",{},void 0,!0)]),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${o.value.table.head.backgroundColor};color:${o.value.table.head.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value.table.head.values,(a,n)=>(e.openBlock(),e.createElementBlock("th",T,[e.renderSlot(t.$slots,"head",e.normalizeProps(e.guardReactiveProps({value:a,rowIndex:n,type:typeof a,isResponsive:s.value})),void 0,!0)]))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(a,n)=>(e.openBlock(),e.createElementBlock("tr",M,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.displayValues,(i,u)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":o.value.table.head.values[u]},[a.color&&u===0?(e.openBlock(),e.createElementBlock("div",q,[a.color?(e.openBlock(),e.createElementBlock("svg",{key:0,height:o.value.style.shapeSize,width:o.value.style.shapeSize,viewBox:"0 0 20 20",style:{background:"none",overflow:"visible"}},[e.createVNode(z._sfc_main,{plot:{x:10,y:10},color:a.color,radius:9,shape:a.shape||"circle"},null,8,["color","shape"])],8,U)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"rowTitle",e.normalizeProps(e.guardReactiveProps({value:i,rowIndex:n,colIndex:u,type:typeof i,isResponsive:s.value})),void 0,!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[u===0?e.renderSlot(t.$slots,"rowTitle",e.normalizeProps(e.mergeProps({key:0},{value:i,rowIndex:n,colIndex:u,type:typeof i,isResponsive:s.value})),void 0,!0):e.createCommentVNode("",!0),u>0?e.renderSlot(t.$slots,"cell",e.normalizeProps(e.mergeProps({key:1},{value:i,rowIndex:n,colIndex:u,type:typeof i,isResponsive:s.value,color:a.colors[u],textColor:e.unref(r.adaptColorToBackground)(a.colors[u])})),void 0,!0):e.createCommentVNode("",!0)],64))],8,G))),256)),o.value.table.showSum?(e.openBlock(),e.createElementBlock("td",L,[e.renderSlot(t.$slots,"sum",e.normalizeProps(e.guardReactiveProps({value:a.sum,rowIndex:n,isResponsive:s.value})),void 0,!0)])):e.createCommentVNode("",!0),o.value.table.showAverage?(e.openBlock(),e.createElementBlock("td",A,[e.renderSlot(t.$slots,"average",e.normalizeProps(e.guardReactiveProps({value:a.average,rowIndex:n,isResponsive:s.value})),void 0,!0)])):e.createCommentVNode("",!0),o.value.table.showMedian?(e.openBlock(),e.createElementBlock("td",D,[e.renderSlot(t.$slots,"median",e.normalizeProps(e.guardReactiveProps({value:a.median,rowIndex:n,isResponsive:s.value})),void 0,!0)])):e.createCommentVNode("",!0)]))),256))])],4)],14,O))}},X=R._export_sfc(H,[["__scopeId","data-v-3d431bc6"]]);exports.default=X;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-oufiZvaS.cjs"),V=require("./useNestedProp-CmTItGss.cjs"),H=require("./vue-ui-sparkline-twqIgYC3.cjs"),X=require("./BaseIcon-C-k_mqXL.cjs"),P=require("./usePrinter-Cc8ufBvU.cjs"),J=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),K=["id"],Q={style:{"z-index":"1","padding-right":"24px"}},Y=["onClick"],Z={style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center"}},j=["data-cell"],ee={style:{display:"flex","flex-direction":"row","align-items":"center",gap:"6px"}},te=["data-cell","onPointerenter"],le=["data-cell"],oe=["data-cell"],ae=["data-cell"],ne=["data-cell"],re={__name:"vue-ui-table-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup($,{expose:F}){const v=$;e.useCssVars(l=>({"2af6bd52":l.tdo}));const{vue_ui_table_sparkline:D}=s.useConfig(),y=e.ref(s.createUid()),S=e.ref(0),x=e.ref(0),t=e.computed(()=>{const l=V.useNestedProp({userConfig:v.config,defaultConfig:D});return l.theme?{...V.useNestedProp({userConfig:s.themes.vue_ui_table_sparkline[l.theme]||v.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}),{isPrinting:C,isImaging:N,generatePdf:z,generateImage:w}=P.usePrinter({elementId:`table_${y.value}`,fileName:t.value.title.text||"vue-ui-table-sparkline"}),O=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),f=e.ref(null),B=e.ref(!1),W=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{s.objectIsEmpty(v.dataset)&&s.error({componentName:"VueUiTableSparkline",type:"dataset"});const l=new ResizeObserver(r=>{r.forEach(o=>{B.value=o.contentRect.width<W.value})});f.value&&l.observe(f.value)});const A=e.computed(()=>(v.dataset.forEach((l,r)=>{s.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{s.error({componentName:"VueUiTableSparkline",type:"datasetSerieAttribute",property:o,index:r})})}),v.dataset.map((l,r)=>{const o=(l.values||[]).map(n=>isNaN(n)?0:n??0),u=o.reduce((n,a)=>n+a,0);return{...l,values:l.values||[],color:s.convertColorToHex(l.color)||O.value[r]||s.palette[r]||s.palette[r%s.palette.length],sum:u,average:u/o.length,median:s.calcMedian(o),sparklineDataset:o.map((n,a)=>({period:t.value.colNames[a]||`col ${a}`,value:n||0}))}})));function T(l){const o=(l[0].values||[]).map((n,a)=>l.map(i=>i.values[a]||[])).map(n=>n.map((a,i)=>[a,i]).sort((a,i)=>i[0]-a[0]).map(a=>a[1]));return l.map((n,a)=>({...n,values:n.values||[],orders:o[a]}))}const m=e.computed(()=>T(A.value)),g=e.ref(m.value),M=e.computed(()=>Math.max(...g.value.map(l=>(l.values||[]).length))),b=e.ref(void 0),k=e.ref(!1),h=e.ref(void 0),_=e.ref(-1);function L(){k.value=!1,h.value=void 0,_.value=-1,g.value=m.value}function G(l){k.value=!0,h.value=l;const r=m.value.map(a=>a.values[l]||[]),o=b.value===l?1:-1;_.value=o,l===b.value?b.value=void 0:b.value=l;const n=r.map((a,i)=>[i,a]).sort((a,i)=>o*(i[1]-a[1])).map(a=>a[0]).map(a=>m.value[a]);g.value=n,x.value+=1}const q=e.computed(()=>Math.max(...v.dataset.map(l=>(l.values||[]).length))),p=e.computed(()=>{let l=t.value.colNames;if(!l.length)for(let o=0;o<q.value;o+=1)l.push(`col ${o+1}`);t.value.showTotal&&(l=[...l,t.value.translations.total]);let r;return t.value.showAverage&&t.value.showMedian?r=[...l,t.value.translations.average,t.value.translations.median]:t.value.showAverage&&!t.value.showMedian?r=[...l,t.value.translations.average]:!t.value.showAverage&&t.value.showMedian?r=[...l,t.value.translations.median]:r=l,t.value.showSparklines?[...r,t.value.translations.chart]:r}),d=e.ref(void 0),c=e.ref(void 0);function R({dataIndex:l,serieIndex:r}){d.value=l,c.value=r}const E=e.ref(!1);function U(l){E.value=l,S.value+=1}function I(){e.nextTick(()=>{const l=[t.value.translations.serie].concat(p.value),r=A.value.map((n,a)=>[[n.name],n.values,[n.sum],[n.average],[n.median]]),o=[l].concat(r),u=s.createCsvContent(o);s.downloadCsv({csvContent:u,title:t.value.title.text||"vue-ui-table-sparkline"})})}return F({generatePdf:z,generateImage:w,generateCsv:I,restoreOrder:L}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:f,class:e.normalizeClass({"vue-ui-responsive":B.value}),style:{overflow:"hidden"},id:`table_${y.value}`},[e.createElementVNode("div",{style:{overflow:"auto"},onPointerleave:r[0]||(r[0]=o=>{c.value=void 0,d.value=void 0})},[e.createElementVNode("table",{class:"vue-ui-data-table",style:e.normalizeStyle({fontFamily:t.value.fontFamily,position:"relative"})},[t.value.title.text?(e.openBlock(),e.createElementBlock("caption",{key:0,style:e.normalizeStyle({backgroundColor:t.value.title.backgroundColor})},[e.createElementVNode("div",{style:e.normalizeStyle({fontSize:`${t.value.title.fontSize}px`,fontWeight:t.value.title.bold?"bold":"normal",color:t.value.title.color,textAlign:t.value.title.textAlign})},e.toDisplayString(t.value.title.text),5),t.value.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({fontSize:`${t.value.title.subtitle.fontSize}px`,fontWeight:t.value.title.subtitle.bold?"bold":"normal",color:t.value.title.subtitle.color,textAlign:t.value.title.textAlign})},e.toDisplayString(t.value.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("thead",Q,[e.createElementVNode("tr",{role:"row",class:"vue-ui-data-table__thead-row",style:e.normalizeStyle({backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color})},[e.createElementVNode("th",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.thead.backgroundColor,outline:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal"}),class:"sticky-col-first"},e.toDisplayString(t.value.translations.serie),5),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(o,u)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",style:e.normalizeStyle({background:t.value.thead.backgroundColor,outline:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal",minWidth:u===p.value.length-1?"150px":"",cursor:m.value[0].values[u]!==void 0?"pointer":"default"}),onClick:()=>G(u),class:e.normalizeClass({"sticky-col":u===p.value.length-1&&t.value.showSparklines})},[e.createElementVNode("div",Z,[e.createElementVNode("span",null,e.toDisplayString(o),1),k.value&&u===h.value&&m.value[0].values[u]!==void 0?(e.openBlock(),e.createBlock(X.default,{key:0,size:18,name:_.value===1?"sort":"sortReverse",stroke:t.value.thead.color},null,8,["name","stroke"])):e.createCommentVNode("",!0)]),t.value.userOptions.show&&u===p.value.length-1?(e.openBlock(),e.createBlock(P.UserOptions,{ref_for:!0,ref:"details",key:`user_option_${S.value}`,backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color,isPrinting:e.unref(C),isImaging:e.unref(N),uid:y.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:E.value,titles:{...t.value.userOptions.buttonTitles},chartElement:f.value,onToggleFullscreen:U,onGeneratePdf:e.unref(z),onGenerateImage:e.unref(w),onGenerateCsv:I},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:a})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:a})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0)],14,Y))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(o,u)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,color:t.value.tbody.color}),class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":u%2===0,"vue-ui-data-table__tbody__row-odd":u%2!==0})},[e.createElementVNode("td",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.serie,class:"vue-ui-data-table__tbody__td sticky-col-first"},[e.createElementVNode("div",ee,[e.createElementVNode("span",{style:e.normalizeStyle({color:o.color})},"⬤",4),e.createElementVNode("span",null,e.toDisplayString(o.name??"-"),1)])],12,j),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(n,a)=>(e.openBlock(),e.createElementBlock("td",{role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign,backgroundColor:d.value!==void 0&&c.value!==void 0&&a===d.value&&c.value===u?`${o.color}33`:"",borderRadius:d.value!==void 0&&c.value!==void 0&&a===d.value&&c.value===u?"3px":""}),"data-cell":p.value[a],class:"vue-ui-data-table__tbody__td",onPointerenter:i=>{c.value=u,d.value=a}},e.toDisplayString([null,void 0].includes(o.values[a])?"-":Number(o.values[a].toFixed(t.value.roundingValues)).toLocaleString()),45,te))),256)),t.value.showTotal?(e.openBlock(),e.createElementBlock("td",{key:0,role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.total,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(Number(o.sum.toFixed(t.value.roundingTotal)).toLocaleString()),13,le)):e.createCommentVNode("",!0),t.value.showAverage?(e.openBlock(),e.createElementBlock("td",{key:1,role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.average,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(Number(o.average.toFixed(t.value.roundingAverage)).toLocaleString()),13,oe)):e.createCommentVNode("",!0),t.value.showMedian?(e.openBlock(),e.createElementBlock("td",{key:2,role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.median,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(Number(o.median.toFixed(t.value.roundingMedian)).toLocaleString()),13,ae)):e.createCommentVNode("",!0),t.value.showSparklines?(e.openBlock(),e.createElementBlock("td",{key:3,role:"cell","data-cell":t.value.translations.chart,style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),class:"vue-ui-data-table__tbody__td sticky-col"},[(e.openBlock(),e.createBlock(H.default,{key:`sparkline_${u}_${x.value}`,onHoverIndex:({index:n})=>R({dataIndex:n,serieIndex:u}),dataset:o.sparklineDataset,showInfo:!1,selectedIndex:d.value,config:{type:t.value.sparkline.type,style:{backgroundColor:t.value.tbody.backgroundColor,animation:{show:t.value.sparkline.animation.show&&!e.unref(C)&&!e.unref(N),animationFrames:t.value.sparkline.animation.animationFrames},line:{color:o.color,smooth:t.value.sparkline.smooth,strokeWidth:t.value.sparkline.strokeWidth},bar:{color:o.color},area:{color:o.color,opacity:t.value.sparkline.showArea?16:0,useGradient:t.value.sparkline.useGradient},verticalIndicator:{color:o.color},plot:{radius:9,stroke:t.value.tbody.backgroundColor,strokeWidth:3}}}},null,8,["onHoverIndex","dataset","selectedIndex","config"]))],12,ne)):e.createCommentVNode("",!0)],6))),256))])],4)],32)],10,K))}},ue=J._export_sfc(re,[["__scopeId","data-v-3af92d54"]]);exports.default=ue;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BcLWKvbg.cjs"),V=require("./useNestedProp-BcuQPNiW.cjs"),H=require("./vue-ui-sparkline-CJpMZzGq.cjs"),X=require("./BaseIcon-eEUOqFAE.cjs"),P=require("./usePrinter-BWCvrSz2.cjs"),J=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),K=["id"],Q={style:{"z-index":"1","padding-right":"24px"}},Y=["onClick"],Z={style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center"}},j=["data-cell"],ee={style:{display:"flex","flex-direction":"row","align-items":"center",gap:"6px"}},te=["data-cell","onPointerenter"],le=["data-cell"],oe=["data-cell"],ae=["data-cell"],ne=["data-cell"],re={__name:"vue-ui-table-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup($,{expose:F}){const v=$;e.useCssVars(l=>({"2af6bd52":l.tdo}));const{vue_ui_table_sparkline:D}=s.useConfig(),y=e.ref(s.createUid()),S=e.ref(0),x=e.ref(0),t=e.computed(()=>{const l=V.useNestedProp({userConfig:v.config,defaultConfig:D});return l.theme?{...V.useNestedProp({userConfig:s.themes.vue_ui_table_sparkline[l.theme]||v.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}),{isPrinting:C,isImaging:N,generatePdf:z,generateImage:w}=P.usePrinter({elementId:`table_${y.value}`,fileName:t.value.title.text||"vue-ui-table-sparkline"}),O=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),f=e.ref(null),B=e.ref(!1),W=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{s.objectIsEmpty(v.dataset)&&s.error({componentName:"VueUiTableSparkline",type:"dataset"});const l=new ResizeObserver(r=>{r.forEach(o=>{B.value=o.contentRect.width<W.value})});f.value&&l.observe(f.value)});const A=e.computed(()=>(v.dataset.forEach((l,r)=>{s.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{s.error({componentName:"VueUiTableSparkline",type:"datasetSerieAttribute",property:o,index:r})})}),v.dataset.map((l,r)=>{const o=(l.values||[]).map(n=>isNaN(n)?0:n??0),u=o.reduce((n,a)=>n+a,0);return{...l,values:l.values||[],color:s.convertColorToHex(l.color)||O.value[r]||s.palette[r]||s.palette[r%s.palette.length],sum:u,average:u/o.length,median:s.calcMedian(o),sparklineDataset:o.map((n,a)=>({period:t.value.colNames[a]||`col ${a}`,value:n||0}))}})));function T(l){const o=(l[0].values||[]).map((n,a)=>l.map(i=>i.values[a]||[])).map(n=>n.map((a,i)=>[a,i]).sort((a,i)=>i[0]-a[0]).map(a=>a[1]));return l.map((n,a)=>({...n,values:n.values||[],orders:o[a]}))}const m=e.computed(()=>T(A.value)),g=e.ref(m.value),M=e.computed(()=>Math.max(...g.value.map(l=>(l.values||[]).length))),b=e.ref(void 0),k=e.ref(!1),h=e.ref(void 0),_=e.ref(-1);function L(){k.value=!1,h.value=void 0,_.value=-1,g.value=m.value}function G(l){k.value=!0,h.value=l;const r=m.value.map(a=>a.values[l]||[]),o=b.value===l?1:-1;_.value=o,l===b.value?b.value=void 0:b.value=l;const n=r.map((a,i)=>[i,a]).sort((a,i)=>o*(i[1]-a[1])).map(a=>a[0]).map(a=>m.value[a]);g.value=n,x.value+=1}const q=e.computed(()=>Math.max(...v.dataset.map(l=>(l.values||[]).length))),p=e.computed(()=>{let l=t.value.colNames;if(!l.length)for(let o=0;o<q.value;o+=1)l.push(`col ${o+1}`);t.value.showTotal&&(l=[...l,t.value.translations.total]);let r;return t.value.showAverage&&t.value.showMedian?r=[...l,t.value.translations.average,t.value.translations.median]:t.value.showAverage&&!t.value.showMedian?r=[...l,t.value.translations.average]:!t.value.showAverage&&t.value.showMedian?r=[...l,t.value.translations.median]:r=l,t.value.showSparklines?[...r,t.value.translations.chart]:r}),d=e.ref(void 0),c=e.ref(void 0);function R({dataIndex:l,serieIndex:r}){d.value=l,c.value=r}const E=e.ref(!1);function U(l){E.value=l,S.value+=1}function I(){e.nextTick(()=>{const l=[t.value.translations.serie].concat(p.value),r=A.value.map((n,a)=>[[n.name],n.values,[n.sum],[n.average],[n.median]]),o=[l].concat(r),u=s.createCsvContent(o);s.downloadCsv({csvContent:u,title:t.value.title.text||"vue-ui-table-sparkline"})})}return F({generatePdf:z,generateImage:w,generateCsv:I,restoreOrder:L}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:f,class:e.normalizeClass({"vue-ui-responsive":B.value}),style:{overflow:"hidden"},id:`table_${y.value}`},[e.createElementVNode("div",{style:{overflow:"auto"},onPointerleave:r[0]||(r[0]=o=>{c.value=void 0,d.value=void 0})},[e.createElementVNode("table",{class:"vue-ui-data-table",style:e.normalizeStyle({fontFamily:t.value.fontFamily,position:"relative"})},[t.value.title.text?(e.openBlock(),e.createElementBlock("caption",{key:0,style:e.normalizeStyle({backgroundColor:t.value.title.backgroundColor})},[e.createElementVNode("div",{style:e.normalizeStyle({fontSize:`${t.value.title.fontSize}px`,fontWeight:t.value.title.bold?"bold":"normal",color:t.value.title.color,textAlign:t.value.title.textAlign})},e.toDisplayString(t.value.title.text),5),t.value.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({fontSize:`${t.value.title.subtitle.fontSize}px`,fontWeight:t.value.title.subtitle.bold?"bold":"normal",color:t.value.title.subtitle.color,textAlign:t.value.title.textAlign})},e.toDisplayString(t.value.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("thead",Q,[e.createElementVNode("tr",{role:"row",class:"vue-ui-data-table__thead-row",style:e.normalizeStyle({backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color})},[e.createElementVNode("th",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.thead.backgroundColor,outline:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal"}),class:"sticky-col-first"},e.toDisplayString(t.value.translations.serie),5),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(o,u)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",style:e.normalizeStyle({background:t.value.thead.backgroundColor,outline:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal",minWidth:u===p.value.length-1?"150px":"",cursor:m.value[0].values[u]!==void 0?"pointer":"default"}),onClick:()=>G(u),class:e.normalizeClass({"sticky-col":u===p.value.length-1&&t.value.showSparklines})},[e.createElementVNode("div",Z,[e.createElementVNode("span",null,e.toDisplayString(o),1),k.value&&u===h.value&&m.value[0].values[u]!==void 0?(e.openBlock(),e.createBlock(X.default,{key:0,size:18,name:_.value===1?"sort":"sortReverse",stroke:t.value.thead.color},null,8,["name","stroke"])):e.createCommentVNode("",!0)]),t.value.userOptions.show&&u===p.value.length-1?(e.openBlock(),e.createBlock(P.UserOptions,{ref_for:!0,ref:"details",key:`user_option_${S.value}`,backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color,isPrinting:e.unref(C),isImaging:e.unref(N),uid:y.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:E.value,titles:{...t.value.userOptions.buttonTitles},chartElement:f.value,onToggleFullscreen:U,onGeneratePdf:e.unref(z),onGenerateImage:e.unref(w),onGenerateCsv:I},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:a})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:a})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0)],14,Y))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(o,u)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,color:t.value.tbody.color}),class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":u%2===0,"vue-ui-data-table__tbody__row-odd":u%2!==0})},[e.createElementVNode("td",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.serie,class:"vue-ui-data-table__tbody__td sticky-col-first"},[e.createElementVNode("div",ee,[e.createElementVNode("span",{style:e.normalizeStyle({color:o.color})},"⬤",4),e.createElementVNode("span",null,e.toDisplayString(o.name??"-"),1)])],12,j),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(n,a)=>(e.openBlock(),e.createElementBlock("td",{role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign,backgroundColor:d.value!==void 0&&c.value!==void 0&&a===d.value&&c.value===u?`${o.color}33`:"",borderRadius:d.value!==void 0&&c.value!==void 0&&a===d.value&&c.value===u?"3px":""}),"data-cell":p.value[a],class:"vue-ui-data-table__tbody__td",onPointerenter:i=>{c.value=u,d.value=a}},e.toDisplayString([null,void 0].includes(o.values[a])?"-":Number(o.values[a].toFixed(t.value.roundingValues)).toLocaleString()),45,te))),256)),t.value.showTotal?(e.openBlock(),e.createElementBlock("td",{key:0,role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.total,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(Number(o.sum.toFixed(t.value.roundingTotal)).toLocaleString()),13,le)):e.createCommentVNode("",!0),t.value.showAverage?(e.openBlock(),e.createElementBlock("td",{key:1,role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.average,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(Number(o.average.toFixed(t.value.roundingAverage)).toLocaleString()),13,oe)):e.createCommentVNode("",!0),t.value.showMedian?(e.openBlock(),e.createElementBlock("td",{key:2,role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.median,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(Number(o.median.toFixed(t.value.roundingMedian)).toLocaleString()),13,ae)):e.createCommentVNode("",!0),t.value.showSparklines?(e.openBlock(),e.createElementBlock("td",{key:3,role:"cell","data-cell":t.value.translations.chart,style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),class:"vue-ui-data-table__tbody__td sticky-col"},[(e.openBlock(),e.createBlock(H.default,{key:`sparkline_${u}_${x.value}`,onHoverIndex:({index:n})=>R({dataIndex:n,serieIndex:u}),dataset:o.sparklineDataset,showInfo:!1,selectedIndex:d.value,config:{type:t.value.sparkline.type,style:{backgroundColor:t.value.tbody.backgroundColor,animation:{show:t.value.sparkline.animation.show&&!e.unref(C)&&!e.unref(N),animationFrames:t.value.sparkline.animation.animationFrames},line:{color:o.color,smooth:t.value.sparkline.smooth,strokeWidth:t.value.sparkline.strokeWidth},bar:{color:o.color},area:{color:o.color,opacity:t.value.sparkline.showArea?16:0,useGradient:t.value.sparkline.useGradient},verticalIndicator:{color:o.color},plot:{radius:9,stroke:t.value.tbody.backgroundColor,strokeWidth:3}}}},null,8,["onHoverIndex","dataset","selectedIndex","config"]))],12,ne)):e.createCommentVNode("",!0)],6))),256))])],4)],32)],10,K))}},ue=J._export_sfc(re,[["__scopeId","data-v-3af92d54"]]);exports.default=ue;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useCssVars as se, ref as i, computed as p, onMounted as ue, openBlock as u, createElementBlock as d, normalizeClass as N, createElementVNode as v, normalizeStyle as r, toDisplayString as b, createCommentVNode as m, Fragment as O, renderList as W, createBlock as T, unref as k, createSlots as re, withCtx as A, renderSlot as I, normalizeProps as ie, guardReactiveProps as de, nextTick as ve } from "vue";
|
|
2
|
-
import { u as ce, c as be, t as fe, a as pe, p as w, b as me, o as ge, e as q, g as he, d as ye, Q as _e, n as ke, q as xe } from "./index-
|
|
3
|
-
import { u as X } from "./useNestedProp-
|
|
4
|
-
import Ce from "./vue-ui-sparkline-
|
|
5
|
-
import Se from "./BaseIcon-
|
|
6
|
-
import { u as Ae, U as Ie } from "./usePrinter-
|
|
2
|
+
import { u as ce, c as be, t as fe, a as pe, p as w, b as me, o as ge, e as q, g as he, d as ye, Q as _e, n as ke, q as xe } from "./index-BbBCE1pM.js";
|
|
3
|
+
import { u as X } from "./useNestedProp-QJwLGaK5.js";
|
|
4
|
+
import Ce from "./vue-ui-sparkline-5f5eFY-F.js";
|
|
5
|
+
import Se from "./BaseIcon-y4nt-SIh.js";
|
|
6
|
+
import { u as Ae, U as Ie } from "./usePrinter-CnT0_Cbi.js";
|
|
7
7
|
import { _ as we } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
const $e = ["id"], Fe = { style: { "z-index": "1", "padding-right": "24px" } }, Pe = ["onClick"], ze = { style: { display: "flex", "flex-direction": "row", gap: "3px", "align-items": "center" } }, Ne = ["data-cell"], Oe = { style: { display: "flex", "flex-direction": "row", "align-items": "center", gap: "6px" } }, We = ["data-cell", "onPointerenter"], Te = ["data-cell"], De = ["data-cell"], Me = ["data-cell"], Ve = ["data-cell"], Ee = {
|
|
9
9
|
__name: "vue-ui-table-sparkline",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useCssVars as ne, computed as c, onMounted as ie, ref as p, openBlock as a, createElementBlock as n, normalizeClass as w, normalizeStyle as z, createVNode as he, createCommentVNode as h, createBlock as B, unref as y, createSlots as ce, withCtx as U, renderSlot as k, normalizeProps as j, guardReactiveProps as A, createElementVNode as d, Fragment as C, renderList as D, toDisplayString as de } from "vue";
|
|
2
|
-
import { u as ve, o as ye, e as H, g as fe, c as ge, t as me, a as pe, p as x, b as ke, d as $, X as xe, r as _e, f as be } from "./index-
|
|
3
|
-
import { _ as we } from "./Title-
|
|
4
|
-
import { u as Ce, U as $e } from "./usePrinter-
|
|
5
|
-
import Fe from "./vue-ui-skeleton-
|
|
6
|
-
import { u as X } from "./useNestedProp-
|
|
2
|
+
import { u as ve, o as ye, e as H, g as fe, c as ge, t as me, a as pe, p as x, b as ke, d as $, X as xe, r as _e, f as be } from "./index-BbBCE1pM.js";
|
|
3
|
+
import { _ as we } from "./Title-CMEhX9eJ.js";
|
|
4
|
+
import { u as Ce, U as $e } from "./usePrinter-CnT0_Cbi.js";
|
|
5
|
+
import Fe from "./vue-ui-skeleton-BYBsAUyH.js";
|
|
6
|
+
import { u as X } from "./useNestedProp-QJwLGaK5.js";
|
|
7
7
|
import { _ as Pe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
const Ie = ["id"], Ye = {
|
|
9
9
|
key: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-oufiZvaS.cjs"),A=require("./Title-DxNugmhI.cjs"),F=require("./usePrinter-Cc8ufBvU.cjs"),D=require("./vue-ui-skeleton-Fsru0dbb.cjs"),I=require("./useNestedProp-CmTItGss.cjs"),R=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),X=["id"],J={key:0,style:"width:100%"},K=["xmlns","viewBox"],Q={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},Z=["fill"],ee=["id"],te=["stop-color"],oe=["stop-color"],le=["stop-color"],re={"clip-path":"url(#vueUiPill)"},ae=["x","y","height","width"],se=["x","y","height","width","fill"],ne=["x1","x2","y1","y2","stroke-width","stroke"],ue=["x1","x2","y1","y2","stroke-width","stroke"],ie=["x1","x2","y1","y2","stroke-width","stroke"],ce=["x1","x2","y1","y2","stroke-width","stroke"],de=["x1","x2","y1","y2","stroke-width","stroke"],he=["x1","x2","y1","y2","stroke-width","stroke"],ve=["x1","x2","y1","y2","stroke-width","stroke"],me=["x1","x2","y1","y2","stroke-width","stroke"],ye=["x","y","height","width"],pe=["y","x","fill","font-size","font-weight"],fe={key:3,class:"vue-data-ui-watermark"},ge={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(b,{expose:q}){const a=b;e.useCssVars(l=>({"173f4170":z.value,f765db74:O.value,"186680b3":M.value}));const{vue_ui_thermometer:S}=s.useConfig(),p=e.computed(()=>!!a.dataset&&Object.keys(a.dataset).length);e.onMounted(()=>{s.objectIsEmpty(a.dataset)?s.error({componentName:"VueUiThermometer",type:"dataset"}):s.getMissingDatasetAttributes({datasetObject:a.dataset,requiredAttributes:["value","from","to"]}).forEach(l=>{s.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:l})})});const d=e.ref(s.createUid()),w=e.ref(null),C=e.ref(0),t=e.computed(()=>{const l=I.useNestedProp({userConfig:a.config,defaultConfig:S});return l.theme?{...I.useNestedProp({userConfig:s.themes.vue_ui_thermometer[l.theme]||a.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}),{isPrinting:B,isImaging:N,generatePdf:E,generateImage:V}=F.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer"}),m=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),T=e.computed(()=>t.value.style.chart.thermometer.width),c=e.computed(()=>a.dataset.steps||10),i=e.ref({top:t.value.style.chart.padding.top,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right,bottom:t.value.style.chart.padding.bottom});function y(l,n,o){const u=[],x=P(l),_=P(n);for(let v=0;v<o;v++){const G=f(x.red,_.red,v,o),W=f(x.green,_.green,v,o),H=f(x.blue,_.blue,v,o),j=`#${g(G)}${g(W)}${g(H)}`;u.push(j)}return u}function P(l){const n=l.slice(1);return{red:parseInt(n.slice(0,2),16),green:parseInt(n.slice(2,4),16),blue:parseInt(n.slice(4,6),16)}}function f(l,n,o,u){return Math.round(l+(n-l)*o/u)}function g(l){return l.toString(16).padStart(2,"0")}const r=e.computed(()=>{const l=T.value+i.value.left+i.value.right,n=t.value.style.chart.height;return{width:l,left:i.value.left,right:l-i.value.right,top:i.value.top,bottom:n-i.value.bottom,height:n}}),Y=e.computed(()=>r.value),k=e.computed(()=>{const l=a.dataset.from<0?Math.abs(a.dataset.from):a.dataset.from,n=a.dataset.to<0?Math.abs(a.dataset.to):a.dataset.to;let o=0;return a.dataset.to>0?o=l+n:l>n?o=l-n:o=n-l,(1-(Math.abs(a.dataset.from)+a.dataset.value)/o)*(r.value.height-i.value.top-i.value.bottom)}),M=e.computed(()=>`${k.value}px`),O=e.computed(()=>`${r.value.height-t.value.style.chart.padding.bottom-i.value.top}px`),z=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),U=e.computed(()=>{if(a.dataset.colors){if(!a.dataset.colors.from)return y(m.value[0]||s.palette[0],s.convertColorToHex(a.dataset.colors.to),c.value||10);if(!a.dataset.colors.to)return y(s.convertColorToHex(a.dataset.colors.from),m.value[1]||s.palette[1],c.value||10)}else return y(m.value[1]||s.palette[1],m.value[0]||s.palette[0],c.value||10);return y(s.convertColorToHex(a.dataset.colors.from),s.convertColorToHex(a.dataset.colors.to),c.value||10)}),$=e.computed(()=>{const l=[];let n=0;const o=r.value.height-i.value.top-i.value.bottom;for(let u=0;u<o-1;u+=o/c.value)l.push({x:r.value.left,y:r.value.top+u,qYLess:r.value.top+u+o/c.value/4,halfY:r.value.top+u+o/c.value/2,qYMore:r.value.top+u+o/c.value/4*3,color:U.value[n],height:o/c.value}),n+=1;return l}),h=e.ref(!1);function L(l){h.value=l,C.value+=1}return q({generatePdf:E,generateImage:V}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:w,class:e.normalizeClass(`vue-ui-thermometer ${h.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}`),id:`thermometer__${d.value}`},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",J,[e.createVNode(A._sfc_main,{config:{title:{cy:"thermometer-div-title",...t.value.style.title},subtitle:{cy:"thermometer-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&p.value?(e.openBlock(),e.createBlock(F.UserOptions,{ref:"details",key:`user_options_${C.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(N),isPrinting:e.unref(B),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,titles:{...t.value.userOptions.buttonTitles},chartElement:w.value,onToggleFullscreen:L,onGeneratePdf:e.unref(E),onGenerateImage:e.unref(V)},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),width:"100%",viewBox:`0 0 ${r.value.width} ${r.value.height}`,style:e.normalizeStyle(`background:${t.value.style.chart.backgroundColor}`)},[e.createElementVNode("defs",null,[e.createElementVNode("clipPath",Q,[e.createElementVNode("rect",{x:"0",y:"0",width:"1",height:"1",rx:"0.5",ry:"0.07",fill:t.value.style.chart.backgroundColor},null,8,Z)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(o,u)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`vueUiThermometerGradient_${u}_${d.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,te),e.createElementVNode("stop",{offset:"50%","stop-color":`${o.color}${e.unref(s.opacity)[100-t.value.style.chart.graduations.gradient.intensity]}`},null,8,oe),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,le)],8,ee))),256))]),e.createElementVNode("g",re,[e.createElementVNode("rect",{x:r.value.left,y:r.value.top,height:r.value.height-i.value.top-i.value.bottom,width:r.value.width-i.value.left-i.value.right,fill:"#FFFFFF"},null,8,ae),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(o,u)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${u}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:r.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:t.value.style.chart.graduations.gradient.show?`url(#vueUiThermometerGradient_${u}_${d.value})`:o.color,"shape-rendering":"crispEdges"},null,8,se),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ne)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ue)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:o.x,x2:o.x+2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ie)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:o.x,x2:o.x+2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ce)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:r.value.right,x2:r.value.right-10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,de)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:r.value.right,x2:r.value.right-5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,he)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:r.value.right,x2:r.value.right-2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ve)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:r.value.right,x2:r.value.right-2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,me)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("rect",{class:e.normalizeClass({"vue-ui-thermometer-temperature":t.value.style.chart.animation.use}),x:r.value.left,y:r.value.top,height:k.value,width:r.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,ye)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:k.value+r.value.top+t.value.style.chart.label.fontSize/3,x:r.value.left-10,"text-anchor":"end",fill:t.value.style.chart.label.color,"font-size":t.value.style.chart.label.fontSize,"font-weight":t.value.style.chart.label.bold?"bold":"normal"},e.toDisplayString(e.unref(s.dataLabel)({p:t.value.style.chart.label.prefix,v:b.dataset.value,s:t.value.style.chart.label.suffix,r:t.value.style.chart.label.rounding})),11,pe),e.renderSlot(l.$slots,"svg",{svg:Y.value},void 0,!0)],14,K)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",fe,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(B)||e.unref(N)})),void 0,!0)])):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(D.default,{key:4,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],14,X))}},ke=R._export_sfc(ge,[["__scopeId","data-v-923d43af"]]);exports.default=ke;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BcLWKvbg.cjs"),A=require("./Title-D9E4eBNp.cjs"),F=require("./usePrinter-BWCvrSz2.cjs"),D=require("./vue-ui-skeleton-BG428rdQ.cjs"),I=require("./useNestedProp-BcuQPNiW.cjs"),R=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),X=["id"],J={key:0,style:"width:100%"},K=["xmlns","viewBox"],Q={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},Z=["fill"],ee=["id"],te=["stop-color"],oe=["stop-color"],le=["stop-color"],re={"clip-path":"url(#vueUiPill)"},ae=["x","y","height","width"],se=["x","y","height","width","fill"],ne=["x1","x2","y1","y2","stroke-width","stroke"],ue=["x1","x2","y1","y2","stroke-width","stroke"],ie=["x1","x2","y1","y2","stroke-width","stroke"],ce=["x1","x2","y1","y2","stroke-width","stroke"],de=["x1","x2","y1","y2","stroke-width","stroke"],he=["x1","x2","y1","y2","stroke-width","stroke"],ve=["x1","x2","y1","y2","stroke-width","stroke"],me=["x1","x2","y1","y2","stroke-width","stroke"],ye=["x","y","height","width"],pe=["y","x","fill","font-size","font-weight"],fe={key:3,class:"vue-data-ui-watermark"},ge={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(b,{expose:q}){const a=b;e.useCssVars(l=>({"173f4170":z.value,f765db74:O.value,"186680b3":M.value}));const{vue_ui_thermometer:S}=s.useConfig(),p=e.computed(()=>!!a.dataset&&Object.keys(a.dataset).length);e.onMounted(()=>{s.objectIsEmpty(a.dataset)?s.error({componentName:"VueUiThermometer",type:"dataset"}):s.getMissingDatasetAttributes({datasetObject:a.dataset,requiredAttributes:["value","from","to"]}).forEach(l=>{s.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:l})})});const d=e.ref(s.createUid()),w=e.ref(null),C=e.ref(0),t=e.computed(()=>{const l=I.useNestedProp({userConfig:a.config,defaultConfig:S});return l.theme?{...I.useNestedProp({userConfig:s.themes.vue_ui_thermometer[l.theme]||a.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}),{isPrinting:B,isImaging:N,generatePdf:E,generateImage:V}=F.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer"}),m=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),T=e.computed(()=>t.value.style.chart.thermometer.width),c=e.computed(()=>a.dataset.steps||10),i=e.ref({top:t.value.style.chart.padding.top,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right,bottom:t.value.style.chart.padding.bottom});function y(l,n,o){const u=[],x=P(l),_=P(n);for(let v=0;v<o;v++){const G=f(x.red,_.red,v,o),W=f(x.green,_.green,v,o),H=f(x.blue,_.blue,v,o),j=`#${g(G)}${g(W)}${g(H)}`;u.push(j)}return u}function P(l){const n=l.slice(1);return{red:parseInt(n.slice(0,2),16),green:parseInt(n.slice(2,4),16),blue:parseInt(n.slice(4,6),16)}}function f(l,n,o,u){return Math.round(l+(n-l)*o/u)}function g(l){return l.toString(16).padStart(2,"0")}const r=e.computed(()=>{const l=T.value+i.value.left+i.value.right,n=t.value.style.chart.height;return{width:l,left:i.value.left,right:l-i.value.right,top:i.value.top,bottom:n-i.value.bottom,height:n}}),Y=e.computed(()=>r.value),k=e.computed(()=>{const l=a.dataset.from<0?Math.abs(a.dataset.from):a.dataset.from,n=a.dataset.to<0?Math.abs(a.dataset.to):a.dataset.to;let o=0;return a.dataset.to>0?o=l+n:l>n?o=l-n:o=n-l,(1-(Math.abs(a.dataset.from)+a.dataset.value)/o)*(r.value.height-i.value.top-i.value.bottom)}),M=e.computed(()=>`${k.value}px`),O=e.computed(()=>`${r.value.height-t.value.style.chart.padding.bottom-i.value.top}px`),z=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),U=e.computed(()=>{if(a.dataset.colors){if(!a.dataset.colors.from)return y(m.value[0]||s.palette[0],s.convertColorToHex(a.dataset.colors.to),c.value||10);if(!a.dataset.colors.to)return y(s.convertColorToHex(a.dataset.colors.from),m.value[1]||s.palette[1],c.value||10)}else return y(m.value[1]||s.palette[1],m.value[0]||s.palette[0],c.value||10);return y(s.convertColorToHex(a.dataset.colors.from),s.convertColorToHex(a.dataset.colors.to),c.value||10)}),$=e.computed(()=>{const l=[];let n=0;const o=r.value.height-i.value.top-i.value.bottom;for(let u=0;u<o-1;u+=o/c.value)l.push({x:r.value.left,y:r.value.top+u,qYLess:r.value.top+u+o/c.value/4,halfY:r.value.top+u+o/c.value/2,qYMore:r.value.top+u+o/c.value/4*3,color:U.value[n],height:o/c.value}),n+=1;return l}),h=e.ref(!1);function L(l){h.value=l,C.value+=1}return q({generatePdf:E,generateImage:V}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:w,class:e.normalizeClass(`vue-ui-thermometer ${h.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}`),id:`thermometer__${d.value}`},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",J,[e.createVNode(A._sfc_main,{config:{title:{cy:"thermometer-div-title",...t.value.style.title},subtitle:{cy:"thermometer-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&p.value?(e.openBlock(),e.createBlock(F.UserOptions,{ref:"details",key:`user_options_${C.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(N),isPrinting:e.unref(B),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,titles:{...t.value.userOptions.buttonTitles},chartElement:w.value,onToggleFullscreen:L,onGeneratePdf:e.unref(E),onGenerateImage:e.unref(V)},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),width:"100%",viewBox:`0 0 ${r.value.width} ${r.value.height}`,style:e.normalizeStyle(`background:${t.value.style.chart.backgroundColor}`)},[e.createElementVNode("defs",null,[e.createElementVNode("clipPath",Q,[e.createElementVNode("rect",{x:"0",y:"0",width:"1",height:"1",rx:"0.5",ry:"0.07",fill:t.value.style.chart.backgroundColor},null,8,Z)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(o,u)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`vueUiThermometerGradient_${u}_${d.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,te),e.createElementVNode("stop",{offset:"50%","stop-color":`${o.color}${e.unref(s.opacity)[100-t.value.style.chart.graduations.gradient.intensity]}`},null,8,oe),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,le)],8,ee))),256))]),e.createElementVNode("g",re,[e.createElementVNode("rect",{x:r.value.left,y:r.value.top,height:r.value.height-i.value.top-i.value.bottom,width:r.value.width-i.value.left-i.value.right,fill:"#FFFFFF"},null,8,ae),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(o,u)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${u}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:r.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:t.value.style.chart.graduations.gradient.show?`url(#vueUiThermometerGradient_${u}_${d.value})`:o.color,"shape-rendering":"crispEdges"},null,8,se),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ne)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ue)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:o.x,x2:o.x+2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ie)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:o.x,x2:o.x+2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ce)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:r.value.right,x2:r.value.right-10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,de)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:r.value.right,x2:r.value.right-5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,he)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:r.value.right,x2:r.value.right-2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ve)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:r.value.right,x2:r.value.right-2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,me)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("rect",{class:e.normalizeClass({"vue-ui-thermometer-temperature":t.value.style.chart.animation.use}),x:r.value.left,y:r.value.top,height:k.value,width:r.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,ye)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:k.value+r.value.top+t.value.style.chart.label.fontSize/3,x:r.value.left-10,"text-anchor":"end",fill:t.value.style.chart.label.color,"font-size":t.value.style.chart.label.fontSize,"font-weight":t.value.style.chart.label.bold?"bold":"normal"},e.toDisplayString(e.unref(s.dataLabel)({p:t.value.style.chart.label.prefix,v:b.dataset.value,s:t.value.style.chart.label.suffix,r:t.value.style.chart.label.rounding})),11,pe),e.renderSlot(l.$slots,"svg",{svg:Y.value},void 0,!0)],14,K)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",fe,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(B)||e.unref(N)})),void 0,!0)])):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(D.default,{key:4,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],14,X))}},ke=R._export_sfc(ge,[["__scopeId","data-v-923d43af"]]);exports.default=ke;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ref as d, onMounted as q, onBeforeUnmount as J, computed as D, openBlock as r, createElementBlock as u, normalizeStyle as f, createVNode as _, createCommentVNode as p, unref as K, createElementVNode as M, mergeProps as E, renderSlot as N, normalizeProps as B, guardReactiveProps as j, toDisplayString as Q } from "vue";
|
|
2
|
-
import { u as Y } from "./useNestedProp-
|
|
3
|
-
import { u as Z, c as ee, X as te, B as O } from "./index-
|
|
2
|
+
import { u as Y } from "./useNestedProp-QJwLGaK5.js";
|
|
3
|
+
import { u as Z, c as ee, X as te, B as O } from "./index-BbBCE1pM.js";
|
|
4
4
|
import { t as ae, u as se } from "./useResponsive-NZB-WLRF.js";
|
|
5
|
-
import x from "./BaseIcon-
|
|
6
|
-
import { _ as le } from "./Title-
|
|
5
|
+
import x from "./BaseIcon-y4nt-SIh.js";
|
|
6
|
+
import { _ as le } from "./Title-CMEhX9eJ.js";
|
|
7
7
|
import { _ as oe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
class re {
|
|
9
9
|
constructor(F, w, I, z = !0, C = !0) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),F=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),F=require("./useNestedProp-BcuQPNiW.cjs"),w=require("./index-BcLWKvbg.cjs"),z=require("./useResponsive-B3TrDDIG.cjs"),b=require("./BaseIcon-eEUOqFAE.cjs"),H=require("./Title-D9E4eBNp.cjs"),A=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");class L{constructor(N,p,_,T=!0,g=!0){this.interval=p,this.elapsed=0,this.isPaused=!1;const C=`
|
|
2
2
|
let interval;
|
|
3
3
|
let elapsed = 0;
|
|
4
4
|
let paused = false;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { computed as h, ref as p, watch as Z, onMounted as ee, openBlock as s, createElementBlock as c, normalizeClass as O, normalizeStyle as S, createVNode as te, createCommentVNode as _, createBlock as V, unref as f, createSlots as ae, withCtx as A, renderSlot as w, normalizeProps as X, guardReactiveProps as M, Fragment as D, renderList as H, toDisplayString as le } from "vue";
|
|
2
|
-
import { u as R } from "./useNestedProp-
|
|
3
|
-
import { u as oe, c as re, t as se, o as ne, e as ue, s as Y, X as ie } from "./index-
|
|
4
|
-
import { _ as ce } from "./Title-
|
|
5
|
-
import { u as ve, U as he } from "./usePrinter-
|
|
6
|
-
import de from "./vue-ui-skeleton-
|
|
2
|
+
import { u as R } from "./useNestedProp-QJwLGaK5.js";
|
|
3
|
+
import { u as oe, c as re, t as se, o as ne, e as ue, s as Y, X as ie } from "./index-BbBCE1pM.js";
|
|
4
|
+
import { _ as ce } from "./Title-CMEhX9eJ.js";
|
|
5
|
+
import { u as ve, U as he } from "./usePrinter-CnT0_Cbi.js";
|
|
6
|
+
import de from "./vue-ui-skeleton-BYBsAUyH.js";
|
|
7
7
|
import { _ as ge } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
const me = ["id"], ye = ["xmlns", "viewBox"], fe = { key: 0 }, pe = ["d", "stroke-width", "stroke"], ke = { key: 1 }, _e = ["x1", "y1", "x2", "y2", "stroke-width", "stroke"], be = ["x", "y", "font-size", "fill", "font-weight", "text-anchor"], Ce = {
|
|
9
9
|
key: 3,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),E=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),E=require("./useNestedProp-BcuQPNiW.cjs"),g=require("./index-BcLWKvbg.cjs"),j=require("./Title-D9E4eBNp.cjs"),O=require("./usePrinter-BWCvrSz2.cjs"),L=require("./vue-ui-skeleton-BG428rdQ.cjs"),U=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),H=["id"],M=["xmlns","viewBox"],X={key:0},D=["d","stroke-width","stroke"],R={key:1},Y=["x1","y1","x2","y2","stroke-width","stroke"],J=["x","y","font-size","fill","font-weight","text-anchor"],K={key:3,class:"vue-data-ui-watermark"},Q={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(A,{expose:V}){const u=A,{vue_ui_tiremarks:q}=g.useConfig(),x=e.computed(()=>!!u.dataset&&Object.keys(u.dataset).length),$=e.ref(g.createUid()),w=e.ref(null),P=e.ref(0),t=e.computed(()=>{const a=E.useNestedProp({userConfig:u.config,defaultConfig:q});return a.theme?{...E.useNestedProp({userConfig:g.themes.vue_ui_tiremarks[a.theme]||u.config,defaultConfig:a})}:a}),{isPrinting:B,isImaging:z,generatePdf:S,generateImage:F}=O.usePrinter({elementId:$.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks"}),c=e.ref(t.value.style.chart.animation.use?0:u.dataset.percentage);e.watch(()=>u.dataset.percentage,()=>{c.value=e.ref(t.value.style.chart.animation.use?0:u.dataset.percentage),I()}),e.onMounted(()=>{g.objectIsEmpty(u.dataset)&&g.error({componentName:"VueUiTiremarks",type:"dataset"}),I()});function I(){let a=0,s=t.value.style.chart.animation.speed,l=.005*t.value.style.chart.animation.acceleration;function r(){c.value+=s+a,a+=l,c.value<u.dataset.percentage?requestAnimationFrame(r):c.value=u.dataset.percentage}t.value.style.chart.animation.use&&(c.value=0,r())}const y=e.computed(()=>t.value.style.chart.layout.display==="vertical"),n=e.computed(()=>{const a={top:48,left:64,right:64,bottom:48};return y.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?a.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?a.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?a.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?a.right:10}}),_=e.computed(()=>Object.values(n.value).reduce((a,s)=>a+s,0)),o=e.computed(()=>({height:y.value?312:56,width:y.value?56:312})),G=e.ref(100);e.computed(()=>u.dataset.percentage/G.value);const i=e.computed(()=>y.value?{mark:(o.value.height-_.value)/100*.5,space:(o.value.height-_.value)/100*.5}:{mark:(o.value.width-_.value)/100*.5,space:(o.value.width-_.value)/100*.5}),N=e.computed(()=>{const a=[];for(let l=0;l<100;l+=1){const r=t.value.style.chart.layout.ticks.gradient.show?g.shiftHue(t.value.style.chart.layout.activeColor,l/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.activeColor;if(y.value){const f=t.value.style.chart.layout.crescendo?(100-l)*(o.value.width-n.value.left-n.value.right)/100/3:0,v=n.value.left+4+f,d=o.value.width-n.value.right-4-f,h=o.value.height-n.value.bottom-l*i.value.mark-l*i.value.space-i.value.mark,m=o.value.height-n.value.bottom-l*i.value.mark-l*i.value.space-i.value.mark,k=(d-v)/t.value.style.chart.layout.curveAngleX,C=t.value.style.chart.layout.curveAngleY*((1+l)/100);a.push({x1:v,x2:d,y1:h,y2:m,curve:`M ${v} ${h} C ${v+k} ${h-C}, ${d-k} ${m-C}, ${d} ${m}`,color:r})}else{const f=t.value.style.chart.layout.crescendo?(100-l)*(o.value.height-n.value.top-n.value.bottom)/100/3:0,v=n.value.left+l*i.value.mark+l*i.value.space-i.value.mark,d=v,h=n.value.top+4+f,m=o.value.height-n.value.bottom-4-f,k=t.value.style.chart.layout.curveAngleY*((1+l)/100),C=(m-h)/t.value.style.chart.layout.curveAngleX;a.push({x1:v,x2:d,y1:h,y2:m,curve:`M ${v} ${h} C ${v+k} ${h+C}, ${d+k} ${m-C}, ${d} ${m}`,color:r})}}return a}),p=e.computed(()=>{let a,s,l;const r=t.value.style.chart.percentage.fontSize/3;return y.value?t.value.style.chart.percentage.verticalPosition==="top"?(a=o.value.width/2,s=n.value.top/2,l="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(a=o.value.width/2,s=o.value.height-n.value.bottom/2+r,l="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(a=4,s=o.value.height/2+r,l="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(a=o.value.width-n.value.right+8,s=o.value.height/2+r,l="start"),{x:a,y:s,textAnchor:l,bold:t.value.style.chart.percentage.bold,fontSize:t.value.style.chart.percentage.fontSize,fill:t.value.style.chart.percentage.color}}),b=e.ref(!1);function T(a){b.value=a,P.value+=1}return V({generatePdf:S,generateImage:F}),(a,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:w,class:e.normalizeClass(`vue-ui-tiremarks ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:$.value},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(j._sfc_main,{config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(O.UserOptions,{ref:"details",key:`user_options_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(B),isImaging:e.unref(z),uid:$.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:b.value,titles:{...t.value.userOptions.buttonTitles},chartElement:w.value,onToggleFullscreen:T,onGeneratePdf:e.unref(S),onGenerateImage:e.unref(F)},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(g.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),viewBox:`0 0 ${o.value.width} ${o.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",X,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{d:l.curve,"stroke-width":i.value.mark,stroke:c.value>=r?l.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&r<=c.value})},null,10,D))),256))])):(e.openBlock(),e.createElementBlock("g",R,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:l.x1,y1:l.y1,x2:l.x2,y2:l.y2,"stroke-width":i.value.mark,stroke:c.value>=r?l.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,Y))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:p.value.x,y:p.value.y,"font-size":p.value.fontSize,fill:t.value.style.chart.layout.ticks.gradient.show&&t.value.style.chart.percentage.useGradientColor?e.unref(g.shiftHue)(t.value.style.chart.layout.activeColor,c.value/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.percentage.color,"font-weight":p.value.bold?"bold":"normal","text-anchor":p.value.textAnchor},e.toDisplayString(c.value.toFixed(t.value.style.chart.percentage.rounding)+"%"),9,J)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:o.value},void 0,!0)],14,M)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",K,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(B)||e.unref(z)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(L.default,{key:4,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],14,H))}},W=U._export_sfc(Q,[["__scopeId","data-v-92e00604"]]);exports.default=W;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { computed as w, ref as y, onMounted as He, onBeforeUnmount as Ee, openBlock as m, createElementBlock as C, normalizeClass as ke, normalizeStyle as D, createVNode as ne, createCommentVNode as M, createBlock as ee, unref as k, createSlots as Ue, withCtx as T, renderSlot as _, normalizeProps as G, guardReactiveProps as X, Fragment as xe, renderList as $e, createElementVNode as O, toDisplayString as q, createTextVNode as Te, nextTick as Ge, pushScopeId as Xe, popScopeId as qe } from "vue";
|
|
2
|
-
import { u as je, c as _e, t as Ye, a as Ze, p as x, b as Je, o as Ke, e as Qe, d as te, f as le, X as et, l as Oe, C as Se, v as Ne, w as tt, n as lt, q as ot } from "./index-
|
|
3
|
-
import { _ as at } from "./Title-
|
|
4
|
-
import { u as nt, U as st } from "./usePrinter-
|
|
5
|
-
import { _ as rt } from "./Tooltip-
|
|
6
|
-
import { L as ut } from "./Legend-
|
|
7
|
-
import it from "./vue-ui-skeleton-
|
|
8
|
-
import { D as ct } from "./DataTable-
|
|
9
|
-
import dt from "./vue-ui-accordion-
|
|
2
|
+
import { u as je, c as _e, t as Ye, a as Ze, p as x, b as Je, o as Ke, e as Qe, d as te, f as le, X as et, l as Oe, C as Se, v as Ne, w as tt, n as lt, q as ot } from "./index-BbBCE1pM.js";
|
|
3
|
+
import { _ as at } from "./Title-CMEhX9eJ.js";
|
|
4
|
+
import { u as nt, U as st } from "./usePrinter-CnT0_Cbi.js";
|
|
5
|
+
import { _ as rt } from "./Tooltip-B2XPbRE_.js";
|
|
6
|
+
import { L as ut } from "./Legend-Crc6SgWK.js";
|
|
7
|
+
import it from "./vue-ui-skeleton-BYBsAUyH.js";
|
|
8
|
+
import { D as ct } from "./DataTable-DVpbqbwp.js";
|
|
9
|
+
import dt from "./vue-ui-accordion-CM8Lp-MV.js";
|
|
10
10
|
import { t as vt, u as ht } from "./useResponsive-NZB-WLRF.js";
|
|
11
|
-
import { u as ze } from "./useNestedProp-
|
|
11
|
+
import { u as ze } from "./useNestedProp-QJwLGaK5.js";
|
|
12
12
|
import { _ as ft } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
function Ie(a, i) {
|
|
14
14
|
const s = a.length;
|