@codezee/sixtify-brahma 0.2.97 → 0.2.98
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/package.json +2 -2
- package/packages/shared-components/dist/Charts/BarChart.d.ts +6 -7
- package/packages/shared-components/dist/Charts/BarChart.d.ts.map +1 -1
- package/packages/shared-components/dist/Charts/BarChart.js +2 -2
- package/packages/shared-components/dist/Charts/LineChart.d.ts +6 -6
- package/packages/shared-components/dist/Charts/LineChart.d.ts.map +1 -1
- package/packages/shared-components/dist/Charts/LineChart.js +4 -2
- package/packages/shared-components/dist/Charts/PieChart.d.ts +5 -3
- package/packages/shared-components/dist/Charts/PieChart.d.ts.map +1 -1
- package/packages/shared-components/dist/Charts/PieChart.js +10 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codezee/sixtify-brahma",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.98",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/hardikranpariya/sixtify-brahma.git"
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@mui/icons-material": "^5.15.20",
|
|
58
58
|
"@mui/material": "^5.15.20",
|
|
59
59
|
"@mui/styled-engine-sc": "6.0.0-alpha.18",
|
|
60
|
-
"@mui/x-charts": "^
|
|
60
|
+
"@mui/x-charts": "^8.12.0",
|
|
61
61
|
"@mui/x-data-grid": "^7.6.2",
|
|
62
62
|
"@mui/x-date-pickers": "^7.8.0",
|
|
63
63
|
"@tanstack/react-query": "^5.48.0",
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Theme } from "@mui/material/styles";
|
|
2
|
+
import type { BarSeriesType, ChartsTooltipProps } from "@mui/x-charts";
|
|
2
3
|
import type { BarChartProps as MuiBarChartProps } from "@mui/x-charts/BarChart";
|
|
3
|
-
|
|
4
|
-
import type { MakeOptional } from "@mui/x-charts/internals";
|
|
5
|
-
type ExtendedBarSeriesType = MakeOptional<BarSeriesType, "type"> & {
|
|
4
|
+
type ExtendedBarSeriesType = Partial<BarSeriesType> & {
|
|
6
5
|
color?: string;
|
|
7
6
|
colorMap?: {
|
|
8
7
|
[key: string]: string;
|
|
@@ -19,9 +18,9 @@ type BarChartProps = Omit<MuiBarChartProps, "series"> & {
|
|
|
19
18
|
height?: MuiBarChartProps["height"];
|
|
20
19
|
width?: MuiBarChartProps["width"];
|
|
21
20
|
skipAnimation?: boolean;
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
tooltip?: ChartsTooltipProps["trigger"];
|
|
22
|
+
theme?: Theme;
|
|
24
23
|
};
|
|
25
|
-
export declare const BarChart: ({ height, width, skipAnimation, loading, tooltip, series, layout, margin,
|
|
24
|
+
export declare const BarChart: ({ height, width, skipAnimation, loading, tooltip, series, layout, margin, ...rest }: BarChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
25
|
export {};
|
|
27
26
|
//# sourceMappingURL=BarChart.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BarChart.d.ts","sourceRoot":"","sources":["../../src/Charts/BarChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BarChart.d.ts","sourceRoot":"","sources":["../../src/Charts/BarChart.tsx"],"names":[],"mappings":"AACA,OAAO,EAAU,KAAK,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAGhF,KAAK,qBAAqB,GAAG,OAAO,CAAC,aAAa,CAAC,GAAG;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACrC,QAAQ,CAAC,EAAE,CACT,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,KAC7B,MAAM,CAAC;CACb,CAAC;AAEF,KAAK,aAAa,GAAG,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAC,GAAG;IACtD,MAAM,EAAE,qBAAqB,EAAE,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACpC,MAAM,CAAC,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACpC,KAAK,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAClC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC;IACxC,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;AAkBF,eAAO,MAAM,QAAQ,GAAI,qFAUtB,aAAa,4CAiBf,CAAC"}
|
|
@@ -20,10 +20,10 @@ const StyledBarChart = (0, styles_1.styled)(BarChart_1.BarChart)(({ theme }) =>
|
|
|
20
20
|
rx: 4,
|
|
21
21
|
},
|
|
22
22
|
}));
|
|
23
|
-
const BarChart = ({ height = 300, width, skipAnimation = false, loading = false, tooltip, series, layout = "vertical", margin = { top: 30, right: 30, bottom: 30, left: 30 },
|
|
23
|
+
const BarChart = ({ height = 300, width, skipAnimation = false, loading = false, tooltip = "item", series, layout = "vertical", margin = { top: 30, right: 30, bottom: 30, left: 30 }, ...rest }) => {
|
|
24
24
|
if (loading) {
|
|
25
25
|
return (0, jsx_runtime_1.jsx)(material_1.Skeleton, { height: height, width: width, variant: "rectangular" });
|
|
26
26
|
}
|
|
27
|
-
return ((0, jsx_runtime_1.jsx)(StyledBarChart, { height: height, width: width, series: series, margin: margin, layout: layout, skipAnimation: skipAnimation,
|
|
27
|
+
return ((0, jsx_runtime_1.jsx)(StyledBarChart, { height: height, width: width, series: series, margin: margin, layout: layout, skipAnimation: skipAnimation, slotProps: { tooltip: { trigger: tooltip } }, ...rest }));
|
|
28
28
|
};
|
|
29
29
|
exports.BarChart = BarChart;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type {
|
|
3
|
-
import type { MakeOptional } from "@mui/x-charts/internals";
|
|
1
|
+
import { type Theme } from "@mui/material/styles";
|
|
2
|
+
import type { ChartsTooltipProps, LineSeriesType } from "@mui/x-charts";
|
|
4
3
|
import type { LineChartProps as MuiLineChartProps } from "@mui/x-charts/LineChart";
|
|
5
|
-
type ExtendedLineSeriesType =
|
|
4
|
+
type ExtendedLineSeriesType = Partial<LineSeriesType> & {
|
|
6
5
|
color?: string;
|
|
7
6
|
colorMap?: {
|
|
8
7
|
[key: string]: string;
|
|
@@ -19,12 +18,13 @@ type LineChartProps = Omit<MuiLineChartProps, "series"> & {
|
|
|
19
18
|
height?: MuiLineChartProps["height"];
|
|
20
19
|
width?: MuiLineChartProps["width"];
|
|
21
20
|
hideLegend?: boolean;
|
|
22
|
-
legendPosition?: AnchorPosition;
|
|
23
21
|
grid?: {
|
|
24
22
|
horizontal?: boolean;
|
|
25
23
|
vertical?: boolean;
|
|
26
24
|
};
|
|
25
|
+
tooltip?: ChartsTooltipProps["trigger"];
|
|
26
|
+
theme?: Theme;
|
|
27
27
|
};
|
|
28
|
-
export declare const LineChart: ({ height, width, skipAnimation, loading, tooltip, series, xAxisData, yAxisLabel, xAxisLabel,
|
|
28
|
+
export declare const LineChart: ({ height, width, skipAnimation, loading, tooltip, series, xAxisData, yAxisLabel, xAxisLabel, grid, ...rest }: LineChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
29
|
export {};
|
|
30
30
|
//# sourceMappingURL=LineChart.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LineChart.d.ts","sourceRoot":"","sources":["../../src/Charts/LineChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LineChart.d.ts","sourceRoot":"","sources":["../../src/Charts/LineChart.tsx"],"names":[],"mappings":"AACA,OAAO,EAAU,KAAK,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,KAAK,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAGnF,KAAK,sBAAsB,GAAG,OAAO,CAAC,cAAc,CAAC,GAAG;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,CACT,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,KAC7B,MAAM,CAAC;CACb,CAAC;AAEF,KAAK,cAAc,GAAG,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC,GAAG;IACxD,MAAM,EAAE,sBAAsB,EAAE,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IACrC,KAAK,CAAC,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IACpD,OAAO,CAAC,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC;IACxC,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;AAkBF,eAAO,MAAM,SAAS,GAAI,8GAYvB,cAAc,4CAuChB,CAAC"}
|
|
@@ -20,7 +20,7 @@ const StyledLineChart = (0, styles_1.styled)(LineChart_1.LineChart)(({ theme })
|
|
|
20
20
|
rx: 4,
|
|
21
21
|
},
|
|
22
22
|
}));
|
|
23
|
-
const LineChart = ({ height = 300, width, skipAnimation = false, loading = false, tooltip, series, xAxisData, yAxisLabel, xAxisLabel,
|
|
23
|
+
const LineChart = ({ height = 300, width, skipAnimation = false, loading = false, tooltip = "item", series, xAxisData, yAxisLabel, xAxisLabel, grid = { horizontal: false, vertical: false }, ...rest }) => {
|
|
24
24
|
if (loading) {
|
|
25
25
|
return (0, jsx_runtime_1.jsx)(material_1.Skeleton, { height: height, width: width, variant: "rectangular" });
|
|
26
26
|
}
|
|
@@ -41,6 +41,8 @@ const LineChart = ({ height = 300, width, skipAnimation = false, loading = false
|
|
|
41
41
|
},
|
|
42
42
|
]
|
|
43
43
|
: undefined;
|
|
44
|
-
return ((0, jsx_runtime_1.jsx)(StyledLineChart, { height: height, width: width, series: series, xAxis: xAxisConfig, yAxis: yAxisConfig, skipAnimation: skipAnimation,
|
|
44
|
+
return ((0, jsx_runtime_1.jsx)(StyledLineChart, { height: height, width: width, series: series, xAxis: xAxisConfig, yAxis: yAxisConfig, skipAnimation: skipAnimation, grid: grid, slotProps: {
|
|
45
|
+
tooltip: { trigger: tooltip },
|
|
46
|
+
}, ...rest }));
|
|
45
47
|
};
|
|
46
48
|
exports.LineChart = LineChart;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
1
|
+
import { type Theme } from "@mui/material/styles";
|
|
2
|
+
import type { ChartsTooltipProps, PieSeriesType, PieValueType } from "@mui/x-charts";
|
|
3
3
|
import type { PieChartProps as MuiPieChartProps } from "@mui/x-charts/PieChart";
|
|
4
4
|
type PieChartProps = Omit<MuiPieChartProps, "series"> & {
|
|
5
|
-
series:
|
|
5
|
+
series: Partial<PieSeriesType<Partial<PieValueType>>>;
|
|
6
6
|
label?: string;
|
|
7
7
|
valueFormatter?: (item: {
|
|
8
8
|
value: number;
|
|
9
9
|
}) => string;
|
|
10
10
|
loading?: boolean;
|
|
11
|
+
tooltip?: ChartsTooltipProps["trigger"];
|
|
12
|
+
theme?: Theme;
|
|
11
13
|
};
|
|
12
14
|
export declare const PieChart: ({ height, skipAnimation, loading, valueFormatter, tooltip, label, series, ...rest }: PieChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
15
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PieChart.d.ts","sourceRoot":"","sources":["../../src/Charts/PieChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PieChart.d.ts","sourceRoot":"","sources":["../../src/Charts/PieChart.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EACV,kBAAkB,EAClB,aAAa,EACb,YAAY,EACb,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,aAAa,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAKhF,KAAK,aAAa,GAAG,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAC,GAAG;IACtD,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,MAAM,CAAC;IACrD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC;IACxC,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;AAMF,eAAO,MAAM,QAAQ,GAAI,qFAStB,aAAa,4CA0Df,CAAC"}
|
|
@@ -6,7 +6,7 @@ const styles_1 = require("@mui/material/styles");
|
|
|
6
6
|
const hooks_1 = require("@mui/x-charts/hooks");
|
|
7
7
|
const PieChart_1 = require("@mui/x-charts/PieChart");
|
|
8
8
|
const Skeleton_1 = require("./Skeleton");
|
|
9
|
-
const PieChart = ({ height = 235, skipAnimation = false, loading = false, valueFormatter = (item) => `${item.value}%`, tooltip, label, series, ...rest }) => {
|
|
9
|
+
const PieChart = ({ height = 235, skipAnimation = false, loading = false, valueFormatter = (item) => `${item.value}%`, tooltip = "item", label, series, ...rest }) => {
|
|
10
10
|
const StyledText = (0, styles_1.styled)("text")(({ theme }) => ({
|
|
11
11
|
fill: theme.palette.text.primary,
|
|
12
12
|
textAnchor: "middle",
|
|
@@ -29,11 +29,18 @@ const PieChart = ({ height = 235, skipAnimation = false, loading = false, valueF
|
|
|
29
29
|
overflow: "visible",
|
|
30
30
|
}, series: [
|
|
31
31
|
{
|
|
32
|
+
type: "pie",
|
|
33
|
+
data: series.data,
|
|
32
34
|
arcLabel: (params) => params.label ?? "",
|
|
33
35
|
arcLabelMinAngle: 20,
|
|
34
36
|
valueFormatter,
|
|
35
|
-
|
|
37
|
+
innerRadius: series.innerRadius,
|
|
38
|
+
outerRadius: series.outerRadius,
|
|
36
39
|
},
|
|
37
|
-
],
|
|
40
|
+
], slotProps: {
|
|
41
|
+
tooltip: {
|
|
42
|
+
trigger: tooltip,
|
|
43
|
+
},
|
|
44
|
+
}, ...rest, skipAnimation: skipAnimation, children: (0, jsx_runtime_1.jsx)(PieCenterLabel, { children: label }) }));
|
|
38
45
|
};
|
|
39
46
|
exports.PieChart = PieChart;
|