vue-data-ui 2.3.97 → 2.3.99
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-CD-z6ya0.cjs → Arrow-DwqF2Xky.cjs} +1 -1
- package/dist/{Arrow-BAg5kQhG.js → Arrow-Dyp57i2e.js} +1 -1
- package/dist/BaseIcon-BDeByyf-.cjs +1 -0
- package/dist/{BaseIcon-CiQsJmEc.js → BaseIcon-DHB44s-g.js} +17 -16
- package/dist/{DataTable-DRJUrEXP.cjs → DataTable-CiVu-yQZ.cjs} +1 -1
- package/dist/{DataTable-BczvA492.js → DataTable-Dv3mZD4M.js} +2 -2
- package/dist/{Legend-DDmBZxt8.cjs → Legend-ComtyeZF.cjs} +1 -1
- package/dist/{Legend-DnOc-JGW.js → Legend-iUlykl4S.js} +1 -1
- package/dist/{PackageVersion-rOhPenOY.cjs → PackageVersion-BqVp7cHC.cjs} +1 -1
- package/dist/{PackageVersion-DN8qp-uI.js → PackageVersion-DWAqn7t0.js} +1 -1
- package/dist/{Shape-DhRVUsKe.js → Shape-CDqrt_yL.js} +1 -1
- package/dist/{Shape-CDDjN4N-.cjs → Shape-D-cMBFx-.cjs} +1 -1
- package/dist/{Slicer-B7JFT6tT.js → Slicer-CQbVH6fI.js} +2 -2
- package/dist/{Slicer-IdC3VhM9.cjs → Slicer-iAp8x_Wq.cjs} +1 -1
- package/dist/{Title-Cjusozo5.cjs → Title-Bpx2Ub4Z.cjs} +1 -1
- package/dist/{Title-0tYDaWv7.js → Title-CDfZWgra.js} +1 -1
- package/dist/{Tooltip-DdWGiVyf.js → Tooltip-0-aPeOmA.js} +1 -1
- package/dist/{Tooltip-CkqTs_wn.cjs → Tooltip-D-JR_3NK.cjs} +1 -1
- package/dist/{index-BJNSbAx7.js → index-COTjlcVF.js} +725 -703
- package/dist/{index-NvxTr0fZ.cjs → index-DQRLTu78.cjs} +8 -8
- 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-CLh4tPxT.js → useNestedProp-CcjyiBlC.js} +1 -1
- package/dist/{useNestedProp-DhLxBAwX.cjs → useNestedProp-np0rM3ep.cjs} +1 -1
- package/dist/{usePrinter-CkV5eORP.js → usePrinter-5XpNgqjh.js} +27 -23
- package/dist/usePrinter-DuYSC89K.cjs +1 -0
- package/dist/{vue-data-ui-CyOAruHW.js → vue-data-ui-Bu3V-W6l.js} +57 -57
- package/dist/{vue-data-ui-OR4tWNiS.cjs → vue-data-ui-D3zaRZjl.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +7 -7
- package/dist/{vue-ui-3d-bar-DrnEff_D.cjs → vue-ui-3d-bar-C3EecSgn.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-CxDdjFAw.js → vue-ui-3d-bar-DmM70v1H.js} +8 -8
- package/dist/{vue-ui-accordion-DDf5Y2GY.js → vue-ui-accordion-CzKJYxd2.js} +3 -3
- package/dist/{vue-ui-accordion-CxPjShWo.cjs → vue-ui-accordion-ZppPKpGK.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-BiHpf1Rk.cjs → vue-ui-age-pyramid-BhmOvXIW.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-BMjBTeyH.js → vue-ui-age-pyramid-Bkyd3O37.js} +9 -9
- package/dist/{vue-ui-annotator-B-myvrhe.js → vue-ui-annotator-Bmk4N4Co.js} +1 -1
- package/dist/{vue-ui-annotator--NmsTiIf.cjs → vue-ui-annotator-rwo7Hm5A.cjs} +1 -1
- package/dist/{vue-ui-candlestick-DSwIFt7i.cjs → vue-ui-candlestick-CnYobq1k.cjs} +1 -1
- package/dist/{vue-ui-candlestick-J1JpFsJT.js → vue-ui-candlestick-o8m1DAm8.js} +10 -10
- package/dist/{vue-ui-carousel-table-B62mAFeV.js → vue-ui-carousel-table-DAck3_R_.js} +26 -25
- package/dist/vue-ui-carousel-table-DLQcAZx4.cjs +1 -0
- package/dist/{vue-ui-chestnut-ChAwKgeO.js → vue-ui-chestnut-BAQVvxrX.js} +7 -7
- package/dist/{vue-ui-chestnut-lQvVg9Rn.cjs → vue-ui-chestnut-r6lsB6H0.cjs} +1 -1
- package/dist/{vue-ui-cursor-XXjnAIH2.js → vue-ui-cursor-CYNxiijm.js} +2 -2
- package/dist/{vue-ui-cursor-D-qe8qez.cjs → vue-ui-cursor-ucua7LYB.cjs} +1 -1
- package/dist/{vue-ui-dashboard-CB41KQ7y.cjs → vue-ui-dashboard-DhLCwsFn.cjs} +1 -1
- package/dist/{vue-ui-dashboard-CC-DF6iU.js → vue-ui-dashboard-nnHIe25Y.js} +2 -2
- package/dist/{vue-ui-digits-Degwjx76.js → vue-ui-digits-BB3ZlyZ6.js} +2 -2
- package/dist/{vue-ui-digits-CIHkrLL6.cjs → vue-ui-digits-CEI69I0y.cjs} +1 -1
- package/dist/{vue-ui-donut-CYBpOCFo.js → vue-ui-donut-Ba9Qhfte.js} +10 -10
- package/dist/{vue-ui-donut-jwD3vNoD.cjs → vue-ui-donut-Cruh6AlQ.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-Bbt27unL.cjs → vue-ui-donut-evolution-BZaYmvPf.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-Bxq-hr-P.js → vue-ui-donut-evolution-CJHa5S50.js} +10 -10
- package/dist/{vue-ui-dumbbell-7f9d2mh-.cjs → vue-ui-dumbbell-D6Yu9qxX.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-KsVxecua.js → vue-ui-dumbbell-D_reERJf.js} +9 -9
- package/dist/{vue-ui-flow-BzcB3iiZ.cjs → vue-ui-flow-1HFdth8-.cjs} +1 -1
- package/dist/{vue-ui-flow-FqXhCo7u.js → vue-ui-flow-sBFdpbtF.js} +8 -8
- package/dist/{vue-ui-galaxy-xVldWSiq.cjs → vue-ui-galaxy-DO1moKk6.cjs} +1 -1
- package/dist/{vue-ui-galaxy-B9rSYr7m.js → vue-ui-galaxy-ccP0yuQ3.js} +10 -10
- package/dist/{vue-ui-gauge-k6fqkXqN.js → vue-ui-gauge-CYjZx4Zz.js} +6 -6
- package/dist/{vue-ui-gauge-B4r-qdzi.cjs → vue-ui-gauge-CuFpl36r.cjs} +1 -1
- package/dist/{vue-ui-gizmo-By3-mz_t.cjs → vue-ui-gizmo-C3dyTngy.cjs} +1 -1
- package/dist/{vue-ui-gizmo-CYaThghf.js → vue-ui-gizmo-DNZwsdp9.js} +3 -3
- package/dist/{vue-ui-heatmap-Bdffdnay.js → vue-ui-heatmap-0qNGXzdN.js} +9 -9
- package/dist/{vue-ui-heatmap-B0w5CXLi.cjs → vue-ui-heatmap-CLjngS-G.cjs} +1 -1
- package/dist/{vue-ui-kpi-DG8_lFYS.js → vue-ui-kpi-BiOt8Z9k.js} +3 -3
- package/dist/{vue-ui-kpi-BqN5GILt.cjs → vue-ui-kpi-iclD49Wb.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-C-Na_wY7.cjs → vue-ui-mini-loader-ASe27a1V.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BZS_gsWT.js → vue-ui-mini-loader-CBPZAUuP.js} +2 -2
- package/dist/{vue-ui-molecule-BK6bSbRU.js → vue-ui-molecule-VqY8WZHi.js} +10 -10
- package/dist/{vue-ui-molecule-Cdg96qiI.cjs → vue-ui-molecule-uCEX5lMP.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-D5GRHLEE.js → vue-ui-mood-radar-B0cjzFkt.js} +10 -10
- package/dist/{vue-ui-mood-radar-D-BCyG9b.cjs → vue-ui-mood-radar-RYbB7jdY.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-D1fD0b-H.cjs → vue-ui-nested-donuts-Bfu90lZl.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-mxJHstX4.js → vue-ui-nested-donuts-DbBSbOjx.js} +10 -10
- package/dist/{vue-ui-onion-6mkIHe9R.js → vue-ui-onion-DJLGXvfr.js} +10 -10
- package/dist/{vue-ui-onion-vKC5zZVM.cjs → vue-ui-onion-DK7lJvIH.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-B_gGjFqe.js → vue-ui-parallel-coordinate-plot-B0_1Uh7a.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-DqbwxRdK.cjs → vue-ui-parallel-coordinate-plot-BaZ5niQk.cjs} +1 -1
- package/dist/{vue-ui-quadrant-C54oPX3B.cjs → vue-ui-quadrant-BCadkOrx.cjs} +1 -1
- package/dist/{vue-ui-quadrant-SEj9AJdW.js → vue-ui-quadrant-CnAk8Np9.js} +11 -11
- package/dist/{vue-ui-quick-chart-DoEE3OMA.cjs → vue-ui-quick-chart--4pkEtK0.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-CqmbqQdH.js → vue-ui-quick-chart-BrgtffFL.js} +8 -8
- package/dist/{vue-ui-radar-Dr91p7eK.cjs → vue-ui-radar-C68BFXPH.cjs} +1 -1
- package/dist/{vue-ui-radar-CKjssi06.js → vue-ui-radar-CDlE8jus.js} +11 -11
- package/dist/{vue-ui-rating-DQvO4ejI.cjs → vue-ui-rating-DV3d_vAO.cjs} +1 -1
- package/dist/{vue-ui-rating-DUSE6rvR.js → vue-ui-rating-DwTC908t.js} +2 -2
- package/dist/{vue-ui-relation-circle-D089YHBB.cjs → vue-ui-relation-circle-0OvmIoRR.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-BmijKEEN.js → vue-ui-relation-circle-_5UsoCBf.js} +6 -6
- package/dist/{vue-ui-rings-BtzbZYTW.js → vue-ui-rings-BHVrR1L1.js} +10 -10
- package/dist/{vue-ui-rings-D237PxGP.cjs → vue-ui-rings-Duu-Dbns.cjs} +1 -1
- package/dist/{vue-ui-scatter-BeKQhHUw.js → vue-ui-scatter-CSfeAiML.js} +147 -147
- package/dist/vue-ui-scatter-azoiHq_a.cjs +1 -0
- package/dist/{vue-ui-screenshot-CnwCy_Kg.cjs → vue-ui-screenshot-D2-GzcYt.cjs} +1 -1
- package/dist/{vue-ui-screenshot-DNuimpRf.js → vue-ui-screenshot-DhMpdJsm.js} +1 -1
- package/dist/{vue-ui-skeleton-CsU74BI7.js → vue-ui-skeleton-CYgbDsKG.js} +3 -3
- package/dist/{vue-ui-skeleton-DYHqPo98.cjs → vue-ui-skeleton-yOWIPVsZ.cjs} +1 -1
- package/dist/{vue-ui-smiley-D150KQ7d.cjs → vue-ui-smiley-BXV9UMjs.cjs} +1 -1
- package/dist/{vue-ui-smiley-d0tQ2o9w.js → vue-ui-smiley-DDn0IZKJ.js} +2 -2
- package/dist/{vue-ui-spark-trend-BDibnFmx.cjs → vue-ui-spark-trend-BMdLIhg7.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-CtZdqmLI.js → vue-ui-spark-trend-DxwmzstI.js} +18 -18
- package/dist/{vue-ui-sparkbar-C-HlLkKi.js → vue-ui-sparkbar-Dk8VLc5p.js} +4 -4
- package/dist/{vue-ui-sparkbar-BpFs4ZhV.cjs → vue-ui-sparkbar-yocSweJn.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-BHBI7l12.cjs → vue-ui-sparkgauge-CdW6FTRw.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-BDRCFVP5.js → vue-ui-sparkgauge-G7BowYq4.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-BjWnqdfo.cjs → vue-ui-sparkhistogram-BWulWwCi.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-B5nNXynh.js → vue-ui-sparkhistogram-CkkEGb0a.js} +5 -5
- package/dist/{vue-ui-sparkline-DpnhvlTf.cjs → vue-ui-sparkline-CaetICAe.cjs} +1 -1
- package/dist/{vue-ui-sparkline-o3mpXRV-.js → vue-ui-sparkline-LBi6ypp4.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-CST5NcMP.cjs → vue-ui-sparkstackbar-CAJaJ3ZQ.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-Bko-XhdQ.js → vue-ui-sparkstackbar-DxUkSfRG.js} +4 -4
- package/dist/{vue-ui-stackbar-Br1WGSyo.js → vue-ui-stackbar-BP1YHhjl.js} +33 -33
- package/dist/{vue-ui-stackbar-B3nyr_3-.cjs → vue-ui-stackbar-BPyxp0m8.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-DkAf9HPJ.cjs → vue-ui-strip-plot-BJSzqxzi.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-C7Q-J22i.js → vue-ui-strip-plot-BYJWkk2_.js} +10 -10
- package/dist/{vue-ui-table-1vOGIOAk.cjs → vue-ui-table-C0-NQWi3.cjs} +1 -1
- package/dist/{vue-ui-table-BTXo44Nv.js → vue-ui-table-CWHUBpqz.js} +16 -16
- package/dist/{vue-ui-table-heatmap-BNcfBY7T.cjs → vue-ui-table-heatmap-9oVqDvLC.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BosdMOLZ.js → vue-ui-table-heatmap-uYQph968.js} +15 -15
- package/dist/{vue-ui-table-sparkline-BGCEgn2A.cjs → vue-ui-table-sparkline-BHJAP-Uh.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-D0NjMfnV.js → vue-ui-table-sparkline-Bv39O2DT.js} +16 -16
- package/dist/{vue-ui-thermometer-CUBnp6lX.cjs → vue-ui-thermometer-CqcNegd7.cjs} +1 -1
- package/dist/{vue-ui-thermometer-Bnn77E-v.js → vue-ui-thermometer-JLaF8-hy.js} +6 -6
- package/dist/{vue-ui-timer-JupC7c3X.js → vue-ui-timer-B2ZQBIVg.js} +5 -5
- package/dist/{vue-ui-timer-D2WCDGWF.cjs → vue-ui-timer-fu2zcs6f.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-Db9JjYq5.js → vue-ui-tiremarks-CXuGp82M.js} +6 -6
- package/dist/{vue-ui-tiremarks-FxWaEnUD.cjs → vue-ui-tiremarks-DzrCVTcA.cjs} +1 -1
- package/dist/{vue-ui-treemap-DPD9rcYE.js → vue-ui-treemap-CubutXgp.js} +10 -10
- package/dist/{vue-ui-treemap-oplXghMz.cjs → vue-ui-treemap-DmEpWWkN.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-BrOR3Xkc.cjs → vue-ui-vertical-bar-BpyY1mcc.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-DeUOAiy4.js → vue-ui-vertical-bar-Dqd4bZVC.js} +10 -10
- package/dist/{vue-ui-waffle-qvh8AKep.js → vue-ui-waffle-D1n_ln-O.js} +10 -10
- package/dist/{vue-ui-waffle-DGrZjGQR.cjs → vue-ui-waffle-DzbRkTbY.cjs} +1 -1
- package/dist/{vue-ui-wheel-CuEobbmN.cjs → vue-ui-wheel-BTJ9Ds5T.cjs} +1 -1
- package/dist/{vue-ui-wheel-DmG03DhW.js → vue-ui-wheel-C-BFxhCO.js} +6 -6
- package/dist/{vue-ui-word-cloud-CbnPyd1_.cjs → vue-ui-word-cloud-BZLUTH8A.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-Dg0WQKL1.js → vue-ui-word-cloud-DdbqYmZz.js} +26 -26
- package/dist/{vue-ui-xy-gHnKcmgZ.cjs → vue-ui-xy-BEB7zD0E.cjs} +2 -2
- package/dist/{vue-ui-xy-BBlRgHyb.js → vue-ui-xy-CLJaG6lQ.js} +272 -272
- package/dist/{vue-ui-xy-canvas-CzCS04yK.cjs → vue-ui-xy-canvas-CJHNw8ek.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-CqyEve92.js → vue-ui-xy-canvas-DE1jTXbE.js} +34 -34
- package/package.json +1 -1
- package/dist/BaseIcon-JWYc0t9a.cjs +0 -1
- package/dist/usePrinter-0s8wVGIy.cjs +0 -1
- package/dist/vue-ui-carousel-table-Cg3I81MW.cjs +0 -1
- package/dist/vue-ui-scatter-_bZ2lVMS.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-NvxTr0fZ.cjs"),K=require("./useResponsive-B3TrDDIG.cjs"),ie=require("./Title-Cjusozo5.cjs"),Q=require("./usePrinter-0s8wVGIy.cjs"),ce=require("./Tooltip-CkqTs_wn.cjs"),ve=require("./DataTable-DRJUrEXP.cjs"),de=require("./vue-ui-skeleton-DYHqPo98.cjs"),he=require("./Shape-CDDjN4N-.cjs"),pe=require("./vue-ui-accordion-CxPjShWo.cjs"),Z=require("./useNestedProp-DhLxBAwX.cjs"),me=require("./PackageVersion-rOhPenOY.cjs"),fe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ye=["id"],be=["xmlns","viewBox"],ge={key:0},ke={key:0},xe=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Ce={key:1},we=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Be=["x1","x2","y1","y2","stroke","stroke-width"],_e=["x1","x2","y1","y2","stroke","stroke-width"],Ne=["x","y","fill","font-size"],Se=["x","y","font-size","fill"],$e=["fill","font-size","transform"],Le=["fill","font-size","x","y"],Te=["x1","x2","y1","y2","stroke"],Pe=["cx","cy","fill"],Ee=["cx","cy","fill"],ze=["id"],Ve=["stop-color"],Ae=["stop-color"],Fe=["stop-color"],Oe={key:0},De=["x","y","font-size","fill"],Me={key:3,class:"vue-data-ui-watermark"},We=["innerHTML"],Ie={__name:"vue-ui-strip-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(ee,{expose:te,emit:le}){const v=ee,{vue_ui_strip_plot:ae}=o.useConfig(),p=e.computed({get(){return!!v.dataset&&v.dataset.length},set(l){return l}}),L=e.ref(o.createUid()),V=e.ref(0),T=e.ref(!1),P=e.ref(""),b=e.ref(null),A=e.ref(null),F=e.ref(!1),O=e.ref(0),D=e.ref(0),t=e.computed({get:()=>M(),set:l=>l});function M(){const l=Z.useNestedProp({userConfig:v.config,defaultConfig:ae});return l.theme?{...Z.useNestedProp({userConfig:o.themes.vue_ui_strip_plot[l.theme]||v.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}e.watch(()=>v.config,l=>{t.value=M(),W(),O.value+=1,D.value+=1},{deep:!0});const C=e.ref(null);e.onMounted(()=>{W()});function W(){if(o.objectIsEmpty(v.dataset)?o.error({componentName:"VueUiStripPlot",type:"dataset"}):v.dataset.forEach((l,s)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","plots"]}).forEach(a=>{p.value=!1,o.error({componentName:"VueUiStripPlot",type:"datasetSerieAttribute",property:a,index:s})}),l.plots&&l.plots.forEach((a,n)=>{o.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","value"]}).forEach(u=>{p.value=!1,o.error({componentName:"VueUiStripPlot",type:"datasetSerieAttribute",property:u,index:`${s},${n}`})})})}),t.value.responsive){const l=K.throttle(()=>{const{width:s,height:a}=K.useResponsive({chart:b.value,title:t.value.style.chart.title.text?A.value:null});w.value=a,y.value.width=s,y.value.height=a,k.value=(s-d.value.left-d.value.right)/v.dataset.length,B.value=o.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},oe.value*50)}e.onBeforeUnmount(()=>{C.value&&C.value.disconnect()});const{isPrinting:I,isImaging:G,generatePdf:q,generateImage:R}=Q.usePrinter({elementId:`strip-plot_${L.value}`,fileName:t.value.style.chart.title.text||"vue-ui-strip-plot"}),U=e.computed(()=>o.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}),d=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),y=e.ref({width:k.value*v.dataset.length+d.value.left+d.value.right,height:t.value.style.chart.height}),r=e.computed(()=>{const l=k.value*v.dataset.length+d.value.left+d.value.right;return{left:d.value.left,right:l-d.value.right,top:d.value.top,bottom:w.value-d.value.bottom,width:k.value*v.dataset.length,height:w.value-d.value.top-d.value.bottom,stripWidth:k.value,absoluteHeight:w.value,absoluteWidth:l}}),_=e.computed(()=>p.value?v.dataset.map((l,s)=>{const a=o.createUid();return{...l,id:a,color:l.color?o.convertColorToHex(l.color):U.value[s]||o.palette[s]||o.palette[s%o.palette.length],plots:l.plots.map(n=>({...n,value:o.checkNaN(n.value),parentId:a,color:l.color?o.convertColorToHex(l.color):U.value[s]||o.palette[s]||o.palette[s%o.palette.length],id:o.createUid()})).sort((n,u)=>n.value-u.value)}}):null),h=e.computed(()=>(_.value||[]).map((l,s)=>({...l,plots:l.plots.map(a=>({...a,x:r.value.left+(s+1)*r.value.stripWidth-r.value.stripWidth/2}))}))),oe=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(()=>o.calculateNiceScale(E.value.min<0?E.value.min:0,E.value.max,t.value.style.chart.grid.scaleSteps)),re=e.computed(()=>(h.value||[]).map((l,s)=>({...l,plots:l.plots.map(a=>({...a,y:r.value.bottom-(a.value+Math.abs(m.value.min))/(m.value.max+Math.abs(m.value.min))*r.value.height}))}))),H=e.computed(()=>m.value.ticks.map(l=>({y:r.value.bottom-r.value.height*((l+Math.abs(m.value.min))/(m.value.max+Math.abs(m.value.min))),x1:r.value.left,x2:r.value.right,value:l}))),z=e.ref(null),i=e.ref(null);function se({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(o.isFunction(a)&&o.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>${o.applyDataLabel(t.value.style.chart.labels.formatter,l.value,o.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}),{datapoint:l,seriesIndex:s})}</div>`,P.value=`<div>${n}</div>`}}const N=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 j(){e.nextTick(()=>{const l=N.value.head.map((n,u)=>[[n.name],[N.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=o.createCsvContent(s);o.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-strip-plot"})})}const S=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value],s=N.value.head.map((u,f)=>{const $=o.dataLabel({p:t.value.style.chart.labels.prefix,v:N.value.body[f],s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue});return[{color:u.color,name:u.name},$]}),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 ne(l){x.value=l,V.value+=1}function ue(){return h.value}function X(){c.value.showTable=!c.value.showTable}function Y(){c.value.dataLabels.show=!c.value.dataLabels.show}function J(){c.value.showTooltip=!c.value.showTooltip}return te({getData:ue,generatePdf:q,generateCsv:j,generateImage:R,toggleTable:X,toggleLabels:Y,toggleTooltip:J}),(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:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(ie._sfc_main,{key:`title_${O.value}`,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"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&p.value?(e.openBlock(),e.createBlock(Q.UserOptions,{ref:"details",key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(I),isImaging:e.unref(G),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,position:t.value.userOptions.position,onToggleFullscreen:ne,onGeneratePdf:e.unref(q),onGenerateCsv:j,onGenerateImage:e.unref(R),onToggleTable:X,onToggleLabels:Y,onToggleTooltip:J},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","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color};`)},[e.createVNode(me._sfc_main),t.value.style.chart.grid.show?(e.openBlock(),e.createElementBlock("g",ge,[t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.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,xe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",Ce,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,n)=>(e.openBlock(),e.createElementBlock("line",{x1:r.value.left+(n+1)*r.value.stripWidth,x2:r.value.left+(n+1)*r.value.stripWidth,y1:r.value.top,y2:r.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,we))),256))])):e.createCommentVNode("",!0),e.createElementVNode("line",{x1:r.value.left,x2:r.value.left,y1:r.value.top,y2:r.value.bottom,stroke:t.value.style.chart.grid.stroke,"stroke-width":t.value.style.chart.grid.strokeWidth,"stroke-linecap":"round"},null,8,Be),e.createElementVNode("line",{x1:r.value.left,x2:r.value.right,y1:r.value.bottom,y2:r.value.bottom,stroke:t.value.style.chart.grid.stroke,"stroke-width":t.value.style.chart.grid.strokeWidth,"stroke-linecap":"round"},null,8,_e)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(H.value,(a,n)=>(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(o.applyDataLabel)(t.value.style.chart.labels.formatter,a.value,e.unref(o.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}),{datapoint:a,seriesIndex:n})),9,Ne))),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:r.value.left+(n+1)*r.value.stripWidth-r.value.stripWidth/2,y:r.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,Se))),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}, ${r.value.top+r.value.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(t.value.style.chart.labels.axis.yLabel),9,$e)):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:r.value.left+r.value.width/2,y:r.value.absoluteHeight,"text-anchor":"middle"},e.toDisplayString(t.value.style.chart.labels.axis.xLabel),9,Le)):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createElementVNode("line",{x1:r.value.left,x2:r.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,Te),e.createElementVNode("circle",{cx:r.value.left,cy:i.value.y,r:3,fill:i.value.color,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,Pe),e.createElementVNode("circle",{cx:r.value.right,cy:i.value.y,r:3,fill:i.value.color,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,Ee)],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(o.lightenHexColor)(a.color,t.value.style.chart.plots.gradient.intensity/100)},null,8,Ve),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(o.darkenHexColor)(a.color,.1)},null,8,Ae),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Fe)],8,ze))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(re.value,(a,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,f)=>(e.openBlock(),e.createBlock(he._sfc_main,e.mergeProps({plot:{x:u.x,y:F.value?u.y:r.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:$=>se({datapoint:u,seriesIndex:f}),onMouseleave:s[0]||(s[0]=$=>{T.value=!1,i.value=null}),onClick:$=>le("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:${f*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",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[f===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(o.applyDataLabel)(t.value.style.chart.labels.formatter,u.value,e.unref(o.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}),{datapoint:u,seriesIndex:f}):""),13,De)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)],64))),256)),e.renderSlot(l.$slots,"svg",{svg:r.value},void 0,!0)],14,be)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Me,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(I)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(de.default,{key:4,config:{type:"stripPlot",style:{backgroundColor:t.value.style.chart.backgroundColor,stripPlot:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(ce._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(o.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(pe.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.openBlock(),e.createBlock(ve.DataTable,{key:`table_${D.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose: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,We)]),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,ye))}},Ge=fe._export_sfc(Ie,[["__scopeId","data-v-85774736"]]);exports.default=Ge;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-DQRLTu78.cjs"),K=require("./useResponsive-B3TrDDIG.cjs"),ie=require("./Title-Bpx2Ub4Z.cjs"),Q=require("./usePrinter-DuYSC89K.cjs"),ce=require("./Tooltip-D-JR_3NK.cjs"),ve=require("./DataTable-CiVu-yQZ.cjs"),de=require("./vue-ui-skeleton-yOWIPVsZ.cjs"),he=require("./Shape-D-cMBFx-.cjs"),pe=require("./vue-ui-accordion-ZppPKpGK.cjs"),Z=require("./useNestedProp-np0rM3ep.cjs"),me=require("./PackageVersion-BqVp7cHC.cjs"),fe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ye=["id"],be=["xmlns","viewBox"],ge={key:0},ke={key:0},xe=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Ce={key:1},we=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Be=["x1","x2","y1","y2","stroke","stroke-width"],_e=["x1","x2","y1","y2","stroke","stroke-width"],Ne=["x","y","fill","font-size"],Se=["x","y","font-size","fill"],$e=["fill","font-size","transform"],Le=["fill","font-size","x","y"],Te=["x1","x2","y1","y2","stroke"],Pe=["cx","cy","fill"],Ee=["cx","cy","fill"],ze=["id"],Ve=["stop-color"],Ae=["stop-color"],Fe=["stop-color"],Oe={key:0},De=["x","y","font-size","fill"],Me={key:3,class:"vue-data-ui-watermark"},We=["innerHTML"],Ie={__name:"vue-ui-strip-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(ee,{expose:te,emit:le}){const v=ee,{vue_ui_strip_plot:ae}=o.useConfig(),p=e.computed({get(){return!!v.dataset&&v.dataset.length},set(l){return l}}),L=e.ref(o.createUid()),V=e.ref(0),T=e.ref(!1),P=e.ref(""),b=e.ref(null),A=e.ref(null),F=e.ref(!1),O=e.ref(0),D=e.ref(0),t=e.computed({get:()=>M(),set:l=>l});function M(){const l=Z.useNestedProp({userConfig:v.config,defaultConfig:ae});return l.theme?{...Z.useNestedProp({userConfig:o.themes.vue_ui_strip_plot[l.theme]||v.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}e.watch(()=>v.config,l=>{t.value=M(),W(),O.value+=1,D.value+=1},{deep:!0});const C=e.ref(null);e.onMounted(()=>{W()});function W(){if(o.objectIsEmpty(v.dataset)?o.error({componentName:"VueUiStripPlot",type:"dataset"}):v.dataset.forEach((l,s)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","plots"]}).forEach(a=>{p.value=!1,o.error({componentName:"VueUiStripPlot",type:"datasetSerieAttribute",property:a,index:s})}),l.plots&&l.plots.forEach((a,n)=>{o.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","value"]}).forEach(u=>{p.value=!1,o.error({componentName:"VueUiStripPlot",type:"datasetSerieAttribute",property:u,index:`${s},${n}`})})})}),t.value.responsive){const l=K.throttle(()=>{const{width:s,height:a}=K.useResponsive({chart:b.value,title:t.value.style.chart.title.text?A.value:null});w.value=a,y.value.width=s,y.value.height=a,k.value=(s-d.value.left-d.value.right)/v.dataset.length,B.value=o.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},oe.value*50)}e.onBeforeUnmount(()=>{C.value&&C.value.disconnect()});const{isPrinting:I,isImaging:G,generatePdf:q,generateImage:R}=Q.usePrinter({elementId:`strip-plot_${L.value}`,fileName:t.value.style.chart.title.text||"vue-ui-strip-plot"}),U=e.computed(()=>o.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}),d=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),y=e.ref({width:k.value*v.dataset.length+d.value.left+d.value.right,height:t.value.style.chart.height}),r=e.computed(()=>{const l=k.value*v.dataset.length+d.value.left+d.value.right;return{left:d.value.left,right:l-d.value.right,top:d.value.top,bottom:w.value-d.value.bottom,width:k.value*v.dataset.length,height:w.value-d.value.top-d.value.bottom,stripWidth:k.value,absoluteHeight:w.value,absoluteWidth:l}}),_=e.computed(()=>p.value?v.dataset.map((l,s)=>{const a=o.createUid();return{...l,id:a,color:l.color?o.convertColorToHex(l.color):U.value[s]||o.palette[s]||o.palette[s%o.palette.length],plots:l.plots.map(n=>({...n,value:o.checkNaN(n.value),parentId:a,color:l.color?o.convertColorToHex(l.color):U.value[s]||o.palette[s]||o.palette[s%o.palette.length],id:o.createUid()})).sort((n,u)=>n.value-u.value)}}):null),h=e.computed(()=>(_.value||[]).map((l,s)=>({...l,plots:l.plots.map(a=>({...a,x:r.value.left+(s+1)*r.value.stripWidth-r.value.stripWidth/2}))}))),oe=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(()=>o.calculateNiceScale(E.value.min<0?E.value.min:0,E.value.max,t.value.style.chart.grid.scaleSteps)),re=e.computed(()=>(h.value||[]).map((l,s)=>({...l,plots:l.plots.map(a=>({...a,y:r.value.bottom-(a.value+Math.abs(m.value.min))/(m.value.max+Math.abs(m.value.min))*r.value.height}))}))),H=e.computed(()=>m.value.ticks.map(l=>({y:r.value.bottom-r.value.height*((l+Math.abs(m.value.min))/(m.value.max+Math.abs(m.value.min))),x1:r.value.left,x2:r.value.right,value:l}))),z=e.ref(null),i=e.ref(null);function se({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(o.isFunction(a)&&o.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>${o.applyDataLabel(t.value.style.chart.labels.formatter,l.value,o.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}),{datapoint:l,seriesIndex:s})}</div>`,P.value=`<div>${n}</div>`}}const N=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 j(){e.nextTick(()=>{const l=N.value.head.map((n,u)=>[[n.name],[N.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=o.createCsvContent(s);o.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-strip-plot"})})}const S=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value],s=N.value.head.map((u,f)=>{const $=o.dataLabel({p:t.value.style.chart.labels.prefix,v:N.value.body[f],s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue});return[{color:u.color,name:u.name},$]}),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 ne(l){x.value=l,V.value+=1}function ue(){return h.value}function X(){c.value.showTable=!c.value.showTable}function Y(){c.value.dataLabels.show=!c.value.dataLabels.show}function J(){c.value.showTooltip=!c.value.showTooltip}return te({getData:ue,generatePdf:q,generateCsv:j,generateImage:R,toggleTable:X,toggleLabels:Y,toggleTooltip:J}),(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:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(ie._sfc_main,{key:`title_${O.value}`,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"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&p.value?(e.openBlock(),e.createBlock(Q.UserOptions,{ref:"details",key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(I),isImaging:e.unref(G),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,position:t.value.userOptions.position,onToggleFullscreen:ne,onGeneratePdf:e.unref(q),onGenerateCsv:j,onGenerateImage:e.unref(R),onToggleTable:X,onToggleLabels:Y,onToggleTooltip:J},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","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color};`)},[e.createVNode(me._sfc_main),t.value.style.chart.grid.show?(e.openBlock(),e.createElementBlock("g",ge,[t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.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,xe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",Ce,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,n)=>(e.openBlock(),e.createElementBlock("line",{x1:r.value.left+(n+1)*r.value.stripWidth,x2:r.value.left+(n+1)*r.value.stripWidth,y1:r.value.top,y2:r.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,we))),256))])):e.createCommentVNode("",!0),e.createElementVNode("line",{x1:r.value.left,x2:r.value.left,y1:r.value.top,y2:r.value.bottom,stroke:t.value.style.chart.grid.stroke,"stroke-width":t.value.style.chart.grid.strokeWidth,"stroke-linecap":"round"},null,8,Be),e.createElementVNode("line",{x1:r.value.left,x2:r.value.right,y1:r.value.bottom,y2:r.value.bottom,stroke:t.value.style.chart.grid.stroke,"stroke-width":t.value.style.chart.grid.strokeWidth,"stroke-linecap":"round"},null,8,_e)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(H.value,(a,n)=>(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(o.applyDataLabel)(t.value.style.chart.labels.formatter,a.value,e.unref(o.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}),{datapoint:a,seriesIndex:n})),9,Ne))),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:r.value.left+(n+1)*r.value.stripWidth-r.value.stripWidth/2,y:r.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,Se))),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}, ${r.value.top+r.value.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(t.value.style.chart.labels.axis.yLabel),9,$e)):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:r.value.left+r.value.width/2,y:r.value.absoluteHeight,"text-anchor":"middle"},e.toDisplayString(t.value.style.chart.labels.axis.xLabel),9,Le)):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createElementVNode("line",{x1:r.value.left,x2:r.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,Te),e.createElementVNode("circle",{cx:r.value.left,cy:i.value.y,r:3,fill:i.value.color,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,Pe),e.createElementVNode("circle",{cx:r.value.right,cy:i.value.y,r:3,fill:i.value.color,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,Ee)],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(o.lightenHexColor)(a.color,t.value.style.chart.plots.gradient.intensity/100)},null,8,Ve),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(o.darkenHexColor)(a.color,.1)},null,8,Ae),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Fe)],8,ze))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(re.value,(a,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,f)=>(e.openBlock(),e.createBlock(he._sfc_main,e.mergeProps({plot:{x:u.x,y:F.value?u.y:r.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:$=>se({datapoint:u,seriesIndex:f}),onMouseleave:s[0]||(s[0]=$=>{T.value=!1,i.value=null}),onClick:$=>le("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:${f*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",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[f===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(o.applyDataLabel)(t.value.style.chart.labels.formatter,u.value,e.unref(o.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}),{datapoint:u,seriesIndex:f}):""),13,De)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)],64))),256)),e.renderSlot(l.$slots,"svg",{svg:r.value},void 0,!0)],14,be)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Me,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(I)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(de.default,{key:4,config:{type:"stripPlot",style:{backgroundColor:t.value.style.chart.backgroundColor,stripPlot:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(ce._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(o.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(pe.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.openBlock(),e.createBlock(ve.DataTable,{key:`table_${D.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose: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,We)]),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,ye))}},Ge=fe._export_sfc(Ie,[["__scopeId","data-v-85774736"]]);exports.default=Ge;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { computed as p, ref as n, watch as Ne, onMounted as Ae, onBeforeUnmount as Oe, openBlock as s, createElementBlock as i, normalizeClass as F, normalizeStyle as q, createBlock as P, createCommentVNode as c, unref as h, createSlots as Fe, withCtx as b, renderSlot as m, normalizeProps as H, guardReactiveProps as R, createVNode as be, Fragment as g, renderList as C, createElementVNode as x, toDisplayString as T, mergeProps as We, createTextVNode as Ie, nextTick as Me } from "vue";
|
|
2
|
-
import { u as De, c as K, t as Ge, a as Ee, p as L, o as Ve, e as Q, g as me, b as He, d as ge, v as Re, C as Ue, f as U, X as Be, i as Z, l as Xe, h as je, x as xe, y as Ye, q as Je, r as qe, E as Ke } from "./index-
|
|
2
|
+
import { u as De, c as K, t as Ge, a as Ee, p as L, o as Ve, e as Q, g as me, b as He, d as ge, v as Re, C as Ue, f as U, X as Be, i as Z, l as Xe, h as je, x as xe, y as Ye, q as Je, r as qe, E as Ke } from "./index-COTjlcVF.js";
|
|
3
3
|
import { t as Qe, u as Ze } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as et } from "./Title-
|
|
5
|
-
import { u as tt, U as lt } from "./usePrinter-
|
|
6
|
-
import { _ as at } from "./Tooltip-
|
|
7
|
-
import { D as ot } from "./DataTable-
|
|
8
|
-
import st from "./vue-ui-skeleton-
|
|
9
|
-
import { _ as rt } from "./Shape-
|
|
10
|
-
import ut from "./vue-ui-accordion-
|
|
11
|
-
import { u as ke } from "./useNestedProp-
|
|
12
|
-
import { _ as it } from "./PackageVersion-
|
|
4
|
+
import { _ as et } from "./Title-CDfZWgra.js";
|
|
5
|
+
import { u as tt, U as lt } from "./usePrinter-5XpNgqjh.js";
|
|
6
|
+
import { _ as at } from "./Tooltip-0-aPeOmA.js";
|
|
7
|
+
import { D as ot } from "./DataTable-Dv3mZD4M.js";
|
|
8
|
+
import st from "./vue-ui-skeleton-CYgbDsKG.js";
|
|
9
|
+
import { _ as rt } from "./Shape-CDqrt_yL.js";
|
|
10
|
+
import ut from "./vue-ui-accordion-CzKJYxd2.js";
|
|
11
|
+
import { u as ke } from "./useNestedProp-CcjyiBlC.js";
|
|
12
|
+
import { _ as it } from "./PackageVersion-DWAqn7t0.js";
|
|
13
13
|
import { _ as nt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
const vt = ["id"], ct = ["xmlns", "viewBox"], ht = { key: 0 }, dt = { key: 0 }, pt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], yt = { key: 1 }, ft = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], bt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], mt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], gt = ["x", "y", "fill", "font-size"], xt = ["x", "y", "font-size", "fill"], kt = ["fill", "font-size", "transform"], Ct = ["fill", "font-size", "x", "y"], _t = ["x1", "x2", "y1", "y2", "stroke"], wt = ["cx", "cy", "fill"], $t = ["cx", "cy", "fill"], Tt = ["id"], Lt = ["stop-color"], St = ["stop-color"], Pt = ["stop-color"], zt = { key: 0 }, Nt = ["x", "y", "font-size", "fill"], At = {
|
|
15
15
|
key: 3,
|
|
@@ -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-DQRLTu78.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,4 +1,4 @@
|
|
|
1
|
-
import { p as D, u as x, A as G, m as M, d as T, B as E, q as z, r as B,
|
|
1
|
+
import { p as D, u as x, A as G, m as M, d as T, B as E, q as z, r as B, Z as H } from "./index-COTjlcVF.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 P, createStaticVNode as R, pushScopeId as U, popScopeId as V } from "vue";
|
|
3
3
|
import { _ as j } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
const X = {
|
|
@@ -563,7 +563,7 @@ Provide an array of objects of type:
|
|
|
563
563
|
this.clientX = s.clientX - l.width / 2, this.clientY = s.clientY - l.height / 2, this.rafId = null;
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
|
-
}, F = (s) => (U("data-v-5a108fbd"), s = s(), V(), s),
|
|
566
|
+
}, F = (s) => (U("data-v-5a108fbd"), s = s(), V(), s), W = { class: "vue-ui-table-export-hub" }, Y = ["innerHTML"], Z = ["data-is-open"], K = /* @__PURE__ */ F(() => /* @__PURE__ */ a("b", { class: "vue-ui-table-export-hub-title" }, " Export ", -1)), q = { class: "vue-ui-table-export-hub-options" }, J = { class: "vue-ui-table-export-hub-option-wrapper" }, Q = { class: "label" }, $ = ["innerHTML"], ee = { class: "vue-ui-table-export-hub-option-wrapper" }, te = { class: "label" }, se = ["innerHTML"], re = { class: "vue-ui-table" }, ne = { id: "tableHead" }, le = /* @__PURE__ */ F(() => /* @__PURE__ */ a("th", { class: "invisible-cell" }, null, -1)), oe = { key: 0 }, ae = { key: 0 }, ie = { key: 1 }, ce = /* @__PURE__ */ F(() => /* @__PURE__ */ a("th", { class: "invisible-cell" }, null, -1)), ue = {
|
|
567
567
|
key: 0,
|
|
568
568
|
style: { display: "flex", "align-items": "center", "justify-content": "flex-end" }
|
|
569
569
|
}, he = ["innerHTML"], de = {
|
|
@@ -575,7 +575,7 @@ Provide an array of objects of type:
|
|
|
575
575
|
}, fe = { class: "date-wrapper--inputs" }, _e = { class: "date-fieldset" }, Ce = ["for"], Ie = ["id", "onUpdate:modelValue", "onInput"], Fe = { class: "date-fieldset" }, ve = ["for"], ke = ["id", "onUpdate:modelValue", "onInput"], pe = { class: "date-wrapper--button" }, we = ["onClick"], Se = ["innerHTML"], Oe = ["innerHTML"], Le = ["innerHTML"], Ae = ["onClick", "disabled"], De = ["placeholder", "onUpdate:modelValue", "name"], xe = ["onClick"], Ge = ["innerHTML"], Me = ["innerHTML"], Te = ["innerHTML"], Ee = ["onClick", "innerHTML"], ze = ["innerHTML"], Be = {
|
|
576
576
|
key: 5,
|
|
577
577
|
class: "th-range-filter"
|
|
578
|
-
}, He = ["for"], Pe = /* @__PURE__ */ F(() => /* @__PURE__ */ a("span", { style: { color: "grey" } }, "ᒥ", -1)), Re = /* @__PURE__ */ F(() => /* @__PURE__ */ a("span", { style: { color: "grey" } }, "ᒣ", -1)), Ue = ["id", "max", "min", "onUpdate:modelValue"], Ve = ["id", "max", "min", "onUpdate:modelValue"], je = ["for"], Xe = /* @__PURE__ */ F(() => /* @__PURE__ */ a("span", { style: { color: "grey" } }, "ᒪ", -1)),
|
|
578
|
+
}, He = ["for"], Pe = /* @__PURE__ */ F(() => /* @__PURE__ */ a("span", { style: { color: "grey" } }, "ᒥ", -1)), Re = /* @__PURE__ */ F(() => /* @__PURE__ */ a("span", { style: { color: "grey" } }, "ᒣ", -1)), Ue = ["id", "max", "min", "onUpdate:modelValue"], Ve = ["id", "max", "min", "onUpdate:modelValue"], je = ["for"], Xe = /* @__PURE__ */ F(() => /* @__PURE__ */ a("span", { style: { color: "grey" } }, "ᒪ", -1)), We = /* @__PURE__ */ F(() => /* @__PURE__ */ a("span", { style: { color: "grey" } }, "ᒧ", -1)), Ye = ["onClick", "disabled"], Ze = ["id"], Ke = ["onClick"], qe = ["onClick", "onKeyup"], Je = /* @__PURE__ */ F(() => /* @__PURE__ */ a("th", { class: "invisible-cell" }, null, -1)), Qe = ["innerHTML", "onClick", "onKeyup"], $e = ["data-row"], et = ["data-row"], tt = ["data-row", "onClick", "onKeyup", "id"], st = ["innerHTML"], rt = { key: 1 }, nt = { key: 2 }, lt = { key: 5 }, ot = ["innerHTML"], at = { key: 0 }, it = { style: { "margin-left": "12px" } }, ct = { class: "format-num" }, ut = { style: { "margin-left": "12px" } }, ht = {
|
|
579
579
|
key: 0,
|
|
580
580
|
class: "format-num"
|
|
581
581
|
}, dt = {
|
|
@@ -605,24 +605,24 @@ Provide an array of objects of type:
|
|
|
605
605
|
}, wt = ["max", "value"], St = { key: 1 }, Ot = ["disabled"], Lt = ["innerHTML", "disabled"], At = { class: "chart-modal-options" }, Dt = ["innerHTML"], xt = ["innerHTML"], Gt = ["innerHTML"], Mt = { style: { "margin-bottom": "12px" } }, Tt = { key: 0 }, Et = { key: 1 }, zt = {
|
|
606
606
|
style: { width: "100%", height: "fit-content", cursor: "move" },
|
|
607
607
|
ref: "chartModal"
|
|
608
|
-
}, Bt = { class: "vue-ui-table-fieldset" }, Ht = { class: "vue-ui-table-fieldset-wrapper" }, Pt = ["name", "id", "checked", "onInput"], Rt = ["for"], Ut = ["disabled"], Vt = ["innerHTML"], jt = ["viewBox"], Xt = ["markerWidth", "markerHeight", "refY"],
|
|
608
|
+
}, Bt = { class: "vue-ui-table-fieldset" }, Ht = { class: "vue-ui-table-fieldset-wrapper" }, Pt = ["name", "id", "checked", "onInput"], Rt = ["for"], Ut = ["disabled"], Vt = ["innerHTML"], jt = ["viewBox"], Xt = ["markerWidth", "markerHeight", "refY"], Wt = ["points", "fill"], Yt = ["x2", "y1", "y2", "stroke", "stroke-width"], Zt = ["y2", "stroke", "stroke-width"], Kt = ["x", "width", "height", "fill"], qt = /* @__PURE__ */ R('<linearGradient id="barGradientSelected" x2="0%" y2="100%" data-v-5a108fbd><stop offset="0.2" stop-color="#6376DD" data-v-5a108fbd></stop><stop offset="1" stop-color="#6376DD80" data-v-5a108fbd></stop></linearGradient><linearGradient id="barGradientSelectedNeg" x2="0%" y2="100%" data-v-5a108fbd><stop offset="0.2" stop-color="#6376DD80" data-v-5a108fbd></stop><stop offset="1" stop-color="#6376DD" data-v-5a108fbd></stop></linearGradient><linearGradient id="barGradient" x2="0%" y2="100%" data-v-5a108fbd><stop offset="0.2" stop-color="#6376DDB3" data-v-5a108fbd></stop><stop offset="1" stop-color="#6376DD66" data-v-5a108fbd></stop></linearGradient><linearGradient id="barGradientNeg" x2="0%" y2="100%" data-v-5a108fbd><stop offset="0.2" stop-color="#6376DD66" data-v-5a108fbd></stop><stop offset="1" stop-color="#6376DDB3" data-v-5a108fbd></stop></linearGradient>', 4), Jt = ["x", "y", "height", "width", "fill", "stroke"], Qt = ["x", "y", "width"], $t = ["x1", "y1", "x2", "y2", "stroke-width", "stroke"], es = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-dasharray"], ts = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], ss = ["x", "y", "width"], rs = ["x", "width", "height", "onMouseenter"], ns = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-dasharray"], ls = /* @__PURE__ */ F(() => /* @__PURE__ */ a("span", null, "---", -1)), os = ["d", "stroke"], as = ["x", "y"], is = { class: "vue-ui-table-donut-label-name" }, cs = ["fill"], us = ["fill"], hs = ["fill"], ds = ["fill"], gs = { class: "vue-ui-table-donut-legend" };
|
|
609
609
|
function ys(s, r, l, h, t, e) {
|
|
610
610
|
return i(), c("div", {
|
|
611
611
|
class: "vue-ui-table-main",
|
|
612
612
|
style: g(`font-family: ${e.FINAL_CONFIG.fontFamily}`)
|
|
613
613
|
}, [
|
|
614
|
-
a("div",
|
|
614
|
+
a("div", W, [
|
|
615
615
|
a("button", {
|
|
616
616
|
onClick: r[0] || (r[0] = (n) => t.isExportRequest = !t.isExportRequest),
|
|
617
617
|
innerHTML: e.icons.export,
|
|
618
618
|
style: g(`background:${e.FINAL_CONFIG.style.exportMenu.backgroundColor};color:${e.FINAL_CONFIG.style.exportMenu.color}`)
|
|
619
|
-
}, null, 12,
|
|
619
|
+
}, null, 12, Y),
|
|
620
620
|
a("div", {
|
|
621
621
|
class: "vue-ui-table-export-hub-dropdown",
|
|
622
622
|
"data-is-open": t.isExportRequest || "false",
|
|
623
623
|
style: g(`background:${e.FINAL_CONFIG.style.exportMenu.backgroundColor};color:${e.FINAL_CONFIG.style.exportMenu.color}`)
|
|
624
624
|
}, [
|
|
625
|
-
|
|
625
|
+
K,
|
|
626
626
|
a("button", {
|
|
627
627
|
class: "close-dropdown",
|
|
628
628
|
onClick: r[1] || (r[1] = (n) => t.isExportRequest = !1),
|
|
@@ -656,7 +656,7 @@ function ys(s, r, l, h, t, e) {
|
|
|
656
656
|
], 4)
|
|
657
657
|
])
|
|
658
658
|
])
|
|
659
|
-
], 12,
|
|
659
|
+
], 12, Z)
|
|
660
660
|
]),
|
|
661
661
|
a("div", {
|
|
662
662
|
class: "vue-ui-table__wrapper",
|
|
@@ -862,7 +862,7 @@ function ys(s, r, l, h, t, e) {
|
|
|
862
862
|
}, [
|
|
863
863
|
Xe,
|
|
864
864
|
I(" max "),
|
|
865
|
-
|
|
865
|
+
We
|
|
866
866
|
], 8, je)
|
|
867
867
|
])) : N("", !0),
|
|
868
868
|
e.canResetColumn(o, n) ? (i(), c("button", {
|
|
@@ -870,7 +870,7 @@ function ys(s, r, l, h, t, e) {
|
|
|
870
870
|
onClick: (d) => e.resetFilter(o, n, d),
|
|
871
871
|
disabled: e.isResetDisabled(o, n),
|
|
872
872
|
class: "th-reset"
|
|
873
|
-
}, " ✖ ", 8,
|
|
873
|
+
}, " ✖ ", 8, Ye)) : N("", !0),
|
|
874
874
|
n.isMultiselect ? (i(), c("div", {
|
|
875
875
|
key: 7,
|
|
876
876
|
class: "th-dropdown",
|
|
@@ -882,7 +882,7 @@ function ys(s, r, l, h, t, e) {
|
|
|
882
882
|
class: "close-dropdown",
|
|
883
883
|
onClick: (d) => e.toggleMultiselect(o, n, d),
|
|
884
884
|
style: g(`background:${e.FINAL_CONFIG.style.closeButtons.backgroundColor};color:${e.FINAL_CONFIG.style.closeButtons.color}`)
|
|
885
|
-
}, " ✖ ", 12,
|
|
885
|
+
}, " ✖ ", 12, Ke),
|
|
886
886
|
(i(!0), c(b, null, _(e.getDropdownOptions(o), (d, y) => (i(), c("span", {
|
|
887
887
|
class: "th-option",
|
|
888
888
|
key: `th_option_${o}_${y}`,
|
|
@@ -905,7 +905,7 @@ function ys(s, r, l, h, t, e) {
|
|
|
905
905
|
}, u(e.FINAL_CONFIG.style.dropdowns.icons.unselected.unicode), 5)),
|
|
906
906
|
a("span", null, u(d), 1)
|
|
907
907
|
], 44, qe))), 128))
|
|
908
|
-
], 12,
|
|
908
|
+
], 12, Ze)) : N("", !0)
|
|
909
909
|
])
|
|
910
910
|
], 6))), 128))
|
|
911
911
|
])
|
|
@@ -1205,7 +1205,7 @@ function ys(s, r, l, h, t, e) {
|
|
|
1205
1205
|
a("polygon", {
|
|
1206
1206
|
points: `0 0, ${e.FINAL_CONFIG.style.chart.layout.progression.arrowSize} ${e.FINAL_CONFIG.style.chart.layout.progression.arrowSize / 2}, 0 ${e.FINAL_CONFIG.style.chart.layout.progression.arrowSize}`,
|
|
1207
1207
|
fill: e.FINAL_CONFIG.style.chart.layout.progression.stroke
|
|
1208
|
-
}, null, 8,
|
|
1208
|
+
}, null, 8, Wt)
|
|
1209
1209
|
], 8, Xt)
|
|
1210
1210
|
]),
|
|
1211
1211
|
a("g", null, [
|
|
@@ -1217,7 +1217,7 @@ function ys(s, r, l, h, t, e) {
|
|
|
1217
1217
|
stroke: e.FINAL_CONFIG.style.chart.layout.axis.stroke,
|
|
1218
1218
|
"stroke-width": e.FINAL_CONFIG.style.chart.layout.axis.strokeWidth,
|
|
1219
1219
|
"stroke-linecap": "round"
|
|
1220
|
-
}, null, 8,
|
|
1220
|
+
}, null, 8, Yt),
|
|
1221
1221
|
a("line", {
|
|
1222
1222
|
x1: 0,
|
|
1223
1223
|
x2: 0,
|
|
@@ -1226,7 +1226,7 @@ function ys(s, r, l, h, t, e) {
|
|
|
1226
1226
|
stroke: e.FINAL_CONFIG.style.chart.layout.axis.stroke,
|
|
1227
1227
|
"stroke-width": e.FINAL_CONFIG.style.chart.layout.axis.strokeWidth,
|
|
1228
1228
|
"stroke-linecap": "round"
|
|
1229
|
-
}, null, 8,
|
|
1229
|
+
}, null, 8, Zt)
|
|
1230
1230
|
]),
|
|
1231
1231
|
t.chart.type === t.constants.LINE ? (i(!0), c(b, { key: 0 }, _(e.chartData.plots, (n, o) => (i(), c("g", {
|
|
1232
1232
|
key: `trap_fill_${o}`
|
|
@@ -1237,7 +1237,7 @@ function ys(s, r, l, h, t, e) {
|
|
|
1237
1237
|
width: e.chartData.slot,
|
|
1238
1238
|
height: t.chart.height,
|
|
1239
1239
|
fill: t.selectedPlot === o ? "rgba(0,0,0,0.03)" : "transparent"
|
|
1240
|
-
}, null, 8,
|
|
1240
|
+
}, null, 8, Kt)
|
|
1241
1241
|
]))), 128)) : N("", !0),
|
|
1242
1242
|
(i(!0), c(b, null, _(e.chartData.plots, (n, o) => (i(), c("g", {
|
|
1243
1243
|
key: `plot_${o}`
|
|
@@ -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-DQRLTu78.cjs"),P=require("./useNestedProp-np0rM3ep.cjs"),B=require("./usePrinter-DuYSC89K.cjs"),O=require("./Shape-D-cMBFx-.cjs"),T=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M=["id"],G={role:"cell"},q={role:"row"},U=["data-cell"],L={key:0,style:{display:"flex","flex-direction":"row",gap:"2px","align-items":"center"}},A=["height","width"],D={key:0,role:"cell","data-cell":"sum"},H={key:1,role:"cell","data-cell":"average"},X={key:2,role:"cell","data-cell":"median"},W={__name:"vue-ui-table-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(I,{expose:$}){const d=I;e.useCssVars(t=>({"67436fce":z.value,"0c1550ae":F.value}));const{vue_ui_table_heatmap:w}=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({get:()=>f(),set:t=>t});function f(){const t=P.useNestedProp({userConfig:d.config,defaultConfig:w});return t.theme?{...P.useNestedProp({userConfig:r.themes.vue_ui_table_heatmap[t.theme]||d.config,defaultConfig:t})}:t}e.watch(()=>d.config,t=>{o.value=f(),y()},{deep:!0});const{isPrinting:N,isImaging:x,generatePdf:g,generateImage:h}=B.usePrinter({elementId:`table_heatmap_${p.value}`,fileName:"vue-ui-table-heatmap"}),E=e.computed(()=>o.value.table.responsiveBreakpoint),S=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(()=>{y()});function y(){r.objectIsEmpty(d.dataset)&&r.error({componentName:"VueUiTableHeatmap",type:"dataset"});const t=new ResizeObserver(l=>{l.forEach(n=>{s.value=n.contentRect.width<E.value})});c.value&&t.observe(c.value)}const k=e.computed(()=>d.dataset.map(t=>{const l=t.values.map(a=>isNaN(a)?0:a),n=l.reduce((a,i)=>a+i,0);return{...t,values:l,serieExtremes:{max:Math.max(...l),min:Math.min(...l)},sum:n,average:n/l.length,median:r.calcMedian(l),displayValues:[t.name,...t.values],id:r.createUid()}})),b=e.computed(()=>{const t=k.value.flatMap(l=>l.values);return{min:Math.min(...t),max:Math.max(...t)}});function V(t,l){const n=o.value.style.heatmapColors.useIndividualScale;return r.interpolateColorHex(o.value.style.heatmapColors.min,o.value.style.heatmapColors.max,n?l.min:b.value.min,n?l.max:b.value.max,t)}const C=e.computed(()=>k.value.map(t=>({...t,colors:t.displayValues.map(l=>isNaN(l)?o.value.style.backgroundColor:V(l,t.serieExtremes))}))),F=e.computed(()=>o.value.style.backgroundColor),z=e.computed(()=>`${o.value.table.borderWidth}px`);function _(){e.nextTick(()=>{const t=C.value.map(a=>[[a.name],a.displayValues,[a.sum],[a.average],[a.median]]),l=[[[""],o.value.table.head.values,["sum"],["average"],["median"]]].concat(t),n=r.createCsvContent(l);r.downloadCsv({csvContent:n,title:"vue-ui-table-heatmap"})})}function R(t){m.value=t,v.value+=1}return $({generatePdf:g,generateCsv:_,generateImage:h}),(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&&S.value?(e.openBlock(),e.createBlock(B.UserOptions,{ref:"details",key:`user_option_${v.value}`,backgroundColor:o.value.style.backgroundColor,color:o.value.style.color,isPrinting:e.unref(N),isImaging:e.unref(x),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,position:o.value.userOptions.position,onToggleFullscreen:R,onGeneratePdf:e.unref(g),onGenerateCsv:_,onGenerateImage:e.unref(h)},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:n,isFullscreen:a})=>[e.renderSlot(t.$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","position","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,(n,a)=>(e.openBlock(),e.createElementBlock("th",G,[e.renderSlot(t.$slots,"head",e.normalizeProps(e.guardReactiveProps({value:n,rowIndex:a,type:typeof n,isResponsive:s.value})),void 0,!0)]))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(n,a)=>(e.openBlock(),e.createElementBlock("tr",q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.displayValues,(i,u)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":o.value.table.head.values[u]},[n.color&&u===0?(e.openBlock(),e.createElementBlock("div",L,[n.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(O._sfc_main,{plot:{x:10,y:10},color:n.color,radius:9,shape:n.shape||"circle"},null,8,["color","shape"])],8,A)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"rowTitle",e.normalizeProps(e.guardReactiveProps({value:i,rowIndex:a,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:a,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:a,colIndex:u,type:typeof i,isResponsive:s.value,color:n.colors[u],textColor:e.unref(r.adaptColorToBackground)(n.colors[u])})),void 0,!0):e.createCommentVNode("",!0)],64))],8,U))),256)),o.value.table.showSum?(e.openBlock(),e.createElementBlock("td",D,[e.renderSlot(t.$slots,"sum",e.normalizeProps(e.guardReactiveProps({value:n.sum,rowIndex:a,isResponsive:s.value})),void 0,!0)])):e.createCommentVNode("",!0),o.value.table.showAverage?(e.openBlock(),e.createElementBlock("td",H,[e.renderSlot(t.$slots,"average",e.normalizeProps(e.guardReactiveProps({value:n.average,rowIndex:a,isResponsive:s.value})),void 0,!0)])):e.createCommentVNode("",!0),o.value.table.showMedian?(e.openBlock(),e.createElementBlock("td",X,[e.renderSlot(t.$slots,"median",e.normalizeProps(e.guardReactiveProps({value:n.median,rowIndex:a,isResponsive:s.value})),void 0,!0)])):e.createCommentVNode("",!0)]))),256))])],4)],14,M))}},J=T._export_sfc(W,[["__scopeId","data-v-2bd72dde"]]);exports.default=J;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useCssVars as
|
|
2
|
-
import { u as oe, c as G, t as ne, o as se, e as le,
|
|
3
|
-
import { u as S } from "./useNestedProp-
|
|
4
|
-
import { u as pe, U as ve } from "./usePrinter-
|
|
5
|
-
import { _ as me } from "./Shape-
|
|
1
|
+
import { useCssVars as K, ref as h, computed as c, watch as Q, onMounted as Z, openBlock as s, createElementBlock as l, normalizeStyle as $, normalizeClass as E, createBlock as j, unref as g, createSlots as ee, withCtx as C, renderSlot as r, normalizeProps as p, guardReactiveProps as f, createCommentVNode as m, createElementVNode as y, Fragment as _, renderList as w, createVNode as te, mergeProps as M, nextTick as ae } from "vue";
|
|
2
|
+
import { u as oe, c as G, t as ne, o as se, e as le, Y as re, F as ue, N as ie, q as de, r as ce } from "./index-COTjlcVF.js";
|
|
3
|
+
import { u as S } from "./useNestedProp-CcjyiBlC.js";
|
|
4
|
+
import { u as pe, U as ve } from "./usePrinter-5XpNgqjh.js";
|
|
5
|
+
import { _ as me } from "./Shape-CDqrt_yL.js";
|
|
6
6
|
import { _ as fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
7
|
const he = ["id"], ge = { role: "cell" }, ye = { role: "row" }, be = ["data-cell"], Ce = {
|
|
8
8
|
key: 0,
|
|
@@ -37,8 +37,8 @@ const he = ["id"], ge = { role: "cell" }, ye = { role: "row" }, be = ["data-cell
|
|
|
37
37
|
},
|
|
38
38
|
setup(B, { expose: U }) {
|
|
39
39
|
const v = B;
|
|
40
|
-
|
|
41
|
-
"67436fce":
|
|
40
|
+
K((e) => ({
|
|
41
|
+
"67436fce": Y.value,
|
|
42
42
|
"0c1550ae": q.value
|
|
43
43
|
}));
|
|
44
44
|
const { vue_ui_table_heatmap: A } = oe(), k = h(G()), u = h(!1), b = h(null), I = h(!1), x = h(0), t = c({
|
|
@@ -57,13 +57,13 @@ const he = ["id"], ge = { role: "cell" }, ye = { role: "row" }, be = ["data-cell
|
|
|
57
57
|
})
|
|
58
58
|
} : e;
|
|
59
59
|
}
|
|
60
|
-
|
|
60
|
+
Q(() => v.config, (e) => {
|
|
61
61
|
t.value = F(), O();
|
|
62
62
|
}, { deep: !0 });
|
|
63
63
|
const { isPrinting: D, isImaging: H, generatePdf: P, generateImage: N } = pe({
|
|
64
64
|
elementId: `table_heatmap_${k.value}`,
|
|
65
65
|
fileName: "vue-ui-table-heatmap"
|
|
66
|
-
}), L = c(() => t.value.table.responsiveBreakpoint),
|
|
66
|
+
}), L = c(() => t.value.table.responsiveBreakpoint), X = c(() => !!v.dataset && v.dataset.length);
|
|
67
67
|
Z(() => {
|
|
68
68
|
O();
|
|
69
69
|
});
|
|
@@ -101,14 +101,14 @@ const he = ["id"], ge = { role: "cell" }, ye = { role: "row" }, be = ["data-cell
|
|
|
101
101
|
max: Math.max(...e)
|
|
102
102
|
};
|
|
103
103
|
});
|
|
104
|
-
function
|
|
104
|
+
function W(e, n) {
|
|
105
105
|
const a = t.value.style.heatmapColors.useIndividualScale;
|
|
106
106
|
return ie(t.value.style.heatmapColors.min, t.value.style.heatmapColors.max, a ? n.min : T.value.min, a ? n.max : T.value.max, e);
|
|
107
107
|
}
|
|
108
108
|
const V = c(() => R.value.map((e) => ({
|
|
109
109
|
...e,
|
|
110
|
-
colors: e.displayValues.map((n) => isNaN(n) ? t.value.style.backgroundColor :
|
|
111
|
-
}))), q = c(() => t.value.style.backgroundColor),
|
|
110
|
+
colors: e.displayValues.map((n) => isNaN(n) ? t.value.style.backgroundColor : W(n, e.serieExtremes))
|
|
111
|
+
}))), q = c(() => t.value.style.backgroundColor), Y = c(() => `${t.value.table.borderWidth}px`);
|
|
112
112
|
function z() {
|
|
113
113
|
ae(() => {
|
|
114
114
|
const e = V.value.map((o) => [
|
|
@@ -121,7 +121,7 @@ const he = ["id"], ge = { role: "cell" }, ye = { role: "row" }, be = ["data-cell
|
|
|
121
121
|
ce({ csvContent: a, title: "vue-ui-table-heatmap" });
|
|
122
122
|
});
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function J(e) {
|
|
125
125
|
I.value = e, x.value += 1;
|
|
126
126
|
}
|
|
127
127
|
return U({
|
|
@@ -135,7 +135,7 @@ const he = ["id"], ge = { role: "cell" }, ye = { role: "row" }, be = ["data-cell
|
|
|
135
135
|
class: E({ "vue-ui-responsive": u.value }),
|
|
136
136
|
id: `table_heatmap_${k.value}`
|
|
137
137
|
}, [
|
|
138
|
-
t.value.userOptions.show &&
|
|
138
|
+
t.value.userOptions.show && X.value ? (s(), j(ve, {
|
|
139
139
|
ref: "details",
|
|
140
140
|
key: `user_option_${x.value}`,
|
|
141
141
|
backgroundColor: t.value.style.backgroundColor,
|
|
@@ -151,7 +151,7 @@ const he = ["id"], ge = { role: "cell" }, ye = { role: "row" }, be = ["data-cell
|
|
|
151
151
|
titles: { ...t.value.userOptions.buttonTitles },
|
|
152
152
|
chartElement: b.value,
|
|
153
153
|
position: t.value.userOptions.position,
|
|
154
|
-
onToggleFullscreen:
|
|
154
|
+
onToggleFullscreen: J,
|
|
155
155
|
onGeneratePdf: g(P),
|
|
156
156
|
onGenerateCsv: z,
|
|
157
157
|
onGenerateImage: g(N)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-NvxTr0fZ.cjs"),$=require("./useNestedProp-DhLxBAwX.cjs"),J=require("./vue-ui-sparkline-DpnhvlTf.cjs"),K=require("./BaseIcon-JWYc0t9a.cjs"),D=require("./usePrinter-0s8wVGIy.cjs"),Q=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Y=["id"],Z={style:{"z-index":"1","padding-right":"24px"}},j=["onClick"],ee={style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center"}},te=["data-cell"],le={dir:"auto",style:{display:"flex","flex-direction":"row","align-items":"center",gap:"6px"}},ae=["data-cell","onPointerenter"],oe=["data-cell"],ne=["data-cell"],re=["data-cell"],ue=["data-cell"],se={__name:"vue-ui-table-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(F,{expose:O}){const d=F;e.useCssVars(l=>({"6ca111be":l.tdo}));const{vue_ui_table_sparkline:W}=u.useConfig(),h=e.ref(u.createUid()),S=e.ref(0),b=e.ref(0),t=e.computed({get:()=>C(),set:l=>l});function C(){const l=$.useNestedProp({userConfig:d.config,defaultConfig:W});return l.theme?{...$.useNestedProp({userConfig:u.themes.vue_ui_table_sparkline[l.theme]||d.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}e.watch(()=>d.config,l=>{t.value=C(),A(),b.value+=1},{deep:!0}),e.watch(()=>d.dataset,l=>{f.value=v.value,b.value+=1},{deep:!0});const{isPrinting:w,isImaging:z,generatePdf:I,generateImage:N}=D.usePrinter({elementId:`table_${h.value}`,fileName:t.value.title.text||"vue-ui-table-sparkline"}),L=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),g=e.ref(null),B=e.ref(!1),T=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{A()});function A(){u.objectIsEmpty(d.dataset)&&u.error({componentName:"VueUiTableSparkline",type:"dataset"});const l=new ResizeObserver(s=>{s.forEach(a=>{B.value=a.contentRect.width<T.value})});g.value&&l.observe(g.value)}const E=e.computed(()=>(d.dataset.forEach((l,s)=>{u.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{u.error({componentName:"VueUiTableSparkline",type:"datasetSerieAttribute",property:a,index:s})})}),d.dataset.map((l,s)=>{const a=(l.values||[]).map(r=>isNaN(r)?0:r??0),n=a.reduce((r,o)=>r+o,0);return{...l,values:l.values||[],color:u.convertColorToHex(l.color)||L.value[s]||u.palette[s]||u.palette[s%u.palette.length],sum:n,average:n/a.length,median:u.calcMedian(a),sparklineDataset:a.map((r,o)=>({period:t.value.colNames[o]||`col ${o}`,value:r||0}))}})));function M(l){const a=(l[0].values||[]).map((r,o)=>l.map(i=>i.values[o]||[])).map(r=>r.map((o,i)=>[o,i]).sort((o,i)=>i[0]-o[0]).map(o=>o[1]));return l.map((r,o)=>({...r,values:r.values||[],orders:a[o]}))}const v=e.computed(()=>M(E.value)),f=e.ref(v.value),G=e.computed(()=>Math.max(...f.value.map(l=>(l.values||[]).length))),y=e.ref(void 0),k=e.ref(!1),_=e.ref(void 0),x=e.ref(-1);function q(){k.value=!1,_.value=void 0,x.value=-1,f.value=v.value}function R(l){k.value=!0,_.value=l;const s=v.value.map(o=>o.values[l]||[]),a=y.value===l?1:-1;x.value=a,l===y.value?y.value=void 0:y.value=l;const r=s.map((o,i)=>[i,o]).sort((o,i)=>a*(i[1]-o[1])).map(o=>o[0]).map(o=>v.value[o]);f.value=r,b.value+=1}const U=e.computed(()=>Math.max(...d.dataset.map(l=>(l.values||[]).length))),m=e.computed(()=>{let l=t.value.colNames;if(!l.length)for(let a=0;a<U.value;a+=1)l.push(`col ${a+1}`);t.value.showTotal&&(l=[...l,t.value.translations.total]);let s;return t.value.showAverage&&t.value.showMedian?s=[...l,t.value.translations.average,t.value.translations.median]:t.value.showAverage&&!t.value.showMedian?s=[...l,t.value.translations.average]:!t.value.showAverage&&t.value.showMedian?s=[...l,t.value.translations.median]:s=l,t.value.showSparklines?[...s,t.value.translations.chart]:s}),c=e.ref(void 0),p=e.ref(void 0);function H({dataIndex:l,serieIndex:s}){c.value=l,p.value=s}const V=e.ref(!1);function X(l){V.value=l,S.value+=1}function P(){e.nextTick(()=>{const l=[t.value.translations.serie].concat(m.value),s=E.value.map((r,o)=>[[r.name],r.values,[r.sum],[r.average],[r.median]]),a=[l].concat(s),n=u.createCsvContent(a);u.downloadCsv({csvContent:n,title:t.value.title.text||"vue-ui-table-sparkline"})})}return O({generatePdf:I,generateImage:N,generateCsv:P,restoreOrder:q}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:g,class:e.normalizeClass({"vue-ui-responsive":B.value}),style:{overflow:"hidden"},id:`table_${h.value}`},[e.createElementVNode("div",{style:{overflow:"auto"},onPointerleave:s[0]||(s[0]=a=>{p.value=void 0,c.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",Z,[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(m.value,(a,n)=>(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:n===m.value.length-1?"150px":"",cursor:v.value[0].values[n]!==void 0?"pointer":"default"}),onClick:()=>R(n),class:e.normalizeClass({"sticky-col":n===m.value.length-1&&t.value.showSparklines})},[e.createElementVNode("div",ee,[e.createElementVNode("span",null,e.toDisplayString(a),1),k.value&&n===_.value&&v.value[0].values[n]!==void 0?(e.openBlock(),e.createBlock(K.default,{key:0,size:18,name:x.value===1?"sort":"sortReverse",stroke:t.value.thead.color},null,8,["name","stroke"])):e.createCommentVNode("",!0)]),t.value.userOptions.show&&n===m.value.length-1?(e.openBlock(),e.createBlock(D.UserOptions,{ref_for:!0,ref:"details",key:`user_option_${S.value}`,backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color,isPrinting:e.unref(w),isImaging:e.unref(z),uid:h.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:V.value,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,position:t.value.userOptions.position,onToggleFullscreen:X,onGeneratePdf:e.unref(I),onGenerateImage:e.unref(N),onGenerateCsv:P},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:r,isFullscreen:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:o})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0)],14,j))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(a,n)=>(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":n%2===0,"vue-ui-data-table__tbody__row-odd":n%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",le,[e.createElementVNode("span",{style:e.normalizeStyle({color:a.color})},"⬤",4),e.createElementVNode("span",null,e.toDisplayString(a.name??"-"),1)])],12,te),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G.value,(r,o)=>(e.openBlock(),e.createElementBlock("td",{dir:"auto",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:c.value!==void 0&&p.value!==void 0&&o===c.value&&p.value===n?`${a.color}33`:"",borderRadius:c.value!==void 0&&p.value!==void 0&&o===c.value&&p.value===n?"3px":""}),"data-cell":m.value[o],class:"vue-ui-data-table__tbody__td",onPointerenter:i=>{p.value=n,c.value=o}},e.toDisplayString([null,void 0].includes(a.values[o])?"-":e.unref(u.applyDataLabel)(t.value.formatter,Number(a.values[o]),e.unref(u.dataLabel)({p:t.value.prefix,v:Number(a.values[o]),s:t.value.suffix,r:t.value.roundingValues}),{datapoint:a,seriesIndex:n,datapointIndex:o})),45,ae))),256)),t.value.showTotal?(e.openBlock(),e.createElementBlock("td",{key:0,dir:"auto",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(e.unref(u.applyDataLabel)(t.value.formatter,a.sum,e.unref(u.dataLabel)({p:t.value.prefix,v:a.sum,s:t.value.suffix,r:t.value.roundingTotal}),{datapoint:a.sum,seriesIndex:n})),13,oe)):e.createCommentVNode("",!0),t.value.showAverage?(e.openBlock(),e.createElementBlock("td",{key:1,dir:"auto",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(e.unref(u.applyDataLabel)(t.value.formatter,a.average,e.unref(u.dataLabel)({p:t.value.prefix,v:a.average,s:t.value.suffix,r:t.value.roundingAverage}),{datapoint:a.average,seriesIndex:n})),13,ne)):e.createCommentVNode("",!0),t.value.showMedian?(e.openBlock(),e.createElementBlock("td",{key:2,dir:"auto",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(e.unref(u.applyDataLabel)(t.value.formatter,a.median,e.unref(u.dataLabel)({p:t.value.prefix,v:a.median,s:t.value.suffix,r:t.value.roundingMedian}),{datapoint:a.median,seriesIndex:n})),13,re)):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(J.default,{key:`sparkline_${n}_${b.value}`,onHoverIndex:({index:r})=>H({dataIndex:r,serieIndex:n}),dataset:a.sparklineDataset,showInfo:!1,selectedIndex:c.value,config:{type:t.value.sparkline.type,style:{backgroundColor:t.value.tbody.backgroundColor,animation:{show:t.value.sparkline.animation.show&&!e.unref(w)&&!e.unref(z),animationFrames:t.value.sparkline.animation.animationFrames},line:{color:a.color,smooth:t.value.sparkline.smooth,strokeWidth:t.value.sparkline.strokeWidth},bar:{color:a.color},area:{color:a.color,opacity:t.value.sparkline.showArea?16:0,useGradient:t.value.sparkline.useGradient},verticalIndicator:{color:a.color},plot:{radius:9,stroke:t.value.tbody.backgroundColor,strokeWidth:3}}}},null,8,["onHoverIndex","dataset","selectedIndex","config"]))],12,ue)):e.createCommentVNode("",!0)],6))),256))])],4)],32)],10,Y))}},ie=Q._export_sfc(se,[["__scopeId","data-v-26b54f10"]]);exports.default=ie;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-DQRLTu78.cjs"),$=require("./useNestedProp-np0rM3ep.cjs"),J=require("./vue-ui-sparkline-CaetICAe.cjs"),K=require("./BaseIcon-BDeByyf-.cjs"),D=require("./usePrinter-DuYSC89K.cjs"),Q=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Y=["id"],Z={style:{"z-index":"1","padding-right":"24px"}},j=["onClick"],ee={style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center"}},te=["data-cell"],le={dir:"auto",style:{display:"flex","flex-direction":"row","align-items":"center",gap:"6px"}},ae=["data-cell","onPointerenter"],oe=["data-cell"],ne=["data-cell"],re=["data-cell"],ue=["data-cell"],se={__name:"vue-ui-table-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(F,{expose:O}){const d=F;e.useCssVars(l=>({"6ca111be":l.tdo}));const{vue_ui_table_sparkline:W}=u.useConfig(),h=e.ref(u.createUid()),S=e.ref(0),b=e.ref(0),t=e.computed({get:()=>C(),set:l=>l});function C(){const l=$.useNestedProp({userConfig:d.config,defaultConfig:W});return l.theme?{...$.useNestedProp({userConfig:u.themes.vue_ui_table_sparkline[l.theme]||d.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}e.watch(()=>d.config,l=>{t.value=C(),A(),b.value+=1},{deep:!0}),e.watch(()=>d.dataset,l=>{f.value=v.value,b.value+=1},{deep:!0});const{isPrinting:w,isImaging:z,generatePdf:I,generateImage:N}=D.usePrinter({elementId:`table_${h.value}`,fileName:t.value.title.text||"vue-ui-table-sparkline"}),L=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),g=e.ref(null),B=e.ref(!1),T=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{A()});function A(){u.objectIsEmpty(d.dataset)&&u.error({componentName:"VueUiTableSparkline",type:"dataset"});const l=new ResizeObserver(s=>{s.forEach(a=>{B.value=a.contentRect.width<T.value})});g.value&&l.observe(g.value)}const E=e.computed(()=>(d.dataset.forEach((l,s)=>{u.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{u.error({componentName:"VueUiTableSparkline",type:"datasetSerieAttribute",property:a,index:s})})}),d.dataset.map((l,s)=>{const a=(l.values||[]).map(r=>isNaN(r)?0:r??0),n=a.reduce((r,o)=>r+o,0);return{...l,values:l.values||[],color:u.convertColorToHex(l.color)||L.value[s]||u.palette[s]||u.palette[s%u.palette.length],sum:n,average:n/a.length,median:u.calcMedian(a),sparklineDataset:a.map((r,o)=>({period:t.value.colNames[o]||`col ${o}`,value:r||0}))}})));function M(l){const a=(l[0].values||[]).map((r,o)=>l.map(i=>i.values[o]||[])).map(r=>r.map((o,i)=>[o,i]).sort((o,i)=>i[0]-o[0]).map(o=>o[1]));return l.map((r,o)=>({...r,values:r.values||[],orders:a[o]}))}const v=e.computed(()=>M(E.value)),f=e.ref(v.value),G=e.computed(()=>Math.max(...f.value.map(l=>(l.values||[]).length))),y=e.ref(void 0),k=e.ref(!1),_=e.ref(void 0),x=e.ref(-1);function q(){k.value=!1,_.value=void 0,x.value=-1,f.value=v.value}function R(l){k.value=!0,_.value=l;const s=v.value.map(o=>o.values[l]||[]),a=y.value===l?1:-1;x.value=a,l===y.value?y.value=void 0:y.value=l;const r=s.map((o,i)=>[i,o]).sort((o,i)=>a*(i[1]-o[1])).map(o=>o[0]).map(o=>v.value[o]);f.value=r,b.value+=1}const U=e.computed(()=>Math.max(...d.dataset.map(l=>(l.values||[]).length))),m=e.computed(()=>{let l=t.value.colNames;if(!l.length)for(let a=0;a<U.value;a+=1)l.push(`col ${a+1}`);t.value.showTotal&&(l=[...l,t.value.translations.total]);let s;return t.value.showAverage&&t.value.showMedian?s=[...l,t.value.translations.average,t.value.translations.median]:t.value.showAverage&&!t.value.showMedian?s=[...l,t.value.translations.average]:!t.value.showAverage&&t.value.showMedian?s=[...l,t.value.translations.median]:s=l,t.value.showSparklines?[...s,t.value.translations.chart]:s}),c=e.ref(void 0),p=e.ref(void 0);function H({dataIndex:l,serieIndex:s}){c.value=l,p.value=s}const V=e.ref(!1);function X(l){V.value=l,S.value+=1}function P(){e.nextTick(()=>{const l=[t.value.translations.serie].concat(m.value),s=E.value.map((r,o)=>[[r.name],r.values,[r.sum],[r.average],[r.median]]),a=[l].concat(s),n=u.createCsvContent(a);u.downloadCsv({csvContent:n,title:t.value.title.text||"vue-ui-table-sparkline"})})}return O({generatePdf:I,generateImage:N,generateCsv:P,restoreOrder:q}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:g,class:e.normalizeClass({"vue-ui-responsive":B.value}),style:{overflow:"hidden"},id:`table_${h.value}`},[e.createElementVNode("div",{style:{overflow:"auto"},onPointerleave:s[0]||(s[0]=a=>{p.value=void 0,c.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",Z,[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(m.value,(a,n)=>(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:n===m.value.length-1?"150px":"",cursor:v.value[0].values[n]!==void 0?"pointer":"default"}),onClick:()=>R(n),class:e.normalizeClass({"sticky-col":n===m.value.length-1&&t.value.showSparklines})},[e.createElementVNode("div",ee,[e.createElementVNode("span",null,e.toDisplayString(a),1),k.value&&n===_.value&&v.value[0].values[n]!==void 0?(e.openBlock(),e.createBlock(K.default,{key:0,size:18,name:x.value===1?"sort":"sortReverse",stroke:t.value.thead.color},null,8,["name","stroke"])):e.createCommentVNode("",!0)]),t.value.userOptions.show&&n===m.value.length-1?(e.openBlock(),e.createBlock(D.UserOptions,{ref_for:!0,ref:"details",key:`user_option_${S.value}`,backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color,isPrinting:e.unref(w),isImaging:e.unref(z),uid:h.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:V.value,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,position:t.value.userOptions.position,onToggleFullscreen:X,onGeneratePdf:e.unref(I),onGenerateImage:e.unref(N),onGenerateCsv:P},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:r,isFullscreen:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:o})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0)],14,j))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(a,n)=>(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":n%2===0,"vue-ui-data-table__tbody__row-odd":n%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",le,[e.createElementVNode("span",{style:e.normalizeStyle({color:a.color})},"⬤",4),e.createElementVNode("span",null,e.toDisplayString(a.name??"-"),1)])],12,te),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G.value,(r,o)=>(e.openBlock(),e.createElementBlock("td",{dir:"auto",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:c.value!==void 0&&p.value!==void 0&&o===c.value&&p.value===n?`${a.color}33`:"",borderRadius:c.value!==void 0&&p.value!==void 0&&o===c.value&&p.value===n?"3px":""}),"data-cell":m.value[o],class:"vue-ui-data-table__tbody__td",onPointerenter:i=>{p.value=n,c.value=o}},e.toDisplayString([null,void 0].includes(a.values[o])?"-":e.unref(u.applyDataLabel)(t.value.formatter,Number(a.values[o]),e.unref(u.dataLabel)({p:t.value.prefix,v:Number(a.values[o]),s:t.value.suffix,r:t.value.roundingValues}),{datapoint:a,seriesIndex:n,datapointIndex:o})),45,ae))),256)),t.value.showTotal?(e.openBlock(),e.createElementBlock("td",{key:0,dir:"auto",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(e.unref(u.applyDataLabel)(t.value.formatter,a.sum,e.unref(u.dataLabel)({p:t.value.prefix,v:a.sum,s:t.value.suffix,r:t.value.roundingTotal}),{datapoint:a.sum,seriesIndex:n})),13,oe)):e.createCommentVNode("",!0),t.value.showAverage?(e.openBlock(),e.createElementBlock("td",{key:1,dir:"auto",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(e.unref(u.applyDataLabel)(t.value.formatter,a.average,e.unref(u.dataLabel)({p:t.value.prefix,v:a.average,s:t.value.suffix,r:t.value.roundingAverage}),{datapoint:a.average,seriesIndex:n})),13,ne)):e.createCommentVNode("",!0),t.value.showMedian?(e.openBlock(),e.createElementBlock("td",{key:2,dir:"auto",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(e.unref(u.applyDataLabel)(t.value.formatter,a.median,e.unref(u.dataLabel)({p:t.value.prefix,v:a.median,s:t.value.suffix,r:t.value.roundingMedian}),{datapoint:a.median,seriesIndex:n})),13,re)):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(J.default,{key:`sparkline_${n}_${b.value}`,onHoverIndex:({index:r})=>H({dataIndex:r,serieIndex:n}),dataset:a.sparklineDataset,showInfo:!1,selectedIndex:c.value,config:{type:t.value.sparkline.type,style:{backgroundColor:t.value.tbody.backgroundColor,animation:{show:t.value.sparkline.animation.show&&!e.unref(w)&&!e.unref(z),animationFrames:t.value.sparkline.animation.animationFrames},line:{color:a.color,smooth:t.value.sparkline.smooth,strokeWidth:t.value.sparkline.strokeWidth},bar:{color:a.color},area:{color:a.color,opacity:t.value.sparkline.showArea?16:0,useGradient:t.value.sparkline.useGradient},verticalIndicator:{color:a.color},plot:{radius:9,stroke:t.value.tbody.backgroundColor,strokeWidth:3}}}},null,8,["onHoverIndex","dataset","selectedIndex","config"]))],12,ue)):e.createCommentVNode("",!0)],6))),256))])],4)],32)],10,Y))}},ie=Q._export_sfc(se,[["__scopeId","data-v-26b54f10"]]);exports.default=ie;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { useCssVars as ve, ref as d, computed as g, watch as
|
|
2
|
-
import { u as ge, c as he, t as ye, a as _e, p as $, b as ke, o as xe, e as
|
|
3
|
-
import { u as Z } from "./useNestedProp-
|
|
4
|
-
import $e from "./vue-ui-sparkline-
|
|
5
|
-
import Pe from "./BaseIcon-
|
|
6
|
-
import { u as ze, U as Fe } from "./usePrinter-
|
|
1
|
+
import { useCssVars as ve, ref as d, computed as g, watch as K, onMounted as ce, openBlock as s, createElementBlock as v, normalizeClass as D, createElementVNode as c, normalizeStyle as r, toDisplayString as f, createCommentVNode as h, Fragment as T, renderList as M, createBlock as V, unref as i, createSlots as pe, withCtx as w, renderSlot as A, normalizeProps as fe, guardReactiveProps as be, nextTick as me } from "vue";
|
|
2
|
+
import { u as ge, c as he, t as ye, a as _e, p as $, b as ke, o as xe, e as Q, g as Ce, d as Ie, Y as Se, i as P, f as z, q as we, r as Ae } from "./index-COTjlcVF.js";
|
|
3
|
+
import { u as Z } from "./useNestedProp-CcjyiBlC.js";
|
|
4
|
+
import $e from "./vue-ui-sparkline-LBi6ypp4.js";
|
|
5
|
+
import Pe from "./BaseIcon-DHB44s-g.js";
|
|
6
|
+
import { u as ze, U as Fe } from "./usePrinter-5XpNgqjh.js";
|
|
7
7
|
import { _ as Oe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
const Ne = ["id"], We = { style: { "z-index": "1", "padding-right": "24px" } }, De = ["onClick"], Te = { style: { display: "flex", "flex-direction": "row", gap: "3px", "align-items": "center" } }, Me = ["data-cell"], Ve = {
|
|
9
9
|
dir: "auto",
|
|
@@ -46,9 +46,9 @@ const Ne = ["id"], We = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
46
46
|
customPalette: _e[t.theme] || $
|
|
47
47
|
} : t;
|
|
48
48
|
}
|
|
49
|
-
|
|
49
|
+
K(() => b.config, (t) => {
|
|
50
50
|
e.value = G(), q(), C.value += 1;
|
|
51
|
-
}, { deep: !0 }),
|
|
51
|
+
}, { deep: !0 }), K(() => b.dataset, (t) => {
|
|
52
52
|
x.value = y.value, C.value += 1;
|
|
53
53
|
}, { deep: !0 });
|
|
54
54
|
const { isPrinting: L, isImaging: B, generatePdf: R, generateImage: U } = ze({
|
|
@@ -59,7 +59,7 @@ const Ne = ["id"], We = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
59
59
|
q();
|
|
60
60
|
});
|
|
61
61
|
function q() {
|
|
62
|
-
xe(b.dataset) &&
|
|
62
|
+
xe(b.dataset) && Q({
|
|
63
63
|
componentName: "VueUiTableSparkline",
|
|
64
64
|
type: "dataset"
|
|
65
65
|
});
|
|
@@ -75,7 +75,7 @@ const Ne = ["id"], We = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
75
75
|
datasetObject: t,
|
|
76
76
|
requiredAttributes: ["name", "values"]
|
|
77
77
|
}).forEach((a) => {
|
|
78
|
-
|
|
78
|
+
Q({
|
|
79
79
|
componentName: "VueUiTableSparkline",
|
|
80
80
|
type: "datasetSerieAttribute",
|
|
81
81
|
property: a,
|
|
@@ -136,11 +136,11 @@ const Ne = ["id"], We = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
136
136
|
function ie({ dataIndex: t, serieIndex: u }) {
|
|
137
137
|
m.value = t, _.value = u;
|
|
138
138
|
}
|
|
139
|
-
const
|
|
139
|
+
const Y = d(!1);
|
|
140
140
|
function de(t) {
|
|
141
|
-
|
|
141
|
+
Y.value = t, E.value += 1;
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function J() {
|
|
144
144
|
me(() => {
|
|
145
145
|
const t = [e.value.translations.serie].concat(k.value), u = X.value.map((n, l) => [
|
|
146
146
|
[n.name],
|
|
@@ -158,7 +158,7 @@ const Ne = ["id"], We = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
158
158
|
return ee({
|
|
159
159
|
generatePdf: R,
|
|
160
160
|
generateImage: U,
|
|
161
|
-
generateCsv:
|
|
161
|
+
generateCsv: J,
|
|
162
162
|
restoreOrder: ue
|
|
163
163
|
}), (t, u) => (s(), v("div", {
|
|
164
164
|
ref_key: "tableContainer",
|
|
@@ -253,14 +253,14 @@ const Ne = ["id"], We = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
253
253
|
hasXls: e.value.userOptions.buttons.csv,
|
|
254
254
|
hasImg: e.value.userOptions.buttons.img,
|
|
255
255
|
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
256
|
-
isFullscreen:
|
|
256
|
+
isFullscreen: Y.value,
|
|
257
257
|
titles: { ...e.value.userOptions.buttonTitles },
|
|
258
258
|
chartElement: I.value,
|
|
259
259
|
position: e.value.userOptions.position,
|
|
260
260
|
onToggleFullscreen: de,
|
|
261
261
|
onGeneratePdf: i(R),
|
|
262
262
|
onGenerateImage: i(U),
|
|
263
|
-
onGenerateCsv:
|
|
263
|
+
onGenerateCsv: J
|
|
264
264
|
}, pe({ _: 2 }, [
|
|
265
265
|
t.$slots.optionPdf ? {
|
|
266
266
|
name: "optionPdf",
|