vue-data-ui 2.9.4 → 2.9.5
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-CyxG4Ftp.js → Arrow-CJMMd0OS.js} +1 -1
- package/dist/{Arrow-CgYR3FXj.cjs → Arrow-DxFFCBPM.cjs} +1 -1
- package/dist/{BaseIcon-DKFlmXEr.cjs → BaseIcon-DU8qgy6L.cjs} +1 -1
- package/dist/{BaseIcon-CnzdK8aV.js → BaseIcon-hA0_6Cl-.js} +1 -1
- package/dist/{ColorPicker-CYa3DFQB.js → ColorPicker-C2hq5iIZ.js} +3 -3
- package/dist/{ColorPicker-PNrzRxPw.cjs → ColorPicker-t6z7vah6.cjs} +1 -1
- package/dist/{DataTable-CW5aC-bf.cjs → DataTable-BPnqR1qF.cjs} +1 -1
- package/dist/{DataTable-aPT7Gaka.js → DataTable-BbXCe5s5.js} +2 -2
- package/dist/{Legend-CUqaARo5.cjs → Legend-BQHuBdpT.cjs} +1 -1
- package/dist/{Legend-Cfm0ctX6.js → Legend-D9ki4JJ3.js} +2 -2
- package/dist/{PackageVersion-BEjIamIO.js → PackageVersion-Bq98eXon.js} +1 -1
- package/dist/{PackageVersion-DDIH1bP5.cjs → PackageVersion-mZLomJm-.cjs} +1 -1
- package/dist/{PenAndPaper-hBDvj9b2.js → PenAndPaper-CUUyQzLR.js} +3 -3
- package/dist/{PenAndPaper-B8Lcd-xn.cjs → PenAndPaper-CvkDs-Gh.cjs} +1 -1
- package/dist/{Shape-Ca8AZL7o.cjs → Shape-BeAQjfne.cjs} +1 -1
- package/dist/{Shape-WIhUvB3A.js → Shape-D6lPonNm.js} +1 -1
- package/dist/{Slicer-YYOuyiYz.js → Slicer-5j6e3Y_A.js} +2 -2
- package/dist/{Slicer-yLatG2Q8.cjs → Slicer-C97ZQ2j3.cjs} +1 -1
- package/dist/{Title-D7uuc4dY.cjs → Title-Cjpkoa1d.cjs} +1 -1
- package/dist/{Title-DBZSWCMO.js → Title-CwPVIBWP.js} +1 -1
- package/dist/{Tooltip-D--0gUVq.cjs → Tooltip-DPgFOV_5.cjs} +1 -1
- package/dist/{Tooltip-DokmjO-n.js → Tooltip-T-m_CEIA.js} +1 -1
- package/dist/{dom-to-png-DsYwe1no.js → dom-to-png-CGtn1Am2.js} +1 -1
- package/dist/{dom-to-png-J1vxOmp_.cjs → dom-to-png-CYjAAVu3.cjs} +1 -1
- package/dist/{img-CU6TyX57.cjs → img-Duw2r72a.cjs} +1 -1
- package/dist/{img-COrXIjCE.js → img-s3DffGWH.js} +1 -1
- package/dist/{index-Ldu7K4PE.js → index-BDGf85YF.js} +1 -1
- package/dist/{index-SCeiWj92.cjs → index-BS7ybKs5.cjs} +1 -1
- package/dist/{pdf-B9y2xWfS.js → pdf-BnBP0Jg-.js} +1 -1
- package/dist/{pdf-BujZw1ZQ.cjs → pdf-CRgxb46R.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-WCQEv2hV.js → useNestedProp-BsN3TOQ0.js} +1 -1
- package/dist/{useNestedProp-BV2kijyF.cjs → useNestedProp-D24_JklN.cjs} +1 -1
- package/dist/{usePrinter-CWjBWUyP.cjs → usePrinter-Bs-Uo-8x.cjs} +1 -1
- package/dist/{usePrinter-Bca_ZkY4.js → usePrinter-CKjQQldf.js} +3 -3
- package/dist/{vue-data-ui-BmmN2NNv.cjs → vue-data-ui-BMJWddQg.cjs} +1 -1
- package/dist/{vue-data-ui-BQay3z7m.js → vue-data-ui-IWpvfdMh.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-CB7Pf9zo.js → vue-ui-3d-bar-DVNn8pu-.js} +9 -9
- package/dist/{vue-ui-3d-bar-BRTXPLII.cjs → vue-ui-3d-bar-slYknMyR.cjs} +1 -1
- package/dist/{vue-ui-accordion-BL41vY_P.cjs → vue-ui-accordion-BMK6-xDm.cjs} +1 -1
- package/dist/{vue-ui-accordion-BeqSE4u4.js → vue-ui-accordion-CYKk4uk8.js} +3 -3
- package/dist/{vue-ui-age-pyramid-DXOH1De2.js → vue-ui-age-pyramid-1zM8QRQl.js} +10 -10
- package/dist/{vue-ui-age-pyramid-Cyryx6dt.cjs → vue-ui-age-pyramid-BCQsnc8c.cjs} +1 -1
- package/dist/{vue-ui-annotator-47R4n6BM.cjs → vue-ui-annotator-5O4hWWvi.cjs} +1 -1
- package/dist/{vue-ui-annotator-pqbJ1XeI.js → vue-ui-annotator-_U6PEy_s.js} +2 -2
- package/dist/{vue-ui-bullet-CrWSjpKP.cjs → vue-ui-bullet-BAaTrfRK.cjs} +1 -1
- package/dist/{vue-ui-bullet-C4nINrVz.js → vue-ui-bullet-DuI83w0_.js} +8 -8
- package/dist/{vue-ui-candlestick-B7BBpXBZ.js → vue-ui-candlestick-Caume8Cr.js} +11 -11
- package/dist/{vue-ui-candlestick-CwCEV4Dk.cjs → vue-ui-candlestick-CoxKe0hi.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-8pfD4UOc.cjs → vue-ui-carousel-table-C3oLoBhV.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-Dmcbfq6Q.js → vue-ui-carousel-table-Dpj6uzaw.js} +4 -4
- package/dist/{vue-ui-chestnut-VcW4bYRK.cjs → vue-ui-chestnut-CRiCk9LN.cjs} +1 -1
- package/dist/{vue-ui-chestnut-nOXmtueI.js → vue-ui-chestnut-DC57Y0fm.js} +8 -8
- package/dist/{vue-ui-circle-pack-Dbqw_xRR.js → vue-ui-circle-pack-Bx8ATqeJ.js} +9 -9
- package/dist/{vue-ui-circle-pack-XI4kOOSC.cjs → vue-ui-circle-pack-Dtaz0QCf.cjs} +1 -1
- package/dist/{vue-ui-cursor-BXXcSCXO.js → vue-ui-cursor-D2_6cGWO.js} +2 -2
- package/dist/{vue-ui-cursor-DOZ1d1Gv.cjs → vue-ui-cursor-Dae_RvTj.cjs} +1 -1
- package/dist/{vue-ui-dashboard-CDWd7y-K.cjs → vue-ui-dashboard-Cia2p6jc.cjs} +1 -1
- package/dist/{vue-ui-dashboard-Dj5UeEUe.js → vue-ui-dashboard-CqEaxTGo.js} +62 -62
- package/dist/{vue-ui-digits-DOX9plTt.js → vue-ui-digits-BBh4FaLt.js} +2 -2
- package/dist/{vue-ui-digits-CMBdp5dX.cjs → vue-ui-digits-TcCd1Ayj.cjs} +1 -1
- package/dist/{vue-ui-donut-DCjz_RJx.cjs → vue-ui-donut-CXI85ZJW.cjs} +1 -1
- package/dist/{vue-ui-donut-V6slQS8W.js → vue-ui-donut-DlvFHlJB.js} +12 -12
- package/dist/{vue-ui-donut-evolution-DJQiBc2K.cjs → vue-ui-donut-evolution-BXEmubwy.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-BHBEHaBz.js → vue-ui-donut-evolution-Ba4GIJg3.js} +11 -11
- package/dist/{vue-ui-dumbbell-c6ZUS2gn.js → vue-ui-dumbbell-2xYiPFix.js} +10 -10
- package/dist/{vue-ui-dumbbell-qP17lDtS.cjs → vue-ui-dumbbell-C1y6x8kv.cjs} +1 -1
- package/dist/{vue-ui-flow-BftL5SCF.js → vue-ui-flow-BBFoxXRy.js} +9 -9
- package/dist/{vue-ui-flow-NFVQYGwe.cjs → vue-ui-flow-Cn0WD8c1.cjs} +1 -1
- package/dist/{vue-ui-funnel-Bm78Fuif.cjs → vue-ui-funnel-BW0E2--M.cjs} +1 -1
- package/dist/{vue-ui-funnel-BxnyO-cX.js → vue-ui-funnel-DzcoJC-S.js} +9 -9
- package/dist/{vue-ui-galaxy-PqPqi1rL.cjs → vue-ui-galaxy-C7S_aK4E.cjs} +1 -1
- package/dist/{vue-ui-galaxy-ErKBaW-Q.js → vue-ui-galaxy-D88zMUzb.js} +11 -11
- package/dist/{vue-ui-gauge-5uNTa5st.cjs → vue-ui-gauge-BNMnbzT6.cjs} +1 -1
- package/dist/{vue-ui-gauge-CC4gRmiU.js → vue-ui-gauge-DU5uLDka.js} +7 -7
- package/dist/{vue-ui-gizmo-Cke9n_3I.cjs → vue-ui-gizmo-CdjyPQN0.cjs} +1 -1
- package/dist/{vue-ui-gizmo-DeeQXNxB.js → vue-ui-gizmo-Cgqr5OQC.js} +3 -3
- package/dist/{vue-ui-heatmap-DIkfrZTI.cjs → vue-ui-heatmap-B26GMl3N.cjs} +1 -1
- package/dist/{vue-ui-heatmap-DVmGDa29.js → vue-ui-heatmap-DhJtkLrS.js} +10 -10
- package/dist/{vue-ui-history-plot-BdH6ipQR.js → vue-ui-history-plot-DBegFcxp.js} +11 -11
- package/dist/{vue-ui-history-plot-Bg9LcJ-j.cjs → vue-ui-history-plot-VwHC74EA.cjs} +1 -1
- package/dist/{vue-ui-kpi-O8tB2EAC.cjs → vue-ui-kpi-C1i0iWrh.cjs} +1 -1
- package/dist/{vue-ui-kpi-DZm8eIsy.js → vue-ui-kpi-CfzNgybX.js} +3 -3
- package/dist/{vue-ui-mini-loader-B74fpNsK.cjs → vue-ui-mini-loader-Djlgqhvu.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-CF9PEaSJ.js → vue-ui-mini-loader-DvYHhqWT.js} +2 -2
- package/dist/{vue-ui-molecule-CWTtY72k.cjs → vue-ui-molecule-C4Z2E7uD.cjs} +1 -1
- package/dist/{vue-ui-molecule-BzTuiwZn.js → vue-ui-molecule-Cr6KJ5eZ.js} +11 -11
- package/dist/{vue-ui-mood-radar-Dc_RBdIt.js → vue-ui-mood-radar-DHTNv7wD.js} +11 -11
- package/dist/{vue-ui-mood-radar-DqpXi_vx.cjs → vue-ui-mood-radar-DhLF09v7.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-DRMKAx-K.js → vue-ui-nested-donuts-Dm0rc5ct.js} +11 -11
- package/dist/{vue-ui-nested-donuts-C9aOv8cV.cjs → vue-ui-nested-donuts-vMeonmHR.cjs} +1 -1
- package/dist/{vue-ui-onion-DIp0iWEm.js → vue-ui-onion-CssSqL8q.js} +11 -11
- package/dist/{vue-ui-onion-CQlidixa.cjs → vue-ui-onion-boKXIe-r.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-D2gzzyV6.js → vue-ui-parallel-coordinate-plot-DBzBW-Vn.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-BEJ7Hjd_.cjs → vue-ui-parallel-coordinate-plot-DxKTqBB8.cjs} +1 -1
- package/dist/{vue-ui-quadrant-BOaaj6gv.cjs → vue-ui-quadrant-BkaXchAn.cjs} +1 -1
- package/dist/{vue-ui-quadrant-DHRPPQzH.js → vue-ui-quadrant-CSuEenz4.js} +12 -12
- package/dist/{vue-ui-quick-chart-Nf2FEMS_.js → vue-ui-quick-chart-BLTVHmn2.js} +9 -9
- package/dist/{vue-ui-quick-chart-qDpGCH4Q.cjs → vue-ui-quick-chart-DJpBpFM4.cjs} +1 -1
- package/dist/{vue-ui-radar-BhLZ-5X_.js → vue-ui-radar-BKM9hhMO.js} +12 -12
- package/dist/{vue-ui-radar-D9u86iM_.cjs → vue-ui-radar-CrxciP8t.cjs} +1 -1
- package/dist/{vue-ui-rating-B1kvbIOJ.js → vue-ui-rating-7uT1-yDP.js} +2 -2
- package/dist/{vue-ui-rating-hXwiZ658.cjs → vue-ui-rating-BWMgiGmm.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-DvAO3fkO.cjs → vue-ui-relation-circle-BFvsOsjM.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-DlegAoHJ.js → vue-ui-relation-circle-Bk2mNJDz.js} +7 -7
- package/dist/{vue-ui-rings-ZsNoADO7.cjs → vue-ui-rings-FzLeValL.cjs} +1 -1
- package/dist/{vue-ui-rings-DTILCifX.js → vue-ui-rings-azmWz0Sn.js} +12 -12
- package/dist/{vue-ui-scatter-CVn7AqGT.js → vue-ui-scatter-CgHGWxEM.js} +12 -12
- package/dist/{vue-ui-scatter-DS8YLaTC.cjs → vue-ui-scatter-D_3855LX.cjs} +1 -1
- package/dist/{vue-ui-skeleton-D4hXCz3m.cjs → vue-ui-skeleton-BznhCw4p.cjs} +1 -1
- package/dist/{vue-ui-skeleton-CLrl96Gp.js → vue-ui-skeleton-hrplR5wa.js} +3 -3
- package/dist/{vue-ui-smiley-BKEs5-OT.cjs → vue-ui-smiley-B02R516m.cjs} +1 -1
- package/dist/{vue-ui-smiley-CoyijT0I.js → vue-ui-smiley-B6DAFeS1.js} +2 -2
- package/dist/{vue-ui-spark-trend-DTwDre2O.cjs → vue-ui-spark-trend-CVU8ZId2.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-JmorBpIp.js → vue-ui-spark-trend-Cvw68YCa.js} +5 -5
- package/dist/{vue-ui-sparkbar-CV3V99Ed.cjs → vue-ui-sparkbar-BVAmpd2c.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-BcwjiTbk.js → vue-ui-sparkbar-CLtobIKI.js} +4 -4
- package/dist/{vue-ui-sparkgauge-CCMnqCx0.js → vue-ui-sparkgauge-DV7_YpFv.js} +4 -4
- package/dist/{vue-ui-sparkgauge-BZyFxTJ1.cjs → vue-ui-sparkgauge-PfjN8EtA.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-vlx7Cb26.cjs → vue-ui-sparkhistogram-B3bXOOfB.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-BxpQOwco.js → vue-ui-sparkhistogram-BgGs2Ge0.js} +5 -5
- package/dist/{vue-ui-sparkline-BHjhZFcb.cjs → vue-ui-sparkline-BpRBXQMZ.cjs} +1 -1
- package/dist/{vue-ui-sparkline-CkEtaWH1.js → vue-ui-sparkline-CgtP1kxm.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-BKXkw6NY.cjs → vue-ui-sparkstackbar--pn0EIYM.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-Eip-31FE.js → vue-ui-sparkstackbar-DNjIcyBK.js} +5 -5
- package/dist/{vue-ui-stackbar-B6taUxpU.js → vue-ui-stackbar-CjRAckRq.js} +13 -13
- package/dist/{vue-ui-stackbar-CYZcA9l8.cjs → vue-ui-stackbar-CqQ5RMAB.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-h63h6xVb.js → vue-ui-strip-plot-CW_RftRT.js} +11 -11
- package/dist/{vue-ui-strip-plot-Cz75jy3H.cjs → vue-ui-strip-plot-DxfM92am.cjs} +1 -1
- package/dist/{vue-ui-table-DF8MfQ59.js → vue-ui-table-D9K1kDv5.js} +9 -5
- package/dist/{vue-ui-table-heatmap-mEcSMZHP.js → vue-ui-table-heatmap-B_iJQCJL.js} +4 -4
- package/dist/{vue-ui-table-heatmap-CDgDaJqX.cjs → vue-ui-table-heatmap-D2Ikfd7A.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-hJtU88Q0.js → vue-ui-table-sparkline-Bu-b38cW.js} +5 -5
- package/dist/{vue-ui-table-sparkline-Heo61EuM.cjs → vue-ui-table-sparkline-CYWYfG5M.cjs} +1 -1
- package/dist/{vue-ui-table-BfACPcxW.cjs → vue-ui-table-z1l0Vin6.cjs} +2 -2
- package/dist/{vue-ui-thermometer-b_eOMDGK.js → vue-ui-thermometer--XuyMCZI.js} +7 -7
- package/dist/{vue-ui-thermometer-BbzxbL6e.cjs → vue-ui-thermometer-CgYedLZ5.cjs} +1 -1
- package/dist/{vue-ui-timer-bfXj2Xo1.cjs → vue-ui-timer-BiTGijvm.cjs} +1 -1
- package/dist/{vue-ui-timer-CuXuiuA_.js → vue-ui-timer-GrhFEUcz.js} +5 -5
- package/dist/{vue-ui-tiremarks-BRcnMsCk.js → vue-ui-tiremarks-CHd1kBCw.js} +7 -7
- package/dist/{vue-ui-tiremarks-_io5f_yy.cjs → vue-ui-tiremarks-LAdsMqyP.cjs} +1 -1
- package/dist/{vue-ui-treemap-6-kgqJkN.cjs → vue-ui-treemap-4BGOXoCD.cjs} +1 -1
- package/dist/{vue-ui-treemap-B1udyPJO.js → vue-ui-treemap-CIGl0OBe.js} +12 -12
- package/dist/{vue-ui-vertical-bar-BBiuT_QA.cjs → vue-ui-vertical-bar-Bc3d2SCI.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-DdxNhCdC.js → vue-ui-vertical-bar-Btv32rCQ.js} +12 -12
- package/dist/{vue-ui-waffle-Dqy7BytZ.cjs → vue-ui-waffle-BfgS6Gkw.cjs} +1 -1
- package/dist/{vue-ui-waffle-Bkvw0dyy.js → vue-ui-waffle-qZHJoGgD.js} +12 -12
- package/dist/{vue-ui-wheel-B5M90GQn.js → vue-ui-wheel-CFf56O9Y.js} +7 -7
- package/dist/{vue-ui-wheel-DM6r0w_a.cjs → vue-ui-wheel-CkqHG4gC.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-B1u5uWI-.js → vue-ui-word-cloud-Cgtt4v0g.js} +10 -10
- package/dist/{vue-ui-word-cloud-BeLBUUGY.cjs → vue-ui-word-cloud-DU1a_f2O.cjs} +1 -1
- package/dist/vue-ui-world-2gnEByN3.js +1107 -0
- package/dist/vue-ui-world-w-oAd8TZ.cjs +19 -0
- package/dist/{vue-ui-xy-CFq6SBzu.js → vue-ui-xy-DhTZvuRq.js} +16 -16
- package/dist/{vue-ui-xy-B-NzV2X6.cjs → vue-ui-xy-Dy4M6VtE.cjs} +2 -2
- package/dist/{vue-ui-xy-canvas-CWsJDLOK.js → vue-ui-xy-canvas-B4jIg9Zl.js} +12 -12
- package/dist/{vue-ui-xy-canvas-Df-vG-MU.cjs → vue-ui-xy-canvas-CTwc8DS0.cjs} +1 -1
- package/package.json +1 -1
- package/dist/vue-ui-world-CdCSnlhK.js +0 -929
- package/dist/vue-ui-world-UyenY3MD.cjs +0 -19
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("./index-BS7ybKs5.cjs"),S=require("./vue-ui-xy-Dy4M6VtE.cjs"),w=require("./vue-ui-donut-CXI85ZJW.cjs"),e=require("vue"),_=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),O={name:"vue-ui-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},components:{VueUiXy:S.default,VueUiDonut:w.default},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,dragOffsetX:0,dragOffsetY:0,modalWidth:400,modalHeight:200,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:N.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
2
|
Provide an array of objects of type:
|
|
3
3
|
{
|
|
4
4
|
name: string;
|
|
@@ -11,4 +11,4 @@ Provide an array of objects of type:
|
|
|
11
11
|
isMultiselect: boolean;
|
|
12
12
|
isPercentage: boolean;
|
|
13
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",o=>{const n=document.activeElement;(n&&Array.from(n.classList).includes("td-focusable")&&o.key.includes("Arrow")||o.code==="Space")&&o.preventDefault()})},watch:{showChart:function(o){o&&this.$nextTick(()=>{this.closeDragElement()})},dataset:{handler(o){this.isLoading=!0,this.bodyCopy=JSON.parse(JSON.stringify(o.body)).map((n,r)=>({...n,absoluteIndex:r})),this.tableBody=JSON.parse(JSON.stringify(o.body)).map((n,r)=>({...n,absoluteIndex:r})),this.tableHead=JSON.parse(JSON.stringify(o.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(o=>({index:o,name:this.dataset.header[o].name,options:this.multiselects[o]}))},canChart(){return this.FINAL_CONFIG.useChart&&this.currentSelectionSpan.rows.length>1},chartData(){if(!this.canChart)return[];const o=316,n=512,r=this.currentSelectionSpan.rows.length,i=n/r,s=Math.max(...this.currentSelectionSpan.rows.map(p=>p.value)),t=Math.min(...this.currentSelectionSpan.rows.map(p=>p.value)),u=this.dataset.header[this.currentSelectionSpan.col].isPercentage&&this.dataset.header[this.currentSelectionSpan.col].percentageTo,h=this.chart.type===this.constants.DONUT&&this.selectedDonutCategory&&this.selectedDonutCategory.name,a=this.dataset.header[this.currentSelectionSpan.col].name+(u?` / ${this.dataset.header[this.percentages[this.currentSelectionSpan.col].referenceIndex].name}`:"")+(h?` ${this.FINAL_CONFIG.translations.by} ${this.selectedDonutCategory.name}`:""),l=this.dataset.header[this.currentSelectionSpan.col].prefix,c=this.dataset.header[this.currentSelectionSpan.col].suffix,d=[{name:a,series:this.currentSelectionSpan.rows.map(p=>p.value),type:"line",useProgression:!0,smooth:this.FINAL_CONFIG.style.chart.layout.line.smooth,color:this.FINAL_CONFIG.style.chart.layout.line.stroke,useArea:this.FINAL_CONFIG.style.chart.layout.line.useArea}],y=[{name:a,series:this.currentSelectionSpan.rows.map(p=>p.value),type:"bar",useProgression:!0,color:this.FINAL_CONFIG.style.chart.layout.bar.fill}],b=this.FINAL_CONFIG.style.chart.modal.backgroundColor,g=this.adaptColorToBackground(b),m=this.dataset.header[this.currentSelectionSpan.col].decimals,F={chart:{backgroundColor:b,color:g,labels:{fontSize:18,prefix:l,suffix:c},grid:{stroke:N.lightenHexColor(g,.5),labels:{color:g,xAxisLabels:{show:!1}}},highlighter:{color:g},legend:{color:g},padding:{left:72,bottom:24,top:36},title:{text:a,color:g,fontSize:18},tooltip:{showTimeLabel:!1,backgroundOpacity:30,color:g,backgroundColor:b,showPercentage:!1,roundingValue:m},userOptions:{position:"left",buttons:{pdf:!1,csv:!1,table:!1,annotator:!1}},zoom:{show:!1}},line:{labels:{show:!0,color:g,rounding:m},dot:{useSerieColor:!1,fill:this.FINAL_CONFIG.style.chart.layout.line.plot.fill,strokeWidth:this.FINAL_CONFIG.style.chart.layout.line.plot.strokeWidth}},bar:{useGradient:!1,border:{useSerieColor:!1,stroke:this.FINAL_CONFIG.style.chart.layout.bar.stroke,strokeWidth:this.FINAL_CONFIG.style.chart.layout.bar.strokeWidth},labels:{show:!0,color:g,rounding:m}}},f=t>=0?0:Math.abs(t),I=s+f,C=this.dataset.header[this.currentSelectionSpan.col].isPercentage,k=this.currentSelectionSpan.rows.map((p,v)=>({x:i*v+i/2,y:(1-(p.value+f)/I)*o,value:C?p.value*100:p.value,suffix:C?"%":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:p.index,absoluteValue:C?Math.abs(p.value)*100:Math.abs(p.value)}));return{donutConfig:{userOptions:{position:"left",buttons:{pdf:!1,csv:!1,table:!1,annotator:!1}},style:{chart:{backgroundColor:b,color:g,layout:{curvedMarkers:!0,donut:{strokeWidth:64},labels:{dataLabels:{suffix:C?"%":"",prefix:l},value:{rounding:m},percentage:{color:g,rounding:m},name:{color:g},hollow:{average:{color:g,text:this.FINAL_CONFIG.translations.average,value:{color:g}},total:{color:g,offsetY:-12,text:this.FINAL_CONFIG.translations.total,value:{color:g,offsetY:-12}}}}},legend:{backgroundColor:b,color:g,roundingValue:m,roundingPercentage:m},padding:{left:12,right:12},title:{text:a,color:g,fontSize:18},tooltip:{backgroundOpacity:30,color:g,backgroundColor:b,roundingValue:m,roundingValue:m}}}},xyConfig:F,xyDatasetLine:d,xyDatasetBar:y,progression:k.length>=2?this.calcLinearProgression(k):!1}},hasNumericTypes(){return this.dataset.header.map(o=>o.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>`,grip:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d="M5 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M5 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M12 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M12 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M19 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M19 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /></svg>`}},pages(){const o=[];if(this.bodyCopy.length)for(let n=0;n<this.bodyCopy.length;n+=this.itemsPerPage)o.push(this.bodyCopy.slice(n,n+this.itemsPerPage));return o},rows(){return this.bodyCopy.map(o=>o.td)},selectedCellsCalculations(){return{sumPercentage:Number((this.currentSelectionSpan.rows.map(o=>o.value).reduce((o,n)=>o+n,0)*100).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),sumRegular:Number(this.currentSelectionSpan.rows.map(o=>o.value).reduce((o,n)=>o+n,0).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),averagePercentage:Number((this.currentSelectionSpan.rows.map(o=>o.value).reduce((o,n)=>o+n,0)/this.currentSelectionSpan.rows.length*100).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),averageRegular:Number((this.currentSelectionSpan.rows.map(o=>o.value).reduce((o,n)=>o+n,0)/this.currentSelectionSpan.rows.length).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()}},FINAL_CONFIG(){const{vue_ui_table:o}=N.useConfig();if(!Object.keys(this.config||{}).length)return o;const n=this.treeShake({defaultConfig:o,userConfig:this.config});return this.convertConfigColors(n)},visibleRows(){return this.pages[this.currentPage]}},methods:{adaptColorToBackground:N.adaptColorToBackground,convertColorToHex:N.convertColorToHex,convertConfigColors:N.convertConfigColors,createCsvContent:N.createCsvContent,darkenHexColor:N.darkenHexColor,dataLabel:N.dataLabel,downloadCsv:N.downloadCsv,lightenHexColor:N.lightenHexColor,treeShake:N.treeShake,applyDonutOption(){const o=this.selectedDonutCategory.options.map((n,r)=>({name:n,color:this.palette[r]||this.palette[r%this.palette.length],values:[this.visibleRows.filter((i,s)=>i.td[this.selectedDonutCategory.index]===n&&this.currentSelectionSpan.rows.map(t=>t.index).includes(s)).map(i=>i.td[this.currentSelectionSpan.col]).reduce((i,s)=>Math.abs(i)+Math.abs(s),0)],absoluteValue:this.visibleRows.filter((i,s)=>i.td[this.selectedDonutCategory.index]===n&&this.currentSelectionSpan.rows.map(t=>t.index).includes(s)).map(i=>i.td[this.currentSelectionSpan.col]).reduce((i,s)=>i+s,0)})).sort((n,r)=>r.value-n.value);this.currentDonut=o,this.$nextTick(()=>{this.chart.type=this.constants.DONUT,this.showDonutOptions=!1})},calcRectY(o,n){return o>=0?n:this.chartData.zero},canResetColumn(o,n){return!this.hasNaN[o]&&(n.isSort||n.isSearch||n.isMultiselect||n.rangeFilter)&&![this.constants.DATE].includes(n.type)},createXls(o="all"){const n=this.dataset.header.map(t=>t.name),r=o==="all"?this.bodyCopy.map(t=>t.td):this.visibleRows.map(t=>t.td),i=[n].concat(r),s=this.createCsvContent(i);this.downloadCsv({csvContent:s,title:"vue-ui-table"})},calcLinearProgression:N.calcLinearProgression,closeAllDropdowns(){const o=document.getElementsByClassName("th-dropdown");o.length&&Array.from(o).forEach(n=>{n.dataset.isOpen=!1})},debounce(o,n){let r;clearTimeout(r),r=setTimeout(o,n)},filterBody(){this.bodyCopy=this.tableBody.filter(o=>{for(const n in this.searches)if(!o.td[n].toUpperCase().includes(this.searches[n].toUpperCase()))return!1;for(const n in this.multiselects)if(!this.multiselects[n].some(i=>i===o.td[n]))return!1;for(const n in this.dates){const r=new Date(o.td[n]),i=new Date(this.dates[n].from),s=new Date(this.dates[n].to);if(r<i||r>s)return!1}return!0}),this.sortBody()},getAverage(o){return this.rows.map(n=>n[o]).map(n=>isNaN(Number(n))?0:n).reduce((n,r)=>n+r,0)/this.bodyCopy.length},getDatesRange(o){const n=this.dataset.body.map(y=>new Date(y.td[o])),r=new Date(Math.min(...n)),i=new Date(Math.max(...n)),s=r.getFullYear(),t=i.getFullYear(),u=String(r.getMonth()+1).padStart(2,"0"),h=String(i.getMonth()+1).padStart(2,"0"),a=String(r.getDate()).padStart(2,"0"),l=String(i.getDate()).padStart(2,"0"),c=`${s}-${u}-${a}`,d=`${t}-${h}-${l}`;return{from:c,to:d}},getDonutLegendValue(o){return Number((o*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()},getDropdownOptions(o){return[...new Set(this.dataset.body.map(n=>n.td[o]))]},getSum(o){return this.rows.map(n=>n[o]).map(n=>isNaN(Number(n))?0:n).reduce((n,r)=>n+r,0)},includesNaN(o){return o.includes(NaN)},isDropdownOptionSelected(o,n){return this.multiselects[n]?this.multiselects[n].includes(o):!0},isNumeric(o){return!isNaN(Number(String(o).replaceAll("%","")))},isResetDisabled(o,n){const r=n.isSort,i=n.isSearch,s=n.isMultiselect&&this.multiselects[o],t=n.rangeFilter,u=h=>{if(t&&this.rangeFilters[h])return Math.round(this.rangeFilters[h].min)===this.immutableRangeFilters[h].min&&Math.round(this.rangeFilters[h].max)===this.immutableRangeFilters[h].max};if(r&&i&&s&&t)return["",void 0].includes(this.searches[o])&&[void 0].includes(this.sorts[o])&&this.multiselects[o].length===this.getDropdownOptions(o).length&&u(o);if(r&&i&&s)return["",void 0].includes(this.searches[o])&&[void 0].includes(this.sorts[o])&&this.multiselects[o].length===this.getDropdownOptions(o).length;if(r&&i&&t)return["",void 0].includes(this.searches[o])&&[void 0].includes(this.sorts[o])&&u(o);if(r&&i)return["",void 0].includes(this.searches[o])&&[void 0].includes(this.sorts[o]);if(r&&s&&t)return[void 0].includes(this.sorts[o])&&this.multiselects[o].length===this.getDropdownOptions(o).length&&u(o);if(r&&s)return[void 0].includes(this.sorts[o])&&this.multiselects[o].length===this.getDropdownOptions(o).length;if(i&&s&&t)return["",void 0].includes(this.searches[o])&&this.multiselects[o].length===this.getDropdownOptions(o).length&&u(o);if(i&&s)return["",void 0].includes(this.searches[o])&&this.multiselects[o].length===this.getDropdownOptions(o).length;if(i&&t)return["",void 0].includes(this.searches[o])&&u(o);if(i)return["",void 0].includes(this.searches[o]);if(r&&t)return[void 0].includes(this.sorts[o])&&u(o);if(r)return[void 0].includes(this.sorts[o]);if(s&&t)return this.multiselects[o].length===this.getDropdownOptions(o).length&&u(o);if(s)return this.multiselects[o].length===this.getDropdownOptions(o).length},navigate(o){this.resetSelection(),o==="next"&&this.currentPage<this.pages.length?this.currentPage+=1:o==="previous"&&this.currentPage>=1?this.currentPage-=1:this.currentPage=o-1,this.$refs.tableWrapper.scrollTo({top:0,left:0,behavior:"smooth"})},navigateCell(o){o.preventDefault();const n=o.keyCode,r=38,i=40,s=37,t=39;if(![r,i,s,t].includes(n))return;const u=o.target.id,h=/cell_(\d+)_(\d+)_vue-ui-table-(\d+)/,a=u.match(h),l=parseInt(a[1]),c=parseInt(a[2]),d=document.getElementById(`cell_${l}_${c+1}_${this.uid}`),y=document.getElementById(`cell_${l}_${c-1}_${this.uid}`),b=document.getElementById(`cell_${l+1}_${c}_${this.uid}`),g=document.getElementById(`cell_${l-1}_${c}_${this.uid}`);let m;switch(!0){case n===t:m=d;break;case n===s:m=y;break;case n===r:m=g;break;case n===i:m=b;break;default:return}m&&(m.focus(),m.scrollIntoView({behavior:"smooth",block:"center"}))},openDonutOptions(){this.selectedDonutCategory=this.availableDonutCategories[0],this.showDonutOptions=!0},placeLabelOnTopOrBottom({previousPlot:o,currentPlot:n,nextPlot:r}){const i=n.y-38,s=n.y+16;return o&&r?o.value<n.value&&r.value<n.value?i:o.value>n.value&&r.value>n.value?s:(o.value>n.value&&r.value<n.value||o.value<n.value&&r.value>n.value,i):o&&!r?o.value>n.value?s:i:!o&&r&&r.value>n.value?s:i},async prepareBodyCopy(){return new Promise(o=>{const n=[];this.tableHead.forEach((r,i)=>{if(r.isSearch&&Object.assign(this.searches,{[i]:""}),r.isMultiselect&&Object.assign(this.multiselects,{[i]:this.getDropdownOptions(i)}),r.type===this.constants.DATE&&(Object.assign(this.dates,{[i]:this.getDatesRange(i)}),Object.assign(this.filteredDatesIndexes,{[i]:!1})),(r.isPercentage||r.percentageTo)&&Object.assign(this.percentages,{[i]:{reference:r.percentageTo,referenceIndex:this.dataset.header.map(s=>s.name).indexOf(r.percentageTo)}}),r.rangeFilter&&(Object.assign(this.rangeFilters,{[i]:{min:Math.round(Math.min(...this.dataset.body.map(s=>s.td).map(s=>s[i]))),max:Math.round(Math.max(...this.dataset.body.map(s=>s.td).map(s=>s[i])))}}),Object.assign(this.immutableRangeFilters,{[i]:{min:Math.round(Math.min(...this.dataset.body.map(s=>s.td).map(s=>s[i]))),max:Math.round(Math.max(...this.dataset.body.map(s=>s.td).map(s=>s[i])))}})),r.isPercentage){const s=this.dataset.header.map(u=>u.name).indexOf(r.percentageTo),t=this.dataset.body.map(u=>u.td[s]).reduce((u,h)=>u+h,0);n.push([i,s,t])}r.type===this.constants.NUMERIC&&!r.isPercentage&&Object.assign(this.hasNaN,{[i]:this.includesNaN(this.dataset.body.map(s=>Number(s.td[i])))})}),this.bodyCopy.forEach((r,i)=>{n.map(s=>{const[t,u,h]=s;r.td[t]=r.td[u]/h}),r.td.forEach((s,t)=>{this.dataset.header[t].type===this.constants.TEXT&&this.dataset.header[t].isSearch&&(r[t]=this.stringToNumber(s)),this.dataset.header[t].type===this.constants.DATE&&(r[t]=new Date(s).getTime()),this.dataset.header[t].type===this.constants.NUMERIC&&(r[t]=isNaN(Number(s))?t:s),this.tableBody[i][t]=r[t]})}),o(!0)})},promiseWithAsyncFunction(o,n){return new Promise((r,i)=>{o().then(s=>{try{const t=n(s);r(t)}catch(t){i(t)}}).catch(s=>{i(s)})})},resetDates(o){this.dates[o]={from:this.getDatesRange(o).from,to:this.getDatesRange(o).to},this.filteredDatesIndexes[o]=!1,this.$forceUpdate(),this.filterBody()},resetFilter(o,n,r){const i=r.currentTarget;clearTimeout(this.buttonTimeout),i.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{i.classList.remove("clicked")},200),this.currentFilter=void 0,n.rangeFilter&&(this.rangeFilters[o].min=this.immutableRangeFilters[o].min,this.rangeFilters[o].max=this.immutableRangeFilters[o].max),n.isMultiselect?(this.multiselects[o]=this.getDropdownOptions(o),n.type===this.constants.TEXT&&(this.sorts[o]=void 0),n.isSearch&&(this.searches[o]="")):n.type===this.constants.NUMERIC?this.sorts[o]=void 0:n.type===this.constants.TEXT?(this.sorts[o]=void 0,this.searches[o]=""):n.type===this.constants.DATE&&(this.sorts[o]=void 0),this.filterBody()},resetSelection(){const o=document.getElementsByClassName(`tr_${this.uid}`);Array.from(o).forEach(n=>{Array.from(n.getElementsByTagName("td")).forEach(r=>{r.dataset.row==="even"?(r.style.background=this.FINAL_CONFIG.style.rows.even.backgroundColor,r.style.color=this.FINAL_CONFIG.style.rows.even.color):(r.style.background=this.FINAL_CONFIG.style.rows.odd.backgroundColor,r.style.color=this.FINAL_CONFIG.style.rows.odd.color)})}),Array.from(o).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(o){this.currentSelectionSpan.col!==o?(this.visibleRows.forEach((n,r)=>{this.selectTd({td:n.td[o],rowIndex:r,colIndex:o,headerType:this.constants.NUMERIC,event:{currentTarget:document.getElementById(`cell_${r}_${o}_${this.uid}`)}})}),this.selectedColumn=o):(this.selectedColumn=void 0,this.resetSelection())},selectDropdownOption(o,n){this.multiselects[n].includes(o)?this.multiselects[n]=this.multiselects[n].filter(r=>r!==o):this.multiselects[n].push(o),this.$forceUpdate(),this.filterBody()},selectTd({td:o,rowIndex:n,colIndex:r,headerType:i,event:s}){if(i!==this.constants.NUMERIC||isNaN(Number(o))){this.resetSelection();return}this.currentSelectionSpan.col!==r&&this.resetSelection();const t=s.currentTarget.parentNode;this.currentSelectionSpan.col=r,this.currentSelectionSpan.rows.map(u=>u.index).includes(n)?(t.dataset.selected="false",this.currentSelectionSpan.rows=this.currentSelectionSpan.rows.filter(u=>u.index!==n),s.currentTarget.classList.remove(this.cssClass.CELL),Array.from(t.children).forEach((u,h)=>{u.dataset.row==="even"?(u.style.background=this.FINAL_CONFIG.style.rows.even.backgroundColor,u.style.color=this.FINAL_CONFIG.style.rows.even.olor):(u.style.background=this.FINAL_CONFIG.style.rows.odd.backgroundColor,u.style.color=this.FINAL_CONFIG.style.rows.odd.color)}),s.currentTarget.dataset.row==="even"?(s.currentTarget.style.background=this.FINAL_CONFIG.style.rows.even.backgroundColor,s.currentTarget.style.color=this.FINAL_CONFIG.style.rows.even.color):(s.currentTarget.style.background=this.FINAL_CONFIG.style.rows.odd.backgroundColor,s.currentTarget.style.color=this.FINAL_CONFIG.style.rows.odd.color)):(t.dataset.selected="true",this.currentSelectionSpan.rows.push({index:n,value:o}),Array.from(t.children).forEach((u,h)=>{u.dataset.row==="even"?(u.style.background=this.FINAL_CONFIG.style.rows.even.selectedNeighbors.backgroundColor,u.style.color=this.FINAL_CONFIG.style.rows.even.selectedNeighbors.color):(u.style.background=this.FINAL_CONFIG.style.rows.odd.selectedNeighbors.backgroundColor,u.style.color=this.FINAL_CONFIG.style.rows.odd.selectedNeighbors.color)}),s.currentTarget.dataset.row==="odd"?(s.currentTarget.style.background=this.FINAL_CONFIG.style.rows.odd.selectedCell.backgroundColor,s.currentTarget.style.color=this.FINAL_CONFIG.style.rows.odd.selectedCell.color):(s.currentTarget.style.background=this.FINAL_CONFIG.style.rows.even.selectedCell.backgroundColor,s.currentTarget.style.color=this.FINAL_CONFIG.style.rows.even.selectedCell.color)),this.currentSelectionSpan.rows=this.currentSelectionSpan.rows.sort((u,h)=>u.index-h.index),this.chart.type===this.constants.DONUT&&this.currentSelectionSpan.rows.length>0&&this.applyDonutOption()},setFilterDatesIndexes(o){this.filteredDatesIndexes[o]=!(this.getDatesRange(o).from===this.dates[o].from&&this.getDatesRange(o).to===this.dates[o].to)},sortBody(){this.resetSelection(),Object.keys(this.rangeFilters).forEach(o=>{this.filterByRange(this.bodyCopy,o)}),Object.keys(this.sorts).forEach(o=>{this.sortByNumber(this.bodyCopy,o)}),this.currentFilter!==void 0&&this.sortByNumber(this.bodyCopy,this.currentFilter),this.dataset.header.forEach((o,n)=>{if(o.isPercentage){const r=this.percentages[n].referenceIndex,i=this.bodyCopy.map(s=>s.td[r]).reduce((s,t)=>s+t,0);this.bodyCopy.forEach(s=>{s.td[n]=s.td[r]/i})}}),this.currentPage>this.pages.length-1&&(this.currentPage=this.pages.length-1),[-1].includes(this.currentPage)&&(this.currentPage=0),this.$forceUpdate()},filterByRange(o,n){this.bodyCopy=o.filter(r=>r.td[n]>=this.rangeFilters[n].min&&r[n]<=this.rangeFilters[n].max)},sortByNumber(o,n){if(this.sorts[n]===this.constants.ASC&&(o=o.sort((r,i)=>r[n]-i[n])),this.sorts[n]===this.constants.DESC)o=o.sort((r,i)=>i[n]-r[n]);else return 0},sortTh(o,n){this.currentFilter=o;const r=n.currentTarget;clearTimeout(this.buttonTimeout),r.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{r.classList.remove("clicked")},200),this.sorts[o]===1?this.sorts[o]=this.constants.DESC:this.sorts[o]=this.constants.ASC,this.sortBody()},stringToNumber(o){let n=0;for(let r=0;r<o.length;r+=1)n+=o.charCodeAt(r);return n},toggleMultiselect(o,n,r){const i=r.currentTarget;clearTimeout(this.buttonTimeout),i.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{i.classList.remove("clicked")},200);const s=document.getElementById(`th_dropdown_${o}`);s.dataset.isOpen==="false"?s.dataset.isOpen="true":s.dataset.isOpen="false"},updateCurrentPage(o){this.resetSelection(),!o||!o.target.value?this.currentPage=0:this.currentPage=Number(o.target.value)},calcDonutMarkerConnectorColor(o){return o.proportion*100>3?o.color:"transparent"},calcDonutMarkerLabelPositionX(o){return o.center.endX+this.calcMarkerOffset(o,50)},calcMarkerOffset(o,n){return o.center.endX-n>=0?3:-2},displayArcPercentage(o,n){return isNaN(o.value/this.sumValues(n))?0:(o.value/this.sumValues(n)*100).toFixed(0)+"%"},isArcBigEnough(o){return o.proportion*100>3},sumValues(o){return[...o].map(n=>n.value).reduce((n,r)=>n+r,0)},closeDragElement(){document.onmouseup=null,document.onmousemove=null},dragMouseDown(o){o=o||window.event,o.preventDefault();const r=this.$refs.chartModal.getBoundingClientRect();this.dragOffsetX=o.clientX-r.left,this.dragOffsetY=o.clientY-r.top,this.modalWidth=r.width,this.modalHeight=r.height,document.onmouseup=this.closeDragElement,document.onmousemove=this.elementDrag},elementDrag(o){if(this.rafId)return;const r=this.$refs.chartModal.getBoundingClientRect();this.clientX=o.clientX-this.dragOffsetX,this.clientY=o.clientY-this.dragOffsetY-40,this.clientX<0&&(this.clientX=0),this.clientX+r.width>window.innerWidth&&(this.clientX=window.innerWidth-r.width-48),this.clientY<0&&(this.clientY=0),this.clientY+r.height>window.innerHeight&&(this.clientY=window.innerHeight-r.height-24)}}},L={class:"vue-ui-table-export-hub"},E=["innerHTML"],D=["data-is-open"],B={class:"vue-ui-table-export-hub-options"},A={class:"vue-ui-table-export-hub-option-wrapper"},M={class:"label"},T=["innerHTML"],x={class:"vue-ui-table-export-hub-option-wrapper"},G={class:"label"},V=["innerHTML"],z={class:"vue-ui-table"},H={id:"tableHead"},P={key:0},R={key:0},U={key:1},X={key:0,style:{display:"flex","align-items":"center","justify-content":"flex-end"}},j=["innerHTML"],Y={key:0,style:{"margin-left":"3px"}},W={key:0},J={class:"th-filter"},K={key:0,class:"th-date"},q={class:"date-wrapper--inputs"},Z={class:"date-fieldset"},Q=["for"],$=["id","onUpdate:modelValue","onInput"],ee={class:"date-fieldset"},te=["for"],se=["id","onUpdate:modelValue","onInput"],ne={class:"date-wrapper--button"},oe=["onClick"],re=["innerHTML"],le=["innerHTML"],ae=["innerHTML"],ie=["onClick","disabled"],ce=["placeholder","onUpdate:modelValue","name"],ue=["onClick"],de=["innerHTML"],he=["innerHTML"],ge=["innerHTML"],me=["onClick","innerHTML"],ye=["innerHTML"],pe={key:5,class:"th-range-filter"},Ne=["for"],be=["id","max","min","onUpdate:modelValue"],Ce=["id","max","min","onUpdate:modelValue"],fe=["for"],ke=["onClick","disabled"],Fe=["id"],Ie=["onClick"],ve=["onClick","onKeyup"],Se=["innerHTML","onClick","onKeyup"],we=["data-row"],_e=["data-row"],Oe=["data-row","onClick","onKeyup","id"],Le=["innerHTML"],Ee={key:1},De={key:2},Be={key:5},Ae=["innerHTML"],Me={key:0},Te={style:{"margin-left":"12px"}},xe={class:"format-num"},Ge={style:{"margin-left":"12px"}},Ve={key:0,class:"format-num"},ze={key:1,class:"format-num"},He={key:2},Pe={style:{"margin-left":"12px"}},Re={key:0,class:"format-num"},Ue={key:1,class:"format-num"},Xe={key:2},je={key:0,class:"vue-ui-table-paginator format-num"},Ye={key:1,class:"vue-ui-table-size-warning"},We=["innerHTML"],Je={key:3,class:"vue-ui-table-pagination format-num"},Ke=["innerHTML","disabled"],qe=["disabled"],Ze={key:0,class:"vue-ui-table-page-scroller-wrapper"},Qe={for:"pageScroller",style:{"font-size":"14px"}},$e=["max","value"],et={key:1},tt=["disabled"],st=["innerHTML","disabled"],nt=["innerHTML"],ot={class:"chart-modal-options"},rt=["innerHTML"],lt=["innerHTML"],at=["innerHTML"],it={style:{width:"100%",height:"fit-content"},ref:"chartModal"},ct={class:"vue-ui-table-fieldset"},ut={class:"vue-ui-table-fieldset-wrapper"},dt=["name","id","checked","onInput"],ht=["for"],gt=["disabled"],mt=["innerHTML"],yt={style:{width:"100%","margin-bottom":"12px"}},pt={key:2,style:{width:"100%","margin-bottom":"32px"}};function Nt(o,n,r,i,s,t){const u=e.resolveComponent("VueUiXy"),h=e.resolveComponent("VueUiDonut");return e.openBlock(),e.createElementBlock("div",{class:"vue-ui-table-main",style:e.normalizeStyle(`font-family: ${t.FINAL_CONFIG.fontFamily}`)},[e.createElementVNode("div",L,[e.createElementVNode("button",{onClick:n[0]||(n[0]=a=>s.isExportRequest=!s.isExportRequest),innerHTML:t.icons.export,style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.exportMenu.backgroundColor};color:${t.FINAL_CONFIG.style.exportMenu.color}`)},null,12,E),e.createElementVNode("div",{class:"vue-ui-table-export-hub-dropdown","data-is-open":s.isExportRequest||"false",style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.exportMenu.backgroundColor};color:${t.FINAL_CONFIG.style.exportMenu.color}`)},[n[25]||(n[25]=e.createElementVNode("b",{class:"vue-ui-table-export-hub-title"}," Export ",-1)),e.createElementVNode("button",{class:"close-dropdown",onClick:n[1]||(n[1]=a=>s.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",B,[e.createElementVNode("div",A,[e.createElementVNode("div",M,e.toDisplayString(t.FINAL_CONFIG.translations.exportAllLabel)+" ("+e.toDisplayString(s.bodyCopy.length)+") ",1),e.createElementVNode("button",{id:"exportAll",onClick:n[2]||(n[2]=a=>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,T),e.createElementVNode("span",null,e.toDisplayString(t.FINAL_CONFIG.translations.exportAllButton),1)],4)]),e.createElementVNode("div",x,[e.createElementVNode("div",G,e.toDisplayString(t.FINAL_CONFIG.translations.exportPageLabel),1),e.createElementVNode("button",{id:"exportPage",onClick:n[3]||(n[3]=a=>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,V),e.createElementVNode("span",null,e.toDisplayString(t.FINAL_CONFIG.translations.exportPageButton),1)],4)])])],12,D)]),e.createElementVNode("div",{class:"vue-ui-table__wrapper",style:e.normalizeStyle(`max-height:${t.FINAL_CONFIG.maxHeight}px`),ref:"tableWrapper"},[e.createElementVNode("table",z,[e.createElementVNode("thead",H,[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(s.tableHead,(a,l)=>(e.openBlock(),e.createElementBlock("th",{key:`thead_${l}`,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":s.hasNaN[l]})},[t.hasNumericTypes&&([s.constants.TEXT,s.constants.DATE].includes(a.type)||a.isPercentage)?(e.openBlock(),e.createElementBlock("span",P,[e.createTextVNode(e.toDisplayString(a.name)+" ",1),a.isPercentage?(e.openBlock(),e.createElementBlock("span",R," / "+e.toDisplayString(a.percentageTo),1)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("span",U,e.toDisplayString(a.name),1))],6))),128))]),t.hasNumericTypes?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[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(s.tableHead,(a,l)=>(e.openBlock(),e.createElementBlock("th",{key:`thead_${l}`,class:e.normalizeClass({"th-numeric":!0,"th-has-nan":s.hasNaN[l]}),style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.th.backgroundColor};color:${t.FINAL_CONFIG.style.th.color};outline:${t.FINAL_CONFIG.style.th.outline}`)},[a.sum&&!s.hasNaN[l]?(e.openBlock(),e.createElementBlock("span",X,[e.createElementVNode("span",{innerHTML:t.icons.sum,style:{"margin-bottom":"-4px","margin-right":"3px"}},null,8,j),e.createTextVNode(" "+e.toDisplayString(t.dataLabel({p:a.prefix,v:Number(t.getSum(l)),s:a.suffix,r:a.decimals}))+" ",1),s.percentages[l]&&a.percentageTo&&!a.isPercentage?(e.openBlock(),e.createElementBlock("span",Y," ("+e.toDisplayString(isNaN(t.getSum(l)/t.getSum(s.percentages[l].referenceIndex))?"-":t.dataLabel({v:t.getSum(l)/t.getSum(s.percentages[l].referenceIndex)*100,s:"%",r:a.decimals}))+") ",1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],6))),128))]),e.createElementVNode("tr",null,[n[28]||(n[28]=e.createElementVNode("th",{class:"invisible-cell"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.tableHead,(a,l)=>(e.openBlock(),e.createElementBlock("th",{key:`thead_${l}`,class:e.normalizeClass({"th-numeric":!0,"th-has-nan":s.hasNaN[l]}),style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.th.backgroundColor};color:${t.FINAL_CONFIG.style.th.color};outline:${t.FINAL_CONFIG.style.th.outline}`)},[a.average&&!s.hasNaN[l]?(e.openBlock(),e.createElementBlock("span",W," ~ "+e.toDisplayString(isNaN(t.getAverage(l))?"":t.dataLabel({p:a.prefix,v:Number(t.getAverage(l)),s:a.suffix,r:a.decimals})),1)):e.createCommentVNode("",!0)],6))),128))]),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(s.tableHead,(a,l)=>(e.openBlock(),e.createElementBlock("th",{key:`thead_${l}`,class:e.normalizeClass({"th-has-nan":s.hasNaN[l]}),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",J,[a.type===s.constants.DATE&&s.dates[l]?(e.openBlock(),e.createElementBlock("div",K,[e.createElementVNode("div",q,[e.createElementVNode("div",Z,[e.createElementVNode("label",{for:`from_${l}`},e.toDisplayString(t.FINAL_CONFIG.translations.from),9,Q),e.withDirectives(e.createElementVNode("input",{id:`from_${l}`,type:"date","onUpdate:modelValue":c=>s.dates[l].from=c,onInput:c=>{t.filterBody(),t.setFilterDatesIndexes(l)},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,$),[[e.vModelText,s.dates[l].from]])]),e.createElementVNode("div",ee,[e.createElementVNode("label",{for:`to_${l}`},e.toDisplayString(t.FINAL_CONFIG.translations.to),9,te),e.withDirectives(e.createElementVNode("input",{id:`to_${l}`,type:"date","onUpdate:modelValue":c=>s.dates[l].to=c,onInput:c=>{t.filterBody(),t.setFilterDatesIndexes(l)},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,se),[[e.vModelText,s.dates[l].to]])])]),e.createElementVNode("div",ne,[a.isSort?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:c=>t.sortTh(l,c),class:e.normalizeClass({"th-button-active":[s.constants.DESC,s.constants.ASC].includes(s.sorts[l])}),style:e.normalizeStyle(`background:${[s.constants.DESC,s.constants.ASC].includes(s.sorts[l])?"":t.FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${[s.constants.DESC,s.constants.ASC].includes(s.sorts[l])?"":t.FINAL_CONFIG.style.pagination.buttons.color}`)},[s.sorts[l]===s.constants.ASC?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:[s.constants.DATE].includes(a.type)?t.icons.sort09:t.icons.sortAZ},null,8,re)):s.sorts[l]===s.constants.DESC?(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:[s.constants.DATE].includes(a.type)?t.icons.sort90:t.icons.sortZA},null,8,le)):(e.openBlock(),e.createElementBlock("span",{key:2,innerHTML:t.icons.arrowSort},null,8,ae))],14,oe)):e.createCommentVNode("",!0),e.createElementVNode("button",{onClick:c=>{t.resetDates(l),t.resetFilter(l,a,c)},disabled:!s.filteredDatesIndexes[l]&&t.isResetDisabled(l,a),class:"th-reset"}," ✖ ",8,ie)])])):e.createCommentVNode("",!0),a.isSearch?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:1,placeholder:t.FINAL_CONFIG.translations.inputPlaceholder,"onUpdate:modelValue":c=>s.searches[l]=c,onInput:n[4]||(n[4]=c=>t.debounce(t.filterBody,400)),name:`search_${l}`,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,ce)),[[e.vModelText,s.searches[l]]]):e.createCommentVNode("",!0),!s.hasNaN[l]&&a.isSort&&a.type!==s.constants.DATE?(e.openBlock(),e.createElementBlock("button",{key:2,onClick:c=>t.sortTh(l,c),class:e.normalizeClass({"th-button-active":[s.constants.DESC,s.constants.ASC].includes(s.sorts[l])}),style:e.normalizeStyle(`background:${[s.constants.DESC,s.constants.ASC].includes(s.sorts[l])?"":t.FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${[s.constants.DESC,s.constants.ASC].includes(s.sorts[l])?"":t.FINAL_CONFIG.style.pagination.buttons.color}`)},[s.sorts[l]===s.constants.ASC?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:[s.constants.NUMERIC].includes(a.type)?t.icons.sort09:t.icons.sortZA},null,8,de)):s.sorts[l]===s.constants.DESC?(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:[s.constants.NUMERIC].includes(a.type)?t.icons.sort90:t.icons.sortAZ},null,8,he)):(e.openBlock(),e.createElementBlock("span",{key:2,innerHTML:t.icons.arrowSort},null,8,ge))],14,ue)):e.createCommentVNode("",!0),a.isMultiselect?(e.openBlock(),e.createElementBlock("button",{key:3,onClick:c=>t.toggleMultiselect(l,a,c),innerHTML:t.icons.filter,class:e.normalizeClass({"th-button-active":s.multiselects[l]&&s.multiselects[l].length!==t.getDropdownOptions(l).length}),style:e.normalizeStyle(`background:${s.multiselects[l]&&s.multiselects[l].length!==t.getDropdownOptions(l).length?"":t.FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${s.multiselects[l]&&s.multiselects[l].length!==t.getDropdownOptions(l).length?"":t.FINAL_CONFIG.style.pagination.buttons.color}`)},null,14,me)):e.createCommentVNode("",!0),s.currentSelectionSpan.col===l&&t.canChart?(e.openBlock(),e.createElementBlock("button",{key:4,onClick:n[5]||(n[5]=c=>s.showChart=!s.showChart),innerHTML:t.icons.chart,class:e.normalizeClass({"th-button-active":s.showChart}),style:e.normalizeStyle(`background:${s.showChart?"":t.FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${s.showChart?"":t.FINAL_CONFIG.style.pagination.buttons.color}`)},null,14,ye)):e.createCommentVNode("",!0),a.rangeFilter&&s.rangeFilters[l]&&!s.hasNaN[l]?(e.openBlock(),e.createElementBlock("div",pe,[e.createElementVNode("label",{for:`rangeMin${l}`},n[29]||(n[29]=[e.createElementVNode("span",{style:{color:"grey"}},"ᒥ",-1),e.createTextVNode(" min "),e.createElementVNode("span",{style:{color:"grey"}},"ᒣ",-1)]),8,Ne),e.withDirectives(e.createElementVNode("input",{type:"number",id:`rangeMin${l}`,max:s.immutableRangeFilters[l].max,min:s.immutableRangeFilters[l].min,"onUpdate:modelValue":c=>s.rangeFilters[l].min=c,onInput:n[6]||(n[6]=c=>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,be),[[e.vModelText,s.rangeFilters[l].min,void 0,{number:!0}]]),e.withDirectives(e.createElementVNode("input",{type:"number",id:`rangeMax${l}`,max:s.immutableRangeFilters[l].max,min:s.immutableRangeFilters[l].min,"onUpdate:modelValue":c=>s.rangeFilters[l].max=c,onInput:n[7]||(n[7]=c=>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,Ce),[[e.vModelText,s.rangeFilters[l].max,void 0,{number:!0}]]),e.createElementVNode("label",{for:`rangeMax${l}`},n[30]||(n[30]=[e.createElementVNode("span",{style:{color:"grey"}},"ᒪ",-1),e.createTextVNode(" max "),e.createElementVNode("span",{style:{color:"grey"}},"ᒧ",-1)]),8,fe)])):e.createCommentVNode("",!0),t.canResetColumn(l,a)?(e.openBlock(),e.createElementBlock("button",{key:6,onClick:c=>t.resetFilter(l,a,c),disabled:t.isResetDisabled(l,a),class:"th-reset"}," ✖ ",8,ke)):e.createCommentVNode("",!0),a.isMultiselect?(e.openBlock(),e.createElementBlock("div",{key:7,class:"th-dropdown","data-is-open":"false",id:`th_dropdown_${l}`,style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.dropdowns.backgroundColor};color:${t.FINAL_CONFIG.style.dropdowns.color}`)},[e.createElementVNode("button",{class:"close-dropdown",onClick:c=>t.toggleMultiselect(l,a,c),style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.closeButtons.backgroundColor};color:${t.FINAL_CONFIG.style.closeButtons.color}`)}," ✖ ",12,Ie),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.getDropdownOptions(l),(c,d)=>(e.openBlock(),e.createElementBlock("span",{class:"th-option",key:`th_option_${l}_${d}`,onClick:y=>t.selectDropdownOption(c,l),onKeyup:[e.withKeys(y=>t.selectDropdownOption(c,l),["enter"]),e.withKeys(y=>t.selectDropdownOption(c,l),["space"])],style:e.normalizeStyle(`opacity:${t.isDropdownOptionSelected(c,l)?1:.5}`),tabindex:"0"},[t.isDropdownOptionSelected(c,l)?(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(c),1)],44,ve))),128))],12,Fe)):e.createCommentVNode("",!0)])],6))),128))])],64)):e.createCommentVNode("",!0),e.createElementVNode("tr",null,[n[32]||(n[32]=e.createElementVNode("th",{class:"invisible-cell"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.tableHead,(a,l)=>(e.openBlock(),e.createElementBlock("th",{key:`col_selector_${l}`,class:e.normalizeClass({"vue-ui-table-col-selector":!s.hasNaN[l],"th-has-nan":s.hasNaN[l]}),style:e.normalizeStyle(`background:${l===s.selectedColumn&&!s.hasNaN[l]?t.FINAL_CONFIG.style.th.selected.backgroundColor:t.FINAL_CONFIG.style.th.backgroundColor};color:${l===s.selectedColumn&&!s.hasNaN[l]?t.FINAL_CONFIG.style.th.selected.color:t.FINAL_CONFIG.style.th.color};outline:${t.FINAL_CONFIG.style.th.outline}`)},[s.hasNaN[l]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:s.tableHead[l].type===s.constants.NUMERIC?t.icons.chevronDown:"",class:e.normalizeClass({"col-selector":s.tableHead[l].type===s.constants.NUMERIC}),tabindex:"0",onClick:e.withModifiers(c=>t.selectColumn(l),["stop"]),onKeyup:e.withKeys(c=>t.selectColumn(l),["enter"])},null,42,Se))],6))),128))])]),e.createElementVNode("tbody",{onClick:n[8]||(n[8]=(...a)=>t.closeAllDropdowns&&t.closeAllDropdowns(...a)),onKeydown:n[9]||(n[9]=a=>t.navigateCell(a))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.visibleRows,(a,l)=>(e.openBlock(),e.createElementBlock("tr",{key:`tbody_${l}`,"data-row":l%2===0?"odd":"even",class:e.normalizeClass(`tr_${s.uid}`),style:e.normalizeStyle(`${l%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":l%2===0?"odd":"even"},e.toDisplayString(a.absoluteIndex+1),9,_e),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.td,(c,d)=>(e.openBlock(),e.createElementBlock("td",{"data-row":l%2===0?"odd":"even",key:`td_${l}_${d}`,style:e.normalizeStyle(t.isNumeric(c)||r.dataset.header[d].type===s.constants.DATE?"text-align:right;font-variant-numeric: tabular-nums;":""),onClick:y=>t.selectTd({td:c,rowIndex:l,colIndex:d,headerType:r.dataset.header[d].type,event:y}),onKeyup:[e.withKeys(y=>t.selectTd({td:c,rowIndex:l,colIndex:d,headerType:r.dataset.header[d].type,event:y}),["enter"]),e.withKeys(y=>t.selectTd({td:c,rowIndex:l,colIndex:d,headerType:r.dataset.header[d].type,event:y}),["space"])],class:e.normalizeClass({"td-numeric":r.dataset.header[d].type===s.constants.NUMERIC,"td-focusable":!0,"td-has-nan":s.hasNaN[d]}),id:`cell_${l}_${d}_${s.uid}`,tabindex:"0"},[a.meta&&a.meta.markerIndices.includes(d)&&a.meta.unicodeIcon?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`color:${a.meta.color};margin-right:3px`),innerHTML:a.meta.unicodeIcon},null,12,Le)):e.createCommentVNode("",!0),r.dataset.header[d].type===s.constants.DATE?(e.openBlock(),e.createElementBlock("span",Ee,e.toDisplayString(r.dataset.header[d].prefix)+" "+e.toDisplayString(new Date(c).toLocaleString().slice(0,10))+" "+e.toDisplayString(r.dataset.header[d].suffix),1)):r.dataset.header[d].isPercentage?(e.openBlock(),e.createElementBlock("span",De,e.toDisplayString(t.dataLabel({v:Number(c*100),s:"%",r:r.dataset.header[d].decimals})),1)):s.percentages[d]&&r.dataset.header[d].percentageTo&&!r.dataset.header[d].isPercentage?(e.openBlock(),e.createElementBlock("span",{key:3,class:e.normalizeClass({"td-nan":isNaN(Number(c))})},e.toDisplayString(isNaN(Number(c))?`${c} is not ${s.constants.NUMERIC}`:t.dataLabel({p:r.dataset.header[d].prefix,v:Number(c),s:r.dataset.header[d].suffix,r:r.dataset.header[d].decimals}))+" ("+e.toDisplayString(isNaN(Number(c))?"":t.dataLabel({v:Number(c/t.getSum(s.percentages[d].referenceIndex)*100),s:"%",r:r.dataset.header[d].decimals}))+") ",3)):r.dataset.header[d].type===s.constants.NUMERIC?(e.openBlock(),e.createElementBlock("span",{key:4,class:e.normalizeClass({"td-nan":isNaN(Number(c))})},e.toDisplayString(isNaN(Number(c))?`${c} is not ${s.constants.NUMERIC}`:t.dataLabel({p:r.dataset.header[d].prefix,v:Number(c.toFixed(r.dataset.header[d].decimals)),s:r.dataset.header[d].suffix,r:r.dataset.header[d].decimals})),3)):(e.openBlock(),e.createElementBlock("span",Be,e.toDisplayString(r.dataset.header[d].prefix)+" "+e.toDisplayString(c)+" "+e.toDisplayString(r.dataset.header[d].suffix),1))],46,Oe))),128))],14,we))),128))],32)])],4),e.createElementVNode("div",{class:e.normalizeClass({"td-selector-info":!0,"td-selector-info--active":s.currentSelectionSpan.col!==void 0&&s.currentSelectionSpan.rows.length}),style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.infoBar.backgroundColor};color:${t.FINAL_CONFIG.style.infoBar.color}`)},[s.currentSelectionSpan.col!==void 0&&s.currentSelectionSpan.rows.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",{innerHTML:t.icons.table,class:"td-selector-icon"},null,8,Ae),e.createElementVNode("span",null,[e.createElementVNode("b",null,[e.createTextVNode(e.toDisplayString(r.dataset.header[s.currentSelectionSpan.col].name)+" ",1),r.dataset.header[s.currentSelectionSpan.col].isPercentage?(e.openBlock(),e.createElementBlock("span",Me," / "+e.toDisplayString(r.dataset.header[s.percentages[s.currentSelectionSpan.col].referenceIndex].name),1)):e.createCommentVNode("",!0)]),e.createElementVNode("span",Te,[e.createTextVNode(e.toDisplayString(t.FINAL_CONFIG.translations.nb)+" : ",1),e.createElementVNode("b",xe,e.toDisplayString(s.currentSelectionSpan.rows.length),1)]),e.createElementVNode("span",Ge,[e.createTextVNode(e.toDisplayString(t.FINAL_CONFIG.translations.sum)+" : ",1),r.dataset.header[s.currentSelectionSpan.col].isPercentage?(e.openBlock(),e.createElementBlock("b",Ve,e.toDisplayString(t.selectedCellsCalculations.sumPercentage),1)):(e.openBlock(),e.createElementBlock("b",ze,e.toDisplayString(r.dataset.header[s.currentSelectionSpan.col].prefix)+" "+e.toDisplayString(t.selectedCellsCalculations.sumRegular)+" "+e.toDisplayString(r.dataset.header[s.currentSelectionSpan.col].suffix),1)),r.dataset.header[s.currentSelectionSpan.col].isPercentage?(e.openBlock(),e.createElementBlock("b",He,"%")):e.createCommentVNode("",!0)]),e.createElementVNode("span",Pe,[e.createTextVNode(e.toDisplayString(t.FINAL_CONFIG.translations.average)+" : ",1),r.dataset.header[s.currentSelectionSpan.col].isPercentage?(e.openBlock(),e.createElementBlock("b",Re,e.toDisplayString(t.selectedCellsCalculations.averagePercentage),1)):(e.openBlock(),e.createElementBlock("b",Ue,e.toDisplayString(r.dataset.header[s.currentSelectionSpan.col].prefix)+" "+e.toDisplayString(t.selectedCellsCalculations.averageRegular)+" "+e.toDisplayString(r.dataset.header[s.currentSelectionSpan.col].suffix),1)),r.dataset.header[s.currentSelectionSpan.col].isPercentage?(e.openBlock(),e.createElementBlock("b",Xe,"%")):e.createCommentVNode("",!0)])]),e.createElementVNode("button",{onClick:n[10]||(n[10]=(...a)=>t.resetSelection&&t.resetSelection(...a)),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),s.bodyCopy.length>10?(e.openBlock(),e.createElementBlock("div",je,[e.createTextVNode(e.toDisplayString(t.FINAL_CONFIG.translations.totalRows)+" : "+e.toDisplayString(r.dataset.body.length)+" | "+e.toDisplayString(t.FINAL_CONFIG.translations.paginatorLabel)+" : ",1),s.bodyCopy.length>10?e.withDirectives((e.openBlock(),e.createElementBlock("select",{key:0,id:"paginatorSelector","onUpdate:modelValue":n[11]||(n[11]=a=>s.itemsPerPage=a),onChange:n[12]||(n[12]=(...a)=>t.resetSelection&&t.resetSelection(...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}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.paginatorOptions,(a,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.bodyCopy.length>a||r.dataset.body.length===a?(e.openBlock(),e.createElementBlock("option",{key:`paginator_option_${l}`},e.toDisplayString(a),1)):e.createCommentVNode("",!0)],64))),256))],36)),[[e.vModelSelect,s.itemsPerPage,void 0,{number:!0}]]):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),s.itemsPerPage>=250?(e.openBlock(),e.createElementBlock("div",Ye,[e.createElementVNode("span",{innerHTML:t.icons.warning},null,8,We),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(${s.currentPage/(t.pages.length-1)*100}%)`)},null,4)):e.createCommentVNode("",!0),t.pages.length>1?(e.openBlock(),e.createElementBlock("div",Je,[e.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:n[13]||(n[13]=e.withModifiers(a=>t.navigate("previous"),["stop"])),innerHTML:t.icons.chevronLeft,disabled:s.currentPage===0,style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${t.FINAL_CONFIG.style.pagination.buttons.color};opacity:${s.currentPage===0?t.FINAL_CONFIG.style.pagination.buttons.opacityDisabled:1}`)},null,12,Ke),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(a=>t.navigate(1),["stop"])),disabled:s.currentPage===0,style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${t.FINAL_CONFIG.style.pagination.buttons.color};opacity:${s.currentPage===0?t.FINAL_CONFIG.style.pagination.buttons.opacityDisabled:1}`)}," 1 ",12,qe),t.pages.length>10?(e.openBlock(),e.createElementBlock("div",Ze,[e.createElementVNode("label",Qe,e.toDisplayString(t.FINAL_CONFIG.translations.page)+" "+e.toDisplayString(s.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]=a=>t.updateCurrentPage(a)),value:s.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,$e)])):(e.openBlock(),e.createElementBlock("span",et,e.toDisplayString(t.FINAL_CONFIG.translations.page)+" "+e.toDisplayString(s.currentPage+1)+" / "+e.toDisplayString(t.pages.length),1)),e.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:n[16]||(n[16]=e.withModifiers(a=>t.navigate(t.pages.length),["stop"])),disabled:s.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:${s.currentPage===t.pages.length-1?t.FINAL_CONFIG.style.pagination.buttons.opacityDisabled:1}`)},e.toDisplayString(t.pages.length),13,tt)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.FINAL_CONFIG.translations.page)+" "+e.toDisplayString(s.currentPage+1)+" / "+e.toDisplayString(t.pages.length),1)],64)),e.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:n[17]||(n[17]=e.withModifiers(a=>t.navigate("next"),["stop"])),innerHTML:t.icons.chevronRight,disabled:s.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:${s.currentPage===t.pages.length-1?t.FINAL_CONFIG.style.pagination.buttons.opacityDisabled:1}`)},null,12,st)])):e.createCommentVNode("",!0),s.showChart&&t.canChart?(e.openBlock(),e.createElementBlock("div",{key:4,class:"vue-ui-table-chart-modal",style:e.normalizeStyle(`width: ${s.modalWidth}px;top:${s.clientY}px; left:${s.clientX}px;background:${t.FINAL_CONFIG.style.chart.modal.backgroundColor};color:${t.FINAL_CONFIG.style.chart.modal.color}`)},[e.createElementVNode("div",{class:"modal-drag-handle",onMousedown:n[19]||(n[19]=(...a)=>t.dragMouseDown&&t.dragMouseDown(...a))},[e.createElementVNode("span",{innerHTML:t.icons.grip},null,8,nt),e.createElementVNode("button",{class:"close-chart-modal",onClick:n[18]||(n[18]=a=>s.showChart=!1)},"✖")],32),e.createElementVNode("button",{style:e.normalizeStyle([{"z-index":"1"},`background:${t.FINAL_CONFIG.style.closeButtons.backgroundColor};color:${t.FINAL_CONFIG.style.closeButtons.color};border-radius:${t.FINAL_CONFIG.style.closeButtons.borderRadius}`]),class:"close-chart-modal",onClick:n[20]||(n[20]=a=>s.showChart=!1)}," ✖ ",4),e.createElementVNode("div",ot,[t.availableDonutCategories.length?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[21]||(n[21]=a=>s.showDonutOptions=!0),innerHTML:t.icons.donut,class:e.normalizeClass({"is-active-chart":s.chart.type===s.constants.DONUT||s.showDonutOptions}),style:e.normalizeStyle(`background:${s.chart.type===s.constants.DONUT||s.showDonutOptions?t.FINAL_CONFIG.style.chart.modal.buttons.selected.backgroundColor:t.FINAL_CONFIG.style.chart.modal.buttons.unselected.backgroundColor};color:${s.chart.type===s.constants.DONUT||s.showDonutOptions?t.FINAL_CONFIG.style.chart.modal.buttons.selected.color:t.FINAL_CONFIG.style.chart.modal.buttons.unselected.color}`)},null,14,rt)):e.createCommentVNode("",!0),e.createElementVNode("button",{onClick:n[22]||(n[22]=a=>{s.chart.type=s.constants.LINE,s.showDonutOptions=!1}),innerHTML:t.icons.chart,class:e.normalizeClass({"is-active-chart":s.chart.type===s.constants.LINE&&!s.showDonutOptions}),style:e.normalizeStyle(`background:${s.chart.type===s.constants.LINE&&!s.showDonutOptions?t.FINAL_CONFIG.style.chart.modal.buttons.selected.backgroundColor:t.FINAL_CONFIG.style.chart.modal.buttons.unselected.backgroundColor};color:${s.chart.type===s.constants.LINE&&!s.showDonutOptions?t.FINAL_CONFIG.style.chart.modal.buttons.selected.color:t.FINAL_CONFIG.style.chart.modal.buttons.unselected.color}`)},null,14,lt),e.createElementVNode("button",{onClick:n[23]||(n[23]=a=>{s.chart.type=s.constants.BAR,s.showDonutOptions=!1}),innerHTML:t.icons.bar,class:e.normalizeClass({"is-active-chart":s.chart.type===s.constants.BAR&&!s.showDonutOptions}),style:e.normalizeStyle(`background:${s.chart.type===s.constants.BAR&&!s.showDonutOptions?t.FINAL_CONFIG.style.chart.modal.buttons.selected.backgroundColor:t.FINAL_CONFIG.style.chart.modal.buttons.unselected.backgroundColor};color:${s.chart.type===s.constants.BAR&&!s.showDonutOptions?t.FINAL_CONFIG.style.chart.modal.buttons.selected.color:t.FINAL_CONFIG.style.chart.modal.buttons.unselected.color}`)},null,14,at)]),e.createElementVNode("div",it,[s.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",ct,[e.createElementVNode("legend",null,e.toDisplayString(t.FINAL_CONFIG.translations.chooseCategoryColumn),1),e.createElementVNode("div",ut,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.availableDonutCategories,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`donut_radio_${l}`,class:"vue-ui-table-fieldset-option"},[e.createElementVNode("input",{type:"radio",name:a.name,id:a.name,checked:s.selectedDonutCategory&&a.name===s.selectedDonutCategory.name,onInput:c=>s.selectedDonutCategory=t.availableDonutCategories[l],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,dt),e.createElementVNode("label",{for:a.name},e.toDisplayString(a.name),9,ht)]))),128))]),e.createElementVNode("button",{class:"vue-ui-table-generate-donut",disabled:!s.selectedDonutCategory,onClick:n[24]||(n[24]=(...a)=>t.applyDonutOption&&t.applyDonutOption(...a)),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,mt),e.createTextVNode(" "+e.toDisplayString(t.FINAL_CONFIG.translations.makeDonut),1)],12,gt)])],4)):e.createCommentVNode("",!0),[s.constants.BAR,s.constants.LINE].includes(s.chart.type)&&!s.showDonutOptions?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",yt,[s.chart.type===s.constants.LINE?(e.openBlock(),e.createBlock(u,{key:0,dataset:t.chartData.xyDatasetLine,config:t.chartData.xyConfig},null,8,["dataset","config"])):e.createCommentVNode("",!0),s.chart.type===s.constants.BAR?(e.openBlock(),e.createBlock(u,{key:1,dataset:t.chartData.xyDatasetBar,config:t.chartData.xyConfig},null,8,["dataset","config"])):e.createCommentVNode("",!0)]),s.currentSelectionSpan.rows.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),[s.constants.DONUT].includes(s.chart.type)&&!s.showDonutOptions?(e.openBlock(),e.createElementBlock("div",pt,[e.createVNode(h,{dataset:s.currentDonut,config:t.chartData.donutConfig},null,8,["dataset","config"])])):e.createCommentVNode("",!0)],512)],4)):e.createCommentVNode("",!0)],4)}const bt=_._export_sfc(O,[["render",Nt],["__scopeId","data-v-03b16812"]]);exports.default=bt;
|
|
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",r=>{const n=document.activeElement;(n&&Array.from(n.classList).includes("td-focusable")&&r.key.includes("Arrow")||r.code==="Space")&&r.preventDefault()})},watch:{showChart:function(r){r&&this.$nextTick(()=>{this.closeDragElement()})},dataset:{handler(r){this.isLoading=!0,this.bodyCopy=JSON.parse(JSON.stringify(r.body)).map((n,o)=>({...n,absoluteIndex:o})),this.tableBody=JSON.parse(JSON.stringify(r.body)).map((n,o)=>({...n,absoluteIndex:o})),this.tableHead=JSON.parse(JSON.stringify(r.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(r=>({index:r,name:this.dataset.header[r].name,options:this.multiselects[r]}))},canChart(){return this.FINAL_CONFIG.useChart&&this.currentSelectionSpan.rows.length>1},chartData(){if(!this.canChart)return[];const r=316,n=512,o=this.currentSelectionSpan.rows.length,i=n/o,s=Math.max(...this.currentSelectionSpan.rows.map(p=>p.value)),t=Math.min(...this.currentSelectionSpan.rows.map(p=>p.value)),u=this.dataset.header[this.currentSelectionSpan.col].isPercentage&&this.dataset.header[this.currentSelectionSpan.col].percentageTo,h=this.chart.type===this.constants.DONUT&&this.selectedDonutCategory&&this.selectedDonutCategory.name,a=this.dataset.header[this.currentSelectionSpan.col].name+(u?` / ${this.dataset.header[this.percentages[this.currentSelectionSpan.col].referenceIndex].name}`:"")+(h?` ${this.FINAL_CONFIG.translations.by} ${this.selectedDonutCategory.name}`:""),l=this.dataset.header[this.currentSelectionSpan.col].prefix,c=this.dataset.header[this.currentSelectionSpan.col].suffix,d=[{name:a,series:this.currentSelectionSpan.rows.map(p=>p.value),type:"line",useProgression:!0,smooth:this.FINAL_CONFIG.style.chart.layout.line.smooth,color:this.FINAL_CONFIG.style.chart.layout.line.stroke,useArea:this.FINAL_CONFIG.style.chart.layout.line.useArea}],y=[{name:a,series:this.currentSelectionSpan.rows.map(p=>p.value),type:"bar",useProgression:!0,color:this.FINAL_CONFIG.style.chart.layout.bar.fill}],b=this.FINAL_CONFIG.style.chart.modal.backgroundColor,g=this.adaptColorToBackground(b),m=this.dataset.header[this.currentSelectionSpan.col].decimals,F={chart:{backgroundColor:b,color:g,labels:{fontSize:18,prefix:l,suffix:c},grid:{stroke:N.lightenHexColor(g,.5),labels:{color:g,xAxisLabels:{show:!1}}},highlighter:{color:g},legend:{color:g},padding:{left:72,bottom:24,top:36},title:{text:a,color:g,fontSize:18},tooltip:{showTimeLabel:!1,backgroundOpacity:30,color:g,backgroundColor:b,showPercentage:!1,roundingValue:m},userOptions:{position:"left",buttons:{pdf:!1,csv:!1,table:!1,annotator:!1}},zoom:{show:!1}},line:{labels:{show:!0,color:g,rounding:m},dot:{useSerieColor:!1,fill:this.FINAL_CONFIG.style.chart.layout.line.plot.fill,strokeWidth:this.FINAL_CONFIG.style.chart.layout.line.plot.strokeWidth}},bar:{useGradient:!1,border:{useSerieColor:!1,stroke:this.FINAL_CONFIG.style.chart.layout.bar.stroke,strokeWidth:this.FINAL_CONFIG.style.chart.layout.bar.strokeWidth},labels:{show:!0,color:g,rounding:m}}},f=t>=0?0:Math.abs(t),I=s+f,C=this.dataset.header[this.currentSelectionSpan.col].isPercentage,k=this.currentSelectionSpan.rows.map((p,v)=>({x:i*v+i/2,y:(1-(p.value+f)/I)*r,value:C?p.value*100:p.value,suffix:C?"%":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:p.index,absoluteValue:C?Math.abs(p.value)*100:Math.abs(p.value)}));return{donutConfig:{userOptions:{position:"left",buttons:{pdf:!1,csv:!1,table:!1,annotator:!1}},style:{chart:{backgroundColor:b,color:g,layout:{curvedMarkers:!0,donut:{strokeWidth:64},labels:{dataLabels:{suffix:C?"%":"",prefix:l},value:{rounding:m},percentage:{color:g,rounding:m},name:{color:g},hollow:{average:{color:g,text:this.FINAL_CONFIG.translations.average,value:{color:g}},total:{color:g,offsetY:-12,text:this.FINAL_CONFIG.translations.total,value:{color:g,offsetY:-12}}}}},legend:{backgroundColor:b,color:g,roundingValue:m,roundingPercentage:m},padding:{left:12,right:12},title:{text:a,color:g,fontSize:18},tooltip:{backgroundOpacity:30,color:g,backgroundColor:b,roundingValue:m,roundingValue:m}}}},xyConfig:F,xyDatasetLine:d,xyDatasetBar:y,progression:k.length>=2?this.calcLinearProgression(k):!1}},hasNumericTypes(){return this.dataset.header.map(r=>r.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>`,grip:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d="M5 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M5 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M12 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M12 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M19 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M19 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /></svg>`}},pages(){const r=[];if(this.bodyCopy.length)for(let n=0;n<this.bodyCopy.length;n+=this.itemsPerPage)r.push(this.bodyCopy.slice(n,n+this.itemsPerPage));return r},rows(){return this.bodyCopy.map(r=>r.td)},selectedCellsCalculations(){return{sumPercentage:Number((this.currentSelectionSpan.rows.map(r=>r.value).reduce((r,n)=>r+n,0)*100).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),sumRegular:Number(this.currentSelectionSpan.rows.map(r=>r.value).reduce((r,n)=>r+n,0).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),averagePercentage:Number((this.currentSelectionSpan.rows.map(r=>r.value).reduce((r,n)=>r+n,0)/this.currentSelectionSpan.rows.length*100).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),averageRegular:Number((this.currentSelectionSpan.rows.map(r=>r.value).reduce((r,n)=>r+n,0)/this.currentSelectionSpan.rows.length).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()}},FINAL_CONFIG(){const{vue_ui_table:r}=N.useConfig();if(!Object.keys(this.config||{}).length)return r;const n=this.treeShake({defaultConfig:r,userConfig:this.config});return this.convertConfigColors(n)},visibleRows(){return this.pages[this.currentPage]}},methods:{adaptColorToBackground:N.adaptColorToBackground,convertColorToHex:N.convertColorToHex,convertConfigColors:N.convertConfigColors,createCsvContent:N.createCsvContent,darkenHexColor:N.darkenHexColor,dataLabel:N.dataLabel,downloadCsv:N.downloadCsv,lightenHexColor:N.lightenHexColor,treeShake:N.treeShake,applyDonutOption(){const r=this.selectedDonutCategory.options.map((n,o)=>({name:n,color:this.palette[o]||this.palette[o%this.palette.length],values:[this.visibleRows.filter((i,s)=>i.td[this.selectedDonutCategory.index]===n&&this.currentSelectionSpan.rows.map(t=>t.index).includes(s)).map(i=>i.td[this.currentSelectionSpan.col]).reduce((i,s)=>Math.abs(i)+Math.abs(s),0)],absoluteValue:this.visibleRows.filter((i,s)=>i.td[this.selectedDonutCategory.index]===n&&this.currentSelectionSpan.rows.map(t=>t.index).includes(s)).map(i=>i.td[this.currentSelectionSpan.col]).reduce((i,s)=>i+s,0)})).sort((n,o)=>o.value-n.value);this.currentDonut=r,this.$nextTick(()=>{this.chart.type=this.constants.DONUT,this.showDonutOptions=!1})},calcRectY(r,n){return r>=0?n:this.chartData.zero},canResetColumn(r,n){return!this.hasNaN[r]&&(n.isSort||n.isSearch||n.isMultiselect||n.rangeFilter)&&![this.constants.DATE].includes(n.type)},createXls(r="all"){const n=this.dataset.header.map(t=>t.name),o=r==="all"?this.bodyCopy.map(t=>t.td):this.visibleRows.map(t=>t.td),i=[n].concat(o),s=this.createCsvContent(i);this.downloadCsv({csvContent:s,title:"vue-ui-table"})},calcLinearProgression:N.calcLinearProgression,closeAllDropdowns(){const r=document.getElementsByClassName("th-dropdown");r.length&&Array.from(r).forEach(n=>{n.dataset.isOpen=!1})},debounce(r,n){let o;clearTimeout(o),o=setTimeout(r,n)},filterBody(){this.bodyCopy=this.tableBody.filter(r=>{for(const n in this.searches)if(!r.td[n].toUpperCase().includes(this.searches[n].toUpperCase()))return!1;for(const n in this.multiselects)if(!this.multiselects[n].some(i=>i===r.td[n]))return!1;for(const n in this.dates){const o=new Date(r.td[n]),i=new Date(this.dates[n].from),s=new Date(this.dates[n].to);if(o<i||o>s)return!1}return!0}),this.sortBody()},getAverage(r){return this.rows.map(n=>n[r]).map(n=>isNaN(Number(n))?0:n).reduce((n,o)=>n+o,0)/this.bodyCopy.length},getDatesRange(r){const n=this.dataset.body.map(y=>new Date(y.td[r])),o=new Date(Math.min(...n)),i=new Date(Math.max(...n)),s=o.getFullYear(),t=i.getFullYear(),u=String(o.getMonth()+1).padStart(2,"0"),h=String(i.getMonth()+1).padStart(2,"0"),a=String(o.getDate()).padStart(2,"0"),l=String(i.getDate()).padStart(2,"0"),c=`${s}-${u}-${a}`,d=`${t}-${h}-${l}`;return{from:c,to:d}},getDonutLegendValue(r){return Number((r*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()},getDropdownOptions(r){return[...new Set(this.dataset.body.map(n=>n.td[r]))]},getSum(r){return this.rows.map(n=>n[r]).map(n=>isNaN(Number(n))?0:n).reduce((n,o)=>n+o,0)},includesNaN(r){return r.includes(NaN)},isDropdownOptionSelected(r,n){return this.multiselects[n]?this.multiselects[n].includes(r):!0},isNumeric(r){return!isNaN(Number(String(r).replaceAll("%","")))},isResetDisabled(r,n){const o=n.isSort,i=n.isSearch,s=n.isMultiselect&&this.multiselects[r],t=n.rangeFilter,u=h=>{if(t&&this.rangeFilters[h])return Math.round(this.rangeFilters[h].min)===this.immutableRangeFilters[h].min&&Math.round(this.rangeFilters[h].max)===this.immutableRangeFilters[h].max};if(o&&i&&s&&t)return["",void 0].includes(this.searches[r])&&[void 0].includes(this.sorts[r])&&this.multiselects[r].length===this.getDropdownOptions(r).length&&u(r);if(o&&i&&s)return["",void 0].includes(this.searches[r])&&[void 0].includes(this.sorts[r])&&this.multiselects[r].length===this.getDropdownOptions(r).length;if(o&&i&&t)return["",void 0].includes(this.searches[r])&&[void 0].includes(this.sorts[r])&&u(r);if(o&&i)return["",void 0].includes(this.searches[r])&&[void 0].includes(this.sorts[r]);if(o&&s&&t)return[void 0].includes(this.sorts[r])&&this.multiselects[r].length===this.getDropdownOptions(r).length&&u(r);if(o&&s)return[void 0].includes(this.sorts[r])&&this.multiselects[r].length===this.getDropdownOptions(r).length;if(i&&s&&t)return["",void 0].includes(this.searches[r])&&this.multiselects[r].length===this.getDropdownOptions(r).length&&u(r);if(i&&s)return["",void 0].includes(this.searches[r])&&this.multiselects[r].length===this.getDropdownOptions(r).length;if(i&&t)return["",void 0].includes(this.searches[r])&&u(r);if(i)return["",void 0].includes(this.searches[r]);if(o&&t)return[void 0].includes(this.sorts[r])&&u(r);if(o)return[void 0].includes(this.sorts[r]);if(s&&t)return this.multiselects[r].length===this.getDropdownOptions(r).length&&u(r);if(s)return this.multiselects[r].length===this.getDropdownOptions(r).length},navigate(r){this.resetSelection(),r==="next"&&this.currentPage<this.pages.length?this.currentPage+=1:r==="previous"&&this.currentPage>=1?this.currentPage-=1:this.currentPage=r-1,this.$refs.tableWrapper.scrollTo({top:0,left:0,behavior:"smooth"})},navigateCell(r){r.preventDefault();const n=r.keyCode,o=38,i=40,s=37,t=39;if(![o,i,s,t].includes(n))return;const u=r.target.id,h=/cell_(\d+)_(\d+)_vue-ui-table-(\d+)/,a=u.match(h),l=parseInt(a[1]),c=parseInt(a[2]),d=document.getElementById(`cell_${l}_${c+1}_${this.uid}`),y=document.getElementById(`cell_${l}_${c-1}_${this.uid}`),b=document.getElementById(`cell_${l+1}_${c}_${this.uid}`),g=document.getElementById(`cell_${l-1}_${c}_${this.uid}`);let m;switch(!0){case n===t:m=d;break;case n===s:m=y;break;case n===o:m=g;break;case n===i:m=b;break;default:return}m&&(m.focus(),m.scrollIntoView({behavior:"smooth",block:"center"}))},openDonutOptions(){this.selectedDonutCategory=this.availableDonutCategories[0],this.showDonutOptions=!0},placeLabelOnTopOrBottom({previousPlot:r,currentPlot:n,nextPlot:o}){const i=n.y-38,s=n.y+16;return r&&o?r.value<n.value&&o.value<n.value?i:r.value>n.value&&o.value>n.value?s:(r.value>n.value&&o.value<n.value||r.value<n.value&&o.value>n.value,i):r&&!o?r.value>n.value?s:i:!r&&o&&o.value>n.value?s:i},async prepareBodyCopy(){return new Promise(r=>{const n=[];this.tableHead.forEach((o,i)=>{if(o.isSearch&&Object.assign(this.searches,{[i]:""}),o.isMultiselect&&Object.assign(this.multiselects,{[i]:this.getDropdownOptions(i)}),o.type===this.constants.DATE&&(Object.assign(this.dates,{[i]:this.getDatesRange(i)}),Object.assign(this.filteredDatesIndexes,{[i]:!1})),(o.isPercentage||o.percentageTo)&&Object.assign(this.percentages,{[i]:{reference:o.percentageTo,referenceIndex:this.dataset.header.map(s=>s.name).indexOf(o.percentageTo)}}),o.rangeFilter&&(Object.assign(this.rangeFilters,{[i]:{min:Math.round(Math.min(...this.dataset.body.map(s=>s.td).map(s=>s[i]))),max:Math.round(Math.max(...this.dataset.body.map(s=>s.td).map(s=>s[i])))}}),Object.assign(this.immutableRangeFilters,{[i]:{min:Math.round(Math.min(...this.dataset.body.map(s=>s.td).map(s=>s[i]))),max:Math.round(Math.max(...this.dataset.body.map(s=>s.td).map(s=>s[i])))}})),o.isPercentage){const s=this.dataset.header.map(u=>u.name).indexOf(o.percentageTo),t=this.dataset.body.map(u=>u.td[s]).reduce((u,h)=>u+h,0);n.push([i,s,t])}o.type===this.constants.NUMERIC&&!o.isPercentage&&Object.assign(this.hasNaN,{[i]:this.includesNaN(this.dataset.body.map(s=>Number(s.td[i])))})}),this.bodyCopy.forEach((o,i)=>{n.map(s=>{const[t,u,h]=s;o.td[t]=o.td[u]/h}),o.td.forEach((s,t)=>{this.dataset.header[t].type===this.constants.TEXT&&this.dataset.header[t].isSearch&&(o[t]=this.stringToNumber(s)),this.dataset.header[t].type===this.constants.DATE&&(o[t]=new Date(s).getTime()),this.dataset.header[t].type===this.constants.NUMERIC&&(o[t]=isNaN(Number(s))?t:s),this.tableBody[i][t]=o[t]})}),r(!0)})},promiseWithAsyncFunction(r,n){return new Promise((o,i)=>{r().then(s=>{try{const t=n(s);o(t)}catch(t){i(t)}}).catch(s=>{i(s)})})},resetDates(r){this.dates[r]={from:this.getDatesRange(r).from,to:this.getDatesRange(r).to},this.filteredDatesIndexes[r]=!1,this.$forceUpdate(),this.filterBody()},resetFilter(r,n,o){const i=o.currentTarget;clearTimeout(this.buttonTimeout),i.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{i.classList.remove("clicked")},200),this.currentFilter=void 0,n.rangeFilter&&(this.rangeFilters[r].min=this.immutableRangeFilters[r].min,this.rangeFilters[r].max=this.immutableRangeFilters[r].max),n.isMultiselect?(this.multiselects[r]=this.getDropdownOptions(r),n.type===this.constants.TEXT&&(this.sorts[r]=void 0),n.isSearch&&(this.searches[r]="")):n.type===this.constants.NUMERIC?this.sorts[r]=void 0:n.type===this.constants.TEXT?(this.sorts[r]=void 0,this.searches[r]=""):n.type===this.constants.DATE&&(this.sorts[r]=void 0),this.filterBody()},resetSelection(){const r=document.getElementsByClassName(`tr_${this.uid}`);Array.from(r).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(r).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(r){this.currentSelectionSpan.col!==r?(this.visibleRows.forEach((n,o)=>{this.selectTd({td:n.td[r],rowIndex:o,colIndex:r,headerType:this.constants.NUMERIC,event:{currentTarget:document.getElementById(`cell_${o}_${r}_${this.uid}`)}})}),this.selectedColumn=r):(this.selectedColumn=void 0,this.resetSelection())},selectDropdownOption(r,n){this.multiselects[n].includes(r)?this.multiselects[n]=this.multiselects[n].filter(o=>o!==r):this.multiselects[n].push(r),this.$forceUpdate(),this.filterBody()},selectTd({td:r,rowIndex:n,colIndex:o,headerType:i,event:s}){if(i!==this.constants.NUMERIC||isNaN(Number(r))){this.resetSelection();return}this.currentSelectionSpan.col!==o&&this.resetSelection();const t=s.currentTarget.parentNode;this.currentSelectionSpan.col=o,this.currentSelectionSpan.rows.map(u=>u.index).includes(n)?(t.dataset.selected="false",this.currentSelectionSpan.rows=this.currentSelectionSpan.rows.filter(u=>u.index!==n),s.currentTarget.classList.remove(this.cssClass.CELL),Array.from(t.children).forEach((u,h)=>{u.dataset.row==="even"?(u.style.background=this.FINAL_CONFIG.style.rows.even.backgroundColor,u.style.color=this.FINAL_CONFIG.style.rows.even.olor):(u.style.background=this.FINAL_CONFIG.style.rows.odd.backgroundColor,u.style.color=this.FINAL_CONFIG.style.rows.odd.color)}),s.currentTarget.dataset.row==="even"?(s.currentTarget.style.background=this.FINAL_CONFIG.style.rows.even.backgroundColor,s.currentTarget.style.color=this.FINAL_CONFIG.style.rows.even.color):(s.currentTarget.style.background=this.FINAL_CONFIG.style.rows.odd.backgroundColor,s.currentTarget.style.color=this.FINAL_CONFIG.style.rows.odd.color)):(t.dataset.selected="true",this.currentSelectionSpan.rows.push({index:n,value:r}),Array.from(t.children).forEach((u,h)=>{u.dataset.row==="even"?(u.style.background=this.FINAL_CONFIG.style.rows.even.selectedNeighbors.backgroundColor,u.style.color=this.FINAL_CONFIG.style.rows.even.selectedNeighbors.color):(u.style.background=this.FINAL_CONFIG.style.rows.odd.selectedNeighbors.backgroundColor,u.style.color=this.FINAL_CONFIG.style.rows.odd.selectedNeighbors.color)}),s.currentTarget.dataset.row==="odd"?(s.currentTarget.style.background=this.FINAL_CONFIG.style.rows.odd.selectedCell.backgroundColor,s.currentTarget.style.color=this.FINAL_CONFIG.style.rows.odd.selectedCell.color):(s.currentTarget.style.background=this.FINAL_CONFIG.style.rows.even.selectedCell.backgroundColor,s.currentTarget.style.color=this.FINAL_CONFIG.style.rows.even.selectedCell.color)),this.currentSelectionSpan.rows=this.currentSelectionSpan.rows.sort((u,h)=>u.index-h.index),this.chart.type===this.constants.DONUT&&this.currentSelectionSpan.rows.length>0&&this.applyDonutOption()},setFilterDatesIndexes(r){this.filteredDatesIndexes[r]=!(this.getDatesRange(r).from===this.dates[r].from&&this.getDatesRange(r).to===this.dates[r].to)},sortBody(){this.resetSelection(),Object.keys(this.rangeFilters).forEach(r=>{this.filterByRange(this.bodyCopy,r)}),Object.keys(this.sorts).forEach(r=>{this.sortByNumber(this.bodyCopy,r)}),this.currentFilter!==void 0&&this.sortByNumber(this.bodyCopy,this.currentFilter),this.dataset.header.forEach((r,n)=>{if(r.isPercentage){const o=this.percentages[n].referenceIndex,i=this.bodyCopy.map(s=>s.td[o]).reduce((s,t)=>s+t,0);this.bodyCopy.forEach(s=>{s.td[n]=s.td[o]/i})}}),this.currentPage>this.pages.length-1&&(this.currentPage=this.pages.length-1),[-1].includes(this.currentPage)&&(this.currentPage=0),this.$forceUpdate()},filterByRange(r,n){this.bodyCopy=r.filter(o=>o.td[n]>=this.rangeFilters[n].min&&o[n]<=this.rangeFilters[n].max)},sortByNumber(r,n){if(this.sorts[n]===this.constants.ASC&&(r=r.sort((o,i)=>o[n]-i[n])),this.sorts[n]===this.constants.DESC)r=r.sort((o,i)=>i[n]-o[n]);else return 0},sortTh(r,n){this.currentFilter=r;const o=n.currentTarget;clearTimeout(this.buttonTimeout),o.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{o.classList.remove("clicked")},200),this.sorts[r]===1?this.sorts[r]=this.constants.DESC:this.sorts[r]=this.constants.ASC,this.sortBody()},stringToNumber(r){let n=0;for(let o=0;o<r.length;o+=1)n+=r.charCodeAt(o);return n},toggleMultiselect(r,n,o){const i=o.currentTarget;clearTimeout(this.buttonTimeout),i.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{i.classList.remove("clicked")},200);const s=document.getElementById(`th_dropdown_${r}`);s.dataset.isOpen==="false"?s.dataset.isOpen="true":s.dataset.isOpen="false"},updateCurrentPage(r){this.resetSelection(),!r||!r.target.value?this.currentPage=0:this.currentPage=Number(r.target.value)},calcDonutMarkerConnectorColor(r){return r.proportion*100>3?r.color:"transparent"},calcDonutMarkerLabelPositionX(r){return r.center.endX+this.calcMarkerOffset(r,50)},calcMarkerOffset(r,n){return r.center.endX-n>=0?3:-2},displayArcPercentage(r,n){return isNaN(r.value/this.sumValues(n))?0:(r.value/this.sumValues(n)*100).toFixed(0)+"%"},isArcBigEnough(r){return r.proportion*100>3},sumValues(r){return[...r].map(n=>n.value).reduce((n,o)=>n+o,0)},closeDragElement(){document.onmouseup=null,document.onmousemove=null},dragMouseDown(r){r=r||window.event,r.preventDefault();const o=this.$refs.chartModal.getBoundingClientRect();this.dragOffsetX=r.clientX-o.left,this.dragOffsetY=r.clientY-o.top,this.modalWidth=o.width,this.modalHeight=o.height,document.onmouseup=this.closeDragElement,document.onmousemove=this.elementDrag},elementDrag(r){if(this.rafId)return;const o=this.$refs.chartModal.getBoundingClientRect();this.clientX=r.clientX-this.dragOffsetX,this.clientY=r.clientY-this.dragOffsetY-40,this.clientX<0&&(this.clientX=0),this.clientX+o.width>window.innerWidth&&(this.clientX=window.innerWidth-o.width-48),this.clientY<0&&(this.clientY=0),this.clientY+o.height>window.innerHeight&&(this.clientY=window.innerHeight-o.height-24)}}},L={class:"vue-ui-table-export-hub"},E=["innerHTML"],D=["data-is-open"],B={class:"vue-ui-table-export-hub-options"},A={class:"vue-ui-table-export-hub-option-wrapper"},M={class:"label"},T=["innerHTML"],x={class:"vue-ui-table-export-hub-option-wrapper"},G={class:"label"},V=["innerHTML"],z={class:"vue-ui-table"},H={id:"tableHead"},P={key:0},R={key:0},U={key:1},X={key:0,style:{display:"flex","align-items":"center","justify-content":"flex-end"}},j=["innerHTML"],Y={key:0,style:{"margin-left":"3px"}},W={key:0},J={class:"th-filter"},K={key:0,class:"th-date"},q={class:"date-wrapper--inputs"},Z={class:"date-fieldset"},Q=["for"],$=["id","onUpdate:modelValue","onInput"],ee={class:"date-fieldset"},te=["for"],se=["id","onUpdate:modelValue","onInput"],ne={class:"date-wrapper--button"},re=["onClick"],oe=["innerHTML"],le=["innerHTML"],ae=["innerHTML"],ie=["onClick","disabled"],ce=["placeholder","onUpdate:modelValue","name"],ue=["onClick"],de=["innerHTML"],he=["innerHTML"],ge=["innerHTML"],me=["onClick","innerHTML"],ye=["innerHTML"],pe={key:5,class:"th-range-filter"},Ne=["for"],be=["id","max","min","onUpdate:modelValue"],Ce=["id","max","min","onUpdate:modelValue"],fe=["for"],ke=["onClick","disabled"],Fe=["id"],Ie=["onClick"],ve=["onClick","onKeyup"],Se=["innerHTML","onClick","onKeyup"],we=["data-row"],_e=["data-row"],Oe=["data-row","onClick","onKeyup","id"],Le=["innerHTML"],Ee={key:1},De={key:2},Be={key:5},Ae=["innerHTML"],Me={key:0},Te={style:{"margin-left":"12px"}},xe={class:"format-num"},Ge={style:{"margin-left":"12px"}},Ve={key:0,class:"format-num"},ze={key:1,class:"format-num"},He={key:2},Pe={style:{"margin-left":"12px"}},Re={key:0,class:"format-num"},Ue={key:1,class:"format-num"},Xe={key:2},je={key:0,class:"vue-ui-table-paginator format-num"},Ye={key:1,class:"vue-ui-table-size-warning"},We=["innerHTML"],Je={key:3,class:"vue-ui-table-pagination format-num"},Ke=["innerHTML","disabled"],qe=["disabled"],Ze={key:0,class:"vue-ui-table-page-scroller-wrapper"},Qe={for:"pageScroller",style:{"font-size":"14px"}},$e=["max","value"],et={key:1},tt=["disabled"],st=["innerHTML","disabled"],nt=["innerHTML"],rt={class:"chart-modal-options"},ot=["innerHTML"],lt=["innerHTML"],at=["innerHTML"],it={style:{width:"100%",height:"fit-content"},ref:"chartModal"},ct={class:"vue-ui-table-fieldset"},ut={class:"vue-ui-table-fieldset-wrapper"},dt=["name","id","checked","onInput"],ht=["for"],gt=["disabled"],mt=["innerHTML"],yt={style:{width:"100%","margin-bottom":"12px"}},pt={key:2,style:{width:"100%","margin-bottom":"32px"}};function Nt(r,n,o,i,s,t){const u=e.resolveComponent("VueUiXy"),h=e.resolveComponent("VueUiDonut");return e.openBlock(),e.createElementBlock("div",{class:"vue-ui-table-main",style:e.normalizeStyle(`font-family: ${t.FINAL_CONFIG.fontFamily}`)},[e.createElementVNode("div",L,[e.createElementVNode("button",{onClick:n[0]||(n[0]=a=>s.isExportRequest=!s.isExportRequest),innerHTML:t.icons.export,style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.exportMenu.backgroundColor};color:${t.FINAL_CONFIG.style.exportMenu.color}`)},null,12,E),e.createElementVNode("div",{class:"vue-ui-table-export-hub-dropdown","data-is-open":s.isExportRequest||"false",style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.exportMenu.backgroundColor};color:${t.FINAL_CONFIG.style.exportMenu.color}`)},[n[25]||(n[25]=e.createElementVNode("b",{class:"vue-ui-table-export-hub-title"}," Export ",-1)),e.createElementVNode("button",{class:"close-dropdown",onClick:n[1]||(n[1]=a=>s.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",B,[e.createElementVNode("div",A,[e.createElementVNode("div",M,e.toDisplayString(t.FINAL_CONFIG.translations.exportAllLabel)+" ("+e.toDisplayString(s.bodyCopy.length)+") ",1),e.createElementVNode("button",{id:"exportAll",onClick:n[2]||(n[2]=a=>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,T),e.createElementVNode("span",null,e.toDisplayString(t.FINAL_CONFIG.translations.exportAllButton),1)],4)]),e.createElementVNode("div",x,[e.createElementVNode("div",G,e.toDisplayString(t.FINAL_CONFIG.translations.exportPageLabel),1),e.createElementVNode("button",{id:"exportPage",onClick:n[3]||(n[3]=a=>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,V),e.createElementVNode("span",null,e.toDisplayString(t.FINAL_CONFIG.translations.exportPageButton),1)],4)])])],12,D)]),e.createElementVNode("div",{class:"vue-ui-table__wrapper",style:e.normalizeStyle(`max-height:${t.FINAL_CONFIG.maxHeight}px`),ref:"tableWrapper"},[e.createElementVNode("table",z,[e.createElementVNode("thead",H,[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(s.tableHead,(a,l)=>(e.openBlock(),e.createElementBlock("th",{key:`thead_${l}`,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":s.hasNaN[l]})},[t.hasNumericTypes&&([s.constants.TEXT,s.constants.DATE].includes(a.type)||a.isPercentage)?(e.openBlock(),e.createElementBlock("span",P,[e.createTextVNode(e.toDisplayString(a.name)+" ",1),a.isPercentage?(e.openBlock(),e.createElementBlock("span",R," / "+e.toDisplayString(a.percentageTo),1)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("span",U,e.toDisplayString(a.name),1))],6))),128))]),t.hasNumericTypes?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[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(s.tableHead,(a,l)=>(e.openBlock(),e.createElementBlock("th",{key:`thead_${l}`,class:e.normalizeClass({"th-numeric":!0,"th-has-nan":s.hasNaN[l]}),style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.th.backgroundColor};color:${t.FINAL_CONFIG.style.th.color};outline:${t.FINAL_CONFIG.style.th.outline}`)},[a.sum&&!s.hasNaN[l]?(e.openBlock(),e.createElementBlock("span",X,[e.createElementVNode("span",{innerHTML:t.icons.sum,style:{"margin-bottom":"-4px","margin-right":"3px"}},null,8,j),e.createTextVNode(" "+e.toDisplayString(t.dataLabel({p:a.prefix,v:Number(t.getSum(l)),s:a.suffix,r:a.decimals}))+" ",1),s.percentages[l]&&a.percentageTo&&!a.isPercentage?(e.openBlock(),e.createElementBlock("span",Y," ("+e.toDisplayString(isNaN(t.getSum(l)/t.getSum(s.percentages[l].referenceIndex))?"-":t.dataLabel({v:t.getSum(l)/t.getSum(s.percentages[l].referenceIndex)*100,s:"%",r:a.decimals}))+") ",1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],6))),128))]),e.createElementVNode("tr",null,[n[28]||(n[28]=e.createElementVNode("th",{class:"invisible-cell"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.tableHead,(a,l)=>(e.openBlock(),e.createElementBlock("th",{key:`thead_${l}`,class:e.normalizeClass({"th-numeric":!0,"th-has-nan":s.hasNaN[l]}),style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.th.backgroundColor};color:${t.FINAL_CONFIG.style.th.color};outline:${t.FINAL_CONFIG.style.th.outline}`)},[a.average&&!s.hasNaN[l]?(e.openBlock(),e.createElementBlock("span",W," ~ "+e.toDisplayString(isNaN(t.getAverage(l))?"":t.dataLabel({p:a.prefix,v:Number(t.getAverage(l)),s:a.suffix,r:a.decimals})),1)):e.createCommentVNode("",!0)],6))),128))]),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(s.tableHead,(a,l)=>(e.openBlock(),e.createElementBlock("th",{key:`thead_${l}`,class:e.normalizeClass({"th-has-nan":s.hasNaN[l]}),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",J,[a.type===s.constants.DATE&&s.dates[l]?(e.openBlock(),e.createElementBlock("div",K,[e.createElementVNode("div",q,[e.createElementVNode("div",Z,[e.createElementVNode("label",{for:`from_${l}`},e.toDisplayString(t.FINAL_CONFIG.translations.from),9,Q),e.withDirectives(e.createElementVNode("input",{id:`from_${l}`,type:"date","onUpdate:modelValue":c=>s.dates[l].from=c,onInput:c=>{t.filterBody(),t.setFilterDatesIndexes(l)},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,$),[[e.vModelText,s.dates[l].from]])]),e.createElementVNode("div",ee,[e.createElementVNode("label",{for:`to_${l}`},e.toDisplayString(t.FINAL_CONFIG.translations.to),9,te),e.withDirectives(e.createElementVNode("input",{id:`to_${l}`,type:"date","onUpdate:modelValue":c=>s.dates[l].to=c,onInput:c=>{t.filterBody(),t.setFilterDatesIndexes(l)},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,se),[[e.vModelText,s.dates[l].to]])])]),e.createElementVNode("div",ne,[a.isSort?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:c=>t.sortTh(l,c),class:e.normalizeClass({"th-button-active":[s.constants.DESC,s.constants.ASC].includes(s.sorts[l])}),style:e.normalizeStyle(`background:${[s.constants.DESC,s.constants.ASC].includes(s.sorts[l])?"":t.FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${[s.constants.DESC,s.constants.ASC].includes(s.sorts[l])?"":t.FINAL_CONFIG.style.pagination.buttons.color}`)},[s.sorts[l]===s.constants.ASC?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:[s.constants.DATE].includes(a.type)?t.icons.sort09:t.icons.sortAZ},null,8,oe)):s.sorts[l]===s.constants.DESC?(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:[s.constants.DATE].includes(a.type)?t.icons.sort90:t.icons.sortZA},null,8,le)):(e.openBlock(),e.createElementBlock("span",{key:2,innerHTML:t.icons.arrowSort},null,8,ae))],14,re)):e.createCommentVNode("",!0),e.createElementVNode("button",{onClick:c=>{t.resetDates(l),t.resetFilter(l,a,c)},disabled:!s.filteredDatesIndexes[l]&&t.isResetDisabled(l,a),class:"th-reset"}," ✖ ",8,ie)])])):e.createCommentVNode("",!0),a.isSearch?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:1,placeholder:t.FINAL_CONFIG.translations.inputPlaceholder,"onUpdate:modelValue":c=>s.searches[l]=c,onInput:n[4]||(n[4]=c=>t.debounce(t.filterBody,400)),name:`search_${l}`,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,ce)),[[e.vModelText,s.searches[l]]]):e.createCommentVNode("",!0),!s.hasNaN[l]&&a.isSort&&a.type!==s.constants.DATE?(e.openBlock(),e.createElementBlock("button",{key:2,onClick:c=>t.sortTh(l,c),class:e.normalizeClass({"th-button-active":[s.constants.DESC,s.constants.ASC].includes(s.sorts[l])}),style:e.normalizeStyle(`background:${[s.constants.DESC,s.constants.ASC].includes(s.sorts[l])?"":t.FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${[s.constants.DESC,s.constants.ASC].includes(s.sorts[l])?"":t.FINAL_CONFIG.style.pagination.buttons.color}`)},[s.sorts[l]===s.constants.ASC?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:[s.constants.NUMERIC].includes(a.type)?t.icons.sort09:t.icons.sortZA},null,8,de)):s.sorts[l]===s.constants.DESC?(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:[s.constants.NUMERIC].includes(a.type)?t.icons.sort90:t.icons.sortAZ},null,8,he)):(e.openBlock(),e.createElementBlock("span",{key:2,innerHTML:t.icons.arrowSort},null,8,ge))],14,ue)):e.createCommentVNode("",!0),a.isMultiselect?(e.openBlock(),e.createElementBlock("button",{key:3,onClick:c=>t.toggleMultiselect(l,a,c),innerHTML:t.icons.filter,class:e.normalizeClass({"th-button-active":s.multiselects[l]&&s.multiselects[l].length!==t.getDropdownOptions(l).length}),style:e.normalizeStyle(`background:${s.multiselects[l]&&s.multiselects[l].length!==t.getDropdownOptions(l).length?"":t.FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${s.multiselects[l]&&s.multiselects[l].length!==t.getDropdownOptions(l).length?"":t.FINAL_CONFIG.style.pagination.buttons.color}`)},null,14,me)):e.createCommentVNode("",!0),s.currentSelectionSpan.col===l&&t.canChart?(e.openBlock(),e.createElementBlock("button",{key:4,onClick:n[5]||(n[5]=c=>s.showChart=!s.showChart),innerHTML:t.icons.chart,class:e.normalizeClass({"th-button-active":s.showChart}),style:e.normalizeStyle(`background:${s.showChart?"":t.FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${s.showChart?"":t.FINAL_CONFIG.style.pagination.buttons.color}`)},null,14,ye)):e.createCommentVNode("",!0),a.rangeFilter&&s.rangeFilters[l]&&!s.hasNaN[l]?(e.openBlock(),e.createElementBlock("div",pe,[e.createElementVNode("label",{for:`rangeMin${l}`},n[29]||(n[29]=[e.createElementVNode("span",{style:{color:"grey"}},"ᒥ",-1),e.createTextVNode(" min "),e.createElementVNode("span",{style:{color:"grey"}},"ᒣ",-1)]),8,Ne),e.withDirectives(e.createElementVNode("input",{type:"number",id:`rangeMin${l}`,max:s.immutableRangeFilters[l].max,min:s.immutableRangeFilters[l].min,"onUpdate:modelValue":c=>s.rangeFilters[l].min=c,onInput:n[6]||(n[6]=c=>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,be),[[e.vModelText,s.rangeFilters[l].min,void 0,{number:!0}]]),e.withDirectives(e.createElementVNode("input",{type:"number",id:`rangeMax${l}`,max:s.immutableRangeFilters[l].max,min:s.immutableRangeFilters[l].min,"onUpdate:modelValue":c=>s.rangeFilters[l].max=c,onInput:n[7]||(n[7]=c=>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,Ce),[[e.vModelText,s.rangeFilters[l].max,void 0,{number:!0}]]),e.createElementVNode("label",{for:`rangeMax${l}`},n[30]||(n[30]=[e.createElementVNode("span",{style:{color:"grey"}},"ᒪ",-1),e.createTextVNode(" max "),e.createElementVNode("span",{style:{color:"grey"}},"ᒧ",-1)]),8,fe)])):e.createCommentVNode("",!0),t.canResetColumn(l,a)?(e.openBlock(),e.createElementBlock("button",{key:6,onClick:c=>t.resetFilter(l,a,c),disabled:t.isResetDisabled(l,a),class:"th-reset"}," ✖ ",8,ke)):e.createCommentVNode("",!0),a.isMultiselect?(e.openBlock(),e.createElementBlock("div",{key:7,class:"th-dropdown","data-is-open":"false",id:`th_dropdown_${l}`,style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.dropdowns.backgroundColor};color:${t.FINAL_CONFIG.style.dropdowns.color}`)},[e.createElementVNode("button",{class:"close-dropdown",onClick:c=>t.toggleMultiselect(l,a,c),style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.closeButtons.backgroundColor};color:${t.FINAL_CONFIG.style.closeButtons.color}`)}," ✖ ",12,Ie),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.getDropdownOptions(l),(c,d)=>(e.openBlock(),e.createElementBlock("span",{class:"th-option",key:`th_option_${l}_${d}`,onClick:y=>t.selectDropdownOption(c,l),onKeyup:[e.withKeys(y=>t.selectDropdownOption(c,l),["enter"]),e.withKeys(y=>t.selectDropdownOption(c,l),["space"])],style:e.normalizeStyle(`opacity:${t.isDropdownOptionSelected(c,l)?1:.5}`),tabindex:"0"},[t.isDropdownOptionSelected(c,l)?(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(c),1)],44,ve))),128))],12,Fe)):e.createCommentVNode("",!0)])],6))),128))])],64)):e.createCommentVNode("",!0),e.createElementVNode("tr",null,[n[32]||(n[32]=e.createElementVNode("th",{class:"invisible-cell"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.tableHead,(a,l)=>(e.openBlock(),e.createElementBlock("th",{key:`col_selector_${l}`,class:e.normalizeClass({"vue-ui-table-col-selector":!s.hasNaN[l],"th-has-nan":s.hasNaN[l]}),style:e.normalizeStyle(`background:${l===s.selectedColumn&&!s.hasNaN[l]?t.FINAL_CONFIG.style.th.selected.backgroundColor:t.FINAL_CONFIG.style.th.backgroundColor};color:${l===s.selectedColumn&&!s.hasNaN[l]?t.FINAL_CONFIG.style.th.selected.color:t.FINAL_CONFIG.style.th.color};outline:${t.FINAL_CONFIG.style.th.outline}`)},[s.hasNaN[l]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:s.tableHead[l].type===s.constants.NUMERIC?t.icons.chevronDown:"",class:e.normalizeClass({"col-selector":s.tableHead[l].type===s.constants.NUMERIC}),tabindex:"0",onClick:e.withModifiers(c=>t.selectColumn(l),["stop"]),onKeyup:e.withKeys(c=>t.selectColumn(l),["enter"])},null,42,Se))],6))),128))])]),e.createElementVNode("tbody",{onClick:n[8]||(n[8]=(...a)=>t.closeAllDropdowns&&t.closeAllDropdowns(...a)),onKeydown:n[9]||(n[9]=a=>t.navigateCell(a))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.visibleRows,(a,l)=>(e.openBlock(),e.createElementBlock("tr",{key:`tbody_${l}`,"data-row":l%2===0?"odd":"even",class:e.normalizeClass(`tr_${s.uid}`),style:e.normalizeStyle(`${l%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":l%2===0?"odd":"even"},e.toDisplayString(a.absoluteIndex+1),9,_e),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.td,(c,d)=>(e.openBlock(),e.createElementBlock("td",{"data-row":l%2===0?"odd":"even",key:`td_${l}_${d}`,style:e.normalizeStyle(t.isNumeric(c)||o.dataset.header[d].type===s.constants.DATE?"text-align:right;font-variant-numeric: tabular-nums;":""),onClick:y=>t.selectTd({td:c,rowIndex:l,colIndex:d,headerType:o.dataset.header[d].type,event:y}),onKeyup:[e.withKeys(y=>t.selectTd({td:c,rowIndex:l,colIndex:d,headerType:o.dataset.header[d].type,event:y}),["enter"]),e.withKeys(y=>t.selectTd({td:c,rowIndex:l,colIndex:d,headerType:o.dataset.header[d].type,event:y}),["space"])],class:e.normalizeClass({"td-numeric":o.dataset.header[d].type===s.constants.NUMERIC,"td-focusable":!0,"td-has-nan":s.hasNaN[d]}),id:`cell_${l}_${d}_${s.uid}`,tabindex:"0"},[a.meta&&a.meta.markerIndices.includes(d)&&a.meta.unicodeIcon?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`color:${a.meta.color};margin-right:3px`),innerHTML:a.meta.unicodeIcon},null,12,Le)):e.createCommentVNode("",!0),o.dataset.header[d].type===s.constants.DATE?(e.openBlock(),e.createElementBlock("span",Ee,e.toDisplayString(o.dataset.header[d].prefix)+" "+e.toDisplayString(new Date(c).toLocaleString().slice(0,10))+" "+e.toDisplayString(o.dataset.header[d].suffix),1)):o.dataset.header[d].isPercentage?(e.openBlock(),e.createElementBlock("span",De,e.toDisplayString(t.dataLabel({v:Number(c*100),s:"%",r:o.dataset.header[d].decimals})),1)):s.percentages[d]&&o.dataset.header[d].percentageTo&&!o.dataset.header[d].isPercentage?(e.openBlock(),e.createElementBlock("span",{key:3,class:e.normalizeClass({"td-nan":isNaN(Number(c))})},e.toDisplayString(isNaN(Number(c))?`${c} is not ${s.constants.NUMERIC}`:t.dataLabel({p:o.dataset.header[d].prefix,v:Number(c),s:o.dataset.header[d].suffix,r:o.dataset.header[d].decimals}))+" ("+e.toDisplayString(isNaN(Number(c))?"":t.dataLabel({v:Number(c/t.getSum(s.percentages[d].referenceIndex)*100),s:"%",r:o.dataset.header[d].decimals}))+") ",3)):o.dataset.header[d].type===s.constants.NUMERIC?(e.openBlock(),e.createElementBlock("span",{key:4,class:e.normalizeClass({"td-nan":isNaN(Number(c))})},e.toDisplayString(isNaN(Number(c))?`${c} is not ${s.constants.NUMERIC}`:t.dataLabel({p:o.dataset.header[d].prefix,v:Number(c.toFixed(o.dataset.header[d].decimals)),s:o.dataset.header[d].suffix,r:o.dataset.header[d].decimals})),3)):(e.openBlock(),e.createElementBlock("span",Be,e.toDisplayString(o.dataset.header[d].prefix)+" "+e.toDisplayString(c)+" "+e.toDisplayString(o.dataset.header[d].suffix),1))],46,Oe))),128))],14,we))),128))],32)])],4),e.createElementVNode("div",{class:e.normalizeClass({"td-selector-info":!0,"td-selector-info--active":s.currentSelectionSpan.col!==void 0&&s.currentSelectionSpan.rows.length}),style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.infoBar.backgroundColor};color:${t.FINAL_CONFIG.style.infoBar.color}`)},[s.currentSelectionSpan.col!==void 0&&s.currentSelectionSpan.rows.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",{innerHTML:t.icons.table,class:"td-selector-icon"},null,8,Ae),e.createElementVNode("span",null,[e.createElementVNode("b",null,[e.createTextVNode(e.toDisplayString(o.dataset.header[s.currentSelectionSpan.col].name)+" ",1),o.dataset.header[s.currentSelectionSpan.col].isPercentage?(e.openBlock(),e.createElementBlock("span",Me," / "+e.toDisplayString(o.dataset.header[s.percentages[s.currentSelectionSpan.col].referenceIndex].name),1)):e.createCommentVNode("",!0)]),e.createElementVNode("span",Te,[e.createTextVNode(e.toDisplayString(t.FINAL_CONFIG.translations.nb)+" : ",1),e.createElementVNode("b",xe,e.toDisplayString(s.currentSelectionSpan.rows.length),1)]),e.createElementVNode("span",Ge,[e.createTextVNode(e.toDisplayString(t.FINAL_CONFIG.translations.sum)+" : ",1),o.dataset.header[s.currentSelectionSpan.col].isPercentage?(e.openBlock(),e.createElementBlock("b",Ve,e.toDisplayString(t.selectedCellsCalculations.sumPercentage),1)):(e.openBlock(),e.createElementBlock("b",ze,e.toDisplayString(o.dataset.header[s.currentSelectionSpan.col].prefix)+" "+e.toDisplayString(t.selectedCellsCalculations.sumRegular)+" "+e.toDisplayString(o.dataset.header[s.currentSelectionSpan.col].suffix),1)),o.dataset.header[s.currentSelectionSpan.col].isPercentage?(e.openBlock(),e.createElementBlock("b",He,"%")):e.createCommentVNode("",!0)]),e.createElementVNode("span",Pe,[e.createTextVNode(e.toDisplayString(t.FINAL_CONFIG.translations.average)+" : ",1),o.dataset.header[s.currentSelectionSpan.col].isPercentage?(e.openBlock(),e.createElementBlock("b",Re,e.toDisplayString(t.selectedCellsCalculations.averagePercentage),1)):(e.openBlock(),e.createElementBlock("b",Ue,e.toDisplayString(o.dataset.header[s.currentSelectionSpan.col].prefix)+" "+e.toDisplayString(t.selectedCellsCalculations.averageRegular)+" "+e.toDisplayString(o.dataset.header[s.currentSelectionSpan.col].suffix),1)),o.dataset.header[s.currentSelectionSpan.col].isPercentage?(e.openBlock(),e.createElementBlock("b",Xe,"%")):e.createCommentVNode("",!0)])]),e.createElementVNode("button",{onClick:n[10]||(n[10]=(...a)=>t.resetSelection&&t.resetSelection(...a)),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),s.bodyCopy.length>10?(e.openBlock(),e.createElementBlock("div",je,[e.createTextVNode(e.toDisplayString(t.FINAL_CONFIG.translations.totalRows)+" : "+e.toDisplayString(o.dataset.body.length)+" | "+e.toDisplayString(t.FINAL_CONFIG.translations.paginatorLabel)+" : ",1),s.bodyCopy.length>10?e.withDirectives((e.openBlock(),e.createElementBlock("select",{key:0,id:"paginatorSelector","onUpdate:modelValue":n[11]||(n[11]=a=>s.itemsPerPage=a),onChange:n[12]||(n[12]=(...a)=>t.resetSelection&&t.resetSelection(...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}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.paginatorOptions,(a,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.bodyCopy.length>a||o.dataset.body.length===a?(e.openBlock(),e.createElementBlock("option",{key:`paginator_option_${l}`},e.toDisplayString(a),1)):e.createCommentVNode("",!0)],64))),256))],36)),[[e.vModelSelect,s.itemsPerPage,void 0,{number:!0}]]):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),s.itemsPerPage>=250?(e.openBlock(),e.createElementBlock("div",Ye,[e.createElementVNode("span",{innerHTML:t.icons.warning},null,8,We),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(${s.currentPage/(t.pages.length-1)*100}%)`)},null,4)):e.createCommentVNode("",!0),t.pages.length>1?(e.openBlock(),e.createElementBlock("div",Je,[e.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:n[13]||(n[13]=e.withModifiers(a=>t.navigate("previous"),["stop"])),innerHTML:t.icons.chevronLeft,disabled:s.currentPage===0,style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${t.FINAL_CONFIG.style.pagination.buttons.color};opacity:${s.currentPage===0?t.FINAL_CONFIG.style.pagination.buttons.opacityDisabled:1}`)},null,12,Ke),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(a=>t.navigate(1),["stop"])),disabled:s.currentPage===0,style:e.normalizeStyle(`background:${t.FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${t.FINAL_CONFIG.style.pagination.buttons.color};opacity:${s.currentPage===0?t.FINAL_CONFIG.style.pagination.buttons.opacityDisabled:1}`)}," 1 ",12,qe),t.pages.length>10?(e.openBlock(),e.createElementBlock("div",Ze,[e.createElementVNode("label",Qe,e.toDisplayString(t.FINAL_CONFIG.translations.page)+" "+e.toDisplayString(s.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]=a=>t.updateCurrentPage(a)),value:s.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,$e)])):(e.openBlock(),e.createElementBlock("span",et,e.toDisplayString(t.FINAL_CONFIG.translations.page)+" "+e.toDisplayString(s.currentPage+1)+" / "+e.toDisplayString(t.pages.length),1)),e.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:n[16]||(n[16]=e.withModifiers(a=>t.navigate(t.pages.length),["stop"])),disabled:s.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:${s.currentPage===t.pages.length-1?t.FINAL_CONFIG.style.pagination.buttons.opacityDisabled:1}`)},e.toDisplayString(t.pages.length),13,tt)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.FINAL_CONFIG.translations.page)+" "+e.toDisplayString(s.currentPage+1)+" / "+e.toDisplayString(t.pages.length),1)],64)),e.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:n[17]||(n[17]=e.withModifiers(a=>t.navigate("next"),["stop"])),innerHTML:t.icons.chevronRight,disabled:s.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:${s.currentPage===t.pages.length-1?t.FINAL_CONFIG.style.pagination.buttons.opacityDisabled:1}`)},null,12,st)])):e.createCommentVNode("",!0),s.showChart&&t.canChart?(e.openBlock(),e.createElementBlock("div",{key:4,class:"vue-ui-table-chart-modal",style:e.normalizeStyle(`width: ${s.modalWidth}px;top:${s.clientY}px; left:${s.clientX}px;background:${t.FINAL_CONFIG.style.chart.modal.backgroundColor};color:${t.FINAL_CONFIG.style.chart.modal.color}`)},[e.createElementVNode("div",{class:"modal-drag-handle",onMousedown:n[19]||(n[19]=(...a)=>t.dragMouseDown&&t.dragMouseDown(...a))},[e.createElementVNode("span",{innerHTML:t.icons.grip},null,8,nt),e.createElementVNode("button",{class:"close-chart-modal",onClick:n[18]||(n[18]=a=>s.showChart=!1)},"✖")],32),e.createElementVNode("button",{style:e.normalizeStyle([{"z-index":"1"},`background:${t.FINAL_CONFIG.style.closeButtons.backgroundColor};color:${t.FINAL_CONFIG.style.closeButtons.color};border-radius:${t.FINAL_CONFIG.style.closeButtons.borderRadius}`]),class:"close-chart-modal",onClick:n[20]||(n[20]=a=>s.showChart=!1)}," ✖ ",4),e.createElementVNode("div",rt,[t.availableDonutCategories.length?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[21]||(n[21]=a=>s.showDonutOptions=!0),innerHTML:t.icons.donut,class:e.normalizeClass({"is-active-chart":s.chart.type===s.constants.DONUT||s.showDonutOptions}),style:e.normalizeStyle(`background:${s.chart.type===s.constants.DONUT||s.showDonutOptions?t.FINAL_CONFIG.style.chart.modal.buttons.selected.backgroundColor:t.FINAL_CONFIG.style.chart.modal.buttons.unselected.backgroundColor};color:${s.chart.type===s.constants.DONUT||s.showDonutOptions?t.FINAL_CONFIG.style.chart.modal.buttons.selected.color:t.FINAL_CONFIG.style.chart.modal.buttons.unselected.color}`)},null,14,ot)):e.createCommentVNode("",!0),e.createElementVNode("button",{onClick:n[22]||(n[22]=a=>{s.chart.type=s.constants.LINE,s.showDonutOptions=!1}),innerHTML:t.icons.chart,class:e.normalizeClass({"is-active-chart":s.chart.type===s.constants.LINE&&!s.showDonutOptions}),style:e.normalizeStyle(`background:${s.chart.type===s.constants.LINE&&!s.showDonutOptions?t.FINAL_CONFIG.style.chart.modal.buttons.selected.backgroundColor:t.FINAL_CONFIG.style.chart.modal.buttons.unselected.backgroundColor};color:${s.chart.type===s.constants.LINE&&!s.showDonutOptions?t.FINAL_CONFIG.style.chart.modal.buttons.selected.color:t.FINAL_CONFIG.style.chart.modal.buttons.unselected.color}`)},null,14,lt),e.createElementVNode("button",{onClick:n[23]||(n[23]=a=>{s.chart.type=s.constants.BAR,s.showDonutOptions=!1}),innerHTML:t.icons.bar,class:e.normalizeClass({"is-active-chart":s.chart.type===s.constants.BAR&&!s.showDonutOptions}),style:e.normalizeStyle(`background:${s.chart.type===s.constants.BAR&&!s.showDonutOptions?t.FINAL_CONFIG.style.chart.modal.buttons.selected.backgroundColor:t.FINAL_CONFIG.style.chart.modal.buttons.unselected.backgroundColor};color:${s.chart.type===s.constants.BAR&&!s.showDonutOptions?t.FINAL_CONFIG.style.chart.modal.buttons.selected.color:t.FINAL_CONFIG.style.chart.modal.buttons.unselected.color}`)},null,14,at)]),e.createElementVNode("div",it,[s.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",ct,[e.createElementVNode("legend",null,e.toDisplayString(t.FINAL_CONFIG.translations.chooseCategoryColumn),1),e.createElementVNode("div",ut,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.availableDonutCategories,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:`donut_radio_${l}`,class:"vue-ui-table-fieldset-option"},[e.createElementVNode("input",{type:"radio",name:a.name,id:a.name,checked:s.selectedDonutCategory&&a.name===s.selectedDonutCategory.name,onInput:c=>s.selectedDonutCategory=t.availableDonutCategories[l],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,dt),e.createElementVNode("label",{for:a.name},e.toDisplayString(a.name),9,ht)]))),128))]),e.createElementVNode("button",{class:"vue-ui-table-generate-donut",disabled:!s.selectedDonutCategory,onClick:n[24]||(n[24]=(...a)=>t.applyDonutOption&&t.applyDonutOption(...a)),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,mt),e.createTextVNode(" "+e.toDisplayString(t.FINAL_CONFIG.translations.makeDonut),1)],12,gt)])],4)):e.createCommentVNode("",!0),[s.constants.BAR,s.constants.LINE].includes(s.chart.type)&&!s.showDonutOptions?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",yt,[s.chart.type===s.constants.LINE?(e.openBlock(),e.createBlock(u,{key:0,dataset:t.chartData.xyDatasetLine,config:t.chartData.xyConfig},null,8,["dataset","config"])):e.createCommentVNode("",!0),s.chart.type===s.constants.BAR?(e.openBlock(),e.createBlock(u,{key:1,dataset:t.chartData.xyDatasetBar,config:t.chartData.xyConfig},null,8,["dataset","config"])):e.createCommentVNode("",!0)]),s.currentSelectionSpan.rows.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.dataLabel({v:t.chartData.progression.trend,s:"%",r:1})),1)],4)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),[s.constants.DONUT].includes(s.chart.type)&&!s.showDonutOptions?(e.openBlock(),e.createElementBlock("div",pt,[e.createVNode(h,{dataset:s.currentDonut,config:t.chartData.donutConfig},null,8,["dataset","config"])])):e.createCommentVNode("",!0)],512)],4)):e.createCommentVNode("",!0)],4)}const bt=_._export_sfc(O,[["render",Nt],["__scopeId","data-v-1713331c"]]);exports.default=bt;
|
|
@@ -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-BDGf85YF.js";
|
|
3
|
+
import { _ as Te } from "./Title-CwPVIBWP.js";
|
|
4
|
+
import { u as qe, U as Le } from "./usePrinter-CKjQQldf.js";
|
|
5
|
+
import Ve from "./vue-ui-skeleton-hrplR5wa.js";
|
|
6
|
+
import { u as le } from "./useNestedProp-BsN3TOQ0.js";
|
|
7
|
+
import { _ as Ee } from "./PackageVersion-Bq98eXon.js";
|
|
8
|
+
import { _ as Ge } from "./PenAndPaper-CUUyQzLR.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-SCeiWj92.cjs"),oe=require("./Title-D7uuc4dY.cjs"),Y=require("./usePrinter-CWjBWUyP.cjs"),re=require("./vue-ui-skeleton-D4hXCz3m.cjs"),z=require("./useNestedProp-BV2kijyF.cjs"),le=require("./PackageVersion-DDIH1bP5.cjs"),ae=require("./PenAndPaper-B8Lcd-xn.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-BS7ybKs5.cjs"),oe=require("./Title-Cjpkoa1d.cjs"),Y=require("./usePrinter-Bs-Uo-8x.cjs"),re=require("./vue-ui-skeleton-BznhCw4p.cjs"),z=require("./useNestedProp-D24_JklN.cjs"),le=require("./PackageVersion-mZLomJm-.cjs"),ae=require("./PenAndPaper-CvkDs-Gh.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-D24_JklN.cjs"),w=require("./index-BS7ybKs5.cjs"),D=require("./useResponsive-DQmBAoBf.cjs"),B=require("./BaseIcon-DU8qgy6L.cjs"),O=require("./Title-Cjpkoa1d.cjs"),U=require("./PackageVersion-mZLomJm-.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-BsN3TOQ0.js";
|
|
3
|
+
import { u as re, c as ue, X as ie, F as V } from "./index-BDGf85YF.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-hA0_6Cl-.js";
|
|
6
|
+
import { _ as de } from "./Title-CwPVIBWP.js";
|
|
7
|
+
import { _ as he } from "./PackageVersion-Bq98eXon.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 {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { computed as h, ref as b, watch as Z, onMounted as ce, createElementBlock as c, openBlock as s, unref as r, normalizeStyle as G, normalizeClass as L, createBlock as F, createCommentVNode as d, createSlots as ve, withCtx as O, renderSlot as y, normalizeProps as z, guardReactiveProps as S, createVNode as he, Fragment as ee, renderList as te, toDisplayString as de } from "vue";
|
|
2
|
-
import { u as ae } from "./useNestedProp-
|
|
3
|
-
import { u as fe, c as ge, a as ye, v as pe, o as me, e as ke, w as oe, X as be, i as _e, f as Ce } from "./index-
|
|
4
|
-
import { _ as $e } from "./Title-
|
|
5
|
-
import { u as we, U as xe } from "./usePrinter-
|
|
6
|
-
import Oe from "./vue-ui-skeleton-
|
|
7
|
-
import { _ as Pe } from "./PackageVersion-
|
|
8
|
-
import { _ as Ae } from "./PenAndPaper-
|
|
2
|
+
import { u as ae } from "./useNestedProp-BsN3TOQ0.js";
|
|
3
|
+
import { u as fe, c as ge, a as ye, v as pe, o as me, e as ke, w as oe, X as be, i as _e, f as Ce } from "./index-BDGf85YF.js";
|
|
4
|
+
import { _ as $e } from "./Title-CwPVIBWP.js";
|
|
5
|
+
import { u as we, U as xe } from "./usePrinter-CKjQQldf.js";
|
|
6
|
+
import Oe from "./vue-ui-skeleton-hrplR5wa.js";
|
|
7
|
+
import { _ as Pe } from "./PackageVersion-Bq98eXon.js";
|
|
8
|
+
import { _ as Ae } from "./PenAndPaper-CUUyQzLR.js";
|
|
9
9
|
import { u as Ie } from "./useUserOptionState-BIvW1Kz7.js";
|
|
10
10
|
import { u as Fe } from "./useChartAccessibility-BWojgys7.js";
|
|
11
11
|
import { _ as ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|