@centreon/ui 24.4.51 → 24.4.52

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.51",
3
+ "version": "24.4.52",
4
4
  "description": "Centreon UI Components",
5
5
  "scripts": {
6
6
  "eslint": "eslint ./src --ext .js,.jsx,.ts,.tsx --max-warnings 0",
@@ -14,7 +14,6 @@ import {
14
14
  } from '@mui/icons-material';
15
15
 
16
16
  import { IconButton } from '../../Button';
17
- import { ConfirmationTooltip } from '../../Tooltip/ConfirmationTooltip';
18
17
 
19
18
  import { useStyles } from './DataTableItem.styles';
20
19
 
@@ -22,13 +21,6 @@ export interface DataTableItemProps {
22
21
  description?: string;
23
22
  hasActions?: boolean;
24
23
  hasCardAction?: boolean;
25
- labelsDelete?: {
26
- cancel: string;
27
- confirm: {
28
- label: string;
29
- secondaryLabel?: string;
30
- };
31
- };
32
24
  onClick?: () => void;
33
25
  onDelete?: () => void;
34
26
  onEdit?: () => void;
@@ -46,8 +38,7 @@ const DataTableItem = forwardRef(
46
38
  onClick,
47
39
  onEdit,
48
40
  onDelete,
49
- onEditAccessRights,
50
- labelsDelete
41
+ onEditAccessRights
51
42
  }: DataTableItemProps,
52
43
  ref
53
44
  ): ReactElement => {
@@ -76,24 +67,14 @@ const DataTableItem = forwardRef(
76
67
  {hasActions && (
77
68
  <MuiCardActions>
78
69
  <span>
79
- {onDelete && labelsDelete && (
80
- <ConfirmationTooltip
81
- confirmVariant="error"
82
- labels={labelsDelete}
83
- onConfirm={onDelete}
84
- >
85
- {({ toggleTooltip }) => (
86
- <IconButton
87
- aria-label="delete"
88
- data-testid="delete"
89
- icon={<DeleteIcon />}
90
- size="small"
91
- variant="ghost"
92
- onClick={toggleTooltip}
93
- />
94
- )}
95
- </ConfirmationTooltip>
96
- )}
70
+ <IconButton
71
+ aria-label="delete"
72
+ data-testid="delete"
73
+ icon={<DeleteIcon />}
74
+ size="small"
75
+ variant="ghost"
76
+ onClick={onDelete}
77
+ />
97
78
  </span>
98
79
  <span>
99
80
  <IconButton