@shtabapp/ui-kit 1.31.0 → 1.33.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 (111) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/SAvatar-C2gekygl.cjs +1 -0
  3. package/dist/SAvatar-DAfDAqrP.js +265 -0
  4. package/dist/{SAvatarGroup-CMa9KhUZ.cjs → SAvatarGroup-76j-sHCe.cjs} +1 -1
  5. package/dist/{SAvatarGroup-wkXHy_tK.js → SAvatarGroup-HvIlI5y0.js} +1 -1
  6. package/dist/{SChartHorizontalBar-CCn6L_Du.js → SChartHorizontalBar-DIn1sVoi.js} +1 -1
  7. package/dist/{SChartHorizontalBar-CLXp8bvq.cjs → SChartHorizontalBar-tfgmCHtk.cjs} +1 -1
  8. package/dist/{SChartLegend-CLTLJeRH.cjs → SChartLegend-BFwzIA4x.cjs} +1 -1
  9. package/dist/{SChartLegend-CcbzWNuw.js → SChartLegend-DW16AfUz.js} +1 -1
  10. package/dist/{SChartLine-BaOJ7lmv.js → SChartLine-G5CeC01A.js} +1 -1
  11. package/dist/{SChartLine-C_16iDsx.cjs → SChartLine-xql-HCwK.cjs} +1 -1
  12. package/dist/{SChartPie-qCJdztmc.js → SChartPie-_6ij1EVn.js} +18 -18
  13. package/dist/{SChartPie-BdKc6EbI.cjs → SChartPie-xu1fcWMy.cjs} +1 -1
  14. package/dist/SChartProgress-C08fiO6U.cjs +1 -0
  15. package/dist/SChartProgress-CofVafO6.js +207 -0
  16. package/dist/{SChartSkeletonHost-BnYGg6WN.js → SChartSkeletonHost-CnfMevXX.js} +86 -67
  17. package/dist/SChartSkeletonHost-YmLC5zOX.cjs +1 -0
  18. package/dist/{SChartStackedArea-ByOgW4Mi.cjs → SChartStackedArea-BUy47veO.cjs} +1 -1
  19. package/dist/{SChartStackedArea-B-E5tLfo.js → SChartStackedArea-RKK7aT7x.js} +20 -20
  20. package/dist/{SChartStackedBar-CbOLEjHH.cjs → SChartStackedBar-1HNyHP8J.cjs} +1 -1
  21. package/dist/{SChartStackedBar-DmtysTnY.js → SChartStackedBar-CJunMhyb.js} +23 -23
  22. package/dist/{SSelect-iBb45tet.js → SSelect-CZe3djdm.js} +6 -1
  23. package/dist/{SSelect-CgL7ECfS.cjs → SSelect-DAPSmCWf.cjs} +1 -1
  24. package/dist/STag-BwzuI3cF.cjs +1 -0
  25. package/dist/STag-L6B4DxOx.js +122 -0
  26. package/dist/{STagGroup-BMyuxfVX.cjs → STagGroup-BMGq6jB5.cjs} +1 -1
  27. package/dist/{STagGroup-B2-_OG3R.js → STagGroup-DWsu0ket.js} +1 -1
  28. package/dist/{buildChartSeriesPoints-Cj8ooXn5.js → buildChartSeriesPoints-D-j16fMh.js} +1 -1
  29. package/dist/{buildChartSeriesPoints-DXgWMMZH.cjs → buildChartSeriesPoints-lASMQmBx.cjs} +1 -1
  30. package/dist/components/SAvatar/SAvatar.vue.d.ts.map +1 -1
  31. package/dist/components/SAvatar/utils/getAvatarInitialsTextColor.d.ts +4 -0
  32. package/dist/components/SAvatar/utils/getAvatarInitialsTextColor.d.ts.map +1 -0
  33. package/dist/components/SAvatar/utils/resolveAvatarColor.d.ts +1 -3
  34. package/dist/components/SAvatar/utils/resolveAvatarColor.d.ts.map +1 -1
  35. package/dist/components/SChartProgress/SChartProgress.types.d.ts +15 -0
  36. package/dist/components/SChartProgress/SChartProgress.types.d.ts.map +1 -0
  37. package/dist/components/SChartProgress/SChartProgress.vue.d.ts +5 -0
  38. package/dist/components/SChartProgress/SChartProgress.vue.d.ts.map +1 -0
  39. package/dist/components/SChartProgress/index.d.ts +3 -0
  40. package/dist/components/SChartProgress/index.d.ts.map +1 -0
  41. package/dist/components/SChartProgress/utils/buildProgressChartConfig.d.ts +16 -0
  42. package/dist/components/SChartProgress/utils/buildProgressChartConfig.d.ts.map +1 -0
  43. package/dist/components/SChartProgress/utils/buildProgressChartData.d.ts +18 -0
  44. package/dist/components/SChartProgress/utils/buildProgressChartData.d.ts.map +1 -0
  45. package/dist/components/SChartProgress/utils/demoProgressSnapshots.d.ts +5 -0
  46. package/dist/components/SChartProgress/utils/demoProgressSnapshots.d.ts.map +1 -0
  47. package/dist/components/SChartProgress/utils/formatProgressChartDate.d.ts +2 -0
  48. package/dist/components/SChartProgress/utils/formatProgressChartDate.d.ts.map +1 -0
  49. package/dist/components/SChartProgress/utils/productionProgressSnapshots.d.ts +4 -0
  50. package/dist/components/SChartProgress/utils/productionProgressSnapshots.d.ts.map +1 -0
  51. package/dist/components/SChartProgress/utils/resolveProgressChartPointStyle.d.ts +10 -0
  52. package/dist/components/SChartProgress/utils/resolveProgressChartPointStyle.d.ts.map +1 -0
  53. package/dist/components/SChartProgress/utils/skeletonProgressSnapshots.d.ts +6 -0
  54. package/dist/components/SChartProgress/utils/skeletonProgressSnapshots.d.ts.map +1 -0
  55. package/dist/components/SSelect/SSelect.types.d.ts +5 -0
  56. package/dist/components/SSelect/SSelect.types.d.ts.map +1 -1
  57. package/dist/components/SSelect/SSelect.vue.d.ts.map +1 -1
  58. package/dist/components/STag/utils/resolveTagColor.d.ts +1 -3
  59. package/dist/components/STag/utils/resolveTagColor.d.ts.map +1 -1
  60. package/dist/contrastSurfaceTextColor-Dl641cZ_.js +33 -0
  61. package/dist/contrastSurfaceTextColor-Ybh-FZof.cjs +1 -0
  62. package/dist/entries/avatar-group.cjs +1 -1
  63. package/dist/entries/avatar-group.js +1 -1
  64. package/dist/entries/avatar.cjs +1 -1
  65. package/dist/entries/avatar.js +1 -1
  66. package/dist/entries/chart-horizontal-bar.cjs +1 -1
  67. package/dist/entries/chart-horizontal-bar.js +1 -1
  68. package/dist/entries/chart-line.cjs +1 -1
  69. package/dist/entries/chart-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 -0
  73. package/dist/entries/chart-progress.d.ts +3 -0
  74. package/dist/entries/chart-progress.d.ts.map +1 -0
  75. package/dist/entries/chart-progress.js +2 -0
  76. package/dist/entries/chart-stacked-area.cjs +1 -1
  77. package/dist/entries/chart-stacked-area.js +1 -1
  78. package/dist/entries/chart-stacked-bar.cjs +1 -1
  79. package/dist/entries/chart-stacked-bar.js +1 -1
  80. package/dist/entries/select.cjs +1 -1
  81. package/dist/entries/select.js +1 -1
  82. package/dist/entries/tag-group.cjs +1 -1
  83. package/dist/entries/tag-group.js +2 -2
  84. package/dist/entries/tag.cjs +1 -1
  85. package/dist/entries/tag.js +1 -1
  86. package/dist/index.cjs +1 -1
  87. package/dist/index.d.ts +2 -0
  88. package/dist/index.d.ts.map +1 -1
  89. package/dist/index.js +13 -12
  90. package/dist/uikit-components.css +1 -1
  91. package/dist/utils/chart/chart.types.d.ts +4 -0
  92. package/dist/utils/chart/chart.types.d.ts.map +1 -1
  93. package/dist/utils/chart/chartJsAugmentation.d.ts +1 -0
  94. package/dist/utils/chart/chartJsAugmentation.d.ts.map +1 -1
  95. package/dist/utils/chart/core/chartCssVariables.d.ts +2 -0
  96. package/dist/utils/chart/core/chartCssVariables.d.ts.map +1 -1
  97. package/dist/utils/chart/core/chartSkeletonConfig.d.ts +2 -1
  98. package/dist/utils/chart/core/chartSkeletonConfig.d.ts.map +1 -1
  99. package/dist/utils/chart/core/registerChartJs.d.ts.map +1 -1
  100. package/dist/utils/chart/progress/createProgressChartTooltipPositioner.d.ts +4 -0
  101. package/dist/utils/chart/progress/createProgressChartTooltipPositioner.d.ts.map +1 -0
  102. package/dist/utils/color/contrastSurfaceTextColor.d.ts +4 -0
  103. package/dist/utils/color/contrastSurfaceTextColor.d.ts.map +1 -0
  104. package/dist/utils/color/index.d.ts +2 -0
  105. package/dist/utils/color/index.d.ts.map +1 -0
  106. package/package.json +8 -3
  107. package/dist/SAvatar-BS9Lu2eL.js +0 -249
  108. package/dist/SAvatar-BXABKIV0.cjs +0 -1
  109. package/dist/SChartSkeletonHost-CixHLD65.cjs +0 -1
  110. package/dist/STag-CYoj7L-p.js +0 -118
  111. package/dist/STag-DVrSWByQ.cjs +0 -1
@@ -0,0 +1,207 @@
1
+ import { a as e, i as t, l as n, m as r, r as i, t as a, y as o } from "./SChartSkeletonHost-CnfMevXX.js";
2
+ import { computed as s, createElementBlock as c, createElementVNode as l, createVNode as u, defineComponent as d, normalizeClass as f, openBlock as p, unref as m, useTemplateRef as h, withCtx as g } from "vue";
3
+ var _ = 4, v = 12, y = 24, b = (e) => {
4
+ let t = e <= 15;
5
+ return {
6
+ pointRadius: t ? _ : 0,
7
+ pointHoverRadius: _,
8
+ pointHitRadius: t ? v : y
9
+ };
10
+ }, x = (e) => e <= 15 ? {
11
+ mode: "nearest",
12
+ intersect: !0
13
+ } : {
14
+ mode: "nearest",
15
+ axis: "x",
16
+ intersect: !1
17
+ }, S = .3, C = 1, w = ({ labels: i, progressValues: a, referenceValues: s, seriesLabel: c, valuePrefix: l, minValue: u, maxValue: d, stepSize: f, progressSnapshotCount: p, colorHostElement: m, skeleton: h = !1 }) => {
18
+ let g = o(r.axisLabel, m), _ = o(r.grid, m), v = o(h ? r.skeletonSeries : r.progressLine, m), y = o(h ? r.skeletonFillStart : r.referenceFill, m), w = o(r.tooltipBackground, m), T = o(r.tooltipText, m), E = S, D = b(p), O = x(p);
19
+ return {
20
+ type: "line",
21
+ data: {
22
+ labels: i,
23
+ datasets: [{
24
+ data: s,
25
+ borderColor: "transparent",
26
+ backgroundColor: y,
27
+ pointRadius: 0,
28
+ pointHoverRadius: 0,
29
+ pointHitRadius: 0,
30
+ fill: "start",
31
+ order: 0
32
+ }, {
33
+ label: c,
34
+ data: a,
35
+ borderColor: v,
36
+ backgroundColor: v,
37
+ tension: E,
38
+ pointRadius: D.pointRadius,
39
+ pointHoverRadius: D.pointHoverRadius,
40
+ pointHitRadius: D.pointHitRadius,
41
+ pointBackgroundColor: v,
42
+ pointBorderColor: v,
43
+ fill: !1,
44
+ order: 1
45
+ }]
46
+ },
47
+ options: {
48
+ responsive: !0,
49
+ maintainAspectRatio: !1,
50
+ interaction: t(h, O),
51
+ plugins: {
52
+ legend: { display: !1 },
53
+ tooltip: {
54
+ enabled: e(h),
55
+ backgroundColor: w,
56
+ titleColor: T,
57
+ bodyColor: T,
58
+ position: n,
59
+ filter: (e) => e.datasetIndex === C,
60
+ callbacks: { label: (e) => {
61
+ let t = e.parsed.y;
62
+ return t === null ? "" : `${t}${l}`;
63
+ } }
64
+ }
65
+ },
66
+ scales: {
67
+ x: {
68
+ type: "category",
69
+ border: { display: !1 },
70
+ grid: {
71
+ color: _,
72
+ drawTicks: !0
73
+ },
74
+ ticks: {
75
+ color: g,
76
+ font: {
77
+ family: "var(--s-ui-font-family-label)",
78
+ size: 10,
79
+ weight: 500
80
+ },
81
+ padding: 8
82
+ }
83
+ },
84
+ y: {
85
+ type: "linear",
86
+ min: u,
87
+ max: d,
88
+ border: { display: !1 },
89
+ grid: {
90
+ color: _,
91
+ drawTicks: !0
92
+ },
93
+ ticks: {
94
+ color: g,
95
+ stepSize: f,
96
+ callback: (e) => `${e}${l}`,
97
+ font: {
98
+ family: "var(--s-ui-font-family-label)",
99
+ size: 10,
100
+ weight: 500
101
+ },
102
+ padding: 8
103
+ }
104
+ }
105
+ }
106
+ }
107
+ };
108
+ }, T = (e) => {
109
+ let t = e.match(/^(\d{4})-(\d{2})-(\d{2})/);
110
+ return t ? `${t[3]}.${t[2]}.${t[1]}` : e;
111
+ }, E = (e) => Math.round(e * 10) / 10, D = ({ progressSnapshots: e, deadline: t = null, minValue: n = 0, maxValue: r = 100 }) => {
112
+ let i = e.map((e) => T(e.date)), a = e.map((e) => e.progress), o = t ? T(t) : null, s = a.length === 1 ? [
113
+ "",
114
+ i[0] ?? "",
115
+ ""
116
+ ] : o ? [...i, o] : i, c = a.length === 1 ? [
117
+ null,
118
+ a[0] ?? null,
119
+ null
120
+ ] : o ? [...a, null] : a, l = s.length;
121
+ return {
122
+ labels: s,
123
+ progressValues: c,
124
+ referenceValues: l === 0 ? [] : l === 1 ? [n] : Array.from({ length: l }, (e, t) => E(n + t * ((r - n) / (l - 1)))),
125
+ minValue: n,
126
+ maxValue: r,
127
+ stepSize: E((r - n) / 4),
128
+ progressSnapshotCount: e.length
129
+ };
130
+ }, O = [
131
+ {
132
+ date: "2025-11-01",
133
+ progress: 20
134
+ },
135
+ {
136
+ date: "2025-12-01",
137
+ progress: 35
138
+ },
139
+ {
140
+ date: "2026-01-01",
141
+ progress: 42
142
+ },
143
+ {
144
+ date: "2026-02-01",
145
+ progress: 58
146
+ },
147
+ {
148
+ date: "2026-03-01",
149
+ progress: 71
150
+ },
151
+ {
152
+ date: "2026-04-01",
153
+ progress: 84
154
+ }
155
+ ], k = { class: "s-ui-chart-progress__canvas-wrap" }, A = /* @__PURE__ */ d({
156
+ __name: "SChartProgress",
157
+ props: {
158
+ progressSnapshots: { default: () => [] },
159
+ deadline: { default: null },
160
+ minValue: {},
161
+ maxValue: {},
162
+ prefix: {},
163
+ seriesLabel: { default: "Progress" },
164
+ loading: {
165
+ type: Boolean,
166
+ default: !1
167
+ }
168
+ },
169
+ setup(e) {
170
+ let t = h("chartRootRef"), n = h("chartCanvasRef"), r = s(() => e.minValue ?? 0), o = s(() => e.maxValue ?? 100), d = s(() => e.prefix ?? "%"), _ = s(() => e.loading ? O : e.progressSnapshots), v = s(() => D({
171
+ progressSnapshots: _.value,
172
+ deadline: e.loading ? "2026-06-28" : e.deadline,
173
+ minValue: e.loading ? 0 : r.value,
174
+ maxValue: e.loading ? 100 : o.value
175
+ }));
176
+ return i({
177
+ canvasRef: n,
178
+ config: s(() => !e.loading && e.progressSnapshots.length === 0 ? null : w({
179
+ labels: v.value.labels,
180
+ progressValues: v.value.progressValues,
181
+ referenceValues: v.value.referenceValues,
182
+ seriesLabel: e.seriesLabel,
183
+ valuePrefix: d.value,
184
+ minValue: v.value.minValue,
185
+ maxValue: v.value.maxValue,
186
+ stepSize: e.loading ? 25 : v.value.stepSize,
187
+ progressSnapshotCount: v.value.progressSnapshotCount,
188
+ colorHostElement: t.value,
189
+ skeleton: e.loading
190
+ })),
191
+ enabled: s(() => e.loading || e.progressSnapshots.length > 0)
192
+ }), (r, i) => (p(), c("div", {
193
+ ref_key: "chartRootRef",
194
+ ref: t,
195
+ class: f(["s-ui-chart-progress", { "s-ui-chart-progress--skeleton": e.loading }])
196
+ }, [l("div", k, [u(m(a), { loading: e.loading }, {
197
+ default: g(() => [l("canvas", {
198
+ ref_key: "chartCanvasRef",
199
+ ref: n,
200
+ class: "s-ui-chart-progress__canvas"
201
+ }, null, 512)]),
202
+ _: 1
203
+ }, 8, ["loading"])])], 2));
204
+ }
205
+ });
206
+ //#endregion
207
+ export { A as t };
@@ -1,13 +1,13 @@
1
1
  import { computed as e, createBlock as t, defineComponent as n, onBeforeUnmount as r, onMounted as i, openBlock as a, renderSlot as o, shallowRef as s, toValue as c, unref as l, watch as u, withCtx as d } from "vue";
2
2
  import { ESSkeletonType as f, SSkeleton as p } from "@shtabapp/ui-kit-primitives";
3
3
  import { useResizeObserver as m } from "@vueuse/core";
4
- import { ArcElement as h, BarController as g, BarElement as _, CategoryScale as v, Chart as y, Filler as b, LineController as x, LineElement as S, LinearScale as C, PieController as w, PointElement as T, Tooltip as E } from "chart.js";
4
+ import { ArcElement as ee, BarController as h, BarElement as g, CategoryScale as _, Chart as v, Filler as y, LineController as b, LineElement as x, LinearScale as S, PieController as C, PointElement as w, Tooltip as T } from "chart.js";
5
5
  //#region src/utils/chart/css/readCssColor.ts
6
- var D = (e, t) => {
6
+ var E = (e, t) => {
7
7
  if (typeof window > "u") return "";
8
8
  let n = t ?? document.documentElement;
9
9
  return getComputedStyle(n).getPropertyValue(e).trim();
10
- }, O = {
10
+ }, D = {
11
11
  axisLabel: "--s-ui-chart-axis-label",
12
12
  grid: "--s-ui-chart-grid",
13
13
  crosshair: "--s-ui-chart-crosshair",
@@ -71,67 +71,69 @@ var D = (e, t) => {
71
71
  barHorizontalFillDefault: "--s-ui-chart-bar-horizontal-fill-default",
72
72
  barHorizontalSkeletonFill: "--s-ui-chart-bar-horizontal-skeleton-fill",
73
73
  barHorizontalCategoryLabel: "--s-ui-chart-bar-horizontal-category-label",
74
- barHorizontalCategoryLabelSkeleton: "--s-ui-chart-bar-horizontal-category-label-skeleton"
75
- }, k = [
76
- O.stackedPalette1,
77
- O.stackedPalette2,
78
- O.stackedPalette3,
79
- O.stackedPalette4,
80
- O.stackedPalette5,
81
- O.stackedPalette6
74
+ barHorizontalCategoryLabelSkeleton: "--s-ui-chart-bar-horizontal-category-label-skeleton",
75
+ progressLine: "--s-ui-chart-progress-line",
76
+ referenceFill: "--s-ui-chart-reference-fill"
77
+ }, O = [
78
+ D.stackedPalette1,
79
+ D.stackedPalette2,
80
+ D.stackedPalette3,
81
+ D.stackedPalette4,
82
+ D.stackedPalette5,
83
+ D.stackedPalette6
84
+ ], k = [
85
+ D.skeletonPalette1,
86
+ D.skeletonPalette2,
87
+ D.skeletonPalette3,
88
+ D.skeletonPalette4,
89
+ D.skeletonPalette5,
90
+ D.skeletonPalette6
82
91
  ], A = [
83
- O.skeletonPalette1,
84
- O.skeletonPalette2,
85
- O.skeletonPalette3,
86
- O.skeletonPalette4,
87
- O.skeletonPalette5,
88
- O.skeletonPalette6
92
+ D.barStackedPalette1,
93
+ D.barStackedPalette2,
94
+ D.barStackedPalette3,
95
+ D.barStackedPalette4,
96
+ D.barStackedPalette5,
97
+ D.barStackedPalette6
89
98
  ], j = [
90
- O.barStackedPalette1,
91
- O.barStackedPalette2,
92
- O.barStackedPalette3,
93
- O.barStackedPalette4,
94
- O.barStackedPalette5,
95
- O.barStackedPalette6
99
+ D.barSkeletonPalette1,
100
+ D.barSkeletonPalette2,
101
+ D.barSkeletonPalette3,
102
+ D.barSkeletonPalette4,
103
+ D.barSkeletonPalette5,
104
+ D.barSkeletonPalette6
96
105
  ], M = [
97
- O.barSkeletonPalette1,
98
- O.barSkeletonPalette2,
99
- O.barSkeletonPalette3,
100
- O.barSkeletonPalette4,
101
- O.barSkeletonPalette5,
102
- O.barSkeletonPalette6
106
+ D.piePalette1,
107
+ D.piePalette2,
108
+ D.piePalette3,
109
+ D.piePalette4,
110
+ D.piePalette5,
111
+ D.piePalette6,
112
+ D.piePalette7,
113
+ D.piePalette8
103
114
  ], N = [
104
- O.piePalette1,
105
- O.piePalette2,
106
- O.piePalette3,
107
- O.piePalette4,
108
- O.piePalette5,
109
- O.piePalette6,
110
- O.piePalette7,
111
- O.piePalette8
112
- ], P = [
113
- O.pieSkeletonPalette1,
114
- O.pieSkeletonPalette2,
115
- O.pieSkeletonPalette3,
116
- O.pieSkeletonPalette4,
117
- O.pieSkeletonPalette5,
118
- O.pieSkeletonPalette6,
119
- O.pieSkeletonPalette7,
120
- O.pieSkeletonPalette8
121
- ], ee = (e) => "captions" in e, F = (e, t) => {
115
+ D.pieSkeletonPalette1,
116
+ D.pieSkeletonPalette2,
117
+ D.pieSkeletonPalette3,
118
+ D.pieSkeletonPalette4,
119
+ D.pieSkeletonPalette5,
120
+ D.pieSkeletonPalette6,
121
+ D.pieSkeletonPalette7,
122
+ D.pieSkeletonPalette8
123
+ ], P = (e) => "captions" in e, te = (e, t) => {
122
124
  let n = e.data.datasets[0];
123
- if (!n || !ee(n)) return;
125
+ if (!n || !P(n)) return;
124
126
  let r = n.captions?.[t];
125
127
  if (r) return r;
126
- }, I = () => ({
128
+ }, F = () => ({
127
129
  title: (e) => {
128
130
  let t = e[0];
129
131
  if (!t) return "";
130
- let n = F(t.chart, t.dataIndex), r = [`${t.label}`];
132
+ let n = te(t.chart, t.dataIndex), r = [`${t.label}`];
131
133
  return n && r.push(n), r;
132
134
  },
133
135
  label: (e) => `${e.dataset.label ?? ""} – ${e.parsed.y ?? 0}`
134
- }), L = "stackedBarTop", R = function(e, t) {
136
+ }), I = "stackedBarTop", L = function(e, t) {
135
137
  if (e.length === 0) return {
136
138
  x: t.x,
137
139
  y: t.y
@@ -149,7 +151,22 @@ var D = (e, t) => {
149
151
  x: (r + i) / 2,
150
152
  y: n
151
153
  };
152
- }, z = ({ total: e } = {}) => ({
154
+ }, R = "progressChartPoint", z = 1, B = (e, t) => {
155
+ let n = e.data.datasets[z]?.data[t];
156
+ return typeof n == "number" ? n : null;
157
+ }, V = function(e) {
158
+ let t = e.find((e) => e.datasetIndex === z) ?? e[0];
159
+ if (!t) return !1;
160
+ let n = this.chart.scales.y;
161
+ if (!n) return !1;
162
+ let r = B(this.chart, t.index);
163
+ return r === null ? !1 : {
164
+ x: t.element.x,
165
+ y: n.getPixelForValue(r),
166
+ xAlign: "center",
167
+ yAlign: "bottom"
168
+ };
169
+ }, H = ({ total: e } = {}) => ({
153
170
  title: (e) => {
154
171
  let t = e[0];
155
172
  return t ? `${t.label}` : "";
@@ -159,7 +176,7 @@ var D = (e, t) => {
159
176
  let n = t.reduce((e, t) => e + (t.parsed.y ?? 0), 0);
160
177
  return e ? `${e} – ${n}` : `${n}`;
161
178
  }
162
- }), B = "stackedAreaTop", V = function(e, t) {
179
+ }), U = "stackedAreaTop", W = function(e, t) {
163
180
  let n = this.chart.chartArea;
164
181
  return !n || e.length === 0 ? {
165
182
  x: t.x,
@@ -168,16 +185,18 @@ var D = (e, t) => {
168
185
  x: t.x,
169
186
  y: n.top
170
187
  };
171
- }, H = !1, U = !1, W = !1, G = () => {
172
- U ||= (E.positioners.stackedAreaTop = V, !0);
173
- }, K = () => {
174
- W ||= (E.positioners.stackedBarTop = R, !0);
175
- }, q = () => {
176
- H ||= (y.register(x, S, T, g, _, w, h, C, v, E, b), G(), K(), !0);
177
- }, J = (e, t) => e ? {
188
+ }, G = !1, K = !1, q = !1, J = !1, Y = () => {
189
+ K ||= (T.positioners.stackedAreaTop = W, !0);
190
+ }, X = () => {
191
+ q ||= (T.positioners.stackedBarTop = L, !0);
192
+ }, Z = () => {
193
+ J ||= (T.positioners.progressChartPoint = V, !0);
194
+ }, Q = () => {
195
+ G ||= (v.register(b, x, w, h, g, C, ee, S, _, T, y), Y(), X(), Z(), !0);
196
+ }, ne = (e, t) => e ? {
178
197
  mode: "nearest",
179
198
  intersect: !1
180
- } : t, Y = (e) => !e, X = (e, t) => e ? [] : t, Z = ({ canvasRef: e, config: t, enabled: n }) => {
199
+ } : t, re = (e) => !e, ie = (e, t) => e ? [] : t, ae = ({ canvasRef: e, config: t, enabled: n }) => {
181
200
  let a = s(), o = () => {
182
201
  a.value &&= (a.value.destroy(), void 0);
183
202
  }, l = () => {
@@ -190,7 +209,7 @@ var D = (e, t) => {
190
209
  o();
191
210
  return;
192
211
  }
193
- q(), a.value &&= (a.value.destroy(), void 0), a.value = new y(r, i);
212
+ Q(), a.value &&= (a.value.destroy(), void 0), a.value = new v(r, i);
194
213
  };
195
214
  return i(() => {
196
215
  l();
@@ -205,19 +224,19 @@ var D = (e, t) => {
205
224
  }), r(() => {
206
225
  o();
207
226
  }), { chartInstance: a };
208
- }, Q = /* @__PURE__ */ function(e) {
227
+ }, $ = /* @__PURE__ */ function(e) {
209
228
  return e.CARTESIAN = "cartesian", e.PIE = "pie", e;
210
- }({}), $ = /* @__PURE__ */ n({
229
+ }({}), oe = /* @__PURE__ */ n({
211
230
  __name: "SChartSkeletonHost",
212
231
  props: {
213
232
  loading: {
214
233
  type: Boolean,
215
234
  default: !1
216
235
  },
217
- type: { default: () => Q.CARTESIAN }
236
+ type: { default: () => $.CARTESIAN }
218
237
  },
219
238
  setup(n) {
220
- let r = e(() => n.type === Q.PIE ? f.CHART_PIE : f.CHART_CARTESIAN);
239
+ let r = e(() => n.type === $.PIE ? f.CHART_PIE : f.CHART_CARTESIAN);
221
240
  return (e, i) => n.loading ? (a(), t(l(p), {
222
241
  key: 0,
223
242
  type: r.value,
@@ -229,4 +248,4 @@ var D = (e, t) => {
229
248
  }
230
249
  });
231
250
  //#endregion
232
- export { k as _, Y as a, z as c, M as d, j as f, A as g, N as h, J as i, L as l, P as m, Q as n, X as o, O as p, Z as r, B as s, $ as t, I as u, D as v };
251
+ export { k as _, re as a, H as c, F as d, j as f, M as g, N as h, ne as i, R as l, D as m, $ as n, ie as o, A as p, ae as r, U as s, oe as t, I as u, O as v, E as y };
@@ -0,0 +1 @@
1
+ let e=require("vue"),t=require("@shtabapp/ui-kit-primitives"),n=require("@vueuse/core"),r=require("chart.js");var i=(e,t)=>{if(typeof window>`u`)return``;let n=t??document.documentElement;return getComputedStyle(n).getPropertyValue(e).trim()},a={axisLabel:`--s-ui-chart-axis-label`,grid:`--s-ui-chart-grid`,crosshair:`--s-ui-chart-crosshair`,legendLabel:`--s-ui-chart-legend-label`,seriesPrimary:`--s-ui-chart-series-primary`,seriesFillStart:`--s-ui-chart-series-fill-start`,seriesFillEnd:`--s-ui-chart-series-fill-end`,seriesFillOpacity:`--s-ui-chart-series-fill-opacity`,skeletonSeries:`--s-ui-chart-skeleton-series`,skeletonPalette1:`--s-ui-chart-skeleton-palette-1`,skeletonPalette2:`--s-ui-chart-skeleton-palette-2`,skeletonPalette3:`--s-ui-chart-skeleton-palette-3`,skeletonPalette4:`--s-ui-chart-skeleton-palette-4`,skeletonPalette5:`--s-ui-chart-skeleton-palette-5`,skeletonPalette6:`--s-ui-chart-skeleton-palette-6`,skeletonFillStart:`--s-ui-chart-skeleton-fill-start`,skeletonFillEnd:`--s-ui-chart-skeleton-fill-end`,skeletonFillOpacity:`--s-ui-chart-skeleton-fill-opacity`,tooltipBackground:`--s-ui-chart-tooltip-background`,tooltipText:`--s-ui-chart-tooltip-text`,stackedPalette1:`--s-ui-chart-stacked-palette-1`,stackedPalette2:`--s-ui-chart-stacked-palette-2`,stackedPalette3:`--s-ui-chart-stacked-palette-3`,stackedPalette4:`--s-ui-chart-stacked-palette-4`,stackedPalette5:`--s-ui-chart-stacked-palette-5`,stackedPalette6:`--s-ui-chart-stacked-palette-6`,barStackedPalette1:`--s-ui-chart-bar-stacked-palette-1`,barStackedPalette2:`--s-ui-chart-bar-stacked-palette-2`,barStackedPalette3:`--s-ui-chart-bar-stacked-palette-3`,barStackedPalette4:`--s-ui-chart-bar-stacked-palette-4`,barStackedPalette5:`--s-ui-chart-bar-stacked-palette-5`,barStackedPalette6:`--s-ui-chart-bar-stacked-palette-6`,barHoverOutline:`--s-ui-chart-bar-hover-outline`,barSkeletonPalette1:`--s-ui-chart-bar-skeleton-palette-1`,barSkeletonPalette2:`--s-ui-chart-bar-skeleton-palette-2`,barSkeletonPalette3:`--s-ui-chart-bar-skeleton-palette-3`,barSkeletonPalette4:`--s-ui-chart-bar-skeleton-palette-4`,barSkeletonPalette5:`--s-ui-chart-bar-skeleton-palette-5`,barSkeletonPalette6:`--s-ui-chart-bar-skeleton-palette-6`,piePalette1:`--s-ui-chart-pie-palette-1`,piePalette2:`--s-ui-chart-pie-palette-2`,piePalette3:`--s-ui-chart-pie-palette-3`,piePalette4:`--s-ui-chart-pie-palette-4`,piePalette5:`--s-ui-chart-pie-palette-5`,piePalette6:`--s-ui-chart-pie-palette-6`,piePalette7:`--s-ui-chart-pie-palette-7`,piePalette8:`--s-ui-chart-pie-palette-8`,pieSegmentBorder:`--s-ui-chart-pie-segment-border`,pieBadgeBackground:`--s-ui-chart-pie-badge-background`,pieBadgeBorder:`--s-ui-chart-pie-badge-border`,pieBadgeText:`--s-ui-chart-pie-badge-text`,pieHoverShadow:`--s-ui-chart-pie-hover-shadow`,pieSkeletonPalette1:`--s-ui-chart-pie-skeleton-palette-1`,pieSkeletonPalette2:`--s-ui-chart-pie-skeleton-palette-2`,pieSkeletonPalette3:`--s-ui-chart-pie-skeleton-palette-3`,pieSkeletonPalette4:`--s-ui-chart-pie-skeleton-palette-4`,pieSkeletonPalette5:`--s-ui-chart-pie-skeleton-palette-5`,pieSkeletonPalette6:`--s-ui-chart-pie-skeleton-palette-6`,pieSkeletonPalette7:`--s-ui-chart-pie-skeleton-palette-7`,pieSkeletonPalette8:`--s-ui-chart-pie-skeleton-palette-8`,barHorizontalFillDefault:`--s-ui-chart-bar-horizontal-fill-default`,barHorizontalSkeletonFill:`--s-ui-chart-bar-horizontal-skeleton-fill`,barHorizontalCategoryLabel:`--s-ui-chart-bar-horizontal-category-label`,barHorizontalCategoryLabelSkeleton:`--s-ui-chart-bar-horizontal-category-label-skeleton`,progressLine:`--s-ui-chart-progress-line`,referenceFill:`--s-ui-chart-reference-fill`},o=[a.stackedPalette1,a.stackedPalette2,a.stackedPalette3,a.stackedPalette4,a.stackedPalette5,a.stackedPalette6],s=[a.skeletonPalette1,a.skeletonPalette2,a.skeletonPalette3,a.skeletonPalette4,a.skeletonPalette5,a.skeletonPalette6],c=[a.barStackedPalette1,a.barStackedPalette2,a.barStackedPalette3,a.barStackedPalette4,a.barStackedPalette5,a.barStackedPalette6],l=[a.barSkeletonPalette1,a.barSkeletonPalette2,a.barSkeletonPalette3,a.barSkeletonPalette4,a.barSkeletonPalette5,a.barSkeletonPalette6],u=[a.piePalette1,a.piePalette2,a.piePalette3,a.piePalette4,a.piePalette5,a.piePalette6,a.piePalette7,a.piePalette8],d=[a.pieSkeletonPalette1,a.pieSkeletonPalette2,a.pieSkeletonPalette3,a.pieSkeletonPalette4,a.pieSkeletonPalette5,a.pieSkeletonPalette6,a.pieSkeletonPalette7,a.pieSkeletonPalette8],f=e=>`captions`in e,p=(e,t)=>{let n=e.data.datasets[0];if(!n||!f(n))return;let r=n.captions?.[t];if(r)return r},m=()=>({title:e=>{let t=e[0];if(!t)return``;let n=p(t.chart,t.dataIndex),r=[`${t.label}`];return n&&r.push(n),r},label:e=>`${e.dataset.label??``} – ${e.parsed.y??0}`}),h=`stackedBarTop`,g=function(e,t){if(e.length===0)return{x:t.x,y:t.y};let n=1/0,r=1/0,i=-1/0;for(let t of e){let{x:e,y:a,width:o}=t.element.getProps([`x`,`y`,`width`]);n=Math.min(n,a),r=Math.min(r,e-o/2),i=Math.max(i,e+o/2)}return{x:(r+i)/2,y:n}},_=`progressChartPoint`,v=1,y=(e,t)=>{let n=e.data.datasets[v]?.data[t];return typeof n==`number`?n:null},b=function(e){let t=e.find(e=>e.datasetIndex===v)??e[0];if(!t)return!1;let n=this.chart.scales.y;if(!n)return!1;let r=y(this.chart,t.index);return r===null?!1:{x:t.element.x,y:n.getPixelForValue(r),xAlign:`center`,yAlign:`bottom`}},x=({total:e}={})=>({title:e=>{let t=e[0];return t?`${t.label}`:``},label:e=>`${e.dataset.label??``} – ${e.parsed.y??0}`,footer:t=>{let n=t.reduce((e,t)=>e+(t.parsed.y??0),0);return e?`${e} – ${n}`:`${n}`}}),S=`stackedAreaTop`,C=function(e,t){let n=this.chart.chartArea;return!n||e.length===0?{x:t.x,y:t.y}:{x:t.x,y:n.top}},w=!1,T=!1,E=!1,D=!1,O=()=>{T||=(r.Tooltip.positioners.stackedAreaTop=C,!0)},k=()=>{E||=(r.Tooltip.positioners.stackedBarTop=g,!0)},A=()=>{D||=(r.Tooltip.positioners.progressChartPoint=b,!0)},j=()=>{w||=(r.Chart.register(r.LineController,r.LineElement,r.PointElement,r.BarController,r.BarElement,r.PieController,r.ArcElement,r.LinearScale,r.CategoryScale,r.Tooltip,r.Filler),O(),k(),A(),!0)},M=(e,t)=>e?{mode:`nearest`,intersect:!1}:t,N=e=>!e,P=(e,t)=>e?[]:t,F=({canvasRef:t,config:i,enabled:a})=>{let o=(0,e.shallowRef)(),s=()=>{o.value&&=(o.value.destroy(),void 0)},c=()=>{if(!(0,e.toValue)(a)){s();return}let n=(0,e.toValue)(t),c=(0,e.toValue)(i);if(!n||!c){s();return}j(),o.value&&=(o.value.destroy(),void 0),o.value=new r.Chart(n,c)};return(0,e.onMounted)(()=>{c()}),(0,e.watch)(()=>[(0,e.toValue)(a),(0,e.toValue)(t),(0,e.toValue)(i)],()=>{c()},{deep:!0}),(0,n.useResizeObserver)(t,()=>{o.value?.resize()}),(0,e.onBeforeUnmount)(()=>{s()}),{chartInstance:o}},I=function(e){return e.CARTESIAN=`cartesian`,e.PIE=`pie`,e}({}),L=(0,e.defineComponent)({__name:`SChartSkeletonHost`,props:{loading:{type:Boolean,default:!1},type:{default:()=>I.CARTESIAN}},setup(n){let r=(0,e.computed)(()=>n.type===I.PIE?t.ESSkeletonType.CHART_PIE:t.ESSkeletonType.CHART_CARTESIAN);return(i,a)=>n.loading?((0,e.openBlock)(),(0,e.createBlock)((0,e.unref)(t.SSkeleton),{key:0,type:r.value,class:`s-ui-chart-skeleton-host`},{default:(0,e.withCtx)(()=>[(0,e.renderSlot)(i.$slots,`default`)]),_:3},8,[`type`])):(0,e.renderSlot)(i.$slots,`default`,{key:1})}});Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return i}});
@@ -1 +1 @@
1
- const e=require("./SChartSkeletonHost-CixHLD65.cjs"),t=require("./buildCartesianChartScales-Dck5yBMo.cjs"),n=require("./buildChartSeriesPoints-DXgWMMZH.cjs"),r=require("./SChartLegend-CLTLJeRH.cjs");let i=require("vue");var a=t=>({id:`sUiChartCrosshair`,afterDatasetsDraw(n){if((n.tooltip?.getActiveElements()??[]).length===0)return;let{ctx:r,chartArea:i}=n;if(!i||!n.tooltip)return;let a=e.v(e.p.crosshair,t),o=n.tooltip.caretX;r.save(),r.beginPath(),r.moveTo(o,i.top),r.lineTo(o,i.bottom),r.lineWidth=1,r.strokeStyle=a,r.stroke(),r.restore()}}),o=(t,n,i,a=!1)=>r.n(t,n,i,a,{palette:e._,paletteFallback:e.p.stackedPalette1,skeletonPalette:e.g,skeletonFallback:e.p.skeletonPalette1}),s=20,c=`stack0`,l=({seriesList:r,colorHostElement:i,yMax:l,yMin:u,yStep:d=s,skeleton:f=!1,totalLabel:p})=>{let m=n.r({seriesList:r,colorHostElement:i,yMax:l,yMin:u,yStep:d,skeleton:f});if(!m)return null;let{axisLabelColor:h,gridColor:g,tooltipBackgroundColor:_,tooltipTextColor:v,resolvedYMax:y,resolvedYMin:b,chartLabels:x}=m;return{type:`line`,data:{labels:x,datasets:r.map((e,t)=>({label:e.label,data:e.points.map(e=>e.value),borderColor:o(t,i,e.fillColor,f),backgroundColor:o(t,i,e.fillColor,f),borderWidth:0,fill:!0,pointRadius:0,pointHoverRadius:0,tension:0,stack:c}))},options:{responsive:!0,maintainAspectRatio:!1,interaction:e.i(f,{mode:`index`,intersect:!1}),plugins:{legend:{display:!1},tooltip:{enabled:e.a(f),backgroundColor:_,titleColor:v,bodyColor:v,footerColor:v,displayColors:!1,position:e.s,yAlign:`bottom`,xAlign:`center`,caretPadding:8,callbacks:e.c({total:p})}},scales:t.t({axisLabelColor:h,gridColor:g,yMin:b,yMax:y,yStep:d,stacked:!0})},plugins:e.o(f,[a(i)])}},u=[`24.02`,`28.02`,`04.03`,`08.03`,`12.03`,`16.03`,`20.03`,`24.03`,`28.03`,`01.04`,`05.04`,`09.04`,`13.04`,`17.04`],d=[18,22,26,30,34,38,42,44,46,48,49,50,51,52],f=[6,6,7,7,7,7,7,7,7,7,7,7,7,7],p=[10,11,12,12,11,10,10,10,10,10,10,10,10,10],m=[32,30,28,26,28,30,29,28,27,26,26,27,28,28],h=[`Готово`,`На ревью`,`В процессе`,`Бэклог`],g=[{label:h[0]??`Series 1`,points:n.t(u,d)},{label:h[1]??`Series 2`,points:n.t(u,f)},{label:h[2]??`Series 3`,points:n.t(u,p)},{label:h[3]??`Series 4`,points:n.t(u,m)}],_={class:`s-ui-chart-stacked-area__canvas-wrap`},v=(0,i.defineComponent)({__name:`SChartStackedArea`,props:{series:{default:()=>[]},loading:{type:Boolean,default:!1},yMax:{},yStep:{},totalLabel:{}},setup(t){let a=(0,i.useTemplateRef)(`chartRootRef`),s=(0,i.useTemplateRef)(`chartCanvasRef`),c=(0,i.computed)(()=>t.loading?g:t.series),u=(0,i.computed)(()=>!t.loading&&t.series.length===0?null:l({seriesList:c.value,colorHostElement:a.value,yMax:t.loading?160:t.yMax,yMin:t.loading?0:void 0,yStep:t.loading?20:t.yStep,skeleton:t.loading,totalLabel:t.totalLabel})),d=(0,i.computed)(()=>n.n(c.value,(e,n)=>o(e,a.value,n,t.loading)));return e.r({canvasRef:s,config:u,enabled:(0,i.computed)(()=>t.loading||t.series.length>0)}),(n,o)=>((0,i.openBlock)(),(0,i.createElementBlock)(`div`,{ref_key:`chartRootRef`,ref:a,class:(0,i.normalizeClass)([`s-ui-chart-stacked-area`,{"s-ui-chart-stacked-area--skeleton":t.loading}])},[(0,i.createElementVNode)(`div`,_,[(0,i.createVNode)((0,i.unref)(e.t),{loading:t.loading},{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`canvas`,{ref_key:`chartCanvasRef`,ref:s,class:`s-ui-chart-stacked-area__canvas`},null,512)]),_:1},8,[`loading`])]),d.value.length>0?((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(r.t),{key:0,items:d.value,disabled:t.loading},null,8,[`items`,`disabled`])):(0,i.createCommentVNode)(``,!0)],2))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return v}});
1
+ const e=require("./SChartSkeletonHost-YmLC5zOX.cjs"),t=require("./buildCartesianChartScales-Dck5yBMo.cjs"),n=require("./buildChartSeriesPoints-lASMQmBx.cjs"),r=require("./SChartLegend-BFwzIA4x.cjs");let i=require("vue");var a=t=>({id:`sUiChartCrosshair`,afterDatasetsDraw(n){if((n.tooltip?.getActiveElements()??[]).length===0)return;let{ctx:r,chartArea:i}=n;if(!i||!n.tooltip)return;let a=e.y(e.m.crosshair,t),o=n.tooltip.caretX;r.save(),r.beginPath(),r.moveTo(o,i.top),r.lineTo(o,i.bottom),r.lineWidth=1,r.strokeStyle=a,r.stroke(),r.restore()}}),o=(t,n,i,a=!1)=>r.n(t,n,i,a,{palette:e.v,paletteFallback:e.m.stackedPalette1,skeletonPalette:e._,skeletonFallback:e.m.skeletonPalette1}),s=20,c=`stack0`,l=({seriesList:r,colorHostElement:i,yMax:l,yMin:u,yStep:d=s,skeleton:f=!1,totalLabel:p})=>{let m=n.r({seriesList:r,colorHostElement:i,yMax:l,yMin:u,yStep:d,skeleton:f});if(!m)return null;let{axisLabelColor:h,gridColor:g,tooltipBackgroundColor:_,tooltipTextColor:v,resolvedYMax:y,resolvedYMin:b,chartLabels:x}=m;return{type:`line`,data:{labels:x,datasets:r.map((e,t)=>({label:e.label,data:e.points.map(e=>e.value),borderColor:o(t,i,e.fillColor,f),backgroundColor:o(t,i,e.fillColor,f),borderWidth:0,fill:!0,pointRadius:0,pointHoverRadius:0,tension:0,stack:c}))},options:{responsive:!0,maintainAspectRatio:!1,interaction:e.i(f,{mode:`index`,intersect:!1}),plugins:{legend:{display:!1},tooltip:{enabled:e.a(f),backgroundColor:_,titleColor:v,bodyColor:v,footerColor:v,displayColors:!1,position:e.s,yAlign:`bottom`,xAlign:`center`,caretPadding:8,callbacks:e.c({total:p})}},scales:t.t({axisLabelColor:h,gridColor:g,yMin:b,yMax:y,yStep:d,stacked:!0})},plugins:e.o(f,[a(i)])}},u=[`24.02`,`28.02`,`04.03`,`08.03`,`12.03`,`16.03`,`20.03`,`24.03`,`28.03`,`01.04`,`05.04`,`09.04`,`13.04`,`17.04`],d=[18,22,26,30,34,38,42,44,46,48,49,50,51,52],f=[6,6,7,7,7,7,7,7,7,7,7,7,7,7],p=[10,11,12,12,11,10,10,10,10,10,10,10,10,10],m=[32,30,28,26,28,30,29,28,27,26,26,27,28,28],h=[`Готово`,`На ревью`,`В процессе`,`Бэклог`],g=[{label:h[0]??`Series 1`,points:n.t(u,d)},{label:h[1]??`Series 2`,points:n.t(u,f)},{label:h[2]??`Series 3`,points:n.t(u,p)},{label:h[3]??`Series 4`,points:n.t(u,m)}],_={class:`s-ui-chart-stacked-area__canvas-wrap`},v=(0,i.defineComponent)({__name:`SChartStackedArea`,props:{series:{default:()=>[]},loading:{type:Boolean,default:!1},yMax:{},yStep:{},totalLabel:{}},setup(t){let a=(0,i.useTemplateRef)(`chartRootRef`),s=(0,i.useTemplateRef)(`chartCanvasRef`),c=(0,i.computed)(()=>t.loading?g:t.series),u=(0,i.computed)(()=>!t.loading&&t.series.length===0?null:l({seriesList:c.value,colorHostElement:a.value,yMax:t.loading?160:t.yMax,yMin:t.loading?0:void 0,yStep:t.loading?20:t.yStep,skeleton:t.loading,totalLabel:t.totalLabel})),d=(0,i.computed)(()=>n.n(c.value,(e,n)=>o(e,a.value,n,t.loading)));return e.r({canvasRef:s,config:u,enabled:(0,i.computed)(()=>t.loading||t.series.length>0)}),(n,o)=>((0,i.openBlock)(),(0,i.createElementBlock)(`div`,{ref_key:`chartRootRef`,ref:a,class:(0,i.normalizeClass)([`s-ui-chart-stacked-area`,{"s-ui-chart-stacked-area--skeleton":t.loading}])},[(0,i.createElementVNode)(`div`,_,[(0,i.createVNode)((0,i.unref)(e.t),{loading:t.loading},{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`canvas`,{ref_key:`chartCanvasRef`,ref:s,class:`s-ui-chart-stacked-area__canvas`},null,512)]),_:1},8,[`loading`])]),d.value.length>0?((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(r.t),{key:0,items:d.value,disabled:t.loading},null,8,[`items`,`disabled`])):(0,i.createCommentVNode)(``,!0)],2))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return v}});
@@ -1,7 +1,7 @@
1
- import { _ as e, a as t, c as n, g as r, i, o as a, p as o, r as s, s as c, t as l, v as u } from "./SChartSkeletonHost-BnYGg6WN.js";
1
+ import { _ as e, a as t, c as n, i as r, m as i, o as a, r as o, s, t as c, v as l, y as u } from "./SChartSkeletonHost-CnfMevXX.js";
2
2
  import { t as d } from "./buildCartesianChartScales-EofFq3ry.js";
3
- import { n as f, r as p, t as m } from "./buildChartSeriesPoints-Cj8ooXn5.js";
4
- import { n as h, t as g } from "./SChartLegend-CcbzWNuw.js";
3
+ import { n as f, r as p, t as m } from "./buildChartSeriesPoints-D-j16fMh.js";
4
+ import { n as h, t as g } from "./SChartLegend-DW16AfUz.js";
5
5
  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";
6
6
  //#region src/utils/chart/stacked/createChartCrosshairPlugin.ts
7
7
  var k = (e) => ({
@@ -10,20 +10,20 @@ var k = (e) => ({
10
10
  if ((t.tooltip?.getActiveElements() ?? []).length === 0) return;
11
11
  let { ctx: n, chartArea: r } = t;
12
12
  if (!r || !t.tooltip) return;
13
- let i = u(o.crosshair, e), a = t.tooltip.caretX;
14
- n.save(), n.beginPath(), n.moveTo(a, r.top), n.lineTo(a, r.bottom), n.lineWidth = 1, n.strokeStyle = i, n.stroke(), n.restore();
13
+ let a = u(i.crosshair, e), o = t.tooltip.caretX;
14
+ n.save(), n.beginPath(), n.moveTo(o, r.top), n.lineTo(o, r.bottom), n.lineWidth = 1, n.strokeStyle = a, n.stroke(), n.restore();
15
15
  }
16
- }), A = (t, n, i, a = !1) => h(t, n, i, a, {
17
- palette: e,
18
- paletteFallback: o.stackedPalette1,
19
- skeletonPalette: r,
20
- skeletonFallback: o.skeletonPalette1
21
- }), j = 20, M = "stack0", N = ({ seriesList: e, colorHostElement: r, yMax: o, yMin: s, yStep: l = j, skeleton: u = !1, totalLabel: f }) => {
16
+ }), A = (t, n, r, a = !1) => h(t, n, r, a, {
17
+ palette: l,
18
+ paletteFallback: i.stackedPalette1,
19
+ skeletonPalette: e,
20
+ skeletonFallback: i.skeletonPalette1
21
+ }), j = 20, M = "stack0", N = ({ seriesList: e, colorHostElement: i, yMax: o, yMin: c, yStep: l = j, skeleton: u = !1, totalLabel: f }) => {
22
22
  let m = p({
23
23
  seriesList: e,
24
- colorHostElement: r,
24
+ colorHostElement: i,
25
25
  yMax: o,
26
- yMin: s,
26
+ yMin: c,
27
27
  yStep: l,
28
28
  skeleton: u
29
29
  });
@@ -36,8 +36,8 @@ var k = (e) => ({
36
36
  datasets: e.map((e, t) => ({
37
37
  label: e.label,
38
38
  data: e.points.map((e) => e.value),
39
- borderColor: A(t, r, e.fillColor, u),
40
- backgroundColor: A(t, r, e.fillColor, u),
39
+ borderColor: A(t, i, e.fillColor, u),
40
+ backgroundColor: A(t, i, e.fillColor, u),
41
41
  borderWidth: 0,
42
42
  fill: !0,
43
43
  pointRadius: 0,
@@ -49,7 +49,7 @@ var k = (e) => ({
49
49
  options: {
50
50
  responsive: !0,
51
51
  maintainAspectRatio: !1,
52
- interaction: i(u, {
52
+ interaction: r(u, {
53
53
  mode: "index",
54
54
  intersect: !1
55
55
  }),
@@ -62,7 +62,7 @@ var k = (e) => ({
62
62
  bodyColor: v,
63
63
  footerColor: v,
64
64
  displayColors: !1,
65
- position: c,
65
+ position: s,
66
66
  yAlign: "bottom",
67
67
  xAlign: "center",
68
68
  caretPadding: 8,
@@ -78,7 +78,7 @@ var k = (e) => ({
78
78
  stacked: !0
79
79
  })
80
80
  },
81
- plugins: a(u, [k(r)])
81
+ plugins: a(u, [k(i)])
82
82
  };
83
83
  }, P = [
84
84
  "24.02",
@@ -199,7 +199,7 @@ var k = (e) => ({
199
199
  skeleton: e.loading,
200
200
  totalLabel: e.totalLabel
201
201
  })), a = _(() => f(r.value, (n, r) => A(n, t.value, r, e.loading)));
202
- return s({
202
+ return o({
203
203
  canvasRef: n,
204
204
  config: i,
205
205
  enabled: _(() => e.loading || e.series.length > 0)
@@ -207,7 +207,7 @@ var k = (e) => ({
207
207
  ref_key: "chartRootRef",
208
208
  ref: t,
209
209
  class: w(["s-ui-chart-stacked-area", { "s-ui-chart-stacked-area--skeleton": e.loading }])
210
- }, [x("div", V, [S(E(l), { loading: e.loading }, {
210
+ }, [x("div", V, [S(E(c), { loading: e.loading }, {
211
211
  default: O(() => [x("canvas", {
212
212
  ref_key: "chartCanvasRef",
213
213
  ref: n,
@@ -1 +1 @@
1
- const e=require("./SChartSkeletonHost-CixHLD65.cjs"),t=require("./buildCartesianChartScales-Dck5yBMo.cjs"),n=require("./buildChartSeriesPoints-DXgWMMZH.cjs"),r=require("./SChartLegend-CLTLJeRH.cjs");let i=require("vue");var a=(t,n,i,a=!1)=>r.n(t,n,i,a,{palette:e.f,paletteFallback:e.p.barStackedPalette1,skeletonPalette:e.d,skeletonFallback:e.p.barSkeletonPalette1}),o=3,s=4,c=(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()},l=t=>({id:`stackedBarHoverOutline`,afterDatasetsDraw(n){let r=n.tooltip?.getActiveElements()??[];if(r.length===0)return;let i=1/0,a=1/0,l=-1/0,u=-1/0;for(let e of r){let{x:t,y:n,width:r,base:o}=e.element.getProps([`x`,`y`,`width`,`base`]),s=t-r/2,c=t+r/2,d=n,f=o;i=Math.min(i,s),l=Math.max(l,c),a=Math.min(a,d),u=Math.max(u,f)}let d=e.v(e.p.barHoverOutline,t),{ctx:f,chartArea:p}=n,m=o/2,h=p?.bottom??u,g=Math.min(u,h),_=i+m,v=a+m,y=l-i-o,b=g-a-o;if(y<=0||b<=0)return;let x=Math.max(0,s-m);f.save(),f.strokeStyle=d,f.lineWidth=o,c(f,_,v,y,b,x),f.restore()}}),u=5,d=`stack0`,f=36,p=4,m=12,h=({seriesList:r,colorHostElement:i,yMax:o,yMin:s,yStep:c=u,skeleton:h=!1})=>{let g=n.r({seriesList:r,colorHostElement:i,yMax:o,yMin:s,yStep:c,skeleton:h});if(!g)return null;let{axisLabelColor:_,gridColor:v,tooltipBackgroundColor:y,tooltipTextColor:b,resolvedYMax:x,resolvedYMin:S,chartLabels:C,pointCaptions:w,topSeriesIndex:T}=g;return{type:`bar`,data:{labels:C,datasets:r.map((e,t)=>{let n=a(t,i,e.fillColor,h);return{label:e.label,data:e.points.map(e=>e.value),backgroundColor:n,hoverBackgroundColor:n,borderWidth:0,hoverBorderWidth:0,stack:d,barThickness:f,borderRadius:t===T?{topLeft:p,topRight:p}:0,...t===0?{captions:w}:{}}})},options:{responsive:!0,maintainAspectRatio:!1,interaction:e.i(h,{mode:`index`,intersect:!1}),plugins:{legend:{display:!1},tooltip:{enabled:e.a(h),backgroundColor:y,titleColor:b,bodyColor:b,displayColors:!1,position:e.l,yAlign:`bottom`,xAlign:`center`,caretPadding:8,callbacks:e.u()}},scales:t.t({axisLabelColor:_,gridColor:v,yMin:S,yMax:x,yStep:c,stacked:!0,xTickFontSize:m})},plugins:e.o(h,[l(i)])}},g=[`5 неделя`,`6 неделя`,`7 неделя`,`8 неделя`,`9 неделя`,`10 неделя`,`11 неделя`,`12 неделя`,`13 неделя`,`14 неделя`,`15 неделя`,`16 неделя`],_=[12,14,15,16,18,17,16,15,14,13,12,11],v=[6,7,8,8,9,8,7,7,6,6,5,5],y=[4,5,5,6,6,5,5,4,4,3,3,3],b=[`Series 1`,`Series 2`,`Series 3`],x=[{label:b[0]??`Series 1`,points:n.t(g,_)},{label:b[1]??`Series 2`,points:n.t(g,v)},{label:b[2]??`Series 3`,points:n.t(g,y)}],S={class:`s-ui-chart-stacked-bar__canvas-wrap`},C=(0,i.defineComponent)({__name:`SChartStackedBar`,props:{series:{default:()=>[]},loading:{type:Boolean,default:!1},yMax:{},yStep:{}},setup(t){let o=(0,i.useTemplateRef)(`chartRootRef`),s=(0,i.useTemplateRef)(`chartCanvasRef`),c=(0,i.computed)(()=>t.loading?x:t.series),l=(0,i.computed)(()=>!t.loading&&t.series.length===0?null:h({seriesList:c.value,colorHostElement:o.value,yMax:t.loading?50:t.yMax,yMin:t.loading?0:void 0,yStep:t.loading?5:t.yStep,skeleton:t.loading})),u=(0,i.computed)(()=>n.n(c.value,(e,n)=>a(e,o.value,n,t.loading)));return e.r({canvasRef:s,config:l,enabled:(0,i.computed)(()=>t.loading||t.series.length>0)}),(n,a)=>((0,i.openBlock)(),(0,i.createElementBlock)(`div`,{ref_key:`chartRootRef`,ref:o,class:(0,i.normalizeClass)([`s-ui-chart-stacked-bar`,{"s-ui-chart-stacked-bar--skeleton":t.loading}])},[(0,i.createElementVNode)(`div`,S,[(0,i.createVNode)((0,i.unref)(e.t),{loading:t.loading},{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`canvas`,{ref_key:`chartCanvasRef`,ref:s,class:`s-ui-chart-stacked-bar__canvas`},null,512)]),_:1},8,[`loading`])]),u.value.length>0?((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(r.t),{key:0,items:u.value,disabled:t.loading},null,8,[`items`,`disabled`])):(0,i.createCommentVNode)(``,!0)],2))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return C}});
1
+ const e=require("./SChartSkeletonHost-YmLC5zOX.cjs"),t=require("./buildCartesianChartScales-Dck5yBMo.cjs"),n=require("./buildChartSeriesPoints-lASMQmBx.cjs"),r=require("./SChartLegend-BFwzIA4x.cjs");let i=require("vue");var a=(t,n,i,a=!1)=>r.n(t,n,i,a,{palette:e.p,paletteFallback:e.m.barStackedPalette1,skeletonPalette:e.f,skeletonFallback:e.m.barSkeletonPalette1}),o=3,s=4,c=(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()},l=t=>({id:`stackedBarHoverOutline`,afterDatasetsDraw(n){let r=n.tooltip?.getActiveElements()??[];if(r.length===0)return;let i=1/0,a=1/0,l=-1/0,u=-1/0;for(let e of r){let{x:t,y:n,width:r,base:o}=e.element.getProps([`x`,`y`,`width`,`base`]),s=t-r/2,c=t+r/2,d=n,f=o;i=Math.min(i,s),l=Math.max(l,c),a=Math.min(a,d),u=Math.max(u,f)}let d=e.y(e.m.barHoverOutline,t),{ctx:f,chartArea:p}=n,m=o/2,h=p?.bottom??u,g=Math.min(u,h),_=i+m,v=a+m,y=l-i-o,b=g-a-o;if(y<=0||b<=0)return;let x=Math.max(0,s-m);f.save(),f.strokeStyle=d,f.lineWidth=o,c(f,_,v,y,b,x),f.restore()}}),u=5,d=`stack0`,f=36,p=4,m=12,h=({seriesList:r,colorHostElement:i,yMax:o,yMin:s,yStep:c=u,skeleton:h=!1})=>{let g=n.r({seriesList:r,colorHostElement:i,yMax:o,yMin:s,yStep:c,skeleton:h});if(!g)return null;let{axisLabelColor:_,gridColor:v,tooltipBackgroundColor:y,tooltipTextColor:b,resolvedYMax:x,resolvedYMin:S,chartLabels:C,pointCaptions:w,topSeriesIndex:T}=g;return{type:`bar`,data:{labels:C,datasets:r.map((e,t)=>{let n=a(t,i,e.fillColor,h);return{label:e.label,data:e.points.map(e=>e.value),backgroundColor:n,hoverBackgroundColor:n,borderWidth:0,hoverBorderWidth:0,stack:d,barThickness:f,borderRadius:t===T?{topLeft:p,topRight:p}:0,...t===0?{captions:w}:{}}})},options:{responsive:!0,maintainAspectRatio:!1,interaction:e.i(h,{mode:`index`,intersect:!1}),plugins:{legend:{display:!1},tooltip:{enabled:e.a(h),backgroundColor:y,titleColor:b,bodyColor:b,displayColors:!1,position:e.u,yAlign:`bottom`,xAlign:`center`,caretPadding:8,callbacks:e.d()}},scales:t.t({axisLabelColor:_,gridColor:v,yMin:S,yMax:x,yStep:c,stacked:!0,xTickFontSize:m})},plugins:e.o(h,[l(i)])}},g=[`5 неделя`,`6 неделя`,`7 неделя`,`8 неделя`,`9 неделя`,`10 неделя`,`11 неделя`,`12 неделя`,`13 неделя`,`14 неделя`,`15 неделя`,`16 неделя`],_=[12,14,15,16,18,17,16,15,14,13,12,11],v=[6,7,8,8,9,8,7,7,6,6,5,5],y=[4,5,5,6,6,5,5,4,4,3,3,3],b=[`Series 1`,`Series 2`,`Series 3`],x=[{label:b[0]??`Series 1`,points:n.t(g,_)},{label:b[1]??`Series 2`,points:n.t(g,v)},{label:b[2]??`Series 3`,points:n.t(g,y)}],S={class:`s-ui-chart-stacked-bar__canvas-wrap`},C=(0,i.defineComponent)({__name:`SChartStackedBar`,props:{series:{default:()=>[]},loading:{type:Boolean,default:!1},yMax:{},yStep:{}},setup(t){let o=(0,i.useTemplateRef)(`chartRootRef`),s=(0,i.useTemplateRef)(`chartCanvasRef`),c=(0,i.computed)(()=>t.loading?x:t.series),l=(0,i.computed)(()=>!t.loading&&t.series.length===0?null:h({seriesList:c.value,colorHostElement:o.value,yMax:t.loading?50:t.yMax,yMin:t.loading?0:void 0,yStep:t.loading?5:t.yStep,skeleton:t.loading})),u=(0,i.computed)(()=>n.n(c.value,(e,n)=>a(e,o.value,n,t.loading)));return e.r({canvasRef:s,config:l,enabled:(0,i.computed)(()=>t.loading||t.series.length>0)}),(n,a)=>((0,i.openBlock)(),(0,i.createElementBlock)(`div`,{ref_key:`chartRootRef`,ref:o,class:(0,i.normalizeClass)([`s-ui-chart-stacked-bar`,{"s-ui-chart-stacked-bar--skeleton":t.loading}])},[(0,i.createElementVNode)(`div`,S,[(0,i.createVNode)((0,i.unref)(e.t),{loading:t.loading},{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`canvas`,{ref_key:`chartCanvasRef`,ref:s,class:`s-ui-chart-stacked-bar__canvas`},null,512)]),_:1},8,[`loading`])]),u.value.length>0?((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(r.t),{key:0,items:u.value,disabled:t.loading},null,8,[`items`,`disabled`])):(0,i.createCommentVNode)(``,!0)],2))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return C}});