@shtabapp/ui-kit 1.45.0 → 1.46.0

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.
Files changed (109) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/{SChartBurnup-DhuCNXhU.cjs → SChartBurnup-BhCS06uF.cjs} +1 -1
  3. package/dist/SChartBurnup-CG239MJx.js +251 -0
  4. package/dist/SChartHorizontalBar-DnKbf_9E.cjs +1 -0
  5. package/dist/SChartHorizontalBar-DqTZ4H-9.js +175 -0
  6. package/dist/SChartLegend-DGtjd6zV.cjs +1 -0
  7. package/dist/SChartLegend-oZoF8XK7.js +42 -0
  8. package/dist/SChartLine-CEnRbnVo.cjs +1 -0
  9. package/dist/SChartLine-CQhbtAjJ.js +129 -0
  10. package/dist/SChartMultiLine-B6GldTYv.cjs +1 -0
  11. package/dist/SChartMultiLine-CPEglksk.js +198 -0
  12. package/dist/SChartPie-CQyENNM6.cjs +1 -0
  13. package/dist/SChartPie-DXHCXNEs.js +168 -0
  14. package/dist/{SChartProgress-Zdphet8I.js → SChartProgress-BwDuidgB.js} +54 -50
  15. package/dist/{SChartProgress-QsGTZ8kT.cjs → SChartProgress-CMcM6yvT.cjs} +1 -1
  16. package/dist/SChartSkeletonHost-BlIYGj-7.cjs +1 -0
  17. package/dist/{SChartSkeletonHost-CecfQ3Ye.js → SChartSkeletonHost-DSFyP_DN.js} +150 -89
  18. package/dist/SChartStackedArea-BR7W44h6.js +254 -0
  19. package/dist/SChartStackedArea-DHSamqau.cjs +1 -0
  20. package/dist/SChartStackedBar-B3HcO4UQ.cjs +1 -0
  21. package/dist/SChartStackedBar-BbYna5KB.js +245 -0
  22. package/dist/components/SChartBurnup/SChartBurnup.vue.d.ts +4 -1
  23. package/dist/components/SChartBurnup/SChartBurnup.vue.d.ts.map +1 -1
  24. package/dist/components/SChartHorizontalBar/SChartHorizontalBar.vue.d.ts +9 -2
  25. package/dist/components/SChartHorizontalBar/SChartHorizontalBar.vue.d.ts.map +1 -1
  26. package/dist/components/SChartHorizontalBar/utils/buildSChartHorizontalBarConfig.d.ts +1 -0
  27. package/dist/components/SChartHorizontalBar/utils/buildSChartHorizontalBarConfig.d.ts.map +1 -1
  28. package/dist/components/SChartLegend/SChartLegend.types.d.ts +2 -0
  29. package/dist/components/SChartLegend/SChartLegend.types.d.ts.map +1 -1
  30. package/dist/components/SChartLegend/SChartLegend.vue.d.ts +5 -1
  31. package/dist/components/SChartLegend/SChartLegend.vue.d.ts.map +1 -1
  32. package/dist/components/SChartLine/SChartLine.vue.d.ts +4 -1
  33. package/dist/components/SChartLine/SChartLine.vue.d.ts.map +1 -1
  34. package/dist/components/SChartMultiLine/SChartMultiLine.vue.d.ts +9 -2
  35. package/dist/components/SChartMultiLine/SChartMultiLine.vue.d.ts.map +1 -1
  36. package/dist/components/SChartMultiLine/utils/buildMultiLineChartConfig.d.ts +2 -1
  37. package/dist/components/SChartMultiLine/utils/buildMultiLineChartConfig.d.ts.map +1 -1
  38. package/dist/components/SChartPie/SChartPie.vue.d.ts +9 -2
  39. package/dist/components/SChartPie/SChartPie.vue.d.ts.map +1 -1
  40. package/dist/components/SChartPie/utils/buildPieChartConfig.d.ts +2 -1
  41. package/dist/components/SChartPie/utils/buildPieChartConfig.d.ts.map +1 -1
  42. package/dist/components/SChartProgress/SChartProgress.vue.d.ts +4 -1
  43. package/dist/components/SChartProgress/SChartProgress.vue.d.ts.map +1 -1
  44. package/dist/components/SChartSegmentedBar/SChartSegmentedBar.vue.d.ts +9 -2
  45. package/dist/components/SChartSegmentedBar/SChartSegmentedBar.vue.d.ts.map +1 -1
  46. package/dist/components/SChartSegmentedBar/utils/buildSegmentedBarChartConfig.d.ts +2 -1
  47. package/dist/components/SChartSegmentedBar/utils/buildSegmentedBarChartConfig.d.ts.map +1 -1
  48. package/dist/components/SChartStackedArea/SChartStackedArea.vue.d.ts +9 -2
  49. package/dist/components/SChartStackedArea/SChartStackedArea.vue.d.ts.map +1 -1
  50. package/dist/components/SChartStackedArea/utils/buildStackedAreaChartConfig.d.ts +2 -1
  51. package/dist/components/SChartStackedArea/utils/buildStackedAreaChartConfig.d.ts.map +1 -1
  52. package/dist/components/SChartStackedBar/SChartStackedBar.vue.d.ts +9 -2
  53. package/dist/components/SChartStackedBar/SChartStackedBar.vue.d.ts.map +1 -1
  54. package/dist/components/SChartStackedBar/utils/buildStackedBarChartConfig.d.ts +2 -1
  55. package/dist/components/SChartStackedBar/utils/buildStackedBarChartConfig.d.ts.map +1 -1
  56. package/dist/composables/useChartInteractivity.d.ts +14 -0
  57. package/dist/composables/useChartInteractivity.d.ts.map +1 -0
  58. package/dist/composables/useHasListener.d.ts +2 -0
  59. package/dist/composables/useHasListener.d.ts.map +1 -0
  60. package/dist/{createChartCrosshairPlugin-HfMMUP5O.cjs → createChartCrosshairPlugin-DdLyEWI0.cjs} +1 -1
  61. package/dist/{createChartCrosshairPlugin-BC0IDCn3.js → createChartCrosshairPlugin-q3U4ePnf.js} +2 -2
  62. package/dist/entries/chart-burnup.cjs +1 -1
  63. package/dist/entries/chart-burnup.js +1 -1
  64. package/dist/entries/chart-horizontal-bar.cjs +1 -1
  65. package/dist/entries/chart-horizontal-bar.js +1 -1
  66. package/dist/entries/chart-line.cjs +1 -1
  67. package/dist/entries/chart-line.js +1 -1
  68. package/dist/entries/chart-multi-line.cjs +1 -1
  69. package/dist/entries/chart-multi-line.js +1 -1
  70. package/dist/entries/chart-pie.cjs +1 -1
  71. package/dist/entries/chart-pie.js +1 -1
  72. package/dist/entries/chart-progress.cjs +1 -1
  73. package/dist/entries/chart-progress.js +1 -1
  74. package/dist/entries/chart-stacked-area.cjs +1 -1
  75. package/dist/entries/chart-stacked-area.js +1 -1
  76. package/dist/entries/chart-stacked-bar.cjs +1 -1
  77. package/dist/entries/chart-stacked-bar.js +1 -1
  78. package/dist/index.cjs +1 -1
  79. package/dist/index.js +181 -137
  80. package/dist/resolveSeriesPaletteColor-YACKW1NO.cjs +1 -0
  81. package/dist/{resolveSeriesPaletteColor-m8HQ9qwV.js → resolveSeriesPaletteColor-fuhGbjFO.js} +1 -1
  82. package/dist/{resolveStackedChartContext-DdraOueU.js → resolveStackedChartContext-BiIGZ2or.js} +5 -5
  83. package/dist/{resolveStackedChartContext-BywAnZUu.cjs → resolveStackedChartContext-Bp75eU_I.cjs} +1 -1
  84. package/dist/useHasListener-BPgtbbo6.cjs +1 -0
  85. package/dist/useHasListener-RSjlUyqH.js +8 -0
  86. package/dist/utils/chart/core/chartCssVariables.d.ts +2 -0
  87. package/dist/utils/chart/core/chartCssVariables.d.ts.map +1 -1
  88. package/dist/utils/chart/core/chartInteractivity.d.ts +41 -0
  89. package/dist/utils/chart/core/chartInteractivity.d.ts.map +1 -0
  90. package/dist/utils/chart/horizontalBar/buildHorizontalBarChartConfig.d.ts +2 -1
  91. package/dist/utils/chart/horizontalBar/buildHorizontalBarChartConfig.d.ts.map +1 -1
  92. package/package.json +2 -2
  93. package/dist/SChartBurnup-DYBnJMnm.js +0 -247
  94. package/dist/SChartHorizontalBar-DMBzyz9x.cjs +0 -1
  95. package/dist/SChartHorizontalBar-bm3Jexa3.js +0 -156
  96. package/dist/SChartLegend-Chr0IZWN.js +0 -30
  97. package/dist/SChartLegend-DXFXKXCm.cjs +0 -1
  98. package/dist/SChartLine-CiREb4H_.js +0 -125
  99. package/dist/SChartLine-P57XRR2o.cjs +0 -1
  100. package/dist/SChartMultiLine-3cdB0U12.js +0 -166
  101. package/dist/SChartMultiLine-BW1kITlR.cjs +0 -1
  102. package/dist/SChartPie-55wx2zRi.cjs +0 -1
  103. package/dist/SChartPie-Dc_gjzIl.js +0 -143
  104. package/dist/SChartSkeletonHost-CfM0zolj.cjs +0 -1
  105. package/dist/SChartStackedArea-BaJ963lU.cjs +0 -1
  106. package/dist/SChartStackedArea-cjN9gECV.js +0 -219
  107. package/dist/SChartStackedBar-0jGICBA0.js +0 -217
  108. package/dist/SChartStackedBar-j9WyOnsL.cjs +0 -1
  109. package/dist/resolveSeriesPaletteColor-BcFyrhh0.cjs +0 -1
@@ -1,219 +0,0 @@
1
- import { a as e, b as t, c as n, g as r, i, o as a, r as o, s, t as c, x as l } from "./SChartSkeletonHost-CecfQ3Ye.js";
2
- import { t as u } from "./buildCartesianChartScales-EofFq3ry.js";
3
- import { n as d, t as f } from "./buildChartSeriesPoints-D8Xpfwp7.js";
4
- import { t as p } from "./resolveStackedChartContext-DdraOueU.js";
5
- import { t as m } from "./createChartCrosshairPlugin-BC0IDCn3.js";
6
- import { t as h } from "./resolveSeriesPaletteColor-m8HQ9qwV.js";
7
- import { t as g } from "./SChartLegend-Chr0IZWN.js";
8
- import { computed as _, createBlock as v, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createVNode as S, defineComponent as C, normalizeClass as w, openBlock as T, unref as E, useTemplateRef as D, withCtx as O } from "vue";
9
- //#region src/utils/chart/stacked/resolveStackedSeriesColor.ts
10
- var k = (e, n, i, a = !1) => h(e, n, i, a, {
11
- palette: l,
12
- paletteFallback: r.stackedPalette1,
13
- skeletonPalette: t,
14
- skeletonFallback: r.skeletonPalette1
15
- }), A = 20, j = "stack0", M = ({ seriesList: t, colorHostElement: r, yMax: o, yMin: c, yStep: l = A, skeleton: d = !1, totalLabel: f }) => {
16
- let h = p({
17
- seriesList: t,
18
- colorHostElement: r,
19
- yMax: o,
20
- yMin: c,
21
- yStep: l,
22
- skeleton: d
23
- });
24
- if (!h) return null;
25
- let { axisLabelColor: g, gridColor: _, tooltipBackgroundColor: v, tooltipTextColor: y, resolvedYMax: b, resolvedYMin: x, chartLabels: S } = h;
26
- return {
27
- type: "line",
28
- data: {
29
- labels: S,
30
- datasets: t.map((e, t) => ({
31
- label: e.label,
32
- data: e.points.map((e) => e.value),
33
- borderColor: k(t, r, e.fillColor, d),
34
- backgroundColor: k(t, r, e.fillColor, d),
35
- borderWidth: 0,
36
- fill: !0,
37
- pointRadius: 0,
38
- pointHoverRadius: 0,
39
- tension: 0,
40
- stack: j
41
- }))
42
- },
43
- options: {
44
- responsive: !0,
45
- maintainAspectRatio: !1,
46
- interaction: i(d, {
47
- mode: "index",
48
- intersect: !1
49
- }),
50
- plugins: {
51
- legend: { display: !1 },
52
- tooltip: {
53
- enabled: e(d),
54
- backgroundColor: v,
55
- titleColor: y,
56
- bodyColor: y,
57
- footerColor: y,
58
- displayColors: !1,
59
- position: s,
60
- yAlign: "bottom",
61
- xAlign: "center",
62
- caretPadding: 8,
63
- callbacks: n({ total: f })
64
- }
65
- },
66
- scales: u({
67
- axisLabelColor: g,
68
- gridColor: _,
69
- yMin: x,
70
- yMax: b,
71
- yStep: l,
72
- stacked: !0
73
- })
74
- },
75
- plugins: a(d, [m(r)])
76
- };
77
- }, N = [
78
- "24.02",
79
- "28.02",
80
- "04.03",
81
- "08.03",
82
- "12.03",
83
- "16.03",
84
- "20.03",
85
- "24.03",
86
- "28.03",
87
- "01.04",
88
- "05.04",
89
- "09.04",
90
- "13.04",
91
- "17.04"
92
- ], P = [
93
- 18,
94
- 22,
95
- 26,
96
- 30,
97
- 34,
98
- 38,
99
- 42,
100
- 44,
101
- 46,
102
- 48,
103
- 49,
104
- 50,
105
- 51,
106
- 52
107
- ], F = [
108
- 6,
109
- 6,
110
- 7,
111
- 7,
112
- 7,
113
- 7,
114
- 7,
115
- 7,
116
- 7,
117
- 7,
118
- 7,
119
- 7,
120
- 7,
121
- 7
122
- ], I = [
123
- 10,
124
- 11,
125
- 12,
126
- 12,
127
- 11,
128
- 10,
129
- 10,
130
- 10,
131
- 10,
132
- 10,
133
- 10,
134
- 10,
135
- 10,
136
- 10
137
- ], L = [
138
- 32,
139
- 30,
140
- 28,
141
- 26,
142
- 28,
143
- 30,
144
- 29,
145
- 28,
146
- 27,
147
- 26,
148
- 26,
149
- 27,
150
- 28,
151
- 28
152
- ], R = [
153
- "Готово",
154
- "На ревью",
155
- "В процессе",
156
- "Бэклог"
157
- ], z = [
158
- {
159
- label: R[0] ?? "Series 1",
160
- points: f(N, P)
161
- },
162
- {
163
- label: R[1] ?? "Series 2",
164
- points: f(N, F)
165
- },
166
- {
167
- label: R[2] ?? "Series 3",
168
- points: f(N, I)
169
- },
170
- {
171
- label: R[3] ?? "Series 4",
172
- points: f(N, L)
173
- }
174
- ], B = { class: "s-ui-chart-stacked-area__canvas-wrap" }, V = /* @__PURE__ */ C({
175
- __name: "SChartStackedArea",
176
- props: {
177
- series: { default: () => [] },
178
- loading: {
179
- type: Boolean,
180
- default: !1
181
- },
182
- yMax: {},
183
- yStep: {},
184
- totalLabel: {}
185
- },
186
- setup(e) {
187
- let t = D("chartRootRef"), n = D("chartCanvasRef"), r = _(() => e.loading ? z : e.series), i = _(() => !e.loading && e.series.length === 0 ? null : M({
188
- seriesList: r.value,
189
- colorHostElement: t.value,
190
- yMax: e.loading ? 160 : e.yMax,
191
- yMin: e.loading ? 0 : void 0,
192
- yStep: e.loading ? 20 : e.yStep,
193
- skeleton: e.loading,
194
- totalLabel: e.totalLabel
195
- })), a = _(() => d(r.value, (n, r) => k(n, t.value, r, e.loading)));
196
- return o({
197
- canvasRef: n,
198
- config: i,
199
- enabled: _(() => e.loading || e.series.length > 0)
200
- }), (r, i) => (T(), b("div", {
201
- ref_key: "chartRootRef",
202
- ref: t,
203
- class: w(["s-ui-chart-stacked-area", { "s-ui-chart-stacked-area--skeleton": e.loading }])
204
- }, [x("div", B, [S(E(c), { loading: e.loading }, {
205
- default: O(() => [x("canvas", {
206
- ref_key: "chartCanvasRef",
207
- ref: n,
208
- class: "s-ui-chart-stacked-area__canvas"
209
- }, null, 512)]),
210
- _: 1
211
- }, 8, ["loading"])]), a.value.length > 0 ? (T(), v(E(g), {
212
- key: 0,
213
- items: a.value,
214
- disabled: e.loading
215
- }, null, 8, ["items", "disabled"])) : y("", !0)], 2));
216
- }
217
- });
218
- //#endregion
219
- export { V as t };
@@ -1,217 +0,0 @@
1
- import { S as e, a as t, f as n, g as r, h as i, i as a, m as o, o as s, p as c, r as l, t as u } from "./SChartSkeletonHost-CecfQ3Ye.js";
2
- import { t as d } from "./buildCartesianChartScales-EofFq3ry.js";
3
- import { n as f, t as p } from "./buildChartSeriesPoints-D8Xpfwp7.js";
4
- import { t as m } from "./resolveStackedChartContext-DdraOueU.js";
5
- import { t as h } from "./resolveSeriesPaletteColor-m8HQ9qwV.js";
6
- import { t as g } from "./SChartLegend-Chr0IZWN.js";
7
- import { computed as _, createBlock as v, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createVNode as S, defineComponent as C, normalizeClass as w, openBlock as T, unref as E, useTemplateRef as D, withCtx as O } from "vue";
8
- //#region src/utils/chart/bar/resolveBarStackedSeriesColor.ts
9
- var k = (e, t, n, a = !1) => h(e, t, n, a, {
10
- palette: i,
11
- paletteFallback: r.barStackedPalette1,
12
- skeletonPalette: o,
13
- skeletonFallback: r.barSkeletonPalette1
14
- }), A = 3, j = 4, M = (e, t, n, r, i, a) => {
15
- let o = Math.min(a, r / 2, i), s = o;
16
- e.beginPath(), e.moveTo(t, n + i), e.lineTo(t, n + o), e.arcTo(t, n, t + o, n, o), e.lineTo(t + r - s, n), e.arcTo(t + r, n, t + r, n + s, s), e.lineTo(t + r, n + i), e.closePath(), e.stroke();
17
- }, N = (t) => ({
18
- id: "stackedBarHoverOutline",
19
- afterDatasetsDraw(n) {
20
- let i = n.tooltip?.getActiveElements() ?? [];
21
- if (i.length === 0) return;
22
- let a = Infinity, o = Infinity, s = -Infinity, c = -Infinity;
23
- for (let e of i) {
24
- let { x: t, y: n, width: r, base: i } = e.element.getProps([
25
- "x",
26
- "y",
27
- "width",
28
- "base"
29
- ]), l = t - r / 2, u = t + r / 2, d = n, f = i;
30
- a = Math.min(a, l), s = Math.max(s, u), o = Math.min(o, d), c = Math.max(c, f);
31
- }
32
- let l = e(r.barHoverOutline, t), { ctx: u, chartArea: d } = n, f = A / 2, p = d?.bottom ?? c, m = Math.min(c, p), h = a + f, g = o + f, _ = s - a - A, v = m - o - A;
33
- if (_ <= 0 || v <= 0) return;
34
- let y = Math.max(0, j - f);
35
- u.save(), u.strokeStyle = l, u.lineWidth = A, M(u, h, g, _, v, y), u.restore();
36
- }
37
- }), P = 5, F = "stack0", I = 36, L = 4, R = 12, z = ({ seriesList: e, colorHostElement: r, yMax: i, yMin: o, yStep: l = P, skeleton: u = !1 }) => {
38
- let f = m({
39
- seriesList: e,
40
- colorHostElement: r,
41
- yMax: i,
42
- yMin: o,
43
- yStep: l,
44
- skeleton: u
45
- });
46
- if (!f) return null;
47
- let { axisLabelColor: p, gridColor: h, tooltipBackgroundColor: g, tooltipTextColor: _, resolvedYMax: v, resolvedYMin: y, chartLabels: b, pointCaptions: x, topSeriesIndex: S } = f;
48
- return {
49
- type: "bar",
50
- data: {
51
- labels: b,
52
- datasets: e.map((e, t) => {
53
- let n = k(t, r, e.fillColor, u);
54
- return {
55
- label: e.label,
56
- data: e.points.map((e) => e.value),
57
- backgroundColor: n,
58
- hoverBackgroundColor: n,
59
- borderWidth: 0,
60
- hoverBorderWidth: 0,
61
- stack: F,
62
- barThickness: I,
63
- borderRadius: t === S ? {
64
- topLeft: L,
65
- topRight: L
66
- } : 0,
67
- ...t === 0 ? { captions: x } : {}
68
- };
69
- })
70
- },
71
- options: {
72
- responsive: !0,
73
- maintainAspectRatio: !1,
74
- interaction: a(u, {
75
- mode: "index",
76
- intersect: !1
77
- }),
78
- plugins: {
79
- legend: { display: !1 },
80
- tooltip: {
81
- enabled: t(u),
82
- backgroundColor: g,
83
- titleColor: _,
84
- bodyColor: _,
85
- displayColors: !1,
86
- position: n,
87
- yAlign: "bottom",
88
- xAlign: "center",
89
- caretPadding: 8,
90
- callbacks: c()
91
- }
92
- },
93
- scales: d({
94
- axisLabelColor: p,
95
- gridColor: h,
96
- yMin: y,
97
- yMax: v,
98
- yStep: l,
99
- stacked: !0,
100
- xTickFontSize: R
101
- })
102
- },
103
- plugins: s(u, [N(r)])
104
- };
105
- }, B = [
106
- "5 неделя",
107
- "6 неделя",
108
- "7 неделя",
109
- "8 неделя",
110
- "9 неделя",
111
- "10 неделя",
112
- "11 неделя",
113
- "12 неделя",
114
- "13 неделя",
115
- "14 неделя",
116
- "15 неделя",
117
- "16 неделя"
118
- ], V = [
119
- 12,
120
- 14,
121
- 15,
122
- 16,
123
- 18,
124
- 17,
125
- 16,
126
- 15,
127
- 14,
128
- 13,
129
- 12,
130
- 11
131
- ], H = [
132
- 6,
133
- 7,
134
- 8,
135
- 8,
136
- 9,
137
- 8,
138
- 7,
139
- 7,
140
- 6,
141
- 6,
142
- 5,
143
- 5
144
- ], U = [
145
- 4,
146
- 5,
147
- 5,
148
- 6,
149
- 6,
150
- 5,
151
- 5,
152
- 4,
153
- 4,
154
- 3,
155
- 3,
156
- 3
157
- ], W = [
158
- "Series 1",
159
- "Series 2",
160
- "Series 3"
161
- ], G = [
162
- {
163
- label: W[0] ?? "Series 1",
164
- points: p(B, V)
165
- },
166
- {
167
- label: W[1] ?? "Series 2",
168
- points: p(B, H)
169
- },
170
- {
171
- label: W[2] ?? "Series 3",
172
- points: p(B, U)
173
- }
174
- ], K = { class: "s-ui-chart-stacked-bar__canvas-wrap" }, q = /* @__PURE__ */ C({
175
- __name: "SChartStackedBar",
176
- props: {
177
- series: { default: () => [] },
178
- loading: {
179
- type: Boolean,
180
- default: !1
181
- },
182
- yMax: {},
183
- yStep: {}
184
- },
185
- setup(e) {
186
- let t = D("chartRootRef"), n = D("chartCanvasRef"), r = _(() => e.loading ? G : e.series), i = _(() => !e.loading && e.series.length === 0 ? null : z({
187
- seriesList: r.value,
188
- colorHostElement: t.value,
189
- yMax: e.loading ? 50 : e.yMax,
190
- yMin: e.loading ? 0 : void 0,
191
- yStep: e.loading ? 5 : e.yStep,
192
- skeleton: e.loading
193
- })), a = _(() => f(r.value, (n, r) => k(n, t.value, r, e.loading)));
194
- return l({
195
- canvasRef: n,
196
- config: i,
197
- enabled: _(() => e.loading || e.series.length > 0)
198
- }), (r, i) => (T(), b("div", {
199
- ref_key: "chartRootRef",
200
- ref: t,
201
- class: w(["s-ui-chart-stacked-bar", { "s-ui-chart-stacked-bar--skeleton": e.loading }])
202
- }, [x("div", K, [S(E(u), { loading: e.loading }, {
203
- default: O(() => [x("canvas", {
204
- ref_key: "chartCanvasRef",
205
- ref: n,
206
- class: "s-ui-chart-stacked-bar__canvas"
207
- }, null, 512)]),
208
- _: 1
209
- }, 8, ["loading"])]), a.value.length > 0 ? (T(), v(E(g), {
210
- key: 0,
211
- items: a.value,
212
- disabled: e.loading
213
- }, null, 8, ["items", "disabled"])) : y("", !0)], 2));
214
- }
215
- });
216
- //#endregion
217
- export { q as t };
@@ -1 +0,0 @@
1
- const e=require("./SChartSkeletonHost-CfM0zolj.cjs"),t=require("./buildCartesianChartScales-Dck5yBMo.cjs"),n=require("./buildChartSeriesPoints-Bv3nXvSu.cjs"),r=require("./resolveStackedChartContext-BywAnZUu.cjs"),i=require("./resolveSeriesPaletteColor-BcFyrhh0.cjs"),a=require("./SChartLegend-DXFXKXCm.cjs");let o=require("vue");var s=(t,n,r,a=!1)=>i.t(t,n,r,a,{palette:e.h,paletteFallback:e.g.barStackedPalette1,skeletonPalette:e.m,skeletonFallback:e.g.barSkeletonPalette1}),c=3,l=4,u=(e,t,n,r,i,a)=>{let o=Math.min(a,r/2,i),s=o;e.beginPath(),e.moveTo(t,n+i),e.lineTo(t,n+o),e.arcTo(t,n,t+o,n,o),e.lineTo(t+r-s,n),e.arcTo(t+r,n,t+r,n+s,s),e.lineTo(t+r,n+i),e.closePath(),e.stroke()},d=t=>({id:`stackedBarHoverOutline`,afterDatasetsDraw(n){let r=n.tooltip?.getActiveElements()??[];if(r.length===0)return;let i=1/0,a=1/0,o=-1/0,s=-1/0;for(let e of r){let{x:t,y:n,width:r,base:c}=e.element.getProps([`x`,`y`,`width`,`base`]),l=t-r/2,u=t+r/2,d=n,f=c;i=Math.min(i,l),o=Math.max(o,u),a=Math.min(a,d),s=Math.max(s,f)}let d=e.S(e.g.barHoverOutline,t),{ctx:f,chartArea:p}=n,m=c/2,h=p?.bottom??s,g=Math.min(s,h),_=i+m,v=a+m,y=o-i-c,b=g-a-c;if(y<=0||b<=0)return;let x=Math.max(0,l-m);f.save(),f.strokeStyle=d,f.lineWidth=c,u(f,_,v,y,b,x),f.restore()}}),f=5,p=`stack0`,m=36,h=4,g=12,_=({seriesList:n,colorHostElement:i,yMax:a,yMin:o,yStep:c=f,skeleton:l=!1})=>{let u=r.t({seriesList:n,colorHostElement:i,yMax:a,yMin:o,yStep:c,skeleton:l});if(!u)return null;let{axisLabelColor:_,gridColor:v,tooltipBackgroundColor:y,tooltipTextColor:b,resolvedYMax:x,resolvedYMin:S,chartLabels:C,pointCaptions:w,topSeriesIndex:T}=u;return{type:`bar`,data:{labels:C,datasets:n.map((e,t)=>{let n=s(t,i,e.fillColor,l);return{label:e.label,data:e.points.map(e=>e.value),backgroundColor:n,hoverBackgroundColor:n,borderWidth:0,hoverBorderWidth:0,stack:p,barThickness:m,borderRadius:t===T?{topLeft:h,topRight:h}:0,...t===0?{captions:w}:{}}})},options:{responsive:!0,maintainAspectRatio:!1,interaction:e.i(l,{mode:`index`,intersect:!1}),plugins:{legend:{display:!1},tooltip:{enabled:e.a(l),backgroundColor:y,titleColor:b,bodyColor:b,displayColors:!1,position:e.f,yAlign:`bottom`,xAlign:`center`,caretPadding:8,callbacks:e.p()}},scales:t.t({axisLabelColor:_,gridColor:v,yMin:S,yMax:x,yStep:c,stacked:!0,xTickFontSize:g})},plugins:e.o(l,[d(i)])}},v=[`5 неделя`,`6 неделя`,`7 неделя`,`8 неделя`,`9 неделя`,`10 неделя`,`11 неделя`,`12 неделя`,`13 неделя`,`14 неделя`,`15 неделя`,`16 неделя`],y=[12,14,15,16,18,17,16,15,14,13,12,11],b=[6,7,8,8,9,8,7,7,6,6,5,5],x=[4,5,5,6,6,5,5,4,4,3,3,3],S=[`Series 1`,`Series 2`,`Series 3`],C=[{label:S[0]??`Series 1`,points:n.t(v,y)},{label:S[1]??`Series 2`,points:n.t(v,b)},{label:S[2]??`Series 3`,points:n.t(v,x)}],w={class:`s-ui-chart-stacked-bar__canvas-wrap`},T=(0,o.defineComponent)({__name:`SChartStackedBar`,props:{series:{default:()=>[]},loading:{type:Boolean,default:!1},yMax:{},yStep:{}},setup(t){let r=(0,o.useTemplateRef)(`chartRootRef`),i=(0,o.useTemplateRef)(`chartCanvasRef`),c=(0,o.computed)(()=>t.loading?C:t.series),l=(0,o.computed)(()=>!t.loading&&t.series.length===0?null:_({seriesList:c.value,colorHostElement:r.value,yMax:t.loading?50:t.yMax,yMin:t.loading?0:void 0,yStep:t.loading?5:t.yStep,skeleton:t.loading})),u=(0,o.computed)(()=>n.n(c.value,(e,n)=>s(e,r.value,n,t.loading)));return e.r({canvasRef:i,config:l,enabled:(0,o.computed)(()=>t.loading||t.series.length>0)}),(n,s)=>((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{ref_key:`chartRootRef`,ref:r,class:(0,o.normalizeClass)([`s-ui-chart-stacked-bar`,{"s-ui-chart-stacked-bar--skeleton":t.loading}])},[(0,o.createElementVNode)(`div`,w,[(0,o.createVNode)((0,o.unref)(e.t),{loading:t.loading},{default:(0,o.withCtx)(()=>[(0,o.createElementVNode)(`canvas`,{ref_key:`chartCanvasRef`,ref:i,class:`s-ui-chart-stacked-bar__canvas`},null,512)]),_:1},8,[`loading`])]),u.value.length>0?((0,o.openBlock)(),(0,o.createBlock)((0,o.unref)(a.t),{key:0,items:u.value,disabled:t.loading},null,8,[`items`,`disabled`])):(0,o.createCommentVNode)(``,!0)],2))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return T}});
@@ -1 +0,0 @@
1
- const e=require("./SChartSkeletonHost-CfM0zolj.cjs");var t=(t,n)=>t.startsWith(`--`)?e.S(t,n):t,n=(n,r,i,a,o)=>{if(i)return t(i,r);let s=a?o.skeletonPalette:o.palette,c=a?o.skeletonFallback:o.paletteFallback;return e.S(s[n%s.length]??c,r)};Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return n}});