@centreon/ui 24.4.1-MON-23368-containers.55 → 24.4.1-MON-21278-Delete-a-basic-token.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/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-21278-Delete-a-basic-token.1",
|
|
4
4
|
"description": "Centreon UI Components",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"eslint": "eslint ./src --ext .js,.jsx,.ts,.tsx --max-warnings 0",
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
"test/*"
|
|
48
48
|
],
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@cypress/react": "^
|
|
51
|
-
"@cypress/webpack-dev-server": "^3.
|
|
50
|
+
"@cypress/react": "^7.0.2",
|
|
51
|
+
"@cypress/webpack-dev-server": "^3.2.3",
|
|
52
52
|
"@faker-js/faker": "^8.0.2",
|
|
53
|
-
"@mdx-js/react": "^
|
|
54
|
-
"@simonsmith/cypress-image-snapshot": "^
|
|
53
|
+
"@mdx-js/react": "^2.1.4",
|
|
54
|
+
"@simonsmith/cypress-image-snapshot": "^6.1.0",
|
|
55
55
|
"@storybook/addon-a11y": "^7.0.9",
|
|
56
56
|
"@storybook/addon-docs": "^7.0.9",
|
|
57
57
|
"@storybook/addon-essentials": "^7.0.9",
|
|
@@ -72,15 +72,16 @@
|
|
|
72
72
|
"@testing-library/jest-dom": "^5.16.5",
|
|
73
73
|
"@testing-library/react": "^13.4.0",
|
|
74
74
|
"@testing-library/react-hooks": "^8.0.1",
|
|
75
|
-
"@types/
|
|
75
|
+
"@types/cypress": "^1.1.3",
|
|
76
|
+
"@types/jest": "^27.5.0",
|
|
76
77
|
"@types/mocha": "^10.0.6",
|
|
77
|
-
"@types/ramda": "^0.29.
|
|
78
|
-
"@types/react": "^18.
|
|
79
|
-
"@types/testing-library__jest-dom": "^
|
|
78
|
+
"@types/ramda": "^0.29.6",
|
|
79
|
+
"@types/react": "^18.0.26",
|
|
80
|
+
"@types/testing-library__jest-dom": "^5.14.6",
|
|
80
81
|
"@vitejs/plugin-react": "^4.0.0",
|
|
81
82
|
"@vitejs/plugin-react-swc": "^3.3.0",
|
|
82
|
-
"axios-mock-adapter": "^1.
|
|
83
|
-
"cypress": "^13.
|
|
83
|
+
"axios-mock-adapter": "^1.21.4",
|
|
84
|
+
"cypress": "^13.3.1",
|
|
84
85
|
"identity-obj-proxy": "^3.0.0",
|
|
85
86
|
"jest-transform-stub": "^2.0.0",
|
|
86
87
|
"mochawesome": "^7.1.3",
|
|
@@ -91,26 +92,27 @@
|
|
|
91
92
|
"react-dom": "^18.2.0",
|
|
92
93
|
"react-test-renderer": "^18.2.0",
|
|
93
94
|
"remark-gfm": "^3.0.1",
|
|
95
|
+
"sass": "^1.62.1",
|
|
94
96
|
"speed-measure-vite-plugin": "^0.1.2",
|
|
95
|
-
"storybook": "^7.
|
|
97
|
+
"storybook": "^7.0.9",
|
|
96
98
|
"storybook-addon-mock": "^4.0.0",
|
|
97
|
-
"storybook-dark-mode": "^3.0.
|
|
99
|
+
"storybook-dark-mode": "^3.0.0",
|
|
98
100
|
"style-dictionary": "^3.8.0",
|
|
99
|
-
"ts-node": "^10.9.
|
|
101
|
+
"ts-node": "^10.9.1",
|
|
100
102
|
"use-resize-observer": "^9.1.0",
|
|
101
103
|
"vite": "^4.3.5",
|
|
102
104
|
"vite-plugin-istanbul": "^5.0.0",
|
|
103
105
|
"vite-plugin-svgr": "^3.2.0",
|
|
104
|
-
"vite-plugin-turbosnap": "^1.0.
|
|
106
|
+
"vite-plugin-turbosnap": "^1.0.2"
|
|
105
107
|
},
|
|
106
108
|
"dependencies": {
|
|
107
|
-
"@lexical/html": "^0.12.
|
|
108
|
-
"@lexical/link": "^0.12.
|
|
109
|
-
"@lexical/list": "^0.12.
|
|
110
|
-
"@lexical/react": "^0.12.
|
|
111
|
-
"@lexical/rich-text": "^0.12.
|
|
112
|
-
"@lexical/selection": "^0.12.
|
|
113
|
-
"@lexical/utils": "^0.12.
|
|
109
|
+
"@lexical/html": "^0.12.2",
|
|
110
|
+
"@lexical/link": "^0.12.2",
|
|
111
|
+
"@lexical/list": "^0.12.2",
|
|
112
|
+
"@lexical/react": "^0.12.2",
|
|
113
|
+
"@lexical/rich-text": "^0.12.2",
|
|
114
|
+
"@lexical/selection": "^0.12.2",
|
|
115
|
+
"@lexical/utils": "^0.12.2",
|
|
114
116
|
"@react-spring/web": "^9.7.3",
|
|
115
117
|
"@visx/curve": "^2.1.0",
|
|
116
118
|
"@visx/group": "^3.3.0",
|
|
@@ -120,9 +122,9 @@
|
|
|
120
122
|
"@visx/threshold": "^2.12.2",
|
|
121
123
|
"@visx/visx": "2.16.0",
|
|
122
124
|
"anylogger": "^1.0.11",
|
|
123
|
-
"d3-array": "3.2.
|
|
125
|
+
"d3-array": "3.2.0",
|
|
124
126
|
"humanize-duration": "^3.27.3",
|
|
125
|
-
"lexical": "^0.12.
|
|
127
|
+
"lexical": "^0.12.2",
|
|
126
128
|
"notistack": "^3.0.1",
|
|
127
129
|
"ramda": "0.29.1",
|
|
128
130
|
"react-grid-layout": "^1.3.4",
|
|
@@ -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>
|