@centreon/ui 24.4.1-MON-23368-containers.84 → 24.4.1-MON-develop-BOOSTER.1
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 +26 -24
- package/src/Dialog/Confirm/index.tsx +10 -2
- package/src/Dialog/index.tsx +8 -1
- package/src/Form/Inputs/CheckboxGroup.tsx +1 -4
- package/src/Graph/LineChart/BasicComponents/Lines/Threshold/index.tsx +5 -4
- package/src/Graph/LineChart/InteractiveComponents/Annotations/Annotation/index.tsx +2 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@centreon/ui",
|
|
3
|
-
"version": "24.4.1-MON-
|
|
3
|
+
"version": "24.4.1-MON-develop-BOOSTER.1",
|
|
4
4
|
"description": "Centreon UI Components",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"eslint": "eslint ./src --ext .js,.jsx,.ts,.tsx --max-warnings 0",
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
"test/*"
|
|
49
49
|
],
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@cypress/react": "^
|
|
52
|
-
"@cypress/webpack-dev-server": "^3.
|
|
51
|
+
"@cypress/react": "^7.0.2",
|
|
52
|
+
"@cypress/webpack-dev-server": "^3.2.3",
|
|
53
53
|
"@faker-js/faker": "^8.0.2",
|
|
54
|
-
"@mdx-js/react": "^
|
|
55
|
-
"@simonsmith/cypress-image-snapshot": "^
|
|
54
|
+
"@mdx-js/react": "^2.1.4",
|
|
55
|
+
"@simonsmith/cypress-image-snapshot": "^6.1.0",
|
|
56
56
|
"@storybook/addon-a11y": "^7.0.9",
|
|
57
57
|
"@storybook/addon-docs": "^7.0.9",
|
|
58
58
|
"@storybook/addon-essentials": "^7.0.9",
|
|
@@ -73,15 +73,16 @@
|
|
|
73
73
|
"@testing-library/jest-dom": "^5.16.5",
|
|
74
74
|
"@testing-library/react": "^13.4.0",
|
|
75
75
|
"@testing-library/react-hooks": "^8.0.1",
|
|
76
|
-
"@types/
|
|
76
|
+
"@types/cypress": "^1.1.3",
|
|
77
|
+
"@types/jest": "^27.5.0",
|
|
77
78
|
"@types/mocha": "^10.0.6",
|
|
78
|
-
"@types/ramda": "^0.29.
|
|
79
|
-
"@types/react": "^18.
|
|
80
|
-
"@types/testing-library__jest-dom": "^
|
|
79
|
+
"@types/ramda": "^0.29.6",
|
|
80
|
+
"@types/react": "^18.0.26",
|
|
81
|
+
"@types/testing-library__jest-dom": "^5.14.6",
|
|
81
82
|
"@vitejs/plugin-react": "^4.0.0",
|
|
82
83
|
"@vitejs/plugin-react-swc": "^3.3.0",
|
|
83
|
-
"axios-mock-adapter": "^1.
|
|
84
|
-
"cypress": "^13.
|
|
84
|
+
"axios-mock-adapter": "^1.21.4",
|
|
85
|
+
"cypress": "^13.3.1",
|
|
85
86
|
"identity-obj-proxy": "^3.0.0",
|
|
86
87
|
"jest-transform-stub": "^2.0.0",
|
|
87
88
|
"mochawesome": "^7.1.3",
|
|
@@ -92,26 +93,27 @@
|
|
|
92
93
|
"react-dom": "^18.2.0",
|
|
93
94
|
"react-test-renderer": "^18.2.0",
|
|
94
95
|
"remark-gfm": "^3.0.1",
|
|
96
|
+
"sass": "^1.62.1",
|
|
95
97
|
"speed-measure-vite-plugin": "^0.1.2",
|
|
96
|
-
"storybook": "^7.
|
|
98
|
+
"storybook": "^7.0.9",
|
|
97
99
|
"storybook-addon-mock": "^4.0.0",
|
|
98
|
-
"storybook-dark-mode": "^3.0.
|
|
100
|
+
"storybook-dark-mode": "^3.0.0",
|
|
99
101
|
"style-dictionary": "^3.8.0",
|
|
100
|
-
"ts-node": "^10.9.
|
|
102
|
+
"ts-node": "^10.9.1",
|
|
101
103
|
"use-resize-observer": "^9.1.0",
|
|
102
104
|
"vite": "^4.3.5",
|
|
103
105
|
"vite-plugin-istanbul": "^5.0.0",
|
|
104
106
|
"vite-plugin-svgr": "^3.2.0",
|
|
105
|
-
"vite-plugin-turbosnap": "^1.0.
|
|
107
|
+
"vite-plugin-turbosnap": "^1.0.2"
|
|
106
108
|
},
|
|
107
109
|
"dependencies": {
|
|
108
|
-
"@lexical/html": "^0.12.
|
|
109
|
-
"@lexical/link": "^0.12.
|
|
110
|
-
"@lexical/list": "^0.12.
|
|
111
|
-
"@lexical/react": "^0.12.
|
|
112
|
-
"@lexical/rich-text": "^0.12.
|
|
113
|
-
"@lexical/selection": "^0.12.
|
|
114
|
-
"@lexical/utils": "^0.12.
|
|
110
|
+
"@lexical/html": "^0.12.2",
|
|
111
|
+
"@lexical/link": "^0.12.2",
|
|
112
|
+
"@lexical/list": "^0.12.2",
|
|
113
|
+
"@lexical/react": "^0.12.2",
|
|
114
|
+
"@lexical/rich-text": "^0.12.2",
|
|
115
|
+
"@lexical/selection": "^0.12.2",
|
|
116
|
+
"@lexical/utils": "^0.12.2",
|
|
115
117
|
"@react-spring/web": "^9.7.3",
|
|
116
118
|
"@visx/curve": "^2.1.0",
|
|
117
119
|
"@visx/group": "^3.3.0",
|
|
@@ -123,9 +125,9 @@
|
|
|
123
125
|
"@visx/threshold": "^2.12.2",
|
|
124
126
|
"@visx/visx": "2.16.0",
|
|
125
127
|
"anylogger": "^1.0.11",
|
|
126
|
-
"d3-array": "3.2.
|
|
128
|
+
"d3-array": "3.2.0",
|
|
127
129
|
"humanize-duration": "^3.27.3",
|
|
128
|
-
"lexical": "^0.12.
|
|
130
|
+
"lexical": "^0.12.2",
|
|
129
131
|
"notistack": "^3.0.1",
|
|
130
132
|
"numeral": "^2.0.6",
|
|
131
133
|
"ramda": "0.29.1",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DialogContentText, Typography } from '@mui/material';
|
|
1
|
+
import { ButtonProps, DialogContentText, Typography } from '@mui/material';
|
|
2
2
|
|
|
3
3
|
import Dialog, { Props as DialogProps } from '..';
|
|
4
4
|
|
|
@@ -6,15 +6,23 @@ type Props = DialogProps & {
|
|
|
6
6
|
children?: JSX.Element;
|
|
7
7
|
labelMessage?: string | null;
|
|
8
8
|
labelSecondMessage?: string | null;
|
|
9
|
+
restCancelButtonProps?: ButtonProps;
|
|
10
|
+
restConfirmButtonProps?: ButtonProps;
|
|
9
11
|
};
|
|
10
12
|
|
|
11
13
|
const Confirm = ({
|
|
12
14
|
labelMessage,
|
|
13
15
|
labelSecondMessage,
|
|
14
16
|
children,
|
|
17
|
+
restCancelButtonProps,
|
|
18
|
+
restConfirmButtonProps,
|
|
15
19
|
...rest
|
|
16
20
|
}: Props): JSX.Element => (
|
|
17
|
-
<Dialog
|
|
21
|
+
<Dialog
|
|
22
|
+
restCancelButtonProps={restCancelButtonProps}
|
|
23
|
+
restConfirmButtonProps={restConfirmButtonProps}
|
|
24
|
+
{...rest}
|
|
25
|
+
>
|
|
18
26
|
<DialogContentText>
|
|
19
27
|
{labelMessage && <Typography>{labelMessage}</Typography>}
|
|
20
28
|
{labelSecondMessage && <Typography>{labelSecondMessage}</Typography>}
|
package/src/Dialog/index.tsx
CHANGED
|
@@ -9,7 +9,8 @@ import {
|
|
|
9
9
|
DialogContent,
|
|
10
10
|
DialogActions,
|
|
11
11
|
DialogProps,
|
|
12
|
-
CircularProgress
|
|
12
|
+
CircularProgress,
|
|
13
|
+
ButtonProps
|
|
13
14
|
} from '@mui/material';
|
|
14
15
|
|
|
15
16
|
import { DataTestAttributes } from '../@types/data-attributes';
|
|
@@ -48,6 +49,8 @@ export type Props = {
|
|
|
48
49
|
onClose?: () => void;
|
|
49
50
|
onConfirm: (event, value?) => void;
|
|
50
51
|
open: boolean;
|
|
52
|
+
restCancelButtonProps?: ButtonProps;
|
|
53
|
+
restConfirmButtonProps?: ButtonProps;
|
|
51
54
|
submitting?: boolean;
|
|
52
55
|
} & DialogProps &
|
|
53
56
|
DataTestAttributes;
|
|
@@ -70,6 +73,8 @@ const Dialog = ({
|
|
|
70
73
|
dialogContentClassName,
|
|
71
74
|
dialogActionsClassName,
|
|
72
75
|
dialogConfirmButtonClassName,
|
|
76
|
+
restCancelButtonProps,
|
|
77
|
+
restConfirmButtonProps,
|
|
73
78
|
...rest
|
|
74
79
|
}: Props): JSX.Element => {
|
|
75
80
|
const { classes, cx } = useStyles({ contentWidth });
|
|
@@ -101,6 +106,7 @@ const Dialog = ({
|
|
|
101
106
|
data-testid="Cancel"
|
|
102
107
|
disabled={cancelDisabled}
|
|
103
108
|
onClick={onCancel}
|
|
109
|
+
{...restCancelButtonProps}
|
|
104
110
|
>
|
|
105
111
|
{labelCancel}
|
|
106
112
|
</Button>
|
|
@@ -113,6 +119,7 @@ const Dialog = ({
|
|
|
113
119
|
disabled={confirmDisabled}
|
|
114
120
|
endIcon={submitting && <CircularProgress size={15} />}
|
|
115
121
|
onClick={onConfirm}
|
|
122
|
+
{...restConfirmButtonProps}
|
|
116
123
|
>
|
|
117
124
|
{labelConfirm}
|
|
118
125
|
</Button>
|
|
@@ -130,10 +130,11 @@ const WrapperThresholdLines = ({
|
|
|
130
130
|
|
|
131
131
|
return (
|
|
132
132
|
<g>
|
|
133
|
-
{filteredThresholdLines.map(
|
|
134
|
-
element
|
|
135
|
-
|
|
136
|
-
|
|
133
|
+
{filteredThresholdLines.map(
|
|
134
|
+
(element) =>
|
|
135
|
+
element?.map(({ Component, props, key }) => (
|
|
136
|
+
<Component {...props} id={key} key={key} />
|
|
137
|
+
))
|
|
137
138
|
)}
|
|
138
139
|
</g>
|
|
139
140
|
);
|
|
@@ -43,9 +43,8 @@ const Annotation = ({
|
|
|
43
43
|
|
|
44
44
|
const setAnnotationHovered = useSetAtom(annotationHoveredAtom);
|
|
45
45
|
|
|
46
|
-
const content = `${truncate(event.content)} (${t(labelBy)} ${
|
|
47
|
-
|
|
48
|
-
})`;
|
|
46
|
+
const content = `${truncate(event.content)} (${t(labelBy)} ${event.contact
|
|
47
|
+
?.name})`;
|
|
49
48
|
|
|
50
49
|
return (
|
|
51
50
|
<g>
|