vue-data-ui 2.9.5 → 2.9.7-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -6
- package/dist/{Arrow-DxFFCBPM.cjs → Arrow-BU7SuiI0.cjs} +1 -1
- package/dist/{Arrow-CJMMd0OS.js → Arrow-IRx8mAUZ.js} +1 -1
- package/dist/{BaseIcon-DU8qgy6L.cjs → BaseIcon-CN6BxTf_.cjs} +1 -1
- package/dist/{BaseIcon-hA0_6Cl-.js → BaseIcon-NVebWEmm.js} +5 -3
- package/dist/{ColorPicker-C2hq5iIZ.js → ColorPicker-D6INbuzz.js} +3 -3
- package/dist/{ColorPicker-t6z7vah6.cjs → ColorPicker-DzF9vdB7.cjs} +1 -1
- package/dist/{DataTable-BPnqR1qF.cjs → DataTable-Bc-sIk3H.cjs} +1 -1
- package/dist/{DataTable-BbXCe5s5.js → DataTable-LLs37Na_.js} +2 -2
- package/dist/{Legend-BQHuBdpT.cjs → Legend-DbGQCXU-.cjs} +1 -1
- package/dist/{Legend-D9ki4JJ3.js → Legend-Vkc-EKNB.js} +2 -2
- package/dist/{PackageVersion-mZLomJm-.cjs → PackageVersion-nHr3qHGs.cjs} +1 -1
- package/dist/{PackageVersion-Bq98eXon.js → PackageVersion-smHUcsQE.js} +1 -1
- package/dist/{PenAndPaper-CvkDs-Gh.cjs → PenAndPaper-30BhAniw.cjs} +1 -1
- package/dist/{PenAndPaper-CUUyQzLR.js → PenAndPaper-k0VaawVj.js} +3 -3
- package/dist/{Shape-D6lPonNm.js → Shape-Bfm8x-8P.js} +1 -1
- package/dist/{Shape-BeAQjfne.cjs → Shape-PzPPg5iH.cjs} +1 -1
- package/dist/{Slicer-C97ZQ2j3.cjs → Slicer-BU0fj2AI.cjs} +1 -1
- package/dist/{Slicer-5j6e3Y_A.js → Slicer-DhTMXF53.js} +2 -2
- package/dist/{Title-Cjpkoa1d.cjs → Title-58EtyYdb.cjs} +1 -1
- package/dist/{Title-CwPVIBWP.js → Title-IOaA-ppU.js} +1 -1
- package/dist/{Tooltip-T-m_CEIA.js → Tooltip-D8cBDDkn.js} +1 -1
- package/dist/{Tooltip-DPgFOV_5.cjs → Tooltip-e9KUqiQA.cjs} +1 -1
- package/dist/documentation/installation.md +2 -1
- package/dist/{dom-to-png-CYjAAVu3.cjs → dom-to-png-CorDkTqE.cjs} +1 -1
- package/dist/{dom-to-png-CGtn1Am2.js → dom-to-png-DWnOZNsr.js} +1 -1
- package/dist/{img-Duw2r72a.cjs → img-D3Du_oTb.cjs} +1 -1
- package/dist/{img-s3DffGWH.js → img-DTb9GqRw.js} +1 -1
- package/dist/index-BqL3-yPQ.cjs +9 -0
- package/dist/{index-BDGf85YF.js → index-DwNTTJ28.js} +1034 -872
- package/dist/{pdf-CRgxb46R.cjs → pdf-BcORych6.cjs} +1 -1
- package/dist/{pdf-BnBP0Jg-.js → pdf-EYBy6RJJ.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +139 -7
- package/dist/types/vue-data-ui.d.ts +139 -7
- package/dist/{useNestedProp-D24_JklN.cjs → useNestedProp-BVy9-3EJ.cjs} +1 -1
- package/dist/{useNestedProp-BsN3TOQ0.js → useNestedProp-DLKXTEny.js} +1 -1
- package/dist/{usePrinter-CKjQQldf.js → usePrinter-CDE1F-XN.js} +3 -3
- package/dist/{usePrinter-Bs-Uo-8x.cjs → usePrinter-vjB2nrFW.cjs} +1 -1
- package/dist/{vue-data-ui-IWpvfdMh.js → vue-data-ui-Dxn5phSx.js} +64 -62
- package/dist/vue-data-ui-NKaL_RZ1.cjs +9 -0
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +37 -36
- package/dist/{vue-ui-3d-bar-slYknMyR.cjs → vue-ui-3d-bar-C6p9aV9v.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-DVNn8pu-.js → vue-ui-3d-bar-CHHe_J_D.js} +9 -9
- package/dist/{vue-ui-accordion-CYKk4uk8.js → vue-ui-accordion-BqCwiS7D.js} +3 -3
- package/dist/{vue-ui-accordion-BMK6-xDm.cjs → vue-ui-accordion-CELgYjnV.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-1zM8QRQl.js → vue-ui-age-pyramid-CeahoaHi.js} +10 -10
- package/dist/{vue-ui-age-pyramid-BCQsnc8c.cjs → vue-ui-age-pyramid-S8hYFKDI.cjs} +1 -1
- package/dist/{vue-ui-annotator-5O4hWWvi.cjs → vue-ui-annotator-BoOPk1NW.cjs} +1 -1
- package/dist/{vue-ui-annotator-_U6PEy_s.js → vue-ui-annotator-Dt280Dbw.js} +2 -2
- package/dist/{vue-ui-bullet-BAaTrfRK.cjs → vue-ui-bullet-C_ouoJoz.cjs} +1 -1
- package/dist/{vue-ui-bullet-DuI83w0_.js → vue-ui-bullet-DoyResGB.js} +8 -8
- package/dist/{vue-ui-candlestick-CoxKe0hi.cjs → vue-ui-candlestick-BSrwISIN.cjs} +1 -1
- package/dist/{vue-ui-candlestick-Caume8Cr.js → vue-ui-candlestick-Ckb5JZAY.js} +11 -11
- package/dist/{vue-ui-carousel-table-C3oLoBhV.cjs → vue-ui-carousel-table-BnfnugZ8.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-Dpj6uzaw.js → vue-ui-carousel-table-pyTSfa3R.js} +4 -4
- package/dist/{vue-ui-chestnut-CRiCk9LN.cjs → vue-ui-chestnut-D2DRAw3Z.cjs} +1 -1
- package/dist/{vue-ui-chestnut-DC57Y0fm.js → vue-ui-chestnut-DEmzGhAV.js} +8 -8
- package/dist/{vue-ui-circle-pack-Dtaz0QCf.cjs → vue-ui-circle-pack-D58AOk8y.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-Bx8ATqeJ.js → vue-ui-circle-pack-W44HsVVY.js} +9 -9
- package/dist/{vue-ui-cursor-Dae_RvTj.cjs → vue-ui-cursor-D1ZEe_2B.cjs} +1 -1
- package/dist/{vue-ui-cursor-D2_6cGWO.js → vue-ui-cursor-Dnkh_phA.js} +2 -2
- package/dist/{vue-ui-dashboard-Cia2p6jc.cjs → vue-ui-dashboard-BbcppsFn.cjs} +1 -1
- package/dist/{vue-ui-dashboard-CqEaxTGo.js → vue-ui-dashboard-mDnIJx3M.js} +62 -62
- package/dist/{vue-ui-digits-TcCd1Ayj.cjs → vue-ui-digits-C_za0nmt.cjs} +1 -1
- package/dist/{vue-ui-digits-BBh4FaLt.js → vue-ui-digits-Dr3tklAr.js} +2 -2
- package/dist/{vue-ui-donut-DlvFHlJB.js → vue-ui-donut-CRBp5BFP.js} +12 -12
- package/dist/{vue-ui-donut-CXI85ZJW.cjs → vue-ui-donut-CxCNCSyO.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-BXEmubwy.cjs → vue-ui-donut-evolution-D4s8zLwf.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-Ba4GIJg3.js → vue-ui-donut-evolution-abrnOe55.js} +11 -11
- package/dist/{vue-ui-dumbbell-C1y6x8kv.cjs → vue-ui-dumbbell-BDinWM7R.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-2xYiPFix.js → vue-ui-dumbbell-Bj_SUn-j.js} +10 -10
- package/dist/{vue-ui-flow-BBFoxXRy.js → vue-ui-flow-CtAP5n05.js} +9 -9
- package/dist/{vue-ui-flow-Cn0WD8c1.cjs → vue-ui-flow-DCQVOrgy.cjs} +1 -1
- package/dist/{vue-ui-funnel-BW0E2--M.cjs → vue-ui-funnel-0TWVP6z9.cjs} +1 -1
- package/dist/{vue-ui-funnel-DzcoJC-S.js → vue-ui-funnel-DymsYFW0.js} +9 -9
- package/dist/{vue-ui-galaxy-D88zMUzb.js → vue-ui-galaxy-Dn-E22Sq.js} +11 -11
- package/dist/{vue-ui-galaxy-C7S_aK4E.cjs → vue-ui-galaxy-DoJcvc2z.cjs} +1 -1
- package/dist/{vue-ui-gauge-BNMnbzT6.cjs → vue-ui-gauge-BPOh-LHr.cjs} +1 -1
- package/dist/{vue-ui-gauge-DU5uLDka.js → vue-ui-gauge-DqbsP-05.js} +7 -7
- package/dist/{vue-ui-gizmo-Cgqr5OQC.js → vue-ui-gizmo-BohTVUAE.js} +3 -3
- package/dist/{vue-ui-gizmo-CdjyPQN0.cjs → vue-ui-gizmo-CW9LAAdu.cjs} +1 -1
- package/dist/{vue-ui-heatmap-DhJtkLrS.js → vue-ui-heatmap-1FWBcMxC.js} +10 -10
- package/dist/{vue-ui-heatmap-B26GMl3N.cjs → vue-ui-heatmap-CYCOMJEp.cjs} +1 -1
- package/dist/{vue-ui-history-plot-VwHC74EA.cjs → vue-ui-history-plot-BUIqHRPg.cjs} +1 -1
- package/dist/{vue-ui-history-plot-DBegFcxp.js → vue-ui-history-plot-CSIf1_96.js} +11 -11
- package/dist/{vue-ui-kpi-CfzNgybX.js → vue-ui-kpi-BrhY5fFX.js} +3 -3
- package/dist/{vue-ui-kpi-C1i0iWrh.cjs → vue-ui-kpi-Cf6eEcYm.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-Djlgqhvu.cjs → vue-ui-mini-loader-CURulq-0.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DvYHhqWT.js → vue-ui-mini-loader-CgkVj3jx.js} +2 -2
- package/dist/{vue-ui-molecule-Cr6KJ5eZ.js → vue-ui-molecule-Bd-W2FcU.js} +11 -11
- package/dist/{vue-ui-molecule-C4Z2E7uD.cjs → vue-ui-molecule-DBlY5wdo.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-DHTNv7wD.js → vue-ui-mood-radar-Bzl98p3C.js} +11 -11
- package/dist/{vue-ui-mood-radar-DhLF09v7.cjs → vue-ui-mood-radar-D9yvKEMp.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-vMeonmHR.cjs → vue-ui-nested-donuts-BZ5JA8Q0.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-Dm0rc5ct.js → vue-ui-nested-donuts-DyTI4ydr.js} +11 -11
- package/dist/{vue-ui-onion-boKXIe-r.cjs → vue-ui-onion-DLm1PYJW.cjs} +1 -1
- package/dist/{vue-ui-onion-CssSqL8q.js → vue-ui-onion-ueQgXseI.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-DxKTqBB8.cjs → vue-ui-parallel-coordinate-plot-C2IpU_Zn.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-DBzBW-Vn.js → vue-ui-parallel-coordinate-plot-CE7Apuxp.js} +12 -12
- package/dist/{vue-ui-quadrant-CSuEenz4.js → vue-ui-quadrant-CjLaANbC.js} +12 -12
- package/dist/{vue-ui-quadrant-BkaXchAn.cjs → vue-ui-quadrant-R1yAxzva.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-DJpBpFM4.cjs → vue-ui-quick-chart-BdqHueUa.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-BLTVHmn2.js → vue-ui-quick-chart-CVDLl6ro.js} +9 -9
- package/dist/{vue-ui-radar-CrxciP8t.cjs → vue-ui-radar-B6u_29cN.cjs} +1 -1
- package/dist/{vue-ui-radar-BKM9hhMO.js → vue-ui-radar-CoJY69Qe.js} +12 -12
- package/dist/{vue-ui-rating-BWMgiGmm.cjs → vue-ui-rating-inneqZuS.cjs} +1 -1
- package/dist/{vue-ui-rating-7uT1-yDP.js → vue-ui-rating-tqvCl4qR.js} +2 -2
- package/dist/{vue-ui-relation-circle-Bk2mNJDz.js → vue-ui-relation-circle-B_2RZE3S.js} +7 -7
- package/dist/{vue-ui-relation-circle-BFvsOsjM.cjs → vue-ui-relation-circle-D_eh1BEp.cjs} +1 -1
- package/dist/vue-ui-ridgeline-BN4YoLPn.cjs +1 -0
- package/dist/vue-ui-ridgeline-BZqkRymO.js +1040 -0
- package/dist/{vue-ui-rings-azmWz0Sn.js → vue-ui-rings-5cvD-A8P.js} +12 -12
- package/dist/{vue-ui-rings-FzLeValL.cjs → vue-ui-rings-CDBPSu7C.cjs} +1 -1
- package/dist/{vue-ui-scatter-CgHGWxEM.js → vue-ui-scatter-D6gIKljC.js} +12 -12
- package/dist/{vue-ui-scatter-D_3855LX.cjs → vue-ui-scatter-DSd4R2Yi.cjs} +1 -1
- package/dist/{vue-ui-skeleton-hrplR5wa.js → vue-ui-skeleton-kS_CJIiv.js} +411 -332
- package/dist/vue-ui-skeleton-ovmMp5bh.cjs +41 -0
- package/dist/{vue-ui-smiley-B02R516m.cjs → vue-ui-smiley-DJnJpvqE.cjs} +1 -1
- package/dist/{vue-ui-smiley-B6DAFeS1.js → vue-ui-smiley-DzoxVoms.js} +2 -2
- package/dist/{vue-ui-spark-trend-CVU8ZId2.cjs → vue-ui-spark-trend-CFS3QbYY.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-Cvw68YCa.js → vue-ui-spark-trend-oIWCpuK4.js} +5 -5
- package/dist/{vue-ui-sparkbar-BVAmpd2c.cjs → vue-ui-sparkbar-CcF0AVSW.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CLtobIKI.js → vue-ui-sparkbar-zp12sOeT.js} +4 -4
- package/dist/{vue-ui-sparkgauge-DV7_YpFv.js → vue-ui-sparkgauge-Ch5sucF4.js} +4 -4
- package/dist/{vue-ui-sparkgauge-PfjN8EtA.cjs → vue-ui-sparkgauge-DTflH_xZ.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-BgGs2Ge0.js → vue-ui-sparkhistogram-BkTOZLzM.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-B3bXOOfB.cjs → vue-ui-sparkhistogram-DZt0HNIE.cjs} +1 -1
- package/dist/{vue-ui-sparkline-BpRBXQMZ.cjs → vue-ui-sparkline-CBSJXHQs.cjs} +1 -1
- package/dist/{vue-ui-sparkline-CgtP1kxm.js → vue-ui-sparkline-C_xiHNZV.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-DNjIcyBK.js → vue-ui-sparkstackbar-C_OFfnx-.js} +5 -5
- package/dist/{vue-ui-sparkstackbar--pn0EIYM.cjs → vue-ui-sparkstackbar-CflXoafD.cjs} +1 -1
- package/dist/{vue-ui-stackbar-CqQ5RMAB.cjs → vue-ui-stackbar-Bxk0RKI0.cjs} +1 -1
- package/dist/{vue-ui-stackbar-CjRAckRq.js → vue-ui-stackbar-qXKMKlND.js} +13 -13
- package/dist/{vue-ui-strip-plot-CW_RftRT.js → vue-ui-strip-plot-C0JI5Ypz.js} +11 -11
- package/dist/{vue-ui-strip-plot-DxfM92am.cjs → vue-ui-strip-plot-CXQN3ICY.cjs} +1 -1
- package/dist/{vue-ui-table-z1l0Vin6.cjs → vue-ui-table-Cl3Li8f9.cjs} +1 -1
- package/dist/{vue-ui-table-D9K1kDv5.js → vue-ui-table-DyFNHVoi.js} +3 -3
- package/dist/{vue-ui-table-heatmap-B_iJQCJL.js → vue-ui-table-heatmap-BcCULm0Y.js} +4 -4
- package/dist/{vue-ui-table-heatmap-D2Ikfd7A.cjs → vue-ui-table-heatmap-DGLCYPo5.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-Bu-b38cW.js → vue-ui-table-sparkline-B-dNVmMr.js} +5 -5
- package/dist/{vue-ui-table-sparkline-CYWYfG5M.cjs → vue-ui-table-sparkline-BgkRYmur.cjs} +1 -1
- package/dist/{vue-ui-thermometer-CgYedLZ5.cjs → vue-ui-thermometer-BCH7KJhP.cjs} +1 -1
- package/dist/{vue-ui-thermometer--XuyMCZI.js → vue-ui-thermometer-Cuw5r53c.js} +7 -7
- package/dist/{vue-ui-timer-BiTGijvm.cjs → vue-ui-timer-CyopDf_K.cjs} +1 -1
- package/dist/{vue-ui-timer-GrhFEUcz.js → vue-ui-timer-DdGJsPoJ.js} +5 -5
- package/dist/{vue-ui-tiremarks-CHd1kBCw.js → vue-ui-tiremarks-BPxnwI8b.js} +7 -7
- package/dist/{vue-ui-tiremarks-LAdsMqyP.cjs → vue-ui-tiremarks-C8AqJweQ.cjs} +1 -1
- package/dist/{vue-ui-treemap-4BGOXoCD.cjs → vue-ui-treemap-BFu-MBkV.cjs} +1 -1
- package/dist/{vue-ui-treemap-CIGl0OBe.js → vue-ui-treemap-CeuVNdos.js} +12 -12
- package/dist/{vue-ui-vertical-bar-Btv32rCQ.js → vue-ui-vertical-bar-Ba6oWXzE.js} +12 -12
- package/dist/{vue-ui-vertical-bar-Bc3d2SCI.cjs → vue-ui-vertical-bar-CqE10O2F.cjs} +1 -1
- package/dist/{vue-ui-waffle-BfgS6Gkw.cjs → vue-ui-waffle-Dj664Zvg.cjs} +1 -1
- package/dist/{vue-ui-waffle-qZHJoGgD.js → vue-ui-waffle-lMRTNFla.js} +12 -12
- package/dist/{vue-ui-wheel-CkqHG4gC.cjs → vue-ui-wheel-BWMzvmcA.cjs} +1 -1
- package/dist/{vue-ui-wheel-CFf56O9Y.js → vue-ui-wheel-aaqRzfsy.js} +7 -7
- package/dist/{vue-ui-word-cloud-Cgtt4v0g.js → vue-ui-word-cloud-D2UL2Oye.js} +10 -10
- package/dist/{vue-ui-word-cloud-DU1a_f2O.cjs → vue-ui-word-cloud-Z7WvU8XI.cjs} +1 -1
- package/dist/{vue-ui-world-2gnEByN3.js → vue-ui-world-B61PIrw8.js} +101 -96
- package/dist/{vue-ui-world-w-oAd8TZ.cjs → vue-ui-world-JoZxd7Uu.cjs} +3 -3
- package/dist/{vue-ui-xy-Dy4M6VtE.cjs → vue-ui-xy-Bil87p79.cjs} +2 -2
- package/dist/{vue-ui-xy-DhTZvuRq.js → vue-ui-xy-F8eArZNJ.js} +16 -16
- package/dist/{vue-ui-xy-canvas-B4jIg9Zl.js → vue-ui-xy-canvas-BlQyx-BL.js} +12 -12
- package/dist/{vue-ui-xy-canvas-CTwc8DS0.cjs → vue-ui-xy-canvas-Qb5pkWBq.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-BS7ybKs5.cjs +0 -9
- package/dist/vue-data-ui-BMJWddQg.cjs +0 -9
- package/dist/vue-ui-skeleton-BznhCw4p.cjs +0 -41
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),h=require("./index-BS7ybKs5.cjs"),pe=require("./Title-Cjpkoa1d.cjs"),ne=require("./usePrinter-Bs-Uo-8x.cjs"),ee=require("./useResponsive-DQmBAoBf.cjs"),me=require("./vue-ui-accordion-BMK6-xDm.cjs"),ge=require("./DataTable-BPnqR1qF.cjs"),re=require("./useNestedProp-D24_JklN.cjs"),ye=require("./PackageVersion-mZLomJm-.cjs"),be=require("./Tooltip-DPgFOV_5.cjs"),we=require("./PenAndPaper-CvkDs-Gh.cjs"),ke=require("./useUserOptionState-BgepsfED.cjs"),Ce=require("./useChartAccessibility-Cm7nkzTG.cjs"),xe=require("./usePanZoom-PXRi2Rwx.cjs"),$e=require("./BaseIcon-DU8qgy6L.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function se({word:b,fontSize:p,pad:f,canvas:i,ctx:c,svg:n}){c.save(),c.font=`${n.style&&n.style.bold?"bold ":""}${p}px Arial`;const a=c.measureText(b.name),r=Math.ceil(a.width)+2+(f?f*2:0),u=Math.ceil(p)+2+(f?f*2:0);i.width=r,i.height=u,c.clearRect(0,0,r,u),c.font=`${n.style&&n.style.bold?"bold ":""}${p}px Arial`,c.textAlign="center",c.textBaseline="middle",c.fillStyle="black",c.fillText(b.name,r/2,u/2);const S=c.getImageData(0,0,r,u).data,C=[];for(let T=0;T<u;T+=1)for(let t=0;t<r;t+=1)S[(T*r+t)*4+3]>1&&C.push([t,T]);return c.restore(),{w:r,h:u,wordMask:C}}function ue({mask:b,maskW:p,maskH:f,wx:i,wy:c,wordMask:n}){for(let a=0;a<n.length;a+=1){const r=i+n[a][0],u=c+n[a][1];if(r<0||u<0||r>=p||u>=f||b[u*p+r])return!1}return!0}function ie({mask:b,maskW:p,maskH:f,wx:i,wy:c,wordMask:n}){for(let a=0;a<n.length;a+=1){const r=i+n[a][0],u=c+n[a][1];r>=0&&u>=0&&r<p&&u<f&&(b[u*p+r]=1)}}function Te({wordMask:b,w:p,h:f,dilation:i}){const c=new Set(b.map(([a,r])=>`${a},${r}`)),n=new Set(c);for(let[a,r]of b)for(let u=-i;u<=i;u+=1)for(let $=-i;$<=i;$+=1){if(u===0&&$===0)continue;const S=a+u,C=r+$;S>=0&&S<p&&C>=0&&C<f&&n.add(`${S},${C}`)}return Array.from(n).map(a=>a.split(",").map(Number))}function Pe({words:b,proximity:p=0,svg:f}){const{width:i,height:c}=f,n=Math.round(i),a=Math.round(c),r=1,u=f.minFontSize,$=f.maxFontSize,S=b.map(m=>m.value),C=Math.min(...S),T=Math.max(...S),t=new Uint8Array(n*a),O=document.createElement("canvas"),E=O.getContext("2d",{willReadFrequently:!0});O.width=n,O.height=a;const R=6,H=2,L=2,q=1,W=Math.floor(n/2),d=Math.floor(a/2),Y=[...b].sort((m,P)=>P.value-m.value),U=[];for(const m of Y){let P=u;T!==C&&(P=(m.value-C)/(T-C)*($-u)+u),P=Math.max(u,Math.min($,P));let A=!1,N=P;for(;!A&&N>=r;){let{w:z,h:B,wordMask:v}=se({word:m,fontSize:N,pad:p,canvas:O,ctx:E,svg:f});v=Te({wordMask:v,w:z,h:B,dilation:2});let F=0,M=0;for(;F<Math.max(n,a)&&!A&&M<1e4;){for(let x=0;x<360;x+=R){M+=1;const g=Math.round(W+F*Math.cos(x*Math.PI/180)-z/2),w=Math.round(d+F*Math.sin(x*Math.PI/180)-B/2);if(!(g<0||w<0||g+z>n||w+B>a)&&ue({mask:t,maskW:n,maskH:a,wx:g,wy:w,wordMask:v})){U.push({...m,x:g-n/2,y:w-a/2,fontSize:N,width:z,height:B,angle:0}),ie({mask:t,maskW:n,maskH:a,wx:g,wy:w,wordMask:v}),A=!0;break}}F+=H}A||(N-=1)}if(!A&&N<r){N=r;const{w:z,h:B,wordMask:v}=se({word:m,fontSize:N,pad:p,canvas:O,ctx:E,svg:f});let F=0,M=0;for(;F<Math.max(n,a)&&!A&&M<25e3;){for(let x=0;x<360;x+=L){M+=1;const g=Math.round(W+F*Math.cos(x*Math.PI/180)-z/2),w=Math.round(d+F*Math.sin(x*Math.PI/180)-B/2);if(!(g<0||w<0||g+z>n||w+B>a)&&ue({mask:t,maskW:n,maskH:a,wx:g,wy:w,wordMask:v})){U.push({...m,x:g-n/2,y:w-a/2,fontSize:N,width:z,height:B,angle:0}),ie({mask:t,maskW:n,maskH:a,wx:g,wy:w,wordMask:v}),A=!0;break}}F+=q}}}return U.sort((m,P)=>P.fontSize-m.fontSize)}const Ne=["id"],ze=["xmlns","viewBox"],Be=["width","height"],Fe=["transform"],Me=["fill","font-weight","x","y","font-size","transform","onMouseover"],Oe={key:4,class:"vue-data-ui-watermark"},Ae={key:5,"data-dom-to-png-ignore":"",class:"reset-wrapper"},Ve=["innerHTML"],Ie={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(b,{expose:p}){e.useCssVars(o=>({"1461b4f2":o.slicerColor}));const{vue_ui_word_cloud:f}=h.useConfig(),i=b,c=e.computed({get(){return!!i.dataset&&i.dataset.length},set(o){return o}}),n=e.ref(h.createUid()),a=e.ref(0),r=e.ref(null),u=e.ref(null),$=e.ref(null),S=e.ref(0),C=e.ref(0),T=e.ref(!1),t=e.computed({get:()=>W(),set:o=>o}),O=e.ref(E());function E(){return typeof i.dataset=="string"?h.createWordCloudDatasetFromPlainText(i.dataset):i.dataset.map((o,s)=>({...o,value:h.checkNaN(o.value)}))}e.watch(()=>i.dataset,()=>{O.value=E(),x()});const{userOptionsVisible:R,setUserOptionsVisibility:H,keepUserOptionState:L}=ke.useUserOptionState({config:t.value}),{svgRef:q}=Ce.useChartAccessibility({config:t.value.style.chart.title});function W(){const o=re.useNestedProp({userConfig:i.config,defaultConfig:f});return o.theme?{...re.useNestedProp({userConfig:h.themes.vue_ui_word_cloud[o.theme]||i.config,defaultConfig:o}),customPalette:h.themePalettes[o.theme]||h.palette}:o}e.watch(()=>i.config,o=>{t.value=W(),R.value=!t.value.userOptions.showOnChartHover,P(),S.value+=1,C.value+=1,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const d=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize,bold:t.value.style.chart.words.bold}),Y=ee.debounce(()=>{x()},10),U=ee.throttle(()=>{const{width:o,height:s}=ee.useResponsive({chart:r.value,title:t.value.style.chart.title.text?u.value:null,source:$.value});requestAnimationFrame(()=>{d.value.width=o,d.value.height=s,e.nextTick(Y)})}),m=e.ref(null);e.onMounted(P);function P(){h.objectIsEmpty(i.dataset)?h.error({componentName:"VueUiWordCloud",type:"dataset"}):O.value.forEach((o,s)=>{h.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{c.value=!1,h.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:s})})}),t.value.responsive&&(m.value=new ResizeObserver(U),m.value.observe(r.value.parentNode))}e.onBeforeUnmount(()=>{m.value&&m.value.disconnect()});const{isPrinting:A,isImaging:N,generatePdf:z,generateImage:B}=ne.usePrinter({elementId:`wordCloud_${n.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud",options:t.value.userOptions.print}),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show});function F(o,s,l="Arial"){const y=document.createElement("canvas").getContext("2d");return y.font=`${s}px ${t.value.style.chart.words.bold?"bold":"normal"} ${l}`,{width:y.measureText(o).width+t.value.style.chart.words.proximity,height:s}}const M=e.ref([]);e.watch(()=>i.dataset,x,{immediate:!0});function x(){const o=[...O.value].map(y=>y.value),s=Math.max(...o),l=Math.min(...o),k=[...O.value].map((y,V)=>{let I=(y.value-l)/(s-l)*(d.value.maxFontSize-d.value.minFontSize)+d.value.minFontSize;I=isNaN(I)?d.value.minFontSize:I;const ae=F(y.name,I);return{...y,id:h.createUid(),fontSize:I,width:ae.width,height:ae.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[V]||t.value.customPalette[V%t.value.customPalette.length]||h.palette[V]||h.palette[V%h.palette.length]:t.value.style.chart.words.color}});M.value=Pe({words:k,svg:d.value,proximity:t.value.style.chart.words.proximity})}const g=e.computed(()=>{const o=M.value.map(l=>({name:l.name,color:l.color})),s=M.value.map(l=>l.value);return{head:o,body:s}});function w(){e.nextTick(()=>{const o=g.value.head.map((k,y)=>[[k.name],[g.value.body[y]]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=h.createCsvContent(s);h.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const j=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],s=g.value.head.map((y,V)=>{const I=h.dataLabel({p:t.value.table.td.prefix,v:g.value.body[V],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:y.color,name:y.name},I]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:s,config:l}}),X=e.ref(!1);function ce(o){X.value=o,a.value+=1}function de(){return M.value}function te(){v.value.showTable=!v.value.showTable}function oe(){v.value.showTooltip=!v.value.showTooltip}const D=e.ref(!1);function J(){D.value=!D.value}const ve=e.computed(()=>!D.value&&t.value.style.chart.zoom.show),{viewBox:Z,resetZoom:le,isZoom:he}=xe.usePanZoom(q,{x:0,y:0,width:d.value.width<=0?10:d.value.width,height:d.value.height<=0?10:d.value.height},1,ve);p({getData:de,generateCsv:w,generatePdf:z,generateImage:B,toggleTable:te,toggleTooltip:oe,toggleAnnotator:J});const _=e.ref(null),G=e.ref(!1),K=e.ref(""),Q=e.ref(null);function fe(o){if(!v.value.showTooltip)return;_.value=o.id,Q.value={datapoint:o,config:t.value};const s=t.value.style.chart.tooltip.customFormat;if(G.value=!1,h.isFunction(s))try{const l=s({datapoint:o,config:t.value});typeof l=="string"&&(K.value=l,G.value=!0)}catch{console.warn("Custom format cannot be applied."),G.value=!1}if(!G.value){let l=`<svg viewBox="0 0 10 10" height="${t.value.style.chart.tooltip.fontSize}"><circle cx="5" cy="5" r="5" fill="${o.color}"/></svg><span>${o.name}:</span><b>${(o.value||0).toFixed(t.value.style.chart.tooltip.roundingValue)}</b>`;K.value=`<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${l}</div>`}T.value=!0}return(o,s)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:r,id:`wordCloud_${n.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:s[3]||(s[3]=()=>e.unref(H)(!0)),onMouseleave:s[4]||(s[4]=()=>e.unref(H)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(we._sfc_main,{key:0,svgRef:e.unref(q),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:D.value,onClose:J},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:u,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(pe._sfc_main,{key:`title_${S.value}`,config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&c.value&&(e.unref(L)||e.unref(R))?(e.openBlock(),e.createBlock(ne.UserOptions,{ref:"details",key:`user_option_${a.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(A),isImaging:e.unref(N),uid:n.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:X.value,titles:{...t.value.userOptions.buttonTitles},chartElement:r.value,position:t.value.userOptions.position,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:v.value.showTooltip,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:D.value,onToggleFullscreen:ce,onGeneratePdf:e.unref(z),onGenerateCsv:w,onGenerateImage:e.unref(B),onToggleTable:te,onToggleTooltip:oe,onToggleAnnotator:J,style:e.normalizeStyle({visibility:e.unref(L)?e.unref(R)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:k})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:k})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:k})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:k})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:k})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:k})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasTooltip","isTooltip","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:3,ref_key:"svgRef",ref:q,class:e.normalizeClass({"vue-data-ui-fullscreen--on":X.value,"vue-data-ui-fulscreen--off":!X.value}),xmlns:e.unref(h.XMLNS),viewBox:`${e.unref(Z).x} ${e.unref(Z).y} ${e.unref(Z).width} ${e.unref(Z).height}`,style:"overflow:hidden;background:transparent;"},[e.createVNode(ye._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:d.value.width<=0?10:d.value.width,height:d.value.height<=0?10:d.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Be)):e.createCommentVNode("",!0),e.createElementVNode("g",{transform:`translate(${(d.value.width<=0?10:d.value.width)/2}, ${(d.value.height<=0?10:d.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(l,k)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(),e.createElementBlock("text",{fill:l.color,"font-weight":t.value.style.chart.words.bold?"bold":"normal",key:k,x:l.x,y:l.y,"font-size":l.fontSize,transform:`translate(${l.width/2}, ${l.height/2})`,class:e.normalizeClass({animated:t.value.useCssAnimation,"word-selected":_.value&&_.value===l.id&&v.value.showTooltip,"word-not-selected":_.value&&_.value!==l.id&&v.value.showTooltip}),"text-anchor":"middle","dominant-baseline":"central",onMouseover:y=>fe(l),onMouseleave:s[0]||(s[0]=y=>{_.value=null,T.value=!1}),style:e.normalizeStyle(`animation-delay:${k*t.value.animationDelayMs}ms !important;`)},e.toDisplayString(l.name),47,Me))]))),256))],8,Fe),e.renderSlot(o.$slots,"svg",{svg:{height:d.value.height,width:d.value.width}},void 0,!0)],10,ze)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Oe,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(A)||e.unref(N)})),void 0,!0)])):e.createCommentVNode("",!0),e.unref(he)?(e.openBlock(),e.createElementBlock("div",Ae,[e.renderSlot(o.$slots,"reset-action",{reset:e.unref(le)},()=>[e.createElementVNode("button",{"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",style:e.normalizeStyle({background:t.value.style.chart.backgroundColor}),onClick:s[1]||(s[1]=l=>e.unref(le)(!0))},[e.createVNode($e.default,{name:"refresh",stroke:t.value.style.chart.color},null,8,["stroke"])],4)],!0)])):e.createCommentVNode("",!0),e.createVNode(be._sfc_main,{show:v.value.showTooltip&&T.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:r.value,content:K.value,isCustom:G.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Q.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Q.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:$,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createBlock(me.default,{key:7,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(ge.DataTable,{key:`table_${C.value}`,colNames:j.value.colNames,head:j.value.head,body:j.value.body,config:j.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[2]||(s[2]=l=>v.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Ve)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],44,Ne))}},_e=Se._export_sfc(Ie,[["__scopeId","data-v-d3519257"]]);exports.default=_e;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),h=require("./index-BqL3-yPQ.cjs"),pe=require("./Title-58EtyYdb.cjs"),ne=require("./usePrinter-vjB2nrFW.cjs"),ee=require("./useResponsive-DQmBAoBf.cjs"),me=require("./vue-ui-accordion-CELgYjnV.cjs"),ge=require("./DataTable-Bc-sIk3H.cjs"),re=require("./useNestedProp-BVy9-3EJ.cjs"),ye=require("./PackageVersion-nHr3qHGs.cjs"),be=require("./Tooltip-e9KUqiQA.cjs"),we=require("./PenAndPaper-30BhAniw.cjs"),ke=require("./useUserOptionState-BgepsfED.cjs"),Ce=require("./useChartAccessibility-Cm7nkzTG.cjs"),xe=require("./usePanZoom-PXRi2Rwx.cjs"),$e=require("./BaseIcon-CN6BxTf_.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function se({word:b,fontSize:p,pad:f,canvas:i,ctx:c,svg:n}){c.save(),c.font=`${n.style&&n.style.bold?"bold ":""}${p}px Arial`;const a=c.measureText(b.name),r=Math.ceil(a.width)+2+(f?f*2:0),u=Math.ceil(p)+2+(f?f*2:0);i.width=r,i.height=u,c.clearRect(0,0,r,u),c.font=`${n.style&&n.style.bold?"bold ":""}${p}px Arial`,c.textAlign="center",c.textBaseline="middle",c.fillStyle="black",c.fillText(b.name,r/2,u/2);const S=c.getImageData(0,0,r,u).data,C=[];for(let T=0;T<u;T+=1)for(let t=0;t<r;t+=1)S[(T*r+t)*4+3]>1&&C.push([t,T]);return c.restore(),{w:r,h:u,wordMask:C}}function ue({mask:b,maskW:p,maskH:f,wx:i,wy:c,wordMask:n}){for(let a=0;a<n.length;a+=1){const r=i+n[a][0],u=c+n[a][1];if(r<0||u<0||r>=p||u>=f||b[u*p+r])return!1}return!0}function ie({mask:b,maskW:p,maskH:f,wx:i,wy:c,wordMask:n}){for(let a=0;a<n.length;a+=1){const r=i+n[a][0],u=c+n[a][1];r>=0&&u>=0&&r<p&&u<f&&(b[u*p+r]=1)}}function Te({wordMask:b,w:p,h:f,dilation:i}){const c=new Set(b.map(([a,r])=>`${a},${r}`)),n=new Set(c);for(let[a,r]of b)for(let u=-i;u<=i;u+=1)for(let $=-i;$<=i;$+=1){if(u===0&&$===0)continue;const S=a+u,C=r+$;S>=0&&S<p&&C>=0&&C<f&&n.add(`${S},${C}`)}return Array.from(n).map(a=>a.split(",").map(Number))}function Pe({words:b,proximity:p=0,svg:f}){const{width:i,height:c}=f,n=Math.round(i),a=Math.round(c),r=1,u=f.minFontSize,$=f.maxFontSize,S=b.map(m=>m.value),C=Math.min(...S),T=Math.max(...S),t=new Uint8Array(n*a),O=document.createElement("canvas"),E=O.getContext("2d",{willReadFrequently:!0});O.width=n,O.height=a;const R=6,H=2,L=2,q=1,W=Math.floor(n/2),d=Math.floor(a/2),Y=[...b].sort((m,P)=>P.value-m.value),U=[];for(const m of Y){let P=u;T!==C&&(P=(m.value-C)/(T-C)*($-u)+u),P=Math.max(u,Math.min($,P));let A=!1,N=P;for(;!A&&N>=r;){let{w:z,h:B,wordMask:v}=se({word:m,fontSize:N,pad:p,canvas:O,ctx:E,svg:f});v=Te({wordMask:v,w:z,h:B,dilation:2});let F=0,M=0;for(;F<Math.max(n,a)&&!A&&M<1e4;){for(let x=0;x<360;x+=R){M+=1;const g=Math.round(W+F*Math.cos(x*Math.PI/180)-z/2),w=Math.round(d+F*Math.sin(x*Math.PI/180)-B/2);if(!(g<0||w<0||g+z>n||w+B>a)&&ue({mask:t,maskW:n,maskH:a,wx:g,wy:w,wordMask:v})){U.push({...m,x:g-n/2,y:w-a/2,fontSize:N,width:z,height:B,angle:0}),ie({mask:t,maskW:n,maskH:a,wx:g,wy:w,wordMask:v}),A=!0;break}}F+=H}A||(N-=1)}if(!A&&N<r){N=r;const{w:z,h:B,wordMask:v}=se({word:m,fontSize:N,pad:p,canvas:O,ctx:E,svg:f});let F=0,M=0;for(;F<Math.max(n,a)&&!A&&M<25e3;){for(let x=0;x<360;x+=L){M+=1;const g=Math.round(W+F*Math.cos(x*Math.PI/180)-z/2),w=Math.round(d+F*Math.sin(x*Math.PI/180)-B/2);if(!(g<0||w<0||g+z>n||w+B>a)&&ue({mask:t,maskW:n,maskH:a,wx:g,wy:w,wordMask:v})){U.push({...m,x:g-n/2,y:w-a/2,fontSize:N,width:z,height:B,angle:0}),ie({mask:t,maskW:n,maskH:a,wx:g,wy:w,wordMask:v}),A=!0;break}}F+=q}}}return U.sort((m,P)=>P.fontSize-m.fontSize)}const Ne=["id"],ze=["xmlns","viewBox"],Be=["width","height"],Fe=["transform"],Me=["fill","font-weight","x","y","font-size","transform","onMouseover"],Oe={key:4,class:"vue-data-ui-watermark"},Ae={key:5,"data-dom-to-png-ignore":"",class:"reset-wrapper"},Ve=["innerHTML"],Ie={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(b,{expose:p}){e.useCssVars(o=>({"1461b4f2":o.slicerColor}));const{vue_ui_word_cloud:f}=h.useConfig(),i=b,c=e.computed({get(){return!!i.dataset&&i.dataset.length},set(o){return o}}),n=e.ref(h.createUid()),a=e.ref(0),r=e.ref(null),u=e.ref(null),$=e.ref(null),S=e.ref(0),C=e.ref(0),T=e.ref(!1),t=e.computed({get:()=>W(),set:o=>o}),O=e.ref(E());function E(){return typeof i.dataset=="string"?h.createWordCloudDatasetFromPlainText(i.dataset):i.dataset.map((o,s)=>({...o,value:h.checkNaN(o.value)}))}e.watch(()=>i.dataset,()=>{O.value=E(),x()});const{userOptionsVisible:R,setUserOptionsVisibility:H,keepUserOptionState:L}=ke.useUserOptionState({config:t.value}),{svgRef:q}=Ce.useChartAccessibility({config:t.value.style.chart.title});function W(){const o=re.useNestedProp({userConfig:i.config,defaultConfig:f});return o.theme?{...re.useNestedProp({userConfig:h.themes.vue_ui_word_cloud[o.theme]||i.config,defaultConfig:o}),customPalette:h.themePalettes[o.theme]||h.palette}:o}e.watch(()=>i.config,o=>{t.value=W(),R.value=!t.value.userOptions.showOnChartHover,P(),S.value+=1,C.value+=1,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const d=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize,bold:t.value.style.chart.words.bold}),Y=ee.debounce(()=>{x()},10),U=ee.throttle(()=>{const{width:o,height:s}=ee.useResponsive({chart:r.value,title:t.value.style.chart.title.text?u.value:null,source:$.value});requestAnimationFrame(()=>{d.value.width=o,d.value.height=s,e.nextTick(Y)})}),m=e.ref(null);e.onMounted(P);function P(){h.objectIsEmpty(i.dataset)?h.error({componentName:"VueUiWordCloud",type:"dataset"}):O.value.forEach((o,s)=>{h.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{c.value=!1,h.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:s})})}),t.value.responsive&&(m.value=new ResizeObserver(U),m.value.observe(r.value.parentNode))}e.onBeforeUnmount(()=>{m.value&&m.value.disconnect()});const{isPrinting:A,isImaging:N,generatePdf:z,generateImage:B}=ne.usePrinter({elementId:`wordCloud_${n.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud",options:t.value.userOptions.print}),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show});function F(o,s,l="Arial"){const y=document.createElement("canvas").getContext("2d");return y.font=`${s}px ${t.value.style.chart.words.bold?"bold":"normal"} ${l}`,{width:y.measureText(o).width+t.value.style.chart.words.proximity,height:s}}const M=e.ref([]);e.watch(()=>i.dataset,x,{immediate:!0});function x(){const o=[...O.value].map(y=>y.value),s=Math.max(...o),l=Math.min(...o),k=[...O.value].map((y,V)=>{let I=(y.value-l)/(s-l)*(d.value.maxFontSize-d.value.minFontSize)+d.value.minFontSize;I=isNaN(I)?d.value.minFontSize:I;const ae=F(y.name,I);return{...y,id:h.createUid(),fontSize:I,width:ae.width,height:ae.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[V]||t.value.customPalette[V%t.value.customPalette.length]||h.palette[V]||h.palette[V%h.palette.length]:t.value.style.chart.words.color}});M.value=Pe({words:k,svg:d.value,proximity:t.value.style.chart.words.proximity})}const g=e.computed(()=>{const o=M.value.map(l=>({name:l.name,color:l.color})),s=M.value.map(l=>l.value);return{head:o,body:s}});function w(){e.nextTick(()=>{const o=g.value.head.map((k,y)=>[[k.name],[g.value.body[y]]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=h.createCsvContent(s);h.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const j=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],s=g.value.head.map((y,V)=>{const I=h.dataLabel({p:t.value.table.td.prefix,v:g.value.body[V],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:y.color,name:y.name},I]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:s,config:l}}),X=e.ref(!1);function ce(o){X.value=o,a.value+=1}function de(){return M.value}function te(){v.value.showTable=!v.value.showTable}function oe(){v.value.showTooltip=!v.value.showTooltip}const D=e.ref(!1);function J(){D.value=!D.value}const ve=e.computed(()=>!D.value&&t.value.style.chart.zoom.show),{viewBox:Z,resetZoom:le,isZoom:he}=xe.usePanZoom(q,{x:0,y:0,width:d.value.width<=0?10:d.value.width,height:d.value.height<=0?10:d.value.height},1,ve);p({getData:de,generateCsv:w,generatePdf:z,generateImage:B,toggleTable:te,toggleTooltip:oe,toggleAnnotator:J});const _=e.ref(null),G=e.ref(!1),K=e.ref(""),Q=e.ref(null);function fe(o){if(!v.value.showTooltip)return;_.value=o.id,Q.value={datapoint:o,config:t.value};const s=t.value.style.chart.tooltip.customFormat;if(G.value=!1,h.isFunction(s))try{const l=s({datapoint:o,config:t.value});typeof l=="string"&&(K.value=l,G.value=!0)}catch{console.warn("Custom format cannot be applied."),G.value=!1}if(!G.value){let l=`<svg viewBox="0 0 10 10" height="${t.value.style.chart.tooltip.fontSize}"><circle cx="5" cy="5" r="5" fill="${o.color}"/></svg><span>${o.name}:</span><b>${(o.value||0).toFixed(t.value.style.chart.tooltip.roundingValue)}</b>`;K.value=`<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${l}</div>`}T.value=!0}return(o,s)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:r,id:`wordCloud_${n.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:s[3]||(s[3]=()=>e.unref(H)(!0)),onMouseleave:s[4]||(s[4]=()=>e.unref(H)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(we._sfc_main,{key:0,svgRef:e.unref(q),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:D.value,onClose:J},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:u,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(pe._sfc_main,{key:`title_${S.value}`,config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&c.value&&(e.unref(L)||e.unref(R))?(e.openBlock(),e.createBlock(ne.UserOptions,{ref:"details",key:`user_option_${a.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(A),isImaging:e.unref(N),uid:n.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:X.value,titles:{...t.value.userOptions.buttonTitles},chartElement:r.value,position:t.value.userOptions.position,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:v.value.showTooltip,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:D.value,onToggleFullscreen:ce,onGeneratePdf:e.unref(z),onGenerateCsv:w,onGenerateImage:e.unref(B),onToggleTable:te,onToggleTooltip:oe,onToggleAnnotator:J,style:e.normalizeStyle({visibility:e.unref(L)?e.unref(R)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:k})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:k})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:k})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:k})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:k})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:k})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasTooltip","isTooltip","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:3,ref_key:"svgRef",ref:q,class:e.normalizeClass({"vue-data-ui-fullscreen--on":X.value,"vue-data-ui-fulscreen--off":!X.value}),xmlns:e.unref(h.XMLNS),viewBox:`${e.unref(Z).x} ${e.unref(Z).y} ${e.unref(Z).width} ${e.unref(Z).height}`,style:"overflow:hidden;background:transparent;"},[e.createVNode(ye._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:d.value.width<=0?10:d.value.width,height:d.value.height<=0?10:d.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Be)):e.createCommentVNode("",!0),e.createElementVNode("g",{transform:`translate(${(d.value.width<=0?10:d.value.width)/2}, ${(d.value.height<=0?10:d.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(l,k)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(),e.createElementBlock("text",{fill:l.color,"font-weight":t.value.style.chart.words.bold?"bold":"normal",key:k,x:l.x,y:l.y,"font-size":l.fontSize,transform:`translate(${l.width/2}, ${l.height/2})`,class:e.normalizeClass({animated:t.value.useCssAnimation,"word-selected":_.value&&_.value===l.id&&v.value.showTooltip,"word-not-selected":_.value&&_.value!==l.id&&v.value.showTooltip}),"text-anchor":"middle","dominant-baseline":"central",onMouseover:y=>fe(l),onMouseleave:s[0]||(s[0]=y=>{_.value=null,T.value=!1}),style:e.normalizeStyle(`animation-delay:${k*t.value.animationDelayMs}ms !important;`)},e.toDisplayString(l.name),47,Me))]))),256))],8,Fe),e.renderSlot(o.$slots,"svg",{svg:{height:d.value.height,width:d.value.width}},void 0,!0)],10,ze)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Oe,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(A)||e.unref(N)})),void 0,!0)])):e.createCommentVNode("",!0),e.unref(he)?(e.openBlock(),e.createElementBlock("div",Ae,[e.renderSlot(o.$slots,"reset-action",{reset:e.unref(le)},()=>[e.createElementVNode("button",{"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",style:e.normalizeStyle({background:t.value.style.chart.backgroundColor}),onClick:s[1]||(s[1]=l=>e.unref(le)(!0))},[e.createVNode($e.default,{name:"refresh",stroke:t.value.style.chart.color},null,8,["stroke"])],4)],!0)])):e.createCommentVNode("",!0),e.createVNode(be._sfc_main,{show:v.value.showTooltip&&T.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:r.value,content:K.value,isCustom:G.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Q.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Q.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:$,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createBlock(me.default,{key:7,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(ge.DataTable,{key:`table_${C.value}`,colNames:j.value.colNames,head:j.value.head,body:j.value.body,config:j.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[2]||(s[2]=l=>v.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Ve)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],44,Ne))}},_e=Se._export_sfc(Ie,[["__scopeId","data-v-d3519257"]]);exports.default=_e;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { computed as N, ref as v, watch as Ja, createElementBlock as R, openBlock as k, unref as S, normalizeStyle as pa, normalizeClass as Qa, createBlock as sa, createCommentVNode as L, renderSlot as B, createVNode as
|
|
2
|
-
import { u as P0, c as qa, b as U0,
|
|
3
|
-
import { u as F0 } from "./useNestedProp-
|
|
1
|
+
import { computed as N, ref as v, watch as Ja, createElementBlock as R, openBlock as k, unref as S, normalizeStyle as pa, normalizeClass as Qa, createBlock as sa, createCommentVNode as L, renderSlot as B, createVNode as wa, createSlots as Xa, withCtx as G, normalizeProps as ma, guardReactiveProps as oa, withModifiers as G0, Fragment as ra, createElementVNode as T, renderList as $a, mergeProps as C0, createTextVNode as Sa, toDisplayString as ba, nextTick as I0 } from "vue";
|
|
2
|
+
import { u as P0, c as qa, b as U0, d as ga, p as da, X as O0, l as D0, h as a0, i as _0, f as l0, C as ya, N as K0, q as z0, r as j0, x as H0 } from "./index-DwNTTJ28.js";
|
|
3
|
+
import { u as F0 } from "./useNestedProp-DLKXTEny.js";
|
|
4
4
|
import { u as Z0 } from "./useUserOptionState-BIvW1Kz7.js";
|
|
5
5
|
import { u as x0 } from "./useChartAccessibility-BWojgys7.js";
|
|
6
|
-
import { _ as W0 } from "./PenAndPaper-
|
|
7
|
-
import { _ as Y0 } from "./Title-
|
|
8
|
-
import { u as V0, U as J0 } from "./usePrinter-
|
|
9
|
-
import { _ as Q0 } from "./PackageVersion-
|
|
10
|
-
import { _ as X0 } from "./Tooltip-
|
|
11
|
-
import $0 from "./vue-ui-accordion-
|
|
12
|
-
import { D as q0 } from "./DataTable-
|
|
13
|
-
import { L as a3 } from "./Legend-
|
|
14
|
-
import { _ as _3 } from "./Shape-
|
|
6
|
+
import { _ as W0 } from "./PenAndPaper-k0VaawVj.js";
|
|
7
|
+
import { _ as Y0 } from "./Title-IOaA-ppU.js";
|
|
8
|
+
import { u as V0, U as J0 } from "./usePrinter-CDE1F-XN.js";
|
|
9
|
+
import { _ as Q0 } from "./PackageVersion-smHUcsQE.js";
|
|
10
|
+
import { _ as X0 } from "./Tooltip-D8cBDDkn.js";
|
|
11
|
+
import $0 from "./vue-ui-accordion-BqCwiS7D.js";
|
|
12
|
+
import { D as q0 } from "./DataTable-LLs37Na_.js";
|
|
13
|
+
import { L as a3 } from "./Legend-Vkc-EKNB.js";
|
|
14
|
+
import { _ as _3 } from "./Shape-Bfm8x-8P.js";
|
|
15
15
|
import { _ as l3 } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
16
|
const n3 = {
|
|
17
17
|
type: "FeatureCollection",
|
|
@@ -197,14 +197,14 @@ const n3 = {
|
|
|
197
197
|
}, e3 = {
|
|
198
198
|
mercator([c, o], i, u, s) {
|
|
199
199
|
o = Math.max(Math.min(o, 85.05113), -85.05113);
|
|
200
|
-
const [e, p] = s,
|
|
200
|
+
const [e, p] = s, d = (c - e) * Math.PI / 180, b = i / (2 * Math.PI) * (d + Math.PI), f = (w) => Math.log(Math.tan(Math.PI / 4 + w * Math.PI / 180 / 2)), A = f(85.05113), h = f(-72), y = (f(o) - A) / (h - A) * u;
|
|
201
201
|
return [b, y];
|
|
202
202
|
},
|
|
203
203
|
equirectangular([c, o], i, u, s) {
|
|
204
204
|
const [t, e] = s;
|
|
205
205
|
o = Math.max(Math.min(o, 90), -80);
|
|
206
|
-
const p = (c - t + 180) / 360 * i,
|
|
207
|
-
return [p,
|
|
206
|
+
const p = (c - t + 180) / 360 * i, d = (90 - (o - e)) / 170 * u;
|
|
207
|
+
return [p, d];
|
|
208
208
|
},
|
|
209
209
|
robinson([c, o], i, u, s) {
|
|
210
210
|
const m = [
|
|
@@ -229,7 +229,7 @@ const n3 = {
|
|
|
229
229
|
[0.5322, 1]
|
|
230
230
|
], [g, t] = s;
|
|
231
231
|
c = c - g, o = Math.max(-89.9999, Math.min(89.9999, o));
|
|
232
|
-
const e = Math.abs(o), p = Math.floor(e / 5),
|
|
232
|
+
const e = Math.abs(o), p = Math.floor(e / 5), d = e % 5 / 5, [b, f] = m[p], [A, h] = m[Math.min(p + 1, m.length - 1)], E = b + (A - b) * d, y = f + (h - f) * d, w = c * Math.PI / 180, C = i / 2 + i / 2 * E * w / Math.PI, D = u / 2 - Math.sign(o) * (u / 2) * y / 1;
|
|
233
233
|
return !Number.isFinite(C) || !Number.isFinite(D) ? [-9999, -9999] : [C, D];
|
|
234
234
|
},
|
|
235
235
|
mollweide([c, o], i, u, s) {
|
|
@@ -237,9 +237,9 @@ const n3 = {
|
|
|
237
237
|
const [m] = s, g = (c - m) * Math.PI / 180, t = o * Math.PI / 180;
|
|
238
238
|
let e = t;
|
|
239
239
|
const p = 1e-10;
|
|
240
|
-
let
|
|
241
|
-
for (; Math.abs(
|
|
242
|
-
|
|
240
|
+
let d = 1, b = 0;
|
|
241
|
+
for (; Math.abs(d) > p && b < 10; )
|
|
242
|
+
d = -(2 * e + Math.sin(2 * e) - Math.PI * Math.sin(t)) / (2 + 2 * Math.cos(2 * e)), e += d, b++;
|
|
243
243
|
isFinite(e) || (e = t > 0 ? Math.PI / 2 : -Math.PI / 2);
|
|
244
244
|
const f = i / (2 * Math.SQRT2), h = (f * (2 * Math.SQRT2 / Math.PI) * g * Math.cos(e) + 2 * f) / (4.6 * f) * i, E = -f * Math.SQRT2 * Math.sin(e), y = -f * Math.SQRT2, w = f * Math.SQRT2, C = (E - y) / (w - y) * u;
|
|
245
245
|
return [
|
|
@@ -248,7 +248,7 @@ const n3 = {
|
|
|
248
248
|
];
|
|
249
249
|
},
|
|
250
250
|
winkelTripel([c, o], i, u, s) {
|
|
251
|
-
const [m, g] = s, t = (c - m) * Math.PI / 180, e = o * Math.PI / 180, p = t * Math.cos(Math.PI / 6),
|
|
251
|
+
const [m, g] = s, t = (c - m) * Math.PI / 180, e = o * Math.PI / 180, p = t * Math.cos(Math.PI / 6), d = e, b = Math.acos(Math.cos(e) * Math.cos(t / 2)), f = 2 * Math.cos(e) * Math.sin(t / 2) / (Math.sin(b) / b || 1), A = Math.sin(e) / (Math.sin(b) / b || 1), h = i / 2 + i / (2 * Math.PI) * (p + f) / 2, E = u / 2 - u / (2 * Math.PI) * (d + A) / 2;
|
|
252
252
|
return [h, E];
|
|
253
253
|
},
|
|
254
254
|
aitoff([c, o], i, u, s) {
|
|
@@ -256,20 +256,20 @@ const n3 = {
|
|
|
256
256
|
return f === 0 ? 1 : Math.sin(Math.PI * f) / (Math.PI * f);
|
|
257
257
|
});
|
|
258
258
|
const [m, g] = s, t = (c - m) * Math.PI / 180, e = o * Math.PI / 180, p = Math.acos(Math.cos(e) * Math.cos(t / 2));
|
|
259
|
-
let
|
|
260
|
-
return p !== 0 && (
|
|
259
|
+
let d = 0, b = 0;
|
|
260
|
+
return p !== 0 && (d = 2 * Math.cos(e) * Math.sin(t / 2) / Math.sinc(p / Math.PI), b = Math.sin(e) / Math.sinc(p / Math.PI)), d = i / 2 + d * (i / (2 * 2)), b = u / 2 - b * (u / (2 * 1)), [d, b];
|
|
261
261
|
},
|
|
262
262
|
hammer([c, o], i, u, s) {
|
|
263
|
-
const [m, g] = s, t = (c - m) * Math.PI / 180, e = o * Math.PI / 180, p = Math.sqrt(1 + Math.cos(e) * Math.cos(t / 2)),
|
|
264
|
-
return [
|
|
263
|
+
const [m, g] = s, t = (c - m) * Math.PI / 180, e = o * Math.PI / 180, p = Math.sqrt(1 + Math.cos(e) * Math.cos(t / 2)), d = i / 2 + i / 2 * (2 * Math.SQRT2 * Math.cos(e) * Math.sin(t / 2) / p) / 2.8284271247461903, b = u / 2 - u / 2 * (Math.SQRT2 * Math.sin(e) / p) / 1.4142135623730951;
|
|
264
|
+
return [d, b];
|
|
265
265
|
},
|
|
266
266
|
bonne([c, o], i, u, s = [0, 0]) {
|
|
267
|
-
const m = 45 * Math.PI / 180, [g, t] = s, e = (c - g) * Math.PI / 180,
|
|
267
|
+
const m = 45 * Math.PI / 180, [g, t] = s, e = (c - g) * Math.PI / 180, d = Math.max(Math.min(o, 89.9), -89.9) * Math.PI / 180, b = 1 / Math.tan(m), f = b + m - d, A = f === 0 ? 0 : e * Math.cos(d) / f, h = Math.min(i, u) / 2.6, E = i / 2 + h * f * Math.sin(A), y = u / 2 - h * (b - f * Math.cos(A));
|
|
268
268
|
return [E, y];
|
|
269
269
|
},
|
|
270
270
|
sinusoidal([c, o], i, u, s) {
|
|
271
|
-
const [m, g] = s, t = (c - m) * Math.PI / 180, e = o * Math.PI / 180, p = i / 2 + i / (2 * Math.PI) * t * Math.cos(e),
|
|
272
|
-
return [p,
|
|
271
|
+
const [m, g] = s, t = (c - m) * Math.PI / 180, e = o * Math.PI / 180, p = i / 2 + i / (2 * Math.PI) * t * Math.cos(e), d = u / 2 - u / Math.PI * e;
|
|
272
|
+
return [p, d];
|
|
273
273
|
},
|
|
274
274
|
gallPeters([c, o], i, u, s) {
|
|
275
275
|
const [m, g] = s;
|
|
@@ -279,10 +279,10 @@ const n3 = {
|
|
|
279
279
|
},
|
|
280
280
|
vanDerGrinten([c, o], i, u, s = [0, 0]) {
|
|
281
281
|
const m = Math.PI, g = Math.PI / 2, t = 1e-6;
|
|
282
|
-
let e = (c - (s[0] || 0)) * m / 180, p = (o - (s[1] || 0)) * m / 180,
|
|
282
|
+
let e = (c - (s[0] || 0)) * m / 180, p = (o - (s[1] || 0)) * m / 180, d = Math.abs(e), b = Math.abs(p), f, A;
|
|
283
283
|
if (b < t)
|
|
284
284
|
f = e, A = 0;
|
|
285
|
-
else if (
|
|
285
|
+
else if (d < t || Math.abs(b - g) < t)
|
|
286
286
|
f = 0, A = Math.sign(p) * m * Math.tan(Math.asin(b / g) / 2);
|
|
287
287
|
else {
|
|
288
288
|
let w = b / g, C = Math.asin(w), D = Math.cos(C), j = 0.5 * Math.abs(m / e - e / m), K = j * j, J = D / (w + D - 1), ia = J * (2 / w - 1), q = ia * ia, _ = q + K, Q = J - q, aa = K + J;
|
|
@@ -292,13 +292,13 @@ const n3 = {
|
|
|
292
292
|
return [E + f * h, y - A * h];
|
|
293
293
|
},
|
|
294
294
|
globe([c, o], i, u, s) {
|
|
295
|
-
const [m, g] = s, t = (c - m) * Math.PI / 180, e = o * Math.PI / 180, p = g * Math.PI / 180,
|
|
295
|
+
const [m, g] = s, t = (c - m) * Math.PI / 180, e = o * Math.PI / 180, p = g * Math.PI / 180, d = Math.min(i, u) / 2 * 0.95, b = i / 2, f = u / 2, A = d * Math.cos(e) * Math.sin(t) + b, h = -d * (Math.cos(p) * Math.sin(e) - Math.sin(p) * Math.cos(e) * Math.cos(t)) + f;
|
|
296
296
|
return Math.sin(p) * Math.sin(e) + Math.cos(p) * Math.cos(e) * Math.cos(t) < 0 ? [NaN, NaN] : [A, h];
|
|
297
297
|
},
|
|
298
298
|
azimuthalEquidistant([c, o], i, u, s = [0, 0]) {
|
|
299
|
-
const m = (D) => D * Math.PI / 180, [g, t] = s, e = m(c - g), p = m(o),
|
|
299
|
+
const m = (D) => D * Math.PI / 180, [g, t] = s, e = m(c - g), p = m(o), d = m(t), b = Math.sin(d) * Math.sin(p) + Math.cos(d) * Math.cos(p) * Math.cos(e), f = Math.acos(Math.max(-1, Math.min(1, b)));
|
|
300
300
|
let A = f === 0 ? 1 : f / Math.sin(f);
|
|
301
|
-
const h = A * Math.cos(p) * Math.sin(e), E = A * (Math.cos(
|
|
301
|
+
const h = A * Math.cos(p) * Math.sin(e), E = A * (Math.cos(d) * Math.sin(p) - Math.sin(d) * Math.cos(p) * Math.cos(e)), y = Math.min(i, u) / 2 / Math.PI, w = i / 2, C = u / 2;
|
|
302
302
|
return [
|
|
303
303
|
w + h * y,
|
|
304
304
|
C - E * y
|
|
@@ -308,7 +308,7 @@ const n3 = {
|
|
|
308
308
|
function s3(c, o, i, u, s = [0, 0]) {
|
|
309
309
|
let m = 1 / 0, g = 1 / 0, t = -1 / 0, e = -1 / 0;
|
|
310
310
|
for (const p of o) {
|
|
311
|
-
const
|
|
311
|
+
const d = p.geometry, b = d.type === "Polygon" ? [d.coordinates] : d.type === "MultiPolygon" ? d.coordinates : [];
|
|
312
312
|
for (const f of b)
|
|
313
313
|
for (const A of f)
|
|
314
314
|
for (const [h, E] of A) {
|
|
@@ -372,7 +372,7 @@ const i3 = {
|
|
|
372
372
|
set(a) {
|
|
373
373
|
return a;
|
|
374
374
|
}
|
|
375
|
-
}), t = N(() => g ? Object.values(s.dataset).some((a) => Object.hasOwn(a, "category")) : !1), e = v(null), p = v(null),
|
|
375
|
+
}), t = N(() => g ? Object.values(s.dataset).some((a) => Object.hasOwn(a, "category")) : !1), e = v(null), p = v(null), d = v(null), b = v(null), f = v(null), A = v(0), h = v(0), E = v(0), y = v(qa()), w = v(!1), C = v(""), D = v(0);
|
|
376
376
|
let j = n3;
|
|
377
377
|
const { projections: K, getProjectedBounds: J, setupTerritories: ia } = i3;
|
|
378
378
|
function q() {
|
|
@@ -380,12 +380,12 @@ const i3 = {
|
|
|
380
380
|
userConfig: s.config,
|
|
381
381
|
defaultConfig: u
|
|
382
382
|
});
|
|
383
|
-
return s.config &&
|
|
383
|
+
return s.config && ya(s.config, "style.chart.territory.colors.min") ? a.style.chart.territory.colors.min = ga(s.config.style.chart.territory.colors.min) : a.style.chart.territory.colors.min = a.style.chart.territory.emptyColor, s.config && ya(s.config, "style.chart.territory.colors.max") ? a.style.chart.territory.colors.max = ga(s.config.style.chart.territory.colors.max) : a.style.chart.territory.colors.max = da[0], s.config && ya(s.config, "style.chart.dimensions.width") ? a.style.chart.dimensions.width = s.config.style.chart.dimensions.width : a.style.chart.dimensions.width = null, s.config && ya(s.config, "style.chart.dimensions.height") ? a.style.chart.dimensions.height = s.config.style.chart.dimensions.height : a.style.chart.dimensions.height = null, j = ia(a, j), a;
|
|
384
384
|
}
|
|
385
385
|
const _ = N({
|
|
386
386
|
get: () => q(),
|
|
387
387
|
set: (a) => a
|
|
388
|
-
}), { userOptionsVisible: Q, setUserOptionsVisibility: aa, keepUserOptionState: Ra } = Z0({ config: _.value }), { svgRef:
|
|
388
|
+
}), { userOptionsVisible: Q, setUserOptionsVisibility: aa, keepUserOptionState: Ra } = Z0({ config: _.value }), { svgRef: Aa } = x0({ config: _.value.style.chart.title }), P = v({
|
|
389
389
|
showTable: _.value.table.show,
|
|
390
390
|
showTooltip: _.value.style.chart.tooltip.show
|
|
391
391
|
});
|
|
@@ -410,13 +410,13 @@ const i3 = {
|
|
|
410
410
|
winkelTripel: { width: n || 1e3, height: a || 1e3 }
|
|
411
411
|
}[F.value];
|
|
412
412
|
}), U = N(() => {
|
|
413
|
-
const { minX: a, minY: n, width: l, height:
|
|
413
|
+
const { minX: a, minY: n, width: l, height: r } = J(K[F.value], j.features, Z.value.width, Z.value.height);
|
|
414
414
|
return {
|
|
415
|
-
str: `${a} ${n} ${l} ${
|
|
415
|
+
str: `${a} ${n} ${l} ${r}`,
|
|
416
416
|
minX: a,
|
|
417
417
|
minY: n,
|
|
418
418
|
width: l,
|
|
419
|
-
height:
|
|
419
|
+
height: r
|
|
420
420
|
};
|
|
421
421
|
}), Ea = N(() => Object.values(s.dataset).map((a) => a.value)), n0 = N(() => Math.min(...Ea.value)), e0 = N(() => Math.max(...Ea.value));
|
|
422
422
|
function s0(a) {
|
|
@@ -433,17 +433,22 @@ const i3 = {
|
|
|
433
433
|
}
|
|
434
434
|
function Ma(a) {
|
|
435
435
|
const n = (l) => l.map(
|
|
436
|
-
(
|
|
437
|
-
const z =
|
|
436
|
+
(r) => {
|
|
437
|
+
const z = r.map(([X, $]) => m0([X, $])).filter(([X, $]) => Number.isFinite(X) && Number.isFinite($));
|
|
438
438
|
return z.length < 3 ? "" : "M" + z.map(([X, $]) => `${X},${$}`).join("L") + "Z";
|
|
439
439
|
}
|
|
440
440
|
).filter(Boolean).join(" ");
|
|
441
441
|
return a.type === "Polygon" ? n(a.coordinates) : a.type === "MultiPolygon" ? a.coordinates.map(n).join(" ") : "";
|
|
442
442
|
}
|
|
443
|
-
const La = N(() =>
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
443
|
+
const La = N(() => {
|
|
444
|
+
const a = Object.values(s.dataset).filter((l) => !!l.category), n = {};
|
|
445
|
+
return a.forEach((l) => {
|
|
446
|
+
n[l.category] || (n[l.category] = l);
|
|
447
|
+
}), Object.values(n).map((l, r) => ({
|
|
448
|
+
name: l.category,
|
|
449
|
+
color: l.color ? ga(l.color) : Na.value[r] || da[r] || da[r % da.length]
|
|
450
|
+
}));
|
|
451
|
+
});
|
|
447
452
|
function o0(a) {
|
|
448
453
|
const n = La.value.find((l) => l.name === a);
|
|
449
454
|
return n ? n.color : "#000000";
|
|
@@ -459,7 +464,7 @@ const i3 = {
|
|
|
459
464
|
geo: a,
|
|
460
465
|
code: n,
|
|
461
466
|
geometry: a.geometry,
|
|
462
|
-
color: l && l.color ?
|
|
467
|
+
color: l && l.color ? ga(l.color) : l && l.category ? o0(l.category) : s0(l ? l.value : null),
|
|
463
468
|
value: l ? l.value : null,
|
|
464
469
|
category: l && l.category || null,
|
|
465
470
|
isActive: !!l,
|
|
@@ -471,7 +476,7 @@ const i3 = {
|
|
|
471
476
|
la.value = a, D.value += 1;
|
|
472
477
|
}
|
|
473
478
|
const na = v(!1);
|
|
474
|
-
function
|
|
479
|
+
function ka() {
|
|
475
480
|
na.value = !na.value;
|
|
476
481
|
}
|
|
477
482
|
function Ba() {
|
|
@@ -484,12 +489,12 @@ const i3 = {
|
|
|
484
489
|
elementId: `world_${y.value}`,
|
|
485
490
|
fileName: _.value.style.chart.title.text || "vue-ui-world",
|
|
486
491
|
options: _.value.userOptions.print
|
|
487
|
-
}), ua = v(!1),
|
|
492
|
+
}), ua = v(!1), ha = v(null), x = v(null);
|
|
488
493
|
function r0(a) {
|
|
489
494
|
return a ? a.type === "Polygon" ? a.coordinates : a.type === "MultiPolygon" ? a.coordinates.reduce(
|
|
490
495
|
(n, l) => {
|
|
491
|
-
var
|
|
492
|
-
return l[0].length > (((
|
|
496
|
+
var r;
|
|
497
|
+
return l[0].length > (((r = n[0]) == null ? void 0 : r.length) || 0) ? l : n;
|
|
493
498
|
},
|
|
494
499
|
[]
|
|
495
500
|
) : [] : [];
|
|
@@ -500,8 +505,8 @@ const i3 = {
|
|
|
500
505
|
if (!a) return "";
|
|
501
506
|
const n = r0(a);
|
|
502
507
|
if (!n.length) return "";
|
|
503
|
-
const l = n.flat(),
|
|
504
|
-
(I) => I.map(([O,
|
|
508
|
+
const l = n.flat(), r = l.reduce((I, [O]) => I + O, 0) / l.length, M = l.reduce((I, [, O]) => I + O, 0) / l.length, z = [r, M], X = K[F.value] || K.globe, $ = Z.value.width, k0 = Z.value.height, za = n.map(
|
|
509
|
+
(I) => I.map(([O, va]) => X([O, va], $, k0, z))
|
|
505
510
|
), ja = za.flat(), Ha = ja.map(([I, O]) => I), Fa = ja.map(([I, O]) => O), Za = Math.min(...Ha), h0 = Math.max(...Ha), xa = Math.min(...Fa), v0 = Math.max(...Fa), V = 80, fa = 8, w0 = V - 2 * fa, S0 = V - 2 * fa, R0 = h0 - Za || 1, N0 = v0 - xa || 1, Wa = Math.min(w0 / R0, S0 / N0);
|
|
506
511
|
function E0([I, O]) {
|
|
507
512
|
return [
|
|
@@ -509,7 +514,7 @@ const i3 = {
|
|
|
509
514
|
(O - xa) * Wa + fa
|
|
510
515
|
];
|
|
511
516
|
}
|
|
512
|
-
const M0 = za.map((I) => "M" + I.map(E0).map(([
|
|
517
|
+
const M0 = za.map((I) => "M" + I.map(E0).map(([va, T0]) => `${va},${T0}`).join("L") + "Z").join(" "), L0 = ((Va = x.value) == null ? void 0 : Va.color) || _.value.style.chart.territory.emptyColor, B0 = _.value.style.chart.territory.stroke;
|
|
513
518
|
return `
|
|
514
519
|
<svg width="${V}" height="${V}" viewBox="0 0 ${V} ${V}" style="display:block;margin:auto;">
|
|
515
520
|
<rect x="0" y="0" width="${V}" height="${V}" rx="12" fill="transparent" opacity="0.93"/>
|
|
@@ -518,17 +523,17 @@ const i3 = {
|
|
|
518
523
|
`;
|
|
519
524
|
});
|
|
520
525
|
function c0({ datapoint: a }) {
|
|
521
|
-
x.value = a,
|
|
526
|
+
x.value = a, ha.value = { datapoint: a, config: _.value, series: _a.value }, w.value = !0;
|
|
522
527
|
let n = "";
|
|
523
528
|
const l = _.value.style.chart.tooltip.customFormat;
|
|
524
529
|
if (ua.value = !1, H0(l))
|
|
525
530
|
try {
|
|
526
|
-
const
|
|
531
|
+
const r = l({
|
|
527
532
|
datapoint: a,
|
|
528
533
|
config: _.value,
|
|
529
534
|
series: _a.value
|
|
530
535
|
});
|
|
531
|
-
typeof
|
|
536
|
+
typeof r == "string" && (C.value = r, ua.value = !0);
|
|
532
537
|
} catch {
|
|
533
538
|
console.warn("Custom format cannot be applied."), ua.value = !1;
|
|
534
539
|
}
|
|
@@ -575,8 +580,8 @@ const i3 = {
|
|
|
575
580
|
function f0(a) {
|
|
576
581
|
if (!ea.value || F.value !== "globe" || na.value) return;
|
|
577
582
|
const n = a.clientX - W.value.x, l = a.clientY - W.value.y;
|
|
578
|
-
let
|
|
579
|
-
M = Math.max(-90, Math.min(90, M)), H.value = [
|
|
583
|
+
let r = H.value[0] - n * 0.5, M = H.value[1] + l * 0.5;
|
|
584
|
+
M = Math.max(-90, Math.min(90, M)), H.value = [r, M], W.value = { x: a.clientX, y: a.clientY };
|
|
580
585
|
}
|
|
581
586
|
function Ua() {
|
|
582
587
|
ea.value = !1;
|
|
@@ -588,19 +593,19 @@ const i3 = {
|
|
|
588
593
|
}
|
|
589
594
|
function b0(a) {
|
|
590
595
|
if (!ea.value || F.value !== "globe" || na.value) return;
|
|
591
|
-
const n = a.touches[0], l = n.clientX - W.value.x,
|
|
592
|
-
let M = H.value[0] - l * 0.5, z = H.value[1] +
|
|
596
|
+
const n = a.touches[0], l = n.clientX - W.value.x, r = n.clientY - W.value.y;
|
|
597
|
+
let M = H.value[0] - l * 0.5, z = H.value[1] + r * 0.5;
|
|
593
598
|
z = Math.max(-90, Math.min(90, z)), H.value = [M, z], W.value = { x: n.clientX, y: n.clientY };
|
|
594
599
|
}
|
|
595
600
|
function g0() {
|
|
596
601
|
ea.value = !1;
|
|
597
602
|
}
|
|
598
603
|
const ca = N(() => {
|
|
599
|
-
const a = _a.value.toSorted((
|
|
600
|
-
name:
|
|
601
|
-
color:
|
|
602
|
-
category:
|
|
603
|
-
})), l = a.map((
|
|
604
|
+
const a = _a.value.toSorted((r, M) => (M.value || 0) - (r.value || 0)), n = a.map((r) => ({
|
|
605
|
+
name: r.name,
|
|
606
|
+
color: r.color,
|
|
607
|
+
category: r.category || "-"
|
|
608
|
+
})), l = a.map((r) => r.value || 0);
|
|
604
609
|
return { head: n, body: l };
|
|
605
610
|
}), ta = N(() => {
|
|
606
611
|
const a = [
|
|
@@ -641,8 +646,8 @@ const i3 = {
|
|
|
641
646
|
});
|
|
642
647
|
function Oa() {
|
|
643
648
|
I0(() => {
|
|
644
|
-
const a = ca.value.head.map((
|
|
645
|
-
|
|
649
|
+
const a = ca.value.head.map((r, M) => [[
|
|
650
|
+
r.name
|
|
646
651
|
], [ca.value.body[M]]]), n = [[_.value.style.chart.title.text], [_.value.style.chart.title.subtitle.text], [[
|
|
647
652
|
_.value.table.columnNames.series,
|
|
648
653
|
_.value.table.columnNames.value,
|
|
@@ -678,7 +683,7 @@ const i3 = {
|
|
|
678
683
|
generateImage: Pa,
|
|
679
684
|
toggleTable: Ba,
|
|
680
685
|
toggleTooltip: Ta,
|
|
681
|
-
toggleAnnotator:
|
|
686
|
+
toggleAnnotator: ka
|
|
682
687
|
}), (a, n) => (k(), R("div", {
|
|
683
688
|
ref_key: "worldChart",
|
|
684
689
|
ref: e,
|
|
@@ -688,13 +693,13 @@ const i3 = {
|
|
|
688
693
|
onMouseenter: n[3] || (n[3] = () => S(aa)(!0)),
|
|
689
694
|
onMouseleave: n[4] || (n[4] = () => S(aa)(!1))
|
|
690
695
|
}, [
|
|
691
|
-
_.value.userOptions.buttons.annotator && S(
|
|
696
|
+
_.value.userOptions.buttons.annotator && S(Aa) ? (k(), sa(W0, {
|
|
692
697
|
key: 0,
|
|
693
698
|
color: _.value.style.chart.color,
|
|
694
699
|
backgroundColor: _.value.style.chart.backgroundColor,
|
|
695
700
|
active: na.value,
|
|
696
|
-
svgRef: S(
|
|
697
|
-
onClose:
|
|
701
|
+
svgRef: S(Aa),
|
|
702
|
+
onClose: ka
|
|
698
703
|
}, null, 8, ["color", "backgroundColor", "active", "svgRef"])) : L("", !0),
|
|
699
704
|
B(a.$slots, "userConfig", {}, void 0, !0),
|
|
700
705
|
u0.value ? (k(), R("div", {
|
|
@@ -751,15 +756,15 @@ const i3 = {
|
|
|
751
756
|
onGenerateImage: S(Pa),
|
|
752
757
|
onToggleTable: Ba,
|
|
753
758
|
onToggleTooltip: Ta,
|
|
754
|
-
onToggleAnnotator:
|
|
759
|
+
onToggleAnnotator: ka,
|
|
755
760
|
style: pa({
|
|
756
761
|
visibility: S(Ra) ? S(Q) ? "visible" : "hidden" : "visible"
|
|
757
762
|
})
|
|
758
763
|
}, Xa({ _: 2 }, [
|
|
759
764
|
a.$slots.menuIcon ? {
|
|
760
765
|
name: "menuIcon",
|
|
761
|
-
fn: G(({ isOpen: l, color:
|
|
762
|
-
B(a.$slots, "menuIcon", ma(oa({ isOpen: l, color:
|
|
766
|
+
fn: G(({ isOpen: l, color: r }) => [
|
|
767
|
+
B(a.$slots, "menuIcon", ma(oa({ isOpen: l, color: r })), void 0, !0)
|
|
763
768
|
]),
|
|
764
769
|
key: "0"
|
|
765
770
|
} : void 0,
|
|
@@ -800,22 +805,22 @@ const i3 = {
|
|
|
800
805
|
} : void 0,
|
|
801
806
|
a.$slots.optionFullscreen ? {
|
|
802
807
|
name: "optionFullscreen",
|
|
803
|
-
fn: G(({ toggleFullscreen: l, isFullscreen:
|
|
804
|
-
B(a.$slots, "optionFullscreen", ma(oa({ toggleFullscreen: l, isFullscreen:
|
|
808
|
+
fn: G(({ toggleFullscreen: l, isFullscreen: r }) => [
|
|
809
|
+
B(a.$slots, "optionFullscreen", ma(oa({ toggleFullscreen: l, isFullscreen: r })), void 0, !0)
|
|
805
810
|
]),
|
|
806
811
|
key: "6"
|
|
807
812
|
} : void 0,
|
|
808
813
|
a.$slots.optionAnnotator ? {
|
|
809
814
|
name: "optionAnnotator",
|
|
810
|
-
fn: G(({ toggleAnnotator: l, isAnnotator:
|
|
811
|
-
B(a.$slots, "optionAnnotator", ma(oa({ toggleAnnotator: l, isAnnotator:
|
|
815
|
+
fn: G(({ toggleAnnotator: l, isAnnotator: r }) => [
|
|
816
|
+
B(a.$slots, "optionAnnotator", ma(oa({ toggleAnnotator: l, isAnnotator: r })), void 0, !0)
|
|
812
817
|
]),
|
|
813
818
|
key: "7"
|
|
814
819
|
} : void 0
|
|
815
820
|
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "chartElement", "position", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : L("", !0),
|
|
816
821
|
(k(), R("svg", {
|
|
817
822
|
ref_key: "svgRef",
|
|
818
|
-
ref:
|
|
823
|
+
ref: Aa,
|
|
819
824
|
viewBox: U.value.str,
|
|
820
825
|
xmlns: S(O0),
|
|
821
826
|
class: Qa({
|
|
@@ -840,7 +845,7 @@ const i3 = {
|
|
|
840
845
|
onTouchmove: G0(b0, ["prevent"]),
|
|
841
846
|
onTouchend: g0
|
|
842
847
|
}, [
|
|
843
|
-
|
|
848
|
+
wa(Q0),
|
|
844
849
|
a.$slots["chart-background"] ? (k(), R("foreignObject", {
|
|
845
850
|
key: 0,
|
|
846
851
|
x: U.value.minX,
|
|
@@ -912,7 +917,7 @@ const i3 = {
|
|
|
912
917
|
]), 8, k3)
|
|
913
918
|
]),
|
|
914
919
|
a.$slots.pattern ? (k(), R("g", h3, [
|
|
915
|
-
(k(!0), R(ra, null, $a(_a.value, (l,
|
|
920
|
+
(k(!0), R(ra, null, $a(_a.value, (l, r) => (k(), R("defs", null, [
|
|
916
921
|
B(a.$slots, "pattern", C0({ ref_for: !0 }, { ...l, patternId: `pattern_${y.value}_${l.code}` }), void 0, !0)
|
|
917
922
|
]))), 256))
|
|
918
923
|
])) : L("", !0),
|
|
@@ -939,17 +944,17 @@ const i3 = {
|
|
|
939
944
|
fill: l.category && Y.value.includes(l.category) ? _.value.style.chart.territory.emptyColor : l.color,
|
|
940
945
|
stroke: _.value.style.chart.territory.stroke,
|
|
941
946
|
"stroke-width": x.value && x.value.uid === l.uid ? _.value.style.chart.territory.strokeWidthSelected : _.value.style.chart.territory.strokeWidth,
|
|
942
|
-
onMouseenter: (
|
|
943
|
-
onMouseleave: n[0] || (n[0] = (
|
|
947
|
+
onMouseenter: (r) => c0({ datapoint: l }),
|
|
948
|
+
onMouseleave: n[0] || (n[0] = (r) => {
|
|
944
949
|
w.value = !1, x.value = null;
|
|
945
950
|
}),
|
|
946
|
-
onClick: (
|
|
951
|
+
onClick: (r) => m("selectDatapoint", l),
|
|
947
952
|
class: "vue-ui-world-territory"
|
|
948
953
|
}, [
|
|
949
954
|
!w.value || !P.value.showTooltip ? (k(), R("title", R3, [
|
|
950
|
-
|
|
955
|
+
Sa(ba(l.name) + " ", 1),
|
|
951
956
|
typeof l.value == "number" ? (k(), R(ra, { key: 0 }, [
|
|
952
|
-
|
|
957
|
+
Sa(" : " + ba(l.value), 1)
|
|
953
958
|
], 64)) : L("", !0)
|
|
954
959
|
])) : L("", !0)
|
|
955
960
|
], 40, S3),
|
|
@@ -986,7 +991,7 @@ const i3 = {
|
|
|
986
991
|
t.value ? (k(), R("div", {
|
|
987
992
|
key: 5,
|
|
988
993
|
ref_key: "chartLegend",
|
|
989
|
-
ref:
|
|
994
|
+
ref: d
|
|
990
995
|
}, [
|
|
991
996
|
_.value.style.chart.legend.show ? (k(), sa(a3, {
|
|
992
997
|
key: `legend_${h.value}`,
|
|
@@ -994,7 +999,7 @@ const i3 = {
|
|
|
994
999
|
config: y0.value,
|
|
995
1000
|
onClickMarker: n[1] || (n[1] = (l) => Da(l))
|
|
996
1001
|
}, Xa({
|
|
997
|
-
item: G(({ legend: l, index:
|
|
1002
|
+
item: G(({ legend: l, index: r }) => [
|
|
998
1003
|
T("div", {
|
|
999
1004
|
style: pa(`opacity:${Y.value.includes(l.name) ? 0.5 : 1}`),
|
|
1000
1005
|
onClick: (M) => l.segregate()
|
|
@@ -1004,13 +1009,13 @@ const i3 = {
|
|
|
1004
1009
|
}, [
|
|
1005
1010
|
a.$slots.pattern ? {
|
|
1006
1011
|
name: "legend-pattern",
|
|
1007
|
-
fn: G(({ legend: l, index:
|
|
1008
|
-
|
|
1012
|
+
fn: G(({ legend: l, index: r }) => [
|
|
1013
|
+
wa(_3, {
|
|
1009
1014
|
shape: l.shape,
|
|
1010
1015
|
radius: 30,
|
|
1011
1016
|
stroke: "none",
|
|
1012
1017
|
plot: { x: 30, y: 30 },
|
|
1013
|
-
fill: `url(#pattern_${y.value}_${
|
|
1018
|
+
fill: `url(#pattern_${y.value}_${r})`
|
|
1014
1019
|
}, null, 8, ["shape", "fill"])
|
|
1015
1020
|
]),
|
|
1016
1021
|
key: "0"
|
|
@@ -1026,7 +1031,7 @@ const i3 = {
|
|
|
1026
1031
|
}, [
|
|
1027
1032
|
B(a.$slots, "source", {}, void 0, !0)
|
|
1028
1033
|
], 512)) : L("", !0),
|
|
1029
|
-
|
|
1034
|
+
wa(X0, {
|
|
1030
1035
|
show: P.value.showTooltip && w.value,
|
|
1031
1036
|
backgroundColor: _.value.style.chart.tooltip.backgroundColor,
|
|
1032
1037
|
color: _.value.style.chart.tooltip.color,
|
|
@@ -1043,10 +1048,10 @@ const i3 = {
|
|
|
1043
1048
|
isFullscreen: la.value
|
|
1044
1049
|
}, {
|
|
1045
1050
|
"tooltip-before": G(() => [
|
|
1046
|
-
B(a.$slots, "tooltip-before", ma(oa({ ...
|
|
1051
|
+
B(a.$slots, "tooltip-before", ma(oa({ ...ha.value })), void 0, !0)
|
|
1047
1052
|
]),
|
|
1048
1053
|
"tooltip-after": G(() => [
|
|
1049
|
-
B(a.$slots, "tooltip-after", ma(oa({ ...
|
|
1054
|
+
B(a.$slots, "tooltip-after", ma(oa({ ...ha.value })), void 0, !0)
|
|
1050
1055
|
]),
|
|
1051
1056
|
_: 3
|
|
1052
1057
|
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom", "isFullscreen"]),
|
|
@@ -1083,7 +1088,7 @@ const i3 = {
|
|
|
1083
1088
|
}, null, 8, B3)
|
|
1084
1089
|
]),
|
|
1085
1090
|
td: G(({ td: l }) => [
|
|
1086
|
-
|
|
1091
|
+
Sa(ba(l.name ? l.name : l.category ? l.category : S(_0)(
|
|
1087
1092
|
_.value.style.chart.dataLabels.formatter,
|
|
1088
1093
|
l,
|
|
1089
1094
|
S(l0)({
|
|
@@ -1101,7 +1106,7 @@ const i3 = {
|
|
|
1101
1106
|
}, 8, ["config"])) : L("", !0)
|
|
1102
1107
|
], 46, u3));
|
|
1103
1108
|
}
|
|
1104
|
-
}, Y3 = /* @__PURE__ */ l3(T3, [["__scopeId", "data-v-
|
|
1109
|
+
}, Y3 = /* @__PURE__ */ l3(T3, [["__scopeId", "data-v-9e80e7f8"]]);
|
|
1105
1110
|
export {
|
|
1106
1111
|
Y3 as default
|
|
1107
1112
|
};
|