@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.
@@ -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
@@ -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
- if (this.userStateDispatch != null)
324
- this.userStateDispatch({
325
- type: react_2.UserActionType.Login,
326
- user
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
@@ -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
- if (this.userStateDispatch != null)
316
- this.userStateDispatch({
317
- type: UserActionType.Login,
318
- user
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.45",
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.33",
44
- "@etsoo/notificationbase": "^1.1.60",
45
- "@etsoo/react": "^1.8.43",
46
- "@etsoo/shared": "^1.2.70",
47
- "@mui/icons-material": "^7.0.2",
48
- "@mui/material": "^7.0.2",
49
- "@mui/x-data-grid": "^8.2.0",
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.1",
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.1",
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.20",
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.2"
87
+ "vitest": "^3.1.3"
88
88
  }
89
89
  }
@@ -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
- if (this.userStateDispatch != null)
497
- this.userStateDispatch({
498
- type: UserActionType.Login,
499
- user
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
  /**