@etsoo/appscript 1.2.76 → 1.2.77

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.
@@ -235,8 +235,9 @@ export interface ICoreApp<U extends IUser, S extends IAppSettings, N, C extends
235
235
  * Format result text
236
236
  * @param result Action result
237
237
  * @param forceToLocal Force to local labels
238
+ * @returns Message
238
239
  */
239
- formatResult(result: IActionResult, forceToLocal?: boolean): void;
240
+ formatResult(result: IActionResult, forceToLocal?: boolean): string;
240
241
  /**
241
242
  * Fresh countdown UI
242
243
  * @param callback Callback
@@ -691,7 +692,7 @@ export declare abstract class CoreApp<U extends IUser, S extends IAppSettings, N
691
692
  * @param result Action result
692
693
  * @param forceToLocal Force to local labels
693
694
  */
694
- formatResult(result: IActionResult, forceToLocal?: boolean): void;
695
+ formatResult(result: IActionResult, forceToLocal?: boolean): string;
695
696
  /**
696
697
  * Get culture resource
697
698
  * @param key key
@@ -421,8 +421,7 @@ class CoreApp {
421
421
  * @param callback Callback
422
422
  */
423
423
  alertResult(result, callback) {
424
- this.formatResult(result);
425
- this.notifier.alert(ActionResultError_1.ActionResultError.format(result), callback);
424
+ this.notifier.alert(this.formatResult(result), callback);
426
425
  }
427
426
  /**
428
427
  * Authorize
@@ -797,6 +796,7 @@ class CoreApp {
797
796
  if (fieldLabel)
798
797
  result.title = result.title.format(fieldLabel);
799
798
  }
799
+ return ActionResultError_1.ActionResultError.format(result);
800
800
  }
801
801
  /**
802
802
  * Get culture resource
@@ -48,6 +48,7 @@
48
48
  "expiry": "Expiry",
49
49
  "failed": "Operation failed",
50
50
  "field": "Field",
51
+ "help": "Help",
51
52
  "id": "Number#",
52
53
  "info": "Info",
53
54
  "itemExists": "'{0}' already exists",
@@ -48,6 +48,7 @@
48
48
  "expiry": "到期时间",
49
49
  "failed": "操作失败",
50
50
  "field": "字段",
51
+ "help": "帮助",
51
52
  "id": "编号",
52
53
  "info": "信息",
53
54
  "itemExists": "'{0}'已经存在",
@@ -48,6 +48,7 @@
48
48
  "expiry": "到期時間",
49
49
  "failed": "操作失敗",
50
50
  "field": "字段",
51
+ "help": "幫助",
51
52
  "id": "編號",
52
53
  "info": "信息",
53
54
  "itemExists": "'{0}'已经存在",
@@ -235,8 +235,9 @@ export interface ICoreApp<U extends IUser, S extends IAppSettings, N, C extends
235
235
  * Format result text
236
236
  * @param result Action result
237
237
  * @param forceToLocal Force to local labels
238
+ * @returns Message
238
239
  */
239
- formatResult(result: IActionResult, forceToLocal?: boolean): void;
240
+ formatResult(result: IActionResult, forceToLocal?: boolean): string;
240
241
  /**
241
242
  * Fresh countdown UI
242
243
  * @param callback Callback
@@ -691,7 +692,7 @@ export declare abstract class CoreApp<U extends IUser, S extends IAppSettings, N
691
692
  * @param result Action result
692
693
  * @param forceToLocal Force to local labels
693
694
  */
694
- formatResult(result: IActionResult, forceToLocal?: boolean): void;
695
+ formatResult(result: IActionResult, forceToLocal?: boolean): string;
695
696
  /**
696
697
  * Get culture resource
697
698
  * @param key key
@@ -418,8 +418,7 @@ export class CoreApp {
418
418
  * @param callback Callback
419
419
  */
420
420
  alertResult(result, callback) {
421
- this.formatResult(result);
422
- this.notifier.alert(ActionResultError.format(result), callback);
421
+ this.notifier.alert(this.formatResult(result), callback);
423
422
  }
424
423
  /**
425
424
  * Authorize
@@ -794,6 +793,7 @@ export class CoreApp {
794
793
  if (fieldLabel)
795
794
  result.title = result.title.format(fieldLabel);
796
795
  }
796
+ return ActionResultError.format(result);
797
797
  }
798
798
  /**
799
799
  * Get culture resource
@@ -48,6 +48,7 @@
48
48
  "expiry": "Expiry",
49
49
  "failed": "Operation failed",
50
50
  "field": "Field",
51
+ "help": "Help",
51
52
  "id": "Number#",
52
53
  "info": "Info",
53
54
  "itemExists": "'{0}' already exists",
@@ -48,6 +48,7 @@
48
48
  "expiry": "到期时间",
49
49
  "failed": "操作失败",
50
50
  "field": "字段",
51
+ "help": "帮助",
51
52
  "id": "编号",
52
53
  "info": "信息",
53
54
  "itemExists": "'{0}'已经存在",
@@ -48,6 +48,7 @@
48
48
  "expiry": "到期時間",
49
49
  "failed": "操作失敗",
50
50
  "field": "字段",
51
+ "help": "幫助",
51
52
  "id": "編號",
52
53
  "info": "信息",
53
54
  "itemExists": "'{0}'已经存在",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/appscript",
3
- "version": "1.2.76",
3
+ "version": "1.2.77",
4
4
  "description": "Applications shared TypeScript framework",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -52,7 +52,7 @@
52
52
  },
53
53
  "homepage": "https://github.com/ETSOO/AppScript#readme",
54
54
  "dependencies": {
55
- "@etsoo/notificationbase": "^1.1.5",
55
+ "@etsoo/notificationbase": "^1.1.6",
56
56
  "@etsoo/restclient": "^1.0.70",
57
57
  "@etsoo/shared": "^1.1.45",
58
58
  "@types/crypto-js": "^4.1.1",
@@ -347,8 +347,9 @@ export interface ICoreApp<
347
347
  * Format result text
348
348
  * @param result Action result
349
349
  * @param forceToLocal Force to local labels
350
+ * @returns Message
350
351
  */
351
- formatResult(result: IActionResult, forceToLocal?: boolean): void;
352
+ formatResult(result: IActionResult, forceToLocal?: boolean): string;
352
353
 
353
354
  /**
354
355
  * Fresh countdown UI
@@ -1109,8 +1110,7 @@ export abstract class CoreApp<
1109
1110
  * @param callback Callback
1110
1111
  */
1111
1112
  alertResult(result: IActionResult, callback?: NotificationReturn<void>) {
1112
- this.formatResult(result);
1113
- this.notifier.alert(ActionResultError.format(result), callback);
1113
+ this.notifier.alert(this.formatResult(result), callback);
1114
1114
  }
1115
1115
 
1116
1116
  /**
@@ -1566,6 +1566,8 @@ export abstract class CoreApp<
1566
1566
  const fieldLabel = this.get(result.field.formatInitial(false));
1567
1567
  if (fieldLabel) result.title = result.title.format(fieldLabel);
1568
1568
  }
1569
+
1570
+ return ActionResultError.format(result);
1569
1571
  }
1570
1572
 
1571
1573
  /**
@@ -48,6 +48,7 @@
48
48
  "expiry": "Expiry",
49
49
  "failed": "Operation failed",
50
50
  "field": "Field",
51
+ "help": "Help",
51
52
  "id": "Number#",
52
53
  "info": "Info",
53
54
  "itemExists": "'{0}' already exists",
@@ -48,6 +48,7 @@
48
48
  "expiry": "到期时间",
49
49
  "failed": "操作失败",
50
50
  "field": "字段",
51
+ "help": "帮助",
51
52
  "id": "编号",
52
53
  "info": "信息",
53
54
  "itemExists": "'{0}'已经存在",
@@ -48,6 +48,7 @@
48
48
  "expiry": "到期時間",
49
49
  "failed": "操作失敗",
50
50
  "field": "字段",
51
+ "help": "幫助",
51
52
  "id": "編號",
52
53
  "info": "信息",
53
54
  "itemExists": "'{0}'已经存在",