@etsoo/react 1.3.30 → 1.3.34
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/lib/app/ISmartERPUser.d.ts +4 -0
- package/lib/app/RefreshTokenRQ.d.ts +4 -0
- package/lib/app/ServiceApp.js +4 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/package.json +9 -9
- package/src/app/ISmartERPUser.ts +6 -1
- package/src/app/RefreshTokenRQ.ts +5 -0
- package/src/app/ServiceApp.ts +6 -0
- package/src/index.ts +1 -0
package/lib/app/ServiceApp.js
CHANGED
|
@@ -31,7 +31,11 @@ export class ServiceApp extends ReactApp {
|
|
|
31
31
|
* @param coreUser Core system user
|
|
32
32
|
*/
|
|
33
33
|
userLoginEx(user, refreshToken, coreUser) {
|
|
34
|
+
// Service user login
|
|
34
35
|
super.userLogin(user, refreshToken, false);
|
|
36
|
+
// Core system user
|
|
35
37
|
this.coreUser = coreUser;
|
|
38
|
+
// Core system API token
|
|
39
|
+
this.api.authorize(this.settings.authScheme, coreUser.token);
|
|
36
40
|
}
|
|
37
41
|
}
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/react",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.34",
|
|
4
4
|
"description": "TypeScript ReactJs framework",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -47,19 +47,19 @@
|
|
|
47
47
|
"homepage": "https://github.com/ETSOO/AppReact#readme",
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@emotion/css": "^11.5.0",
|
|
50
|
-
"@emotion/react": "^11.
|
|
50
|
+
"@emotion/react": "^11.7.0",
|
|
51
51
|
"@emotion/style": "^0.8.0",
|
|
52
52
|
"@emotion/styled": "^11.6.0",
|
|
53
|
-
"@etsoo/appscript": "^1.1.
|
|
53
|
+
"@etsoo/appscript": "^1.1.50",
|
|
54
54
|
"@etsoo/notificationbase": "^1.0.93",
|
|
55
55
|
"@etsoo/shared": "^1.0.75",
|
|
56
|
-
"@mui/icons-material": "^5.
|
|
57
|
-
"@mui/material": "^5.
|
|
56
|
+
"@mui/icons-material": "^5.2.0",
|
|
57
|
+
"@mui/material": "^5.2.2",
|
|
58
58
|
"@reach/router": "^1.3.4",
|
|
59
59
|
"@types/pica": "^5.1.3",
|
|
60
60
|
"@types/pulltorefreshjs": "^0.1.5",
|
|
61
61
|
"@types/reach__router": "^1.3.9",
|
|
62
|
-
"@types/react": "^17.0.
|
|
62
|
+
"@types/react": "^17.0.37",
|
|
63
63
|
"@types/react-avatar-editor": "^10.3.6",
|
|
64
64
|
"@types/react-dom": "^17.0.11",
|
|
65
65
|
"@types/react-input-mask": "^3.0.1",
|
|
@@ -81,13 +81,13 @@
|
|
|
81
81
|
"@babel/runtime-corejs3": "^7.16.3",
|
|
82
82
|
"@types/jest": "^27.0.3",
|
|
83
83
|
"@types/react-test-renderer": "^17.0.1",
|
|
84
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
85
|
-
"@typescript-eslint/parser": "^5.
|
|
84
|
+
"@typescript-eslint/eslint-plugin": "^5.5.0",
|
|
85
|
+
"@typescript-eslint/parser": "^5.5.0",
|
|
86
86
|
"eslint": "^8.3.0",
|
|
87
87
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
88
88
|
"eslint-plugin-import": "^2.25.3",
|
|
89
89
|
"eslint-plugin-react": "^7.27.1",
|
|
90
|
-
"jest": "^27.
|
|
90
|
+
"jest": "^27.4.2",
|
|
91
91
|
"react-test-renderer": "^17.0.2",
|
|
92
92
|
"ts-jest": "^27.0.7",
|
|
93
93
|
"typescript": "^4.5.2"
|
package/src/app/ISmartERPUser.ts
CHANGED
|
@@ -3,7 +3,12 @@ import { IActionResult, IUser } from '@etsoo/appscript';
|
|
|
3
3
|
/**
|
|
4
4
|
* SmartERP user interface
|
|
5
5
|
*/
|
|
6
|
-
export interface ISmartERPUser extends IUser {
|
|
6
|
+
export interface ISmartERPUser extends IUser {
|
|
7
|
+
/**
|
|
8
|
+
* Service refresh token
|
|
9
|
+
*/
|
|
10
|
+
readonly serviceToken?: string;
|
|
11
|
+
}
|
|
7
12
|
|
|
8
13
|
/**
|
|
9
14
|
* SmartERP user login result
|
package/src/app/ServiceApp.ts
CHANGED
|
@@ -58,7 +58,13 @@ export class ServiceApp<
|
|
|
58
58
|
refreshToken: string,
|
|
59
59
|
coreUser: ISmartERPUser
|
|
60
60
|
): void {
|
|
61
|
+
// Service user login
|
|
61
62
|
super.userLogin(user, refreshToken, false);
|
|
63
|
+
|
|
64
|
+
// Core system user
|
|
62
65
|
this.coreUser = coreUser;
|
|
66
|
+
|
|
67
|
+
// Core system API token
|
|
68
|
+
this.api.authorize(this.settings.authScheme, coreUser.token);
|
|
63
69
|
}
|
|
64
70
|
}
|