vue-data-ui 2.3.84 → 2.3.86
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-CQ1ubni5.js → Arrow-CJ7hmWgf.js} +1 -1
- package/dist/{Arrow-Uk_vwKtL.cjs → Arrow-CebZn6E4.cjs} +1 -1
- package/dist/{BaseIcon-B9ZZ6wkT.js → BaseIcon-B9istAKo.js} +1 -1
- package/dist/{BaseIcon-CF1HQdM0.cjs → BaseIcon-DnG75_Ol.cjs} +1 -1
- package/dist/{DataTable-CEtr89Og.cjs → DataTable-BA_BCbHC.cjs} +1 -1
- package/dist/{DataTable-C-iU_7h7.js → DataTable-tSDSY14n.js} +2 -2
- package/dist/{Legend-D2ZBCCXe.cjs → Legend-BOY57qwA.cjs} +1 -1
- package/dist/{Legend-pU_BwhaW.js → Legend-D3hovFqM.js} +1 -1
- package/dist/{Shape-BO_KyCq8.cjs → Shape-D6jrLLku.cjs} +1 -1
- package/dist/{Shape-CyM44biU.js → Shape-XiTBfhJM.js} +1 -1
- package/dist/{Slicer-CZobytqL.js → Slicer-BMvzmCKt.js} +2 -2
- package/dist/{Slicer-BAMZ4wsl.cjs → Slicer-sZ-DArc4.cjs} +1 -1
- package/dist/{Title-B1_d29Eh.cjs → Title-Ahj4TYHa.cjs} +1 -1
- package/dist/{Title-Bk3h09h9.js → Title-DJ2FNrSN.js} +1 -1
- package/dist/{Tooltip-CdB80DsD.js → Tooltip-CQpXRqRC.js} +1 -1
- package/dist/{Tooltip-BU4cSEF0.cjs → Tooltip-XhevgJmm.cjs} +1 -1
- package/dist/index-CVgBMJU6.cjs +4 -0
- package/dist/{index-DI4DaxVG.js → index-D2epy0rJ.js} +4 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +3 -0
- package/dist/types/vue-data-ui.d.ts +3 -0
- package/dist/{useNestedProp-BdsfyHWU.cjs → useNestedProp-B-NmF2LO.cjs} +1 -1
- package/dist/{useNestedProp-COsQo-tX.js → useNestedProp-C_ZrJBd9.js} +1 -1
- package/dist/usePrinter-B6qtXaHk.js +527 -0
- package/dist/usePrinter-DN-6Hoh5.cjs +1 -0
- package/dist/{vue-data-ui-kGaLyV0o.cjs → vue-data-ui-DlNasA0G.cjs} +1 -1
- package/dist/{vue-data-ui-9nofTL7J.js → vue-data-ui-vegY0BJm.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-CqRRjlUU.cjs +19 -0
- package/dist/{vue-ui-3d-bar-lKgwKkVj.js → vue-ui-3d-bar-D-0SSMOt.js} +165 -164
- package/dist/{vue-ui-accordion-C8ka_Ot0.cjs → vue-ui-accordion-BaV9R6cy.cjs} +1 -1
- package/dist/{vue-ui-accordion-DsN9lxvc.js → vue-ui-accordion-DzTB2FL0.js} +3 -3
- package/dist/vue-ui-age-pyramid-Bx4BuL3K.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-D2lSXDX6.js → vue-ui-age-pyramid-_eo2DGen.js} +68 -67
- package/dist/{vue-ui-annotator-DoLG0N5e.js → vue-ui-annotator-8j2dJ0CU.js} +1 -1
- package/dist/{vue-ui-annotator-DmfAqbqB.cjs → vue-ui-annotator-CDZtr6tp.cjs} +1 -1
- package/dist/{vue-ui-candlestick-vhHV9d6O.js → vue-ui-candlestick-CsF7OSvJ.js} +83 -82
- package/dist/vue-ui-candlestick-NypxP0Uu.cjs +2 -0
- package/dist/{vue-ui-carousel-table-BmyArloA.js → vue-ui-carousel-table-CMHd2i-6.js} +7 -7
- package/dist/{vue-ui-carousel-table-DaQV2SlJ.cjs → vue-ui-carousel-table-CV0eVeRd.cjs} +1 -1
- package/dist/{vue-ui-chestnut-DvNW2Y0z.cjs → vue-ui-chestnut-B9miwyAN.cjs} +2 -2
- package/dist/{vue-ui-chestnut-DgbbDtL0.js → vue-ui-chestnut-CVftKftk.js} +11 -10
- package/dist/{vue-ui-cursor-zXDNHCZv.cjs → vue-ui-cursor-Bsrt107X.cjs} +1 -1
- package/dist/{vue-ui-cursor-7-jKCnOY.js → vue-ui-cursor-wujy8n_T.js} +2 -2
- package/dist/{vue-ui-dashboard-DMossMh1.cjs → vue-ui-dashboard-BCN0BhjL.cjs} +1 -1
- package/dist/{vue-ui-dashboard-B_pnIQ5P.js → vue-ui-dashboard-Cvy0gI52.js} +2 -2
- package/dist/{vue-ui-digits-BL8Vyod-.cjs → vue-ui-digits-CnHgzHPI.cjs} +1 -1
- package/dist/{vue-ui-digits-C-lpZ-rg.js → vue-ui-digits-J-WrKKHg.js} +2 -2
- package/dist/{vue-ui-donut-e-p-l-_7.js → vue-ui-donut-BOhWcHY_.js} +91 -90
- package/dist/vue-ui-donut-CZ1iKZq6.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-Ol1YS2OF.js → vue-ui-donut-evolution-CSSYuoti.js} +83 -82
- package/dist/vue-ui-donut-evolution-DuY2883r.cjs +1 -0
- package/dist/{vue-ui-dumbbell-BjTXdj83.js → vue-ui-dumbbell-Cm0Rp_6W.js} +23 -22
- package/dist/{vue-ui-dumbbell-CMFNfda1.cjs → vue-ui-dumbbell-i9QcsSVO.cjs} +2 -2
- package/dist/{vue-ui-flow-B4mdXrld.js → vue-ui-flow-0m7a1NP7.js} +54 -53
- package/dist/vue-ui-flow-DXCBGdQT.cjs +1 -0
- package/dist/vue-ui-galaxy-D6GyjAnX.cjs +1 -0
- package/dist/{vue-ui-galaxy-Eg1e5SG7.js → vue-ui-galaxy-DCHEdZAl.js} +87 -86
- package/dist/{vue-ui-gauge-BTt63SCn.js → vue-ui-gauge-HcM2JJpg.js} +78 -77
- package/dist/vue-ui-gauge-wbHQGQro.cjs +1 -0
- package/dist/{vue-ui-gizmo-bFlUFJa8.cjs → vue-ui-gizmo-B-zMyi1m.cjs} +1 -1
- package/dist/{vue-ui-gizmo-C0aF0qVF.js → vue-ui-gizmo-Bfo_nUnZ.js} +2 -2
- package/dist/{vue-ui-heatmap-kiVWYvjC.js → vue-ui-heatmap-CxIHmv0t.js} +170 -169
- package/dist/vue-ui-heatmap-Du2vI5Ae.cjs +1 -0
- package/dist/{vue-ui-kpi-qw5ofS-z.cjs → vue-ui-kpi-BOe7-M9V.cjs} +1 -1
- package/dist/{vue-ui-kpi-DdtZLwfi.js → vue-ui-kpi-DibULfkp.js} +3 -3
- package/dist/{vue-ui-mini-loader-B8YrB3X-.cjs → vue-ui-mini-loader-Bv7l-Kx3.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DcL5v-Tv.js → vue-ui-mini-loader-qFRhERid.js} +2 -2
- package/dist/{vue-ui-molecule-BpomHzqe.js → vue-ui-molecule-4cIGPnWg.js} +282 -278
- package/dist/vue-ui-molecule-eOj3ZjvT.cjs +1 -0
- package/dist/{vue-ui-mood-radar-BV9xC9xF.js → vue-ui-mood-radar-BTe21WKk.js} +144 -143
- package/dist/vue-ui-mood-radar-tUFqqekd.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-D7D20nJu.js → vue-ui-nested-donuts-BVzabOga.js} +65 -64
- package/dist/vue-ui-nested-donuts-BigBLrFR.cjs +17 -0
- package/dist/{vue-ui-onion-4wR10l5H.js → vue-ui-onion-C3TAKqro.js} +90 -89
- package/dist/vue-ui-onion-_ZC3vbIS.cjs +5 -0
- package/dist/vue-ui-parallel-coordinate-plot-BiXGkfj7.cjs +8 -0
- package/dist/{vue-ui-parallel-coordinate-plot-DA3byJV2.js → vue-ui-parallel-coordinate-plot-CKoCQXqj.js} +40 -39
- package/dist/vue-ui-quadrant-B67wGTic.cjs +1 -0
- package/dist/{vue-ui-quadrant-D5wvd5h3.js → vue-ui-quadrant-CKnyfJoi.js} +51 -50
- package/dist/vue-ui-quick-chart-DEjdx0AB.cjs +15 -0
- package/dist/{vue-ui-quick-chart-CTSq5JJE.js → vue-ui-quick-chart-DZDYYnsI.js} +63 -62
- package/dist/vue-ui-radar-Cm_QkYGb.cjs +1 -0
- package/dist/{vue-ui-radar-OW6awckj.js → vue-ui-radar-v9yayJxu.js} +44 -43
- package/dist/{vue-ui-rating-C6gyJWJF.js → vue-ui-rating-Cc_N7qbe.js} +2 -2
- package/dist/{vue-ui-rating-3ZVG38br.cjs → vue-ui-rating-DV4cCZbB.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-Dr9-ozKG.js → vue-ui-relation-circle-Clqo4kkb.js} +74 -73
- package/dist/vue-ui-relation-circle-DcpIVbI6.cjs +1 -0
- package/dist/{vue-ui-rings-Ce6tFKrN.js → vue-ui-rings-D27xNq9q.js} +78 -77
- package/dist/vue-ui-rings-DTn3t8Ku.cjs +2 -0
- package/dist/{vue-ui-scatter-C_3WQPMf.js → vue-ui-scatter-C07Mon-6.js} +53 -52
- package/dist/vue-ui-scatter-CXbrqLFm.cjs +1 -0
- package/dist/{vue-ui-screenshot-BvE2dsvU.js → vue-ui-screenshot-CsxqbqlJ.js} +1 -1
- package/dist/{vue-ui-screenshot-D6N4GbAL.cjs → vue-ui-screenshot-D8TAvQYN.cjs} +1 -1
- package/dist/{vue-ui-skeleton-DH4t1hrL.js → vue-ui-skeleton-BLiYyX95.js} +2 -2
- package/dist/{vue-ui-skeleton-CkSlhfsB.cjs → vue-ui-skeleton-Br1K3exH.cjs} +1 -1
- package/dist/{vue-ui-smiley-C-92SyPZ.js → vue-ui-smiley-BUHatT3Z.js} +2 -2
- package/dist/{vue-ui-smiley-CSA28QLT.cjs → vue-ui-smiley-CR_TkSYT.cjs} +1 -1
- package/dist/vue-ui-spark-trend-CnUz6s1m.cjs +1 -0
- package/dist/{vue-ui-spark-trend-CrElvUcG.js → vue-ui-spark-trend-GY2CfYRt.js} +29 -29
- package/dist/vue-ui-sparkbar-DaFwUA6Z.cjs +1 -0
- package/dist/{vue-ui-sparkbar-DrbkUcOX.js → vue-ui-sparkbar-tdgek1gv.js} +27 -27
- package/dist/{vue-ui-sparkgauge-PSRf_u0V.js → vue-ui-sparkgauge-1zu5KmTA.js} +22 -22
- package/dist/vue-ui-sparkgauge-D8P01Hem.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-pZslBri7.js → vue-ui-sparkhistogram-b68QStxA.js} +52 -52
- package/dist/vue-ui-sparkhistogram-mg6yuwLH.cjs +1 -0
- package/dist/{vue-ui-sparkline-CqgArzCs.cjs → vue-ui-sparkline-CAqav9Gn.cjs} +1 -1
- package/dist/{vue-ui-sparkline-BPExupWx.js → vue-ui-sparkline-CMmtp8MK.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-i02y9FzO.js → vue-ui-sparkstackbar-Cz8tOM3m.js} +6 -6
- package/dist/vue-ui-sparkstackbar-DOrquZvw.cjs +1 -0
- package/dist/vue-ui-stackbar-DUa5F_Zl.cjs +6 -0
- package/dist/{vue-ui-stackbar-DfXxN_P3.js → vue-ui-stackbar-DeQkP1dj.js} +64 -63
- package/dist/vue-ui-strip-plot-KNL9ToYG.cjs +1 -0
- package/dist/{vue-ui-strip-plot-BZ-we0b1.js → vue-ui-strip-plot-vqOCzdFV.js} +73 -72
- package/dist/{vue-ui-table-Dy26T2oy.cjs → vue-ui-table-BCdHNku5.cjs} +1 -1
- package/dist/{vue-ui-table-BqLbMTHt.js → vue-ui-table-DDdVqdHt.js} +1 -1
- package/dist/vue-ui-table-heatmap-BJDnZMZN.cjs +1 -0
- package/dist/{vue-ui-table-heatmap-KzoqT8nX.js → vue-ui-table-heatmap-DQg_jtYq.js} +27 -26
- package/dist/{vue-ui-table-sparkline-BakiSjV4.js → vue-ui-table-sparkline-Bg-VFq7X.js} +25 -24
- package/dist/{vue-ui-table-sparkline-BBEsDDnN.cjs → vue-ui-table-sparkline-D8DJxb5J.cjs} +1 -1
- package/dist/{vue-ui-thermometer-D7cgRJoy.js → vue-ui-thermometer-CajBbbYc.js} +60 -59
- package/dist/vue-ui-thermometer-eYM8DX7u.cjs +1 -0
- package/dist/{vue-ui-timer-r4VFny9D.js → vue-ui-timer-D3VRVK-8.js} +4 -4
- package/dist/{vue-ui-timer-COLXZ1J1.cjs → vue-ui-timer-RclP4Tql.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-DNQpuz8A.js → vue-ui-tiremarks-BT0k_3xi.js} +93 -92
- package/dist/vue-ui-tiremarks-Bc8bBBAw.cjs +1 -0
- package/dist/{vue-ui-treemap-CsHaQjwu.cjs → vue-ui-treemap-BjWDt2b2.cjs} +1 -1
- package/dist/{vue-ui-treemap-CD5GoXrU.js → vue-ui-treemap-DMhe3zCm.js} +14 -13
- package/dist/vue-ui-vertical-bar-DWzafNBH.cjs +4 -0
- package/dist/{vue-ui-vertical-bar-DRH98pOw.js → vue-ui-vertical-bar-hH9R9V-K.js} +180 -179
- package/dist/vue-ui-waffle-BvYE9hAY.cjs +1 -0
- package/dist/{vue-ui-waffle-l9NGD_0B.js → vue-ui-waffle-DnNd6Iba.js} +85 -84
- package/dist/{vue-ui-wheel-BpqWo_KY.js → vue-ui-wheel-Bx9_m-7W.js} +72 -71
- package/dist/vue-ui-wheel-CVBmY6h7.cjs +1 -0
- package/dist/vue-ui-word-cloud-3R-mYkIW.cjs +1 -0
- package/dist/{vue-ui-word-cloud-DLaAm8t8.js → vue-ui-word-cloud-DUk0Xt8q.js} +109 -108
- package/dist/{vue-ui-xy-Ct-9OxiZ.js → vue-ui-xy-FtaqoNK8.js} +401 -405
- package/dist/{vue-ui-xy-canvas-BU3nj2M1.js → vue-ui-xy-canvas-Bp4PTl_E.js} +54 -53
- package/dist/{vue-ui-xy-canvas-Bub1qCm9.cjs → vue-ui-xy-canvas-Ctw_3PzN.cjs} +2 -2
- package/dist/vue-ui-xy-rX-aml0b.cjs +3 -0
- package/package.json +1 -1
- package/dist/index-Cx-40Fnz.cjs +0 -4
- package/dist/usePrinter-D9bNzUQP.js +0 -513
- package/dist/usePrinter-DbhL59iY.cjs +0 -1
- package/dist/vue-ui-3d-bar-1aTroDle.cjs +0 -19
- package/dist/vue-ui-age-pyramid-D8Tr8jvT.cjs +0 -1
- package/dist/vue-ui-candlestick-BAuWAMct.cjs +0 -2
- package/dist/vue-ui-donut-evolution-DsdzjA88.cjs +0 -1
- package/dist/vue-ui-donut-w1eqaTu0.cjs +0 -1
- package/dist/vue-ui-flow-oBnzNN4s.cjs +0 -1
- package/dist/vue-ui-galaxy-DgxKqf6u.cjs +0 -1
- package/dist/vue-ui-gauge-B64pcc54.cjs +0 -1
- package/dist/vue-ui-heatmap-cjY0mi4a.cjs +0 -1
- package/dist/vue-ui-molecule-B8cYtnHq.cjs +0 -1
- package/dist/vue-ui-mood-radar-BA2VVPO5.cjs +0 -1
- package/dist/vue-ui-nested-donuts-C3CMWjgk.cjs +0 -17
- package/dist/vue-ui-onion-CVp0g8MP.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-CmaHQR6-.cjs +0 -8
- package/dist/vue-ui-quadrant-B8ffMNIS.cjs +0 -1
- package/dist/vue-ui-quick-chart-hnVT9GKL.cjs +0 -15
- package/dist/vue-ui-radar-ySl7KzoX.cjs +0 -1
- package/dist/vue-ui-relation-circle-CMW26dvv.cjs +0 -1
- package/dist/vue-ui-rings-CR1t6iss.cjs +0 -2
- package/dist/vue-ui-scatter-CKtgbptk.cjs +0 -1
- package/dist/vue-ui-spark-trend-D4d4Mr24.cjs +0 -1
- package/dist/vue-ui-sparkbar-DDqy0UBm.cjs +0 -1
- package/dist/vue-ui-sparkgauge-D6cG2rb8.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-B9sVdLfh.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-BbGJ75_9.cjs +0 -1
- package/dist/vue-ui-stackbar-CRbcnnwn.cjs +0 -6
- package/dist/vue-ui-strip-plot-oZBXDxc-.cjs +0 -1
- package/dist/vue-ui-table-heatmap-BnwiB4id.cjs +0 -1
- package/dist/vue-ui-thermometer-E0mrvP4G.cjs +0 -1
- package/dist/vue-ui-tiremarks-C15sglnJ.cjs +0 -1
- package/dist/vue-ui-vertical-bar-DucujxOR.cjs +0 -4
- package/dist/vue-ui-waffle-DhroAZB3.cjs +0 -1
- package/dist/vue-ui-wheel-Bd87HcGT.cjs +0 -1
- package/dist/vue-ui-word-cloud-D5JLdr9g.cjs +0 -1
- package/dist/vue-ui-xy-BHzOpYm9.cjs +0 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { useCssVars as ve, ref as d, computed as g, watch as Q, onMounted as ce, openBlock as s, createElementBlock as v, normalizeClass as D, createElementVNode as c, normalizeStyle as r, toDisplayString as
|
|
2
|
-
import { u as ge, c as he, t as ye, a as _e, p as $, b as ke, o as xe, e as Y, g as Ce, d as Ie, V as Se, i as P, f as z, q as we, r as Ae } from "./index-
|
|
3
|
-
import { u as Z } from "./useNestedProp-
|
|
4
|
-
import $e from "./vue-ui-sparkline-
|
|
5
|
-
import Pe from "./BaseIcon-
|
|
6
|
-
import { u as ze, U as Fe } from "./usePrinter-
|
|
1
|
+
import { useCssVars as ve, ref as d, computed as g, watch as Q, onMounted as ce, openBlock as s, createElementBlock as v, normalizeClass as D, createElementVNode as c, normalizeStyle as r, toDisplayString as f, createCommentVNode as h, Fragment as T, renderList as V, createBlock as M, unref as i, createSlots as pe, withCtx as w, renderSlot as A, normalizeProps as fe, guardReactiveProps as be, nextTick as me } from "vue";
|
|
2
|
+
import { u as ge, c as he, t as ye, a as _e, p as $, b as ke, o as xe, e as Y, g as Ce, d as Ie, V as Se, i as P, f as z, q as we, r as Ae } from "./index-D2epy0rJ.js";
|
|
3
|
+
import { u as Z } from "./useNestedProp-C_ZrJBd9.js";
|
|
4
|
+
import $e from "./vue-ui-sparkline-CMmtp8MK.js";
|
|
5
|
+
import Pe from "./BaseIcon-B9istAKo.js";
|
|
6
|
+
import { u as ze, U as Fe } from "./usePrinter-B6qtXaHk.js";
|
|
7
7
|
import { _ as Oe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
const Ne = ["id"], We = { style: { "z-index": "1", "padding-right": "24px" } }, De = ["onClick"], Te = { style: { display: "flex", "flex-direction": "row", gap: "3px", "align-items": "center" } }, Ve = ["data-cell"], Me = {
|
|
9
9
|
dir: "auto",
|
|
@@ -27,7 +27,7 @@ const Ne = ["id"], We = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
27
27
|
setup(j, { expose: ee }) {
|
|
28
28
|
const b = j;
|
|
29
29
|
ve((t) => ({
|
|
30
|
-
"
|
|
30
|
+
"6ca111be": t.tdo
|
|
31
31
|
}));
|
|
32
32
|
const { vue_ui_table_sparkline: te } = ge(), F = d(he()), E = d(0), C = d(0), e = g({
|
|
33
33
|
get: () => G(),
|
|
@@ -99,9 +99,9 @@ const Ne = ["id"], We = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
99
99
|
})));
|
|
100
100
|
function oe(t) {
|
|
101
101
|
const a = (t[0].values || []).map(
|
|
102
|
-
(n, l) => t.map((
|
|
102
|
+
(n, l) => t.map((p) => p.values[l] || [])
|
|
103
103
|
).map(
|
|
104
|
-
(n) => n.map((l,
|
|
104
|
+
(n) => n.map((l, p) => [l, p]).sort((l, p) => p[0] - l[0]).map((l) => l[1])
|
|
105
105
|
);
|
|
106
106
|
return t.map((n, l) => ({
|
|
107
107
|
...n,
|
|
@@ -117,7 +117,7 @@ const Ne = ["id"], We = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
117
117
|
O.value = !0, N.value = t;
|
|
118
118
|
const u = y.value.map((l) => l.values[t] || []), a = S.value === t ? 1 : -1;
|
|
119
119
|
W.value = a, t === S.value ? S.value = void 0 : S.value = t;
|
|
120
|
-
const n = u.map((l,
|
|
120
|
+
const n = u.map((l, p) => [p, l]).sort((l, p) => a * (p[1] - l[1])).map((l) => l[0]).map((l) => y.value[l]);
|
|
121
121
|
x.value = n, C.value += 1;
|
|
122
122
|
}
|
|
123
123
|
const re = g(() => Math.max(...b.dataset.map((t) => (t.values || []).length))), k = g(() => {
|
|
@@ -188,7 +188,7 @@ const Ne = ["id"], We = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
188
188
|
color: e.value.title.color,
|
|
189
189
|
textAlign: e.value.title.textAlign
|
|
190
190
|
})
|
|
191
|
-
},
|
|
191
|
+
}, f(e.value.title.text), 5),
|
|
192
192
|
e.value.title.subtitle.text ? (s(), v("div", {
|
|
193
193
|
key: 0,
|
|
194
194
|
style: r({
|
|
@@ -197,7 +197,7 @@ const Ne = ["id"], We = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
197
197
|
color: e.value.title.subtitle.color,
|
|
198
198
|
textAlign: e.value.title.textAlign
|
|
199
199
|
})
|
|
200
|
-
},
|
|
200
|
+
}, f(e.value.title.subtitle.text), 5)) : h("", !0)
|
|
201
201
|
], 4)) : h("", !0),
|
|
202
202
|
c("thead", We, [
|
|
203
203
|
c("tr", {
|
|
@@ -217,7 +217,7 @@ const Ne = ["id"], We = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
217
217
|
fontWeight: e.value.thead.bold ? "bold" : "normal"
|
|
218
218
|
}),
|
|
219
219
|
class: "sticky-col-first"
|
|
220
|
-
},
|
|
220
|
+
}, f(e.value.translations.serie), 5),
|
|
221
221
|
(s(!0), v(T, null, V(k.value, (a, o) => (s(), v("th", {
|
|
222
222
|
role: "cell",
|
|
223
223
|
style: r({
|
|
@@ -232,7 +232,7 @@ const Ne = ["id"], We = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
232
232
|
class: D({ "sticky-col": o === k.value.length - 1 && e.value.showSparklines })
|
|
233
233
|
}, [
|
|
234
234
|
c("div", Te, [
|
|
235
|
-
c("span", null,
|
|
235
|
+
c("span", null, f(a), 1),
|
|
236
236
|
O.value && o === N.value && y.value[0].values[o] !== void 0 ? (s(), M(Pe, {
|
|
237
237
|
key: 0,
|
|
238
238
|
size: 18,
|
|
@@ -256,11 +256,12 @@ const Ne = ["id"], We = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
256
256
|
isFullscreen: J.value,
|
|
257
257
|
titles: { ...e.value.userOptions.buttonTitles },
|
|
258
258
|
chartElement: I.value,
|
|
259
|
+
position: e.value.userOptions.position,
|
|
259
260
|
onToggleFullscreen: de,
|
|
260
261
|
onGeneratePdf: i(R),
|
|
261
262
|
onGenerateImage: i(U),
|
|
262
263
|
onGenerateCsv: K
|
|
263
|
-
},
|
|
264
|
+
}, pe({ _: 2 }, [
|
|
264
265
|
t.$slots.optionPdf ? {
|
|
265
266
|
name: "optionPdf",
|
|
266
267
|
fn: w(() => [
|
|
@@ -285,11 +286,11 @@ const Ne = ["id"], We = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
285
286
|
t.$slots.optionFullscreen ? {
|
|
286
287
|
name: "optionFullscreen",
|
|
287
288
|
fn: w(({ toggleFullscreen: n, isFullscreen: l }) => [
|
|
288
|
-
A(t.$slots, "optionFullscreen",
|
|
289
|
+
A(t.$slots, "optionFullscreen", fe(be({ toggleFullscreen: n, isFullscreen: l })), void 0, !0)
|
|
289
290
|
]),
|
|
290
291
|
key: "3"
|
|
291
292
|
} : void 0
|
|
292
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : h("", !0)
|
|
293
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "onGeneratePdf", "onGenerateImage"])) : h("", !0)
|
|
293
294
|
], 14, De))), 256))
|
|
294
295
|
], 4)
|
|
295
296
|
]),
|
|
@@ -318,7 +319,7 @@ const Ne = ["id"], We = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
318
319
|
c("span", {
|
|
319
320
|
style: r({ color: a.color })
|
|
320
321
|
}, "⬤", 4),
|
|
321
|
-
c("span", null,
|
|
322
|
+
c("span", null, f(a.name ?? "-"), 1)
|
|
322
323
|
])
|
|
323
324
|
], 12, Ve),
|
|
324
325
|
(s(!0), v(T, null, V(ne.value, (n, l) => (s(), v("td", {
|
|
@@ -334,10 +335,10 @@ const Ne = ["id"], We = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
334
335
|
}),
|
|
335
336
|
"data-cell": k.value[l],
|
|
336
337
|
class: "vue-ui-data-table__tbody__td",
|
|
337
|
-
onPointerenter: (
|
|
338
|
+
onPointerenter: (p) => {
|
|
338
339
|
_.value = o, m.value = l;
|
|
339
340
|
}
|
|
340
|
-
},
|
|
341
|
+
}, f([null, void 0].includes(a.values[l]) ? "-" : i(P)(
|
|
341
342
|
e.value.formatter,
|
|
342
343
|
Number(a.values[l]),
|
|
343
344
|
i(z)({
|
|
@@ -360,7 +361,7 @@ const Ne = ["id"], We = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
360
361
|
}),
|
|
361
362
|
"data-cell": e.value.translations.total,
|
|
362
363
|
class: "vue-ui-data-table__tbody__td"
|
|
363
|
-
},
|
|
364
|
+
}, f(i(P)(
|
|
364
365
|
e.value.formatter,
|
|
365
366
|
a.sum,
|
|
366
367
|
i(z)({
|
|
@@ -383,7 +384,7 @@ const Ne = ["id"], We = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
383
384
|
}),
|
|
384
385
|
"data-cell": e.value.translations.average,
|
|
385
386
|
class: "vue-ui-data-table__tbody__td"
|
|
386
|
-
},
|
|
387
|
+
}, f(i(P)(
|
|
387
388
|
e.value.formatter,
|
|
388
389
|
a.average,
|
|
389
390
|
i(z)({
|
|
@@ -406,7 +407,7 @@ const Ne = ["id"], We = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
406
407
|
}),
|
|
407
408
|
"data-cell": e.value.translations.median,
|
|
408
409
|
class: "vue-ui-data-table__tbody__td"
|
|
409
|
-
},
|
|
410
|
+
}, f(i(P)(
|
|
410
411
|
e.value.formatter,
|
|
411
412
|
a.median,
|
|
412
413
|
i(z)({
|
|
@@ -474,7 +475,7 @@ const Ne = ["id"], We = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
474
475
|
], 32)
|
|
475
476
|
], 10, Ne));
|
|
476
477
|
}
|
|
477
|
-
}, Ze = /* @__PURE__ */ Oe(Ue, [["__scopeId", "data-v-
|
|
478
|
+
}, Ze = /* @__PURE__ */ Oe(Ue, [["__scopeId", "data-v-26b54f10"]]);
|
|
478
479
|
export {
|
|
479
480
|
Ze as default
|
|
480
481
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-Cx-40Fnz.cjs"),$=require("./useNestedProp-BdsfyHWU.cjs"),J=require("./vue-ui-sparkline-CqgArzCs.cjs"),K=require("./BaseIcon-CF1HQdM0.cjs"),D=require("./usePrinter-DbhL59iY.cjs"),Q=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Y=["id"],Z={style:{"z-index":"1","padding-right":"24px"}},j=["onClick"],ee={style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center"}},te=["data-cell"],le={dir:"auto",style:{display:"flex","flex-direction":"row","align-items":"center",gap:"6px"}},ae=["data-cell","onPointerenter"],oe=["data-cell"],ne=["data-cell"],re=["data-cell"],ue=["data-cell"],se={__name:"vue-ui-table-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(F,{expose:O}){const d=F;e.useCssVars(l=>({"470f7d5c":l.tdo}));const{vue_ui_table_sparkline:W}=u.useConfig(),h=e.ref(u.createUid()),S=e.ref(0),b=e.ref(0),t=e.computed({get:()=>C(),set:l=>l});function C(){const l=$.useNestedProp({userConfig:d.config,defaultConfig:W});return l.theme?{...$.useNestedProp({userConfig:u.themes.vue_ui_table_sparkline[l.theme]||d.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}e.watch(()=>d.config,l=>{t.value=C(),A(),b.value+=1},{deep:!0}),e.watch(()=>d.dataset,l=>{f.value=v.value,b.value+=1},{deep:!0});const{isPrinting:w,isImaging:z,generatePdf:I,generateImage:N}=D.usePrinter({elementId:`table_${h.value}`,fileName:t.value.title.text||"vue-ui-table-sparkline"}),L=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),g=e.ref(null),B=e.ref(!1),T=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{A()});function A(){u.objectIsEmpty(d.dataset)&&u.error({componentName:"VueUiTableSparkline",type:"dataset"});const l=new ResizeObserver(s=>{s.forEach(a=>{B.value=a.contentRect.width<T.value})});g.value&&l.observe(g.value)}const E=e.computed(()=>(d.dataset.forEach((l,s)=>{u.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{u.error({componentName:"VueUiTableSparkline",type:"datasetSerieAttribute",property:a,index:s})})}),d.dataset.map((l,s)=>{const a=(l.values||[]).map(r=>isNaN(r)?0:r??0),n=a.reduce((r,o)=>r+o,0);return{...l,values:l.values||[],color:u.convertColorToHex(l.color)||L.value[s]||u.palette[s]||u.palette[s%u.palette.length],sum:n,average:n/a.length,median:u.calcMedian(a),sparklineDataset:a.map((r,o)=>({period:t.value.colNames[o]||`col ${o}`,value:r||0}))}})));function M(l){const a=(l[0].values||[]).map((r,o)=>l.map(i=>i.values[o]||[])).map(r=>r.map((o,i)=>[o,i]).sort((o,i)=>i[0]-o[0]).map(o=>o[1]));return l.map((r,o)=>({...r,values:r.values||[],orders:a[o]}))}const v=e.computed(()=>M(E.value)),f=e.ref(v.value),G=e.computed(()=>Math.max(...f.value.map(l=>(l.values||[]).length))),y=e.ref(void 0),k=e.ref(!1),_=e.ref(void 0),x=e.ref(-1);function q(){k.value=!1,_.value=void 0,x.value=-1,f.value=v.value}function R(l){k.value=!0,_.value=l;const s=v.value.map(o=>o.values[l]||[]),a=y.value===l?1:-1;x.value=a,l===y.value?y.value=void 0:y.value=l;const r=s.map((o,i)=>[i,o]).sort((o,i)=>a*(i[1]-o[1])).map(o=>o[0]).map(o=>v.value[o]);f.value=r,b.value+=1}const U=e.computed(()=>Math.max(...d.dataset.map(l=>(l.values||[]).length))),m=e.computed(()=>{let l=t.value.colNames;if(!l.length)for(let a=0;a<U.value;a+=1)l.push(`col ${a+1}`);t.value.showTotal&&(l=[...l,t.value.translations.total]);let s;return t.value.showAverage&&t.value.showMedian?s=[...l,t.value.translations.average,t.value.translations.median]:t.value.showAverage&&!t.value.showMedian?s=[...l,t.value.translations.average]:!t.value.showAverage&&t.value.showMedian?s=[...l,t.value.translations.median]:s=l,t.value.showSparklines?[...s,t.value.translations.chart]:s}),c=e.ref(void 0),p=e.ref(void 0);function H({dataIndex:l,serieIndex:s}){c.value=l,p.value=s}const V=e.ref(!1);function X(l){V.value=l,S.value+=1}function P(){e.nextTick(()=>{const l=[t.value.translations.serie].concat(m.value),s=E.value.map((r,o)=>[[r.name],r.values,[r.sum],[r.average],[r.median]]),a=[l].concat(s),n=u.createCsvContent(a);u.downloadCsv({csvContent:n,title:t.value.title.text||"vue-ui-table-sparkline"})})}return O({generatePdf:I,generateImage:N,generateCsv:P,restoreOrder:q}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:g,class:e.normalizeClass({"vue-ui-responsive":B.value}),style:{overflow:"hidden"},id:`table_${h.value}`},[e.createElementVNode("div",{style:{overflow:"auto"},onPointerleave:s[0]||(s[0]=a=>{p.value=void 0,c.value=void 0})},[e.createElementVNode("table",{class:"vue-ui-data-table",style:e.normalizeStyle({fontFamily:t.value.fontFamily,position:"relative"})},[t.value.title.text?(e.openBlock(),e.createElementBlock("caption",{key:0,style:e.normalizeStyle({backgroundColor:t.value.title.backgroundColor})},[e.createElementVNode("div",{style:e.normalizeStyle({fontSize:`${t.value.title.fontSize}px`,fontWeight:t.value.title.bold?"bold":"normal",color:t.value.title.color,textAlign:t.value.title.textAlign})},e.toDisplayString(t.value.title.text),5),t.value.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({fontSize:`${t.value.title.subtitle.fontSize}px`,fontWeight:t.value.title.subtitle.bold?"bold":"normal",color:t.value.title.subtitle.color,textAlign:t.value.title.textAlign})},e.toDisplayString(t.value.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("thead",Z,[e.createElementVNode("tr",{role:"row",class:"vue-ui-data-table__thead-row",style:e.normalizeStyle({backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color})},[e.createElementVNode("th",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.thead.backgroundColor,outline:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal"}),class:"sticky-col-first"},e.toDisplayString(t.value.translations.serie),5),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(a,n)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",style:e.normalizeStyle({background:t.value.thead.backgroundColor,outline:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal",minWidth:n===m.value.length-1?"150px":"",cursor:v.value[0].values[n]!==void 0?"pointer":"default"}),onClick:()=>R(n),class:e.normalizeClass({"sticky-col":n===m.value.length-1&&t.value.showSparklines})},[e.createElementVNode("div",ee,[e.createElementVNode("span",null,e.toDisplayString(a),1),k.value&&n===_.value&&v.value[0].values[n]!==void 0?(e.openBlock(),e.createBlock(K.default,{key:0,size:18,name:x.value===1?"sort":"sortReverse",stroke:t.value.thead.color},null,8,["name","stroke"])):e.createCommentVNode("",!0)]),t.value.userOptions.show&&n===m.value.length-1?(e.openBlock(),e.createBlock(D.UserOptions,{ref_for:!0,ref:"details",key:`user_option_${S.value}`,backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color,isPrinting:e.unref(w),isImaging:e.unref(z),uid:h.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:V.value,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,onToggleFullscreen:X,onGeneratePdf:e.unref(I),onGenerateImage:e.unref(N),onGenerateCsv:P},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:r,isFullscreen:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:o})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0)],14,j))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(a,n)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,color:t.value.tbody.color}),class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0})},[e.createElementVNode("td",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.serie,class:"vue-ui-data-table__tbody__td sticky-col-first"},[e.createElementVNode("div",le,[e.createElementVNode("span",{style:e.normalizeStyle({color:a.color})},"⬤",4),e.createElementVNode("span",null,e.toDisplayString(a.name??"-"),1)])],12,te),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G.value,(r,o)=>(e.openBlock(),e.createElementBlock("td",{dir:"auto",role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign,backgroundColor:c.value!==void 0&&p.value!==void 0&&o===c.value&&p.value===n?`${a.color}33`:"",borderRadius:c.value!==void 0&&p.value!==void 0&&o===c.value&&p.value===n?"3px":""}),"data-cell":m.value[o],class:"vue-ui-data-table__tbody__td",onPointerenter:i=>{p.value=n,c.value=o}},e.toDisplayString([null,void 0].includes(a.values[o])?"-":e.unref(u.applyDataLabel)(t.value.formatter,Number(a.values[o]),e.unref(u.dataLabel)({p:t.value.prefix,v:Number(a.values[o]),s:t.value.suffix,r:t.value.roundingValues}),{datapoint:a,seriesIndex:n,datapointIndex:o})),45,ae))),256)),t.value.showTotal?(e.openBlock(),e.createElementBlock("td",{key:0,dir:"auto",role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.total,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,a.sum,e.unref(u.dataLabel)({p:t.value.prefix,v:a.sum,s:t.value.suffix,r:t.value.roundingTotal}),{datapoint:a.sum,seriesIndex:n})),13,oe)):e.createCommentVNode("",!0),t.value.showAverage?(e.openBlock(),e.createElementBlock("td",{key:1,dir:"auto",role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.average,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,a.average,e.unref(u.dataLabel)({p:t.value.prefix,v:a.average,s:t.value.suffix,r:t.value.roundingAverage}),{datapoint:a.average,seriesIndex:n})),13,ne)):e.createCommentVNode("",!0),t.value.showMedian?(e.openBlock(),e.createElementBlock("td",{key:2,dir:"auto",role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.median,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,a.median,e.unref(u.dataLabel)({p:t.value.prefix,v:a.median,s:t.value.suffix,r:t.value.roundingMedian}),{datapoint:a.median,seriesIndex:n})),13,re)):e.createCommentVNode("",!0),t.value.showSparklines?(e.openBlock(),e.createElementBlock("td",{key:3,role:"cell","data-cell":t.value.translations.chart,style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),class:"vue-ui-data-table__tbody__td sticky-col"},[(e.openBlock(),e.createBlock(J.default,{key:`sparkline_${n}_${b.value}`,onHoverIndex:({index:r})=>H({dataIndex:r,serieIndex:n}),dataset:a.sparklineDataset,showInfo:!1,selectedIndex:c.value,config:{type:t.value.sparkline.type,style:{backgroundColor:t.value.tbody.backgroundColor,animation:{show:t.value.sparkline.animation.show&&!e.unref(w)&&!e.unref(z),animationFrames:t.value.sparkline.animation.animationFrames},line:{color:a.color,smooth:t.value.sparkline.smooth,strokeWidth:t.value.sparkline.strokeWidth},bar:{color:a.color},area:{color:a.color,opacity:t.value.sparkline.showArea?16:0,useGradient:t.value.sparkline.useGradient},verticalIndicator:{color:a.color},plot:{radius:9,stroke:t.value.tbody.backgroundColor,strokeWidth:3}}}},null,8,["onHoverIndex","dataset","selectedIndex","config"]))],12,ue)):e.createCommentVNode("",!0)],6))),256))])],4)],32)],10,Y))}},ie=Q._export_sfc(se,[["__scopeId","data-v-7094f9b2"]]);exports.default=ie;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-CVgBMJU6.cjs"),$=require("./useNestedProp-B-NmF2LO.cjs"),J=require("./vue-ui-sparkline-CAqav9Gn.cjs"),K=require("./BaseIcon-DnG75_Ol.cjs"),D=require("./usePrinter-DN-6Hoh5.cjs"),Q=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Y=["id"],Z={style:{"z-index":"1","padding-right":"24px"}},j=["onClick"],ee={style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center"}},te=["data-cell"],le={dir:"auto",style:{display:"flex","flex-direction":"row","align-items":"center",gap:"6px"}},ae=["data-cell","onPointerenter"],oe=["data-cell"],ne=["data-cell"],re=["data-cell"],ue=["data-cell"],se={__name:"vue-ui-table-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(F,{expose:O}){const d=F;e.useCssVars(l=>({"6ca111be":l.tdo}));const{vue_ui_table_sparkline:W}=u.useConfig(),h=e.ref(u.createUid()),S=e.ref(0),b=e.ref(0),t=e.computed({get:()=>C(),set:l=>l});function C(){const l=$.useNestedProp({userConfig:d.config,defaultConfig:W});return l.theme?{...$.useNestedProp({userConfig:u.themes.vue_ui_table_sparkline[l.theme]||d.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}e.watch(()=>d.config,l=>{t.value=C(),A(),b.value+=1},{deep:!0}),e.watch(()=>d.dataset,l=>{f.value=v.value,b.value+=1},{deep:!0});const{isPrinting:w,isImaging:z,generatePdf:I,generateImage:N}=D.usePrinter({elementId:`table_${h.value}`,fileName:t.value.title.text||"vue-ui-table-sparkline"}),L=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),g=e.ref(null),B=e.ref(!1),T=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{A()});function A(){u.objectIsEmpty(d.dataset)&&u.error({componentName:"VueUiTableSparkline",type:"dataset"});const l=new ResizeObserver(s=>{s.forEach(a=>{B.value=a.contentRect.width<T.value})});g.value&&l.observe(g.value)}const E=e.computed(()=>(d.dataset.forEach((l,s)=>{u.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{u.error({componentName:"VueUiTableSparkline",type:"datasetSerieAttribute",property:a,index:s})})}),d.dataset.map((l,s)=>{const a=(l.values||[]).map(r=>isNaN(r)?0:r??0),n=a.reduce((r,o)=>r+o,0);return{...l,values:l.values||[],color:u.convertColorToHex(l.color)||L.value[s]||u.palette[s]||u.palette[s%u.palette.length],sum:n,average:n/a.length,median:u.calcMedian(a),sparklineDataset:a.map((r,o)=>({period:t.value.colNames[o]||`col ${o}`,value:r||0}))}})));function M(l){const a=(l[0].values||[]).map((r,o)=>l.map(i=>i.values[o]||[])).map(r=>r.map((o,i)=>[o,i]).sort((o,i)=>i[0]-o[0]).map(o=>o[1]));return l.map((r,o)=>({...r,values:r.values||[],orders:a[o]}))}const v=e.computed(()=>M(E.value)),f=e.ref(v.value),G=e.computed(()=>Math.max(...f.value.map(l=>(l.values||[]).length))),y=e.ref(void 0),k=e.ref(!1),_=e.ref(void 0),x=e.ref(-1);function q(){k.value=!1,_.value=void 0,x.value=-1,f.value=v.value}function R(l){k.value=!0,_.value=l;const s=v.value.map(o=>o.values[l]||[]),a=y.value===l?1:-1;x.value=a,l===y.value?y.value=void 0:y.value=l;const r=s.map((o,i)=>[i,o]).sort((o,i)=>a*(i[1]-o[1])).map(o=>o[0]).map(o=>v.value[o]);f.value=r,b.value+=1}const U=e.computed(()=>Math.max(...d.dataset.map(l=>(l.values||[]).length))),m=e.computed(()=>{let l=t.value.colNames;if(!l.length)for(let a=0;a<U.value;a+=1)l.push(`col ${a+1}`);t.value.showTotal&&(l=[...l,t.value.translations.total]);let s;return t.value.showAverage&&t.value.showMedian?s=[...l,t.value.translations.average,t.value.translations.median]:t.value.showAverage&&!t.value.showMedian?s=[...l,t.value.translations.average]:!t.value.showAverage&&t.value.showMedian?s=[...l,t.value.translations.median]:s=l,t.value.showSparklines?[...s,t.value.translations.chart]:s}),c=e.ref(void 0),p=e.ref(void 0);function H({dataIndex:l,serieIndex:s}){c.value=l,p.value=s}const V=e.ref(!1);function X(l){V.value=l,S.value+=1}function P(){e.nextTick(()=>{const l=[t.value.translations.serie].concat(m.value),s=E.value.map((r,o)=>[[r.name],r.values,[r.sum],[r.average],[r.median]]),a=[l].concat(s),n=u.createCsvContent(a);u.downloadCsv({csvContent:n,title:t.value.title.text||"vue-ui-table-sparkline"})})}return O({generatePdf:I,generateImage:N,generateCsv:P,restoreOrder:q}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:g,class:e.normalizeClass({"vue-ui-responsive":B.value}),style:{overflow:"hidden"},id:`table_${h.value}`},[e.createElementVNode("div",{style:{overflow:"auto"},onPointerleave:s[0]||(s[0]=a=>{p.value=void 0,c.value=void 0})},[e.createElementVNode("table",{class:"vue-ui-data-table",style:e.normalizeStyle({fontFamily:t.value.fontFamily,position:"relative"})},[t.value.title.text?(e.openBlock(),e.createElementBlock("caption",{key:0,style:e.normalizeStyle({backgroundColor:t.value.title.backgroundColor})},[e.createElementVNode("div",{style:e.normalizeStyle({fontSize:`${t.value.title.fontSize}px`,fontWeight:t.value.title.bold?"bold":"normal",color:t.value.title.color,textAlign:t.value.title.textAlign})},e.toDisplayString(t.value.title.text),5),t.value.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({fontSize:`${t.value.title.subtitle.fontSize}px`,fontWeight:t.value.title.subtitle.bold?"bold":"normal",color:t.value.title.subtitle.color,textAlign:t.value.title.textAlign})},e.toDisplayString(t.value.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("thead",Z,[e.createElementVNode("tr",{role:"row",class:"vue-ui-data-table__thead-row",style:e.normalizeStyle({backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color})},[e.createElementVNode("th",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.thead.backgroundColor,outline:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal"}),class:"sticky-col-first"},e.toDisplayString(t.value.translations.serie),5),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(a,n)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",style:e.normalizeStyle({background:t.value.thead.backgroundColor,outline:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal",minWidth:n===m.value.length-1?"150px":"",cursor:v.value[0].values[n]!==void 0?"pointer":"default"}),onClick:()=>R(n),class:e.normalizeClass({"sticky-col":n===m.value.length-1&&t.value.showSparklines})},[e.createElementVNode("div",ee,[e.createElementVNode("span",null,e.toDisplayString(a),1),k.value&&n===_.value&&v.value[0].values[n]!==void 0?(e.openBlock(),e.createBlock(K.default,{key:0,size:18,name:x.value===1?"sort":"sortReverse",stroke:t.value.thead.color},null,8,["name","stroke"])):e.createCommentVNode("",!0)]),t.value.userOptions.show&&n===m.value.length-1?(e.openBlock(),e.createBlock(D.UserOptions,{ref_for:!0,ref:"details",key:`user_option_${S.value}`,backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color,isPrinting:e.unref(w),isImaging:e.unref(z),uid:h.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:V.value,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,position:t.value.userOptions.position,onToggleFullscreen:X,onGeneratePdf:e.unref(I),onGenerateImage:e.unref(N),onGenerateCsv:P},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:r,isFullscreen:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:o})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0)],14,j))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(a,n)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,color:t.value.tbody.color}),class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0})},[e.createElementVNode("td",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.serie,class:"vue-ui-data-table__tbody__td sticky-col-first"},[e.createElementVNode("div",le,[e.createElementVNode("span",{style:e.normalizeStyle({color:a.color})},"⬤",4),e.createElementVNode("span",null,e.toDisplayString(a.name??"-"),1)])],12,te),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G.value,(r,o)=>(e.openBlock(),e.createElementBlock("td",{dir:"auto",role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign,backgroundColor:c.value!==void 0&&p.value!==void 0&&o===c.value&&p.value===n?`${a.color}33`:"",borderRadius:c.value!==void 0&&p.value!==void 0&&o===c.value&&p.value===n?"3px":""}),"data-cell":m.value[o],class:"vue-ui-data-table__tbody__td",onPointerenter:i=>{p.value=n,c.value=o}},e.toDisplayString([null,void 0].includes(a.values[o])?"-":e.unref(u.applyDataLabel)(t.value.formatter,Number(a.values[o]),e.unref(u.dataLabel)({p:t.value.prefix,v:Number(a.values[o]),s:t.value.suffix,r:t.value.roundingValues}),{datapoint:a,seriesIndex:n,datapointIndex:o})),45,ae))),256)),t.value.showTotal?(e.openBlock(),e.createElementBlock("td",{key:0,dir:"auto",role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.total,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,a.sum,e.unref(u.dataLabel)({p:t.value.prefix,v:a.sum,s:t.value.suffix,r:t.value.roundingTotal}),{datapoint:a.sum,seriesIndex:n})),13,oe)):e.createCommentVNode("",!0),t.value.showAverage?(e.openBlock(),e.createElementBlock("td",{key:1,dir:"auto",role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.average,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,a.average,e.unref(u.dataLabel)({p:t.value.prefix,v:a.average,s:t.value.suffix,r:t.value.roundingAverage}),{datapoint:a.average,seriesIndex:n})),13,ne)):e.createCommentVNode("",!0),t.value.showMedian?(e.openBlock(),e.createElementBlock("td",{key:2,dir:"auto",role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.median,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,a.median,e.unref(u.dataLabel)({p:t.value.prefix,v:a.median,s:t.value.suffix,r:t.value.roundingMedian}),{datapoint:a.median,seriesIndex:n})),13,re)):e.createCommentVNode("",!0),t.value.showSparklines?(e.openBlock(),e.createElementBlock("td",{key:3,role:"cell","data-cell":t.value.translations.chart,style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),class:"vue-ui-data-table__tbody__td sticky-col"},[(e.openBlock(),e.createBlock(J.default,{key:`sparkline_${n}_${b.value}`,onHoverIndex:({index:r})=>H({dataIndex:r,serieIndex:n}),dataset:a.sparklineDataset,showInfo:!1,selectedIndex:c.value,config:{type:t.value.sparkline.type,style:{backgroundColor:t.value.tbody.backgroundColor,animation:{show:t.value.sparkline.animation.show&&!e.unref(w)&&!e.unref(z),animationFrames:t.value.sparkline.animation.animationFrames},line:{color:a.color,smooth:t.value.sparkline.smooth,strokeWidth:t.value.sparkline.strokeWidth},bar:{color:a.color},area:{color:a.color,opacity:t.value.sparkline.showArea?16:0,useGradient:t.value.sparkline.useGradient},verticalIndicator:{color:a.color},plot:{radius:9,stroke:t.value.tbody.backgroundColor,strokeWidth:3}}}},null,8,["onHoverIndex","dataset","selectedIndex","config"]))],12,ue)):e.createCommentVNode("",!0)],6))),256))])],4)],32)],10,Y))}},ie=Q._export_sfc(se,[["__scopeId","data-v-26b54f10"]]);exports.default=ie;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { useCssVars as
|
|
2
|
-
import { u as me, o as pe, e as
|
|
3
|
-
import { _ as Ie } from "./Title-
|
|
4
|
-
import { u as Ye, U as
|
|
5
|
-
import
|
|
6
|
-
import { u as
|
|
1
|
+
import { useCssVars as ce, computed as c, onMounted as de, ref as g, watch as ve, openBlock as o, createElementBlock as n, normalizeClass as $, normalizeStyle as ye, createBlock as U, createCommentVNode as h, unref as v, createSlots as fe, withCtx as q, renderSlot as x, normalizeProps as H, guardReactiveProps as X, createElementVNode as d, Fragment as F, renderList as R, toDisplayString as ge } from "vue";
|
|
2
|
+
import { u as me, o as pe, e as J, g as ke, c as xe, t as _e, a as be, p as _, b as we, v as f, d as P, X as Ce, s as $e, i as Fe, f as Pe } from "./index-D2epy0rJ.js";
|
|
3
|
+
import { _ as Ie } from "./Title-DJ2FNrSN.js";
|
|
4
|
+
import { u as Ye, U as Oe } from "./usePrinter-B6qtXaHk.js";
|
|
5
|
+
import Me from "./vue-ui-skeleton-BLiYyX95.js";
|
|
6
|
+
import { u as K } from "./useNestedProp-C_ZrJBd9.js";
|
|
7
7
|
import { _ as Ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
const Se = ["id"], Ue = {
|
|
9
9
|
key: 0,
|
|
@@ -30,56 +30,56 @@ const Se = ["id"], Ue = {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
|
-
setup(b, { expose:
|
|
33
|
+
setup(b, { expose: Q }) {
|
|
34
34
|
const a = b;
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
|
|
35
|
+
ce((s) => ({
|
|
36
|
+
"84062bdc": ae.value,
|
|
37
|
+
"237c3e88": le.value,
|
|
38
|
+
b9ef16ae: se.value
|
|
39
39
|
}));
|
|
40
|
-
const { vue_ui_thermometer:
|
|
41
|
-
|
|
40
|
+
const { vue_ui_thermometer: Z } = me(), I = c(() => !!a.dataset && Object.keys(a.dataset).length);
|
|
41
|
+
de(() => {
|
|
42
42
|
L();
|
|
43
43
|
});
|
|
44
44
|
function L() {
|
|
45
|
-
pe(a.dataset) ?
|
|
45
|
+
pe(a.dataset) ? J({
|
|
46
46
|
componentName: "VueUiThermometer",
|
|
47
47
|
type: "dataset"
|
|
48
48
|
}) : ke({
|
|
49
49
|
datasetObject: a.dataset,
|
|
50
50
|
requiredAttributes: ["value", "from", "to"]
|
|
51
51
|
}).forEach((s) => {
|
|
52
|
-
|
|
52
|
+
J({
|
|
53
53
|
componentName: "VueUiThermometer",
|
|
54
54
|
type: "datasetAttribute",
|
|
55
55
|
property: s
|
|
56
56
|
});
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
-
const m = g(xe()), T = g(null), G = g(0), W = g(0), e =
|
|
59
|
+
const m = g(xe()), T = g(null), G = g(0), W = g(0), e = c({
|
|
60
60
|
get: () => E(),
|
|
61
61
|
set: (s) => s
|
|
62
62
|
});
|
|
63
63
|
function E() {
|
|
64
|
-
const s =
|
|
64
|
+
const s = K({
|
|
65
65
|
userConfig: a.config,
|
|
66
|
-
defaultConfig:
|
|
66
|
+
defaultConfig: Z
|
|
67
67
|
});
|
|
68
68
|
return s.theme ? {
|
|
69
|
-
...
|
|
69
|
+
...K({
|
|
70
70
|
userConfig: _e.vue_ui_thermometer[s.theme] || a.config,
|
|
71
71
|
defaultConfig: s
|
|
72
72
|
}),
|
|
73
73
|
customPalette: be[s.theme] || _
|
|
74
74
|
} : s;
|
|
75
75
|
}
|
|
76
|
-
|
|
76
|
+
ve(() => a.config, (s) => {
|
|
77
77
|
e.value = E(), L(), W.value += 1;
|
|
78
78
|
}, { deep: !0 });
|
|
79
79
|
const { isPrinting: V, isImaging: z, generatePdf: B, generateImage: j } = Ye({
|
|
80
80
|
elementId: `thermometer__${m.value}`,
|
|
81
81
|
fileName: e.value.style.title.text || "vue-ui-thermometer"
|
|
82
|
-
}), w =
|
|
82
|
+
}), w = c(() => we(e.value.customPalette)), ee = c(() => e.value.style.chart.thermometer.width), y = c(() => a.dataset.steps || 10), i = g({
|
|
83
83
|
top: e.value.style.chart.padding.top,
|
|
84
84
|
left: e.value.style.chart.padding.left,
|
|
85
85
|
right: e.value.style.chart.padding.right,
|
|
@@ -88,7 +88,7 @@ const Se = ["id"], Ue = {
|
|
|
88
88
|
function C(s, r, t) {
|
|
89
89
|
const u = [], N = A(s), S = A(r);
|
|
90
90
|
for (let k = 0; k < t; k++) {
|
|
91
|
-
const
|
|
91
|
+
const ue = Y(N.red, S.red, k, t), ne = Y(N.green, S.green, k, t), ie = Y(N.blue, S.blue, k, t), he = `#${O(ue)}${O(ne)}${O(ie)}`;
|
|
92
92
|
u.push(he);
|
|
93
93
|
}
|
|
94
94
|
return u;
|
|
@@ -104,11 +104,11 @@ const Se = ["id"], Ue = {
|
|
|
104
104
|
function Y(s, r, t, u) {
|
|
105
105
|
return Math.round(s + (r - s) * t / u);
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function O(s) {
|
|
108
108
|
return s.toString(16).padStart(2, "0");
|
|
109
109
|
}
|
|
110
|
-
const l =
|
|
111
|
-
const s =
|
|
110
|
+
const l = c(() => {
|
|
111
|
+
const s = ee.value + i.value.left + i.value.right, r = e.value.style.chart.height;
|
|
112
112
|
return {
|
|
113
113
|
width: s,
|
|
114
114
|
left: i.value.left,
|
|
@@ -117,11 +117,11 @@ const Se = ["id"], Ue = {
|
|
|
117
117
|
bottom: r - i.value.bottom,
|
|
118
118
|
height: r
|
|
119
119
|
};
|
|
120
|
-
}),
|
|
120
|
+
}), te = c(() => l.value), M = c(() => {
|
|
121
121
|
const s = f(a.dataset.from) < 0 ? Math.abs(f(a.dataset.from)) : f(a.dataset.from), r = f(a.dataset.to) < 0 ? Math.abs(f(a.dataset.to)) : f(a.dataset.to);
|
|
122
122
|
let t = 0;
|
|
123
123
|
return f(a.dataset.to) > 0 ? t = s + r : s > r ? t = s - r : t = r - s, (1 - (Math.abs(f(a.dataset.from)) + f(a.dataset.value)) / t) * (l.value.height - i.value.top - i.value.bottom);
|
|
124
|
-
}),
|
|
124
|
+
}), se = c(() => `${M.value}px`), le = c(() => `${l.value.height - e.value.style.chart.padding.bottom - i.value.top}px`), ae = c(() => `${e.value.style.chart.animation.speedMs}ms`), oe = c(() => {
|
|
125
125
|
if (a.dataset.colors) {
|
|
126
126
|
if (!a.dataset.colors.from)
|
|
127
127
|
return C(w.value[0] || _[0], P(a.dataset.colors.to), y.value || 10);
|
|
@@ -130,7 +130,7 @@ const Se = ["id"], Ue = {
|
|
|
130
130
|
} else
|
|
131
131
|
return C(w.value[1] || _[1], w.value[0] || _[0], y.value || 10);
|
|
132
132
|
return C(P(a.dataset.colors.from), P(a.dataset.colors.to), y.value || 10);
|
|
133
|
-
}), D =
|
|
133
|
+
}), D = c(() => {
|
|
134
134
|
const s = [];
|
|
135
135
|
let r = 0;
|
|
136
136
|
const t = l.value.height - i.value.top - i.value.bottom;
|
|
@@ -141,22 +141,22 @@ const Se = ["id"], Ue = {
|
|
|
141
141
|
qYLess: l.value.top + u + t / y.value / 4,
|
|
142
142
|
halfY: l.value.top + u + t / y.value / 2,
|
|
143
143
|
qYMore: l.value.top + u + t / y.value / 4 * 3,
|
|
144
|
-
color:
|
|
144
|
+
color: oe.value[r],
|
|
145
145
|
height: t / y.value
|
|
146
146
|
}), r += 1;
|
|
147
147
|
return s;
|
|
148
148
|
}), p = g(!1);
|
|
149
|
-
function
|
|
149
|
+
function re(s) {
|
|
150
150
|
p.value = s, G.value += 1;
|
|
151
151
|
}
|
|
152
|
-
return
|
|
152
|
+
return Q({
|
|
153
153
|
generatePdf: B,
|
|
154
154
|
generateImage: j
|
|
155
155
|
}), (s, r) => (o(), n("div", {
|
|
156
156
|
ref_key: "thermoChart",
|
|
157
157
|
ref: T,
|
|
158
158
|
class: $(`vue-ui-thermometer ${p.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
159
|
-
style:
|
|
159
|
+
style: ye(`width:100%;background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color};font-family:${e.value.style.fontFamily}`),
|
|
160
160
|
id: `thermometer__${m.value}`
|
|
161
161
|
}, [
|
|
162
162
|
e.value.style.title.text ? (o(), n("div", Ue, [
|
|
@@ -173,8 +173,8 @@ const Se = ["id"], Ue = {
|
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
}, null, 8, ["config"]))
|
|
176
|
-
])) :
|
|
177
|
-
e.value.userOptions.show && I.value ? (o(), U(
|
|
176
|
+
])) : h("", !0),
|
|
177
|
+
e.value.userOptions.show && I.value ? (o(), U(Oe, {
|
|
178
178
|
ref: "details",
|
|
179
179
|
key: `user_options_${G.value}`,
|
|
180
180
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
@@ -189,7 +189,8 @@ const Se = ["id"], Ue = {
|
|
|
189
189
|
isFullscreen: p.value,
|
|
190
190
|
titles: { ...e.value.userOptions.buttonTitles },
|
|
191
191
|
chartElement: T.value,
|
|
192
|
-
|
|
192
|
+
position: e.value.userOptions.position,
|
|
193
|
+
onToggleFullscreen: re,
|
|
193
194
|
onGeneratePdf: v(B),
|
|
194
195
|
onGenerateImage: v(j)
|
|
195
196
|
}, fe({ _: 2 }, [
|
|
@@ -210,18 +211,18 @@ const Se = ["id"], Ue = {
|
|
|
210
211
|
s.$slots.optionFullscreen ? {
|
|
211
212
|
name: "optionFullscreen",
|
|
212
213
|
fn: q(({ toggleFullscreen: t, isFullscreen: u }) => [
|
|
213
|
-
x(s.$slots, "optionFullscreen", X(
|
|
214
|
+
x(s.$slots, "optionFullscreen", H(X({ toggleFullscreen: t, isFullscreen: u })), void 0, !0)
|
|
214
215
|
]),
|
|
215
216
|
key: "2"
|
|
216
217
|
} : void 0
|
|
217
|
-
]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) :
|
|
218
|
+
]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "onGeneratePdf", "onGenerateImage"])) : h("", !0),
|
|
218
219
|
I.value ? (o(), n("svg", {
|
|
219
220
|
key: 2,
|
|
220
221
|
xmlns: v(Ce),
|
|
221
222
|
class: $({ "vue-data-ui-fullscreen--on": p.value, "vue-data-ui-fulscreen--off": !p.value }),
|
|
222
223
|
width: "100%",
|
|
223
224
|
viewBox: `0 0 ${l.value.width} ${l.value.height}`,
|
|
224
|
-
style:
|
|
225
|
+
style: "background:transparent"
|
|
225
226
|
}, [
|
|
226
227
|
d("defs", null, [
|
|
227
228
|
d("clipPath", Le, [
|
|
@@ -235,7 +236,7 @@ const Se = ["id"], Ue = {
|
|
|
235
236
|
fill: e.value.style.chart.backgroundColor
|
|
236
237
|
}, null, 8, Te)
|
|
237
238
|
]),
|
|
238
|
-
(o(!0), n(F, null,
|
|
239
|
+
(o(!0), n(F, null, R(D.value, (t, u) => (o(), n("linearGradient", {
|
|
239
240
|
id: `vueUiThermometerGradient_${u}_${m.value}`,
|
|
240
241
|
x1: "0%",
|
|
241
242
|
y1: "0%",
|
|
@@ -264,7 +265,7 @@ const Se = ["id"], Ue = {
|
|
|
264
265
|
width: l.value.width - i.value.left - i.value.right,
|
|
265
266
|
fill: "#FFFFFF"
|
|
266
267
|
}, null, 8, Be),
|
|
267
|
-
(o(!0), n(F, null,
|
|
268
|
+
(o(!0), n(F, null, R(D.value, (t, u) => (o(), n("g", {
|
|
268
269
|
key: `graduation_${u}`
|
|
269
270
|
}, [
|
|
270
271
|
d("rect", {
|
|
@@ -284,7 +285,7 @@ const Se = ["id"], Ue = {
|
|
|
284
285
|
"stroke-width": e.value.style.chart.graduations.strokeWidth,
|
|
285
286
|
stroke: e.value.style.chart.graduations.stroke,
|
|
286
287
|
"stroke-linecap": "round"
|
|
287
|
-
}, null, 8, Ae)) :
|
|
288
|
+
}, null, 8, Ae)) : h("", !0),
|
|
288
289
|
e.value.style.chart.graduations.showIntermediate ? (o(), n(F, { key: 1 }, [
|
|
289
290
|
e.value.style.chart.graduations.show && ["both", "left"].includes(e.value.style.chart.graduations.sides) ? (o(), n("line", {
|
|
290
291
|
key: 0,
|
|
@@ -295,7 +296,7 @@ const Se = ["id"], Ue = {
|
|
|
295
296
|
"stroke-width": e.value.style.chart.graduations.strokeWidth / 2,
|
|
296
297
|
stroke: e.value.style.chart.graduations.stroke,
|
|
297
298
|
"stroke-linecap": "round"
|
|
298
|
-
}, null, 8, De)) :
|
|
299
|
+
}, null, 8, De)) : h("", !0),
|
|
299
300
|
e.value.style.chart.graduations.show && ["both", "left"].includes(e.value.style.chart.graduations.sides) ? (o(), n("line", {
|
|
300
301
|
key: 1,
|
|
301
302
|
x1: t.x,
|
|
@@ -305,7 +306,7 @@ const Se = ["id"], Ue = {
|
|
|
305
306
|
"stroke-width": e.value.style.chart.graduations.strokeWidth / 2,
|
|
306
307
|
stroke: e.value.style.chart.graduations.stroke,
|
|
307
308
|
"stroke-linecap": "round"
|
|
308
|
-
}, null, 8, He)) :
|
|
309
|
+
}, null, 8, He)) : h("", !0),
|
|
309
310
|
e.value.style.chart.graduations.show && ["both", "left"].includes(e.value.style.chart.graduations.sides) ? (o(), n("line", {
|
|
310
311
|
key: 2,
|
|
311
312
|
x1: t.x,
|
|
@@ -315,8 +316,8 @@ const Se = ["id"], Ue = {
|
|
|
315
316
|
"stroke-width": e.value.style.chart.graduations.strokeWidth / 2,
|
|
316
317
|
stroke: e.value.style.chart.graduations.stroke,
|
|
317
318
|
"stroke-linecap": "round"
|
|
318
|
-
}, null, 8, Xe)) :
|
|
319
|
-
], 64)) :
|
|
319
|
+
}, null, 8, Xe)) : h("", !0)
|
|
320
|
+
], 64)) : h("", !0),
|
|
320
321
|
e.value.style.chart.graduations.show && ["both", "right"].includes(e.value.style.chart.graduations.sides) ? (o(), n("line", {
|
|
321
322
|
key: 2,
|
|
322
323
|
x1: l.value.right,
|
|
@@ -326,7 +327,7 @@ const Se = ["id"], Ue = {
|
|
|
326
327
|
"stroke-width": e.value.style.chart.graduations.strokeWidth,
|
|
327
328
|
stroke: e.value.style.chart.graduations.stroke,
|
|
328
329
|
"stroke-linecap": "round"
|
|
329
|
-
}, null, 8, Re)) :
|
|
330
|
+
}, null, 8, Re)) : h("", !0),
|
|
330
331
|
e.value.style.chart.graduations.showIntermediate ? (o(), n(F, { key: 3 }, [
|
|
331
332
|
e.value.style.chart.graduations.show && ["both", "right"].includes(e.value.style.chart.graduations.sides) ? (o(), n("line", {
|
|
332
333
|
key: 0,
|
|
@@ -337,7 +338,7 @@ const Se = ["id"], Ue = {
|
|
|
337
338
|
"stroke-width": e.value.style.chart.graduations.strokeWidth / 2,
|
|
338
339
|
stroke: e.value.style.chart.graduations.stroke,
|
|
339
340
|
"stroke-linecap": "round"
|
|
340
|
-
}, null, 8, Je)) :
|
|
341
|
+
}, null, 8, Je)) : h("", !0),
|
|
341
342
|
e.value.style.chart.graduations.show && ["both", "right"].includes(e.value.style.chart.graduations.sides) ? (o(), n("line", {
|
|
342
343
|
key: 1,
|
|
343
344
|
x1: l.value.right,
|
|
@@ -347,7 +348,7 @@ const Se = ["id"], Ue = {
|
|
|
347
348
|
"stroke-width": e.value.style.chart.graduations.strokeWidth / 2,
|
|
348
349
|
stroke: e.value.style.chart.graduations.stroke,
|
|
349
350
|
"stroke-linecap": "round"
|
|
350
|
-
}, null, 8, Ke)) :
|
|
351
|
+
}, null, 8, Ke)) : h("", !0),
|
|
351
352
|
e.value.style.chart.graduations.show && ["both", "right"].includes(e.value.style.chart.graduations.sides) ? (o(), n("line", {
|
|
352
353
|
key: 2,
|
|
353
354
|
x1: l.value.right,
|
|
@@ -357,21 +358,21 @@ const Se = ["id"], Ue = {
|
|
|
357
358
|
"stroke-width": e.value.style.chart.graduations.strokeWidth / 2,
|
|
358
359
|
stroke: e.value.style.chart.graduations.stroke,
|
|
359
360
|
"stroke-linecap": "round"
|
|
360
|
-
}, null, 8, Qe)) :
|
|
361
|
-
], 64)) :
|
|
361
|
+
}, null, 8, Qe)) : h("", !0)
|
|
362
|
+
], 64)) : h("", !0)
|
|
362
363
|
]))), 128)),
|
|
363
364
|
d("rect", {
|
|
364
365
|
class: $({ "vue-ui-thermometer-temperature": e.value.style.chart.animation.use }),
|
|
365
366
|
x: l.value.left,
|
|
366
367
|
y: l.value.top,
|
|
367
|
-
height:
|
|
368
|
+
height: M.value,
|
|
368
369
|
width: l.value.width - e.value.style.chart.padding.left - e.value.style.chart.padding.right,
|
|
369
370
|
fill: "#FFFFFF66"
|
|
370
371
|
}, null, 10, Ze)
|
|
371
372
|
]),
|
|
372
373
|
d("text", {
|
|
373
374
|
class: $({ "vue-ui-thermometer-temperature-value": e.value.style.chart.animation.use }),
|
|
374
|
-
y:
|
|
375
|
+
y: M.value + l.value.top + e.value.style.chart.label.fontSize / 3,
|
|
375
376
|
x: l.value.left - 10,
|
|
376
377
|
"text-anchor": "end",
|
|
377
378
|
fill: e.value.style.chart.label.color,
|
|
@@ -388,12 +389,12 @@ const Se = ["id"], Ue = {
|
|
|
388
389
|
}),
|
|
389
390
|
{ datapoint: b.dataset }
|
|
390
391
|
)), 11, et),
|
|
391
|
-
x(s.$slots, "svg", { svg:
|
|
392
|
-
],
|
|
392
|
+
x(s.$slots, "svg", { svg: te.value }, void 0, !0)
|
|
393
|
+
], 10, qe)) : h("", !0),
|
|
393
394
|
s.$slots.watermark ? (o(), n("div", tt, [
|
|
394
|
-
x(s.$slots, "watermark", X(
|
|
395
|
-
])) :
|
|
396
|
-
I.value ?
|
|
395
|
+
x(s.$slots, "watermark", H(X({ isPrinting: v(V) || v(z) })), void 0, !0)
|
|
396
|
+
])) : h("", !0),
|
|
397
|
+
I.value ? h("", !0) : (o(), U(Me, {
|
|
397
398
|
key: 4,
|
|
398
399
|
config: {
|
|
399
400
|
type: "thermometer",
|
|
@@ -407,7 +408,7 @@ const Se = ["id"], Ue = {
|
|
|
407
408
|
}, null, 8, ["config"]))
|
|
408
409
|
], 14, Se));
|
|
409
410
|
}
|
|
410
|
-
},
|
|
411
|
+
}, ht = /* @__PURE__ */ Ne(st, [["__scopeId", "data-v-3186080d"]]);
|
|
411
412
|
export {
|
|
412
|
-
|
|
413
|
+
ht as default
|
|
413
414
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CVgBMJU6.cjs"),X=require("./Title-Ahj4TYHa.cjs"),S=require("./usePrinter-DN-6Hoh5.cjs"),J=require("./vue-ui-skeleton-Br1K3exH.cjs"),O=require("./useNestedProp-B-NmF2LO.cjs"),K=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Q=["id"],Z={key:0,style:"width:100%"},ee=["xmlns","viewBox"],te={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},oe=["fill"],le=["id"],re=["stop-color"],ae=["stop-color"],se=["stop-color"],ne={"clip-path":"url(#vueUiPill)"},ue=["x","y","height","width"],ce=["x","y","height","width","fill"],ie=["x1","x2","y1","y2","stroke-width","stroke"],de=["x1","x2","y1","y2","stroke-width","stroke"],he=["x1","x2","y1","y2","stroke-width","stroke"],ve=["x1","x2","y1","y2","stroke-width","stroke"],me=["x1","x2","y1","y2","stroke-width","stroke"],ye=["x1","x2","y1","y2","stroke-width","stroke"],pe=["x1","x2","y1","y2","stroke-width","stroke"],fe=["x1","x2","y1","y2","stroke-width","stroke"],ge=["x","y","height","width"],ke=["y","x","fill","font-size","font-weight"],xe={key:3,class:"vue-data-ui-watermark"},be={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:T}){const s=m;e.useCssVars(l=>({"84062bdc":G.value,"237c3e88":z.value,b9ef16ae:U.value}));const{vue_ui_thermometer:Y}=r.useConfig(),f=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{w()});function w(){r.objectIsEmpty(s.dataset)?r.error({componentName:"VueUiThermometer",type:"dataset"}):r.getMissingDatasetAttributes({datasetObject:s.dataset,requiredAttributes:["value","from","to"]}).forEach(l=>{r.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:l})})}const d=e.ref(r.createUid()),C=e.ref(null),N=e.ref(0),B=e.ref(0),t=e.computed({get:()=>E(),set:l=>l});function E(){const l=O.useNestedProp({userConfig:s.config,defaultConfig:Y});return l.theme?{...O.useNestedProp({userConfig:r.themes.vue_ui_thermometer[l.theme]||s.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>s.config,l=>{t.value=E(),w(),B.value+=1},{deep:!0});const{isPrinting:V,isImaging:P,generatePdf:F,generateImage:$}=S.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer"}),y=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),M=e.computed(()=>t.value.style.chart.thermometer.width),i=e.computed(()=>s.dataset.steps||10),c=e.ref({top:t.value.style.chart.padding.top,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right,bottom:t.value.style.chart.padding.bottom});function p(l,n,o){const u=[],b=I(l),_=I(n);for(let v=0;v<o;v++){const j=g(b.red,_.red,v,o),A=g(b.green,_.green,v,o),D=g(b.blue,_.blue,v,o),R=`#${k(j)}${k(A)}${k(D)}`;u.push(R)}return u}function I(l){const n=l.slice(1);return{red:parseInt(n.slice(0,2),16),green:parseInt(n.slice(2,4),16),blue:parseInt(n.slice(4,6),16)}}function g(l,n,o,u){return Math.round(l+(n-l)*o/u)}function k(l){return l.toString(16).padStart(2,"0")}const a=e.computed(()=>{const l=M.value+c.value.left+c.value.right,n=t.value.style.chart.height;return{width:l,left:c.value.left,right:l-c.value.right,top:c.value.top,bottom:n-c.value.bottom,height:n}}),L=e.computed(()=>a.value),x=e.computed(()=>{const l=r.checkNaN(s.dataset.from)<0?Math.abs(r.checkNaN(s.dataset.from)):r.checkNaN(s.dataset.from),n=r.checkNaN(s.dataset.to)<0?Math.abs(r.checkNaN(s.dataset.to)):r.checkNaN(s.dataset.to);let o=0;return r.checkNaN(s.dataset.to)>0?o=l+n:l>n?o=l-n:o=n-l,(1-(Math.abs(r.checkNaN(s.dataset.from))+r.checkNaN(s.dataset.value))/o)*(a.value.height-c.value.top-c.value.bottom)}),U=e.computed(()=>`${x.value}px`),z=e.computed(()=>`${a.value.height-t.value.style.chart.padding.bottom-c.value.top}px`),G=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),W=e.computed(()=>{if(s.dataset.colors){if(!s.dataset.colors.from)return p(y.value[0]||r.palette[0],r.convertColorToHex(s.dataset.colors.to),i.value||10);if(!s.dataset.colors.to)return p(r.convertColorToHex(s.dataset.colors.from),y.value[1]||r.palette[1],i.value||10)}else return p(y.value[1]||r.palette[1],y.value[0]||r.palette[0],i.value||10);return p(r.convertColorToHex(s.dataset.colors.from),r.convertColorToHex(s.dataset.colors.to),i.value||10)}),q=e.computed(()=>{const l=[];let n=0;const o=a.value.height-c.value.top-c.value.bottom;for(let u=0;u<o-1;u+=o/i.value)l.push({x:a.value.left,y:a.value.top+u,qYLess:a.value.top+u+o/i.value/4,halfY:a.value.top+u+o/i.value/2,qYMore:a.value.top+u+o/i.value/4*3,color:W.value[n],height:o/i.value}),n+=1;return l}),h=e.ref(!1);function H(l){h.value=l,N.value+=1}return T({generatePdf:F,generateImage:$}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:C,class:e.normalizeClass(`vue-ui-thermometer ${h.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}`),id:`thermometer__${d.value}`},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",Z,[(e.openBlock(),e.createBlock(X._sfc_main,{key:`title_${B.value}`,config:{title:{cy:"thermometer-div-title",...t.value.style.title},subtitle:{cy:"thermometer-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&f.value?(e.openBlock(),e.createBlock(S.UserOptions,{ref:"details",key:`user_options_${N.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(P),isPrinting:e.unref(V),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,onToggleFullscreen:H,onGeneratePdf:e.unref(F),onGenerateImage:e.unref($)},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.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"1"}: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:"2"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),width:"100%",viewBox:`0 0 ${a.value.width} ${a.value.height}`,style:"background:transparent"},[e.createElementVNode("defs",null,[e.createElementVNode("clipPath",te,[e.createElementVNode("rect",{x:"0",y:"0",width:"1",height:"1",rx:"0.5",ry:"0.07",fill:t.value.style.chart.backgroundColor},null,8,oe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,(o,u)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`vueUiThermometerGradient_${u}_${d.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,re),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(r.setOpacity)(o.color,100-t.value.style.chart.graduations.gradient.intensity)},null,8,ae),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,se)],8,le))),256))]),e.createElementVNode("g",ne,[e.createElementVNode("rect",{x:a.value.left,y:a.value.top,height:a.value.height-c.value.top-c.value.bottom,width:a.value.width-c.value.left-c.value.right,fill:"#FFFFFF"},null,8,ue),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,(o,u)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${u}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:a.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:t.value.style.chart.graduations.gradient.show?`url(#vueUiThermometerGradient_${u}_${d.value})`:o.color,"shape-rendering":"crispEdges"},null,8,ce),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ie)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,de)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:o.x,x2:o.x+2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,he)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:o.x,x2:o.x+2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ve)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:a.value.right,x2:a.value.right-10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,me)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:a.value.right,x2:a.value.right-5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ye)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:a.value.right,x2:a.value.right-2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,pe)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:a.value.right,x2:a.value.right-2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,fe)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("rect",{class:e.normalizeClass({"vue-ui-thermometer-temperature":t.value.style.chart.animation.use}),x:a.value.left,y:a.value.top,height:x.value,width:a.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,ge)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:x.value+a.value.top+t.value.style.chart.label.fontSize/3,x:a.value.left-10,"text-anchor":"end",fill:t.value.style.chart.label.color,"font-size":t.value.style.chart.label.fontSize,"font-weight":t.value.style.chart.label.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.label.formatter,m.dataset.value,e.unref(r.dataLabel)({p:t.value.style.chart.label.prefix,v:m.dataset.value,s:t.value.style.chart.label.suffix,r:t.value.style.chart.label.rounding}),{datapoint:m.dataset})),11,ke),e.renderSlot(l.$slots,"svg",{svg:L.value},void 0,!0)],10,ee)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",xe,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(V)||e.unref(P)})),void 0,!0)])):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(J.default,{key:4,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],14,Q))}},_e=K._export_sfc(be,[["__scopeId","data-v-3186080d"]]);exports.default=_e;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ref as n, onMounted as Q, onBeforeUnmount as Y, computed as z, watch as Z, openBlock as l, createElementBlock as r, normalizeStyle as f, createBlock as ee, createCommentVNode as v, unref as te, createElementVNode as M, mergeProps as V, renderSlot as E, normalizeProps as O, guardReactiveProps as U, toDisplayString as ae, createVNode as $ } from "vue";
|
|
2
|
-
import { u as se } from "./useNestedProp-
|
|
3
|
-
import { u as le, c as oe, X as re, E as W } from "./index-
|
|
2
|
+
import { u as se } from "./useNestedProp-C_ZrJBd9.js";
|
|
3
|
+
import { u as le, c as oe, X as re, E as W } from "./index-D2epy0rJ.js";
|
|
4
4
|
import { t as ue, u as ie } from "./useResponsive-NZB-WLRF.js";
|
|
5
|
-
import P from "./BaseIcon-
|
|
6
|
-
import { _ as ne } from "./Title-
|
|
5
|
+
import P from "./BaseIcon-B9istAKo.js";
|
|
6
|
+
import { _ as ne } from "./Title-DJ2FNrSN.js";
|
|
7
7
|
import { _ as ce } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
class de {
|
|
9
9
|
constructor(A, k, C, H = !0, T = !0) {
|