vue-data-ui 2.4.48 → 2.4.49
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-CDz_A4X6.cjs → Arrow-CTukks_V.cjs} +1 -1
- package/dist/{Arrow-CMGb5jtB.js → Arrow-Q0cOmO5p.js} +1 -1
- package/dist/{BaseIcon-CqZOJaZ7.cjs → BaseIcon-2ZD3jgGz.cjs} +1 -1
- package/dist/{BaseIcon-WyM8ZLeS.js → BaseIcon-CaYP30Aq.js} +1 -1
- package/dist/{DataTable-8Bk6Zg9H.js → DataTable-CO5C8Cmb.js} +2 -2
- package/dist/{DataTable-UQDVIoTq.cjs → DataTable-kMUhutQ4.cjs} +1 -1
- package/dist/{Legend-DyQhpUa7.cjs → Legend-DPHcmrzd.cjs} +1 -1
- package/dist/{Legend-BqySI7-3.js → Legend-FZN9UHoI.js} +1 -1
- package/dist/{PackageVersion-C26iHVPd.js → PackageVersion-DYk2hOG1.js} +1 -1
- package/dist/{PackageVersion-JL2H1ZNU.cjs → PackageVersion-rnWHRWGI.cjs} +1 -1
- package/dist/{PenAndPaper-Bmfl9PVt.cjs → PenAndPaper-BQl9-uX0.cjs} +1 -1
- package/dist/{PenAndPaper-XF8fq-Km.js → PenAndPaper-BfgS_5ux.js} +3 -3
- package/dist/{Shape-CbUYortz.cjs → Shape-BblkpCyL.cjs} +1 -1
- package/dist/{Shape-Cmue6aoD.js → Shape-BqkMzXqo.js} +1 -1
- package/dist/{Slicer-DnI684H6.js → Slicer-DlgqsI5C.js} +2 -2
- package/dist/{Slicer-DJsIXuV_.cjs → Slicer-yEeqKUDF.cjs} +1 -1
- package/dist/{Title-CbiI2XAK.cjs → Title-5Vedk01J.cjs} +1 -1
- package/dist/{Title-D5Wtk97z.js → Title-DED-PQ7X.js} +1 -1
- package/dist/{Tooltip-z6v35GbJ.js → Tooltip-CHseiJu8.js} +1 -1
- package/dist/{Tooltip-CXWymtVK.cjs → Tooltip-DjCKBAC4.cjs} +1 -1
- package/dist/index-BHQZE19X.cjs +9 -0
- package/dist/{index-BepNt4hC.js → index-igxqCP2w.js} +2 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +1 -0
- package/dist/types/vue-data-ui.d.ts +1 -0
- package/dist/{useNestedProp-DUC6XBU3.js → useNestedProp-CSVnZVwZ.js} +1 -1
- package/dist/{useNestedProp-BEjpLG7g.cjs → useNestedProp-CwpqC_aE.cjs} +1 -1
- package/dist/{usePrinter-DPvuzbZK.js → usePrinter-CnZYDQXB.js} +1 -1
- package/dist/{usePrinter-Hc-LICQf.cjs → usePrinter-DVgxBO4o.cjs} +1 -1
- package/dist/{vue-data-ui-CFmnqYD2.js → vue-data-ui-B--WWkUM.js} +60 -60
- package/dist/{vue-data-ui-TUbEwYZ5.cjs → vue-data-ui-BrRTkOqu.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-CYl_O7ug.cjs → vue-ui-3d-bar-BGVLnjCh.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-L6JZrkbq.js → vue-ui-3d-bar-OzzLYbUl.js} +9 -9
- package/dist/{vue-ui-accordion-C8xohumC.cjs → vue-ui-accordion-CRVWlHxs.cjs} +1 -1
- package/dist/{vue-ui-accordion-C2pYIHIH.js → vue-ui-accordion-lF7yVkiT.js} +3 -3
- package/dist/{vue-ui-age-pyramid-CSCtiUKQ.js → vue-ui-age-pyramid-5Vj8AtW1.js} +10 -10
- package/dist/{vue-ui-age-pyramid-CRXWyh5c.cjs → vue-ui-age-pyramid-Cv0Rddsx.cjs} +1 -1
- package/dist/{vue-ui-annotator-5Mjqr97s.js → vue-ui-annotator-BmO78L3H.js} +1 -1
- package/dist/{vue-ui-annotator-DIETLcfO.cjs → vue-ui-annotator-D8Hx1BFF.cjs} +1 -1
- package/dist/{vue-ui-bullet-B5MHoDHB.cjs → vue-ui-bullet-C0Q2Vs5p.cjs} +1 -1
- package/dist/{vue-ui-bullet-C6EHD4J1.js → vue-ui-bullet-DwFD41hN.js} +8 -8
- package/dist/{vue-ui-candlestick-BrJoYH2t.js → vue-ui-candlestick-By609gwn.js} +11 -11
- package/dist/{vue-ui-candlestick-CYMynB3E.cjs → vue-ui-candlestick-C7kRHFF3.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-ZPuYe12-.cjs → vue-ui-carousel-table-1_Hy8sGL.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-BtNgnJg3.js → vue-ui-carousel-table-wwMoteEN.js} +4 -4
- package/dist/{vue-ui-chestnut-C1en00jI.cjs → vue-ui-chestnut-D3LGylRp.cjs} +1 -1
- package/dist/{vue-ui-chestnut-BGyD7s_L.js → vue-ui-chestnut-hqorA5EW.js} +8 -8
- package/dist/{vue-ui-cursor-BP38xePQ.cjs → vue-ui-cursor-BCg5VZUb.cjs} +1 -1
- package/dist/{vue-ui-cursor-DR2RWF24.js → vue-ui-cursor-GSkn7N7Z.js} +2 -2
- package/dist/{vue-ui-dashboard-BYygSPuJ.cjs → vue-ui-dashboard-Bkm9bcAc.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BpOAi1fs.js → vue-ui-dashboard-DIoYWyXB.js} +2 -2
- package/dist/{vue-ui-digits-C7sdWmoo.cjs → vue-ui-digits-CpBBTAI9.cjs} +1 -1
- package/dist/{vue-ui-digits-DNrXa7E_.js → vue-ui-digits-niqTltAv.js} +2 -2
- package/dist/{vue-ui-donut-BbBw5pWR.cjs → vue-ui-donut-CQEOtlxM.cjs} +1 -1
- package/dist/{vue-ui-donut-95iv1pkT.js → vue-ui-donut-DfufBrkk.js} +11 -11
- package/dist/{vue-ui-donut-evolution-DpECkYLY.cjs → vue-ui-donut-evolution-Dg_XJyX8.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-BneXLHZF.js → vue-ui-donut-evolution-XQp6R0e_.js} +11 -11
- package/dist/{vue-ui-dumbbell-B_T3Hlzb.js → vue-ui-dumbbell-DSS8sHHU.js} +10 -10
- package/dist/{vue-ui-dumbbell-lnqC1mak.cjs → vue-ui-dumbbell-RAkNYRoJ.cjs} +1 -1
- package/dist/{vue-ui-flow-PsQyq54b.js → vue-ui-flow-BBNuPVgI.js} +9 -9
- package/dist/{vue-ui-flow-DgsufNuK.cjs → vue-ui-flow-BUmSGSmR.cjs} +1 -1
- package/dist/{vue-ui-funnel-Cz5qLXEC.cjs → vue-ui-funnel-B9HR0owO.cjs} +1 -1
- package/dist/{vue-ui-funnel-CxZYQkNb.js → vue-ui-funnel-BDGggRXE.js} +8 -8
- package/dist/{vue-ui-galaxy-4EZM6VGD.js → vue-ui-galaxy-6Odi2CwM.js} +11 -11
- package/dist/{vue-ui-galaxy-C97nWRvH.cjs → vue-ui-galaxy-DmsMWB1a.cjs} +1 -1
- package/dist/{vue-ui-gauge-CFy3oMIA.js → vue-ui-gauge-DeYvNVnR.js} +7 -7
- package/dist/{vue-ui-gauge-BC0zGvqM.cjs → vue-ui-gauge-Dvv0v56Z.cjs} +1 -1
- package/dist/{vue-ui-gizmo-BQlJhilX.js → vue-ui-gizmo-BcAr2dTN.js} +3 -3
- package/dist/{vue-ui-gizmo-BUfBljdr.cjs → vue-ui-gizmo-DXQt_8D0.cjs} +1 -1
- package/dist/{vue-ui-heatmap-Dyz8arCQ.js → vue-ui-heatmap-Btm1mK6D.js} +10 -10
- package/dist/{vue-ui-heatmap-zi279cjp.cjs → vue-ui-heatmap-DZ02dS5q.cjs} +1 -1
- package/dist/{vue-ui-history-plot-BXZTRkzT.cjs → vue-ui-history-plot-DPQWcN0P.cjs} +1 -1
- package/dist/{vue-ui-history-plot-1KwhLYwx.js → vue-ui-history-plot-OY6N31Ka.js} +11 -11
- package/dist/{vue-ui-kpi-BsjkNZZH.cjs → vue-ui-kpi-CQIbWQMk.cjs} +1 -1
- package/dist/{vue-ui-kpi-DjLKxPTS.js → vue-ui-kpi-D5oNUDVm.js} +3 -3
- package/dist/{vue-ui-mini-loader-Be51Zm_Q.js → vue-ui-mini-loader-BjqV22Co.js} +2 -2
- package/dist/{vue-ui-mini-loader-UKOzmxaD.cjs → vue-ui-mini-loader-ByDKGMAp.cjs} +1 -1
- package/dist/{vue-ui-molecule-wgNYpLlg.cjs → vue-ui-molecule-C8O_ViVy.cjs} +1 -1
- package/dist/{vue-ui-molecule-DUQo9_oj.js → vue-ui-molecule-FsLf3YTj.js} +11 -11
- package/dist/{vue-ui-mood-radar-D260gFQ-.js → vue-ui-mood-radar-31BX-GNG.js} +11 -11
- package/dist/{vue-ui-mood-radar-D-sMgA1m.cjs → vue-ui-mood-radar-4u98wGWl.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-Ccz2llkz.js → vue-ui-nested-donuts-BMJW2oHk.js} +11 -11
- package/dist/{vue-ui-nested-donuts-DCATiNcn.cjs → vue-ui-nested-donuts-BPc_OBoe.cjs} +1 -1
- package/dist/{vue-ui-onion-4nwZ2Xcq.js → vue-ui-onion-BUpGgnWA.js} +11 -11
- package/dist/{vue-ui-onion-jbgqZma_.cjs → vue-ui-onion-IhkIHn1A.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-b9zBOm3l.js → vue-ui-parallel-coordinate-plot-9I00rQEM.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-D8tDqhAC.cjs → vue-ui-parallel-coordinate-plot-DzjggyLA.cjs} +1 -1
- package/dist/{vue-ui-quadrant-DyhFsYAn.js → vue-ui-quadrant-CEmoMAL7.js} +12 -12
- package/dist/{vue-ui-quadrant-BPbKAs_R.cjs → vue-ui-quadrant-EZqQ-7Ev.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-BjjeoplC.cjs → vue-ui-quick-chart-BKUUR-A1.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-kBVlNtAe.js → vue-ui-quick-chart-T_oeRTqY.js} +9 -9
- package/dist/{vue-ui-radar-WzkdQND3.js → vue-ui-radar-DG_Zir8w.js} +12 -12
- package/dist/{vue-ui-radar-Cax_LlVW.cjs → vue-ui-radar-QBwo6ybW.cjs} +1 -1
- package/dist/{vue-ui-rating-W2x5oPbH.cjs → vue-ui-rating-Juprijdi.cjs} +1 -1
- package/dist/{vue-ui-rating-BLj-bxOZ.js → vue-ui-rating-gswAA28b.js} +2 -2
- package/dist/{vue-ui-relation-circle-BC09Wo74.cjs → vue-ui-relation-circle-BWX8zrfH.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-Cy7KZjJK.js → vue-ui-relation-circle-DtnXrnOP.js} +7 -7
- package/dist/{vue-ui-rings-B2r_HrM3.js → vue-ui-rings-D3g-ORch.js} +11 -11
- package/dist/{vue-ui-rings-BEBxWNzs.cjs → vue-ui-rings-Damuv7g9.cjs} +1 -1
- package/dist/{vue-ui-scatter-BzsoN90E.js → vue-ui-scatter-DBO-XViT.js} +12 -12
- package/dist/{vue-ui-scatter-EbhOyS1b.cjs → vue-ui-scatter-RUeAe7Sx.cjs} +1 -1
- package/dist/{vue-ui-screenshot-BNvphTTn.cjs → vue-ui-screenshot-3MDyr6v3.cjs} +1 -1
- package/dist/{vue-ui-screenshot-D-CteYvP.js → vue-ui-screenshot-K0a-DVD6.js} +1 -1
- package/dist/{vue-ui-skeleton-Dm5B1MER.js → vue-ui-skeleton-CWjNNx-k.js} +3 -3
- package/dist/{vue-ui-skeleton-G8jk4hcj.cjs → vue-ui-skeleton-DUNkS05l.cjs} +1 -1
- package/dist/{vue-ui-smiley-DQYXvPr4.cjs → vue-ui-smiley-Cbqg-N-L.cjs} +1 -1
- package/dist/{vue-ui-smiley-H4VJmgZj.js → vue-ui-smiley-MwX1c6qK.js} +2 -2
- package/dist/{vue-ui-spark-trend-DA096qRZ.cjs → vue-ui-spark-trend-CN5JUPhn.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-t_PBPjL2.js → vue-ui-spark-trend-D9eWTtbE.js} +5 -5
- package/dist/{vue-ui-sparkbar-xh4kHNcW.js → vue-ui-sparkbar-CPF7YNDd.js} +4 -4
- package/dist/{vue-ui-sparkbar-Bx-gf5Hz.cjs → vue-ui-sparkbar-IphZ8jXh.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-BfVnT-Cl.js → vue-ui-sparkgauge-B29V7ZTv.js} +4 -4
- package/dist/{vue-ui-sparkgauge--atMedaJ.cjs → vue-ui-sparkgauge-BRMGqR9Z.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-BHE8M9AE.js → vue-ui-sparkhistogram-BJTgOWF5.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-zunUFhA0.cjs → vue-ui-sparkhistogram-rvYaVHmw.cjs} +1 -1
- package/dist/{vue-ui-sparkline-CvxWwt_w.cjs → vue-ui-sparkline-BI9jqI0h.cjs} +1 -1
- package/dist/{vue-ui-sparkline-B6SKeGhK.js → vue-ui-sparkline-DX79otAB.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-Bhd7EKGG.cjs → vue-ui-sparkstackbar-DuollcwK.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-B_KMgwOl.js → vue-ui-sparkstackbar-vP28A6AT.js} +5 -5
- package/dist/{vue-ui-stackbar-suSeRgaG.cjs → vue-ui-stackbar-BumFmZZF.cjs} +1 -1
- package/dist/{vue-ui-stackbar-C_P0JG4w.js → vue-ui-stackbar-DnJEgIaA.js} +12 -12
- package/dist/{vue-ui-strip-plot-BUA3moHw.js → vue-ui-strip-plot-DqcHBwd_.js} +11 -11
- package/dist/{vue-ui-strip-plot-CWMQUeOe.cjs → vue-ui-strip-plot-DupREfRd.cjs} +1 -1
- package/dist/{vue-ui-table-BYmYQISh.cjs → vue-ui-table-BMJ0I5nr.cjs} +1 -1
- package/dist/{vue-ui-table-BcFkS1Cj.js → vue-ui-table-D8cgqIJl.js} +1 -1
- package/dist/{vue-ui-table-heatmap-JK93Wb5V.cjs → vue-ui-table-heatmap-D43pTFli.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-Bvt_J2PP.js → vue-ui-table-heatmap-D4qeClXn.js} +4 -4
- package/dist/vue-ui-table-sparkline-B7OPOium.cjs +1 -0
- package/dist/{vue-ui-table-sparkline-CFqGNvWi.js → vue-ui-table-sparkline-B_Po0RuC.js} +204 -194
- package/dist/{vue-ui-thermometer-Dm0ttenA.js → vue-ui-thermometer-C6nfW6uY.js} +7 -7
- package/dist/{vue-ui-thermometer-Dh844EJO.cjs → vue-ui-thermometer-CaV3JF3h.cjs} +1 -1
- package/dist/{vue-ui-timer-CaFTEmwe.js → vue-ui-timer-CfwmMRdZ.js} +5 -5
- package/dist/{vue-ui-timer-LypwXXDJ.cjs → vue-ui-timer-ldINTqND.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-CFgv3kS8.cjs → vue-ui-tiremarks-BlyxL_IU.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-Bgm_MUY2.js → vue-ui-tiremarks-iNKMnu3P.js} +7 -7
- package/dist/{vue-ui-treemap-CERIO7kA.js → vue-ui-treemap-CwMnkcOi.js} +11 -11
- package/dist/{vue-ui-treemap--2oLnl5Z.cjs → vue-ui-treemap-YdRDlSHA.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-BErNHsoK.js → vue-ui-vertical-bar-BZR4YOLh.js} +11 -11
- package/dist/{vue-ui-vertical-bar-B6P0pW6h.cjs → vue-ui-vertical-bar-Bji3-X8i.cjs} +1 -1
- package/dist/{vue-ui-waffle-DwXtzgfk.js → vue-ui-waffle-D2BccJmB.js} +11 -11
- package/dist/{vue-ui-waffle-BlsD3mo7.cjs → vue-ui-waffle-rO_LJaHR.cjs} +1 -1
- package/dist/{vue-ui-wheel-Bnlv4BkN.cjs → vue-ui-wheel-BTrpdV-C.cjs} +1 -1
- package/dist/{vue-ui-wheel-C57mnBKi.js → vue-ui-wheel-GqWFopE1.js} +7 -7
- package/dist/{vue-ui-word-cloud-MQ4ipLvb.cjs → vue-ui-word-cloud-DD-pKUen.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-C9dIGLRl.js → vue-ui-word-cloud-DiG8DHOr.js} +10 -10
- package/dist/{vue-ui-xy-BLxO3c8J.cjs → vue-ui-xy-C32KNdyx.cjs} +1 -1
- package/dist/{vue-ui-xy-t9BzKivu.js → vue-ui-xy-DicLnkBA.js} +14 -14
- package/dist/{vue-ui-xy-canvas-xlIskwwx.cjs → vue-ui-xy-canvas-9e630nJX.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-RNuxMqDq.js → vue-ui-xy-canvas-D6CYL9A8.js} +11 -11
- package/package.json +1 -1
- package/dist/index-DOkp6I9s.cjs +0 -9
- package/dist/vue-ui-table-sparkline-B7_CaLRt.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./useNestedProp-CwpqC_aE.cjs"),n=require("./index-BHQZE19X.cjs"),m=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=["xmlns","viewBox"],C={key:0},_=["stroke"],h=["stroke"],M=["stroke"],y={key:1},B=["stroke"],f={key:2},L=["stroke"],b={__name:"vue-ui-mini-loader",props:{config:{type:Object,default(){return{}}}},setup(u){const a=u;e.useCssVars(k=>({"221651ee":c.value,d11bae38:d.value,d85c00de:p.value}));const{vue_ui_mini_loader:i}=n.useConfig(),t=e.computed(()=>v.useNestedProp({userConfig:a.config,defaultConfig:i})),s=e.ref({onion:"-10 -10 84 84",line:"-10 -10 112 84",bar:"-10 -10 106 84"}),r=e.computed(()=>({gutter:`stroke:${t.value.line.gutterColor};opacity:${t.value.line.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.line.gutterBlur}px);`})),l=e.computed(()=>({gutter:`stroke:${t.value.bar.gutterColor};opacity:${t.value.bar.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.bar.gutterBlur}px);`})),o=e.computed(()=>({gutter:`stroke:${t.value.onion.gutterColor};opacity:${t.value.onion.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.onion.gutterBlur}px);`})),c=e.computed(()=>`blur(${t.value.onion.trackBlur}px) hue-rotate(${t.value.onion.trackHueRotate}deg)`),d=e.computed(()=>`blur(${t.value.line.trackBlur}px) hue-rotate(${t.value.line.trackHueRotate}deg)`),p=e.computed(()=>`blur(${t.value.bar.trackBlur}px) hue-rotate(${t.value.bar.trackHueRotate}deg)`);return(k,x)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(n.XMLNS),viewBox:s.value[t.value.type],style:{background:"transparent"},width:"100%"},[t.value.type==="onion"?(e.openBlock(),e.createElementBlock("g",C,[e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,_),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,h),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,M)])):e.createCommentVNode("",!0),t.value.type==="line"?(e.openBlock(),e.createElementBlock("g",y,[e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(r.value.gutter+r.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5",stroke:t.value.line.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"line-animated"},null,8,B)])):e.createCommentVNode("",!0),t.value.type==="bar"?(e.openBlock(),e.createElementBlock("g",f,[e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(l.value.gutter+l.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5",stroke:t.value.bar.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"bar-animated"},null,8,L)])):e.createCommentVNode("",!0)],8,g))}},N=m._export_sfc(b,[["__scopeId","data-v-20f54e0e"]]);exports.default=N;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("./index-DOkp6I9s.cjs"),Se=require("./Title-CbiI2XAK.cjs"),ce=require("./usePrinter-Hc-LICQf.cjs"),Ve=require("./DataTable-UQDVIoTq.cjs"),Re=require("./Tooltip-CXWymtVK.cjs"),z=require("./BaseIcon-CqZOJaZ7.cjs"),Le=require("./vue-ui-skeleton-G8jk4hcj.cjs"),ze=require("./vue-ui-accordion-C8xohumC.cjs"),de=require("./useNestedProp-BEjpLG7g.cjs"),Me=require("./PackageVersion-JL2H1ZNU.cjs"),De=require("./PenAndPaper-Bmfl9PVt.cjs"),Ue=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ae=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Ie={__name:"RecursiveCircles",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null},linkColor:{type:String,default:"#CCCCCC"},stroke:{type:String,default:"#FFFFFF"},strokeHovered:{type:String,default:"#000000"}},emits:["zoom","hover"],setup(r,{emit:g}){const h=r;function u(a){g("zoom",a)}function c(a){g("hover",a)}return e.toRef(h,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(d=>{d.ancestor=a})}),(a,d)=>{const C=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,v=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.polygonPath&&v.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.polygonPath.coordinates,(w,M)=>(e.openBlock(),e.createElementBlock("circle",{cx:w.x,cy:w.y,r:v.circleRadius,fill:`url(#gradient_${v.color})`,stroke:r.hoveredUid&&r.hoveredUid===v.uid?r.strokeHovered:r.stroke,"stroke-width":r.hoveredUid&&r.hoveredUid===v.uid?v.circleRadius/6:v.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(x=>u(v),["stop"]),onMouseover:x=>c(v),onMouseleave:d[0]||(d[0]=x=>c(null))},null,40,Ae))),256)),v.nodes&&v.nodes.length>0?(e.openBlock(),e.createBlock(C,{key:0,dataset:v.nodes,color:r.color,stroke:r.stroke,strokeHovered:r.strokeHovered,hoveredUid:r.hoveredUid,onZoom:u,onHover:c},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Oe=["x1","y1","x2","y2","stroke","stroke-width"],He=["x1","y1","x2","y2","stroke","stroke-width"],qe={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(r){const g=r;return e.toRef(g,"dataset").value.forEach(u=>{u.nodes&&u.nodes.length>0&&u.nodes.forEach(c=>{c.ancestor=u})}),(u,c)=>{const B=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.polygonPath.coordinates,(d,C)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.ancestor&&a.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:d.x,y1:d.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:r.backgroundColor,"stroke-width":a.circleRadius/1.5},null,8,Oe),e.createElementVNode("line",{x1:d.x,y1:d.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:r.color,"stroke-width":a.circleRadius/2},null,8,He)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.nodes&&a.nodes.length>0?(e.openBlock(),e.createBlock(B,{key:0,dataset:a.nodes,color:r.color,backgroundColor:r.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},je=["x","y","fill","font-size"],Ge={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(r,{emit:g}){const h=r;return e.toRef(h,"dataset").value.forEach(c=>{c.nodes&&c.nodes.length>0&&c.nodes.forEach(B=>{B.ancestor=c})}),(c,B)=>{const a=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,d=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[d.polygonPath&&d.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.polygonPath.coordinates,C=>(e.openBlock(),e.createElementBlock("text",{x:C.x,y:C.y+d.circleRadius*2,fill:r.color,"font-size":d.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(d.name),9,je))),256)),d.nodes&&d.nodes.length>0?(e.openBlock(),e.createBlock(a,{key:0,dataset:d.nodes,color:r.color,hoveredUid:r.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Xe={style:{position:"relative",height:"100%",width:"100%"}},Ye={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(r,{emit:g}){return(h,u)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`position: ${r.isFullscreen?"fixed":"absolute"};bottom:0;right:${r.isFullscreen?"12px":"0"};width:80px;height:80px`),"data-html2canvas-ignore":""},[e.createElementVNode("div",Xe,[e.createElementVNode("button",{onClick:u[0]||(u[0]=e.withModifiers(c=>g("moveLeft"),["stop"])),style:{position:"absolute",left:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowLeft",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[1]||(u[1]=e.withModifiers(c=>g("moveTop"),["stop"])),style:{position:"absolute",top:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowTop",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[2]||(u[2]=e.withModifiers(c=>g("moveRight"),["stop"])),style:{position:"absolute",right:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowRight",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[3]||(u[3]=e.withModifiers(c=>g("moveBottom"),["stop"])),style:{position:"absolute",bottom:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowBottom",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[4]||(u[4]=e.withModifiers(c=>g("reset"),["stop"])),style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"close",style:{cursor:"pointer"},strokeWidth:2},null,8,["stroke"])])])],4))}},We=["id"],Ze={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},Je={key:2,style:"width:100%;background:transparent;"},Ke=["xmlns","viewBox"],Qe=["id"],_e=["stop-color"],et=["stop-color"],tt={key:6,class:"vue-data-ui-watermark"},ot={key:8,ref:"source",dir:"auto"},lt=["innerHTML"],nt={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(r,{expose:g}){const h=r,{vue_ui_molecule:u}=m.useConfig(),c=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{B()});function B(){m.objectIsEmpty(h.dataset)&&m.error({componentName:"VueUiMolecule",type:"dataset"})}const a=e.ref(m.createUid()),d=e.ref(null),C=e.ref(!1),v=e.ref(""),w=e.ref(null),M=e.ref(null),x=e.ref(!1),y=e.ref(null),W=e.ref(null),A=e.ref(0),Z=e.ref(0),J=e.ref(0),o=e.computed({get:()=>K(),set:t=>t});function K(){const t=de.useNestedProp({userConfig:h.config,defaultConfig:u});return t.theme?{...de.useNestedProp({userConfig:m.themes.vue_ui_molecule[t.theme]||h.config,defaultConfig:t}),customPalette:m.themePalettes[t.theme]||m.palette}:t}e.watch(()=>h.config,t=>{o.value=K(),B(),Z.value+=1,J.value+=1},{deep:!0});const{isPrinting:Q,isImaging:_,generatePdf:ee,generateImage:te}=ce.usePrinter({elementId:`cluster_${a.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),ve=e.computed(()=>o.value.userOptions.show&&!o.value.style.chart.title.text),pe=e.computed(()=>m.convertCustomPalette(o.value.customPalette)),k=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function oe(t,n=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?oe(t[0].nodes,n+1):n}function fe(){const t=oe(h.dataset);let n=100,l=n;for(let i=0;i<t;i+=1)n/=1,l+=n;return{height:l,width:l}}const $=e.ref(fe()),I=e.ref(`0 0 ${$.value.width} ${$.value.height}`);function le(t,n={x:-$.value.width/2.43,y:$.value.height/2},l=$.value.width/1.1,i=24,s=0,p=0,V="#BBBBBB"){if(t&&t.length>0){const X=m.createPolygonPath({plot:n,radius:l,sides:t.length,rotation:s});t.forEach((f,F)=>{const R=X.coordinates[F];let P;if(f.ancestor?f.ancestor.ancestor?P=f.ancestor.color||V:(P=pe.value[p]||m.palette[p]||V,p+=1):P=V,f.polygonPath={coordinates:[R]},f.circleRadius=i,f.color=P,f.uid=m.createUid(),f.nodes&&f.nodes.length>0){const Y=!f.ancestor||!f.ancestor.ancestor?p:0;f.nodes=le(f.nodes,R,l/2.9,i/2.2,s+Math.PI*F/f.nodes.length,Y,P)}})}return t}function me(t){const n=new Set;function l(s){s.forEach(p=>{p.color&&!n.has(p.color)&&n.add(p.color),p.nodes&&p.nodes.length>0&&l(p.nodes)})}l(t);const i={};return Array.from(n).forEach((s,p)=>{i[s]=`gradient_${p}`}),i}const he=e.computed(()=>me(b.value)),b=e.computed(()=>le(h.dataset));function O(){x.value=!1,M.value=null,W.value=null,y.value=null,q({polygonPath:{coordinates:[{x:$.value.width/2,y:$.value.height/2}]},circleRadius:24})}const H=e.ref(null);function q(t){w.value.focus(),e.nextTick(()=>{H.value&&cancelAnimationFrame(H.value);const n=I.value.split(" "),l=parseFloat(n[0]),i=parseFloat(n[1]),s=parseFloat(n[2]),p=parseFloat(n[3]),{x:V,y:X}=t.polygonPath.coordinates[0],{circleRadius:f}=t,F=8.34,R=V-f*F,P=X-f*F,Y=f*F*2,$e=f*F*2,Pe=Math.sqrt((R-l)**2+(P-i)**2),L=Math.min(1200,Math.max(20,Math.floor(Pe/10))),Fe=(R-l)/L,Ne=(P-i)/L,Te=(Y-s)/L,Ee=($e-p)/L;let E=0;function ue(){I.value=`${l+Fe*E} ${i+Ne*E} ${s+Te*E} ${p+Ee*E}`,E+=o.value.style.chart.zoom.speed,E<=L&&(H.value=requestAnimationFrame(ue))}ue()})}function ge(t){M.value===t.uid?O():(M.value=t.uid,W.value=t,y.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},q(t),x.value=t.uid!==b.value[0].uid)}function ye(t){if(t.target.nodeName!=="circle")O(),x.value=!1;else return}const j=e.ref(null);function ke(t){j.value={datapoint:t,seriesIndex:-1,series:b.value,config:o.value};const n=o.value.style.chart.tooltip.customFormat;if(m.isFunction(n)&&m.functionReturnsString(()=>n({seriesIndex:-1,datapoint:t,series:b.value,config:o.value})))v.value=n({seriesIndex:-1,datapoint:t,series:b.value,config:o.value});else{let l="";l+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`,t.details&&(l+=`<div style="width:100%;border-top:1px solid ${o.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`),v.value=`<div style="font-family:inherit">${l}</div>`}}const ne=e.ref(null),S=e.ref(null);function be(t){ne.value=t,t?(C.value=!0,ke(t),S.value=t.uid):(C.value=!1,v.value="",S.value=null)}function D(t){t==="right"&&(y.value.polygonPath.coordinates[0].x+=y.value.circleRadius),t==="left"&&(y.value.polygonPath.coordinates[0].x-=y.value.circleRadius),t==="top"&&(y.value.polygonPath.coordinates[0].y-=y.value.circleRadius),t==="bottom"&&(y.value.polygonPath.coordinates[0].y+=y.value.circleRadius),q(y.value)}function Ce(t){const n=[];function l(i){i.forEach(s=>{const p={name:s.name,details:s.details||"-",ancestor:s.ancestor&&s.ancestor.name||"-",color:s.color||""};n.push(p),s.nodes&&s.nodes.length>0&&l(s.nodes,s.name)})}return l(t),n}const Be=e.computed(()=>Ce(b.value)),N=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],n=Be.value.map((s,p)=>[{color:s.color,name:s.name},s.details,s.ancestor||""]),l={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint},i=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor];return{head:t,body:n,config:l,colNames:i}});function re(){e.nextTick(()=>{const t=N.value.body.map((i,s)=>[[i[0].name],[i[1]],[i[2]]]),n=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(t),l=m.createCsvContent(n);m.downloadCsv({csvContent:l,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function we(){return b.value}const T=e.ref(!1);function xe(t){T.value=t,A.value+=1}function ae(){k.value.showTable=!k.value.showTable}function se(){k.value.showDataLabels=!k.value.showDataLabels}function ie(){k.value.showTooltip=!k.value.showTooltip}const U=e.ref(!1);function G(){U.value=!U.value}return g({getData:we,generatePdf:ee,generateCsv:re,generateImage:te,toggleTable:ae,toggleLabels:se,toggleTooltip:ie,toggleAnnotator:G}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{onMouseleave:n[7]||(n[7]=l=>{ne.value=null,S.value=null}),ref_key:"moleculeChart",ref:w,class:e.normalizeClass(`vue-ui-molecule ${T.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`cluster_${a.value}`},[o.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(De.PenAndPaper,{key:0,parent:w.value,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,active:U.value,onClose:G},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ve.value?(e.openBlock(),e.createElementBlock("div",Ze,null,512)):e.createCommentVNode("",!0),o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Je,[(e.openBlock(),e.createBlock(Se._sfc_main,{key:`title_${Z.value}`,config:{title:{cy:"molecule-div-title",...o.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),o.value.userOptions.show&&c.value?(e.openBlock(),e.createBlock(ce.UserOptions,{ref_key:"details",ref:d,key:`user_options_${A.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(Q),isImaging:e.unref(_),uid:a.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasLabel:o.value.userOptions.buttons.labels,hasFullscreen:o.value.userOptions.buttons.fullscreen,isTooltip:k.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:w.value,position:o.value.userOptions.position,hasAnnotator:o.value.userOptions.buttons.annotator,isAnnotation:U.value,onToggleFullscreen:xe,onGeneratePdf:e.unref(ee),onGenerateCsv:re,onGenerateImage:e.unref(te),onToggleTable:ae,onToggleLabels:se,onToggleTooltip:ie,onToggleAnnotator:G},e.createSlots({_:2},[t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:i})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"6"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:i})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:i})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(m.XMLNS),viewBox:I.value,class:e.normalizeClass({"vue-data-ui-fullscreen--on":T.value,"vue-data-ui-fulscreen--off":!T.value}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${o.value.style.chart.color}`),onClick:n[0]||(n[0]=e.withModifiers(l=>ye(l),["stop"]))},[e.createVNode(Me._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(he.value),l=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${l}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(m.lightenHexColor)(l,.5)},null,8,_e),e.createElementVNode("stop",{offset:"100%","stop-color":l},null,8,et)],8,Qe))),256))]),e.createVNode(qe,{dataset:b.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Ie,{dataset:b.value,hoveredUid:S.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:ge,onHover:be},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),k.value.showDataLabels?(e.openBlock(),e.createBlock(Ge,{key:0,dataset:b.value,color:o.value.style.chart.color,hoveredUid:S.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:$.value},void 0,!0)],14,Ke)):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(Ye,{key:`direction_pad_${A.value}`,color:o.value.style.chart.color,isFullscreen:T.value,onMoveLeft:n[1]||(n[1]=l=>D("left")),onMoveRight:n[2]||(n[2]=l=>D("right")),onMoveTop:n[3]||(n[3]=l=>D("top")),onMoveBottom:n[4]||(n[4]=l=>D("bottom")),onReset:n[5]||(n[5]=l=>{O(),x.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",tt,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Q)||e.unref(_)})),void 0,!0)])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Le.default,{key:7,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),t.$slots.source?(e.openBlock(),e.createElementBlock("div",ot,[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Re._sfc_main,{show:k.value.showTooltip&&C.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,fontSize:o.value.style.chart.tooltip.fontSize,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:w.value,content:v.value,isFullscreen:T.value,isCustom:o.value.style.chart.tooltip.customFormat&&typeof o.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),c.value?(e.openBlock(),e.createBlock(ze.default,{key:9,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ve.DataTable,{key:`table_${J.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:n[6]||(n[6]=l=>k.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,lt)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,We))}},rt=Ue._export_sfc(nt,[["__scopeId","data-v-33b704cf"]]);exports.default=rt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("./index-BHQZE19X.cjs"),Se=require("./Title-5Vedk01J.cjs"),ce=require("./usePrinter-DVgxBO4o.cjs"),Ve=require("./DataTable-kMUhutQ4.cjs"),Re=require("./Tooltip-DjCKBAC4.cjs"),z=require("./BaseIcon-2ZD3jgGz.cjs"),Le=require("./vue-ui-skeleton-DUNkS05l.cjs"),ze=require("./vue-ui-accordion-CRVWlHxs.cjs"),de=require("./useNestedProp-CwpqC_aE.cjs"),Me=require("./PackageVersion-rnWHRWGI.cjs"),De=require("./PenAndPaper-BQl9-uX0.cjs"),Ue=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ae=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Ie={__name:"RecursiveCircles",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null},linkColor:{type:String,default:"#CCCCCC"},stroke:{type:String,default:"#FFFFFF"},strokeHovered:{type:String,default:"#000000"}},emits:["zoom","hover"],setup(r,{emit:g}){const h=r;function u(a){g("zoom",a)}function c(a){g("hover",a)}return e.toRef(h,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(d=>{d.ancestor=a})}),(a,d)=>{const C=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,v=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.polygonPath&&v.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.polygonPath.coordinates,(w,M)=>(e.openBlock(),e.createElementBlock("circle",{cx:w.x,cy:w.y,r:v.circleRadius,fill:`url(#gradient_${v.color})`,stroke:r.hoveredUid&&r.hoveredUid===v.uid?r.strokeHovered:r.stroke,"stroke-width":r.hoveredUid&&r.hoveredUid===v.uid?v.circleRadius/6:v.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(x=>u(v),["stop"]),onMouseover:x=>c(v),onMouseleave:d[0]||(d[0]=x=>c(null))},null,40,Ae))),256)),v.nodes&&v.nodes.length>0?(e.openBlock(),e.createBlock(C,{key:0,dataset:v.nodes,color:r.color,stroke:r.stroke,strokeHovered:r.strokeHovered,hoveredUid:r.hoveredUid,onZoom:u,onHover:c},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Oe=["x1","y1","x2","y2","stroke","stroke-width"],He=["x1","y1","x2","y2","stroke","stroke-width"],qe={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(r){const g=r;return e.toRef(g,"dataset").value.forEach(u=>{u.nodes&&u.nodes.length>0&&u.nodes.forEach(c=>{c.ancestor=u})}),(u,c)=>{const B=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.polygonPath.coordinates,(d,C)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.ancestor&&a.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:d.x,y1:d.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:r.backgroundColor,"stroke-width":a.circleRadius/1.5},null,8,Oe),e.createElementVNode("line",{x1:d.x,y1:d.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:r.color,"stroke-width":a.circleRadius/2},null,8,He)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.nodes&&a.nodes.length>0?(e.openBlock(),e.createBlock(B,{key:0,dataset:a.nodes,color:r.color,backgroundColor:r.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},je=["x","y","fill","font-size"],Ge={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(r,{emit:g}){const h=r;return e.toRef(h,"dataset").value.forEach(c=>{c.nodes&&c.nodes.length>0&&c.nodes.forEach(B=>{B.ancestor=c})}),(c,B)=>{const a=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,d=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[d.polygonPath&&d.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.polygonPath.coordinates,C=>(e.openBlock(),e.createElementBlock("text",{x:C.x,y:C.y+d.circleRadius*2,fill:r.color,"font-size":d.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(d.name),9,je))),256)),d.nodes&&d.nodes.length>0?(e.openBlock(),e.createBlock(a,{key:0,dataset:d.nodes,color:r.color,hoveredUid:r.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Xe={style:{position:"relative",height:"100%",width:"100%"}},Ye={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(r,{emit:g}){return(h,u)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`position: ${r.isFullscreen?"fixed":"absolute"};bottom:0;right:${r.isFullscreen?"12px":"0"};width:80px;height:80px`),"data-html2canvas-ignore":""},[e.createElementVNode("div",Xe,[e.createElementVNode("button",{onClick:u[0]||(u[0]=e.withModifiers(c=>g("moveLeft"),["stop"])),style:{position:"absolute",left:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowLeft",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[1]||(u[1]=e.withModifiers(c=>g("moveTop"),["stop"])),style:{position:"absolute",top:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowTop",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[2]||(u[2]=e.withModifiers(c=>g("moveRight"),["stop"])),style:{position:"absolute",right:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowRight",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[3]||(u[3]=e.withModifiers(c=>g("moveBottom"),["stop"])),style:{position:"absolute",bottom:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowBottom",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[4]||(u[4]=e.withModifiers(c=>g("reset"),["stop"])),style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"close",style:{cursor:"pointer"},strokeWidth:2},null,8,["stroke"])])])],4))}},We=["id"],Ze={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},Je={key:2,style:"width:100%;background:transparent;"},Ke=["xmlns","viewBox"],Qe=["id"],_e=["stop-color"],et=["stop-color"],tt={key:6,class:"vue-data-ui-watermark"},ot={key:8,ref:"source",dir:"auto"},lt=["innerHTML"],nt={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(r,{expose:g}){const h=r,{vue_ui_molecule:u}=m.useConfig(),c=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{B()});function B(){m.objectIsEmpty(h.dataset)&&m.error({componentName:"VueUiMolecule",type:"dataset"})}const a=e.ref(m.createUid()),d=e.ref(null),C=e.ref(!1),v=e.ref(""),w=e.ref(null),M=e.ref(null),x=e.ref(!1),y=e.ref(null),W=e.ref(null),A=e.ref(0),Z=e.ref(0),J=e.ref(0),o=e.computed({get:()=>K(),set:t=>t});function K(){const t=de.useNestedProp({userConfig:h.config,defaultConfig:u});return t.theme?{...de.useNestedProp({userConfig:m.themes.vue_ui_molecule[t.theme]||h.config,defaultConfig:t}),customPalette:m.themePalettes[t.theme]||m.palette}:t}e.watch(()=>h.config,t=>{o.value=K(),B(),Z.value+=1,J.value+=1},{deep:!0});const{isPrinting:Q,isImaging:_,generatePdf:ee,generateImage:te}=ce.usePrinter({elementId:`cluster_${a.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),ve=e.computed(()=>o.value.userOptions.show&&!o.value.style.chart.title.text),pe=e.computed(()=>m.convertCustomPalette(o.value.customPalette)),k=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function oe(t,n=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?oe(t[0].nodes,n+1):n}function fe(){const t=oe(h.dataset);let n=100,l=n;for(let i=0;i<t;i+=1)n/=1,l+=n;return{height:l,width:l}}const $=e.ref(fe()),I=e.ref(`0 0 ${$.value.width} ${$.value.height}`);function le(t,n={x:-$.value.width/2.43,y:$.value.height/2},l=$.value.width/1.1,i=24,s=0,p=0,V="#BBBBBB"){if(t&&t.length>0){const X=m.createPolygonPath({plot:n,radius:l,sides:t.length,rotation:s});t.forEach((f,F)=>{const R=X.coordinates[F];let P;if(f.ancestor?f.ancestor.ancestor?P=f.ancestor.color||V:(P=pe.value[p]||m.palette[p]||V,p+=1):P=V,f.polygonPath={coordinates:[R]},f.circleRadius=i,f.color=P,f.uid=m.createUid(),f.nodes&&f.nodes.length>0){const Y=!f.ancestor||!f.ancestor.ancestor?p:0;f.nodes=le(f.nodes,R,l/2.9,i/2.2,s+Math.PI*F/f.nodes.length,Y,P)}})}return t}function me(t){const n=new Set;function l(s){s.forEach(p=>{p.color&&!n.has(p.color)&&n.add(p.color),p.nodes&&p.nodes.length>0&&l(p.nodes)})}l(t);const i={};return Array.from(n).forEach((s,p)=>{i[s]=`gradient_${p}`}),i}const he=e.computed(()=>me(b.value)),b=e.computed(()=>le(h.dataset));function O(){x.value=!1,M.value=null,W.value=null,y.value=null,q({polygonPath:{coordinates:[{x:$.value.width/2,y:$.value.height/2}]},circleRadius:24})}const H=e.ref(null);function q(t){w.value.focus(),e.nextTick(()=>{H.value&&cancelAnimationFrame(H.value);const n=I.value.split(" "),l=parseFloat(n[0]),i=parseFloat(n[1]),s=parseFloat(n[2]),p=parseFloat(n[3]),{x:V,y:X}=t.polygonPath.coordinates[0],{circleRadius:f}=t,F=8.34,R=V-f*F,P=X-f*F,Y=f*F*2,$e=f*F*2,Pe=Math.sqrt((R-l)**2+(P-i)**2),L=Math.min(1200,Math.max(20,Math.floor(Pe/10))),Fe=(R-l)/L,Ne=(P-i)/L,Te=(Y-s)/L,Ee=($e-p)/L;let E=0;function ue(){I.value=`${l+Fe*E} ${i+Ne*E} ${s+Te*E} ${p+Ee*E}`,E+=o.value.style.chart.zoom.speed,E<=L&&(H.value=requestAnimationFrame(ue))}ue()})}function ge(t){M.value===t.uid?O():(M.value=t.uid,W.value=t,y.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},q(t),x.value=t.uid!==b.value[0].uid)}function ye(t){if(t.target.nodeName!=="circle")O(),x.value=!1;else return}const j=e.ref(null);function ke(t){j.value={datapoint:t,seriesIndex:-1,series:b.value,config:o.value};const n=o.value.style.chart.tooltip.customFormat;if(m.isFunction(n)&&m.functionReturnsString(()=>n({seriesIndex:-1,datapoint:t,series:b.value,config:o.value})))v.value=n({seriesIndex:-1,datapoint:t,series:b.value,config:o.value});else{let l="";l+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`,t.details&&(l+=`<div style="width:100%;border-top:1px solid ${o.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`),v.value=`<div style="font-family:inherit">${l}</div>`}}const ne=e.ref(null),S=e.ref(null);function be(t){ne.value=t,t?(C.value=!0,ke(t),S.value=t.uid):(C.value=!1,v.value="",S.value=null)}function D(t){t==="right"&&(y.value.polygonPath.coordinates[0].x+=y.value.circleRadius),t==="left"&&(y.value.polygonPath.coordinates[0].x-=y.value.circleRadius),t==="top"&&(y.value.polygonPath.coordinates[0].y-=y.value.circleRadius),t==="bottom"&&(y.value.polygonPath.coordinates[0].y+=y.value.circleRadius),q(y.value)}function Ce(t){const n=[];function l(i){i.forEach(s=>{const p={name:s.name,details:s.details||"-",ancestor:s.ancestor&&s.ancestor.name||"-",color:s.color||""};n.push(p),s.nodes&&s.nodes.length>0&&l(s.nodes,s.name)})}return l(t),n}const Be=e.computed(()=>Ce(b.value)),N=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],n=Be.value.map((s,p)=>[{color:s.color,name:s.name},s.details,s.ancestor||""]),l={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint},i=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor];return{head:t,body:n,config:l,colNames:i}});function re(){e.nextTick(()=>{const t=N.value.body.map((i,s)=>[[i[0].name],[i[1]],[i[2]]]),n=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(t),l=m.createCsvContent(n);m.downloadCsv({csvContent:l,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function we(){return b.value}const T=e.ref(!1);function xe(t){T.value=t,A.value+=1}function ae(){k.value.showTable=!k.value.showTable}function se(){k.value.showDataLabels=!k.value.showDataLabels}function ie(){k.value.showTooltip=!k.value.showTooltip}const U=e.ref(!1);function G(){U.value=!U.value}return g({getData:we,generatePdf:ee,generateCsv:re,generateImage:te,toggleTable:ae,toggleLabels:se,toggleTooltip:ie,toggleAnnotator:G}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{onMouseleave:n[7]||(n[7]=l=>{ne.value=null,S.value=null}),ref_key:"moleculeChart",ref:w,class:e.normalizeClass(`vue-ui-molecule ${T.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`cluster_${a.value}`},[o.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(De.PenAndPaper,{key:0,parent:w.value,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,active:U.value,onClose:G},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ve.value?(e.openBlock(),e.createElementBlock("div",Ze,null,512)):e.createCommentVNode("",!0),o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Je,[(e.openBlock(),e.createBlock(Se._sfc_main,{key:`title_${Z.value}`,config:{title:{cy:"molecule-div-title",...o.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),o.value.userOptions.show&&c.value?(e.openBlock(),e.createBlock(ce.UserOptions,{ref_key:"details",ref:d,key:`user_options_${A.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(Q),isImaging:e.unref(_),uid:a.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasLabel:o.value.userOptions.buttons.labels,hasFullscreen:o.value.userOptions.buttons.fullscreen,isTooltip:k.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:w.value,position:o.value.userOptions.position,hasAnnotator:o.value.userOptions.buttons.annotator,isAnnotation:U.value,onToggleFullscreen:xe,onGeneratePdf:e.unref(ee),onGenerateCsv:re,onGenerateImage:e.unref(te),onToggleTable:ae,onToggleLabels:se,onToggleTooltip:ie,onToggleAnnotator:G},e.createSlots({_:2},[t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:i})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"6"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:i})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:i})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(m.XMLNS),viewBox:I.value,class:e.normalizeClass({"vue-data-ui-fullscreen--on":T.value,"vue-data-ui-fulscreen--off":!T.value}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${o.value.style.chart.color}`),onClick:n[0]||(n[0]=e.withModifiers(l=>ye(l),["stop"]))},[e.createVNode(Me._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(he.value),l=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${l}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(m.lightenHexColor)(l,.5)},null,8,_e),e.createElementVNode("stop",{offset:"100%","stop-color":l},null,8,et)],8,Qe))),256))]),e.createVNode(qe,{dataset:b.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Ie,{dataset:b.value,hoveredUid:S.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:ge,onHover:be},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),k.value.showDataLabels?(e.openBlock(),e.createBlock(Ge,{key:0,dataset:b.value,color:o.value.style.chart.color,hoveredUid:S.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:$.value},void 0,!0)],14,Ke)):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(Ye,{key:`direction_pad_${A.value}`,color:o.value.style.chart.color,isFullscreen:T.value,onMoveLeft:n[1]||(n[1]=l=>D("left")),onMoveRight:n[2]||(n[2]=l=>D("right")),onMoveTop:n[3]||(n[3]=l=>D("top")),onMoveBottom:n[4]||(n[4]=l=>D("bottom")),onReset:n[5]||(n[5]=l=>{O(),x.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",tt,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Q)||e.unref(_)})),void 0,!0)])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Le.default,{key:7,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),t.$slots.source?(e.openBlock(),e.createElementBlock("div",ot,[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Re._sfc_main,{show:k.value.showTooltip&&C.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,fontSize:o.value.style.chart.tooltip.fontSize,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:w.value,content:v.value,isFullscreen:T.value,isCustom:o.value.style.chart.tooltip.customFormat&&typeof o.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),c.value?(e.openBlock(),e.createBlock(ze.default,{key:9,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ve.DataTable,{key:`table_${J.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:n[6]||(n[6]=l=>k.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,lt)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,We))}},rt=Ue._export_sfc(nt,[["__scopeId","data-v-33b704cf"]]);exports.default=rt;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { toRef as ue, resolveComponent as ce, openBlock as a, createElementBlock as r, Fragment as m, renderList as z, withModifiers as M, createBlock as T, createCommentVNode as y, createElementVNode as x, toDisplayString as Ae, normalizeStyle as ie, createVNode as S, computed as O, onMounted as Qe, ref as f, watch as _e, normalizeClass as Fe, unref as U, createSlots as et, withCtx as k, renderSlot as C, normalizeProps as W, guardReactiveProps as q, createTextVNode as tt, nextTick as Re } from "vue";
|
|
2
|
-
import { u as ot, o as lt, e as at, c as Se, t as nt, a as st, p as Le, b as rt, X as it, l as ut, O as ct, q as dt, r as vt, x as ft, y as pt } from "./index-
|
|
3
|
-
import { _ as ht } from "./Title-
|
|
4
|
-
import { u as gt, U as yt } from "./usePrinter-
|
|
5
|
-
import { D as mt } from "./DataTable-
|
|
6
|
-
import { _ as bt } from "./Tooltip-
|
|
7
|
-
import Z from "./BaseIcon-
|
|
8
|
-
import kt from "./vue-ui-skeleton-
|
|
9
|
-
import Ct from "./vue-ui-accordion-
|
|
10
|
-
import { u as De } from "./useNestedProp-
|
|
11
|
-
import { _ as $t } from "./PackageVersion-
|
|
12
|
-
import { P as xt } from "./PenAndPaper-
|
|
2
|
+
import { u as ot, o as lt, e as at, c as Se, t as nt, a as st, p as Le, b as rt, X as it, l as ut, O as ct, q as dt, r as vt, x as ft, y as pt } from "./index-igxqCP2w.js";
|
|
3
|
+
import { _ as ht } from "./Title-DED-PQ7X.js";
|
|
4
|
+
import { u as gt, U as yt } from "./usePrinter-CnZYDQXB.js";
|
|
5
|
+
import { D as mt } from "./DataTable-CO5C8Cmb.js";
|
|
6
|
+
import { _ as bt } from "./Tooltip-CHseiJu8.js";
|
|
7
|
+
import Z from "./BaseIcon-CaYP30Aq.js";
|
|
8
|
+
import kt from "./vue-ui-skeleton-CWjNNx-k.js";
|
|
9
|
+
import Ct from "./vue-ui-accordion-lF7yVkiT.js";
|
|
10
|
+
import { u as De } from "./useNestedProp-CSVnZVwZ.js";
|
|
11
|
+
import { _ as $t } from "./PackageVersion-DYk2hOG1.js";
|
|
12
|
+
import { P as xt } from "./PenAndPaper-BfgS_5ux.js";
|
|
13
13
|
import { _ as wt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
const Pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMouseover"], Tt = {
|
|
15
15
|
__name: "RecursiveCircles",
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { computed as c, onMounted as ge, ref as v, watch as ke, openBlock as r, createElementBlock as y, normalizeClass as Y, normalizeStyle as V, createBlock as h, createCommentVNode as u, createVNode as j, unref as s, createSlots as be, withCtx as f, renderSlot as m, normalizeProps as B, guardReactiveProps as D, createElementVNode as a, Fragment as J, renderList as Q, toDisplayString as M, createTextVNode as Z, nextTick as Ce } from "vue";
|
|
2
|
-
import { u as _e, o as xe, e as ee, c as we, t as $e, O as Me, X as Pe, s as C, w as Ne, P as Ae, i as te, f as O, q as Te, r as Le } from "./index-
|
|
3
|
-
import { _ as Oe } from "./Title-
|
|
4
|
-
import { u as Ie, U as Fe } from "./usePrinter-
|
|
5
|
-
import { L as Se } from "./Legend-
|
|
6
|
-
import P from "./BaseIcon-
|
|
7
|
-
import { D as Ve } from "./DataTable-
|
|
8
|
-
import je from "./vue-ui-skeleton-
|
|
9
|
-
import Be from "./vue-ui-accordion-
|
|
10
|
-
import { u as oe } from "./useNestedProp-
|
|
11
|
-
import { _ as De } from "./PackageVersion-
|
|
12
|
-
import { P as We } from "./PenAndPaper-
|
|
2
|
+
import { u as _e, o as xe, e as ee, c as we, t as $e, O as Me, X as Pe, s as C, w as Ne, P as Ae, i as te, f as O, q as Te, r as Le } from "./index-igxqCP2w.js";
|
|
3
|
+
import { _ as Oe } from "./Title-DED-PQ7X.js";
|
|
4
|
+
import { u as Ie, U as Fe } from "./usePrinter-CnZYDQXB.js";
|
|
5
|
+
import { L as Se } from "./Legend-FZN9UHoI.js";
|
|
6
|
+
import P from "./BaseIcon-CaYP30Aq.js";
|
|
7
|
+
import { D as Ve } from "./DataTable-CO5C8Cmb.js";
|
|
8
|
+
import je from "./vue-ui-skeleton-CWjNNx-k.js";
|
|
9
|
+
import Be from "./vue-ui-accordion-lF7yVkiT.js";
|
|
10
|
+
import { u as oe } from "./useNestedProp-CSVnZVwZ.js";
|
|
11
|
+
import { _ as De } from "./PackageVersion-DYk2hOG1.js";
|
|
12
|
+
import { P as We } from "./PenAndPaper-BfgS_5ux.js";
|
|
13
13
|
import { _ as ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
const Ge = ["id"], Ee = {
|
|
15
15
|
key: 2,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DOkp6I9s.cjs"),Q=require("./Title-CbiI2XAK.cjs"),L=require("./usePrinter-Hc-LICQf.cjs"),Z=require("./Legend-DyQhpUa7.cjs"),f=require("./BaseIcon-CqZOJaZ7.cjs"),ee=require("./DataTable-UQDVIoTq.cjs"),te=require("./vue-ui-skeleton-G8jk4hcj.cjs"),oe=require("./vue-ui-accordion-C8xohumC.cjs"),O=require("./useNestedProp-BEjpLG7g.cjs"),le=require("./PackageVersion-JL2H1ZNU.cjs"),ae=require("./PenAndPaper-Bmfl9PVt.cjs"),re=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ne=["id"],se={key:2,style:"width:100%;background:transparent"},ue=["xmlns","viewBox"],ie=["id"],ce=["stop-color"],de=["stop-color"],ye=["x1","y1","x2","y2","stroke","stroke-width"],ve=["d","stroke","stroke-width"],me=["stroke"],he=["fill"],pe=["stroke"],fe=["fill"],ke=["stroke"],ge=["fill"],be=["stroke"],Ce=["fill"],Ne=["stroke"],xe=["fill"],we=["d","stroke","stroke-width","fill"],_e=["x1","y1","stroke"],Ve=["cx","cy","fill","stroke"],Pe=["fill","stroke"],Be=["y","fill","font-weight"],$e=["y","fill"],Me={key:5,class:"vue-data-ui-watermark"},Ee=["onClick"],Ae={style:{"font-weight":"bold"}},Se={key:8,ref:"source",dir:"auto"},Te=["innerHTML"],Le={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(I,{expose:F}){const s=I,{vue_ui_mood_radar:D}=r.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{_()});function _(){r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),N=e.ref(null),q=e.ref(null),n=e.ref(null),z=e.ref(null),j=e.ref(0),W=e.ref(0),V=e.ref(0),t=e.computed({get:()=>P(),set:l=>l});function P(){const l=O.useNestedProp({userConfig:s.config,defaultConfig:D});return l.theme?{...O.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||s.config,defaultConfig:l})}:l}e.watch(()=>s.config,l=>{t.value=P(),_(),j.value+=1,W.value+=1,V.value+=1},{deep:!0});const{isPrinting:B,isImaging:$,generatePdf:M,generateImage:E}=L.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),G=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),k=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),x=e.computed(()=>r.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function R({centerX:l,centerY:a,apexX:o,apexY:u,proportion:c,key:p,value:J}){return{x:l+(o-l)*c,y:a+(u-a)*c,key:p,value:J}}const U=e.computed(()=>Math.max(...Object.values(s.dataset).map(l=>isNaN(l)?0:l))),v=e.computed(()=>Object.values(s.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),i=e.computed(()=>Object.keys(s.dataset).map((l,a)=>{const o=typeof s.dataset[l]!="number"||isNaN(s.dataset[l])?0:s.dataset[l];return{index:a,key:l,value:o,proportion:o/v.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),A=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(s.dataset[l])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),x.value.coordinates.map((l,a)=>{const o=R({centerX:d.value.width/2,centerY:d.value.height/2,apexX:l.x,apexY:l.y,proportion:i.value[a].value/U.value,key:i.value[a].key,value:i.value[a].value});return{...l,plots:o,key:i.value[a].key}})):[]),H=e.computed(()=>({cy:"mood-radar-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function X(l){l===n.value?n.value=null:n.value=l}const y=e.computed(()=>{const l=i.value.map(o=>({name:o.key,color:o.color})),a=i.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function S(){e.nextTick(()=>{const l=y.value.head.map((u,c)=>[[u.name],[y.value.body[c]],[isNaN(y.value.body[c]/v.value)?"-":y.value.body[c]/v.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-mood-radar"})})}const g=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',Number(v.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=y.value.head.map((c,p)=>[{color:c.color,name:c.name},y.value.body[p].toFixed(t.value.table.td.roundingValue),isNaN(y.value.body[p]/v.value)?"-":(y.value.body[p]/v.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},u=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:u}});function K(){return i.value}function T(){k.value.showTable=!k.value.showTable}const b=e.ref(!1);function Y(l){b.value=l}const C=e.ref(!1);function w(){C.value=!C.value}return F({getData:K,generatePdf:M,generateCsv:S,generateImage:E,toggleTable:T,toggleAnnotator:w}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-mood-radar ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"moodRadarChart",ref:N,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ae.PenAndPaper,{key:0,parent:N.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,onClose:w},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),G.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:z,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",se,[e.createVNode(Q._sfc_main,{config:{title:{cy:"mood-radar-title",...t.value.style.chart.title},subtitle:{cy:"mood-radar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(L.UserOptions,{key:3,ref_key:"details",ref:q,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(B),isImaging:e.unref($),uid:h.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:Y,onGeneratePdf:e.unref(M),onGenerateCsv:S,onGenerateImage:e.unref(E),onToggleTable:T,onToggleAnnotator:w},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${d.value.width} ${d.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(le._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`mood_radar_gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,ce),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100),t.value.style.chart.layout.dataPolygon.opacity)},null,8,de)],8,ie)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.width/2,y1:d.value.height/2,x2:o.x,y2:o.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,ye))),256)),e.createElementVNode("path",{d:x.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,ve),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[5],"stroke-width":"1","stroke-linecap":"round",d:"M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22"},null,8,me),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=o=>n.value=5),onMouseleave:a[1]||(a[1]=o=>n.value=null),cx:"128",cy:"25",r:"20",fill:n.value===5?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[5],20):"transparent"},null,40,he),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[4],"stroke-width":"1","stroke-linecap":"round",d:"M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92"},null,8,pe),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=o=>n.value=4),onMouseleave:a[3]||(a[3]=o=>n.value=null),cx:"227",cy:"95.5",r:"20",fill:n.value===4?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[4],20):"transparent"},null,40,fe),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[3],"stroke-width":"1","stroke-linecap":"round",d:"M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215"},null,8,ke),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=o=>n.value=3),onMouseleave:a[5]||(a[5]=o=>n.value=null),cx:"190",cy:"213.5",r:"20",fill:n.value===3?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[3],20):"transparent"},null,40,ge),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[2],"stroke-width":"1","stroke-linecap":"round",d:"M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210"},null,8,be),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=o=>n.value=2),onMouseleave:a[7]||(a[7]=o=>n.value=null),cx:"65",cy:"213.5",r:"20",fill:n.value===2?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[2],20):"transparent"},null,40,Ce),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[1],"stroke-width":"1","stroke-linecap":"round",d:"M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93"},null,8,Ne),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=o=>n.value=1),onMouseleave:a[9]||(a[9]=o=>n.value=null),cx:"29",cy:"95.5",r:"20",fill:n.value===1?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[1],20):"transparent"},null,40,xe),e.createElementVNode("path",{d:e.unref(r.makePath)(A.value.map(o=>o.plots)),stroke:t.value.style.chart.layout.dataPolygon.stroke,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.chart.layout.dataPolygon.gradient.show?`url(#mood_radar_gradient_${h.value})`:e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,we),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value.map(o=>o.plots),(o,u)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${n.value==o.key?"1":"0"}`)},[e.createElementVNode("line",{x1:o.x,y1:o.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,_e),e.createElementVNode("circle",{cx:o.x,cy:o.y,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Ve),e.createElementVNode("circle",{cx:128,cy:128,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Pe),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?145:120,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle","font-weight":t.value.style.chart.layout.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),9,Be),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.value/v.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,$e)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,ue)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Me,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(B)||e.unref($)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(te.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:"#CCCCCC"},shapes:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Z.Legend,{legendSet:i.value,config:H.value,key:`legend_${V.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:u})=>[e.createElementVNode("div",{onClick:()=>X(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(f.default,{key:0,strokeWidth:1,name:"moodSad",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==2?(e.openBlock(),e.createBlock(f.default,{key:1,strokeWidth:1,name:"moodFlat",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==3?(e.openBlock(),e.createBlock(f.default,{key:2,strokeWidth:1,name:"moodNeutral",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==4?(e.openBlock(),e.createBlock(f.default,{key:3,strokeWidth:1,name:"smiley",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==5?(e.openBlock(),e.createBlock(f.default,{key:4,strokeWidth:1,name:"moodHappy",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),e.createElementVNode("span",Ae,e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,Ee)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:i.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(oe.default,{key:9,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ee.DataTable,{colNames:g.value.colNames,head:g.value.head,body:g.value.body,config:g.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[10]||(a[10]=o=>k.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Te)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ne))}},Oe=re._export_sfc(Le,[["__scopeId","data-v-80a971b6"]]);exports.default=Oe;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BHQZE19X.cjs"),Q=require("./Title-5Vedk01J.cjs"),L=require("./usePrinter-DVgxBO4o.cjs"),Z=require("./Legend-DPHcmrzd.cjs"),f=require("./BaseIcon-2ZD3jgGz.cjs"),ee=require("./DataTable-kMUhutQ4.cjs"),te=require("./vue-ui-skeleton-DUNkS05l.cjs"),oe=require("./vue-ui-accordion-CRVWlHxs.cjs"),O=require("./useNestedProp-CwpqC_aE.cjs"),le=require("./PackageVersion-rnWHRWGI.cjs"),ae=require("./PenAndPaper-BQl9-uX0.cjs"),re=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ne=["id"],se={key:2,style:"width:100%;background:transparent"},ue=["xmlns","viewBox"],ie=["id"],ce=["stop-color"],de=["stop-color"],ye=["x1","y1","x2","y2","stroke","stroke-width"],ve=["d","stroke","stroke-width"],me=["stroke"],he=["fill"],pe=["stroke"],fe=["fill"],ke=["stroke"],ge=["fill"],be=["stroke"],Ce=["fill"],Ne=["stroke"],xe=["fill"],we=["d","stroke","stroke-width","fill"],_e=["x1","y1","stroke"],Ve=["cx","cy","fill","stroke"],Pe=["fill","stroke"],Be=["y","fill","font-weight"],$e=["y","fill"],Me={key:5,class:"vue-data-ui-watermark"},Ee=["onClick"],Ae={style:{"font-weight":"bold"}},Se={key:8,ref:"source",dir:"auto"},Te=["innerHTML"],Le={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(I,{expose:F}){const s=I,{vue_ui_mood_radar:D}=r.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{_()});function _(){r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),N=e.ref(null),q=e.ref(null),n=e.ref(null),z=e.ref(null),j=e.ref(0),W=e.ref(0),V=e.ref(0),t=e.computed({get:()=>P(),set:l=>l});function P(){const l=O.useNestedProp({userConfig:s.config,defaultConfig:D});return l.theme?{...O.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||s.config,defaultConfig:l})}:l}e.watch(()=>s.config,l=>{t.value=P(),_(),j.value+=1,W.value+=1,V.value+=1},{deep:!0});const{isPrinting:B,isImaging:$,generatePdf:M,generateImage:E}=L.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),G=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),k=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),x=e.computed(()=>r.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function R({centerX:l,centerY:a,apexX:o,apexY:u,proportion:c,key:p,value:J}){return{x:l+(o-l)*c,y:a+(u-a)*c,key:p,value:J}}const U=e.computed(()=>Math.max(...Object.values(s.dataset).map(l=>isNaN(l)?0:l))),v=e.computed(()=>Object.values(s.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),i=e.computed(()=>Object.keys(s.dataset).map((l,a)=>{const o=typeof s.dataset[l]!="number"||isNaN(s.dataset[l])?0:s.dataset[l];return{index:a,key:l,value:o,proportion:o/v.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),A=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(s.dataset[l])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),x.value.coordinates.map((l,a)=>{const o=R({centerX:d.value.width/2,centerY:d.value.height/2,apexX:l.x,apexY:l.y,proportion:i.value[a].value/U.value,key:i.value[a].key,value:i.value[a].value});return{...l,plots:o,key:i.value[a].key}})):[]),H=e.computed(()=>({cy:"mood-radar-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function X(l){l===n.value?n.value=null:n.value=l}const y=e.computed(()=>{const l=i.value.map(o=>({name:o.key,color:o.color})),a=i.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function S(){e.nextTick(()=>{const l=y.value.head.map((u,c)=>[[u.name],[y.value.body[c]],[isNaN(y.value.body[c]/v.value)?"-":y.value.body[c]/v.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-mood-radar"})})}const g=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',Number(v.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=y.value.head.map((c,p)=>[{color:c.color,name:c.name},y.value.body[p].toFixed(t.value.table.td.roundingValue),isNaN(y.value.body[p]/v.value)?"-":(y.value.body[p]/v.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},u=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:u}});function K(){return i.value}function T(){k.value.showTable=!k.value.showTable}const b=e.ref(!1);function Y(l){b.value=l}const C=e.ref(!1);function w(){C.value=!C.value}return F({getData:K,generatePdf:M,generateCsv:S,generateImage:E,toggleTable:T,toggleAnnotator:w}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-mood-radar ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"moodRadarChart",ref:N,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ae.PenAndPaper,{key:0,parent:N.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,onClose:w},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),G.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:z,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",se,[e.createVNode(Q._sfc_main,{config:{title:{cy:"mood-radar-title",...t.value.style.chart.title},subtitle:{cy:"mood-radar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(L.UserOptions,{key:3,ref_key:"details",ref:q,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(B),isImaging:e.unref($),uid:h.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:Y,onGeneratePdf:e.unref(M),onGenerateCsv:S,onGenerateImage:e.unref(E),onToggleTable:T,onToggleAnnotator:w},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${d.value.width} ${d.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(le._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`mood_radar_gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,ce),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100),t.value.style.chart.layout.dataPolygon.opacity)},null,8,de)],8,ie)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.width/2,y1:d.value.height/2,x2:o.x,y2:o.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,ye))),256)),e.createElementVNode("path",{d:x.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,ve),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[5],"stroke-width":"1","stroke-linecap":"round",d:"M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22"},null,8,me),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=o=>n.value=5),onMouseleave:a[1]||(a[1]=o=>n.value=null),cx:"128",cy:"25",r:"20",fill:n.value===5?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[5],20):"transparent"},null,40,he),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[4],"stroke-width":"1","stroke-linecap":"round",d:"M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92"},null,8,pe),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=o=>n.value=4),onMouseleave:a[3]||(a[3]=o=>n.value=null),cx:"227",cy:"95.5",r:"20",fill:n.value===4?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[4],20):"transparent"},null,40,fe),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[3],"stroke-width":"1","stroke-linecap":"round",d:"M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215"},null,8,ke),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=o=>n.value=3),onMouseleave:a[5]||(a[5]=o=>n.value=null),cx:"190",cy:"213.5",r:"20",fill:n.value===3?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[3],20):"transparent"},null,40,ge),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[2],"stroke-width":"1","stroke-linecap":"round",d:"M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210"},null,8,be),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=o=>n.value=2),onMouseleave:a[7]||(a[7]=o=>n.value=null),cx:"65",cy:"213.5",r:"20",fill:n.value===2?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[2],20):"transparent"},null,40,Ce),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[1],"stroke-width":"1","stroke-linecap":"round",d:"M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93"},null,8,Ne),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=o=>n.value=1),onMouseleave:a[9]||(a[9]=o=>n.value=null),cx:"29",cy:"95.5",r:"20",fill:n.value===1?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[1],20):"transparent"},null,40,xe),e.createElementVNode("path",{d:e.unref(r.makePath)(A.value.map(o=>o.plots)),stroke:t.value.style.chart.layout.dataPolygon.stroke,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.chart.layout.dataPolygon.gradient.show?`url(#mood_radar_gradient_${h.value})`:e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,we),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value.map(o=>o.plots),(o,u)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${n.value==o.key?"1":"0"}`)},[e.createElementVNode("line",{x1:o.x,y1:o.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,_e),e.createElementVNode("circle",{cx:o.x,cy:o.y,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Ve),e.createElementVNode("circle",{cx:128,cy:128,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Pe),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?145:120,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle","font-weight":t.value.style.chart.layout.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),9,Be),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.value/v.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,$e)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,ue)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Me,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(B)||e.unref($)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(te.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:"#CCCCCC"},shapes:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Z.Legend,{legendSet:i.value,config:H.value,key:`legend_${V.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:u})=>[e.createElementVNode("div",{onClick:()=>X(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(f.default,{key:0,strokeWidth:1,name:"moodSad",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==2?(e.openBlock(),e.createBlock(f.default,{key:1,strokeWidth:1,name:"moodFlat",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==3?(e.openBlock(),e.createBlock(f.default,{key:2,strokeWidth:1,name:"moodNeutral",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==4?(e.openBlock(),e.createBlock(f.default,{key:3,strokeWidth:1,name:"smiley",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==5?(e.openBlock(),e.createBlock(f.default,{key:4,strokeWidth:1,name:"moodHappy",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),e.createElementVNode("span",Ae,e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,Ee)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:i.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(oe.default,{key:9,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ee.DataTable,{colNames:g.value.colNames,head:g.value.head,body:g.value.body,config:g.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[10]||(a[10]=o=>k.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Te)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ne))}},Oe=re._export_sfc(Le,[["__scopeId","data-v-80a971b6"]]);exports.default=Oe;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { computed as g, ref as i, watch as ze, onMounted as et, onBeforeUnmount as tt, openBlock as s, createElementBlock as n, normalizeClass as P, normalizeStyle as re, createBlock as D, createCommentVNode as v, unref as r, createSlots as lt, withCtx as m, renderSlot as k, normalizeProps as R, guardReactiveProps as E, createVNode as Ve, createElementVNode as p, Fragment as L, renderList as T, toDisplayString as N, createTextVNode as Q, nextTick as at, pushScopeId as ot, popScopeId as st } from "vue";
|
|
2
|
-
import { u as ut, c as nt, t as rt, a as it, p as Z, o as dt, e as M, b as ct, J as Me, d as vt, m as Be, f as x, X as ft, s as Ue, L as ht, k as B, n as ie, i as G, x as Re, y as yt, q as pt, r as bt } from "./index-
|
|
2
|
+
import { u as ut, c as nt, t as rt, a as it, p as Z, o as dt, e as M, b as ct, J as Me, d as vt, m as Be, f as x, X as ft, s as Ue, L as ht, k as B, n as ie, i as G, x as Re, y as yt, q as pt, r as bt } from "./index-igxqCP2w.js";
|
|
3
3
|
import { t as gt, u as mt } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as kt } from "./Title-
|
|
5
|
-
import { u as wt, U as _t } from "./usePrinter-
|
|
6
|
-
import { D as $t } from "./DataTable-
|
|
7
|
-
import { _ as Lt } from "./Tooltip-
|
|
8
|
-
import { L as xt } from "./Legend-
|
|
9
|
-
import Ct from "./vue-ui-skeleton-
|
|
10
|
-
import Ft from "./vue-ui-accordion-
|
|
11
|
-
import { u as Ee } from "./useNestedProp-
|
|
12
|
-
import { _ as Tt } from "./PackageVersion-
|
|
13
|
-
import { P as St } from "./PenAndPaper-
|
|
4
|
+
import { _ as kt } from "./Title-DED-PQ7X.js";
|
|
5
|
+
import { u as wt, U as _t } from "./usePrinter-CnZYDQXB.js";
|
|
6
|
+
import { D as $t } from "./DataTable-CO5C8Cmb.js";
|
|
7
|
+
import { _ as Lt } from "./Tooltip-CHseiJu8.js";
|
|
8
|
+
import { L as xt } from "./Legend-FZN9UHoI.js";
|
|
9
|
+
import Ct from "./vue-ui-skeleton-CWjNNx-k.js";
|
|
10
|
+
import Ft from "./vue-ui-accordion-lF7yVkiT.js";
|
|
11
|
+
import { u as Ee } from "./useNestedProp-CSVnZVwZ.js";
|
|
12
|
+
import { _ as Tt } from "./PackageVersion-DYk2hOG1.js";
|
|
13
|
+
import { P as St } from "./PenAndPaper-BfgS_5ux.js";
|
|
14
14
|
import { _ as Nt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
15
|
const de = (U) => (ot("data-v-02bfd901"), U = U(), st(), U), It = ["id"], At = ["xmlns", "viewBox"], Ot = ["id"], Pt = /* @__PURE__ */ de(() => /* @__PURE__ */ p("stop", {
|
|
16
16
|
offset: "0%",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BHQZE19X.cjs"),pe=require("./useResponsive-BJ7DTGpm.cjs"),Ne=require("./Title-5Vedk01J.cjs"),he=require("./usePrinter-DVgxBO4o.cjs"),Se=require("./DataTable-kMUhutQ4.cjs"),Ee=require("./Tooltip-DjCKBAC4.cjs"),Ve=require("./Legend-DPHcmrzd.cjs"),Fe=require("./vue-ui-skeleton-DUNkS05l.cjs"),Te=require("./vue-ui-accordion-CRVWlHxs.cjs"),ye=require("./useNestedProp-CwpqC_aE.cjs"),Pe=require("./PackageVersion-rnWHRWGI.cjs"),De=require("./PenAndPaper-BQl9-uX0.cjs"),ze=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),q=x=>(e.pushScopeId("data-v-02bfd901"),x=x(),e.popScopeId(),x),Oe=["id"],Ie=["xmlns","viewBox"],Ae=["id"],Me=q(()=>e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Re=["offset","stop-color"],qe=["offset","stop-opacity"],Ue=q(()=>e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Ye=["id"],Xe=["id"],Ge=q(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),He=["id"],We=["flood-color"],Je=["d","fill","stroke","stroke-width","filter"],Ke={key:0},Qe=["d","fill"],Ze={key:1},je=["x","y","font-size","font-weight","fill"],et={key:2},tt=["filter"],lt=["text-anchor","x","y","fill","font-size","font-weight"],at=["text-anchor","x","y","fill","font-size","font-weight"],ot=["text-anchor","x","y","fill","font-size","font-weight"],nt=["d","fill","onMouseenter","onClick"],rt={key:5,class:"vue-data-ui-watermark"},st={key:0,class:"vue-ui-nested-donuts-legend-title"},ut=["onClick"],it=["innerHTML"],ct={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(x,{expose:me,emit:U}){const k=x,{vue_ui_nested_donuts:be}=r.useConfig(),_=e.computed(()=>!!k.dataset&&k.dataset.length),p=e.ref(r.createUid()),T=e.ref(!1),P=e.ref(""),ge=e.ref(null),Y=e.ref(0),w=e.ref(null),X=e.ref(null),D=e.ref(null),G=e.ref(null),H=e.ref(null),W=e.ref(0),J=e.ref(0),K=e.ref(0),B=e.ref(!1);function ke(l){B.value=l,Y.value+=1}const t=e.computed({get:()=>Q(),set:l=>l});function Q(){const l=ye.useNestedProp({userConfig:k.config,defaultConfig:be});return l.theme?{...ye.useNestedProp({userConfig:r.themes.vue_ui_nested_donuts[l.theme]||k.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>k.config,l=>{t.value=Q(),Z(),W.value+=1,J.value+=1,K.value+=1},{deep:!0});const $=e.ref(null);e.onMounted(()=>{Z()});function Z(){if(r.objectIsEmpty(k.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=pe.throttle(()=>{const{width:s,height:o}=pe.useResponsive({chart:w.value,title:t.value.style.chart.title.text?X.value:null,legend:t.value.style.chart.legend.show?D.value:null,source:G.value,noTitle:H.value});d.value.width=s,d.value.height=o});$.value=new ResizeObserver(l),$.value.observe(w.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:j,isImaging:ee,generatePdf:te,generateImage:le}=he.usePrinter({elementId:`nested_donuts_${p.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts"}),Ce=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Le=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),h=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),d=e.ref({height:512,width:512});function we({datapoint:l,index:s}){U("selectDatapoint",{datapoint:l,index:s})}const v=e.ref([]),m=e.computed(()=>(k.dataset.forEach((l,s)=>{[null,void 0].includes(l.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:s}),[null,void 0].includes(l.series)?r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:s}):l.series.length===0?r.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${s}`}):l.series.forEach((o,n)=>{[null,void 0].includes(o.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:n,key:"serie"}),[null,void 0].includes(o.values)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:n,key:"serie"})})}),k.dataset.map((l,s)=>({...l,total:l.series.filter(o=>!v.value.includes(o.id)).map(o=>r.sanitizeArray(o.values).reduce((n,a)=>n+a,0)).reduce((o,n)=>o+n,0),datasetIndex:s,id:`${p.value}_${s}`,series:l.series.map((o,n)=>({name:o.name,arcOf:l.name,arcOfId:`${p.value}_${s}`,id:`${p.value}_${s}_${n}`,seriesIndex:n,datasetIndex:s,color:r.convertColorToHex(o.color)||Le.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:r.sanitizeArray(o.values).reduce((a,u)=>a+u,0),absoluteValues:o.values||[]}))})))),b=e.computed(()=>Math.min(d.value.height,d.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),ae=e.computed(()=>[...m.value].map((l,s)=>{const o=l.series.filter(n=>!v.value.includes(n.id)).map(n=>n.value).reduce((n,a)=>n+a,0);return{...l,total:o,series:l.series.filter(n=>!v.value.includes(n.id)).map(n=>({...n,proportion:n.value/o}))}}));function Be(l,s,o){let n=0;for(let a=0;a<l.length;a+=1)o.includes(l[a])&&(n+=1);return n<s}const c=e.ref(ae.value);e.watch(()=>ae.value,l=>c.value=l);const oe=e.ref(null),ne=e.ref(null);function z(l){U("selectLegend",l);const s=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),o=c.value.flatMap(i=>i.series).find(i=>i.id===l.id);let a=o?o.value:0;const u=m.value.find(i=>i.id===s.arcOfId).series.map(i=>i.id),f=Be(u,u.length-1,v.value);if(v.value.includes(l.id)){let i=function(){a>s.value?(cancelAnimationFrame(oe.value),c.value=c.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(a+=s.value*.025,c.value=c.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:a}:g)})),oe.value=requestAnimationFrame(i))};v.value=v.value.filter(y=>y!==l.id),i()}else if(f){let i=function(){a<.1?(cancelAnimationFrame(ne.value),v.value.push(l.id),c.value=c.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:0}:L)}))):(a/=1.1,c.value=c.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:a}:L)})),ne.value=requestAnimationFrame(i))};i()}}const O=e.computed(()=>b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio),re=e.computed(()=>c.value.map((l,s)=>b.value-s*b.value/m.value.length)),N=e.computed(()=>c.value.map((l,s)=>{const o=s*b.value/m.value.length;return{...l,radius:b.value-o,donut:r.makeDonut({series:l.series},d.value.width/2,d.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,O.value)}})),se=e.computed(()=>[...m.value].map((l,s)=>{const o=s*b.value/m.value.length;return{sizeRatio:o,donut:r.makeDonut({series:[{value:1}]},d.value.width/2,d.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),ue=e.ref(null),S=e.ref(null),E=e.ref(null),I=e.ref(null);function xe({datapoint:l,_relativeIndex:s,seriesIndex:o}){ue.value=l.arcOfId,S.value=l.id,E.value=o,I.value={datapoint:l,seriesIndex:o,series:c.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:o,datapoint:l,series:c.value,config:t.value})))P.value=n({seriesIndex:o,datapoint:l,series:c.value,config:t.value});else{let a="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&v.value.length===0){const u=c.value.map(f=>f.series.find(i=>i.seriesIndex===o));u.forEach((f,i)=>{if(!f)return"";a+=`
|
|
2
2
|
<div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${i<u.length-1?`border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor}`:""}">
|
|
3
3
|
<div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
|
|
4
4
|
<svg viewBox="0 0 20 20" height="${t.value.style.chart.tooltip.fontSize}" width="${t.value.style.chart.tooltip.fontSize}">
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { computed as d, ref as s, watch as ye, onMounted as ze, onBeforeUnmount as Ye, openBlock as n, createElementBlock as u, normalizeClass as V, normalizeStyle as q, createBlock as C, createCommentVNode as g, unref as v, createSlots as Be, withCtx as h, renderSlot as f, normalizeProps as S, guardReactiveProps as F, createVNode as me, Fragment as M, renderList as N, createElementVNode as O, toDisplayString as P, createTextVNode as Ve, nextTick as Xe } from "vue";
|
|
2
|
-
import { u as Ge, c as Ue, t as Ee, a as He, p as be, b as We, o as je, e as J, d as qe, X as Je, f as R, i as K, x as ke, q as Ke, r as Qe, y as Ze } from "./index-
|
|
2
|
+
import { u as Ge, c as Ue, t as Ee, a as He, p as be, b as We, o as je, e as J, d as qe, X as Je, f as R, i as K, x as ke, q as Ke, r as Qe, y as Ze } from "./index-igxqCP2w.js";
|
|
3
3
|
import { t as et, u as tt } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as at } from "./Title-
|
|
5
|
-
import { u as lt, U as ot } from "./usePrinter-
|
|
6
|
-
import { L as rt } from "./Legend-
|
|
7
|
-
import { D as nt } from "./DataTable-
|
|
8
|
-
import { _ as st } from "./Tooltip-
|
|
9
|
-
import ut from "./vue-ui-skeleton-
|
|
10
|
-
import it from "./vue-ui-accordion-
|
|
11
|
-
import { u as $e } from "./useNestedProp-
|
|
12
|
-
import { _ as ct } from "./PackageVersion-
|
|
13
|
-
import { P as dt } from "./PenAndPaper-
|
|
4
|
+
import { _ as at } from "./Title-DED-PQ7X.js";
|
|
5
|
+
import { u as lt, U as ot } from "./usePrinter-CnZYDQXB.js";
|
|
6
|
+
import { L as rt } from "./Legend-FZN9UHoI.js";
|
|
7
|
+
import { D as nt } from "./DataTable-CO5C8Cmb.js";
|
|
8
|
+
import { _ as st } from "./Tooltip-CHseiJu8.js";
|
|
9
|
+
import ut from "./vue-ui-skeleton-CWjNNx-k.js";
|
|
10
|
+
import it from "./vue-ui-accordion-lF7yVkiT.js";
|
|
11
|
+
import { u as $e } from "./useNestedProp-CSVnZVwZ.js";
|
|
12
|
+
import { _ as ct } from "./PackageVersion-DYk2hOG1.js";
|
|
13
|
+
import { P as dt } from "./PenAndPaper-BfgS_5ux.js";
|
|
14
14
|
import { _ as vt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
15
|
const ht = ["id"], ft = ["xmlns", "viewBox"], gt = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], pt = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], yt = ["id"], mt = ["stdDeviation"], bt = ["filter"], kt = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], $t = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset", "onMouseenter"], wt = { key: 1 }, Ct = ["onMouseenter"], xt = ["x", "y", "font-size", "fill", "font-weight"], Tt = {
|
|
16
16
|
key: 5,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-BHQZE19X.cjs"),Z=require("./useResponsive-BJ7DTGpm.cjs"),ye=require("./Title-5Vedk01J.cjs"),ee=require("./usePrinter-DVgxBO4o.cjs"),ke=require("./Legend-DPHcmrzd.cjs"),be=require("./DataTable-kMUhutQ4.cjs"),Ce=require("./Tooltip-DjCKBAC4.cjs"),we=require("./vue-ui-skeleton-DUNkS05l.cjs"),$e=require("./vue-ui-accordion-CRVWlHxs.cjs"),te=require("./useNestedProp-CwpqC_aE.cjs"),xe=require("./PackageVersion-rnWHRWGI.cjs"),Be=require("./PenAndPaper-BQl9-uX0.cjs"),Te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Pe=["id"],Se=["xmlns","viewBox"],_e=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Ne=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Oe=["id"],Fe=["stdDeviation"],Ve=["filter"],Ae=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset"],Ee=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset","onMouseenter"],Ie={key:1},Le=["onMouseenter"],Me=["x","y","font-size","fill","font-weight"],Re={key:5,class:"vue-data-ui-watermark"},De=["onClick"],ze=["innerHTML"],qe={__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ae,{expose:le,emit:oe}){const p=ae,{vue_ui_onion:re}=u.useConfig(),w=e.computed(()=>!!p.dataset&&p.dataset.length),m=e.ref(u.createUid()),ne=e.ref(null),A=e.ref(0),$=e.ref(!1),P=e.ref(""),d=e.ref([]),y=e.ref(null),E=e.ref(null),I=e.ref(null),L=e.ref(null),M=e.ref(null),R=e.ref(0),D=e.ref(0),z=e.ref(0),t=e.computed({get:()=>q(),set:a=>a});function q(){const a=te.useNestedProp({userConfig:p.config,defaultConfig:re});return a.theme?{...te.useNestedProp({userConfig:u.themes.vue_ui_onion[a.theme]||p.config,defaultConfig:a}),customPalette:u.themePalettes[a.theme]||u.palette}:a}e.watch(()=>p.config,a=>{t.value=q(),H(),R.value+=1,D.value+=1,z.value+=1},{deep:!0});const{isPrinting:Y,isImaging:X,generatePdf:U,generateImage:G}=ee.usePrinter({elementId:`vue-ui-onion_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-onion"}),ue=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),se=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),f=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),n=e.ref({height:512,width:512,padding:{top:64,left:64,right:64,bottom:64},minRadius:64}),x=e.ref(null);e.onMounted(()=>{H()});function H(){if(u.objectIsEmpty(p.dataset)&&u.error({componentName:"VueUiOnion",type:"dataset"}),t.value.responsive){const r=Z.throttle(()=>{const{width:l,height:o}=Z.useResponsive({chart:y.value,title:t.value.style.chart.title.text?E.value:null,legend:t.value.style.chart.legend.show?I.value:null,source:L.value,noTitle:M.value});n.value.width=l,n.value.height=o,n.value.padding.top=Math.max(l,o)*.125,n.value.padding.right=Math.max(l,o)*.125,n.value.padding.bottom=Math.max(l,o)*.125,n.value.padding.left=Math.max(l,o)*.125,n.value.minRadius=Math.min(l,o)*.125});x.value=new ResizeObserver(r),x.value.observe(y.value.parentNode)}}e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const s=e.computed(()=>({top:n.value.padding.top,left:n.value.padding.left,right:n.value.width-n.value.padding.right,bottom:n.value.height-n.value.padding.bottom,centerX:n.value.width/2,centerY:n.value.height/2,width:n.value.width-n.value.padding.right-n.value.padding.left,height:n.value.height-n.value.padding.bottom-n.value.padding.top,minRadius:n.value.minRadius,maxRadius:Math.min(n.value.width,n.value.height)-n.value.padding.top*2})),i=e.computed(()=>(p.dataset.forEach((a,r)=>{[null,void 0].includes(a.name)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"name",index:r}),[void 0].includes(a.percentage)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"percentage",index:r})}),p.dataset.map((a,r)=>{const l=`onion_serie_${r}_${m.value}`;return{...a,percentage:a.percentage||0,targetPercentage:a.percentage||0,color:u.convertColorToHex(a.color)||se.value[r]||u.palette[r],id:l,shape:"circle",opacity:d.value.includes(l)?.5:1,absoluteIndex:r,segregate:()=>W(l),isSegregated:d.value.includes(l)}}))),b=e.ref(i.value),ie=e.computed(()=>t.value.useStartAnimation),ce=e.ref(null),de=e.computed(()=>Math.max(...i.value.map(a=>a.percentage))),S=e.ref(!1);e.watch(()=>i.value,ve,{immediate:!0});function ve(){if(ie.value&&!S.value){let r=function(){a>=de.value?(cancelAnimationFrame(ce.value),b.value=i.value,S.value=!0):(b.value=i.value.map(l=>({...l,percentage:a<l.targetPercentage?a:l.targetPercentage})),a+=1,requestAnimationFrame(r),S.value=!0)};b.value=i.value.map(l=>({...l,percentage:0}));let a=0;r()}else b.value=i.value}const he=e.computed(()=>({cy:"onion-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),pe=e.computed(()=>i.value.filter(a=>!d.value.includes(a.id)).length),g=e.computed(()=>{const a=Math.min(s.value.width,s.value.height)/2/i.value.length;return{gutter:(a>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:a)*t.value.style.chart.layout.gutter.width,track:(a>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:a)*t.value.style.chart.layout.track.width}}),v=e.computed(()=>b.value.filter(a=>!d.value.includes(a.id)).map((a,r)=>{const l=(s.value.maxRadius-g.value.track)/pe.value/2*(1+r),o=s.value.centerY-l;return{percentage:a.percentage||0,...a,labelY:o,radius:l,path:fe(l,a.percentage||0)}}));function fe(a,r){const l=2*Math.PI*a,o=l*.75,c=`${o} ${l}`,C=o*(1-r/100);return{bgDashArray:`${o} ${l}`,bgDashOffset:0,dashArray:c,dashOffset:C,fullOffset:0,active:`
|
|
2
2
|
M ${s.value.centerX},${s.value.centerY-a}
|
|
3
3
|
A ${a},${a} 0 1 1
|
|
4
4
|
${s.value.centerX+a*Math.cos(Math.PI*3/4)},${s.value.centerY+a*Math.sin(Math.PI*3/4)}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { computed as g, ref as c, watch as je, onMounted as Ue, onBeforeUnmount as Ve, openBlock as u, createElementBlock as r, normalizeClass as W, normalizeStyle as T, createBlock as M, createCommentVNode as m, unref as z, createSlots as Ge, withCtx as x, renderSlot as b, normalizeProps as B, guardReactiveProps as E, createVNode as $e, Fragment as C, renderList as I, createElementVNode as F, toDisplayString as D, createTextVNode as He } from "vue";
|
|
2
|
-
import { u as Xe, c as Z, t as Ye, a as qe, p as G, o as Qe, e as Ae, g as Je, b as Ke, d as Ze, D as et, Q as tt, R as at, S as lt, X as ot, x as _e, i as Te, f as Me, y as st, q as nt, r as ut, F as H } from "./index-
|
|
2
|
+
import { u as Xe, c as Z, t as Ye, a as qe, p as G, o as Qe, e as Ae, g as Je, b as Ke, d as Ze, D as et, Q as tt, R as at, S as lt, X as ot, x as _e, i as Te, f as Me, y as st, q as nt, r as ut, F as H } from "./index-igxqCP2w.js";
|
|
3
3
|
import { t as rt, u as it } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as ct } from "./Title-
|
|
5
|
-
import { L as vt } from "./Legend-
|
|
6
|
-
import { _ as dt } from "./Tooltip-
|
|
7
|
-
import { _ as ht } from "./Shape-
|
|
8
|
-
import { u as pt, U as mt } from "./usePrinter-
|
|
9
|
-
import { D as yt } from "./DataTable-
|
|
10
|
-
import ft from "./vue-ui-accordion-
|
|
11
|
-
import gt from "./vue-ui-skeleton-
|
|
12
|
-
import { u as ze } from "./useNestedProp-
|
|
13
|
-
import { _ as bt } from "./PackageVersion-
|
|
14
|
-
import { P as xt } from "./PenAndPaper-
|
|
4
|
+
import { _ as ct } from "./Title-DED-PQ7X.js";
|
|
5
|
+
import { L as vt } from "./Legend-FZN9UHoI.js";
|
|
6
|
+
import { _ as dt } from "./Tooltip-CHseiJu8.js";
|
|
7
|
+
import { _ as ht } from "./Shape-BqkMzXqo.js";
|
|
8
|
+
import { u as pt, U as mt } from "./usePrinter-CnZYDQXB.js";
|
|
9
|
+
import { D as yt } from "./DataTable-CO5C8Cmb.js";
|
|
10
|
+
import ft from "./vue-ui-accordion-lF7yVkiT.js";
|
|
11
|
+
import gt from "./vue-ui-skeleton-CWjNNx-k.js";
|
|
12
|
+
import { u as ze } from "./useNestedProp-CSVnZVwZ.js";
|
|
13
|
+
import { _ as bt } from "./PackageVersion-DYk2hOG1.js";
|
|
14
|
+
import { P as xt } from "./PenAndPaper-BfgS_5ux.js";
|
|
15
15
|
import { _ as kt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
16
|
const Ct = ["id"], wt = ["xmlns", "viewBox"], $t = { style: { "pointer-events": "none" } }, At = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], _t = ["x", "y", "fill", "font-size", "font-weight"], Tt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Mt = ["x", "y", "fill", "font-size", "font-weight"], zt = { key: 0 }, It = ["x", "y", "font-size", "fill"], Ft = ["width", "x", "y"], Pt = { style: { width: "100%" } }, Nt = ["x", "y", "fill", "font-weight", "font-size", "onMouseenter"], Lt = ["d", "stroke", "stroke-width", "onMouseenter"], St = ["d", "onMouseenter"], Ot = {
|
|
17
17
|
key: 5,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-BHQZE19X.cjs"),se=require("./useResponsive-BJ7DTGpm.cjs"),xe=require("./Title-5Vedk01J.cjs"),Ce=require("./Legend-DPHcmrzd.cjs"),we=require("./Tooltip-DjCKBAC4.cjs"),Be=require("./Shape-BblkpCyL.cjs"),re=require("./usePrinter-DVgxBO4o.cjs"),$e=require("./DataTable-kMUhutQ4.cjs"),ze=require("./vue-ui-accordion-CRVWlHxs.cjs"),Ne=require("./vue-ui-skeleton-DUNkS05l.cjs"),ue=require("./useNestedProp-CwpqC_aE.cjs"),Se=require("./PackageVersion-rnWHRWGI.cjs"),Ae=require("./PenAndPaper-BQl9-uX0.cjs"),Te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Pe=["id"],_e=["xmlns","viewBox"],Fe={style:{"pointer-events":"none"}},Me=["x1","x2","y1","y2","stroke","stroke-width"],Ee=["x","y","fill","font-size","font-weight"],Ie=["x1","x2","y1","y2","stroke","stroke-width"],Le=["x","y","fill","font-size","font-weight"],Ve={key:0},Oe=["x","y","font-size","fill"],De=["width","x","y"],qe={style:{width:"100%"}},Re=["x","y","fill","font-weight","font-size","onMouseenter"],Ue=["d","stroke","stroke-width","onMouseenter"],We=["d","onMouseenter"],je={key:5,class:"vue-data-ui-watermark"},He=["onClick"],Ge=["innerHTML"],Ye={__name:"vue-ui-parallel-coordinate-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(ie,{expose:ce,emit:I}){const b=ie,{vue_ui_parallel_coordinate_plot:de}=u.useConfig(),x=e.computed({get(){return!!b.dataset&&b.dataset.length},set(l){return l}}),L=e.ref(0),C=e.ref(null),V=e.ref(null),O=e.ref(null),D=e.ref(null),q=e.ref(null),R=e.ref(0),U=e.ref(0),W=e.ref(0),T=e.ref(u.createUid()),w=e.ref(!1);function ve(l){w.value=l,L.value+=1}const t=e.computed({get:()=>j(),set:l=>l});function j(){const l=ue.useNestedProp({userConfig:b.config,defaultConfig:de});return l.theme?{...ue.useNestedProp({userConfig:u.themes.vue_ui_parallel_coordinate_plot[l.theme]||b.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}e.watch(()=>b.config,l=>{t.value=j(),H(),R.value+=1,W.value+=1,U.value+=1},{deep:!0});const z=e.ref(null);e.onMounted(()=>{H()});function H(){if(u.objectIsEmpty(b.dataset)?u.error({componentName:"VueUiParallelCoordinatePlot",type:"dataset"}):b.dataset.forEach((l,o)=>{u.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","series"]}).forEach(a=>{x.value=!1,u.error({componentName:"VueUiParallelCoordinatePlot",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=se.throttle(()=>{const{width:o,height:a}=se.useResponsive({chart:C.value,title:t.value.style.chart.title.text?V.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:D.value,noTitle:q.value});c.value.width=o,c.value.height=a,c.value.plotSize=u.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.radius,threshold:2,fallback:2}),c.value.ticksFontSize=u.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.ticks.fontSize,threshold:10,fallback:10}),c.value.datapointFontSize=u.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.datapoints.fontSize,threshold:10,fallback:10}),c.value.axisNameFontSize=u.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.axisNamesFontSize,threshold:12,fallback:12})});z.value=new ResizeObserver(l),z.value.observe(C.value.parentNode)}}e.onBeforeUnmount(()=>{z.value&&z.value.disconnect()});const{isPrinting:G,isImaging:Y,generatePdf:X,generateImage:J}=re.usePrinter({elementId:`pcp_${T.value}`,fileName:t.value.style.chart.title.text||"vue-ui-parallel-coordinate-plot"}),pe=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),c=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width,plotSize:t.value.style.chart.plots.radius,ticksFontSize:t.value.style.chart.yAxis.labels.ticks.fontSize,datapointFontSize:t.value.style.chart.yAxis.labels.datapoints.fontSize,axisNameFontSize:t.value.style.chart.yAxis.labels.axisNamesFontSize}),d=e.computed(()=>{const{top:l,right:o,bottom:a,left:n}=t.value.style.chart.padding,r=c.value.height,s=c.value.width;return{chartHeight:r,chartWidth:s,height:r-l-a,width:s-n-o,top:l,left:n,right:s-o,bottom:r-a}}),he=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),h=e.ref({dataLabels:{show:t.value.style.chart.yAxis.labels.datapoints.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),f=e.ref([]);function K(l){f.value.includes(l)?f.value=f.value.filter(o=>o!==l):f.value.push(l)}const k=e.computed(()=>b.dataset.map((l,o)=>{const a=u.convertColorToHex(l.color)||he.value[o]||u.palette[o]||u.palette[o%u.palette.length];return{...l,series:l.series.map(n=>({...n,id:u.createUid(),color:a})),seriesIndex:o,color:a,id:u.createUid(),shape:l.shape||"circle"}})),me=e.computed(()=>k.value.map(l=>({...l,opacity:f.value.includes(l.id)?.5:1,segregate:()=>K(l.id),isSegregated:f.value.includes(l.id)}))),ye=e.computed(()=>({cy:"pcp-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),Q=e.computed(()=>Math.max(...k.value.filter(l=>!f.value.includes(l.id)).map(l=>Math.max(...l.series.flatMap(o=>o.values.length))))),y=e.computed(()=>d.value.width/Q.value),P=e.computed(()=>k.value.filter(l=>!f.value.includes(l.id))),m=e.computed(()=>{let l=[];for(let o=0;o<Q.value;o+=1){const a=Math.min(...P.value.flatMap(v=>v.series.map(A=>A.values[o]||0)||0)),n=Math.max(...P.value.flatMap(v=>v.series.map(A=>A.values[o]||0)||0)),r=n===a?a/4:a,s=n===a?n*2:n,i=u.calculateNiceScale(r,s,t.value.style.chart.yAxis.scaleTicks),g=i.ticks.map((v,A)=>{const be=i.min<0?v+Math.abs(i.min):v-Math.abs(i.min),ke=i.min<0?i.max+Math.abs(i.min):i.max-Math.abs(i.min);return{y:d.value.bottom-d.value.height*(be/ke),x:d.value.left+y.value*o+y.value/2,value:v}});l.push({scale:i,ticks:g,name:t.value.style.chart.yAxis.labels.axisNames[o]||`Y-${o+1}`})}return l}),_=e.computed(()=>P.value.map((l,o)=>({...l,series:l.series.map((a,n)=>({...a,datapoints:a.values.map((r,s)=>{const i=m.value[s].scale.min<0?(r||0)+Math.abs(m.value[s].scale.min):(r||0)-Math.abs(m.value[s].scale.min),g=m.value[s].scale.min<0?m.value[s].scale.max+Math.abs(m.value[s].scale.min):m.value[s].scale.max-Math.abs(m.value[s].scale.min);return{name:a.name,seriesName:l.name,axisIndex:s,datapointIndex:n,seriesIndex:o,value:r||0,x:d.value.left+y.value*s+y.value/2,y:d.value.bottom-d.value.height*(i/g),comment:a.comments&&a.comments[s]||""}})}))})).map(l=>({...l,series:l.series.map(o=>{const a=u.createStraightPath(o.datapoints),n=u.createSmoothPath(o.datapoints),r=u.getPathLengthFromCoordinates(t.value.style.chart.lines.smooth?`M ${n}`:`M ${a}`);return{...o,smoothPath:n,straightPath:a,pathLength:r}})})));function Z({value:l,index:o,datapoint:a}){return u.applyDataLabel(t.value.style.chart.yAxis.labels.formatters[o]||null,l,u.dataLabel({p:t.value.style.chart.yAxis.labels.prefixes[o]||"",v:l,s:t.value.style.chart.yAxis.labels.suffixes[o]||"",r:t.value.style.chart.yAxis.labels.roundings[o]||0}),{datapoint:a,seriesIndex:o})}const p=e.ref(null),F=e.ref(null),B=e.ref(!1),M=e.ref("");function N({shape:l,serieName:o,serie:a,relativeIndex:n,seriesIndex:r}){F.value={serie:a,relativeIndex:n,seriesIndex:r,series:k.value,scales:m.value},B.value=!0,p.value=a.id;let s="";const i=t.value.style.chart.tooltip.customFormat;u.isFunction(i)&&u.functionReturnsString(()=>i({serie:a,seriesIndex:a.seriesIndex,series:k.value,config:t.value,scales:m.value}))?M.value=i({serie:a,seriesIndex:a.seriesIndex,series:k.value,config:t.value,scales:m.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o?o+" - ":""}${a.name}</div>`,m.value.map(g=>g.name).forEach((g,v)=>{s+=`
|
|
2
2
|
<div class="vue-ui-tooltip-item" style="text-align:left">
|
|
3
3
|
<span>${g}: </span>
|
|
4
4
|
<span>
|