vue-data-ui 2.6.4 → 2.6.6
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-CJeP3IfV.cjs → Arrow-BYqxz6UG.cjs} +1 -1
- package/dist/{Arrow-BNRsG_PK.js → Arrow-DFWjAvCY.js} +1 -1
- package/dist/{BaseIcon-BOR1UXkg.cjs → BaseIcon-COe_H-UB.cjs} +1 -1
- package/dist/{BaseIcon-DAD8bWYx.js → BaseIcon-t20JEZNG.js} +1 -1
- package/dist/{DataTable-Bg0b_pVK.js → DataTable-CJN0sipt.js} +2 -2
- package/dist/{DataTable-C1LMti1U.cjs → DataTable-Du7nJ0TM.cjs} +1 -1
- package/dist/{Legend-Ba6qRAqc.js → Legend-BDyPoYfp.js} +2 -2
- package/dist/{Legend-CMzKRWtT.cjs → Legend-CM7IGBC3.cjs} +1 -1
- package/dist/{PackageVersion-C5hOoj_p.js → PackageVersion-DqmHcoqz.js} +1 -1
- package/dist/{PackageVersion-2gojTmrp.cjs → PackageVersion-qeLvq6l8.cjs} +1 -1
- package/dist/{PenAndPaper-BJLUyj-s.js → PenAndPaper-6UYizrkQ.js} +3 -3
- package/dist/{PenAndPaper-Bwxr_PKm.cjs → PenAndPaper-BYqaxOpk.cjs} +1 -1
- package/dist/{Shape-DTKetM4N.cjs → Shape-BN3-_2DI.cjs} +1 -1
- package/dist/{Shape-BXfC7I_g.js → Shape-C_qIhG3J.js} +1 -1
- package/dist/{Slicer-bCt9Cx4y.js → Slicer-BQP3UIW-.js} +2 -2
- package/dist/{Slicer-Park25Rm.cjs → Slicer-DPae3p1M.cjs} +1 -1
- package/dist/{Title-vXH_7MPz.cjs → Title-BGiQdt7J.cjs} +1 -1
- package/dist/{Title-AFFkNb_h.js → Title-D6h1gTvZ.js} +1 -1
- package/dist/{Tooltip-C6qF6AOJ.js → Tooltip-BonEVaob.js} +1 -1
- package/dist/{Tooltip-C7eukp_Y.cjs → Tooltip-DSPKrQcQ.cjs} +1 -1
- package/dist/{index-y7ebFPbO.js → index-B9qF6XbP.js} +12 -7
- package/dist/index-kZKcQZM_.cjs +9 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +89 -62
- package/dist/types/vue-data-ui.d.ts +89 -62
- package/dist/{useNestedProp-BzGIy5aD.cjs → useNestedProp-D4Jn2Oxr.cjs} +1 -1
- package/dist/{useNestedProp-BWzyGJZ8.js → useNestedProp-g5oKzlVy.js} +1 -1
- package/dist/{usePrinter-DY6H-UkT.cjs → usePrinter-DR42gTOS.cjs} +1 -1
- package/dist/{usePrinter-xz0bcBPM.js → usePrinter-DsiBLAy1.js} +1 -1
- package/dist/{vue-data-ui-lvrlgytd.js → vue-data-ui-DB2kdhYH.js} +61 -61
- package/dist/{vue-data-ui-DI586Tl5.cjs → vue-data-ui-DbhVASfn.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-BZgGJ_4E.cjs → vue-ui-3d-bar-DEu24HHj.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-7ciIKlHS.js → vue-ui-3d-bar-DHeSFJ5z.js} +9 -9
- package/dist/{vue-ui-accordion-D3UeWj9q.cjs → vue-ui-accordion-BfDu7hTY.cjs} +1 -1
- package/dist/{vue-ui-accordion-DxSGI7GJ.js → vue-ui-accordion-DBmchkva.js} +3 -3
- package/dist/{vue-ui-age-pyramid-C-3bEzow.cjs → vue-ui-age-pyramid-CRYYDXFo.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-D8CKdfwE.js → vue-ui-age-pyramid-CvUCPqxa.js} +10 -10
- package/dist/{vue-ui-annotator-B4_flLm1.cjs → vue-ui-annotator-BV9t6ro7.cjs} +1 -1
- package/dist/{vue-ui-annotator-Cu9TPyUl.js → vue-ui-annotator-Dr5PLrJx.js} +1 -1
- package/dist/{vue-ui-bullet-BEssjqEW.js → vue-ui-bullet-D7Uw9tez.js} +8 -8
- package/dist/{vue-ui-bullet-CS48Jn1m.cjs → vue-ui-bullet-Dy71N3Jf.cjs} +1 -1
- package/dist/{vue-ui-candlestick-DW7NHW5L.js → vue-ui-candlestick-BFmh-zx1.js} +11 -11
- package/dist/{vue-ui-candlestick-B85sWqPO.cjs → vue-ui-candlestick-aZ1YN4hh.cjs} +1 -1
- package/dist/{vue-ui-carousel-table--yu4e9Dn.cjs → vue-ui-carousel-table-C30Gvanv.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-BDgIKnZ6.js → vue-ui-carousel-table-CUhkylz_.js} +4 -4
- package/dist/{vue-ui-chestnut-wiZb3STX.js → vue-ui-chestnut-C53wdHmR.js} +8 -8
- package/dist/{vue-ui-chestnut-CohERgOT.cjs → vue-ui-chestnut-DuycsDaB.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-D0DnGODv.cjs → vue-ui-circle-pack-BFF5_9Sm.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-CCbFwcZq.js → vue-ui-circle-pack-Bj3sA7RV.js} +9 -9
- package/dist/{vue-ui-cursor-DqFQ-PMZ.js → vue-ui-cursor-0GY46Ywr.js} +2 -2
- package/dist/{vue-ui-cursor-Br93sq6V.cjs → vue-ui-cursor-ZBrt-jTo.cjs} +1 -1
- package/dist/{vue-ui-dashboard-lSSaetgV.js → vue-ui-dashboard-BX787_or.js} +2 -2
- package/dist/{vue-ui-dashboard-BwnE3PnW.cjs → vue-ui-dashboard-pzZD8J2y.cjs} +1 -1
- package/dist/{vue-ui-digits-DyMxtXim.cjs → vue-ui-digits-Blb8fghV.cjs} +1 -1
- package/dist/{vue-ui-digits-BbKoWo0v.js → vue-ui-digits-BvCMwL0L.js} +2 -2
- package/dist/{vue-ui-donut-BFdOEkVv.cjs → vue-ui-donut-BO6RWqZ6.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-572FJh5z.cjs → vue-ui-donut-evolution-BgJMw_a4.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-WWwGlSFZ.js → vue-ui-donut-evolution-DRfJVMrP.js} +12 -12
- package/dist/{vue-ui-donut-BPY9X0nr.js → vue-ui-donut-yBjSgsTz.js} +13 -15
- package/dist/{vue-ui-dumbbell-otpZLJRb.js → vue-ui-dumbbell-4-hWZn-o.js} +10 -10
- package/dist/{vue-ui-dumbbell-CTCUgGKD.cjs → vue-ui-dumbbell-BSXxNjyK.cjs} +1 -1
- package/dist/{vue-ui-flow-BcqEMc_I.cjs → vue-ui-flow-LNlNIRfb.cjs} +1 -1
- package/dist/{vue-ui-flow-Dr2lzUkJ.js → vue-ui-flow-aH6xSdwn.js} +9 -9
- package/dist/{vue-ui-funnel-DhAgAXS7.js → vue-ui-funnel-BZy4SvlW.js} +9 -9
- package/dist/{vue-ui-funnel-D3WFS9UV.cjs → vue-ui-funnel-BhDmLkFj.cjs} +1 -1
- package/dist/{vue-ui-galaxy-wA-JkujS.cjs → vue-ui-galaxy-BcwAAgUh.cjs} +1 -1
- package/dist/{vue-ui-galaxy-Com-d71M.js → vue-ui-galaxy-GDXdZqjm.js} +11 -11
- package/dist/{vue-ui-gauge-DseS2Wjw.cjs → vue-ui-gauge-BCf-2H4T.cjs} +1 -1
- package/dist/{vue-ui-gauge-D5cWSaYs.js → vue-ui-gauge-CeyHdkuS.js} +8 -8
- package/dist/{vue-ui-gizmo-C4hyVlqo.cjs → vue-ui-gizmo-CRTzb1J_.cjs} +1 -1
- package/dist/{vue-ui-gizmo-D7Y4R-bm.js → vue-ui-gizmo-veFxjktw.js} +3 -3
- package/dist/{vue-ui-heatmap-B60uAj5d.js → vue-ui-heatmap-BizLgjJ8.js} +13 -13
- package/dist/{vue-ui-heatmap-rlqRMQeh.cjs → vue-ui-heatmap-Bxhy4dCf.cjs} +1 -1
- package/dist/{vue-ui-history-plot-CC4-ii7H.cjs → vue-ui-history-plot-CTBCFIG0.cjs} +1 -1
- package/dist/{vue-ui-history-plot-CmOEQx8n.js → vue-ui-history-plot-gzx5uGyY.js} +11 -11
- package/dist/{vue-ui-kpi-uxIO9tVc.cjs → vue-ui-kpi-CP08PB51.cjs} +1 -1
- package/dist/{vue-ui-kpi-B9SmpjuD.js → vue-ui-kpi-MdyAQjdJ.js} +3 -3
- package/dist/{vue-ui-mini-loader-B8n-qGUz.cjs → vue-ui-mini-loader-BRmtJ6az.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-Bpp9yfiB.js → vue-ui-mini-loader-CYVr1K6S.js} +2 -2
- package/dist/{vue-ui-molecule-9de6y3_R.js → vue-ui-molecule-CJ05ddhf.js} +11 -11
- package/dist/{vue-ui-molecule-D5DCX4SJ.cjs → vue-ui-molecule-pTMJG_3k.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-D2pdih9T.js → vue-ui-mood-radar-DG1pF6Ii.js} +11 -11
- package/dist/{vue-ui-mood-radar-uHW_8xE-.cjs → vue-ui-mood-radar-DXLYUXbX.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-wLxqfAFm.js → vue-ui-nested-donuts-CDjZ6KfI.js} +11 -11
- package/dist/{vue-ui-nested-donuts-BCtAAmdG.cjs → vue-ui-nested-donuts-yztsnsjM.cjs} +1 -1
- package/dist/{vue-ui-onion-CK_xa2M4.cjs → vue-ui-onion-BgbKMVNe.cjs} +1 -1
- package/dist/{vue-ui-onion-Vz2j7gWm.js → vue-ui-onion-DsskQUiP.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-CZRX2Hss.cjs → vue-ui-parallel-coordinate-plot-Cha1Em8k.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-BQdLDI5B.js → vue-ui-parallel-coordinate-plot-D7r71vdp.js} +12 -12
- package/dist/{vue-ui-quadrant-CalJqNte.cjs → vue-ui-quadrant-BzYnR_Hc.cjs} +1 -1
- package/dist/{vue-ui-quadrant-iPPHj_cd.js → vue-ui-quadrant-DCHEhvMX.js} +15 -16
- package/dist/{vue-ui-quick-chart-CV1VBbY1.js → vue-ui-quick-chart-BB5b4AQ1.js} +9 -9
- package/dist/{vue-ui-quick-chart-CFUOFUU_.cjs → vue-ui-quick-chart-BcW7URue.cjs} +1 -1
- package/dist/{vue-ui-radar-DsialWJl.js → vue-ui-radar-CNEXWSEx.js} +53 -56
- package/dist/{vue-ui-radar-B2gn7R-V.cjs → vue-ui-radar-D-XPVXa9.cjs} +1 -1
- package/dist/{vue-ui-rating-B3W6ZWnp.cjs → vue-ui-rating-ClvF4LPg.cjs} +1 -1
- package/dist/{vue-ui-rating-4gM1AlYy.js → vue-ui-rating-DJLSl0-4.js} +2 -2
- package/dist/{vue-ui-relation-circle-YEAFQh-9.cjs → vue-ui-relation-circle-DfxnHEqR.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-D6ZiupHh.js → vue-ui-relation-circle-Hdzt7fOS.js} +7 -7
- package/dist/{vue-ui-rings-CbIo_ZYH.js → vue-ui-rings-BAFkqjcL.js} +13 -15
- package/dist/{vue-ui-rings-B9BPvha3.cjs → vue-ui-rings-C9NFME3F.cjs} +2 -2
- package/dist/{vue-ui-scatter-CQ-Vdmeu.js → vue-ui-scatter-Ca67EOrI.js} +13 -13
- package/dist/{vue-ui-scatter-BqSstAAz.cjs → vue-ui-scatter-D0UloS1C.cjs} +1 -1
- package/dist/{vue-ui-screenshot-0RZZXp_S.cjs → vue-ui-screenshot-CFcvBOJm.cjs} +1 -1
- package/dist/{vue-ui-screenshot-BEV-kvIS.js → vue-ui-screenshot-CsdnwhSO.js} +1 -1
- package/dist/{vue-ui-skeleton-DkW8eWHI.cjs → vue-ui-skeleton-BBNX7lud.cjs} +1 -1
- package/dist/{vue-ui-skeleton-DOahsJXV.js → vue-ui-skeleton-CHEZlRpn.js} +3 -3
- package/dist/{vue-ui-smiley-DY8lN1W3.js → vue-ui-smiley-Dth6gRqg.js} +2 -2
- package/dist/{vue-ui-smiley-B9xk5OKe.cjs → vue-ui-smiley-EngC6Vc4.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-XDdEKIe6.js → vue-ui-spark-trend-33sBlF-n.js} +5 -5
- package/dist/{vue-ui-spark-trend-CGoCmXa9.cjs → vue-ui-spark-trend-DJ8yhFMx.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-QikBTVyy.cjs → vue-ui-sparkbar-D9QLpB7G.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CGpwWIBE.js → vue-ui-sparkbar-mJu95295.js} +4 -4
- package/dist/{vue-ui-sparkgauge-ZDhKN9Pz.cjs → vue-ui-sparkgauge-CBCbyOG2.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-CeNuuLof.js → vue-ui-sparkgauge-nFFf8h-x.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-DLEumotF.js → vue-ui-sparkhistogram-Bh6R737O.js} +21 -21
- package/dist/vue-ui-sparkhistogram-BstSpbti.cjs +1 -0
- package/dist/{vue-ui-sparkline-b9FXu2wY.js → vue-ui-sparkline-BfBiA1O5.js} +136 -140
- package/dist/vue-ui-sparkline-DTRZ-_Qw.cjs +1 -0
- package/dist/{vue-ui-sparkstackbar-CQFec5Ni.js → vue-ui-sparkstackbar-BNTFNUIA.js} +8 -6
- package/dist/vue-ui-sparkstackbar-CuU8Vpcv.cjs +1 -0
- package/dist/{vue-ui-stackbar-B24Xho-6.cjs → vue-ui-stackbar-B5uNBkxp.cjs} +1 -1
- package/dist/{vue-ui-stackbar-B50_Zmpe.js → vue-ui-stackbar-BbFUifMU.js} +13 -13
- package/dist/{vue-ui-strip-plot-DzTWLY9k.cjs → vue-ui-strip-plot-7G7BAGQM.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-DBEKI4DJ.js → vue-ui-strip-plot-wsxpyqrw.js} +11 -11
- package/dist/{vue-ui-table-CiJBrzOj.js → vue-ui-table-CQYM4uPf.js} +1 -1
- package/dist/{vue-ui-table-DeQeB-f6.cjs → vue-ui-table-DUokotBj.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-DQMdZaE0.cjs → vue-ui-table-heatmap-Brk58nK_.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-CjnQNUKw.js → vue-ui-table-heatmap-OYQ9OOzo.js} +4 -4
- package/dist/{vue-ui-table-sparkline-Bu6vSST9.cjs → vue-ui-table-sparkline-C9dOsIAB.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-DqBjtjvu.js → vue-ui-table-sparkline-DUjDhg8A.js} +5 -5
- package/dist/vue-ui-thermometer-VnlcJh4G.cjs +1 -0
- package/dist/{vue-ui-thermometer-DQr-b2tS.js → vue-ui-thermometer-WSMSVcM_.js} +11 -11
- package/dist/{vue-ui-timer-B18HFp7S.cjs → vue-ui-timer-Bh8RpM2u.cjs} +1 -1
- package/dist/{vue-ui-timer-lsgsV998.js → vue-ui-timer-DBP_fRcm.js} +5 -5
- package/dist/{vue-ui-tiremarks-D1A57_oK.cjs → vue-ui-tiremarks-Ct96o_fd.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-C7Dw9KnQ.js → vue-ui-tiremarks-WWgS2mqw.js} +7 -7
- package/dist/{vue-ui-treemap-DurUVYzG.cjs → vue-ui-treemap-BfDk53pM.cjs} +1 -1
- package/dist/{vue-ui-treemap-qSvP_IHI.js → vue-ui-treemap-CXoXEuSA.js} +11 -11
- package/dist/{vue-ui-vertical-bar-D9eDAZF3.js → vue-ui-vertical-bar-COaAa4nz.js} +15 -17
- package/dist/vue-ui-vertical-bar-EIy7A0dV.cjs +4 -0
- package/dist/{vue-ui-waffle-CaGazi4R.cjs → vue-ui-waffle-BB3l0zZU.cjs} +1 -1
- package/dist/{vue-ui-waffle-CFzcClhK.js → vue-ui-waffle-DD8pT7JN.js} +13 -13
- package/dist/vue-ui-wheel-BLlKekiu.js +327 -0
- package/dist/vue-ui-wheel-DfpXZJ8A.cjs +1 -0
- package/dist/{vue-ui-word-cloud-CelTdM-N.js → vue-ui-word-cloud-CcYtTXW6.js} +10 -10
- package/dist/{vue-ui-word-cloud-BxEfdctG.cjs → vue-ui-word-cloud-DdaMzF2e.cjs} +1 -1
- package/dist/{vue-ui-xy-BMTIOJmU.cjs → vue-ui-xy-B4Mzyy81.cjs} +2 -2
- package/dist/{vue-ui-xy-CaEGEO6l.js → vue-ui-xy-DYzfiZnJ.js} +15 -16
- package/dist/{vue-ui-xy-canvas-CrU_aS7K.cjs → vue-ui-xy-canvas-CkB7VDhF.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-DBWb4s2q.js → vue-ui-xy-canvas-DqnK_i0Q.js} +11 -11
- package/package.json +1 -1
- package/dist/index-Cww7pocd.cjs +0 -9
- package/dist/vue-ui-sparkhistogram-BN2N7qor.cjs +0 -1
- package/dist/vue-ui-sparkline-BmaYIS-1.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-hxwlugf0.cjs +0 -1
- package/dist/vue-ui-thermometer-DCv2Gvg0.cjs +0 -1
- package/dist/vue-ui-vertical-bar-C-liaL8N.cjs +0 -4
- package/dist/vue-ui-wheel-CIHLvNK5.cjs +0 -1
- package/dist/vue-ui-wheel-tsJlAaV1.js +0 -319
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Cww7pocd.cjs"),Se=require("./Title-vXH_7MPz.cjs"),ue=require("./usePrinter-DY6H-UkT.cjs"),H=require("./useResponsive-YQYQrAZ_.cjs"),$e=require("./vue-ui-accordion-D3UeWj9q.cjs"),Te=require("./DataTable-C1LMti1U.cjs"),Ne=require("./BaseIcon-BOR1UXkg.cjs"),ce=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ie=require("./useNestedProp-BzGIy5aD.cjs"),Pe=require("./PackageVersion-2gojTmrp.cjs"),Be=require("./Tooltip-C7eukp_Y.cjs"),Fe=require("./PenAndPaper-Bwxr_PKm.cjs"),ze=require("./useUserOptionState-BgepsfED.cjs"),Oe={"data-html2canvas-ignore":""},Ae={key:0,class:"reset-wrapper"},Ve={key:1,class:"reset-wrapper"},Ee={class:"mono-slicer"},Me=["min","max","value"],_e={__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(d,{emit:M}){e.useCssVars(b=>({"782b8172":c.value,"102109e6":$.value,"642212d7":y.value,"1f5369d4":d.selectColor,"22b98ab8":k.value}));const v=d,c=e.computed(()=>v.inputColor),k=e.computed(()=>v.background),y=e.computed(()=>`${v.selectColor}33`),$=e.computed(()=>v.borderColor),T=M;function p(){T("reset")}const B=e.computed(()=>{const b=v.max-v.min,m=0,C=(v.value-v.min)/b*100;return{left:`${m}%`,width:`${C-m}%`,background:v.selectColor}});return(b,m)=>(e.openBlock(),e.createElementBlock("div",Oe,[d.value!==d.source?(e.openBlock(),e.createElementBlock("div",Ae,[d.useResetSlot?e.renderSlot(b.$slots,"reset-action",{key:1,reset:p},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",onClick:p},[e.createVNode(Ne.default,{name:"refresh",stroke:d.textColor},null,8,["stroke"])]))])):(e.openBlock(),e.createElementBlock("div",Ve)),e.createElementVNode("div",Ee,[m[1]||(m[1]=e.createElementVNode("div",{class:"slider-track"},null,-1)),e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(B.value)},null,4),e.createElementVNode("input",{type:"range",min:d.min,max:d.max,value:Number(d.value),onInput:m[0]||(m[0]=C=>T("update:value",Number(C.target.value)))},null,40,Me)])]))}},Ie=ce._export_sfc(_e,[["__scopeId","data-v-b4e6aee9"]]),Re=["id"],qe=["xmlns","viewBox"],Ue=["width","height"],We=["transform"],De=["fill","font-weight","x","y","font-size","transform","onMouseover"],Ge={key:4,class:"vue-data-ui-watermark"},Le=["innerHTML"],je={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(d,{expose:M}){const{vue_ui_word_cloud:v}=s.useConfig(),c=d,k=e.computed({get(){return!!c.dataset&&c.dataset.length},set(o){return o}}),y=e.ref(typeof c.dataset=="string"?s.createWordCloudDatasetFromPlainText(c.dataset):c.dataset.map((o,a)=>({...o,value:s.checkNaN(o.value)}))),$=e.ref(s.createUid()),T=e.ref(0),p=e.ref(null),B=e.ref(null),b=e.ref(null),m=e.ref(0),C=e.ref(0),_=e.ref(!1),t=e.computed({get:()=>J(),set:o=>o}),{userOptionsVisible:I,setUserOptionsVisibility:X,keepUserOptionState:Y}=ze.useUserOptionState({config:t.value});function J(){const o=ie.useNestedProp({userConfig:c.config,defaultConfig:v});return o.theme?{...ie.useNestedProp({userConfig:s.themes.vue_ui_word_cloud[o.theme]||c.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}e.watch(()=>c.config,o=>{t.value=J(),I.value=!t.value.userOptions.showOnChartHover,Q(),m.value+=1,C.value+=1,R(),i.value.showTable=t.value.table.show,i.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const K=e.ref(null),w=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=H.throttle(()=>{const{width:o,height:a}=H.useResponsive({chart:p.value,title:t.value.style.chart.title.text?B.value:null,slicer:t.value.style.chart.zoom.show&&K.value,source:b.value});requestAnimationFrame(()=>{r.value.width=o,r.value.height=a,e.nextTick(U)})});e.watch(()=>w.value,()=>{ve()});const ve=H.debounce(()=>{U()},10);function R(){w.value=q.value}const F=e.ref(null);e.onMounted(()=>{Q(),R()});function Q(){s.objectIsEmpty(c.dataset)?s.error({componentName:"VueUiWordCloud",type:"dataset"}):y.value.forEach((o,a)=>{s.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{k.value=!1,s.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive&&(F.value=new ResizeObserver(de),F.value.observe(p.value.parentNode))}e.onBeforeUnmount(()=>{F.value&&F.value.disconnect()});const{isPrinting:Z,isImaging:ee,generatePdf:te,generateImage:oe}=ue.usePrinter({elementId:`wordCloud_${$.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud"}),i=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 me(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 pe(o,a,l){const u=[],n={x:-a/2,y:-l/2,width:a,height:l},h=0,f=0;return o.forEach(S=>{let L=!1;for(let E=0;E<Math.max(a,l)/2&&!L;E+=t.value.style.chart.words.packingWeight)for(let j=0;j<360&&!L;j+=t.value.style.chart.words.packingWeight){const se=j*Math.PI/180,be=h+E*Math.cos(se)-S.width/2,ke=f+E*Math.sin(se)-S.height/2,g={...S,x:be,y:ke},Ce=g.x>=n.x&&g.y>=n.y&&g.x+g.width<=n.x+n.width&&g.y+g.height<=n.y+n.height,we=u.some(xe=>me(g,xe));Ce&&!we&&(u.push(g),L=!0)}}),u}const N=e.ref([]);e.watch(()=>c.dataset,U,{immediate:!0});const q=e.computed(()=>Math.round(Math.min(...y.value.map(o=>o.value)))),le=e.computed(()=>Math.round(Math.max(...y.value.map(o=>o.value))));function U(){const o=[...y.value].filter(n=>n.value>=w.value).map(n=>n.value),a=Math.max(...o),l=Math.min(...o),u=[...y.value].filter(n=>n.value>=w.value).map((n,h)=>{let f=(n.value-l)/(a-l)*(r.value.maxFontSize-r.value.minFontSize)+r.value.minFontSize;f=isNaN(f)?r.value.minFontSize:f;const S=he(n.name,f);return{...n,id:s.createUid(),fontSize:f,width:S.width,height:S.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[h]||t.value.customPalette[h%t.value.customPalette.length]||s.palette[h]||s.palette[h%s.palette.length]:t.value.style.chart.words.color}});N.value=pe(u,r.value.width,r.value.height).sort((n,h)=>h.fontSize-n.fontSize)}const z=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=z.value.head.map((u,n)=>[[u.name],[z.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=s.createCsvContent(a);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const O=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=z.value.head.map((n,h)=>{const f=s.dataLabel({p:t.value.table.td.prefix,v:z.value.body[h],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},f]}),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}}),A=e.ref(!1);function fe(o){A.value=o,T.value+=1}function ge(){return N.value}function ne(){i.value.showTable=!i.value.showTable}function re(){i.value.showTooltip=!i.value.showTooltip}const V=e.ref(!1);function W(){V.value=!V.value}M({getData:ge,generateCsv:ae,generatePdf:te,generateImage:oe,toggleTable:ne,toggleTooltip:re,toggleAnnotator:W});const x=e.ref(null),P=e.ref(!1),D=e.ref(""),G=e.ref(null);function ye(o){if(!i.value.showTooltip)return;x.value=o.id,G.value={datapoint:o,config:t.value};const a=t.value.style.chart.tooltip.customFormat;if(P.value=!1,s.isFunction(a))try{const l=a({datapoint:o,config:t.value});typeof l=="string"&&(D.value=l,P.value=!0)}catch{console.warn("Custom format cannot be applied."),P.value=!1}if(!P.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>`;D.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_${$.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:W},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:B,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(Se._sfc_main,{key:`title_${m.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&&k.value&&(e.unref(Y)||e.unref(I))?(e.openBlock(),e.createBlock(ue.UserOptions,{ref:"details",key:`user_option_${T.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Z),isImaging:e.unref(ee),uid:$.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:A.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:i.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:W,style:e.normalizeStyle({visibility:e.unref(Y)?e.unref(I)?"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:u})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:u})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:u})),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),k.value?(e.openBlock(),e.createElementBlock("svg",{key:3,class:e.normalizeClass({"vue-data-ui-fullscreen--on":A.value,"vue-data-ui-fulscreen--off":!A.value}),xmlns:e.unref(s.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,Ue)):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,u)=>(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:u,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":x.value&&x.value===l.id&&i.value.showTooltip,"word-not-selected":x.value&&x.value!==l.id&&i.value.showTooltip}),"text-anchor":"middle","dominant-baseline":"central",onMouseover:n=>ye(l),onMouseleave:a[0]||(a[0]=n=>{x.value=null,_.value=!1}),style:e.normalizeStyle(`animation-delay:${u*t.value.animationDelayMs}ms !important;`)},e.toDisplayString(l.name),47,De))]))),256))],8,We),e.renderSlot(o.$slots,"svg",{svg:{height:r.value.height,width:r.value.width}},void 0,!0)],10,qe)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[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:i.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:D.value,isCustom:P.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...G.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&&q.value<le.value?(e.openBlock(),e.createBlock(Ie,{key:0,value:w.value,"onUpdate:value":a[1]||(a[1]=l=>w.value=l),min:q.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:R},{"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:b,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createBlock($e.default,{key:6,hideDetails:"",config:{open:i.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(Te.DataTable,{key:`table_${C.value}`,colNames:O.value.colNames,head:O.value.head,body:O.value.body,config:O.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=>i.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Le)]),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,Re))}},He=ce._export_sfc(je,[["__scopeId","data-v-083c217b"]]);exports.default=He;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-kZKcQZM_.cjs"),Se=require("./Title-BGiQdt7J.cjs"),ue=require("./usePrinter-DR42gTOS.cjs"),H=require("./useResponsive-YQYQrAZ_.cjs"),$e=require("./vue-ui-accordion-BfDu7hTY.cjs"),Te=require("./DataTable-Du7nJ0TM.cjs"),Ne=require("./BaseIcon-COe_H-UB.cjs"),ce=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ie=require("./useNestedProp-D4Jn2Oxr.cjs"),Pe=require("./PackageVersion-qeLvq6l8.cjs"),Be=require("./Tooltip-DSPKrQcQ.cjs"),Fe=require("./PenAndPaper-BYqaxOpk.cjs"),ze=require("./useUserOptionState-BgepsfED.cjs"),Oe={"data-html2canvas-ignore":""},Ae={key:0,class:"reset-wrapper"},Ve={key:1,class:"reset-wrapper"},Ee={class:"mono-slicer"},Me=["min","max","value"],_e={__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(d,{emit:M}){e.useCssVars(b=>({"782b8172":c.value,"102109e6":$.value,"642212d7":y.value,"1f5369d4":d.selectColor,"22b98ab8":k.value}));const v=d,c=e.computed(()=>v.inputColor),k=e.computed(()=>v.background),y=e.computed(()=>`${v.selectColor}33`),$=e.computed(()=>v.borderColor),T=M;function p(){T("reset")}const B=e.computed(()=>{const b=v.max-v.min,m=0,C=(v.value-v.min)/b*100;return{left:`${m}%`,width:`${C-m}%`,background:v.selectColor}});return(b,m)=>(e.openBlock(),e.createElementBlock("div",Oe,[d.value!==d.source?(e.openBlock(),e.createElementBlock("div",Ae,[d.useResetSlot?e.renderSlot(b.$slots,"reset-action",{key:1,reset:p},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",onClick:p},[e.createVNode(Ne.default,{name:"refresh",stroke:d.textColor},null,8,["stroke"])]))])):(e.openBlock(),e.createElementBlock("div",Ve)),e.createElementVNode("div",Ee,[m[1]||(m[1]=e.createElementVNode("div",{class:"slider-track"},null,-1)),e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(B.value)},null,4),e.createElementVNode("input",{type:"range",min:d.min,max:d.max,value:Number(d.value),onInput:m[0]||(m[0]=C=>T("update:value",Number(C.target.value)))},null,40,Me)])]))}},Ie=ce._export_sfc(_e,[["__scopeId","data-v-b4e6aee9"]]),Re=["id"],qe=["xmlns","viewBox"],Ue=["width","height"],We=["transform"],De=["fill","font-weight","x","y","font-size","transform","onMouseover"],Ge={key:4,class:"vue-data-ui-watermark"},Le=["innerHTML"],je={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(d,{expose:M}){const{vue_ui_word_cloud:v}=s.useConfig(),c=d,k=e.computed({get(){return!!c.dataset&&c.dataset.length},set(o){return o}}),y=e.ref(typeof c.dataset=="string"?s.createWordCloudDatasetFromPlainText(c.dataset):c.dataset.map((o,a)=>({...o,value:s.checkNaN(o.value)}))),$=e.ref(s.createUid()),T=e.ref(0),p=e.ref(null),B=e.ref(null),b=e.ref(null),m=e.ref(0),C=e.ref(0),_=e.ref(!1),t=e.computed({get:()=>J(),set:o=>o}),{userOptionsVisible:I,setUserOptionsVisibility:X,keepUserOptionState:Y}=ze.useUserOptionState({config:t.value});function J(){const o=ie.useNestedProp({userConfig:c.config,defaultConfig:v});return o.theme?{...ie.useNestedProp({userConfig:s.themes.vue_ui_word_cloud[o.theme]||c.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}e.watch(()=>c.config,o=>{t.value=J(),I.value=!t.value.userOptions.showOnChartHover,Q(),m.value+=1,C.value+=1,R(),i.value.showTable=t.value.table.show,i.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const K=e.ref(null),w=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=H.throttle(()=>{const{width:o,height:a}=H.useResponsive({chart:p.value,title:t.value.style.chart.title.text?B.value:null,slicer:t.value.style.chart.zoom.show&&K.value,source:b.value});requestAnimationFrame(()=>{r.value.width=o,r.value.height=a,e.nextTick(U)})});e.watch(()=>w.value,()=>{ve()});const ve=H.debounce(()=>{U()},10);function R(){w.value=q.value}const F=e.ref(null);e.onMounted(()=>{Q(),R()});function Q(){s.objectIsEmpty(c.dataset)?s.error({componentName:"VueUiWordCloud",type:"dataset"}):y.value.forEach((o,a)=>{s.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{k.value=!1,s.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive&&(F.value=new ResizeObserver(de),F.value.observe(p.value.parentNode))}e.onBeforeUnmount(()=>{F.value&&F.value.disconnect()});const{isPrinting:Z,isImaging:ee,generatePdf:te,generateImage:oe}=ue.usePrinter({elementId:`wordCloud_${$.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud"}),i=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 me(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 pe(o,a,l){const u=[],n={x:-a/2,y:-l/2,width:a,height:l},h=0,f=0;return o.forEach(S=>{let L=!1;for(let E=0;E<Math.max(a,l)/2&&!L;E+=t.value.style.chart.words.packingWeight)for(let j=0;j<360&&!L;j+=t.value.style.chart.words.packingWeight){const se=j*Math.PI/180,be=h+E*Math.cos(se)-S.width/2,ke=f+E*Math.sin(se)-S.height/2,g={...S,x:be,y:ke},Ce=g.x>=n.x&&g.y>=n.y&&g.x+g.width<=n.x+n.width&&g.y+g.height<=n.y+n.height,we=u.some(xe=>me(g,xe));Ce&&!we&&(u.push(g),L=!0)}}),u}const N=e.ref([]);e.watch(()=>c.dataset,U,{immediate:!0});const q=e.computed(()=>Math.round(Math.min(...y.value.map(o=>o.value)))),le=e.computed(()=>Math.round(Math.max(...y.value.map(o=>o.value))));function U(){const o=[...y.value].filter(n=>n.value>=w.value).map(n=>n.value),a=Math.max(...o),l=Math.min(...o),u=[...y.value].filter(n=>n.value>=w.value).map((n,h)=>{let f=(n.value-l)/(a-l)*(r.value.maxFontSize-r.value.minFontSize)+r.value.minFontSize;f=isNaN(f)?r.value.minFontSize:f;const S=he(n.name,f);return{...n,id:s.createUid(),fontSize:f,width:S.width,height:S.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[h]||t.value.customPalette[h%t.value.customPalette.length]||s.palette[h]||s.palette[h%s.palette.length]:t.value.style.chart.words.color}});N.value=pe(u,r.value.width,r.value.height).sort((n,h)=>h.fontSize-n.fontSize)}const z=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=z.value.head.map((u,n)=>[[u.name],[z.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=s.createCsvContent(a);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const O=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=z.value.head.map((n,h)=>{const f=s.dataLabel({p:t.value.table.td.prefix,v:z.value.body[h],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},f]}),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}}),A=e.ref(!1);function fe(o){A.value=o,T.value+=1}function ge(){return N.value}function ne(){i.value.showTable=!i.value.showTable}function re(){i.value.showTooltip=!i.value.showTooltip}const V=e.ref(!1);function W(){V.value=!V.value}M({getData:ge,generateCsv:ae,generatePdf:te,generateImage:oe,toggleTable:ne,toggleTooltip:re,toggleAnnotator:W});const x=e.ref(null),P=e.ref(!1),D=e.ref(""),G=e.ref(null);function ye(o){if(!i.value.showTooltip)return;x.value=o.id,G.value={datapoint:o,config:t.value};const a=t.value.style.chart.tooltip.customFormat;if(P.value=!1,s.isFunction(a))try{const l=a({datapoint:o,config:t.value});typeof l=="string"&&(D.value=l,P.value=!0)}catch{console.warn("Custom format cannot be applied."),P.value=!1}if(!P.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>`;D.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_${$.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:W},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:B,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(Se._sfc_main,{key:`title_${m.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&&k.value&&(e.unref(Y)||e.unref(I))?(e.openBlock(),e.createBlock(ue.UserOptions,{ref:"details",key:`user_option_${T.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Z),isImaging:e.unref(ee),uid:$.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:A.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:i.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:W,style:e.normalizeStyle({visibility:e.unref(Y)?e.unref(I)?"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:u})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:u})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:u})),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),k.value?(e.openBlock(),e.createElementBlock("svg",{key:3,class:e.normalizeClass({"vue-data-ui-fullscreen--on":A.value,"vue-data-ui-fulscreen--off":!A.value}),xmlns:e.unref(s.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,Ue)):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,u)=>(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:u,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":x.value&&x.value===l.id&&i.value.showTooltip,"word-not-selected":x.value&&x.value!==l.id&&i.value.showTooltip}),"text-anchor":"middle","dominant-baseline":"central",onMouseover:n=>ye(l),onMouseleave:a[0]||(a[0]=n=>{x.value=null,_.value=!1}),style:e.normalizeStyle(`animation-delay:${u*t.value.animationDelayMs}ms !important;`)},e.toDisplayString(l.name),47,De))]))),256))],8,We),e.renderSlot(o.$slots,"svg",{svg:{height:r.value.height,width:r.value.width}},void 0,!0)],10,qe)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[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:i.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:D.value,isCustom:P.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...G.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&&q.value<le.value?(e.openBlock(),e.createBlock(Ie,{key:0,value:w.value,"onUpdate:value":a[1]||(a[1]=l=>w.value=l),min:q.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:R},{"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:b,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createBlock($e.default,{key:6,hideDetails:"",config:{open:i.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(Te.DataTable,{key:`table_${C.value}`,colNames:O.value.colNames,head:O.value.head,body:O.value.body,config:O.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=>i.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Le)]),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,Re))}},He=ce._export_sfc(je,[["__scopeId","data-v-083c217b"]]);exports.default=He;
|