vue-data-ui 2.4.82 → 2.4.84
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-BT-lmouw.js → Arrow-CExa0Dz7.js} +1 -1
- package/dist/{Arrow-5fWeb1w_.cjs → Arrow-DCfmf5dA.cjs} +1 -1
- package/dist/{BaseIcon-B7oE_tLN.cjs → BaseIcon-64qWZUaJ.cjs} +1 -1
- package/dist/{BaseIcon-DIxHp0nP.js → BaseIcon-I6DfuN0D.js} +1 -1
- package/dist/{DataTable-CISfs21D.cjs → DataTable-C_6KWwfC.cjs} +1 -1
- package/dist/{DataTable-dr19AFlT.js → DataTable-DYhXzoFM.js} +2 -2
- package/dist/{Legend-ChILUEFI.cjs → Legend-BkolTSZc.cjs} +1 -1
- package/dist/{Legend-C6VqGE0l.js → Legend-D8VMKZ6f.js} +2 -2
- package/dist/{PackageVersion-CNuNuAb9.cjs → PackageVersion-BV362f3w.cjs} +1 -1
- package/dist/{PackageVersion-6TSHlmr5.js → PackageVersion-CO2IMTO9.js} +1 -1
- package/dist/{PenAndPaper-C5Ug24R7.js → PenAndPaper-CnW2eqXw.js} +3 -3
- package/dist/{PenAndPaper-TVeCVXVN.cjs → PenAndPaper-DvN8ocWC.cjs} +1 -1
- package/dist/{Shape-C8l-pKBy.js → Shape-Bit--n_P.js} +1 -1
- package/dist/{Shape-Qq8Lt1_F.cjs → Shape-VkiqMBJb.cjs} +1 -1
- package/dist/{Slicer-CA7iwke8.js → Slicer-BIRZ38gw.js} +109 -124
- package/dist/Slicer-D8EYKe1g.cjs +1 -0
- package/dist/{Title-BfHZu6bz.cjs → Title-BVwrrnjn.cjs} +1 -1
- package/dist/{Title-BcYvD5u3.js → Title-C_gOJvlv.js} +1 -1
- package/dist/{Tooltip-fKt9YG50.cjs → Tooltip-CfsfUzgu.cjs} +1 -1
- package/dist/{Tooltip-CnEP60Ez.js → Tooltip-Czv48jTt.js} +1 -1
- package/dist/{index-CsThtcFA.js → index-CFW17vb1.js} +2 -1
- package/dist/index-DtU3BvTq.cjs +9 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +3 -2
- package/dist/types/vue-data-ui.d.ts +3 -2
- package/dist/{useNestedProp-Bjmt-GbY.cjs → useNestedProp-Bwqm-3kz.cjs} +1 -1
- package/dist/{useNestedProp-CYmg6HKV.js → useNestedProp-HPB1YHuD.js} +1 -1
- package/dist/{usePrinter-CHJnz2qB.js → usePrinter-19frcFuH.js} +1 -1
- package/dist/{usePrinter-CbaWB90M.cjs → usePrinter-CdEwyYTo.cjs} +1 -1
- package/dist/{vue-data-ui-a870gnq3.js → vue-data-ui-Cwa_3CUx.js} +60 -60
- package/dist/{vue-data-ui-ClVg2Y5S.cjs → vue-data-ui-Do7J2TPn.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-Dx1wzhEz.cjs → vue-ui-3d-bar-BHQnk6JC.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-B2Q2fngm.js → vue-ui-3d-bar-DFyAJ8Js.js} +9 -9
- package/dist/{vue-ui-accordion-R1MtUDWQ.js → vue-ui-accordion-B8vShfXi.js} +3 -3
- package/dist/{vue-ui-accordion-BMncws2N.cjs → vue-ui-accordion-DP9u_TW0.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-BXXcKMhA.cjs → vue-ui-age-pyramid-DZM35V2u.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-CvZ4900w.js → vue-ui-age-pyramid-Dmve7QfH.js} +10 -10
- package/dist/{vue-ui-annotator-B6bMxIm1.js → vue-ui-annotator-BlXk3QBH.js} +1 -1
- package/dist/{vue-ui-annotator-D1cPic7r.cjs → vue-ui-annotator-D9EQpzhs.cjs} +1 -1
- package/dist/{vue-ui-bullet-CbeR4GvU.js → vue-ui-bullet-C_689DzY.js} +8 -8
- package/dist/{vue-ui-bullet-B4RNYl7A.cjs → vue-ui-bullet-HVCVCTLU.cjs} +1 -1
- package/dist/{vue-ui-candlestick-LXQaBwq2.js → vue-ui-candlestick-BeoPugFC.js} +11 -11
- package/dist/{vue-ui-candlestick-fWCn56wl.cjs → vue-ui-candlestick-jaQCvTyL.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-DY7iX4zw.cjs → vue-ui-carousel-table-C6TjkSgb.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-Dlk54jHH.js → vue-ui-carousel-table-DSJth2mn.js} +4 -4
- package/dist/{vue-ui-chestnut-Dbss-s8e.cjs → vue-ui-chestnut-B2ufyy3m.cjs} +1 -1
- package/dist/{vue-ui-chestnut-GBYmNV4D.js → vue-ui-chestnut-DYFaL9sS.js} +8 -8
- package/dist/{vue-ui-cursor-Uhbo_5YV.js → vue-ui-cursor-0SZiJ6tf.js} +2 -2
- package/dist/{vue-ui-cursor-_a97vjKf.cjs → vue-ui-cursor-B8ne66iS.cjs} +1 -1
- package/dist/{vue-ui-dashboard-CV6lepNo.js → vue-ui-dashboard-9JNDS8H_.js} +2 -2
- package/dist/{vue-ui-dashboard-C3kIRgS8.cjs → vue-ui-dashboard-Cc6YeOue.cjs} +1 -1
- package/dist/{vue-ui-digits-DtoCv8V3.js → vue-ui-digits-DNyhJL4P.js} +2 -2
- package/dist/{vue-ui-digits-r0hIfpvm.cjs → vue-ui-digits-lJ7p7zK0.cjs} +1 -1
- package/dist/{vue-ui-donut-ueAPKu-p.cjs → vue-ui-donut-B1pUA9f9.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-D21cjJEu.js → vue-ui-donut-evolution-BZgaPkPQ.js} +11 -11
- package/dist/{vue-ui-donut-evolution-BxD06YTP.cjs → vue-ui-donut-evolution-CNUN-Ibl.cjs} +1 -1
- package/dist/{vue-ui-donut-HK1nAqAJ.js → vue-ui-donut-rUTpcnu6.js} +12 -12
- package/dist/{vue-ui-dumbbell-BxQj5hna.cjs → vue-ui-dumbbell-Cvsoh0T7.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-D4xDpW8L.js → vue-ui-dumbbell-Dt0y6iAc.js} +10 -10
- package/dist/{vue-ui-flow-BzJzxkns.js → vue-ui-flow-CNJvuCPl.js} +9 -9
- package/dist/{vue-ui-flow-eaxLYKe-.cjs → vue-ui-flow-DoDnRTz2.cjs} +1 -1
- package/dist/{vue-ui-funnel-BtIOBN21.cjs → vue-ui-funnel-BuMkpJAC.cjs} +1 -1
- package/dist/{vue-ui-funnel-DIdawbhb.js → vue-ui-funnel-CzxjqsPW.js} +9 -9
- package/dist/{vue-ui-galaxy-tr5z8bv6.js → vue-ui-galaxy-4lQvAV3d.js} +11 -11
- package/dist/{vue-ui-galaxy-CxvvMYCm.cjs → vue-ui-galaxy-Bd3A40CM.cjs} +1 -1
- package/dist/{vue-ui-gauge-DAy5qpGS.cjs → vue-ui-gauge-BE_j4sWG.cjs} +1 -1
- package/dist/{vue-ui-gauge-BTEuwgTK.js → vue-ui-gauge-C-VzxGad.js} +7 -7
- package/dist/{vue-ui-gizmo-CyoKhkTE.js → vue-ui-gizmo-CE_RL3QC.js} +3 -3
- package/dist/{vue-ui-gizmo-D2YvYKEm.cjs → vue-ui-gizmo-C_H8YGW3.cjs} +1 -1
- package/dist/{vue-ui-heatmap-DE0CkJHT.cjs → vue-ui-heatmap-9F3jF9Ph.cjs} +1 -1
- package/dist/{vue-ui-heatmap-CrhZjdV7.js → vue-ui-heatmap-GRSinjd8.js} +10 -10
- package/dist/{vue-ui-history-plot-DYFZMxHM.cjs → vue-ui-history-plot-CCRPcG-q.cjs} +1 -1
- package/dist/{vue-ui-history-plot-C6pcuMqp.js → vue-ui-history-plot-DmGaPsqO.js} +11 -11
- package/dist/{vue-ui-kpi-DkwXPmZL.js → vue-ui-kpi-BeGj6WIY.js} +3 -3
- package/dist/{vue-ui-kpi-C0u9ZU1f.cjs → vue-ui-kpi-Ce45VFCW.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-CVQ_qNNC.cjs → vue-ui-mini-loader-D3edtEz_.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-CLq0Otkj.js → vue-ui-mini-loader-DE8S92Sq.js} +2 -2
- package/dist/{vue-ui-molecule-HxXY9Y9M.js → vue-ui-molecule-B3DvbGKk.js} +11 -11
- package/dist/{vue-ui-molecule-DtaeRbOZ.cjs → vue-ui-molecule-CBXx1n83.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-CODX8As4.js → vue-ui-mood-radar-D86fg_ce.js} +11 -11
- package/dist/{vue-ui-mood-radar-sNI9CnUS.cjs → vue-ui-mood-radar-LiiA0Dc-.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-DtFEYjqG.cjs → vue-ui-nested-donuts-BXKM6dJG.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-DfslWJLV.js → vue-ui-nested-donuts-jk4b-l4R.js} +11 -11
- package/dist/{vue-ui-onion-CX8XeQ_l.js → vue-ui-onion-0OpNltFd.js} +11 -11
- package/dist/{vue-ui-onion-DiZRACmp.cjs → vue-ui-onion-DMDU5CNx.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-DZYR4krE.cjs → vue-ui-parallel-coordinate-plot-C6z7ZrZv.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-BHeEm0CR.js → vue-ui-parallel-coordinate-plot-CK1Npqa-.js} +12 -12
- package/dist/{vue-ui-quadrant-BgL1hao5.js → vue-ui-quadrant-BTXxbgGe.js} +12 -12
- package/dist/{vue-ui-quadrant-C9wYDYfI.cjs → vue-ui-quadrant-BseIxY55.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-ajTnMBSM.cjs → vue-ui-quick-chart-C648x_Ta.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-Bu3Xcdlq.js → vue-ui-quick-chart-DxTYh43Q.js} +9 -9
- package/dist/{vue-ui-radar-Dt-kzWMo.cjs → vue-ui-radar-BRL3W3Na.cjs} +1 -1
- package/dist/{vue-ui-radar-Cf6_-n4V.js → vue-ui-radar-ogrYz2LM.js} +12 -12
- package/dist/{vue-ui-rating-DTNBXEgx.cjs → vue-ui-rating-BA3qzlLU.cjs} +1 -1
- package/dist/{vue-ui-rating-DuNJPTBF.js → vue-ui-rating-BDOw91i1.js} +2 -2
- package/dist/{vue-ui-relation-circle-CqdnjJWQ.js → vue-ui-relation-circle-DzIUtPsI.js} +7 -7
- package/dist/{vue-ui-relation-circle-PMwBj9LN.cjs → vue-ui-relation-circle-lh7NE0h5.cjs} +1 -1
- package/dist/{vue-ui-rings-IvHrVEYG.cjs → vue-ui-rings-CC2lRhXV.cjs} +1 -1
- package/dist/{vue-ui-rings-BzXcjj0z.js → vue-ui-rings-ZT5FspBJ.js} +12 -12
- package/dist/{vue-ui-scatter-DfejYNwd.js → vue-ui-scatter-DWrEQi8R.js} +12 -12
- package/dist/{vue-ui-scatter-DjHl-XIs.cjs → vue-ui-scatter-ebuihNvY.cjs} +1 -1
- package/dist/{vue-ui-screenshot-Bfl3heZK.cjs → vue-ui-screenshot-C5qnoqpN.cjs} +1 -1
- package/dist/{vue-ui-screenshot-DHY194Cs.js → vue-ui-screenshot-Cu9IDDlN.js} +1 -1
- package/dist/{vue-ui-skeleton-CA5wMVV8.cjs → vue-ui-skeleton-BJjc2poJ.cjs} +1 -1
- package/dist/{vue-ui-skeleton-nkyhyXuS.js → vue-ui-skeleton-RRyod9qq.js} +3 -3
- package/dist/{vue-ui-smiley-Dpq9NCdW.js → vue-ui-smiley-Ph-v2-Ai.js} +2 -2
- package/dist/{vue-ui-smiley-DihuGEvz.cjs → vue-ui-smiley-y9nTUBhA.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-CNf8eqXP.js → vue-ui-spark-trend-Bny5SJnu.js} +5 -5
- package/dist/{vue-ui-spark-trend-D4IpFyAT.cjs → vue-ui-spark-trend-CLToG1xM.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CRA8l9nA.js → vue-ui-sparkbar-Cte6J2j-.js} +4 -4
- package/dist/{vue-ui-sparkbar-DyDAQS5l.cjs → vue-ui-sparkbar-XuIl0I-2.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-q1_NKm6X.cjs → vue-ui-sparkgauge-85UuRRgo.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-DQO5INkx.js → vue-ui-sparkgauge-NGpDEiOA.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-CQu6JcH7.js → vue-ui-sparkhistogram-DC6GQfGG.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-Cz82BTxJ.cjs → vue-ui-sparkhistogram-g9PwZ66_.cjs} +1 -1
- package/dist/{vue-ui-sparkline-CvMlOA7f.cjs → vue-ui-sparkline-BiqTIIb1.cjs} +1 -1
- package/dist/{vue-ui-sparkline-ZbKFEB1a.js → vue-ui-sparkline-Cv0OStNn.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-k4dcyRXf.cjs → vue-ui-sparkstackbar-Dvi0gC4_.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DOUIhmBs.js → vue-ui-sparkstackbar-lUSVcaQd.js} +5 -5
- package/dist/{vue-ui-stackbar-lt8TicVU.js → vue-ui-stackbar-CqbbJfYt.js} +13 -13
- package/dist/{vue-ui-stackbar-CIE2n1Cj.cjs → vue-ui-stackbar-DjJtIsdz.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-Ch1RGWoV.js → vue-ui-strip-plot-BCg5ReEr.js} +11 -11
- package/dist/{vue-ui-strip-plot-DIRlVsXS.cjs → vue-ui-strip-plot-y7iID0n4.cjs} +1 -1
- package/dist/{vue-ui-table-ifejCKXI.cjs → vue-ui-table-BLtxfmhY.cjs} +1 -1
- package/dist/{vue-ui-table-CWEb3B8S.js → vue-ui-table-C0gtq240.js} +1 -1
- package/dist/{vue-ui-table-heatmap-BW4pIWmr.cjs → vue-ui-table-heatmap-Df4MQoU-.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-DogGKS4T.js → vue-ui-table-heatmap-QuqCtJWs.js} +4 -4
- package/dist/{vue-ui-table-sparkline-CYL8rQT-.cjs → vue-ui-table-sparkline-CUD-P2XB.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-BBC4lVJM.js → vue-ui-table-sparkline-Cgt7aEwb.js} +5 -5
- package/dist/{vue-ui-thermometer-hKww43ns.js → vue-ui-thermometer-Dmba_BQM.js} +7 -7
- package/dist/{vue-ui-thermometer-32WmHGq2.cjs → vue-ui-thermometer-DwFIhO9V.cjs} +1 -1
- package/dist/{vue-ui-timer-4yQ-u1yo.js → vue-ui-timer-C7B7kC_T.js} +5 -5
- package/dist/{vue-ui-timer-Kz8NeyKP.cjs → vue-ui-timer-mYvuMMWA.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-pkikDuDs.cjs → vue-ui-tiremarks-Cbu6E711.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-Ci1FA555.js → vue-ui-tiremarks-D5xKuhfo.js} +7 -7
- package/dist/{vue-ui-treemap-s0g9gFUq.js → vue-ui-treemap-4MV0XnQk.js} +11 -11
- package/dist/{vue-ui-treemap-Cam7JIbV.cjs → vue-ui-treemap-CE67vTLK.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-Dpf8M5Y2.js → vue-ui-vertical-bar-CXyj54xk.js} +12 -12
- package/dist/{vue-ui-vertical-bar-DCuXkLMy.cjs → vue-ui-vertical-bar-CoReGxcB.cjs} +1 -1
- package/dist/{vue-ui-waffle-B0f6wQb5.cjs → vue-ui-waffle-8nA0-Wb6.cjs} +1 -1
- package/dist/{vue-ui-waffle-Cjt8sDM6.js → vue-ui-waffle-DEs7x_2T.js} +12 -12
- package/dist/{vue-ui-wheel-DUMSmVGA.cjs → vue-ui-wheel-CJr7fA0P.cjs} +1 -1
- package/dist/{vue-ui-wheel-DnMqTLDg.js → vue-ui-wheel-g8X99gKX.js} +7 -7
- package/dist/{vue-ui-word-cloud-DJx2N2OK.cjs → vue-ui-word-cloud-B6swJJCN.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-D4-GAo5m.js → vue-ui-word-cloud-CVa0GWD2.js} +11 -11
- package/dist/{vue-ui-xy-5YlIb5hC.js → vue-ui-xy-BGlQK1KX.js} +831 -839
- package/dist/{vue-ui-xy-canvas-D96s0y9X.cjs → vue-ui-xy-canvas-B8lWHhig.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-CM-75r6I.js → vue-ui-xy-canvas-C5WvLq7x.js} +11 -11
- package/dist/vue-ui-xy-lkMHpHRs.cjs +3 -0
- package/package.json +1 -1
- package/dist/Slicer-CPf6wtKj.cjs +0 -1
- package/dist/index-JEIXBRiX.cjs +0 -9
- package/dist/vue-ui-xy-DunM3FBg.cjs +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-JEIXBRiX.cjs"),xe=require("./Title-BfHZu6bz.cjs"),ue=require("./usePrinter-CbaWB90M.cjs"),j=require("./useResponsive-BJ7DTGpm.cjs"),$e=require("./vue-ui-accordion-BMncws2N.cjs"),Ne=require("./DataTable-CISfs21D.cjs"),Te=require("./BaseIcon-B7oE_tLN.cjs"),ce=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ie=require("./useNestedProp-Bjmt-GbY.cjs"),Pe=require("./PackageVersion-CNuNuAb9.cjs"),Be=require("./Tooltip-fKt9YG50.cjs"),Fe=require("./PenAndPaper-TVeCVXVN.cjs"),ze=require("./useUserOptionState-BgepsfED.cjs"),Oe=c=>(e.pushScopeId("data-v-b4e6aee9"),c=c(),e.popScopeId(),c),Ve={"data-html2canvas-ignore":""},Ae={key:0,class:"reset-wrapper"},Ee={key:1,class:"reset-wrapper"},_e={class:"mono-slicer"},Me=Oe(()=>e.createElementVNode("div",{class:"slider-track"},null,-1)),Ie=["min","max","value"],Re={__name:"MonoSlicer",props:{min:{type:Number,default:0},max:{type:Number,default:0},inputColor:{type:String,default:"#1A1A1A"},background:{type:String,default:"#FFFFFF"},borderColor:{type:String,default:"#FFFFFF"},selectColor:{type:String,default:"#4A4A4A"},textColor:{type:String,default:"#1A1A1A"},useResetSlot:{type:Boolean,default:!1},value:{type:Number,default:0},source:{type:Number,default:0}},emits:["update:value","reset"],setup(c,{emit:P}){const s=c;e.useCssVars(y=>({"782b8172":E.value,"102109e6":x.value,"642212d7":g.value,"1f5369d4":c.selectColor,"22b98ab8":b.value}));const E=e.computed(()=>s.inputColor),b=e.computed(()=>s.background),g=e.computed(()=>`${s.selectColor}33`),x=e.computed(()=>s.borderColor);function $(){P("reset")}const p=e.computed(()=>{const y=s.max-s.min,m=0,k=(s.value-s.min)/y*100;return{left:`${m}%`,width:`${k-m}%`,background:s.selectColor}});return(y,m)=>(e.openBlock(),e.createElementBlock("div",Ve,[c.value!==c.source?(e.openBlock(),e.createElementBlock("div",Ae,[c.useResetSlot?e.renderSlot(y.$slots,"reset-action",{key:1,reset:$},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",onClick:$},[e.createVNode(Te.default,{name:"refresh",stroke:c.textColor},null,8,["stroke"])]))])):(e.openBlock(),e.createElementBlock("div",Ee)),e.createElementVNode("div",_e,[Me,e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(p.value)},null,4),e.createElementVNode("input",{type:"range",min:c.min,max:c.max,value:Number(c.value),onInput:m[0]||(m[0]=k=>P("update:value",Number(k.target.value)))},null,40,Ie)])]))}},qe=ce._export_sfc(Re,[["__scopeId","data-v-b4e6aee9"]]),Ue=["id"],We=["xmlns","viewBox"],De=["width","height"],Ge=["transform"],Le=["fill","font-weight","x","y","font-size","transform","onMouseover"],je={key:4,class:"vue-data-ui-watermark"},He=["innerHTML"],Xe={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(c,{expose:P}){const s=c,{vue_ui_word_cloud:E}=u.useConfig(),b=e.computed({get(){return!!s.dataset&&s.dataset.length},set(o){return o}}),g=e.ref(typeof s.dataset=="string"?u.createWordCloudDatasetFromPlainText(s.dataset):s.dataset.map((o,a)=>({...o,value:u.checkNaN(o.value)}))),x=e.ref(u.createUid()),$=e.ref(0),p=e.ref(null),y=e.ref(null),m=e.ref(null),k=e.ref(0),H=e.ref(0),_=e.ref(!1),t=e.computed({get:()=>J(),set:o=>o}),{userOptionsVisible:M,setUserOptionsVisibility:X,keepUserOptionState:Y}=ze.useUserOptionState({config:t.value});function J(){const o=ie.useNestedProp({userConfig:s.config,defaultConfig:E});return o.theme?{...ie.useNestedProp({userConfig:u.themes.vue_ui_word_cloud[o.theme]||s.config,defaultConfig:o}),customPalette:u.themePalettes[o.theme]||u.palette}:o}e.watch(()=>s.config,o=>{t.value=J(),M.value=!t.value.showOnChartHover,Q(),k.value+=1,H.value+=1,I()},{deep:!0});const K=e.ref(null),C=e.ref(0),r=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}),de=j.throttle(()=>{const{width:o,height:a}=j.useResponsive({chart:p.value,title:t.value.style.chart.title.text?y.value:null,slicer:t.value.style.chart.zoom.show&&K.value,source:m.value});r.value.width=o,r.value.height=a,e.nextTick(q)});e.watch(()=>C.value,()=>{ve()});const ve=j.debounce(()=>{q()},10);function I(){C.value=R.value}const B=e.ref(null);e.onMounted(()=>{Q(),I()});function Q(){u.objectIsEmpty(s.dataset)?u.error({componentName:"VueUiWordCloud",type:"dataset"}):g.value.forEach((o,a)=>{u.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{b.value=!1,u.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive&&(B.value=new ResizeObserver(de),B.value.observe(p.value.parentNode))}e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:Z,isImaging:ee,generatePdf:te,generateImage:oe}=ue.usePrinter({elementId:`wordCloud_${x.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud"}),d=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show});function he(o,a,l="Arial"){const n=document.createElement("canvas").getContext("2d");return n.font=`${a}px ${t.value.style.chart.words.bold?"bold":"normal"} ${l}`,{width:n.measureText(o).width+t.value.style.chart.words.proximity,height:a}}function pe(o,a){return o.x<a.x+a.width&&o.x+o.width>a.x&&o.y<a.y+a.height&&o.y+o.height>a.y}function me(o,a,l){const i=[],n={x:-a/2,y:-l/2,width:a,height:l},v=0,h=0;return o.forEach(S=>{let G=!1;for(let A=0;A<Math.max(a,l)/2&&!G;A+=t.value.style.chart.words.packingWeight)for(let L=0;L<360&&!G;L+=t.value.style.chart.words.packingWeight){const se=L*Math.PI/180,be=v+A*Math.cos(se)-S.width/2,ke=h+A*Math.sin(se)-S.height/2,f={...S,x:be,y:ke},Ce=f.x>=n.x&&f.y>=n.y&&f.x+f.width<=n.x+n.width&&f.y+f.height<=n.y+n.height,we=i.some(Se=>pe(f,Se));Ce&&!we&&(i.push(f),G=!0)}}),i}const N=e.ref([]);e.watch(()=>s.dataset,q,{immediate:!0});const R=e.computed(()=>Math.round(Math.min(...g.value.map(o=>o.value)))),le=e.computed(()=>Math.round(Math.max(...g.value.map(o=>o.value))));function q(){const o=[...g.value].filter(n=>n.value>=C.value).map(n=>n.value),a=Math.max(...o),l=Math.min(...o),i=[...g.value].filter(n=>n.value>=C.value).map((n,v)=>{let h=(n.value-l)/(a-l)*(r.value.maxFontSize-r.value.minFontSize)+r.value.minFontSize;h=isNaN(h)?r.value.minFontSize:h;const S=he(n.name,h);return{...n,id:u.createUid(),fontSize:h,width:S.width,height:S.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[v]||t.value.customPalette[v%t.value.customPalette.length]||u.palette[v]||u.palette[v%u.palette.length]:t.value.style.chart.words.color}});N.value=me(i,r.value.width,r.value.height).sort((n,v)=>v.fontSize-n.fontSize)}const F=e.computed(()=>{const o=N.value.map(l=>({name:l.name,color:l.color})),a=N.value.map(l=>l.value);return{head:o,body:a}});function ae(){e.nextTick(()=>{const o=F.value.head.map((i,n)=>[[i.name],[F.value.body[n]]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=u.createCsvContent(a);u.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const z=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=F.value.head.map((n,v)=>{const h=u.dataLabel({p:t.value.table.td.prefix,v:F.value.body[v],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},h]}),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:a,config:l}}),O=e.ref(!1);function fe(o){O.value=o,$.value+=1}function ge(){return N.value}function ne(){d.value.showTable=!d.value.showTable}function re(){d.value.showTooltip=!d.value.showTooltip}const V=e.ref(!1);function U(){V.value=!V.value}P({getData:ge,generateCsv:ae,generatePdf:te,generateImage:oe,toggleTable:ne,toggleTooltip:re,toggleAnnotator:U});const w=e.ref(null),T=e.ref(!1),W=e.ref(""),D=e.ref(null);function ye(o){if(!d.value.showTooltip)return;w.value=o.id,D.value={datapoint:o,config:t.value};const a=t.value.style.chart.tooltip.customFormat;if(T.value=!1,u.isFunction(a))try{const l=a({datapoint:o,config:t.value});typeof l=="string"&&(W.value=l,T.value=!0)}catch{console.warn("Custom format cannot be applied."),T.value=!1}if(!T.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>`;W.value=`<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${l}</div>`}_.value=!0}return(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:p,id:`wordCloud_${x.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:a[3]||(a[3]=()=>e.unref(X)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Fe.PenAndPaper,{key:0,parent:p.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:V.value,onClose:U},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:y,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(xe._sfc_main,{key:`title_${k.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&&b.value&&(e.unref(Y)||e.unref(M))?(e.openBlock(),e.createBlock(ue.UserOptions,{ref:"details",key:`user_option_${$.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Z),isImaging:e.unref(ee),uid:x.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:O.value,titles:{...t.value.userOptions.buttonTitles},chartElement:p.value,position:t.value.userOptions.position,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:d.value.showTooltip,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:V.value,onToggleFullscreen:fe,onGeneratePdf:e.unref(te),onGenerateCsv:ae,onGenerateImage:e.unref(oe),onToggleTable:ne,onToggleTooltip:re,onToggleAnnotator:U,style:e.normalizeStyle({visibility:e.unref(Y)?e.unref(M)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"4"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:i})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:i})),void 0,!0)]),key:"5"}: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),b.value?(e.openBlock(),e.createElementBlock("svg",{key:3,class:e.normalizeClass({"vue-data-ui-fullscreen--on":O.value,"vue-data-ui-fulscreen--off":!O.value}),xmlns:e.unref(u.XMLNS),viewBox:`0 0 ${r.value.width<=0?10:r.value.width} ${r.value.height<=0?10:r.value.height}`,style:"overflow:visible;background:transparent;"},[e.createVNode(Pe._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:r.value.width<=0?10:r.value.width,height:r.value.height<=0?10:r.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,De)):e.createCommentVNode("",!0),e.createElementVNode("g",{transform:`translate(${(r.value.width<=0?10:r.value.width)/2}, ${(r.value.height<=0?10:r.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,i)=>(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:i,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":w.value&&w.value===l.id&&d.value.showTooltip,"word-not-selected":w.value&&w.value!==l.id&&d.value.showTooltip}),"text-anchor":"middle","dominant-baseline":"central",onMouseover:n=>ye(l),onMouseleave:a[0]||(a[0]=n=>{w.value=null,_.value=!1}),style:e.normalizeStyle(`animation-delay:${i*t.value.animationDelayMs}ms !important;`)},e.toDisplayString(l.name),47,Le))]))),256))],8,Ge),e.renderSlot(o.$slots,"svg",{svg:{height:r.value.height,width:r.value.width}},void 0,!0)],10,We)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",je,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Z)||e.unref(ee)})),void 0,!0)])):e.createCommentVNode("",!0),e.createVNode(Be._sfc_main,{show:d.value.showTooltip&&_.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:p.value,content:W.value,isCustom:T.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),e.createElementVNode("div",{ref_key:"chartSlicer",ref:K,style:"width:100%;background:transparent","data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&R.value<le.value?(e.openBlock(),e.createBlock(qe,{key:0,value:C.value,"onUpdate:value":a[1]||(a[1]=l=>C.value=l),min:R.value,max:le.value,textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,useResetSlot:t.value.style.chart.zoom.useResetSlot,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,source:t.value.style.chart.width,onReset:I},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["value","min","max","textColor","inputColor","selectColor","useResetSlot","background","borderColor","source"])):e.createCommentVNode("",!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:5,ref_key:"source",ref:m,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock($e.default,{key:6,hideDetails:"",config:{open:d.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(Ne.DataTable,{key:`table_${H.value}`,colNames:z.value.colNames,head:z.value.head,body:z.value.body,config:z.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>d.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,He)]),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,Ue))}},Ye=ce._export_sfc(Xe,[["__scopeId","data-v-ea686487"]]);exports.default=Ye;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-DtU3BvTq.cjs"),xe=require("./Title-BVwrrnjn.cjs"),ue=require("./usePrinter-CdEwyYTo.cjs"),j=require("./useResponsive-BJ7DTGpm.cjs"),$e=require("./vue-ui-accordion-DP9u_TW0.cjs"),Ne=require("./DataTable-C_6KWwfC.cjs"),Te=require("./BaseIcon-64qWZUaJ.cjs"),ce=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ie=require("./useNestedProp-Bwqm-3kz.cjs"),Pe=require("./PackageVersion-BV362f3w.cjs"),Be=require("./Tooltip-CfsfUzgu.cjs"),Fe=require("./PenAndPaper-DvN8ocWC.cjs"),ze=require("./useUserOptionState-BgepsfED.cjs"),Oe=c=>(e.pushScopeId("data-v-b4e6aee9"),c=c(),e.popScopeId(),c),Ve={"data-html2canvas-ignore":""},Ae={key:0,class:"reset-wrapper"},Ee={key:1,class:"reset-wrapper"},_e={class:"mono-slicer"},Me=Oe(()=>e.createElementVNode("div",{class:"slider-track"},null,-1)),Ie=["min","max","value"],Re={__name:"MonoSlicer",props:{min:{type:Number,default:0},max:{type:Number,default:0},inputColor:{type:String,default:"#1A1A1A"},background:{type:String,default:"#FFFFFF"},borderColor:{type:String,default:"#FFFFFF"},selectColor:{type:String,default:"#4A4A4A"},textColor:{type:String,default:"#1A1A1A"},useResetSlot:{type:Boolean,default:!1},value:{type:Number,default:0},source:{type:Number,default:0}},emits:["update:value","reset"],setup(c,{emit:P}){const s=c;e.useCssVars(y=>({"782b8172":E.value,"102109e6":x.value,"642212d7":g.value,"1f5369d4":c.selectColor,"22b98ab8":b.value}));const E=e.computed(()=>s.inputColor),b=e.computed(()=>s.background),g=e.computed(()=>`${s.selectColor}33`),x=e.computed(()=>s.borderColor);function $(){P("reset")}const p=e.computed(()=>{const y=s.max-s.min,m=0,k=(s.value-s.min)/y*100;return{left:`${m}%`,width:`${k-m}%`,background:s.selectColor}});return(y,m)=>(e.openBlock(),e.createElementBlock("div",Ve,[c.value!==c.source?(e.openBlock(),e.createElementBlock("div",Ae,[c.useResetSlot?e.renderSlot(y.$slots,"reset-action",{key:1,reset:$},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",onClick:$},[e.createVNode(Te.default,{name:"refresh",stroke:c.textColor},null,8,["stroke"])]))])):(e.openBlock(),e.createElementBlock("div",Ee)),e.createElementVNode("div",_e,[Me,e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(p.value)},null,4),e.createElementVNode("input",{type:"range",min:c.min,max:c.max,value:Number(c.value),onInput:m[0]||(m[0]=k=>P("update:value",Number(k.target.value)))},null,40,Ie)])]))}},qe=ce._export_sfc(Re,[["__scopeId","data-v-b4e6aee9"]]),Ue=["id"],We=["xmlns","viewBox"],De=["width","height"],Ge=["transform"],Le=["fill","font-weight","x","y","font-size","transform","onMouseover"],je={key:4,class:"vue-data-ui-watermark"},He=["innerHTML"],Xe={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(c,{expose:P}){const s=c,{vue_ui_word_cloud:E}=u.useConfig(),b=e.computed({get(){return!!s.dataset&&s.dataset.length},set(o){return o}}),g=e.ref(typeof s.dataset=="string"?u.createWordCloudDatasetFromPlainText(s.dataset):s.dataset.map((o,a)=>({...o,value:u.checkNaN(o.value)}))),x=e.ref(u.createUid()),$=e.ref(0),p=e.ref(null),y=e.ref(null),m=e.ref(null),k=e.ref(0),H=e.ref(0),_=e.ref(!1),t=e.computed({get:()=>J(),set:o=>o}),{userOptionsVisible:M,setUserOptionsVisibility:X,keepUserOptionState:Y}=ze.useUserOptionState({config:t.value});function J(){const o=ie.useNestedProp({userConfig:s.config,defaultConfig:E});return o.theme?{...ie.useNestedProp({userConfig:u.themes.vue_ui_word_cloud[o.theme]||s.config,defaultConfig:o}),customPalette:u.themePalettes[o.theme]||u.palette}:o}e.watch(()=>s.config,o=>{t.value=J(),M.value=!t.value.showOnChartHover,Q(),k.value+=1,H.value+=1,I()},{deep:!0});const K=e.ref(null),C=e.ref(0),r=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}),de=j.throttle(()=>{const{width:o,height:a}=j.useResponsive({chart:p.value,title:t.value.style.chart.title.text?y.value:null,slicer:t.value.style.chart.zoom.show&&K.value,source:m.value});r.value.width=o,r.value.height=a,e.nextTick(q)});e.watch(()=>C.value,()=>{ve()});const ve=j.debounce(()=>{q()},10);function I(){C.value=R.value}const B=e.ref(null);e.onMounted(()=>{Q(),I()});function Q(){u.objectIsEmpty(s.dataset)?u.error({componentName:"VueUiWordCloud",type:"dataset"}):g.value.forEach((o,a)=>{u.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{b.value=!1,u.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive&&(B.value=new ResizeObserver(de),B.value.observe(p.value.parentNode))}e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:Z,isImaging:ee,generatePdf:te,generateImage:oe}=ue.usePrinter({elementId:`wordCloud_${x.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud"}),d=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show});function he(o,a,l="Arial"){const n=document.createElement("canvas").getContext("2d");return n.font=`${a}px ${t.value.style.chart.words.bold?"bold":"normal"} ${l}`,{width:n.measureText(o).width+t.value.style.chart.words.proximity,height:a}}function pe(o,a){return o.x<a.x+a.width&&o.x+o.width>a.x&&o.y<a.y+a.height&&o.y+o.height>a.y}function me(o,a,l){const i=[],n={x:-a/2,y:-l/2,width:a,height:l},v=0,h=0;return o.forEach(S=>{let G=!1;for(let A=0;A<Math.max(a,l)/2&&!G;A+=t.value.style.chart.words.packingWeight)for(let L=0;L<360&&!G;L+=t.value.style.chart.words.packingWeight){const se=L*Math.PI/180,be=v+A*Math.cos(se)-S.width/2,ke=h+A*Math.sin(se)-S.height/2,f={...S,x:be,y:ke},Ce=f.x>=n.x&&f.y>=n.y&&f.x+f.width<=n.x+n.width&&f.y+f.height<=n.y+n.height,we=i.some(Se=>pe(f,Se));Ce&&!we&&(i.push(f),G=!0)}}),i}const N=e.ref([]);e.watch(()=>s.dataset,q,{immediate:!0});const R=e.computed(()=>Math.round(Math.min(...g.value.map(o=>o.value)))),le=e.computed(()=>Math.round(Math.max(...g.value.map(o=>o.value))));function q(){const o=[...g.value].filter(n=>n.value>=C.value).map(n=>n.value),a=Math.max(...o),l=Math.min(...o),i=[...g.value].filter(n=>n.value>=C.value).map((n,v)=>{let h=(n.value-l)/(a-l)*(r.value.maxFontSize-r.value.minFontSize)+r.value.minFontSize;h=isNaN(h)?r.value.minFontSize:h;const S=he(n.name,h);return{...n,id:u.createUid(),fontSize:h,width:S.width,height:S.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[v]||t.value.customPalette[v%t.value.customPalette.length]||u.palette[v]||u.palette[v%u.palette.length]:t.value.style.chart.words.color}});N.value=me(i,r.value.width,r.value.height).sort((n,v)=>v.fontSize-n.fontSize)}const F=e.computed(()=>{const o=N.value.map(l=>({name:l.name,color:l.color})),a=N.value.map(l=>l.value);return{head:o,body:a}});function ae(){e.nextTick(()=>{const o=F.value.head.map((i,n)=>[[i.name],[F.value.body[n]]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=u.createCsvContent(a);u.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const z=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=F.value.head.map((n,v)=>{const h=u.dataLabel({p:t.value.table.td.prefix,v:F.value.body[v],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},h]}),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:a,config:l}}),O=e.ref(!1);function fe(o){O.value=o,$.value+=1}function ge(){return N.value}function ne(){d.value.showTable=!d.value.showTable}function re(){d.value.showTooltip=!d.value.showTooltip}const V=e.ref(!1);function U(){V.value=!V.value}P({getData:ge,generateCsv:ae,generatePdf:te,generateImage:oe,toggleTable:ne,toggleTooltip:re,toggleAnnotator:U});const w=e.ref(null),T=e.ref(!1),W=e.ref(""),D=e.ref(null);function ye(o){if(!d.value.showTooltip)return;w.value=o.id,D.value={datapoint:o,config:t.value};const a=t.value.style.chart.tooltip.customFormat;if(T.value=!1,u.isFunction(a))try{const l=a({datapoint:o,config:t.value});typeof l=="string"&&(W.value=l,T.value=!0)}catch{console.warn("Custom format cannot be applied."),T.value=!1}if(!T.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>`;W.value=`<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${l}</div>`}_.value=!0}return(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:p,id:`wordCloud_${x.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:a[3]||(a[3]=()=>e.unref(X)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Fe.PenAndPaper,{key:0,parent:p.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:V.value,onClose:U},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:y,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(xe._sfc_main,{key:`title_${k.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&&b.value&&(e.unref(Y)||e.unref(M))?(e.openBlock(),e.createBlock(ue.UserOptions,{ref:"details",key:`user_option_${$.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Z),isImaging:e.unref(ee),uid:x.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:O.value,titles:{...t.value.userOptions.buttonTitles},chartElement:p.value,position:t.value.userOptions.position,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:d.value.showTooltip,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:V.value,onToggleFullscreen:fe,onGeneratePdf:e.unref(te),onGenerateCsv:ae,onGenerateImage:e.unref(oe),onToggleTable:ne,onToggleTooltip:re,onToggleAnnotator:U,style:e.normalizeStyle({visibility:e.unref(Y)?e.unref(M)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"4"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:i})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:i})),void 0,!0)]),key:"5"}: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),b.value?(e.openBlock(),e.createElementBlock("svg",{key:3,class:e.normalizeClass({"vue-data-ui-fullscreen--on":O.value,"vue-data-ui-fulscreen--off":!O.value}),xmlns:e.unref(u.XMLNS),viewBox:`0 0 ${r.value.width<=0?10:r.value.width} ${r.value.height<=0?10:r.value.height}`,style:"overflow:visible;background:transparent;"},[e.createVNode(Pe._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:r.value.width<=0?10:r.value.width,height:r.value.height<=0?10:r.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,De)):e.createCommentVNode("",!0),e.createElementVNode("g",{transform:`translate(${(r.value.width<=0?10:r.value.width)/2}, ${(r.value.height<=0?10:r.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,i)=>(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:i,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":w.value&&w.value===l.id&&d.value.showTooltip,"word-not-selected":w.value&&w.value!==l.id&&d.value.showTooltip}),"text-anchor":"middle","dominant-baseline":"central",onMouseover:n=>ye(l),onMouseleave:a[0]||(a[0]=n=>{w.value=null,_.value=!1}),style:e.normalizeStyle(`animation-delay:${i*t.value.animationDelayMs}ms !important;`)},e.toDisplayString(l.name),47,Le))]))),256))],8,Ge),e.renderSlot(o.$slots,"svg",{svg:{height:r.value.height,width:r.value.width}},void 0,!0)],10,We)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",je,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Z)||e.unref(ee)})),void 0,!0)])):e.createCommentVNode("",!0),e.createVNode(Be._sfc_main,{show:d.value.showTooltip&&_.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:p.value,content:W.value,isCustom:T.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),e.createElementVNode("div",{ref_key:"chartSlicer",ref:K,style:"width:100%;background:transparent","data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&R.value<le.value?(e.openBlock(),e.createBlock(qe,{key:0,value:C.value,"onUpdate:value":a[1]||(a[1]=l=>C.value=l),min:R.value,max:le.value,textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,useResetSlot:t.value.style.chart.zoom.useResetSlot,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,source:t.value.style.chart.width,onReset:I},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["value","min","max","textColor","inputColor","selectColor","useResetSlot","background","borderColor","source"])):e.createCommentVNode("",!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:5,ref_key:"source",ref:m,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock($e.default,{key:6,hideDetails:"",config:{open:d.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(Ne.DataTable,{key:`table_${H.value}`,colNames:z.value.colNames,head:z.value.head,body:z.value.body,config:z.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>d.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,He)]),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,Ue))}},Ye=ce._export_sfc(Xe,[["__scopeId","data-v-5e126e12"]]);exports.default=Ye;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { useCssVars as De, computed as g, openBlock as u, createElementBlock as h, createVNode as se, renderSlot as d, createElementVNode as S, normalizeStyle as j, pushScopeId as Ee, popScopeId as Ge, ref as n, watch as le, onMounted as Le, onBeforeUnmount as Xe, unref as v, createBlock as O, createCommentVNode as b, createSlots as je, withCtx as m, normalizeProps as A, guardReactiveProps as _, normalizeClass as ke, Fragment as He, renderList as Ye, toDisplayString as we, createTextVNode as qe, nextTick as $e } from "vue";
|
|
2
|
-
import { u as Je, a3 as Ke, v as Qe, c as xe, t as Ze, a as et, p as X, o as tt, e as Se, g as ot, f as at, X as lt, q as st, r as nt, x as rt } from "./index-
|
|
3
|
-
import { _ as ut } from "./Title-
|
|
4
|
-
import { u as it, U as ct } from "./usePrinter-
|
|
2
|
+
import { u as Je, a3 as Ke, v as Qe, c as xe, t as Ze, a as et, p as X, o as tt, e as Se, g as ot, f as at, X as lt, q as st, r as nt, x as rt } from "./index-CFW17vb1.js";
|
|
3
|
+
import { _ as ut } from "./Title-C_gOJvlv.js";
|
|
4
|
+
import { u as it, U as ct } from "./usePrinter-19frcFuH.js";
|
|
5
5
|
import { d as dt, t as vt, u as ht } from "./useResponsive-CoxXLe23.js";
|
|
6
|
-
import mt from "./vue-ui-accordion-
|
|
7
|
-
import { D as pt } from "./DataTable-
|
|
8
|
-
import ft from "./BaseIcon-
|
|
6
|
+
import mt from "./vue-ui-accordion-B8vShfXi.js";
|
|
7
|
+
import { D as pt } from "./DataTable-DYhXzoFM.js";
|
|
8
|
+
import ft from "./BaseIcon-I6DfuN0D.js";
|
|
9
9
|
import { _ as Fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
|
-
import { u as Te } from "./useNestedProp-
|
|
11
|
-
import { _ as gt } from "./PackageVersion-
|
|
12
|
-
import { _ as yt } from "./Tooltip-
|
|
13
|
-
import { P as bt } from "./PenAndPaper-
|
|
10
|
+
import { u as Te } from "./useNestedProp-HPB1YHuD.js";
|
|
11
|
+
import { _ as gt } from "./PackageVersion-CO2IMTO9.js";
|
|
12
|
+
import { _ as yt } from "./Tooltip-Czv48jTt.js";
|
|
13
|
+
import { P as bt } from "./PenAndPaper-CnW2eqXw.js";
|
|
14
14
|
import { u as Ct } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
15
|
const kt = (c) => (Ee("data-v-b4e6aee9"), c = c(), Ge(), c), wt = { "data-html2canvas-ignore": "" }, $t = {
|
|
16
16
|
key: 0,
|
|
@@ -621,7 +621,7 @@ const kt = (c) => (Ee("data-v-b4e6aee9"), c = c(), Ge(), c), wt = { "data-html2c
|
|
|
621
621
|
}, 8, ["config"])) : b("", !0)
|
|
622
622
|
], 44, Pt));
|
|
623
623
|
}
|
|
624
|
-
}, Qt = /* @__PURE__ */ Fe(Rt, [["__scopeId", "data-v-
|
|
624
|
+
}, Qt = /* @__PURE__ */ Fe(Rt, [["__scopeId", "data-v-5e126e12"]]);
|
|
625
625
|
export {
|
|
626
626
|
Qt as default
|
|
627
627
|
};
|