@centreon/ui 25.5.6 → 25.5.7
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
CHANGED
|
@@ -7,6 +7,8 @@ import {
|
|
|
7
7
|
import { Typography, useTheme } from '@mui/material';
|
|
8
8
|
|
|
9
9
|
import dayjs from 'dayjs';
|
|
10
|
+
import timezonePlugin from 'dayjs/plugin/timezone';
|
|
11
|
+
import utc from 'dayjs/plugin/utc';
|
|
10
12
|
|
|
11
13
|
import { userAtom } from '@centreon/ui-context';
|
|
12
14
|
import { Axis } from '@visx/visx';
|
|
@@ -22,6 +24,8 @@ import type { TimelineProps } from './models';
|
|
|
22
24
|
import { useStyles } from './timeline.styles';
|
|
23
25
|
import { useTimeline } from './useTimeline';
|
|
24
26
|
|
|
27
|
+
dayjs.extend(utc);
|
|
28
|
+
dayjs.extend(timezonePlugin);
|
|
25
29
|
interface Props extends TimelineProps {
|
|
26
30
|
width: number;
|
|
27
31
|
height: number;
|
|
@@ -1,14 +1,31 @@
|
|
|
1
|
+
import type { ParentSizeProps } from '@visx/responsive/lib/components/ParentSize';
|
|
1
2
|
import { ParentSize } from '../..';
|
|
2
3
|
|
|
3
4
|
import ResponsiveTimeline from './ResponsiveTimeline';
|
|
4
5
|
import type { TimelineProps } from './models';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
interface Props extends ParentSizeProps, TimelineProps {}
|
|
8
|
+
|
|
9
|
+
const Timeline = ({
|
|
10
|
+
data,
|
|
11
|
+
startDate,
|
|
12
|
+
endDate,
|
|
13
|
+
TooltipContent,
|
|
14
|
+
tooltipClassName,
|
|
15
|
+
...rest
|
|
16
|
+
}: Props): JSX.Element => (
|
|
17
|
+
<ParentSize {...rest}>
|
|
8
18
|
{({ width, height }) => (
|
|
9
|
-
<ResponsiveTimeline
|
|
19
|
+
<ResponsiveTimeline
|
|
20
|
+
data={data}
|
|
21
|
+
startDate={startDate}
|
|
22
|
+
endDate={endDate}
|
|
23
|
+
TooltipContent={TooltipContent}
|
|
24
|
+
tooltipClassName={tooltipClassName}
|
|
25
|
+
height={height}
|
|
26
|
+
width={width}
|
|
27
|
+
/>
|
|
10
28
|
)}
|
|
11
29
|
</ParentSize>
|
|
12
30
|
);
|
|
13
|
-
|
|
14
31
|
export default Timeline;
|
package/src/Graph/index.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type { ParentSizeProps } from '@visx/responsive/lib/components/ParentSize';
|
|
1
2
|
export { default as LineChart } from './Chart';
|
|
2
3
|
export { default as ThresholdLines } from './Chart/BasicComponents/Lines/Threshold';
|
|
3
4
|
export { default as useLineChartData } from './Chart/useChartData';
|