vue-data-ui 2.3.90 → 2.3.91
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-C_Fnn6al.js → Arrow-CHTslrAF.js} +1 -1
- package/dist/{Arrow-D1pymKl6.cjs → Arrow-DpuaFuue.cjs} +1 -1
- package/dist/{BaseIcon-BMfi5PnL.js → BaseIcon-DfaCNBgc.js} +1 -1
- package/dist/{BaseIcon-CnFXP_n9.cjs → BaseIcon-JWGtHqTA.cjs} +1 -1
- package/dist/{DataTable-Cmbf3abv.js → DataTable-BKc3r3k3.js} +2 -2
- package/dist/{DataTable-cOEA6Z37.cjs → DataTable-CnkdsvIo.cjs} +1 -1
- package/dist/{Legend-XqP6-7Ac.cjs → Legend-BQJV6Xk4.cjs} +1 -1
- package/dist/{Legend-CCq0mNRg.js → Legend-WNL92WSx.js} +1 -1
- package/dist/PackageVersion-D9PU8glB.js +10 -0
- package/dist/PackageVersion-LdLhc8hQ.cjs +1 -0
- package/dist/{Shape-B51JGReT.cjs → Shape-CgW0V2Og.cjs} +1 -1
- package/dist/{Shape-BNocET8E.js → Shape-DPvoEBm9.js} +1 -1
- package/dist/{Slicer-BKszZXjM.js → Slicer-DE9nFM_c.js} +2 -2
- package/dist/{Slicer-Bc7OWCcl.cjs → Slicer-Dma3nlzi.cjs} +1 -1
- package/dist/{Title-BaR4XyXa.cjs → Title-Bg_BK11V.cjs} +1 -1
- package/dist/{Title-DlBwa3-X.js → Title-CECK1w9L.js} +1 -1
- package/dist/{Tooltip-w32n-8sY.js → Tooltip-Ci3AprCm.js} +1 -1
- package/dist/{Tooltip-CX57w9Q9.cjs → Tooltip-lM1Jzkza.cjs} +1 -1
- package/dist/{index-B8EMsnjU.cjs → index-BhH89oF0.cjs} +1 -1
- package/dist/{index-DQl1TFXa.js → index-mBy4elhB.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-lmeFt-ev.js → useNestedProp-BrIRtQj1.js} +1 -1
- package/dist/{useNestedProp-DlCe_zZz.cjs → useNestedProp-m8IH8hWW.cjs} +1 -1
- package/dist/{usePrinter-BmXrEJ99.cjs → usePrinter-B8jr_V3b.cjs} +1 -1
- package/dist/{usePrinter-DgKGVvJC.js → usePrinter-Ck-yukK2.js} +1 -1
- package/dist/{vue-data-ui-DQurgvN8.cjs → vue-data-ui-BgaY7Noy.cjs} +1 -1
- package/dist/{vue-data-ui-Byrb_Y3k.js → vue-data-ui-BuL-2aYA.js} +57 -57
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/vue-ui-3d-bar-C9a-AsIX.cjs +19 -0
- package/dist/{vue-ui-3d-bar-CM_usP2U.js → vue-ui-3d-bar-Cv-56A3m.js} +148 -146
- package/dist/{vue-ui-accordion-DRI-fN6I.cjs → vue-ui-accordion-Bzq1iTL2.cjs} +1 -1
- package/dist/{vue-ui-accordion-CroZrm7T.js → vue-ui-accordion-dyF20BlD.js} +3 -3
- package/dist/{vue-ui-age-pyramid-BZU-WI_a.js → vue-ui-age-pyramid-BqsDR6uw.js} +83 -81
- package/dist/vue-ui-age-pyramid-DDPU8QV8.cjs +1 -0
- package/dist/{vue-ui-annotator-BpzM25VY.cjs → vue-ui-annotator-B9HxrEVE.cjs} +1 -1
- package/dist/{vue-ui-annotator-CsfYgmrC.js → vue-ui-annotator-CkJsRR0r.js} +1 -1
- package/dist/{vue-ui-candlestick-BPi7aBEf.js → vue-ui-candlestick-B8eYA2g0.js} +113 -111
- package/dist/vue-ui-candlestick-DbbbJa-d.cjs +2 -0
- package/dist/{vue-ui-carousel-table-tbviS8Fo.js → vue-ui-carousel-table-BCiTg3Ok.js} +4 -4
- package/dist/{vue-ui-carousel-table-CpodLcgX.cjs → vue-ui-carousel-table-CCWGcKb7.cjs} +1 -1
- package/dist/{vue-ui-chestnut-ql9yEs6j.js → vue-ui-chestnut-DI-N69Ad.js} +161 -159
- package/dist/vue-ui-chestnut-rsWP_sXY.cjs +6 -0
- package/dist/{vue-ui-cursor-Dw7_R_Pd.js → vue-ui-cursor-BUzJk1oC.js} +2 -2
- package/dist/{vue-ui-cursor-B3w0SgJP.cjs → vue-ui-cursor-wY14Z-Vd.cjs} +1 -1
- package/dist/{vue-ui-dashboard-enrB5B3P.cjs → vue-ui-dashboard-Cf8TYbAr.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DAY0cdat.js → vue-ui-dashboard-CiG3kXLl.js} +2 -2
- package/dist/{vue-ui-digits-3Q6uZCzD.cjs → vue-ui-digits-BBho1-xO.cjs} +1 -1
- package/dist/{vue-ui-digits-DN6CRpXc.js → vue-ui-digits-DZJI0YuX.js} +2 -2
- package/dist/{vue-ui-donut-B3yDJvZI.js → vue-ui-donut-CBG9ECp8.js} +118 -116
- package/dist/vue-ui-donut-D4WpeX9W.cjs +1 -0
- package/dist/vue-ui-donut-evolution-BVnSrr-b.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-CzBvVRKG.js → vue-ui-donut-evolution-BtTiBfLb.js} +102 -100
- package/dist/vue-ui-dumbbell-BQKiB9yH.cjs +9 -0
- package/dist/{vue-ui-dumbbell-vQ5YRGwJ.js → vue-ui-dumbbell-DlEN2c_X.js} +88 -86
- package/dist/{vue-ui-flow-DAOKURA6.js → vue-ui-flow-CXqGztWj.js} +65 -63
- package/dist/vue-ui-flow-DfMNmttZ.cjs +1 -0
- package/dist/vue-ui-galaxy-CGn5nkD5.cjs +1 -0
- package/dist/{vue-ui-galaxy-B86BK1JM.js → vue-ui-galaxy-xI38Kf-S.js} +82 -80
- package/dist/{vue-ui-gauge-n8TilFo9.js → vue-ui-gauge-BEludqYn.js} +56 -54
- package/dist/vue-ui-gauge-Bz-OSNOJ.cjs +1 -0
- package/dist/{vue-ui-gizmo-CFIBlG4V.js → vue-ui-gizmo-BB28OTr1.js} +32 -30
- package/dist/vue-ui-gizmo-CZZB7YgY.cjs +1 -0
- package/dist/vue-ui-heatmap-BtUvE7rK.cjs +1 -0
- package/dist/{vue-ui-heatmap-ZkmD9EAg.js → vue-ui-heatmap-mywZXUV8.js} +99 -97
- package/dist/{vue-ui-kpi-D6Myg0y1.cjs → vue-ui-kpi-CEAGjnkj.cjs} +1 -1
- package/dist/{vue-ui-kpi-CtJ3t6GX.js → vue-ui-kpi-zr721ux9.js} +3 -3
- package/dist/{vue-ui-mini-loader-Cosy9XjR.js → vue-ui-mini-loader-9zyuKIpT.js} +2 -2
- package/dist/{vue-ui-mini-loader-BjJ_YYZj.cjs → vue-ui-mini-loader-DBFAzGb2.cjs} +1 -1
- package/dist/{vue-ui-molecule-DTFOBjgC.js → vue-ui-molecule-Bv_ppQig.js} +77 -75
- package/dist/vue-ui-molecule-DltNL0kV.cjs +1 -0
- package/dist/{vue-ui-mood-radar-J_dI9m_i.js → vue-ui-mood-radar-CIK2Xohn.js} +76 -74
- package/dist/vue-ui-mood-radar-CQkF2Rp1.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-CtqU4xxu.js → vue-ui-nested-donuts-f-cMx3iQ.js} +112 -110
- package/dist/vue-ui-nested-donuts-vHr23QlH.cjs +17 -0
- package/dist/vue-ui-onion-B6ZrryDW.cjs +5 -0
- package/dist/{vue-ui-onion-BMo0Ye54.js → vue-ui-onion-CmUXelhy.js} +82 -80
- package/dist/vue-ui-parallel-coordinate-plot-BU0yoxD9.cjs +8 -0
- package/dist/{vue-ui-parallel-coordinate-plot-yKLZbDS5.js → vue-ui-parallel-coordinate-plot-h9dS2u_k.js} +91 -89
- package/dist/{vue-ui-quadrant-BrRasVaj.js → vue-ui-quadrant-DNT_0fTL.js} +141 -139
- package/dist/vue-ui-quadrant-DPPXilUd.cjs +1 -0
- package/dist/vue-ui-quick-chart-1gG267X0.cjs +15 -0
- package/dist/{vue-ui-quick-chart-uH33UIjX.js → vue-ui-quick-chart-T6C0BTyw.js} +166 -164
- package/dist/{vue-ui-radar-BJ3qMHP4.js → vue-ui-radar-CfCHXIYJ.js} +89 -87
- package/dist/vue-ui-radar-DpzjMFZD.cjs +1 -0
- package/dist/{vue-ui-rating-BEWaQMBR.cjs → vue-ui-rating-DYcT_LS-.cjs} +1 -1
- package/dist/{vue-ui-rating-BFskhiyh.js → vue-ui-rating-DuRLpMwk.js} +2 -2
- package/dist/vue-ui-relation-circle-BMrPtD2n.cjs +1 -0
- package/dist/{vue-ui-relation-circle-DdK4qk0P.js → vue-ui-relation-circle-WmZMKqHL.js} +54 -52
- package/dist/{vue-ui-rings-BqHSq6Wt.js → vue-ui-rings-Ce0Z_osd.js} +97 -93
- package/dist/{vue-ui-rings-D_T_D6AS.cjs → vue-ui-rings-CkYl3uce.cjs} +2 -2
- package/dist/vue-ui-scatter-Cjie2D-t.cjs +1 -0
- package/dist/{vue-ui-scatter-C0gfF6NJ.js → vue-ui-scatter-DY9EpoGP.js} +132 -130
- package/dist/{vue-ui-screenshot-CbvIYfYU.cjs → vue-ui-screenshot-BCFym6go.cjs} +1 -1
- package/dist/{vue-ui-screenshot-6tOLntj9.js → vue-ui-screenshot-lQLJHBQ2.js} +1 -1
- package/dist/vue-ui-skeleton-Cf89QIhl.cjs +41 -0
- package/dist/{vue-ui-skeleton-BVJGmYjj.js → vue-ui-skeleton-DDhwPZd_.js} +423 -388
- package/dist/{vue-ui-smiley-CUgH2tnV.cjs → vue-ui-smiley-DMA6fgGr.cjs} +1 -1
- package/dist/{vue-ui-smiley-2EoxEmXW.js → vue-ui-smiley-xxMwBT9c.js} +2 -2
- package/dist/vue-ui-spark-trend-Btj_H6fa.cjs +1 -0
- package/dist/{vue-ui-spark-trend-DjNPMOkN.js → vue-ui-spark-trend-CLHTqp94.js} +42 -40
- package/dist/{vue-ui-sparkbar-BBm3DE1P.js → vue-ui-sparkbar-Btk6snt4.js} +53 -51
- package/dist/vue-ui-sparkbar-CKrbBVKQ.cjs +1 -0
- package/dist/{vue-ui-sparkgauge-IIW24eJQ.js → vue-ui-sparkgauge-DKJtFTSv.js} +31 -29
- package/dist/vue-ui-sparkgauge-DfWLtFYS.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-DVXxA6ji.js → vue-ui-sparkhistogram-JRLlw9EX.js} +69 -67
- package/dist/vue-ui-sparkhistogram-wHJ-8zVV.cjs +1 -0
- package/dist/vue-ui-sparkline-DElVaalm.cjs +1 -0
- package/dist/{vue-ui-sparkline-CH89kcaa.js → vue-ui-sparkline-tBF9iaNm.js} +65 -63
- package/dist/{vue-ui-sparkstackbar-Bcod5yu_.js → vue-ui-sparkstackbar-BS9I8en7.js} +46 -44
- package/dist/vue-ui-sparkstackbar-tZa2IYHP.cjs +1 -0
- package/dist/{vue-ui-stackbar-Djjcgtyg.js → vue-ui-stackbar-UiX8q4yL.js} +128 -126
- package/dist/vue-ui-stackbar-rOa0atA9.cjs +6 -0
- package/dist/{vue-ui-strip-plot-ByPCQ4xk.js → vue-ui-strip-plot-BOkfg5vB.js} +78 -76
- package/dist/vue-ui-strip-plot-hRy6QRHK.cjs +1 -0
- package/dist/{vue-ui-table-B6Kpda3o.cjs → vue-ui-table-B9dc0l0k.cjs} +1 -1
- package/dist/{vue-ui-table-D8Sm2fzX.js → vue-ui-table-Dtfv71zG.js} +1 -1
- package/dist/{vue-ui-table-heatmap-mlq_J56h.js → vue-ui-table-heatmap-BMl-sP5Q.js} +4 -4
- package/dist/{vue-ui-table-heatmap-DjEN0l12.cjs → vue-ui-table-heatmap-DUQEHohs.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-DByva7rj.cjs → vue-ui-table-sparkline-BVnGb-lu.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-DF29_qZk.js → vue-ui-table-sparkline-BeunspIj.js} +5 -5
- package/dist/vue-ui-thermometer-A3Xxn5Ly.cjs +1 -0
- package/dist/{vue-ui-thermometer-BKf-rGuS.js → vue-ui-thermometer-Cb9ALBj_.js} +80 -78
- package/dist/{vue-ui-timer-B8jW8M60.js → vue-ui-timer-2PRDq1w6.js} +62 -60
- package/dist/vue-ui-timer-DltmIdrq.cjs +64 -0
- package/dist/vue-ui-tiremarks-BTlJcW4v.cjs +1 -0
- package/dist/{vue-ui-tiremarks-riEfve5q.js → vue-ui-tiremarks-Bse3PMGV.js} +51 -49
- package/dist/vue-ui-treemap-Cv_mHK8H.cjs +1 -0
- package/dist/{vue-ui-treemap-5F0ynBnb.js → vue-ui-treemap-D8fjVYq0.js} +93 -91
- package/dist/{vue-ui-vertical-bar-CxRBvHZy.js → vue-ui-vertical-bar-BVldPT8k.js} +110 -108
- package/dist/vue-ui-vertical-bar-ZgJq3_CI.cjs +4 -0
- package/dist/vue-ui-waffle-BpeGEjCl.cjs +1 -0
- package/dist/{vue-ui-waffle-B8G4i5WH.js → vue-ui-waffle-wikAjwZY.js} +72 -70
- package/dist/vue-ui-wheel-BlgfdULS.cjs +1 -0
- package/dist/{vue-ui-wheel-DmzkGeCY.js → vue-ui-wheel-D5qyBs0Y.js} +43 -41
- package/dist/{vue-ui-word-cloud-dMBTVGVk.js → vue-ui-word-cloud-Bcdl2iE-.js} +60 -58
- package/dist/vue-ui-word-cloud-sNzfl_Tq.cjs +1 -0
- package/dist/{vue-ui-xy-iUQyB_PL.js → vue-ui-xy-CUjllUSv.js} +507 -504
- package/dist/vue-ui-xy-FHLTc7xG.cjs +3 -0
- package/dist/{vue-ui-xy-canvas-CCwtKYgd.cjs → vue-ui-xy-canvas-BJUnRVuf.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-nraUv13Y.js → vue-ui-xy-canvas-BkOlPU8e.js} +10 -10
- package/package.json +1 -1
- package/dist/vue-ui-3d-bar-Ce-Re50D.cjs +0 -19
- package/dist/vue-ui-age-pyramid-C08rTXJn.cjs +0 -1
- package/dist/vue-ui-candlestick-m8fjxbj-.cjs +0 -2
- package/dist/vue-ui-chestnut-Y0gQvbbf.cjs +0 -6
- package/dist/vue-ui-donut-CCm7GJsm.cjs +0 -1
- package/dist/vue-ui-donut-evolution-DiN8Jm0n.cjs +0 -1
- package/dist/vue-ui-dumbbell-lb72j7bY.cjs +0 -9
- package/dist/vue-ui-flow-B5Gxaqvl.cjs +0 -1
- package/dist/vue-ui-galaxy-Ck5cPkrh.cjs +0 -1
- package/dist/vue-ui-gauge-BwIhwSUw.cjs +0 -1
- package/dist/vue-ui-gizmo-DrGaoiM_.cjs +0 -1
- package/dist/vue-ui-heatmap-BLc6thGZ.cjs +0 -1
- package/dist/vue-ui-molecule-CAj1HFit.cjs +0 -1
- package/dist/vue-ui-mood-radar-CV2in2wO.cjs +0 -1
- package/dist/vue-ui-nested-donuts-4vO23n9z.cjs +0 -17
- package/dist/vue-ui-onion-B3mtn6xf.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-DFMbhLY9.cjs +0 -8
- package/dist/vue-ui-quadrant-CpJX1Jwa.cjs +0 -1
- package/dist/vue-ui-quick-chart-CTxsI2tk.cjs +0 -15
- package/dist/vue-ui-radar-DFjsXmJ3.cjs +0 -1
- package/dist/vue-ui-relation-circle-DXuKdCih.cjs +0 -1
- package/dist/vue-ui-scatter-DPByFMNL.cjs +0 -1
- package/dist/vue-ui-skeleton-Bli7jLZ7.cjs +0 -41
- package/dist/vue-ui-spark-trend-sfgUJ32Q.cjs +0 -1
- package/dist/vue-ui-sparkbar-CKWYzriN.cjs +0 -1
- package/dist/vue-ui-sparkgauge-D0q9F9Nz.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-CywhBkm2.cjs +0 -1
- package/dist/vue-ui-sparkline-Besp8Ffy.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-qXm8Ozzm.cjs +0 -1
- package/dist/vue-ui-stackbar-D0fGVkCR.cjs +0 -6
- package/dist/vue-ui-strip-plot-XDj8rL9m.cjs +0 -1
- package/dist/vue-ui-thermometer-C3T56ras.cjs +0 -1
- package/dist/vue-ui-timer-B_ZvV1ON.cjs +0 -64
- package/dist/vue-ui-tiremarks-DRbSpTgq.cjs +0 -1
- package/dist/vue-ui-treemap-CtKUTs2G.cjs +0 -1
- package/dist/vue-ui-vertical-bar-BBIWdeXH.cjs +0 -4
- package/dist/vue-ui-waffle-9a3C4Nj-.cjs +0 -1
- package/dist/vue-ui-wheel-CErxlmqw.cjs +0 -1
- package/dist/vue-ui-word-cloud-nmx846H2.cjs +0 -1
- package/dist/vue-ui-xy-CLYgZk3Y.cjs +0 -3
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { computed as v, ref as
|
|
2
|
-
import { u as
|
|
3
|
-
import { u as q } from "./useNestedProp-
|
|
4
|
-
import
|
|
5
|
-
import { t as
|
|
6
|
-
import { _ as
|
|
7
|
-
|
|
1
|
+
import { computed as v, ref as k, watch as E, onMounted as ue, openBlock as n, createElementBlock as i, normalizeStyle as N, renderSlot as O, normalizeProps as se, guardReactiveProps as oe, createElementVNode as f, toDisplayString as j, createCommentVNode as y, unref as c, createVNode as ne, Fragment as W, renderList as P, createBlock as re } from "vue";
|
|
2
|
+
import { u as ie, c as de, t as ve, o as ce, e as R, g as he, w as C, V as ye, W as fe, X as pe, s as I, Q as U, i as X, f as Z } from "./index-mBy4elhB.js";
|
|
3
|
+
import { u as q } from "./useNestedProp-BrIRtQj1.js";
|
|
4
|
+
import ge from "./vue-ui-skeleton-DDhwPZd_.js";
|
|
5
|
+
import { t as me, u as ke } from "./useResponsive-NZB-WLRF.js";
|
|
6
|
+
import { _ as _e } from "./PackageVersion-D9PU8glB.js";
|
|
7
|
+
import { _ as be } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
+
const xe = ["id"], we = ["xmlns", "viewBox"], Le = ["id"], $e = ["stop-color"], Ne = ["stop-color"], Ce = ["id"], Ie = ["stop-color"], Me = ["stop-color"], Ve = ["id"], ze = ["stop-color"], Se = ["stop-color"], We = { key: 0 }, Pe = ["d", "fill"], Ae = ["d", "fill"], De = ["d", "stroke", "stroke-width"], Fe = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ge = ["x", "y", "width", "height", "fill", "rx"], Te = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Be = ["x1", "x2", "y1", "y2", "stroke", "stroke-dasharray", "stroke-width"], Ee = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Oe = ["x", "y", "font-size", "font-weight", "fill"], je = ["x", "y", "height", "width", "onMouseenter", "onClick"], Re = {
|
|
8
9
|
__name: "vue-ui-sparkline",
|
|
9
10
|
props: {
|
|
10
11
|
config: {
|
|
@@ -29,8 +30,8 @@ const be = ["id"], _e = ["xmlns", "viewBox"], xe = ["id"], we = ["stop-color"],
|
|
|
29
30
|
}
|
|
30
31
|
},
|
|
31
32
|
emits: ["hoverIndex", "selectDatapoint"],
|
|
32
|
-
setup(
|
|
33
|
-
const r =
|
|
33
|
+
setup(b, { emit: M }) {
|
|
34
|
+
const r = b, { vue_ui_sparkline: H } = ie(), L = v(() => !!r.dataset && r.dataset.length), p = k(de()), V = k(null), A = k(null), e = v({
|
|
34
35
|
get: () => D(),
|
|
35
36
|
set: (t) => t
|
|
36
37
|
});
|
|
@@ -41,7 +42,7 @@ const be = ["id"], _e = ["xmlns", "viewBox"], xe = ["id"], we = ["stop-color"],
|
|
|
41
42
|
});
|
|
42
43
|
return t.theme ? {
|
|
43
44
|
...q({
|
|
44
|
-
userConfig:
|
|
45
|
+
userConfig: ve.vue_ui_sparkline[t.theme] || r.config,
|
|
45
46
|
defaultConfig: t
|
|
46
47
|
})
|
|
47
48
|
} : t;
|
|
@@ -49,12 +50,12 @@ const be = ["id"], _e = ["xmlns", "viewBox"], xe = ["id"], we = ["stop-color"],
|
|
|
49
50
|
E(() => r.config, (t) => {
|
|
50
51
|
e.value = D(), G(), l.value.chartWidth = e.value.style.chartWidth;
|
|
51
52
|
}, { deep: !0 }), E(() => r.dataset, (t) => {
|
|
52
|
-
|
|
53
|
+
_.value = r.dataset.map((u) => ({
|
|
53
54
|
...u,
|
|
54
55
|
value: [void 0].includes(u.value) ? null : u.value
|
|
55
56
|
}));
|
|
56
57
|
}, { deep: !0 });
|
|
57
|
-
const
|
|
58
|
+
const _ = k(Q());
|
|
58
59
|
function Q() {
|
|
59
60
|
return r.dataset.map((t) => e.value.style.animation.show ? {
|
|
60
61
|
...t,
|
|
@@ -64,26 +65,26 @@ const be = ["id"], _e = ["xmlns", "viewBox"], xe = ["id"], we = ["stop-color"],
|
|
|
64
65
|
value: [void 0].includes(t.value) ? null : t.value
|
|
65
66
|
});
|
|
66
67
|
}
|
|
67
|
-
const F =
|
|
68
|
+
const F = k(null);
|
|
68
69
|
ue(() => {
|
|
69
70
|
if (G(), e.value.style.animation.show && r.dataset.length > 1) {
|
|
70
71
|
let a = function() {
|
|
71
|
-
u < r.dataset.length ? (
|
|
72
|
+
u < r.dataset.length ? (_.value.push(r.dataset[u]), setTimeout(() => {
|
|
72
73
|
requestAnimationFrame(a);
|
|
73
|
-
}, t)) :
|
|
74
|
+
}, t)) : _.value = r.dataset, u += 1;
|
|
74
75
|
};
|
|
75
|
-
|
|
76
|
+
_.value = [];
|
|
76
77
|
const t = e.value.style.animation.animationFrames / r.dataset.length;
|
|
77
78
|
let u = 0;
|
|
78
79
|
a();
|
|
79
80
|
}
|
|
80
81
|
});
|
|
81
82
|
function G() {
|
|
82
|
-
if (
|
|
83
|
+
if (ce(r.dataset) ? R({
|
|
83
84
|
componentName: "VueUiSparkline",
|
|
84
85
|
type: "dataset"
|
|
85
86
|
}) : r.dataset.forEach((t, u) => {
|
|
86
|
-
|
|
87
|
+
he({
|
|
87
88
|
datasetObject: t,
|
|
88
89
|
requiredAttributes: ["period", "value"]
|
|
89
90
|
}).forEach((a) => {
|
|
@@ -95,7 +96,7 @@ const be = ["id"], _e = ["xmlns", "viewBox"], xe = ["id"], we = ["stop-color"],
|
|
|
95
96
|
});
|
|
96
97
|
});
|
|
97
98
|
}), e.value.responsive) {
|
|
98
|
-
const t =
|
|
99
|
+
const t = me(() => {
|
|
99
100
|
const { width: u, height: a } = ke({
|
|
100
101
|
chart: V.value,
|
|
101
102
|
title: e.value.style.title.show && r.showInfo ? A.value : null
|
|
@@ -105,12 +106,12 @@ const be = ["id"], _e = ["xmlns", "viewBox"], xe = ["id"], we = ["stop-color"],
|
|
|
105
106
|
F.value = new ResizeObserver(t), F.value.observe(V.value.parentNode);
|
|
106
107
|
}
|
|
107
108
|
}
|
|
108
|
-
const l =
|
|
109
|
+
const l = k({
|
|
109
110
|
height: 80,
|
|
110
111
|
width: 500,
|
|
111
112
|
chartWidth: e.value.style.chartWidth,
|
|
112
113
|
padding: 30
|
|
113
|
-
}), Y =
|
|
114
|
+
}), Y = k(6), s = v(() => ({
|
|
114
115
|
top: 12,
|
|
115
116
|
left: 0,
|
|
116
117
|
right: l.value.width,
|
|
@@ -118,14 +119,14 @@ const be = ["id"], _e = ["xmlns", "viewBox"], xe = ["id"], we = ["stop-color"],
|
|
|
118
119
|
start: r.showInfo && e.value.style.dataLabel.show && e.value.style.dataLabel.position === "left" ? l.value.width - l.value.chartWidth : l.value.padding,
|
|
119
120
|
width: r.showInfo && e.value.style.dataLabel.show ? l.value.chartWidth : l.value.width - l.value.padding,
|
|
120
121
|
height: l.value.height - 12
|
|
121
|
-
})), z = v(() => Math.min(...
|
|
122
|
+
})), z = v(() => Math.min(..._.value.map((t) => isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0))), J = v(() => Math.max(..._.value.map((t) => isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0))), x = v(() => {
|
|
122
123
|
const t = z.value >= 0 ? 0 : z.value;
|
|
123
124
|
return Math.abs(t);
|
|
124
125
|
}), K = v(() => J.value + x.value + Y.value), $ = v(() => s.value.bottom - s.value.height * S(x.value));
|
|
125
126
|
function S(t) {
|
|
126
127
|
return t / K.value;
|
|
127
128
|
}
|
|
128
|
-
const g = v(() => r.dataset.length - 1), o = v(() =>
|
|
129
|
+
const g = v(() => r.dataset.length - 1), o = v(() => _.value.map((t, u) => {
|
|
129
130
|
const a = isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0;
|
|
130
131
|
return {
|
|
131
132
|
absoluteValue: a,
|
|
@@ -143,22 +144,22 @@ const be = ["id"], _e = ["xmlns", "viewBox"], xe = ["id"], we = ["stop-color"],
|
|
|
143
144
|
return o.value.forEach((d) => {
|
|
144
145
|
a.push(`${d.x},${d.y} `);
|
|
145
146
|
}), [t.x, t.y, ...a, u.x, u.y].toString();
|
|
146
|
-
}), h =
|
|
147
|
+
}), h = k(void 0);
|
|
147
148
|
function te(t, u) {
|
|
148
149
|
h.value = t, M("hoverIndex", { index: u });
|
|
149
150
|
}
|
|
150
151
|
function ae() {
|
|
151
152
|
h.value = void 0, M("hoverIndex", { index: void 0 });
|
|
152
153
|
}
|
|
153
|
-
const
|
|
154
|
+
const m = v(() => {
|
|
154
155
|
if (L.value) {
|
|
155
156
|
const t = o.value.map((a) => a.absoluteValue), u = t.reduce((a, d) => a + d, 0);
|
|
156
157
|
return {
|
|
157
158
|
latest: o.value[o.value.length - 1].absoluteValue,
|
|
158
159
|
sum: u,
|
|
159
160
|
average: u / o.value.length,
|
|
160
|
-
median:
|
|
161
|
-
trend:
|
|
161
|
+
median: ye(t),
|
|
162
|
+
trend: fe(o.value.map(({ x: a, y: d, absoluteValue: B }) => ({
|
|
162
163
|
x: a,
|
|
163
164
|
y: d,
|
|
164
165
|
value: B
|
|
@@ -172,7 +173,7 @@ const be = ["id"], _e = ["xmlns", "viewBox"], xe = ["id"], we = ["stop-color"],
|
|
|
172
173
|
median: null,
|
|
173
174
|
trend: null
|
|
174
175
|
};
|
|
175
|
-
}), T = v(() => L.value ? e.value.style.dataLabel.valueType === "latest" ?
|
|
176
|
+
}), T = v(() => L.value ? e.value.style.dataLabel.valueType === "latest" ? m.value.latest : e.value.style.dataLabel.valueType === "sum" ? m.value.sum : e.value.style.dataLabel.valueType === "average" ? m.value.average : 0 : 0), w = v(() => e.value.type && e.value.type === "bar");
|
|
176
177
|
function le(t, u) {
|
|
177
178
|
M("selectDatapoint", { datapoint: t, index: u });
|
|
178
179
|
}
|
|
@@ -185,13 +186,13 @@ const be = ["id"], _e = ["xmlns", "viewBox"], xe = ["id"], we = ["stop-color"],
|
|
|
185
186
|
}, [
|
|
186
187
|
O(t.$slots, "before", se(oe({
|
|
187
188
|
selected: h.value,
|
|
188
|
-
latest:
|
|
189
|
-
sum:
|
|
190
|
-
average:
|
|
191
|
-
median:
|
|
192
|
-
trend:
|
|
189
|
+
latest: m.value.latest,
|
|
190
|
+
sum: m.value.sum,
|
|
191
|
+
average: m.value.average,
|
|
192
|
+
median: m.value.median,
|
|
193
|
+
trend: m.value.trend
|
|
193
194
|
})), void 0, !0),
|
|
194
|
-
e.value.style.title.show &&
|
|
195
|
+
e.value.style.title.show && b.showInfo ? (n(), i("div", {
|
|
195
196
|
key: 0,
|
|
196
197
|
ref_key: "chartTitle",
|
|
197
198
|
ref: A,
|
|
@@ -204,10 +205,11 @@ const be = ["id"], _e = ["xmlns", "viewBox"], xe = ["id"], we = ["stop-color"],
|
|
|
204
205
|
], 4)) : y("", !0),
|
|
205
206
|
L.value ? (n(), i("svg", {
|
|
206
207
|
key: 1,
|
|
207
|
-
xmlns: c(
|
|
208
|
+
xmlns: c(pe),
|
|
208
209
|
viewBox: `0 0 ${l.value.width} ${l.value.height}`,
|
|
209
210
|
style: N(`background:${e.value.style.backgroundColor};overflow:visible`)
|
|
210
211
|
}, [
|
|
212
|
+
ne(_e),
|
|
211
213
|
f("defs", null, [
|
|
212
214
|
f("linearGradient", {
|
|
213
215
|
x1: "0%",
|
|
@@ -219,12 +221,12 @@ const be = ["id"], _e = ["xmlns", "viewBox"], xe = ["id"], we = ["stop-color"],
|
|
|
219
221
|
f("stop", {
|
|
220
222
|
offset: "0%",
|
|
221
223
|
"stop-color": c(I)(c(C)(e.value.style.area.color, 0.05), e.value.style.area.opacity)
|
|
222
|
-
}, null, 8,
|
|
224
|
+
}, null, 8, $e),
|
|
223
225
|
f("stop", {
|
|
224
226
|
offset: "100%",
|
|
225
227
|
"stop-color": c(I)(e.value.style.area.color, e.value.style.area.opacity)
|
|
226
|
-
}, null, 8,
|
|
227
|
-
], 8,
|
|
228
|
+
}, null, 8, Ne)
|
|
229
|
+
], 8, Le),
|
|
228
230
|
f("linearGradient", {
|
|
229
231
|
x2: "0%",
|
|
230
232
|
y2: "100%",
|
|
@@ -233,12 +235,12 @@ const be = ["id"], _e = ["xmlns", "viewBox"], xe = ["id"], we = ["stop-color"],
|
|
|
233
235
|
f("stop", {
|
|
234
236
|
offset: "0%",
|
|
235
237
|
"stop-color": e.value.style.bar.color
|
|
236
|
-
}, null, 8,
|
|
238
|
+
}, null, 8, Ie),
|
|
237
239
|
f("stop", {
|
|
238
240
|
offset: "100%",
|
|
239
241
|
"stop-color": c(C)(e.value.style.bar.color, 0.05)
|
|
240
|
-
}, null, 8,
|
|
241
|
-
], 8,
|
|
242
|
+
}, null, 8, Me)
|
|
243
|
+
], 8, Ce),
|
|
242
244
|
f("linearGradient", {
|
|
243
245
|
x2: "0%",
|
|
244
246
|
y2: "100%",
|
|
@@ -247,23 +249,23 @@ const be = ["id"], _e = ["xmlns", "viewBox"], xe = ["id"], we = ["stop-color"],
|
|
|
247
249
|
f("stop", {
|
|
248
250
|
offset: "0%",
|
|
249
251
|
"stop-color": c(C)(e.value.style.bar.color, 0.05)
|
|
250
|
-
}, null, 8,
|
|
252
|
+
}, null, 8, ze),
|
|
251
253
|
f("stop", {
|
|
252
254
|
offset: "100%",
|
|
253
255
|
"stop-color": e.value.style.bar.color
|
|
254
|
-
}, null, 8,
|
|
255
|
-
], 8,
|
|
256
|
+
}, null, 8, Se)
|
|
257
|
+
], 8, Ve)
|
|
256
258
|
]),
|
|
257
|
-
e.value.style.area.show && !w.value && o.value[0] ? (n(), i("g",
|
|
259
|
+
e.value.style.area.show && !w.value && o.value[0] ? (n(), i("g", We, [
|
|
258
260
|
e.value.style.line.smooth ? (n(), i("path", {
|
|
259
261
|
key: 0,
|
|
260
262
|
d: `M ${o.value[0].x},${s.value.bottom} ${c(U)(o.value)} L ${o.value.at(-1).x},${s.value.bottom} Z`,
|
|
261
263
|
fill: e.value.style.area.useGradient ? `url(#sparkline_gradient_${p.value})` : c(I)(e.value.style.area.color, e.value.style.area.opacity)
|
|
262
|
-
}, null, 8,
|
|
264
|
+
}, null, 8, Pe)) : (n(), i("path", {
|
|
263
265
|
key: 1,
|
|
264
266
|
d: `M${ee.value}Z`,
|
|
265
267
|
fill: e.value.style.area.useGradient ? `url(#sparkline_gradient_${p.value})` : c(I)(e.value.style.area.color, e.value.style.area.opacity)
|
|
266
|
-
}, null, 8,
|
|
268
|
+
}, null, 8, Ae))
|
|
267
269
|
])) : y("", !0),
|
|
268
270
|
e.value.style.line.smooth && !w.value ? (n(), i("path", {
|
|
269
271
|
key: 1,
|
|
@@ -272,7 +274,7 @@ const be = ["id"], _e = ["xmlns", "viewBox"], xe = ["id"], we = ["stop-color"],
|
|
|
272
274
|
fill: "none",
|
|
273
275
|
"stroke-width": e.value.style.line.strokeWidth,
|
|
274
276
|
"stroke-linecap": "round"
|
|
275
|
-
}, null, 8,
|
|
277
|
+
}, null, 8, De)) : y("", !0),
|
|
276
278
|
(n(!0), i(W, null, P(o.value, (a, d) => (n(), i("g", null, [
|
|
277
279
|
d < o.value.length - 1 && !e.value.style.line.smooth && !w.value ? (n(), i("line", {
|
|
278
280
|
key: 0,
|
|
@@ -285,7 +287,7 @@ const be = ["id"], _e = ["xmlns", "viewBox"], xe = ["id"], we = ["stop-color"],
|
|
|
285
287
|
"stroke-linecap": "round",
|
|
286
288
|
"stroke-linejoin": "round",
|
|
287
289
|
"shape-rendering": "geometricPrecision"
|
|
288
|
-
}, null, 8,
|
|
290
|
+
}, null, 8, Fe)) : y("", !0),
|
|
289
291
|
w.value ? (n(), i("rect", {
|
|
290
292
|
key: 1,
|
|
291
293
|
x: a.x - a.width / 2,
|
|
@@ -294,8 +296,8 @@ const be = ["id"], _e = ["xmlns", "viewBox"], xe = ["id"], we = ["stop-color"],
|
|
|
294
296
|
height: Math.abs(a.y - $.value),
|
|
295
297
|
fill: a.absoluteValue > 0 ? `url(#sparkline_bar_gradient_pos_${p.value})` : `url(#sparkline_bar_gradient_neg_${p.value})`,
|
|
296
298
|
rx: e.value.style.bar.borderRadius
|
|
297
|
-
}, null, 8,
|
|
298
|
-
e.value.style.verticalIndicator.show && (h.value && a.id === h.value.id ||
|
|
299
|
+
}, null, 8, Ge)) : y("", !0),
|
|
300
|
+
e.value.style.verticalIndicator.show && (h.value && a.id === h.value.id || b.selectedIndex === d) ? (n(), i("line", {
|
|
299
301
|
key: 2,
|
|
300
302
|
x1: a.x,
|
|
301
303
|
x2: a.x,
|
|
@@ -305,7 +307,7 @@ const be = ["id"], _e = ["xmlns", "viewBox"], xe = ["id"], we = ["stop-color"],
|
|
|
305
307
|
"stroke-width": e.value.style.verticalIndicator.strokeWidth,
|
|
306
308
|
"stroke-linecap": "round",
|
|
307
309
|
"stroke-dasharray": e.value.style.verticalIndicator.strokeDasharray || 0
|
|
308
|
-
}, null, 8,
|
|
310
|
+
}, null, 8, Te)) : y("", !0)
|
|
309
311
|
]))), 256)),
|
|
310
312
|
z.value < 0 ? (n(), i("line", {
|
|
311
313
|
key: 2,
|
|
@@ -317,9 +319,9 @@ const be = ["id"], _e = ["xmlns", "viewBox"], xe = ["id"], we = ["stop-color"],
|
|
|
317
319
|
"stroke-dasharray": e.value.style.zeroLine.strokeWidth * 2,
|
|
318
320
|
"stroke-width": e.value.style.zeroLine.strokeWidth,
|
|
319
321
|
"stroke-linecap": "round"
|
|
320
|
-
}, null, 8,
|
|
322
|
+
}, null, 8, Be)) : y("", !0),
|
|
321
323
|
e.value.style.plot.show ? (n(!0), i(W, { key: 3 }, P(o.value, (a, d) => (n(), i("g", null, [
|
|
322
|
-
h.value && a.id === h.value.id ||
|
|
324
|
+
h.value && a.id === h.value.id || b.selectedIndex === d ? (n(), i("circle", {
|
|
323
325
|
key: 0,
|
|
324
326
|
cx: a.x,
|
|
325
327
|
cy: a.y,
|
|
@@ -327,9 +329,9 @@ const be = ["id"], _e = ["xmlns", "viewBox"], xe = ["id"], we = ["stop-color"],
|
|
|
327
329
|
fill: a.color,
|
|
328
330
|
stroke: e.value.style.plot.stroke,
|
|
329
331
|
"stroke-width": e.value.style.plot.strokeWidth
|
|
330
|
-
}, null, 8,
|
|
332
|
+
}, null, 8, Ee)) : y("", !0)
|
|
331
333
|
]))), 256)) : y("", !0),
|
|
332
|
-
|
|
334
|
+
b.showInfo && e.value.style.dataLabel.show ? (n(), i("text", {
|
|
333
335
|
key: 4,
|
|
334
336
|
x: e.value.style.dataLabel.position === "left" ? 12 + e.value.style.dataLabel.offsetX : s.value.width + 12 + e.value.style.dataLabel.offsetX,
|
|
335
337
|
y: l.value.height / 2 + e.value.style.dataLabel.fontSize / 2.5 + e.value.style.dataLabel.offsetY,
|
|
@@ -345,7 +347,7 @@ const be = ["id"], _e = ["xmlns", "viewBox"], xe = ["id"], we = ["stop-color"],
|
|
|
345
347
|
e.value.style.dataLabel.formatter,
|
|
346
348
|
T.value,
|
|
347
349
|
c(Z)({ p: e.value.style.dataLabel.prefix, v: T.value, s: e.value.style.dataLabel.suffix, r: e.value.style.dataLabel.roundingValue })
|
|
348
|
-
)), 9,
|
|
350
|
+
)), 9, Oe)) : y("", !0),
|
|
349
351
|
(n(!0), i(W, null, P(o.value, (a, d) => (n(), i("rect", {
|
|
350
352
|
x: a.x - (s.value.width / (g.value + 1) > l.value.padding ? l.value.padding : s.value.width / (g.value + 1)) / 2,
|
|
351
353
|
y: s.value.top - 6,
|
|
@@ -355,10 +357,10 @@ const be = ["id"], _e = ["xmlns", "viewBox"], xe = ["id"], we = ["stop-color"],
|
|
|
355
357
|
onMouseenter: (B) => te(a, d),
|
|
356
358
|
onMouseleave: ae,
|
|
357
359
|
onClick: () => le(a, d)
|
|
358
|
-
}, null, 40,
|
|
360
|
+
}, null, 40, je))), 256)),
|
|
359
361
|
O(t.$slots, "svg", { svg: l.value }, void 0, !0)
|
|
360
|
-
], 12,
|
|
361
|
-
L.value ? y("", !0) : (n(),
|
|
362
|
+
], 12, we)) : y("", !0),
|
|
363
|
+
L.value ? y("", !0) : (n(), re(ge, {
|
|
362
364
|
key: 2,
|
|
363
365
|
config: {
|
|
364
366
|
type: "sparkline",
|
|
@@ -370,9 +372,9 @@ const be = ["id"], _e = ["xmlns", "viewBox"], xe = ["id"], we = ["stop-color"],
|
|
|
370
372
|
}
|
|
371
373
|
}
|
|
372
374
|
}, null, 8, ["config"]))
|
|
373
|
-
], 12,
|
|
375
|
+
], 12, xe));
|
|
374
376
|
}
|
|
375
|
-
},
|
|
377
|
+
}, Je = /* @__PURE__ */ be(Re, [["__scopeId", "data-v-9481e22a"]]);
|
|
376
378
|
export {
|
|
377
|
-
|
|
379
|
+
Je as default
|
|
378
380
|
};
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { computed as f, ref as k, watch as I, onMounted as X, openBlock as n, createElementBlock as r, normalizeStyle as g, createElementVNode as d, toDisplayString as _, createCommentVNode as y, unref as b, Fragment as D, renderList as
|
|
2
|
-
import { u as
|
|
3
|
-
import { u as G } from "./useNestedProp-
|
|
4
|
-
import
|
|
5
|
-
import { _ as
|
|
6
|
-
|
|
1
|
+
import { computed as f, ref as k, watch as I, onMounted as X, openBlock as n, createElementBlock as r, normalizeStyle as g, createElementVNode as d, toDisplayString as _, createCommentVNode as y, unref as b, createVNode as W, Fragment as D, renderList as N, normalizeClass as P, createBlock as J } from "vue";
|
|
2
|
+
import { u as K, c as U, t as Q, a as R, p as i, d as C, b as Y, o as Z, e as V, g as ee, f as O, X as te, s as le, w as ae, i as oe } from "./index-mBy4elhB.js";
|
|
3
|
+
import { u as G } from "./useNestedProp-BrIRtQj1.js";
|
|
4
|
+
import se from "./vue-ui-skeleton-DDhwPZd_.js";
|
|
5
|
+
import { _ as ne } from "./PackageVersion-D9PU8glB.js";
|
|
6
|
+
import { _ as re } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
+
const ue = ["xmlns", "viewBox"], ie = ["id"], ce = ["stop-color"], de = ["stop-color"], ve = ["stop-color"], ge = {
|
|
7
8
|
id: "stackPill",
|
|
8
9
|
clipPathUnits: "objectBoundingBox"
|
|
9
|
-
},
|
|
10
|
+
}, pe = ["fill"], he = {
|
|
10
11
|
key: 0,
|
|
11
12
|
"clip-path": "url(#stackPill)"
|
|
12
|
-
},
|
|
13
|
+
}, fe = ["height", "width", "fill"], ye = ["onClick", "x", "width", "height", "fill", "stroke"], me = ["width", "height", "rx"], ke = ["onClick"], _e = { style: { display: "flex", "flex-direction": "row", "align-items": "center", gap: "4px", "justify-content": "center" } }, be = ["height", "width"], xe = ["fill"], we = {
|
|
13
14
|
__name: "vue-ui-sparkstackbar",
|
|
14
15
|
props: {
|
|
15
16
|
config: {
|
|
@@ -27,7 +28,7 @@ const ne = ["xmlns", "viewBox"], re = ["id"], ue = ["stop-color"], ie = ["stop-c
|
|
|
27
28
|
},
|
|
28
29
|
emits: ["selectDatapoint"],
|
|
29
30
|
setup(M, { emit: T }) {
|
|
30
|
-
const u = M, { vue_ui_sparkstackbar: q } =
|
|
31
|
+
const u = M, { vue_ui_sparkstackbar: q } = K(), z = f(() => !!u.dataset && u.dataset.length), A = k(U()), e = f({
|
|
31
32
|
get: () => L(),
|
|
32
33
|
set: (t) => t
|
|
33
34
|
});
|
|
@@ -38,10 +39,10 @@ const ne = ["xmlns", "viewBox"], re = ["id"], ue = ["stop-color"], ie = ["stop-c
|
|
|
38
39
|
});
|
|
39
40
|
return t.theme ? {
|
|
40
41
|
...G({
|
|
41
|
-
userConfig:
|
|
42
|
+
userConfig: Q.vue_ui_sparkstackbar[t.theme] || u.config,
|
|
42
43
|
defaultConfig: t
|
|
43
44
|
}),
|
|
44
|
-
customPalette:
|
|
45
|
+
customPalette: R[t.theme] || i
|
|
45
46
|
} : t;
|
|
46
47
|
}
|
|
47
48
|
I(() => u.config, (t) => {
|
|
@@ -52,7 +53,7 @@ const ne = ["xmlns", "viewBox"], re = ["id"], ue = ["stop-color"], ie = ["stop-c
|
|
|
52
53
|
color: a.color ? C(a.color) : x.value[l] || i[l] || i[l % i.length]
|
|
53
54
|
}));
|
|
54
55
|
}, { deep: !0 });
|
|
55
|
-
const x = f(() =>
|
|
56
|
+
const x = f(() => Y(e.value.customPalette)), m = k(u.dataset.map((t, a) => ({
|
|
56
57
|
...t,
|
|
57
58
|
value: e.value.style.animation.show ? 0 : t.value || 0,
|
|
58
59
|
color: t.color ? C(t.color) : x.value[a] || i[a] || i[a % i.length]
|
|
@@ -77,15 +78,15 @@ const ne = ["xmlns", "viewBox"], re = ["id"], ue = ["stop-color"], ie = ["stop-c
|
|
|
77
78
|
}
|
|
78
79
|
});
|
|
79
80
|
function B() {
|
|
80
|
-
|
|
81
|
+
Z(u.dataset) ? V({
|
|
81
82
|
componentName: "VueUiSparkStackbar",
|
|
82
83
|
type: "dataset"
|
|
83
84
|
}) : u.dataset.forEach((t, a) => {
|
|
84
|
-
|
|
85
|
+
ee({
|
|
85
86
|
datasetObject: t,
|
|
86
87
|
requiredAttributes: ["name", "value"]
|
|
87
88
|
}).forEach((l) => {
|
|
88
|
-
|
|
89
|
+
V({
|
|
89
90
|
componentName: "VueUiSparkStackbar",
|
|
90
91
|
type: "datasetSerieAttribute",
|
|
91
92
|
property: l,
|
|
@@ -104,7 +105,7 @@ const ne = ["xmlns", "viewBox"], re = ["id"], ue = ["stop-color"], ie = ["stop-c
|
|
|
104
105
|
value: l,
|
|
105
106
|
proportion: h,
|
|
106
107
|
width: s,
|
|
107
|
-
proportionLabel:
|
|
108
|
+
proportionLabel: O({
|
|
108
109
|
v: h * 100,
|
|
109
110
|
s: "%",
|
|
110
111
|
r: e.value.style.legend.percentage.rounding
|
|
@@ -144,12 +145,13 @@ const ne = ["xmlns", "viewBox"], re = ["id"], ue = ["stop-color"], ie = ["stop-c
|
|
|
144
145
|
], 4)) : y("", !0),
|
|
145
146
|
z.value ? (n(), r("svg", {
|
|
146
147
|
key: 1,
|
|
147
|
-
xmlns: b(
|
|
148
|
+
xmlns: b(te),
|
|
148
149
|
width: "100%",
|
|
149
150
|
viewBox: `0 0 ${p.value.width} ${p.value.height}`
|
|
150
151
|
}, [
|
|
152
|
+
W(ne),
|
|
151
153
|
d("defs", null, [
|
|
152
|
-
(n(!0), r(D, null,
|
|
154
|
+
(n(!0), r(D, null, N(S.value, (l, o) => (n(), r("linearGradient", {
|
|
153
155
|
key: `stack_gradient_${o}`,
|
|
154
156
|
gradientTransform: "rotate(90)",
|
|
155
157
|
id: `stack_gradient_${o}_${A.value}`
|
|
@@ -157,17 +159,17 @@ const ne = ["xmlns", "viewBox"], re = ["id"], ue = ["stop-color"], ie = ["stop-c
|
|
|
157
159
|
d("stop", {
|
|
158
160
|
offset: "0%",
|
|
159
161
|
"stop-color": l.color
|
|
160
|
-
}, null, 8,
|
|
162
|
+
}, null, 8, ce),
|
|
161
163
|
d("stop", {
|
|
162
164
|
offset: "50%",
|
|
163
|
-
"stop-color": b(
|
|
164
|
-
}, null, 8,
|
|
165
|
+
"stop-color": b(le)(b(ae)(l.color, 0.05), 100 - e.value.style.bar.gradient.intensity)
|
|
166
|
+
}, null, 8, de),
|
|
165
167
|
d("stop", {
|
|
166
168
|
offset: "100%",
|
|
167
169
|
"stop-color": l.color
|
|
168
|
-
}, null, 8,
|
|
169
|
-
], 8,
|
|
170
|
-
d("clipPath",
|
|
170
|
+
}, null, 8, ve)
|
|
171
|
+
], 8, ie))), 128)),
|
|
172
|
+
d("clipPath", ge, [
|
|
171
173
|
d("rect", {
|
|
172
174
|
x: "0.005",
|
|
173
175
|
y: "-2",
|
|
@@ -176,19 +178,19 @@ const ne = ["xmlns", "viewBox"], re = ["id"], ue = ["stop-color"], ie = ["stop-c
|
|
|
176
178
|
rx: "3",
|
|
177
179
|
ry: "3",
|
|
178
180
|
fill: e.value.style.backgroundColor
|
|
179
|
-
}, null, 8,
|
|
181
|
+
}, null, 8, pe)
|
|
180
182
|
])
|
|
181
183
|
]),
|
|
182
|
-
F.value > 0 ? (n(), r("g",
|
|
184
|
+
F.value > 0 ? (n(), r("g", he, [
|
|
183
185
|
d("rect", {
|
|
184
186
|
x: 0,
|
|
185
187
|
y: 0,
|
|
186
188
|
height: p.value.height,
|
|
187
189
|
width: S.value.map((l) => l.width).reduce((l, o) => l + o, 0),
|
|
188
190
|
fill: e.value.style.bar.gradient.underlayerColor,
|
|
189
|
-
class:
|
|
190
|
-
}, null, 10,
|
|
191
|
-
(n(!0), r(D, null,
|
|
191
|
+
class: P({ animated: !w.value })
|
|
192
|
+
}, null, 10, fe),
|
|
193
|
+
(n(!0), r(D, null, N(S.value, (l, o) => (n(), r("rect", {
|
|
192
194
|
key: `stack_${o}`,
|
|
193
195
|
onClick: () => E(l, o),
|
|
194
196
|
x: l.start,
|
|
@@ -198,8 +200,8 @@ const ne = ["xmlns", "viewBox"], re = ["id"], ue = ["stop-color"], ie = ["stop-c
|
|
|
198
200
|
fill: e.value.style.bar.gradient.show ? `url(#stack_gradient_${o}_${A.value})` : l.color,
|
|
199
201
|
stroke: e.value.style.backgroundColor,
|
|
200
202
|
"stroke-linecap": "round",
|
|
201
|
-
class:
|
|
202
|
-
}, null, 10,
|
|
203
|
+
class: P({ animated: !w.value })
|
|
204
|
+
}, null, 10, ye))), 128))
|
|
203
205
|
])) : (n(), r("rect", {
|
|
204
206
|
key: 1,
|
|
205
207
|
x: 2,
|
|
@@ -210,9 +212,9 @@ const ne = ["xmlns", "viewBox"], re = ["id"], ue = ["stop-color"], ie = ["stop-c
|
|
|
210
212
|
"stroke-width": "2",
|
|
211
213
|
fill: "transparent",
|
|
212
214
|
rx: (p.value.height - 4) / 2
|
|
213
|
-
}, null, 8,
|
|
214
|
-
], 8,
|
|
215
|
-
z.value ? y("", !0) : (n(),
|
|
215
|
+
}, null, 8, me))
|
|
216
|
+
], 8, ue)) : y("", !0),
|
|
217
|
+
z.value ? y("", !0) : (n(), J(se, {
|
|
216
218
|
key: 2,
|
|
217
219
|
config: {
|
|
218
220
|
type: "sparkStackbar",
|
|
@@ -229,14 +231,14 @@ const ne = ["xmlns", "viewBox"], re = ["id"], ue = ["stop-color"], ie = ["stop-c
|
|
|
229
231
|
style: g(`background:transparent;margin:0 auto;margin:${e.value.style.legend.margin};justify-content:${e.value.style.legend.textAlign === "left" ? "flex-start" : e.value.style.legend.textAlign === "right" ? "flex-end" : "center"}`),
|
|
230
232
|
class: "vue-ui-sparkstackbar-legend"
|
|
231
233
|
}, [
|
|
232
|
-
(n(!0), r(D, null,
|
|
234
|
+
(n(!0), r(D, null, N(j.value, (l, o) => (n(), r("div", {
|
|
233
235
|
style: g(`font-size:${e.value.style.legend.fontSize}px;`),
|
|
234
|
-
class:
|
|
236
|
+
class: P({ "vue-ui-sparkstackbar-legend-item": !0, "vue-ui-sparkstackbar-legend-item-unselected": v.value.includes(o) }),
|
|
235
237
|
onClick: (h) => {
|
|
236
238
|
H(o), E(l, o);
|
|
237
239
|
}
|
|
238
240
|
}, [
|
|
239
|
-
d("div",
|
|
241
|
+
d("div", _e, [
|
|
240
242
|
(n(), r("svg", {
|
|
241
243
|
height: `${e.value.style.legend.fontSize}px`,
|
|
242
244
|
width: `${e.value.style.legend.fontSize}px`,
|
|
@@ -247,8 +249,8 @@ const ne = ["xmlns", "viewBox"], re = ["id"], ue = ["stop-color"], ie = ["stop-c
|
|
|
247
249
|
cy: 5,
|
|
248
250
|
r: 5,
|
|
249
251
|
fill: l.color
|
|
250
|
-
}, null, 8,
|
|
251
|
-
], 8,
|
|
252
|
+
}, null, 8, xe)
|
|
253
|
+
], 8, be)),
|
|
252
254
|
d("span", {
|
|
253
255
|
style: g(`color:${e.value.style.legend.name.color}; font-weight:${e.value.style.legend.name.bold ? "bold" : "normal"}`)
|
|
254
256
|
}, _(l.name), 5),
|
|
@@ -259,10 +261,10 @@ const ne = ["xmlns", "viewBox"], re = ["id"], ue = ["stop-color"], ie = ["stop-c
|
|
|
259
261
|
e.value.style.legend.value.show ? (n(), r("span", {
|
|
260
262
|
key: 1,
|
|
261
263
|
style: g(`font-weight:${e.value.style.legend.value.bold ? "bold" : "normal"};color:${e.value.style.legend.value.color}`)
|
|
262
|
-
}, " (" + _(b(
|
|
264
|
+
}, " (" + _(b(oe)(
|
|
263
265
|
e.value.style.legend.value.formatter,
|
|
264
266
|
l.value,
|
|
265
|
-
b(
|
|
267
|
+
b(O)({
|
|
266
268
|
p: e.value.style.legend.value.prefix,
|
|
267
269
|
v: l.value,
|
|
268
270
|
s: e.value.style.legend.value.suffix,
|
|
@@ -271,11 +273,11 @@ const ne = ["xmlns", "viewBox"], re = ["id"], ue = ["stop-color"], ie = ["stop-c
|
|
|
271
273
|
{ datapoint: l, seriesIndex: o }
|
|
272
274
|
)) + ") ", 5)) : y("", !0)
|
|
273
275
|
])
|
|
274
|
-
], 14,
|
|
276
|
+
], 14, ke))), 256))
|
|
275
277
|
], 4)) : y("", !0)
|
|
276
278
|
], 4));
|
|
277
279
|
}
|
|
278
|
-
},
|
|
280
|
+
}, ze = /* @__PURE__ */ re(we, [["__scopeId", "data-v-cd0ed8a9"]]);
|
|
279
281
|
export {
|
|
280
|
-
|
|
282
|
+
ze as default
|
|
281
283
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-BhH89oF0.cjs"),B=require("./useNestedProp-m8IH8hWW.cjs"),V=require("./vue-ui-skeleton-Cf89QIhl.cjs"),z=require("./PackageVersion-LdLhc8hQ.cjs"),D=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),P=["xmlns","viewBox"],L=["id"],A=["stop-color"],F=["stop-color"],q=["stop-color"],U={id:"stackPill",clipPathUnits:"objectBoundingBox"},j=["fill"],T={key:0,"clip-path":"url(#stackPill)"},H=["height","width","fill"],I=["onClick","x","width","height","fill","stroke"],O=["width","height","rx"],M=["onClick"],G={style:{display:"flex","flex-direction":"row","align-items":"center",gap:"4px","justify-content":"center"}},W=["height","width"],X=["fill"],J={__name:"vue-ui-sparkstackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(S,{emit:E}){const u=S,{vue_ui_sparkstackbar:N}=o.useConfig(),f=e.computed(()=>!!u.dataset&&u.dataset.length),k=e.ref(o.createUid()),t=e.computed({get:()=>_(),set:l=>l});function _(){const l=B.useNestedProp({userConfig:u.config,defaultConfig:N});return l.theme?{...B.useNestedProp({userConfig:o.themes.vue_ui_sparkstackbar[l.theme]||u.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}e.watch(()=>u.config,l=>{t.value=_(),b()},{deep:!0}),e.watch(()=>u.dataset,l=>{v.value=u.dataset.map((n,a)=>({...n,color:n.color?o.convertColorToHex(n.color):g.value[a]||o.palette[a]||o.palette[a%o.palette.length]}))},{deep:!0});const g=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),v=e.ref(u.dataset.map((l,n)=>({...l,value:t.value.style.animation.show?0:l.value||0,color:l.color?o.convertColorToHex(l.color):g.value[n]||o.palette[n]||o.palette[n%o.palette.length]}))),m=e.ref(!0);e.onMounted(()=>{if(b(),t.value.style.animation.show){let p=function(){r+=a/l,r<a?(v.value=v.value.map((s,i)=>({...s,value:s.value+=n[i],color:s.color?o.convertColorToHex(s.color):g.value[i]||o.palette[i]||o.palette[i%o.palette.length]})),requestAnimationFrame(p)):(m.value=!1,v.value=u.dataset.map((s,i)=>({...s,value:s.value||0,color:s.color?o.convertColorToHex(s.color):g.value[i]||o.palette[i]||o.palette[i%o.palette.length],id:o.createUid()})))};const l=t.value.style.animation.animationFrames,n=u.dataset.map((s,i)=>s.value/l),a=u.dataset.map(s=>s.value||0).reduce((s,i)=>s+i,0);let r=0;m.value=!0,p()}});function b(){o.objectIsEmpty(u.dataset)?o.error({componentName:"VueUiSparkStackbar",type:"dataset"}):u.dataset.forEach((l,n)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(a=>{o.error({componentName:"VueUiSparkStackbar",type:"datasetSerieAttribute",property:a,index:n})})})}const d=e.ref({width:500,height:16}),c=e.ref([]),C=e.computed(()=>u.dataset.map(l=>l.value||0).filter((l,n)=>!c.value.includes(n)).reduce((l,n)=>l+n,0)),x=e.computed(()=>v.value.map((l,n)=>{const a=l.value||0,r=a/C.value,p=isNaN(r)?0:r,s=p*d.value.width;return{...l,value:a,proportion:p,width:s,proportionLabel:o.dataLabel({v:p*100,s:"%",r:t.value.style.legend.percentage.rounding})}})),h=e.computed(()=>x.value.filter((l,n)=>!c.value.includes(n)));function $(l){c.value.includes(l)?c.value=c.value.filter(n=>n!==l):c.value.length<v.value.length-1&&c.value.push(l)}const y=e.computed(()=>{let l=0;const n=[];for(let a=0;a<h.value.length;a+=1)n.push({...h.value[a],start:l}),l+=h.value[a].width;return n});function w(l,n){E("selectDatapoint",{datapoint:l,index:n})}return(l,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`width:100%; background:${t.value.style.backgroundColor}`)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:transparent;margin:0 auto;margin:${t.value.style.title.margin};padding: 0 6px;text-align:${t.value.style.title.textAlign}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`font-size:${t.value.style.title.subtitle.fontSize}px;color:${t.value.style.title.subtitle.color};font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),width:"100%",viewBox:`0 0 ${d.value.width} ${d.value.height}`},[e.createVNode(z._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(a,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{key:`stack_gradient_${r}`,gradientTransform:"rotate(90)",id:`stack_gradient_${r}_${k.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,A),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(a.color,.05),100-t.value.style.bar.gradient.intensity)},null,8,F),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,q)],8,L))),128)),e.createElementVNode("clipPath",U,[e.createElementVNode("rect",{x:"0.005",y:"-2",width:"0.99",height:"5",rx:"3",ry:"3",fill:t.value.style.backgroundColor},null,8,j)])]),C.value>0?(e.openBlock(),e.createElementBlock("g",T,[e.createElementVNode("rect",{x:0,y:0,height:d.value.height,width:y.value.map(a=>a.width).reduce((a,r)=>a+r,0),fill:t.value.style.bar.gradient.underlayerColor,class:e.normalizeClass({animated:!m.value})},null,10,H),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{key:`stack_${r}`,onClick:()=>w(a,r),x:a.start,y:0,width:a.width,height:d.value.height,fill:t.value.style.bar.gradient.show?`url(#stack_gradient_${r}_${k.value})`:a.color,stroke:t.value.style.backgroundColor,"stroke-linecap":"round",class:e.normalizeClass({animated:!m.value})},null,10,I))),128))])):(e.openBlock(),e.createElementBlock("rect",{key:1,x:2,y:1,width:d.value.width-4,height:d.value.height-2,stroke:"#CCCCCC","stroke-width":"2",fill:"transparent",rx:(d.value.height-4)/2},null,8,O))],8,P)):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(V.default,{key:2,config:{type:"sparkStackbar",style:{backgroundColor:t.value.style.backgroundColor,sparkStackbar:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.legend.show?(e.openBlock(),e.createElementBlock("div",{key:3,style:e.normalizeStyle(`background:transparent;margin:0 auto;margin:${t.value.style.legend.margin};justify-content:${t.value.style.legend.textAlign==="left"?"flex-start":t.value.style.legend.textAlign==="right"?"flex-end":"center"}`),class:"vue-ui-sparkstackbar-legend"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`font-size:${t.value.style.legend.fontSize}px;`),class:e.normalizeClass({"vue-ui-sparkstackbar-legend-item":!0,"vue-ui-sparkstackbar-legend-item-unselected":c.value.includes(r)}),onClick:p=>{$(r),w(a,r)}},[e.createElementVNode("div",G,[(e.openBlock(),e.createElementBlock("svg",{height:`${t.value.style.legend.fontSize}px`,width:`${t.value.style.legend.fontSize}px`,viewBox:"0 0 10 10"},[e.createElementVNode("circle",{cx:5,cy:5,r:5,fill:a.color},null,8,X)],8,W)),e.createElementVNode("span",{style:e.normalizeStyle(`color:${t.value.style.legend.name.color}; font-weight:${t.value.style.legend.name.bold?"bold":"normal"}`)},e.toDisplayString(a.name),5),t.value.style.legend.percentage.show?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-weight:${t.value.style.legend.percentage.bold?"bold":"normal"};color:${t.value.style.legend.percentage.color}`)},e.toDisplayString(c.value.includes(r)?" - ":a.proportionLabel),5)):e.createCommentVNode("",!0),t.value.style.legend.value.show?(e.openBlock(),e.createElementBlock("span",{key:1,style:e.normalizeStyle(`font-weight:${t.value.style.legend.value.bold?"bold":"normal"};color:${t.value.style.legend.value.color}`)}," ("+e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.legend.value.formatter,a.value,e.unref(o.dataLabel)({p:t.value.style.legend.value.prefix,v:a.value,s:t.value.style.legend.value.suffix,r:t.value.style.legend.value.rounding}),{datapoint:a,seriesIndex:r}))+") ",5)):e.createCommentVNode("",!0)])],14,M))),256))],4)):e.createCommentVNode("",!0)],4))}},K=D._export_sfc(J,[["__scopeId","data-v-cd0ed8a9"]]);exports.default=K;
|