@shtabapp/ui-kit 1.73.0 → 1.75.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.
- package/CHANGELOG.md +14 -0
- package/dist/SChartBar-BvytQ-2z.js +293 -0
- package/dist/SChartBar-BzCeNCsi.cjs +1 -0
- package/dist/SChartBurnup-BeQWgnGT.js +261 -0
- package/dist/SChartBurnup-joKIDLFb.cjs +1 -0
- package/dist/SChartHorizontalBar-C40Yroue.js +176 -0
- package/dist/SChartHorizontalBar-Dwln3uuE.cjs +1 -0
- package/dist/SChartLegend-D1gPKGm0.cjs +1 -0
- package/dist/SChartLegend-dDqLhvIj.js +88 -0
- package/dist/{SChartLine-v0tkmnN6.js → SChartLine-BV8Ytso5.js} +36 -36
- package/dist/{SChartLine-3l507dBg.cjs → SChartLine-DeJjaBmo.cjs} +1 -1
- package/dist/SChartMultiLine-7_HcvVEQ.js +279 -0
- package/dist/SChartMultiLine-Cl9Pf3Wp.cjs +1 -0
- package/dist/SChartPie-BiLoxutQ.js +267 -0
- package/dist/SChartPie-DccW5J0b.cjs +1 -0
- package/dist/{SChartProgress-9Zzy7E8K.cjs → SChartProgress-Cpdkad6Q.cjs} +1 -1
- package/dist/{SChartProgress-DUgSOdv7.js → SChartProgress-DSxJqRA0.js} +27 -27
- package/dist/{SChartStackedArea-Blpqa23h.js → SChartStackedArea-B28offwE.js} +44 -44
- package/dist/{SChartStackedArea-C3MezV9k.cjs → SChartStackedArea-Ce7xyhp1.cjs} +1 -1
- package/dist/{SChartStackedBar-CCxEXw1H.js → SChartStackedBar-C77FlKGS.js} +55 -55
- package/dist/{SChartStackedBar-CJ-UdOfv.cjs → SChartStackedBar-CqUDrFJ3.cjs} +1 -1
- package/dist/STable-BXVhLjSQ.cjs +1 -0
- package/dist/{STable-DpH_h2-n.js → STable-G2k-tI4g.js} +168 -144
- package/dist/applyChartHighlightedYTick-BHVwiljn.cjs +1 -0
- package/dist/applyChartHighlightedYTick-DmsstRVM.js +17 -0
- package/dist/buildMultiLineChartScales-Di-yTvEB.js +41 -0
- package/dist/buildMultiLineChartScales-lVP6h9H4.cjs +1 -0
- package/dist/components/SChartBar/SChartBar.types.d.ts +33 -4
- 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/index.d.ts +1 -1
- package/dist/components/SChartBar/index.d.ts.map +1 -1
- package/dist/components/SChartBar/utils/buildBarChartConfig.d.ts +8 -2
- package/dist/components/SChartBar/utils/buildBarChartConfig.d.ts.map +1 -1
- package/dist/components/SChartBar/utils/createBarTargetLinePlugin.d.ts.map +1 -1
- package/dist/components/SChartBar/utils/createBarValueLabelPlugin.d.ts +7 -0
- package/dist/components/SChartBar/utils/createBarValueLabelPlugin.d.ts.map +1 -0
- package/dist/components/SChartBar/utils/demoBarSeries.d.ts +7 -1
- package/dist/components/SChartBar/utils/demoBarSeries.d.ts.map +1 -1
- package/dist/components/SChartBurnup/SChartBurnup.types.d.ts +8 -1
- package/dist/components/SChartBurnup/SChartBurnup.types.d.ts.map +1 -1
- package/dist/components/SChartBurnup/utils/buildBurnupChartConfig.d.ts.map +1 -1
- package/dist/components/SChartBurnup/utils/demoBurnupPoints.d.ts +1 -0
- package/dist/components/SChartBurnup/utils/demoBurnupPoints.d.ts.map +1 -1
- package/dist/components/SChartLegend/SChartLegend.types.d.ts +17 -0
- package/dist/components/SChartLegend/SChartLegend.types.d.ts.map +1 -1
- package/dist/components/SChartLegend/SChartLegend.vue.d.ts +3 -1
- package/dist/components/SChartLegend/SChartLegend.vue.d.ts.map +1 -1
- package/dist/components/SChartLegend/index.d.ts +1 -0
- package/dist/components/SChartLegend/index.d.ts.map +1 -1
- package/dist/components/SChartMultiLine/SChartMultiLine.types.d.ts +14 -2
- package/dist/components/SChartMultiLine/SChartMultiLine.types.d.ts.map +1 -1
- package/dist/components/SChartMultiLine/SChartMultiLine.vue.d.ts +3 -1
- package/dist/components/SChartMultiLine/SChartMultiLine.vue.d.ts.map +1 -1
- package/dist/components/SChartMultiLine/index.d.ts +1 -1
- package/dist/components/SChartMultiLine/index.d.ts.map +1 -1
- package/dist/components/SChartMultiLine/utils/buildMultiLineChartConfig.d.ts +9 -2
- package/dist/components/SChartMultiLine/utils/buildMultiLineChartConfig.d.ts.map +1 -1
- package/dist/components/SChartMultiLine/utils/demoMultiLineSeries.d.ts +4 -1
- package/dist/components/SChartMultiLine/utils/demoMultiLineSeries.d.ts.map +1 -1
- package/dist/components/SChartPie/SChartPie.types.d.ts +27 -1
- package/dist/components/SChartPie/SChartPie.types.d.ts.map +1 -1
- package/dist/components/SChartPie/SChartPie.vue.d.ts +16 -2
- package/dist/components/SChartPie/SChartPie.vue.d.ts.map +1 -1
- package/dist/components/SChartPie/index.d.ts +2 -1
- package/dist/components/SChartPie/index.d.ts.map +1 -1
- package/dist/components/SChartPie/utils/buildPieChartConfig.d.ts +3 -1
- package/dist/components/SChartPie/utils/buildPieChartConfig.d.ts.map +1 -1
- package/dist/components/SChartPie/utils/demoPieSlices.d.ts +1 -0
- package/dist/components/SChartPie/utils/demoPieSlices.d.ts.map +1 -1
- package/dist/components/SChartSegmentedBar/SChartSegmentedBar.types.d.ts +9 -0
- package/dist/components/SChartSegmentedBar/SChartSegmentedBar.types.d.ts.map +1 -1
- package/dist/components/SChartSegmentedBar/SChartSegmentedBar.vue.d.ts +14 -2
- package/dist/components/SChartSegmentedBar/SChartSegmentedBar.vue.d.ts.map +1 -1
- package/dist/components/SChartSegmentedBar/utils/buildSegmentedBarChartConfig.d.ts +4 -1
- package/dist/components/SChartSegmentedBar/utils/buildSegmentedBarChartConfig.d.ts.map +1 -1
- package/dist/components/SChartSegmentedBar/utils/createSegmentedBarBadgePlugin.d.ts.map +1 -1
- package/dist/components/SList/utils/resolveListItemFields.d.ts +1 -1
- package/dist/components/SList/utils/resolveListItemFields.d.ts.map +1 -1
- package/dist/components/SRoadmap/SRoadmap.types.d.ts +47 -0
- package/dist/components/SRoadmap/SRoadmap.types.d.ts.map +1 -0
- package/dist/components/SRoadmap/SRoadmap.vue.d.ts +21 -0
- package/dist/components/SRoadmap/SRoadmap.vue.d.ts.map +1 -0
- package/dist/components/SRoadmap/index.d.ts +4 -0
- package/dist/components/SRoadmap/index.d.ts.map +1 -0
- package/dist/components/SRoadmap/utils/buildRoadmapRows.d.ts +19 -0
- package/dist/components/SRoadmap/utils/buildRoadmapRows.d.ts.map +1 -0
- package/dist/components/SRoadmap/utils/demoRoadmapItems.d.ts +5 -0
- package/dist/components/SRoadmap/utils/demoRoadmapItems.d.ts.map +1 -0
- package/dist/components/SRoadmap/utils/roadmapDate.d.ts +16 -0
- package/dist/components/SRoadmap/utils/roadmapDate.d.ts.map +1 -0
- package/dist/components/STable/STable.types.d.ts +8 -0
- package/dist/components/STable/STable.types.d.ts.map +1 -1
- package/dist/components/STable/STable.vue.d.ts +3 -0
- package/dist/components/STable/STable.vue.d.ts.map +1 -1
- package/dist/components/STable/parts/STableGroupRow.vue.d.ts +3 -0
- package/dist/components/STable/parts/STableGroupRow.vue.d.ts.map +1 -1
- package/dist/components/STable/parts/STableHeaderCell.vue.d.ts +2 -0
- package/dist/components/STable/parts/STableHeaderCell.vue.d.ts.map +1 -1
- package/dist/components/STable/utils/useTableRowDnd.d.ts +2 -1
- package/dist/components/STable/utils/useTableRowDnd.d.ts.map +1 -1
- package/dist/components/STable/utils/useTableRowHydration.d.ts +3 -1
- package/dist/components/STable/utils/useTableRowHydration.d.ts.map +1 -1
- package/dist/composables/useChartInteractivity.d.ts +2 -1
- package/dist/composables/useChartInteractivity.d.ts.map +1 -1
- package/dist/{createChartCrosshairPlugin-B4e8d8OF.cjs → createChartCrosshairPlugin-BTPv09h4.cjs} +1 -1
- package/dist/{createChartCrosshairPlugin-C2NUAO5s.js → createChartCrosshairPlugin-EqMlaexu.js} +2 -2
- package/dist/createChartMarkersPlugin-BKxLg4pL.cjs +1 -0
- package/dist/{createChartMarkersPlugin-DkXituwE.js → createChartMarkersPlugin-DPvfZp_e.js} +11 -11
- 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.d.ts +2 -2
- package/dist/entries/chart-pie.d.ts.map +1 -1
- package/dist/entries/chart-pie.js +2 -2
- package/dist/entries/chart-progress.cjs +1 -1
- package/dist/entries/chart-progress.js +1 -1
- 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.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 +7 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +569 -303
- package/dist/resolveBarStackedSeriesColor-CjwUxrUx.js +11 -0
- package/dist/resolveBarStackedSeriesColor-Czkj5bJY.cjs +1 -0
- package/dist/resolveCssColorValue-BFMo08-w.cjs +1 -0
- package/dist/resolveCssColorValue-DH_SEZj4.js +8 -0
- package/dist/resolveSeriesPaletteColor-BepW1gdW.cjs +1 -0
- package/dist/{resolveSeriesPaletteColor-B7wHDj1L.js → resolveSeriesPaletteColor-DoPeNP_F.js} +3 -2
- package/dist/{resolveStackedChartContext-DxJNWqwE.js → resolveStackedChartContext-BbCzct6O.js} +5 -5
- package/dist/{resolveStackedChartContext-Br3N7ISo.cjs → resolveStackedChartContext-D4tuSA6Z.cjs} +1 -1
- package/dist/splitChartAxisLabel-D-IFyucJ.js +4 -0
- package/dist/splitChartAxisLabel-DAmQOJn6.cjs +2 -0
- package/dist/uikit-components.css +1 -1
- package/dist/useChartInteractivity-CaZ37kX-.cjs +1 -0
- package/dist/{useChartInteractivity-Cl06JL4l.js → useChartInteractivity-DygkiRA1.js} +178 -144
- package/dist/utils/chart/burnup/createBurnupTooltipCallbacks.d.ts +3 -1
- package/dist/utils/chart/burnup/createBurnupTooltipCallbacks.d.ts.map +1 -1
- package/dist/utils/chart/chart.types.d.ts +10 -0
- package/dist/utils/chart/chart.types.d.ts.map +1 -1
- package/dist/utils/chart/core/applyChartHighlightedYTick.d.ts +19 -0
- package/dist/utils/chart/core/applyChartHighlightedYTick.d.ts.map +1 -0
- package/dist/utils/chart/core/chartCssVariables.d.ts +3 -0
- package/dist/utils/chart/core/chartCssVariables.d.ts.map +1 -1
- package/dist/utils/chart/core/chartInteractivity.d.ts +9 -2
- package/dist/utils/chart/core/chartInteractivity.d.ts.map +1 -1
- package/dist/utils/chart/core/createChartMarkersPlugin.d.ts.map +1 -1
- package/dist/utils/chart/core/resolveSeriesPaletteColor.d.ts.map +1 -1
- package/dist/utils/chart/core/splitChartAxisLabel.d.ts +2 -0
- package/dist/utils/chart/core/splitChartAxisLabel.d.ts.map +1 -0
- package/dist/utils/chart/css/resolveCssColorValue.d.ts +2 -0
- package/dist/utils/chart/css/resolveCssColorValue.d.ts.map +1 -0
- package/dist/utils/chart/horizontalBar/resolveHorizontalBarColor.d.ts.map +1 -1
- package/dist/utils/chart/index.d.ts +4 -1
- package/dist/utils/chart/index.d.ts.map +1 -1
- package/dist/utils/chart/multiLine/buildMultiLineChartScales.d.ts +119 -14
- package/dist/utils/chart/multiLine/buildMultiLineChartScales.d.ts.map +1 -1
- package/dist/utils/chart/multiLine/createMultiLineTooltipCallbacks.d.ts +7 -2
- package/dist/utils/chart/multiLine/createMultiLineTooltipCallbacks.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/SChartBar-CUAibXox.js +0 -215
- package/dist/SChartBar-xzw8oxXl.cjs +0 -1
- package/dist/SChartBurnup-C5Z7UDi-.js +0 -250
- package/dist/SChartBurnup-CWSJUoA_.cjs +0 -1
- package/dist/SChartHorizontalBar-0RpJa5EJ.cjs +0 -1
- package/dist/SChartHorizontalBar-B9SWFvdN.js +0 -175
- package/dist/SChartLegend-DGtjd6zV.cjs +0 -1
- package/dist/SChartLegend-oZoF8XK7.js +0 -42
- package/dist/SChartMultiLine-CG6dKmWm.js +0 -244
- package/dist/SChartMultiLine-vz7JdyA3.cjs +0 -1
- package/dist/SChartPie-0ugeo2fO.js +0 -182
- package/dist/SChartPie-QpnxLQYv.cjs +0 -1
- package/dist/STable-BHTC8_Gq.cjs +0 -1
- package/dist/buildMultiLineChartScales-7mcIfRVG.cjs +0 -1
- package/dist/buildMultiLineChartScales-CFZ8YVeJ.js +0 -19
- package/dist/createChartMarkersPlugin-Cg1yGzxW.cjs +0 -1
- package/dist/resolveBarStackedSeriesColor-DM7Ax0-s.js +0 -11
- package/dist/resolveBarStackedSeriesColor-z3NP5vAS.cjs +0 -1
- package/dist/resolveSeriesPaletteColor-D0XlU5vT.cjs +0 -1
- package/dist/useChartInteractivity-LbJiqlvI.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { T as e, b as t, d as n, h as r, n as i, t as a, u as o, x as s } from "./useChartInteractivity-DygkiRA1.js";
|
|
2
2
|
import { computed as c, createElementBlock as l, createElementVNode as u, createVNode as d, defineComponent as f, normalizeClass as p, openBlock as m, unref as h, useTemplateRef as g, withCtx as _ } from "vue";
|
|
3
3
|
var v = 4, y = 12, b = 24, x = (e) => {
|
|
4
4
|
let t = e <= 15;
|
|
@@ -14,14 +14,14 @@ var v = 4, y = 12, b = 24, x = (e) => {
|
|
|
14
14
|
mode: "nearest",
|
|
15
15
|
axis: "x",
|
|
16
16
|
intersect: !1
|
|
17
|
-
}, C = .3, w = 1, T = ({ labels:
|
|
18
|
-
let g = t(
|
|
17
|
+
}, C = .3, w = 1, T = ({ 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 = t(e.axisLabel, m), _ = t(e.grid, m), v = t(h ? e.skeletonSeries : e.progressLine, m), y = t(h ? e.skeletonFillStart : e.referenceFill, m), b = t(e.tooltipBackground, m), T = t(e.tooltipText, m), E = C, D = x(p), O = S(p);
|
|
19
19
|
return {
|
|
20
20
|
type: "line",
|
|
21
21
|
data: {
|
|
22
|
-
labels:
|
|
22
|
+
labels: i,
|
|
23
23
|
datasets: [{
|
|
24
|
-
data:
|
|
24
|
+
data: s,
|
|
25
25
|
borderColor: "transparent",
|
|
26
26
|
backgroundColor: y,
|
|
27
27
|
pointRadius: 0,
|
|
@@ -31,7 +31,7 @@ var v = 4, y = 12, b = 24, x = (e) => {
|
|
|
31
31
|
order: 0
|
|
32
32
|
}, {
|
|
33
33
|
label: c,
|
|
34
|
-
data:
|
|
34
|
+
data: a,
|
|
35
35
|
borderColor: v,
|
|
36
36
|
backgroundColor: v,
|
|
37
37
|
tension: E,
|
|
@@ -47,7 +47,7 @@ var v = 4, y = 12, b = 24, x = (e) => {
|
|
|
47
47
|
options: {
|
|
48
48
|
responsive: !0,
|
|
49
49
|
maintainAspectRatio: !1,
|
|
50
|
-
interaction:
|
|
50
|
+
interaction: o(h, O),
|
|
51
51
|
plugins: {
|
|
52
52
|
legend: { display: !1 },
|
|
53
53
|
tooltip: {
|
|
@@ -166,41 +166,41 @@ var v = 4, y = 12, b = 24, x = (e) => {
|
|
|
166
166
|
default: !1
|
|
167
167
|
}
|
|
168
168
|
},
|
|
169
|
-
setup(
|
|
170
|
-
let
|
|
169
|
+
setup(e, { expose: t }) {
|
|
170
|
+
let n = g("chartRootRef"), r = g("chartCanvasRef"), o = c(() => e.minValue ?? 0), f = c(() => e.maxValue ?? 100), v = c(() => e.prefix ?? "%"), y = c(() => e.loading ? k : e.progressSnapshots), b = c(() => O({
|
|
171
171
|
progressSnapshots: y.value,
|
|
172
|
-
deadline:
|
|
173
|
-
minValue:
|
|
174
|
-
maxValue:
|
|
172
|
+
deadline: e.loading ? "2026-06-28" : e.deadline,
|
|
173
|
+
minValue: e.loading ? 0 : o.value,
|
|
174
|
+
maxValue: e.loading ? 100 : f.value
|
|
175
175
|
})), { chartInstance: x } = i({
|
|
176
|
-
canvasRef:
|
|
177
|
-
config: c(() => !
|
|
176
|
+
canvasRef: r,
|
|
177
|
+
config: c(() => !e.loading && e.progressSnapshots.length === 0 ? null : T({
|
|
178
178
|
labels: b.value.labels,
|
|
179
179
|
progressValues: b.value.progressValues,
|
|
180
180
|
referenceValues: b.value.referenceValues,
|
|
181
|
-
seriesLabel:
|
|
181
|
+
seriesLabel: e.seriesLabel,
|
|
182
182
|
valuePrefix: v.value,
|
|
183
183
|
minValue: b.value.minValue,
|
|
184
184
|
maxValue: b.value.maxValue,
|
|
185
|
-
stepSize:
|
|
185
|
+
stepSize: e.loading ? 25 : b.value.stepSize,
|
|
186
186
|
progressSnapshotCount: b.value.progressSnapshotCount,
|
|
187
|
-
colorHostElement:
|
|
188
|
-
skeleton:
|
|
187
|
+
colorHostElement: n.value,
|
|
188
|
+
skeleton: e.loading
|
|
189
189
|
})),
|
|
190
|
-
enabled: c(() =>
|
|
191
|
-
}), { exportImage: S } =
|
|
190
|
+
enabled: c(() => e.loading || e.progressSnapshots.length > 0)
|
|
191
|
+
}), { exportImage: S } = a({
|
|
192
192
|
chartInstance: x,
|
|
193
|
-
canvasRef:
|
|
194
|
-
colorHostElement:
|
|
193
|
+
canvasRef: r,
|
|
194
|
+
colorHostElement: n
|
|
195
195
|
});
|
|
196
|
-
return
|
|
196
|
+
return t({ exportImage: S }), (t, i) => (m(), l("div", {
|
|
197
197
|
ref_key: "chartRootRef",
|
|
198
|
-
ref:
|
|
199
|
-
class: p(["s-ui-chart-progress", { "s-ui-chart-progress--skeleton":
|
|
200
|
-
}, [u("div", A, [d(h(
|
|
198
|
+
ref: n,
|
|
199
|
+
class: p(["s-ui-chart-progress", { "s-ui-chart-progress--skeleton": e.loading }])
|
|
200
|
+
}, [u("div", A, [d(h(s), { loading: e.loading }, {
|
|
201
201
|
default: _(() => [u("canvas", {
|
|
202
202
|
ref_key: "chartCanvasRef",
|
|
203
|
-
ref:
|
|
203
|
+
ref: r,
|
|
204
204
|
class: "s-ui-chart-progress__canvas"
|
|
205
205
|
}, null, 512)]),
|
|
206
206
|
_: 1
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { A as e, T as t, d as n, f as r, k as i, m as a, n as o, p as s, r as c, t as l, u, x as d } from "./useChartInteractivity-DygkiRA1.js";
|
|
2
|
+
import { t as f } from "./SChartLegend-dDqLhvIj.js";
|
|
3
3
|
import { t as p } from "./buildCartesianChartScales-EofFq3ry.js";
|
|
4
|
-
import { t as m } from "./resolveStackedChartContext-
|
|
5
|
-
import { t as h } from "./createChartCrosshairPlugin-
|
|
6
|
-
import { t as g } from "./resolveSeriesPaletteColor-
|
|
4
|
+
import { t as m } from "./resolveStackedChartContext-BbCzct6O.js";
|
|
5
|
+
import { t as h } from "./createChartCrosshairPlugin-EqMlaexu.js";
|
|
6
|
+
import { t as g } from "./resolveSeriesPaletteColor-DoPeNP_F.js";
|
|
7
7
|
import { n as _, t as v } from "./buildChartSeriesPoints-BTyOpkin.js";
|
|
8
8
|
import { t as y } from "./useHasListener-RSjlUyqH.js";
|
|
9
9
|
import { computed as b, createBlock as x, createCommentVNode as S, createElementBlock as C, createElementVNode as w, createVNode as T, defineComponent as E, normalizeClass as D, openBlock as O, unref as k, useTemplateRef as A, withCtx as j } from "vue";
|
|
10
10
|
//#region src/utils/chart/stacked/resolveStackedSeriesColor.ts
|
|
11
|
-
var M = (
|
|
12
|
-
palette:
|
|
13
|
-
paletteFallback:
|
|
14
|
-
skeletonPalette:
|
|
15
|
-
skeletonFallback:
|
|
16
|
-
}), N = 20, P = "stack0", F = ({ seriesList: e, colorHostElement: t, yMax:
|
|
11
|
+
var M = (n, r, a, o = !1) => g(n, r, a, o, {
|
|
12
|
+
palette: e,
|
|
13
|
+
paletteFallback: t.stackedPalette1,
|
|
14
|
+
skeletonPalette: i,
|
|
15
|
+
skeletonFallback: t.skeletonPalette1
|
|
16
|
+
}), N = 20, P = "stack0", F = ({ seriesList: e, colorHostElement: t, yMax: i, yMin: o, yStep: l = N, skeleton: d = !1, totalLabel: f, onSeriesClick: g }) => {
|
|
17
17
|
let _ = m({
|
|
18
18
|
seriesList: e,
|
|
19
19
|
colorHostElement: t,
|
|
20
|
-
yMax:
|
|
20
|
+
yMax: i,
|
|
21
21
|
yMin: o,
|
|
22
22
|
yStep: l,
|
|
23
23
|
skeleton: d
|
|
24
24
|
});
|
|
25
25
|
if (!_) return null;
|
|
26
|
-
let { axisLabelColor: v, gridColor: y, tooltipBackgroundColor: b, tooltipTextColor: x, resolvedYMax: S, resolvedYMin: C, chartLabels: w } = _, T =
|
|
26
|
+
let { axisLabelColor: v, gridColor: y, tooltipBackgroundColor: b, tooltipTextColor: x, resolvedYMax: S, resolvedYMin: C, chartLabels: w } = _, T = c({
|
|
27
27
|
kind: "series",
|
|
28
28
|
skeleton: d,
|
|
29
29
|
colorHostElement: t,
|
|
@@ -62,24 +62,24 @@ var M = (e, n, r, i = !1) => g(e, n, r, i, {
|
|
|
62
62
|
mode: "nearest",
|
|
63
63
|
intersect: !1
|
|
64
64
|
},
|
|
65
|
-
interaction:
|
|
65
|
+
interaction: u(d, {
|
|
66
66
|
mode: "index",
|
|
67
67
|
intersect: !1
|
|
68
68
|
}),
|
|
69
69
|
plugins: {
|
|
70
70
|
legend: { display: !1 },
|
|
71
71
|
tooltip: {
|
|
72
|
-
enabled:
|
|
72
|
+
enabled: n(d),
|
|
73
73
|
backgroundColor: b,
|
|
74
74
|
titleColor: x,
|
|
75
75
|
bodyColor: x,
|
|
76
76
|
footerColor: x,
|
|
77
77
|
displayColors: !1,
|
|
78
|
-
position:
|
|
78
|
+
position: s,
|
|
79
79
|
yAlign: "bottom",
|
|
80
80
|
xAlign: "center",
|
|
81
81
|
caretPadding: 8,
|
|
82
|
-
callbacks:
|
|
82
|
+
callbacks: a({ total: f })
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
85
|
scales: p({
|
|
@@ -91,7 +91,7 @@ var M = (e, n, r, i = !1) => g(e, n, r, i, {
|
|
|
91
91
|
stacked: !0
|
|
92
92
|
})
|
|
93
93
|
},
|
|
94
|
-
plugins:
|
|
94
|
+
plugins: r(d, [h(t), ...T.plugins])
|
|
95
95
|
};
|
|
96
96
|
}, I = [
|
|
97
97
|
"24.02",
|
|
@@ -203,44 +203,44 @@ var M = (e, n, r, i = !1) => g(e, n, r, i, {
|
|
|
203
203
|
totalLabel: {}
|
|
204
204
|
},
|
|
205
205
|
emits: ["seriesClick"],
|
|
206
|
-
setup(
|
|
207
|
-
let
|
|
208
|
-
let n =
|
|
209
|
-
n &&
|
|
210
|
-
},
|
|
211
|
-
seriesList:
|
|
212
|
-
colorHostElement:
|
|
213
|
-
yMax:
|
|
214
|
-
yMin:
|
|
215
|
-
yStep:
|
|
216
|
-
skeleton:
|
|
217
|
-
totalLabel:
|
|
218
|
-
onSeriesClick:
|
|
219
|
-
})), m = b(() => _(
|
|
220
|
-
canvasRef:
|
|
206
|
+
setup(e, { expose: t, emit: n }) {
|
|
207
|
+
let r = n, i = A("chartRootRef"), a = A("chartCanvasRef"), s = b(() => e.loading ? H : e.series), c = (t) => {
|
|
208
|
+
let n = e.series[t];
|
|
209
|
+
n && r("seriesClick", t, n);
|
|
210
|
+
}, u = y("onSeriesClick"), p = b(() => !e.loading && e.series.length === 0 ? null : F({
|
|
211
|
+
seriesList: s.value,
|
|
212
|
+
colorHostElement: i.value,
|
|
213
|
+
yMax: e.loading ? 160 : e.yMax,
|
|
214
|
+
yMin: e.loading ? 0 : void 0,
|
|
215
|
+
yStep: e.loading ? 20 : e.yStep,
|
|
216
|
+
skeleton: e.loading,
|
|
217
|
+
totalLabel: e.totalLabel,
|
|
218
|
+
onSeriesClick: u() ? c : void 0
|
|
219
|
+
})), m = b(() => _(s.value, (t, n) => M(t, i.value, n, e.loading))), { chartInstance: h } = o({
|
|
220
|
+
canvasRef: a,
|
|
221
221
|
config: p,
|
|
222
|
-
enabled: b(() =>
|
|
222
|
+
enabled: b(() => e.loading || e.series.length > 0)
|
|
223
223
|
}), { exportImage: g, handleLegendItemHover: v } = l({
|
|
224
224
|
chartInstance: h,
|
|
225
|
-
canvasRef:
|
|
226
|
-
colorHostElement:
|
|
225
|
+
canvasRef: a,
|
|
226
|
+
colorHostElement: i
|
|
227
227
|
});
|
|
228
|
-
return
|
|
228
|
+
return t({ exportImage: g }), (t, n) => (O(), C("div", {
|
|
229
229
|
ref_key: "chartRootRef",
|
|
230
|
-
ref:
|
|
231
|
-
class: D(["s-ui-chart-stacked-area", { "s-ui-chart-stacked-area--skeleton":
|
|
232
|
-
}, [w("div", U, [T(k(
|
|
230
|
+
ref: i,
|
|
231
|
+
class: D(["s-ui-chart-stacked-area", { "s-ui-chart-stacked-area--skeleton": e.loading }])
|
|
232
|
+
}, [w("div", U, [T(k(d), { loading: e.loading }, {
|
|
233
233
|
default: j(() => [w("canvas", {
|
|
234
234
|
ref_key: "chartCanvasRef",
|
|
235
|
-
ref:
|
|
235
|
+
ref: a,
|
|
236
236
|
class: "s-ui-chart-stacked-area__canvas"
|
|
237
237
|
}, null, 512)]),
|
|
238
238
|
_: 1
|
|
239
|
-
}, 8, ["loading"])]), m.value.length ? (O(), x(k(
|
|
239
|
+
}, 8, ["loading"])]), m.value.length ? (O(), x(k(f), {
|
|
240
240
|
key: 0,
|
|
241
241
|
items: m.value,
|
|
242
|
-
disabled:
|
|
243
|
-
interactive: !
|
|
242
|
+
disabled: e.loading,
|
|
243
|
+
interactive: !e.loading,
|
|
244
244
|
onItemHover: k(v)
|
|
245
245
|
}, null, 8, [
|
|
246
246
|
"items",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./
|
|
1
|
+
const e=require("./useChartInteractivity-CaZ37kX-.cjs"),t=require("./SChartLegend-D1gPKGm0.cjs"),n=require("./buildCartesianChartScales-Dck5yBMo.cjs"),r=require("./resolveStackedChartContext-D4tuSA6Z.cjs"),i=require("./createChartCrosshairPlugin-BTPv09h4.cjs"),a=require("./resolveSeriesPaletteColor-BepW1gdW.cjs"),o=require("./buildChartSeriesPoints-Cqo2ed-n.cjs"),s=require("./useHasListener-BPgtbbo6.cjs");let c=require("vue");var l=(t,n,r,i=!1)=>a.t(t,n,r,i,{palette:e.A,paletteFallback:e.T.stackedPalette1,skeletonPalette:e.k,skeletonFallback:e.T.skeletonPalette1}),u=20,d=`stack0`,f=({seriesList:t,colorHostElement:a,yMax:o,yMin:s,yStep:c=u,skeleton:f=!1,totalLabel:p,onSeriesClick:m})=>{let h=r.t({seriesList:t,colorHostElement:a,yMax:o,yMin:s,yStep:c,skeleton:f});if(!h)return null;let{axisLabelColor:g,gridColor:_,tooltipBackgroundColor:v,tooltipTextColor:y,resolvedYMax:b,resolvedYMin:x,chartLabels:S}=h,C=e.r({kind:`series`,skeleton:f,colorHostElement:a,onIndexClick:m});return{type:`line`,data:{labels:S,datasets:t.map((e,t)=>{let n=l(t,a,e.fillColor,f);return{label:e.label,data:e.points.map(e=>e.value),borderColor:n,backgroundColor:n,...f?{}:{hoverBorderColor:n,hoverBackgroundColor:n},borderWidth:0,fill:!0,pointRadius:0,pointHoverRadius:0,tension:0,stack:d}})},options:{responsive:!0,maintainAspectRatio:!1,onHover:C.onHover,onClick:C.onClick,hover:f?void 0:{mode:`nearest`,intersect:!1},interaction:e.u(f,{mode:`index`,intersect:!1}),plugins:{legend:{display:!1},tooltip:{enabled:e.d(f),backgroundColor:v,titleColor:y,bodyColor:y,footerColor:y,displayColors:!1,position:e.p,yAlign:`bottom`,xAlign:`center`,caretPadding:8,callbacks:e.m({total:p})}},scales:n.t({axisLabelColor:g,gridColor:_,yMin:x,yMax:b,yStep:c,stacked:!0})},plugins:e.f(f,[i.t(a),...C.plugins])}},p=[`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`],m=[18,22,26,30,34,38,42,44,46,48,49,50,51,52],h=[6,6,7,7,7,7,7,7,7,7,7,7,7,7],g=[10,11,12,12,11,10,10,10,10,10,10,10,10,10],_=[32,30,28,26,28,30,29,28,27,26,26,27,28,28],v=[`Готово`,`На ревью`,`В процессе`,`Бэклог`],y=[{label:v[0]??`Series 1`,points:o.t(p,m)},{label:v[1]??`Series 2`,points:o.t(p,h)},{label:v[2]??`Series 3`,points:o.t(p,g)},{label:v[3]??`Series 4`,points:o.t(p,_)}],b={class:`s-ui-chart-stacked-area__canvas-wrap`},x=(0,c.defineComponent)({__name:`SChartStackedArea`,props:{series:{default:()=>[]},loading:{type:Boolean,default:!1},yMax:{},yStep:{},totalLabel:{}},emits:[`seriesClick`],setup(n,{expose:r,emit:i}){let a=i,u=(0,c.useTemplateRef)(`chartRootRef`),d=(0,c.useTemplateRef)(`chartCanvasRef`),p=(0,c.computed)(()=>n.loading?y:n.series),m=e=>{let t=n.series[e];t&&a(`seriesClick`,e,t)},h=s.t(`onSeriesClick`),g=(0,c.computed)(()=>!n.loading&&n.series.length===0?null:f({seriesList:p.value,colorHostElement:u.value,yMax:n.loading?160:n.yMax,yMin:n.loading?0:void 0,yStep:n.loading?20:n.yStep,skeleton:n.loading,totalLabel:n.totalLabel,onSeriesClick:h()?m:void 0})),_=(0,c.computed)(()=>o.n(p.value,(e,t)=>l(e,u.value,t,n.loading))),{chartInstance:v}=e.n({canvasRef:d,config:g,enabled:(0,c.computed)(()=>n.loading||n.series.length>0)}),{exportImage:x,handleLegendItemHover:S}=e.t({chartInstance:v,canvasRef:d,colorHostElement:u});return r({exportImage:x}),(r,i)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{ref_key:`chartRootRef`,ref:u,class:(0,c.normalizeClass)([`s-ui-chart-stacked-area`,{"s-ui-chart-stacked-area--skeleton":n.loading}])},[(0,c.createElementVNode)(`div`,b,[(0,c.createVNode)((0,c.unref)(e.x),{loading:n.loading},{default:(0,c.withCtx)(()=>[(0,c.createElementVNode)(`canvas`,{ref_key:`chartCanvasRef`,ref:d,class:`s-ui-chart-stacked-area__canvas`},null,512)]),_:1},8,[`loading`])]),_.value.length?((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(t.t),{key:0,items:_.value,disabled:n.loading,interactive:!n.loading,onItemHover:(0,c.unref)(S)},null,8,[`items`,`disabled`,`interactive`,`onItemHover`])):(0,c.createCommentVNode)(``,!0)],2))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return x}});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { T as e, b as t, d as n, f as r, n as i, r as a, t as o, u as s, v as c, x as l, y as u } from "./useChartInteractivity-DygkiRA1.js";
|
|
2
|
+
import { t as d } from "./SChartLegend-dDqLhvIj.js";
|
|
3
3
|
import { t as f } from "./buildCartesianChartScales-EofFq3ry.js";
|
|
4
|
-
import { t as p } from "./resolveStackedChartContext-
|
|
5
|
-
import { t as m } from "./resolveBarStackedSeriesColor-
|
|
4
|
+
import { t as p } from "./resolveStackedChartContext-BbCzct6O.js";
|
|
5
|
+
import { t as m } from "./resolveBarStackedSeriesColor-CjwUxrUx.js";
|
|
6
6
|
import { n as h, t as g } from "./buildChartSeriesPoints-BTyOpkin.js";
|
|
7
7
|
import { t as _ } from "./useHasListener-RSjlUyqH.js";
|
|
8
8
|
import { computed as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createVNode as C, defineComponent as w, normalizeClass as T, openBlock as E, unref as D, useTemplateRef as O, withCtx as k } from "vue";
|
|
@@ -10,37 +10,37 @@ import { computed as v, createBlock as y, createCommentVNode as b, createElement
|
|
|
10
10
|
var A = 3, j = 4, M = (e, t, n, r, i, a) => {
|
|
11
11
|
let o = Math.min(a, r / 2, i), s = o;
|
|
12
12
|
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();
|
|
13
|
-
}, N = (
|
|
13
|
+
}, N = (n) => ({
|
|
14
14
|
id: "stackedBarHoverOutline",
|
|
15
|
-
afterDatasetsDraw(
|
|
16
|
-
let
|
|
17
|
-
if (
|
|
18
|
-
let
|
|
19
|
-
for (let e of
|
|
20
|
-
let { x: t, y: n, width: r, base:
|
|
15
|
+
afterDatasetsDraw(r) {
|
|
16
|
+
let i = r.tooltip?.getActiveElements() ?? [];
|
|
17
|
+
if (i.length === 0) return;
|
|
18
|
+
let a = Infinity, o = Infinity, s = -Infinity, c = -Infinity;
|
|
19
|
+
for (let e of i) {
|
|
20
|
+
let { x: t, y: n, width: r, base: i } = e.element.getProps([
|
|
21
21
|
"x",
|
|
22
22
|
"y",
|
|
23
23
|
"width",
|
|
24
24
|
"base"
|
|
25
|
-
]), l = t - r / 2, u = t + r / 2, d = n, f =
|
|
26
|
-
|
|
25
|
+
]), l = t - r / 2, u = t + r / 2, d = n, f = i;
|
|
26
|
+
a = Math.min(a, l), s = Math.max(s, u), o = Math.min(o, d), c = Math.max(c, f);
|
|
27
27
|
}
|
|
28
|
-
let
|
|
28
|
+
let l = t(e.barHoverOutline, n), { ctx: u, chartArea: d } = r, 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;
|
|
29
29
|
if (_ <= 0 || v <= 0) return;
|
|
30
30
|
let y = Math.max(0, j - f);
|
|
31
|
-
|
|
31
|
+
u.save(), u.strokeStyle = l, u.lineWidth = A, M(u, h, g, _, v, y), u.restore();
|
|
32
32
|
}
|
|
33
|
-
}), P = 5, F = "stack0", I = 36, L = 4, R = 12, z = ({ seriesList: e, colorHostElement: t, yMax:
|
|
33
|
+
}), P = 5, F = "stack0", I = 36, L = 4, R = 12, z = ({ seriesList: e, colorHostElement: t, yMax: i, yMin: o, yStep: l = P, skeleton: d = !1, onSeriesClick: h, onSegmentClick: g }) => {
|
|
34
34
|
let _ = p({
|
|
35
35
|
seriesList: e,
|
|
36
36
|
colorHostElement: t,
|
|
37
|
-
yMax:
|
|
38
|
-
yMin:
|
|
39
|
-
yStep:
|
|
37
|
+
yMax: i,
|
|
38
|
+
yMin: o,
|
|
39
|
+
yStep: l,
|
|
40
40
|
skeleton: d
|
|
41
41
|
});
|
|
42
42
|
if (!_) return null;
|
|
43
|
-
let { axisLabelColor: v, gridColor: y, tooltipBackgroundColor: b, tooltipTextColor: x, resolvedYMax: S, resolvedYMin: C, chartLabels: w, pointCaptions: T, topSeriesIndex: E } = _, D =
|
|
43
|
+
let { axisLabelColor: v, gridColor: y, tooltipBackgroundColor: b, tooltipTextColor: x, resolvedYMax: S, resolvedYMin: C, chartLabels: w, pointCaptions: T, topSeriesIndex: E } = _, D = a({
|
|
44
44
|
kind: "segment",
|
|
45
45
|
skeleton: d,
|
|
46
46
|
colorHostElement: t,
|
|
@@ -79,23 +79,23 @@ var A = 3, j = 4, M = (e, t, n, r, i, a) => {
|
|
|
79
79
|
mode: "nearest",
|
|
80
80
|
intersect: !0
|
|
81
81
|
},
|
|
82
|
-
interaction:
|
|
82
|
+
interaction: s(d, {
|
|
83
83
|
mode: "nearest",
|
|
84
84
|
intersect: !0
|
|
85
85
|
}),
|
|
86
86
|
plugins: {
|
|
87
87
|
legend: { display: !1 },
|
|
88
88
|
tooltip: {
|
|
89
|
-
enabled:
|
|
89
|
+
enabled: n(d),
|
|
90
90
|
backgroundColor: b,
|
|
91
91
|
titleColor: x,
|
|
92
92
|
bodyColor: x,
|
|
93
93
|
displayColors: !1,
|
|
94
|
-
position:
|
|
94
|
+
position: c,
|
|
95
95
|
yAlign: "bottom",
|
|
96
96
|
xAlign: "center",
|
|
97
97
|
caretPadding: 8,
|
|
98
|
-
callbacks:
|
|
98
|
+
callbacks: u()
|
|
99
99
|
}
|
|
100
100
|
},
|
|
101
101
|
scales: f({
|
|
@@ -103,12 +103,12 @@ var A = 3, j = 4, M = (e, t, n, r, i, a) => {
|
|
|
103
103
|
gridColor: y,
|
|
104
104
|
yMin: C,
|
|
105
105
|
yMax: S,
|
|
106
|
-
yStep:
|
|
106
|
+
yStep: l,
|
|
107
107
|
stacked: !0,
|
|
108
108
|
xTickFontSize: R
|
|
109
109
|
})
|
|
110
110
|
},
|
|
111
|
-
plugins:
|
|
111
|
+
plugins: r(d, [N(t), ...D.plugins])
|
|
112
112
|
};
|
|
113
113
|
}, B = [
|
|
114
114
|
"5 неделя",
|
|
@@ -191,47 +191,47 @@ var A = 3, j = 4, M = (e, t, n, r, i, a) => {
|
|
|
191
191
|
yStep: {}
|
|
192
192
|
},
|
|
193
193
|
emits: ["seriesClick", "segmentClick"],
|
|
194
|
-
setup(
|
|
195
|
-
let
|
|
196
|
-
let
|
|
197
|
-
|
|
198
|
-
}, f = (
|
|
199
|
-
let
|
|
200
|
-
|
|
201
|
-
}, p = _("onSeriesClick"), g = _("onSegmentClick"), w = v(() => !
|
|
202
|
-
seriesList:
|
|
203
|
-
colorHostElement:
|
|
204
|
-
yMax:
|
|
205
|
-
yMin:
|
|
206
|
-
yStep:
|
|
207
|
-
skeleton:
|
|
208
|
-
onSeriesClick: p() ?
|
|
194
|
+
setup(e, { expose: t, emit: n }) {
|
|
195
|
+
let r = n, a = O("chartRootRef"), s = O("chartCanvasRef"), c = v(() => e.loading ? G : e.series), u = (t) => {
|
|
196
|
+
let n = e.series[t];
|
|
197
|
+
n && r("seriesClick", t, n);
|
|
198
|
+
}, f = (t, n) => {
|
|
199
|
+
let i = e.series[n], a = i?.points[t];
|
|
200
|
+
i && a && r("segmentClick", t, n, a, i);
|
|
201
|
+
}, p = _("onSeriesClick"), g = _("onSegmentClick"), w = v(() => !e.loading && e.series.length === 0 ? null : z({
|
|
202
|
+
seriesList: c.value,
|
|
203
|
+
colorHostElement: a.value,
|
|
204
|
+
yMax: e.loading ? 50 : e.yMax,
|
|
205
|
+
yMin: e.loading ? 0 : void 0,
|
|
206
|
+
yStep: e.loading ? 5 : e.yStep,
|
|
207
|
+
skeleton: e.loading,
|
|
208
|
+
onSeriesClick: p() ? u : void 0,
|
|
209
209
|
onSegmentClick: g() ? f : void 0
|
|
210
|
-
})), A = v(() => h(
|
|
211
|
-
canvasRef:
|
|
210
|
+
})), A = v(() => h(c.value, (t, n) => m(t, a.value, n, e.loading))), { chartInstance: j } = i({
|
|
211
|
+
canvasRef: s,
|
|
212
212
|
config: w,
|
|
213
|
-
enabled: v(() =>
|
|
214
|
-
}), { exportImage: M, handleLegendItemHover: N } =
|
|
213
|
+
enabled: v(() => e.loading || e.series.length > 0)
|
|
214
|
+
}), { exportImage: M, handleLegendItemHover: N } = o({
|
|
215
215
|
chartInstance: j,
|
|
216
|
-
canvasRef:
|
|
217
|
-
colorHostElement:
|
|
216
|
+
canvasRef: s,
|
|
217
|
+
colorHostElement: a
|
|
218
218
|
});
|
|
219
|
-
return
|
|
219
|
+
return t({ exportImage: M }), (t, n) => (E(), x("div", {
|
|
220
220
|
ref_key: "chartRootRef",
|
|
221
|
-
ref:
|
|
222
|
-
class: T(["s-ui-chart-stacked-bar", { "s-ui-chart-stacked-bar--skeleton":
|
|
223
|
-
}, [S("div", K, [C(D(
|
|
221
|
+
ref: a,
|
|
222
|
+
class: T(["s-ui-chart-stacked-bar", { "s-ui-chart-stacked-bar--skeleton": e.loading }])
|
|
223
|
+
}, [S("div", K, [C(D(l), { loading: e.loading }, {
|
|
224
224
|
default: k(() => [S("canvas", {
|
|
225
225
|
ref_key: "chartCanvasRef",
|
|
226
|
-
ref:
|
|
226
|
+
ref: s,
|
|
227
227
|
class: "s-ui-chart-stacked-bar__canvas"
|
|
228
228
|
}, null, 512)]),
|
|
229
229
|
_: 1
|
|
230
|
-
}, 8, ["loading"])]), A.value.length ? (E(), y(D(
|
|
230
|
+
}, 8, ["loading"])]), A.value.length ? (E(), y(D(d), {
|
|
231
231
|
key: 0,
|
|
232
232
|
items: A.value,
|
|
233
|
-
disabled:
|
|
234
|
-
interactive: !
|
|
233
|
+
disabled: e.loading,
|
|
234
|
+
interactive: !e.loading,
|
|
235
235
|
onItemHover: D(N)
|
|
236
236
|
}, null, 8, [
|
|
237
237
|
"items",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./
|
|
1
|
+
const e=require("./useChartInteractivity-CaZ37kX-.cjs"),t=require("./SChartLegend-D1gPKGm0.cjs"),n=require("./buildCartesianChartScales-Dck5yBMo.cjs"),r=require("./resolveStackedChartContext-D4tuSA6Z.cjs"),i=require("./resolveBarStackedSeriesColor-Czkj5bJY.cjs"),a=require("./buildChartSeriesPoints-Cqo2ed-n.cjs"),o=require("./useHasListener-BPgtbbo6.cjs");let s=require("vue");var 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.b(e.T.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:t,colorHostElement:a,yMax:o,yMin:s,yStep:c=f,skeleton:l=!1,onSeriesClick:u,onSegmentClick:_})=>{let v=r.t({seriesList:t,colorHostElement:a,yMax:o,yMin:s,yStep:c,skeleton:l});if(!v)return null;let{axisLabelColor:y,gridColor:b,tooltipBackgroundColor:x,tooltipTextColor:S,resolvedYMax:C,resolvedYMin:w,chartLabels:T,pointCaptions:E,topSeriesIndex:D}=v,O=e.r({kind:`segment`,skeleton:l,colorHostElement:a,onIndexClick:u,onElementIndexClick:_});return{type:`bar`,data:{labels:T,datasets:t.map((e,t)=>{let n=i.t(t,a,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===D?{topLeft:h,topRight:h}:0,...t===0?{captions:E}:{}}})},options:{responsive:!0,maintainAspectRatio:!1,onHover:O.onHover,onClick:O.onClick,hover:l?void 0:{mode:`nearest`,intersect:!0},interaction:e.u(l,{mode:`nearest`,intersect:!0}),plugins:{legend:{display:!1},tooltip:{enabled:e.d(l),backgroundColor:x,titleColor:S,bodyColor:S,displayColors:!1,position:e.v,yAlign:`bottom`,xAlign:`center`,caretPadding:8,callbacks:e.y()}},scales:n.t({axisLabelColor:y,gridColor:b,yMin:w,yMax:C,yStep:c,stacked:!0,xTickFontSize:g})},plugins:e.f(l,[d(a),...O.plugins])}},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:a.t(v,y)},{label:S[1]??`Series 2`,points:a.t(v,b)},{label:S[2]??`Series 3`,points:a.t(v,x)}],w={class:`s-ui-chart-stacked-bar__canvas-wrap`},T=(0,s.defineComponent)({__name:`SChartStackedBar`,props:{series:{default:()=>[]},loading:{type:Boolean,default:!1},yMax:{},yStep:{}},emits:[`seriesClick`,`segmentClick`],setup(n,{expose:r,emit:c}){let l=c,u=(0,s.useTemplateRef)(`chartRootRef`),d=(0,s.useTemplateRef)(`chartCanvasRef`),f=(0,s.computed)(()=>n.loading?C:n.series),p=e=>{let t=n.series[e];t&&l(`seriesClick`,e,t)},m=(e,t)=>{let r=n.series[t],i=r?.points[e];r&&i&&l(`segmentClick`,e,t,i,r)},h=o.t(`onSeriesClick`),g=o.t(`onSegmentClick`),v=(0,s.computed)(()=>!n.loading&&n.series.length===0?null:_({seriesList:f.value,colorHostElement:u.value,yMax:n.loading?50:n.yMax,yMin:n.loading?0:void 0,yStep:n.loading?5:n.yStep,skeleton:n.loading,onSeriesClick:h()?p:void 0,onSegmentClick:g()?m:void 0})),y=(0,s.computed)(()=>a.n(f.value,(e,t)=>i.t(e,u.value,t,n.loading))),{chartInstance:b}=e.n({canvasRef:d,config:v,enabled:(0,s.computed)(()=>n.loading||n.series.length>0)}),{exportImage:x,handleLegendItemHover:S}=e.t({chartInstance:b,canvasRef:d,colorHostElement:u});return r({exportImage:x}),(r,i)=>((0,s.openBlock)(),(0,s.createElementBlock)(`div`,{ref_key:`chartRootRef`,ref:u,class:(0,s.normalizeClass)([`s-ui-chart-stacked-bar`,{"s-ui-chart-stacked-bar--skeleton":n.loading}])},[(0,s.createElementVNode)(`div`,w,[(0,s.createVNode)((0,s.unref)(e.x),{loading:n.loading},{default:(0,s.withCtx)(()=>[(0,s.createElementVNode)(`canvas`,{ref_key:`chartCanvasRef`,ref:d,class:`s-ui-chart-stacked-bar__canvas`},null,512)]),_:1},8,[`loading`])]),y.value.length?((0,s.openBlock)(),(0,s.createBlock)((0,s.unref)(t.t),{key:0,items:y.value,disabled:n.loading,interactive:!n.loading,onItemHover:(0,s.unref)(S)},null,8,[`items`,`disabled`,`interactive`,`onItemHover`])):(0,s.createCommentVNode)(``,!0)],2))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return T}});
|