vue-data-ui 2.4.51 → 2.4.53
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-2a_SwBgz.cjs → Arrow-BGjtcB03.cjs} +1 -1
- package/dist/{Arrow-BUz63pb2.js → Arrow-XbzVXHDF.js} +1 -1
- package/dist/{BaseIcon-CmiukQBl.js → BaseIcon-CiQzR1fE.js} +1 -1
- package/dist/{BaseIcon-BASl_NFX.cjs → BaseIcon-DGRZS55E.cjs} +1 -1
- package/dist/{DataTable-G3ICK-5h.cjs → DataTable-DWQiMziO.cjs} +1 -1
- package/dist/{DataTable-DGf6RrOJ.js → DataTable-jvL0XGWl.js} +2 -2
- package/dist/{Legend-BiuPlEMg.cjs → Legend-BstxUr4T.cjs} +1 -1
- package/dist/{Legend-BLaZxMge.js → Legend-DcIfRSNC.js} +1 -1
- package/dist/{PackageVersion-Bj34UNnQ.cjs → PackageVersion-CeJ2R9gK.cjs} +1 -1
- package/dist/{PackageVersion-CxJghxYD.js → PackageVersion-Ve0s76sL.js} +1 -1
- package/dist/{PenAndPaper-D9yQnc0e.cjs → PenAndPaper-DQPbe0G_.cjs} +1 -1
- package/dist/{PenAndPaper-ZdZEumki.js → PenAndPaper-IHG7xTmx.js} +3 -3
- package/dist/{Shape-yducHWd0.cjs → Shape-Bzx4qKcd.cjs} +1 -1
- package/dist/{Shape-DIKzzpFm.js → Shape-Rg6yW7m3.js} +1 -1
- package/dist/{Slicer-Cxdl3cDt.js → Slicer-CP2Z31Lc.js} +2 -2
- package/dist/{Slicer-BHS9W4MJ.cjs → Slicer-CPp7_WWa.cjs} +1 -1
- package/dist/{Title-Bk_55doC.cjs → Title-CSyDhu3S.cjs} +1 -1
- package/dist/{Title-aSAft5dl.js → Title-DLo3Zo2_.js} +1 -1
- package/dist/{Tooltip-smutPF--.js → Tooltip-CA1QhFeE.js} +1 -1
- package/dist/{Tooltip-G7ENx87_.cjs → Tooltip-D88h1zvE.cjs} +1 -1
- package/dist/{index-DhDYBLBe.cjs → index-C3wsuQ2C.cjs} +1 -1
- package/dist/{index-BbPeL8Gp.js → index-DhxnZ6ZS.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-BN8claGG.js → useNestedProp-BcqToEU0.js} +1 -1
- package/dist/{useNestedProp-BphUExEh.cjs → useNestedProp-CFwQtnNB.cjs} +1 -1
- package/dist/{usePrinter-2_QjJFdH.cjs → usePrinter-Dglf1bsw.cjs} +1 -1
- package/dist/{usePrinter-DaybDVqP.js → usePrinter-mDGfOQZA.js} +1 -1
- package/dist/{vue-data-ui-C5vsHRHD.cjs → vue-data-ui-BM5qFlPf.cjs} +1 -1
- package/dist/{vue-data-ui-Ckbp-yIf.js → vue-data-ui-C6tJVggL.js} +60 -60
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-wDYs3sVe.js → vue-ui-3d-bar-BFzCyxbR.js} +30 -30
- package/dist/{vue-ui-3d-bar-DUgumRsg.cjs → vue-ui-3d-bar-DiL5x37F.cjs} +2 -2
- package/dist/{vue-ui-accordion-5d5iVpr7.js → vue-ui-accordion-DDp8hUlk.js} +3 -3
- package/dist/{vue-ui-accordion-B7tNzRWB.cjs → vue-ui-accordion-kv5FuXqU.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-BH1khaaq.js → vue-ui-age-pyramid-ORFLMq65.js} +42 -42
- package/dist/vue-ui-age-pyramid-xYMc6DPS.cjs +1 -0
- package/dist/{vue-ui-annotator-B9VKE_qz.js → vue-ui-annotator-CYyuSx8D.js} +1 -1
- package/dist/{vue-ui-annotator-jXkB5XnD.cjs → vue-ui-annotator-J_Ssv585.cjs} +1 -1
- package/dist/vue-ui-bullet-BbOqOHbK.cjs +34 -0
- package/dist/{vue-ui-bullet-BLi9CSZw.js → vue-ui-bullet-D8w5qQKc.js} +41 -41
- package/dist/{vue-ui-candlestick-Bjz1uFbv.js → vue-ui-candlestick-B7jJlgII.js} +61 -61
- package/dist/{vue-ui-candlestick-Da4ygGXR.cjs → vue-ui-candlestick-BbKj6Lt5.cjs} +2 -2
- package/dist/{vue-ui-carousel-table-B6zgTL-W.js → vue-ui-carousel-table-3ntrCePt.js} +50 -50
- package/dist/vue-ui-carousel-table-Cazhvs3E.cjs +1 -0
- package/dist/{vue-ui-chestnut-C_N7EbjQ.cjs → vue-ui-chestnut-DyFTfNZi.cjs} +3 -3
- package/dist/{vue-ui-chestnut-D5HpkuIa.js → vue-ui-chestnut-apUInPn_.js} +66 -66
- package/dist/{vue-ui-cursor-DZNIbvR2.js → vue-ui-cursor-CFTO66GQ.js} +2 -2
- package/dist/{vue-ui-cursor-A_siHYBc.cjs → vue-ui-cursor-CsNO0-Tw.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DCqe4BZg.js → vue-ui-dashboard-C-pDSWwi.js} +2 -2
- package/dist/{vue-ui-dashboard-BfPJyiY9.cjs → vue-ui-dashboard-DddJvm7i.cjs} +1 -1
- package/dist/{vue-ui-digits-BEhLa3jI.cjs → vue-ui-digits-DSqN9pA7.cjs} +1 -1
- package/dist/{vue-ui-digits-BEWCnojc.js → vue-ui-digits-DWAbSFx3.js} +2 -2
- package/dist/{vue-ui-donut-g5ZLhYPx.js → vue-ui-donut-DSeDfu4H.js} +57 -57
- package/dist/vue-ui-donut-DrAes-Cb.cjs +1 -0
- package/dist/vue-ui-donut-evolution-CYtTDj7r.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-Cu6dmlT2.js → vue-ui-donut-evolution-D7h33-ti.js} +66 -66
- package/dist/vue-ui-dumbbell-DAK7iUrl.cjs +9 -0
- package/dist/{vue-ui-dumbbell-bb4-Ep6o.js → vue-ui-dumbbell-LF5uy2pG.js} +46 -46
- package/dist/{vue-ui-flow-hD0F6mTK.js → vue-ui-flow-ClPKB4R5.js} +43 -43
- package/dist/vue-ui-flow-u3UVnWTH.cjs +1 -0
- package/dist/{vue-ui-funnel-hcbE4yky.js → vue-ui-funnel-BIXUXI8z.js} +59 -59
- package/dist/vue-ui-funnel-BY7rqfpW.cjs +1 -0
- package/dist/{vue-ui-galaxy-ByKjxVWV.js → vue-ui-galaxy-CEnGrqn3.js} +54 -54
- package/dist/vue-ui-galaxy-DBnbXO8c.cjs +1 -0
- package/dist/{vue-ui-gauge-PGirbe6O.js → vue-ui-gauge-C7Qchm0R.js} +70 -70
- package/dist/vue-ui-gauge-CJYWRyeq.cjs +1 -0
- package/dist/{vue-ui-gizmo-CHMApil6.cjs → vue-ui-gizmo-C9_Ciat_.cjs} +1 -1
- package/dist/{vue-ui-gizmo-ChSfBYZ_.js → vue-ui-gizmo-CKZRt29V.js} +3 -3
- package/dist/{vue-ui-heatmap-CK3FIWpo.js → vue-ui-heatmap-BlbOJnS0.js} +87 -87
- package/dist/vue-ui-heatmap-olBNo_Ui.cjs +1 -0
- package/dist/{vue-ui-history-plot-EmQ-Byiz.js → vue-ui-history-plot-CBpL_OyR.js} +75 -75
- package/dist/vue-ui-history-plot-Cyd53pxt.cjs +1 -0
- package/dist/{vue-ui-kpi-DjC68pSz.js → vue-ui-kpi-C2XDua17.js} +3 -3
- package/dist/{vue-ui-kpi-BdungaO2.cjs → vue-ui-kpi-CkcQ40VT.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-jwL_pZjb.cjs → vue-ui-mini-loader-CpeOqmXd.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-CzrblCCD.js → vue-ui-mini-loader-DXF2Zpi6.js} +2 -2
- package/dist/{vue-ui-molecule-DBQJQs4Y.js → vue-ui-molecule-ekgpnwl8.js} +52 -52
- package/dist/vue-ui-molecule-qQjh4AkD.cjs +1 -0
- package/dist/{vue-ui-mood-radar-Ca9wPZpJ.js → vue-ui-mood-radar-CV30YU_f.js} +35 -35
- package/dist/vue-ui-mood-radar-KoW8hhxL.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-DEdS6dpj.cjs → vue-ui-nested-donuts-AkaYvLCi.cjs} +2 -2
- package/dist/{vue-ui-nested-donuts-C8at93dN.js → vue-ui-nested-donuts-DZ_eS-bB.js} +90 -90
- package/dist/{vue-ui-onion-B2ioudP5.cjs → vue-ui-onion-Bl1UUCFU.cjs} +2 -2
- package/dist/{vue-ui-onion-B-PXxNu6.js → vue-ui-onion-YfHn7AeD.js} +52 -52
- package/dist/{vue-ui-parallel-coordinate-plot-ByM3So9k.js → vue-ui-parallel-coordinate-plot-BEqbS5A6.js} +62 -62
- package/dist/{vue-ui-parallel-coordinate-plot-DtJi9cT0.cjs → vue-ui-parallel-coordinate-plot-Dv_UD2bi.cjs} +2 -2
- package/dist/{vue-ui-quadrant-BqOJBcsI.js → vue-ui-quadrant-BU_pD15l.js} +50 -50
- package/dist/vue-ui-quadrant-DO6afeTp.cjs +1 -0
- package/dist/{vue-ui-quick-chart-Bt9KA82P.cjs → vue-ui-quick-chart-ByDBV3lo.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-BfXxT3KM.js → vue-ui-quick-chart-U-1paiOI.js} +9 -9
- package/dist/{vue-ui-radar-BKpD9xDr.js → vue-ui-radar-B5FUXS1e.js} +59 -59
- package/dist/vue-ui-radar-DLsIiPBR.cjs +1 -0
- package/dist/{vue-ui-rating-BE545aI4.cjs → vue-ui-rating-D4-ebrWA.cjs} +1 -1
- package/dist/{vue-ui-rating-DQRuqev5.js → vue-ui-rating-DcCUrP6L.js} +2 -2
- package/dist/{vue-ui-relation-circle-nZ2nBpWX.js → vue-ui-relation-circle-2i7B4Yf-.js} +56 -56
- package/dist/vue-ui-relation-circle-jPx6gmw1.cjs +1 -0
- package/dist/{vue-ui-rings-B7JzZ3ub.cjs → vue-ui-rings-6JF72UH8.cjs} +2 -2
- package/dist/{vue-ui-rings-C1PV0873.js → vue-ui-rings-DG0DQD21.js} +65 -65
- package/dist/vue-ui-scatter-CfbMuDQy.cjs +1 -0
- package/dist/{vue-ui-scatter-dgs1m3-2.js → vue-ui-scatter-j6SU-TUb.js} +102 -102
- package/dist/{vue-ui-screenshot-Dxj0l8Jg.js → vue-ui-screenshot-B6hhgFz_.js} +1 -1
- package/dist/{vue-ui-screenshot--cHV0jG3.cjs → vue-ui-screenshot-BKfP266_.cjs} +1 -1
- package/dist/{vue-ui-skeleton-lkPDknHn.cjs → vue-ui-skeleton-99lBQ_mF.cjs} +1 -1
- package/dist/{vue-ui-skeleton-Bniq21d9.js → vue-ui-skeleton-pdtGfiV6.js} +3 -3
- package/dist/{vue-ui-smiley-CozXoiti.cjs → vue-ui-smiley-8UembS7P.cjs} +1 -1
- package/dist/{vue-ui-smiley-D4DAZIpA.js → vue-ui-smiley-fOlIEhGS.js} +2 -2
- package/dist/{vue-ui-spark-trend-ZqrwhwqS.js → vue-ui-spark-trend-BkPSkOrh.js} +5 -5
- package/dist/{vue-ui-spark-trend-CSqyvI_K.cjs → vue-ui-spark-trend-CV5Uq241.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-Bph8KIjk.cjs → vue-ui-sparkbar-DUNqm_AP.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-q0G4GvFm.js → vue-ui-sparkbar-qB9reaJo.js} +4 -4
- package/dist/{vue-ui-sparkgauge-nSAW83dN.cjs → vue-ui-sparkgauge-D0hLQuMH.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-DA_h9jcN.js → vue-ui-sparkgauge-Mmm3mt-c.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-B1WyBiq_.js → vue-ui-sparkhistogram-9yQ-E0co.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-BLYhRNpt.cjs → vue-ui-sparkhistogram-CuB-M26R.cjs} +1 -1
- package/dist/{vue-ui-sparkline-ccfl0s3m.js → vue-ui-sparkline-D_QkkgS-.js} +4 -4
- package/dist/{vue-ui-sparkline-PNix1-R9.cjs → vue-ui-sparkline-Du8Hm28x.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-PNKwVRu8.js → vue-ui-sparkstackbar-BDubVDPN.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-DpuvEumy.cjs → vue-ui-sparkstackbar-B_I1tmuS.cjs} +1 -1
- package/dist/vue-ui-stackbar-DHnilreT.cjs +6 -0
- package/dist/{vue-ui-stackbar-BBYnF8qm.js → vue-ui-stackbar-rNiqr7aF.js} +43 -43
- package/dist/{vue-ui-strip-plot-TVlnzXFq.js → vue-ui-strip-plot-DPn3qgdB.js} +78 -78
- package/dist/vue-ui-strip-plot-DlRej1u9.cjs +1 -0
- package/dist/{vue-ui-table-CsEajH9S.js → vue-ui-table-BrZ__Cd2.js} +1 -1
- package/dist/{vue-ui-table-CHdv3KuM.cjs → vue-ui-table-DLcFdjyM.cjs} +1 -1
- package/dist/vue-ui-table-heatmap-DIkXPyqe.cjs +1 -0
- package/dist/{vue-ui-table-heatmap-CubRipoB.js → vue-ui-table-heatmap-DQXI2uPZ.js} +38 -38
- package/dist/vue-ui-table-sparkline-BUNsAEVY.js +647 -0
- package/dist/vue-ui-table-sparkline-BazGMr3R.cjs +1 -0
- package/dist/{vue-ui-thermometer-DmMjSLc1.js → vue-ui-thermometer-DMkD9fS8.js} +74 -74
- package/dist/vue-ui-thermometer-_gbnwB1j.cjs +1 -0
- package/dist/{vue-ui-timer-DteYgv9y.cjs → vue-ui-timer-BTfgxjIc.cjs} +1 -1
- package/dist/{vue-ui-timer-DvE_nqd9.js → vue-ui-timer-Dv-GSUf1.js} +5 -5
- package/dist/{vue-ui-tiremarks-CCrkDgjX.js → vue-ui-tiremarks-CEMrBJPF.js} +46 -46
- package/dist/vue-ui-tiremarks-Ct9y13Sl.cjs +1 -0
- package/dist/vue-ui-treemap-D7SBHWJ2.cjs +1 -0
- package/dist/{vue-ui-treemap-C4A4spvg.js → vue-ui-treemap-D8AkLDqM.js} +91 -91
- package/dist/{vue-ui-vertical-bar-8iL1xiaz.js → vue-ui-vertical-bar-BnhysoC9.js} +67 -67
- package/dist/{vue-ui-vertical-bar-B60lSXNq.cjs → vue-ui-vertical-bar-_EQI8SXm.cjs} +2 -2
- package/dist/vue-ui-waffle-DOhi1BWD.cjs +1 -0
- package/dist/{vue-ui-waffle-CaYNz-Kd.js → vue-ui-waffle-DfRmWfrG.js} +48 -48
- package/dist/vue-ui-wheel-BbDtndmW.cjs +1 -0
- package/dist/{vue-ui-wheel-BRR2rGou.js → vue-ui-wheel-CU6-VBD1.js} +36 -36
- package/dist/vue-ui-word-cloud-CRarnngT.cjs +1 -0
- package/dist/{vue-ui-word-cloud-y2GGxwoq.js → vue-ui-word-cloud-CbuHwEkP.js} +66 -66
- package/dist/{vue-ui-xy-CbM75yXK.cjs → vue-ui-xy-BRTegbdr.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-D7MrUJj7.js → vue-ui-xy-canvas-DsTqLLWp.js} +53 -53
- package/dist/{vue-ui-xy-canvas-DWvIvSry.cjs → vue-ui-xy-canvas-hn3ncIFk.cjs} +2 -2
- package/dist/{vue-ui-xy-CXoWP8bh.js → vue-ui-xy-pSvq591u.js} +14 -14
- package/package.json +1 -1
- package/dist/vue-ui-age-pyramid-Dxx1mVwR.cjs +0 -1
- package/dist/vue-ui-bullet-QrXtipbT.cjs +0 -34
- package/dist/vue-ui-carousel-table-Cfif8Oiz.cjs +0 -1
- package/dist/vue-ui-donut-By3QRfkV.cjs +0 -1
- package/dist/vue-ui-donut-evolution-DEABWsj0.cjs +0 -1
- package/dist/vue-ui-dumbbell-Dfb1l5qP.cjs +0 -9
- package/dist/vue-ui-flow-CCvTnu7z.cjs +0 -1
- package/dist/vue-ui-funnel-DKxAPRi_.cjs +0 -1
- package/dist/vue-ui-galaxy-D2kmqwpI.cjs +0 -1
- package/dist/vue-ui-gauge-BFA_unjg.cjs +0 -1
- package/dist/vue-ui-heatmap-C0VxwPhr.cjs +0 -1
- package/dist/vue-ui-history-plot-BmGodgUx.cjs +0 -1
- package/dist/vue-ui-molecule-Dzh-0SWI.cjs +0 -1
- package/dist/vue-ui-mood-radar-DV6ZZIXF.cjs +0 -1
- package/dist/vue-ui-quadrant-CIr4i6cC.cjs +0 -1
- package/dist/vue-ui-radar-Czmsd_uv.cjs +0 -1
- package/dist/vue-ui-relation-circle-B1uMTqFP.cjs +0 -1
- package/dist/vue-ui-scatter-CTI943ks.cjs +0 -1
- package/dist/vue-ui-stackbar-D4AIFoQT.cjs +0 -6
- package/dist/vue-ui-strip-plot-ClNxSw9M.cjs +0 -1
- package/dist/vue-ui-table-heatmap-BE3UT8U9.cjs +0 -1
- package/dist/vue-ui-table-sparkline-BeYviUrb.cjs +0 -1
- package/dist/vue-ui-table-sparkline-YV8DUOqh.js +0 -600
- package/dist/vue-ui-thermometer-C6lMWRiF.cjs +0 -1
- package/dist/vue-ui-tiremarks-PGGgsNgS.cjs +0 -1
- package/dist/vue-ui-treemap-BzRVKqXL.cjs +0 -1
- package/dist/vue-ui-waffle-O8pAEf4X.cjs +0 -1
- package/dist/vue-ui-wheel-CnFdB_B1.cjs +0 -1
- package/dist/vue-ui-word-cloud-X4mp280j.cjs +0 -1
|
@@ -1,600 +0,0 @@
|
|
|
1
|
-
import { useCssVars as Ae, ref as v, computed as h, watch as de, onMounted as Ie, openBlock as d, createElementBlock as c, normalizeClass as R, unref as s, createElementVNode as p, normalizeStyle as i, toDisplayString as k, createCommentVNode as g, withDirectives as Oe, createBlock as H, Fragment as q, renderList as X, createSlots as $e, withCtx as P, renderSlot as O, normalizeProps as ze, guardReactiveProps as Pe, createVNode as Ne, nextTick as De } from "vue";
|
|
2
|
-
import { u as Fe, c as Ve, t as Te, a as We, p as N, b as Me, o as Ee, e as ve, g as Be, $ as Ge, d as Ue, i as D, f as F, q as Le, r as Re } from "./index-BbPeL8Gp.js";
|
|
3
|
-
import { u as ce } from "./useNestedProp-BN8claGG.js";
|
|
4
|
-
import He from "./vue-ui-sparkline-ccfl0s3m.js";
|
|
5
|
-
import fe from "./BaseIcon-CmiukQBl.js";
|
|
6
|
-
import { u as qe, U as Xe, v as je } from "./usePrinter-DaybDVqP.js";
|
|
7
|
-
import { u as Je } from "./useUserOptionState-BIvW1Kz7.js";
|
|
8
|
-
import { _ as Ke } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
|
-
const Qe = ["id"], Ye = { style: { "z-index": "1", "padding-right": "24px" } }, Ze = ["onClick"], et = ["data-cell"], tt = ["data-cell", "onPointerenter"], at = ["data-cell"], lt = ["data-cell"], ot = ["data-cell"], nt = ["data-cell"], ut = {
|
|
10
|
-
key: 0,
|
|
11
|
-
ref: "source",
|
|
12
|
-
dir: "auto"
|
|
13
|
-
}, rt = {
|
|
14
|
-
__name: "vue-ui-table-sparkline",
|
|
15
|
-
props: {
|
|
16
|
-
config: {
|
|
17
|
-
type: Object,
|
|
18
|
-
default() {
|
|
19
|
-
return {};
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
dataset: {
|
|
23
|
-
type: Array,
|
|
24
|
-
default() {
|
|
25
|
-
return [];
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
setup(pe, { expose: me }) {
|
|
30
|
-
const _ = pe;
|
|
31
|
-
Ae((t) => ({
|
|
32
|
-
e629975c: t.tdo
|
|
33
|
-
}));
|
|
34
|
-
const { vue_ui_table_sparkline: ge } = Fe(), V = v(Ve()), j = v(0), T = v(0), W = v(null), e = h({
|
|
35
|
-
get: () => Y(),
|
|
36
|
-
set: (t) => t
|
|
37
|
-
}), { userOptionsVisible: J, setUserOptionsVisibility: K, keepUserOptionState: Q } = Je({ config: e.value });
|
|
38
|
-
function Y() {
|
|
39
|
-
const t = ce({
|
|
40
|
-
userConfig: _.config,
|
|
41
|
-
defaultConfig: ge
|
|
42
|
-
});
|
|
43
|
-
return t.theme ? {
|
|
44
|
-
...ce({
|
|
45
|
-
userConfig: Te.vue_ui_table_sparkline[t.theme] || _.config,
|
|
46
|
-
defaultConfig: t
|
|
47
|
-
}),
|
|
48
|
-
customPalette: We[t.theme] || N
|
|
49
|
-
} : t;
|
|
50
|
-
}
|
|
51
|
-
de(() => _.config, (t) => {
|
|
52
|
-
e.value = Y(), le(), T.value += 1;
|
|
53
|
-
}, { deep: !0 }), de(() => _.dataset, (t) => {
|
|
54
|
-
b.value = A.value, T.value += 1;
|
|
55
|
-
}, { deep: !0 });
|
|
56
|
-
const { isPrinting: Z, isImaging: ee, generatePdf: te, generateImage: ae } = qe({
|
|
57
|
-
elementId: `table_${V.value}`,
|
|
58
|
-
fileName: e.value.title.text || "vue-ui-table-sparkline"
|
|
59
|
-
}), be = h(() => Me(e.value.customPalette)), $ = v(null), M = v(!1), ye = h(() => e.value.responsiveBreakpoint);
|
|
60
|
-
Ie(() => {
|
|
61
|
-
le();
|
|
62
|
-
});
|
|
63
|
-
const E = v(e.value.colNames);
|
|
64
|
-
function le() {
|
|
65
|
-
Ee(_.dataset) && ve({
|
|
66
|
-
componentName: "VueUiTableSparkline",
|
|
67
|
-
type: "dataset"
|
|
68
|
-
});
|
|
69
|
-
const t = new ResizeObserver((l) => {
|
|
70
|
-
l.forEach((a) => {
|
|
71
|
-
M.value = a.contentRect.width < ye.value;
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
$.value && t.observe($.value), E.value = [];
|
|
75
|
-
for (let l = 0; l < re.value; l += 1)
|
|
76
|
-
E.value.push(e.value.colNames[l] || `col ${l}`);
|
|
77
|
-
}
|
|
78
|
-
const oe = h(() => (_.dataset.forEach((t, l) => {
|
|
79
|
-
Be({
|
|
80
|
-
datasetObject: t,
|
|
81
|
-
requiredAttributes: ["name", "values"]
|
|
82
|
-
}).forEach((a) => {
|
|
83
|
-
ve({
|
|
84
|
-
componentName: "VueUiTableSparkline",
|
|
85
|
-
type: "datasetSerieAttribute",
|
|
86
|
-
property: a,
|
|
87
|
-
index: l
|
|
88
|
-
});
|
|
89
|
-
});
|
|
90
|
-
}), _.dataset.map((t, l) => {
|
|
91
|
-
const a = (t.values || []).map((n) => isNaN(n) ? 0 : n ?? 0), o = a.reduce((n, f) => n + f, 0), r = o / a.length, u = Ge(a);
|
|
92
|
-
return {
|
|
93
|
-
...t,
|
|
94
|
-
values: t.values || [],
|
|
95
|
-
color: Ue(t.color) || be.value[l] || N[l] || N[l % N.length],
|
|
96
|
-
sum: o,
|
|
97
|
-
average: r,
|
|
98
|
-
median: u,
|
|
99
|
-
sparklineDataset: a.map((n, f) => ({
|
|
100
|
-
period: e.value.colNames[f] || `col ${f}`,
|
|
101
|
-
value: n || 0
|
|
102
|
-
}))
|
|
103
|
-
};
|
|
104
|
-
})));
|
|
105
|
-
function he(t) {
|
|
106
|
-
const a = (t[0].values || []).map(
|
|
107
|
-
(r, u) => t.map((n) => n.values[u] || [])
|
|
108
|
-
).map(
|
|
109
|
-
(r) => r.map((u, n) => [u, n]).sort((u, n) => n[0] - u[0]).map((u) => u[1])
|
|
110
|
-
);
|
|
111
|
-
return t.map((r, u) => ({
|
|
112
|
-
...r,
|
|
113
|
-
values: r.values || [],
|
|
114
|
-
orders: a[u]
|
|
115
|
-
}));
|
|
116
|
-
}
|
|
117
|
-
const A = h(() => he(oe.value)), b = v(A.value), ke = h(() => Math.max(...b.value.map((t) => (t.values || []).length))), z = v(void 0), B = v(!1), m = v(void 0), ne = v(1);
|
|
118
|
-
function w() {
|
|
119
|
-
B.value = !1, m.value = void 0, y.value = void 0, ne.value = 1, I.value.forEach((t) => t.state = 1), x.value = {
|
|
120
|
-
name: 1,
|
|
121
|
-
sum: 1,
|
|
122
|
-
average: 1,
|
|
123
|
-
median: 1
|
|
124
|
-
}, b.value = A.value;
|
|
125
|
-
}
|
|
126
|
-
function ue(t, l) {
|
|
127
|
-
if (["name", "sum", "average", "median"].includes(t.type)) {
|
|
128
|
-
_e(t.type, l);
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
if (!U(l)) return;
|
|
132
|
-
if (S.value = l, y.value = void 0, ![null, void 0].includes(m.value) && l !== m.value && (m.value = void 0, w()), I.value[l].state === 1 && m.value === l) {
|
|
133
|
-
m.value = void 0, w();
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
B.value = !0, m.value = l;
|
|
137
|
-
const a = A.value.map((n) => n.values[l] || []), o = z.value === l ? 1 : -1;
|
|
138
|
-
I.value[l].state = o, ne.value = o, l === z.value ? z.value = void 0 : z.value = l;
|
|
139
|
-
const u = a.map((n, f) => [f, n]).sort((n, f) => o * (f[1] - n[1])).map((n) => n[0]).map((n) => A.value[n]);
|
|
140
|
-
b.value = u, T.value += 1;
|
|
141
|
-
}
|
|
142
|
-
const re = h(() => Math.max(..._.dataset.map((t) => (t.values || []).length))), C = h(() => {
|
|
143
|
-
let t = E.value.map((a) => ({
|
|
144
|
-
type: "reg",
|
|
145
|
-
value: a
|
|
146
|
-
}));
|
|
147
|
-
if (!t.length)
|
|
148
|
-
for (let a = 0; a < re.value; a += 1)
|
|
149
|
-
t.push({ type: "reg", value: `col ${a + 1}` });
|
|
150
|
-
e.value.showTotal && (t = [...t, { type: "sum", value: e.value.translations.total }]);
|
|
151
|
-
let l;
|
|
152
|
-
return e.value.showAverage && e.value.showMedian ? l = [
|
|
153
|
-
...t,
|
|
154
|
-
{ type: "average", value: e.value.translations.average },
|
|
155
|
-
{ type: "median", value: e.value.translations.median }
|
|
156
|
-
] : 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;
|
|
157
|
-
}), x = v({
|
|
158
|
-
name: 1,
|
|
159
|
-
sum: 1,
|
|
160
|
-
average: 1,
|
|
161
|
-
median: 1
|
|
162
|
-
}), y = v(void 0);
|
|
163
|
-
function _e(t, l) {
|
|
164
|
-
if (!b.value || b.value.length === 0 || !L(t)) return;
|
|
165
|
-
if (y.value !== t && (y.value = void 0), ![null, void 0].includes(m.value) && l !== m.value && w(), m.value = void 0, x.value[t] === 1 && y.value) {
|
|
166
|
-
y.value = void 0, w();
|
|
167
|
-
return;
|
|
168
|
-
}
|
|
169
|
-
y.value = t, B.value = !0, x.value[t] = x.value[t] === -1 ? 1 : -1, [null, void 0].includes(l) || (I.value[l].state = x.value[t]);
|
|
170
|
-
const a = x.value[t], o = [...b.value].sort((r, u) => {
|
|
171
|
-
const n = r[t] ?? (typeof r[t] == "number" ? 0 : ""), f = u[t] ?? (typeof u[t] == "number" ? 0 : "");
|
|
172
|
-
return typeof n == "string" && typeof f == "string" ? a === -1 ? n.localeCompare(f) : f.localeCompare(n) : typeof n == "number" && typeof f == "number" ? a === -1 ? n - f : f - n : 0;
|
|
173
|
-
});
|
|
174
|
-
b.value = o;
|
|
175
|
-
}
|
|
176
|
-
const S = v(void 0), G = v(void 0);
|
|
177
|
-
function Ce({ dataIndex: t, serieIndex: l }) {
|
|
178
|
-
S.value = t, G.value = l, W.value[t] && !M.value && W.value[t].scrollIntoView({ behavior: "smooth", block: "nearest", inline: "center" });
|
|
179
|
-
}
|
|
180
|
-
const se = v(!1);
|
|
181
|
-
function xe(t) {
|
|
182
|
-
se.value = t, j.value += 1;
|
|
183
|
-
}
|
|
184
|
-
function ie() {
|
|
185
|
-
De(() => {
|
|
186
|
-
const t = [e.value.translations.serie].concat(C.value), l = oe.value.map((r, u) => [
|
|
187
|
-
[r.name],
|
|
188
|
-
r.values,
|
|
189
|
-
[r.sum],
|
|
190
|
-
[r.average],
|
|
191
|
-
[r.median]
|
|
192
|
-
]), a = [t].concat(l), o = Le(a);
|
|
193
|
-
Re({
|
|
194
|
-
csvContent: o,
|
|
195
|
-
title: e.value.title.text || "vue-ui-table-sparkline"
|
|
196
|
-
});
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
function U(t) {
|
|
200
|
-
return e.value.sortedDataColumnIndices.includes(t);
|
|
201
|
-
}
|
|
202
|
-
function L(t) {
|
|
203
|
-
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;
|
|
204
|
-
}
|
|
205
|
-
function Se(t, l) {
|
|
206
|
-
return ["sum", "average", "median"].includes(l.type) ? y.value === l.type ? 1 : 0.3 : t === m.value ? 1 : 0.3;
|
|
207
|
-
}
|
|
208
|
-
function we() {
|
|
209
|
-
e.value.resetSortOnClickOutside && w();
|
|
210
|
-
}
|
|
211
|
-
const I = h({
|
|
212
|
-
get: () => C.value.map((t) => ({ state: 1 })),
|
|
213
|
-
set: (t) => t
|
|
214
|
-
});
|
|
215
|
-
return me({
|
|
216
|
-
generatePdf: te,
|
|
217
|
-
generateImage: ae,
|
|
218
|
-
generateCsv: ie,
|
|
219
|
-
restoreOrder: w
|
|
220
|
-
}), (t, l) => (d(), c("div", {
|
|
221
|
-
ref_key: "tableContainer",
|
|
222
|
-
ref: $,
|
|
223
|
-
class: R({ "vue-ui-responsive": M.value }),
|
|
224
|
-
style: { overflow: "hidden" },
|
|
225
|
-
id: `table_${V.value}`,
|
|
226
|
-
onMouseenter: l[2] || (l[2] = () => s(K)(!0)),
|
|
227
|
-
onMouseleave: l[3] || (l[3] = () => s(K)(!1))
|
|
228
|
-
}, [
|
|
229
|
-
p("div", {
|
|
230
|
-
style: { overflow: "auto" },
|
|
231
|
-
onPointerleave: l[1] || (l[1] = (a) => {
|
|
232
|
-
G.value = void 0, S.value = void 0;
|
|
233
|
-
})
|
|
234
|
-
}, [
|
|
235
|
-
p("table", {
|
|
236
|
-
class: "vue-ui-data-table",
|
|
237
|
-
style: i({ fontFamily: e.value.fontFamily, position: "relative" })
|
|
238
|
-
}, [
|
|
239
|
-
e.value.title.text ? (d(), c("caption", {
|
|
240
|
-
key: 0,
|
|
241
|
-
style: i({ backgroundColor: e.value.title.backgroundColor })
|
|
242
|
-
}, [
|
|
243
|
-
p("div", {
|
|
244
|
-
style: i({
|
|
245
|
-
fontSize: `${e.value.title.fontSize}px`,
|
|
246
|
-
fontWeight: e.value.title.bold ? "bold" : "normal",
|
|
247
|
-
color: e.value.title.color,
|
|
248
|
-
textAlign: e.value.title.textAlign
|
|
249
|
-
})
|
|
250
|
-
}, k(e.value.title.text), 5),
|
|
251
|
-
e.value.title.subtitle.text ? (d(), c("div", {
|
|
252
|
-
key: 0,
|
|
253
|
-
style: i({
|
|
254
|
-
fontSize: `${e.value.title.subtitle.fontSize}px`,
|
|
255
|
-
fontWeight: e.value.title.subtitle.bold ? "bold" : "normal",
|
|
256
|
-
color: e.value.title.subtitle.color,
|
|
257
|
-
textAlign: e.value.title.textAlign
|
|
258
|
-
})
|
|
259
|
-
}, k(e.value.title.subtitle.text), 5)) : g("", !0)
|
|
260
|
-
], 4)) : g("", !0),
|
|
261
|
-
p("thead", Ye, [
|
|
262
|
-
Oe((d(), c("tr", {
|
|
263
|
-
role: "row",
|
|
264
|
-
class: "vue-ui-data-table__thead-row",
|
|
265
|
-
style: i({
|
|
266
|
-
backgroundColor: e.value.thead.backgroundColor,
|
|
267
|
-
color: e.value.thead.color
|
|
268
|
-
})
|
|
269
|
-
}, [
|
|
270
|
-
p("th", {
|
|
271
|
-
role: "cell",
|
|
272
|
-
style: i({
|
|
273
|
-
backgroundColor: e.value.thead.backgroundColor,
|
|
274
|
-
border: e.value.thead.outline,
|
|
275
|
-
textAlign: e.value.thead.textAlign,
|
|
276
|
-
fontWeight: e.value.thead.bold ? "bold" : "normal",
|
|
277
|
-
cursor: e.value.sortedSeriesName ? "pointer" : "default"
|
|
278
|
-
}),
|
|
279
|
-
class: "sticky-col-first",
|
|
280
|
-
onClick: l[0] || (l[0] = (a) => ue({ type: "name" }, null))
|
|
281
|
-
}, [
|
|
282
|
-
p("div", {
|
|
283
|
-
style: i({
|
|
284
|
-
display: "flex",
|
|
285
|
-
flexDirection: "row",
|
|
286
|
-
alignItems: "center",
|
|
287
|
-
gap: "6px",
|
|
288
|
-
justifyContent: e.value.thead.textAlign,
|
|
289
|
-
pointerEvents: "none"
|
|
290
|
-
})
|
|
291
|
-
}, [
|
|
292
|
-
p("span", null, k(e.value.translations.serie), 1),
|
|
293
|
-
e.value.sortedSeriesName ? (d(), H(fe, {
|
|
294
|
-
key: 0,
|
|
295
|
-
size: 12,
|
|
296
|
-
name: x.value.name === 1 ? "arrowBottom" : "arrowTop",
|
|
297
|
-
stroke: e.value.thead.color,
|
|
298
|
-
style: i({
|
|
299
|
-
opacity: y.value === "name" ? 1 : 0.3
|
|
300
|
-
})
|
|
301
|
-
}, null, 8, ["name", "stroke", "style"])) : g("", !0)
|
|
302
|
-
], 4)
|
|
303
|
-
], 4),
|
|
304
|
-
(d(!0), c(q, null, X(C.value, (a, o) => (d(), c("th", {
|
|
305
|
-
role: "cell",
|
|
306
|
-
style: i({
|
|
307
|
-
background: e.value.thead.backgroundColor,
|
|
308
|
-
border: e.value.thead.outline,
|
|
309
|
-
textAlign: e.value.thead.textAlign,
|
|
310
|
-
fontWeight: e.value.thead.bold ? "bold" : "normal",
|
|
311
|
-
minWidth: o === C.value.length - 1 ? `${e.value.sparkline.dimensions.width}px` : "48px",
|
|
312
|
-
cursor: U(o) || L(a) ? "pointer" : "default",
|
|
313
|
-
paddingRight: o === C.value.length - 1 && e.value.userOptions.show ? "36px" : ""
|
|
314
|
-
}),
|
|
315
|
-
onClick: () => ue(a, o),
|
|
316
|
-
class: R({ "sticky-col": o === C.value.length - 1 && e.value.showSparklines })
|
|
317
|
-
}, [
|
|
318
|
-
p("div", {
|
|
319
|
-
style: i({
|
|
320
|
-
display: "flex",
|
|
321
|
-
flexDirection: "row",
|
|
322
|
-
alignItems: "center",
|
|
323
|
-
gap: "6px",
|
|
324
|
-
justifyContent: e.value.thead.textAlign,
|
|
325
|
-
pointerEvents: "none"
|
|
326
|
-
})
|
|
327
|
-
}, [
|
|
328
|
-
p("span", null, k(a.value), 1),
|
|
329
|
-
U(o) || L(a) ? (d(), H(fe, {
|
|
330
|
-
key: 0,
|
|
331
|
-
size: 12,
|
|
332
|
-
name: I.value[o].state === 1 ? "arrowBottom" : "arrowTop",
|
|
333
|
-
stroke: e.value.thead.color,
|
|
334
|
-
style: i({
|
|
335
|
-
opacity: Se(o, a)
|
|
336
|
-
})
|
|
337
|
-
}, null, 8, ["name", "stroke", "style"])) : g("", !0)
|
|
338
|
-
], 4),
|
|
339
|
-
e.value.userOptions.show && o === C.value.length - 1 && (s(Q) || s(J)) ? (d(), H(Xe, {
|
|
340
|
-
ref_for: !0,
|
|
341
|
-
ref: "details",
|
|
342
|
-
key: `user_option_${j.value}`,
|
|
343
|
-
backgroundColor: e.value.thead.backgroundColor,
|
|
344
|
-
color: e.value.thead.color,
|
|
345
|
-
isPrinting: s(Z),
|
|
346
|
-
isImaging: s(ee),
|
|
347
|
-
uid: V.value,
|
|
348
|
-
hasPdf: e.value.userOptions.buttons.pdf,
|
|
349
|
-
hasXls: e.value.userOptions.buttons.csv,
|
|
350
|
-
hasImg: e.value.userOptions.buttons.img,
|
|
351
|
-
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
352
|
-
isFullscreen: se.value,
|
|
353
|
-
titles: { ...e.value.userOptions.buttonTitles },
|
|
354
|
-
chartElement: $.value,
|
|
355
|
-
position: e.value.userOptions.position,
|
|
356
|
-
onToggleFullscreen: xe,
|
|
357
|
-
onGeneratePdf: s(te),
|
|
358
|
-
onGenerateImage: s(ae),
|
|
359
|
-
onGenerateCsv: ie,
|
|
360
|
-
style: i({
|
|
361
|
-
visibility: s(Q) ? s(J) ? "visible" : "hidden" : "visible"
|
|
362
|
-
})
|
|
363
|
-
}, $e({ _: 2 }, [
|
|
364
|
-
t.$slots.optionPdf ? {
|
|
365
|
-
name: "optionPdf",
|
|
366
|
-
fn: P(() => [
|
|
367
|
-
O(t.$slots, "optionPdf", {}, void 0, !0)
|
|
368
|
-
]),
|
|
369
|
-
key: "0"
|
|
370
|
-
} : void 0,
|
|
371
|
-
t.$slots.optionCsv ? {
|
|
372
|
-
name: "optionCsv",
|
|
373
|
-
fn: P(() => [
|
|
374
|
-
O(t.$slots, "optionCsv", {}, void 0, !0)
|
|
375
|
-
]),
|
|
376
|
-
key: "1"
|
|
377
|
-
} : void 0,
|
|
378
|
-
t.$slots.optionImg ? {
|
|
379
|
-
name: "optionImg",
|
|
380
|
-
fn: P(() => [
|
|
381
|
-
O(t.$slots, "optionImg", {}, void 0, !0)
|
|
382
|
-
]),
|
|
383
|
-
key: "2"
|
|
384
|
-
} : void 0,
|
|
385
|
-
t.$slots.optionFullscreen ? {
|
|
386
|
-
name: "optionFullscreen",
|
|
387
|
-
fn: P(({ toggleFullscreen: r, isFullscreen: u }) => [
|
|
388
|
-
O(t.$slots, "optionFullscreen", ze(Pe({ toggleFullscreen: r, isFullscreen: u })), void 0, !0)
|
|
389
|
-
]),
|
|
390
|
-
key: "3"
|
|
391
|
-
} : void 0
|
|
392
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "onGeneratePdf", "onGenerateImage", "style"])) : g("", !0)
|
|
393
|
-
], 14, Ze))), 256))
|
|
394
|
-
], 4)), [
|
|
395
|
-
[s(je), we]
|
|
396
|
-
])
|
|
397
|
-
]),
|
|
398
|
-
p("tbody", null, [
|
|
399
|
-
(d(!0), c(q, null, X(b.value, (a, o) => (d(), c("tr", {
|
|
400
|
-
role: "row",
|
|
401
|
-
style: i({
|
|
402
|
-
backgroundColor: e.value.tbody.backgroundColor,
|
|
403
|
-
color: e.value.tbody.color
|
|
404
|
-
}),
|
|
405
|
-
class: R({ "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 })
|
|
406
|
-
}, [
|
|
407
|
-
p("td", {
|
|
408
|
-
role: "cell",
|
|
409
|
-
style: i({
|
|
410
|
-
backgroundColor: e.value.tbody.backgroundColor,
|
|
411
|
-
border: e.value.tbody.outline,
|
|
412
|
-
fontSize: `${e.value.tbody.fontSize}px`,
|
|
413
|
-
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
414
|
-
textAlign: e.value.tbody.textAlign
|
|
415
|
-
}),
|
|
416
|
-
"data-cell": e.value.translations.serie,
|
|
417
|
-
class: "vue-ui-data-table__tbody__td sticky-col-first"
|
|
418
|
-
}, [
|
|
419
|
-
p("div", {
|
|
420
|
-
dir: "auto",
|
|
421
|
-
style: i({
|
|
422
|
-
display: "flex",
|
|
423
|
-
flexDirection: "row",
|
|
424
|
-
alignItems: "center",
|
|
425
|
-
gap: "6px",
|
|
426
|
-
justifyContent: e.value.tbody.textAlign
|
|
427
|
-
})
|
|
428
|
-
}, [
|
|
429
|
-
e.value.tbody.showColorMarker ? (d(), c("span", {
|
|
430
|
-
key: 0,
|
|
431
|
-
style: i({ color: a.color })
|
|
432
|
-
}, "⬤", 4)) : g("", !0),
|
|
433
|
-
p("span", null, k(a.name ?? "-"), 1)
|
|
434
|
-
], 4)
|
|
435
|
-
], 12, et),
|
|
436
|
-
(d(!0), c(q, null, X(ke.value, (r, u) => (d(), c("td", {
|
|
437
|
-
dir: "auto",
|
|
438
|
-
role: "cell",
|
|
439
|
-
ref_for: !0,
|
|
440
|
-
ref_key: "TD",
|
|
441
|
-
ref: W,
|
|
442
|
-
style: i({
|
|
443
|
-
border: e.value.tbody.outline,
|
|
444
|
-
fontSize: `${e.value.tbody.fontSize}px`,
|
|
445
|
-
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
446
|
-
textAlign: e.value.tbody.textAlign,
|
|
447
|
-
background: S.value !== void 0 && u === S.value ? e.value.tbody.selectedColor.useSerieColor ? `${a.color.length > 7 ? a.color.slice(0, -2) : a.color}33` : e.value.tbody.selectedColor.fallback : ""
|
|
448
|
-
}),
|
|
449
|
-
"data-cell": C.value[u],
|
|
450
|
-
class: "vue-ui-data-table__tbody__td",
|
|
451
|
-
onPointerenter: (n) => {
|
|
452
|
-
G.value = o, S.value = u;
|
|
453
|
-
}
|
|
454
|
-
}, k([null, void 0].includes(a.values[u]) ? "-" : s(D)(
|
|
455
|
-
e.value.formatter,
|
|
456
|
-
Number(a.values[u]),
|
|
457
|
-
s(F)({
|
|
458
|
-
p: e.value.prefix,
|
|
459
|
-
v: Number(a.values[u]),
|
|
460
|
-
s: e.value.suffix,
|
|
461
|
-
r: e.value.roundingValues
|
|
462
|
-
}),
|
|
463
|
-
{ datapoint: a, seriesIndex: o, datapointIndex: u }
|
|
464
|
-
)), 45, tt))), 256)),
|
|
465
|
-
e.value.showTotal ? (d(), c("td", {
|
|
466
|
-
key: 0,
|
|
467
|
-
dir: "auto",
|
|
468
|
-
role: "cell",
|
|
469
|
-
style: i({
|
|
470
|
-
border: e.value.tbody.outline,
|
|
471
|
-
fontSize: `${e.value.tbody.fontSize}px`,
|
|
472
|
-
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
473
|
-
textAlign: e.value.tbody.textAlign
|
|
474
|
-
}),
|
|
475
|
-
"data-cell": e.value.translations.total,
|
|
476
|
-
class: "vue-ui-data-table__tbody__td"
|
|
477
|
-
}, k(s(D)(
|
|
478
|
-
e.value.formatter,
|
|
479
|
-
a.sum,
|
|
480
|
-
s(F)({
|
|
481
|
-
p: e.value.prefix,
|
|
482
|
-
v: a.sum,
|
|
483
|
-
s: e.value.suffix,
|
|
484
|
-
r: e.value.roundingTotal
|
|
485
|
-
}),
|
|
486
|
-
{ datapoint: a.sum, seriesIndex: o }
|
|
487
|
-
)), 13, at)) : g("", !0),
|
|
488
|
-
e.value.showAverage ? (d(), c("td", {
|
|
489
|
-
key: 1,
|
|
490
|
-
dir: "auto",
|
|
491
|
-
role: "cell",
|
|
492
|
-
style: i({
|
|
493
|
-
border: e.value.tbody.outline,
|
|
494
|
-
fontSize: `${e.value.tbody.fontSize}px`,
|
|
495
|
-
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
496
|
-
textAlign: e.value.tbody.textAlign
|
|
497
|
-
}),
|
|
498
|
-
"data-cell": e.value.translations.average,
|
|
499
|
-
class: "vue-ui-data-table__tbody__td"
|
|
500
|
-
}, k(s(D)(
|
|
501
|
-
e.value.formatter,
|
|
502
|
-
a.average,
|
|
503
|
-
s(F)({
|
|
504
|
-
p: e.value.prefix,
|
|
505
|
-
v: a.average,
|
|
506
|
-
s: e.value.suffix,
|
|
507
|
-
r: e.value.roundingAverage
|
|
508
|
-
}),
|
|
509
|
-
{ datapoint: a.average, seriesIndex: o }
|
|
510
|
-
)), 13, lt)) : g("", !0),
|
|
511
|
-
e.value.showMedian ? (d(), c("td", {
|
|
512
|
-
key: 2,
|
|
513
|
-
dir: "auto",
|
|
514
|
-
role: "cell",
|
|
515
|
-
style: i({
|
|
516
|
-
border: e.value.tbody.outline,
|
|
517
|
-
fontSize: `${e.value.tbody.fontSize}px`,
|
|
518
|
-
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
519
|
-
textAlign: e.value.tbody.textAlign
|
|
520
|
-
}),
|
|
521
|
-
"data-cell": e.value.translations.median,
|
|
522
|
-
class: "vue-ui-data-table__tbody__td"
|
|
523
|
-
}, k(s(D)(
|
|
524
|
-
e.value.formatter,
|
|
525
|
-
a.median,
|
|
526
|
-
s(F)({
|
|
527
|
-
p: e.value.prefix,
|
|
528
|
-
v: a.median,
|
|
529
|
-
s: e.value.suffix,
|
|
530
|
-
r: e.value.roundingMedian
|
|
531
|
-
}),
|
|
532
|
-
{ datapoint: a.median, seriesIndex: o }
|
|
533
|
-
)), 13, ot)) : g("", !0),
|
|
534
|
-
e.value.showSparklines ? (d(), c("td", {
|
|
535
|
-
key: 3,
|
|
536
|
-
role: "cell",
|
|
537
|
-
"data-cell": e.value.translations.chart,
|
|
538
|
-
style: i({
|
|
539
|
-
border: e.value.tbody.outline,
|
|
540
|
-
fontSize: `${e.value.tbody.fontSize}px`,
|
|
541
|
-
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
542
|
-
textAlign: e.value.tbody.textAlign,
|
|
543
|
-
backgroundColor: e.value.tbody.backgroundColor,
|
|
544
|
-
padding: "0"
|
|
545
|
-
}),
|
|
546
|
-
class: "vue-ui-data-table__tbody__td sticky-col"
|
|
547
|
-
}, [
|
|
548
|
-
Ne(He, {
|
|
549
|
-
onHoverIndex: ({ index: r }) => Ce({ dataIndex: r, serieIndex: o }),
|
|
550
|
-
"height-ratio": e.value.sparkline.dimensions.heightRatio,
|
|
551
|
-
"forced-padding": 30,
|
|
552
|
-
dataset: a.sparklineDataset,
|
|
553
|
-
showInfo: !1,
|
|
554
|
-
selectedIndex: S.value,
|
|
555
|
-
config: {
|
|
556
|
-
type: e.value.sparkline.type,
|
|
557
|
-
style: {
|
|
558
|
-
backgroundColor: "transparent",
|
|
559
|
-
animation: {
|
|
560
|
-
show: e.value.sparkline.animation.show && !s(Z) && !s(ee),
|
|
561
|
-
animationFrames: e.value.sparkline.animation.animationFrames
|
|
562
|
-
},
|
|
563
|
-
line: {
|
|
564
|
-
color: a.color,
|
|
565
|
-
smooth: e.value.sparkline.smooth,
|
|
566
|
-
strokeWidth: e.value.sparkline.strokeWidth
|
|
567
|
-
},
|
|
568
|
-
bar: {
|
|
569
|
-
color: a.color
|
|
570
|
-
},
|
|
571
|
-
area: {
|
|
572
|
-
color: a.color,
|
|
573
|
-
opacity: e.value.sparkline.showArea ? 16 : 0,
|
|
574
|
-
useGradient: e.value.sparkline.useGradient
|
|
575
|
-
},
|
|
576
|
-
verticalIndicator: {
|
|
577
|
-
color: a.color
|
|
578
|
-
},
|
|
579
|
-
plot: {
|
|
580
|
-
radius: 9,
|
|
581
|
-
stroke: e.value.tbody.backgroundColor,
|
|
582
|
-
strokeWidth: 3
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
}, null, 8, ["onHoverIndex", "height-ratio", "dataset", "selectedIndex", "config"])
|
|
587
|
-
], 12, nt)) : g("", !0)
|
|
588
|
-
], 6))), 256))
|
|
589
|
-
])
|
|
590
|
-
], 4)
|
|
591
|
-
], 32),
|
|
592
|
-
t.$slots.source ? (d(), c("div", ut, [
|
|
593
|
-
O(t.$slots, "source", {}, void 0, !0)
|
|
594
|
-
], 512)) : g("", !0)
|
|
595
|
-
], 42, Qe));
|
|
596
|
-
}
|
|
597
|
-
}, gt = /* @__PURE__ */ Ke(rt, [["__scopeId", "data-v-5bd76162"]]);
|
|
598
|
-
export {
|
|
599
|
-
gt as default
|
|
600
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DhDYBLBe.cjs"),te=require("./Title-Bk_55doC.cjs"),U=require("./usePrinter-2_QjJFdH.cjs"),oe=require("./vue-ui-skeleton-lkPDknHn.cjs"),Y=require("./useNestedProp-BphUExEh.cjs"),le=require("./PackageVersion-Bj34UNnQ.cjs"),re=require("./PenAndPaper-D9yQnc0e.cjs"),ae=require("./useUserOptionState-BgepsfED.cjs"),se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ne=["id"],ue={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},ie={key:2,style:"width:100%"},ce=["xmlns","viewBox"],de={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},he=["fill"],ve=["id"],me=["stop-color"],pe=["stop-color"],ye=["stop-color"],fe={"clip-path":"url(#vueUiPill)"},ke=["x","y","height","width"],ge=["x","y","height","width","fill"],be=["x1","x2","y1","y2","stroke-width","stroke"],xe=["x1","x2","y1","y2","stroke-width","stroke"],Ce=["x1","x2","y1","y2","stroke-width","stroke"],_e=["x1","x2","y1","y2","stroke-width","stroke"],we=["x1","x2","y1","y2","stroke-width","stroke"],Ne=["x1","x2","y1","y2","stroke-width","stroke"],Be=["x1","x2","y1","y2","stroke-width","stroke"],Ve=["x1","x2","y1","y2","stroke-width","stroke"],Pe=["x","y","height","width"],Ee=["y","x","fill","font-size","font-weight"],$e={key:5,class:"vue-data-ui-watermark"},Fe={key:6,ref:"source",dir:"auto"},Oe={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:z}){const s=m;e.useCssVars(l=>({"5c9ace98":R.value,"23608cf6":D.value,"1b0e313a":j.value}));const{vue_ui_thermometer:L}=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),V=e.ref(0),P=e.ref(0),t=e.computed({get:()=>O(),set:l=>l}),{userOptionsVisible:E,setUserOptionsVisibility:$,keepUserOptionState:F}=ae.useUserOptionState({config:t.value});function O(){const l=Y.useNestedProp({userConfig:s.config,defaultConfig:L});return l.theme?{...Y.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=O(),B(),P.value+=1},{deep:!0});const{isPrinting:S,isImaging:I,generatePdf:q,generateImage:A}=U.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer"}),G=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),W=e.computed(()=>t.value.style.chart.thermometer.width),c=e.computed(()=>s.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 y(l,n,o){const u=[],w=T(l),N=T(n);for(let v=0;v<o;v++){const K=b(w.red,N.red,v,o),Q=b(w.green,N.green,v,o),Z=b(w.blue,N.blue,v,o),ee=`#${x(K)}${x(Q)}${x(Z)}`;u.push(ee)}return u}function T(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 b(l,n,o,u){return Math.round(l+(n-l)*o/u)}function x(l){return l.toString(16).padStart(2,"0")}const a=e.computed(()=>{const l=W.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}}),H=e.computed(()=>a.value),C=e.computed(()=>{const l=r.checkNaN(s.dataset.from)<0?Math.abs(r.checkNaN(s.dataset.from)):r.checkNaN(s.dataset.from),n=r.checkNaN(s.dataset.to)<0?Math.abs(r.checkNaN(s.dataset.to)):r.checkNaN(s.dataset.to);let o=0;return r.checkNaN(s.dataset.to)>0?o=l+n:l>n?o=l-n:o=n-l,(1-(Math.abs(r.checkNaN(s.dataset.from))+r.checkNaN(s.dataset.value))/o)*(a.value.height-i.value.top-i.value.bottom)}),j=e.computed(()=>`${C.value}px`),D=e.computed(()=>`${a.value.height-t.value.style.chart.padding.bottom-i.value.top}px`),R=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),X=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),c.value||10);if(!s.dataset.colors.to)return y(r.convertColorToHex(s.dataset.colors.from),p.value[1]||r.palette[1],c.value||10)}else return y(p.value[1]||r.palette[1],p.value[0]||r.palette[0],c.value||10);return y(r.convertColorToHex(s.dataset.colors.from),r.convertColorToHex(s.dataset.colors.to),c.value||10)}),M=e.computed(()=>{const l=[];let n=0;const o=a.value.height-i.value.top-i.value.bottom;for(let u=0;u<o-1;u+=o/c.value)l.push({x:a.value.left,y:a.value.top+u,qYLess:a.value.top+u+o/c.value/4,halfY:a.value.top+u+o/c.value/2,qYMore:a.value.top+u+o/c.value/4*3,color:X.value[n],height:o/c.value}),n+=1;return l}),h=e.ref(!1);function J(l){h.value=l,V.value+=1}const f=e.ref(!1);function _(){f.value=!f.value}return z({generatePdf:q,generateImage:A,toggleAnnotator:_}),(l,n)=>(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}`,onMouseenter:n[0]||(n[0]=()=>e.unref($)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref($)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(re.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:f.value,onClose:_},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),G.value?(e.openBlock(),e.createElementBlock("div",ue,null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",ie,[(e.openBlock(),e.createBlock(te._sfc_main,{key:`title_${P.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.unref(F)||e.unref(E))?(e.openBlock(),e.createBlock(U.UserOptions,{ref:"details",key:`user_options_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(I),isPrinting:e.unref(S),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:J,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(A),onToggleAnnotator:_,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(E)?"visible":"hidden":"visible"})},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,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):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(le._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",de,[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,he)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.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,me),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(r.setOpacity)(o.color,100-t.value.style.chart.graduations.gradient.intensity)},null,8,pe),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,ye)],8,ve))),256))]),e.createElementVNode("g",fe,[e.createElementVNode("rect",{x:a.value.left,y:a.value.top,height:a.value.height-i.value.top-i.value.bottom,width:a.value.width-i.value.left-i.value.right,fill:"#FFFFFF"},null,8,ke),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(o,u)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${u}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:a.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:t.value.style.chart.graduations.gradient.show?`url(#vueUiThermometerGradient_${u}_${d.value})`:o.color,"shape-rendering":"crispEdges"},null,8,ge),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,be)):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,xe)):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,Ce)):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,_e)):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,we)):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,Ne)):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,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: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,Ve)):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:C.value,width:a.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,Pe)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:C.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,Ee),e.renderSlot(l.$slots,"svg",{svg:H.value},void 0,!0)],10,ce)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",$e,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(S)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Fe,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(oe.default,{key:7,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ne))}},Se=se._export_sfc(Oe,[["__scopeId","data-v-a31437af"]]);exports.default=Se;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-BphUExEh.cjs"),c=require("./index-DhDYBLBe.cjs"),K=require("./Title-Bk_55doC.cjs"),G=require("./usePrinter-2_QjJFdH.cjs"),Q=require("./vue-ui-skeleton-lkPDknHn.cjs"),W=require("./PackageVersion-Bj34UNnQ.cjs"),Z=require("./PenAndPaper-D9yQnc0e.cjs"),ee=require("./useUserOptionState-BgepsfED.cjs"),te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],oe={key:2,style:"width:100%;background:transparent;padding-bottom:12px"},le=["xmlns","viewBox"],re={key:0},ne=["d","stroke-width","stroke"],se={key:1},ue=["x1","y1","x2","y2","stroke-width","stroke"],ie=["x","y","font-size","fill","font-weight","text-anchor"],ce={key:5,class:"vue-data-ui-watermark"},ve={key:6,ref:"source",dir:"auto"},de={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(j,{expose:H}){const v=j,{vue_ui_tiremarks:D}=c.useConfig(),P=e.computed(()=>!!v.dataset&&Object.keys(v.dataset).length),$=e.ref(c.createUid()),B=e.ref(null),R=e.ref(null),S=e.ref(0),O=e.ref(0),t=e.computed({get:()=>I(),set:a=>a}),{userOptionsVisible:A,setUserOptionsVisibility:z,keepUserOptionState:N}=ee.useUserOptionState({config:t.value});function I(){const a=L.useNestedProp({userConfig:v.config,defaultConfig:D});return a.theme?{...L.useNestedProp({userConfig:c.themes.vue_ui_tiremarks[a.theme]||v.config,defaultConfig:a})}:a}e.watch(()=>v.config,a=>{t.value=I(),M(),O.value+=1},{deep:!0});const{isPrinting:F,isImaging:E,generatePdf:V,generateImage:q}=G.usePrinter({elementId:$.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks"}),X=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),s=e.ref(t.value.style.chart.animation.use?0:c.checkNaN(v.dataset.percentage));e.watch(()=>v.dataset,a=>{t.value.style.chart.animation.use?T(a.percentage):s.value=a.percentage||0},{deep:!0}),e.onMounted(()=>{M()});function T(a){let n=t.value.style.chart.animation.speed;const o=Math.abs(a-s.value)/(n*120);function r(){s.value<a?s.value=Math.min(s.value+o,a):s.value>a&&(s.value=Math.max(s.value-o,a)),s.value!==a&&requestAnimationFrame(r)}r()}function M(){c.objectIsEmpty(v.dataset)&&c.error({componentName:"VueUiTiremarks",type:"dataset"}),T(v.dataset.percentage||0)}const f=e.computed(()=>t.value.style.chart.layout.display==="vertical"),u=e.computed(()=>{const a={top:48,left:64,right:64,bottom:48};return f.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?a.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?a.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?a.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?a.right:10}}),C=e.computed(()=>Object.values(u.value).reduce((a,n)=>a+n,0)),l=e.computed(()=>({height:f.value?312:56,width:f.value?56:312})),Y=e.ref(100);e.computed(()=>v.dataset.percentage/Y.value);const i=e.computed(()=>f.value?{mark:(l.value.height-C.value)/100*.5,space:(l.value.height-C.value)/100*.5}:{mark:(l.value.width-C.value)/100*.5,space:(l.value.width-C.value)/100*.5}),U=e.computed(()=>{const a=[];for(let o=0;o<100;o+=1){const r=t.value.style.chart.layout.ticks.gradient.show?c.shiftHue(t.value.style.chart.layout.activeColor,o/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.activeColor;if(f.value){const y=t.value.style.chart.layout.crescendo?(100-o)*(l.value.width-u.value.left-u.value.right)/100/3:0,d=u.value.left+4+y,h=l.value.width-u.value.right-4-y,p=l.value.height-u.value.bottom-o*i.value.mark-o*i.value.space-i.value.mark,m=l.value.height-u.value.bottom-o*i.value.mark-o*i.value.space-i.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,b=t.value.style.chart.layout.curveAngleY*((1+o)/100);a.push({x1:d,x2:h,y1:p,y2:m,curve:`M ${d} ${p} C ${d+k} ${p-b}, ${h-k} ${m-b}, ${h} ${m}`,color:r})}else{const y=t.value.style.chart.layout.crescendo?(100-o)*(l.value.height-u.value.top-u.value.bottom)/100/3:0,d=u.value.left+o*i.value.mark+o*i.value.space-i.value.mark,h=d,p=u.value.top+4+y,m=l.value.height-u.value.bottom-4-y,k=t.value.style.chart.layout.curveAngleY*((1+o)/100),b=(m-p)/t.value.style.chart.layout.curveAngleX;a.push({x1:d,x2:h,y1:p,y2:m,curve:`M ${d} ${p} C ${d+k} ${p+b}, ${h+k} ${m-b}, ${h} ${m}`,color:r})}}return a}),g=e.computed(()=>{let a,n,o;const r=t.value.style.chart.percentage.fontSize/3;return f.value?t.value.style.chart.percentage.verticalPosition==="top"?(a=l.value.width/2,n=u.value.top/2,o="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(a=l.value.width/2,n=l.value.height-u.value.bottom/2+r,o="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(a=4,n=l.value.height/2+r,o="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(a=l.value.width-u.value.right+8,n=l.value.height/2+r,o="start"),{x:a,y:n,textAnchor:o,bold:t.value.style.chart.percentage.bold,fontSize:t.value.style.chart.percentage.fontSize,fill:t.value.style.chart.percentage.color}}),_=e.ref(!1);function J(a){_.value=a,S.value+=1}const w=e.ref(!1);function x(){w.value=!w.value}return H({generatePdf:V,generateImage:q,toggleAnnotator:x}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:B,class:e.normalizeClass(`vue-ui-tiremarks ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:$.value,onMouseenter:n[0]||(n[0]=()=>e.unref(z)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(z)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Z.PenAndPaper,{key:0,parent:B.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:x},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),X.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:R,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",oe,[(e.openBlock(),e.createBlock(K._sfc_main,{key:`title_${O.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&P.value&&(e.unref(N)||e.unref(A))?(e.openBlock(),e.createBlock(G.UserOptions,{ref:"details",key:`user_options_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(E),uid:$.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:_.value,titles:{...t.value.userOptions.buttonTitles},chartElement:B.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:J,onGeneratePdf:e.unref(V),onGenerateImage:e.unref(q),onToggleAnnotator:x,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(A)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:r})),void 0,!0)]),key:"2"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:r})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(W._sfc_main),t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,r)=>(e.openBlock(),e.createElementBlock("path",{d:o.curve,"stroke-width":i.value.mark,stroke:s.value>=r?o.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&r<=s.value})},null,10,ne))),256))])):(e.openBlock(),e.createElementBlock("g",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.x1,y1:o.y1,x2:o.x2,y2:o.y2,"stroke-width":i.value.mark,stroke:s.value>=r?o.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,ue))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:g.value.x,y:g.value.y,"font-size":g.value.fontSize,fill:t.value.style.chart.layout.ticks.gradient.show&&t.value.style.chart.percentage.useGradientColor?e.unref(c.shiftHue)(t.value.style.chart.layout.activeColor,s.value/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.percentage.color,"font-weight":g.value.bold?"bold":"normal","text-anchor":g.value.textAnchor},e.toDisplayString(e.unref(c.applyDataLabel)(t.value.style.chart.percentage.formatter,s.value,e.unref(c.dataLabel)({v:s.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,ie)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:l.value},void 0,!0)],14,le)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ce,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(E)})),void 0,!0)])):e.createCommentVNode("",!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",ve,[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),P.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Q.default,{key:7,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ae))}},he=te._export_sfc(de,[["__scopeId","data-v-d5780415"]]);exports.default=he;
|