vue-data-ui 2.3.78 → 2.3.80
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-BCYtOwX7.js → Arrow-BI2HWbkl.js} +1 -1
- package/dist/{Arrow-DWkvIpW8.cjs → Arrow-BwOfAkTh.cjs} +1 -1
- package/dist/{BaseIcon-BIQXWVMS.js → BaseIcon-BhdIp3HQ.js} +1 -1
- package/dist/{BaseIcon-Bcpzfk34.cjs → BaseIcon-DU-oJKBy.cjs} +1 -1
- package/dist/{DataTable-y1lX5jVj.js → DataTable-CThhaAYT.js} +2 -2
- package/dist/{DataTable-C5TOiC61.cjs → DataTable-ysqfWT9v.cjs} +1 -1
- package/dist/{Legend-CGGD8NhP.cjs → Legend-DtnPX_Dc.cjs} +1 -1
- package/dist/{Legend-BLXcdrri.js → Legend-DxRA5XXC.js} +1 -1
- package/dist/{Shape-qJYTY2BC.cjs → Shape-DJdHakOl.cjs} +1 -1
- package/dist/{Shape-CsoTtJx6.js → Shape-EntBaNbX.js} +1 -1
- package/dist/{Slicer-DzJZ4axa.js → Slicer-BLFTdmNs.js} +2 -2
- package/dist/{Slicer-CZJXKSeE.cjs → Slicer-xJl1pkRn.cjs} +1 -1
- package/dist/{Title-Bx-VO3md.js → Title-Bgh58KWs.js} +1 -1
- package/dist/{Title-BSpa3uge.cjs → Title-DOzi72Pu.cjs} +1 -1
- package/dist/{Tooltip-rmhZhv96.cjs → Tooltip-DWx3KcqE.cjs} +1 -1
- package/dist/{Tooltip-Dk-cimhQ.js → Tooltip-HqwVgkYT.js} +1 -1
- package/dist/{index-CzjC8LfY.cjs → index-BofUHMEw.cjs} +1 -1
- package/dist/{index-DP8dqFNd.js → index-C_xZ1jJj.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-B-oZxD4x.js → useNestedProp-9QKvGow8.js} +1 -1
- package/dist/{useNestedProp-CY7DebVH.cjs → useNestedProp-DGK0LGfN.cjs} +1 -1
- package/dist/{usePrinter-DiuHo4LO.js → usePrinter-BJ7GxAOO.js} +1 -1
- package/dist/{usePrinter-DiLM6jav.cjs → usePrinter-_JYb_33H.cjs} +1 -1
- package/dist/{vue-data-ui-Ce5IFSYA.cjs → vue-data-ui-BDRU4x1z.cjs} +1 -1
- package/dist/{vue-data-ui-Ct7n5wkM.js → vue-data-ui-MIo8xmC1.js} +57 -57
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-B_i2EoFu.cjs → vue-ui-3d-bar-Clct1WMZ.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-O3fB5J7V.js → vue-ui-3d-bar-Dul4M5zs.js} +7 -7
- package/dist/{vue-ui-accordion-DpI7fTKZ.cjs → vue-ui-accordion-XtygMpX7.cjs} +1 -1
- package/dist/{vue-ui-accordion-Dl8zkZPk.js → vue-ui-accordion-issoIPFd.js} +3 -3
- package/dist/{vue-ui-age-pyramid-BeiREI6d.js → vue-ui-age-pyramid-DnfnIupT.js} +8 -8
- package/dist/{vue-ui-age-pyramid-BsAfxkN4.cjs → vue-ui-age-pyramid-EsCLRd6s.cjs} +1 -1
- package/dist/{vue-ui-annotator-0yje27Qq.js → vue-ui-annotator-CmrenuBi.js} +1 -1
- package/dist/{vue-ui-annotator-DpN-6IwB.cjs → vue-ui-annotator-zFbcfeEs.cjs} +1 -1
- package/dist/{vue-ui-candlestick-lv78wnpS.cjs → vue-ui-candlestick-Bdo2RhhM.cjs} +1 -1
- package/dist/{vue-ui-candlestick-D9UteVvx.js → vue-ui-candlestick-DlwYwMdG.js} +9 -9
- package/dist/{vue-ui-carousel-table-Br6FwMKM.cjs → vue-ui-carousel-table-IN0an_Jc.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-jxZ3h5pq.js → vue-ui-carousel-table-mo9C1GJ9.js} +4 -4
- package/dist/{vue-ui-chestnut-DbYHeNaL.cjs → vue-ui-chestnut-C9jiVBGB.cjs} +1 -1
- package/dist/{vue-ui-chestnut-DXuHRJy4.js → vue-ui-chestnut-DUeStDzz.js} +6 -6
- package/dist/{vue-ui-cursor-iss6SJ1Y.cjs → vue-ui-cursor-BoetT349.cjs} +1 -1
- package/dist/{vue-ui-cursor-BzPbdVRJ.js → vue-ui-cursor-x_Ai6P6S.js} +2 -2
- package/dist/{vue-ui-dashboard-CGjWuFrI.js → vue-ui-dashboard-B8IRsFc3.js} +2 -2
- package/dist/{vue-ui-dashboard-DKT82yQ4.cjs → vue-ui-dashboard-DUH23G5u.cjs} +1 -1
- package/dist/{vue-ui-digits-BCguvLxB.js → vue-ui-digits-BO5Bxyib.js} +2 -2
- package/dist/{vue-ui-digits-BfwDCfYp.cjs → vue-ui-digits-ByNeTvE4.cjs} +1 -1
- package/dist/vue-ui-donut-CDizH2x3.cjs +1 -0
- package/dist/{vue-ui-donut-DJTeGLVG.js → vue-ui-donut-DC6mZWdM.js} +318 -318
- package/dist/{vue-ui-donut-evolution-BaLDZNDG.js → vue-ui-donut-evolution-B2U3g0Yw.js} +9 -9
- package/dist/{vue-ui-donut-evolution-Bil1AIhX.cjs → vue-ui-donut-evolution-B7G4UB_e.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-BqtDdV5w.js → vue-ui-dumbbell-81Azsrmw.js} +8 -8
- package/dist/{vue-ui-dumbbell-DiL3xhKY.cjs → vue-ui-dumbbell-DD7RtYjl.cjs} +1 -1
- package/dist/{vue-ui-flow-BVTbbsCK.cjs → vue-ui-flow-BbJmSWr4.cjs} +1 -1
- package/dist/{vue-ui-flow-zfTGon4s.js → vue-ui-flow-CTobijfD.js} +7 -7
- package/dist/{vue-ui-galaxy-5iRb5sQ-.js → vue-ui-galaxy-B9U-hTWd.js} +9 -9
- package/dist/{vue-ui-galaxy-GSO_6KIe.cjs → vue-ui-galaxy-BxkH3rZs.cjs} +1 -1
- package/dist/{vue-ui-gauge-DljHYdCS.js → vue-ui-gauge-BvS6Ep8K.js} +5 -5
- package/dist/{vue-ui-gauge-Bz7oLa51.cjs → vue-ui-gauge-DezT9Iw3.cjs} +1 -1
- package/dist/{vue-ui-gizmo-B-fxFOZy.js → vue-ui-gizmo-CCSV95Cw.js} +2 -2
- package/dist/{vue-ui-gizmo-KL0OJY2K.cjs → vue-ui-gizmo-CdGlyolL.cjs} +1 -1
- package/dist/{vue-ui-heatmap-ketn_NV3.js → vue-ui-heatmap-DQntMs3y.js} +8 -8
- package/dist/{vue-ui-heatmap-thMJPCfo.cjs → vue-ui-heatmap-Decb4BRV.cjs} +1 -1
- package/dist/{vue-ui-kpi-e1QWa8D4.cjs → vue-ui-kpi-MZSJlc3i.cjs} +1 -1
- package/dist/{vue-ui-kpi-Bxu8uZ21.js → vue-ui-kpi-yDsCX1qh.js} +3 -3
- package/dist/{vue-ui-mini-loader-BZ_2aV8O.js → vue-ui-mini-loader-DluKyWjA.js} +2 -2
- package/dist/{vue-ui-mini-loader-paRZQU8H.cjs → vue-ui-mini-loader-Dz3LxxFJ.cjs} +1 -1
- package/dist/{vue-ui-molecule-Bpp5unvI.js → vue-ui-molecule-BG1BbGts.js} +9 -9
- package/dist/{vue-ui-molecule-VOBL4Osc.cjs → vue-ui-molecule-rmhSL2tT.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BY8XP_Q5.js → vue-ui-mood-radar-EO6jRkGF.js} +9 -9
- package/dist/{vue-ui-mood-radar-CwtMLwP8.cjs → vue-ui-mood-radar-owAd1Twe.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-5uuLi3If.js → vue-ui-nested-donuts-HDfFuFhB.js} +302 -308
- package/dist/vue-ui-nested-donuts-u-4RFRIE.cjs +17 -0
- package/dist/{vue-ui-onion-CMSPSSSG.cjs → vue-ui-onion-BUOOD3WG.cjs} +1 -1
- package/dist/{vue-ui-onion-zDy4ecPl.js → vue-ui-onion-DqMY1iPE.js} +9 -9
- package/dist/{vue-ui-parallel-coordinate-plot-1PFxiI__.cjs → vue-ui-parallel-coordinate-plot-2JGpf8SJ.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-BeEkL7Dq.js → vue-ui-parallel-coordinate-plot-CUU74I_R.js} +10 -10
- package/dist/{vue-ui-quadrant-Cx5z_c90.cjs → vue-ui-quadrant-BXUtKBlK.cjs} +1 -1
- package/dist/{vue-ui-quadrant-MCIlbbsW.js → vue-ui-quadrant-BrbrrHLN.js} +10 -10
- package/dist/{vue-ui-quick-chart-r6Qa7qg_.js → vue-ui-quick-chart-BeJMzQZr.js} +7 -7
- package/dist/{vue-ui-quick-chart-Xn-47NQG.cjs → vue-ui-quick-chart-CNn9Wt0K.cjs} +1 -1
- package/dist/{vue-ui-radar-DFV5cFkl.js → vue-ui-radar-BMbWx0XC.js} +10 -10
- package/dist/{vue-ui-radar-ANQ1wXFc.cjs → vue-ui-radar-yFYbYYI9.cjs} +1 -1
- package/dist/{vue-ui-rating-BVzCbQbv.cjs → vue-ui-rating-Ckh6xyv1.cjs} +1 -1
- package/dist/{vue-ui-rating-DYu1EuJF.js → vue-ui-rating-D19QGpzZ.js} +2 -2
- package/dist/{vue-ui-relation-circle-BAcmDQB_.js → vue-ui-relation-circle-DqdXa6V6.js} +5 -5
- package/dist/{vue-ui-relation-circle-DEM6C6Or.cjs → vue-ui-relation-circle-YH6EpWSC.cjs} +1 -1
- package/dist/{vue-ui-rings-BiLlYpgu.js → vue-ui-rings-CDqf78PA.js} +9 -9
- package/dist/{vue-ui-rings-Ce4G4hat.cjs → vue-ui-rings-Dbi3uWQh.cjs} +1 -1
- package/dist/{vue-ui-scatter-OtlcTCUF.cjs → vue-ui-scatter-Ch3iYYoX.cjs} +1 -1
- package/dist/{vue-ui-scatter-D2ndYfkQ.js → vue-ui-scatter-D3IFY9II.js} +10 -10
- package/dist/{vue-ui-screenshot-DTQx4VsM.cjs → vue-ui-screenshot-DBmmftjw.cjs} +1 -1
- package/dist/{vue-ui-screenshot-CKCNPn-e.js → vue-ui-screenshot-Xtz1BC-w.js} +1 -1
- package/dist/{vue-ui-skeleton-CwqzJlQf.cjs → vue-ui-skeleton-Bx_kbjKr.cjs} +1 -1
- package/dist/{vue-ui-skeleton-B30ZhUV7.js → vue-ui-skeleton-C3UWXP3Q.js} +2 -2
- package/dist/{vue-ui-smiley-L6o24M6h.cjs → vue-ui-smiley-BCorPn2E.cjs} +1 -1
- package/dist/{vue-ui-smiley-DzLvZR1k.js → vue-ui-smiley-FhcqViE3.js} +2 -2
- package/dist/{vue-ui-spark-trend-BoWeviHk.cjs → vue-ui-spark-trend-C1BmsVRe.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-BKsmENbH.js → vue-ui-spark-trend-RJUm-CJC.js} +4 -4
- package/dist/{vue-ui-sparkbar-DNzZkp8z.js → vue-ui-sparkbar-C6sZ4mYK.js} +3 -3
- package/dist/{vue-ui-sparkbar-DY3iOLo4.cjs → vue-ui-sparkbar-CtQSQySy.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-B2DngjVP.js → vue-ui-sparkgauge-C1pOZo8V.js} +3 -3
- package/dist/{vue-ui-sparkgauge-BlZ-lJm4.cjs → vue-ui-sparkgauge-CoyqAUDp.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-BUBewgdH.cjs → vue-ui-sparkhistogram-DvBJHfyk.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-Co9N3BeQ.js → vue-ui-sparkhistogram-Mh93EuLF.js} +4 -4
- package/dist/{vue-ui-sparkline-BhL0mxXD.cjs → vue-ui-sparkline-CXIAmE5m.cjs} +1 -1
- package/dist/{vue-ui-sparkline-Dpqo4aRJ.js → vue-ui-sparkline-DiAIsoI3.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-_JwfRxF8.js → vue-ui-sparkstackbar-Bb8ZtMfn.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-DtNbx3EV.cjs → vue-ui-sparkstackbar-BePzQn-H.cjs} +1 -1
- package/dist/{vue-ui-stackbar-BtN7ZM7-.js → vue-ui-stackbar-B7KyGHZZ.js} +10 -10
- package/dist/{vue-ui-stackbar-C7AWHP6m.cjs → vue-ui-stackbar-BiNZ2pBZ.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-6L9a7BSw.js → vue-ui-strip-plot-8d_juyi7.js} +9 -9
- package/dist/{vue-ui-strip-plot-cgOFTunJ.cjs → vue-ui-strip-plot-CY5rDwjh.cjs} +1 -1
- package/dist/{vue-ui-table-BFYHRMCS.js → vue-ui-table-CSm91gHM.js} +1 -1
- package/dist/{vue-ui-table-4Pf9tmFg.cjs → vue-ui-table-CoGh4xvF.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap--kPCu8mA.js → vue-ui-table-heatmap-B30TipjK.js} +4 -4
- package/dist/{vue-ui-table-heatmap-CltKb2V9.cjs → vue-ui-table-heatmap-CwDproVr.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-B5OjJud8.cjs → vue-ui-table-sparkline-B8lCOsfc.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-CsWx1Ksy.js → vue-ui-table-sparkline-BcFIKA8V.js} +5 -5
- package/dist/{vue-ui-thermometer-nTD7sp8r.js → vue-ui-thermometer-CPqFKYwL.js} +5 -5
- package/dist/{vue-ui-thermometer-62_4QovL.cjs → vue-ui-thermometer-D6rDq4hj.cjs} +1 -1
- package/dist/{vue-ui-timer-BU0s7Vt9.cjs → vue-ui-timer-C70sw9Rc.cjs} +1 -1
- package/dist/{vue-ui-timer-DMFHjnzA.js → vue-ui-timer-DdQB8bF5.js} +4 -4
- package/dist/{vue-ui-tiremarks-1X9B1VKM.js → vue-ui-tiremarks-DDCOUKU9.js} +5 -5
- package/dist/{vue-ui-tiremarks-mwBeBMJY.cjs → vue-ui-tiremarks-o-KdCzZV.cjs} +1 -1
- package/dist/{vue-ui-treemap-CVTwqPFA.js → vue-ui-treemap-BOCZ8x4F.js} +9 -9
- package/dist/{vue-ui-treemap-DQmBbm7e.cjs → vue-ui-treemap-C3XRZk0P.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-BXiy8KRC.cjs → vue-ui-vertical-bar-C2ZIoY0I.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-Br6Z0A3F.js → vue-ui-vertical-bar-CAlQekf-.js} +9 -9
- package/dist/{vue-ui-waffle-DEXMh07q.js → vue-ui-waffle-CasLSUzY.js} +9 -9
- package/dist/{vue-ui-waffle-CLCsHw9j.cjs → vue-ui-waffle-D1eYO-NM.cjs} +1 -1
- package/dist/{vue-ui-wheel-DSFKKX65.cjs → vue-ui-wheel-C4ODblPX.cjs} +1 -1
- package/dist/{vue-ui-wheel-CwjuVi6U.js → vue-ui-wheel-CHn24pYD.js} +5 -5
- package/dist/{vue-ui-word-cloud-DZS4hCeR.cjs → vue-ui-word-cloud-XCS_A5_a.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-BKeD3fHb.js → vue-ui-word-cloud-uGJLXPYv.js} +7 -7
- package/dist/{vue-ui-xy-B5aCogSL.cjs → vue-ui-xy-CH9wvh8w.cjs} +1 -1
- package/dist/{vue-ui-xy-DA3qqL8u.js → vue-ui-xy-KnfMOUv4.js} +12 -12
- package/dist/{vue-ui-xy-canvas-B7DH4RK5.js → vue-ui-xy-canvas-DVjSzeFt.js} +10 -10
- package/dist/{vue-ui-xy-canvas-heCdqh5X.cjs → vue-ui-xy-canvas-Yy7FaFLS.cjs} +1 -1
- package/package.json +1 -1
- package/dist/vue-ui-donut-uVPdO4UH.cjs +0 -1
- package/dist/vue-ui-nested-donuts-CLnVnAiD.cjs +0 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=require("./index-
|
|
1
|
+
"use strict";const r=require("./index-BofUHMEw.cjs");function o({defaultConfig:e,userConfig:t}){if(!Object.keys(t||{}).length)return e;const n=r.treeShake({defaultConfig:e,userConfig:t});return r.convertConfigColors(n)}exports.useNestedProp=o;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref as k, onMounted as q, onBeforeUnmount as H, withDirectives as R, openBlock as t, createElementBlock as s, normalizeStyle as d, createElementVNode as w, withModifiers as x, withKeys as G, createVNode as J, normalizeClass as c, renderSlot as m, Fragment as M, createBlock as f, toDisplayString as $, createCommentVNode as u, normalizeProps as h, mergeProps as z, unref as Q } from "vue";
|
|
2
|
-
import v from "./BaseIcon-
|
|
2
|
+
import v from "./BaseIcon-BhdIp3HQ.js";
|
|
3
3
|
import { _ as Y } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
import { p as Z } from "./pdf-97UbtKC2.js";
|
|
5
5
|
import _ from "./html2canvas.esm-d2sM-0Wm.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),i=require("./BaseIcon-Bcpzfk34.cjs"),L=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A=require("./pdf-Cz3729tZ.cjs"),O=require("./html2canvas.esm-BA_v9SIU.cjs"),w={beforeMount(t,u){t.clickOutsideEvent=function(s){t===s.target||t.contains(s.target)||u.value(s)},document.addEventListener("click",t.clickOutsideEvent)},unmounted(t){document.removeEventListener("click",t.clickOutsideEvent)}},D=["title","onClick","onKeypress"],h=["data-open"],q={__name:"UserOptions",props:{hasPdf:{type:Boolean,default:!0},hasXls:{type:Boolean,default:!0},hasImg:{type:Boolean,default:!1},hasLabel:{type:Boolean,default:!1},isLabelActive:{type:Boolean,default:!1},hasTable:{type:Boolean,default:!1},hasSort:{type:Boolean,default:!1},hasStack:{type:Boolean,default:!1},hasTooltip:{type:Boolean,default:!1},color:{type:String},backgroundColor:{type:String},isPrinting:{type:Boolean,default:!1},isImaging:{type:Boolean,default:!1},title:{type:String},uid:{type:String},hasFullscreen:{type:Boolean,default:!1},chartElement:{type:HTMLElement,default:null},isFullscreen:{type:Boolean,default:!1},isStacked:{type:Boolean,default:!1},isTooltip:{type:Boolean,default:!1},hasAnimation:{type:Boolean,default:!1},isAnimation:{type:Boolean,default:!1},titles:{type:Object,default(){return{}}},showTooltips:{type:Boolean,default:!0},zIndex:{type:Number,default:1},noOffset:{type:Boolean,default:!1}},emits:["generatePdf","generateCsv","generateImage","toggleTable","toggleLabels","toggleSort","toggleFullscreen","toggleStack","toggleTooltip","toggleAnimation"],setup(t,{emit:u}){const s=t;function v(){u("generatePdf")}function f(){u("generateCsv")}function d(){u("generateImage")}const c=e.ref(!1);function z(){c.value=!c.value,u("toggleTable")}const m=e.ref(!1),V=e.ref(!0);function C(){r.value=window.innerWidth>600,m.value=!m.value,m.value&&(V.value=!1)}function N(){s.isPrinting||s.isImaging||(m.value=!1)}function T(){m.value&&N()}const y=e.ref(s.isLabelActive);function I(){y.value=!y.value,u("toggleLabels")}const g=e.ref(s.isAnimation);function p(){g.value=!g.value,u("toggleAnimation")}function M(){u("toggleSort")}const b=e.ref(s.isStacked);function F(){b.value=!b.value,u("toggleStack")}const B=e.ref(s.isTooltip);function P(){B.value=!B.value,u("toggleTooltip")}const k=e.ref(!1);function $(l){s.chartElement&&(l==="in"?(k.value=!0,s.chartElement.requestFullscreen(),u("toggleFullscreen",!0)):(k.value=!1,document&&document.exitFullscreen(),u("toggleFullscreen",!1)))}function S(l){document.fullscreenElement?k.value=!0:k.value=!1}e.onMounted(()=>{document.addEventListener("fullscreenchange",S)}),e.onBeforeUnmount(()=>{document.removeEventListener("fullscreenchange",S)});const r=e.ref(window.innerWidth>600),n=e.ref({tooltip:!1,pdf:!1,csv:!1,img:!1,table:!1,labels:!1,sort:!1,stack:!1,fullscreen:!1,animation:!1});return(l,o)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{"data-html2canvas-ignore":"",class:"vue-ui-user-options",style:e.normalizeStyle(`z-index: ${t.zIndex}; height: 34px; position: ${k.value?"fixed":"absolute"}; top: 0; right:${k.value?"12px":"0"}; padding: 4px; background:transparent;`)},[e.createElementVNode("div",{tabindex:"0",title:m.value?t.titles.close||"":t.titles.open||"",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; right: ${t.noOffset?0:4}px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; cursor:pointer; background:${t.backgroundColor}`),onClick:e.withModifiers(C,["stop"]),onKeypress:e.withKeys(C,["enter"])},[e.createVNode(i.default,{name:m.value?"close":"menu",stroke:"#CCCCCC","stroke-width":2},null,8,["name"])],44,D),e.createElementVNode("div",{"data-open":m.value,class:e.normalizeClass({"vue-ui-user-options-drawer":!0}),style:e.normalizeStyle(`background:${t.backgroundColor}; right:${t.noOffset?0:4}px`)},[t.hasTooltip?(e.openBlock(),e.createElementBlock("button",{key:0,tabindex:"0",class:"vue-ui-user-options-button",onClick:P,onMouseenter:o[0]||(o[0]=a=>n.value.tooltip=!0),onMouseout:o[1]||(o[1]=a=>n.value.tooltip=!1)},[l.$slots.optionTooltip?e.renderSlot(l.$slots,"optionTooltip",{key:0},void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[B.value?(e.openBlock(),e.createBlock(i.default,{key:0,name:"tooltip",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])):(e.openBlock(),e.createBlock(i.default,{key:1,name:"tooltipDisabled",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"]))],64)),r.value&&t.titles.tooltip&&!l.$slots.optionTooltip?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.tooltip}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.tooltip),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasPdf?(e.openBlock(),e.createElementBlock("button",{key:1,tabindex:"0",class:"vue-ui-user-options-button",onClick:v,onMouseenter:o[2]||(o[2]=a=>n.value.pdf=!0),onMouseout:o[3]||(o[3]=a=>n.value.pdf=!1)},[l.$slots.optionPdf?e.renderSlot(l.$slots,"optionPdf",{key:0},void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.isPrinting?(e.openBlock(),e.createBlock(i.default,{key:0,name:"spin",isSpin:"",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])):(e.openBlock(),e.createBlock(i.default,{key:1,name:"pdf",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"]))],64)),r.value&&t.titles.pdf&&!l.$slots.optionPdf?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.pdf}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.pdf),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasXls?(e.openBlock(),e.createElementBlock("button",{key:2,tabindex:"0",class:"vue-ui-user-options-button",onClick:f,onMouseenter:o[4]||(o[4]=a=>n.value.csv=!0),onMouseout:o[5]||(o[5]=a=>n.value.csv=!1)},[l.$slots.optionCsv?e.renderSlot(l.$slots,"optionCsv",{key:0},void 0,!0):(e.openBlock(),e.createBlock(i.default,{key:1,name:"excel",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])),r.value&&t.titles.csv&&!l.$slots.optionCsv?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.csv}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.csv),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasImg?(e.openBlock(),e.createElementBlock("button",{key:3,tabindex:"0",class:"vue-ui-user-options-button",onClick:d,onMouseenter:o[6]||(o[6]=a=>n.value.img=!0),onMouseout:o[7]||(o[7]=a=>n.value.img=!1)},[l.$slots.optionImg?e.renderSlot(l.$slots,"optionImg",{key:0},void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.isImaging?(e.openBlock(),e.createBlock(i.default,{key:0,name:"spin",isSpin:"",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])):(e.openBlock(),e.createBlock(i.default,{key:1,name:"image",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"]))],64)),r.value&&t.titles.img&&!l.$slots.optionImg?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.img}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.img),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasTable?(e.openBlock(),e.createElementBlock("button",{key:4,tabindex:"0",class:"vue-ui-user-options-button",onClick:z,onMouseenter:o[8]||(o[8]=a=>n.value.table=!0),onMouseout:o[9]||(o[9]=a=>n.value.table=!1)},[l.$slots.optionTable?e.renderSlot(l.$slots,"optionTable",{key:0},void 0,!0):(e.openBlock(),e.createBlock(i.default,{key:1,name:c.value?"tableClose":"tableOpen",stroke:t.color,style:{"pointer-events":"none"}},null,8,["name","stroke"])),r.value&&t.titles.table&&!l.$slots.optionTable?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.table}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.table),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasLabel?(e.openBlock(),e.createElementBlock("button",{key:5,tabindex:"0",class:"vue-ui-user-options-button",onClick:I,onMouseenter:o[10]||(o[10]=a=>n.value.labels=!0),onMouseout:o[11]||(o[11]=a=>n.value.labels=!1)},[l.$slots.optionLabels?e.renderSlot(l.$slots,"optionLabels",{key:0},void 0,!0):(e.openBlock(),e.createBlock(i.default,{key:1,name:y.value?"labelClose":"labelOpen",stroke:t.color,style:{"pointer-events":"none"}},null,8,["name","stroke"])),r.value&&t.titles.labels&&!l.$slots.optionLabels?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.labels}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.labels),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasSort?(e.openBlock(),e.createElementBlock("button",{key:6,tabindex:"0",class:"vue-ui-user-options-button",onClick:M,onMouseenter:o[12]||(o[12]=a=>n.value.sort=!0),onMouseout:o[13]||(o[13]=a=>n.value.sort=!1)},[l.$slots.optionSort?e.renderSlot(l.$slots,"optionSort",{key:0},void 0,!0):(e.openBlock(),e.createBlock(i.default,{key:1,name:"sort",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])),r.value&&t.titles.sort&&!l.$slots.optionSort?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.sort}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.sort),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasStack?(e.openBlock(),e.createElementBlock("button",{key:7,tabindex:"0",class:"vue-ui-user-options-button",onClick:F,onMouseenter:o[14]||(o[14]=a=>n.value.stack=!0),onMouseout:o[15]||(o[15]=a=>n.value.stack=!1)},[l.$slots.optionStack?e.renderSlot(l.$slots,"optionStack",{key:0},void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[b.value?(e.openBlock(),e.createBlock(i.default,{key:0,name:"unstack",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])):(e.openBlock(),e.createBlock(i.default,{key:1,name:"stack",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"]))],64)),r.value&&t.titles.stack&&!l.$slots.optionStack?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.stack}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.stack),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasFullscreen?(e.openBlock(),e.createElementBlock("button",{key:8,tabindex:"0",class:"vue-ui-user-options-button",onMouseenter:o[16]||(o[16]=a=>n.value.fullscreen=!0),onMouseout:o[17]||(o[17]=a=>n.value.fullscreen=!1),onClick:o[18]||(o[18]=a=>$(k.value?"out":"in"))},[l.$slots.optionFullscreen?e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.mergeProps({key:0},{toggleFullscreen:$,isFullscreen:k.value})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[k.value?(e.openBlock(),e.createBlock(i.default,{key:0,name:"exitFullscreen",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(i.default,{key:1,name:"fullscreen",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"]))],64)),r.value&&t.titles.fullscreen&&!l.$slots.optionFullscreen?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.fullscreen}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.fullscreen),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasAnimation?(e.openBlock(),e.createElementBlock("button",{key:9,tabindex:"0",class:"vue-ui-user-options-button",onMouseenter:o[19]||(o[19]=a=>n.value.animation=!0),onMouseout:o[20]||(o[20]=a=>n.value.animation=!1),onClick:p},[l.$slots.optionAnimation?e.renderSlot(l.$slots,"optionAnimation",e.normalizeProps(e.mergeProps({key:0},{toggleAnimation:p,isAnimated:g.value})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[g.value?(e.openBlock(),e.createBlock(i.default,{key:0,name:"play",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(i.default,{key:1,name:"pause",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"]))],64)),r.value&&t.titles.fullscreen&&!l.$slots.optionAnimation?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.animation}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.animation),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0)],12,h)],4)),[[e.unref(w),T]])}},U=L._export_sfc(q,[["__scopeId","data-v-d4402778"]]);function E({domElement:t,fileName:u,format:s="png"}){if(t)return new Promise((v,f)=>{const d=document.createElement("a");O.default(t,{scale:2}).then(c=>{d.href=c.toDataURL(`image/${s}`),d.download=`${u}.${s}`,d.click(),d&&d.remove(),v()}).catch(c=>{console.error("Error generating image:",c),f(c)})})}function K({elementId:t,fileName:u}){const s=e.ref(!1),v=e.ref(!1),f=e.ref(null);function d(){s.value=!0,clearTimeout(f.value),f.value=setTimeout(()=>{A.pdf({domElement:document.getElementById(t),fileName:u}).finally(()=>{s.value=!1})},100)}function c(){v.value=!0,clearTimeout(f.value),f.value=setTimeout(()=>{E({domElement:document.getElementById(t),fileName:u,format:"png"}).finally(()=>{v.value=!1},100)})}return{generatePdf:d,generateImage:c,isPrinting:s,isImaging:v}}exports.UserOptions=U;exports.saveAsImage=E;exports.usePrinter=K;
|
|
1
|
+
"use strict";const e=require("vue"),i=require("./BaseIcon-DU-oJKBy.cjs"),L=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A=require("./pdf-Cz3729tZ.cjs"),O=require("./html2canvas.esm-BA_v9SIU.cjs"),w={beforeMount(t,u){t.clickOutsideEvent=function(s){t===s.target||t.contains(s.target)||u.value(s)},document.addEventListener("click",t.clickOutsideEvent)},unmounted(t){document.removeEventListener("click",t.clickOutsideEvent)}},D=["title","onClick","onKeypress"],h=["data-open"],q={__name:"UserOptions",props:{hasPdf:{type:Boolean,default:!0},hasXls:{type:Boolean,default:!0},hasImg:{type:Boolean,default:!1},hasLabel:{type:Boolean,default:!1},isLabelActive:{type:Boolean,default:!1},hasTable:{type:Boolean,default:!1},hasSort:{type:Boolean,default:!1},hasStack:{type:Boolean,default:!1},hasTooltip:{type:Boolean,default:!1},color:{type:String},backgroundColor:{type:String},isPrinting:{type:Boolean,default:!1},isImaging:{type:Boolean,default:!1},title:{type:String},uid:{type:String},hasFullscreen:{type:Boolean,default:!1},chartElement:{type:HTMLElement,default:null},isFullscreen:{type:Boolean,default:!1},isStacked:{type:Boolean,default:!1},isTooltip:{type:Boolean,default:!1},hasAnimation:{type:Boolean,default:!1},isAnimation:{type:Boolean,default:!1},titles:{type:Object,default(){return{}}},showTooltips:{type:Boolean,default:!0},zIndex:{type:Number,default:1},noOffset:{type:Boolean,default:!1}},emits:["generatePdf","generateCsv","generateImage","toggleTable","toggleLabels","toggleSort","toggleFullscreen","toggleStack","toggleTooltip","toggleAnimation"],setup(t,{emit:u}){const s=t;function v(){u("generatePdf")}function f(){u("generateCsv")}function d(){u("generateImage")}const c=e.ref(!1);function z(){c.value=!c.value,u("toggleTable")}const m=e.ref(!1),V=e.ref(!0);function C(){r.value=window.innerWidth>600,m.value=!m.value,m.value&&(V.value=!1)}function N(){s.isPrinting||s.isImaging||(m.value=!1)}function T(){m.value&&N()}const y=e.ref(s.isLabelActive);function I(){y.value=!y.value,u("toggleLabels")}const g=e.ref(s.isAnimation);function p(){g.value=!g.value,u("toggleAnimation")}function M(){u("toggleSort")}const b=e.ref(s.isStacked);function F(){b.value=!b.value,u("toggleStack")}const B=e.ref(s.isTooltip);function P(){B.value=!B.value,u("toggleTooltip")}const k=e.ref(!1);function $(l){s.chartElement&&(l==="in"?(k.value=!0,s.chartElement.requestFullscreen(),u("toggleFullscreen",!0)):(k.value=!1,document&&document.exitFullscreen(),u("toggleFullscreen",!1)))}function S(l){document.fullscreenElement?k.value=!0:k.value=!1}e.onMounted(()=>{document.addEventListener("fullscreenchange",S)}),e.onBeforeUnmount(()=>{document.removeEventListener("fullscreenchange",S)});const r=e.ref(window.innerWidth>600),n=e.ref({tooltip:!1,pdf:!1,csv:!1,img:!1,table:!1,labels:!1,sort:!1,stack:!1,fullscreen:!1,animation:!1});return(l,o)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{"data-html2canvas-ignore":"",class:"vue-ui-user-options",style:e.normalizeStyle(`z-index: ${t.zIndex}; height: 34px; position: ${k.value?"fixed":"absolute"}; top: 0; right:${k.value?"12px":"0"}; padding: 4px; background:transparent;`)},[e.createElementVNode("div",{tabindex:"0",title:m.value?t.titles.close||"":t.titles.open||"",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; right: ${t.noOffset?0:4}px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; cursor:pointer; background:${t.backgroundColor}`),onClick:e.withModifiers(C,["stop"]),onKeypress:e.withKeys(C,["enter"])},[e.createVNode(i.default,{name:m.value?"close":"menu",stroke:"#CCCCCC","stroke-width":2},null,8,["name"])],44,D),e.createElementVNode("div",{"data-open":m.value,class:e.normalizeClass({"vue-ui-user-options-drawer":!0}),style:e.normalizeStyle(`background:${t.backgroundColor}; right:${t.noOffset?0:4}px`)},[t.hasTooltip?(e.openBlock(),e.createElementBlock("button",{key:0,tabindex:"0",class:"vue-ui-user-options-button",onClick:P,onMouseenter:o[0]||(o[0]=a=>n.value.tooltip=!0),onMouseout:o[1]||(o[1]=a=>n.value.tooltip=!1)},[l.$slots.optionTooltip?e.renderSlot(l.$slots,"optionTooltip",{key:0},void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[B.value?(e.openBlock(),e.createBlock(i.default,{key:0,name:"tooltip",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])):(e.openBlock(),e.createBlock(i.default,{key:1,name:"tooltipDisabled",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"]))],64)),r.value&&t.titles.tooltip&&!l.$slots.optionTooltip?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.tooltip}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.tooltip),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasPdf?(e.openBlock(),e.createElementBlock("button",{key:1,tabindex:"0",class:"vue-ui-user-options-button",onClick:v,onMouseenter:o[2]||(o[2]=a=>n.value.pdf=!0),onMouseout:o[3]||(o[3]=a=>n.value.pdf=!1)},[l.$slots.optionPdf?e.renderSlot(l.$slots,"optionPdf",{key:0},void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.isPrinting?(e.openBlock(),e.createBlock(i.default,{key:0,name:"spin",isSpin:"",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])):(e.openBlock(),e.createBlock(i.default,{key:1,name:"pdf",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"]))],64)),r.value&&t.titles.pdf&&!l.$slots.optionPdf?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.pdf}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.pdf),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasXls?(e.openBlock(),e.createElementBlock("button",{key:2,tabindex:"0",class:"vue-ui-user-options-button",onClick:f,onMouseenter:o[4]||(o[4]=a=>n.value.csv=!0),onMouseout:o[5]||(o[5]=a=>n.value.csv=!1)},[l.$slots.optionCsv?e.renderSlot(l.$slots,"optionCsv",{key:0},void 0,!0):(e.openBlock(),e.createBlock(i.default,{key:1,name:"excel",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])),r.value&&t.titles.csv&&!l.$slots.optionCsv?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.csv}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.csv),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasImg?(e.openBlock(),e.createElementBlock("button",{key:3,tabindex:"0",class:"vue-ui-user-options-button",onClick:d,onMouseenter:o[6]||(o[6]=a=>n.value.img=!0),onMouseout:o[7]||(o[7]=a=>n.value.img=!1)},[l.$slots.optionImg?e.renderSlot(l.$slots,"optionImg",{key:0},void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.isImaging?(e.openBlock(),e.createBlock(i.default,{key:0,name:"spin",isSpin:"",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])):(e.openBlock(),e.createBlock(i.default,{key:1,name:"image",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"]))],64)),r.value&&t.titles.img&&!l.$slots.optionImg?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.img}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.img),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasTable?(e.openBlock(),e.createElementBlock("button",{key:4,tabindex:"0",class:"vue-ui-user-options-button",onClick:z,onMouseenter:o[8]||(o[8]=a=>n.value.table=!0),onMouseout:o[9]||(o[9]=a=>n.value.table=!1)},[l.$slots.optionTable?e.renderSlot(l.$slots,"optionTable",{key:0},void 0,!0):(e.openBlock(),e.createBlock(i.default,{key:1,name:c.value?"tableClose":"tableOpen",stroke:t.color,style:{"pointer-events":"none"}},null,8,["name","stroke"])),r.value&&t.titles.table&&!l.$slots.optionTable?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.table}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.table),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasLabel?(e.openBlock(),e.createElementBlock("button",{key:5,tabindex:"0",class:"vue-ui-user-options-button",onClick:I,onMouseenter:o[10]||(o[10]=a=>n.value.labels=!0),onMouseout:o[11]||(o[11]=a=>n.value.labels=!1)},[l.$slots.optionLabels?e.renderSlot(l.$slots,"optionLabels",{key:0},void 0,!0):(e.openBlock(),e.createBlock(i.default,{key:1,name:y.value?"labelClose":"labelOpen",stroke:t.color,style:{"pointer-events":"none"}},null,8,["name","stroke"])),r.value&&t.titles.labels&&!l.$slots.optionLabels?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.labels}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.labels),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasSort?(e.openBlock(),e.createElementBlock("button",{key:6,tabindex:"0",class:"vue-ui-user-options-button",onClick:M,onMouseenter:o[12]||(o[12]=a=>n.value.sort=!0),onMouseout:o[13]||(o[13]=a=>n.value.sort=!1)},[l.$slots.optionSort?e.renderSlot(l.$slots,"optionSort",{key:0},void 0,!0):(e.openBlock(),e.createBlock(i.default,{key:1,name:"sort",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])),r.value&&t.titles.sort&&!l.$slots.optionSort?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.sort}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.sort),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasStack?(e.openBlock(),e.createElementBlock("button",{key:7,tabindex:"0",class:"vue-ui-user-options-button",onClick:F,onMouseenter:o[14]||(o[14]=a=>n.value.stack=!0),onMouseout:o[15]||(o[15]=a=>n.value.stack=!1)},[l.$slots.optionStack?e.renderSlot(l.$slots,"optionStack",{key:0},void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[b.value?(e.openBlock(),e.createBlock(i.default,{key:0,name:"unstack",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])):(e.openBlock(),e.createBlock(i.default,{key:1,name:"stack",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"]))],64)),r.value&&t.titles.stack&&!l.$slots.optionStack?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.stack}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.stack),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasFullscreen?(e.openBlock(),e.createElementBlock("button",{key:8,tabindex:"0",class:"vue-ui-user-options-button",onMouseenter:o[16]||(o[16]=a=>n.value.fullscreen=!0),onMouseout:o[17]||(o[17]=a=>n.value.fullscreen=!1),onClick:o[18]||(o[18]=a=>$(k.value?"out":"in"))},[l.$slots.optionFullscreen?e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.mergeProps({key:0},{toggleFullscreen:$,isFullscreen:k.value})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[k.value?(e.openBlock(),e.createBlock(i.default,{key:0,name:"exitFullscreen",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(i.default,{key:1,name:"fullscreen",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"]))],64)),r.value&&t.titles.fullscreen&&!l.$slots.optionFullscreen?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.fullscreen}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.fullscreen),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasAnimation?(e.openBlock(),e.createElementBlock("button",{key:9,tabindex:"0",class:"vue-ui-user-options-button",onMouseenter:o[19]||(o[19]=a=>n.value.animation=!0),onMouseout:o[20]||(o[20]=a=>n.value.animation=!1),onClick:p},[l.$slots.optionAnimation?e.renderSlot(l.$slots,"optionAnimation",e.normalizeProps(e.mergeProps({key:0},{toggleAnimation:p,isAnimated:g.value})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[g.value?(e.openBlock(),e.createBlock(i.default,{key:0,name:"play",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(i.default,{key:1,name:"pause",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"]))],64)),r.value&&t.titles.fullscreen&&!l.$slots.optionAnimation?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.animation}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.animation),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0)],12,h)],4)),[[e.unref(w),T]])}},U=L._export_sfc(q,[["__scopeId","data-v-d4402778"]]);function E({domElement:t,fileName:u,format:s="png"}){if(t)return new Promise((v,f)=>{const d=document.createElement("a");O.default(t,{scale:2}).then(c=>{d.href=c.toDataURL(`image/${s}`),d.download=`${u}.${s}`,d.click(),d&&d.remove(),v()}).catch(c=>{console.error("Error generating image:",c),f(c)})})}function K({elementId:t,fileName:u}){const s=e.ref(!1),v=e.ref(!1),f=e.ref(null);function d(){s.value=!0,clearTimeout(f.value),f.value=setTimeout(()=>{A.pdf({domElement:document.getElementById(t),fileName:u}).finally(()=>{s.value=!1})},100)}function c(){v.value=!0,clearTimeout(f.value),f.value=setTimeout(()=>{E({domElement:document.getElementById(t),fileName:u,format:"png"}).finally(()=>{v.value=!1},100)})}return{generatePdf:d,generateImage:c,isPrinting:s,isImaging:v}}exports.UserOptions=U;exports.saveAsImage=E;exports.usePrinter=K;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),j=require("./BaseIcon-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),j=require("./BaseIcon-DU-oJKBy.cjs"),Q={key:0,style:{width:"100%",display:"flex",gap:"6px","align-items":"center",color:"#FF0000"}},$={style:{width:"36px"}},z={__name:"vue-data-ui",props:{component:{type:String},dataset:{type:[Object,Array,Number,String]},config:{type:Object}},emits:["selectLegend","selectDatapoint","toggleOpenState","saveAnnotations","selectRoot","selectBranch","selectNut","change","selectPlot","selectSide","rate","postImage","hoverIndex","selectX","toggleLock","toggleTooltip","start","play","pause","reset","restart","lap"],setup(I,{expose:B,emit:E}){const i=I,{component:H,dataset:O,config:N}=e.toRefs(i),a={VueUi3dBar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-3d-bar-Clct1WMZ.cjs"))),VueUiAgePyramid:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-age-pyramid-EsCLRd6s.cjs"))),VueUiAnnotator:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-annotator-zFbcfeEs.cjs"))),VueUiCandlestick:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-candlestick-Bdo2RhhM.cjs"))),VueUiChestnut:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-chestnut-C9jiVBGB.cjs"))),VueUiDashboard:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-dashboard-DUH23G5u.cjs"))),VueUiDigits:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-digits-ByNeTvE4.cjs"))),VueUiDonut:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-donut-CDizH2x3.cjs"))),VueUiDonutEvolution:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-donut-evolution-B7G4UB_e.cjs"))),VueUiGalaxy:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-galaxy-BxkH3rZs.cjs"))),VueUiGauge:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-gauge-DezT9Iw3.cjs"))),VueUiHeatmap:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-heatmap-Decb4BRV.cjs"))),VueUiKpi:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-kpi-MZSJlc3i.cjs"))),VueUiMiniLoader:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-mini-loader-Dz3LxxFJ.cjs"))),VueUiMolecule:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-molecule-rmhSL2tT.cjs"))),VueUiMoodRadar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-mood-radar-owAd1Twe.cjs"))),VueUiNestedDonuts:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-nested-donuts-u-4RFRIE.cjs"))),VueUiOnion:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-onion-BUOOD3WG.cjs"))),VueUiQuadrant:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-quadrant-BXUtKBlK.cjs"))),VueUiRadar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-radar-yFYbYYI9.cjs"))),VueUiRating:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-rating-Ckh6xyv1.cjs"))),VueUiRelationCircle:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-relation-circle-YH6EpWSC.cjs"))),VueUiRings:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-rings-Dbi3uWQh.cjs"))),VueUiScatter:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-scatter-Ch3iYYoX.cjs"))),VueUiScreenshot:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-screenshot-DBmmftjw.cjs"))),VueUiSkeleton:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-skeleton-Bx_kbjKr.cjs"))),VueUiSmiley:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-smiley-BCorPn2E.cjs"))),VueUiSparkbar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-sparkbar-CtQSQySy.cjs"))),VueUiSparkgauge:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-sparkgauge-CoyqAUDp.cjs"))),VueUiSparkHistogram:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-sparkhistogram-DvBJHfyk.cjs"))),VueUiSparkline:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-sparkline-CXIAmE5m.cjs"))),VueUiSparkStackbar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-sparkstackbar-BePzQn-H.cjs"))),VueUiTable:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-table-CoGh4xvF.cjs"))),VueUiTableSparkline:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-table-sparkline-B8lCOsfc.cjs"))),VueUiThermometer:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-thermometer-D6rDq4hj.cjs"))),VueUiTiremarks:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-tiremarks-o-KdCzZV.cjs"))),VueUiTreemap:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-treemap-C3XRZk0P.cjs"))),VueUiVerticalBar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-vertical-bar-C2ZIoY0I.cjs"))),VueUiWaffle:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-waffle-D1eYO-NM.cjs"))),VueUiWheel:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-wheel-C4ODblPX.cjs"))),VueUiXy:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-xy-CH9wvh8w.cjs"))),VueUiTableHeatmap:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-table-heatmap-CwDproVr.cjs"))),VueUiAccordion:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-accordion-XtygMpX7.cjs"))),VueUiQuickChart:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-quick-chart-CNn9Wt0K.cjs"))),VueUiCursor:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-cursor-BoetT349.cjs"))),VueUiSparkTrend:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-spark-trend-C1BmsVRe.cjs"))),VueUiStripPlot:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-strip-plot-CY5rDwjh.cjs"))),VueUiDumbbell:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-dumbbell-DD7RtYjl.cjs"))),VueUiWordCloud:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-word-cloud-XCS_A5_a.cjs"))),VueUiXyCanvas:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-xy-canvas-Yy7FaFLS.cjs"))),VueUiFlow:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-flow-BbJmSWr4.cjs"))),VueUiParallelCoordinatePlot:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-parallel-coordinate-plot-2JGpf8SJ.cjs"))),VueUiTimer:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-timer-C70sw9Rc.cjs"))),VueUiCarouselTable:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-carousel-table-IN0an_Jc.cjs"))),VueUiGizmo:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-gizmo-CdGlyolL.cjs"))),VueUiStackbar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-stackbar-BiNZ2pBZ.cjs")))},M={VueUi3dBar:["config","dataset"],VueUiAgePyramid:["config","dataset"],VueUiAnnotator:["config","dataset"],VueUiCandlestick:["config","dataset"],VueUiChestnut:["config","dataset"],VueUiDashboard:["config","dataset"],VueUiDigits:["config","dataset"],VueUiDonut:["config","dataset"],VueUiDonutEvolution:["config","dataset"],VueUiGalaxy:["config","dataset"],VueUiGauge:["config","dataset"],VueUiHeatmap:["config","dataset"],VueUiKpi:["config","dataset"],VueUiMiniLoader:["config"],VueUiMolecule:["config","dataset"],VueUiMoodRadar:["config","dataset"],VueUiNestedDonuts:["config","dataset"],VueUiOnion:["config","dataset"],VueUiQuadrant:["config","dataset"],VueUiRadar:["config","dataset"],VueUiRating:["config","dataset"],VueUiRelationCircle:["config","dataset"],VueUiRings:["config","dataset"],VueUiScatter:["config","dataset"],VueUiScreenshot:["config"],VueUiSkeleton:["config"],VueUiSmiley:["config","dataset"],VueUiSparkbar:["config","dataset"],VueUiSparkgauge:["config","dataset"],VueUiSparkHistogram:["config","dataset"],VueUiSparkline:["config","dataset"],VueUiSparkStackbar:["config","dataset"],VueUiTable:["config","dataset"],VueUiTableSparkline:["config","dataset"],VueUiThermometer:["config","dataset"],VueUiTiremarks:["config","dataset"],VueUiTreemap:["config","dataset"],VueUiVerticalBar:["config","dataset"],VueUiWaffle:["config","dataset"],VueUiWheel:["config","dataset"],VueUiXy:["config","dataset"],VueUiTableHeatmap:["config","dataset"],VueUiAccordion:["config"],VueUiQuickChart:["config","dataset"],VueUiCursor:["config"],VueUiSparkTrend:["config","dataset"],VueUiStripPlot:["config","dataset"],VueUiDumbbell:["config","dataset"],VueUiWordCloud:["config","dataset"],VueUiXyCanvas:["config","dataset"],VueUiFlow:["config","dataset"],VueUiParallelCoordinatePlot:["config","dataset"],VueUiTimer:["config"],VueUiCarouselTable:["config","dataset"],VueUiGizmo:["config","dataset"],VueUiStackbar:["config","dataset"]},u=e.computed(()=>!a[i.component]),F=e.computed(()=>a[i.component]||null),t=e.ref(null),G=e.computed(()=>{const o=M[i.component]||[],n={};return o.includes("config")&&(n.config=N.value),o.includes("dataset")&&(n.dataset=O.value),n}),c=e.ref(()=>null),m=e.ref(()=>null),d=e.ref(()=>null),g=e.ref(()=>null),p=e.ref(()=>null),f=e.ref(()=>null),V=e.ref(()=>null),v=e.ref(()=>null),U=e.ref(()=>null),h=e.ref(()=>null),y=e.ref(()=>null),C=e.ref(()=>null),A=e.ref(()=>null),P=e.ref(()=>null),q=e.ref(()=>null),S=e.ref(()=>null),k=e.ref(()=>null),b=e.ref(()=>null),T=e.ref(()=>null),D=e.ref(()=>null),L=e.ref(()=>null),_=e.ref(()=>null),x=e.ref(()=>null);e.onMounted(()=>{if(u.value)throw new Error(`
|
|
2
2
|
|
|
3
3
|
Vue Data UI exception:
|
|
4
4
|
The provided component "${i.component}" does not exist. Check the spelling.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { toRefs as q, defineAsyncComponent as t, computed as c, ref as o, onMounted as J, watch as B, shallowReactive as Y, openBlock as O, createElementBlock as Z, createElementVNode as R, createVNode as w, createTextVNode as ee, toDisplayString as te, unref as oe, createBlock as ie, resolveDynamicComponent as ae, mergeProps as ne, toHandlers as re, createSlots as le, renderList as se, withCtx as ue, renderSlot as ce, normalizeProps as ge, guardReactiveProps as pe } from "vue";
|
|
2
|
-
import me from "./BaseIcon-
|
|
2
|
+
import me from "./BaseIcon-BhdIp3HQ.js";
|
|
3
3
|
const de = {
|
|
4
4
|
key: 0,
|
|
5
5
|
style: { width: "100%", display: "flex", gap: "6px", "align-items": "center", color: "#FF0000" }
|
|
@@ -36,62 +36,62 @@ const de = {
|
|
|
36
36
|
],
|
|
37
37
|
setup(N, { expose: F, emit: G }) {
|
|
38
38
|
const n = N, { component: M, dataset: W, config: X } = q(n), s = {
|
|
39
|
-
VueUi3dBar: t(() => import("./vue-ui-3d-bar-
|
|
40
|
-
VueUiAgePyramid: t(() => import("./vue-ui-age-pyramid-
|
|
41
|
-
VueUiAnnotator: t(() => import("./vue-ui-annotator-
|
|
42
|
-
VueUiCandlestick: t(() => import("./vue-ui-candlestick-
|
|
43
|
-
VueUiChestnut: t(() => import("./vue-ui-chestnut-
|
|
44
|
-
VueUiDashboard: t(() => import("./vue-ui-dashboard-
|
|
45
|
-
VueUiDigits: t(() => import("./vue-ui-digits-
|
|
46
|
-
VueUiDonut: t(() => import("./vue-ui-donut-
|
|
47
|
-
VueUiDonutEvolution: t(() => import("./vue-ui-donut-evolution-
|
|
48
|
-
VueUiGalaxy: t(() => import("./vue-ui-galaxy-
|
|
49
|
-
VueUiGauge: t(() => import("./vue-ui-gauge-
|
|
50
|
-
VueUiHeatmap: t(() => import("./vue-ui-heatmap-
|
|
51
|
-
VueUiKpi: t(() => import("./vue-ui-kpi-
|
|
52
|
-
VueUiMiniLoader: t(() => import("./vue-ui-mini-loader-
|
|
53
|
-
VueUiMolecule: t(() => import("./vue-ui-molecule-
|
|
54
|
-
VueUiMoodRadar: t(() => import("./vue-ui-mood-radar-
|
|
55
|
-
VueUiNestedDonuts: t(() => import("./vue-ui-nested-donuts-
|
|
56
|
-
VueUiOnion: t(() => import("./vue-ui-onion-
|
|
57
|
-
VueUiQuadrant: t(() => import("./vue-ui-quadrant-
|
|
58
|
-
VueUiRadar: t(() => import("./vue-ui-radar-
|
|
59
|
-
VueUiRating: t(() => import("./vue-ui-rating-
|
|
60
|
-
VueUiRelationCircle: t(() => import("./vue-ui-relation-circle-
|
|
61
|
-
VueUiRings: t(() => import("./vue-ui-rings-
|
|
62
|
-
VueUiScatter: t(() => import("./vue-ui-scatter-
|
|
63
|
-
VueUiScreenshot: t(() => import("./vue-ui-screenshot-
|
|
64
|
-
VueUiSkeleton: t(() => import("./vue-ui-skeleton-
|
|
65
|
-
VueUiSmiley: t(() => import("./vue-ui-smiley-
|
|
66
|
-
VueUiSparkbar: t(() => import("./vue-ui-sparkbar-
|
|
67
|
-
VueUiSparkgauge: t(() => import("./vue-ui-sparkgauge-
|
|
68
|
-
VueUiSparkHistogram: t(() => import("./vue-ui-sparkhistogram-
|
|
69
|
-
VueUiSparkline: t(() => import("./vue-ui-sparkline-
|
|
70
|
-
VueUiSparkStackbar: t(() => import("./vue-ui-sparkstackbar-
|
|
71
|
-
VueUiTable: t(() => import("./vue-ui-table-
|
|
72
|
-
VueUiTableSparkline: t(() => import("./vue-ui-table-sparkline-
|
|
73
|
-
VueUiThermometer: t(() => import("./vue-ui-thermometer-
|
|
74
|
-
VueUiTiremarks: t(() => import("./vue-ui-tiremarks-
|
|
75
|
-
VueUiTreemap: t(() => import("./vue-ui-treemap-
|
|
76
|
-
VueUiVerticalBar: t(() => import("./vue-ui-vertical-bar-
|
|
77
|
-
VueUiWaffle: t(() => import("./vue-ui-waffle-
|
|
78
|
-
VueUiWheel: t(() => import("./vue-ui-wheel-
|
|
79
|
-
VueUiXy: t(() => import("./vue-ui-xy-
|
|
80
|
-
VueUiTableHeatmap: t(() => import("./vue-ui-table-heatmap
|
|
81
|
-
VueUiAccordion: t(() => import("./vue-ui-accordion-
|
|
82
|
-
VueUiQuickChart: t(() => import("./vue-ui-quick-chart-
|
|
83
|
-
VueUiCursor: t(() => import("./vue-ui-cursor-
|
|
84
|
-
VueUiSparkTrend: t(() => import("./vue-ui-spark-trend-
|
|
85
|
-
VueUiStripPlot: t(() => import("./vue-ui-strip-plot-
|
|
86
|
-
VueUiDumbbell: t(() => import("./vue-ui-dumbbell-
|
|
87
|
-
VueUiWordCloud: t(() => import("./vue-ui-word-cloud-
|
|
88
|
-
VueUiXyCanvas: t(() => import("./vue-ui-xy-canvas-
|
|
89
|
-
VueUiFlow: t(() => import("./vue-ui-flow-
|
|
90
|
-
VueUiParallelCoordinatePlot: t(() => import("./vue-ui-parallel-coordinate-plot-
|
|
91
|
-
VueUiTimer: t(() => import("./vue-ui-timer-
|
|
92
|
-
VueUiCarouselTable: t(() => import("./vue-ui-carousel-table-
|
|
93
|
-
VueUiGizmo: t(() => import("./vue-ui-gizmo-
|
|
94
|
-
VueUiStackbar: t(() => import("./vue-ui-stackbar-
|
|
39
|
+
VueUi3dBar: t(() => import("./vue-ui-3d-bar-Dul4M5zs.js")),
|
|
40
|
+
VueUiAgePyramid: t(() => import("./vue-ui-age-pyramid-DnfnIupT.js")),
|
|
41
|
+
VueUiAnnotator: t(() => import("./vue-ui-annotator-CmrenuBi.js")),
|
|
42
|
+
VueUiCandlestick: t(() => import("./vue-ui-candlestick-DlwYwMdG.js")),
|
|
43
|
+
VueUiChestnut: t(() => import("./vue-ui-chestnut-DUeStDzz.js")),
|
|
44
|
+
VueUiDashboard: t(() => import("./vue-ui-dashboard-B8IRsFc3.js")),
|
|
45
|
+
VueUiDigits: t(() => import("./vue-ui-digits-BO5Bxyib.js")),
|
|
46
|
+
VueUiDonut: t(() => import("./vue-ui-donut-DC6mZWdM.js")),
|
|
47
|
+
VueUiDonutEvolution: t(() => import("./vue-ui-donut-evolution-B2U3g0Yw.js")),
|
|
48
|
+
VueUiGalaxy: t(() => import("./vue-ui-galaxy-B9U-hTWd.js")),
|
|
49
|
+
VueUiGauge: t(() => import("./vue-ui-gauge-BvS6Ep8K.js")),
|
|
50
|
+
VueUiHeatmap: t(() => import("./vue-ui-heatmap-DQntMs3y.js")),
|
|
51
|
+
VueUiKpi: t(() => import("./vue-ui-kpi-yDsCX1qh.js")),
|
|
52
|
+
VueUiMiniLoader: t(() => import("./vue-ui-mini-loader-DluKyWjA.js")),
|
|
53
|
+
VueUiMolecule: t(() => import("./vue-ui-molecule-BG1BbGts.js")),
|
|
54
|
+
VueUiMoodRadar: t(() => import("./vue-ui-mood-radar-EO6jRkGF.js")),
|
|
55
|
+
VueUiNestedDonuts: t(() => import("./vue-ui-nested-donuts-HDfFuFhB.js")),
|
|
56
|
+
VueUiOnion: t(() => import("./vue-ui-onion-DqMY1iPE.js")),
|
|
57
|
+
VueUiQuadrant: t(() => import("./vue-ui-quadrant-BrbrrHLN.js")),
|
|
58
|
+
VueUiRadar: t(() => import("./vue-ui-radar-BMbWx0XC.js")),
|
|
59
|
+
VueUiRating: t(() => import("./vue-ui-rating-D19QGpzZ.js")),
|
|
60
|
+
VueUiRelationCircle: t(() => import("./vue-ui-relation-circle-DqdXa6V6.js")),
|
|
61
|
+
VueUiRings: t(() => import("./vue-ui-rings-CDqf78PA.js")),
|
|
62
|
+
VueUiScatter: t(() => import("./vue-ui-scatter-D3IFY9II.js")),
|
|
63
|
+
VueUiScreenshot: t(() => import("./vue-ui-screenshot-Xtz1BC-w.js")),
|
|
64
|
+
VueUiSkeleton: t(() => import("./vue-ui-skeleton-C3UWXP3Q.js")),
|
|
65
|
+
VueUiSmiley: t(() => import("./vue-ui-smiley-FhcqViE3.js")),
|
|
66
|
+
VueUiSparkbar: t(() => import("./vue-ui-sparkbar-C6sZ4mYK.js")),
|
|
67
|
+
VueUiSparkgauge: t(() => import("./vue-ui-sparkgauge-C1pOZo8V.js")),
|
|
68
|
+
VueUiSparkHistogram: t(() => import("./vue-ui-sparkhistogram-Mh93EuLF.js")),
|
|
69
|
+
VueUiSparkline: t(() => import("./vue-ui-sparkline-DiAIsoI3.js")),
|
|
70
|
+
VueUiSparkStackbar: t(() => import("./vue-ui-sparkstackbar-Bb8ZtMfn.js")),
|
|
71
|
+
VueUiTable: t(() => import("./vue-ui-table-CSm91gHM.js")),
|
|
72
|
+
VueUiTableSparkline: t(() => import("./vue-ui-table-sparkline-BcFIKA8V.js")),
|
|
73
|
+
VueUiThermometer: t(() => import("./vue-ui-thermometer-CPqFKYwL.js")),
|
|
74
|
+
VueUiTiremarks: t(() => import("./vue-ui-tiremarks-DDCOUKU9.js")),
|
|
75
|
+
VueUiTreemap: t(() => import("./vue-ui-treemap-BOCZ8x4F.js")),
|
|
76
|
+
VueUiVerticalBar: t(() => import("./vue-ui-vertical-bar-CAlQekf-.js")),
|
|
77
|
+
VueUiWaffle: t(() => import("./vue-ui-waffle-CasLSUzY.js")),
|
|
78
|
+
VueUiWheel: t(() => import("./vue-ui-wheel-CHn24pYD.js")),
|
|
79
|
+
VueUiXy: t(() => import("./vue-ui-xy-KnfMOUv4.js")),
|
|
80
|
+
VueUiTableHeatmap: t(() => import("./vue-ui-table-heatmap-B30TipjK.js")),
|
|
81
|
+
VueUiAccordion: t(() => import("./vue-ui-accordion-issoIPFd.js")),
|
|
82
|
+
VueUiQuickChart: t(() => import("./vue-ui-quick-chart-BeJMzQZr.js")),
|
|
83
|
+
VueUiCursor: t(() => import("./vue-ui-cursor-x_Ai6P6S.js")),
|
|
84
|
+
VueUiSparkTrend: t(() => import("./vue-ui-spark-trend-RJUm-CJC.js")),
|
|
85
|
+
VueUiStripPlot: t(() => import("./vue-ui-strip-plot-8d_juyi7.js")),
|
|
86
|
+
VueUiDumbbell: t(() => import("./vue-ui-dumbbell-81Azsrmw.js")),
|
|
87
|
+
VueUiWordCloud: t(() => import("./vue-ui-word-cloud-uGJLXPYv.js")),
|
|
88
|
+
VueUiXyCanvas: t(() => import("./vue-ui-xy-canvas-DVjSzeFt.js")),
|
|
89
|
+
VueUiFlow: t(() => import("./vue-ui-flow-CTobijfD.js")),
|
|
90
|
+
VueUiParallelCoordinatePlot: t(() => import("./vue-ui-parallel-coordinate-plot-CUU74I_R.js")),
|
|
91
|
+
VueUiTimer: t(() => import("./vue-ui-timer-DdQB8bF5.js")),
|
|
92
|
+
VueUiCarouselTable: t(() => import("./vue-ui-carousel-table-mo9C1GJ9.js")),
|
|
93
|
+
VueUiGizmo: t(() => import("./vue-ui-gizmo-CCSV95Cw.js")),
|
|
94
|
+
VueUiStackbar: t(() => import("./vue-ui-stackbar-B7KyGHZZ.js"))
|
|
95
95
|
}, Q = {
|
|
96
96
|
VueUi3dBar: ["config", "dataset"],
|
|
97
97
|
VueUiAgePyramid: ["config", "dataset"],
|
package/dist/vue-data-ui.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("vue");const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("vue");const e=require("./index-BofUHMEw.cjs");exports.Arrow=e.Arrow;exports.VueDataUi=e.VueDataUi;exports.VueUi3dBar=e.VueUi3dBar;exports.VueUiAccordion=e.VueUiAccordion;exports.VueUiAgePyramid=e.VueUiAgePyramid;exports.VueUiAnnotator=e.VueUiAnnotator;exports.VueUiCandlestick=e.VueUiCandlestick;exports.VueUiCarouselTable=e.VueUiCarouselTable;exports.VueUiChestnut=e.VueUiChestnut;exports.VueUiCursor=e.VueUiCursor;exports.VueUiDashboard=e.VueUiDashboard;exports.VueUiDigits=e.VueUiDigits;exports.VueUiDonut=e.VueUiDonut;exports.VueUiDonutEvolution=e.VueUiDonutEvolution;exports.VueUiDumbbell=e.VueUiDumbbell;exports.VueUiFlow=e.VueUiFlow;exports.VueUiGalaxy=e.VueUiGalaxy;exports.VueUiGauge=e.VueUiGauge;exports.VueUiGizmo=e.VueUiGizmo;exports.VueUiHeatmap=e.VueUiHeatmap;exports.VueUiIcon=e.VueUiIcon;exports.VueUiKpi=e.VueUiKpi;exports.VueUiMiniLoader=e.VueUiMiniLoader;exports.VueUiMolecule=e.VueUiMolecule;exports.VueUiMoodRadar=e.VueUiMoodRadar;exports.VueUiNestedDonuts=e.VueUiNestedDonuts;exports.VueUiOnion=e.VueUiOnion;exports.VueUiParallelCoordinatePlot=e.VueUiParallelCoordinatePlot;exports.VueUiQuadrant=e.VueUiQuadrant;exports.VueUiQuickChart=e.VueUiQuickChart;exports.VueUiRadar=e.VueUiRadar;exports.VueUiRating=e.VueUiRating;exports.VueUiRelationCircle=e.VueUiRelationCircle;exports.VueUiRings=e.VueUiRings;exports.VueUiScatter=e.VueUiScatter;exports.VueUiScreenshot=e.VueUiScreenshot;exports.VueUiSkeleton=e.VueUiSkeleton;exports.VueUiSmiley=e.VueUiSmiley;exports.VueUiSparkHistogram=e.VueUiSparkHistogram;exports.VueUiSparkStackbar=e.VueUiSparkStackbar;exports.VueUiSparkTrend=e.VueUiSparkTrend;exports.VueUiSparkbar=e.VueUiSparkbar;exports.VueUiSparkgauge=e.VueUiSparkgauge;exports.VueUiSparkline=e.VueUiSparkline;exports.VueUiStackbar=e.VueUiStackbar;exports.VueUiStripPlot=e.VueUiStripPlot;exports.VueUiTable=e.VueUiTable;exports.VueUiTableHeatmap=e.VueUiTableHeatmap;exports.VueUiTableSparkline=e.VueUiTableSparkline;exports.VueUiThermometer=e.VueUiThermometer;exports.VueUiTimer=e.VueUiTimer;exports.VueUiTiremarks=e.VueUiTiremarks;exports.VueUiTreemap=e.VueUiTreemap;exports.VueUiVerticalBar=e.VueUiVerticalBar;exports.VueUiWaffle=e.VueUiWaffle;exports.VueUiWheel=e.VueUiWheel;exports.VueUiWordCloud=e.VueUiWordCloud;exports.VueUiXy=e.VueUiXy;exports.VueUiXyCanvas=e.VueUiXyCanvas;exports.createWordCloudDatasetFromPlainText=e.createWordCloudDatasetFromPlainText;exports.getPalette=e.getPalette;exports.getThemeConfig=e.getThemeConfig;exports.getVueDataUiConfig=e.getVueDataUiConfig;
|
package/dist/vue-data-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "vue";
|
|
2
|
-
import { a3 as s, a4 as u, a5 as V, a6 as U, a7 as r, a8 as t, a9 as o, aX as l, aa as n, ab as d, ac as m, ad as p, ae as S, af as c, ag as g, ah as k, ai as C, aj as b, aY as T, ak as D, al as h, am as P, an as f, ao as y, ap as R, aq as A, ar as W, as as x, at as G, au as H, av as M, aw as v, ax as w, ay as B, az as F, aA as Q, aB as X, aC as z, aD as E, aE as I, aF as K, aG as L, aH as N, aI as O, aZ as Y, aJ as j, aK as q, aL as J, aM as Z, aN as _, aO as $, aP as aa, aQ as ea, aR as ia, aS as sa, aT as ua, aU as Va, aV as Ua, aW as ra, Y as ta, a_ as oa, a$ as la, b0 as na } from "./index-
|
|
2
|
+
import { a3 as s, a4 as u, a5 as V, a6 as U, a7 as r, a8 as t, a9 as o, aX as l, aa as n, ab as d, ac as m, ad as p, ae as S, af as c, ag as g, ah as k, ai as C, aj as b, aY as T, ak as D, al as h, am as P, an as f, ao as y, ap as R, aq as A, ar as W, as as x, at as G, au as H, av as M, aw as v, ax as w, ay as B, az as F, aA as Q, aB as X, aC as z, aD as E, aE as I, aF as K, aG as L, aH as N, aI as O, aZ as Y, aJ as j, aK as q, aL as J, aM as Z, aN as _, aO as $, aP as aa, aQ as ea, aR as ia, aS as sa, aT as ua, aU as Va, aV as Ua, aW as ra, Y as ta, a_ as oa, a$ as la, b0 as na } from "./index-C_xZ1jJj.js";
|
|
3
3
|
export {
|
|
4
4
|
s as Arrow,
|
|
5
5
|
u as VueDataUi,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BofUHMEw.cjs"),de=require("./Title-DOzi72Pu.cjs"),Q=require("./usePrinter-_JYb_33H.cjs"),he=require("./vue-ui-skeleton-Bx_kbjKr.cjs"),ve=require("./DataTable-ysqfWT9v.cjs"),pe=require("./vue-ui-accordion-XtygMpX7.cjs"),ee=require("./useNestedProp-DGK0LGfN.cjs"),fe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),L=N=>(e.pushScopeId("data-v-c6fbaa1b"),N=N(),e.popScopeId(),N),ke=["id"],me=["xmlns","viewBox"],ye=["id"],ge=["stop-color"],$e=["stop-color"],_e=["id"],Be=["stop-color"],xe=["stop-color"],be=["id"],Ee=["stop-color"],Ce=["stop-color"],we=["id"],Ne=["stop-color"],Ve=["stop-color"],Fe=["stop-color"],Se={key:0},Me=["id"],Pe=["stop-color"],Le=["stop-color"],Oe=["id"],De=["stop-color"],ze=["stop-color"],Te=["id"],je=["stop-color"],Ie=["stop-color"],We=["id"],Ge=L(()=>e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF"},null,-1)),He=L(()=>e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF33"},null,-1)),Ae=[Ge,He],qe=["x","y","font-size","font-weight","fill"],Ue=["x","y"],Xe=["d","stroke"],Re=["d","stroke"],Ze={key:3},Ye={key:0},Je=["stroke-dasharray","d","stroke","stroke-width"],Ke=["stroke-dasharray","d","stroke","stroke-width"],Qe=["stroke-dasharray","d","stroke","stroke-width"],et=["stroke-dasharray","d","stroke","stroke-width"],tt={key:1},lt=["d","stroke","stroke-width","fill"],ot=["d","stroke","stroke-width","fill"],at=["d","stroke","stroke-width","fill"],nt={key:2},rt=["d","fill","onMouseenter","onClick"],st=["d","fill","onMouseenter","onClick"],ut=["d","fill","onMouseenter","onClick"],it=["d","onMouseenter","onClick"],ct=["d"],dt=["d","stroke"],ht=["onClick"],vt=["stroke","d"],pt=["cx","cy","fill","stroke"],ft=["x","y","width","height"],kt={key:1},mt=["d","stroke"],yt=["d","fill","stroke"],gt=["id"],$t=["stop-color"],_t=L(()=>e.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF20"},null,-1)),Bt=["stop-color"],xt=["cx","cy","fill"],bt=["cx","cy","fill"],Et={key:0},Ct=["text-anchor","x","y","fill","font-size"],wt=["text-anchor","x","y","fill","font-size"],Nt={key:2},Vt=["d","fill","stroke"],Ft={key:4},St={key:0},Mt=["stroke-dasharray","d","stroke","stroke-width"],Pt=["stroke-dasharray","d","stroke","stroke-width"],Lt=["stroke-dasharray","d","stroke","stroke-width"],Ot=["stroke-dasharray","d","stroke","stroke-width"],Dt=["d","stroke","stroke-width","fill"],zt=["d","stroke","stroke-width","fill"],Tt={key:1},jt=["onClick"],It=["id"],Wt=["stop-color"],Gt=["stop-color"],Ht=["id"],At=["stop-color"],qt=["stop-color"],Ut=["stop-color"],Xt=["stop-color"],Rt=["stop-color"],Zt=["onMouseenter","onClick","d","fill"],Yt=["onMouseenter","onClick","d"],Jt=["onMouseenter","onClick","d","fill"],Kt=["onClick"],Qt=["stroke","d"],el=["cx","cy","fill","stroke"],tl=["x","y","width","height"],ll={key:1},ol=["d","stroke"],al=["d","fill","stroke"],nl=["id"],rl=["stop-color"],sl=L(()=>e.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF20"},null,-1)),ul=["stop-color"],il=["cx","cy","fill"],cl=["cx","cy","fill"],dl={key:0},hl=["text-anchor","x","y","fill","font-size"],vl=["text-anchor","x","y","fill","font-size"],pl={key:2},fl=["d","fill","stroke"],kl={key:3,class:"vue-data-ui-watermark"},ml=["innerHTML"],yl={__name:"vue-ui-3d-bar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectDatapoint"],setup(N,{expose:te,emit:F}){const f=N,{vue_ui_3d_bar:le}=r.useConfig(),S=e.computed(()=>!!f.dataset&&Object.keys(f.dataset).length),k=e.ref(r.createUid()),oe=e.ref(null),z=e.ref(null),b=e.ref(!1),T=e.ref(0),j=e.ref(0),l=e.computed({get:()=>I(),set:s=>s});function I(){const s=ee.useNestedProp({userConfig:f.config,defaultConfig:le});return s.theme?{...ee.useNestedProp({userConfig:r.themes.vue_ui_3d_bar[s.theme]||f.config,defaultConfig:s}),customPalette:r.themePalettes[s.theme]||r.palette}:s}e.watch(()=>f.config,s=>{l.value=I(),q(),T.value+=1,j.value+=1},{deep:!0});const{isPrinting:W,isImaging:G,generatePdf:H,generateImage:A}=Q.usePrinter({elementId:`3d_bar_${k.value}`,fileName:l.value.style.chart.title.text||"vue-ui-3d-bar"}),ae=e.computed(()=>r.convertCustomPalette(l.value.customPalette)),M=e.ref({showTable:l.value.table.show}),$=e.computed(()=>f.dataset.series&&f.dataset.series.length),a=e.computed(()=>({height:l.value.style.chart.box.dimensions.height,width:l.value.style.chart.box.dimensions.width,absoluteWidth:l.value.style.chart.box.dimensions.width*($.value?2:1),top:l.value.style.chart.box.dimensions.top,bottom:l.value.style.chart.box.dimensions.bottom,left:l.value.style.chart.box.dimensions.left,right:l.value.style.chart.box.dimensions.right,perspective:l.value.style.chart.box.dimensions.perspective})),g=e.computed(()=>{if($.value){const s=f.dataset.series.map(o=>o.value||0).reduce((o,u)=>o+u,0),n=f.dataset.series.map((o,u)=>({...o,id:r.createUid(),proportion:(o.value||0)/s,color:r.convertColorToHex(o.color)||ae.value[u]||r.palette[u]||r.palette[u%r.palette.length],breakdown:o.breakdown?o.breakdown.sort((i,p)=>p.value-i.value):null})).sort((o,u)=>u.value-o.value),t=[];let c=0;for(let o=0;o<n.length;o+=1)t.push({...n[o],fill:ne(c,n[o].proportion,n[o].breakdown,n[o].color)}),c+=n[o].proportion;return t}return null}),B=e.computed(()=>({right:`M${a.value.width/2},${a.value.top} ${a.value.width-a.value.right}, ${a.value.top+a.value.perspective} ${a.value.width-a.value.right},${a.value.height-a.value.bottom-a.value.perspective} ${a.value.width/2},${a.value.height-a.value.bottom}`,left:`M${a.value.width/2},${a.value.top} ${a.value.left},${a.value.top+a.value.perspective} ${a.value.left},${a.value.height-a.value.bottom-a.value.perspective} ${a.value.width/2},${a.value.height-a.value.bottom}`,side:`M${a.value.width/2},${a.value.height-a.value.bottom} ${a.value.width/2},${a.value.top+a.value.perspective*2}`,topSides:`M${a.value.left},${a.value.top+a.value.perspective} ${a.value.width/2},${a.value.top+a.value.perspective*2} ${a.value.width-a.value.right},${a.value.top+a.value.perspective}`,tubeTop:`M${a.value.left},${a.value.top+a.value.perspective} C ${a.value.left},${a.value.top-a.value.perspective/3} ${a.value.width-a.value.right},${a.value.top-a.value.perspective/3} ${a.value.width-a.value.right},${a.value.top+a.value.perspective} C ${a.value.width-a.value.right},${a.value.top+a.value.perspective*2.3} ${a.value.left},${a.value.top+a.value.perspective*2.3} ${a.value.left},${a.value.top+a.value.perspective}`,tubeLeft:`M${a.value.left},${a.value.top+a.value.perspective} ${a.value.left},${a.value.height-a.value.bottom-a.value.perspective}`,tubeRight:`M${a.value.width-a.value.right},${a.value.top+a.value.perspective} ${a.value.width-a.value.right},${a.value.height-a.value.bottom-a.value.perspective}`,tubeBottom:`M${a.value.width-a.value.right},${a.value.height-a.value.bottom-a.value.perspective} C ${a.value.width-a.value.right},${a.value.height} ${a.value.left},${a.value.height} ${a.value.left},${a.value.height-a.value.bottom-a.value.perspective}`})),C=e.ref(l.value.style.chart.animation.use?0:f.dataset.percentage);e.onMounted(()=>{q();let s=0,n=l.value.style.chart.animation.speed,t=.005*l.value.style.chart.animation.acceleration;function c(){C.value+=n+s,s+=t,C.value<f.dataset.percentage?requestAnimationFrame(c):C.value=f.dataset.percentage}l.value.style.chart.animation.use&&(C.value=0,c())});function q(){r.objectIsEmpty(f.dataset)?r.error({componentName:"VueUi3dBar",type:"dataset"}):f.dataset.series?f.dataset.series.forEach((s,n)=>{r.getMissingDatasetAttributes({datasetObject:s,requiredAttributes:["name","value"]}).forEach(t=>{r.error({componentName:"VueUi3dBar",type:"datasetSerieAttribute",property:t,index:n})}),s.breakdown&&s.breakdown.forEach((t,c)=>{r.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["name","value"]}).forEach(o=>{r.error({componentName:"VueUi3dBar",type:"datasetSerieAttribute",property:o,index:`${n} - ${c}`})})})}):r.getMissingDatasetAttributes({datasetObject:f.dataset,requiredAttributes:["percentage"]}).forEach(s=>{r.error({componentName:"VueUi3dBar",type:"datasetAttribute",property:s})})}function ne(s,n,t,c){const o=a.value.height-a.value.bottom-a.value.top-a.value.perspective*2,{width:u,height:i,bottom:p,right:y,left:h,perspective:v}=a.value,d=p+o*s,D=i-d-v-o*n/2,ue=D>a.value.height/2?"top":"bottom",Z=64,ie=!!t;let Y=null,J=null;return ie&&(t=t.map((K,ce)=>({...K,value:K.value||0,color:r.lightenHexColor(c,ce/t.length)})),Y=r.makeDonut({series:t},u+a.value.absoluteWidth/4-14,ue==="top"?D-Z:D+Z,28,28,1.99999,2,1,360,105.25,14),J=r.makeDonut({series:t},u-y+20,i-d-v-o*n/2,6,6,1.99999,2,1,360,105.25,6)),{donut:Y,miniDonut:J,sidePointer:{x:u-y,y:i-d-v-o*n/2,topY:i-d-v-o*n,height:o*n},apexBottom:{y:i-d,x:u/2},apexTop:{y:i-d-o*n,x:u/2},right:`M${u/2},${i-d} ${u/2},${i-d-o*n} ${u-y},${i-d-v-o*n} ${u-y},${i-d-v}Z`,left:`M${u/2},${i-d} ${u/2},${i-d-o*n} ${h}, ${i-d-v-o*n} ${h},${i-d-v}Z`,liningTop:`M${h},${i-d-v-o*n} ${u/2},${i-d-o*n} ${u-y},${i-d-v-o*n}`,liningTopShade:`M${h},${i-d-v-o*n-.5} ${u/2},${i-d-o*n-.5} ${u-y},${i-d-v-o*n-.5}`,top:`M${u/2},${i-d-o*n} ${h},${i-d-v-o*n} ${u/2},${i-d-v*2-o*n} ${u-y},${i-d-v-o*n} Z`,tubeTop:`M${h},${i-d-o*n-v} C ${h},${i-d-o*n-v*2.5} ${u-y},${i-d-o*n-v*2.5} ${u-y},${i-d-o*n-v} C ${u-y},${i-d-o*n+v/2} ${h},${i-d-o*n+v/2} ${h},${i-d-o*n-v}`,bottomTubeTop:`M ${u-y-.5},${i-d-v} C ${u-y-.5},${i-d+v/2} ${h},${i-d+v/2} ${h+.5},${i-d-v}`,tubeBody:`M
|
|
2
2
|
${h},${i-d-o*n-v}
|
|
3
3
|
C ${h},${i-d-o*n+v/2}
|
|
4
4
|
${u-y},${i-d-o*n+v/2}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { computed as S, ref as j, watch as Oe, onMounted as We, openBlock as r, createElementBlock as i, normalizeClass as be, normalizeStyle as z, createBlock as H, createCommentVNode as y, unref as c, createSlots as Ge, withCtx as I, renderSlot as D, normalizeProps as Y, guardReactiveProps as J, createElementVNode as u, Fragment as _, renderList as m, toDisplayString as P, createTextVNode as Ve, nextTick as Ae, pushScopeId as Ue, popScopeId as Ee } from "vue";
|
|
2
|
-
import { u as He, c as we, t as Ze, a as qe, p as K, b as Xe, d as Re, o as Ye, e as Q, g as ne, l as A, m as Ce, f as T, X as Je, s as g, h as ee, i as te, j as Fe, k as L, n as le, q as Ke, r as Qe } from "./index-
|
|
3
|
-
import { _ as et } from "./Title-
|
|
4
|
-
import { u as tt, U as lt } from "./usePrinter-
|
|
5
|
-
import ot from "./vue-ui-skeleton-
|
|
6
|
-
import { D as st } from "./DataTable-
|
|
7
|
-
import at from "./vue-ui-accordion-
|
|
8
|
-
import { u as Me } from "./useNestedProp-
|
|
2
|
+
import { u as He, c as we, t as Ze, a as qe, p as K, b as Xe, d as Re, o as Ye, e as Q, g as ne, l as A, m as Ce, f as T, X as Je, s as g, h as ee, i as te, j as Fe, k as L, n as le, q as Ke, r as Qe } from "./index-C_xZ1jJj.js";
|
|
3
|
+
import { _ as et } from "./Title-Bgh58KWs.js";
|
|
4
|
+
import { u as tt, U as lt } from "./usePrinter-BJ7GxAOO.js";
|
|
5
|
+
import ot from "./vue-ui-skeleton-C3UWXP3Q.js";
|
|
6
|
+
import { D as st } from "./DataTable-CThhaAYT.js";
|
|
7
|
+
import at from "./vue-ui-accordion-issoIPFd.js";
|
|
8
|
+
import { u as Me } from "./useNestedProp-9QKvGow8.js";
|
|
9
9
|
import { _ as nt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
10
|
const oe = (U) => (Ue("data-v-c6fbaa1b"), U = U(), Ee(), U), rt = ["id"], ut = ["xmlns", "viewBox"], it = ["id"], dt = ["stop-color"], ct = ["stop-color"], ht = ["id"], vt = ["stop-color"], ft = ["stop-color"], pt = ["id"], yt = ["stop-color"], kt = ["stop-color"], gt = ["id"], $t = ["stop-color"], _t = ["stop-color"], mt = ["stop-color"], xt = { key: 0 }, bt = ["id"], wt = ["stop-color"], Ct = ["stop-color"], Ft = ["id"], Mt = ["stop-color"], Pt = ["stop-color"], St = ["id"], jt = ["stop-color"], Tt = ["stop-color"], zt = ["id"], Dt = /* @__PURE__ */ oe(() => /* @__PURE__ */ u("stop", {
|
|
11
11
|
offset: "0%",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./BaseIcon-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./BaseIcon-DU-oJKBy.cjs"),g=require("./useNestedProp-DGK0LGfN.cjs"),u=require("./index-BofUHMEw.cjs"),f=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),m=["id"],h={key:0,class:"vue-ui-accordion-arrow"},k={__name:"vue-ui-accordion",props:{config:{type:Object,default(){return{}}},hideDetails:{type:Boolean,default:!1}},setup(l){const c=l;e.useCssVars(r=>({"95f7c2e4":v.value}));const{vue_ui_accordion:d}=u.useConfig(),o=e.computed(()=>g.useNestedProp({userConfig:c.config,defaultConfig:d})),a=e.ref(o.value.open),i=e.ref(u.createUid()),t=e.ref(null),n=e.ref(0);e.onMounted(()=>{t.value.open=o.value.open}),e.watch(()=>o.value.open,r=>{t.value.open=r});function s(){(n.value>0||!o.value.open)&&(a.value=!a.value),n.value+=1}const v=e.computed(()=>`${o.value.maxHeight}px`);return(r,C)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("details",{id:`details_${i.value}`,ref_key:"details",ref:t,onToggle:s},[e.createElementVNode("summary",{class:e.normalizeClass({"vue-ui-accordion-headless":l.hideDetails})},[e.createElementVNode("div",{class:"vue-ui-accordion-head",style:e.normalizeStyle(`background:${o.value.head.backgroundColor};padding:${o.value.head.padding}; ${l.hideDetails?"height: 0px !important; padding: 0 !important;":""}`)},[l.hideDetails?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",h,[o.value.head.useArrowSlot?e.renderSlot(r.$slots,"arrow",e.normalizeProps(e.mergeProps({key:0},{backgroundColor:o.value.head.backgroundColor,color:o.value.head.color,iconColor:o.value.head.iconColor,isOpen:a.value})),void 0,!0):(e.openBlock(),e.createBlock(p.default,{key:1,name:"arrowRight",stroke:o.value.head.iconColor},null,8,["stroke"]))])),e.renderSlot(r.$slots,"title",e.normalizeProps(e.guardReactiveProps({color:o.value.head.color,isOpen:a.value})),void 0,!0)],4)],2)],40,m),e.createElementVNode("div",{class:"vue-ui-accordion-content",style:e.normalizeStyle(`background:${o.value.body.backgroundColor};color:${o.value.body.color}`)},[e.renderSlot(r.$slots,"content",e.normalizeProps(e.guardReactiveProps({backgroundColor:o.value.body.backgroundColor,color:o.value.body.color,isOpen:a.value})),void 0,!0)],4)]))}},y=f._export_sfc(k,[["__scopeId","data-v-28fc829c"]]);exports.default=y;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCssVars as y, computed as s, ref as r, onMounted as b, watch as _, openBlock as u, createElementBlock as v, createElementVNode as n, normalizeClass as $, normalizeStyle as p, renderSlot as c, normalizeProps as i, mergeProps as O, createBlock as D, createCommentVNode as N, guardReactiveProps as m } from "vue";
|
|
2
|
-
import w from "./BaseIcon-
|
|
3
|
-
import { u as x } from "./useNestedProp-
|
|
4
|
-
import { u as B, c as I } from "./index-
|
|
2
|
+
import w from "./BaseIcon-BhdIp3HQ.js";
|
|
3
|
+
import { u as x } from "./useNestedProp-9QKvGow8.js";
|
|
4
|
+
import { u as B, c as I } from "./index-C_xZ1jJj.js";
|
|
5
5
|
import { _ as A } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
6
|
const F = ["id"], P = {
|
|
7
7
|
key: 0,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { computed as b, ref as v, watch as pe, onMounted as be, openBlock as i, createElementBlock as r, normalizeClass as se, normalizeStyle as E, createBlock as I, createCommentVNode as h, unref as d, createSlots as xe, withCtx as g, renderSlot as p, normalizeProps as N, guardReactiveProps as R, createElementVNode as n, Fragment as L, renderList as F, toDisplayString as w, createVNode as me, createTextVNode as ie, nextTick as we } from "vue";
|
|
2
|
-
import { u as ke, c as _e, t as Ce, o as $e, e as Te, v as y, X as Le, s as W, w as ue, i as k, f as _, x as Ae, y as Se, q as ze, r as Ie } from "./index-
|
|
2
|
+
import { u as ke, c as _e, t as Ce, o as $e, e as Te, v as y, X as Le, s as W, w as ue, i as k, f as _, x as Ae, y as Se, q as ze, r as Ie } from "./index-C_xZ1jJj.js";
|
|
3
3
|
import { t as Fe, u as Oe } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as Me } from "./Title-
|
|
5
|
-
import { u as Pe, U as Ne } from "./usePrinter-
|
|
6
|
-
import { _ as Re } from "./Tooltip-
|
|
7
|
-
import { D as De } from "./DataTable-
|
|
8
|
-
import Ge from "./vue-ui-skeleton-
|
|
9
|
-
import Be from "./vue-ui-accordion-
|
|
10
|
-
import { u as re } from "./useNestedProp-
|
|
4
|
+
import { _ as Me } from "./Title-Bgh58KWs.js";
|
|
5
|
+
import { u as Pe, U as Ne } from "./usePrinter-BJ7GxAOO.js";
|
|
6
|
+
import { _ as Re } from "./Tooltip-HqwVgkYT.js";
|
|
7
|
+
import { D as De } from "./DataTable-CThhaAYT.js";
|
|
8
|
+
import Ge from "./vue-ui-skeleton-C3UWXP3Q.js";
|
|
9
|
+
import Be from "./vue-ui-accordion-issoIPFd.js";
|
|
10
|
+
import { u as re } from "./useNestedProp-9QKvGow8.js";
|
|
11
11
|
import { _ as Ee } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
const We = ["id"], Xe = ["xmlns", "viewBox"], Ue = ["id"], Ve = ["stop-color"], Ye = ["stop-color"], je = ["id"], He = ["stop-color"], qe = ["stop-color"], Je = ["x", "y", "width", "height", "fill", "rx"], Ke = ["x", "y", "width", "height", "fill", "rx"], Qe = ["x", "y", "width", "height", "fill", "rx"], Ze = ["x", "y", "width", "height", "fill", "rx"], et = { key: 0 }, tt = ["x", "y", "fill", "font-size", "font-weight"], lt = ["x", "y", "fill", "font-size", "font-weight"], at = { key: 1 }, ot = ["x", "y", "font-size", "fill", "font-weight"], st = { key: 2 }, it = { key: 0 }, ut = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], rt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], nt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], dt = ["x", "y", "font-size", "fill", "font-weight"], vt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], yt = ["x", "y", "font-size", "fill", "font-weight"], ht = ["x", "y", "font-size", "fill", "font-weight"], ft = ["x", "y", "width", "height", "fill", "onMouseover"], ct = {
|
|
13
13
|
key: 3,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CzjC8LfY.cjs"),R=require("./useResponsive-B3TrDDIG.cjs"),Q=require("./Title-BSpa3uge.cjs"),q=require("./usePrinter-DiLM6jav.cjs"),Z=require("./Tooltip-rmhZhv96.cjs"),ee=require("./DataTable-C5TOiC61.cjs"),te=require("./vue-ui-skeleton-CwqzJlQf.cjs"),le=require("./vue-ui-accordion-DpI7fTKZ.cjs"),G=require("./useNestedProp-CY7DebVH.cjs"),ae=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),oe=["id"],se=["xmlns","viewBox"],re=["id"],ie=["stop-color"],ue=["stop-color"],ne=["id"],de=["stop-color"],ce=["stop-color"],ve=["x","y","width","height","fill","rx"],ye=["x","y","width","height","fill","rx"],he=["x","y","width","height","fill","rx"],fe=["x","y","width","height","fill","rx"],ge={key:0},pe=["x","y","fill","font-size","font-weight"],be=["x","y","fill","font-size","font-weight"],xe={key:1},me=["x","y","font-size","fill","font-weight"],ke={key:2},we={key:0},Ce=["x1","x2","y1","y2","stroke","stroke-width"],_e=["x1","x2","y1","y2","stroke","stroke-width"],Ne=["x1","x2","y1","y2","stroke","stroke-width"],Le=["x","y","font-size","fill","font-weight"],Se=["x1","x2","y1","y2","stroke","stroke-width"],Te=["x","y","font-size","fill","font-weight"],Be=["x","y","font-size","fill","font-weight"],$e=["x","y","width","height","fill","onMouseover"],Ae={key:3,class:"vue-data-ui-watermark"},Ee={__name:"vue-ui-age-pyramid",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(N,{expose:U}){const n=N,{vue_ui_age_pyramid:W}=s.useConfig(),x=e.computed(()=>!!n.dataset&&n.dataset.length),c=e.ref(s.createUid()),H=e.ref(null),w=e.ref(!1),C=e.ref(""),m=e.ref(null),L=e.ref(0),g=e.ref(null),S=e.ref(null),T=e.ref(0),B=e.ref(0),t=e.computed({get:()=>$(),set:l=>l});function $(){const l=G.useNestedProp({userConfig:n.config,defaultConfig:W});return l.theme?{...G.useNestedProp({userConfig:s.themes.vue_ui_age_pyramid[l.theme]||n.config,defaultConfig:l})}:l}e.watch(()=>n.config,l=>{t.value=$(),E(),T.value+=1,B.value+=1},{deep:!0});const A=e.ref(null);e.onMounted(()=>{E()});function E(){if(s.objectIsEmpty(n.dataset)&&s.error({componentName:"VueUiAgePyramid",type:"dataset"}),t.value.responsive){const l=R.throttle(()=>{const{width:i,height:a}=R.useResponsive({chart:g.value,title:t.value.style.title.text?S.value:null});d.value.width=i,d.value.height=a});A.value=new ResizeObserver(l),A.value.observe(g.value.parentNode)}}const{isPrinting:z,isImaging:V,generatePdf:P,generateImage:I}=q.usePrinter({elementId:`vue-ui-age-pyramid_${c.value}`,fileName:t.value.style.title.text||"vue-ui-age-pyramid"}),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),d=e.ref({height:t.value.style.height,width:t.value.style.width}),r=e.computed(()=>{const l=d.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left,i=t.value.style.layout.padding.left,a=d.value.width-t.value.style.layout.padding.right;return{top:t.value.style.layout.padding.top,left:i,right:a,bottom:d.value.height-t.value.style.layout.padding.bottom,width:l,height:d.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,centerX:t.value.style.layout.padding.left+l/2,leftChart:{width:l/2-t.value.style.layout.centerSlit.width,right:i+l/2-t.value.style.layout.centerSlit.width},rightChart:{width:l/2-t.value.style.layout.centerSlit.width,left:i+l/2+t.value.style.layout.centerSlit.width}}}),X=e.computed(()=>n.dataset.map(l=>t.value.style.layout.dataLabels.yAxis.display==="age"?l[1]:l[0])),y=e.computed(()=>{const l=j(p.value/5),i=[],a=[];for(let o=0;o<=5;o+=1){const u=l*o,M=l*(o-5);i.push({value:u,x:r.value.left+r.value.width/2+t.value.style.layout.centerSlit.width+u/p.value*r.value.leftChart.width}),a.push({value:Math.abs(M),x:r.value.left+r.value.width/2+M/p.value*r.value.leftChart.width-t.value.style.layout.centerSlit.width})}return{right:i,left:a}});function j(l){if(l===0)return 0;const a=10**Math.floor(Math.log10(Math.abs(l)));let o;return l<0,o=Math.round(l/a)*a,o}const p=e.computed(()=>Math.max(...n.dataset.flatMap(l=>l.slice(-2).map(i=>s.checkNaN(i))))),h=e.computed(()=>n.dataset.length),Y=e.computed(()=>n.dataset.map(l=>({segment:l[0],age:l[1],left:{value:l[2],proportionToMax:l[2]/p.value},right:{value:l[3],proportionToMax:l[3]/p.value}}))),f=e.computed(()=>Y.value.map((l,i)=>{const a=r.value.top+r.value.height/h.value*i,o=r.value.height/h.value-t.value.style.layout.bars.gap;return{segment:l.segment,age:l.age,left:{...l.left,y:a,color:t.value.style.layout.bars.left.color,x:r.value.leftChart.right-l.left.proportionToMax*r.value.leftChart.width,width:s.checkNaN(l.left.proportionToMax*r.value.leftChart.width),height:o},right:{...l.right,y:a,color:t.value.style.layout.bars.right.color,x:r.value.rightChart.left,width:s.checkNaN(l.right.proportionToMax*r.value.rightChart.width),height:o}}})),_=e.ref(null);function J(l,i){m.value=l,_.value={datapoint:i,seriesIndex:l,series:f.value,config:t.value};const a=t.value.style.tooltip.customFormat;if(s.isFunction(a)&&s.functionReturnsString(()=>a({seriesIndex:l,datapoint:{segment:i[0],index:i[1],left:i[2],right:i[3]},series:f.value,config:t.value})))C.value=a({seriesIndex:l,datapoint:{segment:i[0],index:i[1],left:i[2],right:i[3]},series:f.value,config:t.value});else{let o="";const u=f.value[l];o+=`<div><b>${u.segment}</b></div>`,o+=`<div>${t.value.translations.age}: ${s.applyDataLabel(t.value.style.layout.dataLabels.yAxis.formatter,s.checkNaN(u.age),s.dataLabel({v:s.checkNaN(u.age)}),{datapoint:i,seriesIndex:l})}</div>`,o+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,o+='<div style="display:flex; flex-direction:row;gap:12px">',o+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.show?`url(#age_pyramid_left_${c.value})`:t.value.style.layout.bars.left.color}"/></svg><div>${t.value.translations.female}</div><div><b>${s.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,s.checkNaN(u.left.value),s.dataLabel({v:s.checkNaN(u.left.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,o+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.show?`url(#age_pyramid_right_${c.value})`:t.value.style.layout.bars.right.color}"/></svg><div>${t.value.translations.male}</div><div><b>${s.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,s.checkNaN(u.right.value),s.dataLabel({v:s.checkNaN(u.right.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,o+="</div>",o+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}"><div>${t.value.translations.total}</div><div><b>${s.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,s.checkNaN(u.right.value)+s.checkNaN(u.left.value),s.dataLabel({v:s.checkNaN(u.right.value)+s.checkNaN(u.left.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,o+="</div>",C.value=`<div>${o}</div>`}w.value=!0}function F(){e.nextTick(()=>{const l=[t.value.translations.year,t.value.translations.age,t.value.translations.female,t.value.translations.male,t.value.translations.total],i=n.dataset.map(u=>[u[0],u[1],u[2],u[3],u[2]+u[3]]),a=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(i),o=s.createCsvContent(a);s.downloadCsv({csvContent:o,title:t.value.style.title.text||"vue-ui-heatmap"})})}const k=e.computed(()=>{const l=[t.value.translations.year,t.value.translations.age,t.value.translations.female,t.value.translations.male,t.value.translations.total],i=n.dataset.map(o=>[o[0],o[1],o[2].toLocaleString(),o[3].toLocaleString(),(o[2]+o[3]).toLocaleString()]),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:l,body:i,config:a,colNames:l}}),b=e.ref(!1);function K(l){b.value=l,L.value+=1}function O(){v.value.showTable=!v.value.showTable}function D(){v.value.showTooltip=!v.value.showTooltip}return U({generatePdf:P,generateCsv:F,generateImage:I,toggleTable:O,toggleTooltip:D}),(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-age-pyramid ${b.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"agePyramid",ref:g,id:`vue-ui-age-pyramid_${c.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor};${t.value.responsive?"height:100%":""}`)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:S,style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor}`)},[(e.openBlock(),e.createBlock(Q._sfc_main,{key:`title_${T.value}`,config:{title:{cy:"pyramid-div-title",...t.value.style.title},subtitle:{cy:"pyramid-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(q.UserOptions,{ref_key:"details",ref:H,key:`user_options_${L.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(V),isPrinting:e.unref(z),uid:c.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.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:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,onToggleFullscreen:K,onGeneratePdf:e.unref(P),onGenerateCsv:F,onGenerateImage:e.unref(I),onToggleTable:O,onToggleTooltip:D},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:o})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),viewBox:`0 0 ${d.value.width<=0?10:d.value.width} ${d.value.height<=0?10:d.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.backgroundColor};color:${t.value.style.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`age_pyramid_left_${c.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.bars.left.color},null,8,ie),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.setOpacity)(e.unref(s.shiftHue)(t.value.style.layout.bars.left.color,t.value.style.layout.bars.gradient.shiftHue),100-t.value.style.layout.bars.gradient.intensity)},null,8,ue)],8,re),e.createElementVNode("linearGradient",{id:`age_pyramid_right_${c.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(s.setOpacity)(e.unref(s.shiftHue)(t.value.style.layout.bars.right.color,t.value.style.layout.bars.gradient.shiftHue),100-t.value.style.layout.bars.gradient.intensity)},null,8,de),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.bars.right.color},null,8,ce)],8,ne)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.left.x,y:a.left.y,width:e.unref(s.checkNaN)(a.left.width<=0?1e-4:a.left.width),height:a.left.height<=0?1e-4:a.left.height,fill:t.value.style.layout.bars.gradient.underlayer,rx:t.value.style.layout.bars.borderRadius},null,8,ve),e.createElementVNode("rect",{x:a.left.x,y:a.left.y,width:a.left.width<=0?1e-4:a.left.width,height:a.left.height<=0?1e-4:a.left.height,fill:t.value.style.layout.bars.gradient.show?`url(#age_pyramid_left_${c.value})`:a.left.color,rx:t.value.style.layout.bars.borderRadius},null,8,ye),e.createElementVNode("rect",{x:a.right.x,y:a.right.y,width:a.right.width<=0?1e-4:a.right.width,height:a.right.height<=0?1e-4:a.right.height,fill:t.value.style.layout.bars.gradient.underlayer,rx:t.value.style.layout.bars.borderRadius},null,8,he),e.createElementVNode("rect",{x:a.right.x,y:a.right.y,width:a.right.width<=0?1e-4:a.right.width,height:a.right.height<=0?1e-4:a.right.height,fill:t.value.style.layout.bars.gradient.show?`url(#age_pyramid_right_${c.value})`:a.right.color,rx:t.value.style.layout.bars.borderRadius},null,8,fe)]))),256)),e.createElementVNode("g",null,[t.value.style.layout.dataLabels.sideTitles.show?(e.openBlock(),e.createElementBlock("g",ge,[e.createElementVNode("text",{x:r.value.left,y:r.value.top+t.value.style.layout.dataLabels.sideTitles.offsetY,fill:t.value.style.layout.dataLabels.sideTitles.useSideColor?t.value.style.layout.bars.left.color:t.value.style.layout.dataLabels.sideTitles.color,"font-size":t.value.style.layout.dataLabels.sideTitles.fontSize,"text-anchor":"start","font-weight":t.value.style.layout.dataLabels.sideTitles.bold?"bold":"normal"},e.toDisplayString(t.value.translations.female),9,pe),e.createElementVNode("text",{x:r.value.right,y:r.value.top+t.value.style.layout.dataLabels.sideTitles.offsetY,fill:t.value.style.layout.dataLabels.sideTitles.useSideColor?t.value.style.layout.bars.right.color:t.value.style.layout.dataLabels.sideTitles.color,"font-size":t.value.style.layout.dataLabels.sideTitles.fontSize,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.sideTitles.bold?"bold":"normal"},e.toDisplayString(t.value.translations.male),9,be)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(X.value,(a,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o%t.value.style.layout.dataLabels.yAxis.showEvery===0?(e.openBlock(),e.createElementBlock("text",{key:0,x:r.value.centerX,y:r.value.top+r.value.height/h.value*o+t.value.style.layout.dataLabels.yAxis.fontSize/3,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,"font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.dataLabels.yAxis.formatter,a,e.unref(s.dataLabel)({v:a}),{datapoint:a,seriesIndex:o})),9,me)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",ke,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",we,[e.createElementVNode("line",{x1:y.value.right[0].x,x2:y.value.right.at(-1).x,y1:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Ce),e.createElementVNode("line",{x1:y.value.left[0].x,x2:y.value.left.at(-1).x,y1:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,_e)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value.right,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:a.x,x2:a.x,y1:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/4,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Ne)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:a.x,y:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize*2,"font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"text-anchor":"middle","font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.dataLabels.xAxis.formatter,a.value/t.value.style.layout.dataLabels.xAxis.scale,e.unref(s.dataLabel)({v:a.value/t.value.style.layout.dataLabels.xAxis.scale}),{datapoint:a,seriesIndex:o})),9,Le)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value.left,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:a.x,x2:a.x,y1:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/4,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Se)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:a.x,y:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize*2,"font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"text-anchor":"middle","font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.dataLabels.xAxis.formatter,a.value/t.value.style.layout.dataLabels.xAxis.scale,e.unref(s.dataLabel)({v:a.value/t.value.style.layout.dataLabels.xAxis.scale}),{datapoint:a,seriesIndex:o})),9,Te)]))),256)),e.createElementVNode("text",{x:r.value.right,y:d.value.height,"text-anchor":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(t.value.style.layout.dataLabels.xAxis.translation),9,Be)])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.dataset,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:r.value.left,y:r.value.top+r.value.height/h.value*o-t.value.style.layout.bars.gap/2,width:r.value.width<=0?1e-4:r.value.width,height:r.value.height/h.value<=0?1e-4:r.value.height/h.value,fill:m.value!==null&&m.value===o?e.unref(s.setOpacity)(t.value.style.highlighter.color,t.value.style.highlighter.opacity):"transparent",onMouseover:u=>J(o,a),onMouseleave:i[0]||(i[0]=u=>{m.value=null,w.value=!1})},null,40,$e)]))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,se)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ae,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(z)||e.unref(V)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(te.default,{key:4,config:{type:"pyramid",style:{backgroundColor:t.value.style.backgroundColor,pyramid:{color:"#CCCCCC"}}}},null,8,["config"])),e.renderSlot(l.$slots,"legend",{legend:f.value},void 0,!0),e.createVNode(Z._sfc_main,{show:v.value.showTooltip&&w.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:g.value,content:C.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),x.value?(e.openBlock(),e.createBlock(le.default,{key:5,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(ee.DataTable,{key:`table_${B.value}`,colNames:k.value.colNames,head:k.value.head,body:k.value.body,config:k.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:i[1]||(i[1]=a=>v.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createTextVNode(e.toDisplayString(a),1)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,oe))}},ze=ae._export_sfc(Ee,[["__scopeId","data-v-5bca18c9"]]);exports.default=ze;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BofUHMEw.cjs"),R=require("./useResponsive-B3TrDDIG.cjs"),Q=require("./Title-DOzi72Pu.cjs"),q=require("./usePrinter-_JYb_33H.cjs"),Z=require("./Tooltip-DWx3KcqE.cjs"),ee=require("./DataTable-ysqfWT9v.cjs"),te=require("./vue-ui-skeleton-Bx_kbjKr.cjs"),le=require("./vue-ui-accordion-XtygMpX7.cjs"),G=require("./useNestedProp-DGK0LGfN.cjs"),ae=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),oe=["id"],se=["xmlns","viewBox"],re=["id"],ie=["stop-color"],ue=["stop-color"],ne=["id"],de=["stop-color"],ce=["stop-color"],ve=["x","y","width","height","fill","rx"],ye=["x","y","width","height","fill","rx"],he=["x","y","width","height","fill","rx"],fe=["x","y","width","height","fill","rx"],ge={key:0},pe=["x","y","fill","font-size","font-weight"],be=["x","y","fill","font-size","font-weight"],xe={key:1},me=["x","y","font-size","fill","font-weight"],ke={key:2},we={key:0},Ce=["x1","x2","y1","y2","stroke","stroke-width"],_e=["x1","x2","y1","y2","stroke","stroke-width"],Ne=["x1","x2","y1","y2","stroke","stroke-width"],Le=["x","y","font-size","fill","font-weight"],Se=["x1","x2","y1","y2","stroke","stroke-width"],Te=["x","y","font-size","fill","font-weight"],Be=["x","y","font-size","fill","font-weight"],$e=["x","y","width","height","fill","onMouseover"],Ae={key:3,class:"vue-data-ui-watermark"},Ee={__name:"vue-ui-age-pyramid",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(N,{expose:U}){const n=N,{vue_ui_age_pyramid:W}=s.useConfig(),x=e.computed(()=>!!n.dataset&&n.dataset.length),c=e.ref(s.createUid()),H=e.ref(null),w=e.ref(!1),C=e.ref(""),m=e.ref(null),L=e.ref(0),g=e.ref(null),S=e.ref(null),T=e.ref(0),B=e.ref(0),t=e.computed({get:()=>$(),set:l=>l});function $(){const l=G.useNestedProp({userConfig:n.config,defaultConfig:W});return l.theme?{...G.useNestedProp({userConfig:s.themes.vue_ui_age_pyramid[l.theme]||n.config,defaultConfig:l})}:l}e.watch(()=>n.config,l=>{t.value=$(),E(),T.value+=1,B.value+=1},{deep:!0});const A=e.ref(null);e.onMounted(()=>{E()});function E(){if(s.objectIsEmpty(n.dataset)&&s.error({componentName:"VueUiAgePyramid",type:"dataset"}),t.value.responsive){const l=R.throttle(()=>{const{width:i,height:a}=R.useResponsive({chart:g.value,title:t.value.style.title.text?S.value:null});d.value.width=i,d.value.height=a});A.value=new ResizeObserver(l),A.value.observe(g.value.parentNode)}}const{isPrinting:z,isImaging:V,generatePdf:P,generateImage:I}=q.usePrinter({elementId:`vue-ui-age-pyramid_${c.value}`,fileName:t.value.style.title.text||"vue-ui-age-pyramid"}),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),d=e.ref({height:t.value.style.height,width:t.value.style.width}),r=e.computed(()=>{const l=d.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left,i=t.value.style.layout.padding.left,a=d.value.width-t.value.style.layout.padding.right;return{top:t.value.style.layout.padding.top,left:i,right:a,bottom:d.value.height-t.value.style.layout.padding.bottom,width:l,height:d.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,centerX:t.value.style.layout.padding.left+l/2,leftChart:{width:l/2-t.value.style.layout.centerSlit.width,right:i+l/2-t.value.style.layout.centerSlit.width},rightChart:{width:l/2-t.value.style.layout.centerSlit.width,left:i+l/2+t.value.style.layout.centerSlit.width}}}),X=e.computed(()=>n.dataset.map(l=>t.value.style.layout.dataLabels.yAxis.display==="age"?l[1]:l[0])),y=e.computed(()=>{const l=j(p.value/5),i=[],a=[];for(let o=0;o<=5;o+=1){const u=l*o,M=l*(o-5);i.push({value:u,x:r.value.left+r.value.width/2+t.value.style.layout.centerSlit.width+u/p.value*r.value.leftChart.width}),a.push({value:Math.abs(M),x:r.value.left+r.value.width/2+M/p.value*r.value.leftChart.width-t.value.style.layout.centerSlit.width})}return{right:i,left:a}});function j(l){if(l===0)return 0;const a=10**Math.floor(Math.log10(Math.abs(l)));let o;return l<0,o=Math.round(l/a)*a,o}const p=e.computed(()=>Math.max(...n.dataset.flatMap(l=>l.slice(-2).map(i=>s.checkNaN(i))))),h=e.computed(()=>n.dataset.length),Y=e.computed(()=>n.dataset.map(l=>({segment:l[0],age:l[1],left:{value:l[2],proportionToMax:l[2]/p.value},right:{value:l[3],proportionToMax:l[3]/p.value}}))),f=e.computed(()=>Y.value.map((l,i)=>{const a=r.value.top+r.value.height/h.value*i,o=r.value.height/h.value-t.value.style.layout.bars.gap;return{segment:l.segment,age:l.age,left:{...l.left,y:a,color:t.value.style.layout.bars.left.color,x:r.value.leftChart.right-l.left.proportionToMax*r.value.leftChart.width,width:s.checkNaN(l.left.proportionToMax*r.value.leftChart.width),height:o},right:{...l.right,y:a,color:t.value.style.layout.bars.right.color,x:r.value.rightChart.left,width:s.checkNaN(l.right.proportionToMax*r.value.rightChart.width),height:o}}})),_=e.ref(null);function J(l,i){m.value=l,_.value={datapoint:i,seriesIndex:l,series:f.value,config:t.value};const a=t.value.style.tooltip.customFormat;if(s.isFunction(a)&&s.functionReturnsString(()=>a({seriesIndex:l,datapoint:{segment:i[0],index:i[1],left:i[2],right:i[3]},series:f.value,config:t.value})))C.value=a({seriesIndex:l,datapoint:{segment:i[0],index:i[1],left:i[2],right:i[3]},series:f.value,config:t.value});else{let o="";const u=f.value[l];o+=`<div><b>${u.segment}</b></div>`,o+=`<div>${t.value.translations.age}: ${s.applyDataLabel(t.value.style.layout.dataLabels.yAxis.formatter,s.checkNaN(u.age),s.dataLabel({v:s.checkNaN(u.age)}),{datapoint:i,seriesIndex:l})}</div>`,o+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,o+='<div style="display:flex; flex-direction:row;gap:12px">',o+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.show?`url(#age_pyramid_left_${c.value})`:t.value.style.layout.bars.left.color}"/></svg><div>${t.value.translations.female}</div><div><b>${s.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,s.checkNaN(u.left.value),s.dataLabel({v:s.checkNaN(u.left.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,o+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.show?`url(#age_pyramid_right_${c.value})`:t.value.style.layout.bars.right.color}"/></svg><div>${t.value.translations.male}</div><div><b>${s.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,s.checkNaN(u.right.value),s.dataLabel({v:s.checkNaN(u.right.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,o+="</div>",o+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}"><div>${t.value.translations.total}</div><div><b>${s.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,s.checkNaN(u.right.value)+s.checkNaN(u.left.value),s.dataLabel({v:s.checkNaN(u.right.value)+s.checkNaN(u.left.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,o+="</div>",C.value=`<div>${o}</div>`}w.value=!0}function F(){e.nextTick(()=>{const l=[t.value.translations.year,t.value.translations.age,t.value.translations.female,t.value.translations.male,t.value.translations.total],i=n.dataset.map(u=>[u[0],u[1],u[2],u[3],u[2]+u[3]]),a=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(i),o=s.createCsvContent(a);s.downloadCsv({csvContent:o,title:t.value.style.title.text||"vue-ui-heatmap"})})}const k=e.computed(()=>{const l=[t.value.translations.year,t.value.translations.age,t.value.translations.female,t.value.translations.male,t.value.translations.total],i=n.dataset.map(o=>[o[0],o[1],o[2].toLocaleString(),o[3].toLocaleString(),(o[2]+o[3]).toLocaleString()]),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:l,body:i,config:a,colNames:l}}),b=e.ref(!1);function K(l){b.value=l,L.value+=1}function O(){v.value.showTable=!v.value.showTable}function D(){v.value.showTooltip=!v.value.showTooltip}return U({generatePdf:P,generateCsv:F,generateImage:I,toggleTable:O,toggleTooltip:D}),(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-age-pyramid ${b.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"agePyramid",ref:g,id:`vue-ui-age-pyramid_${c.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor};${t.value.responsive?"height:100%":""}`)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:S,style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor}`)},[(e.openBlock(),e.createBlock(Q._sfc_main,{key:`title_${T.value}`,config:{title:{cy:"pyramid-div-title",...t.value.style.title},subtitle:{cy:"pyramid-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(q.UserOptions,{ref_key:"details",ref:H,key:`user_options_${L.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(V),isPrinting:e.unref(z),uid:c.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.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:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,onToggleFullscreen:K,onGeneratePdf:e.unref(P),onGenerateCsv:F,onGenerateImage:e.unref(I),onToggleTable:O,onToggleTooltip:D},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:o})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),viewBox:`0 0 ${d.value.width<=0?10:d.value.width} ${d.value.height<=0?10:d.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.backgroundColor};color:${t.value.style.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`age_pyramid_left_${c.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.bars.left.color},null,8,ie),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.setOpacity)(e.unref(s.shiftHue)(t.value.style.layout.bars.left.color,t.value.style.layout.bars.gradient.shiftHue),100-t.value.style.layout.bars.gradient.intensity)},null,8,ue)],8,re),e.createElementVNode("linearGradient",{id:`age_pyramid_right_${c.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(s.setOpacity)(e.unref(s.shiftHue)(t.value.style.layout.bars.right.color,t.value.style.layout.bars.gradient.shiftHue),100-t.value.style.layout.bars.gradient.intensity)},null,8,de),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.bars.right.color},null,8,ce)],8,ne)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.left.x,y:a.left.y,width:e.unref(s.checkNaN)(a.left.width<=0?1e-4:a.left.width),height:a.left.height<=0?1e-4:a.left.height,fill:t.value.style.layout.bars.gradient.underlayer,rx:t.value.style.layout.bars.borderRadius},null,8,ve),e.createElementVNode("rect",{x:a.left.x,y:a.left.y,width:a.left.width<=0?1e-4:a.left.width,height:a.left.height<=0?1e-4:a.left.height,fill:t.value.style.layout.bars.gradient.show?`url(#age_pyramid_left_${c.value})`:a.left.color,rx:t.value.style.layout.bars.borderRadius},null,8,ye),e.createElementVNode("rect",{x:a.right.x,y:a.right.y,width:a.right.width<=0?1e-4:a.right.width,height:a.right.height<=0?1e-4:a.right.height,fill:t.value.style.layout.bars.gradient.underlayer,rx:t.value.style.layout.bars.borderRadius},null,8,he),e.createElementVNode("rect",{x:a.right.x,y:a.right.y,width:a.right.width<=0?1e-4:a.right.width,height:a.right.height<=0?1e-4:a.right.height,fill:t.value.style.layout.bars.gradient.show?`url(#age_pyramid_right_${c.value})`:a.right.color,rx:t.value.style.layout.bars.borderRadius},null,8,fe)]))),256)),e.createElementVNode("g",null,[t.value.style.layout.dataLabels.sideTitles.show?(e.openBlock(),e.createElementBlock("g",ge,[e.createElementVNode("text",{x:r.value.left,y:r.value.top+t.value.style.layout.dataLabels.sideTitles.offsetY,fill:t.value.style.layout.dataLabels.sideTitles.useSideColor?t.value.style.layout.bars.left.color:t.value.style.layout.dataLabels.sideTitles.color,"font-size":t.value.style.layout.dataLabels.sideTitles.fontSize,"text-anchor":"start","font-weight":t.value.style.layout.dataLabels.sideTitles.bold?"bold":"normal"},e.toDisplayString(t.value.translations.female),9,pe),e.createElementVNode("text",{x:r.value.right,y:r.value.top+t.value.style.layout.dataLabels.sideTitles.offsetY,fill:t.value.style.layout.dataLabels.sideTitles.useSideColor?t.value.style.layout.bars.right.color:t.value.style.layout.dataLabels.sideTitles.color,"font-size":t.value.style.layout.dataLabels.sideTitles.fontSize,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.sideTitles.bold?"bold":"normal"},e.toDisplayString(t.value.translations.male),9,be)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(X.value,(a,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o%t.value.style.layout.dataLabels.yAxis.showEvery===0?(e.openBlock(),e.createElementBlock("text",{key:0,x:r.value.centerX,y:r.value.top+r.value.height/h.value*o+t.value.style.layout.dataLabels.yAxis.fontSize/3,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,"font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.dataLabels.yAxis.formatter,a,e.unref(s.dataLabel)({v:a}),{datapoint:a,seriesIndex:o})),9,me)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",ke,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",we,[e.createElementVNode("line",{x1:y.value.right[0].x,x2:y.value.right.at(-1).x,y1:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Ce),e.createElementVNode("line",{x1:y.value.left[0].x,x2:y.value.left.at(-1).x,y1:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,_e)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value.right,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:a.x,x2:a.x,y1:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/4,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Ne)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:a.x,y:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize*2,"font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"text-anchor":"middle","font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.dataLabels.xAxis.formatter,a.value/t.value.style.layout.dataLabels.xAxis.scale,e.unref(s.dataLabel)({v:a.value/t.value.style.layout.dataLabels.xAxis.scale}),{datapoint:a,seriesIndex:o})),9,Le)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value.left,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:a.x,x2:a.x,y1:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/4,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Se)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:a.x,y:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize*2,"font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"text-anchor":"middle","font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.dataLabels.xAxis.formatter,a.value/t.value.style.layout.dataLabels.xAxis.scale,e.unref(s.dataLabel)({v:a.value/t.value.style.layout.dataLabels.xAxis.scale}),{datapoint:a,seriesIndex:o})),9,Te)]))),256)),e.createElementVNode("text",{x:r.value.right,y:d.value.height,"text-anchor":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(t.value.style.layout.dataLabels.xAxis.translation),9,Be)])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.dataset,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:r.value.left,y:r.value.top+r.value.height/h.value*o-t.value.style.layout.bars.gap/2,width:r.value.width<=0?1e-4:r.value.width,height:r.value.height/h.value<=0?1e-4:r.value.height/h.value,fill:m.value!==null&&m.value===o?e.unref(s.setOpacity)(t.value.style.highlighter.color,t.value.style.highlighter.opacity):"transparent",onMouseover:u=>J(o,a),onMouseleave:i[0]||(i[0]=u=>{m.value=null,w.value=!1})},null,40,$e)]))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,se)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ae,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(z)||e.unref(V)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(te.default,{key:4,config:{type:"pyramid",style:{backgroundColor:t.value.style.backgroundColor,pyramid:{color:"#CCCCCC"}}}},null,8,["config"])),e.renderSlot(l.$slots,"legend",{legend:f.value},void 0,!0),e.createVNode(Z._sfc_main,{show:v.value.showTooltip&&w.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:g.value,content:C.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),x.value?(e.openBlock(),e.createBlock(le.default,{key:5,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(ee.DataTable,{key:`table_${B.value}`,colNames:k.value.colNames,head:k.value.head,body:k.value.body,config:k.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:i[1]||(i[1]=a=>v.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createTextVNode(e.toDisplayString(a),1)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,oe))}},ze=ae._export_sfc(Ee,[["__scopeId","data-v-5bca18c9"]]);exports.default=ze;
|