vue-data-ui 2.4.47 → 2.4.48
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-C3u-U00V.cjs → Arrow-CDz_A4X6.cjs} +1 -1
- package/dist/{Arrow-C-PQX3ZC.js → Arrow-CMGb5jtB.js} +1 -1
- package/dist/{BaseIcon-8y_okNW6.cjs → BaseIcon-CqZOJaZ7.cjs} +1 -1
- package/dist/{BaseIcon-BeAMtwQX.js → BaseIcon-WyM8ZLeS.js} +1 -1
- package/dist/{DataTable-D7JlgAbC.js → DataTable-8Bk6Zg9H.js} +2 -2
- package/dist/{DataTable-CfxOc-In.cjs → DataTable-UQDVIoTq.cjs} +1 -1
- package/dist/{Legend-CEhIHRJc.js → Legend-BqySI7-3.js} +1 -1
- package/dist/{Legend-DDuxh17p.cjs → Legend-DyQhpUa7.cjs} +1 -1
- package/dist/{PackageVersion-8Ql1gdmo.js → PackageVersion-C26iHVPd.js} +1 -1
- package/dist/{PackageVersion-Df1iPzMk.cjs → PackageVersion-JL2H1ZNU.cjs} +1 -1
- package/dist/{PenAndPaper-CvGft3ku.cjs → PenAndPaper-Bmfl9PVt.cjs} +1 -1
- package/dist/{PenAndPaper-b1ZmLra1.js → PenAndPaper-XF8fq-Km.js} +3 -3
- package/dist/{Shape-D3F3Ki5y.cjs → Shape-CbUYortz.cjs} +1 -1
- package/dist/{Shape-CvBLjLSE.js → Shape-Cmue6aoD.js} +1 -1
- package/dist/{Slicer-CHKuuOOo.cjs → Slicer-DJsIXuV_.cjs} +1 -1
- package/dist/{Slicer-CRXNOGCh.js → Slicer-DnI684H6.js} +2 -2
- package/dist/{Title-URF9hufV.cjs → Title-CbiI2XAK.cjs} +1 -1
- package/dist/{Title-_dfoh5WC.js → Title-D5Wtk97z.js} +1 -1
- package/dist/{Tooltip-87gbw8Ir.cjs → Tooltip-CXWymtVK.cjs} +1 -1
- package/dist/{Tooltip-CAkj2Rmy.js → Tooltip-z6v35GbJ.js} +1 -1
- package/dist/{index-BUHajhqq.js → index-BepNt4hC.js} +6 -1
- package/dist/index-DOkp6I9s.cjs +9 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +5 -0
- package/dist/types/vue-data-ui.d.ts +5 -0
- package/dist/{useNestedProp-C-g0SLHN.cjs → useNestedProp-BEjpLG7g.cjs} +1 -1
- package/dist/{useNestedProp-a0uhe7rJ.js → useNestedProp-DUC6XBU3.js} +1 -1
- package/dist/{usePrinter-DLHRtlhI.js → usePrinter-DPvuzbZK.js} +1 -1
- package/dist/{usePrinter-4Zj_RZ5v.cjs → usePrinter-Hc-LICQf.cjs} +1 -1
- package/dist/{vue-data-ui-zjfs-rk-.js → vue-data-ui-CFmnqYD2.js} +60 -60
- package/dist/{vue-data-ui-CPc7dZQe.cjs → vue-data-ui-TUbEwYZ5.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-zI1BF0gA.cjs → vue-ui-3d-bar-CYl_O7ug.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-B60j7yco.js → vue-ui-3d-bar-L6JZrkbq.js} +9 -9
- package/dist/{vue-ui-accordion-2QOotHrr.js → vue-ui-accordion-C2pYIHIH.js} +3 -3
- package/dist/{vue-ui-accordion-C0oMKEv0.cjs → vue-ui-accordion-C8xohumC.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-hZLKWqN9.cjs → vue-ui-age-pyramid-CRXWyh5c.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-BT7HUZpj.js → vue-ui-age-pyramid-CSCtiUKQ.js} +10 -10
- package/dist/{vue-ui-annotator-ZpGqgGMp.js → vue-ui-annotator-5Mjqr97s.js} +1 -1
- package/dist/{vue-ui-annotator-Da8-IgfK.cjs → vue-ui-annotator-DIETLcfO.cjs} +1 -1
- package/dist/{vue-ui-bullet-BfkujrD0.cjs → vue-ui-bullet-B5MHoDHB.cjs} +1 -1
- package/dist/{vue-ui-bullet-Da56_P30.js → vue-ui-bullet-C6EHD4J1.js} +8 -8
- package/dist/{vue-ui-candlestick-CblCXKhS.js → vue-ui-candlestick-BrJoYH2t.js} +11 -11
- package/dist/{vue-ui-candlestick-fM3nUsgr.cjs → vue-ui-candlestick-CYMynB3E.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-B1U41lku.js → vue-ui-carousel-table-BtNgnJg3.js} +4 -4
- package/dist/{vue-ui-carousel-table-D3rcSdcC.cjs → vue-ui-carousel-table-ZPuYe12-.cjs} +1 -1
- package/dist/{vue-ui-chestnut-Cnvf2Aav.js → vue-ui-chestnut-BGyD7s_L.js} +8 -8
- package/dist/{vue-ui-chestnut-CtMm9Hev.cjs → vue-ui-chestnut-C1en00jI.cjs} +1 -1
- package/dist/{vue-ui-cursor-C-7zi0ol.cjs → vue-ui-cursor-BP38xePQ.cjs} +1 -1
- package/dist/{vue-ui-cursor-TzS0sCy1.js → vue-ui-cursor-DR2RWF24.js} +2 -2
- package/dist/{vue-ui-dashboard-DdMkGnE7.cjs → vue-ui-dashboard-BYygSPuJ.cjs} +1 -1
- package/dist/{vue-ui-dashboard-Ajvddjlt.js → vue-ui-dashboard-BpOAi1fs.js} +2 -2
- package/dist/{vue-ui-digits-DwB-tHKl.cjs → vue-ui-digits-C7sdWmoo.cjs} +1 -1
- package/dist/{vue-ui-digits-CBPttkF2.js → vue-ui-digits-DNrXa7E_.js} +2 -2
- package/dist/{vue-ui-donut-DidXxdXO.js → vue-ui-donut-95iv1pkT.js} +11 -11
- package/dist/{vue-ui-donut-Cz6xpVSC.cjs → vue-ui-donut-BbBw5pWR.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-B0xdulgT.js → vue-ui-donut-evolution-BneXLHZF.js} +11 -11
- package/dist/{vue-ui-donut-evolution-Dj73srrD.cjs → vue-ui-donut-evolution-DpECkYLY.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-Cimude8K.js → vue-ui-dumbbell-B_T3Hlzb.js} +10 -10
- package/dist/{vue-ui-dumbbell-BdwXaRk2.cjs → vue-ui-dumbbell-lnqC1mak.cjs} +1 -1
- package/dist/{vue-ui-flow-DMNNOEJy.cjs → vue-ui-flow-DgsufNuK.cjs} +1 -1
- package/dist/{vue-ui-flow-D2ekJwov.js → vue-ui-flow-PsQyq54b.js} +9 -9
- package/dist/{vue-ui-funnel-BsKFz_A9.js → vue-ui-funnel-CxZYQkNb.js} +8 -8
- package/dist/{vue-ui-funnel-DLmzVrrA.cjs → vue-ui-funnel-Cz5qLXEC.cjs} +1 -1
- package/dist/{vue-ui-galaxy-WAy90dGq.js → vue-ui-galaxy-4EZM6VGD.js} +11 -11
- package/dist/{vue-ui-galaxy-CnZYKQA2.cjs → vue-ui-galaxy-C97nWRvH.cjs} +1 -1
- package/dist/{vue-ui-gauge-DhqOgkfq.cjs → vue-ui-gauge-BC0zGvqM.cjs} +1 -1
- package/dist/{vue-ui-gauge-Xvk_SGCc.js → vue-ui-gauge-CFy3oMIA.js} +7 -7
- package/dist/{vue-ui-gizmo-D-djUfJw.js → vue-ui-gizmo-BQlJhilX.js} +3 -3
- package/dist/{vue-ui-gizmo-B6qoNeBK.cjs → vue-ui-gizmo-BUfBljdr.cjs} +1 -1
- package/dist/{vue-ui-heatmap-jmKDOYnr.js → vue-ui-heatmap-Dyz8arCQ.js} +10 -10
- package/dist/{vue-ui-heatmap-CitZU9av.cjs → vue-ui-heatmap-zi279cjp.cjs} +1 -1
- package/dist/{vue-ui-history-plot-BoR791Gc.js → vue-ui-history-plot-1KwhLYwx.js} +11 -11
- package/dist/{vue-ui-history-plot-EzFdtBwU.cjs → vue-ui-history-plot-BXZTRkzT.cjs} +1 -1
- package/dist/{vue-ui-kpi-CMXhw4Ll.cjs → vue-ui-kpi-BsjkNZZH.cjs} +1 -1
- package/dist/{vue-ui-kpi-CB47PO72.js → vue-ui-kpi-DjLKxPTS.js} +3 -3
- package/dist/{vue-ui-mini-loader-D4dKItUb.js → vue-ui-mini-loader-Be51Zm_Q.js} +2 -2
- package/dist/{vue-ui-mini-loader-DJx2b1Hs.cjs → vue-ui-mini-loader-UKOzmxaD.cjs} +1 -1
- package/dist/{vue-ui-molecule-C_VM1ZP2.js → vue-ui-molecule-DUQo9_oj.js} +11 -11
- package/dist/{vue-ui-molecule-CnERhdxF.cjs → vue-ui-molecule-wgNYpLlg.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BBlokNSE.cjs → vue-ui-mood-radar-D-sMgA1m.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BESMMSxA.js → vue-ui-mood-radar-D260gFQ-.js} +11 -11
- package/dist/{vue-ui-nested-donuts-r1v-A7E3.js → vue-ui-nested-donuts-Ccz2llkz.js} +11 -11
- package/dist/{vue-ui-nested-donuts-C0IAo5oO.cjs → vue-ui-nested-donuts-DCATiNcn.cjs} +1 -1
- package/dist/{vue-ui-onion-CZuFxIOX.js → vue-ui-onion-4nwZ2Xcq.js} +11 -11
- package/dist/{vue-ui-onion-PaHP7qHI.cjs → vue-ui-onion-jbgqZma_.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-Bwu4Q1dB.cjs → vue-ui-parallel-coordinate-plot-D8tDqhAC.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-BeAArg3p.js → vue-ui-parallel-coordinate-plot-b9zBOm3l.js} +12 -12
- package/dist/{vue-ui-quadrant-BLpgNZs9.cjs → vue-ui-quadrant-BPbKAs_R.cjs} +1 -1
- package/dist/{vue-ui-quadrant-D5m9y_Vd.js → vue-ui-quadrant-DyhFsYAn.js} +12 -12
- package/dist/{vue-ui-quick-chart-CZ6gBVVk.cjs → vue-ui-quick-chart-BjjeoplC.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-Ci4RKL62.js → vue-ui-quick-chart-kBVlNtAe.js} +9 -9
- package/dist/{vue-ui-radar-Ca1AvJAF.cjs → vue-ui-radar-Cax_LlVW.cjs} +1 -1
- package/dist/{vue-ui-radar-03mjX9gn.js → vue-ui-radar-WzkdQND3.js} +12 -12
- package/dist/{vue-ui-rating-CSSdVGTk.js → vue-ui-rating-BLj-bxOZ.js} +2 -2
- package/dist/{vue-ui-rating-Dilq1rrJ.cjs → vue-ui-rating-W2x5oPbH.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-DsckG4af.cjs → vue-ui-relation-circle-BC09Wo74.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-B3J9KW9u.js → vue-ui-relation-circle-Cy7KZjJK.js} +7 -7
- package/dist/{vue-ui-rings-COAgson6.js → vue-ui-rings-B2r_HrM3.js} +11 -11
- package/dist/{vue-ui-rings-6g022zEh.cjs → vue-ui-rings-BEBxWNzs.cjs} +1 -1
- package/dist/{vue-ui-scatter-BrdWaLV6.js → vue-ui-scatter-BzsoN90E.js} +12 -12
- package/dist/{vue-ui-scatter-B3t_Q_4g.cjs → vue-ui-scatter-EbhOyS1b.cjs} +1 -1
- package/dist/{vue-ui-screenshot-NpTxyR66.cjs → vue-ui-screenshot-BNvphTTn.cjs} +1 -1
- package/dist/{vue-ui-screenshot-CWMAfSH3.js → vue-ui-screenshot-D-CteYvP.js} +1 -1
- package/dist/{vue-ui-skeleton-BXPvqUO_.js → vue-ui-skeleton-Dm5B1MER.js} +3 -3
- package/dist/{vue-ui-skeleton-D6mdHYxB.cjs → vue-ui-skeleton-G8jk4hcj.cjs} +1 -1
- package/dist/{vue-ui-smiley-BIAA0JuB.cjs → vue-ui-smiley-DQYXvPr4.cjs} +1 -1
- package/dist/{vue-ui-smiley-TNgEIMFs.js → vue-ui-smiley-H4VJmgZj.js} +2 -2
- package/dist/{vue-ui-spark-trend-BWb59zfs.cjs → vue-ui-spark-trend-DA096qRZ.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-Xtb0H-Ra.js → vue-ui-spark-trend-t_PBPjL2.js} +5 -5
- package/dist/{vue-ui-sparkbar-mgvNuWjK.cjs → vue-ui-sparkbar-Bx-gf5Hz.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CO0RYq4S.js → vue-ui-sparkbar-xh4kHNcW.js} +4 -4
- package/dist/{vue-ui-sparkgauge-CfgH_pIo.cjs → vue-ui-sparkgauge--atMedaJ.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-Cn17RyPJ.js → vue-ui-sparkgauge-BfVnT-Cl.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-yTF-QJCM.js → vue-ui-sparkhistogram-BHE8M9AE.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-BU1jgcm9.cjs → vue-ui-sparkhistogram-zunUFhA0.cjs} +1 -1
- package/dist/{vue-ui-sparkline-D80w9cUt.js → vue-ui-sparkline-B6SKeGhK.js} +4 -4
- package/dist/{vue-ui-sparkline-3ym-6DFE.cjs → vue-ui-sparkline-CvxWwt_w.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DhQNOgjS.js → vue-ui-sparkstackbar-B_KMgwOl.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-C1zVZqZh.cjs → vue-ui-sparkstackbar-Bhd7EKGG.cjs} +1 -1
- package/dist/{vue-ui-stackbar-C_b754Op.js → vue-ui-stackbar-C_P0JG4w.js} +12 -12
- package/dist/{vue-ui-stackbar-yiVhLavI.cjs → vue-ui-stackbar-suSeRgaG.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-CqP7E3Fr.js → vue-ui-strip-plot-BUA3moHw.js} +11 -11
- package/dist/{vue-ui-strip-plot-CK-U0tNX.cjs → vue-ui-strip-plot-CWMQUeOe.cjs} +1 -1
- package/dist/{vue-ui-table-x2Ylaftx.cjs → vue-ui-table-BYmYQISh.cjs} +1 -1
- package/dist/{vue-ui-table-BLPLqFFd.js → vue-ui-table-BcFkS1Cj.js} +1 -1
- package/dist/{vue-ui-table-heatmap-jWG59f0S.js → vue-ui-table-heatmap-Bvt_J2PP.js} +4 -4
- package/dist/{vue-ui-table-heatmap-2Qm41w8P.cjs → vue-ui-table-heatmap-JK93Wb5V.cjs} +1 -1
- package/dist/vue-ui-table-sparkline-B7_CaLRt.cjs +1 -0
- package/dist/vue-ui-table-sparkline-CFqGNvWi.js +573 -0
- package/dist/{vue-ui-thermometer-DVPaZfi5.cjs → vue-ui-thermometer-Dh844EJO.cjs} +1 -1
- package/dist/{vue-ui-thermometer-CS4v4vKk.js → vue-ui-thermometer-Dm0ttenA.js} +7 -7
- package/dist/{vue-ui-timer-op_p9xjL.js → vue-ui-timer-CaFTEmwe.js} +5 -5
- package/dist/{vue-ui-timer-Bu17pe7S.cjs → vue-ui-timer-LypwXXDJ.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-CzNBUmn2.js → vue-ui-tiremarks-Bgm_MUY2.js} +7 -7
- package/dist/{vue-ui-tiremarks-CoKFLMWh.cjs → vue-ui-tiremarks-CFgv3kS8.cjs} +1 -1
- package/dist/{vue-ui-treemap-DXU0BagE.cjs → vue-ui-treemap--2oLnl5Z.cjs} +1 -1
- package/dist/{vue-ui-treemap-DLDn1gQ2.js → vue-ui-treemap-CERIO7kA.js} +11 -11
- package/dist/{vue-ui-vertical-bar-BlG3HwaX.cjs → vue-ui-vertical-bar-B6P0pW6h.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-BqTIL5Np.js → vue-ui-vertical-bar-BErNHsoK.js} +11 -11
- package/dist/{vue-ui-waffle-CaTFfTmj.cjs → vue-ui-waffle-BlsD3mo7.cjs} +1 -1
- package/dist/{vue-ui-waffle-DFjArEi_.js → vue-ui-waffle-DwXtzgfk.js} +11 -11
- package/dist/{vue-ui-wheel-B22xmLY4.cjs → vue-ui-wheel-Bnlv4BkN.cjs} +1 -1
- package/dist/{vue-ui-wheel-C95mjUTI.js → vue-ui-wheel-C57mnBKi.js} +7 -7
- package/dist/{vue-ui-word-cloud-Byx-M5Jn.js → vue-ui-word-cloud-C9dIGLRl.js} +10 -10
- package/dist/{vue-ui-word-cloud-05iWIjGT.cjs → vue-ui-word-cloud-MQ4ipLvb.cjs} +1 -1
- package/dist/{vue-ui-xy-lPnzrWt8.cjs → vue-ui-xy-BLxO3c8J.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-Cg0PIT5i.js → vue-ui-xy-canvas-RNuxMqDq.js} +11 -11
- package/dist/{vue-ui-xy-canvas-os8jbTXb.cjs → vue-ui-xy-canvas-xlIskwwx.cjs} +1 -1
- package/dist/{vue-ui-xy-C8YrIKK6.js → vue-ui-xy-t9BzKivu.js} +14 -14
- package/package.json +1 -1
- package/dist/index-KYU_8xrX.cjs +0 -9
- package/dist/vue-ui-table-sparkline-BEeO-aWa.js +0 -516
- package/dist/vue-ui-table-sparkline-C0vzS1F3.cjs +0 -1
|
@@ -0,0 +1,573 @@
|
|
|
1
|
+
import { useCssVars as _e, ref as d, computed as h, watch as re, onMounted as xe, openBlock as s, createElementBlock as v, normalizeClass as R, createElementVNode as p, normalizeStyle as i, toDisplayString as g, createCommentVNode as f, withDirectives as Ce, createBlock as z, Fragment as U, renderList as H, unref as c, createSlots as Se, withCtx as O, renderSlot as S, normalizeProps as we, guardReactiveProps as Ae, nextTick as Ie } from "vue";
|
|
2
|
+
import { u as $e, c as ze, t as Oe, a as Pe, p as P, b as Ne, o as De, e as ue, g as Fe, $ as We, d as Te, i as N, f as D, q as Ve, r as Me } from "./index-BepNt4hC.js";
|
|
3
|
+
import { u as se } from "./useNestedProp-DUC6XBU3.js";
|
|
4
|
+
import Ee from "./vue-ui-sparkline-B6SKeGhK.js";
|
|
5
|
+
import ie from "./BaseIcon-WyM8ZLeS.js";
|
|
6
|
+
import { u as Ge, U as Be, v as Le } from "./usePrinter-DPvuzbZK.js";
|
|
7
|
+
import { _ as Re } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
+
const Ue = ["id"], He = { style: { "z-index": "1", "padding-right": "24px" } }, qe = ["onClick"], Xe = ["data-cell"], je = ["data-cell", "onPointerenter"], Je = ["data-cell"], Ke = ["data-cell"], Qe = ["data-cell"], Ye = ["data-cell"], Ze = {
|
|
9
|
+
key: 0,
|
|
10
|
+
ref: "source",
|
|
11
|
+
dir: "auto"
|
|
12
|
+
}, et = {
|
|
13
|
+
__name: "vue-ui-table-sparkline",
|
|
14
|
+
props: {
|
|
15
|
+
config: {
|
|
16
|
+
type: Object,
|
|
17
|
+
default() {
|
|
18
|
+
return {};
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
dataset: {
|
|
22
|
+
type: Array,
|
|
23
|
+
default() {
|
|
24
|
+
return [];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
setup(de, { expose: ve }) {
|
|
29
|
+
const b = de;
|
|
30
|
+
_e((t) => ({
|
|
31
|
+
"974f8724": t.tdo
|
|
32
|
+
}));
|
|
33
|
+
const { vue_ui_table_sparkline: ce } = $e(), F = d(ze()), q = d(0), w = d(0), W = d(null), e = h({
|
|
34
|
+
get: () => X(),
|
|
35
|
+
set: (t) => t
|
|
36
|
+
});
|
|
37
|
+
function X() {
|
|
38
|
+
const t = se({
|
|
39
|
+
userConfig: b.config,
|
|
40
|
+
defaultConfig: ce
|
|
41
|
+
});
|
|
42
|
+
return t.theme ? {
|
|
43
|
+
...se({
|
|
44
|
+
userConfig: Oe.vue_ui_table_sparkline[t.theme] || b.config,
|
|
45
|
+
defaultConfig: t
|
|
46
|
+
}),
|
|
47
|
+
customPalette: Pe[t.theme] || P
|
|
48
|
+
} : t;
|
|
49
|
+
}
|
|
50
|
+
re(() => b.config, (t) => {
|
|
51
|
+
e.value = X(), Y(), w.value += 1;
|
|
52
|
+
}, { deep: !0 }), re(() => b.dataset, (t) => {
|
|
53
|
+
m.value = x.value, w.value += 1;
|
|
54
|
+
}, { deep: !0 });
|
|
55
|
+
const { isPrinting: j, isImaging: J, generatePdf: K, generateImage: Q } = Ge({
|
|
56
|
+
elementId: `table_${F.value}`,
|
|
57
|
+
fileName: e.value.title.text || "vue-ui-table-sparkline"
|
|
58
|
+
}), pe = h(() => Ne(e.value.customPalette)), A = d(null), T = d(!1), fe = h(() => e.value.responsiveBreakpoint);
|
|
59
|
+
xe(() => {
|
|
60
|
+
Y();
|
|
61
|
+
});
|
|
62
|
+
const V = d(e.value.colNames);
|
|
63
|
+
function Y() {
|
|
64
|
+
De(b.dataset) && ue({
|
|
65
|
+
componentName: "VueUiTableSparkline",
|
|
66
|
+
type: "dataset"
|
|
67
|
+
});
|
|
68
|
+
const t = new ResizeObserver((l) => {
|
|
69
|
+
l.forEach((a) => {
|
|
70
|
+
T.value = a.contentRect.width < fe.value;
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
A.value && t.observe(A.value), V.value = [];
|
|
74
|
+
for (let l = 0; l < le.value; l += 1)
|
|
75
|
+
V.value.push(e.value.colNames[l] || `col ${l}`);
|
|
76
|
+
}
|
|
77
|
+
const Z = h(() => (b.dataset.forEach((t, l) => {
|
|
78
|
+
Fe({
|
|
79
|
+
datasetObject: t,
|
|
80
|
+
requiredAttributes: ["name", "values"]
|
|
81
|
+
}).forEach((a) => {
|
|
82
|
+
ue({
|
|
83
|
+
componentName: "VueUiTableSparkline",
|
|
84
|
+
type: "datasetSerieAttribute",
|
|
85
|
+
property: a,
|
|
86
|
+
index: l
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
}), b.dataset.map((t, l) => {
|
|
90
|
+
const a = (t.values || []).map((r) => isNaN(r) ? 0 : r ?? 0), n = a.reduce((r, y) => r + y, 0), u = n / a.length, o = We(a);
|
|
91
|
+
return {
|
|
92
|
+
...t,
|
|
93
|
+
values: t.values || [],
|
|
94
|
+
color: Te(t.color) || pe.value[l] || P[l] || P[l % P.length],
|
|
95
|
+
sum: n,
|
|
96
|
+
average: u,
|
|
97
|
+
median: o,
|
|
98
|
+
sparklineDataset: a.map((r, y) => ({
|
|
99
|
+
period: e.value.colNames[y] || `col ${y}`,
|
|
100
|
+
value: r || 0
|
|
101
|
+
}))
|
|
102
|
+
};
|
|
103
|
+
})));
|
|
104
|
+
function me(t) {
|
|
105
|
+
const a = (t[0].values || []).map(
|
|
106
|
+
(u, o) => t.map((r) => r.values[o] || [])
|
|
107
|
+
).map(
|
|
108
|
+
(u) => u.map((o, r) => [o, r]).sort((o, r) => r[0] - o[0]).map((o) => o[1])
|
|
109
|
+
);
|
|
110
|
+
return t.map((u, o) => ({
|
|
111
|
+
...u,
|
|
112
|
+
values: u.values || [],
|
|
113
|
+
orders: a[o]
|
|
114
|
+
}));
|
|
115
|
+
}
|
|
116
|
+
const x = h(() => me(Z.value)), m = d(x.value), ge = h(() => Math.max(...m.value.map((t) => (t.values || []).length))), I = d(void 0), M = d(!1), $ = d(void 0), ee = d(-1);
|
|
117
|
+
function te() {
|
|
118
|
+
M.value = !1, $.value = void 0, C.value = void 0, ee.value = -1, m.value = x.value;
|
|
119
|
+
}
|
|
120
|
+
function ae(t, l) {
|
|
121
|
+
if (["name", "sum", "average", "median"].includes(t.type)) {
|
|
122
|
+
be(t.type);
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
if (!B(l)) return;
|
|
126
|
+
_.value = l, C.value = void 0, M.value = !0, $.value = l;
|
|
127
|
+
const a = x.value.map((r) => r.values[l] || []), n = I.value === l ? 1 : -1;
|
|
128
|
+
ee.value = n, l === I.value ? I.value = void 0 : I.value = l;
|
|
129
|
+
const o = a.map((r, y) => [y, r]).sort((r, y) => n * (y[1] - r[1])).map((r) => r[0]).map((r) => x.value[r]);
|
|
130
|
+
m.value = o, w.value += 1;
|
|
131
|
+
}
|
|
132
|
+
const le = h(() => Math.max(...b.dataset.map((t) => (t.values || []).length))), k = h(() => {
|
|
133
|
+
let t = V.value.map((a) => ({
|
|
134
|
+
type: "reg",
|
|
135
|
+
value: a
|
|
136
|
+
}));
|
|
137
|
+
if (!t.length)
|
|
138
|
+
for (let a = 0; a < le.value; a += 1)
|
|
139
|
+
t.push({ type: "reg", value: `col ${a + 1}` });
|
|
140
|
+
e.value.showTotal && (t = [...t, { type: "sum", value: e.value.translations.total }]);
|
|
141
|
+
let l;
|
|
142
|
+
return e.value.showAverage && e.value.showMedian ? l = [
|
|
143
|
+
...t,
|
|
144
|
+
{ type: "average", value: e.value.translations.average },
|
|
145
|
+
{ type: "median", value: e.value.translations.median }
|
|
146
|
+
] : e.value.showAverage && !e.value.showMedian ? l = [...t, { type: "average", value: e.value.translations.average }] : !e.value.showAverage && e.value.showMedian ? l = [...t, { type: "median", value: e.value.translations.median }] : l = t, e.value.showSparklines ? [...l, { type: "chart", value: e.value.translations.chart }] : l;
|
|
147
|
+
}), E = d({
|
|
148
|
+
name: -1,
|
|
149
|
+
sum: -1,
|
|
150
|
+
average: -1,
|
|
151
|
+
median: -1
|
|
152
|
+
}), C = d(void 0);
|
|
153
|
+
function be(t) {
|
|
154
|
+
if (!m.value || m.value.length === 0 || !L(t)) return;
|
|
155
|
+
C.value = t, $.value = void 0, M.value = !0, E.value[t] = E.value[t] === -1 ? 1 : -1;
|
|
156
|
+
const l = E.value[t], a = [...m.value].sort((n, u) => {
|
|
157
|
+
const o = n[t] ?? (typeof n[t] == "number" ? 0 : ""), r = u[t] ?? (typeof u[t] == "number" ? 0 : "");
|
|
158
|
+
return typeof o == "string" && typeof r == "string" ? l === -1 ? o.localeCompare(r) : r.localeCompare(o) : typeof o == "number" && typeof r == "number" ? l === -1 ? o - r : r - o : 0;
|
|
159
|
+
});
|
|
160
|
+
m.value = a;
|
|
161
|
+
}
|
|
162
|
+
const _ = d(void 0), G = d(void 0);
|
|
163
|
+
function ye({ dataIndex: t, serieIndex: l }) {
|
|
164
|
+
_.value = t, G.value = l, W.value[t] && !T.value && W.value[t].scrollIntoView({ behavior: "smooth", block: "nearest", inline: "center" });
|
|
165
|
+
}
|
|
166
|
+
const oe = d(!1);
|
|
167
|
+
function he(t) {
|
|
168
|
+
oe.value = t, q.value += 1;
|
|
169
|
+
}
|
|
170
|
+
function ne() {
|
|
171
|
+
Ie(() => {
|
|
172
|
+
const t = [e.value.translations.serie].concat(k.value), l = Z.value.map((u, o) => [
|
|
173
|
+
[u.name],
|
|
174
|
+
u.values,
|
|
175
|
+
[u.sum],
|
|
176
|
+
[u.average],
|
|
177
|
+
[u.median]
|
|
178
|
+
]), a = [t].concat(l), n = Ve(a);
|
|
179
|
+
Me({
|
|
180
|
+
csvContent: n,
|
|
181
|
+
title: e.value.title.text || "vue-ui-table-sparkline"
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
function B(t) {
|
|
186
|
+
return e.value.sortedDataColumnIndices.includes(t);
|
|
187
|
+
}
|
|
188
|
+
function L(t) {
|
|
189
|
+
return t.type === "name" || t === "name" ? e.value.sortedSeriesName : t.type === "sum" || t === "sum" ? e.value.sortedSum : t.type === "average" || t === "average" ? e.value.sortedAverage : t.type === "median" || t === "median" ? e.value.sortedMedian : !1;
|
|
190
|
+
}
|
|
191
|
+
function ke(t, l) {
|
|
192
|
+
return ["sum", "average", "median"].includes(l.type) ? C.value === l.type ? 1 : 0.3 : t === $.value ? 1 : 0.3;
|
|
193
|
+
}
|
|
194
|
+
return ve({
|
|
195
|
+
generatePdf: K,
|
|
196
|
+
generateImage: Q,
|
|
197
|
+
generateCsv: ne,
|
|
198
|
+
restoreOrder: te
|
|
199
|
+
}), (t, l) => (s(), v("div", {
|
|
200
|
+
ref_key: "tableContainer",
|
|
201
|
+
ref: A,
|
|
202
|
+
class: R({ "vue-ui-responsive": T.value }),
|
|
203
|
+
style: { overflow: "hidden" },
|
|
204
|
+
id: `table_${F.value}`
|
|
205
|
+
}, [
|
|
206
|
+
p("div", {
|
|
207
|
+
style: { overflow: "auto" },
|
|
208
|
+
onPointerleave: l[1] || (l[1] = (a) => {
|
|
209
|
+
G.value = void 0, _.value = void 0;
|
|
210
|
+
})
|
|
211
|
+
}, [
|
|
212
|
+
p("table", {
|
|
213
|
+
class: "vue-ui-data-table",
|
|
214
|
+
style: i({ fontFamily: e.value.fontFamily, position: "relative" })
|
|
215
|
+
}, [
|
|
216
|
+
e.value.title.text ? (s(), v("caption", {
|
|
217
|
+
key: 0,
|
|
218
|
+
style: i({ backgroundColor: e.value.title.backgroundColor })
|
|
219
|
+
}, [
|
|
220
|
+
p("div", {
|
|
221
|
+
style: i({
|
|
222
|
+
fontSize: `${e.value.title.fontSize}px`,
|
|
223
|
+
fontWeight: e.value.title.bold ? "bold" : "normal",
|
|
224
|
+
color: e.value.title.color,
|
|
225
|
+
textAlign: e.value.title.textAlign
|
|
226
|
+
})
|
|
227
|
+
}, g(e.value.title.text), 5),
|
|
228
|
+
e.value.title.subtitle.text ? (s(), v("div", {
|
|
229
|
+
key: 0,
|
|
230
|
+
style: i({
|
|
231
|
+
fontSize: `${e.value.title.subtitle.fontSize}px`,
|
|
232
|
+
fontWeight: e.value.title.subtitle.bold ? "bold" : "normal",
|
|
233
|
+
color: e.value.title.subtitle.color,
|
|
234
|
+
textAlign: e.value.title.textAlign
|
|
235
|
+
})
|
|
236
|
+
}, g(e.value.title.subtitle.text), 5)) : f("", !0)
|
|
237
|
+
], 4)) : f("", !0),
|
|
238
|
+
p("thead", He, [
|
|
239
|
+
Ce((s(), v("tr", {
|
|
240
|
+
role: "row",
|
|
241
|
+
class: "vue-ui-data-table__thead-row",
|
|
242
|
+
style: i({
|
|
243
|
+
backgroundColor: e.value.thead.backgroundColor,
|
|
244
|
+
color: e.value.thead.color
|
|
245
|
+
})
|
|
246
|
+
}, [
|
|
247
|
+
p("th", {
|
|
248
|
+
role: "cell",
|
|
249
|
+
style: i({
|
|
250
|
+
backgroundColor: e.value.thead.backgroundColor,
|
|
251
|
+
border: e.value.thead.outline,
|
|
252
|
+
textAlign: e.value.thead.textAlign,
|
|
253
|
+
fontWeight: e.value.thead.bold ? "bold" : "normal",
|
|
254
|
+
cursor: e.value.sortedSeriesName ? "pointer" : "default"
|
|
255
|
+
}),
|
|
256
|
+
class: "sticky-col-first",
|
|
257
|
+
onClick: l[0] || (l[0] = (a) => ae({ type: "name" }, null))
|
|
258
|
+
}, [
|
|
259
|
+
p("div", {
|
|
260
|
+
style: i({
|
|
261
|
+
display: "flex",
|
|
262
|
+
flexDirection: "row",
|
|
263
|
+
alignItems: "center",
|
|
264
|
+
gap: "6px",
|
|
265
|
+
justifyContent: e.value.thead.textAlign
|
|
266
|
+
})
|
|
267
|
+
}, [
|
|
268
|
+
p("span", null, g(e.value.translations.serie), 1),
|
|
269
|
+
e.value.sortedSeriesName ? (s(), z(ie, {
|
|
270
|
+
key: 0,
|
|
271
|
+
size: 18,
|
|
272
|
+
name: "sort",
|
|
273
|
+
stroke: e.value.thead.color,
|
|
274
|
+
style: i({
|
|
275
|
+
opacity: C.value === "name" ? 1 : 0.3
|
|
276
|
+
})
|
|
277
|
+
}, null, 8, ["stroke", "style"])) : f("", !0)
|
|
278
|
+
], 4)
|
|
279
|
+
], 4),
|
|
280
|
+
(s(!0), v(U, null, H(k.value, (a, n) => (s(), v("th", {
|
|
281
|
+
role: "cell",
|
|
282
|
+
style: i({
|
|
283
|
+
background: e.value.thead.backgroundColor,
|
|
284
|
+
border: e.value.thead.outline,
|
|
285
|
+
textAlign: e.value.thead.textAlign,
|
|
286
|
+
fontWeight: e.value.thead.bold ? "bold" : "normal",
|
|
287
|
+
minWidth: n === k.value.length - 1 ? `${e.value.sparkline.dimensions.width}px` : "48px",
|
|
288
|
+
cursor: B(n) || L(a) ? "pointer" : "default",
|
|
289
|
+
paddingRight: n === k.value.length - 1 && e.value.userOptions.show ? "36px" : ""
|
|
290
|
+
}),
|
|
291
|
+
onClick: () => ae(a, n),
|
|
292
|
+
class: R({ "sticky-col": n === k.value.length - 1 && e.value.showSparklines })
|
|
293
|
+
}, [
|
|
294
|
+
p("div", {
|
|
295
|
+
style: i({
|
|
296
|
+
display: "flex",
|
|
297
|
+
flexDirection: "row",
|
|
298
|
+
alignItems: "center",
|
|
299
|
+
gap: "6px",
|
|
300
|
+
justifyContent: e.value.thead.textAlign
|
|
301
|
+
})
|
|
302
|
+
}, [
|
|
303
|
+
p("span", null, g(a.value), 1),
|
|
304
|
+
B(n) || L(a) ? (s(), z(ie, {
|
|
305
|
+
key: 0,
|
|
306
|
+
size: 18,
|
|
307
|
+
name: "sort",
|
|
308
|
+
stroke: e.value.thead.color,
|
|
309
|
+
style: i({
|
|
310
|
+
opacity: ke(n, a)
|
|
311
|
+
})
|
|
312
|
+
}, null, 8, ["stroke", "style"])) : f("", !0)
|
|
313
|
+
], 4),
|
|
314
|
+
e.value.userOptions.show && n === k.value.length - 1 ? (s(), z(Be, {
|
|
315
|
+
ref_for: !0,
|
|
316
|
+
ref: "details",
|
|
317
|
+
key: `user_option_${q.value}`,
|
|
318
|
+
backgroundColor: e.value.thead.backgroundColor,
|
|
319
|
+
color: e.value.thead.color,
|
|
320
|
+
isPrinting: c(j),
|
|
321
|
+
isImaging: c(J),
|
|
322
|
+
uid: F.value,
|
|
323
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
324
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
325
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
326
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
327
|
+
isFullscreen: oe.value,
|
|
328
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
329
|
+
chartElement: A.value,
|
|
330
|
+
position: e.value.userOptions.position,
|
|
331
|
+
onToggleFullscreen: he,
|
|
332
|
+
onGeneratePdf: c(K),
|
|
333
|
+
onGenerateImage: c(Q),
|
|
334
|
+
onGenerateCsv: ne
|
|
335
|
+
}, Se({ _: 2 }, [
|
|
336
|
+
t.$slots.optionPdf ? {
|
|
337
|
+
name: "optionPdf",
|
|
338
|
+
fn: O(() => [
|
|
339
|
+
S(t.$slots, "optionPdf", {}, void 0, !0)
|
|
340
|
+
]),
|
|
341
|
+
key: "0"
|
|
342
|
+
} : void 0,
|
|
343
|
+
t.$slots.optionCsv ? {
|
|
344
|
+
name: "optionCsv",
|
|
345
|
+
fn: O(() => [
|
|
346
|
+
S(t.$slots, "optionCsv", {}, void 0, !0)
|
|
347
|
+
]),
|
|
348
|
+
key: "1"
|
|
349
|
+
} : void 0,
|
|
350
|
+
t.$slots.optionImg ? {
|
|
351
|
+
name: "optionImg",
|
|
352
|
+
fn: O(() => [
|
|
353
|
+
S(t.$slots, "optionImg", {}, void 0, !0)
|
|
354
|
+
]),
|
|
355
|
+
key: "2"
|
|
356
|
+
} : void 0,
|
|
357
|
+
t.$slots.optionFullscreen ? {
|
|
358
|
+
name: "optionFullscreen",
|
|
359
|
+
fn: O(({ toggleFullscreen: u, isFullscreen: o }) => [
|
|
360
|
+
S(t.$slots, "optionFullscreen", we(Ae({ toggleFullscreen: u, isFullscreen: o })), void 0, !0)
|
|
361
|
+
]),
|
|
362
|
+
key: "3"
|
|
363
|
+
} : void 0
|
|
364
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "onGeneratePdf", "onGenerateImage"])) : f("", !0)
|
|
365
|
+
], 14, qe))), 256))
|
|
366
|
+
], 4)), [
|
|
367
|
+
[c(Le), te]
|
|
368
|
+
])
|
|
369
|
+
]),
|
|
370
|
+
p("tbody", null, [
|
|
371
|
+
(s(!0), v(U, null, H(m.value, (a, n) => (s(), v("tr", {
|
|
372
|
+
role: "row",
|
|
373
|
+
style: i({
|
|
374
|
+
backgroundColor: e.value.tbody.backgroundColor,
|
|
375
|
+
color: e.value.tbody.color
|
|
376
|
+
}),
|
|
377
|
+
class: R({ "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 })
|
|
378
|
+
}, [
|
|
379
|
+
p("td", {
|
|
380
|
+
role: "cell",
|
|
381
|
+
style: i({
|
|
382
|
+
backgroundColor: e.value.tbody.backgroundColor,
|
|
383
|
+
border: e.value.tbody.outline,
|
|
384
|
+
fontSize: `${e.value.tbody.fontSize}px`,
|
|
385
|
+
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
386
|
+
textAlign: e.value.tbody.textAlign
|
|
387
|
+
}),
|
|
388
|
+
"data-cell": e.value.translations.serie,
|
|
389
|
+
class: "vue-ui-data-table__tbody__td sticky-col-first"
|
|
390
|
+
}, [
|
|
391
|
+
p("div", {
|
|
392
|
+
dir: "auto",
|
|
393
|
+
style: i({
|
|
394
|
+
display: "flex",
|
|
395
|
+
flexDirection: "row",
|
|
396
|
+
alignItems: "center",
|
|
397
|
+
gap: "6px",
|
|
398
|
+
justifyContent: e.value.tbody.textAlign
|
|
399
|
+
})
|
|
400
|
+
}, [
|
|
401
|
+
e.value.tbody.showColorMarker ? (s(), v("span", {
|
|
402
|
+
key: 0,
|
|
403
|
+
style: i({ color: a.color })
|
|
404
|
+
}, "⬤", 4)) : f("", !0),
|
|
405
|
+
p("span", null, g(a.name ?? "-"), 1)
|
|
406
|
+
], 4)
|
|
407
|
+
], 12, Xe),
|
|
408
|
+
(s(!0), v(U, null, H(ge.value, (u, o) => (s(), v("td", {
|
|
409
|
+
dir: "auto",
|
|
410
|
+
role: "cell",
|
|
411
|
+
ref_for: !0,
|
|
412
|
+
ref_key: "TD",
|
|
413
|
+
ref: W,
|
|
414
|
+
style: i({
|
|
415
|
+
border: e.value.tbody.outline,
|
|
416
|
+
fontSize: `${e.value.tbody.fontSize}px`,
|
|
417
|
+
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
418
|
+
textAlign: e.value.tbody.textAlign,
|
|
419
|
+
background: _.value !== void 0 && o === _.value ? e.value.tbody.selectedColor.useSerieColor ? `${a.color.length > 7 ? a.color.slice(0, -2) : a.color}33` : e.value.tbody.selectedColor.fallback : ""
|
|
420
|
+
}),
|
|
421
|
+
"data-cell": k.value[o],
|
|
422
|
+
class: "vue-ui-data-table__tbody__td",
|
|
423
|
+
onPointerenter: (r) => {
|
|
424
|
+
G.value = n, _.value = o;
|
|
425
|
+
}
|
|
426
|
+
}, g([null, void 0].includes(a.values[o]) ? "-" : c(N)(
|
|
427
|
+
e.value.formatter,
|
|
428
|
+
Number(a.values[o]),
|
|
429
|
+
c(D)({
|
|
430
|
+
p: e.value.prefix,
|
|
431
|
+
v: Number(a.values[o]),
|
|
432
|
+
s: e.value.suffix,
|
|
433
|
+
r: e.value.roundingValues
|
|
434
|
+
}),
|
|
435
|
+
{ datapoint: a, seriesIndex: n, datapointIndex: o }
|
|
436
|
+
)), 45, je))), 256)),
|
|
437
|
+
e.value.showTotal ? (s(), v("td", {
|
|
438
|
+
key: 0,
|
|
439
|
+
dir: "auto",
|
|
440
|
+
role: "cell",
|
|
441
|
+
style: i({
|
|
442
|
+
border: e.value.tbody.outline,
|
|
443
|
+
fontSize: `${e.value.tbody.fontSize}px`,
|
|
444
|
+
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
445
|
+
textAlign: e.value.tbody.textAlign
|
|
446
|
+
}),
|
|
447
|
+
"data-cell": e.value.translations.total,
|
|
448
|
+
class: "vue-ui-data-table__tbody__td"
|
|
449
|
+
}, g(c(N)(
|
|
450
|
+
e.value.formatter,
|
|
451
|
+
a.sum,
|
|
452
|
+
c(D)({
|
|
453
|
+
p: e.value.prefix,
|
|
454
|
+
v: a.sum,
|
|
455
|
+
s: e.value.suffix,
|
|
456
|
+
r: e.value.roundingTotal
|
|
457
|
+
}),
|
|
458
|
+
{ datapoint: a.sum, seriesIndex: n }
|
|
459
|
+
)), 13, Je)) : f("", !0),
|
|
460
|
+
e.value.showAverage ? (s(), v("td", {
|
|
461
|
+
key: 1,
|
|
462
|
+
dir: "auto",
|
|
463
|
+
role: "cell",
|
|
464
|
+
style: i({
|
|
465
|
+
border: e.value.tbody.outline,
|
|
466
|
+
fontSize: `${e.value.tbody.fontSize}px`,
|
|
467
|
+
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
468
|
+
textAlign: e.value.tbody.textAlign
|
|
469
|
+
}),
|
|
470
|
+
"data-cell": e.value.translations.average,
|
|
471
|
+
class: "vue-ui-data-table__tbody__td"
|
|
472
|
+
}, g(c(N)(
|
|
473
|
+
e.value.formatter,
|
|
474
|
+
a.average,
|
|
475
|
+
c(D)({
|
|
476
|
+
p: e.value.prefix,
|
|
477
|
+
v: a.average,
|
|
478
|
+
s: e.value.suffix,
|
|
479
|
+
r: e.value.roundingAverage
|
|
480
|
+
}),
|
|
481
|
+
{ datapoint: a.average, seriesIndex: n }
|
|
482
|
+
)), 13, Ke)) : f("", !0),
|
|
483
|
+
e.value.showMedian ? (s(), v("td", {
|
|
484
|
+
key: 2,
|
|
485
|
+
dir: "auto",
|
|
486
|
+
role: "cell",
|
|
487
|
+
style: i({
|
|
488
|
+
border: e.value.tbody.outline,
|
|
489
|
+
fontSize: `${e.value.tbody.fontSize}px`,
|
|
490
|
+
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
491
|
+
textAlign: e.value.tbody.textAlign
|
|
492
|
+
}),
|
|
493
|
+
"data-cell": e.value.translations.median,
|
|
494
|
+
class: "vue-ui-data-table__tbody__td"
|
|
495
|
+
}, g(c(N)(
|
|
496
|
+
e.value.formatter,
|
|
497
|
+
a.median,
|
|
498
|
+
c(D)({
|
|
499
|
+
p: e.value.prefix,
|
|
500
|
+
v: a.median,
|
|
501
|
+
s: e.value.suffix,
|
|
502
|
+
r: e.value.roundingMedian
|
|
503
|
+
}),
|
|
504
|
+
{ datapoint: a.median, seriesIndex: n }
|
|
505
|
+
)), 13, Qe)) : f("", !0),
|
|
506
|
+
e.value.showSparklines ? (s(), v("td", {
|
|
507
|
+
key: 3,
|
|
508
|
+
role: "cell",
|
|
509
|
+
"data-cell": e.value.translations.chart,
|
|
510
|
+
style: i({
|
|
511
|
+
border: e.value.tbody.outline,
|
|
512
|
+
fontSize: `${e.value.tbody.fontSize}px`,
|
|
513
|
+
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
514
|
+
textAlign: e.value.tbody.textAlign,
|
|
515
|
+
backgroundColor: e.value.tbody.backgroundColor,
|
|
516
|
+
padding: "0"
|
|
517
|
+
}),
|
|
518
|
+
class: "vue-ui-data-table__tbody__td sticky-col"
|
|
519
|
+
}, [
|
|
520
|
+
(s(), z(Ee, {
|
|
521
|
+
key: `sparkline_${n}_${w.value}`,
|
|
522
|
+
onHoverIndex: ({ index: u }) => ye({ dataIndex: u, serieIndex: n }),
|
|
523
|
+
"height-ratio": e.value.sparkline.dimensions.heightRatio,
|
|
524
|
+
"forced-padding": 30,
|
|
525
|
+
dataset: a.sparklineDataset,
|
|
526
|
+
showInfo: !1,
|
|
527
|
+
selectedIndex: _.value,
|
|
528
|
+
config: {
|
|
529
|
+
type: e.value.sparkline.type,
|
|
530
|
+
style: {
|
|
531
|
+
backgroundColor: "transparent",
|
|
532
|
+
animation: {
|
|
533
|
+
show: e.value.sparkline.animation.show && !c(j) && !c(J),
|
|
534
|
+
animationFrames: e.value.sparkline.animation.animationFrames
|
|
535
|
+
},
|
|
536
|
+
line: {
|
|
537
|
+
color: a.color,
|
|
538
|
+
smooth: e.value.sparkline.smooth,
|
|
539
|
+
strokeWidth: e.value.sparkline.strokeWidth
|
|
540
|
+
},
|
|
541
|
+
bar: {
|
|
542
|
+
color: a.color
|
|
543
|
+
},
|
|
544
|
+
area: {
|
|
545
|
+
color: a.color,
|
|
546
|
+
opacity: e.value.sparkline.showArea ? 16 : 0,
|
|
547
|
+
useGradient: e.value.sparkline.useGradient
|
|
548
|
+
},
|
|
549
|
+
verticalIndicator: {
|
|
550
|
+
color: a.color
|
|
551
|
+
},
|
|
552
|
+
plot: {
|
|
553
|
+
radius: 9,
|
|
554
|
+
stroke: e.value.tbody.backgroundColor,
|
|
555
|
+
strokeWidth: 3
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
}, null, 8, ["onHoverIndex", "height-ratio", "dataset", "selectedIndex", "config"]))
|
|
560
|
+
], 12, Ye)) : f("", !0)
|
|
561
|
+
], 6))), 256))
|
|
562
|
+
])
|
|
563
|
+
], 4)
|
|
564
|
+
], 32),
|
|
565
|
+
t.$slots.source ? (s(), v("div", Ze, [
|
|
566
|
+
S(t.$slots, "source", {}, void 0, !0)
|
|
567
|
+
], 512)) : f("", !0)
|
|
568
|
+
], 10, Ue));
|
|
569
|
+
}
|
|
570
|
+
}, st = /* @__PURE__ */ Re(et, [["__scopeId", "data-v-41eb8933"]]);
|
|
571
|
+
export {
|
|
572
|
+
st as default
|
|
573
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-KYU_8xrX.cjs"),Q=require("./Title-URF9hufV.cjs"),A=require("./usePrinter-4Zj_RZ5v.cjs"),Z=require("./vue-ui-skeleton-D6mdHYxB.cjs"),T=require("./useNestedProp-C-g0SLHN.cjs"),ee=require("./PackageVersion-Df1iPzMk.cjs"),te=require("./PenAndPaper-CvGft3ku.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),le=["id"],re={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},ae={key:2,style:"width:100%"},se=["xmlns","viewBox"],ne={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},ue=["fill"],ce=["id"],ie=["stop-color"],de=["stop-color"],he=["stop-color"],ve={"clip-path":"url(#vueUiPill)"},me=["x","y","height","width"],pe=["x","y","height","width","fill"],ye=["x1","x2","y1","y2","stroke-width","stroke"],fe=["x1","x2","y1","y2","stroke-width","stroke"],ke=["x1","x2","y1","y2","stroke-width","stroke"],ge=["x1","x2","y1","y2","stroke-width","stroke"],xe=["x1","x2","y1","y2","stroke-width","stroke"],be=["x1","x2","y1","y2","stroke-width","stroke"],_e=["x1","x2","y1","y2","stroke-width","stroke"],Ce=["x1","x2","y1","y2","stroke-width","stroke"],we=["x","y","height","width"],Ne=["y","x","fill","font-size","font-weight"],Be={key:5,class:"vue-data-ui-watermark"},Pe={key:6,ref:"source",dir:"auto"},Ve={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:Y}){const s=m;e.useCssVars(l=>({"000db494":H.value,"2865ccd0":W.value,10843485:G.value}));const{vue_ui_thermometer:M}=r.useConfig(),k=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{B()});function B(){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()),g=e.ref(null),P=e.ref(0),V=e.ref(0),t=e.computed({get:()=>E(),set:l=>l});function E(){const l=T.useNestedProp({userConfig:s.config,defaultConfig:M});return l.theme?{...T.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(),B(),V.value+=1},{deep:!0});const{isPrinting:$,isImaging:F,generatePdf:I,generateImage:q}=A.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer"}),z=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),L=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 y(l,u,o){const n=[],w=S(l),N=S(u);for(let v=0;v<o;v++){const R=x(w.red,N.red,v,o),X=x(w.green,N.green,v,o),J=x(w.blue,N.blue,v,o),K=`#${b(R)}${b(X)}${b(J)}`;n.push(K)}return n}function S(l){const u=l.slice(1);return{red:parseInt(u.slice(0,2),16),green:parseInt(u.slice(2,4),16),blue:parseInt(u.slice(4,6),16)}}function x(l,u,o,n){return Math.round(l+(u-l)*o/n)}function b(l){return l.toString(16).padStart(2,"0")}const a=e.computed(()=>{const l=L.value+c.value.left+c.value.right,u=t.value.style.chart.height;return{width:l,left:c.value.left,right:l-c.value.right,top:c.value.top,bottom:u-c.value.bottom,height:u}}),U=e.computed(()=>a.value),_=e.computed(()=>{const l=r.checkNaN(s.dataset.from)<0?Math.abs(r.checkNaN(s.dataset.from)):r.checkNaN(s.dataset.from),u=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+u:l>u?o=l-u:o=u-l,(1-(Math.abs(r.checkNaN(s.dataset.from))+r.checkNaN(s.dataset.value))/o)*(a.value.height-c.value.top-c.value.bottom)}),G=e.computed(()=>`${_.value}px`),W=e.computed(()=>`${a.value.height-t.value.style.chart.padding.bottom-c.value.top}px`),H=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),j=e.computed(()=>{if(s.dataset.colors){if(!s.dataset.colors.from)return y(p.value[0]||r.palette[0],r.convertColorToHex(s.dataset.colors.to),i.value||10);if(!s.dataset.colors.to)return y(r.convertColorToHex(s.dataset.colors.from),p.value[1]||r.palette[1],i.value||10)}else return y(p.value[1]||r.palette[1],p.value[0]||r.palette[0],i.value||10);return y(r.convertColorToHex(s.dataset.colors.from),r.convertColorToHex(s.dataset.colors.to),i.value||10)}),O=e.computed(()=>{const l=[];let u=0;const o=a.value.height-c.value.top-c.value.bottom;for(let n=0;n<o-1;n+=o/i.value)l.push({x:a.value.left,y:a.value.top+n,qYLess:a.value.top+n+o/i.value/4,halfY:a.value.top+n+o/i.value/2,qYMore:a.value.top+n+o/i.value/4*3,color:j.value[u],height:o/i.value}),u+=1;return l}),h=e.ref(!1);function D(l){h.value=l,P.value+=1}const f=e.ref(!1);function C(){f.value=!f.value}return Y({generatePdf:I,generateImage:q,toggleAnnotator:C}),(l,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:g,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.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(te.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:f.value,onClose:C},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createElementBlock("div",re,null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",ae,[(e.openBlock(),e.createBlock(Q._sfc_main,{key:`title_${V.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&&k.value?(e.openBlock(),e.createBlock(A.UserOptions,{ref:"details",key:`user_options_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(F),isPrinting:e.unref($),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:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:f.value,onToggleFullscreen:D,onGeneratePdf:e.unref(I),onGenerateImage:e.unref(q),onToggleAnnotator:C},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:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"2"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:4,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.createVNode(ee._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",ne,[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,ue)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,(o,n)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`vueUiThermometerGradient_${n}_${d.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,ie),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(r.setOpacity)(o.color,100-t.value.style.chart.graduations.gradient.intensity)},null,8,de),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,he)],8,ce))),256))]),e.createElementVNode("g",ve,[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,me),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${n}`},[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_${n}_${d.value})`:o.color,"shape-rendering":"crispEdges"},null,8,pe),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,ye)):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,fe)):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,ke)):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,ge)):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,xe)):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,be)):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,_e)):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,Ce)):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:_.value,width:a.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,we)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:_.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,Ne),e.renderSlot(l.$slots,"svg",{svg:U.value},void 0,!0)],10,se)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Be,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref($)||e.unref(F)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Pe,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Z.default,{key:7,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],14,le))}},Ee=oe._export_sfc(Ve,[["__scopeId","data-v-8a73571f"]]);exports.default=Ee;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DOkp6I9s.cjs"),Q=require("./Title-CbiI2XAK.cjs"),A=require("./usePrinter-Hc-LICQf.cjs"),Z=require("./vue-ui-skeleton-G8jk4hcj.cjs"),T=require("./useNestedProp-BEjpLG7g.cjs"),ee=require("./PackageVersion-JL2H1ZNU.cjs"),te=require("./PenAndPaper-Bmfl9PVt.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),le=["id"],re={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},ae={key:2,style:"width:100%"},se=["xmlns","viewBox"],ne={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},ue=["fill"],ce=["id"],ie=["stop-color"],de=["stop-color"],he=["stop-color"],ve={"clip-path":"url(#vueUiPill)"},me=["x","y","height","width"],pe=["x","y","height","width","fill"],ye=["x1","x2","y1","y2","stroke-width","stroke"],fe=["x1","x2","y1","y2","stroke-width","stroke"],ke=["x1","x2","y1","y2","stroke-width","stroke"],ge=["x1","x2","y1","y2","stroke-width","stroke"],xe=["x1","x2","y1","y2","stroke-width","stroke"],be=["x1","x2","y1","y2","stroke-width","stroke"],_e=["x1","x2","y1","y2","stroke-width","stroke"],Ce=["x1","x2","y1","y2","stroke-width","stroke"],we=["x","y","height","width"],Ne=["y","x","fill","font-size","font-weight"],Be={key:5,class:"vue-data-ui-watermark"},Pe={key:6,ref:"source",dir:"auto"},Ve={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:Y}){const s=m;e.useCssVars(l=>({"000db494":H.value,"2865ccd0":W.value,10843485:G.value}));const{vue_ui_thermometer:M}=r.useConfig(),k=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{B()});function B(){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()),g=e.ref(null),P=e.ref(0),V=e.ref(0),t=e.computed({get:()=>E(),set:l=>l});function E(){const l=T.useNestedProp({userConfig:s.config,defaultConfig:M});return l.theme?{...T.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(),B(),V.value+=1},{deep:!0});const{isPrinting:$,isImaging:F,generatePdf:I,generateImage:q}=A.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer"}),z=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),L=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 y(l,u,o){const n=[],w=S(l),N=S(u);for(let v=0;v<o;v++){const R=x(w.red,N.red,v,o),X=x(w.green,N.green,v,o),J=x(w.blue,N.blue,v,o),K=`#${b(R)}${b(X)}${b(J)}`;n.push(K)}return n}function S(l){const u=l.slice(1);return{red:parseInt(u.slice(0,2),16),green:parseInt(u.slice(2,4),16),blue:parseInt(u.slice(4,6),16)}}function x(l,u,o,n){return Math.round(l+(u-l)*o/n)}function b(l){return l.toString(16).padStart(2,"0")}const a=e.computed(()=>{const l=L.value+c.value.left+c.value.right,u=t.value.style.chart.height;return{width:l,left:c.value.left,right:l-c.value.right,top:c.value.top,bottom:u-c.value.bottom,height:u}}),U=e.computed(()=>a.value),_=e.computed(()=>{const l=r.checkNaN(s.dataset.from)<0?Math.abs(r.checkNaN(s.dataset.from)):r.checkNaN(s.dataset.from),u=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+u:l>u?o=l-u:o=u-l,(1-(Math.abs(r.checkNaN(s.dataset.from))+r.checkNaN(s.dataset.value))/o)*(a.value.height-c.value.top-c.value.bottom)}),G=e.computed(()=>`${_.value}px`),W=e.computed(()=>`${a.value.height-t.value.style.chart.padding.bottom-c.value.top}px`),H=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),j=e.computed(()=>{if(s.dataset.colors){if(!s.dataset.colors.from)return y(p.value[0]||r.palette[0],r.convertColorToHex(s.dataset.colors.to),i.value||10);if(!s.dataset.colors.to)return y(r.convertColorToHex(s.dataset.colors.from),p.value[1]||r.palette[1],i.value||10)}else return y(p.value[1]||r.palette[1],p.value[0]||r.palette[0],i.value||10);return y(r.convertColorToHex(s.dataset.colors.from),r.convertColorToHex(s.dataset.colors.to),i.value||10)}),O=e.computed(()=>{const l=[];let u=0;const o=a.value.height-c.value.top-c.value.bottom;for(let n=0;n<o-1;n+=o/i.value)l.push({x:a.value.left,y:a.value.top+n,qYLess:a.value.top+n+o/i.value/4,halfY:a.value.top+n+o/i.value/2,qYMore:a.value.top+n+o/i.value/4*3,color:j.value[u],height:o/i.value}),u+=1;return l}),h=e.ref(!1);function D(l){h.value=l,P.value+=1}const f=e.ref(!1);function C(){f.value=!f.value}return Y({generatePdf:I,generateImage:q,toggleAnnotator:C}),(l,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:g,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.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(te.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:f.value,onClose:C},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createElementBlock("div",re,null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",ae,[(e.openBlock(),e.createBlock(Q._sfc_main,{key:`title_${V.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&&k.value?(e.openBlock(),e.createBlock(A.UserOptions,{ref:"details",key:`user_options_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(F),isPrinting:e.unref($),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:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:f.value,onToggleFullscreen:D,onGeneratePdf:e.unref(I),onGenerateImage:e.unref(q),onToggleAnnotator:C},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:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"2"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:4,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.createVNode(ee._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",ne,[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,ue)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,(o,n)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`vueUiThermometerGradient_${n}_${d.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,ie),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(r.setOpacity)(o.color,100-t.value.style.chart.graduations.gradient.intensity)},null,8,de),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,he)],8,ce))),256))]),e.createElementVNode("g",ve,[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,me),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${n}`},[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_${n}_${d.value})`:o.color,"shape-rendering":"crispEdges"},null,8,pe),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,ye)):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,fe)):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,ke)):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,ge)):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,xe)):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,be)):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,_e)):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,Ce)):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:_.value,width:a.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,we)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:_.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,Ne),e.renderSlot(l.$slots,"svg",{svg:U.value},void 0,!0)],10,se)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Be,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref($)||e.unref(F)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Pe,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Z.default,{key:7,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],14,le))}},Ee=oe._export_sfc(Ve,[["__scopeId","data-v-8a73571f"]]);exports.default=Ee;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useCssVars as ye, computed as h, onMounted as fe, ref as g, watch as ge, openBlock as l, createElementBlock as u, normalizeClass as P, normalizeStyle as me, createBlock as F, createCommentVNode as i, unref as v, createSlots as pe, withCtx as I, renderSlot as m, normalizeProps as G, guardReactiveProps as V, createVNode as ke, createElementVNode as d, Fragment as O, renderList as K, toDisplayString as be } from "vue";
|
|
2
|
-
import { u as _e, o as xe, e as Q, g as we, c as Ce, t as $e, a as Pe, p as _, b as Fe, v as f, d as A, X as Ie, s as Oe, i as Ae, f as Ye } from "./index-
|
|
3
|
-
import { _ as Ne } from "./Title-
|
|
4
|
-
import { u as Me, U as Te } from "./usePrinter-
|
|
5
|
-
import Se from "./vue-ui-skeleton-
|
|
6
|
-
import { u as Z } from "./useNestedProp-
|
|
7
|
-
import { _ as Ue } from "./PackageVersion-
|
|
8
|
-
import { P as qe } from "./PenAndPaper-
|
|
2
|
+
import { u as _e, o as xe, e as Q, g as we, c as Ce, t as $e, a as Pe, p as _, b as Fe, v as f, d as A, X as Ie, s as Oe, i as Ae, f as Ye } from "./index-BepNt4hC.js";
|
|
3
|
+
import { _ as Ne } from "./Title-D5Wtk97z.js";
|
|
4
|
+
import { u as Me, U as Te } from "./usePrinter-DPvuzbZK.js";
|
|
5
|
+
import Se from "./vue-ui-skeleton-Dm5B1MER.js";
|
|
6
|
+
import { u as Z } from "./useNestedProp-DUC6XBU3.js";
|
|
7
|
+
import { _ as Ue } from "./PackageVersion-C26iHVPd.js";
|
|
8
|
+
import { P as qe } from "./PenAndPaper-XF8fq-Km.js";
|
|
9
9
|
import { _ as Le } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
10
|
const Ge = ["id"], Ve = {
|
|
11
11
|
key: 1,
|