vue-data-ui 2.3.23 → 2.3.25
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-BOSHa3Ag.cjs → Arrow-01eXaB81.cjs} +1 -1
- package/dist/{Arrow-DxXzMXB1.js → Arrow-zObQ2VxA.js} +1 -1
- package/dist/{BaseIcon-C-k_mqXL.cjs → BaseIcon-BkdELEYE.cjs} +1 -1
- package/dist/{BaseIcon-DuMfKUDs.js → BaseIcon-CHBghp3_.js} +1 -1
- package/dist/{DataTable-CHXdpx94.cjs → DataTable-D_2ZW2eI.cjs} +1 -1
- package/dist/{DataTable-DKHF_NH2.js → DataTable-Dytj5HQM.js} +2 -2
- package/dist/{Legend-BqqpwXbu.js → Legend-Ct8LnAy4.js} +1 -1
- package/dist/{Legend-BwrzHxLy.cjs → Legend-tvvMRnbi.cjs} +1 -1
- package/dist/{Shape-DW18-C9f.cjs → Shape-dvRttq7z.cjs} +1 -1
- package/dist/{Shape-Ccky9omb.js → Shape-qo5jcJq9.js} +1 -1
- package/dist/{Slicer-BDsv196Y.js → Slicer-BNgHaM2_.js} +1 -1
- package/dist/{Slicer-xKlzke1v.cjs → Slicer-DcjEg-ZZ.cjs} +1 -1
- package/dist/{Title-Bx2ibobQ.js → Title-BcNPXpKX.js} +1 -1
- package/dist/{Title-DxNugmhI.cjs → Title-CSQdI1EY.cjs} +1 -1
- package/dist/{Tooltip-BC2Wlz7P.cjs → Tooltip-B-laoopT.cjs} +1 -1
- package/dist/{Tooltip-DOEMrisX.js → Tooltip-etzDGo1Y.js} +1 -1
- package/dist/{index-BvjCO-wv.js → index-BE6fhUyH.js} +1 -1
- package/dist/{index-oufiZvaS.cjs → index-BFH7X8WG.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-CmTItGss.cjs → useNestedProp-B_z4-n52.cjs} +1 -1
- package/dist/{useNestedProp-2KJaYPfM.js → useNestedProp-BcjRW6BJ.js} +1 -1
- package/dist/{usePrinter-CaKXrCiB.js → usePrinter-CdIphKpF.js} +1 -1
- package/dist/{usePrinter-Cc8ufBvU.cjs → usePrinter-hyuaFHQj.cjs} +1 -1
- package/dist/{vue-data-ui-DnlOZVL-.js → vue-data-ui-DH3---6Y.js} +56 -56
- package/dist/{vue-data-ui-D5LrE3dP.cjs → vue-data-ui-dbgbgXfB.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-qegO2SzJ.js → vue-ui-3d-bar-CPpeRsrz.js} +7 -7
- package/dist/{vue-ui-3d-bar-Cma1NB-u.cjs → vue-ui-3d-bar-ddx9_3_T.cjs} +1 -1
- package/dist/{vue-ui-accordion-DiR0dVog.cjs → vue-ui-accordion-CvZhABQM.cjs} +1 -1
- package/dist/{vue-ui-accordion-q-bLDiD3.js → vue-ui-accordion-Dmz7RUKz.js} +3 -3
- package/dist/{vue-ui-age-pyramid-xk6Gt1LJ.cjs → vue-ui-age-pyramid-BieAbkr7.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-vQvy7rWY.js → vue-ui-age-pyramid-DiOdrFIV.js} +8 -8
- package/dist/{vue-ui-annotator-LwO1PGoN.cjs → vue-ui-annotator-CugE3IpZ.cjs} +1 -1
- package/dist/{vue-ui-annotator-BYT8v1SY.js → vue-ui-annotator-KClMRKPi.js} +1 -1
- package/dist/{vue-ui-candlestick-zvv6_kwp.js → vue-ui-candlestick-D9MajMEG.js} +9 -9
- package/dist/{vue-ui-candlestick-CmM0kwJR.cjs → vue-ui-candlestick-DErkX5mF.cjs} +1 -1
- package/dist/vue-ui-carousel-table-CLwi79Ly.js +346 -0
- package/dist/vue-ui-carousel-table-CsCEcaWp.cjs +1 -0
- package/dist/{vue-ui-chestnut-4MvRD28_.cjs → vue-ui-chestnut-BTvQSTQi.cjs} +1 -1
- package/dist/{vue-ui-chestnut-A9asY_42.js → vue-ui-chestnut-BnmDdakJ.js} +6 -6
- package/dist/{vue-ui-cursor-DusWgM7W.cjs → vue-ui-cursor-Dj8pAXbc.cjs} +1 -1
- package/dist/{vue-ui-cursor-CPPPIH2W.js → vue-ui-cursor-KjKhIKTP.js} +2 -2
- package/dist/{vue-ui-dashboard-ZTzEd521.cjs → vue-ui-dashboard-BTpiCLaT.cjs} +1 -1
- package/dist/{vue-ui-dashboard-CuQ81BKN.js → vue-ui-dashboard-Dm-rDSRt.js} +2 -2
- package/dist/{vue-ui-digits-DlupvOo-.cjs → vue-ui-digits-BVVOQfoO.cjs} +1 -1
- package/dist/{vue-ui-digits-Czkbi2AR.js → vue-ui-digits-WgEKLYdq.js} +2 -2
- package/dist/{vue-ui-donut-Cis7kzDB.js → vue-ui-donut-BjHWw_Mw.js} +9 -9
- package/dist/{vue-ui-donut-DA5YfWlL.cjs → vue-ui-donut-DvDqj2od.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-BigmUCTm.cjs → vue-ui-donut-evolution-C0TW-uGR.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-D2I4ZD5a.js → vue-ui-donut-evolution-CWBsLGUw.js} +9 -9
- package/dist/{vue-ui-dumbbell-fdV94xQB.js → vue-ui-dumbbell-BlsLMdW8.js} +8 -8
- package/dist/{vue-ui-dumbbell-D8ZSCX0H.cjs → vue-ui-dumbbell-Uhw6rKrw.cjs} +1 -1
- package/dist/{vue-ui-flow-C1PVwgKX.js → vue-ui-flow-KijZNPzD.js} +7 -7
- package/dist/{vue-ui-flow-CH6PmIBT.cjs → vue-ui-flow-fnDs0_mH.cjs} +1 -1
- package/dist/{vue-ui-galaxy-IFmqHh3R.cjs → vue-ui-galaxy-BBiGsB2G.cjs} +1 -1
- package/dist/{vue-ui-galaxy-DzWOfvyj.js → vue-ui-galaxy-_y9H-beS.js} +9 -9
- package/dist/{vue-ui-gauge-Bbda2H3b.cjs → vue-ui-gauge-Bv4YKgIj.cjs} +1 -1
- package/dist/{vue-ui-gauge-CeGa1oMf.js → vue-ui-gauge-CGgQqTqT.js} +5 -5
- package/dist/{vue-ui-gizmo-DyJngE0E.cjs → vue-ui-gizmo-DFWR7qEg.cjs} +1 -1
- package/dist/{vue-ui-gizmo-BILyJylm.js → vue-ui-gizmo-DjAFk58g.js} +2 -2
- package/dist/{vue-ui-heatmap-Dp68UbGB.cjs → vue-ui-heatmap-B5McL3SD.cjs} +1 -1
- package/dist/{vue-ui-heatmap-DRk0VXaJ.js → vue-ui-heatmap-D1AMro3o.js} +8 -8
- package/dist/vue-ui-kpi-BW2na3Yu.js +58 -0
- package/dist/vue-ui-kpi-Bb7xdAFU.cjs +1 -0
- package/dist/{vue-ui-mini-loader-CXiMb5pi.cjs → vue-ui-mini-loader-22dagCEY.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DLXv9Seq.js → vue-ui-mini-loader-CKZ-PEf5.js} +2 -2
- package/dist/{vue-ui-molecule-JlPbVJ8I.js → vue-ui-molecule-BK8HPWvg.js} +9 -9
- package/dist/{vue-ui-molecule-DOwGWqSR.cjs → vue-ui-molecule-CWpBfXyk.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BF3WqcyN.cjs → vue-ui-mood-radar-BZE6rvtb.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-C3Boyr96.js → vue-ui-mood-radar-CXq465Aj.js} +9 -9
- package/dist/{vue-ui-nested-donuts-C9CFBzvj.js → vue-ui-nested-donuts-BSYKxbNL.js} +9 -9
- package/dist/{vue-ui-nested-donuts-DkGXmwTg.cjs → vue-ui-nested-donuts-Ca-b8_P3.cjs} +1 -1
- package/dist/{vue-ui-onion-BqzUINBq.js → vue-ui-onion-CMv38G-g.js} +9 -9
- package/dist/{vue-ui-onion-COYhqrEx.cjs → vue-ui-onion-DvRn35KQ.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-BE8Bf0MQ.cjs → vue-ui-parallel-coordinate-plot-C50SGcJo.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-DtXx6zpM.js → vue-ui-parallel-coordinate-plot-DBZUno5l.js} +10 -10
- package/dist/{vue-ui-quadrant-Cr2jm-2w.js → vue-ui-quadrant-C-jh3Grv.js} +10 -10
- package/dist/{vue-ui-quadrant-g34Ky2Hq.cjs → vue-ui-quadrant-CJo9jqLm.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-BEXF1YLk.cjs → vue-ui-quick-chart-BJ6lIxf6.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-gurflOrc.js → vue-ui-quick-chart-BvTLEmD_.js} +6 -6
- package/dist/{vue-ui-radar-B77sXFJD.cjs → vue-ui-radar-CWgrIgHA.cjs} +1 -1
- package/dist/{vue-ui-radar-DGXj7kOe.js → vue-ui-radar-Kh4Qt05I.js} +10 -10
- package/dist/{vue-ui-rating-D2wmEDux.js → vue-ui-rating-D7AkYGtK.js} +2 -2
- package/dist/{vue-ui-rating-J4wpjGDw.cjs → vue-ui-rating-DJsfvOxZ.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-8hDVUqzX.js → vue-ui-relation-circle-CXQ9FHnG.js} +5 -5
- package/dist/{vue-ui-relation-circle-CkO4PvuL.cjs → vue-ui-relation-circle-DRquG6N9.cjs} +1 -1
- package/dist/{vue-ui-rings-Bs4I_DFj.js → vue-ui-rings-BuuiGgkQ.js} +9 -9
- package/dist/{vue-ui-rings-Bt4lsykR.cjs → vue-ui-rings-DAuDNTak.cjs} +1 -1
- package/dist/{vue-ui-scatter-BcuxFe_0.js → vue-ui-scatter-Ba_1vbfG.js} +10 -10
- package/dist/{vue-ui-scatter-pnVV0nUg.cjs → vue-ui-scatter-Db1WHHMt.cjs} +1 -1
- package/dist/{vue-ui-screenshot-Q4jzniKW.cjs → vue-ui-screenshot-BgvHfkel.cjs} +1 -1
- package/dist/{vue-ui-screenshot-CkunIVDh.js → vue-ui-screenshot-rDwd1nNP.js} +1 -1
- package/dist/{vue-ui-skeleton-jYHncdu5.js → vue-ui-skeleton-DZk__alb.js} +2 -2
- package/dist/{vue-ui-skeleton-Fsru0dbb.cjs → vue-ui-skeleton-Df1qBO2k.cjs} +1 -1
- package/dist/{vue-ui-smiley-B3gIeKih.js → vue-ui-smiley-BPebp5hG.js} +2 -2
- package/dist/{vue-ui-smiley-Bd3lgUj_.cjs → vue-ui-smiley-KQFOL39h.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-CgEi2LBP.js → vue-ui-spark-trend-CSdQHPuY.js} +4 -4
- package/dist/{vue-ui-spark-trend-DfD8Q9Zl.cjs → vue-ui-spark-trend-Cr2Coq5M.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-BCmLvKvU.cjs → vue-ui-sparkbar-BIdS6UA_.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-Bu_TX-tQ.js → vue-ui-sparkbar-EhBZgeio.js} +3 -3
- package/dist/{vue-ui-sparkgauge-C_DSQGId.cjs → vue-ui-sparkgauge-DFlQ-olI.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-Cml4o6Bs.js → vue-ui-sparkgauge-DTUDMW-e.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-BsyOeGbq.js → vue-ui-sparkhistogram-CJZN2ZKW.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-BZDofxtq.cjs → vue-ui-sparkhistogram-_zChXZnF.cjs} +1 -1
- package/dist/{vue-ui-sparkline-DOsWIDug.js → vue-ui-sparkline-B0OAXqfq.js} +3 -3
- package/dist/{vue-ui-sparkline-twqIgYC3.cjs → vue-ui-sparkline-IWbHN7-r.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DTgoeXjb.cjs → vue-ui-sparkstackbar-C6tBsD3M.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DeWgfL12.js → vue-ui-sparkstackbar-wPYlidft.js} +3 -3
- package/dist/{vue-ui-strip-plot-BV27VHWB.cjs → vue-ui-strip-plot-BAcR2Zug.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-Ci-hICkJ.js → vue-ui-strip-plot-Bm0JThi4.js} +9 -9
- package/dist/{vue-ui-table-R_KFQoq4.js → vue-ui-table-6ZR-bgMx.js} +1 -1
- package/dist/{vue-ui-table-Bd9ddVGy.cjs → vue-ui-table-B0FlP2RX.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-CPOETxT8.cjs → vue-ui-table-heatmap-B2Xe1T4D.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-TYLCpM_Y.js → vue-ui-table-heatmap-bJUl4rY6.js} +4 -4
- package/dist/{vue-ui-table-sparkline-H_qcrFc0.cjs → vue-ui-table-sparkline-DgZQmNaq.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-B-qJP3Yr.js → vue-ui-table-sparkline-Dxinc_iR.js} +5 -5
- package/dist/{vue-ui-thermometer-CBybvctJ.cjs → vue-ui-thermometer-BN1harXD.cjs} +1 -1
- package/dist/{vue-ui-thermometer-fV6P7B8U.js → vue-ui-thermometer-Nb1pgJ04.js} +5 -5
- package/dist/{vue-ui-timer-CU-tJV53.js → vue-ui-timer-C17OoYkC.js} +4 -4
- package/dist/{vue-ui-timer-CwQteT9E.cjs → vue-ui-timer-_44ECu7b.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-Ba1Er97s.cjs → vue-ui-tiremarks-BSMuOb-Z.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-Dxy0W8kp.js → vue-ui-tiremarks-lbnWHaOP.js} +5 -5
- package/dist/{vue-ui-treemap-CFqf6BUd.js → vue-ui-treemap-CbdnMlBb.js} +9 -9
- package/dist/{vue-ui-treemap-CpPqA91r.cjs → vue-ui-treemap-DinP2PhP.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-Px2OPOQp.cjs → vue-ui-vertical-bar-B7cKvp6J.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-CpIgWUoF.js → vue-ui-vertical-bar-B9HnpW6M.js} +9 -9
- package/dist/{vue-ui-waffle-DbR7pPaP.js → vue-ui-waffle-70I35yZY.js} +9 -9
- package/dist/{vue-ui-waffle-BEOhRYhC.cjs → vue-ui-waffle-BaqQnh1w.cjs} +1 -1
- package/dist/{vue-ui-wheel-BkbAV9mu.js → vue-ui-wheel-C8YTOjwd.js} +5 -5
- package/dist/{vue-ui-wheel-C4H-fBbx.cjs → vue-ui-wheel-DZbEyD4l.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-B8vX27Pz.cjs → vue-ui-word-cloud-DkJyoTg9.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-704bFMO3.js → vue-ui-word-cloud-Don3Oz-A.js} +6 -6
- package/dist/{vue-ui-xy-B8qzx04X.cjs → vue-ui-xy-DkBLRZ6y.cjs} +1 -1
- package/dist/{vue-ui-xy-kFskWWiT.js → vue-ui-xy-XJp90Tih.js} +12 -12
- package/dist/{vue-ui-xy-canvas-CJO0hp3z.js → vue-ui-xy-canvas-CsPcJxOA.js} +10 -10
- package/dist/{vue-ui-xy-canvas-BVhRHPYN.cjs → vue-ui-xy-canvas-Do2LgfMo.cjs} +1 -1
- package/package.json +1 -1
- package/dist/vue-ui-carousel-table-FMfXIF7s.cjs +0 -1
- package/dist/vue-ui-carousel-table-S3daEHYR.js +0 -330
- package/dist/vue-ui-kpi-Mbre-_3M.cjs +0 -1
- package/dist/vue-ui-kpi-u5GBFKBR.js +0 -54
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useCssVars as $e, computed as c, ref as g, onMounted as Ce, openBlock as s, createElementBlock as n, normalizeClass as H, normalizeStyle as f, createVNode as J, createCommentVNode as y, createBlock as Q, unref as b, createSlots as Le, withCtx as k, renderSlot as m, normalizeProps as X, guardReactiveProps as U, Fragment as T, renderList as S, createElementVNode as u, toDisplayString as p, withKeys as ze, createTextVNode as Te, nextTick as Se } from "vue";
|
|
2
|
-
import { u as Ae, o as Ne, e as ye, c as Z, t as Me, g as Fe, H as ee, X as Ve, C as te, f as he, v as Ie, w as Oe, n as Pe, q as Be } from "./index-
|
|
3
|
-
import { _ as Re } from "./Title-
|
|
4
|
-
import { u as Ee, U as Ge } from "./usePrinter-
|
|
5
|
-
import { _ as He } from "./Tooltip-
|
|
6
|
-
import Xe from "./vue-ui-skeleton-
|
|
7
|
-
import Ue from "./BaseIcon-
|
|
8
|
-
import Ye from "./vue-ui-accordion-
|
|
9
|
-
import { u as ge } from "./useNestedProp-
|
|
2
|
+
import { u as Ae, o as Ne, e as ye, c as Z, t as Me, g as Fe, H as ee, X as Ve, C as te, f as he, v as Ie, w as Oe, n as Pe, q as Be } from "./index-BE6fhUyH.js";
|
|
3
|
+
import { _ as Re } from "./Title-BcNPXpKX.js";
|
|
4
|
+
import { u as Ee, U as Ge } from "./usePrinter-CdIphKpF.js";
|
|
5
|
+
import { _ as He } from "./Tooltip-etzDGo1Y.js";
|
|
6
|
+
import Xe from "./vue-ui-skeleton-DZk__alb.js";
|
|
7
|
+
import Ue from "./BaseIcon-CHBghp3_.js";
|
|
8
|
+
import Ye from "./vue-ui-accordion-Dmz7RUKz.js";
|
|
9
|
+
import { u as ge } from "./useNestedProp-BcjRW6BJ.js";
|
|
10
10
|
import { _ as je } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
11
|
const De = ["id"], We = ["xmlns", "viewBox"], qe = ["x", "y", "width", "height", "fill", "stroke", "stroke-width"], Ke = ["x", "y", "width", "height", "fill", "stroke", "stroke-width"], Je = ["font-size", "font-weight", "fill", "x", "y"], Qe = ["x", "y", "width", "height", "onMouseover"], Ze = { key: 0 }, et = ["font-size", "fill", "x", "y", "font-weight"], tt = { key: 0 }, lt = ["x", "y", "font-size", "fill", "font-weight"], at = { key: 1 }, ot = ["x", "y", "width", "height", "stroke", "stroke-width"], st = { key: 2 }, ut = ["id"], nt = ["stop-color"], it = ["stop-color"], rt = ["x", "y", "font-size", "fill"], dt = ["x", "y", "height", "rx", "fill"], vt = ["x", "y", "font-size", "fill"], ct = ["stroke", "x1", "x2", "y1", "y2"], yt = ["fill", "d"], ht = { key: 3 }, gt = {
|
|
12
12
|
id: "colorScaleHorizontal",
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { computed as C, ref as f, onMounted as k, watch as b, openBlock as F, createElementBlock as h, normalizeClass as s, normalizeStyle as n, createElementVNode as c, renderSlot as o, createTextVNode as d, toDisplayString as $, unref as N } from "vue";
|
|
2
|
+
import { u as S } from "./useNestedProp-BcjRW6BJ.js";
|
|
3
|
+
import { u as g, f as z } from "./index-BE6fhUyH.js";
|
|
4
|
+
const M = {
|
|
5
|
+
__name: "vue-ui-kpi",
|
|
6
|
+
props: {
|
|
7
|
+
config: {
|
|
8
|
+
type: Object,
|
|
9
|
+
default() {
|
|
10
|
+
return {};
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
dataset: {
|
|
14
|
+
type: Number,
|
|
15
|
+
default: 0
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
setup(u) {
|
|
19
|
+
const l = u, { vue_ui_kpi: p } = g(), e = C(() => S({
|
|
20
|
+
userConfig: l.config,
|
|
21
|
+
defaultConfig: p
|
|
22
|
+
})), y = f((typeof l.dataset == "number", l.dataset)), t = f(e.value.useAnimation ? e.value.animationValueStart : y.value), i = (a) => {
|
|
23
|
+
const v = e.value.animationFrames, m = Math.abs(a - t.value) / v;
|
|
24
|
+
function r() {
|
|
25
|
+
t.value < a ? t.value = Math.min(t.value + m, a) : t.value > a && (t.value = Math.max(t.value - m, a)), t.value !== a && requestAnimationFrame(r);
|
|
26
|
+
}
|
|
27
|
+
r();
|
|
28
|
+
};
|
|
29
|
+
return k(() => {
|
|
30
|
+
e.value.useAnimation ? (t.value = e.value.animationValueStart, i(l.dataset)) : t.value = l.dataset;
|
|
31
|
+
}), b(() => l.dataset, (a) => {
|
|
32
|
+
e.value.useAnimation ? i(a) : t.value = a;
|
|
33
|
+
}), (a, v) => (F(), h("div", {
|
|
34
|
+
class: s(`vue-ui-kpi ${e.value.layoutClass}`),
|
|
35
|
+
style: n(`background:${e.value.backgroundColor}; ${e.value.layoutCss}`)
|
|
36
|
+
}, [
|
|
37
|
+
c("div", {
|
|
38
|
+
class: s(`vue-ui-kpi-title ${e.value.titleClass}`),
|
|
39
|
+
style: n(`font-family: ${e.value.fontFamily}; font-size:${e.value.titleFontSize}px; color:${e.value.titleColor}; font-weight:${e.value.titleBold ? "bold" : "normal"}; ${e.value.titleCss}`)
|
|
40
|
+
}, [
|
|
41
|
+
o(a.$slots, "title", { comment: u.dataset }),
|
|
42
|
+
d(" " + $(e.value.title), 1)
|
|
43
|
+
], 6),
|
|
44
|
+
o(a.$slots, "comment-before", { comment: u.dataset }),
|
|
45
|
+
c("div", {
|
|
46
|
+
class: s(`vue-ui-kpi-value ${e.value.valueClass}`),
|
|
47
|
+
style: n(`font-family: ${e.value.fontFamily}; font-size:${e.value.valueFontSize}px; color:${e.value.valueColor}; font-weight:${e.value.valueBold ? "bold" : "normal"}; ${e.value.valueCss}`)
|
|
48
|
+
}, [
|
|
49
|
+
o(a.$slots, "value", { comment: u.dataset }),
|
|
50
|
+
d(" " + $(N(z)({ p: e.value.prefix, v: t.value, s: e.value.suffix, r: e.value.valueRounding })), 1)
|
|
51
|
+
], 6),
|
|
52
|
+
o(a.$slots, "comment-after", { comment: u.dataset })
|
|
53
|
+
], 6));
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
export {
|
|
57
|
+
M as default
|
|
58
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),c=require("./useNestedProp-B_z4-n52.cjs"),v=require("./index-BFH7X8WG.cjs"),f={__name:"vue-ui-kpi",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(u){const o=u,{vue_ui_kpi:m}=v.useConfig(),e=a.computed(()=>c.useNestedProp({userConfig:o.config,defaultConfig:m})),d=a.ref((typeof o.dataset=="number",o.dataset)),l=a.ref(e.value.useAnimation?e.value.animationValueStart:d.value),n=t=>{const s=e.value.animationFrames,i=Math.abs(t-l.value)/s;function r(){l.value<t?l.value=Math.min(l.value+i,t):l.value>t&&(l.value=Math.max(l.value-i,t)),l.value!==t&&requestAnimationFrame(r)}r()};return a.onMounted(()=>{e.value.useAnimation?(l.value=e.value.animationValueStart,n(o.dataset)):l.value=o.dataset}),a.watch(()=>o.dataset,t=>{e.value.useAnimation?n(t):l.value=t}),(t,s)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(`vue-ui-kpi ${e.value.layoutClass}`),style:a.normalizeStyle(`background:${e.value.backgroundColor}; ${e.value.layoutCss}`)},[a.createElementVNode("div",{class:a.normalizeClass(`vue-ui-kpi-title ${e.value.titleClass}`),style:a.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.titleFontSize}px; color:${e.value.titleColor}; font-weight:${e.value.titleBold?"bold":"normal"}; ${e.value.titleCss}`)},[a.renderSlot(t.$slots,"title",{comment:u.dataset}),a.createTextVNode(" "+a.toDisplayString(e.value.title),1)],6),a.renderSlot(t.$slots,"comment-before",{comment:u.dataset}),a.createElementVNode("div",{class:a.normalizeClass(`vue-ui-kpi-value ${e.value.valueClass}`),style:a.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.valueFontSize}px; color:${e.value.valueColor}; font-weight:${e.value.valueBold?"bold":"normal"}; ${e.value.valueCss}`)},[a.renderSlot(t.$slots,"value",{comment:u.dataset}),a.createTextVNode(" "+a.toDisplayString(a.unref(v.dataLabel)({p:e.value.prefix,v:l.value,s:e.value.suffix,r:e.value.valueRounding})),1)],6),a.renderSlot(t.$slots,"comment-after",{comment:u.dataset})],6))}};exports.default=f;
|
|
@@ -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-B_z4-n52.cjs"),n=require("./index-BFH7X8WG.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,6 +1,6 @@
|
|
|
1
1
|
import { useCssVars as h, computed as r, ref as f, openBlock as n, createElementBlock as u, unref as M, createElementVNode as t, normalizeStyle as l, createCommentVNode as a } from "vue";
|
|
2
|
-
import { u as m } from "./useNestedProp-
|
|
3
|
-
import { u as y, X as L } from "./index-
|
|
2
|
+
import { u as m } from "./useNestedProp-BcjRW6BJ.js";
|
|
3
|
+
import { u as y, X as L } from "./index-BE6fhUyH.js";
|
|
4
4
|
import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const b = ["xmlns", "viewBox"], x = { key: 0 }, $ = ["stroke"], w = ["stroke"], A = ["stroke"], N = { key: 1 }, O = ["stroke"], S = { key: 2 }, F = ["stroke"], I = {
|
|
6
6
|
__name: "vue-ui-mini-loader",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { toRef as ne, resolveComponent as re, openBlock as s, createElementBlock as r, Fragment as y, renderList as N, withModifiers as M, createBlock as U, createCommentVNode as m, createElementVNode as x, toDisplayString as Te, normalizeStyle as K, createVNode as R, computed as B, onMounted as Ve, ref as g, normalizeClass as Ce, unref as I, createSlots as Ye, withCtx as $, renderSlot as P, normalizeProps as Z, guardReactiveProps as J, createTextVNode as We, nextTick as $e } from "vue";
|
|
2
|
-
import { u as qe, o as Ze, e as Je, c as xe, t as Ke, a as Qe, p as we, b as _e, X as et, l as tt, I as ot, n as lt, q as at, v as st, w as nt } from "./index-
|
|
3
|
-
import { _ as rt } from "./Title-
|
|
4
|
-
import { u as it, U as ut } from "./usePrinter-
|
|
5
|
-
import { D as ct } from "./DataTable-
|
|
6
|
-
import { _ as dt } from "./Tooltip-
|
|
7
|
-
import W from "./BaseIcon-
|
|
8
|
-
import vt from "./vue-ui-skeleton-
|
|
9
|
-
import ft from "./vue-ui-accordion-
|
|
10
|
-
import { u as Pe } from "./useNestedProp-
|
|
2
|
+
import { u as qe, o as Ze, e as Je, c as xe, t as Ke, a as Qe, p as we, b as _e, X as et, l as tt, I as ot, n as lt, q as at, v as st, w as nt } from "./index-BE6fhUyH.js";
|
|
3
|
+
import { _ as rt } from "./Title-BcNPXpKX.js";
|
|
4
|
+
import { u as it, U as ut } from "./usePrinter-CdIphKpF.js";
|
|
5
|
+
import { D as ct } from "./DataTable-Dytj5HQM.js";
|
|
6
|
+
import { _ as dt } from "./Tooltip-etzDGo1Y.js";
|
|
7
|
+
import W from "./BaseIcon-CHBghp3_.js";
|
|
8
|
+
import vt from "./vue-ui-skeleton-DZk__alb.js";
|
|
9
|
+
import ft from "./vue-ui-accordion-Dmz7RUKz.js";
|
|
10
|
+
import { u as Pe } from "./useNestedProp-BcjRW6BJ.js";
|
|
11
11
|
import { _ as ht } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMouseover"], gt = {
|
|
13
13
|
__name: "RecursiveCircles",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./index-oufiZvaS.cjs"),we=require("./Title-DxNugmhI.cjs"),re=require("./usePrinter-Cc8ufBvU.cjs"),$e=require("./DataTable-CHXdpx94.cjs"),Fe=require("./Tooltip-BC2Wlz7P.cjs"),z=require("./BaseIcon-C-k_mqXL.cjs"),Pe=require("./vue-ui-skeleton-Fsru0dbb.cjs"),Ne=require("./vue-ui-accordion-DiR0dVog.cjs"),ne=require("./useNestedProp-CmTItGss.cjs"),Ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Te=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Se={__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(n,{emit:g}){const y=n;function u(a){g("zoom",a)}function c(a){g("hover",a)}return e.toRef(y,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(i=>{i.ancestor=a})}),(a,i)=>{const b=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.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,(F,P)=>(e.openBlock(),e.createElementBlock("circle",{cx:F.x,cy:F.y,r:v.circleRadius,fill:`url(#gradient_${v.color})`,stroke:n.hoveredUid&&n.hoveredUid===v.uid?n.strokeHovered:n.stroke,"stroke-width":n.hoveredUid&&n.hoveredUid===v.uid?v.circleRadius/6:v.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(h=>u(v),["stop"]),onMouseover:h=>c(v),onMouseleave:i[0]||(i[0]=h=>c(null))},null,40,Te))),256)),v.nodes&&v.nodes.length>0?(e.openBlock(),e.createBlock(b,{key:0,dataset:v.nodes,color:n.color,stroke:n.stroke,strokeHovered:n.strokeHovered,hoveredUid:n.hoveredUid,onZoom:u,onHover:c},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Ve=["x1","y1","x2","y2","stroke","stroke-width"],Re=["x1","y1","x2","y2","stroke","stroke-width"],Le={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(n){const g=n;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(n.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,(i,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.ancestor&&a.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:i.x,y1:i.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:n.backgroundColor,"stroke-width":a.circleRadius/1.5},null,8,Ve),e.createElementVNode("line",{x1:i.x,y1:i.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:n.color,"stroke-width":a.circleRadius/2},null,8,Re)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.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:n.color,backgroundColor:n.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},ze=["x","y","fill","font-size"],Me={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(n,{emit:g}){const y=n;return e.toRef(y,"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(n.dataset,i=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.polygonPath&&i.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.polygonPath.coordinates,b=>(e.openBlock(),e.createElementBlock("text",{x:b.x,y:b.y+i.circleRadius*2,fill:n.color,"font-size":i.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(i.name),9,ze))),256)),i.nodes&&i.nodes.length>0?(e.openBlock(),e.createBlock(a,{key:0,dataset:i.nodes,color:n.color,hoveredUid:n.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},De={style:{position:"relative",height:"100%",width:"100%"}},Ue={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(n,{emit:g}){return(y,u)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`position: ${n.isFullscreen?"fixed":"absolute"};bottom:0;right:${n.isFullscreen?"12px":"0"};width:80px;height:80px`),"data-html2canvas-ignore":""},[e.createElementVNode("div",De,[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:n.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:n.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:n.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:n.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:n.color,name:"close",style:{cursor:"pointer"},strokeWidth:2},null,8,["stroke"])])])],4))}},Ie=["id"],Oe=["xmlns","viewBox"],He=["id"],qe=["stop-color"],Ae=["stop-color"],je={key:4,class:"vue-data-ui-watermark"},Ge=["innerHTML"],Xe={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(n,{expose:g}){const y=n,{vue_ui_molecule:u}=p.useConfig(),c=e.computed(()=>!!y.dataset&&y.dataset.length);e.onMounted(()=>{p.objectIsEmpty(y.dataset)&&p.error({componentName:"VueUiMolecule",type:"dataset"})});const B=e.ref(p.createUid()),a=e.ref(null),i=e.ref(!1),b=e.ref(""),v=e.ref(null),F=e.ref(null),P=e.ref(!1),h=e.ref(null),G=e.ref(null),D=e.ref(0),o=e.computed(()=>{const t=ne.useNestedProp({userConfig:y.config,defaultConfig:u});return t.theme?{...ne.useNestedProp({userConfig:p.themes.vue_ui_molecule[t.theme]||y.config,defaultConfig:t}),customPalette:p.themePalettes[t.theme]||p.palette}:t}),{isPrinting:X,isImaging:Y,generatePdf:W,generateImage:Z}=re.usePrinter({elementId:`cluster_${B.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),ae=e.computed(()=>p.convertCustomPalette(o.value.customPalette)),k=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function J(t,l=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?J(t[0].nodes,l+1):l}function se(){const t=J(y.dataset);let l=100,r=l;for(let d=0;d<t;d+=1)l/=1,r+=l;return{height:r,width:r}}const x=e.ref(se()),U=e.ref(`0 0 ${x.value.width} ${x.value.height}`);function K(t,l={x:-x.value.width/2.43,y:x.value.height/2},r=x.value.width/1.1,d=24,s=0,f=0,V="#BBBBBB"){if(t&&t.length>0){const A=p.createPolygonPath({plot:l,radius:r,sides:t.length,rotation:s});t.forEach((m,$)=>{const R=A.coordinates[$];let w;if(m.ancestor?m.ancestor.ancestor?w=m.ancestor.color||V:(w=ae.value[f]||p.palette[f]||V,f+=1):w=V,m.polygonPath={coordinates:[R]},m.circleRadius=d,m.color=w,m.uid=p.createUid(),m.nodes&&m.nodes.length>0){const j=!m.ancestor||!m.ancestor.ancestor?f:0;m.nodes=K(m.nodes,R,r/2.9,d/2.2,s+Math.PI*$/m.nodes.length,j,w)}})}return t}function ie(t){const l=new Set;function r(s){s.forEach(f=>{f.color&&!l.has(f.color)&&l.add(f.color),f.nodes&&f.nodes.length>0&&r(f.nodes)})}r(t);const d={};return Array.from(l).forEach((s,f)=>{d[s]=`gradient_${f}`}),d}const ue=e.computed(()=>ie(C.value)),C=e.computed(()=>K(y.dataset));function I(){P.value=!1,F.value=null,G.value=null,h.value=null,H({polygonPath:{coordinates:[{x:x.value.width/2,y:x.value.height/2}]},circleRadius:24})}const O=e.ref(null);function H(t){v.value.focus(),e.nextTick(()=>{O.value&&cancelAnimationFrame(O.value);const l=U.value.split(" "),r=parseFloat(l[0]),d=parseFloat(l[1]),s=parseFloat(l[2]),f=parseFloat(l[3]),{x:V,y:A}=t.polygonPath.coordinates[0],{circleRadius:m}=t,$=8.34,R=V-m*$,w=A-m*$,j=m*$*2,ye=m*$*2,ke=Math.sqrt((R-r)**2+(w-d)**2),L=Math.min(1200,Math.max(20,Math.floor(ke/10))),be=(R-r)/L,Ce=(w-d)/L,Be=(j-s)/L,xe=(ye-f)/L;let E=0;function le(){U.value=`${r+be*E} ${d+Ce*E} ${s+Be*E} ${f+xe*E}`,E+=o.value.style.chart.zoom.speed,E<=L&&(O.value=requestAnimationFrame(le))}le()})}function ce(t){F.value===t.uid?I():(F.value=t.uid,G.value=t,h.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},H(t),P.value=t.uid!==C.value[0].uid)}function de(t){if(t.target.nodeName!=="circle")I(),P.value=!1;else return}const q=e.ref(null);function ve(t){q.value={datapoint:t,seriesIndex:-1,series:C.value,config:o.value};const l=o.value.style.chart.tooltip.customFormat;if(p.isFunction(l)&&p.functionReturnsString(()=>l({seriesIndex:-1,datapoint:t,series:C.value,config:o.value})))b.value=l({seriesIndex:-1,datapoint:t,series:C.value,config:o.value});else{let r="";r+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`,t.details&&(r+=`<div style="width:100%;border-top:1px solid ${o.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`),b.value=`<div style="font-family:inherit">${r}</div>`}}const Q=e.ref(null),T=e.ref(null);function fe(t){Q.value=t,t?(i.value=!0,ve(t),T.value=t.uid):(i.value=!1,b.value="",T.value=null)}function M(t){t==="right"&&(h.value.polygonPath.coordinates[0].x+=h.value.circleRadius),t==="left"&&(h.value.polygonPath.coordinates[0].x-=h.value.circleRadius),t==="top"&&(h.value.polygonPath.coordinates[0].y-=h.value.circleRadius),t==="bottom"&&(h.value.polygonPath.coordinates[0].y+=h.value.circleRadius),H(h.value)}function me(t){const l=[];function r(d){d.forEach(s=>{const f={name:s.name,details:s.details||"-",ancestor:s.ancestor&&s.ancestor.name||"-",color:s.color||""};l.push(f),s.nodes&&s.nodes.length>0&&r(s.nodes,s.name)})}return r(t),l}const pe=e.computed(()=>me(C.value)),N=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],l=pe.value.map((s,f)=>[{color:s.color,name:s.name},s.details,s.ancestor||""]),r={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},d=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor];return{head:t,body:l,config:r,colNames:d}});function _(){e.nextTick(()=>{const t=N.value.body.map((d,s)=>[[d[0].name],[d[1]],[d[2]]]),l=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(t),r=p.createCsvContent(l);p.downloadCsv({csvContent:r,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function he(){return C.value}const S=e.ref(!1);function ge(t){S.value=t,D.value+=1}function ee(){k.value.showTable=!k.value.showTable}function te(){k.value.showDataLabels=!k.value.showDataLabels}function oe(){k.value.showTooltip=!k.value.showTooltip}return g({getData:he,generatePdf:W,generateCsv:_,generateImage:Z,toggleTable:ee,toggleLabels:te,toggleTooltip:oe}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{onMouseleave:l[7]||(l[7]=r=>{Q.value=null,T.value=null}),ref_key:"moleculeChart",ref:v,class:e.normalizeClass(`vue-ui-molecule ${S.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_${B.value}`},[o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${o.value.style.chart.backgroundColor};`)},[e.createVNode(we._sfc_main,{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"])],4)):e.createCommentVNode("",!0),o.value.userOptions.show&&c.value?(e.openBlock(),e.createBlock(re.UserOptions,{ref_key:"details",ref:a,key:`user_options_${D.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(X),isImaging:e.unref(Y),uid:B.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:v.value,onToggleFullscreen:ge,onGeneratePdf:e.unref(W),onGenerateCsv:_,onGenerateImage:e.unref(Z),onToggleTable:ee,onToggleLabels:te,onToggleTooltip:oe},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:r,isFullscreen:d})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:d})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(p.XMLNS),viewBox:U.value,class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),style:e.normalizeStyle(`overflow: hidden; background:${o.value.style.chart.backgroundColor};color:${o.value.style.chart.color}`),onClick:l[0]||(l[0]=e.withModifiers(r=>de(r),["stop"]))},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(ue.value),r=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${r}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(p.lightenHexColor)(r,.5)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":r},null,8,Ae)],8,He))),256))]),e.createVNode(Le,{dataset:C.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Se,{dataset:C.value,hoveredUid:T.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:ce,onHover:fe},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),k.value.showDataLabels?(e.openBlock(),e.createBlock(Me,{key:0,dataset:C.value,color:o.value.style.chart.color,hoveredUid:T.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:x.value},void 0,!0)],14,Oe)):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createBlock(Ue,{key:`direction_pad_${D.value}`,color:o.value.style.chart.color,isFullscreen:S.value,onMoveLeft:l[1]||(l[1]=r=>M("left")),onMoveRight:l[2]||(l[2]=r=>M("right")),onMoveTop:l[3]||(l[3]=r=>M("top")),onMoveBottom:l[4]||(l[4]=r=>M("bottom")),onReset:l[5]||(l[5]=r=>{I(),P.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",je,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(X)||e.unref(Y)})),void 0,!0)])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Pe.default,{key:5,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Fe._sfc_main,{show:k.value.showTooltip&&i.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:v.value,content:b.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({...q.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...q.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),c.value?(e.openBlock(),e.createBlock(Ne.default,{key:6,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.createVNode($e.DataTable,{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:l[6]||(l[6]=r=>k.value.showTable=!1)},{th:e.withCtx(({th:r})=>[e.createElementVNode("div",{innerHTML:r,style:{display:"flex","align-items":"center"}},null,8,Ge)]),td:e.withCtx(({td:r})=>[e.createTextVNode(e.toDisplayString(r.name||r),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ie))}},Ye=Ee._export_sfc(Xe,[["__scopeId","data-v-a8f784eb"]]);exports.default=Ye;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./index-BFH7X8WG.cjs"),we=require("./Title-CSQdI1EY.cjs"),re=require("./usePrinter-hyuaFHQj.cjs"),$e=require("./DataTable-D_2ZW2eI.cjs"),Fe=require("./Tooltip-B-laoopT.cjs"),z=require("./BaseIcon-BkdELEYE.cjs"),Pe=require("./vue-ui-skeleton-Df1qBO2k.cjs"),Ne=require("./vue-ui-accordion-CvZhABQM.cjs"),ne=require("./useNestedProp-B_z4-n52.cjs"),Ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Te=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Se={__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(n,{emit:g}){const y=n;function u(a){g("zoom",a)}function c(a){g("hover",a)}return e.toRef(y,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(i=>{i.ancestor=a})}),(a,i)=>{const b=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.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,(F,P)=>(e.openBlock(),e.createElementBlock("circle",{cx:F.x,cy:F.y,r:v.circleRadius,fill:`url(#gradient_${v.color})`,stroke:n.hoveredUid&&n.hoveredUid===v.uid?n.strokeHovered:n.stroke,"stroke-width":n.hoveredUid&&n.hoveredUid===v.uid?v.circleRadius/6:v.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(h=>u(v),["stop"]),onMouseover:h=>c(v),onMouseleave:i[0]||(i[0]=h=>c(null))},null,40,Te))),256)),v.nodes&&v.nodes.length>0?(e.openBlock(),e.createBlock(b,{key:0,dataset:v.nodes,color:n.color,stroke:n.stroke,strokeHovered:n.strokeHovered,hoveredUid:n.hoveredUid,onZoom:u,onHover:c},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Ve=["x1","y1","x2","y2","stroke","stroke-width"],Re=["x1","y1","x2","y2","stroke","stroke-width"],Le={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(n){const g=n;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(n.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,(i,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.ancestor&&a.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:i.x,y1:i.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:n.backgroundColor,"stroke-width":a.circleRadius/1.5},null,8,Ve),e.createElementVNode("line",{x1:i.x,y1:i.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:n.color,"stroke-width":a.circleRadius/2},null,8,Re)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.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:n.color,backgroundColor:n.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},ze=["x","y","fill","font-size"],Me={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(n,{emit:g}){const y=n;return e.toRef(y,"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(n.dataset,i=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.polygonPath&&i.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.polygonPath.coordinates,b=>(e.openBlock(),e.createElementBlock("text",{x:b.x,y:b.y+i.circleRadius*2,fill:n.color,"font-size":i.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(i.name),9,ze))),256)),i.nodes&&i.nodes.length>0?(e.openBlock(),e.createBlock(a,{key:0,dataset:i.nodes,color:n.color,hoveredUid:n.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},De={style:{position:"relative",height:"100%",width:"100%"}},Ue={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(n,{emit:g}){return(y,u)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`position: ${n.isFullscreen?"fixed":"absolute"};bottom:0;right:${n.isFullscreen?"12px":"0"};width:80px;height:80px`),"data-html2canvas-ignore":""},[e.createElementVNode("div",De,[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:n.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:n.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:n.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:n.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:n.color,name:"close",style:{cursor:"pointer"},strokeWidth:2},null,8,["stroke"])])])],4))}},Ie=["id"],Oe=["xmlns","viewBox"],He=["id"],qe=["stop-color"],Ae=["stop-color"],je={key:4,class:"vue-data-ui-watermark"},Ge=["innerHTML"],Xe={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(n,{expose:g}){const y=n,{vue_ui_molecule:u}=p.useConfig(),c=e.computed(()=>!!y.dataset&&y.dataset.length);e.onMounted(()=>{p.objectIsEmpty(y.dataset)&&p.error({componentName:"VueUiMolecule",type:"dataset"})});const B=e.ref(p.createUid()),a=e.ref(null),i=e.ref(!1),b=e.ref(""),v=e.ref(null),F=e.ref(null),P=e.ref(!1),h=e.ref(null),G=e.ref(null),D=e.ref(0),o=e.computed(()=>{const t=ne.useNestedProp({userConfig:y.config,defaultConfig:u});return t.theme?{...ne.useNestedProp({userConfig:p.themes.vue_ui_molecule[t.theme]||y.config,defaultConfig:t}),customPalette:p.themePalettes[t.theme]||p.palette}:t}),{isPrinting:X,isImaging:Y,generatePdf:W,generateImage:Z}=re.usePrinter({elementId:`cluster_${B.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),ae=e.computed(()=>p.convertCustomPalette(o.value.customPalette)),k=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function J(t,l=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?J(t[0].nodes,l+1):l}function se(){const t=J(y.dataset);let l=100,r=l;for(let d=0;d<t;d+=1)l/=1,r+=l;return{height:r,width:r}}const x=e.ref(se()),U=e.ref(`0 0 ${x.value.width} ${x.value.height}`);function K(t,l={x:-x.value.width/2.43,y:x.value.height/2},r=x.value.width/1.1,d=24,s=0,f=0,V="#BBBBBB"){if(t&&t.length>0){const A=p.createPolygonPath({plot:l,radius:r,sides:t.length,rotation:s});t.forEach((m,$)=>{const R=A.coordinates[$];let w;if(m.ancestor?m.ancestor.ancestor?w=m.ancestor.color||V:(w=ae.value[f]||p.palette[f]||V,f+=1):w=V,m.polygonPath={coordinates:[R]},m.circleRadius=d,m.color=w,m.uid=p.createUid(),m.nodes&&m.nodes.length>0){const j=!m.ancestor||!m.ancestor.ancestor?f:0;m.nodes=K(m.nodes,R,r/2.9,d/2.2,s+Math.PI*$/m.nodes.length,j,w)}})}return t}function ie(t){const l=new Set;function r(s){s.forEach(f=>{f.color&&!l.has(f.color)&&l.add(f.color),f.nodes&&f.nodes.length>0&&r(f.nodes)})}r(t);const d={};return Array.from(l).forEach((s,f)=>{d[s]=`gradient_${f}`}),d}const ue=e.computed(()=>ie(C.value)),C=e.computed(()=>K(y.dataset));function I(){P.value=!1,F.value=null,G.value=null,h.value=null,H({polygonPath:{coordinates:[{x:x.value.width/2,y:x.value.height/2}]},circleRadius:24})}const O=e.ref(null);function H(t){v.value.focus(),e.nextTick(()=>{O.value&&cancelAnimationFrame(O.value);const l=U.value.split(" "),r=parseFloat(l[0]),d=parseFloat(l[1]),s=parseFloat(l[2]),f=parseFloat(l[3]),{x:V,y:A}=t.polygonPath.coordinates[0],{circleRadius:m}=t,$=8.34,R=V-m*$,w=A-m*$,j=m*$*2,ye=m*$*2,ke=Math.sqrt((R-r)**2+(w-d)**2),L=Math.min(1200,Math.max(20,Math.floor(ke/10))),be=(R-r)/L,Ce=(w-d)/L,Be=(j-s)/L,xe=(ye-f)/L;let E=0;function le(){U.value=`${r+be*E} ${d+Ce*E} ${s+Be*E} ${f+xe*E}`,E+=o.value.style.chart.zoom.speed,E<=L&&(O.value=requestAnimationFrame(le))}le()})}function ce(t){F.value===t.uid?I():(F.value=t.uid,G.value=t,h.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},H(t),P.value=t.uid!==C.value[0].uid)}function de(t){if(t.target.nodeName!=="circle")I(),P.value=!1;else return}const q=e.ref(null);function ve(t){q.value={datapoint:t,seriesIndex:-1,series:C.value,config:o.value};const l=o.value.style.chart.tooltip.customFormat;if(p.isFunction(l)&&p.functionReturnsString(()=>l({seriesIndex:-1,datapoint:t,series:C.value,config:o.value})))b.value=l({seriesIndex:-1,datapoint:t,series:C.value,config:o.value});else{let r="";r+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`,t.details&&(r+=`<div style="width:100%;border-top:1px solid ${o.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`),b.value=`<div style="font-family:inherit">${r}</div>`}}const Q=e.ref(null),T=e.ref(null);function fe(t){Q.value=t,t?(i.value=!0,ve(t),T.value=t.uid):(i.value=!1,b.value="",T.value=null)}function M(t){t==="right"&&(h.value.polygonPath.coordinates[0].x+=h.value.circleRadius),t==="left"&&(h.value.polygonPath.coordinates[0].x-=h.value.circleRadius),t==="top"&&(h.value.polygonPath.coordinates[0].y-=h.value.circleRadius),t==="bottom"&&(h.value.polygonPath.coordinates[0].y+=h.value.circleRadius),H(h.value)}function me(t){const l=[];function r(d){d.forEach(s=>{const f={name:s.name,details:s.details||"-",ancestor:s.ancestor&&s.ancestor.name||"-",color:s.color||""};l.push(f),s.nodes&&s.nodes.length>0&&r(s.nodes,s.name)})}return r(t),l}const pe=e.computed(()=>me(C.value)),N=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],l=pe.value.map((s,f)=>[{color:s.color,name:s.name},s.details,s.ancestor||""]),r={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},d=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor];return{head:t,body:l,config:r,colNames:d}});function _(){e.nextTick(()=>{const t=N.value.body.map((d,s)=>[[d[0].name],[d[1]],[d[2]]]),l=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(t),r=p.createCsvContent(l);p.downloadCsv({csvContent:r,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function he(){return C.value}const S=e.ref(!1);function ge(t){S.value=t,D.value+=1}function ee(){k.value.showTable=!k.value.showTable}function te(){k.value.showDataLabels=!k.value.showDataLabels}function oe(){k.value.showTooltip=!k.value.showTooltip}return g({getData:he,generatePdf:W,generateCsv:_,generateImage:Z,toggleTable:ee,toggleLabels:te,toggleTooltip:oe}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{onMouseleave:l[7]||(l[7]=r=>{Q.value=null,T.value=null}),ref_key:"moleculeChart",ref:v,class:e.normalizeClass(`vue-ui-molecule ${S.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_${B.value}`},[o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${o.value.style.chart.backgroundColor};`)},[e.createVNode(we._sfc_main,{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"])],4)):e.createCommentVNode("",!0),o.value.userOptions.show&&c.value?(e.openBlock(),e.createBlock(re.UserOptions,{ref_key:"details",ref:a,key:`user_options_${D.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(X),isImaging:e.unref(Y),uid:B.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:v.value,onToggleFullscreen:ge,onGeneratePdf:e.unref(W),onGenerateCsv:_,onGenerateImage:e.unref(Z),onToggleTable:ee,onToggleLabels:te,onToggleTooltip:oe},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:r,isFullscreen:d})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:d})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(p.XMLNS),viewBox:U.value,class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),style:e.normalizeStyle(`overflow: hidden; background:${o.value.style.chart.backgroundColor};color:${o.value.style.chart.color}`),onClick:l[0]||(l[0]=e.withModifiers(r=>de(r),["stop"]))},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(ue.value),r=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${r}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(p.lightenHexColor)(r,.5)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":r},null,8,Ae)],8,He))),256))]),e.createVNode(Le,{dataset:C.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Se,{dataset:C.value,hoveredUid:T.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:ce,onHover:fe},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),k.value.showDataLabels?(e.openBlock(),e.createBlock(Me,{key:0,dataset:C.value,color:o.value.style.chart.color,hoveredUid:T.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:x.value},void 0,!0)],14,Oe)):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createBlock(Ue,{key:`direction_pad_${D.value}`,color:o.value.style.chart.color,isFullscreen:S.value,onMoveLeft:l[1]||(l[1]=r=>M("left")),onMoveRight:l[2]||(l[2]=r=>M("right")),onMoveTop:l[3]||(l[3]=r=>M("top")),onMoveBottom:l[4]||(l[4]=r=>M("bottom")),onReset:l[5]||(l[5]=r=>{I(),P.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",je,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(X)||e.unref(Y)})),void 0,!0)])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Pe.default,{key:5,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Fe._sfc_main,{show:k.value.showTooltip&&i.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:v.value,content:b.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({...q.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...q.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),c.value?(e.openBlock(),e.createBlock(Ne.default,{key:6,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.createVNode($e.DataTable,{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:l[6]||(l[6]=r=>k.value.showTable=!1)},{th:e.withCtx(({th:r})=>[e.createElementVNode("div",{innerHTML:r,style:{display:"flex","align-items":"center"}},null,8,Ge)]),td:e.withCtx(({td:r})=>[e.createTextVNode(e.toDisplayString(r.name||r),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ie))}},Ye=Ee._export_sfc(Xe,[["__scopeId","data-v-a8f784eb"]]);exports.default=Ye;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-oufiZvaS.cjs"),W=require("./Title-DxNugmhI.cjs"),B=require("./usePrinter-Cc8ufBvU.cjs"),G=require("./Legend-BwrzHxLy.cjs"),p=require("./BaseIcon-C-k_mqXL.cjs"),U=require("./DataTable-CHXdpx94.cjs"),H=require("./vue-ui-skeleton-Fsru0dbb.cjs"),R=require("./vue-ui-accordion-DiR0dVog.cjs"),E=require("./useNestedProp-CmTItGss.cjs"),X=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),K=["id"],Y=["xmlns","viewBox"],J=["id"],Q=["stop-color"],Z=["stop-color"],ee=["x1","y1","x2","y2","stroke","stroke-width"],te=["d","stroke","stroke-width"],oe=["stroke"],le=["fill"],ae=["stroke"],re=["fill"],ne=["stroke"],se=["fill"],ue=["stroke"],ie=["fill"],ce=["stroke"],de=["fill"],ye=["d","stroke","stroke-width","fill"],ve=["x1","y1","stroke"],me=["cx","cy","fill","stroke"],he=["fill","stroke"],ke=["y","fill","font-weight"],pe=["y","fill"],fe={key:3,class:"vue-data-ui-watermark"},ge=["onClick"],be={style:{"font-weight":"bold"}},Ce=["innerHTML"],Ne={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(S,{expose:T}){const s=S,{vue_ui_mood_radar:F}=n.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{n.objectIsEmpty(s.dataset)&&n.error({componentName:"VueUiMoodRadar",type:"dataset"})});const h=e.ref(n.createUid()),N=e.ref(null),A=e.ref(null),r=e.ref(null),t=e.computed(()=>{const l=E.useNestedProp({userConfig:s.config,defaultConfig:F});return l.theme?{...E.useNestedProp({userConfig:n.themes.vue_ui_mood_radar[l.theme]||s.config,defaultConfig:l})}:l}),{isPrinting:x,isImaging:w,generatePdf:_,generateImage:V}=B.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),f=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),C=e.computed(()=>n.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function L({centerX:l,centerY:a,apexX:o,apexY:i,proportion:c,key:k,value:q}){return{x:l+(o-l)*c,y:a+(i-a)*c,key:k,value:q}}const I=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)),u=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)),$=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(s.dataset[l])&&n.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),C.value.coordinates.map((l,a)=>{const o=L({centerX:d.value.width/2,centerY:d.value.height/2,apexX:l.x,apexY:l.y,proportion:u.value[a].value/I.value,key:u.value[a].key,value:u.value[a].value});return{...l,plots:o,key:u.value[a].key}})):[]),O=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 z(l){l===r.value?r.value=null:r.value=l}const y=e.computed(()=>{const l=u.value.map(o=>({name:o.key,color:o.color})),a=u.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function M(){e.nextTick(()=>{const l=y.value.head.map((i,c)=>[[i.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=n.createCsvContent(a);n.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,k)=>[{color:c.color,name:c.name},y.value.body[k].toFixed(t.value.table.td.roundingValue),isNaN(y.value.body[k]/v.value)?"-":(y.value.body[k]/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},i=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:i}});function D(){return u.value}function P(){f.value.showTable=!f.value.showTable}const b=e.ref(!1);function j(l){b.value=l}return T({getData:D,generatePdf:_,generateCsv:M,generateImage:V,toggleTable:P}),(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;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`)},[e.createVNode(W._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"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(B.UserOptions,{key:1,ref_key:"details",ref:A,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(x),isImaging:e.unref(w),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,onToggleFullscreen:j,onGeneratePdf:e.unref(_),onGenerateCsv:M,onGenerateImage:e.unref(V),onToggleTable:P},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:i})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:i})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(n.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:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[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":t.value.style.chart.layout.dataPolygon.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,Q),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(n.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100)}${e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]}`},null,8,Z)],8,J)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.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,ee))),256)),e.createElementVNode("path",{d:C.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,te),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,oe),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=o=>r.value=5),onMouseleave:a[1]||(a[1]=o=>r.value=null),cx:"128",cy:"25",r:"20",fill:r.value===5?t.value.style.chart.layout.smileys.colors[5]+"33":"transparent"},null,40,le),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,ae),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=o=>r.value=4),onMouseleave:a[3]||(a[3]=o=>r.value=null),cx:"227",cy:"95.5",r:"20",fill:r.value===4?t.value.style.chart.layout.smileys.colors[4]+"33":"transparent"},null,40,re),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,ne),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=o=>r.value=3),onMouseleave:a[5]||(a[5]=o=>r.value=null),cx:"190",cy:"213.5",r:"20",fill:r.value===3?t.value.style.chart.layout.smileys.colors[3]+"33":"transparent"},null,40,se),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,ue),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=o=>r.value=2),onMouseleave:a[7]||(a[7]=o=>r.value=null),cx:"65",cy:"213.5",r:"20",fill:r.value===2?t.value.style.chart.layout.smileys.colors[2]+"33":"transparent"},null,40,ie),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,ce),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=o=>r.value=1),onMouseleave:a[9]||(a[9]=o=>r.value=null),cx:"29",cy:"95.5",r:"20",fill:r.value===1?t.value.style.chart.layout.smileys.colors[1]+"33":"transparent"},null,40,de),e.createElementVNode("path",{d:e.unref(n.makePath)($.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})`:t.value.style.chart.layout.dataPolygon.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,ye),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value.map(o=>o.plots),(o,i)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${r.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,ve),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,me),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,he),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(Number(o.value.toFixed(t.value.style.chart.layout.dataLabel.roundingValue)).toLocaleString()),9,ke),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(Number((o.value/v.value*100).toFixed(t.value.style.chart.layout.dataLabel.roundingPercentage)).toLocaleString())+"%) ",9,pe)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,Y)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",fe,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(x)||e.unref(w)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(H.default,{key:4,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(G.Legend,{key:5,legendSet:u.value,config:O.value,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:i})=>[e.createElementVNode("div",{onClick:()=>z(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(p.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(p.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(p.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(p.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(p.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",be,e.toDisplayString(o.value),1),e.createTextVNode(" ("+e.toDisplayString((isNaN(o.proportion)?0:o.proportion*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1)],8,ge)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:u.value},void 0,!0),m.value?(e.openBlock(),e.createBlock(R.default,{key:6,hideDetails:"",config:{open:f.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(U.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=>f.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Ce)]),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,K))}},xe=X._export_sfc(Ne,[["__scopeId","data-v-0751dc77"]]);exports.default=xe;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-BFH7X8WG.cjs"),W=require("./Title-CSQdI1EY.cjs"),B=require("./usePrinter-hyuaFHQj.cjs"),G=require("./Legend-tvvMRnbi.cjs"),p=require("./BaseIcon-BkdELEYE.cjs"),U=require("./DataTable-D_2ZW2eI.cjs"),H=require("./vue-ui-skeleton-Df1qBO2k.cjs"),R=require("./vue-ui-accordion-CvZhABQM.cjs"),E=require("./useNestedProp-B_z4-n52.cjs"),X=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),K=["id"],Y=["xmlns","viewBox"],J=["id"],Q=["stop-color"],Z=["stop-color"],ee=["x1","y1","x2","y2","stroke","stroke-width"],te=["d","stroke","stroke-width"],oe=["stroke"],le=["fill"],ae=["stroke"],re=["fill"],ne=["stroke"],se=["fill"],ue=["stroke"],ie=["fill"],ce=["stroke"],de=["fill"],ye=["d","stroke","stroke-width","fill"],ve=["x1","y1","stroke"],me=["cx","cy","fill","stroke"],he=["fill","stroke"],ke=["y","fill","font-weight"],pe=["y","fill"],fe={key:3,class:"vue-data-ui-watermark"},ge=["onClick"],be={style:{"font-weight":"bold"}},Ce=["innerHTML"],Ne={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(S,{expose:T}){const s=S,{vue_ui_mood_radar:F}=n.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{n.objectIsEmpty(s.dataset)&&n.error({componentName:"VueUiMoodRadar",type:"dataset"})});const h=e.ref(n.createUid()),N=e.ref(null),A=e.ref(null),r=e.ref(null),t=e.computed(()=>{const l=E.useNestedProp({userConfig:s.config,defaultConfig:F});return l.theme?{...E.useNestedProp({userConfig:n.themes.vue_ui_mood_radar[l.theme]||s.config,defaultConfig:l})}:l}),{isPrinting:x,isImaging:w,generatePdf:_,generateImage:V}=B.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),f=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),C=e.computed(()=>n.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function L({centerX:l,centerY:a,apexX:o,apexY:i,proportion:c,key:k,value:q}){return{x:l+(o-l)*c,y:a+(i-a)*c,key:k,value:q}}const I=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)),u=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)),$=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(s.dataset[l])&&n.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),C.value.coordinates.map((l,a)=>{const o=L({centerX:d.value.width/2,centerY:d.value.height/2,apexX:l.x,apexY:l.y,proportion:u.value[a].value/I.value,key:u.value[a].key,value:u.value[a].value});return{...l,plots:o,key:u.value[a].key}})):[]),O=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 z(l){l===r.value?r.value=null:r.value=l}const y=e.computed(()=>{const l=u.value.map(o=>({name:o.key,color:o.color})),a=u.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function M(){e.nextTick(()=>{const l=y.value.head.map((i,c)=>[[i.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=n.createCsvContent(a);n.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,k)=>[{color:c.color,name:c.name},y.value.body[k].toFixed(t.value.table.td.roundingValue),isNaN(y.value.body[k]/v.value)?"-":(y.value.body[k]/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},i=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:i}});function D(){return u.value}function P(){f.value.showTable=!f.value.showTable}const b=e.ref(!1);function j(l){b.value=l}return T({getData:D,generatePdf:_,generateCsv:M,generateImage:V,toggleTable:P}),(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;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`)},[e.createVNode(W._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"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(B.UserOptions,{key:1,ref_key:"details",ref:A,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(x),isImaging:e.unref(w),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,onToggleFullscreen:j,onGeneratePdf:e.unref(_),onGenerateCsv:M,onGenerateImage:e.unref(V),onToggleTable:P},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:i})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:i})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(n.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:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[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":t.value.style.chart.layout.dataPolygon.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,Q),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(n.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100)}${e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]}`},null,8,Z)],8,J)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.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,ee))),256)),e.createElementVNode("path",{d:C.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,te),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,oe),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=o=>r.value=5),onMouseleave:a[1]||(a[1]=o=>r.value=null),cx:"128",cy:"25",r:"20",fill:r.value===5?t.value.style.chart.layout.smileys.colors[5]+"33":"transparent"},null,40,le),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,ae),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=o=>r.value=4),onMouseleave:a[3]||(a[3]=o=>r.value=null),cx:"227",cy:"95.5",r:"20",fill:r.value===4?t.value.style.chart.layout.smileys.colors[4]+"33":"transparent"},null,40,re),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,ne),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=o=>r.value=3),onMouseleave:a[5]||(a[5]=o=>r.value=null),cx:"190",cy:"213.5",r:"20",fill:r.value===3?t.value.style.chart.layout.smileys.colors[3]+"33":"transparent"},null,40,se),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,ue),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=o=>r.value=2),onMouseleave:a[7]||(a[7]=o=>r.value=null),cx:"65",cy:"213.5",r:"20",fill:r.value===2?t.value.style.chart.layout.smileys.colors[2]+"33":"transparent"},null,40,ie),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,ce),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=o=>r.value=1),onMouseleave:a[9]||(a[9]=o=>r.value=null),cx:"29",cy:"95.5",r:"20",fill:r.value===1?t.value.style.chart.layout.smileys.colors[1]+"33":"transparent"},null,40,de),e.createElementVNode("path",{d:e.unref(n.makePath)($.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})`:t.value.style.chart.layout.dataPolygon.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,ye),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value.map(o=>o.plots),(o,i)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${r.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,ve),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,me),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,he),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(Number(o.value.toFixed(t.value.style.chart.layout.dataLabel.roundingValue)).toLocaleString()),9,ke),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(Number((o.value/v.value*100).toFixed(t.value.style.chart.layout.dataLabel.roundingPercentage)).toLocaleString())+"%) ",9,pe)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,Y)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",fe,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(x)||e.unref(w)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(H.default,{key:4,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(G.Legend,{key:5,legendSet:u.value,config:O.value,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:i})=>[e.createElementVNode("div",{onClick:()=>z(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(p.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(p.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(p.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(p.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(p.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",be,e.toDisplayString(o.value),1),e.createTextVNode(" ("+e.toDisplayString((isNaN(o.proportion)?0:o.proportion*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1)],8,ge)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:u.value},void 0,!0),m.value?(e.openBlock(),e.createBlock(R.default,{key:6,hideDetails:"",config:{open:f.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(U.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=>f.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Ce)]),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,K))}},xe=X._export_sfc(Ne,[["__scopeId","data-v-0751dc77"]]);exports.default=xe;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { computed as d, onMounted as ne, ref as C, openBlock as r, createElementBlock as g, normalizeClass as D, normalizeStyle as F, createVNode as G, createCommentVNode as u, createBlock as h, unref as i, createSlots as ue, withCtx as m, renderSlot as p, normalizeProps as E, guardReactiveProps as U, createElementVNode as a, Fragment as H, renderList as R, toDisplayString as $, createTextVNode as X, nextTick as ie } from "vue";
|
|
2
|
-
import { u as de, o as ce, e as K, c as ye, t as ve, I as he, X as me, r as I, s as fe, J as ke, n as ge, q as pe } from "./index-
|
|
3
|
-
import { _ as be } from "./Title-
|
|
4
|
-
import { u as Ce, U as xe } from "./usePrinter-
|
|
5
|
-
import { L as _e } from "./Legend-
|
|
6
|
-
import M from "./BaseIcon-
|
|
7
|
-
import { D as we } from "./DataTable-
|
|
8
|
-
import $e from "./vue-ui-skeleton-
|
|
9
|
-
import Me from "./vue-ui-accordion-
|
|
10
|
-
import { u as q } from "./useNestedProp-
|
|
2
|
+
import { u as de, o as ce, e as K, c as ye, t as ve, I as he, X as me, r as I, s as fe, J as ke, n as ge, q as pe } from "./index-BE6fhUyH.js";
|
|
3
|
+
import { _ as be } from "./Title-BcNPXpKX.js";
|
|
4
|
+
import { u as Ce, U as xe } from "./usePrinter-CdIphKpF.js";
|
|
5
|
+
import { L as _e } from "./Legend-Ct8LnAy4.js";
|
|
6
|
+
import M from "./BaseIcon-CHBghp3_.js";
|
|
7
|
+
import { D as we } from "./DataTable-Dytj5HQM.js";
|
|
8
|
+
import $e from "./vue-ui-skeleton-DZk__alb.js";
|
|
9
|
+
import Me from "./vue-ui-accordion-Dmz7RUKz.js";
|
|
10
|
+
import { u as q } from "./useNestedProp-BcjRW6BJ.js";
|
|
11
11
|
import { _ as Ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
const Pe = ["id"], Te = ["xmlns", "viewBox"], Fe = ["id"], Ae = ["stop-color"], Ie = ["stop-color"], Le = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Oe = ["d", "stroke", "stroke-width"], Se = ["stroke"], je = ["fill"], Ve = ["stroke"], Be = ["fill"], We = ["stroke"], ze = ["fill"], De = ["stroke"], Ge = ["fill"], Ee = ["stroke"], Ue = ["fill"], He = ["d", "stroke", "stroke-width", "fill"], Re = ["x1", "y1", "stroke"], Xe = ["cx", "cy", "fill", "stroke"], Ke = ["fill", "stroke"], qe = ["y", "fill", "font-weight"], Je = ["y", "fill"], Ye = {
|
|
13
13
|
key: 3,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { computed as _, ref as c, onMounted as Me, onBeforeUnmount as Be, watch as Ue, openBlock as u, createElementBlock as n, normalizeClass as z, normalizeStyle as oe, createVNode as se, createCommentVNode as y, createBlock as W, unref as r, createSlots as Ee, withCtx as m, renderSlot as $, normalizeProps as H, guardReactiveProps as q, createElementVNode as p, Fragment as w, renderList as C, toDisplayString as N, createTextVNode as j, nextTick as Re, pushScopeId as Ge, popScopeId as Ye } from "vue";
|
|
2
|
-
import { u as Xe, c as We, t as He, a as qe, p as J, o as je, e as O, b as Je, d as Ke, m as Ce, f as T, X as Qe, E as Ze, j as A, k as ue, v as Le, w as et, n as tt, q as lt } from "./index-
|
|
2
|
+
import { u as Xe, c as We, t as He, a as qe, p as J, o as je, e as O, b as Je, d as Ke, m as Ce, f as T, X as Qe, E as Ze, j as A, k as ue, v as Le, w as et, n as tt, q as lt } from "./index-BE6fhUyH.js";
|
|
3
3
|
import { t as at, u as ot } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as st } from "./Title-
|
|
5
|
-
import { u as ut, U as nt } from "./usePrinter-
|
|
6
|
-
import { D as rt } from "./DataTable-
|
|
7
|
-
import { _ as it } from "./Tooltip-
|
|
8
|
-
import { L as dt } from "./Legend-
|
|
9
|
-
import ct from "./vue-ui-skeleton-
|
|
10
|
-
import vt from "./vue-ui-accordion-
|
|
11
|
-
import { u as Se } from "./useNestedProp-
|
|
4
|
+
import { _ as st } from "./Title-BcNPXpKX.js";
|
|
5
|
+
import { u as ut, U as nt } from "./usePrinter-CdIphKpF.js";
|
|
6
|
+
import { D as rt } from "./DataTable-Dytj5HQM.js";
|
|
7
|
+
import { _ as it } from "./Tooltip-etzDGo1Y.js";
|
|
8
|
+
import { L as dt } from "./Legend-Ct8LnAy4.js";
|
|
9
|
+
import ct from "./vue-ui-skeleton-DZk__alb.js";
|
|
10
|
+
import vt from "./vue-ui-accordion-Dmz7RUKz.js";
|
|
11
|
+
import { u as Se } from "./useNestedProp-BcjRW6BJ.js";
|
|
12
12
|
import { _ as ht } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
const ne = (V) => (Ge("data-v-2c46844f"), V = V(), Ye(), V), ft = ["id"], yt = ["xmlns", "viewBox"], pt = ["id", "fr"], bt = /* @__PURE__ */ ne(() => /* @__PURE__ */ p("stop", {
|
|
14
14
|
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-BFH7X8WG.cjs"),ae=require("./useResponsive-B3TrDDIG.cjs"),ye=require("./Title-CSQdI1EY.cjs"),oe=require("./usePrinter-hyuaFHQj.cjs"),me=require("./DataTable-D_2ZW2eI.cjs"),be=require("./Tooltip-B-laoopT.cjs"),ge=require("./Legend-tvvMRnbi.cjs"),ke=require("./vue-ui-skeleton-Df1qBO2k.cjs"),Ce=require("./vue-ui-accordion-CvZhABQM.cjs"),ne=require("./useNestedProp-B_z4-n52.cjs"),xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A=w=>(e.pushScopeId("data-v-2c46844f"),w=w(),e.popScopeId(),w),we=["id"],Le=["xmlns","viewBox"],Be=["id","fr"],_e=A(()=>e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),$e=["offset","stop-opacity"],Ne=A(()=>e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Se=["id"],Ee=["id"],Ve=A(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Fe=["id"],Te=["flood-color"],ze=["cx","cy","r","fill","filter"],Pe=["d","fill","stroke","stroke-width","filter"],De={key:0},Oe=["d","fill"],Ie={key:1},Ae=["x","y","font-size","font-weight","fill"],Me={key:2},Re=["filter"],Ue=["text-anchor","x","y","fill","font-size","font-weight"],qe=["text-anchor","x","y","fill","font-size","font-weight"],Ye=["text-anchor","x","y","fill","font-size","font-weight"],Xe=["d","fill","onMouseenter","onClick"],Ge={key:3,class:"vue-data-ui-watermark"},We={key:0,class:"vue-ui-nested-donuts-legend-title"},He=["onClick"],je=["innerHTML"],Je={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(w,{expose:re,emit:M}){const C=w,{vue_ui_nested_donuts:se}=r.useConfig(),$=e.computed(()=>!!C.dataset&&C.dataset.length),f=e.ref(r.createUid()),F=e.ref(!1),T=e.ref(""),ue=e.ref(null),R=e.ref(0),L=e.ref(null),U=e.ref(null),z=e.ref(null),B=e.ref(!1);function ie(l){B.value=l,R.value+=1}const t=e.computed(()=>{const l=ne.useNestedProp({userConfig:C.config,defaultConfig:se});return l.theme?{...ne.useNestedProp({userConfig:r.themes.vue_ui_nested_donuts[l.theme]||C.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),N=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(C.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=ae.throttle(()=>{const{width:s,height:a}=ae.useResponsive({chart:L.value,title:t.value.style.chart.title.text?U.value:null,legend:t.value.style.chart.legend.show?z.value:null});c.value.width=s,c.value.height=a});N.value=new ResizeObserver(l),N.value.observe(L.value.parentNode)}}),e.onBeforeUnmount(()=>{N.value&&N.value.disconnect()});const{isPrinting:q,isImaging:Y,generatePdf:X,generateImage:G}=oe.usePrinter({elementId:`nested_donuts_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts"}),ce=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),p=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),c=e.ref({height:512,width:512});function de({datapoint:l,index:s}){M("selectDatapoint",{datapoint:l,index:s})}const v=e.ref([]),m=e.computed(()=>(C.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((a,o)=>{[null,void 0].includes(a.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:o,key:"serie"}),[null,void 0].includes(a.values)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:o,key:"serie"})})}),C.dataset.map((l,s)=>({...l,total:l.series.filter(a=>!v.value.includes(a.id)).map(a=>(a.values||[]).reduce((o,n)=>o+n,0)).reduce((a,o)=>a+o,0),datasetIndex:s,id:`${f.value}_${s}`,series:l.series.map((a,o)=>({name:a.name,arcOf:l.name,arcOfId:`${f.value}_${s}`,id:`${f.value}_${s}_${o}`,seriesIndex:o,datasetIndex:s,color:r.convertColorToHex(a.color)||ce.value[o]||r.palette[o]||r.palette[o%r.palette.length],value:(a.values||[]).reduce((n,u)=>n+u,0),absoluteValues:a.values||[]}))}))));e.ref(t.value.style.chart.layout.donut.strokeWidth);const b=e.computed(()=>Math.min(c.value.height,c.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),W=e.computed(()=>[...m.value].map((l,s)=>{const a=l.series.filter(o=>!v.value.includes(o.id)).map(o=>o.value).reduce((o,n)=>o+n,0);return{...l,total:a,series:l.series.filter(o=>!v.value.includes(o.id)).map(o=>({...o,proportion:o.value/a}))}}));function ve(l,s,a){let o=0;for(let n=0;n<l.length;n+=1)a.includes(l[n])&&(o+=1);return o<s}const d=e.ref(W.value);e.watch(()=>W.value,l=>d.value=l);const H=e.ref(null),j=e.ref(null);function P(l){M("selectLegend",l);const s=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),a=d.value.flatMap(i=>i.series).find(i=>i.id===l.id);let n=a?a.value:0;const u=m.value.find(i=>i.id===s.arcOfId).series.map(i=>i.id),h=ve(u,u.length-1,v.value);if(v.value.includes(l.id)){let i=function(){n>s.value?(cancelAnimationFrame(H.value),d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(n+=s.value*.025,d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:n}:g)})),H.value=requestAnimationFrame(i))};v.value=v.value.filter(y=>y!==l.id),i()}else if(h){let i=function(){n<.1?(cancelAnimationFrame(j.value),v.value.push(l.id),d.value=d.value.map((y,g)=>({...y,series:y.series.map(x=>x.id===l.id?{...x,value:0}:x)}))):(n/=1.1,d.value=d.value.map((y,g)=>({...y,series:y.series.map(x=>x.id===l.id?{...x,value:n}:x)})),j.value=requestAnimationFrame(i))};i()}}const _=e.computed(()=>d.value.map((l,s)=>{const a=s*b.value/m.value.length;return{...l,radius:b.value-a,donut:r.makeDonut({series:l.series},c.value.width/2,c.value.height/2,b.value-a,b.value-a,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)}})),J=e.computed(()=>[...m.value].map((l,s)=>{const a=s*b.value/m.value.length;return{sizeRatio:a,donut:r.makeDonut({series:[{value:1}]},c.value.width/2,c.value.height/2,b.value-a,b.value-a,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),K=e.ref(null),S=e.ref(null),E=e.ref(null),D=e.ref(null);function fe({datapoint:l,_relativeIndex:s,seriesIndex:a}){K.value=l.arcOfId,S.value=l.id,E.value=a,D.value={datapoint:l,seriesIndex:a,series:d.value,config:t.value};const o=t.value.style.chart.tooltip.customFormat;if(r.isFunction(o)&&r.functionReturnsString(()=>o({seriesIndex:a,datapoint:l,series:d.value,config:t.value})))T.value=o({seriesIndex:a,datapoint:l,series:d.value,config:t.value});else{let n="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&v.value.length===0){const u=d.value.map(h=>h.series.find(i=>i.seriesIndex===a));u.forEach((h,i)=>{if(!h)return"";n+=`
|
|
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,14 +1,14 @@
|
|
|
1
1
|
import { computed as d, ref as n, onMounted as _e, onBeforeUnmount as Pe, watch as Oe, openBlock as s, createElementBlock as u, normalizeClass as A, normalizeStyle as D, createVNode as W, createCommentVNode as m, createBlock as L, unref as k, createSlots as Fe, withCtx as v, renderSlot as h, normalizeProps as z, guardReactiveProps as B, Fragment as F, renderList as I, createElementVNode as C, toDisplayString as T, createTextVNode as Ie, nextTick as Se } from "vue";
|
|
2
|
-
import { u as Me, c as Ne, t as Re, a as Ae, p as ne, b as De, o as Le, e as j, d as ze, X as Be, v as ue, n as Ve, q as Ye, w as Xe, f as ie } from "./index-
|
|
2
|
+
import { u as Me, c as Ne, t as Re, a as Ae, p as ne, b as De, o as Le, e as j, d as ze, X as Be, v as ue, n as Ve, q as Ye, w as Xe, f as ie } from "./index-BE6fhUyH.js";
|
|
3
3
|
import { t as Ge, u as Ue } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as Ee } from "./Title-
|
|
5
|
-
import { u as He, U as We } from "./usePrinter-
|
|
6
|
-
import { L as je } from "./Legend-
|
|
7
|
-
import { D as qe } from "./DataTable-
|
|
8
|
-
import { _ as Je } from "./Tooltip-
|
|
9
|
-
import Ke from "./vue-ui-skeleton-
|
|
10
|
-
import Qe from "./vue-ui-accordion-
|
|
11
|
-
import { u as ce } from "./useNestedProp-
|
|
4
|
+
import { _ as Ee } from "./Title-BcNPXpKX.js";
|
|
5
|
+
import { u as He, U as We } from "./usePrinter-CdIphKpF.js";
|
|
6
|
+
import { L as je } from "./Legend-Ct8LnAy4.js";
|
|
7
|
+
import { D as qe } from "./DataTable-Dytj5HQM.js";
|
|
8
|
+
import { _ as Je } from "./Tooltip-etzDGo1Y.js";
|
|
9
|
+
import Ke from "./vue-ui-skeleton-DZk__alb.js";
|
|
10
|
+
import Qe from "./vue-ui-accordion-Dmz7RUKz.js";
|
|
11
|
+
import { u as ce } from "./useNestedProp-BcjRW6BJ.js";
|
|
12
12
|
import { _ as Ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
const et = ["id"], tt = ["xmlns", "viewBox"], at = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], lt = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], ot = ["id"], rt = ["stdDeviation"], st = ["filter"], nt = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], ut = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset", "onMouseenter"], it = { key: 1 }, ct = ["onMouseenter"], dt = ["x", "y", "font-size", "fill", "font-weight"], vt = {
|
|
14
14
|
key: 3,
|