vue-data-ui 2.9.0 → 2.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-COsmVQGg.js → Arrow-DIEvl571.js} +1 -1
- package/dist/{Arrow-CRkagNj_.cjs → Arrow-KvKZ2SBJ.cjs} +1 -1
- package/dist/{BaseIcon-Dmcf856A.js → BaseIcon-BH4bJe82.js} +1 -1
- package/dist/{BaseIcon-B4pcy-8f.cjs → BaseIcon-C6L3qbQ8.cjs} +1 -1
- package/dist/{ColorPicker-C9SFkHn3.cjs → ColorPicker-BmVm6Lqe.cjs} +1 -1
- package/dist/{ColorPicker-BQSP45oM.js → ColorPicker-Dnjy6olA.js} +3 -3
- package/dist/{DataTable-B1yJapRL.js → DataTable-CaUgku7o.js} +2 -2
- package/dist/{DataTable-Bjx5Ccho.cjs → DataTable-Cz1SDtvT.cjs} +1 -1
- package/dist/{Legend-BjHoFybL.cjs → Legend-Bl_MrORk.cjs} +1 -1
- package/dist/{Legend--YhaiVet.js → Legend-BxZxsJCp.js} +2 -2
- package/dist/{PackageVersion-BwGV13wg.js → PackageVersion-BEE_4baV.js} +1 -1
- package/dist/{PackageVersion-_-duZr_B.cjs → PackageVersion-BrUdYdIC.cjs} +1 -1
- package/dist/{PenAndPaper-BwOppffl.js → PenAndPaper-B3WdOAcZ.js} +3 -3
- package/dist/{PenAndPaper-BLqBmiek.cjs → PenAndPaper-DyGcaflS.cjs} +1 -1
- package/dist/{Shape-Cbao7HSz.cjs → Shape-DuVb3Mev.cjs} +1 -1
- package/dist/{Shape-Dg-hzjV4.js → Shape-Hrc-BQkc.js} +1 -1
- package/dist/{Slicer-XYuzh148.js → Slicer-2ZyRAred.js} +2 -2
- package/dist/{Slicer-B4Mbf7CA.cjs → Slicer-DVYmI2V1.cjs} +1 -1
- package/dist/{Title-CF40M_nk.cjs → Title-BGh0hWb2.cjs} +1 -1
- package/dist/{Title-D08zl5ev.js → Title-CGY0WlAI.js} +1 -1
- package/dist/{Tooltip-BXmEpCan.js → Tooltip-BfEhZz9k.js} +1 -1
- package/dist/{Tooltip-CupB-l8u.cjs → Tooltip-DckFFIYj.cjs} +1 -1
- package/dist/{dom-to-png-B2070iQl.js → dom-to-png-BgJJyI6M.js} +1 -1
- package/dist/{dom-to-png-CHSv0xMW.cjs → dom-to-png-DnnnXKpR.cjs} +1 -1
- package/dist/{img-BR_cEhe8.cjs → img-DT7UDEPk.cjs} +1 -1
- package/dist/{img-BtO99VMK.js → img-DkpJ0ciT.js} +1 -1
- package/dist/{index-DmMaSSqc.js → index-9ZicrZWM.js} +3 -2
- package/dist/index-DjDcQ8pe.cjs +9 -0
- package/dist/{pdf-D6x7WEvy.cjs → pdf-DuohwkFu.cjs} +1 -1
- package/dist/{pdf-Bc4mkqYX.js → pdf-zqw8E-me.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +2 -1
- package/dist/types/vue-data-ui.d.ts +2 -1
- package/dist/{useNestedProp-wDhEx7x9.cjs → useNestedProp-BS9eJthK.cjs} +1 -1
- package/dist/{useNestedProp-B47aFTkT.js → useNestedProp-s1XZrtPS.js} +1 -1
- package/dist/{usePrinter-1GlKtPCq.js → usePrinter-D7IXLE53.js} +3 -3
- package/dist/{usePrinter-06EDG1PE.cjs → usePrinter-vFXYgZiT.cjs} +1 -1
- package/dist/{vue-data-ui-Dx4piIh9.cjs → vue-data-ui-CNieT2ov.cjs} +1 -1
- package/dist/{vue-data-ui-CDFtEOu4.js → vue-data-ui-gEqI-hOT.js} +61 -61
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-DLMD2SZo.cjs → vue-ui-3d-bar-DX5baNUz.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-DeixcN8U.js → vue-ui-3d-bar-Sbk5MT1S.js} +9 -9
- package/dist/{vue-ui-accordion-QdoZquMy.js → vue-ui-accordion-62KnRfCb.js} +3 -3
- package/dist/{vue-ui-accordion-DcFabpGO.cjs → vue-ui-accordion-DIMalTE4.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-2y2FFtHU.js → vue-ui-age-pyramid-BkhVyOTM.js} +10 -10
- package/dist/{vue-ui-age-pyramid-B8jim3J5.cjs → vue-ui-age-pyramid-DfuEC7WE.cjs} +1 -1
- package/dist/{vue-ui-annotator-CfEp5EPK.cjs → vue-ui-annotator-BGWZZUN7.cjs} +1 -1
- package/dist/{vue-ui-annotator-DGIvKHlF.js → vue-ui-annotator-CrwbL3rn.js} +2 -2
- package/dist/{vue-ui-bullet-DtC5tbBO.js → vue-ui-bullet-BVr_zBo7.js} +8 -8
- package/dist/{vue-ui-bullet-sk8TiDAx.cjs → vue-ui-bullet-TmXeLFPZ.cjs} +1 -1
- package/dist/{vue-ui-candlestick-aZW1FkBk.js → vue-ui-candlestick-BArypZ1A.js} +11 -11
- package/dist/{vue-ui-candlestick-Bp1X8rCI.cjs → vue-ui-candlestick-BFJ8I4sb.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-Cyg9E2_P.cjs → vue-ui-carousel-table-B1i5b5xU.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-DEkz5mlG.js → vue-ui-carousel-table-CqWp06Xz.js} +4 -4
- package/dist/{vue-ui-chestnut-Dc8BR4Fp.cjs → vue-ui-chestnut-B8oiuRgc.cjs} +1 -1
- package/dist/{vue-ui-chestnut-Dt3E_CqF.js → vue-ui-chestnut-EHo3sSMv.js} +8 -8
- package/dist/{vue-ui-circle-pack-LTgaNsYK.cjs → vue-ui-circle-pack-BGLhSNyo.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-POZYcUlI.js → vue-ui-circle-pack-kx10AVM0.js} +9 -9
- package/dist/{vue-ui-cursor-DK5VB3D0.js → vue-ui-cursor-C8qofYJh.js} +2 -2
- package/dist/{vue-ui-cursor-C3N9zUA7.cjs → vue-ui-cursor-H77Z-m2e.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BEbiVgOQ.cjs → vue-ui-dashboard-4YFqFygh.cjs} +1 -1
- package/dist/{vue-ui-dashboard-jqW1Xxpz.js → vue-ui-dashboard-Bn2slDQx.js} +62 -62
- package/dist/{vue-ui-digits-Bcx-kLHo.js → vue-ui-digits-Cv__rzXF.js} +2 -2
- package/dist/{vue-ui-digits-BXZmcW0S.cjs → vue-ui-digits-DbSV0D-j.cjs} +1 -1
- package/dist/{vue-ui-donut-C3CUnPIO.cjs → vue-ui-donut-Bno5POxU.cjs} +1 -1
- package/dist/{vue-ui-donut-OvjOLwRW.js → vue-ui-donut-D_CLR29p.js} +12 -12
- package/dist/{vue-ui-donut-evolution-TsbcmiBs.js → vue-ui-donut-evolution-BgNwQ1J8.js} +11 -11
- package/dist/{vue-ui-donut-evolution-Bx8FunVF.cjs → vue-ui-donut-evolution-Dg6laY3D.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-CHcPo7vY.js → vue-ui-dumbbell-C5Z8rSTk.js} +10 -10
- package/dist/{vue-ui-dumbbell-CezLEwpL.cjs → vue-ui-dumbbell-DWQl4sxh.cjs} +1 -1
- package/dist/{vue-ui-flow-C0qwgT75.cjs → vue-ui-flow-D0t3MSCU.cjs} +1 -1
- package/dist/{vue-ui-flow-BMNYBEJh.js → vue-ui-flow-DKS1oZHc.js} +9 -9
- package/dist/{vue-ui-funnel-Ct3GgY7y.cjs → vue-ui-funnel-CqhhBoYG.cjs} +1 -1
- package/dist/{vue-ui-funnel-uz_CQDJI.js → vue-ui-funnel-r57KM4Wi.js} +9 -9
- package/dist/{vue-ui-galaxy-Cx51n6hM.cjs → vue-ui-galaxy-BeQSEKLG.cjs} +1 -1
- package/dist/{vue-ui-galaxy-DawYn5OS.js → vue-ui-galaxy-CLIAdqkr.js} +11 -11
- package/dist/{vue-ui-gauge-CcQP3sPy.js → vue-ui-gauge-BQ4S55FH.js} +7 -7
- package/dist/{vue-ui-gauge-CACfaNHg.cjs → vue-ui-gauge-CcTneeaQ.cjs} +1 -1
- package/dist/{vue-ui-gizmo-CjsP-8Li.cjs → vue-ui-gizmo-B_rVeweF.cjs} +1 -1
- package/dist/{vue-ui-gizmo-CtfaITb7.js → vue-ui-gizmo-DACB7BcV.js} +3 -3
- package/dist/{vue-ui-heatmap-DrtdWgC5.cjs → vue-ui-heatmap-DBtRfAWr.cjs} +1 -1
- package/dist/{vue-ui-heatmap-C9k81DDp.js → vue-ui-heatmap-DNvbR504.js} +10 -10
- package/dist/{vue-ui-history-plot-Cz4rOch3.cjs → vue-ui-history-plot-B1zXFmOc.cjs} +1 -1
- package/dist/{vue-ui-history-plot-BWuqP7cL.js → vue-ui-history-plot-MfnR_Gg0.js} +11 -11
- package/dist/{vue-ui-kpi-DPwY24JT.js → vue-ui-kpi-DDMCa5qe.js} +3 -3
- package/dist/{vue-ui-kpi-sHiuWUD6.cjs → vue-ui-kpi-Dm71j1ZP.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-OuKZN9HN.cjs → vue-ui-mini-loader-CROjVz1w.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-CWXeBzw9.js → vue-ui-mini-loader-mMxdW73Y.js} +2 -2
- package/dist/{vue-ui-molecule-BxWIQrOy.js → vue-ui-molecule-BHUWRS5i.js} +11 -11
- package/dist/{vue-ui-molecule-oHkRoNBr.cjs → vue-ui-molecule-BulwtJre.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-DCxDtpf3.cjs → vue-ui-mood-radar-BhS9UcqE.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-Cd7HI8bj.js → vue-ui-mood-radar-CUWTjV4S.js} +11 -11
- package/dist/{vue-ui-nested-donuts-BoXT5OAw.js → vue-ui-nested-donuts-BQk9K-uM.js} +11 -11
- package/dist/{vue-ui-nested-donuts-CXFtb1M0.cjs → vue-ui-nested-donuts-Db_lFOB1.cjs} +1 -1
- package/dist/{vue-ui-onion-DYgInDb8.cjs → vue-ui-onion-C38MS0We.cjs} +1 -1
- package/dist/{vue-ui-onion-Dxss5Mnb.js → vue-ui-onion-CEP_SVGa.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-Bs7704DX.cjs → vue-ui-parallel-coordinate-plot-DOER4ePV.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-C-K9WUQq.js → vue-ui-parallel-coordinate-plot-DlIPqsBr.js} +12 -12
- package/dist/{vue-ui-quadrant-CgBI3znD.cjs → vue-ui-quadrant-BzA3R8WL.cjs} +1 -1
- package/dist/{vue-ui-quadrant-ol8blyLN.js → vue-ui-quadrant-hEW2euTx.js} +12 -12
- package/dist/{vue-ui-quick-chart-BoPihMU7.js → vue-ui-quick-chart-D43_sxe7.js} +9 -9
- package/dist/{vue-ui-quick-chart-Ds8vvott.cjs → vue-ui-quick-chart-vCYn3Ycg.cjs} +1 -1
- package/dist/{vue-ui-radar-Bq9yv1Nz.cjs → vue-ui-radar-CrPGLRgF.cjs} +1 -1
- package/dist/{vue-ui-radar-BYikeYez.js → vue-ui-radar-ea-S6hNo.js} +12 -12
- package/dist/{vue-ui-rating-CS87Hplo.js → vue-ui-rating-Cr7OYhms.js} +2 -2
- package/dist/{vue-ui-rating-CIgPOsF9.cjs → vue-ui-rating-DQhxPqnC.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-B1_IFEQE.js → vue-ui-relation-circle-BD63yYPk.js} +7 -7
- package/dist/{vue-ui-relation-circle-DYB4yUiA.cjs → vue-ui-relation-circle-Ci_zTDv6.cjs} +1 -1
- package/dist/{vue-ui-rings-BnNg87-v.js → vue-ui-rings-Dup7cJhU.js} +12 -12
- package/dist/{vue-ui-rings-Doe8Q28H.cjs → vue-ui-rings-o_5TelyF.cjs} +1 -1
- package/dist/{vue-ui-scatter-CXwmuMIU.js → vue-ui-scatter-CpUvuCj4.js} +12 -12
- package/dist/{vue-ui-scatter-CKRjkm-h.cjs → vue-ui-scatter-D1p3fd_k.cjs} +1 -1
- package/dist/{vue-ui-skeleton-5g5yLLM4.cjs → vue-ui-skeleton-BGykkjYQ.cjs} +1 -1
- package/dist/{vue-ui-skeleton-8OZ9rJXh.js → vue-ui-skeleton-BjminQzl.js} +3 -3
- package/dist/{vue-ui-smiley-CqN-vQye.cjs → vue-ui-smiley-BtpjYEEP.cjs} +1 -1
- package/dist/{vue-ui-smiley-CzqaH8_8.js → vue-ui-smiley-CFKscwS7.js} +2 -2
- package/dist/{vue-ui-spark-trend-yVxR7PiI.cjs → vue-ui-spark-trend-CRcDMTzh.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-DK6gOZHz.js → vue-ui-spark-trend-wAANMLZ4.js} +5 -5
- package/dist/{vue-ui-sparkbar-BKOe_Cee.js → vue-ui-sparkbar-BTUT-uco.js} +4 -4
- package/dist/{vue-ui-sparkbar-rR2c2FDd.cjs → vue-ui-sparkbar-BVh9AOEX.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-C7OYH1Fs.cjs → vue-ui-sparkgauge-B_N07sh6.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-RN8tIAc9.js → vue-ui-sparkgauge-DXxoZfG0.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-__Vd5tky.cjs → vue-ui-sparkhistogram-CHbsbOtx.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-Zzy9jGiy.js → vue-ui-sparkhistogram-cSUQzQ6o.js} +5 -5
- package/dist/{vue-ui-sparkline-DDWOEIzY.cjs → vue-ui-sparkline-Cr5KANZ_.cjs} +1 -1
- package/dist/{vue-ui-sparkline-liB_Hmaq.js → vue-ui-sparkline-_wbJMVVr.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-COJVT609.js → vue-ui-sparkstackbar-D93-i-tg.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-BrpeJTzl.cjs → vue-ui-sparkstackbar-SRvQImaw.cjs} +1 -1
- package/dist/{vue-ui-stackbar-B8f8IS8C.js → vue-ui-stackbar-CnZsiebh.js} +13 -13
- package/dist/{vue-ui-stackbar-DtHaJXGD.cjs → vue-ui-stackbar-D3KicC2k.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-CVKQziT5.js → vue-ui-strip-plot-Dv-C246v.js} +11 -11
- package/dist/{vue-ui-strip-plot-Dp816JKq.cjs → vue-ui-strip-plot-Dz8doRxV.cjs} +1 -1
- package/dist/{vue-ui-table-D1Kid804.js → vue-ui-table-Dkoj_poY.js} +198 -162
- package/dist/{vue-ui-table-heatmap-Do-ARjlq.cjs → vue-ui-table-heatmap-C8Vi0yvC.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-COLSO8dn.js → vue-ui-table-heatmap-CYuY_cv8.js} +4 -4
- package/dist/vue-ui-table-iE1t-zP9.cjs +14 -0
- package/dist/{vue-ui-table-sparkline-CKETpujG.js → vue-ui-table-sparkline-B76wcNNt.js} +5 -5
- package/dist/{vue-ui-table-sparkline-nTd1T2Nq.cjs → vue-ui-table-sparkline-C4REu4fs.cjs} +1 -1
- package/dist/{vue-ui-thermometer-DiCuDyU3.js → vue-ui-thermometer-DiZILoae.js} +7 -7
- package/dist/{vue-ui-thermometer-BZyDvYE0.cjs → vue-ui-thermometer-DvNlCnAL.cjs} +1 -1
- package/dist/{vue-ui-timer-CkfRiOdo.cjs → vue-ui-timer-DUN6vOs9.cjs} +1 -1
- package/dist/{vue-ui-timer-DULQQyad.js → vue-ui-timer-DxYKc_c7.js} +5 -5
- package/dist/{vue-ui-tiremarks-D_-IhOIM.cjs → vue-ui-tiremarks-BV7MTnlS.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-CxSfMNfB.js → vue-ui-tiremarks-D52pzq2N.js} +7 -7
- package/dist/{vue-ui-treemap-uNR6Swq2.js → vue-ui-treemap-CNbw7CLO.js} +12 -12
- package/dist/{vue-ui-treemap-Bom01mr7.cjs → vue-ui-treemap-gQhTSE_P.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-B-HEGjmy.js → vue-ui-vertical-bar-B_nsQpZa.js} +12 -12
- package/dist/{vue-ui-vertical-bar-BCyVbfNP.cjs → vue-ui-vertical-bar-ClJttiMf.cjs} +1 -1
- package/dist/{vue-ui-waffle-B6zy86qy.cjs → vue-ui-waffle-BYBctA3T.cjs} +1 -1
- package/dist/{vue-ui-waffle-CI6IaCpT.js → vue-ui-waffle-CLfNk30s.js} +12 -12
- package/dist/{vue-ui-wheel-B_ZTQj8n.js → vue-ui-wheel-4Yit1iRJ.js} +7 -7
- package/dist/{vue-ui-wheel-DZfrwJOK.cjs → vue-ui-wheel-Bj6lxA5M.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-B7KEJYTm.cjs → vue-ui-word-cloud-AZ1OJrxo.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-B8Da_fNw.js → vue-ui-word-cloud-D94M5Lsf.js} +10 -10
- package/dist/vue-ui-world-BwcOIaHG.cjs +19 -0
- package/dist/vue-ui-world-rkzHCxBG.js +929 -0
- package/dist/{vue-ui-xy-DBRrNTNO.cjs → vue-ui-xy-DJiY5DSr.cjs} +2 -2
- package/dist/{vue-ui-xy-CZvUtKRw.js → vue-ui-xy-DXgpQ8zr.js} +16 -16
- package/dist/{vue-ui-xy-canvas-BZFEUjUp.js → vue-ui-xy-canvas-CAfAcJWj.js} +12 -12
- package/dist/{vue-ui-xy-canvas-CuKeAw-R.cjs → vue-ui-xy-canvas-DsuvSNM3.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-CRA3TjQQ.cjs +0 -9
- package/dist/vue-ui-table-CwRXfETT.cjs +0 -14
- package/dist/vue-ui-world-BRaOylAI.js +0 -908
- package/dist/vue-ui-world-B_tKcYOS.cjs +0 -19
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-DjDcQ8pe.cjs"),$=require("./useNestedProp-BS9eJthK.cjs"),w=require("./usePrinter-vFXYgZiT.cjs"),q=require("./Shape-DuVb3Mev.cjs"),G=require("./useUserOptionState-BgepsfED.cjs"),H=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),L=["id"],A={role:"cell"},D={role:"row"},X=["data-cell"],W={key:0,style:{display:"flex","flex-direction":"row",gap:"2px","align-items":"center"}},J=["height","width"],K={key:0,role:"cell","data-cell":"sum"},Q={key:1,role:"cell","data-cell":"average"},Y={key:2,role:"cell","data-cell":"median"},Z={key:1,ref:"source",dir:"auto"},j={__name:"vue-ui-table-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(P,{expose:N}){e.useCssVars(t=>({"1e8210e3":T.value,"7fb93384":R.value}));const{vue_ui_table_heatmap:E}=a.useConfig(),d=P,p=e.ref(a.createUid()),s=e.ref(!1),c=e.ref(null),m=e.ref(!1),f=e.ref(0),V=e.useSlots();e.onMounted(()=>{V["chart-background"]&&console.warn("VueUiTableHeatmap does not support the #chart-background slot.")});const o=e.computed({get:()=>y(),set:t=>t}),{userOptionsVisible:v,setUserOptionsVisibility:g,keepUserOptionState:h}=G.useUserOptionState({config:o.value});function y(){const t=$.useNestedProp({userConfig:d.config,defaultConfig:E});return t.theme?{...$.useNestedProp({userConfig:a.themes.vue_ui_table_heatmap[t.theme]||d.config,defaultConfig:t})}:t}e.watch(()=>d.config,t=>{o.value=y(),v.value=!o.value.userOptions.showOnChartHover,C()},{deep:!0});const{isPrinting:O,isImaging:x,generatePdf:k,generateImage:b}=w.usePrinter({elementId:`table_heatmap_${p.value}`,fileName:"vue-ui-table-heatmap",options:o.value.userOptions.print}),F=e.computed(()=>o.value.table.responsiveBreakpoint),z=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(()=>{C()});function C(){a.objectIsEmpty(d.dataset)&&a.error({componentName:"VueUiTableHeatmap",type:"dataset"});const t=new ResizeObserver(r=>{r.forEach(n=>{s.value=n.contentRect.width<F.value})});c.value&&t.observe(c.value)}const _=e.computed(()=>d.dataset.map(t=>{const r=t.values.map(l=>isNaN(l)?0:l),n=r.reduce((l,i)=>l+i,0);return{...t,values:r,serieExtremes:{max:Math.max(...r),min:Math.min(...r)},sum:n,average:n/r.length,median:a.calcMedian(r),displayValues:[t.name,...t.values],id:a.createUid()}})),B=e.computed(()=>{const t=_.value.flatMap(r=>r.values);return{min:Math.min(...t),max:Math.max(...t)}});function M(t,r){const n=o.value.style.heatmapColors.useIndividualScale;return a.interpolateColorHex(o.value.style.heatmapColors.min,o.value.style.heatmapColors.max,n?r.min:B.value.min,n?r.max:B.value.max,t)}const I=e.computed(()=>_.value.map(t=>({...t,colors:t.displayValues.map(r=>isNaN(r)?o.value.style.backgroundColor:M(r,t.serieExtremes))}))),R=e.computed(()=>o.value.style.backgroundColor),T=e.computed(()=>`${o.value.table.borderWidth}px`);function S(){e.nextTick(()=>{const t=I.value.map(l=>[[l.name],l.displayValues,[l.sum],[l.average],[l.median]]),r=[[[""],o.value.table.head.values,["sum"],["average"],["median"]]].concat(t),n=a.createCsvContent(r);a.downloadCsv({csvContent:n,title:"vue-ui-table-heatmap"})})}function U(t){m.value=t,f.value+=1}return N({generatePdf:k,generateCsv:S,generateImage:b}),(t,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:c,style:e.normalizeStyle(`width:100%; overflow-x:auto; container-type: inline-size;padding-top:${o.value.userOptions.show?"36px":""}; ${m.value?"vue-data-ui-wrapper-fullscreen":""}; position:relative;`),class:e.normalizeClass({"vue-ui-responsive":s.value}),id:`table_heatmap_${p.value}`,onMouseenter:r[0]||(r[0]=()=>e.unref(g)(!0)),onMouseleave:r[1]||(r[1]=()=>e.unref(g)(!1))},[o.value.userOptions.show&&z.value&&(e.unref(h)||e.unref(v))?(e.openBlock(),e.createBlock(w.UserOptions,{ref:"details",key:`user_option_${f.value}`,backgroundColor:o.value.style.backgroundColor,color:o.value.style.color,isPrinting:e.unref(O),isImaging:e.unref(x),uid:p.value,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasFullscreen:o.value.userOptions.buttons.fullscreen,isFullscreen:m.value,titles:{...o.value.userOptions.buttonTitles},chartElement:c.value,position:o.value.userOptions.position,onToggleFullscreen:U,onGeneratePdf:e.unref(k),onGenerateCsv:S,onGenerateImage:e.unref(b),style:e.normalizeStyle({visibility:e.unref(h)?e.unref(v)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:n,color:l})=>[e.renderSlot(t.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:n,color:l})),void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:l})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:l})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),e.createElementVNode("table",{class:e.normalizeClass({"vue-ui-table-heatmap":!0}),style:e.normalizeStyle(`width:100%;font-family:${o.value.style.fontFamily};background:${o.value.style.backgroundColor};`)},[e.createElementVNode("caption",null,[e.renderSlot(t.$slots,"caption",{},void 0,!0)]),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${o.value.table.head.backgroundColor};color:${o.value.table.head.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value.table.head.values,(n,l)=>(e.openBlock(),e.createElementBlock("th",A,[e.renderSlot(t.$slots,"head",e.mergeProps({ref_for:!0},{value:n,rowIndex:l,type:typeof n,isResponsive:s.value}),void 0,!0)]))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(n,l)=>(e.openBlock(),e.createElementBlock("tr",D,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.displayValues,(i,u)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":o.value.table.head.values[u]},[n.color&&u===0?(e.openBlock(),e.createElementBlock("div",W,[n.color?(e.openBlock(),e.createElementBlock("svg",{key:0,height:o.value.style.shapeSize,width:o.value.style.shapeSize,viewBox:"0 0 20 20",style:{background:"none",overflow:"visible"}},[e.createVNode(q._sfc_main,{plot:{x:10,y:10},color:n.color,radius:9,shape:n.shape||"circle"},null,8,["color","shape"])],8,J)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"rowTitle",e.mergeProps({ref_for:!0},{value:i,rowIndex:l,colIndex:u,type:typeof i,isResponsive:s.value}),void 0,!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[u===0?e.renderSlot(t.$slots,"rowTitle",e.mergeProps({key:0,ref_for:!0},{value:i,rowIndex:l,colIndex:u,type:typeof i,isResponsive:s.value}),void 0,!0):e.createCommentVNode("",!0),u>0?e.renderSlot(t.$slots,"cell",e.mergeProps({key:1,ref_for:!0},{value:i,rowIndex:l,colIndex:u,type:typeof i,isResponsive:s.value,color:n.colors[u],textColor:e.unref(a.adaptColorToBackground)(n.colors[u])}),void 0,!0):e.createCommentVNode("",!0)],64))],8,X))),256)),o.value.table.showSum?(e.openBlock(),e.createElementBlock("td",K,[e.renderSlot(t.$slots,"sum",e.mergeProps({ref_for:!0},{value:n.sum,rowIndex:l,isResponsive:s.value}),void 0,!0)])):e.createCommentVNode("",!0),o.value.table.showAverage?(e.openBlock(),e.createElementBlock("td",Q,[e.renderSlot(t.$slots,"average",e.mergeProps({ref_for:!0},{value:n.average,rowIndex:l,isResponsive:s.value}),void 0,!0)])):e.createCommentVNode("",!0),o.value.table.showMedian?(e.openBlock(),e.createElementBlock("td",Y,[e.renderSlot(t.$slots,"median",e.mergeProps({ref_for:!0},{value:n.median,rowIndex:l,isResponsive:s.value}),void 0,!0)])):e.createCommentVNode("",!0)]))),256))])],4),t.$slots.source?(e.openBlock(),e.createElementBlock("div",Z,[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],46,L))}},ee=H._export_sfc(j,[["__scopeId","data-v-dd493d6a"]]);exports.default=ee;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useCssVars as te, computed as v, ref as h, useSlots as ae, onMounted as z, watch as oe, createElementBlock as l, openBlock as n, unref as u, normalizeClass as E, normalizeStyle as C, createBlock as se, createCommentVNode as c, createElementVNode as g, createSlots as ne, withCtx as b, renderSlot as r, normalizeProps as G, guardReactiveProps as B, Fragment as k, renderList as w, mergeProps as f, createVNode as le, nextTick as re } from "vue";
|
|
2
|
-
import { u as ue, c as H, a as ie, o as de, e as pe, a4 as ve, G as ce, O as me, q as fe, r as he } from "./index-
|
|
3
|
-
import { u as A } from "./useNestedProp-
|
|
4
|
-
import { u as ge, U as be } from "./usePrinter-
|
|
5
|
-
import { _ as ye } from "./Shape-
|
|
2
|
+
import { u as ue, c as H, a as ie, o as de, e as pe, a4 as ve, G as ce, O as me, q as fe, r as he } from "./index-9ZicrZWM.js";
|
|
3
|
+
import { u as A } from "./useNestedProp-s1XZrtPS.js";
|
|
4
|
+
import { u as ge, U as be } from "./usePrinter-D7IXLE53.js";
|
|
5
|
+
import { _ as ye } from "./Shape-Hrc-BQkc.js";
|
|
6
6
|
import { u as Ce } from "./useUserOptionState-BIvW1Kz7.js";
|
|
7
7
|
import { _ as ke } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
const _e = ["id"], Ie = { role: "cell" }, $e = { role: "row" }, we = ["data-cell"], Oe = {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index-DjDcQ8pe.cjs"),e=require("vue"),k=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),b={name:"vue-ui-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},data(){return{uid:`vue-ui-table-${Math.random()}`,bodyCopy:JSON.parse(JSON.stringify(this.dataset.body)).map((n,o)=>({...n,absoluteIndex:o})),buttonTimeout:null,canMoveChart:!1,chart:{height:316,type:"bar",width:512},constants:{ASC:1,BAR:"bar",DATE:"date",DESC:-1,DONUT:"donut",LINE:"line",NUMERIC:"numeric",PERCENTAGE:"percentage",TEXT:"text"},clientX:100,clientY:100,cssClass:{CELL:"smart-td-selected",FIRST_TD:"smart-td-selected-first",LAST_TD:"smart-td-selected-last",ROW:"smart-td-selected-neighbor"},currentDonut:void 0,currentFilter:void 0,currentSearch:void 0,currentSelectionSpan:{col:void 0,rows:[]},currentPage:0,dates:{},filteredDatesIndexes:{},hasNaN:{},iconColor:"#2D353C",iconSize:20,immutableRangeFilters:{},isExportRequest:!1,isLoading:!1,itemsPerPage:this.config.rowsPerPage?this.config.rowsPerPage:25,multiselects:{},paginatorOptions:[...new Set([10,25,50,100,250,500,this.config.rowsPerPage?this.config.rowsPerPage:25,this.dataset.body.length])].sort((n,o)=>n-o),palette:g.palette,percentages:{},rafId:null,rangeFilters:{},searches:{},selectedColumn:void 0,selectedDonutCategory:void 0,selectedPlot:void 0,showChart:!1,showDonutOptions:!1,sorts:{},tableBody:JSON.parse(JSON.stringify(this.dataset.body)).map((n,o)=>({...n,absoluteIndex:o})),tableHead:JSON.parse(JSON.stringify(this.dataset.header)).map(n=>({average:Object.hasOwn(n,"average")?n.average:!1,decimals:Object.hasOwn(n,"decimals")?n.decimals:0,isMultiselect:Object.hasOwn(n,"isMultiselect")?n.isMultiselect:!1,isPercentage:Object.hasOwn(n,"isPercentage")?n.isPercentage:!1,isSearch:Object.hasOwn(n,"isSearch")?n.isSearch:!1,isSort:Object.hasOwn(n,"isSort")?n.isSort:!1,name:n.name,percentageTo:Object.hasOwn(n,"percentageTo")?n.percentageTo:void 0,prefix:Object.hasOwn(n,"prefix")?n.prefix:"",rangeFilter:Object.hasOwn(n,"rangeFilter")?n.rangeFilter:!1,suffix:Object.hasOwn(n,"suffix")?n.suffix:"",sum:Object.hasOwn(n,"sum")?n.sum:!1,type:n.type}))}},mounted(){if(this.dataset.header.length===0)throw new Error(`vue-ui-table error: missing header data.
|
|
2
|
+
Provide an array of objects of type:
|
|
3
|
+
{
|
|
4
|
+
name: string;
|
|
5
|
+
type: string; ('text' | 'numeric' | 'date')
|
|
6
|
+
average: boolean;
|
|
7
|
+
decimals: number | undefined;
|
|
8
|
+
sum: boolean;
|
|
9
|
+
isSort:boolean;
|
|
10
|
+
isSearch: boolean;
|
|
11
|
+
isMultiselect: boolean;
|
|
12
|
+
isPercentage: boolean;
|
|
13
|
+
percentageTo: string; (or '')
|
|
14
|
+
}`);if(this.dataset.body.length===0)throw new Error("vue-ui-table error: missing body data");this.isLoading=!0,this.promiseWithAsyncFunction(this.prepareBodyCopy,()=>{this.$forceUpdate(),this.isLoading=!1}),document.addEventListener("keydown",l=>{const n=document.activeElement;(n&&Array.from(n.classList).includes("td-focusable")&&l.key.includes("Arrow")||l.code==="Space")&&l.preventDefault()})},watch:{showChart:function(l){l&&this.$nextTick(()=>{this.closeDragElement();const n=this.$refs.chartModal;n.onmousedown=this.dragMouseDown})},dataset:{handler(l){this.isLoading=!0,this.bodyCopy=JSON.parse(JSON.stringify(l.body)).map((n,o)=>({...n,absoluteIndex:o})),this.tableBody=JSON.parse(JSON.stringify(l.body)).map((n,o)=>({...n,absoluteIndex:o})),this.tableHead=JSON.parse(JSON.stringify(l.header)).map(n=>({average:Object.hasOwn(n,"average")?n.average:!1,decimals:Object.hasOwn(n,"decimals")?n.decimals:0,isMultiselect:Object.hasOwn(n,"isMultiselect")?n.isMultiselect:!1,isPercentage:Object.hasOwn(n,"isPercentage")?n.isPercentage:!1,isSearch:Object.hasOwn(n,"isSearch")?n.isSearch:!1,isSort:Object.hasOwn(n,"isSort")?n.isSort:!1,name:n.name,percentageTo:Object.hasOwn(n,"percentageTo")?n.percentageTo:void 0,prefix:Object.hasOwn(n,"prefix")?n.prefix:"",rangeFilter:Object.hasOwn(n,"rangeFilter")?n.rangeFilter:!1,suffix:Object.hasOwn(n,"suffix")?n.suffix:"",sum:Object.hasOwn(n,"sum")?n.sum:!1,type:n.type})),this.currentSelectionSpan={col:void 0,rows:[]},this.selectedColumn=void 0,this.itemsPerPage=this.config.rowsPerPage?this.config.rowsPerPage:25,this.percentages={},this.dates={},this.filteredDatesIndexes={},this.hasNaN={},this.immutableRangeFilters={},this.rangeFilters={},this.multiselects={},this.searches={},this.sorts={},this.showChart=!1,this.currentDonut=void 0,this.selectedDonutCategory=void 0,this.selectedPlot=void 0,this.showDonutOptions=!1,this.currentSelectionSpan.col=void 0,this.currentSelectionSpan.rows=[],this.promiseWithAsyncFunction(this.prepareBodyCopy,()=>{this.$forceUpdate(),this.updateCurrentPage(),this.isLoading=!1})},deep:!0,immediate:!1}},computed:{availableDonutCategories(){return Object.keys(this.multiselects).map(l=>({index:l,name:this.dataset.header[l].name,options:this.multiselects[l]}))},canChart(){return this.FINAL_CONFIG.useChart&&this.currentSelectionSpan.rows.length>1},chartData(){if(!this.canChart)return[];const l=316,n=512,o=this.currentSelectionSpan.rows.length,c=n/o,r=Math.max(...this.currentSelectionSpan.rows.map(h=>h.value)),t=Math.min(...this.currentSelectionSpan.rows.map(h=>h.value)),s=t>=0?0:Math.abs(t),a=r+s,i=r<0&&t<0,u=this.dataset.header[this.currentSelectionSpan.col].isPercentage,d=this.currentSelectionSpan.rows.map((h,N)=>({x:c*N+c/2,y:(1-(h.value+s)/a)*l,value:u?h.value*100:h.value,suffix:u?"%":this.dataset.header[this.currentSelectionSpan.col].suffix?this.dataset.header[this.currentSelectionSpan.col].suffix:"",prefix:this.dataset.header[this.currentSelectionSpan.col].prefix?this.dataset.header[this.currentSelectionSpan.col].prefix:"",index:h.index,absoluteValue:u?Math.abs(h.value)*100:Math.abs(h.value)})),y=l-l*(s/a);return{isAllNegative:i,zero:y,plots:d,slot:c,progression:d.length>=2?this.calcLinearProgression(d):!1}},donutHollowLabels(){return{total:Number((this.currentDonut.map(l=>l.absoluteValue).reduce((l,n)=>l+n,0)*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),average:Number((this.currentDonut.map(l=>l.absoluteValue).reduce((l,n)=>l+n,0)/this.currentSelectionSpan.rows.length*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()}},hasNumericTypes(){return this.dataset.header.map(l=>l.type).includes(this.constants.NUMERIC)},icons(){return{arrowSort:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" 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="M3 9l4 -4l4 4m-4 -4v14" /><path d="M21 15l-4 4l-4 -4m4 4v-14" /></svg>`,bar:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" 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="M3 12m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M9 8m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M15 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M4 20l14 0" /></svg>`,chart:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" 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="M4 19l16 0" /><path d="M4 15l4 -6l4 2l4 -5l4 4" /></svg>`,chevronDown:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" 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="M6 9l6 6l6 -6" /></svg>`,chevronLeft:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*1.6}" height="${this.iconSize*1.6}" 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="M15 6l-6 6l6 6" /></svg>`,chevronRight:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*1.6}" height="${this.iconSize*1.6}" 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="M9 6l6 6l-6 6" /></svg>`,donut:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*.8}" height="${this.iconSize*.8}" 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="M12 3v5m4 4h5" /><path d="M8.929 14.582l-3.429 2.918" /><path d="M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" /><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /></svg>`,export:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" 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="M12.5 21h-7.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7.5" /><path d="M3 10h18" /><path d="M10 3v18" /><path d="M16 19h6" /><path d="M19 16l3 3l-3 3" /></svg>`,fileDownload:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" 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="M14 3v4a1 1 0 0 0 1 1h4" /><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /><path d="M12 17v-6" /><path d="M9.5 14.5l2.5 2.5l2.5 -2.5" /></svg>`,filter:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" 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="M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z" /></svg>`,move:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" 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 9l3 3l-3 3" /><path d="M15 12h6" /><path d="M6 9l-3 3l3 3" /><path d="M3 12h6" /><path d="M9 18l3 3l3 -3" /><path d="M12 15v6" /><path d="M15 6l-3 -3l-3 3" /><path d="M12 3v6" /></svg>`,sort09:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" 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="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 3a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 16m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 16v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,sort90:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" 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="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 14a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 5v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,sortAZ:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" 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="M15 10v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 21h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,sortZA:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" 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="M15 21v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 10h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,sum:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" 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>`,table:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" fill="white" d="M 10 2, 21 2, 21 21, 10 21Z"/><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z" /><path d="M3 10h18" /><path d="M10 3v18" /></svg>`,warning:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*.8}" height="${this.iconSize*.8}" 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="M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z" /><path d="M12 9v4" /><path d="M12 17h.01" /></svg>`}},pages(){const l=[];if(this.bodyCopy.length)for(let n=0;n<this.bodyCopy.length;n+=this.itemsPerPage)l.push(this.bodyCopy.slice(n,n+this.itemsPerPage));return l},rows(){return this.bodyCopy.map(l=>l.td)},selectedCellsCalculations(){return{sumPercentage:Number((this.currentSelectionSpan.rows.map(l=>l.value).reduce((l,n)=>l+n,0)*100).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),sumRegular:Number(this.currentSelectionSpan.rows.map(l=>l.value).reduce((l,n)=>l+n,0).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),averagePercentage:Number((this.currentSelectionSpan.rows.map(l=>l.value).reduce((l,n)=>l+n,0)/this.currentSelectionSpan.rows.length*100).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),averageRegular:Number((this.currentSelectionSpan.rows.map(l=>l.value).reduce((l,n)=>l+n,0)/this.currentSelectionSpan.rows.length).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()}},FINAL_CONFIG(){const{vue_ui_table:l}=g.useConfig();if(!Object.keys(this.config||{}).length)return l;const n=this.treeShake({defaultConfig:l,userConfig:this.config});return this.convertConfigColors(n)},visibleRows(){return this.pages[this.currentPage]}},methods:{treeShake:g.treeShake,makeDonut:g.makeDonut,convertColorToHex:g.convertColorToHex,convertConfigColors:g.convertConfigColors,createCsvContent:g.createCsvContent,downloadCsv:g.downloadCsv,applyDonutOption(){const l=this.selectedDonutCategory.options.map((n,o)=>({name:n,color:this.palette[o]||this.palette[o%this.palette.length],value:this.visibleRows.filter((c,r)=>c.td[this.selectedDonutCategory.index]===n&&this.currentSelectionSpan.rows.map(t=>t.index).includes(r)).map(c=>c.td[this.currentSelectionSpan.col]).reduce((c,r)=>Math.abs(c)+Math.abs(r),0),absoluteValue:this.visibleRows.filter((c,r)=>c.td[this.selectedDonutCategory.index]===n&&this.currentSelectionSpan.rows.map(t=>t.index).includes(r)).map(c=>c.td[this.currentSelectionSpan.col]).reduce((c,r)=>c+r,0)})).sort((n,o)=>o.value-n.value);this.currentDonut=this.makeDonut({series:l},50,50,30,30),this.$nextTick(()=>{this.chart.type=this.constants.DONUT,this.showDonutOptions=!1})},calcRectY(l,n){return l>=0?n:this.chartData.zero},canResetColumn(l,n){return!this.hasNaN[l]&&(n.isSort||n.isSearch||n.isMultiselect||n.rangeFilter)&&![this.constants.DATE].includes(n.type)},createXls(l="all"){const n=this.dataset.header.map(t=>t.name),o=l==="all"?this.bodyCopy.map(t=>t.td):this.visibleRows.map(t=>t.td),c=[n].concat(o),r=this.createCsvContent(c);this.downloadCsv({csvContent:r,title:"vue-ui-table"})},calcLinearProgression:g.calcLinearProgression,closeAllDropdowns(){const l=document.getElementsByClassName("th-dropdown");l.length&&Array.from(l).forEach(n=>{n.dataset.isOpen=!1})},debounce(l,n){let o;clearTimeout(o),o=setTimeout(l,n)},filterBody(){this.bodyCopy=this.tableBody.filter(l=>{for(const n in this.searches)if(!l.td[n].toUpperCase().includes(this.searches[n].toUpperCase()))return!1;for(const n in this.multiselects)if(!this.multiselects[n].some(c=>c===l.td[n]))return!1;for(const n in this.dates){const o=new Date(l.td[n]),c=new Date(this.dates[n].from),r=new Date(this.dates[n].to);if(o<c||o>r)return!1}return!0}),this.sortBody()},getAverage(l){return this.rows.map(n=>n[l]).map(n=>isNaN(Number(n))?0:n).reduce((n,o)=>n+o,0)/this.bodyCopy.length},getDatesRange(l){const n=this.dataset.body.map(h=>new Date(h.td[l])),o=new Date(Math.min(...n)),c=new Date(Math.max(...n)),r=o.getFullYear(),t=c.getFullYear(),s=String(o.getMonth()+1).padStart(2,"0"),a=String(c.getMonth()+1).padStart(2,"0"),i=String(o.getDate()).padStart(2,"0"),u=String(c.getDate()).padStart(2,"0"),d=`${r}-${s}-${i}`,y=`${t}-${a}-${u}`;return{from:d,to:y}},getDonutLegendValue(l){return Number((l*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()},getDropdownOptions(l){return[...new Set(this.dataset.body.map(n=>n.td[l]))]},getSum(l){return this.rows.map(n=>n[l]).map(n=>isNaN(Number(n))?0:n).reduce((n,o)=>n+o,0)},includesNaN(l){return l.includes(NaN)},isDropdownOptionSelected(l,n){return this.multiselects[n]?this.multiselects[n].includes(l):!0},isNumeric(l){return!isNaN(Number(String(l).replaceAll("%","")))},isResetDisabled(l,n){const o=n.isSort,c=n.isSearch,r=n.isMultiselect&&this.multiselects[l],t=n.rangeFilter,s=a=>{if(t&&this.rangeFilters[a])return Math.round(this.rangeFilters[a].min)===this.immutableRangeFilters[a].min&&Math.round(this.rangeFilters[a].max)===this.immutableRangeFilters[a].max};if(o&&c&&r&&t)return["",void 0].includes(this.searches[l])&&[void 0].includes(this.sorts[l])&&this.multiselects[l].length===this.getDropdownOptions(l).length&&s(l);if(o&&c&&r)return["",void 0].includes(this.searches[l])&&[void 0].includes(this.sorts[l])&&this.multiselects[l].length===this.getDropdownOptions(l).length;if(o&&c&&t)return["",void 0].includes(this.searches[l])&&[void 0].includes(this.sorts[l])&&s(l);if(o&&c)return["",void 0].includes(this.searches[l])&&[void 0].includes(this.sorts[l]);if(o&&r&&t)return[void 0].includes(this.sorts[l])&&this.multiselects[l].length===this.getDropdownOptions(l).length&&s(l);if(o&&r)return[void 0].includes(this.sorts[l])&&this.multiselects[l].length===this.getDropdownOptions(l).length;if(c&&r&&t)return["",void 0].includes(this.searches[l])&&this.multiselects[l].length===this.getDropdownOptions(l).length&&s(l);if(c&&r)return["",void 0].includes(this.searches[l])&&this.multiselects[l].length===this.getDropdownOptions(l).length;if(c&&t)return["",void 0].includes(this.searches[l])&&s(l);if(c)return["",void 0].includes(this.searches[l]);if(o&&t)return[void 0].includes(this.sorts[l])&&s(l);if(o)return[void 0].includes(this.sorts[l]);if(r&&t)return this.multiselects[l].length===this.getDropdownOptions(l).length&&s(l);if(r)return this.multiselects[l].length===this.getDropdownOptions(l).length},navigate(l){this.resetSelection(),l==="next"&&this.currentPage<this.pages.length?this.currentPage+=1:l==="previous"&&this.currentPage>=1?this.currentPage-=1:this.currentPage=l-1,this.$refs.tableWrapper.scrollTo({top:0,left:0,behavior:"smooth"})},navigateCell(l){l.preventDefault();const n=l.keyCode,o=38,c=40,r=37,t=39;if(![o,c,r,t].includes(n))return;const s=l.target.id,a=/cell_(\d+)_(\d+)_vue-ui-table-(\d+)/,i=s.match(a),u=parseInt(i[1]),d=parseInt(i[2]),y=document.getElementById(`cell_${u}_${d+1}_${this.uid}`),h=document.getElementById(`cell_${u}_${d-1}_${this.uid}`),N=document.getElementById(`cell_${u+1}_${d}_${this.uid}`),p=document.getElementById(`cell_${u-1}_${d}_${this.uid}`);let m;switch(!0){case n===t:m=y;break;case n===r:m=h;break;case n===o:m=p;break;case n===c:m=N;break;default:return}m&&(m.focus(),m.scrollIntoView({behavior:"smooth",block:"center"}))},openDonutOptions(){this.selectedDonutCategory=this.availableDonutCategories[0],this.showDonutOptions=!0},placeLabelOnTopOrBottom({previousPlot:l,currentPlot:n,nextPlot:o}){const c=n.y-38,r=n.y+16;return l&&o?l.value<n.value&&o.value<n.value?c:l.value>n.value&&o.value>n.value?r:(l.value>n.value&&o.value<n.value||l.value<n.value&&o.value>n.value,c):l&&!o?l.value>n.value?r:c:!l&&o&&o.value>n.value?r:c},async prepareBodyCopy(){return new Promise(l=>{const n=[];this.tableHead.forEach((o,c)=>{if(o.isSearch&&Object.assign(this.searches,{[c]:""}),o.isMultiselect&&Object.assign(this.multiselects,{[c]:this.getDropdownOptions(c)}),o.type===this.constants.DATE&&(Object.assign(this.dates,{[c]:this.getDatesRange(c)}),Object.assign(this.filteredDatesIndexes,{[c]:!1})),(o.isPercentage||o.percentageTo)&&Object.assign(this.percentages,{[c]:{reference:o.percentageTo,referenceIndex:this.dataset.header.map(r=>r.name).indexOf(o.percentageTo)}}),o.rangeFilter&&(Object.assign(this.rangeFilters,{[c]:{min:Math.round(Math.min(...this.dataset.body.map(r=>r.td).map(r=>r[c]))),max:Math.round(Math.max(...this.dataset.body.map(r=>r.td).map(r=>r[c])))}}),Object.assign(this.immutableRangeFilters,{[c]:{min:Math.round(Math.min(...this.dataset.body.map(r=>r.td).map(r=>r[c]))),max:Math.round(Math.max(...this.dataset.body.map(r=>r.td).map(r=>r[c])))}})),o.isPercentage){const r=this.dataset.header.map(s=>s.name).indexOf(o.percentageTo),t=this.dataset.body.map(s=>s.td[r]).reduce((s,a)=>s+a,0);n.push([c,r,t])}o.type===this.constants.NUMERIC&&!o.isPercentage&&Object.assign(this.hasNaN,{[c]:this.includesNaN(this.dataset.body.map(r=>Number(r.td[c])))})}),this.bodyCopy.forEach((o,c)=>{n.map(r=>{const[t,s,a]=r;o.td[t]=o.td[s]/a}),o.td.forEach((r,t)=>{this.dataset.header[t].type===this.constants.TEXT&&this.dataset.header[t].isSearch&&(o[t]=this.stringToNumber(r)),this.dataset.header[t].type===this.constants.DATE&&(o[t]=new Date(r).getTime()),this.dataset.header[t].type===this.constants.NUMERIC&&(o[t]=isNaN(Number(r))?t:r),this.tableBody[c][t]=o[t]})}),l(!0)})},promiseWithAsyncFunction(l,n){return new Promise((o,c)=>{l().then(r=>{try{const t=n(r);o(t)}catch(t){c(t)}}).catch(r=>{c(r)})})},resetDates(l){this.dates[l]={from:this.getDatesRange(l).from,to:this.getDatesRange(l).to},this.filteredDatesIndexes[l]=!1,this.$forceUpdate(),this.filterBody()},resetFilter(l,n,o){const c=o.currentTarget;clearTimeout(this.buttonTimeout),c.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{c.classList.remove("clicked")},200),this.currentFilter=void 0,n.rangeFilter&&(this.rangeFilters[l].min=this.immutableRangeFilters[l].min,this.rangeFilters[l].max=this.immutableRangeFilters[l].max),n.isMultiselect?(this.multiselects[l]=this.getDropdownOptions(l),n.type===this.constants.TEXT&&(this.sorts[l]=void 0),n.isSearch&&(this.searches[l]="")):n.type===this.constants.NUMERIC?this.sorts[l]=void 0:n.type===this.constants.TEXT?(this.sorts[l]=void 0,this.searches[l]=""):n.type===this.constants.DATE&&(this.sorts[l]=void 0),this.filterBody()},resetSelection(){const l=document.getElementsByClassName(`tr_${this.uid}`);Array.from(l).forEach(n=>{Array.from(n.getElementsByTagName("td")).forEach(o=>{o.dataset.row==="even"?(o.style.background=this.FINAL_CONFIG.style.rows.even.backgroundColor,o.style.color=this.FINAL_CONFIG.style.rows.even.color):(o.style.background=this.FINAL_CONFIG.style.rows.odd.backgroundColor,o.style.color=this.FINAL_CONFIG.style.rows.odd.color)})}),Array.from(l).forEach(n=>n.dataset.selected="false"),this.currentPage>this.pages.length-1&&(this.currentPage=this.pages.length-1),this.showChart=!1,this.currentDonut=void 0,this.selectedColumn=void 0,this.chart.type=this.constants.BAR,this.currentSelectionSpan={col:void 0,rows:[]},this.clientX=100,this.clientY=100},selectColumn(l){this.currentSelectionSpan.col!==l?(this.visibleRows.forEach((n,o)=>{this.selectTd({td:n.td[l],rowIndex:o,colIndex:l,headerType:this.constants.NUMERIC,event:{currentTarget:document.getElementById(`cell_${o}_${l}_${this.uid}`)}})}),this.selectedColumn=l):(this.selectedColumn=void 0,this.resetSelection())},selectDropdownOption(l,n){this.multiselects[n].includes(l)?this.multiselects[n]=this.multiselects[n].filter(o=>o!==l):this.multiselects[n].push(l),this.$forceUpdate(),this.filterBody()},selectTd({td:l,rowIndex:n,colIndex:o,headerType:c,event:r}){if(c!==this.constants.NUMERIC||isNaN(Number(l))){this.resetSelection();return}this.currentSelectionSpan.col!==o&&this.resetSelection();const t=r.currentTarget.parentNode;this.currentSelectionSpan.col=o,this.currentSelectionSpan.rows.map(s=>s.index).includes(n)?(t.dataset.selected="false",this.currentSelectionSpan.rows=this.currentSelectionSpan.rows.filter(s=>s.index!==n),r.currentTarget.classList.remove(this.cssClass.CELL),Array.from(t.children).forEach((s,a)=>{s.dataset.row==="even"?(s.style.background=this.FINAL_CONFIG.style.rows.even.backgroundColor,s.style.color=this.FINAL_CONFIG.style.rows.even.olor):(s.style.background=this.FINAL_CONFIG.style.rows.odd.backgroundColor,s.style.color=this.FINAL_CONFIG.style.rows.odd.color)}),r.currentTarget.dataset.row==="even"?(r.currentTarget.style.background=this.FINAL_CONFIG.style.rows.even.backgroundColor,r.currentTarget.style.color=this.FINAL_CONFIG.style.rows.even.color):(r.currentTarget.style.background=this.FINAL_CONFIG.style.rows.odd.backgroundColor,r.currentTarget.style.color=this.FINAL_CONFIG.style.rows.odd.color)):(t.dataset.selected="true",this.currentSelectionSpan.rows.push({index:n,value:l}),Array.from(t.children).forEach((s,a)=>{s.dataset.row==="even"?(s.style.background=this.FINAL_CONFIG.style.rows.even.selectedNeighbors.backgroundColor,s.style.color=this.FINAL_CONFIG.style.rows.even.selectedNeighbors.color):(s.style.background=this.FINAL_CONFIG.style.rows.odd.selectedNeighbors.backgroundColor,s.style.color=this.FINAL_CONFIG.style.rows.odd.selectedNeighbors.color)}),r.currentTarget.dataset.row==="odd"?(r.currentTarget.style.background=this.FINAL_CONFIG.style.rows.odd.selectedCell.backgroundColor,r.currentTarget.style.color=this.FINAL_CONFIG.style.rows.odd.selectedCell.color):(r.currentTarget.style.background=this.FINAL_CONFIG.style.rows.even.selectedCell.backgroundColor,r.currentTarget.style.color=this.FINAL_CONFIG.style.rows.even.selectedCell.color)),this.currentSelectionSpan.rows=this.currentSelectionSpan.rows.sort((s,a)=>s.index-a.index),this.chart.type===this.constants.DONUT&&this.currentSelectionSpan.rows.length>0&&this.applyDonutOption()},setFilterDatesIndexes(l){this.filteredDatesIndexes[l]=!(this.getDatesRange(l).from===this.dates[l].from&&this.getDatesRange(l).to===this.dates[l].to)},sortBody(){this.resetSelection(),Object.keys(this.rangeFilters).forEach(l=>{this.filterByRange(this.bodyCopy,l)}),Object.keys(this.sorts).forEach(l=>{this.sortByNumber(this.bodyCopy,l)}),this.currentFilter!==void 0&&this.sortByNumber(this.bodyCopy,this.currentFilter),this.dataset.header.forEach((l,n)=>{if(l.isPercentage){const o=this.percentages[n].referenceIndex,c=this.bodyCopy.map(r=>r.td[o]).reduce((r,t)=>r+t,0);this.bodyCopy.forEach(r=>{r.td[n]=r.td[o]/c})}}),this.currentPage>this.pages.length-1&&(this.currentPage=this.pages.length-1),[-1].includes(this.currentPage)&&(this.currentPage=0),this.$forceUpdate()},filterByRange(l,n){this.bodyCopy=l.filter(o=>o.td[n]>=this.rangeFilters[n].min&&o[n]<=this.rangeFilters[n].max)},sortByNumber(l,n){if(this.sorts[n]===this.constants.ASC&&(l=l.sort((o,c)=>o[n]-c[n])),this.sorts[n]===this.constants.DESC)l=l.sort((o,c)=>c[n]-o[n]);else return 0},sortTh(l,n){this.currentFilter=l;const o=n.currentTarget;clearTimeout(this.buttonTimeout),o.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{o.classList.remove("clicked")},200),this.sorts[l]===1?this.sorts[l]=this.constants.DESC:this.sorts[l]=this.constants.ASC,this.sortBody()},stringToNumber(l){let n=0;for(let o=0;o<l.length;o+=1)n+=l.charCodeAt(o);return n},toggleMultiselect(l,n,o){const c=o.currentTarget;clearTimeout(this.buttonTimeout),c.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{c.classList.remove("clicked")},200);const r=document.getElementById(`th_dropdown_${l}`);r.dataset.isOpen==="false"?r.dataset.isOpen="true":r.dataset.isOpen="false"},updateCurrentPage(l){this.resetSelection(),!l||!l.target.value?this.currentPage=0:this.currentPage=Number(l.target.value)},calcDonutMarkerConnectorColor(l){return l.proportion*100>3?l.color:"transparent"},calcDonutMarkerLabelPositionX(l){return l.center.endX+this.calcMarkerOffset(l,50)},calcMarkerOffset(l,n){return l.center.endX-n>=0?3:-2},displayArcPercentage(l,n){return isNaN(l.value/this.sumValues(n))?0:(l.value/this.sumValues(n)*100).toFixed(0)+"%"},isArcBigEnough(l){return l.proportion*100>3},sumValues(l){return[...l].map(n=>n.value).reduce((n,o)=>n+o,0)},closeDragElement(){document.onmouseup=null,document.onmousemove=null},dragMouseDown(l){l=l||window.event,l.preventDefault(),document.onmouseup=this.closeDragElement,document.onmousemove=this.elementDrag},elementDrag(l){this.rafId||(this.rafId=window.requestAnimationFrame(()=>this.onElementDrag(l)))},onElementDrag(l){l=l||window.event,l.preventDefault();const o=this.$refs.chartModal.getBoundingClientRect();this.clientX=l.clientX-o.width/2,this.clientY=l.clientY-o.height/2,this.rafId=null}}},C={class:"vue-ui-table-export-hub"},f=["innerHTML"],F=["data-is-open"],S={class:"vue-ui-table-export-hub-options"},I={class:"vue-ui-table-export-hub-option-wrapper"},_={class:"label"},v=["innerHTML"],w={class:"vue-ui-table-export-hub-option-wrapper"},O={class:"label"},D=["innerHTML"],L={class:"vue-ui-table"},E={id:"tableHead"},B={key:0},A={key:0},x={key:1},M={key:0,style:{display:"flex","align-items":"center","justify-content":"flex-end"}},G=["innerHTML"],V={key:0,style:{"margin-left":"3px"}},T={key:0},z={class:"th-filter"},P={key:0,class:"th-date"},H={class:"date-wrapper--inputs"},R={class:"date-fieldset"},U=["for"],j=["id","onUpdate:modelValue","onInput"],X={class:"date-fieldset"},W=["for"],Y=["id","onUpdate:modelValue","onInput"],J={class:"date-wrapper--button"},K=["onClick"],q=["innerHTML"],Z=["innerHTML"],Q=["innerHTML"],$=["onClick","disabled"],ee=["placeholder","onUpdate:modelValue","name"],te=["onClick"],re=["innerHTML"],ne=["innerHTML"],le=["innerHTML"],se=["onClick","innerHTML"],oe=["innerHTML"],ae={key:5,class:"th-range-filter"},ce=["for"],ie=["id","max","min","onUpdate:modelValue"],ue=["id","max","min","onUpdate:modelValue"],de=["for"],he=["onClick","disabled"],ge=["id"],me=["onClick"],ye=["onClick","onKeyup"],Ne=["innerHTML","onClick","onKeyup"],pe=["data-row"],ke=["data-row"],be=["data-row","onClick","onKeyup","id"],Ce=["innerHTML"],fe={key:1},Fe={key:2},Se={key:5},Ie=["innerHTML"],_e={key:0},ve={style:{"margin-left":"12px"}},we={class:"format-num"},Oe={style:{"margin-left":"12px"}},De={key:0,class:"format-num"},Le={key:1,class:"format-num"},Ee={key:2},Be={style:{"margin-left":"12px"}},Ae={key:0,class:"format-num"},xe={key:1,class:"format-num"},Me={key:2},Ge={key:0,class:"vue-ui-table-paginator format-num"},Ve={key:1,class:"vue-ui-table-size-warning"},Te=["innerHTML"],ze={key:3,class:"vue-ui-table-pagination format-num"},Pe=["innerHTML","disabled"],He=["disabled"],Re={key:0,class:"vue-ui-table-page-scroller-wrapper"},Ue={for:"pageScroller",style:{"font-size":"14px"}},je=["max","value"],Xe={key:1},We=["disabled"],Ye=["innerHTML","disabled"],Je={class:"chart-modal-options"},Ke=["innerHTML"],qe=["innerHTML"],Ze=["innerHTML"],Qe={style:{"margin-bottom":"12px"}},$e={key:0},et={key:1},tt={style:{width:"100%",height:"fit-content",cursor:"move"},ref:"chartModal"},rt={class:"vue-ui-table-fieldset"},nt={class:"vue-ui-table-fieldset-wrapper"},lt=["name","id","checked","onInput"],st=["for"],ot=["disabled"],at=["innerHTML"],ct=["viewBox"],it=["markerWidth","markerHeight","refY"],ut=["points","fill"],dt=["x2","y1","y2","stroke","stroke-width"],ht=["y2","stroke","stroke-width"],gt=["x","width","height","fill"],mt=["x","y","height","width","fill","stroke"],yt=["x","y","width"],Nt=["x1","y1","x2","y2","stroke-width","stroke"],pt=["x1","y1","x2","y2","stroke","stroke-width","stroke-dasharray"],kt=["cx","cy","r","fill","stroke","stroke-width"],bt=["x","y","width"],Ct=["x","width","height","onMouseenter"],ft=["x1","y1","x2","y2","stroke","stroke-width","stroke-dasharray"],Ft=["d","stroke"],St=["x","y"],It={class:"vue-ui-table-donut-label-name"},_t=["fill"],vt=["fill"],wt=["fill"],Ot=["fill"],Dt={class:"vue-ui-table-donut-legend"};function Lt(l,n,o,c,r,t){return e.openBlock(),e.createElementBlock("div",{class:"vue-ui-table-main",style:e.normalizeStyle(`font-family: ${t.FINAL_CONFIG.fontFamily}`)},[e.createElementVNode("div",C,[e.createElementVNode("button",{onClick:n[0]||(n[0]=s=>r.isExportRequest=!r.isExportRequest),innerHTML:t.icons.export,style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.exportMenu.backgroundColor};color:${t.FINAL_CONFIG.style.exportMenu.color}`)},null,12,f),e.createElementVNode("div",{class:"vue-ui-table-export-hub-dropdown","data-is-open":r.isExportRequest||"false",style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.exportMenu.backgroundColor};color:${t.FINAL_CONFIG.style.exportMenu.color}`)},[n[24]||(n[24]=e.createElementVNode("b",{class:"vue-ui-table-export-hub-title"}," Export ",-1)),e.createElementVNode("button",{class:"close-dropdown",onClick:n[1]||(n[1]=s=>r.isExportRequest=!1),style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.closeButtons.backgroundColor};color:${t.FINAL_CONFIG.style.closeButtons.color};border-radius:${t.FINAL_CONFIG.style.closeButtons.borderRadius}`)}," ✖ ",4),e.createElementVNode("div",S,[e.createElementVNode("div",I,[e.createElementVNode("div",_,e.toDisplayString(t.FINAL_CONFIG.translations.exportAllLabel)+" ("+e.toDisplayString(r.bodyCopy.length)+") ",1),e.createElementVNode("button",{id:"exportAll",onClick:n[2]||(n[2]=s=>t.createXls("all")),style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.exportMenu.buttons.backgroundColor};color:${t.FINAL_CONFIG.style.exportMenu.buttons.color}`)},[e.createElementVNode("div",{innerHTML:t.icons.fileDownload},null,8,v),e.createElementVNode("span",null,e.toDisplayString(t.FINAL_CONFIG.translations.exportAllButton),1)],4)]),e.createElementVNode("div",w,[e.createElementVNode("div",O,e.toDisplayString(t.FINAL_CONFIG.translations.exportPageLabel),1),e.createElementVNode("button",{id:"exportPage",onClick:n[3]||(n[3]=s=>t.createXls("page")),style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.exportMenu.buttons.backgroundColor};color:${t.FINAL_CONFIG.style.exportMenu.buttons.color}`)},[e.createElementVNode("div",{innerHTML:t.icons.fileDownload},null,8,D),e.createElementVNode("span",null,e.toDisplayString(t.FINAL_CONFIG.translations.exportPageButton),1)],4)])])],12,F)]),e.createElementVNode("div",{class:"vue-ui-table__wrapper",style:e.normalizeStyle(`max-height:${t.FINAL_CONFIG.maxHeight}px`),ref:"tableWrapper"},[e.createElementVNode("table",L,[e.createElementVNode("thead",E,[e.createElementVNode("tr",null,[n[25]||(n[25]=e.createElementVNode("th",{class:"invisible-cell"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.tableHead,(s,a)=>(e.openBlock(),e.createElementBlock("th",{key:`thead_${a}`,style:e.normalizeStyle(`overflow: visible;background:${t.FINAL_CONFIG.style.th.backgroundColor};color:${t.FINAL_CONFIG.style.th.color};outline:${t.FINAL_CONFIG.style.th.outline}`),class:e.normalizeClass({"th-has-nan":r.hasNaN[a]})},[t.hasNumericTypes&&([r.constants.TEXT,r.constants.DATE].includes(s.type)||s.isPercentage)?(e.openBlock(),e.createElementBlock("span",B,[e.createTextVNode(e.toDisplayString(s.name)+" ",1),s.isPercentage?(e.openBlock(),e.createElementBlock("span",A," / "+e.toDisplayString(s.percentageTo),1)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("span",x,e.toDisplayString(s.name),1))],6))),128))]),t.hasNumericTypes?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("tr",null,[n[26]||(n[26]=e.createElementVNode("th",{class:"invisible-cell"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.tableHead,(s,a)=>(e.openBlock(),e.createElementBlock("th",{key:`thead_${a}`,class:e.normalizeClass({"th-numeric":!0,"th-has-nan":r.hasNaN[a]}),style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.th.backgroundColor};color:${t.FINAL_CONFIG.style.th.color};outline:${t.FINAL_CONFIG.style.th.outline}`)},[s.sum&&!r.hasNaN[a]?(e.openBlock(),e.createElementBlock("span",M,[e.createElementVNode("span",{innerHTML:t.icons.sum,style:{"margin-bottom":"-4px","margin-right":"3px"}},null,8,G),e.createTextVNode(" "+e.toDisplayString(s.prefix)+" "+e.toDisplayString(Number(t.getSum(a).toFixed(s.decimals)).toLocaleString())+" "+e.toDisplayString(s.suffix)+" ",1),r.percentages[a]&&s.percentageTo&&!s.isPercentage?(e.openBlock(),e.createElementBlock("span",V," ("+e.toDisplayString(isNaN(t.getSum(a)/t.getSum(r.percentages[a].referenceIndex))?"-":(t.getSum(a)/t.getSum(r.percentages[a].referenceIndex)*100).toFixed(s.decimals))+"%) ",1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],6))),128))]),e.createElementVNode("tr",null,[n[27]||(n[27]=e.createElementVNode("th",{class:"invisible-cell"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.tableHead,(s,a)=>(e.openBlock(),e.createElementBlock("th",{key:`thead_${a}`,class:e.normalizeClass({"th-numeric":!0,"th-has-nan":r.hasNaN[a]}),style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.th.backgroundColor};color:${t.FINAL_CONFIG.style.th.color};outline:${t.FINAL_CONFIG.style.th.outline}`)},[s.average&&!r.hasNaN[a]?(e.openBlock(),e.createElementBlock("span",T," ~ "+e.toDisplayString(s.prefix)+" "+e.toDisplayString(isNaN(t.getAverage(a))?"":Number(t.getAverage(a).toFixed(s.decimals)).toLocaleString())+" "+e.toDisplayString(s.suffix),1)):e.createCommentVNode("",!0)],6))),128))]),e.createElementVNode("tr",null,[n[30]||(n[30]=e.createElementVNode("th",{class:"invisible-cell"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.tableHead,(s,a)=>(e.openBlock(),e.createElementBlock("th",{key:`thead_${a}`,class:e.normalizeClass({"th-has-nan":r.hasNaN[a]}),style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.th.backgroundColor};color:${t.FINAL_CONFIG.style.th.color};outline:${t.FINAL_CONFIG.style.th.outline}`)},[e.createElementVNode("div",z,[s.type===r.constants.DATE&&r.dates[a]?(e.openBlock(),e.createElementBlock("div",P,[e.createElementVNode("div",H,[e.createElementVNode("div",R,[e.createElementVNode("label",{for:`from_${a}`},e.toDisplayString(t.FINAL_CONFIG.translations.from),9,U),e.withDirectives(e.createElementVNode("input",{id:`from_${a}`,type:"date","onUpdate:modelValue":i=>r.dates[a].from=i,onInput:i=>{t.filterBody(),t.setFilterDatesIndexes(a)},style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.inputs.backgroundColor};color:${t.FINAL_CONFIG.style.inputs.color};border:${t.FINAL_CONFIG.style.inputs.border}`)},null,44,j),[[e.vModelText,r.dates[a].from]])]),e.createElementVNode("div",X,[e.createElementVNode("label",{for:`to_${a}`},e.toDisplayString(t.FINAL_CONFIG.translations.to),9,W),e.withDirectives(e.createElementVNode("input",{id:`to_${a}`,type:"date","onUpdate:modelValue":i=>r.dates[a].to=i,onInput:i=>{t.filterBody(),t.setFilterDatesIndexes(a)},style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.inputs.backgroundColor};color:${t.FINAL_CONFIG.style.inputs.color};border:${t.FINAL_CONFIG.style.inputs.border}`)},null,44,Y),[[e.vModelText,r.dates[a].to]])])]),e.createElementVNode("div",J,[s.isSort?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:i=>t.sortTh(a,i),class:e.normalizeClass({"th-button-active":[r.constants.DESC,r.constants.ASC].includes(r.sorts[a])}),style:e.normalizeStyle(`background:${[r.constants.DESC,r.constants.ASC].includes(r.sorts[a])?"":t.FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${[r.constants.DESC,r.constants.ASC].includes(r.sorts[a])?"":t.FINAL_CONFIG.style.pagination.buttons.color}`)},[r.sorts[a]===r.constants.ASC?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:[r.constants.DATE].includes(s.type)?t.icons.sort09:t.icons.sortAZ},null,8,q)):r.sorts[a]===r.constants.DESC?(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:[r.constants.DATE].includes(s.type)?t.icons.sort90:t.icons.sortZA},null,8,Z)):(e.openBlock(),e.createElementBlock("span",{key:2,innerHTML:t.icons.arrowSort},null,8,Q))],14,K)):e.createCommentVNode("",!0),e.createElementVNode("button",{onClick:i=>{t.resetDates(a),t.resetFilter(a,s,i)},disabled:!r.filteredDatesIndexes[a]&&t.isResetDisabled(a,s),class:"th-reset"}," ✖ ",8,$)])])):e.createCommentVNode("",!0),s.isSearch?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:1,placeholder:t.FINAL_CONFIG.translations.inputPlaceholder,"onUpdate:modelValue":i=>r.searches[a]=i,onInput:n[4]||(n[4]=i=>t.debounce(t.filterBody,400)),name:`search_${a}`,style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.inputs.backgroundColor};color:${t.FINAL_CONFIG.style.inputs.color};border:${t.FINAL_CONFIG.style.inputs.border}`)},null,44,ee)),[[e.vModelText,r.searches[a]]]):e.createCommentVNode("",!0),!r.hasNaN[a]&&s.isSort&&s.type!==r.constants.DATE?(e.openBlock(),e.createElementBlock("button",{key:2,onClick:i=>t.sortTh(a,i),class:e.normalizeClass({"th-button-active":[r.constants.DESC,r.constants.ASC].includes(r.sorts[a])}),style:e.normalizeStyle(`background:${[r.constants.DESC,r.constants.ASC].includes(r.sorts[a])?"":t.FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${[r.constants.DESC,r.constants.ASC].includes(r.sorts[a])?"":t.FINAL_CONFIG.style.pagination.buttons.color}`)},[r.sorts[a]===r.constants.ASC?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:[r.constants.NUMERIC].includes(s.type)?t.icons.sort09:t.icons.sortZA},null,8,re)):r.sorts[a]===r.constants.DESC?(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:[r.constants.NUMERIC].includes(s.type)?t.icons.sort90:t.icons.sortAZ},null,8,ne)):(e.openBlock(),e.createElementBlock("span",{key:2,innerHTML:t.icons.arrowSort},null,8,le))],14,te)):e.createCommentVNode("",!0),s.isMultiselect?(e.openBlock(),e.createElementBlock("button",{key:3,onClick:i=>t.toggleMultiselect(a,s,i),innerHTML:t.icons.filter,class:e.normalizeClass({"th-button-active":r.multiselects[a]&&r.multiselects[a].length!==t.getDropdownOptions(a).length}),style:e.normalizeStyle(`background:${r.multiselects[a]&&r.multiselects[a].length!==t.getDropdownOptions(a).length?"":t.FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${r.multiselects[a]&&r.multiselects[a].length!==t.getDropdownOptions(a).length?"":t.FINAL_CONFIG.style.pagination.buttons.color}`)},null,14,se)):e.createCommentVNode("",!0),r.currentSelectionSpan.col===a&&t.canChart?(e.openBlock(),e.createElementBlock("button",{key:4,onClick:n[5]||(n[5]=i=>r.showChart=!r.showChart),innerHTML:t.icons.chart,class:e.normalizeClass({"th-button-active":r.showChart}),style:e.normalizeStyle(`background:${r.showChart?"":t.FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${r.showChart?"":t.FINAL_CONFIG.style.pagination.buttons.color}`)},null,14,oe)):e.createCommentVNode("",!0),s.rangeFilter&&r.rangeFilters[a]&&!r.hasNaN[a]?(e.openBlock(),e.createElementBlock("div",ae,[e.createElementVNode("label",{for:`rangeMin${a}`},n[28]||(n[28]=[e.createElementVNode("span",{style:{color:"grey"}},"ᒥ",-1),e.createTextVNode(" min "),e.createElementVNode("span",{style:{color:"grey"}},"ᒣ",-1)]),8,ce),e.withDirectives(e.createElementVNode("input",{type:"number",id:`rangeMin${a}`,max:r.immutableRangeFilters[a].max,min:r.immutableRangeFilters[a].min,"onUpdate:modelValue":i=>r.rangeFilters[a].min=i,onInput:n[6]||(n[6]=i=>t.debounce(t.filterBody,400)),style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.inputs.backgroundColor};color:${t.FINAL_CONFIG.style.inputs.color};border:${t.FINAL_CONFIG.style.inputs.border}`)},null,44,ie),[[e.vModelText,r.rangeFilters[a].min,void 0,{number:!0}]]),e.withDirectives(e.createElementVNode("input",{type:"number",id:`rangeMax${a}`,max:r.immutableRangeFilters[a].max,min:r.immutableRangeFilters[a].min,"onUpdate:modelValue":i=>r.rangeFilters[a].max=i,onInput:n[7]||(n[7]=i=>t.debounce(t.filterBody,400)),style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.inputs.backgroundColor};color:${t.FINAL_CONFIG.style.inputs.color};border:${t.FINAL_CONFIG.style.inputs.border}`)},null,44,ue),[[e.vModelText,r.rangeFilters[a].max,void 0,{number:!0}]]),e.createElementVNode("label",{for:`rangeMax${a}`},n[29]||(n[29]=[e.createElementVNode("span",{style:{color:"grey"}},"ᒪ",-1),e.createTextVNode(" max "),e.createElementVNode("span",{style:{color:"grey"}},"ᒧ",-1)]),8,de)])):e.createCommentVNode("",!0),t.canResetColumn(a,s)?(e.openBlock(),e.createElementBlock("button",{key:6,onClick:i=>t.resetFilter(a,s,i),disabled:t.isResetDisabled(a,s),class:"th-reset"}," ✖ ",8,he)):e.createCommentVNode("",!0),s.isMultiselect?(e.openBlock(),e.createElementBlock("div",{key:7,class:"th-dropdown","data-is-open":"false",id:`th_dropdown_${a}`,style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.dropdowns.backgroundColor};color:${t.FINAL_CONFIG.style.dropdowns.color}`)},[e.createElementVNode("button",{class:"close-dropdown",onClick:i=>t.toggleMultiselect(a,s,i),style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.closeButtons.backgroundColor};color:${t.FINAL_CONFIG.style.closeButtons.color}`)}," ✖ ",12,me),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.getDropdownOptions(a),(i,u)=>(e.openBlock(),e.createElementBlock("span",{class:"th-option",key:`th_option_${a}_${u}`,onClick:d=>t.selectDropdownOption(i,a),onKeyup:[e.withKeys(d=>t.selectDropdownOption(i,a),["enter"]),e.withKeys(d=>t.selectDropdownOption(i,a),["space"])],style:e.normalizeStyle(`opacity:${t.isDropdownOptionSelected(i,a)?1:.5}`),tabindex:"0"},[t.isDropdownOptionSelected(i,a)?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`color:${t.FINAL_CONFIG.style.dropdowns.icons.selected.color};margin-right:5px`),class:"th-icon-green"},e.toDisplayString(t.FINAL_CONFIG.style.dropdowns.icons.selected.unicode),5)):(e.openBlock(),e.createElementBlock("span",{key:1,style:e.normalizeStyle(`color:${t.FINAL_CONFIG.style.dropdowns.icons.unselected.color};margin-right:5px`),class:"th-icon-red"},e.toDisplayString(t.FINAL_CONFIG.style.dropdowns.icons.unselected.unicode),5)),e.createElementVNode("span",null,e.toDisplayString(i),1)],44,ye))),128))],12,ge)):e.createCommentVNode("",!0)])],6))),128))])],64)):e.createCommentVNode("",!0),e.createElementVNode("tr",null,[n[31]||(n[31]=e.createElementVNode("th",{class:"invisible-cell"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.tableHead,(s,a)=>(e.openBlock(),e.createElementBlock("th",{key:`col_selector_${a}`,class:e.normalizeClass({"vue-ui-table-col-selector":!r.hasNaN[a],"th-has-nan":r.hasNaN[a]}),style:e.normalizeStyle(`background:${a===r.selectedColumn&&!r.hasNaN[a]?t.FINAL_CONFIG.style.th.selected.backgroundColor:t.FINAL_CONFIG.style.th.backgroundColor};color:${a===r.selectedColumn&&!r.hasNaN[a]?t.FINAL_CONFIG.style.th.selected.color:t.FINAL_CONFIG.style.th.color};outline:${t.FINAL_CONFIG.style.th.outline}`)},[r.hasNaN[a]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:r.tableHead[a].type===r.constants.NUMERIC?t.icons.chevronDown:"",class:e.normalizeClass({"col-selector":r.tableHead[a].type===r.constants.NUMERIC}),tabindex:"0",onClick:e.withModifiers(i=>t.selectColumn(a),["stop"]),onKeyup:e.withKeys(i=>t.selectColumn(a),["enter"])},null,42,Ne))],6))),128))])]),e.createElementVNode("tbody",{onClick:n[8]||(n[8]=(...s)=>t.closeAllDropdowns&&t.closeAllDropdowns(...s)),onKeydown:n[9]||(n[9]=s=>t.navigateCell(s))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.visibleRows,(s,a)=>(e.openBlock(),e.createElementBlock("tr",{key:`tbody_${a}`,"data-row":a%2===0?"odd":"even",class:e.normalizeClass(`tr_${r.uid}`),style:e.normalizeStyle(`${a%2===0?`background:${t.FINAL_CONFIG.style.rows.odd.backgroundColor};color:${t.FINAL_CONFIG.style.rows.odd.color}`:`background:${t.FINAL_CONFIG.style.rows.even.backgroundColor};color:${t.FINAL_CONFIG.style.rows.even.color}`}`)},[e.createElementVNode("td",{class:"vue-ui-table-td-iteration","data-row":a%2===0?"odd":"even"},e.toDisplayString(s.absoluteIndex+1),9,ke),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.td,(i,u)=>(e.openBlock(),e.createElementBlock("td",{"data-row":a%2===0?"odd":"even",key:`td_${a}_${u}`,style:e.normalizeStyle(t.isNumeric(i)||o.dataset.header[u].type===r.constants.DATE?"text-align:right;font-variant-numeric: tabular-nums;":""),onClick:d=>t.selectTd({td:i,rowIndex:a,colIndex:u,headerType:o.dataset.header[u].type,event:d}),onKeyup:[e.withKeys(d=>t.selectTd({td:i,rowIndex:a,colIndex:u,headerType:o.dataset.header[u].type,event:d}),["enter"]),e.withKeys(d=>t.selectTd({td:i,rowIndex:a,colIndex:u,headerType:o.dataset.header[u].type,event:d}),["space"])],class:e.normalizeClass({"td-numeric":o.dataset.header[u].type===r.constants.NUMERIC,"td-focusable":!0,"td-has-nan":r.hasNaN[u]}),id:`cell_${a}_${u}_${r.uid}`,tabindex:"0"},[s.meta&&s.meta.markerIndices.includes(u)&&s.meta.unicodeIcon?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`color:${s.meta.color};margin-right:3px`),innerHTML:s.meta.unicodeIcon},null,12,Ce)):e.createCommentVNode("",!0),o.dataset.header[u].type===r.constants.DATE?(e.openBlock(),e.createElementBlock("span",fe,e.toDisplayString(o.dataset.header[u].prefix)+" "+e.toDisplayString(new Date(i).toLocaleString().slice(0,10))+" "+e.toDisplayString(o.dataset.header[u].suffix),1)):o.dataset.header[u].isPercentage?(e.openBlock(),e.createElementBlock("span",Fe,e.toDisplayString(Number((i*100).toFixed(o.dataset.header[u].decimals)).toLocaleString())+"% ",1)):r.percentages[u]&&o.dataset.header[u].percentageTo&&!o.dataset.header[u].isPercentage?(e.openBlock(),e.createElementBlock("span",{key:3,class:e.normalizeClass({"td-nan":isNaN(Number(i))})},e.toDisplayString(o.dataset.header[u].prefix)+" "+e.toDisplayString(isNaN(Number(i))?`${i} is not ${r.constants.NUMERIC}`:Number(i.toFixed(o.dataset.header[u].decimals)).toLocaleString())+" "+e.toDisplayString(o.dataset.header[u].suffix)+" ("+e.toDisplayString(isNaN(Number(i))?"":Number((i/t.getSum(r.percentages[u].referenceIndex)*100).toFixed(o.dataset.header[u].decimals)).toLocaleString())+"%) ",3)):o.dataset.header[u].type===r.constants.NUMERIC?(e.openBlock(),e.createElementBlock("span",{key:4,class:e.normalizeClass({"td-nan":isNaN(Number(i))})},e.toDisplayString(o.dataset.header[u].prefix)+" "+e.toDisplayString(isNaN(Number(i))?`${i} is not ${r.constants.NUMERIC}`:Number(i.toFixed(o.dataset.header[u].decimals)).toLocaleString())+" "+e.toDisplayString(o.dataset.header[u].suffix),3)):(e.openBlock(),e.createElementBlock("span",Se,e.toDisplayString(o.dataset.header[u].prefix)+" "+e.toDisplayString(i)+" "+e.toDisplayString(o.dataset.header[u].suffix),1))],46,be))),128))],14,pe))),128))],32)])],4),e.createElementVNode("div",{class:e.normalizeClass({"td-selector-info":!0,"td-selector-info--active":r.currentSelectionSpan.col!==void 0&&r.currentSelectionSpan.rows.length}),style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.infoBar.backgroundColor};color:${t.FINAL_CONFIG.style.infoBar.color}`)},[r.currentSelectionSpan.col!==void 0&&r.currentSelectionSpan.rows.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",{innerHTML:t.icons.table,class:"td-selector-icon"},null,8,Ie),e.createElementVNode("span",null,[e.createElementVNode("b",null,[e.createTextVNode(e.toDisplayString(o.dataset.header[r.currentSelectionSpan.col].name)+" ",1),o.dataset.header[r.currentSelectionSpan.col].isPercentage?(e.openBlock(),e.createElementBlock("span",_e," / "+e.toDisplayString(o.dataset.header[r.percentages[r.currentSelectionSpan.col].referenceIndex].name),1)):e.createCommentVNode("",!0)]),e.createElementVNode("span",ve,[e.createTextVNode(e.toDisplayString(t.FINAL_CONFIG.translations.nb)+" : ",1),e.createElementVNode("b",we,e.toDisplayString(r.currentSelectionSpan.rows.length),1)]),e.createElementVNode("span",Oe,[e.createTextVNode(e.toDisplayString(t.FINAL_CONFIG.translations.sum)+" : ",1),o.dataset.header[r.currentSelectionSpan.col].isPercentage?(e.openBlock(),e.createElementBlock("b",De,e.toDisplayString(t.selectedCellsCalculations.sumPercentage),1)):(e.openBlock(),e.createElementBlock("b",Le,e.toDisplayString(o.dataset.header[r.currentSelectionSpan.col].prefix)+" "+e.toDisplayString(t.selectedCellsCalculations.sumRegular)+" "+e.toDisplayString(o.dataset.header[r.currentSelectionSpan.col].suffix),1)),o.dataset.header[r.currentSelectionSpan.col].isPercentage?(e.openBlock(),e.createElementBlock("b",Ee,"%")):e.createCommentVNode("",!0)]),e.createElementVNode("span",Be,[e.createTextVNode(e.toDisplayString(t.FINAL_CONFIG.translations.average)+" : ",1),o.dataset.header[r.currentSelectionSpan.col].isPercentage?(e.openBlock(),e.createElementBlock("b",Ae,e.toDisplayString(t.selectedCellsCalculations.averagePercentage),1)):(e.openBlock(),e.createElementBlock("b",xe,e.toDisplayString(o.dataset.header[r.currentSelectionSpan.col].prefix)+" "+e.toDisplayString(t.selectedCellsCalculations.averageRegular)+" "+e.toDisplayString(o.dataset.header[r.currentSelectionSpan.col].suffix),1)),o.dataset.header[r.currentSelectionSpan.col].isPercentage?(e.openBlock(),e.createElementBlock("b",Me,"%")):e.createCommentVNode("",!0)])]),e.createElementVNode("button",{onClick:n[10]||(n[10]=(...s)=>t.resetSelection&&t.resetSelection(...s)),class:"td-selector-info-reset",style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.closeButtons.backgroundColor};color:${t.FINAL_CONFIG.style.closeButtons.color};border-radius:${t.FINAL_CONFIG.style.closeButtons.borderRadius}`)}," ✖ ",4)],64)):e.createCommentVNode("",!0)],6),r.bodyCopy.length>10?(e.openBlock(),e.createElementBlock("div",Ge,[e.createTextVNode(e.toDisplayString(t.FINAL_CONFIG.translations.totalRows)+" : "+e.toDisplayString(o.dataset.body.length)+" | "+e.toDisplayString(t.FINAL_CONFIG.translations.paginatorLabel)+" : ",1),r.bodyCopy.length>10?e.withDirectives((e.openBlock(),e.createElementBlock("select",{key:0,id:"paginatorSelector","onUpdate:modelValue":n[11]||(n[11]=s=>r.itemsPerPage=s),onChange:n[12]||(n[12]=(...s)=>t.resetSelection&&t.resetSelection(...s)),style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.inputs.backgroundColor};color:${t.FINAL_CONFIG.style.inputs.color};border:${t.FINAL_CONFIG.style.inputs.border}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.paginatorOptions,(s,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[r.bodyCopy.length>s||o.dataset.body.length===s?(e.openBlock(),e.createElementBlock("option",{key:`paginator_option_${a}`},e.toDisplayString(s),1)):e.createCommentVNode("",!0)],64))),256))],36)),[[e.vModelSelect,r.itemsPerPage,void 0,{number:!0}]]):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),r.itemsPerPage>=250?(e.openBlock(),e.createElementBlock("div",Ve,[e.createElementVNode("span",{innerHTML:t.icons.warning},null,8,Te),e.createTextVNode(e.toDisplayString(t.FINAL_CONFIG.translations.sizeWarning),1)])):e.createCommentVNode("",!0),t.pages.length>1&&t.pages.length<=10?(e.openBlock(),e.createElementBlock("div",{key:2,class:"vue-ui-table-navigation-indicator",style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.pagination.navigationIndicator.backgroundColor};width:calc(${r.currentPage/(t.pages.length-1)*100}%)`)},null,4)):e.createCommentVNode("",!0),t.pages.length>1?(e.openBlock(),e.createElementBlock("div",ze,[e.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:n[13]||(n[13]=e.withModifiers(s=>t.navigate("previous"),["stop"])),innerHTML:t.icons.chevronLeft,disabled:r.currentPage===0,style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${t.FINAL_CONFIG.style.pagination.buttons.color};opacity:${r.currentPage===0?t.FINAL_CONFIG.style.pagination.buttons.opacityDisabled:1}`)},null,12,Pe),t.pages.length>3?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:n[14]||(n[14]=e.withModifiers(s=>t.navigate(1),["stop"])),disabled:r.currentPage===0,style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${t.FINAL_CONFIG.style.pagination.buttons.color};opacity:${r.currentPage===0?t.FINAL_CONFIG.style.pagination.buttons.opacityDisabled:1}`)}," 1 ",12,He),t.pages.length>10?(e.openBlock(),e.createElementBlock("div",Re,[e.createElementVNode("label",Ue,e.toDisplayString(t.FINAL_CONFIG.translations.page)+" "+e.toDisplayString(r.currentPage+1)+" / "+e.toDisplayString(t.pages.length),1),e.createElementVNode("input",{class:"vue-ui-table-page-scroller",id:"pageScroller",type:"range",step:"1",min:0,max:t.pages.length-1,onInput:n[15]||(n[15]=s=>t.updateCurrentPage(s)),value:r.currentPage,style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.inputs.backgroundColor};color:${t.FINAL_CONFIG.style.inputs.color};border:${t.FINAL_CONFIG.style.inputs.border};accent-color:${t.FINAL_CONFIG.style.inputs.accentColor}`)},null,44,je)])):(e.openBlock(),e.createElementBlock("span",Xe,e.toDisplayString(t.FINAL_CONFIG.translations.page)+" "+e.toDisplayString(r.currentPage+1)+" / "+e.toDisplayString(t.pages.length),1)),e.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:n[16]||(n[16]=e.withModifiers(s=>t.navigate(t.pages.length),["stop"])),disabled:r.currentPage===t.pages.length-1,style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${t.FINAL_CONFIG.style.pagination.buttons.color};opacity:${r.currentPage===t.pages.length-1?t.FINAL_CONFIG.style.pagination.buttons.opacityDisabled:1}`)},e.toDisplayString(t.pages.length),13,We)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.FINAL_CONFIG.translations.page)+" "+e.toDisplayString(r.currentPage+1)+" / "+e.toDisplayString(t.pages.length),1)],64)),e.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:n[17]||(n[17]=e.withModifiers(s=>t.navigate("next"),["stop"])),innerHTML:t.icons.chevronRight,disabled:r.currentPage===t.pages.length-1,style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${t.FINAL_CONFIG.style.pagination.buttons.color};opacity:${r.currentPage===t.pages.length-1?t.FINAL_CONFIG.style.pagination.buttons.opacityDisabled:1}`)},null,12,Ye)])):e.createCommentVNode("",!0),r.showChart&&t.canChart?(e.openBlock(),e.createElementBlock("div",{key:4,class:"vue-ui-table-chart-modal",style:e.normalizeStyle(`top:${r.clientY}px; left:${r.clientX}px;background:${t.FINAL_CONFIG.style.chart.modal.backgroundColor};color:${t.FINAL_CONFIG.style.chart.modal.color}`)},[e.createElementVNode("button",{class:"close-chart-modal",onClick:n[18]||(n[18]=s=>r.showChart=!1),style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.closeButtons.backgroundColor};color:${t.FINAL_CONFIG.style.closeButtons.color};border-radius:${t.FINAL_CONFIG.style.closeButtons.borderRadius}`)}," ✖ ",4),e.createElementVNode("div",Je,[t.availableDonutCategories.length?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[19]||(n[19]=s=>r.showDonutOptions=!0),innerHTML:t.icons.donut,class:e.normalizeClass({"is-active-chart":r.chart.type===r.constants.DONUT||r.showDonutOptions}),style:e.normalizeStyle(`background:${r.chart.type===r.constants.DONUT||r.showDonutOptions?t.FINAL_CONFIG.style.chart.modal.buttons.selected.backgroundColor:t.FINAL_CONFIG.style.chart.modal.buttons.unselected.backgroundColor};color:${r.chart.type===r.constants.DONUT||r.showDonutOptions?t.FINAL_CONFIG.style.chart.modal.buttons.selected.color:t.FINAL_CONFIG.style.chart.modal.buttons.unselected.color}`)},null,14,Ke)):e.createCommentVNode("",!0),e.createElementVNode("button",{onClick:n[20]||(n[20]=s=>{r.chart.type=r.constants.LINE,r.showDonutOptions=!1}),innerHTML:t.icons.chart,class:e.normalizeClass({"is-active-chart":r.chart.type===r.constants.LINE&&!r.showDonutOptions}),style:e.normalizeStyle(`background:${r.chart.type===r.constants.LINE&&!r.showDonutOptions?t.FINAL_CONFIG.style.chart.modal.buttons.selected.backgroundColor:t.FINAL_CONFIG.style.chart.modal.buttons.unselected.backgroundColor};color:${r.chart.type===r.constants.LINE&&!r.showDonutOptions?t.FINAL_CONFIG.style.chart.modal.buttons.selected.color:t.FINAL_CONFIG.style.chart.modal.buttons.unselected.color}`)},null,14,qe),e.createElementVNode("button",{onClick:n[21]||(n[21]=s=>{r.chart.type=r.constants.BAR,r.showDonutOptions=!1}),innerHTML:t.icons.bar,class:e.normalizeClass({"is-active-chart":r.chart.type===r.constants.BAR&&!r.showDonutOptions}),style:e.normalizeStyle(`background:${r.chart.type===r.constants.BAR&&!r.showDonutOptions?t.FINAL_CONFIG.style.chart.modal.buttons.selected.backgroundColor:t.FINAL_CONFIG.style.chart.modal.buttons.unselected.backgroundColor};color:${r.chart.type===r.constants.BAR&&!r.showDonutOptions?t.FINAL_CONFIG.style.chart.modal.buttons.selected.color:t.FINAL_CONFIG.style.chart.modal.buttons.unselected.color}`)},null,14,Ze)]),e.createElementVNode("div",Qe,[e.createElementVNode("b",null,[e.createTextVNode(e.toDisplayString(o.dataset.header[r.currentSelectionSpan.col].name)+" ",1),o.dataset.header[r.currentSelectionSpan.col].isPercentage&&o.dataset.header[r.currentSelectionSpan.col].percentageTo?(e.openBlock(),e.createElementBlock("span",$e," / "+e.toDisplayString(o.dataset.header[r.percentages[r.currentSelectionSpan.col].referenceIndex].name),1)):e.createCommentVNode("",!0),r.chart.type===r.constants.DONUT&&r.selectedDonutCategory&&r.selectedDonutCategory.name?(e.openBlock(),e.createElementBlock("span",et,e.toDisplayString(t.FINAL_CONFIG.translations.by)+" "+e.toDisplayString(r.selectedDonutCategory.name),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",tt,[r.showDonutOptions&&t.availableDonutCategories.length?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.chart.modal.backgroundColor};color:${t.FINAL_CONFIG.style.chart.modal.color}`)},[e.createElementVNode("fieldset",rt,[e.createElementVNode("legend",null,e.toDisplayString(t.FINAL_CONFIG.translations.chooseCategoryColumn),1),e.createElementVNode("div",nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.availableDonutCategories,(s,a)=>(e.openBlock(),e.createElementBlock("div",{key:`donut_radio_${a}`,class:"vue-ui-table-fieldset-option"},[e.createElementVNode("input",{type:"radio",name:s.name,id:s.name,checked:r.selectedDonutCategory&&s.name===r.selectedDonutCategory.name,onInput:i=>r.selectedDonutCategory=t.availableDonutCategories[a],style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.inputs.backgroundColor};color:${t.FINAL_CONFIG.style.inputs.color};border:${t.FINAL_CONFIG.style.inputs.border};accent-color:${t.FINAL_CONFIG.style.inputs.accentColor}`)},null,44,lt),e.createElementVNode("label",{for:s.name},e.toDisplayString(s.name),9,st)]))),128))]),e.createElementVNode("button",{class:"vue-ui-table-generate-donut",disabled:!r.selectedDonutCategory,onClick:n[22]||(n[22]=(...s)=>t.applyDonutOption&&t.applyDonutOption(...s)),style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.chart.modal.buttons.selected.backgroundColor};color:${t.FINAL_CONFIG.style.chart.modal.buttons.selected.color}`)},[e.createElementVNode("div",{style:{"margin-bottom":"-3px"},innerHTML:t.icons.donut},null,8,at),e.createTextVNode(" "+e.toDisplayString(t.FINAL_CONFIG.translations.makeDonut),1)],12,ot)])],4)):e.createCommentVNode("",!0),[r.constants.BAR,r.constants.LINE].includes(r.chart.type)&&!r.showDonutOptions?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[(e.openBlock(),e.createElementBlock("svg",{viewBox:`0 0 ${r.chart.width} ${r.chart.height}`,class:"vue-ui-table-chart-svg",style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.chart.layout.backgroundColor}`)},[e.createElementVNode("defs",null,[e.createElementVNode("marker",{id:"arrowhead",markerWidth:t.FINAL_CONFIG.style.chart.layout.progression.arrowSize,markerHeight:t.FINAL_CONFIG.style.chart.layout.progression.arrowSize,refX:"0",refY:t.FINAL_CONFIG.style.chart.layout.progression.arrowSize/2,orient:"auto"},[e.createElementVNode("polygon",{points:`0 0, ${t.FINAL_CONFIG.style.chart.layout.progression.arrowSize} ${t.FINAL_CONFIG.style.chart.layout.progression.arrowSize/2}, 0 ${t.FINAL_CONFIG.style.chart.layout.progression.arrowSize}`,fill:t.FINAL_CONFIG.style.chart.layout.progression.stroke},null,8,ut)],8,it)]),e.createElementVNode("g",null,[e.createElementVNode("line",{x1:0,x2:r.chart.width,y1:t.chartData.zero,y2:t.chartData.zero,stroke:t.FINAL_CONFIG.style.chart.layout.axis.stroke,"stroke-width":t.FINAL_CONFIG.style.chart.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,dt),e.createElementVNode("line",{x1:0,x2:0,y1:0,y2:r.chart.height,stroke:t.FINAL_CONFIG.style.chart.layout.axis.stroke,"stroke-width":t.FINAL_CONFIG.style.chart.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,ht)]),r.chart.type===r.constants.LINE?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.chartData.plots,(s,a)=>(e.openBlock(),e.createElementBlock("g",{key:`trap_fill_${a}`},[e.createElementVNode("rect",{x:a*t.chartData.slot,y:0,width:t.chartData.slot,height:r.chart.height,fill:r.selectedPlot===a?"rgba(0,0,0,0.03)":"transparent"},null,8,gt)]))),128)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.chartData.plots,(s,a)=>(e.openBlock(),e.createElementBlock("g",{key:`plot_${a}`},[r.chart.type===r.constants.BAR?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n[32]||(n[32]=e.createStaticVNode('<linearGradient id="barGradientSelected" x2="0%" y2="100%" data-v-0a2dd5b6><stop offset="0.2" stop-color="#6376DD" data-v-0a2dd5b6></stop><stop offset="1" stop-color="#6376DD80" data-v-0a2dd5b6></stop></linearGradient><linearGradient id="barGradientSelectedNeg" x2="0%" y2="100%" data-v-0a2dd5b6><stop offset="0.2" stop-color="#6376DD80" data-v-0a2dd5b6></stop><stop offset="1" stop-color="#6376DD" data-v-0a2dd5b6></stop></linearGradient><linearGradient id="barGradient" x2="0%" y2="100%" data-v-0a2dd5b6><stop offset="0.2" stop-color="#6376DDB3" data-v-0a2dd5b6></stop><stop offset="1" stop-color="#6376DD66" data-v-0a2dd5b6></stop></linearGradient><linearGradient id="barGradientNeg" x2="0%" y2="100%" data-v-0a2dd5b6><stop offset="0.2" stop-color="#6376DD66" data-v-0a2dd5b6></stop><stop offset="1" stop-color="#6376DDB3" data-v-0a2dd5b6></stop></linearGradient>',4)),e.createElementVNode("rect",{x:s.x-t.chartData.slot/2,y:t.chartData.isAllNegative?0:t.calcRectY(s.value,s.y),height:s.value>=0?t.chartData.zero-s.y:t.chartData.isAllNegative?s.y:s.y-t.chartData.zero,width:t.chartData.slot,fill:t.FINAL_CONFIG.style.chart.layout.bar.fill?t.FINAL_CONFIG.style.chart.layout.bar.fill:r.selectedPlot===a?s.value>=0?"url(#barGradientSelected)":"url(#barGradientSelectedNeg)":(s.value>=0,"url(#barGradient)"),stroke:t.FINAL_CONFIG.style.chart.layout.bar.stroke,"stroke-width":"1"},null,8,mt),r.selectedPlot===a?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:s.x-(t.chartData.slot<100?50:t.chartData.slot/2),y:s.value>=0?s.y-32:s.y+4,height:"20",width:t.chartData.slot<100?100:t.chartData.slot,style:{overflow:"visible"}},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;text-align:center;font-size:20px;color:${t.FINAL_CONFIG.style.chart.layout.labels.color}`)},e.toDisplayString(s.prefix)+" "+e.toDisplayString(Number(s.value.toFixed(o.dataset.header[r.currentSelectionSpan.col].decimals)).toLocaleString())+" "+e.toDisplayString(s.suffix),5)],8,yt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),r.chart.type===r.constants.LINE?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[a+1<t.chartData.plots.length?(e.openBlock(),e.createElementBlock("line",{key:0,x1:s.x,y1:s.y,x2:t.chartData.plots[a+1].x,y2:t.chartData.plots[a+1].y,"stroke-width":t.FINAL_CONFIG.style.chart.layout.line.strokeWidth,stroke:t.FINAL_CONFIG.style.chart.layout.line.stroke},null,8,Nt)):e.createCommentVNode("",!0),r.selectedPlot===a?(e.openBlock(),e.createElementBlock("line",{key:1,x1:s.x,y1:s.y,x2:s.x,y2:r.chart.height,stroke:t.FINAL_CONFIG.style.chart.layout.line.selector.stroke,"stroke-width":t.FINAL_CONFIG.style.chart.layout.line.selector.strokeWidth,"stroke-dasharray":t.FINAL_CONFIG.style.chart.layout.line.selector.strokeDasharray},null,8,pt)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:s.x,cy:s.y,r:r.selectedPlot===a?t.FINAL_CONFIG.style.chart.layout.line.plot.radius.selected:t.FINAL_CONFIG.style.chart.layout.line.plot.radius.unselected,fill:t.FINAL_CONFIG.style.chart.layout.line.plot.fill,stroke:t.FINAL_CONFIG.style.chart.layout.line.plot.stroke,"stroke-width":t.FINAL_CONFIG.style.chart.layout.line.plot.strokeWidth},null,8,kt),r.selectedPlot===a?(e.openBlock(),e.createElementBlock("foreignObject",{key:2,x:s.x-(t.chartData.slot<100?50:t.chartData.slot/2),y:t.placeLabelOnTopOrBottom({previousPlot:t.chartData.plots[a-1],currentPlot:s,nextPlot:t.chartData.plots[a+1]}),height:"20",width:t.chartData.slot<100?100:t.chartData.slot,style:{overflow:"visible"}},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;text-align:center;font-size:20px;color:${t.FINAL_CONFIG.style.chart.layout.labels.color}`)},e.toDisplayString(s.prefix)+" "+e.toDisplayString(Number(s.value.toFixed(o.dataset.header[r.currentSelectionSpan.col].decimals)).toLocaleString())+" "+e.toDisplayString(s.suffix),5)],8,bt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.chartData.plots,(s,a)=>(e.openBlock(),e.createElementBlock("g",{key:`trap_${a}`},[e.createElementVNode("rect",{x:a*t.chartData.slot,y:0,width:t.chartData.slot,height:r.chart.height,fill:"transparent",onMouseenter:i=>r.selectedPlot=a,onMouseleave:n[23]||(n[23]=i=>r.selectedPlot=void 0)},null,40,Ct)]))),128)),t.chartData.progression&&t.chartData.plots.length>2?(e.openBlock(),e.createElementBlock("line",{key:1,x1:t.chartData.progression.x1,y1:t.chartData.progression.y1,x2:t.chartData.progression.x2,y2:t.chartData.progression.y2,stroke:t.FINAL_CONFIG.style.chart.layout.progression.stroke,"stroke-width":t.FINAL_CONFIG.style.chart.layout.progression.strokeWidth,"stroke-dasharray":t.FINAL_CONFIG.style.chart.layout.progression.strokeDasharray,"marker-end":"url(#arrowhead)"},null,8,ft)):e.createCommentVNode("",!0)],12,ct)),t.chartData.plots.length>=2?(e.openBlock(),e.createElementBlock("div",{key:0,class:"chart-trend",style:e.normalizeStyle(`color:${t.FINAL_CONFIG.style.chart.modal.color}`)},[n[33]||(n[33]=e.createElementVNode("span",null,"---",-1)),e.createTextVNode(" Trend: "+e.toDisplayString((t.chartData.progression.trend*100).toFixed(1))+" % ",1)],4)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),[r.constants.DONUT].includes(r.chart.type)&&!r.showDonutOptions?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[(e.openBlock(),e.createElementBlock("svg",{viewBox:"0 0 100 100",style:e.normalizeStyle(`max-width:100%; overflow: visible; padding: 0 24px;background:${t.FINAL_CONFIG.style.chart.layout.backgroundColor}`),class:"vue-ui-table-donut-chart"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.currentDonut,(s,a)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${a}`,d:s.path,stroke:`${s.color}CC`,"stroke-width":20,fill:"none"},null,8,Ft))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.currentDonut,(s,a)=>(e.openBlock(),e.createElementBlock("foreignObject",{key:`text_marker_${a}`,x:t.calcDonutMarkerLabelPositionX(s)-15,y:s.center.endY-15,height:"30",width:"30",style:{overflow:"visible",display:"flex","align-items":"center","justify-content":"center"}},[t.isArcBigEnough(s)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-table-donut-label",style:e.normalizeStyle(`color:${t.FINAL_CONFIG.style.chart.layout.labels.color}`)},[e.createElementVNode("b",null,e.toDisplayString(t.displayArcPercentage(s,r.currentDonut)),1),e.createElementVNode("span",It,e.toDisplayString(s.name),1)],4)):e.createCommentVNode("",!0)],8,St))),128)),e.createElementVNode("text",{x:50,y:42,"text-anchor":"middle","font-size":"6",fill:t.FINAL_CONFIG.style.chart.layout.labels.color},e.toDisplayString(t.FINAL_CONFIG.translations.total),9,_t),e.createElementVNode("text",{x:50,y:48,"text-anchor":"middle","font-size":"4",fill:t.FINAL_CONFIG.style.chart.layout.labels.color},e.toDisplayString(o.dataset.header[r.currentSelectionSpan.col].prefix)+" "+e.toDisplayString(t.donutHollowLabels.total)+" "+e.toDisplayString(o.dataset.header[r.currentSelectionSpan.col].isPercentage?"%":"")+" "+e.toDisplayString(o.dataset.header[r.currentSelectionSpan.col].suffix),9,vt),e.createElementVNode("text",{x:50,y:56,"text-anchor":"middle","font-size":"6",fill:t.FINAL_CONFIG.style.chart.layout.labels.color},e.toDisplayString(t.FINAL_CONFIG.translations.average),9,wt),e.createElementVNode("text",{x:50,y:62,"text-anchor":"middle","font-size":"4",fill:t.FINAL_CONFIG.style.chart.layout.labels.color},e.toDisplayString(o.dataset.header[r.currentSelectionSpan.col].prefix)+" "+e.toDisplayString(t.donutHollowLabels.average)+" "+e.toDisplayString(o.dataset.header[r.currentSelectionSpan.col].isPercentage?"%":"")+" "+e.toDisplayString(o.dataset.header[r.currentSelectionSpan.col].suffix),9,Ot)],4)),e.createElementVNode("div",Dt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.currentDonut.filter(s=>s.value>0),(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-table-donut-legend-item",key:`donut_legend_${a}`,style:e.normalizeStyle(`color:${t.FINAL_CONFIG.style.chart.layout.labels.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`color:${s.color}`)},"●",4),e.createElementVNode("span",null,e.toDisplayString(s.name)+" : ",1),e.createElementVNode("b",null,e.toDisplayString(o.dataset.header[r.currentSelectionSpan.col].prefix)+" "+e.toDisplayString(t.getDonutLegendValue(s.absoluteValue))+" "+e.toDisplayString(o.dataset.header[r.currentSelectionSpan.col].isPercentage?"%":"")+" "+e.toDisplayString(o.dataset.header[r.currentSelectionSpan.col].suffix),1),e.createElementVNode("span",null,"("+e.toDisplayString((s.proportion*100).toFixed(1))+"%)",1)],4))),128))])],64)):e.createCommentVNode("",!0)],512)],4)):e.createCommentVNode("",!0)],4)}const Et=k._export_sfc(b,[["render",Lt],["__scopeId","data-v-0a2dd5b6"]]);exports.default=Et;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useCssVars as ze, ref as p, useSlots as De, onMounted as pe, computed as _, watch as fe, createElementBlock as c, openBlock as d, unref as i, normalizeClass as X, createCommentVNode as g, createElementVNode as f, normalizeStyle as s, toDisplayString as C, withDirectives as Pe, createVNode as z, Fragment as J, renderList as K, createBlock as Ne, createSlots as Fe, withCtx as D, renderSlot as A, mergeProps as me, nextTick as Ve } from "vue";
|
|
2
|
-
import { u as Te, c as We, t as Me, p as F, a as Ee, b as Ue, o as Be, e as be, g as Ge, a4 as Le, d as Re, i as V, f as T, q as He, r as qe } from "./index-
|
|
3
|
-
import { u as ge } from "./useNestedProp-
|
|
4
|
-
import Xe from "./vue-ui-sparkline-
|
|
5
|
-
import W from "./BaseIcon-
|
|
6
|
-
import { u as Je, U as Ke, v as Qe } from "./usePrinter-
|
|
2
|
+
import { u as Te, c as We, t as Me, p as F, a as Ee, b as Ue, o as Be, e as be, g as Ge, a4 as Le, d as Re, i as V, f as T, q as He, r as qe } from "./index-9ZicrZWM.js";
|
|
3
|
+
import { u as ge } from "./useNestedProp-s1XZrtPS.js";
|
|
4
|
+
import Xe from "./vue-ui-sparkline-_wbJMVVr.js";
|
|
5
|
+
import W from "./BaseIcon-BH4bJe82.js";
|
|
6
|
+
import { u as Je, U as Ke, v as Qe } from "./usePrinter-D7IXLE53.js";
|
|
7
7
|
import { u as Ye } from "./useUserOptionState-BIvW1Kz7.js";
|
|
8
8
|
import { _ as Ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
9
|
const je = ["id"], et = { style: { "z-index": "1", "padding-right": "24px" } }, tt = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CRA3TjQQ.cjs"),Y=require("./useNestedProp-wDhEx7x9.cjs"),ce=require("./vue-ui-sparkline-DDWOEIzY.cjs"),x=require("./BaseIcon-B4pcy-8f.cjs"),D=require("./usePrinter-06EDG1PE.cjs"),ve=require("./useUserOptionState-BgepsfED.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),me=["id"],fe={style:{"z-index":"1","padding-right":"24px"}},ye={key:0,style:{display:"flex",flexDirection:"row",alignItems:"center"}},ge={key:0,style:{display:"flex",flexDirection:"row",alignItems:"center"}},be=["onClick"],ke=["onClick"],he=["data-cell"],Se=["data-cell","onPointerenter"],Ce=["data-cell"],_e=["data-cell"],xe=["data-cell"],we=["data-cell"],Ne={key:1,ref:"source",dir:"auto"},ze={__name:"vue-ui-table-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(Z,{expose:ee}){e.useCssVars(l=>({"8765d8b0":l.tdo}));const{vue_ui_table_sparkline:te}=s.useConfig(),y=Z,w=e.ref(s.createUid()),$=e.ref(0),N=e.ref(0),z=e.ref(null),le=e.useSlots();e.onMounted(()=>{le["chart-background"]&&console.warn("VueUiTableSparkline does not support the #chart-background slot.")});const t=e.computed({get:()=>T(),set:l=>l}),{userOptionsVisible:V,setUserOptionsVisibility:P,keepUserOptionState:F}=ve.useUserOptionState({config:t.value});function T(){const l=Y.useNestedProp({userConfig:y.config,defaultConfig:te});return l.theme?{...Y.useNestedProp({userConfig:s.themes.vue_ui_table_sparkline[l.theme]||y.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}e.watch(()=>y.config,l=>{t.value=T(),V.value=!t.value.userOptions.showOnChartHover,q(),N.value+=1},{deep:!0}),e.watch(()=>y.dataset,l=>{c.value=h.value,N.value+=1},{deep:!0});const{isPrinting:M,isImaging:W,generatePdf:L,generateImage:U}=D.usePrinter({elementId:`table_${w.value}`,fileName:t.value.title.text||"vue-ui-table-sparkline",options:t.value.userOptions.print}),ae=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),C=e.ref(null),I=e.ref(!1),oe=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{q()});const B=e.ref(t.value.colNames);function q(){s.objectIsEmpty(y.dataset)&&s.error({componentName:"VueUiTableSparkline",type:"dataset"});const l=new ResizeObserver(o=>{o.forEach(a=>{I.value=a.contentRect.width<oe.value})});C.value&&l.observe(C.value),B.value=[];for(let o=0;o<R.value;o+=1)B.value.push(t.value.colNames[o]||`col ${o}`)}const G=e.computed(()=>(y.dataset.forEach((l,o)=>{s.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{s.error({componentName:"VueUiTableSparkline",type:"datasetSerieAttribute",property:a,index:o})})}),y.dataset.map((l,o)=>{const a=(l.values||[]).map(d=>isNaN(d)?0:d??0),n=a.reduce((d,i)=>d+i,0),u=n/a.length,r=s.calcMedian(a);return{...l,values:l.values||[],color:s.convertColorToHex(l.color)||ae.value[o]||s.palette[o]||s.palette[o%s.palette.length],sum:n,average:u,median:r,sparklineDataset:a.map((d,i)=>({period:t.value.colNames[i]||`col ${i}`,value:d||0}))}})));function ne(l){const a=(l[0].values||[]).map((u,r)=>l.map(d=>d.values[r]||[])).map(u=>u.map((r,d)=>[r,d]).sort((r,d)=>d[0]-r[0]).map(r=>r[1]));return l.map((u,r)=>({...u,values:u.values||[],orders:a[r]}))}const h=e.computed(()=>ne(G.value)),c=e.ref(h.value),re=e.computed(()=>Math.max(...c.value.map(l=>(l.values||[]).length))),E=e.ref(void 0),A=e.ref(!1),v=e.ref(void 0),H=e.ref(1);function k(){A.value=!1,v.value=void 0,p.value=void 0,H.value=1,S.value.forEach(l=>l.state=1),g.value={name:1,sum:1,average:1,median:1},c.value=h.value}function _(l,o,a){if(["name","sum","average","median"].includes(l.type)){ue(l.type,o,a);return}if(!J(o))return;if(b.value=o,p.value=void 0,![null,void 0].includes(v.value)&&o!==v.value&&(v.value=void 0,k()),S.value[o].state===a&&v.value===o){v.value=void 0,k();return}A.value=!0,v.value=o;const n=h.value.map(i=>i.values[o]||[]),u=a;S.value[o].state=u,H.value=u,o===E.value?E.value=void 0:E.value=o;const d=n.map((i,m)=>[m,i]).sort((i,m)=>u*(m[1]-i[1])).map(i=>i[0]).map(i=>h.value[i]);c.value=d,N.value+=1}const R=e.computed(()=>Math.max(...y.dataset.map(l=>(l.values||[]).length))),f=e.computed(()=>{let l=B.value.map(a=>({type:"reg",value:a}));if(!l.length)for(let a=0;a<R.value;a+=1)l.push({type:"reg",value:`col ${a+1}`});t.value.showTotal&&(l=[...l,{type:"sum",value:t.value.translations.total}]);let o;return t.value.showAverage&&t.value.showMedian?o=[...l,{type:"average",value:t.value.translations.average},{type:"median",value:t.value.translations.median}]:t.value.showAverage&&!t.value.showMedian?o=[...l,{type:"average",value:t.value.translations.average}]:!t.value.showAverage&&t.value.showMedian?o=[...l,{type:"median",value:t.value.translations.median}]:o=l,t.value.showSparklines?[...o,{type:"chart",value:t.value.translations.chart}]:o}),g=e.ref({name:1,sum:1,average:1,median:1}),p=e.ref(void 0);function ue(l,o,a){if(!c.value||c.value.length===0||!K(l))return;if(p.value!==l&&(p.value=void 0),![null,void 0].includes(v.value)&&o!==v.value&&k(),v.value=void 0,g.value[l]===a&&p.value){p.value=void 0,k();return}p.value=l,A.value=!0,g.value[l]=a,[null,void 0].includes(o)||(S.value[o].state=g.value[l]);const n=g.value[l],u=[...c.value].sort((r,d)=>{const i=r[l]??(typeof r[l]=="number"?0:""),m=d[l]??(typeof d[l]=="number"?0:"");return typeof i=="string"&&typeof m=="string"?n===-1?i.localeCompare(m):m.localeCompare(i):typeof i=="number"&&typeof m=="number"?n===-1?i-m:m-i:0});c.value=u}const b=e.ref(void 0),O=e.ref(void 0);function se({dataIndex:l,serieIndex:o}){b.value=l,O.value=o,z.value[l]&&!I.value&&z.value[l].scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}const X=e.ref(!1);function ie(l){X.value=l,$.value+=1}function j(){e.nextTick(()=>{const l=[t.value.translations.serie].concat(f.value),o=G.value.map((u,r)=>[[u.name],u.values,[u.sum],[u.average],[u.median]]),a=[l].concat(o),n=s.createCsvContent(a);s.downloadCsv({csvContent:n,title:t.value.title.text||"vue-ui-table-sparkline"})})}function J(l){return t.value.sortedDataColumnIndices.includes(l)}function K(l){return l.type==="name"||l==="name"?t.value.sortedSeriesName:l.type==="sum"||l==="sum"?t.value.sortedSum:l.type==="average"||l==="average"?t.value.sortedAverage:l.type==="median"||l==="median"?t.value.sortedMedian:!1}function Q(l,o,a){return["sum","average","median"].includes(o.type)?p.value===o.type&&g.value[o.type]===a?1:.3:l===v.value&&S.value[l].state===a?1:.3}function de(){t.value.resetSortOnClickOutside&&k()}const S=e.computed({get:()=>f.value.map(l=>({state:1})),set:l=>l});return ee({generatePdf:L,generateImage:U,generateCsv:j,restoreOrder:k}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:C,class:e.normalizeClass({"vue-ui-table-sparkline":!0,"vue-ui-responsive":I.value}),style:{overflow:"hidden"},id:`table_${w.value}`,onMouseenter:o[3]||(o[3]=()=>e.unref(P)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(P)(!1))},[t.value.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-table-sparkline-caption",style:e.normalizeStyle({backgroundColor:t.value.title.backgroundColor})},[e.createElementVNode("div",{class:"atom-title",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,class:"atom-subtitle",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("div",{style:{overflow:"auto"},onPointerleave:o[2]||(o[2]=a=>{O.value=void 0,b.value=void 0})},[e.createElementVNode("table",{class:"vue-ui-data-table",style:e.normalizeStyle({fontFamily:t.value.fontFamily,position:"relative"})},[e.createElementVNode("thead",fe,[e.withDirectives((e.openBlock(),e.createElementBlock("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,border:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal"}),class:"sticky-col-first"},[e.createElementVNode("div",{style:e.normalizeStyle({display:"flex",flexDirection:"row",alignItems:"center",gap:"3px",justifyContent:t.value.thead.textAlign})},[e.createElementVNode("span",null,e.toDisplayString(t.value.translations.serie),1),c.value.length>1&&t.value.sortedSeriesName?(e.openBlock(),e.createElementBlock("div",ye,[e.createElementVNode("button",{class:"vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-down",onClick:o[0]||(o[0]=a=>_({type:"name"},null,-1))},[e.createVNode(x.default,{size:12,name:"arrowBottom",stroke:t.value.thead.color,style:e.normalizeStyle({opacity:p.value==="name"&&g.value.name===-1?1:.3})},null,8,["stroke","style"])]),e.createElementVNode("button",{class:"vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-up",onClick:o[1]||(o[1]=a=>_({type:"name"},null,1))},[e.createVNode(x.default,{size:12,name:"arrowTop",stroke:t.value.thead.color,style:e.normalizeStyle({opacity:p.value==="name"&&g.value.name===1?1:.3})},null,8,["stroke","style"])])])):e.createCommentVNode("",!0)],4)],4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(a,n)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",style:e.normalizeStyle({background:t.value.thead.backgroundColor,border:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal",minWidth:n===f.value.length-1?`${t.value.sparkline.dimensions.width}px`:"48px",paddingRight:n===f.value.length-1&&t.value.userOptions.show?"36px":""}),class:e.normalizeClass({"sticky-col":n===f.value.length-1&&t.value.showSparklines})},[e.createElementVNode("div",{style:e.normalizeStyle({display:"flex",flexDirection:"row",alignItems:"center",gap:"3px",justifyContent:t.value.thead.textAlign})},[e.createElementVNode("span",null,e.toDisplayString(a.value),1),c.value.length>1&&(J(n)||K(a))?(e.openBlock(),e.createElementBlock("div",ge,[e.createElementVNode("button",{class:"vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-down",onClick:()=>_(a,n,-1)},[e.createVNode(x.default,{size:12,name:"arrowBottom",stroke:t.value.thead.color,style:e.normalizeStyle({opacity:Q(n,a,-1)})},null,8,["stroke","style"])],8,be),e.createElementVNode("button",{class:"vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-up",onClick:()=>_(a,n,1)},[e.createVNode(x.default,{size:12,name:"arrowTop",stroke:t.value.thead.color,style:e.normalizeStyle({opacity:Q(n,a,1)})},null,8,["stroke","style"])],8,ke)])):e.createCommentVNode("",!0)],4),t.value.userOptions.show&&n===f.value.length-1&&(e.unref(F)||e.unref(V))?(e.openBlock(),e.createBlock(D.UserOptions,{ref_for:!0,ref:"details",key:`user_option_${$.value}`,backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color,isPrinting:e.unref(M),isImaging:e.unref(W),uid:w.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:X.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,onToggleFullscreen:ie,onGeneratePdf:e.unref(L),onGenerateImage:e.unref(U),onGenerateCsv:j,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(V)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:u,color:r})=>[e.renderSlot(l.$slots,"menuIcon",e.mergeProps({ref_for:!0},{isOpen:u,color:r}),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.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:u,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.mergeProps({ref_for:!0},{toggleFullscreen:u,isFullscreen:r}),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0)],6))),256))],4)),[[e.unref(D.vClickOutside),de]])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(a,n)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,color:t.value.tbody.color}),class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0})},[e.createElementVNode("td",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,border: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",{dir:"auto",style:e.normalizeStyle({display:"flex",flexDirection:"row",alignItems:"center",gap:"6px",justifyContent:t.value.tbody.textAlign})},[t.value.tbody.showColorMarker?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle({color:a.color})},"⬤",4)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(a.name??"-"),1)],4)],12,he),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(re.value,(u,r)=>(e.openBlock(),e.createElementBlock("td",{dir:"auto",role:"cell",ref_for:!0,ref_key:"TD",ref:z,style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign,background:b.value!==void 0&&r===b.value?t.value.tbody.selectedColor.useSerieColor?`${a.color.length>7?a.color.slice(0,-2):a.color}33`:t.value.tbody.selectedColor.fallback:""}),"data-cell":f.value[r]?f.value[r].value:"",class:"vue-ui-data-table__tbody__td",onPointerenter:d=>{O.value=n,b.value=r}},e.toDisplayString([null,void 0].includes(a.values[r])?"-":e.unref(s.applyDataLabel)(t.value.formatter,Number(a.values[r]),e.unref(s.dataLabel)({p:t.value.prefix,v:Number(a.values[r]),s:t.value.suffix,r:t.value.roundingValues}),{datapoint:a,seriesIndex:n,datapointIndex:r})),45,Se))),256)),t.value.showTotal?(e.openBlock(),e.createElementBlock("td",{key:0,dir:"auto",role:"cell",style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.total,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.formatter,a.sum,e.unref(s.dataLabel)({p:t.value.prefix,v:a.sum,s:t.value.suffix,r:t.value.roundingTotal}),{datapoint:a.sum,seriesIndex:n})),13,Ce)):e.createCommentVNode("",!0),t.value.showAverage?(e.openBlock(),e.createElementBlock("td",{key:1,dir:"auto",role:"cell",style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.average,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.formatter,a.average,e.unref(s.dataLabel)({p:t.value.prefix,v:a.average,s:t.value.suffix,r:t.value.roundingAverage}),{datapoint:a.average,seriesIndex:n})),13,_e)):e.createCommentVNode("",!0),t.value.showMedian?(e.openBlock(),e.createElementBlock("td",{key:2,dir:"auto",role:"cell",style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.median,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.formatter,a.median,e.unref(s.dataLabel)({p:t.value.prefix,v:a.median,s:t.value.suffix,r:t.value.roundingMedian}),{datapoint:a.median,seriesIndex:n})),13,xe)):e.createCommentVNode("",!0),t.value.showSparklines?(e.openBlock(),e.createElementBlock("td",{key:3,role:"cell","data-cell":t.value.translations.chart,style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign,backgroundColor:t.value.tbody.backgroundColor,padding:"0"}),class:"vue-ui-data-table__tbody__td sticky-col"},[e.createVNode(ce.default,{onHoverIndex:({index:u})=>se({dataIndex:u,serieIndex:n}),"height-ratio":t.value.sparkline.dimensions.heightRatio,"forced-padding":30,dataset:a.sparklineDataset,showInfo:!1,selectedIndex:b.value,config:{type:t.value.sparkline.type,style:{backgroundColor:"transparent",animation:{show:t.value.sparkline.animation.show&&!e.unref(M)&&!e.unref(W),animationFrames:t.value.sparkline.animation.animationFrames},line:{color:a.color,smooth:t.value.sparkline.smooth,strokeWidth:t.value.sparkline.strokeWidth},bar:{color:a.color},area:{color:a.color,opacity:t.value.sparkline.showArea?16:0,useGradient:t.value.sparkline.useGradient},verticalIndicator:{color:a.color},plot:{radius:9,stroke:t.value.tbody.backgroundColor,strokeWidth:3}}}},null,8,["onHoverIndex","height-ratio","dataset","selectedIndex","config"])],12,we)):e.createCommentVNode("",!0)],6))),256))])],4)],32),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Ne,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],42,me))}},Ve=pe._export_sfc(ze,[["__scopeId","data-v-6ebcec2e"]]);exports.default=Ve;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DjDcQ8pe.cjs"),Y=require("./useNestedProp-BS9eJthK.cjs"),ce=require("./vue-ui-sparkline-Cr5KANZ_.cjs"),x=require("./BaseIcon-C6L3qbQ8.cjs"),D=require("./usePrinter-vFXYgZiT.cjs"),ve=require("./useUserOptionState-BgepsfED.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),me=["id"],fe={style:{"z-index":"1","padding-right":"24px"}},ye={key:0,style:{display:"flex",flexDirection:"row",alignItems:"center"}},ge={key:0,style:{display:"flex",flexDirection:"row",alignItems:"center"}},be=["onClick"],ke=["onClick"],he=["data-cell"],Se=["data-cell","onPointerenter"],Ce=["data-cell"],_e=["data-cell"],xe=["data-cell"],we=["data-cell"],Ne={key:1,ref:"source",dir:"auto"},ze={__name:"vue-ui-table-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(Z,{expose:ee}){e.useCssVars(l=>({"8765d8b0":l.tdo}));const{vue_ui_table_sparkline:te}=s.useConfig(),y=Z,w=e.ref(s.createUid()),$=e.ref(0),N=e.ref(0),z=e.ref(null),le=e.useSlots();e.onMounted(()=>{le["chart-background"]&&console.warn("VueUiTableSparkline does not support the #chart-background slot.")});const t=e.computed({get:()=>T(),set:l=>l}),{userOptionsVisible:V,setUserOptionsVisibility:P,keepUserOptionState:F}=ve.useUserOptionState({config:t.value});function T(){const l=Y.useNestedProp({userConfig:y.config,defaultConfig:te});return l.theme?{...Y.useNestedProp({userConfig:s.themes.vue_ui_table_sparkline[l.theme]||y.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}e.watch(()=>y.config,l=>{t.value=T(),V.value=!t.value.userOptions.showOnChartHover,q(),N.value+=1},{deep:!0}),e.watch(()=>y.dataset,l=>{c.value=h.value,N.value+=1},{deep:!0});const{isPrinting:M,isImaging:W,generatePdf:L,generateImage:U}=D.usePrinter({elementId:`table_${w.value}`,fileName:t.value.title.text||"vue-ui-table-sparkline",options:t.value.userOptions.print}),ae=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),C=e.ref(null),I=e.ref(!1),oe=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{q()});const B=e.ref(t.value.colNames);function q(){s.objectIsEmpty(y.dataset)&&s.error({componentName:"VueUiTableSparkline",type:"dataset"});const l=new ResizeObserver(o=>{o.forEach(a=>{I.value=a.contentRect.width<oe.value})});C.value&&l.observe(C.value),B.value=[];for(let o=0;o<R.value;o+=1)B.value.push(t.value.colNames[o]||`col ${o}`)}const G=e.computed(()=>(y.dataset.forEach((l,o)=>{s.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{s.error({componentName:"VueUiTableSparkline",type:"datasetSerieAttribute",property:a,index:o})})}),y.dataset.map((l,o)=>{const a=(l.values||[]).map(d=>isNaN(d)?0:d??0),n=a.reduce((d,i)=>d+i,0),u=n/a.length,r=s.calcMedian(a);return{...l,values:l.values||[],color:s.convertColorToHex(l.color)||ae.value[o]||s.palette[o]||s.palette[o%s.palette.length],sum:n,average:u,median:r,sparklineDataset:a.map((d,i)=>({period:t.value.colNames[i]||`col ${i}`,value:d||0}))}})));function ne(l){const a=(l[0].values||[]).map((u,r)=>l.map(d=>d.values[r]||[])).map(u=>u.map((r,d)=>[r,d]).sort((r,d)=>d[0]-r[0]).map(r=>r[1]));return l.map((u,r)=>({...u,values:u.values||[],orders:a[r]}))}const h=e.computed(()=>ne(G.value)),c=e.ref(h.value),re=e.computed(()=>Math.max(...c.value.map(l=>(l.values||[]).length))),E=e.ref(void 0),A=e.ref(!1),v=e.ref(void 0),H=e.ref(1);function k(){A.value=!1,v.value=void 0,p.value=void 0,H.value=1,S.value.forEach(l=>l.state=1),g.value={name:1,sum:1,average:1,median:1},c.value=h.value}function _(l,o,a){if(["name","sum","average","median"].includes(l.type)){ue(l.type,o,a);return}if(!J(o))return;if(b.value=o,p.value=void 0,![null,void 0].includes(v.value)&&o!==v.value&&(v.value=void 0,k()),S.value[o].state===a&&v.value===o){v.value=void 0,k();return}A.value=!0,v.value=o;const n=h.value.map(i=>i.values[o]||[]),u=a;S.value[o].state=u,H.value=u,o===E.value?E.value=void 0:E.value=o;const d=n.map((i,m)=>[m,i]).sort((i,m)=>u*(m[1]-i[1])).map(i=>i[0]).map(i=>h.value[i]);c.value=d,N.value+=1}const R=e.computed(()=>Math.max(...y.dataset.map(l=>(l.values||[]).length))),f=e.computed(()=>{let l=B.value.map(a=>({type:"reg",value:a}));if(!l.length)for(let a=0;a<R.value;a+=1)l.push({type:"reg",value:`col ${a+1}`});t.value.showTotal&&(l=[...l,{type:"sum",value:t.value.translations.total}]);let o;return t.value.showAverage&&t.value.showMedian?o=[...l,{type:"average",value:t.value.translations.average},{type:"median",value:t.value.translations.median}]:t.value.showAverage&&!t.value.showMedian?o=[...l,{type:"average",value:t.value.translations.average}]:!t.value.showAverage&&t.value.showMedian?o=[...l,{type:"median",value:t.value.translations.median}]:o=l,t.value.showSparklines?[...o,{type:"chart",value:t.value.translations.chart}]:o}),g=e.ref({name:1,sum:1,average:1,median:1}),p=e.ref(void 0);function ue(l,o,a){if(!c.value||c.value.length===0||!K(l))return;if(p.value!==l&&(p.value=void 0),![null,void 0].includes(v.value)&&o!==v.value&&k(),v.value=void 0,g.value[l]===a&&p.value){p.value=void 0,k();return}p.value=l,A.value=!0,g.value[l]=a,[null,void 0].includes(o)||(S.value[o].state=g.value[l]);const n=g.value[l],u=[...c.value].sort((r,d)=>{const i=r[l]??(typeof r[l]=="number"?0:""),m=d[l]??(typeof d[l]=="number"?0:"");return typeof i=="string"&&typeof m=="string"?n===-1?i.localeCompare(m):m.localeCompare(i):typeof i=="number"&&typeof m=="number"?n===-1?i-m:m-i:0});c.value=u}const b=e.ref(void 0),O=e.ref(void 0);function se({dataIndex:l,serieIndex:o}){b.value=l,O.value=o,z.value[l]&&!I.value&&z.value[l].scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}const X=e.ref(!1);function ie(l){X.value=l,$.value+=1}function j(){e.nextTick(()=>{const l=[t.value.translations.serie].concat(f.value),o=G.value.map((u,r)=>[[u.name],u.values,[u.sum],[u.average],[u.median]]),a=[l].concat(o),n=s.createCsvContent(a);s.downloadCsv({csvContent:n,title:t.value.title.text||"vue-ui-table-sparkline"})})}function J(l){return t.value.sortedDataColumnIndices.includes(l)}function K(l){return l.type==="name"||l==="name"?t.value.sortedSeriesName:l.type==="sum"||l==="sum"?t.value.sortedSum:l.type==="average"||l==="average"?t.value.sortedAverage:l.type==="median"||l==="median"?t.value.sortedMedian:!1}function Q(l,o,a){return["sum","average","median"].includes(o.type)?p.value===o.type&&g.value[o.type]===a?1:.3:l===v.value&&S.value[l].state===a?1:.3}function de(){t.value.resetSortOnClickOutside&&k()}const S=e.computed({get:()=>f.value.map(l=>({state:1})),set:l=>l});return ee({generatePdf:L,generateImage:U,generateCsv:j,restoreOrder:k}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:C,class:e.normalizeClass({"vue-ui-table-sparkline":!0,"vue-ui-responsive":I.value}),style:{overflow:"hidden"},id:`table_${w.value}`,onMouseenter:o[3]||(o[3]=()=>e.unref(P)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(P)(!1))},[t.value.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-table-sparkline-caption",style:e.normalizeStyle({backgroundColor:t.value.title.backgroundColor})},[e.createElementVNode("div",{class:"atom-title",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,class:"atom-subtitle",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("div",{style:{overflow:"auto"},onPointerleave:o[2]||(o[2]=a=>{O.value=void 0,b.value=void 0})},[e.createElementVNode("table",{class:"vue-ui-data-table",style:e.normalizeStyle({fontFamily:t.value.fontFamily,position:"relative"})},[e.createElementVNode("thead",fe,[e.withDirectives((e.openBlock(),e.createElementBlock("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,border:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal"}),class:"sticky-col-first"},[e.createElementVNode("div",{style:e.normalizeStyle({display:"flex",flexDirection:"row",alignItems:"center",gap:"3px",justifyContent:t.value.thead.textAlign})},[e.createElementVNode("span",null,e.toDisplayString(t.value.translations.serie),1),c.value.length>1&&t.value.sortedSeriesName?(e.openBlock(),e.createElementBlock("div",ye,[e.createElementVNode("button",{class:"vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-down",onClick:o[0]||(o[0]=a=>_({type:"name"},null,-1))},[e.createVNode(x.default,{size:12,name:"arrowBottom",stroke:t.value.thead.color,style:e.normalizeStyle({opacity:p.value==="name"&&g.value.name===-1?1:.3})},null,8,["stroke","style"])]),e.createElementVNode("button",{class:"vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-up",onClick:o[1]||(o[1]=a=>_({type:"name"},null,1))},[e.createVNode(x.default,{size:12,name:"arrowTop",stroke:t.value.thead.color,style:e.normalizeStyle({opacity:p.value==="name"&&g.value.name===1?1:.3})},null,8,["stroke","style"])])])):e.createCommentVNode("",!0)],4)],4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(a,n)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",style:e.normalizeStyle({background:t.value.thead.backgroundColor,border:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal",minWidth:n===f.value.length-1?`${t.value.sparkline.dimensions.width}px`:"48px",paddingRight:n===f.value.length-1&&t.value.userOptions.show?"36px":""}),class:e.normalizeClass({"sticky-col":n===f.value.length-1&&t.value.showSparklines})},[e.createElementVNode("div",{style:e.normalizeStyle({display:"flex",flexDirection:"row",alignItems:"center",gap:"3px",justifyContent:t.value.thead.textAlign})},[e.createElementVNode("span",null,e.toDisplayString(a.value),1),c.value.length>1&&(J(n)||K(a))?(e.openBlock(),e.createElementBlock("div",ge,[e.createElementVNode("button",{class:"vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-down",onClick:()=>_(a,n,-1)},[e.createVNode(x.default,{size:12,name:"arrowBottom",stroke:t.value.thead.color,style:e.normalizeStyle({opacity:Q(n,a,-1)})},null,8,["stroke","style"])],8,be),e.createElementVNode("button",{class:"vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-up",onClick:()=>_(a,n,1)},[e.createVNode(x.default,{size:12,name:"arrowTop",stroke:t.value.thead.color,style:e.normalizeStyle({opacity:Q(n,a,1)})},null,8,["stroke","style"])],8,ke)])):e.createCommentVNode("",!0)],4),t.value.userOptions.show&&n===f.value.length-1&&(e.unref(F)||e.unref(V))?(e.openBlock(),e.createBlock(D.UserOptions,{ref_for:!0,ref:"details",key:`user_option_${$.value}`,backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color,isPrinting:e.unref(M),isImaging:e.unref(W),uid:w.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:X.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,onToggleFullscreen:ie,onGeneratePdf:e.unref(L),onGenerateImage:e.unref(U),onGenerateCsv:j,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(V)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:u,color:r})=>[e.renderSlot(l.$slots,"menuIcon",e.mergeProps({ref_for:!0},{isOpen:u,color:r}),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.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:u,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.mergeProps({ref_for:!0},{toggleFullscreen:u,isFullscreen:r}),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0)],6))),256))],4)),[[e.unref(D.vClickOutside),de]])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(a,n)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,color:t.value.tbody.color}),class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0})},[e.createElementVNode("td",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,border: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",{dir:"auto",style:e.normalizeStyle({display:"flex",flexDirection:"row",alignItems:"center",gap:"6px",justifyContent:t.value.tbody.textAlign})},[t.value.tbody.showColorMarker?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle({color:a.color})},"⬤",4)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(a.name??"-"),1)],4)],12,he),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(re.value,(u,r)=>(e.openBlock(),e.createElementBlock("td",{dir:"auto",role:"cell",ref_for:!0,ref_key:"TD",ref:z,style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign,background:b.value!==void 0&&r===b.value?t.value.tbody.selectedColor.useSerieColor?`${a.color.length>7?a.color.slice(0,-2):a.color}33`:t.value.tbody.selectedColor.fallback:""}),"data-cell":f.value[r]?f.value[r].value:"",class:"vue-ui-data-table__tbody__td",onPointerenter:d=>{O.value=n,b.value=r}},e.toDisplayString([null,void 0].includes(a.values[r])?"-":e.unref(s.applyDataLabel)(t.value.formatter,Number(a.values[r]),e.unref(s.dataLabel)({p:t.value.prefix,v:Number(a.values[r]),s:t.value.suffix,r:t.value.roundingValues}),{datapoint:a,seriesIndex:n,datapointIndex:r})),45,Se))),256)),t.value.showTotal?(e.openBlock(),e.createElementBlock("td",{key:0,dir:"auto",role:"cell",style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.total,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.formatter,a.sum,e.unref(s.dataLabel)({p:t.value.prefix,v:a.sum,s:t.value.suffix,r:t.value.roundingTotal}),{datapoint:a.sum,seriesIndex:n})),13,Ce)):e.createCommentVNode("",!0),t.value.showAverage?(e.openBlock(),e.createElementBlock("td",{key:1,dir:"auto",role:"cell",style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.average,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.formatter,a.average,e.unref(s.dataLabel)({p:t.value.prefix,v:a.average,s:t.value.suffix,r:t.value.roundingAverage}),{datapoint:a.average,seriesIndex:n})),13,_e)):e.createCommentVNode("",!0),t.value.showMedian?(e.openBlock(),e.createElementBlock("td",{key:2,dir:"auto",role:"cell",style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.median,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.formatter,a.median,e.unref(s.dataLabel)({p:t.value.prefix,v:a.median,s:t.value.suffix,r:t.value.roundingMedian}),{datapoint:a.median,seriesIndex:n})),13,xe)):e.createCommentVNode("",!0),t.value.showSparklines?(e.openBlock(),e.createElementBlock("td",{key:3,role:"cell","data-cell":t.value.translations.chart,style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign,backgroundColor:t.value.tbody.backgroundColor,padding:"0"}),class:"vue-ui-data-table__tbody__td sticky-col"},[e.createVNode(ce.default,{onHoverIndex:({index:u})=>se({dataIndex:u,serieIndex:n}),"height-ratio":t.value.sparkline.dimensions.heightRatio,"forced-padding":30,dataset:a.sparklineDataset,showInfo:!1,selectedIndex:b.value,config:{type:t.value.sparkline.type,style:{backgroundColor:"transparent",animation:{show:t.value.sparkline.animation.show&&!e.unref(M)&&!e.unref(W),animationFrames:t.value.sparkline.animation.animationFrames},line:{color:a.color,smooth:t.value.sparkline.smooth,strokeWidth:t.value.sparkline.strokeWidth},bar:{color:a.color},area:{color:a.color,opacity:t.value.sparkline.showArea?16:0,useGradient:t.value.sparkline.useGradient},verticalIndicator:{color:a.color},plot:{radius:9,stroke:t.value.tbody.backgroundColor,strokeWidth:3}}}},null,8,["onHoverIndex","height-ratio","dataset","selectedIndex","config"])],12,we)):e.createCommentVNode("",!0)],6))),256))])],4)],32),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Ne,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],42,me))}},Ve=pe._export_sfc(ze,[["__scopeId","data-v-6ebcec2e"]]);exports.default=Ve;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useCssVars as ke, computed as d, onMounted as be, ref as m, watch as _e, createElementBlock as u, openBlock as l, unref as h, normalizeStyle as te, normalizeClass as I, createBlock as O, createCommentVNode as i, createSlots as xe, withCtx as _, renderSlot as f, normalizeProps as P, guardReactiveProps as A, createVNode as we, createElementVNode as v, Fragment as M, renderList as se, toDisplayString as Ce } from "vue";
|
|
2
|
-
import { u as $e, o as Fe, e as oe, g as Ie, c as Oe, t as Pe, p as x, a as Ae, b as Me, v as g, d as U, X as Ue, s as Ye, i as Ne, f as Se } from "./index-
|
|
3
|
-
import { _ as Te } from "./Title-
|
|
4
|
-
import { u as qe, U as Le } from "./usePrinter-
|
|
5
|
-
import Ve from "./vue-ui-skeleton-
|
|
6
|
-
import { u as le } from "./useNestedProp-
|
|
7
|
-
import { _ as Ee } from "./PackageVersion-
|
|
8
|
-
import { _ as Ge } from "./PenAndPaper-
|
|
2
|
+
import { u as $e, o as Fe, e as oe, g as Ie, c as Oe, t as Pe, p as x, a as Ae, b as Me, v as g, d as U, X as Ue, s as Ye, i as Ne, f as Se } from "./index-9ZicrZWM.js";
|
|
3
|
+
import { _ as Te } from "./Title-CGY0WlAI.js";
|
|
4
|
+
import { u as qe, U as Le } from "./usePrinter-D7IXLE53.js";
|
|
5
|
+
import Ve from "./vue-ui-skeleton-BjminQzl.js";
|
|
6
|
+
import { u as le } from "./useNestedProp-s1XZrtPS.js";
|
|
7
|
+
import { _ as Ee } from "./PackageVersion-BEE_4baV.js";
|
|
8
|
+
import { _ as Ge } from "./PenAndPaper-B3WdOAcZ.js";
|
|
9
9
|
import { u as We } from "./useUserOptionState-BIvW1Kz7.js";
|
|
10
10
|
import { u as je } from "./useChartAccessibility-BWojgys7.js";
|
|
11
11
|
import { _ as ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-CRA3TjQQ.cjs"),oe=require("./Title-CF40M_nk.cjs"),Y=require("./usePrinter-06EDG1PE.cjs"),re=require("./vue-ui-skeleton-5g5yLLM4.cjs"),z=require("./useNestedProp-wDhEx7x9.cjs"),le=require("./PackageVersion-_-duZr_B.cjs"),ae=require("./PenAndPaper-BLqBmiek.cjs"),se=require("./useUserOptionState-BgepsfED.cjs"),ne=require("./useChartAccessibility-Cm7nkzTG.cjs"),ue=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ie=["id"],ce={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},de={key:2,style:"width:100%"},he=["xmlns","viewBox"],ve=["width","height"],me={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},pe=["fill"],fe=["id"],ye=["stop-color"],ge=["stop-color"],ke=["stop-color"],be={"clip-path":"url(#vueUiPill)"},xe=["x","y","height","width"],Ce=["x","y","height","width","fill"],we=["x1","x2","y1","y2","stroke-width","stroke"],_e=["x1","x2","y1","y2","stroke-width","stroke"],Ne=["x1","x2","y1","y2","stroke-width","stroke"],Be=["x1","x2","y1","y2","stroke-width","stroke"],Ve=["x1","x2","y1","y2","stroke-width","stroke"],Ee=["x1","x2","y1","y2","stroke-width","stroke"],Pe=["x1","x2","y1","y2","stroke-width","stroke"],$e=["x1","x2","y1","y2","stroke-width","stroke"],Fe=["x","y","height","width"],Oe=["y","x","fill","font-size","font-weight"],Ie={key:5,class:"vue-data-ui-watermark"},Se={key:6,ref:"source",dir:"auto"},qe={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:L}){e.useCssVars(r=>({"3272b184":X.value,"0885078a":D.value,"09e2f6f7":j.value}));const{vue_ui_thermometer:G}=a.useConfig(),s=m,g=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{B()});function B(){a.objectIsEmpty(s.dataset)?a.error({componentName:"VueUiThermometer",type:"dataset"}):a.getMissingDatasetAttributes({datasetObject:s.dataset,requiredAttributes:["value","from","to"]}).forEach(r=>{a.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:r})})}const d=e.ref(a.createUid()),V=e.ref(null),E=e.ref(0),P=e.ref(0),t=e.computed({get:()=>I(),set:r=>r}),{userOptionsVisible:k,setUserOptionsVisibility:$,keepUserOptionState:F}=se.useUserOptionState({config:t.value}),{svgRef:O}=ne.useChartAccessibility({config:t.value.style.title});function I(){const r=z.useNestedProp({userConfig:s.config,defaultConfig:G});return r.theme?{...z.useNestedProp({userConfig:a.themes.vue_ui_thermometer[r.theme]||s.config,defaultConfig:r}),customPalette:a.themePalettes[r.theme]||a.palette}:r}e.watch(()=>s.config,r=>{t.value=I(),k.value=!t.value.userOptions.showOnChartHover,B(),P.value+=1},{deep:!0});const{isPrinting:S,isImaging:q,generatePdf:A,generateImage:T}=Y.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer",options:t.value.userOptions.print}),H=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.computed(()=>a.convertCustomPalette(t.value.customPalette)),R=e.computed(()=>t.value.style.chart.thermometer.width),c=e.computed(()=>s.dataset.steps||10),i=e.ref({top:t.value.style.chart.padding.top,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right,bottom:t.value.style.chart.padding.bottom});function f(r,n,o){const u=[],_=M(r),N=M(n);for(let v=0;v<o;v++){const Q=b(_.red,N.red,v,o),Z=b(_.green,N.green,v,o),ee=b(_.blue,N.blue,v,o),te=`#${x(Q)}${x(Z)}${x(ee)}`;u.push(te)}return u}function M(r){const n=r.slice(1);return{red:parseInt(n.slice(0,2),16),green:parseInt(n.slice(2,4),16),blue:parseInt(n.slice(4,6),16)}}function b(r,n,o,u){return Math.round(r+(n-r)*o/u)}function x(r){return r.toString(16).padStart(2,"0")}const l=e.computed(()=>{const r=R.value+i.value.left+i.value.right,n=t.value.style.chart.height;return{width:r,left:i.value.left,right:r-i.value.right,top:i.value.top,bottom:n-i.value.bottom,height:n}}),W=e.computed(()=>l.value),C=e.computed(()=>{const r=a.checkNaN(s.dataset.from)<0?Math.abs(a.checkNaN(s.dataset.from)):a.checkNaN(s.dataset.from),n=a.checkNaN(s.dataset.to)<0?Math.abs(a.checkNaN(s.dataset.to)):a.checkNaN(s.dataset.to);let o=0;return a.checkNaN(s.dataset.to)>0?o=r+n:r>n?o=r-n:o=n-r,(1-(Math.abs(a.checkNaN(s.dataset.from))+a.checkNaN(s.dataset.value))/o)*(l.value.height-i.value.top-i.value.bottom)}),j=e.computed(()=>`${C.value}px`),D=e.computed(()=>`${l.value.height-t.value.style.chart.padding.bottom-i.value.top}px`),X=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),J=e.computed(()=>{if(s.dataset.colors){if(!s.dataset.colors.from)return f(p.value[0]||a.palette[0],a.convertColorToHex(s.dataset.colors.to),c.value||10);if(!s.dataset.colors.to)return f(a.convertColorToHex(s.dataset.colors.from),p.value[1]||a.palette[1],c.value||10)}else return f(p.value[1]||a.palette[1],p.value[0]||a.palette[0],c.value||10);return f(a.convertColorToHex(s.dataset.colors.from),a.convertColorToHex(s.dataset.colors.to),c.value||10)}),U=e.computed(()=>{const r=[];let n=0;const o=l.value.height-i.value.top-i.value.bottom;for(let u=0;u<o-1;u+=o/c.value)r.push({x:l.value.left,y:l.value.top+u,qYLess:l.value.top+u+o/c.value/4,halfY:l.value.top+u+o/c.value/2,qYMore:l.value.top+u+o/c.value/4*3,color:J.value[n],height:o/c.value}),n+=1;return r}),h=e.ref(!1);function K(r){h.value=r,E.value+=1}const y=e.ref(!1);function w(){y.value=!y.value}return L({generatePdf:A,generateImage:T,toggleAnnotator:w}),(r,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:V,class:e.normalizeClass(`vue-ui-thermometer ${h.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}`),id:`thermometer__${d.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref($)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref($)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ae._sfc_main,{key:0,svgRef:e.unref(O),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:y.value,onClose:w},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",ce,null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",de,[(e.openBlock(),e.createBlock(oe._sfc_main,{key:`title_${P.value}`,config:{title:{cy:"thermometer-div-title",...t.value.style.title},subtitle:{cy:"thermometer-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&g.value&&(e.unref(F)||e.unref(k))?(e.openBlock(),e.createBlock(Y.UserOptions,{ref:"details",key:`user_options_${E.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(q),isPrinting:e.unref(S),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,titles:{...t.value.userOptions.buttonTitles},chartElement:V.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:y.value,onToggleFullscreen:K,onGeneratePdf:e.unref(A),onGenerateImage:e.unref(T),onToggleAnnotator:w,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(k)?"visible":"hidden":"visible"})},e.createSlots({_:2},[r.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:u})=>[e.renderSlot(r.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:u})),void 0,!0)]),key:"0"}:void 0,r.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,r.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,r.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(r.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"3"}:void 0,r.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(r.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:O,xmlns:e.unref(a.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),width:"100%",viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:"background:transparent"},[e.createVNode(le._sfc_main),r.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(r.$slots,"chart-background",{},void 0,!0)],8,ve)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",me,[e.createElementVNode("rect",{x:"0",y:"0",width:"1",height:"1",rx:"0.5",ry:"0.07",fill:t.value.style.chart.backgroundColor},null,8,pe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,u)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`vueUiThermometerGradient_${u}_${d.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,ye),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(a.setOpacity)(o.color,100-t.value.style.chart.graduations.gradient.intensity)},null,8,ge),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,ke)],8,fe))),256))]),e.createElementVNode("g",be,[e.createElementVNode("rect",{x:l.value.left,y:l.value.top,height:l.value.height-i.value.top-i.value.bottom,width:l.value.width-i.value.left-i.value.right,fill:"#FFFFFF"},null,8,xe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,u)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${u}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:l.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:t.value.style.chart.graduations.gradient.show?`url(#vueUiThermometerGradient_${u}_${d.value})`:o.color,"shape-rendering":"crispEdges"},null,8,Ce),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,we)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,_e)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:o.x,x2:o.x+2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ne)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:o.x,x2:o.x+2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Be)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:l.value.right,x2:l.value.right-10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ve)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.value.right,x2:l.value.right-5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ee)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:l.value.right,x2:l.value.right-2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Pe)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:l.value.right,x2:l.value.right-2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,$e)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("rect",{class:e.normalizeClass({"vue-ui-thermometer-temperature":t.value.style.chart.animation.use}),x:l.value.left,y:l.value.top,height:C.value,width:l.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,Fe)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:C.value+l.value.top+t.value.style.chart.label.fontSize/3,x:l.value.left-10,"text-anchor":"end",fill:t.value.style.chart.label.color,"font-size":t.value.style.chart.label.fontSize,"font-weight":t.value.style.chart.label.bold?"bold":"normal"},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.chart.label.formatter,m.dataset.value,e.unref(a.dataLabel)({p:t.value.style.chart.label.prefix,v:m.dataset.value,s:t.value.style.chart.label.suffix,r:t.value.style.chart.label.rounding}),{datapoint:m.dataset})),11,Oe),e.renderSlot(r.$slots,"svg",{svg:W.value},void 0,!0)],10,he)):e.createCommentVNode("",!0),r.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(r.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(S)||e.unref(q)})),void 0,!0)])):e.createCommentVNode("",!0),r.$slots.source?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(r.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(re.default,{key:7,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ie))}},Ae=ue._export_sfc(qe,[["__scopeId","data-v-b0579fd1"]]);exports.default=Ae;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-DjDcQ8pe.cjs"),oe=require("./Title-BGh0hWb2.cjs"),Y=require("./usePrinter-vFXYgZiT.cjs"),re=require("./vue-ui-skeleton-BGykkjYQ.cjs"),z=require("./useNestedProp-BS9eJthK.cjs"),le=require("./PackageVersion-BrUdYdIC.cjs"),ae=require("./PenAndPaper-DyGcaflS.cjs"),se=require("./useUserOptionState-BgepsfED.cjs"),ne=require("./useChartAccessibility-Cm7nkzTG.cjs"),ue=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ie=["id"],ce={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},de={key:2,style:"width:100%"},he=["xmlns","viewBox"],ve=["width","height"],me={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},pe=["fill"],fe=["id"],ye=["stop-color"],ge=["stop-color"],ke=["stop-color"],be={"clip-path":"url(#vueUiPill)"},xe=["x","y","height","width"],Ce=["x","y","height","width","fill"],we=["x1","x2","y1","y2","stroke-width","stroke"],_e=["x1","x2","y1","y2","stroke-width","stroke"],Ne=["x1","x2","y1","y2","stroke-width","stroke"],Be=["x1","x2","y1","y2","stroke-width","stroke"],Ve=["x1","x2","y1","y2","stroke-width","stroke"],Ee=["x1","x2","y1","y2","stroke-width","stroke"],Pe=["x1","x2","y1","y2","stroke-width","stroke"],$e=["x1","x2","y1","y2","stroke-width","stroke"],Fe=["x","y","height","width"],Oe=["y","x","fill","font-size","font-weight"],Ie={key:5,class:"vue-data-ui-watermark"},Se={key:6,ref:"source",dir:"auto"},qe={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:L}){e.useCssVars(r=>({"3272b184":X.value,"0885078a":D.value,"09e2f6f7":j.value}));const{vue_ui_thermometer:G}=a.useConfig(),s=m,g=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{B()});function B(){a.objectIsEmpty(s.dataset)?a.error({componentName:"VueUiThermometer",type:"dataset"}):a.getMissingDatasetAttributes({datasetObject:s.dataset,requiredAttributes:["value","from","to"]}).forEach(r=>{a.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:r})})}const d=e.ref(a.createUid()),V=e.ref(null),E=e.ref(0),P=e.ref(0),t=e.computed({get:()=>I(),set:r=>r}),{userOptionsVisible:k,setUserOptionsVisibility:$,keepUserOptionState:F}=se.useUserOptionState({config:t.value}),{svgRef:O}=ne.useChartAccessibility({config:t.value.style.title});function I(){const r=z.useNestedProp({userConfig:s.config,defaultConfig:G});return r.theme?{...z.useNestedProp({userConfig:a.themes.vue_ui_thermometer[r.theme]||s.config,defaultConfig:r}),customPalette:a.themePalettes[r.theme]||a.palette}:r}e.watch(()=>s.config,r=>{t.value=I(),k.value=!t.value.userOptions.showOnChartHover,B(),P.value+=1},{deep:!0});const{isPrinting:S,isImaging:q,generatePdf:A,generateImage:T}=Y.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer",options:t.value.userOptions.print}),H=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.computed(()=>a.convertCustomPalette(t.value.customPalette)),R=e.computed(()=>t.value.style.chart.thermometer.width),c=e.computed(()=>s.dataset.steps||10),i=e.ref({top:t.value.style.chart.padding.top,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right,bottom:t.value.style.chart.padding.bottom});function f(r,n,o){const u=[],_=M(r),N=M(n);for(let v=0;v<o;v++){const Q=b(_.red,N.red,v,o),Z=b(_.green,N.green,v,o),ee=b(_.blue,N.blue,v,o),te=`#${x(Q)}${x(Z)}${x(ee)}`;u.push(te)}return u}function M(r){const n=r.slice(1);return{red:parseInt(n.slice(0,2),16),green:parseInt(n.slice(2,4),16),blue:parseInt(n.slice(4,6),16)}}function b(r,n,o,u){return Math.round(r+(n-r)*o/u)}function x(r){return r.toString(16).padStart(2,"0")}const l=e.computed(()=>{const r=R.value+i.value.left+i.value.right,n=t.value.style.chart.height;return{width:r,left:i.value.left,right:r-i.value.right,top:i.value.top,bottom:n-i.value.bottom,height:n}}),W=e.computed(()=>l.value),C=e.computed(()=>{const r=a.checkNaN(s.dataset.from)<0?Math.abs(a.checkNaN(s.dataset.from)):a.checkNaN(s.dataset.from),n=a.checkNaN(s.dataset.to)<0?Math.abs(a.checkNaN(s.dataset.to)):a.checkNaN(s.dataset.to);let o=0;return a.checkNaN(s.dataset.to)>0?o=r+n:r>n?o=r-n:o=n-r,(1-(Math.abs(a.checkNaN(s.dataset.from))+a.checkNaN(s.dataset.value))/o)*(l.value.height-i.value.top-i.value.bottom)}),j=e.computed(()=>`${C.value}px`),D=e.computed(()=>`${l.value.height-t.value.style.chart.padding.bottom-i.value.top}px`),X=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),J=e.computed(()=>{if(s.dataset.colors){if(!s.dataset.colors.from)return f(p.value[0]||a.palette[0],a.convertColorToHex(s.dataset.colors.to),c.value||10);if(!s.dataset.colors.to)return f(a.convertColorToHex(s.dataset.colors.from),p.value[1]||a.palette[1],c.value||10)}else return f(p.value[1]||a.palette[1],p.value[0]||a.palette[0],c.value||10);return f(a.convertColorToHex(s.dataset.colors.from),a.convertColorToHex(s.dataset.colors.to),c.value||10)}),U=e.computed(()=>{const r=[];let n=0;const o=l.value.height-i.value.top-i.value.bottom;for(let u=0;u<o-1;u+=o/c.value)r.push({x:l.value.left,y:l.value.top+u,qYLess:l.value.top+u+o/c.value/4,halfY:l.value.top+u+o/c.value/2,qYMore:l.value.top+u+o/c.value/4*3,color:J.value[n],height:o/c.value}),n+=1;return r}),h=e.ref(!1);function K(r){h.value=r,E.value+=1}const y=e.ref(!1);function w(){y.value=!y.value}return L({generatePdf:A,generateImage:T,toggleAnnotator:w}),(r,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:V,class:e.normalizeClass(`vue-ui-thermometer ${h.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}`),id:`thermometer__${d.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref($)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref($)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ae._sfc_main,{key:0,svgRef:e.unref(O),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:y.value,onClose:w},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",ce,null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",de,[(e.openBlock(),e.createBlock(oe._sfc_main,{key:`title_${P.value}`,config:{title:{cy:"thermometer-div-title",...t.value.style.title},subtitle:{cy:"thermometer-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&g.value&&(e.unref(F)||e.unref(k))?(e.openBlock(),e.createBlock(Y.UserOptions,{ref:"details",key:`user_options_${E.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(q),isPrinting:e.unref(S),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,titles:{...t.value.userOptions.buttonTitles},chartElement:V.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:y.value,onToggleFullscreen:K,onGeneratePdf:e.unref(A),onGenerateImage:e.unref(T),onToggleAnnotator:w,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(k)?"visible":"hidden":"visible"})},e.createSlots({_:2},[r.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:u})=>[e.renderSlot(r.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:u})),void 0,!0)]),key:"0"}:void 0,r.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,r.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,r.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(r.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"3"}:void 0,r.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(r.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:O,xmlns:e.unref(a.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),width:"100%",viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:"background:transparent"},[e.createVNode(le._sfc_main),r.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(r.$slots,"chart-background",{},void 0,!0)],8,ve)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",me,[e.createElementVNode("rect",{x:"0",y:"0",width:"1",height:"1",rx:"0.5",ry:"0.07",fill:t.value.style.chart.backgroundColor},null,8,pe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,u)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`vueUiThermometerGradient_${u}_${d.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,ye),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(a.setOpacity)(o.color,100-t.value.style.chart.graduations.gradient.intensity)},null,8,ge),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,ke)],8,fe))),256))]),e.createElementVNode("g",be,[e.createElementVNode("rect",{x:l.value.left,y:l.value.top,height:l.value.height-i.value.top-i.value.bottom,width:l.value.width-i.value.left-i.value.right,fill:"#FFFFFF"},null,8,xe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,u)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${u}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:l.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:t.value.style.chart.graduations.gradient.show?`url(#vueUiThermometerGradient_${u}_${d.value})`:o.color,"shape-rendering":"crispEdges"},null,8,Ce),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,we)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,_e)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:o.x,x2:o.x+2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ne)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:o.x,x2:o.x+2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Be)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:l.value.right,x2:l.value.right-10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ve)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.value.right,x2:l.value.right-5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ee)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:l.value.right,x2:l.value.right-2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Pe)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:l.value.right,x2:l.value.right-2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,$e)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("rect",{class:e.normalizeClass({"vue-ui-thermometer-temperature":t.value.style.chart.animation.use}),x:l.value.left,y:l.value.top,height:C.value,width:l.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,Fe)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:C.value+l.value.top+t.value.style.chart.label.fontSize/3,x:l.value.left-10,"text-anchor":"end",fill:t.value.style.chart.label.color,"font-size":t.value.style.chart.label.fontSize,"font-weight":t.value.style.chart.label.bold?"bold":"normal"},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.chart.label.formatter,m.dataset.value,e.unref(a.dataLabel)({p:t.value.style.chart.label.prefix,v:m.dataset.value,s:t.value.style.chart.label.suffix,r:t.value.style.chart.label.rounding}),{datapoint:m.dataset})),11,Oe),e.renderSlot(r.$slots,"svg",{svg:W.value},void 0,!0)],10,he)):e.createCommentVNode("",!0),r.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(r.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(S)||e.unref(q)})),void 0,!0)])):e.createCommentVNode("",!0),r.$slots.source?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(r.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(re.default,{key:7,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ie))}},Ae=ue._export_sfc(qe,[["__scopeId","data-v-b0579fd1"]]);exports.default=Ae;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),j=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),j=require("./useNestedProp-BS9eJthK.cjs"),w=require("./index-DjDcQ8pe.cjs"),D=require("./useResponsive-DQmBAoBf.cjs"),B=require("./BaseIcon-C6L3qbQ8.cjs"),O=require("./Title-BGh0hWb2.cjs"),U=require("./PackageVersion-BrUdYdIC.cjs"),W=require("./useChartAccessibility-Cm7nkzTG.cjs"),G=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");class X{constructor(T,V,S,M=!0,h=!0){this.interval=V,this.elapsed=0,this.isPaused=!1;const g=`
|
|
2
2
|
let interval;
|
|
3
3
|
let elapsed = 0;
|
|
4
4
|
let paused = false;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ref as i, onMounted as Z, computed as z, onBeforeUnmount as ee, watch as te, createElementBlock as o, openBlock as l, normalizeStyle as p, createCommentVNode as d, createElementVNode as _, createBlock as ae, unref as se, createVNode as C, renderSlot as H, mergeProps as q, normalizeProps as W, guardReactiveProps as G, toDisplayString as le } from "vue";
|
|
2
|
-
import { u as oe } from "./useNestedProp-
|
|
3
|
-
import { u as re, c as ue, X as ie, F as V } from "./index-
|
|
2
|
+
import { u as oe } from "./useNestedProp-s1XZrtPS.js";
|
|
3
|
+
import { u as re, c as ue, X as ie, F as V } from "./index-9ZicrZWM.js";
|
|
4
4
|
import { t as ne, u as ce } from "./useResponsive-Cw4oZ8sQ.js";
|
|
5
|
-
import R from "./BaseIcon-
|
|
6
|
-
import { _ as de } from "./Title-
|
|
7
|
-
import { _ as he } from "./PackageVersion-
|
|
5
|
+
import R from "./BaseIcon-BH4bJe82.js";
|
|
6
|
+
import { _ as de } from "./Title-CGY0WlAI.js";
|
|
7
|
+
import { _ as he } from "./PackageVersion-BEE_4baV.js";
|
|
8
8
|
import { u as ve } from "./useChartAccessibility-BWojgys7.js";
|
|
9
9
|
import { _ as pe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
10
|
class fe {
|