vue-data-ui 2.10.8 → 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/dist/{Arrow-aCcBx0NS.js → Arrow-DCEAiiSq.js} +1 -1
- package/dist/{Arrow-NnfTvwbg.cjs → Arrow-kcA0IBBo.cjs} +1 -1
- package/dist/{BaseIcon-DmfPEj6j.cjs → BaseIcon-CmdFxgkp.cjs} +1 -1
- package/dist/{BaseIcon-DTt4YbQE.js → BaseIcon-DPO_4Adb.js} +1 -1
- package/dist/{ColorPicker-DrovFYIL.js → ColorPicker-D0FMoBTo.js} +3 -3
- package/dist/{ColorPicker-DsEujcIN.cjs → ColorPicker-DJn8_rVA.cjs} +1 -1
- package/dist/{DataTable-CX-Ynkp4.js → DataTable-BaAjwD5U.js} +2 -2
- package/dist/{DataTable-zSU-0X__.cjs → DataTable-OM4js4qI.cjs} +1 -1
- package/dist/{Legend-BTvPguV6.js → Legend-DqxOfhbM.js} +2 -2
- package/dist/{Legend-DFQ4iWI3.cjs → Legend-qwuGpvF8.cjs} +1 -1
- package/dist/{PackageVersion-DxR-fKLM.cjs → PackageVersion-Di-ZyR0_.cjs} +1 -1
- package/dist/{PackageVersion-CkUbRQrt.js → PackageVersion-gI4tUgWr.js} +1 -1
- package/dist/{PenAndPaper-CG9o3ymS.cjs → PenAndPaper-CtYhqkG5.cjs} +1 -1
- package/dist/{PenAndPaper-Br3OdauM.js → PenAndPaper-Di3hcmp3.js} +3 -3
- package/dist/{Shape-D9l3WJGO.cjs → Shape-CHiMFkEQ.cjs} +1 -1
- package/dist/{Shape-Y1FgLdPz.js → Shape-DJcgH2ks.js} +1 -1
- package/dist/{Slicer-B7FJCuCB.cjs → Slicer-BrBOWXeJ.cjs} +1 -1
- package/dist/{Slicer-C2GR76As.js → Slicer-DWZhB9e4.js} +2 -2
- package/dist/{Title-tlFeM12I.js → Title-B55VMGbm.js} +1 -1
- package/dist/{Title-CEZO2hzQ.cjs → Title-BiyGREAz.cjs} +1 -1
- package/dist/{Tooltip-BZa-QzER.cjs → Tooltip-C-Kq18lz.cjs} +1 -1
- package/dist/{Tooltip-BCtHh3BT.js → Tooltip-CMiCE06y.js} +1 -1
- package/dist/{dom-to-png-CjxHTZgX.js → dom-to-png-C6TvW1Fi.js} +1 -1
- package/dist/{dom-to-png-fAhFmKHV.cjs → dom-to-png-vuA7iQ84.cjs} +1 -1
- package/dist/{img-Ds_hWTTu.cjs → img-DHHWE-ji.cjs} +1 -1
- package/dist/{img-w_iFTYRY.js → img-z4AasNO4.js} +1 -1
- package/dist/{index-Dy2-pNb6.cjs → index-DlALYfRS.cjs} +1 -1
- package/dist/{index-Co5UfCMK.js → index-bVqxfptX.js} +1 -1
- package/dist/{pdf-BfkOvZWw.js → pdf-Ch5KSecz.js} +1 -1
- package/dist/{pdf-CCdcXY_7.cjs → pdf-D2qvws06.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-DQ8Jt3-Y.cjs → useNestedProp-BZX7zlGv.cjs} +1 -1
- package/dist/{useNestedProp-C22WP03t.js → useNestedProp-DU-vsdTb.js} +1 -1
- package/dist/{usePrinter-D_wgo-7k.js → usePrinter-BbeIGqpA.js} +3 -3
- package/dist/{usePrinter-BQEYwy4a.cjs → usePrinter-n1HzfoSm.cjs} +1 -1
- package/dist/{vue-data-ui-C18HDIa2.js → vue-data-ui-BI_bQ5jM.js} +62 -62
- package/dist/{vue-data-ui-zmg06AF1.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-C_gJuhTV.cjs → vue-ui-3d-bar-BBKU0pAV.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-SB6p5amV.js → vue-ui-3d-bar-MSs9iIHL.js} +9 -9
- package/dist/{vue-ui-accordion-dVGUWjXH.cjs → vue-ui-accordion-CByAeInD.cjs} +1 -1
- package/dist/{vue-ui-accordion-CfB_jW1X.js → vue-ui-accordion-DQKCLM2T.js} +3 -3
- package/dist/{vue-ui-age-pyramid-DZ_ajGY_.cjs → vue-ui-age-pyramid-D05rUuJG.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-G8ggvkGU.js → vue-ui-age-pyramid-pX29qF4-.js} +10 -10
- package/dist/{vue-ui-annotator-DeoWv4A3.js → vue-ui-annotator-BuG8aus2.js} +2 -2
- package/dist/{vue-ui-annotator-BkZat_7T.cjs → vue-ui-annotator-CvcBBO7e.cjs} +1 -1
- package/dist/{vue-ui-bullet-CvjS0_Pz.js → vue-ui-bullet-B9Xg6ifm.js} +8 -8
- package/dist/{vue-ui-bullet-D9jaszdm.cjs → vue-ui-bullet-BdvVX5da.cjs} +1 -1
- package/dist/{vue-ui-candlestick-xBYW3oOn.js → vue-ui-candlestick-B_iC_QzE.js} +11 -11
- package/dist/{vue-ui-candlestick-gnsNiFI3.cjs → vue-ui-candlestick-DPEZe5JP.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-BKQIWhzt.js → vue-ui-carousel-table-DGEoBYe-.js} +4 -4
- package/dist/{vue-ui-carousel-table-DNW8HJNv.cjs → vue-ui-carousel-table-DOB6NiBx.cjs} +1 -1
- package/dist/{vue-ui-chestnut-C5RprHfl.js → vue-ui-chestnut-CiWVelvx.js} +8 -8
- package/dist/{vue-ui-chestnut-D9UKh8la.cjs → vue-ui-chestnut-DxF_6jB2.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-Cx4gGG1K.js → vue-ui-circle-pack-CJN2ybvx.js} +9 -9
- package/dist/{vue-ui-circle-pack-OTXbeD89.cjs → vue-ui-circle-pack-XEEX0oEn.cjs} +1 -1
- package/dist/{vue-ui-cursor-BuEDX1kV.cjs → vue-ui-cursor-7loRJMGF.cjs} +1 -1
- package/dist/{vue-ui-cursor-Cdvi-0lD.js → vue-ui-cursor-CqAjc9W_.js} +2 -2
- package/dist/{vue-ui-dashboard-BAPaHtqr.cjs → vue-ui-dashboard-CQn61jnh.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BLHl6FJI.js → vue-ui-dashboard-CdpzgIs_.js} +62 -62
- package/dist/{vue-ui-digits-CCAt8_aJ.js → vue-ui-digits-7ACjmgPM.js} +2 -2
- package/dist/{vue-ui-digits-YV4qxb86.cjs → vue-ui-digits-CuxGcV9M.cjs} +1 -1
- package/dist/{vue-ui-donut-BvjPFjpd.cjs → vue-ui-donut-BtvQmKji.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-DNhwy9qU.js → vue-ui-donut-evolution-BpEJNoJM.js} +11 -11
- package/dist/{vue-ui-donut-evolution-Dxx5Psl4.cjs → vue-ui-donut-evolution-fOc16UtY.cjs} +1 -1
- package/dist/{vue-ui-donut-CNZIha3Z.js → vue-ui-donut-m7KcUt0k.js} +12 -12
- package/dist/{vue-ui-dumbbell-MGMSs7vG.cjs → vue-ui-dumbbell-BTvPq02T.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-BmRkAtBK.js → vue-ui-dumbbell-Sy7rxejU.js} +10 -10
- package/dist/vue-ui-flow-BccWxEzt.cjs +3 -0
- package/dist/{vue-ui-flow-CxhJwDZa.js → vue-ui-flow-CbszU2ms.js} +314 -326
- package/dist/{vue-ui-funnel-CJHKcUDg.js → vue-ui-funnel-D3b6l6X6.js} +9 -9
- package/dist/{vue-ui-funnel-twMmn36_.cjs → vue-ui-funnel-D87BZsNK.cjs} +1 -1
- package/dist/{vue-ui-galaxy-BjBTNZ6j.cjs → vue-ui-galaxy-CDGqzTCy.cjs} +1 -1
- package/dist/{vue-ui-galaxy-CDonLoXv.js → vue-ui-galaxy-CUuzThWx.js} +11 -11
- package/dist/{vue-ui-gauge-C7L0uVvx.js → vue-ui-gauge-24FEcSzr.js} +7 -7
- package/dist/{vue-ui-gauge-DXadxMZn.cjs → vue-ui-gauge-B6RkYKug.cjs} +1 -1
- package/dist/{vue-ui-gizmo-u7ypeW6n.cjs → vue-ui-gizmo-BAsoCXMw.cjs} +1 -1
- package/dist/{vue-ui-gizmo-C9JuTLL-.js → vue-ui-gizmo-DeYTfhQU.js} +3 -3
- package/dist/{vue-ui-heatmap-DaAgigHH.js → vue-ui-heatmap-DpmJyXn-.js} +10 -10
- package/dist/{vue-ui-heatmap-Cjckqsrg.cjs → vue-ui-heatmap-QCkbTog8.cjs} +1 -1
- package/dist/{vue-ui-history-plot-YLMX8PqM.cjs → vue-ui-history-plot-BAW3WchG.cjs} +1 -1
- package/dist/{vue-ui-history-plot-KoGpnC64.js → vue-ui-history-plot-CBeiEcTE.js} +11 -11
- package/dist/{vue-ui-kpi-DNUDGlWM.js → vue-ui-kpi-3gKMDrTH.js} +3 -3
- package/dist/{vue-ui-kpi-GZlFX5zg.cjs → vue-ui-kpi-Pki59wPC.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-D1HhmCbC.cjs → vue-ui-mini-loader-BdSgh6y-.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-9YvdM0_A.js → vue-ui-mini-loader-Bo-F8i3n.js} +2 -2
- package/dist/{vue-ui-molecule-DDsKb9re.cjs → vue-ui-molecule-Bbs_Vy-A.cjs} +1 -1
- package/dist/{vue-ui-molecule-B71fJREj.js → vue-ui-molecule-DkVkHwM_.js} +11 -11
- package/dist/{vue-ui-mood-radar-DH4RYmdT.js → vue-ui-mood-radar-7qs15-ye.js} +11 -11
- package/dist/{vue-ui-mood-radar-BO4yaBxo.cjs → vue-ui-mood-radar-DcyKE-45.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-bOXvQ01U.js → vue-ui-nested-donuts-BYwluLLM.js} +11 -11
- package/dist/{vue-ui-nested-donuts-BlxuqLPb.cjs → vue-ui-nested-donuts-iifvTxeT.cjs} +1 -1
- package/dist/{vue-ui-onion-D7VhEicc.js → vue-ui-onion-B7Asvx4M.js} +11 -11
- package/dist/{vue-ui-onion-BugH4ThJ.cjs → vue-ui-onion-DsS8vdCr.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-DjTMM1Zt.cjs → vue-ui-parallel-coordinate-plot-CWyjLwOL.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-Bc5Yr0Yr.js → vue-ui-parallel-coordinate-plot-CayH9RQe.js} +12 -12
- package/dist/{vue-ui-quadrant-Dni5Lkhg.cjs → vue-ui-quadrant--6zm3Tkv.cjs} +1 -1
- package/dist/{vue-ui-quadrant-PrjG5beo.js → vue-ui-quadrant-BSjpS3JD.js} +12 -12
- package/dist/{vue-ui-quick-chart-C46V8Ffa.js → vue-ui-quick-chart-DbfWPULd.js} +9 -9
- package/dist/{vue-ui-quick-chart-LuGKbIvU.cjs → vue-ui-quick-chart-DkUGMBfD.cjs} +1 -1
- package/dist/{vue-ui-radar-j2Vgot8p.cjs → vue-ui-radar-BrA-apr-.cjs} +1 -1
- package/dist/{vue-ui-radar-05pd47HM.js → vue-ui-radar-CvK5Nz5U.js} +12 -12
- package/dist/{vue-ui-rating-Bl_q3TYs.js → vue-ui-rating-C5qFRKy9.js} +2 -2
- package/dist/{vue-ui-rating-ClxiMhPq.cjs → vue-ui-rating-ctOiwHRD.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-BuoQTWw_.cjs → vue-ui-relation-circle-35rE0_C0.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-Bu5eYbEg.js → vue-ui-relation-circle-ChUKc3S5.js} +7 -7
- package/dist/{vue-ui-ridgeline-ESRn_Q1y.cjs → vue-ui-ridgeline-C_LoyQPY.cjs} +1 -1
- package/dist/{vue-ui-ridgeline-D4ot7MF8.js → vue-ui-ridgeline-DDrBrbxq.js} +12 -12
- package/dist/{vue-ui-rings-Dyl5VV9I.js → vue-ui-rings-DGhi_Jcb.js} +12 -12
- package/dist/{vue-ui-rings-D7o_vleu.cjs → vue-ui-rings-IM473vOr.cjs} +1 -1
- package/dist/{vue-ui-scatter-B31kZz0w.cjs → vue-ui-scatter-B7h_hWj7.cjs} +1 -1
- package/dist/{vue-ui-scatter-njuULIsD.js → vue-ui-scatter-DS9rUuE5.js} +12 -12
- package/dist/{vue-ui-skeleton-BSlYUHZA.js → vue-ui-skeleton-BARmXI9_.js} +3 -3
- package/dist/{vue-ui-skeleton-Db7PiDqL.cjs → vue-ui-skeleton-C-I7hIHS.cjs} +1 -1
- package/dist/{vue-ui-smiley-BmNRkSub.js → vue-ui-smiley-Ce4Rju1r.js} +2 -2
- package/dist/{vue-ui-smiley-CfdbRWq6.cjs → vue-ui-smiley-DwI6j0i8.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-CwtYlUEX.cjs → vue-ui-spark-trend-BfcDH-Gp.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-B0Xvu1YP.js → vue-ui-spark-trend-CE1USqg6.js} +5 -5
- package/dist/{vue-ui-sparkbar-e2-8wHQH.js → vue-ui-sparkbar-B3NBNGl8.js} +4 -4
- package/dist/{vue-ui-sparkbar-Xy7idkhv.cjs → vue-ui-sparkbar-CdDBwkff.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-vjcDqzGe.cjs → vue-ui-sparkgauge-CPq_DRcO.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-_cMBBl3V.js → vue-ui-sparkgauge-Kgl_vvc7.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-BpD6XxfA.cjs → vue-ui-sparkhistogram-B9Mf4nA9.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-DUyGQgqZ.js → vue-ui-sparkhistogram-DNvaByAm.js} +5 -5
- package/dist/{vue-ui-sparkline-D1wfG3Yw.js → vue-ui-sparkline-6fUsXxoo.js} +4 -4
- package/dist/{vue-ui-sparkline-cPPxz94c.cjs → vue-ui-sparkline-DPFtUR9k.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-BCTx016Z.js → vue-ui-sparkstackbar-B_O87Udb.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-iRVpx_xT.cjs → vue-ui-sparkstackbar-D8gErBiD.cjs} +1 -1
- package/dist/{vue-ui-stackbar--QKW68d6.js → vue-ui-stackbar-SQkqb5uZ.js} +13 -13
- package/dist/{vue-ui-stackbar-DCotybpB.cjs → vue-ui-stackbar-a7bzDCRQ.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-CdceC4jP.cjs → vue-ui-strip-plot-BbCMpSG9.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-BhLBOV7s.js → vue-ui-strip-plot-Czg_UcLg.js} +11 -11
- package/dist/{vue-ui-table-DjDENKmJ.js → vue-ui-table-B0ANgSAH.js} +3 -3
- package/dist/{vue-ui-table-Cd9UeZXy.cjs → vue-ui-table-DTys0wh5.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-CZdiE-l3.js → vue-ui-table-heatmap---afBYht.js} +4 -4
- package/dist/{vue-ui-table-heatmap-gbdWhEG_.cjs → vue-ui-table-heatmap-B46ApT8a.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-BFQ4DQRu.cjs → vue-ui-table-sparkline-CSi_2E82.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-zGotm14D.js → vue-ui-table-sparkline-cuO4BEcb.js} +5 -5
- package/dist/{vue-ui-thermometer-CRhrvWm0.cjs → vue-ui-thermometer-Bco6ThIk.cjs} +1 -1
- package/dist/{vue-ui-thermometer-DA3KgSw1.js → vue-ui-thermometer-Cu3N2aZN.js} +7 -7
- package/dist/{vue-ui-timer-ult9htF3.js → vue-ui-timer-DnQAvYVy.js} +5 -5
- package/dist/{vue-ui-timer-DnXYrfrB.cjs → vue-ui-timer-GkxVjTEC.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-Dht-uT9E.cjs → vue-ui-tiremarks-CNW6BXVF.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-CRXtVmEM.js → vue-ui-tiremarks-PX1AQ6u9.js} +7 -7
- package/dist/{vue-ui-treemap-Ck5tHVnE.js → vue-ui-treemap-Drg5MEcW.js} +12 -12
- package/dist/{vue-ui-treemap-pbhS4FfC.cjs → vue-ui-treemap-dm6Ion7A.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-egz76l34.js → vue-ui-vertical-bar-BtkKFF7C.js} +12 -12
- package/dist/{vue-ui-vertical-bar-BZjsolLB.cjs → vue-ui-vertical-bar-eA-iYb9s.cjs} +1 -1
- package/dist/{vue-ui-waffle-CrMkCjJJ.js → vue-ui-waffle-BAFVYzdi.js} +12 -12
- package/dist/{vue-ui-waffle-C7za7d0u.cjs → vue-ui-waffle-Bn77Yd88.cjs} +1 -1
- package/dist/{vue-ui-wheel-DIgPyNrB.cjs → vue-ui-wheel-D4VdCS3n.cjs} +1 -1
- package/dist/{vue-ui-wheel-DzMpr4xY.js → vue-ui-wheel-fMANwaEy.js} +7 -7
- package/dist/{vue-ui-word-cloud-TS3az-LK.js → vue-ui-word-cloud-Du0UUBsh.js} +10 -10
- package/dist/{vue-ui-word-cloud-CNqAz548.cjs → vue-ui-word-cloud-bX4J2Y8V.cjs} +1 -1
- package/dist/{vue-ui-world-D3X01xYB.js → vue-ui-world-B-Guo08O.js} +11 -11
- package/dist/{vue-ui-world-DMdqTY5G.cjs → vue-ui-world-BHNBu5o5.cjs} +1 -1
- package/dist/{vue-ui-xy-tIBPr8r8.js → vue-ui-xy-BN9Lh6Ic.js} +16 -16
- package/dist/{vue-ui-xy-CF87Afh2.cjs → vue-ui-xy-BkQt8l_A.cjs} +2 -2
- package/dist/{vue-ui-xy-canvas-BHeV-3t9.js → vue-ui-xy-canvas-D9avmh08.js} +12 -12
- package/dist/{vue-ui-xy-canvas-2IL8lPL4.cjs → vue-ui-xy-canvas-cfQsHd-5.cjs} +1 -1
- package/package.json +1 -1
- package/dist/vue-ui-flow-B3t_sNr4.cjs +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-Dy2-pNb6.cjs"),ye=require("./useResponsive-DQmBAoBf.cjs"),Fe=require("./Title-CEZO2hzQ.cjs"),me=require("./usePrinter-BQEYwy4a.cjs"),ze=require("./Tooltip-BZa-QzER.cjs"),Oe=require("./DataTable-zSU-0X__.cjs"),Ae=require("./Legend-DFQ4iWI3.cjs"),De=require("./vue-ui-skeleton-Db7PiDqL.cjs"),qe=require("./vue-ui-accordion-dVGUWjXH.cjs"),ge=require("./useNestedProp-DQ8Jt3-Y.cjs"),Me=require("./PackageVersion-DxR-fKLM.cjs"),Re=require("./PenAndPaper-CG9o3ymS.cjs"),Ue=require("./useUserOptionState-BgepsfED.cjs"),je=require("./Shape-D9l3WJGO.cjs"),Ge=require("./useChartAccessibility-Cm7nkzTG.cjs"),We=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),He=["id"],Ye=["xmlns","viewBox"],Xe=["id"],Je=["stop-color"],Ke=["stop-color"],Qe=["id"],Ze=["x","y","height","width"],et=["height","width"],tt={key:0},lt=["rx","x","y","height","width","stroke","stroke-width","filter"],at=["rx","x","y","height","width","fill","stroke","stroke-width","filter"],ot={key:1},rt=["rx","x","y","height","width","fill","filter"],nt=["x","y","height","width","filter"],ut={key:0},st={key:1},it={key:2},ct={key:3},vt=["onMouseover","x","y","height","width"],dt={key:5,class:"vue-data-ui-watermark"},pt=["onClick"],ht={key:0},ft={key:1},yt=["innerHTML"],mt={__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(be,{expose:ke,emit:we}){const{vue_ui_waffle:Ce}=u.useConfig(),p=be,xe=e.useSlots(),V=e.computed(()=>!!p.dataset&&p.dataset.length),f=e.ref(u.createUid()),Be=e.ref(null),O=e.ref(!1),A=e.ref(""),B=e.ref(null),j=e.ref(0),N=e.ref(null),G=e.ref(null),W=e.ref(null),H=e.ref(null),Y=e.ref(null),X=e.ref(0),J=e.ref(0),K=e.ref(0),t=e.computed({get:()=>te(),set:l=>l}),{userOptionsVisible:D,setUserOptionsVisibility:Q,keepUserOptionState:Z}=Ue.useUserOptionState({config:t.value}),{svgRef:ee}=Ge.useChartAccessibility({config:t.value.style.chart.title});function te(){const l=ge.useNestedProp({userConfig:p.config,defaultConfig:Ce});return l.theme?{...ge.useNestedProp({userConfig:u.themes.vue_ui_waffle[l.theme]||p.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}e.watch(()=>p.config,l=>{t.value=te(),D.value=!t.value.userOptions.showOnChartHover,le(),X.value+=1,J.value+=1,K.value+=1,y.value.showTable=t.value.table.show,y.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const P=e.ref(null);function le(){if(u.objectIsEmpty(p.dataset)?u.error({componentName:"VueUiWaffle",type:"dataset"}):p.dataset.forEach((l,o)=>{u.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{u.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=ye.throttle(()=>{const{width:o,height:a}=ye.useResponsive({chart:N.value,title:t.value.style.chart.title.text?G.value:null,legend:t.value.style.chart.legend.show?W.value:null,source:H.value,noTitle:Y.value});requestAnimationFrame(()=>{C.value.width=o,C.value.height=a,m.value.width=o,m.value.height=a})});P.value=new ResizeObserver(l),P.value.observe(N.value.parentNode)}}e.onMounted(()=>{le()}),e.onBeforeUnmount(()=>{P.value&&P.value.disconnect()});const{isPrinting:ae,isImaging:oe,generatePdf:re,generateImage:ne}=me.usePrinter({elementId:`vue-ui-waffle_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-waffle",options:t.value.userOptions.print}),_e=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ue=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),C=e.ref({height:512,width:512}),m=e.ref({top:0,left:0,height:512,width:512}),g=e.computed(()=>(m.value.width-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),b=e.computed(()=>(m.value.height-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),T=e.computed(()=>m.value.width/t.value.style.chart.layout.grid.size),E=e.computed(()=>m.value.height/t.value.style.chart.layout.grid.size);function se(l){const o=t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.size,a=l.reduce((h,U)=>h+U,0),r=l.map(h=>h/a*o),n=r.map(Math.floor),i=r.map(h=>h%1);let d=o-n.reduce((h,U)=>h+U,0);for(;d>0;){let h=i.indexOf(Math.max(...i));n[h]+=1,i[h]=0,d-=1}return n}function ie(){return p.dataset.map((l,o)=>({...l,color:u.convertColorToHex(l.color)||ue.value[o]||u.palette[o]||u.palette[o%u.palette.length],uid:`serie_${o}`,absoluteIndex:o}))}const q=e.computed(()=>ie()),c=e.ref(q.value);e.watch(()=>p.dataset,l=>{c.value=ie()},{deep:!0});const Se=e.computed(()=>{const l=c.value.filter((o,a)=>!v.value.includes(o.uid)).map((o,a)=>(o.values||[]).reduce((r,n)=>r+n,0));return se(l)}),$e=e.computed(()=>{const l=c.value.map((o,a)=>(o.values||[]).reduce((r,n)=>r+n));return se(l)}),L=e.computed(()=>(p.dataset.forEach((l,o)=>{[null,void 0].includes(l.values)&&u.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:"values (number[])",index:o})}),c.value.filter((l,o)=>!v.value.includes(l.uid)).map((l,o)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,r)=>a+r,0),absoluteValues:l.values||[],proportion:Se.value[o]})))),Ne=e.computed(()=>c.value.map((l,o)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,r)=>a+r,0),absoluteValues:l.values||[],proportion:$e.value[o]})));function Te(){return Ne.value.map(l=>({name:l.name,color:l.color,value:l.value,proportion:l.proportion}))}const Le=e.computed(()=>{let l=0;return L.value.map((o,a)=>{const r=l,n=r+o.proportion,i=[];for(let d=Math.floor(r);d<Math.floor(n);d+=1)i.push(d);return l=n,{...o,start:r,rects:i}})}),s=e.computed(()=>Le.value.flatMap((l,o)=>l.rects.map((a,r)=>({isFirst:r===0,isLongEnough:a.length>2,name:l.name,color:l.color,value:l.value,serieIndex:o,absoluteStartIndex:r<3,serieId:l.uid,...l}))).map((l,o)=>({...l,isAbsoluteFirst:o%t.value.style.chart.layout.grid.size===0}))),_=e.computed(()=>{const l=[];for(let o=0;o<t.value.style.chart.layout.grid.size;o+=1)for(let a=0;a<t.value.style.chart.layout.grid.size;a+=1)l.push({isStartOfLine:a===0,position:t.value.style.chart.layout.grid.vertical?o:a,x:(t.value.style.chart.layout.grid.vertical?o:a)*(g.value+t.value.style.chart.layout.grid.spaceBetween),y:(t.value.style.chart.layout.grid.vertical?a:o)*(b.value+t.value.style.chart.layout.grid.spaceBetween)+m.value.top});return l}),v=e.ref([]),x=e.ref(!1),ce=e.ref(null),ve=e.ref(null);function de(l){if(!t.value.useAnimation){v.value.includes(l)?v.value=v.value.filter(n=>n!==l):v.value.length<S.value.length-1&&S.value.length>1&&v.value.push(l);return}const o=q.value.find(n=>n.uid===l).values.reduce((n,i)=>n+i,0),a=c.value.find(n=>n.uid===l).values.reduce((n,i)=>n+i,0);let r=a;if(v.value.includes(l)){let i=function(){r>n?(cancelAnimationFrame(ce.value),c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[n]}:d),x.value=!1):(x.value=!0,r+=n*.025,c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[r]}:d),ce.value=requestAnimationFrame(i))};v.value=v.value.filter(d=>d!==l);const n=o;i()}else if(v.value.length<S.value.length-1&&S.value.length>1){let n=function(){r<a/100?(cancelAnimationFrame(ve.value),v.value.push(l),c.value=c.value.map((i,d)=>i.uid===l?{...i,values:[0]}:i),x.value=!1):(x.value=!0,r/=1.15,c.value=c.value.map(i=>i.uid===l?{...i,values:[r]}:i),ve.value=requestAnimationFrame(n))};n()}Ee("selectLegend",L.value.map(n=>({name:n.name,color:n.color,value:n.value,proportion:n.proportion/Math.pow(t.value.style.chart.layout.grid.size,2)})))}const S=e.computed(()=>c.value.map((l,o)=>({name:l.name,color:l.color||ue[o]||u.palette[o]||u.palette[o%u.palette.length],value:(l.values||[]).reduce((a,r)=>a+r,0),uid:l.uid,shape:"square"})).map(l=>({...l,proportion:l.value/c.value.map(o=>(o.values||[]).reduce((a,r)=>a+r,0)).reduce((o,a)=>o+a,0),opacity:v.value.includes(l.uid)?.5:1,segregate:()=>de(l.uid),isSegregated:v.value.includes(l.uid)}))),Ve=e.computed(()=>({cy:"waffle-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":""})),k=e.computed(()=>L.value.map(l=>l.value).reduce((l,o)=>l+o,0)),M=e.ref(null);function Pe(l){if(v.value.length===p.dataset.length)return;const o=s.value[l];M.value={datapoint:o,seriesIndex:o.absoluteIndex,series:c.value,config:t.value},O.value=!0,B.value=s.value[l].serieIndex;const a=t.value.style.chart.tooltip.customFormat;if(u.isFunction(a)&&u.functionReturnsString(()=>a({seriesIndex:s.value[l].absoluteIndex,datapoint:o,series:c.value,config:t.value})))A.value=a({seriesIndex:s.value[l].absoluteIndex,datapoint:o,series:c.value,config:t.value});else{let r="";if(r+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,r+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" stroke="none" rx="1" fill="${o.color}" />${xe.pattern?`<rect x="0" y="0" height="60" width="60" stroke="none" rx="1" stroke="none" fill="url(#pattern_${f.value}_${o.absoluteIndex})"/>`:""}</svg>`,t.value.style.chart.tooltip.showValue&&(r+=`<b>${u.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,u.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:o,seriesIndex:s.value[l].absoluteIndex,series:c.value})}</b>`),t.value.style.chart.tooltip.showPercentage){const n=u.dataLabel({v:o.value/k.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage});t.value.style.chart.tooltip.showValue?r+=`<span>(${n})</span></div>`:r+=`<b>${n}%</b></div>`}A.value=r}}const Ee=we,w=e.computed(()=>{const l=L.value.map(a=>({name:a.name,color:a.color})),o=L.value.map(a=>a.value);return{head:l,body:o}});function I(l){return t.value.useBlurOnHover&&![null,void 0].includes(B.value)&&B.value!==l?`url(#blur_${f.value})`:""}function pe(){e.nextTick(()=>{const l=w.value.head.map((r,n)=>[[r.name],[w.value.body[n]],[isNaN(w.value.body[n]/k.value)?"-":w.value.body[n]/k.value*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),a=u.createCsvContent(o);u.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-waffle"})})}const F=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',u.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,k.value,u.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:k.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),"100%"],o=w.value.head.map((n,i)=>[{color:n.color,name:n.name},u.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,w.value.body[i],u.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:w.value.body[i],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),isNaN(w.value.body[i]/k.value)?"-":u.dataLabel({v:w.value.body[i]/k.value*100,s:"%",r:t.value.table.td.roundingPercentage})]),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},shape:"square",breakpoint:t.value.table.responsiveBreakpoint},r=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:o,config:a,colNames:r}}),$=e.ref(!1);function Ie(l){$.value=l,j.value+=1}function he(){y.value.showTable=!y.value.showTable}function fe(){y.value.showTooltip=!y.value.showTooltip}const z=e.ref(!1);function R(){z.value=!z.value}return ke({getData:Te,generatePdf:re,generateCsv:pe,generateImage:ne,toggleTable:he,toggleTooltip:fe,toggleAnnotator:R}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-waffle ${$.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"waffleChart",ref:N,id:`vue-ui-waffle_${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[3]||(o[3]=()=>e.unref(Q)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(Q)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Re._sfc_main,{key:0,svgRef:e.unref(ee),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:z.value,onClose:R},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),_e.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:Y,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:G,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Fe._sfc_main,{key:`title_${X.value}`,config:{title:{cy:"waffle-title",...t.value.style.chart.title},subtitle:{cy:"waffle-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&V.value&&(e.unref(Z)||e.unref(D))?(e.openBlock(),e.createBlock(me.UserOptions,{ref_key:"details",ref:Be,key:`user_options_${j.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ae),isImaging:e.unref(oe),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,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:$.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:z.value,onToggleFullscreen:Ie,onGeneratePdf:e.unref(re),onGenerateCsv:pe,onGenerateImage:e.unref(ne),onToggleTable:he,onToggleTooltip:fe,onToggleAnnotator:R,style:e.normalizeStyle({visibility:e.unref(Z)?e.unref(D)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:r})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:r})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:ee,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value}),viewBox:`0 0 ${C.value.width<=0?10:C.value.width} ${C.value.height<=0?10:C.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Me._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(a,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${f.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(u.setOpacity)(e.unref(u.shiftHue)(a.color,.05),100-t.value.style.chart.layout.rect.gradientIntensity)},null,8,Je),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Ke)],8,Xe))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${f.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},o[5]||(o[5]=[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2},null,-1),e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)]),8,Qe)]),t.value.useCustomCells&&s.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(_.value,(a,r)=>(e.openBlock(),e.createElementBlock("foreignObject",{x:a.x,y:a.y,height:b.value<=0?1e-4:b.value,width:g.value<=0?1e-4:g.value,class:"vue-ui-waffle-custom-cell-foreignObject"},[e.renderSlot(l.$slots,"cell",e.mergeProps({ref_for:!0},{cell:{...a,color:s.value[r].color,...s.value[r]},isSelected:[null,void 0].includes(B.value)?!0:s.value[r].serieIndex===B.value}),void 0,!0)],8,Ze))),256)):e.createCommentVNode("",!0),!s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock("rect",{key:1,x:12,y:12,height:m.value.height-24,width:m.value.width-24,rx:3,fill:"none",stroke:"black"},null,8,et)):s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[l.$slots.pattern?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,a=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(l.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:a.absoluteIndex,patternId:`pattern_${f.value}_${a.absoluteIndex}`}),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:b.value<=0?1e-4:b.value,width:g.value<=0?1e-4:g.value,fill:"white",stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:I(s.value[r].serieIndex)},null,8,lt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:b.value<=0?1e-4:b.value,width:g.value<=0?1e-4:g.value,fill:t.value.style.chart.layout.rect.useGradient&&t.value.style.chart.layout.rect.gradientIntensity>0?`url(#gradient_${f.value}_${r})`:s.value[r].color,stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:I(s.value[r].serieIndex)},null,8,at))),256)),l.$slots.pattern?(e.openBlock(),e.createElementBlock("g",ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:b.value<=0?1e-4:b.value,width:g.value<=0?1e-4:g.value,fill:`url(#pattern_${f.value}_${s.value[r].absoluteIndex})`,stroke:"none",filter:I(s.value[r].serieIndex)},null,8,rt))),256))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value.length&&!x.value&&!t.value.style.chart.layout.grid.vertical&&t.value.style.chart.layout.labels.captions.show&&(s.value[r].isFirst&&a.position<t.value.style.chart.layout.grid.size-2||s.value[r].isAbsoluteFirst&&r%t.value.style.chart.layout.grid.size===0&&s.value[r].absoluteStartIndex)?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:a.x+t.value.style.chart.layout.labels.captions.offsetX+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.labels.captions.offsetY+t.value.style.chart.layout.grid.spaceBetween/2,height:E.value<=0?1e-4:E.value,width:T.value*t.value.style.chart.layout.grid.size<=0?1e-4:T.value*t.value.style.chart.layout.grid.size,filter:I(s.value[r].serieIndex)},[e.createElementVNode("div",{class:"vue-ui-waffle-caption",style:e.normalizeStyle(`height: 100%; width: 100%; font-size:${t.value.style.chart.layout.labels.captions.fontSize}px;display:flex;align-items:center;justify-content:flex-start;padding: 0 ${T.value/12}px;color:${e.unref(u.adaptColorToBackground)(s.value[r].color)};gap:2px`)},[t.value.style.chart.layout.labels.captions.showSerieName?(e.openBlock(),e.createElementBlock("span",ut,e.toDisplayString(t.value.style.chart.layout.labels.captions.serieNameAbbreviation?e.unref(u.abbreviate)({source:s.value[r].name,length:t.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize}):s.value[r].name)+": ",1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage?(e.openBlock(),e.createElementBlock("span",st,e.toDisplayString(e.unref(u.dataLabel)({v:s.value[r].proportion,s:"%",r:t.value.style.chart.layout.labels.captions.roundingPercentage})),1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",it," ("+e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[r].value,e.unref(u.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[r],position:a}))+") ",1)):e.createCommentVNode("",!0),!t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",ct,e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[r].value,e.unref(u.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[r],position:a})),1)):e.createCommentVNode("",!0)],4)],8,nt)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{onMouseover:n=>Pe(r),onMouseleave:o[0]||(o[0]=n=>{O.value=!1,B.value=null}),x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:E.value<=0?1e-4:E.value,width:T.value<=0?1e-4:T.value,fill:"transparent",stroke:"none"},null,40,vt))),256)),e.renderSlot(l.$slots,"svg",{svg:C.value},void 0,!0)],14,Ye)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",dt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ae)||e.unref(oe)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(De.default,{key:6,config:{type:"waffle",style:{backgroundColor:t.value.style.chart.backgroundColor,waffle:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:W},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ae.Legend,{key:`legend_${K.value}`,legendSet:S.value,config:Ve.value,onClickMarker:o[1]||(o[1]=({legend:a})=>de(a.uid))},e.createSlots({item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:r=>a.segregate(),style:e.normalizeStyle(`opacity:${v.value.includes(a.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(u.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue,isAnimating:x.value}),{datapoint:a}))+" ",1),v.value.includes(a.uid)?(e.openBlock(),e.createElementBlock("span",ft," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",ht," ("+e.toDisplayString(isNaN(a.value/k.value)?"-":e.unref(u.dataLabel)({v:a.value/k.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage,isAnimating:x.value}))+") ",1))],12,pt)]),_:2},[l.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:a,index:r})=>[e.createVNode(je._sfc_main,{shape:a.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"])):e.renderSlot(l.$slots,"legend",{key:1,legend:S.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:H,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ze._sfc_main,{show:y.value.showTooltip&&O.value&&v.value.length<p.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,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:N.value,content:A.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function",fontSize:t.value.style.chart.tooltip.fontSize,isFullscreen:$.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","fontSize","isFullscreen"]),V.value?(e.openBlock(),e.createBlock(qe.default,{key:8,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Oe.DataTable,{key:`table_${J.value}`,colNames:F.value.colNames,head:F.value.head,body:F.value.body,config:F.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[2]||(o[2]=a=>y.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,yt)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,He))}},gt=We._export_sfc(mt,[["__scopeId","data-v-b3044eda"]]);exports.default=gt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-DlALYfRS.cjs"),ye=require("./useResponsive-DQmBAoBf.cjs"),Fe=require("./Title-BiyGREAz.cjs"),me=require("./usePrinter-n1HzfoSm.cjs"),ze=require("./Tooltip-C-Kq18lz.cjs"),Oe=require("./DataTable-OM4js4qI.cjs"),Ae=require("./Legend-qwuGpvF8.cjs"),De=require("./vue-ui-skeleton-C-I7hIHS.cjs"),qe=require("./vue-ui-accordion-CByAeInD.cjs"),ge=require("./useNestedProp-BZX7zlGv.cjs"),Me=require("./PackageVersion-Di-ZyR0_.cjs"),Re=require("./PenAndPaper-CtYhqkG5.cjs"),Ue=require("./useUserOptionState-BgepsfED.cjs"),je=require("./Shape-CHiMFkEQ.cjs"),Ge=require("./useChartAccessibility-Cm7nkzTG.cjs"),We=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),He=["id"],Ye=["xmlns","viewBox"],Xe=["id"],Je=["stop-color"],Ke=["stop-color"],Qe=["id"],Ze=["x","y","height","width"],et=["height","width"],tt={key:0},lt=["rx","x","y","height","width","stroke","stroke-width","filter"],at=["rx","x","y","height","width","fill","stroke","stroke-width","filter"],ot={key:1},rt=["rx","x","y","height","width","fill","filter"],nt=["x","y","height","width","filter"],ut={key:0},st={key:1},it={key:2},ct={key:3},vt=["onMouseover","x","y","height","width"],dt={key:5,class:"vue-data-ui-watermark"},pt=["onClick"],ht={key:0},ft={key:1},yt=["innerHTML"],mt={__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(be,{expose:ke,emit:we}){const{vue_ui_waffle:Ce}=u.useConfig(),p=be,xe=e.useSlots(),V=e.computed(()=>!!p.dataset&&p.dataset.length),f=e.ref(u.createUid()),Be=e.ref(null),O=e.ref(!1),A=e.ref(""),B=e.ref(null),j=e.ref(0),N=e.ref(null),G=e.ref(null),W=e.ref(null),H=e.ref(null),Y=e.ref(null),X=e.ref(0),J=e.ref(0),K=e.ref(0),t=e.computed({get:()=>te(),set:l=>l}),{userOptionsVisible:D,setUserOptionsVisibility:Q,keepUserOptionState:Z}=Ue.useUserOptionState({config:t.value}),{svgRef:ee}=Ge.useChartAccessibility({config:t.value.style.chart.title});function te(){const l=ge.useNestedProp({userConfig:p.config,defaultConfig:Ce});return l.theme?{...ge.useNestedProp({userConfig:u.themes.vue_ui_waffle[l.theme]||p.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}e.watch(()=>p.config,l=>{t.value=te(),D.value=!t.value.userOptions.showOnChartHover,le(),X.value+=1,J.value+=1,K.value+=1,y.value.showTable=t.value.table.show,y.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const P=e.ref(null);function le(){if(u.objectIsEmpty(p.dataset)?u.error({componentName:"VueUiWaffle",type:"dataset"}):p.dataset.forEach((l,o)=>{u.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{u.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=ye.throttle(()=>{const{width:o,height:a}=ye.useResponsive({chart:N.value,title:t.value.style.chart.title.text?G.value:null,legend:t.value.style.chart.legend.show?W.value:null,source:H.value,noTitle:Y.value});requestAnimationFrame(()=>{C.value.width=o,C.value.height=a,m.value.width=o,m.value.height=a})});P.value=new ResizeObserver(l),P.value.observe(N.value.parentNode)}}e.onMounted(()=>{le()}),e.onBeforeUnmount(()=>{P.value&&P.value.disconnect()});const{isPrinting:ae,isImaging:oe,generatePdf:re,generateImage:ne}=me.usePrinter({elementId:`vue-ui-waffle_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-waffle",options:t.value.userOptions.print}),_e=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ue=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),C=e.ref({height:512,width:512}),m=e.ref({top:0,left:0,height:512,width:512}),g=e.computed(()=>(m.value.width-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),b=e.computed(()=>(m.value.height-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),T=e.computed(()=>m.value.width/t.value.style.chart.layout.grid.size),E=e.computed(()=>m.value.height/t.value.style.chart.layout.grid.size);function se(l){const o=t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.size,a=l.reduce((h,U)=>h+U,0),r=l.map(h=>h/a*o),n=r.map(Math.floor),i=r.map(h=>h%1);let d=o-n.reduce((h,U)=>h+U,0);for(;d>0;){let h=i.indexOf(Math.max(...i));n[h]+=1,i[h]=0,d-=1}return n}function ie(){return p.dataset.map((l,o)=>({...l,color:u.convertColorToHex(l.color)||ue.value[o]||u.palette[o]||u.palette[o%u.palette.length],uid:`serie_${o}`,absoluteIndex:o}))}const q=e.computed(()=>ie()),c=e.ref(q.value);e.watch(()=>p.dataset,l=>{c.value=ie()},{deep:!0});const Se=e.computed(()=>{const l=c.value.filter((o,a)=>!v.value.includes(o.uid)).map((o,a)=>(o.values||[]).reduce((r,n)=>r+n,0));return se(l)}),$e=e.computed(()=>{const l=c.value.map((o,a)=>(o.values||[]).reduce((r,n)=>r+n));return se(l)}),L=e.computed(()=>(p.dataset.forEach((l,o)=>{[null,void 0].includes(l.values)&&u.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:"values (number[])",index:o})}),c.value.filter((l,o)=>!v.value.includes(l.uid)).map((l,o)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,r)=>a+r,0),absoluteValues:l.values||[],proportion:Se.value[o]})))),Ne=e.computed(()=>c.value.map((l,o)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,r)=>a+r,0),absoluteValues:l.values||[],proportion:$e.value[o]})));function Te(){return Ne.value.map(l=>({name:l.name,color:l.color,value:l.value,proportion:l.proportion}))}const Le=e.computed(()=>{let l=0;return L.value.map((o,a)=>{const r=l,n=r+o.proportion,i=[];for(let d=Math.floor(r);d<Math.floor(n);d+=1)i.push(d);return l=n,{...o,start:r,rects:i}})}),s=e.computed(()=>Le.value.flatMap((l,o)=>l.rects.map((a,r)=>({isFirst:r===0,isLongEnough:a.length>2,name:l.name,color:l.color,value:l.value,serieIndex:o,absoluteStartIndex:r<3,serieId:l.uid,...l}))).map((l,o)=>({...l,isAbsoluteFirst:o%t.value.style.chart.layout.grid.size===0}))),_=e.computed(()=>{const l=[];for(let o=0;o<t.value.style.chart.layout.grid.size;o+=1)for(let a=0;a<t.value.style.chart.layout.grid.size;a+=1)l.push({isStartOfLine:a===0,position:t.value.style.chart.layout.grid.vertical?o:a,x:(t.value.style.chart.layout.grid.vertical?o:a)*(g.value+t.value.style.chart.layout.grid.spaceBetween),y:(t.value.style.chart.layout.grid.vertical?a:o)*(b.value+t.value.style.chart.layout.grid.spaceBetween)+m.value.top});return l}),v=e.ref([]),x=e.ref(!1),ce=e.ref(null),ve=e.ref(null);function de(l){if(!t.value.useAnimation){v.value.includes(l)?v.value=v.value.filter(n=>n!==l):v.value.length<S.value.length-1&&S.value.length>1&&v.value.push(l);return}const o=q.value.find(n=>n.uid===l).values.reduce((n,i)=>n+i,0),a=c.value.find(n=>n.uid===l).values.reduce((n,i)=>n+i,0);let r=a;if(v.value.includes(l)){let i=function(){r>n?(cancelAnimationFrame(ce.value),c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[n]}:d),x.value=!1):(x.value=!0,r+=n*.025,c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[r]}:d),ce.value=requestAnimationFrame(i))};v.value=v.value.filter(d=>d!==l);const n=o;i()}else if(v.value.length<S.value.length-1&&S.value.length>1){let n=function(){r<a/100?(cancelAnimationFrame(ve.value),v.value.push(l),c.value=c.value.map((i,d)=>i.uid===l?{...i,values:[0]}:i),x.value=!1):(x.value=!0,r/=1.15,c.value=c.value.map(i=>i.uid===l?{...i,values:[r]}:i),ve.value=requestAnimationFrame(n))};n()}Ee("selectLegend",L.value.map(n=>({name:n.name,color:n.color,value:n.value,proportion:n.proportion/Math.pow(t.value.style.chart.layout.grid.size,2)})))}const S=e.computed(()=>c.value.map((l,o)=>({name:l.name,color:l.color||ue[o]||u.palette[o]||u.palette[o%u.palette.length],value:(l.values||[]).reduce((a,r)=>a+r,0),uid:l.uid,shape:"square"})).map(l=>({...l,proportion:l.value/c.value.map(o=>(o.values||[]).reduce((a,r)=>a+r,0)).reduce((o,a)=>o+a,0),opacity:v.value.includes(l.uid)?.5:1,segregate:()=>de(l.uid),isSegregated:v.value.includes(l.uid)}))),Ve=e.computed(()=>({cy:"waffle-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":""})),k=e.computed(()=>L.value.map(l=>l.value).reduce((l,o)=>l+o,0)),M=e.ref(null);function Pe(l){if(v.value.length===p.dataset.length)return;const o=s.value[l];M.value={datapoint:o,seriesIndex:o.absoluteIndex,series:c.value,config:t.value},O.value=!0,B.value=s.value[l].serieIndex;const a=t.value.style.chart.tooltip.customFormat;if(u.isFunction(a)&&u.functionReturnsString(()=>a({seriesIndex:s.value[l].absoluteIndex,datapoint:o,series:c.value,config:t.value})))A.value=a({seriesIndex:s.value[l].absoluteIndex,datapoint:o,series:c.value,config:t.value});else{let r="";if(r+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,r+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" stroke="none" rx="1" fill="${o.color}" />${xe.pattern?`<rect x="0" y="0" height="60" width="60" stroke="none" rx="1" stroke="none" fill="url(#pattern_${f.value}_${o.absoluteIndex})"/>`:""}</svg>`,t.value.style.chart.tooltip.showValue&&(r+=`<b>${u.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,u.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:o,seriesIndex:s.value[l].absoluteIndex,series:c.value})}</b>`),t.value.style.chart.tooltip.showPercentage){const n=u.dataLabel({v:o.value/k.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage});t.value.style.chart.tooltip.showValue?r+=`<span>(${n})</span></div>`:r+=`<b>${n}%</b></div>`}A.value=r}}const Ee=we,w=e.computed(()=>{const l=L.value.map(a=>({name:a.name,color:a.color})),o=L.value.map(a=>a.value);return{head:l,body:o}});function I(l){return t.value.useBlurOnHover&&![null,void 0].includes(B.value)&&B.value!==l?`url(#blur_${f.value})`:""}function pe(){e.nextTick(()=>{const l=w.value.head.map((r,n)=>[[r.name],[w.value.body[n]],[isNaN(w.value.body[n]/k.value)?"-":w.value.body[n]/k.value*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),a=u.createCsvContent(o);u.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-waffle"})})}const F=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',u.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,k.value,u.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:k.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),"100%"],o=w.value.head.map((n,i)=>[{color:n.color,name:n.name},u.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,w.value.body[i],u.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:w.value.body[i],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),isNaN(w.value.body[i]/k.value)?"-":u.dataLabel({v:w.value.body[i]/k.value*100,s:"%",r:t.value.table.td.roundingPercentage})]),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},shape:"square",breakpoint:t.value.table.responsiveBreakpoint},r=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:o,config:a,colNames:r}}),$=e.ref(!1);function Ie(l){$.value=l,j.value+=1}function he(){y.value.showTable=!y.value.showTable}function fe(){y.value.showTooltip=!y.value.showTooltip}const z=e.ref(!1);function R(){z.value=!z.value}return ke({getData:Te,generatePdf:re,generateCsv:pe,generateImage:ne,toggleTable:he,toggleTooltip:fe,toggleAnnotator:R}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-waffle ${$.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"waffleChart",ref:N,id:`vue-ui-waffle_${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[3]||(o[3]=()=>e.unref(Q)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(Q)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Re._sfc_main,{key:0,svgRef:e.unref(ee),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:z.value,onClose:R},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),_e.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:Y,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:G,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Fe._sfc_main,{key:`title_${X.value}`,config:{title:{cy:"waffle-title",...t.value.style.chart.title},subtitle:{cy:"waffle-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&V.value&&(e.unref(Z)||e.unref(D))?(e.openBlock(),e.createBlock(me.UserOptions,{ref_key:"details",ref:Be,key:`user_options_${j.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ae),isImaging:e.unref(oe),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,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:$.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:z.value,onToggleFullscreen:Ie,onGeneratePdf:e.unref(re),onGenerateCsv:pe,onGenerateImage:e.unref(ne),onToggleTable:he,onToggleTooltip:fe,onToggleAnnotator:R,style:e.normalizeStyle({visibility:e.unref(Z)?e.unref(D)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:r})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:r})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:ee,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value}),viewBox:`0 0 ${C.value.width<=0?10:C.value.width} ${C.value.height<=0?10:C.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Me._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(a,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${f.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(u.setOpacity)(e.unref(u.shiftHue)(a.color,.05),100-t.value.style.chart.layout.rect.gradientIntensity)},null,8,Je),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Ke)],8,Xe))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${f.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},o[5]||(o[5]=[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2},null,-1),e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)]),8,Qe)]),t.value.useCustomCells&&s.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(_.value,(a,r)=>(e.openBlock(),e.createElementBlock("foreignObject",{x:a.x,y:a.y,height:b.value<=0?1e-4:b.value,width:g.value<=0?1e-4:g.value,class:"vue-ui-waffle-custom-cell-foreignObject"},[e.renderSlot(l.$slots,"cell",e.mergeProps({ref_for:!0},{cell:{...a,color:s.value[r].color,...s.value[r]},isSelected:[null,void 0].includes(B.value)?!0:s.value[r].serieIndex===B.value}),void 0,!0)],8,Ze))),256)):e.createCommentVNode("",!0),!s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock("rect",{key:1,x:12,y:12,height:m.value.height-24,width:m.value.width-24,rx:3,fill:"none",stroke:"black"},null,8,et)):s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[l.$slots.pattern?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,a=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(l.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:a.absoluteIndex,patternId:`pattern_${f.value}_${a.absoluteIndex}`}),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:b.value<=0?1e-4:b.value,width:g.value<=0?1e-4:g.value,fill:"white",stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:I(s.value[r].serieIndex)},null,8,lt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:b.value<=0?1e-4:b.value,width:g.value<=0?1e-4:g.value,fill:t.value.style.chart.layout.rect.useGradient&&t.value.style.chart.layout.rect.gradientIntensity>0?`url(#gradient_${f.value}_${r})`:s.value[r].color,stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:I(s.value[r].serieIndex)},null,8,at))),256)),l.$slots.pattern?(e.openBlock(),e.createElementBlock("g",ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:b.value<=0?1e-4:b.value,width:g.value<=0?1e-4:g.value,fill:`url(#pattern_${f.value}_${s.value[r].absoluteIndex})`,stroke:"none",filter:I(s.value[r].serieIndex)},null,8,rt))),256))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value.length&&!x.value&&!t.value.style.chart.layout.grid.vertical&&t.value.style.chart.layout.labels.captions.show&&(s.value[r].isFirst&&a.position<t.value.style.chart.layout.grid.size-2||s.value[r].isAbsoluteFirst&&r%t.value.style.chart.layout.grid.size===0&&s.value[r].absoluteStartIndex)?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:a.x+t.value.style.chart.layout.labels.captions.offsetX+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.labels.captions.offsetY+t.value.style.chart.layout.grid.spaceBetween/2,height:E.value<=0?1e-4:E.value,width:T.value*t.value.style.chart.layout.grid.size<=0?1e-4:T.value*t.value.style.chart.layout.grid.size,filter:I(s.value[r].serieIndex)},[e.createElementVNode("div",{class:"vue-ui-waffle-caption",style:e.normalizeStyle(`height: 100%; width: 100%; font-size:${t.value.style.chart.layout.labels.captions.fontSize}px;display:flex;align-items:center;justify-content:flex-start;padding: 0 ${T.value/12}px;color:${e.unref(u.adaptColorToBackground)(s.value[r].color)};gap:2px`)},[t.value.style.chart.layout.labels.captions.showSerieName?(e.openBlock(),e.createElementBlock("span",ut,e.toDisplayString(t.value.style.chart.layout.labels.captions.serieNameAbbreviation?e.unref(u.abbreviate)({source:s.value[r].name,length:t.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize}):s.value[r].name)+": ",1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage?(e.openBlock(),e.createElementBlock("span",st,e.toDisplayString(e.unref(u.dataLabel)({v:s.value[r].proportion,s:"%",r:t.value.style.chart.layout.labels.captions.roundingPercentage})),1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",it," ("+e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[r].value,e.unref(u.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[r],position:a}))+") ",1)):e.createCommentVNode("",!0),!t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",ct,e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[r].value,e.unref(u.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[r],position:a})),1)):e.createCommentVNode("",!0)],4)],8,nt)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{onMouseover:n=>Pe(r),onMouseleave:o[0]||(o[0]=n=>{O.value=!1,B.value=null}),x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:E.value<=0?1e-4:E.value,width:T.value<=0?1e-4:T.value,fill:"transparent",stroke:"none"},null,40,vt))),256)),e.renderSlot(l.$slots,"svg",{svg:C.value},void 0,!0)],14,Ye)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",dt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ae)||e.unref(oe)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(De.default,{key:6,config:{type:"waffle",style:{backgroundColor:t.value.style.chart.backgroundColor,waffle:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:W},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ae.Legend,{key:`legend_${K.value}`,legendSet:S.value,config:Ve.value,onClickMarker:o[1]||(o[1]=({legend:a})=>de(a.uid))},e.createSlots({item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:r=>a.segregate(),style:e.normalizeStyle(`opacity:${v.value.includes(a.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(u.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue,isAnimating:x.value}),{datapoint:a}))+" ",1),v.value.includes(a.uid)?(e.openBlock(),e.createElementBlock("span",ft," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",ht," ("+e.toDisplayString(isNaN(a.value/k.value)?"-":e.unref(u.dataLabel)({v:a.value/k.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage,isAnimating:x.value}))+") ",1))],12,pt)]),_:2},[l.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:a,index:r})=>[e.createVNode(je._sfc_main,{shape:a.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"])):e.renderSlot(l.$slots,"legend",{key:1,legend:S.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:H,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ze._sfc_main,{show:y.value.showTooltip&&O.value&&v.value.length<p.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,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:N.value,content:A.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function",fontSize:t.value.style.chart.tooltip.fontSize,isFullscreen:$.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","fontSize","isFullscreen"]),V.value?(e.openBlock(),e.createBlock(qe.default,{key:8,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Oe.DataTable,{key:`table_${J.value}`,colNames:F.value.colNames,head:F.value.head,body:F.value.body,config:F.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[2]||(o[2]=a=>y.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,yt)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,He))}},gt=We._export_sfc(mt,[["__scopeId","data-v-b3044eda"]]);exports.default=gt;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-Dy2-pNb6.cjs"),Q=require("./Title-CEZO2hzQ.cjs"),R=require("./usePrinter-BQEYwy4a.cjs"),V=require("./useResponsive-DQmBAoBf.cjs"),Z=require("./vue-ui-skeleton-Db7PiDqL.cjs"),U=require("./useNestedProp-DQ8Jt3-Y.cjs"),ee=require("./PackageVersion-DxR-fKLM.cjs"),te=require("./PenAndPaper-CG9o3ymS.cjs"),le=require("./useUserOptionState-BgepsfED.cjs"),oe=require("./useChartAccessibility-Cm7nkzTG.cjs"),ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],re=["xmlns","viewBox"],se=["width","height"],ue=["x1","x2","y1","y2","stroke","stroke-width","stroke-linecap"],ie=["d","fill"],ce=["cx","cy","r","stroke","stroke-width"],ve=["x","y","font-size","fill","font-weight"],de={key:5,class:"vue-data-ui-watermark"},he={__name:"vue-ui-wheel",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(L,{expose:X}){const{vue_ui_wheel:j}=i.useConfig(),c=L,m=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length),g=e.ref(i.createUid()),G=e.ref(null),b=e.ref(0),d=e.ref(null),B=e.ref(null),P=e.ref(null),S=e.ref(null),_=e.ref(0),t=e.computed({get:()=>$(),set:l=>l}),{userOptionsVisible:k,setUserOptionsVisibility:O,keepUserOptionState:N}=le.useUserOptionState({config:t.value}),{svgRef:x}=oe.useChartAccessibility({config:t.value.style.chart.title});function $(){const l=U.useNestedProp({userConfig:c.config,defaultConfig:j});return l.theme?{...U.useNestedProp({userConfig:i.themes.vue_ui_wheel[l.theme]||c.config,defaultConfig:l})}:l}e.watch(()=>c.config,l=>{t.value=$(),k.value=!t.value.userOptions.showOnChartHover,M(),_.value+=1},{deep:!0});const{isPrinting:I,isImaging:z,generatePdf:A,generateImage:F}=R.usePrinter({elementId:g.value,fileName:t.value.style.chart.title.text||"vue-ui-wheel",options:t.value.userOptions.print}),H=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),n=e.ref({size:360,height:360,width:360}),w=e.ref(t.value.style.chart.layout.percentage.fontSize),r=e.computed(()=>({radius:Math.min(n.value.width,n.value.height)*.9/2,centerX:n.value.width/2,centerY:n.value.height/2}));function E(l,a=1){return{x:r.value.centerX+r.value.radius*Math.cos(29.85+l*Math.PI/180)*a,y:r.value.centerY+r.value.radius*Math.sin(29.85+l*Math.PI/180)*a}}const s=e.ref(t.value.style.chart.animation.use?0:c.dataset.percentage||0);e.watch(()=>c.dataset,l=>{t.value.style.chart.animation.use?T(l.percentage):s.value=l.percentage||0},{deep:!0});const h=e.ref(null);e.onMounted(()=>{M()});function M(){if(i.objectIsEmpty(c.dataset)&&i.error({componentName:"VueUiWheel",type:"dataset"}),T(c.dataset.percentage||0),t.value.responsive){const l=V.throttle(()=>{const{width:a,height:o}=V.useResponsive({chart:d.value,title:t.value.style.chart.title.text?B.value:null,source:P.value,noTitle:S.value});requestAnimationFrame(()=>{n.value.width=a,n.value.height=o,w.value=t.value.style.chart.layout.percentage.fontSize/360*Math.min(a,o)})});h.value=new ResizeObserver(l),h.value.observe(d.value.parentNode)}}e.onBeforeUnmount(()=>{h.value&&h.value.disconnect()});function T(l){let a=t.value.style.chart.animation.speed;const o=Math.abs(l-s.value)/(a*120);function u(){s.value<l?s.value=Math.min(s.value+o,l):s.value>l&&(s.value=Math.max(s.value-o,l)),s.value!==l&&requestAnimationFrame(u)}u()}const v=e.computed(()=>Math.max(100,t.value.style.chart.layout.wheel.ticks.quantity)),f=e.computed(()=>100/v.value),q=e.computed(()=>{const l=[];for(let a=0;a<v.value;a+=1){const o=s.value>a*f.value?t.value.style.chart.layout.wheel.ticks.activeColor:t.value.style.chart.layout.wheel.ticks.inactiveColor,{x:u,y:W}=E(n.value.size/v.value*a),{x:J,y:K}=E(n.value.size/v.value*a,t.value.style.chart.layout.wheel.ticks.sizeRatio);l.push({x1:u,y1:W,x2:J,y2:K,color:t.value.style.chart.layout.wheel.ticks.gradient.show?i.shiftHue(o,a*f.value/v.value*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):o})}return l}),D=e.computed(()=>i.makeDonut({series:q.value.map(l=>({name:"",value:1,color:l.color}))},r.value.centerX,r.value.centerY,r.value.radius,r.value.radius,1.99999,2,1,360,105.25,r.value.radius*(1-t.value.style.chart.layout.wheel.ticks.sizeRatio))),y=e.ref(!1);function Y(l){y.value=l,b.value+=1}const p=e.ref(!1);function C(){p.value=!p.value}return X({generatePdf:A,generateImage:F,toggleAnnotator:C}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-wheel",ref_key:"wheelChart",ref:d,id:g.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:a[0]||(a[0]=()=>e.unref(O)(!0)),onMouseleave:a[1]||(a[1]=()=>e.unref(O)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(te._sfc_main,{key:0,svgRef:e.unref(x),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:p.value,onClose:C},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:S,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:B,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Q._sfc_main,{key:`title_${_.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value&&(e.unref(N)||e.unref(k))?(e.openBlock(),e.createBlock(R.UserOptions,{ref_key:"details",ref:G,key:`user_options_${b.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(I),isImaging:e.unref(z),uid:g.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:y.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:p.value,chartElement:d.value,onToggleFullscreen:Y,onGeneratePdf:e.unref(A),onGenerateImage:e.unref(F),onToggleAnnotator:C,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(k)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:u})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:u})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"3"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","position","titles","hasAnnotator","isAnnotation","chartElement","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:x,xmlns:e.unref(i.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),viewBox:`0 0 ${n.value.width<=0?10:n.value.width} ${n.value.height<=0?10:n.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ee._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,se)):e.createCommentVNode("",!0),t.value.style.chart.layout.wheel.ticks.type==="classic"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(q.value,(o,u)=>(e.openBlock(),e.createElementBlock("line",{x1:o.x1,x2:o.x2,y1:o.y1,y2:o.y2,stroke:o.color,"stroke-width":t.value.style.chart.layout.wheel.ticks.strokeWidth/360*Math.min(n.value.width,n.value.height),"stroke-linecap":t.value.style.chart.layout.wheel.ticks.rounded?"round":"butt",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&u*f.value<=s.value})},null,10,ue))),256)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(D.value,(o,u)=>(e.openBlock(),e.createElementBlock("path",{d:o.arcSlice,fill:o.color,class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&u*f.value<=s.value})},null,10,ie))),256)),t.value.style.chart.layout.innerCircle.show?(e.openBlock(),e.createElementBlock("circle",{key:3,cx:r.value.centerX,cy:r.value.centerY,r:r.value.radius*.8<=0?1e-4:r.value.radius*.8,stroke:t.value.style.chart.layout.innerCircle.stroke,"stroke-width":t.value.style.chart.layout.innerCircle.strokeWidth,fill:"none"},null,8,ce)):e.createCommentVNode("",!0),t.value.style.chart.layout.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:4,x:r.value.centerX,y:r.value.centerY+w.value/3,"font-size":w.value,fill:t.value.style.chart.layout.wheel.ticks.gradient.show?e.unref(i.shiftHue)(t.value.style.chart.layout.wheel.ticks.activeColor,s.value/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.wheel.ticks.activeColor,"text-anchor":"middle","font-weight":t.value.style.chart.layout.percentage.bold?"bold":"normal",style:{"font-variant-numeric":"tabluar-nums"}},e.toDisplayString(e.unref(i.applyDataLabel)(t.value.style.chart.layout.percentage.formatter,e.unref(i.checkNaN)(s.value),e.unref(i.dataLabel)({v:e.unref(i.checkNaN)(s.value),s:"%",r:t.value.style.chart.layout.percentage.rounding}))),9,ve)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(I)||e.unref(z)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:P,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Z.default,{key:7,config:{type:"wheel",style:{backgroundColor:t.value.style.chart.backgroundColor,wheel:{color:"#CCCCCC"}}}},null,8,["config"]))],44,ae))}},fe=ne._export_sfc(he,[["__scopeId","data-v-0ab72261"]]);exports.default=fe;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-DlALYfRS.cjs"),Q=require("./Title-BiyGREAz.cjs"),R=require("./usePrinter-n1HzfoSm.cjs"),V=require("./useResponsive-DQmBAoBf.cjs"),Z=require("./vue-ui-skeleton-C-I7hIHS.cjs"),U=require("./useNestedProp-BZX7zlGv.cjs"),ee=require("./PackageVersion-Di-ZyR0_.cjs"),te=require("./PenAndPaper-CtYhqkG5.cjs"),le=require("./useUserOptionState-BgepsfED.cjs"),oe=require("./useChartAccessibility-Cm7nkzTG.cjs"),ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],re=["xmlns","viewBox"],se=["width","height"],ue=["x1","x2","y1","y2","stroke","stroke-width","stroke-linecap"],ie=["d","fill"],ce=["cx","cy","r","stroke","stroke-width"],ve=["x","y","font-size","fill","font-weight"],de={key:5,class:"vue-data-ui-watermark"},he={__name:"vue-ui-wheel",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(L,{expose:X}){const{vue_ui_wheel:j}=i.useConfig(),c=L,m=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length),g=e.ref(i.createUid()),G=e.ref(null),b=e.ref(0),d=e.ref(null),B=e.ref(null),P=e.ref(null),S=e.ref(null),_=e.ref(0),t=e.computed({get:()=>$(),set:l=>l}),{userOptionsVisible:k,setUserOptionsVisibility:O,keepUserOptionState:N}=le.useUserOptionState({config:t.value}),{svgRef:x}=oe.useChartAccessibility({config:t.value.style.chart.title});function $(){const l=U.useNestedProp({userConfig:c.config,defaultConfig:j});return l.theme?{...U.useNestedProp({userConfig:i.themes.vue_ui_wheel[l.theme]||c.config,defaultConfig:l})}:l}e.watch(()=>c.config,l=>{t.value=$(),k.value=!t.value.userOptions.showOnChartHover,M(),_.value+=1},{deep:!0});const{isPrinting:I,isImaging:z,generatePdf:A,generateImage:F}=R.usePrinter({elementId:g.value,fileName:t.value.style.chart.title.text||"vue-ui-wheel",options:t.value.userOptions.print}),H=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),n=e.ref({size:360,height:360,width:360}),w=e.ref(t.value.style.chart.layout.percentage.fontSize),r=e.computed(()=>({radius:Math.min(n.value.width,n.value.height)*.9/2,centerX:n.value.width/2,centerY:n.value.height/2}));function E(l,a=1){return{x:r.value.centerX+r.value.radius*Math.cos(29.85+l*Math.PI/180)*a,y:r.value.centerY+r.value.radius*Math.sin(29.85+l*Math.PI/180)*a}}const s=e.ref(t.value.style.chart.animation.use?0:c.dataset.percentage||0);e.watch(()=>c.dataset,l=>{t.value.style.chart.animation.use?T(l.percentage):s.value=l.percentage||0},{deep:!0});const h=e.ref(null);e.onMounted(()=>{M()});function M(){if(i.objectIsEmpty(c.dataset)&&i.error({componentName:"VueUiWheel",type:"dataset"}),T(c.dataset.percentage||0),t.value.responsive){const l=V.throttle(()=>{const{width:a,height:o}=V.useResponsive({chart:d.value,title:t.value.style.chart.title.text?B.value:null,source:P.value,noTitle:S.value});requestAnimationFrame(()=>{n.value.width=a,n.value.height=o,w.value=t.value.style.chart.layout.percentage.fontSize/360*Math.min(a,o)})});h.value=new ResizeObserver(l),h.value.observe(d.value.parentNode)}}e.onBeforeUnmount(()=>{h.value&&h.value.disconnect()});function T(l){let a=t.value.style.chart.animation.speed;const o=Math.abs(l-s.value)/(a*120);function u(){s.value<l?s.value=Math.min(s.value+o,l):s.value>l&&(s.value=Math.max(s.value-o,l)),s.value!==l&&requestAnimationFrame(u)}u()}const v=e.computed(()=>Math.max(100,t.value.style.chart.layout.wheel.ticks.quantity)),f=e.computed(()=>100/v.value),q=e.computed(()=>{const l=[];for(let a=0;a<v.value;a+=1){const o=s.value>a*f.value?t.value.style.chart.layout.wheel.ticks.activeColor:t.value.style.chart.layout.wheel.ticks.inactiveColor,{x:u,y:W}=E(n.value.size/v.value*a),{x:J,y:K}=E(n.value.size/v.value*a,t.value.style.chart.layout.wheel.ticks.sizeRatio);l.push({x1:u,y1:W,x2:J,y2:K,color:t.value.style.chart.layout.wheel.ticks.gradient.show?i.shiftHue(o,a*f.value/v.value*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):o})}return l}),D=e.computed(()=>i.makeDonut({series:q.value.map(l=>({name:"",value:1,color:l.color}))},r.value.centerX,r.value.centerY,r.value.radius,r.value.radius,1.99999,2,1,360,105.25,r.value.radius*(1-t.value.style.chart.layout.wheel.ticks.sizeRatio))),y=e.ref(!1);function Y(l){y.value=l,b.value+=1}const p=e.ref(!1);function C(){p.value=!p.value}return X({generatePdf:A,generateImage:F,toggleAnnotator:C}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-wheel",ref_key:"wheelChart",ref:d,id:g.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:a[0]||(a[0]=()=>e.unref(O)(!0)),onMouseleave:a[1]||(a[1]=()=>e.unref(O)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(te._sfc_main,{key:0,svgRef:e.unref(x),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:p.value,onClose:C},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:S,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:B,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Q._sfc_main,{key:`title_${_.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value&&(e.unref(N)||e.unref(k))?(e.openBlock(),e.createBlock(R.UserOptions,{ref_key:"details",ref:G,key:`user_options_${b.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(I),isImaging:e.unref(z),uid:g.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:y.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:p.value,chartElement:d.value,onToggleFullscreen:Y,onGeneratePdf:e.unref(A),onGenerateImage:e.unref(F),onToggleAnnotator:C,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(k)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:u})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:u})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"3"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","position","titles","hasAnnotator","isAnnotation","chartElement","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:x,xmlns:e.unref(i.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),viewBox:`0 0 ${n.value.width<=0?10:n.value.width} ${n.value.height<=0?10:n.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ee._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,se)):e.createCommentVNode("",!0),t.value.style.chart.layout.wheel.ticks.type==="classic"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(q.value,(o,u)=>(e.openBlock(),e.createElementBlock("line",{x1:o.x1,x2:o.x2,y1:o.y1,y2:o.y2,stroke:o.color,"stroke-width":t.value.style.chart.layout.wheel.ticks.strokeWidth/360*Math.min(n.value.width,n.value.height),"stroke-linecap":t.value.style.chart.layout.wheel.ticks.rounded?"round":"butt",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&u*f.value<=s.value})},null,10,ue))),256)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(D.value,(o,u)=>(e.openBlock(),e.createElementBlock("path",{d:o.arcSlice,fill:o.color,class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&u*f.value<=s.value})},null,10,ie))),256)),t.value.style.chart.layout.innerCircle.show?(e.openBlock(),e.createElementBlock("circle",{key:3,cx:r.value.centerX,cy:r.value.centerY,r:r.value.radius*.8<=0?1e-4:r.value.radius*.8,stroke:t.value.style.chart.layout.innerCircle.stroke,"stroke-width":t.value.style.chart.layout.innerCircle.strokeWidth,fill:"none"},null,8,ce)):e.createCommentVNode("",!0),t.value.style.chart.layout.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:4,x:r.value.centerX,y:r.value.centerY+w.value/3,"font-size":w.value,fill:t.value.style.chart.layout.wheel.ticks.gradient.show?e.unref(i.shiftHue)(t.value.style.chart.layout.wheel.ticks.activeColor,s.value/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.wheel.ticks.activeColor,"text-anchor":"middle","font-weight":t.value.style.chart.layout.percentage.bold?"bold":"normal",style:{"font-variant-numeric":"tabluar-nums"}},e.toDisplayString(e.unref(i.applyDataLabel)(t.value.style.chart.layout.percentage.formatter,e.unref(i.checkNaN)(s.value),e.unref(i.dataLabel)({v:e.unref(i.checkNaN)(s.value),s:"%",r:t.value.style.chart.layout.percentage.rounding}))),9,ve)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(I)||e.unref(z)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:P,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Z.default,{key:7,config:{type:"wheel",style:{backgroundColor:t.value.style.chart.backgroundColor,wheel:{color:"#CCCCCC"}}}},null,8,["config"]))],44,ae))}},fe=ne._export_sfc(he,[["__scopeId","data-v-0ab72261"]]);exports.default=fe;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { computed as f, ref as c, watch as J, onMounted as he, onBeforeUnmount as de, createElementBlock as v, openBlock as n, unref as s, normalizeStyle as S, createBlock as _, createCommentVNode as h, createSlots as ye, withCtx as g, renderSlot as y, normalizeProps as $, guardReactiveProps as O, normalizeClass as z, createVNode as fe, Fragment as K, renderList as Q, toDisplayString as pe } from "vue";
|
|
2
|
-
import { u as ge, c as me, a as ke, o as we, e as be, w as Z, m as Ce, X as _e, i as $e, v as ee, f as Oe } from "./index-
|
|
3
|
-
import { _ as Ie } from "./Title-
|
|
4
|
-
import { u as xe, U as Ae } from "./usePrinter-
|
|
2
|
+
import { u as ge, c as me, a as ke, o as we, e as be, w as Z, m as Ce, X as _e, i as $e, v as ee, f as Oe } from "./index-bVqxfptX.js";
|
|
3
|
+
import { _ as Ie } from "./Title-B55VMGbm.js";
|
|
4
|
+
import { u as xe, U as Ae } from "./usePrinter-BbeIGqpA.js";
|
|
5
5
|
import { t as Fe, u as Pe } from "./useResponsive-Cw4oZ8sQ.js";
|
|
6
|
-
import Se from "./vue-ui-skeleton-
|
|
7
|
-
import { u as te } from "./useNestedProp-
|
|
8
|
-
import { _ as ze } from "./PackageVersion-
|
|
9
|
-
import { _ as Me } from "./PenAndPaper-
|
|
6
|
+
import Se from "./vue-ui-skeleton-BARmXI9_.js";
|
|
7
|
+
import { u as te } from "./useNestedProp-DU-vsdTb.js";
|
|
8
|
+
import { _ as ze } from "./PackageVersion-gI4tUgWr.js";
|
|
9
|
+
import { _ as Me } from "./PenAndPaper-Di3hcmp3.js";
|
|
10
10
|
import { u as Te } from "./useUserOptionState-BIvW1Kz7.js";
|
|
11
11
|
import { u as Ne } from "./useChartAccessibility-BWojgys7.js";
|
|
12
12
|
import { _ as Re } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { useCssVars as Oe, computed as oe, ref as f, watch as me, onMounted as Ne, onBeforeUnmount as Ae, createElementBlock as X, openBlock as w, unref as h, normalizeStyle as re, createBlock as ae, createCommentVNode as B, createVNode as fe, createSlots as Ie, withCtx as P, renderSlot as F, normalizeProps as J, guardReactiveProps as K, normalizeClass as we, createElementVNode as pe, Fragment as Xe, renderList as Re, toDisplayString as Ce, createTextVNode as We, nextTick as ke } from "vue";
|
|
2
|
-
import { u as Ve, c as xe, aj as Be, v as Ye, t as De, p as ue, a as Ue, o as Ee, e as $e, g as Ge, f as Le, X as je, q as He, r as qe, x as Ze } from "./index-
|
|
3
|
-
import { _ as Je } from "./Title-
|
|
4
|
-
import { u as Ke, U as Qe } from "./usePrinter-
|
|
2
|
+
import { u as Ve, c as xe, aj as Be, v as Ye, t as De, p as ue, a as Ue, o as Ee, e as $e, g as Ge, f as Le, X as je, q as He, r as qe, x as Ze } from "./index-bVqxfptX.js";
|
|
3
|
+
import { _ as Je } from "./Title-B55VMGbm.js";
|
|
4
|
+
import { u as Ke, U as Qe } from "./usePrinter-BbeIGqpA.js";
|
|
5
5
|
import { t as et, u as tt, d as ot } from "./useResponsive-Cw4oZ8sQ.js";
|
|
6
|
-
import at from "./vue-ui-accordion-
|
|
7
|
-
import { D as lt } from "./DataTable-
|
|
8
|
-
import { u as Te } from "./useNestedProp-
|
|
9
|
-
import { _ as nt } from "./PackageVersion-
|
|
10
|
-
import { _ as st } from "./Tooltip-
|
|
11
|
-
import { _ as it } from "./PenAndPaper-
|
|
6
|
+
import at from "./vue-ui-accordion-DQKCLM2T.js";
|
|
7
|
+
import { D as lt } from "./DataTable-BaAjwD5U.js";
|
|
8
|
+
import { u as Te } from "./useNestedProp-DU-vsdTb.js";
|
|
9
|
+
import { _ as nt } from "./PackageVersion-gI4tUgWr.js";
|
|
10
|
+
import { _ as st } from "./Tooltip-CMiCE06y.js";
|
|
11
|
+
import { _ as it } from "./PenAndPaper-Di3hcmp3.js";
|
|
12
12
|
import { u as rt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
13
13
|
import { u as ut } from "./useChartAccessibility-BWojgys7.js";
|
|
14
14
|
import { u as ct } from "./usePanZoom-CUkkqW81.js";
|
|
15
|
-
import dt from "./BaseIcon-
|
|
15
|
+
import dt from "./BaseIcon-DPO_4Adb.js";
|
|
16
16
|
import { _ as vt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
17
17
|
function ht(b, p) {
|
|
18
18
|
const { width: c, height: n } = b, d = p.getImageData(0, 0, c, n).data;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("./index-Dy2-pNb6.cjs"),me=require("./Title-CEZO2hzQ.cjs"),se=require("./usePrinter-BQEYwy4a.cjs"),ae=require("./useResponsive-DQmBAoBf.cjs"),pe=require("./vue-ui-accordion-dVGUWjXH.cjs"),ge=require("./DataTable-zSU-0X__.cjs"),ie=require("./useNestedProp-DQ8Jt3-Y.cjs"),ye=require("./PackageVersion-DxR-fKLM.cjs"),be=require("./Tooltip-BZa-QzER.cjs"),ke=require("./PenAndPaper-CG9o3ymS.cjs"),we=require("./useUserOptionState-BgepsfED.cjs"),Ce=require("./useChartAccessibility-Cm7nkzTG.cjs"),xe=require("./usePanZoom-PXRi2Rwx.cjs"),$e=require("./BaseIcon-DmfPEj6j.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function Te(b,p){const{width:d,height:r}=b,v=p.getImageData(0,0,d,r).data;let n=d,l=r,s=0,g=0,w=!1;for(let f=0;f<r;f+=1)for(let y=0;y<d;y+=1)v[(f*d+y)*4+3]>1&&(w=!0,y<n&&(n=y),y>s&&(s=y),f<l&&(l=f),f>g&&(g=f));return w?[n,l,s,g]:[0,0,0,0]}function ue({word:b,fontSize:p,pad:d,canvas:r,ctx:u,svg:v}){u.save(),u.font=`${v.style&&v.style.bold?"bold ":""}${p}px Arial`;const n=u.measureText(b.name),l=Math.ceil(n.width)+2+(d?d*2:0),s=Math.ceil(p)+2+(d?d*2:0);r.width=l,r.height=s,u.clearRect(0,0,l,s),u.font=`${v.style&&v.style.bold?"bold ":""}${p}px Arial`,u.textAlign="center",u.textBaseline="middle",u.fillStyle="black",u.fillText(b.name,l/2,s/2);const w=u.getImageData(0,0,l,s).data,f=[];for(let B=0;B<s;B+=1)for(let I=0;I<l;I+=1)w[(B*l+I)*4+3]>1&&f.push([I,B]);const[y,t,P,O]=Te(r,u);return u.restore(),{w:l,h:s,wordMask:f,minX:y,minY:t,maxX:P,maxY:O}}function ce({mask:b,maskW:p,maskH:d,wx:r,wy:u,wordMask:v}){for(let n=0;n<v.length;n+=1){const l=r+v[n][0],s=u+v[n][1];if(l<0||s<0||l>=p||s>=d||b[s*p+l])return!1}return!0}function de({mask:b,maskW:p,maskH:d,wx:r,wy:u,wordMask:v}){for(let n=0;n<v.length;n+=1){const l=r+v[n][0],s=u+v[n][1];l>=0&&s>=0&&l<p&&s<d&&(b[s*p+l]=1)}}function Pe({wordMask:b,w:p,h:d,dilation:r}){const u=new Set(b.map(([n,l])=>`${n},${l}`)),v=new Set(u);for(let[n,l]of b)for(let s=-r;s<=r;s+=1)for(let g=-r;g<=r;g+=1){if(s===0&&g===0)continue;const w=n+s,f=l+g;w>=0&&w<p&&f>=0&&f<d&&v.add(`${w},${f}`)}return Array.from(v).map(n=>n.split(",").map(Number))}function Be({words:b,proximity:p=0,svg:d,strictPixelPadding:r}){const{width:u,height:v}=d,n=Math.round(u),l=Math.round(v),s=1,g=d.minFontSize,w=Math.min(d.maxFontSize,100),f=b.map(C=>C.value),y=Math.min(...f),t=Math.max(...f),P=new Uint8Array(n*l),O=document.createElement("canvas"),B=O.getContext("2d",{willReadFrequently:!0});O.width=n,O.height=l;const I=6,j=2,G=2,Z=1,c=Math.floor(n/2),J=Math.floor(l/2),Q=[...b].sort((C,N)=>N.value-C.value),R=[];for(const C of Q){let N=g;t!==y&&(N=(C.value-y)/(t-y)*(w-g)+g),N=Math.max(g,Math.min(w,N));let V=!1,z=N;for(;!V&&z>=s;){let{w:M,h,wordMask:_,minX:E,minY:W,maxX:q,maxY:D}=ue({word:C,fontSize:z,pad:p,canvas:O,ctx:B,svg:d});r&&(_=Pe({wordMask:_,w:M,h,dilation:1}));let x=0,A=0;for(;x<Math.max(n,l)&&!V&&A<1e4;){for(let F=0;F<360;F+=I){A+=1;const T=Math.round(c+x*Math.cos(F*Math.PI/180)-M/2),$=Math.round(J+x*Math.sin(F*Math.PI/180)-h/2);if(!(T<0||$<0||T+M>n||$+h>l)&&ce({mask:P,maskW:n,maskH:l,wx:T,wy:$,wordMask:_})){R.push({...C,x:T-n/2,y:$-l/2,fontSize:z,width:M,height:h,angle:0,minX:E,minY:W,maxX:q,maxY:D}),de({mask:P,maskW:n,maskH:l,wx:T,wy:$,wordMask:_}),V=!0;break}}x+=j}V||(z-=1)}if(!V&&z<s){z=s;const{w:M,h,wordMask:_,minX:E,minY:W,maxX:q,maxY:D}=ue({word:C,fontSize:z,pad:p,canvas:O,ctx:B,svg:d});let x=0,A=0;for(;x<Math.max(n,l)&&!V&&A<25e3;){for(let F=0;F<360;F+=G){A+=1;const T=Math.round(c+x*Math.cos(F*Math.PI/180)-M/2),$=Math.round(J+x*Math.sin(F*Math.PI/180)-h/2);if(!(T<0||$<0||T+M>n||$+h>l)&&ce({mask:P,maskW:n,maskH:l,wx:T,wy:$,wordMask:_})){R.push({...C,x:T-n/2,y:$-l/2,fontSize:z,width:M,height:h,angle:0,minX:E,minY:W,maxX:q,maxY:D}),de({mask:P,maskW:n,maskH:l,wx:T,wy:$,wordMask:_}),V=!0;break}}x+=Z}}}return R.sort((C,N)=>N.fontSize-C.fontSize)}const Ne=["id"],ze=["xmlns","viewBox"],Me=["width","height"],Fe=["transform"],Oe=["x","y","width","height","onMouseover"],Ve=["fill","font-weight","x","y","font-size","transform"],Ae={key:4,class:"vue-data-ui-watermark"},Ie={key:5,"data-dom-to-png-ignore":"",class:"reset-wrapper"},_e=["innerHTML"],Ee={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(b,{expose:p}){e.useCssVars(o=>({"7200478e":o.slicerColor}));const{vue_ui_word_cloud:d}=m.useConfig(),r=b,u=e.computed({get(){return!!r.dataset&&r.dataset.length},set(o){return o}}),v=e.ref(m.createUid()),n=e.ref(0),l=e.ref(null),s=e.ref(null),g=e.ref(null),w=e.ref(0),f=e.ref(0),y=e.ref(!1),t=e.computed({get:()=>Z(),set:o=>o}),P=e.ref(O());function O(){return typeof r.dataset=="string"?m.createWordCloudDatasetFromPlainText(r.dataset):r.dataset.map((o,i)=>({...o,value:m.checkNaN(o.value)}))}e.watch(()=>r.dataset,()=>{P.value=O(),W()});const{userOptionsVisible:B,setUserOptionsVisibility:I,keepUserOptionState:j}=we.useUserOptionState({config:t.value}),{svgRef:G}=Ce.useChartAccessibility({config:t.value.style.chart.title});function Z(){const o=ie.useNestedProp({userConfig:r.config,defaultConfig:d});return o.theme?{...ie.useNestedProp({userConfig:m.themes.vue_ui_word_cloud[o.theme]||r.config,defaultConfig:o}),customPalette:m.themePalettes[o.theme]||m.palette}:o}e.watch(()=>r.config,o=>{t.value=Z(),B.value=!t.value.userOptions.showOnChartHover,C(),w.value+=1,f.value+=1,h.value.showTable=t.value.table.show,h.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const c=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize,bold:t.value.style.chart.words.bold}),J=ae.debounce(()=>{W()},10),Q=ae.throttle(()=>{const{width:o,height:i}=ae.useResponsive({chart:l.value,title:t.value.style.chart.title.text?s.value:null,source:g.value});requestAnimationFrame(()=>{c.value.width=o,c.value.height=i,e.nextTick(J)})}),R=e.ref(null);e.onMounted(C);function C(){m.objectIsEmpty(r.dataset)?m.error({componentName:"VueUiWordCloud",type:"dataset"}):P.value.forEach((o,i)=>{m.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(a=>{u.value=!1,m.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:a,index:i})})}),t.value.responsive&&(R.value=new ResizeObserver(Q),R.value.observe(l.value.parentNode))}e.onBeforeUnmount(()=>{R.value&&R.value.disconnect()});const{isPrinting:N,isImaging:V,generatePdf:z,generateImage:M}=se.usePrinter({elementId:`wordCloud_${v.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud",options:t.value.userOptions.print}),h=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show});function _(o,i,a="Arial"){const k=document.createElement("canvas").getContext("2d");return k.font=`${i}px ${t.value.style.chart.words.bold?"bold":"normal"} ${a}`,{width:k.measureText(o).width+t.value.style.chart.words.proximity,height:i}}const E=e.ref([]);e.watch(()=>r.dataset,W,{immediate:!0});function W(){const o=[...P.value].map(k=>k.value),i=Math.max(...o),a=Math.min(...o),S=[...P.value].map((k,X)=>{let U=(k.value-a)/(i-a)*(c.value.maxFontSize-c.value.minFontSize)+c.value.minFontSize;U=isNaN(U)?c.value.minFontSize:U;const re=_(k.name,U);return{...k,id:m.createUid(),fontSize:U,width:re.width,height:re.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[X]||t.value.customPalette[X%t.value.customPalette.length]||m.palette[X]||m.palette[X%m.palette.length]:t.value.style.chart.words.color}});E.value=Be({words:S,svg:c.value,proximity:t.value.style.chart.words.proximity,strictPixelPadding:t.value.strictPixelPadding})}const q=e.computed(()=>{const o=E.value.map(a=>({name:a.name,color:a.color})),i=E.value.map(a=>a.value);return{head:o,body:i}});function D(){e.nextTick(()=>{const o=q.value.head.map((S,k)=>[[S.name],[q.value.body[k]]]),i=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),a=m.createCsvContent(i);m.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const x=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],i=q.value.head.map((k,X)=>{const U=m.dataLabel({p:t.value.table.td.prefix,v:q.value.body[X],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:k.color,name:k.name},U]}),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:i,config:a}}),A=e.ref(!1);function F(o){A.value=o,n.value+=1}function T(){return E.value}function $(){h.value.showTable=!h.value.showTable}function le(){h.value.showTooltip=!h.value.showTooltip}const H=e.ref(!1);function ee(){H.value=!H.value}const ve=e.computed(()=>!H.value&&t.value.style.chart.zoom.show),{viewBox:K,resetZoom:ne,isZoom:he}=xe.usePanZoom(G,{x:0,y:0,width:c.value.width<=0?10:c.value.width,height:c.value.height<=0?10:c.value.height},1,ve);p({getData:T,generateCsv:D,generatePdf:z,generateImage:M,toggleTable:$,toggleTooltip:le,toggleAnnotator:ee});const Y=e.ref(null),L=e.ref(!1),te=e.ref(""),oe=e.ref(null);function fe(o){if(!h.value.showTooltip)return;Y.value=o.id,oe.value={datapoint:o,config:t.value};const i=t.value.style.chart.tooltip.customFormat;if(L.value=!1,m.isFunction(i))try{const a=i({datapoint:o,config:t.value});typeof a=="string"&&(te.value=a,L.value=!0)}catch{console.warn("Custom format cannot be applied."),L.value=!1}if(!L.value){let a=`<svg viewBox="0 0 10 10" height="${t.value.style.chart.tooltip.fontSize}"><circle cx="5" cy="5" r="5" fill="${o.color}"/></svg><span>${o.name}:</span><b>${(o.value||0).toFixed(t.value.style.chart.tooltip.roundingValue)}</b>`;te.value=`<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${a}</div>`}y.value=!0}return(o,i)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:l,id:`wordCloud_${v.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:i[3]||(i[3]=()=>e.unref(I)(!0)),onMouseleave:i[4]||(i[4]=()=>e.unref(I)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ke._sfc_main,{key:0,svgRef:e.unref(G),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:H.value,onClose:ee},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:s,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(me._sfc_main,{key:`title_${w.value}`,config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&u.value&&(e.unref(j)||e.unref(B))?(e.openBlock(),e.createBlock(se.UserOptions,{ref:"details",key:`user_option_${n.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(N),isImaging:e.unref(V),uid:v.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:A.value,titles:{...t.value.userOptions.buttonTitles},chartElement:l.value,position:t.value.userOptions.position,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:h.value.showTooltip,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:H.value,onToggleFullscreen:F,onGeneratePdf:e.unref(z),onGenerateCsv:D,onGenerateImage:e.unref(M),onToggleTable:$,onToggleTooltip:le,onToggleAnnotator:ee,style:e.normalizeStyle({visibility:e.unref(j)?e.unref(B)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:S})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:S})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:S})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:S})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:S})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:S})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasTooltip","isTooltip","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createElementBlock("svg",{key:3,ref_key:"svgRef",ref:G,class:e.normalizeClass({"vue-data-ui-fullscreen--on":A.value,"vue-data-ui-fulscreen--off":!A.value}),xmlns:e.unref(m.XMLNS),viewBox:`${e.unref(K).x} ${e.unref(K).y} ${e.unref(K).width} ${e.unref(K).height}`,style:"overflow:hidden;background:transparent;"},[e.createVNode(ye._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:c.value.width<=0?10:c.value.width,height:c.value.height<=0?10:c.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Me)):e.createCommentVNode("",!0),e.createElementVNode("g",{transform:`translate(${(c.value.width<=0?10:c.value.width)/2}, ${(c.value.height<=0?10:c.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(a,S)=>(e.openBlock(),e.createElementBlock("g",null,[a.minX!==void 0?(e.openBlock(),e.createElementBlock("rect",{key:0,x:a.x+a.minX,y:a.y+a.minY*1.25,width:a.maxX-a.minX,height:a.maxY-a.minY,fill:"transparent","pointer-events":"visiblePainted",onMouseover:k=>fe(a),onMouseleave:i[0]||(i[0]=k=>{Y.value=null,y.value=!1})},null,40,Oe)):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("text",{fill:a.color,"font-weight":t.value.style.chart.words.bold?"bold":"normal",key:S,x:a.x,y:a.y,"font-size":a.fontSize,transform:`translate(${a.width/2}, ${a.height/2})`,class:e.normalizeClass({animated:t.value.useCssAnimation,"word-selected":Y.value&&Y.value===a.id&&h.value.showTooltip,"word-not-selected":Y.value&&Y.value!==a.id&&h.value.showTooltip}),"text-anchor":"middle","dominant-baseline":"central",style:e.normalizeStyle(`animation-delay:${S*t.value.animationDelayMs}ms !important; pointer-events:none;`)},e.toDisplayString(a.name),15,Ve))]))),256))],8,Fe),e.renderSlot(o.$slots,"svg",{svg:{height:c.value.height,width:c.value.width}},void 0,!0)],10,ze)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ae,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(N)||e.unref(V)})),void 0,!0)])):e.createCommentVNode("",!0),e.unref(he)?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(o.$slots,"reset-action",{reset:e.unref(ne)},()=>[e.createElementVNode("button",{"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",style:e.normalizeStyle({background:t.value.style.chart.backgroundColor}),onClick:i[1]||(i[1]=a=>e.unref(ne)(!0))},[e.createVNode($e.default,{name:"refresh",stroke:t.value.style.chart.color},null,8,["stroke"])],4)],!0)])):e.createCommentVNode("",!0),e.createVNode(be._sfc_main,{show:h.value.showTooltip&&y.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:l.value,content:te.value,isCustom:L.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...oe.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...oe.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:g,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createBlock(pe.default,{key:7,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.openBlock(),e.createBlock(ge.DataTable,{key:`table_${f.value}`,colNames:x.value.colNames,head:x.value.head,body:x.value.body,config:x.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:i[2]||(i[2]=a=>h.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,_e)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],44,Ne))}},Re=Se._export_sfc(Ee,[["__scopeId","data-v-cda211d1"]]);exports.default=Re;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("./index-DlALYfRS.cjs"),me=require("./Title-BiyGREAz.cjs"),se=require("./usePrinter-n1HzfoSm.cjs"),ae=require("./useResponsive-DQmBAoBf.cjs"),pe=require("./vue-ui-accordion-CByAeInD.cjs"),ge=require("./DataTable-OM4js4qI.cjs"),ie=require("./useNestedProp-BZX7zlGv.cjs"),ye=require("./PackageVersion-Di-ZyR0_.cjs"),be=require("./Tooltip-C-Kq18lz.cjs"),ke=require("./PenAndPaper-CtYhqkG5.cjs"),we=require("./useUserOptionState-BgepsfED.cjs"),Ce=require("./useChartAccessibility-Cm7nkzTG.cjs"),xe=require("./usePanZoom-PXRi2Rwx.cjs"),$e=require("./BaseIcon-CmdFxgkp.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function Te(b,p){const{width:d,height:r}=b,v=p.getImageData(0,0,d,r).data;let n=d,l=r,s=0,g=0,w=!1;for(let f=0;f<r;f+=1)for(let y=0;y<d;y+=1)v[(f*d+y)*4+3]>1&&(w=!0,y<n&&(n=y),y>s&&(s=y),f<l&&(l=f),f>g&&(g=f));return w?[n,l,s,g]:[0,0,0,0]}function ue({word:b,fontSize:p,pad:d,canvas:r,ctx:u,svg:v}){u.save(),u.font=`${v.style&&v.style.bold?"bold ":""}${p}px Arial`;const n=u.measureText(b.name),l=Math.ceil(n.width)+2+(d?d*2:0),s=Math.ceil(p)+2+(d?d*2:0);r.width=l,r.height=s,u.clearRect(0,0,l,s),u.font=`${v.style&&v.style.bold?"bold ":""}${p}px Arial`,u.textAlign="center",u.textBaseline="middle",u.fillStyle="black",u.fillText(b.name,l/2,s/2);const w=u.getImageData(0,0,l,s).data,f=[];for(let B=0;B<s;B+=1)for(let I=0;I<l;I+=1)w[(B*l+I)*4+3]>1&&f.push([I,B]);const[y,t,P,O]=Te(r,u);return u.restore(),{w:l,h:s,wordMask:f,minX:y,minY:t,maxX:P,maxY:O}}function ce({mask:b,maskW:p,maskH:d,wx:r,wy:u,wordMask:v}){for(let n=0;n<v.length;n+=1){const l=r+v[n][0],s=u+v[n][1];if(l<0||s<0||l>=p||s>=d||b[s*p+l])return!1}return!0}function de({mask:b,maskW:p,maskH:d,wx:r,wy:u,wordMask:v}){for(let n=0;n<v.length;n+=1){const l=r+v[n][0],s=u+v[n][1];l>=0&&s>=0&&l<p&&s<d&&(b[s*p+l]=1)}}function Pe({wordMask:b,w:p,h:d,dilation:r}){const u=new Set(b.map(([n,l])=>`${n},${l}`)),v=new Set(u);for(let[n,l]of b)for(let s=-r;s<=r;s+=1)for(let g=-r;g<=r;g+=1){if(s===0&&g===0)continue;const w=n+s,f=l+g;w>=0&&w<p&&f>=0&&f<d&&v.add(`${w},${f}`)}return Array.from(v).map(n=>n.split(",").map(Number))}function Be({words:b,proximity:p=0,svg:d,strictPixelPadding:r}){const{width:u,height:v}=d,n=Math.round(u),l=Math.round(v),s=1,g=d.minFontSize,w=Math.min(d.maxFontSize,100),f=b.map(C=>C.value),y=Math.min(...f),t=Math.max(...f),P=new Uint8Array(n*l),O=document.createElement("canvas"),B=O.getContext("2d",{willReadFrequently:!0});O.width=n,O.height=l;const I=6,j=2,G=2,Z=1,c=Math.floor(n/2),J=Math.floor(l/2),Q=[...b].sort((C,N)=>N.value-C.value),R=[];for(const C of Q){let N=g;t!==y&&(N=(C.value-y)/(t-y)*(w-g)+g),N=Math.max(g,Math.min(w,N));let V=!1,z=N;for(;!V&&z>=s;){let{w:M,h,wordMask:_,minX:E,minY:W,maxX:q,maxY:D}=ue({word:C,fontSize:z,pad:p,canvas:O,ctx:B,svg:d});r&&(_=Pe({wordMask:_,w:M,h,dilation:1}));let x=0,A=0;for(;x<Math.max(n,l)&&!V&&A<1e4;){for(let F=0;F<360;F+=I){A+=1;const T=Math.round(c+x*Math.cos(F*Math.PI/180)-M/2),$=Math.round(J+x*Math.sin(F*Math.PI/180)-h/2);if(!(T<0||$<0||T+M>n||$+h>l)&&ce({mask:P,maskW:n,maskH:l,wx:T,wy:$,wordMask:_})){R.push({...C,x:T-n/2,y:$-l/2,fontSize:z,width:M,height:h,angle:0,minX:E,minY:W,maxX:q,maxY:D}),de({mask:P,maskW:n,maskH:l,wx:T,wy:$,wordMask:_}),V=!0;break}}x+=j}V||(z-=1)}if(!V&&z<s){z=s;const{w:M,h,wordMask:_,minX:E,minY:W,maxX:q,maxY:D}=ue({word:C,fontSize:z,pad:p,canvas:O,ctx:B,svg:d});let x=0,A=0;for(;x<Math.max(n,l)&&!V&&A<25e3;){for(let F=0;F<360;F+=G){A+=1;const T=Math.round(c+x*Math.cos(F*Math.PI/180)-M/2),$=Math.round(J+x*Math.sin(F*Math.PI/180)-h/2);if(!(T<0||$<0||T+M>n||$+h>l)&&ce({mask:P,maskW:n,maskH:l,wx:T,wy:$,wordMask:_})){R.push({...C,x:T-n/2,y:$-l/2,fontSize:z,width:M,height:h,angle:0,minX:E,minY:W,maxX:q,maxY:D}),de({mask:P,maskW:n,maskH:l,wx:T,wy:$,wordMask:_}),V=!0;break}}x+=Z}}}return R.sort((C,N)=>N.fontSize-C.fontSize)}const Ne=["id"],ze=["xmlns","viewBox"],Me=["width","height"],Fe=["transform"],Oe=["x","y","width","height","onMouseover"],Ve=["fill","font-weight","x","y","font-size","transform"],Ae={key:4,class:"vue-data-ui-watermark"},Ie={key:5,"data-dom-to-png-ignore":"",class:"reset-wrapper"},_e=["innerHTML"],Ee={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(b,{expose:p}){e.useCssVars(o=>({"7200478e":o.slicerColor}));const{vue_ui_word_cloud:d}=m.useConfig(),r=b,u=e.computed({get(){return!!r.dataset&&r.dataset.length},set(o){return o}}),v=e.ref(m.createUid()),n=e.ref(0),l=e.ref(null),s=e.ref(null),g=e.ref(null),w=e.ref(0),f=e.ref(0),y=e.ref(!1),t=e.computed({get:()=>Z(),set:o=>o}),P=e.ref(O());function O(){return typeof r.dataset=="string"?m.createWordCloudDatasetFromPlainText(r.dataset):r.dataset.map((o,i)=>({...o,value:m.checkNaN(o.value)}))}e.watch(()=>r.dataset,()=>{P.value=O(),W()});const{userOptionsVisible:B,setUserOptionsVisibility:I,keepUserOptionState:j}=we.useUserOptionState({config:t.value}),{svgRef:G}=Ce.useChartAccessibility({config:t.value.style.chart.title});function Z(){const o=ie.useNestedProp({userConfig:r.config,defaultConfig:d});return o.theme?{...ie.useNestedProp({userConfig:m.themes.vue_ui_word_cloud[o.theme]||r.config,defaultConfig:o}),customPalette:m.themePalettes[o.theme]||m.palette}:o}e.watch(()=>r.config,o=>{t.value=Z(),B.value=!t.value.userOptions.showOnChartHover,C(),w.value+=1,f.value+=1,h.value.showTable=t.value.table.show,h.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const c=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize,bold:t.value.style.chart.words.bold}),J=ae.debounce(()=>{W()},10),Q=ae.throttle(()=>{const{width:o,height:i}=ae.useResponsive({chart:l.value,title:t.value.style.chart.title.text?s.value:null,source:g.value});requestAnimationFrame(()=>{c.value.width=o,c.value.height=i,e.nextTick(J)})}),R=e.ref(null);e.onMounted(C);function C(){m.objectIsEmpty(r.dataset)?m.error({componentName:"VueUiWordCloud",type:"dataset"}):P.value.forEach((o,i)=>{m.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(a=>{u.value=!1,m.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:a,index:i})})}),t.value.responsive&&(R.value=new ResizeObserver(Q),R.value.observe(l.value.parentNode))}e.onBeforeUnmount(()=>{R.value&&R.value.disconnect()});const{isPrinting:N,isImaging:V,generatePdf:z,generateImage:M}=se.usePrinter({elementId:`wordCloud_${v.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud",options:t.value.userOptions.print}),h=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show});function _(o,i,a="Arial"){const k=document.createElement("canvas").getContext("2d");return k.font=`${i}px ${t.value.style.chart.words.bold?"bold":"normal"} ${a}`,{width:k.measureText(o).width+t.value.style.chart.words.proximity,height:i}}const E=e.ref([]);e.watch(()=>r.dataset,W,{immediate:!0});function W(){const o=[...P.value].map(k=>k.value),i=Math.max(...o),a=Math.min(...o),S=[...P.value].map((k,X)=>{let U=(k.value-a)/(i-a)*(c.value.maxFontSize-c.value.minFontSize)+c.value.minFontSize;U=isNaN(U)?c.value.minFontSize:U;const re=_(k.name,U);return{...k,id:m.createUid(),fontSize:U,width:re.width,height:re.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[X]||t.value.customPalette[X%t.value.customPalette.length]||m.palette[X]||m.palette[X%m.palette.length]:t.value.style.chart.words.color}});E.value=Be({words:S,svg:c.value,proximity:t.value.style.chart.words.proximity,strictPixelPadding:t.value.strictPixelPadding})}const q=e.computed(()=>{const o=E.value.map(a=>({name:a.name,color:a.color})),i=E.value.map(a=>a.value);return{head:o,body:i}});function D(){e.nextTick(()=>{const o=q.value.head.map((S,k)=>[[S.name],[q.value.body[k]]]),i=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),a=m.createCsvContent(i);m.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const x=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],i=q.value.head.map((k,X)=>{const U=m.dataLabel({p:t.value.table.td.prefix,v:q.value.body[X],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:k.color,name:k.name},U]}),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:i,config:a}}),A=e.ref(!1);function F(o){A.value=o,n.value+=1}function T(){return E.value}function $(){h.value.showTable=!h.value.showTable}function le(){h.value.showTooltip=!h.value.showTooltip}const H=e.ref(!1);function ee(){H.value=!H.value}const ve=e.computed(()=>!H.value&&t.value.style.chart.zoom.show),{viewBox:K,resetZoom:ne,isZoom:he}=xe.usePanZoom(G,{x:0,y:0,width:c.value.width<=0?10:c.value.width,height:c.value.height<=0?10:c.value.height},1,ve);p({getData:T,generateCsv:D,generatePdf:z,generateImage:M,toggleTable:$,toggleTooltip:le,toggleAnnotator:ee});const Y=e.ref(null),L=e.ref(!1),te=e.ref(""),oe=e.ref(null);function fe(o){if(!h.value.showTooltip)return;Y.value=o.id,oe.value={datapoint:o,config:t.value};const i=t.value.style.chart.tooltip.customFormat;if(L.value=!1,m.isFunction(i))try{const a=i({datapoint:o,config:t.value});typeof a=="string"&&(te.value=a,L.value=!0)}catch{console.warn("Custom format cannot be applied."),L.value=!1}if(!L.value){let a=`<svg viewBox="0 0 10 10" height="${t.value.style.chart.tooltip.fontSize}"><circle cx="5" cy="5" r="5" fill="${o.color}"/></svg><span>${o.name}:</span><b>${(o.value||0).toFixed(t.value.style.chart.tooltip.roundingValue)}</b>`;te.value=`<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${a}</div>`}y.value=!0}return(o,i)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:l,id:`wordCloud_${v.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:i[3]||(i[3]=()=>e.unref(I)(!0)),onMouseleave:i[4]||(i[4]=()=>e.unref(I)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ke._sfc_main,{key:0,svgRef:e.unref(G),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:H.value,onClose:ee},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:s,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(me._sfc_main,{key:`title_${w.value}`,config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&u.value&&(e.unref(j)||e.unref(B))?(e.openBlock(),e.createBlock(se.UserOptions,{ref:"details",key:`user_option_${n.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(N),isImaging:e.unref(V),uid:v.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:A.value,titles:{...t.value.userOptions.buttonTitles},chartElement:l.value,position:t.value.userOptions.position,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:h.value.showTooltip,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:H.value,onToggleFullscreen:F,onGeneratePdf:e.unref(z),onGenerateCsv:D,onGenerateImage:e.unref(M),onToggleTable:$,onToggleTooltip:le,onToggleAnnotator:ee,style:e.normalizeStyle({visibility:e.unref(j)?e.unref(B)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:S})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:S})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:S})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:S})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:S})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:S})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasTooltip","isTooltip","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createElementBlock("svg",{key:3,ref_key:"svgRef",ref:G,class:e.normalizeClass({"vue-data-ui-fullscreen--on":A.value,"vue-data-ui-fulscreen--off":!A.value}),xmlns:e.unref(m.XMLNS),viewBox:`${e.unref(K).x} ${e.unref(K).y} ${e.unref(K).width} ${e.unref(K).height}`,style:"overflow:hidden;background:transparent;"},[e.createVNode(ye._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:c.value.width<=0?10:c.value.width,height:c.value.height<=0?10:c.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Me)):e.createCommentVNode("",!0),e.createElementVNode("g",{transform:`translate(${(c.value.width<=0?10:c.value.width)/2}, ${(c.value.height<=0?10:c.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(a,S)=>(e.openBlock(),e.createElementBlock("g",null,[a.minX!==void 0?(e.openBlock(),e.createElementBlock("rect",{key:0,x:a.x+a.minX,y:a.y+a.minY*1.25,width:a.maxX-a.minX,height:a.maxY-a.minY,fill:"transparent","pointer-events":"visiblePainted",onMouseover:k=>fe(a),onMouseleave:i[0]||(i[0]=k=>{Y.value=null,y.value=!1})},null,40,Oe)):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("text",{fill:a.color,"font-weight":t.value.style.chart.words.bold?"bold":"normal",key:S,x:a.x,y:a.y,"font-size":a.fontSize,transform:`translate(${a.width/2}, ${a.height/2})`,class:e.normalizeClass({animated:t.value.useCssAnimation,"word-selected":Y.value&&Y.value===a.id&&h.value.showTooltip,"word-not-selected":Y.value&&Y.value!==a.id&&h.value.showTooltip}),"text-anchor":"middle","dominant-baseline":"central",style:e.normalizeStyle(`animation-delay:${S*t.value.animationDelayMs}ms !important; pointer-events:none;`)},e.toDisplayString(a.name),15,Ve))]))),256))],8,Fe),e.renderSlot(o.$slots,"svg",{svg:{height:c.value.height,width:c.value.width}},void 0,!0)],10,ze)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ae,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(N)||e.unref(V)})),void 0,!0)])):e.createCommentVNode("",!0),e.unref(he)?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(o.$slots,"reset-action",{reset:e.unref(ne)},()=>[e.createElementVNode("button",{"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",style:e.normalizeStyle({background:t.value.style.chart.backgroundColor}),onClick:i[1]||(i[1]=a=>e.unref(ne)(!0))},[e.createVNode($e.default,{name:"refresh",stroke:t.value.style.chart.color},null,8,["stroke"])],4)],!0)])):e.createCommentVNode("",!0),e.createVNode(be._sfc_main,{show:h.value.showTooltip&&y.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:l.value,content:te.value,isCustom:L.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...oe.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...oe.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:g,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createBlock(pe.default,{key:7,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.openBlock(),e.createBlock(ge.DataTable,{key:`table_${f.value}`,colNames:x.value.colNames,head:x.value.head,body:x.value.body,config:x.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:i[2]||(i[2]=a=>h.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,_e)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],44,Ne))}},Re=Se._export_sfc(Ee,[["__scopeId","data-v-cda211d1"]]);exports.default=Re;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { computed as N, ref as v, watch as Ja, createElementBlock as R, openBlock as k, unref as S, normalizeStyle as pa, normalizeClass as Qa, createBlock as sa, createCommentVNode as L, renderSlot as B, createVNode as wa, createSlots as Xa, withCtx as G, normalizeProps as ma, guardReactiveProps as oa, withModifiers as G0, Fragment as ra, createElementVNode as T, renderList as $a, mergeProps as C0, createTextVNode as Sa, toDisplayString as ba, nextTick as I0 } from "vue";
|
|
2
|
-
import { u as P0, c as qa, b as U0, d as ga, p as da, X as O0, l as D0, h as a0, i as _0, f as l0, C as ya, N as K0, q as z0, r as j0, x as H0 } from "./index-
|
|
3
|
-
import { u as F0 } from "./useNestedProp-
|
|
2
|
+
import { u as P0, c as qa, b as U0, d as ga, p as da, X as O0, l as D0, h as a0, i as _0, f as l0, C as ya, N as K0, q as z0, r as j0, x as H0 } from "./index-bVqxfptX.js";
|
|
3
|
+
import { u as F0 } from "./useNestedProp-DU-vsdTb.js";
|
|
4
4
|
import { u as Z0 } from "./useUserOptionState-BIvW1Kz7.js";
|
|
5
5
|
import { u as x0 } from "./useChartAccessibility-BWojgys7.js";
|
|
6
|
-
import { _ as W0 } from "./PenAndPaper-
|
|
7
|
-
import { _ as Y0 } from "./Title-
|
|
8
|
-
import { u as V0, U as J0 } from "./usePrinter-
|
|
9
|
-
import { _ as Q0 } from "./PackageVersion-
|
|
10
|
-
import { _ as X0 } from "./Tooltip-
|
|
11
|
-
import $0 from "./vue-ui-accordion-
|
|
12
|
-
import { D as q0 } from "./DataTable-
|
|
13
|
-
import { L as a3 } from "./Legend-
|
|
14
|
-
import { _ as _3 } from "./Shape-
|
|
6
|
+
import { _ as W0 } from "./PenAndPaper-Di3hcmp3.js";
|
|
7
|
+
import { _ as Y0 } from "./Title-B55VMGbm.js";
|
|
8
|
+
import { u as V0, U as J0 } from "./usePrinter-BbeIGqpA.js";
|
|
9
|
+
import { _ as Q0 } from "./PackageVersion-gI4tUgWr.js";
|
|
10
|
+
import { _ as X0 } from "./Tooltip-CMiCE06y.js";
|
|
11
|
+
import $0 from "./vue-ui-accordion-DQKCLM2T.js";
|
|
12
|
+
import { D as q0 } from "./DataTable-BaAjwD5U.js";
|
|
13
|
+
import { L as a3 } from "./Legend-DqxOfhbM.js";
|
|
14
|
+
import { _ as _3 } from "./Shape-DJcgH2ks.js";
|
|
15
15
|
import { _ as l3 } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
16
|
const n3 = {
|
|
17
17
|
type: "FeatureCollection",
|