vue-data-ui 2.3.38 → 2.3.39
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-C3soCsF0.js → Arrow-B0RusPlY.js} +1 -1
- package/dist/{Arrow-vS43S38d.cjs → Arrow-gLWBasXL.cjs} +1 -1
- package/dist/{BaseIcon-BoEJRb0e.cjs → BaseIcon-Cfy7hUAu.cjs} +1 -1
- package/dist/{BaseIcon-B8hVR5-4.js → BaseIcon-E5xGjSQn.js} +1 -1
- package/dist/{DataTable-DKkvLXwD.js → DataTable-CcVgHrwx.js} +2 -2
- package/dist/{DataTable-BrnFSdXo.cjs → DataTable-D7JJfjpO.cjs} +1 -1
- package/dist/{Legend-D7zc_ula.cjs → Legend-BDgAlEzL.cjs} +1 -1
- package/dist/{Legend-DpiZXeY0.js → Legend-BPGeRVxf.js} +1 -1
- package/dist/{Shape-CWtwGdQ_.cjs → Shape-DDEKu71I.cjs} +1 -1
- package/dist/{Shape-BpneoNiL.js → Shape-DnfO-k8Q.js} +1 -1
- package/dist/{Slicer-DwAQJLPa.cjs → Slicer-BhktgQpC.cjs} +1 -1
- package/dist/{Slicer-CTBvSici.js → Slicer-Dr5g4_di.js} +1 -1
- package/dist/{Title-BvczMERR.cjs → Title-BngFmPpq.cjs} +1 -1
- package/dist/{Title-0FYOLRT9.js → Title-DJW7JJGo.js} +1 -1
- package/dist/{Tooltip-hkjfa0I0.js → Tooltip-pvQzx3z4.js} +1 -1
- package/dist/{Tooltip-QvjV7FFJ.cjs → Tooltip-ztxY4WiA.cjs} +1 -1
- package/dist/{index-6dSPekJy.cjs → index-COMTToJY.cjs} +1 -1
- package/dist/{index-BUQIyeLx.js → index-CQyrBpOX.js} +1 -1
- package/dist/{useNestedProp-CW-4h79P.js → useNestedProp-CK_S9Ya9.js} +1 -1
- package/dist/{useNestedProp-C0FeJ2Gu.cjs → useNestedProp-DJwc68Re.cjs} +1 -1
- package/dist/{usePrinter-Dx2e-dXi.js → usePrinter-BJn_Etby.js} +1 -1
- package/dist/{usePrinter-Si0o8ws0.cjs → usePrinter-THxtdQMP.cjs} +1 -1
- package/dist/{vue-data-ui-SFL-vicz.js → vue-data-ui-9yG_ZuXl.js} +57 -57
- package/dist/{vue-data-ui-BhNefJqd.cjs → vue-data-ui-gHSCvnDy.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-C6K-OwN2.cjs → vue-ui-3d-bar-6G46Xaar.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-SzGt2SPF.js → vue-ui-3d-bar-BqL1MhRd.js} +7 -7
- package/dist/{vue-ui-accordion-COKJwPZR.cjs → vue-ui-accordion-BDkYau8u.cjs} +1 -1
- package/dist/{vue-ui-accordion-B_7G2YRK.js → vue-ui-accordion-DqRnuig6.js} +3 -3
- package/dist/{vue-ui-age-pyramid-BpENrca-.cjs → vue-ui-age-pyramid-BPyJ5l9B.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-CCAD1S4K.js → vue-ui-age-pyramid-IRh5kfKI.js} +8 -8
- package/dist/{vue-ui-annotator-D-af73uG.js → vue-ui-annotator-BlxLsUao.js} +1 -1
- package/dist/{vue-ui-annotator-DVUPNP51.cjs → vue-ui-annotator-CS2-dXB1.cjs} +1 -1
- package/dist/{vue-ui-candlestick-DdObXSwq.cjs → vue-ui-candlestick-D6iWs_w-.cjs} +1 -1
- package/dist/{vue-ui-candlestick-Dafy2mS8.js → vue-ui-candlestick-bqMr_UNG.js} +9 -9
- package/dist/{vue-ui-carousel-table-qft3cy1n.js → vue-ui-carousel-table-BPbrMmZ5.js} +4 -4
- package/dist/{vue-ui-carousel-table-bYSgV27Q.cjs → vue-ui-carousel-table-BmR6Xj7Q.cjs} +1 -1
- package/dist/{vue-ui-chestnut-DCIswacl.js → vue-ui-chestnut-BlhoOgtt.js} +6 -6
- package/dist/{vue-ui-chestnut-DSf7prYO.cjs → vue-ui-chestnut-lh4q8a6L.cjs} +1 -1
- package/dist/{vue-ui-cursor-Dc9Esi6P.cjs → vue-ui-cursor-BWUNJ2kc.cjs} +1 -1
- package/dist/{vue-ui-cursor-C70l6xpc.js → vue-ui-cursor-DwilivV-.js} +2 -2
- package/dist/{vue-ui-dashboard-cG4gRYbw.js → vue-ui-dashboard-B1EdqIcE.js} +2 -2
- package/dist/{vue-ui-dashboard-BQm48CXc.cjs → vue-ui-dashboard-BCeu5EHs.cjs} +1 -1
- package/dist/{vue-ui-digits-CeUaMGOT.cjs → vue-ui-digits-DqGz7C40.cjs} +1 -1
- package/dist/{vue-ui-digits-D0E4R4fa.js → vue-ui-digits-YOnGoYnu.js} +2 -2
- package/dist/{vue-ui-donut-BMMREL4b.cjs → vue-ui-donut-Crhz1o2x.cjs} +1 -1
- package/dist/{vue-ui-donut-BkEBJEsA.js → vue-ui-donut-DJ3z2Uyy.js} +9 -9
- package/dist/{vue-ui-donut-evolution-BlR9YmXE.js → vue-ui-donut-evolution-CGBLKyts.js} +9 -9
- package/dist/{vue-ui-donut-evolution-BdhZKkJR.cjs → vue-ui-donut-evolution-irJ5g-tB.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-WOJbZokq.cjs → vue-ui-dumbbell-C7lYqtns.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-BF7SZx1w.js → vue-ui-dumbbell-YiLDRgnr.js} +8 -8
- package/dist/{vue-ui-flow-C3newyQP.js → vue-ui-flow-B7nJzAUa.js} +7 -7
- package/dist/{vue-ui-flow-D5x8svE5.cjs → vue-ui-flow-C5XhyO1a.cjs} +1 -1
- package/dist/{vue-ui-galaxy-BJHQBQJ6.js → vue-ui-galaxy-CXiYVwzF.js} +9 -9
- package/dist/{vue-ui-galaxy-CIUd-hLW.cjs → vue-ui-galaxy-CkiIGplF.cjs} +1 -1
- package/dist/{vue-ui-gauge-BmXTSe6K.cjs → vue-ui-gauge-Box-ij8Z.cjs} +1 -1
- package/dist/{vue-ui-gauge-BaAskWex.js → vue-ui-gauge-DQdwIuYM.js} +5 -5
- package/dist/{vue-ui-gizmo-k-23quhf.cjs → vue-ui-gizmo-lQ-JQuH5.cjs} +1 -1
- package/dist/{vue-ui-gizmo-nZu_bqHD.js → vue-ui-gizmo-yMLEUprK.js} +2 -2
- package/dist/{vue-ui-heatmap-GQGsHp13.cjs → vue-ui-heatmap-D9uCI4vM.cjs} +1 -1
- package/dist/{vue-ui-heatmap-T885Tnk8.js → vue-ui-heatmap-DdolYuul.js} +8 -8
- package/dist/{vue-ui-kpi-YxP9VEld.cjs → vue-ui-kpi-CcufgDrC.cjs} +1 -1
- package/dist/{vue-ui-kpi-CLlR3RB1.js → vue-ui-kpi-Db-iLGIK.js} +4 -4
- package/dist/{vue-ui-mini-loader-C3STpvno.js → vue-ui-mini-loader-B5ZAVomk.js} +2 -2
- package/dist/{vue-ui-mini-loader-Ci--uadG.cjs → vue-ui-mini-loader-CxJ-z9rE.cjs} +1 -1
- package/dist/{vue-ui-molecule-C75VtN_7.cjs → vue-ui-molecule-C2m9xcdx.cjs} +1 -1
- package/dist/{vue-ui-molecule-BhkU3GG9.js → vue-ui-molecule-DjClBVrK.js} +9 -9
- package/dist/{vue-ui-mood-radar-qkkSh5uu.cjs → vue-ui-mood-radar-CE3utSmC.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-D6TUYY_M.js → vue-ui-mood-radar-UN10Owti.js} +9 -9
- package/dist/{vue-ui-nested-donuts-BZCpf3YO.js → vue-ui-nested-donuts-DUytF3gU.js} +9 -9
- package/dist/{vue-ui-nested-donuts-CMRz1BD7.cjs → vue-ui-nested-donuts-iXADllgD.cjs} +1 -1
- package/dist/{vue-ui-onion-DlpliEql.cjs → vue-ui-onion-BUI2Pkue.cjs} +1 -1
- package/dist/{vue-ui-onion--dpVGKXA.js → vue-ui-onion-D5nX9TfZ.js} +9 -9
- package/dist/{vue-ui-parallel-coordinate-plot-DI2yWHex.js → vue-ui-parallel-coordinate-plot-CXOgpfTc.js} +10 -10
- package/dist/{vue-ui-parallel-coordinate-plot-Bk6c5TU6.cjs → vue-ui-parallel-coordinate-plot-q1BCGfqt.cjs} +1 -1
- package/dist/{vue-ui-quadrant-61FAsLt_.js → vue-ui-quadrant-BF2MCegC.js} +10 -10
- package/dist/{vue-ui-quadrant-DlyQdOTe.cjs → vue-ui-quadrant-g-zHilV9.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-Bo9EatY6.cjs → vue-ui-quick-chart-Ca-2xvNg.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-D9118LBz.js → vue-ui-quick-chart-zvfAdour.js} +6 -6
- package/dist/{vue-ui-radar-DAcOkXYC.cjs → vue-ui-radar-BjPOMUF0.cjs} +1 -1
- package/dist/{vue-ui-radar-VzDbMQrc.js → vue-ui-radar-CzEW9PsS.js} +10 -10
- package/dist/{vue-ui-rating-C9s1UuCt.cjs → vue-ui-rating-BNg7w51y.cjs} +1 -1
- package/dist/{vue-ui-rating-Chd-JwKZ.js → vue-ui-rating-BjmKc3wq.js} +2 -2
- package/dist/{vue-ui-relation-circle-CtIAIfL4.js → vue-ui-relation-circle-BJJ7raSa.js} +5 -5
- package/dist/{vue-ui-relation-circle-Byo0UcEM.cjs → vue-ui-relation-circle-DA3hM60W.cjs} +1 -1
- package/dist/{vue-ui-rings-DgNSeH6a.cjs → vue-ui-rings-DB7ZLrAT.cjs} +1 -1
- package/dist/{vue-ui-rings-CGhwerNx.js → vue-ui-rings-bHA_aSSF.js} +9 -9
- package/dist/{vue-ui-scatter-P_2ULGfQ.js → vue-ui-scatter-B6SJj98H.js} +10 -10
- package/dist/{vue-ui-scatter-B-ojlWTB.cjs → vue-ui-scatter-HNeVup0c.cjs} +1 -1
- package/dist/{vue-ui-screenshot-tFVVwLtm.js → vue-ui-screenshot-BiiJxMC8.js} +1 -1
- package/dist/{vue-ui-screenshot-CI8_1GLp.cjs → vue-ui-screenshot-k4Or7u-C.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BxxNQUrb.js → vue-ui-skeleton-CjYyI3Lv.js} +2 -2
- package/dist/{vue-ui-skeleton-BnEVwnIx.cjs → vue-ui-skeleton-DYdGA7uQ.cjs} +1 -1
- package/dist/{vue-ui-smiley-BQNccgAJ.cjs → vue-ui-smiley-ByuyPzc9.cjs} +1 -1
- package/dist/{vue-ui-smiley-DcpmB774.js → vue-ui-smiley-UjJLCUmA.js} +2 -2
- package/dist/{vue-ui-spark-trend-RL_EM0RZ.js → vue-ui-spark-trend-BLRiuWa6.js} +4 -4
- package/dist/{vue-ui-spark-trend-Bh18Pfrn.cjs → vue-ui-spark-trend-D0PCBdx2.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-IwZY49cH.cjs → vue-ui-sparkbar-TZC1RhBk.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-qP5wp1Am.js → vue-ui-sparkbar-lF45jZmU.js} +3 -3
- package/dist/{vue-ui-sparkgauge-C-irMYQ7.cjs → vue-ui-sparkgauge-BBDYAjXD.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-CieVHHem.js → vue-ui-sparkgauge-BV0puE5M.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-CxE07zkX.js → vue-ui-sparkhistogram-0M-yChB2.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-7PTHSMpu.cjs → vue-ui-sparkhistogram-vCVdP_Vp.cjs} +1 -1
- package/dist/{vue-ui-sparkline-BV32rnNA.js → vue-ui-sparkline-Cxmg-Mpb.js} +3 -3
- package/dist/{vue-ui-sparkline-C4Z1nhoS.cjs → vue-ui-sparkline-mn0nDWC2.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-BPxh6x8e.cjs → vue-ui-sparkstackbar-CKCZgV0u.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-BxVHQmWd.js → vue-ui-sparkstackbar-Dw9Bhm6u.js} +3 -3
- package/dist/{vue-ui-stackbar-BnhTABFS.cjs → vue-ui-stackbar-DH5EbkWA.cjs} +1 -1
- package/dist/{vue-ui-stackbar-BIKMWKTB.js → vue-ui-stackbar-P-SgetqL.js} +10 -10
- package/dist/{vue-ui-strip-plot-Cfev39-s.js → vue-ui-strip-plot-B4L64D2e.js} +9 -9
- package/dist/{vue-ui-strip-plot-BoDJjL5h.cjs → vue-ui-strip-plot-DD1KLWvq.cjs} +1 -1
- package/dist/{vue-ui-table-C8Ky-ayZ.cjs → vue-ui-table-B8VYN1DQ.cjs} +1 -1
- package/dist/{vue-ui-table-cc6HxZm6.js → vue-ui-table-DKlWL1sg.js} +1 -1
- package/dist/{vue-ui-table-heatmap-G0YbR7QX.cjs → vue-ui-table-heatmap-CTq6J5BC.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BJUnCLfJ.js → vue-ui-table-heatmap-CvTl-kYk.js} +4 -4
- package/dist/{vue-ui-table-sparkline-CjB5rPvu.js → vue-ui-table-sparkline-BOmWrdlg.js} +5 -5
- package/dist/{vue-ui-table-sparkline-CB7YeTxk.cjs → vue-ui-table-sparkline-BXem0A7t.cjs} +1 -1
- package/dist/{vue-ui-thermometer-CGwZBdZB.cjs → vue-ui-thermometer-BDnoT676.cjs} +1 -1
- package/dist/{vue-ui-thermometer-oCCUz0GL.js → vue-ui-thermometer-BsuH7l6d.js} +5 -5
- package/dist/{vue-ui-timer-BfXXvGcg.js → vue-ui-timer-CqLYv7at.js} +4 -4
- package/dist/{vue-ui-timer-Ckc70jvb.cjs → vue-ui-timer-FXG91zBm.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-UswjRrUQ.js → vue-ui-tiremarks-B2jU97U6.js} +5 -5
- package/dist/{vue-ui-tiremarks-Di3x1YHW.cjs → vue-ui-tiremarks-CT7yMfna.cjs} +1 -1
- package/dist/{vue-ui-treemap-BcPfm4KP.js → vue-ui-treemap-DSdNtVRs.js} +9 -9
- package/dist/{vue-ui-treemap-CrAw0owp.cjs → vue-ui-treemap-rOLqWnMD.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-BScBqH6z.cjs → vue-ui-vertical-bar-DJBOce-a.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-2_WbKIT1.js → vue-ui-vertical-bar-_ZuU0A54.js} +9 -9
- package/dist/{vue-ui-waffle-Dzi3EgQM.cjs → vue-ui-waffle-BzKAYW6F.cjs} +1 -1
- package/dist/{vue-ui-waffle-CStE_uxm.js → vue-ui-waffle-CKp48kdM.js} +9 -9
- package/dist/{vue-ui-wheel-Eyej3znn.cjs → vue-ui-wheel-6FFJt53W.cjs} +1 -1
- package/dist/{vue-ui-wheel-FI9_Qnln.js → vue-ui-wheel-DPjB5xcl.js} +5 -5
- package/dist/{vue-ui-word-cloud-Ycqmen8O.js → vue-ui-word-cloud-BY_qs7bW.js} +7 -7
- package/dist/{vue-ui-word-cloud-M_xW3qre.cjs → vue-ui-word-cloud-VybUTXFv.cjs} +1 -1
- package/dist/{vue-ui-xy-B5_TQJnd.js → vue-ui-xy-BgBvVtwZ.js} +12 -12
- package/dist/{vue-ui-xy-BrdhxozQ.cjs → vue-ui-xy-CVxPe82S.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-w5aPclyY.js → vue-ui-xy-canvas-B2mkEuiI.js} +10 -10
- package/dist/{vue-ui-xy-canvas-uDottxNK.cjs → vue-ui-xy-canvas-BjPLlJyo.cjs} +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-6dSPekJy.cjs"),R=require("./useResponsive-B3TrDDIG.cjs"),re=require("./Title-BvczMERR.cjs"),T=require("./usePrinter-Si0o8ws0.cjs"),ne=require("./vue-ui-skeleton-BnEVwnIx.cjs"),V=require("./useNestedProp-C0FeJ2Gu.cjs"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],se=["xmlns","viewBox"],oe=["cx","cy","r","stroke","stroke-width"],ue={key:0},ce=["stroke","d","stroke-width"],de={key:1},ve=["stroke","x1","x2","y1","y2"],fe=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],ge=["cx","cy","fill","onClick","r"],me={key:3,class:"vue-data-ui-watermark"},ye={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(M,{expose:j}){const c=M;e.useCssVars(t=>({"6c440314":W.value,"6c6a2a1a":D.value,"7e559f95":X.value}));const{vue_ui_relation_circle:q}=o.useConfig(),p=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length),f=e.ref(o.createUid()),x=e.ref(0),y=e.ref(null),w=e.ref(null),r=e.computed(()=>{const t=V.useNestedProp({userConfig:c.config,defaultConfig:q});return t.theme?{...V.useNestedProp({userConfig:o.themes.vue_ui_relation_circle[t.theme]||c.config,defaultConfig:t}),customPalette:o.themePalettes[t.theme]||o.palette}:t}),{isPrinting:b,isImaging:B,generatePdf:P,generateImage:O}=T.usePrinter({elementId:`relation_circle_${f.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle"}),E=e.computed(()=>o.convertCustomPalette(r.value.customPalette)),v=e.ref([]),g=e.ref([]),a=e.ref({}),u=e.ref([]),G=e.ref(0),_=e.computed(()=>c.dataset.slice(0,r.value.style.limit)),C=e.ref(r.value.style.size),s=e.ref({height:r.value.style.size,width:r.value.style.size}),d=e.computed({get(){return C.value*r.value.style.circle.radiusProportion},set(t){return t}}),U=e.computed(()=>r.value.style.links.curved),D=e.computed(()=>`${r.value.style.animation.speedMs}ms`),W=e.computed(()=>d.value*2),X=e.computed(()=>d.value*4),h=e.ref(null);e.onMounted(()=>{if(o.objectIsEmpty(c.dataset)?o.error({componentName:"VueUiRelationCircle",type:"dataset"}):c.dataset.forEach((i,l)=>{o.getMissingDatasetAttributes({datasetObject:i,requiredAttributes:["id","label","relations","weights"]}).forEach(n=>{o.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:n,index:l})})}),r.value.responsive){const i=R.throttle(()=>{const{width:l,height:n}=R.useResponsive({chart:y.value,title:r.value.style.title.text?w.value:null});C.value=Math.min(l,n),s.value.width=l,s.value.height=n,d.value=C.value*r.value.style.circle.radiusProportion,v.value=[],g.value=[],S(),z()});h.value=new ResizeObserver(i),h.value.observe(y.value.parentNode)}else S(),z();document.getElementById(`relation_circle_${f.value}`).addEventListener("click",A)}),e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${f.value}`).removeEventListener("click",A),h.value&&h.value.disconnect()});function A(t){const i=t.target;i&&Array.from(i.classList).includes("vue-ui-user-options")||i&&Array.from(i.classList).includes("vue-ui-user-options-summary")||i&&Array.from(i.classList).includes("vue-data-ui-button")||i&&Array.from(i.classList).includes("vue-ui-relation-circle-legend")||(a.value={},u.value=[])}function S(){const t=6.28319/_.value.length,i=360/_.value.length;let l=0,n=0;_.value.forEach((m,$)=>{const te=d.value*Math.cos(l)+s.value.width/2,le=d.value*Math.sin(l)+s.value.height/2+r.value.style.circle.offsetY;v.value.push({x:te,y:le,...m,color:m.color?m.color:E.value[$]?E.value[$]:o.palette[$],regAngle:n}),l+=t,n+=i})}function z(){v.value.forEach(t=>{v.value.filter(l=>l.relations.includes(t.id)).forEach((l,n)=>{g.value.push({weight:t.weights&&t.weights[n]?t.weights[n]: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 Y=e.computed(()=>Math.max(...g.value.map(t=>t.weight)));function H(t){return Object.hasOwn(a.value,"x")?u.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function I(t){return Object.hasOwn(a.value,"x")?t.colorTarget:t.colorSource}function F(t){return Object.hasOwn(a.value,"x")?u.value.includes(t.id)&&t.relationId===`${t.id}_${a.value.id}`||t.relationId===`${a.value.id}_${t.id}`?`opacity:1;stroke-width:${L(t)}`:"opacity: 0":"opacity: 1"}function J(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function K(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function Q(t){return Object.hasOwn(a.value,"x")?a.value.id===t.id||u.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function Z(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function N(t){G.value=360-t.regAngle,a.value.id&&t.id===a.value.id?(a.value={},u.value=[]):(a.value=t,u.value=[...t.relations])}function L(t){return t.weight/Y.value*r.value.style.links.maxWidth}const k=e.ref(!1);function ee(t){k.value=t,x.value+=1}return j({generatePdf:P,generateImage:O}),(t,i)=>(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_${f.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.createVNode(re._sfc_main,{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(T.UserOptions,{ref:"details",key:`user_options_${x.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(b),isImaging:e.unref(B),uid:f.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:ee,onGeneratePdf:e.unref(P),onGenerateImage:e.unref(O)},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:n})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),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(o.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value},"relation-circle"]),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,width:"100%",style:e.normalizeStyle(`user-select:none; background:${r.value.style.backgroundColor}`)},[e.createElementVNode("circle",{cx:(s.value.width<=0?1e-4:s.value.width)/2,cy:(s.value.height<=0?1e-4:s.value.height)/2+r.value.style.circle.offsetY,r:d.value<=0?1e-4:d.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,oe),U.value?(e.openBlock(),e.createElementBlock("g",ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,n)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${n}`,style:e.normalizeStyle(F(l)),stroke:I(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":a.value.hasOwnProperty("id")&&u.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${s.value.width/2},${s.value.height/2+r.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":L(l),"stroke-linecap":"round"},null,14,ce))),128))])):(e.openBlock(),e.createElementBlock("g",de,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,n)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${n}`,stroke:I(l),style:e.normalizeStyle(F(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")&&u.value.includes(l.id)}),"stroke-linecap":"round"},null,14,ve))),128))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,n)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${n}`,"text-anchor":J(l),transform:Z(l),x:K(l),y:l.y+5,onClick:m=>N(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};${Q(l)}`),"font-size":r.value.style.labels.fontSize,fill:r.value.style.labels.color},e.toDisplayString(l.label),13,fe))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,n)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${n}`,style:e.normalizeStyle(H(l)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.color,onClick:m=>N(l),r:r.value.style.plot.radius},null,12,ge))),128)),e.renderSlot(t.$slots,"svg",{svg:s.value},void 0,!0)],14,se)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",me,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(b)||e.unref(B)})),void 0,!0)])):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ne.default,{key:4,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],12,ae))}},he=ie._export_sfc(ye,[["__scopeId","data-v-2352f00b"]]);exports.default=he;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-COMTToJY.cjs"),R=require("./useResponsive-B3TrDDIG.cjs"),re=require("./Title-BngFmPpq.cjs"),T=require("./usePrinter-THxtdQMP.cjs"),ne=require("./vue-ui-skeleton-DYdGA7uQ.cjs"),V=require("./useNestedProp-DJwc68Re.cjs"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],se=["xmlns","viewBox"],oe=["cx","cy","r","stroke","stroke-width"],ue={key:0},ce=["stroke","d","stroke-width"],de={key:1},ve=["stroke","x1","x2","y1","y2"],fe=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],ge=["cx","cy","fill","onClick","r"],me={key:3,class:"vue-data-ui-watermark"},ye={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(M,{expose:j}){const c=M;e.useCssVars(t=>({"6c440314":W.value,"6c6a2a1a":D.value,"7e559f95":X.value}));const{vue_ui_relation_circle:q}=o.useConfig(),p=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length),f=e.ref(o.createUid()),x=e.ref(0),y=e.ref(null),w=e.ref(null),r=e.computed(()=>{const t=V.useNestedProp({userConfig:c.config,defaultConfig:q});return t.theme?{...V.useNestedProp({userConfig:o.themes.vue_ui_relation_circle[t.theme]||c.config,defaultConfig:t}),customPalette:o.themePalettes[t.theme]||o.palette}:t}),{isPrinting:b,isImaging:B,generatePdf:P,generateImage:O}=T.usePrinter({elementId:`relation_circle_${f.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle"}),E=e.computed(()=>o.convertCustomPalette(r.value.customPalette)),v=e.ref([]),g=e.ref([]),a=e.ref({}),u=e.ref([]),G=e.ref(0),_=e.computed(()=>c.dataset.slice(0,r.value.style.limit)),C=e.ref(r.value.style.size),s=e.ref({height:r.value.style.size,width:r.value.style.size}),d=e.computed({get(){return C.value*r.value.style.circle.radiusProportion},set(t){return t}}),U=e.computed(()=>r.value.style.links.curved),D=e.computed(()=>`${r.value.style.animation.speedMs}ms`),W=e.computed(()=>d.value*2),X=e.computed(()=>d.value*4),h=e.ref(null);e.onMounted(()=>{if(o.objectIsEmpty(c.dataset)?o.error({componentName:"VueUiRelationCircle",type:"dataset"}):c.dataset.forEach((i,l)=>{o.getMissingDatasetAttributes({datasetObject:i,requiredAttributes:["id","label","relations","weights"]}).forEach(n=>{o.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:n,index:l})})}),r.value.responsive){const i=R.throttle(()=>{const{width:l,height:n}=R.useResponsive({chart:y.value,title:r.value.style.title.text?w.value:null});C.value=Math.min(l,n),s.value.width=l,s.value.height=n,d.value=C.value*r.value.style.circle.radiusProportion,v.value=[],g.value=[],S(),z()});h.value=new ResizeObserver(i),h.value.observe(y.value.parentNode)}else S(),z();document.getElementById(`relation_circle_${f.value}`).addEventListener("click",A)}),e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${f.value}`).removeEventListener("click",A),h.value&&h.value.disconnect()});function A(t){const i=t.target;i&&Array.from(i.classList).includes("vue-ui-user-options")||i&&Array.from(i.classList).includes("vue-ui-user-options-summary")||i&&Array.from(i.classList).includes("vue-data-ui-button")||i&&Array.from(i.classList).includes("vue-ui-relation-circle-legend")||(a.value={},u.value=[])}function S(){const t=6.28319/_.value.length,i=360/_.value.length;let l=0,n=0;_.value.forEach((m,$)=>{const te=d.value*Math.cos(l)+s.value.width/2,le=d.value*Math.sin(l)+s.value.height/2+r.value.style.circle.offsetY;v.value.push({x:te,y:le,...m,color:m.color?m.color:E.value[$]?E.value[$]:o.palette[$],regAngle:n}),l+=t,n+=i})}function z(){v.value.forEach(t=>{v.value.filter(l=>l.relations.includes(t.id)).forEach((l,n)=>{g.value.push({weight:t.weights&&t.weights[n]?t.weights[n]: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 Y=e.computed(()=>Math.max(...g.value.map(t=>t.weight)));function H(t){return Object.hasOwn(a.value,"x")?u.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function I(t){return Object.hasOwn(a.value,"x")?t.colorTarget:t.colorSource}function F(t){return Object.hasOwn(a.value,"x")?u.value.includes(t.id)&&t.relationId===`${t.id}_${a.value.id}`||t.relationId===`${a.value.id}_${t.id}`?`opacity:1;stroke-width:${L(t)}`:"opacity: 0":"opacity: 1"}function J(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function K(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function Q(t){return Object.hasOwn(a.value,"x")?a.value.id===t.id||u.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function Z(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function N(t){G.value=360-t.regAngle,a.value.id&&t.id===a.value.id?(a.value={},u.value=[]):(a.value=t,u.value=[...t.relations])}function L(t){return t.weight/Y.value*r.value.style.links.maxWidth}const k=e.ref(!1);function ee(t){k.value=t,x.value+=1}return j({generatePdf:P,generateImage:O}),(t,i)=>(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_${f.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.createVNode(re._sfc_main,{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(T.UserOptions,{ref:"details",key:`user_options_${x.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(b),isImaging:e.unref(B),uid:f.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:ee,onGeneratePdf:e.unref(P),onGenerateImage:e.unref(O)},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:n})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),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(o.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value},"relation-circle"]),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,width:"100%",style:e.normalizeStyle(`user-select:none; background:${r.value.style.backgroundColor}`)},[e.createElementVNode("circle",{cx:(s.value.width<=0?1e-4:s.value.width)/2,cy:(s.value.height<=0?1e-4:s.value.height)/2+r.value.style.circle.offsetY,r:d.value<=0?1e-4:d.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,oe),U.value?(e.openBlock(),e.createElementBlock("g",ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,n)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${n}`,style:e.normalizeStyle(F(l)),stroke:I(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":a.value.hasOwnProperty("id")&&u.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${s.value.width/2},${s.value.height/2+r.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":L(l),"stroke-linecap":"round"},null,14,ce))),128))])):(e.openBlock(),e.createElementBlock("g",de,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,n)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${n}`,stroke:I(l),style:e.normalizeStyle(F(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")&&u.value.includes(l.id)}),"stroke-linecap":"round"},null,14,ve))),128))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,n)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${n}`,"text-anchor":J(l),transform:Z(l),x:K(l),y:l.y+5,onClick:m=>N(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};${Q(l)}`),"font-size":r.value.style.labels.fontSize,fill:r.value.style.labels.color},e.toDisplayString(l.label),13,fe))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,n)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${n}`,style:e.normalizeStyle(H(l)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.color,onClick:m=>N(l),r:r.value.style.plot.radius},null,12,ge))),128)),e.renderSlot(t.$slots,"svg",{svg:s.value},void 0,!0)],14,se)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",me,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(b)||e.unref(B)})),void 0,!0)])):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ne.default,{key:4,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],12,ae))}},he=ie._export_sfc(ye,[["__scopeId","data-v-2352f00b"]]);exports.default=he;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-COMTToJY.cjs"),H=require("./useResponsive-B3TrDDIG.cjs"),re=require("./Title-BngFmPpq.cjs"),W=require("./usePrinter-THxtdQMP.cjs"),ne=require("./Tooltip-ztxY4WiA.cjs"),ue=require("./DataTable-D7JJfjpO.cjs"),se=require("./Legend-BDgAlEzL.cjs"),ie=require("./vue-ui-skeleton-DYdGA7uQ.cjs"),ce=require("./vue-ui-accordion-BDkYau8u.cjs"),G=require("./useNestedProp-DJwc68Re.cjs"),de=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ve=["id"],pe=["xmlns","viewBox"],he=["id"],ge=["stop-color"],fe=["stop-color"],me=["stroke","cx","cy","r","fill"],ye=["stroke","stroke-width","cx","cy","r","fill"],be=["cx","cy","r","onMouseenter"],ke={key:3,class:"vue-data-ui-watermark"},Ce=["onClick"],we={key:0},xe={key:1},Te=["innerHTML"],$e={__name:"vue-ui-rings",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(j,{expose:X,emit:Y}){const v=j,{vue_ui_rings:J}=r.useConfig(),y=e.ref(!1),x=e.computed(()=>!!v.dataset&&v.dataset.length),b=e.ref(r.createUid()),K=e.ref(null),T=e.ref(!1),_=e.ref(""),m=e.ref(null),L=e.ref(0),k=e.ref(null),V=e.ref(null),E=e.ref(null),t=e.computed(()=>{const l=G.useNestedProp({userConfig:v.config,defaultConfig:J});return l.theme?{...G.useNestedProp({userConfig:r.themes.vue_ui_rings[l.theme]||v.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),$=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(v.dataset)?r.error({componentName:"VueUiRings",type:"dataset"}):v.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiRings",type:"datasetSerieAttribute",property:o,index:a})})}),t.value.responsive){const l=H.throttle(()=>{const{width:a,height:o}=H.useResponsive({chart:k.value,title:t.value.style.chart.title.text?V.value:null,legend:t.value.style.chart.legend.show?E.value:null});s.value.width=a,s.value.height=o});$.value=new ResizeObserver(l),$.value.observe(k.value.parentNode)}setTimeout(()=>{y.value=!0},600)}),e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:z,isImaging:F,generatePdf:I,generateImage:O}=W.usePrinter({elementId:`rings_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-rings"}),M=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),g=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),s=e.ref({height:360,width:360}),Q=e.computed(()=>Math.min(s.value.height,s.value.width)),i=e.ref([]);function P(l){i.value.includes(l)?i.value=i.value.filter(a=>a!==l):i.value.push(l),Y("selectLegend",c.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const Z=e.computed(()=>Math.max(...N.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l)));function R(l){return l/Z.value}const N=e.computed(()=>v.dataset.map(({values:l,name:a,color:o=null},n)=>{const u=(l||[]).reduce((h,w)=>h+w,0);return{name:a,color:o||r.convertColorToHex(o)||M.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:u,proportion:u/v.dataset.map(h=>(h.values||[]).reduce((w,ae)=>w+ae,0)).reduce((h,w)=>h+w,0),uid:r.createUid()}})),D=e.computed(()=>N.value.map(l=>({...l,shape:"circle",opacity:i.value.includes(l.uid)?.5:1,segregate:()=>P(l.uid),isSegregated:i.value.includes(l.uid)})).toSorted((l,a)=>a.value-l.value)),ee=e.computed(()=>({cy:"rings-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),p=e.computed(()=>N.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l).reduce((l,a)=>l+a,0)),c=e.computed(()=>N.value.filter(l=>!i.value.includes(l.uid)).map(({name:l,value:a,color:o=null,uid:n},u)=>({uid:n,name:l,color:o||r.convertColorToHex(o)||M.value[u]||r.palette[u]||r.palette[u%r.palette.length],value:a,proportion:R(a),percentage:a/p.value*100,strokeWidth:t.value.style.chart.layout.rings.strokeWidth*R(a)})).toSorted((l,a)=>a.value-l.value));function te(){return c.value.map(({name:l,color:a,value:o,absoluteValues:n,percentage:u})=>({name:l,color:a,value:o,absoluteValues:n,percentage:u}))}const d=e.computed(()=>Q.value-t.value.style.chart.layout.rings.strokeWidth*2),B=e.ref(null);function le(l,a){if(i.value.length===v.dataset.length)return;B.value={datapoint:a,seriesIndex:l,series:c.value,config:t.value},m.value=l;const o=c.value[l],n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:l,datapoint:a,series:c.value,config:t.value})))_.value=n({seriesIndex:l,datapoint:a,series:c.value,config:t.value});else{let u="";u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${o.color}" /></svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:l})}
|
|
2
2
|
</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${r.dataLabel({v:o.value/p.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:u+=`<b>${r.dataLabel({v:o.value/p.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),_.value=u}T.value=!0}const f=e.computed(()=>{const l=c.value.map(o=>({name:o.name,color:o.color})),a=c.value.map(o=>o.value);return{head:l,body:a}}),S=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:p.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=f.value.head.map((u,h)=>[{color:u.color,name:u.name},r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:f.value.body[h],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),isNaN(f.value.body[h]/p.value)?"-":(f.value.body[h]/p.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},n=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:n}});function q(){e.nextTick(()=>{const l=f.value.head.map((n,u)=>[[n.name],[f.value.body[u]],[isNaN(f.value.body[u]/p.value)?"-":f.value.body[u]/p.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-rings"})})}const C=e.ref(!1);function oe(l){C.value=l,L.value+=1}function A(){g.value.showTable=!g.value.showTable}function U(){g.value.showTooltip=!g.value.showTooltip}return X({getData:te,generatePdf:I,generateCsv:q,generateImage:O,toggleTable:A,toggleTooltip:U}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"ringsChart",ref:k,class:e.normalizeClass(`vue-ui-rings ${C.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};text-align:center;width:100%;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),id:`rings_${b.value}`,onMouseleave:a[3]||(a[3]=o=>{m.value=null,T.value=!1})},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:V,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`)},[e.createVNode(re._sfc_main,{config:{title:{cy:"rings-div-title",...t.value.style.chart.title},subtitle:{cy:"rings-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref_key:"details",ref:K,key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(z),isImaging:e.unref(F),uid:b.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:g.value.showTooltip,isFullscreen:C.value,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,onToggleFullscreen:oe,onGeneratePdf:e.unref(I),onGenerateCsv:q,onGenerateImage:e.unref(O),onToggleTable:A,onToggleTooltip:U},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.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.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${b.value}_${n}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(r.shiftHue)(o.color,.05)}${e.unref(r.opacity)[100-t.value.style.chart.layout.rings.gradient.intensity]}`},null,8,ge),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,fe)],8,he))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":y.value&&t.value.useCssAnimation,"vue-rings-item-onload":!y.value&&t.value.useCssAnimation,"vue-ui-rings-opacity":m.value!==null&&m.value!==n}),style:e.normalizeStyle(`animation-delay:${n*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(n+1),r:d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9,fill:t.value.style.chart.layout.rings.gradient.underlayerColor},null,14,me),e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":y.value&&t.value.useCssAnimation,"vue-rings-item-onload":!y.value&&t.value.useCssAnimation,"vue-ui-rings-shadow":t.value.style.chart.layout.rings.useShadow,"vue-ui-rings-blur":m.value!==null&&m.value!==n}),style:e.normalizeStyle(`animation-delay:${n*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,"stroke-width":o.strokeWidth<.5?.5:o.strokeWidth,cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(n+1),r:d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9,fill:t.value.style.chart.layout.rings.gradient.show?`url(#gradient_${b.value}_${n})`:o.color},null,14,ye),e.createElementVNode("circle",{"data-cy-trap":"",stroke:"none",cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(n+1),r:d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9,fill:"transparent",onMouseenter:u=>le(n,o),onMouseleave:a[0]||(a[0]=u=>{m.value=null,T.value=!1})},null,40,be)]))),256)),e.renderSlot(l.$slots,"svg",{svg:s.value},void 0,!0)],14,pe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ke,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(z)||e.unref(F)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie.default,{key:4,config:{type:"rings",style:{backgroundColor:t.value.style.chart.backgroundColor,rings:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:E},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(se.Legend,{key:0,legendSet:D.value,config:ee.value,onClickMarker:a[1]||(a[1]=({legend:o})=>P(o.uid))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>P(o.uid),style:e.normalizeStyle(`opacity:${i.value.includes(o.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:n}))+" ",1),i.value.includes(o.uid)?(e.openBlock(),e.createElementBlock("span",xe," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",we," ("+e.toDisplayString(isNaN(o.value/p.value)?"-":e.unref(r.dataLabel)({v:o.value/p.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ce)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:D.value},void 0,!0)],512),e.createVNode(ne._sfc_main,{show:g.value.showTooltip&&T.value&&i.value.length<v.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:k.value,content:_.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...B.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...B.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),x.value?(e.openBlock(),e.createBlock(ce.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.createVNode(ue.DataTable,{colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>g.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Te)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,ve))}},Ne=de._export_sfc($e,[["__scopeId","data-v-747e43da"]]);exports.default=Ne;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { ref as r, computed as c, onMounted as _e, onBeforeUnmount as Ne, openBlock as n, createElementBlock as m, normalizeClass as V, normalizeStyle as _, createVNode as X, createCommentVNode as N, createBlock as B, unref as h, createSlots as Pe, withCtx as p, renderSlot as g, normalizeProps as D, guardReactiveProps as W, Fragment as ue, renderList as re, createElementVNode as w, createTextVNode as ne, toDisplayString as E, nextTick as Le } from "vue";
|
|
2
|
-
import { u as Fe, c as ie, t as Ie, a as Se, p as T, o as Oe, e as ve, g as Me, b as ze, d as ce, f as x, X as Ae, s as Re, v as Ve, i as de, w as Be, x as De, q as We, r as Ee } from "./index-
|
|
2
|
+
import { u as Fe, c as ie, t as Ie, a as Se, p as T, o as Oe, e as ve, g as Me, b as ze, d as ce, f as x, X as Ae, s as Re, v as Ve, i as de, w as Be, x as De, q as We, r as Ee } from "./index-CQyrBpOX.js";
|
|
3
3
|
import { t as Ge, u as Ue } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as He } from "./Title-
|
|
5
|
-
import { u as Xe, U as je } from "./usePrinter-
|
|
6
|
-
import { _ as Ye } from "./Tooltip-
|
|
7
|
-
import { D as qe } from "./DataTable-
|
|
8
|
-
import { L as Je } from "./Legend-
|
|
9
|
-
import Ke from "./vue-ui-skeleton-
|
|
10
|
-
import Qe from "./vue-ui-accordion-
|
|
11
|
-
import { u as he } from "./useNestedProp-
|
|
4
|
+
import { _ as He } from "./Title-DJW7JJGo.js";
|
|
5
|
+
import { u as Xe, U as je } from "./usePrinter-BJn_Etby.js";
|
|
6
|
+
import { _ as Ye } from "./Tooltip-pvQzx3z4.js";
|
|
7
|
+
import { D as qe } from "./DataTable-CcVgHrwx.js";
|
|
8
|
+
import { L as Je } from "./Legend-BPGeRVxf.js";
|
|
9
|
+
import Ke from "./vue-ui-skeleton-CjYyI3Lv.js";
|
|
10
|
+
import Qe from "./vue-ui-accordion-DqRnuig6.js";
|
|
11
|
+
import { u as he } from "./useNestedProp-CK_S9Ya9.js";
|
|
12
12
|
import { _ as Ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
const et = ["id"], tt = ["xmlns", "viewBox"], lt = ["id"], ot = ["stop-color"], at = ["stop-color"], st = ["stroke", "cx", "cy", "r", "fill"], ut = ["stroke", "stroke-width", "cx", "cy", "r", "fill"], rt = ["cx", "cy", "r", "onMouseenter"], nt = {
|
|
14
14
|
key: 3,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { computed as b, ref as k, onMounted as Ee, onBeforeUnmount as Ve, openBlock as s, createElementBlock as r, normalizeClass as Ae, normalizeStyle as D, createVNode as le, createCommentVNode as c, createBlock as J, unref as d, createSlots as Ge, withCtx as w, renderSlot as A, normalizeProps as ae, guardReactiveProps as oe, createElementVNode as v, Fragment as N, renderList as P, toDisplayString as M, createTextVNode as Re, nextTick as qe } from "vue";
|
|
2
|
-
import { u as Ue, c as He, t as Je, a as Ke, p as R, o as Qe, e as ce, b as Ze, g as Te, M as Be, X as et, O as tt, v as de, i as Y, f as F, w as lt, x as at, q as ot, r as st } from "./index-
|
|
2
|
+
import { u as Ue, c as He, t as Je, a as Ke, p as R, o as Qe, e as ce, b as Ze, g as Te, M as Be, X as et, O as tt, v as de, i as Y, f as F, w as lt, x as at, q as ot, r as st } from "./index-CQyrBpOX.js";
|
|
3
3
|
import { t as ut, u as rt } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as it } from "./Title-
|
|
5
|
-
import { u as nt, U as yt } from "./usePrinter-
|
|
6
|
-
import { _ as vt } from "./Tooltip-
|
|
7
|
-
import { L as ct } from "./Legend-
|
|
8
|
-
import { _ as Ne } from "./Shape-
|
|
9
|
-
import { D as dt } from "./DataTable-
|
|
10
|
-
import ht from "./vue-ui-skeleton-
|
|
11
|
-
import pt from "./vue-ui-accordion-
|
|
12
|
-
import { u as We } from "./useNestedProp-
|
|
4
|
+
import { _ as it } from "./Title-DJW7JJGo.js";
|
|
5
|
+
import { u as nt, U as yt } from "./usePrinter-BJn_Etby.js";
|
|
6
|
+
import { _ as vt } from "./Tooltip-pvQzx3z4.js";
|
|
7
|
+
import { L as ct } from "./Legend-BPGeRVxf.js";
|
|
8
|
+
import { _ as Ne } from "./Shape-DnfO-k8Q.js";
|
|
9
|
+
import { D as dt } from "./DataTable-CcVgHrwx.js";
|
|
10
|
+
import ht from "./vue-ui-skeleton-CjYyI3Lv.js";
|
|
11
|
+
import pt from "./vue-ui-accordion-DqRnuig6.js";
|
|
12
|
+
import { u as We } from "./useNestedProp-CK_S9Ya9.js";
|
|
13
13
|
import { _ as ft } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
const gt = ["id"], xt = ["xmlns", "viewBox"], mt = { key: 0 }, bt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], kt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], _t = { key: 1 }, wt = ["points", "fill", "stroke-width", "stroke-dasharray", "stroke"], Mt = { key: 0 }, $t = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onMouseover"], Ct = { key: 1 }, zt = { key: 2 }, St = ["id"], Lt = ["stop-color"], At = ["stop-color"], Tt = ["id"], Bt = ["stop-color"], Nt = ["stop-color"], Wt = ["x", "y", "width", "height", "fill", "stroke", "stroke-width", "rx"], Pt = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "rx"], Ft = { key: 0 }, Ot = ["d", "stroke", "stroke-width"], Xt = ["d", "stroke", "stroke-width"], It = ["d", "stroke", "stroke-width"], Dt = ["d", "stroke", "stroke-width"], Yt = {
|
|
15
15
|
key: 3,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-6dSPekJy.cjs"),ce=require("./useResponsive-B3TrDDIG.cjs"),we=require("./Title-BvczMERR.cjs"),ye=require("./usePrinter-Si0o8ws0.cjs"),Be=require("./Tooltip-QvjV7FFJ.cjs"),_e=require("./Legend-D7zc_ula.cjs"),ve=require("./Shape-CWtwGdQ_.cjs"),Ce=require("./DataTable-BrnFSdXo.cjs"),Me=require("./vue-ui-skeleton-BnEVwnIx.cjs"),Se=require("./vue-ui-accordion-COKJwPZR.cjs"),de=require("./useNestedProp-C0FeJ2Gu.cjs"),$e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ne=["id"],Ee=["xmlns","viewBox"],Le={key:0},ze=["x1","x2","y1","y2","stroke","stroke-width"],Ve=["x1","x2","y1","y2","stroke","stroke-width"],Ae={key:1},Te=["points","fill","stroke-width","stroke-dasharray","stroke"],De={key:0},Pe=["cx","cy","r","fill","stroke","stroke-width","onMouseover"],Fe={key:1},We={key:2},Oe=["id"],qe=["stop-color"],Ie=["stop-color"],Xe=["id"],Ye=["stop-color"],je=["stop-color"],Re=["x","y","width","height","fill","stroke","stroke-width","rx"],Ge=["x","y","height","width","fill","stroke","stroke-width","rx"],Ue={key:0},He=["d","stroke","stroke-width"],Je=["d","stroke","stroke-width"],Ke=["d","stroke","stroke-width"],Qe=["d","stroke","stroke-width"],Ze={key:3,style:{"pointer-events":"none !important"}},et=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],tt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],lt=["x","y","font-size","fill","font-weight","text-anchor"],at=["x","y","font-size","fill","font-weight"],ot=["cx","cy","r","fill","stroke","stroke-width"],st=["cx","cy","r","fill","stroke","stroke-width"],rt=["x","y","font-size","fill","font-weight","text-anchor"],nt={key:4},ut=["x","y","font-size","fill"],it=["x","y","font-size","fill"],ct=["id","transform","font-size","font-weight","fill"],yt={key:5},vt=["x","y","font-size","fill"],dt=["x","y","font-size","fill"],pt=["font-size","font-weight","fill","x","y"],ht=["id"],ft=["x","y","width","height"],mt={key:6},gt=["x1","x2","y1","y2","stroke-dasharray","stroke","stroke-width","clip-path"],kt=["x","y","fill","font-size","font-weight"],xt={key:3,class:"vue-data-ui-watermark"},bt=["onClick"],wt={key:0,style:{width:"100%",display:"flex","align-items":"center","justify-content":"center"}},Bt={viewBox:"0 0 20 20",height:"20",width:"20",style:{overflow:"hidden",background:"transparent"}},_t={key:0},Ct=["innerHTML"],Mt={__name:"vue-ui-scatter",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(pe,{expose:he}){const M=pe,{vue_ui_scatter:fe}=r.useConfig(),D=e.computed(()=>!!M.dataset&&M.dataset.length),g=e.ref(r.createUid()),me=e.ref(null),q=e.ref(!1),I=e.ref(""),U=e.ref(0),A=e.ref(null),H=e.ref(null),J=e.ref(null),t=e.computed(()=>{const a=de.useNestedProp({userConfig:M.config,defaultConfig:fe});return a.theme?{...de.useNestedProp({userConfig:r.themes.vue_ui_scatter[a.theme]||M.config,defaultConfig:a}),customPalette:r.themePalettes[a.theme]||r.palette}:a}),P=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(M.dataset)&&r.error({componentName:"VueUiScatter",type:"dataset"}),t.value.responsive){const a=ce.throttle(()=>{const{width:u,height:l}=ce.useResponsive({chart:A.value,title:t.value.style.title.text?H.value:null,legend:t.value.style.legend.show?J.value:null});k.value.width=u,k.value.height=l});P.value=new ResizeObserver(a),P.value.observe(A.value.parentNode)}}),e.onBeforeUnmount(()=>{P.value&&P.value.disconnect()});const{isPrinting:K,isImaging:Q,generatePdf:Z,generateImage:ee}=ye.usePrinter({elementId:`vue-ui-scatter_${g.value}`,fileName:t.value.style.title.text||"vue-ui-scatter"}),te=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),S=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),k=e.ref({height:t.value.style.layout.height,width:t.value.style.layout.width}),F=e.computed(()=>t.value.style.layout.marginalBars.show?t.value.style.layout.marginalBars.size+t.value.style.layout.marginalBars.offset:0),n=e.computed(()=>({top:t.value.style.layout.padding.top+F.value,right:k.value.width-t.value.style.layout.padding.right-F.value,bottom:k.value.height-t.value.style.layout.padding.bottom,left:t.value.style.layout.padding.left,height:k.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom-F.value,width:k.value.width-t.value.style.layout.padding.left-t.value.style.layout.padding.right-F.value})),y=e.computed(()=>{M.dataset.forEach((o,i)=>{r.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["values"]}).forEach(h=>{r.error({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:h,index:i})}),o.values&&o.values.forEach((h,E)=>{r.getMissingDatasetAttributes({datasetObject:h,requiredAttributes:["x","y"]}).forEach(V=>{r.error({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:`values.${V}`,index:`${i} - ${E}`})})})});const a=Math.min(...N.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.x))),u=Math.max(...N.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.x))),l=Math.min(...N.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.y))),s=Math.max(...N.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.y)));return{xMin:a>=0?0:a,xMax:u,yMin:l>=0?0:l,yMax:s}}),v=e.computed(()=>({x:n.value.left+Math.abs(y.value.xMin)/(y.value.xMax+Math.abs(y.value.xMin))*n.value.width,y:n.value.bottom-Math.abs(y.value.yMin)/(y.value.yMax+Math.abs(y.value.yMin))*n.value.height})),N=e.computed(()=>M.dataset.map((a,u)=>{const l=`cluster_${g.value}_${u}`;return{...a,id:l,color:a.color?a.color:te.value[u]||r.palette[u]||r.palette[u%r.palette.length],opacity:p.value.includes(l)?.5:1,shape:a.shape??"circle",segregate:()=>re(l),isSegregated:p.value.includes(l)}})),ge=e.computed(()=>({cy:"scatter-div-legend",backgroundColor:t.value.style.legend.backgroundColor,color:t.value.style.legend.color,fontSize:t.value.style.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.legend.bold?"bold":""})),X=e.computed(()=>N.value.map((a,u)=>({...a,plots:a.values.map(l=>({x:n.value.left+(l.x+Math.abs(y.value.xMin))/(y.value.xMax+Math.abs(y.value.xMin))*n.value.width,y:n.value.bottom-(l.y+Math.abs(y.value.yMin))/(y.value.yMax+Math.abs(y.value.yMin))*n.value.height,v:{...l,name:l.name||""},clusterName:a.name,color:a.color?a.color:te.value[u]||r.palette[u]||r.palette[u%r.palette.length],id:`plot_${g.value}_${Math.random()}`,weight:l.weight??t.value.style.layout.plots.radius}))})).filter(a=>!p.value.includes(a.id))),x=e.computed(()=>X.value.map(a=>{const u=a.plots.reduce((d,L)=>d+L.x,0)/a.plots.length,l=a.plots.reduce((d,L)=>d+L.y,0)/a.plots.length;let s=0,o=0,i=0;for(const d of a.plots)s+=(d.x-u)*(d.y-l),o+=(d.x-u)**2,i+=(d.y-l)**2;const h=s/Math.sqrt(o*i),E=h*(Math.sqrt(i)/Math.sqrt(o)),V=l-E*u,_={x1:n.value.left,x2:n.value.right,y1:E*n.value.left+V,y2:E*n.value.right+V,coefficient:h},m=(_.y2-_.y1)/(_.x2-_.x1),w=_.y1-m*_.x1,C=Math.min(k.value.width-t.value.style.layout.padding.right,Math.max(t.value.style.layout.padding.left,(n.value.top-w)/m)),O={x:C,y:m*C+w<=t.value.style.layout.padding.top?n.value.top:m*C+w};return{...a,correlation:_,label:O,plots:a.plots.map(d=>{const L=(d.x+m*d.y-m*w)/(1+Math.pow(m,2)),j=(m*d.x+Math.pow(m,2)*d.y+w)/(1+Math.pow(m,2)),f=Math.sqrt(Math.pow(d.x-L,2)+Math.pow(d.y-j,2));return{...d,deviation:f,shape:a.shape,color:a.color}})}})),le=e.computed(()=>Math.max(...x.value.flatMap(a=>a.plots.map(u=>Math.abs(u.deviation)))));function ke(){return x.value}function ae(a,u){const l=Array.isArray(a)?a.flatMap(f=>f.plots.map(z=>({x:z.x,y:z.y}))):a.plots.map(f=>({x:f.x,y:f.y}));let s=1/0,o=-1/0,i=1/0,h=-1/0;l.forEach(({x:f,y:z})=>{s=Math.min(s,f),o=Math.max(o,f),i=Math.min(i,z),h=Math.max(h,z)});const E=o-s,V=h-i,_=E/u,m=V/u,w=Array(u).fill(0),C=Array(u).fill(0);l.forEach(({x:f,y:z})=>{const R=Math.floor((f-s)/_),G=Math.floor((z-i)/m);w[R]||(w[R]=0),C[G]||(C[G]=0),w[R]+=1,C[G]+=1});const O=[],d=[];for(let f=0;f<u;f+=1)O.push(s+(f+.5)*_),d.push(i+(f+.5)*m);const L=Math.max(...w),j=Math.max(...C);return{x:w,y:C,avgX:O,avgY:d,maxX:L,maxY:j}}const $=e.computed(()=>t.value.style.layout.marginalBars.tranches),b=e.computed(()=>ae(X.value,$.value)),xe=e.computed(()=>{const a=n.value.top-t.value.style.layout.marginalBars.offset,u=n.value.right+t.value.style.layout.marginalBars.offset;return X.value.map(l=>{const s=ae(l,$.value);return{coords:s,dX:r.createSmoothPath(s.avgX.map((o,i)=>({x:o,y:a-s.x[i]/s.maxX*t.value.style.layout.marginalBars.size}))),dY:r.createSmoothPath(s.avgY.map((o,i)=>({y:o,x:u+t.value.style.layout.marginalBars.size*s.y[i]/s.maxY}))),color:l.color,id:l.id}})}),B=e.ref(void 0),c=e.ref(null),Y=e.ref(null);function oe(a,u){B.value=a.id,c.value=a;let l="";Y.value={datapoint:a,seriesIndex:u,series:x.value,config:t.value};const s=t.value.style.tooltip.customFormat;r.isFunction(s)&&r.functionReturnsString(()=>s({datapoint:a,seriesIndex:u,series:x.value,config:t.value}))?I.value=s({datapoint:a,seriesIndex:u,series:x.value,config:t.value}):(a.clusterName&&(l+=`<div style="display:flex;gap:3px;align-items:center">${a.clusterName}</div>`),a.v.name&&(l+=`<div>${a.v.name}</div>`),l+=`<div style="text-align:left;margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,l+=`<div>${t.value.style.layout.dataLabels.xAxis.name}: <b>${isNaN(a.v.x)?"-":r.applyDataLabel(t.value.style.layout.plots.selectors.labels.x.formatter,a.v.x,r.dataLabel({p:t.value.style.tooltip.prefix,v:a.v.x,s:t.value.style.tooltip.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:a,seriesIndex:u})}</b></div>`,l+=`<div>${t.value.style.layout.dataLabels.yAxis.name}: <b>${isNaN(a.v.y)?"-":r.applyDataLabel(t.value.style.layout.plots.selectors.labels.y.formatter,a.v.y,r.dataLabel({p:t.value.style.tooltip.prefix,v:a.v.y,s:t.value.style.tooltip.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:a,seriesIndex:u})}</b></div>`,l+=`${t.value.style.layout.plots.deviation.translation}: <b>${r.dataLabel({v:a.deviation,r:t.value.style.layout.plots.deviation.roundingValue})}</b>`,l+="</div>",I.value=`<div>${l}</div>`),q.value=!0}function se(){q.value=!1,B.value=void 0,c.value=null}const p=e.ref([]);function re(a){p.value.includes(a)?p.value=p.value.filter(u=>u!==a):p.value.length<M.dataset.length-1&&p.value.push(a)}function ne(){e.nextTick(()=>{const a=["",t.value.table.translations.correlationCoefficient,t.value.table.translations.nbrPlots,`${t.value.style.layout.dataLabels.xAxis.name} ${t.value.table.translations.average}`,`${t.value.style.layout.dataLabels.yAxis.name} ${t.value.table.translations.average}`],u=x.value.map(o=>[o.name,o.correlation.coefficient,o.plots.length,o.plots.map(i=>i.v.x).reduce((i,h)=>i+h,0)/o.plots.length,o.plots.map(i=>i.v.y).reduce((i,h)=>i+h,0)/o.plots.length]),l=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([a]).concat(u),s=r.createCsvContent(l);r.downloadCsv({csvContent:s,title:t.value.style.title.text||"vue-ui-heatmap"})})}const W=e.computed(()=>{const a=[t.value.table.translations.series,t.value.table.translations.correlationCoefficient,t.value.table.translations.nbrPlots,`${t.value.style.layout.dataLabels.xAxis.name} ${t.value.table.translations.average}`,`${t.value.style.layout.dataLabels.yAxis.name} ${t.value.table.translations.average}`],u=x.value.map(s=>[{shape:s.shape,content:s.name,color:s.color},Number((s.correlation.coefficient??0).toFixed(t.value.table.td.roundingValue)).toLocaleString(),s.plots.length.toLocaleString(),Number((s.plots.map(o=>o.v.x??0).reduce((o,i)=>o+i,0)/s.plots.length).toFixed(t.value.table.td.roundingAverage)).toLocaleString(),Number((s.plots.map(o=>o.v.y??0).reduce((o,i)=>o+i,0)/s.plots.length).toFixed(t.value.table.td.roundingAverage)).toLocaleString()]),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:a,body:u,config:l,colNames:a}}),T=e.ref(!1);function be(a){T.value=a,U.value+=1}function ue(){S.value.showTable=!S.value.showTable}function ie(){S.value.showTooltip=!S.value.showTooltip}return he({getData:ke,generatePdf:Z,generateCsv:ne,generateImage:ee,toggleTable:ue,toggleTooltip:ie}),(a,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-scatter ${T.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"scatterChart",ref:A,id:`vue-ui-scatter_${g.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor};${t.value.responsive?"height: 100%":""}`)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:H,style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor}`)},[e.createVNode(we._sfc_main,{config:{title:{cy:"scatter-div-title",...t.value.style.title},subtitle:{cy:"scatter-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&D.value?(e.openBlock(),e.createBlock(ye.UserOptions,{ref_key:"details",ref:me,key:`user_options_${U.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(Q),isPrinting:e.unref(K),uid:g.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.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,isTooltip:S.value.showTooltip,isFullscreen:T.value,titles:{...t.value.userOptions.buttonTitles},chartElement:A.value,onToggleFullscreen:be,onGeneratePdf:e.unref(Z),onGenerateCsv:ne,onGenerateImage:e.unref(ee),onToggleTable:ue,onToggleTooltip:ie},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),D.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":T.value,"vue-data-ui-fulscreen--off":!T.value}),viewBox:`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.backgroundColor};color:${t.value.style.color}`)},[t.value.style.layout.axis.show?(e.openBlock(),e.createElementBlock("g",Le,[e.createElementVNode("line",{x1:v.value.x,x2:v.value.x,y1:n.value.top,y2:n.value.bottom,stroke:t.value.style.layout.axis.stroke,"stroke-width":t.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,ze),e.createElementVNode("line",{x1:n.value.left,x2:n.value.right,y1:v.value.y,y2:v.value.y,stroke:t.value.style.layout.axis.stroke,"stroke-width":t.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,Ve)])):e.createCommentVNode("",!0),t.value.style.layout.plots.giftWrap.show?(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.plots.length>2?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:e.unref(r.giftWrap)({series:l.plots}),fill:`${l.color}${e.unref(r.opacity)[t.value.style.layout.plots.giftWrap.fillOpacity*100]}`,"stroke-width":t.value.style.layout.plots.giftWrap.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.giftWrap.strokeDasharray,stroke:l.color,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Te)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[!l.shape||l.shape==="circle"?(e.openBlock(),e.createElementBlock("g",De,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(o,i)=>(e.openBlock(),e.createElementBlock("circle",{cx:o.x,cy:o.y,r:B.value&&B.value===o.id?o.weight*2:o.weight,fill:`${l.color}${e.unref(r.opacity)[t.value.style.layout.plots.opacity*100]}`,stroke:t.value.style.layout.plots.stroke,"stroke-width":t.value.style.layout.plots.strokeWidth,onMouseover:h=>oe(o,s),onMouseleave:se,style:e.normalizeStyle(`opacity:${B.value&&B.value===o.id?1:t.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(o.deviation)/le.value:t.value.style.layout.plots.significance.show&&Math.abs(o.deviation)>t.value.style.layout.plots.significance.deviationThreshold?t.value.style.layout.plots.significance.opacity:1}`)},null,44,Pe))),256))])):(e.openBlock(),e.createElementBlock("g",Fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(o,i)=>(e.openBlock(),e.createBlock(ve._sfc_main,{plot:{x:o.x,y:o.y},radius:B.value&&B.value===o.id?o.weight*2:o.weight,shape:l.shape,color:`${l.color}${e.unref(r.opacity)[t.value.style.layout.plots.opacity*100]}`,stroke:t.value.style.layout.plots.stroke,strokeWidth:t.value.style.layout.plots.strokeWidth,onMouseover:h=>oe(o,s),onMouseleave:se,style:e.normalizeStyle(`opacity:${B.value&&B.value===o.id?1:t.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(o.deviation)/le.value:t.value.style.layout.plots.significance.show&&Math.abs(o.deviation)>t.value.style.layout.plots.significance.deviationThreshold?t.value.style.layout.plots.significance.opacity:1}`)},null,8,["plot","radius","shape","color","stroke","strokeWidth","onMouseover","style"]))),256))]))]))),256)),t.value.style.layout.marginalBars.show?(e.openBlock(),e.createElementBlock("g",We,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`marginal_x_${g.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.marginalBars.fill},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.backgroundColor},null,8,Ie)],8,Oe),e.createElementVNode("linearGradient",{id:`marginal_y_${g.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.backgroundColor},null,8,Ye),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.marginalBars.fill},null,8,je)],8,Xe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.x,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l&&b.value.avgX[s]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:b.value.avgX[s]-n.value.width/$.value/2,y:n.value.top-t.value.style.layout.marginalBars.offset-l/b.value.maxX*t.value.style.layout.marginalBars.size,width:n.value.width/$.value<=0?1e-4:n.value.width/$.value,height:l/b.value.maxX*t.value.style.layout.marginalBars.size<=0?1e-4:l/b.value.maxX*t.value.style.layout.marginalBars.size,fill:t.value.style.layout.marginalBars.useGradient?`url(#marginal_x_${g.value})`:t.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${t.value.style.layout.marginalBars.opacity}`),stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.strokeWidth,rx:t.value.style.layout.marginalBars.borderRadius},null,12,Re)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.y,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l&&b.value.avgY[s]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:n.value.right+t.value.style.layout.marginalBars.offset,y:b.value.avgY[s]-n.value.height/$.value/2,height:n.value.height/$.value<=0?1e-4:n.value.height/$.value,width:l/b.value.maxY*t.value.style.layout.marginalBars.size<=0?1e-4:l/b.value.maxY*t.value.style.layout.marginalBars.size,fill:t.value.style.layout.marginalBars.useGradient?`url(#marginal_y_${g.value})`:t.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${t.value.style.layout.marginalBars.opacity}`),stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.strokeWidth,rx:t.value.style.layout.marginalBars.borderRadius},null,12,Ge)):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.marginalBars.showLines?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(xe.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[p.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${l.dX}`,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,He)),p.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${l.dX}`,stroke:l.color,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,Je)),p.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${l.dY}`,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,Ke)),p.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:3,d:`M ${l.dY}`,stroke:l.color,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,Qe))],64))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),c.value&&t.value.style.layout.plots.selectors.show?(e.openBlock(),e.createElementBlock("g",Ze,[e.createElementVNode("line",{x1:v.value.x,x2:c.value.x,y1:c.value.y,y2:c.value.y,stroke:t.value.style.layout.plots.selectors.stroke,"stroke-width":t.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,et),e.createElementVNode("line",{x1:c.value.x,x2:c.value.x,y1:v.value.y,y2:c.value.y,stroke:t.value.style.layout.plots.selectors.stroke,"stroke-width":t.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,tt),e.createElementVNode("text",{x:v.value.x+(c.value.x>v.value.x?-6:6),y:c.value.y+t.value.style.layout.plots.selectors.labels.fontSize/3,"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":c.value.x>v.value.x?"end":"start"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,c.value.v.y,e.unref(r.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:c.value.v.y,s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.plots.selectors.labels.rounding}),{datapoint:c.value})),9,lt),e.createElementVNode("text",{x:c.value.x,y:v.value.y+(c.value.y>v.value.y?-6:t.value.style.layout.plots.selectors.labels.fontSize+6),"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,c.value.v.x,e.unref(r.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:c.value.v.x,s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.plots.selectors.labels.rounding}),{datapoint:c.value})),9,at),e.createElementVNode("circle",{cx:v.value.x,cy:c.value.y,r:t.value.style.layout.plots.selectors.markers.radius,fill:t.value.style.layout.plots.selectors.markers.fill,stroke:t.value.style.layout.plots.selectors.markers.stroke,"stroke-width":t.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,ot),e.createElementVNode("circle",{cx:c.value.x,cy:v.value.y,r:t.value.style.layout.plots.selectors.markers.radius,fill:t.value.style.layout.plots.selectors.markers.fill,stroke:t.value.style.layout.plots.selectors.markers.stroke,"stroke-width":t.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,st),t.value.style.layout.plots.selectors.labels.showName?(e.openBlock(),e.createElementBlock("text",{key:0,x:c.value.x,y:c.value.y+(c.value.y<v.value.y?-t.value.style.layout.plots.selectors.labels.fontSize/2:t.value.style.layout.plots.selectors.labels.fontSize),"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":c.value.x<n.value.left+100?"start":c.value.x>n.value.right-100?"end":c.value.x>v.value.x?"start":"end"},e.toDisplayString(c.value.v.name),9,rt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",nt,[e.createElementVNode("text",{x:n.value.left-5,y:v.value.y+t.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.plots.selectors.labels.x.formatter,y.value.xMin,e.unref(r.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:y.value.xMin,s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.xAxis.rounding}))),9,ut),e.createElementVNode("text",{x:n.value.right+3,y:v.value.y+t.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"start","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.plots.selectors.labels.x.formatter,y.value.xMax,e.unref(r.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:y.value.xMax,s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.xAxis.rounding}))),9,it),e.createElementVNode("text",{id:`vue-ui-scatter-xAxis-label-${g.value}`,transform:`translate(${t.value.style.layout.dataLabels.xAxis.fontSize*2}, ${n.value.top+n.value.height/2}), rotate(-90)`,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(t.value.style.layout.dataLabels.xAxis.name),9,ct)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",yt,[e.createElementVNode("text",{x:v.value.x,y:n.value.bottom+t.value.style.layout.dataLabels.yAxis.fontSize+3,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,y.value.yMin,e.unref(r.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:y.value.yMin,s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.yAxis.rounding}))),9,vt),e.createElementVNode("text",{x:v.value.x,y:n.value.top-t.value.style.layout.dataLabels.yAxis.fontSize/2,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,y.value.yMax,e.unref(r.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:y.value.yMax,s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.yAxis.rounding}))),9,dt),e.createElementVNode("text",{"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,"font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal",fill:t.value.style.layout.dataLabels.yAxis.color,x:n.value.left+n.value.width/2,y:n.value.bottom+8+t.value.style.layout.dataLabels.yAxis.fontSize*2},e.toDisplayString(t.value.style.layout.dataLabels.yAxis.name),9,pt)])):e.createCommentVNode("",!0),e.createElementVNode("clipPath",{id:`clip_path_${g.value}`},[e.createElementVNode("rect",{x:n.value.left,y:n.value.top,width:n.value.width<=0?1e-4:n.value.width,height:n.value.height<=0?1e-4:n.value.height},null,8,ft)],8,ht),t.value.style.layout.correlation.show?(e.openBlock(),e.createElementBlock("g",mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,s)=>(e.openBlock(),e.createElementBlock("line",{x1:l.correlation.x1,x2:l.correlation.x2,y1:l.correlation.y1,y2:l.correlation.y2,"stroke-dasharray":t.value.style.layout.correlation.strokeDasharray,stroke:l.color,"stroke-width":t.value.style.layout.correlation.strokeWidth,"clip-path":`url(#clip_path_${g.value})`},null,8,gt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.correlation.label.show?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.label.x,y:l.label.y,fill:t.value.style.layout.correlation.label.useSerieColor?l.color:t.value.style.layout.correlation.label.color,"font-size":t.value.style.layout.correlation.label.fontSize,"font-weight":t.value.style.layout.correlation.label.bold?"bold":"normal"},e.toDisplayString(Number(l.correlation.coefficient.toFixed(t.value.style.layout.correlation.label.roundingValue)).toLocaleString()),9,kt)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:k.value},void 0,!0)],14,Ee)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",xt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(K)||e.unref(Q)})),void 0,!0)])):e.createCommentVNode("",!0),D.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Me.default,{key:4,config:{type:"quadrant",style:{backgroundColor:t.value.style.backgroundColor,quadrant:{grid:{color:t.value.style.layout.axis.stroke},plots:{color:t.value.style.layout.axis.stroke,radius:1}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:J},[t.value.style.legend.show?(e.openBlock(),e.createBlock(_e.Legend,{key:0,legendSet:N.value,config:ge.value,onClickMarker:u[0]||(u[0]=({legend:l})=>re(l.id))},{item:e.withCtx(({legend:l})=>[e.createElementVNode("div",{onClick:s=>l.segregate(),style:e.normalizeStyle(`opacity:${p.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name),13,bt)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:N.value},void 0,!0)],512),e.createVNode(Be._sfc_main,{show:S.value.showTooltip&&q.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:A.value,content:I.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Y.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Y.value})),void 0,!0)]),default:e.withCtx(()=>[t.value.style.tooltip.showShape?(e.openBlock(),e.createElementBlock("div",wt,[(e.openBlock(),e.createElementBlock("svg",Bt,[e.createVNode(ve._sfc_main,{shape:c.value.shape,color:c.value.color,plot:{x:10,y:10},radius:7},null,8,["shape","color"])]))])):e.createCommentVNode("",!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),D.value?(e.openBlock(),e.createBlock(Se.default,{key:5,hideDetails:"",config:{open:S.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createVNode(Ce.DataTable,{colNames:W.value.colNames,head:W.value.head,body:W.value.body,config:W.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:u[1]||(u[1]=l=>S.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),td:e.withCtx(({td:l})=>[l.shape?(e.openBlock(),e.createElementBlock("div",_t,[e.createElementVNode("span",null,e.toDisplayString(l.content),1)])):(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:l},null,8,Ct))]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Ne))}},St=$e._export_sfc(Mt,[["__scopeId","data-v-4009bc76"]]);exports.default=St;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-COMTToJY.cjs"),ce=require("./useResponsive-B3TrDDIG.cjs"),we=require("./Title-BngFmPpq.cjs"),ye=require("./usePrinter-THxtdQMP.cjs"),Be=require("./Tooltip-ztxY4WiA.cjs"),_e=require("./Legend-BDgAlEzL.cjs"),ve=require("./Shape-DDEKu71I.cjs"),Ce=require("./DataTable-D7JJfjpO.cjs"),Me=require("./vue-ui-skeleton-DYdGA7uQ.cjs"),Se=require("./vue-ui-accordion-BDkYau8u.cjs"),de=require("./useNestedProp-DJwc68Re.cjs"),$e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ne=["id"],Ee=["xmlns","viewBox"],Le={key:0},ze=["x1","x2","y1","y2","stroke","stroke-width"],Ve=["x1","x2","y1","y2","stroke","stroke-width"],Ae={key:1},Te=["points","fill","stroke-width","stroke-dasharray","stroke"],De={key:0},Pe=["cx","cy","r","fill","stroke","stroke-width","onMouseover"],Fe={key:1},We={key:2},Oe=["id"],qe=["stop-color"],Ie=["stop-color"],Xe=["id"],Ye=["stop-color"],je=["stop-color"],Re=["x","y","width","height","fill","stroke","stroke-width","rx"],Ge=["x","y","height","width","fill","stroke","stroke-width","rx"],Ue={key:0},He=["d","stroke","stroke-width"],Je=["d","stroke","stroke-width"],Ke=["d","stroke","stroke-width"],Qe=["d","stroke","stroke-width"],Ze={key:3,style:{"pointer-events":"none !important"}},et=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],tt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],lt=["x","y","font-size","fill","font-weight","text-anchor"],at=["x","y","font-size","fill","font-weight"],ot=["cx","cy","r","fill","stroke","stroke-width"],st=["cx","cy","r","fill","stroke","stroke-width"],rt=["x","y","font-size","fill","font-weight","text-anchor"],nt={key:4},ut=["x","y","font-size","fill"],it=["x","y","font-size","fill"],ct=["id","transform","font-size","font-weight","fill"],yt={key:5},vt=["x","y","font-size","fill"],dt=["x","y","font-size","fill"],pt=["font-size","font-weight","fill","x","y"],ht=["id"],ft=["x","y","width","height"],mt={key:6},gt=["x1","x2","y1","y2","stroke-dasharray","stroke","stroke-width","clip-path"],kt=["x","y","fill","font-size","font-weight"],xt={key:3,class:"vue-data-ui-watermark"},bt=["onClick"],wt={key:0,style:{width:"100%",display:"flex","align-items":"center","justify-content":"center"}},Bt={viewBox:"0 0 20 20",height:"20",width:"20",style:{overflow:"hidden",background:"transparent"}},_t={key:0},Ct=["innerHTML"],Mt={__name:"vue-ui-scatter",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(pe,{expose:he}){const M=pe,{vue_ui_scatter:fe}=r.useConfig(),D=e.computed(()=>!!M.dataset&&M.dataset.length),g=e.ref(r.createUid()),me=e.ref(null),q=e.ref(!1),I=e.ref(""),U=e.ref(0),A=e.ref(null),H=e.ref(null),J=e.ref(null),t=e.computed(()=>{const a=de.useNestedProp({userConfig:M.config,defaultConfig:fe});return a.theme?{...de.useNestedProp({userConfig:r.themes.vue_ui_scatter[a.theme]||M.config,defaultConfig:a}),customPalette:r.themePalettes[a.theme]||r.palette}:a}),P=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(M.dataset)&&r.error({componentName:"VueUiScatter",type:"dataset"}),t.value.responsive){const a=ce.throttle(()=>{const{width:u,height:l}=ce.useResponsive({chart:A.value,title:t.value.style.title.text?H.value:null,legend:t.value.style.legend.show?J.value:null});k.value.width=u,k.value.height=l});P.value=new ResizeObserver(a),P.value.observe(A.value.parentNode)}}),e.onBeforeUnmount(()=>{P.value&&P.value.disconnect()});const{isPrinting:K,isImaging:Q,generatePdf:Z,generateImage:ee}=ye.usePrinter({elementId:`vue-ui-scatter_${g.value}`,fileName:t.value.style.title.text||"vue-ui-scatter"}),te=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),S=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),k=e.ref({height:t.value.style.layout.height,width:t.value.style.layout.width}),F=e.computed(()=>t.value.style.layout.marginalBars.show?t.value.style.layout.marginalBars.size+t.value.style.layout.marginalBars.offset:0),n=e.computed(()=>({top:t.value.style.layout.padding.top+F.value,right:k.value.width-t.value.style.layout.padding.right-F.value,bottom:k.value.height-t.value.style.layout.padding.bottom,left:t.value.style.layout.padding.left,height:k.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom-F.value,width:k.value.width-t.value.style.layout.padding.left-t.value.style.layout.padding.right-F.value})),y=e.computed(()=>{M.dataset.forEach((o,i)=>{r.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["values"]}).forEach(h=>{r.error({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:h,index:i})}),o.values&&o.values.forEach((h,E)=>{r.getMissingDatasetAttributes({datasetObject:h,requiredAttributes:["x","y"]}).forEach(V=>{r.error({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:`values.${V}`,index:`${i} - ${E}`})})})});const a=Math.min(...N.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.x))),u=Math.max(...N.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.x))),l=Math.min(...N.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.y))),s=Math.max(...N.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.y)));return{xMin:a>=0?0:a,xMax:u,yMin:l>=0?0:l,yMax:s}}),v=e.computed(()=>({x:n.value.left+Math.abs(y.value.xMin)/(y.value.xMax+Math.abs(y.value.xMin))*n.value.width,y:n.value.bottom-Math.abs(y.value.yMin)/(y.value.yMax+Math.abs(y.value.yMin))*n.value.height})),N=e.computed(()=>M.dataset.map((a,u)=>{const l=`cluster_${g.value}_${u}`;return{...a,id:l,color:a.color?a.color:te.value[u]||r.palette[u]||r.palette[u%r.palette.length],opacity:p.value.includes(l)?.5:1,shape:a.shape??"circle",segregate:()=>re(l),isSegregated:p.value.includes(l)}})),ge=e.computed(()=>({cy:"scatter-div-legend",backgroundColor:t.value.style.legend.backgroundColor,color:t.value.style.legend.color,fontSize:t.value.style.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.legend.bold?"bold":""})),X=e.computed(()=>N.value.map((a,u)=>({...a,plots:a.values.map(l=>({x:n.value.left+(l.x+Math.abs(y.value.xMin))/(y.value.xMax+Math.abs(y.value.xMin))*n.value.width,y:n.value.bottom-(l.y+Math.abs(y.value.yMin))/(y.value.yMax+Math.abs(y.value.yMin))*n.value.height,v:{...l,name:l.name||""},clusterName:a.name,color:a.color?a.color:te.value[u]||r.palette[u]||r.palette[u%r.palette.length],id:`plot_${g.value}_${Math.random()}`,weight:l.weight??t.value.style.layout.plots.radius}))})).filter(a=>!p.value.includes(a.id))),x=e.computed(()=>X.value.map(a=>{const u=a.plots.reduce((d,L)=>d+L.x,0)/a.plots.length,l=a.plots.reduce((d,L)=>d+L.y,0)/a.plots.length;let s=0,o=0,i=0;for(const d of a.plots)s+=(d.x-u)*(d.y-l),o+=(d.x-u)**2,i+=(d.y-l)**2;const h=s/Math.sqrt(o*i),E=h*(Math.sqrt(i)/Math.sqrt(o)),V=l-E*u,_={x1:n.value.left,x2:n.value.right,y1:E*n.value.left+V,y2:E*n.value.right+V,coefficient:h},m=(_.y2-_.y1)/(_.x2-_.x1),w=_.y1-m*_.x1,C=Math.min(k.value.width-t.value.style.layout.padding.right,Math.max(t.value.style.layout.padding.left,(n.value.top-w)/m)),O={x:C,y:m*C+w<=t.value.style.layout.padding.top?n.value.top:m*C+w};return{...a,correlation:_,label:O,plots:a.plots.map(d=>{const L=(d.x+m*d.y-m*w)/(1+Math.pow(m,2)),j=(m*d.x+Math.pow(m,2)*d.y+w)/(1+Math.pow(m,2)),f=Math.sqrt(Math.pow(d.x-L,2)+Math.pow(d.y-j,2));return{...d,deviation:f,shape:a.shape,color:a.color}})}})),le=e.computed(()=>Math.max(...x.value.flatMap(a=>a.plots.map(u=>Math.abs(u.deviation)))));function ke(){return x.value}function ae(a,u){const l=Array.isArray(a)?a.flatMap(f=>f.plots.map(z=>({x:z.x,y:z.y}))):a.plots.map(f=>({x:f.x,y:f.y}));let s=1/0,o=-1/0,i=1/0,h=-1/0;l.forEach(({x:f,y:z})=>{s=Math.min(s,f),o=Math.max(o,f),i=Math.min(i,z),h=Math.max(h,z)});const E=o-s,V=h-i,_=E/u,m=V/u,w=Array(u).fill(0),C=Array(u).fill(0);l.forEach(({x:f,y:z})=>{const R=Math.floor((f-s)/_),G=Math.floor((z-i)/m);w[R]||(w[R]=0),C[G]||(C[G]=0),w[R]+=1,C[G]+=1});const O=[],d=[];for(let f=0;f<u;f+=1)O.push(s+(f+.5)*_),d.push(i+(f+.5)*m);const L=Math.max(...w),j=Math.max(...C);return{x:w,y:C,avgX:O,avgY:d,maxX:L,maxY:j}}const $=e.computed(()=>t.value.style.layout.marginalBars.tranches),b=e.computed(()=>ae(X.value,$.value)),xe=e.computed(()=>{const a=n.value.top-t.value.style.layout.marginalBars.offset,u=n.value.right+t.value.style.layout.marginalBars.offset;return X.value.map(l=>{const s=ae(l,$.value);return{coords:s,dX:r.createSmoothPath(s.avgX.map((o,i)=>({x:o,y:a-s.x[i]/s.maxX*t.value.style.layout.marginalBars.size}))),dY:r.createSmoothPath(s.avgY.map((o,i)=>({y:o,x:u+t.value.style.layout.marginalBars.size*s.y[i]/s.maxY}))),color:l.color,id:l.id}})}),B=e.ref(void 0),c=e.ref(null),Y=e.ref(null);function oe(a,u){B.value=a.id,c.value=a;let l="";Y.value={datapoint:a,seriesIndex:u,series:x.value,config:t.value};const s=t.value.style.tooltip.customFormat;r.isFunction(s)&&r.functionReturnsString(()=>s({datapoint:a,seriesIndex:u,series:x.value,config:t.value}))?I.value=s({datapoint:a,seriesIndex:u,series:x.value,config:t.value}):(a.clusterName&&(l+=`<div style="display:flex;gap:3px;align-items:center">${a.clusterName}</div>`),a.v.name&&(l+=`<div>${a.v.name}</div>`),l+=`<div style="text-align:left;margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,l+=`<div>${t.value.style.layout.dataLabels.xAxis.name}: <b>${isNaN(a.v.x)?"-":r.applyDataLabel(t.value.style.layout.plots.selectors.labels.x.formatter,a.v.x,r.dataLabel({p:t.value.style.tooltip.prefix,v:a.v.x,s:t.value.style.tooltip.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:a,seriesIndex:u})}</b></div>`,l+=`<div>${t.value.style.layout.dataLabels.yAxis.name}: <b>${isNaN(a.v.y)?"-":r.applyDataLabel(t.value.style.layout.plots.selectors.labels.y.formatter,a.v.y,r.dataLabel({p:t.value.style.tooltip.prefix,v:a.v.y,s:t.value.style.tooltip.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:a,seriesIndex:u})}</b></div>`,l+=`${t.value.style.layout.plots.deviation.translation}: <b>${r.dataLabel({v:a.deviation,r:t.value.style.layout.plots.deviation.roundingValue})}</b>`,l+="</div>",I.value=`<div>${l}</div>`),q.value=!0}function se(){q.value=!1,B.value=void 0,c.value=null}const p=e.ref([]);function re(a){p.value.includes(a)?p.value=p.value.filter(u=>u!==a):p.value.length<M.dataset.length-1&&p.value.push(a)}function ne(){e.nextTick(()=>{const a=["",t.value.table.translations.correlationCoefficient,t.value.table.translations.nbrPlots,`${t.value.style.layout.dataLabels.xAxis.name} ${t.value.table.translations.average}`,`${t.value.style.layout.dataLabels.yAxis.name} ${t.value.table.translations.average}`],u=x.value.map(o=>[o.name,o.correlation.coefficient,o.plots.length,o.plots.map(i=>i.v.x).reduce((i,h)=>i+h,0)/o.plots.length,o.plots.map(i=>i.v.y).reduce((i,h)=>i+h,0)/o.plots.length]),l=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([a]).concat(u),s=r.createCsvContent(l);r.downloadCsv({csvContent:s,title:t.value.style.title.text||"vue-ui-heatmap"})})}const W=e.computed(()=>{const a=[t.value.table.translations.series,t.value.table.translations.correlationCoefficient,t.value.table.translations.nbrPlots,`${t.value.style.layout.dataLabels.xAxis.name} ${t.value.table.translations.average}`,`${t.value.style.layout.dataLabels.yAxis.name} ${t.value.table.translations.average}`],u=x.value.map(s=>[{shape:s.shape,content:s.name,color:s.color},Number((s.correlation.coefficient??0).toFixed(t.value.table.td.roundingValue)).toLocaleString(),s.plots.length.toLocaleString(),Number((s.plots.map(o=>o.v.x??0).reduce((o,i)=>o+i,0)/s.plots.length).toFixed(t.value.table.td.roundingAverage)).toLocaleString(),Number((s.plots.map(o=>o.v.y??0).reduce((o,i)=>o+i,0)/s.plots.length).toFixed(t.value.table.td.roundingAverage)).toLocaleString()]),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:a,body:u,config:l,colNames:a}}),T=e.ref(!1);function be(a){T.value=a,U.value+=1}function ue(){S.value.showTable=!S.value.showTable}function ie(){S.value.showTooltip=!S.value.showTooltip}return he({getData:ke,generatePdf:Z,generateCsv:ne,generateImage:ee,toggleTable:ue,toggleTooltip:ie}),(a,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-scatter ${T.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"scatterChart",ref:A,id:`vue-ui-scatter_${g.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor};${t.value.responsive?"height: 100%":""}`)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:H,style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor}`)},[e.createVNode(we._sfc_main,{config:{title:{cy:"scatter-div-title",...t.value.style.title},subtitle:{cy:"scatter-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&D.value?(e.openBlock(),e.createBlock(ye.UserOptions,{ref_key:"details",ref:me,key:`user_options_${U.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(Q),isPrinting:e.unref(K),uid:g.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.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,isTooltip:S.value.showTooltip,isFullscreen:T.value,titles:{...t.value.userOptions.buttonTitles},chartElement:A.value,onToggleFullscreen:be,onGeneratePdf:e.unref(Z),onGenerateCsv:ne,onGenerateImage:e.unref(ee),onToggleTable:ue,onToggleTooltip:ie},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),D.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":T.value,"vue-data-ui-fulscreen--off":!T.value}),viewBox:`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.backgroundColor};color:${t.value.style.color}`)},[t.value.style.layout.axis.show?(e.openBlock(),e.createElementBlock("g",Le,[e.createElementVNode("line",{x1:v.value.x,x2:v.value.x,y1:n.value.top,y2:n.value.bottom,stroke:t.value.style.layout.axis.stroke,"stroke-width":t.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,ze),e.createElementVNode("line",{x1:n.value.left,x2:n.value.right,y1:v.value.y,y2:v.value.y,stroke:t.value.style.layout.axis.stroke,"stroke-width":t.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,Ve)])):e.createCommentVNode("",!0),t.value.style.layout.plots.giftWrap.show?(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.plots.length>2?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:e.unref(r.giftWrap)({series:l.plots}),fill:`${l.color}${e.unref(r.opacity)[t.value.style.layout.plots.giftWrap.fillOpacity*100]}`,"stroke-width":t.value.style.layout.plots.giftWrap.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.giftWrap.strokeDasharray,stroke:l.color,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Te)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[!l.shape||l.shape==="circle"?(e.openBlock(),e.createElementBlock("g",De,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(o,i)=>(e.openBlock(),e.createElementBlock("circle",{cx:o.x,cy:o.y,r:B.value&&B.value===o.id?o.weight*2:o.weight,fill:`${l.color}${e.unref(r.opacity)[t.value.style.layout.plots.opacity*100]}`,stroke:t.value.style.layout.plots.stroke,"stroke-width":t.value.style.layout.plots.strokeWidth,onMouseover:h=>oe(o,s),onMouseleave:se,style:e.normalizeStyle(`opacity:${B.value&&B.value===o.id?1:t.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(o.deviation)/le.value:t.value.style.layout.plots.significance.show&&Math.abs(o.deviation)>t.value.style.layout.plots.significance.deviationThreshold?t.value.style.layout.plots.significance.opacity:1}`)},null,44,Pe))),256))])):(e.openBlock(),e.createElementBlock("g",Fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(o,i)=>(e.openBlock(),e.createBlock(ve._sfc_main,{plot:{x:o.x,y:o.y},radius:B.value&&B.value===o.id?o.weight*2:o.weight,shape:l.shape,color:`${l.color}${e.unref(r.opacity)[t.value.style.layout.plots.opacity*100]}`,stroke:t.value.style.layout.plots.stroke,strokeWidth:t.value.style.layout.plots.strokeWidth,onMouseover:h=>oe(o,s),onMouseleave:se,style:e.normalizeStyle(`opacity:${B.value&&B.value===o.id?1:t.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(o.deviation)/le.value:t.value.style.layout.plots.significance.show&&Math.abs(o.deviation)>t.value.style.layout.plots.significance.deviationThreshold?t.value.style.layout.plots.significance.opacity:1}`)},null,8,["plot","radius","shape","color","stroke","strokeWidth","onMouseover","style"]))),256))]))]))),256)),t.value.style.layout.marginalBars.show?(e.openBlock(),e.createElementBlock("g",We,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`marginal_x_${g.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.marginalBars.fill},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.backgroundColor},null,8,Ie)],8,Oe),e.createElementVNode("linearGradient",{id:`marginal_y_${g.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.backgroundColor},null,8,Ye),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.marginalBars.fill},null,8,je)],8,Xe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.x,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l&&b.value.avgX[s]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:b.value.avgX[s]-n.value.width/$.value/2,y:n.value.top-t.value.style.layout.marginalBars.offset-l/b.value.maxX*t.value.style.layout.marginalBars.size,width:n.value.width/$.value<=0?1e-4:n.value.width/$.value,height:l/b.value.maxX*t.value.style.layout.marginalBars.size<=0?1e-4:l/b.value.maxX*t.value.style.layout.marginalBars.size,fill:t.value.style.layout.marginalBars.useGradient?`url(#marginal_x_${g.value})`:t.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${t.value.style.layout.marginalBars.opacity}`),stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.strokeWidth,rx:t.value.style.layout.marginalBars.borderRadius},null,12,Re)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.y,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l&&b.value.avgY[s]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:n.value.right+t.value.style.layout.marginalBars.offset,y:b.value.avgY[s]-n.value.height/$.value/2,height:n.value.height/$.value<=0?1e-4:n.value.height/$.value,width:l/b.value.maxY*t.value.style.layout.marginalBars.size<=0?1e-4:l/b.value.maxY*t.value.style.layout.marginalBars.size,fill:t.value.style.layout.marginalBars.useGradient?`url(#marginal_y_${g.value})`:t.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${t.value.style.layout.marginalBars.opacity}`),stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.strokeWidth,rx:t.value.style.layout.marginalBars.borderRadius},null,12,Ge)):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.marginalBars.showLines?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(xe.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[p.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${l.dX}`,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,He)),p.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${l.dX}`,stroke:l.color,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,Je)),p.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${l.dY}`,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,Ke)),p.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:3,d:`M ${l.dY}`,stroke:l.color,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,Qe))],64))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),c.value&&t.value.style.layout.plots.selectors.show?(e.openBlock(),e.createElementBlock("g",Ze,[e.createElementVNode("line",{x1:v.value.x,x2:c.value.x,y1:c.value.y,y2:c.value.y,stroke:t.value.style.layout.plots.selectors.stroke,"stroke-width":t.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,et),e.createElementVNode("line",{x1:c.value.x,x2:c.value.x,y1:v.value.y,y2:c.value.y,stroke:t.value.style.layout.plots.selectors.stroke,"stroke-width":t.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,tt),e.createElementVNode("text",{x:v.value.x+(c.value.x>v.value.x?-6:6),y:c.value.y+t.value.style.layout.plots.selectors.labels.fontSize/3,"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":c.value.x>v.value.x?"end":"start"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,c.value.v.y,e.unref(r.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:c.value.v.y,s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.plots.selectors.labels.rounding}),{datapoint:c.value})),9,lt),e.createElementVNode("text",{x:c.value.x,y:v.value.y+(c.value.y>v.value.y?-6:t.value.style.layout.plots.selectors.labels.fontSize+6),"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,c.value.v.x,e.unref(r.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:c.value.v.x,s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.plots.selectors.labels.rounding}),{datapoint:c.value})),9,at),e.createElementVNode("circle",{cx:v.value.x,cy:c.value.y,r:t.value.style.layout.plots.selectors.markers.radius,fill:t.value.style.layout.plots.selectors.markers.fill,stroke:t.value.style.layout.plots.selectors.markers.stroke,"stroke-width":t.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,ot),e.createElementVNode("circle",{cx:c.value.x,cy:v.value.y,r:t.value.style.layout.plots.selectors.markers.radius,fill:t.value.style.layout.plots.selectors.markers.fill,stroke:t.value.style.layout.plots.selectors.markers.stroke,"stroke-width":t.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,st),t.value.style.layout.plots.selectors.labels.showName?(e.openBlock(),e.createElementBlock("text",{key:0,x:c.value.x,y:c.value.y+(c.value.y<v.value.y?-t.value.style.layout.plots.selectors.labels.fontSize/2:t.value.style.layout.plots.selectors.labels.fontSize),"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":c.value.x<n.value.left+100?"start":c.value.x>n.value.right-100?"end":c.value.x>v.value.x?"start":"end"},e.toDisplayString(c.value.v.name),9,rt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",nt,[e.createElementVNode("text",{x:n.value.left-5,y:v.value.y+t.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.plots.selectors.labels.x.formatter,y.value.xMin,e.unref(r.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:y.value.xMin,s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.xAxis.rounding}))),9,ut),e.createElementVNode("text",{x:n.value.right+3,y:v.value.y+t.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"start","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.plots.selectors.labels.x.formatter,y.value.xMax,e.unref(r.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:y.value.xMax,s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.xAxis.rounding}))),9,it),e.createElementVNode("text",{id:`vue-ui-scatter-xAxis-label-${g.value}`,transform:`translate(${t.value.style.layout.dataLabels.xAxis.fontSize*2}, ${n.value.top+n.value.height/2}), rotate(-90)`,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(t.value.style.layout.dataLabels.xAxis.name),9,ct)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",yt,[e.createElementVNode("text",{x:v.value.x,y:n.value.bottom+t.value.style.layout.dataLabels.yAxis.fontSize+3,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,y.value.yMin,e.unref(r.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:y.value.yMin,s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.yAxis.rounding}))),9,vt),e.createElementVNode("text",{x:v.value.x,y:n.value.top-t.value.style.layout.dataLabels.yAxis.fontSize/2,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,y.value.yMax,e.unref(r.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:y.value.yMax,s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.yAxis.rounding}))),9,dt),e.createElementVNode("text",{"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,"font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal",fill:t.value.style.layout.dataLabels.yAxis.color,x:n.value.left+n.value.width/2,y:n.value.bottom+8+t.value.style.layout.dataLabels.yAxis.fontSize*2},e.toDisplayString(t.value.style.layout.dataLabels.yAxis.name),9,pt)])):e.createCommentVNode("",!0),e.createElementVNode("clipPath",{id:`clip_path_${g.value}`},[e.createElementVNode("rect",{x:n.value.left,y:n.value.top,width:n.value.width<=0?1e-4:n.value.width,height:n.value.height<=0?1e-4:n.value.height},null,8,ft)],8,ht),t.value.style.layout.correlation.show?(e.openBlock(),e.createElementBlock("g",mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,s)=>(e.openBlock(),e.createElementBlock("line",{x1:l.correlation.x1,x2:l.correlation.x2,y1:l.correlation.y1,y2:l.correlation.y2,"stroke-dasharray":t.value.style.layout.correlation.strokeDasharray,stroke:l.color,"stroke-width":t.value.style.layout.correlation.strokeWidth,"clip-path":`url(#clip_path_${g.value})`},null,8,gt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.correlation.label.show?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.label.x,y:l.label.y,fill:t.value.style.layout.correlation.label.useSerieColor?l.color:t.value.style.layout.correlation.label.color,"font-size":t.value.style.layout.correlation.label.fontSize,"font-weight":t.value.style.layout.correlation.label.bold?"bold":"normal"},e.toDisplayString(Number(l.correlation.coefficient.toFixed(t.value.style.layout.correlation.label.roundingValue)).toLocaleString()),9,kt)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:k.value},void 0,!0)],14,Ee)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",xt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(K)||e.unref(Q)})),void 0,!0)])):e.createCommentVNode("",!0),D.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Me.default,{key:4,config:{type:"quadrant",style:{backgroundColor:t.value.style.backgroundColor,quadrant:{grid:{color:t.value.style.layout.axis.stroke},plots:{color:t.value.style.layout.axis.stroke,radius:1}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:J},[t.value.style.legend.show?(e.openBlock(),e.createBlock(_e.Legend,{key:0,legendSet:N.value,config:ge.value,onClickMarker:u[0]||(u[0]=({legend:l})=>re(l.id))},{item:e.withCtx(({legend:l})=>[e.createElementVNode("div",{onClick:s=>l.segregate(),style:e.normalizeStyle(`opacity:${p.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name),13,bt)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:N.value},void 0,!0)],512),e.createVNode(Be._sfc_main,{show:S.value.showTooltip&&q.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:A.value,content:I.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Y.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Y.value})),void 0,!0)]),default:e.withCtx(()=>[t.value.style.tooltip.showShape?(e.openBlock(),e.createElementBlock("div",wt,[(e.openBlock(),e.createElementBlock("svg",Bt,[e.createVNode(ve._sfc_main,{shape:c.value.shape,color:c.value.color,plot:{x:10,y:10},radius:7},null,8,["shape","color"])]))])):e.createCommentVNode("",!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),D.value?(e.openBlock(),e.createBlock(Se.default,{key:5,hideDetails:"",config:{open:S.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createVNode(Ce.DataTable,{colNames:W.value.colNames,head:W.value.head,body:W.value.body,config:W.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:u[1]||(u[1]=l=>S.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),td:e.withCtx(({td:l})=>[l.shape?(e.openBlock(),e.createElementBlock("div",_t,[e.createElementVNode("span",null,e.toDisplayString(l.content),1)])):(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:l},null,8,Ct))]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Ne))}},St=$e._export_sfc(Mt,[["__scopeId","data-v-4009bc76"]]);exports.default=St;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref as i, computed as N, openBlock as V, createElementBlock as U, nextTick as G } from "vue";
|
|
2
|
-
import { u as K, y as P, z as q } from "./index-
|
|
2
|
+
import { u as K, y as P, z as q } from "./index-CQyrBpOX.js";
|
|
3
3
|
import J from "./html2canvas.esm-d2sM-0Wm.js";
|
|
4
4
|
const te = {
|
|
5
5
|
__name: "vue-ui-screenshot",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),k=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),k=require("./index-COMTToJY.cjs"),V=require("./html2canvas.esm-BA_v9SIU.cjs"),U={__name:"vue-ui-screenshot",props:{config:{type:Object,default(){return{}}}},emits:["postImage"],setup(z,{expose:T,emit:H}){const C=z,{vue_ui_screenshot:B}=k.useConfig(),$=i.ref(`vue-ui-screenshot-${Math.random()}`),n=i.computed(()=>{if(!Object.keys(C.config||{}).length)return B;const e=k.treeShake({defaultConfig:B,userConfig:C.config});return k.convertConfigColors(e)}),a=i.ref(null),d=i.ref(null),v=i.ref(null),M=i.ref(null),S=i.ref(null),y=i.ref(null),h=i.ref(null),p=i.ref(null),f=i.ref(null),b=i.ref(null),x=i.ref(null),w=i.ref(!1),I=i.ref(null);function R(){const e=document.createElement("DIV"),{innerWidth:t,innerHeight:l}=window;return e.style.position="fixed",e.style.top=`${l?l/2-n.value.style.captureArea.initialHeight/2:200}px`,e.style.left=`${t?t/2-n.value.style.captureArea.initialWidth/2:100}px`,e.style.width=`${n.value.style.captureArea.initialWidth}px`,e.style.height=`${n.value.style.captureArea.initialHeight}px`,e.style.background=n.value.style.captureArea.background,e.style.cursor="move",e.style.boxSizing="border-box",e.style.border=n.value.style.captureArea.border,e.style.resize="both",e.style.padding="none !important",e.style.margin="none !important",e.dataset.cy="screenshot-overlay",e}function E(){a.value&&(clearTimeout(I.value),a.value.remove(),a.value=null)}function W(e){const t=document.createElement("DIV");t.classList.add("vue-ui-screenshot-info-text"),t.innerHTML=n.value.translations.info,t.dataset.html2canvasIgnore="true",t.dataset.cy="screenshot-info-text",t.style.background=n.value.style.info.background,t.style.color=n.value.style.info.color,t.style.fontWeight=n.value.style.info.bold?"bold":"normal",t.style.minWidth=`${n.value.style.info.minWidth}px`,t.style.left="50%",t.style.padding=`${n.value.style.info.padding}px`,t.style.position="absolute",t.style.textAlign="center",t.style.top=`${n.value.style.info.top}px`,t.style.transform="translateX(-50%)",t.style.borderRadius=`${n.value.style.info.borderRadius}px`,t.style.boxShadow=n.value.style.info.boxShadow,t.style.fontFamily=n.value.style.info.fontFamily,t.style.fontSize=`${n.value.style.info.fontSize}px`,t.style.border=n.value.style.info.border,t.style.userSelect="none";const l=document.createElement("BUTTON");l.classList.add("vue-ui-screenshot-close-button"),l.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" stroke-width="2.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 6l-12 12" /><path d="M6 6l12 12" /></svg>',l.style.outline="none",l.dataset.cy="screenshot-close-button",l.style.display="flex",l.style.cursor="pointer",l.style.borderRadius="50%",l.style.alignItems="center",l.style.position="absolute",l.style.justifyContent="center",l.style.transformOrigin="center",l.style.top=`${n.value.style.cancelButton.top}px`,l.style.right=`${n.value.style.cancelButton.right}px`,l.style.background=n.value.style.cancelButton.background,l.style.color=n.value.style.cancelButton.color,l.style.border=n.value.style.cancelButton.border,l.style.borderRadius=`${n.value.style.cancelButton.borderRadius}px`,l.style.height=`${n.value.style.cancelButton.size}px`,l.style.width=`${n.value.style.cancelButton.size}px`,l.addEventListener("click",E),t.appendChild(l),e.appendChild(t)}function X(e){a.value&&(w.value=!0,e.touches?(y.value=e.touches[0].clientX,h.value=e.touches[0].clientY):(y.value=e.clientX,h.value=e.clientY),b.value=a.value.getBoundingClientRect().width,x.value=a.value.getBoundingClientRect().height,e.target.addEventListener("mousemove",L),e.target.addEventListener("touchmove",L))}function L(e){if(!a.value)return;let t,l;e.touches?(p.value=e.touches[0].clientX,t=e.touches[0].clientX,f.value=e.touches[0].clientY,l=e.touches[0].clientY):(p.value=e.clientX,t=e.clientX,f.value=e.clientY,l=e.clientY);const u=e.target.classList[0],o=a.value.style;switch(!0){case u==="vue-ui-screenshot-handle-nw":o.top=`${l}px`,o.left=`${t}px`,o.width=`${b.value+(y.value-p.value)}px`,o.height=`${x.value+(h.value-f.value)}px`;break;case u==="vue-ui-screenshot-handle-ne":o.top=`${l}px`,o.width=`${b.value+(p.value-y.value)}px`,o.height=`${x.value+(h.value-f.value)}px`;break;case u==="vue-ui-screenshot-handle-sw":o.left=`${t}px`,o.width=`${b.value+(y.value-p.value)}px`,o.height=`${x.value+(f.value-h.value)}px`;break;case u==="vue-ui-screenshot-handle-se":o.width=`${b.value+(p.value-y.value)}px`,o.height=`${x.value+(f.value-h.value)}px`;break}}function A(e){if(!a.value)return;e.stopPropagation();const t=Array.from(e.target.classList);t.includes("vue-ui-screenshot-handle-se")||t.includes("vue-ui-screenshot-handle-sw")||t.includes("vue-ui-screenshot-handle-nw")||t.includes("vue-ui-screenshot-handle-ne")||(w.value=!0,a.value.style.pointerEvents="auto",e.touches?(d.value=e.touches[0].clientX,v.value=e.touches[0].clientY):(d.value=e.clientX,v.value=e.clientY),M.value=d.value,S.value=v.value,document.addEventListener("mousemove",g),document.addEventListener("touchmove",g),document.addEventListener("mouseup",m),document.addEventListener("touchend",m))}function m(){d.value=null,v.value=null,M.value=null,S.value=null,w.value=!1,document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",m),document.removeEventListener("touchmove",g),document.removeEventListener("touchend",m)}function g(e){if(!a.value)return;const t=a.value.getBoundingClientRect();let l,u;e.touches?(l=e.touches[0].clientX-d.value,u=e.touches[0].clientY-v.value,d.value=e.touches[0].clientX,v.value=e.touches[0].clientY):(l=e.clientX-d.value,u=e.clientY-v.value,d.value=e.clientX,v.value=e.clientY),a.value.style.top=`${t.top+u}px`,a.value.style.left=`${t.left+l}px`}function Y(e){e.target.removeEventListener("mousemove",L),e.target.removeEventListener("touchmove",L),document.removeEventListener("mousemove",g),document.removeEventListener("touchmove",g),document.removeEventListener("mouseup",m),document.removeEventListener("touchend",m),w.value=!1}function D(){const e=navigator.userAgent;return/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(e)?"tablet":/Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(e)?"mobile":"desktop"}function O(){const e=document.getElementById(`vue-ui-screenshot-button-${$.value}`);e.innerHTML=`<svg id="saveButtonSvg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 20 20" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
|
2
2
|
<path fill="none" stroke="currentColor" d="M1 4 1 3C1 2 2 1 3 1L4 1M16 1 17 1C18 1 19 2 19 3L19 4M1 16 1 17C1 18 2 19 3 19L4 19M16 19 17 19C18 19 19 18 19 17L19 16M8 10A1 1 0 0012 10 1 1 0 008 10M5 13 5 8C5 7 5 7 6 7L14 7C15 7 15 7 15 8L15 13C15 14 15 14 14 14L6 14C5 14 5 14 5 13M7 6 13 6" />
|
|
3
3
|
</svg>`,document.getElementById(`vue-ui-screenshot-button-${$.value}`).animate([{opacity:"0.3"},{opacity:"1"},{opacity:"0.3"}],{duration:1e3,iterations:1/0}),e.classList.add("loading"),e.setAttribute("disabled","true")}function _(){if(!a.value)return;O();const e=a.value.getBoundingClientRect();I.value=setTimeout(()=>{V.default(document.body,{allowTaint:!0,width:e.width,height:e.height,x:e.left+window.scrollX,y:e.top+window.scrollY,useCORS:!0,scale:n.value.quality}).then(t=>{const l=t.toDataURL("image/png",1),u=l.split(",")[1],c=atob(u).length/1024;if(n.value.mode==="download"){const s=document.createElement("a");s.download="screenshot.png",s.href=l,s.click()}n.value.mode==="post"&&H("postImage",{createdAt:Date.now(),fileSize:`${c.toFixed(2)} KB`,image:l,x:e.left+window.scrollX,y:e.top+window.scrollY,screenWidth:window.innerWidth>0?window.innerWidth:screen.width,deviceType:D()})}).finally(E)},10)}function F(e){const t=n.value.style.handles.size/2+4,l=document.createElement("DIV");l.style.top=`${-t}px`,l.style.left=`${-t}px`,l.style.cursor="nw-resize",l.classList.add("vue-ui-screenshot-handle-nw"),l.dataset.cy="screenshot-handle-nw";const u=document.createElement("DIV");u.style.top=`${-t}px`,u.style.left="auto",u.style.right=`${-t}px`,u.style.cursor="ne-resize",u.classList.add("vue-ui-screenshot-handle-ne"),u.dataset.cy="screenshot-handle-ne";const o=document.createElement("DIV");o.style.top="auto",o.style.bottom=`${-t}px`,o.style.left=`${-t}px`,o.style.cursor="sw-resize",o.classList.add("vue-ui-screenshot-handle-sw"),o.dataset.cy="screenshot-handle-sw";const c=document.createElement("DIV");c.style.top="auto",c.style.left="auto",c.style.right=`${-t}px`,c.style.bottom=`${-t}px`,c.style.cursor="se-resize",c.classList.add("vue-ui-screenshot-handle-se"),c.dataset.cy="screenshot-handle-se";const s=document.createElement("BUTTON");s.innerHTML=`<svg id="saveButtonSvg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 20 20" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path fill="none" stroke="currentColor" d="M1 4 1 3C1 2 2 1 3 1L4 1M16 1 17 1C18 1 19 2 19 3L19 4M1 16 1 17C1 18 2 19 3 19L4 19M16 19 17 19C18 19 19 18 19 17L19 16M8 10A1 1 0 0012 10 1 1 0 008 10M5 13 5 8C5 7 5 7 6 7L14 7C15 7 15 7 15 8L15 13C15 14 15 14 14 14L6 14C5 14 5 14 5 13M7 6 13 6" /></svg><span>${n.value.translations.captureButton}</span>`,s.classList.add("vue-ui-screenshot-capture-button"),s.id=`vue-ui-screenshot-button-${$.value}`,s.style.position="absolute",s.style.top="50%",s.style.left="50%",s.style.transform="translate(-50%,-50%)",s.style.background=n.value.style.captureButton.background,s.style.color=n.value.style.captureButton.color,s.style.border=n.value.style.captureButton.border,s.style.outline="none",s.style.cursor="pointer",s.style.padding=n.value.style.captureButton.padding,s.style.fontFamily=n.value.style.captureButton.fontFamily,s.style.fontSize=`${n.value.style.captureButton.fontSize}px`,s.style.minHeight=`${n.value.style.captureButton.minHeight}px`,s.style.width="fit-content",s.style.display="flex",s.style.alignItems="center",s.style.justifyContent="center",s.style.gap="3px",s.style.borderRadius=`${n.value.style.captureButton.borderRadius}px`,s.style.boxShadow=n.value.style.captureButton.boxShadow,s.style.userSelect="none",s.style.opacity="0.95",s.style.textAlign="left",s.style.fontWeight=n.value.style.captureButton.bold?"bold":"normal",s.dataset.cy="screenshot-save-button",s.addEventListener("mouseenter",()=>{s.style.opacity="1"}),s.addEventListener("mouseleave",()=>{s.style.opacity="0.95"}),s.addEventListener("click",_),e.appendChild(s),[l,u,o,c].forEach((r,N)=>{r.classList.add(`handle-${N}`),r.dataset.html2canvasIgnore="true",r.style.position="absolute",r.style.height=`${n.value.style.handles.size}px`,r.style.width=`${n.value.style.handles.size}px`,r.style.background=n.value.style.handles.background,r.style.border=n.value.style.handles.border,r.style.borderRadius=`${n.value.style.handles.borderRadius}px`,r.style.pointerEvents="auto !important",r.addEventListener("mousedown",X),r.addEventListener("touchstart",X),e.appendChild(r)})}function j(){a.value||i.nextTick(()=>{const e=R();e.dataset.html2canvasIgnore=!0,W(e),F(e),a.value=e,e.addEventListener("touchmove",function(t){t.preventDefault()},{passive:!1}),document.body.appendChild(e),document.addEventListener("mousedown",A),document.addEventListener("touchstart",A),document.addEventListener("mouseup",Y),document.addEventListener("touchend",Y)})}return T({shoot:j,close:E}),(e,t)=>(i.openBlock(),i.createElementBlock("div"))}};exports.default=U;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as g, computed as x, openBlock as e, createElementBlock as o, normalizeClass as Z, normalizeStyle as n, unref as s, createElementVNode as t, createCommentVNode as a, Fragment as d, renderList as y, pushScopeId as N, popScopeId as F, createStaticVNode as A } from "vue";
|
|
2
|
-
import { u as X, J as L, X as u, v as h, P as O } from "./index-
|
|
3
|
-
import { u as V } from "./useNestedProp-
|
|
2
|
+
import { u as X, J as L, X as u, v as h, P as O } from "./index-CQyrBpOX.js";
|
|
3
|
+
import { u as V } from "./useNestedProp-CK_S9Ya9.js";
|
|
4
4
|
import { _ as G } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const _ = (w) => (N("data-v-73139463"), w = w(), F(), w), R = ["id"], T = ["xmlns"], Y = ["stroke", "fill"], D = ["xmlns"], J = ["stroke", "fill"], U = ["xmlns"], K = ["stroke"], Q = ["fill"], ll = ["stroke", "fill"], tl = ["stroke", "fill"], el = ["fill"], ol = ["stroke", "fill"], sl = ["stroke", "fill"], rl = ["fill"], il = ["stroke", "fill"], nl = ["stroke", "fill"], al = ["fill"], ul = ["stroke", "fill"], cl = ["stroke", "fill"], dl = ["fill"], hl = ["stroke", "fill"], yl = ["stroke", "fill"], kl = ["xmlns"], vl = ["stroke"], _l = ["stroke"], xl = ["stroke", "fill"], pl = ["stroke", "fill"], gl = ["stroke", "fill"], wl = ["stroke", "fill"], fl = ["stroke", "fill"], ml = ["stroke", "fill"], bl = ["stroke", "fill"], Ml = ["stroke", "fill"], $l = ["stroke", "fill"], Cl = ["stroke", "fill"], Ll = ["stroke", "fill"], Al = ["stroke", "fill"], Bl = ["stroke", "fill"], Wl = ["stroke", "fill"], Pl = ["stroke", "fill"], jl = ["stroke", "fill"], zl = ["stroke", "fill"], ql = ["stroke", "fill"], Hl = ["stroke", "fill"], Sl = ["stroke", "fill"], El = ["stroke", "fill"], Il = ["stroke", "fill"], Zl = ["stroke", "fill"], Nl = ["xmlns"], Fl = ["stroke"], Xl = ["xmlns"], Ol = ["stroke"], Vl = ["xmlns"], Gl = ["stroke"], Rl = ["xmlns"], Tl = ["fill"], Yl = ["fill"], Dl = ["fill"], Jl = ["fill"], Ul = ["fill"], Kl = ["fill"], Ql = ["fill"], lt = ["fill"], tt = ["fill"], et = ["fill"], ot = ["fill"], st = ["fill"], rt = ["xmlns"], it = ["stroke"], nt = ["stroke"], at = ["stroke"], ut = ["stroke"], ct = ["stroke"], dt = ["stroke"], ht = ["xmlns"], yt = ["stroke"], kt = ["stroke"], vt = ["stroke"], _t = ["stroke"], xt = ["stroke"], pt = ["stroke"], gt = ["stroke"], wt = ["stroke"], ft = ["stroke"], mt = ["xmlns"], bt = ["stroke"], Mt = ["xmlns"], $t = ["stroke"], Ct = ["stroke"], Lt = ["stroke"], At = ["stroke"], Bt = ["stroke"], Wt = ["stroke"], Pt = ["stroke"], jt = ["stroke"], zt = ["stroke"], qt = ["xmlns"], Ht = ["x1", "x2", "stroke"], St = ["xmlns"], Et = ["x", "y", "width", "height", "fill"], It = ["y", "width", "height", "fill"], Zt = ["xmlns"], Nt = ["fill"], Ft = ["fill"], Xt = ["fill"], Ot = ["xmlns"], Vt = ["x1", "x2", "y1", "y2", "stroke"], Gt = ["stroke"], Rt = ["fill"], Tt = ["xmlns"], Yt = ["fill"], Dt = ["fill"], Jt = ["x1", "y1", "x2", "y2", "stroke-width", "stroke"], Ut = ["xmlns"], Kt = { key: 0 }, Qt = ["stroke", "stroke-width"], le = ["stroke", "stroke-width"], te = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ee = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], oe = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], se = ["x", "y", "height", "width", "fill"], re = ["xmlns", "viewBox"], ie = ["x", "y", "stroke", "fill"], ne = ["xmlns"], ae = ["d", "stroke"], ue = ["cx", "cy", "r", "fill", "stroke"], ce = ["cx", "cy", "r", "fill", "stroke"], de = ["x", "y", "width", "fill"], he = ["cx", "cy", "fill"], ye = ["cx", "cy", "fill"], ke = ["stroke"], ve = ["xmlns"], _e = ["stroke", "stroke-width"], xe = ["stroke", "stroke-width"], pe = ["stroke", "stroke-width"], ge = ["fill"], we = ["fill"], fe = ["fill"], me = ["fill"], be = ["fill"], Me = ["fill"], $e = ["xmlns"], Ce = { key: 0 }, Le = ["stroke", "stroke-width"], Ae = ["stroke", "stroke-width"], Be = ["stroke", "stroke-width"], We = { key: 1 }, Pe = ["r", "fill"], je = ["r", "fill"], ze = ["xmlns"], qe = { key: 0 }, He = ["stroke", "stroke-width"], Se = ["stroke", "stroke-width"], Ee = ["fill", "rx", "x", "y", "width", "height"], Ie = ["xmlns"], Ze = ["stroke-width", "stroke"], Ne = ["stroke-width", "stroke"], Fe = ["stroke-width", "stroke"], Xe = ["xmlns"], Oe = ["stroke"], Ve = ["stroke"], Ge = ["stroke"], Re = ["stroke"], Te = ["fill"], Ye = ["stroke"], De = ["xmlns"], Je = ["stroke", "stroke-width"], Ue = ["stroke", "stroke-width"], Ke = ["fill", "r"], Qe = ["fill", "r"], lo = ["fill", "r"], to = ["fill", "r"], eo = ["fill", "r"], oo = ["fill", "r"], so = ["fill", "r"], ro = ["fill", "r"], io = ["fill", "r"], no = ["xmlns"], ao = ["d", "stroke", "stroke-width"], uo = ["d", "stroke", "stroke-width"], co = ["d", "stroke", "stroke-width"], ho = ["d", "stroke", "stroke-width"], yo = ["stroke", "stroke-width"], ko = ["stroke", "stroke-width"], vo = ["stroke", "stroke-width"], _o = ["fill"], xo = ["fill"], po = ["xmlns"], go = ["x", "y", "fill"], wo = ["x", "y", "fill"], fo = ["x", "y", "fill"], mo = ["xmlns"], bo = ["fill"], Mo = ["fill"], $o = ["y1", "y2", "stroke", "stroke-width"], Co = ["x1", "x2", "stroke", "stroke-width"], Lo = ["xmlns", "stroke"], Ao = /* @__PURE__ */ _(() => /* @__PURE__ */ t("path", {
|
|
6
6
|
stroke: "none",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),l=require("./index-6dSPekJy.cjs"),M=require("./useNestedProp-C0FeJ2Gu.cjs"),b=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),c=d=>(e.pushScopeId("data-v-73139463"),d=d(),e.popScopeId(),d),C=["id"],L=["xmlns"],$=["stroke","fill"],S=["xmlns"],z=["stroke","fill"],A=["xmlns"],W=["stroke"],P=["fill"],X=["stroke","fill"],j=["stroke","fill"],F=["fill"],q=["stroke","fill"],H=["stroke","fill"],I=["fill"],Z=["stroke","fill"],O=["stroke","fill"],T=["fill"],G=["stroke","fill"],R=["stroke","fill"],Y=["fill"],D=["stroke","fill"],U=["stroke","fill"],J=["xmlns"],K=["stroke"],Q=["stroke"],ee=["stroke","fill"],te=["stroke","fill"],le=["stroke","fill"],oe=["stroke","fill"],re=["stroke","fill"],ne=["stroke","fill"],se=["stroke","fill"],ae=["stroke","fill"],ce=["stroke","fill"],ie=["stroke","fill"],de=["stroke","fill"],ue=["stroke","fill"],ke=["stroke","fill"],ye=["stroke","fill"],he=["stroke","fill"],me=["stroke","fill"],ve=["stroke","fill"],pe=["stroke","fill"],_e=["stroke","fill"],xe=["stroke","fill"],ge=["stroke","fill"],fe=["stroke","fill"],we=["stroke","fill"],Ee=["xmlns"],Ne=["stroke"],Be=["xmlns"],Ve=["stroke"],Me=["xmlns"],be=["stroke"],Ce=["xmlns"],Le=["fill"],$e=["fill"],Se=["fill"],ze=["fill"],Ae=["fill"],We=["fill"],Pe=["fill"],Xe=["fill"],je=["fill"],Fe=["fill"],qe=["fill"],He=["fill"],Ie=["xmlns"],Ze=["stroke"],Oe=["stroke"],Te=["stroke"],Ge=["stroke"],Re=["stroke"],Ye=["stroke"],De=["xmlns"],Ue=["stroke"],Je=["stroke"],Ke=["stroke"],Qe=["stroke"],et=["stroke"],tt=["stroke"],lt=["stroke"],ot=["stroke"],rt=["stroke"],nt=["xmlns"],st=["stroke"],at=["xmlns"],ct=["stroke"],it=["stroke"],dt=["stroke"],ut=["stroke"],kt=["stroke"],yt=["stroke"],ht=["stroke"],mt=["stroke"],vt=["stroke"],pt=["xmlns"],_t=["x1","x2","stroke"],xt=["xmlns"],gt=["x","y","width","height","fill"],ft=["y","width","height","fill"],wt=["xmlns"],Et=["fill"],Nt=["fill"],Bt=["fill"],Vt=["xmlns"],Mt=["x1","x2","y1","y2","stroke"],bt=["stroke"],Ct=["fill"],Lt=["xmlns"],$t=["fill"],St=["fill"],zt=["x1","y1","x2","y2","stroke-width","stroke"],At=["xmlns"],Wt={key:0},Pt=["stroke","stroke-width"],Xt=["stroke","stroke-width"],jt=["x1","x2","y1","y2","stroke","stroke-width"],Ft=["x1","x2","y1","y2","stroke","stroke-width"],qt=["x1","x2","y1","y2","stroke","stroke-width"],Ht=["x","y","height","width","fill"],It=["xmlns","viewBox"],Zt=["x","y","stroke","fill"],Ot=["xmlns"],Tt=["d","stroke"],Gt=["cx","cy","r","fill","stroke"],Rt=["cx","cy","r","fill","stroke"],Yt=["x","y","width","fill"],Dt=["cx","cy","fill"],Ut=["cx","cy","fill"],Jt=["stroke"],Kt=["xmlns"],Qt=["stroke","stroke-width"],el=["stroke","stroke-width"],tl=["stroke","stroke-width"],ll=["fill"],ol=["fill"],rl=["fill"],nl=["fill"],sl=["fill"],al=["fill"],cl=["xmlns"],il={key:0},dl=["stroke","stroke-width"],ul=["stroke","stroke-width"],kl=["stroke","stroke-width"],yl={key:1},hl=["r","fill"],ml=["r","fill"],vl=["xmlns"],pl={key:0},_l=["stroke","stroke-width"],xl=["stroke","stroke-width"],gl=["fill","rx","x","y","width","height"],fl=["xmlns"],wl=["stroke-width","stroke"],El=["stroke-width","stroke"],Nl=["stroke-width","stroke"],Bl=["xmlns"],Vl=["stroke"],Ml=["stroke"],bl=["stroke"],Cl=["stroke"],Ll=["fill"],$l=["stroke"],Sl=["xmlns"],zl=["stroke","stroke-width"],Al=["stroke","stroke-width"],Wl=["fill","r"],Pl=["fill","r"],Xl=["fill","r"],jl=["fill","r"],Fl=["fill","r"],ql=["fill","r"],Hl=["fill","r"],Il=["fill","r"],Zl=["fill","r"],Ol=["xmlns"],Tl=["d","stroke","stroke-width"],Gl=["d","stroke","stroke-width"],Rl=["d","stroke","stroke-width"],Yl=["d","stroke","stroke-width"],Dl=["stroke","stroke-width"],Ul=["stroke","stroke-width"],Jl=["stroke","stroke-width"],Kl=["fill"],Ql=["fill"],eo=["xmlns"],to=["x","y","fill"],lo=["x","y","fill"],oo=["x","y","fill"],ro=["xmlns"],no=["fill"],so=["fill"],ao=["y1","y2","stroke","stroke-width"],co=["x1","x2","stroke","stroke-width"],io=["xmlns","stroke"],uo=c(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),ko=["fill"],yo=["xmlns","stroke"],ho=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-73139463></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-73139463></path><path d="M9 10l.01 0" data-v-73139463></path><path d="M15 10l.01 0" data-v-73139463></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-73139463></path>',5),mo=[ho],vo=["xmlns","stroke"],po=c(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),_o=["fill"],xo=["xmlns","stroke"],go=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-73139463></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-73139463></path><path d="M9 10l.01 0" data-v-73139463></path><path d="M15 10l.01 0" data-v-73139463></path><path d="M9 15l6 0" data-v-73139463></path>',5),fo=[go],wo=["xmlns","stroke"],Eo=c(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),No=["fill"],Bo=["xmlns","stroke"],Vo=c(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Mo=c(()=>e.createElementVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null,-1)),bo=c(()=>e.createElementVNode("path",{d:"M9 10l.01 0"},null,-1)),Co=c(()=>e.createElementVNode("path",{d:"M15 10l.01 0"},null,-1)),Lo=[Vo,Mo,bo,Co],$o=["xmlns","stroke"],So=c(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),zo=["fill"],Ao=["xmlns","stroke"],Wo=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-73139463></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-73139463></path><path d="M9 10l.01 0" data-v-73139463></path><path d="M15 10l.01 0" data-v-73139463></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-73139463></path>',5),Po=[Wo],Xo=["xmlns","stroke"],jo=c(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Fo=["fill"],qo=["xmlns","stroke"],Ho=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-73139463></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-73139463></path><path d="M9 9l.01 0" data-v-73139463></path><path d="M15 9l.01 0" data-v-73139463></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-73139463></path>',5),Io=[Ho],Zo=["xmlns"],Oo=["points","fill","stroke","stroke-width"],To=["xmlns"],Go={key:0},Ro=["stroke","stroke-width"],Yo=["y","width","fill","rx"],Do={__name:"vue-ui-skeleton",props:{config:{type:Object,default(){return{}}}},setup(d){const p=d,{vue_ui_skeleton:_}=l.useConfig(),x=e.ref(`vue-ui-skeleton-${Math.random()}`),t=e.computed(()=>M.useNestedProp({userConfig:p.config,defaultConfig:_})),g=e.computed(()=>t.value.style.animated),n=e.computed(()=>t.value.type),f=e.ref([60,50,55,36,40,25,26,12]),w=e.computed(()=>l.createPolygonPath({plot:{x:50,y:50},radius:40,sides:6}).path),E=e.computed(()=>l.createPolygonPath({plot:{x:50,y:50},radius:30,sides:6}).path),N=e.computed(()=>l.createPolygonPath({plot:{x:50,y:50},radius:20,sides:6}).path),B=e.computed(()=>l.createPolygonPath({plot:{x:50,y:50},radius:10,sides:6}).path),k=e.ref([{root:{x:70,y:77,r:44,opacity:100},bars:[{x:200,y:37,opacity:100,width:240},{x:200,y:118,opacity:100,width:180},{x:200,y:253,opacity:100,width:80}]},{root:{x:70,y:177,r:32,opacity:70},bars:[{x:200,y:145,opacity:70,width:160},{x:200,y:172,opacity:70,width:140},{x:200,y:199,opacity:70,width:120}]},{root:{x:70,y:257,r:24,opacity:40},bars:[{x:200,y:64,opacity:40,width:220},{x:200,y:91,opacity:40,width:200},{x:200,y:226,opacity:40,width:100}]}]),s=e.ref([{y:200,height:100,bar:50},{y:180,height:100,bar:40},{y:150,height:100,bar:30},{y:120,height:80,bar:50},{y:110,height:60,bar:30},{y:80,height:80,bar:10},{y:50,height:80,bar:40},{y:24,height:40,bar:24},{y:44,height:20,bar:13},{y:32,height:45,bar:19}]),u=e.ref([[3,2.5],[4,3.1],[8,6],[9.5,6.5],[12,11],[16,15],[18,18.2],[25,24],[24,26],[32,32],[33,32],[32,31],[38,37],[37,38],[42,41],[40,41],[44,45],[38,35],[31,32]]),y=e.ref([{x:40,y:30},{x:45,y:28},{x:50,y:25},{x:55,y:20},{x:60,y:27},{x:65,y:14},{x:70,y:23},{x:75,y:16},{x:80,y:25},{x:85,y:10},{x:90,y:18},{x:95,y:7},{x:100,y:12},{x:105,y:10},{x:110,y:20},{x:115,y:7},{x:120,y:14},{x:125,y:10},{x:130,y:19},{x:135,y:3},{x:140,y:10},{x:145,y:2},{x:150,y:1}]);function h(i,m=1){return{x:200+160*Math.cos(29.85+i*Math.PI/180)*m,y:200+160*Math.sin(29.85+i*Math.PI/180)*m}}const V=e.computed(()=>{const i=[];for(let o=0;o<100;o+=1)i.push({x1:h(360/100*o).x,y1:h(360/100*o).y,x2:h(360/100*o,.9).x,y2:h(360/100*o,.9).y,color:t.value.style.wheel.color});return i});return(i,m)=>(e.openBlock(),e.createElementBlock("div",{id:x.value,class:e.normalizeClass({"vue-ui-skeleton":!0,"vue-ui-skeleton-animated":g.value}),style:e.normalizeStyle(`background:${t.value.style.backgroundColor};color:${t.value.style.color};display:flex;align-items:center;justify-content:center;`)},[n.value==="flow"?(e.openBlock(),e.createElementBlock("svg",{key:0,xmlns:e.unref(l.XMLNS),width:"100%",viewBox:"0 0 80 60",style:e.normalizeStyle(`background:${t.value.style.backgroundColor}`)},[e.createElementVNode("path",{d:"M 5 5 L 5 55 M 75 5 L 75 55 M 28 5 L 28 55 M 52 5 L 52 55 M 5 8 L 28 12 L 52 9 L 75 8 L 75 12 L 52 12 L 28 21 L 5 29 Z M 5 34 L 28 35 L 52 24 L 75 21 L 75 27 L 52 30 L 28 44 L 52 39 L 75 41 L 75 47 L 52 45 L 28 52 L 5 52 Z",stroke:t.value.style.flow.color,"stroke-width":.8,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.flow.color},null,8,$)],12,L)):e.createCommentVNode("",!0),n.value==="parallelCoordinatePlot"?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(l.XMLNS),width:"100%",viewBox:"0 0 80 60",style:e.normalizeStyle(`background:${t.value.style.backgroundColor}`)},[e.createElementVNode("path",{d:"M 5 5 L 5 55 M 75 5 L 75 55 M 28 5 L 28 55 M 52 5 L 52 55 M 5 10 A 1 1 0 0 0 5 12 A 1 1 0 0 0 5 10 M 28 15 A 1 1 0 0 0 28 17 A 1 1 0 0 0 28 15 M 52 8 A 1 1 0 0 0 52 10 A 1 1 0 0 0 52 8 M 75 11 A 1 1 0 0 0 75 13 A 1 1 0 0 0 75 11 M 6 11 L 27 16 M 29 16 L 51 9 M 53 9 L 74 12 M 5 50 A 1 1 0 0 0 5 48 A 1 1 0 0 0 5 50 M 28 39 A 1 1 0 0 0 28 41 A 1 1 0 0 0 28 39 M 52 45 A 1 1 0 0 0 52 47 A 1 1 0 0 0 52 45 M 75 45 A 1 1 0 0 0 75 47 A 1 1 0 0 0 75 45 M 6 49 L 27 40 M 29 40 L 51 46 M 53 46 L 74 46 M 5 25 A 1 1 0 0 0 5 27 A 1 1 0 0 0 5 25 M 28 31 A 1 1 0 0 0 28 33 A 1 1 0 0 0 28 31 M 52 23 A 1 1 0 0 0 52 25 A 1 1 0 0 0 52 23 M 75 21 A 1 1 0 0 0 75 23 A 1 1 0 0 0 75 21 M 6 26 L 27 32 M 29 32 L 51 24 M 53 24 L 74 22",stroke:t.value.style.parallelCoordinatePlot.color,"stroke-width":.8,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.parallelCoordinatePlot.color},null,8,z)],12,S)):e.createCommentVNode("",!0),n.value==="dumbbell"?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(l.XMLNS),width:"100%",viewBox:"0 0 100 55",style:e.normalizeStyle(`background:${t.value.style.backgroundColor}`)},[e.createElementVNode("line",{x1:"3",x2:"3",y1:"3",y2:"67",stroke:t.value.style.dumbbell.color,"stroke-width":.5,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,W),e.createElementVNode("path",{d:`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),l=require("./index-COMTToJY.cjs"),M=require("./useNestedProp-DJwc68Re.cjs"),b=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),c=d=>(e.pushScopeId("data-v-73139463"),d=d(),e.popScopeId(),d),C=["id"],L=["xmlns"],$=["stroke","fill"],S=["xmlns"],z=["stroke","fill"],A=["xmlns"],W=["stroke"],P=["fill"],X=["stroke","fill"],j=["stroke","fill"],F=["fill"],q=["stroke","fill"],H=["stroke","fill"],I=["fill"],Z=["stroke","fill"],O=["stroke","fill"],T=["fill"],G=["stroke","fill"],R=["stroke","fill"],Y=["fill"],D=["stroke","fill"],U=["stroke","fill"],J=["xmlns"],K=["stroke"],Q=["stroke"],ee=["stroke","fill"],te=["stroke","fill"],le=["stroke","fill"],oe=["stroke","fill"],re=["stroke","fill"],ne=["stroke","fill"],se=["stroke","fill"],ae=["stroke","fill"],ce=["stroke","fill"],ie=["stroke","fill"],de=["stroke","fill"],ue=["stroke","fill"],ke=["stroke","fill"],ye=["stroke","fill"],he=["stroke","fill"],me=["stroke","fill"],ve=["stroke","fill"],pe=["stroke","fill"],_e=["stroke","fill"],xe=["stroke","fill"],ge=["stroke","fill"],fe=["stroke","fill"],we=["stroke","fill"],Ee=["xmlns"],Ne=["stroke"],Be=["xmlns"],Ve=["stroke"],Me=["xmlns"],be=["stroke"],Ce=["xmlns"],Le=["fill"],$e=["fill"],Se=["fill"],ze=["fill"],Ae=["fill"],We=["fill"],Pe=["fill"],Xe=["fill"],je=["fill"],Fe=["fill"],qe=["fill"],He=["fill"],Ie=["xmlns"],Ze=["stroke"],Oe=["stroke"],Te=["stroke"],Ge=["stroke"],Re=["stroke"],Ye=["stroke"],De=["xmlns"],Ue=["stroke"],Je=["stroke"],Ke=["stroke"],Qe=["stroke"],et=["stroke"],tt=["stroke"],lt=["stroke"],ot=["stroke"],rt=["stroke"],nt=["xmlns"],st=["stroke"],at=["xmlns"],ct=["stroke"],it=["stroke"],dt=["stroke"],ut=["stroke"],kt=["stroke"],yt=["stroke"],ht=["stroke"],mt=["stroke"],vt=["stroke"],pt=["xmlns"],_t=["x1","x2","stroke"],xt=["xmlns"],gt=["x","y","width","height","fill"],ft=["y","width","height","fill"],wt=["xmlns"],Et=["fill"],Nt=["fill"],Bt=["fill"],Vt=["xmlns"],Mt=["x1","x2","y1","y2","stroke"],bt=["stroke"],Ct=["fill"],Lt=["xmlns"],$t=["fill"],St=["fill"],zt=["x1","y1","x2","y2","stroke-width","stroke"],At=["xmlns"],Wt={key:0},Pt=["stroke","stroke-width"],Xt=["stroke","stroke-width"],jt=["x1","x2","y1","y2","stroke","stroke-width"],Ft=["x1","x2","y1","y2","stroke","stroke-width"],qt=["x1","x2","y1","y2","stroke","stroke-width"],Ht=["x","y","height","width","fill"],It=["xmlns","viewBox"],Zt=["x","y","stroke","fill"],Ot=["xmlns"],Tt=["d","stroke"],Gt=["cx","cy","r","fill","stroke"],Rt=["cx","cy","r","fill","stroke"],Yt=["x","y","width","fill"],Dt=["cx","cy","fill"],Ut=["cx","cy","fill"],Jt=["stroke"],Kt=["xmlns"],Qt=["stroke","stroke-width"],el=["stroke","stroke-width"],tl=["stroke","stroke-width"],ll=["fill"],ol=["fill"],rl=["fill"],nl=["fill"],sl=["fill"],al=["fill"],cl=["xmlns"],il={key:0},dl=["stroke","stroke-width"],ul=["stroke","stroke-width"],kl=["stroke","stroke-width"],yl={key:1},hl=["r","fill"],ml=["r","fill"],vl=["xmlns"],pl={key:0},_l=["stroke","stroke-width"],xl=["stroke","stroke-width"],gl=["fill","rx","x","y","width","height"],fl=["xmlns"],wl=["stroke-width","stroke"],El=["stroke-width","stroke"],Nl=["stroke-width","stroke"],Bl=["xmlns"],Vl=["stroke"],Ml=["stroke"],bl=["stroke"],Cl=["stroke"],Ll=["fill"],$l=["stroke"],Sl=["xmlns"],zl=["stroke","stroke-width"],Al=["stroke","stroke-width"],Wl=["fill","r"],Pl=["fill","r"],Xl=["fill","r"],jl=["fill","r"],Fl=["fill","r"],ql=["fill","r"],Hl=["fill","r"],Il=["fill","r"],Zl=["fill","r"],Ol=["xmlns"],Tl=["d","stroke","stroke-width"],Gl=["d","stroke","stroke-width"],Rl=["d","stroke","stroke-width"],Yl=["d","stroke","stroke-width"],Dl=["stroke","stroke-width"],Ul=["stroke","stroke-width"],Jl=["stroke","stroke-width"],Kl=["fill"],Ql=["fill"],eo=["xmlns"],to=["x","y","fill"],lo=["x","y","fill"],oo=["x","y","fill"],ro=["xmlns"],no=["fill"],so=["fill"],ao=["y1","y2","stroke","stroke-width"],co=["x1","x2","stroke","stroke-width"],io=["xmlns","stroke"],uo=c(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),ko=["fill"],yo=["xmlns","stroke"],ho=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-73139463></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-73139463></path><path d="M9 10l.01 0" data-v-73139463></path><path d="M15 10l.01 0" data-v-73139463></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-73139463></path>',5),mo=[ho],vo=["xmlns","stroke"],po=c(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),_o=["fill"],xo=["xmlns","stroke"],go=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-73139463></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-73139463></path><path d="M9 10l.01 0" data-v-73139463></path><path d="M15 10l.01 0" data-v-73139463></path><path d="M9 15l6 0" data-v-73139463></path>',5),fo=[go],wo=["xmlns","stroke"],Eo=c(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),No=["fill"],Bo=["xmlns","stroke"],Vo=c(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Mo=c(()=>e.createElementVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null,-1)),bo=c(()=>e.createElementVNode("path",{d:"M9 10l.01 0"},null,-1)),Co=c(()=>e.createElementVNode("path",{d:"M15 10l.01 0"},null,-1)),Lo=[Vo,Mo,bo,Co],$o=["xmlns","stroke"],So=c(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),zo=["fill"],Ao=["xmlns","stroke"],Wo=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-73139463></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-73139463></path><path d="M9 10l.01 0" data-v-73139463></path><path d="M15 10l.01 0" data-v-73139463></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-73139463></path>',5),Po=[Wo],Xo=["xmlns","stroke"],jo=c(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Fo=["fill"],qo=["xmlns","stroke"],Ho=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-73139463></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-73139463></path><path d="M9 9l.01 0" data-v-73139463></path><path d="M15 9l.01 0" data-v-73139463></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-73139463></path>',5),Io=[Ho],Zo=["xmlns"],Oo=["points","fill","stroke","stroke-width"],To=["xmlns"],Go={key:0},Ro=["stroke","stroke-width"],Yo=["y","width","fill","rx"],Do={__name:"vue-ui-skeleton",props:{config:{type:Object,default(){return{}}}},setup(d){const p=d,{vue_ui_skeleton:_}=l.useConfig(),x=e.ref(`vue-ui-skeleton-${Math.random()}`),t=e.computed(()=>M.useNestedProp({userConfig:p.config,defaultConfig:_})),g=e.computed(()=>t.value.style.animated),n=e.computed(()=>t.value.type),f=e.ref([60,50,55,36,40,25,26,12]),w=e.computed(()=>l.createPolygonPath({plot:{x:50,y:50},radius:40,sides:6}).path),E=e.computed(()=>l.createPolygonPath({plot:{x:50,y:50},radius:30,sides:6}).path),N=e.computed(()=>l.createPolygonPath({plot:{x:50,y:50},radius:20,sides:6}).path),B=e.computed(()=>l.createPolygonPath({plot:{x:50,y:50},radius:10,sides:6}).path),k=e.ref([{root:{x:70,y:77,r:44,opacity:100},bars:[{x:200,y:37,opacity:100,width:240},{x:200,y:118,opacity:100,width:180},{x:200,y:253,opacity:100,width:80}]},{root:{x:70,y:177,r:32,opacity:70},bars:[{x:200,y:145,opacity:70,width:160},{x:200,y:172,opacity:70,width:140},{x:200,y:199,opacity:70,width:120}]},{root:{x:70,y:257,r:24,opacity:40},bars:[{x:200,y:64,opacity:40,width:220},{x:200,y:91,opacity:40,width:200},{x:200,y:226,opacity:40,width:100}]}]),s=e.ref([{y:200,height:100,bar:50},{y:180,height:100,bar:40},{y:150,height:100,bar:30},{y:120,height:80,bar:50},{y:110,height:60,bar:30},{y:80,height:80,bar:10},{y:50,height:80,bar:40},{y:24,height:40,bar:24},{y:44,height:20,bar:13},{y:32,height:45,bar:19}]),u=e.ref([[3,2.5],[4,3.1],[8,6],[9.5,6.5],[12,11],[16,15],[18,18.2],[25,24],[24,26],[32,32],[33,32],[32,31],[38,37],[37,38],[42,41],[40,41],[44,45],[38,35],[31,32]]),y=e.ref([{x:40,y:30},{x:45,y:28},{x:50,y:25},{x:55,y:20},{x:60,y:27},{x:65,y:14},{x:70,y:23},{x:75,y:16},{x:80,y:25},{x:85,y:10},{x:90,y:18},{x:95,y:7},{x:100,y:12},{x:105,y:10},{x:110,y:20},{x:115,y:7},{x:120,y:14},{x:125,y:10},{x:130,y:19},{x:135,y:3},{x:140,y:10},{x:145,y:2},{x:150,y:1}]);function h(i,m=1){return{x:200+160*Math.cos(29.85+i*Math.PI/180)*m,y:200+160*Math.sin(29.85+i*Math.PI/180)*m}}const V=e.computed(()=>{const i=[];for(let o=0;o<100;o+=1)i.push({x1:h(360/100*o).x,y1:h(360/100*o).y,x2:h(360/100*o,.9).x,y2:h(360/100*o,.9).y,color:t.value.style.wheel.color});return i});return(i,m)=>(e.openBlock(),e.createElementBlock("div",{id:x.value,class:e.normalizeClass({"vue-ui-skeleton":!0,"vue-ui-skeleton-animated":g.value}),style:e.normalizeStyle(`background:${t.value.style.backgroundColor};color:${t.value.style.color};display:flex;align-items:center;justify-content:center;`)},[n.value==="flow"?(e.openBlock(),e.createElementBlock("svg",{key:0,xmlns:e.unref(l.XMLNS),width:"100%",viewBox:"0 0 80 60",style:e.normalizeStyle(`background:${t.value.style.backgroundColor}`)},[e.createElementVNode("path",{d:"M 5 5 L 5 55 M 75 5 L 75 55 M 28 5 L 28 55 M 52 5 L 52 55 M 5 8 L 28 12 L 52 9 L 75 8 L 75 12 L 52 12 L 28 21 L 5 29 Z M 5 34 L 28 35 L 52 24 L 75 21 L 75 27 L 52 30 L 28 44 L 52 39 L 75 41 L 75 47 L 52 45 L 28 52 L 5 52 Z",stroke:t.value.style.flow.color,"stroke-width":.8,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.flow.color},null,8,$)],12,L)):e.createCommentVNode("",!0),n.value==="parallelCoordinatePlot"?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(l.XMLNS),width:"100%",viewBox:"0 0 80 60",style:e.normalizeStyle(`background:${t.value.style.backgroundColor}`)},[e.createElementVNode("path",{d:"M 5 5 L 5 55 M 75 5 L 75 55 M 28 5 L 28 55 M 52 5 L 52 55 M 5 10 A 1 1 0 0 0 5 12 A 1 1 0 0 0 5 10 M 28 15 A 1 1 0 0 0 28 17 A 1 1 0 0 0 28 15 M 52 8 A 1 1 0 0 0 52 10 A 1 1 0 0 0 52 8 M 75 11 A 1 1 0 0 0 75 13 A 1 1 0 0 0 75 11 M 6 11 L 27 16 M 29 16 L 51 9 M 53 9 L 74 12 M 5 50 A 1 1 0 0 0 5 48 A 1 1 0 0 0 5 50 M 28 39 A 1 1 0 0 0 28 41 A 1 1 0 0 0 28 39 M 52 45 A 1 1 0 0 0 52 47 A 1 1 0 0 0 52 45 M 75 45 A 1 1 0 0 0 75 47 A 1 1 0 0 0 75 45 M 6 49 L 27 40 M 29 40 L 51 46 M 53 46 L 74 46 M 5 25 A 1 1 0 0 0 5 27 A 1 1 0 0 0 5 25 M 28 31 A 1 1 0 0 0 28 33 A 1 1 0 0 0 28 31 M 52 23 A 1 1 0 0 0 52 25 A 1 1 0 0 0 52 23 M 75 21 A 1 1 0 0 0 75 23 A 1 1 0 0 0 75 21 M 6 26 L 27 32 M 29 32 L 51 24 M 53 24 L 74 22",stroke:t.value.style.parallelCoordinatePlot.color,"stroke-width":.8,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.parallelCoordinatePlot.color},null,8,z)],12,S)):e.createCommentVNode("",!0),n.value==="dumbbell"?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(l.XMLNS),width:"100%",viewBox:"0 0 100 55",style:e.normalizeStyle(`background:${t.value.style.backgroundColor}`)},[e.createElementVNode("line",{x1:"3",x2:"3",y1:"3",y2:"67",stroke:t.value.style.dumbbell.color,"stroke-width":.5,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,W),e.createElementVNode("path",{d:`
|
|
2
2
|
M 30,11
|
|
3
3
|
C 39,10 39,10
|
|
4
4
|
45,11
|