vue-data-ui 2.10.3 → 2.10.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/{Arrow-ClADeuRV.cjs → Arrow-Badwqciu.cjs} +1 -1
- package/dist/{Arrow-CsFRQWgn.js → Arrow-Bb5xelJS.js} +1 -1
- package/dist/{BaseIcon-BZiTtIp-.cjs → BaseIcon-CvuQ41yl.cjs} +1 -1
- package/dist/{BaseIcon-DuZmhYGx.js → BaseIcon-HDOMbyJq.js} +1 -1
- package/dist/{ColorPicker-CWTWiV6N.js → ColorPicker-BODnRb0v.js} +3 -3
- package/dist/{ColorPicker-ajFBO-uj.cjs → ColorPicker-NOWXYDyd.cjs} +1 -1
- package/dist/{DataTable-D8eve3Rv.cjs → DataTable-Bu_0tRZE.cjs} +1 -1
- package/dist/{DataTable-D8vcDzp3.js → DataTable-CGMCHKzY.js} +2 -2
- package/dist/{Legend-C-9Va34F.cjs → Legend-BDIC5aus.cjs} +1 -1
- package/dist/{Legend-BXkorlVx.js → Legend-CLZW3_-V.js} +2 -2
- package/dist/PackageVersion-CKutD59c.cjs +1 -0
- package/dist/{PackageVersion-Cwa-KDYy.js → PackageVersion-DrU5ubC-.js} +3 -3
- package/dist/{PenAndPaper-bYremuGq.js → PenAndPaper-BF6RVx_0.js} +3 -3
- package/dist/{PenAndPaper-mD8Ft9s0.cjs → PenAndPaper-Bnvy0XRn.cjs} +1 -1
- package/dist/{Shape-BKl_8fSs.js → Shape-D5Dtzm3x.js} +1 -1
- package/dist/{Shape-C-MjxBzW.cjs → Shape-NYJ-EMUq.cjs} +1 -1
- package/dist/{Slicer-D-8HCnPl.js → Slicer-BrajQoJL.js} +2 -2
- package/dist/{Slicer-BbnCHEKM.cjs → Slicer-Cdgf9oDx.cjs} +1 -1
- package/dist/{Title-A3qdvX3g.js → Title-BNsKKvQy.js} +1 -1
- package/dist/{Title-g0Df2kQZ.cjs → Title-Cj4tUZSu.cjs} +1 -1
- package/dist/{Tooltip-CzFLZsDA.cjs → Tooltip-CLjMKc28.cjs} +1 -1
- package/dist/{Tooltip-C3RycjbN.js → Tooltip-Dm2APAls.js} +1 -1
- package/dist/documentation/installation.md +2 -2
- package/dist/{dom-to-png-CDJbBbow.cjs → dom-to-png-BlAkXMo8.cjs} +1 -1
- package/dist/{dom-to-png-BycXzYPI.js → dom-to-png-Z6Fps788.js} +1 -1
- package/dist/{img-Daf6wWtq.cjs → img-0HoPau8z.cjs} +1 -1
- package/dist/{img-BCG9afle.js → img-DhPFunow.js} +1 -1
- package/dist/{index-DO87eA2V.js → index-D2h9qRb4.js} +1 -1
- package/dist/{index-CLiv4lWF.cjs → index-D6F-xMcR.cjs} +1 -1
- package/dist/{pdf-CUKGQwXz.js → pdf-BpYF_lP6.js} +1 -1
- package/dist/{pdf-BO4SP770.cjs → pdf-Dm8bjLUW.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-DWYmdrE5.cjs → useNestedProp-CAbtwUJj.cjs} +1 -1
- package/dist/{useNestedProp-fOy4tvij.js → useNestedProp-DlWfv-mw.js} +1 -1
- package/dist/{usePrinter-sfF-cTSO.cjs → usePrinter-B9NkBzf5.cjs} +1 -1
- package/dist/{usePrinter-BjvSt_Yu.js → usePrinter-BGkHpXM9.js} +3 -3
- package/dist/{vue-data-ui-BGjhB0IM.cjs → vue-data-ui-DPoOpdO-.cjs} +1 -1
- package/dist/{vue-data-ui-BnXm4F7y.js → vue-data-ui-kWX-2oPX.js} +62 -62
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-B_iIJS6A.js → vue-ui-3d-bar-CAJh6lT_.js} +9 -9
- package/dist/{vue-ui-3d-bar-eQPQ37P9.cjs → vue-ui-3d-bar-CwsCsbwY.cjs} +1 -1
- package/dist/{vue-ui-accordion-CMJOxHWq.js → vue-ui-accordion-C-v1kmEc.js} +3 -3
- package/dist/{vue-ui-accordion-DQ-y4bL8.cjs → vue-ui-accordion-ChE9WO8Q.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-BKcb5h0_.cjs → vue-ui-age-pyramid-CAtI3F1S.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-DSelZbfg.js → vue-ui-age-pyramid-DdwMF6_I.js} +10 -10
- package/dist/{vue-ui-annotator-BnfB4-1v.cjs → vue-ui-annotator-DQ0W7Q5C.cjs} +1 -1
- package/dist/{vue-ui-annotator-Ae8rLlRh.js → vue-ui-annotator-bkpTEqep.js} +2 -2
- package/dist/{vue-ui-bullet-CV7t3yQK.js → vue-ui-bullet-BEAyOY56.js} +8 -8
- package/dist/{vue-ui-bullet-D3wD3j73.cjs → vue-ui-bullet-CQtNg-wR.cjs} +1 -1
- package/dist/{vue-ui-candlestick-CP-TFhQo.cjs → vue-ui-candlestick-DJtpSDju.cjs} +1 -1
- package/dist/{vue-ui-candlestick-ylYUQUkS.js → vue-ui-candlestick-DKYirN9r.js} +11 -11
- package/dist/{vue-ui-carousel-table-B5FwZhGC.cjs → vue-ui-carousel-table-VFiMfJos.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-B8Yes-sQ.js → vue-ui-carousel-table-q1hGM_Iw.js} +4 -4
- package/dist/{vue-ui-chestnut-DAskg0cX.js → vue-ui-chestnut-B1VUR7mU.js} +8 -8
- package/dist/{vue-ui-chestnut-De2g4Q2p.cjs → vue-ui-chestnut-DRGps83_.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-BlKPb01P.js → vue-ui-circle-pack-Bw_j7w4u.js} +9 -9
- package/dist/{vue-ui-circle-pack-BRLoGdmB.cjs → vue-ui-circle-pack-CkpLDinw.cjs} +1 -1
- package/dist/{vue-ui-cursor-3vZlEDs4.cjs → vue-ui-cursor-D_ZN42gT.cjs} +1 -1
- package/dist/{vue-ui-cursor-Fw7eOKi1.js → vue-ui-cursor-ZkCZRUcy.js} +2 -2
- package/dist/{vue-ui-dashboard-B_02OPVe.cjs → vue-ui-dashboard-Bcj-LfoN.cjs} +1 -1
- package/dist/vue-ui-dashboard-DnEpTStU.js +325 -0
- package/dist/{vue-ui-digits-1inXKiGc.js → vue-ui-digits-Bsseebr6.js} +2 -2
- package/dist/{vue-ui-digits-D9COqRtQ.cjs → vue-ui-digits-p0PWcPJX.cjs} +1 -1
- package/dist/{vue-ui-donut-snJ23_B8.cjs → vue-ui-donut-C3mhQ-03.cjs} +1 -1
- package/dist/{vue-ui-donut-B4HiTFOD.js → vue-ui-donut-CwvMWv_q.js} +12 -12
- package/dist/{vue-ui-donut-evolution-CwGD6UCG.js → vue-ui-donut-evolution-BzNh2QwP.js} +11 -11
- package/dist/{vue-ui-donut-evolution-t8NE1QRt.cjs → vue-ui-donut-evolution-C9eui30b.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-BItso2iE.cjs → vue-ui-dumbbell-BheHAxmy.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-DdFlUsZF.js → vue-ui-dumbbell-BvNEHy9Z.js} +10 -10
- package/dist/{vue-ui-flow-CR-74ZdV.js → vue-ui-flow-DBuLJlEV.js} +9 -9
- package/dist/{vue-ui-flow-DZrVpkqa.cjs → vue-ui-flow-vz29fymj.cjs} +1 -1
- package/dist/{vue-ui-funnel-P6dph9rO.cjs → vue-ui-funnel-D8brKLer.cjs} +1 -1
- package/dist/{vue-ui-funnel-C6Q9kDZj.js → vue-ui-funnel-DhoOe49e.js} +9 -9
- package/dist/{vue-ui-galaxy-CRvj8ew8.js → vue-ui-galaxy-DUQ5z3km.js} +11 -11
- package/dist/{vue-ui-galaxy-BzfQwtb7.cjs → vue-ui-galaxy-YP3Gl3vG.cjs} +1 -1
- package/dist/{vue-ui-gauge-CrrDIYlt.js → vue-ui-gauge-C_8QgadB.js} +7 -7
- package/dist/{vue-ui-gauge-BOmHo3_2.cjs → vue-ui-gauge-WH6OGXAD.cjs} +1 -1
- package/dist/{vue-ui-gizmo-CdBHJhKH.cjs → vue-ui-gizmo-D2AJKoeB.cjs} +1 -1
- package/dist/{vue-ui-gizmo-BjKqctlX.js → vue-ui-gizmo-DFy9X5IT.js} +3 -3
- package/dist/{vue-ui-heatmap-DQZsO55U.js → vue-ui-heatmap-DH93m9RC.js} +195 -190
- package/dist/vue-ui-heatmap-Dx8XPeob.cjs +1 -0
- package/dist/{vue-ui-history-plot-DR6KcO-n.js → vue-ui-history-plot-C-9fJrMv.js} +11 -11
- package/dist/{vue-ui-history-plot-BwmxWdM2.cjs → vue-ui-history-plot-Cmc7KMnB.cjs} +1 -1
- package/dist/{vue-ui-kpi-DPbpUZ9S.js → vue-ui-kpi-C6cv6sCW.js} +3 -3
- package/dist/{vue-ui-kpi-CL1YEty9.cjs → vue-ui-kpi-DqpTRLkQ.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DH6ZNRTg.js → vue-ui-mini-loader-BH-Hztc3.js} +2 -2
- package/dist/{vue-ui-mini-loader-sEeyMkrd.cjs → vue-ui-mini-loader-CpxzfBja.cjs} +1 -1
- package/dist/{vue-ui-molecule-DLK2q-Oq.js → vue-ui-molecule-1475qvln.js} +11 -11
- package/dist/{vue-ui-molecule-CRnMyuuZ.cjs → vue-ui-molecule-avfEzaAy.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-lnAFfrjE.cjs → vue-ui-mood-radar-CnAmD4WX.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-W5IVToCL.js → vue-ui-mood-radar-SJjT1sCF.js} +11 -11
- package/dist/{vue-ui-nested-donuts-DtgPU-KX.js → vue-ui-nested-donuts-6MGMcByL.js} +11 -11
- package/dist/{vue-ui-nested-donuts-CeuU6oEJ.cjs → vue-ui-nested-donuts-BkQJr_zV.cjs} +1 -1
- package/dist/{vue-ui-onion-WwdP8EpV.cjs → vue-ui-onion-CA2N8k0p.cjs} +1 -1
- package/dist/{vue-ui-onion-BeNPgG7G.js → vue-ui-onion-DzreNeV2.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-Ck3SJsIG.js → vue-ui-parallel-coordinate-plot-CyoOsjFp.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-Cv68PCn5.cjs → vue-ui-parallel-coordinate-plot-V6vt-U3H.cjs} +1 -1
- package/dist/{vue-ui-quadrant-DZ6ybcaY.cjs → vue-ui-quadrant-C7Fb-DVA.cjs} +1 -1
- package/dist/{vue-ui-quadrant-CMkw88lO.js → vue-ui-quadrant-DkMAnQHE.js} +12 -12
- package/dist/{vue-ui-quick-chart-Cl6gJp5T.js → vue-ui-quick-chart-BNf57IFn.js} +9 -9
- package/dist/{vue-ui-quick-chart-DJa7vHnr.cjs → vue-ui-quick-chart-CQp5GSbr.cjs} +1 -1
- package/dist/{vue-ui-radar-D18-CVYt.js → vue-ui-radar-DHxUS4r0.js} +12 -12
- package/dist/{vue-ui-radar-DJQ9V5u3.cjs → vue-ui-radar-DVv2P3B3.cjs} +1 -1
- package/dist/{vue-ui-rating-4aeU2wx4.js → vue-ui-rating-2dp8n1gK.js} +2 -2
- package/dist/{vue-ui-rating-DJ8riM4Y.cjs → vue-ui-rating-CA5buZm1.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-CNmTYbJn.cjs → vue-ui-relation-circle-BGY0EsvO.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-D5fbkhA5.js → vue-ui-relation-circle-hU35G-pb.js} +7 -7
- package/dist/{vue-ui-ridgeline-DYu8Ye38.js → vue-ui-ridgeline-CTE25ofY.js} +12 -12
- package/dist/{vue-ui-ridgeline-DcP5wra6.cjs → vue-ui-ridgeline-dhS0sX29.cjs} +1 -1
- package/dist/{vue-ui-rings-CLex25i0.cjs → vue-ui-rings-2XntvE5b.cjs} +1 -1
- package/dist/{vue-ui-rings-BVR1q--q.js → vue-ui-rings-BgJT1xPm.js} +12 -12
- package/dist/{vue-ui-scatter-CSsBerNk.cjs → vue-ui-scatter-Brh98c-o.cjs} +1 -1
- package/dist/{vue-ui-scatter-1nnDmU8p.js → vue-ui-scatter-YKeV-y-p.js} +12 -12
- package/dist/{vue-ui-skeleton-3odYNTi5.cjs → vue-ui-skeleton-CK5DdXVo.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BTg31tSs.js → vue-ui-skeleton-CNP_4H8z.js} +3 -3
- package/dist/{vue-ui-smiley-DAbOc9Sm.cjs → vue-ui-smiley-3uIAUF4w.cjs} +1 -1
- package/dist/{vue-ui-smiley-BIzjWlLm.js → vue-ui-smiley-BUlzuzq6.js} +2 -2
- package/dist/{vue-ui-spark-trend-CRKk0fMc.cjs → vue-ui-spark-trend-CfhhjekZ.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-CFYnfyEb.js → vue-ui-spark-trend-DmwQZLUP.js} +5 -5
- package/dist/{vue-ui-sparkbar-CCZDQYle.cjs → vue-ui-sparkbar-BxKGdAq3.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-V1FyDpDn.js → vue-ui-sparkbar-TLxa0K9v.js} +4 -4
- package/dist/{vue-ui-sparkgauge-MgywKNqC.js → vue-ui-sparkgauge-CIwnnQYW.js} +4 -4
- package/dist/{vue-ui-sparkgauge-CrirH2LX.cjs → vue-ui-sparkgauge-CWXLMSHa.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-U__aSGYT.cjs → vue-ui-sparkhistogram-Df0Edni4.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-CwBviGI7.js → vue-ui-sparkhistogram-w1rEgV9S.js} +5 -5
- package/dist/{vue-ui-sparkline-BHiVgcfL.cjs → vue-ui-sparkline-BQCbVZw5.cjs} +1 -1
- package/dist/{vue-ui-sparkline-D3v5ydDD.js → vue-ui-sparkline-C2Sf6sF4.js} +4 -4
- package/dist/{vue-ui-sparkstackbar--tnnBrOu.js → vue-ui-sparkstackbar-BaVuTNxy.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-BrBQ2Vby.cjs → vue-ui-sparkstackbar-BlyzQCK8.cjs} +1 -1
- package/dist/{vue-ui-stackbar-C-dJRiXT.js → vue-ui-stackbar-D4H8uFQ5.js} +13 -13
- package/dist/{vue-ui-stackbar-D7htqdCz.cjs → vue-ui-stackbar-ypv8uR9d.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-hNrBW3SU.cjs → vue-ui-strip-plot-CmrAJ6uF.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-B-Mc-qGK.js → vue-ui-strip-plot-Dxh7xzZf.js} +11 -11
- package/dist/{vue-ui-table-CQp16PNe.js → vue-ui-table-BD8QgS2P.js} +3 -3
- package/dist/{vue-ui-table-ByDKzqNM.cjs → vue-ui-table-BmyVGToW.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-DaEPU0kc.cjs → vue-ui-table-heatmap-CXTW4REL.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BNl4iQhq.js → vue-ui-table-heatmap-DZIrV6Bq.js} +4 -4
- package/dist/{vue-ui-table-sparkline-BgV9zEpQ.cjs → vue-ui-table-sparkline--R1CzNtx.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-lTHfuO-u.js → vue-ui-table-sparkline-B0aYy2JL.js} +5 -5
- package/dist/{vue-ui-thermometer-BN6Hyr3r.js → vue-ui-thermometer-Dh0nVf-h.js} +7 -7
- package/dist/{vue-ui-thermometer-HB6BdSZ7.cjs → vue-ui-thermometer-DtOy35Jd.cjs} +1 -1
- package/dist/{vue-ui-timer-6NZga1VA.cjs → vue-ui-timer-Bo3p5wjo.cjs} +1 -1
- package/dist/{vue-ui-timer-DpIbKhWx.js → vue-ui-timer-C4JkVftX.js} +5 -5
- package/dist/{vue-ui-tiremarks-Bssfpj2T.cjs → vue-ui-tiremarks-B-3AEiND.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-BDlFLwmy.js → vue-ui-tiremarks-GLU60Yzo.js} +7 -7
- package/dist/{vue-ui-treemap-CSEqsnF6.js → vue-ui-treemap-QyQqnbJc.js} +12 -12
- package/dist/{vue-ui-treemap-X9VKUYSw.cjs → vue-ui-treemap-ZiuUtYjs.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-SgM2OnqX.js → vue-ui-vertical-bar-CbwZCrcW.js} +12 -12
- package/dist/{vue-ui-vertical-bar-Bv35bg1C.cjs → vue-ui-vertical-bar-DHZvOGpR.cjs} +1 -1
- package/dist/{vue-ui-waffle-CPwuaVId.js → vue-ui-waffle-D_zRZStV.js} +12 -12
- package/dist/{vue-ui-waffle-C1L34KiX.cjs → vue-ui-waffle-Yi5W6qYr.cjs} +1 -1
- package/dist/{vue-ui-wheel-D2HqXb2O.cjs → vue-ui-wheel-D85CwfOC.cjs} +1 -1
- package/dist/{vue-ui-wheel-DbNXTA9I.js → vue-ui-wheel-D_wbd08e.js} +7 -7
- package/dist/{vue-ui-word-cloud-Cmm3wp39.cjs → vue-ui-word-cloud-CkActnvX.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-B7VTWsl2.js → vue-ui-word-cloud-jMOFgeRb.js} +10 -10
- package/dist/{vue-ui-world-51vUWrqr.js → vue-ui-world-XMoqQwg7.js} +11 -11
- package/dist/{vue-ui-world-Bi32aYtK.cjs → vue-ui-world-aTdY2yXo.cjs} +1 -1
- package/dist/{vue-ui-xy-D1O0m03x.js → vue-ui-xy-DL6V_DZs.js} +16 -16
- package/dist/{vue-ui-xy-BxJgh4xL.cjs → vue-ui-xy-DYEFXjnb.cjs} +2 -2
- package/dist/{vue-ui-xy-canvas-DsZxaeOo.js → vue-ui-xy-canvas-DpX9D7Ny.js} +12 -12
- package/dist/{vue-ui-xy-canvas-DbS90DFy.cjs → vue-ui-xy-canvas-K0Qm3FPR.cjs} +1 -1
- package/package.json +1 -1
- package/dist/PackageVersion-B6hD3Tku.cjs +0 -1
- package/dist/vue-ui-dashboard-jeg6HmFh.js +0 -317
- package/dist/vue-ui-heatmap-CfeV2PVZ.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-CLiv4lWF.cjs"),ee=require("./usePrinter-sfF-cTSO.cjs"),ge=require("./vue-ui-skeleton-3odYNTi5.cjs"),ke=require("./BaseIcon-BZiTtIp-.cjs"),_e=require("./vue-ui-accordion-DQ-y4bL8.cjs"),te=require("./useNestedProp-DWYmdrE5.cjs"),xe=require("./PackageVersion-B6hD3Tku.cjs"),Be=require("./PenAndPaper-mD8Ft9s0.cjs"),Ee=require("./useUserOptionState-BgepsfED.cjs"),Ne=require("./useChartAccessibility-Cm7nkzTG.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ce=["id"],we={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},ze=["xmlns","viewBox"],Ve=["width","height"],$e={key:1},Te=["fill","font-weight","font-size","x","y"],Fe=["fill","font-weight","font-size","x","y"],Le=["id"],De=["stop-color"],Oe=["stop-color"],Pe=["id"],Ie=["stop-color"],Me=["stop-color"],Re=["id"],Ae=["stop-color"],Xe=["stop-color"],je=["stop-color"],Ge=["id"],Ue=["stop-color"],qe=["stop-color"],Ye=["stop-color"],He=["id"],We=["stop-color"],Ke=["stop-color"],Je=["stop-color"],Qe={key:2},Ze=["x","y","font-size","font-weight","fill"],et=["x","y","font-size","font-weight","fill"],tt=["d","stroke"],lt=["cx","cy","r","fill"],at=["cx","cy","r","fill","stroke","stroke-width","onClick"],ot={key:3},nt=["x","y","font-size","fill","onClick"],rt={key:0},st=["x","y","fill","font-size","font-weight"],ut=["x","y","height","width","fill","rx","onClick"],ct=["x","y","height","width","fill","rx","stroke","stroke-width","onClick"],it={key:4},dt=["x","y","fill","font-size","onClick"],yt=["d","stroke"],vt=["fill","cx","cy","r","onClick"],ht={key:5},pt=["x","y","font-size","font-weight","fill"],ft=["x1","x2","y1","y2","stroke","stroke-width"],mt=["y","height","width"],bt={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},gt={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},kt={viewBox:"0 0 20 20",height:"16",width:"16"},_t=["fill"],xt={key:7},Bt=["y","height","width"],Et={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},Nt={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},St={viewBox:"0 0 20 20",height:"16",width:"16"},Ct=["fill"],wt=["cx","cy","fill"],zt=["d","stroke"],Vt=["cx","cy","fill"],$t=["d","stroke"],Tt=["cx","cy","fill"],Ft=["cx","cy","fill"],Lt=["x","y","fill","font-size","font-weight"],Dt=["x","y","fill","font-size","font-weight"],Ot=["x","text-anchor","y","fill","font-size"],Pt=["x","text-anchor","y","fill","font-size"],It=["x","text-anchor","y","fill","font-size"],Mt=["x","text-anchor","y","fill","font-size"],Rt=["x","text-anchor","y","fill","font-size"],At=["x","y","font-size","fill"],Xt=["x","y","font-size","fill"],jt=["x","y","font-size","fill"],Gt={key:4,class:"vue-data-ui-watermark"},Ut={key:6,ref:"source",dir:"auto"},qt={style:{"padding-top":"36px",position:"relative"}},Yt={class:"vue-ui-data-table"},Ht={key:0},Wt=["data-cell"],Kt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Jt={key:0},Qt={key:1},Zt=["data-cell"],el={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},tl={key:0},ll={key:1},al=["data-cell"],ol={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},nl={key:0},rl={key:1},sl=["data-cell"],ul={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},cl={key:0},il={key:1},dl=["data-cell"],yl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},vl={key:0},hl={key:1},pl=["data-cell"],fl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ml={key:0},bl={key:1},gl=["data-cell"],kl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},_l={key:0},xl={key:1},Bl=["data-cell"],El={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Nl=["data-cell"],Sl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Cl=["data-cell"],wl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},zl=["data-cell"],Vl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},$l=["data-cell"],Tl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Fl={__name:"vue-ui-chestnut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectRoot","selectBranch","selectNut"],setup(le,{expose:ae,emit:oe}){e.useCssVars(a=>({"4b8440b7":a.tdo}));const{vue_ui_chestnut:ne}=o.useConfig(),k=le,z=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(o.createUid()),I=e.ref(null),re=e.ref(null),M=e.ref(0),t=e.computed({get:()=>j(),set:a=>a}),{userOptionsVisible:T,setUserOptionsVisibility:R,keepUserOptionState:A}=Ee.useUserOptionState({config:t.value}),{svgRef:X}=Ne.useChartAccessibility({config:t.value.style.chart.layout.title});function j(){const a=te.useNestedProp({userConfig:k.config,defaultConfig:ne});return a.theme?{...te.useNestedProp({userConfig:o.themes.vue_ui_chestnut[a.theme]||k.config,defaultConfig:a}),customPalette:o.themePalettes[a.theme]||o.palette}:a}e.watch(()=>k.config,a=>{t.value=j(),T.value=!t.value.userOptions.showOnChartHover,S.value.showTable=t.value.table.show,J()},{deep:!0});const{isPrinting:G,isImaging:U,generatePdf:q,generateImage:Y}=ee.usePrinter({elementId:`vue-ui-chestnut_${h.value}`,fileName:t.value.style.chart.layout.title.text||"vue-ui-chestnut",options:t.value.userOptions.print}),se=e.computed(()=>t.value.userOptions.show),F=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),S=e.ref({showTable:t.value.table.show}),L=e.ref(null),H=e.ref(!1),ue=e.computed(()=>t.value.table.responsiveBreakpoint),r=e.ref({gap:6,padding:{top:102,left:12,right:12,bottom:96},width:1024,height:0,branchSize:32,branchStart:128}),f=e.computed(()=>({left:r.value.padding.left,top:r.value.padding.top,right:r.value.width-r.value.padding.right,bottom:r.value.height-r.value.padding.bottom,width:r.value.width-(r.value.padding.left+r.value.padding.right),height:r.value.height-(r.value.padding.top+r.value.padding.bottom),seedX:r.value.padding.left+64})),_=e.computed(()=>z.value?k.dataset.flatMap(a=>(a.branches||[]).map(s=>s.value||0)).reduce((a,s)=>a+s,0):0),m=e.computed(()=>(k.dataset.forEach((a,s)=>{o.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","branches"]}).forEach(l=>{o.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:l,index:s})}),a.branches&&a.branches.forEach((l,n)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(d=>{o.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:d,index:`${s} - ${n}`})}),l.breakdown&&l.breakdown.forEach((d,i)=>{o.getMissingDatasetAttributes({datasetObject:d,requiredAttributes:["name","value"]}).forEach(y=>{o.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:y,index:`${s} - ${n} - ${i}`})})})})}),k.dataset.map((a,s)=>{const l=(a.branches||[]).map(n=>n.value||0).reduce((n,d)=>n+d,0);return{...a,color:o.convertColorToHex(a.color)||F.value[s]||o.palette[s]||o.palette[s%o.palette.length],id:a.id||`root_${s}_${h.value}`,type:"root",total:l,rootIndex:s,branches:(a.branches||[]).map((n,d)=>({...n,rootName:a.name,rootIndex:s,color:o.convertColorToHex(a.color)||F.value[s]||o.palette[s]||o.palette[s%o.palette.length],value:n.value>=0?n.value:0,id:n.id||`branch_${s}_${d}_${h.value}`,proportionToRoot:n.value/l,type:"branch",breakdown:(n.breakdown||[]).map((i,y)=>({table:{rootName:a.name,rootValue:l,rootToTotal:l/_.value,branchName:n.name,branchValue:n.value,branchToTotal:n.value/_.value,branchToRoot:n.value/l,nutName:i.name,nutValue:i.value,nutToTotal:i.value/_.value,nutToRoot:i.value/l,nutToBranch:i.value/n.value},...i,type:"nut",branchName:n.name,rootName:a.name,branchTotal:n.value>=0?n.value:0,proportionToBranch:i.value/n.value,proportionToRoot:i.value/l,proportionToTree:i.value/_.value,rootIndex:s,id:i.id||`nut_${s}_${d}_${y}_${h.value}`,color:o.convertColorToHex(i.color)||F.value[y]||o.palette[y]||o.palette[y%o.palette.length],value:i.value>=0?i.value:0}))}))}})));function ce(){return m.value}const C=oe,ie=e.computed(()=>m.value.flatMap(a=>a.branches).length),de=e.computed(()=>Math.max(...m.value.map(a=>a.branches.map(s=>s.value).reduce((s,l)=>s+l,0)))),ye=e.computed(()=>Math.max(...m.value.flatMap(a=>a.branches.map(s=>s.value)))),W=e.computed(()=>256+r.value.padding.left),B=e.computed(()=>m.value.sort((a,s)=>s.total-a.total).map((a,s)=>{const l=f.value.height/m.value.length/2,n=a.total/de.value*(l>64?64:l);return{...a,x:f.value.seedX,y:f.value.top+f.value.height/m.value.length*(s+1)-(f.value.height/m.value.length/2+r.value.gap/2),r:n<r.value.branchSize/2?r.value.branchSize/2:n}})),ve=e.computed(()=>t.value.style.chart.layout.branches.widthRatio<=0?.1:t.value.style.chart.layout.branches.widthRatio>1.8?1.8:t.value.style.chart.layout.branches.widthRatio),he=e.computed(()=>B.value.flatMap(a=>a.branches)),E=e.computed(()=>he.value.sort((a,s)=>s.value-a.value).map((a,s)=>({...a,y1:s*r.value.branchSize+f.value.top+s*r.value.gap,y2:s*r.value.branchSize+r.value.branchSize,x1:W.value,x2:384*a.value/ye.value*ve.value+W.value})));function D(a){const s=B.value.find(l=>l.rootIndex===a.rootIndex);return{x:s.x,y:s.y,r:s.r}}const u=e.ref(null),x=e.ref(null),v=e.ref(null),b=e.ref(null);function p(){u.value=null,v.value=null,b.value=null}function g(a){return b.value?b.value===null?!0:a.type==="root"?a.id===b.value.id:a.rootIndex===b.value.rootIndex:u.value===null&&v.value===null?!0:a.type==="nut"?u.value.id===a.id:a.type==="branch"?v.value.id===a.id:a.type==="root"?v.value&&v.value.rootIndex===a.rootIndex||u.value&&u.value.rootIndex===a.rootIndex:!1}function pe(a){p(),e.nextTick(()=>{u.value=a,v.value=a,x.value=o.makeDonut({series:a.breakdown,base:1},a.x2+24+t.value.style.chart.layout.nuts.offsetX,a.y1+r.value.branchSize/2,80,80),C("selectNut",a.breakdown)})}function N(){u.value=null,x.value=null,C("selectNut",null)}function O(a){v.value&&v.value.id===a.id?(v.value=null,p(),C("selectBranch",null)):(p(),v.value=a,C("selectBranch",a))}function K(a){b.value&&b.value.id===a.id?(p(),C("selectRoot",null)):(p(),b.value=a,C("selectRoot",a))}function fe(){return f.value.bottom-(u.value.y1+180)<0?0:f.value.bottom}function w(a){return a.proportion*100>t.value.style.chart.layout.nuts.selected.labels.dataLabels.hideUnderValue}function me(){const a=new ResizeObserver(s=>{s.forEach(l=>{H.value=l.contentRect.width<ue.value})});L.value&&a.observe(L.value)}e.onMounted(()=>{J()});function J(){o.objectIsEmpty(k.dataset)&&o.error({componentName:"VueUiChestnut",type:"dataset"});const a=ie.value*(r.value.branchSize+r.value.gap)+r.value.padding.top+r.value.padding.bottom;r.value.height=a,me()}const c=e.computed(()=>{const a=[t.value.table.th.translations.rootName,t.value.table.th.translations.rootValue,t.value.table.th.translations.rootToTotal,t.value.table.th.translations.branchName,t.value.table.th.translations.branchValue,t.value.table.th.translations.branchToRoot,t.value.table.th.translations.branchToTotal,t.value.table.th.translations.nutName,t.value.table.th.translations.nutValue,t.value.table.th.translations.nutToBranch,t.value.table.th.translations.nutToRoot,t.value.table.th.translations.nutToTotal],s=m.value.flatMap((l,n)=>l.branches.flatMap((d,i)=>d.breakdown.flatMap((y,Dl)=>y.table)));return{head:a,body:s}});function Q(){e.nextTick(()=>{const a=[[t.value.style.chart.layout.title.text],[t.value.style.chart.layout.title.subtitle.text],[""],["Grand total",_.value],[""]],s=c.value.head,l=c.value.body.map((i,y)=>[c.value.body[y-1]&&c.value.body[y-1].rootName===i.rootName?"":i.rootName,c.value.body[y-1]&&c.value.body[y-1].rootName===i.rootName?"":i.rootValue,c.value.body[y-1]&&c.value.body[y-1].rootName===i.rootName?"":i.rootToTotal,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchName,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchValue,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchToRoot,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchToTotal,i.nutName,i.nutValue,i.nutToBranch,i.nutToRoot,i.nutToTotal]),n=a.concat([s]).concat(l),d=o.createCsvContent(n);o.downloadCsv({csvContent:d,title:t.value.style.chart.layout.title.text||"vue-ui-chestnut"})})}const V=e.ref(!1);function be(a){V.value=a,M.value+=1}function Z(){S.value.showTable=!S.value.showTable}const $=e.ref(!1);function P(){$.value=!$.value}return ae({getData:ce,generatePdf:q,generateCsv:Q,generateImage:Y,toggleTable:Z,toggleAnnotator:P}),(a,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-chestnut ${V.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"chestnutChart",ref:I,id:`vue-ui-chestnut_${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:s[2]||(s[2]=()=>e.unref(R)(!0)),onMouseleave:s[3]||(s[3]=()=>e.unref(R)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Be._sfc_main,{key:0,svgRef:e.unref(X),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:P},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),se.value?(e.openBlock(),e.createElementBlock("div",we,null,512)):e.createCommentVNode("",!0),t.value.userOptions.show&&z.value&&(e.unref(A)||e.unref(T))?(e.openBlock(),e.createBlock(ee.UserOptions,{ref_key:"details",ref:re,key:`user_options_${M.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(U),isPrinting:e.unref(G),uid:h.value,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:V.value,titles:{...t.value.userOptions.buttonTitles},chartElement:I.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:be,onGeneratePdf:e.unref(q),onGenerateCsv:Q,onGenerateImage:e.unref(Y),onToggleTable:Z,onToggleAnnotator:P,style:e.normalizeStyle({visibility:e.unref(A)?e.unref(T)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:n})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:n})),void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),r.value.height>0&&z.value?(e.openBlock(),e.createElementBlock("svg",{key:3,ref_key:"svgRef",ref:X,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${r.value.width<=0?10:r.value.width} ${r.value.height<=0?10:r.value.height}`,style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(xe._sfc_main),a.$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(a.$slots,"chart-background",{},void 0,!0)],8,Ve)):e.createCommentVNode("",!0),u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("g",$e,[t.value.style.chart.layout.title.text?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",fill:t.value.style.chart.layout.title.color,"font-weight":t.value.style.chart.layout.title.bold?"bold":"normal","font-size":t.value.style.chart.layout.title.fontSize,x:r.value.width/2,y:12+t.value.style.chart.layout.title.fontSize+t.value.style.chart.layout.title.offsetY,onClick:p},e.toDisplayString(t.value.style.chart.layout.title.text),9,Te)):e.createCommentVNode("",!0),t.value.style.chart.layout.title.subtitle.text?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",fill:t.value.style.chart.layout.title.subtitle.color,"font-weight":t.value.style.chart.layout.title.subtitle.bold?"bold":"normal","font-size":t.value.style.chart.layout.title.subtitle.fontSize,x:r.value.width/2,y:48+t.value.style.chart.layout.title.subtitle.fontSize+t.value.style.chart.layout.title.subtitle.offsetY,onClick:p},e.toDisplayString(t.value.style.chart.layout.title.subtitle.text),9,Fe)):e.createCommentVNode("",!0)])),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`root_gradient_${h.value}_${l.rootIndex}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(l.color,.05),100-t.value.style.chart.layout.roots.gradientIntensity)},null,8,De),e.createElementVNode("stop",{offset:"100%","stop-color":l.color},null,8,Oe)],8,Le))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,l=>(e.openBlock(),e.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`branch_gradient_${h.value}_${l.rootIndex}`},[e.createElementVNode("stop",{offset:"0%","stop-color":l.color},null,8,Ie),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(l.color,.02),100-t.value.style.chart.layout.branches.gradientIntensity)},null,8,Me)],8,Pe))),256)),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nutpick_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Ae),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)("#FFFFFF",t.value.style.chart.layout.nuts.selected.gradientIntensity)},null,8,Xe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,je)],8,Re),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Ue),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)("#FFFFFF",t.value.style.chart.layout.nuts.gradientIntensity)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Ye)],8,Ge),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_underlayer_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,100)},null,8,We),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,60)},null,8,Ke),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,0)},null,8,Je)],8,He)]),t.value.style.chart.layout.grandTotal.show?(e.openBlock(),e.createElementBlock("g",Qe,[e.createElementVNode("text",{x:f.value.seedX,y:32+t.value.style.chart.layout.grandTotal.offsetY,"font-size":t.value.style.chart.layout.grandTotal.fontSize,"font-weight":t.value.style.chart.layout.grandTotal.bold?"bold":"normal",fill:t.value.style.chart.layout.grandTotal.color,"text-anchor":"middle",onClick:p},e.toDisplayString(t.value.style.chart.layout.grandTotal.text),9,Ze),e.createElementVNode("text",{x:f.value.seedX,y:38+t.value.style.chart.layout.grandTotal.fontSize+t.value.style.chart.layout.grandTotal.offsetY,"font-size":t.value.style.chart.layout.grandTotal.fontSize,"font-weight":t.value.style.chart.layout.grandTotal.bold?"bold":"normal",fill:t.value.style.chart.layout.grandTotal.color,"text-anchor":"middle",onClick:p},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.grandTotal.formatter,_.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.grandTotal.prefix,v:_.value,s:t.value.style.chart.layout.grandTotal.suffix,r:t.value.style.chart.layout.grandTotal.roundingValue}))),9,et)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,l=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.branchSize,(n,d)=>(e.openBlock(),e.createElementBlock("path",{d:`M
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-D6F-xMcR.cjs"),ee=require("./usePrinter-B9NkBzf5.cjs"),ge=require("./vue-ui-skeleton-CK5DdXVo.cjs"),ke=require("./BaseIcon-CvuQ41yl.cjs"),_e=require("./vue-ui-accordion-ChE9WO8Q.cjs"),te=require("./useNestedProp-CAbtwUJj.cjs"),xe=require("./PackageVersion-CKutD59c.cjs"),Be=require("./PenAndPaper-Bnvy0XRn.cjs"),Ee=require("./useUserOptionState-BgepsfED.cjs"),Ne=require("./useChartAccessibility-Cm7nkzTG.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ce=["id"],we={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},ze=["xmlns","viewBox"],Ve=["width","height"],$e={key:1},Te=["fill","font-weight","font-size","x","y"],Fe=["fill","font-weight","font-size","x","y"],Le=["id"],De=["stop-color"],Oe=["stop-color"],Pe=["id"],Ie=["stop-color"],Me=["stop-color"],Re=["id"],Ae=["stop-color"],Xe=["stop-color"],je=["stop-color"],Ge=["id"],Ue=["stop-color"],qe=["stop-color"],Ye=["stop-color"],He=["id"],We=["stop-color"],Ke=["stop-color"],Je=["stop-color"],Qe={key:2},Ze=["x","y","font-size","font-weight","fill"],et=["x","y","font-size","font-weight","fill"],tt=["d","stroke"],lt=["cx","cy","r","fill"],at=["cx","cy","r","fill","stroke","stroke-width","onClick"],ot={key:3},nt=["x","y","font-size","fill","onClick"],rt={key:0},st=["x","y","fill","font-size","font-weight"],ut=["x","y","height","width","fill","rx","onClick"],ct=["x","y","height","width","fill","rx","stroke","stroke-width","onClick"],it={key:4},dt=["x","y","fill","font-size","onClick"],yt=["d","stroke"],vt=["fill","cx","cy","r","onClick"],ht={key:5},pt=["x","y","font-size","font-weight","fill"],ft=["x1","x2","y1","y2","stroke","stroke-width"],mt=["y","height","width"],bt={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},gt={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},kt={viewBox:"0 0 20 20",height:"16",width:"16"},_t=["fill"],xt={key:7},Bt=["y","height","width"],Et={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},Nt={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},St={viewBox:"0 0 20 20",height:"16",width:"16"},Ct=["fill"],wt=["cx","cy","fill"],zt=["d","stroke"],Vt=["cx","cy","fill"],$t=["d","stroke"],Tt=["cx","cy","fill"],Ft=["cx","cy","fill"],Lt=["x","y","fill","font-size","font-weight"],Dt=["x","y","fill","font-size","font-weight"],Ot=["x","text-anchor","y","fill","font-size"],Pt=["x","text-anchor","y","fill","font-size"],It=["x","text-anchor","y","fill","font-size"],Mt=["x","text-anchor","y","fill","font-size"],Rt=["x","text-anchor","y","fill","font-size"],At=["x","y","font-size","fill"],Xt=["x","y","font-size","fill"],jt=["x","y","font-size","fill"],Gt={key:4,class:"vue-data-ui-watermark"},Ut={key:6,ref:"source",dir:"auto"},qt={style:{"padding-top":"36px",position:"relative"}},Yt={class:"vue-ui-data-table"},Ht={key:0},Wt=["data-cell"],Kt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Jt={key:0},Qt={key:1},Zt=["data-cell"],el={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},tl={key:0},ll={key:1},al=["data-cell"],ol={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},nl={key:0},rl={key:1},sl=["data-cell"],ul={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},cl={key:0},il={key:1},dl=["data-cell"],yl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},vl={key:0},hl={key:1},pl=["data-cell"],fl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ml={key:0},bl={key:1},gl=["data-cell"],kl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},_l={key:0},xl={key:1},Bl=["data-cell"],El={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Nl=["data-cell"],Sl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Cl=["data-cell"],wl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},zl=["data-cell"],Vl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},$l=["data-cell"],Tl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Fl={__name:"vue-ui-chestnut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectRoot","selectBranch","selectNut"],setup(le,{expose:ae,emit:oe}){e.useCssVars(a=>({"4b8440b7":a.tdo}));const{vue_ui_chestnut:ne}=o.useConfig(),k=le,z=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(o.createUid()),I=e.ref(null),re=e.ref(null),M=e.ref(0),t=e.computed({get:()=>j(),set:a=>a}),{userOptionsVisible:T,setUserOptionsVisibility:R,keepUserOptionState:A}=Ee.useUserOptionState({config:t.value}),{svgRef:X}=Ne.useChartAccessibility({config:t.value.style.chart.layout.title});function j(){const a=te.useNestedProp({userConfig:k.config,defaultConfig:ne});return a.theme?{...te.useNestedProp({userConfig:o.themes.vue_ui_chestnut[a.theme]||k.config,defaultConfig:a}),customPalette:o.themePalettes[a.theme]||o.palette}:a}e.watch(()=>k.config,a=>{t.value=j(),T.value=!t.value.userOptions.showOnChartHover,S.value.showTable=t.value.table.show,J()},{deep:!0});const{isPrinting:G,isImaging:U,generatePdf:q,generateImage:Y}=ee.usePrinter({elementId:`vue-ui-chestnut_${h.value}`,fileName:t.value.style.chart.layout.title.text||"vue-ui-chestnut",options:t.value.userOptions.print}),se=e.computed(()=>t.value.userOptions.show),F=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),S=e.ref({showTable:t.value.table.show}),L=e.ref(null),H=e.ref(!1),ue=e.computed(()=>t.value.table.responsiveBreakpoint),r=e.ref({gap:6,padding:{top:102,left:12,right:12,bottom:96},width:1024,height:0,branchSize:32,branchStart:128}),f=e.computed(()=>({left:r.value.padding.left,top:r.value.padding.top,right:r.value.width-r.value.padding.right,bottom:r.value.height-r.value.padding.bottom,width:r.value.width-(r.value.padding.left+r.value.padding.right),height:r.value.height-(r.value.padding.top+r.value.padding.bottom),seedX:r.value.padding.left+64})),_=e.computed(()=>z.value?k.dataset.flatMap(a=>(a.branches||[]).map(s=>s.value||0)).reduce((a,s)=>a+s,0):0),m=e.computed(()=>(k.dataset.forEach((a,s)=>{o.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","branches"]}).forEach(l=>{o.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:l,index:s})}),a.branches&&a.branches.forEach((l,n)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(d=>{o.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:d,index:`${s} - ${n}`})}),l.breakdown&&l.breakdown.forEach((d,i)=>{o.getMissingDatasetAttributes({datasetObject:d,requiredAttributes:["name","value"]}).forEach(y=>{o.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:y,index:`${s} - ${n} - ${i}`})})})})}),k.dataset.map((a,s)=>{const l=(a.branches||[]).map(n=>n.value||0).reduce((n,d)=>n+d,0);return{...a,color:o.convertColorToHex(a.color)||F.value[s]||o.palette[s]||o.palette[s%o.palette.length],id:a.id||`root_${s}_${h.value}`,type:"root",total:l,rootIndex:s,branches:(a.branches||[]).map((n,d)=>({...n,rootName:a.name,rootIndex:s,color:o.convertColorToHex(a.color)||F.value[s]||o.palette[s]||o.palette[s%o.palette.length],value:n.value>=0?n.value:0,id:n.id||`branch_${s}_${d}_${h.value}`,proportionToRoot:n.value/l,type:"branch",breakdown:(n.breakdown||[]).map((i,y)=>({table:{rootName:a.name,rootValue:l,rootToTotal:l/_.value,branchName:n.name,branchValue:n.value,branchToTotal:n.value/_.value,branchToRoot:n.value/l,nutName:i.name,nutValue:i.value,nutToTotal:i.value/_.value,nutToRoot:i.value/l,nutToBranch:i.value/n.value},...i,type:"nut",branchName:n.name,rootName:a.name,branchTotal:n.value>=0?n.value:0,proportionToBranch:i.value/n.value,proportionToRoot:i.value/l,proportionToTree:i.value/_.value,rootIndex:s,id:i.id||`nut_${s}_${d}_${y}_${h.value}`,color:o.convertColorToHex(i.color)||F.value[y]||o.palette[y]||o.palette[y%o.palette.length],value:i.value>=0?i.value:0}))}))}})));function ce(){return m.value}const C=oe,ie=e.computed(()=>m.value.flatMap(a=>a.branches).length),de=e.computed(()=>Math.max(...m.value.map(a=>a.branches.map(s=>s.value).reduce((s,l)=>s+l,0)))),ye=e.computed(()=>Math.max(...m.value.flatMap(a=>a.branches.map(s=>s.value)))),W=e.computed(()=>256+r.value.padding.left),B=e.computed(()=>m.value.sort((a,s)=>s.total-a.total).map((a,s)=>{const l=f.value.height/m.value.length/2,n=a.total/de.value*(l>64?64:l);return{...a,x:f.value.seedX,y:f.value.top+f.value.height/m.value.length*(s+1)-(f.value.height/m.value.length/2+r.value.gap/2),r:n<r.value.branchSize/2?r.value.branchSize/2:n}})),ve=e.computed(()=>t.value.style.chart.layout.branches.widthRatio<=0?.1:t.value.style.chart.layout.branches.widthRatio>1.8?1.8:t.value.style.chart.layout.branches.widthRatio),he=e.computed(()=>B.value.flatMap(a=>a.branches)),E=e.computed(()=>he.value.sort((a,s)=>s.value-a.value).map((a,s)=>({...a,y1:s*r.value.branchSize+f.value.top+s*r.value.gap,y2:s*r.value.branchSize+r.value.branchSize,x1:W.value,x2:384*a.value/ye.value*ve.value+W.value})));function D(a){const s=B.value.find(l=>l.rootIndex===a.rootIndex);return{x:s.x,y:s.y,r:s.r}}const u=e.ref(null),x=e.ref(null),v=e.ref(null),b=e.ref(null);function p(){u.value=null,v.value=null,b.value=null}function g(a){return b.value?b.value===null?!0:a.type==="root"?a.id===b.value.id:a.rootIndex===b.value.rootIndex:u.value===null&&v.value===null?!0:a.type==="nut"?u.value.id===a.id:a.type==="branch"?v.value.id===a.id:a.type==="root"?v.value&&v.value.rootIndex===a.rootIndex||u.value&&u.value.rootIndex===a.rootIndex:!1}function pe(a){p(),e.nextTick(()=>{u.value=a,v.value=a,x.value=o.makeDonut({series:a.breakdown,base:1},a.x2+24+t.value.style.chart.layout.nuts.offsetX,a.y1+r.value.branchSize/2,80,80),C("selectNut",a.breakdown)})}function N(){u.value=null,x.value=null,C("selectNut",null)}function O(a){v.value&&v.value.id===a.id?(v.value=null,p(),C("selectBranch",null)):(p(),v.value=a,C("selectBranch",a))}function K(a){b.value&&b.value.id===a.id?(p(),C("selectRoot",null)):(p(),b.value=a,C("selectRoot",a))}function fe(){return f.value.bottom-(u.value.y1+180)<0?0:f.value.bottom}function w(a){return a.proportion*100>t.value.style.chart.layout.nuts.selected.labels.dataLabels.hideUnderValue}function me(){const a=new ResizeObserver(s=>{s.forEach(l=>{H.value=l.contentRect.width<ue.value})});L.value&&a.observe(L.value)}e.onMounted(()=>{J()});function J(){o.objectIsEmpty(k.dataset)&&o.error({componentName:"VueUiChestnut",type:"dataset"});const a=ie.value*(r.value.branchSize+r.value.gap)+r.value.padding.top+r.value.padding.bottom;r.value.height=a,me()}const c=e.computed(()=>{const a=[t.value.table.th.translations.rootName,t.value.table.th.translations.rootValue,t.value.table.th.translations.rootToTotal,t.value.table.th.translations.branchName,t.value.table.th.translations.branchValue,t.value.table.th.translations.branchToRoot,t.value.table.th.translations.branchToTotal,t.value.table.th.translations.nutName,t.value.table.th.translations.nutValue,t.value.table.th.translations.nutToBranch,t.value.table.th.translations.nutToRoot,t.value.table.th.translations.nutToTotal],s=m.value.flatMap((l,n)=>l.branches.flatMap((d,i)=>d.breakdown.flatMap((y,Dl)=>y.table)));return{head:a,body:s}});function Q(){e.nextTick(()=>{const a=[[t.value.style.chart.layout.title.text],[t.value.style.chart.layout.title.subtitle.text],[""],["Grand total",_.value],[""]],s=c.value.head,l=c.value.body.map((i,y)=>[c.value.body[y-1]&&c.value.body[y-1].rootName===i.rootName?"":i.rootName,c.value.body[y-1]&&c.value.body[y-1].rootName===i.rootName?"":i.rootValue,c.value.body[y-1]&&c.value.body[y-1].rootName===i.rootName?"":i.rootToTotal,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchName,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchValue,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchToRoot,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchToTotal,i.nutName,i.nutValue,i.nutToBranch,i.nutToRoot,i.nutToTotal]),n=a.concat([s]).concat(l),d=o.createCsvContent(n);o.downloadCsv({csvContent:d,title:t.value.style.chart.layout.title.text||"vue-ui-chestnut"})})}const V=e.ref(!1);function be(a){V.value=a,M.value+=1}function Z(){S.value.showTable=!S.value.showTable}const $=e.ref(!1);function P(){$.value=!$.value}return ae({getData:ce,generatePdf:q,generateCsv:Q,generateImage:Y,toggleTable:Z,toggleAnnotator:P}),(a,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-chestnut ${V.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"chestnutChart",ref:I,id:`vue-ui-chestnut_${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:s[2]||(s[2]=()=>e.unref(R)(!0)),onMouseleave:s[3]||(s[3]=()=>e.unref(R)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Be._sfc_main,{key:0,svgRef:e.unref(X),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:P},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),se.value?(e.openBlock(),e.createElementBlock("div",we,null,512)):e.createCommentVNode("",!0),t.value.userOptions.show&&z.value&&(e.unref(A)||e.unref(T))?(e.openBlock(),e.createBlock(ee.UserOptions,{ref_key:"details",ref:re,key:`user_options_${M.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(U),isPrinting:e.unref(G),uid:h.value,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:V.value,titles:{...t.value.userOptions.buttonTitles},chartElement:I.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:be,onGeneratePdf:e.unref(q),onGenerateCsv:Q,onGenerateImage:e.unref(Y),onToggleTable:Z,onToggleAnnotator:P,style:e.normalizeStyle({visibility:e.unref(A)?e.unref(T)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:n})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:n})),void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),r.value.height>0&&z.value?(e.openBlock(),e.createElementBlock("svg",{key:3,ref_key:"svgRef",ref:X,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${r.value.width<=0?10:r.value.width} ${r.value.height<=0?10:r.value.height}`,style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(xe._sfc_main),a.$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(a.$slots,"chart-background",{},void 0,!0)],8,Ve)):e.createCommentVNode("",!0),u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("g",$e,[t.value.style.chart.layout.title.text?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",fill:t.value.style.chart.layout.title.color,"font-weight":t.value.style.chart.layout.title.bold?"bold":"normal","font-size":t.value.style.chart.layout.title.fontSize,x:r.value.width/2,y:12+t.value.style.chart.layout.title.fontSize+t.value.style.chart.layout.title.offsetY,onClick:p},e.toDisplayString(t.value.style.chart.layout.title.text),9,Te)):e.createCommentVNode("",!0),t.value.style.chart.layout.title.subtitle.text?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",fill:t.value.style.chart.layout.title.subtitle.color,"font-weight":t.value.style.chart.layout.title.subtitle.bold?"bold":"normal","font-size":t.value.style.chart.layout.title.subtitle.fontSize,x:r.value.width/2,y:48+t.value.style.chart.layout.title.subtitle.fontSize+t.value.style.chart.layout.title.subtitle.offsetY,onClick:p},e.toDisplayString(t.value.style.chart.layout.title.subtitle.text),9,Fe)):e.createCommentVNode("",!0)])),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`root_gradient_${h.value}_${l.rootIndex}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(l.color,.05),100-t.value.style.chart.layout.roots.gradientIntensity)},null,8,De),e.createElementVNode("stop",{offset:"100%","stop-color":l.color},null,8,Oe)],8,Le))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,l=>(e.openBlock(),e.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`branch_gradient_${h.value}_${l.rootIndex}`},[e.createElementVNode("stop",{offset:"0%","stop-color":l.color},null,8,Ie),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(l.color,.02),100-t.value.style.chart.layout.branches.gradientIntensity)},null,8,Me)],8,Pe))),256)),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nutpick_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Ae),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)("#FFFFFF",t.value.style.chart.layout.nuts.selected.gradientIntensity)},null,8,Xe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,je)],8,Re),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Ue),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)("#FFFFFF",t.value.style.chart.layout.nuts.gradientIntensity)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Ye)],8,Ge),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_underlayer_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,100)},null,8,We),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,60)},null,8,Ke),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,0)},null,8,Je)],8,He)]),t.value.style.chart.layout.grandTotal.show?(e.openBlock(),e.createElementBlock("g",Qe,[e.createElementVNode("text",{x:f.value.seedX,y:32+t.value.style.chart.layout.grandTotal.offsetY,"font-size":t.value.style.chart.layout.grandTotal.fontSize,"font-weight":t.value.style.chart.layout.grandTotal.bold?"bold":"normal",fill:t.value.style.chart.layout.grandTotal.color,"text-anchor":"middle",onClick:p},e.toDisplayString(t.value.style.chart.layout.grandTotal.text),9,Ze),e.createElementVNode("text",{x:f.value.seedX,y:38+t.value.style.chart.layout.grandTotal.fontSize+t.value.style.chart.layout.grandTotal.offsetY,"font-size":t.value.style.chart.layout.grandTotal.fontSize,"font-weight":t.value.style.chart.layout.grandTotal.bold?"bold":"normal",fill:t.value.style.chart.layout.grandTotal.color,"text-anchor":"middle",onClick:p},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.grandTotal.formatter,_.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.grandTotal.prefix,v:_.value,s:t.value.style.chart.layout.grandTotal.suffix,r:t.value.style.chart.layout.grandTotal.roundingValue}))),9,et)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,l=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.branchSize,(n,d)=>(e.openBlock(),e.createElementBlock("path",{d:`M
|
|
2
2
|
${l.x1},${l.y1+d}
|
|
3
3
|
C${l.x1-20},${l.y1+d}
|
|
4
4
|
${l.x1-80},${l.y1+d}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { useCssVars as We, computed as w, ref as p, watch as $e, onMounted as Xe, watchEffect as Ye, createElementBlock as b, openBlock as f, unref as m, normalizeStyle as K, normalizeClass as Te, createBlock as M, createCommentVNode as k, renderSlot as x, createSlots as Ze, withCtx as z, normalizeProps as U, guardReactiveProps as B, createVNode as Je, Fragment as Q, renderList as Ke, createElementVNode as C, mergeProps as Se, toDisplayString as j, createTextVNode as Qe, nextTick as Ie } from "vue";
|
|
2
|
-
import { u as et, c as Oe, t as ie, p as ee, a as tt, o as lt, e as at, b as ot, d as st, h as Pe, f as ce, X as nt, l as rt, G as q, af as ut, q as it, r as ct, i as Fe } from "./index-
|
|
3
|
-
import { u as Ne } from "./useNestedProp-
|
|
4
|
-
import { u as vt, U as dt } from "./usePrinter-
|
|
5
|
-
import { _ as ht } from "./Title-
|
|
6
|
-
import { _ as ft } from "./PenAndPaper-
|
|
2
|
+
import { u as et, c as Oe, t as ie, p as ee, a as tt, o as lt, e as at, b as ot, d as st, h as Pe, f as ce, X as nt, l as rt, G as q, af as ut, q as it, r as ct, i as Fe } from "./index-D2h9qRb4.js";
|
|
3
|
+
import { u as Ne } from "./useNestedProp-DlWfv-mw.js";
|
|
4
|
+
import { u as vt, U as dt } from "./usePrinter-BGkHpXM9.js";
|
|
5
|
+
import { _ as ht } from "./Title-BNsKKvQy.js";
|
|
6
|
+
import { _ as ft } from "./PenAndPaper-BF6RVx_0.js";
|
|
7
7
|
import { u as yt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
8
|
-
import { _ as mt } from "./PackageVersion-
|
|
9
|
-
import pt from "./vue-ui-accordion-
|
|
10
|
-
import { D as bt } from "./DataTable-
|
|
11
|
-
import gt from "./vue-ui-skeleton-
|
|
8
|
+
import { _ as mt } from "./PackageVersion-DrU5ubC-.js";
|
|
9
|
+
import pt from "./vue-ui-accordion-C-v1kmEc.js";
|
|
10
|
+
import { D as bt } from "./DataTable-CGMCHKzY.js";
|
|
11
|
+
import gt from "./vue-ui-skeleton-CNP_4H8z.js";
|
|
12
12
|
import { u as kt } from "./useChartAccessibility-BWojgys7.js";
|
|
13
13
|
import { t as xt, u as wt } from "./useResponsive-Cw4oZ8sQ.js";
|
|
14
14
|
import { _ as Ct } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-CLiv4lWF.cjs"),ie=require("./useNestedProp-DWYmdrE5.cjs"),ce=require("./usePrinter-sfF-cTSO.cjs"),_e=require("./Title-g0Df2kQZ.cjs"),Be=require("./PenAndPaper-mD8Ft9s0.cjs"),Se=require("./useUserOptionState-BgepsfED.cjs"),$e=require("./PackageVersion-B6hD3Tku.cjs"),Ne=require("./vue-ui-accordion-DQ-y4bL8.cjs"),Ee=require("./DataTable-D8eve3Rv.cjs"),Pe=require("./vue-ui-skeleton-3odYNTi5.cjs"),Te=require("./useChartAccessibility-Cm7nkzTG.cjs"),ve=require("./useResponsive-DQmBAoBf.cjs"),Ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function de(i,d=0){const m=i.reduce((a,{x:r,r:c})=>Math.min(a,r-c-d),1/0),v=i.reduce((a,{x:r,r:c})=>Math.max(a,r+c+d),-1/0),f=i.reduce((a,{y:r,r:c})=>Math.min(a,r-c-d),1/0),n=i.reduce((a,{y:r,r:c})=>Math.max(a,r+c+d),-1/0);return[m,f,v-m,n-f]}function Oe(i,d,m){const v=i._,f=i.next._,n=v.r+f.r,a=(v.x*f.r+f.x*v.r)/n,r=(v.y*f.r+f.y*v.r)/n;return Math.max(Math.abs(a*m),Math.abs(r*d))}function fe(i,d,m){const v=Oe,f=i.length;if(!f)return i;let n,a,r;if(n=i[0],n.x=0,n.y=0,!(f>1)||(a=i[1],n.x=-a.r,a.x=n.r,a.y=0,!(f>2)))return i;he(a,n,r=i[2]),n=new q(n),a=new q(a),r=new q(r),n.next=r.previous=a,a.next=n.previous=r,r.next=a.previous=n;e:for(let c=3;c<f;++c){he(n._,a._,r=i[c]),r=new q(r);let y=a.next,b=n.previous,S=a._.r,$=n._.r;do if(S<=$){if(me(y._,r._)){a=y,n.next=a,a.previous=n,--c;continue e}S+=y._.r,y=y.next}else{if(me(b._,r._)){n=b,n.next=a,a.previous=n,--c;continue e}$+=b._.r,b=b.previous}while(y!==b.next);r.previous=n,r.next=a,n.next=a.previous=a=r;let N=v(n,m,d),F;for(;(r=r.next)!==a;)(F=v(r,m,d))<N&&(n=r,N=F);a=n.next}return i}function he(i,d,m){const v=i.x-d.x,f=i.y-d.y,n=v*v+f*f;if(n){const a=(d.r+m.r)**2,r=(i.r+m.r)**2;if(a>r){const c=(n+r-a)/(2*n),y=Math.sqrt(Math.max(0,r/n-c*c));m.x=i.x-c*v-y*f,m.y=i.y-c*f+y*v}else{const c=(n+a-r)/(2*n),y=Math.sqrt(Math.max(0,a/n-c*c));m.x=d.x+c*v-y*f,m.y=d.y+c*f+y*v}}else m.x=d.x+m.r,m.y=d.y}function me(i,d){const m=i.r+d.r-1e-6,v=d.x-i.x,f=d.y-i.y;return m>0&&m*m>v*v+f*f}class q{constructor(d){this._=d,this.next=null,this.previous=null}}const Fe=["id"],Ie=["xmlns","viewBox","height","width"],Re=["x","y","width","height"],Me=["id"],Ae=["stop-color"],qe=["stop-color"],De=["stop-color"],Le={key:0},He=["x","y","width","height","stroke","stroke-width","fill","rx","onMouseenter","onClick"],Ue=["x","y","width","height","stroke","stroke-width","fill","rx"],je=["opacity","x","y","font-size","fill","font-weight"],Ge=["opacity","x","y","font-size","fill","font-weight"],We=["cx","cy","r","opacity","stroke","stroke-width","fill"],Ye={key:0,style:{pointerEvents:"none"}},Xe={key:1},Ze=["opacity","x","y","font-size","fill","font-weight"],Je=["opacity","x","y","font-size","fill","font-weight"],Ke={key:6,class:"vue-data-ui-watermark"},Qe=["innerHTML"],et={__name:"vue-ui-circle-pack",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(i,{expose:d,emit:m}){e.useCssVars(o=>({cf72f1fe:B.value,"4e89318c":H.value}));const v=i,f=m,{vue_ui_circle_pack:n}=u.useConfig(),a=e.computed(()=>!!v.dataset&&v.dataset.length),r=e.ref(u.createUid()),c=e.ref(null),y=e.ref(null),b=e.ref(null),S=e.ref(0),$=e.ref(0),N=e.ref(0),F=e.ref(null),t=e.computed({get:()=>J(),set:o=>o}),{svgRef:Y}=Te.useChartAccessibility({config:t.value.style.chart.title}),{userOptionsVisible:D,setUserOptionsVisibility:X,keepUserOptionState:Z}=Se.useUserOptionState({config:t.value});function J(){const o=ie.useNestedProp({userConfig:v.config,defaultConfig:n});return o.theme?{...ie.useNestedProp({userConfig:u.themes.vue_ui_circle_pack[o.theme]||v.config,defaultConfig:o}),customPalette:u.themePalettes[o.theme]||u.palette}:o}e.watch(()=>v.config,o=>{t.value=J(),D.value=!t.value.userOptions.showOnChartHover,L(),S.value+=1,$.value+=1,E.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:K,isImaging:Q,generatePdf:ee,generateImage:te}=ce.usePrinter({elementId:`vue-ui-circle-pack_${r.value}`,fileName:t.value.style.chart.title.text||"vue-ui-circle-pack",options:t.value.userOptions.print}),pe=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),E=e.ref({showTable:t.value.table.show}),oe=e.ref(null),w=e.ref({h:10,w:10}),le=e.ref(0),z=e.ref([0,0,100,100]),I=e.ref({h:0,w:0});async function L(){u.objectIsEmpty(v.dataset)&&u.error({componentName:"VueUiCirclePack",type:"dataset"}),_.value=await fe(R.value),k.value=de(_.value,1).join(" "),I.value=ae(c.value);const o=ve.throttle(()=>{const{width:s,height:l,heightTitle:p,heightNoTitle:g}=ve.useResponsive({chart:c.value,title:y.value,noTitle:b.value}),G=s||10,W=l&&l>10?l:10;le.value=t.value.style.chart.title.text?p:g,requestAnimationFrame(()=>{w.value.w=G,w.value.h=W-le.value,e.nextTick(async()=>{const we=R.value.map(ze=>({...ze}));_.value=await fe(we,w.value.h,w.value.w),z.value=de(_.value,1),k.value=z.value.join(" "),I.value=ae(c.value)})})});oe.value=new ResizeObserver(o),oe.value.observe(c.value.parentNode)}e.onMounted(L);function ae(o){if(!o||!o.parentElement)return console.warn("Component or parent element is missing."),{w:0,h:0};const s=o.parentElement;if(s.offsetWidth>0&&s.offsetHeight>0)return{w:s.offsetWidth,h:s.offsetHeight};const l=window.getComputedStyle(s),p=l.width,g=l.height;return p!=="auto"&&g!=="auto"&&parseFloat(p)>0&&parseFloat(g)>0?{w:parseFloat(p),h:parseFloat(g)}:{w:0,h:0}}e.watch(()=>v.dataset,async o=>{await L()},{deep:!0});const ye=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),R=e.computed(()=>v.dataset.map((o,s)=>{const l=u.convertColorToHex(o.color)||ye.value[s]||u.themePalettes[t.value.theme||"default"][s%u.themePalettes[t.value.theme||"default"].length]||u.palette[s]||u.palette[s%u.palette.length];return{...o,r:o.value,id:u.createUid(),color:l}}).filter(o=>![null,void 0,1/0,-1/0].includes(o.value))),_=e.ref([]),k=e.ref("0 0 100 100"),P=e.computed(()=>Math.max(..._.value.map(o=>o.r)));function ne(o,s){return s/P.value*o}const h=e.ref(null);function ge(o){t.value.style.chart.circles.zoom.show&&(h.value=o)}const B=e.computed(()=>h.value?h.value.r:0),H=e.computed(()=>C.value?B.value:h.value?h.value.r>z.value[3]/6*t.value.style.chart.circles.zoom.zoomRatio?h.value.r:z.value[3]/6*t.value.style.chart.circles.zoom.zoomRatio:0),x=e.ref(0),be=e.computed(()=>({pointerEvents:"none",opacity:x.value,filter:`drop-shadow(0px 0px 6px ${u.darkenHexColor(h.value.color,t.value.style.chart.circles.zoom.shadowForce)})`})),T=e.ref(B.value);e.watchEffect(()=>{T.value=B.value,x.value=0;let o=null;function s(l){o||(o=l);const p=(l-o)/t.value.style.chart.circles.zoom.animationFrameMs;p<1?(T.value=B.value+(H.value-B.value)*p,x.value=0+t.value.style.chart.circles.zoom.opacity*p,requestAnimationFrame(s)):(T.value=H.value,x.value=t.value.style.chart.circles.zoom.opacity)}requestAnimationFrame(s)});const V=e.computed(()=>({name:t.value.style.chart.circles.zoom.label.name.fontSize*z.value[3]/300,value:t.value.style.chart.circles.zoom.label.value.fontSize*z.value[3]/300}));function U(o){return u.applyDataLabel(t.value.style.chart.circles.labels.value.formatter,o.value,u.dataLabel({p:t.value.style.chart.circles.labels.value.prefix,v:o.value,s:t.value.style.chart.circles.labels.value.suffix,r:t.value.style.chart.circles.labels.value.rounding}))}function ke(){return u.applyDataLabel(t.value.style.chart.circles.zoom.label.value.formatter,h.value.value,u.dataLabel({p:t.value.style.chart.circles.zoom.label.value.prefix,v:h.value.value,s:t.value.style.chart.circles.zoom.label.value.suffix,r:t.value.style.chart.circles.zoom.label.value.rounding}))}function re(o){if(!o)return 0;const s=o.r/U(o).length*(U(o).length===1?1:2);return Math.min(o.r/2.5,s)}const O=e.ref(!1);function xe(o){O.value=o,N.value+=1}const C=e.ref(!1);function j(){C.value=!C.value}const M=e.computed(()=>{const o=R.value.map(l=>({name:l.name,value:l.value,color:l.color})).toSorted((l,p)=>p.value-l.value),s=o.map(l=>l.value);return{head:o,body:s}});function se(){e.nextTick(()=>{const o=M.value.head.map((p,g)=>[[p.name],[M.value.body[g]]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=u.createCsvContent(s);u.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-circle-pack"})})}const A=e.computed(()=>{const o=[t.value.table.columnNames.datapoint,t.value.table.columnNames.value],s=M.value.head.map((g,G)=>{const W=u.dataLabel({p:t.value.style.chart.circles.labels.value.prefix,v:M.value.body[G],s:t.value.style.chart.circles.labels.value.suffix,r:t.value.style.chart.circles.labels.value.rounding});return[{color:g.color,name:g.name},W]}),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.datapoint,t.value.table.columnNames.value],head:o,body:s,config:l}});function ue(){E.value.showTable=!E.value.showTable}function Ce(){return R.value}return d({getData:Ce,generateCsv:se,generatePdf:ee,generateImage:te,toggleTable:ue,toggleAnnotator:j}),(o,s)=>(e.openBlock(),e.createElementBlock("div",{id:`vue-ui-circle-pack_${r.value}`,class:e.normalizeClass(`vue-ui-circle-pack ${O.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"circlePackChart",ref:c,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};text-align:center;background:${t.value.style.chart.backgroundColor}; height: ${I.value.h}px; width:${I.value.w}px`),onMouseenter:s[2]||(s[2]=()=>e.unref(X)(!0)),onMouseleave:s[3]||(s[3]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Be._sfc_main,{key:0,svgRef:e.unref(Y),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,scale:P.value/100,onClose:j},null,8,["svgRef","backgroundColor","color","active","scale"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"userConfig",{},void 0,!0),pe.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:y,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(_e._sfc_main,{key:`title_${S.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&a.value&&(e.unref(Z)||e.unref(D))?(e.openBlock(),e.createBlock(ce.UserOptions,{ref:"details",key:`user_option_${N.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(K),isImaging:e.unref(Q),uid:r.value,hasTooltip:!1,hasLabel:!1,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:O.value,chartElement:c.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:xe,onGeneratePdf:e.unref(ee),onGenerateCsv:se,onGenerateImage:e.unref(te),onToggleTable:ue,onToggleAnnotator:j,style:e.normalizeStyle({visibility:e.unref(Z)?e.unref(D)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:p})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:p})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:p})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:p})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:p})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:p})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),a.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:Y,xmlns:e.unref(u.XMLNS),viewBox:k.value,height:w.value.h,width:w.value.w,class:e.normalizeClass({"vue-data-ui-fullscreen--on":O.value,"vue-data-ui-fulscreen--off":!O.value}),style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color};background:${t.value.style.chart.backgroundColor};`)},[e.createVNode($e._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:k.value.x,y:k.value.y,width:k.value.width,height:k.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Re)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:l.id,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(u.lightenHexColor)(l.color,t.value.style.chart.circles.gradient.intensity/100)},null,8,Ae),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(u.darkenHexColor)(l.color,.1)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":l.color},null,8,De)],8,Me)]),o.$slots.pattern?(e.openBlock(),e.createElementBlock("g",Le,[e.createElementVNode("defs",null,[e.renderSlot(o.$slots,"pattern",e.mergeProps({ref_for:!0},{...l,patternId:`pattern_${r.value}_${l.id}`}),void 0,!0)])])):e.createCommentVNode("",!0),e.createElementVNode("rect",{x:l.x-l.r,y:l.y-l.r,width:l.r*2,height:l.r*2,stroke:t.value.style.chart.circles.stroke,"stroke-width":t.value.style.chart.circles.strokeWidth*P.value/100,fill:t.value.style.chart.circles.gradient.show?`url(#${l.id})`:l.color,rx:l.r,onMouseenter:()=>ge(l),onMouseout:s[0]||(s[0]=p=>h.value=null),onClick:p=>f("selectDatapoint",l)},null,40,He),o.$slots.pattern?(e.openBlock(),e.createElementBlock("rect",{key:1,x:l.x-l.r,y:l.y-l.r,width:l.r*2,height:l.r*2,stroke:t.value.style.chart.circles.stroke,"stroke-width":t.value.style.chart.circles.strokeWidth*P.value/100,fill:`url(#pattern_${r.value}_${l.id})`,rx:l.r,style:{pointerEvents:"none"}},null,8,Ue)):e.createCommentVNode("",!0),o.$slots["data-label"]?e.renderSlot(o.$slots,"data-label",e.mergeProps({key:2,ref_for:!0},{...l,createTSpans:e.unref(u.createTSpans),fontSize:{name:l.r/3*t.value.style.chart.circles.labels.name.fontSizeRatio,value:re(l)*t.value.style.chart.circles.labels.value.fontSizeRatio},color:t.value.style.chart.circles.labels.name.color?t.value.style.chart.circles.labels.name.color:e.unref(u.adaptColorToBackground)(l.color)}),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.value.style.chart.circles.labels.name.show&&l.name?(e.openBlock(),e.createElementBlock("text",{key:0,style:{pointerEvents:"none",transition:"opacity 0.2s ease-in-out"},opacity:h.value&&!C.value?.2:1,x:l.x,y:l.y+ne(l.r,t.value.style.chart.circles.labels.name.offsetY)-l.r/10,"font-size":l.r/3*t.value.style.chart.circles.labels.name.fontSizeRatio,fill:t.value.style.chart.circles.labels.name.color?t.value.style.chart.circles.labels.name.color:e.unref(u.adaptColorToBackground)(l.color),"font-weight":t.value.style.chart.circles.labels.name.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(l.name),9,je)):e.createCommentVNode("",!0),t.value.style.chart.circles.labels.value.show?(e.openBlock(),e.createElementBlock("text",{key:1,style:{pointerEvents:"none",transition:"opacity 0.2s ease-in-out"},opacity:h.value&&!C.value?.2:1,x:l.x,y:l.y+ne(l.r,t.value.style.chart.circles.labels.value.offsetY)+l.r/2.5,"font-size":re(l)*t.value.style.chart.circles.labels.value.fontSizeRatio,fill:t.value.style.chart.circles.labels.value.color?t.value.style.chart.circles.labels.value.color:e.unref(u.adaptColorToBackground)(l.color),"font-weight":t.value.style.chart.circles.labels.value.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(U(l)),9,Ge)):e.createCommentVNode("",!0)],64))],64))),256)),h.value&&t.value.style.chart.circles.zoom.show&&!C.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("circle",{style:e.normalizeStyle(be.value),cx:h.value.x,cy:h.value.y,r:T.value,opacity:x.value,stroke:t.value.style.chart.circles.stroke,"stroke-width":t.value.style.chart.circles.strokeWidth*P.value/100,fill:t.value.style.chart.circles.gradient.show?`url(#${h.value.id})`:h.value.color},null,12,We),o.$slots["zoom-label"]?(e.openBlock(),e.createElementBlock("g",Ye,[e.renderSlot(o.$slots,"zoom-label",e.normalizeProps(e.guardReactiveProps({...h.value,zoomOpacity:x.value,currentRadius:T.value,fontSize:V.value})),void 0,!0)])):(e.openBlock(),e.createElementBlock("g",Xe,[e.createElementVNode("text",{style:{pointerEvents:"none"},opacity:x.value,x:h.value.x,y:h.value.y+t.value.style.chart.circles.zoom.label.name.offsetY-V.value.name/4,"text-anchor":"middle","font-size":V.value.name,fill:t.value.style.chart.circles.zoom.label.name.color?t.value.style.chart.circles.zoom.label.name.color:e.unref(u.adaptColorToBackground)(h.value.color),"font-weight":t.value.style.chart.circles.zoom.label.name.bold?"bold":"normal"},e.toDisplayString(h.value.name),9,Ze),e.createElementVNode("text",{style:{pointerEvents:"none"},opacity:x.value,x:h.value.x,y:h.value.y+V.value.value+t.value.style.chart.circles.zoom.label.value.offsetY,"text-anchor":"middle","font-size":V.value.value,fill:t.value.style.chart.circles.zoom.label.value.color?t.value.style.chart.circles.zoom.label.value.color:e.unref(u.adaptColorToBackground)(h.value.color),"font-weight":t.value.style.chart.circles.zoom.label.value.bold?"bold":"normal"},e.toDisplayString(ke()),9,Je)]))],64)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:{...k.value}},void 0,!0)],14,Ie)):e.createCommentVNode("",!0),a.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Pe.default,{key:5,config:{type:"circlePack",style:{color:"#CCCCCC"}}})),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ke,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(K)||e.unref(Q)})),void 0,!0)])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:F,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),a.value?(e.openBlock(),e.createBlock(Ne.default,{key:8,hideDetails:"",config:{open:E.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ee.DataTable,{key:`table_${$.value}`,colNames:A.value.colNames,head:A.value.head,body:A.value.body,config:A.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[1]||(s[1]=l=>E.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Qe)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Fe))}},tt=Ve._export_sfc(et,[["__scopeId","data-v-bb4f66a5"]]);exports.default=tt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-D6F-xMcR.cjs"),ie=require("./useNestedProp-CAbtwUJj.cjs"),ce=require("./usePrinter-B9NkBzf5.cjs"),_e=require("./Title-Cj4tUZSu.cjs"),Be=require("./PenAndPaper-Bnvy0XRn.cjs"),Se=require("./useUserOptionState-BgepsfED.cjs"),$e=require("./PackageVersion-CKutD59c.cjs"),Ne=require("./vue-ui-accordion-ChE9WO8Q.cjs"),Ee=require("./DataTable-Bu_0tRZE.cjs"),Pe=require("./vue-ui-skeleton-CK5DdXVo.cjs"),Te=require("./useChartAccessibility-Cm7nkzTG.cjs"),ve=require("./useResponsive-DQmBAoBf.cjs"),Ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function de(i,d=0){const m=i.reduce((a,{x:r,r:c})=>Math.min(a,r-c-d),1/0),v=i.reduce((a,{x:r,r:c})=>Math.max(a,r+c+d),-1/0),f=i.reduce((a,{y:r,r:c})=>Math.min(a,r-c-d),1/0),n=i.reduce((a,{y:r,r:c})=>Math.max(a,r+c+d),-1/0);return[m,f,v-m,n-f]}function Oe(i,d,m){const v=i._,f=i.next._,n=v.r+f.r,a=(v.x*f.r+f.x*v.r)/n,r=(v.y*f.r+f.y*v.r)/n;return Math.max(Math.abs(a*m),Math.abs(r*d))}function fe(i,d,m){const v=Oe,f=i.length;if(!f)return i;let n,a,r;if(n=i[0],n.x=0,n.y=0,!(f>1)||(a=i[1],n.x=-a.r,a.x=n.r,a.y=0,!(f>2)))return i;he(a,n,r=i[2]),n=new q(n),a=new q(a),r=new q(r),n.next=r.previous=a,a.next=n.previous=r,r.next=a.previous=n;e:for(let c=3;c<f;++c){he(n._,a._,r=i[c]),r=new q(r);let y=a.next,b=n.previous,S=a._.r,$=n._.r;do if(S<=$){if(me(y._,r._)){a=y,n.next=a,a.previous=n,--c;continue e}S+=y._.r,y=y.next}else{if(me(b._,r._)){n=b,n.next=a,a.previous=n,--c;continue e}$+=b._.r,b=b.previous}while(y!==b.next);r.previous=n,r.next=a,n.next=a.previous=a=r;let N=v(n,m,d),F;for(;(r=r.next)!==a;)(F=v(r,m,d))<N&&(n=r,N=F);a=n.next}return i}function he(i,d,m){const v=i.x-d.x,f=i.y-d.y,n=v*v+f*f;if(n){const a=(d.r+m.r)**2,r=(i.r+m.r)**2;if(a>r){const c=(n+r-a)/(2*n),y=Math.sqrt(Math.max(0,r/n-c*c));m.x=i.x-c*v-y*f,m.y=i.y-c*f+y*v}else{const c=(n+a-r)/(2*n),y=Math.sqrt(Math.max(0,a/n-c*c));m.x=d.x+c*v-y*f,m.y=d.y+c*f+y*v}}else m.x=d.x+m.r,m.y=d.y}function me(i,d){const m=i.r+d.r-1e-6,v=d.x-i.x,f=d.y-i.y;return m>0&&m*m>v*v+f*f}class q{constructor(d){this._=d,this.next=null,this.previous=null}}const Fe=["id"],Ie=["xmlns","viewBox","height","width"],Re=["x","y","width","height"],Me=["id"],Ae=["stop-color"],qe=["stop-color"],De=["stop-color"],Le={key:0},He=["x","y","width","height","stroke","stroke-width","fill","rx","onMouseenter","onClick"],Ue=["x","y","width","height","stroke","stroke-width","fill","rx"],je=["opacity","x","y","font-size","fill","font-weight"],Ge=["opacity","x","y","font-size","fill","font-weight"],We=["cx","cy","r","opacity","stroke","stroke-width","fill"],Ye={key:0,style:{pointerEvents:"none"}},Xe={key:1},Ze=["opacity","x","y","font-size","fill","font-weight"],Je=["opacity","x","y","font-size","fill","font-weight"],Ke={key:6,class:"vue-data-ui-watermark"},Qe=["innerHTML"],et={__name:"vue-ui-circle-pack",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(i,{expose:d,emit:m}){e.useCssVars(o=>({cf72f1fe:B.value,"4e89318c":H.value}));const v=i,f=m,{vue_ui_circle_pack:n}=u.useConfig(),a=e.computed(()=>!!v.dataset&&v.dataset.length),r=e.ref(u.createUid()),c=e.ref(null),y=e.ref(null),b=e.ref(null),S=e.ref(0),$=e.ref(0),N=e.ref(0),F=e.ref(null),t=e.computed({get:()=>J(),set:o=>o}),{svgRef:Y}=Te.useChartAccessibility({config:t.value.style.chart.title}),{userOptionsVisible:D,setUserOptionsVisibility:X,keepUserOptionState:Z}=Se.useUserOptionState({config:t.value});function J(){const o=ie.useNestedProp({userConfig:v.config,defaultConfig:n});return o.theme?{...ie.useNestedProp({userConfig:u.themes.vue_ui_circle_pack[o.theme]||v.config,defaultConfig:o}),customPalette:u.themePalettes[o.theme]||u.palette}:o}e.watch(()=>v.config,o=>{t.value=J(),D.value=!t.value.userOptions.showOnChartHover,L(),S.value+=1,$.value+=1,E.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:K,isImaging:Q,generatePdf:ee,generateImage:te}=ce.usePrinter({elementId:`vue-ui-circle-pack_${r.value}`,fileName:t.value.style.chart.title.text||"vue-ui-circle-pack",options:t.value.userOptions.print}),pe=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),E=e.ref({showTable:t.value.table.show}),oe=e.ref(null),w=e.ref({h:10,w:10}),le=e.ref(0),z=e.ref([0,0,100,100]),I=e.ref({h:0,w:0});async function L(){u.objectIsEmpty(v.dataset)&&u.error({componentName:"VueUiCirclePack",type:"dataset"}),_.value=await fe(R.value),k.value=de(_.value,1).join(" "),I.value=ae(c.value);const o=ve.throttle(()=>{const{width:s,height:l,heightTitle:p,heightNoTitle:g}=ve.useResponsive({chart:c.value,title:y.value,noTitle:b.value}),G=s||10,W=l&&l>10?l:10;le.value=t.value.style.chart.title.text?p:g,requestAnimationFrame(()=>{w.value.w=G,w.value.h=W-le.value,e.nextTick(async()=>{const we=R.value.map(ze=>({...ze}));_.value=await fe(we,w.value.h,w.value.w),z.value=de(_.value,1),k.value=z.value.join(" "),I.value=ae(c.value)})})});oe.value=new ResizeObserver(o),oe.value.observe(c.value.parentNode)}e.onMounted(L);function ae(o){if(!o||!o.parentElement)return console.warn("Component or parent element is missing."),{w:0,h:0};const s=o.parentElement;if(s.offsetWidth>0&&s.offsetHeight>0)return{w:s.offsetWidth,h:s.offsetHeight};const l=window.getComputedStyle(s),p=l.width,g=l.height;return p!=="auto"&&g!=="auto"&&parseFloat(p)>0&&parseFloat(g)>0?{w:parseFloat(p),h:parseFloat(g)}:{w:0,h:0}}e.watch(()=>v.dataset,async o=>{await L()},{deep:!0});const ye=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),R=e.computed(()=>v.dataset.map((o,s)=>{const l=u.convertColorToHex(o.color)||ye.value[s]||u.themePalettes[t.value.theme||"default"][s%u.themePalettes[t.value.theme||"default"].length]||u.palette[s]||u.palette[s%u.palette.length];return{...o,r:o.value,id:u.createUid(),color:l}}).filter(o=>![null,void 0,1/0,-1/0].includes(o.value))),_=e.ref([]),k=e.ref("0 0 100 100"),P=e.computed(()=>Math.max(..._.value.map(o=>o.r)));function ne(o,s){return s/P.value*o}const h=e.ref(null);function ge(o){t.value.style.chart.circles.zoom.show&&(h.value=o)}const B=e.computed(()=>h.value?h.value.r:0),H=e.computed(()=>C.value?B.value:h.value?h.value.r>z.value[3]/6*t.value.style.chart.circles.zoom.zoomRatio?h.value.r:z.value[3]/6*t.value.style.chart.circles.zoom.zoomRatio:0),x=e.ref(0),be=e.computed(()=>({pointerEvents:"none",opacity:x.value,filter:`drop-shadow(0px 0px 6px ${u.darkenHexColor(h.value.color,t.value.style.chart.circles.zoom.shadowForce)})`})),T=e.ref(B.value);e.watchEffect(()=>{T.value=B.value,x.value=0;let o=null;function s(l){o||(o=l);const p=(l-o)/t.value.style.chart.circles.zoom.animationFrameMs;p<1?(T.value=B.value+(H.value-B.value)*p,x.value=0+t.value.style.chart.circles.zoom.opacity*p,requestAnimationFrame(s)):(T.value=H.value,x.value=t.value.style.chart.circles.zoom.opacity)}requestAnimationFrame(s)});const V=e.computed(()=>({name:t.value.style.chart.circles.zoom.label.name.fontSize*z.value[3]/300,value:t.value.style.chart.circles.zoom.label.value.fontSize*z.value[3]/300}));function U(o){return u.applyDataLabel(t.value.style.chart.circles.labels.value.formatter,o.value,u.dataLabel({p:t.value.style.chart.circles.labels.value.prefix,v:o.value,s:t.value.style.chart.circles.labels.value.suffix,r:t.value.style.chart.circles.labels.value.rounding}))}function ke(){return u.applyDataLabel(t.value.style.chart.circles.zoom.label.value.formatter,h.value.value,u.dataLabel({p:t.value.style.chart.circles.zoom.label.value.prefix,v:h.value.value,s:t.value.style.chart.circles.zoom.label.value.suffix,r:t.value.style.chart.circles.zoom.label.value.rounding}))}function re(o){if(!o)return 0;const s=o.r/U(o).length*(U(o).length===1?1:2);return Math.min(o.r/2.5,s)}const O=e.ref(!1);function xe(o){O.value=o,N.value+=1}const C=e.ref(!1);function j(){C.value=!C.value}const M=e.computed(()=>{const o=R.value.map(l=>({name:l.name,value:l.value,color:l.color})).toSorted((l,p)=>p.value-l.value),s=o.map(l=>l.value);return{head:o,body:s}});function se(){e.nextTick(()=>{const o=M.value.head.map((p,g)=>[[p.name],[M.value.body[g]]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=u.createCsvContent(s);u.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-circle-pack"})})}const A=e.computed(()=>{const o=[t.value.table.columnNames.datapoint,t.value.table.columnNames.value],s=M.value.head.map((g,G)=>{const W=u.dataLabel({p:t.value.style.chart.circles.labels.value.prefix,v:M.value.body[G],s:t.value.style.chart.circles.labels.value.suffix,r:t.value.style.chart.circles.labels.value.rounding});return[{color:g.color,name:g.name},W]}),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.datapoint,t.value.table.columnNames.value],head:o,body:s,config:l}});function ue(){E.value.showTable=!E.value.showTable}function Ce(){return R.value}return d({getData:Ce,generateCsv:se,generatePdf:ee,generateImage:te,toggleTable:ue,toggleAnnotator:j}),(o,s)=>(e.openBlock(),e.createElementBlock("div",{id:`vue-ui-circle-pack_${r.value}`,class:e.normalizeClass(`vue-ui-circle-pack ${O.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"circlePackChart",ref:c,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};text-align:center;background:${t.value.style.chart.backgroundColor}; height: ${I.value.h}px; width:${I.value.w}px`),onMouseenter:s[2]||(s[2]=()=>e.unref(X)(!0)),onMouseleave:s[3]||(s[3]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Be._sfc_main,{key:0,svgRef:e.unref(Y),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,scale:P.value/100,onClose:j},null,8,["svgRef","backgroundColor","color","active","scale"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"userConfig",{},void 0,!0),pe.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:y,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(_e._sfc_main,{key:`title_${S.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&a.value&&(e.unref(Z)||e.unref(D))?(e.openBlock(),e.createBlock(ce.UserOptions,{ref:"details",key:`user_option_${N.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(K),isImaging:e.unref(Q),uid:r.value,hasTooltip:!1,hasLabel:!1,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:O.value,chartElement:c.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:xe,onGeneratePdf:e.unref(ee),onGenerateCsv:se,onGenerateImage:e.unref(te),onToggleTable:ue,onToggleAnnotator:j,style:e.normalizeStyle({visibility:e.unref(Z)?e.unref(D)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:p})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:p})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:p})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:p})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:p})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:p})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),a.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:Y,xmlns:e.unref(u.XMLNS),viewBox:k.value,height:w.value.h,width:w.value.w,class:e.normalizeClass({"vue-data-ui-fullscreen--on":O.value,"vue-data-ui-fulscreen--off":!O.value}),style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color};background:${t.value.style.chart.backgroundColor};`)},[e.createVNode($e._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:k.value.x,y:k.value.y,width:k.value.width,height:k.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Re)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:l.id,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(u.lightenHexColor)(l.color,t.value.style.chart.circles.gradient.intensity/100)},null,8,Ae),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(u.darkenHexColor)(l.color,.1)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":l.color},null,8,De)],8,Me)]),o.$slots.pattern?(e.openBlock(),e.createElementBlock("g",Le,[e.createElementVNode("defs",null,[e.renderSlot(o.$slots,"pattern",e.mergeProps({ref_for:!0},{...l,patternId:`pattern_${r.value}_${l.id}`}),void 0,!0)])])):e.createCommentVNode("",!0),e.createElementVNode("rect",{x:l.x-l.r,y:l.y-l.r,width:l.r*2,height:l.r*2,stroke:t.value.style.chart.circles.stroke,"stroke-width":t.value.style.chart.circles.strokeWidth*P.value/100,fill:t.value.style.chart.circles.gradient.show?`url(#${l.id})`:l.color,rx:l.r,onMouseenter:()=>ge(l),onMouseout:s[0]||(s[0]=p=>h.value=null),onClick:p=>f("selectDatapoint",l)},null,40,He),o.$slots.pattern?(e.openBlock(),e.createElementBlock("rect",{key:1,x:l.x-l.r,y:l.y-l.r,width:l.r*2,height:l.r*2,stroke:t.value.style.chart.circles.stroke,"stroke-width":t.value.style.chart.circles.strokeWidth*P.value/100,fill:`url(#pattern_${r.value}_${l.id})`,rx:l.r,style:{pointerEvents:"none"}},null,8,Ue)):e.createCommentVNode("",!0),o.$slots["data-label"]?e.renderSlot(o.$slots,"data-label",e.mergeProps({key:2,ref_for:!0},{...l,createTSpans:e.unref(u.createTSpans),fontSize:{name:l.r/3*t.value.style.chart.circles.labels.name.fontSizeRatio,value:re(l)*t.value.style.chart.circles.labels.value.fontSizeRatio},color:t.value.style.chart.circles.labels.name.color?t.value.style.chart.circles.labels.name.color:e.unref(u.adaptColorToBackground)(l.color)}),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.value.style.chart.circles.labels.name.show&&l.name?(e.openBlock(),e.createElementBlock("text",{key:0,style:{pointerEvents:"none",transition:"opacity 0.2s ease-in-out"},opacity:h.value&&!C.value?.2:1,x:l.x,y:l.y+ne(l.r,t.value.style.chart.circles.labels.name.offsetY)-l.r/10,"font-size":l.r/3*t.value.style.chart.circles.labels.name.fontSizeRatio,fill:t.value.style.chart.circles.labels.name.color?t.value.style.chart.circles.labels.name.color:e.unref(u.adaptColorToBackground)(l.color),"font-weight":t.value.style.chart.circles.labels.name.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(l.name),9,je)):e.createCommentVNode("",!0),t.value.style.chart.circles.labels.value.show?(e.openBlock(),e.createElementBlock("text",{key:1,style:{pointerEvents:"none",transition:"opacity 0.2s ease-in-out"},opacity:h.value&&!C.value?.2:1,x:l.x,y:l.y+ne(l.r,t.value.style.chart.circles.labels.value.offsetY)+l.r/2.5,"font-size":re(l)*t.value.style.chart.circles.labels.value.fontSizeRatio,fill:t.value.style.chart.circles.labels.value.color?t.value.style.chart.circles.labels.value.color:e.unref(u.adaptColorToBackground)(l.color),"font-weight":t.value.style.chart.circles.labels.value.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(U(l)),9,Ge)):e.createCommentVNode("",!0)],64))],64))),256)),h.value&&t.value.style.chart.circles.zoom.show&&!C.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("circle",{style:e.normalizeStyle(be.value),cx:h.value.x,cy:h.value.y,r:T.value,opacity:x.value,stroke:t.value.style.chart.circles.stroke,"stroke-width":t.value.style.chart.circles.strokeWidth*P.value/100,fill:t.value.style.chart.circles.gradient.show?`url(#${h.value.id})`:h.value.color},null,12,We),o.$slots["zoom-label"]?(e.openBlock(),e.createElementBlock("g",Ye,[e.renderSlot(o.$slots,"zoom-label",e.normalizeProps(e.guardReactiveProps({...h.value,zoomOpacity:x.value,currentRadius:T.value,fontSize:V.value})),void 0,!0)])):(e.openBlock(),e.createElementBlock("g",Xe,[e.createElementVNode("text",{style:{pointerEvents:"none"},opacity:x.value,x:h.value.x,y:h.value.y+t.value.style.chart.circles.zoom.label.name.offsetY-V.value.name/4,"text-anchor":"middle","font-size":V.value.name,fill:t.value.style.chart.circles.zoom.label.name.color?t.value.style.chart.circles.zoom.label.name.color:e.unref(u.adaptColorToBackground)(h.value.color),"font-weight":t.value.style.chart.circles.zoom.label.name.bold?"bold":"normal"},e.toDisplayString(h.value.name),9,Ze),e.createElementVNode("text",{style:{pointerEvents:"none"},opacity:x.value,x:h.value.x,y:h.value.y+V.value.value+t.value.style.chart.circles.zoom.label.value.offsetY,"text-anchor":"middle","font-size":V.value.value,fill:t.value.style.chart.circles.zoom.label.value.color?t.value.style.chart.circles.zoom.label.value.color:e.unref(u.adaptColorToBackground)(h.value.color),"font-weight":t.value.style.chart.circles.zoom.label.value.bold?"bold":"normal"},e.toDisplayString(ke()),9,Je)]))],64)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:{...k.value}},void 0,!0)],14,Ie)):e.createCommentVNode("",!0),a.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Pe.default,{key:5,config:{type:"circlePack",style:{color:"#CCCCCC"}}})),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ke,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(K)||e.unref(Q)})),void 0,!0)])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:F,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),a.value?(e.openBlock(),e.createBlock(Ne.default,{key:8,hideDetails:"",config:{open:E.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ee.DataTable,{key:`table_${$.value}`,colNames:A.value.colNames,head:A.value.head,body:A.value.body,config:A.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[1]||(s[1]=l=>E.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Qe)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Fe))}},tt=Ve._export_sfc(et,[["__scopeId","data-v-bb4f66a5"]]);exports.default=tt;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),y=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),y=require("./useNestedProp-CAbtwUJj.cjs"),i=require("./index-D6F-xMcR.cjs"),C=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),_=["xmlns","height","width"],p={id:"follower",fy:"30%",fx:"30%"},x=["stop-color","stop-opacity"],E=["r","fill","stroke","stroke-width","stroke-dasharray"],N=["r"],g={key:2,class:"wave"},V=["id"],w=["id"],S=["filter","stroke"],B={key:3,class:"crosshair"},R=["x1","stroke","stroke-width","stroke-dasharray"],b=["x1","stroke","stroke-width","stroke-dasharray"],F=["y1","stroke","stroke-width","stroke-dasharray"],z=["y1","stroke","stroke-width","stroke-dasharray"],L=["cy","r","fill"],O=["cy","r","fill"],I=["cx","r","fill"],T=["cx","r","fill"],D={key:5,class:"coordinates"},$=["x","y","font-size","fill"],W=["transform"],G=["font-size","fill"],P={__name:"vue-ui-cursor",props:{config:{type:Object,default:{}}},setup(f){const{vue_ui_cursor:h}=i.useConfig(),k=f,n=t.ref(i.createUid()),e=t.computed(()=>y.useNestedProp({userConfig:k.config,defaultConfig:h})),o=t.ref({x:-100,y:-100});function u({clientX:r,clientY:l,...A}){o.value.x=r-e.value.centerCircleRadius,o.value.y=l-e.value.centerCircleRadius}function d(r){o.value.x=r.targetTouches[0].clientX-e.value.centerCircleRadius,o.value.y=r.targetTouches[0].clientY-e.value.centerCircleRadius}const v=t.ref(!0);function a(r){v.value=r}const s=t.ref(!1),c=t.ref(null);function m(){s.value=!1,c.value&&clearTimeout(c.value),t.nextTick(()=>{s.value=!0,c.value=setTimeout(()=>{s.value=!1},1e3)})}return t.onMounted(()=>{const r=e.value.parentId?document.getElementById(e.value.parentId):document.getElementsByTagName("div")[0];r.addEventListener("mousemove",u),r.addEventListener("touchmove",d),r.addEventListener("mouseleave",()=>a(!1)),r.addEventListener("mouseenter",()=>a(!0)),r.addEventListener("click",m)}),t.onBeforeUnmount(()=>{const r=e.value.parentId?document.getElementById(e.value.parentId):document.getElementsByTagName("div")[0];r.removeEventListener("mousemove",u),r.removeEventListener("touchmove",d),r.removeEventListener("mouseleave",()=>a(!1)),r.removeEventListener("mouseenter",()=>a(!0)),r.removeEventListener("click",m)}),t.computed(()=>e.value.centerCircleRadius/2.5),(r,l)=>v.value?(t.openBlock(),t.createElementBlock("svg",{key:0,"data-dom-to-png-ignore":"",xmlns:t.unref(i.XMLNS),style:t.normalizeStyle(`z-index: 2147483647; overflow: visible; pointer-events: none;background: transparent; position:fixed; top:${o.value.y}px; left:${o.value.x}px;`),viewBox:"0 0 100 100",height:e.value.centerCircleRadius*2,width:e.value.centerCircleRadius*2},[t.createElementVNode("defs",null,[t.createElementVNode("radialGradient",p,[t.createElementVNode("stop",{offset:"10%","stop-color":e.value.bubbleEffectColor,"stop-opacity":e.value.bubbleEffectOpacity},null,8,x),l[0]||(l[0]=t.createElementVNode("stop",{offset:"95%","stop-color":"transparent"},null,-1))])]),e.value.showCenterCircle?(t.openBlock(),t.createElementBlock("circle",{key:0,cx:50,cy:50,r:e.value.centerCircleRadius,fill:t.unref(i.setOpacity)(e.value.centerCircleColor,e.value.centerCircleOpacity*100),stroke:e.value.centerCircleStroke,"stroke-width":e.value.centerCircleStrokeWidth,"stroke-dasharray":e.value.centerCircleDasharray},null,8,E)):t.createCommentVNode("",!0),e.value.bubbleEffect?(t.openBlock(),t.createElementBlock("circle",{key:1,cx:50,cy:50,r:e.value.centerCircleRadius,fill:"url(#follower)",stroke:"none"},null,8,N)):t.createCommentVNode("",!0),e.value.useWaveOnClick?(t.openBlock(),t.createElementBlock("g",g,[t.createElementVNode("defs",null,[t.createElementVNode("filter",{id:`blur_${n.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[t.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:4,id:`blur_std_${n.value}`},null,8,w),l[1]||(l[1]=t.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1))],8,V)]),s.value?(t.openBlock(),t.createElementBlock("circle",{key:0,class:t.normalizeClass({"circle-wave":s.value}),cx:50,cy:50,r:50,filter:`url(#blur_${n.value})`,stroke:e.value.centerCircleStroke,fill:"none","stroke-width":"3"},null,10,S)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.value.showCrosshair?(t.openBlock(),t.createElementBlock("g",B,[t.createElementVNode("line",{x1:-e.value.centerCircleRadius+50,x2:-5e3,y1:50,y2:50,stroke:e.value.crosshairStroke,"stroke-width":e.value.crosshairStrokeWidth,"stroke-dasharray":e.value.crosshairDasharray,"stroke-linecap":"round"},null,8,R),t.createElementVNode("line",{x1:50+e.value.centerCircleRadius,x2:5e3,y1:50,y2:50,stroke:e.value.crosshairStroke,"stroke-width":e.value.crosshairStrokeWidth,"stroke-dasharray":e.value.crosshairDasharray,"stroke-linecap":"round"},null,8,b),t.createElementVNode("line",{x1:50,x2:50,y1:-e.value.centerCircleRadius+50,y2:-5e3,stroke:e.value.crosshairStroke,"stroke-width":e.value.crosshairStrokeWidth,"stroke-dasharray":e.value.crosshairDasharray,"stroke-linecap":"round"},null,8,F),t.createElementVNode("line",{x1:50,x2:50,y1:e.value.centerCircleRadius+50,y2:5e3,stroke:e.value.crosshairStroke,"stroke-width":e.value.crosshairStrokeWidth,"stroke-dasharray":e.value.crosshairDasharray,"stroke-linecap":"round"},null,8,z)])):t.createCommentVNode("",!0),e.value.showIntersectCircles?(t.openBlock(),t.createElementBlock("g",{key:4,class:t.normalizeClass({"rotating-circles":e.value.isLoading})},[t.createElementVNode("circle",{cx:50,cy:e.value.centerCircleRadius+50,r:e.value.intersectCirclesRadius,fill:e.value.intersectCirclesFill},null,8,L),t.createElementVNode("circle",{cx:50,cy:-e.value.centerCircleRadius+50,r:e.value.intersectCirclesRadius,fill:e.value.intersectCirclesFill},null,8,O),t.createElementVNode("circle",{cx:-e.value.centerCircleRadius+50,cy:50,r:e.value.intersectCirclesRadius,fill:e.value.intersectCirclesFill},null,8,I),t.createElementVNode("circle",{cx:e.value.centerCircleRadius+50,cy:50,r:e.value.intersectCirclesRadius,fill:e.value.intersectCirclesFill},null,8,T)],2)):t.createCommentVNode("",!0),e.value.showCoordinates?(t.openBlock(),t.createElementBlock("g",D,[t.createElementVNode("text",{"text-anchor":"end",x:-e.value.centerCircleRadius+50-e.value.coordinatesFontSize/2+e.value.coordinatesOffset,y:50-e.value.coordinatesFontSize/2+e.value.coordinatesOffset,"font-size":e.value.coordinatesFontSize,fill:e.value.coordinatesColor,style:{"font-variant-numeric":"tabular-nums"},"font-family":"Arial"},t.toDisplayString(o.value.x.toFixed(0)),9,$),t.createElementVNode("g",{transform:`translate(${50-e.value.coordinatesFontSize/2+e.value.coordinatesOffset}, ${-e.value.centerCircleRadius+50-e.value.coordinatesFontSize/2+e.value.coordinatesOffset})`},[t.createElementVNode("text",{"text-anchor":"start","font-size":e.value.coordinatesFontSize,fill:e.value.coordinatesColor,style:{"font-variant-numeric":"tabular-nums"},transform:"rotate(-90)","font-family":"Arial"},t.toDisplayString(o.value.y.toFixed(0)),9,G)],8,W)])):t.createCommentVNode("",!0)],12,_)):t.createCommentVNode("",!0)}},q=C._export_sfc(P,[["__scopeId","data-v-e07e5d09"]]);exports.default=q;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as c, computed as _, onMounted as R, onBeforeUnmount as S, createElementBlock as l, createCommentVNode as o, openBlock as i, normalizeStyle as E, unref as m, createElementVNode as r, normalizeClass as C, toDisplayString as p, nextTick as b } from "vue";
|
|
2
|
-
import { u as F } from "./useNestedProp-
|
|
3
|
-
import { u as L, c as z, X as O, s as I } from "./index-
|
|
2
|
+
import { u as F } from "./useNestedProp-DlWfv-mw.js";
|
|
3
|
+
import { u as L, c as z, X as O, s as I } from "./index-D2h9qRb4.js";
|
|
4
4
|
import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const N = ["xmlns", "height", "width"], T = {
|
|
6
6
|
id: "follower",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),Q=require("./pdf-BO4SP770.cjs"),K=require("./useNestedProp-DWYmdrE5.cjs"),S=require("./index-CLiv4lWF.cjs"),J=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Z={key:0,"data-dom-to-png-ignore":"",style:{width:"100%",display:"flex","justify-content":"end"}},ee=["disabled"],oe=["stroke"],ne={key:1},te=["id"],re=["onMousedown","onTouchstart"],ie=["onMousedown","onTouchstart"],ue=["onMousedown","onTouchstart"],se=["onMousedown","onTouchstart"],le=["onMousedown","onTouchstart"],A=1,ae={__name:"vue-ui-dashboard",props:{dataset:Array,config:Object},emits:["change"],setup(B,{expose:E,emit:z}){e.useCssVars(o=>({"3d03b7eb":R.value,"5286e662":L.value}));const N={VueDataUi:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-data-ui-BGjhB0IM.cjs"))),VueUi3dBar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-3d-bar-eQPQ37P9.cjs"))),VueUiAccordion:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-accordion-DQ-y4bL8.cjs"))),VueUiAgePyramid:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-age-pyramid-BKcb5h0_.cjs"))),VueUiAnnotator:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-annotator-BnfB4-1v.cjs"))),VueUiCandlestick:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-candlestick-CP-TFhQo.cjs"))),VueUiChestnut:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-chestnut-De2g4Q2p.cjs"))),VueUiDigits:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-digits-D9COqRtQ.cjs"))),VueUiDonut:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-donut-snJ23_B8.cjs"))),VueUiDonutEvolution:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-donut-evolution-t8NE1QRt.cjs"))),VueUiDumbbell:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-dumbbell-BItso2iE.cjs"))),VueUiFlow:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-flow-DZrVpkqa.cjs"))),VueUiGalaxy:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-galaxy-BzfQwtb7.cjs"))),VueUiGauge:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-gauge-BOmHo3_2.cjs"))),VueUiHeatmap:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-heatmap-CfeV2PVZ.cjs"))),VueUiKpi:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-kpi-CL1YEty9.cjs"))),VueUiMiniLoader:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-mini-loader-sEeyMkrd.cjs"))),VueUiMolecule:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-molecule-CRnMyuuZ.cjs"))),VueUiMoodRadar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-mood-radar-lnAFfrjE.cjs"))),VueUiNestedDonuts:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-nested-donuts-CeuU6oEJ.cjs"))),VueUiOnion:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-onion-WwdP8EpV.cjs"))),VueUiParallelCoordinatePlot:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-parallel-coordinate-plot-Cv68PCn5.cjs"))),VueUiQuadrant:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-quadrant-DZ6ybcaY.cjs"))),VueUiQuickChart:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-quick-chart-DJa7vHnr.cjs"))),VueUiRadar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-radar-DJQ9V5u3.cjs"))),VueUiRating:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-rating-DJ8riM4Y.cjs"))),VueUiRelationCircle:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-relation-circle-CNmTYbJn.cjs"))),VueUiRings:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-rings-CLex25i0.cjs"))),VueUiScatter:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-scatter-CSsBerNk.cjs"))),VueUiSkeleton:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-skeleton-3odYNTi5.cjs"))),VueUiSmiley:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-smiley-DAbOc9Sm.cjs"))),VueUiSparkHistogram:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-sparkhistogram-U__aSGYT.cjs"))),VueUiSparkStackbar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-sparkstackbar-BrBQ2Vby.cjs"))),VueUiSparkTrend:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-spark-trend-CRKk0fMc.cjs"))),VueUiSparkbar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-sparkbar-CCZDQYle.cjs"))),VueUiSparkgauge:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-sparkgauge-CrirH2LX.cjs"))),VueUiSparkline:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-sparkline-BHiVgcfL.cjs"))),VueUiStripPlot:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-strip-plot-hNrBW3SU.cjs"))),VueUiTable:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-table-ByDKzqNM.cjs"))),VueUiTableHeatmap:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-table-heatmap-DaEPU0kc.cjs"))),VueUiTableSparkline:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-table-sparkline-BgV9zEpQ.cjs"))),VueUiThermometer:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-thermometer-HB6BdSZ7.cjs"))),VueUiTimer:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-timer-6NZga1VA.cjs"))),VueUiTiremarks:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-tiremarks-Bssfpj2T.cjs"))),VueUiTreemap:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-treemap-X9VKUYSw.cjs"))),VueUiVerticalBar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-vertical-bar-Bv35bg1C.cjs"))),VueUiWaffle:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-waffle-C1L34KiX.cjs"))),VueUiWheel:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-wheel-D2HqXb2O.cjs"))),VueUiWordCloud:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-word-cloud-Cmm3wp39.cjs"))),VueUiXy:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-xy-BxJgh4xL.cjs"))),VueUiXyCanvas:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-xy-canvas-DbS90DFy.cjs"))),VueUiCarouselTable:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-carousel-table-B5FwZhGC.cjs"))),VueUiGizmo:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-gizmo-CdBHJhKH.cjs"))),VueUiStackbar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-stackbar-D7htqdCz.cjs"))),VueUiBullet:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-bullet-D3wD3j73.cjs"))),VueUiFunnel:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-funnel-P6dph9rO.cjs"))),VueUiHistoryPlot:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-history-plot-BwmxWdM2.cjs"))),VueUiCirclePack:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-circle-pack-BRLoGdmB.cjs"))),VueUiWorld:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-world-Bi32aYtK.cjs")))},{vue_ui_dashboard:x}=S.useConfig(),q=B,l=e.computed(()=>K.useNestedProp({userConfig:q.config,defaultConfig:x})),U=e.ref(S.createUid()),d=e.ref(l.value.locked);function $(){d.value=!d.value}const s=e.ref(q.dataset.map((o,n)=>({...o,index:n}))),k=e.computed(()=>s.value.map(o=>({...o,resolvedComponent:typeof o.component=="string"?N[o.component]:o.component}))),h=e.ref(null),u=e.ref(null),v=e.ref({x:0,y:0}),f=e.ref({x:0,y:0}),a=e.ref(null),c=e.ref(!1),m=e.ref(null),C=e.ref(!1),y=e.ref(!1);function w(o){const n=o.target;(n.tagName==="INPUT"&&n.type==="range"||n.classList.contains("range-handle"))&&(y.value=!0)}function T(o){const n=o.target;n.tagName==="INPUT"&&n.type==="range"&&(y.value=!1)}function M(){C.value=!0,Q.default({domElement:document.getElementById(`vue-ui-dashboard_${U.value}`),fileName:"vue-ui-dashboard"}).finally(()=>{C.value=!1})}function D(o){if(!d.value&&(c.value=!0,m.value=o,u.value===null)){h.value=o,v.value={x:event.clientX,y:event.clientY};const n=s.value[o],r=100-n.width,t=100-n.height;n.left<0&&(n.left=0),n.top<0&&(n.top=0),n.left>r&&(n.left=r),n.top>t&&(n.top=t),n.left<0&&(n.left=0),n.top<0&&(n.top=0),n.left+n.width>100&&(n.left=100-n.width),n.top+n.height>100&&(n.top=100-n.height)}}function P(o,n){c.value=!0,m.value=o,u.value={index:o,direction:n};const r=s.value[o];f.value={x:event.clientX,y:event.clientY,initialWidth:r.width,initialHeight:r.height}}function _(o,n,r){if(u.value.direction.includes("top")){const t=o.height-r/a.value.offsetHeight*100;t>=A&&(o.top+=r/a.value.offsetHeight*100,o.height=t)}if(u.value.direction.includes("bottom")){const t=o.height+r/a.value.offsetHeight*100;t>=A&&(o.height=t)}if(u.value.direction.includes("left")){const t=o.width-n/a.value.offsetWidth*100;t>=A&&(o.left+=n/a.value.offsetWidth*100,o.width=t)}if(u.value.direction.includes("right")){const t=o.width+n/a.value.offsetWidth*100;t>=A&&(o.width=t)}}function H(o){if(!(d.value||y.value)){if(c.value=!0,h.value!==null){const n=s.value[h.value],r=o.clientX-v.value.x,t=o.clientY-v.value.y,i=n.left+r/a.value.offsetWidth*100,p=n.top+t/a.value.offsetHeight*100;i>=0&&p>=0&&i+n.width<=100&&p+n.height<=100&&(n.left=i,n.top=p),v.value={x:o.clientX,y:o.clientY}}if(u.value!==null){const n=s.value[u.value.index],r=o.clientX-f.value.x,t=o.clientY-f.value.y;_(n,r,t),f.value={x:o.clientX,y:o.clientY}}}}const X=z;e.watch(s,o=>{o&&!c.value&&X("change",s.value)},{deep:!0});function I(){h.value=null,u.value=null,c.value=!1,m.value=null,s.value.forEach(o=>{o.left=Math.round(o.left/100*100),o.top=Math.round(o.top/100*100),o.width=Math.round(o.width/100*100),o.height=Math.round(o.height/100*100)})}function Y(o){d.value||y.value||(c.value=!0,m.value=o,u.value===null&&(h.value=o,v.value={x:event.touches[0].clientX,y:event.touches[0].clientY}))}function V(o,n,r){if(c.value=!0,m.value=o,u.value===null){u.value={index:o,direction:n};const t=s.value[o];f.value={x:r.touches[0].clientX,y:r.touches[0].clientY,initialWidth:t.width,initialHeight:t.height}}}function b(o){if(c.value=!0,o.preventDefault(),u.value!==null){const n=s.value[u.value.index],r=o.touches[0].clientX-f.value.x,t=o.touches[0].clientY-f.value.y;_(n,r,t),f.value={x:o.touches[0].clientX,y:o.touches[0].clientY}}}function W(o){if(!(d.value||y.value)&&(c.value=!0,o.preventDefault(),h.value!==null)){const n=s.value[h.value],r=o.touches[0].clientX-v.value.x,t=o.touches[0].clientY-v.value.y,i=n.left+r/a.value.offsetWidth*100,p=n.top+t/a.value.offsetHeight*100;i>=0&&p>=0&&i+n.width<=100&&p+n.height<=100&&(n.left=i,n.top=p),v.value={x:o.touches[0].clientX,y:o.touches[0].clientY}}}function g(){c.value=!1,m.value=null,h.value=null,u.value=null,s.value.forEach(o=>{o.left=Math.round(o.left/100*100),o.top=Math.round(o.top/100*100),o.width=Math.round(o.width/100*100),o.height=Math.round(o.height/100*100)})}const R=e.computed(()=>l.value.style.item.borderColor),L=e.computed(()=>l.value.style.resizeHandles.backgroundColor),F=e.computed(()=>l.value.style.board.aspectRatio),O=e.computed(()=>l.value.style.board.backgroundColor),G=e.computed(()=>l.value.style.board.border);function j(){return s.value}return E({generatePdf:M,getItemsPositions:j,toggleLock:$}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{onMousedown:w,onMouseup:T,onTouchstart:w,onTouchend:T},[l.value.allowPrint?(e.openBlock(),e.createElementBlock("div",Z,[e.createElementVNode("button",{class:"vue-ui-dashboard-button",onClick:M,disabled:C.value,style:e.normalizeStyle([{"margin-top":"12px"},`color:${l.value.style.board.color}`])},[C.value?(e.openBlock(),e.createElementBlock("svg",{key:0,class:"vue-ui-dashboard-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:l.value.style.board.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},n[4]||(n[4]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-dc9ae697></path><path d="M18 16v.01" data-v-dc9ae697></path><path d="M6 16v.01" data-v-dc9ae697></path><path d="M12 5v.01" data-v-dc9ae697></path><path d="M12 12v.01" data-v-dc9ae697></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-dc9ae697></path>',6)]),8,oe)):(e.openBlock(),e.createElementBlock("span",ne,"PDF"))],12,ee)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-dashboard-container",ref_key:"dashboardContainer",ref:a,id:`vue-ui-dashboard_${U.value}`,style:e.normalizeStyle(`border:${G.value}; background:${O.value}; aspect-ratio:${F.value}`)},[e.createElementVNode("div",{class:"vue-ui-dashboard-grid-container",ref:"container",onMousemove:H,onMouseup:I,onTouchmove:W,onTouchend:g,style:e.normalizeStyle(`background:${l.value.style.board.backgroundColor}`)},[n[5]||(n[5]=e.createElementVNode("div",{class:"vue-ui-dashboard-grid"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(r,t)=>(e.openBlock(),e.createElementBlock("div",{key:r.id,class:e.normalizeClass({"vue-ui-dashboard-grid-item":!0,"vue-ui-dashboard-grid-item--locked":d.value}),style:e.normalizeStyle({width:`${r.width}%`,height:`${r.height}%`,left:`${r.left}%`,top:`${r.top}%`,cursor:"move",boxShadow:m.value===t?"0 6px 12px -3px rgba(0,0,0,0.3)":"",zIndex:m.value===t?k.value.length+1:r.index,backgroundColor:l.value.style.item.backgroundColor}),onMousedown:i=>D(t),onTouchstart:i=>Y(t)},[d.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-top-left",onMousedown:i=>P(t,"top-left"),onTouchstart:i=>V(t,"top-left",i),onTouchmove:n[0]||(n[0]=i=>b(i)),onTouchend:g},null,40,ie),e.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-top-right",onMousedown:i=>P(t,"top-right"),onTouchstart:i=>V(t,"top-right",i),onTouchmove:n[1]||(n[1]=i=>b(i)),onTouchend:g},null,40,ue),e.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-left",onMousedown:i=>P(t,"bottom-left"),onTouchstart:i=>V(t,"bottom-left",i),onTouchmove:n[2]||(n[2]=i=>b(i)),onTouchend:g},null,40,se),e.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-right",onMousedown:i=>P(t,"bottom-right"),onTouchstart:i=>V(t,"bottom-right",i),onTouchmove:n[3]||(n[3]=i=>b(i)),onTouchend:g},null,40,le)],64)),r.resolvedComponent?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.resolvedComponent),e.mergeProps({key:1,ref_for:!0},r.props),null,16)):e.renderSlot(o.$slots,"content",{key:2,item:r,index:t,left:r.left,top:r.top,height:r.height,width:r.width},void 0,!0)],46,re))),128))],36)],12,te)],32))}},ce=J._export_sfc(ae,[["__scopeId","data-v-dc9ae697"]]);exports.default=ce;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),Q=require("./pdf-Dm8bjLUW.cjs"),K=require("./useNestedProp-CAbtwUJj.cjs"),_=require("./index-D6F-xMcR.cjs"),J=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Z={key:0,"data-dom-to-png-ignore":"",style:{width:"100%",display:"flex","justify-content":"end"}},ee=["disabled"],oe=["stroke"],ne={key:1},te=["id"],re=["onMousedown","onTouchstart"],ie=["onMousedown","onTouchstart"],ue=["onMousedown","onTouchstart"],se=["onMousedown","onTouchstart"],le=["onMousedown","onTouchstart"],A=1,ae={__name:"vue-ui-dashboard",props:{dataset:Array,config:Object},emits:["change"],setup(B,{expose:E,emit:z}){e.useCssVars(o=>({"56f02d00":R.value,"2fbe8dda":L.value}));const N={VueDataUi:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-data-ui-DPoOpdO-.cjs"))),VueUi3dBar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-3d-bar-CwsCsbwY.cjs"))),VueUiAccordion:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-accordion-ChE9WO8Q.cjs"))),VueUiAgePyramid:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-age-pyramid-CAtI3F1S.cjs"))),VueUiAnnotator:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-annotator-DQ0W7Q5C.cjs"))),VueUiCandlestick:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-candlestick-DJtpSDju.cjs"))),VueUiChestnut:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-chestnut-DRGps83_.cjs"))),VueUiDigits:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-digits-p0PWcPJX.cjs"))),VueUiDonut:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-donut-C3mhQ-03.cjs"))),VueUiDonutEvolution:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-donut-evolution-C9eui30b.cjs"))),VueUiDumbbell:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-dumbbell-BheHAxmy.cjs"))),VueUiFlow:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-flow-vz29fymj.cjs"))),VueUiGalaxy:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-galaxy-YP3Gl3vG.cjs"))),VueUiGauge:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-gauge-WH6OGXAD.cjs"))),VueUiHeatmap:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-heatmap-Dx8XPeob.cjs"))),VueUiKpi:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-kpi-DqpTRLkQ.cjs"))),VueUiMiniLoader:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-mini-loader-CpxzfBja.cjs"))),VueUiMolecule:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-molecule-avfEzaAy.cjs"))),VueUiMoodRadar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-mood-radar-CnAmD4WX.cjs"))),VueUiNestedDonuts:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-nested-donuts-BkQJr_zV.cjs"))),VueUiOnion:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-onion-CA2N8k0p.cjs"))),VueUiParallelCoordinatePlot:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-parallel-coordinate-plot-V6vt-U3H.cjs"))),VueUiQuadrant:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-quadrant-C7Fb-DVA.cjs"))),VueUiQuickChart:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-quick-chart-CQp5GSbr.cjs"))),VueUiRadar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-radar-DVv2P3B3.cjs"))),VueUiRating:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-rating-CA5buZm1.cjs"))),VueUiRelationCircle:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-relation-circle-BGY0EsvO.cjs"))),VueUiRings:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-rings-2XntvE5b.cjs"))),VueUiScatter:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-scatter-Brh98c-o.cjs"))),VueUiSkeleton:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-skeleton-CK5DdXVo.cjs"))),VueUiSmiley:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-smiley-3uIAUF4w.cjs"))),VueUiSparkHistogram:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-sparkhistogram-Df0Edni4.cjs"))),VueUiSparkStackbar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-sparkstackbar-BlyzQCK8.cjs"))),VueUiSparkTrend:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-spark-trend-CfhhjekZ.cjs"))),VueUiSparkbar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-sparkbar-BxKGdAq3.cjs"))),VueUiSparkgauge:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-sparkgauge-CWXLMSHa.cjs"))),VueUiSparkline:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-sparkline-BQCbVZw5.cjs"))),VueUiStripPlot:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-strip-plot-CmrAJ6uF.cjs"))),VueUiTable:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-table-BmyVGToW.cjs"))),VueUiTableHeatmap:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-table-heatmap-CXTW4REL.cjs"))),VueUiTableSparkline:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-table-sparkline--R1CzNtx.cjs"))),VueUiThermometer:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-thermometer-DtOy35Jd.cjs"))),VueUiTimer:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-timer-Bo3p5wjo.cjs"))),VueUiTiremarks:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-tiremarks-B-3AEiND.cjs"))),VueUiTreemap:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-treemap-ZiuUtYjs.cjs"))),VueUiVerticalBar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-vertical-bar-DHZvOGpR.cjs"))),VueUiWaffle:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-waffle-Yi5W6qYr.cjs"))),VueUiWheel:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-wheel-D85CwfOC.cjs"))),VueUiWordCloud:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-word-cloud-CkActnvX.cjs"))),VueUiXy:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-xy-DYEFXjnb.cjs"))),VueUiXyCanvas:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-xy-canvas-K0Qm3FPR.cjs"))),VueUiCarouselTable:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-carousel-table-VFiMfJos.cjs"))),VueUiGizmo:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-gizmo-D2AJKoeB.cjs"))),VueUiStackbar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-stackbar-ypv8uR9d.cjs"))),VueUiBullet:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-bullet-CQtNg-wR.cjs"))),VueUiFunnel:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-funnel-D8brKLer.cjs"))),VueUiHistoryPlot:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-history-plot-Cmc7KMnB.cjs"))),VueUiCirclePack:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-circle-pack-CkpLDinw.cjs"))),VueUiWorld:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-world-aTdY2yXo.cjs")))},{vue_ui_dashboard:$}=_.useConfig(),q=B,l=e.computed(()=>K.useNestedProp({userConfig:q.config,defaultConfig:$})),U=e.ref(_.createUid()),c=e.ref(l.value.locked);function x(){c.value=!c.value}const s=e.ref(q.dataset.map((o,n)=>({...o,index:n}))),k=e.computed(()=>s.value.map(o=>({...o,resolvedComponent:typeof o.component=="string"?N[o.component]:o.component}))),h=e.ref(null),u=e.ref(null),v=e.ref({x:0,y:0}),f=e.ref({x:0,y:0}),a=e.ref(null),d=e.ref(!1),m=e.ref(null),C=e.ref(!1),y=e.ref(!1);function w(o){const n=o.target;(n.tagName==="INPUT"&&n.type==="range"||n.classList.contains("range-handle"))&&(y.value=!0)}function T(o){const n=o.target;n.tagName==="INPUT"&&n.type==="range"&&(y.value=!1)}function M(){C.value=!0,Q.default({domElement:document.getElementById(`vue-ui-dashboard_${U.value}`),fileName:"vue-ui-dashboard"}).finally(()=>{C.value=!1})}function D(o){if(!c.value&&(d.value=!0,m.value=o,u.value===null)){h.value=o,v.value={x:event.clientX,y:event.clientY};const n=s.value[o],r=100-n.width,t=100-n.height;n.left<0&&(n.left=0),n.top<0&&(n.top=0),n.left>r&&(n.left=r),n.top>t&&(n.top=t),n.left<0&&(n.left=0),n.top<0&&(n.top=0),n.left+n.width>100&&(n.left=100-n.width),n.top+n.height>100&&(n.top=100-n.height)}}function P(o,n){d.value=!0,m.value=o,u.value={index:o,direction:n};const r=s.value[o];f.value={x:event.clientX,y:event.clientY,initialWidth:r.width,initialHeight:r.height}}function S(o,n,r){if(u.value.direction.includes("top")){const t=o.height-r/a.value.offsetHeight*100;t>=A&&(o.top+=r/a.value.offsetHeight*100,o.height=t)}if(u.value.direction.includes("bottom")){const t=o.height+r/a.value.offsetHeight*100;t>=A&&(o.height=t)}if(u.value.direction.includes("left")){const t=o.width-n/a.value.offsetWidth*100;t>=A&&(o.left+=n/a.value.offsetWidth*100,o.width=t)}if(u.value.direction.includes("right")){const t=o.width+n/a.value.offsetWidth*100;t>=A&&(o.width=t)}}function H(o){if(!(c.value||y.value)){if(d.value=!0,h.value!==null){const n=s.value[h.value],r=o.clientX-v.value.x,t=o.clientY-v.value.y,i=n.left+r/a.value.offsetWidth*100,p=n.top+t/a.value.offsetHeight*100;i>=0&&p>=0&&i+n.width<=100&&p+n.height<=100&&(n.left=i,n.top=p),v.value={x:o.clientX,y:o.clientY}}if(u.value!==null){const n=s.value[u.value.index],r=o.clientX-f.value.x,t=o.clientY-f.value.y;S(n,r,t),f.value={x:o.clientX,y:o.clientY}}}}const X=z;e.watch(s,o=>{o&&!d.value&&X("change",s.value)},{deep:!0});function I(){h.value=null,u.value=null,d.value=!1,m.value=null,s.value.forEach(o=>{o.left=Math.round(o.left/100*100),o.top=Math.round(o.top/100*100),o.width=Math.round(o.width/100*100),o.height=Math.round(o.height/100*100)})}function Y(o){c.value||y.value||(d.value=!0,m.value=o,u.value===null&&(h.value=o,v.value={x:event.touches[0].clientX,y:event.touches[0].clientY}))}function V(o,n,r){if(d.value=!0,m.value=o,u.value===null){u.value={index:o,direction:n};const t=s.value[o];f.value={x:r.touches[0].clientX,y:r.touches[0].clientY,initialWidth:t.width,initialHeight:t.height}}}function b(o){if(d.value=!0,o.preventDefault(),u.value!==null){const n=s.value[u.value.index],r=o.touches[0].clientX-f.value.x,t=o.touches[0].clientY-f.value.y;S(n,r,t),f.value={x:o.touches[0].clientX,y:o.touches[0].clientY}}}function W(o){if(!(c.value||y.value)&&(d.value=!0,o.preventDefault(),h.value!==null)){const n=s.value[h.value],r=o.touches[0].clientX-v.value.x,t=o.touches[0].clientY-v.value.y,i=n.left+r/a.value.offsetWidth*100,p=n.top+t/a.value.offsetHeight*100;i>=0&&p>=0&&i+n.width<=100&&p+n.height<=100&&(n.left=i,n.top=p),v.value={x:o.touches[0].clientX,y:o.touches[0].clientY}}}function g(){d.value=!1,m.value=null,h.value=null,u.value=null,s.value.forEach(o=>{o.left=Math.round(o.left/100*100),o.top=Math.round(o.top/100*100),o.width=Math.round(o.width/100*100),o.height=Math.round(o.height/100*100)})}const R=e.computed(()=>l.value.style.item.borderColor),L=e.computed(()=>l.value.style.resizeHandles.backgroundColor),F=e.computed(()=>l.value.style.board.aspectRatio),O=e.computed(()=>l.value.style.board.backgroundColor),G=e.computed(()=>l.value.style.board.border);function j(){return s.value}return E({generatePdf:M,getItemsPositions:j,toggleLock:x}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{onMousedown:w,onMouseup:T,onTouchstart:w,onTouchend:T},[l.value.allowPrint?(e.openBlock(),e.createElementBlock("div",Z,[e.createElementVNode("button",{class:"vue-ui-dashboard-button",onClick:M,disabled:C.value,style:e.normalizeStyle([{"margin-top":"12px"},`color:${l.value.style.board.color}`])},[C.value?(e.openBlock(),e.createElementBlock("svg",{key:0,class:"vue-ui-dashboard-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:l.value.style.board.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},n[4]||(n[4]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-f5946722></path><path d="M18 16v.01" data-v-f5946722></path><path d="M6 16v.01" data-v-f5946722></path><path d="M12 5v.01" data-v-f5946722></path><path d="M12 12v.01" data-v-f5946722></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-f5946722></path>',6)]),8,oe)):(e.openBlock(),e.createElementBlock("span",ne,"PDF"))],12,ee)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-dashboard-container",ref_key:"dashboardContainer",ref:a,id:`vue-ui-dashboard_${U.value}`,style:e.normalizeStyle(`border:${G.value}; background:${O.value}; aspect-ratio:${F.value}`)},[e.createElementVNode("div",{class:"vue-ui-dashboard-grid-container",ref:"container",onMousemove:H,onMouseup:I,onTouchmove:W,onTouchend:g,style:e.normalizeStyle(`background:${l.value.style.board.backgroundColor}`)},[n[5]||(n[5]=e.createElementVNode("div",{class:"vue-ui-dashboard-grid"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(r,t)=>(e.openBlock(),e.createElementBlock("div",{key:r.id,class:e.normalizeClass({"vue-ui-dashboard-grid-item":!0,"vue-ui-dashboard-grid-item--locked":c.value}),style:e.normalizeStyle({width:`${r.width}%`,height:`${r.height}%`,left:`${r.left}%`,top:`${r.top}%`,cursor:"move",boxShadow:m.value===t?"0 6px 12px -3px rgba(0,0,0,0.3)":"",zIndex:m.value===t?k.value.length+1:r.index,backgroundColor:l.value.style.item.backgroundColor}),onMousedown:i=>D(t),onTouchstart:i=>Y(t)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-top-left",onMousedown:i=>P(t,"top-left"),onTouchstart:i=>V(t,"top-left",i),onTouchmove:n[0]||(n[0]=i=>b(i)),onTouchend:g},null,40,ie),e.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-top-right",onMousedown:i=>P(t,"top-right"),onTouchstart:i=>V(t,"top-right",i),onTouchmove:n[1]||(n[1]=i=>b(i)),onTouchend:g},null,40,ue),e.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-left",onMousedown:i=>P(t,"bottom-left"),onTouchstart:i=>V(t,"bottom-left",i),onTouchmove:n[2]||(n[2]=i=>b(i)),onTouchend:g},null,40,se),e.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-right",onMousedown:i=>P(t,"bottom-right"),onTouchstart:i=>V(t,"bottom-right",i),onTouchmove:n[3]||(n[3]=i=>b(i)),onTouchend:g},null,40,le)],64)),e.renderSlot(o.$slots,"top",{item:r,index:t},void 0,!0),r.resolvedComponent?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.resolvedComponent),e.mergeProps({key:1,ref_for:!0},r.props),null,16)):e.renderSlot(o.$slots,"content",{key:2,item:r,index:t,left:r.left,top:r.top,height:r.height,width:r.width},void 0,!0),e.renderSlot(o.$slots,"bottom",{item:r,index:t},void 0,!0)],46,re))),128))],36)],12,te)],32))}},de=J._export_sfc(ae,[["__scopeId","data-v-f5946722"]]);exports.default=de;
|