@centreon/ui 25.11.1 → 25.11.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.11.1",
3
+ "version": "25.11.2",
4
4
  "description": "Centreon UI Components",
5
5
  "scripts": {
6
6
  "update:deps": "pnpx npm-check-updates -i --format group",
@@ -90,7 +90,7 @@
90
90
  "@vitejs/plugin-react": "^4.3.4",
91
91
  "@vitejs/plugin-react-swc": "^3.8.0",
92
92
  "chai": "^5.2.0",
93
- "cypress": "^14.1.0",
93
+ "cypress": "^15.5.0",
94
94
  "identity-obj-proxy": "^3.0.0",
95
95
  "jest-transform-stub": "^2.0.0",
96
96
  "mochawesome": "^7.1.3",
@@ -55,12 +55,14 @@ interface Props {
55
55
  dataTestId?: string;
56
56
  disabled?: boolean;
57
57
  label: string;
58
+ id: string;
58
59
  labelPlacement?: LabelPlacement;
59
60
  labelProps?: TypographyProps;
60
61
  onChange?: (e) => void;
61
62
  }
62
63
 
63
64
  const Checkbox = ({
65
+ id,
64
66
  Icon,
65
67
  checked,
66
68
  label,
@@ -86,7 +88,7 @@ const Checkbox = ({
86
88
  className={classes.checkbox}
87
89
  color="primary"
88
90
  disabled={disabled}
89
- id={label}
91
+ id={id}
90
92
  size="small"
91
93
  sx={{ padding: 0 }}
92
94
  onChange={onChange}
@@ -6,6 +6,8 @@ import { TypographyProps } from '@mui/material/Typography';
6
6
 
7
7
  import Checkbox, { LabelPlacement } from '../Checkbox';
8
8
 
9
+ import { useTranslation } from 'react-i18next';
10
+
9
11
  interface Props {
10
12
  className?: string;
11
13
  dataTestId?: string;
@@ -45,6 +47,8 @@ const CheckboxGroup = ({
45
47
  }: Props): JSX.Element => {
46
48
  const { classes, cx } = useStyles();
47
49
 
50
+ const { t } = useTranslation();
51
+
48
52
  const row = !equals(direction, 'vertical');
49
53
 
50
54
  return (
@@ -61,10 +65,11 @@ const CheckboxGroup = ({
61
65
  className={cx(classes.checkbox, className)}
62
66
  disabled={disabled}
63
67
  key={value}
64
- label={value}
68
+ label={t(value)}
65
69
  labelPlacement={labelPlacement}
66
70
  labelProps={labelProps}
67
71
  onChange={onChange}
72
+ id={value}
68
73
  />
69
74
  );
70
75
  })}
@@ -15,7 +15,8 @@ const Checkbox = ({
15
15
  fieldName,
16
16
  getDisabled,
17
17
  hideInput,
18
- dataTestId
18
+ dataTestId,
19
+ label
19
20
  }: InputPropsWithoutGroup): JSX.Element => {
20
21
  const { values, setFieldValue } = useFormikContext<FormikValues>();
21
22
 
@@ -45,7 +46,7 @@ const Checkbox = ({
45
46
  checked={value?.checked}
46
47
  dataTestId={dataTestId || ''}
47
48
  disabled={disabled}
48
- label={value?.label}
49
+ label={label}
49
50
  labelPlacement={checkbox?.labelPlacement || 'end'}
50
51
  onChange={handleChange}
51
52
  />
@@ -236,12 +236,12 @@ export const basicFormInputs: Array<InputProps> = [
236
236
  direction: 'horizontal'
237
237
  },
238
238
  fieldName: 'notifications.channels',
239
- label: 'channels',
239
+ label: 'mail',
240
240
  type: InputType.Checkbox
241
241
  },
242
242
  {
243
243
  fieldName: 'notifications.includeServices',
244
- label: 'Iclude services',
244
+ label: 'Include services for this host',
245
245
  type: InputType.Checkbox
246
246
  },
247
247
  {