vue-data-ui 2.3.25 → 2.3.26
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-01eXaB81.cjs → Arrow-BRk7ox-0.cjs} +1 -1
- package/dist/{Arrow-zObQ2VxA.js → Arrow-Bkhcj4Ua.js} +1 -1
- package/dist/{BaseIcon-CHBghp3_.js → BaseIcon-Cr58pV0U.js} +1 -1
- package/dist/{BaseIcon-BkdELEYE.cjs → BaseIcon-r5Y-jYX5.cjs} +1 -1
- package/dist/{DataTable-D_2ZW2eI.cjs → DataTable-BM_PreHp.cjs} +1 -1
- package/dist/{DataTable-Dytj5HQM.js → DataTable-DFEpvyNK.js} +2 -2
- package/dist/{Legend-Ct8LnAy4.js → Legend-C-mWIWYw.js} +1 -1
- package/dist/{Legend-tvvMRnbi.cjs → Legend-yNP9uHMI.cjs} +1 -1
- package/dist/{Shape-qo5jcJq9.js → Shape-CN-v5JU3.js} +1 -1
- package/dist/{Shape-dvRttq7z.cjs → Shape-DBO11ZkD.cjs} +1 -1
- package/dist/{Slicer-DcjEg-ZZ.cjs → Slicer-CTw_6ddN.cjs} +1 -1
- package/dist/{Slicer-BNgHaM2_.js → Slicer-DK9Yp2l3.js} +1 -1
- package/dist/{Title-BcNPXpKX.js → Title-BFBOWO3Q.js} +1 -1
- package/dist/{Title-CSQdI1EY.cjs → Title-R6PrAyfG.cjs} +1 -1
- package/dist/{Tooltip-B-laoopT.cjs → Tooltip-DAjRpG7b.cjs} +1 -1
- package/dist/{Tooltip-etzDGo1Y.js → Tooltip-DravvC2X.js} +1 -1
- package/dist/{index-BE6fhUyH.js → index-Ck92ROEN.js} +1 -1
- package/dist/{index-BFH7X8WG.cjs → index-D2z8eN-t.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-BcjRW6BJ.js → useNestedProp-C0fDv_7c.js} +1 -1
- package/dist/{useNestedProp-B_z4-n52.cjs → useNestedProp-CUrnndD5.cjs} +1 -1
- package/dist/{usePrinter-CdIphKpF.js → usePrinter-DBPRZcAN.js} +1 -1
- package/dist/{usePrinter-hyuaFHQj.cjs → usePrinter-c6hW2FYl.cjs} +1 -1
- package/dist/{vue-data-ui-dbgbgXfB.cjs → vue-data-ui-B1MbygY4.cjs} +1 -1
- package/dist/{vue-data-ui-DH3---6Y.js → vue-data-ui-BhnYYgwX.js} +56 -56
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-CPpeRsrz.js → vue-ui-3d-bar-B2bAI0Ok.js} +7 -7
- package/dist/{vue-ui-3d-bar-ddx9_3_T.cjs → vue-ui-3d-bar-DXLZL0d1.cjs} +1 -1
- package/dist/{vue-ui-accordion-Dmz7RUKz.js → vue-ui-accordion-CYyb5N_o.js} +3 -3
- package/dist/{vue-ui-accordion-CvZhABQM.cjs → vue-ui-accordion-jSupvtFc.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-BieAbkr7.cjs → vue-ui-age-pyramid-07V7HAUc.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-DiOdrFIV.js → vue-ui-age-pyramid-DfD0KmQj.js} +8 -8
- package/dist/{vue-ui-annotator-CugE3IpZ.cjs → vue-ui-annotator-Cn3IeVBP.cjs} +1 -1
- package/dist/{vue-ui-annotator-KClMRKPi.js → vue-ui-annotator-DPxczJLi.js} +1 -1
- package/dist/{vue-ui-candlestick-DErkX5mF.cjs → vue-ui-candlestick-3oyL2e4C.cjs} +1 -1
- package/dist/{vue-ui-candlestick-D9MajMEG.js → vue-ui-candlestick-D5lyf_Oa.js} +9 -9
- package/dist/{vue-ui-carousel-table-CsCEcaWp.cjs → vue-ui-carousel-table-BolCtd-r.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-CLwi79Ly.js → vue-ui-carousel-table-CMm6zqzo.js} +4 -4
- package/dist/{vue-ui-chestnut-BTvQSTQi.cjs → vue-ui-chestnut-7EjCEIHL.cjs} +1 -1
- package/dist/{vue-ui-chestnut-BnmDdakJ.js → vue-ui-chestnut-BaZuTrGs.js} +6 -6
- package/dist/{vue-ui-cursor-KjKhIKTP.js → vue-ui-cursor-BNflEMT2.js} +2 -2
- package/dist/{vue-ui-cursor-Dj8pAXbc.cjs → vue-ui-cursor-D_Q1P1gt.cjs} +1 -1
- package/dist/{vue-ui-dashboard-Dm-rDSRt.js → vue-ui-dashboard-CjPmVfs3.js} +2 -2
- package/dist/{vue-ui-dashboard-BTpiCLaT.cjs → vue-ui-dashboard-D2RbUnMC.cjs} +1 -1
- package/dist/{vue-ui-digits-BVVOQfoO.cjs → vue-ui-digits-CgrkyBWm.cjs} +1 -1
- package/dist/{vue-ui-digits-WgEKLYdq.js → vue-ui-digits-DZPhwYe-.js} +2 -2
- package/dist/{vue-ui-donut-BjHWw_Mw.js → vue-ui-donut-CT4WPUa9.js} +9 -9
- package/dist/{vue-ui-donut-DvDqj2od.cjs → vue-ui-donut-OZoCX5cL.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-C0TW-uGR.cjs → vue-ui-donut-evolution-B5QxzbPT.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-CWBsLGUw.js → vue-ui-donut-evolution-HBigDBJ1.js} +9 -9
- package/dist/{vue-ui-dumbbell-BlsLMdW8.js → vue-ui-dumbbell-BbsbYS3D.js} +8 -8
- package/dist/{vue-ui-dumbbell-Uhw6rKrw.cjs → vue-ui-dumbbell-D3bJRtj_.cjs} +1 -1
- package/dist/{vue-ui-flow-fnDs0_mH.cjs → vue-ui-flow-CfoQVPzv.cjs} +1 -1
- package/dist/{vue-ui-flow-KijZNPzD.js → vue-ui-flow-JFuGf_sv.js} +7 -7
- package/dist/{vue-ui-galaxy-BBiGsB2G.cjs → vue-ui-galaxy-CvZ1nzpB.cjs} +1 -1
- package/dist/{vue-ui-galaxy-_y9H-beS.js → vue-ui-galaxy-e4ZjPVWn.js} +9 -9
- package/dist/{vue-ui-gauge-Bv4YKgIj.cjs → vue-ui-gauge-B_LND1ru.cjs} +1 -1
- package/dist/{vue-ui-gauge-CGgQqTqT.js → vue-ui-gauge-KjRrEYR0.js} +5 -5
- package/dist/{vue-ui-gizmo-DFWR7qEg.cjs → vue-ui-gizmo-CBtza3IW.cjs} +1 -1
- package/dist/{vue-ui-gizmo-DjAFk58g.js → vue-ui-gizmo-DzUxGQT6.js} +2 -2
- package/dist/{vue-ui-heatmap-D1AMro3o.js → vue-ui-heatmap-BYrZ7lqp.js} +8 -8
- package/dist/{vue-ui-heatmap-B5McL3SD.cjs → vue-ui-heatmap-CT1YT1xR.cjs} +1 -1
- package/dist/{vue-ui-kpi-BW2na3Yu.js → vue-ui-kpi-C5hCo3ZN.js} +2 -2
- package/dist/{vue-ui-kpi-Bb7xdAFU.cjs → vue-ui-kpi-DViXiLEh.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-CKZ-PEf5.js → vue-ui-mini-loader-BVSeWn2P.js} +2 -2
- package/dist/{vue-ui-mini-loader-22dagCEY.cjs → vue-ui-mini-loader-DDcjfpGi.cjs} +1 -1
- package/dist/{vue-ui-molecule-CWpBfXyk.cjs → vue-ui-molecule--7cCYOj1.cjs} +1 -1
- package/dist/{vue-ui-molecule-BK8HPWvg.js → vue-ui-molecule-pOHE_E-U.js} +9 -9
- package/dist/{vue-ui-mood-radar-CXq465Aj.js → vue-ui-mood-radar-Co6cLOze.js} +9 -9
- package/dist/{vue-ui-mood-radar-BZE6rvtb.cjs → vue-ui-mood-radar-DhmpKZpW.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-Ca-b8_P3.cjs → vue-ui-nested-donuts-BFyjhjQ_.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-BSYKxbNL.js → vue-ui-nested-donuts-kZh0P2Zc.js} +9 -9
- package/dist/{vue-ui-onion-DvRn35KQ.cjs → vue-ui-onion-BoKPJLJS.cjs} +1 -1
- package/dist/{vue-ui-onion-CMv38G-g.js → vue-ui-onion-DSGKwLbh.js} +9 -9
- package/dist/{vue-ui-parallel-coordinate-plot-DBZUno5l.js → vue-ui-parallel-coordinate-plot-B1I7MZP6.js} +10 -10
- package/dist/{vue-ui-parallel-coordinate-plot-C50SGcJo.cjs → vue-ui-parallel-coordinate-plot-BLAKE17u.cjs} +1 -1
- package/dist/{vue-ui-quadrant-CJo9jqLm.cjs → vue-ui-quadrant-BIPClpre.cjs} +1 -1
- package/dist/{vue-ui-quadrant-C-jh3Grv.js → vue-ui-quadrant-CHdlKi32.js} +10 -10
- package/dist/{vue-ui-quick-chart-BJ6lIxf6.cjs → vue-ui-quick-chart-5GZ03bOo.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-BvTLEmD_.js → vue-ui-quick-chart-ChnLIxWE.js} +6 -6
- package/dist/{vue-ui-radar-Kh4Qt05I.js → vue-ui-radar-BIogM1O1.js} +10 -10
- package/dist/{vue-ui-radar-CWgrIgHA.cjs → vue-ui-radar-BWPQ2p4R.cjs} +1 -1
- package/dist/{vue-ui-rating-DJsfvOxZ.cjs → vue-ui-rating-BI9eigGC.cjs} +1 -1
- package/dist/{vue-ui-rating-D7AkYGtK.js → vue-ui-rating-Y3i8Ogz9.js} +2 -2
- package/dist/{vue-ui-relation-circle-DRquG6N9.cjs → vue-ui-relation-circle-9tS5nJOC.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-CXQ9FHnG.js → vue-ui-relation-circle-m1hqaBQ0.js} +5 -5
- package/dist/{vue-ui-rings-BuuiGgkQ.js → vue-ui-rings-BGa6d8nO.js} +9 -9
- package/dist/{vue-ui-rings-DAuDNTak.cjs → vue-ui-rings-C2f4ARZJ.cjs} +1 -1
- package/dist/{vue-ui-scatter-Ba_1vbfG.js → vue-ui-scatter-B5aIcdg9.js} +10 -10
- package/dist/{vue-ui-scatter-Db1WHHMt.cjs → vue-ui-scatter-CSAIrCEA.cjs} +1 -1
- package/dist/{vue-ui-screenshot-rDwd1nNP.js → vue-ui-screenshot-BxURLkX-.js} +1 -1
- package/dist/{vue-ui-screenshot-BgvHfkel.cjs → vue-ui-screenshot-CHnimNZm.cjs} +1 -1
- package/dist/{vue-ui-skeleton-DZk__alb.js → vue-ui-skeleton-B_c8tnen.js} +2 -2
- package/dist/{vue-ui-skeleton-Df1qBO2k.cjs → vue-ui-skeleton-DwEcR_uq.cjs} +1 -1
- package/dist/{vue-ui-smiley-BPebp5hG.js → vue-ui-smiley-CV3_wGOs.js} +2 -2
- package/dist/{vue-ui-smiley-KQFOL39h.cjs → vue-ui-smiley-UfNprSwL.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-CSdQHPuY.js → vue-ui-spark-trend-7KqTeaKP.js} +4 -4
- package/dist/{vue-ui-spark-trend-Cr2Coq5M.cjs → vue-ui-spark-trend-DgqT22Rz.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-BIdS6UA_.cjs → vue-ui-sparkbar-DZoXx0tC.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-EhBZgeio.js → vue-ui-sparkbar-ekQGLCse.js} +3 -3
- package/dist/{vue-ui-sparkgauge-DFlQ-olI.cjs → vue-ui-sparkgauge-7hgIimV9.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-DTUDMW-e.js → vue-ui-sparkgauge-CsU1IpLn.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-_zChXZnF.cjs → vue-ui-sparkhistogram-CRY_Y5eU.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-CJZN2ZKW.js → vue-ui-sparkhistogram-_S3BGzoc.js} +4 -4
- package/dist/{vue-ui-sparkline-IWbHN7-r.cjs → vue-ui-sparkline-BR6TRx3i.cjs} +1 -1
- package/dist/{vue-ui-sparkline-B0OAXqfq.js → vue-ui-sparkline-DRu2dwsD.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-wPYlidft.js → vue-ui-sparkstackbar-DbxeqSNo.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-C6tBsD3M.cjs → vue-ui-sparkstackbar-aI73Hnxf.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-Bm0JThi4.js → vue-ui-strip-plot-B1C5JAka.js} +9 -9
- package/dist/{vue-ui-strip-plot-BAcR2Zug.cjs → vue-ui-strip-plot-CuhUA0Qj.cjs} +1 -1
- package/dist/{vue-ui-table-B0FlP2RX.cjs → vue-ui-table-BKq6uaQQ.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-bJUl4rY6.js → vue-ui-table-heatmap-B-we4-9Z.js} +4 -4
- package/dist/{vue-ui-table-heatmap-B2Xe1T4D.cjs → vue-ui-table-heatmap-CMASM_wg.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-DgZQmNaq.cjs → vue-ui-table-sparkline-CXr9vhM1.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-Dxinc_iR.js → vue-ui-table-sparkline-DBBEauiC.js} +5 -5
- package/dist/{vue-ui-table-6ZR-bgMx.js → vue-ui-table-vZxmfkYh.js} +1 -1
- package/dist/{vue-ui-thermometer-BN1harXD.cjs → vue-ui-thermometer-8Nd55_MN.cjs} +1 -1
- package/dist/{vue-ui-thermometer-Nb1pgJ04.js → vue-ui-thermometer-_KBWIP2u.js} +5 -5
- package/dist/{vue-ui-timer-_44ECu7b.cjs → vue-ui-timer-CgYqGFuQ.cjs} +1 -1
- package/dist/{vue-ui-timer-C17OoYkC.js → vue-ui-timer-D_UhMYSm.js} +4 -4
- package/dist/{vue-ui-tiremarks-BSMuOb-Z.cjs → vue-ui-tiremarks-7TlDnrfz.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-lbnWHaOP.js → vue-ui-tiremarks-Dy1h0ZlT.js} +5 -5
- package/dist/{vue-ui-treemap-CbdnMlBb.js → vue-ui-treemap-DrXs6PXS.js} +9 -9
- package/dist/{vue-ui-treemap-DinP2PhP.cjs → vue-ui-treemap-feRelA00.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-B9HnpW6M.js → vue-ui-vertical-bar-BcIZTywJ.js} +9 -9
- package/dist/{vue-ui-vertical-bar-B7cKvp6J.cjs → vue-ui-vertical-bar-ICikmicE.cjs} +1 -1
- package/dist/vue-ui-waffle-CGhfSP2_.cjs +1 -0
- package/dist/{vue-ui-waffle-70I35yZY.js → vue-ui-waffle-DtIGHSlB.js} +254 -250
- package/dist/{vue-ui-wheel-C8YTOjwd.js → vue-ui-wheel-B6Cya6I_.js} +5 -5
- package/dist/{vue-ui-wheel-DZbEyD4l.cjs → vue-ui-wheel-EdABo6ty.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-DkJyoTg9.cjs → vue-ui-word-cloud-DQV03srb.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-Don3Oz-A.js → vue-ui-word-cloud-narokI2y.js} +6 -6
- package/dist/{vue-ui-xy-XJp90Tih.js → vue-ui-xy-D1yhL28g.js} +12 -12
- package/dist/{vue-ui-xy-DkBLRZ6y.cjs → vue-ui-xy-DOWVG8x2.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-CsPcJxOA.js → vue-ui-xy-canvas-D2VfaNJf.js} +10 -10
- package/dist/{vue-ui-xy-canvas-Do2LgfMo.cjs → vue-ui-xy-canvas-Dp8YKKTs.cjs} +1 -1
- package/package.json +1 -1
- package/dist/vue-ui-waffle-BaqQnh1w.cjs +0 -1
|
@@ -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-Cr58pV0U.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-BkdELEYE.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-r5Y-jYX5.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-r5Y-jYX5.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-DXLZL0d1.cjs"))),VueUiAgePyramid:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-age-pyramid-07V7HAUc.cjs"))),VueUiAnnotator:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-annotator-Cn3IeVBP.cjs"))),VueUiCandlestick:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-candlestick-3oyL2e4C.cjs"))),VueUiChestnut:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-chestnut-7EjCEIHL.cjs"))),VueUiDashboard:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-dashboard-D2RbUnMC.cjs"))),VueUiDigits:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-digits-CgrkyBWm.cjs"))),VueUiDonut:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-donut-OZoCX5cL.cjs"))),VueUiDonutEvolution:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-donut-evolution-B5QxzbPT.cjs"))),VueUiGalaxy:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-galaxy-CvZ1nzpB.cjs"))),VueUiGauge:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-gauge-B_LND1ru.cjs"))),VueUiHeatmap:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-heatmap-CT1YT1xR.cjs"))),VueUiKpi:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-kpi-DViXiLEh.cjs"))),VueUiMiniLoader:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-mini-loader-DDcjfpGi.cjs"))),VueUiMolecule:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-molecule--7cCYOj1.cjs"))),VueUiMoodRadar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-mood-radar-DhmpKZpW.cjs"))),VueUiNestedDonuts:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-nested-donuts-BFyjhjQ_.cjs"))),VueUiOnion:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-onion-BoKPJLJS.cjs"))),VueUiQuadrant:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-quadrant-BIPClpre.cjs"))),VueUiRadar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-radar-BWPQ2p4R.cjs"))),VueUiRating:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-rating-BI9eigGC.cjs"))),VueUiRelationCircle:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-relation-circle-9tS5nJOC.cjs"))),VueUiRings:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-rings-C2f4ARZJ.cjs"))),VueUiScatter:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-scatter-CSAIrCEA.cjs"))),VueUiScreenshot:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-screenshot-CHnimNZm.cjs"))),VueUiSkeleton:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-skeleton-DwEcR_uq.cjs"))),VueUiSmiley:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-smiley-UfNprSwL.cjs"))),VueUiSparkbar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-sparkbar-DZoXx0tC.cjs"))),VueUiSparkgauge:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-sparkgauge-7hgIimV9.cjs"))),VueUiSparkHistogram:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-sparkhistogram-CRY_Y5eU.cjs"))),VueUiSparkline:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-sparkline-BR6TRx3i.cjs"))),VueUiSparkStackbar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-sparkstackbar-aI73Hnxf.cjs"))),VueUiTable:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-table-BKq6uaQQ.cjs"))),VueUiTableSparkline:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-table-sparkline-CXr9vhM1.cjs"))),VueUiThermometer:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-thermometer-8Nd55_MN.cjs"))),VueUiTiremarks:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-tiremarks-7TlDnrfz.cjs"))),VueUiTreemap:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-treemap-feRelA00.cjs"))),VueUiVerticalBar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-vertical-bar-ICikmicE.cjs"))),VueUiWaffle:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-waffle-CGhfSP2_.cjs"))),VueUiWheel:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-wheel-EdABo6ty.cjs"))),VueUiXy:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-xy-DOWVG8x2.cjs"))),VueUiTableHeatmap:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-table-heatmap-CMASM_wg.cjs"))),VueUiAccordion:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-accordion-jSupvtFc.cjs"))),VueUiQuickChart:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-quick-chart-5GZ03bOo.cjs"))),VueUiCursor:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-cursor-D_Q1P1gt.cjs"))),VueUiSparkTrend:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-spark-trend-DgqT22Rz.cjs"))),VueUiStripPlot:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-strip-plot-CuhUA0Qj.cjs"))),VueUiDumbbell:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-dumbbell-D3bJRtj_.cjs"))),VueUiWordCloud:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-word-cloud-DQV03srb.cjs"))),VueUiXyCanvas:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-xy-canvas-Dp8YKKTs.cjs"))),VueUiFlow:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-flow-CfoQVPzv.cjs"))),VueUiParallelCoordinatePlot:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-parallel-coordinate-plot-BLAKE17u.cjs"))),VueUiTimer:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-timer-CgYqGFuQ.cjs"))),VueUiCarouselTable:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-carousel-table-BolCtd-r.cjs"))),VueUiGizmo:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-gizmo-CBtza3IW.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"]},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),T=e.ref(()=>null),b=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-Cr58pV0U.js";
|
|
3
3
|
const de = {
|
|
4
4
|
key: 0,
|
|
5
5
|
style: { width: "100%", display: "flex", gap: "6px", "align-items": "center", color: "#FF0000" }
|
|
@@ -36,61 +36,61 @@ 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-
|
|
39
|
+
VueUi3dBar: t(() => import("./vue-ui-3d-bar-B2bAI0Ok.js")),
|
|
40
|
+
VueUiAgePyramid: t(() => import("./vue-ui-age-pyramid-DfD0KmQj.js")),
|
|
41
|
+
VueUiAnnotator: t(() => import("./vue-ui-annotator-DPxczJLi.js")),
|
|
42
|
+
VueUiCandlestick: t(() => import("./vue-ui-candlestick-D5lyf_Oa.js")),
|
|
43
|
+
VueUiChestnut: t(() => import("./vue-ui-chestnut-BaZuTrGs.js")),
|
|
44
|
+
VueUiDashboard: t(() => import("./vue-ui-dashboard-CjPmVfs3.js")),
|
|
45
|
+
VueUiDigits: t(() => import("./vue-ui-digits-DZPhwYe-.js")),
|
|
46
|
+
VueUiDonut: t(() => import("./vue-ui-donut-CT4WPUa9.js")),
|
|
47
|
+
VueUiDonutEvolution: t(() => import("./vue-ui-donut-evolution-HBigDBJ1.js")),
|
|
48
|
+
VueUiGalaxy: t(() => import("./vue-ui-galaxy-e4ZjPVWn.js")),
|
|
49
|
+
VueUiGauge: t(() => import("./vue-ui-gauge-KjRrEYR0.js")),
|
|
50
|
+
VueUiHeatmap: t(() => import("./vue-ui-heatmap-BYrZ7lqp.js")),
|
|
51
|
+
VueUiKpi: t(() => import("./vue-ui-kpi-C5hCo3ZN.js")),
|
|
52
|
+
VueUiMiniLoader: t(() => import("./vue-ui-mini-loader-BVSeWn2P.js")),
|
|
53
|
+
VueUiMolecule: t(() => import("./vue-ui-molecule-pOHE_E-U.js")),
|
|
54
|
+
VueUiMoodRadar: t(() => import("./vue-ui-mood-radar-Co6cLOze.js")),
|
|
55
|
+
VueUiNestedDonuts: t(() => import("./vue-ui-nested-donuts-kZh0P2Zc.js")),
|
|
56
|
+
VueUiOnion: t(() => import("./vue-ui-onion-DSGKwLbh.js")),
|
|
57
|
+
VueUiQuadrant: t(() => import("./vue-ui-quadrant-CHdlKi32.js")),
|
|
58
|
+
VueUiRadar: t(() => import("./vue-ui-radar-BIogM1O1.js")),
|
|
59
|
+
VueUiRating: t(() => import("./vue-ui-rating-Y3i8Ogz9.js")),
|
|
60
|
+
VueUiRelationCircle: t(() => import("./vue-ui-relation-circle-m1hqaBQ0.js")),
|
|
61
|
+
VueUiRings: t(() => import("./vue-ui-rings-BGa6d8nO.js")),
|
|
62
|
+
VueUiScatter: t(() => import("./vue-ui-scatter-B5aIcdg9.js")),
|
|
63
|
+
VueUiScreenshot: t(() => import("./vue-ui-screenshot-BxURLkX-.js")),
|
|
64
|
+
VueUiSkeleton: t(() => import("./vue-ui-skeleton-B_c8tnen.js")),
|
|
65
|
+
VueUiSmiley: t(() => import("./vue-ui-smiley-CV3_wGOs.js")),
|
|
66
|
+
VueUiSparkbar: t(() => import("./vue-ui-sparkbar-ekQGLCse.js")),
|
|
67
|
+
VueUiSparkgauge: t(() => import("./vue-ui-sparkgauge-CsU1IpLn.js")),
|
|
68
|
+
VueUiSparkHistogram: t(() => import("./vue-ui-sparkhistogram-_S3BGzoc.js")),
|
|
69
|
+
VueUiSparkline: t(() => import("./vue-ui-sparkline-DRu2dwsD.js")),
|
|
70
|
+
VueUiSparkStackbar: t(() => import("./vue-ui-sparkstackbar-DbxeqSNo.js")),
|
|
71
|
+
VueUiTable: t(() => import("./vue-ui-table-vZxmfkYh.js")),
|
|
72
|
+
VueUiTableSparkline: t(() => import("./vue-ui-table-sparkline-DBBEauiC.js")),
|
|
73
|
+
VueUiThermometer: t(() => import("./vue-ui-thermometer-_KBWIP2u.js")),
|
|
74
|
+
VueUiTiremarks: t(() => import("./vue-ui-tiremarks-Dy1h0ZlT.js")),
|
|
75
|
+
VueUiTreemap: t(() => import("./vue-ui-treemap-DrXs6PXS.js")),
|
|
76
|
+
VueUiVerticalBar: t(() => import("./vue-ui-vertical-bar-BcIZTywJ.js")),
|
|
77
|
+
VueUiWaffle: t(() => import("./vue-ui-waffle-DtIGHSlB.js")),
|
|
78
|
+
VueUiWheel: t(() => import("./vue-ui-wheel-B6Cya6I_.js")),
|
|
79
|
+
VueUiXy: t(() => import("./vue-ui-xy-D1yhL28g.js")),
|
|
80
|
+
VueUiTableHeatmap: t(() => import("./vue-ui-table-heatmap-B-we4-9Z.js")),
|
|
81
|
+
VueUiAccordion: t(() => import("./vue-ui-accordion-CYyb5N_o.js")),
|
|
82
|
+
VueUiQuickChart: t(() => import("./vue-ui-quick-chart-ChnLIxWE.js")),
|
|
83
|
+
VueUiCursor: t(() => import("./vue-ui-cursor-BNflEMT2.js")),
|
|
84
|
+
VueUiSparkTrend: t(() => import("./vue-ui-spark-trend-7KqTeaKP.js")),
|
|
85
|
+
VueUiStripPlot: t(() => import("./vue-ui-strip-plot-B1C5JAka.js")),
|
|
86
|
+
VueUiDumbbell: t(() => import("./vue-ui-dumbbell-BbsbYS3D.js")),
|
|
87
|
+
VueUiWordCloud: t(() => import("./vue-ui-word-cloud-narokI2y.js")),
|
|
88
|
+
VueUiXyCanvas: t(() => import("./vue-ui-xy-canvas-D2VfaNJf.js")),
|
|
89
|
+
VueUiFlow: t(() => import("./vue-ui-flow-JFuGf_sv.js")),
|
|
90
|
+
VueUiParallelCoordinatePlot: t(() => import("./vue-ui-parallel-coordinate-plot-B1I7MZP6.js")),
|
|
91
|
+
VueUiTimer: t(() => import("./vue-ui-timer-D_UhMYSm.js")),
|
|
92
|
+
VueUiCarouselTable: t(() => import("./vue-ui-carousel-table-CMm6zqzo.js")),
|
|
93
|
+
VueUiGizmo: t(() => import("./vue-ui-gizmo-DzUxGQT6.js"))
|
|
94
94
|
}, Q = {
|
|
95
95
|
VueUi3dBar: ["config", "dataset"],
|
|
96
96
|
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-D2z8eN-t.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.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 { Z as s, _ as u, $ as V, a0 as U, a1 as r, a2 as t, a3 as o, aR as l, a4 as n, a5 as d, a6 as m, a7 as p, a8 as S, a9 as g, aa as c, ab as k, ac as C, ad as T, aS as b, ae as D, af as h, ag as P, ah as f, ai as y, aj as R, ak as A, al as x, am as G, an as H, ao as M, ap as W, aq as v, ar as w, as as B, at as F, au as Q, av as z, aw as E, ax as I, ay as K, az as L, aA as N, aB as O, aC as X, aD as j, aE as q, aF as J, aG as Z, aH as _, aI as $, aJ as Y, aK as aa, aL as ea, aM as ia, aN as sa, aO as ua, aP as Va, aQ as Ua, S as ra, aT as ta, aU as oa, aV as la } from "./index-
|
|
2
|
+
import { Z as s, _ as u, $ as V, a0 as U, a1 as r, a2 as t, a3 as o, aR as l, a4 as n, a5 as d, a6 as m, a7 as p, a8 as S, a9 as g, aa as c, ab as k, ac as C, ad as T, aS as b, ae as D, af as h, ag as P, ah as f, ai as y, aj as R, ak as A, al as x, am as G, an as H, ao as M, ap as W, aq as v, ar as w, as as B, at as F, au as Q, av as z, aw as E, ax as I, ay as K, az as L, aA as N, aB as O, aC as X, aD as j, aE as q, aF as J, aG as Z, aH as _, aI as $, aJ as Y, aK as aa, aL as ea, aM as ia, aN as sa, aO as ua, aP as Va, aQ as Ua, S as ra, aT as ta, aU as oa, aV as la } from "./index-Ck92ROEN.js";
|
|
3
3
|
export {
|
|
4
4
|
s as Arrow,
|
|
5
5
|
u as VueDataUi,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { computed as P, ref as z, onMounted as ze, openBlock as n, createElementBlock as i, normalizeClass as $e, normalizeStyle as D, createVNode as ge, createCommentVNode as k, createBlock as se, unref as v, createSlots as Be, withCtx as B, renderSlot as j, normalizeProps as R, guardReactiveProps as Y, createElementVNode as r, Fragment as $, renderList as g, toDisplayString as M, createTextVNode as Ie, nextTick as Oe, pushScopeId as Le, popScopeId as We } from "vue";
|
|
2
|
-
import { u as Ge, c as _e, t as Ve, a as Ae, p as J, b as Ue, d as S, o as Ee, e as K, g as ae, l as A, m as me, f as I, X as He, h as Q, i as xe, j as O, k as ee, n as Ze, q as qe } from "./index-
|
|
3
|
-
import { _ as Xe } from "./Title-
|
|
4
|
-
import { u as Re, U as Ye } from "./usePrinter-
|
|
5
|
-
import Je from "./vue-ui-skeleton-
|
|
6
|
-
import { D as Ke } from "./DataTable-
|
|
7
|
-
import Qe from "./vue-ui-accordion-
|
|
8
|
-
import { u as be } from "./useNestedProp-
|
|
2
|
+
import { u as Ge, c as _e, t as Ve, a as Ae, p as J, b as Ue, d as S, o as Ee, e as K, g as ae, l as A, m as me, f as I, X as He, h as Q, i as xe, j as O, k as ee, n as Ze, q as qe } from "./index-Ck92ROEN.js";
|
|
3
|
+
import { _ as Xe } from "./Title-BFBOWO3Q.js";
|
|
4
|
+
import { u as Re, U as Ye } from "./usePrinter-DBPRZcAN.js";
|
|
5
|
+
import Je from "./vue-ui-skeleton-B_c8tnen.js";
|
|
6
|
+
import { D as Ke } from "./DataTable-DFEpvyNK.js";
|
|
7
|
+
import Qe from "./vue-ui-accordion-CYyb5N_o.js";
|
|
8
|
+
import { u as be } from "./useNestedProp-C0fDv_7c.js";
|
|
9
9
|
import { _ as et } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
10
|
const te = (U) => (Le("data-v-82f069d2"), U = U(), We(), U), tt = ["id"], lt = ["xmlns", "viewBox"], ot = ["id"], st = ["stop-color"], at = ["stop-color"], nt = ["id"], rt = ["stop-color"], ut = ["stop-color"], it = ["id"], dt = ["stop-color"], ct = ["stop-color"], ht = ["id"], vt = ["stop-color"], ft = ["stop-color"], pt = ["stop-color"], yt = { key: 0 }, kt = ["id"], $t = ["stop-color"], gt = ["stop-color"], _t = ["id"], mt = ["stop-color"], xt = ["stop-color"], bt = ["id"], wt = ["stop-color"], Ct = ["stop-color"], Ft = ["id"], Mt = /* @__PURE__ */ te(() => /* @__PURE__ */ r("stop", {
|
|
11
11
|
offset: "0%",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-D2z8eN-t.cjs"),se=require("./Title-R6PrAyfG.cjs"),Z=require("./usePrinter-c6hW2FYl.cjs"),ue=require("./vue-ui-skeleton-DwEcR_uq.cjs"),ie=require("./DataTable-BM_PreHp.cjs"),ce=require("./vue-ui-accordion-jSupvtFc.cjs"),Y=require("./useNestedProp-CUrnndD5.cjs"),de=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),D=N=>(e.pushScopeId("data-v-82f069d2"),N=N(),e.popScopeId(),N),he=["id"],ve=["xmlns","viewBox"],fe=["id"],pe=["stop-color"],ke=["stop-color"],me=["id"],ye=["stop-color"],ge=["stop-color"],$e=["id"],_e=["stop-color"],xe=["stop-color"],Be=["id"],be=["stop-color"],Ce=["stop-color"],Ee=["stop-color"],we={key:0},Ne=["id"],Ve=["stop-color"],Fe=["stop-color"],Se=["id"],Me=["stop-color"],Pe=["stop-color"],De=["id"],Te=["stop-color"],Le=["stop-color"],ze=["id"],je=D(()=>e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF"},null,-1)),Oe=D(()=>e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF33"},null,-1)),He=[je,Oe],Ie=["x","y","font-size","font-weight","fill"],We=["x","y"],Ge=["d","stroke"],Ae=["d","stroke"],qe={key:3},Ue={key:0},Xe=["stroke-dasharray","d","stroke","stroke-width"],Re=["stroke-dasharray","d","stroke","stroke-width"],Ze=["stroke-dasharray","d","stroke","stroke-width"],Ye=["stroke-dasharray","d","stroke","stroke-width"],Je={key:1},Ke=["d","stroke","stroke-width","fill"],Qe=["d","stroke","stroke-width","fill"],et=["d","stroke","stroke-width","fill"],tt={key:2},lt=["d","fill","onMouseenter","onClick"],ot=["d","fill","onMouseenter","onClick"],rt=["d","fill","onMouseenter","onClick"],nt=["d","onMouseenter","onClick"],at=["d"],st=["d","stroke"],ut=["onClick"],it=["stroke","d"],ct=["cx","cy","fill","stroke"],dt=["x","y","width","height"],ht={key:1},vt=["d","stroke"],ft=["d","fill","stroke"],pt=["id"],kt=["stop-color"],mt=D(()=>e.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF20"},null,-1)),yt=["stop-color"],gt=["cx","cy","fill"],$t=["cx","cy","fill"],_t={key:0},xt=["text-anchor","x","y","fill","font-size"],Bt=["text-anchor","x","y","fill","font-size"],bt={key:2},Ct=["d","fill","stroke"],Et={key:4},wt={key:0},Nt=["stroke-dasharray","d","stroke","stroke-width"],Vt=["stroke-dasharray","d","stroke","stroke-width"],Ft=["stroke-dasharray","d","stroke","stroke-width"],St=["stroke-dasharray","d","stroke","stroke-width"],Mt=["d","stroke","stroke-width","fill"],Pt=["d","stroke","stroke-width","fill"],Dt={key:1},Tt=["onClick"],Lt=["id"],zt=["stop-color"],jt=["stop-color"],Ot=["id"],Ht=["stop-color"],It=["stop-color"],Wt=["stop-color"],Gt=["stop-color"],At=["stop-color"],qt=["onMouseenter","onClick","d","fill"],Ut=["onMouseenter","onClick","d"],Xt=["onMouseenter","onClick","d","fill"],Rt=["onClick"],Zt=["stroke","d"],Yt=["cx","cy","fill","stroke"],Jt=["x","y","width","height"],Kt={key:1},Qt=["d","stroke"],el=["d","fill","stroke"],tl=["id"],ll=["stop-color"],ol=D(()=>e.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF20"},null,-1)),rl=["stop-color"],nl=["cx","cy","fill"],al=["cx","cy","fill"],sl={key:0},ul=["text-anchor","x","y","fill","font-size"],il=["text-anchor","x","y","fill","font-size"],cl={key:2},dl=["d","fill","stroke"],hl={key:3,class:"vue-data-ui-watermark"},vl=["innerHTML"],fl={__name:"vue-ui-3d-bar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectDatapoint"],setup(N,{expose:J,emit:F}){const p=N,{vue_ui_3d_bar:K}=i.useConfig(),S=e.computed(()=>!!p.dataset&&Object.keys(p.dataset).length),m=e.ref(i.createUid()),Q=e.ref(null),z=e.ref(null),b=e.ref(!1),l=e.computed(()=>{const u=Y.useNestedProp({userConfig:p.config,defaultConfig:K});return u.theme?{...Y.useNestedProp({userConfig:i.themes.vue_ui_3d_bar[u.theme]||p.config,defaultConfig:u}),customPalette:i.themePalettes[u.theme]||i.palette}:u}),{isPrinting:j,isImaging:O,generatePdf:H,generateImage:I}=Z.usePrinter({elementId:`3d_bar_${m.value}`,fileName:l.value.style.chart.title.text||"vue-ui-3d-bar"}),ee=e.computed(()=>i.convertCustomPalette(l.value.customPalette)),M=e.ref({showTable:l.value.table.show}),$=e.computed(()=>p.dataset.series&&p.dataset.series.length),r=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 u=p.dataset.series.map(o=>o.value||0).reduce((o,a)=>o+a,0),n=p.dataset.series.map((o,a)=>({...o,id:i.createUid(),proportion:(o.value||0)/u,color:i.convertColorToHex(o.color)||ee.value[a]||i.palette[a]||i.palette[a%i.palette.length],breakdown:o.breakdown?o.breakdown.sort((s,f)=>f.value-s.value):null})).sort((o,a)=>a.value-o.value),t=[];let c=0;for(let o=0;o<n.length;o+=1)t.push({...n[o],fill:te(c,n[o].proportion,n[o].breakdown,n[o].color)}),c+=n[o].proportion;return t}return null}),x=e.computed(()=>({right:`M${r.value.width/2},${r.value.top} ${r.value.width-r.value.right}, ${r.value.top+r.value.perspective} ${r.value.width-r.value.right},${r.value.height-r.value.bottom-r.value.perspective} ${r.value.width/2},${r.value.height-r.value.bottom}`,left:`M${r.value.width/2},${r.value.top} ${r.value.left},${r.value.top+r.value.perspective} ${r.value.left},${r.value.height-r.value.bottom-r.value.perspective} ${r.value.width/2},${r.value.height-r.value.bottom}`,side:`M${r.value.width/2},${r.value.height-r.value.bottom} ${r.value.width/2},${r.value.top+r.value.perspective*2}`,topSides:`M${r.value.left},${r.value.top+r.value.perspective} ${r.value.width/2},${r.value.top+r.value.perspective*2} ${r.value.width-r.value.right},${r.value.top+r.value.perspective}`,tubeTop:`M${r.value.left},${r.value.top+r.value.perspective} C ${r.value.left},${r.value.top-r.value.perspective/3} ${r.value.width-r.value.right},${r.value.top-r.value.perspective/3} ${r.value.width-r.value.right},${r.value.top+r.value.perspective} C ${r.value.width-r.value.right},${r.value.top+r.value.perspective*2.3} ${r.value.left},${r.value.top+r.value.perspective*2.3} ${r.value.left},${r.value.top+r.value.perspective}`,tubeLeft:`M${r.value.left},${r.value.top+r.value.perspective} ${r.value.left},${r.value.height-r.value.bottom-r.value.perspective}`,tubeRight:`M${r.value.width-r.value.right},${r.value.top+r.value.perspective} ${r.value.width-r.value.right},${r.value.height-r.value.bottom-r.value.perspective}`,tubeBottom:`M${r.value.width-r.value.right},${r.value.height-r.value.bottom-r.value.perspective} C ${r.value.width-r.value.right},${r.value.height} ${r.value.left},${r.value.height} ${r.value.left},${r.value.height-r.value.bottom-r.value.perspective}`})),C=e.ref(l.value.style.chart.animation.use?0:p.dataset.percentage);e.onMounted(()=>{i.objectIsEmpty(p.dataset)?i.error({componentName:"VueUi3dBar",type:"dataset"}):p.dataset.series?p.dataset.series.forEach((o,a)=>{i.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(s=>{i.error({componentName:"VueUi3dBar",type:"datasetSerieAttribute",property:s,index:a})}),o.breakdown&&o.breakdown.forEach((s,f)=>{i.getMissingDatasetAttributes({datasetObject:s,requiredAttributes:["name","value"]}).forEach(k=>{i.error({componentName:"VueUi3dBar",type:"datasetSerieAttribute",property:k,index:`${a} - ${f}`})})})}):i.getMissingDatasetAttributes({datasetObject:p.dataset,requiredAttributes:["percentage"]}).forEach(o=>{i.error({componentName:"VueUi3dBar",type:"datasetAttribute",property:o})});let u=0,n=l.value.style.chart.animation.speed,t=.005*l.value.style.chart.animation.acceleration;function c(){C.value+=n+u,u+=t,C.value<p.dataset.percentage?requestAnimationFrame(c):C.value=p.dataset.percentage}l.value.style.chart.animation.use&&(C.value=0,c())});function te(u,n,t,c){const o=r.value.height-r.value.bottom-r.value.top-r.value.perspective*2,{width:a,height:s,bottom:f,right:k,left:h,perspective:v}=r.value,d=f+o*u,L=s-d-v-o*n/2,re=L>r.value.height/2?"top":"bottom",q=64,ne=!!t;let U=null,X=null;return ne&&(t=t.map((R,ae)=>({...R,value:R.value||0,color:i.lightenHexColor(c,ae/t.length)})),U=i.makeDonut({series:t},a+r.value.absoluteWidth/4-14,re==="top"?L-q:L+q,28,28,1.99999,2,1,360,105.25,14),X=i.makeDonut({series:t},a-k+20,s-d-v-o*n/2,6,6,1.99999,2,1,360,105.25,6)),{donut:U,miniDonut:X,sidePointer:{x:a-k,y:s-d-v-o*n/2,topY:s-d-v-o*n,height:o*n},apexBottom:{y:s-d,x:a/2},apexTop:{y:s-d-o*n,x:a/2},right:`M${a/2},${s-d} ${a/2},${s-d-o*n} ${a-k},${s-d-v-o*n} ${a-k},${s-d-v}Z`,left:`M${a/2},${s-d} ${a/2},${s-d-o*n} ${h}, ${s-d-v-o*n} ${h},${s-d-v}Z`,liningTop:`M${h},${s-d-v-o*n} ${a/2},${s-d-o*n} ${a-k},${s-d-v-o*n}`,liningTopShade:`M${h},${s-d-v-o*n-.5} ${a/2},${s-d-o*n-.5} ${a-k},${s-d-v-o*n-.5}`,top:`M${a/2},${s-d-o*n} ${h},${s-d-v-o*n} ${a/2},${s-d-v*2-o*n} ${a-k},${s-d-v-o*n} Z`,tubeTop:`M${h},${s-d-o*n-v} C ${h},${s-d-o*n-v*2.5} ${a-k},${s-d-o*n-v*2.5} ${a-k},${s-d-o*n-v} C ${a-k},${s-d-o*n+v/2} ${h},${s-d-o*n+v/2} ${h},${s-d-o*n-v}`,bottomTubeTop:`M ${a-k-.5},${s-d-v} C ${a-k-.5},${s-d+v/2} ${h},${s-d+v/2} ${h+.5},${s-d-v}`,tubeBody:`M
|
|
2
2
|
${h},${s-d-o*n-v}
|
|
3
3
|
C ${h},${s-d-o*n+v/2}
|
|
4
4
|
${a-k},${s-d-o*n+v/2}
|
|
@@ -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-Cr58pV0U.js";
|
|
3
|
+
import { u as x } from "./useNestedProp-C0fDv_7c.js";
|
|
4
|
+
import { u as B, c as I } from "./index-Ck92ROEN.js";
|
|
5
5
|
import { _ as A } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
6
|
const F = ["id"], P = {
|
|
7
7
|
key: 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-r5Y-jYX5.cjs"),g=require("./useNestedProp-CUrnndD5.cjs"),u=require("./index-D2z8eN-t.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 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-BFH7X8WG.cjs"),I=require("./useResponsive-B3TrDDIG.cjs"),j=require("./Title-CSQdI1EY.cjs"),M=require("./usePrinter-hyuaFHQj.cjs"),Y=require("./Tooltip-B-laoopT.cjs"),J=require("./DataTable-D_2ZW2eI.cjs"),K=require("./vue-ui-skeleton-Df1qBO2k.cjs"),Q=require("./vue-ui-accordion-CvZhABQM.cjs"),O=require("./useNestedProp-B_z4-n52.cjs"),Z=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ee=["id"],te=["xmlns","viewBox"],le=["id"],oe=["stop-color"],ae=["stop-color"],ie=["id"],re=["stop-color"],se=["stop-color"],ue=["x","y","width","height","fill","rx"],ne=["x","y","width","height","fill","rx"],de=["x","y","width","height","fill","rx"],ve=["x","y","width","height","fill","rx"],ce={key:0},ye=["x","y","fill","font-size","font-weight"],he=["x","y","fill","font-size","font-weight"],fe={key:1},ge=["x","y","font-size","fill","font-weight"],pe={key:2},be={key:0},me=["x1","x2","y1","y2","stroke","stroke-width"],xe=["x1","x2","y1","y2","stroke","stroke-width"],ke=["x1","x2","y1","y2","stroke","stroke-width"],we=["x","y","font-size","fill","font-weight"],Ce=["x1","x2","y1","y2","stroke","stroke-width"],_e=["x","y","font-size","fill","font-weight"],Se=["x","y","font-size","fill","font-weight"],Te=["x","y","width","height","fill","onMouseover"],$e={key:3,class:"vue-data-ui-watermark"},Le={__name:"vue-ui-age-pyramid",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(S,{expose:R}){const d=S,{vue_ui_age_pyramid:D}=u.useConfig(),m=e.computed(()=>!!d.dataset&&d.dataset.length),v=e.ref(u.createUid()),q=e.ref(null),w=e.ref(!1),C=e.ref(""),x=e.ref(null),T=e.ref(0),g=e.ref(null),$=e.ref(null),t=e.computed(()=>{const l=O.useNestedProp({userConfig:d.config,defaultConfig:D});return l.theme?{...O.useNestedProp({userConfig:u.themes.vue_ui_age_pyramid[l.theme]||d.config,defaultConfig:l})}:l}),L=e.ref(null);e.onMounted(()=>{if(u.objectIsEmpty(d.dataset)&&u.error({componentName:"VueUiAgePyramid",type:"dataset"}),t.value.responsive){const l=I.throttle(()=>{const{width:r,height:o}=I.useResponsive({chart:g.value,title:t.value.style.title.text?$.value:null});n.value.width=r,n.value.height=o});L.value=new ResizeObserver(l),L.value.observe(g.value.parentNode)}});const{isPrinting:N,isImaging:B,generatePdf:E,generateImage:z}=M.usePrinter({elementId:`vue-ui-age-pyramid_${v.value}`,fileName:t.value.style.title.text||"vue-ui-age-pyramid"}),c=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),n=e.ref({height:t.value.style.height,width:t.value.style.width}),i=e.computed(()=>{const l=n.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left,r=t.value.style.layout.padding.left,o=n.value.width-t.value.style.layout.padding.right;return{top:t.value.style.layout.padding.top,left:r,right:o,bottom:n.value.height-t.value.style.layout.padding.bottom,width:l,height:n.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:r+l/2-t.value.style.layout.centerSlit.width},rightChart:{width:l/2-t.value.style.layout.centerSlit.width,left:r+l/2+t.value.style.layout.centerSlit.width}}}),G=e.computed(()=>d.dataset.map(l=>t.value.style.layout.dataLabels.yAxis.display==="age"?l[1]:l[0])),y=e.computed(()=>{const l=U(p.value/5),r=[],o=[];for(let a=0;a<=5;a+=1){const s=l*a,F=l*(a-5);r.push({value:s,x:i.value.left+i.value.width/2+t.value.style.layout.centerSlit.width+s/p.value*i.value.leftChart.width}),o.push({value:Math.abs(F),x:i.value.left+i.value.width/2+F/p.value*i.value.leftChart.width-t.value.style.layout.centerSlit.width})}return{right:r,left:o}});function U(l){if(l===0)return 0;const o=10**Math.floor(Math.log10(Math.abs(l)));let a;return l<0,a=Math.round(l/o)*o,a}const p=e.computed(()=>Math.max(...d.dataset.flatMap(l=>l.slice(-2)))),h=e.computed(()=>d.dataset.length),W=e.computed(()=>d.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(()=>W.value.map((l,r)=>{const o=i.value.top+i.value.height/h.value*r,a=i.value.height/h.value-t.value.style.layout.bars.gap;return{segment:l.segment,age:l.age,left:{...l.left,y:o,color:t.value.style.layout.bars.left.color,x:i.value.leftChart.right-l.left.proportionToMax*i.value.leftChart.width,width:l.left.proportionToMax*i.value.leftChart.width,height:a},right:{...l.right,y:o,color:t.value.style.layout.bars.right.color,x:i.value.rightChart.left,width:l.right.proportionToMax*i.value.rightChart.width,height:a}}})),_=e.ref(null);function H(l,r){x.value=l,_.value={datapoint:r,seriesIndex:l,series:f.value,config:t.value};const o=t.value.style.tooltip.customFormat;if(u.isFunction(o)&&u.functionReturnsString(()=>o({seriesIndex:l,datapoint:{segment:r[0],index:r[1],left:r[2],right:r[3]},series:f.value,config:t.value})))C.value=o({seriesIndex:l,datapoint:{segment:r[0],index:r[1],left:r[2],right:r[3]},series:f.value,config:t.value});else{let a="";const s=f.value[l];a+=`<div><b>${s.segment}</b></div>`,a+=`<div>${t.value.translations.age}: ${s.age}</div>`,a+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,a+='<div style="display:flex; flex-direction:row;gap:12px">',a+=`<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_${v.value})`:t.value.style.layout.bars.left.color}"/></svg><div>${t.value.translations.female}</div><div><b>${s.left.value.toLocaleString()}</b></div></div>`,a+=`<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_${v.value})`:t.value.style.layout.bars.right.color}"/></svg><div>${t.value.translations.male}</div><div><b>${s.right.value.toLocaleString()}</b></div></div>`,a+="</div>",a+=`<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.left.value+s.right.value).toLocaleString()}</b></div></div>`,a+="</div>",C.value=`<div>${a}</div>`}w.value=!0}function V(){e.nextTick(()=>{const l=[t.value.translations.year,t.value.translations.age,t.value.translations.female,t.value.translations.male,t.value.translations.total],r=d.dataset.map(s=>[s[0],s[1],s[2],s[3],s[2]+s[3]]),o=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(r),a=u.createCsvContent(o);u.downloadCsv({csvContent:a,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],r=d.dataset.map(a=>[a[0],a[1],a[2].toLocaleString(),a[3].toLocaleString(),(a[2]+a[3]).toLocaleString()]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:l,body:r,config:o,colNames:l}}),b=e.ref(!1);function X(l){b.value=l,T.value+=1}function A(){c.value.showTable=!c.value.showTable}function P(){c.value.showTooltip=!c.value.showTooltip}return R({generatePdf:E,generateCsv:V,generateImage:z,toggleTable:A,toggleTooltip:P}),(l,r)=>(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_${v.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:$,style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor}`)},[e.createVNode(j._sfc_main,{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&&m.value?(e.openBlock(),e.createBlock(M.UserOptions,{ref_key:"details",ref:q,key:`user_options_${T.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(B),isPrinting:e.unref(N),uid:v.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:c.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,onToggleFullscreen:X,onGeneratePdf:e.unref(E),onGenerateCsv:V,onGenerateImage:e.unref(z),onToggleTable:A,onToggleTooltip:P},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:a})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:a})),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),m.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),viewBox:`0 0 ${n.value.width<=0?10:n.value.width} ${n.value.height<=0?10:n.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_${v.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,oe),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.bars.left.color,t.value.style.layout.bars.gradient.shiftHue)}${e.unref(u.opacity)[100-t.value.style.layout.bars.gradient.intensity]}`},null,8,ae)],8,le),e.createElementVNode("linearGradient",{id:`age_pyramid_right_${v.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.bars.right.color,t.value.style.layout.bars.gradient.shiftHue)}${e.unref(u.opacity)[100-t.value.style.layout.bars.gradient.intensity]}`},null,8,re),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.bars.right.color},null,8,se)],8,ie)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.left.x,y:o.left.y,width:o.left.width<=0?1e-4:o.left.width,height:o.left.height<=0?1e-4:o.left.height,fill:t.value.style.layout.bars.gradient.underlayer,rx:t.value.style.layout.bars.borderRadius},null,8,ue),e.createElementVNode("rect",{x:o.left.x,y:o.left.y,width:o.left.width<=0?1e-4:o.left.width,height:o.left.height<=0?1e-4:o.left.height,fill:t.value.style.layout.bars.gradient.show?`url(#age_pyramid_left_${v.value})`:o.left.color,rx:t.value.style.layout.bars.borderRadius},null,8,ne),e.createElementVNode("rect",{x:o.right.x,y:o.right.y,width:o.right.width<=0?1e-4:o.right.width,height:o.right.height<=0?1e-4:o.right.height,fill:t.value.style.layout.bars.gradient.underlayer,rx:t.value.style.layout.bars.borderRadius},null,8,de),e.createElementVNode("rect",{x:o.right.x,y:o.right.y,width:o.right.width<=0?1e-4:o.right.width,height:o.right.height<=0?1e-4:o.right.height,fill:t.value.style.layout.bars.gradient.show?`url(#age_pyramid_right_${v.value})`:o.right.color,rx:t.value.style.layout.bars.borderRadius},null,8,ve)]))),256)),e.createElementVNode("g",null,[t.value.style.layout.dataLabels.sideTitles.show?(e.openBlock(),e.createElementBlock("g",ce,[e.createElementVNode("text",{x:i.value.left,y:i.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,ye),e.createElementVNode("text",{x:i.value.right,y:i.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,he)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G.value,(o,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a%t.value.style.layout.dataLabels.yAxis.showEvery===0?(e.openBlock(),e.createElementBlock("text",{key:0,x:i.value.centerX,y:i.value.top+i.value.height/h.value*a+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(o),9,ge)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",pe,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",be,[e.createElementVNode("line",{x1:y.value.right[0].x,x2:y.value.right.at(-1).x,y1:i.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:i.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,me),e.createElementVNode("line",{x1:y.value.left[0].x,x2:y.value.left.at(-1).x,y1:i.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:i.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,xe)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value.right,o=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x,y1:i.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:i.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,ke)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:o.x,y:i.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(Number((o.value/t.value.style.layout.dataLabels.xAxis.scale).toFixed(0)).toLocaleString()),9,we)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value.left,o=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x,y1:i.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:i.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,Ce)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:o.x,y:i.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(Number((o.value/t.value.style.layout.dataLabels.xAxis.scale).toFixed(0)).toLocaleString()),9,_e)]))),256)),e.createElementVNode("text",{x:i.value.right,y:n.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,Se)])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.dataset,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:i.value.left,y:i.value.top+i.value.height/h.value*a-t.value.style.layout.bars.gap/2,width:i.value.width<=0?1e-4:i.value.width,height:i.value.height/h.value<=0?1e-4:i.value.height/h.value,fill:x.value!==null&&x.value===a?`${t.value.style.highlighter.color}${e.unref(u.opacity)[t.value.style.highlighter.opacity]}`:"transparent",onMouseover:s=>H(a,o),onMouseleave:r[0]||(r[0]=s=>{x.value=null,w.value=!1})},null,40,Te)]))),256)),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],14,te)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",$e,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(N)||e.unref(B)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(K.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(Y._sfc_main,{show:c.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"]),m.value?(e.openBlock(),e.createBlock(Q.default,{key:5,hideDetails:"",config:{open:c.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.createVNode(J.DataTable,{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:r[1]||(r[1]=o=>c.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ee))}},Ne=Z._export_sfc(Le,[["__scopeId","data-v-c27f85b0"]]);exports.default=Ne;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-D2z8eN-t.cjs"),I=require("./useResponsive-B3TrDDIG.cjs"),j=require("./Title-R6PrAyfG.cjs"),M=require("./usePrinter-c6hW2FYl.cjs"),Y=require("./Tooltip-DAjRpG7b.cjs"),J=require("./DataTable-BM_PreHp.cjs"),K=require("./vue-ui-skeleton-DwEcR_uq.cjs"),Q=require("./vue-ui-accordion-jSupvtFc.cjs"),O=require("./useNestedProp-CUrnndD5.cjs"),Z=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ee=["id"],te=["xmlns","viewBox"],le=["id"],oe=["stop-color"],ae=["stop-color"],ie=["id"],re=["stop-color"],se=["stop-color"],ue=["x","y","width","height","fill","rx"],ne=["x","y","width","height","fill","rx"],de=["x","y","width","height","fill","rx"],ve=["x","y","width","height","fill","rx"],ce={key:0},ye=["x","y","fill","font-size","font-weight"],he=["x","y","fill","font-size","font-weight"],fe={key:1},ge=["x","y","font-size","fill","font-weight"],pe={key:2},be={key:0},me=["x1","x2","y1","y2","stroke","stroke-width"],xe=["x1","x2","y1","y2","stroke","stroke-width"],ke=["x1","x2","y1","y2","stroke","stroke-width"],we=["x","y","font-size","fill","font-weight"],Ce=["x1","x2","y1","y2","stroke","stroke-width"],_e=["x","y","font-size","fill","font-weight"],Se=["x","y","font-size","fill","font-weight"],Te=["x","y","width","height","fill","onMouseover"],$e={key:3,class:"vue-data-ui-watermark"},Le={__name:"vue-ui-age-pyramid",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(S,{expose:R}){const d=S,{vue_ui_age_pyramid:D}=u.useConfig(),m=e.computed(()=>!!d.dataset&&d.dataset.length),v=e.ref(u.createUid()),q=e.ref(null),w=e.ref(!1),C=e.ref(""),x=e.ref(null),T=e.ref(0),g=e.ref(null),$=e.ref(null),t=e.computed(()=>{const l=O.useNestedProp({userConfig:d.config,defaultConfig:D});return l.theme?{...O.useNestedProp({userConfig:u.themes.vue_ui_age_pyramid[l.theme]||d.config,defaultConfig:l})}:l}),L=e.ref(null);e.onMounted(()=>{if(u.objectIsEmpty(d.dataset)&&u.error({componentName:"VueUiAgePyramid",type:"dataset"}),t.value.responsive){const l=I.throttle(()=>{const{width:r,height:o}=I.useResponsive({chart:g.value,title:t.value.style.title.text?$.value:null});n.value.width=r,n.value.height=o});L.value=new ResizeObserver(l),L.value.observe(g.value.parentNode)}});const{isPrinting:N,isImaging:B,generatePdf:E,generateImage:z}=M.usePrinter({elementId:`vue-ui-age-pyramid_${v.value}`,fileName:t.value.style.title.text||"vue-ui-age-pyramid"}),c=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),n=e.ref({height:t.value.style.height,width:t.value.style.width}),i=e.computed(()=>{const l=n.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left,r=t.value.style.layout.padding.left,o=n.value.width-t.value.style.layout.padding.right;return{top:t.value.style.layout.padding.top,left:r,right:o,bottom:n.value.height-t.value.style.layout.padding.bottom,width:l,height:n.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:r+l/2-t.value.style.layout.centerSlit.width},rightChart:{width:l/2-t.value.style.layout.centerSlit.width,left:r+l/2+t.value.style.layout.centerSlit.width}}}),G=e.computed(()=>d.dataset.map(l=>t.value.style.layout.dataLabels.yAxis.display==="age"?l[1]:l[0])),y=e.computed(()=>{const l=U(p.value/5),r=[],o=[];for(let a=0;a<=5;a+=1){const s=l*a,F=l*(a-5);r.push({value:s,x:i.value.left+i.value.width/2+t.value.style.layout.centerSlit.width+s/p.value*i.value.leftChart.width}),o.push({value:Math.abs(F),x:i.value.left+i.value.width/2+F/p.value*i.value.leftChart.width-t.value.style.layout.centerSlit.width})}return{right:r,left:o}});function U(l){if(l===0)return 0;const o=10**Math.floor(Math.log10(Math.abs(l)));let a;return l<0,a=Math.round(l/o)*o,a}const p=e.computed(()=>Math.max(...d.dataset.flatMap(l=>l.slice(-2)))),h=e.computed(()=>d.dataset.length),W=e.computed(()=>d.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(()=>W.value.map((l,r)=>{const o=i.value.top+i.value.height/h.value*r,a=i.value.height/h.value-t.value.style.layout.bars.gap;return{segment:l.segment,age:l.age,left:{...l.left,y:o,color:t.value.style.layout.bars.left.color,x:i.value.leftChart.right-l.left.proportionToMax*i.value.leftChart.width,width:l.left.proportionToMax*i.value.leftChart.width,height:a},right:{...l.right,y:o,color:t.value.style.layout.bars.right.color,x:i.value.rightChart.left,width:l.right.proportionToMax*i.value.rightChart.width,height:a}}})),_=e.ref(null);function H(l,r){x.value=l,_.value={datapoint:r,seriesIndex:l,series:f.value,config:t.value};const o=t.value.style.tooltip.customFormat;if(u.isFunction(o)&&u.functionReturnsString(()=>o({seriesIndex:l,datapoint:{segment:r[0],index:r[1],left:r[2],right:r[3]},series:f.value,config:t.value})))C.value=o({seriesIndex:l,datapoint:{segment:r[0],index:r[1],left:r[2],right:r[3]},series:f.value,config:t.value});else{let a="";const s=f.value[l];a+=`<div><b>${s.segment}</b></div>`,a+=`<div>${t.value.translations.age}: ${s.age}</div>`,a+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,a+='<div style="display:flex; flex-direction:row;gap:12px">',a+=`<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_${v.value})`:t.value.style.layout.bars.left.color}"/></svg><div>${t.value.translations.female}</div><div><b>${s.left.value.toLocaleString()}</b></div></div>`,a+=`<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_${v.value})`:t.value.style.layout.bars.right.color}"/></svg><div>${t.value.translations.male}</div><div><b>${s.right.value.toLocaleString()}</b></div></div>`,a+="</div>",a+=`<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.left.value+s.right.value).toLocaleString()}</b></div></div>`,a+="</div>",C.value=`<div>${a}</div>`}w.value=!0}function V(){e.nextTick(()=>{const l=[t.value.translations.year,t.value.translations.age,t.value.translations.female,t.value.translations.male,t.value.translations.total],r=d.dataset.map(s=>[s[0],s[1],s[2],s[3],s[2]+s[3]]),o=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(r),a=u.createCsvContent(o);u.downloadCsv({csvContent:a,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],r=d.dataset.map(a=>[a[0],a[1],a[2].toLocaleString(),a[3].toLocaleString(),(a[2]+a[3]).toLocaleString()]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:l,body:r,config:o,colNames:l}}),b=e.ref(!1);function X(l){b.value=l,T.value+=1}function A(){c.value.showTable=!c.value.showTable}function P(){c.value.showTooltip=!c.value.showTooltip}return R({generatePdf:E,generateCsv:V,generateImage:z,toggleTable:A,toggleTooltip:P}),(l,r)=>(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_${v.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:$,style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor}`)},[e.createVNode(j._sfc_main,{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&&m.value?(e.openBlock(),e.createBlock(M.UserOptions,{ref_key:"details",ref:q,key:`user_options_${T.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(B),isPrinting:e.unref(N),uid:v.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:c.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,onToggleFullscreen:X,onGeneratePdf:e.unref(E),onGenerateCsv:V,onGenerateImage:e.unref(z),onToggleTable:A,onToggleTooltip:P},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:a})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:a})),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),m.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),viewBox:`0 0 ${n.value.width<=0?10:n.value.width} ${n.value.height<=0?10:n.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_${v.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,oe),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.bars.left.color,t.value.style.layout.bars.gradient.shiftHue)}${e.unref(u.opacity)[100-t.value.style.layout.bars.gradient.intensity]}`},null,8,ae)],8,le),e.createElementVNode("linearGradient",{id:`age_pyramid_right_${v.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.bars.right.color,t.value.style.layout.bars.gradient.shiftHue)}${e.unref(u.opacity)[100-t.value.style.layout.bars.gradient.intensity]}`},null,8,re),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.bars.right.color},null,8,se)],8,ie)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.left.x,y:o.left.y,width:o.left.width<=0?1e-4:o.left.width,height:o.left.height<=0?1e-4:o.left.height,fill:t.value.style.layout.bars.gradient.underlayer,rx:t.value.style.layout.bars.borderRadius},null,8,ue),e.createElementVNode("rect",{x:o.left.x,y:o.left.y,width:o.left.width<=0?1e-4:o.left.width,height:o.left.height<=0?1e-4:o.left.height,fill:t.value.style.layout.bars.gradient.show?`url(#age_pyramid_left_${v.value})`:o.left.color,rx:t.value.style.layout.bars.borderRadius},null,8,ne),e.createElementVNode("rect",{x:o.right.x,y:o.right.y,width:o.right.width<=0?1e-4:o.right.width,height:o.right.height<=0?1e-4:o.right.height,fill:t.value.style.layout.bars.gradient.underlayer,rx:t.value.style.layout.bars.borderRadius},null,8,de),e.createElementVNode("rect",{x:o.right.x,y:o.right.y,width:o.right.width<=0?1e-4:o.right.width,height:o.right.height<=0?1e-4:o.right.height,fill:t.value.style.layout.bars.gradient.show?`url(#age_pyramid_right_${v.value})`:o.right.color,rx:t.value.style.layout.bars.borderRadius},null,8,ve)]))),256)),e.createElementVNode("g",null,[t.value.style.layout.dataLabels.sideTitles.show?(e.openBlock(),e.createElementBlock("g",ce,[e.createElementVNode("text",{x:i.value.left,y:i.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,ye),e.createElementVNode("text",{x:i.value.right,y:i.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,he)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G.value,(o,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a%t.value.style.layout.dataLabels.yAxis.showEvery===0?(e.openBlock(),e.createElementBlock("text",{key:0,x:i.value.centerX,y:i.value.top+i.value.height/h.value*a+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(o),9,ge)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",pe,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",be,[e.createElementVNode("line",{x1:y.value.right[0].x,x2:y.value.right.at(-1).x,y1:i.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:i.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,me),e.createElementVNode("line",{x1:y.value.left[0].x,x2:y.value.left.at(-1).x,y1:i.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:i.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,xe)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value.right,o=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x,y1:i.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:i.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,ke)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:o.x,y:i.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(Number((o.value/t.value.style.layout.dataLabels.xAxis.scale).toFixed(0)).toLocaleString()),9,we)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value.left,o=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x,y1:i.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:i.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,Ce)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:o.x,y:i.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(Number((o.value/t.value.style.layout.dataLabels.xAxis.scale).toFixed(0)).toLocaleString()),9,_e)]))),256)),e.createElementVNode("text",{x:i.value.right,y:n.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,Se)])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.dataset,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:i.value.left,y:i.value.top+i.value.height/h.value*a-t.value.style.layout.bars.gap/2,width:i.value.width<=0?1e-4:i.value.width,height:i.value.height/h.value<=0?1e-4:i.value.height/h.value,fill:x.value!==null&&x.value===a?`${t.value.style.highlighter.color}${e.unref(u.opacity)[t.value.style.highlighter.opacity]}`:"transparent",onMouseover:s=>H(a,o),onMouseleave:r[0]||(r[0]=s=>{x.value=null,w.value=!1})},null,40,Te)]))),256)),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],14,te)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",$e,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(N)||e.unref(B)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(K.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(Y._sfc_main,{show:c.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"]),m.value?(e.openBlock(),e.createBlock(Q.default,{key:5,hideDetails:"",config:{open:c.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.createVNode(J.DataTable,{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:r[1]||(r[1]=o=>c.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ee))}},Ne=Z._export_sfc(Le,[["__scopeId","data-v-c27f85b0"]]);exports.default=Ne;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { computed as p, ref as d, onMounted as ve, openBlock as i, createElementBlock as u, normalizeClass as Z, normalizeStyle as R, createVNode as D, createCommentVNode as v, createBlock as G, unref as h, createSlots as ye, withCtx as f, renderSlot as g, normalizeProps as I, guardReactiveProps as M, createElementVNode as r, Fragment as $, renderList as S, toDisplayString as m, createTextVNode as ee, nextTick as he } from "vue";
|
|
2
|
-
import { u as ce, c as fe, t as ge, o as pe, e as be, X as xe, s as te, r as B, v as me, w as we, n as ke, q as _e } from "./index-
|
|
2
|
+
import { u as ce, c as fe, t as ge, o as pe, e as be, X as xe, s as te, r as B, v as me, w as we, n as ke, q as _e } from "./index-Ck92ROEN.js";
|
|
3
3
|
import { t as $e, u as Ce } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as Te } from "./Title-
|
|
5
|
-
import { u as Le, U as Se } from "./usePrinter-
|
|
6
|
-
import { _ as ze } from "./Tooltip-
|
|
7
|
-
import { D as Ae } from "./DataTable-
|
|
8
|
-
import Fe from "./vue-ui-skeleton-
|
|
9
|
-
import Ie from "./vue-ui-accordion-
|
|
10
|
-
import { u as le } from "./useNestedProp-
|
|
4
|
+
import { _ as Te } from "./Title-BFBOWO3Q.js";
|
|
5
|
+
import { u as Le, U as Se } from "./usePrinter-DBPRZcAN.js";
|
|
6
|
+
import { _ as ze } from "./Tooltip-DravvC2X.js";
|
|
7
|
+
import { D as Ae } from "./DataTable-DFEpvyNK.js";
|
|
8
|
+
import Fe from "./vue-ui-skeleton-B_c8tnen.js";
|
|
9
|
+
import Ie from "./vue-ui-accordion-CYyb5N_o.js";
|
|
10
|
+
import { u as le } from "./useNestedProp-C0fDv_7c.js";
|
|
11
11
|
import { _ as Me } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
const Oe = ["id"], Pe = ["xmlns", "viewBox"], Ne = ["id"], Re = ["stop-color"], De = ["stop-color"], Ge = ["id"], Be = ["stop-color"], Ee = ["stop-color"], We = ["x", "y", "width", "height", "fill", "rx"], Xe = ["x", "y", "width", "height", "fill", "rx"], Ue = ["x", "y", "width", "height", "fill", "rx"], Ve = ["x", "y", "width", "height", "fill", "rx"], Ye = { key: 0 }, je = ["x", "y", "fill", "font-size", "font-weight"], He = ["x", "y", "fill", "font-size", "font-weight"], qe = { key: 1 }, Je = ["x", "y", "font-size", "fill", "font-weight"], Ke = { key: 2 }, Qe = { key: 0 }, Ze = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], et = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], tt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], lt = ["x", "y", "font-size", "fill", "font-weight"], at = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ot = ["x", "y", "font-size", "fill", "font-weight"], st = ["x", "y", "font-size", "fill", "font-weight"], it = ["x", "y", "width", "height", "fill", "onMouseover"], ut = {
|
|
13
13
|
key: 3,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("./html2canvas.esm-BA_v9SIU.cjs"),b=require("./jspdf.es.min-DLYY9DTT.cjs"),u=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("./html2canvas.esm-BA_v9SIU.cjs"),b=require("./jspdf.es.min-DLYY9DTT.cjs"),u=require("./index-D2z8eN-t.cjs"),o=require("vue"),F=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),C={props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{shapes:[],lastSelectedShape:void 0}}}},data(){return{activeShape:void 0,strokeSize:1,currentPointer:{start:{x:0,y:0},end:{x:0,end:0}},currentTarget:void 0,hoveredShapeId:void 0,isBold:!1,isBulletTextMode:!1,isDash:!1,isDeleteMode:!1,isDrawing:!1,isDrawingNewShape:!0,isDrawMode:!1,isItalic:!1,isMouseDown:!1,isMoveMode:!1,isPrinting:!1,isResizeMode:!1,isSelectMode:!1,isSummaryOpen:!1,isTextMode:!1,isUnderline:!1,isWriting:!1,lastSelectedShape:this.dataset.lastSelectedShape,pointerDownId:-1,pointerPosition:{x:0,y:0},preventEdit:!0,selectedGroup:[],shapes:this.dataset.shapes?this.dataset.shapes:[],shapesOrder:[],step:Math.round(Math.random())*1e5,svgHeight:1e3,svgWidth:1e3,options:{arrow:{color:"grey",filled:!0},circle:{color:"grey",filled:!1,radius:3,strokeWidth:2},rect:{color:"grey",filled:!1,strokeWidth:2,height:12,width:12}},selectedColor:"#000000",showCaret:!1,sizeRatio:1,slottedSvg:void 0,sourceWidth:1,sourceHeight:1,textAlign:"start",textFont:20,transparency:100,transparencyCodes:u.opacity}},watch:{shapes:{handler(e){e.length===0&&(this.lastSelectedShape=void 0)}}},computed:{FINAL_CONFIG(){const e=u.useConfig().vue_ui_annotator;if(!Object.keys(this.config||{}).length)return e;const l=this.treeShake({defaultConfig:e,userConfig:this.config});return this.convertConfigColors(l)},canSelect(){return this.shapes.filter(e=>!["line","group"].includes(e.type)).length>1},colorTransparency(){return this.transparencyCodes[this.transparency>98?98:this.transparency]},cursorClass(){switch(!0){case this.isDeleteMode:return"default";case this.isMoveMode:return"move";case this.isTextMode:return"text";case this.isResizeMode:return"se-resize";default:return""}},records(){return this.shapes},userShapes(){return this.records.map(e=>{switch(!0){case(e&&e.type==="arrow"):const l=e.strokeWidth>3?5:10,s=e.strokeWidth>3?2.5:5;return`
|
|
2
2
|
<defs>
|
|
3
3
|
<marker
|
|
4
4
|
id="${e.id}"
|