vue-data-ui 2.3.74 → 2.3.76
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-DK6F5Fq3.cjs → Arrow-D7M4-bW7.cjs} +1 -1
- package/dist/{Arrow-CYCrAySW.js → Arrow-DY9RKUmG.js} +1 -1
- package/dist/{BaseIcon-DBHVtm3A.cjs → BaseIcon-DB7Apwv_.cjs} +1 -1
- package/dist/{BaseIcon-kBIAYqUO.js → BaseIcon-rwm-10Hu.js} +1 -1
- package/dist/{DataTable-BNFSPjhv.cjs → DataTable-CsNozyz7.cjs} +1 -1
- package/dist/{DataTable-CKdV-L0e.js → DataTable-e2fnfjXV.js} +2 -2
- package/dist/{Legend-Cj7T-DqJ.js → Legend-5cQ0xZjK.js} +1 -1
- package/dist/{Legend-Do2kcWFT.cjs → Legend-DgFd-O0m.cjs} +1 -1
- package/dist/{Shape-Bo8ZjViG.js → Shape-CiTElr_0.js} +1 -1
- package/dist/{Shape-DRDUAe_o.cjs → Shape-yPECDLiP.cjs} +1 -1
- package/dist/{Slicer-D8jHSP7U.cjs → Slicer-DaZgCKV7.cjs} +1 -1
- package/dist/{Slicer-4nGKvUYF.js → Slicer-DwBBu3kB.js} +2 -2
- package/dist/{Title-D5cATWsL.cjs → Title-3EduyW4p.cjs} +1 -1
- package/dist/{Title-DZjnxQdN.js → Title-gUz6GDA3.js} +1 -1
- package/dist/{Tooltip-B8yLaegk.cjs → Tooltip-DScSrYXJ.cjs} +1 -1
- package/dist/{Tooltip--kgFEVZs.js → Tooltip-DfSM1mNP.js} +1 -1
- package/dist/{index-D_32ZGWd.cjs → index-BTgtr0F8.cjs} +1 -1
- package/dist/{index-C8SH0f2u.js → index-CaV1s-yZ.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-BvvH633N.cjs → useNestedProp-CisbRRo_.cjs} +1 -1
- package/dist/{useNestedProp-lS_T5lM3.js → useNestedProp-tWCzZrLx.js} +1 -1
- package/dist/{usePrinter-BouFNHWR.cjs → usePrinter-DzTaA1eh.cjs} +1 -1
- package/dist/{usePrinter-Dj50NAxo.js → usePrinter-rvJyT65A.js} +1 -1
- package/dist/{vue-data-ui-v_BbbLtJ.cjs → vue-data-ui-BGkWRPUY.cjs} +1 -1
- package/dist/{vue-data-ui-DoXqU7xC.js → vue-data-ui-BO89gTtq.js} +57 -57
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-CnoPOJHm.js → vue-ui-3d-bar-CcTMIHiB.js} +499 -486
- package/dist/vue-ui-3d-bar-DzmcGuqh.cjs +19 -0
- package/dist/{vue-ui-accordion-Cka6b_Up.cjs → vue-ui-accordion-7e4Myhcg.cjs} +1 -1
- package/dist/{vue-ui-accordion-YHleIgkV.js → vue-ui-accordion-CpzGQ63y.js} +3 -3
- package/dist/vue-ui-age-pyramid-C7qr9EwB.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-CENg8fDg.js → vue-ui-age-pyramid-D71ZLkVV.js} +182 -169
- package/dist/{vue-ui-annotator-VJOLUkqJ.js → vue-ui-annotator-B8Iu6cYt.js} +1 -1
- package/dist/{vue-ui-annotator-ByYg6QMs.cjs → vue-ui-annotator-BKQrweqm.cjs} +1 -1
- package/dist/{vue-ui-candlestick-CHsGD3bx.js → vue-ui-candlestick-Bx4QVkY0.js} +295 -279
- package/dist/vue-ui-candlestick-DAc1FQ-i.cjs +2 -0
- package/dist/vue-ui-carousel-table-uFRqkghO.cjs +1 -0
- package/dist/{vue-ui-carousel-table-RAtX3VBu.js → vue-ui-carousel-table-xuQG6bcH.js} +146 -129
- package/dist/{vue-ui-chestnut-B5GQX0J_.js → vue-ui-chestnut-Bo6rDcU7.js} +215 -204
- package/dist/vue-ui-chestnut-DJkm72oD.cjs +6 -0
- package/dist/{vue-ui-cursor-DnZqLj21.cjs → vue-ui-cursor-BQbeuW-k.cjs} +1 -1
- package/dist/{vue-ui-cursor-CMm7XSSG.js → vue-ui-cursor-C0KOqEOq.js} +2 -2
- package/dist/{vue-ui-dashboard-DgEQJnLr.cjs → vue-ui-dashboard-0Hsjx-bO.cjs} +1 -1
- package/dist/{vue-ui-dashboard-Ck_5L3eu.js → vue-ui-dashboard-BT71xS7P.js} +2 -2
- package/dist/{vue-ui-digits--ULH35um.js → vue-ui-digits-BRqpKYvD.js} +2 -2
- package/dist/{vue-ui-digits-UvwUdi6U.cjs → vue-ui-digits-C2ReH6w0.cjs} +1 -1
- package/dist/{vue-ui-donut-QQ1fWWvc.js → vue-ui-donut-NQW-3prf.js} +376 -362
- package/dist/vue-ui-donut-evolution-DOe-cwLi.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-Cx8kBB_7.js → vue-ui-donut-evolution-jbXQQGTc.js} +270 -255
- package/dist/vue-ui-donut-v81suIOX.cjs +1 -0
- package/dist/vue-ui-dumbbell-DXQSg6wa.cjs +9 -0
- package/dist/{vue-ui-dumbbell-BYvwHpU8.js → vue-ui-dumbbell-Dyz8xdtC.js} +232 -213
- package/dist/vue-ui-flow-BL3JWW1m.js +481 -0
- package/dist/vue-ui-flow-UqSNwH9d.cjs +1 -0
- package/dist/vue-ui-galaxy-DTQWGvRH.cjs +1 -0
- package/dist/{vue-ui-galaxy-B0L57aec.js → vue-ui-galaxy-Dx9nsOuM.js} +175 -162
- package/dist/vue-ui-gauge-BUB7H0qA.cjs +1 -0
- package/dist/vue-ui-gauge-CLaKGi0-.js +500 -0
- package/dist/vue-ui-gizmo-Kitfqu0J.cjs +1 -0
- package/dist/{vue-ui-gizmo-D2RfM55X.js → vue-ui-gizmo-of-4s5HG.js} +66 -53
- package/dist/{vue-ui-heatmap-DKM0DH41.js → vue-ui-heatmap-BIzjOMXO.js} +157 -143
- package/dist/vue-ui-heatmap-DUw2350O.cjs +1 -0
- package/dist/vue-ui-kpi-By3YPwgo.js +98 -0
- package/dist/vue-ui-kpi-DyL2Hcz-.cjs +1 -0
- package/dist/{vue-ui-mini-loader-CLP19Txv.cjs → vue-ui-mini-loader-C048-8Kd.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-MywnWlYI.js → vue-ui-mini-loader-DnK3V2z2.js} +2 -2
- package/dist/{vue-ui-molecule-CLI9iTRE.js → vue-ui-molecule-BfhbIqa5.js} +177 -167
- package/dist/vue-ui-molecule-D-ahly6R.cjs +1 -0
- package/dist/vue-ui-mood-radar-DD8R9BpJ.cjs +1 -0
- package/dist/{vue-ui-mood-radar-O30wZo9a.js → vue-ui-mood-radar-DXxEKr3x.js} +172 -161
- package/dist/{vue-ui-nested-donuts-D8o4TqTt.js → vue-ui-nested-donuts-BdUdHFd-.js} +377 -364
- package/dist/vue-ui-nested-donuts-C7qM_FRw.cjs +17 -0
- package/dist/{vue-ui-onion-Hmcke6xB.js → vue-ui-onion-D0vF5jBt.js} +191 -177
- package/dist/vue-ui-onion-DX3gofXZ.cjs +5 -0
- package/dist/{vue-ui-parallel-coordinate-plot-CyChE3NP.js → vue-ui-parallel-coordinate-plot-CTZY-pY8.js} +298 -284
- package/dist/vue-ui-parallel-coordinate-plot-DEx5kFYd.cjs +8 -0
- package/dist/{vue-ui-quadrant-DimTQdAj.js → vue-ui-quadrant-ByY8GP3y.js} +347 -334
- package/dist/vue-ui-quadrant-CgApzie6.cjs +1 -0
- package/dist/{vue-ui-quick-chart-DxJvENid.js → vue-ui-quick-chart-DTxJ__7j.js} +483 -469
- package/dist/vue-ui-quick-chart-DWZEgUJF.cjs +15 -0
- package/dist/{vue-ui-radar-D_FieunT.js → vue-ui-radar-5UBmAU6W.js} +202 -189
- package/dist/vue-ui-radar-DEED0rTz.cjs +1 -0
- package/dist/{vue-ui-rating-BHW2Onru.cjs → vue-ui-rating-Ce_Ewqtl.cjs} +1 -1
- package/dist/{vue-ui-rating-DF1BpH4E.js → vue-ui-rating-Dr6jquxh.js} +2 -2
- package/dist/vue-ui-relation-circle-BU8i2miI.js +322 -0
- package/dist/vue-ui-relation-circle-CRcQ6Zcy.cjs +1 -0
- package/dist/{vue-ui-rings-BqS-iece.js → vue-ui-rings-Ctl3Jywh.js} +203 -189
- package/dist/vue-ui-rings-OQ8a1Ruw.cjs +2 -0
- package/dist/vue-ui-scatter-B8StSjt8.cjs +1 -0
- package/dist/{vue-ui-scatter-Dns49Nht.js → vue-ui-scatter-BwJ_koWT.js} +284 -270
- package/dist/{vue-ui-screenshot-5Gsnd0Wr.js → vue-ui-screenshot-BS3L5vhN.js} +1 -1
- package/dist/{vue-ui-screenshot---q062Kd.cjs → vue-ui-screenshot-bAVk3EPl.cjs} +1 -1
- package/dist/{vue-ui-skeleton-fVPw-oIR.cjs → vue-ui-skeleton-CMQzFTs9.cjs} +1 -1
- package/dist/{vue-ui-skeleton-B4eWLjH3.js → vue-ui-skeleton-CvFX_ExX.js} +2 -2
- package/dist/{vue-ui-smiley-B8Tyunn3.js → vue-ui-smiley-CGYZpNt9.js} +2 -2
- package/dist/{vue-ui-smiley-YfHmv0rQ.cjs → vue-ui-smiley-sF8QIso1.cjs} +1 -1
- package/dist/vue-ui-spark-trend-B4XSSKl9.js +263 -0
- package/dist/vue-ui-spark-trend-CdIoxaqb.cjs +1 -0
- package/dist/{vue-ui-sparkbar-9DBvdYn7.js → vue-ui-sparkbar-BbsJGDMZ.js} +95 -87
- package/dist/vue-ui-sparkbar-C3i1K7hi.cjs +1 -0
- package/dist/vue-ui-sparkgauge-BKyQoI7C.cjs +1 -0
- package/dist/vue-ui-sparkgauge-D4w_i_QJ.js +178 -0
- package/dist/{vue-ui-sparkhistogram-BBUVmco4.js → vue-ui-sparkhistogram-CYybrW-6.js} +79 -68
- package/dist/vue-ui-sparkhistogram-CvTYEmbz.cjs +1 -0
- package/dist/vue-ui-sparkline-CDowaDRS.cjs +1 -0
- package/dist/{vue-ui-sparkline-CeqNV6Re.js → vue-ui-sparkline-DjN1SVdO.js} +142 -123
- package/dist/{vue-ui-sparkstackbar-C3GMC1eW.js → vue-ui-sparkstackbar-BLMhJxaN.js} +120 -104
- package/dist/vue-ui-sparkstackbar-BZ2bESBi.cjs +1 -0
- package/dist/{vue-ui-stackbar-DyGPrFxi.js → vue-ui-stackbar-BTKOHUYc.js} +235 -222
- package/dist/vue-ui-stackbar-DRHaJFR8.cjs +6 -0
- package/dist/vue-ui-strip-plot-DxQxFbWg.cjs +1 -0
- package/dist/{vue-ui-strip-plot-y1AnVJmq.js → vue-ui-strip-plot-o6GTsGAT.js} +246 -232
- package/dist/{vue-ui-table-xWvAQS-s.cjs → vue-ui-table-BFIj1Rgh.cjs} +1 -1
- package/dist/{vue-ui-table-B4kfykAO.js → vue-ui-table-CnquiTpr.js} +1 -1
- package/dist/vue-ui-table-heatmap-CCGK12Fa.cjs +1 -0
- package/dist/{vue-ui-table-heatmap-YZRSzwRM.js → vue-ui-table-heatmap-CZRIwv-Q.js} +106 -95
- package/dist/{vue-ui-table-sparkline-C0v2r4Kf.js → vue-ui-table-sparkline-B3zEeq6Z.js} +151 -138
- package/dist/vue-ui-table-sparkline-DYmgfHz4.cjs +1 -0
- package/dist/{vue-ui-thermometer-D5qurIy7.js → vue-ui-thermometer-BopiohUh.js} +116 -104
- package/dist/vue-ui-thermometer-CzPRBt6c.cjs +1 -0
- package/dist/vue-ui-timer-Bonw69Lt.cjs +64 -0
- package/dist/{vue-ui-timer-VWjovnKL.js → vue-ui-timer-C7WkW8hK.js} +191 -176
- package/dist/{vue-ui-tiremarks-jH6cdQOJ.js → vue-ui-tiremarks-BurRtFv4.js} +115 -103
- package/dist/vue-ui-tiremarks-DkIGfq8t.cjs +1 -0
- package/dist/vue-ui-treemap-CalhJmnp.cjs +1 -0
- package/dist/{vue-ui-treemap-BCc5sQLB.js → vue-ui-treemap-DWy4voIr.js} +251 -237
- package/dist/{vue-ui-vertical-bar-2In_g5iC.js → vue-ui-vertical-bar-CJW1YhtY.js} +314 -299
- package/dist/vue-ui-vertical-bar-rwWp-sai.cjs +4 -0
- package/dist/{vue-ui-waffle-OzU830VX.js → vue-ui-waffle-DB7X6nTS.js} +285 -265
- package/dist/vue-ui-waffle-faQMBYNx.cjs +1 -0
- package/dist/vue-ui-wheel-BzjbGP6a.cjs +1 -0
- package/dist/vue-ui-wheel-CryKap2E.js +255 -0
- package/dist/vue-ui-word-cloud-COqUkvei.js +512 -0
- package/dist/vue-ui-word-cloud-DJN9I4q4.cjs +1 -0
- package/dist/vue-ui-xy-BmA0tspd.cjs +3 -0
- package/dist/{vue-ui-xy-DuJtYXKl.js → vue-ui-xy-b1Z_HPsx.js} +300 -274
- package/dist/{vue-ui-xy-canvas-CKibMJHh.js → vue-ui-xy-canvas-BgbLnY5B.js} +345 -327
- package/dist/vue-ui-xy-canvas-DOM2Kq_s.cjs +9 -0
- package/package.json +1 -1
- package/dist/vue-ui-3d-bar-CwCEoPX-.cjs +0 -19
- package/dist/vue-ui-age-pyramid-GqCNpd_h.cjs +0 -1
- package/dist/vue-ui-candlestick-TdNVq_FX.cjs +0 -2
- package/dist/vue-ui-carousel-table-yXUSFk2u.cjs +0 -1
- package/dist/vue-ui-chestnut-EJj-dQSY.cjs +0 -6
- package/dist/vue-ui-donut-BqUBysA_.cjs +0 -1
- package/dist/vue-ui-donut-evolution-BXtEnop4.cjs +0 -1
- package/dist/vue-ui-dumbbell-CjIh7KTm.cjs +0 -9
- package/dist/vue-ui-flow-hp0Hpuhn.js +0 -469
- package/dist/vue-ui-flow-u29zqSQj.cjs +0 -1
- package/dist/vue-ui-galaxy-DE1HbBi-.cjs +0 -1
- package/dist/vue-ui-gauge-B_IZrsfj.cjs +0 -1
- package/dist/vue-ui-gauge-CPyyn7cL.js +0 -488
- package/dist/vue-ui-gizmo-DR4gacOL.cjs +0 -1
- package/dist/vue-ui-heatmap-DMB_eUpA.cjs +0 -1
- package/dist/vue-ui-kpi-BAxAY13T.js +0 -84
- package/dist/vue-ui-kpi-BD21xshi.cjs +0 -1
- package/dist/vue-ui-molecule-BNsWckH-.cjs +0 -1
- package/dist/vue-ui-mood-radar-BsWE1f8R.cjs +0 -1
- package/dist/vue-ui-nested-donuts-CYyUtXs2.cjs +0 -17
- package/dist/vue-ui-onion-D7TXJu5w.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-BqZB7xKn.cjs +0 -8
- package/dist/vue-ui-quadrant-BPDTvxlT.cjs +0 -1
- package/dist/vue-ui-quick-chart-C_-ut0if.cjs +0 -15
- package/dist/vue-ui-radar-C5Kq19hg.cjs +0 -1
- package/dist/vue-ui-relation-circle-4kIYttRI.js +0 -310
- package/dist/vue-ui-relation-circle-DHMHHsqY.cjs +0 -1
- package/dist/vue-ui-rings-BqPS8NKl.cjs +0 -2
- package/dist/vue-ui-scatter-BLVcdf3d.cjs +0 -1
- package/dist/vue-ui-spark-trend-Dpv6am0Z.cjs +0 -1
- package/dist/vue-ui-spark-trend-Em9OqYyG.js +0 -251
- package/dist/vue-ui-sparkbar-BuSuwQYl.cjs +0 -1
- package/dist/vue-ui-sparkgauge-BN5feBzp.js +0 -167
- package/dist/vue-ui-sparkgauge-DKtUZMv1.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-BmuusW02.cjs +0 -1
- package/dist/vue-ui-sparkline-Blzv-tIQ.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-D__WDEMv.cjs +0 -1
- package/dist/vue-ui-stackbar-DFqJ5K_q.cjs +0 -6
- package/dist/vue-ui-strip-plot-z9fjJ6Dj.cjs +0 -1
- package/dist/vue-ui-table-heatmap-CGKecjtm.cjs +0 -1
- package/dist/vue-ui-table-sparkline-CHFZG3Tg.cjs +0 -1
- package/dist/vue-ui-thermometer-DoOxxVW1.cjs +0 -1
- package/dist/vue-ui-timer-D63zHe-I.cjs +0 -64
- package/dist/vue-ui-tiremarks-Cp8YEmXh.cjs +0 -1
- package/dist/vue-ui-treemap-DJrdEFW5.cjs +0 -1
- package/dist/vue-ui-vertical-bar-BfJJqN_z.cjs +0 -4
- package/dist/vue-ui-waffle-A2gmRbq0.cjs +0 -1
- package/dist/vue-ui-wheel-C9QXzWu1.js +0 -242
- package/dist/vue-ui-wheel-DGSh9VKq.cjs +0 -1
- package/dist/vue-ui-word-cloud-C2ZaVlfO.js +0 -498
- package/dist/vue-ui-word-cloud-DPFB1MYk.cjs +0 -1
- package/dist/vue-ui-xy-C-2-aijE.cjs +0 -3
- package/dist/vue-ui-xy-canvas-D7wf3xab.cjs +0 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-BTgtr0F8.cjs"),Z=require("./useResponsive-B3TrDDIG.cjs"),ge=require("./Title-3EduyW4p.cjs"),ee=require("./usePrinter-DzTaA1eh.cjs"),he=require("./Tooltip-DScSrYXJ.cjs"),me=require("./vue-ui-sparkbar-C3i1K7hi.cjs"),fe=require("./Legend-DgFd-O0m.cjs"),ye=require("./DataTable-CsNozyz7.cjs"),ke=require("./vue-ui-skeleton-CMQzFTs9.cjs"),be=require("./vue-ui-accordion-7e4Myhcg.cjs"),te=require("./useNestedProp-CisbRRo_.cjs"),Ce=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),we=["id"],Be=["xmlns","viewBox"],_e=["id"],$e=["stop-color"],xe=["stop-color"],Pe={key:0},Ne=["x1","y1","x2","y2","stroke","stroke-width"],Te={key:0},Se=["d","stroke","stroke-width"],Ee=["d","stroke","stroke-width"],Ve={key:1},Fe=["x","y","text-anchor","font-size","fill","onMouseenter"],Le=["points","stroke","stroke-width"],ze=["points","stroke","stroke-width","fill"],Oe={key:2},Ae=["cx","cy","fill","r","stroke"],Ie={key:3,class:"vue-data-ui-watermark"},Re=["onClick"],De={key:0,style:{"max-width":"200px",margin:"0 auto"}},Me={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(oe,{expose:ae,emit:le}){const d=oe,{vue_ui_radar:re}=n.useConfig(),k=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),m=e.ref(n.createUid()),ne=e.ref(null),x=e.ref(!1),P=e.ref(""),F=e.ref(0),b=e.ref(null),L=e.ref(null),z=e.ref(null),O=e.ref(0),A=e.ref(0),I=e.ref(0),t=e.computed({get:()=>R(),set:o=>o});function R(){const o=te.useNestedProp({userConfig:d.config,defaultConfig:re});return o.theme?{...te.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}e.watch(()=>d.config,o=>{t.value=R(),D(),O.value+=1,A.value+=1,I.value+=1},{deep:!0});const B=e.ref(null);function D(){if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=Z.throttle(()=>{const{width:a,height:l}=Z.useResponsive({chart:b.value,title:t.value.style.chart.title.text?L.value:null,legend:t.value.style.chart.legend.show?z.value:null});s.value.width=a,s.value.height=l});B.value=new ResizeObserver(o),B.value.observe(b.value.parentNode)}}e.onMounted(()=>{D()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:M,isImaging:q,generatePdf:U,generateImage:G}=ee.usePrinter({elementId:`vue-ui-radar_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),W=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),g=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),ue=e.computed(()=>({style:{backgroundColor:t.value.style.chart.tooltip.backgroundColor,animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),s=e.ref({height:312,width:512}),i=e.ref([]),C=e.ref(null),f=e.ref(!1);function H(o){f.value=!0,i.value.includes(o)?(C.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{f.value=!1,C.value=null},500)):(i.value.push(o),setTimeout(()=>{f.value=!1},500)),le("selectLegend",y.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function se(){return y.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const v=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?n.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${l} at index ${a}`,index:a})})}),[null,void 0].includes(d.dataset.series)?n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:l,index:a})})}),d.dataset.categories.map((o,a)=>({name:o.name,categoryId:`radar_category_${m.value}_${a}`,color:n.convertColorToHex(o.color)||W.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),p=e.computed(()=>k.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||W.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${m.value}_${a}`,formatter:o.formatter||null})):[]),X=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),j=e.computed(()=>p.value.length),N=e.computed(()=>Math.min(s.value.width,s.value.height)/3),Y=e.computed(()=>n.createPolygonPath({plot:{x:s.value.width/2,y:s.value.height/2},radius:N.value,sides:j.value,rotation:0})),ie=e.computed(()=>{const o=[];for(let a=0;a<N.value;a+=N.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),h=e.computed(()=>Y.value.coordinates.map((o,a)=>{const l=p.value[a].values.map(r=>ce({centerX:s.value.width/2,centerY:s.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(p.value[a].target||X.value)}));return{...o,...p.value[a],plots:l}}));function T({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>s.value.width/2&&(o+=12,l="start"),o<s.value.width/2&&(o-=12,l="end"),a>s.value.height/2&&(a+=20),a<s.value.height/2&&(a-=12),a===s.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function ce({centerX:o,centerY:a,apexX:l,apexY:r,proportion:u}){return{x:o+(l-o)*u,y:a+(r-a)*u}}const y=e.computed(()=>{const o=p.value.map((a,l)=>a.values.map(r=>r/(a.target||X.value)));return v.value.map((a,l)=>({...a,totalProportion:n.checkNaN(o.map(r=>r[l]).reduce((r,u)=>r+u,0)/p.value.length),shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>H(l),isSegregated:i.value.includes(l)}))}),de=e.computed(()=>({cy:"radar-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":""})),_=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...y.value],a=d.dataset.series.map(r=>[r.name,n.applyDataLabel(r.formatter,r.target,n.dataLabel({p:r.prefix,v:r.target,s:r.suffix,r:t.value.table.td.roundingValue})),...r.values.map((u,c)=>`${n.applyDataLabel(r.formatter,u,n.dataLabel({p:v.value[c].prefix,v:u,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(u/r.target)?"":n.dataLabel({v:u/r.target*100,s:"%",r:t.value.table.td.roundingPercentage})})`)]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:o,body:a,config:l,colNames:o}}),$=e.ref(null),S=e.ref([]),E=e.ref(null);function ve(o,a){S.value=[],$.value=a,x.value=!0;let l="";E.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value})))P.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value});else{l+=`<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>`;for(let u=0;u<o.values.length;u+=1)i.value.includes(u)||S.value.push({name:v.value[u].name,value:o.values[u]/o.target*100,color:v.value[u].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[u].prefix??"",v:o.values[u],s:v.value[u].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});P.value=l}}function J(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...y.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,Ue)=>[c.name,c.target,...c.values.flatMap(V=>[V,isNaN(V/c.target)?"":V/c.target*100])]),r=o.concat([a]).concat(l),u=n.createCsvContent(r);n.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const w=e.ref(!1);function pe(o){w.value=o,F.value+=1}function K(){g.value.showTable=!g.value.showTable}function Q(){g.value.showTooltip=!g.value.showTooltip}return ae({getData:se,generatePdf:U,generateCsv:J,generateImage:G,toggleTable:K,toggleTooltip:Q}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${w.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:b,id:`vue-ui-radar_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:L,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[(e.openBlock(),e.createBlock(ge._sfc_main,{key:`title_${O.value}`,config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value?(e.openBlock(),e.createBlock(ee.UserOptions,{ref_key:"details",ref:ne,key:`user_options_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(q),isPrinting:e.unref(M),uid:m.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:w.value,isTooltip:g.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(U),onGenerateCsv:J,onGenerateImage:e.unref(G),onToggleTable:K,onToggleTooltip:Q},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":w.value,"vue-data-ui-fulscreen--off":!w.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:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${m.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(l.color,.05)}${e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]}`},null,8,$e),e.createElementVNode("stop",{offset:"100%","stop-color":l.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,xe)],8,_e))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.width/2,y1:s.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Ne))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",Te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ie.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:s.value.width/2,y:s.value.height/2},radius:l,sides:j.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Se))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:Y.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Ee),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:T(l).x,y:T(l).y,"text-anchor":T(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:u=>ve(l,r),onMouseleave:a[0]||(a[0]=u=>{x.value=!1,$.value=null})},e.toDisplayString(l.name),41,Fe))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-radar-path":"",points:e.unref(n.makePath)(h.value.map(u=>u.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":f.value&&C.value===r&&t.value.useCssAnimation})},null,10,Le)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,"data-cy-radar-path":"",points:e.unref(n.makePath)(h.value.map(u=>u.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${m.value}_${r})`:l.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity],class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":f.value&&C.value===r&&t.value.useCssAnimation})},null,10,ze)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(u,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:$.value!==null&&$.value===r?t.value.style.chart.layout.plots.radius*1.6:t.value.style.chart.layout.plots.radius,stroke:i.value.includes(c)?"transparent":t.value.style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":i.value.includes(c)&&t.value.useCssAnimation,"animated-in":f.value&&C.value===c&&t.value.useCssAnimation})},null,10,Ae))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:s.value},void 0,!0)],14,Be)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(M)||e.unref(q)})),void 0,!0)])):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke.default,{key:4,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:t.value.style.chart.layout.outerPolygon.stroke},shapes:{color:t.value.style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:z},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(fe.Legend,{key:`legend_${I.value}`,legendSet:y.value,config:de.value,onClickMarker:a[1]||(a[1]=({i:l})=>H(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({v:l.totalProportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})),13,Re)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:y.value},void 0,!0)],512),e.createVNode(he._sfc_main,{show:g.value.showTooltip&&x.value,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,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,fontSize:t.value.style.chart.tooltip.fontSize,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:b.value,content:P.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...E.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof t.value.style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",De,[e.createVNode(me.default,{dataset:S.value,config:ue.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity},null,8,["dataset","config","backgroundOpacity"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...E.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isCustom"]),k.value?(e.openBlock(),e.createBlock(be.default,{key:5,hideDetails:"",config:{open:g.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(ye.DataTable,{key:`table_${A.value}`,colNames:_.value.colNames,head:_.value.head,body:_.value.body,config:_.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>g.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,we))}},qe=Ce._export_sfc(Me,[["__scopeId","data-v-9855cfb0"]]);exports.default=qe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-D_32ZGWd.cjs"),C=require("./useNestedProp-BvvH633N.cjs"),V=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},F=["src","height","width"],A=["xmlns","height","width"],D=["id"],R=["stop-color"],X=["stop-color"],j=["points","fill","stroke","stroke-width"],I=["src","alt","height","width","id"],O=["xmlns","viewBox","height","id"],Y=["id"],G=["stop-color"],L=["stop-color"],q=["points","fill","stroke"],T=["xmlns","height"],U=["onClick","onMouseenter","onKeyup"],H=["onMouseenter"],K={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup($,{expose:k,emit:S}){const s=$,{vue_ui_rating:_}=n.useConfig(),d=e.ref(n.createUid()),p=e.ref(!1),r=e.ref(void 0),g=e.ref([]),t=e.computed(()=>C.useNestedProp({userConfig:s.config,defaultConfig:_})),b=e.computed(()=>typeof s.dataset.rating=="object"&&!Array.isArray(s.dataset.rating)?z(s.dataset.rating):s.dataset.rating),N=e.computed(()=>typeof s.dataset.rating=="object"&&!Array.isArray(s.dataset.rating)),i=e.ref(b.value),f=e.ref(t.value.type==="image"),c=e.ref(t.value.readonly);function z(o){let a=0,l=0;for(const u in o){const E=parseInt(u),h=o[u];a+=E*h,l+=h}if(l===0)return 0;const v=a/l;return Math.min(t.value.to,Math.max(t.value.from,v))}e.onMounted(()=>{n.objectIsEmpty(s.dataset)&&n.error({componentName:"VueUiRating",type:"dataset"});for(let o=t.value.from;o<=t.value.to;o+=1)g.value.push(o)});function y(o,a=!1){return o>r.value||c.value?a?t.value.style.image.inactiveOpacity:t.value.style.star.inactiveColor:a?1:t.value.style.star.useGradient?`url(#star_gradient_under_${d.value})`:t.value.style.star.activeColor}function m(o,a=!1){const l=i.value-o,v=a?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*v;default:return l*v}}function x(o){c.value||(i.value=o,S("rate",o))}function w(){return i.value}function B(o=!0){c.value=o}return k({getData:w,toggleReadonly:B}),(o,a)=>(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:a[2]||(a[2]=l=>p.value=!0),onMouseleave:a[3]||(a[3]=l=>{p.value=!1,r.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(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),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(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.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`)},[f.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:y(l,!0)}`)},null,12,F)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(n.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(n.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,R),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,X)],8,D)]),e.createElementVNode("polygon",{points:e.unref(n.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(r.value)?t.value.style.star.inactiveColor:y(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:r.value?y(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,j)],8,A)),f.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,${m(v,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,I)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${m(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(n.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,G),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,L)],8,Y)]),e.createElementVNode("polygon",{points:e.unref(n.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,q)],8,O)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(n.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=>x(l),onMouseenter:u=>r.value=l,onMouseleave:a[0]||(a[0]=u=>r.value=void 0),tabindex:"0",onKeyup:e.withKeys(u=>x(l),["enter"])},null,40,U)),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=>r.value=l,onMouseleave:a[1]||(a[1]=u=>r.value=void 0)},null,40,H)):e.createCommentVNode("",!0)],12,T)),t.value.style.tooltip.show&&N.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:${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.createTextVNode(" : "),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(s.dataset.rating[l]),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(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),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(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0)],36))}},P=V._export_sfc(K,[["__scopeId","data-v-86ced882"]]);exports.default=P;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-BTgtr0F8.cjs"),C=require("./useNestedProp-CisbRRo_.cjs"),V=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},F=["src","height","width"],A=["xmlns","height","width"],D=["id"],R=["stop-color"],X=["stop-color"],j=["points","fill","stroke","stroke-width"],I=["src","alt","height","width","id"],O=["xmlns","viewBox","height","id"],Y=["id"],G=["stop-color"],L=["stop-color"],q=["points","fill","stroke"],T=["xmlns","height"],U=["onClick","onMouseenter","onKeyup"],H=["onMouseenter"],K={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup($,{expose:k,emit:S}){const s=$,{vue_ui_rating:_}=n.useConfig(),d=e.ref(n.createUid()),p=e.ref(!1),r=e.ref(void 0),g=e.ref([]),t=e.computed(()=>C.useNestedProp({userConfig:s.config,defaultConfig:_})),b=e.computed(()=>typeof s.dataset.rating=="object"&&!Array.isArray(s.dataset.rating)?z(s.dataset.rating):s.dataset.rating),N=e.computed(()=>typeof s.dataset.rating=="object"&&!Array.isArray(s.dataset.rating)),i=e.ref(b.value),f=e.ref(t.value.type==="image"),c=e.ref(t.value.readonly);function z(o){let a=0,l=0;for(const u in o){const E=parseInt(u),h=o[u];a+=E*h,l+=h}if(l===0)return 0;const v=a/l;return Math.min(t.value.to,Math.max(t.value.from,v))}e.onMounted(()=>{n.objectIsEmpty(s.dataset)&&n.error({componentName:"VueUiRating",type:"dataset"});for(let o=t.value.from;o<=t.value.to;o+=1)g.value.push(o)});function y(o,a=!1){return o>r.value||c.value?a?t.value.style.image.inactiveOpacity:t.value.style.star.inactiveColor:a?1:t.value.style.star.useGradient?`url(#star_gradient_under_${d.value})`:t.value.style.star.activeColor}function m(o,a=!1){const l=i.value-o,v=a?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*v;default:return l*v}}function x(o){c.value||(i.value=o,S("rate",o))}function w(){return i.value}function B(o=!0){c.value=o}return k({getData:w,toggleReadonly:B}),(o,a)=>(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:a[2]||(a[2]=l=>p.value=!0),onMouseleave:a[3]||(a[3]=l=>{p.value=!1,r.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(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),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(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.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`)},[f.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:y(l,!0)}`)},null,12,F)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(n.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(n.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,R),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,X)],8,D)]),e.createElementVNode("polygon",{points:e.unref(n.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(r.value)?t.value.style.star.inactiveColor:y(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:r.value?y(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,j)],8,A)),f.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,${m(v,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,I)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${m(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(n.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,G),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,L)],8,Y)]),e.createElementVNode("polygon",{points:e.unref(n.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,q)],8,O)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(n.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=>x(l),onMouseenter:u=>r.value=l,onMouseleave:a[0]||(a[0]=u=>r.value=void 0),tabindex:"0",onKeyup:e.withKeys(u=>x(l),["enter"])},null,40,U)),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=>r.value=l,onMouseleave:a[1]||(a[1]=u=>r.value=void 0)},null,40,H)):e.createCommentVNode("",!0)],12,T)),t.value.style.tooltip.show&&N.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:${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.createTextVNode(" : "),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(s.dataset.rating[l]),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(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),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(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0)],36))}},P=V._export_sfc(K,[["__scopeId","data-v-86ced882"]]);exports.default=P;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as f, computed as $, onMounted as O, openBlock as l, createElementBlock as i, normalizeStyle as a, createElementVNode as n, toDisplayString as p, createCommentVNode as d, Fragment as E, renderList as L, unref as m, withKeys as U, createTextVNode as D } from "vue";
|
|
2
|
-
import { u as K, c as T, o as H, e as P, X as _, v as N, S as F } from "./index-
|
|
3
|
-
import { u as W } from "./useNestedProp-
|
|
2
|
+
import { u as K, c as T, o as H, e as P, X as _, v as N, S as F } from "./index-CaV1s-yZ.js";
|
|
3
|
+
import { u as W } from "./useNestedProp-tWCzZrLx.js";
|
|
4
4
|
import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const J = {
|
|
6
6
|
key: 0,
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
import { useCssVars as _e, computed as c, ref as u, watch as pe, onMounted as $e, onBeforeUnmount as Ce, openBlock as s, createElementBlock as o, normalizeStyle as h, createBlock as E, createCommentVNode as p, unref as y, createSlots as xe, withCtx as z, renderSlot as $, normalizeProps as K, guardReactiveProps as Q, normalizeClass as L, createElementVNode as we, Fragment as b, renderList as O, toDisplayString as be } from "vue";
|
|
2
|
+
import { u as Oe, c as Pe, t as Ae, a as Ie, p as Z, b as Fe, o as Ee, e as ee, g as ze, X as Le } from "./index-CaV1s-yZ.js";
|
|
3
|
+
import { t as Se, u as Ne } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
+
import { _ as Re } from "./Title-gUz6GDA3.js";
|
|
5
|
+
import { u as Te, U as Me } from "./usePrinter-rvJyT65A.js";
|
|
6
|
+
import je from "./vue-ui-skeleton-CvFX_ExX.js";
|
|
7
|
+
import { u as te } from "./useNestedProp-tWCzZrLx.js";
|
|
8
|
+
import { _ as Be } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
|
+
const Ge = ["id"], Ue = ["xmlns", "viewBox"], De = ["cx", "cy", "r", "stroke", "stroke-width"], Ve = { key: 0 }, We = ["stroke", "d", "stroke-width"], Xe = { key: 1 }, Ye = ["stroke", "x1", "x2", "y1", "y2"], qe = ["text-anchor", "transform", "x", "y", "onClick", "font-weight", "font-size", "fill"], He = ["cx", "cy", "fill", "onClick", "r"], Je = {
|
|
10
|
+
key: 3,
|
|
11
|
+
class: "vue-data-ui-watermark"
|
|
12
|
+
}, Ke = {
|
|
13
|
+
__name: "vue-ui-relation-circle",
|
|
14
|
+
props: {
|
|
15
|
+
dataset: {
|
|
16
|
+
type: Array,
|
|
17
|
+
default() {
|
|
18
|
+
return [];
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
config: {
|
|
22
|
+
type: Object,
|
|
23
|
+
default() {
|
|
24
|
+
return {};
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
setup(le, { expose: re }) {
|
|
29
|
+
const d = le;
|
|
30
|
+
_e((e) => ({
|
|
31
|
+
"41ab2f62": ue.value,
|
|
32
|
+
"04074041": ie.value,
|
|
33
|
+
d2ba1f3a: oe.value
|
|
34
|
+
}));
|
|
35
|
+
const { vue_ui_relation_circle: se } = Oe(), P = c(() => !!d.dataset && Object.keys(d.dataset).length), k = u(Pe()), S = u(0), C = u(null), N = u(null), R = u(0), l = c({
|
|
36
|
+
get: () => T(),
|
|
37
|
+
set: (e) => e
|
|
38
|
+
});
|
|
39
|
+
function T() {
|
|
40
|
+
const e = te({
|
|
41
|
+
userConfig: d.config,
|
|
42
|
+
defaultConfig: se
|
|
43
|
+
});
|
|
44
|
+
return e.theme ? {
|
|
45
|
+
...te({
|
|
46
|
+
userConfig: Ae.vue_ui_relation_circle[e.theme] || d.config,
|
|
47
|
+
defaultConfig: e
|
|
48
|
+
}),
|
|
49
|
+
customPalette: Ie[e.theme] || Z
|
|
50
|
+
} : e;
|
|
51
|
+
}
|
|
52
|
+
pe(() => d.config, (e) => {
|
|
53
|
+
l.value = T(), D(), R.value += 1;
|
|
54
|
+
}, { deep: !0 });
|
|
55
|
+
const { isPrinting: M, isImaging: j, generatePdf: B, generateImage: G } = Te({
|
|
56
|
+
elementId: `relation_circle_${k.value}`,
|
|
57
|
+
fileName: l.value.style.title.text || "vue-ui-relation-circle"
|
|
58
|
+
}), U = c(() => Fe(l.value.customPalette)), f = u([]), m = u([]), a = u({}), v = u([]), ae = u(0), A = c(() => d.dataset.slice(0, l.value.style.limit)), I = u(l.value.style.size), n = u({
|
|
59
|
+
height: l.value.style.size,
|
|
60
|
+
width: l.value.style.size
|
|
61
|
+
}), g = c({
|
|
62
|
+
get() {
|
|
63
|
+
return I.value * l.value.style.circle.radiusProportion;
|
|
64
|
+
},
|
|
65
|
+
set(e) {
|
|
66
|
+
return e;
|
|
67
|
+
}
|
|
68
|
+
}), ne = c(() => l.value.style.links.curved), ie = c(() => `${l.value.style.animation.speedMs}ms`), ue = c(() => g.value * 2), oe = c(() => g.value * 4), x = u(null);
|
|
69
|
+
$e(() => {
|
|
70
|
+
D(), document.getElementById(`relation_circle_${k.value}`).addEventListener("click", V);
|
|
71
|
+
});
|
|
72
|
+
function D() {
|
|
73
|
+
if (Ee(d.dataset) ? ee({
|
|
74
|
+
componentName: "VueUiRelationCircle",
|
|
75
|
+
type: "dataset"
|
|
76
|
+
}) : d.dataset.forEach((e, r) => {
|
|
77
|
+
ze({
|
|
78
|
+
datasetObject: e,
|
|
79
|
+
requiredAttributes: ["id", "label", "relations", "weights"]
|
|
80
|
+
}).forEach((t) => {
|
|
81
|
+
ee({
|
|
82
|
+
componentName: "VueUiRelationCircle",
|
|
83
|
+
type: "datasetSerieAttribute",
|
|
84
|
+
property: t,
|
|
85
|
+
index: r
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
}), l.value.responsive) {
|
|
89
|
+
const e = Se(() => {
|
|
90
|
+
const { width: r, height: t } = Ne({
|
|
91
|
+
chart: C.value,
|
|
92
|
+
title: l.value.style.title.text ? N.value : null
|
|
93
|
+
});
|
|
94
|
+
I.value = Math.min(r, t), n.value.width = r, n.value.height = t, g.value = I.value * l.value.style.circle.radiusProportion, f.value = [], m.value = [], W(), X();
|
|
95
|
+
});
|
|
96
|
+
x.value = new ResizeObserver(e), x.value.observe(C.value.parentNode);
|
|
97
|
+
} else
|
|
98
|
+
f.value = [], m.value = [], W(), X();
|
|
99
|
+
}
|
|
100
|
+
Ce(() => {
|
|
101
|
+
document.getElementById(`relation_circle_${k.value}`).removeEventListener("click", V), x.value && x.value.disconnect();
|
|
102
|
+
});
|
|
103
|
+
function V(e) {
|
|
104
|
+
const r = e.target;
|
|
105
|
+
r && Array.from(r.classList).includes("vue-ui-user-options") || r && Array.from(r.classList).includes("vue-ui-user-options-summary") || r && Array.from(r.classList).includes("vue-data-ui-button") || r && Array.from(r.classList).includes("vue-ui-relation-circle-legend") || (a.value = {}, v.value = []);
|
|
106
|
+
}
|
|
107
|
+
function W() {
|
|
108
|
+
const e = 6.28319 / A.value.length, r = 360 / A.value.length;
|
|
109
|
+
let t = 0, i = 0;
|
|
110
|
+
A.value.forEach((_, F) => {
|
|
111
|
+
const me = g.value * Math.cos(t) + n.value.width / 2, ke = g.value * Math.sin(t) + n.value.height / 2 + l.value.style.circle.offsetY;
|
|
112
|
+
f.value.push({ x: me, y: ke, ..._, color: _.color ? _.color : U.value[F] ? U.value[F] : Z[F], regAngle: i }), t += e, i += r;
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
function X() {
|
|
116
|
+
f.value.forEach((e) => {
|
|
117
|
+
f.value.filter((t) => t.relations.includes(e.id)).forEach((t, i) => {
|
|
118
|
+
m.value.push({
|
|
119
|
+
weight: e.weights && e.weights[i] ? e.weights[i] : 1,
|
|
120
|
+
relationId: `${e.id}_${t.id}`,
|
|
121
|
+
x1: e.x,
|
|
122
|
+
y1: e.y,
|
|
123
|
+
x2: t.x,
|
|
124
|
+
y2: t.y,
|
|
125
|
+
colorSource: e.color,
|
|
126
|
+
colorTarget: t.color,
|
|
127
|
+
...e
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
const ce = c(() => Math.max(...m.value.map((e) => e.weight)));
|
|
133
|
+
function de(e) {
|
|
134
|
+
return Object.hasOwn(a.value, "x") ? v.value.includes(e.id) ? "opacity:1" : "opacity:0.1" : "opacity:1";
|
|
135
|
+
}
|
|
136
|
+
function Y(e) {
|
|
137
|
+
return Object.hasOwn(a.value, "x") ? e.colorTarget : e.colorSource;
|
|
138
|
+
}
|
|
139
|
+
function q(e) {
|
|
140
|
+
return Object.hasOwn(a.value, "x") ? v.value.includes(e.id) && e.relationId === `${e.id}_${a.value.id}` || e.relationId === `${a.value.id}_${e.id}` ? `opacity:1;stroke-width:${J(e)}` : "opacity: 0" : "opacity: 1";
|
|
141
|
+
}
|
|
142
|
+
function ve(e) {
|
|
143
|
+
return e.regAngle > 90 && e.regAngle < 270 ? "end" : "start";
|
|
144
|
+
}
|
|
145
|
+
function fe(e) {
|
|
146
|
+
return e.regAngle > 90 && e.regAngle < 270 ? e.x - 5 : e.x + 5;
|
|
147
|
+
}
|
|
148
|
+
function ge(e) {
|
|
149
|
+
return Object.hasOwn(a.value, "x") ? a.value.id === e.id || v.value.includes(e.id) ? "opacity:1" : "opacity:0.2" : "opacity:1";
|
|
150
|
+
}
|
|
151
|
+
function he(e) {
|
|
152
|
+
return e.regAngle > 90 && e.regAngle < 270 ? `rotate(${e.regAngle + 180},${e.x},${e.y})` : `rotate(${e.regAngle},${e.x},${e.y})`;
|
|
153
|
+
}
|
|
154
|
+
function H(e) {
|
|
155
|
+
ae.value = 360 - e.regAngle, a.value.id && e.id === a.value.id ? (a.value = {}, v.value = []) : (a.value = e, v.value = [...e.relations]);
|
|
156
|
+
}
|
|
157
|
+
function J(e) {
|
|
158
|
+
return e.weight / ce.value * l.value.style.links.maxWidth;
|
|
159
|
+
}
|
|
160
|
+
const w = u(!1);
|
|
161
|
+
function ye(e) {
|
|
162
|
+
w.value = e, S.value += 1;
|
|
163
|
+
}
|
|
164
|
+
return re({
|
|
165
|
+
generatePdf: B,
|
|
166
|
+
generateImage: G
|
|
167
|
+
}), (e, r) => (s(), o("div", {
|
|
168
|
+
ref_key: "relationCircleChart",
|
|
169
|
+
ref: C,
|
|
170
|
+
class: "vue-ui-relation-circle",
|
|
171
|
+
style: h(`width:100%;background:${l.value.style.backgroundColor};text-align:center;${l.value.responsive ? "height: 100%" : ""}`),
|
|
172
|
+
id: `relation_circle_${k.value}`
|
|
173
|
+
}, [
|
|
174
|
+
l.value.style.title.text ? (s(), o("div", {
|
|
175
|
+
key: 0,
|
|
176
|
+
ref_key: "chartTitle",
|
|
177
|
+
ref: N,
|
|
178
|
+
style: h(`width:100%;background:${l.value.style.backgroundColor}`)
|
|
179
|
+
}, [
|
|
180
|
+
(s(), E(Re, {
|
|
181
|
+
key: `title_${R.value}`,
|
|
182
|
+
config: {
|
|
183
|
+
title: {
|
|
184
|
+
cy: "relation-div-title",
|
|
185
|
+
...l.value.style.title
|
|
186
|
+
},
|
|
187
|
+
subtitle: {
|
|
188
|
+
cy: "relation-div-subtitle",
|
|
189
|
+
...l.value.style.title.subtitle
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}, null, 8, ["config"]))
|
|
193
|
+
], 4)) : p("", !0),
|
|
194
|
+
l.value.userOptions.show && P.value ? (s(), E(Me, {
|
|
195
|
+
ref: "details",
|
|
196
|
+
key: `user_options_${S.value}`,
|
|
197
|
+
backgroundColor: l.value.style.backgroundColor,
|
|
198
|
+
color: l.value.style.color,
|
|
199
|
+
isPrinting: y(M),
|
|
200
|
+
isImaging: y(j),
|
|
201
|
+
uid: k.value,
|
|
202
|
+
hasPdf: l.value.userOptions.buttons.pdf,
|
|
203
|
+
hasImg: l.value.userOptions.buttons.img,
|
|
204
|
+
hasFullscreen: l.value.userOptions.buttons.img,
|
|
205
|
+
hasXls: !1,
|
|
206
|
+
isFullscreen: w.value,
|
|
207
|
+
titles: { ...l.value.userOptions.buttonTitles },
|
|
208
|
+
chartElement: C.value,
|
|
209
|
+
onToggleFullscreen: ye,
|
|
210
|
+
onGeneratePdf: y(B),
|
|
211
|
+
onGenerateImage: y(G)
|
|
212
|
+
}, xe({ _: 2 }, [
|
|
213
|
+
e.$slots.optionPdf ? {
|
|
214
|
+
name: "optionPdf",
|
|
215
|
+
fn: z(() => [
|
|
216
|
+
$(e.$slots, "optionPdf", {}, void 0, !0)
|
|
217
|
+
]),
|
|
218
|
+
key: "0"
|
|
219
|
+
} : void 0,
|
|
220
|
+
e.$slots.optionImg ? {
|
|
221
|
+
name: "optionImg",
|
|
222
|
+
fn: z(() => [
|
|
223
|
+
$(e.$slots, "optionImg", {}, void 0, !0)
|
|
224
|
+
]),
|
|
225
|
+
key: "1"
|
|
226
|
+
} : void 0,
|
|
227
|
+
e.$slots.optionFullscreen ? {
|
|
228
|
+
name: "optionFullscreen",
|
|
229
|
+
fn: z(({ toggleFullscreen: t, isFullscreen: i }) => [
|
|
230
|
+
$(e.$slots, "optionFullscreen", K(Q({ toggleFullscreen: t, isFullscreen: i })), void 0, !0)
|
|
231
|
+
]),
|
|
232
|
+
key: "2"
|
|
233
|
+
} : void 0
|
|
234
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : p("", !0),
|
|
235
|
+
P.value ? (s(), o("svg", {
|
|
236
|
+
key: 2,
|
|
237
|
+
xmlns: y(Le),
|
|
238
|
+
class: L([{ "vue-data-ui-fullscreen--on": w.value, "vue-data-ui-fulscreen--off": !w.value }, "relation-circle"]),
|
|
239
|
+
viewBox: `0 0 ${n.value.width <= 0 ? 10 : n.value.width} ${n.value.height <= 0 ? 10 : n.value.height}`,
|
|
240
|
+
width: "100%",
|
|
241
|
+
style: h(`user-select:none; background:${l.value.style.backgroundColor}`)
|
|
242
|
+
}, [
|
|
243
|
+
we("circle", {
|
|
244
|
+
cx: (n.value.width <= 0 ? 1e-4 : n.value.width) / 2,
|
|
245
|
+
cy: (n.value.height <= 0 ? 1e-4 : n.value.height) / 2 + l.value.style.circle.offsetY,
|
|
246
|
+
r: g.value <= 0 ? 1e-4 : g.value,
|
|
247
|
+
stroke: l.value.style.circle.stroke,
|
|
248
|
+
"stroke-width": l.value.style.circle.strokeWidth,
|
|
249
|
+
fill: "transparent",
|
|
250
|
+
class: "main-circle"
|
|
251
|
+
}, null, 8, De),
|
|
252
|
+
ne.value ? (s(), o("g", Ve, [
|
|
253
|
+
(s(!0), o(b, null, O(m.value, (t, i) => (s(), o("path", {
|
|
254
|
+
key: `relation_${i}`,
|
|
255
|
+
style: h(q(t)),
|
|
256
|
+
stroke: Y(t),
|
|
257
|
+
class: L(["relation", { "vue-ui-relation-circle-selected": a.value.hasOwnProperty("id") && v.value.includes(t.id) }]),
|
|
258
|
+
d: `M${t.x1},${t.y1} C${t.x1},${t.y1} ${n.value.width / 2},${n.value.height / 2 + l.value.style.circle.offsetY} ${t.x2},${t.y2}`,
|
|
259
|
+
fill: "none",
|
|
260
|
+
"stroke-width": J(t),
|
|
261
|
+
"stroke-linecap": "round"
|
|
262
|
+
}, null, 14, We))), 128))
|
|
263
|
+
])) : (s(), o("g", Xe, [
|
|
264
|
+
(s(!0), o(b, null, O(m.value, (t, i) => (s(), o("line", {
|
|
265
|
+
key: `relation_${i}`,
|
|
266
|
+
stroke: Y(t),
|
|
267
|
+
style: h(q(t)),
|
|
268
|
+
x1: t.x1,
|
|
269
|
+
x2: t.x2,
|
|
270
|
+
y1: t.y1,
|
|
271
|
+
y2: t.y2,
|
|
272
|
+
class: L({ "vue-ui-relation-circle-selected": a.value.hasOwnProperty("id") && v.value.includes(t.id) }),
|
|
273
|
+
"stroke-linecap": "round"
|
|
274
|
+
}, null, 14, Ye))), 128))
|
|
275
|
+
])),
|
|
276
|
+
(s(!0), o(b, null, O(f.value, (t, i) => (s(), o("text", {
|
|
277
|
+
key: `plot_text_${i}`,
|
|
278
|
+
"text-anchor": ve(t),
|
|
279
|
+
transform: he(t),
|
|
280
|
+
x: fe(t),
|
|
281
|
+
y: t.y + 5,
|
|
282
|
+
onClick: (_) => H(t),
|
|
283
|
+
class: "vue-ui-relation-circle-legend",
|
|
284
|
+
"transform-origin": "start",
|
|
285
|
+
"font-weight": a.value.id === t.id ? "900" : "400",
|
|
286
|
+
style: h(`font-family:${l.value.style.fontFamily};${ge(t)}`),
|
|
287
|
+
"font-size": l.value.style.labels.fontSize,
|
|
288
|
+
fill: l.value.style.labels.color
|
|
289
|
+
}, be(t.label), 13, qe))), 128)),
|
|
290
|
+
(s(!0), o(b, null, O(f.value, (t, i) => (s(), o("circle", {
|
|
291
|
+
cx: t.x,
|
|
292
|
+
cy: t.y,
|
|
293
|
+
key: `plot_${i}`,
|
|
294
|
+
style: h(de(t)),
|
|
295
|
+
class: "vue-ui-relation-circle-plot",
|
|
296
|
+
fill: l.value.style.plot.color,
|
|
297
|
+
onClick: (_) => H(t),
|
|
298
|
+
r: l.value.style.plot.radius
|
|
299
|
+
}, null, 12, He))), 128)),
|
|
300
|
+
$(e.$slots, "svg", { svg: n.value }, void 0, !0)
|
|
301
|
+
], 14, Ue)) : p("", !0),
|
|
302
|
+
e.$slots.watermark ? (s(), o("div", Je, [
|
|
303
|
+
$(e.$slots, "watermark", K(Q({ isPrinting: y(M) || y(j) })), void 0, !0)
|
|
304
|
+
])) : p("", !0),
|
|
305
|
+
P.value ? p("", !0) : (s(), E(je, {
|
|
306
|
+
key: 4,
|
|
307
|
+
config: {
|
|
308
|
+
type: "relationCircle",
|
|
309
|
+
style: {
|
|
310
|
+
backgroundColor: l.value.style.backgroundColor,
|
|
311
|
+
relationCircle: {
|
|
312
|
+
color: "#CCCCCC"
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}, null, 8, ["config"]))
|
|
317
|
+
], 12, Ge));
|
|
318
|
+
}
|
|
319
|
+
}, nt = /* @__PURE__ */ Be(Ke, [["__scopeId", "data-v-6804a36f"]]);
|
|
320
|
+
export {
|
|
321
|
+
nt as default
|
|
322
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BTgtr0F8.cjs"),V=require("./useResponsive-B3TrDDIG.cjs"),ie=require("./Title-3EduyW4p.cjs"),j=require("./usePrinter-DzTaA1eh.cjs"),oe=require("./vue-ui-skeleton-CMQzFTs9.cjs"),q=require("./useNestedProp-CisbRRo_.cjs"),se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ue=["id"],ce=["xmlns","viewBox"],de=["cx","cy","r","stroke","stroke-width"],ve={key:0},fe=["stroke","d","stroke-width"],ge={key:1},me=["stroke","x1","x2","y1","y2"],ye=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],he=["cx","cy","fill","onClick","r"],ke={key:3,class:"vue-data-ui-watermark"},pe={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(G,{expose:U}){const u=G;e.useCssVars(t=>({"41ab2f62":H.value,"04074041":Y.value,d2ba1f3a:J.value}));const{vue_ui_relation_circle:D}=s.useConfig(),p=e.computed(()=>!!u.dataset&&Object.keys(u.dataset).length),g=e.ref(s.createUid()),x=e.ref(0),y=e.ref(null),w=e.ref(null),b=e.ref(0),r=e.computed({get:()=>B(),set:t=>t});function B(){const t=q.useNestedProp({userConfig:u.config,defaultConfig:D});return t.theme?{...q.useNestedProp({userConfig:s.themes.vue_ui_relation_circle[t.theme]||u.config,defaultConfig:t}),customPalette:s.themePalettes[t.theme]||s.palette}:t}e.watch(()=>u.config,t=>{r.value=B(),z(),b.value+=1},{deep:!0});const{isPrinting:P,isImaging:O,generatePdf:E,generateImage:S}=j.usePrinter({elementId:`relation_circle_${g.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle"}),A=e.computed(()=>s.convertCustomPalette(r.value.customPalette)),d=e.ref([]),f=e.ref([]),a=e.ref({}),c=e.ref([]),W=e.ref(0),_=e.computed(()=>u.dataset.slice(0,r.value.style.limit)),C=e.ref(r.value.style.size),i=e.ref({height:r.value.style.size,width:r.value.style.size}),v=e.computed({get(){return C.value*r.value.style.circle.radiusProportion},set(t){return t}}),X=e.computed(()=>r.value.style.links.curved),Y=e.computed(()=>`${r.value.style.animation.speedMs}ms`),H=e.computed(()=>v.value*2),J=e.computed(()=>v.value*4),h=e.ref(null);e.onMounted(()=>{z(),document.getElementById(`relation_circle_${g.value}`).addEventListener("click",I)});function z(){if(s.objectIsEmpty(u.dataset)?s.error({componentName:"VueUiRelationCircle",type:"dataset"}):u.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=V.throttle(()=>{const{width:n,height:l}=V.useResponsive({chart:y.value,title:r.value.style.title.text?w.value:null});C.value=Math.min(n,l),i.value.width=n,i.value.height=l,v.value=C.value*r.value.style.circle.radiusProportion,d.value=[],f.value=[],F(),N()});h.value=new ResizeObserver(t),h.value.observe(y.value.parentNode)}else d.value=[],f.value=[],F(),N()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${g.value}`).removeEventListener("click",I),h.value&&h.value.disconnect()});function I(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")||(a.value={},c.value=[])}function F(){const t=6.28319/_.value.length,n=360/_.value.length;let l=0,o=0;_.value.forEach((m,$)=>{const ne=v.value*Math.cos(l)+i.value.width/2,ae=v.value*Math.sin(l)+i.value.height/2+r.value.style.circle.offsetY;d.value.push({x:ne,y:ae,...m,color:m.color?m.color:A.value[$]?A.value[$]:s.palette[$],regAngle:o}),l+=t,o+=n})}function N(){d.value.forEach(t=>{d.value.filter(l=>l.relations.includes(t.id)).forEach((l,o)=>{f.value.push({weight:t.weights&&t.weights[o]?t.weights[o]:1,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,...t})})})}const K=e.computed(()=>Math.max(...f.value.map(t=>t.weight)));function Q(t){return Object.hasOwn(a.value,"x")?c.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function L(t){return Object.hasOwn(a.value,"x")?t.colorTarget:t.colorSource}function R(t){return Object.hasOwn(a.value,"x")?c.value.includes(t.id)&&t.relationId===`${t.id}_${a.value.id}`||t.relationId===`${a.value.id}_${t.id}`?`opacity:1;stroke-width:${M(t)}`:"opacity: 0":"opacity: 1"}function Z(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function ee(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function te(t){return Object.hasOwn(a.value,"x")?a.value.id===t.id||c.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function le(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function T(t){W.value=360-t.regAngle,a.value.id&&t.id===a.value.id?(a.value={},c.value=[]):(a.value=t,c.value=[...t.relations])}function M(t){return t.weight/K.value*r.value.style.links.maxWidth}const k=e.ref(!1);function re(t){k.value=t,x.value+=1}return U({generatePdf:E,generateImage:S}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:y,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_${g.value}`},[r.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:w,style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor}`)},[(e.openBlock(),e.createBlock(ie._sfc_main,{key:`title_${b.value}`,config:{title:{cy:"relation-div-title",...r.value.style.title},subtitle:{cy:"relation-div-subtitle",...r.value.style.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),r.value.userOptions.show&&p.value?(e.openBlock(),e.createBlock(j.UserOptions,{ref:"details",key:`user_options_${x.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(P),isImaging:e.unref(O),uid:g.value,hasPdf:r.value.userOptions.buttons.pdf,hasImg:r.value.userOptions.buttons.img,hasFullscreen:r.value.userOptions.buttons.img,hasXls:!1,isFullscreen:k.value,titles:{...r.value.userOptions.buttonTitles},chartElement:y.value,onToggleFullscreen:re,onGeneratePdf:e.unref(E),onGenerateImage:e.unref(S)},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:o})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.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:e.normalizeStyle(`user-select:none; background:${r.value.style.backgroundColor}`)},[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:v.value<=0?1e-4:v.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,de),X.value?(e.openBlock(),e.createElementBlock("g",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,o)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${o}`,style:e.normalizeStyle(R(l)),stroke:L(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":a.value.hasOwnProperty("id")&&c.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":M(l),"stroke-linecap":"round"},null,14,fe))),128))])):(e.openBlock(),e.createElementBlock("g",ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,o)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${o}`,stroke:L(l),style:e.normalizeStyle(R(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":a.value.hasOwnProperty("id")&&c.value.includes(l.id)}),"stroke-linecap":"round"},null,14,me))),128))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${o}`,"text-anchor":Z(l),transform:le(l),x:ee(l),y:l.y+5,onClick:m=>T(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":a.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${te(l)}`),"font-size":r.value.style.labels.fontSize,fill:r.value.style.labels.color},e.toDisplayString(l.label),13,ye))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${o}`,style:e.normalizeStyle(Q(l)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.color,onClick:m=>T(l),r:r.value.style.plot.radius},null,12,he))),128)),e.renderSlot(t.$slots,"svg",{svg:i.value},void 0,!0)],14,ce)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ke,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(P)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(oe.default,{key:4,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],12,ue))}},_e=se._export_sfc(pe,[["__scopeId","data-v-6804a36f"]]);exports.default=_e;
|