@etsoo/react 1.5.56 → 1.5.57
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/ReactApp.d.ts +4 -4
- package/package.json +2 -2
- package/src/app/ReactApp.ts +4 -5
package/lib/app/ReactApp.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CoreApp, IActionResult, IAppSettings, ICoreApp, IUser
|
|
1
|
+
import { CoreApp, IActionResult, IAppSettings, ICoreApp, IUser } from '@etsoo/appscript';
|
|
2
2
|
import { NotificationRenderProps, NotificationReturn } from '@etsoo/notificationbase';
|
|
3
3
|
import { DataTypes } from '@etsoo/shared';
|
|
4
4
|
import React from 'react';
|
|
@@ -28,7 +28,7 @@ export declare function ReactAppStateDetector(props: IStateProps): React.Functio
|
|
|
28
28
|
/**
|
|
29
29
|
* Core application interface
|
|
30
30
|
*/
|
|
31
|
-
export interface IReactApp<S extends IAppSettings, D extends IUser, P extends IPageData> extends ICoreApp<S, React.ReactNode, NotificationReactCallProps> {
|
|
31
|
+
export interface IReactApp<S extends IAppSettings, D extends IUser, P extends IPageData> extends ICoreApp<D, S, React.ReactNode, NotificationReactCallProps> {
|
|
32
32
|
/**
|
|
33
33
|
* User state
|
|
34
34
|
*/
|
|
@@ -64,7 +64,7 @@ export interface IReactApp<S extends IAppSettings, D extends IUser, P extends IP
|
|
|
64
64
|
/**
|
|
65
65
|
* React application
|
|
66
66
|
*/
|
|
67
|
-
export declare class ReactApp<S extends IAppSettings, D extends IUser, P extends IPageData> extends CoreApp<S, React.ReactNode, NotificationReactCallProps> implements IReactApp<S, D, P> {
|
|
67
|
+
export declare class ReactApp<S extends IAppSettings, D extends IUser, P extends IPageData> extends CoreApp<D, S, React.ReactNode, NotificationReactCallProps> implements IReactApp<S, D, P> {
|
|
68
68
|
private static _notifierProvider;
|
|
69
69
|
/**
|
|
70
70
|
* Get notifier provider
|
|
@@ -181,7 +181,7 @@ export declare class ReactApp<S extends IAppSettings, D extends IUser, P extends
|
|
|
181
181
|
* @param keep Keep in local storage or not
|
|
182
182
|
* @param dispatch User state dispatch
|
|
183
183
|
*/
|
|
184
|
-
userLogin(user:
|
|
184
|
+
userLogin(user: D, refreshToken: string, keep?: boolean, dispatch?: boolean): void;
|
|
185
185
|
/**
|
|
186
186
|
* User logout
|
|
187
187
|
* @param clearToken Clear refresh token or not
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/react",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.57",
|
|
4
4
|
"description": "TypeScript ReactJs framework",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@emotion/css": "^11.10.0",
|
|
50
50
|
"@emotion/react": "^11.10.0",
|
|
51
51
|
"@emotion/styled": "^11.10.0",
|
|
52
|
-
"@etsoo/appscript": "^1.2.
|
|
52
|
+
"@etsoo/appscript": "^1.2.71",
|
|
53
53
|
"@etsoo/notificationbase": "^1.1.4",
|
|
54
54
|
"@etsoo/shared": "^1.1.40",
|
|
55
55
|
"@mui/icons-material": "^5.8.4",
|
package/src/app/ReactApp.ts
CHANGED
|
@@ -6,8 +6,7 @@ import {
|
|
|
6
6
|
IActionResult,
|
|
7
7
|
IAppSettings,
|
|
8
8
|
ICoreApp,
|
|
9
|
-
IUser
|
|
10
|
-
IUserData
|
|
9
|
+
IUser
|
|
11
10
|
} from '@etsoo/appscript';
|
|
12
11
|
import {
|
|
13
12
|
NotificationMessageType,
|
|
@@ -94,7 +93,7 @@ export interface IReactApp<
|
|
|
94
93
|
S extends IAppSettings,
|
|
95
94
|
D extends IUser,
|
|
96
95
|
P extends IPageData
|
|
97
|
-
> extends ICoreApp<S, React.ReactNode, NotificationReactCallProps> {
|
|
96
|
+
> extends ICoreApp<D, S, React.ReactNode, NotificationReactCallProps> {
|
|
98
97
|
/**
|
|
99
98
|
* User state
|
|
100
99
|
*/
|
|
@@ -142,7 +141,7 @@ export class ReactApp<
|
|
|
142
141
|
D extends IUser,
|
|
143
142
|
P extends IPageData
|
|
144
143
|
>
|
|
145
|
-
extends CoreApp<S, React.ReactNode, NotificationReactCallProps>
|
|
144
|
+
extends CoreApp<D, S, React.ReactNode, NotificationReactCallProps>
|
|
146
145
|
implements IReactApp<S, D, P>
|
|
147
146
|
{
|
|
148
147
|
private static _notifierProvider: React.FunctionComponent<NotificationRenderProps>;
|
|
@@ -453,7 +452,7 @@ export class ReactApp<
|
|
|
453
452
|
* @param dispatch User state dispatch
|
|
454
453
|
*/
|
|
455
454
|
override userLogin(
|
|
456
|
-
user:
|
|
455
|
+
user: D,
|
|
457
456
|
refreshToken: string,
|
|
458
457
|
keep?: boolean,
|
|
459
458
|
dispatch?: boolean
|