vue-data-ui 2.4.39 → 2.4.41
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-gn_WiuJU.js → Arrow-6z0ZQva_.js} +1 -1
- package/dist/{Arrow-BH3TXY5i.cjs → Arrow-Cht76m69.cjs} +1 -1
- package/dist/{BaseIcon-C9eU1XEJ.cjs → BaseIcon-D-JUZiGA.cjs} +1 -1
- package/dist/{BaseIcon-PEMG4fz_.js → BaseIcon-DCE3wRiG.js} +1 -1
- package/dist/{DataTable-D7EHk98Z.js → DataTable-B5DiCrf_.js} +2 -2
- package/dist/{DataTable-Dk61oGV_.cjs → DataTable-Cr3Xkxe4.cjs} +1 -1
- package/dist/{Legend-6jFPkL1P.cjs → Legend-BXG_XPom.cjs} +1 -1
- package/dist/{Legend-C8xQE9Da.js → Legend-DzxQIjDO.js} +1 -1
- package/dist/{PackageVersion-C7okNmPF.cjs → PackageVersion-CMtZxTqq.cjs} +1 -1
- package/dist/{PackageVersion-CiIsJuZg.js → PackageVersion-S7OD_s5u.js} +1 -1
- package/dist/{PenAndPaper-BBXIRAdA.js → PenAndPaper-BxJZd7k9.js} +3 -3
- package/dist/{PenAndPaper-BUjMRWG0.cjs → PenAndPaper-DWYhyZye.cjs} +1 -1
- package/dist/{Shape-C37gcsR4.js → Shape-C3ywBhkW.js} +1 -1
- package/dist/{Shape-f0l9bT7U.cjs → Shape-CvL90fNe.cjs} +1 -1
- package/dist/{Slicer-A-l0DLQY.cjs → Slicer-B2aHb4bj.cjs} +1 -1
- package/dist/{Slicer-DHzuJMcK.js → Slicer-D9ASV60L.js} +2 -2
- package/dist/{Title-DU9SuVY-.js → Title-BB0O0yol.js} +1 -1
- package/dist/{Title-BeCsXJhg.cjs → Title-D9gPXVTT.cjs} +1 -1
- package/dist/{Tooltip-Chiu53IG.js → Tooltip-GvLaModr.js} +1 -1
- package/dist/{Tooltip-DCwHEKeM.cjs → Tooltip-ypQtmi99.cjs} +1 -1
- package/dist/index-B5Ugkauv.cjs +9 -0
- package/dist/{index-hQvps1ng.js → index-B6Q1Fyk0.js} +12 -3
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +9 -0
- package/dist/types/vue-data-ui.d.ts +9 -0
- package/dist/{useNestedProp-CxQ2hIfU.js → useNestedProp-DQpuJSz3.js} +1 -1
- package/dist/{useNestedProp-DzZoHbI7.cjs → useNestedProp-bZitLnbb.cjs} +1 -1
- package/dist/{usePrinter-c5Pf5Hrk.js → usePrinter-D8dIU7aG.js} +1 -1
- package/dist/{usePrinter-C-C264ik.cjs → usePrinter-DtpFEgOX.cjs} +1 -1
- package/dist/{vue-data-ui-DhR5T2GB.cjs → vue-data-ui-DBN7iJHU.cjs} +1 -1
- package/dist/{vue-data-ui-DD3uGHqs.js → vue-data-ui-H24TWcBx.js} +60 -60
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-BNOB6IJY.js → vue-ui-3d-bar-BA2CQYGW.js} +9 -9
- package/dist/{vue-ui-3d-bar-CBVoa_Wd.cjs → vue-ui-3d-bar-BaNI_M3v.cjs} +1 -1
- package/dist/{vue-ui-accordion-CbATWtZa.js → vue-ui-accordion-BOHicozd.js} +3 -3
- package/dist/{vue-ui-accordion-CTxFHMF7.cjs → vue-ui-accordion-u4xDSvRn.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-ahMSlg4_.cjs → vue-ui-age-pyramid-DN25tjv-.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-Ddn0vH-R.js → vue-ui-age-pyramid-vKWko9vn.js} +10 -10
- package/dist/{vue-ui-annotator-DUul7luS.cjs → vue-ui-annotator-BcxUQ5tM.cjs} +1 -1
- package/dist/{vue-ui-annotator-DgPWj2k4.js → vue-ui-annotator-D4KNucw5.js} +1 -1
- package/dist/{vue-ui-bullet-BvFWfcoX.cjs → vue-ui-bullet-C3DKTZbg.cjs} +1 -1
- package/dist/{vue-ui-bullet-C6JmUhDP.js → vue-ui-bullet-DZgtd_qb.js} +8 -8
- package/dist/{vue-ui-candlestick-BUATE5UN.js → vue-ui-candlestick-C8yBMu8-.js} +11 -11
- package/dist/{vue-ui-candlestick-hi4L9XWB.cjs → vue-ui-candlestick-DVEofXBZ.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-Bi9tYRH3.js → vue-ui-carousel-table-Bpsrlbx9.js} +4 -4
- package/dist/{vue-ui-carousel-table-DvotxYl6.cjs → vue-ui-carousel-table-C62szGjt.cjs} +1 -1
- package/dist/{vue-ui-chestnut-CRICzF5h.js → vue-ui-chestnut-DhPSNM96.js} +8 -8
- package/dist/{vue-ui-chestnut-Bv2eLqjB.cjs → vue-ui-chestnut-VWwSZnUX.cjs} +1 -1
- package/dist/{vue-ui-cursor-DfwrrtWf.js → vue-ui-cursor-BM2OiZnZ.js} +2 -2
- package/dist/{vue-ui-cursor-qFWZfG95.cjs → vue-ui-cursor-BwnZYB4D.cjs} +1 -1
- package/dist/vue-ui-dashboard-BcnW7vDs.js +248 -0
- package/dist/vue-ui-dashboard-D8FU1GbE.cjs +1 -0
- package/dist/{vue-ui-digits-C3X-8Guv.cjs → vue-ui-digits-BmQBwho3.cjs} +1 -1
- package/dist/{vue-ui-digits-DUCY8rWv.js → vue-ui-digits-M4Pvrg0n.js} +2 -2
- package/dist/{vue-ui-donut-BiUKzDWv.js → vue-ui-donut-BgsQjURe.js} +11 -11
- package/dist/{vue-ui-donut-Bv2GZaYZ.cjs → vue-ui-donut-CZZfvbPk.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-Cup3zFPj.js → vue-ui-donut-evolution-BO2-ARBX.js} +11 -11
- package/dist/{vue-ui-donut-evolution-j8JKVqXN.cjs → vue-ui-donut-evolution-DP14ctdf.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-CANVwmSA.cjs → vue-ui-dumbbell-CsMqgiGr.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-DJE8-e3A.js → vue-ui-dumbbell-zv7yiPPM.js} +10 -10
- package/dist/{vue-ui-flow-Crq3AVFe.js → vue-ui-flow-BqtIWBkz.js} +9 -9
- package/dist/{vue-ui-flow-Dvz0sa0O.cjs → vue-ui-flow-E5MkZ3Yb.cjs} +1 -1
- package/dist/{vue-ui-funnel-M8uzLylj.js → vue-ui-funnel-CmVLAttG.js} +8 -8
- package/dist/{vue-ui-funnel-BVujl3GY.cjs → vue-ui-funnel-QU0_JscL.cjs} +1 -1
- package/dist/{vue-ui-galaxy-BfQkC9br.cjs → vue-ui-galaxy-BPDH-9KW.cjs} +1 -1
- package/dist/{vue-ui-galaxy-B77VCJR3.js → vue-ui-galaxy-sy8zvgcg.js} +11 -11
- package/dist/{vue-ui-gauge-8xiT5BUm.js → vue-ui-gauge--hARSvgz.js} +7 -7
- package/dist/{vue-ui-gauge-DwMexCwq.cjs → vue-ui-gauge-D_yokJMS.cjs} +1 -1
- package/dist/{vue-ui-gizmo-C9pEyZr1.cjs → vue-ui-gizmo-AUJq3EQL.cjs} +1 -1
- package/dist/{vue-ui-gizmo-CI96cnOM.js → vue-ui-gizmo-CvTeq5j0.js} +3 -3
- package/dist/{vue-ui-heatmap-lXe9Bxsb.cjs → vue-ui-heatmap-D-xNLuqW.cjs} +1 -1
- package/dist/{vue-ui-heatmap-DE6AgqvQ.js → vue-ui-heatmap-lI8oO-nh.js} +10 -10
- package/dist/{vue-ui-history-plot-B2p5Da7E.cjs → vue-ui-history-plot-BC0Rvo-r.cjs} +1 -1
- package/dist/{vue-ui-history-plot-CO2ZBnhb.js → vue-ui-history-plot-D3CwJpll.js} +11 -11
- package/dist/{vue-ui-kpi-D_URPS6w.cjs → vue-ui-kpi-B4FQKZ_r.cjs} +1 -1
- package/dist/{vue-ui-kpi-Cc7Yytho.js → vue-ui-kpi-C0agq-Os.js} +3 -3
- package/dist/{vue-ui-mini-loader-DHXKDtYR.cjs → vue-ui-mini-loader-BJ70GAEv.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DYbYoCQH.js → vue-ui-mini-loader-CkjJ5pRO.js} +2 -2
- package/dist/{vue-ui-molecule-CYs_u6Wz.cjs → vue-ui-molecule-CsQfkIEE.cjs} +1 -1
- package/dist/{vue-ui-molecule-CYlh7983.js → vue-ui-molecule-V9UFJHeV.js} +11 -11
- package/dist/{vue-ui-mood-radar-BjcUi2lA.cjs → vue-ui-mood-radar-CdU2vusL.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-B3nvz_EX.js → vue-ui-mood-radar-Cj_wOEbY.js} +11 -11
- package/dist/{vue-ui-nested-donuts-BDPVh9VT.js → vue-ui-nested-donuts-DFVQwbHg.js} +11 -11
- package/dist/{vue-ui-nested-donuts-sf-rnAYN.cjs → vue-ui-nested-donuts-DevV-xZr.cjs} +1 -1
- package/dist/{vue-ui-onion-BddrBSxm.js → vue-ui-onion-BJ-PjA7d.js} +11 -11
- package/dist/{vue-ui-onion-DYhBNiT8.cjs → vue-ui-onion-DGWktnME.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-JyWFCBD3.js → vue-ui-parallel-coordinate-plot-33naX1Ss.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-m-ZgXf3c.cjs → vue-ui-parallel-coordinate-plot-CjxZbVNa.cjs} +1 -1
- package/dist/{vue-ui-quadrant-C0XCJA1s.cjs → vue-ui-quadrant-DqZqBb2L.cjs} +1 -1
- package/dist/{vue-ui-quadrant-woZI-oSE.js → vue-ui-quadrant-xJaZzXgo.js} +12 -12
- package/dist/{vue-ui-quick-chart-DT37a1KG.js → vue-ui-quick-chart-BwN9eLye.js} +9 -9
- package/dist/{vue-ui-quick-chart-GAy1Kq_9.cjs → vue-ui-quick-chart-BzpXJYR_.cjs} +1 -1
- package/dist/{vue-ui-radar-BWLte3c3.js → vue-ui-radar-B4EXwJDY.js} +12 -12
- package/dist/{vue-ui-radar-C31U_Z53.cjs → vue-ui-radar-CQ66YUG5.cjs} +1 -1
- package/dist/{vue-ui-rating-B4LMCbX7.cjs → vue-ui-rating-D334I4ju.cjs} +1 -1
- package/dist/{vue-ui-rating-0HTRr8sI.js → vue-ui-rating-DNkygw1i.js} +2 -2
- package/dist/vue-ui-relation-circle-BKeSh28h.js +492 -0
- package/dist/vue-ui-relation-circle-CP2Z6IWV.cjs +1 -0
- package/dist/{vue-ui-rings-CptiG61Q.cjs → vue-ui-rings-2oDSTctd.cjs} +1 -1
- package/dist/{vue-ui-rings-Cd_dJ3co.js → vue-ui-rings-D6M3UNSE.js} +11 -11
- package/dist/{vue-ui-scatter-BK5xv5mP.cjs → vue-ui-scatter-C9ZoWV1q.cjs} +1 -1
- package/dist/{vue-ui-scatter-Do7eIAvo.js → vue-ui-scatter-JUPbbsO7.js} +12 -12
- package/dist/{vue-ui-screenshot-DJjluZur.js → vue-ui-screenshot-DmLDHfF9.js} +1 -1
- package/dist/{vue-ui-screenshot-hW8cPfaI.cjs → vue-ui-screenshot-JMBX_AWn.cjs} +1 -1
- package/dist/{vue-ui-skeleton-Dmee5Xfg.js → vue-ui-skeleton-D7rg5vFC.js} +3 -3
- package/dist/{vue-ui-skeleton-Ckb3hRcQ.cjs → vue-ui-skeleton-E9_X0-sa.cjs} +1 -1
- package/dist/{vue-ui-smiley-B3MEz94h.js → vue-ui-smiley-BAlHZm8H.js} +2 -2
- package/dist/{vue-ui-smiley-CfQTx9Kb.cjs → vue-ui-smiley-aRTznf8z.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-B-sO8emp.cjs → vue-ui-spark-trend-DZR6Fqu5.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-BnziIPLw.js → vue-ui-spark-trend-J9swikF_.js} +5 -5
- package/dist/{vue-ui-sparkbar-D3W-HMC0.js → vue-ui-sparkbar-B0tCpwZ9.js} +4 -4
- package/dist/{vue-ui-sparkbar-DWHagP1f.cjs → vue-ui-sparkbar-Bjmi8pMf.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-Bp20yElv.js → vue-ui-sparkgauge-DVX2pIC3.js} +4 -4
- package/dist/{vue-ui-sparkgauge-Cx_dMzxw.cjs → vue-ui-sparkgauge-Dhzbkn67.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-BdovbgiO.js → vue-ui-sparkhistogram-Wd6q0mqj.js} +5 -5
- package/dist/{vue-ui-sparkhistogram--Ulh-M8t.cjs → vue-ui-sparkhistogram-gIaXDrFh.cjs} +1 -1
- package/dist/{vue-ui-sparkline-DJGZzF_8.cjs → vue-ui-sparkline-B5ySeM9y.cjs} +1 -1
- package/dist/{vue-ui-sparkline-B2cKF2Oq.js → vue-ui-sparkline-DYT-gts9.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-ywMpLSpx.js → vue-ui-sparkstackbar-BMGA05VR.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-BmFppjoc.cjs → vue-ui-sparkstackbar-ilvB3RBv.cjs} +1 -1
- package/dist/{vue-ui-stackbar-NjNO1R4N.cjs → vue-ui-stackbar-BZKwsAjO.cjs} +1 -1
- package/dist/{vue-ui-stackbar-s7gETyOu.js → vue-ui-stackbar-BZbOagnf.js} +12 -12
- package/dist/{vue-ui-strip-plot-CKI7Tk26.js → vue-ui-strip-plot-B-r4luYX.js} +11 -11
- package/dist/{vue-ui-strip-plot-BieHYfvX.cjs → vue-ui-strip-plot-DPo7osh_.cjs} +1 -1
- package/dist/{vue-ui-table-mo4xqDVF.cjs → vue-ui-table-C6z56ODT.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BI_IFUMP.cjs → vue-ui-table-heatmap-B05GifSw.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BMmVk6UI.js → vue-ui-table-heatmap-CM-c7n0F.js} +4 -4
- package/dist/{vue-ui-table-sparkline-DOx85BsZ.js → vue-ui-table-sparkline-DHaEHFG_.js} +5 -5
- package/dist/{vue-ui-table-sparkline-nouXTHiN.cjs → vue-ui-table-sparkline-Dx-ePVqW.cjs} +1 -1
- package/dist/{vue-ui-table-CGNRHPdF.js → vue-ui-table-wlXHwJVW.js} +1 -1
- package/dist/{vue-ui-thermometer-Cbqv6RYW.js → vue-ui-thermometer-BU_ckSdu.js} +7 -7
- package/dist/{vue-ui-thermometer-CpbU3pkq.cjs → vue-ui-thermometer-HCpOZBHv.cjs} +1 -1
- package/dist/{vue-ui-timer-BrAZQClf.cjs → vue-ui-timer-CUChwyzF.cjs} +1 -1
- package/dist/{vue-ui-timer-BgueE1dl.js → vue-ui-timer-DiRZ849L.js} +5 -5
- package/dist/{vue-ui-tiremarks-HNlJDrP8.js → vue-ui-tiremarks-BHMNb_tq.js} +7 -7
- package/dist/{vue-ui-tiremarks-DAqAEaPM.cjs → vue-ui-tiremarks-yoQtfbj7.cjs} +1 -1
- package/dist/{vue-ui-treemap-Cqej3ef5.cjs → vue-ui-treemap-BInwLSes.cjs} +1 -1
- package/dist/{vue-ui-treemap-BNNW0aIB.js → vue-ui-treemap-BpD6OdL3.js} +11 -11
- package/dist/{vue-ui-vertical-bar-DjoaIjRt.js → vue-ui-vertical-bar-CBNWMmCg.js} +11 -11
- package/dist/{vue-ui-vertical-bar-BCx0SE0Z.cjs → vue-ui-vertical-bar-hS4gzdKs.cjs} +1 -1
- package/dist/{vue-ui-waffle-CrCgrl2o.js → vue-ui-waffle-BE8iTrGF.js} +11 -11
- package/dist/{vue-ui-waffle-CspQJ4_E.cjs → vue-ui-waffle-Cmq6zhD8.cjs} +1 -1
- package/dist/{vue-ui-wheel-DvpCjvs8.cjs → vue-ui-wheel-BT0mLxln.cjs} +1 -1
- package/dist/{vue-ui-wheel-Wq6OVQ5Z.js → vue-ui-wheel-BXSIBRLM.js} +7 -7
- package/dist/{vue-ui-word-cloud-AXCM7hi3.js → vue-ui-word-cloud-3wvSYRbp.js} +10 -10
- package/dist/{vue-ui-word-cloud-CaW8SZ9y.cjs → vue-ui-word-cloud-BXHlm41O.cjs} +1 -1
- package/dist/vue-ui-xy-CfduqTWA.cjs +3 -0
- package/dist/{vue-ui-xy-BhdOWsqW.js → vue-ui-xy-D8XvOgW6.js} +16 -16
- package/dist/{vue-ui-xy-canvas-o7kCbz5j.cjs → vue-ui-xy-canvas-BTR-cL02.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-sAVL0y81.js → vue-ui-xy-canvas-Cx7vPyfT.js} +11 -11
- package/package.json +1 -1
- package/dist/index-DCccP2Kt.cjs +0 -9
- package/dist/vue-ui-dashboard-CxGCT46n.cjs +0 -1
- package/dist/vue-ui-dashboard-yX9EkLTf.js +0 -232
- package/dist/vue-ui-relation-circle-Ds3zzFbl.js +0 -366
- package/dist/vue-ui-relation-circle-K0EZ_Nkb.cjs +0 -1
- package/dist/vue-ui-xy-Dkl5bPI-.cjs +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-DCccP2Kt.cjs"),L=require("./useNestedProp-DzZoHbI7.cjs"),D=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},A=["src","height","width"],R=["xmlns","height","width"],X=["id"],j=["stop-color"],F=["stop-color"],I=["points","fill","stroke","stroke-width"],O=["src","alt","height","width","id"],Y=["xmlns","viewBox","height","id"],G=["id"],q=["stop-color"],U=["stop-color"],H=["points","fill","stroke"],K=["xmlns","height"],P=["onClick","onMouseenter","onKeyup"],T=["onMouseenter"],W={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(k,{expose:_,emit:S}){const i=k,{vue_ui_rating:z}=a.useConfig(),d=e.ref(a.createUid()),f=e.ref(!1),s=e.ref(void 0),y=e.ref([]),t=e.computed({get:()=>g(),set:o=>o});function g(){return L.useNestedProp({userConfig:i.config,defaultConfig:z})}e.watch(()=>i.config,o=>{t.value=g(),h()},{deep:!0});const w=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)?N(i.dataset.rating):i.dataset.rating),B=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)),r=e.ref(w.value),m=e.computed(()=>t.value.type==="image"),c=e.computed(()=>t.value.readonly);function N(o){let n=0,l=0;for(const u in o){const V=parseInt(u),b=o[u];n+=V*b,l+=b}if(l===0)return 0;const v=n/l;return Math.min(t.value.to,Math.max(t.value.from,v))}e.onMounted(()=>{h()});function h(){a.objectIsEmpty(i.dataset)&&a.error({componentName:"VueUiRating",type:"dataset"}),y.value=[];for(let o=t.value.from;o<=t.value.to;o+=1)y.value.push(o)}function p(o,n=!1){return o>s.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_${d.value})`:t.value.style.star.activeColor}function x(o,n=!1){const l=r.value-o,v=n?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*v;default:return l*v}}function $(o){c.value||(r.value=o,S("rate",o))}function C(){return r.value}function E(o=!0){c.value=o}return _({getData:C,toggleReadonly:E}),(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[2]||(n[2]=l=>f.value=!0),onMouseleave:n[3]||(n[3]=l=>{f.value=!1,s.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",M,[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,r.value,e.unref(a.dataLabel)({v:r.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,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,v)=>(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`)},[m.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(s.value)?t.value.style.image.inactiveOpacity:p(l,!0)}`)},null,12,A)):(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_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,j),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,F)],8,X)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(s.value)?t.value.style.star.inactiveColor:p(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:s.value?p(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,I)],8,R)),m.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_${d.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${x(v,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,O)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${x(v)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${d.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_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,q),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:t.value.style.star.useGradient?`url(#star_gradient_over_${d.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,H)],8,Y)),(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:u=>$(l),onMouseenter:u=>s.value=l,onMouseleave:n[0]||(n[0]=u=>s.value=void 0),tabindex:"0",onKeyup:e.withKeys(u=>$(l),["enter"])},null,40,P)),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:u=>s.value=l,onMouseleave:n[1]||(n[1]=u=>s.value=void 0)},null,40,T)):e.createCommentVNode("",!0)],12,K)),t.value.style.tooltip.show&&B.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:4,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:${s.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,r.value,e.unref(a.dataLabel)({v:r.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,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],36))}},J=D._export_sfc(W,[["__scopeId","data-v-d90e158f"]]);exports.default=J;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-B5Ugkauv.cjs"),L=require("./useNestedProp-bZitLnbb.cjs"),D=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},A=["src","height","width"],R=["xmlns","height","width"],X=["id"],j=["stop-color"],F=["stop-color"],I=["points","fill","stroke","stroke-width"],O=["src","alt","height","width","id"],Y=["xmlns","viewBox","height","id"],G=["id"],q=["stop-color"],U=["stop-color"],H=["points","fill","stroke"],K=["xmlns","height"],P=["onClick","onMouseenter","onKeyup"],T=["onMouseenter"],W={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(k,{expose:_,emit:S}){const i=k,{vue_ui_rating:z}=a.useConfig(),d=e.ref(a.createUid()),f=e.ref(!1),s=e.ref(void 0),y=e.ref([]),t=e.computed({get:()=>g(),set:o=>o});function g(){return L.useNestedProp({userConfig:i.config,defaultConfig:z})}e.watch(()=>i.config,o=>{t.value=g(),h()},{deep:!0});const w=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)?N(i.dataset.rating):i.dataset.rating),B=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)),r=e.ref(w.value),m=e.computed(()=>t.value.type==="image"),c=e.computed(()=>t.value.readonly);function N(o){let n=0,l=0;for(const u in o){const V=parseInt(u),b=o[u];n+=V*b,l+=b}if(l===0)return 0;const v=n/l;return Math.min(t.value.to,Math.max(t.value.from,v))}e.onMounted(()=>{h()});function h(){a.objectIsEmpty(i.dataset)&&a.error({componentName:"VueUiRating",type:"dataset"}),y.value=[];for(let o=t.value.from;o<=t.value.to;o+=1)y.value.push(o)}function p(o,n=!1){return o>s.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_${d.value})`:t.value.style.star.activeColor}function x(o,n=!1){const l=r.value-o,v=n?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*v;default:return l*v}}function $(o){c.value||(r.value=o,S("rate",o))}function C(){return r.value}function E(o=!0){c.value=o}return _({getData:C,toggleReadonly:E}),(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[2]||(n[2]=l=>f.value=!0),onMouseleave:n[3]||(n[3]=l=>{f.value=!1,s.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",M,[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,r.value,e.unref(a.dataLabel)({v:r.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,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,v)=>(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`)},[m.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(s.value)?t.value.style.image.inactiveOpacity:p(l,!0)}`)},null,12,A)):(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_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,j),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,F)],8,X)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(s.value)?t.value.style.star.inactiveColor:p(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:s.value?p(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,I)],8,R)),m.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_${d.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${x(v,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,O)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${x(v)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${d.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_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,q),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:t.value.style.star.useGradient?`url(#star_gradient_over_${d.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,H)],8,Y)),(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:u=>$(l),onMouseenter:u=>s.value=l,onMouseleave:n[0]||(n[0]=u=>s.value=void 0),tabindex:"0",onKeyup:e.withKeys(u=>$(l),["enter"])},null,40,P)),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:u=>s.value=l,onMouseleave:n[1]||(n[1]=u=>s.value=void 0)},null,40,T)):e.createCommentVNode("",!0)],12,K)),t.value.style.tooltip.show&&B.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:4,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:${s.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,r.value,e.unref(a.dataLabel)({v:r.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,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],36))}},J=D._export_sfc(W,[["__scopeId","data-v-d90e158f"]]);exports.default=J;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as h, computed as x, watch as U, onMounted as K, openBlock as a, createElementBlock as i, normalizeStyle as o, createElementVNode as r, toDisplayString as g, createCommentVNode as d, unref as s, Fragment as T, renderList as H, withKeys as P } from "vue";
|
|
2
|
-
import { u as W, c as q, o as J, e as Q, i as $, f as _, X as k, w as R, V as F } from "./index-
|
|
3
|
-
import { u as Z } from "./useNestedProp-
|
|
2
|
+
import { u as W, c as q, o as J, e as Q, i as $, f as _, X as k, w as R, V as F } from "./index-B6Q1Fyk0.js";
|
|
3
|
+
import { u as Z } from "./useNestedProp-DQpuJSz3.js";
|
|
4
4
|
import { _ as tt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const et = {
|
|
6
6
|
key: 0,
|
|
@@ -0,0 +1,492 @@
|
|
|
1
|
+
import { useCssVars as Re, computed as f, ref as r, watch as je, onMounted as Ge, onBeforeUnmount as Ue, openBlock as s, createElementBlock as i, normalizeStyle as O, createBlock as F, createCommentVNode as v, unref as d, createSlots as We, withCtx as B, renderSlot as k, normalizeProps as A, guardReactiveProps as W, normalizeClass as D, createVNode as De, createElementVNode as Ve, Fragment as C, renderList as P, mergeProps as ye, toDisplayString as E } from "vue";
|
|
2
|
+
import { u as Xe, c as Ye, t as qe, a as He, p as fe, b as Je, o as Ke, e as he, g as Qe, X as Ze, F as ge, i as V, f as X, E as Y } from "./index-B6Q1Fyk0.js";
|
|
3
|
+
import { t as et, u as tt } from "./useResponsive-CoxXLe23.js";
|
|
4
|
+
import { _ as lt } from "./Title-BB0O0yol.js";
|
|
5
|
+
import { u as st, U as at } from "./usePrinter-D8dIU7aG.js";
|
|
6
|
+
import it from "./vue-ui-skeleton-D7rg5vFC.js";
|
|
7
|
+
import { u as me } from "./useNestedProp-DQpuJSz3.js";
|
|
8
|
+
import { _ as nt } from "./PackageVersion-S7OD_s5u.js";
|
|
9
|
+
import { P as rt } from "./PenAndPaper-BxJZd7k9.js";
|
|
10
|
+
import { _ as ut } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
|
+
const ot = ["id"], ct = ["xmlns", "viewBox"], dt = ["cx", "cy", "r", "stroke", "stroke-width"], vt = { key: 0 }, yt = ["stroke", "d", "stroke-width"], ft = { style: { "pointer-events": "none" } }, ht = ["cx", "cy", "fill", "r", "stroke"], gt = ["x", "y", "fill", "font-size"], mt = { key: 1 }, kt = ["stroke", "stroke-width", "x1", "x2", "y1", "y2"], xt = { style: { "pointer-events": "none" } }, pt = ["cx", "cy", "fill", "r", "stroke"], wt = ["x", "y", "fill", "font-size"], bt = ["text-anchor", "transform", "x", "y", "onClick", "font-weight", "font-size", "fill"], _t = ["cx", "cy", "fill", "stroke", "onClick", "r"], $t = {
|
|
12
|
+
key: 5,
|
|
13
|
+
class: "vue-data-ui-watermark"
|
|
14
|
+
}, Ct = {
|
|
15
|
+
__name: "vue-ui-relation-circle",
|
|
16
|
+
props: {
|
|
17
|
+
dataset: {
|
|
18
|
+
type: Array,
|
|
19
|
+
default() {
|
|
20
|
+
return [];
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
config: {
|
|
24
|
+
type: Object,
|
|
25
|
+
default() {
|
|
26
|
+
return {};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
setup(ke, { expose: xe }) {
|
|
31
|
+
const x = ke;
|
|
32
|
+
Re((e) => ({
|
|
33
|
+
"7693a9d2": Ce.value,
|
|
34
|
+
"65d94d14": $e.value,
|
|
35
|
+
fa445a50: Pe.value
|
|
36
|
+
}));
|
|
37
|
+
const { vue_ui_relation_circle: pe } = Xe(), T = f(() => !!x.dataset && Object.keys(x.dataset).length), L = r(Ye()), q = r(0), z = r(null), H = r(null), J = r(null), K = r(null), Q = r(0), l = f({
|
|
38
|
+
get: () => Z(),
|
|
39
|
+
set: (e) => e
|
|
40
|
+
});
|
|
41
|
+
function Z() {
|
|
42
|
+
const e = me({
|
|
43
|
+
userConfig: x.config,
|
|
44
|
+
defaultConfig: pe
|
|
45
|
+
});
|
|
46
|
+
return e.theme ? {
|
|
47
|
+
...me({
|
|
48
|
+
userConfig: qe.vue_ui_relation_circle[e.theme] || x.config,
|
|
49
|
+
defaultConfig: e
|
|
50
|
+
}),
|
|
51
|
+
customPalette: He[e.theme] || fe
|
|
52
|
+
} : e;
|
|
53
|
+
}
|
|
54
|
+
je(() => x.config, (e) => {
|
|
55
|
+
l.value = Z(), re(), Q.value += 1;
|
|
56
|
+
}, { deep: !0 });
|
|
57
|
+
const { isPrinting: ee, isImaging: te, generatePdf: le, generateImage: se } = st({
|
|
58
|
+
elementId: `relation_circle_${L.value}`,
|
|
59
|
+
fileName: l.value.style.title.text || "vue-ui-relation-circle"
|
|
60
|
+
}), we = f(() => l.value.userOptions.show && !l.value.style.title.text), ae = f(() => Je(l.value.customPalette)), w = r([]), h = r([]), u = r({}), g = r([]), be = r(0), N = f(() => x.dataset.slice(0, l.value.style.limit)), _ = r(l.value.style.size), m = r(l.value.style.weightLabels.size), ie = r(l.value.style.plot.radius), ne = r(l.value.style.labels.fontSize), o = r({
|
|
61
|
+
height: l.value.style.size,
|
|
62
|
+
width: l.value.style.size
|
|
63
|
+
}), b = f({
|
|
64
|
+
get() {
|
|
65
|
+
return _.value * l.value.style.circle.radiusProportion;
|
|
66
|
+
},
|
|
67
|
+
set(e) {
|
|
68
|
+
return e;
|
|
69
|
+
}
|
|
70
|
+
}), _e = f(() => l.value.style.links.curved), $e = f(() => `${l.value.style.animation.speedMs}ms`), Ce = f(() => b.value * 2), Pe = f(() => b.value * 4), I = r(null);
|
|
71
|
+
Ge(() => {
|
|
72
|
+
re(), document.getElementById(`relation_circle_${L.value}`).addEventListener("click", ue);
|
|
73
|
+
});
|
|
74
|
+
function re() {
|
|
75
|
+
if (Ke(x.dataset) ? he({
|
|
76
|
+
componentName: "VueUiRelationCircle",
|
|
77
|
+
type: "dataset"
|
|
78
|
+
}) : x.dataset.forEach((e, a) => {
|
|
79
|
+
Qe({
|
|
80
|
+
datasetObject: e,
|
|
81
|
+
requiredAttributes: ["id", "label", "relations", "weights"]
|
|
82
|
+
}).forEach((t) => {
|
|
83
|
+
he({
|
|
84
|
+
componentName: "VueUiRelationCircle",
|
|
85
|
+
type: "datasetSerieAttribute",
|
|
86
|
+
property: t,
|
|
87
|
+
index: a
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
}), l.value.responsive) {
|
|
91
|
+
const e = et(() => {
|
|
92
|
+
const { width: a, height: t } = tt({
|
|
93
|
+
chart: z.value,
|
|
94
|
+
title: l.value.style.title.text ? H.value : null,
|
|
95
|
+
source: J.value,
|
|
96
|
+
noTitle: K.value
|
|
97
|
+
});
|
|
98
|
+
_.value = Math.min(a, t), o.value.width = a, o.value.height = t, b.value = _.value * l.value.style.circle.radiusProportion, w.value = [], h.value = [], oe(), ce(), m.value = Y({
|
|
99
|
+
relator: _.value,
|
|
100
|
+
adjuster: l.value.style.size,
|
|
101
|
+
source: l.value.style.weightLabels.size,
|
|
102
|
+
threshold: 6,
|
|
103
|
+
fallback: 6
|
|
104
|
+
}), ie.value = Y({
|
|
105
|
+
relator: _.value,
|
|
106
|
+
adjuster: l.value.style.size,
|
|
107
|
+
source: l.value.style.plot.radius,
|
|
108
|
+
threshold: 1,
|
|
109
|
+
fallback: 1
|
|
110
|
+
}), ne.value = Y({
|
|
111
|
+
relator: _.value,
|
|
112
|
+
adjuster: l.value.style.size,
|
|
113
|
+
source: l.value.style.labels.fontSize,
|
|
114
|
+
threshold: 6,
|
|
115
|
+
fallback: 6
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
I.value = new ResizeObserver(e), I.value.observe(z.value.parentNode);
|
|
119
|
+
} else
|
|
120
|
+
w.value = [], h.value = [], oe(), ce();
|
|
121
|
+
}
|
|
122
|
+
Ue(() => {
|
|
123
|
+
document.getElementById(`relation_circle_${L.value}`).removeEventListener("click", ue), I.value && I.value.disconnect();
|
|
124
|
+
});
|
|
125
|
+
function ue(e) {
|
|
126
|
+
const a = e.target;
|
|
127
|
+
a && Array.from(a.classList).includes("vue-ui-user-options") || a && Array.from(a.classList).includes("vue-ui-user-options-summary") || a && Array.from(a.classList).includes("vue-data-ui-button") || a && Array.from(a.classList).includes("vue-ui-relation-circle-legend") || (u.value = {}, g.value = []);
|
|
128
|
+
}
|
|
129
|
+
function oe() {
|
|
130
|
+
const e = 6.28319 / N.value.length, a = 360 / N.value.length;
|
|
131
|
+
let t = 0, n = 0;
|
|
132
|
+
N.value.forEach((y, c) => {
|
|
133
|
+
const G = y.weights.reduce((Te, Ne) => Te + Ne, 0), U = b.value * Math.cos(t) + o.value.width / 2, Ee = b.value * Math.sin(t) + o.value.height / 2 + l.value.style.circle.offsetY;
|
|
134
|
+
w.value.push({ x: U, y: Ee, ...y, color: y.color ? y.color : ae.value[c] ? ae.value[c] : fe[c], regAngle: n, totalWeight: G }), t += e, n += a;
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
function Le(e, a) {
|
|
138
|
+
const t = (e.x + a.x) / 2, n = (e.y + a.y) / 2;
|
|
139
|
+
return { x: t, y: n };
|
|
140
|
+
}
|
|
141
|
+
function ce() {
|
|
142
|
+
h.value = [], w.value.forEach((e) => {
|
|
143
|
+
w.value.filter((t) => t.relations.includes(e.id)).forEach((t, n) => {
|
|
144
|
+
const y = t.relations.indexOf(e.id);
|
|
145
|
+
h.value.push({
|
|
146
|
+
weight: t.weights[y] ? t.weights[y] : 0,
|
|
147
|
+
relationId: `${e.id}_${t.id}`,
|
|
148
|
+
x1: e.x,
|
|
149
|
+
y1: e.y,
|
|
150
|
+
x2: t.x,
|
|
151
|
+
y2: t.y,
|
|
152
|
+
colorSource: e.color,
|
|
153
|
+
colorTarget: t.color,
|
|
154
|
+
midPointLine: Le({ x: e.x, y: e.y }, { x: t.x, y: t.y }),
|
|
155
|
+
midPointBezier: ze({
|
|
156
|
+
x1: e.x,
|
|
157
|
+
x2: t.x,
|
|
158
|
+
y1: e.y,
|
|
159
|
+
y2: t.y
|
|
160
|
+
}),
|
|
161
|
+
...e
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
function ze(e) {
|
|
167
|
+
const a = { x: e.x1, y: e.y1 }, t = { x: e.x2, y: e.y2 }, n = { x: e.x1, y: e.y1 }, y = {
|
|
168
|
+
x: o.value.width / 2,
|
|
169
|
+
y: o.value.height / 2 + l.value.style.circle.offsetY
|
|
170
|
+
}, c = 0.5, G = Math.pow(1 - c, 3) * a.x + 3 * Math.pow(1 - c, 2) * c * n.x + 3 * (1 - c) * Math.pow(c, 2) * y.x + Math.pow(c, 3) * t.x, U = Math.pow(1 - c, 3) * a.y + 3 * Math.pow(1 - c, 2) * c * n.y + 3 * (1 - c) * Math.pow(c, 2) * y.y + Math.pow(c, 3) * t.y;
|
|
171
|
+
return { x: G, y: U };
|
|
172
|
+
}
|
|
173
|
+
const Oe = f(() => Math.max(...h.value.map((e) => e.weight)));
|
|
174
|
+
function Ae(e) {
|
|
175
|
+
return Object.hasOwn(u.value, "x") ? g.value.includes(e.id) ? "opacity:1" : "opacity:0.1" : "opacity:1";
|
|
176
|
+
}
|
|
177
|
+
function p(e) {
|
|
178
|
+
return e.colorSource;
|
|
179
|
+
}
|
|
180
|
+
function de(e) {
|
|
181
|
+
return Object.hasOwn(u.value, "x") ? g.value.includes(e.id) && e.relationId === `${e.id}_${u.value.id}` || e.relationId === `${u.value.id}_${e.id}` ? `opacity:1;stroke-width:${R(e)}` : "opacity: 0" : "opacity: 1";
|
|
182
|
+
}
|
|
183
|
+
function $(e) {
|
|
184
|
+
return Object.hasOwn(u.value, "x") ? !!(g.value.includes(e.id) && e.relationId === `${e.id}_${u.value.id}` || e.relationId === `${u.value.id}_${e.id}`) : !1;
|
|
185
|
+
}
|
|
186
|
+
function Ie(e) {
|
|
187
|
+
return e.regAngle > 90 && e.regAngle < 270 ? "end" : "start";
|
|
188
|
+
}
|
|
189
|
+
function Me(e) {
|
|
190
|
+
return e.regAngle > 90 && e.regAngle < 270 ? e.x - 5 : e.x + 5;
|
|
191
|
+
}
|
|
192
|
+
function Se(e) {
|
|
193
|
+
return Object.hasOwn(u.value, "x") ? u.value.id === e.id || g.value.includes(e.id) ? "opacity:1" : "opacity:0.2" : "opacity:1";
|
|
194
|
+
}
|
|
195
|
+
function Fe(e) {
|
|
196
|
+
return e.regAngle > 90 && e.regAngle < 270 ? `rotate(${e.regAngle + 180},${e.x},${e.y})` : `rotate(${e.regAngle},${e.x},${e.y})`;
|
|
197
|
+
}
|
|
198
|
+
function ve(e) {
|
|
199
|
+
be.value = 360 - e.regAngle, u.value.id && e.id === u.value.id ? (u.value = {}, g.value = []) : (u.value = e, g.value = [...e.relations]);
|
|
200
|
+
}
|
|
201
|
+
function R(e) {
|
|
202
|
+
const a = e.weight / Oe.value * l.value.style.links.maxWidth;
|
|
203
|
+
return Math.max(0.3, a);
|
|
204
|
+
}
|
|
205
|
+
const M = r(!1);
|
|
206
|
+
function Be(e) {
|
|
207
|
+
M.value = e, q.value += 1;
|
|
208
|
+
}
|
|
209
|
+
const S = r(!1);
|
|
210
|
+
function j() {
|
|
211
|
+
S.value = !S.value;
|
|
212
|
+
}
|
|
213
|
+
return xe({
|
|
214
|
+
generatePdf: le,
|
|
215
|
+
generateImage: se,
|
|
216
|
+
toggleAnnotator: j
|
|
217
|
+
}), (e, a) => (s(), i("div", {
|
|
218
|
+
ref_key: "relationCircleChart",
|
|
219
|
+
ref: z,
|
|
220
|
+
class: "vue-ui-relation-circle",
|
|
221
|
+
style: O(`width:100%;background:${l.value.style.backgroundColor};text-align:center;${l.value.responsive ? "height: 100%" : ""}`),
|
|
222
|
+
id: `relation_circle_${L.value}`
|
|
223
|
+
}, [
|
|
224
|
+
l.value.userOptions.buttons.annotator ? (s(), F(rt, {
|
|
225
|
+
key: 0,
|
|
226
|
+
parent: z.value,
|
|
227
|
+
backgroundColor: l.value.style.backgroundColor,
|
|
228
|
+
color: l.value.style.color,
|
|
229
|
+
active: S.value,
|
|
230
|
+
onClose: j
|
|
231
|
+
}, null, 8, ["parent", "backgroundColor", "color", "active"])) : v("", !0),
|
|
232
|
+
we.value ? (s(), i("div", {
|
|
233
|
+
key: 1,
|
|
234
|
+
ref_key: "noTitle",
|
|
235
|
+
ref: K,
|
|
236
|
+
class: "vue-data-ui-no-title-space",
|
|
237
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
238
|
+
}, null, 512)) : v("", !0),
|
|
239
|
+
l.value.style.title.text ? (s(), i("div", {
|
|
240
|
+
key: 2,
|
|
241
|
+
ref_key: "chartTitle",
|
|
242
|
+
ref: H,
|
|
243
|
+
style: "width:100%;background:transparent"
|
|
244
|
+
}, [
|
|
245
|
+
(s(), F(lt, {
|
|
246
|
+
key: `title_${Q.value}`,
|
|
247
|
+
config: {
|
|
248
|
+
title: {
|
|
249
|
+
cy: "relation-div-title",
|
|
250
|
+
...l.value.style.title
|
|
251
|
+
},
|
|
252
|
+
subtitle: {
|
|
253
|
+
cy: "relation-div-subtitle",
|
|
254
|
+
...l.value.style.title.subtitle
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}, null, 8, ["config"]))
|
|
258
|
+
], 512)) : v("", !0),
|
|
259
|
+
l.value.userOptions.show && T.value ? (s(), F(at, {
|
|
260
|
+
ref: "details",
|
|
261
|
+
key: `user_options_${q.value}`,
|
|
262
|
+
backgroundColor: l.value.style.backgroundColor,
|
|
263
|
+
color: l.value.style.color,
|
|
264
|
+
isPrinting: d(ee),
|
|
265
|
+
isImaging: d(te),
|
|
266
|
+
uid: L.value,
|
|
267
|
+
hasPdf: l.value.userOptions.buttons.pdf,
|
|
268
|
+
hasImg: l.value.userOptions.buttons.img,
|
|
269
|
+
hasFullscreen: l.value.userOptions.buttons.img,
|
|
270
|
+
hasXls: !1,
|
|
271
|
+
isFullscreen: M.value,
|
|
272
|
+
titles: { ...l.value.userOptions.buttonTitles },
|
|
273
|
+
chartElement: z.value,
|
|
274
|
+
position: l.value.userOptions.position,
|
|
275
|
+
hasAnnotator: l.value.userOptions.buttons.annotator,
|
|
276
|
+
isAnnotation: S.value,
|
|
277
|
+
onToggleFullscreen: Be,
|
|
278
|
+
onGeneratePdf: d(le),
|
|
279
|
+
onGenerateImage: d(se),
|
|
280
|
+
onToggleAnnotator: j
|
|
281
|
+
}, We({ _: 2 }, [
|
|
282
|
+
e.$slots.optionPdf ? {
|
|
283
|
+
name: "optionPdf",
|
|
284
|
+
fn: B(() => [
|
|
285
|
+
k(e.$slots, "optionPdf", {}, void 0, !0)
|
|
286
|
+
]),
|
|
287
|
+
key: "0"
|
|
288
|
+
} : void 0,
|
|
289
|
+
e.$slots.optionImg ? {
|
|
290
|
+
name: "optionImg",
|
|
291
|
+
fn: B(() => [
|
|
292
|
+
k(e.$slots, "optionImg", {}, void 0, !0)
|
|
293
|
+
]),
|
|
294
|
+
key: "1"
|
|
295
|
+
} : void 0,
|
|
296
|
+
e.$slots.optionFullscreen ? {
|
|
297
|
+
name: "optionFullscreen",
|
|
298
|
+
fn: B(({ toggleFullscreen: t, isFullscreen: n }) => [
|
|
299
|
+
k(e.$slots, "optionFullscreen", A(W({ toggleFullscreen: t, isFullscreen: n })), void 0, !0)
|
|
300
|
+
]),
|
|
301
|
+
key: "2"
|
|
302
|
+
} : void 0,
|
|
303
|
+
e.$slots.optionAnnotator ? {
|
|
304
|
+
name: "optionAnnotator",
|
|
305
|
+
fn: B(({ toggleAnnotator: t, isAnnotator: n }) => [
|
|
306
|
+
k(e.$slots, "optionAnnotator", A(W({ toggleAnnotator: t, isAnnotator: n })), void 0, !0)
|
|
307
|
+
]),
|
|
308
|
+
key: "3"
|
|
309
|
+
} : void 0
|
|
310
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage"])) : v("", !0),
|
|
311
|
+
T.value ? (s(), i("svg", {
|
|
312
|
+
key: 4,
|
|
313
|
+
xmlns: d(Ze),
|
|
314
|
+
class: D([{ "vue-data-ui-fullscreen--on": M.value, "vue-data-ui-fulscreen--off": !M.value }, "relation-circle"]),
|
|
315
|
+
viewBox: `0 0 ${o.value.width <= 0 ? 10 : o.value.width} ${o.value.height <= 0 ? 10 : o.value.height}`,
|
|
316
|
+
width: "100%",
|
|
317
|
+
style: "user-select:none; background:transparent"
|
|
318
|
+
}, [
|
|
319
|
+
De(nt),
|
|
320
|
+
Ve("circle", {
|
|
321
|
+
cx: (o.value.width <= 0 ? 1e-4 : o.value.width) / 2,
|
|
322
|
+
cy: (o.value.height <= 0 ? 1e-4 : o.value.height) / 2 + l.value.style.circle.offsetY,
|
|
323
|
+
r: b.value <= 0 ? 1e-4 : b.value,
|
|
324
|
+
stroke: l.value.style.circle.stroke,
|
|
325
|
+
"stroke-width": l.value.style.circle.strokeWidth,
|
|
326
|
+
fill: "transparent",
|
|
327
|
+
class: "main-circle"
|
|
328
|
+
}, null, 8, dt),
|
|
329
|
+
_e.value ? (s(), i("g", vt, [
|
|
330
|
+
(s(!0), i(C, null, P(h.value, (t, n) => (s(), i("path", {
|
|
331
|
+
key: `relation_${n}`,
|
|
332
|
+
style: O(de(t)),
|
|
333
|
+
stroke: p(t),
|
|
334
|
+
class: D(["relation", { "vue-ui-relation-circle-selected": u.value.hasOwnProperty("id") && g.value.includes(t.id) }]),
|
|
335
|
+
d: `M${t.x1},${t.y1} C${t.x1},${t.y1} ${o.value.width / 2},${o.value.height / 2 + l.value.style.circle.offsetY} ${t.x2},${t.y2}`,
|
|
336
|
+
fill: "none",
|
|
337
|
+
"stroke-width": R(t),
|
|
338
|
+
"stroke-linecap": "round"
|
|
339
|
+
}, null, 14, yt))), 128)),
|
|
340
|
+
(s(!0), i(C, null, P(h.value, (t, n) => (s(), i("g", ft, [
|
|
341
|
+
$(t) ? k(e.$slots, "dataLabel", A(ye({ key: 0 }, {
|
|
342
|
+
x: t.midPointBezier.x,
|
|
343
|
+
y: t.midPointBezier.y,
|
|
344
|
+
color: p(t),
|
|
345
|
+
weight: t.weight,
|
|
346
|
+
fontSize: m.value
|
|
347
|
+
})), void 0, !0) : v("", !0),
|
|
348
|
+
$(t) && !e.$slots.dataLabel ? (s(), i("circle", {
|
|
349
|
+
key: 1,
|
|
350
|
+
cx: t.midPointBezier.x,
|
|
351
|
+
cy: t.midPointBezier.y,
|
|
352
|
+
fill: p(t),
|
|
353
|
+
r: m.value,
|
|
354
|
+
stroke: l.value.style.backgroundColor,
|
|
355
|
+
"stroke-width": "1"
|
|
356
|
+
}, null, 8, ht)) : v("", !0),
|
|
357
|
+
$(t) && !e.$slots.dataLabel ? (s(), i("text", {
|
|
358
|
+
key: 2,
|
|
359
|
+
x: t.midPointBezier.x,
|
|
360
|
+
y: t.midPointBezier.y + m.value / 3,
|
|
361
|
+
fill: d(ge)(p(t)),
|
|
362
|
+
"text-anchor": "middle",
|
|
363
|
+
"font-size": m.value
|
|
364
|
+
}, E(d(V)(
|
|
365
|
+
l.value.style.weightLabels.formatter,
|
|
366
|
+
t.weight,
|
|
367
|
+
d(X)({
|
|
368
|
+
p: l.value.style.weightLabels.prefix,
|
|
369
|
+
v: t.weight,
|
|
370
|
+
s: l.value.style.weightLabels.suffix,
|
|
371
|
+
r: l.value.style.weightLabels.rounding
|
|
372
|
+
}),
|
|
373
|
+
{ ...t }
|
|
374
|
+
)), 9, gt)) : v("", !0)
|
|
375
|
+
]))), 256))
|
|
376
|
+
])) : (s(), i("g", mt, [
|
|
377
|
+
(s(!0), i(C, null, P(h.value, (t, n) => (s(), i("line", {
|
|
378
|
+
key: `relation_${n}`,
|
|
379
|
+
stroke: p(t),
|
|
380
|
+
"stroke-width": R(t),
|
|
381
|
+
style: O(de(t)),
|
|
382
|
+
x1: t.x1,
|
|
383
|
+
x2: t.x2,
|
|
384
|
+
y1: t.y1,
|
|
385
|
+
y2: t.y2,
|
|
386
|
+
class: D({ "vue-ui-relation-circle-selected": u.value.hasOwnProperty("id") && g.value.includes(t.id) }),
|
|
387
|
+
"stroke-linecap": "round"
|
|
388
|
+
}, null, 14, kt))), 128)),
|
|
389
|
+
(s(!0), i(C, null, P(h.value, (t, n) => (s(), i("g", xt, [
|
|
390
|
+
$(t) ? k(e.$slots, "dataLabel", A(ye({ key: 0 }, {
|
|
391
|
+
x: t.midPointLine.x,
|
|
392
|
+
y: t.midPointLine.y,
|
|
393
|
+
color: p(t),
|
|
394
|
+
weight: t.weight,
|
|
395
|
+
fontSize: m.value
|
|
396
|
+
})), void 0, !0) : v("", !0),
|
|
397
|
+
$(t) && !e.$slots.dataLabel && l.value.style.weightLabels.show ? (s(), i("circle", {
|
|
398
|
+
key: 1,
|
|
399
|
+
cx: t.midPointLine.x,
|
|
400
|
+
cy: t.midPointLine.y,
|
|
401
|
+
fill: p(t),
|
|
402
|
+
r: m.value,
|
|
403
|
+
stroke: l.value.style.backgroundColor,
|
|
404
|
+
"stroke-width": "1"
|
|
405
|
+
}, null, 8, pt)) : v("", !0),
|
|
406
|
+
$(t) && !e.$slots.dataLabel && l.value.style.weightLabels.show ? (s(), i("text", {
|
|
407
|
+
key: 2,
|
|
408
|
+
x: t.midPointLine.x,
|
|
409
|
+
y: t.midPointLine.y + m.value / 3,
|
|
410
|
+
fill: d(ge)(p(t)),
|
|
411
|
+
"text-anchor": "middle",
|
|
412
|
+
"font-size": m.value
|
|
413
|
+
}, E(d(V)(
|
|
414
|
+
l.value.style.weightLabels.formatter,
|
|
415
|
+
t.weight,
|
|
416
|
+
d(X)({
|
|
417
|
+
p: l.value.style.weightLabels.prefix,
|
|
418
|
+
v: t.weight,
|
|
419
|
+
s: l.value.style.weightLabels.suffix,
|
|
420
|
+
r: l.value.style.weightLabels.rounding
|
|
421
|
+
}),
|
|
422
|
+
{ ...t }
|
|
423
|
+
)), 9, wt)) : v("", !0)
|
|
424
|
+
]))), 256))
|
|
425
|
+
])),
|
|
426
|
+
(s(!0), i(C, null, P(w.value, (t, n) => (s(), i("text", {
|
|
427
|
+
key: `plot_text_${n}`,
|
|
428
|
+
"text-anchor": Ie(t),
|
|
429
|
+
transform: Fe(t),
|
|
430
|
+
x: Me(t),
|
|
431
|
+
y: t.y + 5,
|
|
432
|
+
onClick: (y) => ve(t),
|
|
433
|
+
class: "vue-ui-relation-circle-legend",
|
|
434
|
+
"transform-origin": "start",
|
|
435
|
+
"font-weight": u.value.id === t.id ? "900" : "400",
|
|
436
|
+
style: O(`font-family:${l.value.style.fontFamily};${Se(t)}`),
|
|
437
|
+
"font-size": ne.value,
|
|
438
|
+
fill: l.value.style.labels.color
|
|
439
|
+
}, E(t.label) + " (" + E(d(V)(
|
|
440
|
+
l.value.style.weightLabels.formatter,
|
|
441
|
+
t.totalWeight,
|
|
442
|
+
d(X)({
|
|
443
|
+
p: l.value.style.weightLabels.prefix,
|
|
444
|
+
v: t.totalWeight,
|
|
445
|
+
s: l.value.style.weightLabels.suffix,
|
|
446
|
+
r: l.value.style.weightLabels.rounding
|
|
447
|
+
}),
|
|
448
|
+
{ ...t }
|
|
449
|
+
)) + ") ", 13, bt))), 128)),
|
|
450
|
+
(s(!0), i(C, null, P(w.value, (t, n) => (s(), i("circle", {
|
|
451
|
+
cx: t.x,
|
|
452
|
+
cy: t.y,
|
|
453
|
+
key: `plot_${n}`,
|
|
454
|
+
style: O(Ae(t)),
|
|
455
|
+
class: "vue-ui-relation-circle-plot",
|
|
456
|
+
fill: l.value.style.plot.useSerieColor ? t.color : l.value.style.plot.color,
|
|
457
|
+
stroke: l.value.style.backgroundColor,
|
|
458
|
+
"stroke-width": "1",
|
|
459
|
+
onClick: (y) => ve(t),
|
|
460
|
+
r: ie.value
|
|
461
|
+
}, null, 12, _t))), 128)),
|
|
462
|
+
k(e.$slots, "svg", { svg: o.value }, void 0, !0)
|
|
463
|
+
], 10, ct)) : v("", !0),
|
|
464
|
+
e.$slots.watermark ? (s(), i("div", $t, [
|
|
465
|
+
k(e.$slots, "watermark", A(W({ isPrinting: d(ee) || d(te) })), void 0, !0)
|
|
466
|
+
])) : v("", !0),
|
|
467
|
+
e.$slots.source ? (s(), i("div", {
|
|
468
|
+
key: 6,
|
|
469
|
+
ref_key: "source",
|
|
470
|
+
ref: J,
|
|
471
|
+
dir: "auto"
|
|
472
|
+
}, [
|
|
473
|
+
k(e.$slots, "source", {}, void 0, !0)
|
|
474
|
+
], 512)) : v("", !0),
|
|
475
|
+
T.value ? v("", !0) : (s(), F(it, {
|
|
476
|
+
key: 7,
|
|
477
|
+
config: {
|
|
478
|
+
type: "relationCircle",
|
|
479
|
+
style: {
|
|
480
|
+
backgroundColor: l.value.style.backgroundColor,
|
|
481
|
+
relationCircle: {
|
|
482
|
+
color: "#CCCCCC"
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
}, null, 8, ["config"]))
|
|
487
|
+
], 12, ot));
|
|
488
|
+
}
|
|
489
|
+
}, Et = /* @__PURE__ */ ut(Ct, [["__scopeId", "data-v-f7051bc9"]]);
|
|
490
|
+
export {
|
|
491
|
+
Et as default
|
|
492
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-B5Ugkauv.cjs"),J=require("./useResponsive-BJ7DTGpm.cjs"),xe=require("./Title-D9gPXVTT.cjs"),K=require("./usePrinter-DtpFEgOX.cjs"),we=require("./vue-ui-skeleton-E9_X0-sa.cjs"),Q=require("./useNestedProp-bZitLnbb.cjs"),be=require("./PackageVersion-CMtZxTqq.cjs"),Ce=require("./PenAndPaper-DWYhyZye.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),_e=["id"],Pe=["xmlns","viewBox"],$e=["cx","cy","r","stroke","stroke-width"],Le={key:0},ze=["stroke","d","stroke-width"],Ee={style:{"pointer-events":"none"}},Se=["cx","cy","fill","r","stroke"],Oe=["x","y","fill","font-size"],Ae={key:1},Ne=["stroke","stroke-width","x1","x2","y1","y2"],Ie={style:{"pointer-events":"none"}},Fe=["cx","cy","fill","r","stroke"],Me=["x","y","fill","font-size"],Ve=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],Te=["cx","cy","fill","stroke","onClick","r"],Re={key:5,class:"vue-data-ui-watermark"},je={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(Z,{expose:ee}){const y=Z;e.useCssVars(t=>({"7693a9d2":ae.value,"65d94d14":oe.value,fa445a50:se.value}));const{vue_ui_relation_circle:te}=o.useConfig(),_=e.computed(()=>!!y.dataset&&Object.keys(y.dataset).length),x=e.ref(o.createUid()),S=e.ref(0),w=e.ref(null),O=e.ref(null),A=e.ref(null),N=e.ref(null),I=e.ref(0),r=e.computed({get:()=>F(),set:t=>t});function F(){const t=Q.useNestedProp({userConfig:y.config,defaultConfig:te});return t.theme?{...Q.useNestedProp({userConfig:o.themes.vue_ui_relation_circle[t.theme]||y.config,defaultConfig:t}),customPalette:o.themePalettes[t.theme]||o.palette}:t}e.watch(()=>y.config,t=>{r.value=F(),G(),I.value+=1},{deep:!0});const{isPrinting:M,isImaging:V,generatePdf:T,generateImage:R}=K.usePrinter({elementId:`relation_circle_${x.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle"}),le=e.computed(()=>r.value.userOptions.show&&!r.value.style.title.text),j=e.computed(()=>o.convertCustomPalette(r.value.customPalette)),h=e.ref([]),d=e.ref([]),s=e.ref({}),v=e.ref([]),re=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),D=e.ref(r.value.style.plot.radius),q=e.ref(r.value.style.labels.fontSize),i=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}}),ne=e.computed(()=>r.value.style.links.curved),oe=e.computed(()=>`${r.value.style.animation.speedMs}ms`),ae=e.computed(()=>m.value*2),se=e.computed(()=>m.value*4),b=e.ref(null);e.onMounted(()=>{G(),document.getElementById(`relation_circle_${x.value}`).addEventListener("click",U)});function G(){if(o.objectIsEmpty(y.dataset)?o.error({componentName:"VueUiRelationCircle",type:"dataset"}):y.dataset.forEach((t,n)=>{o.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(l=>{o.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:l,index:n})})}),r.value.responsive){const t=J.throttle(()=>{const{width:n,height:l}=J.useResponsive({chart:w.value,title:r.value.style.title.text?O.value:null,source:A.value,noTitle:N.value});k.value=Math.min(n,l),i.value.width=n,i.value.height=l,m.value=k.value*r.value.style.circle.radiusProportion,h.value=[],d.value=[],W(),Y(),f.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.weightLabels.size,threshold:6,fallback:6}),D.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.plot.radius,threshold:1,fallback:1}),q.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.labels.fontSize,threshold:6,fallback:6})});b.value=new ResizeObserver(t),b.value.observe(w.value.parentNode)}else h.value=[],d.value=[],W(),Y()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${x.value}`).removeEventListener("click",U),b.value&&b.value.disconnect()});function U(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")||(s.value={},v.value=[])}function W(){const t=6.28319/P.value.length,n=360/P.value.length;let l=0,a=0;P.value.forEach((c,u)=>{const z=c.weights.reduce((ke,pe)=>ke+pe,0),E=m.value*Math.cos(l)+i.value.width/2,me=m.value*Math.sin(l)+i.value.height/2+r.value.style.circle.offsetY;h.value.push({x:E,y:me,...c,color:c.color?c.color:j.value[u]?j.value[u]:o.palette[u],regAngle:a,totalWeight:z}),l+=t,a+=n})}function ie(t,n){const l=(t.x+n.x)/2,a=(t.y+n.y)/2;return{x:l,y:a}}function Y(){d.value=[],h.value.forEach(t=>{h.value.filter(l=>l.relations.includes(t.id)).forEach((l,a)=>{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:ie({x:t.x,y:t.y},{x:l.x,y:l.y}),midPointBezier:ue({x1:t.x,x2:l.x,y1:t.y,y2:l.y}),...t})})})}function ue(t){const n={x:t.x1,y:t.y1},l={x:t.x2,y:t.y2},a={x:t.x1,y:t.y1},c={x:i.value.width/2,y:i.value.height/2+r.value.style.circle.offsetY},u=.5,z=Math.pow(1-u,3)*n.x+3*Math.pow(1-u,2)*u*a.x+3*(1-u)*Math.pow(u,2)*c.x+Math.pow(u,3)*l.x,E=Math.pow(1-u,3)*n.y+3*Math.pow(1-u,2)*u*a.y+3*(1-u)*Math.pow(u,2)*c.y+Math.pow(u,3)*l.y;return{x:z,y:E}}const ce=e.computed(()=>Math.max(...d.value.map(t=>t.weight)));function de(t){return Object.hasOwn(s.value,"x")?v.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function g(t){return t.colorSource}function X(t){return Object.hasOwn(s.value,"x")?v.value.includes(t.id)&&t.relationId===`${t.id}_${s.value.id}`||t.relationId===`${s.value.id}_${t.id}`?`opacity:1;stroke-width:${$(t)}`:"opacity: 0":"opacity: 1"}function p(t){return Object.hasOwn(s.value,"x")?!!(v.value.includes(t.id)&&t.relationId===`${t.id}_${s.value.id}`||t.relationId===`${s.value.id}_${t.id}`):!1}function ve(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function fe(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function ye(t){return Object.hasOwn(s.value,"x")?s.value.id===t.id||v.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function ge(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function H(t){re.value=360-t.regAngle,s.value.id&&t.id===s.value.id?(s.value={},v.value=[]):(s.value=t,v.value=[...t.relations])}function $(t){const n=t.weight/ce.value*r.value.style.links.maxWidth;return Math.max(.3,n)}const C=e.ref(!1);function he(t){C.value=t,S.value+=1}const B=e.ref(!1);function L(){B.value=!B.value}return ee({generatePdf:T,generateImage:R,toggleAnnotator:L}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:w,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_${x.value}`},[r.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ce.PenAndPaper,{key:0,parent:w.value,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,active:B.value,onClose:L},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),le.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:N,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:O,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(xe._sfc_main,{key:`title_${I.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.openBlock(),e.createBlock(K.UserOptions,{ref:"details",key:`user_options_${S.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(M),isImaging:e.unref(V),uid:x.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:w.value,position:r.value.userOptions.position,hasAnnotator:r.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:he,onGeneratePdf:e.unref(T),onGenerateImage:e.unref(R),onToggleAnnotator:L},e.createSlots({_:2},[t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:a})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:a})),void 0,!0)]),key:"2"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:a})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:a})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),_.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(o.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value},"relation-circle"]),viewBox:`0 0 ${i.value.width<=0?10:i.value.width} ${i.value.height<=0?10:i.value.height}`,width:"100%",style:"user-select:none; background:transparent"},[e.createVNode(be._sfc_main),e.createElementVNode("circle",{cx:(i.value.width<=0?1e-4:i.value.width)/2,cy:(i.value.height<=0?1e-4:i.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,$e),ne.value?(e.openBlock(),e.createElementBlock("g",Le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${a}`,style:e.normalizeStyle(X(l)),stroke:g(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":s.value.hasOwnProperty("id")&&v.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${i.value.width/2},${i.value.height/2+r.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":$(l),"stroke-linecap":"round"},null,14,ze))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",Ee,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.normalizeProps(e.mergeProps({key: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,Se)):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(o.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Oe)):e.createCommentVNode("",!0)]))),256))])):(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${a}`,stroke:g(l),"stroke-width":$(l),style:e.normalizeStyle(X(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":s.value.hasOwnProperty("id")&&v.value.includes(l.id)}),"stroke-linecap":"round"},null,14,Ne))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",Ie,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.normalizeProps(e.mergeProps({key: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,Fe)):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(o.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Me)):e.createCommentVNode("",!0)]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,a)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${a}`,"text-anchor":ve(l),transform:ge(l),x:fe(l),y:l.y+5,onClick:c=>H(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":s.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${ye(l)}`),"font-size":q.value,fill:r.value.style.labels.color},e.toDisplayString(l.label)+" ("+e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.totalWeight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.totalWeight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l}))+") ",13,Ve))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,a)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${a}`,style:e.normalizeStyle(de(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=>H(l),r:D.value},null,12,Te))),128)),e.renderSlot(t.$slots,"svg",{svg:i.value},void 0,!0)],10,Pe)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Re,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(M)||e.unref(V)})),void 0,!0)])):e.createCommentVNode("",!0),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:A,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),_.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(we.default,{key:7,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],12,_e))}},De=Be._export_sfc(je,[["__scopeId","data-v-f7051bc9"]]);exports.default=De;
|