vue-data-ui 2.6.51 → 2.6.52-beta.0
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 +1 -3
- package/dist/{Arrow-zUP7YWwK.js → Arrow-BrgzjEu9.js} +1 -1
- package/dist/{Arrow-BgUU76S-.cjs → Arrow-i892KlJJ.cjs} +1 -1
- package/dist/{BaseIcon-CTAy5_xi.js → BaseIcon-1Kh1hniD.js} +1 -1
- package/dist/{BaseIcon-C86xshge.cjs → BaseIcon-OIGwOnCM.cjs} +1 -1
- package/dist/{ColorPicker-D0HD4Quw.cjs → ColorPicker-C5fe9E7-.cjs} +1 -1
- package/dist/{ColorPicker-Bytmrdr3.js → ColorPicker-Cxeiob9V.js} +3 -3
- package/dist/{DataTable-BciZ6nvV.js → DataTable-C4Zf4XLF.js} +15 -15
- package/dist/DataTable-DJyyRRlW.cjs +1 -0
- package/dist/{Legend-Cz7Cx76P.js → Legend-1pyX_J1z.js} +2 -2
- package/dist/{Legend-DgFKLfrI.cjs → Legend-Dx4tku_Q.cjs} +1 -1
- package/dist/{PackageVersion-o03zxIgy.js → PackageVersion-BPpaTwrM.js} +1 -1
- package/dist/{PackageVersion-t17AmNwO.cjs → PackageVersion-Di08b2vs.cjs} +1 -1
- package/dist/{PenAndPaper-CkHrxfug.js → PenAndPaper-B21RAf9P.js} +5 -5
- package/dist/PenAndPaper-C0I2pjPq.cjs +1 -0
- package/dist/{Shape-CGopvwTa.cjs → Shape-Bn0OAR4-.cjs} +1 -1
- package/dist/{Shape-D-YK0lYU.js → Shape-BrtnGizi.js} +1 -1
- package/dist/{Slicer-AvtKQlUL.js → Slicer-BeRcAG--.js} +25 -25
- package/dist/Slicer-BrIoq1c-.cjs +1 -0
- package/dist/{Title-BJ2lOafm.cjs → Title-CcW9kRtT.cjs} +1 -1
- package/dist/{Title-D-dsYBke.js → Title-rbJs8Cs3.js} +1 -1
- package/dist/{Tooltip-7LYTKhzY.cjs → Tooltip-BzDUupFB.cjs} +1 -1
- package/dist/{Tooltip-DFPLXjvj.js → Tooltip-DZGBhn8l.js} +1 -1
- package/dist/documentation/installation.md +0 -1
- package/dist/dom-to-png-BpstRczV.cjs +1 -0
- package/dist/dom-to-png-DFDQ3B5I.js +119 -0
- package/dist/img-DN4K4BLQ.cjs +1 -0
- package/dist/img-hntVQbmL.js +19 -0
- package/dist/index-CuIvJLJx.cjs +9 -0
- package/dist/{index-C3amwS0l.js → index-DYjLUPYr.js} +291 -349
- package/dist/pdf-BwewXrne.js +46 -0
- package/dist/pdf-ClzzT4YP.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +0 -64
- package/dist/types/vue-data-ui.d.ts +0 -64
- package/dist/{useNestedProp-Cf-JPzTa.cjs → useNestedProp-B3OcLUMU.cjs} +1 -1
- package/dist/{useNestedProp-D9I77VlT.js → useNestedProp-DPpLpUNG.js} +1 -1
- package/dist/usePrinter-BwwdT1Uh.cjs +1 -0
- package/dist/{usePrinter-CUdxA1Bg.js → usePrinter-GOjH1UQd.js} +5 -5
- package/dist/{vue-data-ui-DH842rfS.js → vue-data-ui-CgYIT4l6.js} +60 -62
- package/dist/vue-data-ui-XSn3UFqP.cjs +9 -0
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +35 -36
- package/dist/{vue-ui-3d-bar-Bd6XLFya.js → vue-ui-3d-bar-BFA4GviN.js} +11 -11
- package/dist/{vue-ui-3d-bar-CJfSnDyo.cjs → vue-ui-3d-bar-d2lzwwD0.cjs} +2 -2
- package/dist/{vue-ui-accordion-B-rPe8KM.cjs → vue-ui-accordion-ZlcsLKVn.cjs} +1 -1
- package/dist/{vue-ui-accordion-BBc1ZMpG.js → vue-ui-accordion-zFcofzrb.js} +3 -3
- package/dist/{vue-ui-age-pyramid-BNj-4LHe.cjs → vue-ui-age-pyramid-BrS-QXEl.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-Bn_mzS13.js → vue-ui-age-pyramid-HYnV6m7j.js} +10 -10
- package/dist/{vue-ui-annotator-vFbCgJEZ.js → vue-ui-annotator-Bnl6xoGx.js} +84 -85
- package/dist/vue-ui-annotator-DpcBNv4G.cjs +371 -0
- package/dist/{vue-ui-bullet-DyGZmH-g.js → vue-ui-bullet-BMAoQg9X.js} +8 -8
- package/dist/{vue-ui-bullet-B6KpjWl_.cjs → vue-ui-bullet-CUg-Tqm5.cjs} +1 -1
- package/dist/{vue-ui-candlestick-BoH-d4sf.cjs → vue-ui-candlestick-BB_TlvHs.cjs} +1 -1
- package/dist/{vue-ui-candlestick-DUfXOizp.js → vue-ui-candlestick-D99-OMzs.js} +11 -11
- package/dist/{vue-ui-carousel-table-Cbl6UzEH.cjs → vue-ui-carousel-table-BLMby8AI.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-DZzht2CZ.js → vue-ui-carousel-table-Cj28UhyG.js} +4 -4
- package/dist/{vue-ui-chestnut-DWQumnLS.js → vue-ui-chestnut-BcHI2rpx.js} +8 -8
- package/dist/{vue-ui-chestnut-DWPp1zKx.cjs → vue-ui-chestnut-CK_b_ta8.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-SLB70Z_8.js → vue-ui-circle-pack-BYhg53UE.js} +9 -9
- package/dist/{vue-ui-circle-pack-1RcCvaYs.cjs → vue-ui-circle-pack-ClzkEDGg.cjs} +1 -1
- package/dist/vue-ui-cursor-B3u3ldcD.cjs +1 -0
- package/dist/{vue-ui-cursor-DqwobFdf.js → vue-ui-cursor-DkcChdeb.js} +4 -4
- package/dist/{vue-ui-dashboard-BoVqjFT-.js → vue-ui-dashboard-BdnlFgl5.js} +8 -8
- package/dist/vue-ui-dashboard-Nt0DdH9L.cjs +1 -0
- package/dist/{vue-ui-digits-CkqC9SEJ.js → vue-ui-digits-D_BKH_j3.js} +2 -2
- package/dist/{vue-ui-digits-CicHxnLg.cjs → vue-ui-digits-LJ5NoBDi.cjs} +1 -1
- package/dist/{vue-ui-donut-BIJLbkro.js → vue-ui-donut-DKIAm-ME.js} +12 -12
- package/dist/{vue-ui-donut-evolution-Bu7kKtpK.js → vue-ui-donut-evolution-B_aFgOze.js} +14 -14
- package/dist/{vue-ui-donut-evolution-LqcL3OxY.cjs → vue-ui-donut-evolution-BtnTa4le.cjs} +1 -1
- package/dist/{vue-ui-donut-D03_Yedr.cjs → vue-ui-donut-kRhrhvjt.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-Drrm__Nn.cjs → vue-ui-dumbbell-BFYVlYa4.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-B3sbV0fk.js → vue-ui-dumbbell-jzYimGnw.js} +10 -10
- package/dist/{vue-ui-flow-NPMbdbtS.cjs → vue-ui-flow-BuXSGu-i.cjs} +1 -1
- package/dist/{vue-ui-flow-DMK3963a.js → vue-ui-flow-CqihZo8O.js} +9 -9
- package/dist/{vue-ui-funnel-C7EwDAdS.js → vue-ui-funnel-B9OFgkeR.js} +9 -9
- package/dist/{vue-ui-funnel-BiSRxqzO.cjs → vue-ui-funnel-CpaBBSbU.cjs} +1 -1
- package/dist/{vue-ui-galaxy-CaDXpBs3.cjs → vue-ui-galaxy-BCQr-U2u.cjs} +1 -1
- package/dist/{vue-ui-galaxy-Cotibz3o.js → vue-ui-galaxy-FOIZdAZe.js} +11 -11
- package/dist/{vue-ui-gauge-DKNwFB05.js → vue-ui-gauge-B42XWwB2.js} +7 -7
- package/dist/{vue-ui-gauge-DK2g4x7s.cjs → vue-ui-gauge-kZxueLp8.cjs} +1 -1
- package/dist/{vue-ui-gizmo-DO5PUFbp.js → vue-ui-gizmo-DNzFp5mg.js} +3 -3
- package/dist/{vue-ui-gizmo-DhSfekXS.cjs → vue-ui-gizmo-DtQnmFnB.cjs} +1 -1
- package/dist/{vue-ui-heatmap-DulCLx2a.js → vue-ui-heatmap-CBahWBfm.js} +10 -10
- package/dist/{vue-ui-heatmap-DbWoJVGe.cjs → vue-ui-heatmap-DwTkeSCE.cjs} +1 -1
- package/dist/{vue-ui-history-plot-H6t6DvQ_.cjs → vue-ui-history-plot-BLZfokqh.cjs} +1 -1
- package/dist/{vue-ui-history-plot-BcLWVk_q.js → vue-ui-history-plot-JF7Cxj70.js} +11 -11
- package/dist/{vue-ui-kpi-CG43D1rb.js → vue-ui-kpi-Dd7_MpTH.js} +3 -3
- package/dist/{vue-ui-kpi-CdnXw9hF.cjs → vue-ui-kpi-DgYNzLPE.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DXU3rfwQ.cjs → vue-ui-mini-loader-AnEvVAeN.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-CLjqXzvH.js → vue-ui-mini-loader-CYlUH9YB.js} +2 -2
- package/dist/{vue-ui-molecule-BYetzB_N.js → vue-ui-molecule-CwjSX0qp.js} +14 -14
- package/dist/vue-ui-molecule-DenzPBhZ.cjs +1 -0
- package/dist/{vue-ui-mood-radar-BnUc15e9.js → vue-ui-mood-radar-B_ZdNRq7.js} +11 -11
- package/dist/{vue-ui-mood-radar-B4mRD0GQ.cjs → vue-ui-mood-radar-oZi1r3t2.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-B_29kUHS.cjs → vue-ui-nested-donuts-1iw0Uhgn.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-Dk7fcRR3.js → vue-ui-nested-donuts-u6o7Mo5w.js} +11 -11
- package/dist/{vue-ui-onion-BbucE7AX.js → vue-ui-onion-BIgB8q-o.js} +11 -11
- package/dist/{vue-ui-onion-CtI9xbLn.cjs → vue-ui-onion-nSs841wa.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-CFWG0onH.cjs → vue-ui-parallel-coordinate-plot-CLZbLwv6.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-CLIOyXQc.js → vue-ui-parallel-coordinate-plot-CzdztQbb.js} +12 -12
- package/dist/{vue-ui-quadrant-BFu1K90E.cjs → vue-ui-quadrant-DVJk4jVY.cjs} +1 -1
- package/dist/{vue-ui-quadrant-DinfyJBM.js → vue-ui-quadrant-Dqj0kKDK.js} +12 -12
- package/dist/{vue-ui-quick-chart-D5JhRHUd.js → vue-ui-quick-chart-C16V9Aae.js} +9 -9
- package/dist/{vue-ui-quick-chart-Dp6hQbfz.cjs → vue-ui-quick-chart-DseczpPU.cjs} +1 -1
- package/dist/{vue-ui-radar-Ds39hdq4.cjs → vue-ui-radar-BAeIHJpy.cjs} +1 -1
- package/dist/{vue-ui-radar-CUFZHgr3.js → vue-ui-radar-Db7iB_Qj.js} +12 -12
- package/dist/{vue-ui-rating-BfqOFA-n.cjs → vue-ui-rating-D0Dx6ZXa.cjs} +1 -1
- package/dist/{vue-ui-rating-D1EUcFL0.js → vue-ui-rating-JEdFnT3W.js} +2 -2
- package/dist/{vue-ui-relation-circle-CiULD7PK.cjs → vue-ui-relation-circle-DQna8U5y.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-D65EImKT.js → vue-ui-relation-circle-gakSZ4S6.js} +7 -7
- package/dist/{vue-ui-rings-9zTtxZif.js → vue-ui-rings-D5n6DT_A.js} +12 -12
- package/dist/{vue-ui-rings-DtMD95_q.cjs → vue-ui-rings-DtRyfbLl.cjs} +1 -1
- package/dist/{vue-ui-scatter-DXzppvmP.cjs → vue-ui-scatter-Bi6D12HK.cjs} +1 -1
- package/dist/{vue-ui-scatter-DsF27c6e.js → vue-ui-scatter-PREHAey0.js} +12 -12
- package/dist/{vue-ui-skeleton-a_FvGOK6.cjs → vue-ui-skeleton-B3iHjtI-.cjs} +1 -1
- package/dist/{vue-ui-skeleton-CrT5EE2W.js → vue-ui-skeleton-Bvgys0sE.js} +3 -3
- package/dist/{vue-ui-smiley-DK8TadZl.js → vue-ui-smiley-Bbz2pMRt.js} +2 -2
- package/dist/{vue-ui-smiley-CpC75CYj.cjs → vue-ui-smiley-CPZZHQxU.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-oZCQCarV.cjs → vue-ui-spark-trend-BQJgJLH1.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-BCN37BvU.js → vue-ui-spark-trend-OSzSYi-e.js} +5 -5
- package/dist/{vue-ui-sparkbar-CoCEXvSI.cjs → vue-ui-sparkbar-CMXau9-B.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CE8WVA2T.js → vue-ui-sparkbar-CTBKE2AF.js} +4 -4
- package/dist/{vue-ui-sparkgauge-DoZQ6ZYY.js → vue-ui-sparkgauge-Cut-q8bg.js} +4 -4
- package/dist/{vue-ui-sparkgauge-DRGJ2R72.cjs → vue-ui-sparkgauge-DXGiSj1v.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-Bol-aQuY.js → vue-ui-sparkhistogram-Bc9284wI.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-wzpO76Dd.cjs → vue-ui-sparkhistogram-D0JFcRmB.cjs} +1 -1
- package/dist/{vue-ui-sparkline-BdBLfCAO.cjs → vue-ui-sparkline-BjuntN3v.cjs} +1 -1
- package/dist/{vue-ui-sparkline-C9FJaLay.js → vue-ui-sparkline-JtLdV2lv.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-CQSP1urd.js → vue-ui-sparkstackbar-Dnb7y-aL.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-DcGfGfpf.cjs → vue-ui-sparkstackbar-UHMiNIcM.cjs} +1 -1
- package/dist/{vue-ui-stackbar-DZEOEvnN.cjs → vue-ui-stackbar-B3tfGGNG.cjs} +2 -2
- package/dist/{vue-ui-stackbar-CDFfxSCS.js → vue-ui-stackbar-Do4pbvT_.js} +15 -15
- package/dist/{vue-ui-strip-plot-cwg3sgfW.cjs → vue-ui-strip-plot-BL_QIbRg.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-Mroaxrtl.js → vue-ui-strip-plot-DpEyBQVy.js} +11 -11
- package/dist/{vue-ui-table-JunVPtv-.cjs → vue-ui-table-Bo6YTb5z.cjs} +1 -1
- package/dist/{vue-ui-table-DMGZN-3h.js → vue-ui-table-DOy0Vino.js} +1 -1
- package/dist/{vue-ui-table-heatmap-Cvd3LF-p.js → vue-ui-table-heatmap-BBtNwXmc.js} +4 -4
- package/dist/{vue-ui-table-heatmap-B-K-sXUr.cjs → vue-ui-table-heatmap-BEyXNXkX.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-D6LrWje8.js → vue-ui-table-sparkline-CgMtPPVk.js} +5 -5
- package/dist/{vue-ui-table-sparkline-DZcJ1rQX.cjs → vue-ui-table-sparkline-CjOt6yUn.cjs} +1 -1
- package/dist/{vue-ui-thermometer-61KP0jn1.cjs → vue-ui-thermometer-DDzJGu-3.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BSMW00bJ.js → vue-ui-thermometer-mxQsDV23.js} +7 -7
- package/dist/{vue-ui-timer-jeD5NmuN.cjs → vue-ui-timer-BoHc9W-g.cjs} +1 -1
- package/dist/{vue-ui-timer-B2iP7RSf.js → vue-ui-timer-py5C5kre.js} +5 -5
- package/dist/{vue-ui-tiremarks-D2kbp6KR.cjs → vue-ui-tiremarks-DfzjVsQy.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-C1WyRyfc.js → vue-ui-tiremarks-cOumsgMp.js} +7 -7
- package/dist/vue-ui-treemap-BapuAvm_.cjs +1 -0
- package/dist/{vue-ui-treemap-DyJ_Ath1.js → vue-ui-treemap-D52gL3aO.js} +185 -185
- package/dist/{vue-ui-vertical-bar-yzivBWJt.js → vue-ui-vertical-bar-B7xGhcol.js} +12 -12
- package/dist/{vue-ui-vertical-bar-C0cbPo6B.cjs → vue-ui-vertical-bar-tUOVTrhe.cjs} +1 -1
- package/dist/{vue-ui-waffle-CF3e6ft5.cjs → vue-ui-waffle-D_eTTi3G.cjs} +1 -1
- package/dist/{vue-ui-waffle-BByWdS7G.js → vue-ui-waffle-Dl3103a6.js} +12 -12
- package/dist/{vue-ui-wheel-D7R1yr52.cjs → vue-ui-wheel-BF-ixbP0.cjs} +1 -1
- package/dist/{vue-ui-wheel-iDX0u5LU.js → vue-ui-wheel-j5qr7c2B.js} +7 -7
- package/dist/{vue-ui-word-cloud-BPQFUEFg.js → vue-ui-word-cloud-CDCHlEtX.js} +13 -13
- package/dist/vue-ui-word-cloud-DzhX3V-T.cjs +1 -0
- package/dist/{vue-ui-xy-DmwPJ7Bc.js → vue-ui-xy-Cqd9LwBJ.js} +18 -18
- package/dist/vue-ui-xy-DXp678aj.cjs +3 -0
- package/dist/{vue-ui-xy-canvas-aZQ9FHGI.cjs → vue-ui-xy-canvas-DfYwxC06.cjs} +2 -2
- package/dist/{vue-ui-xy-canvas-CmXVo7kC.js → vue-ui-xy-canvas-byW5VmrH.js} +16 -16
- package/package.json +2 -3
- package/dist/DataTable-Bm_s0nuy.cjs +0 -1
- package/dist/PenAndPaper-aD8jM7bo.cjs +0 -1
- package/dist/Slicer-B8Egk1-K.cjs +0 -1
- package/dist/img-BIeSHu0f.js +0 -15
- package/dist/img-D6uvziU0.cjs +0 -1
- package/dist/index-BprEQiKM.cjs +0 -9
- package/dist/pdf-BpXLKlRx.cjs +0 -1
- package/dist/pdf-H8Iw_Wax.js +0 -44
- package/dist/usePrinter-CAGQW2cC.cjs +0 -1
- package/dist/vue-data-ui-Banpw0iL.cjs +0 -9
- package/dist/vue-ui-annotator-Ye4UmfpY.cjs +0 -371
- package/dist/vue-ui-cursor-DMCSD6tW.cjs +0 -1
- package/dist/vue-ui-dashboard-Cewv6xvc.cjs +0 -1
- package/dist/vue-ui-molecule-fuZ8vxv7.cjs +0 -1
- package/dist/vue-ui-screenshot-C8TpXNBS.cjs +0 -3
- package/dist/vue-ui-screenshot-CQHpwksn.js +0 -161
- package/dist/vue-ui-treemap-BxbeEbWT.cjs +0 -1
- package/dist/vue-ui-word-cloud-CSnrXzqi.cjs +0 -1
- package/dist/vue-ui-xy-uJqJ5M1Y.cjs +0 -3
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./index-BprEQiKM.cjs"),we=require("./Title-BJ2lOafm.cjs"),ae=require("./usePrinter-CAGQW2cC.cjs"),$e=require("./DataTable-Bm_s0nuy.cjs"),Pe=require("./Tooltip-7LYTKhzY.cjs"),Ne=require("./vue-ui-skeleton-a_FvGOK6.cjs"),Se=require("./vue-ui-accordion-B-rPe8KM.cjs"),se=require("./useNestedProp-Cf-JPzTa.cjs"),Te=require("./PackageVersion-t17AmNwO.cjs"),Ee=require("./PenAndPaper-aD8jM7bo.cjs"),Fe=require("./useUserOptionState-BgepsfED.cjs"),xe=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ve=require("./usePanZoom-PXRi2Rwx.cjs"),Re=require("./BaseIcon-C86xshge.cjs"),Oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ae=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Le=["x","y","height","width","onClick","onMouseover"],Ue={__name:"RecursiveCircles",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null},linkColor:{type:String,default:"#CCCCCC"},stroke:{type:String,default:"#FFFFFF"},strokeHovered:{type:String,default:"#000000"}},emits:["click","hover"],setup(a,{emit:$}){const P=a,k=$;function d(n){k("click",n)}function g(n){k("hover",n)}return e.toRef(P,"dataset").value.forEach(n=>{n.nodes&&n.nodes.length>0&&n.nodes.forEach(f=>{f.ancestor=n})}),(n,f)=>{const R=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataset,i=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.polygonPath&&i.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.polygonPath.coordinates,(y,x)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("circle",{cx:y.x,cy:y.y,r:i.circleRadius,fill:`url(#gradient_${i.color})`,stroke:a.hoveredUid&&a.hoveredUid===i.uid?a.strokeHovered:a.stroke,"stroke-width":a.hoveredUid&&a.hoveredUid===i.uid?i.circleRadius/6:i.circleRadius/12,style:{cursor:"pointer"},onClick:w=>d(i),onMouseover:w=>g(i),onMouseleave:f[0]||(f[0]=w=>g(null))},null,40,Ae),n.$slots.node?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:y.x-i.circleRadius,y:y.y-i.circleRadius,height:i.circleRadius*2,width:i.circleRadius*2,style:{overflow:"visible"},onClick:e.withModifiers(w=>d(i),["stop"]),onMouseover:w=>g(i),onMouseleave:f[1]||(f[1]=w=>g(null))},[e.renderSlot(n.$slots,"node",e.mergeProps({ref_for:!0},{node:i}))],40,Le)):e.createCommentVNode("",!0)],64))),256)),i.nodes&&i.nodes.length>0?(e.openBlock(),e.createBlock(R,{key:0,dataset:i.nodes,color:a.color,stroke:a.stroke,strokeHovered:a.strokeHovered,hoveredUid:a.hoveredUid,onClick:d,onHover:g},{node:e.withCtx(({node:y})=>[e.renderSlot(n.$slots,"node",e.mergeProps({ref_for:!0},{node:y}))]),_:2},1032,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},De=["x1","y1","x2","y2","stroke","stroke-width"],Ie=["x1","y1","x2","y2","stroke","stroke-width"],ze={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(a){const $=a;return e.toRef($,"dataset").value.forEach(k=>{k.nodes&&k.nodes.length>0&&k.nodes.forEach(d=>{d.ancestor=k})}),(k,d)=>{const g=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataset,s=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.polygonPath&&s.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(s.polygonPath.coordinates,(n,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.ancestor&&s.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:n.x,y1:n.y,x2:s.ancestor.polygonPath.coordinates[0].x,y2:s.ancestor.polygonPath.coordinates[0].y,stroke:a.backgroundColor,"stroke-width":s.circleRadius/1.5},null,8,De),e.createElementVNode("line",{x1:n.x,y1:n.y,x2:s.ancestor.polygonPath.coordinates[0].x,y2:s.ancestor.polygonPath.coordinates[0].y,stroke:a.color,"stroke-width":s.circleRadius/2},null,8,Ie)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataset,s=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.polygonPath&&s.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.nodes&&s.nodes.length>0?(e.openBlock(),e.createBlock(g,{key:0,dataset:s.nodes,color:a.color,backgroundColor:a.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},_e=["x","y","fill","font-size"],He={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(a,{emit:$}){const P=a;return e.toRef(P,"dataset").value.forEach(d=>{d.nodes&&d.nodes.length>0&&d.nodes.forEach(g=>{g.ancestor=d})}),(d,g)=>{const s=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataset,n=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.polygonPath&&n.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.polygonPath.coordinates,f=>(e.openBlock(),e.createElementBlock("text",{x:f.x,y:f.y+n.circleRadius*2,fill:a.color,"font-size":n.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(n.name),9,_e))),256)),n.nodes&&n.nodes.length>0?(e.openBlock(),e.createBlock(s,{key:0,dataset:n.nodes,color:a.color,hoveredUid:a.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Me=["id"],qe={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},Ge={key:2,style:"width:100%;background:transparent;"},je=["xmlns","viewBox"],We=["width","height"],Xe=["id"],Ze=["stop-color"],Ye=["stop-color"],Je={key:5,class:"vue-data-ui-watermark"},Ke={key:6,"data-html2canvas-ignore":"",class:"reset-wrapper"},Qe={key:8,ref:"source",dir:"auto"},et=["innerHTML"],tt={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectNode"],setup(a,{expose:$,emit:P}){e.useCssVars(o=>({"4e70cd61":o.slicerColor}));const{vue_ui_molecule:k}=v.useConfig(),d=a,g=P,s=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(()=>{n()});function n(){v.objectIsEmpty(d.dataset)&&v.error({componentName:"VueUiMolecule",type:"dataset"})}const f=e.ref(v.createUid()),R=e.ref(null),i=e.ref(!1),y=e.ref(""),x=e.ref(null),w=e.ref(0),z=e.ref(0),_=e.ref(0),t=e.computed({get:()=>q(),set:o=>o}),{userOptionsVisible:O,setUserOptionsVisibility:H,keepUserOptionState:M}=Fe.useUserOptionState({config:t.value}),{svgRef:A}=xe.useChartAccessibility({config:t.value.style.chart.title});function q(){const o=se.useNestedProp({userConfig:d.config,defaultConfig:k});return o.theme?{...se.useNestedProp({userConfig:v.themes.vue_ui_molecule[o.theme]||d.config,defaultConfig:o}),customPalette:v.themePalettes[o.theme]||v.palette}:o}e.watch(()=>d.config,o=>{t.value=q(),O.value=!t.value.userOptions.showOnChartHover,n(),z.value+=1,_.value+=1,p.value.showTable=t.value.table.show,p.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:G,isImaging:j,generatePdf:W,generateImage:X}=ae.usePrinter({elementId:`cluster_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-molecule",options:t.value.userOptions.print}),ie=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ue=e.computed(()=>v.convertCustomPalette(t.value.customPalette)),p=e.ref({showTable:t.value.table.show,showDataLabels:!0,showTooltip:t.value.style.chart.tooltip.show});function Z(o,r=0){return Array.isArray(o)&&o.length>0&&o[0].nodes?Z(o[0].nodes,r+1):r}function ce(){const o=Z(d.dataset);let r=100,l=r;for(let c=0;c<o;c+=1)r/=1,l+=r;return{height:l,width:l}}const m=e.ref(ce());e.ref(`0 0 ${m.value.width} ${m.value.height}`);function Y(o,r={x:-m.value.width/2.43,y:m.value.height/2},l=m.value.width/1.1,c=24,u=0,h=0,b="#BBBBBB",D=0){if(!Array.isArray(o)||o.length===0)return o;const Be=v.createPolygonPath({plot:r,radius:l,sides:o.length,rotation:u});return o.forEach((C,le)=>{const re=Be.coordinates[le],ne=C.color?(()=>{let I=v.convertColorToHex(C.color);return I.startsWith("#")?I:`#${I}`})():null;let S;ne?S=ne:D===0?S=b:D===1?(S=ue.value[h]||v.palette[h]||b,h+=1):S=b,C.polygonPath={coordinates:[re]},C.circleRadius=c,C.color=S,C.uid=v.createUid(),Array.isArray(C.nodes)&&C.nodes.length&&(C.nodes=Y(C.nodes,re,l/2.9,c/2.2,u+Math.PI*le/C.nodes.length,h,S,D+1))}),o}function de(o){const r=new Set;function l(u){u.forEach(h=>{if(!h.color)return;let b=h.color;/^#?[0-9A-F]{6}$/i.test(b)||(b=v.convertColorToHex(b)),b.startsWith("#")||(b=`#${b}`),r.add(b),Array.isArray(h.nodes)&&h.nodes.length&&l(h.nodes)})}l(o);const c={};return Array.from(r).forEach(u=>{const h=u.slice(1);c[u]=`gradient_${h}`}),c}const ve=e.computed(()=>de(B.value)),B=e.computed(()=>{const o=v.deepClone(d.dataset);return Y(o)}),L=e.ref(null);function he(o){L.value={datapoint:o,seriesIndex:-1,series:B.value,config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(v.isFunction(r)&&v.functionReturnsString(()=>r({seriesIndex:-1,datapoint:o,series:B.value,config:t.value})))y.value=r({seriesIndex:-1,datapoint:o,series:B.value,config:t.value});else{let l="";l+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${o.color}">⬤</div><div>${o.name}</div></div>`,o.details&&(l+=`<div style="width:100%;border-top:1px solid ${t.value.style.chart.tooltip.borderColor};margin-top: 2px">${o.details}</div>`),y.value=`<div style="font-family:inherit">${l}</div>`}}const J=e.ref(null),T=e.ref(null);function fe(o){J.value=o,o?(i.value=!0,he(o),T.value=o.uid):(i.value=!1,y.value="",T.value=null)}function me(o){const r=[];function l(c){c.forEach(u=>{const h={name:u.name,details:u.details||"-",ancestor:u.ancestor&&u.ancestor.name||"-",color:u.color||""};r.push(h),u.nodes&&u.nodes.length>0&&l(u.nodes,u.name)})}return l(o),r}const pe=e.computed(()=>me(B.value)),N=e.computed(()=>{const o=[t.value.table.translations.nodeName,t.value.table.translations.details,t.value.table.translations.ancestor],r=pe.value.map((u,h)=>[{color:u.color,name:u.name},u.details,u.ancestor||""]),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},c=[t.value.table.translations.nodeName,t.value.table.translations.details,t.value.table.translations.ancestor];return{head:o,body:r,config:l,colNames:c}});function K(){e.nextTick(()=>{const o=N.value.body.map((c,u)=>[[c[0].name],[c[1]],[c[2]]]),r=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(o),l=v.createCsvContent(r);v.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-molecule"})})}function ge(){return B.value}const E=e.ref(!1);function ke(o){E.value=o,w.value+=1}function Q(){p.value.showTable=!p.value.showTable}function ee(){p.value.showDataLabels=!p.value.showDataLabels}function te(){p.value.showTooltip=!p.value.showTooltip}const F=e.ref(!1);function U(){F.value=!F.value}const ye=e.computed(()=>!F.value),{viewBox:V,resetZoom:oe,isZoom:be}=Ve.usePanZoom(A,{x:0,y:0,width:m.value.width<=0?10:m.value.width,height:m.value.height<=0?10:m.value.height},t.value.style.chart.zoom.speed,ye);function Ce(o){g("selectNode",o)}return $({getData:ge,generatePdf:W,generateCsv:K,generateImage:X,toggleTable:Q,toggleLabels:ee,toggleTooltip:te,toggleAnnotator:U}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"moleculeChart",ref:x,class:e.normalizeClass(`vue-ui-molecule ${E.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`cluster_${f.value}`,onMouseleave:r[2]||(r[2]=l=>{J.value=null,T.value=null,e.unref(H)(!1)}),onMouseenter:r[3]||(r[3]=()=>e.unref(H)(!0))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ee.PenAndPaper,{key:0,svgRef:e.unref(A),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:F.value,onClose:U},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ie.value?(e.openBlock(),e.createElementBlock("div",qe,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Ge,[(e.openBlock(),e.createBlock(we._sfc_main,{key:`title_${z.value}`,config:{title:{cy:"molecule-div-title",...t.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&s.value&&(e.unref(M)||e.unref(O))?(e.openBlock(),e.createBlock(ae.UserOptions,{ref_key:"details",ref:R,key:`user_options_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(G),isImaging:e.unref(j),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:x.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:F.value,onToggleFullscreen:ke,onGeneratePdf:e.unref(W),onGenerateCsv:K,onGenerateImage:e.unref(X),onToggleTable:Q,onToggleLabels:ee,onToggleTooltip:te,onToggleAnnotator:U,style:e.normalizeStyle({visibility:e.unref(M)?e.unref(O)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:c})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:c})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:c})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:c})),void 0,!0)]),key:"7"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:c})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:c})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),s.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:A,xmlns:e.unref(v.XMLNS),viewBox:`${e.unref(V).x} ${e.unref(V).y} ${e.unref(V).width} ${e.unref(V).height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":E.value,"vue-data-ui-fulscreen--off":!E.value}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Te._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:m.value.width<=0?10:m.value.width,height:m.value.height<=0?10:m.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,We)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(ve.value),l=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${l}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(v.lightenHexColor)(l,.5)},null,8,Ze),e.createElementVNode("stop",{offset:"100%","stop-color":l},null,8,Ye)],8,Xe))),256))]),e.createVNode(ze,{dataset:B.value,color:t.value.style.chart.links.stroke,backgroundColor:t.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Ue,{dataset:B.value,hoveredUid:T.value,stroke:t.value.style.chart.nodes.stroke,strokeHovered:t.value.style.chart.nodes.strokeHovered,onClick:Ce,onHover:fe},{node:e.withCtx(({node:l})=>[e.renderSlot(o.$slots,"node",e.normalizeProps(e.guardReactiveProps({node:l})),void 0,!0)]),_:3},8,["dataset","hoveredUid","stroke","strokeHovered"]),p.value.showDataLabels?(e.openBlock(),e.createBlock(He,{key:1,dataset:B.value,color:t.value.style.chart.color,hoveredUid:T.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:m.value},void 0,!0)],14,je)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Je,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(G)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),e.unref(be)?(e.openBlock(),e.createElementBlock("div",Ke,[e.renderSlot(o.$slots,"reset-action",{reset:e.unref(oe)},()=>[e.createElementVNode("button",{"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",style:e.normalizeStyle({background:t.value.style.chart.backgroundColor}),onClick:r[0]||(r[0]=l=>e.unref(oe)(!0))},[e.createVNode(Re.default,{name:"refresh",stroke:t.value.style.chart.color},null,8,["stroke"])],4)],!0)])):e.createCommentVNode("",!0),s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ne.default,{key:7,config:{type:"molecule",style:{backgroundColor:t.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),o.$slots.source?(e.openBlock(),e.createElementBlock("div",Qe,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Pe._sfc_main,{show:p.value.showTooltip&&i.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:x.value,content:y.value,isFullscreen:E.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),s.value?(e.openBlock(),e.createBlock(Se.default,{key:9,hideDetails:"",config:{open:p.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($e.DataTable,{key:`table_${_.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[1]||(r[1]=l=>p.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,et)]),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,Me))}},ot=Oe._export_sfc(tt,[["__scopeId","data-v-e4638da5"]]);exports.default=ot;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),k=require("./index-BprEQiKM.cjs"),U=require("./html2canvas.esm-BA_v9SIU.cjs"),q={__name:"vue-ui-screenshot",props:{config:{type:Object,default(){return{}}}},emits:["postImage"],setup(z,{expose:T,emit:H}){const{vue_ui_screenshot:C}=k.useConfig(),B=z,$=i.ref(`vue-ui-screenshot-${Math.random()}`),n=i.computed(()=>{if(!Object.keys(B.config||{}).length)return C;const e=k.treeShake({defaultConfig:C,userConfig:B.config});return k.convertConfigColors(e)}),a=i.ref(null),d=i.ref(null),v=i.ref(null),M=i.ref(null),S=i.ref(null),y=i.ref(null),h=i.ref(null),p=i.ref(null),m=i.ref(null),b=i.ref(null),x=i.ref(null),w=i.ref(!1),I=i.ref(null);function R(){const e=document.createElement("DIV"),{innerWidth:t,innerHeight:l}=window;return e.style.position="fixed",e.style.top=`${l?l/2-n.value.style.captureArea.initialHeight/2:200}px`,e.style.left=`${t?t/2-n.value.style.captureArea.initialWidth/2:100}px`,e.style.width=`${n.value.style.captureArea.initialWidth}px`,e.style.height=`${n.value.style.captureArea.initialHeight}px`,e.style.background=n.value.style.captureArea.background,e.style.cursor="move",e.style.boxSizing="border-box",e.style.border=n.value.style.captureArea.border,e.style.resize="both",e.style.padding="none !important",e.style.margin="none !important",e.dataset.cy="screenshot-overlay",e}function E(){a.value&&(clearTimeout(I.value),a.value.remove(),a.value=null)}function W(e){const t=document.createElement("DIV");t.classList.add("vue-ui-screenshot-info-text"),t.innerHTML=n.value.translations.info,t.dataset.html2canvasIgnore="true",t.dataset.cy="screenshot-info-text",t.style.background=n.value.style.info.background,t.style.color=n.value.style.info.color,t.style.fontWeight=n.value.style.info.bold?"bold":"normal",t.style.minWidth=`${n.value.style.info.minWidth}px`,t.style.left="50%",t.style.padding=`${n.value.style.info.padding}px`,t.style.position="absolute",t.style.textAlign="center",t.style.top=`${n.value.style.info.top}px`,t.style.transform="translateX(-50%)",t.style.borderRadius=`${n.value.style.info.borderRadius}px`,t.style.boxShadow=n.value.style.info.boxShadow,t.style.fontFamily=n.value.style.info.fontFamily,t.style.fontSize=`${n.value.style.info.fontSize}px`,t.style.border=n.value.style.info.border,t.style.userSelect="none";const l=document.createElement("BUTTON");l.classList.add("vue-ui-screenshot-close-button"),l.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" stroke-width="2.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 6l-12 12" /><path d="M6 6l12 12" /></svg>',l.style.outline="none",l.dataset.cy="screenshot-close-button",l.style.display="flex",l.style.cursor="pointer",l.style.borderRadius="50%",l.style.alignItems="center",l.style.position="absolute",l.style.justifyContent="center",l.style.transformOrigin="center",l.style.top=`${n.value.style.cancelButton.top}px`,l.style.right=`${n.value.style.cancelButton.right}px`,l.style.background=n.value.style.cancelButton.background,l.style.color=n.value.style.cancelButton.color,l.style.border=n.value.style.cancelButton.border,l.style.borderRadius=`${n.value.style.cancelButton.borderRadius}px`,l.style.height=`${n.value.style.cancelButton.size}px`,l.style.width=`${n.value.style.cancelButton.size}px`,l.addEventListener("click",E),t.appendChild(l),e.appendChild(t)}function X(e){a.value&&(w.value=!0,e.touches?(y.value=e.touches[0].clientX,h.value=e.touches[0].clientY):(y.value=e.clientX,h.value=e.clientY),b.value=a.value.getBoundingClientRect().width,x.value=a.value.getBoundingClientRect().height,e.target.addEventListener("mousemove",L),e.target.addEventListener("touchmove",L))}function L(e){if(!a.value)return;let t,l;e.touches?(p.value=e.touches[0].clientX,t=e.touches[0].clientX,m.value=e.touches[0].clientY,l=e.touches[0].clientY):(p.value=e.clientX,t=e.clientX,m.value=e.clientY,l=e.clientY);const u=e.target.classList[0],o=a.value.style;switch(!0){case u==="vue-ui-screenshot-handle-nw":o.top=`${l}px`,o.left=`${t}px`,o.width=`${b.value+(y.value-p.value)}px`,o.height=`${x.value+(h.value-m.value)}px`;break;case u==="vue-ui-screenshot-handle-ne":o.top=`${l}px`,o.width=`${b.value+(p.value-y.value)}px`,o.height=`${x.value+(h.value-m.value)}px`;break;case u==="vue-ui-screenshot-handle-sw":o.left=`${t}px`,o.width=`${b.value+(y.value-p.value)}px`,o.height=`${x.value+(m.value-h.value)}px`;break;case u==="vue-ui-screenshot-handle-se":o.width=`${b.value+(p.value-y.value)}px`,o.height=`${x.value+(m.value-h.value)}px`;break}}function A(e){if(!a.value)return;e.stopPropagation();const t=Array.from(e.target.classList);t.includes("vue-ui-screenshot-handle-se")||t.includes("vue-ui-screenshot-handle-sw")||t.includes("vue-ui-screenshot-handle-nw")||t.includes("vue-ui-screenshot-handle-ne")||(w.value=!0,a.value.style.pointerEvents="auto",e.touches?(d.value=e.touches[0].clientX,v.value=e.touches[0].clientY):(d.value=e.clientX,v.value=e.clientY),M.value=d.value,S.value=v.value,document.addEventListener("mousemove",g),document.addEventListener("touchmove",g),document.addEventListener("mouseup",f),document.addEventListener("touchend",f))}function f(){d.value=null,v.value=null,M.value=null,S.value=null,w.value=!1,document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",f),document.removeEventListener("touchmove",g),document.removeEventListener("touchend",f)}function g(e){if(!a.value)return;const t=a.value.getBoundingClientRect();let l,u;e.touches?(l=e.touches[0].clientX-d.value,u=e.touches[0].clientY-v.value,d.value=e.touches[0].clientX,v.value=e.touches[0].clientY):(l=e.clientX-d.value,u=e.clientY-v.value,d.value=e.clientX,v.value=e.clientY),a.value.style.top=`${t.top+u}px`,a.value.style.left=`${t.left+l}px`}function Y(e){e.target.removeEventListener("mousemove",L),e.target.removeEventListener("touchmove",L),document.removeEventListener("mousemove",g),document.removeEventListener("touchmove",g),document.removeEventListener("mouseup",f),document.removeEventListener("touchend",f),w.value=!1}function D(){const e=navigator.userAgent;return/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(e)?"tablet":/Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(e)?"mobile":"desktop"}const O=H;function _(){const e=document.getElementById(`vue-ui-screenshot-button-${$.value}`);e.innerHTML=`<svg id="saveButtonSvg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 20 20" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
|
2
|
-
<path fill="none" stroke="currentColor" d="M1 4 1 3C1 2 2 1 3 1L4 1M16 1 17 1C18 1 19 2 19 3L19 4M1 16 1 17C1 18 2 19 3 19L4 19M16 19 17 19C18 19 19 18 19 17L19 16M8 10A1 1 0 0012 10 1 1 0 008 10M5 13 5 8C5 7 5 7 6 7L14 7C15 7 15 7 15 8L15 13C15 14 15 14 14 14L6 14C5 14 5 14 5 13M7 6 13 6" />
|
|
3
|
-
</svg>`,document.getElementById(`vue-ui-screenshot-button-${$.value}`).animate([{opacity:"0.3"},{opacity:"1"},{opacity:"0.3"}],{duration:1e3,iterations:1/0}),e.classList.add("loading"),e.setAttribute("disabled","true")}function F(){if(!a.value)return;_();const e=a.value.getBoundingClientRect();I.value=setTimeout(()=>{U.default(document.body,{allowTaint:!0,width:e.width,height:e.height,x:e.left+window.scrollX,y:e.top+window.scrollY,useCORS:!0,scale:n.value.quality}).then(t=>{const l=t.toDataURL("image/png",1),u=l.split(",")[1],c=atob(u).length/1024;if(n.value.mode==="download"){const s=document.createElement("a");s.download="screenshot.png",s.href=l,s.click()}n.value.mode==="post"&&O("postImage",{createdAt:Date.now(),fileSize:`${c.toFixed(2)} KB`,image:l,x:e.left+window.scrollX,y:e.top+window.scrollY,screenWidth:window.innerWidth>0?window.innerWidth:screen.width,deviceType:D()})}).finally(E)},10)}function j(e){const t=n.value.style.handles.size/2+4,l=document.createElement("DIV");l.style.top=`${-t}px`,l.style.left=`${-t}px`,l.style.cursor="nw-resize",l.classList.add("vue-ui-screenshot-handle-nw"),l.dataset.cy="screenshot-handle-nw";const u=document.createElement("DIV");u.style.top=`${-t}px`,u.style.left="auto",u.style.right=`${-t}px`,u.style.cursor="ne-resize",u.classList.add("vue-ui-screenshot-handle-ne"),u.dataset.cy="screenshot-handle-ne";const o=document.createElement("DIV");o.style.top="auto",o.style.bottom=`${-t}px`,o.style.left=`${-t}px`,o.style.cursor="sw-resize",o.classList.add("vue-ui-screenshot-handle-sw"),o.dataset.cy="screenshot-handle-sw";const c=document.createElement("DIV");c.style.top="auto",c.style.left="auto",c.style.right=`${-t}px`,c.style.bottom=`${-t}px`,c.style.cursor="se-resize",c.classList.add("vue-ui-screenshot-handle-se"),c.dataset.cy="screenshot-handle-se";const s=document.createElement("BUTTON");s.innerHTML=`<svg id="saveButtonSvg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 20 20" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path fill="none" stroke="currentColor" d="M1 4 1 3C1 2 2 1 3 1L4 1M16 1 17 1C18 1 19 2 19 3L19 4M1 16 1 17C1 18 2 19 3 19L4 19M16 19 17 19C18 19 19 18 19 17L19 16M8 10A1 1 0 0012 10 1 1 0 008 10M5 13 5 8C5 7 5 7 6 7L14 7C15 7 15 7 15 8L15 13C15 14 15 14 14 14L6 14C5 14 5 14 5 13M7 6 13 6" /></svg><span>${n.value.translations.captureButton}</span>`,s.classList.add("vue-ui-screenshot-capture-button"),s.id=`vue-ui-screenshot-button-${$.value}`,s.style.position="absolute",s.style.top="50%",s.style.left="50%",s.style.transform="translate(-50%,-50%)",s.style.background=n.value.style.captureButton.background,s.style.color=n.value.style.captureButton.color,s.style.border=n.value.style.captureButton.border,s.style.outline="none",s.style.cursor="pointer",s.style.padding=n.value.style.captureButton.padding,s.style.fontFamily=n.value.style.captureButton.fontFamily,s.style.fontSize=`${n.value.style.captureButton.fontSize}px`,s.style.minHeight=`${n.value.style.captureButton.minHeight}px`,s.style.width="fit-content",s.style.display="flex",s.style.alignItems="center",s.style.justifyContent="center",s.style.gap="3px",s.style.borderRadius=`${n.value.style.captureButton.borderRadius}px`,s.style.boxShadow=n.value.style.captureButton.boxShadow,s.style.userSelect="none",s.style.opacity="0.95",s.style.textAlign="left",s.style.fontWeight=n.value.style.captureButton.bold?"bold":"normal",s.dataset.cy="screenshot-save-button",s.addEventListener("mouseenter",()=>{s.style.opacity="1"}),s.addEventListener("mouseleave",()=>{s.style.opacity="0.95"}),s.addEventListener("click",F),e.appendChild(s),[l,u,o,c].forEach((r,V)=>{r.classList.add(`handle-${V}`),r.dataset.html2canvasIgnore="true",r.style.position="absolute",r.style.height=`${n.value.style.handles.size}px`,r.style.width=`${n.value.style.handles.size}px`,r.style.background=n.value.style.handles.background,r.style.border=n.value.style.handles.border,r.style.borderRadius=`${n.value.style.handles.borderRadius}px`,r.style.pointerEvents="auto !important",r.addEventListener("mousedown",X),r.addEventListener("touchstart",X),e.appendChild(r)})}function N(){a.value||i.nextTick(()=>{const e=R();e.dataset.html2canvasIgnore=!0,W(e),j(e),a.value=e,e.addEventListener("touchmove",function(t){t.preventDefault()},{passive:!1}),document.body.appendChild(e),document.addEventListener("mousedown",A),document.addEventListener("touchstart",A),document.addEventListener("mouseup",Y),document.addEventListener("touchend",Y)})}return T({shoot:N,close:E}),(e,t)=>(i.openBlock(),i.createElementBlock("div"))}};exports.default=q;
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import { ref as i, computed as V, createElementBlock as U, openBlock as G, nextTick as K } from "vue";
|
|
2
|
-
import { u as P, A as q, z as J } from "./index-C3amwS0l.js";
|
|
3
|
-
import Q from "./html2canvas.esm-DgdJBc_o.js";
|
|
4
|
-
const ne = {
|
|
5
|
-
__name: "vue-ui-screenshot",
|
|
6
|
-
props: {
|
|
7
|
-
config: {
|
|
8
|
-
type: Object,
|
|
9
|
-
default() {
|
|
10
|
-
return {};
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
emits: ["postImage"],
|
|
15
|
-
setup(z, { expose: Y, emit: H }) {
|
|
16
|
-
const { vue_ui_screenshot: k } = P(), C = z, $ = i(`vue-ui-screenshot-${Math.random()}`), n = V(() => {
|
|
17
|
-
if (!Object.keys(C.config || {}).length)
|
|
18
|
-
return k;
|
|
19
|
-
const e = q({
|
|
20
|
-
defaultConfig: k,
|
|
21
|
-
userConfig: C.config
|
|
22
|
-
});
|
|
23
|
-
return J(e);
|
|
24
|
-
}), a = i(null), d = i(null), v = i(null), B = i(null), M = i(null), y = i(null), h = i(null), p = i(null), m = i(null), b = i(null), x = i(null), w = i(!1), S = i(null);
|
|
25
|
-
function T() {
|
|
26
|
-
const e = document.createElement("DIV"), { innerWidth: t, innerHeight: l } = window;
|
|
27
|
-
return e.style.position = "fixed", e.style.top = `${l ? l / 2 - n.value.style.captureArea.initialHeight / 2 : 200}px`, e.style.left = `${t ? t / 2 - n.value.style.captureArea.initialWidth / 2 : 100}px`, e.style.width = `${n.value.style.captureArea.initialWidth}px`, e.style.height = `${n.value.style.captureArea.initialHeight}px`, e.style.background = n.value.style.captureArea.background, e.style.cursor = "move", e.style.boxSizing = "border-box", e.style.border = n.value.style.captureArea.border, e.style.resize = "both", e.style.padding = "none !important", e.style.margin = "none !important", e.dataset.cy = "screenshot-overlay", e;
|
|
28
|
-
}
|
|
29
|
-
function E() {
|
|
30
|
-
a.value && (clearTimeout(S.value), a.value.remove(), a.value = null);
|
|
31
|
-
}
|
|
32
|
-
function R(e) {
|
|
33
|
-
const t = document.createElement("DIV");
|
|
34
|
-
t.classList.add("vue-ui-screenshot-info-text"), t.innerHTML = n.value.translations.info, t.dataset.html2canvasIgnore = "true", t.dataset.cy = "screenshot-info-text", t.style.background = n.value.style.info.background, t.style.color = n.value.style.info.color, t.style.fontWeight = n.value.style.info.bold ? "bold" : "normal", t.style.minWidth = `${n.value.style.info.minWidth}px`, t.style.left = "50%", t.style.padding = `${n.value.style.info.padding}px`, t.style.position = "absolute", t.style.textAlign = "center", t.style.top = `${n.value.style.info.top}px`, t.style.transform = "translateX(-50%)", t.style.borderRadius = `${n.value.style.info.borderRadius}px`, t.style.boxShadow = n.value.style.info.boxShadow, t.style.fontFamily = n.value.style.info.fontFamily, t.style.fontSize = `${n.value.style.info.fontSize}px`, t.style.border = n.value.style.info.border, t.style.userSelect = "none";
|
|
35
|
-
const l = document.createElement("BUTTON");
|
|
36
|
-
l.classList.add("vue-ui-screenshot-close-button"), l.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" stroke-width="2.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 6l-12 12" /><path d="M6 6l12 12" /></svg>', l.style.outline = "none", l.dataset.cy = "screenshot-close-button", l.style.display = "flex", l.style.cursor = "pointer", l.style.borderRadius = "50%", l.style.alignItems = "center", l.style.position = "absolute", l.style.justifyContent = "center", l.style.transformOrigin = "center", l.style.top = `${n.value.style.cancelButton.top}px`, l.style.right = `${n.value.style.cancelButton.right}px`, l.style.background = n.value.style.cancelButton.background, l.style.color = n.value.style.cancelButton.color, l.style.border = n.value.style.cancelButton.border, l.style.borderRadius = `${n.value.style.cancelButton.borderRadius}px`, l.style.height = `${n.value.style.cancelButton.size}px`, l.style.width = `${n.value.style.cancelButton.size}px`, l.addEventListener("click", E), t.appendChild(l), e.appendChild(t);
|
|
37
|
-
}
|
|
38
|
-
function I(e) {
|
|
39
|
-
a.value && (w.value = !0, e.touches ? (y.value = e.touches[0].clientX, h.value = e.touches[0].clientY) : (y.value = e.clientX, h.value = e.clientY), b.value = a.value.getBoundingClientRect().width, x.value = a.value.getBoundingClientRect().height, e.target.addEventListener("mousemove", L), e.target.addEventListener("touchmove", L));
|
|
40
|
-
}
|
|
41
|
-
function L(e) {
|
|
42
|
-
if (!a.value) return;
|
|
43
|
-
let t, l;
|
|
44
|
-
e.touches ? (p.value = e.touches[0].clientX, t = e.touches[0].clientX, m.value = e.touches[0].clientY, l = e.touches[0].clientY) : (p.value = e.clientX, t = e.clientX, m.value = e.clientY, l = e.clientY);
|
|
45
|
-
const u = e.target.classList[0], s = a.value.style;
|
|
46
|
-
switch (!0) {
|
|
47
|
-
case u === "vue-ui-screenshot-handle-nw":
|
|
48
|
-
s.top = `${l}px`, s.left = `${t}px`, s.width = `${b.value + (y.value - p.value)}px`, s.height = `${x.value + (h.value - m.value)}px`;
|
|
49
|
-
break;
|
|
50
|
-
case u === "vue-ui-screenshot-handle-ne":
|
|
51
|
-
s.top = `${l}px`, s.width = `${b.value + (p.value - y.value)}px`, s.height = `${x.value + (h.value - m.value)}px`;
|
|
52
|
-
break;
|
|
53
|
-
case u === "vue-ui-screenshot-handle-sw":
|
|
54
|
-
s.left = `${t}px`, s.width = `${b.value + (y.value - p.value)}px`, s.height = `${x.value + (m.value - h.value)}px`;
|
|
55
|
-
break;
|
|
56
|
-
case u === "vue-ui-screenshot-handle-se":
|
|
57
|
-
s.width = `${b.value + (p.value - y.value)}px`, s.height = `${x.value + (m.value - h.value)}px`;
|
|
58
|
-
break;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
function A(e) {
|
|
62
|
-
if (!a.value) return;
|
|
63
|
-
e.stopPropagation();
|
|
64
|
-
const t = Array.from(e.target.classList);
|
|
65
|
-
t.includes("vue-ui-screenshot-handle-se") || t.includes("vue-ui-screenshot-handle-sw") || t.includes("vue-ui-screenshot-handle-nw") || t.includes("vue-ui-screenshot-handle-ne") || (w.value = !0, a.value.style.pointerEvents = "auto", e.touches ? (d.value = e.touches[0].clientX, v.value = e.touches[0].clientY) : (d.value = e.clientX, v.value = e.clientY), B.value = d.value, M.value = v.value, document.addEventListener("mousemove", g), document.addEventListener("touchmove", g), document.addEventListener("mouseup", f), document.addEventListener("touchend", f));
|
|
66
|
-
}
|
|
67
|
-
function f() {
|
|
68
|
-
d.value = null, v.value = null, B.value = null, M.value = null, w.value = !1, document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", f), document.removeEventListener("touchmove", g), document.removeEventListener("touchend", f);
|
|
69
|
-
}
|
|
70
|
-
function g(e) {
|
|
71
|
-
if (!a.value) return;
|
|
72
|
-
const t = a.value.getBoundingClientRect();
|
|
73
|
-
let l, u;
|
|
74
|
-
e.touches ? (l = e.touches[0].clientX - d.value, u = e.touches[0].clientY - v.value, d.value = e.touches[0].clientX, v.value = e.touches[0].clientY) : (l = e.clientX - d.value, u = e.clientY - v.value, d.value = e.clientX, v.value = e.clientY), a.value.style.top = `${t.top + u}px`, a.value.style.left = `${t.left + l}px`;
|
|
75
|
-
}
|
|
76
|
-
function X(e) {
|
|
77
|
-
e.target.removeEventListener("mousemove", L), e.target.removeEventListener("touchmove", L), document.removeEventListener("mousemove", g), document.removeEventListener("touchmove", g), document.removeEventListener("mouseup", f), document.removeEventListener("touchend", f), w.value = !1;
|
|
78
|
-
}
|
|
79
|
-
function W() {
|
|
80
|
-
const e = navigator.userAgent;
|
|
81
|
-
return /(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(e) ? "tablet" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(
|
|
82
|
-
e
|
|
83
|
-
) ? "mobile" : "desktop";
|
|
84
|
-
}
|
|
85
|
-
const D = H;
|
|
86
|
-
function O() {
|
|
87
|
-
const e = document.getElementById(`vue-ui-screenshot-button-${$.value}`);
|
|
88
|
-
e.innerHTML = `<svg id="saveButtonSvg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 20 20" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
|
89
|
-
<path fill="none" stroke="currentColor" d="M1 4 1 3C1 2 2 1 3 1L4 1M16 1 17 1C18 1 19 2 19 3L19 4M1 16 1 17C1 18 2 19 3 19L4 19M16 19 17 19C18 19 19 18 19 17L19 16M8 10A1 1 0 0012 10 1 1 0 008 10M5 13 5 8C5 7 5 7 6 7L14 7C15 7 15 7 15 8L15 13C15 14 15 14 14 14L6 14C5 14 5 14 5 13M7 6 13 6" />
|
|
90
|
-
</svg>`, document.getElementById(`vue-ui-screenshot-button-${$.value}`).animate([
|
|
91
|
-
{ opacity: "0.3" },
|
|
92
|
-
{ opacity: "1" },
|
|
93
|
-
{ opacity: "0.3" }
|
|
94
|
-
], { duration: 1e3, iterations: 1 / 0 }), e.classList.add("loading"), e.setAttribute("disabled", "true");
|
|
95
|
-
}
|
|
96
|
-
function _() {
|
|
97
|
-
if (!a.value) return;
|
|
98
|
-
O();
|
|
99
|
-
const e = a.value.getBoundingClientRect();
|
|
100
|
-
S.value = setTimeout(() => {
|
|
101
|
-
Q(document.body, {
|
|
102
|
-
allowTaint: !0,
|
|
103
|
-
width: e.width,
|
|
104
|
-
height: e.height,
|
|
105
|
-
x: e.left + window.scrollX,
|
|
106
|
-
y: e.top + window.scrollY,
|
|
107
|
-
useCORS: !0,
|
|
108
|
-
scale: n.value.quality
|
|
109
|
-
}).then((t) => {
|
|
110
|
-
const l = t.toDataURL("image/png", 1), u = l.split(",")[1], c = atob(u).length / 1024;
|
|
111
|
-
if (n.value.mode === "download") {
|
|
112
|
-
const o = document.createElement("a");
|
|
113
|
-
o.download = "screenshot.png", o.href = l, o.click();
|
|
114
|
-
}
|
|
115
|
-
n.value.mode === "post" && D("postImage", {
|
|
116
|
-
createdAt: Date.now(),
|
|
117
|
-
fileSize: `${c.toFixed(2)} KB`,
|
|
118
|
-
image: l,
|
|
119
|
-
x: e.left + window.scrollX,
|
|
120
|
-
y: e.top + window.scrollY,
|
|
121
|
-
screenWidth: window.innerWidth > 0 ? window.innerWidth : screen.width,
|
|
122
|
-
deviceType: W()
|
|
123
|
-
});
|
|
124
|
-
}).finally(E);
|
|
125
|
-
}, 10);
|
|
126
|
-
}
|
|
127
|
-
function F(e) {
|
|
128
|
-
const t = n.value.style.handles.size / 2 + 4, l = document.createElement("DIV");
|
|
129
|
-
l.style.top = `${-t}px`, l.style.left = `${-t}px`, l.style.cursor = "nw-resize", l.classList.add("vue-ui-screenshot-handle-nw"), l.dataset.cy = "screenshot-handle-nw";
|
|
130
|
-
const u = document.createElement("DIV");
|
|
131
|
-
u.style.top = `${-t}px`, u.style.left = "auto", u.style.right = `${-t}px`, u.style.cursor = "ne-resize", u.classList.add("vue-ui-screenshot-handle-ne"), u.dataset.cy = "screenshot-handle-ne";
|
|
132
|
-
const s = document.createElement("DIV");
|
|
133
|
-
s.style.top = "auto", s.style.bottom = `${-t}px`, s.style.left = `${-t}px`, s.style.cursor = "sw-resize", s.classList.add("vue-ui-screenshot-handle-sw"), s.dataset.cy = "screenshot-handle-sw";
|
|
134
|
-
const c = document.createElement("DIV");
|
|
135
|
-
c.style.top = "auto", c.style.left = "auto", c.style.right = `${-t}px`, c.style.bottom = `${-t}px`, c.style.cursor = "se-resize", c.classList.add("vue-ui-screenshot-handle-se"), c.dataset.cy = "screenshot-handle-se";
|
|
136
|
-
const o = document.createElement("BUTTON");
|
|
137
|
-
o.innerHTML = `<svg id="saveButtonSvg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 20 20" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path fill="none" stroke="currentColor" d="M1 4 1 3C1 2 2 1 3 1L4 1M16 1 17 1C18 1 19 2 19 3L19 4M1 16 1 17C1 18 2 19 3 19L4 19M16 19 17 19C18 19 19 18 19 17L19 16M8 10A1 1 0 0012 10 1 1 0 008 10M5 13 5 8C5 7 5 7 6 7L14 7C15 7 15 7 15 8L15 13C15 14 15 14 14 14L6 14C5 14 5 14 5 13M7 6 13 6" /></svg><span>${n.value.translations.captureButton}</span>`, o.classList.add("vue-ui-screenshot-capture-button"), o.id = `vue-ui-screenshot-button-${$.value}`, o.style.position = "absolute", o.style.top = "50%", o.style.left = "50%", o.style.transform = "translate(-50%,-50%)", o.style.background = n.value.style.captureButton.background, o.style.color = n.value.style.captureButton.color, o.style.border = n.value.style.captureButton.border, o.style.outline = "none", o.style.cursor = "pointer", o.style.padding = n.value.style.captureButton.padding, o.style.fontFamily = n.value.style.captureButton.fontFamily, o.style.fontSize = `${n.value.style.captureButton.fontSize}px`, o.style.minHeight = `${n.value.style.captureButton.minHeight}px`, o.style.width = "fit-content", o.style.display = "flex", o.style.alignItems = "center", o.style.justifyContent = "center", o.style.gap = "3px", o.style.borderRadius = `${n.value.style.captureButton.borderRadius}px`, o.style.boxShadow = n.value.style.captureButton.boxShadow, o.style.userSelect = "none", o.style.opacity = "0.95", o.style.textAlign = "left", o.style.fontWeight = n.value.style.captureButton.bold ? "bold" : "normal", o.dataset.cy = "screenshot-save-button", o.addEventListener("mouseenter", () => {
|
|
138
|
-
o.style.opacity = "1";
|
|
139
|
-
}), o.addEventListener("mouseleave", () => {
|
|
140
|
-
o.style.opacity = "0.95";
|
|
141
|
-
}), o.addEventListener("click", _), e.appendChild(o), [l, u, s, c].forEach((r, N) => {
|
|
142
|
-
r.classList.add(`handle-${N}`), r.dataset.html2canvasIgnore = "true", r.style.position = "absolute", r.style.height = `${n.value.style.handles.size}px`, r.style.width = `${n.value.style.handles.size}px`, r.style.background = n.value.style.handles.background, r.style.border = n.value.style.handles.border, r.style.borderRadius = `${n.value.style.handles.borderRadius}px`, r.style.pointerEvents = "auto !important", r.addEventListener("mousedown", I), r.addEventListener("touchstart", I), e.appendChild(r);
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
function j() {
|
|
146
|
-
a.value || K(() => {
|
|
147
|
-
const e = T();
|
|
148
|
-
e.dataset.html2canvasIgnore = !0, R(e), F(e), a.value = e, e.addEventListener("touchmove", function(t) {
|
|
149
|
-
t.preventDefault();
|
|
150
|
-
}, { passive: !1 }), document.body.appendChild(e), document.addEventListener("mousedown", A), document.addEventListener("touchstart", A), document.addEventListener("mouseup", X), document.addEventListener("touchend", X);
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
return Y({
|
|
154
|
-
shoot: j,
|
|
155
|
-
close: E
|
|
156
|
-
}), (e, t) => (G(), U("div"));
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
export {
|
|
160
|
-
ne as default
|
|
161
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BprEQiKM.cjs"),Me=require("./Title-BJ2lOafm.cjs"),Se=require("./usePrinter-CAGQW2cC.cjs"),He=require("./Tooltip-7LYTKhzY.cjs"),Ue=require("./Legend-DgFKLfrI.cjs"),We=require("./vue-ui-skeleton-a_FvGOK6.cjs"),Ge=require("./DataTable-Bm_s0nuy.cjs"),je=require("./vue-ui-accordion-B-rPe8KM.cjs"),Be=require("./useResponsive-DQmBAoBf.cjs"),Ne=require("./useNestedProp-Cf-JPzTa.cjs"),Xe=require("./PackageVersion-t17AmNwO.cjs"),Ye=require("./PenAndPaper-aD8jM7bo.cjs"),Ke=require("./useUserOptionState-BgepsfED.cjs"),Ze=require("./useChartAccessibility-Cm7nkzTG.cjs"),Je=require("./BaseIcon-C86xshge.cjs"),Qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function Oe(r,c){const i=r.length;if(i===0)throw new Error(`Max aspect ratio cannot be computed: ${r} is an empty array`);{let d=1/0,u=-1/0,v=0;for(let f=0;f<i;f+=1){const m=r[f].normalizedValue;m<d&&(d=m),m>u&&(u=m),v+=m}return Math.max(c**2*u/v**2,v**2/(c**2*d))}}function _e(r){const{xOffset:c,yOffset:i,width:d,height:u}=r;return{x0:c,y0:i,x1:c+d,y1:i+u}}function et(r,c,i){if(r.length===0)return!0;{const d=r.concat(c),u=Oe(r,i),v=Oe(d,i);return u>=v}}function tt(r){const c=[],i=r.length;for(let d=0;d<i;d+=1){const u=r[d],v=u.length;for(let h=0;h<v;h+=1)c.push(u[h])}return c}function ot(r,c){const i={...c,children:r};return ze(i)}function lt(r){return(r.x1-r.x0)*(r.y1-r.y0)}function Pe(r,c){const{width:i,height:d,xOffset:u,yOffset:v}=Q(c),h=r.length,f=r.map(y=>y.normalizedValue||0).reduce((y,g)=>y+g,0),m=f/d,x=f/i;let C=u,$=v;const b=[];if(i>=d){for(let y=0;y<h;y+=1){const g=r[y],k=$+g.normalizedValue/m,O={x0:C,y0:$,x1:C+m,y1:k},T=Object.assign({},g,O);$=k,b.push(T)}return b}else{for(let y=0;y<h;y+=1){const g=r[y],k=C+g.normalizedValue/x,O={x0:C,y0:$,x1:k,y1:$+x},T=Object.assign({},g,O);C=k,b.push(T)}return b}}function at(r){const c=Q(r),i=c.width,d=c.height;return Math.min(i,d)}function nt(r,c){const i=r.length,d=r.map(m=>m.value??0).reduce((m,x)=>m+x,0),u=c/d,v=[];let h,f;for(let m=0;m<i;m+=1)f=r[m],h=Object.assign({},f,{normalizedValue:f.value*(u||0)}),v.push(h);return v}function Q(r){const{x0:c,y0:i,x1:d,y1:u}=r;return{xOffset:c,yOffset:i,width:d-c,height:u-i}}function rt(r,c,i,d){let u=r,v=c,h=i,f=d;for(;;){const m=u.length;if(m===0){const b=Pe(v,h);return f.concat(b)}const x=at(h),C=u[0],$=u.slice(1,m);if(et(v,C,x)){const b=v.concat(C);u=$,v=b,h=h,f=f}else{const b=v.length;let y=0;for(let T=0;T<b;T+=1)y+=v[T].normalizedValue;const g=st(h,y),k=Pe(v,h),O=f.concat(k);u=u,v=[],h=g,f=O}}}function ze(r){if(typeof r.children>"u"||!r.children.length)return[r];{const c=nt(r.children,lt(r)),i=rt(c,[],r,[]),d=i.length,u=[];for(let h=0;h<d;h+=1)u.push(ze(i[h]));return tt(u)}}function st(r,c){const{width:i,height:d,xOffset:u,yOffset:v}=Q(r);if(i>=d){const h=c/d,f=i-h,m={xOffset:u+h,yOffset:v,width:f,height:d};return _e(m)}else{const h=c/i,f=d-h,m={xOffset:u,yOffset:v+h,width:i,height:f};return _e(m)}}const ut=["id"],it={key:4,class:"vue-ui-treemap-breadcrumbs","data-html2canvas-ignore":""},ct=["tabindex","onClick","onKeydown","data-last-crumb","onMouseenter","onFocus"],dt={class:"vue-ui-treemap-crumb-unit"},vt={class:"vue-ui-treemap-crumb-unit-label"},ht={key:0,style:{width:"24px",display:"flex","align-items":"center"}},pt={key:0,class:"vue-ui-treemap-crumb-unit-arrow"},ft=["xmlns","viewBox"],mt={key:0},gt=["id"],yt=["stop-color"],bt=["stop-color"],kt=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],Ct=["x","y","height","width"],wt={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},xt={key:6,class:"vue-data-ui-watermark"},$t=["onClick"],Tt={key:0},St={key:1},Bt=["innerHTML"],Nt={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(r,{expose:c,emit:i}){const{vue_ui_treemap:d}=s.useConfig(),u=r,v=i,h=e.useSlots();e.onMounted(()=>{h["chart-background"]&&console.warn("VueUiTreemap does not support the #chart-background slot.")});const f=e.computed(()=>!!u.dataset&&u.dataset.length),m=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),x=e.ref(s.createUid()),C=e.ref(!1),$=e.ref(""),b=e.ref(!1),y=e.ref(0),g=e.ref([]),k=e.ref(null),O=e.ref(null),T=e.ref(null),ee=e.ref(null),te=e.ref(null),oe=e.ref(0),le=e.ref(0),ae=e.ref(0),o=e.computed({get:()=>ue(),set:t=>t}),{userOptionsVisible:K,setUserOptionsVisibility:ne,keepUserOptionState:re}=Ke.useUserOptionState({config:o.value}),{svgRef:se}=Ze.useChartAccessibility({config:o.value.style.chart.title});function ue(){const t=Ne.useNestedProp({userConfig:u.config,defaultConfig:d});return t.theme?{...Ne.useNestedProp({userConfig:s.themes.vue_ui_treemap[t.theme]||u.config,defaultConfig:t}),customPalette:s.themePalettes[t.theme]||s.palette}:t}e.watch(()=>u.config,t=>{o.value=ue(),K.value=!o.value.userOptions.showOnChartHover,oe.value+=1,le.value+=1,ae.value+=1,S.value.showTable=o.value.table.show,S.value.showTooltip=o.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:ie,isImaging:ce,generatePdf:de,generateImage:ve}=Se.usePrinter({elementId:`treemap_${x.value}`,fileName:o.value.style.chart.title.text||"vue-ui-treemap",options:o.value.userOptions.print}),Ve=e.computed(()=>o.value.userOptions.show&&!o.value.style.chart.title.text),H=e.computed(()=>s.convertCustomPalette(o.value.customPalette)),S=e.ref({showTable:o.value.table.show,showTooltip:o.value.style.chart.tooltip.show}),_=e.ref({height:o.value.style.chart.height,width:o.value.style.chart.width}),F=e.computed(()=>({bottom:_.value.height-o.value.style.chart.padding.bottom,height:_.value.height-o.value.style.chart.padding.top-o.value.style.chart.padding.bottom,left:o.value.style.chart.padding.left,right:_.value.width-o.value.style.chart.padding.right,top:o.value.style.chart.padding.top,vbHeight:_.value.height,vbWidth:_.value.width,width:_.value.width-o.value.style.chart.padding.left-o.value.style.chart.padding.right}));function he(t){t.forEach((a,l)=>{a.id=s.createUid(),a.color=s.convertColorToHex(a.color)||H.value[l]||s.palette[l]||s.palette[l%s.palette.length],a.children&&(a.children.forEach(n=>{n.parentId=a.id,n.color=a.color}),he(a.children))})}const P=e.ref(u.dataset),U=e.ref(null);e.onMounted(()=>{Ee()});function Ee(){if(s.objectIsEmpty(u.dataset)&&s.error({componentName:"VueUiTreemap",type:"dataset"}),he(P.value),o.value.responsive){const t=Be.throttle(()=>{const{width:a,height:l}=Be.useResponsive({chart:k.value,title:o.value.style.chart.title.text?O.value:null,legend:o.value.style.chart.legend.show?T.value:null,source:ee.value,noTitle:te.value});requestAnimationFrame(()=>{_.value.width=a,_.value.height=l})});U.value=new ResizeObserver(t),U.value.observe(k.value.parentNode)}}e.onBeforeUnmount(()=>{U.value&&U.value.disconnect()});const A=e.ref(P.value),q=e.computed(()=>A.value.map((t,a)=>({...t,color:s.convertColorToHex(t.color)||H.value[a]||s.palette[a]||s.palette[a%s.palette.length]})).filter(t=>!g.value.includes(t.id))),L=e.computed(()=>P.value.filter(t=>!g.value.includes(t.id)).map(t=>t.value||0).reduce((t,a)=>t+a,0)),pe=e.computed({get(){let t=[...q.value];return o.value.style.chart.layout.sorted&&(t=[...q.value].sort((a,l)=>l.value-a.value)),t.map(a=>({...a}))},set(t){return t}});function fe(t,a){return t.value/a}function Fe(t,a,l){const n=o.value.style.chart.layout.rects.colorRatio-fe(a,l);return s.lightenHexColor(t,n<0?0:n)}function me(t,a,l,n){return t.map((p,E)=>{const Y=Fe(s.convertColorToHex(a)||H.value[E]||s.palette[E]||s.palette[E%s.palette.length],p,n),qe=fe(p,n);return{...p,color:Y,proportion:qe,parentName:l,children:p.children?me(p.children,Y,p.name,n):void 0}})}const M=e.computed(()=>ot(pe.value.map((t,a)=>{const l=t.children?t.children.reduce((n,p)=>n+p.value,0):t.value;return{value:t.value,id:t.id,children:t.children?me(t.children.sort((n,p)=>p.value-n.value),t.color,t.name,l):void 0,color:t.color,name:t.name}}),{x0:F.value.left*2,y0:F.value.top,x1:F.value.width,y1:F.value.height}));function ge({y0:t,y1:a}){return a-t<=0?1e-4:a-t}function ye({x0:t,x1:a}){return a-t<=0?1e-4:a-t}function I(t){const a=o.value.style.chart.layout.labels.fontSize*(t.proportion*2>1?1:t.proportion*2);return a<o.value.style.chart.layout.labels.minFontSize?o.value.style.chart.layout.labels.minFontSize:a}function Ie(t){b.value=t,y.value+=1}const D=e.computed(()=>({startX:0,startY:0,width:F.value.vbWidth,height:F.value.vbHeight}));function R(t,a=P.value){for(const l of a){if(l.id===t)return l;if(l.children){const n=R(t,l.children);if(n)return n}}return null}const w=e.ref([]),z=e.computed(()=>w.value.length>0);function W(t){var l;if(!t){A.value=P.value.slice(),v("selectDatapoint",void 0),w.value=[];return}const a=R(t.id);if(a&&((l=a.children)!=null&&l.length))w.value.push(a.id),A.value=a.children.slice(),v("selectDatapoint",t);else if(t.parentId){w.value.push(t.parentId);const n=R(t.parentId);A.value=n.children.slice(),v("selectDatapoint",t)}else if(w.value.length>0){w.value.pop();const n=w.value[w.value.length-1];if(n){const p=R(n);A.value=p.children.slice()}else A.value=P.value.slice(),w.value=[],v("selectDatapoint",void 0)}}function Re(t){var l;const a=R(t.id);return!!((l=a==null?void 0:a.children)!=null&&l.length||t.parentId)}const V=e.computed(()=>{const t=[{id:null,label:"All"}];if(w.value.length>0){let a=R(w.value[w.value.length-1]);const l=[];for(;a;)l.unshift(a),a=a.parentId?R(a.parentId):null;for(const n of l)t.push({id:n.id,label:n.name,node:n})}return t}),B=e.ref(null),be=e.computed(()=>P.value.map((t,a)=>({...t,color:s.convertColorToHex(t.color)||H.value[a]||s.palette[a]||s.palette[a%s.palette.length],shape:"square"})).sort((t,a)=>a.value-t.value).map((t,a)=>({...t,proportion:t.value/P.value.map(l=>l.value).reduce((l,n)=>l+n,0),opacity:g.value.includes(t.id)?.5:1}))),Ae=e.computed(()=>({cy:"treemap-div-legend",backgroundColor:o.value.style.chart.legend.backgroundColor,color:o.value.style.chart.legend.color,fontSize:o.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:o.value.style.chart.legend.bold?"bold":""}));function ke(t){z.value=!1,B.value=null,g.value.includes(t.id)?g.value=g.value.filter(a=>a!==t.id):g.value.length<u.dataset.length-1&&g.value.push(t.id),v("selectLegend",pe.value)}const Z=e.ref(null);function Le({datapoint:t,seriesIndex:a}){B.value=t,Z.value={datapoint:t,seriesIndex:a,config:o.value,series:q.value};const l=o.value.style.chart.tooltip.customFormat;if(s.isFunction(l)&&s.functionReturnsString(()=>l({seriesIndex:a,datapoint:t,series:q.value,config:o.value})))$.value=l({seriesIndex:a,datapoint:t,series:q.value,config:o.value});else{let n="";n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${o.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`,n+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" fill="${t.color}"/></svg>`,n+=`<b>${s.applyDataLabel(o.value.style.chart.layout.labels.formatter,t.value,s.dataLabel({p:o.value.style.chart.layout.labels.prefix,v:t.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.tooltip.roundingValue}),{datapoint:t,seriesIndex:a})}</b>`,$.value=`<div>${n}</div>`}C.value=!0}const N=e.computed(()=>{const t=M.value.map(l=>({name:l.name,color:l.color})),a=M.value.map(l=>l.value);return{head:t,body:a}});function Ce(){e.nextTick(()=>{const t=N.value.head.map((n,p)=>[[n.name],[N.value.body[p]],[isNaN(N.value.body[p]/L.value)?"-":N.value.body[p]/L.value*100]]),a=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(t),l=s.createCsvContent(a);s.downloadCsv({csvContent:l,title:o.value.style.chart.title.text||"vue-ui-treemap"})})}const G=e.computed(()=>{const t=[o.value.table.columnNames.series,o.value.table.columnNames.value,o.value.table.columnNames.percentage],a=N.value.head.map((p,E)=>{const Y=s.applyDataLabel(o.value.style.chart.layout.labels.formatter,N.value.body[E],s.dataLabel({p:o.value.style.chart.layout.labels.prefix,v:N.value.body[E],s:o.value.style.chart.layout.labels.suffix,r:o.value.table.td.roundingValue}));return[{color:p.color,name:p.name,shape:"square"},Y,isNaN(N.value.body[E]/L.value)?"-":s.dataLabel({v:N.value.body[E]/L.value*100,s:"%",r:o.value.table.td.roundingPercentage})]}),l={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint};return{colNames:[o.value.table.columnNames.series,o.value.table.columnNames.value],head:t,body:a,config:l}});function De(){return M.value}function we(){S.value.showTable=!S.value.showTable}function xe(){S.value.showTooltip=!S.value.showTooltip}const j=e.ref(!1);function J(){j.value=!j.value}const X=e.ref(null);function $e(t){X.value=t}function Te(){X.value=null}return c({getData:De,generateCsv:Ce,generateImage:ve,generatePdf:de,toggleTable:we,toggleTooltip:xe,toggleAnnotator:J}),(t,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:k,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${o.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; ${o.value.responsive?"height: 100%;":""} text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`treemap_${x.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(ne)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(ne)(!1))},[o.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ye.PenAndPaper,{key:0,svgRef:e.unref(se),backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,active:j.value,onClose:J},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Ve.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:te,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:O,style:e.normalizeStyle(`width:100%;background:${o.value.style.chart.backgroundColor};padding-bottom:6px`)},[(e.openBlock(),e.createBlock(Me._sfc_main,{key:`title_${oe.value}`,config:{title:{cy:"treemap-div-title",...o.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),o.value.userOptions.show&&f.value&&(e.unref(re)||e.unref(K))?(e.openBlock(),e.createBlock(Se.UserOptions,{ref:"details",key:`user_option_${y.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(ie),isImaging:e.unref(ce),uid:x.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasFullscreen:o.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:S.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:k.value,position:o.value.userOptions.position,hasAnnotator:o.value.userOptions.buttons.annotator,isAnnotation:j.value,onToggleFullscreen:Ie,onGeneratePdf:e.unref(de),onGenerateCsv:Ce,onGenerateImage:e.unref(ve),onToggleTable:we,onToggleTooltip:xe,onToggleAnnotator:J,style:e.normalizeStyle({visibility:e.unref(re)?e.unref(K)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:n})=>[e.renderSlot(t.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:n})),void 0,!0)]),key:"0"}:void 0,t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),V.value.length>1?(e.openBlock(),e.createElementBlock("nav",it,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(l,n)=>(e.openBlock(),e.createElementBlock("span",{role:"button",tabindex:n<V.value.length-1?0:void 0,key:l.id||"root",onClick:p=>n===V.value.length-1?()=>{}:W(l.node),onKeydown:[e.withKeys(e.withModifiers(p=>n===V.value.length-1?void 0:W(l.node),["prevent"]),["enter"]),e.withKeys(e.withModifiers(p=>n===V.value.length-1?void 0:W(l.node),["prevent"]),["space"])],class:"vue-ui-treemap-crumb","data-last-crumb":n===V.value.length-1,style:e.normalizeStyle({color:o.value.style.chart.color}),onMouseenter:p=>$e(n),onMouseleave:Te,onFocus:p=>$e(n),onBlur:Te},[e.createElementVNode("span",dt,[e.createElementVNode("span",vt,[e.renderSlot(t.$slots,"breadcrumb-label",e.mergeProps({ref_for:!0},{crumb:l,isRoot:n===0,isFocus:X.value===n}),()=>[n===0?(e.openBlock(),e.createElementBlock("div",ht,[e.createVNode(Je.default,{name:X.value===0?"homeFilled":"home",stroke:o.value.style.chart.color},null,8,["name","stroke"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(l.label),1)],64))],!0)]),n<V.value.length-1?(e.openBlock(),e.createElementBlock("span",pt,[e.renderSlot(t.$slots,"breadcrumb-arrow",{},()=>[a[5]||(a[5]=e.createTextVNode(" › "))],!0)])):e.createCommentVNode("",!0)])],44,ct))),128))])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:5,ref_key:"svgRef",ref:se,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!z.value,"vue-data-ui-zoom-minus":z.value}),viewBox:`${D.value.startX} ${D.value.startY} ${D.value.width<=0?10:D.value.width} ${D.value.height<=0?10:D.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:transparent;color:${o.value.style.chart.color}`)},[e.createVNode(Xe._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",mt,[e.createElementVNode("radialGradient",{id:`tgrad_${l.id}`,gradientTransform:"translate(-1, -1.000001) scale(2, 2)"},[e.createElementVNode("stop",{offset:"18%","stop-color":l.color},null,8,yt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.lightenHexColor)(l.color,o.value.style.chart.layout.rects.gradient.intensity/100)},null,8,bt)],8,gt)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:ge(l),width:ye(l),fill:m.value?l.color:o.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${l.id})`:l.color,rx:o.value.style.chart.layout.rects.borderRadius,stroke:B.value&&B.value.id===l.id?o.value.style.chart.layout.rects.selected.stroke:o.value.style.chart.layout.rects.stroke,"stroke-width":B.value&&B.value.id===l.id?o.value.style.chart.layout.rects.selected.strokeWidth:o.value.style.chart.layout.rects.strokeWidth,onClick:e.withModifiers(p=>W(l),["stop"]),onMouseenter:()=>Le({datapoint:l,seriesIndex:n}),onMouseleave:a[0]||(a[0]=p=>{B.value=null,C.value=!1}),style:e.normalizeStyle(`opacity:${B.value?B.value.id===l.id?1:o.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:e.normalizeClass(["vue-ui-treemap-rect",Re(l)?"vue-data-ui-zoom-plus":z.value?"vue-data-ui-zoom-minus":""])},null,46,kt),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:ge(l),width:ye(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",wt,[o.value.style.chart.layout.labels.showDefaultLabels&&(l.proportion>o.value.style.chart.layout.labels.hideUnderProportion||z.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${I(l)/1.5}px);text-align:left;line-height:${I(l)<14?14:I(l)}px;padding:${I(l)/3}px; color:${e.unref(s.adaptColorToBackground)(l.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${I(l)}px;`)},e.toDisplayString(l.name),5),a[6]||(a[6]=e.createElementVNode("br",null,null,-1)),e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${I(l)}px;`)},e.toDisplayString(e.unref(s.applyDataLabel)(o.value.style.chart.layout.labels.formatter,l.value,e.unref(s.dataLabel)({p:o.value.style.chart.layout.labels.prefix,v:l.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.layout.labels.rounding}),{datapoint:l})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"rect",e.mergeProps({ref_for:!0},{rect:l,shouldShow:l.proportion>o.value.style.chart.layout.labels.hideUnderProportion||z.value,fontSize:I(l),isZoom:z.value,textColor:e.unref(s.adaptColorToBackground)(l.color)}),void 0,!0)])],8,Ct))]))),256)),e.renderSlot(t.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:F.value,isZoom:z.value,rect:B.value,config:o.value})),void 0,!0)],14,ft)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",xt,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ie)||e.unref(ce)})),void 0,!0)])):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(We.default,{key:7,config:{type:"treemap",style:{backgroundColor:o.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:T},[o.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ue.Legend,{key:`legend_${ae.value}`,legendSet:be.value,config:Ae.value,id:`treemap_legend_${x.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>ke(l))},{item:e.withCtx(({legend:l,index:n})=>[e.createElementVNode("div",{onClick:p=>ke(l),style:e.normalizeStyle(`opacity:${g.value.includes(l.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(s.applyDataLabel)(o.value.style.chart.layout.labels.formatter,l.value,e.unref(s.dataLabel)({p:o.value.style.chart.layout.labels.prefix,v:l.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.legend.roundingValue}),{datapoint:l}))+" ",1),g.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",St," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Tt," ("+e.toDisplayString(isNaN(l.value/L.value)?"-":(l.value/L.value*100).toFixed(o.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,$t)]),_:1},8,["legendSet","config","id"])):e.renderSlot(t.$slots,"legend",{key:1,legend:be.value},void 0,!0)],512),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"source",ref:ee,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(He._sfc_main,{show:S.value.showTooltip&&C.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,fontSize:o.value.style.chart.tooltip.fontSize,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:k.value,content:$.value,isFullscreen:b.value,isCustom:e.unref(s.isFunction)(o.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Z.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Z.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),f.value?(e.openBlock(),e.createBlock(je.default,{key:9,hideDetails:"",config:{open:S.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ge.DataTable,{key:`table_${le.value}`,colNames:G.value.colNames,head:G.value.head,body:G.value.body,config:G.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>S.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Bt)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,ut))}},Ot=Qe._export_sfc(Nt,[["__scopeId","data-v-3119d5fd"]]);exports.default=Ot;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),h=require("./index-BprEQiKM.cjs"),pe=require("./Title-BJ2lOafm.cjs"),ne=require("./usePrinter-CAGQW2cC.cjs"),ee=require("./useResponsive-DQmBAoBf.cjs"),me=require("./vue-ui-accordion-B-rPe8KM.cjs"),ge=require("./DataTable-Bm_s0nuy.cjs"),re=require("./useNestedProp-Cf-JPzTa.cjs"),ye=require("./PackageVersion-t17AmNwO.cjs"),be=require("./Tooltip-7LYTKhzY.cjs"),we=require("./PenAndPaper-aD8jM7bo.cjs"),ke=require("./useUserOptionState-BgepsfED.cjs"),Ce=require("./useChartAccessibility-Cm7nkzTG.cjs"),xe=require("./usePanZoom-PXRi2Rwx.cjs"),$e=require("./BaseIcon-C86xshge.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function se({word:b,fontSize:p,pad:f,canvas:i,ctx:c,svg:n}){c.save(),c.font=`${n.style&&n.style.bold?"bold ":""}${p}px Arial`;const a=c.measureText(b.name),r=Math.ceil(a.width)+2+(f?f*2:0),u=Math.ceil(p)+2+(f?f*2:0);i.width=r,i.height=u,c.clearRect(0,0,r,u),c.font=`${n.style&&n.style.bold?"bold ":""}${p}px Arial`,c.textAlign="center",c.textBaseline="middle",c.fillStyle="black",c.fillText(b.name,r/2,u/2);const S=c.getImageData(0,0,r,u).data,C=[];for(let T=0;T<u;T+=1)for(let t=0;t<r;t+=1)S[(T*r+t)*4+3]>1&&C.push([t,T]);return c.restore(),{w:r,h:u,wordMask:C}}function ue({mask:b,maskW:p,maskH:f,wx:i,wy:c,wordMask:n}){for(let a=0;a<n.length;a+=1){const r=i+n[a][0],u=c+n[a][1];if(r<0||u<0||r>=p||u>=f||b[u*p+r])return!1}return!0}function ie({mask:b,maskW:p,maskH:f,wx:i,wy:c,wordMask:n}){for(let a=0;a<n.length;a+=1){const r=i+n[a][0],u=c+n[a][1];r>=0&&u>=0&&r<p&&u<f&&(b[u*p+r]=1)}}function Te({wordMask:b,w:p,h:f,dilation:i}){const c=new Set(b.map(([a,r])=>`${a},${r}`)),n=new Set(c);for(let[a,r]of b)for(let u=-i;u<=i;u+=1)for(let $=-i;$<=i;$+=1){if(u===0&&$===0)continue;const S=a+u,C=r+$;S>=0&&S<p&&C>=0&&C<f&&n.add(`${S},${C}`)}return Array.from(n).map(a=>a.split(",").map(Number))}function Pe({words:b,proximity:p=0,svg:f}){const{width:i,height:c}=f,n=Math.round(i),a=Math.round(c),r=1,u=f.minFontSize,$=f.maxFontSize,S=b.map(m=>m.value),C=Math.min(...S),T=Math.max(...S),t=new Uint8Array(n*a),O=document.createElement("canvas"),E=O.getContext("2d",{willReadFrequently:!0});O.width=n,O.height=a;const R=6,H=2,L=2,q=1,W=Math.floor(n/2),d=Math.floor(a/2),Y=[...b].sort((m,P)=>P.value-m.value),U=[];for(const m of Y){let P=u;T!==C&&(P=(m.value-C)/(T-C)*($-u)+u),P=Math.max(u,Math.min($,P));let A=!1,N=P;for(;!A&&N>=r;){let{w:z,h:B,wordMask:v}=se({word:m,fontSize:N,pad:p,canvas:O,ctx:E,svg:f});v=Te({wordMask:v,w:z,h:B,dilation:2});let F=0,M=0;for(;F<Math.max(n,a)&&!A&&M<1e4;){for(let x=0;x<360;x+=R){M+=1;const g=Math.round(W+F*Math.cos(x*Math.PI/180)-z/2),w=Math.round(d+F*Math.sin(x*Math.PI/180)-B/2);if(!(g<0||w<0||g+z>n||w+B>a)&&ue({mask:t,maskW:n,maskH:a,wx:g,wy:w,wordMask:v})){U.push({...m,x:g-n/2,y:w-a/2,fontSize:N,width:z,height:B,angle:0}),ie({mask:t,maskW:n,maskH:a,wx:g,wy:w,wordMask:v}),A=!0;break}}F+=H}A||(N-=1)}if(!A&&N<r){N=r;const{w:z,h:B,wordMask:v}=se({word:m,fontSize:N,pad:p,canvas:O,ctx:E,svg:f});let F=0,M=0;for(;F<Math.max(n,a)&&!A&&M<25e3;){for(let x=0;x<360;x+=L){M+=1;const g=Math.round(W+F*Math.cos(x*Math.PI/180)-z/2),w=Math.round(d+F*Math.sin(x*Math.PI/180)-B/2);if(!(g<0||w<0||g+z>n||w+B>a)&&ue({mask:t,maskW:n,maskH:a,wx:g,wy:w,wordMask:v})){U.push({...m,x:g-n/2,y:w-a/2,fontSize:N,width:z,height:B,angle:0}),ie({mask:t,maskW:n,maskH:a,wx:g,wy:w,wordMask:v}),A=!0;break}}F+=q}}}return U.sort((m,P)=>P.fontSize-m.fontSize)}const Ne=["id"],ze=["xmlns","viewBox"],Be=["width","height"],Fe=["transform"],Me=["fill","font-weight","x","y","font-size","transform","onMouseover"],Oe={key:4,class:"vue-data-ui-watermark"},Ae={key:5,"data-html2canvas-ignore":"",class:"reset-wrapper"},Ve=["innerHTML"],Ie={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(b,{expose:p}){e.useCssVars(o=>({"21c5b618":o.slicerColor}));const{vue_ui_word_cloud:f}=h.useConfig(),i=b,c=e.computed({get(){return!!i.dataset&&i.dataset.length},set(o){return o}}),n=e.ref(h.createUid()),a=e.ref(0),r=e.ref(null),u=e.ref(null),$=e.ref(null),S=e.ref(0),C=e.ref(0),T=e.ref(!1),t=e.computed({get:()=>W(),set:o=>o}),O=e.ref(E());function E(){return typeof i.dataset=="string"?h.createWordCloudDatasetFromPlainText(i.dataset):i.dataset.map((o,s)=>({...o,value:h.checkNaN(o.value)}))}e.watch(()=>i.dataset,()=>{O.value=E(),x()});const{userOptionsVisible:R,setUserOptionsVisibility:H,keepUserOptionState:L}=ke.useUserOptionState({config:t.value}),{svgRef:q}=Ce.useChartAccessibility({config:t.value.style.chart.title});function W(){const o=re.useNestedProp({userConfig:i.config,defaultConfig:f});return o.theme?{...re.useNestedProp({userConfig:h.themes.vue_ui_word_cloud[o.theme]||i.config,defaultConfig:o}),customPalette:h.themePalettes[o.theme]||h.palette}:o}e.watch(()=>i.config,o=>{t.value=W(),R.value=!t.value.userOptions.showOnChartHover,P(),S.value+=1,C.value+=1,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const d=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize,bold:t.value.style.chart.words.bold}),Y=ee.debounce(()=>{x()},10),U=ee.throttle(()=>{const{width:o,height:s}=ee.useResponsive({chart:r.value,title:t.value.style.chart.title.text?u.value:null,source:$.value});requestAnimationFrame(()=>{d.value.width=o,d.value.height=s,e.nextTick(Y)})}),m=e.ref(null);e.onMounted(P);function P(){h.objectIsEmpty(i.dataset)?h.error({componentName:"VueUiWordCloud",type:"dataset"}):O.value.forEach((o,s)=>{h.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{c.value=!1,h.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:s})})}),t.value.responsive&&(m.value=new ResizeObserver(U),m.value.observe(r.value.parentNode))}e.onBeforeUnmount(()=>{m.value&&m.value.disconnect()});const{isPrinting:A,isImaging:N,generatePdf:z,generateImage:B}=ne.usePrinter({elementId:`wordCloud_${n.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud",options:t.value.userOptions.print}),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show});function F(o,s,l="Arial"){const y=document.createElement("canvas").getContext("2d");return y.font=`${s}px ${t.value.style.chart.words.bold?"bold":"normal"} ${l}`,{width:y.measureText(o).width+t.value.style.chart.words.proximity,height:s}}const M=e.ref([]);e.watch(()=>i.dataset,x,{immediate:!0});function x(){const o=[...O.value].map(y=>y.value),s=Math.max(...o),l=Math.min(...o),k=[...O.value].map((y,V)=>{let I=(y.value-l)/(s-l)*(d.value.maxFontSize-d.value.minFontSize)+d.value.minFontSize;I=isNaN(I)?d.value.minFontSize:I;const ae=F(y.name,I);return{...y,id:h.createUid(),fontSize:I,width:ae.width,height:ae.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[V]||t.value.customPalette[V%t.value.customPalette.length]||h.palette[V]||h.palette[V%h.palette.length]:t.value.style.chart.words.color}});M.value=Pe({words:k,svg:d.value,proximity:t.value.style.chart.words.proximity})}const g=e.computed(()=>{const o=M.value.map(l=>({name:l.name,color:l.color})),s=M.value.map(l=>l.value);return{head:o,body:s}});function w(){e.nextTick(()=>{const o=g.value.head.map((k,y)=>[[k.name],[g.value.body[y]]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=h.createCsvContent(s);h.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const j=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],s=g.value.head.map((y,V)=>{const I=h.dataLabel({p:t.value.table.td.prefix,v:g.value.body[V],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:y.color,name:y.name},I]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:s,config:l}}),X=e.ref(!1);function ce(o){X.value=o,a.value+=1}function de(){return M.value}function te(){v.value.showTable=!v.value.showTable}function oe(){v.value.showTooltip=!v.value.showTooltip}const D=e.ref(!1);function J(){D.value=!D.value}const ve=e.computed(()=>!D.value&&t.value.style.chart.zoom.show),{viewBox:Z,resetZoom:le,isZoom:he}=xe.usePanZoom(q,{x:0,y:0,width:d.value.width<=0?10:d.value.width,height:d.value.height<=0?10:d.value.height},1,ve);p({getData:de,generateCsv:w,generatePdf:z,generateImage:B,toggleTable:te,toggleTooltip:oe,toggleAnnotator:J});const _=e.ref(null),G=e.ref(!1),K=e.ref(""),Q=e.ref(null);function fe(o){if(!v.value.showTooltip)return;_.value=o.id,Q.value={datapoint:o,config:t.value};const s=t.value.style.chart.tooltip.customFormat;if(G.value=!1,h.isFunction(s))try{const l=s({datapoint:o,config:t.value});typeof l=="string"&&(K.value=l,G.value=!0)}catch{console.warn("Custom format cannot be applied."),G.value=!1}if(!G.value){let l=`<svg viewBox="0 0 10 10" height="${t.value.style.chart.tooltip.fontSize}"><circle cx="5" cy="5" r="5" fill="${o.color}"/></svg><span>${o.name}:</span><b>${(o.value||0).toFixed(t.value.style.chart.tooltip.roundingValue)}</b>`;K.value=`<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${l}</div>`}T.value=!0}return(o,s)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:r,id:`wordCloud_${n.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:s[3]||(s[3]=()=>e.unref(H)(!0)),onMouseleave:s[4]||(s[4]=()=>e.unref(H)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(we.PenAndPaper,{key:0,svgRef:e.unref(q),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:D.value,onClose:J},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:u,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(pe._sfc_main,{key:`title_${S.value}`,config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&c.value&&(e.unref(L)||e.unref(R))?(e.openBlock(),e.createBlock(ne.UserOptions,{ref:"details",key:`user_option_${a.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(A),isImaging:e.unref(N),uid:n.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:X.value,titles:{...t.value.userOptions.buttonTitles},chartElement:r.value,position:t.value.userOptions.position,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:v.value.showTooltip,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:D.value,onToggleFullscreen:ce,onGeneratePdf:e.unref(z),onGenerateCsv:w,onGenerateImage:e.unref(B),onToggleTable:te,onToggleTooltip:oe,onToggleAnnotator:J,style:e.normalizeStyle({visibility:e.unref(L)?e.unref(R)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:k})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:k})),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:k})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:k})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:k})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:k})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasTooltip","isTooltip","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:3,ref_key:"svgRef",ref:q,class:e.normalizeClass({"vue-data-ui-fullscreen--on":X.value,"vue-data-ui-fulscreen--off":!X.value}),xmlns:e.unref(h.XMLNS),viewBox:`${e.unref(Z).x} ${e.unref(Z).y} ${e.unref(Z).width} ${e.unref(Z).height}`,style:"overflow:hidden;background:transparent;"},[e.createVNode(ye._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:d.value.width<=0?10:d.value.width,height:d.value.height<=0?10:d.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Be)):e.createCommentVNode("",!0),e.createElementVNode("g",{transform:`translate(${(d.value.width<=0?10:d.value.width)/2}, ${(d.value.height<=0?10:d.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(l,k)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(),e.createElementBlock("text",{fill:l.color,"font-weight":t.value.style.chart.words.bold?"bold":"normal",key:k,x:l.x,y:l.y,"font-size":l.fontSize,transform:`translate(${l.width/2}, ${l.height/2})`,class:e.normalizeClass({animated:t.value.useCssAnimation,"word-selected":_.value&&_.value===l.id&&v.value.showTooltip,"word-not-selected":_.value&&_.value!==l.id&&v.value.showTooltip}),"text-anchor":"middle","dominant-baseline":"central",onMouseover:y=>fe(l),onMouseleave:s[0]||(s[0]=y=>{_.value=null,T.value=!1}),style:e.normalizeStyle(`animation-delay:${k*t.value.animationDelayMs}ms !important;`)},e.toDisplayString(l.name),47,Me))]))),256))],8,Fe),e.renderSlot(o.$slots,"svg",{svg:{height:d.value.height,width:d.value.width}},void 0,!0)],10,ze)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Oe,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(A)||e.unref(N)})),void 0,!0)])):e.createCommentVNode("",!0),e.unref(he)?(e.openBlock(),e.createElementBlock("div",Ae,[e.renderSlot(o.$slots,"reset-action",{reset:e.unref(le)},()=>[e.createElementVNode("button",{"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",style:e.normalizeStyle({background:t.value.style.chart.backgroundColor}),onClick:s[1]||(s[1]=l=>e.unref(le)(!0))},[e.createVNode($e.default,{name:"refresh",stroke:t.value.style.chart.color},null,8,["stroke"])],4)],!0)])):e.createCommentVNode("",!0),e.createVNode(be._sfc_main,{show:v.value.showTooltip&&T.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:r.value,content:K.value,isCustom:G.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Q.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Q.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:$,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createBlock(me.default,{key:7,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(ge.DataTable,{key:`table_${C.value}`,colNames:j.value.colNames,head:j.value.head,body:j.value.body,config:j.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[2]||(s[2]=l=>v.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Ve)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],44,Ne))}},_e=Se._export_sfc(Ie,[["__scopeId","data-v-b1c931d6"]]);exports.default=_e;
|