Skip to content

Commit a9d9592

Browse files
authored
Update dependencies (#19)
Signed-off-by: Hugo Marcellin <[email protected]>
1 parent c23d298 commit a9d9592

File tree

8 files changed

+10939
-7335
lines changed

8 files changed

+10939
-7335
lines changed

.prettierrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"trailingComma": "es5",
23
"tabWidth": 4,
34
"singleQuote": true
45
}

package-lock.json

Lines changed: 10801 additions & 7220 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 40 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -14,48 +14,50 @@
1414
"npm": "^10.2.0"
1515
},
1616
"dependencies": {
17-
"@emotion/react": "^11.8.2",
18-
"@emotion/styled": "^11.8.1",
19-
"@gridsuite/commons-ui": "0.51.0",
20-
"@hookform/resolvers": "^3.3.1",
21-
"@mui/icons-material": "^5.5.1",
22-
"@mui/lab": "^5.0.0-alpha.75",
23-
"@mui/material": "^5.5.3",
24-
"@reduxjs/toolkit": "^1.2.3",
17+
"@emotion/react": "^11.11.4",
18+
"@emotion/styled": "^11.11.5",
19+
"@gridsuite/commons-ui": "^0.52.1",
20+
"@hookform/resolvers": "^3.3.4",
21+
"@mui/icons-material": "^5.15.14",
22+
"@mui/lab": "5.0.0-alpha.169",
23+
"@mui/x-tree-view": "^6.17.0",
24+
"@mui/material": "^5.15.14",
25+
"@reduxjs/toolkit": "^2.2.3",
2526
"@types/core-js": "^2.5.8",
26-
"@types/node": "^18.19.3",
27-
"@types/prop-types": "^15.7.11",
28-
"@types/react": "^18.2.9",
29-
"@types/react-dom": "^18.2.4",
27+
"@types/node": "^20.12.2",
28+
"@types/prop-types": "^15.7.12",
29+
"@types/react": "^18.2.73",
30+
"@types/react-dom": "^18.2.23",
3031
"@types/react-window": "^1.8.8",
3132
"ag-grid-community": "^31.1.1",
32-
"ag-grid-react": "^31.1.1",
33-
"core-js": "^3.6.4",
34-
"notistack": "^3.0.0",
35-
"oidc-client": "^1.10.1",
36-
"prop-types": "^15.7.2",
37-
"react": "^18.0.0",
38-
"react-dom": "^18.0.0",
39-
"react-hook-form": "^7.46.1",
40-
"react-intl": "^6.0.0",
41-
"react-redux": "^8.0.0",
42-
"react-router-dom": "^6.0.0",
43-
"react-scripts": "^5.0.0",
44-
"react-window": "^1.8.5",
33+
"ag-grid-react": "^31.2.0",
34+
"core-js": "^3.36.1",
35+
"notistack": "^3.0.1",
36+
"oidc-client": "^1.11.5",
37+
"prop-types": "^15.8.1",
38+
"react": "^18.2.0",
39+
"react-dom": "^18.2.0",
40+
"react-hook-form": "^7.51.2",
41+
"react-intl": "^6.6.4",
42+
"react-redux": "^9.1.0",
43+
"react-router-dom": "^6.22.3",
44+
"react-scripts": "^5.0.1",
45+
"react-window": "^1.8.10",
4546
"reconnecting-websocket": "^4.4.0",
46-
"redux": "^4.0.5",
47-
"type-fest": "^4.11.1",
48-
"typeface-roboto": "^1.0.0",
49-
"typescript": "^5.1.3",
50-
"yup": "^1.2.0"
47+
"redux": "^5.0.1",
48+
"type-fest": "^4.14.0",
49+
"typeface-roboto": "^1.1.13",
50+
"typescript": "5.1.6",
51+
"yup": "^1.4.0"
5152
},
5253
"scripts": {
5354
"start": "PORT=3002 react-scripts start",
5455
"build": "react-scripts build",
5556
"test": "react-scripts test --watchAll=false",
5657
"test:watch": "react-scripts test",
5758
"test:coverage": "react-scripts test --coverage",
58-
"eject": "react-scripts eject"
59+
"eject": "react-scripts eject",
60+
"lint": "eslint . --ext js,mjs,jsx,ts,mts,tsx --max-warnings 0"
5961
},
6062
"jest": {
6163
"moduleNameMapper": {
@@ -88,13 +90,14 @@
8890
]
8991
},
9092
"devDependencies": {
93+
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
9194
"@types/eslint-config-prettier": "^6.11.3",
9295
"@types/eslint-plugin-prettier": "^3.1.3",
93-
"@types/jest": "^27.5.1",
94-
"@types/prettier": "^2.0.2",
95-
"eslint-config-prettier": "^8.0.0",
96-
"eslint-plugin-prettier": "^4.0.0",
97-
"http-proxy-middleware": "^2.0.0",
98-
"prettier": "^2.0.0"
96+
"@types/jest": "^29.5.12",
97+
"@types/prettier": "^3.0.0",
98+
"eslint-config-prettier": "^9.1.0",
99+
"eslint-plugin-prettier": "^4.2.1",
100+
"http-proxy-middleware": "^2.0.6",
101+
"prettier": "^2.8.8"
99102
}
100103
}

src/components/Grid/AgGrid.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export type AgGridRef<TData, TContext extends {}> = {
4949
*/
5050
type ForwardRef<Props, Ref> = typeof forwardRef<Props, Ref>;
5151
type ForwardRefComponent<Props, Ref> = ReturnType<ForwardRef<Props, Ref>>;
52+
5253
interface AgGridWithRef extends FunctionComponent<GridOptions<unknown>> {
5354
<TData, TContext extends {}>(
5455
props: PropsWithoutRef<GridOptions<TData>> &

src/components/Grid/GridTable.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export interface GridTableProps<TData>
6161
*/
6262
type ForwardRef<Props, Ref> = typeof forwardRef<Props, Ref>;
6363
type ForwardRefComponent<Props, Ref> = ReturnType<ForwardRef<Props, Ref>>;
64+
6465
interface GridTableWithRef
6566
extends FunctionComponent<PropsWithChildren<GridTableProps<unknown>>> {
6667
<TData, TContext extends {}>(

src/pages/users/UsersPage.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,13 @@ import {
3636
import { UserAdminSrv, UserInfos } from '../../services';
3737
import { useSnackMessage } from '@gridsuite/commons-ui';
3838
import { Controller, SubmitHandler, useForm } from 'react-hook-form';
39-
import { GetRowIdParams } from 'ag-grid-community/dist/lib/interfaces/iCallbackParams';
40-
import { TextFilterParams } from 'ag-grid-community/dist/lib/filter/provided/text/textFilter';
41-
import { ColDef, ICheckboxCellRendererParams } from 'ag-grid-community';
42-
import { SelectionChangedEvent } from 'ag-grid-community/dist/lib/events';
39+
import {
40+
ColDef,
41+
GetRowIdParams,
42+
ICheckboxCellRendererParams,
43+
SelectionChangedEvent,
44+
TextFilterParams,
45+
} from 'ag-grid-community';
4346

4447
const defaultColDef: ColDef<UserInfos> = {
4548
editable: false,

src/redux/reducer.ts

Lines changed: 85 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -85,77 +85,91 @@ export type AppStateKey = keyof AppState;
8585

8686
export const reducer: ReducerWithInitialState<AppState> = createReducer(
8787
initialState,
88-
{
89-
[SELECT_THEME]: (state: Draft<AppState>, action: ThemeAction) => {
90-
state.theme = action.theme;
91-
saveLocalStorageTheme(state.theme);
92-
},
93-
94-
[UPDATE_USER_MANAGER_STATE]: (
95-
state: Draft<AppState>,
96-
action: UserManagerAction
97-
) => {
98-
state.userManager = action.userManager;
99-
},
100-
[UPDATE_USER_MANAGER_INSTANCE]: (
101-
state: Draft<AppState>,
102-
action: UserManagerInstanceAction
103-
) => {
104-
state.userManager.instance = action.instance;
105-
},
106-
[UPDATE_USER_MANAGER_ERROR]: (
107-
state: Draft<AppState>,
108-
action: UserManagerErrorAction
109-
) => {
110-
state.userManager.error = action.error;
111-
},
112-
113-
[USER]: (state: Draft<AppState>, action: AnyAction) => {
88+
(builder) => {
89+
builder.addCase(
90+
SELECT_THEME,
91+
(state: Draft<AppState>, action: ThemeAction) => {
92+
state.theme = action.theme;
93+
saveLocalStorageTheme(state.theme);
94+
}
95+
);
96+
97+
builder.addCase(
98+
UPDATE_USER_MANAGER_STATE,
99+
(state: Draft<AppState>, action: UserManagerAction) => {
100+
state.userManager = action.userManager;
101+
}
102+
);
103+
104+
builder.addCase(
105+
UPDATE_USER_MANAGER_INSTANCE,
106+
(state: Draft<AppState>, action: UserManagerInstanceAction) => {
107+
state.userManager.instance = action.instance;
108+
}
109+
);
110+
111+
builder.addCase(
112+
UPDATE_USER_MANAGER_ERROR,
113+
(state: Draft<AppState>, action: UserManagerErrorAction) => {
114+
state.userManager.error = action.error;
115+
}
116+
);
117+
118+
builder.addCase(USER, (state: Draft<AppState>, action: AnyAction) => {
114119
state.user = action.user;
115-
},
116-
117-
[SIGNIN_CALLBACK_ERROR]: (
118-
state: Draft<AppState>,
119-
action: AnyAction
120-
) => {
121-
state.signInCallbackError = action.signInCallbackError;
122-
},
123-
124-
[UNAUTHORIZED_USER_INFO]: (
125-
state: Draft<AppState>,
126-
action: AnyAction
127-
) => {
128-
state.authenticationRouterError = action.authenticationRouterError;
129-
},
130-
131-
[LOGOUT_ERROR]: (state: Draft<AppState>, action: AnyAction) => {
132-
state.authenticationRouterError = action.authenticationRouterError;
133-
},
134-
135-
[USER_VALIDATION_ERROR]: (
136-
state: Draft<AppState>,
137-
action: AnyAction
138-
) => {
139-
state.authenticationRouterError = action.authenticationRouterError;
140-
},
141-
142-
[RESET_AUTHENTICATION_ROUTER_ERROR]: (
143-
state: Draft<AppState>,
144-
action: AnyAction
145-
) => {
146-
state.authenticationRouterError = null;
147-
},
148-
149-
[SHOW_AUTH_INFO_LOGIN]: (state: Draft<AppState>, action: AnyAction) => {
150-
state.showAuthenticationRouterLogin =
151-
action.showAuthenticationRouterLogin;
152-
},
153-
154-
[SELECT_COMPUTED_LANGUAGE]: (
155-
state: Draft<AppState>,
156-
action: ComputedLanguageAction
157-
) => {
158-
state.computedLanguage = action.computedLanguage;
159-
},
120+
});
121+
122+
builder.addCase(
123+
SIGNIN_CALLBACK_ERROR,
124+
(state: Draft<AppState>, action: AnyAction) => {
125+
state.signInCallbackError = action.signInCallbackError;
126+
}
127+
);
128+
129+
builder.addCase(
130+
UNAUTHORIZED_USER_INFO,
131+
(state: Draft<AppState>, action: AnyAction) => {
132+
state.authenticationRouterError =
133+
action.authenticationRouterError;
134+
}
135+
);
136+
137+
builder.addCase(
138+
LOGOUT_ERROR,
139+
(state: Draft<AppState>, action: AnyAction) => {
140+
state.authenticationRouterError =
141+
action.authenticationRouterError;
142+
}
143+
);
144+
145+
builder.addCase(
146+
USER_VALIDATION_ERROR,
147+
(state: Draft<AppState>, action: AnyAction) => {
148+
state.authenticationRouterError =
149+
action.authenticationRouterError;
150+
}
151+
);
152+
153+
builder.addCase(
154+
RESET_AUTHENTICATION_ROUTER_ERROR,
155+
(state: Draft<AppState>, action: AnyAction) => {
156+
state.authenticationRouterError = null;
157+
}
158+
);
159+
160+
builder.addCase(
161+
SHOW_AUTH_INFO_LOGIN,
162+
(state: Draft<AppState>, action: AnyAction) => {
163+
state.showAuthenticationRouterLogin =
164+
action.showAuthenticationRouterLogin;
165+
}
166+
);
167+
168+
builder.addCase(
169+
SELECT_COMPUTED_LANGUAGE,
170+
(state: Draft<AppState>, action: ComputedLanguageAction) => {
171+
state.computedLanguage = action.computedLanguage;
172+
}
173+
);
160174
}
161175
);

src/routes/ErrorPage.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default function ErrorPage(): ReactElement {
3535
{error.message || error?.data?.message || error.statusText}
3636
</i>
3737
</p>
38-
{isRouteErrorResponse(error) && error.error && (
38+
{isRouteErrorResponse(error) && error.data.error && (
3939
<pre
4040
style={{
4141
wordWrap: 'normal',
@@ -46,14 +46,14 @@ export default function ErrorPage(): ReactElement {
4646
{(function () {
4747
try {
4848
return JSON.stringify(
49-
error.error,
49+
error.data.error,
5050
undefined,
5151
2
5252
);
5353
} catch (e) {
5454
return null;
5555
}
56-
})() ?? `${error.error}`}
56+
})() ?? `${error.data.error}`}
5757
</code>
5858
</pre>
5959
)}

0 commit comments

Comments
 (0)