@centreon/ui 24.4.1-MON-23368-containers.67 → 24.4.1-MON-34691-improve-code-coverage.0

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": "24.4.1-MON-23368-containers.67",
3
+ "version": "24.4.1-MON-34691-improve-code-coverage.0",
4
4
  "description": "Centreon UI Components",
5
5
  "scripts": {
6
6
  "eslint": "eslint ./src --ext .js,.jsx,.ts,.tsx --max-warnings 0",
@@ -47,11 +47,11 @@
47
47
  "test/*"
48
48
  ],
49
49
  "devDependencies": {
50
- "@cypress/react": "^8.0.0",
51
- "@cypress/webpack-dev-server": "^3.7.3",
50
+ "@cypress/react": "^7.0.2",
51
+ "@cypress/webpack-dev-server": "^3.2.3",
52
52
  "@faker-js/faker": "^8.0.2",
53
- "@mdx-js/react": "^3.0.0",
54
- "@simonsmith/cypress-image-snapshot": "^9.0.1",
53
+ "@mdx-js/react": "^2.1.4",
54
+ "@simonsmith/cypress-image-snapshot": "^6.1.0",
55
55
  "@storybook/addon-a11y": "^7.0.9",
56
56
  "@storybook/addon-docs": "^7.0.9",
57
57
  "@storybook/addon-essentials": "^7.0.9",
@@ -72,15 +72,16 @@
72
72
  "@testing-library/jest-dom": "^5.16.5",
73
73
  "@testing-library/react": "^13.4.0",
74
74
  "@testing-library/react-hooks": "^8.0.1",
75
- "@types/jest": "^29.5.11",
75
+ "@types/cypress": "^1.1.3",
76
+ "@types/jest": "^27.5.0",
76
77
  "@types/mocha": "^10.0.6",
77
- "@types/ramda": "^0.29.9",
78
- "@types/react": "^18.2.48",
79
- "@types/testing-library__jest-dom": "^6.0.0",
78
+ "@types/ramda": "^0.29.6",
79
+ "@types/react": "^18.0.26",
80
+ "@types/testing-library__jest-dom": "^5.14.6",
80
81
  "@vitejs/plugin-react": "^4.0.0",
81
82
  "@vitejs/plugin-react-swc": "^3.3.0",
82
- "axios-mock-adapter": "^1.22.0",
83
- "cypress": "^13.6.2",
83
+ "axios-mock-adapter": "^1.21.4",
84
+ "cypress": "^13.3.1",
84
85
  "identity-obj-proxy": "^3.0.0",
85
86
  "jest-transform-stub": "^2.0.0",
86
87
  "mochawesome": "^7.1.3",
@@ -91,26 +92,27 @@
91
92
  "react-dom": "^18.2.0",
92
93
  "react-test-renderer": "^18.2.0",
93
94
  "remark-gfm": "^3.0.1",
95
+ "sass": "^1.62.1",
94
96
  "speed-measure-vite-plugin": "^0.1.2",
95
- "storybook": "^7.6.8",
97
+ "storybook": "^7.0.9",
96
98
  "storybook-addon-mock": "^4.0.0",
97
- "storybook-dark-mode": "^3.0.3",
99
+ "storybook-dark-mode": "^3.0.0",
98
100
  "style-dictionary": "^3.8.0",
99
- "ts-node": "^10.9.2",
101
+ "ts-node": "^10.9.1",
100
102
  "use-resize-observer": "^9.1.0",
101
103
  "vite": "^4.3.5",
102
104
  "vite-plugin-istanbul": "^5.0.0",
103
105
  "vite-plugin-svgr": "^3.2.0",
104
- "vite-plugin-turbosnap": "^1.0.3"
106
+ "vite-plugin-turbosnap": "^1.0.2"
105
107
  },
106
108
  "dependencies": {
107
- "@lexical/html": "^0.12.6",
108
- "@lexical/link": "^0.12.6",
109
- "@lexical/list": "^0.12.6",
110
- "@lexical/react": "^0.12.6",
111
- "@lexical/rich-text": "^0.12.6",
112
- "@lexical/selection": "^0.12.6",
113
- "@lexical/utils": "^0.12.6",
109
+ "@lexical/html": "^0.12.2",
110
+ "@lexical/link": "^0.12.2",
111
+ "@lexical/list": "^0.12.2",
112
+ "@lexical/react": "^0.12.2",
113
+ "@lexical/rich-text": "^0.12.2",
114
+ "@lexical/selection": "^0.12.2",
115
+ "@lexical/utils": "^0.12.2",
114
116
  "@react-spring/web": "^9.7.3",
115
117
  "@visx/curve": "^2.1.0",
116
118
  "@visx/group": "^3.3.0",
@@ -120,9 +122,9 @@
120
122
  "@visx/threshold": "^2.12.2",
121
123
  "@visx/visx": "2.16.0",
122
124
  "anylogger": "^1.0.11",
123
- "d3-array": "3.2.4",
125
+ "d3-array": "3.2.0",
124
126
  "humanize-duration": "^3.27.3",
125
- "lexical": "^0.12.6",
127
+ "lexical": "^0.12.2",
126
128
  "notistack": "^3.0.1",
127
129
  "ramda": "0.29.1",
128
130
  "react-grid-layout": "^1.3.4",
@@ -46,10 +46,7 @@ const CheckboxGroup = ({
46
46
  return;
47
47
  }
48
48
 
49
- setFieldValue(
50
- fieldName,
51
- value?.filter((elm) => !equals(elm, label))
52
- );
49
+ setFieldValue(fieldName, value?.filter((elm) => !equals(elm, label)));
53
50
  };
54
51
 
55
52
  return useMemoComponent({
@@ -130,10 +130,11 @@ const WrapperThresholdLines = ({
130
130
 
131
131
  return (
132
132
  <g>
133
- {filteredThresholdLines.map((element) =>
134
- element?.map(({ Component, props, key }) => (
135
- <Component {...props} id={key} key={key} />
136
- ))
133
+ {filteredThresholdLines.map(
134
+ (element) =>
135
+ element?.map(({ Component, props, key }) => (
136
+ <Component {...props} id={key} key={key} />
137
+ ))
137
138
  )}
138
139
  </g>
139
140
  );
@@ -43,9 +43,8 @@ const Annotation = ({
43
43
 
44
44
  const setAnnotationHovered = useSetAtom(annotationHoveredAtom);
45
45
 
46
- const content = `${truncate(event.content)} (${t(labelBy)} ${
47
- event.contact?.name
48
- })`;
46
+ const content = `${truncate(event.content)} (${t(labelBy)} ${event.contact
47
+ ?.name})`;
49
48
 
50
49
  return (
51
50
  <g>
@@ -8,7 +8,7 @@ interface MakeStylesProps {
8
8
 
9
9
  export const legendWidth = 21;
10
10
  const legendItemHeight = 5.25;
11
- const legendItemHeightCompact = 1.75;
11
+ const legendItemHeightCompact = 2;
12
12
 
13
13
  export const useStyles = makeStyles<MakeStylesProps>()(
14
14
  (theme, { limitLegendRows }) => ({
@@ -38,7 +38,7 @@ const LegendHeader = ({
38
38
 
39
39
  const getEndText = (): string => {
40
40
  if (value) {
41
- return `${value}${hasUnit ? ` ${unit}` : ''}`;
41
+ return value;
42
42
  }
43
43
 
44
44
  return hasUnit ? ` ${unitName}` : '';
@@ -5,7 +5,7 @@ import { equals, find, isNil } from 'ramda';
5
5
 
6
6
  import { mousePositionAtom } from '../InteractiveComponents/interactionWithGraphAtoms';
7
7
  import {
8
- formatMetricValue,
8
+ formatMetricValueWithUnit,
9
9
  getLineForMetric,
10
10
  getMetrics,
11
11
  getTimeValue
@@ -73,7 +73,7 @@ const useInteractiveValues = ({
73
73
  metric_id
74
74
  }) as Line;
75
75
 
76
- const formattedValue = formatMetricValue({
76
+ const formattedValue = formatMetricValueWithUnit({
77
77
  base,
78
78
  unit,
79
79
  value
@@ -78,7 +78,7 @@ const WrapperLineChart = ({
78
78
  return (
79
79
  <div
80
80
  ref={lineChartRef as MutableRefObject<HTMLDivElement>}
81
- style={{ height: '100%', width: '100%' }}
81
+ style={{ height: '100%', overflowY: 'hidden', width: '100%' }}
82
82
  >
83
83
  <ParentSize>
84
84
  {({
@@ -2,4 +2,5 @@ export { default as LineChart } from './LineChart';
2
2
  export { Gauge } from './Gauge';
3
3
  export { SingleBar } from './SingleBar';
4
4
  export { Text as GraphText } from './Text';
5
+
5
6
  export { HeatMap } from './HeatMap';