@centreon/ui 25.5.5 → 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@centreon/ui",
3
- "version": "25.5.5",
3
+ "version": "25.5.7",
4
4
  "description": "Centreon UI Components",
5
5
  "scripts": {
6
6
  "update:deps": "pnpx npm-check-updates -i --format group",
@@ -57,7 +57,8 @@ const ConnectedAutocomplete = ({
57
57
  ...parameters.search
58
58
  },
59
59
  sort: { [filterKey]: 'ASC' }
60
- }
60
+ },
61
+ customQueryParameters: connectedAutocomplete?.customQueryParameters || []
61
62
  });
62
63
 
63
64
  const fieldNamePath = split('.', fieldName);
@@ -4,6 +4,7 @@ import { SvgIconProps, TypographyProps } from '@mui/material';
4
4
 
5
5
  import { SelectEntry } from '../../InputField/Select';
6
6
  import { ConditionsSearchParameter } from '../../api/buildListingEndpoint/models';
7
+ import { QueryParameter } from '../../queryParameters/models';
7
8
 
8
9
  export enum InputType {
9
10
  Switch = 0,
@@ -55,6 +56,7 @@ export interface InputProps {
55
56
  };
56
57
  connectedAutocomplete?: {
57
58
  additionalConditionParameters: Array<ConditionsSearchParameter>;
59
+ customQueryParameters: Array<QueryParameter>;
58
60
  chipColor?: string;
59
61
  endpoint?: string;
60
62
  filterKey?: string;
@@ -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
- const Timeline = (props: TimelineProps): JSX.Element => (
7
- <ParentSize>
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 {...props} height={height} width={width} />
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;
@@ -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';