@centreon/ui 25.10.27 → 25.10.28

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.10.27",
3
+ "version": "25.10.28",
4
4
  "description": "Centreon UI Components",
5
5
  "scripts": {
6
6
  "update:deps": "pnpx npm-check-updates -i --format group",
@@ -36,7 +36,7 @@ const BarChartTooltip = ({
36
36
  sortOrder
37
37
  }: Props): JSX.Element | null => {
38
38
  const { classes } = useBarChartTooltipStyles();
39
- const { toDate, toTime } = useLocaleDateTimeFormat();
39
+ const { format } = useLocaleDateTimeFormat();
40
40
  const tooltipData = useAtomValue(tooltipDataAtom);
41
41
 
42
42
  if (isNil(tooltipData)) {
@@ -48,7 +48,7 @@ const BarChartTooltip = ({
48
48
  }
49
49
 
50
50
  const date = timeSeries[tooltipData.index].timeTick;
51
- const formattedDateTime = `${toDate(date)} / ${toTime(date)}`;
51
+ const formattedDateTime = format({ date, formatString: 'L LTS' });
52
52
 
53
53
  const isSingleMode = equals(mode, 'single');
54
54
 
@@ -27,15 +27,13 @@ export const useGraphValueTooltip = ({
27
27
  isSingleMode,
28
28
  sortOrder
29
29
  }: UseGraphValueTooltipProps): UseGraphValueTooltipState | null => {
30
- const { toDate, toTime } = useLocaleDateTimeFormat();
30
+ const { format } = useLocaleDateTimeFormat();
31
31
  const graphTooltipData = useAtomValue(graphTooltipDataAtom);
32
32
 
33
33
  if (isNil(graphTooltipData) || isNil(graphTooltipData.metrics)) {
34
34
  return null;
35
35
  }
36
36
 
37
- const formattedDateTime = `${toDate(graphTooltipData.date)} / ${toTime(graphTooltipData.date)}`;
38
-
39
37
  const filteredMetrics = isSingleMode
40
38
  ? filter(
41
39
  ({ id }) => equals(id, graphTooltipData.highlightedMetricId),
@@ -54,7 +52,7 @@ export const useGraphValueTooltip = ({
54
52
  ])(sortOrder);
55
53
 
56
54
  return {
57
- dateTime: formattedDateTime,
55
+ dateTime: format({ date: graphTooltipData.date, formatString: 'L LTS' }),
58
56
  highlightedMetricId: graphTooltipData.highlightedMetricId,
59
57
  metrics: sortedMetrics
60
58
  };