vue-data-ui 3.25.4 → 3.25.6
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 +13 -13
- package/dist/{BaseDraggableDialog-BM_R41j8.js → BaseDraggableDialog-Gm4Q30j0.js} +1 -1
- package/dist/{BaseIcon-t83PDe9k.js → BaseIcon-D8R6_sKH.js} +5 -5
- package/dist/{BaseLegendToggle-__JnV08B.js → BaseLegendToggle-CXQrLjd-.js} +1 -1
- package/dist/{BaseZoomControls-Xo16vFa4.js → BaseZoomControls-BTzjVDPM.js} +1 -1
- package/dist/{ColorPicker-ZJrR3Olp.js → ColorPicker-CUy15T72.js} +102 -100
- package/dist/{DataTable-COIO9gi4.js → DataTable-oiM9uWrQ.js} +1 -1
- package/dist/{HillActions-Cl-dNBZR.js → HillActions-Dn8aKOVJ.js} +1 -1
- package/dist/{NonSvgPenAndPaper-DS84BAOx.js → NonSvgPenAndPaper-DFXjpRyl.js} +2 -2
- package/dist/{PackageVersion-5SWftabm.js → PackageVersion-ur6jKRL5.js} +1 -1
- package/dist/{PenAndPaper-B_SdRSKH.js → PenAndPaper-KFzKlvbi.js} +20 -4
- package/dist/{SlicerPreview-GvsdvE-h.js → SlicerPreview-B6iHOC9L.js} +1 -1
- package/dist/{UserOptions-f3Q0nqrj.js → UserOptions-2x4VklMW.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-hill.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-icon.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-label.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/{package-DmsdiyeS.js → package-Dx7M6sYy.js} +1 -1
- package/dist/{render-common-zoPh9a78.js → render-common-DETHvNhl.js} +1 -1
- package/dist/ssr/vue-ui-donut.js +1 -1
- package/dist/ssr/vue-ui-xy.js +1 -1
- package/dist/ssr.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +80 -1
- package/dist/types/vue-ui-annotator.d.ts +58 -2
- package/dist/{useConfig-CyCVHo81.js → useConfig-CIQZ6_r7.js} +1339 -1313
- package/dist/{useObjectBindings-ByORl1rV.js → useObjectBindings---mHNfbS.js} +2 -2
- package/dist/utils.js +1 -1
- package/dist/{vue-data-ui-DTj71yB7.js → vue-data-ui-Dh3_EsHb.js} +70 -70
- package/dist/vue-data-ui.js +71 -71
- package/dist/vue-ui-3d-bar-i1REAKnM.js +1831 -0
- package/dist/{vue-ui-accordion-D4zsdacF.js → vue-ui-accordion-BSmBUjwZ.js} +2 -2
- package/dist/vue-ui-age-pyramid-DuHblCNO.js +1293 -0
- package/dist/vue-ui-annotator-CTQHAPho.js +3325 -0
- package/dist/vue-ui-bullet-CYLnKrmM.js +702 -0
- package/dist/{vue-ui-bump-BkOtQNWe.js → vue-ui-bump-DhwySwgn.js} +382 -380
- package/dist/vue-ui-candlestick-BpiECaDj.js +1859 -0
- package/dist/{vue-ui-carousel-table-CRgbs7jR.js → vue-ui-carousel-table-D-T2yA7-.js} +2 -2
- package/dist/vue-ui-chestnut-1MsZ9Q3r.js +2016 -0
- package/dist/vue-ui-chord-QBQUSe7r.js +1347 -0
- package/dist/vue-ui-circle-pack-ZWEwtesD.js +1635 -0
- package/dist/{vue-ui-cursor-BHyXRadA.js → vue-ui-cursor-CHQcHAHQ.js} +2 -2
- package/dist/{vue-ui-dag-CyVqaLbF.js → vue-ui-dag-C_inEafb.js} +794 -792
- package/dist/{vue-ui-dashboard-7I-7wvCP.js → vue-ui-dashboard-Bs2mBur5.js} +74 -72
- package/dist/{vue-ui-digits-BBL8uERO.js → vue-ui-digits-DwE4MoXI.js} +2 -2
- package/dist/vue-ui-donut-BM9dMHXj.js +2415 -0
- package/dist/{vue-ui-donut-DcgUuefk.js → vue-ui-donut-CbOSJmRu.js} +2 -2
- package/dist/vue-ui-donut-evolution-C97_RHus.js +1552 -0
- package/dist/vue-ui-dumbbell-DwKa5EL5.js +1533 -0
- package/dist/vue-ui-flow-DTTr3YL9.js +1217 -0
- package/dist/vue-ui-funnel-C4pkBk3D.js +749 -0
- package/dist/vue-ui-galaxy-CuAPLOvX.js +1085 -0
- package/dist/vue-ui-gauge-DLDULH26.js +934 -0
- package/dist/{vue-ui-geo-jR4P4pbt.js → vue-ui-geo-DXIHhp-G.js} +431 -429
- package/dist/{vue-ui-gizmo-D6W86s9o.js → vue-ui-gizmo-PuURiePo.js} +2 -2
- package/dist/vue-ui-heatmap-mvWLKB99.js +1555 -0
- package/dist/{vue-ui-hill-fFq7pm-g.js → vue-ui-hill-DqsVJkmO.js} +472 -470
- package/dist/vue-ui-history-plot-BBVLgt9_.js +1698 -0
- package/dist/{vue-ui-horizontal-bar-D3Sft4kp.js → vue-ui-horizontal-bar-y8Q8PZwT.js} +513 -511
- package/dist/{vue-ui-kpi-fzLsKlyE.js → vue-ui-kpi-B2hf3kpp.js} +2 -2
- package/dist/{vue-ui-label-BSgLalWD.js → vue-ui-label-ClMQ5Gez.js} +1 -1
- package/dist/{vue-ui-mini-loader-BL2odRfu.js → vue-ui-mini-loader-DtPOVIkK.js} +1 -1
- package/dist/vue-ui-molecule-eeW1Pmg8.js +929 -0
- package/dist/{vue-ui-mood-radar-bvGx6XgG.js → vue-ui-mood-radar-Dd1qfUiu.js} +378 -376
- package/dist/vue-ui-nested-donuts-CUARCr6O.js +1503 -0
- package/dist/vue-ui-onion-NoxHP0cG.js +1235 -0
- package/dist/{vue-ui-parallel-coordinate-plot-B_QJ4N9o.js → vue-ui-parallel-coordinate-plot-Cp3pCyxK.js} +409 -407
- package/dist/vue-ui-quadrant-C3kQtaeX.js +1967 -0
- package/dist/{vue-ui-quick-chart-BFscCR59.js → vue-ui-quick-chart-BZq517pL.js} +8 -6
- package/dist/vue-ui-radar-DvNrl4uD.js +1374 -0
- package/dist/vue-ui-rating-CWFMoYpE.js +359 -0
- package/dist/vue-ui-relation-circle-1iS6C0xx.js +905 -0
- package/dist/vue-ui-ridgeline-B-EZiPCF.js +1630 -0
- package/dist/vue-ui-rings-BXuwrHos.js +1252 -0
- package/dist/vue-ui-scatter-ByL-ZZ3B.js +2405 -0
- package/dist/{vue-ui-skeleton-zmbcOVEf.js → vue-ui-skeleton-BcU1onF6.js} +698 -698
- package/dist/vue-ui-smiley-DJVusLnp.js +376 -0
- package/dist/vue-ui-spark-trend-DjS31avb.js +457 -0
- package/dist/vue-ui-sparkbar-1Al_TLw1.js +401 -0
- package/dist/vue-ui-sparkgauge-CwLo53Y8.js +268 -0
- package/dist/vue-ui-sparkhistogram-CGw6SThG.js +589 -0
- package/dist/{vue-ui-sparkline-Dv7XrEzO.js → vue-ui-sparkline-CSZGBFfI.js} +511 -511
- package/dist/vue-ui-sparkstackbar-B8dloLMp.js +738 -0
- package/dist/vue-ui-stackbar-FvNd77t1.js +2355 -0
- package/dist/vue-ui-stackline-CP7PkqiG.js +2469 -0
- package/dist/vue-ui-strip-plot-DSMlDkv1.js +1740 -0
- package/dist/{vue-ui-table-heatmap-Dv_ZKKm3.js → vue-ui-table-heatmap-DnP3pzh2.js} +2 -2
- package/dist/vue-ui-table-rwKtnJKt.js +1352 -0
- package/dist/vue-ui-table-sparkline-B6wyEAyC.js +738 -0
- package/dist/{vue-ui-thermometer-DytlLJ32.js → vue-ui-thermometer-D0_KsB-y.js} +194 -192
- package/dist/{vue-ui-timer-CvHP4HoW.js → vue-ui-timer-1Z2zginj.js} +153 -153
- package/dist/vue-ui-tiremarks-zbl7aooy.js +540 -0
- package/dist/vue-ui-treemap-Drs4gK6L.js +1733 -0
- package/dist/vue-ui-waffle-DqUVsVNE.js +1621 -0
- package/dist/vue-ui-wheel-DLCBPW9t.js +873 -0
- package/dist/vue-ui-word-cloud-8Agk9h6c.js +1710 -0
- package/dist/{vue-ui-world-D0_2upjg.js → vue-ui-world-BOBHo7-L.js} +526 -524
- package/dist/vue-ui-xy-CSTJzRkk.js +5283 -0
- package/dist/{vue-ui-xy-D_5FfaH-.js → vue-ui-xy-Dmk1gQkI.js} +2 -2
- package/dist/vue-ui-xy-canvas-DANPuyf4.js +1824 -0
- package/dist/{vue_ui_age_pyramid-BY6c-oX_.js → vue_ui_age_pyramid-B2R66DgQ.js} +15 -6
- package/package.json +1 -1
- package/dist/vue-ui-3d-bar-CH8SpxS2.js +0 -1829
- package/dist/vue-ui-age-pyramid-B9MUVi75.js +0 -1241
- package/dist/vue-ui-annotator-CmlcWPIm.js +0 -2886
- package/dist/vue-ui-bullet-n8KNnDwh.js +0 -700
- package/dist/vue-ui-candlestick-Bxlvqk49.js +0 -1857
- package/dist/vue-ui-chestnut-ByDKbkG9.js +0 -2014
- package/dist/vue-ui-chord-DQRBgVOx.js +0 -1345
- package/dist/vue-ui-circle-pack-CBBc0HOe.js +0 -1633
- package/dist/vue-ui-donut-DfiocufT.js +0 -2413
- package/dist/vue-ui-donut-evolution-BoqO8By2.js +0 -1550
- package/dist/vue-ui-dumbbell-7M_oUQdi.js +0 -1529
- package/dist/vue-ui-flow-CoylrfnO.js +0 -1215
- package/dist/vue-ui-funnel-DaBYHWIC.js +0 -747
- package/dist/vue-ui-galaxy-BIebStQ3.js +0 -1083
- package/dist/vue-ui-gauge-CwdTmiRP.js +0 -932
- package/dist/vue-ui-heatmap-DXYlGwqR.js +0 -1553
- package/dist/vue-ui-history-plot-CgIELoD2.js +0 -1696
- package/dist/vue-ui-molecule-DeHWkkhy.js +0 -929
- package/dist/vue-ui-nested-donuts-CeAV2xPk.js +0 -1501
- package/dist/vue-ui-onion-B7oFulsQ.js +0 -1233
- package/dist/vue-ui-quadrant-DrKnz37q.js +0 -1965
- package/dist/vue-ui-radar-Bzx69q8f.js +0 -1372
- package/dist/vue-ui-rating-CimC9FQ9.js +0 -359
- package/dist/vue-ui-relation-circle-DIQYyDGb.js +0 -903
- package/dist/vue-ui-ridgeline-CPEnM45x.js +0 -1621
- package/dist/vue-ui-rings-qPL5Iwji.js +0 -1250
- package/dist/vue-ui-scatter-BB0ClTsU.js +0 -2403
- package/dist/vue-ui-smiley-DzPkCMN-.js +0 -376
- package/dist/vue-ui-spark-trend-Ciq7-k_q.js +0 -457
- package/dist/vue-ui-sparkbar-D1M7-naP.js +0 -401
- package/dist/vue-ui-sparkgauge-rsqaeR_n.js +0 -268
- package/dist/vue-ui-sparkhistogram-C4WXt2Ni.js +0 -589
- package/dist/vue-ui-sparkstackbar-DDOXdeV-.js +0 -738
- package/dist/vue-ui-stackbar-C_hMnOLb.js +0 -2353
- package/dist/vue-ui-stackline-BHGi63lD.js +0 -2467
- package/dist/vue-ui-strip-plot-Cygpn-l8.js +0 -1738
- package/dist/vue-ui-table-BQna1wL6.js +0 -1352
- package/dist/vue-ui-table-sparkline-BCuimtk6.js +0 -738
- package/dist/vue-ui-tiremarks-BvjdZwgh.js +0 -538
- package/dist/vue-ui-treemap-C5OpqzSc.js +0 -1731
- package/dist/vue-ui-waffle-B7T_Zzan.js +0 -1619
- package/dist/vue-ui-wheel-D1B0k7IW.js +0 -871
- package/dist/vue-ui-word-cloud-C4pX6jop.js +0 -1708
- package/dist/vue-ui-xy-Ck41KYqF.js +0 -5281
- package/dist/vue-ui-xy-canvas-B_8Mu19r.js +0 -1824
|
@@ -1,401 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { Lt as t, Pt as n, S as r, Ut as i, Wt as ee, X as a, Yt as te, Zt as o, ht as ne, i as s, nt as c, q as re, t as ie, w as ae } from "./lib-Dql7cqyA.js";
|
|
3
|
-
import { n as oe, t as l } from "./useHints-Dq_w2E8B.js";
|
|
4
|
-
import { t as u } from "./useConfig-CyCVHo81.js";
|
|
5
|
-
import { n as se, t as d } from "./BaseScanner-DZvpgOjM.js";
|
|
6
|
-
import { t as f } from "./useNestedProp-Chvyfpl-.js";
|
|
7
|
-
import { t as ce } from "./useThemeCheck-C43Tcqmk.js";
|
|
8
|
-
import { t as le } from "./DefGrad-DVBqDjhO.js";
|
|
9
|
-
import { t as ue } from "./usePrefersMotion-BC-CsqR1.js";
|
|
10
|
-
import { t as de } from "./vue_ui_sparkbar-z6qO--Kf.js";
|
|
11
|
-
import { Fragment as p, computed as m, createBlock as fe, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createVNode as v, defineAsyncComponent as pe, guardReactiveProps as y, mergeProps as b, nextTick as me, normalizeProps as he, normalizeStyle as x, onMounted as S, openBlock as C, ref as w, renderList as ge, renderSlot as T, toDisplayString as E, toRefs as D, unref as O, useSlots as k, watch as A } from "vue";
|
|
12
|
-
//#region src/components/vue-ui-sparkbar.vue
|
|
13
|
-
var j = /* @__PURE__ */ e({ default: () => R }), M = [
|
|
14
|
-
"onClick",
|
|
15
|
-
"onMouseenter",
|
|
16
|
-
"onMouseleave"
|
|
17
|
-
], N = {
|
|
18
|
-
key: 1,
|
|
19
|
-
class: "vue-ui-sparkbar-datapoint-value"
|
|
20
|
-
}, P = ["xmlns", "viewBox"], F = [
|
|
21
|
-
"height",
|
|
22
|
-
"width",
|
|
23
|
-
"fill",
|
|
24
|
-
"rx"
|
|
25
|
-
], I = [
|
|
26
|
-
"height",
|
|
27
|
-
"width",
|
|
28
|
-
"fill",
|
|
29
|
-
"rx"
|
|
30
|
-
], L = [
|
|
31
|
-
"height",
|
|
32
|
-
"width",
|
|
33
|
-
"fill",
|
|
34
|
-
"rx"
|
|
35
|
-
], _e = {
|
|
36
|
-
key: 2,
|
|
37
|
-
ref: "source",
|
|
38
|
-
dir: "auto"
|
|
39
|
-
}, R = {
|
|
40
|
-
__name: "vue-ui-sparkbar",
|
|
41
|
-
props: {
|
|
42
|
-
config: {
|
|
43
|
-
type: Object,
|
|
44
|
-
default() {
|
|
45
|
-
return {};
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
dataset: {
|
|
49
|
-
type: Array,
|
|
50
|
-
default() {
|
|
51
|
-
return [];
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
backgroundOpacity: {
|
|
55
|
-
type: Number,
|
|
56
|
-
default: null
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
emits: ["selectDatapoint"],
|
|
60
|
-
setup(e, { emit: j }) {
|
|
61
|
-
let R = pe(() => import("./PackageVersion-5SWftabm.js").then((e) => e.t)), { vue_ui_sparkbar: ve } = u(), { isThemeValid: ye, warnInvalidTheme: be } = ce(), z = ue(), B = e, xe = k(), V = w(re()), H = w(K()), U = m(() => H.value.debug);
|
|
62
|
-
S(() => {
|
|
63
|
-
xe["chart-background"] && U.value && console.warn("VueUiSparkbar does not support the #chart-background slot.");
|
|
64
|
-
}), oe({
|
|
65
|
-
config: () => H.value,
|
|
66
|
-
dataset: () => B.dataset,
|
|
67
|
-
component: "VueUiSparkbar",
|
|
68
|
-
rules: [l.noHint]
|
|
69
|
-
});
|
|
70
|
-
let Se = m(() => o({
|
|
71
|
-
defaultConfig: { style: {
|
|
72
|
-
backgroundColor: "#99999930",
|
|
73
|
-
animation: { show: !1 },
|
|
74
|
-
layout: { independant: !0 },
|
|
75
|
-
gutter: {
|
|
76
|
-
backgroundColor: "#6A6A6A",
|
|
77
|
-
opacity: 50
|
|
78
|
-
},
|
|
79
|
-
bar: { gradient: { underlayerColor: "#6A6A6A" } }
|
|
80
|
-
} },
|
|
81
|
-
userConfig: H.value.skeletonConfig ?? {}
|
|
82
|
-
})), { loading: W, FINAL_DATASET: G, manualLoading: Ce } = se({
|
|
83
|
-
...D(B),
|
|
84
|
-
FINAL_CONFIG: H,
|
|
85
|
-
prepareConfig: K,
|
|
86
|
-
skeletonDataset: B.config?.skeletonDataset ?? [
|
|
87
|
-
{
|
|
88
|
-
name: "_",
|
|
89
|
-
value: 21,
|
|
90
|
-
target: 25,
|
|
91
|
-
color: "#808080"
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
name: "_",
|
|
95
|
-
value: 13,
|
|
96
|
-
target: 25,
|
|
97
|
-
color: "#ADADAD"
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
name: "_",
|
|
101
|
-
value: 8,
|
|
102
|
-
target: 25,
|
|
103
|
-
color: "#DBDBDB"
|
|
104
|
-
}
|
|
105
|
-
],
|
|
106
|
-
skeletonConfig: o({
|
|
107
|
-
defaultConfig: H.value,
|
|
108
|
-
userConfig: Se.value
|
|
109
|
-
})
|
|
110
|
-
});
|
|
111
|
-
function K() {
|
|
112
|
-
let e = f({
|
|
113
|
-
userConfig: B.config,
|
|
114
|
-
defaultConfig: ve
|
|
115
|
-
}), n = e.theme;
|
|
116
|
-
if (!n) return e;
|
|
117
|
-
if (!ye.value(e)) return be(e), e;
|
|
118
|
-
let r = f({
|
|
119
|
-
userConfig: de[n] || B.config,
|
|
120
|
-
defaultConfig: e
|
|
121
|
-
}), i = f({
|
|
122
|
-
userConfig: B.config,
|
|
123
|
-
defaultConfig: r
|
|
124
|
-
});
|
|
125
|
-
return {
|
|
126
|
-
...i,
|
|
127
|
-
customPalette: i.customPalette.length ? i.customPalette : te[n] || t
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
A(() => B.config, (e) => {
|
|
131
|
-
H.value = K();
|
|
132
|
-
}, { deep: !0 });
|
|
133
|
-
let we = m(() => ae(H.value.customPalette)), q = w(G.value.map((e) => ({
|
|
134
|
-
...e,
|
|
135
|
-
value: H.value.style.animation.show ? 0 : e.value || 0,
|
|
136
|
-
formatter: e.formatter || null
|
|
137
|
-
}))), J = w(null);
|
|
138
|
-
S(async () => {
|
|
139
|
-
n(B.dataset) && c({
|
|
140
|
-
componentName: "VueUiSparkbar",
|
|
141
|
-
type: "dataset",
|
|
142
|
-
debug: U.value
|
|
143
|
-
}), Y();
|
|
144
|
-
});
|
|
145
|
-
function Y() {
|
|
146
|
-
if (H.value.style.animation.show && !z.value) {
|
|
147
|
-
let e = H.value.style.animation.animationFrames, t = G.value.map((t, n) => t.value / e), n = G.value.map((e) => e.value || 0).reduce((e, t) => e + t, 0), r = 0;
|
|
148
|
-
function i() {
|
|
149
|
-
r += n / e, r < n ? (q.value = q.value.map((e, n) => ({
|
|
150
|
-
...e,
|
|
151
|
-
value: e.value += t[n]
|
|
152
|
-
})), J.value = requestAnimationFrame(i)) : q.value = G.value.map((e) => ({
|
|
153
|
-
...e,
|
|
154
|
-
value: e.value || 0,
|
|
155
|
-
formatter: e.formatter || null
|
|
156
|
-
}));
|
|
157
|
-
}
|
|
158
|
-
i();
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
A(() => G.value, async (e) => {
|
|
162
|
-
cancelAnimationFrame(J.value), q.value = G.value.map((e) => ({
|
|
163
|
-
...e,
|
|
164
|
-
value: H.value.style.animation.show && !z.value ? 0 : e.value || 0,
|
|
165
|
-
formatter: e.formatter || null
|
|
166
|
-
})), me(Y);
|
|
167
|
-
}, { deep: !0 });
|
|
168
|
-
let X = w({
|
|
169
|
-
width: 500,
|
|
170
|
-
height: 16
|
|
171
|
-
}), Te = m(() => Math.max(...G.value.map((e) => e.value))), Ee = m(() => (U.value && G.value.forEach((e, t) => {
|
|
172
|
-
ne({
|
|
173
|
-
datasetObject: e,
|
|
174
|
-
requiredAttributes: ["name", "value"]
|
|
175
|
-
}).forEach((e) => {
|
|
176
|
-
c({
|
|
177
|
-
componentName: "VueUiSparkbar",
|
|
178
|
-
type: "datasetSerieAttribute",
|
|
179
|
-
property: e,
|
|
180
|
-
index: t
|
|
181
|
-
});
|
|
182
|
-
});
|
|
183
|
-
}), q.value.map((e, n) => ({
|
|
184
|
-
...e,
|
|
185
|
-
value: e.value || 0,
|
|
186
|
-
color: r(e.color) || we.value[n] || t[n] || t[n % t.length]
|
|
187
|
-
}))));
|
|
188
|
-
function De(e) {
|
|
189
|
-
return e / Te.value;
|
|
190
|
-
}
|
|
191
|
-
function Z(e) {
|
|
192
|
-
return H.value.style.layout.independant ? e.target ? e.value / e.target : H.value.style.layout.percentage ? e.value > 100 ? 1 : e.value / 100 : H.value.style.layout.target === 0 ? 1 : e.value / H.value.style.layout.target : De(e.value);
|
|
193
|
-
}
|
|
194
|
-
function Q(e) {
|
|
195
|
-
return H.value.style.layout.independant && e.target || H.value.style.layout.target;
|
|
196
|
-
}
|
|
197
|
-
let Oe = j;
|
|
198
|
-
function ke(e, t) {
|
|
199
|
-
Oe("selectDatapoint", {
|
|
200
|
-
datapoint: e,
|
|
201
|
-
index: t
|
|
202
|
-
}), H.value.events.datapointClick && H.value.events.datapointClick({
|
|
203
|
-
datapoint: e,
|
|
204
|
-
seriesIndex: t
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
function Ae(e, t) {
|
|
208
|
-
H.value.events.datapointEnter && H.value.events.datapointEnter({
|
|
209
|
-
datapoint: e,
|
|
210
|
-
seriesIndex: t
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
function je(e, t) {
|
|
214
|
-
H.value.events.datapointLeave && H.value.events.datapointLeave({
|
|
215
|
-
datapoint: e,
|
|
216
|
-
seriesIndex: t
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
let $ = m(() => H.value.style.bar.borderRadius == null ? X.value.height / 2 : Math.min(X.value.height / 2, H.value.style.bar.borderRadius));
|
|
220
|
-
return (e, t) => (C(), g("div", {
|
|
221
|
-
class: "vue-data-ui-component vue-ui-sparkbar",
|
|
222
|
-
style: x({
|
|
223
|
-
width: "100%",
|
|
224
|
-
position: "relative",
|
|
225
|
-
fontFamily: H.value.style.fontFamily,
|
|
226
|
-
background: B.backgroundOpacity === null ? H.value.style.backgroundColor : O(i)(H.value.style.backgroundColor, B.backgroundOpacity)
|
|
227
|
-
})
|
|
228
|
-
}, [
|
|
229
|
-
e.$slots.title ? T(e.$slots, "title", he(y({ title: {
|
|
230
|
-
...e.title,
|
|
231
|
-
title: H.value.style.title.text,
|
|
232
|
-
subtitle: H.value.style.title.subtitle.text
|
|
233
|
-
} })), void 0, void 0, 0) : h("", !0),
|
|
234
|
-
!e.$slots.title && H.value.style.title.text ? (C(), g("div", {
|
|
235
|
-
key: 1,
|
|
236
|
-
class: "vue-ui-sparkbar-title-container",
|
|
237
|
-
style: x({
|
|
238
|
-
background: H.value.style.title.backgroundColor,
|
|
239
|
-
margin: H.value.style.title.margin,
|
|
240
|
-
textAlign: H.value.style.title.textAlign
|
|
241
|
-
})
|
|
242
|
-
}, [_("div", {
|
|
243
|
-
class: "vue-ui-sparkbar-title",
|
|
244
|
-
style: x({
|
|
245
|
-
fontSize: H.value.style.title.fontSize + "px",
|
|
246
|
-
color: H.value.style.title.color,
|
|
247
|
-
fontWeight: H.value.style.title.bold ? "bold" : "normal"
|
|
248
|
-
})
|
|
249
|
-
}, E(H.value.style.title.text), 5), H.value.style.title.subtitle.text ? (C(), g("div", {
|
|
250
|
-
key: 0,
|
|
251
|
-
class: "vue-ui-sparkbar-subtitle",
|
|
252
|
-
style: x({
|
|
253
|
-
fontSize: H.value.style.title.subtitle.fontSize + "px",
|
|
254
|
-
color: H.value.style.title.subtitle.color,
|
|
255
|
-
fontWeight: H.value.style.title.subtitle.bold ? "bold" : "normal"
|
|
256
|
-
})
|
|
257
|
-
}, E(H.value.style.title.subtitle.text), 5)) : h("", !0)], 4)) : h("", !0),
|
|
258
|
-
(C(!0), g(p, null, ge(Ee.value, (t, n) => (C(), g("div", {
|
|
259
|
-
style: x(`display:flex !important;${["left", "right"].includes(H.value.style.labels.name.position) ? `flex-direction: ${H.value.style.labels.name.position === "right" ? "row-reverse" : "row"} !important` : "flex-direction:column !important"};gap:${H.value.style.gap}px !important;align-items:center;${O(G).length > 0 && n !== O(G).length - 1 ? "margin-bottom:6px" : ""}`),
|
|
260
|
-
onClick: (e) => ke(t, n),
|
|
261
|
-
onMouseenter: (e) => Ae(t, n),
|
|
262
|
-
onMouseleave: (e) => je(t, n)
|
|
263
|
-
}, [
|
|
264
|
-
O(W) ? h("", !0) : T(e.$slots, "data-label", b({ ref_for: !0 }, { bar: {
|
|
265
|
-
...t,
|
|
266
|
-
target: Q(t),
|
|
267
|
-
valueLabel: O(s)(t.formatter, t.value, O(a)({
|
|
268
|
-
p: t.prefix || "",
|
|
269
|
-
v: t.value,
|
|
270
|
-
s: t.suffix || "",
|
|
271
|
-
r: t.rounding || 0
|
|
272
|
-
}), {
|
|
273
|
-
datapoint: t,
|
|
274
|
-
seriesIndex: n
|
|
275
|
-
}),
|
|
276
|
-
targetLabel: O(s)(t.formatter, Q(t), O(a)({
|
|
277
|
-
p: t.prefix || "",
|
|
278
|
-
v: Q(t),
|
|
279
|
-
s: t.suffix || "",
|
|
280
|
-
r: t.rounding || 0
|
|
281
|
-
}), {
|
|
282
|
-
datapoint: t,
|
|
283
|
-
seriesIndex: n
|
|
284
|
-
})
|
|
285
|
-
} }), void 0, void 0, 0),
|
|
286
|
-
!e.$slots["data-label"] || O(W) ? (C(), g("div", {
|
|
287
|
-
key: 1,
|
|
288
|
-
style: x({
|
|
289
|
-
display: "flex",
|
|
290
|
-
justifyContent: ["right", "top-right"].includes(H.value.style.labels.name.position) ? "flex-end" : ["top-center"].includes(H.value.style.labels.name.position) ? "center" : "flex-start",
|
|
291
|
-
alignItems: "center",
|
|
292
|
-
width: H.value.style.labels.name.width,
|
|
293
|
-
color: H.value.style.labels.name.color,
|
|
294
|
-
fontSize: H.value.style.labels.fontSize + "px",
|
|
295
|
-
fontWeight: H.value.style.labels.name.bold ? "bold" : "normal",
|
|
296
|
-
flexWrap: "wrap"
|
|
297
|
-
})
|
|
298
|
-
}, [O(W) ? (C(), g("div", {
|
|
299
|
-
key: 0,
|
|
300
|
-
class: "vue-ui-sparkbar-skeleton-name",
|
|
301
|
-
style: x({
|
|
302
|
-
width: "60px",
|
|
303
|
-
height: H.value.style.labels.fontSize + "px",
|
|
304
|
-
borderRadius: H.value.style.labels.fontSize / 4 + "px",
|
|
305
|
-
display: "flex",
|
|
306
|
-
alignItems: "center",
|
|
307
|
-
justifyContent: "space-between",
|
|
308
|
-
marginTop: "5px"
|
|
309
|
-
})
|
|
310
|
-
}, [_("div", { style: x({
|
|
311
|
-
height: "100%",
|
|
312
|
-
width: "40px",
|
|
313
|
-
borderRadius: H.value.style.labels.fontSize / 4 + "px",
|
|
314
|
-
backgroundColor: "#6A6A6A80"
|
|
315
|
-
}) }, null, 4), _("div", { style: x({
|
|
316
|
-
height: "100%",
|
|
317
|
-
width: "15px",
|
|
318
|
-
borderRadius: H.value.style.labels.fontSize / 4 + "px",
|
|
319
|
-
backgroundColor: "#6A6A6A80"
|
|
320
|
-
}) }, null, 4)], 4)) : (C(), g(p, { key: 1 }, [
|
|
321
|
-
_("span", null, E(t.name), 1),
|
|
322
|
-
H.value.style.labels.value.show ? (C(), g("span", {
|
|
323
|
-
key: 0,
|
|
324
|
-
style: x(`font-weight:${H.value.style.labels.value.bold ? "bold" : "normal"}`),
|
|
325
|
-
class: "vue-ui-sparkbar-datapoint-name"
|
|
326
|
-
}, ": " + E(O(s)(t.formatter, t.value, O(a)({
|
|
327
|
-
p: t.prefix || "",
|
|
328
|
-
v: t.value,
|
|
329
|
-
s: t.suffix || "",
|
|
330
|
-
r: t.rounding || 0
|
|
331
|
-
}), {
|
|
332
|
-
datapoint: t,
|
|
333
|
-
seriesIndex: n
|
|
334
|
-
})), 5)) : h("", !0),
|
|
335
|
-
H.value.style.layout.showTargetValue ? (C(), g("span", N, E(" " + H.value.style.layout.targetValueText) + " " + E(O(s)(t.formatter, Q(t), O(a)({
|
|
336
|
-
p: t.prefix || "",
|
|
337
|
-
v: Q(t),
|
|
338
|
-
s: t.suffix || "",
|
|
339
|
-
r: t.rounding || 0
|
|
340
|
-
}), {
|
|
341
|
-
datapoint: t,
|
|
342
|
-
seriesIndex: n
|
|
343
|
-
})), 1)) : h("", !0)
|
|
344
|
-
], 64))], 4)) : h("", !0),
|
|
345
|
-
(C(), g("svg", {
|
|
346
|
-
role: "img",
|
|
347
|
-
xmlns: O(ie),
|
|
348
|
-
viewBox: `0 0 ${X.value.width} ${X.value.height}`,
|
|
349
|
-
width: "100%"
|
|
350
|
-
}, [
|
|
351
|
-
v(O(R)),
|
|
352
|
-
_("defs", null, [v(le, {
|
|
353
|
-
t: "linear",
|
|
354
|
-
x1: "0%",
|
|
355
|
-
y1: "0%",
|
|
356
|
-
x2: "100%",
|
|
357
|
-
y2: "0%",
|
|
358
|
-
id: `sparkbar_gradient_${n}_${V.value}`,
|
|
359
|
-
stops: [[
|
|
360
|
-
"0%",
|
|
361
|
-
O(i)(O(ee)(t.color, .03), 100 - H.value.style.bar.gradient.intensity),
|
|
362
|
-
1
|
|
363
|
-
], [
|
|
364
|
-
"100%",
|
|
365
|
-
t.color,
|
|
366
|
-
1
|
|
367
|
-
]]
|
|
368
|
-
}, null, 8, ["id", "stops"])]),
|
|
369
|
-
_("rect", {
|
|
370
|
-
height: X.value.height,
|
|
371
|
-
width: X.value.width,
|
|
372
|
-
x: 0,
|
|
373
|
-
y: 0,
|
|
374
|
-
fill: O(i)(H.value.style.gutter.backgroundColor, H.value.style.gutter.opacity),
|
|
375
|
-
rx: $.value
|
|
376
|
-
}, null, 8, F),
|
|
377
|
-
_("rect", {
|
|
378
|
-
height: X.value.height,
|
|
379
|
-
width: X.value.width * Z(t),
|
|
380
|
-
x: 0,
|
|
381
|
-
y: 0,
|
|
382
|
-
fill: H.value.style.bar.gradient.underlayerColor,
|
|
383
|
-
rx: $.value
|
|
384
|
-
}, null, 8, I),
|
|
385
|
-
_("rect", {
|
|
386
|
-
height: X.value.height,
|
|
387
|
-
width: X.value.width * Z(t),
|
|
388
|
-
x: 0,
|
|
389
|
-
y: 0,
|
|
390
|
-
fill: H.value.style.bar.gradient.show ? `url(#sparkbar_gradient_${n}_${V.value})` : t.color,
|
|
391
|
-
rx: $.value
|
|
392
|
-
}, null, 8, L)
|
|
393
|
-
], 8, P))
|
|
394
|
-
], 44, M))), 256)),
|
|
395
|
-
e.$slots.source ? (C(), g("div", _e, [T(e.$slots, "source")], 512)) : h("", !0),
|
|
396
|
-
O(W) ? (C(), fe(d, { key: 3 })) : h("", !0)
|
|
397
|
-
], 4));
|
|
398
|
-
}
|
|
399
|
-
};
|
|
400
|
-
//#endregion
|
|
401
|
-
export { j as n, R as t };
|
|
@@ -1,268 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { Pt as t, X as n, Zt as r, b as i, ht as ee, i as te, nt as a, q as ne, t as re, xt as ie } from "./lib-Dql7cqyA.js";
|
|
3
|
-
import { n as o, t as s } from "./useHints-Dq_w2E8B.js";
|
|
4
|
-
import { t as ae } from "./useConfig-CyCVHo81.js";
|
|
5
|
-
import { n as oe, t as se } from "./BaseScanner-DZvpgOjM.js";
|
|
6
|
-
import { t as c } from "./useNestedProp-Chvyfpl-.js";
|
|
7
|
-
import { t as ce } from "./useThemeCheck-C43Tcqmk.js";
|
|
8
|
-
import { t as le } from "./DefGrad-DVBqDjhO.js";
|
|
9
|
-
import { t as ue } from "./useChartAccessibility-DYqac8yF.js";
|
|
10
|
-
import { t as l } from "./usePrefersMotion-BC-CsqR1.js";
|
|
11
|
-
import { t as de } from "./vue_ui_sparkgauge-BX1MS3bA.js";
|
|
12
|
-
import { computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createVNode as h, defineAsyncComponent as fe, normalizeClass as pe, normalizeStyle as g, onBeforeUnmount as _, onMounted as v, openBlock as y, ref as b, renderSlot as x, toDisplayString as S, toRefs as me, unref as C, watch as w } from "vue";
|
|
13
|
-
//#region src/components/vue-ui-sparkgauge.vue
|
|
14
|
-
var T = /* @__PURE__ */ e({ default: () => j }), he = ["xmlns", "viewBox"], ge = ["width", "height"], E = [
|
|
15
|
-
"d",
|
|
16
|
-
"stroke",
|
|
17
|
-
"stroke-linecap"
|
|
18
|
-
], D = [
|
|
19
|
-
"d",
|
|
20
|
-
"stroke",
|
|
21
|
-
"stroke-linecap",
|
|
22
|
-
"stroke-dashoffset"
|
|
23
|
-
], O = [
|
|
24
|
-
"x",
|
|
25
|
-
"y",
|
|
26
|
-
"width",
|
|
27
|
-
"height"
|
|
28
|
-
], k = [
|
|
29
|
-
"x",
|
|
30
|
-
"y",
|
|
31
|
-
"font-size",
|
|
32
|
-
"fill",
|
|
33
|
-
"font-weight"
|
|
34
|
-
], A = {
|
|
35
|
-
key: 2,
|
|
36
|
-
ref: "source",
|
|
37
|
-
dir: "auto"
|
|
38
|
-
}, j = {
|
|
39
|
-
__name: "vue-ui-sparkgauge",
|
|
40
|
-
props: {
|
|
41
|
-
config: {
|
|
42
|
-
type: Object,
|
|
43
|
-
default() {
|
|
44
|
-
return {};
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
dataset: {
|
|
48
|
-
type: Object,
|
|
49
|
-
default() {
|
|
50
|
-
return {};
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
setup(e) {
|
|
55
|
-
let T = fe(() => import("./PackageVersion-5SWftabm.js").then((e) => e.t)), { vue_ui_sparkgauge: j } = ae(), { isThemeValid: M, warnInvalidTheme: N } = ce(), P = l(), F = b(null), I = e, L = b(ne()), R = b(W());
|
|
56
|
-
o({
|
|
57
|
-
config: () => R.value,
|
|
58
|
-
dataset: () => I.dataset,
|
|
59
|
-
component: "VueUiSparkgauge",
|
|
60
|
-
rules: [s.noHint]
|
|
61
|
-
});
|
|
62
|
-
let z = u(() => R.value.style.animation.show && !P.value), _e = u(() => r({
|
|
63
|
-
defaultConfig: { style: {
|
|
64
|
-
animation: { show: !1 },
|
|
65
|
-
background: "#99999930",
|
|
66
|
-
colors: {
|
|
67
|
-
min: "#CACACA",
|
|
68
|
-
max: "#6A6A6A"
|
|
69
|
-
},
|
|
70
|
-
track: { autoColor: !0 },
|
|
71
|
-
gutter: { color: "#6A6A6A80" }
|
|
72
|
-
} },
|
|
73
|
-
userConfig: R.value.skeletonConfig ?? {}
|
|
74
|
-
})), { loading: B, FINAL_DATASET: V } = oe({
|
|
75
|
-
...me(I),
|
|
76
|
-
FINAL_CONFIG: R,
|
|
77
|
-
prepareConfig: W,
|
|
78
|
-
skeletonDataset: I.config?.skeletonDataset ?? {
|
|
79
|
-
value: 0,
|
|
80
|
-
min: -1,
|
|
81
|
-
max: 1,
|
|
82
|
-
title: ""
|
|
83
|
-
},
|
|
84
|
-
skeletonConfig: r({
|
|
85
|
-
defaultConfig: R.value,
|
|
86
|
-
userConfig: _e.value
|
|
87
|
-
})
|
|
88
|
-
}), H = u(() => {
|
|
89
|
-
let e = V.value.min ?? 0, t = V.value.max ?? 0;
|
|
90
|
-
return {
|
|
91
|
-
min: e,
|
|
92
|
-
max: t,
|
|
93
|
-
diff: t - e
|
|
94
|
-
};
|
|
95
|
-
}), U = u(() => H.value.diff / R.value.style.animation.speedMs), { svgRef: ve } = ue({ config: { text: I.dataset?.title || "" } });
|
|
96
|
-
function W() {
|
|
97
|
-
let e = c({
|
|
98
|
-
userConfig: I.config,
|
|
99
|
-
defaultConfig: j
|
|
100
|
-
}), t = e.theme;
|
|
101
|
-
if (!t) return e;
|
|
102
|
-
if (!M.value(e)) return N(e), e;
|
|
103
|
-
let n = c({
|
|
104
|
-
userConfig: de[t] || I.config,
|
|
105
|
-
defaultConfig: e
|
|
106
|
-
});
|
|
107
|
-
return c({
|
|
108
|
-
userConfig: I.config,
|
|
109
|
-
defaultConfig: n
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
v(() => {
|
|
113
|
-
K();
|
|
114
|
-
});
|
|
115
|
-
let G = u(() => R.value.debug);
|
|
116
|
-
function K() {
|
|
117
|
-
t(I.dataset) ? a({
|
|
118
|
-
componentName: "VueUiSparkgauge",
|
|
119
|
-
type: "dataset",
|
|
120
|
-
debug: G.value
|
|
121
|
-
}) : ee({
|
|
122
|
-
datasetObject: I.dataset,
|
|
123
|
-
requiredAttributes: [
|
|
124
|
-
"value",
|
|
125
|
-
"min",
|
|
126
|
-
"max"
|
|
127
|
-
]
|
|
128
|
-
}).forEach((e) => {
|
|
129
|
-
a({
|
|
130
|
-
componentName: "VueUiSparkgauge",
|
|
131
|
-
type: "datasetAttribute",
|
|
132
|
-
property: e,
|
|
133
|
-
debug: G.value
|
|
134
|
-
});
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
w(() => I.config, () => {
|
|
138
|
-
R.value = W(), J.value = z.value ? H.value.min : V.value.value, K();
|
|
139
|
-
}, { deep: !0 });
|
|
140
|
-
let q = u(() => ({
|
|
141
|
-
height: R.value.style.height,
|
|
142
|
-
width: 128,
|
|
143
|
-
base: R.value.style.basePosition
|
|
144
|
-
})), J = b(z.value ? H.value.min : V.value.value);
|
|
145
|
-
w([() => V.value.value, z], ([e, t]) => {
|
|
146
|
-
Y(e || 0, t);
|
|
147
|
-
}, { immediate: !0 });
|
|
148
|
-
let ye = u(() => J.value > H.value.max ? H.value.max : J.value < H.value.min ? H.value.min : J.value);
|
|
149
|
-
v(() => {
|
|
150
|
-
Y(V.value.value || 0);
|
|
151
|
-
});
|
|
152
|
-
function Y(e, t = z.value) {
|
|
153
|
-
if (F.value &&= (cancelAnimationFrame(F.value), null), !t) {
|
|
154
|
-
J.value = e;
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
157
|
-
function n() {
|
|
158
|
-
J.value < e ? J.value = Math.min(J.value + U.value, e) : J.value > e && (J.value = Math.max(J.value - U.value, e)), J.value === e ? F.value = null : F.value = requestAnimationFrame(n);
|
|
159
|
-
}
|
|
160
|
-
n();
|
|
161
|
-
}
|
|
162
|
-
let X = u(() => V.value.title ?? ""), Z = u(() => {
|
|
163
|
-
let e = H.value.diff;
|
|
164
|
-
if (!isFinite(e) || e === 0) return 0;
|
|
165
|
-
let t = H.value.min, n = ye.value;
|
|
166
|
-
return n >= 0 ? (n - t) / e : (Math.abs(t) - Math.abs(n)) / e;
|
|
167
|
-
}), Q = u(() => ie(R.value.style.colors.min, R.value.style.colors.max, H.value.min, H.value.max, J.value)), $ = u(() => R.value.style.dataLabel.autoColor ? Q.value : R.value.style.dataLabel.color), be = u(() => R.value.style.track.autoColor ? Q.value : R.value.style.track.color);
|
|
168
|
-
return _(() => {
|
|
169
|
-
F.value && cancelAnimationFrame(F.value);
|
|
170
|
-
}), (e, t) => (y(), p("div", {
|
|
171
|
-
class: "vue-data-ui-component vue-ui-sparkgauge",
|
|
172
|
-
style: g(`font-family:${R.value.style.fontFamily};width: 100%; background:${R.value.style.background}`)
|
|
173
|
-
}, [
|
|
174
|
-
R.value.style.title.show && X.value && R.value.style.title.position === "top" ? (y(), p("div", {
|
|
175
|
-
key: 0,
|
|
176
|
-
class: "vue-data-ui-sparkgauge-label",
|
|
177
|
-
style: g(`font-size:${R.value.style.title.fontSize}px;text-align:${R.value.style.title.textAlign};font-weight:${R.value.style.title.bold ? "bold" : "normal"};color:${R.value.style.title.color}`)
|
|
178
|
-
}, S(X.value), 5)) : f("", !0),
|
|
179
|
-
(y(), p("svg", {
|
|
180
|
-
ref_key: "svgRef",
|
|
181
|
-
ref: ve,
|
|
182
|
-
xmlns: C(re),
|
|
183
|
-
viewBox: `0 0 ${q.value.width} ${q.value.height}`,
|
|
184
|
-
style: "overflow: visible; background:transparent; width:100%;"
|
|
185
|
-
}, [
|
|
186
|
-
h(C(T)),
|
|
187
|
-
e.$slots["chart-background"] && !C(B) ? (y(), p("foreignObject", {
|
|
188
|
-
key: 0,
|
|
189
|
-
x: 0,
|
|
190
|
-
y: 0,
|
|
191
|
-
width: q.value.width,
|
|
192
|
-
height: q.value.height,
|
|
193
|
-
style: { pointerEvents: "none" }
|
|
194
|
-
}, [x(e.$slots, "chart-background")], 8, ge)) : f("", !0),
|
|
195
|
-
m("defs", null, [h(le, {
|
|
196
|
-
t: "linear",
|
|
197
|
-
id: `gradient_${L.value}`,
|
|
198
|
-
x1: "-10%",
|
|
199
|
-
y1: "100%",
|
|
200
|
-
x2: "110%",
|
|
201
|
-
y2: "100%",
|
|
202
|
-
stops: [[
|
|
203
|
-
"0%",
|
|
204
|
-
R.value.style.colors.min,
|
|
205
|
-
1
|
|
206
|
-
], [
|
|
207
|
-
"100%",
|
|
208
|
-
R.value.style.colors.max,
|
|
209
|
-
1
|
|
210
|
-
]]
|
|
211
|
-
}, null, 8, ["id", "stops"])]),
|
|
212
|
-
m("path", {
|
|
213
|
-
d: `M10 ${q.value.base} A 1 1 0 1 1 118 ${q.value.base}`,
|
|
214
|
-
stroke: R.value.style.gutter.color,
|
|
215
|
-
"stroke-width": 8,
|
|
216
|
-
"stroke-linecap": R.value.style.gutter.strokeLinecap,
|
|
217
|
-
fill: "none"
|
|
218
|
-
}, null, 8, E),
|
|
219
|
-
Z.value === 0 ? f("", !0) : (y(), p("path", {
|
|
220
|
-
key: 1,
|
|
221
|
-
d: `M10 ${q.value.base} A 1 1 0 1 1 118 ${q.value.base}`,
|
|
222
|
-
stroke: R.value.style.colors.showGradient ? `url(#gradient_${L.value})` : be.value,
|
|
223
|
-
"stroke-width": 8,
|
|
224
|
-
"stroke-linecap": R.value.style.track.strokeLinecap,
|
|
225
|
-
fill: "none",
|
|
226
|
-
"stroke-dasharray": 169.5,
|
|
227
|
-
"stroke-dashoffset": 169.5 - 169.5 * Z.value,
|
|
228
|
-
class: pe({ "vue-ui-sparkgauge-track": R.value.style.animation.show }),
|
|
229
|
-
style: g(R.value.style.animation.show ? `animation: vue-ui-sparkgauge-animation ${R.value.style.animation.speedMs}ms ease-in;` : "")
|
|
230
|
-
}, null, 14, D)),
|
|
231
|
-
C(B) ? (y(), p("rect", {
|
|
232
|
-
key: 2,
|
|
233
|
-
x: q.value.width / 2 - R.value.style.dataLabel.fontSize / 2,
|
|
234
|
-
y: q.value.base + 6 + R.value.style.dataLabel.offsetY - R.value.style.dataLabel.fontSize,
|
|
235
|
-
width: R.value.style.dataLabel.fontSize,
|
|
236
|
-
height: R.value.style.dataLabel.fontSize,
|
|
237
|
-
fill: "#6A6A6A50",
|
|
238
|
-
rx: 3
|
|
239
|
-
}, null, 8, O)) : (y(), p("text", {
|
|
240
|
-
key: 3,
|
|
241
|
-
"text-anchor": "middle",
|
|
242
|
-
x: q.value.width / 2,
|
|
243
|
-
y: q.value.base + 6 + R.value.style.dataLabel.offsetY,
|
|
244
|
-
"font-size": R.value.style.dataLabel.fontSize,
|
|
245
|
-
fill: $.value,
|
|
246
|
-
"font-weight": R.value.style.dataLabel.bold ? "bold" : "normal"
|
|
247
|
-
}, S(C(te)(R.value.style.dataLabel.formatter, C(i)(J.value), C(n)({
|
|
248
|
-
p: R.value.style.dataLabel.prefix,
|
|
249
|
-
v: C(i)(J.value),
|
|
250
|
-
s: R.value.style.dataLabel.suffix,
|
|
251
|
-
r: R.value.style.dataLabel.rounding
|
|
252
|
-
}), {
|
|
253
|
-
datapoint: C(i)(J.value),
|
|
254
|
-
color: $.value
|
|
255
|
-
})), 9, k))
|
|
256
|
-
], 8, he)),
|
|
257
|
-
R.value.style.title.show && X.value && R.value.style.title.position === "bottom" ? (y(), p("div", {
|
|
258
|
-
key: 1,
|
|
259
|
-
class: "vue-data-ui-sparkgauge-label",
|
|
260
|
-
style: g(`font-size:${R.value.style.title.fontSize}px;text-align:${R.value.style.title.textAlign};font-weight:${R.value.style.title.bold ? "bold" : "normal"};font-weight:${R.value.style.title.bold ? "bold" : "normal"};color:${R.value.style.title.color}`)
|
|
261
|
-
}, S(X.value), 5)) : f("", !0),
|
|
262
|
-
e.$slots.source ? (y(), p("div", A, [x(e.$slots, "source")], 512)) : f("", !0),
|
|
263
|
-
x(e.$slots, "skeleton", {}, () => [C(B) ? (y(), d(se, { key: 0 })) : f("", !0)])
|
|
264
|
-
], 4));
|
|
265
|
-
}
|
|
266
|
-
};
|
|
267
|
-
//#endregion
|
|
268
|
-
export { T as n, j as t };
|