vue-data-ui 2.4.49 → 2.4.51
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 +12 -0
- package/dist/{Arrow-CTukks_V.cjs → Arrow-2a_SwBgz.cjs} +1 -1
- package/dist/{Arrow-Q0cOmO5p.js → Arrow-BUz63pb2.js} +1 -1
- package/dist/{BaseIcon-2ZD3jgGz.cjs → BaseIcon-BASl_NFX.cjs} +1 -1
- package/dist/{BaseIcon-CaYP30Aq.js → BaseIcon-CmiukQBl.js} +1 -1
- package/dist/{DataTable-CO5C8Cmb.js → DataTable-DGf6RrOJ.js} +2 -2
- package/dist/{DataTable-kMUhutQ4.cjs → DataTable-G3ICK-5h.cjs} +1 -1
- package/dist/{Legend-FZN9UHoI.js → Legend-BLaZxMge.js} +1 -1
- package/dist/{Legend-DPHcmrzd.cjs → Legend-BiuPlEMg.cjs} +1 -1
- package/dist/{PackageVersion-rnWHRWGI.cjs → PackageVersion-Bj34UNnQ.cjs} +1 -1
- package/dist/{PackageVersion-DYk2hOG1.js → PackageVersion-CxJghxYD.js} +1 -1
- package/dist/{PenAndPaper-BQl9-uX0.cjs → PenAndPaper-D9yQnc0e.cjs} +1 -1
- package/dist/{PenAndPaper-BfgS_5ux.js → PenAndPaper-ZdZEumki.js} +3 -3
- package/dist/{Shape-BqkMzXqo.js → Shape-DIKzzpFm.js} +1 -1
- package/dist/{Shape-BblkpCyL.cjs → Shape-yducHWd0.cjs} +1 -1
- package/dist/{Slicer-yEeqKUDF.cjs → Slicer-BHS9W4MJ.cjs} +1 -1
- package/dist/{Slicer-DlgqsI5C.js → Slicer-Cxdl3cDt.js} +2 -2
- package/dist/{Title-5Vedk01J.cjs → Title-Bk_55doC.cjs} +1 -1
- package/dist/{Title-DED-PQ7X.js → Title-aSAft5dl.js} +1 -1
- package/dist/{Tooltip-DjCKBAC4.cjs → Tooltip-G7ENx87_.cjs} +1 -1
- package/dist/{Tooltip-CHseiJu8.js → Tooltip-smutPF--.js} +1 -1
- package/dist/{index-igxqCP2w.js → index-BbPeL8Gp.js} +5 -1
- package/dist/index-DhDYBLBe.cjs +9 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +5 -1
- package/dist/types/vue-data-ui.d.ts +5 -1
- package/dist/{useNestedProp-CSVnZVwZ.js → useNestedProp-BN8claGG.js} +1 -1
- package/dist/{useNestedProp-CwpqC_aE.cjs → useNestedProp-BphUExEh.cjs} +1 -1
- package/dist/{usePrinter-DVgxBO4o.cjs → usePrinter-2_QjJFdH.cjs} +1 -1
- package/dist/{usePrinter-CnZYDQXB.js → usePrinter-DaybDVqP.js} +1 -1
- package/dist/useUserOptionState-BIvW1Kz7.js +17 -0
- package/dist/useUserOptionState-BgepsfED.cjs +1 -0
- package/dist/{vue-data-ui-BrRTkOqu.cjs → vue-data-ui-C5vsHRHD.cjs} +1 -1
- package/dist/{vue-data-ui-B--WWkUM.js → vue-data-ui-Ckbp-yIf.js} +60 -60
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/vue-ui-3d-bar-DUgumRsg.cjs +19 -0
- package/dist/{vue-ui-3d-bar-OzzLYbUl.js → vue-ui-3d-bar-wDYs3sVe.js} +345 -339
- package/dist/{vue-ui-accordion-lF7yVkiT.js → vue-ui-accordion-5d5iVpr7.js} +3 -3
- package/dist/{vue-ui-accordion-CRVWlHxs.cjs → vue-ui-accordion-B7tNzRWB.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-5Vj8AtW1.js → vue-ui-age-pyramid-BH1khaaq.js} +260 -254
- package/dist/vue-ui-age-pyramid-Dxx1mVwR.cjs +1 -0
- package/dist/{vue-ui-annotator-BmO78L3H.js → vue-ui-annotator-B9VKE_qz.js} +1 -1
- package/dist/{vue-ui-annotator-D8Hx1BFF.cjs → vue-ui-annotator-jXkB5XnD.cjs} +1 -1
- package/dist/{vue-ui-bullet-DwFD41hN.js → vue-ui-bullet-BLi9CSZw.js} +152 -146
- package/dist/vue-ui-bullet-QrXtipbT.cjs +34 -0
- package/dist/{vue-ui-candlestick-By609gwn.js → vue-ui-candlestick-Bjz1uFbv.js} +223 -217
- package/dist/vue-ui-candlestick-Da4ygGXR.cjs +2 -0
- package/dist/{vue-ui-carousel-table-wwMoteEN.js → vue-ui-carousel-table-B6zgTL-W.js} +160 -154
- package/dist/vue-ui-carousel-table-Cfif8Oiz.cjs +1 -0
- package/dist/vue-ui-chestnut-C_N7EbjQ.cjs +6 -0
- package/dist/{vue-ui-chestnut-hqorA5EW.js → vue-ui-chestnut-D5HpkuIa.js} +237 -231
- package/dist/{vue-ui-cursor-BCg5VZUb.cjs → vue-ui-cursor-A_siHYBc.cjs} +1 -1
- package/dist/{vue-ui-cursor-GSkn7N7Z.js → vue-ui-cursor-DZNIbvR2.js} +2 -2
- package/dist/{vue-ui-dashboard-Bkm9bcAc.cjs → vue-ui-dashboard-BfPJyiY9.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DIoYWyXB.js → vue-ui-dashboard-DCqe4BZg.js} +2 -2
- package/dist/{vue-ui-digits-niqTltAv.js → vue-ui-digits-BEWCnojc.js} +2 -2
- package/dist/{vue-ui-digits-CpBBTAI9.cjs → vue-ui-digits-BEhLa3jI.cjs} +1 -1
- package/dist/vue-ui-donut-By3QRfkV.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-XQp6R0e_.js → vue-ui-donut-evolution-Cu6dmlT2.js} +300 -294
- package/dist/vue-ui-donut-evolution-DEABWsj0.cjs +1 -0
- package/dist/{vue-ui-donut-DfufBrkk.js → vue-ui-donut-g5ZLhYPx.js} +376 -370
- package/dist/vue-ui-dumbbell-Dfb1l5qP.cjs +9 -0
- package/dist/{vue-ui-dumbbell-DSS8sHHU.js → vue-ui-dumbbell-bb4-Ep6o.js} +256 -250
- package/dist/vue-ui-flow-CCvTnu7z.cjs +1 -0
- package/dist/{vue-ui-flow-BBNuPVgI.js → vue-ui-flow-hD0F6mTK.js} +164 -158
- package/dist/vue-ui-funnel-DKxAPRi_.cjs +1 -0
- package/dist/{vue-ui-funnel-BDGggRXE.js → vue-ui-funnel-hcbE4yky.js} +178 -172
- package/dist/{vue-ui-galaxy-6Odi2CwM.js → vue-ui-galaxy-ByKjxVWV.js} +187 -181
- package/dist/vue-ui-galaxy-D2kmqwpI.cjs +1 -0
- package/dist/vue-ui-gauge-BFA_unjg.cjs +1 -0
- package/dist/{vue-ui-gauge-DeYvNVnR.js → vue-ui-gauge-PGirbe6O.js} +220 -214
- package/dist/{vue-ui-gizmo-DXQt_8D0.cjs → vue-ui-gizmo-CHMApil6.cjs} +1 -1
- package/dist/{vue-ui-gizmo-BcAr2dTN.js → vue-ui-gizmo-ChSfBYZ_.js} +3 -3
- package/dist/vue-ui-heatmap-C0VxwPhr.cjs +1 -0
- package/dist/{vue-ui-heatmap-Btm1mK6D.js → vue-ui-heatmap-CK3FIWpo.js} +270 -264
- package/dist/vue-ui-history-plot-BmGodgUx.cjs +1 -0
- package/dist/{vue-ui-history-plot-OY6N31Ka.js → vue-ui-history-plot-EmQ-Byiz.js} +236 -230
- package/dist/{vue-ui-kpi-CQIbWQMk.cjs → vue-ui-kpi-BdungaO2.cjs} +1 -1
- package/dist/{vue-ui-kpi-D5oNUDVm.js → vue-ui-kpi-DjC68pSz.js} +3 -3
- package/dist/{vue-ui-mini-loader-BjqV22Co.js → vue-ui-mini-loader-CzrblCCD.js} +2 -2
- package/dist/{vue-ui-mini-loader-ByDKGMAp.cjs → vue-ui-mini-loader-jwL_pZjb.cjs} +1 -1
- package/dist/{vue-ui-molecule-FsLf3YTj.js → vue-ui-molecule-DBQJQs4Y.js} +294 -289
- package/dist/vue-ui-molecule-Dzh-0SWI.cjs +1 -0
- package/dist/{vue-ui-mood-radar-31BX-GNG.js → vue-ui-mood-radar-Ca9wPZpJ.js} +205 -199
- package/dist/vue-ui-mood-radar-DV6ZZIXF.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-BMJW2oHk.js → vue-ui-nested-donuts-C8at93dN.js} +286 -280
- package/dist/vue-ui-nested-donuts-DEdS6dpj.cjs +17 -0
- package/dist/{vue-ui-onion-BUpGgnWA.js → vue-ui-onion-B-PXxNu6.js} +198 -192
- package/dist/vue-ui-onion-B2ioudP5.cjs +5 -0
- package/dist/{vue-ui-parallel-coordinate-plot-9I00rQEM.js → vue-ui-parallel-coordinate-plot-ByM3So9k.js} +236 -230
- package/dist/vue-ui-parallel-coordinate-plot-DtJi9cT0.cjs +8 -0
- package/dist/{vue-ui-quadrant-CEmoMAL7.js → vue-ui-quadrant-BqOJBcsI.js} +255 -249
- package/dist/vue-ui-quadrant-CIr4i6cC.cjs +1 -0
- package/dist/{vue-ui-quick-chart-T_oeRTqY.js → vue-ui-quick-chart-BfXxT3KM.js} +474 -466
- package/dist/vue-ui-quick-chart-Bt9KA82P.cjs +15 -0
- package/dist/{vue-ui-radar-DG_Zir8w.js → vue-ui-radar-BKpD9xDr.js} +256 -250
- package/dist/vue-ui-radar-Czmsd_uv.cjs +1 -0
- package/dist/{vue-ui-rating-Juprijdi.cjs → vue-ui-rating-BE545aI4.cjs} +1 -1
- package/dist/{vue-ui-rating-gswAA28b.js → vue-ui-rating-DQRuqev5.js} +2 -2
- package/dist/vue-ui-relation-circle-B1uMTqFP.cjs +1 -0
- package/dist/vue-ui-relation-circle-nZ2nBpWX.js +498 -0
- package/dist/vue-ui-rings-B7JzZ3ub.cjs +2 -0
- package/dist/{vue-ui-rings-D3g-ORch.js → vue-ui-rings-C1PV0873.js} +177 -172
- package/dist/vue-ui-scatter-CTI943ks.cjs +1 -0
- package/dist/{vue-ui-scatter-DBO-XViT.js → vue-ui-scatter-dgs1m3-2.js} +310 -304
- package/dist/{vue-ui-screenshot-3MDyr6v3.cjs → vue-ui-screenshot--cHV0jG3.cjs} +1 -1
- package/dist/{vue-ui-screenshot-K0a-DVD6.js → vue-ui-screenshot-Dxj0l8Jg.js} +1 -1
- package/dist/{vue-ui-skeleton-CWjNNx-k.js → vue-ui-skeleton-Bniq21d9.js} +3 -3
- package/dist/{vue-ui-skeleton-DUNkS05l.cjs → vue-ui-skeleton-lkPDknHn.cjs} +1 -1
- package/dist/{vue-ui-smiley-Cbqg-N-L.cjs → vue-ui-smiley-CozXoiti.cjs} +1 -1
- package/dist/{vue-ui-smiley-MwX1c6qK.js → vue-ui-smiley-D4DAZIpA.js} +2 -2
- package/dist/{vue-ui-spark-trend-CN5JUPhn.cjs → vue-ui-spark-trend-CSqyvI_K.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-D9eWTtbE.js → vue-ui-spark-trend-ZqrwhwqS.js} +5 -5
- package/dist/{vue-ui-sparkbar-IphZ8jXh.cjs → vue-ui-sparkbar-Bph8KIjk.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CPF7YNDd.js → vue-ui-sparkbar-q0G4GvFm.js} +4 -4
- package/dist/{vue-ui-sparkgauge-B29V7ZTv.js → vue-ui-sparkgauge-DA_h9jcN.js} +4 -4
- package/dist/{vue-ui-sparkgauge-BRMGqR9Z.cjs → vue-ui-sparkgauge-nSAW83dN.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-BJTgOWF5.js → vue-ui-sparkhistogram-B1WyBiq_.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-rvYaVHmw.cjs → vue-ui-sparkhistogram-BLYhRNpt.cjs} +1 -1
- package/dist/{vue-ui-sparkline-BI9jqI0h.cjs → vue-ui-sparkline-PNix1-R9.cjs} +1 -1
- package/dist/{vue-ui-sparkline-DX79otAB.js → vue-ui-sparkline-ccfl0s3m.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-DuollcwK.cjs → vue-ui-sparkstackbar-DpuvEumy.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-vP28A6AT.js → vue-ui-sparkstackbar-PNKwVRu8.js} +5 -5
- package/dist/{vue-ui-stackbar-DnJEgIaA.js → vue-ui-stackbar-BBYnF8qm.js} +367 -361
- package/dist/vue-ui-stackbar-D4AIFoQT.cjs +6 -0
- package/dist/vue-ui-strip-plot-ClNxSw9M.cjs +1 -0
- package/dist/{vue-ui-strip-plot-DqcHBwd_.js → vue-ui-strip-plot-TVlnzXFq.js} +269 -263
- package/dist/{vue-ui-table-BMJ0I5nr.cjs → vue-ui-table-CHdv3KuM.cjs} +1 -1
- package/dist/{vue-ui-table-D8cgqIJl.js → vue-ui-table-CsEajH9S.js} +1 -1
- package/dist/vue-ui-table-heatmap-BE3UT8U9.cjs +1 -0
- package/dist/vue-ui-table-heatmap-CubRipoB.js +262 -0
- package/dist/vue-ui-table-sparkline-BeYviUrb.cjs +1 -0
- package/dist/{vue-ui-table-sparkline-B_Po0RuC.js → vue-ui-table-sparkline-YV8DUOqh.js} +256 -239
- package/dist/vue-ui-thermometer-C6lMWRiF.cjs +1 -0
- package/dist/{vue-ui-thermometer-C6nfW6uY.js → vue-ui-thermometer-DmMjSLc1.js} +170 -164
- package/dist/{vue-ui-timer-ldINTqND.cjs → vue-ui-timer-DteYgv9y.cjs} +1 -1
- package/dist/{vue-ui-timer-CfwmMRdZ.js → vue-ui-timer-DvE_nqd9.js} +5 -5
- package/dist/vue-ui-tiremarks-CCrkDgjX.js +323 -0
- package/dist/vue-ui-tiremarks-PGGgsNgS.cjs +1 -0
- package/dist/vue-ui-treemap-BzRVKqXL.cjs +1 -0
- package/dist/{vue-ui-treemap-CwMnkcOi.js → vue-ui-treemap-C4A4spvg.js} +243 -237
- package/dist/{vue-ui-vertical-bar-BZR4YOLh.js → vue-ui-vertical-bar-8iL1xiaz.js} +238 -232
- package/dist/vue-ui-vertical-bar-B60lSXNq.cjs +4 -0
- package/dist/{vue-ui-waffle-D2BccJmB.js → vue-ui-waffle-CaYNz-Kd.js} +316 -310
- package/dist/vue-ui-waffle-O8pAEf4X.cjs +1 -0
- package/dist/vue-ui-wheel-BRR2rGou.js +305 -0
- package/dist/vue-ui-wheel-CnFdB_B1.cjs +1 -0
- package/dist/vue-ui-word-cloud-X4mp280j.cjs +1 -0
- package/dist/{vue-ui-word-cloud-DiG8DHOr.js → vue-ui-word-cloud-y2GGxwoq.js} +246 -240
- package/dist/{vue-ui-xy-DicLnkBA.js → vue-ui-xy-CXoWP8bh.js} +708 -697
- package/dist/vue-ui-xy-CbM75yXK.cjs +3 -0
- package/dist/{vue-ui-xy-canvas-D6CYL9A8.js → vue-ui-xy-canvas-D7MrUJj7.js} +334 -328
- package/dist/vue-ui-xy-canvas-DWvIvSry.cjs +9 -0
- package/package.json +1 -1
- package/dist/index-BHQZE19X.cjs +0 -9
- package/dist/vue-ui-3d-bar-BGVLnjCh.cjs +0 -19
- package/dist/vue-ui-age-pyramid-Cv0Rddsx.cjs +0 -1
- package/dist/vue-ui-bullet-C0Q2Vs5p.cjs +0 -34
- package/dist/vue-ui-candlestick-C7kRHFF3.cjs +0 -2
- package/dist/vue-ui-carousel-table-1_Hy8sGL.cjs +0 -1
- package/dist/vue-ui-chestnut-D3LGylRp.cjs +0 -6
- package/dist/vue-ui-donut-CQEOtlxM.cjs +0 -1
- package/dist/vue-ui-donut-evolution-Dg_XJyX8.cjs +0 -1
- package/dist/vue-ui-dumbbell-RAkNYRoJ.cjs +0 -9
- package/dist/vue-ui-flow-BUmSGSmR.cjs +0 -1
- package/dist/vue-ui-funnel-B9HR0owO.cjs +0 -1
- package/dist/vue-ui-galaxy-DmsMWB1a.cjs +0 -1
- package/dist/vue-ui-gauge-Dvv0v56Z.cjs +0 -1
- package/dist/vue-ui-heatmap-DZ02dS5q.cjs +0 -1
- package/dist/vue-ui-history-plot-DPQWcN0P.cjs +0 -1
- package/dist/vue-ui-molecule-C8O_ViVy.cjs +0 -1
- package/dist/vue-ui-mood-radar-4u98wGWl.cjs +0 -1
- package/dist/vue-ui-nested-donuts-BPc_OBoe.cjs +0 -17
- package/dist/vue-ui-onion-IhkIHn1A.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-DzjggyLA.cjs +0 -8
- package/dist/vue-ui-quadrant-EZqQ-7Ev.cjs +0 -1
- package/dist/vue-ui-quick-chart-BKUUR-A1.cjs +0 -15
- package/dist/vue-ui-radar-QBwo6ybW.cjs +0 -1
- package/dist/vue-ui-relation-circle-BWX8zrfH.cjs +0 -1
- package/dist/vue-ui-relation-circle-DtnXrnOP.js +0 -492
- package/dist/vue-ui-rings-Damuv7g9.cjs +0 -2
- package/dist/vue-ui-scatter-RUeAe7Sx.cjs +0 -1
- package/dist/vue-ui-stackbar-BumFmZZF.cjs +0 -6
- package/dist/vue-ui-strip-plot-DupREfRd.cjs +0 -1
- package/dist/vue-ui-table-heatmap-D43pTFli.cjs +0 -1
- package/dist/vue-ui-table-heatmap-D4qeClXn.js +0 -256
- package/dist/vue-ui-table-sparkline-B7OPOium.cjs +0 -1
- package/dist/vue-ui-thermometer-CaV3JF3h.cjs +0 -1
- package/dist/vue-ui-tiremarks-BlyxL_IU.cjs +0 -1
- package/dist/vue-ui-tiremarks-iNKMnu3P.js +0 -317
- package/dist/vue-ui-treemap-YdRDlSHA.cjs +0 -1
- package/dist/vue-ui-vertical-bar-Bji3-X8i.cjs +0 -4
- package/dist/vue-ui-waffle-rO_LJaHR.cjs +0 -1
- package/dist/vue-ui-wheel-BTrpdV-C.cjs +0 -1
- package/dist/vue-ui-wheel-GqWFopE1.js +0 -299
- package/dist/vue-ui-word-cloud-DD-pKUen.cjs +0 -1
- package/dist/vue-ui-xy-C32KNdyx.cjs +0 -3
- package/dist/vue-ui-xy-canvas-9e630nJX.cjs +0 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-BphUExEh.cjs"),g=require("./index-DhDYBLBe.cjs"),$=require("./useResponsive-BJ7DTGpm.cjs"),B=require("./BaseIcon-BASl_NFX.cjs"),j=require("./Title-Bk_55doC.cjs"),q=require("./PackageVersion-Bj34UNnQ.cjs"),O=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");class U{constructor(T,v,y,E=!0,b=!0){this.interval=v,this.elapsed=0,this.isPaused=!1;const S=`
|
|
2
2
|
let interval;
|
|
3
3
|
let elapsed = 0;
|
|
4
4
|
let paused = false;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ref as n, onMounted as Q, onBeforeUnmount as Y, computed as 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 O, normalizeProps as U, guardReactiveProps as E, toDisplayString as ae } from "vue";
|
|
2
|
-
import { u as se } from "./useNestedProp-
|
|
3
|
-
import { u as le, c as oe, X as re, F as W } from "./index-
|
|
2
|
+
import { u as se } from "./useNestedProp-BN8claGG.js";
|
|
3
|
+
import { u as le, c as oe, X as re, F as W } from "./index-BbPeL8Gp.js";
|
|
4
4
|
import { t as ue, u as ie } from "./useResponsive-CoxXLe23.js";
|
|
5
|
-
import P from "./BaseIcon-
|
|
6
|
-
import { _ as ne } from "./Title-
|
|
7
|
-
import { _ as ce } from "./PackageVersion-
|
|
5
|
+
import P from "./BaseIcon-CmiukQBl.js";
|
|
6
|
+
import { _ as ne } from "./Title-aSAft5dl.js";
|
|
7
|
+
import { _ as ce } from "./PackageVersion-CxJghxYD.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,323 @@
|
|
|
1
|
+
import { computed as h, ref as f, watch as W, onMounted as ce, openBlock as s, createElementBlock as c, normalizeClass as T, normalizeStyle as U, unref as n, createBlock as I, createCommentVNode as y, createSlots as ve, withCtx as F, renderSlot as b, normalizeProps as G, guardReactiveProps as L, createVNode as he, Fragment as Z, renderList as ee, toDisplayString as de } from "vue";
|
|
2
|
+
import { u as te } from "./useNestedProp-BN8claGG.js";
|
|
3
|
+
import { u as pe, c as fe, t as ye, v as me, o as ge, e as ke, w as ae, X as be, i as _e, f as Ce } from "./index-BbPeL8Gp.js";
|
|
4
|
+
import { _ as $e } from "./Title-aSAft5dl.js";
|
|
5
|
+
import { u as we, U as xe } from "./usePrinter-DaybDVqP.js";
|
|
6
|
+
import Pe from "./vue-ui-skeleton-Bniq21d9.js";
|
|
7
|
+
import { _ as Ae } from "./PackageVersion-CxJghxYD.js";
|
|
8
|
+
import { P as Oe } from "./PenAndPaper-ZdZEumki.js";
|
|
9
|
+
import { u as Ie } from "./useUserOptionState-BIvW1Kz7.js";
|
|
10
|
+
import { _ as Fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
|
+
const ze = ["id"], Se = {
|
|
12
|
+
key: 2,
|
|
13
|
+
style: "width:100%;background:transparent;padding-bottom:12px"
|
|
14
|
+
}, Ne = ["xmlns", "viewBox"], Me = { key: 0 }, Te = ["d", "stroke-width", "stroke"], Ue = { key: 1 }, Ge = ["x1", "y1", "x2", "y2", "stroke-width", "stroke"], Le = ["x", "y", "font-size", "fill", "font-weight", "text-anchor"], je = {
|
|
15
|
+
key: 5,
|
|
16
|
+
class: "vue-data-ui-watermark"
|
|
17
|
+
}, Be = {
|
|
18
|
+
key: 6,
|
|
19
|
+
ref: "source",
|
|
20
|
+
dir: "auto"
|
|
21
|
+
}, Ee = {
|
|
22
|
+
__name: "vue-ui-tiremarks",
|
|
23
|
+
props: {
|
|
24
|
+
config: {
|
|
25
|
+
type: Object,
|
|
26
|
+
default() {
|
|
27
|
+
return {};
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
dataset: {
|
|
31
|
+
type: Object,
|
|
32
|
+
default() {
|
|
33
|
+
return {};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
setup(le, { expose: oe }) {
|
|
38
|
+
const d = le, { vue_ui_tiremarks: se } = pe(), z = h(() => !!d.dataset && Object.keys(d.dataset).length), S = f(fe()), N = f(null), re = f(null), j = f(0), B = f(0), e = h({
|
|
39
|
+
get: () => H(),
|
|
40
|
+
set: (t) => t
|
|
41
|
+
}), { userOptionsVisible: E, setUserOptionsVisibility: X, keepUserOptionState: D } = Ie({ config: e.value });
|
|
42
|
+
function H() {
|
|
43
|
+
const t = te({
|
|
44
|
+
userConfig: d.config,
|
|
45
|
+
defaultConfig: se
|
|
46
|
+
});
|
|
47
|
+
return t.theme ? {
|
|
48
|
+
...te({
|
|
49
|
+
userConfig: ye.vue_ui_tiremarks[t.theme] || d.config,
|
|
50
|
+
defaultConfig: t
|
|
51
|
+
})
|
|
52
|
+
} : t;
|
|
53
|
+
}
|
|
54
|
+
W(() => d.config, (t) => {
|
|
55
|
+
e.value = H(), K(), B.value += 1;
|
|
56
|
+
}, { deep: !0 });
|
|
57
|
+
const { isPrinting: R, isImaging: V, generatePdf: Y, generateImage: q } = we({
|
|
58
|
+
elementId: S.value,
|
|
59
|
+
fileName: e.value.style.chart.title.text || "vue-ui-tiremarks"
|
|
60
|
+
}), ne = h(() => e.value.userOptions.show && !e.value.style.chart.title.text), u = f(e.value.style.chart.animation.use ? 0 : me(d.dataset.percentage));
|
|
61
|
+
W(() => d.dataset, (t) => {
|
|
62
|
+
e.value.style.chart.animation.use ? J(t.percentage) : u.value = t.percentage || 0;
|
|
63
|
+
}, { deep: !0 }), ce(() => {
|
|
64
|
+
K();
|
|
65
|
+
});
|
|
66
|
+
function J(t) {
|
|
67
|
+
let r = e.value.style.chart.animation.speed;
|
|
68
|
+
const a = Math.abs(t - u.value) / (r * 120);
|
|
69
|
+
function o() {
|
|
70
|
+
u.value < t ? u.value = Math.min(u.value + a, t) : u.value > t && (u.value = Math.max(u.value - a, t)), u.value !== t && requestAnimationFrame(o);
|
|
71
|
+
}
|
|
72
|
+
o();
|
|
73
|
+
}
|
|
74
|
+
function K() {
|
|
75
|
+
ge(d.dataset) && ke({
|
|
76
|
+
componentName: "VueUiTiremarks",
|
|
77
|
+
type: "dataset"
|
|
78
|
+
}), J(d.dataset.percentage || 0);
|
|
79
|
+
}
|
|
80
|
+
const _ = h(() => e.value.style.chart.layout.display === "vertical"), i = h(() => {
|
|
81
|
+
const t = {
|
|
82
|
+
top: 48,
|
|
83
|
+
left: 64,
|
|
84
|
+
right: 64,
|
|
85
|
+
bottom: 48
|
|
86
|
+
};
|
|
87
|
+
return _.value ? {
|
|
88
|
+
top: e.value.style.chart.percentage.verticalPosition === "top" ? t.top : 3,
|
|
89
|
+
left: 3,
|
|
90
|
+
right: 3,
|
|
91
|
+
bottom: e.value.style.chart.percentage.verticalPosition === "bottom" ? t.bottom : 3
|
|
92
|
+
} : {
|
|
93
|
+
top: 0,
|
|
94
|
+
bottom: 0,
|
|
95
|
+
left: e.value.style.chart.percentage.horizontalPosition === "left" ? t.left : 3,
|
|
96
|
+
right: e.value.style.chart.percentage.horizontalPosition === "right" ? t.right : 10
|
|
97
|
+
};
|
|
98
|
+
}), P = h(() => Object.values(i.value).reduce((t, r) => t + r, 0)), l = h(() => ({
|
|
99
|
+
height: _.value ? 312 : 56,
|
|
100
|
+
width: _.value ? 56 : 312
|
|
101
|
+
})), ue = f(100);
|
|
102
|
+
h(() => d.dataset.percentage / ue.value);
|
|
103
|
+
const v = h(() => _.value ? {
|
|
104
|
+
mark: (l.value.height - P.value) / 100 * 0.5,
|
|
105
|
+
space: (l.value.height - P.value) / 100 * 0.5
|
|
106
|
+
} : {
|
|
107
|
+
mark: (l.value.width - P.value) / 100 * 0.5,
|
|
108
|
+
space: (l.value.width - P.value) / 100 * 0.5
|
|
109
|
+
}), Q = h(() => {
|
|
110
|
+
const t = [];
|
|
111
|
+
for (let a = 0; a < 100; a += 1) {
|
|
112
|
+
const o = e.value.style.chart.layout.ticks.gradient.show ? ae(e.value.style.chart.layout.activeColor, a / 100 * (e.value.style.chart.layout.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.layout.activeColor;
|
|
113
|
+
if (_.value) {
|
|
114
|
+
const $ = e.value.style.chart.layout.crescendo ? (100 - a) * (l.value.width - i.value.left - i.value.right) / 100 / 3 : 0, p = i.value.left + 4 + $, m = l.value.width - i.value.right - 4 - $, g = l.value.height - i.value.bottom - a * v.value.mark - a * v.value.space - v.value.mark, k = l.value.height - i.value.bottom - a * v.value.mark - a * v.value.space - v.value.mark, w = (m - p) / e.value.style.chart.layout.curveAngleX, x = e.value.style.chart.layout.curveAngleY * ((1 + a) / 100);
|
|
115
|
+
t.push({
|
|
116
|
+
x1: p,
|
|
117
|
+
x2: m,
|
|
118
|
+
y1: g,
|
|
119
|
+
y2: k,
|
|
120
|
+
curve: `M ${p} ${g} C ${p + w} ${g - x}, ${m - w} ${k - x}, ${m} ${k}`,
|
|
121
|
+
color: o
|
|
122
|
+
});
|
|
123
|
+
} else {
|
|
124
|
+
const $ = e.value.style.chart.layout.crescendo ? (100 - a) * (l.value.height - i.value.top - i.value.bottom) / 100 / 3 : 0, p = i.value.left + a * v.value.mark + a * v.value.space - v.value.mark, m = p, g = i.value.top + 4 + $, k = l.value.height - i.value.bottom - 4 - $, w = e.value.style.chart.layout.curveAngleY * ((1 + a) / 100), x = (k - g) / e.value.style.chart.layout.curveAngleX;
|
|
125
|
+
t.push({
|
|
126
|
+
x1: p,
|
|
127
|
+
x2: m,
|
|
128
|
+
y1: g,
|
|
129
|
+
y2: k,
|
|
130
|
+
curve: `M ${p} ${g} C ${p + w} ${g + x}, ${m + w} ${k - x}, ${m} ${k}`,
|
|
131
|
+
color: o
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return t;
|
|
136
|
+
}), C = h(() => {
|
|
137
|
+
let t, r, a;
|
|
138
|
+
const o = e.value.style.chart.percentage.fontSize / 3;
|
|
139
|
+
return _.value ? e.value.style.chart.percentage.verticalPosition === "top" ? (t = l.value.width / 2, r = i.value.top / 2, a = "middle") : e.value.style.chart.percentage.verticalPosition === "bottom" && (t = l.value.width / 2, r = l.value.height - i.value.bottom / 2 + o, a = "middle") : e.value.style.chart.percentage.horizontalPosition === "left" ? (t = 4, r = l.value.height / 2 + o, a = "start") : e.value.style.chart.percentage.horizontalPosition === "right" && (t = l.value.width - i.value.right + 8, r = l.value.height / 2 + o, a = "start"), {
|
|
140
|
+
x: t,
|
|
141
|
+
y: r,
|
|
142
|
+
textAnchor: a,
|
|
143
|
+
bold: e.value.style.chart.percentage.bold,
|
|
144
|
+
fontSize: e.value.style.chart.percentage.fontSize,
|
|
145
|
+
fill: e.value.style.chart.percentage.color
|
|
146
|
+
};
|
|
147
|
+
}), A = f(!1);
|
|
148
|
+
function ie(t) {
|
|
149
|
+
A.value = t, j.value += 1;
|
|
150
|
+
}
|
|
151
|
+
const O = f(!1);
|
|
152
|
+
function M() {
|
|
153
|
+
O.value = !O.value;
|
|
154
|
+
}
|
|
155
|
+
return oe({
|
|
156
|
+
generatePdf: Y,
|
|
157
|
+
generateImage: q,
|
|
158
|
+
toggleAnnotator: M
|
|
159
|
+
}), (t, r) => (s(), c("div", {
|
|
160
|
+
ref_key: "tiremarksChart",
|
|
161
|
+
ref: N,
|
|
162
|
+
class: T(`vue-ui-tiremarks ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
163
|
+
style: U(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
|
|
164
|
+
id: S.value,
|
|
165
|
+
onMouseenter: r[0] || (r[0] = () => n(X)(!0)),
|
|
166
|
+
onMouseleave: r[1] || (r[1] = () => n(X)(!1))
|
|
167
|
+
}, [
|
|
168
|
+
e.value.userOptions.buttons.annotator ? (s(), I(Oe, {
|
|
169
|
+
key: 0,
|
|
170
|
+
parent: N.value,
|
|
171
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
172
|
+
color: e.value.style.chart.color,
|
|
173
|
+
active: O.value,
|
|
174
|
+
onClose: M
|
|
175
|
+
}, null, 8, ["parent", "backgroundColor", "color", "active"])) : y("", !0),
|
|
176
|
+
ne.value ? (s(), c("div", {
|
|
177
|
+
key: 1,
|
|
178
|
+
ref_key: "noTitle",
|
|
179
|
+
ref: re,
|
|
180
|
+
class: "vue-data-ui-no-title-space",
|
|
181
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
182
|
+
}, null, 512)) : y("", !0),
|
|
183
|
+
e.value.style.chart.title.text ? (s(), c("div", Se, [
|
|
184
|
+
(s(), I($e, {
|
|
185
|
+
key: `title_${B.value}`,
|
|
186
|
+
config: {
|
|
187
|
+
title: {
|
|
188
|
+
cy: "wheel-title",
|
|
189
|
+
...e.value.style.chart.title
|
|
190
|
+
},
|
|
191
|
+
subtitle: {
|
|
192
|
+
cy: "wheel-subtitle",
|
|
193
|
+
...e.value.style.chart.title.subtitle
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}, null, 8, ["config"]))
|
|
197
|
+
])) : y("", !0),
|
|
198
|
+
e.value.userOptions.show && z.value && (n(D) || n(E)) ? (s(), I(xe, {
|
|
199
|
+
ref: "details",
|
|
200
|
+
key: `user_options_${j.value}`,
|
|
201
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
202
|
+
color: e.value.style.chart.color,
|
|
203
|
+
isPrinting: n(R),
|
|
204
|
+
isImaging: n(V),
|
|
205
|
+
uid: S.value,
|
|
206
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
207
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
208
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
209
|
+
hasXls: !1,
|
|
210
|
+
isFullscreen: A.value,
|
|
211
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
212
|
+
chartElement: N.value,
|
|
213
|
+
position: e.value.userOptions.position,
|
|
214
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
215
|
+
isAnnotation: O.value,
|
|
216
|
+
onToggleFullscreen: ie,
|
|
217
|
+
onGeneratePdf: n(Y),
|
|
218
|
+
onGenerateImage: n(q),
|
|
219
|
+
onToggleAnnotator: M,
|
|
220
|
+
style: U({
|
|
221
|
+
visibility: n(D) ? n(E) ? "visible" : "hidden" : "visible"
|
|
222
|
+
})
|
|
223
|
+
}, ve({ _: 2 }, [
|
|
224
|
+
t.$slots.optionPdf ? {
|
|
225
|
+
name: "optionPdf",
|
|
226
|
+
fn: F(() => [
|
|
227
|
+
b(t.$slots, "optionPdf", {}, void 0, !0)
|
|
228
|
+
]),
|
|
229
|
+
key: "0"
|
|
230
|
+
} : void 0,
|
|
231
|
+
t.$slots.optionImg ? {
|
|
232
|
+
name: "optionImg",
|
|
233
|
+
fn: F(() => [
|
|
234
|
+
b(t.$slots, "optionImg", {}, void 0, !0)
|
|
235
|
+
]),
|
|
236
|
+
key: "1"
|
|
237
|
+
} : void 0,
|
|
238
|
+
t.$slots.optionFullscreen ? {
|
|
239
|
+
name: "optionFullscreen",
|
|
240
|
+
fn: F(({ toggleFullscreen: a, isFullscreen: o }) => [
|
|
241
|
+
b(t.$slots, "optionFullscreen", G(L({ toggleFullscreen: a, isFullscreen: o })), void 0, !0)
|
|
242
|
+
]),
|
|
243
|
+
key: "2"
|
|
244
|
+
} : void 0,
|
|
245
|
+
t.$slots.optionAnnotator ? {
|
|
246
|
+
name: "optionAnnotator",
|
|
247
|
+
fn: F(({ toggleAnnotator: a, isAnnotator: o }) => [
|
|
248
|
+
b(t.$slots, "optionAnnotator", G(L({ toggleAnnotator: a, isAnnotator: o })), void 0, !0)
|
|
249
|
+
]),
|
|
250
|
+
key: "3"
|
|
251
|
+
} : void 0
|
|
252
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : y("", !0),
|
|
253
|
+
z.value ? (s(), c("svg", {
|
|
254
|
+
key: 4,
|
|
255
|
+
xmlns: n(be),
|
|
256
|
+
class: T({ "vue-data-ui-fullscreen--on": A.value, "vue-data-ui-fulscreen--off": !A.value }),
|
|
257
|
+
viewBox: `0 0 ${l.value.width} ${l.value.height}`,
|
|
258
|
+
style: U(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color}`)
|
|
259
|
+
}, [
|
|
260
|
+
he(Ae),
|
|
261
|
+
e.value.style.chart.layout.curved ? (s(), c("g", Me, [
|
|
262
|
+
(s(!0), c(Z, null, ee(Q.value, (a, o) => (s(), c("path", {
|
|
263
|
+
d: a.curve,
|
|
264
|
+
"stroke-width": v.value.mark,
|
|
265
|
+
stroke: u.value >= o ? a.color : e.value.style.chart.layout.inactiveColor,
|
|
266
|
+
"stroke-linecap": "round",
|
|
267
|
+
fill: "none",
|
|
268
|
+
class: T({ "vue-ui-tick-animated": e.value.style.chart.animation.use && o <= u.value })
|
|
269
|
+
}, null, 10, Te))), 256))
|
|
270
|
+
])) : (s(), c("g", Ue, [
|
|
271
|
+
(s(!0), c(Z, null, ee(Q.value, (a, o) => (s(), c("line", {
|
|
272
|
+
x1: a.x1,
|
|
273
|
+
y1: a.y1,
|
|
274
|
+
x2: a.x2,
|
|
275
|
+
y2: a.y2,
|
|
276
|
+
"stroke-width": v.value.mark,
|
|
277
|
+
stroke: u.value >= o ? a.color : e.value.style.chart.layout.inactiveColor,
|
|
278
|
+
"stroke-linecap": "round"
|
|
279
|
+
}, null, 8, Ge))), 256))
|
|
280
|
+
])),
|
|
281
|
+
e.value.style.chart.percentage.show ? (s(), c("text", {
|
|
282
|
+
key: 2,
|
|
283
|
+
x: C.value.x,
|
|
284
|
+
y: C.value.y,
|
|
285
|
+
"font-size": C.value.fontSize,
|
|
286
|
+
fill: e.value.style.chart.layout.ticks.gradient.show && e.value.style.chart.percentage.useGradientColor ? n(ae)(e.value.style.chart.layout.activeColor, u.value / 100 * (e.value.style.chart.layout.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.percentage.color,
|
|
287
|
+
"font-weight": C.value.bold ? "bold" : "normal",
|
|
288
|
+
"text-anchor": C.value.textAnchor
|
|
289
|
+
}, de(n(_e)(
|
|
290
|
+
e.value.style.chart.percentage.formatter,
|
|
291
|
+
u.value,
|
|
292
|
+
n(Ce)({
|
|
293
|
+
v: u.value,
|
|
294
|
+
s: "%",
|
|
295
|
+
r: e.value.style.chart.percentage.rounding
|
|
296
|
+
})
|
|
297
|
+
)), 9, Le)) : y("", !0),
|
|
298
|
+
b(t.$slots, "svg", { svg: l.value }, void 0, !0)
|
|
299
|
+
], 14, Ne)) : y("", !0),
|
|
300
|
+
t.$slots.watermark ? (s(), c("div", je, [
|
|
301
|
+
b(t.$slots, "watermark", G(L({ isPrinting: n(R) || n(V) })), void 0, !0)
|
|
302
|
+
])) : y("", !0),
|
|
303
|
+
t.$slots.source ? (s(), c("div", Be, [
|
|
304
|
+
b(t.$slots, "source", {}, void 0, !0)
|
|
305
|
+
], 512)) : y("", !0),
|
|
306
|
+
z.value ? y("", !0) : (s(), I(Pe, {
|
|
307
|
+
key: 7,
|
|
308
|
+
config: {
|
|
309
|
+
type: "tiremarks",
|
|
310
|
+
style: {
|
|
311
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
312
|
+
tiremarks: {
|
|
313
|
+
color: "#CCCCCC"
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}, null, 8, ["config"]))
|
|
318
|
+
], 46, ze));
|
|
319
|
+
}
|
|
320
|
+
}, We = /* @__PURE__ */ Fe(Ee, [["__scopeId", "data-v-d5780415"]]);
|
|
321
|
+
export {
|
|
322
|
+
We as default
|
|
323
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-BphUExEh.cjs"),c=require("./index-DhDYBLBe.cjs"),K=require("./Title-Bk_55doC.cjs"),G=require("./usePrinter-2_QjJFdH.cjs"),Q=require("./vue-ui-skeleton-lkPDknHn.cjs"),W=require("./PackageVersion-Bj34UNnQ.cjs"),Z=require("./PenAndPaper-D9yQnc0e.cjs"),ee=require("./useUserOptionState-BgepsfED.cjs"),te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],oe={key:2,style:"width:100%;background:transparent;padding-bottom:12px"},le=["xmlns","viewBox"],re={key:0},ne=["d","stroke-width","stroke"],se={key:1},ue=["x1","y1","x2","y2","stroke-width","stroke"],ie=["x","y","font-size","fill","font-weight","text-anchor"],ce={key:5,class:"vue-data-ui-watermark"},ve={key:6,ref:"source",dir:"auto"},de={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(j,{expose:H}){const v=j,{vue_ui_tiremarks:D}=c.useConfig(),P=e.computed(()=>!!v.dataset&&Object.keys(v.dataset).length),$=e.ref(c.createUid()),B=e.ref(null),R=e.ref(null),S=e.ref(0),O=e.ref(0),t=e.computed({get:()=>I(),set:a=>a}),{userOptionsVisible:A,setUserOptionsVisibility:z,keepUserOptionState:N}=ee.useUserOptionState({config:t.value});function I(){const a=L.useNestedProp({userConfig:v.config,defaultConfig:D});return a.theme?{...L.useNestedProp({userConfig:c.themes.vue_ui_tiremarks[a.theme]||v.config,defaultConfig:a})}:a}e.watch(()=>v.config,a=>{t.value=I(),M(),O.value+=1},{deep:!0});const{isPrinting:F,isImaging:E,generatePdf:V,generateImage:q}=G.usePrinter({elementId:$.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks"}),X=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),s=e.ref(t.value.style.chart.animation.use?0:c.checkNaN(v.dataset.percentage));e.watch(()=>v.dataset,a=>{t.value.style.chart.animation.use?T(a.percentage):s.value=a.percentage||0},{deep:!0}),e.onMounted(()=>{M()});function T(a){let n=t.value.style.chart.animation.speed;const o=Math.abs(a-s.value)/(n*120);function r(){s.value<a?s.value=Math.min(s.value+o,a):s.value>a&&(s.value=Math.max(s.value-o,a)),s.value!==a&&requestAnimationFrame(r)}r()}function M(){c.objectIsEmpty(v.dataset)&&c.error({componentName:"VueUiTiremarks",type:"dataset"}),T(v.dataset.percentage||0)}const f=e.computed(()=>t.value.style.chart.layout.display==="vertical"),u=e.computed(()=>{const 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}}),C=e.computed(()=>Object.values(u.value).reduce((a,n)=>a+n,0)),l=e.computed(()=>({height:f.value?312:56,width:f.value?56:312})),Y=e.ref(100);e.computed(()=>v.dataset.percentage/Y.value);const i=e.computed(()=>f.value?{mark:(l.value.height-C.value)/100*.5,space:(l.value.height-C.value)/100*.5}:{mark:(l.value.width-C.value)/100*.5,space:(l.value.width-C.value)/100*.5}),U=e.computed(()=>{const 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-u.value.left-u.value.right)/100/3:0,d=u.value.left+4+y,h=l.value.width-u.value.right-4-y,p=l.value.height-u.value.bottom-o*i.value.mark-o*i.value.space-i.value.mark,m=l.value.height-u.value.bottom-o*i.value.mark-o*i.value.space-i.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,b=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-b}, ${h-k} ${m-b}, ${h} ${m}`,color:r})}else{const y=t.value.style.chart.layout.crescendo?(100-o)*(l.value.height-u.value.top-u.value.bottom)/100/3:0,d=u.value.left+o*i.value.mark+o*i.value.space-i.value.mark,h=d,p=u.value.top+4+y,m=l.value.height-u.value.bottom-4-y,k=t.value.style.chart.layout.curveAngleY*((1+o)/100),b=(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+b}, ${h+k} ${m-b}, ${h} ${m}`,color:r})}}return a}),g=e.computed(()=>{let a,n,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,n=u.value.top/2,o="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(a=l.value.width/2,n=l.value.height-u.value.bottom/2+r,o="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(a=4,n=l.value.height/2+r,o="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(a=l.value.width-u.value.right+8,n=l.value.height/2+r,o="start"),{x:a,y:n,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 J(a){_.value=a,S.value+=1}const w=e.ref(!1);function x(){w.value=!w.value}return H({generatePdf:V,generateImage:q,toggleAnnotator:x}),(a,n)=>(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,onMouseenter:n[0]||(n[0]=()=>e.unref(z)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(z)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Z.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),X.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:R,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",oe,[(e.openBlock(),e.createBlock(K._sfc_main,{key:`title_${O.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.unref(N)||e.unref(A))?(e.openBlock(),e.createBlock(G.UserOptions,{ref:"details",key:`user_options_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(E),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:J,onGeneratePdf:e.unref(V),onGenerateImage:e.unref(q),onToggleAnnotator:x,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(A)?"visible":"hidden":"visible"})},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","style"])):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(W._sfc_main),t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,r)=>(e.openBlock(),e.createElementBlock("path",{d:o.curve,"stroke-width":i.value.mark,stroke:s.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<=s.value})},null,10,ne))),256))])):(e.openBlock(),e.createElementBlock("g",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.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:s.value>=r?o.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,ue))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key: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,s.value/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.percentage.color,"font-weight":g.value.bold?"bold":"normal","text-anchor":g.value.textAnchor},e.toDisplayString(e.unref(c.applyDataLabel)(t.value.style.chart.percentage.formatter,s.value,e.unref(c.dataLabel)({v:s.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,ie)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:l.value},void 0,!0)],14,le)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ce,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(E)})),void 0,!0)])):e.createCommentVNode("",!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",ve,[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),P.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Q.default,{key:7,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ae))}},he=te._export_sfc(de,[["__scopeId","data-v-d5780415"]]);exports.default=he;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DhDYBLBe.cjs"),Ve=require("./Title-Bk_55doC.cjs"),me=require("./usePrinter-2_QjJFdH.cjs"),Ee=require("./Tooltip-G7ENx87_.cjs"),Le=require("./Legend-BiuPlEMg.cjs"),Re=require("./vue-ui-skeleton-lkPDknHn.cjs"),Ae=require("./DataTable-G3ICK-5h.cjs"),Fe=require("./vue-ui-accordion-B7tNzRWB.cjs"),ye=require("./useResponsive-BJ7DTGpm.cjs"),be=require("./useNestedProp-BphUExEh.cjs"),Ie=require("./PackageVersion-Bj34UNnQ.cjs"),De=require("./PenAndPaper-D9yQnc0e.cjs"),qe=require("./useUserOptionState-BgepsfED.cjs"),Me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function ke(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 Ce(n){const{xOffset:d,yOffset:s,width:u,height:c}=n;return{x0:d,y0:s,x1:d+u,y1:s+c}}function He(n,d,s){if(n.length===0)return!0;{const u=n.concat(d),c=ke(n,s),v=ke(u,s);return c>=v}}function Ue(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 We(n,d){const s={...d,children:n};return xe(s)}function Ge(n){return(n.x1-n.x0)*(n.y1-n.y0)}function we(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 je(n){const d=X(n),s=d.width,u=d.height;return Math.min(s,u)}function Xe(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 Ye(n,d,s,u){let c=n,v=d,h=s,f=u;for(;;){const p=c.length;if(p===0){const m=we(v,h);return f.concat(m)}const C=je(h),b=c[0],w=c.slice(1,p);if(He(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=Ze(h,g),x=we(v,h),B=f.concat(x);c=c,v=[],h=k,f=B}}}function xe(n){if(typeof n.children>"u"||!n.children.length)return[n];{const d=Xe(n.children,Ge(n)),s=Ye(d,[],n,[]),u=s.length,c=[];for(let h=0;h<u;h+=1)c.push(xe(s[h]));return Ue(c)}}function Ze(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 Ce(p)}else{const h=d/s,f=u-h,p={xOffset:c,yOffset:v+h,width:s,height:f};return Ce(p)}}const Je=n=>(e.pushScopeId("data-v-6f68fbde"),n=n(),e.popScopeId(),n),Ke=["id"],Qe=["xmlns","viewBox"],et={key:0},tt=["id"],ot=["stop-color"],lt=["stop-color"],at=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],nt=["x","y","height","width"],rt={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},ut=Je(()=>e.createElementVNode("br",null,null,-1)),st={key:5,class:"vue-data-ui-watermark"},it=["onClick"],ct={key:0},dt={key:1},vt=["innerHTML"],ht={__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:()=>te(),set:o=>o}),{userOptionsVisible:K,setUserOptionsVisibility:Q,keepUserOptionState:ee}=qe.useUserOptionState({config:t.value});function te(){const o=be.useNestedProp({userConfig:u.config,defaultConfig:c});return o.theme?{...be.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=te(),Y.value+=1,Z.value+=1,J.value+=1},{deep:!0});const{isPrinting:oe,isImaging:le,generatePdf:ae,generateImage:ne}=me.usePrinter({elementId:`treemap_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-treemap"}),Te=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),I=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),O=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),P=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),z=e.computed(()=>({bottom:P.value.height-t.value.style.chart.padding.bottom,height:P.value.height-t.value.style.chart.padding.top-t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:P.value.width-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,vbHeight:P.value.height,vbWidth:P.value.width,width:P.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right}));function re(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}),re(a.children))})}const V=e.ref(u.dataset),D=e.ref(null);e.onMounted(()=>{Se()});function Se(){if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiTreemap",type:"dataset"}),re(V.value),t.value.responsive){const o=ye.throttle(()=>{const{width:a,height:l}=ye.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 U=e.ref(V.value),A=e.computed(()=>U.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)),ue=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 se(o,a){return o.value/a}function $e(o,a,l){const i=t.value.style.chart.layout.rects.colorRatio-se(a,l);return r.lightenHexColor(o,i<0?0:i)}function ie(o,a,l,i){return o.map((y,_)=>{const H=$e(r.convertColorToHex(a)||I.value[_]||r.palette[_]||r.palette[_%r.palette.length],y,i),ze=se(y,i);return{...y,color:H,proportion:ze,parentName:l,children:y.children?ie(y.children,H,y.name,i):void 0}})}const F=e.computed(()=>We(ue.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?ie(o.children.sort((i,y)=>y.value-i.value),o.color,o.name,l):void 0,color:o.color,name:o.name}}),{x0:z.value.left*2,y0:z.value.top,x1:z.value.width,y1:z.value.height}));function ce({y0:o,y1:a}){return a-o<=0?1e-4:a-o}function de({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 Ne(o){b.value=o,w.value+=1}const R=e.computed(()=>({startX:0,startY:0,width:z.value.vbWidth,height:z.value.vbHeight})),S=e.ref(!1);function W(o,a=V.value){for(const l of a){if(l.id===o)return l;if(l.children){const i=W(o,l.children);if(i)return i}}return null}function Be(o){if(S.value)s("selectDatapoint",void 0),U.value=V.value;else{if(s("selectDatapoint",o),!W(o.parentId))return;U.value=[W(o.parentId)]}S.value=!S.value}const $=e.ref(null),ve=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}))),Oe=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 he(o){S.value=!1,$.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",ue.value)}const G=e.ref(null);function Pe({datapoint:o,seriesIndex:a}){$.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 pe(){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,_)=>{const H=r.applyDataLabel(t.value.style.chart.layout.labels.formatter,N.value.body[_],r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:N.value.body[_],s:t.value.style.chart.layout.labels.suffix,r:t.value.table.td.roundingValue}));return[{color:y.color,name:y.name,shape:"square"},H,isNaN(N.value.body[_]/L.value)?"-":r.dataLabel({v:N.value.body[_]/L.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:a,config:l}});function _e(){return F.value}function fe(){O.value.showTable=!O.value.showTable}function ge(){O.value.showTooltip=!O.value.showTooltip}const M=e.ref(!1);function j(){M.value=!M.value}return d({getData:_e,generateCsv:pe,generateImage:ne,generatePdf:ae,toggleTable:fe,toggleTooltip:ge,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}`,onMouseenter:a[3]||(a[3]=()=>e.unref(Q)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(Q)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(De.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:M.value,onClose:j},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),Te.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(Ve._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.unref(ee)||e.unref(K))?(e.openBlock(),e.createBlock(me.UserOptions,{ref:"details",key:`user_option_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(oe),isImaging:e.unref(le),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:O.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:M.value,onToggleFullscreen:Ne,onGeneratePdf:e.unref(ae),onGenerateCsv:pe,onGenerateImage:e.unref(ne),onToggleTable:fe,onToggleTooltip:ge,onToggleAnnotator:j,style:e.normalizeStyle({visibility:e.unref(ee)?e.unref(K)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:i})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:i})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),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":!S.value,"vue-data-ui-zoom-minus":S.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(Ie._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",et,[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,ot),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.lightenHexColor)(l.color,t.value.style.chart.layout.rects.gradient.intensity/100)},null,8,lt)],8,tt)])):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:ce(l),width:de(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:$.value&&$.value.id===l.id?t.value.style.chart.layout.rects.selected.stroke:t.value.style.chart.layout.rects.stroke,"stroke-width":$.value&&$.value.id===l.id?t.value.style.chart.layout.rects.selected.strokeWidth:t.value.style.chart.layout.rects.strokeWidth,onClick:y=>Be(l),onMouseenter:()=>Pe({datapoint:l,seriesIndex:i}),onMouseleave:a[0]||(a[0]=y=>{$.value=null,p.value=!1}),style:e.normalizeStyle(`opacity:${$.value?$.value.id===l.id?1:t.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:"vue-ui-treemap-rect"},null,44,at),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:ce(l),width:de(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",rt,[t.value.style.chart.layout.labels.showDefaultLabels&&(l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||S.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),ut,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||S.value,fontSize:E(l),isZoom:S.value,textColor:e.unref(r.adaptColorToBackground)(l.color)})),void 0,!0)])],8,nt))]))),256)),e.renderSlot(o.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:z.value,isZoom:S.value,rect:$.value,config:t.value})),void 0,!0)],14,Qe)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",st,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(oe)||e.unref(le)})),void 0,!0)])):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Re.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(Le.Legend,{key:`legend_${J.value}`,legendSet:ve.value,config:Oe.value,id:`treemap_legend_${f.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>he(l))},{item:e.withCtx(({legend:l,index:i})=>[e.createElementVNode("div",{onClick:y=>he(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",dt," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",ct," ("+e.toDisplayString(isNaN(l.value/L.value)?"-":(l.value/L.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,it)]),_:1},8,["legendSet","config","id"])):e.renderSlot(o.$slots,"legend",{key:1,legend:ve.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(Ee._sfc_main,{show:O.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,isFullscreen:b.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...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","isFullscreen","isCustom"]),v.value?(e.openBlock(),e.createBlock(Fe.default,{key:8,hideDetails:"",config:{open:O.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(Ae.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=>O.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,vt)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ke))}},pt=Me._export_sfc(ht,[["__scopeId","data-v-6f68fbde"]]);exports.default=pt;
|