@etsoo/materialui 1.5.45 → 1.5.47
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/cjs/app/ReactApp.d.ts +5 -0
- package/lib/cjs/app/ReactApp.js +14 -5
- package/lib/mjs/app/ReactApp.d.ts +5 -0
- package/lib/mjs/app/ReactApp.js +14 -5
- package/package.json +12 -12
- package/src/app/ReactApp.ts +15 -5
|
@@ -183,6 +183,11 @@ export declare class ReactApp<S extends IAppSettings, D extends IUser> extends C
|
|
|
183
183
|
* @param dispatch User state dispatch
|
|
184
184
|
*/
|
|
185
185
|
userLogin(user: D, refreshToken: string, dispatch?: boolean): void;
|
|
186
|
+
/**
|
|
187
|
+
* User login callback
|
|
188
|
+
* @param user New user
|
|
189
|
+
*/
|
|
190
|
+
protected onUserLogin(user: D): Promise<void>;
|
|
186
191
|
/**
|
|
187
192
|
* User login dispatch
|
|
188
193
|
* @param user New user
|
package/lib/cjs/app/ReactApp.js
CHANGED
|
@@ -315,16 +315,25 @@ class ReactApp extends appscript_1.CoreApp {
|
|
|
315
315
|
this.doLoginDispatch(user);
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
|
+
/**
|
|
319
|
+
* User login callback
|
|
320
|
+
* @param user New user
|
|
321
|
+
*/
|
|
322
|
+
onUserLogin(user) {
|
|
323
|
+
return Promise.resolve();
|
|
324
|
+
}
|
|
318
325
|
/**
|
|
319
326
|
* User login dispatch
|
|
320
327
|
* @param user New user
|
|
321
328
|
*/
|
|
322
329
|
doLoginDispatch(user) {
|
|
323
|
-
|
|
324
|
-
this.userStateDispatch
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
330
|
+
this.onUserLogin(user).then(() => {
|
|
331
|
+
if (this.userStateDispatch != null)
|
|
332
|
+
this.userStateDispatch({
|
|
333
|
+
type: react_2.UserActionType.Login,
|
|
334
|
+
user
|
|
335
|
+
});
|
|
336
|
+
});
|
|
328
337
|
}
|
|
329
338
|
/**
|
|
330
339
|
* User logout
|
|
@@ -183,6 +183,11 @@ export declare class ReactApp<S extends IAppSettings, D extends IUser> extends C
|
|
|
183
183
|
* @param dispatch User state dispatch
|
|
184
184
|
*/
|
|
185
185
|
userLogin(user: D, refreshToken: string, dispatch?: boolean): void;
|
|
186
|
+
/**
|
|
187
|
+
* User login callback
|
|
188
|
+
* @param user New user
|
|
189
|
+
*/
|
|
190
|
+
protected onUserLogin(user: D): Promise<void>;
|
|
186
191
|
/**
|
|
187
192
|
* User login dispatch
|
|
188
193
|
* @param user New user
|
package/lib/mjs/app/ReactApp.js
CHANGED
|
@@ -307,16 +307,25 @@ export class ReactApp extends CoreApp {
|
|
|
307
307
|
this.doLoginDispatch(user);
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
|
+
/**
|
|
311
|
+
* User login callback
|
|
312
|
+
* @param user New user
|
|
313
|
+
*/
|
|
314
|
+
onUserLogin(user) {
|
|
315
|
+
return Promise.resolve();
|
|
316
|
+
}
|
|
310
317
|
/**
|
|
311
318
|
* User login dispatch
|
|
312
319
|
* @param user New user
|
|
313
320
|
*/
|
|
314
321
|
doLoginDispatch(user) {
|
|
315
|
-
|
|
316
|
-
this.userStateDispatch
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
322
|
+
this.onUserLogin(user).then(() => {
|
|
323
|
+
if (this.userStateDispatch != null)
|
|
324
|
+
this.userStateDispatch({
|
|
325
|
+
type: UserActionType.Login,
|
|
326
|
+
user
|
|
327
|
+
});
|
|
328
|
+
});
|
|
320
329
|
}
|
|
321
330
|
/**
|
|
322
331
|
* User logout
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/materialui",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.47",
|
|
4
4
|
"description": "TypeScript Material-UI Implementation",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"@dnd-kit/sortable": "^10.0.0",
|
|
41
41
|
"@emotion/react": "^11.14.0",
|
|
42
42
|
"@emotion/styled": "^11.14.0",
|
|
43
|
-
"@etsoo/appscript": "^1.6.
|
|
44
|
-
"@etsoo/notificationbase": "^1.1.
|
|
45
|
-
"@etsoo/react": "^1.8.
|
|
46
|
-
"@etsoo/shared": "^1.2.
|
|
47
|
-
"@mui/icons-material": "^7.0
|
|
48
|
-
"@mui/material": "^7.0
|
|
49
|
-
"@mui/x-data-grid": "^8.
|
|
43
|
+
"@etsoo/appscript": "^1.6.34",
|
|
44
|
+
"@etsoo/notificationbase": "^1.1.61",
|
|
45
|
+
"@etsoo/react": "^1.8.44",
|
|
46
|
+
"@etsoo/shared": "^1.2.72",
|
|
47
|
+
"@mui/icons-material": "^7.1.0",
|
|
48
|
+
"@mui/material": "^7.1.0",
|
|
49
|
+
"@mui/x-data-grid": "^8.3.0",
|
|
50
50
|
"chart.js": "^4.4.9",
|
|
51
51
|
"chartjs-plugin-datalabels": "^2.2.0",
|
|
52
52
|
"dompurify": "^3.2.5",
|
|
@@ -66,17 +66,17 @@
|
|
|
66
66
|
"@emotion/react": "$@emotion/react"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@babel/cli": "^7.27.
|
|
69
|
+
"@babel/cli": "^7.27.2",
|
|
70
70
|
"@babel/core": "^7.27.1",
|
|
71
71
|
"@babel/plugin-transform-runtime": "^7.27.1",
|
|
72
|
-
"@babel/preset-env": "^7.27.
|
|
72
|
+
"@babel/preset-env": "^7.27.2",
|
|
73
73
|
"@babel/preset-react": "^7.27.1",
|
|
74
74
|
"@babel/preset-typescript": "^7.27.1",
|
|
75
75
|
"@babel/runtime-corejs3": "^7.27.1",
|
|
76
76
|
"@testing-library/react": "^16.3.0",
|
|
77
77
|
"@types/pica": "^9.0.5",
|
|
78
78
|
"@types/pulltorefreshjs": "^0.1.7",
|
|
79
|
-
"@types/react": "^18.3.
|
|
79
|
+
"@types/react": "^18.3.21",
|
|
80
80
|
"@types/react-avatar-editor": "^13.0.4",
|
|
81
81
|
"@types/react-dom": "^18.3.7",
|
|
82
82
|
"@types/react-input-mask": "^3.0.6",
|
|
@@ -84,6 +84,6 @@
|
|
|
84
84
|
"@vitejs/plugin-react": "^4.4.1",
|
|
85
85
|
"jsdom": "^26.1.0",
|
|
86
86
|
"typescript": "^5.8.3",
|
|
87
|
-
"vitest": "^3.1.
|
|
87
|
+
"vitest": "^3.1.3"
|
|
88
88
|
}
|
|
89
89
|
}
|
package/src/app/ReactApp.ts
CHANGED
|
@@ -488,16 +488,26 @@ export class ReactApp<S extends IAppSettings, D extends IUser>
|
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
490
|
|
|
491
|
+
/**
|
|
492
|
+
* User login callback
|
|
493
|
+
* @param user New user
|
|
494
|
+
*/
|
|
495
|
+
protected onUserLogin(user: D) {
|
|
496
|
+
return Promise.resolve();
|
|
497
|
+
}
|
|
498
|
+
|
|
491
499
|
/**
|
|
492
500
|
* User login dispatch
|
|
493
501
|
* @param user New user
|
|
494
502
|
*/
|
|
495
503
|
protected doLoginDispatch(user: D) {
|
|
496
|
-
|
|
497
|
-
this.userStateDispatch
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
504
|
+
this.onUserLogin(user).then(() => {
|
|
505
|
+
if (this.userStateDispatch != null)
|
|
506
|
+
this.userStateDispatch({
|
|
507
|
+
type: UserActionType.Login,
|
|
508
|
+
user
|
|
509
|
+
});
|
|
510
|
+
});
|
|
501
511
|
}
|
|
502
512
|
|
|
503
513
|
/**
|