@shtabapp/ui-kit 1.76.0 → 1.78.1
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/CHANGELOG.md +19 -0
- package/dist/SChartBar-BAO2FtIO.cjs +1 -0
- package/dist/SChartBar-DHjm1H0N.js +304 -0
- package/dist/{SChartBurnup-joKIDLFb.cjs → SChartBurnup-9s2KNzCr.cjs} +1 -1
- package/dist/{SChartBurnup-BeQWgnGT.js → SChartBurnup-B1KU1E5B.js} +63 -63
- package/dist/SChartHorizontalBar-DwY63iRT.cjs +1 -0
- package/dist/SChartHorizontalBar-VKU0b6Jx.js +245 -0
- package/dist/{SChartLegend-dDqLhvIj.js → SChartLegend-At0mMO09.js} +1 -1
- package/dist/{SChartLegend-D1gPKGm0.cjs → SChartLegend-DQMLr6yV.cjs} +1 -1
- package/dist/{SChartLine-BV8Ytso5.js → SChartLine-rnEsQv-q.js} +35 -35
- package/dist/{SChartLine-DeJjaBmo.cjs → SChartLine-tj-AapTr.cjs} +1 -1
- package/dist/SChartMultiLine-C4jjmLEb.js +282 -0
- package/dist/SChartMultiLine-dtd6k59D.cjs +1 -0
- package/dist/{SChartPie-DccW5J0b.cjs → SChartPie-Ddk8r-_I.cjs} +1 -1
- package/dist/{SChartPie-BiLoxutQ.js → SChartPie-Ebg7WSga.js} +31 -31
- package/dist/{SChartProgress-DSxJqRA0.js → SChartProgress-DRSh_taf.js} +27 -27
- package/dist/{SChartProgress-Cpdkad6Q.cjs → SChartProgress-DozBX6ve.cjs} +1 -1
- package/dist/SChartScatter-DilWNoz0.cjs +1 -0
- package/dist/SChartScatter-DnmTw18x.js +249 -0
- package/dist/SChartStackedArea-BJ5HsJzQ.cjs +1 -0
- package/dist/SChartStackedArea-zIygTOp8.js +278 -0
- package/dist/SChartStackedBar-CXpVSagd.js +350 -0
- package/dist/SChartStackedBar-Dj6esSCS.cjs +2 -0
- package/dist/STable-BwKAn_4M.cjs +1 -0
- package/dist/{STable-BVGHC_FJ.js → STable-CUh1kgNm.js} +27 -25
- package/dist/{applyChartHighlightedYTick-BHVwiljn.cjs → applyChartHighlightedYTick-CKsVe7PW.cjs} +1 -1
- package/dist/{applyChartHighlightedYTick-DmsstRVM.js → applyChartHighlightedYTick-DOxlsWPd.js} +1 -1
- package/dist/buildChartMirrorScale-CBUIRPYX.cjs +1 -0
- package/dist/buildChartMirrorScale-_PhGNiFR.js +15 -0
- package/dist/buildMultiLineChartScales-BweU2ftq.cjs +1 -0
- package/dist/buildMultiLineChartScales-DbRe2UFD.js +38 -0
- package/dist/components/SChartBar/SChartBar.types.d.ts +4 -0
- package/dist/components/SChartBar/SChartBar.types.d.ts.map +1 -1
- package/dist/components/SChartBar/SChartBar.vue.d.ts.map +1 -1
- package/dist/components/SChartBar/utils/buildBarChartConfig.d.ts +3 -1
- package/dist/components/SChartBar/utils/buildBarChartConfig.d.ts.map +1 -1
- package/dist/components/SChartBar/utils/createBarValueLabelPlugin.d.ts.map +1 -1
- package/dist/components/SChartHorizontalBar/SChartHorizontalBar.types.d.ts +12 -0
- package/dist/components/SChartHorizontalBar/SChartHorizontalBar.types.d.ts.map +1 -1
- package/dist/components/SChartHorizontalBar/SChartHorizontalBar.vue.d.ts.map +1 -1
- package/dist/components/SChartHorizontalBar/utils/buildSChartHorizontalBarConfig.d.ts +6 -0
- package/dist/components/SChartHorizontalBar/utils/buildSChartHorizontalBarConfig.d.ts.map +1 -1
- package/dist/components/SChartMultiLine/SChartMultiLine.types.d.ts +2 -0
- package/dist/components/SChartMultiLine/SChartMultiLine.types.d.ts.map +1 -1
- package/dist/components/SChartMultiLine/SChartMultiLine.vue.d.ts.map +1 -1
- package/dist/components/SChartMultiLine/utils/buildMultiLineChartConfig.d.ts +2 -1
- package/dist/components/SChartMultiLine/utils/buildMultiLineChartConfig.d.ts.map +1 -1
- package/dist/components/SChartMultiLine/utils/demoMultiLineSeries.d.ts +1 -0
- package/dist/components/SChartMultiLine/utils/demoMultiLineSeries.d.ts.map +1 -1
- package/dist/components/SChartScatter/SChartScatter.types.d.ts +51 -0
- package/dist/components/SChartScatter/SChartScatter.types.d.ts.map +1 -0
- package/dist/components/SChartScatter/SChartScatter.vue.d.ts +12 -0
- package/dist/components/SChartScatter/SChartScatter.vue.d.ts.map +1 -0
- package/dist/components/SChartScatter/index.d.ts +3 -0
- package/dist/components/SChartScatter/index.d.ts.map +1 -0
- package/dist/components/SChartScatter/utils/buildScatterChartConfig.d.ts +20 -0
- package/dist/components/SChartScatter/utils/buildScatterChartConfig.d.ts.map +1 -0
- package/dist/components/SChartScatter/utils/demoScatter.d.ts +6 -0
- package/dist/components/SChartScatter/utils/demoScatter.d.ts.map +1 -0
- package/dist/components/SChartScatter/utils/skeletonScatter.d.ts +5 -0
- package/dist/components/SChartScatter/utils/skeletonScatter.d.ts.map +1 -0
- package/dist/components/SChartStackedArea/SChartStackedArea.types.d.ts +5 -1
- package/dist/components/SChartStackedArea/SChartStackedArea.types.d.ts.map +1 -1
- package/dist/components/SChartStackedArea/SChartStackedArea.vue.d.ts.map +1 -1
- package/dist/components/SChartStackedArea/utils/buildStackedAreaChartConfig.d.ts +3 -1
- package/dist/components/SChartStackedArea/utils/buildStackedAreaChartConfig.d.ts.map +1 -1
- package/dist/components/SChartStackedArea/utils/demoStackedSeries.d.ts +2 -0
- package/dist/components/SChartStackedArea/utils/demoStackedSeries.d.ts.map +1 -1
- package/dist/components/SChartStackedBar/SChartStackedBar.types.d.ts +21 -0
- package/dist/components/SChartStackedBar/SChartStackedBar.types.d.ts.map +1 -1
- package/dist/components/SChartStackedBar/SChartStackedBar.vue.d.ts.map +1 -1
- package/dist/components/SChartStackedBar/index.d.ts +1 -1
- package/dist/components/SChartStackedBar/index.d.ts.map +1 -1
- package/dist/components/SChartStackedBar/utils/buildStackedBarChartConfig.d.ts +7 -1
- package/dist/components/SChartStackedBar/utils/buildStackedBarChartConfig.d.ts.map +1 -1
- package/dist/components/SChartStackedBar/utils/createStackedBarTotalsPlugin.d.ts +6 -0
- package/dist/components/SChartStackedBar/utils/createStackedBarTotalsPlugin.d.ts.map +1 -0
- package/dist/components/SChartStackedBar/utils/createStackedBarTrendPlugin.d.ts +10 -0
- package/dist/components/SChartStackedBar/utils/createStackedBarTrendPlugin.d.ts.map +1 -0
- package/dist/components/SChartStackedBar/utils/demoStackedBarSeries.d.ts +2 -0
- package/dist/components/SChartStackedBar/utils/demoStackedBarSeries.d.ts.map +1 -1
- package/dist/components/STable/STable.types.d.ts +6 -1
- package/dist/components/STable/STable.types.d.ts.map +1 -1
- package/dist/components/STable/STable.vue.d.ts.map +1 -1
- package/dist/components/STable/utils/useTableColumns.d.ts +3 -1
- package/dist/components/STable/utils/useTableColumns.d.ts.map +1 -1
- package/dist/{createChartCrosshairPlugin-EqMlaexu.js → createChartCrosshairPlugin-B4LrgKjG.js} +1 -1
- package/dist/{createChartCrosshairPlugin-BTPv09h4.cjs → createChartCrosshairPlugin-COIICTCz.cjs} +1 -1
- package/dist/{createChartMarkersPlugin-BKxLg4pL.cjs → createChartMarkersPlugin-L7qomZVK.cjs} +1 -1
- package/dist/{createChartMarkersPlugin-DPvfZp_e.js → createChartMarkersPlugin-bAEeP-5Z.js} +1 -1
- package/dist/createCustomTooltipCallbacks-CxeEfJLl.js +12 -0
- package/dist/createCustomTooltipCallbacks-oRAimZTt.cjs +1 -0
- package/dist/entries/chart-bar.cjs +1 -1
- package/dist/entries/chart-bar.js +1 -1
- package/dist/entries/chart-burnup.cjs +1 -1
- package/dist/entries/chart-burnup.js +1 -1
- package/dist/entries/chart-horizontal-bar.cjs +1 -1
- package/dist/entries/chart-horizontal-bar.js +1 -1
- package/dist/entries/chart-line.cjs +1 -1
- package/dist/entries/chart-line.js +1 -1
- package/dist/entries/chart-multi-line.cjs +1 -1
- package/dist/entries/chart-multi-line.js +1 -1
- package/dist/entries/chart-pie.cjs +1 -1
- package/dist/entries/chart-pie.js +1 -1
- package/dist/entries/chart-progress.cjs +1 -1
- package/dist/entries/chart-progress.js +1 -1
- package/dist/entries/chart-scatter.cjs +1 -0
- package/dist/entries/chart-scatter.d.ts +3 -0
- package/dist/entries/chart-scatter.d.ts.map +1 -0
- package/dist/entries/chart-scatter.js +2 -0
- package/dist/entries/chart-stacked-area.cjs +1 -1
- package/dist/entries/chart-stacked-area.js +1 -1
- package/dist/entries/chart-stacked-bar.cjs +1 -1
- package/dist/entries/chart-stacked-bar.d.ts +1 -1
- package/dist/entries/chart-stacked-bar.d.ts.map +1 -1
- package/dist/entries/chart-stacked-bar.js +1 -1
- package/dist/entries/table.cjs +1 -1
- package/dist/entries/table.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +185 -184
- package/dist/resolveBarStackedSeriesColor-BDJ7XBIB.cjs +1 -0
- package/dist/resolveBarStackedSeriesColor-zEV1Ps7h.js +11 -0
- package/dist/resolveChartLabelFont-D_Pxt-gs.cjs +1 -0
- package/dist/resolveChartLabelFont-WtZd0pFD.js +4 -0
- package/dist/{resolveCssColorValue-DH_SEZj4.js → resolveCssColorValue-BBK7CTmP.js} +1 -1
- package/dist/resolveCssColorValue-D3fS-cK8.cjs +1 -0
- package/dist/{resolveSeriesPaletteColor-DoPeNP_F.js → resolveSeriesPaletteColor-Bk52kyZo.js} +2 -2
- package/dist/resolveSeriesPaletteColor-CVEsFs0o.cjs +1 -0
- package/dist/{resolveStackedChartContext-D4tuSA6Z.cjs → resolveStackedChartContext-BE3ZW2Sf.cjs} +1 -1
- package/dist/{resolveStackedChartContext-BbCzct6O.js → resolveStackedChartContext-Dc6Foe7D.js} +1 -1
- package/dist/uikit-components.css +1 -1
- package/dist/useChartInteractivity-Yk7qEYgl.cjs +2 -0
- package/dist/{useChartInteractivity-DygkiRA1.js → useChartInteractivity-sgbPZgcH.js} +58 -57
- package/dist/utils/chart/bar/createStackedBarTooltipCallbacks.d.ts.map +1 -1
- package/dist/utils/chart/core/buildChartMirrorScale.d.ts +27 -0
- package/dist/utils/chart/core/buildChartMirrorScale.d.ts.map +1 -0
- package/dist/utils/chart/core/chartCssVariables.d.ts +1 -0
- package/dist/utils/chart/core/chartCssVariables.d.ts.map +1 -1
- package/dist/utils/chart/core/chartInteractivity.d.ts +6 -0
- package/dist/utils/chart/core/chartInteractivity.d.ts.map +1 -1
- package/dist/utils/chart/core/createCustomTooltipCallbacks.d.ts +8 -0
- package/dist/utils/chart/core/createCustomTooltipCallbacks.d.ts.map +1 -0
- package/dist/utils/chart/core/registerChartJs.d.ts.map +1 -1
- package/dist/utils/chart/css/resolveChartLabelFont.d.ts +7 -0
- package/dist/utils/chart/css/resolveChartLabelFont.d.ts.map +1 -0
- package/dist/utils/chart/horizontalBar/buildHorizontalBarChartConfig.d.ts +7 -1
- package/dist/utils/chart/horizontalBar/buildHorizontalBarChartConfig.d.ts.map +1 -1
- package/dist/utils/chart/horizontalBar/buildHorizontalBarChartScales.d.ts +3 -1
- package/dist/utils/chart/horizontalBar/buildHorizontalBarChartScales.d.ts.map +1 -1
- package/dist/utils/chart/horizontalBar/createHorizontalBarValueLabelPlugin.d.ts +10 -0
- package/dist/utils/chart/horizontalBar/createHorizontalBarValueLabelPlugin.d.ts.map +1 -0
- package/dist/utils/chart/index.d.ts +1 -0
- package/dist/utils/chart/index.d.ts.map +1 -1
- package/dist/utils/chart/multiLine/buildMultiLineChartScales.d.ts +16 -21
- package/dist/utils/chart/multiLine/buildMultiLineChartScales.d.ts.map +1 -1
- package/package.json +7 -2
- package/dist/SChartBar-BvytQ-2z.js +0 -293
- package/dist/SChartBar-BzCeNCsi.cjs +0 -1
- package/dist/SChartHorizontalBar-C40Yroue.js +0 -176
- package/dist/SChartHorizontalBar-Dwln3uuE.cjs +0 -1
- package/dist/SChartMultiLine-7_HcvVEQ.js +0 -279
- package/dist/SChartMultiLine-Cl9Pf3Wp.cjs +0 -1
- package/dist/SChartStackedArea-B28offwE.js +0 -254
- package/dist/SChartStackedArea-Ce7xyhp1.cjs +0 -1
- package/dist/SChartStackedBar-C77FlKGS.js +0 -245
- package/dist/SChartStackedBar-CqUDrFJ3.cjs +0 -1
- package/dist/STable-QYXxMVAw.cjs +0 -1
- package/dist/buildMultiLineChartScales-Di-yTvEB.js +0 -41
- package/dist/buildMultiLineChartScales-lVP6h9H4.cjs +0 -1
- package/dist/resolveBarStackedSeriesColor-CjwUxrUx.js +0 -11
- package/dist/resolveBarStackedSeriesColor-Czkj5bJY.cjs +0 -1
- package/dist/resolveCssColorValue-BFMo08-w.cjs +0 -1
- package/dist/resolveSeriesPaletteColor-BepW1gdW.cjs +0 -1
- package/dist/useChartInteractivity-CaZ37kX-.cjs +0 -1
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { C as e, D as t, S as n, f as r, n as i, o as a, p as o, r as s, t as c } from "./useChartInteractivity-sgbPZgcH.js";
|
|
2
|
+
import { t as l } from "./resolveCssColorValue-BBK7CTmP.js";
|
|
3
|
+
import { n as u } from "./buildChartMirrorScale-_PhGNiFR.js";
|
|
4
|
+
import { t as d } from "./resolveChartLabelFont-WtZd0pFD.js";
|
|
5
|
+
import { t as f } from "./useHasListener-RSjlUyqH.js";
|
|
6
|
+
import { computed as p, createElementBlock as m, createElementVNode as h, createVNode as g, defineComponent as _, normalizeClass as v, openBlock as y, unref as b, useTemplateRef as x, withCtx as S } from "vue";
|
|
7
|
+
//#region src/utils/chart/horizontalBar/buildHorizontalBarChartScales.ts
|
|
8
|
+
var C = 10, w = 14, T = "xMirror", E = ({ axisLabelColor: e, categoryLabelColor: t, gridColor: n, xMin: r, xMax: i, xStep: a, mirrorXAxis: o = !1, formatXTick: s }) => {
|
|
9
|
+
let c = {
|
|
10
|
+
color: e,
|
|
11
|
+
stepSize: a,
|
|
12
|
+
font: {
|
|
13
|
+
size: C,
|
|
14
|
+
weight: 500
|
|
15
|
+
},
|
|
16
|
+
padding: 8,
|
|
17
|
+
...s ? { callback: (e) => typeof e == "number" ? s(e) : e } : {}
|
|
18
|
+
};
|
|
19
|
+
return {
|
|
20
|
+
...o ? { [T]: u({
|
|
21
|
+
min: r,
|
|
22
|
+
max: i,
|
|
23
|
+
tickOptions: { ticks: c },
|
|
24
|
+
position: "top",
|
|
25
|
+
hideTickMarks: !0
|
|
26
|
+
}) } : {},
|
|
27
|
+
x: {
|
|
28
|
+
type: "linear",
|
|
29
|
+
min: r,
|
|
30
|
+
max: i,
|
|
31
|
+
border: { display: !1 },
|
|
32
|
+
grid: {
|
|
33
|
+
color: n,
|
|
34
|
+
drawTicks: !1
|
|
35
|
+
},
|
|
36
|
+
ticks: c
|
|
37
|
+
},
|
|
38
|
+
y: {
|
|
39
|
+
border: { display: !1 },
|
|
40
|
+
grid: { display: !1 },
|
|
41
|
+
ticks: {
|
|
42
|
+
color: t,
|
|
43
|
+
font: {
|
|
44
|
+
size: w,
|
|
45
|
+
weight: 400
|
|
46
|
+
},
|
|
47
|
+
padding: 8,
|
|
48
|
+
crossAlign: "far",
|
|
49
|
+
autoSkip: !1
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}, D = 8, O = 12, k = 500, A = 64, j = (e, t) => t ? t(e) : String(e), M = (e) => d({
|
|
54
|
+
size: O,
|
|
55
|
+
weight: k,
|
|
56
|
+
colorHostElement: e
|
|
57
|
+
}), N = ({ values: e, colorHostElement: t, formatValue: n }) => {
|
|
58
|
+
let r = typeof document > "u" ? null : document.createElement("canvas").getContext("2d");
|
|
59
|
+
if (!r) return A;
|
|
60
|
+
r.font = M(t);
|
|
61
|
+
let i = e.reduce((e, t) => Math.max(e, r.measureText(j(t, n)).width), 0);
|
|
62
|
+
return Math.ceil(i) + D;
|
|
63
|
+
}, P = ({ colorHostElement: e, formatValue: r }) => ({
|
|
64
|
+
id: "horizontalBarValueLabel",
|
|
65
|
+
afterDatasetsDraw(i) {
|
|
66
|
+
let o = n(t.barValueLabel, e), s = n(t.barValueLabelMuted, e), { ctx: c } = i;
|
|
67
|
+
c.save(), c.font = M(e), c.textAlign = "left", c.textBaseline = "middle", i.data.datasets.forEach((e, t) => {
|
|
68
|
+
i.isDatasetVisible(t) && i.getDatasetMeta(t).data.forEach((n, l) => {
|
|
69
|
+
let u = e.data[l];
|
|
70
|
+
typeof u == "number" && (c.fillStyle = a(i, t, l) ? s : o, c.fillText(j(u, r), n.x + D, n.y));
|
|
71
|
+
});
|
|
72
|
+
}), c.restore();
|
|
73
|
+
}
|
|
74
|
+
}), F = (e, r, i) => i ? n(t.barHorizontalSkeletonFill, r) : e ? l(e, r) : n(t.barHorizontalFillDefault, r), I = (e, t, n) => {
|
|
75
|
+
if (t) return t;
|
|
76
|
+
let r = 0;
|
|
77
|
+
for (let t of e) r = Math.max(r, t.value);
|
|
78
|
+
let i = Math.ceil(r / n) * n;
|
|
79
|
+
return i > 0 ? i : n * 6;
|
|
80
|
+
}, L = 10, R = 0, z = 36, B = 4, V = ({ items: e, colorHostElement: i, xMax: a, xMin: c = R, xStep: l = L, skeleton: u = !1, barThickness: d = z, mirrorXAxis: f = !1, showValues: p = !1, formatValue: m, formatXTick: h, formatTooltip: g, onBarClick: _ }) => {
|
|
81
|
+
if (e.length === 0) return null;
|
|
82
|
+
let v = n(t.axisLabel, i), y = n(t.grid, i), b = n(t.tooltipBackground, i), x = n(t.tooltipText, i), S = n(u ? t.barHorizontalCategoryLabelSkeleton : t.barHorizontalCategoryLabel, i), C = I(e, a, l), w = e.map((e) => F(e.color, i, u)), T = s({
|
|
83
|
+
kind: "element",
|
|
84
|
+
skeleton: u,
|
|
85
|
+
colorHostElement: i,
|
|
86
|
+
onIndexClick: _
|
|
87
|
+
});
|
|
88
|
+
return {
|
|
89
|
+
type: "bar",
|
|
90
|
+
data: {
|
|
91
|
+
labels: e.map((e) => e.label),
|
|
92
|
+
datasets: [{
|
|
93
|
+
data: e.map((e) => e.value),
|
|
94
|
+
backgroundColor: w,
|
|
95
|
+
hoverBackgroundColor: w,
|
|
96
|
+
borderWidth: 0,
|
|
97
|
+
hoverBorderWidth: 0,
|
|
98
|
+
barThickness: d,
|
|
99
|
+
borderRadius: {
|
|
100
|
+
topRight: B,
|
|
101
|
+
bottomRight: B
|
|
102
|
+
}
|
|
103
|
+
}]
|
|
104
|
+
},
|
|
105
|
+
options: {
|
|
106
|
+
indexAxis: "y",
|
|
107
|
+
responsive: !0,
|
|
108
|
+
layout: p && !u ? { padding: { right: N({
|
|
109
|
+
values: e.map((e) => e.value),
|
|
110
|
+
colorHostElement: i,
|
|
111
|
+
formatValue: m
|
|
112
|
+
}) } } : void 0,
|
|
113
|
+
maintainAspectRatio: !1,
|
|
114
|
+
onHover: T.onHover,
|
|
115
|
+
onClick: T.onClick,
|
|
116
|
+
interaction: r(u, {
|
|
117
|
+
mode: "index",
|
|
118
|
+
axis: "y",
|
|
119
|
+
intersect: !1
|
|
120
|
+
}),
|
|
121
|
+
plugins: {
|
|
122
|
+
legend: { display: !1 },
|
|
123
|
+
tooltip: {
|
|
124
|
+
enabled: o(u),
|
|
125
|
+
backgroundColor: b,
|
|
126
|
+
titleColor: x,
|
|
127
|
+
bodyColor: x,
|
|
128
|
+
...g ? {
|
|
129
|
+
displayColors: !1,
|
|
130
|
+
callbacks: {
|
|
131
|
+
title: () => [],
|
|
132
|
+
label: (e) => g(e.dataIndex)
|
|
133
|
+
}
|
|
134
|
+
} : {}
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
scales: E({
|
|
138
|
+
axisLabelColor: v,
|
|
139
|
+
categoryLabelColor: S,
|
|
140
|
+
gridColor: y,
|
|
141
|
+
xMin: c,
|
|
142
|
+
xMax: C,
|
|
143
|
+
xStep: l,
|
|
144
|
+
mirrorXAxis: f,
|
|
145
|
+
formatXTick: h
|
|
146
|
+
})
|
|
147
|
+
},
|
|
148
|
+
plugins: p && !u ? [...T.plugins, P({
|
|
149
|
+
colorHostElement: i,
|
|
150
|
+
formatValue: m
|
|
151
|
+
})] : T.plugins
|
|
152
|
+
};
|
|
153
|
+
}, H = (e) => V(e), U = [
|
|
154
|
+
{
|
|
155
|
+
label: "Открыта",
|
|
156
|
+
value: 48
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
label: "В процессе",
|
|
160
|
+
value: 32
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
label: "Ревью",
|
|
164
|
+
value: 53
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
label: "Готова для QA",
|
|
168
|
+
value: 18
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
label: "QA",
|
|
172
|
+
value: 25
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
label: "Готова",
|
|
176
|
+
value: 0
|
|
177
|
+
}
|
|
178
|
+
], W = { class: "s-ui-chart-horizontal-bar__canvas-wrap" }, G = /* @__PURE__ */ _({
|
|
179
|
+
__name: "SChartHorizontalBar",
|
|
180
|
+
props: {
|
|
181
|
+
items: { default: () => [] },
|
|
182
|
+
loading: {
|
|
183
|
+
type: Boolean,
|
|
184
|
+
default: !1
|
|
185
|
+
},
|
|
186
|
+
xMin: {},
|
|
187
|
+
xMax: {},
|
|
188
|
+
xStep: {},
|
|
189
|
+
barThickness: {},
|
|
190
|
+
mirrorXAxis: {
|
|
191
|
+
type: Boolean,
|
|
192
|
+
default: !1
|
|
193
|
+
},
|
|
194
|
+
showValues: {
|
|
195
|
+
type: Boolean,
|
|
196
|
+
default: !1
|
|
197
|
+
},
|
|
198
|
+
formatValue: { type: Function },
|
|
199
|
+
formatXTick: { type: Function },
|
|
200
|
+
formatTooltip: { type: Function }
|
|
201
|
+
},
|
|
202
|
+
emits: ["barClick"],
|
|
203
|
+
setup(t, { expose: n, emit: r }) {
|
|
204
|
+
let a = r, o = x("chartRootRef"), s = x("chartCanvasRef"), l = p(() => t.loading ? U : t.items), u = (e) => {
|
|
205
|
+
let n = t.items[e];
|
|
206
|
+
n && a("barClick", e, n);
|
|
207
|
+
}, d = f("onBarClick"), { chartInstance: _ } = i({
|
|
208
|
+
canvasRef: s,
|
|
209
|
+
config: p(() => !t.loading && t.items.length === 0 ? null : H({
|
|
210
|
+
items: l.value,
|
|
211
|
+
colorHostElement: o.value,
|
|
212
|
+
xMax: t.loading ? 60 : t.xMax,
|
|
213
|
+
xMin: t.loading ? 0 : t.xMin,
|
|
214
|
+
xStep: t.loading ? 10 : t.xStep,
|
|
215
|
+
skeleton: t.loading,
|
|
216
|
+
barThickness: t.barThickness,
|
|
217
|
+
mirrorXAxis: t.loading ? !1 : t.mirrorXAxis,
|
|
218
|
+
showValues: t.showValues,
|
|
219
|
+
formatValue: t.loading ? void 0 : t.formatValue,
|
|
220
|
+
formatXTick: t.loading ? void 0 : t.formatXTick,
|
|
221
|
+
formatTooltip: t.loading ? void 0 : t.formatTooltip,
|
|
222
|
+
onBarClick: d() ? u : void 0
|
|
223
|
+
})),
|
|
224
|
+
enabled: p(() => t.loading || t.items.length > 0)
|
|
225
|
+
}), { exportImage: C } = c({
|
|
226
|
+
chartInstance: _,
|
|
227
|
+
canvasRef: s,
|
|
228
|
+
colorHostElement: o
|
|
229
|
+
});
|
|
230
|
+
return n({ exportImage: C }), (n, r) => (y(), m("div", {
|
|
231
|
+
ref_key: "chartRootRef",
|
|
232
|
+
ref: o,
|
|
233
|
+
class: v(["s-ui-chart-horizontal-bar", { "s-ui-chart-horizontal-bar--skeleton": t.loading }])
|
|
234
|
+
}, [h("div", W, [g(b(e), { loading: t.loading }, {
|
|
235
|
+
default: S(() => [h("canvas", {
|
|
236
|
+
ref_key: "chartCanvasRef",
|
|
237
|
+
ref: s,
|
|
238
|
+
class: "s-ui-chart-horizontal-bar__canvas"
|
|
239
|
+
}, null, 512)]),
|
|
240
|
+
_: 1
|
|
241
|
+
}, 8, ["loading"])])], 2));
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
//#endregion
|
|
245
|
+
export { G as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as e } from "./useChartInteractivity-sgbPZgcH.js";
|
|
2
2
|
import { Fragment as t, computed as n, createBlock as r, createElementBlock as i, createElementVNode as a, defineComponent as o, normalizeClass as s, normalizeStyle as c, openBlock as l, renderList as u, resolveDynamicComponent as d, toDisplayString as f, withCtx as p } from "vue";
|
|
3
3
|
//#region src/components/SChartLegend/SChartLegend.types.ts
|
|
4
4
|
var m = /* @__PURE__ */ function(e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./useChartInteractivity-
|
|
1
|
+
const e=require("./useChartInteractivity-Yk7qEYgl.cjs");let t=require("vue");var n=function(e){return e.SMALL=`small`,e.MEDIUM=`medium`,e}({}),r=[`onMouseenter`],i={class:`s-ui-chart-legend__swatch-slot`,"aria-hidden":`true`},a={class:`s-ui-chart-legend__label`},o=(0,t.defineComponent)({__name:`SChartLegend`,props:{items:{},disabled:{type:Boolean,default:!1},direction:{default:`row`},interactive:{type:Boolean,default:!1},size:{default:()=>n.SMALL},selectable:{type:Boolean,default:!1},activeIndex:{default:null},activeIndexes:{default:()=>[]}},emits:[`itemHover`,`itemClick`],setup(o,{emit:s}){let c=s,l=`var(${e.D.fillMuted})`,u=(0,t.computed)(()=>o.selectable?`button`:`span`),d=(0,t.computed)(()=>[`s-ui-chart-legend`,`s-ui-chart-legend--size-${o.size}`,{"s-ui-chart-legend--disabled":o.disabled,"s-ui-chart-legend--column":o.direction===`column`,"s-ui-chart-legend--selectable":o.selectable}]),f=(0,t.computed)(()=>o.items.map((e,t)=>{let r=o.activeIndex===t||o.activeIndexes.includes(t),i=(o.activeIndex!==null||o.activeIndexes.length>0)&&!r;return{index:t,label:e.label,text:o.size===n.SMALL?`— ${e.label}`:e.label,isActive:r,classes:[`s-ui-chart-legend__entry`,{"s-ui-chart-legend__entry--active":r,"s-ui-chart-legend__entry--muted":i}],swatchClasses:[`s-ui-chart-legend__swatch`,{"s-ui-chart-legend__swatch--line":e.marker===`line`}],swatchStyle:{backgroundColor:i?l:e.color}}})),p=e=>{o.interactive&&c(`itemHover`,e)},m=e=>{o.selectable&&!o.disabled&&c(`itemClick`,e)};return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`ul`,{class:(0,t.normalizeClass)(d.value),onMouseleave:n[0]||=e=>p(null)},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(f.value,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`li`,{key:e.label,class:`s-ui-chart-legend__item`,onMouseenter:t=>p(e.index)},[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(u.value),{class:(0,t.normalizeClass)(e.classes),type:o.selectable?`button`:void 0,disabled:o.selectable?o.disabled:void 0,"aria-pressed":o.selectable?e.isActive:void 0,onClick:t=>m(e.index)},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`span`,i,[(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)(e.swatchClasses),style:(0,t.normalizeStyle)(e.swatchStyle)},null,6)]),(0,t.createElementVNode)(`span`,a,(0,t.toDisplayString)(e.text),1)]),_:2},1032,[`class`,`type`,`disabled`,`aria-pressed`,`onClick`]))],40,r))),128))],34))}});Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return o}});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as e, D as t, S as n, d as r, f as i, m as a, n as o, p as s, t as c } from "./useChartInteractivity-sgbPZgcH.js";
|
|
2
2
|
import { t as l } from "./buildCartesianChartScales-EofFq3ry.js";
|
|
3
3
|
import { t as u } from "./resolveChartValueRange-DZybnmaX.js";
|
|
4
|
-
import { n as d, t as f } from "./createChartMarkersPlugin-
|
|
4
|
+
import { n as d, t as f } from "./createChartMarkersPlugin-bAEeP-5Z.js";
|
|
5
5
|
import { computed as p, createElementBlock as m, createElementVNode as h, createVNode as g, defineComponent as _, normalizeClass as v, normalizeStyle as y, openBlock as b, unref as x, useTemplateRef as S, withCtx as C } from "vue";
|
|
6
6
|
//#region src/utils/chart/css/readCssNumber.ts
|
|
7
7
|
var w = (e, t, n = 1) => {
|
|
@@ -18,18 +18,18 @@ var w = (e, t, n = 1) => {
|
|
|
18
18
|
yMax: n,
|
|
19
19
|
yStep: r
|
|
20
20
|
});
|
|
21
|
-
}, j = ({ points:
|
|
22
|
-
let b = t
|
|
21
|
+
}, j = ({ points: e, seriesLabel: o, colorHostElement: c, yMax: u, yMin: p, yStep: m = E, area: h = !0, zeroLine: g = !1, dangerBelowZero: _ = !1, markers: v = [], skeleton: y = !1 }) => {
|
|
22
|
+
let b = n(t.axisLabel, c), x = n(t.grid, c), S = n(y ? t.skeletonSeries : t.seriesPrimary, c), C = n(y ? t.skeletonFillStart : t.seriesFillStart, c), j = n(y ? t.skeletonFillEnd : t.seriesFillEnd, c), M = n(O, c), N = n(t.tooltipBackground, c), P = n(t.tooltipText, c), F = w(y ? t.skeletonFillOpacity : t.seriesFillOpacity, c, .8), I = A(e, p, u, m, y), L = h || y, R = _ && !y, z = (e) => r(e, C, j, F), B = R ? {
|
|
23
23
|
target: { value: 0 },
|
|
24
24
|
below: M
|
|
25
25
|
} : L ? "origin" : !1;
|
|
26
26
|
return {
|
|
27
27
|
type: "line",
|
|
28
28
|
data: {
|
|
29
|
-
labels:
|
|
29
|
+
labels: e.map((e) => e.label),
|
|
30
30
|
datasets: [{
|
|
31
31
|
label: o,
|
|
32
|
-
data:
|
|
32
|
+
data: e.map((e) => e.value),
|
|
33
33
|
borderColor: S,
|
|
34
34
|
backgroundColor: L ? z : "transparent",
|
|
35
35
|
pointBackgroundColor: S,
|
|
@@ -45,14 +45,14 @@ var w = (e, t, n = 1) => {
|
|
|
45
45
|
responsive: !0,
|
|
46
46
|
maintainAspectRatio: !1,
|
|
47
47
|
layout: { padding: { top: v.length > 0 ? D : 0 } },
|
|
48
|
-
interaction:
|
|
48
|
+
interaction: i(y, {
|
|
49
49
|
mode: "index",
|
|
50
50
|
intersect: !1
|
|
51
51
|
}),
|
|
52
52
|
plugins: {
|
|
53
53
|
legend: { display: !1 },
|
|
54
54
|
tooltip: {
|
|
55
|
-
enabled:
|
|
55
|
+
enabled: s(y),
|
|
56
56
|
backgroundColor: N,
|
|
57
57
|
titleColor: P,
|
|
58
58
|
bodyColor: P,
|
|
@@ -68,7 +68,7 @@ var w = (e, t, n = 1) => {
|
|
|
68
68
|
...y ? { formatYAxisTick: k } : {}
|
|
69
69
|
})
|
|
70
70
|
},
|
|
71
|
-
plugins:
|
|
71
|
+
plugins: a(y, [...g ? [d(c)] : [], ...v.length > 0 ? [f({ markers: v }, c)] : []])
|
|
72
72
|
};
|
|
73
73
|
}, M = [
|
|
74
74
|
{
|
|
@@ -122,39 +122,39 @@ var w = (e, t, n = 1) => {
|
|
|
122
122
|
},
|
|
123
123
|
markers: { default: () => [] }
|
|
124
124
|
},
|
|
125
|
-
setup(
|
|
126
|
-
let
|
|
127
|
-
if (
|
|
128
|
-
}), { chartInstance: l } =
|
|
129
|
-
canvasRef:
|
|
130
|
-
config: p(() => !
|
|
131
|
-
points:
|
|
132
|
-
seriesLabel:
|
|
133
|
-
colorHostElement:
|
|
134
|
-
yMax:
|
|
135
|
-
yMin:
|
|
136
|
-
yStep:
|
|
137
|
-
area:
|
|
138
|
-
zeroLine:
|
|
139
|
-
dangerBelowZero:
|
|
140
|
-
markers:
|
|
141
|
-
skeleton:
|
|
125
|
+
setup(t, { expose: n }) {
|
|
126
|
+
let r = S("chartRootRef"), i = S("chartCanvasRef"), a = p(() => t.loading ? M : t.points), s = p(() => {
|
|
127
|
+
if (t.height !== void 0) return { "--s-ui-chart-line-viewport-height": typeof t.height == "number" ? `${t.height}px` : t.height };
|
|
128
|
+
}), { chartInstance: l } = o({
|
|
129
|
+
canvasRef: i,
|
|
130
|
+
config: p(() => !t.loading && t.points.length === 0 ? null : j({
|
|
131
|
+
points: a.value,
|
|
132
|
+
seriesLabel: t.seriesLabel,
|
|
133
|
+
colorHostElement: r.value,
|
|
134
|
+
yMax: t.loading ? 100 : t.yMax,
|
|
135
|
+
yMin: t.loading ? 50 : t.yMin,
|
|
136
|
+
yStep: t.loading ? 10 : t.yStep,
|
|
137
|
+
area: t.area,
|
|
138
|
+
zeroLine: t.zeroLine,
|
|
139
|
+
dangerBelowZero: t.dangerBelowZero,
|
|
140
|
+
markers: t.markers,
|
|
141
|
+
skeleton: t.loading
|
|
142
142
|
})),
|
|
143
|
-
enabled: p(() =>
|
|
144
|
-
}), { exportImage: u } =
|
|
143
|
+
enabled: p(() => t.loading || t.points.length > 0)
|
|
144
|
+
}), { exportImage: u } = c({
|
|
145
145
|
chartInstance: l,
|
|
146
|
-
canvasRef:
|
|
147
|
-
colorHostElement:
|
|
146
|
+
canvasRef: i,
|
|
147
|
+
colorHostElement: r
|
|
148
148
|
});
|
|
149
|
-
return
|
|
149
|
+
return n({ exportImage: u }), (n, a) => (b(), m("div", {
|
|
150
150
|
ref_key: "chartRootRef",
|
|
151
|
-
ref:
|
|
152
|
-
class: v(["s-ui-chart-line", { "s-ui-chart-line--skeleton":
|
|
151
|
+
ref: r,
|
|
152
|
+
class: v(["s-ui-chart-line", { "s-ui-chart-line--skeleton": t.loading }]),
|
|
153
153
|
style: y(s.value)
|
|
154
|
-
}, [h("div", N, [g(x(
|
|
154
|
+
}, [h("div", N, [g(x(e), { loading: t.loading }, {
|
|
155
155
|
default: C(() => [h("canvas", {
|
|
156
156
|
ref_key: "chartCanvasRef",
|
|
157
|
-
ref:
|
|
157
|
+
ref: i,
|
|
158
158
|
class: "s-ui-chart-line__canvas"
|
|
159
159
|
}, null, 512)]),
|
|
160
160
|
_: 1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./useChartInteractivity-
|
|
1
|
+
const e=require("./useChartInteractivity-Yk7qEYgl.cjs"),t=require("./buildCartesianChartScales-Dck5yBMo.cjs"),n=require("./resolveChartValueRange-DBCYLCXs.cjs"),r=require("./createChartMarkersPlugin-L7qomZVK.cjs");let i=require("vue");var a=(e,t,n=1)=>{if(typeof window>`u`)return n;let r=t??document.documentElement,i=getComputedStyle(r).getPropertyValue(e).trim(),a=Number.parseFloat(i);return Number.isNaN(a)?n:a},o=5,s=5,c=16,l=`--s-ui-chart-line-danger-fill`,u=e=>typeof e==`number`?`${e}%`:e,d=(e,t,r,i,a)=>{let o=e.map(e=>e.value);return a?{min:t??0,max:r??n.t(o,{yStep:i}).max}:n.t(o,{yMin:t,yMax:r,yStep:i})},f=({points:n,seriesLabel:i,colorHostElement:f,yMax:p,yMin:m,yStep:h=s,area:g=!0,zeroLine:_=!1,dangerBelowZero:v=!1,markers:y=[],skeleton:b=!1})=>{let x=e.S(e.D.axisLabel,f),S=e.S(e.D.grid,f),C=e.S(b?e.D.skeletonSeries:e.D.seriesPrimary,f),w=e.S(b?e.D.skeletonFillStart:e.D.seriesFillStart,f),T=e.S(b?e.D.skeletonFillEnd:e.D.seriesFillEnd,f),E=e.S(l,f),D=e.S(e.D.tooltipBackground,f),O=e.S(e.D.tooltipText,f),k=a(b?e.D.skeletonFillOpacity:e.D.seriesFillOpacity,f,.8),A=d(n,m,p,h,b),j=g||b,M=v&&!b,N=t=>e.d(t,w,T,k),P=M?{target:{value:0},below:E}:j?`origin`:!1;return{type:`line`,data:{labels:n.map(e=>e.label),datasets:[{label:i,data:n.map(e=>e.value),borderColor:C,backgroundColor:j?N:`transparent`,pointBackgroundColor:C,pointHoverBackgroundColor:C,borderWidth:o,fill:P,pointRadius:0,pointHoverRadius:4,tension:.4}]},options:{responsive:!0,maintainAspectRatio:!1,layout:{padding:{top:y.length>0?c:0}},interaction:e.f(b,{mode:`index`,intersect:!1}),plugins:{legend:{display:!1},tooltip:{enabled:e.p(b),backgroundColor:D,titleColor:O,bodyColor:O,displayColors:!1}},scales:t.t({axisLabelColor:x,gridColor:S,yMin:A.min,yMax:A.max,yStep:h,...b?{formatYAxisTick:u}:{}})},plugins:e.m(b,[..._?[r.n(f)]:[],...y.length>0?[r.t({markers:y},f)]:[]])}},p=[{label:`ноябрь 2025`,value:63},{label:`декабрь 2025`,value:77},{label:`январь 2026`,value:75},{label:`февраль 2026`,value:81},{label:`март 2026`,value:91},{label:`апрель 2026`,value:87}],m={class:`s-ui-chart-line__canvas-wrap`},h=(0,i.defineComponent)({__name:`SChartLine`,props:{points:{default:()=>[]},seriesLabel:{default:`Series`},loading:{type:Boolean,default:!1},yMax:{},yMin:{},yStep:{},height:{},area:{type:Boolean,default:!0},zeroLine:{type:Boolean,default:!1},dangerBelowZero:{type:Boolean,default:!1},markers:{default:()=>[]}},setup(t,{expose:n}){let r=(0,i.useTemplateRef)(`chartRootRef`),a=(0,i.useTemplateRef)(`chartCanvasRef`),o=(0,i.computed)(()=>t.loading?p:t.points),s=(0,i.computed)(()=>{if(t.height!==void 0)return{"--s-ui-chart-line-viewport-height":typeof t.height==`number`?`${t.height}px`:t.height}}),{chartInstance:c}=e.n({canvasRef:a,config:(0,i.computed)(()=>!t.loading&&t.points.length===0?null:f({points:o.value,seriesLabel:t.seriesLabel,colorHostElement:r.value,yMax:t.loading?100:t.yMax,yMin:t.loading?50:t.yMin,yStep:t.loading?10:t.yStep,area:t.area,zeroLine:t.zeroLine,dangerBelowZero:t.dangerBelowZero,markers:t.markers,skeleton:t.loading})),enabled:(0,i.computed)(()=>t.loading||t.points.length>0)}),{exportImage:l}=e.t({chartInstance:c,canvasRef:a,colorHostElement:r});return n({exportImage:l}),(n,o)=>((0,i.openBlock)(),(0,i.createElementBlock)(`div`,{ref_key:`chartRootRef`,ref:r,class:(0,i.normalizeClass)([`s-ui-chart-line`,{"s-ui-chart-line--skeleton":t.loading}]),style:(0,i.normalizeStyle)(s.value)},[(0,i.createElementVNode)(`div`,m,[(0,i.createVNode)((0,i.unref)(e.C),{loading:t.loading},{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`canvas`,{ref_key:`chartCanvasRef`,ref:a,class:`s-ui-chart-line__canvas`},null,512)]),_:1},8,[`loading`])])],6))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return h}});
|