vue-data-ui 2.3.28 → 2.3.29
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/README.md +15 -0
- package/dist/{Arrow-C6lQ94rK.cjs → Arrow-B8z06v67.cjs} +1 -1
- package/dist/{Arrow-BPoxM_Tq.js → Arrow-Bh7WeO_g.js} +1 -1
- package/dist/{BaseIcon-Op8_v5x7.js → BaseIcon-BG_bJS3R.js} +1 -1
- package/dist/{BaseIcon-BK5xYOzV.cjs → BaseIcon-DDCJA3rm.cjs} +1 -1
- package/dist/{DataTable-bEXuvNn5.js → DataTable-CsPidn0_.js} +23 -20
- package/dist/DataTable-Doh_4M84.cjs +1 -0
- package/dist/{Legend-BNfS77GS.cjs → Legend-B20rRwGi.cjs} +1 -1
- package/dist/{Legend-DwludSgp.js → Legend-CkQ_zypV.js} +1 -1
- package/dist/{Shape-COYAxpcP.js → Shape-B4gGeBLI.js} +1 -1
- package/dist/{Shape-CcWWIf-s.cjs → Shape-B8O8_E6l.cjs} +1 -1
- package/dist/{Slicer-DGkm-5p-.cjs → Slicer-BXveU40S.cjs} +1 -1
- package/dist/{Slicer-Cv-2s_-r.js → Slicer-DaEfxscP.js} +1 -1
- package/dist/{Title-DQz9dO4d.cjs → Title-BU6E8Xld.cjs} +1 -1
- package/dist/{Title-CtWGLaoz.js → Title-eBTH8iGJ.js} +1 -1
- package/dist/{Tooltip-D6BUVHr1.js → Tooltip-B11OahTD.js} +1 -1
- package/dist/{Tooltip-DQgBkgFk.cjs → Tooltip-Oicp_EIo.cjs} +1 -1
- package/dist/{index-BhCM2QF1.js → index-BlXzlBwZ.js} +443 -364
- package/dist/index-hKWfT7Wa.cjs +4 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +65 -0
- package/dist/types/vue-data-ui.d.ts +65 -0
- package/dist/{useNestedProp-CH3PVhvc.js → useNestedProp-BoNl5H_z.js} +1 -1
- package/dist/{useNestedProp-C2H2jmU6.cjs → useNestedProp-Cggpoz7e.cjs} +1 -1
- package/dist/{usePrinter-B75HLwzw.js → usePrinter-CZ8F5Cth.js} +1 -1
- package/dist/{usePrinter-DTF28E03.cjs → usePrinter-DoYKBzst.cjs} +1 -1
- package/dist/{vue-data-ui-DdhV5Pth.js → vue-data-ui-BOqzG_nZ.js} +57 -57
- package/dist/{vue-data-ui-cqeqQWwY.cjs → vue-data-ui-CGgiWEo3.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +6 -6
- package/dist/{vue-ui-3d-bar-gi0fEJUl.js → vue-ui-3d-bar-CjnVg4YI.js} +342 -294
- package/dist/vue-ui-3d-bar-CpntMt7p.cjs +19 -0
- package/dist/{vue-ui-accordion-CVrj6roI.cjs → vue-ui-accordion-CTYvdLLH.cjs} +1 -1
- package/dist/{vue-ui-accordion-CSZdj7wA.js → vue-ui-accordion-wHRG3nXl.js} +3 -3
- package/dist/vue-ui-age-pyramid-DDiL1Zje.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-CFSWDX3d.js → vue-ui-age-pyramid-vmCwgRy9.js} +258 -219
- package/dist/{vue-ui-annotator-DqZU11ky.js → vue-ui-annotator-9FGJdNLY.js} +1 -1
- package/dist/{vue-ui-annotator-u5YbenPl.cjs → vue-ui-annotator-DQ3wKf9n.cjs} +1 -1
- package/dist/{vue-ui-candlestick-C3xswSm3.cjs → vue-ui-candlestick-6joQ9JKQ.cjs} +1 -1
- package/dist/{vue-ui-candlestick-Dph2PhZC.js → vue-ui-candlestick-DpMr2r0i.js} +9 -9
- package/dist/{vue-ui-carousel-table-0S6lSZnt.cjs → vue-ui-carousel-table-BV0EOLqU.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-eY08SE2G.js → vue-ui-carousel-table-CgR4ADOz.js} +4 -4
- package/dist/{vue-ui-chestnut-BikYCrjQ.js → vue-ui-chestnut-Ca2878kV.js} +439 -347
- package/dist/vue-ui-chestnut-CxoCcw_B.cjs +6 -0
- package/dist/{vue-ui-cursor-OFgeAFSo.js → vue-ui-cursor-BW8C6oUc.js} +2 -2
- package/dist/{vue-ui-cursor-DUA57VkZ.cjs → vue-ui-cursor-DxF_gXQf.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BTG0m9YL.cjs → vue-ui-dashboard-BGrVyITN.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DA4M1Z0-.js → vue-ui-dashboard-DN4nErBZ.js} +2 -2
- package/dist/{vue-ui-digits-55Zmunkv.js → vue-ui-digits-CmSFSs5S.js} +2 -2
- package/dist/{vue-ui-digits-COxRiMVI.cjs → vue-ui-digits-CpSKBG2c.cjs} +1 -1
- package/dist/vue-ui-donut-BqfRwAIM.js +857 -0
- package/dist/vue-ui-donut-C29yXH3H.cjs +1 -0
- package/dist/vue-ui-donut-evolution-COFG73Xl.cjs +1 -0
- package/dist/vue-ui-donut-evolution-DIR7yBUC.js +839 -0
- package/dist/{vue-ui-dumbbell-BSFT-Bce.cjs → vue-ui-dumbbell-1NA60u3h.cjs} +2 -2
- package/dist/{vue-ui-dumbbell-BtEXt5Ox.js → vue-ui-dumbbell-BASuPAvI.js} +202 -187
- package/dist/{vue-ui-flow-BPEGOFRZ.cjs → vue-ui-flow-DBK7d0DQ.cjs} +1 -1
- package/dist/{vue-ui-flow-BBoXBTkC.js → vue-ui-flow-wq0aqc5r.js} +98 -93
- package/dist/vue-ui-galaxy-BgdVvk4N.cjs +1 -0
- package/dist/{vue-ui-galaxy-ZFEufIyy.js → vue-ui-galaxy-CFQ2hQAl.js} +180 -144
- package/dist/{vue-ui-gauge-CfZ9XJW_.cjs → vue-ui-gauge-C4_kEbgg.cjs} +1 -1
- package/dist/{vue-ui-gauge-BqZp_V5m.js → vue-ui-gauge-CIN265dN.js} +158 -149
- package/dist/vue-ui-gizmo-BpT3iwC9.cjs +1 -0
- package/dist/{vue-ui-gizmo-DitbWAJp.js → vue-ui-gizmo-DRXWEpqU.js} +63 -49
- package/dist/vue-ui-heatmap-CVD7FVfk.cjs +1 -0
- package/dist/vue-ui-heatmap-Dc0ft_Ga.js +644 -0
- package/dist/{vue-ui-kpi-BWuzEkyY.js → vue-ui-kpi-DDL1TvBP.js} +19 -10
- package/dist/{vue-ui-kpi-B2Bo26hh.cjs → vue-ui-kpi-WDZIt76s.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BwAWiK3k.js → vue-ui-mini-loader-B2C5U55l.js} +2 -2
- package/dist/{vue-ui-mini-loader-C_Nb-qVd.cjs → vue-ui-mini-loader-BcGSpUfg.cjs} +1 -1
- package/dist/{vue-ui-molecule-CSbXNrvu.cjs → vue-ui-molecule-C5BmRi2R.cjs} +1 -1
- package/dist/{vue-ui-molecule-BD2UW2lJ.js → vue-ui-molecule-CD3cPNOq.js} +9 -9
- package/dist/{vue-ui-mood-radar-CbMab8pJ.js → vue-ui-mood-radar-D0KbeV5j.js} +213 -187
- package/dist/vue-ui-mood-radar-afS64zg-.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-SDaiotgC.js → vue-ui-nested-donuts-BGoc1RFX.js} +295 -228
- package/dist/vue-ui-nested-donuts-D-TeyOtL.cjs +17 -0
- package/dist/{vue-ui-onion-BamHJBdP.js → vue-ui-onion-B_khL0Kv.js} +230 -196
- package/dist/vue-ui-onion-CFdbWLu3.cjs +1 -0
- package/dist/{vue-ui-parallel-coordinate-plot-BaAa3t1h.cjs → vue-ui-parallel-coordinate-plot-BmXvVt8r.cjs} +2 -2
- package/dist/{vue-ui-parallel-coordinate-plot-1R4CyBdQ.js → vue-ui-parallel-coordinate-plot-CP4V0K8m.js} +87 -87
- package/dist/{vue-ui-quadrant-CKCLhAS7.js → vue-ui-quadrant-C1YbjeI7.js} +455 -397
- package/dist/vue-ui-quadrant-C6-A8Gx_.cjs +1 -0
- package/dist/vue-ui-quick-chart-ConXdEsU.cjs +15 -0
- package/dist/vue-ui-quick-chart-CtWhs_2c.js +1374 -0
- package/dist/{vue-ui-radar-BY-y8Mal.js → vue-ui-radar-B2vAPYa7.js} +237 -214
- package/dist/vue-ui-radar-DMJLLVWb.cjs +1 -0
- package/dist/{vue-ui-rating-DGEgzOaB.cjs → vue-ui-rating-DhZ0tltR.cjs} +1 -1
- package/dist/{vue-ui-rating-Bq1SsByA.js → vue-ui-rating-xGz4av68.js} +9 -9
- package/dist/{vue-ui-relation-circle-BPzLP6U6.js → vue-ui-relation-circle-BQK8wMQE.js} +5 -5
- package/dist/{vue-ui-relation-circle-pdZ79G9r.cjs → vue-ui-relation-circle-hb4Q051h.cjs} +1 -1
- package/dist/vue-ui-rings-D1EW3d4M.cjs +2 -0
- package/dist/{vue-ui-rings-C5ce6pEf.js → vue-ui-rings-ZKjhNx5K.js} +191 -162
- package/dist/{vue-ui-scatter-CMetujXJ.js → vue-ui-scatter-CHONk8k0.js} +437 -381
- package/dist/vue-ui-scatter-CMRe2b2K.cjs +1 -0
- package/dist/{vue-ui-screenshot-BqzljUT3.cjs → vue-ui-screenshot-DcKhT745.cjs} +1 -1
- package/dist/{vue-ui-screenshot--2aeIH_x.js → vue-ui-screenshot-DmGe5ptH.js} +6 -6
- package/dist/{vue-ui-skeleton-_VMQ594N.js → vue-ui-skeleton-CJ2R5R6u.js} +37 -37
- package/dist/{vue-ui-skeleton-B5Z4craS.cjs → vue-ui-skeleton-j-IOiy5w.cjs} +1 -1
- package/dist/{vue-ui-smiley-CL-bubXk.cjs → vue-ui-smiley-D5Jn6d5f.cjs} +1 -1
- package/dist/{vue-ui-smiley-Cty3e_yE.js → vue-ui-smiley-DXVcosKR.js} +2 -2
- package/dist/{vue-ui-spark-trend-DT1fMqf_.cjs → vue-ui-spark-trend-CWH3W7h3.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-pgdWTEqG.js → vue-ui-spark-trend-Gg6TxR4m.js} +63 -58
- package/dist/vue-ui-sparkbar-BsoKTXr2.cjs +1 -0
- package/dist/vue-ui-sparkbar-DUx1qVzQ.js +280 -0
- package/dist/{vue-ui-sparkgauge-DdzlyDsm.cjs → vue-ui-sparkgauge-DPusPoRv.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-Dx2gFX6H.js → vue-ui-sparkgauge-xrvp9g87.js} +60 -50
- package/dist/vue-ui-sparkhistogram---JRg2R1.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-Bg_fJsT5.js → vue-ui-sparkhistogram-DzYXMNj8.js} +99 -90
- package/dist/{vue-ui-sparkline-WMI-RgkW.cjs → vue-ui-sparkline-1Z6GnwoN.cjs} +1 -1
- package/dist/{vue-ui-sparkline-BWl_B6LX.js → vue-ui-sparkline-CGWePkVI.js} +114 -105
- package/dist/{vue-ui-sparkstackbar-Skcshn6g.cjs → vue-ui-sparkstackbar-DCc68t8g.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-MMGRG9eS.js → vue-ui-sparkstackbar-DFgeRAbQ.js} +52 -47
- package/dist/{vue-ui-stackbar-NZFO3R77.js → vue-ui-stackbar-B0dWToaf.js} +211 -196
- package/dist/vue-ui-stackbar-Cz0mT8Mo.cjs +15 -0
- package/dist/{vue-ui-strip-plot-CJmCgC_a.js → vue-ui-strip-plot-BFqd-S7c.js} +213 -198
- package/dist/vue-ui-strip-plot-DZt1Wq20.cjs +1 -0
- package/dist/{vue-ui-table-jJ3daLHe.cjs → vue-ui-table-CMvyMuc4.cjs} +1 -1
- package/dist/{vue-ui-table-B-vHHlRw.js → vue-ui-table-DtwEoIzI.js} +9 -9
- package/dist/{vue-ui-table-heatmap-YCyFyq8J.cjs → vue-ui-table-heatmap-3RSMOHkc.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BfzDb2H7.js → vue-ui-table-heatmap-C8b3pE04.js} +12 -12
- package/dist/vue-ui-table-sparkline-BKOaVFtt.cjs +1 -0
- package/dist/vue-ui-table-sparkline-BrqhBv29.js +467 -0
- package/dist/vue-ui-thermometer-CKgIqM5y.cjs +1 -0
- package/dist/{vue-ui-thermometer-CdtG1AoI.js → vue-ui-thermometer-DMkLvJgE.js} +118 -108
- package/dist/{vue-ui-timer-Cb95XSdn.cjs → vue-ui-timer-D7fvoR77.cjs} +1 -1
- package/dist/{vue-ui-timer-DBqMb9iX.js → vue-ui-timer-RA9yfgBk.js} +8 -8
- package/dist/{vue-ui-tiremarks-CHKETcHr.js → vue-ui-tiremarks-B_EncUi6.js} +79 -71
- package/dist/{vue-ui-tiremarks-BqXfvQ4t.cjs → vue-ui-tiremarks-C7y6Mbxe.cjs} +1 -1
- package/dist/{vue-ui-treemap-DxKunHfW.js → vue-ui-treemap-BuGZgQsr.js} +274 -236
- package/dist/vue-ui-treemap-CfngjVUS.cjs +1 -0
- package/dist/vue-ui-vertical-bar-DKbq4bX4.cjs +4 -0
- package/dist/vue-ui-vertical-bar-T4bFd3JF.js +792 -0
- package/dist/vue-ui-waffle-BJFbhWnA.cjs +1 -0
- package/dist/vue-ui-waffle-CrxmrYsV.js +735 -0
- package/dist/{vue-ui-wheel-kMVi976p.cjs → vue-ui-wheel-BDRvKR1Z.cjs} +1 -1
- package/dist/{vue-ui-wheel-4HKXl04I.js → vue-ui-wheel-DOyC7NgR.js} +73 -65
- package/dist/{vue-ui-word-cloud-CrC3iKGd.js → vue-ui-word-cloud-DBxVNlJ3.js} +7 -7
- package/dist/{vue-ui-word-cloud-WgbYJhMF.cjs → vue-ui-word-cloud-Dmcelg3z.cjs} +1 -1
- package/dist/{vue-ui-xy-BN_H7q0X.js → vue-ui-xy-BIbvJSh2.js} +367 -288
- package/dist/vue-ui-xy-CVKaR90p.cjs +3 -0
- package/dist/vue-ui-xy-canvas-2AaNivzI.cjs +9 -0
- package/dist/{vue-ui-xy-canvas-DAY9Ylzs.js → vue-ui-xy-canvas-CXVni3kC.js} +284 -259
- package/package.json +1 -1
- package/dist/DataTable-B4_9ynlY.cjs +0 -1
- package/dist/index-Y23HeR26.cjs +0 -4
- package/dist/vue-ui-3d-bar-BB6yidY7.cjs +0 -19
- package/dist/vue-ui-age-pyramid-CrTadT86.cjs +0 -1
- package/dist/vue-ui-chestnut-C3XOHDgw.cjs +0 -6
- package/dist/vue-ui-donut-CG3VWjnG.js +0 -751
- package/dist/vue-ui-donut-JA9hlLlV.cjs +0 -1
- package/dist/vue-ui-donut-evolution-CA8sDbwX.js +0 -805
- package/dist/vue-ui-donut-evolution-_E0xUI9Y.cjs +0 -1
- package/dist/vue-ui-galaxy-DPrJum3L.cjs +0 -1
- package/dist/vue-ui-gizmo-CrSaW32p.cjs +0 -1
- package/dist/vue-ui-heatmap-CTRjjhmd.cjs +0 -1
- package/dist/vue-ui-heatmap-zV0pg2Q5.js +0 -606
- package/dist/vue-ui-mood-radar-zpxdsZ4u.cjs +0 -1
- package/dist/vue-ui-nested-donuts-07UI_VlW.cjs +0 -16
- package/dist/vue-ui-onion-DiychUul.cjs +0 -1
- package/dist/vue-ui-quadrant-DxLYb8Mk.cjs +0 -1
- package/dist/vue-ui-quick-chart-CAXuRSdm.js +0 -1318
- package/dist/vue-ui-quick-chart-DgCRM6WA.cjs +0 -13
- package/dist/vue-ui-radar-iETP_3US.cjs +0 -1
- package/dist/vue-ui-rings-DdpKT3DJ.cjs +0 -1
- package/dist/vue-ui-scatter-Dsc6RABP.cjs +0 -1
- package/dist/vue-ui-sparkbar-BVQPOz2O.js +0 -257
- package/dist/vue-ui-sparkbar-kfA-BPVJ.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-B5xstgQG.cjs +0 -1
- package/dist/vue-ui-stackbar-DZ0CArmk.cjs +0 -15
- package/dist/vue-ui-strip-plot-Db_dqjd9.cjs +0 -1
- package/dist/vue-ui-table-sparkline-4Qbmxxsy.cjs +0 -1
- package/dist/vue-ui-table-sparkline-DZt-bo2D.js +0 -420
- package/dist/vue-ui-thermometer-HXWDU2wD.cjs +0 -1
- package/dist/vue-ui-treemap-CW9JmJ2d.cjs +0 -1
- package/dist/vue-ui-vertical-bar-83AMwsHD.cjs +0 -4
- package/dist/vue-ui-vertical-bar-DRLwZjIz.js +0 -745
- package/dist/vue-ui-waffle-BRuDxyDU.js +0 -650
- package/dist/vue-ui-waffle-BwUbvdOE.cjs +0 -1
- package/dist/vue-ui-xy-BXfP5pz5.cjs +0 -3
- package/dist/vue-ui-xy-canvas-NrhVgFsv.cjs +0 -9
|
@@ -0,0 +1,467 @@
|
|
|
1
|
+
import { useCssVars as re, ref as d, computed as b, onMounted as ie, openBlock as u, createElementBlock as v, normalizeClass as W, createElementVNode as c, normalizeStyle as r, toDisplayString as p, createCommentVNode as g, Fragment as D, renderList as T, createBlock as M, unref as i, createSlots as de, withCtx as S, renderSlot as A, normalizeProps as ve, guardReactiveProps as ce, nextTick as fe } from "vue";
|
|
2
|
+
import { u as pe, c as me, t as be, a as ge, p as w, b as he, o as ye, e as J, g as _e, d as ke, R as xe, i as $, f as P, q as Ce, r as Ie } from "./index-BlXzlBwZ.js";
|
|
3
|
+
import { u as K } from "./useNestedProp-BoNl5H_z.js";
|
|
4
|
+
import Se from "./vue-ui-sparkline-CGWePkVI.js";
|
|
5
|
+
import Ae from "./BaseIcon-BG_bJS3R.js";
|
|
6
|
+
import { u as we, U as $e } from "./usePrinter-CZ8F5Cth.js";
|
|
7
|
+
import { _ as Pe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
+
const ze = ["id"], Fe = { style: { "z-index": "1", "padding-right": "24px" } }, Oe = ["onClick"], Ne = { style: { display: "flex", "flex-direction": "row", gap: "3px", "align-items": "center" } }, We = ["data-cell"], De = {
|
|
9
|
+
dir: "auto",
|
|
10
|
+
style: { display: "flex", "flex-direction": "row", "align-items": "center", gap: "6px" }
|
|
11
|
+
}, Te = ["data-cell", "onPointerenter"], Me = ["data-cell"], Ve = ["data-cell"], Ee = ["data-cell"], Ge = ["data-cell"], Le = {
|
|
12
|
+
__name: "vue-ui-table-sparkline",
|
|
13
|
+
props: {
|
|
14
|
+
config: {
|
|
15
|
+
type: Object,
|
|
16
|
+
default() {
|
|
17
|
+
return {};
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
dataset: {
|
|
21
|
+
type: Array,
|
|
22
|
+
default() {
|
|
23
|
+
return [];
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
setup(Q, { expose: Y }) {
|
|
28
|
+
const y = Q;
|
|
29
|
+
re((t) => ({
|
|
30
|
+
"328044aa": t.tdo
|
|
31
|
+
}));
|
|
32
|
+
const { vue_ui_table_sparkline: Z } = pe(), z = d(me()), V = d(0), E = d(0), e = b(() => {
|
|
33
|
+
const t = K({
|
|
34
|
+
userConfig: y.config,
|
|
35
|
+
defaultConfig: Z
|
|
36
|
+
});
|
|
37
|
+
return t.theme ? {
|
|
38
|
+
...K({
|
|
39
|
+
userConfig: be.vue_ui_table_sparkline[t.theme] || y.config,
|
|
40
|
+
defaultConfig: t
|
|
41
|
+
}),
|
|
42
|
+
customPalette: ge[t.theme] || w
|
|
43
|
+
} : t;
|
|
44
|
+
}), { isPrinting: G, isImaging: L, generatePdf: R, generateImage: B } = we({
|
|
45
|
+
elementId: `table_${z.value}`,
|
|
46
|
+
fileName: e.value.title.text || "vue-ui-table-sparkline"
|
|
47
|
+
}), j = b(() => he(e.value.customPalette)), x = d(null), U = d(!1), ee = b(() => e.value.responsiveBreakpoint);
|
|
48
|
+
ie(() => {
|
|
49
|
+
ye(y.dataset) && J({
|
|
50
|
+
componentName: "VueUiTableSparkline",
|
|
51
|
+
type: "dataset"
|
|
52
|
+
});
|
|
53
|
+
const t = new ResizeObserver((s) => {
|
|
54
|
+
s.forEach((a) => {
|
|
55
|
+
U.value = a.contentRect.width < ee.value;
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
x.value && t.observe(x.value);
|
|
59
|
+
});
|
|
60
|
+
const H = b(() => (y.dataset.forEach((t, s) => {
|
|
61
|
+
_e({
|
|
62
|
+
datasetObject: t,
|
|
63
|
+
requiredAttributes: ["name", "values"]
|
|
64
|
+
}).forEach((a) => {
|
|
65
|
+
J({
|
|
66
|
+
componentName: "VueUiTableSparkline",
|
|
67
|
+
type: "datasetSerieAttribute",
|
|
68
|
+
property: a,
|
|
69
|
+
index: s
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
}), y.dataset.map((t, s) => {
|
|
73
|
+
const a = (t.values || []).map((n) => isNaN(n) ? 0 : n ?? 0), o = a.reduce((n, l) => n + l, 0);
|
|
74
|
+
return {
|
|
75
|
+
...t,
|
|
76
|
+
values: t.values || [],
|
|
77
|
+
color: ke(t.color) || j.value[s] || w[s] || w[s % w.length],
|
|
78
|
+
sum: o,
|
|
79
|
+
average: o / a.length,
|
|
80
|
+
median: xe(a),
|
|
81
|
+
sparklineDataset: a.map((n, l) => ({
|
|
82
|
+
period: e.value.colNames[l] || `col ${l}`,
|
|
83
|
+
value: n || 0
|
|
84
|
+
}))
|
|
85
|
+
};
|
|
86
|
+
})));
|
|
87
|
+
function te(t) {
|
|
88
|
+
const a = (t[0].values || []).map(
|
|
89
|
+
(n, l) => t.map((f) => f.values[l] || [])
|
|
90
|
+
).map(
|
|
91
|
+
(n) => n.map((l, f) => [l, f]).sort((l, f) => f[0] - l[0]).map((l) => l[1])
|
|
92
|
+
);
|
|
93
|
+
return t.map((n, l) => ({
|
|
94
|
+
...n,
|
|
95
|
+
values: n.values || [],
|
|
96
|
+
orders: a[l]
|
|
97
|
+
}));
|
|
98
|
+
}
|
|
99
|
+
const _ = b(() => te(H.value)), C = d(_.value), ae = b(() => Math.max(...C.value.map((t) => (t.values || []).length))), I = d(void 0), F = d(!1), O = d(void 0), N = d(-1);
|
|
100
|
+
function le() {
|
|
101
|
+
F.value = !1, O.value = void 0, N.value = -1, C.value = _.value;
|
|
102
|
+
}
|
|
103
|
+
function oe(t) {
|
|
104
|
+
F.value = !0, O.value = t;
|
|
105
|
+
const s = _.value.map((l) => l.values[t] || []), a = I.value === t ? 1 : -1;
|
|
106
|
+
N.value = a, t === I.value ? I.value = void 0 : I.value = t;
|
|
107
|
+
const n = s.map((l, f) => [f, l]).sort((l, f) => a * (f[1] - l[1])).map((l) => l[0]).map((l) => _.value[l]);
|
|
108
|
+
C.value = n, E.value += 1;
|
|
109
|
+
}
|
|
110
|
+
const ne = b(() => Math.max(...y.dataset.map((t) => (t.values || []).length))), k = b(() => {
|
|
111
|
+
let t = e.value.colNames;
|
|
112
|
+
if (!t.length)
|
|
113
|
+
for (let a = 0; a < ne.value; a += 1)
|
|
114
|
+
t.push(`col ${a + 1}`);
|
|
115
|
+
e.value.showTotal && (t = [...t, e.value.translations.total]);
|
|
116
|
+
let s;
|
|
117
|
+
return e.value.showAverage && e.value.showMedian ? s = [
|
|
118
|
+
...t,
|
|
119
|
+
e.value.translations.average,
|
|
120
|
+
e.value.translations.median
|
|
121
|
+
] : e.value.showAverage && !e.value.showMedian ? s = [...t, e.value.translations.average] : !e.value.showAverage && e.value.showMedian ? s = [...t, e.value.translations.median] : s = t, e.value.showSparklines ? [...s, e.value.translations.chart] : s;
|
|
122
|
+
}), m = d(void 0), h = d(void 0);
|
|
123
|
+
function se({ dataIndex: t, serieIndex: s }) {
|
|
124
|
+
m.value = t, h.value = s;
|
|
125
|
+
}
|
|
126
|
+
const q = d(!1);
|
|
127
|
+
function ue(t) {
|
|
128
|
+
q.value = t, V.value += 1;
|
|
129
|
+
}
|
|
130
|
+
function X() {
|
|
131
|
+
fe(() => {
|
|
132
|
+
const t = [e.value.translations.serie].concat(k.value), s = H.value.map((n, l) => [
|
|
133
|
+
[n.name],
|
|
134
|
+
n.values,
|
|
135
|
+
[n.sum],
|
|
136
|
+
[n.average],
|
|
137
|
+
[n.median]
|
|
138
|
+
]), a = [t].concat(s), o = Ce(a);
|
|
139
|
+
Ie({
|
|
140
|
+
csvContent: o,
|
|
141
|
+
title: e.value.title.text || "vue-ui-table-sparkline"
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
return Y({
|
|
146
|
+
generatePdf: R,
|
|
147
|
+
generateImage: B,
|
|
148
|
+
generateCsv: X,
|
|
149
|
+
restoreOrder: le
|
|
150
|
+
}), (t, s) => (u(), v("div", {
|
|
151
|
+
ref_key: "tableContainer",
|
|
152
|
+
ref: x,
|
|
153
|
+
class: W({ "vue-ui-responsive": U.value }),
|
|
154
|
+
style: { overflow: "hidden" },
|
|
155
|
+
id: `table_${z.value}`
|
|
156
|
+
}, [
|
|
157
|
+
c("div", {
|
|
158
|
+
style: { overflow: "auto" },
|
|
159
|
+
onPointerleave: s[0] || (s[0] = (a) => {
|
|
160
|
+
h.value = void 0, m.value = void 0;
|
|
161
|
+
})
|
|
162
|
+
}, [
|
|
163
|
+
c("table", {
|
|
164
|
+
class: "vue-ui-data-table",
|
|
165
|
+
style: r({ fontFamily: e.value.fontFamily, position: "relative" })
|
|
166
|
+
}, [
|
|
167
|
+
e.value.title.text ? (u(), v("caption", {
|
|
168
|
+
key: 0,
|
|
169
|
+
style: r({ backgroundColor: e.value.title.backgroundColor })
|
|
170
|
+
}, [
|
|
171
|
+
c("div", {
|
|
172
|
+
style: r({
|
|
173
|
+
fontSize: `${e.value.title.fontSize}px`,
|
|
174
|
+
fontWeight: e.value.title.bold ? "bold" : "normal",
|
|
175
|
+
color: e.value.title.color,
|
|
176
|
+
textAlign: e.value.title.textAlign
|
|
177
|
+
})
|
|
178
|
+
}, p(e.value.title.text), 5),
|
|
179
|
+
e.value.title.subtitle.text ? (u(), v("div", {
|
|
180
|
+
key: 0,
|
|
181
|
+
style: r({
|
|
182
|
+
fontSize: `${e.value.title.subtitle.fontSize}px`,
|
|
183
|
+
fontWeight: e.value.title.subtitle.bold ? "bold" : "normal",
|
|
184
|
+
color: e.value.title.subtitle.color,
|
|
185
|
+
textAlign: e.value.title.textAlign
|
|
186
|
+
})
|
|
187
|
+
}, p(e.value.title.subtitle.text), 5)) : g("", !0)
|
|
188
|
+
], 4)) : g("", !0),
|
|
189
|
+
c("thead", Fe, [
|
|
190
|
+
c("tr", {
|
|
191
|
+
role: "row",
|
|
192
|
+
class: "vue-ui-data-table__thead-row",
|
|
193
|
+
style: r({
|
|
194
|
+
backgroundColor: e.value.thead.backgroundColor,
|
|
195
|
+
color: e.value.thead.color
|
|
196
|
+
})
|
|
197
|
+
}, [
|
|
198
|
+
c("th", {
|
|
199
|
+
role: "cell",
|
|
200
|
+
style: r({
|
|
201
|
+
backgroundColor: e.value.thead.backgroundColor,
|
|
202
|
+
outline: e.value.thead.outline,
|
|
203
|
+
textAlign: e.value.thead.textAlign,
|
|
204
|
+
fontWeight: e.value.thead.bold ? "bold" : "normal"
|
|
205
|
+
}),
|
|
206
|
+
class: "sticky-col-first"
|
|
207
|
+
}, p(e.value.translations.serie), 5),
|
|
208
|
+
(u(!0), v(D, null, T(k.value, (a, o) => (u(), v("th", {
|
|
209
|
+
role: "cell",
|
|
210
|
+
style: r({
|
|
211
|
+
background: e.value.thead.backgroundColor,
|
|
212
|
+
outline: e.value.thead.outline,
|
|
213
|
+
textAlign: e.value.thead.textAlign,
|
|
214
|
+
fontWeight: e.value.thead.bold ? "bold" : "normal",
|
|
215
|
+
minWidth: o === k.value.length - 1 ? "150px" : "",
|
|
216
|
+
cursor: _.value[0].values[o] !== void 0 ? "pointer" : "default"
|
|
217
|
+
}),
|
|
218
|
+
onClick: () => oe(o),
|
|
219
|
+
class: W({ "sticky-col": o === k.value.length - 1 && e.value.showSparklines })
|
|
220
|
+
}, [
|
|
221
|
+
c("div", Ne, [
|
|
222
|
+
c("span", null, p(a), 1),
|
|
223
|
+
F.value && o === O.value && _.value[0].values[o] !== void 0 ? (u(), M(Ae, {
|
|
224
|
+
key: 0,
|
|
225
|
+
size: 18,
|
|
226
|
+
name: N.value === 1 ? "sort" : "sortReverse",
|
|
227
|
+
stroke: e.value.thead.color
|
|
228
|
+
}, null, 8, ["name", "stroke"])) : g("", !0)
|
|
229
|
+
]),
|
|
230
|
+
e.value.userOptions.show && o === k.value.length - 1 ? (u(), M($e, {
|
|
231
|
+
ref_for: !0,
|
|
232
|
+
ref: "details",
|
|
233
|
+
key: `user_option_${V.value}`,
|
|
234
|
+
backgroundColor: e.value.thead.backgroundColor,
|
|
235
|
+
color: e.value.thead.color,
|
|
236
|
+
isPrinting: i(G),
|
|
237
|
+
isImaging: i(L),
|
|
238
|
+
uid: z.value,
|
|
239
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
240
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
241
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
242
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
243
|
+
isFullscreen: q.value,
|
|
244
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
245
|
+
chartElement: x.value,
|
|
246
|
+
onToggleFullscreen: ue,
|
|
247
|
+
onGeneratePdf: i(R),
|
|
248
|
+
onGenerateImage: i(B),
|
|
249
|
+
onGenerateCsv: X
|
|
250
|
+
}, de({ _: 2 }, [
|
|
251
|
+
t.$slots.optionPdf ? {
|
|
252
|
+
name: "optionPdf",
|
|
253
|
+
fn: S(() => [
|
|
254
|
+
A(t.$slots, "optionPdf", {}, void 0, !0)
|
|
255
|
+
]),
|
|
256
|
+
key: "0"
|
|
257
|
+
} : void 0,
|
|
258
|
+
t.$slots.optionCsv ? {
|
|
259
|
+
name: "optionCsv",
|
|
260
|
+
fn: S(() => [
|
|
261
|
+
A(t.$slots, "optionCsv", {}, void 0, !0)
|
|
262
|
+
]),
|
|
263
|
+
key: "1"
|
|
264
|
+
} : void 0,
|
|
265
|
+
t.$slots.optionImg ? {
|
|
266
|
+
name: "optionImg",
|
|
267
|
+
fn: S(() => [
|
|
268
|
+
A(t.$slots, "optionImg", {}, void 0, !0)
|
|
269
|
+
]),
|
|
270
|
+
key: "2"
|
|
271
|
+
} : void 0,
|
|
272
|
+
t.$slots.optionFullscreen ? {
|
|
273
|
+
name: "optionFullscreen",
|
|
274
|
+
fn: S(({ toggleFullscreen: n, isFullscreen: l }) => [
|
|
275
|
+
A(t.$slots, "optionFullscreen", ve(ce({ toggleFullscreen: n, isFullscreen: l })), void 0, !0)
|
|
276
|
+
]),
|
|
277
|
+
key: "3"
|
|
278
|
+
} : void 0
|
|
279
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : g("", !0)
|
|
280
|
+
], 14, Oe))), 256))
|
|
281
|
+
], 4)
|
|
282
|
+
]),
|
|
283
|
+
c("tbody", null, [
|
|
284
|
+
(u(!0), v(D, null, T(C.value, (a, o) => (u(), v("tr", {
|
|
285
|
+
role: "row",
|
|
286
|
+
style: r({
|
|
287
|
+
backgroundColor: e.value.tbody.backgroundColor,
|
|
288
|
+
color: e.value.tbody.color
|
|
289
|
+
}),
|
|
290
|
+
class: W({ "vue-ui-data-table__tbody__row": !0, "vue-ui-data-table__tbody__row-even": o % 2 === 0, "vue-ui-data-table__tbody__row-odd": o % 2 !== 0 })
|
|
291
|
+
}, [
|
|
292
|
+
c("td", {
|
|
293
|
+
role: "cell",
|
|
294
|
+
style: r({
|
|
295
|
+
backgroundColor: e.value.tbody.backgroundColor,
|
|
296
|
+
outline: e.value.tbody.outline,
|
|
297
|
+
fontSize: `${e.value.tbody.fontSize}px`,
|
|
298
|
+
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
299
|
+
textAlign: e.value.tbody.textAlign
|
|
300
|
+
}),
|
|
301
|
+
"data-cell": e.value.translations.serie,
|
|
302
|
+
class: "vue-ui-data-table__tbody__td sticky-col-first"
|
|
303
|
+
}, [
|
|
304
|
+
c("div", De, [
|
|
305
|
+
c("span", {
|
|
306
|
+
style: r({ color: a.color })
|
|
307
|
+
}, "⬤", 4),
|
|
308
|
+
c("span", null, p(a.name ?? "-"), 1)
|
|
309
|
+
])
|
|
310
|
+
], 12, We),
|
|
311
|
+
(u(!0), v(D, null, T(ae.value, (n, l) => (u(), v("td", {
|
|
312
|
+
dir: "auto",
|
|
313
|
+
role: "cell",
|
|
314
|
+
style: r({
|
|
315
|
+
outline: e.value.tbody.outline,
|
|
316
|
+
fontSize: `${e.value.tbody.fontSize}px`,
|
|
317
|
+
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
318
|
+
textAlign: e.value.tbody.textAlign,
|
|
319
|
+
backgroundColor: m.value !== void 0 && h.value !== void 0 && l === m.value && h.value === o ? `${a.color}33` : "",
|
|
320
|
+
borderRadius: m.value !== void 0 && h.value !== void 0 && l === m.value && h.value === o ? "3px" : ""
|
|
321
|
+
}),
|
|
322
|
+
"data-cell": k.value[l],
|
|
323
|
+
class: "vue-ui-data-table__tbody__td",
|
|
324
|
+
onPointerenter: (f) => {
|
|
325
|
+
h.value = o, m.value = l;
|
|
326
|
+
}
|
|
327
|
+
}, p([null, void 0].includes(a.values[l]) ? "-" : i($)(
|
|
328
|
+
e.value.formatter,
|
|
329
|
+
Number(a.values[l]),
|
|
330
|
+
i(P)({
|
|
331
|
+
p: e.value.prefix,
|
|
332
|
+
v: Number(a.values[l]),
|
|
333
|
+
s: e.value.suffix,
|
|
334
|
+
r: e.value.roundingValues
|
|
335
|
+
}),
|
|
336
|
+
{ datapoint: a, seriesIndex: o, datapointIndex: l }
|
|
337
|
+
)), 45, Te))), 256)),
|
|
338
|
+
e.value.showTotal ? (u(), v("td", {
|
|
339
|
+
key: 0,
|
|
340
|
+
dir: "auto",
|
|
341
|
+
role: "cell",
|
|
342
|
+
style: r({
|
|
343
|
+
outline: e.value.tbody.outline,
|
|
344
|
+
fontSize: `${e.value.tbody.fontSize}px`,
|
|
345
|
+
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
346
|
+
textAlign: e.value.tbody.textAlign
|
|
347
|
+
}),
|
|
348
|
+
"data-cell": e.value.translations.total,
|
|
349
|
+
class: "vue-ui-data-table__tbody__td"
|
|
350
|
+
}, p(i($)(
|
|
351
|
+
e.value.formatter,
|
|
352
|
+
a.sum,
|
|
353
|
+
i(P)({
|
|
354
|
+
p: e.value.prefix,
|
|
355
|
+
v: a.sum,
|
|
356
|
+
s: e.value.suffix,
|
|
357
|
+
r: e.value.roundingTotal
|
|
358
|
+
}),
|
|
359
|
+
{ datapoint: a.sum, seriesIndex: o }
|
|
360
|
+
)), 13, Me)) : g("", !0),
|
|
361
|
+
e.value.showAverage ? (u(), v("td", {
|
|
362
|
+
key: 1,
|
|
363
|
+
dir: "auto",
|
|
364
|
+
role: "cell",
|
|
365
|
+
style: r({
|
|
366
|
+
outline: e.value.tbody.outline,
|
|
367
|
+
fontSize: `${e.value.tbody.fontSize}px`,
|
|
368
|
+
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
369
|
+
textAlign: e.value.tbody.textAlign
|
|
370
|
+
}),
|
|
371
|
+
"data-cell": e.value.translations.average,
|
|
372
|
+
class: "vue-ui-data-table__tbody__td"
|
|
373
|
+
}, p(i($)(
|
|
374
|
+
e.value.formatter,
|
|
375
|
+
a.average,
|
|
376
|
+
i(P)({
|
|
377
|
+
p: e.value.prefix,
|
|
378
|
+
v: a.average,
|
|
379
|
+
s: e.value.suffix,
|
|
380
|
+
r: e.value.roundingAverage
|
|
381
|
+
}),
|
|
382
|
+
{ datapoint: a.average, seriesIndex: o }
|
|
383
|
+
)), 13, Ve)) : g("", !0),
|
|
384
|
+
e.value.showMedian ? (u(), v("td", {
|
|
385
|
+
key: 2,
|
|
386
|
+
dir: "auto",
|
|
387
|
+
role: "cell",
|
|
388
|
+
style: r({
|
|
389
|
+
outline: e.value.tbody.outline,
|
|
390
|
+
fontSize: `${e.value.tbody.fontSize}px`,
|
|
391
|
+
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
392
|
+
textAlign: e.value.tbody.textAlign
|
|
393
|
+
}),
|
|
394
|
+
"data-cell": e.value.translations.median,
|
|
395
|
+
class: "vue-ui-data-table__tbody__td"
|
|
396
|
+
}, p(i($)(
|
|
397
|
+
e.value.formatter,
|
|
398
|
+
a.median,
|
|
399
|
+
i(P)({
|
|
400
|
+
p: e.value.prefix,
|
|
401
|
+
v: a.median,
|
|
402
|
+
s: e.value.suffix,
|
|
403
|
+
r: e.value.roundingMedian
|
|
404
|
+
}),
|
|
405
|
+
{ datapoint: a.median, seriesIndex: o }
|
|
406
|
+
)), 13, Ee)) : g("", !0),
|
|
407
|
+
e.value.showSparklines ? (u(), v("td", {
|
|
408
|
+
key: 3,
|
|
409
|
+
role: "cell",
|
|
410
|
+
"data-cell": e.value.translations.chart,
|
|
411
|
+
style: r({
|
|
412
|
+
outline: e.value.tbody.outline,
|
|
413
|
+
fontSize: `${e.value.tbody.fontSize}px`,
|
|
414
|
+
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
415
|
+
textAlign: e.value.tbody.textAlign
|
|
416
|
+
}),
|
|
417
|
+
class: "vue-ui-data-table__tbody__td sticky-col"
|
|
418
|
+
}, [
|
|
419
|
+
(u(), M(Se, {
|
|
420
|
+
key: `sparkline_${o}_${E.value}`,
|
|
421
|
+
onHoverIndex: ({ index: n }) => se({ dataIndex: n, serieIndex: o }),
|
|
422
|
+
dataset: a.sparklineDataset,
|
|
423
|
+
showInfo: !1,
|
|
424
|
+
selectedIndex: m.value,
|
|
425
|
+
config: {
|
|
426
|
+
type: e.value.sparkline.type,
|
|
427
|
+
style: {
|
|
428
|
+
backgroundColor: e.value.tbody.backgroundColor,
|
|
429
|
+
animation: {
|
|
430
|
+
show: e.value.sparkline.animation.show && !i(G) && !i(L),
|
|
431
|
+
animationFrames: e.value.sparkline.animation.animationFrames
|
|
432
|
+
},
|
|
433
|
+
line: {
|
|
434
|
+
color: a.color,
|
|
435
|
+
smooth: e.value.sparkline.smooth,
|
|
436
|
+
strokeWidth: e.value.sparkline.strokeWidth
|
|
437
|
+
},
|
|
438
|
+
bar: {
|
|
439
|
+
color: a.color
|
|
440
|
+
},
|
|
441
|
+
area: {
|
|
442
|
+
color: a.color,
|
|
443
|
+
opacity: e.value.sparkline.showArea ? 16 : 0,
|
|
444
|
+
useGradient: e.value.sparkline.useGradient
|
|
445
|
+
},
|
|
446
|
+
verticalIndicator: {
|
|
447
|
+
color: a.color
|
|
448
|
+
},
|
|
449
|
+
plot: {
|
|
450
|
+
radius: 9,
|
|
451
|
+
stroke: e.value.tbody.backgroundColor,
|
|
452
|
+
strokeWidth: 3
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
}, null, 8, ["onHoverIndex", "dataset", "selectedIndex", "config"]))
|
|
457
|
+
], 12, Ge)) : g("", !0)
|
|
458
|
+
], 6))), 256))
|
|
459
|
+
])
|
|
460
|
+
], 4)
|
|
461
|
+
], 32)
|
|
462
|
+
], 10, ze));
|
|
463
|
+
}
|
|
464
|
+
}, Ke = /* @__PURE__ */ Pe(Le, [["__scopeId", "data-v-d3c784ed"]]);
|
|
465
|
+
export {
|
|
466
|
+
Ke as default
|
|
467
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-hKWfT7Wa.cjs"),A=require("./Title-BU6E8Xld.cjs"),F=require("./usePrinter-DoYKBzst.cjs"),D=require("./vue-ui-skeleton-j-IOiy5w.cjs"),I=require("./useNestedProp-Cggpoz7e.cjs"),R=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),X=["id"],J={key:0,style:"width:100%"},K=["xmlns","viewBox"],Q={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},Z=["fill"],ee=["id"],te=["stop-color"],oe=["stop-color"],le=["stop-color"],re={"clip-path":"url(#vueUiPill)"},ae=["x","y","height","width"],se=["x","y","height","width","fill"],ne=["x1","x2","y1","y2","stroke-width","stroke"],ue=["x1","x2","y1","y2","stroke-width","stroke"],ie=["x1","x2","y1","y2","stroke-width","stroke"],ce=["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=["x","y","height","width"],pe=["y","x","fill","font-size","font-weight"],fe={key:3,class:"vue-data-ui-watermark"},ge={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:q}){const a=m;e.useCssVars(l=>({"3d1a25cf":z.value,"52cc1c9f":O.value,"90b36568":M.value}));const{vue_ui_thermometer:S}=s.useConfig(),f=e.computed(()=>!!a.dataset&&Object.keys(a.dataset).length);e.onMounted(()=>{s.objectIsEmpty(a.dataset)?s.error({componentName:"VueUiThermometer",type:"dataset"}):s.getMissingDatasetAttributes({datasetObject:a.dataset,requiredAttributes:["value","from","to"]}).forEach(l=>{s.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:l})})});const d=e.ref(s.createUid()),w=e.ref(null),C=e.ref(0),t=e.computed(()=>{const l=I.useNestedProp({userConfig:a.config,defaultConfig:S});return l.theme?{...I.useNestedProp({userConfig:s.themes.vue_ui_thermometer[l.theme]||a.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}),{isPrinting:B,isImaging:N,generatePdf:E,generateImage:V}=F.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer"}),y=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),T=e.computed(()=>t.value.style.chart.thermometer.width),c=e.computed(()=>a.dataset.steps||10),i=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=P(l),_=P(n);for(let v=0;v<o;v++){const G=g(b.red,_.red,v,o),W=g(b.green,_.green,v,o),H=g(b.blue,_.blue,v,o),j=`#${k(G)}${k(W)}${k(H)}`;u.push(j)}return u}function P(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 r=e.computed(()=>{const l=T.value+i.value.left+i.value.right,n=t.value.style.chart.height;return{width:l,left:i.value.left,right:l-i.value.right,top:i.value.top,bottom:n-i.value.bottom,height:n}}),Y=e.computed(()=>r.value),x=e.computed(()=>{const l=a.dataset.from<0?Math.abs(a.dataset.from):a.dataset.from,n=a.dataset.to<0?Math.abs(a.dataset.to):a.dataset.to;let o=0;return a.dataset.to>0?o=l+n:l>n?o=l-n:o=n-l,(1-(Math.abs(a.dataset.from)+a.dataset.value)/o)*(r.value.height-i.value.top-i.value.bottom)}),M=e.computed(()=>`${x.value}px`),O=e.computed(()=>`${r.value.height-t.value.style.chart.padding.bottom-i.value.top}px`),z=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),L=e.computed(()=>{if(a.dataset.colors){if(!a.dataset.colors.from)return p(y.value[0]||s.palette[0],s.convertColorToHex(a.dataset.colors.to),c.value||10);if(!a.dataset.colors.to)return p(s.convertColorToHex(a.dataset.colors.from),y.value[1]||s.palette[1],c.value||10)}else return p(y.value[1]||s.palette[1],y.value[0]||s.palette[0],c.value||10);return p(s.convertColorToHex(a.dataset.colors.from),s.convertColorToHex(a.dataset.colors.to),c.value||10)}),$=e.computed(()=>{const l=[];let n=0;const o=r.value.height-i.value.top-i.value.bottom;for(let u=0;u<o-1;u+=o/c.value)l.push({x:r.value.left,y:r.value.top+u,qYLess:r.value.top+u+o/c.value/4,halfY:r.value.top+u+o/c.value/2,qYMore:r.value.top+u+o/c.value/4*3,color:L.value[n],height:o/c.value}),n+=1;return l}),h=e.ref(!1);function U(l){h.value=l,C.value+=1}return q({generatePdf:E,generateImage:V}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:w,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",J,[e.createVNode(A._sfc_main,{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(F.UserOptions,{ref:"details",key:`user_options_${C.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(N),isPrinting:e.unref(B),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:w.value,onToggleFullscreen:U,onGeneratePdf:e.unref(E),onGenerateImage:e.unref(V)},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","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),width:"100%",viewBox:`0 0 ${r.value.width} ${r.value.height}`,style:e.normalizeStyle(`background:${t.value.style.chart.backgroundColor}`)},[e.createElementVNode("defs",null,[e.createElementVNode("clipPath",Q,[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,Z)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.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,te),e.createElementVNode("stop",{offset:"50%","stop-color":`${o.color}${e.unref(s.opacity)[100-t.value.style.chart.graduations.gradient.intensity]}`},null,8,oe),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,le)],8,ee))),256))]),e.createElementVNode("g",re,[e.createElementVNode("rect",{x:r.value.left,y:r.value.top,height:r.value.height-i.value.top-i.value.bottom,width:r.value.width-i.value.left-i.value.right,fill:"#FFFFFF"},null,8,ae),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(o,u)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${u}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:r.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,se),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,ne)):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,ue)):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,ie)):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,ce)):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:r.value.right,x2:r.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,de)):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:r.value.right,x2:r.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,he)):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:r.value.right,x2:r.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,ve)):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:r.value.right,x2:r.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,me)):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:r.value.left,y:r.value.top,height:x.value,width:r.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,ye)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:x.value+r.value.top+t.value.style.chart.label.fontSize/3,x:r.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(s.applyDataLabel)(t.value.style.chart.label.formatter,m.dataset.value,e.unref(s.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,pe),e.renderSlot(l.$slots,"svg",{svg:Y.value},void 0,!0)],14,K)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",fe,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(B)||e.unref(N)})),void 0,!0)])):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(D.default,{key:4,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],14,X))}},ke=R._export_sfc(ge,[["__scopeId","data-v-1375e978"]]);exports.default=ke;
|