@etsoo/appscript 1.4.82 → 1.4.83

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.
@@ -1,6 +1,6 @@
1
1
  import { INotifier, NotificationAlign, NotificationCallProps, NotificationContent, NotificationReturn } from '@etsoo/notificationbase';
2
2
  import { ApiDataError, IApi, IPData } from '@etsoo/restclient';
3
- import { DataTypes, DateUtils, ErrorData, IActionResult, IStorage, ListType, ListType1 } from '@etsoo/shared';
3
+ import { DataTypes, DateUtils, ErrorData, ErrorType, IActionResult, IStorage, ListType, ListType1 } from '@etsoo/shared';
4
4
  import { AddressRegion } from '../address/AddressRegion';
5
5
  import { EntityStatus } from '../business/EntityStatus';
6
6
  import { InitCallDto } from '../erp/dto/InitCallDto';
@@ -192,8 +192,9 @@ export declare abstract class CoreApp<U extends IUser, S extends IAppSettings, N
192
192
  /**
193
193
  * Setup frontend logging
194
194
  * @param action Custom action
195
+ * @param preventDefault Is prevent default action
195
196
  */
196
- setupLogging(action?: (data: ErrorData) => void | Promise<void>): void;
197
+ setupLogging(action?: (data: ErrorData) => void | Promise<void>, preventDefault?: ((type: ErrorType) => boolean) | boolean): void;
197
198
  /**
198
199
  * Api init call
199
200
  * @param data Data
@@ -329,8 +329,9 @@ class CoreApp {
329
329
  /**
330
330
  * Setup frontend logging
331
331
  * @param action Custom action
332
+ * @param preventDefault Is prevent default action
332
333
  */
333
- setupLogging(action) {
334
+ setupLogging(action, preventDefault) {
334
335
  action ?? (action = (data) => {
335
336
  this.api.post('Auth/LogFrontendError', data, {
336
337
  onError: (error) => {
@@ -341,7 +342,7 @@ class CoreApp {
341
342
  }
342
343
  });
343
344
  });
344
- shared_1.DomUtils.setupLogging(action);
345
+ shared_1.DomUtils.setupLogging(action, preventDefault);
345
346
  }
346
347
  /**
347
348
  * Api init call
@@ -1,6 +1,6 @@
1
1
  import { INotifier, NotificationAlign, NotificationCallProps, NotificationContent, NotificationReturn } from '@etsoo/notificationbase';
2
2
  import { ApiDataError, IApi, IPData } from '@etsoo/restclient';
3
- import { DataTypes, DateUtils, ErrorData, IActionResult, IStorage, ListType, ListType1 } from '@etsoo/shared';
3
+ import { DataTypes, DateUtils, ErrorData, ErrorType, IActionResult, IStorage, ListType, ListType1 } from '@etsoo/shared';
4
4
  import { AddressRegion } from '../address/AddressRegion';
5
5
  import { EntityStatus } from '../business/EntityStatus';
6
6
  import { InitCallDto } from '../erp/dto/InitCallDto';
@@ -192,8 +192,9 @@ export declare abstract class CoreApp<U extends IUser, S extends IAppSettings, N
192
192
  /**
193
193
  * Setup frontend logging
194
194
  * @param action Custom action
195
+ * @param preventDefault Is prevent default action
195
196
  */
196
- setupLogging(action?: (data: ErrorData) => void | Promise<void>): void;
197
+ setupLogging(action?: (data: ErrorData) => void | Promise<void>, preventDefault?: ((type: ErrorType) => boolean) | boolean): void;
197
198
  /**
198
199
  * Api init call
199
200
  * @param data Data
@@ -326,8 +326,9 @@ export class CoreApp {
326
326
  /**
327
327
  * Setup frontend logging
328
328
  * @param action Custom action
329
+ * @param preventDefault Is prevent default action
329
330
  */
330
- setupLogging(action) {
331
+ setupLogging(action, preventDefault) {
331
332
  action ?? (action = (data) => {
332
333
  this.api.post('Auth/LogFrontendError', data, {
333
334
  onError: (error) => {
@@ -338,7 +339,7 @@ export class CoreApp {
338
339
  }
339
340
  });
340
341
  });
341
- DomUtils.setupLogging(action);
342
+ DomUtils.setupLogging(action, preventDefault);
342
343
  }
343
344
  /**
344
345
  * Api init call
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/appscript",
3
- "version": "1.4.82",
3
+ "version": "1.4.83",
4
4
  "description": "Applications shared TypeScript framework",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -53,8 +53,8 @@
53
53
  "homepage": "https://github.com/ETSOO/AppScript#readme",
54
54
  "dependencies": {
55
55
  "@etsoo/notificationbase": "^1.1.41",
56
- "@etsoo/restclient": "^1.1.1",
57
- "@etsoo/shared": "^1.2.33",
56
+ "@etsoo/restclient": "^1.1.2",
57
+ "@etsoo/shared": "^1.2.34",
58
58
  "crypto-js": "^4.2.0"
59
59
  },
60
60
  "devDependencies": {
@@ -13,6 +13,7 @@ import {
13
13
  DateUtils,
14
14
  DomUtils,
15
15
  ErrorData,
16
+ ErrorType,
16
17
  IActionResult,
17
18
  IStorage,
18
19
  ListType,
@@ -522,8 +523,12 @@ export abstract class CoreApp<
522
523
  /**
523
524
  * Setup frontend logging
524
525
  * @param action Custom action
526
+ * @param preventDefault Is prevent default action
525
527
  */
526
- public setupLogging(action?: (data: ErrorData) => void | Promise<void>) {
528
+ public setupLogging(
529
+ action?: (data: ErrorData) => void | Promise<void>,
530
+ preventDefault?: ((type: ErrorType) => boolean) | boolean
531
+ ) {
527
532
  action ??= (data) => {
528
533
  this.api.post('Auth/LogFrontendError', data, {
529
534
  onError: (error) => {
@@ -535,7 +540,7 @@ export abstract class CoreApp<
535
540
  }
536
541
  });
537
542
  };
538
- DomUtils.setupLogging(action);
543
+ DomUtils.setupLogging(action, preventDefault);
539
544
  }
540
545
 
541
546
  /**