vue-data-ui 2.6.5 → 2.6.7
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-DfGZcZu4.js → Arrow-BxUmDF04.js} +1 -1
- package/dist/{Arrow-CyeGXbbD.cjs → Arrow-PPbxds1Q.cjs} +1 -1
- package/dist/{BaseIcon-B5DvqSYe.cjs → BaseIcon-BmVwfJg2.cjs} +1 -1
- package/dist/{BaseIcon-BzuvxztF.js → BaseIcon-CDx9pxUG.js} +1 -1
- package/dist/{DataTable-zpYtivMM.cjs → DataTable-Cv_TVAas.cjs} +1 -1
- package/dist/{DataTable-BCCBpyhr.js → DataTable-TjJIVFlL.js} +2 -2
- package/dist/{Legend-CJkkmRNE.cjs → Legend-DunrYGuw.cjs} +1 -1
- package/dist/{Legend-CyJrN721.js → Legend-NKGwxkI7.js} +2 -2
- package/dist/{PackageVersion-Dv25_ZxF.cjs → PackageVersion-DJKkRuOD.cjs} +1 -1
- package/dist/{PackageVersion-PZr4BkQ5.js → PackageVersion-QRvxRYPv.js} +1 -1
- package/dist/{PenAndPaper-Cniu2YEX.js → PenAndPaper-CxC1lWGK.js} +3 -3
- package/dist/{PenAndPaper-Cx3_Liuv.cjs → PenAndPaper-MTTJ3Gd9.cjs} +1 -1
- package/dist/{Shape-BXTmpde5.js → Shape-58uyOuYc.js} +26 -23
- package/dist/Shape-D_1vUjCL.cjs +1 -0
- package/dist/{Slicer-DzKrIvL0.cjs → Slicer-BGEieXKn.cjs} +1 -1
- package/dist/{Slicer-D3tEQT9Z.js → Slicer-C7ormJRw.js} +2 -2
- package/dist/{Title-CXBc1TH6.js → Title-BI8etrRU.js} +1 -1
- package/dist/{Title-DdUtciJN.cjs → Title-Dk92HYMu.cjs} +1 -1
- package/dist/Tooltip-ClMeqejQ.cjs +1 -0
- package/dist/{Tooltip-C9lPh5bN.js → Tooltip-Cxc8c50d.js} +23 -20
- package/dist/{index-DLCyjPV0.js → index-9EeNZMz1.js} +6 -1
- package/dist/index-DEnRHTzk.cjs +9 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +89 -62
- package/dist/types/vue-data-ui.d.ts +89 -62
- package/dist/useChartAccessibility-BWojgys7.js +13 -0
- package/dist/useChartAccessibility-Cm7nkzTG.cjs +1 -0
- package/dist/{useNestedProp-BdTohsDJ.cjs → useNestedProp-BNT60LxO.cjs} +1 -1
- package/dist/{useNestedProp-q86V3_LA.js → useNestedProp-df_bKQEI.js} +1 -1
- package/dist/{usePrinter-CPqTP09H.cjs → usePrinter-dyVny55M.cjs} +1 -1
- package/dist/{usePrinter-CpHZjw3G.js → usePrinter-ngrh00Ym.js} +1 -1
- package/dist/{vue-data-ui-CR9Dof80.cjs → vue-data-ui-BYX-I7HQ.cjs} +1 -1
- package/dist/{vue-data-ui-CzqznXmA.js → vue-data-ui-CDD7JcMs.js} +61 -61
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-DvHdA_uo.js → vue-ui-3d-bar-BArLjlrc.js} +171 -168
- package/dist/vue-ui-3d-bar-DegdXf_S.cjs +19 -0
- package/dist/{vue-ui-accordion-FM16tlk7.cjs → vue-ui-accordion-D2qxHGzp.cjs} +1 -1
- package/dist/{vue-ui-accordion-DR2qjfsa.js → vue-ui-accordion-Qo8JxnIN.js} +3 -3
- package/dist/{vue-ui-age-pyramid-BoXxK9_W.js → vue-ui-age-pyramid-Biz02m7c.js} +85 -82
- package/dist/vue-ui-age-pyramid-kpaaJ2Gx.cjs +1 -0
- package/dist/{vue-ui-annotator-5tI8NuFh.cjs → vue-ui-annotator-By6XNYm0.cjs} +1 -1
- package/dist/{vue-ui-annotator-D4kCCpAK.js → vue-ui-annotator-MXs48Lua.js} +1 -1
- package/dist/{vue-ui-bullet-X3Xa_OZ6.js → vue-ui-bullet-CtBs_r3I.js} +92 -89
- package/dist/vue-ui-bullet-Dkz6vX0T.cjs +34 -0
- package/dist/vue-ui-candlestick-DiEUIuW8.cjs +2 -0
- package/dist/{vue-ui-candlestick-BTW5toA5.js → vue-ui-candlestick-gPztmuJE.js} +155 -152
- package/dist/{vue-ui-carousel-table-Cmnwv9Y3.cjs → vue-ui-carousel-table-CYeXP21y.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-D7s_SrJR.js → vue-ui-carousel-table-D9ckYNKZ.js} +4 -4
- package/dist/{vue-ui-chestnut-DN9EZShg.js → vue-ui-chestnut-DWjn-jcN.js} +186 -183
- package/dist/vue-ui-chestnut-oZtRERnV.cjs +6 -0
- package/dist/{vue-ui-circle-pack-ts3rurGX.js → vue-ui-circle-pack-Bz5yVvAM.js} +99 -96
- package/dist/vue-ui-circle-pack-DCJ6N00S.cjs +1 -0
- package/dist/{vue-ui-cursor-SW96fYT3.js → vue-ui-cursor-BrrVDy1u.js} +2 -2
- package/dist/{vue-ui-cursor-CpWkrHpR.cjs → vue-ui-cursor-DZhRygRy.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BZcfgajg.js → vue-ui-dashboard-DEmGN8Js.js} +2 -2
- package/dist/{vue-ui-dashboard-Buh9xBz-.cjs → vue-ui-dashboard-o8Ju_cXW.cjs} +1 -1
- package/dist/{vue-ui-digits-rB78vJRR.cjs → vue-ui-digits-CgyYdrQ5.cjs} +1 -1
- package/dist/{vue-ui-digits-C00yOT24.js → vue-ui-digits-DbOrROu7.js} +2 -2
- package/dist/vue-ui-donut-9pWaRwf3.cjs +1 -0
- package/dist/{vue-ui-donut-BkGR2Q-_.js → vue-ui-donut-CP5uWglM.js} +158 -156
- package/dist/{vue-ui-donut-evolution-B7WrjiTO.js → vue-ui-donut-evolution-BAMD1wQ5.js} +133 -131
- package/dist/vue-ui-donut-evolution-Ci_gIrkO.cjs +1 -0
- package/dist/{vue-ui-dumbbell-gQadUH53.js → vue-ui-dumbbell-CFYd-Ypn.js} +125 -122
- package/dist/vue-ui-dumbbell-DUNYoZxT.cjs +9 -0
- package/dist/{vue-ui-flow-CqSTZbgP.js → vue-ui-flow-CdvGWFzv.js} +96 -93
- package/dist/vue-ui-flow-W89ofPB-.cjs +1 -0
- package/dist/{vue-ui-funnel-Jr9TMTsq.js → vue-ui-funnel-DYutKyoz.js} +88 -85
- package/dist/vue-ui-funnel-RvdVrhFu.cjs +1 -0
- package/dist/{vue-ui-galaxy-BrQ10tPo.js → vue-ui-galaxy-BCBRlYS1.js} +123 -120
- package/dist/vue-ui-galaxy-Djdx-ca8.cjs +1 -0
- package/dist/{vue-ui-gauge-DOMio6Mv.js → vue-ui-gauge-BNAAZt4F.js} +86 -83
- package/dist/vue-ui-gauge-BVVmf09x.cjs +1 -0
- package/dist/{vue-ui-gizmo-SKS1idHb.js → vue-ui-gizmo-BFQ_KgLX.js} +3 -3
- package/dist/{vue-ui-gizmo-C3NimqVM.cjs → vue-ui-gizmo-Ceh0oFY3.cjs} +1 -1
- package/dist/vue-ui-heatmap-CiZpI-tA.cjs +1 -0
- package/dist/{vue-ui-heatmap-l4vCjb6f.js → vue-ui-heatmap-Ct3qaBv7.js} +109 -106
- package/dist/vue-ui-history-plot-Ci8Y2EFg.cjs +1 -0
- package/dist/{vue-ui-history-plot-B05tJML1.js → vue-ui-history-plot-shn74MJ6.js} +130 -127
- package/dist/{vue-ui-kpi-DF4U5E1w.js → vue-ui-kpi-B_pV-2JJ.js} +3 -3
- package/dist/{vue-ui-kpi-DQJr571M.cjs → vue-ui-kpi-DfYrbxlX.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BMARnOW4.js → vue-ui-mini-loader-BFnWQs5p.js} +2 -2
- package/dist/{vue-ui-mini-loader-BZkVKkqn.cjs → vue-ui-mini-loader-LIqf62jk.cjs} +1 -1
- package/dist/vue-ui-molecule-D8YuYTKv.cjs +1 -0
- package/dist/{vue-ui-molecule-C1ycekVJ.js → vue-ui-molecule-DNz1m8XZ.js} +147 -144
- package/dist/{vue-ui-mood-radar-_Kd-Lhpm.js → vue-ui-mood-radar-DiYB_zhM.js} +97 -94
- package/dist/vue-ui-mood-radar-uvH7qUHy.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-DIwRSn-O.js → vue-ui-nested-donuts-9hn-g4ir.js} +99 -96
- package/dist/vue-ui-nested-donuts-C7ikDjp7.cjs +17 -0
- package/dist/vue-ui-onion-5Rqvd4Fw.cjs +5 -0
- package/dist/{vue-ui-onion-Dqb0gwGl.js → vue-ui-onion-DCWfNTNu.js} +105 -102
- package/dist/{vue-ui-parallel-coordinate-plot-De-tYNNy.js → vue-ui-parallel-coordinate-plot-CaPFL9_1.js} +97 -94
- package/dist/vue-ui-parallel-coordinate-plot-tlgTbaNX.cjs +8 -0
- package/dist/vue-ui-quadrant-B0Sw5NGo.cjs +1 -0
- package/dist/{vue-ui-quadrant-BQ5maxJq.js → vue-ui-quadrant-BoQZ375K.js} +155 -153
- package/dist/vue-ui-quick-chart-D3zV1d7t.cjs +15 -0
- package/dist/{vue-ui-quick-chart-DF_510YT.js → vue-ui-quick-chart-vfMN8F1q.js} +164 -161
- package/dist/{vue-ui-radar-DDHd0AYs.js → vue-ui-radar-CAuu6wkh.js} +129 -127
- package/dist/vue-ui-radar-CNMJCAwo.cjs +1 -0
- package/dist/{vue-ui-rating-Chi3OOtp.js → vue-ui-rating-Bm0HZ3du.js} +2 -2
- package/dist/{vue-ui-rating-D9kQcY2a.cjs → vue-ui-rating-dsRDRL98.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-CV1xQOok.js → vue-ui-relation-circle-5OZMN9jR.js} +127 -124
- package/dist/vue-ui-relation-circle-iD7BufNH.cjs +1 -0
- package/dist/{vue-ui-rings-D2ezwyae.js → vue-ui-rings-COefBaQT.js} +114 -112
- package/dist/vue-ui-rings-DC4WG4sK.cjs +2 -0
- package/dist/vue-ui-scatter-5ny76dmi.cjs +1 -0
- package/dist/{vue-ui-scatter-BxbUYPk1.js → vue-ui-scatter-DhO83TZZ.js} +157 -154
- package/dist/{vue-ui-screenshot-Bc7Lv1i8.cjs → vue-ui-screenshot-DABH_phE.cjs} +1 -1
- package/dist/{vue-ui-screenshot-cxDgcXJB.js → vue-ui-screenshot-brillPo5.js} +1 -1
- package/dist/{vue-ui-skeleton-D6ojufhb.js → vue-ui-skeleton-BmJiYGtE.js} +3 -3
- package/dist/{vue-ui-skeleton-DvdPnQbR.cjs → vue-ui-skeleton-_DN0U6W6.cjs} +1 -1
- package/dist/{vue-ui-smiley-DEJ6S-We.cjs → vue-ui-smiley-CW6714mb.cjs} +1 -1
- package/dist/{vue-ui-smiley-9nGRDSn7.js → vue-ui-smiley-D9NRimij.js} +2 -2
- package/dist/{vue-ui-spark-trend-DiNeAGXR.js → vue-ui-spark-trend-BKZj03CQ.js} +5 -5
- package/dist/{vue-ui-spark-trend-BosbwgVe.cjs → vue-ui-spark-trend-expbkxgR.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-DNf_Majv.js → vue-ui-sparkbar-CYRORE5i.js} +4 -4
- package/dist/{vue-ui-sparkbar-DGFKrcg0.cjs → vue-ui-sparkbar-Cr9FtevP.cjs} +1 -1
- package/dist/vue-ui-sparkgauge-BHXFhvTv.cjs +1 -0
- package/dist/{vue-ui-sparkgauge-D89HjxSK.js → vue-ui-sparkgauge-JV4tYB7P.js} +56 -53
- package/dist/{vue-ui-sparkhistogram-CU1_P6AJ.js → vue-ui-sparkhistogram-DKINHX2q.js} +93 -90
- package/dist/vue-ui-sparkhistogram-T4a3DDck.cjs +1 -0
- package/dist/{vue-ui-sparkline-C2McLmh5.js → vue-ui-sparkline-CbRTHtig.js} +109 -106
- package/dist/vue-ui-sparkline-Dc6Sf3n8.cjs +1 -0
- package/dist/{vue-ui-sparkstackbar-Cu4aG9PB.js → vue-ui-sparkstackbar-6u9-2nG4.js} +59 -56
- package/dist/vue-ui-sparkstackbar-CV5SkdsP.cjs +1 -0
- package/dist/{vue-ui-stackbar-6m5CpvNM.js → vue-ui-stackbar-CUppObfj.js} +136 -133
- package/dist/vue-ui-stackbar-CXB-nd71.cjs +6 -0
- package/dist/vue-ui-strip-plot-6IXF_U6-.cjs +1 -0
- package/dist/{vue-ui-strip-plot-DlZ2Eez4.js → vue-ui-strip-plot-doaNZAW4.js} +127 -124
- package/dist/{vue-ui-table-U0_3I0fu.js → vue-ui-table-CZsNuDR5.js} +1 -1
- package/dist/{vue-ui-table-BjhcV9qB.cjs → vue-ui-table-S66UCskD.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-Bfqytiv5.cjs → vue-ui-table-heatmap-BU9UU15H.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BrGkCaOG.js → vue-ui-table-heatmap-CjohHqDV.js} +4 -4
- package/dist/{vue-ui-table-sparkline-CXlnp8E3.cjs → vue-ui-table-sparkline-CHFFTD0a.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-C1wNBDqO.js → vue-ui-table-sparkline-ab2rwdKB.js} +5 -5
- package/dist/{vue-ui-thermometer-Bx2abW1B.js → vue-ui-thermometer-C72mHwUi.js} +84 -81
- package/dist/vue-ui-thermometer-Ccd6RGh8.cjs +1 -0
- package/dist/vue-ui-timer-C8Fn2B0b.cjs +64 -0
- package/dist/{vue-ui-timer-3UkgrtEj.js → vue-ui-timer-D-LNi6lz.js} +183 -180
- package/dist/{vue-ui-tiremarks-C_xuD4De.js → vue-ui-tiremarks-Bo8EWsJ8.js} +59 -56
- package/dist/vue-ui-tiremarks-SOzvMOz4.cjs +1 -0
- package/dist/vue-ui-treemap-BqTTQrVh.cjs +1 -0
- package/dist/{vue-ui-treemap-BjDSR72h.js → vue-ui-treemap-uj94elVB.js} +123 -120
- package/dist/{vue-ui-vertical-bar-DUhOoSNl.js → vue-ui-vertical-bar-BUTOw-DK.js} +108 -106
- package/dist/vue-ui-vertical-bar-C4Sxun4Q.cjs +4 -0
- package/dist/{vue-ui-waffle-Dpox5n5s.js → vue-ui-waffle-CTWA1frT.js} +107 -104
- package/dist/vue-ui-waffle-DYWGRKdT.cjs +1 -0
- package/dist/vue-ui-wheel-8K72ZKda.js +330 -0
- package/dist/vue-ui-wheel-Cz5-0klT.cjs +1 -0
- package/dist/{vue-ui-word-cloud-u5S86-Ft.js → vue-ui-word-cloud-CSwBPDB8.js} +97 -94
- package/dist/vue-ui-word-cloud-D39riLZb.cjs +1 -0
- package/dist/vue-ui-xy-BbWXjajH.cjs +3 -0
- package/dist/{vue-ui-xy-0nBQDwL2.js → vue-ui-xy-DpDKutd7.js} +65 -58
- package/dist/{vue-ui-xy-canvas-yQlThVu7.cjs → vue-ui-xy-canvas-BCj0SCqe.cjs} +2 -2
- package/dist/{vue-ui-xy-canvas-DI7LiD4U.js → vue-ui-xy-canvas-BQm9gah4.js} +82 -81
- package/package.json +1 -1
- package/dist/Shape-GAZUIBfN.cjs +0 -1
- package/dist/Tooltip-BlGVq6xj.cjs +0 -1
- package/dist/index-DSGAenF3.cjs +0 -9
- package/dist/vue-ui-3d-bar-vvpkf_bv.cjs +0 -19
- package/dist/vue-ui-age-pyramid-CMMnrI3R.cjs +0 -1
- package/dist/vue-ui-bullet-nXPlud-q.cjs +0 -34
- package/dist/vue-ui-candlestick-B6T0LhEG.cjs +0 -2
- package/dist/vue-ui-chestnut-D8Gq_i77.cjs +0 -6
- package/dist/vue-ui-circle-pack-DCz3OWlu.cjs +0 -1
- package/dist/vue-ui-donut-BpgK-I9o.cjs +0 -1
- package/dist/vue-ui-donut-evolution-BVJCDPQ2.cjs +0 -1
- package/dist/vue-ui-dumbbell-DRcemHVG.cjs +0 -9
- package/dist/vue-ui-flow-DdQsK5DR.cjs +0 -1
- package/dist/vue-ui-funnel-Bq4yoTfd.cjs +0 -1
- package/dist/vue-ui-galaxy-ia1UNlpc.cjs +0 -1
- package/dist/vue-ui-gauge-C3FbYOSi.cjs +0 -1
- package/dist/vue-ui-heatmap-BCau2Z3U.cjs +0 -1
- package/dist/vue-ui-history-plot-DL7VjOd0.cjs +0 -1
- package/dist/vue-ui-molecule-B5XDGmLx.cjs +0 -1
- package/dist/vue-ui-mood-radar-DyMCJKFb.cjs +0 -1
- package/dist/vue-ui-nested-donuts-B4Am-r6T.cjs +0 -17
- package/dist/vue-ui-onion-YeBdJrdx.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-CoecETlm.cjs +0 -8
- package/dist/vue-ui-quadrant-Btzq3qNJ.cjs +0 -1
- package/dist/vue-ui-quick-chart-5cWjffLJ.cjs +0 -15
- package/dist/vue-ui-radar-t22bqFiQ.cjs +0 -1
- package/dist/vue-ui-relation-circle-CWgGPxDJ.cjs +0 -1
- package/dist/vue-ui-rings-CiLJkRwa.cjs +0 -2
- package/dist/vue-ui-scatter-B24gGA8q.cjs +0 -1
- package/dist/vue-ui-sparkgauge-DwK7dzdJ.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-DKoI6_TT.cjs +0 -1
- package/dist/vue-ui-sparkline-Bp7GMRrA.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-Dayxdcr7.cjs +0 -1
- package/dist/vue-ui-stackbar-C21xTVy9.cjs +0 -6
- package/dist/vue-ui-strip-plot-DAo8FMup.cjs +0 -1
- package/dist/vue-ui-thermometer-CBdAwYdC.cjs +0 -1
- package/dist/vue-ui-timer-CRDQbqJ_.cjs +0 -64
- package/dist/vue-ui-tiremarks-C78mfaBr.cjs +0 -1
- package/dist/vue-ui-treemap-CP__1pdb.cjs +0 -1
- package/dist/vue-ui-vertical-bar-DTB8r4LH.cjs +0 -4
- package/dist/vue-ui-waffle-CrVyCF7k.cjs +0 -1
- package/dist/vue-ui-wheel-DV2zgr4d.cjs +0 -1
- package/dist/vue-ui-wheel-ykD8OULJ.js +0 -319
- package/dist/vue-ui-word-cloud-DBkAo2uX.cjs +0 -1
- package/dist/vue-ui-xy-mEVVQr_U.cjs +0 -3
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-DSGAenF3.cjs"),fe=require("./useResponsive-YQYQrAZ_.cjs"),Ie=require("./Title-DdUtciJN.cjs"),ye=require("./usePrinter-CPqTP09H.cjs"),Fe=require("./Tooltip-BlGVq6xj.cjs"),ze=require("./DataTable-zpYtivMM.cjs"),Oe=require("./Legend-CJkkmRNE.cjs"),Ae=require("./vue-ui-skeleton-DvdPnQbR.cjs"),De=require("./vue-ui-accordion-FM16tlk7.cjs"),me=require("./useNestedProp-BdTohsDJ.cjs"),qe=require("./PackageVersion-Dv25_ZxF.cjs"),Me=require("./PenAndPaper-Cx3_Liuv.cjs"),Re=require("./useUserOptionState-BgepsfED.cjs"),Ue=require("./Shape-GAZUIBfN.cjs"),je=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ge=["id"],We=["xmlns","viewBox"],He=["id"],Ye=["stop-color"],Xe=["stop-color"],Je=["id"],Ke=["x","y","height","width"],Qe=["height","width"],Ze={key:0},et=["rx","x","y","height","width","stroke","stroke-width","filter"],tt=["rx","x","y","height","width","fill","stroke","stroke-width","filter"],lt={key:1},at=["rx","x","y","height","width","fill","filter"],ot=["x","y","height","width","filter"],rt={key:0},ut={key:1},nt={key:2},st={key:3},it=["onMouseover","x","y","height","width"],ct={key:5,class:"vue-data-ui-watermark"},vt=["onClick"],dt={key:0},pt={key:1},ht=["innerHTML"],ft={__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ge,{expose:be,emit:ke}){const{vue_ui_waffle:we}=n.useConfig(),p=ge,Ce=e.useSlots(),V=e.computed(()=>!!p.dataset&&p.dataset.length),f=e.ref(n.createUid()),xe=e.ref(null),O=e.ref(!1),A=e.ref(""),B=e.ref(null),j=e.ref(0),_=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:()=>ee(),set:l=>l}),{userOptionsVisible:D,setUserOptionsVisibility:Q,keepUserOptionState:Z}=Re.useUserOptionState({config:t.value});function ee(){const l=me.useNestedProp({userConfig:p.config,defaultConfig:we});return l.theme?{...me.useNestedProp({userConfig:n.themes.vue_ui_waffle[l.theme]||p.config,defaultConfig:l}),customPalette:n.themePalettes[l.theme]||n.palette}:l}e.watch(()=>p.config,l=>{t.value=ee(),D.value=!t.value.userOptions.showOnChartHover,te(),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 te(){if(n.objectIsEmpty(p.dataset)?n.error({componentName:"VueUiWaffle",type:"dataset"}):p.dataset.forEach((l,o)=>{n.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{n.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=fe.throttle(()=>{const{width:o,height:a}=fe.useResponsive({chart:_.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(_.value.parentNode)}}e.onMounted(()=>{te()}),e.onBeforeUnmount(()=>{P.value&&P.value.disconnect()});const{isPrinting:le,isImaging:ae,generatePdf:oe,generateImage:re}=ye.usePrinter({elementId:`vue-ui-waffle_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-waffle"}),Be=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ue=e.computed(()=>n.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 ne(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),u=r.map(Math.floor),i=r.map(h=>h%1);let d=o-u.reduce((h,U)=>h+U,0);for(;d>0;){let h=i.indexOf(Math.max(...i));u[h]+=1,i[h]=0,d-=1}return u}function se(){return p.dataset.map((l,o)=>({...l,color:n.convertColorToHex(l.color)||ue.value[o]||n.palette[o]||n.palette[o%n.palette.length],uid:`serie_${o}`,absoluteIndex:o}))}const q=e.computed(()=>se()),c=e.ref(q.value);e.watch(()=>p.dataset,l=>{c.value=se()},{deep:!0});const _e=e.computed(()=>{const l=c.value.filter((o,a)=>!v.value.includes(o.uid)).map((o,a)=>(o.values||[]).reduce((r,u)=>r+u,0));return ne(l)}),Se=e.computed(()=>{const l=c.value.map((o,a)=>(o.values||[]).reduce((r,u)=>r+u));return ne(l)}),L=e.computed(()=>(p.dataset.forEach((l,o)=>{[null,void 0].includes(l.values)&&n.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:_e.value[o]})))),$e=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:Se.value[o]})));function Ne(){return $e.value.map(l=>({name:l.name,color:l.color,value:l.value,proportion:l.proportion}))}const Te=e.computed(()=>{let l=0;return L.value.map((o,a)=>{const r=l,u=r+o.proportion,i=[];for(let d=Math.floor(r);d<Math.floor(u);d+=1)i.push(d);return l=u,{...o,start:r,rects:i}})}),s=e.computed(()=>Te.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}))),S=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),ie=e.ref(null),ce=e.ref(null);function ve(l){if(!t.value.useAnimation){v.value.includes(l)?v.value=v.value.filter(u=>u!==l):v.value.length<$.value.length-1&&$.value.length>1&&v.value.push(l);return}const o=q.value.find(u=>u.uid===l).values.reduce((u,i)=>u+i,0),a=c.value.find(u=>u.uid===l).values.reduce((u,i)=>u+i,0);let r=a;if(v.value.includes(l)){let i=function(){r>u?(cancelAnimationFrame(ie.value),c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[u]}:d),x.value=!1):(x.value=!0,r+=u*.025,c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[r]}:d),ie.value=requestAnimationFrame(i))};v.value=v.value.filter(d=>d!==l);const u=o;i()}else if(v.value.length<$.value.length-1&&$.value.length>1){let u=function(){r<a/100?(cancelAnimationFrame(ce.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),ce.value=requestAnimationFrame(u))};u()}Pe("selectLegend",L.value.map(u=>({name:u.name,color:u.color,value:u.value,proportion:u.proportion/Math.pow(t.value.style.chart.layout.grid.size,2)})))}const $=e.computed(()=>c.value.map((l,o)=>({name:l.name,color:l.color||ue[o]||n.palette[o]||n.palette[o%n.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:()=>ve(l.uid),isSegregated:v.value.includes(l.uid)}))),Le=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 Ve(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(n.isFunction(a)&&n.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}" />${Ce.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>${n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,n.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 u=n.dataLabel({v:o.value/k.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage});t.value.style.chart.tooltip.showValue?r+=`<span>(${u})</span></div>`:r+=`<b>${u}%</b></div>`}A.value=r}}const Pe=ke,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 de(){e.nextTick(()=>{const l=w.value.head.map((r,u)=>[[r.name],[w.value.body[u]],[isNaN(w.value.body[u]/k.value)?"-":w.value.body[u]/k.value*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),a=n.createCsvContent(o);n.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>',n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,k.value,n.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((u,i)=>[{color:u.color,name:u.name},n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,w.value.body[i],n.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)?"-":n.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}}),N=e.ref(!1);function Ee(l){N.value=l,j.value+=1}function pe(){y.value.showTable=!y.value.showTable}function he(){y.value.showTooltip=!y.value.showTooltip}const z=e.ref(!1);function R(){z.value=!z.value}return be({getData:Ne,generatePdf:oe,generateCsv:de,generateImage:re,toggleTable:pe,toggleTooltip:he,toggleAnnotator:R}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-waffle ${N.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"waffleChart",ref:_,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(Me.PenAndPaper,{key:0,parent:_.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:z.value,onClose:R},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),Be.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(Ie._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(ye.UserOptions,{ref_key:"details",ref:xe,key:`user_options_${j.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(le),isImaging:e.unref(ae),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:N.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:z.value,onToggleFullscreen:Ee,onGeneratePdf:e.unref(oe),onGenerateCsv:de,onGenerateImage:e.unref(re),onToggleTable:pe,onToggleTooltip:he,onToggleAnnotator:R,style:e.normalizeStyle({visibility:e.unref(Z)?e.unref(D)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"5"}: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:"6"}: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,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":N.value,"vue-data-ui-fulscreen--off":!N.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(qe._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(n.setOpacity)(e.unref(n.shiftHue)(a.color,.05),100-t.value.style.chart.layout.rect.gradientIntensity)},null,8,Ye),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Xe)],8,He))),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,Je)]),t.value.useCustomCells&&s.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(S.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,Ke))),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,Qe)):s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[l.$slots.pattern?(e.openBlock(),e.createElementBlock("g",Ze,[(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(S.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,et))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.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,tt))),256)),l.$slots.pattern?(e.openBlock(),e.createElementBlock("g",lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.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,at))),256))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.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(n.adaptColorToBackground)(s.value[r].color)};gap:2px`)},[t.value.style.chart.layout.labels.captions.showSerieName?(e.openBlock(),e.createElementBlock("span",rt,e.toDisplayString(t.value.style.chart.layout.labels.captions.serieNameAbbreviation?e.unref(n.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",ut,e.toDisplayString(e.unref(n.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",nt," ("+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[r].value,e.unref(n.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",st,e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[r].value,e.unref(n.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,ot)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{onMouseover:u=>Ve(r),onMouseleave:o[0]||(o[0]=u=>{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,it))),256)),e.renderSlot(l.$slots,"svg",{svg:C.value},void 0,!0)],14,We)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ct,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(le)||e.unref(ae)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ae.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(Oe.Legend,{key:`legend_${K.value}`,legendSet:$.value,config:Le.value,onClickMarker:o[1]||(o[1]=({legend:a})=>ve(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(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(n.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",pt," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",dt," ("+e.toDisplayString(isNaN(a.value/k.value)?"-":e.unref(n.dataLabel)({v:a.value/k.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage,isAnimating:x.value}))+") ",1))],12,vt)]),_:2},[l.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:a,index:r})=>[e.createVNode(Ue._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:$.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(Fe._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:_.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:N.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(De.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(ze.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,ht)]),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,Ge))}},yt=je._export_sfc(ft,[["__scopeId","data-v-34f2265b"]]);exports.default=yt;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DSGAenF3.cjs"),W=require("./Title-DdUtciJN.cjs"),E=require("./usePrinter-CPqTP09H.cjs"),M=require("./useResponsive-YQYQrAZ_.cjs"),J=require("./vue-ui-skeleton-DvdPnQbR.cjs"),q=require("./useNestedProp-BdTohsDJ.cjs"),K=require("./PackageVersion-Dv25_ZxF.cjs"),Q=require("./PenAndPaper-Cx3_Liuv.cjs"),Z=require("./useUserOptionState-BgepsfED.cjs"),ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),te=["id"],ne=["xmlns","viewBox"],oe=["width","height"],le=["x1","x2","y1","y2","stroke","stroke-width","stroke-linecap"],ae=["cx","cy","r","stroke","stroke-width"],re=["x","y","font-size","fill","font-weight"],se={key:5,class:"vue-data-ui-watermark"},ue={__name:"vue-ui-wheel",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(T,{expose:V}){const{vue_ui_wheel:U}=s.useConfig(),c=T,p=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length),y=e.ref(s.createUid()),R=e.ref(null),w=e.ref(0),v=e.ref(null),C=e.ref(null),b=e.ref(null),B=e.ref(null),P=e.ref(0),t=e.computed({get:()=>O(),set:n=>n}),{userOptionsVisible:m,setUserOptionsVisibility:S,keepUserOptionState:N}=Z.useUserOptionState({config:t.value});function O(){const n=q.useNestedProp({userConfig:c.config,defaultConfig:U});return n.theme?{...q.useNestedProp({userConfig:s.themes.vue_ui_wheel[n.theme]||c.config,defaultConfig:n})}:n}e.watch(()=>c.config,n=>{t.value=O(),m.value=!t.value.userOptions.showOnChartHover,z(),P.value+=1},{deep:!0});const{isPrinting:_,isImaging:x,generatePdf:A,generateImage:$}=E.usePrinter({elementId:y.value,fileName:t.value.style.chart.title.text||"vue-ui-wheel"}),L=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),l=e.ref({size:360,height:360,width:360}),g=e.ref(t.value.style.chart.layout.percentage.fontSize),i=e.computed(()=>({radius:Math.min(l.value.width,l.value.height)*.9/2,centerX:l.value.width/2,centerY:l.value.height/2}));function I(n,r=1){return{x:i.value.centerX+i.value.radius*Math.cos(29.85+n*Math.PI/180)*r,y:i.value.centerY+i.value.radius*Math.sin(29.85+n*Math.PI/180)*r}}const a=e.ref(t.value.style.chart.animation.use?0:c.dataset.percentage||0);e.watch(()=>c.dataset,n=>{t.value.style.chart.animation.use?F(n.percentage):a.value=n.percentage||0},{deep:!0});const d=e.ref(null);e.onMounted(()=>{z()});function z(){if(s.objectIsEmpty(c.dataset)&&s.error({componentName:"VueUiWheel",type:"dataset"}),F(c.dataset.percentage||0),t.value.responsive){const n=M.throttle(()=>{const{width:r,height:o}=M.useResponsive({chart:v.value,title:t.value.style.chart.title.text?C.value:null,source:b.value,noTitle:B.value});requestAnimationFrame(()=>{l.value.width=r,l.value.height=o,g.value=t.value.style.chart.layout.percentage.fontSize/360*Math.min(r,o)})});d.value=new ResizeObserver(n),d.value.observe(v.value.parentNode)}}e.onBeforeUnmount(()=>{d.value&&d.value.disconnect()});function F(n){let r=t.value.style.chart.animation.speed;const o=Math.abs(n-a.value)/(r*120);function u(){a.value<n?a.value=Math.min(a.value+o,n):a.value>n&&(a.value=Math.max(a.value-o,n)),a.value!==n&&requestAnimationFrame(u)}u()}const j=e.computed(()=>{const n=[];for(let o=0;o<100;o+=1){const u=a.value>o?t.value.style.chart.layout.wheel.ticks.activeColor:t.value.style.chart.layout.wheel.ticks.inactiveColor,{x:H,y:X}=I(l.value.size/100*o),{x:D,y:Y}=I(l.value.size/100*o,t.value.style.chart.layout.wheel.ticks.sizeRatio);n.push({x1:H,y1:X,x2:D,y2:Y,color:t.value.style.chart.layout.wheel.ticks.gradient.show?s.shiftHue(u,o/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):u})}return n}),h=e.ref(!1);function G(n){h.value=n,w.value+=1}const f=e.ref(!1);function k(){f.value=!f.value}return V({generatePdf:A,generateImage:$,toggleAnnotator:k}),(n,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-wheel",ref_key:"wheelChart",ref:v,id:y.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:r[0]||(r[0]=()=>e.unref(S)(!0)),onMouseleave:r[1]||(r[1]=()=>e.unref(S)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Q.PenAndPaper,{key:0,parent:v.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:f.value,onClose:k},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),L.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:B,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:C,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(W._sfc_main,{key:`title_${P.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&&p.value&&(e.unref(N)||e.unref(m))?(e.openBlock(),e.createBlock(E.UserOptions,{ref_key:"details",ref:R,key:`user_options_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(_),isImaging:e.unref(x),uid:y.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:f.value,chartElement:v.value,onToggleFullscreen:G,onGeneratePdf:e.unref(A),onGenerateImage:e.unref($),onToggleAnnotator:k,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(m)?"visible":"hidden":"visible"})},e.createSlots({_:2},[n.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,n.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,n.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(n.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"2"}:void 0,n.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(n.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","position","titles","hasAnnotator","isAnnotation","chartElement","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),viewBox:`0 0 ${l.value.width<=0?10:l.value.width} ${l.value.height<=0?10:l.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(K._sfc_main),n.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width<=0?10:l.value.width,height:l.value.height<=0?10:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(n.$slots,"chart-background",{},void 0,!0)],8,oe)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.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":5/360*Math.min(l.value.width,l.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<=a.value})},null,10,le))),256)),t.value.style.chart.layout.innerCircle.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:i.value.centerX,cy:i.value.centerY,r:i.value.radius*.8<=0?1e-4:i.value.radius*.8,stroke:t.value.style.chart.layout.innerCircle.stroke,"stroke-width":t.value.style.chart.layout.innerCircle.strokeWidth,fill:"none"},null,8,ae)):e.createCommentVNode("",!0),t.value.style.chart.layout.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:i.value.centerX,y:i.value.centerY+g.value/3,"font-size":g.value,fill:t.value.style.chart.layout.wheel.ticks.gradient.show?e.unref(s.shiftHue)(t.value.style.chart.layout.wheel.ticks.activeColor,a.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(s.applyDataLabel)(t.value.style.chart.layout.percentage.formatter,e.unref(s.checkNaN)(a.value),e.unref(s.dataLabel)({v:e.unref(s.checkNaN)(a.value),s:"%",r:t.value.style.chart.layout.percentage.rounding}))),9,re)):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"svg",{svg:l.value},void 0,!0)],14,ne)):e.createCommentVNode("",!0),n.$slots.watermark?(e.openBlock(),e.createElementBlock("div",se,[e.renderSlot(n.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(_)||e.unref(x)})),void 0,!0)])):e.createCommentVNode("",!0),n.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:b,dir:"auto"},[e.renderSlot(n.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(J.default,{key:7,config:{type:"wheel",style:{backgroundColor:t.value.style.chart.backgroundColor,wheel:{color:"#CCCCCC"}}}},null,8,["config"]))],44,te))}},ie=ee._export_sfc(ue,[["__scopeId","data-v-a4a1eb50"]]);exports.default=ie;
|
|
@@ -1,319 +0,0 @@
|
|
|
1
|
-
import { computed as p, ref as r, watch as H, onMounted as re, onBeforeUnmount as ue, createElementBlock as c, openBlock as n, unref as o, normalizeStyle as x, createBlock as w, createCommentVNode as v, createSlots as ie, withCtx as b, renderSlot as f, normalizeProps as I, guardReactiveProps as P, normalizeClass as Y, createVNode as ce, Fragment as ve, renderList as he, toDisplayString as de } from "vue";
|
|
2
|
-
import { u as fe, c as ye, a as pe, o as ge, e as me, w as W, X as ke, i as we, v as q, f as be } from "./index-DLCyjPV0.js";
|
|
3
|
-
import { _ as Ce } from "./Title-CXBc1TH6.js";
|
|
4
|
-
import { u as _e, U as Oe } from "./usePrinter-CpHZjw3G.js";
|
|
5
|
-
import { t as $e, u as Ae } from "./useResponsive-BWapHhVH.js";
|
|
6
|
-
import xe from "./vue-ui-skeleton-D6ojufhb.js";
|
|
7
|
-
import { u as V } from "./useNestedProp-q86V3_LA.js";
|
|
8
|
-
import { _ as Ie } from "./PackageVersion-PZr4BkQ5.js";
|
|
9
|
-
import { P as Pe } from "./PenAndPaper-Cniu2YEX.js";
|
|
10
|
-
import { u as Fe } from "./useUserOptionState-BIvW1Kz7.js";
|
|
11
|
-
import { _ as Se } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
|
-
const ze = ["id"], Me = ["xmlns", "viewBox"], Ne = ["width", "height"], Te = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-linecap"], Ue = ["cx", "cy", "r", "stroke", "stroke-width"], Le = ["x", "y", "font-size", "fill", "font-weight"], Xe = {
|
|
13
|
-
key: 5,
|
|
14
|
-
class: "vue-data-ui-watermark"
|
|
15
|
-
}, Be = {
|
|
16
|
-
__name: "vue-ui-wheel",
|
|
17
|
-
props: {
|
|
18
|
-
config: {
|
|
19
|
-
type: Object,
|
|
20
|
-
default() {
|
|
21
|
-
return {};
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
dataset: {
|
|
25
|
-
type: Object,
|
|
26
|
-
default() {
|
|
27
|
-
return {};
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
setup(J, { expose: K }) {
|
|
32
|
-
const { vue_ui_wheel: Q } = fe(), d = J, C = p(() => !!d.dataset && Object.keys(d.dataset).length), _ = r(ye()), Z = r(null), F = r(0), y = r(null), S = r(null), z = r(null), M = r(null), N = r(0), e = p({
|
|
33
|
-
get: () => L(),
|
|
34
|
-
set: (t) => t
|
|
35
|
-
}), { userOptionsVisible: O, setUserOptionsVisibility: T, keepUserOptionState: U } = Fe({ config: e.value });
|
|
36
|
-
function L() {
|
|
37
|
-
const t = V({
|
|
38
|
-
userConfig: d.config,
|
|
39
|
-
defaultConfig: Q
|
|
40
|
-
});
|
|
41
|
-
return t.theme ? {
|
|
42
|
-
...V({
|
|
43
|
-
userConfig: pe.vue_ui_wheel[t.theme] || d.config,
|
|
44
|
-
defaultConfig: t
|
|
45
|
-
})
|
|
46
|
-
} : t;
|
|
47
|
-
}
|
|
48
|
-
H(() => d.config, (t) => {
|
|
49
|
-
e.value = L(), O.value = !e.value.userOptions.showOnChartHover, R(), N.value += 1;
|
|
50
|
-
}, { deep: !0 });
|
|
51
|
-
const { isPrinting: X, isImaging: B, generatePdf: E, generateImage: G } = _e({
|
|
52
|
-
elementId: _.value,
|
|
53
|
-
fileName: e.value.style.chart.title.text || "vue-ui-wheel"
|
|
54
|
-
}), ee = p(() => e.value.userOptions.show && !e.value.style.chart.title.text), l = r({
|
|
55
|
-
size: 360,
|
|
56
|
-
height: 360,
|
|
57
|
-
width: 360
|
|
58
|
-
}), $ = r(e.value.style.chart.layout.percentage.fontSize), h = p(() => ({
|
|
59
|
-
radius: Math.min(l.value.width, l.value.height) * 0.9 / 2,
|
|
60
|
-
centerX: l.value.width / 2,
|
|
61
|
-
centerY: l.value.height / 2
|
|
62
|
-
}));
|
|
63
|
-
function j(t, u = 1) {
|
|
64
|
-
return {
|
|
65
|
-
x: h.value.centerX + h.value.radius * Math.cos(29.85 + t * Math.PI / 180) * u,
|
|
66
|
-
y: h.value.centerY + h.value.radius * Math.sin(29.85 + t * Math.PI / 180) * u
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
const s = r(e.value.style.chart.animation.use ? 0 : d.dataset.percentage || 0);
|
|
70
|
-
H(() => d.dataset, (t) => {
|
|
71
|
-
e.value.style.chart.animation.use ? D(t.percentage) : s.value = t.percentage || 0;
|
|
72
|
-
}, { deep: !0 });
|
|
73
|
-
const g = r(null);
|
|
74
|
-
re(() => {
|
|
75
|
-
R();
|
|
76
|
-
});
|
|
77
|
-
function R() {
|
|
78
|
-
if (ge(d.dataset) && me({
|
|
79
|
-
componentName: "VueUiWheel",
|
|
80
|
-
type: "dataset"
|
|
81
|
-
}), D(d.dataset.percentage || 0), e.value.responsive) {
|
|
82
|
-
const t = $e(() => {
|
|
83
|
-
const { width: u, height: a } = Ae({
|
|
84
|
-
chart: y.value,
|
|
85
|
-
title: e.value.style.chart.title.text ? S.value : null,
|
|
86
|
-
source: z.value,
|
|
87
|
-
noTitle: M.value
|
|
88
|
-
});
|
|
89
|
-
requestAnimationFrame(() => {
|
|
90
|
-
l.value.width = u, l.value.height = a, $.value = e.value.style.chart.layout.percentage.fontSize / 360 * Math.min(u, a);
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
g.value = new ResizeObserver(t), g.value.observe(y.value.parentNode);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
ue(() => {
|
|
97
|
-
g.value && g.value.disconnect();
|
|
98
|
-
});
|
|
99
|
-
function D(t) {
|
|
100
|
-
let u = e.value.style.chart.animation.speed;
|
|
101
|
-
const a = Math.abs(t - s.value) / (u * 120);
|
|
102
|
-
function i() {
|
|
103
|
-
s.value < t ? s.value = Math.min(s.value + a, t) : s.value > t && (s.value = Math.max(s.value - a, t)), s.value !== t && requestAnimationFrame(i);
|
|
104
|
-
}
|
|
105
|
-
i();
|
|
106
|
-
}
|
|
107
|
-
const te = p(() => {
|
|
108
|
-
const t = [];
|
|
109
|
-
for (let a = 0; a < 100; a += 1) {
|
|
110
|
-
const i = s.value > a ? e.value.style.chart.layout.wheel.ticks.activeColor : e.value.style.chart.layout.wheel.ticks.inactiveColor, { x: le, y: oe } = j(l.value.size / 100 * a), { x: ne, y: se } = j(l.value.size / 100 * a, e.value.style.chart.layout.wheel.ticks.sizeRatio);
|
|
111
|
-
t.push({
|
|
112
|
-
x1: le,
|
|
113
|
-
y1: oe,
|
|
114
|
-
x2: ne,
|
|
115
|
-
y2: se,
|
|
116
|
-
color: e.value.style.chart.layout.wheel.ticks.gradient.show ? W(i, a / 100 * (e.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity / 100)) : i
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
return t;
|
|
120
|
-
}), m = r(!1);
|
|
121
|
-
function ae(t) {
|
|
122
|
-
m.value = t, F.value += 1;
|
|
123
|
-
}
|
|
124
|
-
const k = r(!1);
|
|
125
|
-
function A() {
|
|
126
|
-
k.value = !k.value;
|
|
127
|
-
}
|
|
128
|
-
return K({
|
|
129
|
-
generatePdf: E,
|
|
130
|
-
generateImage: G,
|
|
131
|
-
toggleAnnotator: A
|
|
132
|
-
}), (t, u) => (n(), c("div", {
|
|
133
|
-
class: "vue-ui-wheel",
|
|
134
|
-
ref_key: "wheelChart",
|
|
135
|
-
ref: y,
|
|
136
|
-
id: _.value,
|
|
137
|
-
style: x(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height:100%" : ""}`),
|
|
138
|
-
onMouseenter: u[0] || (u[0] = () => o(T)(!0)),
|
|
139
|
-
onMouseleave: u[1] || (u[1] = () => o(T)(!1))
|
|
140
|
-
}, [
|
|
141
|
-
e.value.userOptions.buttons.annotator ? (n(), w(Pe, {
|
|
142
|
-
key: 0,
|
|
143
|
-
parent: y.value,
|
|
144
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
145
|
-
color: e.value.style.chart.color,
|
|
146
|
-
active: k.value,
|
|
147
|
-
onClose: A
|
|
148
|
-
}, null, 8, ["parent", "backgroundColor", "color", "active"])) : v("", !0),
|
|
149
|
-
ee.value ? (n(), c("div", {
|
|
150
|
-
key: 1,
|
|
151
|
-
ref_key: "noTitle",
|
|
152
|
-
ref: M,
|
|
153
|
-
class: "vue-data-ui-no-title-space",
|
|
154
|
-
style: "height:36px; width: 100%;background:transparent"
|
|
155
|
-
}, null, 512)) : v("", !0),
|
|
156
|
-
e.value.style.chart.title.text ? (n(), c("div", {
|
|
157
|
-
key: 2,
|
|
158
|
-
ref_key: "chartTitle",
|
|
159
|
-
ref: S,
|
|
160
|
-
style: "width:100%;background:transparent;padding-bottom:12px"
|
|
161
|
-
}, [
|
|
162
|
-
(n(), w(Ce, {
|
|
163
|
-
key: `title_${N.value}`,
|
|
164
|
-
config: {
|
|
165
|
-
title: {
|
|
166
|
-
cy: "wheel-title",
|
|
167
|
-
...e.value.style.chart.title
|
|
168
|
-
},
|
|
169
|
-
subtitle: {
|
|
170
|
-
cy: "wheel-subtitle",
|
|
171
|
-
...e.value.style.chart.title.subtitle
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}, null, 8, ["config"]))
|
|
175
|
-
], 512)) : v("", !0),
|
|
176
|
-
e.value.userOptions.show && C.value && (o(U) || o(O)) ? (n(), w(Oe, {
|
|
177
|
-
ref_key: "details",
|
|
178
|
-
ref: Z,
|
|
179
|
-
key: `user_options_${F.value}`,
|
|
180
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
181
|
-
color: e.value.style.chart.color,
|
|
182
|
-
isPrinting: o(X),
|
|
183
|
-
isImaging: o(B),
|
|
184
|
-
uid: _.value,
|
|
185
|
-
hasPdf: e.value.userOptions.buttons.pdf,
|
|
186
|
-
hasImg: e.value.userOptions.buttons.img,
|
|
187
|
-
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
188
|
-
hasXls: !1,
|
|
189
|
-
isFullscreen: m.value,
|
|
190
|
-
position: e.value.userOptions.position,
|
|
191
|
-
titles: { ...e.value.userOptions.buttonTitles },
|
|
192
|
-
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
193
|
-
isAnnotation: k.value,
|
|
194
|
-
chartElement: y.value,
|
|
195
|
-
onToggleFullscreen: ae,
|
|
196
|
-
onGeneratePdf: o(E),
|
|
197
|
-
onGenerateImage: o(G),
|
|
198
|
-
onToggleAnnotator: A,
|
|
199
|
-
style: x({
|
|
200
|
-
visibility: o(U) ? o(O) ? "visible" : "hidden" : "visible"
|
|
201
|
-
})
|
|
202
|
-
}, ie({ _: 2 }, [
|
|
203
|
-
t.$slots.optionPdf ? {
|
|
204
|
-
name: "optionPdf",
|
|
205
|
-
fn: b(() => [
|
|
206
|
-
f(t.$slots, "optionPdf", {}, void 0, !0)
|
|
207
|
-
]),
|
|
208
|
-
key: "0"
|
|
209
|
-
} : void 0,
|
|
210
|
-
t.$slots.optionImg ? {
|
|
211
|
-
name: "optionImg",
|
|
212
|
-
fn: b(() => [
|
|
213
|
-
f(t.$slots, "optionImg", {}, void 0, !0)
|
|
214
|
-
]),
|
|
215
|
-
key: "1"
|
|
216
|
-
} : void 0,
|
|
217
|
-
t.$slots.optionFullscreen ? {
|
|
218
|
-
name: "optionFullscreen",
|
|
219
|
-
fn: b(({ toggleFullscreen: a, isFullscreen: i }) => [
|
|
220
|
-
f(t.$slots, "optionFullscreen", I(P({ toggleFullscreen: a, isFullscreen: i })), void 0, !0)
|
|
221
|
-
]),
|
|
222
|
-
key: "2"
|
|
223
|
-
} : void 0,
|
|
224
|
-
t.$slots.optionAnnotator ? {
|
|
225
|
-
name: "optionAnnotator",
|
|
226
|
-
fn: b(({ toggleAnnotator: a, isAnnotator: i }) => [
|
|
227
|
-
f(t.$slots, "optionAnnotator", I(P({ toggleAnnotator: a, isAnnotator: i })), void 0, !0)
|
|
228
|
-
]),
|
|
229
|
-
key: "3"
|
|
230
|
-
} : void 0
|
|
231
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "position", "titles", "hasAnnotator", "isAnnotation", "chartElement", "onGeneratePdf", "onGenerateImage", "style"])) : v("", !0),
|
|
232
|
-
C.value ? (n(), c("svg", {
|
|
233
|
-
key: 4,
|
|
234
|
-
xmlns: o(ke),
|
|
235
|
-
class: Y({ "vue-data-ui-fullscreen--on": m.value, "vue-data-ui-fulscreen--off": !m.value }),
|
|
236
|
-
viewBox: `0 0 ${l.value.width <= 0 ? 10 : l.value.width} ${l.value.height <= 0 ? 10 : l.value.height}`,
|
|
237
|
-
style: x(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
|
|
238
|
-
}, [
|
|
239
|
-
ce(Ie),
|
|
240
|
-
t.$slots["chart-background"] ? (n(), c("foreignObject", {
|
|
241
|
-
key: 0,
|
|
242
|
-
x: 0,
|
|
243
|
-
y: 0,
|
|
244
|
-
width: l.value.width <= 0 ? 10 : l.value.width,
|
|
245
|
-
height: l.value.height <= 0 ? 10 : l.value.height,
|
|
246
|
-
style: {
|
|
247
|
-
pointerEvents: "none"
|
|
248
|
-
}
|
|
249
|
-
}, [
|
|
250
|
-
f(t.$slots, "chart-background", {}, void 0, !0)
|
|
251
|
-
], 8, Ne)) : v("", !0),
|
|
252
|
-
(n(!0), c(ve, null, he(te.value, (a, i) => (n(), c("line", {
|
|
253
|
-
x1: a.x1,
|
|
254
|
-
x2: a.x2,
|
|
255
|
-
y1: a.y1,
|
|
256
|
-
y2: a.y2,
|
|
257
|
-
stroke: a.color,
|
|
258
|
-
"stroke-width": 5 / 360 * Math.min(l.value.width, l.value.height),
|
|
259
|
-
"stroke-linecap": e.value.style.chart.layout.wheel.ticks.rounded ? "round" : "butt",
|
|
260
|
-
class: Y({ "vue-ui-tick-animated": e.value.style.chart.animation.use && i <= s.value })
|
|
261
|
-
}, null, 10, Te))), 256)),
|
|
262
|
-
e.value.style.chart.layout.innerCircle.show ? (n(), c("circle", {
|
|
263
|
-
key: 1,
|
|
264
|
-
cx: h.value.centerX,
|
|
265
|
-
cy: h.value.centerY,
|
|
266
|
-
r: h.value.radius * 0.8 <= 0 ? 1e-4 : h.value.radius * 0.8,
|
|
267
|
-
stroke: e.value.style.chart.layout.innerCircle.stroke,
|
|
268
|
-
"stroke-width": e.value.style.chart.layout.innerCircle.strokeWidth,
|
|
269
|
-
fill: "none"
|
|
270
|
-
}, null, 8, Ue)) : v("", !0),
|
|
271
|
-
e.value.style.chart.layout.percentage.show ? (n(), c("text", {
|
|
272
|
-
key: 2,
|
|
273
|
-
x: h.value.centerX,
|
|
274
|
-
y: h.value.centerY + $.value / 3,
|
|
275
|
-
"font-size": $.value,
|
|
276
|
-
fill: e.value.style.chart.layout.wheel.ticks.gradient.show ? o(W)(e.value.style.chart.layout.wheel.ticks.activeColor, s.value / 100 * (e.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.layout.wheel.ticks.activeColor,
|
|
277
|
-
"text-anchor": "middle",
|
|
278
|
-
"font-weight": e.value.style.chart.layout.percentage.bold ? "bold" : "normal",
|
|
279
|
-
style: { "font-variant-numeric": "tabluar-nums" }
|
|
280
|
-
}, de(o(we)(
|
|
281
|
-
e.value.style.chart.layout.percentage.formatter,
|
|
282
|
-
o(q)(s.value),
|
|
283
|
-
o(be)({
|
|
284
|
-
v: o(q)(s.value),
|
|
285
|
-
s: "%",
|
|
286
|
-
r: e.value.style.chart.layout.percentage.rounding
|
|
287
|
-
})
|
|
288
|
-
)), 9, Le)) : v("", !0),
|
|
289
|
-
f(t.$slots, "svg", { svg: l.value }, void 0, !0)
|
|
290
|
-
], 14, Me)) : v("", !0),
|
|
291
|
-
t.$slots.watermark ? (n(), c("div", Xe, [
|
|
292
|
-
f(t.$slots, "watermark", I(P({ isPrinting: o(X) || o(B) })), void 0, !0)
|
|
293
|
-
])) : v("", !0),
|
|
294
|
-
t.$slots.source ? (n(), c("div", {
|
|
295
|
-
key: 6,
|
|
296
|
-
ref_key: "source",
|
|
297
|
-
ref: z,
|
|
298
|
-
dir: "auto"
|
|
299
|
-
}, [
|
|
300
|
-
f(t.$slots, "source", {}, void 0, !0)
|
|
301
|
-
], 512)) : v("", !0),
|
|
302
|
-
C.value ? v("", !0) : (n(), w(xe, {
|
|
303
|
-
key: 7,
|
|
304
|
-
config: {
|
|
305
|
-
type: "wheel",
|
|
306
|
-
style: {
|
|
307
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
308
|
-
wheel: {
|
|
309
|
-
color: "#CCCCCC"
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
}, null, 8, ["config"]))
|
|
314
|
-
], 44, ze));
|
|
315
|
-
}
|
|
316
|
-
}, Ke = /* @__PURE__ */ Se(Be, [["__scopeId", "data-v-a4a1eb50"]]);
|
|
317
|
-
export {
|
|
318
|
-
Ke as default
|
|
319
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DSGAenF3.cjs"),Se=require("./Title-DdUtciJN.cjs"),ue=require("./usePrinter-CPqTP09H.cjs"),H=require("./useResponsive-YQYQrAZ_.cjs"),$e=require("./vue-ui-accordion-FM16tlk7.cjs"),Te=require("./DataTable-zpYtivMM.cjs"),Ne=require("./BaseIcon-B5DvqSYe.cjs"),ce=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ie=require("./useNestedProp-BdTohsDJ.cjs"),Pe=require("./PackageVersion-Dv25_ZxF.cjs"),Be=require("./Tooltip-BlGVq6xj.cjs"),Fe=require("./PenAndPaper-Cx3_Liuv.cjs"),ze=require("./useUserOptionState-BgepsfED.cjs"),Oe={"data-html2canvas-ignore":""},Ae={key:0,class:"reset-wrapper"},Ve={key:1,class:"reset-wrapper"},Ee={class:"mono-slicer"},Me=["min","max","value"],_e={__name:"MonoSlicer",props:{min:{type:Number,default:0},max:{type:Number,default:0},inputColor:{type:String,default:"#1A1A1A"},background:{type:String,default:"#FFFFFF"},borderColor:{type:String,default:"#FFFFFF"},selectColor:{type:String,default:"#4A4A4A"},textColor:{type:String,default:"#1A1A1A"},useResetSlot:{type:Boolean,default:!1},value:{type:Number,default:0},source:{type:Number,default:0}},emits:["update:value","reset"],setup(d,{emit:M}){e.useCssVars(b=>({"782b8172":c.value,"102109e6":$.value,"642212d7":y.value,"1f5369d4":d.selectColor,"22b98ab8":k.value}));const v=d,c=e.computed(()=>v.inputColor),k=e.computed(()=>v.background),y=e.computed(()=>`${v.selectColor}33`),$=e.computed(()=>v.borderColor),T=M;function p(){T("reset")}const B=e.computed(()=>{const b=v.max-v.min,m=0,C=(v.value-v.min)/b*100;return{left:`${m}%`,width:`${C-m}%`,background:v.selectColor}});return(b,m)=>(e.openBlock(),e.createElementBlock("div",Oe,[d.value!==d.source?(e.openBlock(),e.createElementBlock("div",Ae,[d.useResetSlot?e.renderSlot(b.$slots,"reset-action",{key:1,reset:p},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",onClick:p},[e.createVNode(Ne.default,{name:"refresh",stroke:d.textColor},null,8,["stroke"])]))])):(e.openBlock(),e.createElementBlock("div",Ve)),e.createElementVNode("div",Ee,[m[1]||(m[1]=e.createElementVNode("div",{class:"slider-track"},null,-1)),e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(B.value)},null,4),e.createElementVNode("input",{type:"range",min:d.min,max:d.max,value:Number(d.value),onInput:m[0]||(m[0]=C=>T("update:value",Number(C.target.value)))},null,40,Me)])]))}},Ie=ce._export_sfc(_e,[["__scopeId","data-v-b4e6aee9"]]),Re=["id"],qe=["xmlns","viewBox"],Ue=["width","height"],We=["transform"],De=["fill","font-weight","x","y","font-size","transform","onMouseover"],Ge={key:4,class:"vue-data-ui-watermark"},Le=["innerHTML"],je={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(d,{expose:M}){const{vue_ui_word_cloud:v}=s.useConfig(),c=d,k=e.computed({get(){return!!c.dataset&&c.dataset.length},set(o){return o}}),y=e.ref(typeof c.dataset=="string"?s.createWordCloudDatasetFromPlainText(c.dataset):c.dataset.map((o,a)=>({...o,value:s.checkNaN(o.value)}))),$=e.ref(s.createUid()),T=e.ref(0),p=e.ref(null),B=e.ref(null),b=e.ref(null),m=e.ref(0),C=e.ref(0),_=e.ref(!1),t=e.computed({get:()=>J(),set:o=>o}),{userOptionsVisible:I,setUserOptionsVisibility:X,keepUserOptionState:Y}=ze.useUserOptionState({config:t.value});function J(){const o=ie.useNestedProp({userConfig:c.config,defaultConfig:v});return o.theme?{...ie.useNestedProp({userConfig:s.themes.vue_ui_word_cloud[o.theme]||c.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}e.watch(()=>c.config,o=>{t.value=J(),I.value=!t.value.userOptions.showOnChartHover,Q(),m.value+=1,C.value+=1,R(),i.value.showTable=t.value.table.show,i.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const K=e.ref(null),w=e.ref(0),r=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}),de=H.throttle(()=>{const{width:o,height:a}=H.useResponsive({chart:p.value,title:t.value.style.chart.title.text?B.value:null,slicer:t.value.style.chart.zoom.show&&K.value,source:b.value});requestAnimationFrame(()=>{r.value.width=o,r.value.height=a,e.nextTick(U)})});e.watch(()=>w.value,()=>{ve()});const ve=H.debounce(()=>{U()},10);function R(){w.value=q.value}const F=e.ref(null);e.onMounted(()=>{Q(),R()});function Q(){s.objectIsEmpty(c.dataset)?s.error({componentName:"VueUiWordCloud",type:"dataset"}):y.value.forEach((o,a)=>{s.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{k.value=!1,s.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive&&(F.value=new ResizeObserver(de),F.value.observe(p.value.parentNode))}e.onBeforeUnmount(()=>{F.value&&F.value.disconnect()});const{isPrinting:Z,isImaging:ee,generatePdf:te,generateImage:oe}=ue.usePrinter({elementId:`wordCloud_${$.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud"}),i=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show});function he(o,a,l="Arial"){const n=document.createElement("canvas").getContext("2d");return n.font=`${a}px ${t.value.style.chart.words.bold?"bold":"normal"} ${l}`,{width:n.measureText(o).width+t.value.style.chart.words.proximity,height:a}}function me(o,a){return o.x<a.x+a.width&&o.x+o.width>a.x&&o.y<a.y+a.height&&o.y+o.height>a.y}function pe(o,a,l){const u=[],n={x:-a/2,y:-l/2,width:a,height:l},h=0,f=0;return o.forEach(S=>{let L=!1;for(let E=0;E<Math.max(a,l)/2&&!L;E+=t.value.style.chart.words.packingWeight)for(let j=0;j<360&&!L;j+=t.value.style.chart.words.packingWeight){const se=j*Math.PI/180,be=h+E*Math.cos(se)-S.width/2,ke=f+E*Math.sin(se)-S.height/2,g={...S,x:be,y:ke},Ce=g.x>=n.x&&g.y>=n.y&&g.x+g.width<=n.x+n.width&&g.y+g.height<=n.y+n.height,we=u.some(xe=>me(g,xe));Ce&&!we&&(u.push(g),L=!0)}}),u}const N=e.ref([]);e.watch(()=>c.dataset,U,{immediate:!0});const q=e.computed(()=>Math.round(Math.min(...y.value.map(o=>o.value)))),le=e.computed(()=>Math.round(Math.max(...y.value.map(o=>o.value))));function U(){const o=[...y.value].filter(n=>n.value>=w.value).map(n=>n.value),a=Math.max(...o),l=Math.min(...o),u=[...y.value].filter(n=>n.value>=w.value).map((n,h)=>{let f=(n.value-l)/(a-l)*(r.value.maxFontSize-r.value.minFontSize)+r.value.minFontSize;f=isNaN(f)?r.value.minFontSize:f;const S=he(n.name,f);return{...n,id:s.createUid(),fontSize:f,width:S.width,height:S.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[h]||t.value.customPalette[h%t.value.customPalette.length]||s.palette[h]||s.palette[h%s.palette.length]:t.value.style.chart.words.color}});N.value=pe(u,r.value.width,r.value.height).sort((n,h)=>h.fontSize-n.fontSize)}const z=e.computed(()=>{const o=N.value.map(l=>({name:l.name,color:l.color})),a=N.value.map(l=>l.value);return{head:o,body:a}});function ae(){e.nextTick(()=>{const o=z.value.head.map((u,n)=>[[u.name],[z.value.body[n]]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=s.createCsvContent(a);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const O=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=z.value.head.map((n,h)=>{const f=s.dataLabel({p:t.value.table.td.prefix,v:z.value.body[h],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},f]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:a,config:l}}),A=e.ref(!1);function fe(o){A.value=o,T.value+=1}function ge(){return N.value}function ne(){i.value.showTable=!i.value.showTable}function re(){i.value.showTooltip=!i.value.showTooltip}const V=e.ref(!1);function W(){V.value=!V.value}M({getData:ge,generateCsv:ae,generatePdf:te,generateImage:oe,toggleTable:ne,toggleTooltip:re,toggleAnnotator:W});const x=e.ref(null),P=e.ref(!1),D=e.ref(""),G=e.ref(null);function ye(o){if(!i.value.showTooltip)return;x.value=o.id,G.value={datapoint:o,config:t.value};const a=t.value.style.chart.tooltip.customFormat;if(P.value=!1,s.isFunction(a))try{const l=a({datapoint:o,config:t.value});typeof l=="string"&&(D.value=l,P.value=!0)}catch{console.warn("Custom format cannot be applied."),P.value=!1}if(!P.value){let l=`<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>`;D.value=`<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${l}</div>`}_.value=!0}return(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:p,id:`wordCloud_${$.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:a[3]||(a[3]=()=>e.unref(X)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Fe.PenAndPaper,{key:0,parent:p.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:V.value,onClose:W},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:B,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(Se._sfc_main,{key:`title_${m.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&&k.value&&(e.unref(Y)||e.unref(I))?(e.openBlock(),e.createBlock(ue.UserOptions,{ref:"details",key:`user_option_${T.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Z),isImaging:e.unref(ee),uid:$.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:p.value,position:t.value.userOptions.position,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:i.value.showTooltip,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:V.value,onToggleFullscreen:fe,onGeneratePdf:e.unref(te),onGenerateCsv:ae,onGenerateImage:e.unref(oe),onToggleTable:ne,onToggleTooltip:re,onToggleAnnotator:W,style:e.normalizeStyle({visibility:e.unref(Y)?e.unref(I)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:u})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:u})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:u})),void 0,!0)]),key:"5"}: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),k.value?(e.openBlock(),e.createElementBlock("svg",{key:3,class:e.normalizeClass({"vue-data-ui-fullscreen--on":A.value,"vue-data-ui-fulscreen--off":!A.value}),xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${r.value.width<=0?10:r.value.width} ${r.value.height<=0?10:r.value.height}`,style:"overflow:visible;background:transparent;"},[e.createVNode(Pe._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:r.value.width<=0?10:r.value.width,height:r.value.height<=0?10:r.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Ue)):e.createCommentVNode("",!0),e.createElementVNode("g",{transform:`translate(${(r.value.width<=0?10:r.value.width)/2}, ${(r.value.height<=0?10:r.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,u)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(),e.createElementBlock("text",{fill:l.color,"font-weight":t.value.style.chart.words.bold?"bold":"normal",key:u,x:l.x,y:l.y,"font-size":l.fontSize,transform:`translate(${l.width/2}, ${l.height/2})`,class:e.normalizeClass({animated:t.value.useCssAnimation,"word-selected":x.value&&x.value===l.id&&i.value.showTooltip,"word-not-selected":x.value&&x.value!==l.id&&i.value.showTooltip}),"text-anchor":"middle","dominant-baseline":"central",onMouseover:n=>ye(l),onMouseleave:a[0]||(a[0]=n=>{x.value=null,_.value=!1}),style:e.normalizeStyle(`animation-delay:${u*t.value.animationDelayMs}ms !important;`)},e.toDisplayString(l.name),47,De))]))),256))],8,We),e.renderSlot(o.$slots,"svg",{svg:{height:r.value.height,width:r.value.width}},void 0,!0)],10,qe)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Z)||e.unref(ee)})),void 0,!0)])):e.createCommentVNode("",!0),e.createVNode(Be._sfc_main,{show:i.value.showTooltip&&_.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:p.value,content:D.value,isCustom:P.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),e.createElementVNode("div",{ref_key:"chartSlicer",ref:K,style:"width:100%;background:transparent","data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&q.value<le.value?(e.openBlock(),e.createBlock(Ie,{key:0,value:w.value,"onUpdate:value":a[1]||(a[1]=l=>w.value=l),min:q.value,max:le.value,textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,useResetSlot:t.value.style.chart.zoom.useResetSlot,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,source:t.value.style.chart.width,onReset:R},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["value","min","max","textColor","inputColor","selectColor","useResetSlot","background","borderColor","source"])):e.createCommentVNode("",!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:5,ref_key:"source",ref:b,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createBlock($e.default,{key:6,hideDetails:"",config:{open:i.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(Te.DataTable,{key:`table_${C.value}`,colNames:O.value.colNames,head:O.value.head,body:O.value.body,config:O.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>i.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Le)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],44,Re))}},He=ce._export_sfc(je,[["__scopeId","data-v-083c217b"]]);exports.default=He;
|