vue-data-ui 2.3.93 → 2.3.95
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-tI6NQ7Cn.js → Arrow-ClB1PHpS.js} +1 -1
- package/dist/{Arrow-DvOpIAlY.cjs → Arrow-OPbsbOoM.cjs} +1 -1
- package/dist/{BaseIcon-CNOWc7Xz.cjs → BaseIcon-CGKu0qTV.cjs} +1 -1
- package/dist/{BaseIcon-4CP9SAhe.js → BaseIcon-ZChy8GeS.js} +1 -1
- package/dist/{DataTable-BUgJSK3f.js → DataTable-B9SSwFM2.js} +2 -2
- package/dist/{DataTable-DhUk55WP.cjs → DataTable-CUi5w5e6.cjs} +1 -1
- package/dist/{Legend-C2KtRxbi.js → Legend-D4PxDNTf.js} +1 -1
- package/dist/{Legend-WO0bF0ud.cjs → Legend-DP-Tm5Kr.cjs} +1 -1
- package/dist/{PackageVersion-B_T5VqI7.cjs → PackageVersion-DdGAD2ox.cjs} +1 -1
- package/dist/{PackageVersion-Cy2QrPIN.js → PackageVersion-I1_4jcn_.js} +1 -1
- package/dist/{Shape-CvvlB7a8.cjs → Shape-DRb45Knl.cjs} +1 -1
- package/dist/{Shape-ovEGVZTS.js → Shape-DVc7K58k.js} +1 -1
- package/dist/{Slicer-C4yPLRzp.js → Slicer-Bk9LTQad.js} +15 -15
- package/dist/{Slicer-ChxIxUKY.cjs → Slicer-D7S48Lno.cjs} +1 -1
- package/dist/{Title-CczWCvrd.js → Title-Cxlu3Etv.js} +1 -1
- package/dist/{Title-BRktfjVS.cjs → Title-DcXqsD3c.cjs} +1 -1
- package/dist/{Tooltip-CLelGHFy.js → Tooltip-Bt9pHzBM.js} +1 -1
- package/dist/{Tooltip-iisamh_I.cjs → Tooltip-onlvaIFL.cjs} +1 -1
- package/dist/index-BwtKB_oG.cjs +9 -0
- package/dist/{index-B9ExL-Ae.js → index-DK7qqHGP.js} +725 -705
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +1 -0
- package/dist/types/vue-data-ui.d.ts +1 -0
- package/dist/{useNestedProp-BI1wvb44.js → useNestedProp-0nRX_rTi.js} +1 -1
- package/dist/{useNestedProp-CQjoDc6x.cjs → useNestedProp-CE6ustAp.cjs} +1 -1
- package/dist/{usePrinter-BYx8odJu.cjs → usePrinter-BMJj8aqh.cjs} +1 -1
- package/dist/{usePrinter-CUStN20z.js → usePrinter-Cza87yNE.js} +1 -1
- package/dist/{vue-data-ui-CUhpUmv_.js → vue-data-ui-C_TmwtMr.js} +57 -57
- package/dist/{vue-data-ui-Bn0hx7hG.cjs → vue-data-ui-Hk08-jMu.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +5 -5
- package/dist/{vue-ui-3d-bar-CxlYseaq.js → vue-ui-3d-bar-C7dVjCP4.js} +8 -8
- package/dist/{vue-ui-3d-bar-BL-ZhuNx.cjs → vue-ui-3d-bar-DLpRGWHF.cjs} +1 -1
- package/dist/{vue-ui-accordion-SZPrlCJb.js → vue-ui-accordion-5C4CP3gA.js} +3 -3
- package/dist/{vue-ui-accordion-DzbFctbI.cjs → vue-ui-accordion-CM2NnUan.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-vnFYLLSN.cjs → vue-ui-age-pyramid-CTvGXHzp.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-B1IVehHW.js → vue-ui-age-pyramid-mLYneMWu.js} +9 -9
- package/dist/{vue-ui-annotator-DGedspml.js → vue-ui-annotator-BB0EN1X8.js} +1 -1
- package/dist/{vue-ui-annotator-Cv6XubR6.cjs → vue-ui-annotator-CPZoIz9j.cjs} +1 -1
- package/dist/{vue-ui-candlestick-DGN9u4Fc.js → vue-ui-candlestick-91SHWtIZ.js} +10 -10
- package/dist/{vue-ui-candlestick-CIJdWFvp.cjs → vue-ui-candlestick-BqH7QdhN.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-kawG2Va2.cjs → vue-ui-carousel-table-Cj9K0i-8.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-BgDKAsLu.js → vue-ui-carousel-table-Dvr8K0wL.js} +4 -4
- package/dist/{vue-ui-chestnut-mz-4OECX.cjs → vue-ui-chestnut-BMbO3LQx.cjs} +1 -1
- package/dist/{vue-ui-chestnut-CtFOgJmT.js → vue-ui-chestnut-C8-hqYVj.js} +7 -7
- package/dist/{vue-ui-cursor-BVS2YR2w.cjs → vue-ui-cursor-CiNq70Vh.cjs} +1 -1
- package/dist/{vue-ui-cursor-BJ2nafdy.js → vue-ui-cursor-fOFRnGWg.js} +2 -2
- package/dist/{vue-ui-dashboard-D93KqjL8.js → vue-ui-dashboard-XROIeMZs.js} +2 -2
- package/dist/{vue-ui-dashboard-wvzwXNCc.cjs → vue-ui-dashboard-emcX9lzJ.cjs} +1 -1
- package/dist/{vue-ui-digits-CTpbhzau.js → vue-ui-digits-Dao_RHVG.js} +2 -2
- package/dist/{vue-ui-digits-2e8Z2Ynp.cjs → vue-ui-digits-Fx6hf8lh.cjs} +1 -1
- package/dist/vue-ui-donut-Bf7irbZr.cjs +1 -0
- package/dist/vue-ui-donut-D5q_f9RX.js +1032 -0
- package/dist/{vue-ui-donut-evolution-DJpu3Zul.cjs → vue-ui-donut-evolution-Dnx-o2Ok.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-Cj4VUlYA.js → vue-ui-donut-evolution-ciU7PKzb.js} +53 -53
- package/dist/{vue-ui-dumbbell-DW9hFZTK.cjs → vue-ui-dumbbell-DkX4VmBe.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-B5K8A6JO.js → vue-ui-dumbbell-nLr7lvcv.js} +9 -9
- package/dist/{vue-ui-flow-D7G8pT5u.js → vue-ui-flow-B6HJtYfr.js} +20 -20
- package/dist/{vue-ui-flow-BPZIx63s.cjs → vue-ui-flow-smeC886u.cjs} +1 -1
- package/dist/{vue-ui-galaxy-CJwQngRy.cjs → vue-ui-galaxy-Buek4k31.cjs} +1 -1
- package/dist/{vue-ui-galaxy-zxi6Dh6-.js → vue-ui-galaxy-Ts-pIaqK.js} +23 -23
- package/dist/{vue-ui-gauge-BCOp8MfJ.cjs → vue-ui-gauge-CB1FXw50.cjs} +1 -1
- package/dist/{vue-ui-gauge-Dl84wBq2.js → vue-ui-gauge-CokjkUw7.js} +19 -19
- package/dist/{vue-ui-gizmo-PUYvN73T.cjs → vue-ui-gizmo-CQzBf-wG.cjs} +1 -1
- package/dist/{vue-ui-gizmo-BGeEyNk4.js → vue-ui-gizmo-DcGemMpp.js} +3 -3
- package/dist/{vue-ui-heatmap-9Upu_lU9.cjs → vue-ui-heatmap-B3eEfpF_.cjs} +1 -1
- package/dist/{vue-ui-heatmap-B98p2zoa.js → vue-ui-heatmap-BBVeSW2b.js} +9 -9
- package/dist/{vue-ui-kpi-BjucxBZ5.cjs → vue-ui-kpi-0FoMbSuC.cjs} +1 -1
- package/dist/{vue-ui-kpi-1_lGwzeP.js → vue-ui-kpi-CPMnrH0b.js} +3 -3
- package/dist/{vue-ui-mini-loader-OY5XrOYB.cjs → vue-ui-mini-loader-DNrvLX3D.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-B6595FMr.js → vue-ui-mini-loader-Dpn4tXn2.js} +2 -2
- package/dist/{vue-ui-molecule-DaJsYbo1.js → vue-ui-molecule-C98VGiyq.js} +29 -29
- package/dist/{vue-ui-molecule-xmP8sBoH.cjs → vue-ui-molecule-CKFgcQYg.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-CdGd-5lQ.js → vue-ui-mood-radar-CD3cjrDN.js} +21 -21
- package/dist/{vue-ui-mood-radar-CB1zZjs3.cjs → vue-ui-mood-radar-DN0allOW.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-CYmpCetP.js → vue-ui-nested-donuts-B__WecmQ.js} +46 -46
- package/dist/{vue-ui-nested-donuts-BkKTALZ7.cjs → vue-ui-nested-donuts-Bdl_tUXJ.cjs} +1 -1
- package/dist/{vue-ui-onion-BuimOxUF.cjs → vue-ui-onion-4g5ewsye.cjs} +1 -1
- package/dist/{vue-ui-onion-BOi0j3dJ.js → vue-ui-onion-U8VRuYjQ.js} +10 -10
- package/dist/{vue-ui-parallel-coordinate-plot-DfRYipb8.js → vue-ui-parallel-coordinate-plot-9WvsfJtY.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-Bah-cYZ5.cjs → vue-ui-parallel-coordinate-plot-CdegwDSr.cjs} +1 -1
- package/dist/{vue-ui-quadrant-CVUZ1p2G.cjs → vue-ui-quadrant-D2SDPxFH.cjs} +1 -1
- package/dist/{vue-ui-quadrant-39hB1-rW.js → vue-ui-quadrant-DMto8r-E.js} +11 -11
- package/dist/{vue-ui-quick-chart-DJET2y_F.cjs → vue-ui-quick-chart-BLom9Z1d.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-8aeQmszL.js → vue-ui-quick-chart-YlkEojCz.js} +8 -8
- package/dist/{vue-ui-radar-mk61hrfQ.cjs → vue-ui-radar-DdPAZvLB.cjs} +1 -1
- package/dist/{vue-ui-radar-BHV5OcIH.js → vue-ui-radar-lg4R0yio.js} +11 -11
- package/dist/{vue-ui-rating-Dt46yKur.cjs → vue-ui-rating-B7erplTm.cjs} +1 -1
- package/dist/{vue-ui-rating-D0eIeFuP.js → vue-ui-rating-BxV1W8_t.js} +7 -7
- package/dist/{vue-ui-relation-circle-CLWjo7gq.js → vue-ui-relation-circle-BviKM7qW.js} +6 -6
- package/dist/{vue-ui-relation-circle-D8tlElyL.cjs → vue-ui-relation-circle-RHy8p_Rq.cjs} +1 -1
- package/dist/{vue-ui-rings-BrcZ1Q6y.js → vue-ui-rings-Bn-nQaV1.js} +37 -37
- package/dist/{vue-ui-rings-CjOr2fTq.cjs → vue-ui-rings-DMksrRmV.cjs} +1 -1
- package/dist/{vue-ui-scatter-wq1Ygozo.js → vue-ui-scatter-BdTMgLFD.js} +34 -34
- package/dist/{vue-ui-scatter-DElf7q_o.cjs → vue-ui-scatter-DJ0wpNbL.cjs} +1 -1
- package/dist/{vue-ui-screenshot-WpUmWa8T.cjs → vue-ui-screenshot-D0XIDX5K.cjs} +1 -1
- package/dist/{vue-ui-screenshot-BD6eevS2.js → vue-ui-screenshot-beg_Jx2O.js} +1 -1
- package/dist/{vue-ui-skeleton-DokgyuHD.js → vue-ui-skeleton-CQnYuosp.js} +49 -49
- package/dist/{vue-ui-skeleton-7g5Z7tL8.cjs → vue-ui-skeleton-snFRuZgs.cjs} +1 -1
- package/dist/{vue-ui-smiley-BTzWzbXj.js → vue-ui-smiley-3x3w-9Zh.js} +2 -2
- package/dist/{vue-ui-smiley-M433_VGc.cjs → vue-ui-smiley-BUlMGmlz.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-CVY2563q.cjs → vue-ui-spark-trend-Ds7Vnwpb.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-DVYSjWgR.js → vue-ui-spark-trend-LsojHGxX.js} +20 -20
- package/dist/{vue-ui-sparkbar-CW6U_9yF.js → vue-ui-sparkbar-45yFHmFN.js} +4 -4
- package/dist/{vue-ui-sparkbar-B5bm048m.cjs → vue-ui-sparkbar-DJAZa23-.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-P6vT35bq.cjs → vue-ui-sparkgauge-CnMl3jNc.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-Da2vhyRe.js → vue-ui-sparkgauge-D-hauinY.js} +11 -11
- package/dist/{vue-ui-sparkhistogram-DgyNNNYs.js → vue-ui-sparkhistogram-DaeMxgM8.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-BRE4BZ1r.cjs → vue-ui-sparkhistogram-vLsGWKZe.cjs} +1 -1
- package/dist/{vue-ui-sparkline-BNzFzh6O.cjs → vue-ui-sparkline-DDwGkMVO.cjs} +1 -1
- package/dist/{vue-ui-sparkline-B6F6GG5I.js → vue-ui-sparkline-Ddi4Jz8I.js} +21 -21
- package/dist/{vue-ui-sparkstackbar-DAZsawIt.js → vue-ui-sparkstackbar-1_EPRHfC.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-uWzUzXeY.cjs → vue-ui-sparkstackbar-wbl8ZH9S.cjs} +1 -1
- package/dist/{vue-ui-stackbar-Dm2aCHhH.js → vue-ui-stackbar-0cKpezVg.js} +11 -11
- package/dist/{vue-ui-stackbar-DuvFbd8S.cjs → vue-ui-stackbar-BKojs76u.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-XYPsVx2s.cjs → vue-ui-strip-plot-BPICqL2j.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-B_j6rXqf.js → vue-ui-strip-plot-D_7VbcMM.js} +10 -10
- package/dist/{vue-ui-table-BZjBiutU.cjs → vue-ui-table-B1kfbP6Q.cjs} +1 -1
- package/dist/{vue-ui-table-Ba8yWxlH.js → vue-ui-table-BTdufdp5.js} +10 -10
- package/dist/{vue-ui-table-heatmap-ChZ4LL-2.cjs → vue-ui-table-heatmap-CrXS3ruF.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-B72rWSp8.js → vue-ui-table-heatmap-UKF0bVRc.js} +23 -23
- package/dist/{vue-ui-table-sparkline-g1tiRXu-.js → vue-ui-table-sparkline-CbhcBl__.js} +15 -15
- package/dist/{vue-ui-table-sparkline-D9KYyLun.cjs → vue-ui-table-sparkline-DnViPd7H.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BUj-EXSI.js → vue-ui-thermometer-BTb0KKkD.js} +6 -6
- package/dist/{vue-ui-thermometer-Bx9kCvPP.cjs → vue-ui-thermometer-CGlN3EdJ.cjs} +1 -1
- package/dist/{vue-ui-timer-DgVg5v8D.cjs → vue-ui-timer-Ca8z8fpL.cjs} +1 -1
- package/dist/{vue-ui-timer-BMi1tOzP.js → vue-ui-timer-DsXON-oQ.js} +5 -5
- package/dist/{vue-ui-tiremarks-B8E61MPf.js → vue-ui-tiremarks-C2FsHymJ.js} +6 -6
- package/dist/{vue-ui-tiremarks-gGC8LSGo.cjs → vue-ui-tiremarks-DfQgIZ-v.cjs} +1 -1
- package/dist/{vue-ui-treemap-D5QTDSSq.js → vue-ui-treemap-COGNksGL.js} +10 -10
- package/dist/{vue-ui-treemap-Cha1rQBU.cjs → vue-ui-treemap-Ijgu5Uxo.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-BSzFwrWa.cjs → vue-ui-vertical-bar-C8q8aSVA.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-BL5Issc0.js → vue-ui-vertical-bar-CSk11lJL.js} +10 -10
- package/dist/{vue-ui-waffle-DxTyNZYn.cjs → vue-ui-waffle-BAFi3Ix0.cjs} +1 -1
- package/dist/{vue-ui-waffle-Dh08N5SM.js → vue-ui-waffle-nhWigJK4.js} +23 -23
- package/dist/{vue-ui-wheel-DyjcbZnB.cjs → vue-ui-wheel-CDcGk_zm.cjs} +1 -1
- package/dist/{vue-ui-wheel-DpywOj9b.js → vue-ui-wheel-DjPcnznT.js} +6 -6
- package/dist/{vue-ui-word-cloud-C7cBuLEd.cjs → vue-ui-word-cloud-BwgErpI2.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-CEtvW8ZU.js → vue-ui-word-cloud-DFGYfQfb.js} +36 -36
- package/dist/{vue-ui-xy-C1EbGmWi.js → vue-ui-xy-BT3XcRoD.js} +28 -28
- package/dist/{vue-ui-xy-WnaajCFT.cjs → vue-ui-xy-CTxjevvM.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-nbhxY42M.js → vue-ui-xy-canvas-AgaDG8-s.js} +34 -34
- package/dist/{vue-ui-xy-canvas-7YaG0Huj.cjs → vue-ui-xy-canvas-BPRpgAOu.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-CYdWUfPi.cjs +0 -4
- package/dist/vue-ui-donut-CJ4HeqiO.cjs +0 -1
- package/dist/vue-ui-donut-CjkJB0CP.js +0 -871
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { computed as c, onMounted as he, ref as h, watch as fe, openBlock as n, createElementBlock as k, normalizeClass as R, normalizeStyle as O, createVNode as F, createCommentVNode as i, createBlock as f, unref as s, createSlots as me, withCtx as m, renderSlot as b, normalizeProps as X, guardReactiveProps as K, createElementVNode as a, Fragment as q, renderList as Y, toDisplayString as M, createTextVNode as J, nextTick as pe } from "vue";
|
|
2
|
-
import { u as ge, o as ke, e as Q, c as be, t as Ce,
|
|
3
|
-
import { _ as
|
|
4
|
-
import { u as Le, U as Te } from "./usePrinter-
|
|
5
|
-
import { L as Ae } from "./Legend-
|
|
6
|
-
import
|
|
7
|
-
import { D as Ie } from "./DataTable-
|
|
8
|
-
import Oe from "./vue-ui-skeleton-
|
|
9
|
-
import Fe from "./vue-ui-accordion-
|
|
10
|
-
import { u as ee } from "./useNestedProp-
|
|
11
|
-
import { _ as Se } from "./PackageVersion-
|
|
2
|
+
import { u as ge, o as ke, e as Q, c as be, t as Ce, O as xe, X as _e, s as C, w as we, P as $e, i as Z, f as A, q as Me, r as Pe } from "./index-DK7qqHGP.js";
|
|
3
|
+
import { _ as Ne } from "./Title-Cxlu3Etv.js";
|
|
4
|
+
import { u as Le, U as Te } from "./usePrinter-Cza87yNE.js";
|
|
5
|
+
import { L as Ae } from "./Legend-D4PxDNTf.js";
|
|
6
|
+
import P from "./BaseIcon-ZChy8GeS.js";
|
|
7
|
+
import { D as Ie } from "./DataTable-B9SSwFM2.js";
|
|
8
|
+
import Oe from "./vue-ui-skeleton-CQnYuosp.js";
|
|
9
|
+
import Fe from "./vue-ui-accordion-5C4CP3gA.js";
|
|
10
|
+
import { u as ee } from "./useNestedProp-0nRX_rTi.js";
|
|
11
|
+
import { _ as Se } from "./PackageVersion-I1_4jcn_.js";
|
|
12
12
|
import { _ as Ve } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
const je = ["id"], Be = {
|
|
14
14
|
key: 0,
|
|
@@ -65,7 +65,7 @@ const je = ["id"], Be = {
|
|
|
65
65
|
const { isPrinting: D, isImaging: W, generatePdf: z, generateImage: G } = Le({
|
|
66
66
|
elementId: w.value,
|
|
67
67
|
fileName: e.value.style.chart.title.text || "vue-ui-mood-radar"
|
|
68
|
-
}),
|
|
68
|
+
}), N = h({
|
|
69
69
|
showTable: e.value.table.show
|
|
70
70
|
}), p = c(() => ({
|
|
71
71
|
height: 256,
|
|
@@ -137,7 +137,7 @@ const je = ["id"], Be = {
|
|
|
137
137
|
const l = g.value.head.map((d, v) => [[
|
|
138
138
|
d.name
|
|
139
139
|
], [g.value.body[v]], [isNaN(g.value.body[v] / x.value) ? "-" : g.value.body[v] / x.value * 100]]), o = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(l), t = Me(o);
|
|
140
|
-
|
|
140
|
+
Pe({ csvContent: t, title: e.value.style.chart.title.text || "vue-ui-mood-radar" });
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
143
|
const L = c(() => {
|
|
@@ -180,7 +180,7 @@ const je = ["id"], Be = {
|
|
|
180
180
|
return y.value;
|
|
181
181
|
}
|
|
182
182
|
function H() {
|
|
183
|
-
|
|
183
|
+
N.value.showTable = !N.value.showTable;
|
|
184
184
|
}
|
|
185
185
|
const T = h(!1);
|
|
186
186
|
function ye(l) {
|
|
@@ -200,7 +200,7 @@ const je = ["id"], Be = {
|
|
|
200
200
|
style: O(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;${e.value.style.chart.title.text ? "" : "padding-top:36px"};background:${e.value.style.chart.backgroundColor}`)
|
|
201
201
|
}, [
|
|
202
202
|
e.value.style.chart.title.text ? (n(), k("div", Be, [
|
|
203
|
-
F(
|
|
203
|
+
F(Ne, {
|
|
204
204
|
config: {
|
|
205
205
|
title: {
|
|
206
206
|
cy: "mood-radar-title",
|
|
@@ -493,31 +493,31 @@ const je = ["id"], Be = {
|
|
|
493
493
|
onClick: () => de(t.key),
|
|
494
494
|
style: { display: "flex", "flex-direction": "row", gap: "3px", "align-items": "center", margin: "3px 0" }
|
|
495
495
|
}, [
|
|
496
|
-
t.key == 1 ? (n(), f(
|
|
496
|
+
t.key == 1 ? (n(), f(P, {
|
|
497
497
|
key: 0,
|
|
498
498
|
strokeWidth: 1,
|
|
499
499
|
name: "moodSad",
|
|
500
500
|
stroke: e.value.style.chart.layout.smileys.colors[t.key]
|
|
501
501
|
}, null, 8, ["stroke"])) : i("", !0),
|
|
502
|
-
t.key == 2 ? (n(), f(
|
|
502
|
+
t.key == 2 ? (n(), f(P, {
|
|
503
503
|
key: 1,
|
|
504
504
|
strokeWidth: 1,
|
|
505
505
|
name: "moodFlat",
|
|
506
506
|
stroke: e.value.style.chart.layout.smileys.colors[t.key]
|
|
507
507
|
}, null, 8, ["stroke"])) : i("", !0),
|
|
508
|
-
t.key == 3 ? (n(), f(
|
|
508
|
+
t.key == 3 ? (n(), f(P, {
|
|
509
509
|
key: 2,
|
|
510
510
|
strokeWidth: 1,
|
|
511
511
|
name: "moodNeutral",
|
|
512
512
|
stroke: e.value.style.chart.layout.smileys.colors[t.key]
|
|
513
513
|
}, null, 8, ["stroke"])) : i("", !0),
|
|
514
|
-
t.key == 4 ? (n(), f(
|
|
514
|
+
t.key == 4 ? (n(), f(P, {
|
|
515
515
|
key: 3,
|
|
516
516
|
strokeWidth: 1,
|
|
517
517
|
name: "smiley",
|
|
518
518
|
stroke: e.value.style.chart.layout.smileys.colors[t.key]
|
|
519
519
|
}, null, 8, ["stroke"])) : i("", !0),
|
|
520
|
-
t.key == 5 ? (n(), f(
|
|
520
|
+
t.key == 5 ? (n(), f(P, {
|
|
521
521
|
key: 4,
|
|
522
522
|
strokeWidth: 1,
|
|
523
523
|
name: "moodHappy",
|
|
@@ -548,7 +548,7 @@ const je = ["id"], Be = {
|
|
|
548
548
|
key: 6,
|
|
549
549
|
hideDetails: "",
|
|
550
550
|
config: {
|
|
551
|
-
open:
|
|
551
|
+
open: N.value.showTable,
|
|
552
552
|
maxHeight: 1e4,
|
|
553
553
|
body: {
|
|
554
554
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
@@ -567,7 +567,7 @@ const je = ["id"], Be = {
|
|
|
567
567
|
body: L.value.body,
|
|
568
568
|
config: L.value.config,
|
|
569
569
|
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
570
|
-
onClose: o[10] || (o[10] = (t) =>
|
|
570
|
+
onClose: o[10] || (o[10] = (t) => N.value.showTable = !1)
|
|
571
571
|
}, {
|
|
572
572
|
th: m(({ th: t }) => [
|
|
573
573
|
a("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CYdWUfPi.cjs"),X=require("./Title-BRktfjVS.cjs"),S=require("./usePrinter-BYx8odJu.cjs"),K=require("./Legend-WO0bF0ud.cjs"),p=require("./BaseIcon-CNOWc7Xz.cjs"),Y=require("./DataTable-DhUk55WP.cjs"),J=require("./vue-ui-skeleton-7g5Z7tL8.cjs"),Q=require("./vue-ui-accordion-DzbFctbI.cjs"),T=require("./useNestedProp-CQjoDc6x.cjs"),Z=require("./PackageVersion-B_T5VqI7.cjs"),ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),te=["id"],oe={key:0,style:"width:100%;background:transparent"},le=["xmlns","viewBox"],ae=["id"],re=["stop-color"],ne=["stop-color"],se=["x1","y1","x2","y2","stroke","stroke-width"],ue=["d","stroke","stroke-width"],ie=["stroke"],ce=["fill"],de=["stroke"],ye=["fill"],ve=["stroke"],me=["fill"],he=["stroke"],fe=["fill"],pe=["stroke"],ke=["fill"],ge=["d","stroke","stroke-width","fill"],be=["x1","y1","stroke"],Ce=["cx","cy","fill","stroke"],Ne=["fill","stroke"],xe=["y","fill","font-weight"],we=["y","fill"],_e={key:3,class:"vue-data-ui-watermark"},Ve=["onClick"],Pe={style:{"font-weight":"bold"}},Me=["innerHTML"],$e={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(O,{expose:A}){const s=O,{vue_ui_mood_radar:I}=r.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{N()});function N(){r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),x=e.ref(null),F=e.ref(null),n=e.ref(null),D=e.ref(0),q=e.ref(0),w=e.ref(0),t=e.computed({get:()=>_(),set:l=>l});function _(){const l=T.useNestedProp({userConfig:s.config,defaultConfig:I});return l.theme?{...T.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||s.config,defaultConfig:l})}:l}e.watch(()=>s.config,l=>{t.value=_(),N(),D.value+=1,q.value+=1,w.value+=1},{deep:!0});const{isPrinting:V,isImaging:P,generatePdf:M,generateImage:$}=S.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),k=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),C=e.computed(()=>r.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function z({centerX:l,centerY:a,apexX:o,apexY:u,proportion:c,key:f,value:R}){return{x:l+(o-l)*c,y:a+(u-a)*c,key:f,value:R}}const j=e.computed(()=>Math.max(...Object.values(s.dataset).map(l=>isNaN(l)?0:l))),v=e.computed(()=>Object.values(s.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),i=e.computed(()=>Object.keys(s.dataset).map((l,a)=>{const o=typeof s.dataset[l]!="number"||isNaN(s.dataset[l])?0:s.dataset[l];return{index:a,key:l,value:o,proportion:o/v.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),B=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(s.dataset[l])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),C.value.coordinates.map((l,a)=>{const o=z({centerX:d.value.width/2,centerY:d.value.height/2,apexX:l.x,apexY:l.y,proportion:i.value[a].value/j.value,key:i.value[a].key,value:i.value[a].value});return{...l,plots:o,key:i.value[a].key}})):[]),W=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 G(l){l===n.value?n.value=null:n.value=l}const y=e.computed(()=>{const l=i.value.map(o=>({name:o.key,color:o.color})),a=i.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function E(){e.nextTick(()=>{const l=y.value.head.map((u,c)=>[[u.name],[y.value.body[c]],[isNaN(y.value.body[c]/v.value)?"-":y.value.body[c]/v.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-mood-radar"})})}const g=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',Number(v.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=y.value.head.map((c,f)=>[{color:c.color,name:c.name},y.value.body[f].toFixed(t.value.table.td.roundingValue),isNaN(y.value.body[f]/v.value)?"-":(y.value.body[f]/v.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},u=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:u}});function U(){return i.value}function L(){k.value.showTable=!k.value.showTable}const b=e.ref(!1);function H(l){b.value=l}return A({getData:U,generatePdf:M,generateCsv:E,generateImage:$,toggleTable:L}),(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:x,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",oe,[e.createVNode(X._sfc_main,{config:{title:{cy:"mood-radar-title",...t.value.style.chart.title},subtitle:{cy:"mood-radar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(S.UserOptions,{key:1,ref_key:"details",ref:F,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(V),isImaging:e.unref(P),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:x.value,position:t.value.userOptions.position,onToggleFullscreen:H,onGeneratePdf:e.unref(M),onGenerateCsv:E,onGenerateImage:e.unref($),onToggleTable:L},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${d.value.width} ${d.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Z._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`mood_radar_gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,re),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100),t.value.style.chart.layout.dataPolygon.opacity)},null,8,ne)],8,ae)]),(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,se))),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,ue),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,ie),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=o=>n.value=5),onMouseleave:a[1]||(a[1]=o=>n.value=null),cx:"128",cy:"25",r:"20",fill:n.value===5?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[5],20):"transparent"},null,40,ce),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,de),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=o=>n.value=4),onMouseleave:a[3]||(a[3]=o=>n.value=null),cx:"227",cy:"95.5",r:"20",fill:n.value===4?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[4],20):"transparent"},null,40,ye),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,ve),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=o=>n.value=3),onMouseleave:a[5]||(a[5]=o=>n.value=null),cx:"190",cy:"213.5",r:"20",fill:n.value===3?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[3],20):"transparent"},null,40,me),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,he),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=o=>n.value=2),onMouseleave:a[7]||(a[7]=o=>n.value=null),cx:"65",cy:"213.5",r:"20",fill:n.value===2?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[2],20):"transparent"},null,40,fe),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,pe),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=o=>n.value=1),onMouseleave:a[9]||(a[9]=o=>n.value=null),cx:"29",cy:"95.5",r:"20",fill:n.value===1?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[1],20):"transparent"},null,40,ke),e.createElementVNode("path",{d:e.unref(r.makePath)(B.value.map(o=>o.plots)),stroke:t.value.style.chart.layout.dataPolygon.stroke,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.chart.layout.dataPolygon.gradient.show?`url(#mood_radar_gradient_${h.value})`:e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,ge),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.map(o=>o.plots),(o,u)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${n.value==o.key?"1":"0"}`)},[e.createElementVNode("line",{x1:o.x,y1:o.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,be),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,Ce),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,Ne),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?145:120,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle","font-weight":t.value.style.chart.layout.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),9,xe),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.value/v.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,we)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,le)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",_e,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(V)||e.unref(P)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(J.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(K.Legend,{legendSet:i.value,config:W.value,key:`legend_${w.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:u})=>[e.createElementVNode("div",{onClick:()=>G(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",Pe,e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,Ve)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:i.value},void 0,!0),m.value?(e.openBlock(),e.createBlock(Q.default,{key:6,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(Y.DataTable,{colNames:g.value.colNames,head:g.value.head,body:g.value.body,config:g.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[10]||(a[10]=o=>k.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Me)]),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,te))}},Be=ee._export_sfc($e,[["__scopeId","data-v-bded5f3b"]]);exports.default=Be;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BwtKB_oG.cjs"),X=require("./Title-DcXqsD3c.cjs"),S=require("./usePrinter-BMJj8aqh.cjs"),K=require("./Legend-DP-Tm5Kr.cjs"),p=require("./BaseIcon-CGKu0qTV.cjs"),Y=require("./DataTable-CUi5w5e6.cjs"),J=require("./vue-ui-skeleton-snFRuZgs.cjs"),Q=require("./vue-ui-accordion-CM2NnUan.cjs"),T=require("./useNestedProp-CE6ustAp.cjs"),Z=require("./PackageVersion-DdGAD2ox.cjs"),ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),te=["id"],oe={key:0,style:"width:100%;background:transparent"},le=["xmlns","viewBox"],ae=["id"],re=["stop-color"],ne=["stop-color"],se=["x1","y1","x2","y2","stroke","stroke-width"],ue=["d","stroke","stroke-width"],ie=["stroke"],ce=["fill"],de=["stroke"],ye=["fill"],ve=["stroke"],me=["fill"],he=["stroke"],fe=["fill"],pe=["stroke"],ke=["fill"],ge=["d","stroke","stroke-width","fill"],be=["x1","y1","stroke"],Ce=["cx","cy","fill","stroke"],Ne=["fill","stroke"],xe=["y","fill","font-weight"],we=["y","fill"],_e={key:3,class:"vue-data-ui-watermark"},Ve=["onClick"],Pe={style:{"font-weight":"bold"}},Me=["innerHTML"],$e={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(O,{expose:A}){const s=O,{vue_ui_mood_radar:I}=r.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{N()});function N(){r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),x=e.ref(null),F=e.ref(null),n=e.ref(null),D=e.ref(0),q=e.ref(0),w=e.ref(0),t=e.computed({get:()=>_(),set:l=>l});function _(){const l=T.useNestedProp({userConfig:s.config,defaultConfig:I});return l.theme?{...T.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||s.config,defaultConfig:l})}:l}e.watch(()=>s.config,l=>{t.value=_(),N(),D.value+=1,q.value+=1,w.value+=1},{deep:!0});const{isPrinting:V,isImaging:P,generatePdf:M,generateImage:$}=S.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),k=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),C=e.computed(()=>r.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function z({centerX:l,centerY:a,apexX:o,apexY:u,proportion:c,key:f,value:R}){return{x:l+(o-l)*c,y:a+(u-a)*c,key:f,value:R}}const j=e.computed(()=>Math.max(...Object.values(s.dataset).map(l=>isNaN(l)?0:l))),v=e.computed(()=>Object.values(s.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),i=e.computed(()=>Object.keys(s.dataset).map((l,a)=>{const o=typeof s.dataset[l]!="number"||isNaN(s.dataset[l])?0:s.dataset[l];return{index:a,key:l,value:o,proportion:o/v.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),B=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(s.dataset[l])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),C.value.coordinates.map((l,a)=>{const o=z({centerX:d.value.width/2,centerY:d.value.height/2,apexX:l.x,apexY:l.y,proportion:i.value[a].value/j.value,key:i.value[a].key,value:i.value[a].value});return{...l,plots:o,key:i.value[a].key}})):[]),W=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 G(l){l===n.value?n.value=null:n.value=l}const y=e.computed(()=>{const l=i.value.map(o=>({name:o.key,color:o.color})),a=i.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function E(){e.nextTick(()=>{const l=y.value.head.map((u,c)=>[[u.name],[y.value.body[c]],[isNaN(y.value.body[c]/v.value)?"-":y.value.body[c]/v.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-mood-radar"})})}const g=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',Number(v.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=y.value.head.map((c,f)=>[{color:c.color,name:c.name},y.value.body[f].toFixed(t.value.table.td.roundingValue),isNaN(y.value.body[f]/v.value)?"-":(y.value.body[f]/v.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},u=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:u}});function U(){return i.value}function L(){k.value.showTable=!k.value.showTable}const b=e.ref(!1);function H(l){b.value=l}return A({getData:U,generatePdf:M,generateCsv:E,generateImage:$,toggleTable:L}),(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:x,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",oe,[e.createVNode(X._sfc_main,{config:{title:{cy:"mood-radar-title",...t.value.style.chart.title},subtitle:{cy:"mood-radar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(S.UserOptions,{key:1,ref_key:"details",ref:F,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(V),isImaging:e.unref(P),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:x.value,position:t.value.userOptions.position,onToggleFullscreen:H,onGeneratePdf:e.unref(M),onGenerateCsv:E,onGenerateImage:e.unref($),onToggleTable:L},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${d.value.width} ${d.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Z._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`mood_radar_gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,re),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100),t.value.style.chart.layout.dataPolygon.opacity)},null,8,ne)],8,ae)]),(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,se))),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,ue),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,ie),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=o=>n.value=5),onMouseleave:a[1]||(a[1]=o=>n.value=null),cx:"128",cy:"25",r:"20",fill:n.value===5?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[5],20):"transparent"},null,40,ce),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,de),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=o=>n.value=4),onMouseleave:a[3]||(a[3]=o=>n.value=null),cx:"227",cy:"95.5",r:"20",fill:n.value===4?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[4],20):"transparent"},null,40,ye),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,ve),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=o=>n.value=3),onMouseleave:a[5]||(a[5]=o=>n.value=null),cx:"190",cy:"213.5",r:"20",fill:n.value===3?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[3],20):"transparent"},null,40,me),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,he),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=o=>n.value=2),onMouseleave:a[7]||(a[7]=o=>n.value=null),cx:"65",cy:"213.5",r:"20",fill:n.value===2?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[2],20):"transparent"},null,40,fe),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,pe),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=o=>n.value=1),onMouseleave:a[9]||(a[9]=o=>n.value=null),cx:"29",cy:"95.5",r:"20",fill:n.value===1?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[1],20):"transparent"},null,40,ke),e.createElementVNode("path",{d:e.unref(r.makePath)(B.value.map(o=>o.plots)),stroke:t.value.style.chart.layout.dataPolygon.stroke,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.chart.layout.dataPolygon.gradient.show?`url(#mood_radar_gradient_${h.value})`:e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,ge),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.map(o=>o.plots),(o,u)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${n.value==o.key?"1":"0"}`)},[e.createElementVNode("line",{x1:o.x,y1:o.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,be),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,Ce),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,Ne),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?145:120,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle","font-weight":t.value.style.chart.layout.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),9,xe),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.value/v.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,we)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,le)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",_e,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(V)||e.unref(P)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(J.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(K.Legend,{legendSet:i.value,config:W.value,key:`legend_${w.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:u})=>[e.createElementVNode("div",{onClick:()=>G(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",Pe,e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,Ve)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:i.value},void 0,!0),m.value?(e.openBlock(),e.createBlock(Q.default,{key:6,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(Y.DataTable,{colNames:g.value.colNames,head:g.value.head,body:g.value.body,config:g.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[10]||(a[10]=o=>k.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Me)]),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,te))}},Be=ee._export_sfc($e,[["__scopeId","data-v-bded5f3b"]]);exports.default=Be;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { computed as g, ref as d, watch as De, onMounted as
|
|
2
|
-
import { u as tt, c as lt, t as at, a as ot, p as Q, o as st, e as A, b as ut,
|
|
1
|
+
import { computed as g, ref as d, watch as De, onMounted as Ke, onBeforeUnmount as Je, openBlock as u, createElementBlock as n, normalizeClass as z, normalizeStyle as ue, createBlock as P, createCommentVNode as y, unref as r, createSlots as Qe, withCtx as m, renderSlot as $, normalizeProps as q, guardReactiveProps as K, createVNode as Oe, createElementVNode as p, Fragment as x, renderList as S, toDisplayString as T, createTextVNode as J, nextTick as Ze, pushScopeId as je, popScopeId as et } from "vue";
|
|
2
|
+
import { u as tt, c as lt, t as at, a as ot, p as Q, o as st, e as A, b as ut, I as ze, d as nt, m as Pe, f as L, X as rt, s as Ae, K as it, k as V, n as ne, i as R, x as Ve, y as dt, q as ct, r as vt } from "./index-DK7qqHGP.js";
|
|
3
3
|
import { t as ft, u as ht } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as yt } from "./Title-
|
|
5
|
-
import { u as pt, U as bt } from "./usePrinter-
|
|
6
|
-
import { D as gt } from "./DataTable-
|
|
7
|
-
import { _ as mt } from "./Tooltip-
|
|
8
|
-
import { L as _t } from "./Legend-
|
|
9
|
-
import wt from "./vue-ui-skeleton-
|
|
10
|
-
import kt from "./vue-ui-accordion-
|
|
11
|
-
import { u as Me } from "./useNestedProp-
|
|
12
|
-
import { _ as xt } from "./PackageVersion-
|
|
4
|
+
import { _ as yt } from "./Title-Cxlu3Etv.js";
|
|
5
|
+
import { u as pt, U as bt } from "./usePrinter-Cza87yNE.js";
|
|
6
|
+
import { D as gt } from "./DataTable-B9SSwFM2.js";
|
|
7
|
+
import { _ as mt } from "./Tooltip-Bt9pHzBM.js";
|
|
8
|
+
import { L as _t } from "./Legend-D4PxDNTf.js";
|
|
9
|
+
import wt from "./vue-ui-skeleton-CQnYuosp.js";
|
|
10
|
+
import kt from "./vue-ui-accordion-5C4CP3gA.js";
|
|
11
|
+
import { u as Me } from "./useNestedProp-0nRX_rTi.js";
|
|
12
|
+
import { _ as xt } from "./PackageVersion-I1_4jcn_.js";
|
|
13
13
|
import { _ as $t } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
const re = (M) => (je("data-v-e05474aa"), M = M(), et(), M), Lt = ["id"], Ct = ["xmlns", "viewBox"], Ft = ["id"], St = /* @__PURE__ */ re(() => /* @__PURE__ */ p("stop", {
|
|
15
15
|
offset: "0%",
|
|
@@ -22,13 +22,13 @@ const re = (M) => (je("data-v-e05474aa"), M = M(), et(), M), Lt = ["id"], Ct = [
|
|
|
22
22
|
}, null, -1)), Dt = ["id"], Ot = ["id"], zt = /* @__PURE__ */ re(() => /* @__PURE__ */ p("feColorMatrix", {
|
|
23
23
|
type: "saturate",
|
|
24
24
|
values: "0"
|
|
25
|
-
}, null, -1)), Pt = ["id"], At = ["flood-color"], Vt = ["d", "fill", "stroke", "stroke-width", "filter"], Mt = { key: 0 }, Bt = ["d", "fill"], Ut = { key: 1 },
|
|
25
|
+
}, null, -1)), Pt = ["id"], At = ["flood-color"], Vt = ["d", "fill", "stroke", "stroke-width", "filter"], Mt = { key: 0 }, Bt = ["d", "fill"], Ut = { key: 1 }, Rt = ["x", "y", "font-size", "font-weight", "fill"], Et = { key: 2 }, Gt = ["filter"], Yt = ["text-anchor", "x", "y", "fill", "font-size", "font-weight"], Xt = ["text-anchor", "x", "y", "fill", "font-size", "font-weight"], Wt = ["text-anchor", "x", "y", "fill", "font-size", "font-weight"], Ht = ["d", "fill", "onMouseenter", "onClick"], qt = {
|
|
26
26
|
key: 3,
|
|
27
27
|
class: "vue-data-ui-watermark"
|
|
28
|
-
},
|
|
28
|
+
}, Kt = {
|
|
29
29
|
key: 0,
|
|
30
30
|
class: "vue-ui-nested-donuts-legend-title"
|
|
31
|
-
},
|
|
31
|
+
}, Jt = ["onClick"], Qt = ["innerHTML"], Zt = {
|
|
32
32
|
__name: "vue-ui-nested-donuts",
|
|
33
33
|
props: {
|
|
34
34
|
config: {
|
|
@@ -46,8 +46,8 @@ const re = (M) => (je("data-v-e05474aa"), M = M(), et(), M), Lt = ["id"], Ct = [
|
|
|
46
46
|
},
|
|
47
47
|
emits: ["selectLegend", "selectDatapoint"],
|
|
48
48
|
setup(M, { expose: Be, emit: ie }) {
|
|
49
|
-
const I = M, { vue_ui_nested_donuts: Ue } = tt(),
|
|
50
|
-
function
|
|
49
|
+
const I = M, { vue_ui_nested_donuts: Ue } = tt(), E = g(() => !!I.dataset && I.dataset.length), _ = d(lt()), Z = d(!1), j = d(""), Re = d(null), de = d(0), B = d(null), ce = d(null), ee = d(null), ve = d(0), fe = d(0), he = d(0), U = d(!1);
|
|
50
|
+
function Ee(t) {
|
|
51
51
|
U.value = t, de.value += 1;
|
|
52
52
|
}
|
|
53
53
|
const e = g({
|
|
@@ -70,8 +70,8 @@ const re = (M) => (je("data-v-e05474aa"), M = M(), et(), M), Lt = ["id"], Ct = [
|
|
|
70
70
|
De(() => I.config, (t) => {
|
|
71
71
|
e.value = ye(), pe(), ve.value += 1, fe.value += 1, he.value += 1;
|
|
72
72
|
}, { deep: !0 });
|
|
73
|
-
const
|
|
74
|
-
|
|
73
|
+
const G = d(null);
|
|
74
|
+
Ke(() => {
|
|
75
75
|
pe();
|
|
76
76
|
});
|
|
77
77
|
function pe() {
|
|
@@ -87,16 +87,16 @@ const re = (M) => (je("data-v-e05474aa"), M = M(), et(), M), Lt = ["id"], Ct = [
|
|
|
87
87
|
});
|
|
88
88
|
f.value.width = s, f.value.height = a;
|
|
89
89
|
});
|
|
90
|
-
|
|
90
|
+
G.value = new ResizeObserver(t), G.value.observe(B.value.parentNode);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
Je(() => {
|
|
94
|
+
G.value && G.value.disconnect();
|
|
95
95
|
});
|
|
96
96
|
const { isPrinting: be, isImaging: ge, generatePdf: me, generateImage: _e } = pt({
|
|
97
97
|
elementId: `nested_donuts_${_.value}`,
|
|
98
98
|
fileName: e.value.style.chart.title.text || "vue-ui-nested-donuts"
|
|
99
|
-
}),
|
|
99
|
+
}), Ge = g(() => ut(e.value.customPalette)), w = d({
|
|
100
100
|
dataLabels: {
|
|
101
101
|
show: e.value.style.chart.layout.labels.dataLabels.show
|
|
102
102
|
},
|
|
@@ -151,7 +151,7 @@ const re = (M) => (je("data-v-e05474aa"), M = M(), et(), M), Lt = ["id"], Ct = [
|
|
|
151
151
|
id: `${_.value}_${s}_${o}`,
|
|
152
152
|
seriesIndex: o,
|
|
153
153
|
datasetIndex: s,
|
|
154
|
-
color: nt(a.color) ||
|
|
154
|
+
color: nt(a.color) || Ge.value[o] || Q[o] || Q[o % Q.length],
|
|
155
155
|
value: ze(a.values).reduce((l, i) => l + i, 0),
|
|
156
156
|
absoluteValues: a.values || []
|
|
157
157
|
}))
|
|
@@ -291,7 +291,7 @@ const re = (M) => (je("data-v-e05474aa"), M = M(), et(), M), Lt = ["id"], Ct = [
|
|
|
291
291
|
</span>
|
|
292
292
|
</div>
|
|
293
293
|
<span>
|
|
294
|
-
${e.value.style.chart.tooltip.showValue ? `<b>${
|
|
294
|
+
${e.value.style.chart.tooltip.showValue ? `<b>${R(
|
|
295
295
|
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
296
296
|
t.value,
|
|
297
297
|
L({
|
|
@@ -313,7 +313,7 @@ const re = (M) => (je("data-v-e05474aa"), M = M(), et(), M), Lt = ["id"], Ct = [
|
|
|
313
313
|
`;
|
|
314
314
|
});
|
|
315
315
|
} else
|
|
316
|
-
l += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${t.arcOf ?? ""} - ${t.name}</div>`, l += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${t.color}"/></svg>`, e.value.style.chart.tooltip.showValue && (l += `<b>${
|
|
316
|
+
l += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${t.arcOf ?? ""} - ${t.name}</div>`, l += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${t.color}"/></svg>`, e.value.style.chart.tooltip.showValue && (l += `<b>${R(
|
|
317
317
|
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
318
318
|
t.value,
|
|
319
319
|
L({
|
|
@@ -474,7 +474,7 @@ const re = (M) => (je("data-v-e05474aa"), M = M(), et(), M), Lt = ["id"], Ct = [
|
|
|
474
474
|
}
|
|
475
475
|
}, null, 8, ["config"]))
|
|
476
476
|
], 512)) : y("", !0),
|
|
477
|
-
e.value.userOptions.show &&
|
|
477
|
+
e.value.userOptions.show && E.value ? (u(), P(bt, {
|
|
478
478
|
ref: "details",
|
|
479
479
|
key: `user_option_${de.value}`,
|
|
480
480
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
@@ -494,7 +494,7 @@ const re = (M) => (je("data-v-e05474aa"), M = M(), et(), M), Lt = ["id"], Ct = [
|
|
|
494
494
|
titles: { ...e.value.userOptions.buttonTitles },
|
|
495
495
|
chartElement: B.value,
|
|
496
496
|
position: e.value.userOptions.position,
|
|
497
|
-
onToggleFullscreen:
|
|
497
|
+
onToggleFullscreen: Ee,
|
|
498
498
|
onGeneratePdf: r(me),
|
|
499
499
|
onGenerateCsv: Se,
|
|
500
500
|
onGenerateImage: r(_e),
|
|
@@ -547,12 +547,12 @@ const re = (M) => (je("data-v-e05474aa"), M = M(), et(), M), Lt = ["id"], Ct = [
|
|
|
547
547
|
t.$slots.optionFullscreen ? {
|
|
548
548
|
name: "optionFullscreen",
|
|
549
549
|
fn: m(({ toggleFullscreen: a, isFullscreen: o }) => [
|
|
550
|
-
$(t.$slots, "optionFullscreen", q(
|
|
550
|
+
$(t.$slots, "optionFullscreen", q(K({ toggleFullscreen: a, isFullscreen: o })), void 0, !0)
|
|
551
551
|
]),
|
|
552
552
|
key: "6"
|
|
553
553
|
} : void 0
|
|
554
554
|
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "onGeneratePdf", "onGenerateImage"])) : y("", !0),
|
|
555
|
-
|
|
555
|
+
E.value ? (u(), n("svg", {
|
|
556
556
|
key: 2,
|
|
557
557
|
xmlns: r(rt),
|
|
558
558
|
class: z({ "vue-data-ui-fullscreen--on": U.value, "vue-data-ui-fulscreen--off": !U.value }),
|
|
@@ -640,11 +640,11 @@ const re = (M) => (je("data-v-e05474aa"), M = M(), et(), M), Lt = ["id"], Ct = [
|
|
|
640
640
|
"font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
|
|
641
641
|
"font-weight": e.value.style.chart.layout.labels.dataLabels.boldDonutName ? "bold" : "normal",
|
|
642
642
|
fill: e.value.style.chart.layout.labels.dataLabels.color
|
|
643
|
-
}, T(e.value.style.chart.layout.labels.dataLabels.donutNameAbbreviation ? r(it)({ source: a.name, length: e.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize }) : a.name), 11,
|
|
643
|
+
}, T(e.value.style.chart.layout.labels.dataLabels.donutNameAbbreviation ? r(it)({ source: a.name, length: e.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize }) : a.name), 11, Rt)) : y("", !0)
|
|
644
644
|
]))), 256))
|
|
645
645
|
]))), 256))
|
|
646
646
|
])) : y("", !0),
|
|
647
|
-
e.value.style.chart.layout.labels.dataLabels.show ? (u(), n("g",
|
|
647
|
+
e.value.style.chart.layout.labels.dataLabels.show ? (u(), n("g", Et, [
|
|
648
648
|
(u(!0), n(x, null, S(Y.value, (a, o) => (u(), n("g", null, [
|
|
649
649
|
(u(!0), n(x, null, S(a.donut, (l, i) => (u(), n("g", {
|
|
650
650
|
filter: Fe(l, i)
|
|
@@ -668,7 +668,7 @@ const re = (M) => (je("data-v-e05474aa"), M = M(), et(), M), Lt = ["id"], Ct = [
|
|
|
668
668
|
fill: e.value.style.chart.layout.labels.dataLabels.useSerieColor ? l.color : e.value.style.chart.layout.labels.dataLabels.color,
|
|
669
669
|
"font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
|
|
670
670
|
"font-weight": e.value.style.chart.layout.labels.dataLabels.boldValue ? "bold" : "normal"
|
|
671
|
-
}, " (" + T(r(
|
|
671
|
+
}, " (" + T(r(R)(
|
|
672
672
|
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
673
673
|
l.value,
|
|
674
674
|
r(L)({
|
|
@@ -688,7 +688,7 @@ const re = (M) => (je("data-v-e05474aa"), M = M(), et(), M), Lt = ["id"], Ct = [
|
|
|
688
688
|
fill: e.value.style.chart.layout.labels.dataLabels.useSerieColor ? l.color : e.value.style.chart.layout.labels.dataLabels.color,
|
|
689
689
|
"font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
|
|
690
690
|
"font-weight": e.value.style.chart.layout.labels.dataLabels.boldValue ? "bold" : "normal"
|
|
691
|
-
}, T(r(
|
|
691
|
+
}, T(r(R)(
|
|
692
692
|
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
693
693
|
l.value,
|
|
694
694
|
r(L)({
|
|
@@ -699,7 +699,7 @@ const re = (M) => (je("data-v-e05474aa"), M = M(), et(), M), Lt = ["id"], Ct = [
|
|
|
699
699
|
}),
|
|
700
700
|
{ datapoint: l, seriesIndex: o, datapointIndex: i }
|
|
701
701
|
)), 11, Wt)) : y("", !0)
|
|
702
|
-
], 8,
|
|
702
|
+
], 8, Gt))), 256))
|
|
703
703
|
]))), 256))
|
|
704
704
|
])) : y("", !0),
|
|
705
705
|
(u(!0), n(x, null, S(Y.value, (a, o) => (u(), n("g", null, [
|
|
@@ -707,7 +707,7 @@ const re = (M) => (je("data-v-e05474aa"), M = M(), et(), M), Lt = ["id"], Ct = [
|
|
|
707
707
|
p("path", {
|
|
708
708
|
"data-cy-donut-trap": "",
|
|
709
709
|
d: l.arcSlice,
|
|
710
|
-
fill:
|
|
710
|
+
fill: Re.value === o ? "rgba(0,0,0,0.1)" : "transparent",
|
|
711
711
|
onMouseenter: (b) => We({
|
|
712
712
|
datapoint: l,
|
|
713
713
|
relativeIndex: o,
|
|
@@ -723,9 +723,9 @@ const re = (M) => (je("data-v-e05474aa"), M = M(), et(), M), Lt = ["id"], Ct = [
|
|
|
723
723
|
$(t.$slots, "svg", { svg: f.value }, void 0, !0)
|
|
724
724
|
], 14, Ct)) : y("", !0),
|
|
725
725
|
t.$slots.watermark ? (u(), n("div", qt, [
|
|
726
|
-
$(t.$slots, "watermark", q(
|
|
726
|
+
$(t.$slots, "watermark", q(K({ isPrinting: r(be) || r(ge) })), void 0, !0)
|
|
727
727
|
])) : y("", !0),
|
|
728
|
-
|
|
728
|
+
E.value ? y("", !0) : (u(), P(wt, {
|
|
729
729
|
key: 4,
|
|
730
730
|
config: {
|
|
731
731
|
type: "donut",
|
|
@@ -753,10 +753,10 @@ const re = (M) => (je("data-v-e05474aa"), M = M(), et(), M), Lt = ["id"], Ct = [
|
|
|
753
753
|
isCustom: r(Ve)(e.value.style.chart.tooltip.customFormat)
|
|
754
754
|
}, {
|
|
755
755
|
"tooltip-before": m(() => [
|
|
756
|
-
$(t.$slots, "tooltip-before", q(
|
|
756
|
+
$(t.$slots, "tooltip-before", q(K({ ...ae.value })), void 0, !0)
|
|
757
757
|
]),
|
|
758
758
|
"tooltip-after": m(() => [
|
|
759
|
-
$(t.$slots, "tooltip-after", q(
|
|
759
|
+
$(t.$slots, "tooltip-after", q(K({ ...ae.value })), void 0, !0)
|
|
760
760
|
]),
|
|
761
761
|
_: 3
|
|
762
762
|
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom"]),
|
|
@@ -773,14 +773,14 @@ const re = (M) => (je("data-v-e05474aa"), M = M(), et(), M), Lt = ["id"], Ct = [
|
|
|
773
773
|
onClickMarker: s[1] || (s[1] = ({ legend: l }) => te(l))
|
|
774
774
|
}, {
|
|
775
775
|
legendTitle: m(({ titleSet: l }) => [
|
|
776
|
-
l[0] && l[0].arcOf ? (u(), n("div",
|
|
776
|
+
l[0] && l[0].arcOf ? (u(), n("div", Kt, T(l[0].arcOf), 1)) : y("", !0)
|
|
777
777
|
]),
|
|
778
778
|
item: m(({ legend: l, index: i }) => [
|
|
779
779
|
p("div", {
|
|
780
780
|
onClick: (b) => te(l),
|
|
781
781
|
style: ue(`opacity:${h.value.includes(l.id) ? 0.5 : 1}`)
|
|
782
782
|
}, [
|
|
783
|
-
|
|
783
|
+
J(T(l.name) + ": " + T(r(R)(
|
|
784
784
|
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
785
785
|
l.value,
|
|
786
786
|
r(L)({
|
|
@@ -792,11 +792,11 @@ const re = (M) => (je("data-v-e05474aa"), M = M(), et(), M), Lt = ["id"], Ct = [
|
|
|
792
792
|
{ datapoint: l, seriesIndex: i }
|
|
793
793
|
)) + " ", 1),
|
|
794
794
|
h.value.includes(l.id) ? (u(), n(x, { key: 1 }, [
|
|
795
|
-
|
|
795
|
+
J(" ( - % ) ")
|
|
796
796
|
], 64)) : (u(), n(x, { key: 0 }, [
|
|
797
|
-
|
|
797
|
+
J(" (" + T(isNaN(l.value / l.total) ? "-" : r(L)({ v: l.value / l.total * 100, s: "%", r: e.value.style.chart.legend.roundingPercentage })) + ") ", 1)
|
|
798
798
|
], 64))
|
|
799
|
-
], 12,
|
|
799
|
+
], 12, Jt)
|
|
800
800
|
]),
|
|
801
801
|
_: 2
|
|
802
802
|
}, 1032, ["legendSet", "config"]))), 128))
|
|
@@ -808,7 +808,7 @@ const re = (M) => (je("data-v-e05474aa"), M = M(), et(), M), Lt = ["id"], Ct = [
|
|
|
808
808
|
}, [
|
|
809
809
|
$(t.$slots, "legend", { legend: se.value }, void 0, !0)
|
|
810
810
|
], 512)),
|
|
811
|
-
|
|
811
|
+
E.value ? (u(), P(kt, {
|
|
812
812
|
key: 7,
|
|
813
813
|
hideDetails: "",
|
|
814
814
|
config: {
|
|
@@ -841,7 +841,7 @@ const re = (M) => (je("data-v-e05474aa"), M = M(), et(), M), Lt = ["id"], Ct = [
|
|
|
841
841
|
}, null, 8, Qt)
|
|
842
842
|
]),
|
|
843
843
|
td: m(({ td: a }) => [
|
|
844
|
-
|
|
844
|
+
J(T(a.name || a), 1)
|
|
845
845
|
]),
|
|
846
846
|
_: 1
|
|
847
847
|
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
@@ -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-BwtKB_oG.cjs"),ce=require("./useResponsive-B3TrDDIG.cjs"),we=require("./Title-DcXqsD3c.cjs"),de=require("./usePrinter-BMJj8aqh.cjs"),xe=require("./DataTable-CUi5w5e6.cjs"),Be=require("./Tooltip-onlvaIFL.cjs"),_e=require("./Legend-DP-Tm5Kr.cjs"),$e=require("./vue-ui-skeleton-snFRuZgs.cjs"),Ne=require("./vue-ui-accordion-CM2NnUan.cjs"),ve=require("./useNestedProp-CE6ustAp.cjs"),Se=require("./PackageVersion-DdGAD2ox.cjs"),Ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M=w=>(e.pushScopeId("data-v-e05474aa"),w=w(),e.popScopeId(),w),Fe=["id"],Ve=["xmlns","viewBox"],Te=["id"],De=M(()=>e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),ze=["offset","stop-color"],Pe=["offset","stop-opacity"],Oe=M(()=>e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Ie=["id"],Ae=["id"],Me=M(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Re=["id"],Ue=["flood-color"],qe=["d","fill","stroke","stroke-width","filter"],Ye={key:0},Xe=["d","fill"],Ge={key:1},He=["x","y","font-size","font-weight","fill"],We={key:2},Je=["filter"],Ke=["text-anchor","x","y","fill","font-size","font-weight"],Qe=["text-anchor","x","y","fill","font-size","font-weight"],Ze=["text-anchor","x","y","fill","font-size","font-weight"],je=["d","fill","onMouseenter","onClick"],et={key:3,class:"vue-data-ui-watermark"},tt={key:0,class:"vue-ui-nested-donuts-legend-title"},lt=["onClick"],at=["innerHTML"],ot={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(w,{expose:fe,emit:R}){const k=w,{vue_ui_nested_donuts:pe}=r.useConfig(),_=e.computed(()=>!!k.dataset&&k.dataset.length),p=e.ref(r.createUid()),V=e.ref(!1),T=e.ref(""),he=e.ref(null),U=e.ref(0),x=e.ref(null),q=e.ref(null),D=e.ref(null),Y=e.ref(0),X=e.ref(0),G=e.ref(0),B=e.ref(!1);function ye(l){B.value=l,U.value+=1}const t=e.computed({get:()=>H(),set:l=>l});function H(){const l=ve.useNestedProp({userConfig:k.config,defaultConfig:pe});return l.theme?{...ve.useNestedProp({userConfig:r.themes.vue_ui_nested_donuts[l.theme]||k.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>k.config,l=>{t.value=H(),W(),Y.value+=1,X.value+=1,G.value+=1},{deep:!0});const $=e.ref(null);e.onMounted(()=>{W()});function W(){if(r.objectIsEmpty(k.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=ce.throttle(()=>{const{width:s,height:o}=ce.useResponsive({chart:x.value,title:t.value.style.chart.title.text?q.value:null,legend:t.value.style.chart.legend.show?D.value:null});d.value.width=s,d.value.height=o});$.value=new ResizeObserver(l),$.value.observe(x.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:J,isImaging:K,generatePdf:Q,generateImage:Z}=de.usePrinter({elementId:`nested_donuts_${p.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts"}),me=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),h=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),d=e.ref({height:512,width:512});function be({datapoint:l,index:s}){R("selectDatapoint",{datapoint:l,index:s})}const v=e.ref([]),m=e.computed(()=>(k.dataset.forEach((l,s)=>{[null,void 0].includes(l.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:s}),[null,void 0].includes(l.series)?r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:s}):l.series.length===0?r.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${s}`}):l.series.forEach((o,n)=>{[null,void 0].includes(o.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:n,key:"serie"}),[null,void 0].includes(o.values)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:n,key:"serie"})})}),k.dataset.map((l,s)=>({...l,total:l.series.filter(o=>!v.value.includes(o.id)).map(o=>r.sanitizeArray(o.values).reduce((n,a)=>n+a,0)).reduce((o,n)=>o+n,0),datasetIndex:s,id:`${p.value}_${s}`,series:l.series.map((o,n)=>({name:o.name,arcOf:l.name,arcOfId:`${p.value}_${s}`,id:`${p.value}_${s}_${n}`,seriesIndex:n,datasetIndex:s,color:r.convertColorToHex(o.color)||me.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:r.sanitizeArray(o.values).reduce((a,u)=>a+u,0),absoluteValues:o.values||[]}))})))),b=e.computed(()=>Math.min(d.value.height,d.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),j=e.computed(()=>[...m.value].map((l,s)=>{const o=l.series.filter(n=>!v.value.includes(n.id)).map(n=>n.value).reduce((n,a)=>n+a,0);return{...l,total:o,series:l.series.filter(n=>!v.value.includes(n.id)).map(n=>({...n,proportion:n.value/o}))}}));function ge(l,s,o){let n=0;for(let a=0;a<l.length;a+=1)o.includes(l[a])&&(n+=1);return n<s}const c=e.ref(j.value);e.watch(()=>j.value,l=>c.value=l);const ee=e.ref(null),te=e.ref(null);function z(l){R("selectLegend",l);const s=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),o=c.value.flatMap(i=>i.series).find(i=>i.id===l.id);let a=o?o.value:0;const u=m.value.find(i=>i.id===s.arcOfId).series.map(i=>i.id),f=ge(u,u.length-1,v.value);if(v.value.includes(l.id)){let i=function(){a>s.value?(cancelAnimationFrame(ee.value),c.value=c.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(a+=s.value*.025,c.value=c.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:a}:g)})),ee.value=requestAnimationFrame(i))};v.value=v.value.filter(y=>y!==l.id),i()}else if(f){let i=function(){a<.1?(cancelAnimationFrame(te.value),v.value.push(l.id),c.value=c.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:0}:L)}))):(a/=1.1,c.value=c.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:a}:L)})),te.value=requestAnimationFrame(i))};i()}}const P=e.computed(()=>b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio),le=e.computed(()=>c.value.map((l,s)=>b.value-s*b.value/m.value.length)),N=e.computed(()=>c.value.map((l,s)=>{const o=s*b.value/m.value.length;return{...l,radius:b.value-o,donut:r.makeDonut({series:l.series},d.value.width/2,d.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,P.value)}})),ae=e.computed(()=>[...m.value].map((l,s)=>{const o=s*b.value/m.value.length;return{sizeRatio:o,donut:r.makeDonut({series:[{value:1}]},d.value.width/2,d.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),oe=e.ref(null),S=e.ref(null),E=e.ref(null),O=e.ref(null);function ke({datapoint:l,_relativeIndex:s,seriesIndex:o}){oe.value=l.arcOfId,S.value=l.id,E.value=o,O.value={datapoint:l,seriesIndex:o,series:c.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:o,datapoint:l,series:c.value,config:t.value})))T.value=n({seriesIndex:o,datapoint:l,series:c.value,config:t.value});else{let a="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&v.value.length===0){const u=c.value.map(f=>f.series.find(i=>i.seriesIndex===o));u.forEach((f,i)=>{if(!f)return"";a+=`
|
|
2
2
|
<div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${i<u.length-1?`border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor}`:""}">
|
|
3
3
|
<div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
|
|
4
4
|
<svg viewBox="0 0 20 20" height="${t.value.style.chart.tooltip.fontSize}" width="${t.value.style.chart.tooltip.fontSize}">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-BwtKB_oG.cjs"),j=require("./useResponsive-B3TrDDIG.cjs"),he=require("./Title-DcXqsD3c.cjs"),J=require("./usePrinter-BMJj8aqh.cjs"),pe=require("./Legend-DP-Tm5Kr.cjs"),fe=require("./DataTable-CUi5w5e6.cjs"),ge=require("./Tooltip-onlvaIFL.cjs"),me=require("./vue-ui-skeleton-snFRuZgs.cjs"),ye=require("./vue-ui-accordion-CM2NnUan.cjs"),K=require("./useNestedProp-CE6ustAp.cjs"),be=require("./PackageVersion-DdGAD2ox.cjs"),ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),we=["id"],Ce=["xmlns","viewBox"],xe=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],$e=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Be=["id"],Te=["stdDeviation"],_e=["filter"],Se=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset"],Pe=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset","onMouseenter"],Ne={key:1},Oe=["onMouseenter"],Fe=["x","y","font-size","fill","font-weight"],Ie={key:3,class:"vue-data-ui-watermark"},Ve=["onClick"],Ee=["innerHTML"],Le={__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(Q,{expose:Z,emit:ee}){const p=Q,{vue_ui_onion:te}=u.useConfig(),C=e.computed(()=>!!p.dataset&&p.dataset.length),m=e.ref(u.createUid()),ae=e.ref(null),F=e.ref(0),x=e.ref(!1),T=e.ref(""),d=e.ref([]),y=e.ref(null),I=e.ref(null),V=e.ref(null),E=e.ref(0),L=e.ref(0),M=e.ref(0),t=e.computed({get:()=>D(),set:l=>l});function D(){const l=K.useNestedProp({userConfig:p.config,defaultConfig:te});return l.theme?{...K.useNestedProp({userConfig:u.themes.vue_ui_onion[l.theme]||p.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}e.watch(()=>p.config,l=>{t.value=D(),Y(),E.value+=1,L.value+=1,M.value+=1},{deep:!0});const{isPrinting:R,isImaging:z,generatePdf:A,generateImage:q}=J.usePrinter({elementId:`vue-ui-onion_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-onion"}),le=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),f=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),n=e.ref({height:512,width:512,padding:{top:64,left:64,right:64,bottom:64},minRadius:64}),$=e.ref(null);e.onMounted(()=>{Y()});function Y(){if(u.objectIsEmpty(p.dataset)&&u.error({componentName:"VueUiOnion",type:"dataset"}),t.value.responsive){const r=j.throttle(()=>{const{width:a,height:o}=j.useResponsive({chart:y.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?V.value:null});n.value.width=a,n.value.height=o,n.value.padding.top=Math.max(a,o)*.125,n.value.padding.right=Math.max(a,o)*.125,n.value.padding.bottom=Math.max(a,o)*.125,n.value.padding.left=Math.max(a,o)*.125,n.value.minRadius=Math.min(a,o)*.125});$.value=new ResizeObserver(r),$.value.observe(y.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const s=e.computed(()=>({top:n.value.padding.top,left:n.value.padding.left,right:n.value.width-n.value.padding.right,bottom:n.value.height-n.value.padding.bottom,centerX:n.value.width/2,centerY:n.value.height/2,width:n.value.width-n.value.padding.right-n.value.padding.left,height:n.value.height-n.value.padding.bottom-n.value.padding.top,minRadius:n.value.minRadius,maxRadius:Math.min(n.value.width,n.value.height)-n.value.padding.top*2})),i=e.computed(()=>(p.dataset.forEach((l,r)=>{[null,void 0].includes(l.name)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"name",index:r}),[void 0].includes(l.percentage)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"percentage",index:r})}),p.dataset.map((l,r)=>{const a=`onion_serie_${r}_${m.value}`;return{...l,percentage:l.percentage||0,targetPercentage:l.percentage||0,color:u.convertColorToHex(l.color)||le.value[r]||u.palette[r],id:a,shape:"circle",opacity:d.value.includes(a)?.5:1,absoluteIndex:r,segregate:()=>X(a),isSegregated:d.value.includes(a)}}))),b=e.ref(i.value),oe=e.computed(()=>t.value.useStartAnimation),re=e.ref(null),ne=e.computed(()=>Math.max(...i.value.map(l=>l.percentage))),_=e.ref(!1);e.watch(()=>i.value,ue,{immediate:!0});function ue(){if(oe.value&&!_.value){let r=function(){l>=ne.value?(cancelAnimationFrame(re.value),b.value=i.value,_.value=!0):(b.value=i.value.map(a=>({...a,percentage:l<a.targetPercentage?l:a.targetPercentage})),l+=1,requestAnimationFrame(r),_.value=!0)};b.value=i.value.map(a=>({...a,percentage:0}));let l=0;r()}else b.value=i.value}const se=e.computed(()=>({cy:"onion-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),ie=e.computed(()=>i.value.filter(l=>!d.value.includes(l.id)).length),g=e.computed(()=>{const l=Math.min(s.value.width,s.value.height)/2/i.value.length;return{gutter:(l>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:l)*t.value.style.chart.layout.gutter.width,track:(l>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:l)*t.value.style.chart.layout.track.width}}),v=e.computed(()=>b.value.filter(l=>!d.value.includes(l.id)).map((l,r)=>{const a=(s.value.maxRadius-g.value.track)/ie.value/2*(1+r),o=s.value.centerY-a;return{percentage:l.percentage||0,...l,labelY:o,radius:a,path:ce(a,l.percentage||0)}}));function ce(l,r){const a=2*Math.PI*l,o=a*.75,c=`${o} ${a}`,w=o*(1-r/100);return{bgDashArray:`${o} ${a}`,bgDashOffset:0,dashArray:c,dashOffset:w,fullOffset:0,active:`
|
|
2
2
|
M ${s.value.centerX},${s.value.centerY-l}
|
|
3
3
|
A ${l},${l} 0 1 1
|
|
4
4
|
${s.value.centerX+l*Math.cos(Math.PI*3/4)},${s.value.centerY+l*Math.sin(Math.PI*3/4)}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { computed as d, ref as n, watch as he, onMounted as Ne, onBeforeUnmount as Re, openBlock as s, createElementBlock as u, normalizeClass as z, normalizeStyle as W, createBlock as C, createCommentVNode as b, unref as v, createSlots as Ae, withCtx as h, renderSlot as g, normalizeProps as Y, guardReactiveProps as B, createVNode as fe, Fragment as M, renderList as F, createElementVNode as _, toDisplayString as T, createTextVNode as De, nextTick as Le } from "vue";
|
|
2
|
-
import { u as ze, c as Ye, t as Be, a as Ve, p as ge, b as Xe, o as Ge, e as j, d as Ue, X as Ee, f as N, i as q, x as pe, q as He, r as We, y as je } from "./index-
|
|
2
|
+
import { u as ze, c as Ye, t as Be, a as Ve, p as ge, b as Xe, o as Ge, e as j, d as Ue, X as Ee, f as N, i as q, x as pe, q as He, r as We, y as je } from "./index-DK7qqHGP.js";
|
|
3
3
|
import { t as qe, u as Je } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as Ke } from "./Title-
|
|
5
|
-
import { u as Qe, U as Ze } from "./usePrinter-
|
|
6
|
-
import { L as et } from "./Legend-
|
|
7
|
-
import { D as tt } from "./DataTable-
|
|
8
|
-
import { _ as at } from "./Tooltip-
|
|
9
|
-
import lt from "./vue-ui-skeleton-
|
|
10
|
-
import ot from "./vue-ui-accordion-
|
|
11
|
-
import { u as ye } from "./useNestedProp-
|
|
12
|
-
import { _ as rt } from "./PackageVersion-
|
|
4
|
+
import { _ as Ke } from "./Title-Cxlu3Etv.js";
|
|
5
|
+
import { u as Qe, U as Ze } from "./usePrinter-Cza87yNE.js";
|
|
6
|
+
import { L as et } from "./Legend-D4PxDNTf.js";
|
|
7
|
+
import { D as tt } from "./DataTable-B9SSwFM2.js";
|
|
8
|
+
import { _ as at } from "./Tooltip-Bt9pHzBM.js";
|
|
9
|
+
import lt from "./vue-ui-skeleton-CQnYuosp.js";
|
|
10
|
+
import ot from "./vue-ui-accordion-5C4CP3gA.js";
|
|
11
|
+
import { u as ye } from "./useNestedProp-0nRX_rTi.js";
|
|
12
|
+
import { _ as rt } from "./PackageVersion-I1_4jcn_.js";
|
|
13
13
|
import { _ as st } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
const nt = ["id"], ut = ["xmlns", "viewBox"], it = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], ct = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], dt = ["id"], vt = ["stdDeviation"], ht = ["filter"], ft = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], gt = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset", "onMouseenter"], pt = { key: 1 }, yt = ["onMouseenter"], mt = ["x", "y", "font-size", "fill", "font-weight"], bt = {
|
|
15
15
|
key: 3,
|