vue-data-ui 2.3.47 → 2.3.49
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-THOuTDcq.js → Arrow-Bo8pfwKs.js} +1 -1
- package/dist/{Arrow-Bj64dVl2.cjs → Arrow-iqIdxIKZ.cjs} +1 -1
- package/dist/{BaseIcon-Lz2AkAUF.js → BaseIcon-BoVYVkUT.js} +1 -1
- package/dist/{BaseIcon-CAlmCZtL.cjs → BaseIcon-DuVD-1qH.cjs} +1 -1
- package/dist/{DataTable-E_zoBxXZ.cjs → DataTable-CMF1l-gL.cjs} +1 -1
- package/dist/{DataTable-Cg9dMxHZ.js → DataTable-Dy0vFXS7.js} +2 -2
- package/dist/{Legend-DKGyWu7I.js → Legend-BbSR193q.js} +1 -1
- package/dist/{Legend-L_Enr1Hx.cjs → Legend-C3LgyVKP.cjs} +1 -1
- package/dist/{Shape-npSEDLuX.js → Shape-B5VTXCQH.js} +1 -1
- package/dist/{Shape-BLiPCHkv.cjs → Shape-BNlNwrBB.cjs} +1 -1
- package/dist/Slicer-CIqhDVuv.cjs +1 -0
- package/dist/Slicer-D62jXLRQ.js +257 -0
- package/dist/{Title-C0_PhO2u.js → Title-0px6u9U5.js} +1 -1
- package/dist/{Title-DSPpszvp.cjs → Title-CSRD5z1r.cjs} +1 -1
- package/dist/{Tooltip-CgSI_niS.cjs → Tooltip-DFpYO4rz.cjs} +1 -1
- package/dist/{Tooltip-dfMcr3Yl.js → Tooltip-TTopnCsK.js} +1 -1
- package/dist/{index-ChMHOLEV.js → index-8Lp8V0TB.js} +561 -552
- package/dist/index-De6Dj52h.cjs +4 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +9 -0
- package/dist/types/vue-data-ui.d.ts +9 -0
- package/dist/{useNestedProp-DFwnYdme.js → useNestedProp-DE-a5lMx.js} +1 -1
- package/dist/{useNestedProp-BH5s4SOa.cjs → useNestedProp-Vjg1xsU_.cjs} +1 -1
- package/dist/{usePrinter-DUD-LDLx.cjs → usePrinter-SLYneJmG.cjs} +1 -1
- package/dist/{usePrinter-BW4S0cF1.js → usePrinter-cCBJ71Cc.js} +1 -1
- package/dist/{vue-data-ui-D0OBzNWS.cjs → vue-data-ui-B1ngLIqD.cjs} +1 -1
- package/dist/{vue-data-ui-CbuAnIFO.js → vue-data-ui-pmpX1nQY.js} +57 -57
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-B9L0Q6d9.cjs → vue-ui-3d-bar-8yOSr9F5.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-FHiGe0fx.js → vue-ui-3d-bar-DcoFVkRG.js} +7 -7
- package/dist/{vue-ui-accordion-Bukh98Pi.js → vue-ui-accordion-BQfLl7n5.js} +3 -3
- package/dist/{vue-ui-accordion-ZPhdh-C7.cjs → vue-ui-accordion-CiSEQOBc.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-CfKlnJ-N.cjs → vue-ui-age-pyramid-BRr6sDTU.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-DLBZkGqa.js → vue-ui-age-pyramid-Cyzoxsd_.js} +8 -8
- package/dist/{vue-ui-annotator-DwJ8pgXD.cjs → vue-ui-annotator-60JYTNTN.cjs} +1 -1
- package/dist/{vue-ui-annotator-sEd3t3Xa.js → vue-ui-annotator-DkkEj4IE.js} +1 -1
- package/dist/{vue-ui-candlestick-DGAu46FK.js → vue-ui-candlestick-CDLGf1AM.js} +9 -9
- package/dist/{vue-ui-candlestick-CEgbkXwC.cjs → vue-ui-candlestick-D7IRuRY-.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-DziSeBtT.js → vue-ui-carousel-table-CGqR-L66.js} +4 -4
- package/dist/{vue-ui-carousel-table-BZRMnoU1.cjs → vue-ui-carousel-table-dITvFJuB.cjs} +1 -1
- package/dist/{vue-ui-chestnut-iLTYa9Xl.js → vue-ui-chestnut-BGLp2adQ.js} +6 -6
- package/dist/{vue-ui-chestnut-DAaMh6sq.cjs → vue-ui-chestnut-x6ysM7Re.cjs} +1 -1
- package/dist/{vue-ui-cursor-D5XYd9sC.cjs → vue-ui-cursor-C5gPJbwq.cjs} +1 -1
- package/dist/{vue-ui-cursor-DUwUhpoT.js → vue-ui-cursor-X_1-s3ik.js} +2 -2
- package/dist/{vue-ui-dashboard-DyB_oaXE.cjs → vue-ui-dashboard-Cgtk8oJP.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DiXf1UFz.js → vue-ui-dashboard-zfHS3YDI.js} +2 -2
- package/dist/{vue-ui-digits-RUrqXG5U.js → vue-ui-digits-C6o6diGb.js} +2 -2
- package/dist/{vue-ui-digits-DVwp3Vzr.cjs → vue-ui-digits-DJL1XNX-.cjs} +1 -1
- package/dist/{vue-ui-donut-CMT341XH.cjs → vue-ui-donut-BwdyNBGR.cjs} +1 -1
- package/dist/{vue-ui-donut-CIo7evf6.js → vue-ui-donut-Do84LyRn.js} +9 -9
- package/dist/{vue-ui-donut-evolution-BTw0E5sZ.cjs → vue-ui-donut-evolution-CIjVTIAJ.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-DpflCS73.js → vue-ui-donut-evolution-DQnRpcIw.js} +9 -9
- package/dist/{vue-ui-dumbbell-BgZEQGlE.js → vue-ui-dumbbell-B71pIx5Z.js} +8 -8
- package/dist/{vue-ui-dumbbell-UGicuItz.cjs → vue-ui-dumbbell-D_Bvl_1q.cjs} +1 -1
- package/dist/{vue-ui-flow-BqK29554.js → vue-ui-flow-BFXzVNCo.js} +7 -7
- package/dist/{vue-ui-flow-BfouRr14.cjs → vue-ui-flow-DpFcTi7P.cjs} +1 -1
- package/dist/{vue-ui-galaxy-DgIe6MYv.cjs → vue-ui-galaxy-CI546a3O.cjs} +1 -1
- package/dist/{vue-ui-galaxy-CuE0gjDn.js → vue-ui-galaxy-DC0LoWFu.js} +9 -9
- package/dist/{vue-ui-gauge-BKi2QGVX.cjs → vue-ui-gauge-COVSZG36.cjs} +1 -1
- package/dist/{vue-ui-gauge-CcuW6li6.js → vue-ui-gauge-Chz7KDBu.js} +5 -5
- package/dist/{vue-ui-gizmo-B9LHgK5x.cjs → vue-ui-gizmo-DuSQv_6q.cjs} +1 -1
- package/dist/{vue-ui-gizmo-Cp06yGvf.js → vue-ui-gizmo-ydAuESKo.js} +2 -2
- package/dist/{vue-ui-heatmap-D5pMKFX8.js → vue-ui-heatmap-Ba_jzJB2.js} +8 -8
- package/dist/{vue-ui-heatmap-D1GsWm8S.cjs → vue-ui-heatmap-CdpBaTry.cjs} +1 -1
- package/dist/{vue-ui-kpi-B0YwsHBF.js → vue-ui-kpi-C5yFYQ19.js} +3 -3
- package/dist/{vue-ui-kpi-DuBd9Cfw.cjs → vue-ui-kpi-D2TypVZG.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BCE21FIO.js → vue-ui-mini-loader-BD6Lu94h.js} +2 -2
- package/dist/{vue-ui-mini-loader-CAJwCMGP.cjs → vue-ui-mini-loader-DJXMipP5.cjs} +1 -1
- package/dist/{vue-ui-molecule-DDasACBO.cjs → vue-ui-molecule-DCCCC-6a.cjs} +1 -1
- package/dist/{vue-ui-molecule-DeI-vOCp.js → vue-ui-molecule-DCsLwmnF.js} +9 -9
- package/dist/{vue-ui-mood-radar-C2ylWXY4.cjs → vue-ui-mood-radar-CX6Gq6UB.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-B8IcNhp-.js → vue-ui-mood-radar-D-FUCHS-.js} +9 -9
- package/dist/{vue-ui-nested-donuts-CgpGyxKR.js → vue-ui-nested-donuts-CgRfdcJy.js} +9 -9
- package/dist/{vue-ui-nested-donuts-DUnTzrPT.cjs → vue-ui-nested-donuts-DWuCVtg8.cjs} +1 -1
- package/dist/{vue-ui-onion-B1cdXNvI.js → vue-ui-onion-BWo7GrFe.js} +9 -9
- package/dist/{vue-ui-onion-DGjKbke1.cjs → vue-ui-onion-Dg-7GylY.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-DWYOet0Y.js → vue-ui-parallel-coordinate-plot-DSUZL2Sy.js} +10 -10
- package/dist/{vue-ui-parallel-coordinate-plot-BZtCTNKa.cjs → vue-ui-parallel-coordinate-plot-prF4TxQD.cjs} +1 -1
- package/dist/{vue-ui-quadrant-D4Pfvypx.cjs → vue-ui-quadrant-Ct06vgiw.cjs} +1 -1
- package/dist/{vue-ui-quadrant-bc2ZAF-e.js → vue-ui-quadrant-DYApa1bj.js} +10 -10
- package/dist/{vue-ui-quick-chart-CmJ7o4Sy.cjs → vue-ui-quick-chart-CwIWb_LQ.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-U0Bwmo7o.js → vue-ui-quick-chart-DOHmWoHL.js} +6 -6
- package/dist/{vue-ui-radar-ClHJwcdQ.cjs → vue-ui-radar-BJ23WOh7.cjs} +1 -1
- package/dist/{vue-ui-radar-KXEodxY0.js → vue-ui-radar-C4SFHmfz.js} +10 -10
- package/dist/{vue-ui-rating-B4i_esmV.js → vue-ui-rating-BSFASHFc.js} +2 -2
- package/dist/{vue-ui-rating-CUR8udEY.cjs → vue-ui-rating-BsRGR-VS.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-B0IYw3cW.cjs → vue-ui-relation-circle-CEzXa3yt.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-CR0-9RVH.js → vue-ui-relation-circle-Dg-99k9k.js} +5 -5
- package/dist/{vue-ui-rings-B0quOkZB.js → vue-ui-rings-CCcc9cFR.js} +9 -9
- package/dist/{vue-ui-rings-dZ5s41lD.cjs → vue-ui-rings-DiQhsWx_.cjs} +1 -1
- package/dist/{vue-ui-scatter-DGkgA3c2.js → vue-ui-scatter-BgsexKX4.js} +10 -10
- package/dist/{vue-ui-scatter-B6ONtpIT.cjs → vue-ui-scatter-D7z4c6k-.cjs} +1 -1
- package/dist/{vue-ui-screenshot-DHzHE3bq.cjs → vue-ui-screenshot-Bj85MdEJ.cjs} +1 -1
- package/dist/{vue-ui-screenshot-C54ey8-p.js → vue-ui-screenshot-viGaG1cU.js} +1 -1
- package/dist/{vue-ui-skeleton-BWu2nLeV.cjs → vue-ui-skeleton-Cl9Kp9yE.cjs} +1 -1
- package/dist/{vue-ui-skeleton-CwTDNzek.js → vue-ui-skeleton-apODtH32.js} +2 -2
- package/dist/{vue-ui-smiley-BfHCG14T.js → vue-ui-smiley-BUDu21nW.js} +2 -2
- package/dist/{vue-ui-smiley-YycNcszs.cjs → vue-ui-smiley-CfDLeydH.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-DNxVD2pk.js → vue-ui-spark-trend-B1bpQlNI.js} +4 -4
- package/dist/{vue-ui-spark-trend-Dyilmz2Z.cjs → vue-ui-spark-trend-ZS_m-z6R.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CUxLYyQb.cjs → vue-ui-sparkbar-C8fgdM5i.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-Bbaou7w5.js → vue-ui-sparkbar-CpwYwA2h.js} +3 -3
- package/dist/{vue-ui-sparkgauge-tsCLtZpw.cjs → vue-ui-sparkgauge-CGy4jbtz.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-CX_a9jtx.js → vue-ui-sparkgauge-DpDoOc6V.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-Cwz2wQ1e.cjs → vue-ui-sparkhistogram-CX35Cfkc.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-DZVZ-RXk.js → vue-ui-sparkhistogram-CcEB0gwD.js} +4 -4
- package/dist/{vue-ui-sparkline-C-PJg1EI.js → vue-ui-sparkline-Bk4kWGco.js} +3 -3
- package/dist/{vue-ui-sparkline-BEprcYEe.cjs → vue-ui-sparkline-CdPAtBR8.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DGyE2dE3.cjs → vue-ui-sparkstackbar-6xwj9rme.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-CxPo843r.js → vue-ui-sparkstackbar-B7Pvvmo_.js} +3 -3
- package/dist/{vue-ui-stackbar-BrX0uP0u.cjs → vue-ui-stackbar-7xZmgZo4.cjs} +1 -1
- package/dist/{vue-ui-stackbar-DFFORChg.js → vue-ui-stackbar-BMhowvyb.js} +10 -10
- package/dist/{vue-ui-strip-plot-DhcPpafE.js → vue-ui-strip-plot-CnLnX_zO.js} +9 -9
- package/dist/{vue-ui-strip-plot-C_J9uvvB.cjs → vue-ui-strip-plot-DOXU1HhU.cjs} +1 -1
- package/dist/{vue-ui-table-BuBIC5Ep.js → vue-ui-table-CoIUKpaM.js} +1 -1
- package/dist/{vue-ui-table-B0CfGG_e.cjs → vue-ui-table-Ly0OlueB.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-D3YP4078.js → vue-ui-table-heatmap-CtVr--3k.js} +4 -4
- package/dist/{vue-ui-table-heatmap-BRNGFUm-.cjs → vue-ui-table-heatmap-cLUGY_I8.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-BDaZLq9H.js → vue-ui-table-sparkline-Ct4n3vjB.js} +5 -5
- package/dist/{vue-ui-table-sparkline-OXdcU6JH.cjs → vue-ui-table-sparkline-i_FQjHJt.cjs} +1 -1
- package/dist/{vue-ui-thermometer-Dq6DVPKi.js → vue-ui-thermometer-CELrItTb.js} +5 -5
- package/dist/{vue-ui-thermometer-BPHxKklC.cjs → vue-ui-thermometer-vrEGhPDN.cjs} +1 -1
- package/dist/{vue-ui-timer-C51UJ8cf.js → vue-ui-timer-BKhOVqdo.js} +4 -4
- package/dist/{vue-ui-timer-Cc5OaHL8.cjs → vue-ui-timer-C5oaCNfC.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-DWRRMm0S.cjs → vue-ui-tiremarks-CSbL6U73.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-Cc9PjBa8.js → vue-ui-tiremarks-p6l5H8Xo.js} +5 -5
- package/dist/{vue-ui-treemap-BUPvuWKn.cjs → vue-ui-treemap-BwegaYVE.cjs} +1 -1
- package/dist/{vue-ui-treemap-Dfsnew-o.js → vue-ui-treemap-C4DTISo2.js} +9 -9
- package/dist/{vue-ui-vertical-bar-4E0DyBl3.cjs → vue-ui-vertical-bar-B3GbC7E_.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-aTTLZNFG.js → vue-ui-vertical-bar-C8dwl1ez.js} +9 -9
- package/dist/{vue-ui-waffle-CDv36WNb.js → vue-ui-waffle-BjXgV05U.js} +9 -9
- package/dist/{vue-ui-waffle-CZPrfM_0.cjs → vue-ui-waffle-DfhoqEtv.cjs} +1 -1
- package/dist/{vue-ui-wheel-DZck6SNJ.js → vue-ui-wheel-BpGLo5wJ.js} +5 -5
- package/dist/{vue-ui-wheel-IMuXbp1R.cjs → vue-ui-wheel-CtUEp9En.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-EVeSzBUX.cjs → vue-ui-word-cloud-BSmOL5UE.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-C9bnwx69.js → vue-ui-word-cloud-DNBF-X9H.js} +7 -7
- package/dist/vue-ui-xy-ClD6S1Ok.cjs +3 -0
- package/dist/{vue-ui-xy-BRRAfLis.js → vue-ui-xy-W_Zawlkz.js} +402 -380
- package/dist/{vue-ui-xy-canvas-DhHEH5ib.cjs → vue-ui-xy-canvas-BZTwibcy.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-5bhkoiT4.js → vue-ui-xy-canvas-DELc-ZEx.js} +10 -10
- package/package.json +1 -1
- package/dist/Slicer-DGciWCaF.js +0 -156
- package/dist/Slicer-DNvTnINC.cjs +0 -1
- package/dist/index-Br-wm_4r.cjs +0 -4
- package/dist/vue-ui-xy-BVwJjkYt.cjs +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index-De6Dj52h.cjs"),e=require("vue"),b=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),C={name:"vue-ui-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},data(){return{uid:`vue-ui-table-${Math.random()}`,bodyCopy:JSON.parse(JSON.stringify(this.dataset.body)).map((l,o)=>({...l,absoluteIndex:o})),buttonTimeout:null,canMoveChart:!1,chart:{height:316,type:"bar",width:512},constants:{ASC:1,BAR:"bar",DATE:"date",DESC:-1,DONUT:"donut",LINE:"line",NUMERIC:"numeric",PERCENTAGE:"percentage",TEXT:"text"},clientX:100,clientY:100,cssClass:{CELL:"smart-td-selected",FIRST_TD:"smart-td-selected-first",LAST_TD:"smart-td-selected-last",ROW:"smart-td-selected-neighbor"},currentDonut:void 0,currentFilter:void 0,currentSearch:void 0,currentSelectionSpan:{col:void 0,rows:[]},currentPage:0,dates:{},filteredDatesIndexes:{},hasNaN:{},iconColor:"#2D353C",iconSize:20,immutableRangeFilters:{},isExportRequest:!1,isLoading:!1,itemsPerPage:this.config.rowsPerPage?this.config.rowsPerPage:25,multiselects:{},paginatorOptions:[...new Set([10,25,50,100,250,500,this.config.rowsPerPage?this.config.rowsPerPage:25,this.dataset.body.length])].sort((l,o)=>l-o),palette:g.palette,percentages:{},rafId:null,rangeFilters:{},searches:{},selectedColumn:void 0,selectedDonutCategory:void 0,selectedPlot:void 0,showChart:!1,showDonutOptions:!1,sorts:{},tableBody:JSON.parse(JSON.stringify(this.dataset.body)).map((l,o)=>({...l,absoluteIndex:o})),tableHead:JSON.parse(JSON.stringify(this.dataset.header)).map(l=>({average:Object.hasOwn(l,"average")?l.average:!1,decimals:Object.hasOwn(l,"decimals")?l.decimals:0,isMultiselect:Object.hasOwn(l,"isMultiselect")?l.isMultiselect:!1,isPercentage:Object.hasOwn(l,"isPercentage")?l.isPercentage:!1,isSearch:Object.hasOwn(l,"isSearch")?l.isSearch:!1,isSort:Object.hasOwn(l,"isSort")?l.isSort:!1,name:l.name,percentageTo:Object.hasOwn(l,"percentageTo")?l.percentageTo:void 0,prefix:Object.hasOwn(l,"prefix")?l.prefix:"",rangeFilter:Object.hasOwn(l,"rangeFilter")?l.rangeFilter:!1,suffix:Object.hasOwn(l,"suffix")?l.suffix:"",sum:Object.hasOwn(l,"sum")?l.sum:!1,type:l.type}))}},mounted(){if(this.dataset.header.length===0)throw new Error(`vue-ui-table error: missing header data.
|
|
2
2
|
Provide an array of objects of type:
|
|
3
3
|
{
|
|
4
4
|
name: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useCssVars as J, ref as h, computed as c, onMounted as K, openBlock as n, createElementBlock as l, normalizeStyle as $, normalizeClass as V, createBlock as Q, unref as g, createSlots as Y, withCtx as C, renderSlot as r, normalizeProps as v, guardReactiveProps as f, createCommentVNode as p, createElementVNode as b, Fragment as _, renderList as w, createVNode as Z, mergeProps as z, nextTick as j } from "vue";
|
|
2
|
-
import { u as ee, c as E, t as te, o as ae, e as oe, R as se, D as ne, I as le, q as re, r as ue } from "./index-
|
|
3
|
-
import { u as M } from "./useNestedProp-
|
|
4
|
-
import { u as ie, U as de } from "./usePrinter-
|
|
5
|
-
import { _ as ce } from "./Shape-
|
|
2
|
+
import { u as ee, c as E, t as te, o as ae, e as oe, R as se, D as ne, I as le, q as re, r as ue } from "./index-8Lp8V0TB.js";
|
|
3
|
+
import { u as M } from "./useNestedProp-DE-a5lMx.js";
|
|
4
|
+
import { u as ie, U as de } from "./usePrinter-cCBJ71Cc.js";
|
|
5
|
+
import { _ as ce } from "./Shape-B5VTXCQH.js";
|
|
6
6
|
import { _ as ve } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
7
|
const pe = ["id"], me = { role: "cell" }, fe = { role: "row" }, he = ["data-cell"], ge = {
|
|
8
8
|
key: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-De6Dj52h.cjs"),C=require("./useNestedProp-Vjg1xsU_.cjs"),P=require("./usePrinter-SLYneJmG.cjs"),z=require("./Shape-BNlNwrBB.cjs"),R=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),O=["id"],T={role:"cell"},M={role:"row"},G=["data-cell"],q={key:0,style:{display:"flex","flex-direction":"row",gap:"2px","align-items":"center"}},U=["height","width"],L={key:0,role:"cell","data-cell":"sum"},A={key:1,role:"cell","data-cell":"average"},D={key:2,role:"cell","data-cell":"median"},H={__name:"vue-ui-table-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(_,{expose:B}){const d=_;e.useCssVars(t=>({bb8dc4a0:V.value,"44bd448b":S.value}));const{vue_ui_table_heatmap:I}=r.useConfig(),p=e.ref(r.createUid()),s=e.ref(!1),c=e.ref(null),m=e.ref(!1),v=e.ref(0),o=e.computed(()=>{const t=C.useNestedProp({userConfig:d.config,defaultConfig:I});return t.theme?{...C.useNestedProp({userConfig:r.themes.vue_ui_table_heatmap[t.theme]||d.config,defaultConfig:t})}:t}),{isPrinting:$,isImaging:N,generatePdf:f,generateImage:g}=P.usePrinter({elementId:`table_heatmap_${p.value}`,fileName:"vue-ui-table-heatmap"}),x=e.computed(()=>o.value.table.responsiveBreakpoint),E=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(()=>{r.objectIsEmpty(d.dataset)&&r.error({componentName:"VueUiTableHeatmap",type:"dataset"});const t=new ResizeObserver(l=>{l.forEach(a=>{s.value=a.contentRect.width<x.value})});c.value&&t.observe(c.value)});const h=e.computed(()=>d.dataset.map(t=>{const l=t.values.map(n=>isNaN(n)?0:n),a=l.reduce((n,i)=>n+i,0);return{...t,values:l,serieExtremes:{max:Math.max(...l),min:Math.min(...l)},sum:a,average:a/l.length,median:r.calcMedian(l),displayValues:[t.name,...t.values],id:r.createUid()}})),b=e.computed(()=>{const t=h.value.flatMap(l=>l.values);return{min:Math.min(...t),max:Math.max(...t)}});function w(t,l){const a=o.value.style.heatmapColors.useIndividualScale;return r.interpolateColorHex(o.value.style.heatmapColors.min,o.value.style.heatmapColors.max,a?l.min:b.value.min,a?l.max:b.value.max,t)}const y=e.computed(()=>h.value.map(t=>({...t,colors:t.displayValues.map(l=>isNaN(l)?o.value.style.backgroundColor:w(l,t.serieExtremes))}))),S=e.computed(()=>o.value.style.backgroundColor),V=e.computed(()=>`${o.value.table.borderWidth}px`);function k(){e.nextTick(()=>{const t=y.value.map(n=>[[n.name],n.displayValues,[n.sum],[n.average],[n.median]]),l=[[[""],o.value.table.head.values,["sum"],["average"],["median"]]].concat(t),a=r.createCsvContent(l);r.downloadCsv({csvContent:a,title:"vue-ui-table-heatmap"})})}function F(t){m.value=t,v.value+=1}return B({generatePdf:f,generateCsv:k,generateImage:g}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:c,style:e.normalizeStyle(`width:100%; overflow-x:auto; container-type: inline-size;padding-top:${o.value.userOptions.show?"36px":""}; ${m.value?"vue-data-ui-wrapper-fullscreen":""}; position:relative;`),class:e.normalizeClass({"vue-ui-responsive":s.value}),id:`table_heatmap_${p.value}`},[o.value.userOptions.show&&E.value?(e.openBlock(),e.createBlock(P.UserOptions,{ref:"details",key:`user_option_${v.value}`,backgroundColor:o.value.style.backgroundColor,color:o.value.style.color,isPrinting:e.unref($),isImaging:e.unref(N),uid:p.value,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasFullscreen:o.value.userOptions.buttons.fullscreen,isFullscreen:m.value,titles:{...o.value.userOptions.buttonTitles},chartElement:c.value,onToggleFullscreen:F,onGeneratePdf:e.unref(f),onGenerateCsv:k,onGenerateImage:e.unref(g)},e.createSlots({_:2},[t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:n})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:n})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),e.createElementVNode("table",{class:e.normalizeClass({"vue-ui-table-heatmap":!0}),style:e.normalizeStyle(`width:100%;font-family:${o.value.style.fontFamily};background:${o.value.style.backgroundColor};`)},[e.createElementVNode("caption",null,[e.renderSlot(t.$slots,"caption",{},void 0,!0)]),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${o.value.table.head.backgroundColor};color:${o.value.table.head.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value.table.head.values,(a,n)=>(e.openBlock(),e.createElementBlock("th",T,[e.renderSlot(t.$slots,"head",e.normalizeProps(e.guardReactiveProps({value:a,rowIndex:n,type:typeof a,isResponsive:s.value})),void 0,!0)]))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(a,n)=>(e.openBlock(),e.createElementBlock("tr",M,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.displayValues,(i,u)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":o.value.table.head.values[u]},[a.color&&u===0?(e.openBlock(),e.createElementBlock("div",q,[a.color?(e.openBlock(),e.createElementBlock("svg",{key:0,height:o.value.style.shapeSize,width:o.value.style.shapeSize,viewBox:"0 0 20 20",style:{background:"none",overflow:"visible"}},[e.createVNode(z._sfc_main,{plot:{x:10,y:10},color:a.color,radius:9,shape:a.shape||"circle"},null,8,["color","shape"])],8,U)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"rowTitle",e.normalizeProps(e.guardReactiveProps({value:i,rowIndex:n,colIndex:u,type:typeof i,isResponsive:s.value})),void 0,!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[u===0?e.renderSlot(t.$slots,"rowTitle",e.normalizeProps(e.mergeProps({key:0},{value:i,rowIndex:n,colIndex:u,type:typeof i,isResponsive:s.value})),void 0,!0):e.createCommentVNode("",!0),u>0?e.renderSlot(t.$slots,"cell",e.normalizeProps(e.mergeProps({key:1},{value:i,rowIndex:n,colIndex:u,type:typeof i,isResponsive:s.value,color:a.colors[u],textColor:e.unref(r.adaptColorToBackground)(a.colors[u])})),void 0,!0):e.createCommentVNode("",!0)],64))],8,G))),256)),o.value.table.showSum?(e.openBlock(),e.createElementBlock("td",L,[e.renderSlot(t.$slots,"sum",e.normalizeProps(e.guardReactiveProps({value:a.sum,rowIndex:n,isResponsive:s.value})),void 0,!0)])):e.createCommentVNode("",!0),o.value.table.showAverage?(e.openBlock(),e.createElementBlock("td",A,[e.renderSlot(t.$slots,"average",e.normalizeProps(e.guardReactiveProps({value:a.average,rowIndex:n,isResponsive:s.value})),void 0,!0)])):e.createCommentVNode("",!0),o.value.table.showMedian?(e.openBlock(),e.createElementBlock("td",D,[e.renderSlot(t.$slots,"median",e.normalizeProps(e.guardReactiveProps({value:a.median,rowIndex:n,isResponsive:s.value})),void 0,!0)])):e.createCommentVNode("",!0)]))),256))])],4)],14,O))}},X=R._export_sfc(H,[["__scopeId","data-v-3d431bc6"]]);exports.default=X;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useCssVars as re, ref as d, computed as b, onMounted as ie, openBlock as u, createElementBlock as v, normalizeClass as W, createElementVNode as c, normalizeStyle as r, toDisplayString as p, createCommentVNode as g, Fragment as D, renderList as T, createBlock as M, unref as i, createSlots as de, withCtx as S, renderSlot as A, normalizeProps as ve, guardReactiveProps as ce, nextTick as fe } from "vue";
|
|
2
|
-
import { u as pe, c as me, t as be, a as ge, p as w, b as he, o as ye, e as J, g as _e, d as ke, R as xe, i as $, f as P, q as Ce, r as Ie } from "./index-
|
|
3
|
-
import { u as K } from "./useNestedProp-
|
|
4
|
-
import Se from "./vue-ui-sparkline-
|
|
5
|
-
import Ae from "./BaseIcon-
|
|
6
|
-
import { u as we, U as $e } from "./usePrinter-
|
|
2
|
+
import { u as pe, c as me, t as be, a as ge, p as w, b as he, o as ye, e as J, g as _e, d as ke, R as xe, i as $, f as P, q as Ce, r as Ie } from "./index-8Lp8V0TB.js";
|
|
3
|
+
import { u as K } from "./useNestedProp-DE-a5lMx.js";
|
|
4
|
+
import Se from "./vue-ui-sparkline-Bk4kWGco.js";
|
|
5
|
+
import Ae from "./BaseIcon-BoVYVkUT.js";
|
|
6
|
+
import { u as we, U as $e } from "./usePrinter-cCBJ71Cc.js";
|
|
7
7
|
import { _ as Pe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
const ze = ["id"], Fe = { style: { "z-index": "1", "padding-right": "24px" } }, Oe = ["onClick"], Ne = { style: { display: "flex", "flex-direction": "row", gap: "3px", "align-items": "center" } }, We = ["data-cell"], De = {
|
|
9
9
|
dir: "auto",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-Br-wm_4r.cjs"),V=require("./useNestedProp-BH5s4SOa.cjs"),H=require("./vue-ui-sparkline-BEprcYEe.cjs"),X=require("./BaseIcon-CAlmCZtL.cjs"),P=require("./usePrinter-DUD-LDLx.cjs"),J=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),K=["id"],Q={style:{"z-index":"1","padding-right":"24px"}},Y=["onClick"],Z={style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center"}},j=["data-cell"],ee={dir:"auto",style:{display:"flex","flex-direction":"row","align-items":"center",gap:"6px"}},te=["data-cell","onPointerenter"],le=["data-cell"],ae=["data-cell"],oe=["data-cell"],ne=["data-cell"],re={__name:"vue-ui-table-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup($,{expose:D}){const v=$;e.useCssVars(l=>({"328044aa":l.tdo}));const{vue_ui_table_sparkline:F}=u.useConfig(),y=e.ref(u.createUid()),x=e.ref(0),S=e.ref(0),t=e.computed(()=>{const l=V.useNestedProp({userConfig:v.config,defaultConfig:F});return l.theme?{...V.useNestedProp({userConfig:u.themes.vue_ui_table_sparkline[l.theme]||v.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}),{isPrinting:C,isImaging:z,generatePdf:I,generateImage:N}=P.usePrinter({elementId:`table_${y.value}`,fileName:t.value.title.text||"vue-ui-table-sparkline"}),O=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),f=e.ref(null),w=e.ref(!1),W=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{u.objectIsEmpty(v.dataset)&&u.error({componentName:"VueUiTableSparkline",type:"dataset"});const l=new ResizeObserver(s=>{s.forEach(a=>{w.value=a.contentRect.width<W.value})});f.value&&l.observe(f.value)});const B=e.computed(()=>(v.dataset.forEach((l,s)=>{u.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{u.error({componentName:"VueUiTableSparkline",type:"datasetSerieAttribute",property:a,index:s})})}),v.dataset.map((l,s)=>{const a=(l.values||[]).map(r=>isNaN(r)?0:r??0),n=a.reduce((r,o)=>r+o,0);return{...l,values:l.values||[],color:u.convertColorToHex(l.color)||O.value[s]||u.palette[s]||u.palette[s%u.palette.length],sum:n,average:n/a.length,median:u.calcMedian(a),sparklineDataset:a.map((r,o)=>({period:t.value.colNames[o]||`col ${o}`,value:r||0}))}})));function L(l){const a=(l[0].values||[]).map((r,o)=>l.map(i=>i.values[o]||[])).map(r=>r.map((o,i)=>[o,i]).sort((o,i)=>i[0]-o[0]).map(o=>o[1]));return l.map((r,o)=>({...r,values:r.values||[],orders:a[o]}))}const m=e.computed(()=>L(B.value)),b=e.ref(m.value),T=e.computed(()=>Math.max(...b.value.map(l=>(l.values||[]).length))),g=e.ref(void 0),k=e.ref(!1),h=e.ref(void 0),_=e.ref(-1);function M(){k.value=!1,h.value=void 0,_.value=-1,b.value=m.value}function G(l){k.value=!0,h.value=l;const s=m.value.map(o=>o.values[l]||[]),a=g.value===l?1:-1;_.value=a,l===g.value?g.value=void 0:g.value=l;const r=s.map((o,i)=>[i,o]).sort((o,i)=>a*(i[1]-o[1])).map(o=>o[0]).map(o=>m.value[o]);b.value=r,S.value+=1}const q=e.computed(()=>Math.max(...v.dataset.map(l=>(l.values||[]).length))),p=e.computed(()=>{let l=t.value.colNames;if(!l.length)for(let a=0;a<q.value;a+=1)l.push(`col ${a+1}`);t.value.showTotal&&(l=[...l,t.value.translations.total]);let s;return t.value.showAverage&&t.value.showMedian?s=[...l,t.value.translations.average,t.value.translations.median]:t.value.showAverage&&!t.value.showMedian?s=[...l,t.value.translations.average]:!t.value.showAverage&&t.value.showMedian?s=[...l,t.value.translations.median]:s=l,t.value.showSparklines?[...s,t.value.translations.chart]:s}),d=e.ref(void 0),c=e.ref(void 0);function R({dataIndex:l,serieIndex:s}){d.value=l,c.value=s}const A=e.ref(!1);function U(l){A.value=l,x.value+=1}function E(){e.nextTick(()=>{const l=[t.value.translations.serie].concat(p.value),s=B.value.map((r,o)=>[[r.name],r.values,[r.sum],[r.average],[r.median]]),a=[l].concat(s),n=u.createCsvContent(a);u.downloadCsv({csvContent:n,title:t.value.title.text||"vue-ui-table-sparkline"})})}return D({generatePdf:I,generateImage:N,generateCsv:E,restoreOrder:M}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:f,class:e.normalizeClass({"vue-ui-responsive":w.value}),style:{overflow:"hidden"},id:`table_${y.value}`},[e.createElementVNode("div",{style:{overflow:"auto"},onPointerleave:s[0]||(s[0]=a=>{c.value=void 0,d.value=void 0})},[e.createElementVNode("table",{class:"vue-ui-data-table",style:e.normalizeStyle({fontFamily:t.value.fontFamily,position:"relative"})},[t.value.title.text?(e.openBlock(),e.createElementBlock("caption",{key:0,style:e.normalizeStyle({backgroundColor:t.value.title.backgroundColor})},[e.createElementVNode("div",{style:e.normalizeStyle({fontSize:`${t.value.title.fontSize}px`,fontWeight:t.value.title.bold?"bold":"normal",color:t.value.title.color,textAlign:t.value.title.textAlign})},e.toDisplayString(t.value.title.text),5),t.value.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({fontSize:`${t.value.title.subtitle.fontSize}px`,fontWeight:t.value.title.subtitle.bold?"bold":"normal",color:t.value.title.subtitle.color,textAlign:t.value.title.textAlign})},e.toDisplayString(t.value.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("thead",Q,[e.createElementVNode("tr",{role:"row",class:"vue-ui-data-table__thead-row",style:e.normalizeStyle({backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color})},[e.createElementVNode("th",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.thead.backgroundColor,outline:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal"}),class:"sticky-col-first"},e.toDisplayString(t.value.translations.serie),5),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(a,n)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",style:e.normalizeStyle({background:t.value.thead.backgroundColor,outline:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal",minWidth:n===p.value.length-1?"150px":"",cursor:m.value[0].values[n]!==void 0?"pointer":"default"}),onClick:()=>G(n),class:e.normalizeClass({"sticky-col":n===p.value.length-1&&t.value.showSparklines})},[e.createElementVNode("div",Z,[e.createElementVNode("span",null,e.toDisplayString(a),1),k.value&&n===h.value&&m.value[0].values[n]!==void 0?(e.openBlock(),e.createBlock(X.default,{key:0,size:18,name:_.value===1?"sort":"sortReverse",stroke:t.value.thead.color},null,8,["name","stroke"])):e.createCommentVNode("",!0)]),t.value.userOptions.show&&n===p.value.length-1?(e.openBlock(),e.createBlock(P.UserOptions,{ref_for:!0,ref:"details",key:`user_option_${x.value}`,backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color,isPrinting:e.unref(C),isImaging:e.unref(z),uid:y.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:A.value,titles:{...t.value.userOptions.buttonTitles},chartElement:f.value,onToggleFullscreen:U,onGeneratePdf:e.unref(I),onGenerateImage:e.unref(N),onGenerateCsv:E},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:r,isFullscreen:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:o})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0)],14,Y))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(a,n)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,color:t.value.tbody.color}),class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0})},[e.createElementVNode("td",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.serie,class:"vue-ui-data-table__tbody__td sticky-col-first"},[e.createElementVNode("div",ee,[e.createElementVNode("span",{style:e.normalizeStyle({color:a.color})},"⬤",4),e.createElementVNode("span",null,e.toDisplayString(a.name??"-"),1)])],12,j),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(r,o)=>(e.openBlock(),e.createElementBlock("td",{dir:"auto",role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign,backgroundColor:d.value!==void 0&&c.value!==void 0&&o===d.value&&c.value===n?`${a.color}33`:"",borderRadius:d.value!==void 0&&c.value!==void 0&&o===d.value&&c.value===n?"3px":""}),"data-cell":p.value[o],class:"vue-ui-data-table__tbody__td",onPointerenter:i=>{c.value=n,d.value=o}},e.toDisplayString([null,void 0].includes(a.values[o])?"-":e.unref(u.applyDataLabel)(t.value.formatter,Number(a.values[o]),e.unref(u.dataLabel)({p:t.value.prefix,v:Number(a.values[o]),s:t.value.suffix,r:t.value.roundingValues}),{datapoint:a,seriesIndex:n,datapointIndex:o})),45,te))),256)),t.value.showTotal?(e.openBlock(),e.createElementBlock("td",{key:0,dir:"auto",role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.total,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,a.sum,e.unref(u.dataLabel)({p:t.value.prefix,v:a.sum,s:t.value.suffix,r:t.value.roundingTotal}),{datapoint:a.sum,seriesIndex:n})),13,le)):e.createCommentVNode("",!0),t.value.showAverage?(e.openBlock(),e.createElementBlock("td",{key:1,dir:"auto",role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.average,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,a.average,e.unref(u.dataLabel)({p:t.value.prefix,v:a.average,s:t.value.suffix,r:t.value.roundingAverage}),{datapoint:a.average,seriesIndex:n})),13,ae)):e.createCommentVNode("",!0),t.value.showMedian?(e.openBlock(),e.createElementBlock("td",{key:2,dir:"auto",role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.median,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,a.median,e.unref(u.dataLabel)({p:t.value.prefix,v:a.median,s:t.value.suffix,r:t.value.roundingMedian}),{datapoint:a.median,seriesIndex:n})),13,oe)):e.createCommentVNode("",!0),t.value.showSparklines?(e.openBlock(),e.createElementBlock("td",{key:3,role:"cell","data-cell":t.value.translations.chart,style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),class:"vue-ui-data-table__tbody__td sticky-col"},[(e.openBlock(),e.createBlock(H.default,{key:`sparkline_${n}_${S.value}`,onHoverIndex:({index:r})=>R({dataIndex:r,serieIndex:n}),dataset:a.sparklineDataset,showInfo:!1,selectedIndex:d.value,config:{type:t.value.sparkline.type,style:{backgroundColor:t.value.tbody.backgroundColor,animation:{show:t.value.sparkline.animation.show&&!e.unref(C)&&!e.unref(z),animationFrames:t.value.sparkline.animation.animationFrames},line:{color:a.color,smooth:t.value.sparkline.smooth,strokeWidth:t.value.sparkline.strokeWidth},bar:{color:a.color},area:{color:a.color,opacity:t.value.sparkline.showArea?16:0,useGradient:t.value.sparkline.useGradient},verticalIndicator:{color:a.color},plot:{radius:9,stroke:t.value.tbody.backgroundColor,strokeWidth:3}}}},null,8,["onHoverIndex","dataset","selectedIndex","config"]))],12,ne)):e.createCommentVNode("",!0)],6))),256))])],4)],32)],10,K))}},ue=J._export_sfc(re,[["__scopeId","data-v-d3c784ed"]]);exports.default=ue;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-De6Dj52h.cjs"),V=require("./useNestedProp-Vjg1xsU_.cjs"),H=require("./vue-ui-sparkline-CdPAtBR8.cjs"),X=require("./BaseIcon-DuVD-1qH.cjs"),P=require("./usePrinter-SLYneJmG.cjs"),J=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),K=["id"],Q={style:{"z-index":"1","padding-right":"24px"}},Y=["onClick"],Z={style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center"}},j=["data-cell"],ee={dir:"auto",style:{display:"flex","flex-direction":"row","align-items":"center",gap:"6px"}},te=["data-cell","onPointerenter"],le=["data-cell"],ae=["data-cell"],oe=["data-cell"],ne=["data-cell"],re={__name:"vue-ui-table-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup($,{expose:D}){const v=$;e.useCssVars(l=>({"328044aa":l.tdo}));const{vue_ui_table_sparkline:F}=u.useConfig(),y=e.ref(u.createUid()),x=e.ref(0),S=e.ref(0),t=e.computed(()=>{const l=V.useNestedProp({userConfig:v.config,defaultConfig:F});return l.theme?{...V.useNestedProp({userConfig:u.themes.vue_ui_table_sparkline[l.theme]||v.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}),{isPrinting:C,isImaging:z,generatePdf:I,generateImage:N}=P.usePrinter({elementId:`table_${y.value}`,fileName:t.value.title.text||"vue-ui-table-sparkline"}),O=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),f=e.ref(null),w=e.ref(!1),W=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{u.objectIsEmpty(v.dataset)&&u.error({componentName:"VueUiTableSparkline",type:"dataset"});const l=new ResizeObserver(s=>{s.forEach(a=>{w.value=a.contentRect.width<W.value})});f.value&&l.observe(f.value)});const B=e.computed(()=>(v.dataset.forEach((l,s)=>{u.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{u.error({componentName:"VueUiTableSparkline",type:"datasetSerieAttribute",property:a,index:s})})}),v.dataset.map((l,s)=>{const a=(l.values||[]).map(r=>isNaN(r)?0:r??0),n=a.reduce((r,o)=>r+o,0);return{...l,values:l.values||[],color:u.convertColorToHex(l.color)||O.value[s]||u.palette[s]||u.palette[s%u.palette.length],sum:n,average:n/a.length,median:u.calcMedian(a),sparklineDataset:a.map((r,o)=>({period:t.value.colNames[o]||`col ${o}`,value:r||0}))}})));function L(l){const a=(l[0].values||[]).map((r,o)=>l.map(i=>i.values[o]||[])).map(r=>r.map((o,i)=>[o,i]).sort((o,i)=>i[0]-o[0]).map(o=>o[1]));return l.map((r,o)=>({...r,values:r.values||[],orders:a[o]}))}const m=e.computed(()=>L(B.value)),b=e.ref(m.value),T=e.computed(()=>Math.max(...b.value.map(l=>(l.values||[]).length))),g=e.ref(void 0),k=e.ref(!1),h=e.ref(void 0),_=e.ref(-1);function M(){k.value=!1,h.value=void 0,_.value=-1,b.value=m.value}function G(l){k.value=!0,h.value=l;const s=m.value.map(o=>o.values[l]||[]),a=g.value===l?1:-1;_.value=a,l===g.value?g.value=void 0:g.value=l;const r=s.map((o,i)=>[i,o]).sort((o,i)=>a*(i[1]-o[1])).map(o=>o[0]).map(o=>m.value[o]);b.value=r,S.value+=1}const q=e.computed(()=>Math.max(...v.dataset.map(l=>(l.values||[]).length))),p=e.computed(()=>{let l=t.value.colNames;if(!l.length)for(let a=0;a<q.value;a+=1)l.push(`col ${a+1}`);t.value.showTotal&&(l=[...l,t.value.translations.total]);let s;return t.value.showAverage&&t.value.showMedian?s=[...l,t.value.translations.average,t.value.translations.median]:t.value.showAverage&&!t.value.showMedian?s=[...l,t.value.translations.average]:!t.value.showAverage&&t.value.showMedian?s=[...l,t.value.translations.median]:s=l,t.value.showSparklines?[...s,t.value.translations.chart]:s}),d=e.ref(void 0),c=e.ref(void 0);function R({dataIndex:l,serieIndex:s}){d.value=l,c.value=s}const A=e.ref(!1);function U(l){A.value=l,x.value+=1}function E(){e.nextTick(()=>{const l=[t.value.translations.serie].concat(p.value),s=B.value.map((r,o)=>[[r.name],r.values,[r.sum],[r.average],[r.median]]),a=[l].concat(s),n=u.createCsvContent(a);u.downloadCsv({csvContent:n,title:t.value.title.text||"vue-ui-table-sparkline"})})}return D({generatePdf:I,generateImage:N,generateCsv:E,restoreOrder:M}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:f,class:e.normalizeClass({"vue-ui-responsive":w.value}),style:{overflow:"hidden"},id:`table_${y.value}`},[e.createElementVNode("div",{style:{overflow:"auto"},onPointerleave:s[0]||(s[0]=a=>{c.value=void 0,d.value=void 0})},[e.createElementVNode("table",{class:"vue-ui-data-table",style:e.normalizeStyle({fontFamily:t.value.fontFamily,position:"relative"})},[t.value.title.text?(e.openBlock(),e.createElementBlock("caption",{key:0,style:e.normalizeStyle({backgroundColor:t.value.title.backgroundColor})},[e.createElementVNode("div",{style:e.normalizeStyle({fontSize:`${t.value.title.fontSize}px`,fontWeight:t.value.title.bold?"bold":"normal",color:t.value.title.color,textAlign:t.value.title.textAlign})},e.toDisplayString(t.value.title.text),5),t.value.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({fontSize:`${t.value.title.subtitle.fontSize}px`,fontWeight:t.value.title.subtitle.bold?"bold":"normal",color:t.value.title.subtitle.color,textAlign:t.value.title.textAlign})},e.toDisplayString(t.value.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("thead",Q,[e.createElementVNode("tr",{role:"row",class:"vue-ui-data-table__thead-row",style:e.normalizeStyle({backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color})},[e.createElementVNode("th",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.thead.backgroundColor,outline:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal"}),class:"sticky-col-first"},e.toDisplayString(t.value.translations.serie),5),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(a,n)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",style:e.normalizeStyle({background:t.value.thead.backgroundColor,outline:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal",minWidth:n===p.value.length-1?"150px":"",cursor:m.value[0].values[n]!==void 0?"pointer":"default"}),onClick:()=>G(n),class:e.normalizeClass({"sticky-col":n===p.value.length-1&&t.value.showSparklines})},[e.createElementVNode("div",Z,[e.createElementVNode("span",null,e.toDisplayString(a),1),k.value&&n===h.value&&m.value[0].values[n]!==void 0?(e.openBlock(),e.createBlock(X.default,{key:0,size:18,name:_.value===1?"sort":"sortReverse",stroke:t.value.thead.color},null,8,["name","stroke"])):e.createCommentVNode("",!0)]),t.value.userOptions.show&&n===p.value.length-1?(e.openBlock(),e.createBlock(P.UserOptions,{ref_for:!0,ref:"details",key:`user_option_${x.value}`,backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color,isPrinting:e.unref(C),isImaging:e.unref(z),uid:y.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:A.value,titles:{...t.value.userOptions.buttonTitles},chartElement:f.value,onToggleFullscreen:U,onGeneratePdf:e.unref(I),onGenerateImage:e.unref(N),onGenerateCsv:E},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:r,isFullscreen:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:o})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0)],14,Y))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(a,n)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,color:t.value.tbody.color}),class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0})},[e.createElementVNode("td",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.serie,class:"vue-ui-data-table__tbody__td sticky-col-first"},[e.createElementVNode("div",ee,[e.createElementVNode("span",{style:e.normalizeStyle({color:a.color})},"⬤",4),e.createElementVNode("span",null,e.toDisplayString(a.name??"-"),1)])],12,j),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(r,o)=>(e.openBlock(),e.createElementBlock("td",{dir:"auto",role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign,backgroundColor:d.value!==void 0&&c.value!==void 0&&o===d.value&&c.value===n?`${a.color}33`:"",borderRadius:d.value!==void 0&&c.value!==void 0&&o===d.value&&c.value===n?"3px":""}),"data-cell":p.value[o],class:"vue-ui-data-table__tbody__td",onPointerenter:i=>{c.value=n,d.value=o}},e.toDisplayString([null,void 0].includes(a.values[o])?"-":e.unref(u.applyDataLabel)(t.value.formatter,Number(a.values[o]),e.unref(u.dataLabel)({p:t.value.prefix,v:Number(a.values[o]),s:t.value.suffix,r:t.value.roundingValues}),{datapoint:a,seriesIndex:n,datapointIndex:o})),45,te))),256)),t.value.showTotal?(e.openBlock(),e.createElementBlock("td",{key:0,dir:"auto",role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.total,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,a.sum,e.unref(u.dataLabel)({p:t.value.prefix,v:a.sum,s:t.value.suffix,r:t.value.roundingTotal}),{datapoint:a.sum,seriesIndex:n})),13,le)):e.createCommentVNode("",!0),t.value.showAverage?(e.openBlock(),e.createElementBlock("td",{key:1,dir:"auto",role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.average,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,a.average,e.unref(u.dataLabel)({p:t.value.prefix,v:a.average,s:t.value.suffix,r:t.value.roundingAverage}),{datapoint:a.average,seriesIndex:n})),13,ae)):e.createCommentVNode("",!0),t.value.showMedian?(e.openBlock(),e.createElementBlock("td",{key:2,dir:"auto",role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.median,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,a.median,e.unref(u.dataLabel)({p:t.value.prefix,v:a.median,s:t.value.suffix,r:t.value.roundingMedian}),{datapoint:a.median,seriesIndex:n})),13,oe)):e.createCommentVNode("",!0),t.value.showSparklines?(e.openBlock(),e.createElementBlock("td",{key:3,role:"cell","data-cell":t.value.translations.chart,style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),class:"vue-ui-data-table__tbody__td sticky-col"},[(e.openBlock(),e.createBlock(H.default,{key:`sparkline_${n}_${S.value}`,onHoverIndex:({index:r})=>R({dataIndex:r,serieIndex:n}),dataset:a.sparklineDataset,showInfo:!1,selectedIndex:d.value,config:{type:t.value.sparkline.type,style:{backgroundColor:t.value.tbody.backgroundColor,animation:{show:t.value.sparkline.animation.show&&!e.unref(C)&&!e.unref(z),animationFrames:t.value.sparkline.animation.animationFrames},line:{color:a.color,smooth:t.value.sparkline.smooth,strokeWidth:t.value.sparkline.strokeWidth},bar:{color:a.color},area:{color:a.color,opacity:t.value.sparkline.showArea?16:0,useGradient:t.value.sparkline.useGradient},verticalIndicator:{color:a.color},plot:{radius:9,stroke:t.value.tbody.backgroundColor,strokeWidth:3}}}},null,8,["onHoverIndex","dataset","selectedIndex","config"]))],12,ne)):e.createCommentVNode("",!0)],6))),256))])],4)],32)],10,K))}},ue=J._export_sfc(re,[["__scopeId","data-v-d3c784ed"]]);exports.default=ue;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useCssVars as ne, computed as c, onMounted as ie, ref as p, openBlock as o, createElementBlock as n, normalizeClass as C, normalizeStyle as z, createVNode as he, createCommentVNode as h, createBlock as B, unref as v, createSlots as ce, withCtx as q, renderSlot as k, normalizeProps as j, guardReactiveProps as A, createElementVNode as d, Fragment as $, renderList as D, toDisplayString as de } from "vue";
|
|
2
|
-
import { u as ve, o as ye, e as H, g as fe, c as me, t as ge, a as pe, p as x, b as ke, d as F, X as xe, v as be, i as _e, f as we } from "./index-
|
|
3
|
-
import { _ as Ce } from "./Title-
|
|
4
|
-
import { u as $e, U as Fe } from "./usePrinter-
|
|
5
|
-
import Pe from "./vue-ui-skeleton-
|
|
6
|
-
import { u as X } from "./useNestedProp-
|
|
2
|
+
import { u as ve, o as ye, e as H, g as fe, c as me, t as ge, a as pe, p as x, b as ke, d as F, X as xe, v as be, i as _e, f as we } from "./index-8Lp8V0TB.js";
|
|
3
|
+
import { _ as Ce } from "./Title-0px6u9U5.js";
|
|
4
|
+
import { u as $e, U as Fe } from "./usePrinter-cCBJ71Cc.js";
|
|
5
|
+
import Pe from "./vue-ui-skeleton-apODtH32.js";
|
|
6
|
+
import { u as X } from "./useNestedProp-DE-a5lMx.js";
|
|
7
7
|
import { _ as Ie } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
const Ye = ["id"], Me = {
|
|
9
9
|
key: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Br-wm_4r.cjs"),A=require("./Title-DSPpszvp.cjs"),F=require("./usePrinter-DUD-LDLx.cjs"),D=require("./vue-ui-skeleton-BWu2nLeV.cjs"),I=require("./useNestedProp-BH5s4SOa.cjs"),R=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),X=["id"],J={key:0,style:"width:100%"},K=["xmlns","viewBox"],Q={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},Z=["fill"],ee=["id"],te=["stop-color"],oe=["stop-color"],le=["stop-color"],re={"clip-path":"url(#vueUiPill)"},ae=["x","y","height","width"],se=["x","y","height","width","fill"],ne=["x1","x2","y1","y2","stroke-width","stroke"],ue=["x1","x2","y1","y2","stroke-width","stroke"],ie=["x1","x2","y1","y2","stroke-width","stroke"],ce=["x1","x2","y1","y2","stroke-width","stroke"],de=["x1","x2","y1","y2","stroke-width","stroke"],he=["x1","x2","y1","y2","stroke-width","stroke"],ve=["x1","x2","y1","y2","stroke-width","stroke"],me=["x1","x2","y1","y2","stroke-width","stroke"],ye=["x","y","height","width"],pe=["y","x","fill","font-size","font-weight"],fe={key:3,class:"vue-data-ui-watermark"},ge={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:q}){const a=m;e.useCssVars(l=>({"3d1a25cf":z.value,"52cc1c9f":O.value,"90b36568":M.value}));const{vue_ui_thermometer:S}=s.useConfig(),f=e.computed(()=>!!a.dataset&&Object.keys(a.dataset).length);e.onMounted(()=>{s.objectIsEmpty(a.dataset)?s.error({componentName:"VueUiThermometer",type:"dataset"}):s.getMissingDatasetAttributes({datasetObject:a.dataset,requiredAttributes:["value","from","to"]}).forEach(l=>{s.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:l})})});const d=e.ref(s.createUid()),w=e.ref(null),C=e.ref(0),t=e.computed(()=>{const l=I.useNestedProp({userConfig:a.config,defaultConfig:S});return l.theme?{...I.useNestedProp({userConfig:s.themes.vue_ui_thermometer[l.theme]||a.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}),{isPrinting:B,isImaging:N,generatePdf:E,generateImage:V}=F.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer"}),y=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),T=e.computed(()=>t.value.style.chart.thermometer.width),c=e.computed(()=>a.dataset.steps||10),i=e.ref({top:t.value.style.chart.padding.top,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right,bottom:t.value.style.chart.padding.bottom});function p(l,n,o){const u=[],b=P(l),_=P(n);for(let v=0;v<o;v++){const G=g(b.red,_.red,v,o),W=g(b.green,_.green,v,o),H=g(b.blue,_.blue,v,o),j=`#${k(G)}${k(W)}${k(H)}`;u.push(j)}return u}function P(l){const n=l.slice(1);return{red:parseInt(n.slice(0,2),16),green:parseInt(n.slice(2,4),16),blue:parseInt(n.slice(4,6),16)}}function g(l,n,o,u){return Math.round(l+(n-l)*o/u)}function k(l){return l.toString(16).padStart(2,"0")}const r=e.computed(()=>{const l=T.value+i.value.left+i.value.right,n=t.value.style.chart.height;return{width:l,left:i.value.left,right:l-i.value.right,top:i.value.top,bottom:n-i.value.bottom,height:n}}),Y=e.computed(()=>r.value),x=e.computed(()=>{const l=a.dataset.from<0?Math.abs(a.dataset.from):a.dataset.from,n=a.dataset.to<0?Math.abs(a.dataset.to):a.dataset.to;let o=0;return a.dataset.to>0?o=l+n:l>n?o=l-n:o=n-l,(1-(Math.abs(a.dataset.from)+a.dataset.value)/o)*(r.value.height-i.value.top-i.value.bottom)}),M=e.computed(()=>`${x.value}px`),O=e.computed(()=>`${r.value.height-t.value.style.chart.padding.bottom-i.value.top}px`),z=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),L=e.computed(()=>{if(a.dataset.colors){if(!a.dataset.colors.from)return p(y.value[0]||s.palette[0],s.convertColorToHex(a.dataset.colors.to),c.value||10);if(!a.dataset.colors.to)return p(s.convertColorToHex(a.dataset.colors.from),y.value[1]||s.palette[1],c.value||10)}else return p(y.value[1]||s.palette[1],y.value[0]||s.palette[0],c.value||10);return p(s.convertColorToHex(a.dataset.colors.from),s.convertColorToHex(a.dataset.colors.to),c.value||10)}),$=e.computed(()=>{const l=[];let n=0;const o=r.value.height-i.value.top-i.value.bottom;for(let u=0;u<o-1;u+=o/c.value)l.push({x:r.value.left,y:r.value.top+u,qYLess:r.value.top+u+o/c.value/4,halfY:r.value.top+u+o/c.value/2,qYMore:r.value.top+u+o/c.value/4*3,color:L.value[n],height:o/c.value}),n+=1;return l}),h=e.ref(!1);function U(l){h.value=l,C.value+=1}return q({generatePdf:E,generateImage:V}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:w,class:e.normalizeClass(`vue-ui-thermometer ${h.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}`),id:`thermometer__${d.value}`},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",J,[e.createVNode(A._sfc_main,{config:{title:{cy:"thermometer-div-title",...t.value.style.title},subtitle:{cy:"thermometer-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&f.value?(e.openBlock(),e.createBlock(F.UserOptions,{ref:"details",key:`user_options_${C.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(N),isPrinting:e.unref(B),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,titles:{...t.value.userOptions.buttonTitles},chartElement:w.value,onToggleFullscreen:U,onGeneratePdf:e.unref(E),onGenerateImage:e.unref(V)},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),width:"100%",viewBox:`0 0 ${r.value.width} ${r.value.height}`,style:e.normalizeStyle(`background:${t.value.style.chart.backgroundColor}`)},[e.createElementVNode("defs",null,[e.createElementVNode("clipPath",Q,[e.createElementVNode("rect",{x:"0",y:"0",width:"1",height:"1",rx:"0.5",ry:"0.07",fill:t.value.style.chart.backgroundColor},null,8,Z)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(o,u)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`vueUiThermometerGradient_${u}_${d.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,te),e.createElementVNode("stop",{offset:"50%","stop-color":`${o.color}${e.unref(s.opacity)[100-t.value.style.chart.graduations.gradient.intensity]}`},null,8,oe),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,le)],8,ee))),256))]),e.createElementVNode("g",re,[e.createElementVNode("rect",{x:r.value.left,y:r.value.top,height:r.value.height-i.value.top-i.value.bottom,width:r.value.width-i.value.left-i.value.right,fill:"#FFFFFF"},null,8,ae),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(o,u)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${u}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:r.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:t.value.style.chart.graduations.gradient.show?`url(#vueUiThermometerGradient_${u}_${d.value})`:o.color,"shape-rendering":"crispEdges"},null,8,se),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ne)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ue)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:o.x,x2:o.x+2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ie)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:o.x,x2:o.x+2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ce)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:r.value.right,x2:r.value.right-10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,de)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:r.value.right,x2:r.value.right-5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,he)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:r.value.right,x2:r.value.right-2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ve)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:r.value.right,x2:r.value.right-2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,me)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("rect",{class:e.normalizeClass({"vue-ui-thermometer-temperature":t.value.style.chart.animation.use}),x:r.value.left,y:r.value.top,height:x.value,width:r.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,ye)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:x.value+r.value.top+t.value.style.chart.label.fontSize/3,x:r.value.left-10,"text-anchor":"end",fill:t.value.style.chart.label.color,"font-size":t.value.style.chart.label.fontSize,"font-weight":t.value.style.chart.label.bold?"bold":"normal"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.label.formatter,m.dataset.value,e.unref(s.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,pe),e.renderSlot(l.$slots,"svg",{svg:Y.value},void 0,!0)],14,K)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",fe,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(B)||e.unref(N)})),void 0,!0)])):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(D.default,{key:4,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],14,X))}},ke=R._export_sfc(ge,[["__scopeId","data-v-1375e978"]]);exports.default=ke;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-De6Dj52h.cjs"),A=require("./Title-CSRD5z1r.cjs"),F=require("./usePrinter-SLYneJmG.cjs"),D=require("./vue-ui-skeleton-Cl9Kp9yE.cjs"),I=require("./useNestedProp-Vjg1xsU_.cjs"),R=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),X=["id"],J={key:0,style:"width:100%"},K=["xmlns","viewBox"],Q={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},Z=["fill"],ee=["id"],te=["stop-color"],oe=["stop-color"],le=["stop-color"],re={"clip-path":"url(#vueUiPill)"},ae=["x","y","height","width"],se=["x","y","height","width","fill"],ne=["x1","x2","y1","y2","stroke-width","stroke"],ue=["x1","x2","y1","y2","stroke-width","stroke"],ie=["x1","x2","y1","y2","stroke-width","stroke"],ce=["x1","x2","y1","y2","stroke-width","stroke"],de=["x1","x2","y1","y2","stroke-width","stroke"],he=["x1","x2","y1","y2","stroke-width","stroke"],ve=["x1","x2","y1","y2","stroke-width","stroke"],me=["x1","x2","y1","y2","stroke-width","stroke"],ye=["x","y","height","width"],pe=["y","x","fill","font-size","font-weight"],fe={key:3,class:"vue-data-ui-watermark"},ge={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:q}){const a=m;e.useCssVars(l=>({"3d1a25cf":z.value,"52cc1c9f":O.value,"90b36568":M.value}));const{vue_ui_thermometer:S}=s.useConfig(),f=e.computed(()=>!!a.dataset&&Object.keys(a.dataset).length);e.onMounted(()=>{s.objectIsEmpty(a.dataset)?s.error({componentName:"VueUiThermometer",type:"dataset"}):s.getMissingDatasetAttributes({datasetObject:a.dataset,requiredAttributes:["value","from","to"]}).forEach(l=>{s.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:l})})});const d=e.ref(s.createUid()),w=e.ref(null),C=e.ref(0),t=e.computed(()=>{const l=I.useNestedProp({userConfig:a.config,defaultConfig:S});return l.theme?{...I.useNestedProp({userConfig:s.themes.vue_ui_thermometer[l.theme]||a.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}),{isPrinting:B,isImaging:N,generatePdf:E,generateImage:V}=F.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer"}),y=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),T=e.computed(()=>t.value.style.chart.thermometer.width),c=e.computed(()=>a.dataset.steps||10),i=e.ref({top:t.value.style.chart.padding.top,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right,bottom:t.value.style.chart.padding.bottom});function p(l,n,o){const u=[],b=P(l),_=P(n);for(let v=0;v<o;v++){const G=g(b.red,_.red,v,o),W=g(b.green,_.green,v,o),H=g(b.blue,_.blue,v,o),j=`#${k(G)}${k(W)}${k(H)}`;u.push(j)}return u}function P(l){const n=l.slice(1);return{red:parseInt(n.slice(0,2),16),green:parseInt(n.slice(2,4),16),blue:parseInt(n.slice(4,6),16)}}function g(l,n,o,u){return Math.round(l+(n-l)*o/u)}function k(l){return l.toString(16).padStart(2,"0")}const r=e.computed(()=>{const l=T.value+i.value.left+i.value.right,n=t.value.style.chart.height;return{width:l,left:i.value.left,right:l-i.value.right,top:i.value.top,bottom:n-i.value.bottom,height:n}}),Y=e.computed(()=>r.value),x=e.computed(()=>{const l=a.dataset.from<0?Math.abs(a.dataset.from):a.dataset.from,n=a.dataset.to<0?Math.abs(a.dataset.to):a.dataset.to;let o=0;return a.dataset.to>0?o=l+n:l>n?o=l-n:o=n-l,(1-(Math.abs(a.dataset.from)+a.dataset.value)/o)*(r.value.height-i.value.top-i.value.bottom)}),M=e.computed(()=>`${x.value}px`),O=e.computed(()=>`${r.value.height-t.value.style.chart.padding.bottom-i.value.top}px`),z=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),L=e.computed(()=>{if(a.dataset.colors){if(!a.dataset.colors.from)return p(y.value[0]||s.palette[0],s.convertColorToHex(a.dataset.colors.to),c.value||10);if(!a.dataset.colors.to)return p(s.convertColorToHex(a.dataset.colors.from),y.value[1]||s.palette[1],c.value||10)}else return p(y.value[1]||s.palette[1],y.value[0]||s.palette[0],c.value||10);return p(s.convertColorToHex(a.dataset.colors.from),s.convertColorToHex(a.dataset.colors.to),c.value||10)}),$=e.computed(()=>{const l=[];let n=0;const o=r.value.height-i.value.top-i.value.bottom;for(let u=0;u<o-1;u+=o/c.value)l.push({x:r.value.left,y:r.value.top+u,qYLess:r.value.top+u+o/c.value/4,halfY:r.value.top+u+o/c.value/2,qYMore:r.value.top+u+o/c.value/4*3,color:L.value[n],height:o/c.value}),n+=1;return l}),h=e.ref(!1);function U(l){h.value=l,C.value+=1}return q({generatePdf:E,generateImage:V}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:w,class:e.normalizeClass(`vue-ui-thermometer ${h.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}`),id:`thermometer__${d.value}`},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",J,[e.createVNode(A._sfc_main,{config:{title:{cy:"thermometer-div-title",...t.value.style.title},subtitle:{cy:"thermometer-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&f.value?(e.openBlock(),e.createBlock(F.UserOptions,{ref:"details",key:`user_options_${C.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(N),isPrinting:e.unref(B),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,titles:{...t.value.userOptions.buttonTitles},chartElement:w.value,onToggleFullscreen:U,onGeneratePdf:e.unref(E),onGenerateImage:e.unref(V)},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),width:"100%",viewBox:`0 0 ${r.value.width} ${r.value.height}`,style:e.normalizeStyle(`background:${t.value.style.chart.backgroundColor}`)},[e.createElementVNode("defs",null,[e.createElementVNode("clipPath",Q,[e.createElementVNode("rect",{x:"0",y:"0",width:"1",height:"1",rx:"0.5",ry:"0.07",fill:t.value.style.chart.backgroundColor},null,8,Z)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(o,u)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`vueUiThermometerGradient_${u}_${d.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,te),e.createElementVNode("stop",{offset:"50%","stop-color":`${o.color}${e.unref(s.opacity)[100-t.value.style.chart.graduations.gradient.intensity]}`},null,8,oe),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,le)],8,ee))),256))]),e.createElementVNode("g",re,[e.createElementVNode("rect",{x:r.value.left,y:r.value.top,height:r.value.height-i.value.top-i.value.bottom,width:r.value.width-i.value.left-i.value.right,fill:"#FFFFFF"},null,8,ae),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(o,u)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${u}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:r.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:t.value.style.chart.graduations.gradient.show?`url(#vueUiThermometerGradient_${u}_${d.value})`:o.color,"shape-rendering":"crispEdges"},null,8,se),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ne)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ue)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:o.x,x2:o.x+2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ie)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:o.x,x2:o.x+2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ce)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:r.value.right,x2:r.value.right-10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,de)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:r.value.right,x2:r.value.right-5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,he)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:r.value.right,x2:r.value.right-2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ve)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:r.value.right,x2:r.value.right-2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,me)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("rect",{class:e.normalizeClass({"vue-ui-thermometer-temperature":t.value.style.chart.animation.use}),x:r.value.left,y:r.value.top,height:x.value,width:r.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,ye)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:x.value+r.value.top+t.value.style.chart.label.fontSize/3,x:r.value.left-10,"text-anchor":"end",fill:t.value.style.chart.label.color,"font-size":t.value.style.chart.label.fontSize,"font-weight":t.value.style.chart.label.bold?"bold":"normal"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.label.formatter,m.dataset.value,e.unref(s.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,pe),e.renderSlot(l.$slots,"svg",{svg:Y.value},void 0,!0)],14,K)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",fe,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(B)||e.unref(N)})),void 0,!0)])):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(D.default,{key:4,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],14,X))}},ke=R._export_sfc(ge,[["__scopeId","data-v-1375e978"]]);exports.default=ke;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ref as d, onMounted as q, onBeforeUnmount as J, computed as D, openBlock as r, createElementBlock as u, normalizeStyle as f, createVNode as _, createCommentVNode as p, unref as K, createElementVNode as M, mergeProps as E, renderSlot as N, normalizeProps as j, guardReactiveProps as B, toDisplayString as Q } from "vue";
|
|
2
|
-
import { u as Y } from "./useNestedProp-
|
|
3
|
-
import { u as Z, c as ee, X as te, C as O } from "./index-
|
|
2
|
+
import { u as Y } from "./useNestedProp-DE-a5lMx.js";
|
|
3
|
+
import { u as Z, c as ee, X as te, C as O } from "./index-8Lp8V0TB.js";
|
|
4
4
|
import { t as ae, u as se } from "./useResponsive-NZB-WLRF.js";
|
|
5
|
-
import x from "./BaseIcon-
|
|
6
|
-
import { _ as le } from "./Title-
|
|
5
|
+
import x from "./BaseIcon-BoVYVkUT.js";
|
|
6
|
+
import { _ as le } from "./Title-0px6u9U5.js";
|
|
7
7
|
import { _ as oe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
class re {
|
|
9
9
|
constructor(F, w, I, z = !0, C = !0) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),F=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),F=require("./useNestedProp-Vjg1xsU_.cjs"),w=require("./index-De6Dj52h.cjs"),z=require("./useResponsive-B3TrDDIG.cjs"),b=require("./BaseIcon-DuVD-1qH.cjs"),H=require("./Title-CSRD5z1r.cjs"),A=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");class L{constructor(N,p,_,T=!0,g=!0){this.interval=p,this.elapsed=0,this.isPaused=!1;const C=`
|
|
2
2
|
let interval;
|
|
3
3
|
let elapsed = 0;
|
|
4
4
|
let paused = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),E=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),E=require("./useNestedProp-Vjg1xsU_.cjs"),v=require("./index-De6Dj52h.cjs"),T=require("./Title-CSRD5z1r.cjs"),O=require("./usePrinter-SLYneJmG.cjs"),j=require("./vue-ui-skeleton-Cl9Kp9yE.cjs"),U=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),H=["id"],M=["xmlns","viewBox"],D={key:0},X=["d","stroke-width","stroke"],R={key:1},Y=["x1","y1","x2","y2","stroke-width","stroke"],J=["x","y","font-size","fill","font-weight","text-anchor"],K={key:3,class:"vue-data-ui-watermark"},Q={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(A,{expose:V}){const u=A,{vue_ui_tiremarks:q}=v.useConfig(),x=e.computed(()=>!!u.dataset&&Object.keys(u.dataset).length),$=e.ref(v.createUid()),w=e.ref(null),P=e.ref(0),t=e.computed(()=>{const a=E.useNestedProp({userConfig:u.config,defaultConfig:q});return a.theme?{...E.useNestedProp({userConfig:v.themes.vue_ui_tiremarks[a.theme]||u.config,defaultConfig:a})}:a}),{isPrinting:B,isImaging:z,generatePdf:S,generateImage:I}=O.usePrinter({elementId:$.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks"}),i=e.ref(t.value.style.chart.animation.use?0:u.dataset.percentage);e.watch(()=>u.dataset.percentage,()=>{i.value=e.ref(t.value.style.chart.animation.use?0:u.dataset.percentage),F()}),e.onMounted(()=>{v.objectIsEmpty(u.dataset)&&v.error({componentName:"VueUiTiremarks",type:"dataset"}),F()});function F(){let a=0,s=t.value.style.chart.animation.speed,l=.005*t.value.style.chart.animation.acceleration;function r(){i.value+=s+a,a+=l,i.value<u.dataset.percentage?requestAnimationFrame(r):i.value=u.dataset.percentage}t.value.style.chart.animation.use&&(i.value=0,r())}const y=e.computed(()=>t.value.style.chart.layout.display==="vertical"),n=e.computed(()=>{const a={top:48,left:64,right:64,bottom:48};return y.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?a.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?a.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?a.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?a.right:10}}),C=e.computed(()=>Object.values(n.value).reduce((a,s)=>a+s,0)),o=e.computed(()=>({height:y.value?312:56,width:y.value?56:312})),L=e.ref(100);e.computed(()=>u.dataset.percentage/L.value);const c=e.computed(()=>y.value?{mark:(o.value.height-C.value)/100*.5,space:(o.value.height-C.value)/100*.5}:{mark:(o.value.width-C.value)/100*.5,space:(o.value.width-C.value)/100*.5}),N=e.computed(()=>{const a=[];for(let l=0;l<100;l+=1){const r=t.value.style.chart.layout.ticks.gradient.show?v.shiftHue(t.value.style.chart.layout.activeColor,l/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.activeColor;if(y.value){const f=t.value.style.chart.layout.crescendo?(100-l)*(o.value.width-n.value.left-n.value.right)/100/3:0,d=n.value.left+4+f,h=o.value.width-n.value.right-4-f,m=o.value.height-n.value.bottom-l*c.value.mark-l*c.value.space-c.value.mark,g=o.value.height-n.value.bottom-l*c.value.mark-l*c.value.space-c.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,b=t.value.style.chart.layout.curveAngleY*((1+l)/100);a.push({x1:d,x2:h,y1:m,y2:g,curve:`M ${d} ${m} C ${d+k} ${m-b}, ${h-k} ${g-b}, ${h} ${g}`,color:r})}else{const f=t.value.style.chart.layout.crescendo?(100-l)*(o.value.height-n.value.top-n.value.bottom)/100/3:0,d=n.value.left+l*c.value.mark+l*c.value.space-c.value.mark,h=d,m=n.value.top+4+f,g=o.value.height-n.value.bottom-4-f,k=t.value.style.chart.layout.curveAngleY*((1+l)/100),b=(g-m)/t.value.style.chart.layout.curveAngleX;a.push({x1:d,x2:h,y1:m,y2:g,curve:`M ${d} ${m} C ${d+k} ${m+b}, ${h+k} ${g-b}, ${h} ${g}`,color:r})}}return a}),p=e.computed(()=>{let a,s,l;const r=t.value.style.chart.percentage.fontSize/3;return y.value?t.value.style.chart.percentage.verticalPosition==="top"?(a=o.value.width/2,s=n.value.top/2,l="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(a=o.value.width/2,s=o.value.height-n.value.bottom/2+r,l="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(a=4,s=o.value.height/2+r,l="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(a=o.value.width-n.value.right+8,s=o.value.height/2+r,l="start"),{x:a,y:s,textAnchor:l,bold:t.value.style.chart.percentage.bold,fontSize:t.value.style.chart.percentage.fontSize,fill:t.value.style.chart.percentage.color}}),_=e.ref(!1);function G(a){_.value=a,P.value+=1}return V({generatePdf:S,generateImage:I}),(a,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:w,class:e.normalizeClass(`vue-ui-tiremarks ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:$.value},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(T._sfc_main,{config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(O.UserOptions,{ref:"details",key:`user_options_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(B),isImaging:e.unref(z),uid:$.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:_.value,titles:{...t.value.userOptions.buttonTitles},chartElement:w.value,onToggleFullscreen:G,onGeneratePdf:e.unref(S),onGenerateImage:e.unref(I)},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(v.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),viewBox:`0 0 ${o.value.width} ${o.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",D,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{d:l.curve,"stroke-width":c.value.mark,stroke:i.value>=r?l.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&r<=i.value})},null,10,X))),256))])):(e.openBlock(),e.createElementBlock("g",R,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:l.x1,y1:l.y1,x2:l.x2,y2:l.y2,"stroke-width":c.value.mark,stroke:i.value>=r?l.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,Y))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:p.value.x,y:p.value.y,"font-size":p.value.fontSize,fill:t.value.style.chart.layout.ticks.gradient.show&&t.value.style.chart.percentage.useGradientColor?e.unref(v.shiftHue)(t.value.style.chart.layout.activeColor,i.value/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.percentage.color,"font-weight":p.value.bold?"bold":"normal","text-anchor":p.value.textAnchor},e.toDisplayString(e.unref(v.applyDataLabel)(t.value.style.chart.percentage.formatter,i.value,e.unref(v.dataLabel)({v:i.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,J)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:o.value},void 0,!0)],14,M)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",K,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(B)||e.unref(z)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(j.default,{key:4,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],14,H))}},W=U._export_sfc(Q,[["__scopeId","data-v-0cc3937c"]]);exports.default=W;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { computed as h, ref as p, watch as Z, onMounted as ee, openBlock as s, createElementBlock as v, normalizeClass as O, normalizeStyle as S, createVNode as te, createCommentVNode as _, createBlock as V, unref as d, createSlots as ae, withCtx as A, renderSlot as w, normalizeProps as X, guardReactiveProps as D, Fragment as M, renderList as H, toDisplayString as le } from "vue";
|
|
2
|
-
import { u as R } from "./useNestedProp-
|
|
3
|
-
import { u as re, c as oe, t as se, o as ne, e as ue, s as Y, X as ie, i as ce, f as ve } from "./index-
|
|
4
|
-
import { _ as he } from "./Title-
|
|
5
|
-
import { u as de, U as ge } from "./usePrinter-
|
|
6
|
-
import ye from "./vue-ui-skeleton-
|
|
2
|
+
import { u as R } from "./useNestedProp-DE-a5lMx.js";
|
|
3
|
+
import { u as re, c as oe, t as se, o as ne, e as ue, s as Y, X as ie, i as ce, f as ve } from "./index-8Lp8V0TB.js";
|
|
4
|
+
import { _ as he } from "./Title-0px6u9U5.js";
|
|
5
|
+
import { u as de, U as ge } from "./usePrinter-cCBJ71Cc.js";
|
|
6
|
+
import ye from "./vue-ui-skeleton-apODtH32.js";
|
|
7
7
|
import { _ as me } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
const fe = ["id"], pe = ["xmlns", "viewBox"], ke = { key: 0 }, _e = ["d", "stroke-width", "stroke"], be = { key: 1 }, Ce = ["x1", "y1", "x2", "y2", "stroke-width", "stroke"], $e = ["x", "y", "font-size", "fill", "font-weight", "text-anchor"], xe = {
|
|
9
9
|
key: 3,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Br-wm_4r.cjs"),ke=require("./Title-DSPpszvp.cjs"),re=require("./usePrinter-DUD-LDLx.cjs"),Ce=require("./Tooltip-CgSI_niS.cjs"),we=require("./Legend-L_Enr1Hx.cjs"),xe=require("./vue-ui-skeleton-BWu2nLeV.cjs"),Te=require("./DataTable-E_zoBxXZ.cjs"),$e=require("./vue-ui-accordion-ZPhdh-C7.cjs"),ue=require("./useResponsive-B3TrDDIG.cjs"),se=require("./useNestedProp-BH5s4SOa.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function ie(n,d){const s=n.length;if(s===0)throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);{let u=1/0,i=-1/0,v=0;for(let f=0;f<s;f+=1){const p=n[f].normalizedValue;p<u&&(u=p),p>i&&(i=p),v+=p}return Math.max(d**2*i/v**2,v**2/(d**2*u))}}function ce(n){const{xOffset:d,yOffset:s,width:u,height:i}=n;return{x0:d,y0:s,x1:d+u,y1:s+i}}function Ne(n,d,s){if(n.length===0)return!0;{const u=n.concat(d),i=ie(n,s),v=ie(u,s);return i>=v}}function Be(n){const d=[],s=n.length;for(let u=0;u<s;u+=1){const i=n[u],v=i.length;for(let h=0;h<v;h+=1)d.push(i[h])}return d}function _e(n,d){const s={...d,children:n};return ve(s)}function ze(n){return(n.x1-n.x0)*(n.y1-n.y0)}function de(n,d){const{width:s,height:u,xOffset:i,yOffset:v}=W(d),h=n.length,f=n.map(m=>m.normalizedValue||0).reduce((m,k)=>m+k,0),p=f/u,C=f/s;let b=i,w=v;const g=[];if(s>=u){for(let m=0;m<h;m+=1){const k=n[m],x=w+k.normalizedValue/p,t={x0:b,y0:w,x1:b+p,y1:x},T=Object.assign({},k,t);w=x,g.push(T)}return g}else{for(let m=0;m<h;m+=1){const k=n[m],x=b+k.normalizedValue/C,t={x0:b,y0:w,x1:x,y1:w+C},T=Object.assign({},k,t);b=x,g.push(T)}return g}}function Pe(n){const d=W(n),s=d.width,u=d.height;return Math.min(s,u)}function Oe(n,d){const s=n.length,u=n.map(p=>p.value??0).reduce((p,C)=>p+C,0),i=d/u,v=[];let h,f;for(let p=0;p<s;p+=1)f=n[p],h=Object.assign({},f,{normalizedValue:f.value*(i||0)}),v.push(h);return v}function W(n){const{x0:d,y0:s,x1:u,y1:i}=n;return{xOffset:d,yOffset:s,width:u-d,height:i-s}}function Ve(n,d,s,u){let i=n,v=d,h=s,f=u;for(;;){const p=i.length;if(p===0){const g=de(v,h);return f.concat(g)}const C=Pe(h),b=i[0],w=i.slice(1,p);if(Ne(v,b,C)){const g=v.concat(b);i=w,v=g,h=h,f=f}else{const g=v.length;let m=0;for(let T=0;T<g;T+=1)m+=v[T].normalizedValue;const k=Ee(h,m),x=de(v,h),t=f.concat(x);i=i,v=[],h=k,f=t}}}function ve(n){if(typeof n.children>"u"||!n.children.length)return[n];{const d=Oe(n.children,ze(n)),s=Ve(d,[],n,[]),u=s.length,i=[];for(let h=0;h<u;h+=1)i.push(ve(s[h]));return Be(i)}}function Ee(n,d){const{width:s,height:u,xOffset:i,yOffset:v}=W(n);if(s>=u){const h=d/u,f=s-h,p={xOffset:i+h,yOffset:v,width:f,height:u};return ce(p)}else{const h=d/s,f=u-h,p={xOffset:i,yOffset:v+h,width:s,height:f};return ce(p)}}const Le=n=>(e.pushScopeId("data-v-7028d693"),n=n(),e.popScopeId(),n),Re=["id"],Fe=["xmlns","viewBox"],De={key:0},Ie=["id"],qe=["stop-color"],Ae=["stop-color"],He=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],Me=["x","y","height","width"],We={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},Ue=Le(()=>e.createElementVNode("br",null,null,-1)),Ge={key:3,class:"vue-data-ui-watermark"},je=["onClick"],Xe={key:0},Ye={key:1},Ze=["innerHTML"],Je={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(n,{expose:d,emit:s}){const u=n,{vue_ui_treemap:i}=r.useConfig(),v=e.computed(()=>!!u.dataset&&u.dataset.length),h=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),f=e.ref(r.createUid()),p=e.ref(!1),C=e.ref(""),b=e.ref(!1),w=e.ref(0),g=e.ref([]),m=e.ref(null),k=e.ref(null),x=e.ref(null),t=e.computed(()=>{const l=se.useNestedProp({userConfig:u.config,defaultConfig:i});return l.theme?{...se.useNestedProp({userConfig:r.themes.vue_ui_treemap[l.theme]||u.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),{isPrinting:T,isImaging:U,generatePdf:G,generateImage:j}=re.usePrinter({elementId:`treemap_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-treemap"}),D=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),B=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),_=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),P=e.computed(()=>({bottom:_.value.height-t.value.style.chart.padding.bottom,height:_.value.height-t.value.style.chart.padding.top-t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:_.value.width-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,vbHeight:_.value.height,vbWidth:_.value.width,width:_.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right}));function X(l){l.forEach((a,o)=>{a.id=r.createUid(),a.color=r.convertColorToHex(a.color)||D.value[o]||r.palette[o]||r.palette[o%r.palette.length],a.children&&(a.children.forEach(c=>{c.parentId=a.id,c.color=a.color}),X(a.children))})}const O=e.ref(u.dataset),I=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiTreemap",type:"dataset"}),X(O.value),t.value.responsive){const l=ue.throttle(()=>{const{width:a,height:o}=ue.useResponsive({chart:m.value,title:t.value.style.chart.title.text?k.value:null,legend:t.value.style.chart.legend.show?x.value:null});_.value.width=a,_.value.height=o});I.value=new ResizeObserver(l),I.value.observe(m.value.parentNode)}}),e.onBeforeUnmount(()=>{I.value&&I.value.disconnect()});const H=e.ref(O.value),R=e.computed(()=>H.value.map((l,a)=>({...l,color:r.convertColorToHex(l.color)||D.value[a]||r.palette[a]||r.palette[a%r.palette.length]})).filter(l=>!g.value.includes(l.id))),E=e.computed(()=>O.value.filter(l=>!g.value.includes(l.id)).map(l=>l.value||0).reduce((l,a)=>l+a,0)),Y=e.computed({get(){let l=[...R.value];return t.value.style.chart.layout.sorted&&(l=[...R.value].sort((a,o)=>o.value-a.value)),l.map(a=>({...a}))},set(l){return l}});function Z(l,a){return l.value/a}function he(l,a,o){const c=t.value.style.chart.layout.rects.colorRatio-Z(a,o);return r.lightenHexColor(l,c<0?0:c)}function J(l,a,o,c){return l.map((y,z)=>{const A=he(r.convertColorToHex(a)||D.value[z]||r.palette[z]||r.palette[z%r.palette.length],y,c),be=Z(y,c);return{...y,color:A,proportion:be,parentName:o,children:y.children?J(y.children,A,y.name,c):void 0}})}const F=e.computed(()=>_e(Y.value.map((l,a)=>{const o=l.children?l.children.reduce((c,y)=>c+y.value,0):l.value;return{value:l.value,id:l.id,children:l.children?J(l.children.sort((c,y)=>y.value-c.value),l.color,l.name,o):void 0,color:l.color,name:l.name}}),{x0:P.value.left*2,y0:P.value.top,x1:P.value.width,y1:P.value.height}));function K({y0:l,y1:a}){return a-l<=0?1e-4:a-l}function Q({x0:l,x1:a}){return a-l<=0?1e-4:a-l}function V(l){const a=t.value.style.chart.layout.labels.fontSize*(l.proportion*2>1?1:l.proportion*2);return a<t.value.style.chart.layout.labels.minFontSize?t.value.style.chart.layout.labels.minFontSize:a}function pe(l){b.value=l,w.value+=1}const L=e.computed(()=>({startX:0,startY:0,width:P.value.vbWidth,height:P.value.vbHeight})),$=e.ref(!1);function ee(l,a=O.value){for(const o of a){if(o.id===l)return o;if(o.children){const c=ee(l,o.children);if(c)return c}}return null}function fe(l){$.value?(s("selectDatapoint",void 0),H.value=O.value):(s("selectDatapoint",l),H.value=[ee(l.parentId)]),$.value=!$.value}const S=e.ref(null),te=e.computed(()=>O.value.map((l,a)=>({...l,color:r.convertColorToHex(l.color)||D.value[a]||r.palette[a]||r.palette[a%r.palette.length],shape:"square"})).sort((l,a)=>a.value-l.value).map((l,a)=>({...l,proportion:l.value/O.value.map(o=>o.value).reduce((o,c)=>o+c,0),opacity:g.value.includes(l.id)?.5:1}))),ge=e.computed(()=>({cy:"treemap-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function le(l){$.value=!1,S.value=null,g.value.includes(l.id)?g.value=g.value.filter(a=>a!==l.id):g.value.length<u.dataset.length-1&&g.value.push(l.id),s("selectLegend",Y.value)}const M=e.ref(null);function me({datapoint:l,seriesIndex:a}){S.value=l,M.value={datapoint:l,seriesIndex:a,config:t.value,series:R.value};const o=t.value.style.chart.tooltip.customFormat;if(r.isFunction(o)&&r.functionReturnsString(()=>o({seriesIndex:a,datapoint:l,series:R.value,config:t.value})))C.value=o({seriesIndex:a,datapoint:l,series:R.value,config:t.value});else{let c="";c+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,c+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" fill="${l.color}"/></svg>`,c+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:a})}</b>`,C.value=`<div>${c}</div>`}p.value=!0}const N=e.computed(()=>{const l=F.value.map(o=>({name:o.name,color:o.color})),a=F.value.map(o=>o.value);return{head:l,body:a}});function oe(){e.nextTick(()=>{const l=N.value.head.map((c,y)=>[[c.name],[N.value.body[y]],[isNaN(N.value.body[y]/E.value)?"-":N.value.body[y]/E.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-treemap"})})}const q=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],a=N.value.head.map((y,z)=>{const A=r.applyDataLabel(t.value.style.chart.layout.labels.formatter,N.value.body[z],r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:N.value.body[z],s:t.value.style.chart.layout.labels.suffix,r:t.value.table.td.roundingValue}));return[{color:y.color,name:y.name,shape:"square"},A,isNaN(N.value.body[z]/E.value)?"-":r.dataLabel({v:N.value.body[z]/E.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:l,body:a,config:o}});function ye(){return F.value}function ae(){B.value.showTable=!B.value.showTable}function ne(){B.value.showTooltip=!B.value.showTooltip}return d({getData:ye,generateCsv:oe,generateImage:j,generatePdf:G,toggleTable:ae,toggleTooltip:ne}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:m,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`treemap_${f.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:k,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)},[e.createVNode(ke._sfc_main,{config:{title:{cy:"treemap-div-title",...t.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&v.value?(e.openBlock(),e.createBlock(re.UserOptions,{ref:"details",key:`user_option_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(T),isImaging:e.unref(U),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:B.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:m.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(G),onGenerateCsv:oe,onGenerateImage:e.unref(j),onToggleTable:ae,onToggleTooltip:ne},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:c})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:c})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!$.value,"vue-data-ui-zoom-minus":$.value}),viewBox:`${L.value.startX} ${L.value.startY} ${L.value.width<=0?10:L.value.width} ${L.value.height<=0?10:L.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(o,c)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",De,[e.createElementVNode("radialGradient",{id:`tgrad_${o.id}`,gradientTransform:"translate(-1, -1.000001) scale(2, 2)"},[e.createElementVNode("stop",{offset:"18%","stop-color":o.color},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.lightenHexColor)(o.color,t.value.style.chart.layout.rects.gradient.intensity/100)},null,8,Ae)],8,Ie)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(o,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.x0,y:o.y0,height:K(o),width:Q(o),fill:h.value?o.color:t.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${o.id})`:o.color,rx:t.value.style.chart.layout.rects.borderRadius,stroke:S.value&&S.value.id===o.id?t.value.style.chart.layout.rects.selected.stroke:t.value.style.chart.layout.rects.stroke,"stroke-width":S.value&&S.value.id===o.id?t.value.style.chart.layout.rects.selected.strokeWidth:t.value.style.chart.layout.rects.strokeWidth,onClick:y=>fe(o),onMouseenter:()=>me({datapoint:o,seriesIndex:c}),onMouseleave:a[0]||(a[0]=y=>{S.value=null,p.value=!1}),style:e.normalizeStyle(`opacity:${S.value?S.value.id===o.id?1:t.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:"vue-ui-treemap-rect"},null,44,He),(e.openBlock(),e.createElementBlock("foreignObject",{x:o.x0,y:o.y0,height:K(o),width:Q(o),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",We,[t.value.style.chart.layout.labels.showDefaultLabels&&(o.proportion>t.value.style.chart.layout.labels.hideUnderProportion||$.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${V(o)/1.5}px);text-align:left;line-height:${V(o)<14?14:V(o)}px;padding:${V(o)/3}px; color:${e.unref(r.adaptColorToBackground)(o.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${V(o)}px;`)},e.toDisplayString(o.name),5),Ue,e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${V(o)}px;`)},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:o.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.layout.labels.rounding}),{datapoint:o})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"rect",e.normalizeProps(e.guardReactiveProps({rect:o,shouldShow:o.proportion>t.value.style.chart.layout.labels.hideUnderProportion||$.value,fontSize:V(o),isZoom:$.value,textColor:e.unref(r.adaptColorToBackground)(o.color)})),void 0,!0)])],8,Me))]))),256)),e.renderSlot(l.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:P.value,isZoom:$.value,rect:S.value,config:t.value})),void 0,!0)],14,Fe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(T)||e.unref(U)})),void 0,!0)])):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:4,config:{type:"treemap",style:{backgroundColor:t.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:x},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(we.Legend,{key:0,legendSet:te.value,config:ge.value,id:`treemap_legend_${f.value}`,onClickMarker:a[1]||(a[1]=({legend:o})=>le(o))},{item:e.withCtx(({legend:o,index:c})=>[e.createElementVNode("div",{onClick:y=>le(o),style:e.normalizeStyle(`opacity:${g.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:o.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o}))+" ",1),g.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",Ye," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Xe," ("+e.toDisplayString(isNaN(o.value/E.value)?"-":(o.value/E.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,je)]),_:1},8,["legendSet","config","id"])):e.renderSlot(l.$slots,"legend",{key:1,legend:te.value},void 0,!0)],512),e.createVNode(Ce._sfc_main,{show:B.value.showTooltip&&p.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:m.value,content:C.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),v.value?(e.openBlock(),e.createBlock($e.default,{key:5,hideDetails:"",config:{open:B.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(Te.DataTable,{colNames:q.value.colNames,head:q.value.head,body:q.value.body,config:q.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>B.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Ze)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Re))}},Ke=Se._export_sfc(Je,[["__scopeId","data-v-7028d693"]]);exports.default=Ke;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-De6Dj52h.cjs"),ke=require("./Title-CSRD5z1r.cjs"),re=require("./usePrinter-SLYneJmG.cjs"),Ce=require("./Tooltip-DFpYO4rz.cjs"),we=require("./Legend-C3LgyVKP.cjs"),xe=require("./vue-ui-skeleton-Cl9Kp9yE.cjs"),Te=require("./DataTable-CMF1l-gL.cjs"),$e=require("./vue-ui-accordion-CiSEQOBc.cjs"),ue=require("./useResponsive-B3TrDDIG.cjs"),se=require("./useNestedProp-Vjg1xsU_.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function ie(n,d){const s=n.length;if(s===0)throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);{let u=1/0,i=-1/0,v=0;for(let f=0;f<s;f+=1){const p=n[f].normalizedValue;p<u&&(u=p),p>i&&(i=p),v+=p}return Math.max(d**2*i/v**2,v**2/(d**2*u))}}function ce(n){const{xOffset:d,yOffset:s,width:u,height:i}=n;return{x0:d,y0:s,x1:d+u,y1:s+i}}function Ne(n,d,s){if(n.length===0)return!0;{const u=n.concat(d),i=ie(n,s),v=ie(u,s);return i>=v}}function Be(n){const d=[],s=n.length;for(let u=0;u<s;u+=1){const i=n[u],v=i.length;for(let h=0;h<v;h+=1)d.push(i[h])}return d}function _e(n,d){const s={...d,children:n};return ve(s)}function ze(n){return(n.x1-n.x0)*(n.y1-n.y0)}function de(n,d){const{width:s,height:u,xOffset:i,yOffset:v}=W(d),h=n.length,f=n.map(m=>m.normalizedValue||0).reduce((m,k)=>m+k,0),p=f/u,C=f/s;let b=i,w=v;const g=[];if(s>=u){for(let m=0;m<h;m+=1){const k=n[m],x=w+k.normalizedValue/p,t={x0:b,y0:w,x1:b+p,y1:x},T=Object.assign({},k,t);w=x,g.push(T)}return g}else{for(let m=0;m<h;m+=1){const k=n[m],x=b+k.normalizedValue/C,t={x0:b,y0:w,x1:x,y1:w+C},T=Object.assign({},k,t);b=x,g.push(T)}return g}}function Pe(n){const d=W(n),s=d.width,u=d.height;return Math.min(s,u)}function Oe(n,d){const s=n.length,u=n.map(p=>p.value??0).reduce((p,C)=>p+C,0),i=d/u,v=[];let h,f;for(let p=0;p<s;p+=1)f=n[p],h=Object.assign({},f,{normalizedValue:f.value*(i||0)}),v.push(h);return v}function W(n){const{x0:d,y0:s,x1:u,y1:i}=n;return{xOffset:d,yOffset:s,width:u-d,height:i-s}}function Ve(n,d,s,u){let i=n,v=d,h=s,f=u;for(;;){const p=i.length;if(p===0){const g=de(v,h);return f.concat(g)}const C=Pe(h),b=i[0],w=i.slice(1,p);if(Ne(v,b,C)){const g=v.concat(b);i=w,v=g,h=h,f=f}else{const g=v.length;let m=0;for(let T=0;T<g;T+=1)m+=v[T].normalizedValue;const k=Ee(h,m),x=de(v,h),t=f.concat(x);i=i,v=[],h=k,f=t}}}function ve(n){if(typeof n.children>"u"||!n.children.length)return[n];{const d=Oe(n.children,ze(n)),s=Ve(d,[],n,[]),u=s.length,i=[];for(let h=0;h<u;h+=1)i.push(ve(s[h]));return Be(i)}}function Ee(n,d){const{width:s,height:u,xOffset:i,yOffset:v}=W(n);if(s>=u){const h=d/u,f=s-h,p={xOffset:i+h,yOffset:v,width:f,height:u};return ce(p)}else{const h=d/s,f=u-h,p={xOffset:i,yOffset:v+h,width:s,height:f};return ce(p)}}const Le=n=>(e.pushScopeId("data-v-7028d693"),n=n(),e.popScopeId(),n),Re=["id"],Fe=["xmlns","viewBox"],De={key:0},Ie=["id"],qe=["stop-color"],Ae=["stop-color"],He=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],Me=["x","y","height","width"],We={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},Ue=Le(()=>e.createElementVNode("br",null,null,-1)),Ge={key:3,class:"vue-data-ui-watermark"},je=["onClick"],Xe={key:0},Ye={key:1},Ze=["innerHTML"],Je={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(n,{expose:d,emit:s}){const u=n,{vue_ui_treemap:i}=r.useConfig(),v=e.computed(()=>!!u.dataset&&u.dataset.length),h=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),f=e.ref(r.createUid()),p=e.ref(!1),C=e.ref(""),b=e.ref(!1),w=e.ref(0),g=e.ref([]),m=e.ref(null),k=e.ref(null),x=e.ref(null),t=e.computed(()=>{const l=se.useNestedProp({userConfig:u.config,defaultConfig:i});return l.theme?{...se.useNestedProp({userConfig:r.themes.vue_ui_treemap[l.theme]||u.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),{isPrinting:T,isImaging:U,generatePdf:G,generateImage:j}=re.usePrinter({elementId:`treemap_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-treemap"}),D=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),B=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),_=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),P=e.computed(()=>({bottom:_.value.height-t.value.style.chart.padding.bottom,height:_.value.height-t.value.style.chart.padding.top-t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:_.value.width-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,vbHeight:_.value.height,vbWidth:_.value.width,width:_.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right}));function X(l){l.forEach((a,o)=>{a.id=r.createUid(),a.color=r.convertColorToHex(a.color)||D.value[o]||r.palette[o]||r.palette[o%r.palette.length],a.children&&(a.children.forEach(c=>{c.parentId=a.id,c.color=a.color}),X(a.children))})}const O=e.ref(u.dataset),I=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiTreemap",type:"dataset"}),X(O.value),t.value.responsive){const l=ue.throttle(()=>{const{width:a,height:o}=ue.useResponsive({chart:m.value,title:t.value.style.chart.title.text?k.value:null,legend:t.value.style.chart.legend.show?x.value:null});_.value.width=a,_.value.height=o});I.value=new ResizeObserver(l),I.value.observe(m.value.parentNode)}}),e.onBeforeUnmount(()=>{I.value&&I.value.disconnect()});const H=e.ref(O.value),R=e.computed(()=>H.value.map((l,a)=>({...l,color:r.convertColorToHex(l.color)||D.value[a]||r.palette[a]||r.palette[a%r.palette.length]})).filter(l=>!g.value.includes(l.id))),E=e.computed(()=>O.value.filter(l=>!g.value.includes(l.id)).map(l=>l.value||0).reduce((l,a)=>l+a,0)),Y=e.computed({get(){let l=[...R.value];return t.value.style.chart.layout.sorted&&(l=[...R.value].sort((a,o)=>o.value-a.value)),l.map(a=>({...a}))},set(l){return l}});function Z(l,a){return l.value/a}function he(l,a,o){const c=t.value.style.chart.layout.rects.colorRatio-Z(a,o);return r.lightenHexColor(l,c<0?0:c)}function J(l,a,o,c){return l.map((y,z)=>{const A=he(r.convertColorToHex(a)||D.value[z]||r.palette[z]||r.palette[z%r.palette.length],y,c),be=Z(y,c);return{...y,color:A,proportion:be,parentName:o,children:y.children?J(y.children,A,y.name,c):void 0}})}const F=e.computed(()=>_e(Y.value.map((l,a)=>{const o=l.children?l.children.reduce((c,y)=>c+y.value,0):l.value;return{value:l.value,id:l.id,children:l.children?J(l.children.sort((c,y)=>y.value-c.value),l.color,l.name,o):void 0,color:l.color,name:l.name}}),{x0:P.value.left*2,y0:P.value.top,x1:P.value.width,y1:P.value.height}));function K({y0:l,y1:a}){return a-l<=0?1e-4:a-l}function Q({x0:l,x1:a}){return a-l<=0?1e-4:a-l}function V(l){const a=t.value.style.chart.layout.labels.fontSize*(l.proportion*2>1?1:l.proportion*2);return a<t.value.style.chart.layout.labels.minFontSize?t.value.style.chart.layout.labels.minFontSize:a}function pe(l){b.value=l,w.value+=1}const L=e.computed(()=>({startX:0,startY:0,width:P.value.vbWidth,height:P.value.vbHeight})),$=e.ref(!1);function ee(l,a=O.value){for(const o of a){if(o.id===l)return o;if(o.children){const c=ee(l,o.children);if(c)return c}}return null}function fe(l){$.value?(s("selectDatapoint",void 0),H.value=O.value):(s("selectDatapoint",l),H.value=[ee(l.parentId)]),$.value=!$.value}const S=e.ref(null),te=e.computed(()=>O.value.map((l,a)=>({...l,color:r.convertColorToHex(l.color)||D.value[a]||r.palette[a]||r.palette[a%r.palette.length],shape:"square"})).sort((l,a)=>a.value-l.value).map((l,a)=>({...l,proportion:l.value/O.value.map(o=>o.value).reduce((o,c)=>o+c,0),opacity:g.value.includes(l.id)?.5:1}))),ge=e.computed(()=>({cy:"treemap-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function le(l){$.value=!1,S.value=null,g.value.includes(l.id)?g.value=g.value.filter(a=>a!==l.id):g.value.length<u.dataset.length-1&&g.value.push(l.id),s("selectLegend",Y.value)}const M=e.ref(null);function me({datapoint:l,seriesIndex:a}){S.value=l,M.value={datapoint:l,seriesIndex:a,config:t.value,series:R.value};const o=t.value.style.chart.tooltip.customFormat;if(r.isFunction(o)&&r.functionReturnsString(()=>o({seriesIndex:a,datapoint:l,series:R.value,config:t.value})))C.value=o({seriesIndex:a,datapoint:l,series:R.value,config:t.value});else{let c="";c+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,c+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" fill="${l.color}"/></svg>`,c+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:a})}</b>`,C.value=`<div>${c}</div>`}p.value=!0}const N=e.computed(()=>{const l=F.value.map(o=>({name:o.name,color:o.color})),a=F.value.map(o=>o.value);return{head:l,body:a}});function oe(){e.nextTick(()=>{const l=N.value.head.map((c,y)=>[[c.name],[N.value.body[y]],[isNaN(N.value.body[y]/E.value)?"-":N.value.body[y]/E.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-treemap"})})}const q=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],a=N.value.head.map((y,z)=>{const A=r.applyDataLabel(t.value.style.chart.layout.labels.formatter,N.value.body[z],r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:N.value.body[z],s:t.value.style.chart.layout.labels.suffix,r:t.value.table.td.roundingValue}));return[{color:y.color,name:y.name,shape:"square"},A,isNaN(N.value.body[z]/E.value)?"-":r.dataLabel({v:N.value.body[z]/E.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:l,body:a,config:o}});function ye(){return F.value}function ae(){B.value.showTable=!B.value.showTable}function ne(){B.value.showTooltip=!B.value.showTooltip}return d({getData:ye,generateCsv:oe,generateImage:j,generatePdf:G,toggleTable:ae,toggleTooltip:ne}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:m,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`treemap_${f.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:k,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)},[e.createVNode(ke._sfc_main,{config:{title:{cy:"treemap-div-title",...t.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&v.value?(e.openBlock(),e.createBlock(re.UserOptions,{ref:"details",key:`user_option_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(T),isImaging:e.unref(U),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:B.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:m.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(G),onGenerateCsv:oe,onGenerateImage:e.unref(j),onToggleTable:ae,onToggleTooltip:ne},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:c})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:c})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!$.value,"vue-data-ui-zoom-minus":$.value}),viewBox:`${L.value.startX} ${L.value.startY} ${L.value.width<=0?10:L.value.width} ${L.value.height<=0?10:L.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(o,c)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",De,[e.createElementVNode("radialGradient",{id:`tgrad_${o.id}`,gradientTransform:"translate(-1, -1.000001) scale(2, 2)"},[e.createElementVNode("stop",{offset:"18%","stop-color":o.color},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.lightenHexColor)(o.color,t.value.style.chart.layout.rects.gradient.intensity/100)},null,8,Ae)],8,Ie)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(o,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.x0,y:o.y0,height:K(o),width:Q(o),fill:h.value?o.color:t.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${o.id})`:o.color,rx:t.value.style.chart.layout.rects.borderRadius,stroke:S.value&&S.value.id===o.id?t.value.style.chart.layout.rects.selected.stroke:t.value.style.chart.layout.rects.stroke,"stroke-width":S.value&&S.value.id===o.id?t.value.style.chart.layout.rects.selected.strokeWidth:t.value.style.chart.layout.rects.strokeWidth,onClick:y=>fe(o),onMouseenter:()=>me({datapoint:o,seriesIndex:c}),onMouseleave:a[0]||(a[0]=y=>{S.value=null,p.value=!1}),style:e.normalizeStyle(`opacity:${S.value?S.value.id===o.id?1:t.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:"vue-ui-treemap-rect"},null,44,He),(e.openBlock(),e.createElementBlock("foreignObject",{x:o.x0,y:o.y0,height:K(o),width:Q(o),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",We,[t.value.style.chart.layout.labels.showDefaultLabels&&(o.proportion>t.value.style.chart.layout.labels.hideUnderProportion||$.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${V(o)/1.5}px);text-align:left;line-height:${V(o)<14?14:V(o)}px;padding:${V(o)/3}px; color:${e.unref(r.adaptColorToBackground)(o.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${V(o)}px;`)},e.toDisplayString(o.name),5),Ue,e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${V(o)}px;`)},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:o.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.layout.labels.rounding}),{datapoint:o})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"rect",e.normalizeProps(e.guardReactiveProps({rect:o,shouldShow:o.proportion>t.value.style.chart.layout.labels.hideUnderProportion||$.value,fontSize:V(o),isZoom:$.value,textColor:e.unref(r.adaptColorToBackground)(o.color)})),void 0,!0)])],8,Me))]))),256)),e.renderSlot(l.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:P.value,isZoom:$.value,rect:S.value,config:t.value})),void 0,!0)],14,Fe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(T)||e.unref(U)})),void 0,!0)])):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:4,config:{type:"treemap",style:{backgroundColor:t.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:x},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(we.Legend,{key:0,legendSet:te.value,config:ge.value,id:`treemap_legend_${f.value}`,onClickMarker:a[1]||(a[1]=({legend:o})=>le(o))},{item:e.withCtx(({legend:o,index:c})=>[e.createElementVNode("div",{onClick:y=>le(o),style:e.normalizeStyle(`opacity:${g.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:o.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o}))+" ",1),g.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",Ye," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Xe," ("+e.toDisplayString(isNaN(o.value/E.value)?"-":(o.value/E.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,je)]),_:1},8,["legendSet","config","id"])):e.renderSlot(l.$slots,"legend",{key:1,legend:te.value},void 0,!0)],512),e.createVNode(Ce._sfc_main,{show:B.value.showTooltip&&p.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:m.value,content:C.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),v.value?(e.openBlock(),e.createBlock($e.default,{key:5,hideDetails:"",config:{open:B.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(Te.DataTable,{colNames:q.value.colNames,head:q.value.head,body:q.value.body,config:q.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>B.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Ze)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Re))}},Ke=Se._export_sfc(Je,[["__scopeId","data-v-7028d693"]]);exports.default=Ke;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { computed as C, ref as y, onMounted as Ee, onBeforeUnmount as Ue, openBlock as m, createElementBlock as k, normalizeClass as xe, normalizeStyle as M, createVNode as se, createCommentVNode as V, createBlock as te, unref as b, createSlots as Ge, withCtx as T, renderSlot as _, normalizeProps as G, guardReactiveProps as X, Fragment as $e, renderList as Te, createElementVNode as O, toDisplayString as q, createTextVNode as _e, nextTick as Xe, pushScopeId as qe, popScopeId as je } from "vue";
|
|
2
|
-
import { u as Ye, c as Oe, t as Ze, a as Je, p as x, b as Ke, o as Qe, e as et, d as le, i as oe, f as Z, X as tt, l as Se, D as Ne, w as ze, x as lt, q as ot, r as at } from "./index-
|
|
3
|
-
import { _ as nt } from "./Title-
|
|
4
|
-
import { u as st, U as rt } from "./usePrinter-
|
|
5
|
-
import { _ as ut } from "./Tooltip-
|
|
6
|
-
import { L as it } from "./Legend-
|
|
7
|
-
import ct from "./vue-ui-skeleton-
|
|
8
|
-
import { D as dt } from "./DataTable-
|
|
9
|
-
import vt from "./vue-ui-accordion-
|
|
2
|
+
import { u as Ye, c as Oe, t as Ze, a as Je, p as x, b as Ke, o as Qe, e as et, d as le, i as oe, f as Z, X as tt, l as Se, D as Ne, w as ze, x as lt, q as ot, r as at } from "./index-8Lp8V0TB.js";
|
|
3
|
+
import { _ as nt } from "./Title-0px6u9U5.js";
|
|
4
|
+
import { u as st, U as rt } from "./usePrinter-cCBJ71Cc.js";
|
|
5
|
+
import { _ as ut } from "./Tooltip-TTopnCsK.js";
|
|
6
|
+
import { L as it } from "./Legend-BbSR193q.js";
|
|
7
|
+
import ct from "./vue-ui-skeleton-apODtH32.js";
|
|
8
|
+
import { D as dt } from "./DataTable-Dy0vFXS7.js";
|
|
9
|
+
import vt from "./vue-ui-accordion-BQfLl7n5.js";
|
|
10
10
|
import { t as ht, u as ft } from "./useResponsive-NZB-WLRF.js";
|
|
11
|
-
import { u as Pe } from "./useNestedProp-
|
|
11
|
+
import { u as Pe } from "./useNestedProp-DE-a5lMx.js";
|
|
12
12
|
import { _ as pt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
function Ie(a, i) {
|
|
14
14
|
const s = a.length;
|