vue-data-ui 2.6.52-beta.6 → 2.6.52-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-Bmuagek-.cjs → Arrow-DaC4Jggt.cjs} +1 -1
- package/dist/{Arrow-RiN1z7ie.js → Arrow-Dac3K3h8.js} +1 -1
- package/dist/{BaseIcon-BAxYgfAm.js → BaseIcon-By9WO4ls.js} +1 -1
- package/dist/{BaseIcon-B349RAyW.cjs → BaseIcon-qK9HKOKj.cjs} +1 -1
- package/dist/{ColorPicker-DekoPDIt.js → ColorPicker-CRLN58_A.js} +3 -3
- package/dist/{ColorPicker-Bw8EzqiM.cjs → ColorPicker-D4DTJqI4.cjs} +1 -1
- package/dist/{DataTable-BJ3KZIe8.js → DataTable-0qV0jhOu.js} +2 -2
- package/dist/{DataTable-BcPR1fW7.cjs → DataTable-ON_AwHrY.cjs} +1 -1
- package/dist/{Legend-caKCDIIQ.cjs → Legend-Cz8MqyYC.cjs} +1 -1
- package/dist/{Legend-Hw3oxgbI.js → Legend-D_pcYpOJ.js} +2 -2
- package/dist/{PackageVersion-CpV0RpJq.js → PackageVersion-BudVgT3M.js} +1 -1
- package/dist/{PackageVersion-Cm5KOdVd.cjs → PackageVersion-C018cxFA.cjs} +1 -1
- package/dist/{PenAndPaper-uyV1YF-q.js → PenAndPaper-BYiQGyiJ.js} +3 -3
- package/dist/{PenAndPaper-DPnSHhvp.cjs → PenAndPaper-eLbpB2Tr.cjs} +1 -1
- package/dist/{Shape-CRuAgILH.cjs → Shape-COTQ5iv2.cjs} +1 -1
- package/dist/{Shape-EPrVd76R.js → Shape-CcYM5MgR.js} +1 -1
- package/dist/{Slicer-yS3gfSsl.cjs → Slicer-DCHrly-q.cjs} +1 -1
- package/dist/{Slicer-CMeaHXY1.js → Slicer-DDKRQlPl.js} +2 -2
- package/dist/{Title-UKRXtepJ.cjs → Title-D9WNuQFw.cjs} +1 -1
- package/dist/{Title-Bd-Pte6w.js → Title-eLQhK-oq.js} +1 -1
- package/dist/{Tooltip-FU7GH6pn.cjs → Tooltip-B3kdH-2d.cjs} +1 -1
- package/dist/{Tooltip-Cj6Nr5c0.js → Tooltip-BSVuMX7E.js} +1 -1
- package/dist/dom-to-png-DHexIXWy.cjs +2 -0
- package/dist/{dom-to-png-4Uk1daGl.js → dom-to-png-qzX39YwJ.js} +47 -50
- package/dist/{img-D0Kd39f5.js → img-LQGQYbAP.js} +1 -1
- package/dist/{img-Cts_9gGv.cjs → img-kapZonyN.cjs} +1 -1
- package/dist/{index-XvxzVQMe.js → index-BdRXF4zl.js} +1 -1
- package/dist/{index-ChlQjGUM.cjs → index-BpnRfvUv.cjs} +1 -1
- package/dist/{pdf-0EQ8v3ed.js → pdf-CCssh6kD.js} +1 -1
- package/dist/{pdf-Bm4WXVBa.cjs → pdf-dfIXjDRu.cjs} +1 -1
- package/dist/{useNestedProp-C_BEN999.js → useNestedProp-BdfpF0fL.js} +1 -1
- package/dist/{useNestedProp-Bs8H41X1.cjs → useNestedProp-yHffQRpQ.cjs} +1 -1
- package/dist/{usePrinter-CVmpLKHY.cjs → usePrinter-BlwwnMSN.cjs} +1 -1
- package/dist/{usePrinter-Cn279Xea.js → usePrinter-C2JlskbC.js} +3 -3
- package/dist/{vue-data-ui-X2L-FYph.cjs → vue-data-ui-7v42K5gt.cjs} +1 -1
- package/dist/{vue-data-ui-ZSKXoTJd.js → vue-data-ui-DskkVLyv.js} +60 -60
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-Ew1Bs5rR.js → vue-ui-3d-bar-5_2LNSHm.js} +9 -9
- package/dist/{vue-ui-3d-bar-Bgpk_LqD.cjs → vue-ui-3d-bar-SlYzaTWe.cjs} +1 -1
- package/dist/{vue-ui-accordion-BL6E2kzz.cjs → vue-ui-accordion-Dv7_RuxV.cjs} +1 -1
- package/dist/{vue-ui-accordion-RUeZaXDc.js → vue-ui-accordion-MQI7RWbr.js} +3 -3
- package/dist/{vue-ui-age-pyramid-BBD8qtA4.cjs → vue-ui-age-pyramid-DA8ecgTq.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-CwlUhPO-.js → vue-ui-age-pyramid-DGgHWKGr.js} +10 -10
- package/dist/{vue-ui-annotator-t0mQaDTN.cjs → vue-ui-annotator-B50RLG4_.cjs} +1 -1
- package/dist/{vue-ui-annotator-BR4YcdQv.js → vue-ui-annotator-Bam-aGzF.js} +2 -2
- package/dist/{vue-ui-bullet-CnaYIG8J.js → vue-ui-bullet-B5uALO6p.js} +8 -8
- package/dist/{vue-ui-bullet-7aVoO77u.cjs → vue-ui-bullet-BCCEdISW.cjs} +1 -1
- package/dist/{vue-ui-candlestick-CVT4ihXk.js → vue-ui-candlestick--ZbkDpG_.js} +11 -11
- package/dist/{vue-ui-candlestick-hVmDaXAP.cjs → vue-ui-candlestick-D2MEbWNY.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-4ruOR_1a.js → vue-ui-carousel-table-BM8buKoR.js} +4 -4
- package/dist/{vue-ui-carousel-table-BlYJytxh.cjs → vue-ui-carousel-table-CN8NGTlR.cjs} +1 -1
- package/dist/{vue-ui-chestnut-BN9FZTqH.js → vue-ui-chestnut-B8QPhKND.js} +8 -8
- package/dist/{vue-ui-chestnut-fiKr3hf6.cjs → vue-ui-chestnut-CbDkM7ky.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-uGvdwPZU.js → vue-ui-circle-pack-BO-u58zm.js} +9 -9
- package/dist/{vue-ui-circle-pack-GgFAbhij.cjs → vue-ui-circle-pack-Dft1dJUa.cjs} +1 -1
- package/dist/{vue-ui-cursor-BVE4FR6C.cjs → vue-ui-cursor-BLTxIE3s.cjs} +1 -1
- package/dist/{vue-ui-cursor-DqF16_zv.js → vue-ui-cursor-k_iArHJc.js} +2 -2
- package/dist/{vue-ui-dashboard-Bbcw2vyJ.cjs → vue-ui-dashboard-DPscKTx9.cjs} +1 -1
- package/dist/{vue-ui-dashboard-jrGLCdU2.js → vue-ui-dashboard-DghtiiV0.js} +3 -3
- package/dist/{vue-ui-digits-eIZMIX94.js → vue-ui-digits-C163oPQi.js} +2 -2
- package/dist/{vue-ui-digits-BpBiMVDm.cjs → vue-ui-digits-C5MYWO6c.cjs} +1 -1
- package/dist/{vue-ui-donut-Bo9lT8gZ.cjs → vue-ui-donut-CdTrxJPw.cjs} +1 -1
- package/dist/{vue-ui-donut-Dea-8BnM.js → vue-ui-donut-DGmc_2ql.js} +12 -12
- package/dist/{vue-ui-donut-evolution-DcYdnHyu.cjs → vue-ui-donut-evolution-B_Ryni-e.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-nRcucn6U.js → vue-ui-donut-evolution-CUjSJbxw.js} +11 -11
- package/dist/{vue-ui-dumbbell-KhwJrIAs.cjs → vue-ui-dumbbell-DyqVa3uy.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-Cx9T3UEs.js → vue-ui-dumbbell-WqCILK1Y.js} +10 -10
- package/dist/{vue-ui-flow-DDHEKmdO.cjs → vue-ui-flow-B1FWfGHZ.cjs} +1 -1
- package/dist/{vue-ui-flow-ChuSWgvJ.js → vue-ui-flow-qnDJs7TX.js} +9 -9
- package/dist/{vue-ui-funnel-BiBn77Jk.js → vue-ui-funnel-BoetEPIk.js} +9 -9
- package/dist/{vue-ui-funnel-BAc6I80E.cjs → vue-ui-funnel-CaDqiFzZ.cjs} +1 -1
- package/dist/{vue-ui-galaxy-ga2WaFDe.cjs → vue-ui-galaxy-CxdhenWS.cjs} +1 -1
- package/dist/{vue-ui-galaxy-D0ytyygw.js → vue-ui-galaxy-D_8Vd-bt.js} +11 -11
- package/dist/{vue-ui-gauge-B-vKuxRp.cjs → vue-ui-gauge-D9Ezw8B7.cjs} +1 -1
- package/dist/{vue-ui-gauge-CaKdRolB.js → vue-ui-gauge-DIBzYR9Q.js} +7 -7
- package/dist/{vue-ui-gizmo-BAW6S4NE.cjs → vue-ui-gizmo-Cb4_knsM.cjs} +1 -1
- package/dist/{vue-ui-gizmo-DDjEVtiD.js → vue-ui-gizmo-_SZ4F9Tq.js} +3 -3
- package/dist/{vue-ui-heatmap-7ymLoYIh.js → vue-ui-heatmap-BSI3N3xB.js} +10 -10
- package/dist/{vue-ui-heatmap-Mn9MCP11.cjs → vue-ui-heatmap-CGkUNTgH.cjs} +1 -1
- package/dist/{vue-ui-history-plot-yLER0CTZ.cjs → vue-ui-history-plot-BJa7JIzW.cjs} +1 -1
- package/dist/{vue-ui-history-plot-Bxqq_qDQ.js → vue-ui-history-plot-C_alDuC1.js} +11 -11
- package/dist/{vue-ui-kpi-CMj90Wz9.js → vue-ui-kpi-D1MeO3Cd.js} +3 -3
- package/dist/{vue-ui-kpi-BfQgr2q_.cjs → vue-ui-kpi-Dj65b5iZ.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-Ce8weQpr.cjs → vue-ui-mini-loader-Bl0krmav.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-8InAsohj.js → vue-ui-mini-loader-C2RuVDXi.js} +2 -2
- package/dist/{vue-ui-molecule-BqkwDTfO.js → vue-ui-molecule-B8X_ADL9.js} +11 -11
- package/dist/{vue-ui-molecule-ePARMp7s.cjs → vue-ui-molecule-BbGpmjGK.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-C4MDQVrS.js → vue-ui-mood-radar-BPi1Td2q.js} +11 -11
- package/dist/{vue-ui-mood-radar-CHq8fqUx.cjs → vue-ui-mood-radar-DjMoBLgA.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-BnBdp_uw.cjs → vue-ui-nested-donuts-DCVonBCM.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-B3N8lFLk.js → vue-ui-nested-donuts-DErVz3N4.js} +11 -11
- package/dist/{vue-ui-onion-BMRnQzvK.js → vue-ui-onion-BUYmuiEj.js} +11 -11
- package/dist/{vue-ui-onion-B2lDQ6Xx.cjs → vue-ui-onion-NH4sxfSF.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-mdaiHdga.js → vue-ui-parallel-coordinate-plot-CVlP5vY8.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-4cc-78zb.cjs → vue-ui-parallel-coordinate-plot-CY6jzBpv.cjs} +1 -1
- package/dist/{vue-ui-quadrant-ByATeMMX.js → vue-ui-quadrant-R2YsB5-E.js} +12 -12
- package/dist/{vue-ui-quadrant-ByseEgYU.cjs → vue-ui-quadrant-eR9JtoM3.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-Bt7HZGgk.js → vue-ui-quick-chart-BytiWbRR.js} +9 -9
- package/dist/{vue-ui-quick-chart-D_noCVID.cjs → vue-ui-quick-chart-DNQH765e.cjs} +1 -1
- package/dist/{vue-ui-radar-BmT-Zcao.js → vue-ui-radar-BiQHcJl8.js} +12 -12
- package/dist/{vue-ui-radar-BMm-floh.cjs → vue-ui-radar-DKbD---J.cjs} +1 -1
- package/dist/{vue-ui-rating-Blq5pgeG.js → vue-ui-rating-BDOS2tMB.js} +2 -2
- package/dist/{vue-ui-rating-D0Qod8xN.cjs → vue-ui-rating-jJJLduA9.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-6yqYgrgP.js → vue-ui-relation-circle-BQXf37dy.js} +7 -7
- package/dist/{vue-ui-relation-circle-OMGNEW5B.cjs → vue-ui-relation-circle-CXpjECVe.cjs} +1 -1
- package/dist/{vue-ui-rings-CXMBgan5.js → vue-ui-rings-8xTm_fSZ.js} +12 -12
- package/dist/{vue-ui-rings-a8SsTxxr.cjs → vue-ui-rings-Dibiz3by.cjs} +1 -1
- package/dist/{vue-ui-scatter-Cl5W_hEb.js → vue-ui-scatter-CVOdgA4o.js} +12 -12
- package/dist/{vue-ui-scatter-kaSwuw-t.cjs → vue-ui-scatter-DRfMPJxM.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BdpmfTJR.js → vue-ui-skeleton-B0nPRRlJ.js} +3 -3
- package/dist/{vue-ui-skeleton-v-nkwNsw.cjs → vue-ui-skeleton-R-5ZiSXE.cjs} +1 -1
- package/dist/{vue-ui-smiley-kGIq97W8.cjs → vue-ui-smiley-DL4v0xTc.cjs} +1 -1
- package/dist/{vue-ui-smiley-x6JkMqXT.js → vue-ui-smiley-DsfyKykj.js} +2 -2
- package/dist/{vue-ui-spark-trend-BwNWbxNC.cjs → vue-ui-spark-trend-CtZueeli.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-BnVR50M4.js → vue-ui-spark-trend-DeNpHh0b.js} +5 -5
- package/dist/{vue-ui-sparkbar-2gGziDgE.cjs → vue-ui-sparkbar-BuyBi1lu.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-Ucz1lsrD.js → vue-ui-sparkbar-CCMc6e3r.js} +4 -4
- package/dist/{vue-ui-sparkgauge-D0H6dA24.cjs → vue-ui-sparkgauge-Du2ue49R.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-DGqWf0VR.js → vue-ui-sparkgauge-GeDl1JLP.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-DaztcIvh.js → vue-ui-sparkhistogram-B_Z5HNKE.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-DXsjgFNB.cjs → vue-ui-sparkhistogram-CWmqcycr.cjs} +1 -1
- package/dist/{vue-ui-sparkline-CPupg_Uh.cjs → vue-ui-sparkline-Dmb_5C0G.cjs} +1 -1
- package/dist/{vue-ui-sparkline-CSB6L_jV.js → vue-ui-sparkline-DuI3UoML.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-Bvs7CNDm.cjs → vue-ui-sparkstackbar-C3e6K5v1.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DyDYVbL_.js → vue-ui-sparkstackbar-ntCbTlSM.js} +5 -5
- package/dist/{vue-ui-stackbar-BcHG42Ex.cjs → vue-ui-stackbar-C6KJfccr.cjs} +1 -1
- package/dist/{vue-ui-stackbar-DoO-SH2w.js → vue-ui-stackbar-DUIwcaso.js} +13 -13
- package/dist/{vue-ui-strip-plot-DxfQP9K6.js → vue-ui-strip-plot-C0bfeCNH.js} +11 -11
- package/dist/{vue-ui-strip-plot--AL81-rq.cjs → vue-ui-strip-plot-DP_PpPtz.cjs} +1 -1
- package/dist/{vue-ui-table-C04-SQz3.cjs → vue-ui-table-D2Cwg4FX.cjs} +1 -1
- package/dist/{vue-ui-table-iZC74sEc.js → vue-ui-table-DaxNA7Ul.js} +1 -1
- package/dist/{vue-ui-table-heatmap-C_uABka3.js → vue-ui-table-heatmap-DvPQdgJS.js} +4 -4
- package/dist/{vue-ui-table-heatmap-BRvcm2RA.cjs → vue-ui-table-heatmap-iysX0iSr.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-DKSAhnTv.js → vue-ui-table-sparkline-0Zpt7gvo.js} +5 -5
- package/dist/{vue-ui-table-sparkline-DjAGJ_ya.cjs → vue-ui-table-sparkline-D2d4XFaK.cjs} +1 -1
- package/dist/{vue-ui-thermometer-DEXEM_MC.js → vue-ui-thermometer-0BbHDeMW.js} +7 -7
- package/dist/{vue-ui-thermometer-B04XYHVe.cjs → vue-ui-thermometer-6-ENHra5.cjs} +1 -1
- package/dist/{vue-ui-timer-BmNT1B8p.cjs → vue-ui-timer-BVidfYwu.cjs} +1 -1
- package/dist/{vue-ui-timer-Dd2qnRp9.js → vue-ui-timer-BsuWxldB.js} +5 -5
- package/dist/{vue-ui-tiremarks-CF1aavJH.cjs → vue-ui-tiremarks-C2oBMeBH.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-DbrC5WYw.js → vue-ui-tiremarks-DYkVKOcU.js} +7 -7
- package/dist/{vue-ui-treemap-NWjE4ly8.js → vue-ui-treemap-B6D40yJF.js} +12 -12
- package/dist/{vue-ui-treemap-C84yJjKJ.cjs → vue-ui-treemap-y0ahQpVZ.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-0zxdykkK.js → vue-ui-vertical-bar-CacgMbML.js} +12 -12
- package/dist/{vue-ui-vertical-bar-BxuThvGE.cjs → vue-ui-vertical-bar-Cvnk_DfK.cjs} +1 -1
- package/dist/{vue-ui-waffle-2ifkaGQ2.cjs → vue-ui-waffle-Lt6Np1DU.cjs} +1 -1
- package/dist/{vue-ui-waffle-Dcubg2Kb.js → vue-ui-waffle-bQ9QKWYN.js} +12 -12
- package/dist/{vue-ui-wheel-Bt-CXH2G.js → vue-ui-wheel-BKkVrcIW.js} +7 -7
- package/dist/{vue-ui-wheel-AJGtNRDm.cjs → vue-ui-wheel-_L5kmjKE.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-5C9Ut98u.js → vue-ui-word-cloud-BPFArbsP.js} +10 -10
- package/dist/{vue-ui-word-cloud-DH1GUHkq.cjs → vue-ui-word-cloud-THML_zJG.cjs} +1 -1
- package/dist/{vue-ui-xy-W-t9J-O6.cjs → vue-ui-xy-BQnq2Jvu.cjs} +2 -2
- package/dist/{vue-ui-xy-canvas-DBi7hwZE.cjs → vue-ui-xy-canvas-B_KgByGx.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-BsxSFTZg.js → vue-ui-xy-canvas-CLJtE3DK.js} +12 -12
- package/dist/{vue-ui-xy-DUhlrIn7.js → vue-ui-xy-mIg7Wumg.js} +16 -16
- package/package.json +1 -1
- package/dist/dom-to-png-RudRUy7Y.cjs +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),u=require("./index-ChlQjGUM.cjs"),p=require("./useResponsive-DQmBAoBf.cjs"),vt=require("./Tooltip-FU7GH6pn.cjs"),dt=require("./Legend-caKCDIIQ.cjs"),ht=require("./Title-UKRXtepJ.cjs"),ft=require("./Slicer-yS3gfSsl.cjs"),Ye=require("./usePrinter-CVmpLKHY.cjs"),yt=require("./vue-ui-accordion-BL6E2kzz.cjs"),pt=require("./DataTable-BcPR1fW7.cjs"),gt=require("./vue-ui-skeleton-v-nkwNsw.cjs"),He=require("./useNestedProp-Bs8H41X1.cjs"),mt=require("./useUserOptionState-BgepsfED.cjs"),bt=require("./useChartAccessibility-Cm7nkzTG.cjs"),me=require("./BaseIcon-B349RAyW.cjs"),xt=require("./ColorPicker-Bw8EzqiM.cjs"),Xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),kt={class:l.normalizeClass({"vue-ui-pen-and-paper-action":!0}),style:{padding:"0 !important"}},Lt=["disabled"],Ct=["xmlns","viewBox"],wt=["cx","cy","r","fill"],St=["d","stroke","stroke-width"],$t=["d","stroke","stroke-width"],zt={__name:"NonSvgPenAndPaper",props:{parent:{type:HTMLElement},backgroundColor:{type:String,default:"#FFFFFF"},color:{type:String,default:"#2D353C"},active:{type:Boolean,default:!1}},emits:["close"],setup($,{emit:be}){const X=$,xe=be,x=l.ref([]),D=l.ref([]),Z=l.ref("0 0 0 0"),V=l.ref(X.color),c=l.ref(1),k=l.computed(()=>u.lightenHexColor(X.color,.6));function F({width:h,height:v}){Z.value=`0 0 ${h} ${v}`}const U=l.ref(null);l.onMounted(()=>{l.nextTick(()=>{if(X.parent){U.value=new ResizeObserver(s=>{for(const d of s){const{width:g,height:C}=d.contentRect;F({width:g,height:C})}}),U.value.observe(X.parent);const{width:h,height:v}=X.parent.getBoundingClientRect();F({width:h,height:v})}})}),l.onBeforeUnmount(()=>{U.value&&U.value.disconnect()}),l.watch(()=>X.parent,h=>{if(!h)return;const{width:v,height:s}=X.parent.getBoundingClientRect();F({width:v,height:s})},{immediate:!0});const f=l.ref(!1),A=l.ref(""),_=l.ref(null);function I(h){if(!_.value)return;f.value=!0;const{x:v,y:s}=re(h);A.value=`M ${v} ${s}`}function q(h){if(!f.value||!_.value)return;const{x:v,y:s}=re(h);A.value+=` ${v} ${s}`}function Y(h){const v=h.trim().split(/\s+/);if(v.length<4)return h;const s=v.slice(1).map(Number);if(s.length%2!==0)return h;const d=G(s),g=[`M ${d[0]} ${d[1]}`];for(let E=2;E<d.length-2;E+=2){const t=d[E-2],M=d[E-1],P=d[E],T=d[E+1],B=(t+P)/2,j=(M+T)/2;g.push(`Q ${t} ${M} ${B} ${j}`)}const C=d[d.length-2],S=d[d.length-1];return g.push(`L ${C} ${S}`),g.join(" ")}function G(h,v=1){const s=[...h];for(let d=2;d<h.length-2;d+=2){const g=h[d],C=h[d+1],S=h[d-2],E=h[d-1],t=h[d+2],M=h[d+3];s[d]=g+v*((S+t)/2-g),s[d+1]=C+v*((E+M)/2-C)}return s}function oe(h){const v=h.trim().split(/\s+/);let s="",d="",g=null,C=null;for(let S=0;S<v.length;S+=1){const E=v[S];if(isNaN(E)){if(d=E,d==="M"||d==="L")g=parseFloat(v[++S]),C=parseFloat(v[++S]),s+=`${d}${g} ${C}`;else if(d==="Q"){const t=parseFloat(v[++S]),M=parseFloat(v[++S]),P=parseFloat(v[++S]),T=parseFloat(v[++S]);t===g&&M===C?s+=`t${P-g} ${T-C}`:s+=`q${t-g} ${M-C} ${P-g} ${T-C}`,g=P,C=T}}else{const t=parseFloat(E),M=parseFloat(v[++S]);if(d==="L"){const P=t-g,T=M-C;P===0?s+=`v${T}`:T===0?s+=`h${P}`:s+=`l${P} ${T}`,g=t,C=M}else if(d==="Q"){const P=t,T=M,B=parseFloat(v[++S]),j=parseFloat(v[++S]);P===g&&T===C?s+=`t${B-g} ${j-C}`:s+=`q${P-g} ${T-C} ${B-g} ${j-C}`,g=B,C=j}}}return s}function ee(){f.value&&(x.value.push({strokeWidth:c.value,path:oe(Y(A.value)),color:V.value}),D.value=[],A.value=""),f.value=!1}function re(h){if(!_.value)return{x:0,y:0};const v=_.value.getBoundingClientRect();let s,d;return h.touches&&h.touches.length?(s=h.touches[0].clientX,d=h.touches[0].clientY):(s=h.clientX,d=h.clientY),{x:s-v.left,y:d-v.top}}l.ref(!1);function te(){if(x.value.length>0){const h=x.value.pop();D.value.push(h)}}function ce(){if(D.value.length>0){const h=D.value.pop();x.value.push(h)}}function ve(){x.value=[],D.value=[]}const de=l.ref(null);return(h,v)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[$.active?(l.openBlock(),l.createElementBlock("div",{key:0,"data-dom-to-png-ignore":"",class:l.normalizeClass({"vue-ui-pen-and-paper-actions":!0,visible:$.active})},[l.createElementVNode("button",{class:"vue-ui-pen-and-paper-action",style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:v[0]||(v[0]=s=>xe("close"))},[l.createVNode(me.default,{name:"close",stroke:$.color},null,8,["stroke"])],4),l.createElementVNode("button",kt,[l.createVNode(xt.ColorPicker,{value:V.value,"onUpdate:value":v[1]||(v[1]=s=>V.value=s),backgroundColor:$.backgroundColor,buttonBorderColor:k.value},null,8,["value","backgroundColor","buttonBorderColor"])]),l.createElementVNode("button",{class:l.normalizeClass({"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!x.value.length}),disabled:!x.value.length,style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:te},[l.createVNode(me.default,{name:"restart",stroke:$.color},null,8,["stroke"])],14,Lt),l.createElementVNode("button",{class:l.normalizeClass({"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!D.value.length}),style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:ce},[l.createVNode(me.default,{name:"restart",stroke:$.color,style:{transform:"scaleX(-1)"}},null,8,["stroke"])],6),l.createElementVNode("button",{class:l.normalizeClass([{"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!x.value.length},"vue-ui-pen-and-paper-action"]),style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:ve},[l.createVNode(me.default,{name:"trash",stroke:$.color},null,8,["stroke"])],6),l.withDirectives(l.createElementVNode("input",{ref_key:"range",ref:de,type:"range",class:"vertical-range",min:.5,max:12,step:.1,"onUpdate:modelValue":v[2]||(v[2]=s=>c.value=s),style:l.normalizeStyle({accentColor:$.color})},null,4),[[l.vModelText,c.value]])],2)):l.createCommentVNode("",!0),(l.openBlock(),l.createElementBlock("svg",{ref_key:"svgElement",ref:_,xmlns:l.unref(u.XMLNS),viewBox:Z.value,class:l.normalizeClass({"vue-ui-pen-and-paper":!0,inactive:!$.active}),onMousedown:I,onMousemove:q,onMouseup:ee,onMouseleave:ee,onTouchstart:l.withModifiers(I,["prevent"]),onTouchmove:l.withModifiers(q,["prevent"]),onTouchend:ee},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(x.value,s=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:s},[s.path.replace("M","").split(" ").length===2?(l.openBlock(),l.createElementBlock("circle",{key:0,cx:s.path.replace("M","").split(" ")[0],cy:s.path.replace("M","").split(" ")[1],r:s.strokeWidth/2,fill:s.color},null,8,wt)):(l.openBlock(),l.createElementBlock("path",{key:1,class:"vue-ui-pen-and-paper-path",d:s.path,stroke:s.color,"stroke-width":s.strokeWidth,fill:"none"},null,8,St))],64))),128)),f.value?(l.openBlock(),l.createElementBlock("path",{key:0,class:"vue-ui-pen-and-paper-path vue-ui-pen-and-paper-path-drawing",d:Y(A.value),stroke:V.value,"stroke-width":c.value*1.1,fill:"none"},null,8,$t)):l.createCommentVNode("",!0)],42,Ct))],64))}},Mt=Xe._export_sfc(zt,[["__scopeId","data-v-6e690e62"]]),Pt=["id"],Tt=["onClick"],Bt={key:2,class:"vue-data-ui-watermark"},It=["innerHTML"],Et={__name:"vue-ui-xy-canvas",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:["selectLegend"],setup($,{expose:be,emit:X}){const{vue_ui_xy_canvas:xe}=u.useConfig(),x=$,D=l.ref(u.createUid()),Z=l.ref(null),V=l.ref(null),c=l.ref(null),k=l.ref(1),F=l.ref(1),U=l.ref(!1),f=l.ref(null),A=l.ref(""),_=l.ref(null),I=l.ref([]),q=l.ref(1),Y=l.ref(!0),G=l.ref(!0),oe=l.ref(null),ee=l.ref(0),re=l.ref(0),te=l.ref(!1),ce=l.ref(null),ve=l.ref(null),de=l.ref(null),h=l.ref(null),v=l.ref(0),s=l.ref(0),d=l.ref(0),g=l.ref(null),C=l.computed(()=>!!x.dataset&&x.dataset.length),S=X,E=l.useSlots();l.onMounted(()=>{E["chart-background"]&&console.warn("VueUiXyCanvas does not support the #chart-background slot.")});const t=l.computed({get:()=>j(),set:e=>e}),{userOptionsVisible:M,setUserOptionsVisibility:P,keepUserOptionState:T}=mt.useUserOptionState({config:t.value}),{svgRef:B}=bt.useChartAccessibility({config:t.value.style.chart.title});function j(){const e=He.useNestedProp({userConfig:x.config,defaultConfig:xe});let o={};return e.theme?o={...He.useNestedProp({userConfig:u.themes.vue_ui_xy_canvas[e.theme]||x.config,defaultConfig:e}),customPalette:u.themePalettes[e.theme]||u.palette}:o=e,x.config&&u.hasDeepProperty(x.config,"style.chart.scale.min")?o.style.chart.scale.min=x.config.style.chart.scale.min:o.style.chart.scale.min=null,x.config&&u.hasDeepProperty(x.config,"style.chart.scale.max")?o.style.chart.scale.max=x.config.style.chart.scale.max:o.style.chart.scale.max=null,x.config&&u.hasDeepProperty(x.config,"style.chart.zoom.startIndex")?o.style.chart.zoom.startIndex=x.config.style.chart.zoom.startIndex:o.style.chart.zoom.startIndex=null,x.config&&u.hasDeepProperty(x.config,"style.chart.zoom.endIndex")?o.style.chart.zoom.endIndex=x.config.style.chart.zoom.endIndex:o.style.chart.zoom.endIndex=null,o}l.watch(()=>x.config,e=>{t.value=j(),M.value=!t.value.userOptions.showOnChartHover,ke(),v.value+=1,s.value+=1,d.value+=1,i.value.showTable=t.value.table.show,i.value.showDataLabels=t.value.style.chart.dataLabels.show,i.value.stacked=t.value.style.chart.stacked,i.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0}),l.watch(()=>x.dataset,()=>{ke(),v.value+=1,s.value+=1,d.value+=1},{deep:!0});const Ce=l.ref(t.value.style.chart.aspectRatio),{isPrinting:we,isImaging:Se,generatePdf:$e,generateImage:ze}=Ye.usePrinter({elementId:`xy_canvas_${D.value}`,fileName:t.value.style.chart.title.text||"vue-ui-xy-canvas",options:t.value.userOptions.print}),i=l.ref({showTable:t.value.table.show,showDataLabels:t.value.style.chart.dataLabels.show,stacked:t.value.style.chart.stacked,showTooltip:t.value.style.chart.tooltip.show});function Ue(e){te.value=e,re.value+=1}const Me=l.computed(()=>u.convertCustomPalette(t.value.customPalette)),H=l.computed(()=>le.value?Math.max(...le.value.filter((e,o)=>!I.value.includes(e.absoluteIndex)).map(e=>e.series.length)):0),a=l.computed(()=>{const e=k.value-k.value*(t.value.style.chart.paddingProportions.left+t.value.style.chart.paddingProportions.right);return{canvasWidth:k.value,canvasHeight:F.value,left:k.value*t.value.style.chart.paddingProportions.left,top:F.value*t.value.style.chart.paddingProportions.top,right:k.value-k.value*t.value.style.chart.paddingProportions.right,bottom:F.value-F.value*t.value.style.chart.paddingProportions.bottom,width:e,height:F.value-F.value*(t.value.style.chart.paddingProportions.top+t.value.style.chart.paddingProportions.bottom),slot:e/(n.value.end-n.value.start)}});function Pe(e,o){return e/o}function qe({hasAutoScale:e,series:o,min:r,max:y,scale:b,yOffset:R,individualHeight:m,stackIndex:w=null}){return o.map((J,O)=>{const Q=b.min<0?Math.abs(b.min):0,K=Pe(J+Q,Q+b.max);let se,ie;e&&(se=b.min,ie=Pe(J-se,b.max-se));let W=0;return w===null?W=a.value.bottom-a.value.height*(e?ie:K):W=a.value.bottom-R-m*(e?ie:K),{x:a.value.left+a.value.slot*O+a.value.slot/2,y:W,value:J}})}const z=l.computed(()=>{const e=t.value.style.chart.scale.min!==null?t.value.style.chart.scale.min:Math.min(...le.value.filter((m,w)=>!I.value.includes(m.absoluteIndex)).flatMap(m=>m.series.slice(n.value.start,n.value.end))),o=t.value.style.chart.scale.max!==null?t.value.style.chart.scale.max:Math.max(...le.value.filter((m,w)=>!I.value.includes(m.absoluteIndex)).flatMap(m=>m.series.slice(n.value.start,n.value.end))),r=u.calculateNiceScale(e<0?e:0,o===e?e+1<0?0:e+1:o<0?0:o,t.value.style.chart.scale.ticks),y=r.min<0?Math.abs(r.min):0,b=a.value.bottom-a.value.height*(y/(r.max+y)),R=r.ticks.map(m=>({y:a.value.bottom-a.value.height*((m+y)/(r.max+y)),x:a.value.left-8,value:m}));return{absoluteMin:y,max:o,min:e,scale:r,yLabels:R,zero:b}}),We=l.computed(()=>L.value.map(e=>`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),u=require("./index-BpnRfvUv.cjs"),p=require("./useResponsive-DQmBAoBf.cjs"),vt=require("./Tooltip-B3kdH-2d.cjs"),dt=require("./Legend-Cz8MqyYC.cjs"),ht=require("./Title-D9WNuQFw.cjs"),ft=require("./Slicer-DCHrly-q.cjs"),Ye=require("./usePrinter-BlwwnMSN.cjs"),yt=require("./vue-ui-accordion-Dv7_RuxV.cjs"),pt=require("./DataTable-ON_AwHrY.cjs"),gt=require("./vue-ui-skeleton-R-5ZiSXE.cjs"),He=require("./useNestedProp-yHffQRpQ.cjs"),mt=require("./useUserOptionState-BgepsfED.cjs"),bt=require("./useChartAccessibility-Cm7nkzTG.cjs"),me=require("./BaseIcon-qK9HKOKj.cjs"),xt=require("./ColorPicker-D4DTJqI4.cjs"),Xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),kt={class:l.normalizeClass({"vue-ui-pen-and-paper-action":!0}),style:{padding:"0 !important"}},Lt=["disabled"],Ct=["xmlns","viewBox"],wt=["cx","cy","r","fill"],St=["d","stroke","stroke-width"],$t=["d","stroke","stroke-width"],zt={__name:"NonSvgPenAndPaper",props:{parent:{type:HTMLElement},backgroundColor:{type:String,default:"#FFFFFF"},color:{type:String,default:"#2D353C"},active:{type:Boolean,default:!1}},emits:["close"],setup($,{emit:be}){const X=$,xe=be,x=l.ref([]),D=l.ref([]),Z=l.ref("0 0 0 0"),V=l.ref(X.color),c=l.ref(1),k=l.computed(()=>u.lightenHexColor(X.color,.6));function F({width:h,height:v}){Z.value=`0 0 ${h} ${v}`}const U=l.ref(null);l.onMounted(()=>{l.nextTick(()=>{if(X.parent){U.value=new ResizeObserver(s=>{for(const d of s){const{width:g,height:C}=d.contentRect;F({width:g,height:C})}}),U.value.observe(X.parent);const{width:h,height:v}=X.parent.getBoundingClientRect();F({width:h,height:v})}})}),l.onBeforeUnmount(()=>{U.value&&U.value.disconnect()}),l.watch(()=>X.parent,h=>{if(!h)return;const{width:v,height:s}=X.parent.getBoundingClientRect();F({width:v,height:s})},{immediate:!0});const f=l.ref(!1),A=l.ref(""),_=l.ref(null);function I(h){if(!_.value)return;f.value=!0;const{x:v,y:s}=re(h);A.value=`M ${v} ${s}`}function q(h){if(!f.value||!_.value)return;const{x:v,y:s}=re(h);A.value+=` ${v} ${s}`}function Y(h){const v=h.trim().split(/\s+/);if(v.length<4)return h;const s=v.slice(1).map(Number);if(s.length%2!==0)return h;const d=G(s),g=[`M ${d[0]} ${d[1]}`];for(let E=2;E<d.length-2;E+=2){const t=d[E-2],M=d[E-1],P=d[E],T=d[E+1],B=(t+P)/2,j=(M+T)/2;g.push(`Q ${t} ${M} ${B} ${j}`)}const C=d[d.length-2],S=d[d.length-1];return g.push(`L ${C} ${S}`),g.join(" ")}function G(h,v=1){const s=[...h];for(let d=2;d<h.length-2;d+=2){const g=h[d],C=h[d+1],S=h[d-2],E=h[d-1],t=h[d+2],M=h[d+3];s[d]=g+v*((S+t)/2-g),s[d+1]=C+v*((E+M)/2-C)}return s}function oe(h){const v=h.trim().split(/\s+/);let s="",d="",g=null,C=null;for(let S=0;S<v.length;S+=1){const E=v[S];if(isNaN(E)){if(d=E,d==="M"||d==="L")g=parseFloat(v[++S]),C=parseFloat(v[++S]),s+=`${d}${g} ${C}`;else if(d==="Q"){const t=parseFloat(v[++S]),M=parseFloat(v[++S]),P=parseFloat(v[++S]),T=parseFloat(v[++S]);t===g&&M===C?s+=`t${P-g} ${T-C}`:s+=`q${t-g} ${M-C} ${P-g} ${T-C}`,g=P,C=T}}else{const t=parseFloat(E),M=parseFloat(v[++S]);if(d==="L"){const P=t-g,T=M-C;P===0?s+=`v${T}`:T===0?s+=`h${P}`:s+=`l${P} ${T}`,g=t,C=M}else if(d==="Q"){const P=t,T=M,B=parseFloat(v[++S]),j=parseFloat(v[++S]);P===g&&T===C?s+=`t${B-g} ${j-C}`:s+=`q${P-g} ${T-C} ${B-g} ${j-C}`,g=B,C=j}}}return s}function ee(){f.value&&(x.value.push({strokeWidth:c.value,path:oe(Y(A.value)),color:V.value}),D.value=[],A.value=""),f.value=!1}function re(h){if(!_.value)return{x:0,y:0};const v=_.value.getBoundingClientRect();let s,d;return h.touches&&h.touches.length?(s=h.touches[0].clientX,d=h.touches[0].clientY):(s=h.clientX,d=h.clientY),{x:s-v.left,y:d-v.top}}l.ref(!1);function te(){if(x.value.length>0){const h=x.value.pop();D.value.push(h)}}function ce(){if(D.value.length>0){const h=D.value.pop();x.value.push(h)}}function ve(){x.value=[],D.value=[]}const de=l.ref(null);return(h,v)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[$.active?(l.openBlock(),l.createElementBlock("div",{key:0,"data-dom-to-png-ignore":"",class:l.normalizeClass({"vue-ui-pen-and-paper-actions":!0,visible:$.active})},[l.createElementVNode("button",{class:"vue-ui-pen-and-paper-action",style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:v[0]||(v[0]=s=>xe("close"))},[l.createVNode(me.default,{name:"close",stroke:$.color},null,8,["stroke"])],4),l.createElementVNode("button",kt,[l.createVNode(xt.ColorPicker,{value:V.value,"onUpdate:value":v[1]||(v[1]=s=>V.value=s),backgroundColor:$.backgroundColor,buttonBorderColor:k.value},null,8,["value","backgroundColor","buttonBorderColor"])]),l.createElementVNode("button",{class:l.normalizeClass({"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!x.value.length}),disabled:!x.value.length,style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:te},[l.createVNode(me.default,{name:"restart",stroke:$.color},null,8,["stroke"])],14,Lt),l.createElementVNode("button",{class:l.normalizeClass({"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!D.value.length}),style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:ce},[l.createVNode(me.default,{name:"restart",stroke:$.color,style:{transform:"scaleX(-1)"}},null,8,["stroke"])],6),l.createElementVNode("button",{class:l.normalizeClass([{"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!x.value.length},"vue-ui-pen-and-paper-action"]),style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:ve},[l.createVNode(me.default,{name:"trash",stroke:$.color},null,8,["stroke"])],6),l.withDirectives(l.createElementVNode("input",{ref_key:"range",ref:de,type:"range",class:"vertical-range",min:.5,max:12,step:.1,"onUpdate:modelValue":v[2]||(v[2]=s=>c.value=s),style:l.normalizeStyle({accentColor:$.color})},null,4),[[l.vModelText,c.value]])],2)):l.createCommentVNode("",!0),(l.openBlock(),l.createElementBlock("svg",{ref_key:"svgElement",ref:_,xmlns:l.unref(u.XMLNS),viewBox:Z.value,class:l.normalizeClass({"vue-ui-pen-and-paper":!0,inactive:!$.active}),onMousedown:I,onMousemove:q,onMouseup:ee,onMouseleave:ee,onTouchstart:l.withModifiers(I,["prevent"]),onTouchmove:l.withModifiers(q,["prevent"]),onTouchend:ee},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(x.value,s=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:s},[s.path.replace("M","").split(" ").length===2?(l.openBlock(),l.createElementBlock("circle",{key:0,cx:s.path.replace("M","").split(" ")[0],cy:s.path.replace("M","").split(" ")[1],r:s.strokeWidth/2,fill:s.color},null,8,wt)):(l.openBlock(),l.createElementBlock("path",{key:1,class:"vue-ui-pen-and-paper-path",d:s.path,stroke:s.color,"stroke-width":s.strokeWidth,fill:"none"},null,8,St))],64))),128)),f.value?(l.openBlock(),l.createElementBlock("path",{key:0,class:"vue-ui-pen-and-paper-path vue-ui-pen-and-paper-path-drawing",d:Y(A.value),stroke:V.value,"stroke-width":c.value*1.1,fill:"none"},null,8,$t)):l.createCommentVNode("",!0)],42,Ct))],64))}},Mt=Xe._export_sfc(zt,[["__scopeId","data-v-6e690e62"]]),Pt=["id"],Tt=["onClick"],Bt={key:2,class:"vue-data-ui-watermark"},It=["innerHTML"],Et={__name:"vue-ui-xy-canvas",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:["selectLegend"],setup($,{expose:be,emit:X}){const{vue_ui_xy_canvas:xe}=u.useConfig(),x=$,D=l.ref(u.createUid()),Z=l.ref(null),V=l.ref(null),c=l.ref(null),k=l.ref(1),F=l.ref(1),U=l.ref(!1),f=l.ref(null),A=l.ref(""),_=l.ref(null),I=l.ref([]),q=l.ref(1),Y=l.ref(!0),G=l.ref(!0),oe=l.ref(null),ee=l.ref(0),re=l.ref(0),te=l.ref(!1),ce=l.ref(null),ve=l.ref(null),de=l.ref(null),h=l.ref(null),v=l.ref(0),s=l.ref(0),d=l.ref(0),g=l.ref(null),C=l.computed(()=>!!x.dataset&&x.dataset.length),S=X,E=l.useSlots();l.onMounted(()=>{E["chart-background"]&&console.warn("VueUiXyCanvas does not support the #chart-background slot.")});const t=l.computed({get:()=>j(),set:e=>e}),{userOptionsVisible:M,setUserOptionsVisibility:P,keepUserOptionState:T}=mt.useUserOptionState({config:t.value}),{svgRef:B}=bt.useChartAccessibility({config:t.value.style.chart.title});function j(){const e=He.useNestedProp({userConfig:x.config,defaultConfig:xe});let o={};return e.theme?o={...He.useNestedProp({userConfig:u.themes.vue_ui_xy_canvas[e.theme]||x.config,defaultConfig:e}),customPalette:u.themePalettes[e.theme]||u.palette}:o=e,x.config&&u.hasDeepProperty(x.config,"style.chart.scale.min")?o.style.chart.scale.min=x.config.style.chart.scale.min:o.style.chart.scale.min=null,x.config&&u.hasDeepProperty(x.config,"style.chart.scale.max")?o.style.chart.scale.max=x.config.style.chart.scale.max:o.style.chart.scale.max=null,x.config&&u.hasDeepProperty(x.config,"style.chart.zoom.startIndex")?o.style.chart.zoom.startIndex=x.config.style.chart.zoom.startIndex:o.style.chart.zoom.startIndex=null,x.config&&u.hasDeepProperty(x.config,"style.chart.zoom.endIndex")?o.style.chart.zoom.endIndex=x.config.style.chart.zoom.endIndex:o.style.chart.zoom.endIndex=null,o}l.watch(()=>x.config,e=>{t.value=j(),M.value=!t.value.userOptions.showOnChartHover,ke(),v.value+=1,s.value+=1,d.value+=1,i.value.showTable=t.value.table.show,i.value.showDataLabels=t.value.style.chart.dataLabels.show,i.value.stacked=t.value.style.chart.stacked,i.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0}),l.watch(()=>x.dataset,()=>{ke(),v.value+=1,s.value+=1,d.value+=1},{deep:!0});const Ce=l.ref(t.value.style.chart.aspectRatio),{isPrinting:we,isImaging:Se,generatePdf:$e,generateImage:ze}=Ye.usePrinter({elementId:`xy_canvas_${D.value}`,fileName:t.value.style.chart.title.text||"vue-ui-xy-canvas",options:t.value.userOptions.print}),i=l.ref({showTable:t.value.table.show,showDataLabels:t.value.style.chart.dataLabels.show,stacked:t.value.style.chart.stacked,showTooltip:t.value.style.chart.tooltip.show});function Ue(e){te.value=e,re.value+=1}const Me=l.computed(()=>u.convertCustomPalette(t.value.customPalette)),H=l.computed(()=>le.value?Math.max(...le.value.filter((e,o)=>!I.value.includes(e.absoluteIndex)).map(e=>e.series.length)):0),a=l.computed(()=>{const e=k.value-k.value*(t.value.style.chart.paddingProportions.left+t.value.style.chart.paddingProportions.right);return{canvasWidth:k.value,canvasHeight:F.value,left:k.value*t.value.style.chart.paddingProportions.left,top:F.value*t.value.style.chart.paddingProportions.top,right:k.value-k.value*t.value.style.chart.paddingProportions.right,bottom:F.value-F.value*t.value.style.chart.paddingProportions.bottom,width:e,height:F.value-F.value*(t.value.style.chart.paddingProportions.top+t.value.style.chart.paddingProportions.bottom),slot:e/(n.value.end-n.value.start)}});function Pe(e,o){return e/o}function qe({hasAutoScale:e,series:o,min:r,max:y,scale:b,yOffset:R,individualHeight:m,stackIndex:w=null}){return o.map((J,O)=>{const Q=b.min<0?Math.abs(b.min):0,K=Pe(J+Q,Q+b.max);let se,ie;e&&(se=b.min,ie=Pe(J-se,b.max-se));let W=0;return w===null?W=a.value.bottom-a.value.height*(e?ie:K):W=a.value.bottom-R-m*(e?ie:K),{x:a.value.left+a.value.slot*O+a.value.slot/2,y:W,value:J}})}const z=l.computed(()=>{const e=t.value.style.chart.scale.min!==null?t.value.style.chart.scale.min:Math.min(...le.value.filter((m,w)=>!I.value.includes(m.absoluteIndex)).flatMap(m=>m.series.slice(n.value.start,n.value.end))),o=t.value.style.chart.scale.max!==null?t.value.style.chart.scale.max:Math.max(...le.value.filter((m,w)=>!I.value.includes(m.absoluteIndex)).flatMap(m=>m.series.slice(n.value.start,n.value.end))),r=u.calculateNiceScale(e<0?e:0,o===e?e+1<0?0:e+1:o<0?0:o,t.value.style.chart.scale.ticks),y=r.min<0?Math.abs(r.min):0,b=a.value.bottom-a.value.height*(y/(r.max+y)),R=r.ticks.map(m=>({y:a.value.bottom-a.value.height*((m+y)/(r.max+y)),x:a.value.left-8,value:m}));return{absoluteMin:y,max:o,min:e,scale:r,yLabels:R,zero:b}}),We=l.computed(()=>L.value.map(e=>`
|
|
2
2
|
<div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
|
|
3
3
|
<svg viewBox="0 0 10 10" height="12" width="12">
|
|
4
4
|
<circle cx="5" cy="5" r="5" fill="${e.color}"/>
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { ref as i, computed as T, onMounted as Ge, nextTick as Ie, onBeforeUnmount as bt, watch as te, createElementBlock as X, openBlock as C, Fragment as We, createCommentVNode as le, normalizeClass as fe, createElementVNode as U, withDirectives as Ut, normalizeStyle as W, createVNode as ke, vModelText as Wt, withModifiers as dt, unref as D, renderList as Vt, useSlots as Zt, createBlock as ue, createSlots as Gt, withCtx as z, renderSlot as M, normalizeProps as ve, guardReactiveProps as de, toDisplayString as ht, createTextVNode as _t } from "vue";
|
|
2
|
-
import { l as xt, X as jt, u as qt, c as Qt, t as Jt, p as he, a as Kt, C as Ne, b as el, D as Ve, i as be, f as xe, d as ft, $ as tl, J as ll, ac as al, o as ol, e as nl, x as yt, q as rl, r as sl, y as ul, s as Me } from "./index-
|
|
2
|
+
import { l as xt, X as jt, u as qt, c as Qt, t as Jt, p as he, a as Kt, C as Ne, b as el, D as Ve, i as be, f as xe, d as ft, $ as tl, J as ll, ac as al, o as ol, e as nl, x as yt, q as rl, r as sl, y as ul, s as Me } from "./index-BdRXF4zl.js";
|
|
3
3
|
import { d as il, t as cl, u as vl, c as dl, a as gt, l as I, r as Ze, b as ee, p as pt } from "./useResponsive-Cw4oZ8sQ.js";
|
|
4
|
-
import { _ as hl } from "./Tooltip-
|
|
5
|
-
import { L as fl } from "./Legend-
|
|
6
|
-
import { _ as yl } from "./Title-
|
|
7
|
-
import { S as gl } from "./Slicer-
|
|
8
|
-
import { u as pl, U as ml } from "./usePrinter-
|
|
9
|
-
import bl from "./vue-ui-accordion-
|
|
10
|
-
import { D as xl } from "./DataTable-
|
|
11
|
-
import kl from "./vue-ui-skeleton-
|
|
12
|
-
import { u as mt } from "./useNestedProp-
|
|
4
|
+
import { _ as hl } from "./Tooltip-BSVuMX7E.js";
|
|
5
|
+
import { L as fl } from "./Legend-D_pcYpOJ.js";
|
|
6
|
+
import { _ as yl } from "./Title-eLQhK-oq.js";
|
|
7
|
+
import { S as gl } from "./Slicer-DDKRQlPl.js";
|
|
8
|
+
import { u as pl, U as ml } from "./usePrinter-C2JlskbC.js";
|
|
9
|
+
import bl from "./vue-ui-accordion-MQI7RWbr.js";
|
|
10
|
+
import { D as xl } from "./DataTable-0qV0jhOu.js";
|
|
11
|
+
import kl from "./vue-ui-skeleton-B0nPRRlJ.js";
|
|
12
|
+
import { u as mt } from "./useNestedProp-BdfpF0fL.js";
|
|
13
13
|
import { u as Ll } from "./useUserOptionState-BIvW1Kz7.js";
|
|
14
14
|
import { u as Cl } from "./useChartAccessibility-BWojgys7.js";
|
|
15
|
-
import Ye from "./BaseIcon-
|
|
16
|
-
import { C as wl } from "./ColorPicker-
|
|
15
|
+
import Ye from "./BaseIcon-By9WO4ls.js";
|
|
16
|
+
import { C as wl } from "./ColorPicker-CRLN58_A.js";
|
|
17
17
|
import { _ as kt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
18
18
|
const $l = {
|
|
19
19
|
class: /* @__PURE__ */ fe({
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Q as H, Y as q, a7 as j, c as X, A as $, F as ee, w as te, s as le, o as ae, $ as re, a8 as ie, x as se, C as ne, y as ce, a5 as oe, e as he, r as ue, f as U, a9 as de, S as ge, T as fe, q as Ie, b as me, z as Ne, d as xe, aa as be, v as Fe, ab as _e, a3 as ye, ac as Ae, i as Le, G as Ce, L as Se, u as ke, p as we, B as Oe, a as Ge, t as ve } from "./index-
|
|
2
|
-
import { D as pe } from "./DataTable-
|
|
3
|
-
import { _ as Me } from "./Title-
|
|
4
|
-
import { u as ze, _ as Te } from "./Tooltip-
|
|
5
|
-
import { U as Pe } from "./usePrinter-
|
|
6
|
-
import { _ as Ve } from "./Shape-
|
|
7
|
-
import Re from "./BaseIcon-
|
|
8
|
-
import He from "./vue-ui-table-sparkline-
|
|
9
|
-
import De from "./vue-ui-skeleton-
|
|
10
|
-
import { S as Be } from "./Slicer-
|
|
11
|
-
import Ee from "./vue-ui-accordion-
|
|
12
|
-
import { u as Z } from "./useNestedProp-
|
|
13
|
-
import { _ as Ye } from "./PackageVersion-
|
|
14
|
-
import { P as We } from "./PenAndPaper-
|
|
1
|
+
import { Q as H, Y as q, a7 as j, c as X, A as $, F as ee, w as te, s as le, o as ae, $ as re, a8 as ie, x as se, C as ne, y as ce, a5 as oe, e as he, r as ue, f as U, a9 as de, S as ge, T as fe, q as Ie, b as me, z as Ne, d as xe, aa as be, v as Fe, ab as _e, a3 as ye, ac as Ae, i as Le, G as Ce, L as Se, u as ke, p as we, B as Oe, a as Ge, t as ve } from "./index-BdRXF4zl.js";
|
|
2
|
+
import { D as pe } from "./DataTable-0qV0jhOu.js";
|
|
3
|
+
import { _ as Me } from "./Title-eLQhK-oq.js";
|
|
4
|
+
import { u as ze, _ as Te } from "./Tooltip-BSVuMX7E.js";
|
|
5
|
+
import { U as Pe } from "./usePrinter-C2JlskbC.js";
|
|
6
|
+
import { _ as Ve } from "./Shape-CcYM5MgR.js";
|
|
7
|
+
import Re from "./BaseIcon-By9WO4ls.js";
|
|
8
|
+
import He from "./vue-ui-table-sparkline-0Zpt7gvo.js";
|
|
9
|
+
import De from "./vue-ui-skeleton-B0nPRRlJ.js";
|
|
10
|
+
import { S as Be } from "./Slicer-DDKRQlPl.js";
|
|
11
|
+
import Ee from "./vue-ui-accordion-MQI7RWbr.js";
|
|
12
|
+
import { u as Z } from "./useNestedProp-BdfpF0fL.js";
|
|
13
|
+
import { _ as Ye } from "./PackageVersion-BudVgT3M.js";
|
|
14
|
+
import { P as We } from "./PenAndPaper-BYiQGyiJ.js";
|
|
15
15
|
import { resolveComponent as R, createElementBlock as i, openBlock as r, normalizeStyle as x, normalizeClass as B, createBlock as D, createCommentVNode as u, createVNode as W, createSlots as qe, withCtx as P, renderSlot as S, normalizeProps as E, guardReactiveProps as Y, createElementVNode as f, createTextVNode as J, Fragment as d, renderList as I, toDisplayString as T, mergeProps as Q, withDirectives as Xe, vModelCheckbox as Ue } from "vue";
|
|
16
16
|
import { _ as Ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
17
17
|
const Je = X(), Qe = {
|
|
@@ -1103,7 +1103,7 @@ const Je = X(), Qe = {
|
|
|
1103
1103
|
async generatePdf() {
|
|
1104
1104
|
this.showSpinnerPdf(), clearTimeout(this.__to__), this.isPrinting = !0, this.__to__ = setTimeout(async () => {
|
|
1105
1105
|
try {
|
|
1106
|
-
const { default: t } = await import("./pdf-
|
|
1106
|
+
const { default: t } = await import("./pdf-CCssh6kD.js");
|
|
1107
1107
|
await t({
|
|
1108
1108
|
domElement: document.getElementById(`vue-ui-xy_${this.uniqueId}`),
|
|
1109
1109
|
fileName: this.FINAL_CONFIG.chart.title.text || "vue-ui-xy",
|
|
@@ -1126,7 +1126,7 @@ const Je = X(), Qe = {
|
|
|
1126
1126
|
async generateImage() {
|
|
1127
1127
|
this.showSpinnerImage(), clearTimeout(this.__to__), this.isImaging = !0, this.__to__ = setTimeout(async () => {
|
|
1128
1128
|
try {
|
|
1129
|
-
const { default: t } = await import("./img-
|
|
1129
|
+
const { default: t } = await import("./img-LQGQYbAP.js");
|
|
1130
1130
|
await t({
|
|
1131
1131
|
domElement: document.getElementById(`vue-ui-xy_${this.uniqueId}`),
|
|
1132
1132
|
fileName: this.FINAL_CONFIG.chart.title.text || "vue-ui-xy",
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const v=require("./index-ChlQjGUM.cjs");async function L(e){const o=e.querySelectorAll("img"),n=[];o.forEach(t=>{t.src&&!t.src.startsWith("data:")&&n.push(new Promise(r=>{const a=new window.Image;a.crossOrigin="anonymous",a.onload=function(){try{const i=document.createElement("canvas");i.width=a.naturalWidth,i.height=a.naturalHeight,i.getContext("2d").drawImage(a,0,0),t.src=i.toDataURL()}catch{}r()},a.onerror=function(){r()},a.src=t.src}))}),await Promise.all(n)}function M(e){e.querySelectorAll("[data-dom-to-png-ignore]").forEach(n=>{n.parentNode&&n.parentNode.removeChild(n)})}function b(e,o,n){const t=window.getComputedStyle(o),r=o.getBoundingClientRect(),a=t.display.includes("flex");let i={},m=e.getAttribute("style");typeof m!="string"&&(m=""),m.split(";").forEach(s=>{if(typeof s=="string"&&s.trim()){const[d,y]=s.split(":");d&&y!==void 0&&(i[d.trim()]=y.trim())}});for(let s=0;s<t.length;s+=1){const d=t[s],y=t.getPropertyValue(d);i[d]=y}(a||t.display.includes("grid")||["inline-block","absolute","fixed"].includes(t.position))&&(r.width>0&&(i.width=r.width+"px"),r.height>0&&(i.height=r.height+"px")),a&&t.flexWrap==="nowrap"&&(i["white-space"]="nowrap"),["box-sizing","padding","margin","border"].forEach(s=>{i[s]=t.getPropertyValue(s)}),n&&(i["font-family"]=n),i.overflow="visible",i["overflow-x"]="visible",i["overflow-y"]="visible";let p="";for(const s in i)p+=`${s}:${i[s]};`;e.setAttribute("style",p);const c=e.children||[],h=o.children||[];for(let s=0;s<c.length;s++)c[s].nodeType===1&&h[s]&&b(c[s],h[s],n)}function N(e,o){e.querySelectorAll("text").forEach(t=>{t.setAttribute("font-family",o),t.style.fontFamily=o})}function T(e){const o=new TextEncoder().encode(e);let n="";return o.forEach(t=>n+=String.fromCharCode(t)),btoa(n)}function $(e,o,n){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))),i=new window.Image;return i.src=`data:image/svg+xml;base64,${a}`,new Promise((m,p)=>{i.onload=function(){const c=document.createElement("canvas");c.width=o,c.height=n,c.getContext("2d").drawImage(i,0,0,o,n),m(c.toDataURL("image/png",1))},i.onerror=c=>p(c)})}function C(e){if(e.nodeType!==1)return;const o=window.getComputedStyle(e);let n="";for(let t=0;t<o.length;t++){const r=o[t];n+=`${r}:${o.getPropertyValue(r)};`}e.setAttribute("style",n);for(let t=0;t<e.children.length;t++)C(e.children[t])}function q(){const e=[];for(const o of document.styleSheets)try{const n=o.cssRules;if(!n)continue;for(const t of n)(t.constructor.name==="CSSFontFaceRule"||t.cssText.startsWith("@font-face"))&&e.push(t.cssText)}catch{continue}return e}function F(e){const o=q();if(!o.length)return;const n=document.createElement("style");n.setAttribute("type","text/css"),n.textContent=o.join(`
|
|
2
|
-
`);const t=e.querySelector("defs")||document.createElementNS(v.XMLNS,"defs");t.appendChild(n),e.querySelector("defs")||e.insertBefore(t,e.firstChild)}async function I({container:e,scale:o=2}){if(!e)throw new Error("No container provided");await document.fonts.ready;let n=window.getComputedStyle(e).fontFamily||"Helvetica";n.toLowerCase().includes("helvetica")||(n+=", Helvetica");const t=e.cloneNode(!0),r=t.querySelectorAll("canvas"),a=e.querySelectorAll("canvas");for(let u=0;u<a.length;u+=1){const l=a[u],g=r[u];if(l&&g){const f=document.createElement("img");f.src=l.toDataURL("image/png"),f.width=l.width,f.height=l.height,f.style.width=l.style.width||l.width+"px",f.style.height=l.style.height||l.height+"px",g.replaceWith(f)}}const i=e.querySelector("svg[aria-label]");if(i){const u=i.getBoundingClientRect(),l=u.width,g=u.height;C(i),N(i,n);const f=Math.round(l*o),R=Math.round(g*o),E=await $(i,f,R),S=t.querySelector("svg[aria-label]");if(S){const w=document.createElement("img");w.src=E,w.width=l,w.height=g,w.style.width=l+"px",w.style.height=g+"px",S.parentNode.replaceChild(w,S)}}b(t,e,n),M(t),await L(t);const{width:m,height:p}=e.getBoundingClientRect(),c=Math.round(Math.max(t.scrollWidth,m)*o),h=Math.round(Math.max(t.scrollHeight,p)*1.01*o),s=document.createElementNS(v.XMLNS,"svg");s.setAttribute("viewBox",`0 0 ${c} ${h}`),s.setAttribute("width",c),s.setAttribute("height",h),s.setAttribute("style",`font-family:${n};`);const d=document.createElementNS(v.XMLNS,"foreignObject");d.setAttribute("x",0),d.setAttribute("y",0),d.setAttribute("width",c),d.setAttribute("height",h),d.setAttribute("style",`font-family:${n};`),t.style.transform=`scale(${o})`,t.style.transformOrigin="top left",t.style.width=m+"px",t.style.height=p+"px",t.style.background=window.getComputedStyle(e).backgroundColor,d.appendChild(t),F(s),s.appendChild(d);const y=new XMLSerializer().serializeToString(s),A=T(y),x=new window.Image;return x.crossOrigin="anonymous",x.src=`data:image/svg+xml;base64,${A}`,new Promise((u,l)=>{x.onload=function(){try{const g=document.createElement("canvas");g.width=c,g.height=h,g.getContext("2d").drawImage(x,0,0,c,h),u(g.toDataURL("image/png",1))}catch(g){l("Failed to draw SVG on canvas: "+g)}},x.onerror=function(){l("Failed to load SVG image for conversion")}})}exports.domToPng=I;
|