vue-data-ui 2.4.3 → 2.4.4
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/README.md +3 -1
- package/dist/{Arrow-C7lNL7sY.js → Arrow-AxsI-FAh.js} +1 -1
- package/dist/{Arrow-Dz6AomGr.cjs → Arrow-W6XO2WVI.cjs} +1 -1
- package/dist/{BaseIcon-uALK38Ov.cjs → BaseIcon-BTn_oML7.cjs} +1 -1
- package/dist/{BaseIcon-BbvG1AlW.js → BaseIcon-BX3x6oa7.js} +1 -1
- package/dist/{DataTable-DYqC2pqu.js → DataTable-BI1tjiA_.js} +2 -2
- package/dist/{DataTable-DTzynbND.cjs → DataTable-RUQ1G_6L.cjs} +1 -1
- package/dist/{Legend-Cgw4lO2O.cjs → Legend-B86sMXn7.cjs} +1 -1
- package/dist/{Legend-DNgTCgEK.js → Legend-CRMHjbGw.js} +1 -1
- package/dist/{PackageVersion-VkaUzgmt.js → PackageVersion-Clrfvyd8.js} +1 -1
- package/dist/{PackageVersion-DwI-KhXH.cjs → PackageVersion-CowXQ4IM.cjs} +1 -1
- package/dist/{PenAndPaper-DAZYA8Ew.js → PenAndPaper-BQzgk5kO.js} +2 -2
- package/dist/{PenAndPaper-CDFVOo7X.cjs → PenAndPaper-DBSxk9Xk.cjs} +1 -1
- package/dist/{Shape-Bwon0l0g.js → Shape-DYNtRer6.js} +1 -1
- package/dist/{Shape-D2Dpshg1.cjs → Shape-qK3MNdTg.cjs} +1 -1
- package/dist/{Slicer-TfpN2Cr4.js → Slicer-DFPDip5U.js} +3 -3
- package/dist/{Slicer-uSjfNJjG.cjs → Slicer-NlxLkUso.cjs} +1 -1
- package/dist/{Title-C5pIfQAz.js → Title-710895ks.js} +1 -1
- package/dist/{Title-0Tp4hZ4u.cjs → Title-CUN1T6KC.cjs} +1 -1
- package/dist/{Tooltip-9Tp2Yrd1.cjs → Tooltip-BapDtYOM.cjs} +1 -1
- package/dist/{Tooltip-Cz24YLfw.js → Tooltip-CPlG_yQU.js} +1 -1
- package/dist/{index-eFox7weK.cjs → index-CcykRspI.cjs} +1 -1
- package/dist/{index-Bya_q1J-.js → index-DCsPHn9C.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-B33hazbH.js → useNestedProp-DdSlLeTW.js} +1 -1
- package/dist/{useNestedProp-BkgEhTQY.cjs → useNestedProp-XtPlFP9O.cjs} +1 -1
- package/dist/{usePrinter-CSRFnDBU.cjs → usePrinter-BcE45wW6.cjs} +1 -1
- package/dist/{usePrinter-CiHd1FwD.js → usePrinter-siG3sKWo.js} +1 -1
- package/dist/useResponsive-BJ7DTGpm.cjs +1 -0
- package/dist/{useResponsive-BY8tgM1n.js → useResponsive-CoxXLe23.js} +8 -7
- package/dist/{vue-data-ui-BTtxyUc3.cjs → vue-data-ui-C0o1kZzC.cjs} +1 -1
- package/dist/{vue-data-ui-Bduq4f2p.js → vue-data-ui-D_MTGc8j.js} +58 -58
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-BUEq_VdY.js → vue-ui-3d-bar-BdzWvy4d.js} +9 -9
- package/dist/{vue-ui-3d-bar-B-P7PMHs.cjs → vue-ui-3d-bar-C298Bf3V.cjs} +1 -1
- package/dist/{vue-ui-accordion-TEMpM1hO.cjs → vue-ui-accordion-B7PTyFVk.cjs} +1 -1
- package/dist/{vue-ui-accordion-DfUfL2dI.js → vue-ui-accordion-D4Er5Dy5.js} +3 -3
- package/dist/vue-ui-age-pyramid-BIcB5vtU.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-CH72tAMb.js → vue-ui-age-pyramid-CHEdFQb7.js} +145 -137
- package/dist/{vue-ui-annotator-DPeJ2its.js → vue-ui-annotator-CqM_1HlB.js} +1 -1
- package/dist/{vue-ui-annotator-DU_DJKCw.cjs → vue-ui-annotator-eGtZcHeb.cjs} +1 -1
- package/dist/{vue-ui-bullet-CtP3MlUT.js → vue-ui-bullet-DBk50kIe.js} +75 -69
- package/dist/vue-ui-bullet-DURgZGgp.cjs +34 -0
- package/dist/{vue-ui-candlestick-DDil13a0.js → vue-ui-candlestick-Bo41qkGe.js} +240 -232
- package/dist/vue-ui-candlestick-CP4Z-29b.cjs +2 -0
- package/dist/{vue-ui-carousel-table-BaeIxyc0.js → vue-ui-carousel-table-CkNOqa9q.js} +4 -4
- package/dist/{vue-ui-carousel-table-C7SJIOG-.cjs → vue-ui-carousel-table-lMqx64wd.cjs} +1 -1
- package/dist/{vue-ui-chestnut-BczSJF6S.js → vue-ui-chestnut-CNWq-epB.js} +262 -256
- package/dist/vue-ui-chestnut-qxzF2ND7.cjs +6 -0
- package/dist/{vue-ui-cursor-Dg_Dmww-.js → vue-ui-cursor-B4m30Gqz.js} +2 -2
- package/dist/{vue-ui-cursor-C2Pj_CI_.cjs → vue-ui-cursor-BEv39HVY.cjs} +1 -1
- package/dist/{vue-ui-dashboard-Bul9dqx1.js → vue-ui-dashboard-BL9IgDDx.js} +2 -2
- package/dist/{vue-ui-dashboard-Cg020NiT.cjs → vue-ui-dashboard-DnoXstlp.cjs} +1 -1
- package/dist/{vue-ui-digits-B8iAa4YZ.js → vue-ui-digits-CVPDJ6tl.js} +2 -2
- package/dist/{vue-ui-digits-Ctgd84JR.cjs → vue-ui-digits-D1RaU4V-.cjs} +1 -1
- package/dist/{vue-ui-donut-DUcp-fat.js → vue-ui-donut-C65SAJKb.js} +338 -330
- package/dist/vue-ui-donut-CMC92CXL.cjs +1 -0
- package/dist/vue-ui-donut-evolution-7gIM4bVk.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-C_YMbTwq.js → vue-ui-donut-evolution-BFbBlmBx.js} +163 -156
- package/dist/{vue-ui-dumbbell-Buwngz_V.js → vue-ui-dumbbell-BnxRfvv0.js} +208 -200
- package/dist/vue-ui-dumbbell-OCo67ZKp.cjs +9 -0
- package/dist/vue-ui-flow-BPnpYrzb.cjs +1 -0
- package/dist/{vue-ui-flow-Bz3c0K5P.js → vue-ui-flow-Cra_F-tK.js} +130 -124
- package/dist/vue-ui-galaxy-3zTk9Pr1.cjs +1 -0
- package/dist/{vue-ui-galaxy-Cjh0XGTX.js → vue-ui-galaxy-DlJ7v0aD.js} +125 -119
- package/dist/{vue-ui-gauge-B1UvGkQa.js → vue-ui-gauge-CsqVvNxE.js} +167 -159
- package/dist/vue-ui-gauge-DcUNJZI1.cjs +1 -0
- package/dist/{vue-ui-gizmo-DFW6HnHp.cjs → vue-ui-gizmo-BkkLoCyx.cjs} +1 -1
- package/dist/{vue-ui-gizmo-DUQ4t-At.js → vue-ui-gizmo-Peyy8li7.js} +3 -3
- package/dist/vue-ui-heatmap-DYb831An.cjs +1 -0
- package/dist/{vue-ui-heatmap-C-poazUw.js → vue-ui-heatmap-i4HFM04D.js} +156 -149
- package/dist/{vue-ui-kpi-Z4Oi4raz.cjs → vue-ui-kpi-CCrdcv3r.cjs} +1 -1
- package/dist/{vue-ui-kpi-DXe-vxAk.js → vue-ui-kpi-gSKVVqZg.js} +3 -3
- package/dist/{vue-ui-mini-loader-MMvpm9pz.cjs → vue-ui-mini-loader-CqutMcQI.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BVtHTqxS.js → vue-ui-mini-loader-D7Jk1LJb.js} +2 -2
- package/dist/{vue-ui-molecule-BaJpDZND.js → vue-ui-molecule-CgdepnhM.js} +109 -103
- package/dist/vue-ui-molecule-CwUObXAx.cjs +1 -0
- package/dist/{vue-ui-mood-radar-BUNDwsEI.js → vue-ui-mood-radar-Bxro4962.js} +173 -166
- package/dist/vue-ui-mood-radar-RQFKS7Br.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-mDy2hXa6.js → vue-ui-nested-donuts-B7dXBejH.js} +311 -303
- package/dist/vue-ui-nested-donuts-D8ZGqIGC.cjs +17 -0
- package/dist/vue-ui-onion-Dtt0kw8E.cjs +5 -0
- package/dist/{vue-ui-onion-DwFG3HAI.js → vue-ui-onion-i52wztm0.js} +149 -141
- package/dist/vue-ui-parallel-coordinate-plot-DNK0BrBy.cjs +8 -0
- package/dist/{vue-ui-parallel-coordinate-plot-ImET_zeo.js → vue-ui-parallel-coordinate-plot-DUssrm08.js} +186 -178
- package/dist/{vue-ui-quadrant-BeveRihK.js → vue-ui-quadrant-BORPtgQO.js} +225 -217
- package/dist/vue-ui-quadrant-a_I5E71f.cjs +1 -0
- package/dist/vue-ui-quick-chart-BpPDfK78.cjs +15 -0
- package/dist/{vue-ui-quick-chart-DAhllTfa.js → vue-ui-quick-chart-yb1FzVdt.js} +386 -378
- package/dist/{vue-ui-radar-BllatzRa.js → vue-ui-radar-CoCbl19A.js} +172 -164
- package/dist/vue-ui-radar-DZMngiqq.cjs +1 -0
- package/dist/{vue-ui-rating-D1ykV4xO.js → vue-ui-rating-D-zwuvLK.js} +2 -2
- package/dist/{vue-ui-rating-BoZo7caL.cjs → vue-ui-rating-nTJ8DDhG.cjs} +1 -1
- package/dist/vue-ui-relation-circle-CW9qozhJ.js +366 -0
- package/dist/vue-ui-relation-circle-Wj_yrVJc.cjs +1 -0
- package/dist/vue-ui-rings-BZaZIGEz.cjs +2 -0
- package/dist/{vue-ui-rings-B-ZcX6y1.js → vue-ui-rings-Bx2GEh6d.js} +196 -188
- package/dist/{vue-ui-scatter-DG43ck1g.js → vue-ui-scatter-BARiPzro.js} +288 -280
- package/dist/vue-ui-scatter-C-i1NZgz.cjs +1 -0
- package/dist/{vue-ui-screenshot-p3ca8cAl.js → vue-ui-screenshot-CuiJqlfo.js} +1 -1
- package/dist/{vue-ui-screenshot-C1JBP_N0.cjs → vue-ui-screenshot-CwOoftGV.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BYssP0K4.js → vue-ui-skeleton-DNuwx6_y.js} +3 -3
- package/dist/{vue-ui-skeleton-BqKzuhkB.cjs → vue-ui-skeleton-DpfJbsNA.cjs} +1 -1
- package/dist/{vue-ui-smiley-D7dDCdpq.js → vue-ui-smiley-BnX27B0k.js} +2 -2
- package/dist/{vue-ui-smiley-BXKVpHl2.cjs → vue-ui-smiley-DGE9NFBY.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-GWFrO_0z.js → vue-ui-spark-trend-CgCLrMox.js} +5 -5
- package/dist/{vue-ui-spark-trend-9V60hM3Z.cjs → vue-ui-spark-trend-aW-de-rX.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-Bgn6AY0q.cjs → vue-ui-sparkbar-BLUXUlTY.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CwqlyAyv.js → vue-ui-sparkbar-BXku33sq.js} +4 -4
- package/dist/{vue-ui-sparkgauge-F2XbiXyA.js → vue-ui-sparkgauge-Doi0iu0L.js} +4 -4
- package/dist/{vue-ui-sparkgauge-Dqntz2Zv.cjs → vue-ui-sparkgauge-RTiKvSMp.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-DRIKK6Ym.js → vue-ui-sparkhistogram-BnMvXlAP.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-DnY4-Sdn.cjs → vue-ui-sparkhistogram-C6AgJH1C.cjs} +1 -1
- package/dist/{vue-ui-sparkline-Cxtzdlhi.js → vue-ui-sparkline-DI7fq_MR.js} +5 -5
- package/dist/{vue-ui-sparkline-CAEs-gtK.cjs → vue-ui-sparkline-DpVCQ6W9.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-D37ms1rx.cjs → vue-ui-sparkstackbar-Bvuq2sLW.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-0A1klq9s.js → vue-ui-sparkstackbar-oNnE5z1C.js} +4 -4
- package/dist/{vue-ui-stackbar-ByOuJSdM.js → vue-ui-stackbar-6g7b3yyu.js} +13 -13
- package/dist/{vue-ui-stackbar-wun4S3C0.cjs → vue-ui-stackbar-aWJDGIKV.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-CMD0MSqY.js → vue-ui-strip-plot-BFM8HIM8.js} +204 -196
- package/dist/vue-ui-strip-plot-GdjjVxMN.cjs +1 -0
- package/dist/{vue-ui-table-B75DJ39t.js → vue-ui-table-Cw4Yz-IE.js} +1 -1
- package/dist/{vue-ui-table-aj0XZ7T5.cjs → vue-ui-table-XOPmDCOB.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-Ce93TyBF.cjs → vue-ui-table-heatmap-Bh48bMuU.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BO2ugWqD.js → vue-ui-table-heatmap-DeRCR8l6.js} +4 -4
- package/dist/{vue-ui-table-sparkline-D6KJjDnU.cjs → vue-ui-table-sparkline-C25qj1w_.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-CbjfAaj2.js → vue-ui-table-sparkline-w3H-od91.js} +5 -5
- package/dist/{vue-ui-thermometer-Pq4PvSIP.js → vue-ui-thermometer-BySEVhT8.js} +171 -165
- package/dist/vue-ui-thermometer-DZrusaGY.cjs +1 -0
- package/dist/{vue-ui-timer-B6IB6yS6.cjs → vue-ui-timer-1p6J6hTn.cjs} +1 -1
- package/dist/{vue-ui-timer-Bk3BvB-B.js → vue-ui-timer-BN-9a2lj.js} +6 -6
- package/dist/vue-ui-tiremarks-CvIJeWKE.cjs +1 -0
- package/dist/{vue-ui-tiremarks-CU9HJIqf.js → vue-ui-tiremarks-EzYdOMyf.js} +119 -112
- package/dist/vue-ui-treemap-CzNOr1iR.cjs +1 -0
- package/dist/{vue-ui-treemap-DY-lRAhC.js → vue-ui-treemap-Da0f6vaF.js} +266 -258
- package/dist/vue-ui-vertical-bar-B9shdfqo.cjs +4 -0
- package/dist/{vue-ui-vertical-bar-CtnIKsM1.js → vue-ui-vertical-bar-D1cBfu5p.js} +245 -237
- package/dist/vue-ui-waffle-Cg-7Fazv.cjs +1 -0
- package/dist/{vue-ui-waffle-reOsx-gJ.js → vue-ui-waffle-DM2LsEP7.js} +224 -216
- package/dist/{vue-ui-wheel-kYxny3vn.js → vue-ui-wheel-B9cmixxi.js} +125 -117
- package/dist/vue-ui-wheel-C-JukdTy.cjs +1 -0
- package/dist/{vue-ui-word-cloud-DwLY4QdB.cjs → vue-ui-word-cloud-BLMWYOPy.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-DbMqrHAf.js → vue-ui-word-cloud-Baz7RXN2.js} +11 -11
- package/dist/vue-ui-xy-BHeSkJQ3.cjs +3 -0
- package/dist/{vue-ui-xy-rbACig0h.js → vue-ui-xy-DVnzVSqE.js} +302 -291
- package/dist/{vue-ui-xy-canvas-B0HTR7OV.js → vue-ui-xy-canvas-A7PKnWBs.js} +12 -12
- package/dist/{vue-ui-xy-canvas-CgJd5FiT.cjs → vue-ui-xy-canvas-DAd-B98z.cjs} +1 -1
- package/package.json +1 -1
- package/dist/useResponsive-CodiGUOE.cjs +0 -1
- package/dist/vue-ui-age-pyramid-DsbZ1qcQ.cjs +0 -1
- package/dist/vue-ui-bullet-D8ks_rKr.cjs +0 -34
- package/dist/vue-ui-candlestick-D1jdr0bv.cjs +0 -2
- package/dist/vue-ui-chestnut-ih5r0Bj9.cjs +0 -6
- package/dist/vue-ui-donut-D7KT9EAp.cjs +0 -1
- package/dist/vue-ui-donut-evolution-CHtJ8iOK.cjs +0 -1
- package/dist/vue-ui-dumbbell-B0dikuqO.cjs +0 -9
- package/dist/vue-ui-flow-D6rc8J-8.cjs +0 -1
- package/dist/vue-ui-galaxy-CmTt0vBf.cjs +0 -1
- package/dist/vue-ui-gauge-B_TKuyM7.cjs +0 -1
- package/dist/vue-ui-heatmap-C2HlnqzO.cjs +0 -1
- package/dist/vue-ui-molecule-BiYIcOKN.cjs +0 -1
- package/dist/vue-ui-mood-radar-C6jMyFkb.cjs +0 -1
- package/dist/vue-ui-nested-donuts-DKO2dFKo.cjs +0 -17
- package/dist/vue-ui-onion-GWNoZRhw.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-DODn4Ohf.cjs +0 -8
- package/dist/vue-ui-quadrant-yuFAxV-5.cjs +0 -1
- package/dist/vue-ui-quick-chart-DgFDBzjS.cjs +0 -15
- package/dist/vue-ui-radar-BJH5SE6-.cjs +0 -1
- package/dist/vue-ui-relation-circle-CKmjOle7.cjs +0 -1
- package/dist/vue-ui-relation-circle-xv2l5Be9.js +0 -358
- package/dist/vue-ui-rings-DjH3CK23.cjs +0 -2
- package/dist/vue-ui-scatter-SBCXAl7q.cjs +0 -1
- package/dist/vue-ui-strip-plot-IQrypGvz.cjs +0 -1
- package/dist/vue-ui-thermometer-swmi4FmH.cjs +0 -1
- package/dist/vue-ui-tiremarks-Cn79uQH2.cjs +0 -1
- package/dist/vue-ui-treemap-BEMuKV7x.cjs +0 -1
- package/dist/vue-ui-vertical-bar-B1e2RxTv.cjs +0 -4
- package/dist/vue-ui-waffle-BqP7Okgu.cjs +0 -1
- package/dist/vue-ui-wheel-BuWUGnkC.cjs +0 -1
- package/dist/vue-ui-xy-CGWzriYn.cjs +0 -3
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ref as n, onMounted as Q, onBeforeUnmount as Y, computed as z, watch as Z, openBlock as l, createElementBlock as r, normalizeStyle as f, createBlock as ee, createCommentVNode as v, unref as te, createVNode as M, createElementVNode as C, mergeProps as V, renderSlot as E, normalizeProps as O, guardReactiveProps as U, toDisplayString as ae } from "vue";
|
|
2
|
-
import { u as se } from "./useNestedProp-
|
|
3
|
-
import { u as le, c as oe, X as re, E as W } from "./index-
|
|
4
|
-
import { t as ue, u as ie } from "./useResponsive-
|
|
5
|
-
import P from "./BaseIcon-
|
|
6
|
-
import { _ as ne } from "./Title-
|
|
7
|
-
import { _ as ce } from "./PackageVersion-
|
|
2
|
+
import { u as se } from "./useNestedProp-DdSlLeTW.js";
|
|
3
|
+
import { u as le, c as oe, X as re, E as W } from "./index-DCsPHn9C.js";
|
|
4
|
+
import { t as ue, u as ie } from "./useResponsive-CoxXLe23.js";
|
|
5
|
+
import P from "./BaseIcon-BX3x6oa7.js";
|
|
6
|
+
import { _ as ne } from "./Title-710895ks.js";
|
|
7
|
+
import { _ as ce } from "./PackageVersion-Clrfvyd8.js";
|
|
8
8
|
import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
9
|
class he {
|
|
10
10
|
constructor(A, k, T, H = !0, x = !0) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),V=require("./useNestedProp-XtPlFP9O.cjs"),c=require("./index-CcykRspI.cjs"),X=require("./Title-CUN1T6KC.cjs"),L=require("./usePrinter-BcE45wW6.cjs"),Y=require("./vue-ui-skeleton-DpfJbsNA.cjs"),J=require("./PackageVersion-CowXQ4IM.cjs"),K=require("./PenAndPaper-DBSxk9Xk.cjs"),Q=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),W=["id"],Z={key:2,style:"width:100%;background:transparent;padding-bottom:12px"},ee=["xmlns","viewBox"],te={key:0},ae=["d","stroke-width","stroke"],oe={key:1},le=["x1","y1","x2","y2","stroke-width","stroke"],re=["x","y","font-size","fill","font-weight","text-anchor"],ne={key:5,class:"vue-data-ui-watermark"},se={key:6,ref:"source",dir:"auto"},ue={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(M,{expose:G}){const v=M,{vue_ui_tiremarks:j}=c.useConfig(),P=e.computed(()=>!!v.dataset&&Object.keys(v.dataset).length),$=e.ref(c.createUid()),B=e.ref(null),U=e.ref(null),A=e.ref(0),N=e.ref(0),t=e.computed({get:()=>S(),set:a=>a});function S(){const a=V.useNestedProp({userConfig:v.config,defaultConfig:j});return a.theme?{...V.useNestedProp({userConfig:c.themes.vue_ui_tiremarks[a.theme]||v.config,defaultConfig:a})}:a}e.watch(()=>v.config,a=>{t.value=S(),T(),N.value+=1},{deep:!0});const{isPrinting:z,isImaging:I,generatePdf:O,generateImage:F}=L.usePrinter({elementId:$.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks"}),H=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),n=e.ref(t.value.style.chart.animation.use?0:c.checkNaN(v.dataset.percentage));e.watch(()=>v.dataset,a=>{t.value.style.chart.animation.use?E(a.percentage):n.value=a.percentage||0},{deep:!0}),e.onMounted(()=>{T()});function E(a){let u=t.value.style.chart.animation.speed;const o=Math.abs(a-n.value)/(u*120);function r(){n.value<a?n.value=Math.min(n.value+o,a):n.value>a&&(n.value=Math.max(n.value-o,a)),n.value!==a&&requestAnimationFrame(r)}r()}function T(){c.objectIsEmpty(v.dataset)&&c.error({componentName:"VueUiTiremarks",type:"dataset"}),E(v.dataset.percentage||0)}const f=e.computed(()=>t.value.style.chart.layout.display==="vertical"),s=e.computed(()=>{const a={top:48,left:64,right:64,bottom:48};return f.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?a.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?a.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?a.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?a.right:10}}),b=e.computed(()=>Object.values(s.value).reduce((a,u)=>a+u,0)),l=e.computed(()=>({height:f.value?312:56,width:f.value?56:312})),D=e.ref(100);e.computed(()=>v.dataset.percentage/D.value);const i=e.computed(()=>f.value?{mark:(l.value.height-b.value)/100*.5,space:(l.value.height-b.value)/100*.5}:{mark:(l.value.width-b.value)/100*.5,space:(l.value.width-b.value)/100*.5}),q=e.computed(()=>{const a=[];for(let o=0;o<100;o+=1){const r=t.value.style.chart.layout.ticks.gradient.show?c.shiftHue(t.value.style.chart.layout.activeColor,o/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.activeColor;if(f.value){const y=t.value.style.chart.layout.crescendo?(100-o)*(l.value.width-s.value.left-s.value.right)/100/3:0,d=s.value.left+4+y,h=l.value.width-s.value.right-4-y,p=l.value.height-s.value.bottom-o*i.value.mark-o*i.value.space-i.value.mark,m=l.value.height-s.value.bottom-o*i.value.mark-o*i.value.space-i.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,C=t.value.style.chart.layout.curveAngleY*((1+o)/100);a.push({x1:d,x2:h,y1:p,y2:m,curve:`M ${d} ${p} C ${d+k} ${p-C}, ${h-k} ${m-C}, ${h} ${m}`,color:r})}else{const y=t.value.style.chart.layout.crescendo?(100-o)*(l.value.height-s.value.top-s.value.bottom)/100/3:0,d=s.value.left+o*i.value.mark+o*i.value.space-i.value.mark,h=d,p=s.value.top+4+y,m=l.value.height-s.value.bottom-4-y,k=t.value.style.chart.layout.curveAngleY*((1+o)/100),C=(m-p)/t.value.style.chart.layout.curveAngleX;a.push({x1:d,x2:h,y1:p,y2:m,curve:`M ${d} ${p} C ${d+k} ${p+C}, ${h+k} ${m-C}, ${h} ${m}`,color:r})}}return a}),g=e.computed(()=>{let a,u,o;const r=t.value.style.chart.percentage.fontSize/3;return f.value?t.value.style.chart.percentage.verticalPosition==="top"?(a=l.value.width/2,u=s.value.top/2,o="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(a=l.value.width/2,u=l.value.height-s.value.bottom/2+r,o="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(a=4,u=l.value.height/2+r,o="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(a=l.value.width-s.value.right+8,u=l.value.height/2+r,o="start"),{x:a,y:u,textAnchor:o,bold:t.value.style.chart.percentage.bold,fontSize:t.value.style.chart.percentage.fontSize,fill:t.value.style.chart.percentage.color}}),_=e.ref(!1);function R(a){_.value=a,A.value+=1}const w=e.ref(!1);function x(){w.value=!w.value}return G({generatePdf:O,generateImage:F,toggleAnnotator:x}),(a,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:B,class:e.normalizeClass(`vue-ui-tiremarks ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:$.value},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(K.PenAndPaper,{key:0,parent:B.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:x},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:U,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Z,[(e.openBlock(),e.createBlock(X._sfc_main,{key:`title_${N.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&P.value?(e.openBlock(),e.createBlock(L.UserOptions,{ref:"details",key:`user_options_${A.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(z),isImaging:e.unref(I),uid:$.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:_.value,titles:{...t.value.userOptions.buttonTitles},chartElement:B.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:R,onGeneratePdf:e.unref(O),onGenerateImage:e.unref(F),onToggleAnnotator:x},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:r})),void 0,!0)]),key:"2"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:r})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(J._sfc_main),t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,(o,r)=>(e.openBlock(),e.createElementBlock("path",{d:o.curve,"stroke-width":i.value.mark,stroke:n.value>=r?o.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&r<=n.value})},null,10,ae))),256))])):(e.openBlock(),e.createElementBlock("g",oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,(o,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.x1,y1:o.y1,x2:o.x2,y2:o.y2,"stroke-width":i.value.mark,stroke:n.value>=r?o.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,le))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:g.value.x,y:g.value.y,"font-size":g.value.fontSize,fill:t.value.style.chart.layout.ticks.gradient.show&&t.value.style.chart.percentage.useGradientColor?e.unref(c.shiftHue)(t.value.style.chart.layout.activeColor,n.value/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.percentage.color,"font-weight":g.value.bold?"bold":"normal","text-anchor":g.value.textAnchor},e.toDisplayString(e.unref(c.applyDataLabel)(t.value.style.chart.percentage.formatter,n.value,e.unref(c.dataLabel)({v:n.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,re)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:l.value},void 0,!0)],14,ee)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ne,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(z)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",se,[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),P.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Y.default,{key:7,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],14,W))}},ie=Q._export_sfc(ue,[["__scopeId","data-v-93332410"]]);exports.default=ie;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { u as W } from "./useNestedProp-
|
|
3
|
-
import { u as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { u as
|
|
6
|
-
import
|
|
7
|
-
import { _ as
|
|
8
|
-
import { P as
|
|
9
|
-
import { _ as
|
|
10
|
-
const
|
|
11
|
-
key:
|
|
1
|
+
import { computed as v, ref as p, watch as J, onMounted as ne, openBlock as r, createElementBlock as u, normalizeClass as G, normalizeStyle as K, createBlock as O, createCommentVNode as g, unref as d, createSlots as ue, withCtx as F, renderSlot as _, normalizeProps as L, guardReactiveProps as M, createVNode as ie, Fragment as Q, renderList as V, toDisplayString as ce } from "vue";
|
|
2
|
+
import { u as W } from "./useNestedProp-DdSlLeTW.js";
|
|
3
|
+
import { u as ve, c as he, t as de, v as fe, o as pe, e as ge, w as Z, X as me, i as ye, f as ke } from "./index-DCsPHn9C.js";
|
|
4
|
+
import { _ as _e } from "./Title-710895ks.js";
|
|
5
|
+
import { u as be, U as Ce } from "./usePrinter-siG3sKWo.js";
|
|
6
|
+
import $e from "./vue-ui-skeleton-DNuwx6_y.js";
|
|
7
|
+
import { _ as we } from "./PackageVersion-Clrfvyd8.js";
|
|
8
|
+
import { P as xe } from "./PenAndPaper-BQzgk5kO.js";
|
|
9
|
+
import { _ as Pe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
|
+
const Ae = ["id"], Ie = {
|
|
11
|
+
key: 2,
|
|
12
12
|
style: "width:100%;background:transparent;padding-bottom:12px"
|
|
13
|
-
},
|
|
14
|
-
key: 4,
|
|
15
|
-
class: "vue-data-ui-watermark"
|
|
16
|
-
}, Ge = {
|
|
13
|
+
}, Oe = ["xmlns", "viewBox"], Fe = { key: 0 }, ze = ["d", "stroke-width", "stroke"], Se = { key: 1 }, Ne = ["x1", "y1", "x2", "y2", "stroke-width", "stroke"], Te = ["x", "y", "font-size", "fill", "font-weight", "text-anchor"], Ge = {
|
|
17
14
|
key: 5,
|
|
15
|
+
class: "vue-data-ui-watermark"
|
|
16
|
+
}, Le = {
|
|
17
|
+
key: 6,
|
|
18
18
|
ref: "source",
|
|
19
19
|
dir: "auto"
|
|
20
|
-
},
|
|
20
|
+
}, Me = {
|
|
21
21
|
__name: "vue-ui-tiremarks",
|
|
22
22
|
props: {
|
|
23
23
|
config: {
|
|
@@ -34,49 +34,49 @@ const xe = ["id"], Pe = {
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
setup(ee, { expose: te }) {
|
|
37
|
-
const
|
|
37
|
+
const h = ee, { vue_ui_tiremarks: ae } = ve(), z = v(() => !!h.dataset && Object.keys(h.dataset).length), S = p(he()), N = p(null), le = p(null), U = p(0), j = p(0), e = v({
|
|
38
38
|
get: () => B(),
|
|
39
39
|
set: (t) => t
|
|
40
40
|
});
|
|
41
41
|
function B() {
|
|
42
42
|
const t = W({
|
|
43
|
-
userConfig:
|
|
43
|
+
userConfig: h.config,
|
|
44
44
|
defaultConfig: ae
|
|
45
45
|
});
|
|
46
46
|
return t.theme ? {
|
|
47
47
|
...W({
|
|
48
|
-
userConfig:
|
|
48
|
+
userConfig: de.vue_ui_tiremarks[t.theme] || h.config,
|
|
49
49
|
defaultConfig: t
|
|
50
50
|
})
|
|
51
51
|
} : t;
|
|
52
52
|
}
|
|
53
|
-
J(() =>
|
|
53
|
+
J(() => h.config, (t) => {
|
|
54
54
|
e.value = B(), Y(), j.value += 1;
|
|
55
55
|
}, { deep: !0 });
|
|
56
|
-
const { isPrinting: E, isImaging: X, generatePdf: D, generateImage: H } =
|
|
56
|
+
const { isPrinting: E, isImaging: X, generatePdf: D, generateImage: H } = be({
|
|
57
57
|
elementId: S.value,
|
|
58
58
|
fileName: e.value.style.chart.title.text || "vue-ui-tiremarks"
|
|
59
|
-
}), s =
|
|
60
|
-
J(() =>
|
|
59
|
+
}), oe = v(() => e.value.userOptions.show && !e.value.style.chart.title.text), s = p(e.value.style.chart.animation.use ? 0 : fe(h.dataset.percentage));
|
|
60
|
+
J(() => h.dataset, (t) => {
|
|
61
61
|
e.value.style.chart.animation.use ? R(t.percentage) : s.value = t.percentage || 0;
|
|
62
|
-
}, { deep: !0 }),
|
|
62
|
+
}, { deep: !0 }), ne(() => {
|
|
63
63
|
Y();
|
|
64
64
|
});
|
|
65
65
|
function R(t) {
|
|
66
|
-
let
|
|
67
|
-
const a = Math.abs(t - s.value) / (
|
|
68
|
-
function
|
|
69
|
-
s.value < t ? s.value = Math.min(s.value + a, t) : s.value > t && (s.value = Math.max(s.value - a, t)), s.value !== t && requestAnimationFrame(
|
|
66
|
+
let i = e.value.style.chart.animation.speed;
|
|
67
|
+
const a = Math.abs(t - s.value) / (i * 120);
|
|
68
|
+
function o() {
|
|
69
|
+
s.value < t ? s.value = Math.min(s.value + a, t) : s.value > t && (s.value = Math.max(s.value - a, t)), s.value !== t && requestAnimationFrame(o);
|
|
70
70
|
}
|
|
71
|
-
|
|
71
|
+
o();
|
|
72
72
|
}
|
|
73
73
|
function Y() {
|
|
74
|
-
|
|
74
|
+
pe(h.dataset) && ge({
|
|
75
75
|
componentName: "VueUiTiremarks",
|
|
76
76
|
type: "dataset"
|
|
77
|
-
}), R(
|
|
77
|
+
}), R(h.dataset.percentage || 0);
|
|
78
78
|
}
|
|
79
|
-
const b =
|
|
79
|
+
const b = v(() => e.value.style.chart.layout.display === "vertical"), n = v(() => {
|
|
80
80
|
const t = {
|
|
81
81
|
top: 48,
|
|
82
82
|
left: 64,
|
|
@@ -94,84 +94,91 @@ const xe = ["id"], Pe = {
|
|
|
94
94
|
left: e.value.style.chart.percentage.horizontalPosition === "left" ? t.left : 3,
|
|
95
95
|
right: e.value.style.chart.percentage.horizontalPosition === "right" ? t.right : 10
|
|
96
96
|
};
|
|
97
|
-
}), P =
|
|
97
|
+
}), P = v(() => Object.values(n.value).reduce((t, i) => t + i, 0)), l = v(() => ({
|
|
98
98
|
height: b.value ? 312 : 56,
|
|
99
99
|
width: b.value ? 56 : 312
|
|
100
|
-
})),
|
|
101
|
-
|
|
102
|
-
const c =
|
|
103
|
-
mark: (
|
|
104
|
-
space: (
|
|
100
|
+
})), re = p(100);
|
|
101
|
+
v(() => h.dataset.percentage / re.value);
|
|
102
|
+
const c = v(() => b.value ? {
|
|
103
|
+
mark: (l.value.height - P.value) / 100 * 0.5,
|
|
104
|
+
space: (l.value.height - P.value) / 100 * 0.5
|
|
105
105
|
} : {
|
|
106
|
-
mark: (
|
|
107
|
-
space: (
|
|
108
|
-
}), q =
|
|
106
|
+
mark: (l.value.width - P.value) / 100 * 0.5,
|
|
107
|
+
space: (l.value.width - P.value) / 100 * 0.5
|
|
108
|
+
}), q = v(() => {
|
|
109
109
|
const t = [];
|
|
110
110
|
for (let a = 0; a < 100; a += 1) {
|
|
111
|
-
const
|
|
111
|
+
const o = e.value.style.chart.layout.ticks.gradient.show ? Z(e.value.style.chart.layout.activeColor, a / 100 * (e.value.style.chart.layout.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.layout.activeColor;
|
|
112
112
|
if (b.value) {
|
|
113
|
-
const $ = e.value.style.chart.layout.crescendo ? (100 - a) * (
|
|
113
|
+
const $ = e.value.style.chart.layout.crescendo ? (100 - a) * (l.value.width - n.value.left - n.value.right) / 100 / 3 : 0, f = n.value.left + 4 + $, m = l.value.width - n.value.right - 4 - $, y = l.value.height - n.value.bottom - a * c.value.mark - a * c.value.space - c.value.mark, k = l.value.height - n.value.bottom - a * c.value.mark - a * c.value.space - c.value.mark, w = (m - f) / e.value.style.chart.layout.curveAngleX, x = e.value.style.chart.layout.curveAngleY * ((1 + a) / 100);
|
|
114
114
|
t.push({
|
|
115
115
|
x1: f,
|
|
116
116
|
x2: m,
|
|
117
|
-
y1:
|
|
118
|
-
y2:
|
|
119
|
-
curve: `M ${f} ${
|
|
120
|
-
color:
|
|
117
|
+
y1: y,
|
|
118
|
+
y2: k,
|
|
119
|
+
curve: `M ${f} ${y} C ${f + w} ${y - x}, ${m - w} ${k - x}, ${m} ${k}`,
|
|
120
|
+
color: o
|
|
121
121
|
});
|
|
122
122
|
} else {
|
|
123
|
-
const $ = e.value.style.chart.layout.crescendo ? (100 - a) * (
|
|
123
|
+
const $ = e.value.style.chart.layout.crescendo ? (100 - a) * (l.value.height - n.value.top - n.value.bottom) / 100 / 3 : 0, f = n.value.left + a * c.value.mark + a * c.value.space - c.value.mark, m = f, y = n.value.top + 4 + $, k = l.value.height - n.value.bottom - 4 - $, w = e.value.style.chart.layout.curveAngleY * ((1 + a) / 100), x = (k - y) / e.value.style.chart.layout.curveAngleX;
|
|
124
124
|
t.push({
|
|
125
125
|
x1: f,
|
|
126
126
|
x2: m,
|
|
127
|
-
y1:
|
|
128
|
-
y2:
|
|
129
|
-
curve: `M ${f} ${
|
|
130
|
-
color:
|
|
127
|
+
y1: y,
|
|
128
|
+
y2: k,
|
|
129
|
+
curve: `M ${f} ${y} C ${f + w} ${y + x}, ${m + w} ${k - x}, ${m} ${k}`,
|
|
130
|
+
color: o
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
return t;
|
|
135
|
-
}), C =
|
|
136
|
-
let t,
|
|
137
|
-
const
|
|
138
|
-
return b.value ? e.value.style.chart.percentage.verticalPosition === "top" ? (t =
|
|
135
|
+
}), C = v(() => {
|
|
136
|
+
let t, i, a;
|
|
137
|
+
const o = e.value.style.chart.percentage.fontSize / 3;
|
|
138
|
+
return b.value ? e.value.style.chart.percentage.verticalPosition === "top" ? (t = l.value.width / 2, i = n.value.top / 2, a = "middle") : e.value.style.chart.percentage.verticalPosition === "bottom" && (t = l.value.width / 2, i = l.value.height - n.value.bottom / 2 + o, a = "middle") : e.value.style.chart.percentage.horizontalPosition === "left" ? (t = 4, i = l.value.height / 2 + o, a = "start") : e.value.style.chart.percentage.horizontalPosition === "right" && (t = l.value.width - n.value.right + 8, i = l.value.height / 2 + o, a = "start"), {
|
|
139
139
|
x: t,
|
|
140
|
-
y:
|
|
140
|
+
y: i,
|
|
141
141
|
textAnchor: a,
|
|
142
142
|
bold: e.value.style.chart.percentage.bold,
|
|
143
143
|
fontSize: e.value.style.chart.percentage.fontSize,
|
|
144
144
|
fill: e.value.style.chart.percentage.color
|
|
145
145
|
};
|
|
146
|
-
}), A =
|
|
147
|
-
function
|
|
146
|
+
}), A = p(!1);
|
|
147
|
+
function se(t) {
|
|
148
148
|
A.value = t, U.value += 1;
|
|
149
149
|
}
|
|
150
|
-
const I =
|
|
151
|
-
function
|
|
150
|
+
const I = p(!1);
|
|
151
|
+
function T() {
|
|
152
152
|
I.value = !I.value;
|
|
153
153
|
}
|
|
154
154
|
return te({
|
|
155
155
|
generatePdf: D,
|
|
156
156
|
generateImage: H,
|
|
157
|
-
toggleAnnotator:
|
|
158
|
-
}), (t,
|
|
157
|
+
toggleAnnotator: T
|
|
158
|
+
}), (t, i) => (r(), u("div", {
|
|
159
159
|
ref_key: "tiremarksChart",
|
|
160
160
|
ref: N,
|
|
161
|
-
class:
|
|
162
|
-
style: K(`font-family:${e.value.style.fontFamily};width:100%; text-align:center
|
|
161
|
+
class: G(`vue-ui-tiremarks ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
162
|
+
style: K(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
|
|
163
163
|
id: S.value
|
|
164
164
|
}, [
|
|
165
|
-
e.value.userOptions.buttons.annotator ? (r(),
|
|
165
|
+
e.value.userOptions.buttons.annotator ? (r(), O(xe, {
|
|
166
166
|
key: 0,
|
|
167
167
|
parent: N.value,
|
|
168
168
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
169
169
|
color: e.value.style.chart.color,
|
|
170
170
|
active: I.value,
|
|
171
|
-
onClose:
|
|
172
|
-
}, null, 8, ["parent", "backgroundColor", "color", "active"])) :
|
|
173
|
-
|
|
174
|
-
|
|
171
|
+
onClose: T
|
|
172
|
+
}, null, 8, ["parent", "backgroundColor", "color", "active"])) : g("", !0),
|
|
173
|
+
oe.value ? (r(), u("div", {
|
|
174
|
+
key: 1,
|
|
175
|
+
ref_key: "noTitle",
|
|
176
|
+
ref: le,
|
|
177
|
+
class: "vue-data-ui-no-title-space",
|
|
178
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
179
|
+
}, null, 512)) : g("", !0),
|
|
180
|
+
e.value.style.chart.title.text ? (r(), u("div", Ie, [
|
|
181
|
+
(r(), O(_e, {
|
|
175
182
|
key: `title_${j.value}`,
|
|
176
183
|
config: {
|
|
177
184
|
title: {
|
|
@@ -184,8 +191,8 @@ const xe = ["id"], Pe = {
|
|
|
184
191
|
}
|
|
185
192
|
}
|
|
186
193
|
}, null, 8, ["config"]))
|
|
187
|
-
])) :
|
|
188
|
-
e.value.userOptions.show &&
|
|
194
|
+
])) : g("", !0),
|
|
195
|
+
e.value.userOptions.show && z.value ? (r(), O(Ce, {
|
|
189
196
|
ref: "details",
|
|
190
197
|
key: `user_options_${U.value}`,
|
|
191
198
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
@@ -203,69 +210,69 @@ const xe = ["id"], Pe = {
|
|
|
203
210
|
position: e.value.userOptions.position,
|
|
204
211
|
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
205
212
|
isAnnotation: I.value,
|
|
206
|
-
onToggleFullscreen:
|
|
213
|
+
onToggleFullscreen: se,
|
|
207
214
|
onGeneratePdf: d(D),
|
|
208
215
|
onGenerateImage: d(H),
|
|
209
|
-
onToggleAnnotator:
|
|
210
|
-
},
|
|
216
|
+
onToggleAnnotator: T
|
|
217
|
+
}, ue({ _: 2 }, [
|
|
211
218
|
t.$slots.optionPdf ? {
|
|
212
219
|
name: "optionPdf",
|
|
213
|
-
fn:
|
|
220
|
+
fn: F(() => [
|
|
214
221
|
_(t.$slots, "optionPdf", {}, void 0, !0)
|
|
215
222
|
]),
|
|
216
223
|
key: "0"
|
|
217
224
|
} : void 0,
|
|
218
225
|
t.$slots.optionImg ? {
|
|
219
226
|
name: "optionImg",
|
|
220
|
-
fn:
|
|
227
|
+
fn: F(() => [
|
|
221
228
|
_(t.$slots, "optionImg", {}, void 0, !0)
|
|
222
229
|
]),
|
|
223
230
|
key: "1"
|
|
224
231
|
} : void 0,
|
|
225
232
|
t.$slots.optionFullscreen ? {
|
|
226
233
|
name: "optionFullscreen",
|
|
227
|
-
fn:
|
|
228
|
-
_(t.$slots, "optionFullscreen", M(
|
|
234
|
+
fn: F(({ toggleFullscreen: a, isFullscreen: o }) => [
|
|
235
|
+
_(t.$slots, "optionFullscreen", L(M({ toggleFullscreen: a, isFullscreen: o })), void 0, !0)
|
|
229
236
|
]),
|
|
230
237
|
key: "2"
|
|
231
238
|
} : void 0,
|
|
232
239
|
t.$slots.optionAnnotator ? {
|
|
233
240
|
name: "optionAnnotator",
|
|
234
|
-
fn:
|
|
235
|
-
_(t.$slots, "optionAnnotator", M(
|
|
241
|
+
fn: F(({ toggleAnnotator: a, isAnnotator: o }) => [
|
|
242
|
+
_(t.$slots, "optionAnnotator", L(M({ toggleAnnotator: a, isAnnotator: o })), void 0, !0)
|
|
236
243
|
]),
|
|
237
244
|
key: "3"
|
|
238
245
|
} : void 0
|
|
239
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage"])) :
|
|
240
|
-
|
|
241
|
-
key:
|
|
246
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage"])) : g("", !0),
|
|
247
|
+
z.value ? (r(), u("svg", {
|
|
248
|
+
key: 4,
|
|
242
249
|
xmlns: d(me),
|
|
243
|
-
class:
|
|
244
|
-
viewBox: `0 0 ${
|
|
250
|
+
class: G({ "vue-data-ui-fullscreen--on": A.value, "vue-data-ui-fulscreen--off": !A.value }),
|
|
251
|
+
viewBox: `0 0 ${l.value.width} ${l.value.height}`,
|
|
245
252
|
style: K(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color}`)
|
|
246
253
|
}, [
|
|
247
|
-
|
|
248
|
-
e.value.style.chart.layout.curved ? (r(),
|
|
249
|
-
(r(!0),
|
|
254
|
+
ie(we),
|
|
255
|
+
e.value.style.chart.layout.curved ? (r(), u("g", Fe, [
|
|
256
|
+
(r(!0), u(Q, null, V(q.value, (a, o) => (r(), u("path", {
|
|
250
257
|
d: a.curve,
|
|
251
258
|
"stroke-width": c.value.mark,
|
|
252
|
-
stroke: s.value >=
|
|
259
|
+
stroke: s.value >= o ? a.color : e.value.style.chart.layout.inactiveColor,
|
|
253
260
|
"stroke-linecap": "round",
|
|
254
261
|
fill: "none",
|
|
255
|
-
class:
|
|
256
|
-
}, null, 10,
|
|
257
|
-
])) : (r(),
|
|
258
|
-
(r(!0),
|
|
262
|
+
class: G({ "vue-ui-tick-animated": e.value.style.chart.animation.use && o <= s.value })
|
|
263
|
+
}, null, 10, ze))), 256))
|
|
264
|
+
])) : (r(), u("g", Se, [
|
|
265
|
+
(r(!0), u(Q, null, V(q.value, (a, o) => (r(), u("line", {
|
|
259
266
|
x1: a.x1,
|
|
260
267
|
y1: a.y1,
|
|
261
268
|
x2: a.x2,
|
|
262
269
|
y2: a.y2,
|
|
263
270
|
"stroke-width": c.value.mark,
|
|
264
|
-
stroke: s.value >=
|
|
271
|
+
stroke: s.value >= o ? a.color : e.value.style.chart.layout.inactiveColor,
|
|
265
272
|
"stroke-linecap": "round"
|
|
266
|
-
}, null, 8,
|
|
273
|
+
}, null, 8, Ne))), 256))
|
|
267
274
|
])),
|
|
268
|
-
e.value.style.chart.percentage.show ? (r(),
|
|
275
|
+
e.value.style.chart.percentage.show ? (r(), u("text", {
|
|
269
276
|
key: 2,
|
|
270
277
|
x: C.value.x,
|
|
271
278
|
y: C.value.y,
|
|
@@ -273,25 +280,25 @@ const xe = ["id"], Pe = {
|
|
|
273
280
|
fill: e.value.style.chart.layout.ticks.gradient.show && e.value.style.chart.percentage.useGradientColor ? d(Z)(e.value.style.chart.layout.activeColor, s.value / 100 * (e.value.style.chart.layout.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.percentage.color,
|
|
274
281
|
"font-weight": C.value.bold ? "bold" : "normal",
|
|
275
282
|
"text-anchor": C.value.textAnchor
|
|
276
|
-
},
|
|
283
|
+
}, ce(d(ye)(
|
|
277
284
|
e.value.style.chart.percentage.formatter,
|
|
278
285
|
s.value,
|
|
279
|
-
d(
|
|
286
|
+
d(ke)({
|
|
280
287
|
v: s.value,
|
|
281
288
|
s: "%",
|
|
282
289
|
r: e.value.style.chart.percentage.rounding
|
|
283
290
|
})
|
|
284
|
-
)), 9,
|
|
285
|
-
_(t.$slots, "svg", { svg:
|
|
286
|
-
], 14,
|
|
287
|
-
t.$slots.watermark ? (r(),
|
|
288
|
-
_(t.$slots, "watermark", M(
|
|
289
|
-
])) :
|
|
290
|
-
t.$slots.source ? (r(),
|
|
291
|
+
)), 9, Te)) : g("", !0),
|
|
292
|
+
_(t.$slots, "svg", { svg: l.value }, void 0, !0)
|
|
293
|
+
], 14, Oe)) : g("", !0),
|
|
294
|
+
t.$slots.watermark ? (r(), u("div", Ge, [
|
|
295
|
+
_(t.$slots, "watermark", L(M({ isPrinting: d(E) || d(X) })), void 0, !0)
|
|
296
|
+
])) : g("", !0),
|
|
297
|
+
t.$slots.source ? (r(), u("div", Le, [
|
|
291
298
|
_(t.$slots, "source", {}, void 0, !0)
|
|
292
|
-
], 512)) :
|
|
293
|
-
|
|
294
|
-
key:
|
|
299
|
+
], 512)) : g("", !0),
|
|
300
|
+
z.value ? g("", !0) : (r(), O($e, {
|
|
301
|
+
key: 7,
|
|
295
302
|
config: {
|
|
296
303
|
type: "tiremarks",
|
|
297
304
|
style: {
|
|
@@ -302,9 +309,9 @@ const xe = ["id"], Pe = {
|
|
|
302
309
|
}
|
|
303
310
|
}
|
|
304
311
|
}, null, 8, ["config"]))
|
|
305
|
-
], 14,
|
|
312
|
+
], 14, Ae));
|
|
306
313
|
}
|
|
307
|
-
},
|
|
314
|
+
}, qe = /* @__PURE__ */ Pe(Me, [["__scopeId", "data-v-93332410"]]);
|
|
308
315
|
export {
|
|
309
|
-
|
|
316
|
+
qe as default
|
|
310
317
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CcykRspI.cjs"),Pe=require("./Title-CUN1T6KC.cjs"),pe=require("./usePrinter-BcE45wW6.cjs"),ze=require("./Tooltip-BapDtYOM.cjs"),Oe=require("./Legend-B86sMXn7.cjs"),Ve=require("./vue-ui-skeleton-DpfJbsNA.cjs"),Ee=require("./DataTable-RUQ1G_6L.cjs"),Le=require("./vue-ui-accordion-B7PTyFVk.cjs"),fe=require("./useResponsive-BJ7DTGpm.cjs"),ge=require("./useNestedProp-XtPlFP9O.cjs"),Re=require("./PackageVersion-CowXQ4IM.cjs"),Ae=require("./PenAndPaper-DBSxk9Xk.cjs"),Fe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function me(n,d){const s=n.length;if(s===0)throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);{let u=1/0,c=-1/0,v=0;for(let f=0;f<s;f+=1){const p=n[f].normalizedValue;p<u&&(u=p),p>c&&(c=p),v+=p}return Math.max(d**2*c/v**2,v**2/(d**2*u))}}function ye(n){const{xOffset:d,yOffset:s,width:u,height:c}=n;return{x0:d,y0:s,x1:d+u,y1:s+c}}function Ie(n,d,s){if(n.length===0)return!0;{const u=n.concat(d),c=me(n,s),v=me(u,s);return c>=v}}function De(n){const d=[],s=n.length;for(let u=0;u<s;u+=1){const c=n[u],v=c.length;for(let h=0;h<v;h+=1)d.push(c[h])}return d}function qe(n,d){const s={...d,children:n};return ke(s)}function He(n){return(n.x1-n.x0)*(n.y1-n.y0)}function be(n,d){const{width:s,height:u,xOffset:c,yOffset:v}=X(d),h=n.length,f=n.map(g=>g.normalizedValue||0).reduce((g,k)=>g+k,0),p=f/u,C=f/s;let b=c,w=v;const m=[];if(s>=u){for(let g=0;g<h;g+=1){const k=n[g],x=w+k.normalizedValue/p,B={x0:b,y0:w,x1:b+p,y1:x},T=Object.assign({},k,B);w=x,m.push(T)}return m}else{for(let g=0;g<h;g+=1){const k=n[g],x=b+k.normalizedValue/C,B={x0:b,y0:w,x1:x,y1:w+C},T=Object.assign({},k,B);b=x,m.push(T)}return m}}function Me(n){const d=X(n),s=d.width,u=d.height;return Math.min(s,u)}function We(n,d){const s=n.length,u=n.map(p=>p.value??0).reduce((p,C)=>p+C,0),c=d/u,v=[];let h,f;for(let p=0;p<s;p+=1)f=n[p],h=Object.assign({},f,{normalizedValue:f.value*(c||0)}),v.push(h);return v}function X(n){const{x0:d,y0:s,x1:u,y1:c}=n;return{xOffset:d,yOffset:s,width:u-d,height:c-s}}function Ue(n,d,s,u){let c=n,v=d,h=s,f=u;for(;;){const p=c.length;if(p===0){const m=be(v,h);return f.concat(m)}const C=Me(h),b=c[0],w=c.slice(1,p);if(Ie(v,b,C)){const m=v.concat(b);c=w,v=m,h=h,f=f}else{const m=v.length;let g=0;for(let T=0;T<m;T+=1)g+=v[T].normalizedValue;const k=Ge(h,g),x=be(v,h),B=f.concat(x);c=c,v=[],h=k,f=B}}}function ke(n){if(typeof n.children>"u"||!n.children.length)return[n];{const d=We(n.children,He(n)),s=Ue(d,[],n,[]),u=s.length,c=[];for(let h=0;h<u;h+=1)c.push(ke(s[h]));return De(c)}}function Ge(n,d){const{width:s,height:u,xOffset:c,yOffset:v}=X(n);if(s>=u){const h=d/u,f=s-h,p={xOffset:c+h,yOffset:v,width:f,height:u};return ye(p)}else{const h=d/s,f=u-h,p={xOffset:c,yOffset:v+h,width:s,height:f};return ye(p)}}const je=n=>(e.pushScopeId("data-v-04106534"),n=n(),e.popScopeId(),n),Xe=["id"],Ye=["xmlns","viewBox"],Ze={key:0},Je=["id"],Ke=["stop-color"],Qe=["stop-color"],et=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],tt=["x","y","height","width"],ot={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},lt=je(()=>e.createElementVNode("br",null,null,-1)),at={key:5,class:"vue-data-ui-watermark"},nt=["onClick"],rt={key:0},ut={key:1},st=["innerHTML"],it={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(n,{expose:d,emit:s}){const u=n,{vue_ui_treemap:c}=r.useConfig(),v=e.computed(()=>!!u.dataset&&u.dataset.length),h=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),f=e.ref(r.createUid()),p=e.ref(!1),C=e.ref(""),b=e.ref(!1),w=e.ref(0),m=e.ref([]),g=e.ref(null),k=e.ref(null),x=e.ref(null),B=e.ref(null),T=e.ref(null),Y=e.ref(0),Z=e.ref(0),J=e.ref(0),t=e.computed({get:()=>K(),set:o=>o});function K(){const o=ge.useNestedProp({userConfig:u.config,defaultConfig:c});return o.theme?{...ge.useNestedProp({userConfig:r.themes.vue_ui_treemap[o.theme]||u.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}e.watch(()=>u.config,o=>{t.value=K(),Y.value+=1,Z.value+=1,J.value+=1},{deep:!0});const{isPrinting:Q,isImaging:ee,generatePdf:te,generateImage:oe}=pe.usePrinter({elementId:`treemap_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-treemap"}),Ce=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),I=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),_=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),P=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),O=e.computed(()=>({bottom:P.value.height-t.value.style.chart.padding.bottom,height:P.value.height-t.value.style.chart.padding.top-t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:P.value.width-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,vbHeight:P.value.height,vbWidth:P.value.width,width:P.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right}));function le(o){o.forEach((a,l)=>{a.id=r.createUid(),a.color=r.convertColorToHex(a.color)||I.value[l]||r.palette[l]||r.palette[l%r.palette.length],a.children&&(a.children.forEach(i=>{i.parentId=a.id,i.color=a.color}),le(a.children))})}const V=e.ref(u.dataset),D=e.ref(null);e.onMounted(()=>{we()});function we(){if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiTreemap",type:"dataset"}),le(V.value),t.value.responsive){const o=fe.throttle(()=>{const{width:a,height:l}=fe.useResponsive({chart:g.value,title:t.value.style.chart.title.text?k.value:null,legend:t.value.style.chart.legend.show?x.value:null,source:B.value,noTitle:T.value});P.value.width=a,P.value.height=l});D.value=new ResizeObserver(o),D.value.observe(g.value.parentNode)}}e.onBeforeUnmount(()=>{D.value&&D.value.disconnect()});const W=e.ref(V.value),A=e.computed(()=>W.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||I.value[a]||r.palette[a]||r.palette[a%r.palette.length]})).filter(o=>!m.value.includes(o.id))),L=e.computed(()=>V.value.filter(o=>!m.value.includes(o.id)).map(o=>o.value||0).reduce((o,a)=>o+a,0)),ae=e.computed({get(){let o=[...A.value];return t.value.style.chart.layout.sorted&&(o=[...A.value].sort((a,l)=>l.value-a.value)),o.map(a=>({...a}))},set(o){return o}});function ne(o,a){return o.value/a}function xe(o,a,l){const i=t.value.style.chart.layout.rects.colorRatio-ne(a,l);return r.lightenHexColor(o,i<0?0:i)}function re(o,a,l,i){return o.map((y,z)=>{const M=xe(r.convertColorToHex(a)||I.value[z]||r.palette[z]||r.palette[z%r.palette.length],y,i),_e=ne(y,i);return{...y,color:M,proportion:_e,parentName:l,children:y.children?re(y.children,M,y.name,i):void 0}})}const F=e.computed(()=>qe(ae.value.map((o,a)=>{const l=o.children?o.children.reduce((i,y)=>i+y.value,0):o.value;return{value:o.value,id:o.id,children:o.children?re(o.children.sort((i,y)=>y.value-i.value),o.color,o.name,l):void 0,color:o.color,name:o.name}}),{x0:O.value.left*2,y0:O.value.top,x1:O.value.width,y1:O.value.height}));function ue({y0:o,y1:a}){return a-o<=0?1e-4:a-o}function se({x0:o,x1:a}){return a-o<=0?1e-4:a-o}function E(o){const a=t.value.style.chart.layout.labels.fontSize*(o.proportion*2>1?1:o.proportion*2);return a<t.value.style.chart.layout.labels.minFontSize?t.value.style.chart.layout.labels.minFontSize:a}function Te(o){b.value=o,w.value+=1}const R=e.computed(()=>({startX:0,startY:0,width:O.value.vbWidth,height:O.value.vbHeight})),$=e.ref(!1);function U(o,a=V.value){for(const l of a){if(l.id===o)return l;if(l.children){const i=U(o,l.children);if(i)return i}}return null}function $e(o){if($.value)s("selectDatapoint",void 0),W.value=V.value;else{if(s("selectDatapoint",o),!U(o.parentId))return;W.value=[U(o.parentId)]}$.value=!$.value}const S=e.ref(null),ie=e.computed(()=>V.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||I.value[a]||r.palette[a]||r.palette[a%r.palette.length],shape:"square"})).sort((o,a)=>a.value-o.value).map((o,a)=>({...o,proportion:o.value/V.value.map(l=>l.value).reduce((l,i)=>l+i,0),opacity:m.value.includes(o.id)?.5:1}))),Se=e.computed(()=>({cy:"treemap-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function ce(o){$.value=!1,S.value=null,m.value.includes(o.id)?m.value=m.value.filter(a=>a!==o.id):m.value.length<u.dataset.length-1&&m.value.push(o.id),s("selectLegend",ae.value)}const G=e.ref(null);function Ne({datapoint:o,seriesIndex:a}){S.value=o,G.value={datapoint:o,seriesIndex:a,config:t.value,series:A.value};const l=t.value.style.chart.tooltip.customFormat;if(r.isFunction(l)&&r.functionReturnsString(()=>l({seriesIndex:a,datapoint:o,series:A.value,config:t.value})))C.value=l({seriesIndex:a,datapoint:o,series:A.value,config:t.value});else{let i="";i+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,i+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" fill="${o.color}"/></svg>`,i+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.formatter,o.value,r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:o.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:o,seriesIndex:a})}</b>`,C.value=`<div>${i}</div>`}p.value=!0}const N=e.computed(()=>{const o=F.value.map(l=>({name:l.name,color:l.color})),a=F.value.map(l=>l.value);return{head:o,body:a}});function de(){e.nextTick(()=>{const o=N.value.head.map((i,y)=>[[i.name],[N.value.body[y]],[isNaN(N.value.body[y]/L.value)?"-":N.value.body[y]/L.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=r.createCsvContent(a);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-treemap"})})}const q=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],a=N.value.head.map((y,z)=>{const M=r.applyDataLabel(t.value.style.chart.layout.labels.formatter,N.value.body[z],r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:N.value.body[z],s:t.value.style.chart.layout.labels.suffix,r:t.value.table.td.roundingValue}));return[{color:y.color,name:y.name,shape:"square"},M,isNaN(N.value.body[z]/L.value)?"-":r.dataLabel({v:N.value.body[z]/L.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:a,config:l}});function Be(){return F.value}function ve(){_.value.showTable=!_.value.showTable}function he(){_.value.showTooltip=!_.value.showTooltip}const H=e.ref(!1);function j(){H.value=!H.value}return d({getData:Be,generateCsv:de,generateImage:oe,generatePdf:te,toggleTable:ve,toggleTooltip:he,toggleAnnotator:j}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:g,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`treemap_${f.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ae.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:H.value,onClose:j},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),Ce.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:T,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:k,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)},[(e.openBlock(),e.createBlock(Pe._sfc_main,{key:`title_${Y.value}`,config:{title:{cy:"treemap-div-title",...t.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&v.value?(e.openBlock(),e.createBlock(pe.UserOptions,{ref:"details",key:`user_option_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Q),isImaging:e.unref(ee),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:_.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:H.value,onToggleFullscreen:Te,onGeneratePdf:e.unref(te),onGenerateCsv:de,onGenerateImage:e.unref(oe),onToggleTable:ve,onToggleTooltip:he,onToggleAnnotator:j},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:i})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:i})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!$.value,"vue-data-ui-zoom-minus":$.value}),viewBox:`${R.value.startX} ${R.value.startY} ${R.value.width<=0?10:R.value.width} ${R.value.height<=0?10:R.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Re._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",Ze,[e.createElementVNode("radialGradient",{id:`tgrad_${l.id}`,gradientTransform:"translate(-1, -1.000001) scale(2, 2)"},[e.createElementVNode("stop",{offset:"18%","stop-color":l.color},null,8,Ke),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.lightenHexColor)(l.color,t.value.style.chart.layout.rects.gradient.intensity/100)},null,8,Qe)],8,Je)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:ue(l),width:se(l),fill:h.value?l.color:t.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${l.id})`:l.color,rx:t.value.style.chart.layout.rects.borderRadius,stroke:S.value&&S.value.id===l.id?t.value.style.chart.layout.rects.selected.stroke:t.value.style.chart.layout.rects.stroke,"stroke-width":S.value&&S.value.id===l.id?t.value.style.chart.layout.rects.selected.strokeWidth:t.value.style.chart.layout.rects.strokeWidth,onClick:y=>$e(l),onMouseenter:()=>Ne({datapoint:l,seriesIndex:i}),onMouseleave:a[0]||(a[0]=y=>{S.value=null,p.value=!1}),style:e.normalizeStyle(`opacity:${S.value?S.value.id===l.id?1:t.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:"vue-ui-treemap-rect"},null,44,et),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:ue(l),width:se(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",ot,[t.value.style.chart.layout.labels.showDefaultLabels&&(l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||$.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${E(l)/1.5}px);text-align:left;line-height:${E(l)<14?14:E(l)}px;padding:${E(l)/3}px; color:${e.unref(r.adaptColorToBackground)(l.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${E(l)}px;`)},e.toDisplayString(l.name),5),lt,e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${E(l)}px;`)},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.layout.labels.rounding}),{datapoint:l})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"rect",e.normalizeProps(e.guardReactiveProps({rect:l,shouldShow:l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||$.value,fontSize:E(l),isZoom:$.value,textColor:e.unref(r.adaptColorToBackground)(l.color)})),void 0,!0)])],8,tt))]))),256)),e.renderSlot(o.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:O.value,isZoom:$.value,rect:S.value,config:t.value})),void 0,!0)],14,Ye)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",at,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Q)||e.unref(ee)})),void 0,!0)])):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ve.default,{key:6,config:{type:"treemap",style:{backgroundColor:t.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:x},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Oe.Legend,{key:`legend_${J.value}`,legendSet:ie.value,config:Se.value,id:`treemap_legend_${f.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>ce(l))},{item:e.withCtx(({legend:l,index:i})=>[e.createElementVNode("div",{onClick:y=>ce(l),style:e.normalizeStyle(`opacity:${m.value.includes(l.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l}))+" ",1),m.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",ut," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",rt," ("+e.toDisplayString(isNaN(l.value/L.value)?"-":(l.value/L.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,nt)]),_:1},8,["legendSet","config","id"])):e.renderSlot(o.$slots,"legend",{key:1,legend:ie.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:B,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ze._sfc_main,{show:_.value.showTooltip&&p.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:g.value,content:C.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),v.value?(e.openBlock(),e.createBlock(Le.default,{key:8,hideDetails:"",config:{open:_.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ee.DataTable,{key:`table_${Z.value}`,colNames:q.value.colNames,head:q.value.head,body:q.value.body,config:q.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>_.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,st)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Xe))}},ct=Fe._export_sfc(it,[["__scopeId","data-v-04106534"]]);exports.default=ct;
|