@centreon/ui 25.8.1 → 25.8.2

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.8.1",
3
+ "version": "25.8.2",
4
4
  "description": "Centreon UI Components",
5
5
  "scripts": {
6
6
  "update:deps": "pnpx npm-check-updates -i --format group",
@@ -259,4 +259,4 @@ export const mixedStackedMinMax: Story = {
259
259
  max: 20
260
260
  },
261
261
  render: Template
262
- };
262
+ };
@@ -73,7 +73,7 @@ const BarChart = ({
73
73
  max,
74
74
  boundariesUnit
75
75
  }: BarChartProps): JSX.Element => {
76
- const { adjustedData } = useChartData({ data, end, start });
76
+ const { adjustedData } = useChartData({ data, end, start, min, max });
77
77
  const { ref, width, height: responsiveHeight } = useResizeObserver();
78
78
 
79
79
  if (loading && !adjustedData) {
@@ -116,4 +116,4 @@ const BarChart = ({
116
116
  );
117
117
  };
118
118
 
119
- export default BarChart;
119
+ export default BarChart;
@@ -180,7 +180,7 @@ describe('Line chart', () => {
180
180
  cy.contains('06/18/2023').should('be.visible');
181
181
 
182
182
  cy.contains('0.4 s').should('be.visible');
183
- cy.contains('75.64%').should('be.visible');
183
+ cy.contains('75.64%').should('be.visible');
184
184
 
185
185
  cy.makeSnapshot();
186
186
  });
@@ -451,7 +451,7 @@ describe('Line chart', () => {
451
451
 
452
452
  cy.contains(':00 AM').should('be.visible');
453
453
 
454
- cy.get('text[transform="rotate(-35, -2, 198.7929601526369)"]').should(
454
+ cy.get('text[transform="rotate(-35, -2, 274.47726401277305)"]').should(
455
455
  'be.visible'
456
456
  );
457
457
 
@@ -533,7 +533,7 @@ describe('Line chart', () => {
533
533
  checkGraphWidth();
534
534
  cy.contains(':00 AM').should('be.visible');
535
535
  cy.get('circle[cx="250.83333333333334"]').should('be.visible');
536
- cy.get('circle[cy="246.2421135204699"]').should('be.visible');
536
+ cy.get('circle[cy="251.79089393069725"]').should('be.visible');
537
537
 
538
538
  cy.makeSnapshot();
539
539
  });
@@ -746,11 +746,9 @@ describe('Lines and bars', () => {
746
746
 
747
747
  checkGraphWidth();
748
748
 
749
- cy.get(
750
- 'path[d="M7.501377410468319,278.09035407759154 h56.51239669421488 h1v1 v95.90964592240846 a1,1 0 0 1 -1,1 h-56.51239669421488 a1,1 0 0 1 -1,-1 v-95.90964592240846 v-1h1z'
751
- );
752
- cy.get(
753
- 'path[d="M24.05509641873278,225.7604521029811 h23.404958677685954 a17.553719008264462,17.553719008264462 0 0 1 17.553719008264462,17.553719008264462 v17.222463958081512 v17.553719008264462h-17.553719008264462 h-23.404958677685954 h-17.553719008264462v-17.553719008264462 v-17.222463958081512 a17.553719008264462,17.553719008264462 0 0 1 17.553719008264462,-17.553719008264462z"]'
749
+ cy.get('path[d="M7.501377410468319,350.5553648585503 h56.51239669421488 h1v1 v23.44463514144968 a1,1 0 0 1 -1,1 h-56.51239669421488 a1,1 0 0 1 -1,-1 v-23.44463514144968 v-1h1z"]'
750
+ ).should('be.visible');
751
+ cy.get('path[d="M24.05509641873278,201.58170928199803 h23.404958677685954 a17.553719008264462,17.553719008264462 0 0 1 17.553719008264462,17.553719008264462 v113.86621756002336 v17.553719008264462h-17.553719008264462 h-23.404958677685954 h-17.553719008264462v-17.553719008264462 v-113.86621756002336 a17.553719008264462,17.553719008264462 0 0 1 17.553719008264462,-17.553719008264462z"]'
754
752
  ).should('be.visible');
755
753
 
756
754
  cy.makeSnapshot();
@@ -394,4 +394,4 @@ const Chart = ({
394
394
  );
395
395
  };
396
396
 
397
- export default Chart;
397
+ export default Chart;
@@ -193,4 +193,4 @@ export interface GraphTooltipData {
193
193
  unit: string;
194
194
  value: number;
195
195
  }>;
196
- }
196
+ }
@@ -766,4 +766,4 @@ export {
766
766
  formatMetricValueWithUnit,
767
767
  getYScaleUnit,
768
768
  getYScalePerUnit
769
- };
769
+ };
@@ -4,6 +4,7 @@ import { makeStyles } from 'tss-react/mui';
4
4
  import {
5
5
  Divider,
6
6
  FormControl,
7
+ FormControlProps,
7
8
  FormHelperText,
8
9
  InputLabel,
9
10
  ListSubheader,
@@ -59,6 +60,7 @@ type Props = {
59
60
  onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
60
61
  options: Array<SelectEntry>;
61
62
  selectedOptionId: number | string;
63
+ formControlProps: FormControlProps;
62
64
  } & Omit<SelectProps, 'error'>;
63
65
 
64
66
  const SelectField = ({
@@ -72,6 +74,7 @@ const SelectField = ({
72
74
  ariaLabel,
73
75
  inputProps,
74
76
  compact = false,
77
+ formControlProps,
75
78
  ...props
76
79
  }: Props): JSX.Element => {
77
80
  const { classes, cx } = useStyles();
@@ -92,6 +95,8 @@ const SelectField = ({
92
95
  error={!isNil(error)}
93
96
  fullWidth={fullWidth}
94
97
  size="small"
98
+ {...formControlProps}
99
+
95
100
  >
96
101
  {label && <InputLabel>{label}</InputLabel>}
97
102
  <Select
@@ -146,4 +151,4 @@ const SelectField = ({
146
151
  );
147
152
  };
148
153
 
149
- export default SelectField;
154
+ export default SelectField;