File tree Expand file tree Collapse file tree 7 files changed +8
-14
lines changed Expand file tree Collapse file tree 7 files changed +8
-14
lines changed Original file line number Diff line number Diff line change 32
32
"ag-grid-react" : " ^31.1.1" ,
33
33
"core-js" : " ^3.6.4" ,
34
34
"notistack" : " ^3.0.0" ,
35
+ "oidc-client" : " ^1.10.1" ,
35
36
"prop-types" : " ^15.7.2" ,
36
37
"react" : " ^18.0.0" ,
37
38
"react-dom" : " ^18.0.0" ,
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ import {
14
14
ThemeProvider ,
15
15
} from '@mui/material/styles' ;
16
16
import { SnackbarProvider } from '@gridsuite/commons-ui' ;
17
- import { UserManagerMock } from '@gridsuite/commons-ui/es/utils/UserManagerMock' ;
18
17
import { CssBaseline } from '@mui/material' ;
19
18
import { appRoutes } from '../../routes' ;
20
19
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ export type AppState = {
49
49
[ PARAM_LANGUAGE ] : LanguageParameters ;
50
50
51
51
userManager : UserManagerState ;
52
- user : User | null ; //TODO use true definition when commons-ui passed to typescript
52
+ user : User | null ; //TODO delete when migrated into commons-ui
53
53
signInCallbackError : unknown ;
54
54
authenticationRouterError : unknown ;
55
55
showAuthenticationRouterLogin : boolean ;
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ export function appRoutes(): RouteObject[] {
79
79
}
80
80
81
81
const AuthRouter : FunctionComponent < {
82
- userManager : ( typeof AuthenticationRouter ) [ 'userManager' ] ;
82
+ userManager : Parameters < typeof AuthenticationRouter > [ 0 ] [ 'userManager' ] ;
83
83
} > = ( props , context ) => {
84
84
const signInCallbackError = useSelector (
85
85
( state : AppState ) => state . signInCallbackError
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import { APP_NAME } from '../utils/config-params';
11
11
12
12
const STUDY_URL = `${ getRestBase ( ) } /study/v1` ;
13
13
14
- //TODO delete when commons-ui will be in typescript
14
+ //TODO delete when migrated into commons-ui
15
15
export type ServerAbout = {
16
16
type ?: 'app' | 'server' | 'other' ;
17
17
name ?: string ;
Original file line number Diff line number Diff line change 7
7
8
8
import { LANG_ENGLISH , LANG_FRENCH , LANG_SYSTEM } from '@gridsuite/commons-ui' ;
9
9
10
- const supportedLanguages = [ LANG_FRENCH , LANG_ENGLISH ] ;
11
- //export type SupportedLanguagesType = typeof supportedLanguages[number]; //TODO when commons-ui in typescript
12
- export type SupportedLanguages = 'en' | 'fr' ;
13
- //export type LanguageParameters = SupportedLanguages | typeof LANG_SYSTEM; //TODO when commons-ui in typescript
14
- export type LanguageParameters = SupportedLanguages | 'sys' ;
10
+ const supportedLanguages : string [ ] = [ LANG_FRENCH , LANG_ENGLISH ] ;
11
+ export type SupportedLanguages = typeof supportedLanguages [ number ] ;
12
+ export type LanguageParameters = SupportedLanguages | typeof LANG_SYSTEM ;
15
13
16
14
export function getSystemLanguage ( ) : SupportedLanguages {
17
15
const systemLanguage = navigator . language . split ( / [ - _ ] / ) [ 0 ] ;
@@ -25,6 +23,5 @@ export function getComputedLanguage(
25
23
) : SupportedLanguages {
26
24
return language === LANG_SYSTEM
27
25
? getSystemLanguage ( )
28
- : ( language as SupportedLanguages ) ;
29
- //TODO remove cast when commons-ui in typescript
26
+ : language ;
30
27
}
You can’t perform that action at this time.
0 commit comments