vue-data-ui 3.25.10 → 3.25.12
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-DLn-pcrh.js → Arrow-BhZDUeMp.js} +1 -1
- package/dist/{BaseDraggableDialog-Gm4Q30j0.js → BaseDraggableDialog-Ck6R5Q0K.js} +2 -2
- package/dist/{BaseIcon-D8R6_sKH.js → BaseIcon-Dlz7gfx0.js} +1 -1
- package/dist/{BaseLegendToggle-CXQrLjd-.js → BaseLegendToggle-DGG65LAR.js} +1 -1
- package/dist/{BaseZoomControls-BTzjVDPM.js → BaseZoomControls-BK0PxEa8.js} +2 -2
- package/dist/{ColorPicker-CUy15T72.js → ColorPicker-DMTwxvi_.js} +2 -2
- package/dist/{DataTable-oiM9uWrQ.js → DataTable-BD1eZ0zB.js} +2 -2
- package/dist/{HillActions-Dn8aKOVJ.js → HillActions-CiP2m7Nz.js} +1 -1
- package/dist/{Legend-X4kF4PvW.js → Legend-C0Ln0VNe.js} +2 -2
- package/dist/{NonSvgPenAndPaper-DFXjpRyl.js → NonSvgPenAndPaper-BjrMLISf.js} +3 -3
- package/dist/{PackageVersion-CZZayD-D.js → PackageVersion-KI_qWJHZ.js} +1 -1
- package/dist/{PenAndPaper-Cd3nItcO.js → PenAndPaper-XdUD8uB3.js} +3 -3
- package/dist/{Shape-CIqU-p2F.js → Shape-VCdxvFV9.js} +3 -3
- package/dist/{SlicerPreview-Ccss7Vsq.js → SlicerPreview-BJ4usfYd.js} +21 -21
- package/dist/{SparkTooltip-L3SliZbR.js → SparkTooltip-B1gRxPfb.js} +6 -6
- package/dist/{Title-CPHi-evi.js → Title-DeqmC-vN.js} +1 -1
- package/dist/{Tooltip-hhrkQ3Lk.js → Tooltip-DZ4a3XJQ.js} +1 -1
- package/dist/{UserOptions-qo_Tsqci.js → UserOptions-wFD9vo9g.js} +2 -2
- package/dist/components/arrow.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/{dom-to-png-BR4imuKV.js → dom-to-png-DdqmzDdY.js} +1 -1
- package/dist/exposedLib-BBtjpydc.js +28 -0
- package/dist/{img-BkMKbWsI.js → img-W50sC9SC.js} +1 -1
- package/dist/{labelUtils-BXX2NzRe.js → labelUtils-Dvm-7rse.js} +1 -1
- package/dist/{lib-Dql7cqyA.js → lib-DOpaUOQx.js} +191 -88
- package/dist/{package-CYtJq7s7.js → package-CUB9qFqi.js} +1 -1
- package/dist/{pdf-BSOs_GZz.js → pdf-zGbDDpCi.js} +1 -1
- package/dist/{render-common-CpHpPc5s.js → render-common-DeM1ZJiv.js} +16 -16
- 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 +19 -9
- package/dist/types/vue-ui-heatmap.d.ts +2 -0
- package/dist/{useConfig-D32D002m.js → useConfig-Be2DFBsb.js} +1 -0
- package/dist/{useNestedProp-Chvyfpl-.js → useNestedProp-Bux0f4iY.js} +1 -1
- package/dist/{useObjectBindings-Cd_WuYIn.js → useObjectBindings-DUdzTGvh.js} +1 -1
- package/dist/{usePrinter-hohanNCX.js → usePrinter-BBBooAGP.js} +2 -2
- package/dist/utils.js +13 -13
- package/dist/{vue-data-ui-ChB3aXCO.js → vue-data-ui-COEVZKW5.js} +70 -70
- package/dist/vue-data-ui.js +75 -75
- package/dist/{vue-ui-3d-bar-DcXbkO19.js → vue-ui-3d-bar-DFw5XDWb.js} +536 -536
- package/dist/{vue-ui-accordion-DmkL8A59.js → vue-ui-accordion-BZCjuA3V.js} +4 -4
- package/dist/vue-ui-age-pyramid-DRUCkRz8.js +1305 -0
- package/dist/{vue-ui-annotator-BLYRy--7.js → vue-ui-annotator-BfKA4YVr.js} +60 -60
- package/dist/{vue-ui-bullet-DOfD2TSb.js → vue-ui-bullet-B0IfmAiX.js} +84 -84
- package/dist/{vue-ui-bump-DL2lDZbE.js → vue-ui-bump-C1kUAd9U.js} +105 -105
- package/dist/{vue-ui-candlestick-ijujiVJ5.js → vue-ui-candlestick-KA4AueJw.js} +98 -98
- package/dist/vue-ui-carousel-table-BxUd6pz5.js +467 -0
- package/dist/vue-ui-chestnut-DHSV3tgH.js +2016 -0
- package/dist/{vue-ui-chord-DgBzLfbv.js → vue-ui-chord-DwosQDGy.js} +63 -63
- package/dist/{vue-ui-circle-pack-88qDJbt0.js → vue-ui-circle-pack-OoLvvkpK.js} +50 -50
- package/dist/{vue-ui-cursor-CcEB7Ypx.js → vue-ui-cursor-DIDq-I8_.js} +61 -61
- package/dist/{vue-ui-dag-BeoFmTDs.js → vue-ui-dag-CEe-6BAo.js} +44 -44
- package/dist/{vue-ui-dashboard-NOVcGMCa.js → vue-ui-dashboard-Dyx0Ri4u.js} +70 -70
- package/dist/{vue-ui-digits-BGmT7H1z.js → vue-ui-digits-aocn4lMx.js} +4 -4
- package/dist/{vue-ui-donut-CtXzuWzy.js → vue-ui-donut-7uSOM7lM.js} +203 -203
- package/dist/{vue-ui-donut-CP7ilveE.js → vue-ui-donut-DBwkC_24.js} +551 -551
- package/dist/vue-ui-donut-evolution-BqQ7Tlsc.js +1552 -0
- package/dist/{vue-ui-dumbbell-BR1Cn4wm.js → vue-ui-dumbbell-MGfC3D58.js} +87 -87
- package/dist/{vue-ui-flow-Bm6TgD8I.js → vue-ui-flow-593TeQ2W.js} +99 -99
- package/dist/{vue-ui-funnel-CQ0-9nZT.js → vue-ui-funnel-DkJUBGun.js} +40 -40
- package/dist/vue-ui-galaxy-BrVH1I3l.js +1097 -0
- package/dist/{vue-ui-gauge-B6pyA6Jh.js → vue-ui-gauge-DC4S5TsV.js} +190 -190
- package/dist/{vue-ui-geo-BlG7s8MH.js → vue-ui-geo-Yq0FgILc.js} +12 -12
- package/dist/{vue-ui-gizmo-BlyehpxE.js → vue-ui-gizmo-D9gwOdZE.js} +54 -54
- package/dist/vue-ui-heatmap-CIJRLiRS.js +1606 -0
- package/dist/{vue-ui-hill-CGE0NdNk.js → vue-ui-hill-B8mE9MIi.js} +21 -21
- package/dist/vue-ui-history-plot-Dj4qkhNI.js +1710 -0
- package/dist/{vue-ui-horizontal-bar-Ykwe4M1n.js → vue-ui-horizontal-bar-njm9Qfcd.js} +85 -85
- package/dist/{vue-ui-kpi-B7Nfet0o.js → vue-ui-kpi-CFk0QESG.js} +12 -12
- package/dist/{vue-ui-label-Cs4ZlAqr.js → vue-ui-label-7gnBMFu5.js} +4 -4
- package/dist/{vue-ui-mini-loader-wGeACd-Y.js → vue-ui-mini-loader-CUVEBqJw.js} +3 -3
- package/dist/vue-ui-molecule-GqArgNXc.js +941 -0
- package/dist/vue-ui-mood-radar-Du71PAqx.js +1111 -0
- package/dist/{vue-ui-nested-donuts-Bt-r6uXS.js → vue-ui-nested-donuts-BRGYUoVS.js} +481 -481
- package/dist/vue-ui-onion-C4LsJp_7.js +1247 -0
- package/dist/vue-ui-parallel-coordinate-plot-DumwZpjI.js +1444 -0
- package/dist/vue-ui-quadrant-BFEihaNk.js +1979 -0
- package/dist/{vue-ui-quick-chart-Cb8x00-X.js → vue-ui-quick-chart-COWxCDXU.js} +169 -169
- package/dist/vue-ui-radar-BZMDCj34.js +1386 -0
- package/dist/vue-ui-rating-D0tMtjhc.js +359 -0
- package/dist/vue-ui-relation-circle-DSNuFlbr.js +905 -0
- package/dist/vue-ui-ridgeline-DHHjDn73.js +1630 -0
- package/dist/{vue-ui-rings-BqRWK5rY.js → vue-ui-rings-BMKxADUw.js} +78 -78
- package/dist/{vue-ui-scatter-Bsh6jbdW.js → vue-ui-scatter-BKJUWiYg.js} +136 -136
- package/dist/{vue-ui-skeleton-DbPSsEKV.js → vue-ui-skeleton-_EBFqU7v.js} +510 -510
- package/dist/{vue-ui-smiley-BIjAIpJ9.js → vue-ui-smiley-DsfTcCOQ.js} +6 -6
- package/dist/{vue-ui-spark-trend--8QokOII.js → vue-ui-spark-trend-Dj1tZM1l.js} +96 -96
- package/dist/{vue-ui-sparkbar-DkX9Demg.js → vue-ui-sparkbar-B7ogNgvT.js} +113 -113
- package/dist/vue-ui-sparkgauge-BFGXwszU.js +268 -0
- package/dist/vue-ui-sparkhistogram-c-DSMEiv.js +589 -0
- package/dist/{vue-ui-sparkline-BwldgOYW.js → vue-ui-sparkline-Bm59iQiE.js} +198 -198
- package/dist/{vue-ui-sparkstackbar-Divd0hL_.js → vue-ui-sparkstackbar-DIMZ8Wxa.js} +183 -183
- package/dist/vue-ui-stackbar-C53nXwth.js +2369 -0
- package/dist/vue-ui-stackline-D4ehty6i.js +2483 -0
- package/dist/{vue-ui-strip-plot-BCUPHkCp.js → vue-ui-strip-plot-CNnl1U1H.js} +253 -253
- package/dist/{vue-ui-table-DJeXLYly.js → vue-ui-table-Bbw0YVee.js} +117 -117
- package/dist/{vue-ui-table-heatmap-D5F5bLx5.js → vue-ui-table-heatmap-B1uYpEhA.js} +95 -95
- package/dist/vue-ui-table-sparkline-D98mkhX0.js +738 -0
- package/dist/{vue-ui-thermometer-xu4R8d2f.js → vue-ui-thermometer-CDYrYD7E.js} +23 -23
- package/dist/{vue-ui-timer-i_3bMu3h.js → vue-ui-timer-CW3wa1tF.js} +13 -13
- package/dist/{vue-ui-tiremarks-DGuMI0yH.js → vue-ui-tiremarks-CayzbbTu.js} +30 -30
- package/dist/{vue-ui-treemap-Bvl7elni.js → vue-ui-treemap-BuOGDfHZ.js} +77 -77
- package/dist/vue-ui-waffle-D47Z_prI.js +1633 -0
- package/dist/{vue-ui-wheel-DqHD09iA.js → vue-ui-wheel-CNF5e3TM.js} +185 -185
- package/dist/{vue-ui-word-cloud-BDCuTQ8Q.js → vue-ui-word-cloud-y46KDG7e.js} +46 -46
- package/dist/{vue-ui-world-B0oVwEDj.js → vue-ui-world-DKW2yCXn.js} +133 -133
- package/dist/vue-ui-xy-BgmEGWgv.js +5367 -0
- package/dist/{vue-ui-xy-BJJi0E4D.js → vue-ui-xy-G3lMLlIL.js} +169 -169
- package/dist/{vue-ui-xy-canvas-R2xbgDOy.js → vue-ui-xy-canvas-CMAT-hT1.js} +435 -435
- package/package.json +1 -1
- package/dist/exposedLib-CG3aXJ-v.js +0 -28
- package/dist/vue-ui-age-pyramid-Cnaxt9NI.js +0 -1305
- package/dist/vue-ui-carousel-table-DFtWb2-C.js +0 -467
- package/dist/vue-ui-chestnut-BGXr0s08.js +0 -2016
- package/dist/vue-ui-donut-evolution-D_-y7BZi.js +0 -1552
- package/dist/vue-ui-galaxy-DUto0BOw.js +0 -1097
- package/dist/vue-ui-heatmap-DqbWkKAE.js +0 -1590
- package/dist/vue-ui-history-plot-CaxqIiTb.js +0 -1710
- package/dist/vue-ui-molecule-DWq98OSc.js +0 -941
- package/dist/vue-ui-mood-radar-DDfimq6c.js +0 -1111
- package/dist/vue-ui-onion-D8gOhQHP.js +0 -1247
- package/dist/vue-ui-parallel-coordinate-plot-BbPbJiiu.js +0 -1444
- package/dist/vue-ui-quadrant-BJlf3qW1.js +0 -1979
- package/dist/vue-ui-radar-30PF-qqr.js +0 -1386
- package/dist/vue-ui-rating-Criq0ofQ.js +0 -359
- package/dist/vue-ui-relation-circle-CRiC4PnL.js +0 -905
- package/dist/vue-ui-ridgeline-CSs4Tq_c.js +0 -1630
- package/dist/vue-ui-sparkgauge-Ci_xD5B7.js +0 -268
- package/dist/vue-ui-sparkhistogram-Qe3ZCPRd.js +0 -589
- package/dist/vue-ui-stackbar-BWPSGzN-.js +0 -2369
- package/dist/vue-ui-stackline-BQroSnwZ.js +0 -2483
- package/dist/vue-ui-table-sparkline-DCm8S2uK.js +0 -738
- package/dist/vue-ui-waffle-CVuYg0yU.js +0 -1633
- package/dist/vue-ui-xy-D1dPd68D.js +0 -5298
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as
|
|
4
|
-
import { t as
|
|
5
|
-
import { n as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { Fragment as
|
|
2
|
+
import { $ as t, $t as n, Jt as r, Rt as i, S as ee, Vt as a, X as te, at as o, i as s, qt as c, t as l, tn as u, vt as ne, w as re } from "./lib-DOpaUOQx.js";
|
|
3
|
+
import { n as ie, t as ae } from "./useHints-Dq_w2E8B.js";
|
|
4
|
+
import { t as oe } from "./useConfig-Be2DFBsb.js";
|
|
5
|
+
import { n as se, t as ce } from "./BaseScanner-Dzc8VT3j.js";
|
|
6
|
+
import { t as d } from "./useNestedProp-Bux0f4iY.js";
|
|
7
|
+
import { t as le } from "./useThemeCheck-C43Tcqmk.js";
|
|
8
|
+
import { t as ue } from "./DefGrad-DVBqDjhO.js";
|
|
9
|
+
import { t as de } from "./usePrefersMotion-BC-CsqR1.js";
|
|
10
|
+
import { t as f } 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 me, mergeProps as he, nextTick as ge, normalizeProps as _e, normalizeStyle as y, onMounted as b, openBlock as x, ref as S, renderList as ve, renderSlot as C, toDisplayString as w, toRefs as ye, unref as T, useSlots as be, watch as E } from "vue";
|
|
12
12
|
//#region src/components/vue-ui-sparkbar.vue
|
|
13
13
|
var D = /* @__PURE__ */ e({ default: () => P }), O = [
|
|
14
14
|
"onClick",
|
|
@@ -58,16 +58,16 @@ var D = /* @__PURE__ */ e({ default: () => P }), O = [
|
|
|
58
58
|
},
|
|
59
59
|
emits: ["selectDatapoint"],
|
|
60
60
|
setup(e, { emit: D }) {
|
|
61
|
-
let P =
|
|
62
|
-
|
|
61
|
+
let P = pe(() => import("./PackageVersion-KI_qWJHZ.js").then((e) => e.t)), { vue_ui_sparkbar: Se } = oe(), { isThemeValid: Ce, warnInvalidTheme: we } = le(), F = de(), I = e, Te = be(), L = S(te()), R = S(G()), z = m(() => R.value.style.bar), B = m(() => R.value.style.labels), V = m(() => R.value.style), H = m(() => R.value.debug);
|
|
62
|
+
b(() => {
|
|
63
63
|
Te["chart-background"] && H.value && console.warn("VueUiSparkbar does not support the #chart-background slot.");
|
|
64
|
-
}),
|
|
64
|
+
}), ie({
|
|
65
65
|
config: () => R.value,
|
|
66
66
|
dataset: () => I.dataset,
|
|
67
67
|
component: "VueUiSparkbar",
|
|
68
|
-
rules: [
|
|
68
|
+
rules: [ae.noHint]
|
|
69
69
|
});
|
|
70
|
-
let Ee =
|
|
70
|
+
let Ee = m(() => u({
|
|
71
71
|
defaultConfig: { style: {
|
|
72
72
|
backgroundColor: "#99999930",
|
|
73
73
|
animation: { show: !1 },
|
|
@@ -79,8 +79,8 @@ var D = /* @__PURE__ */ e({ default: () => P }), O = [
|
|
|
79
79
|
bar: { gradient: { underlayerColor: "#6A6A6A" } }
|
|
80
80
|
} },
|
|
81
81
|
userConfig: R.value.skeletonConfig ?? {}
|
|
82
|
-
})), { loading: U, FINAL_DATASET: W, manualLoading: De } =
|
|
83
|
-
...
|
|
82
|
+
})), { loading: U, FINAL_DATASET: W, manualLoading: De } = se({
|
|
83
|
+
...ye(I),
|
|
84
84
|
FINAL_CONFIG: R,
|
|
85
85
|
prepareConfig: G,
|
|
86
86
|
skeletonDataset: I.config?.skeletonDataset ?? [
|
|
@@ -103,40 +103,40 @@ var D = /* @__PURE__ */ e({ default: () => P }), O = [
|
|
|
103
103
|
color: "#DBDBDB"
|
|
104
104
|
}
|
|
105
105
|
],
|
|
106
|
-
skeletonConfig:
|
|
106
|
+
skeletonConfig: u({
|
|
107
107
|
defaultConfig: R.value,
|
|
108
108
|
userConfig: Ee.value
|
|
109
109
|
})
|
|
110
110
|
});
|
|
111
111
|
function G() {
|
|
112
|
-
let e =
|
|
112
|
+
let e = d({
|
|
113
113
|
userConfig: I.config,
|
|
114
114
|
defaultConfig: Se
|
|
115
|
-
}),
|
|
116
|
-
if (!
|
|
115
|
+
}), t = e.theme;
|
|
116
|
+
if (!t) return e;
|
|
117
117
|
if (!Ce.value(e)) return we(e), e;
|
|
118
|
-
let r =
|
|
119
|
-
userConfig:
|
|
118
|
+
let r = d({
|
|
119
|
+
userConfig: f[t] || I.config,
|
|
120
120
|
defaultConfig: e
|
|
121
|
-
}), i =
|
|
121
|
+
}), i = d({
|
|
122
122
|
userConfig: I.config,
|
|
123
123
|
defaultConfig: r
|
|
124
124
|
});
|
|
125
125
|
return {
|
|
126
126
|
...i,
|
|
127
|
-
customPalette: i.customPalette.length ? i.customPalette :
|
|
127
|
+
customPalette: i.customPalette.length ? i.customPalette : n[t] || a
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
130
|
E(() => I.config, (e) => {
|
|
131
131
|
R.value = G();
|
|
132
132
|
}, { deep: !0 });
|
|
133
|
-
let Oe =
|
|
133
|
+
let Oe = m(() => re(R.value.customPalette)), K = S(W.value.map((e) => ({
|
|
134
134
|
...e,
|
|
135
135
|
value: V.value.animation.show ? 0 : e.value || 0,
|
|
136
136
|
formatter: e.formatter || null
|
|
137
|
-
}))), q =
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
}))), q = S(null);
|
|
138
|
+
b(async () => {
|
|
139
|
+
i(I.dataset) && o({
|
|
140
140
|
componentName: "VueUiSparkbar",
|
|
141
141
|
type: "dataset",
|
|
142
142
|
debug: H.value
|
|
@@ -163,27 +163,27 @@ var D = /* @__PURE__ */ e({ default: () => P }), O = [
|
|
|
163
163
|
...e,
|
|
164
164
|
value: V.value.animation.show && !F.value ? 0 : e.value || 0,
|
|
165
165
|
formatter: e.formatter || null
|
|
166
|
-
})),
|
|
166
|
+
})), ge(J);
|
|
167
167
|
}, { deep: !0 });
|
|
168
|
-
let Y =
|
|
168
|
+
let Y = S({
|
|
169
169
|
width: 500,
|
|
170
170
|
height: 16
|
|
171
|
-
}), ke =
|
|
171
|
+
}), ke = m(() => Math.max(...W.value.map((e) => e.value))), Ae = m(() => (H.value && W.value.forEach((e, t) => {
|
|
172
172
|
ne({
|
|
173
173
|
datasetObject: e,
|
|
174
174
|
requiredAttributes: ["name", "value"]
|
|
175
175
|
}).forEach((e) => {
|
|
176
|
-
|
|
176
|
+
o({
|
|
177
177
|
componentName: "VueUiSparkbar",
|
|
178
178
|
type: "datasetSerieAttribute",
|
|
179
179
|
property: e,
|
|
180
180
|
index: t
|
|
181
181
|
});
|
|
182
182
|
});
|
|
183
|
-
}), K.value.map((e,
|
|
183
|
+
}), K.value.map((e, t) => ({
|
|
184
184
|
...e,
|
|
185
185
|
value: e.value || 0,
|
|
186
|
-
color:
|
|
186
|
+
color: ee(e.color) || Oe.value[t] || a[t] || a[t % a.length]
|
|
187
187
|
}))));
|
|
188
188
|
function je(e) {
|
|
189
189
|
return e / ke.value;
|
|
@@ -216,76 +216,76 @@ var D = /* @__PURE__ */ e({ default: () => P }), O = [
|
|
|
216
216
|
seriesIndex: t
|
|
217
217
|
});
|
|
218
218
|
}
|
|
219
|
-
let $ =
|
|
220
|
-
return (e,
|
|
219
|
+
let $ = m(() => z.value.borderRadius == null ? Y.value.height / 2 : Math.min(Y.value.height / 2, z.value.borderRadius));
|
|
220
|
+
return (e, n) => (x(), g("div", {
|
|
221
221
|
class: "vue-data-ui-component vue-ui-sparkbar",
|
|
222
|
-
style:
|
|
222
|
+
style: y({
|
|
223
223
|
width: "100%",
|
|
224
224
|
position: "relative",
|
|
225
225
|
fontFamily: V.value.fontFamily,
|
|
226
|
-
background: I.backgroundOpacity === null ? V.value.backgroundColor :
|
|
226
|
+
background: I.backgroundOpacity === null ? V.value.backgroundColor : T(c)(V.value.backgroundColor, I.backgroundOpacity)
|
|
227
227
|
})
|
|
228
228
|
}, [
|
|
229
|
-
e.$slots.title ?
|
|
229
|
+
e.$slots.title ? C(e.$slots, "title", _e(me({ title: {
|
|
230
230
|
...e.title,
|
|
231
231
|
title: V.value.title.text,
|
|
232
232
|
subtitle: V.value.title.subtitle.text
|
|
233
|
-
} })), void 0, void 0, 0) :
|
|
234
|
-
!e.$slots.title && V.value.title.text ? (
|
|
233
|
+
} })), void 0, void 0, 0) : h("", !0),
|
|
234
|
+
!e.$slots.title && V.value.title.text ? (x(), g("div", {
|
|
235
235
|
key: 1,
|
|
236
236
|
class: "vue-ui-sparkbar-title-container",
|
|
237
|
-
style:
|
|
237
|
+
style: y({
|
|
238
238
|
background: V.value.title.backgroundColor,
|
|
239
239
|
margin: V.value.title.margin,
|
|
240
240
|
textAlign: V.value.title.textAlign
|
|
241
241
|
})
|
|
242
|
-
}, [
|
|
242
|
+
}, [_("div", {
|
|
243
243
|
class: "vue-ui-sparkbar-title",
|
|
244
|
-
style:
|
|
244
|
+
style: y({
|
|
245
245
|
fontSize: V.value.title.fontSize + "px",
|
|
246
246
|
color: V.value.title.color,
|
|
247
247
|
fontWeight: V.value.title.bold ? "bold" : "normal"
|
|
248
248
|
})
|
|
249
|
-
},
|
|
249
|
+
}, w(V.value.title.text), 5), V.value.title.subtitle.text ? (x(), g("div", {
|
|
250
250
|
key: 0,
|
|
251
251
|
class: "vue-ui-sparkbar-subtitle",
|
|
252
|
-
style:
|
|
252
|
+
style: y({
|
|
253
253
|
fontSize: V.value.title.subtitle.fontSize + "px",
|
|
254
254
|
color: V.value.title.subtitle.color,
|
|
255
255
|
fontWeight: V.value.title.subtitle.bold ? "bold" : "normal"
|
|
256
256
|
})
|
|
257
|
-
},
|
|
258
|
-
(
|
|
259
|
-
style:
|
|
260
|
-
onClick: (e) => Me(
|
|
261
|
-
onMouseenter: (e) => Ne(
|
|
262
|
-
onMouseleave: (e) => Pe(
|
|
257
|
+
}, w(V.value.title.subtitle.text), 5)) : h("", !0)], 4)) : h("", !0),
|
|
258
|
+
(x(!0), g(p, null, ve(Ae.value, (n, i) => (x(), g("div", {
|
|
259
|
+
style: y(`display:flex !important;${["left", "right"].includes(B.value.name.position) ? `flex-direction: ${B.value.name.position === "right" ? "row-reverse" : "row"} !important` : "flex-direction:column !important"};gap:${V.value.gap}px !important;align-items:center;${T(W).length > 0 && i !== T(W).length - 1 ? "margin-bottom:6px" : ""}`),
|
|
260
|
+
onClick: (e) => Me(n, i),
|
|
261
|
+
onMouseenter: (e) => Ne(n, i),
|
|
262
|
+
onMouseleave: (e) => Pe(n, i)
|
|
263
263
|
}, [
|
|
264
|
-
|
|
265
|
-
...
|
|
266
|
-
target: Z(
|
|
267
|
-
valueLabel:
|
|
268
|
-
p:
|
|
269
|
-
v:
|
|
270
|
-
s:
|
|
271
|
-
r:
|
|
264
|
+
T(U) ? h("", !0) : C(e.$slots, "data-label", he({ ref_for: !0 }, { bar: {
|
|
265
|
+
...n,
|
|
266
|
+
target: Z(n),
|
|
267
|
+
valueLabel: T(s)(n.formatter, n.value, T(t)({
|
|
268
|
+
p: n.prefix || "",
|
|
269
|
+
v: n.value,
|
|
270
|
+
s: n.suffix || "",
|
|
271
|
+
r: n.rounding || 0
|
|
272
272
|
}), {
|
|
273
|
-
datapoint:
|
|
274
|
-
seriesIndex:
|
|
273
|
+
datapoint: n,
|
|
274
|
+
seriesIndex: i
|
|
275
275
|
}),
|
|
276
|
-
targetLabel:
|
|
277
|
-
p:
|
|
278
|
-
v: Z(
|
|
279
|
-
s:
|
|
280
|
-
r:
|
|
276
|
+
targetLabel: T(s)(n.formatter, Z(n), T(t)({
|
|
277
|
+
p: n.prefix || "",
|
|
278
|
+
v: Z(n),
|
|
279
|
+
s: n.suffix || "",
|
|
280
|
+
r: n.rounding || 0
|
|
281
281
|
}), {
|
|
282
|
-
datapoint:
|
|
283
|
-
seriesIndex:
|
|
282
|
+
datapoint: n,
|
|
283
|
+
seriesIndex: i
|
|
284
284
|
})
|
|
285
285
|
} }), void 0, void 0, 0),
|
|
286
|
-
!e.$slots["data-label"] ||
|
|
286
|
+
!e.$slots["data-label"] || T(U) ? (x(), g("div", {
|
|
287
287
|
key: 1,
|
|
288
|
-
style:
|
|
288
|
+
style: y({
|
|
289
289
|
display: "flex",
|
|
290
290
|
justifyContent: ["right", "top-right"].includes(B.value.name.position) ? "flex-end" : ["top-center"].includes(B.value.name.position) ? "center" : "flex-start",
|
|
291
291
|
alignItems: "center",
|
|
@@ -295,10 +295,10 @@ var D = /* @__PURE__ */ e({ default: () => P }), O = [
|
|
|
295
295
|
fontWeight: B.value.name.bold ? "bold" : "normal",
|
|
296
296
|
flexWrap: "wrap"
|
|
297
297
|
})
|
|
298
|
-
}, [
|
|
298
|
+
}, [T(U) ? (x(), g("div", {
|
|
299
299
|
key: 0,
|
|
300
300
|
class: "vue-ui-sparkbar-skeleton-name",
|
|
301
|
-
style:
|
|
301
|
+
style: y({
|
|
302
302
|
width: "60px",
|
|
303
303
|
height: B.value.fontSize + "px",
|
|
304
304
|
borderRadius: B.value.fontSize / 4 + "px",
|
|
@@ -307,93 +307,93 @@ var D = /* @__PURE__ */ e({ default: () => P }), O = [
|
|
|
307
307
|
justifyContent: "space-between",
|
|
308
308
|
marginTop: "5px"
|
|
309
309
|
})
|
|
310
|
-
}, [
|
|
310
|
+
}, [_("div", { style: y({
|
|
311
311
|
height: "100%",
|
|
312
312
|
width: "40px",
|
|
313
313
|
borderRadius: B.value.fontSize / 4 + "px",
|
|
314
314
|
backgroundColor: "#6A6A6A80"
|
|
315
|
-
}) }, null, 4),
|
|
315
|
+
}) }, null, 4), _("div", { style: y({
|
|
316
316
|
height: "100%",
|
|
317
317
|
width: "15px",
|
|
318
318
|
borderRadius: B.value.fontSize / 4 + "px",
|
|
319
319
|
backgroundColor: "#6A6A6A80"
|
|
320
|
-
}) }, null, 4)], 4)) : (
|
|
321
|
-
|
|
322
|
-
B.value.value.show ? (
|
|
320
|
+
}) }, null, 4)], 4)) : (x(), g(p, { key: 1 }, [
|
|
321
|
+
_("span", null, w(n.name), 1),
|
|
322
|
+
B.value.value.show ? (x(), g("span", {
|
|
323
323
|
key: 0,
|
|
324
|
-
style:
|
|
324
|
+
style: y(`font-weight:${B.value.value.bold ? "bold" : "normal"}`),
|
|
325
325
|
class: "vue-ui-sparkbar-datapoint-name"
|
|
326
|
-
}, ": " +
|
|
327
|
-
p:
|
|
328
|
-
v:
|
|
329
|
-
s:
|
|
330
|
-
r:
|
|
326
|
+
}, ": " + w(T(s)(n.formatter, n.value, T(t)({
|
|
327
|
+
p: n.prefix || "",
|
|
328
|
+
v: n.value,
|
|
329
|
+
s: n.suffix || "",
|
|
330
|
+
r: n.rounding || 0
|
|
331
331
|
}), {
|
|
332
|
-
datapoint:
|
|
333
|
-
seriesIndex:
|
|
334
|
-
})), 5)) :
|
|
335
|
-
V.value.layout.showTargetValue ? (
|
|
336
|
-
p:
|
|
337
|
-
v: Z(
|
|
338
|
-
s:
|
|
339
|
-
r:
|
|
332
|
+
datapoint: n,
|
|
333
|
+
seriesIndex: i
|
|
334
|
+
})), 5)) : h("", !0),
|
|
335
|
+
V.value.layout.showTargetValue ? (x(), g("span", k, w(" " + V.value.layout.targetValueText) + " " + w(T(s)(n.formatter, Z(n), T(t)({
|
|
336
|
+
p: n.prefix || "",
|
|
337
|
+
v: Z(n),
|
|
338
|
+
s: n.suffix || "",
|
|
339
|
+
r: n.rounding || 0
|
|
340
340
|
}), {
|
|
341
|
-
datapoint:
|
|
342
|
-
seriesIndex:
|
|
343
|
-
})), 1)) :
|
|
344
|
-
], 64))], 4)) :
|
|
345
|
-
(
|
|
341
|
+
datapoint: n,
|
|
342
|
+
seriesIndex: i
|
|
343
|
+
})), 1)) : h("", !0)
|
|
344
|
+
], 64))], 4)) : h("", !0),
|
|
345
|
+
(x(), g("svg", {
|
|
346
346
|
role: "img",
|
|
347
|
-
xmlns:
|
|
347
|
+
xmlns: T(l),
|
|
348
348
|
viewBox: `0 0 ${Y.value.width} ${Y.value.height}`,
|
|
349
349
|
width: "100%"
|
|
350
350
|
}, [
|
|
351
|
-
|
|
352
|
-
|
|
351
|
+
v(T(P)),
|
|
352
|
+
_("defs", null, [v(ue, {
|
|
353
353
|
t: "linear",
|
|
354
354
|
x1: "0%",
|
|
355
355
|
y1: "0%",
|
|
356
356
|
x2: "100%",
|
|
357
357
|
y2: "0%",
|
|
358
|
-
id: `sparkbar_gradient_${
|
|
358
|
+
id: `sparkbar_gradient_${i}_${L.value}`,
|
|
359
359
|
stops: [[
|
|
360
360
|
"0%",
|
|
361
|
-
|
|
361
|
+
T(c)(T(r)(n.color, .03), 100 - z.value.gradient.intensity),
|
|
362
362
|
1
|
|
363
363
|
], [
|
|
364
364
|
"100%",
|
|
365
|
-
|
|
365
|
+
n.color,
|
|
366
366
|
1
|
|
367
367
|
]]
|
|
368
368
|
}, null, 8, ["id", "stops"])]),
|
|
369
|
-
|
|
369
|
+
_("rect", {
|
|
370
370
|
height: Y.value.height,
|
|
371
371
|
width: Y.value.width,
|
|
372
372
|
x: 0,
|
|
373
373
|
y: 0,
|
|
374
|
-
fill:
|
|
374
|
+
fill: T(c)(V.value.gutter.backgroundColor, V.value.gutter.opacity),
|
|
375
375
|
rx: $.value
|
|
376
376
|
}, null, 8, j),
|
|
377
|
-
|
|
377
|
+
_("rect", {
|
|
378
378
|
height: Y.value.height,
|
|
379
|
-
width: Y.value.width * X(
|
|
379
|
+
width: Y.value.width * X(n),
|
|
380
380
|
x: 0,
|
|
381
381
|
y: 0,
|
|
382
382
|
fill: z.value.gradient.underlayerColor,
|
|
383
383
|
rx: $.value
|
|
384
384
|
}, null, 8, M),
|
|
385
|
-
|
|
385
|
+
_("rect", {
|
|
386
386
|
height: Y.value.height,
|
|
387
|
-
width: Y.value.width * X(
|
|
387
|
+
width: Y.value.width * X(n),
|
|
388
388
|
x: 0,
|
|
389
389
|
y: 0,
|
|
390
|
-
fill: z.value.gradient.show ? `url(#sparkbar_gradient_${
|
|
390
|
+
fill: z.value.gradient.show ? `url(#sparkbar_gradient_${i}_${L.value})` : n.color,
|
|
391
391
|
rx: $.value
|
|
392
392
|
}, null, 8, N)
|
|
393
393
|
], 8, A))
|
|
394
394
|
], 44, O))), 256)),
|
|
395
|
-
e.$slots.source ? (
|
|
396
|
-
|
|
395
|
+
e.$slots.source ? (x(), g("div", xe, [C(e.$slots, "source")], 512)) : h("", !0),
|
|
396
|
+
T(U) ? (x(), fe(ce, { key: 3 })) : h("", !0)
|
|
397
397
|
], 4));
|
|
398
398
|
}
|
|
399
399
|
};
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { $ as t, Rt as n, X as ee, at as r, b as i, i as te, t as ne, tn as a, vt as o, wt as s } from "./lib-DOpaUOQx.js";
|
|
3
|
+
import { n as re, t as ie } from "./useHints-Dq_w2E8B.js";
|
|
4
|
+
import { t as ae } from "./useConfig-Be2DFBsb.js";
|
|
5
|
+
import { n as oe, t as c } from "./BaseScanner-Dzc8VT3j.js";
|
|
6
|
+
import { t as l } from "./useNestedProp-Bux0f4iY.js";
|
|
7
|
+
import { t as u } from "./useThemeCheck-C43Tcqmk.js";
|
|
8
|
+
import { t as se } from "./DefGrad-DVBqDjhO.js";
|
|
9
|
+
import { t as ce } from "./useChartAccessibility-DYqac8yF.js";
|
|
10
|
+
import { t as le } from "./usePrefersMotion-BC-CsqR1.js";
|
|
11
|
+
import { t as ue } from "./vue_ui_sparkgauge-BX1MS3bA.js";
|
|
12
|
+
import { computed as d, createBlock as de, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createVNode as h, defineAsyncComponent as fe, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as pe, 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: () => k }), he = ["xmlns", "viewBox"], ge = ["width", "height"], _e = [
|
|
15
|
+
"d",
|
|
16
|
+
"stroke",
|
|
17
|
+
"stroke-linecap"
|
|
18
|
+
], ve = [
|
|
19
|
+
"d",
|
|
20
|
+
"stroke",
|
|
21
|
+
"stroke-linecap",
|
|
22
|
+
"stroke-dashoffset"
|
|
23
|
+
], E = [
|
|
24
|
+
"x",
|
|
25
|
+
"y",
|
|
26
|
+
"width",
|
|
27
|
+
"height"
|
|
28
|
+
], D = [
|
|
29
|
+
"x",
|
|
30
|
+
"y",
|
|
31
|
+
"font-size",
|
|
32
|
+
"fill",
|
|
33
|
+
"font-weight"
|
|
34
|
+
], O = {
|
|
35
|
+
key: 2,
|
|
36
|
+
ref: "source",
|
|
37
|
+
dir: "auto"
|
|
38
|
+
}, k = {
|
|
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-KI_qWJHZ.js").then((e) => e.t)), { vue_ui_sparkgauge: k } = ae(), { isThemeValid: A, warnInvalidTheme: j } = u(), M = le(), N = b(null), P = e, F = b(ee()), I = b(W()), L = d(() => I.value.style.dataLabel), R = d(() => I.value.style);
|
|
56
|
+
re({
|
|
57
|
+
config: () => I.value,
|
|
58
|
+
dataset: () => P.dataset,
|
|
59
|
+
component: "VueUiSparkgauge",
|
|
60
|
+
rules: [ie.noHint]
|
|
61
|
+
});
|
|
62
|
+
let z = d(() => R.value.animation.show && !M.value), ye = d(() => a({
|
|
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: I.value.skeletonConfig ?? {}
|
|
74
|
+
})), { loading: B, FINAL_DATASET: V } = oe({
|
|
75
|
+
...me(P),
|
|
76
|
+
FINAL_CONFIG: I,
|
|
77
|
+
prepareConfig: W,
|
|
78
|
+
skeletonDataset: P.config?.skeletonDataset ?? {
|
|
79
|
+
value: 0,
|
|
80
|
+
min: -1,
|
|
81
|
+
max: 1,
|
|
82
|
+
title: ""
|
|
83
|
+
},
|
|
84
|
+
skeletonConfig: a({
|
|
85
|
+
defaultConfig: I.value,
|
|
86
|
+
userConfig: ye.value
|
|
87
|
+
})
|
|
88
|
+
}), H = d(() => {
|
|
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 = d(() => H.value.diff / R.value.animation.speedMs), { svgRef: be } = ce({ config: { text: P.dataset?.title || "" } });
|
|
96
|
+
function W() {
|
|
97
|
+
let e = l({
|
|
98
|
+
userConfig: P.config,
|
|
99
|
+
defaultConfig: k
|
|
100
|
+
}), t = e.theme;
|
|
101
|
+
if (!t) return e;
|
|
102
|
+
if (!A.value(e)) return j(e), e;
|
|
103
|
+
let n = l({
|
|
104
|
+
userConfig: ue[t] || P.config,
|
|
105
|
+
defaultConfig: e
|
|
106
|
+
});
|
|
107
|
+
return l({
|
|
108
|
+
userConfig: P.config,
|
|
109
|
+
defaultConfig: n
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
v(() => {
|
|
113
|
+
K();
|
|
114
|
+
});
|
|
115
|
+
let G = d(() => I.value.debug);
|
|
116
|
+
function K() {
|
|
117
|
+
n(P.dataset) ? r({
|
|
118
|
+
componentName: "VueUiSparkgauge",
|
|
119
|
+
type: "dataset",
|
|
120
|
+
debug: G.value
|
|
121
|
+
}) : o({
|
|
122
|
+
datasetObject: P.dataset,
|
|
123
|
+
requiredAttributes: [
|
|
124
|
+
"value",
|
|
125
|
+
"min",
|
|
126
|
+
"max"
|
|
127
|
+
]
|
|
128
|
+
}).forEach((e) => {
|
|
129
|
+
r({
|
|
130
|
+
componentName: "VueUiSparkgauge",
|
|
131
|
+
type: "datasetAttribute",
|
|
132
|
+
property: e,
|
|
133
|
+
debug: G.value
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
w(() => P.config, () => {
|
|
138
|
+
I.value = W(), J.value = z.value ? H.value.min : V.value.value, K();
|
|
139
|
+
}, { deep: !0 });
|
|
140
|
+
let q = d(() => ({
|
|
141
|
+
height: R.value.height,
|
|
142
|
+
width: 128,
|
|
143
|
+
base: R.value.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 xe = d(() => 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 (N.value &&= (cancelAnimationFrame(N.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 ? N.value = null : N.value = requestAnimationFrame(n);
|
|
159
|
+
}
|
|
160
|
+
n();
|
|
161
|
+
}
|
|
162
|
+
let X = d(() => V.value.title ?? ""), Z = d(() => {
|
|
163
|
+
let e = H.value.diff;
|
|
164
|
+
if (!isFinite(e) || e === 0) return 0;
|
|
165
|
+
let t = H.value.min, n = xe.value;
|
|
166
|
+
return n >= 0 ? (n - t) / e : (Math.abs(t) - Math.abs(n)) / e;
|
|
167
|
+
}), Q = d(() => s(R.value.colors.min, R.value.colors.max, H.value.min, H.value.max, J.value)), $ = d(() => L.value.autoColor ? Q.value : L.value.color), Se = d(() => R.value.track.autoColor ? Q.value : R.value.track.color);
|
|
168
|
+
return pe(() => {
|
|
169
|
+
N.value && cancelAnimationFrame(N.value);
|
|
170
|
+
}), (e, n) => (y(), p("div", {
|
|
171
|
+
class: "vue-data-ui-component vue-ui-sparkgauge",
|
|
172
|
+
style: _(`font-family:${R.value.fontFamily};width: 100%; background:${R.value.background}`)
|
|
173
|
+
}, [
|
|
174
|
+
R.value.title.show && X.value && R.value.title.position === "top" ? (y(), p("div", {
|
|
175
|
+
key: 0,
|
|
176
|
+
class: "vue-data-ui-sparkgauge-label",
|
|
177
|
+
style: _(`font-size:${R.value.title.fontSize}px;text-align:${R.value.title.textAlign};font-weight:${R.value.title.bold ? "bold" : "normal"};color:${R.value.title.color}`)
|
|
178
|
+
}, S(X.value), 5)) : f("", !0),
|
|
179
|
+
(y(), p("svg", {
|
|
180
|
+
ref_key: "svgRef",
|
|
181
|
+
ref: be,
|
|
182
|
+
xmlns: C(ne),
|
|
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(se, {
|
|
196
|
+
t: "linear",
|
|
197
|
+
id: `gradient_${F.value}`,
|
|
198
|
+
x1: "-10%",
|
|
199
|
+
y1: "100%",
|
|
200
|
+
x2: "110%",
|
|
201
|
+
y2: "100%",
|
|
202
|
+
stops: [[
|
|
203
|
+
"0%",
|
|
204
|
+
R.value.colors.min,
|
|
205
|
+
1
|
|
206
|
+
], [
|
|
207
|
+
"100%",
|
|
208
|
+
R.value.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.gutter.color,
|
|
215
|
+
"stroke-width": 8,
|
|
216
|
+
"stroke-linecap": R.value.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.colors.showGradient ? `url(#gradient_${F.value})` : Se.value,
|
|
223
|
+
"stroke-width": 8,
|
|
224
|
+
"stroke-linecap": R.value.track.strokeLinecap,
|
|
225
|
+
fill: "none",
|
|
226
|
+
"stroke-dasharray": 169.5,
|
|
227
|
+
"stroke-dashoffset": 169.5 - 169.5 * Z.value,
|
|
228
|
+
class: g({ "vue-ui-sparkgauge-track": R.value.animation.show }),
|
|
229
|
+
style: _(R.value.animation.show ? `animation: vue-ui-sparkgauge-animation ${R.value.animation.speedMs}ms ease-in;` : "")
|
|
230
|
+
}, null, 14, ve)),
|
|
231
|
+
C(B) ? (y(), p("rect", {
|
|
232
|
+
key: 2,
|
|
233
|
+
x: q.value.width / 2 - L.value.fontSize / 2,
|
|
234
|
+
y: q.value.base + 6 + L.value.offsetY - L.value.fontSize,
|
|
235
|
+
width: L.value.fontSize,
|
|
236
|
+
height: L.value.fontSize,
|
|
237
|
+
fill: "#6A6A6A50",
|
|
238
|
+
rx: 3
|
|
239
|
+
}, null, 8, E)) : (y(), p("text", {
|
|
240
|
+
key: 3,
|
|
241
|
+
"text-anchor": "middle",
|
|
242
|
+
x: q.value.width / 2,
|
|
243
|
+
y: q.value.base + 6 + L.value.offsetY,
|
|
244
|
+
"font-size": L.value.fontSize,
|
|
245
|
+
fill: $.value,
|
|
246
|
+
"font-weight": L.value.bold ? "bold" : "normal"
|
|
247
|
+
}, S(C(te)(L.value.formatter, C(i)(J.value), C(t)({
|
|
248
|
+
p: L.value.prefix,
|
|
249
|
+
v: C(i)(J.value),
|
|
250
|
+
s: L.value.suffix,
|
|
251
|
+
r: L.value.rounding
|
|
252
|
+
}), {
|
|
253
|
+
datapoint: C(i)(J.value),
|
|
254
|
+
color: $.value
|
|
255
|
+
})), 9, D))
|
|
256
|
+
], 8, he)),
|
|
257
|
+
R.value.title.show && X.value && R.value.title.position === "bottom" ? (y(), p("div", {
|
|
258
|
+
key: 1,
|
|
259
|
+
class: "vue-data-ui-sparkgauge-label",
|
|
260
|
+
style: _(`font-size:${R.value.title.fontSize}px;text-align:${R.value.title.textAlign};font-weight:${R.value.title.bold ? "bold" : "normal"};font-weight:${R.value.title.bold ? "bold" : "normal"};color:${R.value.title.color}`)
|
|
261
|
+
}, S(X.value), 5)) : f("", !0),
|
|
262
|
+
e.$slots.source ? (y(), p("div", O, [x(e.$slots, "source")], 512)) : f("", !0),
|
|
263
|
+
x(e.$slots, "skeleton", {}, () => [C(B) ? (y(), de(c, { key: 0 })) : f("", !0)])
|
|
264
|
+
], 4));
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
//#endregion
|
|
268
|
+
export { T as n, k as t };
|