vue-data-ui 2.6.51 → 2.6.52-beta.1
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-I48MZsS9.js} +1 -1
- package/dist/{Arrow-BgUU76S-.cjs → Arrow-kIFF7ZYV.cjs} +1 -1
- package/dist/{BaseIcon-C86xshge.cjs → BaseIcon-BOQVvTGG.cjs} +1 -1
- package/dist/{BaseIcon-CTAy5_xi.js → BaseIcon-CFB6fPTZ.js} +1 -1
- package/dist/{ColorPicker-D0HD4Quw.cjs → ColorPicker-Dsyn6kHE.cjs} +1 -1
- package/dist/{ColorPicker-Bytmrdr3.js → ColorPicker-oHlXqJ1s.js} +3 -3
- package/dist/{DataTable-BciZ6nvV.js → DataTable-DGdwXWsw.js} +15 -15
- package/dist/DataTable-mQHJFe7I.cjs +1 -0
- package/dist/{Legend-Cz7Cx76P.js → Legend-1Ck4SMAf.js} +2 -2
- package/dist/{Legend-DgFKLfrI.cjs → Legend-DTO9ZsCn.cjs} +1 -1
- package/dist/PackageVersion-Bjsb4wZp.cjs +1 -0
- package/dist/{PackageVersion-o03zxIgy.js → PackageVersion-BvgxXhNs.js} +3 -3
- package/dist/{PenAndPaper-CkHrxfug.js → PenAndPaper-Ck-AwE4Q.js} +5 -5
- package/dist/PenAndPaper-D7jbmI-E.cjs +1 -0
- package/dist/{Shape-CGopvwTa.cjs → Shape-CJaW8bX9.cjs} +1 -1
- package/dist/{Shape-D-YK0lYU.js → Shape-CPCH8j2H.js} +1 -1
- package/dist/Slicer-CC32--YM.cjs +1 -0
- package/dist/{Slicer-AvtKQlUL.js → Slicer-DNZDQslR.js} +25 -25
- package/dist/{Title-D-dsYBke.js → Title-B_6aT-6J.js} +1 -1
- package/dist/{Title-BJ2lOafm.cjs → Title-cUV-IKQY.cjs} +1 -1
- package/dist/{Tooltip-DFPLXjvj.js → Tooltip-Ue-AAjZt.js} +1 -1
- package/dist/{Tooltip-7LYTKhzY.cjs → Tooltip-WSVLbzMX.cjs} +1 -1
- package/dist/documentation/installation.md +0 -1
- package/dist/dom-to-png-9admCVmW.cjs +1 -0
- package/dist/dom-to-png-Bt7F5Nv1.js +128 -0
- package/dist/img-11TFQm4X.cjs +1 -0
- package/dist/img-UIozzgIR.js +19 -0
- package/dist/{index-C3amwS0l.js → index-BkzHk-mH.js} +291 -349
- package/dist/index-CSxlyqJ7.cjs +9 -0
- package/dist/pdf-BRtlQnE2.js +46 -0
- package/dist/pdf-Cs21Kg1k.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-BMWO2CO2.cjs} +1 -1
- package/dist/{useNestedProp-D9I77VlT.js → useNestedProp-K8B9GMrW.js} +1 -1
- package/dist/usePrinter-BYER6sQ7.cjs +1 -0
- package/dist/{usePrinter-CUdxA1Bg.js → usePrinter-zF7SO-jf.js} +5 -5
- package/dist/{vue-data-ui-DH842rfS.js → vue-data-ui-BMg9P9Ko.js} +60 -62
- package/dist/vue-data-ui-YsV6liep.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-CJfSnDyo.cjs → vue-ui-3d-bar-BrwW8AgR.cjs} +2 -2
- package/dist/{vue-ui-3d-bar-Bd6XLFya.js → vue-ui-3d-bar-DSzHyy5V.js} +11 -11
- package/dist/{vue-ui-accordion-BBc1ZMpG.js → vue-ui-accordion-BISaJ4se.js} +3 -3
- package/dist/{vue-ui-accordion-B-rPe8KM.cjs → vue-ui-accordion-PlYDvxUG.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-BNj-4LHe.cjs → vue-ui-age-pyramid-BqoBtF0a.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-Bn_mzS13.js → vue-ui-age-pyramid-C3FyApR-.js} +10 -10
- package/dist/vue-ui-annotator-BtSw5RTy.cjs +371 -0
- package/dist/{vue-ui-annotator-vFbCgJEZ.js → vue-ui-annotator-DpgKrG5x.js} +84 -85
- package/dist/{vue-ui-bullet-B6KpjWl_.cjs → vue-ui-bullet-CGi-_8Ex.cjs} +1 -1
- package/dist/{vue-ui-bullet-DyGZmH-g.js → vue-ui-bullet-DbcQ3wBe.js} +8 -8
- package/dist/{vue-ui-candlestick-BoH-d4sf.cjs → vue-ui-candlestick-BH8jTbOQ.cjs} +1 -1
- package/dist/{vue-ui-candlestick-DUfXOizp.js → vue-ui-candlestick-tRVF3zq2.js} +11 -11
- package/dist/{vue-ui-carousel-table-Cbl6UzEH.cjs → vue-ui-carousel-table-BWCwHbxI.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-DZzht2CZ.js → vue-ui-carousel-table-D8sL6coX.js} +4 -4
- package/dist/{vue-ui-chestnut-DWPp1zKx.cjs → vue-ui-chestnut-CpTCDjC9.cjs} +1 -1
- package/dist/{vue-ui-chestnut-DWQumnLS.js → vue-ui-chestnut-CroVLVsl.js} +8 -8
- package/dist/{vue-ui-circle-pack-SLB70Z_8.js → vue-ui-circle-pack-B2tf5UQ1.js} +9 -9
- package/dist/{vue-ui-circle-pack-1RcCvaYs.cjs → vue-ui-circle-pack-C3wA6hOc.cjs} +1 -1
- package/dist/{vue-ui-cursor-DqwobFdf.js → vue-ui-cursor-96gSvyiC.js} +4 -4
- package/dist/vue-ui-cursor-DL-bISlq.cjs +1 -0
- package/dist/vue-ui-dashboard-BUdFapPP.cjs +1 -0
- package/dist/{vue-ui-dashboard-BoVqjFT-.js → vue-ui-dashboard-Dp5jRRt4.js} +8 -8
- package/dist/{vue-ui-digits-CkqC9SEJ.js → vue-ui-digits-BezGWOAR.js} +2 -2
- package/dist/{vue-ui-digits-CicHxnLg.cjs → vue-ui-digits-XY3jIcLV.cjs} +1 -1
- package/dist/{vue-ui-donut-D03_Yedr.cjs → vue-ui-donut-BdsK9pBW.cjs} +1 -1
- package/dist/{vue-ui-donut-BIJLbkro.js → vue-ui-donut-CIe8gApD.js} +12 -12
- package/dist/{vue-ui-donut-evolution-LqcL3OxY.cjs → vue-ui-donut-evolution-Dv7fyWwE.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-Bu7kKtpK.js → vue-ui-donut-evolution-Ii8EmOJK.js} +14 -14
- package/dist/{vue-ui-dumbbell-B3sbV0fk.js → vue-ui-dumbbell-CR60USAn.js} +10 -10
- package/dist/{vue-ui-dumbbell-Drrm__Nn.cjs → vue-ui-dumbbell-DJ3wkIdL.cjs} +1 -1
- package/dist/{vue-ui-flow-NPMbdbtS.cjs → vue-ui-flow-3clUbPLS.cjs} +1 -1
- package/dist/{vue-ui-flow-DMK3963a.js → vue-ui-flow-xiil6BiJ.js} +9 -9
- package/dist/{vue-ui-funnel-BiSRxqzO.cjs → vue-ui-funnel-BAkm-e1r.cjs} +1 -1
- package/dist/{vue-ui-funnel-C7EwDAdS.js → vue-ui-funnel-B_C8XDGt.js} +9 -9
- package/dist/{vue-ui-galaxy-CaDXpBs3.cjs → vue-ui-galaxy-CcW4rvCT.cjs} +1 -1
- package/dist/{vue-ui-galaxy-Cotibz3o.js → vue-ui-galaxy-CyaoeQSJ.js} +11 -11
- package/dist/{vue-ui-gauge-DK2g4x7s.cjs → vue-ui-gauge-BSB-sjTl.cjs} +1 -1
- package/dist/{vue-ui-gauge-DKNwFB05.js → vue-ui-gauge-DQKc53lU.js} +7 -7
- package/dist/{vue-ui-gizmo-DO5PUFbp.js → vue-ui-gizmo-CpfXe7sK.js} +3 -3
- package/dist/{vue-ui-gizmo-DhSfekXS.cjs → vue-ui-gizmo-DGbdinaX.cjs} +1 -1
- package/dist/{vue-ui-heatmap-DbWoJVGe.cjs → vue-ui-heatmap-CCmoyf1C.cjs} +1 -1
- package/dist/{vue-ui-heatmap-DulCLx2a.js → vue-ui-heatmap-DMHGF1P2.js} +10 -10
- package/dist/{vue-ui-history-plot-H6t6DvQ_.cjs → vue-ui-history-plot-DEyodaqF.cjs} +1 -1
- package/dist/{vue-ui-history-plot-BcLWVk_q.js → vue-ui-history-plot-nEHSahCX.js} +11 -11
- package/dist/{vue-ui-kpi-CG43D1rb.js → vue-ui-kpi-mOUIJEXy.js} +3 -3
- package/dist/{vue-ui-kpi-CdnXw9hF.cjs → vue-ui-kpi-pREkpkrt.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-CLjqXzvH.js → vue-ui-mini-loader-BC28g1xw.js} +2 -2
- package/dist/{vue-ui-mini-loader-DXU3rfwQ.cjs → vue-ui-mini-loader-DBEfeiv2.cjs} +1 -1
- package/dist/{vue-ui-molecule-BYetzB_N.js → vue-ui-molecule-DL4vsgin.js} +14 -14
- package/dist/vue-ui-molecule-P-E8liNf.cjs +1 -0
- package/dist/{vue-ui-mood-radar-BnUc15e9.js → vue-ui-mood-radar-ucZjBaMd.js} +11 -11
- package/dist/{vue-ui-mood-radar-B4mRD0GQ.cjs → vue-ui-mood-radar-vFL9b0RB.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-Dk7fcRR3.js → vue-ui-nested-donuts-BoNxqHBv.js} +11 -11
- package/dist/{vue-ui-nested-donuts-B_29kUHS.cjs → vue-ui-nested-donuts-WOIeKM41.cjs} +1 -1
- package/dist/{vue-ui-onion-BbucE7AX.js → vue-ui-onion-BK6_uToF.js} +11 -11
- package/dist/{vue-ui-onion-CtI9xbLn.cjs → vue-ui-onion-D-RVPykW.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-CFWG0onH.cjs → vue-ui-parallel-coordinate-plot-BtYgR4eK.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-CLIOyXQc.js → vue-ui-parallel-coordinate-plot-C-skJdiu.js} +12 -12
- package/dist/{vue-ui-quadrant-BFu1K90E.cjs → vue-ui-quadrant-DK3JBMd_.cjs} +1 -1
- package/dist/{vue-ui-quadrant-DinfyJBM.js → vue-ui-quadrant-DwKSro9l.js} +12 -12
- package/dist/{vue-ui-quick-chart-Dp6hQbfz.cjs → vue-ui-quick-chart-CZcqcglo.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-D5JhRHUd.js → vue-ui-quick-chart-RoCE-7bx.js} +9 -9
- package/dist/{vue-ui-radar-CUFZHgr3.js → vue-ui-radar-DsJu_WF9.js} +12 -12
- package/dist/{vue-ui-radar-Ds39hdq4.cjs → vue-ui-radar-k50yck9x.cjs} +1 -1
- package/dist/{vue-ui-rating-D1EUcFL0.js → vue-ui-rating-BiTJkogW.js} +2 -2
- package/dist/{vue-ui-rating-BfqOFA-n.cjs → vue-ui-rating-DqNYM80G.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-CiULD7PK.cjs → vue-ui-relation-circle-B3g0MhAd.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-D65EImKT.js → vue-ui-relation-circle-CXAwYlII.js} +7 -7
- package/dist/{vue-ui-rings-DtMD95_q.cjs → vue-ui-rings-BLb7r3Vs.cjs} +1 -1
- package/dist/{vue-ui-rings-9zTtxZif.js → vue-ui-rings-Oof8uK1q.js} +12 -12
- package/dist/{vue-ui-scatter-DsF27c6e.js → vue-ui-scatter-D2aNkZYy.js} +12 -12
- package/dist/{vue-ui-scatter-DXzppvmP.cjs → vue-ui-scatter-Dso8zcQ-.cjs} +1 -1
- package/dist/{vue-ui-skeleton-a_FvGOK6.cjs → vue-ui-skeleton-CG-VHaCK.cjs} +1 -1
- package/dist/{vue-ui-skeleton-CrT5EE2W.js → vue-ui-skeleton-DxHXl65y.js} +3 -3
- package/dist/{vue-ui-smiley-CpC75CYj.cjs → vue-ui-smiley-B1s0Pz0I.cjs} +1 -1
- package/dist/{vue-ui-smiley-DK8TadZl.js → vue-ui-smiley-B8Oar29S.js} +2 -2
- package/dist/{vue-ui-spark-trend-BCN37BvU.js → vue-ui-spark-trend-C28svcHz.js} +5 -5
- package/dist/{vue-ui-spark-trend-oZCQCarV.cjs → vue-ui-spark-trend-Ckz2Ct-0.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CoCEXvSI.cjs → vue-ui-sparkbar-s2eymivO.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CE8WVA2T.js → vue-ui-sparkbar-zR50kBP5.js} +4 -4
- package/dist/{vue-ui-sparkgauge-DoZQ6ZYY.js → vue-ui-sparkgauge-BHykT4UY.js} +4 -4
- package/dist/{vue-ui-sparkgauge-DRGJ2R72.cjs → vue-ui-sparkgauge-DVnrILJy.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-wzpO76Dd.cjs → vue-ui-sparkhistogram-CAjWW3AJ.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-Bol-aQuY.js → vue-ui-sparkhistogram-DbO2SI38.js} +5 -5
- package/dist/{vue-ui-sparkline-BdBLfCAO.cjs → vue-ui-sparkline-C-RM0mDc.cjs} +1 -1
- package/dist/{vue-ui-sparkline-C9FJaLay.js → vue-ui-sparkline-DZMLTb2s.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-CQSP1urd.js → vue-ui-sparkstackbar-HA1vQs01.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-DcGfGfpf.cjs → vue-ui-sparkstackbar-X7aKVG4D.cjs} +1 -1
- package/dist/{vue-ui-stackbar-DZEOEvnN.cjs → vue-ui-stackbar-CGL_gUOb.cjs} +2 -2
- package/dist/{vue-ui-stackbar-CDFfxSCS.js → vue-ui-stackbar-CxnUlGuM.js} +15 -15
- package/dist/{vue-ui-strip-plot-cwg3sgfW.cjs → vue-ui-strip-plot-BdV8E2mU.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-Mroaxrtl.js → vue-ui-strip-plot-D8rkli8L.js} +11 -11
- package/dist/{vue-ui-table-JunVPtv-.cjs → vue-ui-table-C91BPx4E.cjs} +1 -1
- package/dist/{vue-ui-table-DMGZN-3h.js → vue-ui-table-DElTWwyP.js} +1 -1
- package/dist/{vue-ui-table-heatmap-B-K-sXUr.cjs → vue-ui-table-heatmap-B9BrmNF4.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-Cvd3LF-p.js → vue-ui-table-heatmap-CE0NipCw.js} +4 -4
- package/dist/{vue-ui-table-sparkline-D6LrWje8.js → vue-ui-table-sparkline-BXTmILTU.js} +5 -5
- package/dist/{vue-ui-table-sparkline-DZcJ1rQX.cjs → vue-ui-table-sparkline-CjRvXelB.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BSMW00bJ.js → vue-ui-thermometer-C6i-p0hg.js} +7 -7
- package/dist/{vue-ui-thermometer-61KP0jn1.cjs → vue-ui-thermometer-CP1LDoqq.cjs} +1 -1
- package/dist/{vue-ui-timer-jeD5NmuN.cjs → vue-ui-timer-Cgfs3wKV.cjs} +1 -1
- package/dist/{vue-ui-timer-B2iP7RSf.js → vue-ui-timer-l3Wc-x8d.js} +5 -5
- package/dist/{vue-ui-tiremarks-D2kbp6KR.cjs → vue-ui-tiremarks-BmIfZyJk.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-C1WyRyfc.js → vue-ui-tiremarks-D_5DNlgH.js} +7 -7
- package/dist/vue-ui-treemap-BjIi-bzk.cjs +1 -0
- package/dist/{vue-ui-treemap-DyJ_Ath1.js → vue-ui-treemap-vRqafziK.js} +185 -185
- package/dist/{vue-ui-vertical-bar-C0cbPo6B.cjs → vue-ui-vertical-bar-0lou3eUl.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-yzivBWJt.js → vue-ui-vertical-bar-ZkFfYNVT.js} +12 -12
- package/dist/{vue-ui-waffle-BByWdS7G.js → vue-ui-waffle-B4sJZZwD.js} +12 -12
- package/dist/{vue-ui-waffle-CF3e6ft5.cjs → vue-ui-waffle-BPVMcyHO.cjs} +1 -1
- package/dist/{vue-ui-wheel-iDX0u5LU.js → vue-ui-wheel-BVVPh7ke.js} +7 -7
- package/dist/{vue-ui-wheel-D7R1yr52.cjs → vue-ui-wheel-DWfsxrSb.cjs} +1 -1
- package/dist/vue-ui-word-cloud-CynGL0Rl.cjs +1 -0
- package/dist/{vue-ui-word-cloud-BPQFUEFg.js → vue-ui-word-cloud-D4297p4B.js} +13 -13
- package/dist/vue-ui-xy-CJ_nzjCC.cjs +3 -0
- package/dist/{vue-ui-xy-DmwPJ7Bc.js → vue-ui-xy-KwmX3h7W.js} +18 -18
- package/dist/{vue-ui-xy-canvas-aZQ9FHGI.cjs → vue-ui-xy-canvas-BYoUyBzb.cjs} +2 -2
- package/dist/{vue-ui-xy-canvas-CmXVo7kC.js → vue-ui-xy-canvas-B_ZxmLAx.js} +16 -16
- package/package.json +2 -3
- package/dist/DataTable-Bm_s0nuy.cjs +0 -1
- package/dist/PackageVersion-t17AmNwO.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 +1 @@
|
|
|
1
|
-
"use strict";const o=require("vue"),a=require("./index-
|
|
1
|
+
"use strict";const o=require("vue"),a=require("./index-CSxlyqJ7.cjs"),c=["cx","cy","r","fill","stroke","stroke-width"],v=["d","fill","stroke","stroke-width"],p=["points","fill","stroke","stroke-width"],y={__name:"Shape",props:{color:String,isSelected:{type:Boolean,default:!1},limit:{type:Number,default:3},plot:Object,radius:Number,shape:String,stroke:String,strokeWidth:Number,zoom:{type:Number,default:1.3}},emits:["mouseover","mouseout","click"],setup(n,{emit:d}){const e=n,i=d;function m(u){return{circle:{points:1,rotation:0},line:{points:2,rotation:0},triangle:{points:3,rotation:.52},square:{points:4,rotation:.783},diamond:{points:4,rotation:0},pentagon:{points:5,rotation:.95},hexagon:{points:6,rotation:0}}[u]}const r=o.computed(()=>m(e.shape)),s=o.computed(()=>e.shape!=="star"?null:a.createStar({plot:{x:e.plot.x,y:e.plot.y},radius:e.radius*(e.isSelected?e.zoom:1)})),k=o.computed(()=>a.createPolygonPath({plot:{x:e.plot.x,y:e.plot.y},radius:e.radius*(e.isSelected?e.zoom:1),sides:r.value.points,rotation:r.value.rotation}).path);return(u,t)=>(o.openBlock(),o.createElementBlock("g",null,[r.value&&r.value.points===1?(o.openBlock(),o.createElementBlock("circle",{key:0,class:"vdui-shape-circle",cx:n.plot.x,cy:n.plot.y,r:e.radius*(e.isSelected?e.zoom:1),fill:n.color,stroke:n.stroke,"stroke-width":n.strokeWidth,onMouseover:t[0]||(t[0]=l=>i("mouseover")),onMouseout:t[1]||(t[1]=l=>i("mouseout")),onClick:t[2]||(t[2]=l=>i("click"))},null,40,c)):o.createCommentVNode("",!0),r.value&&r.value.points>=n.limit?(o.openBlock(),o.createElementBlock("path",{key:1,class:"vdui-shape-polygon",d:k.value,fill:n.color,stroke:n.stroke,"stroke-width":n.strokeWidth,onMouseover:t[3]||(t[3]=l=>i("mouseover")),onMouseout:t[4]||(t[4]=l=>i("mouseout")),onClick:t[5]||(t[5]=l=>i("click"))},null,40,v)):o.createCommentVNode("",!0),s.value?(o.openBlock(),o.createElementBlock("polygon",{key:2,class:"vdui-shape-star",points:s.value,fill:n.color,stroke:n.stroke,"stroke-width":n.strokeWidth,onMouseover:t[6]||(t[6]=l=>i("mouseover")),onMouseout:t[7]||(t[7]=l=>i("mouseout")),onClick:t[8]||(t[8]=l=>i("click"))},null,40,p)):o.createCommentVNode("",!0)]))}};exports._sfc_main=y;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed as u, createElementBlock as r, openBlock as l, createCommentVNode as a } from "vue";
|
|
2
|
-
import { Y as c, Q as f } from "./index-
|
|
2
|
+
import { Y as c, Q as f } from "./index-BkzHk-mH.js";
|
|
3
3
|
const y = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], g = ["d", "fill", "stroke", "stroke-width"], x = ["points", "fill", "stroke", "stroke-width"], h = {
|
|
4
4
|
__name: "Shape",
|
|
5
5
|
props: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),xe=require("./BaseIcon-BOQVvTGG.cjs"),Y=require("./useResponsive-DQmBAoBf.cjs"),f=require("./index-CSxlyqJ7.cjs"),ye=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),be={class:"vue-data-ui-slicer-labels",style:{position:"relative","z-index":"1","pointer-events":"none"}},ke={key:0,style:{width:"100%",position:"relative"}},we={key:0,class:"minimap",style:{width:"100%"}},Se=["xmlns","viewBox"],Ne=["id"],Ce=["stop-color"],Ee=["d","stroke"],Be=["x","width","height","fill","rx"],Me=["d","fill"],$e=["x","width","height","rx","fill"],Re=["x","width","height","fill","rx"],Le=["d","fill"],Ve=["d","stroke"],ze=["cx","cy","stroke","fill"],De=["cx","cy","stroke","fill"],Te=["x1","x2","y2","stroke"],Pe=["x","height","width","onMouseenter"],Ie=["min","max"],Fe=["min","max"],Ae={__name:"Slicer",props:{background:{type:String,default:"#FFFFFF"},borderColor:{type:String,default:"#FFFFFF"},fontSize:{type:Number,default:14},labelLeft:{type:String,default:""},labelRight:{type:String,default:""},textColor:{type:String,default:"#1A1A1A"},inputColor:{type:String,default:"#1A1A1A"},max:{type:Number,default:0},min:{type:Number,default:0},selectColor:{type:String,default:"#4A4A4A"},useResetSlot:{type:Boolean,default:!1},valueStart:{type:[Number,String],default:0},valueEnd:{type:[Number,String],default:0},minimap:{type:Array,default:[]},smoothMinimap:{type:Boolean,default:!1},minimapSelectedColor:{type:String,default:"#1f77b4"},minimapSelectionRadius:{type:Number,default:12},minimapLineColor:{type:String,default:"#2D353C"},minimapSelectedColorOpacity:{type:Number,default:.2},minimapSelectedIndex:{type:Number,default:null},minimapIndicatorColor:{type:String,default:"#2D353C"},refreshStartPoint:{type:Number,default:0},refreshEndPoint:{type:Number,default:null},enableRangeHandles:{type:Boolean,default:!1},enableSelectionDrag:{type:Boolean,default:!0},verticalHandles:{type:Boolean,default:!1}},emits:["update:start","update:end","reset","trapMouse"],setup(n,{expose:_,emit:ee}){e.useCssVars(t=>({"05c06dde":le.value,d5d55cf6:p.value,"1783e736":ne.value,"754a92b5":n.selectColor,"6a46ca7a":ae.value}));const l=n,c=e.ref(null),u=e.ref(l.min),r=e.ref(l.max),k=e.computed(()=>!!l.minimap.length),C=e.ref(f.createUid()),te=e.computed(()=>l.refreshEndPoint===null?l.max:l.refreshEndPoint),h=ee,g=e.computed(()=>{const t=l.max-l.min,a=(u.value-l.min)/t*100,o=(r.value-l.min)/t*100;return{left:`${a}%`,width:`${o-a}%`,background:l.selectColor,tooltipLeft:`calc(${a}% - ${F.value?0:P.value/2}px)`,tooltipRight:`calc(${o}% - ${A.value?N.value:N.value/2}px)`,arrowLeft:!F.value,arrowRight:!A.value}}),F=e.computed(()=>c.value?c.value.getBoundingClientRect().width*((u.value-l.min)/(l.max-l.min))-P.value/2<0:!1),A=e.computed(()=>c.value?c.value.getBoundingClientRect().width*((r.value-l.min)/(l.max-l.min))+N.value/2>c.value.getBoundingClientRect().width:!1),le=e.computed(()=>l.inputColor),ae=e.computed(()=>l.background),ne=e.computed(()=>`${l.selectColor}33`),p=e.computed(()=>l.borderColor),H=e.computed(()=>{let t=[];for(let a=0;a<l.minimap.length;a+=1)t.push(a);return t});function W(){h("reset")}function oe(){Number(u.value)>Number(r.value)-1&&(u.value=Number(r.value)-1),h("update:start",Number(u.value))}function ie(){Number(r.value)<Number(u.value)+1&&(r.value=Number(u.value)+1),h("update:end",Number(r.value))}e.watch(()=>l.min,t=>{Number(u.value)<Number(t)&&(u.value=Number(t)),Number(r.value)<Number(t)&&(r.value=Number(t))}),e.watch(()=>l.max,t=>{Number(u.value)>Number(t)&&(u.value=Number(t)),Number(r.value)>Number(t)&&(r.value=Number(t))});const E=e.ref(null),i=e.ref({width:1,height:1}),S=e.ref(null);e.onMounted(()=>{if(k.value){const t=Y.throttle(()=>{const{width:a,height:o}=Y.useResponsive({chart:E.value});i.value.width=a,i.value.height=o-47});S.value=new ResizeObserver(t),S.value.observe(E.value)}}),e.onBeforeUnmount(()=>{S.value&&S.value.disconnect()});const s=e.computed(()=>l.minimap.length?i.value.width/l.minimap.length:0),m=e.computed(()=>{if(!l.minimap.length)return[];const t=Math.max(...l.minimap),a=Math.min(...l.minimap)-10,o=t-(a>0?0:a),d=l.minimap.map((he,ge)=>{const pe=he-a;return{x:i.value.width/l.minimap.length*ge+s.value/2,y:i.value.height-pe/o*(i.value.height*.9)}}),x=l.smoothMinimap?f.createSmoothPath(d):f.createStraightPath(d),I=[...d].slice(l.valueStart,l.valueEnd),fe=l.smoothMinimap?f.createSmoothPath(I):f.createStraightPath(I);return{fullSet:x,selectionSet:fe,sliced:I,firstPlot:d[l.valueStart],lastPlot:d[l.valueEnd-1]}}),v=e.computed(()=>({x:s.value*u.value+s.value/2,width:i.value.width*((r.value-u.value)/l.max)-s.value})),w=e.ref(l.minimapSelectedIndex);e.watch(()=>l.minimapSelectedIndex,t=>{w.value=t+l.valueStart},{immediate:!0});function ue(t){w.value=t,t>=l.valueStart&&t<l.valueEnd&&h("trapMouse",t-l.valueStart)}const re=e.ref(0),B=e.ref(null),M=e.ref(null);function $(t){u.value=t,B.value&&(B.value.value=t),h("update:start",Number(u.value))}function R(t){r.value=t,M.value&&(M.value.value=t),h("update:end",Number(r.value))}const L=e.computed(()=>l.valueEnd-l.valueStart),V=e.ref(!1);let z=e.ref(null);const se=e.computed(()=>c.value?(c.value.getBoundingClientRect().width-48)/(l.max-l.min):20),de=e.computed(()=>(c.value.getBoundingClientRect().width-48)/(l.max-l.min)*L.value),ce=e.ref(2.5),X=e.computed(()=>{const t=c.value.getBoundingClientRect().width-48;return Math.ceil((l.max-l.min)/((t-de.value)/ce.value))}),q=t=>{if(b.value=!0,!l.enableSelectionDrag)return;const a=t.type==="touchstart";if((a?t.targetTouches[0].target:t.target).classList.contains("range-handle"))return;V.value=!0,z.value=a?t.targetTouches[0].clientX:t.clientX;const d=a?me:U,x=a?ve:Z;window.addEventListener(a?"touchmove":"mousemove",d,{passive:!1}),window.addEventListener(a?"touchend":"mouseup",x)};function U(t){O(t.clientX)}function me(t){c.value.contains(t.target)&&(t.target.classList.contains("range-handle")||(t.preventDefault(),O(t.targetTouches[0].clientX)))}function O(t){if(!V.value)return;const a=t-z.value;if(Math.abs(a)>se.value){if(a>0){if(Number(r.value)+1<=l.max){const o=Math.min(l.max,Number(r.value)+X.value);R(o),$(o-L.value)}}else if(Number(u.value)-1>=l.min){const o=Math.max(0,Number(u.value)-X.value);$(o),R(o+L.value)}z.value=t}}function Z(){j("mousemove","mouseup")}function ve(){j("touchmove","touchend")}function j(t,a){V.value=!1,window.removeEventListener(t,U),window.removeEventListener(a,Z)}const y=e.ref(!1),D=e.ref(null),T=e.ref(null),P=e.ref(1),N=e.ref(1),b=e.ref(!1);function G(){D.value&&(P.value=D.value.getBoundingClientRect().width)}function J(){T.value&&(N.value=T.value.getBoundingClientRect().width)}const K=e.ref(0);function Q(t){K.value=t==="start"?1:0}return e.onUpdated(()=>{G(),J()}),e.watch(()=>l.labelLeft,()=>{e.nextTick(G)},{deep:!0}),e.watch(()=>l.labelRight,()=>{e.nextTick(J)},{deep:!0}),_({setStartValue:$,setEndValue:R}),(t,a)=>(e.openBlock(),e.createElementBlock("div",{"data-dom-to-png-ignore":"",style:{padding:"0 24px"},class:"vue-data-ui-zoom",ref_key:"zoomWrapper",ref:c,onMousedown:q,onTouchstart:q,onTouchend:a[11]||(a[11]=o=>b.value=!1)},[e.createElementVNode("div",be,[n.valueStart!==n.refreshStartPoint||n.valueEnd!==te.value?(e.openBlock(),e.createElementBlock("div",ke,[n.useResetSlot?e.renderSlot(t.$slots,"reset-action",{key:1,reset:W},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",style:e.normalizeStyle({top:k.value?"36px":"-16px",pointerEvents:"all !important"}),onClick:W},[e.createVNode(xe.default,{name:"refresh",stroke:n.textColor},null,8,["stroke"])],4))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:"double-range-slider",ref_key:"minimapWrapper",ref:E,style:{"z-index":"0"},onMouseenter:a[9]||(a[9]=o=>b.value=!0),onMouseleave:a[10]||(a[10]=o=>b.value=!1)},[k.value?(e.openBlock(),e.createElementBlock("div",we,[(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(f.XMLNS),viewBox:`0 0 ${i.value.width<0?0:i.value.width} ${i.value.height<0?0:i.value.height}`},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:C.value,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${n.minimapLineColor}50`},null,8,Ce),a[12]||(a[12]=e.createElementVNode("stop",{offset:"100%","stop-color":"transparent"},null,-1))],8,Ne)]),e.createElementVNode("path",{d:`M${m.value.fullSet}`,stroke:`${n.minimapLineColor}`,fill:"none","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",style:{opacity:"1"}},null,8,Ee),e.createElementVNode("rect",{x:v.value.x,width:v.value.width<0?0:v.value.width,height:Math.max(i.value.height,0),y:0,fill:p.value,rx:n.minimapSelectionRadius,stroke:"none"},null,8,Be),e.createElementVNode("path",{d:`M${s.value/2},${Math.max(i.value.height,0)} ${m.value.fullSet} L${i.value.width-s.value/2},${Math.max(i.value.height,0)}Z`,fill:`url(#${C.value})`,stroke:"none",style:{opacity:"1"}},null,8,Me),e.createElementVNode("rect",{x:v.value.x,width:v.value.width<0?0:v.value.width,height:Math.max(i.value.height,0),y:0,rx:n.minimapSelectionRadius,fill:p.value},null,8,$e),e.createElementVNode("rect",{x:v.value.x,width:v.value.width<0?0:v.value.width,height:Math.max(i.value.height,0),y:0,fill:n.minimapSelectedColor,rx:n.minimapSelectionRadius,style:e.normalizeStyle({opacity:n.minimapSelectedColorOpacity})},null,12,Re),e.createElementVNode("path",{d:`M${m.value.sliced[0].x},${Math.max(i.value.height,0)} ${m.value.selectionSet} L${m.value.sliced.at(-1).x},${Math.max(i.value.height,0)}Z`,fill:`url(#${C.value})`,stroke:"none",style:{opacity:"1"}},null,8,Le),e.createElementVNode("path",{d:`M ${m.value.selectionSet}`,stroke:`${n.minimapLineColor}`,fill:"transparent","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,Ve),e.createElementVNode("circle",{cx:m.value.firstPlot.x,cy:m.value.firstPlot.y,"stroke-width":"0.5",stroke:p.value,r:"3",fill:n.minimapLineColor},null,8,ze),e.createElementVNode("circle",{cx:m.value.lastPlot.x,cy:m.value.lastPlot.y,"stroke-width":"0.5",stroke:p.value,r:"3",fill:n.minimapLineColor},null,8,De),w.value!==null?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(H.value,(o,d)=>(e.openBlock(),e.createElementBlock("g",null,[w.value===o&&o>=n.valueStart&&o<n.valueEnd?(e.openBlock(),e.createElementBlock("line",{key:0,x1:s.value*d+s.value/2,x2:s.value*d+s.value/2,y1:0,y2:Math.max(i.value.height,0),stroke:n.minimapIndicatorColor,"stroke-linecap":"round","stroke-dasharray":"2","stroke-width":"1"},null,8,Te)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.value,(o,d)=>(e.openBlock(),e.createElementBlock("rect",{x:s.value*d,y:0,height:Math.max(i.value.height,0),width:s.value<0?0:s.value,fill:"transparent",style:e.normalizeStyle([{"pointer-events":"all !important"},{cursor:o>=n.valueStart&&o<n.valueEnd&&n.enableSelectionDrag?y.value?"grabbing":"grab":"default"}]),onMousedown:a[0]||(a[0]=x=>y.value=!0),onMouseup:a[1]||(a[1]=x=>y.value=!1),onMouseenter:x=>ue(o),onMouseleave:a[2]||(a[2]=x=>{w.value=null,h("trapMouse",null)})},null,44,Pe))),256))],8,Se))])):e.createCommentVNode("",!0),a[13]||(a[13]=e.createElementVNode("div",{class:"slider-track"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass({"range-highlight":!0,move:n.enableSelectionDrag}),onMousedown:a[3]||(a[3]=o=>y.value=!0),onMouseup:a[4]||(a[4]=o=>y.value=!1),style:e.normalizeStyle({...g.value,cursor:y.value?"grabbing":"grab"})},null,38),n.enableRangeHandles?e.withDirectives((e.openBlock(),e.createElementBlock("input",{ref_key:"rangeStart",ref:B,key:`range-min${re.value}`,type:"range",class:e.normalizeClass({"range-left":!0,"range-handle":!0,"range-minimap":k.value&&n.verticalHandles}),min:n.min,max:n.max,"onUpdate:modelValue":a[5]||(a[5]=o=>u.value=o),onInput:oe,onMouseenter:a[6]||(a[6]=o=>Q("start"))},null,42,Ie)),[[e.vModelText,u.value]]):e.createCommentVNode("",!0),n.enableRangeHandles?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:2,ref_key:"rangeEnd",ref:M,type:"range",class:e.normalizeClass({"range-right":!0,"range-handle":!0,"range-minimap":k.value&&n.verticalHandles}),min:n.min,max:n.max,"onUpdate:modelValue":a[7]||(a[7]=o=>r.value=o),onInput:ie,onMouseenter:a[8]||(a[8]=o=>Q("end"))},null,42,Fe)),[[e.vModelText,r.value]]):e.createCommentVNode("",!0),n.labelLeft?(e.openBlock(),e.createElementBlock("div",{key:3,ref_key:"tooltipLeft",ref:D,class:e.normalizeClass({"range-tooltip":!0,"range-tooltip-visible":b.value,"range-tooltip-arrow":g.value.arrowLeft&&!n.verticalHandles,"range-tooltip-arrow-left":!g.value.arrowLeft&&!n.verticalHandles}),style:e.normalizeStyle({left:g.value.tooltipLeft,color:e.unref(f.adaptColorToBackground)(n.selectColor),backgroundColor:n.selectColor,border:`1px solid ${p.value}`,zIndex:`${K.value+4}`})},e.toDisplayString(n.labelLeft),7)):e.createCommentVNode("",!0),n.labelRight?(e.openBlock(),e.createElementBlock("div",{key:4,ref_key:"tooltipRight",ref:T,class:e.normalizeClass({"range-tooltip":!0,"range-tooltip-visible":b.value,"range-tooltip-arrow":g.value.arrowRight&&!n.verticalHandles,"range-tooltip-arrow-right":!g.value.arrowRight&&!n.verticalHandles}),style:e.normalizeStyle({left:g.value.tooltipRight,color:e.unref(f.adaptColorToBackground)(n.selectColor),backgroundColor:n.selectColor,border:`1px solid ${p.value}`,zIndex:"4"})},e.toDisplayString(n.labelRight),7)):e.createCommentVNode("",!0)],544)],544))}},He=ye._export_sfc(Ae,[["__scopeId","data-v-8948b724"]]);exports.Slicer=He;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCssVars as Ie, computed as s, ref as u, watch as R, onMounted as Pe, onBeforeUnmount as ze, onUpdated as Ae, nextTick as ue, createElementBlock as v, openBlock as m, createElementVNode as d, createCommentVNode as x, renderSlot as Fe, normalizeStyle as $, createVNode as He, withDirectives as oe, unref as Z, Fragment as re, renderList as se, normalizeClass as L, vModelText as de, toDisplayString as ve } from "vue";
|
|
2
|
-
import Ve from "./BaseIcon-
|
|
2
|
+
import Ve from "./BaseIcon-CFB6fPTZ.js";
|
|
3
3
|
import { t as We, u as Xe } from "./useResponsive-Cw4oZ8sQ.js";
|
|
4
|
-
import { c as Ue, T as me, S as ce, X as Oe, G as he } from "./index-
|
|
4
|
+
import { c as Ue, T as me, S as ce, X as Oe, G as he } from "./index-BkzHk-mH.js";
|
|
5
5
|
import { _ as Ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
6
|
const Ge = {
|
|
7
7
|
class: "vue-data-ui-slicer-labels",
|
|
@@ -124,13 +124,13 @@ const Ge = {
|
|
|
124
124
|
emits: ["update:start", "update:end", "reset", "trapMouse"],
|
|
125
125
|
setup(a, { expose: fe, emit: ge }) {
|
|
126
126
|
Ie((e) => ({
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
"
|
|
130
|
-
|
|
131
|
-
"
|
|
127
|
+
"05c06dde": xe.value,
|
|
128
|
+
d5d55cf6: w.value,
|
|
129
|
+
"1783e736": ye.value,
|
|
130
|
+
"754a92b5": a.selectColor,
|
|
131
|
+
"6a46ca7a": be.value
|
|
132
132
|
}));
|
|
133
|
-
const t = a, f = u(null), o = u(t.min), r = u(t.max), M = s(() => !!t.minimap.length), D = u(Ue()), pe = s(() => t.refreshEndPoint === null ? t.max : t.refreshEndPoint),
|
|
133
|
+
const t = a, f = u(null), o = u(t.min), r = u(t.max), M = s(() => !!t.minimap.length), D = u(Ue()), pe = s(() => t.refreshEndPoint === null ? t.max : t.refreshEndPoint), b = ge, y = s(() => {
|
|
134
134
|
const e = t.max - t.min, l = (o.value - t.min) / e * 100, n = (r.value - t.min) / e * 100;
|
|
135
135
|
return {
|
|
136
136
|
left: `${l}%`,
|
|
@@ -141,20 +141,20 @@ const Ge = {
|
|
|
141
141
|
arrowLeft: !G.value,
|
|
142
142
|
arrowRight: !j.value
|
|
143
143
|
};
|
|
144
|
-
}), G = s(() => f.value ? f.value.getBoundingClientRect().width * ((o.value - t.min) / (t.max - t.min)) - U.value / 2 < 0 : !1), j = s(() => f.value ? f.value.getBoundingClientRect().width * ((r.value - t.min) / (t.max - t.min)) + B.value / 2 > f.value.getBoundingClientRect().width : !1), xe = s(() => t.inputColor),
|
|
144
|
+
}), G = s(() => f.value ? f.value.getBoundingClientRect().width * ((o.value - t.min) / (t.max - t.min)) - U.value / 2 < 0 : !1), j = s(() => f.value ? f.value.getBoundingClientRect().width * ((r.value - t.min) / (t.max - t.min)) + B.value / 2 > f.value.getBoundingClientRect().width : !1), xe = s(() => t.inputColor), be = s(() => t.background), ye = s(() => `${t.selectColor}33`), w = s(() => t.borderColor), q = s(() => {
|
|
145
145
|
let e = [];
|
|
146
146
|
for (let l = 0; l < t.minimap.length; l += 1)
|
|
147
147
|
e.push(l);
|
|
148
148
|
return e;
|
|
149
149
|
});
|
|
150
150
|
function J() {
|
|
151
|
-
|
|
151
|
+
b("reset");
|
|
152
152
|
}
|
|
153
153
|
function we() {
|
|
154
|
-
Number(o.value) > Number(r.value) - 1 && (o.value = Number(r.value) - 1),
|
|
154
|
+
Number(o.value) > Number(r.value) - 1 && (o.value = Number(r.value) - 1), b("update:start", Number(o.value));
|
|
155
155
|
}
|
|
156
156
|
function Se() {
|
|
157
|
-
Number(r.value) < Number(o.value) + 1 && (r.value = Number(o.value) + 1),
|
|
157
|
+
Number(r.value) < Number(o.value) + 1 && (r.value = Number(o.value) + 1), b("update:end", Number(r.value));
|
|
158
158
|
}
|
|
159
159
|
R(
|
|
160
160
|
() => t.min,
|
|
@@ -208,14 +208,14 @@ const Ge = {
|
|
|
208
208
|
N.value = e + t.valueStart;
|
|
209
209
|
}, { immediate: !0 });
|
|
210
210
|
function ke(e) {
|
|
211
|
-
N.value = e, e >= t.valueStart && e < t.valueEnd &&
|
|
211
|
+
N.value = e, e >= t.valueStart && e < t.valueEnd && b("trapMouse", e - t.valueStart);
|
|
212
212
|
}
|
|
213
213
|
const Ce = u(0), I = u(null), P = u(null);
|
|
214
214
|
function z(e) {
|
|
215
|
-
o.value = e, I.value && (I.value.value = e),
|
|
215
|
+
o.value = e, I.value && (I.value.value = e), b("update:start", Number(o.value));
|
|
216
216
|
}
|
|
217
217
|
function A(e) {
|
|
218
|
-
r.value = e, P.value && (P.value.value = e),
|
|
218
|
+
r.value = e, P.value && (P.value.value = e), b("update:end", Number(r.value));
|
|
219
219
|
}
|
|
220
220
|
const F = s(() => t.valueEnd - t.valueStart), H = u(!1);
|
|
221
221
|
let V = u(null);
|
|
@@ -284,7 +284,7 @@ const Ge = {
|
|
|
284
284
|
setStartValue: z,
|
|
285
285
|
setEndValue: A
|
|
286
286
|
}), (e, l) => (m(), v("div", {
|
|
287
|
-
"data-
|
|
287
|
+
"data-dom-to-png-ignore": "",
|
|
288
288
|
style: { padding: "0 24px" },
|
|
289
289
|
class: "vue-data-ui-zoom",
|
|
290
290
|
ref_key: "zoomWrapper",
|
|
@@ -446,7 +446,7 @@ const Ge = {
|
|
|
446
446
|
onMouseup: l[1] || (l[1] = (S) => k.value = !1),
|
|
447
447
|
onMouseenter: (S) => ke(n),
|
|
448
448
|
onMouseleave: l[2] || (l[2] = (S) => {
|
|
449
|
-
N.value = null,
|
|
449
|
+
N.value = null, b("trapMouse", null);
|
|
450
450
|
})
|
|
451
451
|
}, null, 44, rt))), 256))
|
|
452
452
|
], 8, Je))
|
|
@@ -460,7 +460,7 @@ const Ge = {
|
|
|
460
460
|
onMousedown: l[3] || (l[3] = (n) => k.value = !0),
|
|
461
461
|
onMouseup: l[4] || (l[4] = (n) => k.value = !1),
|
|
462
462
|
style: $({
|
|
463
|
-
...
|
|
463
|
+
...y.value,
|
|
464
464
|
cursor: k.value ? "grabbing" : "grab"
|
|
465
465
|
})
|
|
466
466
|
}, null, 38),
|
|
@@ -499,11 +499,11 @@ const Ge = {
|
|
|
499
499
|
class: L({
|
|
500
500
|
"range-tooltip": !0,
|
|
501
501
|
"range-tooltip-visible": C.value,
|
|
502
|
-
"range-tooltip-arrow":
|
|
503
|
-
"range-tooltip-arrow-left": !
|
|
502
|
+
"range-tooltip-arrow": y.value.arrowLeft && !a.verticalHandles,
|
|
503
|
+
"range-tooltip-arrow-left": !y.value.arrowLeft && !a.verticalHandles
|
|
504
504
|
}),
|
|
505
505
|
style: $({
|
|
506
|
-
left:
|
|
506
|
+
left: y.value.tooltipLeft,
|
|
507
507
|
color: Z(he)(a.selectColor),
|
|
508
508
|
backgroundColor: a.selectColor,
|
|
509
509
|
border: `1px solid ${w.value}`,
|
|
@@ -517,11 +517,11 @@ const Ge = {
|
|
|
517
517
|
class: L({
|
|
518
518
|
"range-tooltip": !0,
|
|
519
519
|
"range-tooltip-visible": C.value,
|
|
520
|
-
"range-tooltip-arrow":
|
|
521
|
-
"range-tooltip-arrow-right": !
|
|
520
|
+
"range-tooltip-arrow": y.value.arrowRight && !a.verticalHandles,
|
|
521
|
+
"range-tooltip-arrow-right": !y.value.arrowRight && !a.verticalHandles
|
|
522
522
|
}),
|
|
523
523
|
style: $({
|
|
524
|
-
left:
|
|
524
|
+
left: y.value.tooltipRight,
|
|
525
525
|
color: Z(he)(a.selectColor),
|
|
526
526
|
backgroundColor: a.selectColor,
|
|
527
527
|
border: `1px solid ${w.value}`,
|
|
@@ -531,7 +531,7 @@ const Ge = {
|
|
|
531
531
|
], 544)
|
|
532
532
|
], 544));
|
|
533
533
|
}
|
|
534
|
-
}, pt = /* @__PURE__ */ Ze(vt, [["__scopeId", "data-v-
|
|
534
|
+
}, pt = /* @__PURE__ */ Ze(vt, [["__scopeId", "data-v-8948b724"]]);
|
|
535
535
|
export {
|
|
536
536
|
pt as S
|
|
537
537
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElementBlock as l, openBlock as n, Fragment as f, createElementVNode as p, createCommentVNode as o, normalizeStyle as d, unref as e, toDisplayString as g, renderSlot as r } from "vue";
|
|
2
|
-
import { u as c } from "./useNestedProp-
|
|
2
|
+
import { u as c } from "./useNestedProp-K8B9GMrW.js";
|
|
3
3
|
const x = {
|
|
4
4
|
__name: "Title",
|
|
5
5
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),r=require("./useNestedProp-
|
|
1
|
+
"use strict";const e=require("vue"),r=require("./useNestedProp-BMWO2CO2.cjs"),o={__name:"Title",props:{config:{type:Object,default(){return{}}},lineHeight:{type:[String,Boolean],default:!1}},setup(i){const n=i,t=r.useNestedProp({userConfig:n.config,defaultConfig:{title:{cy:"",text:"",color:"",fontSize:20,bold:!0,textAlign:"center",paddingLeft:0,paddingRight:0},subtitle:{cy:"",text:"",color:"",fontSize:14,bold:!1}}});return(l,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"atom-title",style:e.normalizeStyle(`width: calc(100% - ${e.unref(t).title.paddingLeft+e.unref(t).title.paddingRight}px); text-align:${e.unref(t).title.textAlign};color:${e.unref(t).title.color};font-size:${e.unref(t).title.fontSize}px;font-weight:${e.unref(t).title.bold?"bold":""};padding-left:${e.unref(t).title.paddingLeft}px;padding-right:${e.unref(t).title.paddingRight}px;${i.lineHeight?`line-height:${i.lineHeight}`:""}`)},e.toDisplayString(e.unref(t).title.text),5),e.unref(t).subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"atom-subtitle",style:e.normalizeStyle(`width: calc(100% - ${e.unref(t).title.paddingLeft+e.unref(t).title.paddingRight}px); text-align:${e.unref(t).title.textAlign};color:${e.unref(t).subtitle.color};font-size:${e.unref(t).subtitle.fontSize}px;font-weight:${e.unref(t).subtitle.bold?"bold":""};padding-left:${e.unref(t).title.paddingLeft}px;padding-right:${e.unref(t).title.paddingRight}px;${i.lineHeight?`line-height:${i.lineHeight}`:""}`)},e.toDisplayString(e.unref(t).subtitle.text),5)):e.createCommentVNode("",!0),e.unref(t).subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width: calc(100% - ${e.unref(t).title.paddingLeft+e.unref(t).title.paddingRight}px); text-align:${e.unref(t).title.textAlign};color:${e.unref(t).subtitle.color};font-size:${e.unref(t).subtitle.fontSize}px;font-weight:${e.unref(t).subtitle.bold?"bold":""};padding-left:${e.unref(t).title.paddingLeft}px;padding-right:${e.unref(t).title.paddingRight}px;${i.lineHeight?`line-height:${i.lineHeight}`:""}`)},[e.renderSlot(l.$slots,"default")],4)):e.createCommentVNode("",!0)],64))}};exports._sfc_main=o;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref as a, onMounted as b, onUnmounted as h, computed as p, createBlock as g, openBlock as v, Teleport as x, createElementBlock as S, createCommentVNode as k, normalizeStyle as $, normalizeClass as C, renderSlot as c, createElementVNode as B } from "vue";
|
|
2
|
-
import { s as F } from "./index-
|
|
2
|
+
import { s as F } from "./index-BkzHk-mH.js";
|
|
3
3
|
function w({ tooltip: e, chart: o, clientPosition: t, positionPreference: r = "center", defaultOffsetY: u = 24, blockShiftY: s = !1 }) {
|
|
4
4
|
const l = a(0), f = a(u);
|
|
5
5
|
if (e && o) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("vue"),p=require("./index-
|
|
1
|
+
"use strict";const t=require("vue"),p=require("./index-CSxlyqJ7.cjs");function y({tooltip:e,chart:l,clientPosition:o,positionPreference:u="center",defaultOffsetY:a=24,blockShiftY:f=!1}){const n=t.ref(0),s=t.ref(a);if(e&&l){const{width:r,height:c}=e.getBoundingClientRect(),{right:i,left:d,bottom:v}=l.getBoundingClientRect();u==="center"&&(o.x+r/2>i?n.value=-r+(i-o.x):o.x-r/2<d?n.value=-r+(r-(o.x-d)):n.value=-r/2),u==="right"&&(o.x+r>i?n.value=-r+(i-o.x):n.value=0),u==="left"&&(o.x<d+r?n.value=-r+(r-(o.x-d)):n.value=-r),o.y+c>v&&!f&&(s.value=-c-a)}return{top:o.y+s.value,left:o.x+n.value}}function b(e,l,o){t.onMounted(()=>e.addEventListener(l,o)),t.onUnmounted(()=>e.removeEventListener(l,o))}function m(){const e=t.ref(0),l=t.ref(0);return b(window,"mousemove",o=>{e.value=o.clientX,l.value=o.clientY}),{x:e,y:l}}const h=["aria-hidden"],g=["innerHTML"],x={__name:"Tooltip",props:{backgroundColor:{type:String,default:"#FFFFFF"},color:{type:String,default:"#000000"},content:String,maxWidth:{type:String,default:"300px"},parent:{type:Object},show:{type:Boolean,default:!1},isCustom:{type:Boolean,default:!1},fontSize:{type:[Number,String],default:14},borderRadius:{type:Number,default:4},borderColor:{type:String,default:"#e1e5e8"},borderWidth:{type:Number,default:1},backgroundOpacity:{type:Number,default:100},position:{type:String,default:"center"},offsetY:{type:Number,default:24},blockShiftY:{type:Boolean,default:!1},isFullscreen:{type:Boolean,default:!1}},setup(e){const l=e,o=t.ref(null),u=t.ref(m(l.parent)),a=t.computed(()=>y({tooltip:o.value,chart:l.parent,clientPosition:u.value,positionPreference:l.position,defaultOffsetY:l.offsetY,blockShiftY:l.blockShiftY})),f=t.computed(()=>p.setOpacity(l.backgroundColor,l.backgroundOpacity));return(n,s)=>(t.openBlock(),t.createBlock(t.Teleport,{to:e.isFullscreen?e.parent:"body"},[e.show?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"tooltip",ref:o,role:"tooltip","aria-hidden":!e.show,"aria-live":"polite",class:t.normalizeClass({"vue-data-ui-custom-tooltip":e.isCustom,"vue-data-ui-tooltip":!e.isCustom}),style:t.normalizeStyle(`pointer-events:none;top:${a.value.top}px;left:${a.value.left}px;${e.isCustom?"":`background:${f.value};color:${e.color};max-width:${e.maxWidth};font-size:${e.fontSize}px`};border-radius:${e.borderRadius}px;border:${e.borderWidth}px solid ${e.borderColor};z-index:2147483647;`)},[t.renderSlot(n.$slots,"tooltip-before"),t.renderSlot(n.$slots,"default"),t.createElementVNode("div",{innerHTML:e.content},null,8,g),t.renderSlot(n.$slots,"tooltip-after")],14,h)):t.createCommentVNode("",!0)],8,["to"]))}};exports._sfc_main=x;exports.useMouse=m;
|
|
@@ -211,7 +211,6 @@ From the dataset you pass into the props, this component will produce the most a
|
|
|
211
211
|
| `VueUiDigits` | `number` | `VueUiDigitsConfig` | ❌ | ❌ |
|
|
212
212
|
| `VueUiKpi` | `number` | `VueUiKpiConfig` | ❌ | `#title`, `#value`, `#comment-before`, `#comment-after` |
|
|
213
213
|
| `VueUiMiniLoader` | ❌ | `VueUiMiniLoaderConfig` | ❌ | ❌ |
|
|
214
|
-
| `VueUiScreenshot` | ❌ | `VueUiScreenshotConfig` | `@postImage`, `shoot`, `close` | ❌ |
|
|
215
214
|
| `VueUiSkeleton` | ❌ | `VueUiSkeletonConfig` | ❌ | ❌ |
|
|
216
215
|
| `VueUiTimer` | ❌ | `VueUiTimerConfig` | `@start`, `@pause`, `@reset`, `@restart`, `@lap` | `#time`, `#controls`, `#laps`, `#chart-background` |
|
|
217
216
|
| `VueUiIcon` | see below |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const x=require("./index-CSxlyqJ7.cjs");async function $(e){const n=e.querySelectorAll("img"),o=[];n.forEach(t=>{t.src&&!t.src.startsWith("data:")&&o.push(new Promise(r=>{const a=new window.Image;a.crossOrigin="anonymous",a.onload=function(){try{const s=document.createElement("canvas");s.width=a.naturalWidth,s.height=a.naturalHeight,s.getContext("2d").drawImage(a,0,0),t.src=s.toDataURL()}catch{}r()},a.onerror=function(){r()},a.src=t.src}))}),await Promise.all(o)}function I(e){e.querySelectorAll("[data-dom-to-png-ignore]").forEach(o=>{o.parentNode&&o.parentNode.removeChild(o)})}function b(e,n,o){const t=window.getComputedStyle(n);let r={},a=e.getAttribute("style");typeof a!="string"&&(a=""),a.split(";").forEach(i=>{if(typeof i=="string"&&i.trim()){const[d,f]=i.split(":");d&&f!==void 0&&(r[d.trim()]=f.trim())}});for(let i=0;i<t.length;i+=1){const d=t[i],f=t.getPropertyValue(d);r[d]=f}r.overflow="visible",r["overflow-x"]="visible",r["overflow-y"]="visible";const s=n.getBoundingClientRect();s.width>0&&(r.width=s.width+"px");const p=Math.max(n.scrollHeight,s.height);p>0&&(r.height=p+"px"),o&&(r["font-family"]=o);let w="";for(const i in r)w+=`${i}:${r[i]};`;e.setAttribute("style",w);const l=e.children||[],h=n.children||[];for(let i=0;i<l.length;i++)l[i].nodeType===1&&h[i]&&b(l[i],h[i],o)}function L(e,n){e.querySelectorAll("text").forEach(t=>{t.setAttribute("font-family",n),t.style.fontFamily=n})}function N(e){const n=new TextEncoder().encode(e);let o="";return n.forEach(t=>o+=String.fromCharCode(t)),btoa(o)}function P(e,n,o){let r=new XMLSerializer().serializeToString(e);r.match(/^<svg[^>]+xmlns="http\:\/\/www\.w3\.org\/2000\/svg"/)||(r=r.replace(/^<svg/,'<svg xmlns="http://www.w3.org/2000/svg"'));const a=window.btoa(unescape(encodeURIComponent(r))),s=new window.Image;return s.src=`data:image/svg+xml;base64,${a}`,new Promise((p,w)=>{s.onload=function(){const l=document.createElement("canvas");l.width=n,l.height=o,l.getContext("2d").drawImage(s,0,0,n,o),p(l.toDataURL("image/png",1))},s.onerror=l=>w(l)})}function C(e){if(e.nodeType!==1)return;const n=window.getComputedStyle(e);let o="";for(let t=0;t<n.length;t++){const r=n[t];o+=`${r}:${n.getPropertyValue(r)};`}e.setAttribute("style",o);for(let t=0;t<e.children.length;t++)C(e.children[t])}async function T({container:e,scale:n=2}){if(!e)throw new Error("No container provided");await document.fonts.ready;const o=window.getComputedStyle(e).fontFamily,t=e.cloneNode(!0),r=t.querySelectorAll("canvas"),a=e.querySelectorAll("canvas");for(let m=0;m<a.length;m+=1){const c=a[m],g=r[m];if(c&&g){const u=document.createElement("img");u.src=c.toDataURL("image/png"),u.width=c.width,u.height=c.height,u.style.width=c.style.width||c.width+"px",u.style.height=c.style.height||c.height+"px",g.replaceWith(u)}}const s=e.querySelector("svg[aria-label]");if(s){const m=s.getBoundingClientRect(),c=m.width,g=m.height;C(s),L(s,o);const u=Math.round(c*n),E=Math.round(g*n),M=await P(s,u,E),S=t.querySelector("svg[aria-label]");if(S){const y=document.createElement("img");y.src=M,y.width=c,y.height=g,y.style.width=c+"px",y.style.height=g+"px",S.parentNode.replaceChild(y,S)}}b(t,e,o),I(t),await $(t);const{width:p,height:w}=e.getBoundingClientRect(),l=Math.round(Math.max(t.scrollWidth,p)*n),h=Math.round(Math.max(t.scrollHeight,w)*1.01*n),i=document.createElementNS(x.XMLNS,"svg");i.setAttribute("viewBox",`0 0 ${l} ${h}`),i.setAttribute("width",l),i.setAttribute("height",h),i.setAttribute("style",`font-family:${o};`);const d=document.createElementNS(x.XMLNS,"foreignObject");d.setAttribute("x",0),d.setAttribute("y",0),d.setAttribute("width",l),d.setAttribute("height",h),d.setAttribute("style",`font-family:${o};`),t.style.transform=`scale(${n})`,t.style.transformOrigin="top left",t.style.width=p+"px",t.style.height=w+"px",t.style.background=window.getComputedStyle(e).backgroundColor,d.appendChild(t),i.appendChild(d);const f=new XMLSerializer().serializeToString(i),A=N(f),v=new window.Image;return v.crossOrigin="anonymous",v.src=`data:image/svg+xml;base64,${A}`,new Promise((m,c)=>{v.onload=function(){try{const g=document.createElement("canvas");g.width=l,g.height=h,g.getContext("2d").drawImage(v,0,0,l,h),m(g.toDataURL("image/png",1))}catch(g){c("Failed to draw SVG on canvas: "+g)}},v.onerror=function(){c("Failed to load SVG image for conversion")}})}exports.domToPng=T;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { X as x } from "./index-BkzHk-mH.js";
|
|
2
|
+
async function $(e) {
|
|
3
|
+
const n = e.querySelectorAll("img"), o = [];
|
|
4
|
+
n.forEach((t) => {
|
|
5
|
+
t.src && !t.src.startsWith("data:") && o.push(
|
|
6
|
+
new Promise((r) => {
|
|
7
|
+
const a = new window.Image();
|
|
8
|
+
a.crossOrigin = "anonymous", a.onload = function() {
|
|
9
|
+
try {
|
|
10
|
+
const s = document.createElement("canvas");
|
|
11
|
+
s.width = a.naturalWidth, s.height = a.naturalHeight, s.getContext("2d").drawImage(a, 0, 0), t.src = s.toDataURL();
|
|
12
|
+
} catch {
|
|
13
|
+
}
|
|
14
|
+
r();
|
|
15
|
+
}, a.onerror = function() {
|
|
16
|
+
r();
|
|
17
|
+
}, a.src = t.src;
|
|
18
|
+
})
|
|
19
|
+
);
|
|
20
|
+
}), await Promise.all(o);
|
|
21
|
+
}
|
|
22
|
+
function I(e) {
|
|
23
|
+
e.querySelectorAll("[data-dom-to-png-ignore]").forEach((o) => {
|
|
24
|
+
o.parentNode && o.parentNode.removeChild(o);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function b(e, n, o) {
|
|
28
|
+
const t = window.getComputedStyle(n);
|
|
29
|
+
let r = {}, a = e.getAttribute("style");
|
|
30
|
+
typeof a != "string" && (a = ""), a.split(";").forEach((i) => {
|
|
31
|
+
if (typeof i == "string" && i.trim()) {
|
|
32
|
+
const [d, w] = i.split(":");
|
|
33
|
+
d && w !== void 0 && (r[d.trim()] = w.trim());
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
for (let i = 0; i < t.length; i += 1) {
|
|
37
|
+
const d = t[i], w = t.getPropertyValue(d);
|
|
38
|
+
r[d] = w;
|
|
39
|
+
}
|
|
40
|
+
r.overflow = "visible", r["overflow-x"] = "visible", r["overflow-y"] = "visible";
|
|
41
|
+
const s = n.getBoundingClientRect();
|
|
42
|
+
s.width > 0 && (r.width = s.width + "px");
|
|
43
|
+
const p = Math.max(n.scrollHeight, s.height);
|
|
44
|
+
p > 0 && (r.height = p + "px"), o && (r["font-family"] = o);
|
|
45
|
+
let f = "";
|
|
46
|
+
for (const i in r)
|
|
47
|
+
f += `${i}:${r[i]};`;
|
|
48
|
+
e.setAttribute("style", f);
|
|
49
|
+
const l = e.children || [], h = n.children || [];
|
|
50
|
+
for (let i = 0; i < l.length; i++)
|
|
51
|
+
l[i].nodeType === 1 && h[i] && b(l[i], h[i], o);
|
|
52
|
+
}
|
|
53
|
+
function L(e, n) {
|
|
54
|
+
e.querySelectorAll("text").forEach((t) => {
|
|
55
|
+
t.setAttribute("font-family", n), t.style.fontFamily = n;
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
function D(e) {
|
|
59
|
+
const n = new TextEncoder().encode(e);
|
|
60
|
+
let o = "";
|
|
61
|
+
return n.forEach((t) => o += String.fromCharCode(t)), btoa(o);
|
|
62
|
+
}
|
|
63
|
+
function N(e, n, o) {
|
|
64
|
+
let r = new XMLSerializer().serializeToString(e);
|
|
65
|
+
r.match(/^<svg[^>]+xmlns="http\:\/\/www\.w3\.org\/2000\/svg"/) || (r = r.replace(/^<svg/, '<svg xmlns="http://www.w3.org/2000/svg"'));
|
|
66
|
+
const a = window.btoa(unescape(encodeURIComponent(r))), s = new window.Image();
|
|
67
|
+
return s.src = `data:image/svg+xml;base64,${a}`, new Promise((p, f) => {
|
|
68
|
+
s.onload = function() {
|
|
69
|
+
const l = document.createElement("canvas");
|
|
70
|
+
l.width = n, l.height = o, l.getContext("2d").drawImage(s, 0, 0, n, o), p(l.toDataURL("image/png", 1));
|
|
71
|
+
}, s.onerror = (l) => f(l);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
function C(e) {
|
|
75
|
+
if (e.nodeType !== 1) return;
|
|
76
|
+
const n = window.getComputedStyle(e);
|
|
77
|
+
let o = "";
|
|
78
|
+
for (let t = 0; t < n.length; t++) {
|
|
79
|
+
const r = n[t];
|
|
80
|
+
o += `${r}:${n.getPropertyValue(r)};`;
|
|
81
|
+
}
|
|
82
|
+
e.setAttribute("style", o);
|
|
83
|
+
for (let t = 0; t < e.children.length; t++)
|
|
84
|
+
C(e.children[t]);
|
|
85
|
+
}
|
|
86
|
+
async function R({ container: e, scale: n = 2 }) {
|
|
87
|
+
if (!e) throw new Error("No container provided");
|
|
88
|
+
await document.fonts.ready;
|
|
89
|
+
const o = window.getComputedStyle(e).fontFamily, t = e.cloneNode(!0), r = t.querySelectorAll("canvas"), a = e.querySelectorAll("canvas");
|
|
90
|
+
for (let m = 0; m < a.length; m += 1) {
|
|
91
|
+
const c = a[m], g = r[m];
|
|
92
|
+
if (c && g) {
|
|
93
|
+
const u = document.createElement("img");
|
|
94
|
+
u.src = c.toDataURL("image/png"), u.width = c.width, u.height = c.height, u.style.width = c.style.width || c.width + "px", u.style.height = c.style.height || c.height + "px", g.replaceWith(u);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
const s = e.querySelector("svg[aria-label]");
|
|
98
|
+
if (s) {
|
|
99
|
+
const m = s.getBoundingClientRect(), c = m.width, g = m.height;
|
|
100
|
+
C(s), L(s, o);
|
|
101
|
+
const u = Math.round(c * n), E = Math.round(g * n), M = await N(s, u, E), S = t.querySelector("svg[aria-label]");
|
|
102
|
+
if (S) {
|
|
103
|
+
const y = document.createElement("img");
|
|
104
|
+
y.src = M, y.width = c, y.height = g, y.style.width = c + "px", y.style.height = g + "px", S.parentNode.replaceChild(y, S);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
b(t, e, o), I(t), await $(t);
|
|
108
|
+
const { width: p, height: f } = e.getBoundingClientRect(), l = Math.round(Math.max(t.scrollWidth, p) * n), h = Math.round(Math.max(t.scrollHeight, f) * 1.01 * n), i = document.createElementNS(x, "svg");
|
|
109
|
+
i.setAttribute("viewBox", `0 0 ${l} ${h}`), i.setAttribute("width", l), i.setAttribute("height", h), i.setAttribute("style", `font-family:${o};`);
|
|
110
|
+
const d = document.createElementNS(x, "foreignObject");
|
|
111
|
+
d.setAttribute("x", 0), d.setAttribute("y", 0), d.setAttribute("width", l), d.setAttribute("height", h), d.setAttribute("style", `font-family:${o};`), t.style.transform = `scale(${n})`, t.style.transformOrigin = "top left", t.style.width = p + "px", t.style.height = f + "px", t.style.background = window.getComputedStyle(e).backgroundColor, d.appendChild(t), i.appendChild(d);
|
|
112
|
+
const w = new XMLSerializer().serializeToString(i), A = D(w), v = new window.Image();
|
|
113
|
+
return v.crossOrigin = "anonymous", v.src = `data:image/svg+xml;base64,${A}`, new Promise((m, c) => {
|
|
114
|
+
v.onload = function() {
|
|
115
|
+
try {
|
|
116
|
+
const g = document.createElement("canvas");
|
|
117
|
+
g.width = l, g.height = h, g.getContext("2d").drawImage(v, 0, 0, l, h), m(g.toDataURL("image/png", 1));
|
|
118
|
+
} catch (g) {
|
|
119
|
+
c("Failed to draw SVG on canvas: " + g);
|
|
120
|
+
}
|
|
121
|
+
}, v.onerror = function() {
|
|
122
|
+
c("Failed to load SVG image for conversion");
|
|
123
|
+
};
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
export {
|
|
127
|
+
R as d
|
|
128
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./dom-to-png-9admCVmW.cjs");async function d({domElement:r,fileName:n,format:t="png",scale:c=2}){if(!r)return Promise.reject("No element provided");if(t==="svg"){const o=converter.convertToImg({container:r,scale:c});if(!o)return Promise.reject("Could not create SVG image");const e=document.createElement("a");return e.href=o.src,e.download=`${n}.svg`,document.body.appendChild(e),e.click(),document.body.removeChild(e),Promise.resolve()}try{const o=await i.domToPng({container:r,scale:c}),e=document.createElement("a");e.href=o,e.download=`${n}.${t}`,document.body.appendChild(e),e.click(),document.body.removeChild(e)}catch(o){throw console.error("Error generating image:",o),o}}exports.default=d;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { d as i } from "./dom-to-png-Bt7F5Nv1.js";
|
|
2
|
+
async function a({ domElement: r, fileName: n, format: t = "png", scale: c = 2 }) {
|
|
3
|
+
if (!r) return Promise.reject("No element provided");
|
|
4
|
+
if (t === "svg") {
|
|
5
|
+
const o = converter.convertToImg({ container: r, scale: c });
|
|
6
|
+
if (!o) return Promise.reject("Could not create SVG image");
|
|
7
|
+
const e = document.createElement("a");
|
|
8
|
+
return e.href = o.src, e.download = `${n}.svg`, document.body.appendChild(e), e.click(), document.body.removeChild(e), Promise.resolve();
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
const o = await i({ container: r, scale: c }), e = document.createElement("a");
|
|
12
|
+
e.href = o, e.download = `${n}.${t}`, document.body.appendChild(e), e.click(), document.body.removeChild(e);
|
|
13
|
+
} catch (o) {
|
|
14
|
+
throw console.error("Error generating image:", o), o;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
a as default
|
|
19
|
+
};
|