@etsoo/materialui 1.4.59 → 1.4.60

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.
@@ -7,9 +7,12 @@ import { ReactApp } from "./ReactApp";
7
7
  */
8
8
  export declare abstract class CommonApp<U extends IUser = IUser, P extends IPageData = IPageData, S extends IAppSettings = IAppSettings> extends ReactApp<S, U, P> {
9
9
  /**
10
- * Override persistedFields
10
+ * Constructor
11
+ * @param settings Settings
12
+ * @param name Application name
13
+ * @param debug Debug mode
11
14
  */
12
- protected get persistedFields(): string[];
15
+ constructor(settings: S, name: string, debug?: boolean);
13
16
  /**
14
17
  * Init call update fields in local storage
15
18
  * @returns Fields
@@ -6,10 +6,15 @@ import { ReactApp } from "./ReactApp";
6
6
  */
7
7
  export class CommonApp extends ReactApp {
8
8
  /**
9
- * Override persistedFields
9
+ * Constructor
10
+ * @param settings Settings
11
+ * @param name Application name
12
+ * @param debug Debug mode
10
13
  */
11
- get persistedFields() {
12
- return [...super.persistedFields, CoreConstants.FieldUserIdSaved];
14
+ constructor(settings, name, debug = false) {
15
+ super(settings, name, debug);
16
+ // Add persisted fields
17
+ this.persistedFields.push(CoreConstants.FieldUserIdSaved);
13
18
  }
14
19
  /**
15
20
  * Init call update fields in local storage
@@ -255,7 +255,11 @@ export class ReactApp extends CoreApp {
255
255
  else if (result != null && !this.tryLoginIgnoreResult(result)) {
256
256
  onFailure("ReactAppRefreshTokenFailed: " + JSON.stringify(result));
257
257
  }
258
- // Ignore other results
258
+ else {
259
+ // Ignore other results
260
+ onFailure("ReactAppRefreshTokenIgnoredFailure: " + JSON.stringify(result));
261
+ return true;
262
+ }
259
263
  });
260
264
  return true;
261
265
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.4.59",
3
+ "version": "1.4.60",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/index.js",
6
6
  "type": "module",
@@ -35,7 +35,7 @@
35
35
  "@emotion/css": "^11.13.5",
36
36
  "@emotion/react": "^11.14.0",
37
37
  "@emotion/styled": "^11.14.0",
38
- "@etsoo/appscript": "^1.5.83",
38
+ "@etsoo/appscript": "^1.5.84",
39
39
  "@etsoo/notificationbase": "^1.1.54",
40
40
  "@etsoo/react": "^1.8.17",
41
41
  "@etsoo/shared": "^1.2.55",
@@ -12,10 +12,16 @@ export abstract class CommonApp<
12
12
  S extends IAppSettings = IAppSettings
13
13
  > extends ReactApp<S, U, P> {
14
14
  /**
15
- * Override persistedFields
15
+ * Constructor
16
+ * @param settings Settings
17
+ * @param name Application name
18
+ * @param debug Debug mode
16
19
  */
17
- protected override get persistedFields() {
18
- return [...super.persistedFields, CoreConstants.FieldUserIdSaved];
20
+ constructor(settings: S, name: string, debug: boolean = false) {
21
+ super(settings, name, debug);
22
+
23
+ // Add persisted fields
24
+ this.persistedFields.push(CoreConstants.FieldUserIdSaved);
19
25
  }
20
26
 
21
27
  /**
@@ -453,8 +453,13 @@ export class ReactApp<
453
453
  onFailure("ReactAppRefreshTokenFailed");
454
454
  } else if (result != null && !this.tryLoginIgnoreResult(result)) {
455
455
  onFailure("ReactAppRefreshTokenFailed: " + JSON.stringify(result));
456
+ } else {
457
+ // Ignore other results
458
+ onFailure(
459
+ "ReactAppRefreshTokenIgnoredFailure: " + JSON.stringify(result)
460
+ );
461
+ return true;
456
462
  }
457
- // Ignore other results
458
463
  }
459
464
  );
460
465