vue-data-ui 3.25.5 → 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/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-Bn3MY7eL.js → ColorPicker-CUy15T72.js} +1 -1
- package/dist/{DataTable-COIO9gi4.js → DataTable-oiM9uWrQ.js} +1 -1
- package/dist/{HillActions-Cl-dNBZR.js → HillActions-Dn8aKOVJ.js} +1 -1
- package/dist/{NonSvgPenAndPaper-KXRhcsxM.js → NonSvgPenAndPaper-DFXjpRyl.js} +2 -2
- package/dist/{PackageVersion-M2Ws-VwJ.js → PackageVersion-ur6jKRL5.js} +1 -1
- package/dist/{PenAndPaper-BgH3m_LP.js → PenAndPaper-KFzKlvbi.js} +2 -2
- 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-ta2JoIjx.js → package-Dx7M6sYy.js} +1 -1
- package/dist/{render-common-bvOuxfN3.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 +10 -0
- package/dist/{useConfig-C_mX5pOZ.js → useConfig-CIQZ6_r7.js} +11 -1
- package/dist/{useObjectBindings-uXpBcVyo.js → useObjectBindings---mHNfbS.js} +2 -2
- package/dist/utils.js +1 -1
- package/dist/{vue-data-ui-BjdCpsRV.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-DRf3NQyH.js → vue-ui-accordion-BSmBUjwZ.js} +2 -2
- package/dist/vue-ui-age-pyramid-DuHblCNO.js +1293 -0
- package/dist/{vue-ui-annotator-DZ0O8Xa5.js → vue-ui-annotator-CTQHAPho.js} +676 -676
- package/dist/vue-ui-bullet-CYLnKrmM.js +702 -0
- package/dist/{vue-ui-bump-DoHnD1Xy.js → vue-ui-bump-DhwySwgn.js} +380 -380
- package/dist/vue-ui-candlestick-BpiECaDj.js +1859 -0
- package/dist/{vue-ui-carousel-table-k1cBJ1i1.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-CQWLyEx0.js → vue-ui-cursor-CHQcHAHQ.js} +2 -2
- package/dist/{vue-ui-dag-BqlsutMj.js → vue-ui-dag-C_inEafb.js} +792 -792
- package/dist/{vue-ui-dashboard-Be3MmkgS.js → vue-ui-dashboard-Bs2mBur5.js} +67 -67
- package/dist/{vue-ui-digits-BqdfbcKX.js → vue-ui-digits-DwE4MoXI.js} +2 -2
- package/dist/vue-ui-donut-BM9dMHXj.js +2415 -0
- package/dist/{vue-ui-donut-gzGZ42uH.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-Ca8kPYr-.js → vue-ui-geo-DXIHhp-G.js} +429 -429
- package/dist/{vue-ui-gizmo-wUqHJICb.js → vue-ui-gizmo-PuURiePo.js} +2 -2
- package/dist/vue-ui-heatmap-mvWLKB99.js +1555 -0
- package/dist/{vue-ui-hill-D6Y9Xy2K.js → vue-ui-hill-DqsVJkmO.js} +470 -470
- package/dist/vue-ui-history-plot-BBVLgt9_.js +1698 -0
- package/dist/{vue-ui-horizontal-bar-3on3-H3B.js → vue-ui-horizontal-bar-y8Q8PZwT.js} +511 -511
- package/dist/{vue-ui-kpi-CUpRRIUf.js → vue-ui-kpi-B2hf3kpp.js} +2 -2
- package/dist/{vue-ui-label-DR2qUZOG.js → vue-ui-label-ClMQ5Gez.js} +1 -1
- package/dist/{vue-ui-mini-loader-D8W-fERs.js → vue-ui-mini-loader-DtPOVIkK.js} +1 -1
- package/dist/vue-ui-molecule-eeW1Pmg8.js +929 -0
- package/dist/{vue-ui-mood-radar-TW251icr.js → vue-ui-mood-radar-Dd1qfUiu.js} +376 -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-RM25bxtf.js → vue-ui-parallel-coordinate-plot-Cp3pCyxK.js} +407 -407
- package/dist/vue-ui-quadrant-C3kQtaeX.js +1967 -0
- package/dist/{vue-ui-quick-chart-Cswm3_eI.js → vue-ui-quick-chart-BZq517pL.js} +4 -4
- 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-D_u8EWeW.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-9qkNNZG6.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-XmDK1aHJ.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-CLx3SPRv.js → vue-ui-thermometer-D0_KsB-y.js} +192 -192
- package/dist/{vue-ui-timer-BDWUNb6t.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-C2atz4Xm.js → vue-ui-world-BOBHo7-L.js} +524 -524
- package/dist/vue-ui-xy-CSTJzRkk.js +5283 -0
- package/dist/{vue-ui-xy-CpA0W6zM.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-C0aLR6lw.js +0 -1831
- package/dist/vue-ui-age-pyramid-DUcB3lYs.js +0 -1243
- package/dist/vue-ui-bullet-DIOCMF2H.js +0 -702
- package/dist/vue-ui-candlestick-Cf8TYPl5.js +0 -1859
- package/dist/vue-ui-chestnut-BMAuaeif.js +0 -2016
- package/dist/vue-ui-chord-DCe2iPjk.js +0 -1347
- package/dist/vue-ui-circle-pack-Eb5hS_z3.js +0 -1635
- package/dist/vue-ui-donut-CuQVKuZa.js +0 -2415
- package/dist/vue-ui-donut-evolution-DckruxZ9.js +0 -1552
- package/dist/vue-ui-dumbbell-BYU-hh2E.js +0 -1531
- package/dist/vue-ui-flow-DLRcNDLc.js +0 -1217
- package/dist/vue-ui-funnel-DjoqNN1U.js +0 -749
- package/dist/vue-ui-galaxy-BhR4IOra.js +0 -1085
- package/dist/vue-ui-gauge-Cq161Kwp.js +0 -934
- package/dist/vue-ui-heatmap-Bl5ymvi9.js +0 -1555
- package/dist/vue-ui-history-plot-CvVjsdCL.js +0 -1698
- package/dist/vue-ui-molecule-BExVLLgE.js +0 -929
- package/dist/vue-ui-nested-donuts-CWzJKr3S.js +0 -1503
- package/dist/vue-ui-onion-VaYZQK5i.js +0 -1235
- package/dist/vue-ui-quadrant-Dmtwow7n.js +0 -1967
- package/dist/vue-ui-radar-C3GYthqu.js +0 -1374
- package/dist/vue-ui-rating-CBdDXL80.js +0 -359
- package/dist/vue-ui-relation-circle-BA0qy0kp.js +0 -905
- package/dist/vue-ui-ridgeline-C5skjBTe.js +0 -1630
- package/dist/vue-ui-rings-BJ8yEQMw.js +0 -1252
- package/dist/vue-ui-scatter-DXg8ESgr.js +0 -2405
- package/dist/vue-ui-smiley-DQOp87rr.js +0 -376
- package/dist/vue-ui-spark-trend-CjCufXof.js +0 -457
- package/dist/vue-ui-sparkbar-BniEM15a.js +0 -401
- package/dist/vue-ui-sparkgauge-BtyCrqTQ.js +0 -268
- package/dist/vue-ui-sparkhistogram-DQdn3PW1.js +0 -589
- package/dist/vue-ui-sparkstackbar-BXQlOdOk.js +0 -738
- package/dist/vue-ui-stackbar-CkjicNDv.js +0 -2355
- package/dist/vue-ui-stackline-BB1IZta8.js +0 -2469
- package/dist/vue-ui-strip-plot-DGLGuH6e.js +0 -1740
- package/dist/vue-ui-table-BXz_HY2g.js +0 -1352
- package/dist/vue-ui-table-sparkline-MTEw3imE.js +0 -738
- package/dist/vue-ui-tiremarks-DoaypTC-.js +0 -540
- package/dist/vue-ui-treemap-Bv7PgpiC.js +0 -1733
- package/dist/vue-ui-waffle-z2DhvSAx.js +0 -1621
- package/dist/vue-ui-wheel-DYLBJuFb.js +0 -873
- package/dist/vue-ui-word-cloud-CbpEhSdL.js +0 -1710
- package/dist/vue-ui-xy-B3DQ6t46.js +0 -5283
- package/dist/vue-ui-xy-canvas-CJefORWc.js +0 -1824
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { Ot as t, P as n, Pt as r, Ut as i, X as a, Zt as ee, b as o, g as te, i as ne, nt as re, q as ie, t as ae } from "./lib-Dql7cqyA.js";
|
|
3
|
+
import { n as oe, t as se } from "./useHints-Dq_w2E8B.js";
|
|
4
|
+
import { t as ce } from "./useConfig-CIQZ6_r7.js";
|
|
5
|
+
import { n as le, t as ue } from "./BaseScanner-DZvpgOjM.js";
|
|
6
|
+
import { t as s } from "./useNestedProp-Chvyfpl-.js";
|
|
7
|
+
import { t as de } from "./useThemeCheck-C43Tcqmk.js";
|
|
8
|
+
import { t as fe } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
9
|
+
import { l as pe, t as me } from "./useResponsive-ZtArZtUf.js";
|
|
10
|
+
import { t as he } from "./DefGrad-DVBqDjhO.js";
|
|
11
|
+
import { t as ge } from "./usePrefersMotion-BC-CsqR1.js";
|
|
12
|
+
import { t as _e } from "./useFitSvgText-CXTzBplU.js";
|
|
13
|
+
import { t as ve } from "./vue_ui_spark_trend-DxVmpkmC.js";
|
|
14
|
+
import { computed as c, createBlock as ye, createCommentVNode as l, createElementBlock as u, createElementVNode as be, createVNode as xe, defineAsyncComponent as Se, nextTick as Ce, normalizeStyle as we, onMounted as Te, openBlock as d, ref as f, renderSlot as p, toDisplayString as m, toRefs as Ee, unref as h, watch as g } from "vue";
|
|
15
|
+
//#region src/components/vue-ui-spark-trend.vue
|
|
16
|
+
var _ = /* @__PURE__ */ e({ default: () => v }), De = ["id", "aria-describedby"], Oe = ["id"], ke = ["xmlns", "viewBox"], Ae = ["width", "height"], je = { key: 1 }, Me = ["d", "fill"], Ne = ["d", "fill"], Pe = [
|
|
17
|
+
"d",
|
|
18
|
+
"stroke",
|
|
19
|
+
"stroke-width",
|
|
20
|
+
"stroke-linecap",
|
|
21
|
+
"stroke-linejoin"
|
|
22
|
+
], Fe = [
|
|
23
|
+
"d",
|
|
24
|
+
"stroke",
|
|
25
|
+
"stroke-width",
|
|
26
|
+
"stroke-linecap",
|
|
27
|
+
"stroke-linejoin"
|
|
28
|
+
], Ie = ["d"], Le = ["fill", "d"], Re = [
|
|
29
|
+
"x",
|
|
30
|
+
"y",
|
|
31
|
+
"width",
|
|
32
|
+
"height"
|
|
33
|
+
], ze = [
|
|
34
|
+
"x",
|
|
35
|
+
"y",
|
|
36
|
+
"fill",
|
|
37
|
+
"font-size",
|
|
38
|
+
"font-weight"
|
|
39
|
+
], Be = [
|
|
40
|
+
"stroke",
|
|
41
|
+
"cx",
|
|
42
|
+
"cy",
|
|
43
|
+
"fill"
|
|
44
|
+
], Ve = [
|
|
45
|
+
"x",
|
|
46
|
+
"y",
|
|
47
|
+
"font-size",
|
|
48
|
+
"fill",
|
|
49
|
+
"font-weight"
|
|
50
|
+
], v = /*#__PURE__*/ fe({
|
|
51
|
+
__name: "vue-ui-spark-trend",
|
|
52
|
+
props: {
|
|
53
|
+
config: {
|
|
54
|
+
type: Object,
|
|
55
|
+
default() {
|
|
56
|
+
return {};
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
dataset: {
|
|
60
|
+
type: Array,
|
|
61
|
+
default() {
|
|
62
|
+
return [];
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
setup(e) {
|
|
67
|
+
let fe = Se(() => import("./PackageVersion-ur6jKRL5.js").then((e) => e.t)), { vue_ui_spark_trend: _ } = ce(), { isThemeValid: v, warnInvalidTheme: He } = de(), y = ge(), b = e, x = f(null), Ue = f(null), We = f(null), S = f(null), C = f(null), w = f(!1), T = f(null), E = f(ie()), D = f(I()), O = c(() => D.value.style.dataLabel), k = c(() => D.value.style.trendLabel), A = c(() => D.value.style.line), j = c(() => D.value.style.area), M = c(() => D.value.style);
|
|
68
|
+
oe({
|
|
69
|
+
config: () => D.value,
|
|
70
|
+
dataset: () => b.dataset,
|
|
71
|
+
component: "VueUiSparkTrend",
|
|
72
|
+
rules: [se.emptyArray, {
|
|
73
|
+
test: (e) => e.length > 1095,
|
|
74
|
+
message: [
|
|
75
|
+
"👀 The dataset has > 1095 datapoints. Above this threshold, the dataset is computed through an LTTB algorithm, to preserve the shape of the data without increasing the number of datapoints.",
|
|
76
|
+
"",
|
|
77
|
+
"▶️ If you need this level of detail, you can change config.downsample.threshold and set a higher value. Note that performance will be impacted."
|
|
78
|
+
]
|
|
79
|
+
}]
|
|
80
|
+
});
|
|
81
|
+
let Ge = c(() => ee({
|
|
82
|
+
defaultConfig: { style: {
|
|
83
|
+
animation: { show: !1 },
|
|
84
|
+
backgroundColor: "#99999930",
|
|
85
|
+
line: {
|
|
86
|
+
stroke: "#6A6A6A",
|
|
87
|
+
useColorTrend: !1
|
|
88
|
+
},
|
|
89
|
+
dataLabel: {
|
|
90
|
+
show: !1,
|
|
91
|
+
useColorTrend: !1,
|
|
92
|
+
color: "#6A6A6A"
|
|
93
|
+
}
|
|
94
|
+
} },
|
|
95
|
+
userConfig: D.value.skeletonConfig ?? {}
|
|
96
|
+
})), { loading: N, FINAL_DATASET: P, manualLoading: F } = le({
|
|
97
|
+
...Ee(b),
|
|
98
|
+
FINAL_CONFIG: D,
|
|
99
|
+
prepareConfig: I,
|
|
100
|
+
skeletonDataset: b.config?.skeletonDataset ?? [
|
|
101
|
+
1,
|
|
102
|
+
2,
|
|
103
|
+
3,
|
|
104
|
+
5,
|
|
105
|
+
8,
|
|
106
|
+
13,
|
|
107
|
+
21,
|
|
108
|
+
34,
|
|
109
|
+
55,
|
|
110
|
+
89,
|
|
111
|
+
144,
|
|
112
|
+
233
|
|
113
|
+
],
|
|
114
|
+
skeletonConfig: ee({
|
|
115
|
+
defaultConfig: D.value,
|
|
116
|
+
userConfig: Ge.value
|
|
117
|
+
})
|
|
118
|
+
});
|
|
119
|
+
function I() {
|
|
120
|
+
let e = s({
|
|
121
|
+
userConfig: b.config,
|
|
122
|
+
defaultConfig: _
|
|
123
|
+
}), t = e.theme;
|
|
124
|
+
if (!t) return e;
|
|
125
|
+
if (!v.value(e)) return He(e), e;
|
|
126
|
+
let n = s({
|
|
127
|
+
userConfig: ve[t] || b.config,
|
|
128
|
+
defaultConfig: e
|
|
129
|
+
});
|
|
130
|
+
return s({
|
|
131
|
+
userConfig: b.config,
|
|
132
|
+
defaultConfig: n
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
let L = c(() => t({
|
|
136
|
+
data: P.value,
|
|
137
|
+
threshold: D.value.downsample.threshold
|
|
138
|
+
}));
|
|
139
|
+
g(() => b.config, (e) => {
|
|
140
|
+
D.value = I(), V.value = M.value.width, H.value = M.value.height, qe();
|
|
141
|
+
}, { deep: !0 });
|
|
142
|
+
function R(e) {
|
|
143
|
+
return e.map((e) => o(e));
|
|
144
|
+
}
|
|
145
|
+
let z = f(t({
|
|
146
|
+
data: P.value,
|
|
147
|
+
threshold: D.value.downsample.threshold
|
|
148
|
+
}).map((e) => M.value.animation.show && !y.value || [
|
|
149
|
+
void 0,
|
|
150
|
+
Infinity,
|
|
151
|
+
-Infinity,
|
|
152
|
+
null,
|
|
153
|
+
NaN
|
|
154
|
+
].includes(e) ? null : e));
|
|
155
|
+
g(L, (e) => {
|
|
156
|
+
T.value &&= (cancelAnimationFrame(T.value), null), M.value.animation.show && !y.value ? z.value = Array(e.length).fill(null) : z.value = e.map((e) => ![
|
|
157
|
+
void 0,
|
|
158
|
+
Infinity,
|
|
159
|
+
-Infinity,
|
|
160
|
+
null
|
|
161
|
+
].includes(e) && !Number.isNaN(e) ? e : null), B(), Ce(() => Q(".vue-ui-sparktrend-progress-label", 6));
|
|
162
|
+
}, {
|
|
163
|
+
deep: !0,
|
|
164
|
+
immediate: !0
|
|
165
|
+
}), g(() => JSON.stringify(b.dataset), () => {
|
|
166
|
+
T.value &&= (cancelAnimationFrame(T.value), null), F.value = r(b.dataset);
|
|
167
|
+
let e = L.value;
|
|
168
|
+
z.value = M.value.animation.show && !y.value ? Array(e.length).fill(null) : e.map((e) => Number.isFinite(e) ? e : null), B(), Ce(() => Q(".vue-ui-sparktrend-progress-label", 6));
|
|
169
|
+
}, {
|
|
170
|
+
deep: !1,
|
|
171
|
+
immediate: !0
|
|
172
|
+
});
|
|
173
|
+
function B() {
|
|
174
|
+
let e = 1e3 / M.value.animation.animationFrames, t = performance.now();
|
|
175
|
+
if (!N.value && M.value.animation.show && !y.value && M.value.animation.animationFrames && P.value.length > 1) {
|
|
176
|
+
z.value = [];
|
|
177
|
+
let n = 0;
|
|
178
|
+
function r() {
|
|
179
|
+
w.value = !0;
|
|
180
|
+
let i = performance.now(), a = i - t;
|
|
181
|
+
a > e ? (t = i - a % e, n < L.value.length ? (z.value.push(L.value[n]), n += 1, T.value = requestAnimationFrame(r)) : (cancelAnimationFrame(T.value), z.value = R(L.value), w.value = !1, Q(".vue-ui-sparktrend-progress-label", 6))) : T.value = requestAnimationFrame(r);
|
|
182
|
+
}
|
|
183
|
+
r();
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
Te(() => {
|
|
187
|
+
qe();
|
|
188
|
+
});
|
|
189
|
+
let Ke = c(() => D.value.debug);
|
|
190
|
+
function qe() {
|
|
191
|
+
if (r(b.dataset) && (re({
|
|
192
|
+
componentName: "VueUiSparkTrend",
|
|
193
|
+
type: "dataset",
|
|
194
|
+
debug: Ke.value
|
|
195
|
+
}), F.value = !0), r(b.dataset) || (F.value = !1), D.value.responsive) {
|
|
196
|
+
let e = pe(() => {
|
|
197
|
+
let { width: e, height: t } = me({
|
|
198
|
+
chart: x.value,
|
|
199
|
+
source: We.value
|
|
200
|
+
});
|
|
201
|
+
requestAnimationFrame(() => {
|
|
202
|
+
V.value = e, H.value = t;
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
S.value && (C.value && S.value.unobserve(C.value), S.value.disconnect()), S.value = new ResizeObserver(e), C.value = x.value.parentNode, S.value.observe(C.value);
|
|
206
|
+
}
|
|
207
|
+
B(), Q(".vue-ui-sparktrend-progress-label", 6);
|
|
208
|
+
}
|
|
209
|
+
let V = f(M.value.width), H = f(M.value.height), U = c(() => ({
|
|
210
|
+
height: H.value,
|
|
211
|
+
width: V.value
|
|
212
|
+
})), W = c(() => ({
|
|
213
|
+
top: M.value.padding.top,
|
|
214
|
+
left: M.value.padding.left,
|
|
215
|
+
right: U.value.width - M.value.padding.right,
|
|
216
|
+
bottom: U.value.height - M.value.padding.bottom,
|
|
217
|
+
height: U.value.height - (M.value.padding.top + M.value.padding.bottom) - (O.value.show ? O.value.fontSize : 0),
|
|
218
|
+
width: U.value.width - (M.value.padding.left + M.value.padding.right)
|
|
219
|
+
})), G = c(() => {
|
|
220
|
+
let e = R(L.value).filter(Number.isFinite);
|
|
221
|
+
if (!e.length) return {
|
|
222
|
+
max: 0,
|
|
223
|
+
min: 0
|
|
224
|
+
};
|
|
225
|
+
let t = e[0], n = e[0];
|
|
226
|
+
for (let r = 1; r < e.length; r++) {
|
|
227
|
+
let i = e[r];
|
|
228
|
+
i > t && (t = i), i < n && (n = i);
|
|
229
|
+
}
|
|
230
|
+
return {
|
|
231
|
+
max: t,
|
|
232
|
+
min: n
|
|
233
|
+
};
|
|
234
|
+
}), Je = c(() => {
|
|
235
|
+
let e = L.value, t = e.length ? e[e.length - 1] : "x";
|
|
236
|
+
return [
|
|
237
|
+
E.value,
|
|
238
|
+
e.length,
|
|
239
|
+
Number.isFinite(t) ? t : "x",
|
|
240
|
+
D.value.downsample.threshold,
|
|
241
|
+
A.value.smooth ? "s" : "l"
|
|
242
|
+
].join("-");
|
|
243
|
+
}), K = c(() => {
|
|
244
|
+
let e = G.value.min >= 0 ? 0 : G.value.min;
|
|
245
|
+
return Math.abs(e);
|
|
246
|
+
}), Ye = c(() => G.value.max + K.value);
|
|
247
|
+
function Xe(e) {
|
|
248
|
+
return e / Ye.value;
|
|
249
|
+
}
|
|
250
|
+
let Ze = c(() => L.value.length), q = c(() => z.value.map((e, t) => {
|
|
251
|
+
let n = isNaN(e) || [
|
|
252
|
+
void 0,
|
|
253
|
+
null,
|
|
254
|
+
"NaN",
|
|
255
|
+
NaN,
|
|
256
|
+
Infinity,
|
|
257
|
+
-Infinity
|
|
258
|
+
].includes(e) ? 0 : e || 0;
|
|
259
|
+
return {
|
|
260
|
+
value: o(e),
|
|
261
|
+
absoluteValue: o(n),
|
|
262
|
+
plotValue: o(n + K.value),
|
|
263
|
+
toMax: Xe(n + K.value),
|
|
264
|
+
x: W.value.left + o(t * (W.value.width / (Ze.value - 1))) - M.value.padding.right,
|
|
265
|
+
y: W.value.bottom - o(W.value.height * Xe(n + K.value))
|
|
266
|
+
};
|
|
267
|
+
})), J = c(() => {
|
|
268
|
+
let e = R(L.value);
|
|
269
|
+
return k.value.trendType === "global" ? te(e) : k.value.trendType === "n-1" && e.length > 1 ? (e.at(-1) / e.at(-2) - 1) * 100 : k.value.trendType === "lastToFirst" ? (e.at(-1) / e[0] - 1) * 100 : 0;
|
|
270
|
+
}), Y = c(() => w.value || J.value === 0 ? "neutral" : J.value > 0 ? "positive" : "negative"), X = c(() => M.value.arrow.colors[Y.value]), Qe = c(() => {
|
|
271
|
+
let e = {
|
|
272
|
+
x: q.value[0].x,
|
|
273
|
+
y: U.value.height - 6
|
|
274
|
+
}, t = {
|
|
275
|
+
x: q.value[q.value.length - 1].x,
|
|
276
|
+
y: U.value.height - 6
|
|
277
|
+
}, n = [];
|
|
278
|
+
return q.value.forEach((e) => {
|
|
279
|
+
n.push(`${e.x},${e.y} `);
|
|
280
|
+
}), [
|
|
281
|
+
e.x,
|
|
282
|
+
e.y,
|
|
283
|
+
...n,
|
|
284
|
+
t.x,
|
|
285
|
+
t.y
|
|
286
|
+
].toString();
|
|
287
|
+
}), $e = c(() => {
|
|
288
|
+
let e = [];
|
|
289
|
+
return q.value.forEach((t) => {
|
|
290
|
+
e.push(`${t.x},${t.y} `);
|
|
291
|
+
}), `M ${e.toString()}`;
|
|
292
|
+
}), Z = c(() => H.value / 2 - k.value.fontSize), et = c(() => W.value.left * .8), { fitText: Q } = _e({
|
|
293
|
+
svgRef: Ue,
|
|
294
|
+
unitWidth: et,
|
|
295
|
+
fontSize: k.value.fontSize
|
|
296
|
+
}), tt = c(() => {
|
|
297
|
+
if (N.value || w.value) return "Trend chart loading";
|
|
298
|
+
let e = q.value?.at(-1), t = e?.value, n = a({
|
|
299
|
+
p: J.value > 0 ? "+" : "",
|
|
300
|
+
v: J.value,
|
|
301
|
+
s: "%",
|
|
302
|
+
r: k.value.rounding
|
|
303
|
+
}), r = t == null ? "not available" : ne(O.value.formatter, t, a({
|
|
304
|
+
p: O.value.prefix,
|
|
305
|
+
v: t,
|
|
306
|
+
s: O.value.suffix,
|
|
307
|
+
r: O.value.rounding
|
|
308
|
+
}), { datapoint: e });
|
|
309
|
+
return `Progression ${Y.value === "positive" ? `up ${n}` : Y.value === "negative" ? `down ${n}` : `stable at ${n}`}. Last value ${r}.`;
|
|
310
|
+
}), $ = c(() => `sparktrend-a11y-${E.value}`);
|
|
311
|
+
return (e, t) => (d(), u("div", {
|
|
312
|
+
ref_key: "sparkTrendChart",
|
|
313
|
+
ref: x,
|
|
314
|
+
class: "vue-data-ui-component vue-ui-spark-trend",
|
|
315
|
+
id: E.value,
|
|
316
|
+
style: we(`width:100%;font-family:${M.value.fontFamily};background:${M.value.backgroundColor}`),
|
|
317
|
+
role: "img",
|
|
318
|
+
"aria-describedby": $.value
|
|
319
|
+
}, [
|
|
320
|
+
be("p", {
|
|
321
|
+
id: $.value,
|
|
322
|
+
class: "sr-only",
|
|
323
|
+
"aria-live": "polite"
|
|
324
|
+
}, m(tt.value), 9, Oe),
|
|
325
|
+
(d(), u("svg", {
|
|
326
|
+
key: Je.value,
|
|
327
|
+
ref_key: "svgRef",
|
|
328
|
+
ref: Ue,
|
|
329
|
+
xmlns: h(ae),
|
|
330
|
+
viewBox: `0 0 ${U.value.width} ${U.value.height}`,
|
|
331
|
+
style: "width:100%;background:transparent;overflow:visible",
|
|
332
|
+
"aria-hidden": "true"
|
|
333
|
+
}, [
|
|
334
|
+
xe(h(fe)),
|
|
335
|
+
e.$slots["chart-background"] ? (d(), u("foreignObject", {
|
|
336
|
+
key: 0,
|
|
337
|
+
x: 0,
|
|
338
|
+
y: 0,
|
|
339
|
+
width: U.value.width <= 0 ? 10 : U.value.width,
|
|
340
|
+
height: U.value.height <= 0 ? 10 : U.value.height,
|
|
341
|
+
style: { pointerEvents: "none" }
|
|
342
|
+
}, [p(e.$slots, "chart-background", {}, void 0, !0)], 8, Ae)) : l("", !0),
|
|
343
|
+
be("defs", null, [xe(he, {
|
|
344
|
+
t: "linear",
|
|
345
|
+
x1: "0%",
|
|
346
|
+
y1: "0%",
|
|
347
|
+
x2: "0%",
|
|
348
|
+
y2: "100%",
|
|
349
|
+
id: `pill_gradient_${E.value}`,
|
|
350
|
+
stops: [[
|
|
351
|
+
"0%",
|
|
352
|
+
h(i)(A.value.useColorTrend ? X.value : A.value.stroke, j.value.opacity),
|
|
353
|
+
1
|
|
354
|
+
], [
|
|
355
|
+
"100%",
|
|
356
|
+
M.value.backgroundColor,
|
|
357
|
+
1
|
|
358
|
+
]]
|
|
359
|
+
}, null, 8, ["id", "stops"])]),
|
|
360
|
+
j.value.show && q.value[0] ? (d(), u("g", je, [A.value.smooth ? (d(), u("path", {
|
|
361
|
+
key: 0,
|
|
362
|
+
d: `M ${q.value[0].x},${W.value.bottom} ${h(n)(q.value)} L ${q.value.at(-1).x},${W.value.bottom} Z`,
|
|
363
|
+
fill: j.value.useGradient ? `url(#pill_gradient_${E.value})` : h(i)(A.value.useColorTrend ? X.value : A.value.stroke, j.value.opacity),
|
|
364
|
+
stroke: "none"
|
|
365
|
+
}, null, 8, Me)) : (d(), u("path", {
|
|
366
|
+
key: 1,
|
|
367
|
+
d: `M${Qe.value}Z`,
|
|
368
|
+
fill: j.value.useGradient ? `url(#pill_gradient_${E.value})` : h(i)(A.value.useColorTrend ? X.value : A.value.stroke, j.value.opacity),
|
|
369
|
+
stroke: "none"
|
|
370
|
+
}, null, 8, Ne))])) : l("", !0),
|
|
371
|
+
A.value.smooth && q.value.length ? (d(), u("path", {
|
|
372
|
+
key: 2,
|
|
373
|
+
d: `M ${h(n)(q.value)}`,
|
|
374
|
+
stroke: A.value.useColorTrend ? X.value : A.value.stroke,
|
|
375
|
+
fill: "none",
|
|
376
|
+
"stroke-width": A.value.strokeWidth,
|
|
377
|
+
"stroke-linecap": A.value.strokeLinecap,
|
|
378
|
+
"stroke-linejoin": A.value.strokeLinejoin
|
|
379
|
+
}, null, 8, Pe)) : l("", !0),
|
|
380
|
+
!A.value.smooth && q.value.length ? (d(), u("path", {
|
|
381
|
+
key: 3,
|
|
382
|
+
d: $e.value,
|
|
383
|
+
stroke: A.value.useColorTrend ? X.value : A.value.stroke,
|
|
384
|
+
fill: "none",
|
|
385
|
+
"stroke-width": A.value.strokeWidth,
|
|
386
|
+
"stroke-linecap": A.value.strokeLinecap,
|
|
387
|
+
"stroke-linejoin": A.value.strokeLinejoin
|
|
388
|
+
}, null, 8, Fe)) : l("", !0),
|
|
389
|
+
h(N) ? (d(), u("path", {
|
|
390
|
+
key: 4,
|
|
391
|
+
fill: "#6A6A6A",
|
|
392
|
+
d: `M ${W.value.left / 2 + 6}, ${Z.value + 7} ${W.value.left / 2 - 7}, ${Z.value} ${W.value.left / 2 - 7}, ${Z.value + 14} Z`
|
|
393
|
+
}, null, 8, Ie)) : (d(), u("path", {
|
|
394
|
+
key: 5,
|
|
395
|
+
fill: X.value,
|
|
396
|
+
d: Y.value === "positive" ? `M ${W.value.left / 2}, ${Z.value} ${W.value.left / 2 - 7}, ${Z.value + 12} ${W.value.left / 2 + 7}, ${Z.value + 12} Z` : Y.value === "negative" ? `M ${W.value.left / 2}, ${Z.value + 12} ${W.value.left / 2 - 7}, ${Z.value} ${W.value.left / 2 + 7}, ${Z.value} Z` : `M ${W.value.left / 2 + 6}, ${Z.value + 7} ${W.value.left / 2 - 7}, ${Z.value} ${W.value.left / 2 - 7}, ${Z.value + 14} Z`
|
|
397
|
+
}, null, 8, Le)),
|
|
398
|
+
h(N) ? (d(), u("rect", {
|
|
399
|
+
key: 6,
|
|
400
|
+
x: W.value.left / 2 - k.value.fontSize - 2,
|
|
401
|
+
y: H.value / 2 + k.value.fontSize - 2,
|
|
402
|
+
width: k.value.fontSize * 2,
|
|
403
|
+
height: k.value.fontSize,
|
|
404
|
+
fill: "#6A6A6A80",
|
|
405
|
+
rx: "3"
|
|
406
|
+
}, null, 8, Re)) : l("", !0),
|
|
407
|
+
!w.value && !h(N) ? (d(), u("text", {
|
|
408
|
+
key: 7,
|
|
409
|
+
class: "vue-ui-sparktrend-progress-label",
|
|
410
|
+
x: W.value.left / 2,
|
|
411
|
+
y: H.value / 2 + k.value.fontSize * 2,
|
|
412
|
+
"text-anchor": "middle",
|
|
413
|
+
fill: k.value.useColorTrend ? X.value : k.value.color,
|
|
414
|
+
"font-size": k.value.fontSize,
|
|
415
|
+
"font-weight": k.value.bold ? "bold" : "normal"
|
|
416
|
+
}, m(h(a)({
|
|
417
|
+
p: J.value > 0 ? "+" : "",
|
|
418
|
+
v: J.value,
|
|
419
|
+
s: "%",
|
|
420
|
+
r: k.value.rounding
|
|
421
|
+
})), 9, ze)) : l("", !0),
|
|
422
|
+
q.value.length && q.value.at(-1).x !== void 0 ? (d(), u("circle", {
|
|
423
|
+
key: 8,
|
|
424
|
+
stroke: M.value.backgroundColor,
|
|
425
|
+
"stroke-width": 2,
|
|
426
|
+
cx: q.value.at(-1).x,
|
|
427
|
+
cy: q.value.at(-1).y,
|
|
428
|
+
r: 4,
|
|
429
|
+
fill: h(N) ? "#6A6A6A" : X.value
|
|
430
|
+
}, null, 8, Be)) : l("", !0),
|
|
431
|
+
q.value.length && q.value.at(-1).x !== void 0 && O.value.show ? (d(), u("text", {
|
|
432
|
+
key: 9,
|
|
433
|
+
"text-anchor": "middle",
|
|
434
|
+
x: q.value.at(-1).x,
|
|
435
|
+
y: q.value.at(-1).y - O.value.fontSize / 1.5,
|
|
436
|
+
"font-size": O.value.fontSize,
|
|
437
|
+
fill: O.value.useColorTrend ? X.value : O.value.color,
|
|
438
|
+
"font-weight": O.value.bold ? "bold" : "normal"
|
|
439
|
+
}, m(h(ne)(O.value.formatter, q.value.at(-1).value, h(a)({
|
|
440
|
+
p: O.value.prefix,
|
|
441
|
+
v: q.value.at(-1).value,
|
|
442
|
+
s: O.value.suffix,
|
|
443
|
+
r: O.value.rounding
|
|
444
|
+
}), { datapoint: q.value.at(-1) })), 9, Ve)) : l("", !0)
|
|
445
|
+
], 8, ke)),
|
|
446
|
+
e.$slots.source ? (d(), u("div", {
|
|
447
|
+
key: 0,
|
|
448
|
+
ref_key: "source",
|
|
449
|
+
ref: We,
|
|
450
|
+
dir: "auto"
|
|
451
|
+
}, [p(e.$slots, "source", {}, void 0, !0)], 512)) : l("", !0),
|
|
452
|
+
p(e.$slots, "skeleton", {}, () => [h(N) ? (d(), ye(ue, { key: 0 })) : l("", !0)], !0)
|
|
453
|
+
], 12, De));
|
|
454
|
+
}
|
|
455
|
+
}, [["__scopeId", "data-v-8fe8c402"]]);
|
|
456
|
+
//#endregion
|
|
457
|
+
export { _ as n, v as t };
|