@ibiz-template/core 0.7.41-alpha.12 → 0.7.41-alpha.138
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 +94 -23
- package/dist/index.system.min.js +1 -1
- package/out/environment/environment.d.ts.map +1 -1
- package/out/environment/environment.js +10 -0
- package/out/error/http-error/http-error-factory.d.ts +1 -1
- package/out/error/http-error/http-error-factory.d.ts.map +1 -1
- package/out/error/http-error/http-error-factory.js +11 -1
- package/out/error/http-error/http-error.d.ts +2 -2
- package/out/error/http-error/http-error.d.ts.map +1 -1
- package/out/interface/api/chat-message/i-api-chat-message.d.ts +63 -0
- package/out/interface/api/chat-message/i-api-chat-message.d.ts.map +1 -0
- package/out/interface/api/chat-message/i-api-chat-message.js +1 -0
- package/out/interface/api/chat-message/index.d.ts +2 -0
- package/out/interface/api/chat-message/index.d.ts.map +1 -0
- package/out/interface/api/chat-message/index.js +1 -0
- package/out/interface/api/environment/i-devtool-config.d.ts +29 -1
- package/out/interface/api/environment/i-devtool-config.d.ts.map +1 -1
- package/out/interface/api/environment/i-environment.d.ts +146 -1
- package/out/interface/api/environment/i-environment.d.ts.map +1 -1
- package/out/interface/api/ibizsys/i-app-data.d.ts +57 -0
- package/out/interface/api/ibizsys/i-app-data.d.ts.map +1 -0
- package/out/interface/api/ibizsys/i-app-data.js +1 -0
- package/out/interface/api/ibizsys/i-org-data.d.ts +1 -1
- package/out/interface/api/ibizsys/index.d.ts +1 -0
- package/out/interface/api/ibizsys/index.d.ts.map +1 -1
- package/out/interface/api/index.d.ts +1 -0
- package/out/interface/api/index.d.ts.map +1 -1
- package/out/interface/api/index.js +1 -0
- package/out/interface/api/utils/i-api-i18n.d.ts +9 -9
- package/out/interface/api/utils/index.d.ts +1 -0
- package/out/interface/api/utils/index.d.ts.map +1 -1
- package/out/interface/api/utils/message-center/base/i-message-base.d.ts +3 -3
- package/out/interface/api/utils/message-center/command/add-in-changed/i-command-add-in-changed.d.ts +1 -1
- package/out/interface/api/utils/message-center/command/async-action/i-command-async-action.d.ts +1 -1
- package/out/interface/api/utils/message-center/command/i-message-command.d.ts +1 -1
- package/out/interface/api/utils/message-center/command/internal-message/i-command-internal-message.d.ts +1 -1
- package/out/interface/api/utils/message-center/command/mark-open-data/i-command-mark-open-data.d.ts +1 -1
- package/out/interface/api/utils/message-center/common/i-message-center-event.d.ts +5 -0
- package/out/interface/api/utils/message-center/common/i-message-center-event.d.ts.map +1 -1
- package/out/interface/api/utils/message-center/common/i-portal-message.d.ts +3 -3
- package/out/interface/api/utils/message-center/console/i-message-console.d.ts +1 -1
- package/out/interface/api/utils/message-center/error/i-message-error.d.ts +1 -1
- package/out/interface/api/utils/message-center/i-message-center.d.ts +2 -2
- package/out/interface/api/utils/net/i-api-http-error.d.ts +39 -0
- package/out/interface/api/utils/net/i-api-http-error.d.ts.map +1 -0
- package/out/interface/api/utils/net/i-api-http-error.js +1 -0
- package/out/interface/api/utils/net/i-api-net.d.ts +1 -1
- package/out/interface/i-chat-message/i-chat-message.d.ts +2 -49
- package/out/interface/i-chat-message/i-chat-message.d.ts.map +1 -1
- package/out/utils/download-file/download-file.d.ts.map +1 -1
- package/out/utils/download-file/download-file.js +5 -1
- package/out/utils/interceptor/core-interceptor.js +2 -1
- package/out/utils/net/http-response.d.ts +2 -1
- package/out/utils/net/http-response.d.ts.map +1 -1
- package/out/utils/net/http-response.js +5 -1
- package/out/utils/net/net.d.ts +1 -1
- package/out/utils/net/net.d.ts.map +1 -1
- package/out/utils/net/net.js +16 -6
- package/out/utils/recursive/find-recursive-child.d.ts +20 -0
- package/out/utils/recursive/find-recursive-child.d.ts.map +1 -1
- package/out/utils/recursive/find-recursive-child.js +69 -7
- package/out/utils/string-util/string-util.d.ts.map +1 -1
- package/out/utils/string-util/string-util.js +2 -4
- package/package.json +5 -4
- package/src/command/command-register.ts +121 -0
- package/src/command/command.ts +78 -0
- package/src/command/index.ts +8 -0
- package/src/command/utils/index.ts +2 -0
- package/src/command/utils/linked-list.ts +136 -0
- package/src/command/utils/util.ts +103 -0
- package/src/constant/core/core.ts +54 -0
- package/src/constant/emoji/emoji.ts +2929 -0
- package/src/constant/http-status-message/http-status-message.ts +18 -0
- package/src/constant/index.ts +4 -0
- package/src/constant/util/util.ts +3 -0
- package/src/context/index.ts +231 -0
- package/src/environment/environment.ts +67 -0
- package/src/error/http-error/entity-error.ts +29 -0
- package/src/error/http-error/http-error-factory.ts +33 -0
- package/src/error/http-error/http-error.ts +52 -0
- package/src/error/index.ts +7 -0
- package/src/error/model-error/model-error.ts +27 -0
- package/src/error/notice-error/notice-error.ts +16 -0
- package/src/error/runtime-error/runtime-error.ts +13 -0
- package/src/error/runtime-model-error/runtime-model-error.ts +27 -0
- package/src/ibizsys.ts +82 -0
- package/src/index.ts +14 -0
- package/src/install.ts +12 -0
- package/src/interface/api/chat-message/i-api-chat-message.ts +71 -0
- package/src/interface/api/chat-message/index.ts +1 -0
- package/src/interface/api/constant/index.ts +2 -0
- package/src/interface/api/constant/login-mode/login-mode.ts +25 -0
- package/src/interface/api/constant/menu-permission-mode/menu-permission-mode.ts +20 -0
- package/src/interface/api/environment/i-devtool-config.ts +76 -0
- package/src/interface/api/environment/i-environment.ts +532 -0
- package/src/interface/api/environment/index.ts +2 -0
- package/src/interface/api/global-param/i-api-context.ts +37 -0
- package/src/interface/api/global-param/i-global-param.ts +27 -0
- package/src/interface/api/global-param/index.ts +2 -0
- package/src/interface/api/ibizsys/i-api-ibizsys.ts +54 -0
- package/src/interface/api/ibizsys/i-app-data.ts +64 -0
- package/src/interface/api/ibizsys/i-org-data.ts +31 -0
- package/src/interface/api/ibizsys/index.ts +3 -0
- package/src/interface/api/index.ts +6 -0
- package/src/interface/api/utils/i-api-i18n.ts +56 -0
- package/src/interface/api/utils/index.ts +5 -0
- package/src/interface/api/utils/message-center/base/i-message-all.ts +8 -0
- package/src/interface/api/utils/message-center/base/i-message-base.ts +29 -0
- package/src/interface/api/utils/message-center/base/index.ts +2 -0
- package/src/interface/api/utils/message-center/command/add-in-changed/i-add-in-changed.ts +25 -0
- package/src/interface/api/utils/message-center/command/add-in-changed/i-command-add-in-changed.ts +16 -0
- package/src/interface/api/utils/message-center/command/async-action/i-command-async-action.ts +17 -0
- package/src/interface/api/utils/message-center/command/change/i-command-change.ts +8 -0
- package/src/interface/api/utils/message-center/command/create/i-command-create.ts +18 -0
- package/src/interface/api/utils/message-center/command/i-command-base.ts +23 -0
- package/src/interface/api/utils/message-center/command/i-message-command.ts +94 -0
- package/src/interface/api/utils/message-center/command/index.ts +20 -0
- package/src/interface/api/utils/message-center/command/internal-message/i-command-internal-message.ts +17 -0
- package/src/interface/api/utils/message-center/command/internal-message/i-internal-message.ts +132 -0
- package/src/interface/api/utils/message-center/command/mark-open-data/i-command-mark-open-data.ts +17 -0
- package/src/interface/api/utils/message-center/command/mark-open-data/i-mark-open-data.ts +47 -0
- package/src/interface/api/utils/message-center/command/remove/i-command-remove.ts +18 -0
- package/src/interface/api/utils/message-center/command/update/i-command-update.ts +18 -0
- package/src/interface/api/utils/message-center/common/i-app-data-entity.ts +16 -0
- package/src/interface/api/utils/message-center/common/i-message-center-event.ts +15 -0
- package/src/interface/api/utils/message-center/common/i-msg-meta-data.ts +13 -0
- package/src/interface/api/utils/message-center/common/i-portal-async-action.ts +144 -0
- package/src/interface/api/utils/message-center/common/i-portal-message.ts +84 -0
- package/src/interface/api/utils/message-center/common/index.ts +5 -0
- package/src/interface/api/utils/message-center/console/i-message-console.ts +17 -0
- package/src/interface/api/utils/message-center/error/i-message-error.ts +17 -0
- package/src/interface/api/utils/message-center/i-message-center.ts +53 -0
- package/src/interface/api/utils/message-center/index.ts +6 -0
- package/src/interface/api/utils/net/i-api-http-error.ts +43 -0
- package/src/interface/api/utils/net/i-api-net.ts +93 -0
- package/src/interface/api/utils/net/i-http-response.ts +67 -0
- package/src/interface/click-outside/click-outside.ts +51 -0
- package/src/interface/command/command/i-command-option.ts +47 -0
- package/src/interface/command/command/i-command.ts +68 -0
- package/src/interface/command/disposable/i-disposable.ts +12 -0
- package/src/interface/command/i-command-controller.ts +50 -0
- package/src/interface/command/index.ts +11 -0
- package/src/interface/context/index.ts +42 -0
- package/src/interface/error/index.ts +13 -0
- package/src/interface/i-chat-message/i-chat-message.ts +16 -0
- package/src/interface/ibizsys/i-ibizsys.ts +33 -0
- package/src/interface/ibizsys/index.ts +1 -0
- package/src/interface/index.ts +11 -0
- package/src/interface/utils/i-18n.ts +22 -0
- package/src/interface/utils/index.ts +1 -0
- package/src/locale/en/index.ts +30 -0
- package/src/locale/index.ts +2 -0
- package/src/locale/zh-CN/index.ts +28 -0
- package/src/params/params.ts +131 -0
- package/src/types.ts +26 -0
- package/src/utils/bit-mask/bit-mask.ts +87 -0
- package/src/utils/click-outside/click-outside.ts +108 -0
- package/src/utils/clone/clone.ts +38 -0
- package/src/utils/color/color.ts +84 -0
- package/src/utils/cookie-util/cookie-util.ts +192 -0
- package/src/utils/data-type/data-types.ts +93 -0
- package/src/utils/download-file/download-file.ts +110 -0
- package/src/utils/event/event.ts +69 -0
- package/src/utils/history-list/history-item.ts +41 -0
- package/src/utils/history-list/history-list.ts +137 -0
- package/src/utils/index.ts +24 -0
- package/src/utils/interceptor/core-interceptor.ts +127 -0
- package/src/utils/interceptor/index.ts +2 -0
- package/src/utils/interceptor/interceptor.ts +122 -0
- package/src/utils/logger/logger.ts +34 -0
- package/src/utils/message-center/base/message-all.ts +10 -0
- package/src/utils/message-center/base/message-base.ts +73 -0
- package/src/utils/message-center/command/add-in-changed/command-add-in-changed.ts +23 -0
- package/src/utils/message-center/command/async-action/command-async-action.ts +23 -0
- package/src/utils/message-center/command/change/command-change.ts +11 -0
- package/src/utils/message-center/command/command-base/command-base.ts +35 -0
- package/src/utils/message-center/command/create/command-create.ts +25 -0
- package/src/utils/message-center/command/internal-message/command-internal-message.ts +26 -0
- package/src/utils/message-center/command/mark-open-data/command-mark-open-data.ts +23 -0
- package/src/utils/message-center/command/message-command.ts +162 -0
- package/src/utils/message-center/command/remove/command-remove.ts +25 -0
- package/src/utils/message-center/command/update/command-update.ts +25 -0
- package/src/utils/message-center/console/message-console.ts +27 -0
- package/src/utils/message-center/error/message-error.ts +27 -0
- package/src/utils/message-center/index.ts +1 -0
- package/src/utils/message-center/message-center.ts +77 -0
- package/src/utils/namespace/namespace.ts +217 -0
- package/src/utils/net/http-response.ts +60 -0
- package/src/utils/net/net.ts +463 -0
- package/src/utils/recursive/find-recursive-child.ts +238 -0
- package/src/utils/string-util/string-util.ts +76 -0
- package/src/utils/style/remote-style.ts +17 -0
- package/src/utils/sync/await-timeout.ts +29 -0
- package/src/utils/sync/count-latch.ts +79 -0
- package/src/utils/sync/index.ts +2 -0
- package/src/utils/types/types.ts +24 -0
- package/src/utils/upload/select-file.ts +93 -0
- package/src/utils/upload/upload-file.ts +194 -0
- package/src/utils/url-helper/url-helper.ts +52 -0
- package/src/utils/util/util.ts +580 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description 组织数据
|
|
3
|
+
* @export
|
|
4
|
+
* @interface IOrgData
|
|
5
|
+
*/
|
|
6
|
+
export interface IOrgData {
|
|
7
|
+
/**
|
|
8
|
+
* @description 组织标识
|
|
9
|
+
* @type {string}
|
|
10
|
+
* @memberof IOrgData
|
|
11
|
+
*/
|
|
12
|
+
orgid: string;
|
|
13
|
+
/**
|
|
14
|
+
* @description 组织名称
|
|
15
|
+
* @type {string}
|
|
16
|
+
* @memberof IOrgData
|
|
17
|
+
*/
|
|
18
|
+
orgname: string;
|
|
19
|
+
/**
|
|
20
|
+
* @description 租户系统标识
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof IOrgData
|
|
23
|
+
*/
|
|
24
|
+
dcsystemid: string;
|
|
25
|
+
/**
|
|
26
|
+
* @description 系统标识
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof IOrgData
|
|
29
|
+
*/
|
|
30
|
+
systemid: string;
|
|
31
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { IApiParams } from '../global-param';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @description 多语言工具接口
|
|
5
|
+
* @export
|
|
6
|
+
* @interface IApiI18n
|
|
7
|
+
*/
|
|
8
|
+
export interface IApiI18n {
|
|
9
|
+
/**
|
|
10
|
+
* @description 设置当前语言
|
|
11
|
+
* @param {string} lang 语言
|
|
12
|
+
* @memberof IApiI18n
|
|
13
|
+
*/
|
|
14
|
+
setLang(lang: string): void;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @description 获取当前语言
|
|
18
|
+
* @returns {*} {string}
|
|
19
|
+
* @memberof IApiI18n
|
|
20
|
+
*/
|
|
21
|
+
getLang(): string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @description 消息格式化
|
|
25
|
+
* @param {string} tag 消息key
|
|
26
|
+
* @param {IApiParams} [options] 翻译配置
|
|
27
|
+
* @returns {*} {string}
|
|
28
|
+
* @memberof IApiI18n
|
|
29
|
+
*/
|
|
30
|
+
t(tag: string, options?: IApiParams): string;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @description 消息格式化
|
|
34
|
+
* @param {string} tag 消息key
|
|
35
|
+
* @param {string} [defaultMsg] 未找到翻译时默认呈现的消息
|
|
36
|
+
* @param {IApiParams} [options] 翻译配置
|
|
37
|
+
* @returns {*} {string}
|
|
38
|
+
* @memberof IApiI18n
|
|
39
|
+
*/
|
|
40
|
+
t(tag: string, defaultMsg?: string, options?: IApiParams): string;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @description 合并指定语言语言资源
|
|
44
|
+
* @param {string} lang 语言
|
|
45
|
+
* @param {IApiParams} data 语言资源
|
|
46
|
+
* @memberof IApiI18n
|
|
47
|
+
*/
|
|
48
|
+
mergeLocaleMessage(lang: string, data: IApiParams): void;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @description 合并语言资源
|
|
52
|
+
* @param {IApiParams} data 语言资源
|
|
53
|
+
* @memberof IApiI18n
|
|
54
|
+
*/
|
|
55
|
+
mergeLocaleMessage(data: IApiParams): void;
|
|
56
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { IPortalMessage } from '../common';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @description 消息基类控制器,各个类型消息继承此类
|
|
5
|
+
* @export
|
|
6
|
+
* @interface IMessageBase
|
|
7
|
+
*/
|
|
8
|
+
export interface IMessageBase {
|
|
9
|
+
/**
|
|
10
|
+
* @description 推送标准结构消息
|
|
11
|
+
* @param {IPortalMessage} msg 消息
|
|
12
|
+
* @memberof IMessageBase
|
|
13
|
+
*/
|
|
14
|
+
next(msg: IPortalMessage): void;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @description 订阅消息
|
|
18
|
+
* @param {(msg: IPortalMessage) => void} cb 回调函数
|
|
19
|
+
* @memberof IMessageBase
|
|
20
|
+
*/
|
|
21
|
+
on(cb: (msg: IPortalMessage) => void): void;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @description 取消订阅消息
|
|
25
|
+
* @param {(msg: IPortalMessage) => void} cb 回调函数
|
|
26
|
+
* @memberof IMessageBase
|
|
27
|
+
*/
|
|
28
|
+
off(cb: (msg: IPortalMessage) => void): void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description 添加变更
|
|
3
|
+
* @export
|
|
4
|
+
* @interface IAddInChanged
|
|
5
|
+
*/
|
|
6
|
+
export interface IAddInChanged {
|
|
7
|
+
/**
|
|
8
|
+
* @description 标题
|
|
9
|
+
* @type {string}
|
|
10
|
+
* @memberof IAddInChanged
|
|
11
|
+
*/
|
|
12
|
+
title: string;
|
|
13
|
+
/**
|
|
14
|
+
* @description 内容
|
|
15
|
+
* @type {string}
|
|
16
|
+
* @memberof IAddInChanged
|
|
17
|
+
*/
|
|
18
|
+
content: string;
|
|
19
|
+
/**
|
|
20
|
+
* @description 消息类型
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof IAddInChanged
|
|
23
|
+
*/
|
|
24
|
+
message_type: string;
|
|
25
|
+
}
|
package/src/interface/api/utils/message-center/command/add-in-changed/i-command-add-in-changed.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ICommandBase } from '../i-command-base';
|
|
2
|
+
import { IAddInChanged } from './i-add-in-changed';
|
|
3
|
+
/**
|
|
4
|
+
* @description 添加变更指令消息控制器
|
|
5
|
+
* @export
|
|
6
|
+
* @interface ICommandAddInChanged
|
|
7
|
+
* @extends {ICommandBase}
|
|
8
|
+
*/
|
|
9
|
+
export interface ICommandAddInChanged extends ICommandBase {
|
|
10
|
+
/**
|
|
11
|
+
* @description 发送消息
|
|
12
|
+
* @param {IAddInChanged} data 添加的变更数据
|
|
13
|
+
* @memberof ICommandAddInChanged
|
|
14
|
+
*/
|
|
15
|
+
send(data: IAddInChanged): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IPortalAsyncAction } from '../../common';
|
|
2
|
+
import { ICommandBase } from '../i-command-base';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @description 异步作业指令消息控制器
|
|
6
|
+
* @export
|
|
7
|
+
* @interface ICommandAsyncAction
|
|
8
|
+
* @extends {ICommandBase}
|
|
9
|
+
*/
|
|
10
|
+
export interface ICommandAsyncAction extends ICommandBase {
|
|
11
|
+
/**
|
|
12
|
+
* @description 发送消息
|
|
13
|
+
* @param {IPortalAsyncAction} data 异步作业数据
|
|
14
|
+
* @memberof ICommandAsyncAction
|
|
15
|
+
*/
|
|
16
|
+
send(data: IPortalAsyncAction): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IAppDataEntity, IMsgMetaData } from '../../common';
|
|
2
|
+
import { ICommandBase } from '../i-command-base';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @description 创建指令消息控制器
|
|
6
|
+
* @export
|
|
7
|
+
* @interface ICommandCreate
|
|
8
|
+
* @extends {ICommandBase}
|
|
9
|
+
*/
|
|
10
|
+
export interface ICommandCreate extends ICommandBase {
|
|
11
|
+
/**
|
|
12
|
+
* @description 发送数据
|
|
13
|
+
* @param {IAppDataEntity} data 实体数据
|
|
14
|
+
* @param {IMsgMetaData} [meta] 元数据
|
|
15
|
+
* @memberof ICommandCreate
|
|
16
|
+
*/
|
|
17
|
+
send(data: IAppDataEntity, meta?: IMsgMetaData): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IApiData } from '../../../global-param';
|
|
2
|
+
import { IMessageBase } from '../base';
|
|
3
|
+
import { IPortalMessage } from '../common';
|
|
4
|
+
/**
|
|
5
|
+
* @description 指令消息基类控制器接口
|
|
6
|
+
* @export
|
|
7
|
+
* @interface ICommandBase
|
|
8
|
+
* @extends {IMessageBase}
|
|
9
|
+
*/
|
|
10
|
+
export interface ICommandBase extends IMessageBase {
|
|
11
|
+
/**
|
|
12
|
+
* @description 发送指令消息
|
|
13
|
+
* @param {IApiData} data 数据
|
|
14
|
+
* @param {IPortalMessage['subtype']} subtype 子类型
|
|
15
|
+
* @param {string} [triggerKey] 触发源
|
|
16
|
+
* @memberof ICommandBase
|
|
17
|
+
*/
|
|
18
|
+
sendCommand(
|
|
19
|
+
data: IApiData,
|
|
20
|
+
subtype: IPortalMessage['subtype'],
|
|
21
|
+
triggerKey?: string,
|
|
22
|
+
): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { IApiData } from '../../../global-param';
|
|
2
|
+
import { IMessageBase } from '../base';
|
|
3
|
+
import { IPortalMessage } from '../common';
|
|
4
|
+
import { ICommandAddInChanged } from './add-in-changed/i-command-add-in-changed';
|
|
5
|
+
import { ICommandAsyncAction } from './async-action/i-command-async-action';
|
|
6
|
+
import { ICommandChange } from './change/i-command-change';
|
|
7
|
+
import { ICommandCreate } from './create/i-command-create';
|
|
8
|
+
import { ICommandInternalMessage } from './internal-message/i-command-internal-message';
|
|
9
|
+
import { ICommandMarkOpenData } from './mark-open-data/i-command-mark-open-data';
|
|
10
|
+
import { ICommandRemove } from './remove/i-command-remove';
|
|
11
|
+
import { ICommandUpdate } from './update/i-command-update';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @description 指令消息控制器
|
|
15
|
+
* @export
|
|
16
|
+
* @interface IMessageCommand
|
|
17
|
+
* @extends {IMessageBase}
|
|
18
|
+
*/
|
|
19
|
+
export interface IMessageCommand extends IMessageBase {
|
|
20
|
+
/**
|
|
21
|
+
* @description 数据变更指令消息控制器
|
|
22
|
+
* @type {ICommandChange}
|
|
23
|
+
* @memberof IMessageCommand
|
|
24
|
+
*/
|
|
25
|
+
readonly change: ICommandChange;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @description 数据新建指令消息控制器
|
|
29
|
+
* @type {ICommandCreate}
|
|
30
|
+
* @memberof IMessageCommand
|
|
31
|
+
*/
|
|
32
|
+
readonly create: ICommandCreate;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @description 数据更新指令消息控制器
|
|
36
|
+
* @type {ICommandUpdate}
|
|
37
|
+
* @memberof IMessageCommand
|
|
38
|
+
*/
|
|
39
|
+
readonly update: ICommandUpdate;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @description 数据删除指令消息控制器
|
|
43
|
+
* @type {ICommandRemove}
|
|
44
|
+
* @memberof IMessageCommand
|
|
45
|
+
*/
|
|
46
|
+
readonly remove: ICommandRemove;
|
|
47
|
+
/**
|
|
48
|
+
* @description 异步作业指令消息控制器
|
|
49
|
+
* @type {ICommandAsyncAction}
|
|
50
|
+
* @memberof IMessageCommand
|
|
51
|
+
*/
|
|
52
|
+
readonly asyncAction: ICommandAsyncAction;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @description 内部消息指令消息控制器
|
|
56
|
+
* @type {ICommandInternalMessage}
|
|
57
|
+
* @memberof IMessageCommand
|
|
58
|
+
*/
|
|
59
|
+
readonly internalMessage: ICommandInternalMessage;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @description 协同指令消息控制器
|
|
63
|
+
* @type {ICommandMarkOpenData}
|
|
64
|
+
* @memberof IMessageCommand
|
|
65
|
+
*/
|
|
66
|
+
readonly markOpenData: ICommandMarkOpenData;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @description 添加变更指令消息控制器
|
|
70
|
+
* @type {ICommandAddInChanged}
|
|
71
|
+
* @memberof IMessageCommand
|
|
72
|
+
*/
|
|
73
|
+
readonly addInChanged: ICommandAddInChanged;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @description 推送指令消息
|
|
77
|
+
* @param {IPortalMessage} msg 消息
|
|
78
|
+
* @memberof IMessageCommand
|
|
79
|
+
*/
|
|
80
|
+
next(msg: IPortalMessage): void;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @description 发送指令消息
|
|
84
|
+
* @param {IApiData} data 数据
|
|
85
|
+
* @param {IPortalMessage['subtype']} subtype 子类型
|
|
86
|
+
* @param {string} [triggerKey] 触发源
|
|
87
|
+
* @memberof IMessageCommand
|
|
88
|
+
*/
|
|
89
|
+
send(
|
|
90
|
+
data: IApiData,
|
|
91
|
+
subtype: IPortalMessage['subtype'],
|
|
92
|
+
triggerKey?: string,
|
|
93
|
+
): void;
|
|
94
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type { ICommandBase } from './i-command-base';
|
|
2
|
+
export type { IAddInChanged } from './add-in-changed/i-add-in-changed';
|
|
3
|
+
export type { ICommandAddInChanged } from './add-in-changed/i-command-add-in-changed';
|
|
4
|
+
export type { ICommandAsyncAction } from './async-action/i-command-async-action';
|
|
5
|
+
export type { ICommandChange } from './change/i-command-change';
|
|
6
|
+
export type { ICommandCreate } from './create/i-command-create';
|
|
7
|
+
export type {
|
|
8
|
+
IInternalMessage,
|
|
9
|
+
InternalMessageContentType,
|
|
10
|
+
InternalMessageStatus,
|
|
11
|
+
} from './internal-message/i-internal-message';
|
|
12
|
+
export type { ICommandInternalMessage } from './internal-message/i-command-internal-message';
|
|
13
|
+
export type {
|
|
14
|
+
MarkOpenDataAction,
|
|
15
|
+
IMarkOpenData,
|
|
16
|
+
} from './mark-open-data/i-mark-open-data';
|
|
17
|
+
export type { ICommandMarkOpenData } from './mark-open-data/i-command-mark-open-data';
|
|
18
|
+
export type { ICommandRemove } from './remove/i-command-remove';
|
|
19
|
+
export type { ICommandUpdate } from './update/i-command-update';
|
|
20
|
+
export type { IMessageCommand } from './i-message-command';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ICommandBase } from '../i-command-base';
|
|
2
|
+
import { IInternalMessage } from './i-internal-message';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @description 站内信指令消息控制器
|
|
6
|
+
* @export
|
|
7
|
+
* @interface ICommandInternalMessage
|
|
8
|
+
* @extends {ICommandBase}
|
|
9
|
+
*/
|
|
10
|
+
export interface ICommandInternalMessage extends ICommandBase {
|
|
11
|
+
/**
|
|
12
|
+
* @description 发送消息
|
|
13
|
+
* @param {IInternalMessage} data 站内信数据
|
|
14
|
+
* @memberof ICommandInternalMessage
|
|
15
|
+
*/
|
|
16
|
+
send(data: IInternalMessage): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
// 站内信状态
|
|
2
|
+
export type InternalMessageStatus =
|
|
3
|
+
| 'SENT'
|
|
4
|
+
| 'RECEIVED'
|
|
5
|
+
| 'READ'
|
|
6
|
+
| 'NOT_SENT'
|
|
7
|
+
| 'SEND_FAILED'
|
|
8
|
+
| 'REPLIED'
|
|
9
|
+
| 'DELETED';
|
|
10
|
+
|
|
11
|
+
// 站内信内容类型
|
|
12
|
+
export type InternalMessageContentType = 'TEXT' | 'HTML' | 'MARKDOWN' | 'JSON';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @description 站内信消息
|
|
16
|
+
* @export
|
|
17
|
+
* @interface IInternalMessage
|
|
18
|
+
*/
|
|
19
|
+
export interface IInternalMessage {
|
|
20
|
+
/**
|
|
21
|
+
* @description 更新人
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof IInternalMessage
|
|
24
|
+
*/
|
|
25
|
+
update_man: string;
|
|
26
|
+
/**
|
|
27
|
+
* @description 更新时间
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof IInternalMessage
|
|
30
|
+
*/
|
|
31
|
+
update_time: string;
|
|
32
|
+
/**
|
|
33
|
+
* @description 创建人
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof IInternalMessage
|
|
36
|
+
*/
|
|
37
|
+
create_man: string;
|
|
38
|
+
/**
|
|
39
|
+
* @description 创建时间
|
|
40
|
+
* @type {string}
|
|
41
|
+
* @memberof IInternalMessage
|
|
42
|
+
*/
|
|
43
|
+
create_time: string;
|
|
44
|
+
/**
|
|
45
|
+
* @description 唯一标识
|
|
46
|
+
* @type {string}
|
|
47
|
+
* @memberof IInternalMessage
|
|
48
|
+
*/
|
|
49
|
+
id: string;
|
|
50
|
+
/**
|
|
51
|
+
* @description 状态
|
|
52
|
+
* @type {InternalMessageStatus}
|
|
53
|
+
* @memberof IInternalMessage
|
|
54
|
+
*/
|
|
55
|
+
status: InternalMessageStatus;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @description 内容类型
|
|
59
|
+
* @type {InternalMessageContentType}
|
|
60
|
+
* @memberof IInternalMessage
|
|
61
|
+
*/
|
|
62
|
+
content_type: InternalMessageContentType;
|
|
63
|
+
/**
|
|
64
|
+
* @description 内容
|
|
65
|
+
* @type {string}
|
|
66
|
+
* @memberof IInternalMessage
|
|
67
|
+
*/
|
|
68
|
+
content: string;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @description 系统标记
|
|
72
|
+
* @type {string}
|
|
73
|
+
* @memberof IInternalMessage
|
|
74
|
+
*/
|
|
75
|
+
system_tag: string;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @description 所有者标记
|
|
79
|
+
* @type {string}
|
|
80
|
+
* @memberof IInternalMessage
|
|
81
|
+
*/
|
|
82
|
+
owner_id: string;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @description 消息所有者类型
|
|
86
|
+
* @type {('PERSONAL' | 'SYSTEM')}
|
|
87
|
+
* @memberof IInternalMessage
|
|
88
|
+
*/
|
|
89
|
+
owner_type: 'PERSONAL' | 'SYSTEM';
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @description 消息类型
|
|
93
|
+
* @type {string}
|
|
94
|
+
* @memberof IInternalMessage
|
|
95
|
+
*/
|
|
96
|
+
message_type: string;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @description 标题
|
|
100
|
+
* @type {string}
|
|
101
|
+
* @memberof IInternalMessage
|
|
102
|
+
*/
|
|
103
|
+
title: string;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* @description 接受者
|
|
107
|
+
* @type {string}
|
|
108
|
+
* @memberof IInternalMessage
|
|
109
|
+
*/
|
|
110
|
+
receiver: string;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* @description 短内容
|
|
114
|
+
* @type {string}
|
|
115
|
+
* @memberof IInternalMessage
|
|
116
|
+
*/
|
|
117
|
+
short_content?: string;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @description 链接
|
|
121
|
+
* @type {string}
|
|
122
|
+
* @memberof IInternalMessage
|
|
123
|
+
*/
|
|
124
|
+
url?: string;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* @description 移动端链接
|
|
128
|
+
* @type {string}
|
|
129
|
+
* @memberof IInternalMessage
|
|
130
|
+
*/
|
|
131
|
+
mobile_url?: string;
|
|
132
|
+
}
|
package/src/interface/api/utils/message-center/command/mark-open-data/i-command-mark-open-data.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ICommandBase } from '../i-command-base';
|
|
2
|
+
import { IMarkOpenData } from './i-mark-open-data';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @description 协同指令消息控制器
|
|
6
|
+
* @export
|
|
7
|
+
* @interface ICommandMarkOpenData
|
|
8
|
+
* @extends {ICommandBase}
|
|
9
|
+
*/
|
|
10
|
+
export interface ICommandMarkOpenData extends ICommandBase {
|
|
11
|
+
/**
|
|
12
|
+
* @description 发送消息
|
|
13
|
+
* @param {IMarkOpenData} data 协同数据
|
|
14
|
+
* @memberof ICommandMarkOpenData
|
|
15
|
+
*/
|
|
16
|
+
send(data: IMarkOpenData): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { IApiData } from '../../../../global-param';
|
|
2
|
+
|
|
3
|
+
// 协同消息类型
|
|
4
|
+
export type MarkOpenDataAction = 'VIEW' | 'EDIT' | 'UPDATE' | 'CLOSE';
|
|
5
|
+
/**
|
|
6
|
+
* @description 协同消息
|
|
7
|
+
* @export
|
|
8
|
+
* @interface IMarkOpenData
|
|
9
|
+
*/
|
|
10
|
+
export interface IMarkOpenData {
|
|
11
|
+
/**
|
|
12
|
+
* @description 行为类型
|
|
13
|
+
* @type {MarkOpenDataAction}
|
|
14
|
+
* @memberof IMarkOpenData
|
|
15
|
+
*/
|
|
16
|
+
action: MarkOpenDataAction;
|
|
17
|
+
/**
|
|
18
|
+
* @description 实体名称
|
|
19
|
+
* @type {string}
|
|
20
|
+
* @memberof IMarkOpenData
|
|
21
|
+
*/
|
|
22
|
+
entity: string;
|
|
23
|
+
/**
|
|
24
|
+
* @description 实体主键
|
|
25
|
+
* @type {string}
|
|
26
|
+
* @memberof IMarkOpenData
|
|
27
|
+
*/
|
|
28
|
+
key: string;
|
|
29
|
+
/**
|
|
30
|
+
* @description 时间戳
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @memberof IMarkOpenData
|
|
33
|
+
*/
|
|
34
|
+
time: number;
|
|
35
|
+
/**
|
|
36
|
+
* @description 消息数据
|
|
37
|
+
* @type {IApiData}
|
|
38
|
+
* @memberof IMarkOpenData
|
|
39
|
+
*/
|
|
40
|
+
data?: IApiData;
|
|
41
|
+
/**
|
|
42
|
+
* @description 用户名
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @memberof IMarkOpenData
|
|
45
|
+
*/
|
|
46
|
+
username: string;
|
|
47
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IAppDataEntity, IMsgMetaData } from '../../common';
|
|
2
|
+
import { ICommandBase } from '../i-command-base';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @description 删除指令消息控制器
|
|
6
|
+
* @export
|
|
7
|
+
* @interface ICommandRemove
|
|
8
|
+
* @extends {ICommandBase}
|
|
9
|
+
*/
|
|
10
|
+
export interface ICommandRemove extends ICommandBase {
|
|
11
|
+
/**
|
|
12
|
+
* @description 发送消息
|
|
13
|
+
* @param {IAppDataEntity} data 实体数据
|
|
14
|
+
* @param {IMsgMetaData} [meta] 元数据
|
|
15
|
+
* @memberof ICommandRemove
|
|
16
|
+
*/
|
|
17
|
+
send(data: IAppDataEntity, meta?: IMsgMetaData): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IAppDataEntity, IMsgMetaData } from '../../common';
|
|
2
|
+
import { ICommandBase } from '../i-command-base';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @description 更新指令消息控制器
|
|
6
|
+
* @export
|
|
7
|
+
* @interface ICommandUpdate
|
|
8
|
+
* @extends {ICommandBase}
|
|
9
|
+
*/
|
|
10
|
+
export interface ICommandUpdate extends ICommandBase {
|
|
11
|
+
/**
|
|
12
|
+
* @description 发送消息
|
|
13
|
+
* @param {IAppDataEntity} data 实体数据
|
|
14
|
+
* @param {IMsgMetaData} [meta] 元数据
|
|
15
|
+
* @memberof ICommandUpdate
|
|
16
|
+
*/
|
|
17
|
+
send(data: IAppDataEntity, meta?: IMsgMetaData): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IApiData } from '../../../global-param';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @description 应用实体数据对象
|
|
5
|
+
* @export
|
|
6
|
+
* @interface IAppDataEntity
|
|
7
|
+
* @extends {IApiData}
|
|
8
|
+
*/
|
|
9
|
+
export interface IAppDataEntity extends IApiData {
|
|
10
|
+
/**
|
|
11
|
+
* @description 应用实体数据对象标识
|
|
12
|
+
* @type {string}
|
|
13
|
+
* @memberof IAppDataEntity
|
|
14
|
+
*/
|
|
15
|
+
srfdecodename: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IPortalMessage } from './i-portal-message';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @description 消息事件
|
|
5
|
+
* @export
|
|
6
|
+
* @interface IMessageCenterEvent
|
|
7
|
+
*/
|
|
8
|
+
export interface IMessageCenterEvent {
|
|
9
|
+
/**
|
|
10
|
+
* @description 所有消息事件
|
|
11
|
+
* @param {IPortalMessage} msg 消息
|
|
12
|
+
* @memberof IMessageCenterEvent
|
|
13
|
+
*/
|
|
14
|
+
all: (msg: IPortalMessage) => void;
|
|
15
|
+
}
|