@centreon/ui 23.10.76 → 23.10.78

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": "23.10.76",
3
+ "version": "23.10.78",
4
4
  "description": "Centreon UI Components",
5
5
  "scripts": {
6
6
  "eslint": "eslint ./src --ext .js,.jsx,.ts,.tsx --max-warnings 0",
@@ -38,7 +38,7 @@ const Axes = ({
38
38
 
39
39
  const [firstUnit, secondUnit, thirdUnit] = getUnits(lines);
40
40
 
41
- const xTickCount = Math.ceil(width / 82);
41
+ const xTickCount = Math.min(Math.ceil(width / 82), 12);
42
42
 
43
43
  const tickFormat =
44
44
  data?.axisX?.xAxisTickFormat ?? getXAxisTickFormat(graphInterval);
@@ -73,22 +73,27 @@ export default memo(RegularLine, (prevProps, nextProps) => {
73
73
  timeSeries: prevTimeSeries,
74
74
  graphHeight: prevGraphHeight,
75
75
  highlight: prevHighlight,
76
- xScale: prevXScale
76
+ xScale: prevXScale,
77
+ yScale: prevYScale
77
78
  } = prevProps;
78
79
  const {
79
80
  timeSeries: nextTimeSeries,
80
81
  graphHeight: nextGraphHeight,
81
82
  highlight: nextHighlight,
82
- xScale: nextXScale
83
+ xScale: nextXScale,
84
+ yScale: nextYScale
83
85
  } = nextProps;
84
86
 
85
87
  const prevXScaleRange = prevXScale.range();
86
88
  const nextXScaleRange = nextXScale.range();
89
+ const prevYScaleDomain = prevYScale.domain();
90
+ const nextYScaleDomain = nextYScale.domain();
87
91
 
88
92
  return (
89
93
  equals(prevTimeSeries, nextTimeSeries) &&
90
94
  equals(prevGraphHeight, nextGraphHeight) &&
91
95
  equals(prevHighlight, nextHighlight) &&
92
- equals(prevXScaleRange, nextXScaleRange)
96
+ equals(prevXScaleRange, nextXScaleRange) &&
97
+ equals(prevYScaleDomain, nextYScaleDomain)
93
98
  );
94
99
  });
@@ -116,7 +116,7 @@ const DataCell = ({
116
116
  isRowHighlighted={isRowHighlighted}
117
117
  listingVariant={listingVariant}
118
118
  onClick={(e): void => {
119
- if (!clickable && !column.displaySubItemsCaret) {
119
+ if (!clickable) {
120
120
  return;
121
121
  }
122
122
  e.preventDefault();
@@ -90,10 +90,10 @@ const useStyles = makeStyles<StylesProps>()(
90
90
  })
91
91
  },
92
92
  caretLess: {
93
- transform: 'rotate3d(0,0,1,180deg)'
93
+ transform: 'rotate3d(0,0,1,0deg)'
94
94
  },
95
95
  caretMore: {
96
- transform: 'rotate3d(0,0,1,0deg)'
96
+ transform: 'rotate3d(0,0,1,180deg)'
97
97
  },
98
98
  fakeCaret: {
99
99
  marginLeft: theme.spacing(3)