@centreon/ui 23.10.48 → 23.10.49

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.48",
3
+ "version": "23.10.49",
4
4
  "description": "Centreon UI Components",
5
5
  "scripts": {
6
6
  "eslint": "eslint ./src --ext .js,.jsx,.ts,.tsx --max-warnings 0",
@@ -101,10 +101,10 @@
101
101
  "vite-plugin-turbosnap": "^1.0.2"
102
102
  },
103
103
  "dependencies": {
104
- "@lexical/link": "0.8.0",
105
- "@lexical/react": "0.8.0",
106
- "@lexical/selection": "0.8.0",
107
- "@lexical/utils": "0.8.0",
104
+ "@lexical/link": "0.11.3",
105
+ "@lexical/react": "0.11.3",
106
+ "@lexical/selection": "0.11.3",
107
+ "@lexical/utils": "0.11.3",
108
108
  "@visx/curve": "^2.1.0",
109
109
  "@visx/pattern": "^3.0.0",
110
110
  "@visx/scale": "^3.0.0",
@@ -114,7 +114,7 @@
114
114
  "anylogger": "^1.0.11",
115
115
  "d3-array": "3.2.0",
116
116
  "humanize-duration": "^3.27.3",
117
- "lexical": "0.8.0",
117
+ "lexical": "0.11.3",
118
118
  "notistack": "^2.0.8",
119
119
  "react-grid-layout": "^1.3.4",
120
120
  "react-html-parser": "^2.0.2",
@@ -66,22 +66,25 @@ export const useDashboardLayoutStyles = makeStyles<boolean>()(
66
66
  })
67
67
  );
68
68
 
69
- export const useDashboardItemStyles = makeStyles()((theme) => ({
70
- widgetContainer: {
71
- height: '100%',
72
- width: '100%'
73
- },
74
- widgetContent: {
75
- height: '100%'
76
- },
77
- widgetHeader: {
78
- '&:hover': {
79
- backgroundColor: theme.palette.action.hover
69
+ export const useDashboardItemStyles = makeStyles<{ hasHeader: boolean }>()(
70
+ (theme, { hasHeader }) => ({
71
+ widgetContainer: {
72
+ height: '100%',
73
+ width: '100%'
80
74
  },
81
- cursor: 'move',
82
- padding: theme.spacing(0.5, 2)
83
- },
84
- widgetPadding: {
85
- padding: theme.spacing(1, 2)
86
- }
87
- }));
75
+ widgetContent: {
76
+ height: '100%'
77
+ },
78
+ widgetHeader: {
79
+ '&:hover': {
80
+ backgroundColor: theme.palette.action.hover
81
+ },
82
+ cursor: 'move',
83
+ padding: theme.spacing(0.5, 2)
84
+ },
85
+ widgetPadding: {
86
+ overflowX: 'auto',
87
+ padding: hasHeader ? theme.spacing(1, 2, 2) : theme.spacing(1, 2)
88
+ }
89
+ })
90
+ );
@@ -41,10 +41,10 @@ const Item = forwardRef(
41
41
  }: DashboardItemProps,
42
42
  ref: ForwardedRef<HTMLDivElement>
43
43
  ): ReactElement => {
44
- const { classes, cx } = useDashboardItemStyles();
45
-
46
44
  const hasHeader = !isNil(header);
47
45
 
46
+ const { classes, cx } = useDashboardItemStyles({ hasHeader });
47
+
48
48
  const listeners = {
49
49
  onMouseDown,
50
50
  onMouseUp,
@@ -152,7 +152,7 @@ const ContentEditable = ({
152
152
  <div
153
153
  aria-label={namespace}
154
154
  className={cx(
155
- isTextEmpty && classes.emptyInput,
155
+ editable && isTextEmpty && classes.emptyInput,
156
156
  classes.input,
157
157
  inputClassname
158
158
  )}
@@ -121,7 +121,7 @@ describe('Rich Text Editor', () => {
121
121
 
122
122
  cy.wrap(element)
123
123
  .should('have.attr', 'rel')
124
- .and('match', /^noopener/);
124
+ .and('match', /^noreferrer/);
125
125
 
126
126
  cy.wrap(element)
127
127
  .should('have.attr', 'target')
@@ -106,7 +106,12 @@ const FloatingLinkEditor = ({
106
106
  const yOffset = tooltipPosition.y - rootElementY + 30;
107
107
 
108
108
  return (
109
- <Popper open anchorEl={rootElement} placement="top-start">
109
+ <Popper
110
+ open
111
+ anchorEl={rootElement}
112
+ placement="top-start"
113
+ sx={{ zIndex: 'tooltip' }}
114
+ >
110
115
  <Paper
111
116
  sx={{
112
117
  transform: `translate3d(${xOffset}px, ${