@etsoo/react 1.3.33 → 1.3.37

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.
@@ -142,7 +142,7 @@ export class ReactApp extends CoreApp {
142
142
  await callback();
143
143
  else
144
144
  await this.tryLogin();
145
- }, {
145
+ }, undefined, {
146
146
  okLabel: labels.cancel,
147
147
  primaryButton: { fullWidth: true, autoFocus: false },
148
148
  inputs: progress
@@ -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
  }
@@ -350,7 +350,7 @@ export class NotifierMU extends NotifierReact {
350
350
  */
351
351
  addRaw(data, modal) {
352
352
  // Destruct
353
- const { type, content, title, align, timespan, ...rest } = data;
353
+ const { type, content, title, align, timespan = modal ? 0 : undefined, ...rest } = data;
354
354
  // Setup
355
355
  const n = new NotificationMU(type, content, title, align, timespan);
356
356
  // Assign other properties
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/react",
3
- "version": "1.3.33",
3
+ "version": "1.3.37",
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.6.0",
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.49",
54
- "@etsoo/notificationbase": "^1.0.93",
53
+ "@etsoo/appscript": "^1.1.53",
54
+ "@etsoo/notificationbase": "^1.0.94",
55
55
  "@etsoo/shared": "^1.0.75",
56
56
  "@mui/icons-material": "^5.2.0",
57
- "@mui/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.36",
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.4.0",
85
- "@typescript-eslint/parser": "^5.4.0",
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.3.1",
90
+ "jest": "^27.4.3",
91
91
  "react-test-renderer": "^17.0.2",
92
92
  "ts-jest": "^27.0.7",
93
93
  "typescript": "^4.5.2"
@@ -266,6 +266,7 @@ export class ReactApp<
266
266
  if (callback) await callback();
267
267
  else await this.tryLogin();
268
268
  },
269
+ undefined,
269
270
  {
270
271
  okLabel: labels.cancel,
271
272
  primaryButton: { fullWidth: true, autoFocus: false },
@@ -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
  }
@@ -581,7 +581,14 @@ export class NotifierMU extends NotifierReact {
581
581
  modal?: boolean
582
582
  ): INotificationReact {
583
583
  // Destruct
584
- const { type, content, title, align, timespan, ...rest } = data;
584
+ const {
585
+ type,
586
+ content,
587
+ title,
588
+ align,
589
+ timespan = modal ? 0 : undefined,
590
+ ...rest
591
+ } = data;
585
592
 
586
593
  // Setup
587
594
  const n = new NotificationMU(type, content, title, align, timespan);