@etsoo/appscript 1.4.83 → 1.4.84

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.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020 ETSOO
3
+ Copyright (c) 2004-2024 ETSOO® (亿速思维 ®), https://www.etsoo.com
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -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 { IUser } from '../state/User';
6
6
  import { IAppSettings } from './AppSettings';
@@ -462,8 +462,9 @@ export interface IApp {
462
462
  /**
463
463
  * Setup frontend logging
464
464
  * @param action Custom action
465
+ * @param preventDefault Is prevent default action
465
466
  */
466
- setupLogging(action?: (data: ErrorData) => void | Promise<void>): void;
467
+ setupLogging(action?: (data: ErrorData) => void | Promise<void>, preventDefault?: ((type: ErrorType) => boolean) | boolean): void;
467
468
  /**
468
469
  * Signout, with userLogout and toLoginPage
469
470
  */
@@ -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 { IUser } from '../state/User';
6
6
  import { IAppSettings } from './AppSettings';
@@ -462,8 +462,9 @@ export interface IApp {
462
462
  /**
463
463
  * Setup frontend logging
464
464
  * @param action Custom action
465
+ * @param preventDefault Is prevent default action
465
466
  */
466
- setupLogging(action?: (data: ErrorData) => void | Promise<void>): void;
467
+ setupLogging(action?: (data: ErrorData) => void | Promise<void>, preventDefault?: ((type: ErrorType) => boolean) | boolean): void;
467
468
  /**
468
469
  * Signout, with userLogout and toLoginPage
469
470
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/appscript",
3
- "version": "1.4.83",
3
+ "version": "1.4.84",
4
4
  "description": "Applications shared TypeScript framework",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -52,22 +52,22 @@
52
52
  },
53
53
  "homepage": "https://github.com/ETSOO/AppScript#readme",
54
54
  "dependencies": {
55
- "@etsoo/notificationbase": "^1.1.41",
56
- "@etsoo/restclient": "^1.1.2",
57
- "@etsoo/shared": "^1.2.34",
55
+ "@etsoo/notificationbase": "^1.1.42",
56
+ "@etsoo/restclient": "^1.1.3",
57
+ "@etsoo/shared": "^1.2.37",
58
58
  "crypto-js": "^4.2.0"
59
59
  },
60
60
  "devDependencies": {
61
- "@babel/cli": "^7.23.9",
62
- "@babel/core": "^7.24.0",
63
- "@babel/plugin-transform-runtime": "^7.24.0",
64
- "@babel/preset-env": "^7.24.0",
65
- "@babel/runtime-corejs3": "^7.24.0",
61
+ "@babel/cli": "^7.24.1",
62
+ "@babel/core": "^7.24.4",
63
+ "@babel/plugin-transform-runtime": "^7.24.3",
64
+ "@babel/preset-env": "^7.24.4",
65
+ "@babel/runtime-corejs3": "^7.24.4",
66
66
  "@types/crypto-js": "^4.2.2",
67
67
  "@types/jest": "^29.5.12",
68
68
  "jest": "^29.7.0",
69
69
  "jest-environment-jsdom": "^29.7.0",
70
70
  "ts-jest": "^29.1.2",
71
- "typescript": "^5.3.3"
71
+ "typescript": "^5.4.5"
72
72
  }
73
73
  }
package/src/app/IApp.ts CHANGED
@@ -10,6 +10,7 @@ import {
10
10
  DataTypes,
11
11
  DateUtils,
12
12
  ErrorData,
13
+ ErrorType,
13
14
  IActionResult,
14
15
  IStorage,
15
16
  ListType,
@@ -627,8 +628,12 @@ export interface IApp {
627
628
  /**
628
629
  * Setup frontend logging
629
630
  * @param action Custom action
631
+ * @param preventDefault Is prevent default action
630
632
  */
631
- setupLogging(action?: (data: ErrorData) => void | Promise<void>): void;
633
+ setupLogging(
634
+ action?: (data: ErrorData) => void | Promise<void>,
635
+ preventDefault?: ((type: ErrorType) => boolean) | boolean
636
+ ): void;
632
637
 
633
638
  /**
634
639
  * Signout, with userLogout and toLoginPage