vue-data-ui 2.5.6 → 2.5.7
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-D0mlKPSd.js → Arrow-5QI0f9hp.js} +1 -1
- package/dist/{Arrow-DsebY7M5.cjs → Arrow-BQy5IqAX.cjs} +1 -1
- package/dist/{BaseIcon-C_HpYm7J.js → BaseIcon-BXpK120h.js} +1 -1
- package/dist/{BaseIcon-C8K0PDCr.cjs → BaseIcon-Dk8gByg1.cjs} +1 -1
- package/dist/{DataTable-C6-IwvDN.js → DataTable-CpOh1tx3.js} +2 -2
- package/dist/{DataTable-CvEk_3ue.cjs → DataTable-D93-QmC8.cjs} +1 -1
- package/dist/{Legend-_VSW3gtH.cjs → Legend-Dh9aF6uH.cjs} +1 -1
- package/dist/{Legend-BMQRE4wt.js → Legend-DqRstaxU.js} +2 -2
- package/dist/{PackageVersion-D3FEDqJ4.cjs → PackageVersion-CdmZAhdE.cjs} +1 -1
- package/dist/{PackageVersion-CT0EYzFv.js → PackageVersion-iscNRe7N.js} +1 -1
- package/dist/{PenAndPaper-DhMT8zUE.js → PenAndPaper-B-VQ8eSo.js} +3 -3
- package/dist/{PenAndPaper-0PiYibYi.cjs → PenAndPaper-BsncKiRE.cjs} +1 -1
- package/dist/{Shape-DUv8_NIN.js → Shape-CB0mE9KP.js} +1 -1
- package/dist/{Shape-Cilordd5.cjs → Shape-DZRynz5E.cjs} +1 -1
- package/dist/{Slicer-CS9co0ra.cjs → Slicer-Cm0a7Otv.cjs} +1 -1
- package/dist/{Slicer-CT-dGY0K.js → Slicer-DiUftIFQ.js} +2 -2
- package/dist/{Title-BH26TG78.js → Title-CiQQgFbV.js} +1 -1
- package/dist/{Title-BX4Wt59j.cjs → Title-DFq_8HYJ.cjs} +1 -1
- package/dist/{Tooltip-vdsIKE2_.js → Tooltip-ZYQUXVWv.js} +1 -1
- package/dist/{Tooltip-BRF0SCJo.cjs → Tooltip-pcZXVRMj.cjs} +1 -1
- package/dist/index-C_VTEz1N.cjs +9 -0
- package/dist/{index-BpkxOytt.js → index-DiqenHrX.js} +3 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +2 -0
- package/dist/types/vue-data-ui.d.ts +2 -0
- package/dist/{useNestedProp-XW-Jo5ax.js → useNestedProp-B3CQkP95.js} +1 -1
- package/dist/{useNestedProp-C5bsAL3S.cjs → useNestedProp-C7bLHE7v.cjs} +1 -1
- package/dist/{usePrinter-Cbh3Ya4M.js → usePrinter-CHAgX1f-.js} +1 -1
- package/dist/{usePrinter-DOZ7DmEX.cjs → usePrinter-DWCqeYW6.cjs} +1 -1
- package/dist/{vue-data-ui-CwBKTkGS.js → vue-data-ui-BAAnNikX.js} +61 -61
- package/dist/{vue-data-ui-Dbznz6XK.cjs → vue-data-ui-VikO3yRe.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-DC0EeOla.cjs → vue-ui-3d-bar-BR-ihA3S.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-B0smLY_E.js → vue-ui-3d-bar-C4OjP6pi.js} +9 -9
- package/dist/{vue-ui-accordion-BFGSPdZa.cjs → vue-ui-accordion-CtBhoUw4.cjs} +1 -1
- package/dist/{vue-ui-accordion-DSCrwQ1c.js → vue-ui-accordion-DA6XnWaz.js} +3 -3
- package/dist/{vue-ui-age-pyramid-Cshs8aQx.js → vue-ui-age-pyramid-2AgqaHOS.js} +10 -10
- package/dist/{vue-ui-age-pyramid-Ddrrqt6J.cjs → vue-ui-age-pyramid-E0fCV03f.cjs} +1 -1
- package/dist/{vue-ui-annotator-axaLgcSw.js → vue-ui-annotator-CdLA2R6h.js} +1 -1
- package/dist/{vue-ui-annotator-CZavUoIP.cjs → vue-ui-annotator-UcABxDAz.cjs} +1 -1
- package/dist/{vue-ui-bullet-BZ5bRAeI.js → vue-ui-bullet-AFqmPWo3.js} +8 -8
- package/dist/{vue-ui-bullet-ChqQFfgl.cjs → vue-ui-bullet-C4wEiJn8.cjs} +1 -1
- package/dist/{vue-ui-candlestick-DnyNK5cD.cjs → vue-ui-candlestick-BkQsD1Yi.cjs} +1 -1
- package/dist/{vue-ui-candlestick-Bgh8xG_8.js → vue-ui-candlestick-Bs0DE1Xi.js} +11 -11
- package/dist/{vue-ui-carousel-table-C5VY-kzI.cjs → vue-ui-carousel-table-KX-cLx3F.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-CesPP16e.js → vue-ui-carousel-table-NYlYQbo9.js} +4 -4
- package/dist/{vue-ui-chestnut-CCYod_9i.js → vue-ui-chestnut-BAJjfgKR.js} +8 -8
- package/dist/{vue-ui-chestnut-Lcrru7aA.cjs → vue-ui-chestnut-BzHRBq_Z.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-BCk8TBYV.js → vue-ui-circle-pack-BoolEIij.js} +126 -120
- package/dist/vue-ui-circle-pack-BrmdreXG.cjs +1 -0
- package/dist/{vue-ui-cursor-71zF-JDU.cjs → vue-ui-cursor-BjQLjw1a.cjs} +1 -1
- package/dist/{vue-ui-cursor-DBtL_mGd.js → vue-ui-cursor-ut60ihG1.js} +2 -2
- package/dist/{vue-ui-dashboard-CjUkRkFX.cjs → vue-ui-dashboard-BXVdZdEF.cjs} +1 -1
- package/dist/{vue-ui-dashboard-C4naVahi.js → vue-ui-dashboard-FQxiN7Jj.js} +2 -2
- package/dist/{vue-ui-digits-DsjcFYeL.js → vue-ui-digits-Rb48H8et.js} +2 -2
- package/dist/{vue-ui-digits-DJ053E_1.cjs → vue-ui-digits-j2WKJUNf.cjs} +1 -1
- package/dist/{vue-ui-donut-CgK9ni10.cjs → vue-ui-donut-CbFW--I1.cjs} +1 -1
- package/dist/{vue-ui-donut-WZ50Vvo0.js → vue-ui-donut-DUKnsxUu.js} +12 -12
- package/dist/{vue-ui-donut-evolution-DWmEdszT.cjs → vue-ui-donut-evolution-9mJgbwpR.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-CNLISKb_.js → vue-ui-donut-evolution-n-ue754h.js} +11 -11
- package/dist/{vue-ui-dumbbell-Di6hNJyp.js → vue-ui-dumbbell-C4r0NeY_.js} +10 -10
- package/dist/{vue-ui-dumbbell-CNk9SRIK.cjs → vue-ui-dumbbell-sXSCnY75.cjs} +1 -1
- package/dist/{vue-ui-flow-BVRCJKqg.cjs → vue-ui-flow-C8-oqGo7.cjs} +1 -1
- package/dist/{vue-ui-flow-wzudVfwo.js → vue-ui-flow-CuZbUegy.js} +9 -9
- package/dist/{vue-ui-funnel-BkQ729Lk.cjs → vue-ui-funnel-Cb0LSIxk.cjs} +1 -1
- package/dist/{vue-ui-funnel-DDgrNiIx.js → vue-ui-funnel-D9whnJ6X.js} +9 -9
- package/dist/{vue-ui-galaxy-DDR33VLd.js → vue-ui-galaxy-CRECMRY6.js} +11 -11
- package/dist/{vue-ui-galaxy-CCxgO-Ut.cjs → vue-ui-galaxy-DUHSlUJQ.cjs} +1 -1
- package/dist/{vue-ui-gauge-BmYimTMu.js → vue-ui-gauge-BEhMYmCg.js} +7 -7
- package/dist/{vue-ui-gauge-6nNhmzjK.cjs → vue-ui-gauge-BfmvvI7e.cjs} +1 -1
- package/dist/{vue-ui-gizmo-BEDeV0ju.cjs → vue-ui-gizmo-BkZTXg7I.cjs} +1 -1
- package/dist/{vue-ui-gizmo-D7n0y9Xb.js → vue-ui-gizmo-DtXR6xgr.js} +3 -3
- package/dist/{vue-ui-heatmap-BRouZjc0.cjs → vue-ui-heatmap-B1XZnqbm.cjs} +1 -1
- package/dist/{vue-ui-heatmap-DcvyIipN.js → vue-ui-heatmap-BlBHNDJV.js} +10 -10
- package/dist/{vue-ui-history-plot-CdsNfUw3.js → vue-ui-history-plot-BmzpDPL6.js} +11 -11
- package/dist/{vue-ui-history-plot-OAR3Zmfr.cjs → vue-ui-history-plot-DqM3d3p7.cjs} +1 -1
- package/dist/{vue-ui-kpi-eAJqL_IN.cjs → vue-ui-kpi-D1i-2otW.cjs} +1 -1
- package/dist/{vue-ui-kpi-7w8bSN5A.js → vue-ui-kpi-XdIADLDq.js} +3 -3
- package/dist/{vue-ui-mini-loader-DgW6tqQq.js → vue-ui-mini-loader-BdDY5AwD.js} +2 -2
- package/dist/{vue-ui-mini-loader-Iil3HNis.cjs → vue-ui-mini-loader-DZgbFjuS.cjs} +1 -1
- package/dist/{vue-ui-molecule-Dbzc2SXh.js → vue-ui-molecule-DstYXfTV.js} +11 -11
- package/dist/{vue-ui-molecule-Cdoog-Pu.cjs → vue-ui-molecule-a0IHQMkN.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-U7w0Tah2.cjs → vue-ui-mood-radar-BafPNccC.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BDHEAPC5.js → vue-ui-mood-radar-DjtnprtG.js} +11 -11
- package/dist/{vue-ui-nested-donuts-hCTBO5wt.cjs → vue-ui-nested-donuts-DC7oX5GH.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-BfFnlW9x.js → vue-ui-nested-donuts-XQ_auu4H.js} +11 -11
- package/dist/{vue-ui-onion-CuVCB7RM.cjs → vue-ui-onion-DEfVifyj.cjs} +1 -1
- package/dist/{vue-ui-onion-B1AiYUgS.js → vue-ui-onion-D_myFmJv.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-CHSzunQI.cjs → vue-ui-parallel-coordinate-plot-Bv3lIZ0J.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-Box7xMhZ.js → vue-ui-parallel-coordinate-plot-DQsyE4kf.js} +12 -12
- package/dist/{vue-ui-quadrant-DAWxPvEO.js → vue-ui-quadrant-DBvqgk3y.js} +12 -12
- package/dist/{vue-ui-quadrant-CWNw-UWV.cjs → vue-ui-quadrant-DXU4OdLD.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-r3ohg6Cy.js → vue-ui-quick-chart-C-bsRZf1.js} +9 -9
- package/dist/{vue-ui-quick-chart-5OT4sNfY.cjs → vue-ui-quick-chart-Dl-94hQE.cjs} +1 -1
- package/dist/{vue-ui-radar-C1CdBUUI.js → vue-ui-radar-He8orFXJ.js} +12 -12
- package/dist/{vue-ui-radar-nniZ57pv.cjs → vue-ui-radar-QQ8vOOYq.cjs} +1 -1
- package/dist/{vue-ui-rating-B6KkUn_L.cjs → vue-ui-rating-6kyP3DDH.cjs} +1 -1
- package/dist/{vue-ui-rating-BOB44E6x.js → vue-ui-rating-qUauyHHk.js} +2 -2
- package/dist/{vue-ui-relation-circle-CGcO1q75.cjs → vue-ui-relation-circle-BO4wP-bR.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-BHA9HuI0.js → vue-ui-relation-circle-DfVg4VBp.js} +7 -7
- package/dist/{vue-ui-rings-DnrxCB5o.cjs → vue-ui-rings-D_cVoXDa.cjs} +1 -1
- package/dist/{vue-ui-rings-BJPit1Ra.js → vue-ui-rings-DjoVPXun.js} +12 -12
- package/dist/{vue-ui-scatter-BZ027kSK.cjs → vue-ui-scatter-45hc4NIf.cjs} +1 -1
- package/dist/{vue-ui-scatter-DNB5bka2.js → vue-ui-scatter-DBcO00g4.js} +12 -12
- package/dist/{vue-ui-screenshot-CtUiJQiA.cjs → vue-ui-screenshot-lJJxoLDu.cjs} +1 -1
- package/dist/{vue-ui-screenshot-DymukoBK.js → vue-ui-screenshot-zc-jsepS.js} +1 -1
- package/dist/{vue-ui-skeleton-CwwH64lu.js → vue-ui-skeleton-BwWHgSoq.js} +3 -3
- package/dist/{vue-ui-skeleton-BVhUJapg.cjs → vue-ui-skeleton-D1bJntn7.cjs} +1 -1
- package/dist/{vue-ui-smiley-DAOVxquy.js → vue-ui-smiley-BVFxYYJl.js} +2 -2
- package/dist/{vue-ui-smiley-BgYL5aLw.cjs → vue-ui-smiley-CZPe292C.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-Pj2sDKI5.js → vue-ui-spark-trend-8LZqy_wz.js} +5 -5
- package/dist/{vue-ui-spark-trend-D-UfGnMi.cjs → vue-ui-spark-trend-BJ3_K1DU.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-D-odOB5o.cjs → vue-ui-sparkbar-B3idsjFj.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CouWvtoJ.js → vue-ui-sparkbar-C93PvNz6.js} +4 -4
- package/dist/{vue-ui-sparkgauge-Dp2myRtH.cjs → vue-ui-sparkgauge-66qZ-DgD.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-ntZ966hh.js → vue-ui-sparkgauge-B1uABI9w.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-BBqNkAC9.cjs → vue-ui-sparkhistogram-D7ECtpUW.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-CVcHSsRt.js → vue-ui-sparkhistogram-vAgBJK79.js} +5 -5
- package/dist/{vue-ui-sparkline-B4YkZ8aR.js → vue-ui-sparkline-B2JarTjo.js} +4 -4
- package/dist/{vue-ui-sparkline-D-jKCztU.cjs → vue-ui-sparkline-YOIgP_Dl.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-SlfuB973.js → vue-ui-sparkstackbar-C2E7YRP0.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-CgSpNVWV.cjs → vue-ui-sparkstackbar-DMClZgds.cjs} +1 -1
- package/dist/{vue-ui-stackbar-Do0cVXn_.cjs → vue-ui-stackbar-BP_qrJ-s.cjs} +1 -1
- package/dist/{vue-ui-stackbar-BNHmR_5M.js → vue-ui-stackbar-n27TJh0C.js} +13 -13
- package/dist/{vue-ui-strip-plot-DfvoiHgh.js → vue-ui-strip-plot-Bjy7C_Ry.js} +11 -11
- package/dist/{vue-ui-strip-plot-CUIM6p_e.cjs → vue-ui-strip-plot-DN7X6zBk.cjs} +1 -1
- package/dist/{vue-ui-table-IRFF_yye.cjs → vue-ui-table-6rqw4Gi-.cjs} +1 -1
- package/dist/{vue-ui-table-B1yvOggj.js → vue-ui-table-DnHvIIqi.js} +1 -1
- package/dist/{vue-ui-table-heatmap-BXY52SRf.cjs → vue-ui-table-heatmap-BQKXP9Na.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-GItg9-dC.js → vue-ui-table-heatmap-Dt8DAC4A.js} +4 -4
- package/dist/{vue-ui-table-sparkline-iGFAWMYo.js → vue-ui-table-sparkline-CLQJbHX8.js} +5 -5
- package/dist/{vue-ui-table-sparkline-BHfIm9UT.cjs → vue-ui-table-sparkline-DmNJFPHo.cjs} +1 -1
- package/dist/{vue-ui-thermometer-UICgp_zs.js → vue-ui-thermometer-BTmiPdUs.js} +7 -7
- package/dist/{vue-ui-thermometer-DvqP69hY.cjs → vue-ui-thermometer-DnVSE7_V.cjs} +1 -1
- package/dist/{vue-ui-timer-DJzscIpZ.cjs → vue-ui-timer-CINerMki.cjs} +1 -1
- package/dist/{vue-ui-timer-p0KgWSfy.js → vue-ui-timer-D6j-aYnJ.js} +5 -5
- package/dist/{vue-ui-tiremarks-DpXsBy1-.cjs → vue-ui-tiremarks-CRGMkwwv.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-Bq6ciZp0.js → vue-ui-tiremarks-ztoJZwQn.js} +7 -7
- package/dist/{vue-ui-treemap-B9TKmG5Z.js → vue-ui-treemap-B0NYnKie.js} +11 -11
- package/dist/{vue-ui-treemap-BIXzY6rt.cjs → vue-ui-treemap-CbqRlXgA.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-p8nAYFrW.cjs → vue-ui-vertical-bar-Cosr8beH.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-CBsaQ0m4.js → vue-ui-vertical-bar-DzcpRwPF.js} +12 -12
- package/dist/{vue-ui-waffle-CecnWv5a.js → vue-ui-waffle-CE1MnOqa.js} +12 -12
- package/dist/{vue-ui-waffle-CMDTMHXM.cjs → vue-ui-waffle-DkVKQERp.cjs} +1 -1
- package/dist/{vue-ui-wheel-ChZI90Rv.cjs → vue-ui-wheel-CGYGLKyG.cjs} +1 -1
- package/dist/{vue-ui-wheel-BvML9VG5.js → vue-ui-wheel-DMS12xPv.js} +7 -7
- package/dist/{vue-ui-word-cloud-0Kj2o6G9.cjs → vue-ui-word-cloud-C1klEiea.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-T_f0AHVo.js → vue-ui-word-cloud-D_CyZOE0.js} +10 -10
- package/dist/{vue-ui-xy-DYGyMln-.js → vue-ui-xy-GgA45y9X.js} +14 -14
- package/dist/{vue-ui-xy-wLaSuJNp.cjs → vue-ui-xy-Nj-5ko1z.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-D00_TYAC.js → vue-ui-xy-canvas-BRPQBL8l.js} +11 -11
- package/dist/{vue-ui-xy-canvas-BB8ojPuv.cjs → vue-ui-xy-canvas-CQt5pre_.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index--Qj2S12-.cjs +0 -9
- package/dist/vue-ui-circle-pack-nfi25HeN.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index--Qj2S12-.cjs"),te=require("./Title-BX4Wt59j.cjs"),U=require("./usePrinter-DOZ7DmEX.cjs"),oe=require("./vue-ui-skeleton-BVhUJapg.cjs"),Y=require("./useNestedProp-C5bsAL3S.cjs"),le=require("./PackageVersion-D3FEDqJ4.cjs"),re=require("./PenAndPaper-0PiYibYi.cjs"),ae=require("./useUserOptionState-BgepsfED.cjs"),se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ne=["id"],ue={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},ie={key:2,style:"width:100%"},ce=["xmlns","viewBox"],de=["width","height"],he={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},ve=["fill"],me=["id"],pe=["stop-color"],ye=["stop-color"],fe=["stop-color"],ge={"clip-path":"url(#vueUiPill)"},ke=["x","y","height","width"],be=["x","y","height","width","fill"],xe=["x1","x2","y1","y2","stroke-width","stroke"],Ce=["x1","x2","y1","y2","stroke-width","stroke"],we=["x1","x2","y1","y2","stroke-width","stroke"],_e=["x1","x2","y1","y2","stroke-width","stroke"],Ne=["x1","x2","y1","y2","stroke-width","stroke"],Be=["x1","x2","y1","y2","stroke-width","stroke"],Ve=["x1","x2","y1","y2","stroke-width","stroke"],Ee=["x1","x2","y1","y2","stroke-width","stroke"],Pe=["x","y","height","width"],$e=["y","x","fill","font-size","font-weight"],Fe={key:5,class:"vue-data-ui-watermark"},Oe={key:6,ref:"source",dir:"auto"},Se={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:z}){const s=m;e.useCssVars(l=>({"0c45683a":R.value,"2e6db90b":D.value,"399c14b8":j.value}));const{vue_ui_thermometer:L}=a.useConfig(),g=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{V()});function V(){a.objectIsEmpty(s.dataset)?a.error({componentName:"VueUiThermometer",type:"dataset"}):a.getMissingDatasetAttributes({datasetObject:s.dataset,requiredAttributes:["value","from","to"]}).forEach(l=>{a.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:l})})}const d=e.ref(a.createUid()),k=e.ref(null),E=e.ref(0),P=e.ref(0),t=e.computed({get:()=>O(),set:l=>l}),{userOptionsVisible:b,setUserOptionsVisibility:$,keepUserOptionState:F}=ae.useUserOptionState({config:t.value});function O(){const l=Y.useNestedProp({userConfig:s.config,defaultConfig:L});return l.theme?{...Y.useNestedProp({userConfig:a.themes.vue_ui_thermometer[l.theme]||s.config,defaultConfig:l}),customPalette:a.themePalettes[l.theme]||a.palette}:l}e.watch(()=>s.config,l=>{t.value=O(),b.value=!t.value.userOptions.showOnChartHover,V(),P.value+=1},{deep:!0});const{isPrinting:S,isImaging:I,generatePdf:q,generateImage:A}=U.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer"}),G=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.computed(()=>a.convertCustomPalette(t.value.customPalette)),H=e.computed(()=>t.value.style.chart.thermometer.width),c=e.computed(()=>s.dataset.steps||10),i=e.ref({top:t.value.style.chart.padding.top,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right,bottom:t.value.style.chart.padding.bottom});function y(l,n,o){const u=[],N=T(l),B=T(n);for(let v=0;v<o;v++){const K=x(N.red,B.red,v,o),Q=x(N.green,B.green,v,o),Z=x(N.blue,B.blue,v,o),ee=`#${C(K)}${C(Q)}${C(Z)}`;u.push(ee)}return u}function T(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 x(l,n,o,u){return Math.round(l+(n-l)*o/u)}function C(l){return l.toString(16).padStart(2,"0")}const r=e.computed(()=>{const l=H.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}}),W=e.computed(()=>r.value),w=e.computed(()=>{const l=a.checkNaN(s.dataset.from)<0?Math.abs(a.checkNaN(s.dataset.from)):a.checkNaN(s.dataset.from),n=a.checkNaN(s.dataset.to)<0?Math.abs(a.checkNaN(s.dataset.to)):a.checkNaN(s.dataset.to);let o=0;return a.checkNaN(s.dataset.to)>0?o=l+n:l>n?o=l-n:o=n-l,(1-(Math.abs(a.checkNaN(s.dataset.from))+a.checkNaN(s.dataset.value))/o)*(r.value.height-i.value.top-i.value.bottom)}),j=e.computed(()=>`${w.value}px`),D=e.computed(()=>`${r.value.height-t.value.style.chart.padding.bottom-i.value.top}px`),R=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),X=e.computed(()=>{if(s.dataset.colors){if(!s.dataset.colors.from)return y(p.value[0]||a.palette[0],a.convertColorToHex(s.dataset.colors.to),c.value||10);if(!s.dataset.colors.to)return y(a.convertColorToHex(s.dataset.colors.from),p.value[1]||a.palette[1],c.value||10)}else return y(p.value[1]||a.palette[1],p.value[0]||a.palette[0],c.value||10);return y(a.convertColorToHex(s.dataset.colors.from),a.convertColorToHex(s.dataset.colors.to),c.value||10)}),M=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:X.value[n],height:o/c.value}),n+=1;return l}),h=e.ref(!1);function J(l){h.value=l,E.value+=1}const f=e.ref(!1);function _(){f.value=!f.value}return z({generatePdf:q,generateImage:A,toggleAnnotator:_}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:k,class:e.normalizeClass(`vue-ui-thermometer ${h.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}`),id:`thermometer__${d.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref($)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref($)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(re.PenAndPaper,{key:0,parent:k.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:f.value,onClose:_},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),G.value?(e.openBlock(),e.createElementBlock("div",ue,null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",ie,[(e.openBlock(),e.createBlock(te._sfc_main,{key:`title_${P.value}`,config:{title:{cy:"thermometer-div-title",...t.value.style.title},subtitle:{cy:"thermometer-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&g.value&&(e.unref(F)||e.unref(b))?(e.openBlock(),e.createBlock(U.UserOptions,{ref:"details",key:`user_options_${E.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(I),isPrinting:e.unref(S),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:f.value,onToggleFullscreen:J,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(A),onToggleAnnotator:_,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(b)?"visible":"hidden":"visible"})},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,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(a.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),width:"100%",viewBox:`0 0 ${r.value.width} ${r.value.height}`,style:"background:transparent"},[e.createVNode(le._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:r.value.width,height:r.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,de)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",he,[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,ve)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.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,pe),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(a.setOpacity)(o.color,100-t.value.style.chart.graduations.gradient.intensity)},null,8,ye),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,fe)],8,me))),256))]),e.createElementVNode("g",ge,[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,ke),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.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,be),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,xe)):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,Ce)):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,we)):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,_e)):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,Ne)):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,Be)):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,Ee)):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:w.value,width:r.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,Pe)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:w.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(a.applyDataLabel)(t.value.style.chart.label.formatter,m.dataset.value,e.unref(a.dataLabel)({p:t.value.style.chart.label.prefix,v:m.dataset.value,s:t.value.style.chart.label.suffix,r:t.value.style.chart.label.rounding}),{datapoint:m.dataset})),11,$e),e.renderSlot(l.$slots,"svg",{svg:W.value},void 0,!0)],10,ce)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Fe,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(S)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Oe,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(oe.default,{key:7,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ne))}},Ie=se._export_sfc(Se,[["__scopeId","data-v-3a4d7c10"]]);exports.default=Ie;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-C_VTEz1N.cjs"),te=require("./Title-DFq_8HYJ.cjs"),U=require("./usePrinter-DWCqeYW6.cjs"),oe=require("./vue-ui-skeleton-D1bJntn7.cjs"),Y=require("./useNestedProp-C7bLHE7v.cjs"),le=require("./PackageVersion-CdmZAhdE.cjs"),re=require("./PenAndPaper-BsncKiRE.cjs"),ae=require("./useUserOptionState-BgepsfED.cjs"),se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ne=["id"],ue={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},ie={key:2,style:"width:100%"},ce=["xmlns","viewBox"],de=["width","height"],he={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},ve=["fill"],me=["id"],pe=["stop-color"],ye=["stop-color"],fe=["stop-color"],ge={"clip-path":"url(#vueUiPill)"},ke=["x","y","height","width"],be=["x","y","height","width","fill"],xe=["x1","x2","y1","y2","stroke-width","stroke"],Ce=["x1","x2","y1","y2","stroke-width","stroke"],we=["x1","x2","y1","y2","stroke-width","stroke"],_e=["x1","x2","y1","y2","stroke-width","stroke"],Ne=["x1","x2","y1","y2","stroke-width","stroke"],Be=["x1","x2","y1","y2","stroke-width","stroke"],Ve=["x1","x2","y1","y2","stroke-width","stroke"],Ee=["x1","x2","y1","y2","stroke-width","stroke"],Pe=["x","y","height","width"],$e=["y","x","fill","font-size","font-weight"],Fe={key:5,class:"vue-data-ui-watermark"},Oe={key:6,ref:"source",dir:"auto"},Se={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:z}){const s=m;e.useCssVars(l=>({"0c45683a":R.value,"2e6db90b":D.value,"399c14b8":j.value}));const{vue_ui_thermometer:L}=a.useConfig(),g=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{V()});function V(){a.objectIsEmpty(s.dataset)?a.error({componentName:"VueUiThermometer",type:"dataset"}):a.getMissingDatasetAttributes({datasetObject:s.dataset,requiredAttributes:["value","from","to"]}).forEach(l=>{a.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:l})})}const d=e.ref(a.createUid()),k=e.ref(null),E=e.ref(0),P=e.ref(0),t=e.computed({get:()=>O(),set:l=>l}),{userOptionsVisible:b,setUserOptionsVisibility:$,keepUserOptionState:F}=ae.useUserOptionState({config:t.value});function O(){const l=Y.useNestedProp({userConfig:s.config,defaultConfig:L});return l.theme?{...Y.useNestedProp({userConfig:a.themes.vue_ui_thermometer[l.theme]||s.config,defaultConfig:l}),customPalette:a.themePalettes[l.theme]||a.palette}:l}e.watch(()=>s.config,l=>{t.value=O(),b.value=!t.value.userOptions.showOnChartHover,V(),P.value+=1},{deep:!0});const{isPrinting:S,isImaging:I,generatePdf:q,generateImage:A}=U.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer"}),G=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.computed(()=>a.convertCustomPalette(t.value.customPalette)),H=e.computed(()=>t.value.style.chart.thermometer.width),c=e.computed(()=>s.dataset.steps||10),i=e.ref({top:t.value.style.chart.padding.top,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right,bottom:t.value.style.chart.padding.bottom});function y(l,n,o){const u=[],N=T(l),B=T(n);for(let v=0;v<o;v++){const K=x(N.red,B.red,v,o),Q=x(N.green,B.green,v,o),Z=x(N.blue,B.blue,v,o),ee=`#${C(K)}${C(Q)}${C(Z)}`;u.push(ee)}return u}function T(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 x(l,n,o,u){return Math.round(l+(n-l)*o/u)}function C(l){return l.toString(16).padStart(2,"0")}const r=e.computed(()=>{const l=H.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}}),W=e.computed(()=>r.value),w=e.computed(()=>{const l=a.checkNaN(s.dataset.from)<0?Math.abs(a.checkNaN(s.dataset.from)):a.checkNaN(s.dataset.from),n=a.checkNaN(s.dataset.to)<0?Math.abs(a.checkNaN(s.dataset.to)):a.checkNaN(s.dataset.to);let o=0;return a.checkNaN(s.dataset.to)>0?o=l+n:l>n?o=l-n:o=n-l,(1-(Math.abs(a.checkNaN(s.dataset.from))+a.checkNaN(s.dataset.value))/o)*(r.value.height-i.value.top-i.value.bottom)}),j=e.computed(()=>`${w.value}px`),D=e.computed(()=>`${r.value.height-t.value.style.chart.padding.bottom-i.value.top}px`),R=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),X=e.computed(()=>{if(s.dataset.colors){if(!s.dataset.colors.from)return y(p.value[0]||a.palette[0],a.convertColorToHex(s.dataset.colors.to),c.value||10);if(!s.dataset.colors.to)return y(a.convertColorToHex(s.dataset.colors.from),p.value[1]||a.palette[1],c.value||10)}else return y(p.value[1]||a.palette[1],p.value[0]||a.palette[0],c.value||10);return y(a.convertColorToHex(s.dataset.colors.from),a.convertColorToHex(s.dataset.colors.to),c.value||10)}),M=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:X.value[n],height:o/c.value}),n+=1;return l}),h=e.ref(!1);function J(l){h.value=l,E.value+=1}const f=e.ref(!1);function _(){f.value=!f.value}return z({generatePdf:q,generateImage:A,toggleAnnotator:_}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:k,class:e.normalizeClass(`vue-ui-thermometer ${h.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}`),id:`thermometer__${d.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref($)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref($)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(re.PenAndPaper,{key:0,parent:k.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:f.value,onClose:_},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),G.value?(e.openBlock(),e.createElementBlock("div",ue,null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",ie,[(e.openBlock(),e.createBlock(te._sfc_main,{key:`title_${P.value}`,config:{title:{cy:"thermometer-div-title",...t.value.style.title},subtitle:{cy:"thermometer-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&g.value&&(e.unref(F)||e.unref(b))?(e.openBlock(),e.createBlock(U.UserOptions,{ref:"details",key:`user_options_${E.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(I),isPrinting:e.unref(S),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:f.value,onToggleFullscreen:J,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(A),onToggleAnnotator:_,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(b)?"visible":"hidden":"visible"})},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,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(a.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),width:"100%",viewBox:`0 0 ${r.value.width} ${r.value.height}`,style:"background:transparent"},[e.createVNode(le._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:r.value.width,height:r.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,de)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",he,[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,ve)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.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,pe),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(a.setOpacity)(o.color,100-t.value.style.chart.graduations.gradient.intensity)},null,8,ye),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,fe)],8,me))),256))]),e.createElementVNode("g",ge,[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,ke),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.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,be),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,xe)):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,Ce)):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,we)):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,_e)):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,Ne)):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,Be)):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,Ee)):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:w.value,width:r.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,Pe)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:w.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(a.applyDataLabel)(t.value.style.chart.label.formatter,m.dataset.value,e.unref(a.dataLabel)({p:t.value.style.chart.label.prefix,v:m.dataset.value,s:t.value.style.chart.label.suffix,r:t.value.style.chart.label.rounding}),{datapoint:m.dataset})),11,$e),e.renderSlot(l.$slots,"svg",{svg:W.value},void 0,!0)],10,ce)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Fe,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(S)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Oe,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(oe.default,{key:7,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ne))}},Ie=se._export_sfc(Se,[["__scopeId","data-v-3a4d7c10"]]);exports.default=Ie;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-C7bLHE7v.cjs"),g=require("./index-C_VTEz1N.cjs"),R=require("./useResponsive-BJ7DTGpm.cjs"),B=require("./BaseIcon-Dk8gByg1.cjs"),j=require("./Title-DFq_8HYJ.cjs"),q=require("./PackageVersion-CdmZAhdE.cjs"),O=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");class U{constructor(P,p,y,T=!0,b=!0){this.interval=p,this.elapsed=0,this.isPaused=!1;const S=`
|
|
2
2
|
let interval;
|
|
3
3
|
let elapsed = 0;
|
|
4
4
|
let paused = false;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ref as n, onMounted as Q, onBeforeUnmount as Y, computed as A, watch as Z, openBlock as l, createElementBlock as o, normalizeStyle as f, createBlock as ee, createCommentVNode as v, unref as te, createVNode as M, renderSlot as z, createElementVNode as C, mergeProps as V, normalizeProps as E, guardReactiveProps as U, toDisplayString as ae } from "vue";
|
|
2
|
-
import { u as se } from "./useNestedProp-
|
|
3
|
-
import { u as le, c as oe, X as re, F as W } from "./index-
|
|
2
|
+
import { u as se } from "./useNestedProp-B3CQkP95.js";
|
|
3
|
+
import { u as le, c as oe, X as re, F as W } from "./index-DiqenHrX.js";
|
|
4
4
|
import { t as ue, u as ie } from "./useResponsive-CoxXLe23.js";
|
|
5
|
-
import P from "./BaseIcon-
|
|
6
|
-
import { _ as ne } from "./Title-
|
|
7
|
-
import { _ as ce } from "./PackageVersion-
|
|
5
|
+
import P from "./BaseIcon-BXpK120h.js";
|
|
6
|
+
import { _ as ne } from "./Title-CiQQgFbV.js";
|
|
7
|
+
import { _ as ce } from "./PackageVersion-iscNRe7N.js";
|
|
8
8
|
import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
9
|
class he {
|
|
10
10
|
constructor(H, k, T, L = !0, $ = !0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-C5bsAL3S.cjs"),c=require("./index--Qj2S12-.cjs"),J=require("./Title-BX4Wt59j.cjs"),j=require("./usePrinter-DOZ7DmEX.cjs"),K=require("./vue-ui-skeleton-BVhUJapg.cjs"),Q=require("./PackageVersion-D3FEDqJ4.cjs"),W=require("./PenAndPaper-0PiYibYi.cjs"),Z=require("./useUserOptionState-BgepsfED.cjs"),ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),te=["id"],oe={key:2,style:"width:100%;background:transparent;padding-bottom:12px"},ae=["xmlns","viewBox"],le=["width","height"],re={key:1},ne=["d","stroke-width","stroke"],se={key:2},ue=["x1","y1","x2","y2","stroke-width","stroke"],ie=["x","y","font-size","fill","font-weight","text-anchor"],ce={key:5,class:"vue-data-ui-watermark"},ve={key:6,ref:"source",dir:"auto"},de={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(G,{expose:H}){const v=G,{vue_ui_tiremarks:D}=c.useConfig(),$=e.computed(()=>!!v.dataset&&Object.keys(v.dataset).length),B=e.ref(c.createUid()),P=e.ref(null),R=e.ref(null),S=e.ref(0),A=e.ref(0),t=e.computed({get:()=>E(),set:o=>o}),{userOptionsVisible:x,setUserOptionsVisibility:N,keepUserOptionState:z}=Z.useUserOptionState({config:t.value});function E(){const o=L.useNestedProp({userConfig:v.config,defaultConfig:D});return o.theme?{...L.useNestedProp({userConfig:c.themes.vue_ui_tiremarks[o.theme]||v.config,defaultConfig:o})}:o}e.watch(()=>v.config,o=>{t.value=E(),x.value=!t.value.userOptions.showOnChartHover,M(),A.value+=1},{deep:!0});const{isPrinting:I,isImaging:F,generatePdf:V,generateImage:q}=j.usePrinter({elementId:B.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks"}),X=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),s=e.ref(t.value.style.chart.animation.use?0:c.checkNaN(v.dataset.percentage));e.watch(()=>v.dataset,o=>{t.value.style.chart.animation.use?T(o.percentage):s.value=o.percentage||0},{deep:!0}),e.onMounted(()=>{M()});function T(o){let n=t.value.style.chart.animation.speed;const a=Math.abs(o-s.value)/(n*120);function r(){s.value<o?s.value=Math.min(s.value+a,o):s.value>o&&(s.value=Math.max(s.value-a,o)),s.value!==o&&requestAnimationFrame(r)}r()}function M(){c.objectIsEmpty(v.dataset)&&c.error({componentName:"VueUiTiremarks",type:"dataset"}),T(v.dataset.percentage||0)}const f=e.computed(()=>t.value.style.chart.layout.display==="vertical"),u=e.computed(()=>{const o={top:48,left:64,right:64,bottom:48};return f.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?o.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?o.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?o.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?o.right:10}}),C=e.computed(()=>Object.values(u.value).reduce((o,n)=>o+n,0)),l=e.computed(()=>({height:f.value?312:56,width:f.value?56:312})),i=e.computed(()=>f.value?{mark:(l.value.height-C.value)/100*.5,space:(l.value.height-C.value)/100*.5}:{mark:(l.value.width-C.value)/100*.5,space:(l.value.width-C.value)/100*.5}),U=e.computed(()=>{const o=[];for(let a=0;a<100;a+=1){const r=t.value.style.chart.layout.ticks.gradient.show?c.shiftHue(t.value.style.chart.layout.activeColor,a/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.activeColor;if(f.value){const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.width-u.value.left-u.value.right)/100/3:0,d=u.value.left+4+y,h=l.value.width-u.value.right-4-y,p=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,m=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,b=t.value.style.chart.layout.curveAngleY*((1+a)/100);o.push({x1:d,x2:h,y1:p,y2:m,curve:`M ${d} ${p} C ${d+k} ${p-b}, ${h-k} ${m-b}, ${h} ${m}`,color:r})}else{const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.height-u.value.top-u.value.bottom)/100/3:0,d=u.value.left+a*i.value.mark+a*i.value.space-i.value.mark,h=d,p=u.value.top+4+y,m=l.value.height-u.value.bottom-4-y,k=t.value.style.chart.layout.curveAngleY*((1+a)/100),b=(m-p)/t.value.style.chart.layout.curveAngleX;o.push({x1:d,x2:h,y1:p,y2:m,curve:`M ${d} ${p} C ${d+k} ${p+b}, ${h+k} ${m-b}, ${h} ${m}`,color:r})}}return o}),g=e.computed(()=>{let o,n,a;const r=t.value.style.chart.percentage.fontSize/3;return f.value?t.value.style.chart.percentage.verticalPosition==="top"?(o=l.value.width/2,n=u.value.top/2,a="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(o=l.value.width/2,n=l.value.height-u.value.bottom/2+r,a="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(o=4,n=l.value.height/2+r,a="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(o=l.value.width-u.value.right+8,n=l.value.height/2+r,a="start"),{x:o,y:n,textAnchor:a,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 Y(o){_.value=o,S.value+=1}const w=e.ref(!1);function O(){w.value=!w.value}return H({generatePdf:V,generateImage:q,toggleAnnotator:O}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:P,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;background:${t.value.style.chart.backgroundColor}`),id:B.value,onMouseenter:n[0]||(n[0]=()=>e.unref(N)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(N)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(W.PenAndPaper,{key:0,parent:P.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:O},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),X.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:R,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",oe,[(e.openBlock(),e.createBlock(J._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value&&(e.unref(z)||e.unref(x))?(e.openBlock(),e.createBlock(j.UserOptions,{ref:"details",key:`user_options_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(I),isImaging:e.unref(F),uid:B.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:P.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:Y,onGeneratePdf:e.unref(V),onGenerateImage:e.unref(q),onToggleAnnotator:O,style:e.normalizeStyle({visibility:e.unref(z)?e.unref(x)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"2"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Q._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,le)):e.createCommentVNode("",!0),t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(a,r)=>(e.openBlock(),e.createElementBlock("path",{d:a.curve,"stroke-width":i.value.mark,stroke:s.value>=r?a.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<=s.value})},null,10,ne))),256))])):(e.openBlock(),e.createElementBlock("g",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(a,r)=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,"stroke-width":i.value.mark,stroke:s.value>=r?a.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,ue))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:3,x:g.value.x,y:g.value.y,"font-size":g.value.fontSize,fill:t.value.style.chart.layout.ticks.gradient.show&&t.value.style.chart.percentage.useGradientColor?e.unref(c.shiftHue)(t.value.style.chart.layout.activeColor,s.value/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.percentage.color,"font-weight":g.value.bold?"bold":"normal","text-anchor":g.value.textAnchor},e.toDisplayString(e.unref(c.applyDataLabel)(t.value.style.chart.percentage.formatter,s.value,e.unref(c.dataLabel)({v:s.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,ie)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:l.value},void 0,!0)],14,ae)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ce,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(I)||e.unref(F)})),void 0,!0)])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",ve,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(K.default,{key:7,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],46,te))}},he=ee._export_sfc(de,[["__scopeId","data-v-a7a6c0cb"]]);exports.default=he;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-C7bLHE7v.cjs"),c=require("./index-C_VTEz1N.cjs"),J=require("./Title-DFq_8HYJ.cjs"),j=require("./usePrinter-DWCqeYW6.cjs"),K=require("./vue-ui-skeleton-D1bJntn7.cjs"),Q=require("./PackageVersion-CdmZAhdE.cjs"),W=require("./PenAndPaper-BsncKiRE.cjs"),Z=require("./useUserOptionState-BgepsfED.cjs"),ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),te=["id"],oe={key:2,style:"width:100%;background:transparent;padding-bottom:12px"},ae=["xmlns","viewBox"],le=["width","height"],re={key:1},ne=["d","stroke-width","stroke"],se={key:2},ue=["x1","y1","x2","y2","stroke-width","stroke"],ie=["x","y","font-size","fill","font-weight","text-anchor"],ce={key:5,class:"vue-data-ui-watermark"},ve={key:6,ref:"source",dir:"auto"},de={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(G,{expose:H}){const v=G,{vue_ui_tiremarks:D}=c.useConfig(),$=e.computed(()=>!!v.dataset&&Object.keys(v.dataset).length),B=e.ref(c.createUid()),P=e.ref(null),R=e.ref(null),S=e.ref(0),A=e.ref(0),t=e.computed({get:()=>E(),set:o=>o}),{userOptionsVisible:x,setUserOptionsVisibility:N,keepUserOptionState:z}=Z.useUserOptionState({config:t.value});function E(){const o=L.useNestedProp({userConfig:v.config,defaultConfig:D});return o.theme?{...L.useNestedProp({userConfig:c.themes.vue_ui_tiremarks[o.theme]||v.config,defaultConfig:o})}:o}e.watch(()=>v.config,o=>{t.value=E(),x.value=!t.value.userOptions.showOnChartHover,M(),A.value+=1},{deep:!0});const{isPrinting:I,isImaging:F,generatePdf:V,generateImage:q}=j.usePrinter({elementId:B.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks"}),X=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),s=e.ref(t.value.style.chart.animation.use?0:c.checkNaN(v.dataset.percentage));e.watch(()=>v.dataset,o=>{t.value.style.chart.animation.use?T(o.percentage):s.value=o.percentage||0},{deep:!0}),e.onMounted(()=>{M()});function T(o){let n=t.value.style.chart.animation.speed;const a=Math.abs(o-s.value)/(n*120);function r(){s.value<o?s.value=Math.min(s.value+a,o):s.value>o&&(s.value=Math.max(s.value-a,o)),s.value!==o&&requestAnimationFrame(r)}r()}function M(){c.objectIsEmpty(v.dataset)&&c.error({componentName:"VueUiTiremarks",type:"dataset"}),T(v.dataset.percentage||0)}const f=e.computed(()=>t.value.style.chart.layout.display==="vertical"),u=e.computed(()=>{const o={top:48,left:64,right:64,bottom:48};return f.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?o.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?o.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?o.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?o.right:10}}),C=e.computed(()=>Object.values(u.value).reduce((o,n)=>o+n,0)),l=e.computed(()=>({height:f.value?312:56,width:f.value?56:312})),i=e.computed(()=>f.value?{mark:(l.value.height-C.value)/100*.5,space:(l.value.height-C.value)/100*.5}:{mark:(l.value.width-C.value)/100*.5,space:(l.value.width-C.value)/100*.5}),U=e.computed(()=>{const o=[];for(let a=0;a<100;a+=1){const r=t.value.style.chart.layout.ticks.gradient.show?c.shiftHue(t.value.style.chart.layout.activeColor,a/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.activeColor;if(f.value){const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.width-u.value.left-u.value.right)/100/3:0,d=u.value.left+4+y,h=l.value.width-u.value.right-4-y,p=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,m=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,b=t.value.style.chart.layout.curveAngleY*((1+a)/100);o.push({x1:d,x2:h,y1:p,y2:m,curve:`M ${d} ${p} C ${d+k} ${p-b}, ${h-k} ${m-b}, ${h} ${m}`,color:r})}else{const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.height-u.value.top-u.value.bottom)/100/3:0,d=u.value.left+a*i.value.mark+a*i.value.space-i.value.mark,h=d,p=u.value.top+4+y,m=l.value.height-u.value.bottom-4-y,k=t.value.style.chart.layout.curveAngleY*((1+a)/100),b=(m-p)/t.value.style.chart.layout.curveAngleX;o.push({x1:d,x2:h,y1:p,y2:m,curve:`M ${d} ${p} C ${d+k} ${p+b}, ${h+k} ${m-b}, ${h} ${m}`,color:r})}}return o}),g=e.computed(()=>{let o,n,a;const r=t.value.style.chart.percentage.fontSize/3;return f.value?t.value.style.chart.percentage.verticalPosition==="top"?(o=l.value.width/2,n=u.value.top/2,a="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(o=l.value.width/2,n=l.value.height-u.value.bottom/2+r,a="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(o=4,n=l.value.height/2+r,a="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(o=l.value.width-u.value.right+8,n=l.value.height/2+r,a="start"),{x:o,y:n,textAnchor:a,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 Y(o){_.value=o,S.value+=1}const w=e.ref(!1);function O(){w.value=!w.value}return H({generatePdf:V,generateImage:q,toggleAnnotator:O}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:P,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;background:${t.value.style.chart.backgroundColor}`),id:B.value,onMouseenter:n[0]||(n[0]=()=>e.unref(N)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(N)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(W.PenAndPaper,{key:0,parent:P.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:O},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),X.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:R,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",oe,[(e.openBlock(),e.createBlock(J._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value&&(e.unref(z)||e.unref(x))?(e.openBlock(),e.createBlock(j.UserOptions,{ref:"details",key:`user_options_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(I),isImaging:e.unref(F),uid:B.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:P.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:Y,onGeneratePdf:e.unref(V),onGenerateImage:e.unref(q),onToggleAnnotator:O,style:e.normalizeStyle({visibility:e.unref(z)?e.unref(x)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"2"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Q._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,le)):e.createCommentVNode("",!0),t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(a,r)=>(e.openBlock(),e.createElementBlock("path",{d:a.curve,"stroke-width":i.value.mark,stroke:s.value>=r?a.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<=s.value})},null,10,ne))),256))])):(e.openBlock(),e.createElementBlock("g",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(a,r)=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,"stroke-width":i.value.mark,stroke:s.value>=r?a.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,ue))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:3,x:g.value.x,y:g.value.y,"font-size":g.value.fontSize,fill:t.value.style.chart.layout.ticks.gradient.show&&t.value.style.chart.percentage.useGradientColor?e.unref(c.shiftHue)(t.value.style.chart.layout.activeColor,s.value/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.percentage.color,"font-weight":g.value.bold?"bold":"normal","text-anchor":g.value.textAnchor},e.toDisplayString(e.unref(c.applyDataLabel)(t.value.style.chart.percentage.formatter,s.value,e.unref(c.dataLabel)({v:s.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,ie)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:l.value},void 0,!0)],14,ae)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ce,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(I)||e.unref(F)})),void 0,!0)])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",ve,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(K.default,{key:7,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],46,te))}},he=ee._export_sfc(de,[["__scopeId","data-v-a7a6c0cb"]]);exports.default=he;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { computed as h, ref as k, watch as W, onMounted as ie, openBlock as s, createElementBlock as c, normalizeClass as U, normalizeStyle as G, unref as n, createBlock as I, createCommentVNode as d, createSlots as ce, withCtx as F, renderSlot as b, normalizeProps as L, guardReactiveProps as j, createVNode as ve, Fragment as Z, renderList as ee, toDisplayString as he } from "vue";
|
|
2
|
-
import { u as te } from "./useNestedProp-
|
|
3
|
-
import { u as de, c as fe, t as pe, v as ye, o as ge, e as me, w as ae, X as ke, i as be, f as _e } from "./index-
|
|
4
|
-
import { _ as Ce } from "./Title-
|
|
5
|
-
import { u as $e, U as we } from "./usePrinter-
|
|
6
|
-
import xe from "./vue-ui-skeleton-
|
|
7
|
-
import { _ as Pe } from "./PackageVersion-
|
|
8
|
-
import { P as Oe } from "./PenAndPaper-
|
|
2
|
+
import { u as te } from "./useNestedProp-B3CQkP95.js";
|
|
3
|
+
import { u as de, c as fe, t as pe, v as ye, o as ge, e as me, w as ae, X as ke, i as be, f as _e } from "./index-DiqenHrX.js";
|
|
4
|
+
import { _ as Ce } from "./Title-CiQQgFbV.js";
|
|
5
|
+
import { u as $e, U as we } from "./usePrinter-CHAgX1f-.js";
|
|
6
|
+
import xe from "./vue-ui-skeleton-BwWHgSoq.js";
|
|
7
|
+
import { _ as Pe } from "./PackageVersion-iscNRe7N.js";
|
|
8
|
+
import { P as Oe } from "./PenAndPaper-B-VQ8eSo.js";
|
|
9
9
|
import { u as Ae } from "./useUserOptionState-BIvW1Kz7.js";
|
|
10
10
|
import { _ as Ie } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
11
|
const Fe = ["id"], ze = {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { useSlots as at, onMounted as Ie, computed as w, ref as p, watch as nt, onBeforeUnmount as st, openBlock as g, createElementBlock as k, normalizeClass as Le, normalizeStyle as D, unref as y, createBlock as E, createCommentVNode as S, createSlots as rt, withCtx as T, renderSlot as $, normalizeProps as G, guardReactiveProps as q, createVNode as Re, Fragment as De, renderList as Me, createElementVNode as N, toDisplayString as Y, createTextVNode as Ve, nextTick as ut, pushScopeId as it, popScopeId as ct } from "vue";
|
|
2
|
-
import { u as dt, c as Ue, t as vt, a as ht, p as O, b as pt, o as ft, e as gt, d as ae, i as ne, f as K, X as yt, l as Be, G as He, x as We, y as mt, q as bt, r as wt } from "./index-
|
|
3
|
-
import { _ as kt } from "./Title-
|
|
4
|
-
import { u as Ct, U as $t } from "./usePrinter-
|
|
5
|
-
import { _ as xt } from "./Tooltip-
|
|
6
|
-
import { L as Tt } from "./Legend-
|
|
7
|
-
import Ot from "./vue-ui-skeleton-
|
|
8
|
-
import { D as _t } from "./DataTable-
|
|
9
|
-
import St from "./vue-ui-accordion-
|
|
2
|
+
import { u as dt, c as Ue, t as vt, a as ht, p as O, b as pt, o as ft, e as gt, d as ae, i as ne, f as K, X as yt, l as Be, G as He, x as We, y as mt, q as bt, r as wt } from "./index-DiqenHrX.js";
|
|
3
|
+
import { _ as kt } from "./Title-CiQQgFbV.js";
|
|
4
|
+
import { u as Ct, U as $t } from "./usePrinter-CHAgX1f-.js";
|
|
5
|
+
import { _ as xt } from "./Tooltip-ZYQUXVWv.js";
|
|
6
|
+
import { L as Tt } from "./Legend-DqRstaxU.js";
|
|
7
|
+
import Ot from "./vue-ui-skeleton-BwWHgSoq.js";
|
|
8
|
+
import { D as _t } from "./DataTable-CpOh1tx3.js";
|
|
9
|
+
import St from "./vue-ui-accordion-DA6XnWaz.js";
|
|
10
10
|
import { t as Nt, u as zt } from "./useResponsive-CoxXLe23.js";
|
|
11
|
-
import { u as Ee } from "./useNestedProp-
|
|
12
|
-
import { _ as Pt } from "./PackageVersion-
|
|
13
|
-
import { P as At } from "./PenAndPaper-
|
|
11
|
+
import { u as Ee } from "./useNestedProp-B3CQkP95.js";
|
|
12
|
+
import { _ as Pt } from "./PackageVersion-iscNRe7N.js";
|
|
13
|
+
import { P as At } from "./PenAndPaper-B-VQ8eSo.js";
|
|
14
14
|
import { u as Ft } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
15
|
import { _ as It } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
16
|
function Ge(a, c) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index--Qj2S12-.cjs"),Ee=require("./Title-BX4Wt59j.cjs"),ye=require("./usePrinter-DOZ7DmEX.cjs"),Le=require("./Tooltip-BRF0SCJo.cjs"),Ae=require("./Legend-_VSW3gtH.cjs"),Fe=require("./vue-ui-skeleton-BVhUJapg.cjs"),Re=require("./DataTable-CvEk_3ue.cjs"),Ie=require("./vue-ui-accordion-BFGSPdZa.cjs"),be=require("./useResponsive-BJ7DTGpm.cjs"),ke=require("./useNestedProp-C5bsAL3S.cjs"),De=require("./PackageVersion-D3FEDqJ4.cjs"),qe=require("./PenAndPaper-0PiYibYi.cjs"),Me=require("./useUserOptionState-BgepsfED.cjs"),He=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function Ce(n,v){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,d=-1/0,p=0;for(let g=0;g<s;g+=1){const h=n[g].normalizedValue;h<u&&(u=h),h>d&&(d=h),p+=h}return Math.max(v**2*d/p**2,p**2/(v**2*u))}}function we(n){const{xOffset:v,yOffset:s,width:u,height:d}=n;return{x0:v,y0:s,x1:v+u,y1:s+d}}function Ue(n,v,s){if(n.length===0)return!0;{const u=n.concat(v),d=Ce(n,s),p=Ce(u,s);return d>=p}}function We(n){const v=[],s=n.length;for(let u=0;u<s;u+=1){const d=n[u],p=d.length;for(let c=0;c<p;c+=1)v.push(d[c])}return v}function Ge(n,v){const s={...v,children:n};return Te(s)}function je(n){return(n.x1-n.x0)*(n.y1-n.y0)}function xe(n,v){const{width:s,height:u,xOffset:d,yOffset:p}=Y(v),c=n.length,g=n.map(f=>f.normalizedValue||0).reduce((f,y)=>f+y,0),h=g/u,w=g/s;let C=d,b=p;const k=[];if(s>=u){for(let f=0;f<c;f+=1){const y=n[f],x=b+y.normalizedValue/h,O={x0:C,y0:b,x1:C+h,y1:x},T=Object.assign({},y,O);b=x,k.push(T)}return k}else{for(let f=0;f<c;f+=1){const y=n[f],x=C+y.normalizedValue/w,O={x0:C,y0:b,x1:x,y1:b+w},T=Object.assign({},y,O);C=x,k.push(T)}return k}}function Xe(n){const v=Y(n),s=v.width,u=v.height;return Math.min(s,u)}function Ye(n,v){const s=n.length,u=n.map(h=>h.value??0).reduce((h,w)=>h+w,0),d=v/u,p=[];let c,g;for(let h=0;h<s;h+=1)g=n[h],c=Object.assign({},g,{normalizedValue:g.value*(d||0)}),p.push(c);return p}function Y(n){const{x0:v,y0:s,x1:u,y1:d}=n;return{xOffset:v,yOffset:s,width:u-v,height:d-s}}function Ze(n,v,s,u){let d=n,p=v,c=s,g=u;for(;;){const h=d.length;if(h===0){const k=xe(p,c);return g.concat(k)}const w=Xe(c),C=d[0],b=d.slice(1,h);if(Ue(p,C,w)){const k=p.concat(C);d=b,p=k,c=c,g=g}else{const k=p.length;let f=0;for(let T=0;T<k;T+=1)f+=p[T].normalizedValue;const y=Je(c,f),x=xe(p,c),O=g.concat(x);d=d,p=[],c=y,g=O}}}function Te(n){if(typeof n.children>"u"||!n.children.length)return[n];{const v=Ye(n.children,je(n)),s=Ze(v,[],n,[]),u=s.length,d=[];for(let c=0;c<u;c+=1)d.push(Te(s[c]));return We(d)}}function Je(n,v){const{width:s,height:u,xOffset:d,yOffset:p}=Y(n);if(s>=u){const c=v/u,g=s-c,h={xOffset:d+c,yOffset:p,width:g,height:u};return we(h)}else{const c=v/s,g=u-c,h={xOffset:d,yOffset:p+c,width:s,height:g};return we(h)}}const Ke=n=>(e.pushScopeId("data-v-f3bac1ee"),n=n(),e.popScopeId(),n),Qe=["id"],et=["xmlns","viewBox"],tt={key:0},ot=["id"],lt=["stop-color"],at=["stop-color"],nt=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],rt=["x","y","height","width"],ut={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},st=Ke(()=>e.createElementVNode("br",null,null,-1)),it={key:5,class:"vue-data-ui-watermark"},ct=["onClick"],dt={key:0},vt={key:1},ht=["innerHTML"],pt={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(n,{expose:v,emit:s}){const u=n,{vue_ui_treemap:d}=r.useConfig(),p=e.useSlots();e.onMounted(()=>{p["chart-background"]&&console.warn("VueUiTreemap does not support the #chart-background slot.")});const c=e.computed(()=>!!u.dataset&&u.dataset.length),g=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),h=e.ref(r.createUid()),w=e.ref(!1),C=e.ref(""),b=e.ref(!1),k=e.ref(0),f=e.ref([]),y=e.ref(null),x=e.ref(null),O=e.ref(null),T=e.ref(null),Z=e.ref(null),J=e.ref(0),K=e.ref(0),Q=e.ref(0),t=e.computed({get:()=>oe(),set:o=>o}),{userOptionsVisible:U,setUserOptionsVisibility:ee,keepUserOptionState:te}=Me.useUserOptionState({config:t.value});function oe(){const o=ke.useNestedProp({userConfig:u.config,defaultConfig:d});return o.theme?{...ke.useNestedProp({userConfig:r.themes.vue_ui_treemap[o.theme]||u.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}e.watch(()=>u.config,o=>{t.value=oe(),U.value=!t.value.userOptions.showOnChartHover,J.value+=1,K.value+=1,Q.value+=1,S.value.showTable=t.value.table.show,S.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:le,isImaging:ae,generatePdf:ne,generateImage:re}=ye.usePrinter({elementId:`treemap_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-treemap"}),Se=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),I=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),S=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),P=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),z=e.computed(()=>({bottom:P.value.height-t.value.style.chart.padding.bottom,height:P.value.height-t.value.style.chart.padding.top-t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:P.value.width-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,vbHeight:P.value.height,vbWidth:P.value.width,width:P.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right}));function ue(o){o.forEach((a,l)=>{a.id=r.createUid(),a.color=r.convertColorToHex(a.color)||I.value[l]||r.palette[l]||r.palette[l%r.palette.length],a.children&&(a.children.forEach(i=>{i.parentId=a.id,i.color=a.color}),ue(a.children))})}const V=e.ref(u.dataset),D=e.ref(null);e.onMounted(()=>{$e()});function $e(){if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiTreemap",type:"dataset"}),ue(V.value),t.value.responsive){const o=be.throttle(()=>{const{width:a,height:l}=be.useResponsive({chart:y.value,title:t.value.style.chart.title.text?x.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:T.value,noTitle:Z.value});requestAnimationFrame(()=>{P.value.width=a,P.value.height=l})});D.value=new ResizeObserver(o),D.value.observe(y.value.parentNode)}}e.onBeforeUnmount(()=>{D.value&&D.value.disconnect()});const W=e.ref(V.value),F=e.computed(()=>W.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||I.value[a]||r.palette[a]||r.palette[a%r.palette.length]})).filter(o=>!f.value.includes(o.id))),L=e.computed(()=>V.value.filter(o=>!f.value.includes(o.id)).map(o=>o.value||0).reduce((o,a)=>o+a,0)),se=e.computed({get(){let o=[...F.value];return t.value.style.chart.layout.sorted&&(o=[...F.value].sort((a,l)=>l.value-a.value)),o.map(a=>({...a}))},set(o){return o}});function ie(o,a){return o.value/a}function Ne(o,a,l){const i=t.value.style.chart.layout.rects.colorRatio-ie(a,l);return r.lightenHexColor(o,i<0?0:i)}function ce(o,a,l,i){return o.map((m,_)=>{const H=Ne(r.convertColorToHex(a)||I.value[_]||r.palette[_]||r.palette[_%r.palette.length],m,i),Ve=ie(m,i);return{...m,color:H,proportion:Ve,parentName:l,children:m.children?ce(m.children,H,m.name,i):void 0}})}const R=e.computed(()=>Ge(se.value.map((o,a)=>{const l=o.children?o.children.reduce((i,m)=>i+m.value,0):o.value;return{value:o.value,id:o.id,children:o.children?ce(o.children.sort((i,m)=>m.value-i.value),o.color,o.name,l):void 0,color:o.color,name:o.name}}),{x0:z.value.left*2,y0:z.value.top,x1:z.value.width,y1:z.value.height}));function de({y0:o,y1:a}){return a-o<=0?1e-4:a-o}function ve({x0:o,x1:a}){return a-o<=0?1e-4:a-o}function E(o){const a=t.value.style.chart.layout.labels.fontSize*(o.proportion*2>1?1:o.proportion*2);return a<t.value.style.chart.layout.labels.minFontSize?t.value.style.chart.layout.labels.minFontSize:a}function Be(o){b.value=o,k.value+=1}const A=e.computed(()=>({startX:0,startY:0,width:z.value.vbWidth,height:z.value.vbHeight})),$=e.ref(!1);function G(o,a=V.value){for(const l of a){if(l.id===o)return l;if(l.children){const i=G(o,l.children);if(i)return i}}return null}function Oe(o){if($.value)s("selectDatapoint",void 0),W.value=V.value;else{if(s("selectDatapoint",o),!G(o.parentId))return;W.value=[G(o.parentId)]}$.value=!$.value}const N=e.ref(null),he=e.computed(()=>V.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||I.value[a]||r.palette[a]||r.palette[a%r.palette.length],shape:"square"})).sort((o,a)=>a.value-o.value).map((o,a)=>({...o,proportion:o.value/V.value.map(l=>l.value).reduce((l,i)=>l+i,0),opacity:f.value.includes(o.id)?.5:1}))),Pe=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 pe(o){$.value=!1,N.value=null,f.value.includes(o.id)?f.value=f.value.filter(a=>a!==o.id):f.value.length<u.dataset.length-1&&f.value.push(o.id),s("selectLegend",se.value)}const j=e.ref(null);function _e({datapoint:o,seriesIndex:a}){N.value=o,j.value={datapoint:o,seriesIndex:a,config:t.value,series:F.value};const l=t.value.style.chart.tooltip.customFormat;if(r.isFunction(l)&&r.functionReturnsString(()=>l({seriesIndex:a,datapoint:o,series:F.value,config:t.value})))C.value=l({seriesIndex:a,datapoint:o,series:F.value,config:t.value});else{let i="";i+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,i+=`<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="${o.color}"/></svg>`,i+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.formatter,o.value,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.tooltip.roundingValue}),{datapoint:o,seriesIndex:a})}</b>`,C.value=`<div>${i}</div>`}w.value=!0}const B=e.computed(()=>{const o=R.value.map(l=>({name:l.name,color:l.color})),a=R.value.map(l=>l.value);return{head:o,body:a}});function fe(){e.nextTick(()=>{const o=B.value.head.map((i,m)=>[[i.name],[B.value.body[m]],[isNaN(B.value.body[m]/L.value)?"-":B.value.body[m]/L.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=r.createCsvContent(a);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-treemap"})})}const q=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],a=B.value.head.map((m,_)=>{const H=r.applyDataLabel(t.value.style.chart.layout.labels.formatter,B.value.body[_],r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:B.value.body[_],s:t.value.style.chart.layout.labels.suffix,r:t.value.table.td.roundingValue}));return[{color:m.color,name:m.name,shape:"square"},H,isNaN(B.value.body[_]/L.value)?"-":r.dataLabel({v:B.value.body[_]/L.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),l={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:o,body:a,config:l}});function ze(){return R.value}function ge(){S.value.showTable=!S.value.showTable}function me(){S.value.showTooltip=!S.value.showTooltip}const M=e.ref(!1);function X(){M.value=!M.value}return v({getData:ze,generateCsv:fe,generateImage:re,generatePdf:ne,toggleTable:ge,toggleTooltip:me,toggleAnnotator:X}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:y,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;background:${t.value.style.chart.backgroundColor}`),id:`treemap_${h.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(ee)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(ee)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(qe.PenAndPaper,{key:0,parent:y.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:M.value,onClose:X},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),Se.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:Z,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:x,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)},[(e.openBlock(),e.createBlock(Ee._sfc_main,{key:`title_${J.value}`,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&&c.value&&(e.unref(te)||e.unref(U))?(e.openBlock(),e.createBlock(ye.UserOptions,{ref:"details",key:`user_option_${k.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(le),isImaging:e.unref(ae),uid:h.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:S.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:y.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:M.value,onToggleFullscreen:Be,onGeneratePdf:e.unref(ne),onGenerateCsv:fe,onGenerateImage:e.unref(re),onToggleTable:ge,onToggleTooltip:me,onToggleAnnotator:X,style:e.normalizeStyle({visibility:e.unref(te)?e.unref(U)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:i})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:i})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:4,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:`${A.value.startX} ${A.value.startY} ${A.value.width<=0?10:A.value.width} ${A.value.height<=0?10:A.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(De._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",tt,[e.createElementVNode("radialGradient",{id:`tgrad_${l.id}`,gradientTransform:"translate(-1, -1.000001) scale(2, 2)"},[e.createElementVNode("stop",{offset:"18%","stop-color":l.color},null,8,lt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.lightenHexColor)(l.color,t.value.style.chart.layout.rects.gradient.intensity/100)},null,8,at)],8,ot)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:de(l),width:ve(l),fill:g.value?l.color:t.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${l.id})`:l.color,rx:t.value.style.chart.layout.rects.borderRadius,stroke:N.value&&N.value.id===l.id?t.value.style.chart.layout.rects.selected.stroke:t.value.style.chart.layout.rects.stroke,"stroke-width":N.value&&N.value.id===l.id?t.value.style.chart.layout.rects.selected.strokeWidth:t.value.style.chart.layout.rects.strokeWidth,onClick:m=>Oe(l),onMouseenter:()=>_e({datapoint:l,seriesIndex:i}),onMouseleave:a[0]||(a[0]=m=>{N.value=null,w.value=!1}),style:e.normalizeStyle(`opacity:${N.value?N.value.id===l.id?1:t.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:"vue-ui-treemap-rect"},null,44,nt),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:de(l),width:ve(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",ut,[t.value.style.chart.layout.labels.showDefaultLabels&&(l.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% - ${E(l)/1.5}px);text-align:left;line-height:${E(l)<14?14:E(l)}px;padding:${E(l)/3}px; color:${e.unref(r.adaptColorToBackground)(l.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${E(l)}px;`)},e.toDisplayString(l.name),5),st,e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${E(l)}px;`)},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,l.value,e.unref(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.layout.labels.rounding}),{datapoint:l})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"rect",e.normalizeProps(e.guardReactiveProps({rect:l,shouldShow:l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||$.value,fontSize:E(l),isZoom:$.value,textColor:e.unref(r.adaptColorToBackground)(l.color)})),void 0,!0)])],8,rt))]))),256)),e.renderSlot(o.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:z.value,isZoom:$.value,rect:N.value,config:t.value})),void 0,!0)],14,et)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",it,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(le)||e.unref(ae)})),void 0,!0)])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Fe.default,{key:6,config:{type:"treemap",style:{backgroundColor:t.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:O},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ae.Legend,{key:`legend_${Q.value}`,legendSet:he.value,config:Pe.value,id:`treemap_legend_${h.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>pe(l))},{item:e.withCtx(({legend:l,index:i})=>[e.createElementVNode("div",{onClick:m=>pe(l),style:e.normalizeStyle(`opacity:${f.value.includes(l.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,l.value,e.unref(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.legend.roundingValue}),{datapoint:l}))+" ",1),f.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",vt," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",dt," ("+e.toDisplayString(isNaN(l.value/L.value)?"-":(l.value/L.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,ct)]),_:1},8,["legendSet","config","id"])):e.renderSlot(o.$slots,"legend",{key:1,legend:he.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:T,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Le._sfc_main,{show:S.value.showTooltip&&w.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:y.value,content:C.value,isFullscreen:b.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),c.value?(e.openBlock(),e.createBlock(Ie.default,{key:8,hideDetails:"",config:{open:S.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Re.DataTable,{key:`table_${K.value}`,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]=l=>S.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,ht)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Qe))}},ft=He._export_sfc(pt,[["__scopeId","data-v-f3bac1ee"]]);exports.default=ft;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-C_VTEz1N.cjs"),Ee=require("./Title-DFq_8HYJ.cjs"),ye=require("./usePrinter-DWCqeYW6.cjs"),Le=require("./Tooltip-pcZXVRMj.cjs"),Ae=require("./Legend-Dh9aF6uH.cjs"),Fe=require("./vue-ui-skeleton-D1bJntn7.cjs"),Re=require("./DataTable-D93-QmC8.cjs"),Ie=require("./vue-ui-accordion-CtBhoUw4.cjs"),be=require("./useResponsive-BJ7DTGpm.cjs"),ke=require("./useNestedProp-C7bLHE7v.cjs"),De=require("./PackageVersion-CdmZAhdE.cjs"),qe=require("./PenAndPaper-BsncKiRE.cjs"),Me=require("./useUserOptionState-BgepsfED.cjs"),He=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function Ce(n,v){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,d=-1/0,p=0;for(let g=0;g<s;g+=1){const h=n[g].normalizedValue;h<u&&(u=h),h>d&&(d=h),p+=h}return Math.max(v**2*d/p**2,p**2/(v**2*u))}}function we(n){const{xOffset:v,yOffset:s,width:u,height:d}=n;return{x0:v,y0:s,x1:v+u,y1:s+d}}function Ue(n,v,s){if(n.length===0)return!0;{const u=n.concat(v),d=Ce(n,s),p=Ce(u,s);return d>=p}}function We(n){const v=[],s=n.length;for(let u=0;u<s;u+=1){const d=n[u],p=d.length;for(let c=0;c<p;c+=1)v.push(d[c])}return v}function Ge(n,v){const s={...v,children:n};return Te(s)}function je(n){return(n.x1-n.x0)*(n.y1-n.y0)}function xe(n,v){const{width:s,height:u,xOffset:d,yOffset:p}=Y(v),c=n.length,g=n.map(f=>f.normalizedValue||0).reduce((f,y)=>f+y,0),h=g/u,w=g/s;let C=d,b=p;const k=[];if(s>=u){for(let f=0;f<c;f+=1){const y=n[f],x=b+y.normalizedValue/h,O={x0:C,y0:b,x1:C+h,y1:x},T=Object.assign({},y,O);b=x,k.push(T)}return k}else{for(let f=0;f<c;f+=1){const y=n[f],x=C+y.normalizedValue/w,O={x0:C,y0:b,x1:x,y1:b+w},T=Object.assign({},y,O);C=x,k.push(T)}return k}}function Xe(n){const v=Y(n),s=v.width,u=v.height;return Math.min(s,u)}function Ye(n,v){const s=n.length,u=n.map(h=>h.value??0).reduce((h,w)=>h+w,0),d=v/u,p=[];let c,g;for(let h=0;h<s;h+=1)g=n[h],c=Object.assign({},g,{normalizedValue:g.value*(d||0)}),p.push(c);return p}function Y(n){const{x0:v,y0:s,x1:u,y1:d}=n;return{xOffset:v,yOffset:s,width:u-v,height:d-s}}function Ze(n,v,s,u){let d=n,p=v,c=s,g=u;for(;;){const h=d.length;if(h===0){const k=xe(p,c);return g.concat(k)}const w=Xe(c),C=d[0],b=d.slice(1,h);if(Ue(p,C,w)){const k=p.concat(C);d=b,p=k,c=c,g=g}else{const k=p.length;let f=0;for(let T=0;T<k;T+=1)f+=p[T].normalizedValue;const y=Je(c,f),x=xe(p,c),O=g.concat(x);d=d,p=[],c=y,g=O}}}function Te(n){if(typeof n.children>"u"||!n.children.length)return[n];{const v=Ye(n.children,je(n)),s=Ze(v,[],n,[]),u=s.length,d=[];for(let c=0;c<u;c+=1)d.push(Te(s[c]));return We(d)}}function Je(n,v){const{width:s,height:u,xOffset:d,yOffset:p}=Y(n);if(s>=u){const c=v/u,g=s-c,h={xOffset:d+c,yOffset:p,width:g,height:u};return we(h)}else{const c=v/s,g=u-c,h={xOffset:d,yOffset:p+c,width:s,height:g};return we(h)}}const Ke=n=>(e.pushScopeId("data-v-f3bac1ee"),n=n(),e.popScopeId(),n),Qe=["id"],et=["xmlns","viewBox"],tt={key:0},ot=["id"],lt=["stop-color"],at=["stop-color"],nt=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],rt=["x","y","height","width"],ut={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},st=Ke(()=>e.createElementVNode("br",null,null,-1)),it={key:5,class:"vue-data-ui-watermark"},ct=["onClick"],dt={key:0},vt={key:1},ht=["innerHTML"],pt={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(n,{expose:v,emit:s}){const u=n,{vue_ui_treemap:d}=r.useConfig(),p=e.useSlots();e.onMounted(()=>{p["chart-background"]&&console.warn("VueUiTreemap does not support the #chart-background slot.")});const c=e.computed(()=>!!u.dataset&&u.dataset.length),g=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),h=e.ref(r.createUid()),w=e.ref(!1),C=e.ref(""),b=e.ref(!1),k=e.ref(0),f=e.ref([]),y=e.ref(null),x=e.ref(null),O=e.ref(null),T=e.ref(null),Z=e.ref(null),J=e.ref(0),K=e.ref(0),Q=e.ref(0),t=e.computed({get:()=>oe(),set:o=>o}),{userOptionsVisible:U,setUserOptionsVisibility:ee,keepUserOptionState:te}=Me.useUserOptionState({config:t.value});function oe(){const o=ke.useNestedProp({userConfig:u.config,defaultConfig:d});return o.theme?{...ke.useNestedProp({userConfig:r.themes.vue_ui_treemap[o.theme]||u.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}e.watch(()=>u.config,o=>{t.value=oe(),U.value=!t.value.userOptions.showOnChartHover,J.value+=1,K.value+=1,Q.value+=1,S.value.showTable=t.value.table.show,S.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:le,isImaging:ae,generatePdf:ne,generateImage:re}=ye.usePrinter({elementId:`treemap_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-treemap"}),Se=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),I=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),S=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),P=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),z=e.computed(()=>({bottom:P.value.height-t.value.style.chart.padding.bottom,height:P.value.height-t.value.style.chart.padding.top-t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:P.value.width-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,vbHeight:P.value.height,vbWidth:P.value.width,width:P.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right}));function ue(o){o.forEach((a,l)=>{a.id=r.createUid(),a.color=r.convertColorToHex(a.color)||I.value[l]||r.palette[l]||r.palette[l%r.palette.length],a.children&&(a.children.forEach(i=>{i.parentId=a.id,i.color=a.color}),ue(a.children))})}const V=e.ref(u.dataset),D=e.ref(null);e.onMounted(()=>{$e()});function $e(){if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiTreemap",type:"dataset"}),ue(V.value),t.value.responsive){const o=be.throttle(()=>{const{width:a,height:l}=be.useResponsive({chart:y.value,title:t.value.style.chart.title.text?x.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:T.value,noTitle:Z.value});requestAnimationFrame(()=>{P.value.width=a,P.value.height=l})});D.value=new ResizeObserver(o),D.value.observe(y.value.parentNode)}}e.onBeforeUnmount(()=>{D.value&&D.value.disconnect()});const W=e.ref(V.value),F=e.computed(()=>W.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||I.value[a]||r.palette[a]||r.palette[a%r.palette.length]})).filter(o=>!f.value.includes(o.id))),L=e.computed(()=>V.value.filter(o=>!f.value.includes(o.id)).map(o=>o.value||0).reduce((o,a)=>o+a,0)),se=e.computed({get(){let o=[...F.value];return t.value.style.chart.layout.sorted&&(o=[...F.value].sort((a,l)=>l.value-a.value)),o.map(a=>({...a}))},set(o){return o}});function ie(o,a){return o.value/a}function Ne(o,a,l){const i=t.value.style.chart.layout.rects.colorRatio-ie(a,l);return r.lightenHexColor(o,i<0?0:i)}function ce(o,a,l,i){return o.map((m,_)=>{const H=Ne(r.convertColorToHex(a)||I.value[_]||r.palette[_]||r.palette[_%r.palette.length],m,i),Ve=ie(m,i);return{...m,color:H,proportion:Ve,parentName:l,children:m.children?ce(m.children,H,m.name,i):void 0}})}const R=e.computed(()=>Ge(se.value.map((o,a)=>{const l=o.children?o.children.reduce((i,m)=>i+m.value,0):o.value;return{value:o.value,id:o.id,children:o.children?ce(o.children.sort((i,m)=>m.value-i.value),o.color,o.name,l):void 0,color:o.color,name:o.name}}),{x0:z.value.left*2,y0:z.value.top,x1:z.value.width,y1:z.value.height}));function de({y0:o,y1:a}){return a-o<=0?1e-4:a-o}function ve({x0:o,x1:a}){return a-o<=0?1e-4:a-o}function E(o){const a=t.value.style.chart.layout.labels.fontSize*(o.proportion*2>1?1:o.proportion*2);return a<t.value.style.chart.layout.labels.minFontSize?t.value.style.chart.layout.labels.minFontSize:a}function Be(o){b.value=o,k.value+=1}const A=e.computed(()=>({startX:0,startY:0,width:z.value.vbWidth,height:z.value.vbHeight})),$=e.ref(!1);function G(o,a=V.value){for(const l of a){if(l.id===o)return l;if(l.children){const i=G(o,l.children);if(i)return i}}return null}function Oe(o){if($.value)s("selectDatapoint",void 0),W.value=V.value;else{if(s("selectDatapoint",o),!G(o.parentId))return;W.value=[G(o.parentId)]}$.value=!$.value}const N=e.ref(null),he=e.computed(()=>V.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||I.value[a]||r.palette[a]||r.palette[a%r.palette.length],shape:"square"})).sort((o,a)=>a.value-o.value).map((o,a)=>({...o,proportion:o.value/V.value.map(l=>l.value).reduce((l,i)=>l+i,0),opacity:f.value.includes(o.id)?.5:1}))),Pe=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 pe(o){$.value=!1,N.value=null,f.value.includes(o.id)?f.value=f.value.filter(a=>a!==o.id):f.value.length<u.dataset.length-1&&f.value.push(o.id),s("selectLegend",se.value)}const j=e.ref(null);function _e({datapoint:o,seriesIndex:a}){N.value=o,j.value={datapoint:o,seriesIndex:a,config:t.value,series:F.value};const l=t.value.style.chart.tooltip.customFormat;if(r.isFunction(l)&&r.functionReturnsString(()=>l({seriesIndex:a,datapoint:o,series:F.value,config:t.value})))C.value=l({seriesIndex:a,datapoint:o,series:F.value,config:t.value});else{let i="";i+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,i+=`<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="${o.color}"/></svg>`,i+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.formatter,o.value,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.tooltip.roundingValue}),{datapoint:o,seriesIndex:a})}</b>`,C.value=`<div>${i}</div>`}w.value=!0}const B=e.computed(()=>{const o=R.value.map(l=>({name:l.name,color:l.color})),a=R.value.map(l=>l.value);return{head:o,body:a}});function fe(){e.nextTick(()=>{const o=B.value.head.map((i,m)=>[[i.name],[B.value.body[m]],[isNaN(B.value.body[m]/L.value)?"-":B.value.body[m]/L.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=r.createCsvContent(a);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-treemap"})})}const q=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],a=B.value.head.map((m,_)=>{const H=r.applyDataLabel(t.value.style.chart.layout.labels.formatter,B.value.body[_],r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:B.value.body[_],s:t.value.style.chart.layout.labels.suffix,r:t.value.table.td.roundingValue}));return[{color:m.color,name:m.name,shape:"square"},H,isNaN(B.value.body[_]/L.value)?"-":r.dataLabel({v:B.value.body[_]/L.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),l={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:o,body:a,config:l}});function ze(){return R.value}function ge(){S.value.showTable=!S.value.showTable}function me(){S.value.showTooltip=!S.value.showTooltip}const M=e.ref(!1);function X(){M.value=!M.value}return v({getData:ze,generateCsv:fe,generateImage:re,generatePdf:ne,toggleTable:ge,toggleTooltip:me,toggleAnnotator:X}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:y,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;background:${t.value.style.chart.backgroundColor}`),id:`treemap_${h.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(ee)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(ee)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(qe.PenAndPaper,{key:0,parent:y.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:M.value,onClose:X},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),Se.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:Z,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:x,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)},[(e.openBlock(),e.createBlock(Ee._sfc_main,{key:`title_${J.value}`,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&&c.value&&(e.unref(te)||e.unref(U))?(e.openBlock(),e.createBlock(ye.UserOptions,{ref:"details",key:`user_option_${k.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(le),isImaging:e.unref(ae),uid:h.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:S.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:y.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:M.value,onToggleFullscreen:Be,onGeneratePdf:e.unref(ne),onGenerateCsv:fe,onGenerateImage:e.unref(re),onToggleTable:ge,onToggleTooltip:me,onToggleAnnotator:X,style:e.normalizeStyle({visibility:e.unref(te)?e.unref(U)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:i})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:i})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:4,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:`${A.value.startX} ${A.value.startY} ${A.value.width<=0?10:A.value.width} ${A.value.height<=0?10:A.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(De._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",tt,[e.createElementVNode("radialGradient",{id:`tgrad_${l.id}`,gradientTransform:"translate(-1, -1.000001) scale(2, 2)"},[e.createElementVNode("stop",{offset:"18%","stop-color":l.color},null,8,lt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.lightenHexColor)(l.color,t.value.style.chart.layout.rects.gradient.intensity/100)},null,8,at)],8,ot)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:de(l),width:ve(l),fill:g.value?l.color:t.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${l.id})`:l.color,rx:t.value.style.chart.layout.rects.borderRadius,stroke:N.value&&N.value.id===l.id?t.value.style.chart.layout.rects.selected.stroke:t.value.style.chart.layout.rects.stroke,"stroke-width":N.value&&N.value.id===l.id?t.value.style.chart.layout.rects.selected.strokeWidth:t.value.style.chart.layout.rects.strokeWidth,onClick:m=>Oe(l),onMouseenter:()=>_e({datapoint:l,seriesIndex:i}),onMouseleave:a[0]||(a[0]=m=>{N.value=null,w.value=!1}),style:e.normalizeStyle(`opacity:${N.value?N.value.id===l.id?1:t.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:"vue-ui-treemap-rect"},null,44,nt),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:de(l),width:ve(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",ut,[t.value.style.chart.layout.labels.showDefaultLabels&&(l.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% - ${E(l)/1.5}px);text-align:left;line-height:${E(l)<14?14:E(l)}px;padding:${E(l)/3}px; color:${e.unref(r.adaptColorToBackground)(l.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${E(l)}px;`)},e.toDisplayString(l.name),5),st,e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${E(l)}px;`)},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,l.value,e.unref(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.layout.labels.rounding}),{datapoint:l})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"rect",e.normalizeProps(e.guardReactiveProps({rect:l,shouldShow:l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||$.value,fontSize:E(l),isZoom:$.value,textColor:e.unref(r.adaptColorToBackground)(l.color)})),void 0,!0)])],8,rt))]))),256)),e.renderSlot(o.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:z.value,isZoom:$.value,rect:N.value,config:t.value})),void 0,!0)],14,et)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",it,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(le)||e.unref(ae)})),void 0,!0)])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Fe.default,{key:6,config:{type:"treemap",style:{backgroundColor:t.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:O},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ae.Legend,{key:`legend_${Q.value}`,legendSet:he.value,config:Pe.value,id:`treemap_legend_${h.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>pe(l))},{item:e.withCtx(({legend:l,index:i})=>[e.createElementVNode("div",{onClick:m=>pe(l),style:e.normalizeStyle(`opacity:${f.value.includes(l.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,l.value,e.unref(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.legend.roundingValue}),{datapoint:l}))+" ",1),f.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",vt," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",dt," ("+e.toDisplayString(isNaN(l.value/L.value)?"-":(l.value/L.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,ct)]),_:1},8,["legendSet","config","id"])):e.renderSlot(o.$slots,"legend",{key:1,legend:he.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:T,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Le._sfc_main,{show:S.value.showTooltip&&w.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:y.value,content:C.value,isFullscreen:b.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),c.value?(e.openBlock(),e.createBlock(Ie.default,{key:8,hideDetails:"",config:{open:S.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Re.DataTable,{key:`table_${K.value}`,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]=l=>S.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,ht)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Qe))}},ft=He._export_sfc(pt,[["__scopeId","data-v-f3bac1ee"]]);exports.default=ft;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-C_VTEz1N.cjs"),ge=require("./useResponsive-BJ7DTGpm.cjs"),Me=require("./Title-DFq_8HYJ.cjs"),fe=require("./usePrinter-DWCqeYW6.cjs"),Ae=require("./Tooltip-pcZXVRMj.cjs"),me=require("./Legend-Dh9aF6uH.cjs"),Re=require("./vue-ui-skeleton-D1bJntn7.cjs"),qe=require("./BaseIcon-Dk8gByg1.cjs"),Ue=require("./vue-ui-accordion-CtBhoUw4.cjs"),be=require("./useNestedProp-C7bLHE7v.cjs"),He=require("./PackageVersion-CdmZAhdE.cjs"),Xe=require("./PenAndPaper-BsncKiRE.cjs"),je=require("./useUserOptionState-BgepsfED.cjs"),ke=require("./Shape-DZRynz5E.cjs"),We=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ge=["id"],Ye=["onClick"],Ke=["xmlns","viewBox"],Je=["width","height"],Qe=["id"],Ze=["stop-color"],et=["stop-color"],tt={key:1},lt=["x","y","width","height","fill","rx"],at=["x","y","width","height","fill","rx","stroke","stroke-width"],ot=["x","y","width","height","fill","rx","stroke","stroke-width"],nt=["x2","y1","y2","stroke","stroke-width"],rt=["x1","x2","y1","y2","stroke","stroke-width"],ut=["x","y","text-anchor","font-size","fill","font-weight"],st=["x","y","font-size","fill","font-weight"],it=["x","y","font-size","fill","font-weight"],ct=["x","y","font-size","fill","font-weight"],dt=["y","width","height","fill","onMouseenter"],vt={key:6,class:"vue-data-ui-watermark"},ht=["onClick"],pt={style:"width:100%;padding-top: 36px;position:relative"},yt={class:"vue-ui-data-table"},gt={key:0},ft={style:{width:"100%"}},mt=["data-cell"],bt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},kt=["data-cell"],Ct={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},_t=["data-cell"],xt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},wt=["data-cell"],Nt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},$t=["data-cell"],St={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Vt=["data-cell"],Tt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Bt=["data-cell"],Et={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Lt={__name:"vue-ui-vertical-bar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(Ce,{expose:_e,emit:xe}){const f=Ce;e.useCssVars(a=>({"782729ec":a.tdo}));const{vue_ui_vertical_bar:we}=n.useConfig(),Ne=e.useSlots(),E=e.computed(()=>!!f.dataset&&f.dataset.length),g=e.ref(n.createUid()),$e=e.ref(null),O=e.ref(!1),I=e.ref(""),L=e.ref(0),Se=e.ref(null),X=e.ref(0),S=e.ref(null),j=e.ref(null),M=e.ref(null),W=e.ref(null),G=e.ref(null),Y=e.ref(0),A=e.ref(0),t=e.computed({get:()=>Q(),set:a=>a}),{userOptionsVisible:R,setUserOptionsVisibility:K,keepUserOptionState:J}=je.useUserOptionState({config:t.value});function Q(){const a=be.useNestedProp({userConfig:f.config,defaultConfig:we});return a.theme?{...be.useNestedProp({userConfig:n.themes.vue_ui_vertical_bar[a.theme]||f.config,defaultConfig:a}),customPalette:n.themePalettes[a.theme]||n.palette}:a}e.watch(()=>f.config,a=>{t.value=Q(),R.value=!t.value.userOptions.showOnChartHover,re(),Y.value+=1,A.value+=1,s.value=t.value.style.chart.layout.bars.height,c.value=t.value.style.chart.layout.bars.gap,h.value.showTable=t.value.table.show,h.value.sortDesc=t.value.style.chart.layout.bars.sort==="desc",h.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0}),e.watch(()=>f.dataset,z,{deep:!0});const{isPrinting:Z,isImaging:ee,generatePdf:te,generateImage:le}=fe.usePrinter({elementId:`vue-ui-vertical-bar_${g.value}`,fileName:t.value.style.chart.title.text||"vue-ui-vertical-bar"}),Ve=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ae=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),oe=e.ref(null),ne=e.ref(!1),Te=e.computed(()=>t.value.table.responsiveBreakpoint),P=e.ref(null);e.onMounted(()=>{re()});function re(){if(n.objectIsEmpty(f.dataset)&&n.error({componentName:"VueUiVerticalBar",type:"dataset"}),L.value=f.dataset.flatMap(a=>a.children&&a.children.length>0?a.children.length:1).reduce((a,o)=>a+o,0),Be(),t.value.responsive){const a=ge.throttle(()=>{const{width:o,height:l}=ge.useResponsive({chart:S.value,title:t.value.style.chart.title.text?j.value:null,legend:t.value.style.chart.legend.show?M.value:null,source:W.value,noTitle:G.value});requestAnimationFrame(()=>{ie.value=o,s.value=l/L.value-c.value*2})});P.value=new ResizeObserver(a),P.value.observe(S.value.parentNode)}}e.onBeforeUnmount(()=>{P.value&&P.value.disconnect()});function Be(){new ResizeObserver(o=>{o.forEach(l=>{ne.value=l.contentRect.width<Te.value})}).observe(oe.value)}const h=e.ref({showTable:t.value.table.show,sortDesc:t.value.style.chart.layout.bars.sort==="desc",showTooltip:t.value.style.chart.tooltip.show}),ue=e.computed(()=>h.value.sortDesc),x=e.computed(()=>(f.dataset.forEach((a,o)=>{!a.value&&!a.children&&n.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`value (index ${o})`}),a.children&&(n.objectIsEmpty(a.children)?n.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`children (index ${o})`}):a.children.forEach((l,r)=>{[null,void 0].includes(l.name)&&n.error({componentName:"VueUiVerticalBar",type:"datasetSerieAttribute",property:"name",key:"children",index:r})}))}),f.dataset.map((a,o)=>{const l=`vertical_parent_${o}_${g.value}`,r=a.children&&a.children.length>0,v=n.checkNaN(a.value?a.value:r?a.children.map(y=>y.value||0).reduce((y,C)=>y+C,0):0),d=v>=0?1:-1;return{...a,id:l,absoluteIndex:o,shape:"square",opacity:b.value.includes(l)?.5:1,value:Math.abs(v),sign:d,hasChildren:r,isChild:!1,segregate:()=>T(l),isSegregated:b.value.includes(l),color:n.convertColorToHex(a.color)||ae.value[o]||n.palette[o]||n.palette[o%n.palette.length],children:!a.children||!a.children.length?[]:a.children.toSorted(D.value?()=>0:(y,C)=>ue.value?C.value-y.value:y.value-C.value).map((y,C)=>({...y,value:n.checkNaN(Math.abs(y.value)),absoluteIndex:o,sign:y.value>=0?1:-1,isChild:!0,parentId:l,parentName:a.name,parentValue:v,parentSign:d,id:`vertical_child_${o}_${C}_${g.value}`,childIndex:C,color:n.convertColorToHex(y.color)||n.convertColorToHex(a.color)||ae.value[o]||n.palette[o]||n.palette[o%n.palette.length]})).map((y,C)=>({...y,isFirstChild:C===0,isLastChild:C===a.children.length-1}))}}).toSorted(D.value?()=>0:(a,o)=>ue.value?o.value-a.value:a.value-o.value))),se=e.computed(()=>({cy:"vertical-bar-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":""})),s=e.ref(t.value.style.chart.layout.bars.height),c=e.ref(t.value.style.chart.layout.bars.gap),Ee=e.computed(()=>(s.value+c.value)*L.value),ie=e.ref(512),i=e.computed(()=>({width:ie.value,height:Ee.value,padding:{top:12,left:128+t.value.style.chart.layout.bars.offsetX,right:64+t.value.style.chart.layout.bars.paddingRight,bottom:12}})),u=e.computed(()=>({fullHeight:i.value.padding.top+i.value.padding.bottom+i.value.height,top:i.value.padding.top,left:i.value.padding.left,right:i.value.width-i.value.padding.right,bottom:i.value.padding.top+i.value.height,width:i.value.width-(i.value.padding.left+i.value.padding.right)}));function z(){L.value=w.value.flatMap(a=>a.children&&a.children.length>0?a.children.length:1).reduce((a,o)=>a+o,0)}const b=e.ref([]);function T(a){b.value.includes(a)?b.value=b.value.filter(o=>o!==a):b.value.push(a),z(),xe("selectLegend",w.value)}const w=e.computed(()=>x.value.filter(a=>!b.value.includes(a.id))),k=e.computed(()=>w.value.map(a=>Math.abs(a.value)).reduce((a,o)=>a+o,0));function ce(a,o=!1,l=0){return o?n.dataLabel({v:n.checkNaN(Math.abs(a)/k.value*100),s:"%",r:l}):Math.abs(a)/k.value}const N=e.computed(()=>w.value.flatMap(a=>a.hasChildren?a.children:a)),$=e.computed(()=>N.value.map(a=>a.sign).includes(-1)),Le=e.computed(()=>Math.max(...w.value.flatMap(a=>a.children&&a.children.length?Math.max(...a.children.map(o=>o.value)):a.value)));function p(a){const o=a/Le.value;return u.value.width/($.value?2:1)*o}function Pe(a){return p(a)+u.value.left}function B(a,o){const l=w.value.find(d=>d.id===a.parentId),r=u.value.top+(c.value+s.value)*o,v=l.children.length*(c.value+s.value);return{y:r+v/2-t.value.style.chart.layout.bars.parentLabels.fontSize,name:l.name,value:[void 0,NaN,null].includes(l.value)?"":l.sign===1?l.value:-l.value,percentageToTotal:isNaN(l.value/k.value)?"":ce(l.value,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage),sign:l.sign}}function ze(){return w.value}const q=e.ref(null),U=e.ref(null);function De(a,o){U.value={datapoint:a,seriesIndex:o,series:x.value,config:t.value},O.value=!0,q.value=a.id;let l="";const r=a.isChild?a.parentName:a.name,v=a.isChild?a.name:"",d=t.value.style.chart.tooltip.customFormat;n.isFunction(d)&&n.functionReturnsString(()=>d({datapoint:a,series:x.value,config:t.value,seriesIndex:o}))?I.value=d({datapoint:a,series:x.value,config:t.value,seriesIndex:o}):(l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;text-align:left;">
|
|
2
2
|
<div style="display:flex;align-items:center;gap:4px;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="${a.color}"/>${Ne.pattern?`<rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="url(#pattern_${g.value}_${a.absoluteIndex})"/>`:""}</svg> ${r}</div>
|
|
3
3
|
${v?`<div>${v}</div>`:""}
|
|
4
4
|
</div>`,t.value.style.chart.tooltip.showValue&&(l+=`<div>${t.value.translations.value}: <b>${n.applyDataLabel(t.value.style.chart.layout.bars.dataLabels.value.formatter,a.sign===1?a.value:-a.value,n.dataLabel({p:t.value.style.chart.tooltip.prefix,v:a.sign===1?a.value:-a.value,s:t.value.style.chart.tooltip.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:o})}</b></div>`),t.value.style.chart.tooltip.showPercentage&&(l+=`<div>${t.value.translations.percentageToTotal} : <b>${n.dataLabel({v:Math.abs(a.value)/k.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`,a.isChild&&(l+=`<div>${t.value.translations.percentageToSerie}: <b>${n.dataLabel({v:Math.abs(a.value)/Math.abs(a.parentValue)*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`)),I.value=`<div style="text-align:left">${l}</div>`)}function de(a,o,l,r){if(!t.value.style.chart.layout.bars.dataLabels.value.show)return"";const v=n.applyDataLabel(t.value.style.chart.layout.bars.dataLabels.value.formatter,n.checkNaN(r===-1&&a>=0?-a:a),n.dataLabel({p:t.value.style.chart.layout.bars.dataLabels.value.prefix,v:n.checkNaN(r===-1&&a>=0?-a:a),s:t.value.style.chart.layout.bars.dataLabels.value.suffix,r:t.value.style.chart.layout.bars.dataLabels.value.roundingValue}),{datapoint:o,seriesIndex:l}),d=`(${ce(a,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)})`;return`${v}${t.value.style.chart.layout.bars.dataLabels.percentage.show?` ${d}`:""}`}const m=e.computed(()=>{const a=[t.value.translations.parentName,t.value.translations.value,t.value.translations.percentageToTotal,t.value.translations.childName,t.value.translations.value,t.value.translations.percentageToSerie,t.value.translations.percentageToTotal],o=N.value.map(l=>l.isChild?l.isFirstChild?{color:l.color,parentName:l.parentName,parentValue:l.parentValue,percentageToTotal:l.parentValue/k.value,childName:l.name,childValue:l.sign===1?l.value:-l.value,childPercentageToParent:Math.abs(l.value)/Math.abs(l.parentValue),childPercentageToTotal:Math.abs(l.value)/k.value}:{color:"",parentName:"",parentValue:"",percentageToTotal:"",childName:l.name,childValue:l.sign===1?l.value:-l.value,childPercentageToParent:Math.abs(l.value)/Math.abs(l.parentValue),childPercentageToTotal:Math.abs(l.value)/k.value}:{color:l.color,parentName:l.name,parentValue:l.sign===1?l.value:-l.value,percentageToTotal:Math.abs(l.value)/k.value,childName:"",childValue:"",childPercentageToParent:"",childPercentageToTotal:""});return{head:a,body:o}});function ve(){const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=m.value.head,l=m.value.body.map(d=>[d.parentName,d.parentValue,d.percentageToTotal,d.childName,d.childValue,d.childPercentageToParent,d.childPercentageToTotal]),r=a.concat([o]).concat(l),v=n.createCsvContent(r);n.downloadCsv({csvContent:v,title:t.value.style.chart.title.text||"vue-ui-vertical-bar"})}const V=e.ref(!1);function Fe(a){V.value=a,X.value+=1}function he(){h.value.showTable=!h.value.showTable}const Oe=e.ref({none:0,asc:1,desc:2}),_=e.ref(0),D=e.ref(!1);e.onMounted(()=>{["none","asc","desc"].includes(t.value.style.chart.layout.bars.sort)||n.error({componentName:"VueUiVerticalBar",type:"attributeWrongValue",property:"style.chart.layout.bars.sort",key:t.value.style.chart.layout.bars.sort}),_.value=Oe.value[t.value.style.chart.layout.bars.sort],h.value.sortDesc=_.value===2,D.value=_.value===0});function Ie(){_.value+=1,_.value>2&&(_.value=0)}function pe(){Ie(),h.value.sortDesc=_.value===2,D.value=_.value===0,z()}function ye(){h.value.showTooltip=!h.value.showTooltip}const F=e.ref(!1);function H(){F.value=!F.value}return _e({getData:ze,recalculateHeight:z,generatePdf:te,generateCsv:ve,generateImage:le,toggleTable:he,toggleSort:pe,toggleTooltip:ye,toggleAnnotator:H}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-vertical-bar ${V.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"verticalBarChart",ref:S,id:`vue-ui-vertical-bar_${g.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),onMouseenter:o[5]||(o[5]=()=>e.unref(K)(!0)),onMouseleave:o[6]||(o[6]=()=>e.unref(K)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Xe.PenAndPaper,{key:0,parent:S.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:F.value,onClose:H},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),Ve.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:G,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:j,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Me._sfc_main,{key:`title_${Y.value}`,config:{title:{cy:"vertical-bar-div-title",...t.value.style.chart.title},subtitle:{cy:"vertical-bar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&E.value&&(e.unref(J)||e.unref(R))?(e.openBlock(),e.createBlock(fe.UserOptions,{ref_key:"details",ref:$e,key:`user_options_${X.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(ee),isPrinting:e.unref(Z),uid:g.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasSort:t.value.userOptions.buttons.sort,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:V.value,isTooltip:h.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:S.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:F.value,onToggleFullscreen:Fe,onGeneratePdf:e.unref(te),onGenerateCsv:ve,onGenerateImage:e.unref(le),onToggleTable:he,onToggleSort:pe,onToggleTooltip:ye,onToggleAnnotator:H,style:e.normalizeStyle({visibility:e.unref(J)?e.unref(R)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionSort?{name:"optionSort",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionSort",{},void 0,!0)]),key:"6"}: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:"7"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasSort","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show&&t.value.style.chart.legend.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:4,ref_key:"chartLegend",ref:M},[(e.openBlock(),e.createBlock(me.Legend,{key:`legend_top_${A.value}`,legendSet:x.value,config:se.value,onClickMarker:o[0]||(o[0]=({legend:l})=>T(l.id))},e.createSlots({item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:v=>T(l.id),style:e.normalizeStyle(`opacity:${b.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.bars.dataLabels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.legend.prefix,v:l.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:r})),13,Ye)]),_:2},[a.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:l,index:r})=>[e.createVNode(ke._sfc_main,{shape:l.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${g.value}_${r})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"]))],512)):e.createCommentVNode("",!0),E.value?(e.openBlock(),e.createElementBlock("svg",{key:5,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${i.value.width<=0?10:i.value.width} ${u.value.fullHeight<=0?10:u.value.fullHeight}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(He._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:i.value.width<=0?10:i.value.width,height:u.value.fullHeight<=0?10:u.value.fullHeight,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,Je)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`vertical_bar_gradient_${g.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":l.color},null,8,Ze),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.03),100-t.value.style.chart.layout.bars.gradientIntensity)},null,8,et)],8,Qe))),256)),a.$slots.pattern?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,l=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(a.$slots,"pattern",e.normalizeProps(e.guardReactiveProps({seriesIndex:l.absoluteIndex,patternId:`pattern_${g.value}_${l.absoluteIndex}`})),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:e.unref(n.checkNaN)($.value?u.value.left+u.value.width/2-(l.sign===1?0:p(l.value)<=0?1e-4:p(l.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(p(l.value)<=0?1e-4:p(l.value)),height:s.value<=0?1e-4:s.value,fill:t.value.style.chart.layout.bars.underlayerColor,rx:t.value.style.chart.layout.bars.borderRadius,class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,lt)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:e.unref(n.checkNaN)($.value?u.value.left+u.value.width/2-(l.sign===1?0:p(l.value)<=0?1e-4:p(l.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(p(l.value)<=0?1e-4:p(l.value)),height:s.value<=0?1e-4:s.value,fill:t.value.style.chart.layout.bars.useGradient?`url(#vertical_bar_gradient_${g.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.bars.fillOpacity),rx:t.value.style.chart.layout.bars.borderRadius,stroke:t.value.style.chart.layout.bars.useStroke?l.color:"none","stroke-width":t.value.style.chart.layout.bars.useStroke?t.value.style.chart.layout.bars.strokeWidth:0,class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,at),a.$slots.pattern?(e.openBlock(),e.createElementBlock("rect",{key:0,x:e.unref(n.checkNaN)($.value?u.value.left+u.value.width/2-(l.sign===1?0:p(l.value)<=0?1e-4:p(l.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(p(l.value)<=0?1e-4:p(l.value)),height:s.value<=0?1e-4:s.value,fill:`url(#pattern_${g.value}_${l.absoluteIndex})`,rx:t.value.style.chart.layout.bars.borderRadius,stroke:t.value.style.chart.layout.bars.useStroke?l.color:"none","stroke-width":t.value.style.chart.layout.bars.useStroke?t.value.style.chart.layout.bars.strokeWidth:0,class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,ot)):e.createCommentVNode("",!0),(!l.isChild||l.isLastChild)&&t.value.style.chart.layout.separators.show&&r!==N.value.length-1?(e.openBlock(),e.createElementBlock("line",{key:1,x1:0,x2:u.value.left,y1:s.value+c.value/2+u.value.top+(c.value+s.value)*r,y2:s.value+c.value/2+u.value.top+(c.value+s.value)*r,stroke:t.value.style.chart.layout.separators.color,"stroke-width":t.value.style.chart.layout.separators.strokeWidth,"stroke-linecap":"round"},null,8,nt)):e.createCommentVNode("",!0),$.value&&t.value.style.chart.layout.separators.show?(e.openBlock(),e.createElementBlock("line",{key:2,x1:u.value.left+u.value.width/2,x2:u.value.left+u.value.width/2,y1:u.value.top,y2:u.value.bottom,stroke:t.value.style.chart.layout.separators.color,"stroke-width":t.value.style.chart.layout.separators.strokeWidth,"stroke-linecap":"round"},null,8,rt)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:$.value?u.value.left+u.value.width/2+(l.sign===1?-12:12)+(l.sign===1?-t.value.style.chart.layout.bars.dataLabels.offsetX:t.value.style.chart.layout.bars.dataLabels.offsetX):Pe(l.value)+3+t.value.style.chart.layout.bars.dataLabels.offsetX,y:u.value.top+(c.value+s.value)*r+s.value/2+t.value.style.chart.layout.bars.dataLabels.fontSize/2,"text-anchor":!$.value||l.sign===-1?"start":"end","font-size":t.value.style.chart.layout.bars.dataLabels.fontSize,fill:t.value.style.chart.layout.bars.dataLabels.color,"font-weight":t.value.style.chart.layout.bars.dataLabels.bold?"bold":"normal"},e.toDisplayString(de(l.value,l,r,l.sign)),9,ut),(l.isChild||!l.hasChildren)&&t.value.style.chart.layout.bars.nameLabels.show?(e.openBlock(),e.createElementBlock("text",{key:3,"text-anchor":"end",x:u.value.left-3+t.value.style.chart.layout.bars.nameLabels.offsetX,y:u.value.top+(c.value+s.value)*r+s.value/2+t.value.style.chart.layout.bars.nameLabels.fontSize/2,"font-size":t.value.style.chart.layout.bars.nameLabels.fontSize,fill:t.value.style.chart.layout.bars.nameLabels.color,"font-weight":t.value.style.chart.layout.bars.nameLabels.bold?"bold":"normal"},e.toDisplayString(l.name),9,st)):e.createCommentVNode("",!0),l.isChild&&l.childIndex===0&&t.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:4,x:3+t.value.style.chart.layout.bars.parentLabels.offsetX,y:B(l,r).y,"font-size":t.value.style.chart.layout.bars.parentLabels.fontSize,fill:t.value.style.chart.layout.bars.parentLabels.color,"font-weight":t.value.style.chart.layout.bars.parentLabels.bold?"bold":"normal","text-anchor":"start"},e.toDisplayString(B(l,r).name),9,it)):e.createCommentVNode("",!0),l.isChild&&l.childIndex===0&&t.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:5,x:3+t.value.style.chart.layout.bars.parentLabels.offsetX,y:B(l,r).y+t.value.style.chart.layout.bars.parentLabels.fontSize+6,"font-size":t.value.style.chart.layout.bars.parentLabels.fontSize,fill:t.value.style.chart.layout.bars.parentLabels.color,"font-weight":t.value.style.chart.layout.bars.dataLabels.bold?"bold":"normal","text-anchor":"start"},e.toDisplayString(de(B(l,r).value),B(l,r),r,l.parentSign||l.sign),9,ct)):e.createCommentVNode("",!0),e.createElementVNode("rect",{"data-cy-trap":"",x:0,y:u.value.top+(c.value+s.value)*r-c.value/2,width:i.value.width<=0?1e-4:i.value.width,height:s.value+c.value<=0?1e-4:s.value+c.value,fill:q.value===l.id?e.unref(n.setOpacity)(t.value.style.chart.layout.highlighter.color,t.value.style.chart.layout.highlighter.opacity):"transparent",onMouseenter:v=>De(l,r),onMouseleave:o[1]||(o[1]=v=>{Se.value=null,O.value=!1,q.value=null})},null,40,dt)]))),256)),e.renderSlot(a.$slots,"svg",{svg:i.value},void 0,!0)],14,Ke)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",vt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Z)||e.unref(ee)})),void 0,!0)])):e.createCommentVNode("",!0),E.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Re.default,{key:7,config:{type:"verticalBar",style:{backgroundColor:t.value.style.chart.backgroundColor,verticalBar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show&&t.value.style.chart.legend.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"chartLegend",ref:M},[(e.openBlock(),e.createBlock(me.Legend,{key:`legend_bottom_${A.value}`,legendSet:x.value,config:se.value,onClickMarker:o[2]||(o[2]=({legend:l})=>T(l.id))},e.createSlots({item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{onClick:v=>T(l.id),style:e.normalizeStyle(`opacity:${b.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.bars.dataLabels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.legend.prefix,v:l.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:r})),13,ht)]),_:2},[a.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:l,index:r})=>[e.createVNode(ke._sfc_main,{shape:l.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${g.value}_${r})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"]))],512)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:x.value},void 0,!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:9,ref_key:"source",ref:W,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Ae._sfc_main,{show:h.value.showTooltip&&O.value&&b.value.length<f.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:S.value,content:I.value,isFullscreen:V.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...U.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...U.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),E.value?(e.openBlock(),e.createBlock(Ue.default,{key:10,hideDetails:"",config:{open:h.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.createElementVNode("div",{ref_key:"tableContainer",ref:oe,class:"vue-ui-vertical-bar-table"},[e.createElementVNode("div",pt,[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:o[3]||(o[3]=l=>h.value.showTable=!1),onKeypress:o[4]||(o[4]=e.withKeys(l=>h.value.showTable=!1,["enter"]))},[e.createVNode(qe.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("div",{style:{width:"100%","container-type":"inline-size"},class:e.normalizeClass({"vue-ui-responsive":ne.value})},[e.createElementVNode("table",yt,[e.createElementVNode("caption",{style:e.normalizeStyle({backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline}),class:"vue-ui-data-table__caption"},[e.createTextVNode(e.toDisplayString(t.value.style.chart.title.text)+" ",1),t.value.style.chart.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",gt,e.toDisplayString(t.value.style.chart.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value.head,l=>(e.openBlock(),e.createElementBlock("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline}`)},[e.createElementVNode("div",ft,e.toDisplayString(l),1)],4))),256))],4),e.createElementVNode("tr",null,[e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},"∑ "+e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(isNaN(k.value)?"":k.value.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),5),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},"100%",4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4)])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value.body,(l,r)=>(e.openBlock(),e.createElementBlock("tr",{class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline};font-variant-numeric: tabular-nums;`),"data-cell":m.value.head[0]??""},[e.createElementVNode("div",bt,[l.color?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`color:${l.color};margin-right:3px`)},"⬤",4)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(l.parentName),1)])],12,mt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[1]??""},[e.createElementVNode("div",Ct,e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(["",NaN,void 0].includes(l.parentValue)?"":l.parentValue.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),1)],12,kt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[2]??""},[e.createElementVNode("div",xt,e.toDisplayString(["",NaN,void 0].includes(l.percentageToTotal)?"":`${(l.percentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,_t),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[3]??""},[e.createElementVNode("div",Nt,e.toDisplayString(l.childName),1)],12,wt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[4]??""},[e.createElementVNode("div",St,e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(["",NaN,void 0].includes(l.childValue)?"":l.childValue.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),1)],12,$t),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[5]??""},[e.createElementVNode("div",Tt,e.toDisplayString(["",NaN,void 0].includes(l.childPercentageToParent)?"":`${(l.childPercentageToParent*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,Vt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[6]??""},[e.createElementVNode("div",Et,e.toDisplayString(["",NaN,void 0].includes(l.childPercentageToTotal)?"":`${(l.childPercentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,Bt)],6))),256))])])],2)])],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ge))}},Pt=We._export_sfc(Lt,[["__scopeId","data-v-320e6bda"]]);exports.default=Pt;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { useCssVars as dt, useSlots as vt, computed as b, ref as i, watch as Re, onMounted as Ue, onBeforeUnmount as ct, openBlock as u, createElementBlock as r, normalizeClass as A, normalizeStyle as c, unref as d, createBlock as B, createCommentVNode as p, createSlots as ce, withCtx as k, renderSlot as m, normalizeProps as E, guardReactiveProps as H, createElementVNode as n, toDisplayString as h, createVNode as Y, Fragment as W, renderList as G, withKeys as ht, createTextVNode as pt } from "vue";
|
|
2
|
-
import { u as yt, c as gt, t as ft, a as bt, p as D, b as mt, o as Xe, e as K, v as N, d as he, i as le, f as R, X as _t, s as pe, w as kt, x as $t, y as xt, q as wt, r as Ct } from "./index-
|
|
2
|
+
import { u as yt, c as gt, t as ft, a as bt, p as D, b as mt, o as Xe, e as K, v as N, d as he, i as le, f as R, X as _t, s as pe, w as kt, x as $t, y as xt, q as wt, r as Ct } from "./index-DiqenHrX.js";
|
|
3
3
|
import { t as Tt, u as Lt } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as Nt } from "./Title-
|
|
5
|
-
import { u as Pt, U as St } from "./usePrinter-
|
|
6
|
-
import { _ as Vt } from "./Tooltip-
|
|
7
|
-
import { L as Ee } from "./Legend-
|
|
8
|
-
import It from "./vue-ui-skeleton-
|
|
9
|
-
import Ot from "./BaseIcon-
|
|
10
|
-
import Ft from "./vue-ui-accordion-
|
|
11
|
-
import { u as He } from "./useNestedProp-
|
|
12
|
-
import { _ as Mt } from "./PackageVersion-
|
|
13
|
-
import { P as zt } from "./PenAndPaper-
|
|
4
|
+
import { _ as Nt } from "./Title-CiQQgFbV.js";
|
|
5
|
+
import { u as Pt, U as St } from "./usePrinter-CHAgX1f-.js";
|
|
6
|
+
import { _ as Vt } from "./Tooltip-ZYQUXVWv.js";
|
|
7
|
+
import { L as Ee } from "./Legend-DqRstaxU.js";
|
|
8
|
+
import It from "./vue-ui-skeleton-BwWHgSoq.js";
|
|
9
|
+
import Ot from "./BaseIcon-BXpK120h.js";
|
|
10
|
+
import Ft from "./vue-ui-accordion-DA6XnWaz.js";
|
|
11
|
+
import { u as He } from "./useNestedProp-B3CQkP95.js";
|
|
12
|
+
import { _ as Mt } from "./PackageVersion-iscNRe7N.js";
|
|
13
|
+
import { P as zt } from "./PenAndPaper-B-VQ8eSo.js";
|
|
14
14
|
import { u as At } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
|
-
import { _ as We } from "./Shape-
|
|
15
|
+
import { _ as We } from "./Shape-CB0mE9KP.js";
|
|
16
16
|
import { _ as Bt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
17
17
|
const Dt = ["id"], Rt = ["onClick"], Ut = ["xmlns", "viewBox"], Xt = ["width", "height"], Et = ["id"], Ht = ["stop-color"], Wt = ["stop-color"], Gt = { key: 1 }, jt = ["x", "y", "width", "height", "fill", "rx"], qt = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], Yt = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], Kt = ["x2", "y1", "y2", "stroke", "stroke-width"], Jt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Qt = ["x", "y", "text-anchor", "font-size", "fill", "font-weight"], Zt = ["x", "y", "font-size", "fill", "font-weight"], ea = ["x", "y", "font-size", "fill", "font-weight"], ta = ["x", "y", "font-size", "fill", "font-weight"], aa = ["y", "width", "height", "fill", "onMouseenter"], la = {
|
|
18
18
|
key: 6,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { useSlots as tt, computed as d, ref as v, watch as Ne, onMounted as lt, onBeforeUnmount as at, openBlock as s, createElementBlock as r, normalizeClass as Be, normalizeStyle as X, unref as c, createBlock as N, createCommentVNode as y, createSlots as Ve, withCtx as b, renderSlot as g, normalizeProps as B, guardReactiveProps as V, createVNode as ne, createElementVNode as x, Fragment as C, renderList as L, toDisplayString as A, createTextVNode as Me, nextTick as ot, pushScopeId as ut, popScopeId as st } from "vue";
|
|
2
|
-
import { u as rt, c as nt, t as it, a as vt, p as M, o as ct, e as ie, g as dt, b as ht, i as E, f as $, X as pt, s as yt, w as ft, G as gt, L as bt, d as mt, x as wt, y as kt, q as xt, r as _t } from "./index-
|
|
2
|
+
import { u as rt, c as nt, t as it, a as vt, p as M, o as ct, e as ie, g as dt, b as ht, i as E, f as $, X as pt, s as yt, w as ft, G as gt, L as bt, d as mt, x as wt, y as kt, q as xt, r as _t } from "./index-DiqenHrX.js";
|
|
3
3
|
import { t as Ct, u as $t } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as It } from "./Title-
|
|
5
|
-
import { u as Tt, U as St } from "./usePrinter-
|
|
6
|
-
import { _ as Pt } from "./Tooltip-
|
|
7
|
-
import { D as Ot } from "./DataTable-
|
|
8
|
-
import { L as Lt } from "./Legend-
|
|
9
|
-
import At from "./vue-ui-skeleton-
|
|
10
|
-
import Ft from "./vue-ui-accordion-
|
|
11
|
-
import { u as De } from "./useNestedProp-
|
|
12
|
-
import { _ as zt } from "./PackageVersion-
|
|
13
|
-
import { P as Nt } from "./PenAndPaper-
|
|
4
|
+
import { _ as It } from "./Title-CiQQgFbV.js";
|
|
5
|
+
import { u as Tt, U as St } from "./usePrinter-CHAgX1f-.js";
|
|
6
|
+
import { _ as Pt } from "./Tooltip-ZYQUXVWv.js";
|
|
7
|
+
import { D as Ot } from "./DataTable-CpOh1tx3.js";
|
|
8
|
+
import { L as Lt } from "./Legend-DqRstaxU.js";
|
|
9
|
+
import At from "./vue-ui-skeleton-BwWHgSoq.js";
|
|
10
|
+
import Ft from "./vue-ui-accordion-DA6XnWaz.js";
|
|
11
|
+
import { u as De } from "./useNestedProp-B3CQkP95.js";
|
|
12
|
+
import { _ as zt } from "./PackageVersion-iscNRe7N.js";
|
|
13
|
+
import { P as Nt } from "./PenAndPaper-B-VQ8eSo.js";
|
|
14
14
|
import { u as Bt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
|
-
import { _ as Vt } from "./Shape-
|
|
15
|
+
import { _ as Vt } from "./Shape-CB0mE9KP.js";
|
|
16
16
|
import { _ as Mt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
17
17
|
const Ue = (W) => (ut("data-v-5a674907"), W = W(), st(), W), Dt = ["id"], Ut = ["xmlns", "viewBox"], Gt = ["id"], Rt = ["stop-color"], jt = ["stop-color"], Et = ["id"], Wt = /* @__PURE__ */ Ue(() => /* @__PURE__ */ x("feGaussianBlur", {
|
|
18
18
|
in: "SourceGraphic",
|