vue-data-ui 2.7.2 → 2.7.3
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-Cuf9zUpa.cjs → Arrow-CwCPcRDq.cjs} +1 -1
- package/dist/{Arrow-SOQeOwmT.js → Arrow-DZ9pNVTr.js} +1 -1
- package/dist/{BaseIcon-C0unoacb.cjs → BaseIcon-BQ6ScTsr.cjs} +1 -1
- package/dist/{BaseIcon-DqYzMisq.js → BaseIcon-CdxldTMn.js} +4 -3
- package/dist/{ColorPicker-DLNc3kpl.cjs → ColorPicker-D6mp4NrH.cjs} +1 -1
- package/dist/{ColorPicker-DyOTLjAA.js → ColorPicker-DF9jbKW-.js} +3 -3
- package/dist/{DataTable-ByOfBGEi.cjs → DataTable-4qcYZrGF.cjs} +1 -1
- package/dist/{DataTable-C_28ZqiP.js → DataTable-BFNGlApm.js} +2 -2
- package/dist/{Legend-CmKaL7xe.js → Legend-B4eIw732.js} +2 -2
- package/dist/{Legend-mrAy7yUC.cjs → Legend-D8qnv865.cjs} +1 -1
- package/dist/{PackageVersion-39l3KkzC.js → PackageVersion-BZ8-AoE_.js} +1 -1
- package/dist/{PackageVersion-By81XV8X.cjs → PackageVersion-sCi6-fwm.cjs} +1 -1
- package/dist/PenAndPaper--_AE7XzJ.js +374 -0
- package/dist/PenAndPaper-DXiYR_ED.cjs +1 -0
- package/dist/{Shape-iIO-95sh.js → Shape-BQd108EW.js} +1 -1
- package/dist/{Shape-x7U3IhoM.cjs → Shape-BjIO2Dd_.cjs} +1 -1
- package/dist/{Slicer-Ct66sqV1.cjs → Slicer-B10GL6W6.cjs} +1 -1
- package/dist/{Slicer-C49MotZz.js → Slicer-BtX8p8CI.js} +2 -2
- package/dist/{Title-BgVFZwZZ.cjs → Title-DWFudmma.cjs} +1 -1
- package/dist/{Title-Co3F59jq.js → Title-ND4kMErl.js} +1 -1
- package/dist/{Tooltip-Cr89wMKa.js → Tooltip-BWe5TPIJ.js} +1 -1
- package/dist/{Tooltip-B8E9uCVm.cjs → Tooltip-DPqJ5wwr.cjs} +1 -1
- package/dist/{dom-to-png-D9eujpXB.cjs → dom-to-png-DBOO7SYL.cjs} +1 -1
- package/dist/{dom-to-png-DtBlqZMR.js → dom-to-png-DOe_fDQ9.js} +1 -1
- package/dist/{img-DgRUFehB.cjs → img-BTldOAS7.cjs} +1 -1
- package/dist/{img-DQDP5JIH.js → img-K80BXoXO.js} +1 -1
- package/dist/{index-gC66Se26.js → index-B_dU_4T8.js} +1 -1
- package/dist/{index-BeJeDy5m.cjs → index-HGCbG8YK.cjs} +1 -1
- package/dist/{pdf-lJiGVhtL.js → pdf-BKSh5KBc.js} +1 -1
- package/dist/{pdf-Bu1ahAX2.cjs → pdf-IEdK_h03.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +2 -1
- package/dist/types/vue-data-ui.d.ts +2 -1
- package/dist/{useNestedProp-BusTOV-6.js → useNestedProp-7s4Pw7x0.js} +1 -1
- package/dist/{useNestedProp-CF-iHhIC.cjs → useNestedProp-O_JTsxQj.cjs} +1 -1
- package/dist/{usePrinter-Bz_kd3vb.cjs → usePrinter-B2PvJuo8.cjs} +1 -1
- package/dist/{usePrinter-KMFl0n0s.js → usePrinter-CLObTJ4a.js} +3 -3
- package/dist/{vue-data-ui-BApY_erH.js → vue-data-ui-Dvy8nai9.js} +60 -60
- package/dist/{vue-data-ui-Bak-lr4I.cjs → vue-data-ui-NmIWCiVH.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-CUG7pspB.cjs +19 -0
- package/dist/{vue-ui-3d-bar-BWjU0K3_.js → vue-ui-3d-bar-Cf-VSMqf.js} +30 -30
- package/dist/{vue-ui-accordion-j2beIma_.js → vue-ui-accordion-C5dj9Voo.js} +3 -3
- package/dist/{vue-ui-accordion-CZBJSHT_.cjs → vue-ui-accordion-CSuxLH7L.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-Cmw4WVB4.js → vue-ui-age-pyramid-BYHyKvk4.js} +22 -22
- package/dist/vue-ui-age-pyramid-qT6V3Y8O.cjs +1 -0
- package/dist/{vue-ui-annotator-BVv5XkoE.cjs → vue-ui-annotator-KzRsqSTn.cjs} +1 -1
- package/dist/{vue-ui-annotator-CKmqZjUD.js → vue-ui-annotator-clyvpxxd.js} +2 -2
- package/dist/{vue-ui-bullet-U_yJjO0m.js → vue-ui-bullet-CJL4NBSU.js} +36 -36
- package/dist/vue-ui-bullet-DMuibl8n.cjs +34 -0
- package/dist/{vue-ui-candlestick-DhdlFIQE.js → vue-ui-candlestick-1jHdWerO.js} +11 -11
- package/dist/vue-ui-candlestick-CMsFiP9C.cjs +2 -0
- package/dist/{vue-ui-carousel-table-Ej7qzKkp.js → vue-ui-carousel-table-BCVjpGff.js} +4 -4
- package/dist/{vue-ui-carousel-table-BhC5cEe3.cjs → vue-ui-carousel-table-CtGRQBIN.cjs} +1 -1
- package/dist/{vue-ui-chestnut-BzNHXzDj.cjs → vue-ui-chestnut-CEQFlk-j.cjs} +1 -1
- package/dist/{vue-ui-chestnut-L0bS5jtX.js → vue-ui-chestnut-YX5q5qpY.js} +32 -32
- package/dist/{vue-ui-circle-pack-DwCzeO3L.js → vue-ui-circle-pack-DFhj3arJ.js} +44 -44
- package/dist/vue-ui-circle-pack-cXdePcYh.cjs +1 -0
- package/dist/{vue-ui-cursor-0mZP5nBc.cjs → vue-ui-cursor-DGtZLxpF.cjs} +1 -1
- package/dist/{vue-ui-cursor-DwHdXwLS.js → vue-ui-cursor-DwDTg8Za.js} +2 -2
- package/dist/{vue-ui-dashboard-DILmOchy.js → vue-ui-dashboard-DQ4-1OKY.js} +3 -3
- package/dist/{vue-ui-dashboard-CegApY8_.cjs → vue-ui-dashboard-etx_lWpJ.cjs} +1 -1
- package/dist/{vue-ui-digits-Dbwzk-sl.js → vue-ui-digits-Crcwygqg.js} +2 -2
- package/dist/{vue-ui-digits-me8Nky0A.cjs → vue-ui-digits-lRbvyU_i.cjs} +1 -1
- package/dist/{vue-ui-donut-DwE-iZSV.js → vue-ui-donut-C2h_qoIM.js} +12 -12
- package/dist/vue-ui-donut-DQeJn_KK.cjs +1 -0
- package/dist/vue-ui-donut-evolution-Dbg5HueS.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-DhFABvEv.js → vue-ui-donut-evolution-DbzqkGBx.js} +69 -69
- package/dist/{vue-ui-dumbbell-Cqq4iV6-.js → vue-ui-dumbbell-BVuQjSso.js} +52 -52
- package/dist/{vue-ui-dumbbell-CL15d-aQ.cjs → vue-ui-dumbbell-BaYSfxY1.cjs} +1 -1
- package/dist/{vue-ui-flow-CU-orj9I.js → vue-ui-flow-2FOH_Mxn.js} +75 -75
- package/dist/vue-ui-flow-B8NKKaa2.cjs +1 -0
- package/dist/{vue-ui-funnel-DQmQmdNV.js → vue-ui-funnel-CYt4xsc4.js} +28 -28
- package/dist/vue-ui-funnel-Cgm1VcJC.cjs +1 -0
- package/dist/{vue-ui-galaxy-nqyCbQ9j.js → vue-ui-galaxy-CmmTED3N.js} +39 -39
- package/dist/vue-ui-galaxy-D8oPaBdc.cjs +1 -0
- package/dist/vue-ui-gauge-Ushp2qER.cjs +1 -0
- package/dist/{vue-ui-gauge-BV3CJfqe.js → vue-ui-gauge-vlhW2o0y.js} +26 -26
- package/dist/{vue-ui-gizmo-CNRAH2zT.cjs → vue-ui-gizmo-B16t4cjE.cjs} +1 -1
- package/dist/{vue-ui-gizmo-CJwSAsxs.js → vue-ui-gizmo-DtWADzHM.js} +3 -3
- package/dist/{vue-ui-heatmap-B1s7KejC.js → vue-ui-heatmap-BcNWrSYu.js} +10 -10
- package/dist/vue-ui-heatmap-PVrUXZ6f.cjs +1 -0
- package/dist/vue-ui-history-plot-D9hGmpzL.cjs +1 -0
- package/dist/{vue-ui-history-plot-z_KFt5z_.js → vue-ui-history-plot-aqwCckl3.js} +35 -35
- package/dist/{vue-ui-kpi-DabR5K70.js → vue-ui-kpi-fIEea6oo.js} +3 -3
- package/dist/{vue-ui-kpi-FaGp6_XP.cjs → vue-ui-kpi-zRnAot1s.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-_plxZxma.cjs → vue-ui-mini-loader-0TKahM6o.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-w-BmywLJ.js → vue-ui-mini-loader-CnequKa7.js} +2 -2
- package/dist/{vue-ui-molecule-3ClCLk7L.cjs → vue-ui-molecule-C7qRnQk-.cjs} +1 -1
- package/dist/{vue-ui-molecule-aiWG--to.js → vue-ui-molecule-bHqvHzsr.js} +45 -45
- package/dist/vue-ui-mood-radar-BGHGOC3W.cjs +1 -0
- package/dist/{vue-ui-mood-radar-DwxCn06q.js → vue-ui-mood-radar-BLLnwnLw.js} +40 -40
- package/dist/{vue-ui-nested-donuts-ONgAaLY-.js → vue-ui-nested-donuts-C5mqI9Vf.js} +65 -65
- package/dist/vue-ui-nested-donuts-r9LWv_9T.cjs +17 -0
- package/dist/vue-ui-onion-CKJJIQO8.cjs +5 -0
- package/dist/{vue-ui-onion-DjoQuBo8.js → vue-ui-onion-DGU0vHXZ.js} +75 -75
- package/dist/{vue-ui-parallel-coordinate-plot-DWGVzaHE.js → vue-ui-parallel-coordinate-plot-B4tVo343.js} +38 -38
- package/dist/vue-ui-parallel-coordinate-plot-CTF--y5O.cjs +8 -0
- package/dist/{vue-ui-quadrant-CgiD9c7i.js → vue-ui-quadrant-CDZspHBg.js} +54 -54
- package/dist/vue-ui-quadrant-De8bmwz_.cjs +1 -0
- package/dist/vue-ui-quick-chart-Bi7Vdl9I.cjs +15 -0
- package/dist/{vue-ui-quick-chart-5NiRxtpD.js → vue-ui-quick-chart-baWAo-Ln.js} +9 -9
- package/dist/{vue-ui-radar-CfKAy0nI.js → vue-ui-radar-CG8tGSHg.js} +55 -55
- package/dist/vue-ui-radar-DAxiwdD4.cjs +1 -0
- package/dist/{vue-ui-rating-yiM_5H0W.cjs → vue-ui-rating-Bm6BESO1.cjs} +1 -1
- package/dist/{vue-ui-rating-CbZvsZNv.js → vue-ui-rating-CcMWLaSP.js} +2 -2
- package/dist/{vue-ui-relation-circle-RRK2jhHr.js → vue-ui-relation-circle-D4vD3HD_.js} +7 -7
- package/dist/vue-ui-relation-circle-rM2pEsYK.cjs +1 -0
- package/dist/vue-ui-rings-Mt51bBc5.cjs +2 -0
- package/dist/{vue-ui-rings-CiMKMEpp.js → vue-ui-rings-R91Q3vZF.js} +62 -62
- package/dist/{vue-ui-scatter-9PFXuvoo.js → vue-ui-scatter-BKY7zeC_.js} +44 -44
- package/dist/vue-ui-scatter-COs46vAF.cjs +1 -0
- package/dist/{vue-ui-skeleton-KW-jcPRN.cjs → vue-ui-skeleton-BBWwBSGZ.cjs} +1 -1
- package/dist/{vue-ui-skeleton-7Zfds6H1.js → vue-ui-skeleton-CTZKsfWs.js} +3 -3
- package/dist/{vue-ui-smiley-D0jhMBUh.js → vue-ui-smiley-3XabGcpa.js} +2 -2
- package/dist/{vue-ui-smiley-BNQlshyY.cjs → vue-ui-smiley-CZ2XNWEt.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-CLm12POW.cjs → vue-ui-spark-trend-CZnUiwhV.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-D8nDY0fS.js → vue-ui-spark-trend-Dd_5kNG9.js} +5 -5
- package/dist/{vue-ui-sparkbar-ChEbpWYC.cjs → vue-ui-sparkbar-CZJ8RFMM.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-wKlwMCph.js → vue-ui-sparkbar-DT_G3f_6.js} +4 -4
- package/dist/{vue-ui-sparkgauge-CvhIe_mP.js → vue-ui-sparkgauge-CoGcwj8-.js} +4 -4
- package/dist/{vue-ui-sparkgauge-DG824sGI.cjs → vue-ui-sparkgauge-Cra2_GdA.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-B8k8a538.cjs → vue-ui-sparkhistogram-ClJhce64.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-CVmbTFTc.js → vue-ui-sparkhistogram-ZI-zkp6j.js} +5 -5
- package/dist/{vue-ui-sparkline-CtqAbSzZ.js → vue-ui-sparkline-C4HvM0A7.js} +4 -4
- package/dist/{vue-ui-sparkline-7wnWuXDQ.cjs → vue-ui-sparkline-Cehnojts.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-57SONMGP.cjs → vue-ui-sparkstackbar-B6su4lbU.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DfwEeUC5.js → vue-ui-sparkstackbar-DbXifSgX.js} +5 -5
- package/dist/vue-ui-stackbar-Dxjx916g.cjs +6 -0
- package/dist/{vue-ui-stackbar-CGSVPiPx.js → vue-ui-stackbar-bBQdWmxo.js} +86 -86
- package/dist/{vue-ui-strip-plot-fJFkn8_0.js → vue-ui-strip-plot-BaAUPB0O.js} +36 -36
- package/dist/vue-ui-strip-plot-D3Mc4jJS.cjs +1 -0
- package/dist/{vue-ui-table-Das3959J.cjs → vue-ui-table-CO12Arh5.cjs} +1 -1
- package/dist/{vue-ui-table-CliL2Wsp.js → vue-ui-table-DyjampQ2.js} +1 -1
- package/dist/{vue-ui-table-heatmap-C28ozf2S.cjs → vue-ui-table-heatmap-BrXBITN7.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-ZsJMMGpG.js → vue-ui-table-heatmap-DC3LbLR1.js} +4 -4
- package/dist/{vue-ui-table-sparkline-0i9FAXug.cjs → vue-ui-table-sparkline-C-L8YXVO.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-CrQNShdH.js → vue-ui-table-sparkline-MCUi0UPR.js} +5 -5
- package/dist/{vue-ui-thermometer-BaGL6WSb.js → vue-ui-thermometer-0Jw0Kc3K.js} +50 -50
- package/dist/vue-ui-thermometer-BbAmbpxI.cjs +1 -0
- package/dist/{vue-ui-timer-CFtgJ_Vi.cjs → vue-ui-timer-CgcO44Ga.cjs} +1 -1
- package/dist/{vue-ui-timer-Nk94fV-n.js → vue-ui-timer-D43Y73z-.js} +5 -5
- package/dist/vue-ui-tiremarks-B7GobiRR.cjs +1 -0
- package/dist/{vue-ui-tiremarks-zYgdq_99.js → vue-ui-tiremarks-C2z7LZOy.js} +25 -25
- package/dist/vue-ui-treemap-YuZUqTkv.cjs +1 -0
- package/dist/{vue-ui-treemap-CAxPcxn-.js → vue-ui-treemap-t2jSZWbw.js} +12 -12
- package/dist/{vue-ui-vertical-bar-Di3FBkwJ.js → vue-ui-vertical-bar-CXbzdSDN.js} +80 -80
- package/dist/vue-ui-vertical-bar-RH9oo9ao.cjs +4 -0
- package/dist/vue-ui-waffle-C6PA3aJK.cjs +1 -0
- package/dist/{vue-ui-waffle-DBJAQsEf.js → vue-ui-waffle-Z9KsaCxx.js} +45 -45
- package/dist/{vue-ui-wheel-BTZEr2Vs.js → vue-ui-wheel-BbBHPjUa.js} +27 -27
- package/dist/vue-ui-wheel-BmWfP7V3.cjs +1 -0
- package/dist/{vue-ui-word-cloud-DBCVUkLM.js → vue-ui-word-cloud-CUi3fEZc.js} +72 -72
- package/dist/{vue-ui-word-cloud-BEaRWIu-.cjs → vue-ui-word-cloud-DysEgxAX.cjs} +1 -1
- package/dist/{vue-ui-xy-DbN93Pcf.cjs → vue-ui-xy-B7Q6HDzu.cjs} +2 -2
- package/dist/{vue-ui-xy-aKaGgYGL.js → vue-ui-xy-BWN8izeD.js} +16 -16
- package/dist/vue-ui-xy-canvas-DZB78JsG.cjs +9 -0
- package/dist/vue-ui-xy-canvas-DfhloBZx.js +1672 -0
- package/package.json +1 -1
- package/dist/PenAndPaper-CmcfpltX.js +0 -243
- package/dist/PenAndPaper-DNbX5hR8.cjs +0 -1
- package/dist/vue-ui-3d-bar-CmbTiJVx.cjs +0 -19
- package/dist/vue-ui-age-pyramid-Sv-HbbDJ.cjs +0 -1
- package/dist/vue-ui-bullet-vcmTY4AX.cjs +0 -34
- package/dist/vue-ui-candlestick-DQT-8PRz.cjs +0 -2
- package/dist/vue-ui-circle-pack-CVLJs0XP.cjs +0 -1
- package/dist/vue-ui-donut-FoRYusUX.cjs +0 -1
- package/dist/vue-ui-donut-evolution-BIK2yfIJ.cjs +0 -1
- package/dist/vue-ui-flow-N825fjRf.cjs +0 -1
- package/dist/vue-ui-funnel-B6XMYl89.cjs +0 -1
- package/dist/vue-ui-galaxy-p-sbDnSY.cjs +0 -1
- package/dist/vue-ui-gauge-DsZFk8T_.cjs +0 -1
- package/dist/vue-ui-heatmap-VXgeMOwT.cjs +0 -1
- package/dist/vue-ui-history-plot-JmeGiR--.cjs +0 -1
- package/dist/vue-ui-mood-radar-CO5sPVVG.cjs +0 -1
- package/dist/vue-ui-nested-donuts-D0nALasd.cjs +0 -17
- package/dist/vue-ui-onion-CBqx4q4k.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-uNCmnSvz.cjs +0 -8
- package/dist/vue-ui-quadrant-BOkyMgCm.cjs +0 -1
- package/dist/vue-ui-quick-chart-BRp_bNso.cjs +0 -15
- package/dist/vue-ui-radar-BpicgiWF.cjs +0 -1
- package/dist/vue-ui-relation-circle-Dg6rdyGP.cjs +0 -1
- package/dist/vue-ui-rings-A49lyv-J.cjs +0 -2
- package/dist/vue-ui-scatter-C_jHsy8M.cjs +0 -1
- package/dist/vue-ui-stackbar--0FZ_eBi.cjs +0 -6
- package/dist/vue-ui-strip-plot-C_ggDAQ-.cjs +0 -1
- package/dist/vue-ui-thermometer-h0rymM2v.cjs +0 -1
- package/dist/vue-ui-tiremarks-Cj8-XGcp.cjs +0 -1
- package/dist/vue-ui-treemap-CybL6mVf.cjs +0 -1
- package/dist/vue-ui-vertical-bar-D4IkwvAB.cjs +0 -4
- package/dist/vue-ui-waffle-7otLUrER.cjs +0 -1
- package/dist/vue-ui-wheel-BUJXtmeP.cjs +0 -1
- package/dist/vue-ui-xy-canvas-CF_lqLg-.cjs +0 -9
- package/dist/vue-ui-xy-canvas-CVQ__d4u.js +0 -1500
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-BeJeDy5m.cjs"),F=require("./useNestedProp-CF-iHhIC.cjs"),A=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),R={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},j={key:0,style:{position:"relative"}},O={key:0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}},X={key:1,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}},I=["src","height","width"],Y=["xmlns","height","width"],G=["id"],P=["stop-color"],U=["stop-color"],q=["points","fill","stroke","stroke-width"],H=["src","alt","height","width","id"],K=["xmlns","viewBox","height","id"],T=["id"],W=["stop-color"],J=["stop-color"],Q=["points","fill","stroke"],Z=["xmlns","height"],ee=["onClick","onMouseenter","onFocus","onKeyup"],te=["onMouseenter","onFocus"],le={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(S,{expose:_,emit:z}){const{vue_ui_rating:w}=a.useConfig(),i=S,v=e.ref(a.createUid()),g=e.ref(!1),r=e.ref(void 0),y=e.ref(void 0),p=e.ref([]),B=e.useSlots();e.onMounted(()=>{B["chart-background"]&&console.warn("VueUiRating does not support the #chart-background slot.")});const V=z,t=e.computed({get:()=>m(),set:o=>o});function m(){return F.useNestedProp({userConfig:i.config,defaultConfig:w})}e.watch(()=>i.config,o=>{t.value=m(),k()},{deep:!0});const N=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)?E(i.dataset.rating):i.dataset.rating),C=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)),u=e.ref(N.value),h=e.computed(()=>t.value.type==="image"),c=e.computed(()=>t.value.readonly);function E(o){let n=0,l=0;for(const s in o){const D=parseInt(s),x=o[s];n+=D*x,l+=x}if(l===0)return 0;const d=n/l;return Math.min(t.value.to,Math.max(t.value.from,d))}e.onMounted(()=>{k()});function k(){(!Object.hasOwn(i.dataset,"rating")||a.objectIsEmpty(i.dataset))&&a.error({componentName:"VueUiRating",type:"datasetAttribute",property:"rating"}),p.value=[];for(let o=t.value.from;o<=t.value.to;o+=1)p.value.push(o)}function f(o,n=!1){return o>r.value||c.value?n?t.value.style.image.inactiveOpacity:t.value.style.star.inactiveColor:n?1:t.value.style.star.useGradient?`url(#star_gradient_under_${v.value})`:t.value.style.star.activeColor}function $(o,n=!1){const l=u.value-o,d=n?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*d;default:return l*d}}function b(o){c.value||(u.value=o,V("rate",o))}function L(){return u.value}function M(o=!0){c.value=o}return _({getData:L,toggleReadonly:M}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:n[4]||(n[4]=l=>g.value=!0),onMouseleave:n[5]||(n[5]=l=>{g.value=!1,r.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",R,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:e.normalizeStyle(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(l,d)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:e.normalizeStyle(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)},[o.$slots["layer-under"]||o.$slots["layer-above"]?(e.openBlock(),e.createElementBlock("div",j,[o.$slots["layer-under"]?(e.openBlock(),e.createElementBlock("div",O,[e.renderSlot(o.$slots,"layer-under",e.mergeProps({ref_for:!0},{value:l,size:t.value.style.itemSize,hoveredValue:r.value,focusedValue:y.value}),void 0,!0)])):e.createCommentVNode("",!0),o.$slots["layer-above"]?(e.openBlock(),e.createElementBlock("div",X,[e.renderSlot(o.$slots,"layer-above",e.mergeProps({ref_for:!0},{value:l,size:t.value.style.itemSize,hoveredValue:r.value,focusedValue:y.value}),void 0,!0)])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[h.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.value.style.image.src,height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(r.value)?t.value.style.image.inactiveOpacity:f(l,!0)}`)},null,12,I)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,P),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,U)],8,G)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(r.value)?t.value.style.star.inactiveColor:f(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:r.value?f(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,q)],8,Y)),h.value?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.style.image.src,alt:`${t.value.style.image.alt} ${l}`,height:t.value.style.itemSize,width:t.value.style.itemSize,id:`active_${v.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${$(d,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,H)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${$(d)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${v.value}_${l}`,style:{position:"absolute",top:"0",left:"0"}},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,W),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,J)],8,T)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:t.value.style.star.useGradient?`url(#star_gradient_over_${v.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,Q)],8,K))],64)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;${c.value?"":"cursor:pointer"}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:s=>b(l),onMouseenter:s=>r.value=l,onMouseleave:n[0]||(n[0]=s=>r.value=void 0),onFocus:s=>y.value=l,onBlur:n[1]||(n[1]=s=>y.value=void 0),tabindex:"0",onKeyup:e.withKeys(s=>b(l),["enter"])},null,40,ee)),c.value?(e.openBlock(),e.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:s=>r.value=l,onMouseleave:n[2]||(n[2]=s=>r.value=void 0),onFocus:s=>y.value=l,onBlur:n[3]||(n[3]=s=>y.value=void 0)},null,40,te)):e.createCommentVNode("",!0)],12,Z)),t.value.style.tooltip.show&&C.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${r.value===l?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(l)+":",5),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[l],e.unref(a.dataLabel)({v:i.dataset.rating[l],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0)],4))),256)),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],36))}},oe=A._export_sfc(le,[["__scopeId","data-v-e9ed619f"]]);exports.default=oe;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-HGCbG8YK.cjs"),F=require("./useNestedProp-O_JTsxQj.cjs"),A=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),R={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},j={key:0,style:{position:"relative"}},O={key:0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}},X={key:1,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}},I=["src","height","width"],Y=["xmlns","height","width"],G=["id"],P=["stop-color"],U=["stop-color"],q=["points","fill","stroke","stroke-width"],H=["src","alt","height","width","id"],K=["xmlns","viewBox","height","id"],T=["id"],W=["stop-color"],J=["stop-color"],Q=["points","fill","stroke"],Z=["xmlns","height"],ee=["onClick","onMouseenter","onFocus","onKeyup"],te=["onMouseenter","onFocus"],le={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(S,{expose:_,emit:z}){const{vue_ui_rating:w}=a.useConfig(),i=S,v=e.ref(a.createUid()),g=e.ref(!1),r=e.ref(void 0),y=e.ref(void 0),p=e.ref([]),B=e.useSlots();e.onMounted(()=>{B["chart-background"]&&console.warn("VueUiRating does not support the #chart-background slot.")});const V=z,t=e.computed({get:()=>m(),set:o=>o});function m(){return F.useNestedProp({userConfig:i.config,defaultConfig:w})}e.watch(()=>i.config,o=>{t.value=m(),k()},{deep:!0});const N=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)?E(i.dataset.rating):i.dataset.rating),C=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)),u=e.ref(N.value),h=e.computed(()=>t.value.type==="image"),c=e.computed(()=>t.value.readonly);function E(o){let n=0,l=0;for(const s in o){const D=parseInt(s),x=o[s];n+=D*x,l+=x}if(l===0)return 0;const d=n/l;return Math.min(t.value.to,Math.max(t.value.from,d))}e.onMounted(()=>{k()});function k(){(!Object.hasOwn(i.dataset,"rating")||a.objectIsEmpty(i.dataset))&&a.error({componentName:"VueUiRating",type:"datasetAttribute",property:"rating"}),p.value=[];for(let o=t.value.from;o<=t.value.to;o+=1)p.value.push(o)}function f(o,n=!1){return o>r.value||c.value?n?t.value.style.image.inactiveOpacity:t.value.style.star.inactiveColor:n?1:t.value.style.star.useGradient?`url(#star_gradient_under_${v.value})`:t.value.style.star.activeColor}function $(o,n=!1){const l=u.value-o,d=n?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*d;default:return l*d}}function b(o){c.value||(u.value=o,V("rate",o))}function L(){return u.value}function M(o=!0){c.value=o}return _({getData:L,toggleReadonly:M}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:n[4]||(n[4]=l=>g.value=!0),onMouseleave:n[5]||(n[5]=l=>{g.value=!1,r.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",R,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:e.normalizeStyle(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(l,d)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:e.normalizeStyle(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)},[o.$slots["layer-under"]||o.$slots["layer-above"]?(e.openBlock(),e.createElementBlock("div",j,[o.$slots["layer-under"]?(e.openBlock(),e.createElementBlock("div",O,[e.renderSlot(o.$slots,"layer-under",e.mergeProps({ref_for:!0},{value:l,size:t.value.style.itemSize,hoveredValue:r.value,focusedValue:y.value}),void 0,!0)])):e.createCommentVNode("",!0),o.$slots["layer-above"]?(e.openBlock(),e.createElementBlock("div",X,[e.renderSlot(o.$slots,"layer-above",e.mergeProps({ref_for:!0},{value:l,size:t.value.style.itemSize,hoveredValue:r.value,focusedValue:y.value}),void 0,!0)])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[h.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.value.style.image.src,height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(r.value)?t.value.style.image.inactiveOpacity:f(l,!0)}`)},null,12,I)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,P),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,U)],8,G)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(r.value)?t.value.style.star.inactiveColor:f(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:r.value?f(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,q)],8,Y)),h.value?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.style.image.src,alt:`${t.value.style.image.alt} ${l}`,height:t.value.style.itemSize,width:t.value.style.itemSize,id:`active_${v.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${$(d,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,H)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${$(d)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${v.value}_${l}`,style:{position:"absolute",top:"0",left:"0"}},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,W),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,J)],8,T)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:t.value.style.star.useGradient?`url(#star_gradient_over_${v.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,Q)],8,K))],64)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;${c.value?"":"cursor:pointer"}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:s=>b(l),onMouseenter:s=>r.value=l,onMouseleave:n[0]||(n[0]=s=>r.value=void 0),onFocus:s=>y.value=l,onBlur:n[1]||(n[1]=s=>y.value=void 0),tabindex:"0",onKeyup:e.withKeys(s=>b(l),["enter"])},null,40,ee)),c.value?(e.openBlock(),e.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:s=>r.value=l,onMouseleave:n[2]||(n[2]=s=>r.value=void 0),onFocus:s=>y.value=l,onBlur:n[3]||(n[3]=s=>y.value=void 0)},null,40,te)):e.createCommentVNode("",!0)],12,Z)),t.value.style.tooltip.show&&C.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${r.value===l?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(l)+":",5),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[l],e.unref(a.dataLabel)({v:i.dataset.rating[l],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0)],4))),256)),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],36))}},oe=A._export_sfc(le,[["__scopeId","data-v-e9ed619f"]]);exports.default=oe;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as $, useSlots as J, onMounted as R, computed as x, watch as Q, createElementBlock as o, openBlock as a, normalizeStyle as s, createCommentVNode as p, createElementVNode as r, toDisplayString as f, unref as n, Fragment as B, renderList as Z, renderSlot as j, mergeProps as O, withKeys as ee } from "vue";
|
|
2
|
-
import { u as te, c as le, o as oe, e as ae, i as b, f as _, X as z, w as X, Y } from "./index-
|
|
3
|
-
import { u as ie } from "./useNestedProp-
|
|
2
|
+
import { u as te, c as le, o as oe, e as ae, i as b, f as _, X as z, w as X, Y } from "./index-B_dU_4T8.js";
|
|
3
|
+
import { u as ie } from "./useNestedProp-7s4Pw7x0.js";
|
|
4
4
|
import { _ as se } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const ne = {
|
|
6
6
|
key: 0,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useCssVars as Ve, computed as y, ref as o, watch as We, onMounted as De, onBeforeUnmount as Xe, createElementBlock as a, openBlock as i, unref as r, normalizeStyle as C, createBlock as F, createCommentVNode as v, createSlots as Ye, withCtx as z, renderSlot as h, normalizeProps as B, guardReactiveProps as R, normalizeClass as D, createVNode as qe, createElementVNode as He, Fragment as P, renderList as L, mergeProps as me, toDisplayString as E } from "vue";
|
|
2
|
-
import { u as Je, c as Ke, t as Qe, p as ke, a as Ze, b as et, o as tt, e as pe, g as st, X as lt, G as we, i as X, f as Y, F as q } from "./index-
|
|
2
|
+
import { u as Je, c as Ke, t as Qe, p as ke, a as Ze, b as et, o as tt, e as pe, g as st, X as lt, G as we, i as X, f as Y, F as q } from "./index-B_dU_4T8.js";
|
|
3
3
|
import { t as it, u as at } from "./useResponsive-Cw4oZ8sQ.js";
|
|
4
|
-
import { _ as nt } from "./Title-
|
|
5
|
-
import { u as rt, U as ut } from "./usePrinter-
|
|
6
|
-
import ot from "./vue-ui-skeleton-
|
|
7
|
-
import { u as xe } from "./useNestedProp-
|
|
8
|
-
import { _ as ct } from "./PackageVersion-
|
|
9
|
-
import {
|
|
4
|
+
import { _ as nt } from "./Title-ND4kMErl.js";
|
|
5
|
+
import { u as rt, U as ut } from "./usePrinter-CLObTJ4a.js";
|
|
6
|
+
import ot from "./vue-ui-skeleton-CTZKsfWs.js";
|
|
7
|
+
import { u as xe } from "./useNestedProp-7s4Pw7x0.js";
|
|
8
|
+
import { _ as ct } from "./PackageVersion-BZ8-AoE_.js";
|
|
9
|
+
import { _ as dt } from "./PenAndPaper--_AE7XzJ.js";
|
|
10
10
|
import { u as vt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
11
11
|
import { u as ft } from "./useChartAccessibility-BWojgys7.js";
|
|
12
12
|
import { _ as yt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-HGCbG8YK.cjs"),ee=require("./useResponsive-DQmBAoBf.cjs"),Be=require("./Title-DWFudmma.cjs"),te=require("./usePrinter-B2PvJuo8.cjs"),$e=require("./vue-ui-skeleton-BBWwBSGZ.cjs"),le=require("./useNestedProp-O_JTsxQj.cjs"),_e=require("./PackageVersion-sCi6-fwm.cjs"),Pe=require("./PenAndPaper-DXiYR_ED.cjs"),Le=require("./useUserOptionState-BgepsfED.cjs"),ze=require("./useChartAccessibility-Cm7nkzTG.cjs"),Oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=["id"],Ee=["xmlns","viewBox"],Ae=["width","height"],Ne=["cx","cy","r","stroke","stroke-width"],Ie={key:1},Ve=["stroke","d","stroke-width"],Fe={style:{"pointer-events":"none"}},Me=["cx","cy","fill","r","stroke"],Re=["x","y","fill","font-size"],Te={key:2},qe=["stroke","stroke-width","x1","x2","y1","y2"],je={style:{"pointer-events":"none"}},De=["cx","cy","fill","r","stroke"],Ue=["x","y","fill","font-size"],Ge=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],We=["cx","cy","fill","stroke","onClick","r"],Ye={key:5,class:"vue-data-ui-watermark"},Xe={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(re,{expose:ne}){e.useCssVars(t=>({cc1109c8:ce.value,fd19c20a:ue.value,"0d0b359d":de.value}));const{vue_ui_relation_circle:oe}=s.useConfig(),y=re,$=e.computed(()=>!!y.dataset&&Object.keys(y.dataset).length),w=e.ref(s.createUid()),E=e.ref(0),b=e.ref(null),A=e.ref(null),N=e.ref(null),I=e.ref(null),V=e.ref(0),r=e.computed({get:()=>T(),set:t=>t}),{userOptionsVisible:_,setUserOptionsVisibility:F,keepUserOptionState:M}=Le.useUserOptionState({config:r.value}),{svgRef:R}=ze.useChartAccessibility({config:r.value.style.title});function T(){const t=le.useNestedProp({userConfig:y.config,defaultConfig:oe});return t.theme?{...le.useNestedProp({userConfig:s.themes.vue_ui_relation_circle[t.theme]||y.config,defaultConfig:t}),customPalette:s.themePalettes[t.theme]||s.palette}:t}e.watch(()=>y.config,t=>{r.value=T(),_.value=!r.value.userOptions.showOnChartHover,X(),V.value+=1},{deep:!0});const{isPrinting:q,isImaging:j,generatePdf:D,generateImage:U}=te.usePrinter({elementId:`relation_circle_${w.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle",options:r.value.userOptions.print}),se=e.computed(()=>r.value.userOptions.show&&!r.value.style.title.text),G=e.computed(()=>s.convertCustomPalette(r.value.customPalette)),h=e.ref([]),d=e.ref([]),i=e.ref({}),v=e.ref([]),ae=e.ref(0),P=e.computed(()=>y.dataset.slice(0,r.value.style.limit)),k=e.ref(r.value.style.size),f=e.ref(r.value.style.weightLabels.size),W=e.ref(r.value.style.plot.radius),Y=e.ref(r.value.style.labels.fontSize),a=e.ref({height:r.value.style.size,width:r.value.style.size}),m=e.computed({get(){return k.value*r.value.style.circle.radiusProportion},set(t){return t}}),ie=e.computed(()=>r.value.style.links.curved),ue=e.computed(()=>`${r.value.style.animation.speedMs}ms`),ce=e.computed(()=>m.value*2),de=e.computed(()=>m.value*4),x=e.ref(null);e.onMounted(()=>{X(),document.getElementById(`relation_circle_${w.value}`).addEventListener("click",H)});function X(){if(s.objectIsEmpty(y.dataset)?s.error({componentName:"VueUiRelationCircle",type:"dataset"}):y.dataset.forEach((t,n)=>{s.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(l=>{s.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:l,index:n})})}),r.value.responsive){const t=ee.throttle(()=>{const{width:n,height:l}=ee.useResponsive({chart:b.value,title:r.value.style.title.text?A.value:null,source:N.value,noTitle:I.value});requestAnimationFrame(()=>{k.value=Math.min(n,l),a.value.width=n,a.value.height=l,m.value=k.value*r.value.style.circle.radiusProportion,h.value=[],d.value=[],J(),K(),f.value=s.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.weightLabels.size,threshold:6,fallback:6}),W.value=s.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.plot.radius,threshold:1,fallback:1}),Y.value=s.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.labels.fontSize,threshold:6,fallback:6})})});x.value=new ResizeObserver(t),x.value.observe(b.value.parentNode)}else h.value=[],d.value=[],J(),K()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${w.value}`).removeEventListener("click",H),x.value&&x.value.disconnect()});function H(t){const n=t.target;n&&Array.from(n.classList).includes("vue-ui-user-options")||n&&Array.from(n.classList).includes("vue-ui-user-options-summary")||n&&Array.from(n.classList).includes("vue-data-ui-button")||n&&Array.from(n.classList).includes("vue-ui-relation-circle-legend")||(i.value={},v.value=[])}function J(){const t=6.28319/P.value.length,n=360/P.value.length;let l=0,o=0;P.value.forEach((c,u)=>{const O=c.weights.reduce((xe,Ce)=>xe+Ce,0),S=m.value*Math.cos(l)+a.value.width/2,be=m.value*Math.sin(l)+a.value.height/2+r.value.style.circle.offsetY;h.value.push({x:S,y:be,...c,color:c.color?c.color:G.value[u]?G.value[u]:s.palette[u],regAngle:o,totalWeight:O}),l+=t,o+=n})}function ve(t,n){const l=(t.x+n.x)/2,o=(t.y+n.y)/2;return{x:l,y:o}}function K(){d.value=[],h.value.forEach(t=>{h.value.filter(l=>l.relations.includes(t.id)).forEach((l,o)=>{const c=l.relations.indexOf(t.id);d.value.push({weight:l.weights[c]?l.weights[c]:0,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,midPointLine:ve({x:t.x,y:t.y},{x:l.x,y:l.y}),midPointBezier:fe({x1:t.x,x2:l.x,y1:t.y,y2:l.y}),...t})})})}function fe(t){const n={x:t.x1,y:t.y1},l={x:t.x2,y:t.y2},o={x:t.x1,y:t.y1},c={x:a.value.width/2,y:a.value.height/2+r.value.style.circle.offsetY},u=.5,O=Math.pow(1-u,3)*n.x+3*Math.pow(1-u,2)*u*o.x+3*(1-u)*Math.pow(u,2)*c.x+Math.pow(u,3)*l.x,S=Math.pow(1-u,3)*n.y+3*Math.pow(1-u,2)*u*o.y+3*(1-u)*Math.pow(u,2)*c.y+Math.pow(u,3)*l.y;return{x:O,y:S}}const ye=e.computed(()=>Math.max(...d.value.map(t=>t.weight)));function ge(t){return Object.hasOwn(i.value,"x")?v.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function g(t){return t.colorSource}function Q(t){return Object.hasOwn(i.value,"x")?v.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`?`opacity:1;stroke-width:${L(t)}`:"opacity: 0":"opacity: 1"}function p(t){return Object.hasOwn(i.value,"x")?!!(v.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`):!1}function he(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function me(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function ke(t){return Object.hasOwn(i.value,"x")?i.value.id===t.id||v.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function pe(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function Z(t){ae.value=360-t.regAngle,i.value.id&&t.id===i.value.id?(i.value={},v.value=[]):(i.value=t,v.value=[...t.relations])}function L(t){const n=t.weight/ye.value*r.value.style.links.maxWidth;return Math.max(.3,n)}const C=e.ref(!1);function we(t){C.value=t,E.value+=1}const B=e.ref(!1);function z(){B.value=!B.value}return ne({generatePdf:D,generateImage:U,toggleAnnotator:z}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:b,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor};text-align:center;${r.value.responsive?"height: 100%":""}`),id:`relation_circle_${w.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref(F)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(F)(!1))},[r.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Pe._sfc_main,{key:0,svgRef:e.unref(R),backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,active:B.value,onClose:z},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),se.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:I,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),r.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:A,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(Be._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"relation-div-title",...r.value.style.title},subtitle:{cy:"relation-div-subtitle",...r.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),r.value.userOptions.show&&$.value&&(e.unref(M)||e.unref(_))?(e.openBlock(),e.createBlock(te.UserOptions,{ref:"details",key:`user_options_${E.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(q),isImaging:e.unref(j),uid:w.value,hasPdf:r.value.userOptions.buttons.pdf,hasImg:r.value.userOptions.buttons.img,hasFullscreen:r.value.userOptions.buttons.img,hasXls:!1,isFullscreen:C.value,titles:{...r.value.userOptions.buttonTitles},chartElement:b.value,position:r.value.userOptions.position,hasAnnotator:r.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:we,onGeneratePdf:e.unref(D),onGenerateImage:e.unref(U),onToggleAnnotator:z,style:e.normalizeStyle({visibility:e.unref(M)?e.unref(_)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:o})=>[e.renderSlot(t.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:o})),void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"3"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:o})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:o})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:R,xmlns:e.unref(s.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value},"relation-circle"]),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,width:"100%",style:"user-select:none; background:transparent"},[e.createVNode(_e._sfc_main),t.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:a.value.width<=0?10:a.value.width,height:a.value.height<=0?10:a.value.height,style:{pointerEvents:"none"}},[e.renderSlot(t.$slots,"chart-background",{},void 0,!0)],8,Ae)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:(a.value.width<=0?1e-4:a.value.width)/2,cy:(a.value.height<=0?1e-4:a.value.height)/2+r.value.style.circle.offsetY,r:m.value<=0?1e-4:m.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,Ne),ie.value?(e.openBlock(),e.createElementBlock("g",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${o}`,style:e.normalizeStyle(Q(l)),stroke:g(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&v.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${a.value.width/2},${a.value.height/2+r.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":L(l),"stroke-linecap":"round"},null,14,Ve))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",Fe,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.mergeProps({key:0,ref_for:!0},{x:l.midPointBezier.x,y:l.midPointBezier.y,color:g(l),weight:l.weight,fontSize:f.value}),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointBezier.x,cy:l.midPointBezier.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,Me)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointBezier.x,y:l.midPointBezier.y+f.value/3,fill:e.unref(s.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(s.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(s.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Re)):e.createCommentVNode("",!0)]))),256))])):(e.openBlock(),e.createElementBlock("g",Te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${o}`,stroke:g(l),"stroke-width":L(l),style:e.normalizeStyle(Q(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&v.value.includes(l.id)}),"stroke-linecap":"round"},null,14,qe))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",je,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.mergeProps({key:0,ref_for:!0},{x:l.midPointLine.x,y:l.midPointLine.y,color:g(l),weight:l.weight,fontSize:f.value}),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointLine.x,cy:l.midPointLine.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,De)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointLine.x,y:l.midPointLine.y+f.value/3,fill:e.unref(s.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(s.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(s.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Ue)):e.createCommentVNode("",!0)]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${o}`,"text-anchor":he(l),transform:pe(l),x:me(l),y:l.y+5,onClick:c=>Z(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":i.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${ke(l)}`),"font-size":Y.value,fill:r.value.style.labels.color},e.toDisplayString(l.label)+" ("+e.toDisplayString(e.unref(s.applyDataLabel)(r.value.style.weightLabels.formatter,l.totalWeight,e.unref(s.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.totalWeight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l}))+") ",13,Ge))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${o}`,style:e.normalizeStyle(ge(l)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.useSerieColor?l.color:r.value.style.plot.color,stroke:r.value.style.backgroundColor,"stroke-width":"1",onClick:c=>Z(l),r:W.value},null,12,We))),128)),e.renderSlot(t.$slots,"svg",{svg:a.value},void 0,!0)],10,Ee)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ye,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(q)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:N,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($e.default,{key:7,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],44,Se))}},He=Oe._export_sfc(Xe,[["__scopeId","data-v-1f567c99"]]);exports.default=He;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-HGCbG8YK.cjs"),oe=require("./useResponsive-DQmBAoBf.cjs"),Ce=require("./Title-DWFudmma.cjs"),ae=require("./usePrinter-B2PvJuo8.cjs"),we=require("./Tooltip-DPqJ5wwr.cjs"),$e=require("./DataTable-4qcYZrGF.cjs"),Ne=require("./Legend-D8qnv865.cjs"),Te=require("./vue-ui-skeleton-BBWwBSGZ.cjs"),xe=require("./vue-ui-accordion-CSuxLH7L.cjs"),re=require("./useNestedProp-O_JTsxQj.cjs"),Se=require("./PackageVersion-sCi6-fwm.cjs"),Be=require("./PenAndPaper-DXiYR_ED.cjs"),_e=require("./useUserOptionState-BgepsfED.cjs"),Pe=require("./Shape-BjIO2Dd_.cjs"),Ve=require("./useChartAccessibility-Cm7nkzTG.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Oe=["id"],Ee=["xmlns","viewBox"],Ie=["width","height"],Ae=["id"],ze=["stop-color"],Fe=["stop-color"],Re={key:1},qe=["stroke","cx","cy","r","fill"],Me=["stroke","stroke-width","cx","cy","r","fill"],Ue=["stroke","stroke-width","cx","cy","r","fill"],De=["cx","cy","r","onMouseenter"],We={key:5,class:"vue-data-ui-watermark"},He=["onClick"],Ge={key:0},je={key:1},Xe=["innerHTML"],Ye={__name:"vue-ui-rings",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ne,{expose:se,emit:ue}){const{vue_ui_rings:ie}=n.useConfig(),ce=e.useSlots(),p=ne,b=e.ref(!1),$=e.computed(()=>!!p.dataset&&p.dataset.length),g=e.ref(n.createUid()),de=e.ref(null),N=e.ref(!1),_=e.ref(""),m=e.ref(null),E=e.ref(0),C=e.ref(null),I=e.ref(null),A=e.ref(null),z=e.ref(null),F=e.ref(null),R=e.ref(0),q=e.ref(0),M=e.ref(0),t=e.computed({get:()=>H(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:U,keepUserOptionState:D}=_e.useUserOptionState({config:t.value}),{svgRef:W}=Ve.useChartAccessibility({config:t.value.style.chart.title});function H(){const l=re.useNestedProp({userConfig:p.config,defaultConfig:ie});return l.theme?{...re.useNestedProp({userConfig:n.themes.vue_ui_rings[l.theme]||p.config,defaultConfig:l}),customPalette:n.themePalettes[l.theme]||n.palette}:l}e.watch(()=>p.config,l=>{t.value=H(),P.value=!t.value.userOptions.showOnChartHover,G(),R.value+=1,q.value+=1,M.value+=1,h.value.showTable=t.value.table.show,h.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const T=e.ref(null);e.onMounted(()=>{G()});function G(){if(n.objectIsEmpty(p.dataset)?n.error({componentName:"VueUiRings",type:"dataset"}):p.dataset.forEach((l,a)=>{l.values.length||n.error({componentName:"VueUiRings",type:"dataset"}),n.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{n.error({componentName:"VueUiRings",type:"datasetSerieAttribute",property:o,index:a})})}),t.value.responsive){const l=oe.throttle(()=>{const{width:a,height:o}=oe.useResponsive({chart:C.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?A.value:null,source:z.value,noTitle:F.value});requestAnimationFrame(()=>{s.value.width=a,s.value.height=o})});T.value=new ResizeObserver(l),T.value.observe(C.value.parentNode)}setTimeout(()=>{b.value=!0},600)}e.onBeforeUnmount(()=>{T.value&&T.value.disconnect()});const{isPrinting:j,isImaging:X,generatePdf:Y,generateImage:J}=ae.usePrinter({elementId:`rings_${g.value}`,fileName:t.value.style.chart.title.text||"vue-ui-rings",options:t.value.userOptions.print}),ve=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),K=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),h=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),s=e.ref({height:360,width:360}),pe=e.computed(()=>Math.min(s.value.height,s.value.width)),he=ue,d=e.ref([]);function V(l){d.value.includes(l)?d.value=d.value.filter(a=>a!==l):d.value.push(l),he("selectLegend",c.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const fe=e.computed(()=>Math.max(...x.value.filter(l=>!d.value.includes(l.uid)).map(({value:l})=>l)));function Q(l){return l/fe.value}const x=e.computed(()=>p.dataset.map(({values:l,name:a,color:o=null},r)=>{const u=n.sanitizeArray(l).reduce((v,w)=>v+w,0);return{name:a,color:o||n.convertColorToHex(o)||K.value[r]||n.palette[r]||n.palette[r%n.palette.length],value:u,proportion:u/p.dataset.map(v=>(v.values||[]).reduce((w,ke)=>w+ke,0)).reduce((v,w)=>v+w,0),uid:n.createUid(),absoluteIndex:r}})),Z=e.computed(()=>x.value.map(l=>({...l,shape:"circle",opacity:d.value.includes(l.uid)?.5:1,segregate:()=>V(l.uid),isSegregated:d.value.includes(l.uid)})).toSorted((l,a)=>a.value-l.value)),ge=e.computed(()=>({cy:"rings-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),f=e.computed(()=>x.value.filter(l=>!d.value.includes(l.uid)).map(({value:l})=>l).reduce((l,a)=>l+a,0)),c=e.computed(()=>x.value.filter(l=>!d.value.includes(l.uid)).map(({name:l,value:a,color:o=null,uid:r,absoluteIndex:u},v)=>({absoluteIndex:u,uid:r,name:l,color:o||n.convertColorToHex(o)||K.value[v]||n.palette[v]||n.palette[v%n.palette.length],value:a,proportion:Q(a),percentage:a/f.value*100,strokeWidth:t.value.style.chart.layout.rings.strokeWidth*Q(a)})).toSorted((l,a)=>a.value-l.value));function me(){return c.value.map(({name:l,color:a,value:o,absoluteValues:r,percentage:u})=>({name:l,color:a,value:o,absoluteValues:r,percentage:u}))}const i=e.computed(()=>pe.value-t.value.style.chart.layout.rings.strokeWidth*2),L=e.ref(null);function ye(l,a){if(d.value.length===p.dataset.length)return;L.value={datapoint:a,seriesIndex:l,series:c.value,config:t.value},m.value=l;const o=c.value[l],r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:l,datapoint:a,series:c.value,config:t.value})))_.value=r({seriesIndex:l,datapoint:a,series:c.value,config:t.value});else{let u="";u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${o.color}" />${ce.pattern?`<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${g.value}_${a.absoluteIndex})" />`:""}</svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:l})}
|
|
2
|
+
</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${n.dataLabel({v:o.value/f.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:u+=`<b>${n.dataLabel({v:o.value/f.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),_.value=u}N.value=!0}const y=e.computed(()=>{const l=c.value.map(o=>({name:o.name,color:o.color})),a=c.value.map(o=>o.value);return{head:l,body:a}}),S=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:f.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=y.value.head.map((u,v)=>[{color:u.color,name:u.name},n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:y.value.body[v],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),isNaN(y.value.body[v]/f.value)?"-":(y.value.body[v]/f.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={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},r=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:r}});function ee(){e.nextTick(()=>{const l=y.value.head.map((r,u)=>[[r.name],[y.value.body[u]],[isNaN(y.value.body[u]/f.value)?"-":y.value.body[u]/f.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=n.createCsvContent(a);n.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-rings"})})}const k=e.ref(!1);function be(l){k.value=l,E.value+=1}function te(){h.value.showTable=!h.value.showTable}function le(){h.value.showTooltip=!h.value.showTooltip}const B=e.ref(!1);function O(){B.value=!B.value}return se({getData:me,generatePdf:Y,generateCsv:ee,generateImage:J,toggleTable:te,toggleTooltip:le,toggleAnnotator:O}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"ringsChart",ref:C,class:e.normalizeClass(`vue-ui-rings ${k.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};text-align:center;width:100%;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),id:`rings_${g.value}`,onMouseleave:a[3]||(a[3]=o=>{m.value=null,N.value=!1,e.unref(U)(!1)}),onMouseenter:a[4]||(a[4]=()=>e.unref(U)(!0))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Be._sfc_main,{key:0,svgRef:e.unref(W),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:O},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ve.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:F,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:I,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(Ce._sfc_main,{key:`title_${R.value}`,config:{title:{cy:"rings-div-title",...t.value.style.chart.title},subtitle:{cy:"rings-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value&&(e.unref(D)||e.unref(P))?(e.openBlock(),e.createBlock(ae.UserOptions,{ref_key:"details",ref:de,key:`user_options_${E.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(j),isImaging:e.unref(X),uid:g.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,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,isTooltip:h.value.showTooltip,isFullscreen:k.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:be,onGeneratePdf:e.unref(Y),onGenerateCsv:ee,onGenerateImage:e.unref(J),onToggleTable:te,onToggleTooltip:le,onToggleAnnotator:O,style:e.normalizeStyle({visibility:e.unref(D)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:r})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:r})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:W,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Se._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:s.value.width<=0?10:s.value.width,height:s.value.height<=0?10:s.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Ie)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${g.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(o.color,.05),100-t.value.style.chart.layout.rings.gradient.intensity)},null,8,ze),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,Fe)],8,Ae))),256))]),l.$slots.pattern?(e.openBlock(),e.createElementBlock("g",Re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,o=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(l.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:o.absoluteIndex,patternId:`pattern_${g.value}_${o.absoluteIndex}`}),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":b.value&&t.value.useCssAnimation,"vue-rings-item-onload":!b.value&&t.value.useCssAnimation,"vue-ui-rings-opacity":m.value!==null&&m.value!==r}),style:e.normalizeStyle(`animation-delay:${r*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,cx:s.value.width/2,cy:r===0?s.value.height/2:s.value.height/2+i.value*c.value[0].proportion/2-i.value*o.proportion/2-2*(r+1),r:e.unref(n.checkNaN)(i.value*o.proportion/2*.9<=0?1e-4:i.value*o.proportion/2*.9),fill:t.value.style.chart.layout.rings.gradient.underlayerColor},null,14,qe),e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":b.value&&t.value.useCssAnimation,"vue-rings-item-onload":!b.value&&t.value.useCssAnimation,"vue-ui-rings-shadow":t.value.style.chart.layout.rings.useShadow,"vue-ui-rings-blur":m.value!==null&&m.value!==r}),style:e.normalizeStyle(`animation-delay:${r*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,"stroke-width":o.strokeWidth<.5?.5:o.strokeWidth,cx:s.value.width/2,cy:r===0?s.value.height/2:s.value.height/2+i.value*c.value[0].proportion/2-i.value*o.proportion/2-2*(r+1),r:e.unref(n.checkNaN)(i.value*o.proportion/2*.9<=0?1e-4:i.value*o.proportion/2*.9),fill:t.value.style.chart.layout.rings.gradient.show?`url(#gradient_${g.value}_${r})`:o.color},null,14,Me),l.$slots.pattern?(e.openBlock(),e.createElementBlock("circle",{key:0,class:e.normalizeClass({"vue-ui-rings-item":b.value&&t.value.useCssAnimation,"vue-rings-item-onload":!b.value&&t.value.useCssAnimation,"vue-ui-rings-shadow":t.value.style.chart.layout.rings.useShadow,"vue-ui-rings-blur":m.value!==null&&m.value!==r}),style:e.normalizeStyle(`animation-delay:${r*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,"stroke-width":o.strokeWidth<.5?.5:o.strokeWidth,cx:s.value.width/2,cy:r===0?s.value.height/2:s.value.height/2+i.value*c.value[0].proportion/2-i.value*o.proportion/2-2*(r+1),r:e.unref(n.checkNaN)(i.value*o.proportion/2*.9<=0?1e-4:i.value*o.proportion/2*.9),fill:`url(#pattern_${g.value}_${o.absoluteIndex})`},null,14,Ue)):e.createCommentVNode("",!0),e.createElementVNode("circle",{stroke:"none",cx:s.value.width/2,cy:r===0?s.value.height/2:s.value.height/2+i.value*c.value[0].proportion/2-i.value*o.proportion/2-2*(r+1),r:e.unref(n.checkNaN)(i.value*o.proportion/2*.9<=0?1e-4:i.value*o.proportion/2*.9),fill:"transparent",onMouseenter:u=>ye(r,o),onMouseleave:a[0]||(a[0]=u=>{m.value=null,N.value=!1})},null,40,De)]))),256)),e.renderSlot(l.$slots,"svg",{svg:s.value},void 0,!0)],14,Ee)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",We,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(j)||e.unref(X)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te.default,{key:6,config:{type:"rings",style:{backgroundColor:t.value.style.chart.backgroundColor,rings:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:A},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ne.Legend,{key:`legend_${M.value}`,legendSet:Z.value,config:ge.value,onClickMarker:a[1]||(a[1]=({legend:o})=>V(o.uid))},e.createSlots({item:e.withCtx(({legend:o,index:r})=>[e.createElementVNode("div",{onClick:u=>V(o.uid),style:e.normalizeStyle(`opacity:${d.value.includes(o.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:r}))+" ",1),d.value.includes(o.uid)?(e.openBlock(),e.createElementBlock("span",je," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Ge," ("+e.toDisplayString(isNaN(o.value/f.value)?"-":e.unref(n.dataLabel)({v:o.value/f.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,He)]),_:2},[l.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:o,index:r})=>[e.createVNode(Pe._sfc_main,{shape:o.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${g.value}_${r})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:Z.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:z,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(we._sfc_main,{show:h.value.showTooltip&&N.value&&d.value.length<p.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:C.value,content:_.value,isFullscreen:k.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),$.value?(e.openBlock(),e.createBlock(xe.default,{key:8,hideDetails:"",config:{open:h.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($e.DataTable,{key:`table_${q.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.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]=o=>h.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Xe)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Oe))}},Je=Le._export_sfc(Ye,[["__scopeId","data-v-be9fc972"]]);exports.default=Je;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { useSlots as Ge, ref as i, computed as g, watch as He, onMounted as je, onBeforeUnmount as Xe, createElementBlock as v, openBlock as n, unref as r, normalizeStyle as I, normalizeClass as M, createBlock as O, createCommentVNode as m, createElementVNode as
|
|
2
|
-
import { u as Je, c as
|
|
1
|
+
import { useSlots as Ge, ref as i, computed as g, watch as He, onMounted as je, onBeforeUnmount as Xe, createElementBlock as v, openBlock as n, unref as r, normalizeStyle as I, normalizeClass as M, createBlock as O, createCommentVNode as m, createElementVNode as _, createVNode as J, createSlots as we, withCtx as h, renderSlot as d, normalizeProps as P, guardReactiveProps as F, Fragment as K, renderList as Q, mergeProps as qe, createTextVNode as _e, toDisplayString as E, nextTick as Ye } from "vue";
|
|
2
|
+
import { u as Je, c as Te, t as Ke, p as N, a as Qe, o as Ze, e as Z, g as et, b as tt, J as lt, d as xe, f as S, X as ot, s as at, w as st, v as G, i as Ie, q as nt, r as ut, x as rt, y as it } from "./index-B_dU_4T8.js";
|
|
3
3
|
import { t as vt, u as ct } from "./useResponsive-Cw4oZ8sQ.js";
|
|
4
|
-
import { _ as dt } from "./Title-
|
|
5
|
-
import { u as pt, U as ht } from "./usePrinter-
|
|
6
|
-
import { _ as gt } from "./Tooltip-
|
|
7
|
-
import { D as ft } from "./DataTable-
|
|
8
|
-
import { L as yt } from "./Legend-
|
|
9
|
-
import mt from "./vue-ui-skeleton-
|
|
10
|
-
import bt from "./vue-ui-accordion-
|
|
11
|
-
import { u as Oe } from "./useNestedProp-
|
|
12
|
-
import { _ as kt } from "./PackageVersion-
|
|
13
|
-
import {
|
|
4
|
+
import { _ as dt } from "./Title-ND4kMErl.js";
|
|
5
|
+
import { u as pt, U as ht } from "./usePrinter-CLObTJ4a.js";
|
|
6
|
+
import { _ as gt } from "./Tooltip-BWe5TPIJ.js";
|
|
7
|
+
import { D as ft } from "./DataTable-BFNGlApm.js";
|
|
8
|
+
import { L as yt } from "./Legend-B4eIw732.js";
|
|
9
|
+
import mt from "./vue-ui-skeleton-CTZKsfWs.js";
|
|
10
|
+
import bt from "./vue-ui-accordion-C5dj9Voo.js";
|
|
11
|
+
import { u as Oe } from "./useNestedProp-7s4Pw7x0.js";
|
|
12
|
+
import { _ as kt } from "./PackageVersion-BZ8-AoE_.js";
|
|
13
|
+
import { _ as Ct } from "./PenAndPaper--_AE7XzJ.js";
|
|
14
14
|
import { u as $t } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
|
-
import { _ as wt } from "./Shape-
|
|
16
|
-
import { u as
|
|
17
|
-
import { _ as
|
|
18
|
-
const xt = ["id"], It = ["xmlns", "viewBox"], Ot = ["width", "height"], Nt = ["id"],
|
|
15
|
+
import { _ as wt } from "./Shape-BQd108EW.js";
|
|
16
|
+
import { u as _t } from "./useChartAccessibility-BWojgys7.js";
|
|
17
|
+
import { _ as Tt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
18
|
+
const xt = ["id"], It = ["xmlns", "viewBox"], Ot = ["width", "height"], Nt = ["id"], St = ["stop-color"], At = ["stop-color"], Pt = { key: 1 }, Ft = ["stroke", "cx", "cy", "r", "fill"], Lt = ["stroke", "stroke-width", "cx", "cy", "r", "fill"], Rt = ["stroke", "stroke-width", "cx", "cy", "r", "fill"], Mt = ["cx", "cy", "r", "onMouseenter"], Vt = {
|
|
19
19
|
key: 5,
|
|
20
20
|
class: "vue-data-ui-watermark"
|
|
21
21
|
}, zt = ["onClick"], Ut = { key: 0 }, Wt = { key: 1 }, Bt = ["innerHTML"], Dt = {
|
|
@@ -35,15 +35,15 @@ const xt = ["id"], It = ["xmlns", "viewBox"], Ot = ["width", "height"], Nt = ["i
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
emits: ["selectLegend"],
|
|
38
|
-
setup(Ne, { expose:
|
|
39
|
-
const { vue_ui_rings:
|
|
38
|
+
setup(Ne, { expose: Se, emit: Ae }) {
|
|
39
|
+
const { vue_ui_rings: Pe } = Je(), Fe = Ge(), b = Ne, x = i(!1), V = g(() => !!b.dataset && b.dataset.length), $ = i(Te()), Le = i(null), z = i(!1), H = i(""), w = i(null), ee = i(0), L = i(null), te = i(null), le = i(null), oe = i(null), ae = i(null), se = i(0), ne = i(0), ue = i(0), e = g({
|
|
40
40
|
get: () => ce(),
|
|
41
41
|
set: (t) => t
|
|
42
|
-
}), { userOptionsVisible: j, setUserOptionsVisibility: re, keepUserOptionState: ie } = $t({ config: e.value }), { svgRef: ve } =
|
|
42
|
+
}), { userOptionsVisible: j, setUserOptionsVisibility: re, keepUserOptionState: ie } = $t({ config: e.value }), { svgRef: ve } = _t({ config: e.value.style.chart.title });
|
|
43
43
|
function ce() {
|
|
44
44
|
const t = Oe({
|
|
45
45
|
userConfig: b.config,
|
|
46
|
-
defaultConfig:
|
|
46
|
+
defaultConfig: Pe
|
|
47
47
|
});
|
|
48
48
|
return t.theme ? {
|
|
49
49
|
...Oe({
|
|
@@ -111,7 +111,7 @@ const xt = ["id"], It = ["xmlns", "viewBox"], Ot = ["width", "height"], Nt = ["i
|
|
|
111
111
|
}), s = i({
|
|
112
112
|
height: 360,
|
|
113
113
|
width: 360
|
|
114
|
-
}), Me = g(() => Math.min(s.value.height, s.value.width)), Ve =
|
|
114
|
+
}), Me = g(() => Math.min(s.value.height, s.value.width)), Ve = Ae, f = i([]);
|
|
115
115
|
function X(t) {
|
|
116
116
|
f.value.includes(t) ? f.value = f.value.filter((o) => o !== t) : f.value.push(t), Ve("selectLegend", p.value.map((o) => ({
|
|
117
117
|
name: o.name,
|
|
@@ -132,7 +132,7 @@ const xt = ["id"], It = ["xmlns", "viewBox"], Ot = ["width", "height"], Nt = ["i
|
|
|
132
132
|
color: l || xe(l) || ye.value[a] || N[a] || N[a % N.length],
|
|
133
133
|
value: u,
|
|
134
134
|
proportion: u / b.dataset.map((y) => (y.values || []).reduce((R, Ee) => R + Ee, 0)).reduce((y, R) => y + R, 0),
|
|
135
|
-
uid:
|
|
135
|
+
uid: Te(),
|
|
136
136
|
absoluteIndex: a
|
|
137
137
|
};
|
|
138
138
|
})), be = g(() => W.value.map((t) => ({
|
|
@@ -196,7 +196,7 @@ const xt = ["id"], It = ["xmlns", "viewBox"], Ot = ["width", "height"], Nt = ["i
|
|
|
196
196
|
u += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`, u += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${l.color}" />${Fe.pattern ? `<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${$.value}_${o.absoluteIndex})" />` : ""}</svg>`, e.value.style.chart.tooltip.showValue && (u += `<b>${Ie(
|
|
197
197
|
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
198
198
|
l.value,
|
|
199
|
-
|
|
199
|
+
S({
|
|
200
200
|
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
201
201
|
v: l.value,
|
|
202
202
|
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
@@ -204,11 +204,11 @@ const xt = ["id"], It = ["xmlns", "viewBox"], Ot = ["width", "height"], Nt = ["i
|
|
|
204
204
|
}),
|
|
205
205
|
{ datapoint: o, seriesIndex: t }
|
|
206
206
|
)}
|
|
207
|
-
</b>`), e.value.style.chart.tooltip.showPercentage && (e.value.style.chart.tooltip.showValue ? u += `<span>(${
|
|
207
|
+
</b>`), e.value.style.chart.tooltip.showPercentage && (e.value.style.chart.tooltip.showValue ? u += `<span>(${S({
|
|
208
208
|
v: l.value / C.value * 100,
|
|
209
209
|
s: "%",
|
|
210
210
|
r: e.value.style.chart.tooltip.roundingPercentage
|
|
211
|
-
})})</span></div>` : u += `<b>${
|
|
211
|
+
})})</span></div>` : u += `<b>${S({
|
|
212
212
|
v: l.value / C.value * 100,
|
|
213
213
|
s: "%",
|
|
214
214
|
r: e.value.style.chart.tooltip.roundingPercentage
|
|
@@ -216,7 +216,7 @@ const xt = ["id"], It = ["xmlns", "viewBox"], Ot = ["width", "height"], Nt = ["i
|
|
|
216
216
|
}
|
|
217
217
|
z.value = !0;
|
|
218
218
|
}
|
|
219
|
-
const
|
|
219
|
+
const T = g(() => {
|
|
220
220
|
const t = p.value.map((l) => ({
|
|
221
221
|
name: l.name,
|
|
222
222
|
color: l.color
|
|
@@ -225,15 +225,15 @@ const xt = ["id"], It = ["xmlns", "viewBox"], Ot = ["width", "height"], Nt = ["i
|
|
|
225
225
|
}), B = g(() => {
|
|
226
226
|
const t = [
|
|
227
227
|
' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',
|
|
228
|
-
|
|
228
|
+
S({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: C.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
|
|
229
229
|
"100%"
|
|
230
|
-
], o =
|
|
230
|
+
], o = T.value.head.map((u, y) => [
|
|
231
231
|
{
|
|
232
232
|
color: u.color,
|
|
233
233
|
name: u.name
|
|
234
234
|
},
|
|
235
|
-
|
|
236
|
-
isNaN(
|
|
235
|
+
S({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: T.value.body[y], s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
|
|
236
|
+
isNaN(T.value.body[y] / C.value) ? "-" : (T.value.body[y] / C.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
|
|
237
237
|
]), l = {
|
|
238
238
|
th: {
|
|
239
239
|
backgroundColor: e.value.table.th.backgroundColor,
|
|
@@ -260,15 +260,15 @@ const xt = ["id"], It = ["xmlns", "viewBox"], Ot = ["width", "height"], Nt = ["i
|
|
|
260
260
|
});
|
|
261
261
|
function ke() {
|
|
262
262
|
Ye(() => {
|
|
263
|
-
const t =
|
|
263
|
+
const t = T.value.head.map((a, u) => [[
|
|
264
264
|
a.name
|
|
265
|
-
], [
|
|
265
|
+
], [T.value.body[u]], [isNaN(T.value.body[u] / C.value) ? "-" : T.value.body[u] / C.value * 100]]), o = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(t), l = nt(o);
|
|
266
266
|
ut({ csvContent: l, title: e.value.style.chart.title.text || "vue-ui-rings" });
|
|
267
267
|
});
|
|
268
268
|
}
|
|
269
|
-
const
|
|
269
|
+
const A = i(!1);
|
|
270
270
|
function De(t) {
|
|
271
|
-
|
|
271
|
+
A.value = t, ee.value += 1;
|
|
272
272
|
}
|
|
273
273
|
function Ce() {
|
|
274
274
|
k.value.showTable = !k.value.showTable;
|
|
@@ -280,7 +280,7 @@ const xt = ["id"], It = ["xmlns", "viewBox"], Ot = ["width", "height"], Nt = ["i
|
|
|
280
280
|
function Y() {
|
|
281
281
|
D.value = !D.value;
|
|
282
282
|
}
|
|
283
|
-
return
|
|
283
|
+
return Se({
|
|
284
284
|
getData: We,
|
|
285
285
|
generatePdf: ge,
|
|
286
286
|
generateCsv: ke,
|
|
@@ -291,7 +291,7 @@ const xt = ["id"], It = ["xmlns", "viewBox"], Ot = ["width", "height"], Nt = ["i
|
|
|
291
291
|
}), (t, o) => (n(), v("div", {
|
|
292
292
|
ref_key: "ringsChart",
|
|
293
293
|
ref: L,
|
|
294
|
-
class: M(`vue-ui-rings ${
|
|
294
|
+
class: M(`vue-ui-rings ${A.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
295
295
|
style: I(`font-family:${e.value.style.fontFamily};text-align:center;width:100%;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`),
|
|
296
296
|
id: `rings_${$.value}`,
|
|
297
297
|
onMouseleave: o[3] || (o[3] = (l) => {
|
|
@@ -350,7 +350,7 @@ const xt = ["id"], It = ["xmlns", "viewBox"], Ot = ["width", "height"], Nt = ["i
|
|
|
350
350
|
hasTable: e.value.userOptions.buttons.table,
|
|
351
351
|
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
352
352
|
isTooltip: k.value.showTooltip,
|
|
353
|
-
isFullscreen:
|
|
353
|
+
isFullscreen: A.value,
|
|
354
354
|
titles: { ...e.value.userOptions.buttonTitles },
|
|
355
355
|
chartElement: L.value,
|
|
356
356
|
position: e.value.userOptions.position,
|
|
@@ -370,7 +370,7 @@ const xt = ["id"], It = ["xmlns", "viewBox"], Ot = ["width", "height"], Nt = ["i
|
|
|
370
370
|
t.$slots.menuIcon ? {
|
|
371
371
|
name: "menuIcon",
|
|
372
372
|
fn: h(({ isOpen: l, color: a }) => [
|
|
373
|
-
d(t.$slots, "menuIcon",
|
|
373
|
+
d(t.$slots, "menuIcon", P(F({ isOpen: l, color: a })), void 0, !0)
|
|
374
374
|
]),
|
|
375
375
|
key: "0"
|
|
376
376
|
} : void 0,
|
|
@@ -412,14 +412,14 @@ const xt = ["id"], It = ["xmlns", "viewBox"], Ot = ["width", "height"], Nt = ["i
|
|
|
412
412
|
t.$slots.optionFullscreen ? {
|
|
413
413
|
name: "optionFullscreen",
|
|
414
414
|
fn: h(({ toggleFullscreen: l, isFullscreen: a }) => [
|
|
415
|
-
d(t.$slots, "optionFullscreen",
|
|
415
|
+
d(t.$slots, "optionFullscreen", P(F({ toggleFullscreen: l, isFullscreen: a })), void 0, !0)
|
|
416
416
|
]),
|
|
417
417
|
key: "6"
|
|
418
418
|
} : void 0,
|
|
419
419
|
t.$slots.optionAnnotator ? {
|
|
420
420
|
name: "optionAnnotator",
|
|
421
421
|
fn: h(({ toggleAnnotator: l, isAnnotator: a }) => [
|
|
422
|
-
d(t.$slots, "optionAnnotator",
|
|
422
|
+
d(t.$slots, "optionAnnotator", P(F({ toggleAnnotator: l, isAnnotator: a })), void 0, !0)
|
|
423
423
|
]),
|
|
424
424
|
key: "7"
|
|
425
425
|
} : void 0
|
|
@@ -429,7 +429,7 @@ const xt = ["id"], It = ["xmlns", "viewBox"], Ot = ["width", "height"], Nt = ["i
|
|
|
429
429
|
ref_key: "svgRef",
|
|
430
430
|
ref: ve,
|
|
431
431
|
xmlns: r(ot),
|
|
432
|
-
class: M({ "vue-data-ui-fullscreen--on":
|
|
432
|
+
class: M({ "vue-data-ui-fullscreen--on": A.value, "vue-data-ui-fulscreen--off": !A.value }),
|
|
433
433
|
viewBox: `0 0 ${s.value.width <= 0 ? 10 : s.value.width} ${s.value.height <= 0 ? 10 : s.value.height}`,
|
|
434
434
|
style: I(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
|
|
435
435
|
}, [
|
|
@@ -446,7 +446,7 @@ const xt = ["id"], It = ["xmlns", "viewBox"], Ot = ["width", "height"], Nt = ["i
|
|
|
446
446
|
}, [
|
|
447
447
|
d(t.$slots, "chart-background", {}, void 0, !0)
|
|
448
448
|
], 8, Ot)) : m("", !0),
|
|
449
|
-
|
|
449
|
+
_("defs", null, [
|
|
450
450
|
(n(!0), v(K, null, Q(p.value, (l, a) => (n(), v("radialGradient", {
|
|
451
451
|
cx: "50%",
|
|
452
452
|
cy: "30%",
|
|
@@ -455,23 +455,23 @@ const xt = ["id"], It = ["xmlns", "viewBox"], Ot = ["width", "height"], Nt = ["i
|
|
|
455
455
|
fy: "50%",
|
|
456
456
|
id: `gradient_${$.value}_${a}`
|
|
457
457
|
}, [
|
|
458
|
-
|
|
458
|
+
_("stop", {
|
|
459
459
|
offset: "0%",
|
|
460
460
|
"stop-color": r(at)(r(st)(l.color, 0.05), 100 - e.value.style.chart.layout.rings.gradient.intensity)
|
|
461
|
-
}, null, 8,
|
|
462
|
-
|
|
461
|
+
}, null, 8, St),
|
|
462
|
+
_("stop", {
|
|
463
463
|
offset: "100%",
|
|
464
464
|
"stop-color": l.color
|
|
465
|
-
}, null, 8,
|
|
465
|
+
}, null, 8, At)
|
|
466
466
|
], 8, Nt))), 256))
|
|
467
467
|
]),
|
|
468
|
-
t.$slots.pattern ? (n(), v("g",
|
|
468
|
+
t.$slots.pattern ? (n(), v("g", Pt, [
|
|
469
469
|
(n(!0), v(K, null, Q(p.value, (l) => (n(), v("defs", null, [
|
|
470
470
|
d(t.$slots, "pattern", qe({ ref_for: !0 }, { seriesIndex: l.absoluteIndex, patternId: `pattern_${$.value}_${l.absoluteIndex}` }), void 0, !0)
|
|
471
471
|
]))), 256))
|
|
472
472
|
])) : m("", !0),
|
|
473
473
|
(n(!0), v(K, null, Q(p.value, (l, a) => (n(), v("g", null, [
|
|
474
|
-
|
|
474
|
+
_("circle", {
|
|
475
475
|
class: M({
|
|
476
476
|
"vue-ui-rings-item": x.value && e.value.useCssAnimation,
|
|
477
477
|
"vue-rings-item-onload": !x.value && e.value.useCssAnimation,
|
|
@@ -484,7 +484,7 @@ const xt = ["id"], It = ["xmlns", "viewBox"], Ot = ["width", "height"], Nt = ["i
|
|
|
484
484
|
r: r(G)(c.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : c.value * l.proportion / 2 * 0.9),
|
|
485
485
|
fill: e.value.style.chart.layout.rings.gradient.underlayerColor
|
|
486
486
|
}, null, 14, Ft),
|
|
487
|
-
|
|
487
|
+
_("circle", {
|
|
488
488
|
class: M({
|
|
489
489
|
"vue-ui-rings-item": x.value && e.value.useCssAnimation,
|
|
490
490
|
"vue-rings-item-onload": !x.value && e.value.useCssAnimation,
|
|
@@ -515,7 +515,7 @@ const xt = ["id"], It = ["xmlns", "viewBox"], Ot = ["width", "height"], Nt = ["i
|
|
|
515
515
|
r: r(G)(c.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : c.value * l.proportion / 2 * 0.9),
|
|
516
516
|
fill: `url(#pattern_${$.value}_${l.absoluteIndex})`
|
|
517
517
|
}, null, 14, Rt)) : m("", !0),
|
|
518
|
-
|
|
518
|
+
_("circle", {
|
|
519
519
|
stroke: "none",
|
|
520
520
|
cx: s.value.width / 2,
|
|
521
521
|
cy: a === 0 ? s.value.height / 2 : s.value.height / 2 + c.value * p.value[0].proportion / 2 - c.value * l.proportion / 2 - 2 * (a + 1),
|
|
@@ -530,7 +530,7 @@ const xt = ["id"], It = ["xmlns", "viewBox"], Ot = ["width", "height"], Nt = ["i
|
|
|
530
530
|
d(t.$slots, "svg", { svg: s.value }, void 0, !0)
|
|
531
531
|
], 14, It)) : m("", !0),
|
|
532
532
|
t.$slots.watermark ? (n(), v("div", Vt, [
|
|
533
|
-
d(t.$slots, "watermark",
|
|
533
|
+
d(t.$slots, "watermark", P(F({ isPrinting: r(pe) || r(he) })), void 0, !0)
|
|
534
534
|
])) : m("", !0),
|
|
535
535
|
V.value ? m("", !0) : (n(), O(mt, {
|
|
536
536
|
key: 6,
|
|
@@ -544,7 +544,7 @@ const xt = ["id"], It = ["xmlns", "viewBox"], Ot = ["width", "height"], Nt = ["i
|
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
546
|
}, null, 8, ["config"])),
|
|
547
|
-
|
|
547
|
+
_("div", {
|
|
548
548
|
ref_key: "chartLegend",
|
|
549
549
|
ref: le
|
|
550
550
|
}, [
|
|
@@ -555,14 +555,14 @@ const xt = ["id"], It = ["xmlns", "viewBox"], Ot = ["width", "height"], Nt = ["i
|
|
|
555
555
|
onClickMarker: o[1] || (o[1] = ({ legend: l }) => X(l.uid))
|
|
556
556
|
}, we({
|
|
557
557
|
item: h(({ legend: l, index: a }) => [
|
|
558
|
-
|
|
558
|
+
_("div", {
|
|
559
559
|
onClick: (u) => X(l.uid),
|
|
560
560
|
style: I(`opacity:${f.value.includes(l.uid) ? 0.5 : 1}`)
|
|
561
561
|
}, [
|
|
562
|
-
|
|
562
|
+
_e(E(l.name) + ": " + E(r(Ie)(
|
|
563
563
|
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
564
564
|
l.value,
|
|
565
|
-
r(
|
|
565
|
+
r(S)({
|
|
566
566
|
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
567
567
|
v: l.value,
|
|
568
568
|
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
@@ -570,7 +570,7 @@ const xt = ["id"], It = ["xmlns", "viewBox"], Ot = ["width", "height"], Nt = ["i
|
|
|
570
570
|
}),
|
|
571
571
|
{ datapoint: l, seriesIndex: a }
|
|
572
572
|
)) + " ", 1),
|
|
573
|
-
f.value.includes(l.uid) ? (n(), v("span", Wt, " ( - % ) ")) : (n(), v("span", Ut, " (" + E(isNaN(l.value / C.value) ? "-" : r(
|
|
573
|
+
f.value.includes(l.uid) ? (n(), v("span", Wt, " ( - % ) ")) : (n(), v("span", Ut, " (" + E(isNaN(l.value / C.value) ? "-" : r(S)({
|
|
574
574
|
v: l.value / C.value * 100,
|
|
575
575
|
s: "%",
|
|
576
576
|
r: e.value.style.chart.legend.roundingPercentage
|
|
@@ -618,14 +618,14 @@ const xt = ["id"], It = ["xmlns", "viewBox"], Ot = ["width", "height"], Nt = ["i
|
|
|
618
618
|
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
619
619
|
parent: L.value,
|
|
620
620
|
content: H.value,
|
|
621
|
-
isFullscreen:
|
|
621
|
+
isFullscreen: A.value,
|
|
622
622
|
isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function"
|
|
623
623
|
}, {
|
|
624
624
|
"tooltip-before": h(() => [
|
|
625
|
-
d(t.$slots, "tooltip-before",
|
|
625
|
+
d(t.$slots, "tooltip-before", P(F({ ...q.value })), void 0, !0)
|
|
626
626
|
]),
|
|
627
627
|
"tooltip-after": h(() => [
|
|
628
|
-
d(t.$slots, "tooltip-after",
|
|
628
|
+
d(t.$slots, "tooltip-after", P(F({ ...q.value })), void 0, !0)
|
|
629
629
|
]),
|
|
630
630
|
_: 3
|
|
631
631
|
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
|
|
@@ -656,13 +656,13 @@ const xt = ["id"], It = ["xmlns", "viewBox"], Ot = ["width", "height"], Nt = ["i
|
|
|
656
656
|
onClose: o[2] || (o[2] = (l) => k.value.showTable = !1)
|
|
657
657
|
}, {
|
|
658
658
|
th: h(({ th: l }) => [
|
|
659
|
-
|
|
659
|
+
_("div", {
|
|
660
660
|
innerHTML: l,
|
|
661
661
|
style: { display: "flex", "align-items": "center" }
|
|
662
662
|
}, null, 8, Bt)
|
|
663
663
|
]),
|
|
664
664
|
td: h(({ td: l }) => [
|
|
665
|
-
|
|
665
|
+
_e(E(l.name || l), 1)
|
|
666
666
|
]),
|
|
667
667
|
_: 1
|
|
668
668
|
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
@@ -671,7 +671,7 @@ const xt = ["id"], It = ["xmlns", "viewBox"], Ot = ["width", "height"], Nt = ["i
|
|
|
671
671
|
}, 8, ["config"])) : m("", !0)
|
|
672
672
|
], 46, xt));
|
|
673
673
|
}
|
|
674
|
-
}, nl = /* @__PURE__ */
|
|
674
|
+
}, nl = /* @__PURE__ */ Tt(Dt, [["__scopeId", "data-v-be9fc972"]]);
|
|
675
675
|
export {
|
|
676
676
|
nl as default
|
|
677
677
|
};
|