@ibiz-template/core 0.1.14 → 0.1.20
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/dist/index.esm.js +341 -0
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/out/error/index.d.ts +1 -0
- package/out/error/index.d.ts.map +1 -1
- package/out/error/index.js +1 -0
- package/out/error/notice-error/notice-error.d.ts +16 -0
- package/out/error/notice-error/notice-error.d.ts.map +1 -0
- package/out/error/notice-error/notice-error.js +17 -0
- package/out/ibizsys.d.ts +9 -1
- package/out/ibizsys.d.ts.map +1 -1
- package/out/ibizsys.js +9 -1
- package/out/interface/i-portal-async-action/i-portal-async-action.d.ts +83 -0
- package/out/interface/i-portal-async-action/i-portal-async-action.d.ts.map +1 -0
- package/out/interface/i-portal-async-action/i-portal-async-action.js +1 -0
- package/out/interface/i-portal-message/i-portal-message.d.ts +68 -0
- package/out/interface/i-portal-message/i-portal-message.d.ts.map +1 -0
- package/out/interface/i-portal-message/i-portal-message.js +1 -0
- package/out/interface/index.d.ts +2 -0
- package/out/interface/index.d.ts.map +1 -1
- package/out/utils/index.d.ts +1 -0
- package/out/utils/index.d.ts.map +1 -1
- package/out/utils/index.js +1 -0
- package/out/utils/message-center/base/message-all.d.ts +13 -0
- package/out/utils/message-center/base/message-all.d.ts.map +1 -0
- package/out/utils/message-center/base/message-all.js +12 -0
- package/out/utils/message-center/base/message-base.d.ts +68 -0
- package/out/utils/message-center/base/message-base.d.ts.map +1 -0
- package/out/utils/message-center/base/message-base.js +70 -0
- package/out/utils/message-center/command/change/command-change.d.ts +13 -0
- package/out/utils/message-center/command/change/command-change.d.ts.map +1 -0
- package/out/utils/message-center/command/change/command-change.js +12 -0
- package/out/utils/message-center/command/command-base/command-base.d.ts +20 -0
- package/out/utils/message-center/command/command-base/command-base.d.ts.map +1 -0
- package/out/utils/message-center/command/command-base/command-base.js +28 -0
- package/out/utils/message-center/command/create/command-create.d.ts +22 -0
- package/out/utils/message-center/command/create/command-create.d.ts.map +1 -0
- package/out/utils/message-center/command/create/command-create.js +22 -0
- package/out/utils/message-center/command/message-command.d.ts +68 -0
- package/out/utils/message-center/command/message-command.d.ts.map +1 -0
- package/out/utils/message-center/command/message-command.js +113 -0
- package/out/utils/message-center/command/remove/command-remove.d.ts +22 -0
- package/out/utils/message-center/command/remove/command-remove.d.ts.map +1 -0
- package/out/utils/message-center/command/remove/command-remove.js +22 -0
- package/out/utils/message-center/command/update/command-update.d.ts +22 -0
- package/out/utils/message-center/command/update/command-update.d.ts.map +1 -0
- package/out/utils/message-center/command/update/command-update.js +22 -0
- package/out/utils/message-center/console/message-console.d.ts +21 -0
- package/out/utils/message-center/console/message-console.d.ts.map +1 -0
- package/out/utils/message-center/console/message-console.js +29 -0
- package/out/utils/message-center/index.d.ts +2 -0
- package/out/utils/message-center/index.d.ts.map +1 -0
- package/out/utils/message-center/index.js +1 -0
- package/out/utils/message-center/interface/i-app-data-entity.d.ts +20 -0
- package/out/utils/message-center/interface/i-app-data-entity.d.ts.map +1 -0
- package/out/utils/message-center/interface/i-app-data-entity.js +1 -0
- package/out/utils/message-center/interface/index.d.ts +2 -0
- package/out/utils/message-center/interface/index.d.ts.map +1 -0
- package/out/utils/message-center/interface/index.js +1 -0
- package/out/utils/message-center/message-center.d.ts +63 -0
- package/out/utils/message-center/message-center.d.ts.map +1 -0
- package/out/utils/message-center/message-center.js +79 -0
- package/package.json +2 -2
- package/src/error/index.ts +1 -0
- package/src/error/notice-error/notice-error.ts +19 -0
- package/src/ibizsys.ts +10 -1
- package/src/interface/i-portal-async-action/i-portal-async-action.ts +90 -0
- package/src/interface/i-portal-message/i-portal-message.ts +79 -0
- package/src/interface/index.ts +2 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/message-center/base/message-all.ts +12 -0
- package/src/utils/message-center/base/message-base.ts +86 -0
- package/src/utils/message-center/command/change/command-change.ts +12 -0
- package/src/utils/message-center/command/command-base/command-base.ts +30 -0
- package/src/utils/message-center/command/create/command-create.ts +24 -0
- package/src/utils/message-center/command/message-command.ts +118 -0
- package/src/utils/message-center/command/remove/command-remove.ts +24 -0
- package/src/utils/message-center/command/update/command-update.ts +24 -0
- package/src/utils/message-center/console/message-console.ts +31 -0
- package/src/utils/message-center/index.ts +1 -0
- package/src/utils/message-center/interface/i-app-data-entity.ts +19 -0
- package/src/utils/message-center/interface/index.ts +1 -0
- package/src/utils/message-center/message-center.ts +82 -0
package/out/error/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/error/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/error/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC"}
|
package/out/error/index.js
CHANGED
|
@@ -2,3 +2,4 @@ export { HttpError } from './http-error/http-error';
|
|
|
2
2
|
export { ModelError } from './model-error/model-error';
|
|
3
3
|
export { RuntimeError } from './runtime-error/runtime-error';
|
|
4
4
|
export { RuntimeModelError } from './runtime-model-error/runtime-model-error';
|
|
5
|
+
export { NoticeError } from './notice-error/notice-error';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 纯输出通知信息的异常
|
|
3
|
+
*
|
|
4
|
+
* @author lxm
|
|
5
|
+
* @date 2022-09-21 18:09:09
|
|
6
|
+
* @export
|
|
7
|
+
* @class NoticeError
|
|
8
|
+
* @implements {Error}
|
|
9
|
+
*/
|
|
10
|
+
export declare class NoticeError extends Error {
|
|
11
|
+
message: string;
|
|
12
|
+
duration?: number | undefined;
|
|
13
|
+
name: string;
|
|
14
|
+
constructor(message: string, duration?: number | undefined);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=notice-error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notice-error.d.ts","sourceRoot":"","sources":["../../../src/error/notice-error/notice-error.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,qBAAa,WAAY,SAAQ,KAAK;IAI3B,OAAO,EAAE,MAAM;IACf,QAAQ,CAAC;IAJlB,IAAI,EAAE,MAAM,CAAkB;gBAGrB,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,oBAAQ;CAI3B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 纯输出通知信息的异常
|
|
3
|
+
*
|
|
4
|
+
* @author lxm
|
|
5
|
+
* @date 2022-09-21 18:09:09
|
|
6
|
+
* @export
|
|
7
|
+
* @class NoticeError
|
|
8
|
+
* @implements {Error}
|
|
9
|
+
*/
|
|
10
|
+
export class NoticeError extends Error {
|
|
11
|
+
constructor(message, duration) {
|
|
12
|
+
super(message);
|
|
13
|
+
this.message = message;
|
|
14
|
+
this.duration = duration;
|
|
15
|
+
this.name = 'notice Error';
|
|
16
|
+
}
|
|
17
|
+
}
|
package/out/ibizsys.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Logger } from 'loglevel';
|
|
2
2
|
import { CommandController } from './command';
|
|
3
3
|
import { OrgData } from './interface';
|
|
4
|
-
import { Net } from './utils';
|
|
4
|
+
import { MessageCenter, Net } from './utils';
|
|
5
5
|
/**
|
|
6
6
|
* 全局对象
|
|
7
7
|
*
|
|
@@ -42,6 +42,14 @@ export declare class IBizSys {
|
|
|
42
42
|
* @type {AuthService}
|
|
43
43
|
*/
|
|
44
44
|
commands: CommandController;
|
|
45
|
+
/**
|
|
46
|
+
* 界面消息中心
|
|
47
|
+
*
|
|
48
|
+
* @author chitanda
|
|
49
|
+
* @date 2023-09-05 17:09:38
|
|
50
|
+
* @type {MessageCenter}
|
|
51
|
+
*/
|
|
52
|
+
mc: MessageCenter;
|
|
45
53
|
/**
|
|
46
54
|
* sass 模式下的中心系统标识
|
|
47
55
|
*
|
package/out/ibizsys.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ibizsys.d.ts","sourceRoot":"","sources":["../src/ibizsys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ibizsys.d.ts","sourceRoot":"","sources":["../src/ibizsys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAG7C;;;;;;;GAOG;AACH,qBAAa,OAAO;IAClB;;;;;OAKG;IACH,GAAG,qCAAe;IAElB;;;;;;OAMG;IACH,GAAG,EAAE,MAAM,CAAU;IAErB;;;;;;OAMG;IACH,GAAG,EAAE,GAAG,CAAa;IAErB;;;;;;OAMG;IACH,QAAQ,EAAE,iBAAiB,CAA2B;IAEtD;;;;;;OAMG;IACH,EAAE,EAAE,aAAa,CAAuB;IAExC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC;CACjB"}
|
package/out/ibizsys.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CommandController } from './command';
|
|
2
2
|
import { Environment } from './environment/environment';
|
|
3
|
-
import { Net } from './utils';
|
|
3
|
+
import { MessageCenter, Net } from './utils';
|
|
4
4
|
import { logger } from './utils/logger/logger';
|
|
5
5
|
/**
|
|
6
6
|
* 全局对象
|
|
@@ -43,5 +43,13 @@ export class IBizSys {
|
|
|
43
43
|
* @type {AuthService}
|
|
44
44
|
*/
|
|
45
45
|
this.commands = new CommandController();
|
|
46
|
+
/**
|
|
47
|
+
* 界面消息中心
|
|
48
|
+
*
|
|
49
|
+
* @author chitanda
|
|
50
|
+
* @date 2023-09-05 17:09:38
|
|
51
|
+
* @type {MessageCenter}
|
|
52
|
+
*/
|
|
53
|
+
this.mc = new MessageCenter();
|
|
46
54
|
}
|
|
47
55
|
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 异步作业信息
|
|
3
|
+
*
|
|
4
|
+
* @author chitanda
|
|
5
|
+
* @date 2023-09-05 15:09:59
|
|
6
|
+
* @export
|
|
7
|
+
* @interface IPortalAsyncAction
|
|
8
|
+
*/
|
|
9
|
+
export interface IPortalAsyncAction {
|
|
10
|
+
/**
|
|
11
|
+
* 会话标识
|
|
12
|
+
*
|
|
13
|
+
* @author chitanda
|
|
14
|
+
* @date 2023-09-05 15:09:57
|
|
15
|
+
* @type {string}
|
|
16
|
+
*/
|
|
17
|
+
fulltopictag: string;
|
|
18
|
+
/**
|
|
19
|
+
* 异步作业类型
|
|
20
|
+
*
|
|
21
|
+
* @author chitanda
|
|
22
|
+
* @date 2023-09-05 15:09:09
|
|
23
|
+
* @type {string}
|
|
24
|
+
*/
|
|
25
|
+
actiontype: string;
|
|
26
|
+
/**
|
|
27
|
+
* 异步作业执行结果
|
|
28
|
+
*
|
|
29
|
+
* @author chitanda
|
|
30
|
+
* @date 2023-09-05 15:09:33
|
|
31
|
+
* @type {unknown}
|
|
32
|
+
*/
|
|
33
|
+
actionresult?: unknown;
|
|
34
|
+
/**
|
|
35
|
+
* 步骤信息
|
|
36
|
+
*
|
|
37
|
+
* @author chitanda
|
|
38
|
+
* @date 2023-09-05 15:09:55
|
|
39
|
+
* @type {string}
|
|
40
|
+
*/
|
|
41
|
+
stepinfo?: string;
|
|
42
|
+
/**
|
|
43
|
+
* 异步结果下载路径,目前是留给导出数据使用
|
|
44
|
+
*
|
|
45
|
+
* @author chitanda
|
|
46
|
+
* @date 2023-09-05 15:09:03
|
|
47
|
+
* @type {string}
|
|
48
|
+
*/
|
|
49
|
+
asyncresultdownloadurl?: string;
|
|
50
|
+
/**
|
|
51
|
+
* 预留参数
|
|
52
|
+
*
|
|
53
|
+
* @author chitanda
|
|
54
|
+
* @date 2023-09-05 15:09:32
|
|
55
|
+
* @type {unknown}
|
|
56
|
+
*/
|
|
57
|
+
actionparam?: unknown;
|
|
58
|
+
/**
|
|
59
|
+
*预留参数2
|
|
60
|
+
*
|
|
61
|
+
* @author chitanda
|
|
62
|
+
* @date 2023-09-05 15:09:41
|
|
63
|
+
* @type {unknown}
|
|
64
|
+
*/
|
|
65
|
+
actionparam2?: unknown;
|
|
66
|
+
/**
|
|
67
|
+
*预留参数3
|
|
68
|
+
*
|
|
69
|
+
* @author chitanda
|
|
70
|
+
* @date 2023-09-05 15:09:43
|
|
71
|
+
* @type {unknown}
|
|
72
|
+
*/
|
|
73
|
+
actionparam3?: unknown;
|
|
74
|
+
/**
|
|
75
|
+
*预留参数4
|
|
76
|
+
*
|
|
77
|
+
* @author chitanda
|
|
78
|
+
* @date 2023-09-05 15:09:45
|
|
79
|
+
* @type {unknown}
|
|
80
|
+
*/
|
|
81
|
+
actionparam4?: unknown;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=i-portal-async-action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i-portal-async-action.d.ts","sourceRoot":"","sources":["../../../src/interface/i-portal-async-action/i-portal-async-action.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;;OAMG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;;;OAMG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { IPortalAsyncAction } from '../i-portal-async-action/i-portal-async-action';
|
|
2
|
+
/**
|
|
3
|
+
* 消息数据
|
|
4
|
+
*
|
|
5
|
+
* @author chitanda
|
|
6
|
+
* @date 2023-09-05 15:09:02
|
|
7
|
+
* @export
|
|
8
|
+
* @interface IPortalMessage
|
|
9
|
+
*/
|
|
10
|
+
export interface IPortalMessage {
|
|
11
|
+
/**
|
|
12
|
+
* 消息标识
|
|
13
|
+
*
|
|
14
|
+
* @author chitanda
|
|
15
|
+
* @date 2023-09-05 15:09:43
|
|
16
|
+
* @type {string}
|
|
17
|
+
*/
|
|
18
|
+
messageid: string;
|
|
19
|
+
/**
|
|
20
|
+
* 消息名称
|
|
21
|
+
*
|
|
22
|
+
* @author chitanda
|
|
23
|
+
* @date 2023-09-05 15:09:49
|
|
24
|
+
* @type {string}
|
|
25
|
+
*/
|
|
26
|
+
messagename: string;
|
|
27
|
+
/**
|
|
28
|
+
* 消息类型
|
|
29
|
+
*
|
|
30
|
+
* @author chitanda
|
|
31
|
+
* @date 2023-09-05 15:09:09
|
|
32
|
+
* @type {('CONSOLE' | 'COMMAND')} 日志消息 | 命令
|
|
33
|
+
*/
|
|
34
|
+
type: 'CONSOLE' | 'COMMAND';
|
|
35
|
+
/**
|
|
36
|
+
* 消息子类型
|
|
37
|
+
*
|
|
38
|
+
* @author chitanda
|
|
39
|
+
* @date 2023-09-05 15:09:50
|
|
40
|
+
* @type {('MARKOPENDATA' | 'ASYNCACTION')} 标注打开数据 | 异步作业 | 数据更新 | 数据删除 | 数据创建
|
|
41
|
+
*/
|
|
42
|
+
subtype?: 'MARKOPENDATA' | 'ASYNCACTION' | 'OBJECTUPDATED' | 'OBJECTREMOVED' | 'OBJECTCREATED';
|
|
43
|
+
/**
|
|
44
|
+
* 内容摘要
|
|
45
|
+
*
|
|
46
|
+
* @author chitanda
|
|
47
|
+
* @date 2023-09-05 15:09:23
|
|
48
|
+
* @type {string}
|
|
49
|
+
*/
|
|
50
|
+
content?: string;
|
|
51
|
+
/**
|
|
52
|
+
* 消息数据
|
|
53
|
+
*
|
|
54
|
+
* @author chitanda
|
|
55
|
+
* @date 2023-09-05 15:09:55
|
|
56
|
+
* @type {(IPortalAsyncAction | IData | string | unknown)}
|
|
57
|
+
*/
|
|
58
|
+
data?: IPortalAsyncAction | IData | string | unknown;
|
|
59
|
+
/**
|
|
60
|
+
* 消息路径
|
|
61
|
+
*
|
|
62
|
+
* @author chitanda
|
|
63
|
+
* @date 2023-09-05 15:09:25
|
|
64
|
+
* @type {string}
|
|
65
|
+
*/
|
|
66
|
+
url?: string;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=i-portal-message.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i-portal-message.d.ts","sourceRoot":"","sources":["../../../src/interface/i-portal-message/i-portal-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAEpF;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;;OAMG;IACH,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;IAE5B;;;;;;OAMG;IACH,OAAO,CAAC,EACJ,cAAc,GACd,aAAa,GACb,eAAe,GACf,eAAe,GACf,eAAe,CAAC;IAEpB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,kBAAkB,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;IAErD;;;;;;OAMG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/out/interface/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * from './click-outside/click-outside';
|
|
2
2
|
export type { I18n } from './i-18n/i-18n';
|
|
3
3
|
export type { IEnvironment } from './i-environment/i-environment';
|
|
4
|
+
export type { IPortalAsyncAction } from './i-portal-async-action/i-portal-async-action';
|
|
5
|
+
export type { IPortalMessage } from './i-portal-message/i-portal-message';
|
|
4
6
|
export type { OrgData } from './org-data/org-data';
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interface/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,YAAY,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,YAAY,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,YAAY,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interface/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,YAAY,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,YAAY,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,YAAY,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AACxF,YAAY,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAC1E,YAAY,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC"}
|
package/out/utils/index.d.ts
CHANGED
package/out/utils/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,eAAe,CAAC;AAC9B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,QAAQ,CAAC;AACvB,cAAc,sBAAsB,CAAC;AACrC,cAAc,kCAAkC,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,eAAe,CAAC;AAC9B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,QAAQ,CAAC;AACvB,cAAc,sBAAsB,CAAC;AACrC,cAAc,kCAAkC,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC"}
|
package/out/utils/index.js
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MessageBase } from './message-base';
|
|
2
|
+
/**
|
|
3
|
+
* 所有消息
|
|
4
|
+
*
|
|
5
|
+
* @author chitanda
|
|
6
|
+
* @date 2023-09-05 16:09:34
|
|
7
|
+
* @export
|
|
8
|
+
* @class MessageAll
|
|
9
|
+
* @extends {MessageBase}
|
|
10
|
+
*/
|
|
11
|
+
export declare class MessageAll extends MessageBase {
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=message-all.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-all.d.ts","sourceRoot":"","sources":["../../../../src/utils/message-center/base/message-all.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;;;;;GAQG;AACH,qBAAa,UAAW,SAAQ,WAAW;CAAG"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { QXEvent } from 'qx-util';
|
|
2
|
+
import { IPortalMessage } from '../../../interface';
|
|
3
|
+
/**
|
|
4
|
+
* 消息事件
|
|
5
|
+
*
|
|
6
|
+
* @author chitanda
|
|
7
|
+
* @date 2023-09-05 16:09:17
|
|
8
|
+
* @interface MessageCenterEvent
|
|
9
|
+
*/
|
|
10
|
+
interface MessageCenterEvent {
|
|
11
|
+
all: (msg: IPortalMessage) => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 消息基类,各个类型消息继承此类
|
|
15
|
+
*
|
|
16
|
+
* @author chitanda
|
|
17
|
+
* @date 2023-09-05 16:09:41
|
|
18
|
+
* @export
|
|
19
|
+
* @class MessageBase
|
|
20
|
+
*/
|
|
21
|
+
export declare abstract class MessageBase {
|
|
22
|
+
protected parent?: MessageBase | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* 事件
|
|
25
|
+
*
|
|
26
|
+
* @author chitanda
|
|
27
|
+
* @date 2023-09-05 16:09:58
|
|
28
|
+
* @protected
|
|
29
|
+
* @type {QXEvent<MessageCenterEvent>}
|
|
30
|
+
*/
|
|
31
|
+
protected evt: QXEvent<MessageCenterEvent>;
|
|
32
|
+
constructor(parent?: MessageBase | undefined);
|
|
33
|
+
/**
|
|
34
|
+
* 推送标准结构消息
|
|
35
|
+
*
|
|
36
|
+
* @author chitanda
|
|
37
|
+
* @date 2023-09-05 16:09:40
|
|
38
|
+
* @param {IPortalMessage} msg
|
|
39
|
+
*/
|
|
40
|
+
next(msg: IPortalMessage): void;
|
|
41
|
+
/**
|
|
42
|
+
* 私有方法,专门向父级推送消息
|
|
43
|
+
*
|
|
44
|
+
* @author chitanda
|
|
45
|
+
* @date 2023-09-05 17:09:08
|
|
46
|
+
* @protected
|
|
47
|
+
* @param {IPortalMessage} msg
|
|
48
|
+
*/
|
|
49
|
+
protected nextParent(msg: IPortalMessage): void;
|
|
50
|
+
/**
|
|
51
|
+
* 订阅消息
|
|
52
|
+
*
|
|
53
|
+
* @author chitanda
|
|
54
|
+
* @date 2023-09-05 15:09:21
|
|
55
|
+
* @param {(msg: IPortalMessage) => void} evt
|
|
56
|
+
*/
|
|
57
|
+
on(cb: (msg: IPortalMessage) => void): void;
|
|
58
|
+
/**
|
|
59
|
+
* 取消订阅
|
|
60
|
+
*
|
|
61
|
+
* @author chitanda
|
|
62
|
+
* @date 2023-09-05 15:09:50
|
|
63
|
+
* @param {(msg: IPortalMessage) => void} cb
|
|
64
|
+
*/
|
|
65
|
+
off(cb: (msg: IPortalMessage) => void): void;
|
|
66
|
+
}
|
|
67
|
+
export {};
|
|
68
|
+
//# sourceMappingURL=message-base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-base.d.ts","sourceRoot":"","sources":["../../../../src/utils/message-center/base/message-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD;;;;;;GAMG;AACH,UAAU,kBAAkB;IAC1B,GAAG,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,IAAI,CAAC;CACpC;AAED;;;;;;;GAOG;AACH,8BAAsB,WAAW;IAWnB,SAAS,CAAC,MAAM,CAAC;IAV7B;;;;;;;OAOG;IACH,SAAS,CAAC,GAAG,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAqB;gBAEzC,MAAM,CAAC,yBAAa;IAE1C;;;;;;OAMG;IACH,IAAI,CAAC,GAAG,EAAE,cAAc,GAAG,IAAI;IAO/B;;;;;;;OAOG;IACH,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,cAAc,GAAG,IAAI;IAO/C;;;;;;OAMG;IACH,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,IAAI,GAAG,IAAI;IAI3C;;;;;;OAMG;IACH,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,IAAI,GAAG,IAAI;CAG7C"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { QXEvent } from 'qx-util';
|
|
2
|
+
/**
|
|
3
|
+
* 消息基类,各个类型消息继承此类
|
|
4
|
+
*
|
|
5
|
+
* @author chitanda
|
|
6
|
+
* @date 2023-09-05 16:09:41
|
|
7
|
+
* @export
|
|
8
|
+
* @class MessageBase
|
|
9
|
+
*/
|
|
10
|
+
export class MessageBase {
|
|
11
|
+
constructor(parent) {
|
|
12
|
+
this.parent = parent;
|
|
13
|
+
/**
|
|
14
|
+
* 事件
|
|
15
|
+
*
|
|
16
|
+
* @author chitanda
|
|
17
|
+
* @date 2023-09-05 16:09:58
|
|
18
|
+
* @protected
|
|
19
|
+
* @type {QXEvent<MessageCenterEvent>}
|
|
20
|
+
*/
|
|
21
|
+
this.evt = new QXEvent(1000);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 推送标准结构消息
|
|
25
|
+
*
|
|
26
|
+
* @author chitanda
|
|
27
|
+
* @date 2023-09-05 16:09:40
|
|
28
|
+
* @param {IPortalMessage} msg
|
|
29
|
+
*/
|
|
30
|
+
next(msg) {
|
|
31
|
+
this.evt.emit('all', msg);
|
|
32
|
+
if (this.parent) {
|
|
33
|
+
this.nextParent(msg);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* 私有方法,专门向父级推送消息
|
|
38
|
+
*
|
|
39
|
+
* @author chitanda
|
|
40
|
+
* @date 2023-09-05 17:09:08
|
|
41
|
+
* @protected
|
|
42
|
+
* @param {IPortalMessage} msg
|
|
43
|
+
*/
|
|
44
|
+
nextParent(msg) {
|
|
45
|
+
if (this.parent) {
|
|
46
|
+
this.parent.evt.emit('all', msg);
|
|
47
|
+
this.parent.nextParent(msg);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* 订阅消息
|
|
52
|
+
*
|
|
53
|
+
* @author chitanda
|
|
54
|
+
* @date 2023-09-05 15:09:21
|
|
55
|
+
* @param {(msg: IPortalMessage) => void} evt
|
|
56
|
+
*/
|
|
57
|
+
on(cb) {
|
|
58
|
+
this.evt.on('all', cb);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* 取消订阅
|
|
62
|
+
*
|
|
63
|
+
* @author chitanda
|
|
64
|
+
* @date 2023-09-05 15:09:50
|
|
65
|
+
* @param {(msg: IPortalMessage) => void} cb
|
|
66
|
+
*/
|
|
67
|
+
off(cb) {
|
|
68
|
+
this.evt.off('all', cb);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CommandBase } from '../command-base/command-base';
|
|
2
|
+
/**
|
|
3
|
+
* 数据变更指令消息
|
|
4
|
+
*
|
|
5
|
+
* @author chitanda
|
|
6
|
+
* @date 2023-09-05 17:09:49
|
|
7
|
+
* @export
|
|
8
|
+
* @class CommandChange
|
|
9
|
+
* @extends {CommandBase}
|
|
10
|
+
*/
|
|
11
|
+
export declare class CommandChange extends CommandBase {
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=command-change.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-change.d.ts","sourceRoot":"","sources":["../../../../../src/utils/message-center/command/change/command-change.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D;;;;;;;;GAQG;AACH,qBAAa,aAAc,SAAQ,WAAW;CAAG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CommandBase } from '../command-base/command-base';
|
|
2
|
+
/**
|
|
3
|
+
* 数据变更指令消息
|
|
4
|
+
*
|
|
5
|
+
* @author chitanda
|
|
6
|
+
* @date 2023-09-05 17:09:49
|
|
7
|
+
* @export
|
|
8
|
+
* @class CommandChange
|
|
9
|
+
* @extends {CommandBase}
|
|
10
|
+
*/
|
|
11
|
+
export class CommandChange extends CommandBase {
|
|
12
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IPortalMessage } from '../../../../interface';
|
|
2
|
+
import { MessageBase } from '../../base/message-base';
|
|
3
|
+
/**
|
|
4
|
+
* 指令消息基类
|
|
5
|
+
*
|
|
6
|
+
* @author chitanda
|
|
7
|
+
* @date 2023-09-05 16:09:11
|
|
8
|
+
* @export
|
|
9
|
+
* @class CommandBase
|
|
10
|
+
* @extends {MessageBase}
|
|
11
|
+
*/
|
|
12
|
+
export declare class CommandBase extends MessageBase {
|
|
13
|
+
/**
|
|
14
|
+
* 发送指令消息
|
|
15
|
+
* @param data 更新的数据
|
|
16
|
+
* @param subtype 数据更新 | 数据删除 | 数据创建
|
|
17
|
+
*/
|
|
18
|
+
protected sendCommand(data: IData, subtype: IPortalMessage['subtype']): void;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=command-base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-base.d.ts","sourceRoot":"","sources":["../../../../../src/utils/message-center/command/command-base/command-base.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD;;;;;;;;GAQG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;OAIG;IACH,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,SAAS,CAAC,GAAG,IAAI;CAU7E"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createUUID } from 'qx-util';
|
|
2
|
+
import { MessageBase } from '../../base/message-base';
|
|
3
|
+
/**
|
|
4
|
+
* 指令消息基类
|
|
5
|
+
*
|
|
6
|
+
* @author chitanda
|
|
7
|
+
* @date 2023-09-05 16:09:11
|
|
8
|
+
* @export
|
|
9
|
+
* @class CommandBase
|
|
10
|
+
* @extends {MessageBase}
|
|
11
|
+
*/
|
|
12
|
+
export class CommandBase extends MessageBase {
|
|
13
|
+
/**
|
|
14
|
+
* 发送指令消息
|
|
15
|
+
* @param data 更新的数据
|
|
16
|
+
* @param subtype 数据更新 | 数据删除 | 数据创建
|
|
17
|
+
*/
|
|
18
|
+
sendCommand(data, subtype) {
|
|
19
|
+
const msg = {
|
|
20
|
+
messageid: createUUID(),
|
|
21
|
+
messagename: 'command',
|
|
22
|
+
type: 'COMMAND',
|
|
23
|
+
subtype,
|
|
24
|
+
data,
|
|
25
|
+
};
|
|
26
|
+
this.next(msg);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IAppDataEntity } from '../../interface';
|
|
2
|
+
import { CommandBase } from '../command-base/command-base';
|
|
3
|
+
/**
|
|
4
|
+
* 创建指令消息
|
|
5
|
+
*
|
|
6
|
+
* @author chitanda
|
|
7
|
+
* @date 2023-09-05 17:09:57
|
|
8
|
+
* @export
|
|
9
|
+
* @class CommandCreate
|
|
10
|
+
* @extends {CommandBase}
|
|
11
|
+
*/
|
|
12
|
+
export declare class CommandCreate extends CommandBase {
|
|
13
|
+
/**
|
|
14
|
+
* 发送新建的数据
|
|
15
|
+
*
|
|
16
|
+
* @author chitanda
|
|
17
|
+
* @date 2023-09-05 17:09:13
|
|
18
|
+
* @param {IAppDataEntity} data
|
|
19
|
+
*/
|
|
20
|
+
send(data: IAppDataEntity): void;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=command-create.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-create.d.ts","sourceRoot":"","sources":["../../../../../src/utils/message-center/command/create/command-create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D;;;;;;;;GAQG;AACH,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;;;OAMG;IACH,IAAI,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI;CAGjC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CommandBase } from '../command-base/command-base';
|
|
2
|
+
/**
|
|
3
|
+
* 创建指令消息
|
|
4
|
+
*
|
|
5
|
+
* @author chitanda
|
|
6
|
+
* @date 2023-09-05 17:09:57
|
|
7
|
+
* @export
|
|
8
|
+
* @class CommandCreate
|
|
9
|
+
* @extends {CommandBase}
|
|
10
|
+
*/
|
|
11
|
+
export class CommandCreate extends CommandBase {
|
|
12
|
+
/**
|
|
13
|
+
* 发送新建的数据
|
|
14
|
+
*
|
|
15
|
+
* @author chitanda
|
|
16
|
+
* @date 2023-09-05 17:09:13
|
|
17
|
+
* @param {IAppDataEntity} data
|
|
18
|
+
*/
|
|
19
|
+
send(data) {
|
|
20
|
+
this.sendCommand(data, 'OBJECTCREATED');
|
|
21
|
+
}
|
|
22
|
+
}
|