@m4l/widgets 0.0.2 → 0.0.3-beta-add-widget-serieschart.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/charts/PieChart/PieChart.d.ts +10 -0
- package/charts/PieChart/PieChart.d.ts.map +1 -0
- package/charts/{Pie/Pie.js → PieChart/PieChart.js} +10 -10
- package/charts/PieChart/PieChart.styles.d.ts +3 -0
- package/charts/PieChart/PieChart.styles.d.ts.map +1 -0
- package/charts/{Pie/Pie.styles.js → PieChart/PieChart.styles.js} +4 -4
- package/charts/PieChart/__tests__/helpers/data.d.ts +14 -0
- package/charts/PieChart/__tests__/helpers/data.d.ts.map +1 -0
- package/charts/PieChart/__tests__/helpers/index.d.ts +7 -0
- package/charts/PieChart/__tests__/helpers/index.d.ts.map +1 -0
- package/charts/PieChart/__tests__/helpers/theme.d.ts +34 -0
- package/charts/PieChart/__tests__/helpers/theme.d.ts.map +1 -0
- package/charts/PieChart/__tests__/helpers/values.d.ts +14 -0
- package/charts/PieChart/__tests__/helpers/values.d.ts.map +1 -0
- package/charts/PieChart/constants.d.ts +2 -0
- package/charts/PieChart/constants.d.ts.map +1 -0
- package/charts/{Pie → PieChart}/constants.js +1 -1
- package/charts/PieChart/helpers/options.d.ts.map +1 -0
- package/charts/PieChart/helpers/remap.d.ts +6 -0
- package/charts/PieChart/helpers/remap.d.ts.map +1 -0
- package/charts/PieChart/helpers/remap.js +16 -0
- package/charts/PieChart/hooks/useChartResize.d.ts.map +1 -0
- package/charts/{Pie → PieChart}/hooks/usePieChartData.d.ts +2 -2
- package/charts/PieChart/hooks/usePieChartData.d.ts.map +1 -0
- package/charts/PieChart/index.d.ts +3 -0
- package/charts/PieChart/index.d.ts.map +1 -0
- package/charts/{Pie/slots/PieEnum.d.ts → PieChart/slots/PieChartEnum.d.ts} +5 -5
- package/charts/PieChart/slots/PieChartEnum.d.ts.map +1 -0
- package/charts/PieChart/slots/PieChartEnum.js +4 -0
- package/charts/{Pie/slots/PieSlots.d.ts → PieChart/slots/PieChartSlots.d.ts} +11 -11
- package/charts/PieChart/slots/PieChartSlots.d.ts.map +1 -0
- package/charts/{Pie/slots/PieSlots.js → PieChart/slots/PieChartSlots.js} +19 -19
- package/charts/PieChart/subcomponents/CustomLegend/CustomLegend.d.ts.map +1 -0
- package/charts/{Pie → PieChart}/subcomponents/CustomLegend/CustomLegend.js +1 -1
- package/charts/PieChart/subcomponents/CustomLegend/types.d.ts.map +1 -0
- package/charts/{Pie → PieChart}/types.d.ts +12 -12
- package/charts/PieChart/types.d.ts.map +1 -0
- package/charts/SeriesChart/SeriesChart.d.ts +10 -0
- package/charts/SeriesChart/SeriesChart.d.ts.map +1 -0
- package/charts/SeriesChart/SeriesChart.js +24 -0
- package/charts/SeriesChart/SeriesChart.styles.d.ts +3 -0
- package/charts/SeriesChart/SeriesChart.styles.d.ts.map +1 -0
- package/charts/SeriesChart/SeriesChart.styles.js +32 -0
- package/charts/SeriesChart/__tests__/helpers/index.d.ts +15 -0
- package/charts/SeriesChart/__tests__/helpers/index.d.ts.map +1 -0
- package/charts/SeriesChart/__tests__/helpers/theme.d.ts +31 -0
- package/charts/SeriesChart/__tests__/helpers/theme.d.ts.map +1 -0
- package/charts/SeriesChart/__tests__/helpers/tooltip.d.ts +10 -0
- package/charts/SeriesChart/__tests__/helpers/tooltip.d.ts.map +1 -0
- package/charts/SeriesChart/__tests__/helpers/types.d.ts +12 -0
- package/charts/SeriesChart/__tests__/helpers/types.d.ts.map +1 -0
- package/charts/SeriesChart/__tests__/helpers/values.d.ts +45 -0
- package/charts/SeriesChart/__tests__/helpers/values.d.ts.map +1 -0
- package/charts/SeriesChart/constants.d.ts +2 -0
- package/charts/SeriesChart/constants.d.ts.map +1 -0
- package/charts/SeriesChart/constants.js +4 -0
- package/charts/SeriesChart/helpers/options.d.ts +7 -0
- package/charts/SeriesChart/helpers/options.d.ts.map +1 -0
- package/charts/SeriesChart/helpers/options.js +227 -0
- package/charts/SeriesChart/helpers/tooltipFormatter.d.ts +6 -0
- package/charts/SeriesChart/helpers/tooltipFormatter.d.ts.map +1 -0
- package/charts/SeriesChart/helpers/tooltipFormatter.js +85 -0
- package/charts/SeriesChart/hooks/useChartResize.d.ts +8 -0
- package/charts/SeriesChart/hooks/useChartResize.d.ts.map +1 -0
- package/charts/SeriesChart/hooks/useChartResize.js +17 -0
- package/charts/SeriesChart/index.d.ts +3 -0
- package/charts/SeriesChart/index.d.ts.map +1 -0
- package/charts/SeriesChart/slots/SeriesChartEnum.d.ts +18 -0
- package/charts/SeriesChart/slots/SeriesChartEnum.d.ts.map +1 -0
- package/charts/SeriesChart/slots/SeriesChartEnum.js +4 -0
- package/charts/SeriesChart/slots/SeriesChartSlots.d.ts +28 -0
- package/charts/SeriesChart/slots/SeriesChartSlots.d.ts.map +1 -0
- package/charts/SeriesChart/slots/SeriesChartSlots.js +54 -0
- package/charts/SeriesChart/types.d.ts +59 -0
- package/charts/SeriesChart/types.d.ts.map +1 -0
- package/charts/index.d.ts +2 -1
- package/charts/index.d.ts.map +1 -1
- package/index.js +4 -2
- package/package.json +3 -2
- package/tools/color.d.ts +10 -0
- package/tools/color.d.ts.map +1 -0
- package/tools/color.js +17 -0
- package/charts/Pie/Pie.d.ts +0 -10
- package/charts/Pie/Pie.d.ts.map +0 -1
- package/charts/Pie/Pie.styles.d.ts +0 -3
- package/charts/Pie/Pie.styles.d.ts.map +0 -1
- package/charts/Pie/constants.d.ts +0 -2
- package/charts/Pie/constants.d.ts.map +0 -1
- package/charts/Pie/helpers/options.d.ts.map +0 -1
- package/charts/Pie/helpers/remap.d.ts +0 -6
- package/charts/Pie/helpers/remap.d.ts.map +0 -1
- package/charts/Pie/helpers/remap.js +0 -19
- package/charts/Pie/hooks/useChartResize.d.ts.map +0 -1
- package/charts/Pie/hooks/usePieChartData.d.ts.map +0 -1
- package/charts/Pie/index.d.ts +0 -3
- package/charts/Pie/index.d.ts.map +0 -1
- package/charts/Pie/slots/PieEnum.d.ts.map +0 -1
- package/charts/Pie/slots/PieEnum.js +0 -4
- package/charts/Pie/slots/PieSlots.d.ts.map +0 -1
- package/charts/Pie/subcomponents/CustomLegend/CustomLegend.d.ts.map +0 -1
- package/charts/Pie/subcomponents/CustomLegend/types.d.ts.map +0 -1
- package/charts/Pie/types.d.ts.map +0 -1
- /package/charts/{Pie → PieChart}/helpers/options.d.ts +0 -0
- /package/charts/{Pie → PieChart}/helpers/options.js +0 -0
- /package/charts/{Pie → PieChart}/hooks/useChartResize.d.ts +0 -0
- /package/charts/{Pie → PieChart}/hooks/useChartResize.js +0 -0
- /package/charts/{Pie → PieChart}/hooks/usePieChartData.js +0 -0
- /package/charts/{Pie → PieChart}/subcomponents/CustomLegend/CustomLegend.d.ts +0 -0
- /package/charts/{Pie → PieChart}/subcomponents/CustomLegend/types.d.ts +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PieChartProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* PieChart component for the pie chart.
|
|
4
|
+
* @param values - Values for the chart
|
|
5
|
+
* @param size - Component size
|
|
6
|
+
* @returns PieChart component
|
|
7
|
+
*/
|
|
8
|
+
export declare function PieChart({ values, size }: PieChartProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default PieChart;
|
|
10
|
+
//# sourceMappingURL=PieChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PieChart.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/charts/PieChart/PieChart.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAsB,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAUjE;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,aAAa,oDAoCvD;AAED,eAAe,QAAQ,CAAC"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as t, jsxs as o } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { CustomLegend as
|
|
5
|
-
import {
|
|
2
|
+
import l from "echarts-for-react";
|
|
3
|
+
import { useRef as m } from "react";
|
|
4
|
+
import { CustomLegend as d } from "./subcomponents/CustomLegend/CustomLegend.js";
|
|
5
|
+
import { PieChartRootStyled as f, PieChartParentStyled as c, ChartContainerStyled as p, LegendContainerStyled as u } from "./slots/PieChartSlots.js";
|
|
6
6
|
import { usePieChartData as C } from "./hooks/usePieChartData.js";
|
|
7
7
|
import { useChartResize as g } from "./hooks/useChartResize.js";
|
|
8
8
|
function z({ values: n, size: i }) {
|
|
9
|
-
const e =
|
|
9
|
+
const e = m(null), { data: r, options: a } = C(n), h = g(e), s = {
|
|
10
10
|
length: r.length
|
|
11
11
|
};
|
|
12
12
|
return /* @__PURE__ */ t(f, { children: /* @__PURE__ */ o(c, { children: [
|
|
13
|
-
/* @__PURE__ */ t(p, { ref:
|
|
14
|
-
|
|
13
|
+
/* @__PURE__ */ t(p, { ref: h, children: /* @__PURE__ */ t(
|
|
14
|
+
l,
|
|
15
15
|
{
|
|
16
16
|
ref: e,
|
|
17
17
|
option: a,
|
|
@@ -20,9 +20,9 @@ function z({ values: n, size: i }) {
|
|
|
20
20
|
lazyUpdate: !0
|
|
21
21
|
}
|
|
22
22
|
) }),
|
|
23
|
-
/* @__PURE__ */ o(u, { ownerState:
|
|
23
|
+
/* @__PURE__ */ o(u, { ownerState: s, children: [
|
|
24
24
|
/* @__PURE__ */ t(
|
|
25
|
-
|
|
25
|
+
d,
|
|
26
26
|
{
|
|
27
27
|
data: r,
|
|
28
28
|
size: i
|
|
@@ -33,6 +33,6 @@ function z({ values: n, size: i }) {
|
|
|
33
33
|
] }) });
|
|
34
34
|
}
|
|
35
35
|
export {
|
|
36
|
-
z as
|
|
36
|
+
z as PieChart,
|
|
37
37
|
z as default
|
|
38
38
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PieChart.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/charts/PieChart/PieChart.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAK9C,eAAO,MAAM,cAAc,EAAE,cAkN5B,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { getTypographyStyles as i } from "@m4l/components";
|
|
2
|
-
const
|
|
2
|
+
const n = {
|
|
3
3
|
/**
|
|
4
4
|
* ***************************************************************
|
|
5
5
|
* Root container: container query context for responsive layout.
|
|
6
6
|
* ***************************************************************
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
pieChartRoot: () => ({
|
|
9
9
|
containerName: "root",
|
|
10
10
|
containerType: "size",
|
|
11
11
|
width: "100%",
|
|
@@ -16,7 +16,7 @@ const a = {
|
|
|
16
16
|
* Inner flex container wrapping the chart and the legend.
|
|
17
17
|
* ******************************************************************
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
pieChartParent: () => ({
|
|
20
20
|
display: "flex",
|
|
21
21
|
flexFlow: "row wrap",
|
|
22
22
|
justifyContent: "center",
|
|
@@ -190,5 +190,5 @@ const a = {
|
|
|
190
190
|
})
|
|
191
191
|
};
|
|
192
192
|
export {
|
|
193
|
-
|
|
193
|
+
n as pieChartStyles
|
|
194
194
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PieChartData } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Single PieChartData item shape for test overrides.
|
|
4
|
+
*/
|
|
5
|
+
export type PieChartDataItemShape = PieChartData;
|
|
6
|
+
/**
|
|
7
|
+
* Default PieChartData array for options tests (two segments).
|
|
8
|
+
*/
|
|
9
|
+
export declare const defaultPieChartData: PieChartData[];
|
|
10
|
+
/**
|
|
11
|
+
* Factory for PieChartData[] with optional overrides.
|
|
12
|
+
*/
|
|
13
|
+
export declare function createPieChartData(overrides?: Partial<PieChartData>[]): PieChartData[];
|
|
14
|
+
//# sourceMappingURL=data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/widgets/src/charts/PieChart/__tests__/helpers/data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,YAAY,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,YAAY,EAiB7C,CAAC;AAEF;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,GAClC,YAAY,EAAE,CAMhB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/widgets/src/charts/PieChart/__tests__/helpers/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme factory and getters for PieChart options tests.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Creates a theme-like object for ECharts options tests.
|
|
6
|
+
*/
|
|
7
|
+
export declare function createTheme(overrides?: Record<string, unknown>): {
|
|
8
|
+
vars: {
|
|
9
|
+
palette: {
|
|
10
|
+
text: {
|
|
11
|
+
primary: string;
|
|
12
|
+
disabled: string;
|
|
13
|
+
contrastText: string;
|
|
14
|
+
};
|
|
15
|
+
background: {
|
|
16
|
+
base: string;
|
|
17
|
+
default: string;
|
|
18
|
+
neutral: string;
|
|
19
|
+
};
|
|
20
|
+
border: {
|
|
21
|
+
disabled: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Theme ready to pass to generateOptions (typed for tests).
|
|
28
|
+
*/
|
|
29
|
+
export declare function getThemeForOptions(overrides?: Record<string, unknown>): import('@mui/material/styles').Theme;
|
|
30
|
+
/**
|
|
31
|
+
* Empty theme for testing theme fallbacks in generateOptions.
|
|
32
|
+
*/
|
|
33
|
+
export declare const emptyTheme: import('@mui/material/styles').Theme;
|
|
34
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/widgets/src/charts/PieChart/__tests__/helpers/theme.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,wBAAgB,WAAW,CAAC,SAAS,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM;;;;;;;;;;;;;;;;;;EAWlE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GACvC,OAAO,sBAAsB,EAAE,KAAK,CACtE;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,EAAS,OAAO,sBAAsB,EAAE,KAAK,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PieChartValueItem } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Default values for PieChart (two segments).
|
|
4
|
+
*/
|
|
5
|
+
export declare const defaultPieChartValues: PieChartValueItem[];
|
|
6
|
+
/**
|
|
7
|
+
* Minimal single-segment values for render tests.
|
|
8
|
+
*/
|
|
9
|
+
export declare const minimalPieChartValues: PieChartValueItem[];
|
|
10
|
+
/**
|
|
11
|
+
* Factory for PieChartValueItem[] with optional per-item overrides.
|
|
12
|
+
*/
|
|
13
|
+
export declare function createPieChartValues(overrides?: Partial<PieChartValueItem>[]): PieChartValueItem[];
|
|
14
|
+
//# sourceMappingURL=values.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"values.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/widgets/src/charts/PieChart/__tests__/helpers/values.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,iBAAiB,EAGpD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,iBAAiB,EAEpD,CAAC;AAEF;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,EAAE,GACvC,iBAAiB,EAAE,CAIrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/charts/PieChart/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/widgets/src/charts/PieChart/helpers/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE7C;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,KAAK;;;;;;;;;;;YAsBxD,oDAAoD;iCACtB,GAAG,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAD3C,oDAAoD;;;;EAuE7D;AAED,eAAO,MAAM,cAAc;;;;;;CAM1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remap.d.ts","sourceRoot":"","sources":["../../../../../../../packages/widgets/src/charts/PieChart/helpers/remap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG5D;;GAEG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,YAAY,EAAE,CAazE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { getColorHexFromToken as e } from "../../../tools/color.js";
|
|
2
|
+
function t(r) {
|
|
3
|
+
return r.map((o) => ({
|
|
4
|
+
name: o.title,
|
|
5
|
+
value: o.r,
|
|
6
|
+
valueFormatted: o.v,
|
|
7
|
+
itemStyle: {
|
|
8
|
+
color: e(o.palletColor, "contained", "backgroundColorTone")
|
|
9
|
+
},
|
|
10
|
+
colorName: o.palletColor,
|
|
11
|
+
lenght: r.length
|
|
12
|
+
}));
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
t as remapData
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useChartResize.d.ts","sourceRoot":"","sources":["../../../../../../../packages/widgets/src/charts/PieChart/hooks/useChartResize.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAGlD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,YAAY,GAAG,IAAI,CAAC,yCAoB5E"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PieChartProps } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* Returns the remapped pie chart data and ECharts options for the given values and current theme.
|
|
4
4
|
*/
|
|
5
|
-
export declare function usePieChartData(values:
|
|
5
|
+
export declare function usePieChartData(values: PieChartProps['values']): {
|
|
6
6
|
data: import('..').PieChartData[];
|
|
7
7
|
options: {
|
|
8
8
|
baseOption: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePieChartData.d.ts","sourceRoot":"","sources":["../../../../../../../packages/widgets/src/charts/PieChart/hooks/usePieChartData.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAI9C;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAM9D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/charts/PieChart/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EACV,aAAa,EACb,iBAAiB,EACjB,YAAY,GACb,MAAM,SAAS,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Slot names for the pie chart component.
|
|
3
|
-
* Must match the keys in
|
|
3
|
+
* Must match the keys in PieChart.styles.ts.
|
|
4
4
|
*/
|
|
5
|
-
export declare enum
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
export declare enum PieChartSlots {
|
|
6
|
+
pieChartRoot = "pieChartRoot",
|
|
7
|
+
pieChartParent = "pieChartParent",
|
|
8
8
|
chartContainer = "chartContainer",
|
|
9
9
|
legendContainer = "legendContainer",
|
|
10
10
|
legendItem = "legendItem",
|
|
@@ -15,4 +15,4 @@ export declare enum PieSlots {
|
|
|
15
15
|
legendItemValueBadge = "legendItemValueBadge",
|
|
16
16
|
legendItemCategory = "legendItemCategory"
|
|
17
17
|
}
|
|
18
|
-
//# sourceMappingURL=
|
|
18
|
+
//# sourceMappingURL=PieChartEnum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PieChartEnum.d.ts","sourceRoot":"","sources":["../../../../../../../packages/widgets/src/charts/PieChart/slots/PieChartEnum.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,aAAa;IACvB,YAAY,iBAAiB;IAC7B,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IAEjC,eAAe,oBAAoB;IACnC,UAAU,eAAe;IACzB,eAAe,oBAAoB;IACnC,uBAAuB,4BAA4B;IACnD,0BAA0B,+BAA+B;IACzD,cAAc,mBAAmB;IACjC,oBAAoB,yBAAyB;IAC7C,kBAAkB,uBAAuB;CAC1C"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var n = /* @__PURE__ */ ((e) => (e.pieChartRoot = "pieChartRoot", e.pieChartParent = "pieChartParent", e.chartContainer = "chartContainer", e.legendContainer = "legendContainer", e.legendItem = "legendItem", e.legendItemColor = "legendItemColor", e.legendItemTextContainer = "legendItemTextContainer", e.legendItemTextSubContainer = "legendItemTextSubContainer", e.legendItemName = "legendItemName", e.legendItemValueBadge = "legendItemValueBadge", e.legendItemCategory = "legendItemCategory", e))(n || {});
|
|
2
|
+
export {
|
|
3
|
+
n as PieChartSlots
|
|
4
|
+
};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
ownerState?: (Partial<import('../types').
|
|
1
|
+
export declare const PieChartRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
2
|
+
ownerState?: (Partial<import('../types').PieChartOwnerState> & Record<string, unknown>) | undefined;
|
|
3
3
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
4
|
-
export declare const
|
|
5
|
-
ownerState?: (Partial<import('../types').
|
|
4
|
+
export declare const PieChartParentStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
5
|
+
ownerState?: (Partial<import('../types').PieChartOwnerState> & Record<string, unknown>) | undefined;
|
|
6
6
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
7
7
|
export declare const ChartContainerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
8
|
-
ownerState?: (Partial<import('../types').
|
|
8
|
+
ownerState?: (Partial<import('../types').PieChartOwnerState> & Record<string, unknown>) | undefined;
|
|
9
9
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
10
10
|
export declare const LegendContainerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
11
|
-
ownerState?: (Partial<import('../types').
|
|
11
|
+
ownerState?: (Partial<import('../types').PieChartOwnerState> & Record<string, unknown>) | undefined;
|
|
12
12
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
13
13
|
export declare const LegendItemStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
14
|
-
ownerState?: (Partial<import('../types').
|
|
14
|
+
ownerState?: (Partial<import('../types').PieChartOwnerState> & Record<string, unknown>) | undefined;
|
|
15
15
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
16
16
|
export declare const LegendItemColorStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
17
|
-
ownerState?: (Partial<import('../types').
|
|
17
|
+
ownerState?: (Partial<import('../types').PieChartOwnerState> & Record<string, unknown>) | undefined;
|
|
18
18
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
19
19
|
export declare const LegendItemTextContainerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
20
|
-
ownerState?: (Partial<import('../types').
|
|
20
|
+
ownerState?: (Partial<import('../types').PieChartOwnerState> & Record<string, unknown>) | undefined;
|
|
21
21
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
22
22
|
export declare const LegendItemTextSubContainerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
23
|
-
ownerState?: (Partial<import('../types').
|
|
23
|
+
ownerState?: (Partial<import('../types').PieChartOwnerState> & Record<string, unknown>) | undefined;
|
|
24
24
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
25
25
|
export declare const LegendItemNameStyled: any;
|
|
26
26
|
export declare const LegendItemValueBadgeStyled: any;
|
|
27
27
|
export declare const LegendItemCategoryStyled: any;
|
|
28
|
-
//# sourceMappingURL=
|
|
28
|
+
//# sourceMappingURL=PieChartSlots.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PieChartSlots.d.ts","sourceRoot":"","sources":["../../../../../../../packages/widgets/src/charts/PieChart/slots/PieChartSlots.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,kBAAkB;;6NAGA,CAAC;AAEhC,eAAO,MAAM,oBAAoB;;6NAGA,CAAC;AAElC,eAAO,MAAM,oBAAoB;;6NAGA,CAAC;AAElC,eAAO,MAAM,qBAAqB;;6NAGA,CAAC;AAEnC,eAAO,MAAM,gBAAgB;;6NAGA,CAAC;AAE9B,eAAO,MAAM,qBAAqB;;6NAGA,CAAC;AAEnC,eAAO,MAAM,6BAA6B;;6NAGA,CAAC;AAE3C,eAAO,MAAM,gCAAgC;;6NAGA,CAAC;AAE9C,eAAO,MAAM,oBAAoB,EAAE,GAGF,CAAC;AAElC,eAAO,MAAM,0BAA0B,EAAE,GAGF,CAAC;AAExC,eAAO,MAAM,wBAAwB,EAAE,GAGF,CAAC"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { styled as e } from "@mui/material/styles";
|
|
2
|
-
import { Typography as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { Typography as a } from "@mui/material";
|
|
3
|
+
import { pieChartStyles as t } from "../PieChart.styles.js";
|
|
4
|
+
import { PieChartSlots as n } from "./PieChartEnum.js";
|
|
5
|
+
import { PIE_CHART_KEY_COMPONENT as o } from "../constants.js";
|
|
6
6
|
const g = e("div", {
|
|
7
7
|
name: o,
|
|
8
|
-
slot: n.
|
|
9
|
-
})(t.
|
|
8
|
+
slot: n.pieChartRoot
|
|
9
|
+
})(t.pieChartRoot), C = e("div", {
|
|
10
10
|
name: o,
|
|
11
|
-
slot: n.
|
|
12
|
-
})(t.
|
|
11
|
+
slot: n.pieChartParent
|
|
12
|
+
})(t.pieChartParent), s = e("div", {
|
|
13
13
|
name: o,
|
|
14
14
|
slot: n.chartContainer
|
|
15
|
-
})(t.chartContainer),
|
|
15
|
+
})(t.chartContainer), I = e("div", {
|
|
16
16
|
name: o,
|
|
17
17
|
slot: n.legendContainer
|
|
18
18
|
})(t.legendContainer), y = e("div", {
|
|
@@ -27,26 +27,26 @@ const g = e("div", {
|
|
|
27
27
|
})(t.legendItemTextContainer), p = e("div", {
|
|
28
28
|
name: o,
|
|
29
29
|
slot: n.legendItemTextSubContainer
|
|
30
|
-
})(t.legendItemTextSubContainer),
|
|
30
|
+
})(t.legendItemTextSubContainer), h = e(a, {
|
|
31
31
|
name: o,
|
|
32
32
|
slot: n.legendItemName
|
|
33
|
-
})(t.legendItemName),
|
|
33
|
+
})(t.legendItemName), T = e(a, {
|
|
34
34
|
name: o,
|
|
35
35
|
slot: n.legendItemValueBadge
|
|
36
|
-
})(t.legendItemValueBadge),
|
|
36
|
+
})(t.legendItemValueBadge), v = e(a, {
|
|
37
37
|
name: o,
|
|
38
38
|
slot: n.legendItemCategory
|
|
39
39
|
})(t.legendItemCategory);
|
|
40
40
|
export {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
s as ChartContainerStyled,
|
|
42
|
+
I as LegendContainerStyled,
|
|
43
|
+
v as LegendItemCategoryStyled,
|
|
44
44
|
S as LegendItemColorStyled,
|
|
45
|
-
|
|
45
|
+
h as LegendItemNameStyled,
|
|
46
46
|
y as LegendItemStyled,
|
|
47
47
|
c as LegendItemTextContainerStyled,
|
|
48
48
|
p as LegendItemTextSubContainerStyled,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
g as
|
|
49
|
+
T as LegendItemValueBadgeStyled,
|
|
50
|
+
C as PieChartParentStyled,
|
|
51
|
+
g as PieChartRootStyled
|
|
52
52
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomLegend.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/widgets/src/charts/PieChart/subcomponents/CustomLegend/CustomLegend.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAYjD;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,iBAAiB,sDAiC7D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as d, jsx as n } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { LegendItemStyled as m, LegendItemColorStyled as a, LegendItemTextContainerStyled as g, LegendItemTextSubContainerStyled as c, LegendItemNameStyled as i, LegendItemValueBadgeStyled as S, LegendItemCategoryStyled as h } from "../../slots/
|
|
2
|
+
import { LegendItemStyled as m, LegendItemColorStyled as a, LegendItemTextContainerStyled as g, LegendItemTextSubContainerStyled as c, LegendItemNameStyled as i, LegendItemValueBadgeStyled as S, LegendItemCategoryStyled as h } from "../../slots/PieChartSlots.js";
|
|
3
3
|
function s({ data: r, size: l }) {
|
|
4
4
|
return r.map((e, o) => {
|
|
5
5
|
const t = {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/widgets/src/charts/PieChart/subcomponents/CustomLegend/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,YAAY,EAAE,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAC;CAC3C"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Sizes } from '@m4l/styles';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { PieChartSlots } from './slots/PieChartEnum';
|
|
3
|
+
import { PIE_CHART_KEY_COMPONENT } from './constants';
|
|
4
4
|
import { M4LOverridesStyleRules } from '@m4l/components';
|
|
5
5
|
import { Theme } from '@mui/material/styles';
|
|
6
6
|
/**
|
|
7
|
-
* Item for the
|
|
7
|
+
* Item for the PieChart (API shape).
|
|
8
8
|
*/
|
|
9
|
-
export interface
|
|
9
|
+
export interface PieChartValueItem {
|
|
10
10
|
/** Displays the category name. */
|
|
11
11
|
title: string;
|
|
12
12
|
/** Displays the formatted value of the category. */
|
|
@@ -17,16 +17,16 @@ export interface PieValueItem {
|
|
|
17
17
|
palletColor: string;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
|
-
* Props for the
|
|
20
|
+
* Props for the PieChart component.
|
|
21
21
|
*/
|
|
22
|
-
export interface
|
|
22
|
+
export interface PieChartProps {
|
|
23
23
|
/** Chart values (name, formatted value, numeric value, color). */
|
|
24
|
-
values:
|
|
24
|
+
values: PieChartValueItem[];
|
|
25
25
|
/** Component size. */
|
|
26
26
|
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
|
-
* Data for the
|
|
29
|
+
* Data for the PieChart (name, value, itemStyle).
|
|
30
30
|
*/
|
|
31
31
|
export interface PieChartData {
|
|
32
32
|
/** Displays the category name. */
|
|
@@ -44,12 +44,12 @@ export interface PieChartData {
|
|
|
44
44
|
/** Displays the data length. */
|
|
45
45
|
lenght: number;
|
|
46
46
|
}
|
|
47
|
-
export type
|
|
47
|
+
export type PieChartOwnerState = {
|
|
48
48
|
color?: PieChartData['colorName'];
|
|
49
49
|
length?: PieChartData['lenght'];
|
|
50
|
-
size?:
|
|
50
|
+
size?: PieChartProps['size'];
|
|
51
51
|
selected?: boolean;
|
|
52
52
|
};
|
|
53
|
-
export type
|
|
54
|
-
export type
|
|
53
|
+
export type PieChartSlotsType = keyof typeof PieChartSlots;
|
|
54
|
+
export type PieChartStyles = M4LOverridesStyleRules<PieChartSlotsType, typeof PIE_CHART_KEY_COMPONENT, Theme>;
|
|
55
55
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/charts/PieChart/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,CAAC,EAAE,MAAM,CAAC;IACV,kDAAkD;IAClD,CAAC,EAAE,MAAM,CAAC;IACV,mCAAmC;IACnC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,kEAAkE;IAClE,MAAM,EAAE,iBAAiB,EAAE,CAAC;IAC5B,sBAAsB;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAC;CAC3C;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,cAAc,EAAE,MAAM,CAAC;IACvB,mCAAmC;IACnC,SAAS,EAAE;QACT,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,mCAAmC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;IAClC,MAAM,CAAC,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;IAChC,IAAI,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AACF,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,aAAa,CAAC;AAC3D,MAAM,MAAM,cAAc,GAAG,sBAAsB,CAAC,iBAAiB,EAAE,OAAO,uBAAuB,EAAE,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SeriesChartProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Series chart component.
|
|
4
|
+
* @param values - Chart values
|
|
5
|
+
* @param _size - Component size (reserved for future use)
|
|
6
|
+
* @returns SeriesChart component
|
|
7
|
+
*/
|
|
8
|
+
export declare function SeriesChart({ values, size: _size }: SeriesChartProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default SeriesChart;
|
|
10
|
+
//# sourceMappingURL=SeriesChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SeriesChart.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/charts/SeriesChart/SeriesChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAShD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,gBAAgB,oDAsBpE;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as e } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import s from "echarts-for-react";
|
|
3
|
+
import { useRef as m, useMemo as a } from "react";
|
|
4
|
+
import { SeriesChartRootStyled as f, ChartContainerStyled as h } from "./slots/SeriesChartSlots.js";
|
|
5
|
+
import { useChartResize as p } from "./hooks/useChartResize.js";
|
|
6
|
+
import { useTheme as c } from "@mui/material";
|
|
7
|
+
import { generateOptions as l } from "./helpers/options.js";
|
|
8
|
+
function x({ values: t, size: u }) {
|
|
9
|
+
const r = m(null), o = c(), i = a(() => l(t, o), [t, o]), n = p(r);
|
|
10
|
+
return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(h, { ref: n, children: /* @__PURE__ */ e(
|
|
11
|
+
s,
|
|
12
|
+
{
|
|
13
|
+
ref: r,
|
|
14
|
+
option: i,
|
|
15
|
+
style: { height: "100%", width: "100%" },
|
|
16
|
+
notMerge: !0,
|
|
17
|
+
lazyUpdate: !0
|
|
18
|
+
}
|
|
19
|
+
) }) });
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
x as SeriesChart,
|
|
23
|
+
x as default
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SeriesChart.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/charts/SeriesChart/SeriesChart.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,eAAO,MAAM,iBAAiB,EAAE,iBA6B/B,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
/**
|
|
3
|
+
* Root container: container query context for responsive layout.
|
|
4
|
+
*/
|
|
5
|
+
seriesRoot: () => ({
|
|
6
|
+
containerName: "root",
|
|
7
|
+
containerType: "size",
|
|
8
|
+
width: "100%",
|
|
9
|
+
height: "100%"
|
|
10
|
+
}),
|
|
11
|
+
seriesParent: () => ({}),
|
|
12
|
+
/**
|
|
13
|
+
* Chart container. ReactECharts renders inside.
|
|
14
|
+
*/
|
|
15
|
+
chartContainer: () => ({
|
|
16
|
+
height: "100%",
|
|
17
|
+
width: "100%",
|
|
18
|
+
minWidth: "500px",
|
|
19
|
+
minHeight: "300px"
|
|
20
|
+
}),
|
|
21
|
+
legendContainer: () => ({}),
|
|
22
|
+
legendItem: () => ({}),
|
|
23
|
+
legendItemColor: () => ({}),
|
|
24
|
+
legendItemTextContainer: () => ({}),
|
|
25
|
+
legendItemTextSubContainer: () => ({}),
|
|
26
|
+
legendItemName: () => ({}),
|
|
27
|
+
legendItemValueBadge: () => ({}),
|
|
28
|
+
legendItemCategory: () => ({})
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
e as seriesChartStyles
|
|
32
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type { TooltipParam } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Theme helpers.
|
|
4
|
+
*/
|
|
5
|
+
export { createTheme, getThemeForOptions, emptyTheme, } from './theme';
|
|
6
|
+
/**
|
|
7
|
+
* Values helpers.
|
|
8
|
+
*/
|
|
9
|
+
export { barSeriesItem, defaultSeriesChartValues, lineSeriesItem, minimalSeriesChartValues, multiAxisSeriesChartValues, oneRowValues, oneRowValuesWithUnit, scatterSeriesItem, singleYAxis, threeAxisSeriesChartValues, twoRowsTooltipValues, createSeriesChartValues, } from './values';
|
|
10
|
+
export type { SeriesItemShape } from './values';
|
|
11
|
+
/**
|
|
12
|
+
* Tooltip helpers.
|
|
13
|
+
*/
|
|
14
|
+
export { createTooltipParam, createTooltipParams, } from './tooltip';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/widgets/src/charts/SeriesChart/__tests__/helpers/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C;;GAEG;AACH,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,UAAU,GACX,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,OAAO,EACL,aAAa,EACb,wBAAwB,EACxB,cAAc,EACd,wBAAwB,EACxB,0BAA0B,EAC1B,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,EACjB,WAAW,EACX,0BAA0B,EAC1B,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD;;GAEG;AACH,OAAO,EACL,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,WAAW,CAAC"}
|