@centreon/ui 23.10.77 → 23.10.79

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.77",
3
+ "version": "23.10.79",
4
4
  "description": "Centreon UI Components",
5
5
  "scripts": {
6
6
  "eslint": "eslint ./src --ext .js,.jsx,.ts,.tsx --max-warnings 0",
@@ -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)
@@ -59,9 +59,10 @@ export interface SubMenuProps {
59
59
  submenuTitle: string;
60
60
  to: string;
61
61
  }>;
62
+ onClose?: () => void;
62
63
  }
63
64
 
64
- const SubMenu = ({ items }: SubMenuProps): JSX.Element => {
65
+ const SubMenu = ({ items, onClose }: SubMenuProps): JSX.Element => {
65
66
  const { classes, theme } = useStyles();
66
67
 
67
68
  return (
@@ -80,6 +81,7 @@ const SubMenu = ({ items }: SubMenuProps): JSX.Element => {
80
81
  className={classes.submenuItem}
81
82
  key={to}
82
83
  role="none"
84
+ onClick={onClose}
83
85
  >
84
86
  <Link
85
87
  className={classes.link}
@@ -170,7 +170,7 @@ const TopCounterLayout = ({
170
170
  </Badge>
171
171
  </span>
172
172
  <span className={classes.textWrapper}>{title}</span>
173
- {toggled ? <ExpandMoreIcon /> : <ExpandLessIcon />}
173
+ {toggled ? <ExpandLessIcon /> : <ExpandMoreIcon />}
174
174
  </button>
175
175
  </div>
176
176
  <div