vue-data-ui 2.10.7 → 2.10.9
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 +2 -2
- package/dist/{Arrow-CZUwKF2D.js → Arrow-DCEAiiSq.js} +1 -1
- package/dist/{Arrow-CB6EKr1I.cjs → Arrow-kcA0IBBo.cjs} +1 -1
- package/dist/{BaseIcon-BkA9Q34x.cjs → BaseIcon-CmdFxgkp.cjs} +1 -1
- package/dist/{BaseIcon-Bzv6qbPZ.js → BaseIcon-DPO_4Adb.js} +1 -1
- package/dist/{ColorPicker-C_UcScy-.js → ColorPicker-D0FMoBTo.js} +3 -3
- package/dist/{ColorPicker-CSWIZQFG.cjs → ColorPicker-DJn8_rVA.cjs} +1 -1
- package/dist/{DataTable-BhwIv7c6.js → DataTable-BaAjwD5U.js} +2 -2
- package/dist/{DataTable-BmSWykCq.cjs → DataTable-OM4js4qI.cjs} +1 -1
- package/dist/{Legend-CubpFiQC.js → Legend-DqxOfhbM.js} +2 -2
- package/dist/{Legend-CMib9jhR.cjs → Legend-qwuGpvF8.cjs} +1 -1
- package/dist/{PackageVersion-9kqlnk5q.cjs → PackageVersion-Di-ZyR0_.cjs} +1 -1
- package/dist/{PackageVersion-DmKsiZge.js → PackageVersion-gI4tUgWr.js} +1 -1
- package/dist/{PenAndPaper-CfWPwfS1.cjs → PenAndPaper-CtYhqkG5.cjs} +1 -1
- package/dist/{PenAndPaper-Dgf1a1MW.js → PenAndPaper-Di3hcmp3.js} +3 -3
- package/dist/{Shape-DVn1gKjR.cjs → Shape-CHiMFkEQ.cjs} +1 -1
- package/dist/{Shape-BUW7OeOM.js → Shape-DJcgH2ks.js} +1 -1
- package/dist/{Slicer-ud5drJRz.cjs → Slicer-BrBOWXeJ.cjs} +1 -1
- package/dist/{Slicer-jB5tCct6.js → Slicer-DWZhB9e4.js} +2 -2
- package/dist/{Title-BDdzEGgo.js → Title-B55VMGbm.js} +1 -1
- package/dist/{Title-EjA2nkhd.cjs → Title-BiyGREAz.cjs} +1 -1
- package/dist/{Tooltip-Dr2CQpGZ.cjs → Tooltip-C-Kq18lz.cjs} +1 -1
- package/dist/{Tooltip-Cdkz2ese.js → Tooltip-CMiCE06y.js} +1 -1
- package/dist/documentation/installation.md +1 -1
- package/dist/{dom-to-png-0ag5uZSL.js → dom-to-png-C6TvW1Fi.js} +1 -1
- package/dist/{dom-to-png-DfWDULgW.cjs → dom-to-png-vuA7iQ84.cjs} +1 -1
- package/dist/{img-BFXiOvkr.cjs → img-DHHWE-ji.cjs} +1 -1
- package/dist/{img-DB4eqtiV.js → img-z4AasNO4.js} +1 -1
- package/dist/index-DlALYfRS.cjs +9 -0
- package/dist/{index-Co_0CzhC.js → index-bVqxfptX.js} +9 -2
- package/dist/{pdf-DUrwlnsH.js → pdf-Ch5KSecz.js} +1 -1
- package/dist/{pdf-D_ScD9oB.cjs → pdf-D2qvws06.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +5 -0
- package/dist/types/vue-data-ui.d.ts +5 -0
- package/dist/{useNestedProp-DjOgO33z.cjs → useNestedProp-BZX7zlGv.cjs} +1 -1
- package/dist/{useNestedProp-DqI_VUcm.js → useNestedProp-DU-vsdTb.js} +1 -1
- package/dist/{usePrinter-BV6TePSm.js → usePrinter-BbeIGqpA.js} +3 -3
- package/dist/{usePrinter-CynLTaVl.cjs → usePrinter-n1HzfoSm.cjs} +1 -1
- package/dist/{vue-data-ui-D0yLIHBU.js → vue-data-ui-BI_bQ5jM.js} +62 -62
- package/dist/{vue-data-ui-BTfYQKf1.cjs → vue-data-ui-DRqEhGYC.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-cz81vDyE.cjs → vue-ui-3d-bar-BBKU0pAV.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-c10gAuCo.js → vue-ui-3d-bar-MSs9iIHL.js} +9 -9
- package/dist/{vue-ui-accordion-BrbibtJK.cjs → vue-ui-accordion-CByAeInD.cjs} +1 -1
- package/dist/{vue-ui-accordion-DMCnTtx0.js → vue-ui-accordion-DQKCLM2T.js} +3 -3
- package/dist/{vue-ui-age-pyramid-VrC5Ul6m.cjs → vue-ui-age-pyramid-D05rUuJG.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-qvsOA8yi.js → vue-ui-age-pyramid-pX29qF4-.js} +10 -10
- package/dist/{vue-ui-annotator-Difg_FB4.js → vue-ui-annotator-BuG8aus2.js} +2 -2
- package/dist/{vue-ui-annotator-DYHa8k6K.cjs → vue-ui-annotator-CvcBBO7e.cjs} +1 -1
- package/dist/{vue-ui-bullet-D9jQThZ5.js → vue-ui-bullet-B9Xg6ifm.js} +8 -8
- package/dist/{vue-ui-bullet-Ck8VFaeu.cjs → vue-ui-bullet-BdvVX5da.cjs} +1 -1
- package/dist/{vue-ui-candlestick-CkGKxPxw.js → vue-ui-candlestick-B_iC_QzE.js} +11 -11
- package/dist/{vue-ui-candlestick-Dsd_ba5D.cjs → vue-ui-candlestick-DPEZe5JP.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-CR-iVMMe.js → vue-ui-carousel-table-DGEoBYe-.js} +4 -4
- package/dist/{vue-ui-carousel-table-46CpWaYv.cjs → vue-ui-carousel-table-DOB6NiBx.cjs} +1 -1
- package/dist/{vue-ui-chestnut-C9hkjAMP.js → vue-ui-chestnut-CiWVelvx.js} +8 -8
- package/dist/{vue-ui-chestnut-DpZW075x.cjs → vue-ui-chestnut-DxF_6jB2.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-DCiIAJrq.js → vue-ui-circle-pack-CJN2ybvx.js} +9 -9
- package/dist/{vue-ui-circle-pack-5_vQ6vaC.cjs → vue-ui-circle-pack-XEEX0oEn.cjs} +1 -1
- package/dist/{vue-ui-cursor-DkNjb-zj.cjs → vue-ui-cursor-7loRJMGF.cjs} +1 -1
- package/dist/{vue-ui-cursor-Cts6qtAH.js → vue-ui-cursor-CqAjc9W_.js} +2 -2
- package/dist/{vue-ui-dashboard-DHHIcBg0.cjs → vue-ui-dashboard-CQn61jnh.cjs} +1 -1
- package/dist/{vue-ui-dashboard-Db-_ElsA.js → vue-ui-dashboard-CdpzgIs_.js} +62 -62
- package/dist/{vue-ui-digits--pkv7eKf.js → vue-ui-digits-7ACjmgPM.js} +2 -2
- package/dist/{vue-ui-digits-BV--b8cv.cjs → vue-ui-digits-CuxGcV9M.cjs} +1 -1
- package/dist/{vue-ui-donut-D1OlfgtH.cjs → vue-ui-donut-BtvQmKji.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-2mbVNu_w.js → vue-ui-donut-evolution-BpEJNoJM.js} +11 -11
- package/dist/{vue-ui-donut-evolution-BetPU8WD.cjs → vue-ui-donut-evolution-fOc16UtY.cjs} +1 -1
- package/dist/{vue-ui-donut-BxbbhGmV.js → vue-ui-donut-m7KcUt0k.js} +12 -12
- package/dist/{vue-ui-dumbbell-B4tWeLVq.cjs → vue-ui-dumbbell-BTvPq02T.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-Brfkbz4H.js → vue-ui-dumbbell-Sy7rxejU.js} +10 -10
- package/dist/vue-ui-flow-BccWxEzt.cjs +3 -0
- package/dist/vue-ui-flow-CbszU2ms.js +755 -0
- package/dist/{vue-ui-funnel-Bga3R3li.js → vue-ui-funnel-D3b6l6X6.js} +9 -9
- package/dist/{vue-ui-funnel-DJIRpxX0.cjs → vue-ui-funnel-D87BZsNK.cjs} +1 -1
- package/dist/{vue-ui-galaxy-DjpT9A4L.cjs → vue-ui-galaxy-CDGqzTCy.cjs} +1 -1
- package/dist/{vue-ui-galaxy-CtUY6byr.js → vue-ui-galaxy-CUuzThWx.js} +11 -11
- package/dist/{vue-ui-gauge-Bob29zui.js → vue-ui-gauge-24FEcSzr.js} +7 -7
- package/dist/{vue-ui-gauge-ByLQRCM5.cjs → vue-ui-gauge-B6RkYKug.cjs} +1 -1
- package/dist/{vue-ui-gizmo-DBCKjWN0.cjs → vue-ui-gizmo-BAsoCXMw.cjs} +1 -1
- package/dist/{vue-ui-gizmo-Dj1TLLb1.js → vue-ui-gizmo-DeYTfhQU.js} +3 -3
- package/dist/{vue-ui-heatmap-BYH3bosu.js → vue-ui-heatmap-DpmJyXn-.js} +10 -10
- package/dist/{vue-ui-heatmap-CAUnlp-o.cjs → vue-ui-heatmap-QCkbTog8.cjs} +1 -1
- package/dist/{vue-ui-history-plot-CbTOgmxa.cjs → vue-ui-history-plot-BAW3WchG.cjs} +1 -1
- package/dist/{vue-ui-history-plot-C1kOJElL.js → vue-ui-history-plot-CBeiEcTE.js} +11 -11
- package/dist/{vue-ui-kpi-BUoc8QIz.js → vue-ui-kpi-3gKMDrTH.js} +3 -3
- package/dist/{vue-ui-kpi-DTWa9I78.cjs → vue-ui-kpi-Pki59wPC.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-C1awnIuZ.cjs → vue-ui-mini-loader-BdSgh6y-.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-CSmFWNXS.js → vue-ui-mini-loader-Bo-F8i3n.js} +2 -2
- package/dist/{vue-ui-molecule-CgSPoJxN.cjs → vue-ui-molecule-Bbs_Vy-A.cjs} +1 -1
- package/dist/{vue-ui-molecule-D9kSZQHB.js → vue-ui-molecule-DkVkHwM_.js} +11 -11
- package/dist/{vue-ui-mood-radar-qd5CCM58.js → vue-ui-mood-radar-7qs15-ye.js} +11 -11
- package/dist/{vue-ui-mood-radar-DpQ8EBTg.cjs → vue-ui-mood-radar-DcyKE-45.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-OqJPZW8l.js → vue-ui-nested-donuts-BYwluLLM.js} +11 -11
- package/dist/{vue-ui-nested-donuts-BP9gsX6T.cjs → vue-ui-nested-donuts-iifvTxeT.cjs} +1 -1
- package/dist/{vue-ui-onion-rNOeD9u1.js → vue-ui-onion-B7Asvx4M.js} +11 -11
- package/dist/{vue-ui-onion-DYIgsIYr.cjs → vue-ui-onion-DsS8vdCr.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-CDwhmDGl.cjs → vue-ui-parallel-coordinate-plot-CWyjLwOL.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-DQd14cew.js → vue-ui-parallel-coordinate-plot-CayH9RQe.js} +12 -12
- package/dist/{vue-ui-quadrant-RRM343kT.cjs → vue-ui-quadrant--6zm3Tkv.cjs} +1 -1
- package/dist/{vue-ui-quadrant-CH856J9A.js → vue-ui-quadrant-BSjpS3JD.js} +12 -12
- package/dist/{vue-ui-quick-chart-BLq8C-m8.js → vue-ui-quick-chart-DbfWPULd.js} +9 -9
- package/dist/{vue-ui-quick-chart-BXYgI65b.cjs → vue-ui-quick-chart-DkUGMBfD.cjs} +1 -1
- package/dist/{vue-ui-radar-38OxxA3O.cjs → vue-ui-radar-BrA-apr-.cjs} +1 -1
- package/dist/{vue-ui-radar-BuCYH3tO.js → vue-ui-radar-CvK5Nz5U.js} +12 -12
- package/dist/{vue-ui-rating-D6OL6Aml.js → vue-ui-rating-C5qFRKy9.js} +2 -2
- package/dist/{vue-ui-rating-CiqatGZ_.cjs → vue-ui-rating-ctOiwHRD.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-DDYGMgUl.cjs → vue-ui-relation-circle-35rE0_C0.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-ByhUL4R6.js → vue-ui-relation-circle-ChUKc3S5.js} +7 -7
- package/dist/{vue-ui-ridgeline-C550XNkk.cjs → vue-ui-ridgeline-C_LoyQPY.cjs} +1 -1
- package/dist/{vue-ui-ridgeline-B5126LSF.js → vue-ui-ridgeline-DDrBrbxq.js} +12 -12
- package/dist/{vue-ui-rings-DPXct3je.js → vue-ui-rings-DGhi_Jcb.js} +12 -12
- package/dist/{vue-ui-rings-Dxp4dmO2.cjs → vue-ui-rings-IM473vOr.cjs} +1 -1
- package/dist/{vue-ui-scatter-BWmY2_ij.cjs → vue-ui-scatter-B7h_hWj7.cjs} +1 -1
- package/dist/{vue-ui-scatter-_DhEpcsw.js → vue-ui-scatter-DS9rUuE5.js} +12 -12
- package/dist/{vue-ui-skeleton-Dzehgcp3.js → vue-ui-skeleton-BARmXI9_.js} +3 -3
- package/dist/{vue-ui-skeleton-DvJP74jb.cjs → vue-ui-skeleton-C-I7hIHS.cjs} +1 -1
- package/dist/{vue-ui-smiley-BHd1V1Dv.js → vue-ui-smiley-Ce4Rju1r.js} +2 -2
- package/dist/{vue-ui-smiley-CtDCCsfg.cjs → vue-ui-smiley-DwI6j0i8.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-DDf1hJwg.cjs → vue-ui-spark-trend-BfcDH-Gp.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-DDX-fjR-.js → vue-ui-spark-trend-CE1USqg6.js} +5 -5
- package/dist/{vue-ui-sparkbar-BWeY-FcV.js → vue-ui-sparkbar-B3NBNGl8.js} +4 -4
- package/dist/{vue-ui-sparkbar-BT5NEz93.cjs → vue-ui-sparkbar-CdDBwkff.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-IYvYlZ57.cjs → vue-ui-sparkgauge-CPq_DRcO.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-BQMHbq8E.js → vue-ui-sparkgauge-Kgl_vvc7.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-cjsCsNyf.cjs → vue-ui-sparkhistogram-B9Mf4nA9.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-C5EdWvQP.js → vue-ui-sparkhistogram-DNvaByAm.js} +5 -5
- package/dist/{vue-ui-sparkline-CbKIpwVC.js → vue-ui-sparkline-6fUsXxoo.js} +4 -4
- package/dist/{vue-ui-sparkline-BwZJpAAf.cjs → vue-ui-sparkline-DPFtUR9k.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-COxIfFgm.js → vue-ui-sparkstackbar-B_O87Udb.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-BVJU36Jz.cjs → vue-ui-sparkstackbar-D8gErBiD.cjs} +1 -1
- package/dist/{vue-ui-stackbar-Dr5hRx6G.js → vue-ui-stackbar-SQkqb5uZ.js} +13 -13
- package/dist/{vue-ui-stackbar-CQ56hps8.cjs → vue-ui-stackbar-a7bzDCRQ.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-B_nfC_fx.cjs → vue-ui-strip-plot-BbCMpSG9.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-Mct4OE0A.js → vue-ui-strip-plot-Czg_UcLg.js} +11 -11
- package/dist/{vue-ui-table-B6LG28n8.js → vue-ui-table-B0ANgSAH.js} +3 -3
- package/dist/{vue-ui-table-DE3wOTyH.cjs → vue-ui-table-DTys0wh5.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-DDOoKybT.js → vue-ui-table-heatmap---afBYht.js} +4 -4
- package/dist/{vue-ui-table-heatmap-DuMRCIbx.cjs → vue-ui-table-heatmap-B46ApT8a.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-gZWWmkQe.cjs → vue-ui-table-sparkline-CSi_2E82.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-D578FuNQ.js → vue-ui-table-sparkline-cuO4BEcb.js} +5 -5
- package/dist/{vue-ui-thermometer-BWHsyYj8.cjs → vue-ui-thermometer-Bco6ThIk.cjs} +1 -1
- package/dist/{vue-ui-thermometer-DFbYODrU.js → vue-ui-thermometer-Cu3N2aZN.js} +7 -7
- package/dist/{vue-ui-timer-Bi6Q0m_J.js → vue-ui-timer-DnQAvYVy.js} +5 -5
- package/dist/{vue-ui-timer-s73pZhYM.cjs → vue-ui-timer-GkxVjTEC.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-BcFJOrF8.cjs → vue-ui-tiremarks-CNW6BXVF.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-C68rB2kd.js → vue-ui-tiremarks-PX1AQ6u9.js} +7 -7
- package/dist/{vue-ui-treemap-b5rZtLKn.js → vue-ui-treemap-Drg5MEcW.js} +12 -12
- package/dist/{vue-ui-treemap-B7_kcMng.cjs → vue-ui-treemap-dm6Ion7A.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-DyZ-gfQi.js → vue-ui-vertical-bar-BtkKFF7C.js} +12 -12
- package/dist/{vue-ui-vertical-bar-Bw42kw9a.cjs → vue-ui-vertical-bar-eA-iYb9s.cjs} +1 -1
- package/dist/{vue-ui-waffle-CG05FL_H.js → vue-ui-waffle-BAFVYzdi.js} +12 -12
- package/dist/{vue-ui-waffle-tk3zMyjq.cjs → vue-ui-waffle-Bn77Yd88.cjs} +1 -1
- package/dist/{vue-ui-wheel-RzXEZFfN.cjs → vue-ui-wheel-D4VdCS3n.cjs} +1 -1
- package/dist/{vue-ui-wheel-BTbteaZS.js → vue-ui-wheel-fMANwaEy.js} +7 -7
- package/dist/{vue-ui-word-cloud-BKubtYCS.js → vue-ui-word-cloud-Du0UUBsh.js} +10 -10
- package/dist/{vue-ui-word-cloud-CUZ1Mm3Q.cjs → vue-ui-word-cloud-bX4J2Y8V.cjs} +1 -1
- package/dist/{vue-ui-world-BF0wSEJb.js → vue-ui-world-B-Guo08O.js} +11 -11
- package/dist/{vue-ui-world-BPcoReDh.cjs → vue-ui-world-BHNBu5o5.cjs} +1 -1
- package/dist/{vue-ui-xy-AgcMweTZ.js → vue-ui-xy-BN9Lh6Ic.js} +16 -16
- package/dist/{vue-ui-xy-C8ZEeV9g.cjs → vue-ui-xy-BkQt8l_A.cjs} +2 -2
- package/dist/{vue-ui-xy-canvas-CYaJZj3B.js → vue-ui-xy-canvas-D9avmh08.js} +12 -12
- package/dist/{vue-ui-xy-canvas-CJl9RPzv.cjs → vue-ui-xy-canvas-cfQsHd-5.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-BX4v5fiN.cjs +0 -9
- package/dist/vue-ui-flow-BSptjAOo.cjs +0 -1
- package/dist/vue-ui-flow-BtfK7Ixu.js +0 -655
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),j=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),j=require("./useNestedProp-BZX7zlGv.cjs"),w=require("./index-DlALYfRS.cjs"),D=require("./useResponsive-DQmBAoBf.cjs"),B=require("./BaseIcon-CmdFxgkp.cjs"),O=require("./Title-BiyGREAz.cjs"),U=require("./PackageVersion-Di-ZyR0_.cjs"),W=require("./useChartAccessibility-Cm7nkzTG.cjs"),G=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");class X{constructor(T,V,S,M=!0,h=!0){this.interval=V,this.elapsed=0,this.isPaused=!1;const g=`
|
|
2
2
|
let interval;
|
|
3
3
|
let elapsed = 0;
|
|
4
4
|
let paused = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-DjOgO33z.cjs"),c=require("./index-BX4v5fiN.cjs"),K=require("./Title-EjA2nkhd.cjs"),j=require("./usePrinter-CynLTaVl.cjs"),Q=require("./vue-ui-skeleton-DvJP74jb.cjs"),W=require("./PackageVersion-9kqlnk5q.cjs"),Z=require("./PenAndPaper-CfWPwfS1.cjs"),ee=require("./useUserOptionState-BgepsfED.cjs"),te=require("./useChartAccessibility-Cm7nkzTG.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],le={key:2,style:"width:100%;background:transparent;padding-bottom:12px"},re=["xmlns","viewBox"],ne=["width","height"],se={key:1},ue=["d","stroke-width","stroke"],ie={key:2},ce=["x1","y1","x2","y2","stroke-width","stroke"],ve=["x","y","font-size","fill","font-weight","text-anchor"],de={key:5,class:"vue-data-ui-watermark"},he={key:6,ref:"source",dir:"auto"},pe={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(G,{expose:H}){const{vue_ui_tiremarks:D}=c.useConfig(),v=G,$=e.computed(()=>!!v.dataset&&Object.keys(v.dataset).length),B=e.ref(c.createUid()),O=e.ref(null),X=e.ref(null),S=e.ref(0),A=e.ref(0),t=e.computed({get:()=>E(),set:o=>o}),{userOptionsVisible:P,setUserOptionsVisibility:z,keepUserOptionState:N}=ee.useUserOptionState({config:t.value}),{svgRef:I}=te.useChartAccessibility({config:t.value.style.chart.title});function E(){const o=L.useNestedProp({userConfig:v.config,defaultConfig:D});return o.theme?{...L.useNestedProp({userConfig:c.themes.vue_ui_tiremarks[o.theme]||v.config,defaultConfig:o})}:o}e.watch(()=>v.config,o=>{t.value=E(),P.value=!t.value.userOptions.showOnChartHover,U(),A.value+=1},{deep:!0});const{isPrinting:F,isImaging:V,generatePdf:q,generateImage:T}=j.usePrinter({elementId:B.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks",options:t.value.userOptions.print}),Y=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),s=e.ref(t.value.style.chart.animation.use?0:c.checkNaN(v.dataset.percentage));e.watch(()=>v.dataset,o=>{t.value.style.chart.animation.use?M(o.percentage):s.value=o.percentage||0},{deep:!0}),e.onMounted(()=>{U()});function M(o){let n=t.value.style.chart.animation.speed;const a=Math.abs(o-s.value)/(n*120);function r(){s.value<o?s.value=Math.min(s.value+a,o):s.value>o&&(s.value=Math.max(s.value-a,o)),s.value!==o&&requestAnimationFrame(r)}r()}function U(){c.objectIsEmpty(v.dataset)&&c.error({componentName:"VueUiTiremarks",type:"dataset"}),M(v.dataset.percentage||0)}const m=e.computed(()=>t.value.style.chart.layout.display==="vertical"),u=e.computed(()=>{const o={top:48,left:64,right:64,bottom:48};return m.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?o.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?o.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?o.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?o.right:10}}),C=e.computed(()=>Object.values(u.value).reduce((o,n)=>o+n,0)),l=e.computed(()=>({height:m.value?312:56,width:m.value?56:312})),i=e.computed(()=>m.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}),R=e.computed(()=>{const o=[];for(let a=0;a<100;a+=1){const r=t.value.style.chart.layout.ticks.gradient.show?c.shiftHue(t.value.style.chart.layout.activeColor,a/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.activeColor;if(m.value){const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.width-u.value.left-u.value.right)/100/3:0,d=u.value.left+4+y,h=l.value.width-u.value.right-4-y,p=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,f=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,b=t.value.style.chart.layout.curveAngleY*((1+a)/100);o.push({x1:d,x2:h,y1:p,y2:f,curve:`M ${d} ${p} C ${d+k} ${p-b}, ${h-k} ${f-b}, ${h} ${f}`,color:r})}else{const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.height-u.value.top-u.value.bottom)/100/3:0,d=u.value.left+a*i.value.mark+a*i.value.space-i.value.mark,h=d,p=u.value.top+4+y,f=l.value.height-u.value.bottom-4-y,k=t.value.style.chart.layout.curveAngleY*((1+a)/100),b=(f-p)/t.value.style.chart.layout.curveAngleX;o.push({x1:d,x2:h,y1:p,y2:f,curve:`M ${d} ${p} C ${d+k} ${p+b}, ${h+k} ${f-b}, ${h} ${f}`,color:r})}}return o}),g=e.computed(()=>{let o,n,a;const r=t.value.style.chart.percentage.fontSize/3;return m.value?t.value.style.chart.percentage.verticalPosition==="top"?(o=l.value.width/2,n=u.value.top/2,a="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(o=l.value.width/2,n=l.value.height-u.value.bottom/2+r,a="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(o=4,n=l.value.height/2+r,a="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(o=l.value.width-u.value.right+8,n=l.value.height/2+r,a="start"),{x:o,y:n,textAnchor:a,bold:t.value.style.chart.percentage.bold,fontSize:t.value.style.chart.percentage.fontSize,fill:t.value.style.chart.percentage.color}}),_=e.ref(!1);function J(o){_.value=o,S.value+=1}const w=e.ref(!1);function x(){w.value=!w.value}return H({generatePdf:q,generateImage:T,toggleAnnotator:x}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:O,class:e.normalizeClass(`vue-ui-tiremarks ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:B.value,onMouseenter:n[0]||(n[0]=()=>e.unref(z)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(z)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Z._sfc_main,{key:0,svgRef:e.unref(I),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:x},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Y.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:X,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",le,[(e.openBlock(),e.createBlock(K._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value&&(e.unref(N)||e.unref(P))?(e.openBlock(),e.createBlock(j.UserOptions,{ref:"details",key:`user_options_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(V),uid:B.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:_.value,titles:{...t.value.userOptions.buttonTitles},chartElement:O.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:J,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(T),onToggleAnnotator:x,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:r})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:r})),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.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"3"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:I,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),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,ne)):e.createCommentVNode("",!0),t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(a,r)=>(e.openBlock(),e.createElementBlock("path",{d:a.curve,"stroke-width":i.value.mark,stroke:s.value>=r?a.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&r<=s.value})},null,10,ue))),256))])):(e.openBlock(),e.createElementBlock("g",ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(a,r)=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,"stroke-width":i.value.mark,stroke:s.value>=r?a.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,ce))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:3,x:g.value.x,y:g.value.y,"font-size":g.value.fontSize,fill:t.value.style.chart.layout.ticks.gradient.show&&t.value.style.chart.percentage.useGradientColor?e.unref(c.shiftHue)(t.value.style.chart.layout.activeColor,s.value/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.percentage.color,"font-weight":g.value.bold?"bold":"normal","text-anchor":g.value.textAnchor},e.toDisplayString(e.unref(c.applyDataLabel)(t.value.style.chart.percentage.formatter,s.value,e.unref(c.dataLabel)({v:s.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,ve)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:l.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(V)})),void 0,!0)])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",he,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.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))}},fe=oe._export_sfc(pe,[["__scopeId","data-v-fac4c918"]]);exports.default=fe;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-BZX7zlGv.cjs"),c=require("./index-DlALYfRS.cjs"),K=require("./Title-BiyGREAz.cjs"),j=require("./usePrinter-n1HzfoSm.cjs"),Q=require("./vue-ui-skeleton-C-I7hIHS.cjs"),W=require("./PackageVersion-Di-ZyR0_.cjs"),Z=require("./PenAndPaper-CtYhqkG5.cjs"),ee=require("./useUserOptionState-BgepsfED.cjs"),te=require("./useChartAccessibility-Cm7nkzTG.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],le={key:2,style:"width:100%;background:transparent;padding-bottom:12px"},re=["xmlns","viewBox"],ne=["width","height"],se={key:1},ue=["d","stroke-width","stroke"],ie={key:2},ce=["x1","y1","x2","y2","stroke-width","stroke"],ve=["x","y","font-size","fill","font-weight","text-anchor"],de={key:5,class:"vue-data-ui-watermark"},he={key:6,ref:"source",dir:"auto"},pe={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(G,{expose:H}){const{vue_ui_tiremarks:D}=c.useConfig(),v=G,$=e.computed(()=>!!v.dataset&&Object.keys(v.dataset).length),B=e.ref(c.createUid()),O=e.ref(null),X=e.ref(null),S=e.ref(0),A=e.ref(0),t=e.computed({get:()=>E(),set:o=>o}),{userOptionsVisible:P,setUserOptionsVisibility:z,keepUserOptionState:N}=ee.useUserOptionState({config:t.value}),{svgRef:I}=te.useChartAccessibility({config:t.value.style.chart.title});function E(){const o=L.useNestedProp({userConfig:v.config,defaultConfig:D});return o.theme?{...L.useNestedProp({userConfig:c.themes.vue_ui_tiremarks[o.theme]||v.config,defaultConfig:o})}:o}e.watch(()=>v.config,o=>{t.value=E(),P.value=!t.value.userOptions.showOnChartHover,U(),A.value+=1},{deep:!0});const{isPrinting:F,isImaging:V,generatePdf:q,generateImage:T}=j.usePrinter({elementId:B.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks",options:t.value.userOptions.print}),Y=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),s=e.ref(t.value.style.chart.animation.use?0:c.checkNaN(v.dataset.percentage));e.watch(()=>v.dataset,o=>{t.value.style.chart.animation.use?M(o.percentage):s.value=o.percentage||0},{deep:!0}),e.onMounted(()=>{U()});function M(o){let n=t.value.style.chart.animation.speed;const a=Math.abs(o-s.value)/(n*120);function r(){s.value<o?s.value=Math.min(s.value+a,o):s.value>o&&(s.value=Math.max(s.value-a,o)),s.value!==o&&requestAnimationFrame(r)}r()}function U(){c.objectIsEmpty(v.dataset)&&c.error({componentName:"VueUiTiremarks",type:"dataset"}),M(v.dataset.percentage||0)}const m=e.computed(()=>t.value.style.chart.layout.display==="vertical"),u=e.computed(()=>{const o={top:48,left:64,right:64,bottom:48};return m.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?o.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?o.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?o.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?o.right:10}}),C=e.computed(()=>Object.values(u.value).reduce((o,n)=>o+n,0)),l=e.computed(()=>({height:m.value?312:56,width:m.value?56:312})),i=e.computed(()=>m.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}),R=e.computed(()=>{const o=[];for(let a=0;a<100;a+=1){const r=t.value.style.chart.layout.ticks.gradient.show?c.shiftHue(t.value.style.chart.layout.activeColor,a/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.activeColor;if(m.value){const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.width-u.value.left-u.value.right)/100/3:0,d=u.value.left+4+y,h=l.value.width-u.value.right-4-y,p=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,f=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,b=t.value.style.chart.layout.curveAngleY*((1+a)/100);o.push({x1:d,x2:h,y1:p,y2:f,curve:`M ${d} ${p} C ${d+k} ${p-b}, ${h-k} ${f-b}, ${h} ${f}`,color:r})}else{const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.height-u.value.top-u.value.bottom)/100/3:0,d=u.value.left+a*i.value.mark+a*i.value.space-i.value.mark,h=d,p=u.value.top+4+y,f=l.value.height-u.value.bottom-4-y,k=t.value.style.chart.layout.curveAngleY*((1+a)/100),b=(f-p)/t.value.style.chart.layout.curveAngleX;o.push({x1:d,x2:h,y1:p,y2:f,curve:`M ${d} ${p} C ${d+k} ${p+b}, ${h+k} ${f-b}, ${h} ${f}`,color:r})}}return o}),g=e.computed(()=>{let o,n,a;const r=t.value.style.chart.percentage.fontSize/3;return m.value?t.value.style.chart.percentage.verticalPosition==="top"?(o=l.value.width/2,n=u.value.top/2,a="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(o=l.value.width/2,n=l.value.height-u.value.bottom/2+r,a="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(o=4,n=l.value.height/2+r,a="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(o=l.value.width-u.value.right+8,n=l.value.height/2+r,a="start"),{x:o,y:n,textAnchor:a,bold:t.value.style.chart.percentage.bold,fontSize:t.value.style.chart.percentage.fontSize,fill:t.value.style.chart.percentage.color}}),_=e.ref(!1);function J(o){_.value=o,S.value+=1}const w=e.ref(!1);function x(){w.value=!w.value}return H({generatePdf:q,generateImage:T,toggleAnnotator:x}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:O,class:e.normalizeClass(`vue-ui-tiremarks ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:B.value,onMouseenter:n[0]||(n[0]=()=>e.unref(z)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(z)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Z._sfc_main,{key:0,svgRef:e.unref(I),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:x},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Y.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:X,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",le,[(e.openBlock(),e.createBlock(K._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value&&(e.unref(N)||e.unref(P))?(e.openBlock(),e.createBlock(j.UserOptions,{ref:"details",key:`user_options_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(V),uid:B.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:_.value,titles:{...t.value.userOptions.buttonTitles},chartElement:O.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:J,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(T),onToggleAnnotator:x,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:r})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:r})),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.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"3"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:I,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),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,ne)):e.createCommentVNode("",!0),t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(a,r)=>(e.openBlock(),e.createElementBlock("path",{d:a.curve,"stroke-width":i.value.mark,stroke:s.value>=r?a.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&r<=s.value})},null,10,ue))),256))])):(e.openBlock(),e.createElementBlock("g",ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(a,r)=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,"stroke-width":i.value.mark,stroke:s.value>=r?a.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,ce))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:3,x:g.value.x,y:g.value.y,"font-size":g.value.fontSize,fill:t.value.style.chart.layout.ticks.gradient.show&&t.value.style.chart.percentage.useGradientColor?e.unref(c.shiftHue)(t.value.style.chart.layout.activeColor,s.value/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.percentage.color,"font-weight":g.value.bold?"bold":"normal","text-anchor":g.value.textAnchor},e.toDisplayString(e.unref(c.applyDataLabel)(t.value.style.chart.percentage.formatter,s.value,e.unref(c.dataLabel)({v:s.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,ve)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:l.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(V)})),void 0,!0)])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",he,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.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))}},fe=oe._export_sfc(pe,[["__scopeId","data-v-fac4c918"]]);exports.default=fe;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { computed as h, ref as b, watch as Z, onMounted as ce, createElementBlock as c, openBlock as s, unref as r, normalizeStyle as G, normalizeClass as L, createBlock as F, createCommentVNode as d, createSlots as ve, withCtx as O, renderSlot as y, normalizeProps as z, guardReactiveProps as S, createVNode as he, Fragment as ee, renderList as te, toDisplayString as de } from "vue";
|
|
2
|
-
import { u as ae } from "./useNestedProp-
|
|
3
|
-
import { u as fe, c as ge, a as ye, v as pe, o as me, e as ke, w as oe, X as be, i as _e, f as Ce } from "./index-
|
|
4
|
-
import { _ as $e } from "./Title-
|
|
5
|
-
import { u as we, U as xe } from "./usePrinter-
|
|
6
|
-
import Oe from "./vue-ui-skeleton-
|
|
7
|
-
import { _ as Pe } from "./PackageVersion-
|
|
8
|
-
import { _ as Ae } from "./PenAndPaper-
|
|
2
|
+
import { u as ae } from "./useNestedProp-DU-vsdTb.js";
|
|
3
|
+
import { u as fe, c as ge, a as ye, v as pe, o as me, e as ke, w as oe, X as be, i as _e, f as Ce } from "./index-bVqxfptX.js";
|
|
4
|
+
import { _ as $e } from "./Title-B55VMGbm.js";
|
|
5
|
+
import { u as we, U as xe } from "./usePrinter-BbeIGqpA.js";
|
|
6
|
+
import Oe from "./vue-ui-skeleton-BARmXI9_.js";
|
|
7
|
+
import { _ as Pe } from "./PackageVersion-gI4tUgWr.js";
|
|
8
|
+
import { _ as Ae } from "./PenAndPaper-Di3hcmp3.js";
|
|
9
9
|
import { u as Ie } from "./useUserOptionState-BIvW1Kz7.js";
|
|
10
10
|
import { u as Fe } from "./useChartAccessibility-BWojgys7.js";
|
|
11
11
|
import { _ as ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { useSlots as pt, onMounted as je, computed as C, ref as g, watch as gt, onBeforeUnmount as mt, createElementBlock as y, openBlock as v, unref as m, normalizeStyle as L, normalizeClass as me, createBlock as X, createCommentVNode as _, createElementVNode as O, createVNode as ye, createSlots as yt, withCtx as x, renderSlot as $, normalizeProps as j, guardReactiveProps as Y, Fragment as ce, renderList as be, withKeys as Ye, withModifiers as ke, mergeProps as Ke, createTextVNode as de, toDisplayString as K, nextTick as bt } from "vue";
|
|
2
|
-
import { u as kt, c as Ze, t as wt, p as S, a as Ct, b as $t, o as xt, e as Tt, d as ve, i as he, f as oe, X as _t, l as Je, G as Qe, x as et, q as Ot, r as St, y as It } from "./index-
|
|
3
|
-
import { _ as Nt } from "./Title-
|
|
4
|
-
import { u as zt, U as Ft } from "./usePrinter-
|
|
5
|
-
import { _ as At } from "./Tooltip-
|
|
6
|
-
import { L as Pt } from "./Legend-
|
|
7
|
-
import Rt from "./vue-ui-skeleton-
|
|
8
|
-
import { D as Lt } from "./DataTable-
|
|
9
|
-
import Dt from "./vue-ui-accordion-
|
|
2
|
+
import { u as kt, c as Ze, t as wt, p as S, a as Ct, b as $t, o as xt, e as Tt, d as ve, i as he, f as oe, X as _t, l as Je, G as Qe, x as et, q as Ot, r as St, y as It } from "./index-bVqxfptX.js";
|
|
3
|
+
import { _ as Nt } from "./Title-B55VMGbm.js";
|
|
4
|
+
import { u as zt, U as Ft } from "./usePrinter-BbeIGqpA.js";
|
|
5
|
+
import { _ as At } from "./Tooltip-CMiCE06y.js";
|
|
6
|
+
import { L as Pt } from "./Legend-DqxOfhbM.js";
|
|
7
|
+
import Rt from "./vue-ui-skeleton-BARmXI9_.js";
|
|
8
|
+
import { D as Lt } from "./DataTable-BaAjwD5U.js";
|
|
9
|
+
import Dt from "./vue-ui-accordion-DQKCLM2T.js";
|
|
10
10
|
import { t as Mt, u as Vt } from "./useResponsive-Cw4oZ8sQ.js";
|
|
11
|
-
import { u as tt } from "./useNestedProp-
|
|
12
|
-
import { _ as Bt } from "./PackageVersion-
|
|
13
|
-
import { _ as Ht } from "./PenAndPaper-
|
|
11
|
+
import { u as tt } from "./useNestedProp-DU-vsdTb.js";
|
|
12
|
+
import { _ as Bt } from "./PackageVersion-gI4tUgWr.js";
|
|
13
|
+
import { _ as Ht } from "./PenAndPaper-Di3hcmp3.js";
|
|
14
14
|
import { u as Ut } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
15
|
import { u as Wt } from "./useChartAccessibility-BWojgys7.js";
|
|
16
|
-
import Et from "./BaseIcon-
|
|
16
|
+
import Et from "./BaseIcon-DPO_4Adb.js";
|
|
17
17
|
import { _ as Gt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
18
18
|
function ot(n, r) {
|
|
19
19
|
const u = n.length;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BX4v5fiN.cjs"),Me=require("./Title-EjA2nkhd.cjs"),Se=require("./usePrinter-CynLTaVl.cjs"),He=require("./Tooltip-Dr2CQpGZ.cjs"),Ue=require("./Legend-CMib9jhR.cjs"),We=require("./vue-ui-skeleton-DvJP74jb.cjs"),Ge=require("./DataTable-BmSWykCq.cjs"),je=require("./vue-ui-accordion-BrbibtJK.cjs"),Be=require("./useResponsive-DQmBAoBf.cjs"),Ne=require("./useNestedProp-DjOgO33z.cjs"),Xe=require("./PackageVersion-9kqlnk5q.cjs"),Ye=require("./PenAndPaper-CfWPwfS1.cjs"),Ke=require("./useUserOptionState-BgepsfED.cjs"),Ze=require("./useChartAccessibility-Cm7nkzTG.cjs"),Je=require("./BaseIcon-BkA9Q34x.cjs"),Qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function _e(r,c){const i=r.length;if(i===0)throw new Error(`Max aspect ratio cannot be computed: ${r} is an empty array`);{let d=1/0,u=-1/0,v=0;for(let f=0;f<i;f+=1){const m=r[f].normalizedValue;m<d&&(d=m),m>u&&(u=m),v+=m}return Math.max(c**2*u/v**2,v**2/(c**2*d))}}function Oe(r){const{xOffset:c,yOffset:i,width:d,height:u}=r;return{x0:c,y0:i,x1:c+d,y1:i+u}}function et(r,c,i){if(r.length===0)return!0;{const d=r.concat(c),u=_e(r,i),v=_e(d,i);return u>=v}}function tt(r){const c=[],i=r.length;for(let d=0;d<i;d+=1){const u=r[d],v=u.length;for(let h=0;h<v;h+=1)c.push(u[h])}return c}function ot(r,c){const i={...c,children:r};return Pe(i)}function lt(r){return(r.x1-r.x0)*(r.y1-r.y0)}function ze(r,c){const{width:i,height:d,xOffset:u,yOffset:v}=Q(c),h=r.length,f=r.map(y=>y.normalizedValue||0).reduce((y,g)=>y+g,0),m=f/d,x=f/i;let C=u,$=v;const b=[];if(i>=d){for(let y=0;y<h;y+=1){const g=r[y],k=$+g.normalizedValue/m,_={x0:C,y0:$,x1:C+m,y1:k},T=Object.assign({},g,_);$=k,b.push(T)}return b}else{for(let y=0;y<h;y+=1){const g=r[y],k=C+g.normalizedValue/x,_={x0:C,y0:$,x1:k,y1:$+x},T=Object.assign({},g,_);C=k,b.push(T)}return b}}function at(r){const c=Q(r),i=c.width,d=c.height;return Math.min(i,d)}function nt(r,c){const i=r.length,d=r.map(m=>m.value??0).reduce((m,x)=>m+x,0),u=c/d,v=[];let h,f;for(let m=0;m<i;m+=1)f=r[m],h=Object.assign({},f,{normalizedValue:f.value*(u||0)}),v.push(h);return v}function Q(r){const{x0:c,y0:i,x1:d,y1:u}=r;return{xOffset:c,yOffset:i,width:d-c,height:u-i}}function rt(r,c,i,d){let u=r,v=c,h=i,f=d;for(;;){const m=u.length;if(m===0){const b=ze(v,h);return f.concat(b)}const x=at(h),C=u[0],$=u.slice(1,m);if(et(v,C,x)){const b=v.concat(C);u=$,v=b,h=h,f=f}else{const b=v.length;let y=0;for(let T=0;T<b;T+=1)y+=v[T].normalizedValue;const g=st(h,y),k=ze(v,h),_=f.concat(k);u=u,v=[],h=g,f=_}}}function Pe(r){if(typeof r.children>"u"||!r.children.length)return[r];{const c=nt(r.children,lt(r)),i=rt(c,[],r,[]),d=i.length,u=[];for(let h=0;h<d;h+=1)u.push(Pe(i[h]));return tt(u)}}function st(r,c){const{width:i,height:d,xOffset:u,yOffset:v}=Q(r);if(i>=d){const h=c/d,f=i-h,m={xOffset:u+h,yOffset:v,width:f,height:d};return Oe(m)}else{const h=c/i,f=d-h,m={xOffset:u,yOffset:v+h,width:i,height:f};return Oe(m)}}const ut=["id"],it={key:4,class:"vue-ui-treemap-breadcrumbs","data-dom-to-png-ignore":""},ct=["tabindex","onClick","onKeydown","data-last-crumb","onMouseenter","onFocus"],dt={class:"vue-ui-treemap-crumb-unit"},vt={class:"vue-ui-treemap-crumb-unit-label"},ht={key:0,style:{width:"24px",display:"flex","align-items":"center"}},pt={key:0,class:"vue-ui-treemap-crumb-unit-arrow"},ft=["xmlns","viewBox"],mt={key:0},gt=["id"],yt=["stop-color"],bt=["stop-color"],kt=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],Ct=["x","y","height","width"],wt={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},xt={key:6,class:"vue-data-ui-watermark"},$t=["onClick"],Tt={key:0},St={key:1},Bt=["innerHTML"],Nt={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(r,{expose:c,emit:i}){const{vue_ui_treemap:d}=s.useConfig(),u=r,v=i,h=e.useSlots();e.onMounted(()=>{h["chart-background"]&&console.warn("VueUiTreemap does not support the #chart-background slot.")});const f=e.computed(()=>!!u.dataset&&u.dataset.length),m=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),x=e.ref(s.createUid()),C=e.ref(!1),$=e.ref(""),b=e.ref(!1),y=e.ref(0),g=e.ref([]),k=e.ref(null),_=e.ref(null),T=e.ref(null),ee=e.ref(null),te=e.ref(null),oe=e.ref(0),le=e.ref(0),ae=e.ref(0),o=e.computed({get:()=>ue(),set:t=>t}),{userOptionsVisible:K,setUserOptionsVisibility:ne,keepUserOptionState:re}=Ke.useUserOptionState({config:o.value}),{svgRef:se}=Ze.useChartAccessibility({config:o.value.style.chart.title});function ue(){const t=Ne.useNestedProp({userConfig:u.config,defaultConfig:d});return t.theme?{...Ne.useNestedProp({userConfig:s.themes.vue_ui_treemap[t.theme]||u.config,defaultConfig:t}),customPalette:s.themePalettes[t.theme]||s.palette}:t}e.watch(()=>u.config,t=>{o.value=ue(),K.value=!o.value.userOptions.showOnChartHover,oe.value+=1,le.value+=1,ae.value+=1,S.value.showTable=o.value.table.show,S.value.showTooltip=o.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:ie,isImaging:ce,generatePdf:de,generateImage:ve}=Se.usePrinter({elementId:`treemap_${x.value}`,fileName:o.value.style.chart.title.text||"vue-ui-treemap",options:o.value.userOptions.print}),Ve=e.computed(()=>o.value.userOptions.show&&!o.value.style.chart.title.text),H=e.computed(()=>s.convertCustomPalette(o.value.customPalette)),S=e.ref({showTable:o.value.table.show,showTooltip:o.value.style.chart.tooltip.show}),O=e.ref({height:o.value.style.chart.height,width:o.value.style.chart.width}),F=e.computed(()=>({bottom:O.value.height-o.value.style.chart.padding.bottom,height:O.value.height-o.value.style.chart.padding.top-o.value.style.chart.padding.bottom,left:o.value.style.chart.padding.left,right:O.value.width-o.value.style.chart.padding.right,top:o.value.style.chart.padding.top,vbHeight:O.value.height,vbWidth:O.value.width,width:O.value.width-o.value.style.chart.padding.left-o.value.style.chart.padding.right}));function he(t){t.forEach((a,l)=>{a.id=s.createUid(),a.color=s.convertColorToHex(a.color)||H.value[l]||s.palette[l]||s.palette[l%s.palette.length],a.children&&(a.children.forEach(n=>{n.parentId=a.id,n.color=a.color}),he(a.children))})}const z=e.ref(u.dataset),U=e.ref(null);e.onMounted(()=>{Ee()});function Ee(){if(s.objectIsEmpty(u.dataset)&&s.error({componentName:"VueUiTreemap",type:"dataset"}),he(z.value),o.value.responsive){const t=Be.throttle(()=>{const{width:a,height:l}=Be.useResponsive({chart:k.value,title:o.value.style.chart.title.text?_.value:null,legend:o.value.style.chart.legend.show?T.value:null,source:ee.value,noTitle:te.value});requestAnimationFrame(()=>{O.value.width=a,O.value.height=l})});U.value=new ResizeObserver(t),U.value.observe(k.value.parentNode)}}e.onBeforeUnmount(()=>{U.value&&U.value.disconnect()});const L=e.ref(z.value),q=e.computed(()=>L.value.map((t,a)=>({...t,color:s.convertColorToHex(t.color)||H.value[a]||s.palette[a]||s.palette[a%s.palette.length]})).filter(t=>!g.value.includes(t.id))),A=e.computed(()=>z.value.filter(t=>!g.value.includes(t.id)).map(t=>t.value||0).reduce((t,a)=>t+a,0)),pe=e.computed({get(){let t=[...q.value];return o.value.style.chart.layout.sorted&&(t=[...q.value].sort((a,l)=>l.value-a.value)),t.map(a=>({...a}))},set(t){return t}});function fe(t,a){return t.value/a}function Fe(t,a,l){const n=o.value.style.chart.layout.rects.colorRatio-fe(a,l);return s.lightenHexColor(t,n<0?0:n)}function me(t,a,l,n){return t.map((p,E)=>{const Y=Fe(s.convertColorToHex(a)||H.value[E]||s.palette[E]||s.palette[E%s.palette.length],p,n),qe=fe(p,n);return{...p,color:Y,proportion:qe,parentName:l,children:p.children?me(p.children,Y,p.name,n):void 0}})}const M=e.computed(()=>ot(pe.value.map((t,a)=>{const l=t.children?t.children.reduce((n,p)=>n+p.value,0):t.value;return{value:t.value,id:t.id,children:t.children?me(t.children.sort((n,p)=>p.value-n.value),t.color,t.name,l):void 0,color:t.color,name:t.name}}),{x0:F.value.left*2,y0:F.value.top,x1:F.value.width,y1:F.value.height}));function ge({y0:t,y1:a}){return a-t<=0?1e-4:a-t}function ye({x0:t,x1:a}){return a-t<=0?1e-4:a-t}function I(t){const a=o.value.style.chart.layout.labels.fontSize*(t.proportion*2>1?1:t.proportion*2);return a<o.value.style.chart.layout.labels.minFontSize?o.value.style.chart.layout.labels.minFontSize:a}function Ie(t){b.value=t,y.value+=1}const D=e.computed(()=>({startX:0,startY:0,width:F.value.vbWidth,height:F.value.vbHeight}));function R(t,a=z.value){for(const l of a){if(l.id===t)return l;if(l.children){const n=R(t,l.children);if(n)return n}}return null}const w=e.ref([]),P=e.computed(()=>w.value.length>0);function W(t){var l;if(!t){L.value=z.value.slice(),v("selectDatapoint",void 0),w.value=[];return}const a=R(t.id);if(a&&((l=a.children)!=null&&l.length))w.value.push(a.id),L.value=a.children.slice(),v("selectDatapoint",t);else if(t.parentId){w.value.push(t.parentId);const n=R(t.parentId);L.value=n.children.slice(),v("selectDatapoint",t)}else if(w.value.length>0){w.value.pop();const n=w.value[w.value.length-1];if(n){const p=R(n);L.value=p.children.slice()}else L.value=z.value.slice(),w.value=[],v("selectDatapoint",void 0)}}function Re(t){var l;const a=R(t.id);return!!((l=a==null?void 0:a.children)!=null&&l.length||t.parentId)}const V=e.computed(()=>{const t=[{id:null,label:"All"}];if(w.value.length>0){let a=R(w.value[w.value.length-1]);const l=[];for(;a;)l.unshift(a),a=a.parentId?R(a.parentId):null;for(const n of l)t.push({id:n.id,label:n.name,node:n})}return t}),B=e.ref(null),be=e.computed(()=>z.value.map((t,a)=>({...t,color:s.convertColorToHex(t.color)||H.value[a]||s.palette[a]||s.palette[a%s.palette.length],shape:"square"})).sort((t,a)=>a.value-t.value).map((t,a)=>({...t,proportion:t.value/z.value.map(l=>l.value).reduce((l,n)=>l+n,0),opacity:g.value.includes(t.id)?.5:1}))),Le=e.computed(()=>({cy:"treemap-div-legend",backgroundColor:o.value.style.chart.legend.backgroundColor,color:o.value.style.chart.legend.color,fontSize:o.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:o.value.style.chart.legend.bold?"bold":""}));function ke(t){P.value=!1,B.value=null,g.value.includes(t.id)?g.value=g.value.filter(a=>a!==t.id):g.value.length<u.dataset.length-1&&g.value.push(t.id),v("selectLegend",pe.value)}const Z=e.ref(null);function Ae({datapoint:t,seriesIndex:a}){B.value=t,Z.value={datapoint:t,seriesIndex:a,config:o.value,series:q.value};const l=o.value.style.chart.tooltip.customFormat;if(s.isFunction(l)&&s.functionReturnsString(()=>l({seriesIndex:a,datapoint:t,series:q.value,config:o.value})))$.value=l({seriesIndex:a,datapoint:t,series:q.value,config:o.value});else{let n="";n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${o.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`,n+=`<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="${t.color}"/></svg>`,n+=`<b>${s.applyDataLabel(o.value.style.chart.layout.labels.formatter,t.value,s.dataLabel({p:o.value.style.chart.layout.labels.prefix,v:t.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.tooltip.roundingValue}),{datapoint:t,seriesIndex:a})}</b>`,$.value=`<div>${n}</div>`}C.value=!0}const N=e.computed(()=>{const t=M.value.map(l=>({name:l.name,color:l.color})),a=M.value.map(l=>l.value);return{head:t,body:a}});function Ce(){e.nextTick(()=>{const t=N.value.head.map((n,p)=>[[n.name],[N.value.body[p]],[isNaN(N.value.body[p]/A.value)?"-":N.value.body[p]/A.value*100]]),a=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(t),l=s.createCsvContent(a);s.downloadCsv({csvContent:l,title:o.value.style.chart.title.text||"vue-ui-treemap"})})}const G=e.computed(()=>{const t=[o.value.table.columnNames.series,o.value.table.columnNames.value,o.value.table.columnNames.percentage],a=N.value.head.map((p,E)=>{const Y=s.applyDataLabel(o.value.style.chart.layout.labels.formatter,N.value.body[E],s.dataLabel({p:o.value.style.chart.layout.labels.prefix,v:N.value.body[E],s:o.value.style.chart.layout.labels.suffix,r:o.value.table.td.roundingValue}));return[{color:p.color,name:p.name,shape:"square"},Y,isNaN(N.value.body[E]/A.value)?"-":s.dataLabel({v:N.value.body[E]/A.value*100,s:"%",r:o.value.table.td.roundingPercentage})]}),l={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint};return{colNames:[o.value.table.columnNames.series,o.value.table.columnNames.value],head:t,body:a,config:l}});function De(){return M.value}function we(){S.value.showTable=!S.value.showTable}function xe(){S.value.showTooltip=!S.value.showTooltip}const j=e.ref(!1);function J(){j.value=!j.value}const X=e.ref(null);function $e(t){X.value=t}function Te(){X.value=null}return c({getData:De,generateCsv:Ce,generateImage:ve,generatePdf:de,toggleTable:we,toggleTooltip:xe,toggleAnnotator:J}),(t,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:k,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${o.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; ${o.value.responsive?"height: 100%;":""} text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`treemap_${x.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(ne)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(ne)(!1))},[o.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ye._sfc_main,{key:0,svgRef:e.unref(se),backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,active:j.value,onClose:J},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Ve.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:te,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:_,style:e.normalizeStyle(`width:100%;background:${o.value.style.chart.backgroundColor};padding-bottom:6px`)},[(e.openBlock(),e.createBlock(Me._sfc_main,{key:`title_${oe.value}`,config:{title:{cy:"treemap-div-title",...o.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),o.value.userOptions.show&&f.value&&(e.unref(re)||e.unref(K))?(e.openBlock(),e.createBlock(Se.UserOptions,{ref:"details",key:`user_option_${y.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(ie),isImaging:e.unref(ce),uid:x.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasFullscreen:o.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:S.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:k.value,position:o.value.userOptions.position,hasAnnotator:o.value.userOptions.buttons.annotator,isAnnotation:j.value,onToggleFullscreen:Ie,onGeneratePdf:e.unref(de),onGenerateCsv:Ce,onGenerateImage:e.unref(ve),onToggleTable:we,onToggleTooltip:xe,onToggleAnnotator:J,style:e.normalizeStyle({visibility:e.unref(re)?e.unref(K)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:n})=>[e.renderSlot(t.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:n})),void 0,!0)]),key:"0"}:void 0,t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"7"}: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.length>1?(e.openBlock(),e.createElementBlock("nav",it,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(l,n)=>(e.openBlock(),e.createElementBlock("span",{role:"button",tabindex:n<V.value.length-1?0:void 0,key:l.id||"root",onClick:p=>n===V.value.length-1?()=>{}:W(l.node),onKeydown:[e.withKeys(e.withModifiers(p=>n===V.value.length-1?void 0:W(l.node),["prevent"]),["enter"]),e.withKeys(e.withModifiers(p=>n===V.value.length-1?void 0:W(l.node),["prevent"]),["space"])],class:"vue-ui-treemap-crumb","data-last-crumb":n===V.value.length-1,style:e.normalizeStyle({color:o.value.style.chart.color}),onMouseenter:p=>$e(n),onMouseleave:Te,onFocus:p=>$e(n),onBlur:Te},[e.createElementVNode("span",dt,[e.createElementVNode("span",vt,[e.renderSlot(t.$slots,"breadcrumb-label",e.mergeProps({ref_for:!0},{crumb:l,isRoot:n===0,isFocus:X.value===n}),()=>[n===0?(e.openBlock(),e.createElementBlock("div",ht,[e.createVNode(Je.default,{name:X.value===0?"homeFilled":"home",stroke:o.value.style.chart.color},null,8,["name","stroke"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(l.label),1)],64))],!0)]),n<V.value.length-1?(e.openBlock(),e.createElementBlock("span",pt,[e.renderSlot(t.$slots,"breadcrumb-arrow",{},()=>[a[5]||(a[5]=e.createTextVNode(" › "))],!0)])):e.createCommentVNode("",!0)])],44,ct))),128))])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:5,ref_key:"svgRef",ref:se,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!P.value,"vue-data-ui-zoom-minus":P.value}),viewBox:`${D.value.startX} ${D.value.startY} ${D.value.width<=0?10:D.value.width} ${D.value.height<=0?10:D.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:transparent;color:${o.value.style.chart.color}`)},[e.createVNode(Xe._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",mt,[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,yt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.lightenHexColor)(l.color,o.value.style.chart.layout.rects.gradient.intensity/100)},null,8,bt)],8,gt)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:ge(l),width:ye(l),fill:m.value?l.color:o.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${l.id})`:l.color,rx:o.value.style.chart.layout.rects.borderRadius,stroke:B.value&&B.value.id===l.id?o.value.style.chart.layout.rects.selected.stroke:o.value.style.chart.layout.rects.stroke,"stroke-width":B.value&&B.value.id===l.id?o.value.style.chart.layout.rects.selected.strokeWidth:o.value.style.chart.layout.rects.strokeWidth,onClick:e.withModifiers(p=>W(l),["stop"]),onMouseenter:()=>Ae({datapoint:l,seriesIndex:n}),onMouseleave:a[0]||(a[0]=p=>{B.value=null,C.value=!1}),style:e.normalizeStyle(`opacity:${B.value?B.value.id===l.id?1:o.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:e.normalizeClass(["vue-ui-treemap-rect",Re(l)?"vue-data-ui-zoom-plus":P.value?"vue-data-ui-zoom-minus":""])},null,46,kt),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:ge(l),width:ye(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",wt,[o.value.style.chart.layout.labels.showDefaultLabels&&(l.proportion>o.value.style.chart.layout.labels.hideUnderProportion||P.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${I(l)/1.5}px);text-align:left;line-height:${I(l)<14?14:I(l)}px;padding:${I(l)/3}px; color:${e.unref(s.adaptColorToBackground)(l.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${I(l)}px;`)},e.toDisplayString(l.name),5),a[6]||(a[6]=e.createElementVNode("br",null,null,-1)),e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${I(l)}px;`)},e.toDisplayString(e.unref(s.applyDataLabel)(o.value.style.chart.layout.labels.formatter,l.value,e.unref(s.dataLabel)({p:o.value.style.chart.layout.labels.prefix,v:l.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.layout.labels.rounding}),{datapoint:l})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"rect",e.mergeProps({ref_for:!0},{rect:l,shouldShow:l.proportion>o.value.style.chart.layout.labels.hideUnderProportion||P.value,fontSize:I(l),isZoom:P.value,textColor:e.unref(s.adaptColorToBackground)(l.color)}),void 0,!0)])],8,Ct))]))),256)),e.renderSlot(t.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:F.value,isZoom:P.value,rect:B.value,config:o.value})),void 0,!0)],14,ft)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",xt,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ie)||e.unref(ce)})),void 0,!0)])):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(We.default,{key:7,config:{type:"treemap",style:{backgroundColor:o.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:T},[o.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ue.Legend,{key:`legend_${ae.value}`,legendSet:be.value,config:Le.value,id:`treemap_legend_${x.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>ke(l))},{item:e.withCtx(({legend:l,index:n})=>[e.createElementVNode("div",{onClick:p=>ke(l),style:e.normalizeStyle(`opacity:${g.value.includes(l.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(s.applyDataLabel)(o.value.style.chart.layout.labels.formatter,l.value,e.unref(s.dataLabel)({p:o.value.style.chart.layout.labels.prefix,v:l.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.legend.roundingValue}),{datapoint:l}))+" ",1),g.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",St," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Tt," ("+e.toDisplayString(isNaN(l.value/A.value)?"-":(l.value/A.value*100).toFixed(o.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,$t)]),_:1},8,["legendSet","config","id"])):e.renderSlot(t.$slots,"legend",{key:1,legend:be.value},void 0,!0)],512),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"source",ref:ee,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(He._sfc_main,{show:S.value.showTooltip&&C.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,fontSize:o.value.style.chart.tooltip.fontSize,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:k.value,content:$.value,isFullscreen:b.value,isCustom:e.unref(s.isFunction)(o.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Z.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Z.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),f.value?(e.openBlock(),e.createBlock(je.default,{key:9,hideDetails:"",config:{open:S.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ge.DataTable,{key:`table_${le.value}`,colNames:G.value.colNames,head:G.value.head,body:G.value.body,config:G.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>S.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Bt)]),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,ut))}},_t=Qe._export_sfc(Nt,[["__scopeId","data-v-c7aece99"]]);exports.default=_t;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DlALYfRS.cjs"),Me=require("./Title-BiyGREAz.cjs"),Se=require("./usePrinter-n1HzfoSm.cjs"),He=require("./Tooltip-C-Kq18lz.cjs"),Ue=require("./Legend-qwuGpvF8.cjs"),We=require("./vue-ui-skeleton-C-I7hIHS.cjs"),Ge=require("./DataTable-OM4js4qI.cjs"),je=require("./vue-ui-accordion-CByAeInD.cjs"),Be=require("./useResponsive-DQmBAoBf.cjs"),Ne=require("./useNestedProp-BZX7zlGv.cjs"),Xe=require("./PackageVersion-Di-ZyR0_.cjs"),Ye=require("./PenAndPaper-CtYhqkG5.cjs"),Ke=require("./useUserOptionState-BgepsfED.cjs"),Ze=require("./useChartAccessibility-Cm7nkzTG.cjs"),Je=require("./BaseIcon-CmdFxgkp.cjs"),Qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function _e(r,c){const i=r.length;if(i===0)throw new Error(`Max aspect ratio cannot be computed: ${r} is an empty array`);{let d=1/0,u=-1/0,v=0;for(let f=0;f<i;f+=1){const m=r[f].normalizedValue;m<d&&(d=m),m>u&&(u=m),v+=m}return Math.max(c**2*u/v**2,v**2/(c**2*d))}}function Oe(r){const{xOffset:c,yOffset:i,width:d,height:u}=r;return{x0:c,y0:i,x1:c+d,y1:i+u}}function et(r,c,i){if(r.length===0)return!0;{const d=r.concat(c),u=_e(r,i),v=_e(d,i);return u>=v}}function tt(r){const c=[],i=r.length;for(let d=0;d<i;d+=1){const u=r[d],v=u.length;for(let h=0;h<v;h+=1)c.push(u[h])}return c}function ot(r,c){const i={...c,children:r};return Pe(i)}function lt(r){return(r.x1-r.x0)*(r.y1-r.y0)}function ze(r,c){const{width:i,height:d,xOffset:u,yOffset:v}=Q(c),h=r.length,f=r.map(y=>y.normalizedValue||0).reduce((y,g)=>y+g,0),m=f/d,x=f/i;let C=u,$=v;const b=[];if(i>=d){for(let y=0;y<h;y+=1){const g=r[y],k=$+g.normalizedValue/m,_={x0:C,y0:$,x1:C+m,y1:k},T=Object.assign({},g,_);$=k,b.push(T)}return b}else{for(let y=0;y<h;y+=1){const g=r[y],k=C+g.normalizedValue/x,_={x0:C,y0:$,x1:k,y1:$+x},T=Object.assign({},g,_);C=k,b.push(T)}return b}}function at(r){const c=Q(r),i=c.width,d=c.height;return Math.min(i,d)}function nt(r,c){const i=r.length,d=r.map(m=>m.value??0).reduce((m,x)=>m+x,0),u=c/d,v=[];let h,f;for(let m=0;m<i;m+=1)f=r[m],h=Object.assign({},f,{normalizedValue:f.value*(u||0)}),v.push(h);return v}function Q(r){const{x0:c,y0:i,x1:d,y1:u}=r;return{xOffset:c,yOffset:i,width:d-c,height:u-i}}function rt(r,c,i,d){let u=r,v=c,h=i,f=d;for(;;){const m=u.length;if(m===0){const b=ze(v,h);return f.concat(b)}const x=at(h),C=u[0],$=u.slice(1,m);if(et(v,C,x)){const b=v.concat(C);u=$,v=b,h=h,f=f}else{const b=v.length;let y=0;for(let T=0;T<b;T+=1)y+=v[T].normalizedValue;const g=st(h,y),k=ze(v,h),_=f.concat(k);u=u,v=[],h=g,f=_}}}function Pe(r){if(typeof r.children>"u"||!r.children.length)return[r];{const c=nt(r.children,lt(r)),i=rt(c,[],r,[]),d=i.length,u=[];for(let h=0;h<d;h+=1)u.push(Pe(i[h]));return tt(u)}}function st(r,c){const{width:i,height:d,xOffset:u,yOffset:v}=Q(r);if(i>=d){const h=c/d,f=i-h,m={xOffset:u+h,yOffset:v,width:f,height:d};return Oe(m)}else{const h=c/i,f=d-h,m={xOffset:u,yOffset:v+h,width:i,height:f};return Oe(m)}}const ut=["id"],it={key:4,class:"vue-ui-treemap-breadcrumbs","data-dom-to-png-ignore":""},ct=["tabindex","onClick","onKeydown","data-last-crumb","onMouseenter","onFocus"],dt={class:"vue-ui-treemap-crumb-unit"},vt={class:"vue-ui-treemap-crumb-unit-label"},ht={key:0,style:{width:"24px",display:"flex","align-items":"center"}},pt={key:0,class:"vue-ui-treemap-crumb-unit-arrow"},ft=["xmlns","viewBox"],mt={key:0},gt=["id"],yt=["stop-color"],bt=["stop-color"],kt=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],Ct=["x","y","height","width"],wt={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},xt={key:6,class:"vue-data-ui-watermark"},$t=["onClick"],Tt={key:0},St={key:1},Bt=["innerHTML"],Nt={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(r,{expose:c,emit:i}){const{vue_ui_treemap:d}=s.useConfig(),u=r,v=i,h=e.useSlots();e.onMounted(()=>{h["chart-background"]&&console.warn("VueUiTreemap does not support the #chart-background slot.")});const f=e.computed(()=>!!u.dataset&&u.dataset.length),m=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),x=e.ref(s.createUid()),C=e.ref(!1),$=e.ref(""),b=e.ref(!1),y=e.ref(0),g=e.ref([]),k=e.ref(null),_=e.ref(null),T=e.ref(null),ee=e.ref(null),te=e.ref(null),oe=e.ref(0),le=e.ref(0),ae=e.ref(0),o=e.computed({get:()=>ue(),set:t=>t}),{userOptionsVisible:K,setUserOptionsVisibility:ne,keepUserOptionState:re}=Ke.useUserOptionState({config:o.value}),{svgRef:se}=Ze.useChartAccessibility({config:o.value.style.chart.title});function ue(){const t=Ne.useNestedProp({userConfig:u.config,defaultConfig:d});return t.theme?{...Ne.useNestedProp({userConfig:s.themes.vue_ui_treemap[t.theme]||u.config,defaultConfig:t}),customPalette:s.themePalettes[t.theme]||s.palette}:t}e.watch(()=>u.config,t=>{o.value=ue(),K.value=!o.value.userOptions.showOnChartHover,oe.value+=1,le.value+=1,ae.value+=1,S.value.showTable=o.value.table.show,S.value.showTooltip=o.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:ie,isImaging:ce,generatePdf:de,generateImage:ve}=Se.usePrinter({elementId:`treemap_${x.value}`,fileName:o.value.style.chart.title.text||"vue-ui-treemap",options:o.value.userOptions.print}),Ve=e.computed(()=>o.value.userOptions.show&&!o.value.style.chart.title.text),H=e.computed(()=>s.convertCustomPalette(o.value.customPalette)),S=e.ref({showTable:o.value.table.show,showTooltip:o.value.style.chart.tooltip.show}),O=e.ref({height:o.value.style.chart.height,width:o.value.style.chart.width}),F=e.computed(()=>({bottom:O.value.height-o.value.style.chart.padding.bottom,height:O.value.height-o.value.style.chart.padding.top-o.value.style.chart.padding.bottom,left:o.value.style.chart.padding.left,right:O.value.width-o.value.style.chart.padding.right,top:o.value.style.chart.padding.top,vbHeight:O.value.height,vbWidth:O.value.width,width:O.value.width-o.value.style.chart.padding.left-o.value.style.chart.padding.right}));function he(t){t.forEach((a,l)=>{a.id=s.createUid(),a.color=s.convertColorToHex(a.color)||H.value[l]||s.palette[l]||s.palette[l%s.palette.length],a.children&&(a.children.forEach(n=>{n.parentId=a.id,n.color=a.color}),he(a.children))})}const z=e.ref(u.dataset),U=e.ref(null);e.onMounted(()=>{Ee()});function Ee(){if(s.objectIsEmpty(u.dataset)&&s.error({componentName:"VueUiTreemap",type:"dataset"}),he(z.value),o.value.responsive){const t=Be.throttle(()=>{const{width:a,height:l}=Be.useResponsive({chart:k.value,title:o.value.style.chart.title.text?_.value:null,legend:o.value.style.chart.legend.show?T.value:null,source:ee.value,noTitle:te.value});requestAnimationFrame(()=>{O.value.width=a,O.value.height=l})});U.value=new ResizeObserver(t),U.value.observe(k.value.parentNode)}}e.onBeforeUnmount(()=>{U.value&&U.value.disconnect()});const L=e.ref(z.value),q=e.computed(()=>L.value.map((t,a)=>({...t,color:s.convertColorToHex(t.color)||H.value[a]||s.palette[a]||s.palette[a%s.palette.length]})).filter(t=>!g.value.includes(t.id))),A=e.computed(()=>z.value.filter(t=>!g.value.includes(t.id)).map(t=>t.value||0).reduce((t,a)=>t+a,0)),pe=e.computed({get(){let t=[...q.value];return o.value.style.chart.layout.sorted&&(t=[...q.value].sort((a,l)=>l.value-a.value)),t.map(a=>({...a}))},set(t){return t}});function fe(t,a){return t.value/a}function Fe(t,a,l){const n=o.value.style.chart.layout.rects.colorRatio-fe(a,l);return s.lightenHexColor(t,n<0?0:n)}function me(t,a,l,n){return t.map((p,E)=>{const Y=Fe(s.convertColorToHex(a)||H.value[E]||s.palette[E]||s.palette[E%s.palette.length],p,n),qe=fe(p,n);return{...p,color:Y,proportion:qe,parentName:l,children:p.children?me(p.children,Y,p.name,n):void 0}})}const M=e.computed(()=>ot(pe.value.map((t,a)=>{const l=t.children?t.children.reduce((n,p)=>n+p.value,0):t.value;return{value:t.value,id:t.id,children:t.children?me(t.children.sort((n,p)=>p.value-n.value),t.color,t.name,l):void 0,color:t.color,name:t.name}}),{x0:F.value.left*2,y0:F.value.top,x1:F.value.width,y1:F.value.height}));function ge({y0:t,y1:a}){return a-t<=0?1e-4:a-t}function ye({x0:t,x1:a}){return a-t<=0?1e-4:a-t}function I(t){const a=o.value.style.chart.layout.labels.fontSize*(t.proportion*2>1?1:t.proportion*2);return a<o.value.style.chart.layout.labels.minFontSize?o.value.style.chart.layout.labels.minFontSize:a}function Ie(t){b.value=t,y.value+=1}const D=e.computed(()=>({startX:0,startY:0,width:F.value.vbWidth,height:F.value.vbHeight}));function R(t,a=z.value){for(const l of a){if(l.id===t)return l;if(l.children){const n=R(t,l.children);if(n)return n}}return null}const w=e.ref([]),P=e.computed(()=>w.value.length>0);function W(t){var l;if(!t){L.value=z.value.slice(),v("selectDatapoint",void 0),w.value=[];return}const a=R(t.id);if(a&&((l=a.children)!=null&&l.length))w.value.push(a.id),L.value=a.children.slice(),v("selectDatapoint",t);else if(t.parentId){w.value.push(t.parentId);const n=R(t.parentId);L.value=n.children.slice(),v("selectDatapoint",t)}else if(w.value.length>0){w.value.pop();const n=w.value[w.value.length-1];if(n){const p=R(n);L.value=p.children.slice()}else L.value=z.value.slice(),w.value=[],v("selectDatapoint",void 0)}}function Re(t){var l;const a=R(t.id);return!!((l=a==null?void 0:a.children)!=null&&l.length||t.parentId)}const V=e.computed(()=>{const t=[{id:null,label:"All"}];if(w.value.length>0){let a=R(w.value[w.value.length-1]);const l=[];for(;a;)l.unshift(a),a=a.parentId?R(a.parentId):null;for(const n of l)t.push({id:n.id,label:n.name,node:n})}return t}),B=e.ref(null),be=e.computed(()=>z.value.map((t,a)=>({...t,color:s.convertColorToHex(t.color)||H.value[a]||s.palette[a]||s.palette[a%s.palette.length],shape:"square"})).sort((t,a)=>a.value-t.value).map((t,a)=>({...t,proportion:t.value/z.value.map(l=>l.value).reduce((l,n)=>l+n,0),opacity:g.value.includes(t.id)?.5:1}))),Le=e.computed(()=>({cy:"treemap-div-legend",backgroundColor:o.value.style.chart.legend.backgroundColor,color:o.value.style.chart.legend.color,fontSize:o.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:o.value.style.chart.legend.bold?"bold":""}));function ke(t){P.value=!1,B.value=null,g.value.includes(t.id)?g.value=g.value.filter(a=>a!==t.id):g.value.length<u.dataset.length-1&&g.value.push(t.id),v("selectLegend",pe.value)}const Z=e.ref(null);function Ae({datapoint:t,seriesIndex:a}){B.value=t,Z.value={datapoint:t,seriesIndex:a,config:o.value,series:q.value};const l=o.value.style.chart.tooltip.customFormat;if(s.isFunction(l)&&s.functionReturnsString(()=>l({seriesIndex:a,datapoint:t,series:q.value,config:o.value})))$.value=l({seriesIndex:a,datapoint:t,series:q.value,config:o.value});else{let n="";n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${o.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`,n+=`<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="${t.color}"/></svg>`,n+=`<b>${s.applyDataLabel(o.value.style.chart.layout.labels.formatter,t.value,s.dataLabel({p:o.value.style.chart.layout.labels.prefix,v:t.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.tooltip.roundingValue}),{datapoint:t,seriesIndex:a})}</b>`,$.value=`<div>${n}</div>`}C.value=!0}const N=e.computed(()=>{const t=M.value.map(l=>({name:l.name,color:l.color})),a=M.value.map(l=>l.value);return{head:t,body:a}});function Ce(){e.nextTick(()=>{const t=N.value.head.map((n,p)=>[[n.name],[N.value.body[p]],[isNaN(N.value.body[p]/A.value)?"-":N.value.body[p]/A.value*100]]),a=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(t),l=s.createCsvContent(a);s.downloadCsv({csvContent:l,title:o.value.style.chart.title.text||"vue-ui-treemap"})})}const G=e.computed(()=>{const t=[o.value.table.columnNames.series,o.value.table.columnNames.value,o.value.table.columnNames.percentage],a=N.value.head.map((p,E)=>{const Y=s.applyDataLabel(o.value.style.chart.layout.labels.formatter,N.value.body[E],s.dataLabel({p:o.value.style.chart.layout.labels.prefix,v:N.value.body[E],s:o.value.style.chart.layout.labels.suffix,r:o.value.table.td.roundingValue}));return[{color:p.color,name:p.name,shape:"square"},Y,isNaN(N.value.body[E]/A.value)?"-":s.dataLabel({v:N.value.body[E]/A.value*100,s:"%",r:o.value.table.td.roundingPercentage})]}),l={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint};return{colNames:[o.value.table.columnNames.series,o.value.table.columnNames.value],head:t,body:a,config:l}});function De(){return M.value}function we(){S.value.showTable=!S.value.showTable}function xe(){S.value.showTooltip=!S.value.showTooltip}const j=e.ref(!1);function J(){j.value=!j.value}const X=e.ref(null);function $e(t){X.value=t}function Te(){X.value=null}return c({getData:De,generateCsv:Ce,generateImage:ve,generatePdf:de,toggleTable:we,toggleTooltip:xe,toggleAnnotator:J}),(t,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:k,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${o.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; ${o.value.responsive?"height: 100%;":""} text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`treemap_${x.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(ne)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(ne)(!1))},[o.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ye._sfc_main,{key:0,svgRef:e.unref(se),backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,active:j.value,onClose:J},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Ve.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:te,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:_,style:e.normalizeStyle(`width:100%;background:${o.value.style.chart.backgroundColor};padding-bottom:6px`)},[(e.openBlock(),e.createBlock(Me._sfc_main,{key:`title_${oe.value}`,config:{title:{cy:"treemap-div-title",...o.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),o.value.userOptions.show&&f.value&&(e.unref(re)||e.unref(K))?(e.openBlock(),e.createBlock(Se.UserOptions,{ref:"details",key:`user_option_${y.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(ie),isImaging:e.unref(ce),uid:x.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasFullscreen:o.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:S.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:k.value,position:o.value.userOptions.position,hasAnnotator:o.value.userOptions.buttons.annotator,isAnnotation:j.value,onToggleFullscreen:Ie,onGeneratePdf:e.unref(de),onGenerateCsv:Ce,onGenerateImage:e.unref(ve),onToggleTable:we,onToggleTooltip:xe,onToggleAnnotator:J,style:e.normalizeStyle({visibility:e.unref(re)?e.unref(K)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:n})=>[e.renderSlot(t.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:n})),void 0,!0)]),key:"0"}:void 0,t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"7"}: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.length>1?(e.openBlock(),e.createElementBlock("nav",it,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(l,n)=>(e.openBlock(),e.createElementBlock("span",{role:"button",tabindex:n<V.value.length-1?0:void 0,key:l.id||"root",onClick:p=>n===V.value.length-1?()=>{}:W(l.node),onKeydown:[e.withKeys(e.withModifiers(p=>n===V.value.length-1?void 0:W(l.node),["prevent"]),["enter"]),e.withKeys(e.withModifiers(p=>n===V.value.length-1?void 0:W(l.node),["prevent"]),["space"])],class:"vue-ui-treemap-crumb","data-last-crumb":n===V.value.length-1,style:e.normalizeStyle({color:o.value.style.chart.color}),onMouseenter:p=>$e(n),onMouseleave:Te,onFocus:p=>$e(n),onBlur:Te},[e.createElementVNode("span",dt,[e.createElementVNode("span",vt,[e.renderSlot(t.$slots,"breadcrumb-label",e.mergeProps({ref_for:!0},{crumb:l,isRoot:n===0,isFocus:X.value===n}),()=>[n===0?(e.openBlock(),e.createElementBlock("div",ht,[e.createVNode(Je.default,{name:X.value===0?"homeFilled":"home",stroke:o.value.style.chart.color},null,8,["name","stroke"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(l.label),1)],64))],!0)]),n<V.value.length-1?(e.openBlock(),e.createElementBlock("span",pt,[e.renderSlot(t.$slots,"breadcrumb-arrow",{},()=>[a[5]||(a[5]=e.createTextVNode(" › "))],!0)])):e.createCommentVNode("",!0)])],44,ct))),128))])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:5,ref_key:"svgRef",ref:se,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!P.value,"vue-data-ui-zoom-minus":P.value}),viewBox:`${D.value.startX} ${D.value.startY} ${D.value.width<=0?10:D.value.width} ${D.value.height<=0?10:D.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:transparent;color:${o.value.style.chart.color}`)},[e.createVNode(Xe._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",mt,[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,yt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.lightenHexColor)(l.color,o.value.style.chart.layout.rects.gradient.intensity/100)},null,8,bt)],8,gt)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:ge(l),width:ye(l),fill:m.value?l.color:o.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${l.id})`:l.color,rx:o.value.style.chart.layout.rects.borderRadius,stroke:B.value&&B.value.id===l.id?o.value.style.chart.layout.rects.selected.stroke:o.value.style.chart.layout.rects.stroke,"stroke-width":B.value&&B.value.id===l.id?o.value.style.chart.layout.rects.selected.strokeWidth:o.value.style.chart.layout.rects.strokeWidth,onClick:e.withModifiers(p=>W(l),["stop"]),onMouseenter:()=>Ae({datapoint:l,seriesIndex:n}),onMouseleave:a[0]||(a[0]=p=>{B.value=null,C.value=!1}),style:e.normalizeStyle(`opacity:${B.value?B.value.id===l.id?1:o.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:e.normalizeClass(["vue-ui-treemap-rect",Re(l)?"vue-data-ui-zoom-plus":P.value?"vue-data-ui-zoom-minus":""])},null,46,kt),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:ge(l),width:ye(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",wt,[o.value.style.chart.layout.labels.showDefaultLabels&&(l.proportion>o.value.style.chart.layout.labels.hideUnderProportion||P.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${I(l)/1.5}px);text-align:left;line-height:${I(l)<14?14:I(l)}px;padding:${I(l)/3}px; color:${e.unref(s.adaptColorToBackground)(l.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${I(l)}px;`)},e.toDisplayString(l.name),5),a[6]||(a[6]=e.createElementVNode("br",null,null,-1)),e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${I(l)}px;`)},e.toDisplayString(e.unref(s.applyDataLabel)(o.value.style.chart.layout.labels.formatter,l.value,e.unref(s.dataLabel)({p:o.value.style.chart.layout.labels.prefix,v:l.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.layout.labels.rounding}),{datapoint:l})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"rect",e.mergeProps({ref_for:!0},{rect:l,shouldShow:l.proportion>o.value.style.chart.layout.labels.hideUnderProportion||P.value,fontSize:I(l),isZoom:P.value,textColor:e.unref(s.adaptColorToBackground)(l.color)}),void 0,!0)])],8,Ct))]))),256)),e.renderSlot(t.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:F.value,isZoom:P.value,rect:B.value,config:o.value})),void 0,!0)],14,ft)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",xt,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ie)||e.unref(ce)})),void 0,!0)])):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(We.default,{key:7,config:{type:"treemap",style:{backgroundColor:o.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:T},[o.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ue.Legend,{key:`legend_${ae.value}`,legendSet:be.value,config:Le.value,id:`treemap_legend_${x.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>ke(l))},{item:e.withCtx(({legend:l,index:n})=>[e.createElementVNode("div",{onClick:p=>ke(l),style:e.normalizeStyle(`opacity:${g.value.includes(l.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(s.applyDataLabel)(o.value.style.chart.layout.labels.formatter,l.value,e.unref(s.dataLabel)({p:o.value.style.chart.layout.labels.prefix,v:l.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.legend.roundingValue}),{datapoint:l}))+" ",1),g.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",St," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Tt," ("+e.toDisplayString(isNaN(l.value/A.value)?"-":(l.value/A.value*100).toFixed(o.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,$t)]),_:1},8,["legendSet","config","id"])):e.renderSlot(t.$slots,"legend",{key:1,legend:be.value},void 0,!0)],512),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"source",ref:ee,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(He._sfc_main,{show:S.value.showTooltip&&C.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,fontSize:o.value.style.chart.tooltip.fontSize,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:k.value,content:$.value,isFullscreen:b.value,isCustom:e.unref(s.isFunction)(o.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Z.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Z.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),f.value?(e.openBlock(),e.createBlock(je.default,{key:9,hideDetails:"",config:{open:S.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ge.DataTable,{key:`table_${le.value}`,colNames:G.value.colNames,head:G.value.head,body:G.value.body,config:G.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>S.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Bt)]),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,ut))}},_t=Qe._export_sfc(Nt,[["__scopeId","data-v-c7aece99"]]);exports.default=_t;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { useCssVars as ct, useSlots as ht, computed as m, ref as i, watch as Ue, onMounted as Xe, onBeforeUnmount as pt, createElementBlock as r, openBlock as u, unref as d, normalizeStyle as c, normalizeClass as A, createBlock as B, createCommentVNode as p, renderSlot as b, createVNode as Y, createSlots as ce, withCtx as _, normalizeProps as X, guardReactiveProps as E, createElementVNode as n, toDisplayString as h, Fragment as H, renderList as W, mergeProps as yt, withKeys as gt, createTextVNode as ft } from "vue";
|
|
2
|
-
import { u as bt, c as mt, t as _t, p as R, a as kt, b as $t, o as Ee, e as K, v as N, d as he, i as le, f as D, X as wt, s as pe, w as xt, q as Ct, r as Tt, x as Lt, y as Nt } from "./index-
|
|
2
|
+
import { u as bt, c as mt, t as _t, p as R, a as kt, b as $t, o as Ee, e as K, v as N, d as he, i as le, f as D, X as wt, s as pe, w as xt, q as Ct, r as Tt, x as Lt, y as Nt } from "./index-bVqxfptX.js";
|
|
3
3
|
import { t as St, u as Pt } from "./useResponsive-Cw4oZ8sQ.js";
|
|
4
|
-
import { _ as Vt } from "./Title-
|
|
5
|
-
import { u as It, U as Ot } from "./usePrinter-
|
|
6
|
-
import { _ as Ft } from "./Tooltip-
|
|
7
|
-
import { L as He } from "./Legend-
|
|
8
|
-
import Mt from "./vue-ui-skeleton-
|
|
9
|
-
import zt from "./BaseIcon-
|
|
10
|
-
import At from "./vue-ui-accordion-
|
|
11
|
-
import { u as We } from "./useNestedProp-
|
|
12
|
-
import { _ as Bt } from "./PackageVersion-
|
|
13
|
-
import { _ as Rt } from "./PenAndPaper-
|
|
4
|
+
import { _ as Vt } from "./Title-B55VMGbm.js";
|
|
5
|
+
import { u as It, U as Ot } from "./usePrinter-BbeIGqpA.js";
|
|
6
|
+
import { _ as Ft } from "./Tooltip-CMiCE06y.js";
|
|
7
|
+
import { L as He } from "./Legend-DqxOfhbM.js";
|
|
8
|
+
import Mt from "./vue-ui-skeleton-BARmXI9_.js";
|
|
9
|
+
import zt from "./BaseIcon-DPO_4Adb.js";
|
|
10
|
+
import At from "./vue-ui-accordion-DQKCLM2T.js";
|
|
11
|
+
import { u as We } from "./useNestedProp-DU-vsdTb.js";
|
|
12
|
+
import { _ as Bt } from "./PackageVersion-gI4tUgWr.js";
|
|
13
|
+
import { _ as Rt } from "./PenAndPaper-Di3hcmp3.js";
|
|
14
14
|
import { u as Dt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
|
-
import { _ as Ge } from "./Shape-
|
|
15
|
+
import { _ as Ge } from "./Shape-DJcgH2ks.js";
|
|
16
16
|
import { u as Ut } from "./useChartAccessibility-BWojgys7.js";
|
|
17
17
|
import { _ as Xt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
18
18
|
const Et = ["id"], Ht = ["onClick"], Wt = ["xmlns", "viewBox"], Gt = ["width", "height"], jt = ["id"], qt = ["stop-color"], Yt = ["stop-color"], Kt = { key: 1 }, Jt = ["x", "y", "width", "height", "fill", "rx"], Qt = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], Zt = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], ea = ["x2", "y1", "y2", "stroke", "stroke-width"], ta = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], aa = ["x", "y", "text-anchor", "font-size", "fill", "font-weight"], la = ["x", "y", "font-size", "fill", "font-weight"], oa = ["x", "y", "font-size", "fill", "font-weight"], na = ["x", "y", "font-size", "fill", "font-weight"], ua = ["y", "width", "height", "fill", "onMouseenter"], sa = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-DlALYfRS.cjs"),ge=require("./useResponsive-DQmBAoBf.cjs"),Re=require("./Title-BiyGREAz.cjs"),me=require("./usePrinter-n1HzfoSm.cjs"),qe=require("./Tooltip-C-Kq18lz.cjs"),be=require("./Legend-qwuGpvF8.cjs"),Ue=require("./vue-ui-skeleton-C-I7hIHS.cjs"),He=require("./BaseIcon-CmdFxgkp.cjs"),Xe=require("./vue-ui-accordion-CByAeInD.cjs"),ke=require("./useNestedProp-BZX7zlGv.cjs"),je=require("./PackageVersion-Di-ZyR0_.cjs"),We=require("./PenAndPaper-CtYhqkG5.cjs"),Ge=require("./useUserOptionState-BgepsfED.cjs"),Ce=require("./Shape-CHiMFkEQ.cjs"),Ye=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Je=["id"],Qe=["onClick"],Ze=["xmlns","viewBox"],et=["width","height"],tt=["id"],lt=["stop-color"],at=["stop-color"],ot={key:1},nt=["x","y","width","height","fill","rx"],rt=["x","y","width","height","fill","rx","stroke","stroke-width"],ut=["x","y","width","height","fill","rx","stroke","stroke-width"],st=["x2","y1","y2","stroke","stroke-width"],it=["x1","x2","y1","y2","stroke","stroke-width"],ct=["x","y","text-anchor","font-size","fill","font-weight"],dt=["x","y","font-size","fill","font-weight"],vt=["x","y","font-size","fill","font-weight"],ht=["x","y","font-size","fill","font-weight"],pt=["y","width","height","fill","onMouseenter"],yt={key:6,class:"vue-data-ui-watermark"},ft=["onClick"],gt={style:"width:100%;padding-top: 36px;position:relative"},mt={class:"vue-ui-data-table"},bt={key:0},kt={style:{width:"100%"}},Ct=["data-cell"],_t={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},xt=["data-cell"],wt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Nt=["data-cell"],$t={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},St=["data-cell"],Vt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Tt=["data-cell"],Bt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Et=["data-cell"],Lt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Pt=["data-cell"],zt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Dt={__name:"vue-ui-vertical-bar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(_e,{expose:xe,emit:we}){e.useCssVars(a=>({a6ba6a4e:a.tdo}));const{vue_ui_vertical_bar:Ne}=n.useConfig(),$e=e.useSlots(),g=_e,E=e.computed(()=>!!g.dataset&&g.dataset.length),f=e.ref(n.createUid()),Se=e.ref(null),F=e.ref(!1),I=e.ref(""),L=e.ref(0),Ve=e.ref(null),X=e.ref(0),V=e.ref(null),j=e.ref(null),M=e.ref(null),W=e.ref(null),G=e.ref(null),Y=e.ref(0),A=e.ref(0),Te=we,t=e.computed({get:()=>Z(),set:a=>a}),{userOptionsVisible:R,setUserOptionsVisibility:K,keepUserOptionState:J}=Ge.useUserOptionState({config:t.value}),{svgRef:Q}=Ye.useChartAccessibility({config:t.value.style.chart.title});function Z(){const a=ke.useNestedProp({userConfig:g.config,defaultConfig:Ne});return a.theme?{...ke.useNestedProp({userConfig:n.themes.vue_ui_vertical_bar[a.theme]||g.config,defaultConfig:a}),customPalette:n.themePalettes[a.theme]||n.palette}:a}e.watch(()=>g.config,a=>{t.value=Z(),R.value=!t.value.userOptions.showOnChartHover,ue(),Y.value+=1,A.value+=1,s.value=t.value.style.chart.layout.bars.height,c.value=t.value.style.chart.layout.bars.gap,h.value.showTable=t.value.table.show,h.value.sortDesc=t.value.style.chart.layout.bars.sort==="desc",h.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0}),e.watch(()=>g.dataset,z,{deep:!0});const{isPrinting:ee,isImaging:te,generatePdf:le,generateImage:ae}=me.usePrinter({elementId:`vue-ui-vertical-bar_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-vertical-bar",options:t.value.userOptions.print}),Be=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),oe=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),ne=e.ref(null),re=e.ref(!1),Ee=e.computed(()=>t.value.table.responsiveBreakpoint),P=e.ref(null);e.onMounted(()=>{ue()});function ue(){if(n.objectIsEmpty(g.dataset)&&n.error({componentName:"VueUiVerticalBar",type:"dataset"}),L.value=g.dataset.flatMap(a=>a.children&&a.children.length>0?a.children.length:1).reduce((a,o)=>a+o,0),Le(),t.value.responsive){const a=ge.throttle(()=>{const{width:o,height:l}=ge.useResponsive({chart:V.value,title:t.value.style.chart.title.text?j.value:null,legend:t.value.style.chart.legend.show?M.value:null,source:W.value,noTitle:G.value});requestAnimationFrame(()=>{ce.value=o,s.value=l/L.value-c.value*2})});P.value=new ResizeObserver(a),P.value.observe(V.value.parentNode)}}e.onBeforeUnmount(()=>{P.value&&P.value.disconnect()});function Le(){new ResizeObserver(o=>{o.forEach(l=>{re.value=l.contentRect.width<Ee.value})}).observe(ne.value)}const h=e.ref({showTable:t.value.table.show,sortDesc:t.value.style.chart.layout.bars.sort==="desc",showTooltip:t.value.style.chart.tooltip.show}),se=e.computed(()=>h.value.sortDesc),x=e.computed(()=>(g.dataset.forEach((a,o)=>{!a.value&&!a.children&&n.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`value (index ${o})`}),a.children&&(n.objectIsEmpty(a.children)?n.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`children (index ${o})`}):a.children.forEach((l,r)=>{[null,void 0].includes(l.name)&&n.error({componentName:"VueUiVerticalBar",type:"datasetSerieAttribute",property:"name",key:"children",index:r})}))}),g.dataset.map((a,o)=>{const l=`vertical_parent_${o}_${f.value}`,r=a.children&&a.children.length>0,v=n.checkNaN(a.value?a.value:r?a.children.map(y=>y.value||0).reduce((y,C)=>y+C,0):0),d=v>=0?1:-1;return{...a,id:l,absoluteIndex:o,shape:"square",opacity:b.value.includes(l)?.5:1,value:Math.abs(v),sign:d,hasChildren:r,isChild:!1,segregate:()=>T(l),isSegregated:b.value.includes(l),color:n.convertColorToHex(a.color)||oe.value[o]||n.palette[o]||n.palette[o%n.palette.length],children:!a.children||!a.children.length?[]:a.children.toSorted(D.value?()=>0:(y,C)=>se.value?C.value-y.value:y.value-C.value).map((y,C)=>({...y,value:n.checkNaN(Math.abs(y.value)),absoluteIndex:o,sign:y.value>=0?1:-1,isChild:!0,parentId:l,parentName:a.name,parentValue:v,parentSign:d,id:`vertical_child_${o}_${C}_${f.value}`,childIndex:C,color:n.convertColorToHex(y.color)||n.convertColorToHex(a.color)||oe.value[o]||n.palette[o]||n.palette[o%n.palette.length]})).map((y,C)=>({...y,isFirstChild:C===0,isLastChild:C===a.children.length-1}))}}).toSorted(D.value?()=>0:(a,o)=>se.value?o.value-a.value:a.value-o.value))),ie=e.computed(()=>({cy:"vertical-bar-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),s=e.ref(t.value.style.chart.layout.bars.height),c=e.ref(t.value.style.chart.layout.bars.gap),Pe=e.computed(()=>(s.value+c.value)*L.value),ce=e.ref(512),i=e.computed(()=>({width:ce.value,height:Pe.value,padding:{top:12,left:128+t.value.style.chart.layout.bars.offsetX,right:64+t.value.style.chart.layout.bars.paddingRight,bottom:12}})),u=e.computed(()=>({fullHeight:i.value.padding.top+i.value.padding.bottom+i.value.height,top:i.value.padding.top,left:i.value.padding.left,right:i.value.width-i.value.padding.right,bottom:i.value.padding.top+i.value.height,width:i.value.width-(i.value.padding.left+i.value.padding.right)}));function z(){L.value=w.value.flatMap(a=>a.children&&a.children.length>0?a.children.length:1).reduce((a,o)=>a+o,0)}const b=e.ref([]);function T(a){b.value.includes(a)?b.value=b.value.filter(o=>o!==a):b.value.push(a),z(),Te("selectLegend",w.value)}const w=e.computed(()=>x.value.filter(a=>!b.value.includes(a.id))),k=e.computed(()=>w.value.map(a=>Math.abs(a.value)).reduce((a,o)=>a+o,0));function de(a,o=!1,l=0){return o?n.dataLabel({v:n.checkNaN(Math.abs(a)/k.value*100),s:"%",r:l}):Math.abs(a)/k.value}const N=e.computed(()=>w.value.flatMap(a=>a.hasChildren?a.children:a)),$=e.computed(()=>N.value.map(a=>a.sign).includes(-1)),ze=e.computed(()=>Math.max(...w.value.flatMap(a=>a.children&&a.children.length?Math.max(...a.children.map(o=>o.value)):a.value)));function p(a){const o=a/ze.value;return u.value.width/($.value?2:1)*o}function De(a){return p(a)+u.value.left}function B(a,o){const l=w.value.find(d=>d.id===a.parentId),r=u.value.top+(c.value+s.value)*o,v=l.children.length*(c.value+s.value);return{y:r+v/2-t.value.style.chart.layout.bars.parentLabels.fontSize,name:l.name,value:[void 0,NaN,null].includes(l.value)?"":l.sign===1?l.value:-l.value,percentageToTotal:isNaN(l.value/k.value)?"":de(l.value,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage),sign:l.sign}}function Oe(){return w.value}const q=e.ref(null),U=e.ref(null);function Fe(a,o){U.value={datapoint:a,seriesIndex:o,series:x.value,config:t.value},F.value=!0,q.value=a.id;let l="";const r=a.isChild?a.parentName:a.name,v=a.isChild?a.name:"",d=t.value.style.chart.tooltip.customFormat;n.isFunction(d)&&n.functionReturnsString(()=>d({datapoint:a,series:x.value,config:t.value,seriesIndex:o}))?I.value=d({datapoint:a,series:x.value,config:t.value,seriesIndex:o}):(l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;text-align:left;">
|
|
2
2
|
<div style="display:flex;align-items:center;gap:4px;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="${a.color}"/>${$e.pattern?`<rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="url(#pattern_${f.value}_${a.absoluteIndex})"/>`:""}</svg> ${r}</div>
|
|
3
3
|
${v?`<div>${v}</div>`:""}
|
|
4
4
|
</div>`,t.value.style.chart.tooltip.showValue&&(l+=`<div>${t.value.translations.value}: <b>${n.applyDataLabel(t.value.style.chart.layout.bars.dataLabels.value.formatter,a.sign===1?a.value:-a.value,n.dataLabel({p:t.value.style.chart.tooltip.prefix,v:a.sign===1?a.value:-a.value,s:t.value.style.chart.tooltip.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:o})}</b></div>`),t.value.style.chart.tooltip.showPercentage&&(l+=`<div>${t.value.translations.percentageToTotal} : <b>${n.dataLabel({v:Math.abs(a.value)/k.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`,a.isChild&&(l+=`<div>${t.value.translations.percentageToSerie}: <b>${n.dataLabel({v:Math.abs(a.value)/Math.abs(a.parentValue)*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`)),I.value=`<div style="text-align:left">${l}</div>`)}function ve(a,o,l,r){if(!t.value.style.chart.layout.bars.dataLabels.value.show)return"";const v=n.applyDataLabel(t.value.style.chart.layout.bars.dataLabels.value.formatter,n.checkNaN(r===-1&&a>=0?-a:a),n.dataLabel({p:t.value.style.chart.layout.bars.dataLabels.value.prefix,v:n.checkNaN(r===-1&&a>=0?-a:a),s:t.value.style.chart.layout.bars.dataLabels.value.suffix,r:t.value.style.chart.layout.bars.dataLabels.value.roundingValue}),{datapoint:o,seriesIndex:l}),d=`(${de(a,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)})`;return`${v}${t.value.style.chart.layout.bars.dataLabels.percentage.show?` ${d}`:""}`}const m=e.computed(()=>{const a=[t.value.translations.parentName,t.value.translations.value,t.value.translations.percentageToTotal,t.value.translations.childName,t.value.translations.value,t.value.translations.percentageToSerie,t.value.translations.percentageToTotal],o=N.value.map(l=>l.isChild?l.isFirstChild?{color:l.color,parentName:l.parentName,parentValue:l.parentValue,percentageToTotal:l.parentValue/k.value,childName:l.name,childValue:l.sign===1?l.value:-l.value,childPercentageToParent:Math.abs(l.value)/Math.abs(l.parentValue),childPercentageToTotal:Math.abs(l.value)/k.value}:{color:"",parentName:"",parentValue:"",percentageToTotal:"",childName:l.name,childValue:l.sign===1?l.value:-l.value,childPercentageToParent:Math.abs(l.value)/Math.abs(l.parentValue),childPercentageToTotal:Math.abs(l.value)/k.value}:{color:l.color,parentName:l.name,parentValue:l.sign===1?l.value:-l.value,percentageToTotal:Math.abs(l.value)/k.value,childName:"",childValue:"",childPercentageToParent:"",childPercentageToTotal:""});return{head:a,body:o}});function he(){const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=m.value.head,l=m.value.body.map(d=>[d.parentName,d.parentValue,d.percentageToTotal,d.childName,d.childValue,d.childPercentageToParent,d.childPercentageToTotal]),r=a.concat([o]).concat(l),v=n.createCsvContent(r);n.downloadCsv({csvContent:v,title:t.value.style.chart.title.text||"vue-ui-vertical-bar"})}const S=e.ref(!1);function Ie(a){S.value=a,X.value+=1}function pe(){h.value.showTable=!h.value.showTable}const Me=e.ref({none:0,asc:1,desc:2}),_=e.ref(0),D=e.ref(!1);e.onMounted(()=>{["none","asc","desc"].includes(t.value.style.chart.layout.bars.sort)||n.error({componentName:"VueUiVerticalBar",type:"attributeWrongValue",property:"style.chart.layout.bars.sort",key:t.value.style.chart.layout.bars.sort}),_.value=Me.value[t.value.style.chart.layout.bars.sort],h.value.sortDesc=_.value===2,D.value=_.value===0});function Ae(){_.value+=1,_.value>2&&(_.value=0)}function ye(){Ae(),h.value.sortDesc=_.value===2,D.value=_.value===0,z()}function fe(){h.value.showTooltip=!h.value.showTooltip}const O=e.ref(!1);function H(){O.value=!O.value}return xe({getData:Oe,recalculateHeight:z,generatePdf:le,generateCsv:he,generateImage:ae,toggleTable:pe,toggleSort:ye,toggleTooltip:fe,toggleAnnotator:H}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-vertical-bar ${S.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"verticalBarChart",ref:V,id:`vue-ui-vertical-bar_${f.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),onMouseenter:o[5]||(o[5]=()=>e.unref(K)(!0)),onMouseleave:o[6]||(o[6]=()=>e.unref(K)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(We._sfc_main,{key:0,svgRef:e.unref(Q),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:O.value,onClose:H},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Be.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:G,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:j,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Re._sfc_main,{key:`title_${Y.value}`,config:{title:{cy:"vertical-bar-div-title",...t.value.style.chart.title},subtitle:{cy:"vertical-bar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&E.value&&(e.unref(J)||e.unref(R))?(e.openBlock(),e.createBlock(me.UserOptions,{ref_key:"details",ref:Se,key:`user_options_${X.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(te),isPrinting:e.unref(ee),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasSort:t.value.userOptions.buttons.sort,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:S.value,isTooltip:h.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:V.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:O.value,onToggleFullscreen:Ie,onGeneratePdf:e.unref(le),onGenerateCsv:he,onGenerateImage:e.unref(ae),onToggleTable:pe,onToggleSort:ye,onToggleTooltip:fe,onToggleAnnotator:H,style:e.normalizeStyle({visibility:e.unref(J)?e.unref(R)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:r})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:r})),void 0,!0)]),key:"0"}:void 0,a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,a.$slots.optionSort?{name:"optionSort",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionSort",{},void 0,!0)]),key:"7"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"8"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"9"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasSort","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show&&t.value.style.chart.legend.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:4,ref_key:"chartLegend",ref:M},[(e.openBlock(),e.createBlock(be.Legend,{key:`legend_top_${A.value}`,legendSet:x.value,config:ie.value,onClickMarker:o[0]||(o[0]=({legend:l})=>T(l.id))},e.createSlots({item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{onClick:v=>T(l.id),style:e.normalizeStyle(`opacity:${b.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.bars.dataLabels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.legend.prefix,v:l.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:r})),13,Qe)]),_:2},[a.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:l,index:r})=>[e.createVNode(Ce._sfc_main,{shape:l.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${f.value}_${r})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"]))],512)):e.createCommentVNode("",!0),E.value?(e.openBlock(),e.createElementBlock("svg",{key:5,ref_key:"svgRef",ref:Q,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),viewBox:`0 0 ${i.value.width<=0?10:i.value.width} ${u.value.fullHeight<=0?10:u.value.fullHeight}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(je._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:i.value.width<=0?10:i.value.width,height:u.value.fullHeight<=0?10:u.value.fullHeight,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,et)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`vertical_bar_gradient_${f.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":l.color},null,8,lt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.03),100-t.value.style.chart.layout.bars.gradientIntensity)},null,8,at)],8,tt))),256)),a.$slots.pattern?(e.openBlock(),e.createElementBlock("g",ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,l=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(a.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:l.absoluteIndex,patternId:`pattern_${f.value}_${l.absoluteIndex}`}),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:e.unref(n.checkNaN)($.value?u.value.left+u.value.width/2-(l.sign===1?0:p(l.value)<=0?1e-4:p(l.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(p(l.value)<=0?1e-4:p(l.value)),height:s.value<=0?1e-4:s.value,fill:t.value.style.chart.layout.bars.underlayerColor,rx:t.value.style.chart.layout.bars.borderRadius,class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,nt)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:e.unref(n.checkNaN)($.value?u.value.left+u.value.width/2-(l.sign===1?0:p(l.value)<=0?1e-4:p(l.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(p(l.value)<=0?1e-4:p(l.value)),height:s.value<=0?1e-4:s.value,fill:t.value.style.chart.layout.bars.useGradient?`url(#vertical_bar_gradient_${f.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.bars.fillOpacity),rx:t.value.style.chart.layout.bars.borderRadius,stroke:t.value.style.chart.layout.bars.useStroke?l.color:"none","stroke-width":t.value.style.chart.layout.bars.useStroke?t.value.style.chart.layout.bars.strokeWidth:0,class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,rt),a.$slots.pattern?(e.openBlock(),e.createElementBlock("rect",{key:0,x:e.unref(n.checkNaN)($.value?u.value.left+u.value.width/2-(l.sign===1?0:p(l.value)<=0?1e-4:p(l.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(p(l.value)<=0?1e-4:p(l.value)),height:s.value<=0?1e-4:s.value,fill:`url(#pattern_${f.value}_${l.absoluteIndex})`,rx:t.value.style.chart.layout.bars.borderRadius,stroke:t.value.style.chart.layout.bars.useStroke?l.color:"none","stroke-width":t.value.style.chart.layout.bars.useStroke?t.value.style.chart.layout.bars.strokeWidth:0,class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,ut)):e.createCommentVNode("",!0),(!l.isChild||l.isLastChild)&&t.value.style.chart.layout.separators.show&&r!==N.value.length-1?(e.openBlock(),e.createElementBlock("line",{key:1,x1:0,x2:u.value.left,y1:s.value+c.value/2+u.value.top+(c.value+s.value)*r,y2:s.value+c.value/2+u.value.top+(c.value+s.value)*r,stroke:t.value.style.chart.layout.separators.color,"stroke-width":t.value.style.chart.layout.separators.strokeWidth,"stroke-linecap":"round"},null,8,st)):e.createCommentVNode("",!0),$.value&&t.value.style.chart.layout.separators.show?(e.openBlock(),e.createElementBlock("line",{key:2,x1:u.value.left+u.value.width/2,x2:u.value.left+u.value.width/2,y1:u.value.top,y2:u.value.bottom,stroke:t.value.style.chart.layout.separators.color,"stroke-width":t.value.style.chart.layout.separators.strokeWidth,"stroke-linecap":"round"},null,8,it)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:$.value?u.value.left+u.value.width/2+(l.sign===1?-12:12)+(l.sign===1?-t.value.style.chart.layout.bars.dataLabels.offsetX:t.value.style.chart.layout.bars.dataLabels.offsetX):De(l.value)+3+t.value.style.chart.layout.bars.dataLabels.offsetX,y:u.value.top+(c.value+s.value)*r+s.value/2+t.value.style.chart.layout.bars.dataLabels.fontSize/2,"text-anchor":!$.value||l.sign===-1?"start":"end","font-size":t.value.style.chart.layout.bars.dataLabels.fontSize,fill:t.value.style.chart.layout.bars.dataLabels.color,"font-weight":t.value.style.chart.layout.bars.dataLabels.bold?"bold":"normal"},e.toDisplayString(ve(l.value,l,r,l.sign)),9,ct),(l.isChild||!l.hasChildren)&&t.value.style.chart.layout.bars.nameLabels.show?(e.openBlock(),e.createElementBlock("text",{key:3,"text-anchor":"end",x:u.value.left-3+t.value.style.chart.layout.bars.nameLabels.offsetX,y:u.value.top+(c.value+s.value)*r+s.value/2+t.value.style.chart.layout.bars.nameLabels.fontSize/2,"font-size":t.value.style.chart.layout.bars.nameLabels.fontSize,fill:t.value.style.chart.layout.bars.nameLabels.color,"font-weight":t.value.style.chart.layout.bars.nameLabels.bold?"bold":"normal"},e.toDisplayString(l.name),9,dt)):e.createCommentVNode("",!0),l.isChild&&l.childIndex===0&&t.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:4,x:3+t.value.style.chart.layout.bars.parentLabels.offsetX,y:B(l,r).y,"font-size":t.value.style.chart.layout.bars.parentLabels.fontSize,fill:t.value.style.chart.layout.bars.parentLabels.color,"font-weight":t.value.style.chart.layout.bars.parentLabels.bold?"bold":"normal","text-anchor":"start"},e.toDisplayString(B(l,r).name),9,vt)):e.createCommentVNode("",!0),l.isChild&&l.childIndex===0&&t.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:5,x:3+t.value.style.chart.layout.bars.parentLabels.offsetX,y:B(l,r).y+t.value.style.chart.layout.bars.parentLabels.fontSize+6,"font-size":t.value.style.chart.layout.bars.parentLabels.fontSize,fill:t.value.style.chart.layout.bars.parentLabels.color,"font-weight":t.value.style.chart.layout.bars.dataLabels.bold?"bold":"normal","text-anchor":"start"},e.toDisplayString(ve(B(l,r).value),B(l,r),r,l.parentSign||l.sign),9,ht)):e.createCommentVNode("",!0),e.createElementVNode("rect",{x:0,y:u.value.top+(c.value+s.value)*r-c.value/2,width:i.value.width<=0?1e-4:i.value.width,height:s.value+c.value<=0?1e-4:s.value+c.value,fill:q.value===l.id?e.unref(n.setOpacity)(t.value.style.chart.layout.highlighter.color,t.value.style.chart.layout.highlighter.opacity):"transparent",onMouseenter:v=>Fe(l,r),onMouseleave:o[1]||(o[1]=v=>{Ve.value=null,F.value=!1,q.value=null})},null,40,pt)]))),256)),e.renderSlot(a.$slots,"svg",{svg:i.value},void 0,!0)],14,Ze)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",yt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ee)||e.unref(te)})),void 0,!0)])):e.createCommentVNode("",!0),E.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ue.default,{key:7,config:{type:"verticalBar",style:{backgroundColor:t.value.style.chart.backgroundColor,verticalBar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show&&t.value.style.chart.legend.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"chartLegend",ref:M},[(e.openBlock(),e.createBlock(be.Legend,{key:`legend_bottom_${A.value}`,legendSet:x.value,config:ie.value,onClickMarker:o[2]||(o[2]=({legend:l})=>T(l.id))},e.createSlots({item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{onClick:v=>T(l.id),style:e.normalizeStyle(`opacity:${b.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.bars.dataLabels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.legend.prefix,v:l.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:r})),13,ft)]),_:2},[a.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:l,index:r})=>[e.createVNode(Ce._sfc_main,{shape:l.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${f.value}_${r})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"]))],512)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:x.value},void 0,!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:9,ref_key:"source",ref:W,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(qe._sfc_main,{show:h.value.showTooltip&&F.value&&b.value.length<g.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:V.value,content:I.value,isFullscreen:S.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...U.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...U.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),E.value?(e.openBlock(),e.createBlock(Xe.default,{key:10,hideDetails:"",config:{open:h.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:ne,class:"vue-ui-vertical-bar-table atom-data-table"},[e.createElementVNode("div",gt,[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:o[3]||(o[3]=l=>h.value.showTable=!1),onKeypress:o[4]||(o[4]=e.withKeys(l=>h.value.showTable=!1,["enter"]))},[e.createVNode(He.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("div",{style:{width:"100%","container-type":"inline-size"},class:e.normalizeClass({"vue-ui-responsive":re.value})},[e.createElementVNode("table",mt,[e.createElementVNode("caption",{style:e.normalizeStyle({backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline}),class:"vue-ui-data-table__caption"},[e.createTextVNode(e.toDisplayString(t.value.style.chart.title.text)+" ",1),t.value.style.chart.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",bt,e.toDisplayString(t.value.style.chart.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value.head,l=>(e.openBlock(),e.createElementBlock("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline}`)},[e.createElementVNode("div",kt,e.toDisplayString(l),1)],4))),256))],4),e.createElementVNode("tr",null,[e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},"∑ "+e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(isNaN(k.value)?"":k.value.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),5),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},"100%",4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4)])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value.body,(l,r)=>(e.openBlock(),e.createElementBlock("tr",{class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline};font-variant-numeric: tabular-nums;`),"data-cell":m.value.head[0]??""},[e.createElementVNode("div",_t,[l.color?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`color:${l.color};margin-right:3px`)},"⬤",4)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(l.parentName),1)])],12,Ct),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[1]??""},[e.createElementVNode("div",wt,e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(["",NaN,void 0].includes(l.parentValue)?"":l.parentValue.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),1)],12,xt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[2]??""},[e.createElementVNode("div",$t,e.toDisplayString(["",NaN,void 0].includes(l.percentageToTotal)?"":`${(l.percentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,Nt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[3]??""},[e.createElementVNode("div",Vt,e.toDisplayString(l.childName),1)],12,St),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[4]??""},[e.createElementVNode("div",Bt,e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(["",NaN,void 0].includes(l.childValue)?"":l.childValue.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),1)],12,Tt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[5]??""},[e.createElementVNode("div",Lt,e.toDisplayString(["",NaN,void 0].includes(l.childPercentageToParent)?"":`${(l.childPercentageToParent*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,Et),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[6]??""},[e.createElementVNode("div",zt,e.toDisplayString(["",NaN,void 0].includes(l.childPercentageToTotal)?"":`${(l.childPercentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,Pt)],6))),256))])])],2)])],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Je))}},Ot=Ke._export_sfc(Dt,[["__scopeId","data-v-3535bb6b"]]);exports.default=Ot;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { useSlots as at, computed as d, ref as v, watch as Ne, onMounted as ot, onBeforeUnmount as ut, createElementBlock as r, openBlock as s, unref as c, normalizeStyle as H, normalizeClass as Be, createBlock as N, createCommentVNode as p, createElementVNode as x, createVNode as re, createSlots as Ve, withCtx as m, renderSlot as g, normalizeProps as U, guardReactiveProps as G, Fragment as $, renderList as L, mergeProps as Me, toDisplayString as A, createTextVNode as De, nextTick as st } from "vue";
|
|
2
|
-
import { u as rt, c as nt, t as it, p as B, a as vt, o as ct, e as ne, g as dt, b as ht, i as j, f as _, X as ft, s as pt, w as yt, G as gt, J as mt, d as bt, q as wt, r as kt, x as xt, y as Ct } from "./index-
|
|
2
|
+
import { u as rt, c as nt, t as it, p as B, a as vt, o as ct, e as ne, g as dt, b as ht, i as j, f as _, X as ft, s as pt, w as yt, G as gt, J as mt, d as bt, q as wt, r as kt, x as xt, y as Ct } from "./index-bVqxfptX.js";
|
|
3
3
|
import { t as $t, u as _t } from "./useResponsive-Cw4oZ8sQ.js";
|
|
4
|
-
import { _ as It } from "./Title-
|
|
5
|
-
import { u as Tt, U as St } from "./usePrinter-
|
|
6
|
-
import { _ as Ot } from "./Tooltip-
|
|
7
|
-
import { D as Pt } from "./DataTable-
|
|
8
|
-
import { L as Lt } from "./Legend-
|
|
9
|
-
import At from "./vue-ui-skeleton-
|
|
10
|
-
import Ft from "./vue-ui-accordion-
|
|
11
|
-
import { u as Re } from "./useNestedProp-
|
|
12
|
-
import { _ as zt } from "./PackageVersion-
|
|
13
|
-
import { _ as Nt } from "./PenAndPaper-
|
|
4
|
+
import { _ as It } from "./Title-B55VMGbm.js";
|
|
5
|
+
import { u as Tt, U as St } from "./usePrinter-BbeIGqpA.js";
|
|
6
|
+
import { _ as Ot } from "./Tooltip-CMiCE06y.js";
|
|
7
|
+
import { D as Pt } from "./DataTable-BaAjwD5U.js";
|
|
8
|
+
import { L as Lt } from "./Legend-DqxOfhbM.js";
|
|
9
|
+
import At from "./vue-ui-skeleton-BARmXI9_.js";
|
|
10
|
+
import Ft from "./vue-ui-accordion-DQKCLM2T.js";
|
|
11
|
+
import { u as Re } from "./useNestedProp-DU-vsdTb.js";
|
|
12
|
+
import { _ as zt } from "./PackageVersion-gI4tUgWr.js";
|
|
13
|
+
import { _ as Nt } from "./PenAndPaper-Di3hcmp3.js";
|
|
14
14
|
import { u as Bt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
|
-
import { _ as Vt } from "./Shape-
|
|
15
|
+
import { _ as Vt } from "./Shape-DJcgH2ks.js";
|
|
16
16
|
import { u as Mt } from "./useChartAccessibility-BWojgys7.js";
|
|
17
17
|
import { _ as Dt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
18
18
|
const Rt = ["id"], Ut = ["xmlns", "viewBox"], Gt = ["id"], jt = ["stop-color"], Et = ["stop-color"], Wt = ["id"], qt = ["x", "y", "height", "width"], Ht = ["height", "width"], Xt = { key: 0 }, Yt = ["rx", "x", "y", "height", "width", "stroke", "stroke-width", "filter"], Jt = ["rx", "x", "y", "height", "width", "fill", "stroke", "stroke-width", "filter"], Kt = { key: 1 }, Qt = ["rx", "x", "y", "height", "width", "fill", "filter"], Zt = ["x", "y", "height", "width", "filter"], el = { key: 0 }, tl = { key: 1 }, ll = { key: 2 }, al = { key: 3 }, ol = ["onMouseover", "x", "y", "height", "width"], ul = {
|