vue-data-ui 2.3.28 → 2.3.29
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/README.md +15 -0
- package/dist/{Arrow-C6lQ94rK.cjs → Arrow-B8z06v67.cjs} +1 -1
- package/dist/{Arrow-BPoxM_Tq.js → Arrow-Bh7WeO_g.js} +1 -1
- package/dist/{BaseIcon-Op8_v5x7.js → BaseIcon-BG_bJS3R.js} +1 -1
- package/dist/{BaseIcon-BK5xYOzV.cjs → BaseIcon-DDCJA3rm.cjs} +1 -1
- package/dist/{DataTable-bEXuvNn5.js → DataTable-CsPidn0_.js} +23 -20
- package/dist/DataTable-Doh_4M84.cjs +1 -0
- package/dist/{Legend-BNfS77GS.cjs → Legend-B20rRwGi.cjs} +1 -1
- package/dist/{Legend-DwludSgp.js → Legend-CkQ_zypV.js} +1 -1
- package/dist/{Shape-COYAxpcP.js → Shape-B4gGeBLI.js} +1 -1
- package/dist/{Shape-CcWWIf-s.cjs → Shape-B8O8_E6l.cjs} +1 -1
- package/dist/{Slicer-DGkm-5p-.cjs → Slicer-BXveU40S.cjs} +1 -1
- package/dist/{Slicer-Cv-2s_-r.js → Slicer-DaEfxscP.js} +1 -1
- package/dist/{Title-DQz9dO4d.cjs → Title-BU6E8Xld.cjs} +1 -1
- package/dist/{Title-CtWGLaoz.js → Title-eBTH8iGJ.js} +1 -1
- package/dist/{Tooltip-D6BUVHr1.js → Tooltip-B11OahTD.js} +1 -1
- package/dist/{Tooltip-DQgBkgFk.cjs → Tooltip-Oicp_EIo.cjs} +1 -1
- package/dist/{index-BhCM2QF1.js → index-BlXzlBwZ.js} +443 -364
- package/dist/index-hKWfT7Wa.cjs +4 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +65 -0
- package/dist/types/vue-data-ui.d.ts +65 -0
- package/dist/{useNestedProp-CH3PVhvc.js → useNestedProp-BoNl5H_z.js} +1 -1
- package/dist/{useNestedProp-C2H2jmU6.cjs → useNestedProp-Cggpoz7e.cjs} +1 -1
- package/dist/{usePrinter-B75HLwzw.js → usePrinter-CZ8F5Cth.js} +1 -1
- package/dist/{usePrinter-DTF28E03.cjs → usePrinter-DoYKBzst.cjs} +1 -1
- package/dist/{vue-data-ui-DdhV5Pth.js → vue-data-ui-BOqzG_nZ.js} +57 -57
- package/dist/{vue-data-ui-cqeqQWwY.cjs → vue-data-ui-CGgiWEo3.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +6 -6
- package/dist/{vue-ui-3d-bar-gi0fEJUl.js → vue-ui-3d-bar-CjnVg4YI.js} +342 -294
- package/dist/vue-ui-3d-bar-CpntMt7p.cjs +19 -0
- package/dist/{vue-ui-accordion-CVrj6roI.cjs → vue-ui-accordion-CTYvdLLH.cjs} +1 -1
- package/dist/{vue-ui-accordion-CSZdj7wA.js → vue-ui-accordion-wHRG3nXl.js} +3 -3
- package/dist/vue-ui-age-pyramid-DDiL1Zje.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-CFSWDX3d.js → vue-ui-age-pyramid-vmCwgRy9.js} +258 -219
- package/dist/{vue-ui-annotator-DqZU11ky.js → vue-ui-annotator-9FGJdNLY.js} +1 -1
- package/dist/{vue-ui-annotator-u5YbenPl.cjs → vue-ui-annotator-DQ3wKf9n.cjs} +1 -1
- package/dist/{vue-ui-candlestick-C3xswSm3.cjs → vue-ui-candlestick-6joQ9JKQ.cjs} +1 -1
- package/dist/{vue-ui-candlestick-Dph2PhZC.js → vue-ui-candlestick-DpMr2r0i.js} +9 -9
- package/dist/{vue-ui-carousel-table-0S6lSZnt.cjs → vue-ui-carousel-table-BV0EOLqU.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-eY08SE2G.js → vue-ui-carousel-table-CgR4ADOz.js} +4 -4
- package/dist/{vue-ui-chestnut-BikYCrjQ.js → vue-ui-chestnut-Ca2878kV.js} +439 -347
- package/dist/vue-ui-chestnut-CxoCcw_B.cjs +6 -0
- package/dist/{vue-ui-cursor-OFgeAFSo.js → vue-ui-cursor-BW8C6oUc.js} +2 -2
- package/dist/{vue-ui-cursor-DUA57VkZ.cjs → vue-ui-cursor-DxF_gXQf.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BTG0m9YL.cjs → vue-ui-dashboard-BGrVyITN.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DA4M1Z0-.js → vue-ui-dashboard-DN4nErBZ.js} +2 -2
- package/dist/{vue-ui-digits-55Zmunkv.js → vue-ui-digits-CmSFSs5S.js} +2 -2
- package/dist/{vue-ui-digits-COxRiMVI.cjs → vue-ui-digits-CpSKBG2c.cjs} +1 -1
- package/dist/vue-ui-donut-BqfRwAIM.js +857 -0
- package/dist/vue-ui-donut-C29yXH3H.cjs +1 -0
- package/dist/vue-ui-donut-evolution-COFG73Xl.cjs +1 -0
- package/dist/vue-ui-donut-evolution-DIR7yBUC.js +839 -0
- package/dist/{vue-ui-dumbbell-BSFT-Bce.cjs → vue-ui-dumbbell-1NA60u3h.cjs} +2 -2
- package/dist/{vue-ui-dumbbell-BtEXt5Ox.js → vue-ui-dumbbell-BASuPAvI.js} +202 -187
- package/dist/{vue-ui-flow-BPEGOFRZ.cjs → vue-ui-flow-DBK7d0DQ.cjs} +1 -1
- package/dist/{vue-ui-flow-BBoXBTkC.js → vue-ui-flow-wq0aqc5r.js} +98 -93
- package/dist/vue-ui-galaxy-BgdVvk4N.cjs +1 -0
- package/dist/{vue-ui-galaxy-ZFEufIyy.js → vue-ui-galaxy-CFQ2hQAl.js} +180 -144
- package/dist/{vue-ui-gauge-CfZ9XJW_.cjs → vue-ui-gauge-C4_kEbgg.cjs} +1 -1
- package/dist/{vue-ui-gauge-BqZp_V5m.js → vue-ui-gauge-CIN265dN.js} +158 -149
- package/dist/vue-ui-gizmo-BpT3iwC9.cjs +1 -0
- package/dist/{vue-ui-gizmo-DitbWAJp.js → vue-ui-gizmo-DRXWEpqU.js} +63 -49
- package/dist/vue-ui-heatmap-CVD7FVfk.cjs +1 -0
- package/dist/vue-ui-heatmap-Dc0ft_Ga.js +644 -0
- package/dist/{vue-ui-kpi-BWuzEkyY.js → vue-ui-kpi-DDL1TvBP.js} +19 -10
- package/dist/{vue-ui-kpi-B2Bo26hh.cjs → vue-ui-kpi-WDZIt76s.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BwAWiK3k.js → vue-ui-mini-loader-B2C5U55l.js} +2 -2
- package/dist/{vue-ui-mini-loader-C_Nb-qVd.cjs → vue-ui-mini-loader-BcGSpUfg.cjs} +1 -1
- package/dist/{vue-ui-molecule-CSbXNrvu.cjs → vue-ui-molecule-C5BmRi2R.cjs} +1 -1
- package/dist/{vue-ui-molecule-BD2UW2lJ.js → vue-ui-molecule-CD3cPNOq.js} +9 -9
- package/dist/{vue-ui-mood-radar-CbMab8pJ.js → vue-ui-mood-radar-D0KbeV5j.js} +213 -187
- package/dist/vue-ui-mood-radar-afS64zg-.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-SDaiotgC.js → vue-ui-nested-donuts-BGoc1RFX.js} +295 -228
- package/dist/vue-ui-nested-donuts-D-TeyOtL.cjs +17 -0
- package/dist/{vue-ui-onion-BamHJBdP.js → vue-ui-onion-B_khL0Kv.js} +230 -196
- package/dist/vue-ui-onion-CFdbWLu3.cjs +1 -0
- package/dist/{vue-ui-parallel-coordinate-plot-BaAa3t1h.cjs → vue-ui-parallel-coordinate-plot-BmXvVt8r.cjs} +2 -2
- package/dist/{vue-ui-parallel-coordinate-plot-1R4CyBdQ.js → vue-ui-parallel-coordinate-plot-CP4V0K8m.js} +87 -87
- package/dist/{vue-ui-quadrant-CKCLhAS7.js → vue-ui-quadrant-C1YbjeI7.js} +455 -397
- package/dist/vue-ui-quadrant-C6-A8Gx_.cjs +1 -0
- package/dist/vue-ui-quick-chart-ConXdEsU.cjs +15 -0
- package/dist/vue-ui-quick-chart-CtWhs_2c.js +1374 -0
- package/dist/{vue-ui-radar-BY-y8Mal.js → vue-ui-radar-B2vAPYa7.js} +237 -214
- package/dist/vue-ui-radar-DMJLLVWb.cjs +1 -0
- package/dist/{vue-ui-rating-DGEgzOaB.cjs → vue-ui-rating-DhZ0tltR.cjs} +1 -1
- package/dist/{vue-ui-rating-Bq1SsByA.js → vue-ui-rating-xGz4av68.js} +9 -9
- package/dist/{vue-ui-relation-circle-BPzLP6U6.js → vue-ui-relation-circle-BQK8wMQE.js} +5 -5
- package/dist/{vue-ui-relation-circle-pdZ79G9r.cjs → vue-ui-relation-circle-hb4Q051h.cjs} +1 -1
- package/dist/vue-ui-rings-D1EW3d4M.cjs +2 -0
- package/dist/{vue-ui-rings-C5ce6pEf.js → vue-ui-rings-ZKjhNx5K.js} +191 -162
- package/dist/{vue-ui-scatter-CMetujXJ.js → vue-ui-scatter-CHONk8k0.js} +437 -381
- package/dist/vue-ui-scatter-CMRe2b2K.cjs +1 -0
- package/dist/{vue-ui-screenshot-BqzljUT3.cjs → vue-ui-screenshot-DcKhT745.cjs} +1 -1
- package/dist/{vue-ui-screenshot--2aeIH_x.js → vue-ui-screenshot-DmGe5ptH.js} +6 -6
- package/dist/{vue-ui-skeleton-_VMQ594N.js → vue-ui-skeleton-CJ2R5R6u.js} +37 -37
- package/dist/{vue-ui-skeleton-B5Z4craS.cjs → vue-ui-skeleton-j-IOiy5w.cjs} +1 -1
- package/dist/{vue-ui-smiley-CL-bubXk.cjs → vue-ui-smiley-D5Jn6d5f.cjs} +1 -1
- package/dist/{vue-ui-smiley-Cty3e_yE.js → vue-ui-smiley-DXVcosKR.js} +2 -2
- package/dist/{vue-ui-spark-trend-DT1fMqf_.cjs → vue-ui-spark-trend-CWH3W7h3.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-pgdWTEqG.js → vue-ui-spark-trend-Gg6TxR4m.js} +63 -58
- package/dist/vue-ui-sparkbar-BsoKTXr2.cjs +1 -0
- package/dist/vue-ui-sparkbar-DUx1qVzQ.js +280 -0
- package/dist/{vue-ui-sparkgauge-DdzlyDsm.cjs → vue-ui-sparkgauge-DPusPoRv.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-Dx2gFX6H.js → vue-ui-sparkgauge-xrvp9g87.js} +60 -50
- package/dist/vue-ui-sparkhistogram---JRg2R1.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-Bg_fJsT5.js → vue-ui-sparkhistogram-DzYXMNj8.js} +99 -90
- package/dist/{vue-ui-sparkline-WMI-RgkW.cjs → vue-ui-sparkline-1Z6GnwoN.cjs} +1 -1
- package/dist/{vue-ui-sparkline-BWl_B6LX.js → vue-ui-sparkline-CGWePkVI.js} +114 -105
- package/dist/{vue-ui-sparkstackbar-Skcshn6g.cjs → vue-ui-sparkstackbar-DCc68t8g.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-MMGRG9eS.js → vue-ui-sparkstackbar-DFgeRAbQ.js} +52 -47
- package/dist/{vue-ui-stackbar-NZFO3R77.js → vue-ui-stackbar-B0dWToaf.js} +211 -196
- package/dist/vue-ui-stackbar-Cz0mT8Mo.cjs +15 -0
- package/dist/{vue-ui-strip-plot-CJmCgC_a.js → vue-ui-strip-plot-BFqd-S7c.js} +213 -198
- package/dist/vue-ui-strip-plot-DZt1Wq20.cjs +1 -0
- package/dist/{vue-ui-table-jJ3daLHe.cjs → vue-ui-table-CMvyMuc4.cjs} +1 -1
- package/dist/{vue-ui-table-B-vHHlRw.js → vue-ui-table-DtwEoIzI.js} +9 -9
- package/dist/{vue-ui-table-heatmap-YCyFyq8J.cjs → vue-ui-table-heatmap-3RSMOHkc.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BfzDb2H7.js → vue-ui-table-heatmap-C8b3pE04.js} +12 -12
- package/dist/vue-ui-table-sparkline-BKOaVFtt.cjs +1 -0
- package/dist/vue-ui-table-sparkline-BrqhBv29.js +467 -0
- package/dist/vue-ui-thermometer-CKgIqM5y.cjs +1 -0
- package/dist/{vue-ui-thermometer-CdtG1AoI.js → vue-ui-thermometer-DMkLvJgE.js} +118 -108
- package/dist/{vue-ui-timer-Cb95XSdn.cjs → vue-ui-timer-D7fvoR77.cjs} +1 -1
- package/dist/{vue-ui-timer-DBqMb9iX.js → vue-ui-timer-RA9yfgBk.js} +8 -8
- package/dist/{vue-ui-tiremarks-CHKETcHr.js → vue-ui-tiremarks-B_EncUi6.js} +79 -71
- package/dist/{vue-ui-tiremarks-BqXfvQ4t.cjs → vue-ui-tiremarks-C7y6Mbxe.cjs} +1 -1
- package/dist/{vue-ui-treemap-DxKunHfW.js → vue-ui-treemap-BuGZgQsr.js} +274 -236
- package/dist/vue-ui-treemap-CfngjVUS.cjs +1 -0
- package/dist/vue-ui-vertical-bar-DKbq4bX4.cjs +4 -0
- package/dist/vue-ui-vertical-bar-T4bFd3JF.js +792 -0
- package/dist/vue-ui-waffle-BJFbhWnA.cjs +1 -0
- package/dist/vue-ui-waffle-CrxmrYsV.js +735 -0
- package/dist/{vue-ui-wheel-kMVi976p.cjs → vue-ui-wheel-BDRvKR1Z.cjs} +1 -1
- package/dist/{vue-ui-wheel-4HKXl04I.js → vue-ui-wheel-DOyC7NgR.js} +73 -65
- package/dist/{vue-ui-word-cloud-CrC3iKGd.js → vue-ui-word-cloud-DBxVNlJ3.js} +7 -7
- package/dist/{vue-ui-word-cloud-WgbYJhMF.cjs → vue-ui-word-cloud-Dmcelg3z.cjs} +1 -1
- package/dist/{vue-ui-xy-BN_H7q0X.js → vue-ui-xy-BIbvJSh2.js} +367 -288
- package/dist/vue-ui-xy-CVKaR90p.cjs +3 -0
- package/dist/vue-ui-xy-canvas-2AaNivzI.cjs +9 -0
- package/dist/{vue-ui-xy-canvas-DAY9Ylzs.js → vue-ui-xy-canvas-CXVni3kC.js} +284 -259
- package/package.json +1 -1
- package/dist/DataTable-B4_9ynlY.cjs +0 -1
- package/dist/index-Y23HeR26.cjs +0 -4
- package/dist/vue-ui-3d-bar-BB6yidY7.cjs +0 -19
- package/dist/vue-ui-age-pyramid-CrTadT86.cjs +0 -1
- package/dist/vue-ui-chestnut-C3XOHDgw.cjs +0 -6
- package/dist/vue-ui-donut-CG3VWjnG.js +0 -751
- package/dist/vue-ui-donut-JA9hlLlV.cjs +0 -1
- package/dist/vue-ui-donut-evolution-CA8sDbwX.js +0 -805
- package/dist/vue-ui-donut-evolution-_E0xUI9Y.cjs +0 -1
- package/dist/vue-ui-galaxy-DPrJum3L.cjs +0 -1
- package/dist/vue-ui-gizmo-CrSaW32p.cjs +0 -1
- package/dist/vue-ui-heatmap-CTRjjhmd.cjs +0 -1
- package/dist/vue-ui-heatmap-zV0pg2Q5.js +0 -606
- package/dist/vue-ui-mood-radar-zpxdsZ4u.cjs +0 -1
- package/dist/vue-ui-nested-donuts-07UI_VlW.cjs +0 -16
- package/dist/vue-ui-onion-DiychUul.cjs +0 -1
- package/dist/vue-ui-quadrant-DxLYb8Mk.cjs +0 -1
- package/dist/vue-ui-quick-chart-CAXuRSdm.js +0 -1318
- package/dist/vue-ui-quick-chart-DgCRM6WA.cjs +0 -13
- package/dist/vue-ui-radar-iETP_3US.cjs +0 -1
- package/dist/vue-ui-rings-DdpKT3DJ.cjs +0 -1
- package/dist/vue-ui-scatter-Dsc6RABP.cjs +0 -1
- package/dist/vue-ui-sparkbar-BVQPOz2O.js +0 -257
- package/dist/vue-ui-sparkbar-kfA-BPVJ.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-B5xstgQG.cjs +0 -1
- package/dist/vue-ui-stackbar-DZ0CArmk.cjs +0 -15
- package/dist/vue-ui-strip-plot-Db_dqjd9.cjs +0 -1
- package/dist/vue-ui-table-sparkline-4Qbmxxsy.cjs +0 -1
- package/dist/vue-ui-table-sparkline-DZt-bo2D.js +0 -420
- package/dist/vue-ui-thermometer-HXWDU2wD.cjs +0 -1
- package/dist/vue-ui-treemap-CW9JmJ2d.cjs +0 -1
- package/dist/vue-ui-vertical-bar-83AMwsHD.cjs +0 -4
- package/dist/vue-ui-vertical-bar-DRLwZjIz.js +0 -745
- package/dist/vue-ui-waffle-BRuDxyDU.js +0 -650
- package/dist/vue-ui-waffle-BwUbvdOE.cjs +0 -1
- package/dist/vue-ui-xy-BXfP5pz5.cjs +0 -3
- package/dist/vue-ui-xy-canvas-NrhVgFsv.cjs +0 -9
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-Y23HeR26.cjs"),k=require("./useNestedProp-C2H2jmU6.cjs"),z=require("./Shape-CcWWIf-s.cjs"),D=require("./vue-ui-skeleton-B5Z4craS.cjs"),F=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0},A={key:1},H=["xmlns","viewBox"],q=["id"],I=["stop-color"],U=["stop-color"],W=["id"],O=["stop-color"],j=["stop-color"],P=["id"],T=["stop-color"],G=["stop-color"],X={key:0},Y=["x","y","height","width","fill","stroke","stroke-width","rx"],R={key:1},J=["x","y","font-size","font-weight","fill"],K=["x","y","font-size","fill"],Q=["x","y","font-size","fill"],Z=["height","width","x","onMouseover","stroke","stroke-width","rx","stroke-dasharray","onClick"],ee={__name:"vue-ui-sparkhistogram",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(b,{emit:_}){const u=b;e.useCssVars(o=>({"17d37044":S.value}));const{vue_ui_sparkhistogram:x}=n.useConfig(),f=e.computed(()=>!!u.dataset&&u.dataset.length);e.onMounted(()=>{n.objectIsEmpty(u.dataset)?n.error({componentName:"VueUiSparkHistogram",type:"dataset"}):u.dataset.forEach((o,s)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["value"]}).forEach(l=>{n.error({componentName:"VueUiSparkHistogram",type:"datasetSerieAttribute",property:l,index:s})})})});const v=e.ref(n.createUid()),t=e.computed(()=>{const o=k.useNestedProp({userConfig:u.config,defaultConfig:x});return o.theme?{...k.useNestedProp({userConfig:n.themes.vue_ui_sparkhistogram[o.theme]||u.config,defaultConfig:o})}:o}),c=e.computed(()=>{const o=t.value.style.layout.height,s=t.value.style.layout.width,l=t.value.style.layout.padding.top,a=o-t.value.style.layout.padding.bottom,d=t.value.style.layout.padding.left,y=s-t.value.style.layout.padding.right,p=l+(o-l-t.value.style.layout.padding.bottom)/2,g=o-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,m=s-t.value.style.layout.padding.left-t.value.style.layout.padding.right;return{bottom:a,centerY:p,drawingHeight:g,drawingWidth:m,height:o,left:d,right:y,top:l,width:s}}),B=e.computed(()=>Math.max(...u.dataset.map(o=>Math.abs(o.value||0))));function $(o){return Math.abs(o)/B.value}const r=e.computed(()=>u.dataset.map((o,s)=>{const l=$(o.value||0),a=c.value.drawingHeight*l,d=c.value.drawingWidth/u.dataset.length,y=d*(t.value.style.bars.gap/100),p=d-y,g=c.value.centerY-a/2,m=c.value.left+(y/2+s*d),N=c.value.left+s*d,h=typeof o.intensity>"u"?100:Math.round(o.intensity*100),w=o.color?o.color:o.value>=0?`${t.value.style.bars.colors.positive}${n.opacity[h]}`:`${t.value.style.bars.colors.negative}${n.opacity[h]}`,C=o.color?o.color:o.value>=0?t.value.style.bars.colors.positive:t.value.style.bars.colors.negative,L=o.color?`url(#gradient_datapoint_${s}_${v.value})`:o.value>=0?`url(#gradient_positive_${s}_${v.value})`:`url(#gradient_negative_${s}_${v.value})`,V=m+p/2;return{...o,color:w,gradient:L,height:a,intensity:h,proportion:l,stroke:C,textAnchor:V,trapX:N,unitWidth:d,width:p,x:m,y:g}})),i=e.ref(null);function E(o,s){_("selectDatapoint",{datapoint:o,index:s})}const S=e.computed(()=>`${t.value.style.animation.speedMs}ms`);return(o,s)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily}`),onMouseleave:s[1]||(s[1]=l=>i.value=null)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:${t.value.style.backgroundColor};margin:0 auto;margin:${t.value.style.title.margin};padding: 0 6px;text-align:${t.value.style.title.textAlign}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),i.value!==null?(e.openBlock(),e.createElementBlock("span",M,"- "+e.toDisplayString(r.value[i.value].timeLabel||"")+" "+e.toDisplayString(t.value.style.labels.value.prefix)+e.toDisplayString(isNaN(r.value[i.value].value)?"":": "+Number(r.value[i.value].value.toFixed(t.value.style.labels.value.rounding)).toLocaleString())+e.toDisplayString(t.value.style.labels.value.suffix),1)):e.createCommentVNode("",!0),e.createTextVNode(),![void 0,null].includes(i.value)&&![null,void 0].includes(r.value[i.value].valueLabel)?(e.openBlock(),e.createElementBlock("span",A,"("+e.toDisplayString(r.value[i.value].valueLabel||0)+")",1)):e.createCommentVNode("",!0)],4),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`font-size:${t.value.style.title.subtitle.fontSize}px;color:${t.value.style.title.subtitle.color};font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${c.value.width} ${c.value.height}`,style:{overflow:"visible"}},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(l,a)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_positive_${a}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(t.value.style.bars.colors.positive,.05)}${e.unref(n.opacity)[l.intensity]}`},null,8,I),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.bars.colors.positive}${e.unref(n.opacity)[l.intensity]}`},null,8,U)],8,q))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(l,a)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_negative_${a}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(t.value.style.bars.colors.negative,.05)}${e.unref(n.opacity)[l.intensity]}`},null,8,O),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.bars.colors.negative}${e.unref(n.opacity)[l.intensity]}`},null,8,j)],8,W))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(l,a)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_datapoint_${a}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(l.color,.05)}${e.unref(n.opacity)[l.intensity]}`},null,8,T),e.createElementVNode("stop",{offset:"100%","stop-color":`${l.color}${e.unref(n.opacity)[l.intensity]}`},null,8,G)],8,P))),256))]),!t.value.style.bars.shape||t.value.style.bars.shape==="square"?(e.openBlock(),e.createElementBlock("g",X,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(l,a)=>(e.openBlock(),e.createElementBlock("rect",{x:l.x,y:l.y,height:l.height,width:l.width,fill:t.value.style.bars.colors.gradient.show?l.gradient:l.color,stroke:l.stroke,"stroke-width":t.value.style.bars.strokeWidth,rx:`${t.value.style.bars.borderRadius*l.proportion/12}%`,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,10,Y))),256))])):(e.openBlock(),e.createElementBlock("g",R,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(l,a)=>(e.openBlock(),e.createBlock(z._sfc_main,{plot:{x:l.x+l.width/2,y:l.y+l.height/2},color:t.value.style.bars.colors.gradient.show?l.gradient:l.color,shape:t.value.style.bars.shape,radius:l.height*.4,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,8,["plot","color","shape","radius","class"]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(l,a)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"middle",x:l.textAnchor,y:l.y-t.value.style.labels.value.fontSize/3+t.value.style.labels.value.offsetY,"font-size":t.value.style.labels.value.fontSize,"font-weight":t.value.style.labels.value.bold?"bold":"normal",fill:t.value.style.labels.value.color},e.toDisplayString(t.value.style.labels.value.prefix)+e.toDisplayString(isNaN(l.value)?"":Number(l.value.toFixed(t.value.style.labels.value.rounding)).toLocaleString())+e.toDisplayString(t.value.style.labels.value.suffix),9,J))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[l.valueLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:l.y+l.height+t.value.style.labels.valueLabel.fontSize,"font-size":t.value.style.labels.valueLabel.fontSize,"text-anchor":"middle",fill:t.value.style.labels.valueLabel.color},e.toDisplayString(l.valueLabel),9,K)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[l.timeLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:c.value.height-t.value.style.labels.timeLabel.fontSize/2,"font-size":t.value.style.labels.timeLabel.fontSize,fill:t.value.style.labels.timeLabel.color,"text-anchor":"middle"},e.toDisplayString(l.timeLabel),9,Q)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{height:c.value.height,width:l.unitWidth,fill:"transparent",x:l.trapX,y:0,onMouseover:d=>i.value=a,onMouseleave:s[0]||(s[0]=d=>i.value=null),stroke:i.value!==null&&i.value===a?t.value.style.selector.stroke:"","stroke-width":i.value!==null&&i.value===a?t.value.style.selector.strokeWidth:0,rx:t.value.style.selector.borderRadius,"stroke-dasharray":t.value.style.selector.strokeDasharray,onClick:()=>E(l,a)},null,40,Z)]))),256))],8,H)):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(D.default,{key:2,config:{type:"sparkHistogram",style:{backgroundColor:t.value.style.backgroundColor,sparkHistogram:{color:"#CCCCCC"}}}},null,8,["config"]))],36))}},te=F._export_sfc(ee,[["__scopeId","data-v-12e37596"]]);exports.default=te;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-Y23HeR26.cjs"),ae=require("./useNestedProp-C2H2jmU6.cjs"),le=require("./useResponsive-B3TrDDIG.cjs"),oe=require("./usePrinter-DTF28E03.cjs"),pe=require("./Slicer-DGkm-5p-.cjs"),be=require("./Tooltip-DQgBkgFk.cjs"),fe=require("./Title-DQz9dO4d.cjs"),ke=require("./Legend-BNfS77GS.cjs"),xe=require("./vue-ui-accordion-CVrj6roI.cjs"),Ce=require("./DataTable-B4_9ynlY.cjs"),we=require("./vue-ui-skeleton-B5Z4craS.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=["id"],$e=["xmlns","viewBox"],Le={key:0},Ne=["id"],ze=["stop-color"],_e=["stop-color"],Te=["stop-color"],Ee=["x1","x2","y1","y2","stroke"],Ve=["x1","x2","y1","y2","stroke"],Re=["d","fill","stroke","stroke-width"],Pe=["x1","x2","y1","y2","stroke","stroke-width"],Fe=["x1","x2","y1","y2","stroke","stroke-width"],Me=["x","y","font-size","fill","font-weight"],De=["transform","font-size","fill","font-weight"],Oe=["x","y","font-size","fill","font-weight"],qe={key:0},Ae=["x","y","font-size","font-weight","fill"],He=["x1","x2","y1","y2","stroke"],Ie=["x","y","font-size","font-weight","fill"],Ue=["text-anchor","font-size","font-weight","fill","transform"],We=["x","y","width","height","onClick","onMouseenter","fill"],Ge={key:3,class:"vue-data-ui-watermark"},Ye=["onClick"],Xe=["innerHTML"],Je={__name:"vue-ui-stackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint","selectLegend"],setup(F,{expose:re,emit:M}){const b=F,{vue_ui_stackbar:se}=i.useConfig(),C=e.computed({get(){return!!b.dataset&&b.dataset.length},set(l){return l}}),B=e.ref(null),_=e.ref(i.createUid()),T=e.ref(!1),D=e.ref(null),E=e.ref(""),p=e.ref([]),O=e.ref(0),q=e.ref(null),A=e.ref(null),H=e.ref(null),I=e.ref(0),V=e.ref(!1),R=e.ref(null);e.onMounted(()=>{i.objectIsEmpty(b.dataset)?i.error({componentName:"VueUiStackbar",type:"dataset"}):b.dataset.forEach((l,o)=>{i.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","series"]}).forEach(a=>{C.value=!1,i.error({componentName:"VueUiStackbar",type:"datasetSerieAttribute",property:a,index:o})})})});const t=e.computed(()=>{const l=ae.useNestedProp({userConfig:b.config,defaultConfig:se});return l.theme?{...ae.useNestedProp({userConfig:i.themes.vue_ui_stackbar[l.theme]||b.config,defaultConfig:l}),customPalette:i.themePalettes[l.theme]||i.palette}:l}),y=e.ref({dataLabels:{show:t.value.style.chart.bars.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),{isPrinting:U,isImaging:W,generatePdf:G,generateImage:Y}=oe.usePrinter({elementId:`stackbar_${_.value}`,fileName:t.value.style.chart.title.text||"vue-ui-stackbar"}),$=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,paddingRatio:{top:t.value.style.chart.padding.top/t.value.style.chart.height,right:t.value.style.chart.padding.right/t.value.style.chart.width,bottom:t.value.style.chart.padding.bottom/t.value.style.chart.height,left:t.value.style.chart.padding.left/t.value.style.chart.width}}),ne=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),X=e.ref(null);e.onMounted(()=>{if(t.value.responsive){const l=le.throttle(()=>{const{width:o,height:a}=le.useResponsive({chart:B.value,title:t.value.style.chart.title.text?q.value:null,legend:t.value.style.chart.legend.show?A.value:null,slicer:t.value.style.chart.zoom.show&&L.value>1?H.value:null});$.value.width=o,$.value.height=a});X.value=new ResizeObserver(l),X.value.observe(B.value.parentNode)}});const n=e.computed(()=>{const{height:l,width:o}=$.value,{right:a}=$.value.paddingRatio,s=t.value.style.chart.padding.top,r=o-o*a,u=l-t.value.style.chart.padding.bottom,v=t.value.style.chart.padding.left,g=o-v-o*a,m=l-s-t.value.style.chart.padding.bottom;return{chartHeight:l,chartWidth:o,top:s,right:r,bottom:u,left:v,width:g,height:m}}),w=e.computed(()=>b.dataset.map((l,o)=>{const a=i.convertColorToHex(l.color)||ne.value[o]||i.palette[o]||i.palette[o%i.palette.length];return{...l,absoluteIndex:o,id:i.createUid(),color:a}})),L=e.computed(()=>Math.max(...w.value.filter(l=>!p.value.includes(l.id)).map(l=>l.series.length))),c=e.ref({start:0,end:Math.max(...b.dataset.map(l=>l.series.length))});function ue(){c.value={start:0,end:Math.max(...b.dataset.map(l=>l.series.length))},I.value+=1}const h=e.computed(()=>{const l=n.value.width/(c.value.end-c.value.start);return l<=0?0:l}),x=e.computed(()=>i.sumSeries(w.value.filter(l=>!p.value.includes(l.id))).slice(c.value.start,c.value.end)),P=e.computed(()=>{const l=Math.max(...x.value),o=i.calculateNiceScale(0,l,t.value.style.chart.grid.scale.ticks);return o.ticks.map(a=>({y:n.value.bottom-n.value.height*(a/o.max),x:n.value.left-8,value:a}))}),N=e.computed(()=>t.value.style.chart.grid.x.timeLabels.values.slice(c.value.start,c.value.end)),d=e.computed(()=>{if(!C.value)return[];let l=Array(L.value).fill(0);const o=n.value.height,a=Math.max(...x.value),r=i.calculateNiceScale(0,a,t.value.style.chart.grid.scale.ticks).max;return w.value.filter(u=>!p.value.includes(u.id)).map(u=>{const v=u.series.slice(c.value.start,c.value.end);return{...u,proportions:v.map((g,m)=>t.value.style.chart.bars.distributed?(g||0)/x.value[m]:(g||0)/r),series:v,x:v.map((g,m)=>n.value.left+h.value*m+h.value*t.value.style.chart.bars.gapRatio/4),y:v.map((g,m)=>{const f=t.value.style.chart.bars.distributed?(g||0)/x.value[m]:(g||0)/r,S=o*f,k=o-S-l[m];return l[m]+=S,k+n.value.top}),height:v.map((g,m)=>{const f=t.value.style.chart.bars.distributed?(g||0)/x.value[m]:(g||0)/r;return o*f<=0?0:o*f})}})}),ie=e.computed(()=>{const l=Math.max(...x.value),a=i.calculateNiceScale(0,l,t.value.style.chart.grid.scale.ticks).max;return x.value.map((s,r)=>({value:s,y:(1-s/a)*n.value.height}))});function J(l){return i.dataLabel({p:t.value.style.chart.bars.dataLabels.prefix,v:l,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.style.chart.bars.dataLabels.rounding})}function ce(l){return i.dataLabel({v:l,s:"%",r:t.value.style.chart.bars.dataLabels.rounding})}function de(l){const o=JSON.parse(JSON.stringify(d.value)).map(a=>({name:a.name,value:a.series[l]===0?0:a.series[l]||null,proportion:a.proportions[l]||null,color:a.color,id:a.id}));M("selectDatapoint",{datapoint:o,period:N.value[l]})}function ve(l){R.value=l,T.value=!0;const o=t.value.style.chart.tooltip.customFormat,a=JSON.parse(JSON.stringify(d.value)).map(r=>({name:r.name,value:r.series[l]===0?0:r.series[l]||null,proportion:r.proportions[l]||null,color:r.color,id:r.id})),s=a.map(r=>r.value).reduce((r,u)=>r+u,0);if(i.isFunction(o)&&i.functionReturnsString(()=>o({seriesIndex:l,datapoint:a,series:d.value,config:t.value})))E.value=o({seriesIndex:l,datapoint:a,series:d.value,config:t.value});else{const{showValue:r,showPercentage:u,borderColor:v,roundingValue:g,roundingPercentage:m}=t.value.style.chart.tooltip;let f="";N.value[l]&&(f+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${v};padding-bottom:6px;margin-bottom:3px;">${N.value[l]}</div>`);const S=[r&&u?"(":"",r&&u?")":""];a.reverse().forEach(k=>{f+=`
|
|
2
|
-
<div style="display:flex;flex-direction:row;align-items:center;gap:4px">
|
|
3
|
-
<svg viewBox="0 0 12 12" height="14" width="14"><rect rx="1" x="0" y="0" height="12" width="12" stroke="none" fill="${t.value.style.chart.bars.gradient.show?`url(#gradient_${k.id})`:k.color}"/></svg>
|
|
4
|
-
${k.name}${r||u?":":""} ${r?i.dataLabel({p:t.value.style.chart.bars.dataLabels.prefix,v:k.value,s:t.value.style.chart.bars.dataLabels.suffix,r:g}):""} ${S[0]}${u?i.dataLabel({v:isNaN(k.value/s)?0:k.value/s*100,s:"%",r:m}):""}${S[1]}
|
|
5
|
-
</div>
|
|
6
|
-
`}),E.value=`<div>${f}</div>`}}function he(l){V.value=l,O.value+=1}function K(){y.value.showTable=!y.value.showTable}function Q(){y.value.dataLabels.show=!y.value.dataLabels.show}function Z(){y.value.showTooltip=!y.value.showTooltip}function ge(){return d.value}const j=e.computed(()=>{if(d.value.length===0)return{head:[],body:[],config:{},columnNames:[]};const l=d.value.map(({name:a,color:s})=>({label:a,color:s})),o=[];for(let a=c.value.start;a<c.value.end;a+=1){const s=[t.value.style.chart.grid.x.timeLabels.values[a]||a+1];w.value.forEach(r=>{s.push(Number((r.series[a]||0).toFixed(t.value.table.td.roundingValue)))}),o.push(s)}return{head:l,body:o}});function ee(){const l=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=["",...j.value.head.map(u=>u.label)],a=j.value.body,s=l.concat([o]).concat(a),r=i.createCsvContent(s);i.downloadCsv({csvContent:r,title:t.value.style.chart.title.text||"vue-ui-stackbar"})}const z=e.computed(()=>{const l=[""].concat(d.value.map(r=>r.name)).concat(' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>');let o=[];for(let r=0;r<L.value;r+=1){const u=d.value.map(v=>v.series[r]??0).reduce((v,g)=>v+g,0);o.push([t.value.style.chart.grid.x.timeLabels.values.slice(c.value.start,c.value.end)[r]??r+1].concat(d.value.map(v=>(v.series[r]??0).toFixed(t.value.table.rounding))).concat((u??0).toFixed(t.value.table.rounding)))}const 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},s=[t.value.table.columnNames.period].concat(d.value.map(r=>r.name)).concat(t.value.table.columnNames.total);return{head:l,body:o.slice(0,c.value.end-c.value.start),config:a,colNames:s}});function me(l,o){if(M("selectLegend",d.value.find(a=>a.absoluteIndex===l)),p.value.includes(o.id))p.value=p.value.filter(a=>a!==o.id);else{if(p.value.length===w.value.length-1)return;p.value.push(o.id)}}const te=e.computed(()=>w.value.map((l,o)=>({...l,shape:"square"})).map(l=>({...l,opacity:p.value.includes(l.id)?.5:1,segregate:()=>me(l.absoluteIndex,l),isSegregated:p.value.includes(l.id)}))),ye=e.computed(()=>({cy:"stackbar-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));return re({getData:ge,generatePdf:G,generateCsv:ee,generateImage:Y,toggleTable:K,toggleLabels:Q,toggleTooltip:Z}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{id:`stackbar_${_.value}`,ref_key:"stackbarChart",ref:B,class:e.normalizeClass({"vue-ui-stackbar":!0,"vue-data-ui-wrapper-fullscreen":V.value}),style:e.normalizeStyle(`background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}; position: relative; ${t.value.responsive?"height: 100%":""}`)},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:q,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(fe._sfc_main,{config:{title:{cy:"stackbar-title",...t.value.style.chart.title},subtitle:{cy:"stackbar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&C.value?(e.openBlock(),e.createBlock(oe.UserOptions,{ref:"details",key:`user_option_${O.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(W),uid:_.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:V.value,chartElement:B.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},onToggleFullscreen:he,onGeneratePdf:e.unref(G),onGenerateCsv:ee,onGenerateImage:e.unref(Y),onToggleTable:K,onToggleLabels:Q,onToggleTooltip:Z},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:s})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:s})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","chartElement","isTooltip","titles","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(i.XMLNS),viewBox:`0 0 ${n.value.chartWidth<=0?10:n.value.chartWidth} ${n.value.chartHeight<=0?10:n.value.chartHeight}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[t.value.style.chart.bars.gradient.show?(e.openBlock(),e.createElementBlock("defs",Le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,s)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`gradient_${a.id}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,ze),e.createElementVNode("stop",{offset:"61.8%","stop-color":e.unref(i.lightenHexColor)(a.color,t.value.style.chart.bars.gradient.intensity/100)},null,8,_e),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Te)],8,Ne))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.x.showHorizontalLines?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(P.value,(a,s)=>(e.openBlock(),e.createElementBlock("line",{x1:n.value.left,x2:n.value.right,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":1},null,8,Ee))),256)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.showVerticalLines?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(c.value.end-c.value.start+1,(a,s)=>(e.openBlock(),e.createElementBlock("line",{x1:n.value.left+h.value*s,x2:n.value.left+h.value*s,y1:n.value.top,y2:n.value.bottom,stroke:t.value.style.chart.grid.y.axisColor,"stroke-width":1},null,8,Ve))),256)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,s)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.x,(r,u)=>(e.openBlock(),e.createElementBlock("path",{d:s===d.value.length-1&&d.value.at(-1).series[u]||!d.value.at(-1).series[u]&&s<d.value.length-1&&d.value[s].series[u]&&!d.value[s+1].series[u]?`M ${r},${a.y[u]}
|
|
7
|
-
h ${h.value*(1-t.value.style.chart.bars.gapRatio/2)-t.value.style.chart.bars.borderRadius}
|
|
8
|
-
a ${t.value.style.chart.bars.borderRadius},${t.value.style.chart.bars.borderRadius} 0 0 1 ${t.value.style.chart.bars.borderRadius},${t.value.style.chart.bars.borderRadius}
|
|
9
|
-
v ${a.height[u]-t.value.style.chart.bars.borderRadius<0?0:a.height[u]-t.value.style.chart.bars.borderRadius}
|
|
10
|
-
h -${h.value*(1-t.value.style.chart.bars.gapRatio/2)}
|
|
11
|
-
v -${a.height[u]-t.value.style.chart.bars.borderRadius<0?0:a.height[u]-t.value.style.chart.bars.borderRadius}
|
|
12
|
-
a ${t.value.style.chart.bars.borderRadius},${t.value.style.chart.bars.borderRadius} 0 0 1 ${t.value.style.chart.bars.borderRadius},-${t.value.style.chart.bars.borderRadius} z`:`M ${r},${a.y[u]}
|
|
13
|
-
h ${h.value*(1-t.value.style.chart.bars.gapRatio/2)}
|
|
14
|
-
v ${a.height[u]<0?0:a.height[u]}
|
|
15
|
-
h -${h.value*(1-t.value.style.chart.bars.gapRatio/2)} z`,fill:t.value.style.chart.bars.gradient.show?`url(#gradient_${a.id})`:a.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.bars.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-data-ui-bar-animated":t.value.useCssAnimation})},null,10,Re))),256))]))),256)),t.value.style.chart.grid.x.showAxis?(e.openBlock(),e.createElementBlock("line",{key:3,x1:n.value.left,x2:n.value.right,y1:n.value.bottom,y2:n.value.bottom,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":t.value.style.chart.grid.x.axisThickness,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,Pe)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.showAxis&&!t.value.style.chart.bars.distributed?(e.openBlock(),e.createElementBlock("line",{key:4,x1:n.value.left,x2:n.value.left,y1:n.value.top,y2:n.value.bottom,stroke:t.value.style.chart.grid.y.axisColor,"stroke-width":t.value.style.chart.grid.y.axisThickness,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,Fe)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.axisName.show&&t.value.style.chart.grid.x.axisName.text?(e.openBlock(),e.createElementBlock("text",{key:5,x:n.value.left+n.value.width/2,y:n.value.chartHeight+t.value.style.chart.grid.x.axisName.offsetY,"font-size":t.value.style.chart.grid.x.axisName.fontSize,fill:t.value.style.chart.grid.x.axisName.color,"font-weight":t.value.style.chart.grid.x.axisName.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.grid.x.axisName.text),9,Me)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.axisName.show&&t.value.style.chart.grid.y.axisName.text?(e.openBlock(),e.createElementBlock("text",{key:6,transform:`translate(${t.value.style.chart.grid.y.axisName.fontSize+t.value.style.chart.grid.y.axisName.offsetX}, ${n.value.top+n.value.height/2}) rotate(-90)`,"font-size":t.value.style.chart.grid.y.axisName.fontSize,fill:t.value.style.chart.grid.y.axisName.color,"font-weight":t.value.style.chart.grid.y.axisName.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.grid.y.axisName.text),9,De)):e.createCommentVNode("",!0),y.value.dataLabels.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,s)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.x,(r,u)=>(e.openBlock(),e.createElementBlock("text",{x:r+h.value*(1-t.value.style.chart.bars.gapRatio/2)/2,y:a.y[u]+a.proportions[u]*n.value.height/2+t.value.style.chart.bars.dataLabels.fontSize/3,"font-size":t.value.style.chart.bars.dataLabels.fontSize,fill:t.value.style.chart.bars.dataLabels.adaptColorToBackground?e.unref(i.adaptColorToBackground)(a.color):t.value.style.chart.bars.dataLabels.color,"font-weight":t.value.style.chart.bars.dataLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.bars.showDistributedPercentage&&t.value.style.chart.bars.distributed?ce(a.proportions[u]*100):J(a.series[u])),9,Oe))),256))]))),256)),t.value.style.chart.bars.totalValues.show&&d.value.length>1?(e.openBlock(),e.createElementBlock("g",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ie.value,(a,s)=>(e.openBlock(),e.createElementBlock("text",{x:n.value.left+h.value*s+h.value/2,y:(t.value.style.chart.bars.distributed?n.value.top-t.value.style.chart.bars.totalValues.fontSize/3:a.y)+t.value.style.chart.bars.totalValues.offsetY,"text-anchor":"middle","font-size":t.value.style.chart.bars.totalValues.fontSize,"font-weight":t.value.style.chart.bars.totalValues.bold?"bold":"normal",fill:t.value.style.chart.bars.totalValues.color},e.toDisplayString(J(a.value)),9,Ae))),256))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.axisLabels.show&&!t.value.style.chart.bars.distributed?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,(a,s)=>(e.openBlock(),e.createElementBlock("line",{x1:n.value.left,x2:n.value.left-6,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":1},null,8,He))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,(a,s)=>(e.openBlock(),e.createElementBlock("text",{x:a.x,y:a.y+t.value.style.chart.grid.y.axisLabels.fontSize/3,"font-size":t.value.style.chart.grid.y.axisLabels.fontSize,"font-weight":t.value.style.chart.grid.y.axisLabels.bold?"bold":"normal",fill:t.value.style.chart.grid.y.axisLabels.color,"text-anchor":"end"},e.toDisplayString(e.unref(i.dataLabel)({p:t.value.style.chart.bars.dataLabels.prefix,v:a.value,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.style.chart.grid.y.axisLabels.rounding})),9,Ie))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.timeLabels.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:9},e.renderList(N.value,(a,s)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":t.value.style.chart.grid.x.timeLabels.rotation>0?"start":t.value.style.chart.grid.x.timeLabels.rotation<0?"end":"middle","font-size":t.value.style.chart.grid.x.timeLabels.fontSize,"font-weight":t.value.style.chart.grid.x.timeLabels.bold?"bold":"normal",fill:t.value.style.chart.grid.x.timeLabels.color,transform:`translate(${n.value.left+h.value*s+h.value/2}, ${n.value.bottom+t.value.style.chart.grid.x.timeLabels.fontSize*1.3+t.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${t.value.style.chart.grid.x.timeLabels.rotation})`},e.toDisplayString(a),9,Ue))),256)):e.createCommentVNode("",!0),y.value.showTooltip?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:10},e.renderList(c.value.end-c.value.start,(a,s)=>(e.openBlock(),e.createElementBlock("rect",{x:n.value.left+s*h.value,y:n.value.top,width:h.value,height:n.value.height,onClick:r=>de(s),onMouseenter:r=>ve(s),onMouseleave:o[0]||(o[0]=r=>{R.value=null,T.value=!1}),fill:s===R.value?t.value.style.chart.highlighter.color+e.unref(i.opacity)[t.value.style.chart.highlighter.opacity]:"transparent"},null,40,We))),256)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",e.normalizeProps(e.guardReactiveProps({...n.value})),void 0,!0)],12,$e)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(W)})),void 0,!0)])):e.createCommentVNode("",!0),C.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(we.default,{key:4,config:{type:"bar",style:{backgroundColor:t.value.style.chart.backgroundColor,bar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartSlicer",ref:H,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&L.value>1?(e.openBlock(),e.createBlock(pe.Slicer,{key:`slicer_${I.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.grid.x.timeLabels.values[c.value.start]?t.value.style.chart.grid.x.timeLabels.values[c.value.start]:"",labelRight:t.value.style.chart.grid.x.timeLabels.values[c.value.end-1]?t.value.style.chart.grid.x.timeLabels.values[c.value.end-1]:"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:Math.max(...F.dataset.map(a=>a.series.length)),min:0,valueStart:c.value.start,valueEnd:c.value.end,start:c.value.start,"onUpdate:start":o[1]||(o[1]=a=>c.value.start=a),end:c.value.end,"onUpdate:end":o[2]||(o[2]=a=>c.value.end=a),onReset:ue},{"reset-action":e.withCtx(({reset:a})=>[e.renderSlot(l.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:a})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end"])):e.createCommentVNode("",!0)],4),e.createVNode(be._sfc_main,{show:y.value.showTooltip&&T.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:B.value,content:E.value,isCustom:e.unref(i.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),e.createElementVNode("div",{ref_key:"chartLegend",ref:A},[t.value.style.chart.legend.show&&C.value?(e.openBlock(),e.createBlock(ke.Legend,{key:0,legendSet:te.value,config:ye.value,onClickMarker:o[3]||(o[3]=({legend:a})=>a.segregate())},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:s=>a.segregate(),style:e.normalizeStyle(`opacity:${p.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name),13,Ye)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:te.value},void 0,!0)],512),c.value.end-c.value.start<200?(e.openBlock(),e.createBlock(xe.default,{key:5,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(Ce.DataTable,{colNames:z.value.colNames,head:z.value.head,body:z.value.body,config:z.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[4]||(o[4]=a=>y.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a},null,8,Xe)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Se))}},Ke=Be._export_sfc(Je,[["__scopeId","data-v-5aeb6468"]]);exports.default=Ke;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Y23HeR26.cjs"),j=require("./useResponsive-B3TrDDIG.cjs"),re=require("./Title-DQz9dO4d.cjs"),X=require("./usePrinter-DTF28E03.cjs"),se=require("./Tooltip-DQgBkgFk.cjs"),ne=require("./DataTable-B4_9ynlY.cjs"),ue=require("./vue-ui-skeleton-B5Z4craS.cjs"),ie=require("./Shape-CcWWIf-s.cjs"),ce=require("./vue-ui-accordion-CVrj6roI.cjs"),Y=require("./useNestedProp-C2H2jmU6.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),de=["id"],he=["xmlns","viewBox"],pe={key:0},me={key:0},fe=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ye={key:1},be=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ge=["x1","x2","y1","y2","stroke","stroke-width"],ke=["x1","x2","y1","y2","stroke","stroke-width"],xe=["x","y","fill","font-size"],Ce=["x","y","font-size","fill"],we=["fill","font-size","transform"],Be=["fill","font-size","x","y"],_e=["x1","x2","y1","y2","stroke"],$e=["cx","cy","fill"],Ne=["cx","cy","fill"],Se=["id"],Le=["stop-color"],Te=["stop-color"],Pe=["stop-color"],Ee={key:0},ze=["x","y","font-size","fill"],Ve={key:3,class:"vue-data-ui-watermark"},Ae=["innerHTML"],Fe={__name:"vue-ui-strip-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(J,{expose:K,emit:Q}){const d=J,{vue_ui_strip_plot:Z}=r.useConfig(),p=e.computed({get(){return!!d.dataset&&d.dataset.length},set(l){return l}}),L=e.ref(r.createUid()),V=e.ref(0),T=e.ref(!1),P=e.ref(""),b=e.ref(null),A=e.ref(null),F=e.ref(!1),t=e.computed(()=>{const l=Y.useNestedProp({userConfig:d.config,defaultConfig:Z});return l.theme?{...Y.useNestedProp({userConfig:r.themes.vue_ui_strip_plot[l.theme]||d.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),C=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(d.dataset)?r.error({componentName:"VueUiStripPlot",type:"dataset"}):d.dataset.forEach((l,s)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","plots"]}).forEach(a=>{p.value=!1,r.error({componentName:"VueUiStripPlot",type:"datasetSerieAttribute",property:a,index:s})}),l.plots&&l.plots.forEach((a,n)=>{r.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","value"]}).forEach(u=>{p.value=!1,r.error({componentName:"VueUiStripPlot",type:"datasetSerieAttribute",property:u,index:`${s},${n}`})})})}),t.value.responsive){const l=j.throttle(()=>{const{width:s,height:a}=j.useResponsive({chart:b.value,title:t.value.style.chart.title.text?A.value:null});w.value=a,f.value.width=s,f.value.height=a,k.value=(s-v.value.left-v.value.right)/d.dataset.length,B.value=r.translateSize({relator:Math.min(a,s),adjuster:600,source:t.value.style.chart.plots.radius,threshold:6,fallback:6})});C.value=new ResizeObserver(l),C.value.observe(b.value.parentNode)}F.value=!0,setTimeout(()=>{g.value=!1},ee.value*50)}),e.onBeforeUnmount(()=>{C.value&&C.value.disconnect()});const{isPrinting:O,isImaging:D,generatePdf:M,generateImage:W}=X.usePrinter({elementId:`strip-plot_${L.value}`,fileName:t.value.style.chart.title.text||"vue-ui-strip-plot"}),I=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),g=e.ref(t.value.useCssAnimation),c=e.ref({showTable:t.value.table.show,dataLabels:{show:t.value.style.chart.labels.bestPlotLabel.show},showTooltip:t.value.style.chart.tooltip.show}),v=e.ref({top:t.value.style.chart.padding.top,bottom:t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right}),k=e.ref(t.value.style.chart.stripWidth),w=e.ref(t.value.style.chart.height),B=e.ref(t.value.style.chart.plots.radius),f=e.ref({width:k.value*d.dataset.length+v.value.left+v.value.right,height:t.value.style.chart.height}),o=e.computed(()=>{const l=k.value*d.dataset.length+v.value.left+v.value.right;return{left:v.value.left,right:l-v.value.right,top:v.value.top,bottom:w.value-v.value.bottom,width:k.value*d.dataset.length,height:w.value-v.value.top-v.value.bottom,stripWidth:k.value,absoluteHeight:w.value,absoluteWidth:l}}),_=e.computed(()=>p.value?d.dataset.map((l,s)=>{const a=r.createUid();return{...l,id:a,color:l.color?r.convertColorToHex(l.color):I.value[s]||r.palette[s]||r.palette[s%r.palette.length],plots:l.plots.map(n=>({...n,parentId:a,color:l.color?r.convertColorToHex(l.color):I.value[s]||r.palette[s]||r.palette[s%r.palette.length],id:r.createUid()})).sort((n,u)=>n.value-u.value)}}):null),h=e.computed(()=>(_.value||[]).map((l,s)=>({...l,plots:l.plots.map(a=>({...a,x:o.value.left+(s+1)*o.value.stripWidth-o.value.stripWidth/2}))}))),ee=e.computed(()=>Math.max(...h.value.map(l=>l.plots.length))),E=e.computed(()=>{const l=h.value.flatMap(s=>s.plots.map(a=>a.value));return{max:Math.max(...l),min:Math.min(...l)}}),m=e.computed(()=>r.calculateNiceScale(E.value.min<0?E.value.min:0,E.value.max,t.value.style.chart.grid.scaleSteps)),te=e.computed(()=>(h.value||[]).map((l,s)=>({...l,plots:l.plots.map(a=>({...a,y:o.value.bottom-(a.value+Math.abs(m.value.min))/(m.value.max+Math.abs(m.value.min))*o.value.height}))}))),G=e.computed(()=>m.value.ticks.map(l=>({y:o.value.bottom-o.value.height*((l+Math.abs(m.value.min))/(m.value.max+Math.abs(m.value.min))),x1:o.value.left,x2:o.value.right,value:l}))),z=e.ref(null),i=e.ref(null);function le({datapoint:l,seriesIndex:s}){z.value={datapoint:l,seriesIndex:s,config:t.value,series:_.value},T.value=!0,i.value=l;const a=t.value.style.chart.tooltip.customFormat;if(r.isFunction(a)&&r.functionReturnsString(()=>a({seriesIndex:s,datapoint:l,series:_.value,config:t.value})))P.value=a({seriesIndex:s,datapoint:l,series:_.value,config:t.value});else{let n="";n+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${t.value.style.chart.plots.gradient.show?`url(#${l.parentId})`:l.color}"/></svg>${l.name}</div>`,n+=`<div>${r.dataLabel({p:t.value.style.chart.labels.prefix,v:l.value,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.tooltip.roundingValue})}</div>`,P.value=`<div>${n}</div>`}}const $=e.computed(()=>{const l=h.value.flatMap(a=>JSON.parse(JSON.stringify(a.plots)).sort((n,u)=>u.value-n.value).map(n=>({name:`${a.name} - ${n.name}`,color:n.color}))),s=h.value.flatMap(a=>JSON.parse(JSON.stringify(a.plots)).sort((n,u)=>u.value-n.value).map(n=>n.value));return{head:l,body:s}});function q(){e.nextTick(()=>{const l=$.value.head.map((n,u)=>[[n.name],[$.value.body[u]]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.value]]].concat(l),a=r.createCsvContent(s);r.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-strip-plot"})})}const N=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value],s=$.value.head.map((u,y)=>{const S=r.dataLabel({p:t.value.style.chart.labels.prefix,v:$.value.body[y],s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue});return[{color:u.color,name:u.name},S]}),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:l,body:s,config:a}}),x=e.ref(!1);function ae(l){x.value=l,V.value+=1}function oe(){return h.value}function R(){c.value.showTable=!c.value.showTable}function U(){c.value.dataLabels.show=!c.value.dataLabels.show}function H(){c.value.showTooltip=!c.value.showTooltip}return K({getData:oe,generatePdf:M,generateCsv:q,generateImage:W,toggleTable:R,toggleLabels:U,toggleTooltip:H}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"stripPlotChart",ref:b,class:e.normalizeClass(`vue-ui-strip-plot ${x.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`strip-plot_${L.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:A,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(re._sfc_main,{config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&p.value?(e.openBlock(),e.createBlock(X.UserOptions,{ref:"details",key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(O),isImaging:e.unref(D),uid:L.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:c.value.showTooltip,isFullscreen:x.value,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,onToggleFullscreen:ae,onGeneratePdf:e.unref(M),onGenerateCsv:q,onGenerateImage:e.unref(W),onToggleTable:R,onToggleLabels:U,onToggleTooltip:H},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${f.value.width<=0?10:f.value.width} ${f.value.height<=0?10:f.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};`)},[t.value.style.chart.grid.show?(e.openBlock(),e.createElementBlock("g",pe,[t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G.value,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray,"stroke-linecap":"round"},null,8,fe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,n)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left+(n+1)*o.value.stripWidth,x2:o.value.left+(n+1)*o.value.stripWidth,y1:o.value.top,y2:o.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray,"stroke-linecap":"round"},null,8,be))),256))])):e.createCommentVNode("",!0),e.createElementVNode("line",{x1:o.value.left,x2:o.value.left,y1:o.value.top,y2:o.value.bottom,stroke:t.value.style.chart.grid.stroke,"stroke-width":t.value.style.chart.grid.strokeWidth,"stroke-linecap":"round"},null,8,ge),e.createElementVNode("line",{x1:o.value.left,x2:o.value.right,y1:o.value.bottom,y2:o.value.bottom,stroke:t.value.style.chart.grid.stroke,"stroke-width":t.value.style.chart.grid.strokeWidth,"stroke-linecap":"round"},null,8,ke)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(G.value,a=>(e.openBlock(),e.createElementBlock("text",{x:a.x1-t.value.style.chart.labels.yAxisLabels.fontSize/2+t.value.style.chart.labels.yAxisLabels.offsetX,y:a.y+t.value.style.chart.labels.yAxisLabels.fontSize/3,fill:t.value.style.chart.labels.yAxisLabels.color,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,"text-anchor":"end"},e.toDisplayString(e.unref(r.dataLabel)({p:t.value.style.chart.labels.prefix,v:a.value,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.yAxisLabels.rounding})),9,xe))),256)):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(h.value,(a,n)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left+(n+1)*o.value.stripWidth-o.value.stripWidth/2,y:o.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize*2+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"text-anchor":"middle"},e.toDisplayString(a.name),9,Ce))),256)):e.createCommentVNode("",!0),t.value.style.chart.labels.axis.yLabel?(e.openBlock(),e.createElementBlock("text",{key:3,fill:t.value.style.chart.labels.axis.color,"font-size":t.value.style.chart.labels.axis.fontSize,transform:`translate(${t.value.style.chart.labels.axis.fontSize+t.value.style.chart.labels.axis.yLabelOffsetX}, ${o.value.top+o.value.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(t.value.style.chart.labels.axis.yLabel),9,we)):e.createCommentVNode("",!0),t.value.style.chart.labels.axis.xLabel?(e.openBlock(),e.createElementBlock("text",{key:4,fill:t.value.style.chart.labels.axis.color,"font-size":t.value.style.chart.labels.axis.fontSize,x:o.value.left+o.value.width/2,y:o.value.absoluteHeight,"text-anchor":"middle"},e.toDisplayString(t.value.style.chart.labels.axis.xLabel),9,Be)):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createElementVNode("line",{x1:o.value.left,x2:o.value.right,y1:i.value.y,y2:i.value.y,stroke:i.value.color,"stroke-width":1,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,_e),e.createElementVNode("circle",{cx:o.value.left,cy:i.value.y,r:3,fill:i.value.color,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,$e),e.createElementVNode("circle",{cx:o.value.right,cy:i.value.y,r:3,fill:i.value.color,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,Ne)],64)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,a=>(e.openBlock(),e.createElementBlock("radialGradient",{id:a.id,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(r.lightenHexColor)(a.color,t.value.style.chart.plots.gradient.intensity/100)},null,8,Le),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(r.darkenHexColor)(a.color,.1)},null,8,Te),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Pe)],8,Se))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.value,(a,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,y)=>(e.openBlock(),e.createBlock(ie._sfc_main,e.mergeProps({plot:{x:u.x,y:F.value?u.y:o.value.top},radius:i.value&&i.value.id===u.id?B.value*1.5:B.value,shape:t.value.style.chart.plots.shape,stroke:t.value.style.chart.plots.stroke,strokeWidth:t.value.style.chart.plots.strokeWidth,color:t.value.style.chart.plots.gradient.show?`url(#${a.id})`:a.color,onMouseenter:S=>le({datapoint:u,seriesIndex:y}),onMouseleave:s[0]||(s[0]=S=>{T.value=!1,i.value=null}),onClick:S=>Q("selectDatapoint",u),style:`transition: all 0.2s ease-in-out; opacity:${i.value?i.value.id===u.id?1:.2:t.value.style.chart.plots.opacity};${g.value?`transition-delay:${y*50}ms`:""}`,class:{"vue-ui-strip-plot-animated":t.value.useCssAnimation&&g.value,"vue-ui-strip-plot-select-circle":t.value.useCssAnimation&&!g.value}},l.$attrs),null,16,["plot","radius","shape","stroke","strokeWidth","color","onMouseenter","onClick","style","class"]))),256)),c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[y===a.plots.length-1||i.value&&i.value.id===u.id&&!c.value.showTooltip?(e.openBlock(),e.createElementBlock("text",{key:0,x:u.x,y:u.y+t.value.style.chart.labels.bestPlotLabel.offsetY-B.value*(i.value&&i.value.id===u.id&&!c.value.showTooltip?2:1.5),"font-size":t.value.style.chart.labels.bestPlotLabel.fontSize,fill:t.value.style.chart.labels.bestPlotLabel.color,"text-anchor":"middle",style:e.normalizeStyle(`opacity:${t.value.useCssAnimation&&g.value?0:1};transition:opacity 0.2s ease-in;`)},e.toDisplayString(u.name)+" "+e.toDisplayString(t.value.style.chart.labels.bestPlotLabel.showValue?e.unref(r.dataLabel)({p:`(${t.value.style.chart.labels.prefix}`,v:u.value,s:`${t.value.style.chart.labels.suffix})`,r:t.value.style.chart.labels.bestPlotLabel.rounding}):""),13,ze)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)],64))),256)),e.renderSlot(l.$slots,"svg",{svg:o.value},void 0,!0)],14,he)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ve,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(D)})),void 0,!0)])):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ue.default,{key:4,config:{type:"stripPlot",style:{backgroundColor:t.value.style.chart.backgroundColor,stripPlot:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(se._sfc_main,{show:c.value.showTooltip&&T.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:b.value,content:P.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...z.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...z.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),p.value?(e.openBlock(),e.createBlock(ce.default,{key:5,hideDetails:"",config:{open:c.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ne.DataTable,{colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[1]||(s[1]=a=>c.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,Ae)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,de))}},Oe=ve._export_sfc(Fe,[["__scopeId","data-v-5307a92e"]]);exports.default=Oe;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Y23HeR26.cjs"),V=require("./useNestedProp-C2H2jmU6.cjs"),H=require("./vue-ui-sparkline-WMI-RgkW.cjs"),X=require("./BaseIcon-BK5xYOzV.cjs"),P=require("./usePrinter-DTF28E03.cjs"),J=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),K=["id"],Q={style:{"z-index":"1","padding-right":"24px"}},Y=["onClick"],Z={style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center"}},j=["data-cell"],ee={style:{display:"flex","flex-direction":"row","align-items":"center",gap:"6px"}},te=["data-cell","onPointerenter"],le=["data-cell"],oe=["data-cell"],ae=["data-cell"],ne=["data-cell"],re={__name:"vue-ui-table-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup($,{expose:F}){const v=$;e.useCssVars(l=>({"2af6bd52":l.tdo}));const{vue_ui_table_sparkline:D}=s.useConfig(),y=e.ref(s.createUid()),S=e.ref(0),x=e.ref(0),t=e.computed(()=>{const l=V.useNestedProp({userConfig:v.config,defaultConfig:D});return l.theme?{...V.useNestedProp({userConfig:s.themes.vue_ui_table_sparkline[l.theme]||v.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}),{isPrinting:C,isImaging:N,generatePdf:z,generateImage:w}=P.usePrinter({elementId:`table_${y.value}`,fileName:t.value.title.text||"vue-ui-table-sparkline"}),O=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),f=e.ref(null),B=e.ref(!1),W=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{s.objectIsEmpty(v.dataset)&&s.error({componentName:"VueUiTableSparkline",type:"dataset"});const l=new ResizeObserver(r=>{r.forEach(o=>{B.value=o.contentRect.width<W.value})});f.value&&l.observe(f.value)});const A=e.computed(()=>(v.dataset.forEach((l,r)=>{s.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{s.error({componentName:"VueUiTableSparkline",type:"datasetSerieAttribute",property:o,index:r})})}),v.dataset.map((l,r)=>{const o=(l.values||[]).map(n=>isNaN(n)?0:n??0),u=o.reduce((n,a)=>n+a,0);return{...l,values:l.values||[],color:s.convertColorToHex(l.color)||O.value[r]||s.palette[r]||s.palette[r%s.palette.length],sum:u,average:u/o.length,median:s.calcMedian(o),sparklineDataset:o.map((n,a)=>({period:t.value.colNames[a]||`col ${a}`,value:n||0}))}})));function T(l){const o=(l[0].values||[]).map((n,a)=>l.map(i=>i.values[a]||[])).map(n=>n.map((a,i)=>[a,i]).sort((a,i)=>i[0]-a[0]).map(a=>a[1]));return l.map((n,a)=>({...n,values:n.values||[],orders:o[a]}))}const m=e.computed(()=>T(A.value)),g=e.ref(m.value),M=e.computed(()=>Math.max(...g.value.map(l=>(l.values||[]).length))),b=e.ref(void 0),k=e.ref(!1),h=e.ref(void 0),_=e.ref(-1);function L(){k.value=!1,h.value=void 0,_.value=-1,g.value=m.value}function G(l){k.value=!0,h.value=l;const r=m.value.map(a=>a.values[l]||[]),o=b.value===l?1:-1;_.value=o,l===b.value?b.value=void 0:b.value=l;const n=r.map((a,i)=>[i,a]).sort((a,i)=>o*(i[1]-a[1])).map(a=>a[0]).map(a=>m.value[a]);g.value=n,x.value+=1}const q=e.computed(()=>Math.max(...v.dataset.map(l=>(l.values||[]).length))),p=e.computed(()=>{let l=t.value.colNames;if(!l.length)for(let o=0;o<q.value;o+=1)l.push(`col ${o+1}`);t.value.showTotal&&(l=[...l,t.value.translations.total]);let r;return t.value.showAverage&&t.value.showMedian?r=[...l,t.value.translations.average,t.value.translations.median]:t.value.showAverage&&!t.value.showMedian?r=[...l,t.value.translations.average]:!t.value.showAverage&&t.value.showMedian?r=[...l,t.value.translations.median]:r=l,t.value.showSparklines?[...r,t.value.translations.chart]:r}),d=e.ref(void 0),c=e.ref(void 0);function R({dataIndex:l,serieIndex:r}){d.value=l,c.value=r}const E=e.ref(!1);function U(l){E.value=l,S.value+=1}function I(){e.nextTick(()=>{const l=[t.value.translations.serie].concat(p.value),r=A.value.map((n,a)=>[[n.name],n.values,[n.sum],[n.average],[n.median]]),o=[l].concat(r),u=s.createCsvContent(o);s.downloadCsv({csvContent:u,title:t.value.title.text||"vue-ui-table-sparkline"})})}return F({generatePdf:z,generateImage:w,generateCsv:I,restoreOrder:L}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:f,class:e.normalizeClass({"vue-ui-responsive":B.value}),style:{overflow:"hidden"},id:`table_${y.value}`},[e.createElementVNode("div",{style:{overflow:"auto"},onPointerleave:r[0]||(r[0]=o=>{c.value=void 0,d.value=void 0})},[e.createElementVNode("table",{class:"vue-ui-data-table",style:e.normalizeStyle({fontFamily:t.value.fontFamily,position:"relative"})},[t.value.title.text?(e.openBlock(),e.createElementBlock("caption",{key:0,style:e.normalizeStyle({backgroundColor:t.value.title.backgroundColor})},[e.createElementVNode("div",{style:e.normalizeStyle({fontSize:`${t.value.title.fontSize}px`,fontWeight:t.value.title.bold?"bold":"normal",color:t.value.title.color,textAlign:t.value.title.textAlign})},e.toDisplayString(t.value.title.text),5),t.value.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({fontSize:`${t.value.title.subtitle.fontSize}px`,fontWeight:t.value.title.subtitle.bold?"bold":"normal",color:t.value.title.subtitle.color,textAlign:t.value.title.textAlign})},e.toDisplayString(t.value.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("thead",Q,[e.createElementVNode("tr",{role:"row",class:"vue-ui-data-table__thead-row",style:e.normalizeStyle({backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color})},[e.createElementVNode("th",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.thead.backgroundColor,outline:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal"}),class:"sticky-col-first"},e.toDisplayString(t.value.translations.serie),5),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(o,u)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",style:e.normalizeStyle({background:t.value.thead.backgroundColor,outline:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal",minWidth:u===p.value.length-1?"150px":"",cursor:m.value[0].values[u]!==void 0?"pointer":"default"}),onClick:()=>G(u),class:e.normalizeClass({"sticky-col":u===p.value.length-1&&t.value.showSparklines})},[e.createElementVNode("div",Z,[e.createElementVNode("span",null,e.toDisplayString(o),1),k.value&&u===h.value&&m.value[0].values[u]!==void 0?(e.openBlock(),e.createBlock(X.default,{key:0,size:18,name:_.value===1?"sort":"sortReverse",stroke:t.value.thead.color},null,8,["name","stroke"])):e.createCommentVNode("",!0)]),t.value.userOptions.show&&u===p.value.length-1?(e.openBlock(),e.createBlock(P.UserOptions,{ref_for:!0,ref:"details",key:`user_option_${S.value}`,backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color,isPrinting:e.unref(C),isImaging:e.unref(N),uid:y.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:E.value,titles:{...t.value.userOptions.buttonTitles},chartElement:f.value,onToggleFullscreen:U,onGeneratePdf:e.unref(z),onGenerateImage:e.unref(w),onGenerateCsv:I},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:a})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:a})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0)],14,Y))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(o,u)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,color:t.value.tbody.color}),class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":u%2===0,"vue-ui-data-table__tbody__row-odd":u%2!==0})},[e.createElementVNode("td",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.serie,class:"vue-ui-data-table__tbody__td sticky-col-first"},[e.createElementVNode("div",ee,[e.createElementVNode("span",{style:e.normalizeStyle({color:o.color})},"⬤",4),e.createElementVNode("span",null,e.toDisplayString(o.name??"-"),1)])],12,j),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(n,a)=>(e.openBlock(),e.createElementBlock("td",{role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign,backgroundColor:d.value!==void 0&&c.value!==void 0&&a===d.value&&c.value===u?`${o.color}33`:"",borderRadius:d.value!==void 0&&c.value!==void 0&&a===d.value&&c.value===u?"3px":""}),"data-cell":p.value[a],class:"vue-ui-data-table__tbody__td",onPointerenter:i=>{c.value=u,d.value=a}},e.toDisplayString([null,void 0].includes(o.values[a])?"-":Number(o.values[a].toFixed(t.value.roundingValues)).toLocaleString()),45,te))),256)),t.value.showTotal?(e.openBlock(),e.createElementBlock("td",{key:0,role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.total,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(Number(o.sum.toFixed(t.value.roundingTotal)).toLocaleString()),13,le)):e.createCommentVNode("",!0),t.value.showAverage?(e.openBlock(),e.createElementBlock("td",{key:1,role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.average,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(Number(o.average.toFixed(t.value.roundingAverage)).toLocaleString()),13,oe)):e.createCommentVNode("",!0),t.value.showMedian?(e.openBlock(),e.createElementBlock("td",{key:2,role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.median,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(Number(o.median.toFixed(t.value.roundingMedian)).toLocaleString()),13,ae)):e.createCommentVNode("",!0),t.value.showSparklines?(e.openBlock(),e.createElementBlock("td",{key:3,role:"cell","data-cell":t.value.translations.chart,style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),class:"vue-ui-data-table__tbody__td sticky-col"},[(e.openBlock(),e.createBlock(H.default,{key:`sparkline_${u}_${x.value}`,onHoverIndex:({index:n})=>R({dataIndex:n,serieIndex:u}),dataset:o.sparklineDataset,showInfo:!1,selectedIndex:d.value,config:{type:t.value.sparkline.type,style:{backgroundColor:t.value.tbody.backgroundColor,animation:{show:t.value.sparkline.animation.show&&!e.unref(C)&&!e.unref(N),animationFrames:t.value.sparkline.animation.animationFrames},line:{color:o.color,smooth:t.value.sparkline.smooth,strokeWidth:t.value.sparkline.strokeWidth},bar:{color:o.color},area:{color:o.color,opacity:t.value.sparkline.showArea?16:0,useGradient:t.value.sparkline.useGradient},verticalIndicator:{color:o.color},plot:{radius:9,stroke:t.value.tbody.backgroundColor,strokeWidth:3}}}},null,8,["onHoverIndex","dataset","selectedIndex","config"]))],12,ne)):e.createCommentVNode("",!0)],6))),256))])],4)],32)],10,K))}},ue=J._export_sfc(re,[["__scopeId","data-v-3af92d54"]]);exports.default=ue;
|
|
@@ -1,420 +0,0 @@
|
|
|
1
|
-
import { useCssVars as se, ref as i, computed as p, onMounted as ue, openBlock as u, createElementBlock as d, normalizeClass as N, createElementVNode as v, normalizeStyle as r, toDisplayString as b, createCommentVNode as m, Fragment as O, renderList as W, createBlock as T, unref as k, createSlots as re, withCtx as A, renderSlot as I, normalizeProps as ie, guardReactiveProps as de, nextTick as ve } from "vue";
|
|
2
|
-
import { u as ce, c as be, t as fe, a as pe, p as w, b as me, o as ge, e as q, g as he, d as ye, Q as _e, n as ke, q as xe } from "./index-BhCM2QF1.js";
|
|
3
|
-
import { u as X } from "./useNestedProp-CH3PVhvc.js";
|
|
4
|
-
import Ce from "./vue-ui-sparkline-BWl_B6LX.js";
|
|
5
|
-
import Se from "./BaseIcon-Op8_v5x7.js";
|
|
6
|
-
import { u as Ae, U as Ie } from "./usePrinter-B75HLwzw.js";
|
|
7
|
-
import { _ as we } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
-
const $e = ["id"], Fe = { style: { "z-index": "1", "padding-right": "24px" } }, Pe = ["onClick"], ze = { style: { display: "flex", "flex-direction": "row", gap: "3px", "align-items": "center" } }, Ne = ["data-cell"], Oe = { style: { display: "flex", "flex-direction": "row", "align-items": "center", gap: "6px" } }, We = ["data-cell", "onPointerenter"], Te = ["data-cell"], De = ["data-cell"], Me = ["data-cell"], Ve = ["data-cell"], Ee = {
|
|
9
|
-
__name: "vue-ui-table-sparkline",
|
|
10
|
-
props: {
|
|
11
|
-
config: {
|
|
12
|
-
type: Object,
|
|
13
|
-
default() {
|
|
14
|
-
return {};
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
dataset: {
|
|
18
|
-
type: Array,
|
|
19
|
-
default() {
|
|
20
|
-
return [];
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
setup(Q, { expose: J }) {
|
|
25
|
-
const h = Q;
|
|
26
|
-
se((t) => ({
|
|
27
|
-
"2af6bd52": t.tdo
|
|
28
|
-
}));
|
|
29
|
-
const { vue_ui_table_sparkline: K } = ce(), $ = i(be()), D = i(0), M = i(0), e = p(() => {
|
|
30
|
-
const t = X({
|
|
31
|
-
userConfig: h.config,
|
|
32
|
-
defaultConfig: K
|
|
33
|
-
});
|
|
34
|
-
return t.theme ? {
|
|
35
|
-
...X({
|
|
36
|
-
userConfig: fe.vue_ui_table_sparkline[t.theme] || h.config,
|
|
37
|
-
defaultConfig: t
|
|
38
|
-
}),
|
|
39
|
-
customPalette: pe[t.theme] || w
|
|
40
|
-
} : t;
|
|
41
|
-
}), { isPrinting: V, isImaging: E, generatePdf: G, generateImage: L } = Ae({
|
|
42
|
-
elementId: `table_${$.value}`,
|
|
43
|
-
fileName: e.value.title.text || "vue-ui-table-sparkline"
|
|
44
|
-
}), Y = p(() => me(e.value.customPalette)), x = i(null), B = i(!1), Z = p(() => e.value.responsiveBreakpoint);
|
|
45
|
-
ue(() => {
|
|
46
|
-
ge(h.dataset) && q({
|
|
47
|
-
componentName: "VueUiTableSparkline",
|
|
48
|
-
type: "dataset"
|
|
49
|
-
});
|
|
50
|
-
const t = new ResizeObserver((n) => {
|
|
51
|
-
n.forEach((l) => {
|
|
52
|
-
B.value = l.contentRect.width < Z.value;
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
x.value && t.observe(x.value);
|
|
56
|
-
});
|
|
57
|
-
const R = p(() => (h.dataset.forEach((t, n) => {
|
|
58
|
-
he({
|
|
59
|
-
datasetObject: t,
|
|
60
|
-
requiredAttributes: ["name", "values"]
|
|
61
|
-
}).forEach((l) => {
|
|
62
|
-
q({
|
|
63
|
-
componentName: "VueUiTableSparkline",
|
|
64
|
-
type: "datasetSerieAttribute",
|
|
65
|
-
property: l,
|
|
66
|
-
index: n
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
}), h.dataset.map((t, n) => {
|
|
70
|
-
const l = (t.values || []).map((o) => isNaN(o) ? 0 : o ?? 0), s = l.reduce((o, a) => o + a, 0);
|
|
71
|
-
return {
|
|
72
|
-
...t,
|
|
73
|
-
values: t.values || [],
|
|
74
|
-
color: ye(t.color) || Y.value[n] || w[n] || w[n % w.length],
|
|
75
|
-
sum: s,
|
|
76
|
-
average: s / l.length,
|
|
77
|
-
median: _e(l),
|
|
78
|
-
sparklineDataset: l.map((o, a) => ({
|
|
79
|
-
period: e.value.colNames[a] || `col ${a}`,
|
|
80
|
-
value: o || 0
|
|
81
|
-
}))
|
|
82
|
-
};
|
|
83
|
-
})));
|
|
84
|
-
function j(t) {
|
|
85
|
-
const l = (t[0].values || []).map(
|
|
86
|
-
(o, a) => t.map((c) => c.values[a] || [])
|
|
87
|
-
).map(
|
|
88
|
-
(o) => o.map((a, c) => [a, c]).sort((a, c) => c[0] - a[0]).map((a) => a[1])
|
|
89
|
-
);
|
|
90
|
-
return t.map((o, a) => ({
|
|
91
|
-
...o,
|
|
92
|
-
values: o.values || [],
|
|
93
|
-
orders: l[a]
|
|
94
|
-
}));
|
|
95
|
-
}
|
|
96
|
-
const y = p(() => j(R.value)), C = i(y.value), ee = p(() => Math.max(...C.value.map((t) => (t.values || []).length))), S = i(void 0), F = i(!1), P = i(void 0), z = i(-1);
|
|
97
|
-
function te() {
|
|
98
|
-
F.value = !1, P.value = void 0, z.value = -1, C.value = y.value;
|
|
99
|
-
}
|
|
100
|
-
function le(t) {
|
|
101
|
-
F.value = !0, P.value = t;
|
|
102
|
-
const n = y.value.map((a) => a.values[t] || []), l = S.value === t ? 1 : -1;
|
|
103
|
-
z.value = l, t === S.value ? S.value = void 0 : S.value = t;
|
|
104
|
-
const o = n.map((a, c) => [c, a]).sort((a, c) => l * (c[1] - a[1])).map((a) => a[0]).map((a) => y.value[a]);
|
|
105
|
-
C.value = o, M.value += 1;
|
|
106
|
-
}
|
|
107
|
-
const ae = p(() => Math.max(...h.dataset.map((t) => (t.values || []).length))), _ = p(() => {
|
|
108
|
-
let t = e.value.colNames;
|
|
109
|
-
if (!t.length)
|
|
110
|
-
for (let l = 0; l < ae.value; l += 1)
|
|
111
|
-
t.push(`col ${l + 1}`);
|
|
112
|
-
e.value.showTotal && (t = [...t, e.value.translations.total]);
|
|
113
|
-
let n;
|
|
114
|
-
return e.value.showAverage && e.value.showMedian ? n = [
|
|
115
|
-
...t,
|
|
116
|
-
e.value.translations.average,
|
|
117
|
-
e.value.translations.median
|
|
118
|
-
] : e.value.showAverage && !e.value.showMedian ? n = [...t, e.value.translations.average] : !e.value.showAverage && e.value.showMedian ? n = [...t, e.value.translations.median] : n = t, e.value.showSparklines ? [...n, e.value.translations.chart] : n;
|
|
119
|
-
}), f = i(void 0), g = i(void 0);
|
|
120
|
-
function oe({ dataIndex: t, serieIndex: n }) {
|
|
121
|
-
f.value = t, g.value = n;
|
|
122
|
-
}
|
|
123
|
-
const U = i(!1);
|
|
124
|
-
function ne(t) {
|
|
125
|
-
U.value = t, D.value += 1;
|
|
126
|
-
}
|
|
127
|
-
function H() {
|
|
128
|
-
ve(() => {
|
|
129
|
-
const t = [e.value.translations.serie].concat(_.value), n = R.value.map((o, a) => [
|
|
130
|
-
[o.name],
|
|
131
|
-
o.values,
|
|
132
|
-
[o.sum],
|
|
133
|
-
[o.average],
|
|
134
|
-
[o.median]
|
|
135
|
-
]), l = [t].concat(n), s = ke(l);
|
|
136
|
-
xe({
|
|
137
|
-
csvContent: s,
|
|
138
|
-
title: e.value.title.text || "vue-ui-table-sparkline"
|
|
139
|
-
});
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
return J({
|
|
143
|
-
generatePdf: G,
|
|
144
|
-
generateImage: L,
|
|
145
|
-
generateCsv: H,
|
|
146
|
-
restoreOrder: te
|
|
147
|
-
}), (t, n) => (u(), d("div", {
|
|
148
|
-
ref_key: "tableContainer",
|
|
149
|
-
ref: x,
|
|
150
|
-
class: N({ "vue-ui-responsive": B.value }),
|
|
151
|
-
style: { overflow: "hidden" },
|
|
152
|
-
id: `table_${$.value}`
|
|
153
|
-
}, [
|
|
154
|
-
v("div", {
|
|
155
|
-
style: { overflow: "auto" },
|
|
156
|
-
onPointerleave: n[0] || (n[0] = (l) => {
|
|
157
|
-
g.value = void 0, f.value = void 0;
|
|
158
|
-
})
|
|
159
|
-
}, [
|
|
160
|
-
v("table", {
|
|
161
|
-
class: "vue-ui-data-table",
|
|
162
|
-
style: r({ fontFamily: e.value.fontFamily, position: "relative" })
|
|
163
|
-
}, [
|
|
164
|
-
e.value.title.text ? (u(), d("caption", {
|
|
165
|
-
key: 0,
|
|
166
|
-
style: r({ backgroundColor: e.value.title.backgroundColor })
|
|
167
|
-
}, [
|
|
168
|
-
v("div", {
|
|
169
|
-
style: r({
|
|
170
|
-
fontSize: `${e.value.title.fontSize}px`,
|
|
171
|
-
fontWeight: e.value.title.bold ? "bold" : "normal",
|
|
172
|
-
color: e.value.title.color,
|
|
173
|
-
textAlign: e.value.title.textAlign
|
|
174
|
-
})
|
|
175
|
-
}, b(e.value.title.text), 5),
|
|
176
|
-
e.value.title.subtitle.text ? (u(), d("div", {
|
|
177
|
-
key: 0,
|
|
178
|
-
style: r({
|
|
179
|
-
fontSize: `${e.value.title.subtitle.fontSize}px`,
|
|
180
|
-
fontWeight: e.value.title.subtitle.bold ? "bold" : "normal",
|
|
181
|
-
color: e.value.title.subtitle.color,
|
|
182
|
-
textAlign: e.value.title.textAlign
|
|
183
|
-
})
|
|
184
|
-
}, b(e.value.title.subtitle.text), 5)) : m("", !0)
|
|
185
|
-
], 4)) : m("", !0),
|
|
186
|
-
v("thead", Fe, [
|
|
187
|
-
v("tr", {
|
|
188
|
-
role: "row",
|
|
189
|
-
class: "vue-ui-data-table__thead-row",
|
|
190
|
-
style: r({
|
|
191
|
-
backgroundColor: e.value.thead.backgroundColor,
|
|
192
|
-
color: e.value.thead.color
|
|
193
|
-
})
|
|
194
|
-
}, [
|
|
195
|
-
v("th", {
|
|
196
|
-
role: "cell",
|
|
197
|
-
style: r({
|
|
198
|
-
backgroundColor: e.value.thead.backgroundColor,
|
|
199
|
-
outline: e.value.thead.outline,
|
|
200
|
-
textAlign: e.value.thead.textAlign,
|
|
201
|
-
fontWeight: e.value.thead.bold ? "bold" : "normal"
|
|
202
|
-
}),
|
|
203
|
-
class: "sticky-col-first"
|
|
204
|
-
}, b(e.value.translations.serie), 5),
|
|
205
|
-
(u(!0), d(O, null, W(_.value, (l, s) => (u(), d("th", {
|
|
206
|
-
role: "cell",
|
|
207
|
-
style: r({
|
|
208
|
-
background: e.value.thead.backgroundColor,
|
|
209
|
-
outline: e.value.thead.outline,
|
|
210
|
-
textAlign: e.value.thead.textAlign,
|
|
211
|
-
fontWeight: e.value.thead.bold ? "bold" : "normal",
|
|
212
|
-
minWidth: s === _.value.length - 1 ? "150px" : "",
|
|
213
|
-
cursor: y.value[0].values[s] !== void 0 ? "pointer" : "default"
|
|
214
|
-
}),
|
|
215
|
-
onClick: () => le(s),
|
|
216
|
-
class: N({ "sticky-col": s === _.value.length - 1 && e.value.showSparklines })
|
|
217
|
-
}, [
|
|
218
|
-
v("div", ze, [
|
|
219
|
-
v("span", null, b(l), 1),
|
|
220
|
-
F.value && s === P.value && y.value[0].values[s] !== void 0 ? (u(), T(Se, {
|
|
221
|
-
key: 0,
|
|
222
|
-
size: 18,
|
|
223
|
-
name: z.value === 1 ? "sort" : "sortReverse",
|
|
224
|
-
stroke: e.value.thead.color
|
|
225
|
-
}, null, 8, ["name", "stroke"])) : m("", !0)
|
|
226
|
-
]),
|
|
227
|
-
e.value.userOptions.show && s === _.value.length - 1 ? (u(), T(Ie, {
|
|
228
|
-
ref_for: !0,
|
|
229
|
-
ref: "details",
|
|
230
|
-
key: `user_option_${D.value}`,
|
|
231
|
-
backgroundColor: e.value.thead.backgroundColor,
|
|
232
|
-
color: e.value.thead.color,
|
|
233
|
-
isPrinting: k(V),
|
|
234
|
-
isImaging: k(E),
|
|
235
|
-
uid: $.value,
|
|
236
|
-
hasPdf: e.value.userOptions.buttons.pdf,
|
|
237
|
-
hasXls: e.value.userOptions.buttons.csv,
|
|
238
|
-
hasImg: e.value.userOptions.buttons.img,
|
|
239
|
-
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
240
|
-
isFullscreen: U.value,
|
|
241
|
-
titles: { ...e.value.userOptions.buttonTitles },
|
|
242
|
-
chartElement: x.value,
|
|
243
|
-
onToggleFullscreen: ne,
|
|
244
|
-
onGeneratePdf: k(G),
|
|
245
|
-
onGenerateImage: k(L),
|
|
246
|
-
onGenerateCsv: H
|
|
247
|
-
}, re({ _: 2 }, [
|
|
248
|
-
t.$slots.optionPdf ? {
|
|
249
|
-
name: "optionPdf",
|
|
250
|
-
fn: A(() => [
|
|
251
|
-
I(t.$slots, "optionPdf", {}, void 0, !0)
|
|
252
|
-
]),
|
|
253
|
-
key: "0"
|
|
254
|
-
} : void 0,
|
|
255
|
-
t.$slots.optionCsv ? {
|
|
256
|
-
name: "optionCsv",
|
|
257
|
-
fn: A(() => [
|
|
258
|
-
I(t.$slots, "optionCsv", {}, void 0, !0)
|
|
259
|
-
]),
|
|
260
|
-
key: "1"
|
|
261
|
-
} : void 0,
|
|
262
|
-
t.$slots.optionImg ? {
|
|
263
|
-
name: "optionImg",
|
|
264
|
-
fn: A(() => [
|
|
265
|
-
I(t.$slots, "optionImg", {}, void 0, !0)
|
|
266
|
-
]),
|
|
267
|
-
key: "2"
|
|
268
|
-
} : void 0,
|
|
269
|
-
t.$slots.optionFullscreen ? {
|
|
270
|
-
name: "optionFullscreen",
|
|
271
|
-
fn: A(({ toggleFullscreen: o, isFullscreen: a }) => [
|
|
272
|
-
I(t.$slots, "optionFullscreen", ie(de({ toggleFullscreen: o, isFullscreen: a })), void 0, !0)
|
|
273
|
-
]),
|
|
274
|
-
key: "3"
|
|
275
|
-
} : void 0
|
|
276
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : m("", !0)
|
|
277
|
-
], 14, Pe))), 256))
|
|
278
|
-
], 4)
|
|
279
|
-
]),
|
|
280
|
-
v("tbody", null, [
|
|
281
|
-
(u(!0), d(O, null, W(C.value, (l, s) => (u(), d("tr", {
|
|
282
|
-
role: "row",
|
|
283
|
-
style: r({
|
|
284
|
-
backgroundColor: e.value.tbody.backgroundColor,
|
|
285
|
-
color: e.value.tbody.color
|
|
286
|
-
}),
|
|
287
|
-
class: N({ "vue-ui-data-table__tbody__row": !0, "vue-ui-data-table__tbody__row-even": s % 2 === 0, "vue-ui-data-table__tbody__row-odd": s % 2 !== 0 })
|
|
288
|
-
}, [
|
|
289
|
-
v("td", {
|
|
290
|
-
role: "cell",
|
|
291
|
-
style: r({
|
|
292
|
-
backgroundColor: e.value.tbody.backgroundColor,
|
|
293
|
-
outline: e.value.tbody.outline,
|
|
294
|
-
fontSize: `${e.value.tbody.fontSize}px`,
|
|
295
|
-
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
296
|
-
textAlign: e.value.tbody.textAlign
|
|
297
|
-
}),
|
|
298
|
-
"data-cell": e.value.translations.serie,
|
|
299
|
-
class: "vue-ui-data-table__tbody__td sticky-col-first"
|
|
300
|
-
}, [
|
|
301
|
-
v("div", Oe, [
|
|
302
|
-
v("span", {
|
|
303
|
-
style: r({ color: l.color })
|
|
304
|
-
}, "⬤", 4),
|
|
305
|
-
v("span", null, b(l.name ?? "-"), 1)
|
|
306
|
-
])
|
|
307
|
-
], 12, Ne),
|
|
308
|
-
(u(!0), d(O, null, W(ee.value, (o, a) => (u(), d("td", {
|
|
309
|
-
role: "cell",
|
|
310
|
-
style: r({
|
|
311
|
-
outline: e.value.tbody.outline,
|
|
312
|
-
fontSize: `${e.value.tbody.fontSize}px`,
|
|
313
|
-
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
314
|
-
textAlign: e.value.tbody.textAlign,
|
|
315
|
-
backgroundColor: f.value !== void 0 && g.value !== void 0 && a === f.value && g.value === s ? `${l.color}33` : "",
|
|
316
|
-
borderRadius: f.value !== void 0 && g.value !== void 0 && a === f.value && g.value === s ? "3px" : ""
|
|
317
|
-
}),
|
|
318
|
-
"data-cell": _.value[a],
|
|
319
|
-
class: "vue-ui-data-table__tbody__td",
|
|
320
|
-
onPointerenter: (c) => {
|
|
321
|
-
g.value = s, f.value = a;
|
|
322
|
-
}
|
|
323
|
-
}, b([null, void 0].includes(l.values[a]) ? "-" : Number(l.values[a].toFixed(e.value.roundingValues)).toLocaleString()), 45, We))), 256)),
|
|
324
|
-
e.value.showTotal ? (u(), d("td", {
|
|
325
|
-
key: 0,
|
|
326
|
-
role: "cell",
|
|
327
|
-
style: r({
|
|
328
|
-
outline: e.value.tbody.outline,
|
|
329
|
-
fontSize: `${e.value.tbody.fontSize}px`,
|
|
330
|
-
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
331
|
-
textAlign: e.value.tbody.textAlign
|
|
332
|
-
}),
|
|
333
|
-
"data-cell": e.value.translations.total,
|
|
334
|
-
class: "vue-ui-data-table__tbody__td"
|
|
335
|
-
}, b(Number(l.sum.toFixed(e.value.roundingTotal)).toLocaleString()), 13, Te)) : m("", !0),
|
|
336
|
-
e.value.showAverage ? (u(), d("td", {
|
|
337
|
-
key: 1,
|
|
338
|
-
role: "cell",
|
|
339
|
-
style: r({
|
|
340
|
-
outline: e.value.tbody.outline,
|
|
341
|
-
fontSize: `${e.value.tbody.fontSize}px`,
|
|
342
|
-
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
343
|
-
textAlign: e.value.tbody.textAlign
|
|
344
|
-
}),
|
|
345
|
-
"data-cell": e.value.translations.average,
|
|
346
|
-
class: "vue-ui-data-table__tbody__td"
|
|
347
|
-
}, b(Number(l.average.toFixed(e.value.roundingAverage)).toLocaleString()), 13, De)) : m("", !0),
|
|
348
|
-
e.value.showMedian ? (u(), d("td", {
|
|
349
|
-
key: 2,
|
|
350
|
-
role: "cell",
|
|
351
|
-
style: r({
|
|
352
|
-
outline: e.value.tbody.outline,
|
|
353
|
-
fontSize: `${e.value.tbody.fontSize}px`,
|
|
354
|
-
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
355
|
-
textAlign: e.value.tbody.textAlign
|
|
356
|
-
}),
|
|
357
|
-
"data-cell": e.value.translations.median,
|
|
358
|
-
class: "vue-ui-data-table__tbody__td"
|
|
359
|
-
}, b(Number(l.median.toFixed(e.value.roundingMedian)).toLocaleString()), 13, Me)) : m("", !0),
|
|
360
|
-
e.value.showSparklines ? (u(), d("td", {
|
|
361
|
-
key: 3,
|
|
362
|
-
role: "cell",
|
|
363
|
-
"data-cell": e.value.translations.chart,
|
|
364
|
-
style: r({
|
|
365
|
-
outline: e.value.tbody.outline,
|
|
366
|
-
fontSize: `${e.value.tbody.fontSize}px`,
|
|
367
|
-
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
368
|
-
textAlign: e.value.tbody.textAlign
|
|
369
|
-
}),
|
|
370
|
-
class: "vue-ui-data-table__tbody__td sticky-col"
|
|
371
|
-
}, [
|
|
372
|
-
(u(), T(Ce, {
|
|
373
|
-
key: `sparkline_${s}_${M.value}`,
|
|
374
|
-
onHoverIndex: ({ index: o }) => oe({ dataIndex: o, serieIndex: s }),
|
|
375
|
-
dataset: l.sparklineDataset,
|
|
376
|
-
showInfo: !1,
|
|
377
|
-
selectedIndex: f.value,
|
|
378
|
-
config: {
|
|
379
|
-
type: e.value.sparkline.type,
|
|
380
|
-
style: {
|
|
381
|
-
backgroundColor: e.value.tbody.backgroundColor,
|
|
382
|
-
animation: {
|
|
383
|
-
show: e.value.sparkline.animation.show && !k(V) && !k(E),
|
|
384
|
-
animationFrames: e.value.sparkline.animation.animationFrames
|
|
385
|
-
},
|
|
386
|
-
line: {
|
|
387
|
-
color: l.color,
|
|
388
|
-
smooth: e.value.sparkline.smooth,
|
|
389
|
-
strokeWidth: e.value.sparkline.strokeWidth
|
|
390
|
-
},
|
|
391
|
-
bar: {
|
|
392
|
-
color: l.color
|
|
393
|
-
},
|
|
394
|
-
area: {
|
|
395
|
-
color: l.color,
|
|
396
|
-
opacity: e.value.sparkline.showArea ? 16 : 0,
|
|
397
|
-
useGradient: e.value.sparkline.useGradient
|
|
398
|
-
},
|
|
399
|
-
verticalIndicator: {
|
|
400
|
-
color: l.color
|
|
401
|
-
},
|
|
402
|
-
plot: {
|
|
403
|
-
radius: 9,
|
|
404
|
-
stroke: e.value.tbody.backgroundColor,
|
|
405
|
-
strokeWidth: 3
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
}, null, 8, ["onHoverIndex", "dataset", "selectedIndex", "config"]))
|
|
410
|
-
], 12, Ve)) : m("", !0)
|
|
411
|
-
], 6))), 256))
|
|
412
|
-
])
|
|
413
|
-
], 4)
|
|
414
|
-
], 32)
|
|
415
|
-
], 10, $e));
|
|
416
|
-
}
|
|
417
|
-
}, Xe = /* @__PURE__ */ we(Ee, [["__scopeId", "data-v-3af92d54"]]);
|
|
418
|
-
export {
|
|
419
|
-
Xe as default
|
|
420
|
-
};
|