@shtabapp/ui-kit 1.62.0 → 1.64.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 +19 -0
- package/dist/SChartBar-BVgwPlYi.js +215 -0
- package/dist/SChartBar-CBU1uCuL.cjs +1 -0
- package/dist/SChartBurnup-Ch3UMa9w.cjs +1 -0
- package/dist/{SChartBurnup-Dxi0MBwo.js → SChartBurnup-DyJHdRlf.js} +75 -75
- package/dist/SChartHorizontalBar-Bv90SV6E.cjs +1 -0
- package/dist/{SChartHorizontalBar-XNasKzaO.js → SChartHorizontalBar-DDo6TfE8.js} +28 -28
- package/dist/{SChartLine-DSQaezYq.js → SChartLine-Cs1JzPEK.js} +29 -29
- package/dist/SChartLine-nIGaef_o.cjs +1 -0
- package/dist/SChartMultiLine-BzoW4ETf.cjs +1 -0
- package/dist/SChartMultiLine-DqCQ7FCv.js +204 -0
- package/dist/{SChartPie-bN8rY-y5.js → SChartPie-Bt3o7LZI.js} +55 -55
- package/dist/SChartPie-Bv5Obcwb.cjs +1 -0
- package/dist/{SChartProgress-BtwqE4xL.js → SChartProgress-uMg4DBpS.js} +30 -30
- package/dist/SChartProgress-xxqrj03o.cjs +1 -0
- package/dist/SChartStackedArea-BNe6FAg8.cjs +1 -0
- package/dist/{SChartStackedArea-BxUex_Di.js → SChartStackedArea-BQGnKp1i.js} +58 -58
- package/dist/SChartStackedBar-D1G-VloG.cjs +1 -0
- package/dist/SChartStackedBar-fiUU9lNp.js +245 -0
- package/dist/SColorPicker-BRSi0Xhm.cjs +1 -0
- package/dist/{SColorPicker-BL-zrskU.js → SColorPicker-Djr-R81h.js} +2 -1
- package/dist/SDropdownMenu-2koPU6IG.js +38 -0
- package/dist/SDropdownMenu-k9SxaFVH.cjs +1 -0
- package/dist/SList-D0PDc8VN.cjs +1 -0
- package/dist/SList-D2K9dNsj.js +465 -0
- package/dist/{SSegmentControl-CAoM03V6.js → SSegmentControl-B9KkAQiG.js} +11 -9
- package/dist/SSegmentControl-OXTka86u.cjs +1 -0
- package/dist/SSelect-CRlkCLik.cjs +1 -0
- package/dist/SSelect-D6taevzT.js +650 -0
- package/dist/STable-NbCfen0n.cjs +1 -0
- package/dist/STable-aS1eGuVB.js +3445 -0
- package/dist/areChartSeriesAligned-DiBX3TTk.cjs +1 -0
- package/dist/{buildChartSeriesPoints-D8Xpfwp7.js → areChartSeriesAligned-DjonrIMm.js} +2 -8
- package/dist/buildChartSeriesPoints-BTyOpkin.js +10 -0
- package/dist/buildChartSeriesPoints-Cqo2ed-n.cjs +1 -0
- package/dist/components/SChartBar/SChartBar.types.d.ts +47 -0
- package/dist/components/SChartBar/SChartBar.types.d.ts.map +1 -0
- package/dist/components/SChartBar/SChartBar.vue.d.ts +11 -0
- package/dist/components/SChartBar/SChartBar.vue.d.ts.map +1 -0
- package/dist/components/SChartBar/index.d.ts +3 -0
- package/dist/components/SChartBar/index.d.ts.map +1 -0
- package/dist/components/SChartBar/utils/buildBarChartConfig.d.ts +16 -0
- package/dist/components/SChartBar/utils/buildBarChartConfig.d.ts.map +1 -0
- package/dist/components/SChartBar/utils/createBarTargetLinePlugin.d.ts +9 -0
- package/dist/components/SChartBar/utils/createBarTargetLinePlugin.d.ts.map +1 -0
- package/dist/components/SChartBar/utils/demoBarSeries.d.ts +9 -0
- package/dist/components/SChartBar/utils/demoBarSeries.d.ts.map +1 -0
- package/dist/components/SChartBar/utils/skeletonBarSeries.d.ts +5 -0
- package/dist/components/SChartBar/utils/skeletonBarSeries.d.ts.map +1 -0
- package/dist/components/SChartMultiLine/SChartMultiLine.types.d.ts +2 -0
- package/dist/components/SChartMultiLine/SChartMultiLine.types.d.ts.map +1 -1
- package/dist/components/SChartMultiLine/SChartMultiLine.vue.d.ts.map +1 -1
- package/dist/components/SChartMultiLine/utils/buildMultiLineChartConfig.d.ts +2 -1
- package/dist/components/SChartMultiLine/utils/buildMultiLineChartConfig.d.ts.map +1 -1
- package/dist/components/SList/SList.vue.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/SSegmentControl/SSegmentControl.types.d.ts +2 -0
- package/dist/components/SSegmentControl/SSegmentControl.types.d.ts.map +1 -1
- package/dist/components/SSegmentControl/SSegmentControlItem.vue.d.ts.map +1 -1
- package/dist/components/STable/STable.types.d.ts +317 -0
- package/dist/components/STable/STable.types.d.ts.map +1 -0
- package/dist/components/STable/STable.vue.d.ts +154 -0
- package/dist/components/STable/STable.vue.d.ts.map +1 -0
- package/dist/components/STable/constants/tableSizes.d.ts +76 -0
- package/dist/components/STable/constants/tableSizes.d.ts.map +1 -0
- package/dist/components/STable/index.d.ts +4 -0
- package/dist/components/STable/index.d.ts.map +1 -0
- package/dist/components/STable/parts/STableCellText.vue.d.ts +23 -0
- package/dist/components/STable/parts/STableCellText.vue.d.ts.map +1 -0
- package/dist/components/STable/parts/STableCheckbox.vue.d.ts +17 -0
- package/dist/components/STable/parts/STableCheckbox.vue.d.ts.map +1 -0
- package/dist/components/STable/parts/STableContentRow.vue.d.ts +41 -0
- package/dist/components/STable/parts/STableContentRow.vue.d.ts.map +1 -0
- package/dist/components/STable/parts/STableGroupRow.vue.d.ts +55 -0
- package/dist/components/STable/parts/STableGroupRow.vue.d.ts.map +1 -0
- package/dist/components/STable/parts/STableHeaderCell.vue.d.ts +36 -0
- package/dist/components/STable/parts/STableHeaderCell.vue.d.ts.map +1 -0
- package/dist/components/STable/parts/STableHint.vue.d.ts +7 -0
- package/dist/components/STable/parts/STableHint.vue.d.ts.map +1 -0
- package/dist/components/STable/parts/STablePlaceholderRow.vue.d.ts +25 -0
- package/dist/components/STable/parts/STablePlaceholderRow.vue.d.ts.map +1 -0
- package/dist/components/STable/parts/STableRow.vue.d.ts +67 -0
- package/dist/components/STable/parts/STableRow.vue.d.ts.map +1 -0
- package/dist/components/STable/parts/STableSkeletonRow.vue.d.ts +27 -0
- package/dist/components/STable/parts/STableSkeletonRow.vue.d.ts.map +1 -0
- package/dist/components/STable/utils/tableDndShared.d.ts +17 -0
- package/dist/components/STable/utils/tableDndShared.d.ts.map +1 -0
- package/dist/components/STable/utils/useFlatTableRows.d.ts +62 -0
- package/dist/components/STable/utils/useFlatTableRows.d.ts.map +1 -0
- package/dist/components/STable/utils/useTableCellPlans.d.ts +48 -0
- package/dist/components/STable/utils/useTableCellPlans.d.ts.map +1 -0
- package/dist/components/STable/utils/useTableColumnDnd.d.ts +28 -0
- package/dist/components/STable/utils/useTableColumnDnd.d.ts.map +1 -0
- package/dist/components/STable/utils/useTableColumnResize.d.ts +24 -0
- package/dist/components/STable/utils/useTableColumnResize.d.ts.map +1 -0
- package/dist/components/STable/utils/useTableColumns.d.ts +86 -0
- package/dist/components/STable/utils/useTableColumns.d.ts.map +1 -0
- package/dist/components/STable/utils/useTableGridFocus.d.ts +79 -0
- package/dist/components/STable/utils/useTableGridFocus.d.ts.map +1 -0
- package/dist/components/STable/utils/useTableGridKeyboard.d.ts +36 -0
- package/dist/components/STable/utils/useTableGridKeyboard.d.ts.map +1 -0
- package/dist/components/STable/utils/useTableRenderEntries.d.ts +56 -0
- package/dist/components/STable/utils/useTableRenderEntries.d.ts.map +1 -0
- package/dist/components/STable/utils/useTableRowDnd.d.ts +37 -0
- package/dist/components/STable/utils/useTableRowDnd.d.ts.map +1 -0
- package/dist/components/STable/utils/useTableRowHydration.d.ts +29 -0
- package/dist/components/STable/utils/useTableRowHydration.d.ts.map +1 -0
- package/dist/components/STable/utils/useTableScrollScale.d.ts +34 -0
- package/dist/components/STable/utils/useTableScrollScale.d.ts.map +1 -0
- package/dist/components/STable/utils/useTableSelection.d.ts +27 -0
- package/dist/components/STable/utils/useTableSelection.d.ts.map +1 -0
- package/dist/components/STable/utils/useTableServiceRows.d.ts +57 -0
- package/dist/components/STable/utils/useTableServiceRows.d.ts.map +1 -0
- package/dist/components/STable/utils/useTableSorting.d.ts +21 -0
- package/dist/components/STable/utils/useTableSorting.d.ts.map +1 -0
- package/dist/components/STable/utils/useTableStickyRows.d.ts +38 -0
- package/dist/components/STable/utils/useTableStickyRows.d.ts.map +1 -0
- package/dist/components/STable/utils/useTableStyleVars.d.ts +22 -0
- package/dist/components/STable/utils/useTableStyleVars.d.ts.map +1 -0
- package/dist/components/STable/utils/useTableVirtualRows.d.ts +56 -0
- package/dist/components/STable/utils/useTableVirtualRows.d.ts.map +1 -0
- package/dist/composables/treeKeyboardNavigation.d.ts +26 -0
- package/dist/composables/treeKeyboardNavigation.d.ts.map +1 -0
- package/dist/composables/useFlatTreeList.d.ts +1 -0
- package/dist/composables/useFlatTreeList.d.ts.map +1 -1
- package/dist/{createChartCrosshairPlugin-DwFOncWI.js → createChartCrosshairPlugin-DU5grSok.js} +2 -2
- package/dist/createChartCrosshairPlugin-DfYzBie2.cjs +1 -0
- package/dist/entries/chart-bar.cjs +1 -0
- package/dist/entries/chart-bar.d.ts +3 -0
- package/dist/entries/chart-bar.d.ts.map +1 -0
- package/dist/entries/chart-bar.js +2 -0
- package/dist/entries/chart-burnup.cjs +1 -1
- package/dist/entries/chart-burnup.js +1 -1
- package/dist/entries/chart-horizontal-bar.cjs +1 -1
- package/dist/entries/chart-horizontal-bar.js +1 -1
- package/dist/entries/chart-line.cjs +1 -1
- package/dist/entries/chart-line.js +1 -1
- package/dist/entries/chart-multi-line.cjs +1 -1
- package/dist/entries/chart-multi-line.js +1 -1
- package/dist/entries/chart-pie.cjs +1 -1
- package/dist/entries/chart-pie.js +1 -1
- package/dist/entries/chart-progress.cjs +1 -1
- package/dist/entries/chart-progress.js +1 -1
- package/dist/entries/chart-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/color-picker.cjs +1 -1
- package/dist/entries/color-picker.js +1 -1
- package/dist/entries/list.cjs +1 -1
- package/dist/entries/list.js +1 -1
- package/dist/entries/segment-control.cjs +1 -1
- package/dist/entries/segment-control.js +1 -1
- package/dist/entries/select.cjs +1 -1
- package/dist/entries/select.js +1 -1
- package/dist/entries/table.cjs +1 -0
- package/dist/entries/table.d.ts +3 -0
- package/dist/entries/table.d.ts.map +1 -0
- package/dist/entries/table.js +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +133 -129
- package/dist/resolveBarStackedSeriesColor-HDSkh6Mw.cjs +1 -0
- package/dist/resolveBarStackedSeriesColor-LpVh1SvQ.js +11 -0
- package/dist/resolveSeriesPaletteColor-B5qoBbXN.cjs +1 -0
- package/dist/{resolveSeriesPaletteColor-BdvGT-PI.js → resolveSeriesPaletteColor-DcLSyk-D.js} +1 -1
- package/dist/{resolveStackedChartContext-DFre3tt0.js → resolveStackedChartContext-CIKVXkDn.js} +6 -6
- package/dist/resolveStackedChartContext-CQbgdV55.cjs +1 -0
- package/dist/treeKeyboardNavigation-BOz2SVus.cjs +1 -0
- package/dist/treeKeyboardNavigation-SmxTdnDz.js +131 -0
- package/dist/uikit-components.css +1 -1
- package/dist/{SChartSkeletonHost-BT96eWSF.js → useChartInteractivity-BATdT86l.js} +126 -126
- package/dist/useChartInteractivity-CXSdHPOw.cjs +1 -0
- package/package.json +19 -3
- package/dist/SChartBurnup-C4x5kik6.cjs +0 -1
- package/dist/SChartHorizontalBar-4H-lgfO4.cjs +0 -1
- package/dist/SChartLine-BF6Klm4j.cjs +0 -1
- package/dist/SChartMultiLine-CrMmphFe.js +0 -198
- package/dist/SChartMultiLine-Ddvfmf__.cjs +0 -1
- package/dist/SChartPie-namQTFla.cjs +0 -1
- package/dist/SChartProgress-DsFHotRv.cjs +0 -1
- package/dist/SChartSkeletonHost-Dt5EjQr5.cjs +0 -1
- package/dist/SChartStackedArea-BLHs3sSH.cjs +0 -1
- package/dist/SChartStackedBar-BJ9LOgSP.js +0 -250
- package/dist/SChartStackedBar-CWNyvUj9.cjs +0 -1
- package/dist/SColorPicker-CvhpJEj1.cjs +0 -1
- package/dist/SList-C39LrsoS.js +0 -590
- package/dist/SList-Du0gqyFs.cjs +0 -1
- package/dist/SSegmentControl-B9jT8Axu.cjs +0 -1
- package/dist/SSelect-BkX3VuCr.js +0 -682
- package/dist/SSelect-CHWKMbB_.cjs +0 -1
- package/dist/buildChartSeriesPoints-Bv3nXvSu.cjs +0 -1
- package/dist/components/SList/utils/treeKeyboardNavigation.d.ts +0 -16
- package/dist/components/SList/utils/treeKeyboardNavigation.d.ts.map +0 -1
- package/dist/createChartCrosshairPlugin-ZZwKUQm8.cjs +0 -1
- package/dist/resolveSeriesPaletteColor-hI4YDdUg.cjs +0 -1
- package/dist/resolveStackedChartContext-Dsxhhhel.cjs +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { C as e, S as t, a as n, g as r, i, n as a, t as o } from "./useChartInteractivity-BATdT86l.js";
|
|
2
|
+
import { t as s } from "./createChartAreaFillGradient-BDmME9Gy.js";
|
|
3
3
|
import { t as c } from "./buildCartesianChartScales-EofFq3ry.js";
|
|
4
4
|
import { computed as l, createElementBlock as u, createElementVNode as d, createVNode as f, defineComponent as p, normalizeClass as m, openBlock as h, unref as g, useTemplateRef as _, withCtx as v } from "vue";
|
|
5
5
|
//#region src/utils/chart/css/readCssNumber.ts
|
|
@@ -11,17 +11,17 @@ var y = (e, t, n = 1) => {
|
|
|
11
11
|
if (t) return t;
|
|
12
12
|
let r = e.reduce((e, t) => Math.max(e, t.value), 0), i = Math.ceil(r / n) * n;
|
|
13
13
|
return i > 0 ? i : n * 5;
|
|
14
|
-
}, C = (e, t) => !t || typeof e != "number" ? e : `${e}%`, w = ({ points:
|
|
15
|
-
let p =
|
|
14
|
+
}, C = (e, t) => !t || typeof e != "number" ? e : `${e}%`, w = ({ points: e, seriesLabel: a, colorHostElement: o, yMax: l, yMin: u, yStep: d = x, skeleton: f = !1 }) => {
|
|
15
|
+
let p = t(r.axisLabel, o), m = t(r.grid, o), h = t(f ? r.skeletonSeries : r.seriesPrimary, o), g = t(f ? r.skeletonFillStart : r.seriesFillStart, o), _ = t(f ? r.skeletonFillEnd : r.seriesFillEnd, o), v = t(r.tooltipBackground, o), w = t(r.tooltipText, o), T = y(f ? r.skeletonFillOpacity : r.seriesFillOpacity, o, .8), E = f && l ? l : S(e, l, d), D = f && u !== void 0 ? u : 0;
|
|
16
16
|
return {
|
|
17
17
|
type: "line",
|
|
18
18
|
data: {
|
|
19
|
-
labels:
|
|
19
|
+
labels: e.map((e) => e.label),
|
|
20
20
|
datasets: [{
|
|
21
|
-
label:
|
|
22
|
-
data:
|
|
21
|
+
label: a,
|
|
22
|
+
data: e.map((e) => e.value),
|
|
23
23
|
borderColor: h,
|
|
24
|
-
backgroundColor: (
|
|
24
|
+
backgroundColor: (e) => s(e, g, _, T),
|
|
25
25
|
borderWidth: b,
|
|
26
26
|
fill: !0,
|
|
27
27
|
pointRadius: 0,
|
|
@@ -32,14 +32,14 @@ var y = (e, t, n = 1) => {
|
|
|
32
32
|
options: {
|
|
33
33
|
responsive: !0,
|
|
34
34
|
maintainAspectRatio: !1,
|
|
35
|
-
interaction:
|
|
35
|
+
interaction: i(f, {
|
|
36
36
|
mode: "index",
|
|
37
37
|
intersect: !1
|
|
38
38
|
}),
|
|
39
39
|
plugins: {
|
|
40
40
|
legend: { display: !1 },
|
|
41
41
|
tooltip: {
|
|
42
|
-
enabled:
|
|
42
|
+
enabled: n(f),
|
|
43
43
|
backgroundColor: v,
|
|
44
44
|
titleColor: w,
|
|
45
45
|
bodyColor: w,
|
|
@@ -93,32 +93,32 @@ var y = (e, t, n = 1) => {
|
|
|
93
93
|
yMax: {},
|
|
94
94
|
yStep: {}
|
|
95
95
|
},
|
|
96
|
-
setup(
|
|
97
|
-
let
|
|
98
|
-
canvasRef:
|
|
99
|
-
config: l(() => !
|
|
96
|
+
setup(t, { expose: n }) {
|
|
97
|
+
let r = _("chartRootRef"), i = _("chartCanvasRef"), s = l(() => t.loading ? T : t.points), { chartInstance: c } = a({
|
|
98
|
+
canvasRef: i,
|
|
99
|
+
config: l(() => !t.loading && t.points.length === 0 ? null : w({
|
|
100
100
|
points: s.value,
|
|
101
|
-
seriesLabel:
|
|
102
|
-
colorHostElement:
|
|
103
|
-
yMax:
|
|
104
|
-
yMin:
|
|
105
|
-
yStep:
|
|
106
|
-
skeleton:
|
|
101
|
+
seriesLabel: t.seriesLabel,
|
|
102
|
+
colorHostElement: r.value,
|
|
103
|
+
yMax: t.loading ? 100 : t.yMax,
|
|
104
|
+
yMin: t.loading ? 50 : void 0,
|
|
105
|
+
yStep: t.loading ? 10 : t.yStep,
|
|
106
|
+
skeleton: t.loading
|
|
107
107
|
})),
|
|
108
|
-
enabled: l(() =>
|
|
109
|
-
}), { exportImage: p } =
|
|
108
|
+
enabled: l(() => t.loading || t.points.length > 0)
|
|
109
|
+
}), { exportImage: p } = o({
|
|
110
110
|
chartInstance: c,
|
|
111
|
-
canvasRef:
|
|
112
|
-
colorHostElement:
|
|
111
|
+
canvasRef: i,
|
|
112
|
+
colorHostElement: r
|
|
113
113
|
});
|
|
114
|
-
return n({ exportImage: p }), (
|
|
114
|
+
return n({ exportImage: p }), (n, a) => (h(), u("div", {
|
|
115
115
|
ref_key: "chartRootRef",
|
|
116
|
-
ref:
|
|
117
|
-
class: m(["s-ui-chart-line", { "s-ui-chart-line--skeleton":
|
|
118
|
-
}, [d("div", E, [f(g(
|
|
116
|
+
ref: r,
|
|
117
|
+
class: m(["s-ui-chart-line", { "s-ui-chart-line--skeleton": t.loading }])
|
|
118
|
+
}, [d("div", E, [f(g(e), { loading: t.loading }, {
|
|
119
119
|
default: v(() => [d("canvas", {
|
|
120
120
|
ref_key: "chartCanvasRef",
|
|
121
|
-
ref:
|
|
121
|
+
ref: i,
|
|
122
122
|
class: "s-ui-chart-line__canvas"
|
|
123
123
|
}, null, 512)]),
|
|
124
124
|
_: 1
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./useChartInteractivity-CXSdHPOw.cjs"),t=require("./createChartAreaFillGradient-BwsojVzU.cjs"),n=require("./buildCartesianChartScales-Dck5yBMo.cjs");let r=require("vue");var i=(e,t,n=1)=>{if(typeof window>`u`)return n;let r=t??document.documentElement,i=getComputedStyle(r).getPropertyValue(e).trim(),a=Number.parseFloat(i);return Number.isNaN(a)?n:a},a=5,o=5,s=(e,t,n)=>{if(t)return t;let r=e.reduce((e,t)=>Math.max(e,t.value),0),i=Math.ceil(r/n)*n;return i>0?i:n*5},c=(e,t)=>!t||typeof e!=`number`?e:`${e}%`,l=({points:r,seriesLabel:l,colorHostElement:u,yMax:d,yMin:f,yStep:p=o,skeleton:m=!1})=>{let h=e.S(e.g.axisLabel,u),g=e.S(e.g.grid,u),_=e.S(m?e.g.skeletonSeries:e.g.seriesPrimary,u),v=e.S(m?e.g.skeletonFillStart:e.g.seriesFillStart,u),y=e.S(m?e.g.skeletonFillEnd:e.g.seriesFillEnd,u),b=e.S(e.g.tooltipBackground,u),x=e.S(e.g.tooltipText,u),S=i(m?e.g.skeletonFillOpacity:e.g.seriesFillOpacity,u,.8),C=m&&d?d:s(r,d,p),w=m&&f!==void 0?f:0;return{type:`line`,data:{labels:r.map(e=>e.label),datasets:[{label:l,data:r.map(e=>e.value),borderColor:_,backgroundColor:e=>t.t(e,v,y,S),borderWidth:a,fill:!0,pointRadius:0,pointHoverRadius:4,tension:.4}]},options:{responsive:!0,maintainAspectRatio:!1,interaction:e.i(m,{mode:`index`,intersect:!1}),plugins:{legend:{display:!1},tooltip:{enabled:e.a(m),backgroundColor:b,titleColor:x,bodyColor:x,displayColors:!1}},scales:n.t({axisLabelColor:h,gridColor:g,yMin:w,yMax:C,yStep:p,formatYAxisTick:e=>c(e,m)})}}},u=[{label:`ноябрь 2025`,value:63},{label:`декабрь 2025`,value:77},{label:`январь 2026`,value:75},{label:`февраль 2026`,value:81},{label:`март 2026`,value:91},{label:`апрель 2026`,value:87}],d={class:`s-ui-chart-line__canvas-wrap`},f=(0,r.defineComponent)({__name:`SChartLine`,props:{points:{default:()=>[]},seriesLabel:{default:`Series`},loading:{type:Boolean,default:!1},yMax:{},yStep:{}},setup(t,{expose:n}){let i=(0,r.useTemplateRef)(`chartRootRef`),a=(0,r.useTemplateRef)(`chartCanvasRef`),o=(0,r.computed)(()=>t.loading?u:t.points),{chartInstance:s}=e.n({canvasRef:a,config:(0,r.computed)(()=>!t.loading&&t.points.length===0?null:l({points:o.value,seriesLabel:t.seriesLabel,colorHostElement:i.value,yMax:t.loading?100:t.yMax,yMin:t.loading?50:void 0,yStep:t.loading?10:t.yStep,skeleton:t.loading})),enabled:(0,r.computed)(()=>t.loading||t.points.length>0)}),{exportImage:c}=e.t({chartInstance:s,canvasRef:a,colorHostElement:i});return n({exportImage:c}),(n,o)=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,{ref_key:`chartRootRef`,ref:i,class:(0,r.normalizeClass)([`s-ui-chart-line`,{"s-ui-chart-line--skeleton":t.loading}])},[(0,r.createElementVNode)(`div`,d,[(0,r.createVNode)((0,r.unref)(e.C),{loading:t.loading},{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)(`canvas`,{ref_key:`chartCanvasRef`,ref:a,class:`s-ui-chart-line__canvas`},null,512)]),_:1},8,[`loading`])])],2))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return f}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./SChartLegend-DGtjd6zV.cjs"),t=require("./useChartInteractivity-CXSdHPOw.cjs"),n=require("./areChartSeriesAligned-DiBX3TTk.cjs"),r=require("./createChartCrosshairPlugin-DfYzBie2.cjs"),i=require("./resolveSeriesPaletteColor-B5qoBbXN.cjs"),a=require("./buildMultiLineChartScales-7mcIfRVG.cjs"),o=require("./buildChartSeriesPoints-Cqo2ed-n.cjs"),s=require("./useHasListener-BPgtbbo6.cjs");let c=require("vue");var l=(e,n,r,a=!1)=>i.t(e,n,r,a,{palette:t._,paletteFallback:t.g.multiLinePalette1,skeletonPalette:t.b,skeletonFallback:t.g.skeletonPalette1}),u=(e,t,n)=>{if(t)return t;let r=e.reduce((e,t)=>{let n=t.points.reduce((e,t)=>Math.max(e,t.value),0);return Math.max(e,n)},0),i=Math.ceil(r/n)*n;return i>0?i:n*5},d=3,f=.4,p=4,m=5,h=({seriesList:e,colorHostElement:i,yMax:o,yMin:s,yStep:c=m,mirrorYAxis:h=!0,straightSegments:g=!1,skeleton:_=!1,onSeriesClick:v})=>{if(!n.t(e))return null;let y=t.S(t.g.axisLabel,i),b=t.S(t.g.grid,i),x=t.S(t.g.tooltipBackground,i),S=t.S(t.g.tooltipText,i),C=_&&o?o:u(e,o,c),w=_&&s!==void 0?s:0,T=e[0]?.points.map(e=>e.label)??[],E=t.r({kind:`series`,skeleton:_,colorHostElement:i,onIndexClick:v});return{type:`line`,data:{labels:T,datasets:e.map((e,t)=>{let n=l(t,i,e.fillColor,_);return{label:e.label,data:e.points.map(e=>e.value),borderColor:n,backgroundColor:n,..._?{}:{hoverBorderColor:n,hoverBackgroundColor:n},borderWidth:p,fill:!1,pointRadius:g&&!_?d:0,pointHoverRadius:4,tension:g?0:f}})},options:{responsive:!0,maintainAspectRatio:!1,onHover:E.onHover,onClick:E.onClick,interaction:t.i(_,{mode:`index`,intersect:!1}),hover:_?void 0:{mode:`nearest`,intersect:!1},plugins:{legend:{display:!1},tooltip:{enabled:t.a(_),backgroundColor:x,titleColor:S,bodyColor:S,footerColor:S,displayColors:!1,position:t.u,yAlign:`bottom`,xAlign:`center`,caretPadding:8,callbacks:t.d()}},scales:a.t({axisLabelColor:y,gridColor:b,yMin:w,yMax:C,yStep:c,mirrorYAxis:h})},plugins:t.o(_,[r.t(i),...E.plugins])}},g=[`26.01`,`2.02`,`9.02`,`16.02`,`23.02`,`2.03`,`9.03`,`16.03`,`23.03`,`30.03`,`6.04`],_=[{label:`Series 1`,points:o.t(g,[30,34,38,44,46,50,54,56,58,60,62])},{label:`Series 2`,points:o.t(g,[22,24,26,28,30,32,33,35,36,38,40])}],v={class:`s-ui-chart-multi-line__canvas-wrap`},y=(0,c.defineComponent)({__name:`SChartMultiLine`,props:{series:{default:()=>[]},loading:{type:Boolean,default:!1},yMax:{},yStep:{},mirrorYAxis:{type:Boolean,default:!0},straightSegments:{type:Boolean,default:!1}},emits:[`seriesClick`],setup(n,{expose:r,emit:i}){let a=i,u=(0,c.useTemplateRef)(`chartRootRef`),d=(0,c.useTemplateRef)(`chartCanvasRef`),f=(0,c.computed)(()=>n.loading?_:n.series),p=e=>{let t=n.series[e];t&&a(`seriesClick`,e,t)},m=s.t(`onSeriesClick`),g=(0,c.computed)(()=>!n.loading&&n.series.length===0?null:h({seriesList:f.value,colorHostElement:u.value,yMax:n.yMax,yStep:n.yStep,mirrorYAxis:n.mirrorYAxis,straightSegments:n.straightSegments,skeleton:n.loading,onSeriesClick:m()?p:void 0})),y=(0,c.computed)(()=>o.n(f.value,(e,t)=>l(e,u.value,t,n.loading))),{chartInstance:b}=t.n({canvasRef:d,config:g,enabled:(0,c.computed)(()=>n.loading||n.series.length>0)}),{exportImage:x,handleLegendItemHover:S}=t.t({chartInstance:b,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-multi-line`,{"s-ui-chart-multi-line--skeleton":n.loading}])},[(0,c.createElementVNode)(`div`,v,[(0,c.createVNode)((0,c.unref)(t.C),{loading:n.loading},{default:(0,c.withCtx)(()=>[(0,c.createElementVNode)(`canvas`,{ref_key:`chartCanvasRef`,ref:d,class:`s-ui-chart-multi-line__canvas`},null,512)]),_:1},8,[`loading`])]),y.value.length?((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(e.t),{key:0,items:y.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 y}});
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { t as e } from "./SChartLegend-oZoF8XK7.js";
|
|
2
|
+
import { C as t, S as n, _ as r, a as i, b as a, d as o, g as s, i as c, n as l, o as u, r as d, t as f, u as p } from "./useChartInteractivity-BATdT86l.js";
|
|
3
|
+
import { t as m } from "./areChartSeriesAligned-DjonrIMm.js";
|
|
4
|
+
import { t as h } from "./createChartCrosshairPlugin-DU5grSok.js";
|
|
5
|
+
import { t as g } from "./resolveSeriesPaletteColor-DcLSyk-D.js";
|
|
6
|
+
import { t as _ } from "./buildMultiLineChartScales-CFZ8YVeJ.js";
|
|
7
|
+
import { n as v, t as y } from "./buildChartSeriesPoints-BTyOpkin.js";
|
|
8
|
+
import { t as b } from "./useHasListener-RSjlUyqH.js";
|
|
9
|
+
import { computed as x, createBlock as S, createCommentVNode as C, createElementBlock as w, createElementVNode as T, createVNode as E, defineComponent as D, normalizeClass as O, openBlock as k, unref as A, useTemplateRef as j, withCtx as M } from "vue";
|
|
10
|
+
//#region src/utils/chart/multiLine/resolveMultiLineSeriesColor.ts
|
|
11
|
+
var N = (e, t, n, i = !1) => g(e, t, n, i, {
|
|
12
|
+
palette: r,
|
|
13
|
+
paletteFallback: s.multiLinePalette1,
|
|
14
|
+
skeletonPalette: a,
|
|
15
|
+
skeletonFallback: s.skeletonPalette1
|
|
16
|
+
}), P = (e, t, n) => {
|
|
17
|
+
if (t) return t;
|
|
18
|
+
let r = e.reduce((e, t) => {
|
|
19
|
+
let n = t.points.reduce((e, t) => Math.max(e, t.value), 0);
|
|
20
|
+
return Math.max(e, n);
|
|
21
|
+
}, 0), i = Math.ceil(r / n) * n;
|
|
22
|
+
return i > 0 ? i : n * 5;
|
|
23
|
+
}, F = 3, I = .4, L = 4, R = 5, z = ({ seriesList: e, colorHostElement: t, yMax: r, yMin: a, yStep: l = R, mirrorYAxis: f = !0, straightSegments: g = !1, skeleton: v = !1, onSeriesClick: y }) => {
|
|
24
|
+
if (!m(e)) return null;
|
|
25
|
+
let b = n(s.axisLabel, t), x = n(s.grid, t), S = n(s.tooltipBackground, t), C = n(s.tooltipText, t), w = v && r ? r : P(e, r, l), T = v && a !== void 0 ? a : 0, E = e[0]?.points.map((e) => e.label) ?? [], D = d({
|
|
26
|
+
kind: "series",
|
|
27
|
+
skeleton: v,
|
|
28
|
+
colorHostElement: t,
|
|
29
|
+
onIndexClick: y
|
|
30
|
+
});
|
|
31
|
+
return {
|
|
32
|
+
type: "line",
|
|
33
|
+
data: {
|
|
34
|
+
labels: E,
|
|
35
|
+
datasets: e.map((e, n) => {
|
|
36
|
+
let r = N(n, t, e.fillColor, v);
|
|
37
|
+
return {
|
|
38
|
+
label: e.label,
|
|
39
|
+
data: e.points.map((e) => e.value),
|
|
40
|
+
borderColor: r,
|
|
41
|
+
backgroundColor: r,
|
|
42
|
+
...v ? {} : {
|
|
43
|
+
hoverBorderColor: r,
|
|
44
|
+
hoverBackgroundColor: r
|
|
45
|
+
},
|
|
46
|
+
borderWidth: L,
|
|
47
|
+
fill: !1,
|
|
48
|
+
pointRadius: g && !v ? F : 0,
|
|
49
|
+
pointHoverRadius: 4,
|
|
50
|
+
tension: g ? 0 : I
|
|
51
|
+
};
|
|
52
|
+
})
|
|
53
|
+
},
|
|
54
|
+
options: {
|
|
55
|
+
responsive: !0,
|
|
56
|
+
maintainAspectRatio: !1,
|
|
57
|
+
onHover: D.onHover,
|
|
58
|
+
onClick: D.onClick,
|
|
59
|
+
interaction: c(v, {
|
|
60
|
+
mode: "index",
|
|
61
|
+
intersect: !1
|
|
62
|
+
}),
|
|
63
|
+
hover: v ? void 0 : {
|
|
64
|
+
mode: "nearest",
|
|
65
|
+
intersect: !1
|
|
66
|
+
},
|
|
67
|
+
plugins: {
|
|
68
|
+
legend: { display: !1 },
|
|
69
|
+
tooltip: {
|
|
70
|
+
enabled: i(v),
|
|
71
|
+
backgroundColor: S,
|
|
72
|
+
titleColor: C,
|
|
73
|
+
bodyColor: C,
|
|
74
|
+
footerColor: C,
|
|
75
|
+
displayColors: !1,
|
|
76
|
+
position: p,
|
|
77
|
+
yAlign: "bottom",
|
|
78
|
+
xAlign: "center",
|
|
79
|
+
caretPadding: 8,
|
|
80
|
+
callbacks: o()
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
scales: _({
|
|
84
|
+
axisLabelColor: b,
|
|
85
|
+
gridColor: x,
|
|
86
|
+
yMin: T,
|
|
87
|
+
yMax: w,
|
|
88
|
+
yStep: l,
|
|
89
|
+
mirrorYAxis: f
|
|
90
|
+
})
|
|
91
|
+
},
|
|
92
|
+
plugins: u(v, [h(t), ...D.plugins])
|
|
93
|
+
};
|
|
94
|
+
}, B = [
|
|
95
|
+
"26.01",
|
|
96
|
+
"2.02",
|
|
97
|
+
"9.02",
|
|
98
|
+
"16.02",
|
|
99
|
+
"23.02",
|
|
100
|
+
"2.03",
|
|
101
|
+
"9.03",
|
|
102
|
+
"16.03",
|
|
103
|
+
"23.03",
|
|
104
|
+
"30.03",
|
|
105
|
+
"6.04"
|
|
106
|
+
], V = [{
|
|
107
|
+
label: "Series 1",
|
|
108
|
+
points: y(B, [
|
|
109
|
+
30,
|
|
110
|
+
34,
|
|
111
|
+
38,
|
|
112
|
+
44,
|
|
113
|
+
46,
|
|
114
|
+
50,
|
|
115
|
+
54,
|
|
116
|
+
56,
|
|
117
|
+
58,
|
|
118
|
+
60,
|
|
119
|
+
62
|
|
120
|
+
])
|
|
121
|
+
}, {
|
|
122
|
+
label: "Series 2",
|
|
123
|
+
points: y(B, [
|
|
124
|
+
22,
|
|
125
|
+
24,
|
|
126
|
+
26,
|
|
127
|
+
28,
|
|
128
|
+
30,
|
|
129
|
+
32,
|
|
130
|
+
33,
|
|
131
|
+
35,
|
|
132
|
+
36,
|
|
133
|
+
38,
|
|
134
|
+
40
|
|
135
|
+
])
|
|
136
|
+
}], H = { class: "s-ui-chart-multi-line__canvas-wrap" }, U = /* @__PURE__ */ D({
|
|
137
|
+
__name: "SChartMultiLine",
|
|
138
|
+
props: {
|
|
139
|
+
series: { default: () => [] },
|
|
140
|
+
loading: {
|
|
141
|
+
type: Boolean,
|
|
142
|
+
default: !1
|
|
143
|
+
},
|
|
144
|
+
yMax: {},
|
|
145
|
+
yStep: {},
|
|
146
|
+
mirrorYAxis: {
|
|
147
|
+
type: Boolean,
|
|
148
|
+
default: !0
|
|
149
|
+
},
|
|
150
|
+
straightSegments: {
|
|
151
|
+
type: Boolean,
|
|
152
|
+
default: !1
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
emits: ["seriesClick"],
|
|
156
|
+
setup(n, { expose: r, emit: i }) {
|
|
157
|
+
let a = i, o = j("chartRootRef"), s = j("chartCanvasRef"), c = x(() => n.loading ? V : n.series), u = (e) => {
|
|
158
|
+
let t = n.series[e];
|
|
159
|
+
t && a("seriesClick", e, t);
|
|
160
|
+
}, d = b("onSeriesClick"), p = x(() => !n.loading && n.series.length === 0 ? null : z({
|
|
161
|
+
seriesList: c.value,
|
|
162
|
+
colorHostElement: o.value,
|
|
163
|
+
yMax: n.yMax,
|
|
164
|
+
yStep: n.yStep,
|
|
165
|
+
mirrorYAxis: n.mirrorYAxis,
|
|
166
|
+
straightSegments: n.straightSegments,
|
|
167
|
+
skeleton: n.loading,
|
|
168
|
+
onSeriesClick: d() ? u : void 0
|
|
169
|
+
})), m = x(() => v(c.value, (e, t) => N(e, o.value, t, n.loading))), { chartInstance: h } = l({
|
|
170
|
+
canvasRef: s,
|
|
171
|
+
config: p,
|
|
172
|
+
enabled: x(() => n.loading || n.series.length > 0)
|
|
173
|
+
}), { exportImage: g, handleLegendItemHover: _ } = f({
|
|
174
|
+
chartInstance: h,
|
|
175
|
+
canvasRef: s,
|
|
176
|
+
colorHostElement: o
|
|
177
|
+
});
|
|
178
|
+
return r({ exportImage: g }), (r, i) => (k(), w("div", {
|
|
179
|
+
ref_key: "chartRootRef",
|
|
180
|
+
ref: o,
|
|
181
|
+
class: O(["s-ui-chart-multi-line", { "s-ui-chart-multi-line--skeleton": n.loading }])
|
|
182
|
+
}, [T("div", H, [E(A(t), { loading: n.loading }, {
|
|
183
|
+
default: M(() => [T("canvas", {
|
|
184
|
+
ref_key: "chartCanvasRef",
|
|
185
|
+
ref: s,
|
|
186
|
+
class: "s-ui-chart-multi-line__canvas"
|
|
187
|
+
}, null, 512)]),
|
|
188
|
+
_: 1
|
|
189
|
+
}, 8, ["loading"])]), m.value.length ? (k(), S(A(e), {
|
|
190
|
+
key: 0,
|
|
191
|
+
items: m.value,
|
|
192
|
+
disabled: n.loading,
|
|
193
|
+
interactive: !n.loading,
|
|
194
|
+
onItemHover: A(_)
|
|
195
|
+
}, null, 8, [
|
|
196
|
+
"items",
|
|
197
|
+
"disabled",
|
|
198
|
+
"interactive",
|
|
199
|
+
"onItemHover"
|
|
200
|
+
])) : C("", !0)], 2));
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
//#endregion
|
|
204
|
+
export { U as t };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as f } from "./
|
|
3
|
-
import { t as p } from "./
|
|
1
|
+
import { t as e } from "./SChartLegend-oZoF8XK7.js";
|
|
2
|
+
import { C as t, S as n, a as r, g as i, i as a, n as o, o as s, r as c, t as l, v as u, w as d, y as f } from "./useChartInteractivity-BATdT86l.js";
|
|
3
|
+
import { t as p } from "./resolveSeriesPaletteColor-DcLSyk-D.js";
|
|
4
4
|
import { t as m } from "./useHasListener-RSjlUyqH.js";
|
|
5
5
|
import { computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createVNode as b, defineComponent as x, normalizeClass as S, openBlock as C, unref as w, useTemplateRef as T, withCtx as E } from "vue";
|
|
6
6
|
//#region src/utils/chart/pie/resolvePieSliceColor.ts
|
|
7
|
-
var D = (e, n, r
|
|
8
|
-
palette:
|
|
9
|
-
paletteFallback:
|
|
10
|
-
skeletonPalette:
|
|
11
|
-
skeletonFallback:
|
|
7
|
+
var D = (e, t, n, r = !1) => p(e, t, n, r, {
|
|
8
|
+
palette: f,
|
|
9
|
+
paletteFallback: i.piePalette1,
|
|
10
|
+
skeletonPalette: u,
|
|
11
|
+
skeletonFallback: i.pieSkeletonPalette1
|
|
12
12
|
}), O = () => ({
|
|
13
13
|
title: () => "",
|
|
14
14
|
label: (e) => `${e.label ?? ""} – ${e.parsed ?? 0}`
|
|
@@ -18,37 +18,37 @@ var D = (e, n, r, i = !1) => f(e, n, r, i, {
|
|
|
18
18
|
}, P = (e) => !("getCenterPoint" in e) || typeof e.getCenterPoint != "function" ? null : e.getCenterPoint(!1), F = (e) => ({
|
|
19
19
|
id: "pieSegmentBadge",
|
|
20
20
|
afterDatasetsDraw(t) {
|
|
21
|
-
let
|
|
22
|
-
if (!
|
|
23
|
-
let
|
|
24
|
-
|
|
25
|
-
for (let e = 0; e <
|
|
26
|
-
let
|
|
27
|
-
if (
|
|
28
|
-
let e = `${
|
|
29
|
-
N(
|
|
21
|
+
let r = t.getDatasetMeta(0);
|
|
22
|
+
if (!r) return;
|
|
23
|
+
let a = n(i.pieBadgeBackground, e), o = n(i.pieBadgeBorder, e), s = n(i.pieBadgeText, e), { ctx: c } = t;
|
|
24
|
+
c.save(), c.font = M, c.textAlign = "center", c.textBaseline = "middle";
|
|
25
|
+
for (let e = 0; e < r.data.length; e += 1) {
|
|
26
|
+
let n = r.data[e], i = t.data.datasets[0]?.data[e], l = n ? P(n) : null;
|
|
27
|
+
if (n && typeof i == "number" && i > 0 && l) {
|
|
28
|
+
let e = `${i}`, t = c.measureText(e).width + k * 2;
|
|
29
|
+
N(c, l.x - t / 2, l.y - 20 / 2, t, 20, A), c.fillStyle = a, c.fill(), c.lineWidth = j, c.strokeStyle = o, c.stroke(), c.fillStyle = s, c.fillText(e, l.x, l.y);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
c.restore();
|
|
33
33
|
}
|
|
34
|
-
}), I = ({ sliceList:
|
|
35
|
-
if (
|
|
36
|
-
let
|
|
34
|
+
}), I = ({ sliceList: e, colorHostElement: t, skeleton: o = !1, onSliceClick: l }) => {
|
|
35
|
+
if (e.length === 0) return null;
|
|
36
|
+
let u = n(i.pieSegmentBorder, t), d = n(i.tooltipBackground, t), f = n(i.tooltipText, t), p = e.map((e, n) => D(n, t, e.fillColor, o)), m = c({
|
|
37
37
|
kind: "element",
|
|
38
|
-
skeleton:
|
|
39
|
-
colorHostElement:
|
|
40
|
-
onIndexClick:
|
|
38
|
+
skeleton: o,
|
|
39
|
+
colorHostElement: t,
|
|
40
|
+
onIndexClick: l
|
|
41
41
|
});
|
|
42
42
|
return {
|
|
43
43
|
type: "pie",
|
|
44
44
|
data: {
|
|
45
|
-
labels:
|
|
45
|
+
labels: e.map((e) => e.label),
|
|
46
46
|
datasets: [{
|
|
47
|
-
data:
|
|
47
|
+
data: e.map((e) => e.value),
|
|
48
48
|
backgroundColor: p,
|
|
49
49
|
hoverBackgroundColor: p,
|
|
50
|
-
borderColor:
|
|
51
|
-
hoverBorderColor:
|
|
50
|
+
borderColor: u,
|
|
51
|
+
hoverBorderColor: u,
|
|
52
52
|
borderWidth: 4,
|
|
53
53
|
hoverBorderWidth: 4,
|
|
54
54
|
hoverOffset: 26,
|
|
@@ -64,14 +64,14 @@ var D = (e, n, r, i = !1) => f(e, n, r, i, {
|
|
|
64
64
|
layout: { padding: 26 },
|
|
65
65
|
onHover: m.onHover,
|
|
66
66
|
onClick: m.onClick,
|
|
67
|
-
interaction: a(
|
|
67
|
+
interaction: a(o, {
|
|
68
68
|
mode: "nearest",
|
|
69
69
|
intersect: !0
|
|
70
70
|
}),
|
|
71
71
|
plugins: {
|
|
72
72
|
legend: { display: !1 },
|
|
73
73
|
tooltip: {
|
|
74
|
-
enabled:
|
|
74
|
+
enabled: r(o),
|
|
75
75
|
backgroundColor: d,
|
|
76
76
|
titleColor: f,
|
|
77
77
|
bodyColor: f,
|
|
@@ -80,7 +80,7 @@ var D = (e, n, r, i = !1) => f(e, n, r, i, {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
|
-
plugins:
|
|
83
|
+
plugins: s(o, [F(t), ...m.plugins])
|
|
84
84
|
};
|
|
85
85
|
}, L = [
|
|
86
86
|
"Series 1",
|
|
@@ -113,34 +113,34 @@ var D = (e, n, r, i = !1) => f(e, n, r, i, {
|
|
|
113
113
|
}
|
|
114
114
|
},
|
|
115
115
|
emits: ["sliceClick"],
|
|
116
|
-
setup(
|
|
117
|
-
let a =
|
|
118
|
-
let
|
|
119
|
-
|
|
120
|
-
}, x = m("onSliceClick"), O = h(() => !
|
|
121
|
-
sliceList:
|
|
122
|
-
colorHostElement:
|
|
123
|
-
skeleton:
|
|
124
|
-
onSliceClick: x() ?
|
|
125
|
-
})), k = h(() =>
|
|
126
|
-
label:
|
|
127
|
-
color: D(
|
|
128
|
-
}))), { chartInstance: A } =
|
|
116
|
+
setup(n, { expose: r, emit: i }) {
|
|
117
|
+
let a = i, s = d, c = T("chartRootRef"), u = T("chartCanvasRef"), f = h(() => n.loading ? z : n.slices), p = (e) => {
|
|
118
|
+
let t = n.slices[e];
|
|
119
|
+
t && a("sliceClick", e, t);
|
|
120
|
+
}, x = m("onSliceClick"), O = h(() => !n.loading && n.slices.length === 0 ? null : I({
|
|
121
|
+
sliceList: f.value,
|
|
122
|
+
colorHostElement: c.value,
|
|
123
|
+
skeleton: n.loading,
|
|
124
|
+
onSliceClick: x() ? p : void 0
|
|
125
|
+
})), k = h(() => f.value.map((e, t) => ({
|
|
126
|
+
label: e.label,
|
|
127
|
+
color: D(t, c.value, e.fillColor, n.loading)
|
|
128
|
+
}))), { chartInstance: A } = o({
|
|
129
129
|
canvasRef: u,
|
|
130
130
|
config: O,
|
|
131
|
-
enabled: h(() =>
|
|
132
|
-
}), { exportImage: j, handleLegendItemHover: M } =
|
|
131
|
+
enabled: h(() => n.loading || n.slices.length > 0)
|
|
132
|
+
}), { exportImage: j, handleLegendItemHover: M } = l({
|
|
133
133
|
chartInstance: A,
|
|
134
134
|
canvasRef: u,
|
|
135
|
-
colorHostElement:
|
|
135
|
+
colorHostElement: c,
|
|
136
136
|
legendDimKind: "element"
|
|
137
137
|
});
|
|
138
|
-
return
|
|
138
|
+
return r({ exportImage: j }), (r, i) => (C(), v("div", {
|
|
139
139
|
ref_key: "chartRootRef",
|
|
140
|
-
ref:
|
|
141
|
-
class: S(["s-ui-chart-pie", { "s-ui-chart-pie--skeleton":
|
|
142
|
-
}, [y("div", B, [b(w(
|
|
143
|
-
loading:
|
|
140
|
+
ref: c,
|
|
141
|
+
class: S(["s-ui-chart-pie", { "s-ui-chart-pie--skeleton": n.loading }])
|
|
142
|
+
}, [y("div", B, [b(w(t), {
|
|
143
|
+
loading: n.loading,
|
|
144
144
|
type: w(s).PIE
|
|
145
145
|
}, {
|
|
146
146
|
default: E(() => [y("canvas", {
|
|
@@ -149,11 +149,11 @@ var D = (e, n, r, i = !1) => f(e, n, r, i, {
|
|
|
149
149
|
class: "s-ui-chart-pie__canvas"
|
|
150
150
|
}, null, 512)]),
|
|
151
151
|
_: 1
|
|
152
|
-
}, 8, ["loading", "type"])]), k.value.length ? (C(), g(w(
|
|
152
|
+
}, 8, ["loading", "type"])]), k.value.length ? (C(), g(w(e), {
|
|
153
153
|
key: 0,
|
|
154
154
|
items: k.value,
|
|
155
|
-
disabled:
|
|
156
|
-
interactive: !
|
|
155
|
+
disabled: n.loading,
|
|
156
|
+
interactive: !n.loading,
|
|
157
157
|
direction: "column",
|
|
158
158
|
onItemHover: w(M)
|
|
159
159
|
}, null, 8, [
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./SChartLegend-DGtjd6zV.cjs"),t=require("./useChartInteractivity-CXSdHPOw.cjs"),n=require("./resolveSeriesPaletteColor-B5qoBbXN.cjs"),r=require("./useHasListener-BPgtbbo6.cjs");let i=require("vue");var a=(e,r,i,a=!1)=>n.t(e,r,i,a,{palette:t.y,paletteFallback:t.g.piePalette1,skeletonPalette:t.v,skeletonFallback:t.g.pieSkeletonPalette1}),o=()=>({title:()=>``,label:e=>`${e.label??``} – ${e.parsed??0}`}),s=4,c=4,l=1,u=`400 12px var(--s-ui-font-family-label)`,d=(e,t,n,r,i,a)=>{let o=Math.min(a,r/2,i/2);e.beginPath(),e.moveTo(t+o,n),e.lineTo(t+r-o,n),e.arcTo(t+r,n,t+r,n+o,o),e.lineTo(t+r,n+i-o),e.arcTo(t+r,n+i,t+r-o,n+i,o),e.lineTo(t+o,n+i),e.arcTo(t,n+i,t,n+i-o,o),e.lineTo(t,n+o),e.arcTo(t,n,t+o,n,o),e.closePath()},f=e=>!(`getCenterPoint`in e)||typeof e.getCenterPoint!=`function`?null:e.getCenterPoint(!1),p=e=>({id:`pieSegmentBadge`,afterDatasetsDraw(n){let r=n.getDatasetMeta(0);if(!r)return;let i=t.S(t.g.pieBadgeBackground,e),a=t.S(t.g.pieBadgeBorder,e),o=t.S(t.g.pieBadgeText,e),{ctx:p}=n;p.save(),p.font=u,p.textAlign=`center`,p.textBaseline=`middle`;for(let e=0;e<r.data.length;e+=1){let t=r.data[e],u=n.data.datasets[0]?.data[e],m=t?f(t):null;if(t&&typeof u==`number`&&u>0&&m){let e=`${u}`,t=p.measureText(e).width+s*2;d(p,m.x-t/2,m.y-20/2,t,20,c),p.fillStyle=i,p.fill(),p.lineWidth=l,p.strokeStyle=a,p.stroke(),p.fillStyle=o,p.fillText(e,m.x,m.y)}}p.restore()}}),m=({sliceList:e,colorHostElement:n,skeleton:r=!1,onSliceClick:i})=>{if(e.length===0)return null;let s=t.S(t.g.pieSegmentBorder,n),c=t.S(t.g.tooltipBackground,n),l=t.S(t.g.tooltipText,n),u=e.map((e,t)=>a(t,n,e.fillColor,r)),d=t.r({kind:`element`,skeleton:r,colorHostElement:n,onIndexClick:i});return{type:`pie`,data:{labels:e.map(e=>e.label),datasets:[{data:e.map(e=>e.value),backgroundColor:u,hoverBackgroundColor:u,borderColor:s,hoverBorderColor:s,borderWidth:4,hoverBorderWidth:4,hoverOffset:26,spacing:0,borderRadius:8}]},options:{responsive:!0,maintainAspectRatio:!0,cutout:`58%`,rotation:115,layout:{padding:26},onHover:d.onHover,onClick:d.onClick,interaction:t.i(r,{mode:`nearest`,intersect:!0}),plugins:{legend:{display:!1},tooltip:{enabled:t.a(r),backgroundColor:c,titleColor:l,bodyColor:l,displayColors:!1,callbacks:o()}}},plugins:t.o(r,[p(n),...d.plugins])}},h=[`Series 1`,`Series 2`,`Series 3`,`Series 4`,`Series 5`,`Series 6`,`Series 7`,`Series 8`],g=[4,1,1,1,1,1,1,1],_=h.map((e,t)=>({label:e,value:g[t]??1})),v={class:`s-ui-chart-pie__canvas-wrap`},y=(0,i.defineComponent)({__name:`SChartPie`,props:{slices:{default:()=>[]},loading:{type:Boolean,default:!1}},emits:[`sliceClick`],setup(n,{expose:o,emit:s}){let c=s,l=t.w,u=(0,i.useTemplateRef)(`chartRootRef`),d=(0,i.useTemplateRef)(`chartCanvasRef`),f=(0,i.computed)(()=>n.loading?_:n.slices),p=e=>{let t=n.slices[e];t&&c(`sliceClick`,e,t)},h=r.t(`onSliceClick`),g=(0,i.computed)(()=>!n.loading&&n.slices.length===0?null:m({sliceList:f.value,colorHostElement:u.value,skeleton:n.loading,onSliceClick:h()?p:void 0})),y=(0,i.computed)(()=>f.value.map((e,t)=>({label:e.label,color:a(t,u.value,e.fillColor,n.loading)}))),{chartInstance:b}=t.n({canvasRef:d,config:g,enabled:(0,i.computed)(()=>n.loading||n.slices.length>0)}),{exportImage:x,handleLegendItemHover:S}=t.t({chartInstance:b,canvasRef:d,colorHostElement:u,legendDimKind:`element`});return o({exportImage:x}),(r,a)=>((0,i.openBlock)(),(0,i.createElementBlock)(`div`,{ref_key:`chartRootRef`,ref:u,class:(0,i.normalizeClass)([`s-ui-chart-pie`,{"s-ui-chart-pie--skeleton":n.loading}])},[(0,i.createElementVNode)(`div`,v,[(0,i.createVNode)((0,i.unref)(t.C),{loading:n.loading,type:(0,i.unref)(l).PIE},{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`canvas`,{ref_key:`chartCanvasRef`,ref:d,class:`s-ui-chart-pie__canvas`},null,512)]),_:1},8,[`loading`,`type`])]),y.value.length?((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(e.t),{key:0,items:y.value,disabled:n.loading,interactive:!n.loading,direction:`column`,onItemHover:(0,i.unref)(S)},null,8,[`items`,`disabled`,`interactive`,`onItemHover`])):(0,i.createCommentVNode)(``,!0)],2))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return y}});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as e, S as t, a as n, g as r, i, l as a, n as o, t as s } from "./useChartInteractivity-BATdT86l.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 =
|
|
17
|
+
}, C = .3, w = 1, T = ({ labels: e, progressValues: o, referenceValues: s, seriesLabel: c, valuePrefix: l, minValue: u, maxValue: d, stepSize: f, progressSnapshotCount: p, colorHostElement: m, skeleton: h = !1 }) => {
|
|
18
|
+
let g = t(r.axisLabel, m), _ = t(r.grid, m), v = t(h ? r.skeletonSeries : r.progressLine, m), y = t(h ? r.skeletonFillStart : r.referenceFill, m), b = t(r.tooltipBackground, m), T = t(r.tooltipText, m), E = C, D = x(p), O = S(p);
|
|
19
19
|
return {
|
|
20
20
|
type: "line",
|
|
21
21
|
data: {
|
|
22
|
-
labels:
|
|
22
|
+
labels: e,
|
|
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: o,
|
|
35
35
|
borderColor: v,
|
|
36
36
|
backgroundColor: v,
|
|
37
37
|
tension: E,
|
|
@@ -47,15 +47,15 @@ var v = 4, y = 12, b = 24, x = (e) => {
|
|
|
47
47
|
options: {
|
|
48
48
|
responsive: !0,
|
|
49
49
|
maintainAspectRatio: !1,
|
|
50
|
-
interaction:
|
|
50
|
+
interaction: i(h, O),
|
|
51
51
|
plugins: {
|
|
52
52
|
legend: { display: !1 },
|
|
53
53
|
tooltip: {
|
|
54
|
-
enabled:
|
|
54
|
+
enabled: n(h),
|
|
55
55
|
backgroundColor: b,
|
|
56
56
|
titleColor: T,
|
|
57
57
|
bodyColor: T,
|
|
58
|
-
position:
|
|
58
|
+
position: a,
|
|
59
59
|
filter: (e) => e.datasetIndex === w,
|
|
60
60
|
callbacks: { label: (e) => {
|
|
61
61
|
let t = e.parsed.y;
|
|
@@ -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(t, { expose: n }) {
|
|
170
|
+
let r = g("chartRootRef"), i = g("chartCanvasRef"), a = c(() => t.minValue ?? 0), f = c(() => t.maxValue ?? 100), v = c(() => t.prefix ?? "%"), y = c(() => t.loading ? k : t.progressSnapshots), b = c(() => O({
|
|
171
171
|
progressSnapshots: y.value,
|
|
172
|
-
deadline:
|
|
173
|
-
minValue:
|
|
174
|
-
maxValue:
|
|
175
|
-
})), { chartInstance: x } =
|
|
176
|
-
canvasRef:
|
|
177
|
-
config: c(() => !
|
|
172
|
+
deadline: t.loading ? "2026-06-28" : t.deadline,
|
|
173
|
+
minValue: t.loading ? 0 : a.value,
|
|
174
|
+
maxValue: t.loading ? 100 : f.value
|
|
175
|
+
})), { chartInstance: x } = o({
|
|
176
|
+
canvasRef: i,
|
|
177
|
+
config: c(() => !t.loading && t.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: t.seriesLabel,
|
|
182
182
|
valuePrefix: v.value,
|
|
183
183
|
minValue: b.value.minValue,
|
|
184
184
|
maxValue: b.value.maxValue,
|
|
185
|
-
stepSize:
|
|
185
|
+
stepSize: t.loading ? 25 : b.value.stepSize,
|
|
186
186
|
progressSnapshotCount: b.value.progressSnapshotCount,
|
|
187
|
-
colorHostElement:
|
|
188
|
-
skeleton:
|
|
187
|
+
colorHostElement: r.value,
|
|
188
|
+
skeleton: t.loading
|
|
189
189
|
})),
|
|
190
|
-
enabled: c(() =>
|
|
191
|
-
}), { exportImage: S } =
|
|
190
|
+
enabled: c(() => t.loading || t.progressSnapshots.length > 0)
|
|
191
|
+
}), { exportImage: S } = s({
|
|
192
192
|
chartInstance: x,
|
|
193
|
-
canvasRef:
|
|
194
|
-
colorHostElement:
|
|
193
|
+
canvasRef: i,
|
|
194
|
+
colorHostElement: r
|
|
195
195
|
});
|
|
196
|
-
return n({ exportImage: S }), (
|
|
196
|
+
return n({ exportImage: S }), (n, a) => (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: r,
|
|
199
|
+
class: p(["s-ui-chart-progress", { "s-ui-chart-progress--skeleton": t.loading }])
|
|
200
|
+
}, [u("div", A, [d(h(e), { loading: t.loading }, {
|
|
201
201
|
default: _(() => [u("canvas", {
|
|
202
202
|
ref_key: "chartCanvasRef",
|
|
203
|
-
ref:
|
|
203
|
+
ref: i,
|
|
204
204
|
class: "s-ui-chart-progress__canvas"
|
|
205
205
|
}, null, 512)]),
|
|
206
206
|
_: 1
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./useChartInteractivity-CXSdHPOw.cjs");let t=require("vue");var n=4,r=12,i=24,a=e=>{let t=e<=15;return{pointRadius:t?n:0,pointHoverRadius:n,pointHitRadius:t?r:i}},o=e=>e<=15?{mode:`nearest`,intersect:!0}:{mode:`nearest`,axis:`x`,intersect:!1},s=.3,c=1,l=({labels:t,progressValues:n,referenceValues:r,seriesLabel:i,valuePrefix:l,minValue:u,maxValue:d,stepSize:f,progressSnapshotCount:p,colorHostElement:m,skeleton:h=!1})=>{let g=e.S(e.g.axisLabel,m),_=e.S(e.g.grid,m),v=e.S(h?e.g.skeletonSeries:e.g.progressLine,m),y=e.S(h?e.g.skeletonFillStart:e.g.referenceFill,m),b=e.S(e.g.tooltipBackground,m),x=e.S(e.g.tooltipText,m),S=s,C=a(p),w=o(p);return{type:`line`,data:{labels:t,datasets:[{data:r,borderColor:`transparent`,backgroundColor:y,pointRadius:0,pointHoverRadius:0,pointHitRadius:0,fill:`start`,order:0},{label:i,data:n,borderColor:v,backgroundColor:v,tension:S,pointRadius:C.pointRadius,pointHoverRadius:C.pointHoverRadius,pointHitRadius:C.pointHitRadius,pointBackgroundColor:v,pointBorderColor:v,fill:!1,order:1}]},options:{responsive:!0,maintainAspectRatio:!1,interaction:e.i(h,w),plugins:{legend:{display:!1},tooltip:{enabled:e.a(h),backgroundColor:b,titleColor:x,bodyColor:x,position:e.l,filter:e=>e.datasetIndex===c,callbacks:{label:e=>{let t=e.parsed.y;return t===null?``:`${t}${l}`}}}},scales:{x:{type:`category`,border:{display:!1},grid:{color:_,drawTicks:!0},ticks:{color:g,font:{family:`var(--s-ui-font-family-label)`,size:10,weight:500},padding:8}},y:{type:`linear`,min:u,max:d,border:{display:!1},grid:{color:_,drawTicks:!0},ticks:{color:g,stepSize:f,callback:e=>`${e}${l}`,font:{family:`var(--s-ui-font-family-label)`,size:10,weight:500},padding:8}}}}}},u=e=>{let t=e.match(/^(\d{4})-(\d{2})-(\d{2})/);return t?`${t[3]}.${t[2]}.${t[1]}`:e},d=e=>Math.round(e*10)/10,f=({progressSnapshots:e,deadline:t=null,minValue:n=0,maxValue:r=100})=>{let i=e.map(e=>u(e.date)),a=e.map(e=>e.progress),o=t?u(t):null,s=a.length===1?[``,i[0]??``,``]:o?[...i,o]:i,c=a.length===1?[null,a[0]??null,null]:o?[...a,null]:a,l=s.length;return{labels:s,progressValues:c,referenceValues:l===0?[]:l===1?[n]:Array.from({length:l},(e,t)=>d(n+t*((r-n)/(l-1)))),minValue:n,maxValue:r,stepSize:d((r-n)/4),progressSnapshotCount:e.length}},p=[{date:`2025-11-01`,progress:20},{date:`2025-12-01`,progress:35},{date:`2026-01-01`,progress:42},{date:`2026-02-01`,progress:58},{date:`2026-03-01`,progress:71},{date:`2026-04-01`,progress:84}],m={class:`s-ui-chart-progress__canvas-wrap`},h=(0,t.defineComponent)({__name:`SChartProgress`,props:{progressSnapshots:{default:()=>[]},deadline:{default:null},minValue:{},maxValue:{},prefix:{},seriesLabel:{default:`Progress`},loading:{type:Boolean,default:!1}},setup(n,{expose:r}){let i=(0,t.useTemplateRef)(`chartRootRef`),a=(0,t.useTemplateRef)(`chartCanvasRef`),o=(0,t.computed)(()=>n.minValue??0),s=(0,t.computed)(()=>n.maxValue??100),c=(0,t.computed)(()=>n.prefix??`%`),u=(0,t.computed)(()=>n.loading?p:n.progressSnapshots),d=(0,t.computed)(()=>f({progressSnapshots:u.value,deadline:n.loading?`2026-06-28`:n.deadline,minValue:n.loading?0:o.value,maxValue:n.loading?100:s.value})),{chartInstance:h}=e.n({canvasRef:a,config:(0,t.computed)(()=>!n.loading&&n.progressSnapshots.length===0?null:l({labels:d.value.labels,progressValues:d.value.progressValues,referenceValues:d.value.referenceValues,seriesLabel:n.seriesLabel,valuePrefix:c.value,minValue:d.value.minValue,maxValue:d.value.maxValue,stepSize:n.loading?25:d.value.stepSize,progressSnapshotCount:d.value.progressSnapshotCount,colorHostElement:i.value,skeleton:n.loading})),enabled:(0,t.computed)(()=>n.loading||n.progressSnapshots.length>0)}),{exportImage:g}=e.t({chartInstance:h,canvasRef:a,colorHostElement:i});return r({exportImage:g}),(r,o)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{ref_key:`chartRootRef`,ref:i,class:(0,t.normalizeClass)([`s-ui-chart-progress`,{"s-ui-chart-progress--skeleton":n.loading}])},[(0,t.createElementVNode)(`div`,m,[(0,t.createVNode)((0,t.unref)(e.C),{loading:n.loading},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`canvas`,{ref_key:`chartCanvasRef`,ref:a,class:`s-ui-chart-progress__canvas`},null,512)]),_:1},8,[`loading`])])],2))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return h}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./SChartLegend-DGtjd6zV.cjs"),t=require("./useChartInteractivity-CXSdHPOw.cjs"),n=require("./buildCartesianChartScales-Dck5yBMo.cjs"),r=require("./resolveStackedChartContext-CQbgdV55.cjs"),i=require("./createChartCrosshairPlugin-DfYzBie2.cjs"),a=require("./resolveSeriesPaletteColor-B5qoBbXN.cjs"),o=require("./buildChartSeriesPoints-Cqo2ed-n.cjs"),s=require("./useHasListener-BPgtbbo6.cjs");let c=require("vue");var l=(e,n,r,i=!1)=>a.t(e,n,r,i,{palette:t.x,paletteFallback:t.g.stackedPalette1,skeletonPalette:t.b,skeletonFallback:t.g.skeletonPalette1}),u=20,d=`stack0`,f=({seriesList:e,colorHostElement:a,yMax:o,yMin:s,yStep:c=u,skeleton:f=!1,totalLabel:p,onSeriesClick:m})=>{let h=r.t({seriesList:e,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=t.r({kind:`series`,skeleton:f,colorHostElement:a,onIndexClick:m});return{type:`line`,data:{labels:S,datasets:e.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:t.i(f,{mode:`index`,intersect:!1}),plugins:{legend:{display:!1},tooltip:{enabled:t.a(f),backgroundColor:v,titleColor:y,bodyColor:y,footerColor:y,displayColors:!1,position:t.s,yAlign:`bottom`,xAlign:`center`,caretPadding:8,callbacks:t.c({total:p})}},scales:n.t({axisLabelColor:g,gridColor:_,yMin:x,yMax:b,yStep:c,stacked:!0})},plugins:t.o(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}=t.n({canvasRef:d,config:g,enabled:(0,c.computed)(()=>n.loading||n.series.length>0)}),{exportImage:x,handleLegendItemHover:S}=t.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)(t.C),{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)(e.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}});
|