@etsoo/appscript 1.4.83 → 1.4.85

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
  */
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Query paging data
3
+ * 查询分页数据
4
+ */
5
+ export type QueryPagingData = {
6
+ /**
7
+ * Current page
8
+ */
9
+ currentPage?: number;
10
+ /**
11
+ * Batch size
12
+ */
13
+ batchSize: number;
14
+ /**
15
+ * Order by field name
16
+ */
17
+ orderBy?: string;
18
+ /**
19
+ * Order by ascending
20
+ */
21
+ orderByAsc?: boolean;
22
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,5 @@
1
1
  import { IdType } from '@etsoo/shared';
2
+ import { QueryPagingData } from './QueryPagingData';
2
3
  /**
3
4
  * Query request data
4
5
  * com.etsoo.CoreFramework.Models.QueryRQ
@@ -13,19 +14,7 @@ export type QueryRQ<T extends IdType = number> = {
13
14
  */
14
15
  sid?: string;
15
16
  /**
16
- * Current page
17
+ * Query paging data
17
18
  */
18
- currentPage?: number;
19
- /**
20
- * Batch size
21
- */
22
- batchSize: number;
23
- /**
24
- * Order by field name
25
- */
26
- orderBy?: string;
27
- /**
28
- * Order by ascending
29
- */
30
- orderByAsc?: boolean;
19
+ queryPaging?: QueryPagingData;
31
20
  };
@@ -50,6 +50,7 @@ export * from './erp/rq/OrgQueryRQ';
50
50
  export * from './erp/rq/ParsePinRQ';
51
51
  export * from './erp/rq/PlaceParseRQ';
52
52
  export * from './erp/rq/PlaceQueryRQ';
53
+ export * from './erp/rq/QueryPagingData';
53
54
  export * from './erp/rq/QueryRQ';
54
55
  export * from './erp/rq/RefreshTokenRQ';
55
56
  export * from './erp/rq/RegionsRQ';
package/lib/cjs/index.js CHANGED
@@ -74,6 +74,7 @@ __exportStar(require("./erp/rq/OrgQueryRQ"), exports);
74
74
  __exportStar(require("./erp/rq/ParsePinRQ"), exports);
75
75
  __exportStar(require("./erp/rq/PlaceParseRQ"), exports);
76
76
  __exportStar(require("./erp/rq/PlaceQueryRQ"), exports);
77
+ __exportStar(require("./erp/rq/QueryPagingData"), exports);
77
78
  __exportStar(require("./erp/rq/QueryRQ"), exports);
78
79
  __exportStar(require("./erp/rq/RefreshTokenRQ"), exports);
79
80
  __exportStar(require("./erp/rq/RegionsRQ"), exports);
@@ -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
  */
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Query paging data
3
+ * 查询分页数据
4
+ */
5
+ export type QueryPagingData = {
6
+ /**
7
+ * Current page
8
+ */
9
+ currentPage?: number;
10
+ /**
11
+ * Batch size
12
+ */
13
+ batchSize: number;
14
+ /**
15
+ * Order by field name
16
+ */
17
+ orderBy?: string;
18
+ /**
19
+ * Order by ascending
20
+ */
21
+ orderByAsc?: boolean;
22
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,5 @@
1
1
  import { IdType } from '@etsoo/shared';
2
+ import { QueryPagingData } from './QueryPagingData';
2
3
  /**
3
4
  * Query request data
4
5
  * com.etsoo.CoreFramework.Models.QueryRQ
@@ -13,19 +14,7 @@ export type QueryRQ<T extends IdType = number> = {
13
14
  */
14
15
  sid?: string;
15
16
  /**
16
- * Current page
17
+ * Query paging data
17
18
  */
18
- currentPage?: number;
19
- /**
20
- * Batch size
21
- */
22
- batchSize: number;
23
- /**
24
- * Order by field name
25
- */
26
- orderBy?: string;
27
- /**
28
- * Order by ascending
29
- */
30
- orderByAsc?: boolean;
19
+ queryPaging?: QueryPagingData;
31
20
  };
@@ -50,6 +50,7 @@ export * from './erp/rq/OrgQueryRQ';
50
50
  export * from './erp/rq/ParsePinRQ';
51
51
  export * from './erp/rq/PlaceParseRQ';
52
52
  export * from './erp/rq/PlaceQueryRQ';
53
+ export * from './erp/rq/QueryPagingData';
53
54
  export * from './erp/rq/QueryRQ';
54
55
  export * from './erp/rq/RefreshTokenRQ';
55
56
  export * from './erp/rq/RegionsRQ';
package/lib/mjs/index.js CHANGED
@@ -57,6 +57,7 @@ export * from './erp/rq/OrgQueryRQ';
57
57
  export * from './erp/rq/ParsePinRQ';
58
58
  export * from './erp/rq/PlaceParseRQ';
59
59
  export * from './erp/rq/PlaceQueryRQ';
60
+ export * from './erp/rq/QueryPagingData';
60
61
  export * from './erp/rq/QueryRQ';
61
62
  export * from './erp/rq/RefreshTokenRQ';
62
63
  export * from './erp/rq/RegionsRQ';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/appscript",
3
- "version": "1.4.83",
3
+ "version": "1.4.85",
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.5",
62
+ "@babel/core": "^7.24.5",
63
+ "@babel/plugin-transform-runtime": "^7.24.3",
64
+ "@babel/preset-env": "^7.24.5",
65
+ "@babel/runtime-corejs3": "^7.24.5",
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
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Query paging data
3
+ * 查询分页数据
4
+ */
5
+ export type QueryPagingData = {
6
+ /**
7
+ * Current page
8
+ */
9
+ currentPage?: number;
10
+
11
+ /**
12
+ * Batch size
13
+ */
14
+ batchSize: number;
15
+
16
+ /**
17
+ * Order by field name
18
+ */
19
+ orderBy?: string;
20
+
21
+ /**
22
+ * Order by ascending
23
+ */
24
+ orderByAsc?: boolean;
25
+ };
@@ -1,4 +1,5 @@
1
1
  import { IdType } from '@etsoo/shared';
2
+ import { QueryPagingData } from './QueryPagingData';
2
3
 
3
4
  /**
4
5
  * Query request data
@@ -16,22 +17,7 @@ export type QueryRQ<T extends IdType = number> = {
16
17
  sid?: string;
17
18
 
18
19
  /**
19
- * Current page
20
+ * Query paging data
20
21
  */
21
- currentPage?: number;
22
-
23
- /**
24
- * Batch size
25
- */
26
- batchSize: number;
27
-
28
- /**
29
- * Order by field name
30
- */
31
- orderBy?: string;
32
-
33
- /**
34
- * Order by ascending
35
- */
36
- orderByAsc?: boolean;
22
+ queryPaging?: QueryPagingData;
37
23
  };
package/src/index.ts CHANGED
@@ -63,6 +63,7 @@ export * from './erp/rq/OrgQueryRQ';
63
63
  export * from './erp/rq/ParsePinRQ';
64
64
  export * from './erp/rq/PlaceParseRQ';
65
65
  export * from './erp/rq/PlaceQueryRQ';
66
+ export * from './erp/rq/QueryPagingData';
66
67
  export * from './erp/rq/QueryRQ';
67
68
  export * from './erp/rq/RefreshTokenRQ';
68
69
  export * from './erp/rq/RegionsRQ';