vue-data-ui 2.4.86 → 2.4.88
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-DpgbndsU.js → Arrow-D79KA6Cu.js} +1 -1
- package/dist/{Arrow-Bh7Ezbzf.cjs → Arrow-DMSM0MM1.cjs} +1 -1
- package/dist/{BaseIcon-CdPe2CAc.js → BaseIcon-B9BZgZsa.js} +1 -1
- package/dist/{BaseIcon-CaKclr1e.cjs → BaseIcon-CehmAXJH.cjs} +1 -1
- package/dist/{DataTable-BfiPjHpN.js → DataTable-Cnr3w23K.js} +2 -2
- package/dist/{DataTable-DuosyZ6d.cjs → DataTable-DVKGDaCB.cjs} +1 -1
- package/dist/{Legend-DiFDWEo2.js → Legend-Di7FMl12.js} +2 -2
- package/dist/{Legend-BnKYc6ZY.cjs → Legend-Uv0t6PIz.cjs} +1 -1
- package/dist/{PackageVersion-qom4AEUr.js → PackageVersion-BAKTtSRE.js} +1 -1
- package/dist/{PackageVersion-B5rBHZEb.cjs → PackageVersion-BgKxrHv-.cjs} +1 -1
- package/dist/{PenAndPaper-C-1AU46J.js → PenAndPaper-BUzmu0vi.js} +3 -3
- package/dist/{PenAndPaper-5OV7IAca.cjs → PenAndPaper-BYVZ33fz.cjs} +1 -1
- package/dist/{Shape-CmsIulaS.cjs → Shape-CNuTafzS.cjs} +1 -1
- package/dist/{Shape-Dmv7nCLC.js → Shape-DZz__S1P.js} +1 -1
- package/dist/{Slicer-CmBt4xoj.cjs → Slicer-BSQa-Zel.cjs} +1 -1
- package/dist/{Slicer-D4ugcR39.js → Slicer-Clpv-EOL.js} +2 -2
- package/dist/{Title-D3kX1BVl.cjs → Title-DcTKT_WK.cjs} +1 -1
- package/dist/{Title-ClQ27HaB.js → Title-Dt5mC-vb.js} +1 -1
- package/dist/{Tooltip-CGYgJoPR.js → Tooltip-CmKYX0H1.js} +1 -1
- package/dist/{Tooltip-CARCyQNT.cjs → Tooltip-y6Z9yhlE.cjs} +1 -1
- package/dist/{index-CXx0JV8R.js → index-DCHLGNvJ.js} +1 -1
- package/dist/{index-DqxDpUy0.cjs → index-xEXHnOtJ.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +1 -1
- package/dist/types/vue-data-ui.d.ts +1 -1
- package/dist/{useNestedProp-B-WAbP7E.js → useNestedProp-BPR7xHxr.js} +1 -1
- package/dist/{useNestedProp-DNWKDmdP.cjs → useNestedProp-LNEDZsGq.cjs} +1 -1
- package/dist/{usePrinter-Ctor1UK0.js → usePrinter-BvounINk.js} +1 -1
- package/dist/{usePrinter-BC7U4s0U.cjs → usePrinter-CjQvMB0_.cjs} +1 -1
- package/dist/{vue-data-ui-BpAZx3Va.js → vue-data-ui-BCZFdeNf.js} +60 -60
- package/dist/{vue-data-ui-DkgWwqtw.cjs → vue-data-ui-eNIOCbja.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-1A6t1biQ.js → vue-ui-3d-bar-B0ZLxzL-.js} +38 -38
- package/dist/{vue-ui-3d-bar-ngD35pLb.cjs → vue-ui-3d-bar-DEZhX6d1.cjs} +11 -11
- package/dist/{vue-ui-accordion-XAEm2rxj.cjs → vue-ui-accordion-2c1jq56U.cjs} +1 -1
- package/dist/{vue-ui-accordion-BljYKOXR.js → vue-ui-accordion-DEpeQHhr.js} +3 -3
- package/dist/vue-ui-age-pyramid-DlE41fIs.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-qfVpUr52.js → vue-ui-age-pyramid-dewoEG3y.js} +29 -29
- package/dist/{vue-ui-annotator-pFybuGix.cjs → vue-ui-annotator-CG6CV-7_.cjs} +1 -1
- package/dist/{vue-ui-annotator-CH9QWqAv.js → vue-ui-annotator-D9op3RMK.js} +1 -1
- package/dist/{vue-ui-bullet-BH7zmX0E.js → vue-ui-bullet-B6tijZFI.js} +8 -8
- package/dist/{vue-ui-bullet-C6y7Ddg-.cjs → vue-ui-bullet-Bt_2KhaH.cjs} +1 -1
- package/dist/{vue-ui-candlestick-RCtFAjEU.js → vue-ui-candlestick-B4DkRibE.js} +48 -48
- package/dist/{vue-ui-candlestick-DtCmxeo5.cjs → vue-ui-candlestick-DWDz2nFA.cjs} +2 -2
- package/dist/{vue-ui-carousel-table-BUL063mi.js → vue-ui-carousel-table-COAPDtuP.js} +4 -4
- package/dist/{vue-ui-carousel-table-BeDenKJo.cjs → vue-ui-carousel-table-DZlh-CRi.cjs} +1 -1
- package/dist/{vue-ui-chestnut-xDD_4bz2.js → vue-ui-chestnut-DCk2Zbcz.js} +29 -29
- package/dist/{vue-ui-chestnut-B6EalNLT.cjs → vue-ui-chestnut-EyoKonrW.cjs} +2 -2
- package/dist/{vue-ui-cursor-DbV0HXHB.cjs → vue-ui-cursor-DR8hHWf7.cjs} +1 -1
- package/dist/{vue-ui-cursor-D6Qndjnn.js → vue-ui-cursor-DSP_sXww.js} +2 -2
- package/dist/{vue-ui-dashboard-B_kj8L_A.cjs → vue-ui-dashboard-BJsyMU6X.cjs} +1 -1
- package/dist/{vue-ui-dashboard-B_4ot4bz.js → vue-ui-dashboard-BizVZE7w.js} +2 -2
- package/dist/{vue-ui-digits-BLI4lCZC.js → vue-ui-digits-BvVZ7uDf.js} +2 -2
- package/dist/{vue-ui-digits-DKs2fTGz.cjs → vue-ui-digits-vspu86yU.cjs} +1 -1
- package/dist/vue-ui-donut-BHJF4z2B.cjs +1 -0
- package/dist/{vue-ui-donut-wBZoPkru.js → vue-ui-donut-aFsq1d8c.js} +76 -76
- package/dist/{vue-ui-donut-evolution-ClOGDHiK.js → vue-ui-donut-evolution-BfS2WdBU.js} +66 -66
- package/dist/vue-ui-donut-evolution-DwVP-Zjn.cjs +1 -0
- package/dist/{vue-ui-dumbbell-PR9tHMvD.js → vue-ui-dumbbell-Bb5wHbQL.js} +28 -28
- package/dist/vue-ui-dumbbell-Bi-2LGtG.cjs +9 -0
- package/dist/{vue-ui-flow-CxW8g0NW.js → vue-ui-flow-DxNNh-WO.js} +31 -31
- package/dist/vue-ui-flow-RQWHqn22.cjs +1 -0
- package/dist/vue-ui-funnel-D-892HTK.cjs +1 -0
- package/dist/{vue-ui-funnel-BJNlWIq5.js → vue-ui-funnel-IVTzcHVm.js} +32 -32
- package/dist/{vue-ui-galaxy-DuGLDGzf.js → vue-ui-galaxy-039pCZpW.js} +81 -81
- package/dist/vue-ui-galaxy-BR-8c9Hn.cjs +1 -0
- package/dist/{vue-ui-gauge-Dpcxdegh.cjs → vue-ui-gauge-B4k-bq9l.cjs} +1 -1
- package/dist/{vue-ui-gauge-CBx84KCt.js → vue-ui-gauge-ZEMVvV-t.js} +7 -7
- package/dist/{vue-ui-gizmo-Djw5T_Vr.cjs → vue-ui-gizmo--XG8-JLk.cjs} +1 -1
- package/dist/{vue-ui-gizmo-BPIyNNkI.js → vue-ui-gizmo-DKzAWnI0.js} +3 -3
- package/dist/vue-ui-heatmap-Bia0Ekaw.cjs +1 -0
- package/dist/{vue-ui-heatmap-DI8gVwfM.js → vue-ui-heatmap-DXDpQL6T.js} +63 -63
- package/dist/vue-ui-history-plot-Cq9ZWdDn.cjs +1 -0
- package/dist/{vue-ui-history-plot-CWfWMwqw.js → vue-ui-history-plot-o1WosOjA.js} +69 -69
- package/dist/{vue-ui-kpi-CBJZp-nE.js → vue-ui-kpi-B01FpRQ0.js} +3 -3
- package/dist/{vue-ui-kpi-BjGIj-IQ.cjs → vue-ui-kpi-lWq7fZr1.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DfeNWsJk.js → vue-ui-mini-loader-DLUYnvwS.js} +2 -2
- package/dist/{vue-ui-mini-loader-Cafts_cp.cjs → vue-ui-mini-loader-jkxJpHFv.cjs} +1 -1
- package/dist/vue-ui-molecule-BBK9ofPv.cjs +1 -0
- package/dist/{vue-ui-molecule-BTO5WRuL.js → vue-ui-molecule-DyiuRZQM.js} +155 -155
- package/dist/vue-ui-mood-radar-Bx32tbYB.cjs +1 -0
- package/dist/{vue-ui-mood-radar-CKGwiCsd.js → vue-ui-mood-radar-DJI_fbFv.js} +33 -33
- package/dist/{vue-ui-nested-donuts-BvkJoiOT.cjs → vue-ui-nested-donuts-B6ZLkoIS.cjs} +5 -5
- package/dist/{vue-ui-nested-donuts-JGie_log.js → vue-ui-nested-donuts-B9gUqMTf.js} +147 -147
- package/dist/{vue-ui-onion-BWoVr0FT.cjs → vue-ui-onion-BnLW3as9.cjs} +2 -2
- package/dist/{vue-ui-onion-BXauNEVz.js → vue-ui-onion-D-OxG00N.js} +44 -44
- package/dist/{vue-ui-parallel-coordinate-plot-njogPtYo.js → vue-ui-parallel-coordinate-plot-DXc-b6rP.js} +79 -79
- package/dist/{vue-ui-parallel-coordinate-plot-BrvB0jer.cjs → vue-ui-parallel-coordinate-plot-wx4e_yuu.cjs} +3 -3
- package/dist/vue-ui-quadrant-BqaLRYQp.cjs +1 -0
- package/dist/{vue-ui-quadrant-DnaOzxMc.js → vue-ui-quadrant-bakb0497.js} +108 -108
- package/dist/vue-ui-quick-chart-BZdsiGCz.cjs +15 -0
- package/dist/{vue-ui-quick-chart-kAG9Eaxb.js → vue-ui-quick-chart-BnH7-lmq.js} +212 -212
- package/dist/vue-ui-radar-D5IDgzwd.cjs +1 -0
- package/dist/{vue-ui-radar-DRmP5yb4.js → vue-ui-radar-DadvgLtC.js} +107 -107
- package/dist/{vue-ui-rating-BtLDJSwm.cjs → vue-ui-rating-B4yxkddt.cjs} +1 -1
- package/dist/{vue-ui-rating-De5IfgHJ.js → vue-ui-rating-CGojWinU.js} +2 -2
- package/dist/{vue-ui-relation-circle-DKQl7eWX.js → vue-ui-relation-circle-COC07h_K.js} +7 -7
- package/dist/{vue-ui-relation-circle-B2l-2KnH.cjs → vue-ui-relation-circle-rmWirv-5.cjs} +1 -1
- package/dist/{vue-ui-rings-Dwyz2fEm.js → vue-ui-rings-CMk-sVvK.js} +66 -66
- package/dist/{vue-ui-rings-KQoMkv4v.cjs → vue-ui-rings-DO1cN4ly.cjs} +2 -2
- package/dist/vue-ui-scatter-C4QmHmq2.cjs +1 -0
- package/dist/{vue-ui-scatter-DeOrkD2Y.js → vue-ui-scatter-CPkly4JA.js} +85 -85
- package/dist/{vue-ui-screenshot-BLp1_Q6K.cjs → vue-ui-screenshot-BxFOMLiy.cjs} +1 -1
- package/dist/{vue-ui-screenshot-D1Ekbb27.js → vue-ui-screenshot-CzFhpFE4.js} +1 -1
- package/dist/{vue-ui-skeleton-qIxxRRaX.cjs → vue-ui-skeleton-Tse1D8cv.cjs} +1 -1
- package/dist/{vue-ui-skeleton-Cw0-Ac_0.js → vue-ui-skeleton-nTL-u4Yd.js} +3 -3
- package/dist/{vue-ui-smiley-D3oqt6Rg.js → vue-ui-smiley-Bu3bOukI.js} +2 -2
- package/dist/{vue-ui-smiley-D3WgXFhb.cjs → vue-ui-smiley-D-sS-77y.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-DyhcWMWz.js → vue-ui-spark-trend-Bh5gFFQf.js} +5 -5
- package/dist/{vue-ui-spark-trend-CVyPm6ms.cjs → vue-ui-spark-trend-CF36oite.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CRMMOv0T.cjs → vue-ui-sparkbar-CGIYeFjB.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-C0av7SAn.js → vue-ui-sparkbar-DX2xrwR9.js} +4 -4
- package/dist/{vue-ui-sparkgauge-B3K4si6u.js → vue-ui-sparkgauge-CZ837K-0.js} +4 -4
- package/dist/{vue-ui-sparkgauge-BQnxP_8u.cjs → vue-ui-sparkgauge-D2NJVKww.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-Bo3pkA-I.js → vue-ui-sparkhistogram-2NcpXt-_.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-DVAas7L7.cjs → vue-ui-sparkhistogram-DIYvXyIB.cjs} +1 -1
- package/dist/{vue-ui-sparkline-CDqFBaPU.cjs → vue-ui-sparkline-BIj5WMUM.cjs} +1 -1
- package/dist/{vue-ui-sparkline-DIHKGu0H.js → vue-ui-sparkline-CuBFi324.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-CC-OaMTb.cjs → vue-ui-sparkstackbar-BvcGQqmi.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DG87wFd5.js → vue-ui-sparkstackbar-bqD9-qmQ.js} +5 -5
- package/dist/{vue-ui-stackbar-fZKaRitE.js → vue-ui-stackbar-BG0olJr0.js} +51 -51
- package/dist/{vue-ui-stackbar-CVHKHNom.cjs → vue-ui-stackbar-Cbk-PfOC.cjs} +3 -3
- package/dist/vue-ui-strip-plot-Dm2ctnIx.cjs +1 -0
- package/dist/{vue-ui-strip-plot-WOMaN28I.js → vue-ui-strip-plot-mNsmytzE.js} +118 -118
- package/dist/{vue-ui-table-CTtYDZPd.cjs → vue-ui-table-BwuSG-oE.cjs} +1 -1
- package/dist/{vue-ui-table-a4m3lpRq.js → vue-ui-table-C8_8TJ2H.js} +1 -1
- package/dist/{vue-ui-table-heatmap-0vDMKYpV.js → vue-ui-table-heatmap-Bakns13v.js} +4 -4
- package/dist/{vue-ui-table-heatmap-i00aBLPq.cjs → vue-ui-table-heatmap-ZfohVD71.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-DW7t3xfB.cjs → vue-ui-table-sparkline-CC5hpyGe.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-D5lngzCM.js → vue-ui-table-sparkline-Du93NBKM.js} +5 -5
- package/dist/{vue-ui-thermometer-QtlVD4-S.cjs → vue-ui-thermometer-Cbe7bVeq.cjs} +1 -1
- package/dist/{vue-ui-thermometer-3aeRI-SM.js → vue-ui-thermometer-DZeTxVGM.js} +7 -7
- package/dist/{vue-ui-timer-B1nkj0WG.cjs → vue-ui-timer-B-guKc3A.cjs} +1 -1
- package/dist/{vue-ui-timer-mRaLpRHZ.js → vue-ui-timer-BwNbaMti.js} +5 -5
- package/dist/{vue-ui-tiremarks-xMuvEsN7.cjs → vue-ui-tiremarks-DNtBCjbs.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-Dv2O6FpS.js → vue-ui-tiremarks-sCXXGXiN.js} +7 -7
- package/dist/{vue-ui-treemap-D89aQanB.js → vue-ui-treemap-BQoajav9.js} +108 -108
- package/dist/vue-ui-treemap-CH_qGgmb.cjs +1 -0
- package/dist/{vue-ui-vertical-bar-BpLIp4qR.js → vue-ui-vertical-bar-LWxKcXEf.js} +54 -54
- package/dist/{vue-ui-vertical-bar-CwHag6jq.cjs → vue-ui-vertical-bar-ytpJJBqm.cjs} +3 -3
- package/dist/vue-ui-waffle-CvHppO8v.cjs +1 -0
- package/dist/{vue-ui-waffle-sr2mWvpN.js → vue-ui-waffle-q-CgTerF.js} +99 -99
- package/dist/{vue-ui-wheel-C0KYRHGC.cjs → vue-ui-wheel-BoXkxGeh.cjs} +1 -1
- package/dist/{vue-ui-wheel-B7DOHXW8.js → vue-ui-wheel-CPHOwOzy.js} +7 -7
- package/dist/{vue-ui-word-cloud-BxMb7oCr.js → vue-ui-word-cloud-BargS03s.js} +81 -81
- package/dist/vue-ui-word-cloud-DFL3e0A2.cjs +1 -0
- package/dist/{vue-ui-xy-D5ROTNHD.cjs → vue-ui-xy-CgIp7caN.cjs} +2 -2
- package/dist/{vue-ui-xy-DlyUTKB5.js → vue-ui-xy-DC5y2PjZ.js} +24 -16
- package/dist/{vue-ui-xy-canvas-DHvkJKQH.js → vue-ui-xy-canvas-B4mqwnlS.js} +35 -35
- package/dist/{vue-ui-xy-canvas-BDMk6XVE.cjs → vue-ui-xy-canvas-D1jemBXQ.cjs} +3 -3
- package/package.json +1 -1
- package/dist/vue-ui-age-pyramid-BgsDYe37.cjs +0 -1
- package/dist/vue-ui-donut-B1Cg4vpI.cjs +0 -1
- package/dist/vue-ui-donut-evolution-CgB_aexh.cjs +0 -1
- package/dist/vue-ui-dumbbell-Cm5O6D4x.cjs +0 -9
- package/dist/vue-ui-flow-CIkXePxd.cjs +0 -1
- package/dist/vue-ui-funnel-BLXk1z5r.cjs +0 -1
- package/dist/vue-ui-galaxy-C01Apc4E.cjs +0 -1
- package/dist/vue-ui-heatmap-DYPE1Efx.cjs +0 -1
- package/dist/vue-ui-history-plot-BeYYrq5_.cjs +0 -1
- package/dist/vue-ui-molecule-Ckh2JsOJ.cjs +0 -1
- package/dist/vue-ui-mood-radar-WHFk1KC1.cjs +0 -1
- package/dist/vue-ui-quadrant-D8krEYWV.cjs +0 -1
- package/dist/vue-ui-quick-chart-DTiell5S.cjs +0 -15
- package/dist/vue-ui-radar-DKB9rVav.cjs +0 -1
- package/dist/vue-ui-scatter-CDT3zyXP.cjs +0 -1
- package/dist/vue-ui-strip-plot-C1pjZ1AT.cjs +0 -1
- package/dist/vue-ui-treemap-BupfwSFa.cjs +0 -1
- package/dist/vue-ui-waffle-DuPI0NV4.cjs +0 -1
- package/dist/vue-ui-word-cloud-BCPMmXhU.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-DqxDpUy0.cjs"),M=require("./useNestedProp-DNWKDmdP.cjs"),D=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},R=["src","height","width"],X=["xmlns","height","width"],j=["id"],F=["stop-color"],I=["stop-color"],O=["points","fill","stroke","stroke-width"],Y=["src","alt","height","width","id"],G=["xmlns","viewBox","height","id"],U=["id"],q=["stop-color"],H=["stop-color"],K=["points","fill","stroke"],P=["xmlns","height"],T=["onClick","onMouseenter","onKeyup"],W=["onMouseenter"],J={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(k,{expose:S,emit:_}){const i=k,{vue_ui_rating:w}=o.useConfig(),d=e.ref(o.createUid()),g=e.ref(!1),s=e.ref(void 0),y=e.ref([]),z=e.useSlots();e.onMounted(()=>{z["chart-background"]&&console.warn("VueUiRating does not support the #chart-background slot.")});const t=e.computed({get:()=>f(),set:a=>a});function f(){return M.useNestedProp({userConfig:i.config,defaultConfig:w})}e.watch(()=>i.config,a=>{t.value=f(),h()},{deep:!0});const B=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)?C(i.dataset.rating):i.dataset.rating),N=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)),r=e.ref(B.value),m=e.computed(()=>t.value.type==="image"),c=e.computed(()=>t.value.readonly);function C(a){let n=0,l=0;for(const u in a){const L=parseInt(u),$=a[u];n+=L*$,l+=$}if(l===0)return 0;const v=n/l;return Math.min(t.value.to,Math.max(t.value.from,v))}e.onMounted(()=>{h()});function h(){o.objectIsEmpty(i.dataset)&&o.error({componentName:"VueUiRating",type:"dataset"}),y.value=[];for(let a=t.value.from;a<=t.value.to;a+=1)y.value.push(a)}function p(a,n=!1){return a>s.value||c.value?n?t.value.style.image.inactiveOpacity:t.value.style.star.inactiveColor:n?1:t.value.style.star.useGradient?`url(#star_gradient_under_${d.value})`:t.value.style.star.activeColor}function x(a,n=!1){const l=r.value-a,v=n?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*v;default:return l*v}}function b(a){c.value||(r.value=a,_("rate",a))}function E(){return r.value}function V(a=!0){c.value=a}return S({getData:E,toggleReadonly:V}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:n[2]||(n[2]=l=>g.value=!0),onMouseleave:n[3]||(n[3]=l=>{g.value=!1,s.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",A,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:e.normalizeStyle(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,v)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:e.normalizeStyle(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)},[m.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.value.style.image.src,height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(s.value)?t.value.style.image.inactiveOpacity:p(l,!0)}`)},null,12,R)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(o.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,F),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,I)],8,j)]),e.createElementVNode("polygon",{points:e.unref(o.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(s.value)?t.value.style.star.inactiveColor:p(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:s.value?p(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,O)],8,X)),m.value?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.style.image.src,alt:`${t.value.style.image.alt} ${l}`,height:t.value.style.itemSize,width:t.value.style.itemSize,id:`active_${d.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${x(v,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,Y)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(o.XMLNS),viewBox:`0 0 ${x(v)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${d.value}_${l}`,style:{position:"absolute",top:"0",left:"0"}},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(o.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,q),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,H)],8,U)]),e.createElementVNode("polygon",{points:e.unref(o.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:t.value.style.star.useGradient?`url(#star_gradient_over_${d.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,K)],8,G)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(o.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;${c.value?"":"cursor:pointer"}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:u=>b(l),onMouseenter:u=>s.value=l,onMouseleave:n[0]||(n[0]=u=>s.value=void 0),tabindex:"0",onKeyup:e.withKeys(u=>b(l),["enter"])},null,40,T)),c.value?(e.openBlock(),e.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:u=>s.value=l,onMouseleave:n[1]||(n[1]=u=>s.value=void 0)},null,40,W)):e.createCommentVNode("",!0)],12,P)),t.value.style.tooltip.show&&N.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:4,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${s.value===l?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(l)+":",5),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[l],e.unref(o.dataLabel)({v:i.dataset.rating[l],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0)],4))),256)),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],36))}},Q=D._export_sfc(J,[["__scopeId","data-v-9e1d13d5"]]);exports.default=Q;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-xEXHnOtJ.cjs"),M=require("./useNestedProp-LNEDZsGq.cjs"),D=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},R=["src","height","width"],X=["xmlns","height","width"],j=["id"],F=["stop-color"],I=["stop-color"],O=["points","fill","stroke","stroke-width"],Y=["src","alt","height","width","id"],G=["xmlns","viewBox","height","id"],U=["id"],q=["stop-color"],H=["stop-color"],K=["points","fill","stroke"],P=["xmlns","height"],T=["onClick","onMouseenter","onKeyup"],W=["onMouseenter"],J={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(k,{expose:S,emit:_}){const i=k,{vue_ui_rating:w}=o.useConfig(),d=e.ref(o.createUid()),g=e.ref(!1),s=e.ref(void 0),y=e.ref([]),z=e.useSlots();e.onMounted(()=>{z["chart-background"]&&console.warn("VueUiRating does not support the #chart-background slot.")});const t=e.computed({get:()=>f(),set:a=>a});function f(){return M.useNestedProp({userConfig:i.config,defaultConfig:w})}e.watch(()=>i.config,a=>{t.value=f(),h()},{deep:!0});const B=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)?C(i.dataset.rating):i.dataset.rating),N=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)),r=e.ref(B.value),m=e.computed(()=>t.value.type==="image"),c=e.computed(()=>t.value.readonly);function C(a){let n=0,l=0;for(const u in a){const L=parseInt(u),$=a[u];n+=L*$,l+=$}if(l===0)return 0;const v=n/l;return Math.min(t.value.to,Math.max(t.value.from,v))}e.onMounted(()=>{h()});function h(){o.objectIsEmpty(i.dataset)&&o.error({componentName:"VueUiRating",type:"dataset"}),y.value=[];for(let a=t.value.from;a<=t.value.to;a+=1)y.value.push(a)}function p(a,n=!1){return a>s.value||c.value?n?t.value.style.image.inactiveOpacity:t.value.style.star.inactiveColor:n?1:t.value.style.star.useGradient?`url(#star_gradient_under_${d.value})`:t.value.style.star.activeColor}function x(a,n=!1){const l=r.value-a,v=n?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*v;default:return l*v}}function b(a){c.value||(r.value=a,_("rate",a))}function E(){return r.value}function V(a=!0){c.value=a}return S({getData:E,toggleReadonly:V}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:n[2]||(n[2]=l=>g.value=!0),onMouseleave:n[3]||(n[3]=l=>{g.value=!1,s.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",A,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:e.normalizeStyle(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,v)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:e.normalizeStyle(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)},[m.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.value.style.image.src,height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(s.value)?t.value.style.image.inactiveOpacity:p(l,!0)}`)},null,12,R)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(o.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,F),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,I)],8,j)]),e.createElementVNode("polygon",{points:e.unref(o.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(s.value)?t.value.style.star.inactiveColor:p(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:s.value?p(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,O)],8,X)),m.value?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.style.image.src,alt:`${t.value.style.image.alt} ${l}`,height:t.value.style.itemSize,width:t.value.style.itemSize,id:`active_${d.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${x(v,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,Y)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(o.XMLNS),viewBox:`0 0 ${x(v)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${d.value}_${l}`,style:{position:"absolute",top:"0",left:"0"}},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(o.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,q),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,H)],8,U)]),e.createElementVNode("polygon",{points:e.unref(o.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:t.value.style.star.useGradient?`url(#star_gradient_over_${d.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,K)],8,G)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(o.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;${c.value?"":"cursor:pointer"}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:u=>b(l),onMouseenter:u=>s.value=l,onMouseleave:n[0]||(n[0]=u=>s.value=void 0),tabindex:"0",onKeyup:e.withKeys(u=>b(l),["enter"])},null,40,T)),c.value?(e.openBlock(),e.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:u=>s.value=l,onMouseleave:n[1]||(n[1]=u=>s.value=void 0)},null,40,W)):e.createCommentVNode("",!0)],12,P)),t.value.style.tooltip.show&&N.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:4,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${s.value===l?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(l)+":",5),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[l],e.unref(o.dataLabel)({v:i.dataset.rating[l],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0)],4))),256)),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],36))}},Q=D._export_sfc(J,[["__scopeId","data-v-9e1d13d5"]]);exports.default=Q;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as h, useSlots as T, onMounted as R, computed as x, watch as H, openBlock as a, createElementBlock as o, normalizeStyle as i, createElementVNode as r, toDisplayString as g, createCommentVNode as y, unref as s, Fragment as P, renderList as W, withKeys as q } from "vue";
|
|
2
|
-
import { u as J, c as Q, o as Z, e as tt, i as $, f as b, X as k, w as F, V as X } from "./index-
|
|
3
|
-
import { u as et } from "./useNestedProp-
|
|
2
|
+
import { u as J, c as Q, o as Z, e as tt, i as $, f as b, X as k, w as F, V as X } from "./index-DCHLGNvJ.js";
|
|
3
|
+
import { u as et } from "./useNestedProp-BPR7xHxr.js";
|
|
4
4
|
import { _ as lt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const at = {
|
|
6
6
|
key: 0,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useCssVars as Ge, computed as h, ref as o, watch as Ve, onMounted as We, onBeforeUnmount as De, openBlock as i, createElementBlock as a, normalizeStyle as C, unref as u, createBlock as F, createCommentVNode as v, createSlots as Xe, withCtx as B, renderSlot as f, normalizeProps as A, guardReactiveProps as W, normalizeClass as D, createVNode as Ye, createElementVNode as qe, Fragment as P, renderList as L, mergeProps as ge, toDisplayString as E } from "vue";
|
|
2
|
-
import { u as He, c as Je, t as Ke, a as Qe, p as me, b as Ze, o as et, e as ke, g as tt, X as lt, G as pe, i as X, f as Y, F as q } from "./index-
|
|
2
|
+
import { u as He, c as Je, t as Ke, a as Qe, p as me, b as Ze, o as et, e as ke, g as tt, X as lt, G as pe, i as X, f as Y, F as q } from "./index-DCHLGNvJ.js";
|
|
3
3
|
import { t as st, u as it } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as at } from "./Title-
|
|
5
|
-
import { u as nt, U as rt } from "./usePrinter-
|
|
6
|
-
import ut from "./vue-ui-skeleton-
|
|
7
|
-
import { u as we } from "./useNestedProp-
|
|
8
|
-
import { _ as ot } from "./PackageVersion-
|
|
9
|
-
import { P as ct } from "./PenAndPaper-
|
|
4
|
+
import { _ as at } from "./Title-Dt5mC-vb.js";
|
|
5
|
+
import { u as nt, U as rt } from "./usePrinter-BvounINk.js";
|
|
6
|
+
import ut from "./vue-ui-skeleton-nTL-u4Yd.js";
|
|
7
|
+
import { u as we } from "./useNestedProp-BPR7xHxr.js";
|
|
8
|
+
import { _ as ot } from "./PackageVersion-BAKTtSRE.js";
|
|
9
|
+
import { P as ct } from "./PenAndPaper-BUzmu0vi.js";
|
|
10
10
|
import { u as dt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
11
11
|
import { _ as vt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
const yt = ["id"], ht = ["xmlns", "viewBox"], ft = ["width", "height"], gt = ["cx", "cy", "r", "stroke", "stroke-width"], mt = { key: 1 }, kt = ["stroke", "d", "stroke-width"], pt = { style: { "pointer-events": "none" } }, wt = ["cx", "cy", "fill", "r", "stroke"], xt = ["x", "y", "fill", "font-size"], bt = { key: 2 }, $t = ["stroke", "stroke-width", "x1", "x2", "y1", "y2"], _t = { style: { "pointer-events": "none" } }, Ct = ["cx", "cy", "fill", "r", "stroke"], Pt = ["x", "y", "fill", "font-size"], Lt = ["text-anchor", "transform", "x", "y", "onClick", "font-weight", "font-size", "fill"], Ot = ["cx", "cy", "fill", "stroke", "onClick", "r"], zt = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-DqxDpUy0.cjs"),Z=require("./useResponsive-BJ7DTGpm.cjs"),Ce=require("./Title-D3kX1BVl.cjs"),ee=require("./usePrinter-BC7U4s0U.cjs"),Be=require("./vue-ui-skeleton-qIxxRRaX.cjs"),te=require("./useNestedProp-DNWKDmdP.cjs"),$e=require("./PackageVersion-B5rBHZEb.cjs"),Pe=require("./PenAndPaper-5OV7IAca.cjs"),_e=require("./useUserOptionState-BgepsfED.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ze=["id"],Oe=["xmlns","viewBox"],Se=["width","height"],Ee=["cx","cy","r","stroke","stroke-width"],Ae={key:1},Ne=["stroke","d","stroke-width"],Ie={style:{"pointer-events":"none"}},Ve=["cx","cy","fill","r","stroke"],Fe=["x","y","fill","font-size"],Me={key:2},Te=["stroke","stroke-width","x1","x2","y1","y2"],Re={style:{"pointer-events":"none"}},je=["cx","cy","fill","r","stroke"],qe=["x","y","fill","font-size"],De=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],Ue=["cx","cy","fill","stroke","onClick","r"],Ge={key:5,class:"vue-data-ui-watermark"},We={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(le,{expose:re}){const y=le;e.useCssVars(t=>({"6a4b731d":ue.value,d1cda308:ie.value,"1841315e":ce.value}));const{vue_ui_relation_circle:ne}=o.useConfig(),$=e.computed(()=>!!y.dataset&&Object.keys(y.dataset).length),w=e.ref(o.createUid()),E=e.ref(0),x=e.ref(null),A=e.ref(null),N=e.ref(null),I=e.ref(null),V=e.ref(0),r=e.computed({get:()=>T(),set:t=>t}),{userOptionsVisible:P,setUserOptionsVisibility:F,keepUserOptionState:M}=_e.useUserOptionState({config:r.value});function T(){const t=te.useNestedProp({userConfig:y.config,defaultConfig:ne});return t.theme?{...te.useNestedProp({userConfig:o.themes.vue_ui_relation_circle[t.theme]||y.config,defaultConfig:t}),customPalette:o.themePalettes[t.theme]||o.palette}:t}e.watch(()=>y.config,t=>{r.value=T(),P.value=!r.value.showOnChartHover,Y(),V.value+=1},{deep:!0});const{isPrinting:R,isImaging:j,generatePdf:q,generateImage:D}=ee.usePrinter({elementId:`relation_circle_${w.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle"}),oe=e.computed(()=>r.value.userOptions.show&&!r.value.style.title.text),U=e.computed(()=>o.convertCustomPalette(r.value.customPalette)),h=e.ref([]),d=e.ref([]),i=e.ref({}),v=e.ref([]),se=e.ref(0),_=e.computed(()=>y.dataset.slice(0,r.value.style.limit)),k=e.ref(r.value.style.size),f=e.ref(r.value.style.weightLabels.size),G=e.ref(r.value.style.plot.radius),W=e.ref(r.value.style.labels.fontSize),a=e.ref({height:r.value.style.size,width:r.value.style.size}),m=e.computed({get(){return k.value*r.value.style.circle.radiusProportion},set(t){return t}}),ae=e.computed(()=>r.value.style.links.curved),ie=e.computed(()=>`${r.value.style.animation.speedMs}ms`),ue=e.computed(()=>m.value*2),ce=e.computed(()=>m.value*4),b=e.ref(null);e.onMounted(()=>{Y(),document.getElementById(`relation_circle_${w.value}`).addEventListener("click",X)});function Y(){if(o.objectIsEmpty(y.dataset)?o.error({componentName:"VueUiRelationCircle",type:"dataset"}):y.dataset.forEach((t,n)=>{o.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(l=>{o.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:l,index:n})})}),r.value.responsive){const t=Z.throttle(()=>{const{width:n,height:l}=Z.useResponsive({chart:x.value,title:r.value.style.title.text?A.value:null,source:N.value,noTitle:I.value});requestAnimationFrame(()=>{k.value=Math.min(n,l),a.value.width=n,a.value.height=l,m.value=k.value*r.value.style.circle.radiusProportion,h.value=[],d.value=[],H(),J(),f.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.weightLabels.size,threshold:6,fallback:6}),G.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.plot.radius,threshold:1,fallback:1}),W.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.labels.fontSize,threshold:6,fallback:6})})});b.value=new ResizeObserver(t),b.value.observe(x.value.parentNode)}else h.value=[],d.value=[],H(),J()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${w.value}`).removeEventListener("click",X),b.value&&b.value.disconnect()});function X(t){const n=t.target;n&&Array.from(n.classList).includes("vue-ui-user-options")||n&&Array.from(n.classList).includes("vue-ui-user-options-summary")||n&&Array.from(n.classList).includes("vue-data-ui-button")||n&&Array.from(n.classList).includes("vue-ui-relation-circle-legend")||(i.value={},v.value=[])}function H(){const t=6.28319/_.value.length,n=360/_.value.length;let l=0,s=0;_.value.forEach((c,u)=>{const O=c.weights.reduce((xe,be)=>xe+be,0),S=m.value*Math.cos(l)+a.value.width/2,we=m.value*Math.sin(l)+a.value.height/2+r.value.style.circle.offsetY;h.value.push({x:S,y:we,...c,color:c.color?c.color:U.value[u]?U.value[u]:o.palette[u],regAngle:s,totalWeight:O}),l+=t,s+=n})}function de(t,n){const l=(t.x+n.x)/2,s=(t.y+n.y)/2;return{x:l,y:s}}function J(){d.value=[],h.value.forEach(t=>{h.value.filter(l=>l.relations.includes(t.id)).forEach((l,s)=>{const c=l.relations.indexOf(t.id);d.value.push({weight:l.weights[c]?l.weights[c]:0,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,midPointLine:de({x:t.x,y:t.y},{x:l.x,y:l.y}),midPointBezier:ve({x1:t.x,x2:l.x,y1:t.y,y2:l.y}),...t})})})}function ve(t){const n={x:t.x1,y:t.y1},l={x:t.x2,y:t.y2},s={x:t.x1,y:t.y1},c={x:a.value.width/2,y:a.value.height/2+r.value.style.circle.offsetY},u=.5,O=Math.pow(1-u,3)*n.x+3*Math.pow(1-u,2)*u*s.x+3*(1-u)*Math.pow(u,2)*c.x+Math.pow(u,3)*l.x,S=Math.pow(1-u,3)*n.y+3*Math.pow(1-u,2)*u*s.y+3*(1-u)*Math.pow(u,2)*c.y+Math.pow(u,3)*l.y;return{x:O,y:S}}const fe=e.computed(()=>Math.max(...d.value.map(t=>t.weight)));function ye(t){return Object.hasOwn(i.value,"x")?v.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function g(t){return t.colorSource}function K(t){return Object.hasOwn(i.value,"x")?v.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`?`opacity:1;stroke-width:${L(t)}`:"opacity: 0":"opacity: 1"}function p(t){return Object.hasOwn(i.value,"x")?!!(v.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`):!1}function ge(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function he(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function me(t){return Object.hasOwn(i.value,"x")?i.value.id===t.id||v.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function ke(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function Q(t){se.value=360-t.regAngle,i.value.id&&t.id===i.value.id?(i.value={},v.value=[]):(i.value=t,v.value=[...t.relations])}function L(t){const n=t.weight/fe.value*r.value.style.links.maxWidth;return Math.max(.3,n)}const C=e.ref(!1);function pe(t){C.value=t,E.value+=1}const B=e.ref(!1);function z(){B.value=!B.value}return re({generatePdf:q,generateImage:D,toggleAnnotator:z}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:x,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor};text-align:center;${r.value.responsive?"height: 100%":""}`),id:`relation_circle_${w.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref(F)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(F)(!1))},[r.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Pe.PenAndPaper,{key:0,parent:x.value,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,active:B.value,onClose:z},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),oe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:I,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),r.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:A,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(Ce._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"relation-div-title",...r.value.style.title},subtitle:{cy:"relation-div-subtitle",...r.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),r.value.userOptions.show&&$.value&&(e.unref(M)||e.unref(P))?(e.openBlock(),e.createBlock(ee.UserOptions,{ref:"details",key:`user_options_${E.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(R),isImaging:e.unref(j),uid:w.value,hasPdf:r.value.userOptions.buttons.pdf,hasImg:r.value.userOptions.buttons.img,hasFullscreen:r.value.userOptions.buttons.img,hasXls:!1,isFullscreen:C.value,titles:{...r.value.userOptions.buttonTitles},chartElement:x.value,position:r.value.userOptions.position,hasAnnotator:r.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(D),onToggleAnnotator:z,style:e.normalizeStyle({visibility:e.unref(M)?e.unref(P)?"visible":"hidden":"visible"})},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:s})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"2"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:s})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:s})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(o.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value},"relation-circle"]),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,width:"100%",style:"user-select:none; background:transparent"},[e.createVNode($e._sfc_main),t.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:a.value.width<=0?10:a.value.width,height:a.value.height<=0?10:a.value.height,style:{pointerEvents:"none"}},[e.renderSlot(t.$slots,"chart-background",{},void 0,!0)],8,Se)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:(a.value.width<=0?1e-4:a.value.width)/2,cy:(a.value.height<=0?1e-4:a.value.height)/2+r.value.style.circle.offsetY,r:m.value<=0?1e-4:m.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,Ee),ae.value?(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${s}`,style:e.normalizeStyle(K(l)),stroke:g(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&v.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${a.value.width/2},${a.value.height/2+r.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":L(l),"stroke-linecap":"round"},null,14,Ne))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",Ie,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.normalizeProps(e.mergeProps({key:0},{x:l.midPointBezier.x,y:l.midPointBezier.y,color:g(l),weight:l.weight,fontSize:f.value})),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointBezier.x,cy:l.midPointBezier.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,Ve)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointBezier.x,y:l.midPointBezier.y+f.value/3,fill:e.unref(o.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Fe)):e.createCommentVNode("",!0)]))),256))])):(e.openBlock(),e.createElementBlock("g",Me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${s}`,stroke:g(l),"stroke-width":L(l),style:e.normalizeStyle(K(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&v.value.includes(l.id)}),"stroke-linecap":"round"},null,14,Te))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",Re,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.normalizeProps(e.mergeProps({key:0},{x:l.midPointLine.x,y:l.midPointLine.y,color:g(l),weight:l.weight,fontSize:f.value})),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointLine.x,cy:l.midPointLine.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,je)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointLine.x,y:l.midPointLine.y+f.value/3,fill:e.unref(o.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,qe)):e.createCommentVNode("",!0)]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${s}`,"text-anchor":ge(l),transform:ke(l),x:he(l),y:l.y+5,onClick:c=>Q(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":i.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${me(l)}`),"font-size":W.value,fill:r.value.style.labels.color},e.toDisplayString(l.label)+" ("+e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.totalWeight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.totalWeight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l}))+") ",13,De))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,s)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${s}`,style:e.normalizeStyle(ye(l)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.useSerieColor?l.color:r.value.style.plot.color,stroke:r.value.style.backgroundColor,"stroke-width":"1",onClick:c=>Q(l),r:G.value},null,12,Ue))),128)),e.renderSlot(t.$slots,"svg",{svg:a.value},void 0,!0)],10,Oe)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(R)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:N,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Be.default,{key:7,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],44,ze))}},Ye=Le._export_sfc(We,[["__scopeId","data-v-26967977"]]);exports.default=Ye;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-xEXHnOtJ.cjs"),Z=require("./useResponsive-BJ7DTGpm.cjs"),Ce=require("./Title-DcTKT_WK.cjs"),ee=require("./usePrinter-CjQvMB0_.cjs"),Be=require("./vue-ui-skeleton-Tse1D8cv.cjs"),te=require("./useNestedProp-LNEDZsGq.cjs"),$e=require("./PackageVersion-BgKxrHv-.cjs"),Pe=require("./PenAndPaper-BYVZ33fz.cjs"),_e=require("./useUserOptionState-BgepsfED.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ze=["id"],Oe=["xmlns","viewBox"],Se=["width","height"],Ee=["cx","cy","r","stroke","stroke-width"],Ae={key:1},Ne=["stroke","d","stroke-width"],Ie={style:{"pointer-events":"none"}},Ve=["cx","cy","fill","r","stroke"],Fe=["x","y","fill","font-size"],Me={key:2},Te=["stroke","stroke-width","x1","x2","y1","y2"],Re={style:{"pointer-events":"none"}},je=["cx","cy","fill","r","stroke"],qe=["x","y","fill","font-size"],De=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],Ue=["cx","cy","fill","stroke","onClick","r"],Ge={key:5,class:"vue-data-ui-watermark"},We={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(le,{expose:re}){const y=le;e.useCssVars(t=>({"6a4b731d":ue.value,d1cda308:ie.value,"1841315e":ce.value}));const{vue_ui_relation_circle:ne}=o.useConfig(),$=e.computed(()=>!!y.dataset&&Object.keys(y.dataset).length),w=e.ref(o.createUid()),E=e.ref(0),x=e.ref(null),A=e.ref(null),N=e.ref(null),I=e.ref(null),V=e.ref(0),r=e.computed({get:()=>T(),set:t=>t}),{userOptionsVisible:P,setUserOptionsVisibility:F,keepUserOptionState:M}=_e.useUserOptionState({config:r.value});function T(){const t=te.useNestedProp({userConfig:y.config,defaultConfig:ne});return t.theme?{...te.useNestedProp({userConfig:o.themes.vue_ui_relation_circle[t.theme]||y.config,defaultConfig:t}),customPalette:o.themePalettes[t.theme]||o.palette}:t}e.watch(()=>y.config,t=>{r.value=T(),P.value=!r.value.showOnChartHover,Y(),V.value+=1},{deep:!0});const{isPrinting:R,isImaging:j,generatePdf:q,generateImage:D}=ee.usePrinter({elementId:`relation_circle_${w.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle"}),oe=e.computed(()=>r.value.userOptions.show&&!r.value.style.title.text),U=e.computed(()=>o.convertCustomPalette(r.value.customPalette)),h=e.ref([]),d=e.ref([]),i=e.ref({}),v=e.ref([]),se=e.ref(0),_=e.computed(()=>y.dataset.slice(0,r.value.style.limit)),k=e.ref(r.value.style.size),f=e.ref(r.value.style.weightLabels.size),G=e.ref(r.value.style.plot.radius),W=e.ref(r.value.style.labels.fontSize),a=e.ref({height:r.value.style.size,width:r.value.style.size}),m=e.computed({get(){return k.value*r.value.style.circle.radiusProportion},set(t){return t}}),ae=e.computed(()=>r.value.style.links.curved),ie=e.computed(()=>`${r.value.style.animation.speedMs}ms`),ue=e.computed(()=>m.value*2),ce=e.computed(()=>m.value*4),b=e.ref(null);e.onMounted(()=>{Y(),document.getElementById(`relation_circle_${w.value}`).addEventListener("click",X)});function Y(){if(o.objectIsEmpty(y.dataset)?o.error({componentName:"VueUiRelationCircle",type:"dataset"}):y.dataset.forEach((t,n)=>{o.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(l=>{o.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:l,index:n})})}),r.value.responsive){const t=Z.throttle(()=>{const{width:n,height:l}=Z.useResponsive({chart:x.value,title:r.value.style.title.text?A.value:null,source:N.value,noTitle:I.value});requestAnimationFrame(()=>{k.value=Math.min(n,l),a.value.width=n,a.value.height=l,m.value=k.value*r.value.style.circle.radiusProportion,h.value=[],d.value=[],H(),J(),f.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.weightLabels.size,threshold:6,fallback:6}),G.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.plot.radius,threshold:1,fallback:1}),W.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.labels.fontSize,threshold:6,fallback:6})})});b.value=new ResizeObserver(t),b.value.observe(x.value.parentNode)}else h.value=[],d.value=[],H(),J()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${w.value}`).removeEventListener("click",X),b.value&&b.value.disconnect()});function X(t){const n=t.target;n&&Array.from(n.classList).includes("vue-ui-user-options")||n&&Array.from(n.classList).includes("vue-ui-user-options-summary")||n&&Array.from(n.classList).includes("vue-data-ui-button")||n&&Array.from(n.classList).includes("vue-ui-relation-circle-legend")||(i.value={},v.value=[])}function H(){const t=6.28319/_.value.length,n=360/_.value.length;let l=0,s=0;_.value.forEach((c,u)=>{const O=c.weights.reduce((xe,be)=>xe+be,0),S=m.value*Math.cos(l)+a.value.width/2,we=m.value*Math.sin(l)+a.value.height/2+r.value.style.circle.offsetY;h.value.push({x:S,y:we,...c,color:c.color?c.color:U.value[u]?U.value[u]:o.palette[u],regAngle:s,totalWeight:O}),l+=t,s+=n})}function de(t,n){const l=(t.x+n.x)/2,s=(t.y+n.y)/2;return{x:l,y:s}}function J(){d.value=[],h.value.forEach(t=>{h.value.filter(l=>l.relations.includes(t.id)).forEach((l,s)=>{const c=l.relations.indexOf(t.id);d.value.push({weight:l.weights[c]?l.weights[c]:0,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,midPointLine:de({x:t.x,y:t.y},{x:l.x,y:l.y}),midPointBezier:ve({x1:t.x,x2:l.x,y1:t.y,y2:l.y}),...t})})})}function ve(t){const n={x:t.x1,y:t.y1},l={x:t.x2,y:t.y2},s={x:t.x1,y:t.y1},c={x:a.value.width/2,y:a.value.height/2+r.value.style.circle.offsetY},u=.5,O=Math.pow(1-u,3)*n.x+3*Math.pow(1-u,2)*u*s.x+3*(1-u)*Math.pow(u,2)*c.x+Math.pow(u,3)*l.x,S=Math.pow(1-u,3)*n.y+3*Math.pow(1-u,2)*u*s.y+3*(1-u)*Math.pow(u,2)*c.y+Math.pow(u,3)*l.y;return{x:O,y:S}}const fe=e.computed(()=>Math.max(...d.value.map(t=>t.weight)));function ye(t){return Object.hasOwn(i.value,"x")?v.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function g(t){return t.colorSource}function K(t){return Object.hasOwn(i.value,"x")?v.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`?`opacity:1;stroke-width:${L(t)}`:"opacity: 0":"opacity: 1"}function p(t){return Object.hasOwn(i.value,"x")?!!(v.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`):!1}function ge(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function he(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function me(t){return Object.hasOwn(i.value,"x")?i.value.id===t.id||v.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function ke(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function Q(t){se.value=360-t.regAngle,i.value.id&&t.id===i.value.id?(i.value={},v.value=[]):(i.value=t,v.value=[...t.relations])}function L(t){const n=t.weight/fe.value*r.value.style.links.maxWidth;return Math.max(.3,n)}const C=e.ref(!1);function pe(t){C.value=t,E.value+=1}const B=e.ref(!1);function z(){B.value=!B.value}return re({generatePdf:q,generateImage:D,toggleAnnotator:z}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:x,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor};text-align:center;${r.value.responsive?"height: 100%":""}`),id:`relation_circle_${w.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref(F)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(F)(!1))},[r.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Pe.PenAndPaper,{key:0,parent:x.value,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,active:B.value,onClose:z},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),oe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:I,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),r.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:A,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(Ce._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"relation-div-title",...r.value.style.title},subtitle:{cy:"relation-div-subtitle",...r.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),r.value.userOptions.show&&$.value&&(e.unref(M)||e.unref(P))?(e.openBlock(),e.createBlock(ee.UserOptions,{ref:"details",key:`user_options_${E.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(R),isImaging:e.unref(j),uid:w.value,hasPdf:r.value.userOptions.buttons.pdf,hasImg:r.value.userOptions.buttons.img,hasFullscreen:r.value.userOptions.buttons.img,hasXls:!1,isFullscreen:C.value,titles:{...r.value.userOptions.buttonTitles},chartElement:x.value,position:r.value.userOptions.position,hasAnnotator:r.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(D),onToggleAnnotator:z,style:e.normalizeStyle({visibility:e.unref(M)?e.unref(P)?"visible":"hidden":"visible"})},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:s})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"2"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:s})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:s})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(o.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value},"relation-circle"]),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,width:"100%",style:"user-select:none; background:transparent"},[e.createVNode($e._sfc_main),t.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:a.value.width<=0?10:a.value.width,height:a.value.height<=0?10:a.value.height,style:{pointerEvents:"none"}},[e.renderSlot(t.$slots,"chart-background",{},void 0,!0)],8,Se)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:(a.value.width<=0?1e-4:a.value.width)/2,cy:(a.value.height<=0?1e-4:a.value.height)/2+r.value.style.circle.offsetY,r:m.value<=0?1e-4:m.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,Ee),ae.value?(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${s}`,style:e.normalizeStyle(K(l)),stroke:g(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&v.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${a.value.width/2},${a.value.height/2+r.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":L(l),"stroke-linecap":"round"},null,14,Ne))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",Ie,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.normalizeProps(e.mergeProps({key:0},{x:l.midPointBezier.x,y:l.midPointBezier.y,color:g(l),weight:l.weight,fontSize:f.value})),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointBezier.x,cy:l.midPointBezier.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,Ve)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointBezier.x,y:l.midPointBezier.y+f.value/3,fill:e.unref(o.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Fe)):e.createCommentVNode("",!0)]))),256))])):(e.openBlock(),e.createElementBlock("g",Me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${s}`,stroke:g(l),"stroke-width":L(l),style:e.normalizeStyle(K(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&v.value.includes(l.id)}),"stroke-linecap":"round"},null,14,Te))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",Re,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.normalizeProps(e.mergeProps({key:0},{x:l.midPointLine.x,y:l.midPointLine.y,color:g(l),weight:l.weight,fontSize:f.value})),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointLine.x,cy:l.midPointLine.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,je)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointLine.x,y:l.midPointLine.y+f.value/3,fill:e.unref(o.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,qe)):e.createCommentVNode("",!0)]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${s}`,"text-anchor":ge(l),transform:ke(l),x:he(l),y:l.y+5,onClick:c=>Q(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":i.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${me(l)}`),"font-size":W.value,fill:r.value.style.labels.color},e.toDisplayString(l.label)+" ("+e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.totalWeight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.totalWeight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l}))+") ",13,De))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,s)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${s}`,style:e.normalizeStyle(ye(l)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.useSerieColor?l.color:r.value.style.plot.color,stroke:r.value.style.backgroundColor,"stroke-width":"1",onClick:c=>Q(l),r:G.value},null,12,Ue))),128)),e.renderSlot(t.$slots,"svg",{svg:a.value},void 0,!0)],10,Oe)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(R)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:N,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Be.default,{key:7,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],44,ze))}},Ye=Le._export_sfc(We,[["__scopeId","data-v-26967977"]]);exports.default=Ye;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { useSlots as De, ref as r, computed as h, watch as Ee, onMounted as Ge, onBeforeUnmount as He, openBlock as n, createElementBlock as v, normalizeClass as V, normalizeStyle as N, unref as i, createBlock as O, createCommentVNode as m, createSlots as
|
|
2
|
-
import { u as Xe, c as
|
|
1
|
+
import { useSlots as De, ref as r, computed as h, watch as Ee, onMounted as Ge, onBeforeUnmount as He, openBlock as n, createElementBlock as v, normalizeClass as V, normalizeStyle as N, unref as i, createBlock as O, createCommentVNode as m, createSlots as we, withCtx as g, renderSlot as p, normalizeProps as F, guardReactiveProps as L, createVNode as J, createElementVNode as T, Fragment as K, renderList as Q, createTextVNode as $e, toDisplayString as E, nextTick as je } from "vue";
|
|
2
|
+
import { u as Xe, c as Te, t as qe, a as Ye, p as I, o as Je, e as Z, g as Ke, b as Qe, J as Ze, d as _e, f as P, X as et, s as tt, w as lt, v as G, i as xe, x as ot, y as at, q as st, r as nt } from "./index-DCHLGNvJ.js";
|
|
3
3
|
import { t as ut, u as rt } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as it } from "./Title-
|
|
5
|
-
import { u as vt, U as ct } from "./usePrinter-
|
|
6
|
-
import { _ as dt } from "./Tooltip-
|
|
7
|
-
import { D as pt } from "./DataTable-
|
|
8
|
-
import { L as ht } from "./Legend-
|
|
9
|
-
import gt from "./vue-ui-skeleton-
|
|
10
|
-
import ft from "./vue-ui-accordion-
|
|
11
|
-
import { u as Ne } from "./useNestedProp-
|
|
12
|
-
import { _ as yt } from "./PackageVersion-
|
|
13
|
-
import { P as mt } from "./PenAndPaper-
|
|
4
|
+
import { _ as it } from "./Title-Dt5mC-vb.js";
|
|
5
|
+
import { u as vt, U as ct } from "./usePrinter-BvounINk.js";
|
|
6
|
+
import { _ as dt } from "./Tooltip-CmKYX0H1.js";
|
|
7
|
+
import { D as pt } from "./DataTable-Cnr3w23K.js";
|
|
8
|
+
import { L as ht } from "./Legend-Di7FMl12.js";
|
|
9
|
+
import gt from "./vue-ui-skeleton-nTL-u4Yd.js";
|
|
10
|
+
import ft from "./vue-ui-accordion-DEpeQHhr.js";
|
|
11
|
+
import { u as Ne } from "./useNestedProp-BPR7xHxr.js";
|
|
12
|
+
import { _ as yt } from "./PackageVersion-BAKTtSRE.js";
|
|
13
|
+
import { P as mt } from "./PenAndPaper-BUzmu0vi.js";
|
|
14
14
|
import { u as bt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
|
-
import { _ as kt } from "./Shape-
|
|
15
|
+
import { _ as kt } from "./Shape-DZz__S1P.js";
|
|
16
16
|
import { _ as Ct } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
17
|
-
const
|
|
17
|
+
const wt = ["id"], $t = ["xmlns", "viewBox"], Tt = ["width", "height"], _t = ["id"], xt = ["stop-color"], Nt = ["stop-color"], Ot = { key: 1 }, It = ["stroke", "cx", "cy", "r", "fill"], Pt = ["stroke", "stroke-width", "cx", "cy", "r", "fill"], St = ["stroke", "stroke-width", "cx", "cy", "r", "fill"], At = ["cx", "cy", "r", "onMouseenter"], Ft = {
|
|
18
18
|
key: 5,
|
|
19
19
|
class: "vue-data-ui-watermark"
|
|
20
20
|
}, Lt = ["onClick"], Mt = { key: 0 }, Vt = { key: 1 }, zt = ["innerHTML"], Rt = {
|
|
@@ -35,7 +35,7 @@ const $t = ["id"], wt = ["xmlns", "viewBox"], _t = ["width", "height"], Tt = ["i
|
|
|
35
35
|
},
|
|
36
36
|
emits: ["selectLegend"],
|
|
37
37
|
setup(Oe, { expose: Ie, emit: Pe }) {
|
|
38
|
-
const b = Oe, { vue_ui_rings: Se } = Xe(), Ae = De(), x = r(!1), z = h(() => !!b.dataset && b.dataset.length),
|
|
38
|
+
const b = Oe, { vue_ui_rings: Se } = Xe(), Ae = De(), x = r(!1), z = h(() => !!b.dataset && b.dataset.length), w = r(Te()), Fe = r(null), R = r(!1), H = r(""), $ = r(null), ee = r(0), S = r(null), te = r(null), le = r(null), oe = r(null), ae = r(null), se = r(0), ne = r(0), ue = r(0), e = h({
|
|
39
39
|
get: () => ve(),
|
|
40
40
|
set: (t) => t
|
|
41
41
|
}), { userOptionsVisible: j, setUserOptionsVisibility: re, keepUserOptionState: ie } = bt({ config: e.value });
|
|
@@ -53,7 +53,7 @@ const $t = ["id"], wt = ["xmlns", "viewBox"], _t = ["width", "height"], Tt = ["i
|
|
|
53
53
|
} : t;
|
|
54
54
|
}
|
|
55
55
|
Ee(() => b.config, (t) => {
|
|
56
|
-
e.value = ve(), j.value = !e.value.showOnChartHover, ce(), se.value += 1, ne.value += 1, ue.value += 1;
|
|
56
|
+
e.value = ve(), j.value = !e.value.showOnChartHover, ce(), se.value += 1, ne.value += 1, ue.value += 1, k.value.showTable = e.value.table.show, k.value.showTooltip = e.value.style.chart.tooltip.show;
|
|
57
57
|
}, { deep: !0 });
|
|
58
58
|
const U = r(null);
|
|
59
59
|
Ge(() => {
|
|
@@ -101,9 +101,9 @@ const $t = ["id"], wt = ["xmlns", "viewBox"], _t = ["width", "height"], Tt = ["i
|
|
|
101
101
|
U.value && U.value.disconnect();
|
|
102
102
|
});
|
|
103
103
|
const { isPrinting: de, isImaging: pe, generatePdf: he, generateImage: ge } = vt({
|
|
104
|
-
elementId: `rings_${
|
|
104
|
+
elementId: `rings_${w.value}`,
|
|
105
105
|
fileName: e.value.style.chart.title.text || "vue-ui-rings"
|
|
106
|
-
}), Le = h(() => e.value.userOptions.show && !e.value.style.chart.title.text), fe = h(() => Qe(e.value.customPalette)),
|
|
106
|
+
}), Le = h(() => e.value.userOptions.show && !e.value.style.chart.title.text), fe = h(() => Qe(e.value.customPalette)), k = r({
|
|
107
107
|
showTable: e.value.table.show,
|
|
108
108
|
showTooltip: e.value.style.chart.tooltip.show
|
|
109
109
|
}), s = r({
|
|
@@ -127,10 +127,10 @@ const $t = ["id"], wt = ["xmlns", "viewBox"], _t = ["width", "height"], Tt = ["i
|
|
|
127
127
|
const u = Ze(t).reduce((y, M) => y + M, 0);
|
|
128
128
|
return {
|
|
129
129
|
name: o,
|
|
130
|
-
color: l ||
|
|
130
|
+
color: l || _e(l) || fe.value[a] || I[a] || I[a % I.length],
|
|
131
131
|
value: u,
|
|
132
132
|
proportion: u / b.dataset.map((y) => (y.values || []).reduce((M, Be) => M + Be, 0)).reduce((y, M) => y + M, 0),
|
|
133
|
-
uid:
|
|
133
|
+
uid: Te(),
|
|
134
134
|
absoluteIndex: a
|
|
135
135
|
};
|
|
136
136
|
})), me = h(() => W.value.map((t) => ({
|
|
@@ -146,14 +146,14 @@ const $t = ["id"], wt = ["xmlns", "viewBox"], _t = ["width", "height"], Tt = ["i
|
|
|
146
146
|
fontSize: e.value.style.chart.legend.fontSize,
|
|
147
147
|
paddingBottom: 12,
|
|
148
148
|
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
149
|
-
})),
|
|
149
|
+
})), C = h(() => W.value.filter((t) => !f.value.includes(t.uid)).map(({ value: t }) => t).reduce((t, o) => t + o, 0)), d = h(() => W.value.filter((t) => !f.value.includes(t.uid)).map(({ name: t, value: o, color: l = null, uid: a, absoluteIndex: u }, y) => ({
|
|
150
150
|
absoluteIndex: u,
|
|
151
151
|
uid: a,
|
|
152
152
|
name: t,
|
|
153
|
-
color: l ||
|
|
153
|
+
color: l || _e(l) || fe.value[y] || I[y] || I[y % I.length],
|
|
154
154
|
value: o,
|
|
155
155
|
proportion: ye(o),
|
|
156
|
-
percentage: o /
|
|
156
|
+
percentage: o / C.value * 100,
|
|
157
157
|
strokeWidth: e.value.style.chart.layout.rings.strokeWidth * ye(o)
|
|
158
158
|
})).toSorted((t, o) => o.value - t.value));
|
|
159
159
|
function Re() {
|
|
@@ -191,7 +191,7 @@ const $t = ["id"], wt = ["xmlns", "viewBox"], _t = ["width", "height"], Tt = ["i
|
|
|
191
191
|
});
|
|
192
192
|
else {
|
|
193
193
|
let u = "";
|
|
194
|
-
u += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`, u += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${l.color}" />${Ae.pattern ? `<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${
|
|
194
|
+
u += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`, u += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${l.color}" />${Ae.pattern ? `<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${w.value}_${o.absoluteIndex})" />` : ""}</svg>`, e.value.style.chart.tooltip.showValue && (u += `<b>${xe(
|
|
195
195
|
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
196
196
|
l.value,
|
|
197
197
|
P({
|
|
@@ -203,18 +203,18 @@ const $t = ["id"], wt = ["xmlns", "viewBox"], _t = ["width", "height"], Tt = ["i
|
|
|
203
203
|
{ datapoint: o, seriesIndex: t }
|
|
204
204
|
)}
|
|
205
205
|
</b>`), e.value.style.chart.tooltip.showPercentage && (e.value.style.chart.tooltip.showValue ? u += `<span>(${P({
|
|
206
|
-
v: l.value /
|
|
206
|
+
v: l.value / C.value * 100,
|
|
207
207
|
s: "%",
|
|
208
208
|
r: e.value.style.chart.tooltip.roundingPercentage
|
|
209
209
|
})})</span></div>` : u += `<b>${P({
|
|
210
|
-
v: l.value /
|
|
210
|
+
v: l.value / C.value * 100,
|
|
211
211
|
s: "%",
|
|
212
212
|
r: e.value.style.chart.tooltip.roundingPercentage
|
|
213
213
|
})}</b></div>`), H.value = u;
|
|
214
214
|
}
|
|
215
215
|
R.value = !0;
|
|
216
216
|
}
|
|
217
|
-
const
|
|
217
|
+
const _ = h(() => {
|
|
218
218
|
const t = d.value.map((l) => ({
|
|
219
219
|
name: l.name,
|
|
220
220
|
color: l.color
|
|
@@ -223,15 +223,15 @@ const $t = ["id"], wt = ["xmlns", "viewBox"], _t = ["width", "height"], Tt = ["i
|
|
|
223
223
|
}), B = h(() => {
|
|
224
224
|
const t = [
|
|
225
225
|
' <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>',
|
|
226
|
-
P({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v:
|
|
226
|
+
P({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: C.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
|
|
227
227
|
"100%"
|
|
228
|
-
], o =
|
|
228
|
+
], o = _.value.head.map((u, y) => [
|
|
229
229
|
{
|
|
230
230
|
color: u.color,
|
|
231
231
|
name: u.name
|
|
232
232
|
},
|
|
233
|
-
P({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v:
|
|
234
|
-
isNaN(
|
|
233
|
+
P({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: _.value.body[y], s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
|
|
234
|
+
isNaN(_.value.body[y] / C.value) ? "-" : (_.value.body[y] / C.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
|
|
235
235
|
]), l = {
|
|
236
236
|
th: {
|
|
237
237
|
backgroundColor: e.value.table.th.backgroundColor,
|
|
@@ -258,9 +258,9 @@ const $t = ["id"], wt = ["xmlns", "viewBox"], _t = ["width", "height"], Tt = ["i
|
|
|
258
258
|
});
|
|
259
259
|
function be() {
|
|
260
260
|
je(() => {
|
|
261
|
-
const t =
|
|
261
|
+
const t = _.value.head.map((a, u) => [[
|
|
262
262
|
a.name
|
|
263
|
-
], [
|
|
263
|
+
], [_.value.body[u]], [isNaN(_.value.body[u] / C.value) ? "-" : _.value.body[u] / C.value * 100]]), o = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(t), l = st(o);
|
|
264
264
|
nt({ csvContent: l, title: e.value.style.chart.title.text || "vue-ui-rings" });
|
|
265
265
|
});
|
|
266
266
|
}
|
|
@@ -269,10 +269,10 @@ const $t = ["id"], wt = ["xmlns", "viewBox"], _t = ["width", "height"], Tt = ["i
|
|
|
269
269
|
A.value = t, ee.value += 1;
|
|
270
270
|
}
|
|
271
271
|
function ke() {
|
|
272
|
-
|
|
272
|
+
k.value.showTable = !k.value.showTable;
|
|
273
273
|
}
|
|
274
274
|
function Ce() {
|
|
275
|
-
|
|
275
|
+
k.value.showTooltip = !k.value.showTooltip;
|
|
276
276
|
}
|
|
277
277
|
const D = r(!1);
|
|
278
278
|
function Y() {
|
|
@@ -291,7 +291,7 @@ const $t = ["id"], wt = ["xmlns", "viewBox"], _t = ["width", "height"], Tt = ["i
|
|
|
291
291
|
ref: S,
|
|
292
292
|
class: V(`vue-ui-rings ${A.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
293
293
|
style: N(`font-family:${e.value.style.fontFamily};text-align:center;width:100%;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`),
|
|
294
|
-
id: `rings_${
|
|
294
|
+
id: `rings_${w.value}`,
|
|
295
295
|
onMouseleave: o[3] || (o[3] = (l) => {
|
|
296
296
|
$.value = null, R.value = !1, i(re)(!1);
|
|
297
297
|
}),
|
|
@@ -340,14 +340,14 @@ const $t = ["id"], wt = ["xmlns", "viewBox"], _t = ["width", "height"], Tt = ["i
|
|
|
340
340
|
color: e.value.style.chart.color,
|
|
341
341
|
isPrinting: i(de),
|
|
342
342
|
isImaging: i(pe),
|
|
343
|
-
uid:
|
|
343
|
+
uid: w.value,
|
|
344
344
|
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
|
|
345
345
|
hasPdf: e.value.userOptions.buttons.pdf,
|
|
346
346
|
hasXls: e.value.userOptions.buttons.csv,
|
|
347
347
|
hasImg: e.value.userOptions.buttons.img,
|
|
348
348
|
hasTable: e.value.userOptions.buttons.table,
|
|
349
349
|
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
350
|
-
isTooltip:
|
|
350
|
+
isTooltip: k.value.showTooltip,
|
|
351
351
|
isFullscreen: A.value,
|
|
352
352
|
titles: { ...e.value.userOptions.buttonTitles },
|
|
353
353
|
chartElement: S.value,
|
|
@@ -364,7 +364,7 @@ const $t = ["id"], wt = ["xmlns", "viewBox"], _t = ["width", "height"], Tt = ["i
|
|
|
364
364
|
style: N({
|
|
365
365
|
visibility: i(ie) ? i(j) ? "visible" : "hidden" : "visible"
|
|
366
366
|
})
|
|
367
|
-
},
|
|
367
|
+
}, we({ _: 2 }, [
|
|
368
368
|
t.$slots.optionTooltip ? {
|
|
369
369
|
name: "optionTooltip",
|
|
370
370
|
fn: g(() => [
|
|
@@ -434,33 +434,33 @@ const $t = ["id"], wt = ["xmlns", "viewBox"], _t = ["width", "height"], Tt = ["i
|
|
|
434
434
|
}
|
|
435
435
|
}, [
|
|
436
436
|
p(t.$slots, "chart-background", {}, void 0, !0)
|
|
437
|
-
], 8,
|
|
438
|
-
|
|
437
|
+
], 8, Tt)) : m("", !0),
|
|
438
|
+
T("defs", null, [
|
|
439
439
|
(n(!0), v(K, null, Q(d.value, (l, a) => (n(), v("radialGradient", {
|
|
440
440
|
cx: "50%",
|
|
441
441
|
cy: "30%",
|
|
442
442
|
r: "50%",
|
|
443
443
|
fx: "50%",
|
|
444
444
|
fy: "50%",
|
|
445
|
-
id: `gradient_${
|
|
445
|
+
id: `gradient_${w.value}_${a}`
|
|
446
446
|
}, [
|
|
447
|
-
|
|
447
|
+
T("stop", {
|
|
448
448
|
offset: "0%",
|
|
449
449
|
"stop-color": i(tt)(i(lt)(l.color, 0.05), 100 - e.value.style.chart.layout.rings.gradient.intensity)
|
|
450
450
|
}, null, 8, xt),
|
|
451
|
-
|
|
451
|
+
T("stop", {
|
|
452
452
|
offset: "100%",
|
|
453
453
|
"stop-color": l.color
|
|
454
454
|
}, null, 8, Nt)
|
|
455
|
-
], 8,
|
|
455
|
+
], 8, _t))), 256))
|
|
456
456
|
]),
|
|
457
457
|
t.$slots.pattern ? (n(), v("g", Ot, [
|
|
458
458
|
(n(!0), v(K, null, Q(d.value, (l) => (n(), v("defs", null, [
|
|
459
|
-
p(t.$slots, "pattern", F(L({ seriesIndex: l.absoluteIndex, patternId: `pattern_${
|
|
459
|
+
p(t.$slots, "pattern", F(L({ seriesIndex: l.absoluteIndex, patternId: `pattern_${w.value}_${l.absoluteIndex}` })), void 0, !0)
|
|
460
460
|
]))), 256))
|
|
461
461
|
])) : m("", !0),
|
|
462
462
|
(n(!0), v(K, null, Q(d.value, (l, a) => (n(), v("g", null, [
|
|
463
|
-
|
|
463
|
+
T("circle", {
|
|
464
464
|
class: V({
|
|
465
465
|
"vue-ui-rings-item": x.value && e.value.useCssAnimation,
|
|
466
466
|
"vue-rings-item-onload": !x.value && e.value.useCssAnimation,
|
|
@@ -473,7 +473,7 @@ const $t = ["id"], wt = ["xmlns", "viewBox"], _t = ["width", "height"], Tt = ["i
|
|
|
473
473
|
r: i(G)(c.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : c.value * l.proportion / 2 * 0.9),
|
|
474
474
|
fill: e.value.style.chart.layout.rings.gradient.underlayerColor
|
|
475
475
|
}, null, 14, It),
|
|
476
|
-
|
|
476
|
+
T("circle", {
|
|
477
477
|
class: V({
|
|
478
478
|
"vue-ui-rings-item": x.value && e.value.useCssAnimation,
|
|
479
479
|
"vue-rings-item-onload": !x.value && e.value.useCssAnimation,
|
|
@@ -486,7 +486,7 @@ const $t = ["id"], wt = ["xmlns", "viewBox"], _t = ["width", "height"], Tt = ["i
|
|
|
486
486
|
cx: s.value.width / 2,
|
|
487
487
|
cy: a === 0 ? s.value.height / 2 : s.value.height / 2 + c.value * d.value[0].proportion / 2 - c.value * l.proportion / 2 - 2 * (a + 1),
|
|
488
488
|
r: i(G)(c.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : c.value * l.proportion / 2 * 0.9),
|
|
489
|
-
fill: e.value.style.chart.layout.rings.gradient.show ? `url(#gradient_${
|
|
489
|
+
fill: e.value.style.chart.layout.rings.gradient.show ? `url(#gradient_${w.value}_${a})` : l.color
|
|
490
490
|
}, null, 14, Pt),
|
|
491
491
|
t.$slots.pattern ? (n(), v("circle", {
|
|
492
492
|
key: 0,
|
|
@@ -502,9 +502,9 @@ const $t = ["id"], wt = ["xmlns", "viewBox"], _t = ["width", "height"], Tt = ["i
|
|
|
502
502
|
cx: s.value.width / 2,
|
|
503
503
|
cy: a === 0 ? s.value.height / 2 : s.value.height / 2 + c.value * d.value[0].proportion / 2 - c.value * l.proportion / 2 - 2 * (a + 1),
|
|
504
504
|
r: i(G)(c.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : c.value * l.proportion / 2 * 0.9),
|
|
505
|
-
fill: `url(#pattern_${
|
|
505
|
+
fill: `url(#pattern_${w.value}_${l.absoluteIndex})`
|
|
506
506
|
}, null, 14, St)) : m("", !0),
|
|
507
|
-
|
|
507
|
+
T("circle", {
|
|
508
508
|
"data-cy-trap": "",
|
|
509
509
|
stroke: "none",
|
|
510
510
|
cx: s.value.width / 2,
|
|
@@ -518,7 +518,7 @@ const $t = ["id"], wt = ["xmlns", "viewBox"], _t = ["width", "height"], Tt = ["i
|
|
|
518
518
|
}, null, 40, At)
|
|
519
519
|
]))), 256)),
|
|
520
520
|
p(t.$slots, "svg", { svg: s.value }, void 0, !0)
|
|
521
|
-
], 14,
|
|
521
|
+
], 14, $t)) : m("", !0),
|
|
522
522
|
t.$slots.watermark ? (n(), v("div", Ft, [
|
|
523
523
|
p(t.$slots, "watermark", F(L({ isPrinting: i(de) || i(pe) })), void 0, !0)
|
|
524
524
|
])) : m("", !0),
|
|
@@ -534,7 +534,7 @@ const $t = ["id"], wt = ["xmlns", "viewBox"], _t = ["width", "height"], Tt = ["i
|
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
536
|
}, null, 8, ["config"])),
|
|
537
|
-
|
|
537
|
+
T("div", {
|
|
538
538
|
ref_key: "chartLegend",
|
|
539
539
|
ref: le
|
|
540
540
|
}, [
|
|
@@ -543,14 +543,14 @@ const $t = ["id"], wt = ["xmlns", "viewBox"], _t = ["width", "height"], Tt = ["i
|
|
|
543
543
|
legendSet: me.value,
|
|
544
544
|
config: ze.value,
|
|
545
545
|
onClickMarker: o[1] || (o[1] = ({ legend: l }) => X(l.uid))
|
|
546
|
-
},
|
|
546
|
+
}, we({
|
|
547
547
|
item: g(({ legend: l, index: a }) => [
|
|
548
|
-
|
|
548
|
+
T("div", {
|
|
549
549
|
"data-cy-legend-item": "",
|
|
550
550
|
onClick: (u) => X(l.uid),
|
|
551
551
|
style: N(`opacity:${f.value.includes(l.uid) ? 0.5 : 1}`)
|
|
552
552
|
}, [
|
|
553
|
-
|
|
553
|
+
$e(E(l.name) + ": " + E(i(xe)(
|
|
554
554
|
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
555
555
|
l.value,
|
|
556
556
|
i(P)({
|
|
@@ -561,8 +561,8 @@ const $t = ["id"], wt = ["xmlns", "viewBox"], _t = ["width", "height"], Tt = ["i
|
|
|
561
561
|
}),
|
|
562
562
|
{ datapoint: l, seriesIndex: a }
|
|
563
563
|
)) + " ", 1),
|
|
564
|
-
f.value.includes(l.uid) ? (n(), v("span", Vt, " ( - % ) ")) : (n(), v("span", Mt, " (" + E(isNaN(l.value /
|
|
565
|
-
v: l.value /
|
|
564
|
+
f.value.includes(l.uid) ? (n(), v("span", Vt, " ( - % ) ")) : (n(), v("span", Mt, " (" + E(isNaN(l.value / C.value) ? "-" : i(P)({
|
|
565
|
+
v: l.value / C.value * 100,
|
|
566
566
|
s: "%",
|
|
567
567
|
r: e.value.style.chart.legend.roundingPercentage
|
|
568
568
|
})) + ") ", 1))
|
|
@@ -578,7 +578,7 @@ const $t = ["id"], wt = ["xmlns", "viewBox"], _t = ["width", "height"], Tt = ["i
|
|
|
578
578
|
radius: 30,
|
|
579
579
|
stroke: "none",
|
|
580
580
|
plot: { x: 30, y: 30 },
|
|
581
|
-
fill: `url(#pattern_${
|
|
581
|
+
fill: `url(#pattern_${w.value}_${a})`
|
|
582
582
|
}, null, 8, ["shape", "fill"])
|
|
583
583
|
]),
|
|
584
584
|
key: "0"
|
|
@@ -597,7 +597,7 @@ const $t = ["id"], wt = ["xmlns", "viewBox"], _t = ["width", "height"], Tt = ["i
|
|
|
597
597
|
p(t.$slots, "source", {}, void 0, !0)
|
|
598
598
|
], 512)) : m("", !0),
|
|
599
599
|
J(dt, {
|
|
600
|
-
show:
|
|
600
|
+
show: k.value.showTooltip && R.value && f.value.length < b.dataset.length,
|
|
601
601
|
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
602
602
|
color: e.value.style.chart.tooltip.color,
|
|
603
603
|
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
@@ -624,7 +624,7 @@ const $t = ["id"], wt = ["xmlns", "viewBox"], _t = ["width", "height"], Tt = ["i
|
|
|
624
624
|
key: 8,
|
|
625
625
|
hideDetails: "",
|
|
626
626
|
config: {
|
|
627
|
-
open:
|
|
627
|
+
open: k.value.showTable,
|
|
628
628
|
maxHeight: 1e4,
|
|
629
629
|
body: {
|
|
630
630
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
@@ -644,25 +644,25 @@ const $t = ["id"], wt = ["xmlns", "viewBox"], _t = ["width", "height"], Tt = ["i
|
|
|
644
644
|
body: B.value.body,
|
|
645
645
|
config: B.value.config,
|
|
646
646
|
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
647
|
-
onClose: o[2] || (o[2] = (l) =>
|
|
647
|
+
onClose: o[2] || (o[2] = (l) => k.value.showTable = !1)
|
|
648
648
|
}, {
|
|
649
649
|
th: g(({ th: l }) => [
|
|
650
|
-
|
|
650
|
+
T("div", {
|
|
651
651
|
innerHTML: l,
|
|
652
652
|
style: { display: "flex", "align-items": "center" }
|
|
653
653
|
}, null, 8, zt)
|
|
654
654
|
]),
|
|
655
655
|
td: g(({ td: l }) => [
|
|
656
|
-
|
|
656
|
+
$e(E(l.name || l), 1)
|
|
657
657
|
]),
|
|
658
658
|
_: 1
|
|
659
659
|
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
660
660
|
]),
|
|
661
661
|
_: 1
|
|
662
662
|
}, 8, ["config"])) : m("", !0)
|
|
663
|
-
], 46,
|
|
663
|
+
], 46, wt));
|
|
664
664
|
}
|
|
665
|
-
}, tl = /* @__PURE__ */ Ct(Rt, [["__scopeId", "data-v-
|
|
665
|
+
}, tl = /* @__PURE__ */ Ct(Rt, [["__scopeId", "data-v-a858c542"]]);
|
|
666
666
|
export {
|
|
667
667
|
tl as default
|
|
668
668
|
};
|