@ibiz-template/runtime 0.0.1-beta.1 → 0.0.1-beta.130
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/system/index.system.js +1 -1
- package/out/command/app/app-func/app-func.d.ts +10 -11
- package/out/command/app/app-func/app-func.d.ts.map +1 -1
- package/out/command/app/app-func/app-func.js +19 -20
- package/out/command/app/open-app-view/open-app-view.d.ts +12 -13
- package/out/command/app/open-app-view/open-app-view.d.ts.map +1 -1
- package/out/command/app/open-app-view/open-app-view.js +6 -6
- package/out/config/global-config.d.ts +18 -0
- package/out/config/global-config.d.ts.map +1 -0
- package/out/config/global-config.js +18 -0
- package/out/index.d.ts +1 -0
- package/out/index.d.ts.map +1 -1
- package/out/index.js +1 -0
- package/out/install.d.ts.map +1 -1
- package/out/install.js +6 -0
- package/out/interface/i-global-config/i-global-config.d.ts +62 -0
- package/out/interface/i-global-config/i-global-config.d.ts.map +1 -0
- package/out/interface/i-global-config/i-global-config.js +1 -0
- package/out/interface/i-modal/i-modal.d.ts +7 -0
- package/out/interface/i-modal/i-modal.d.ts.map +1 -1
- package/out/interface/i-modal-options/i-modal-options.d.ts +8 -0
- package/out/interface/i-modal-options/i-modal-options.d.ts.map +1 -1
- package/out/interface/i-plugin-factory/i-plugin-factory.d.ts +32 -5
- package/out/interface/i-plugin-factory/i-plugin-factory.d.ts.map +1 -1
- package/out/interface/i-plugin-item/i-plugin-item.d.ts +28 -0
- package/out/interface/i-plugin-item/i-plugin-item.d.ts.map +1 -0
- package/out/interface/i-plugin-item/i-plugin-item.js +1 -0
- package/out/interface/i-ui-action-handler/i-ui-action-handler.d.ts +2 -3
- package/out/interface/i-ui-action-handler/i-ui-action-handler.d.ts.map +1 -1
- package/out/interface/i-ui-action-result/i-ui-action-result.d.ts +17 -0
- package/out/interface/i-ui-action-result/i-ui-action-result.d.ts.map +1 -1
- package/out/interface/i-ui-logic-params/i-ui-logic-params.d.ts +31 -0
- package/out/interface/i-ui-logic-params/i-ui-logic-params.d.ts.map +1 -0
- package/out/interface/i-ui-logic-params/i-ui-logic-params.js +1 -0
- package/out/interface/index.d.ts +4 -0
- package/out/interface/index.d.ts.map +1 -1
- package/out/interface/index.js +1 -0
- package/out/interface/logic-scheduler/i-scheduler-logic.d.ts +35 -0
- package/out/interface/logic-scheduler/i-scheduler-logic.d.ts.map +1 -0
- package/out/interface/logic-scheduler/i-scheduler-logic.js +1 -0
- package/out/interface/logic-scheduler/i-trigger-match-params.d.ts +17 -0
- package/out/interface/logic-scheduler/i-trigger-match-params.d.ts.map +1 -0
- package/out/interface/logic-scheduler/i-trigger-match-params.js +1 -0
- package/out/interface/logic-scheduler/index.d.ts +3 -0
- package/out/interface/logic-scheduler/index.d.ts.map +1 -0
- package/out/interface/logic-scheduler/index.js +1 -0
- package/out/interface/util/i-modal-util/i-modal-util.d.ts +8 -0
- package/out/interface/util/i-modal-util/i-modal-util.d.ts.map +1 -1
- package/out/interface/util/i-open-view-util/i-open-view-util.d.ts +10 -11
- package/out/interface/util/i-open-view-util/i-open-view-util.d.ts.map +1 -1
- package/out/logic-scheduler/executor/logic-executor-factory.d.ts +34 -0
- package/out/logic-scheduler/executor/logic-executor-factory.d.ts.map +1 -0
- package/out/logic-scheduler/executor/logic-executor-factory.js +42 -0
- package/out/logic-scheduler/executor/logic-executor.d.ts +32 -0
- package/out/logic-scheduler/executor/logic-executor.d.ts.map +1 -0
- package/out/logic-scheduler/executor/logic-executor.js +30 -0
- package/out/logic-scheduler/executor/script-executor.d.ts +39 -0
- package/out/logic-scheduler/executor/script-executor.d.ts.map +1 -0
- package/out/logic-scheduler/executor/script-executor.js +53 -0
- package/out/logic-scheduler/index.d.ts +12 -0
- package/out/logic-scheduler/index.d.ts.map +1 -0
- package/out/logic-scheduler/index.js +17 -0
- package/out/logic-scheduler/logic-scheduler-center.d.ts +45 -0
- package/out/logic-scheduler/logic-scheduler-center.d.ts.map +1 -0
- package/out/logic-scheduler/logic-scheduler-center.js +49 -0
- package/out/logic-scheduler/scheduler/control-logic-scheduler.d.ts +14 -0
- package/out/logic-scheduler/scheduler/control-logic-scheduler.d.ts.map +1 -0
- package/out/logic-scheduler/scheduler/control-logic-scheduler.js +16 -0
- package/out/logic-scheduler/scheduler/logic-scheduler.d.ts +105 -0
- package/out/logic-scheduler/scheduler/logic-scheduler.d.ts.map +1 -0
- package/out/logic-scheduler/scheduler/logic-scheduler.js +148 -0
- package/out/logic-scheduler/scheduler/view-logic-scheduler.d.ts +14 -0
- package/out/logic-scheduler/scheduler/view-logic-scheduler.d.ts.map +1 -0
- package/out/logic-scheduler/scheduler/view-logic-scheduler.js +14 -0
- package/out/logic-scheduler/trigger/item-dyna-logic-trigger.d.ts +12 -0
- package/out/logic-scheduler/trigger/item-dyna-logic-trigger.d.ts.map +1 -0
- package/out/logic-scheduler/trigger/item-dyna-logic-trigger.js +26 -0
- package/out/logic-scheduler/trigger/logic-trigger-factory.d.ts +34 -0
- package/out/logic-scheduler/trigger/logic-trigger-factory.d.ts.map +1 -0
- package/out/logic-scheduler/trigger/logic-trigger-factory.js +42 -0
- package/out/logic-scheduler/trigger/logic-trigger.d.ts +55 -0
- package/out/logic-scheduler/trigger/logic-trigger.d.ts.map +1 -0
- package/out/logic-scheduler/trigger/logic-trigger.js +52 -0
- package/out/plugin/plugin-static-resource/plugin-static-resource.d.ts +18 -0
- package/out/plugin/plugin-static-resource/plugin-static-resource.d.ts.map +1 -1
- package/out/plugin/plugin-static-resource/plugin-static-resource.js +36 -0
- package/out/plugin/remote-plugin-item/remote-plugin-item.d.ts +12 -3
- package/out/plugin/remote-plugin-item/remote-plugin-item.d.ts.map +1 -1
- package/out/plugin/remote-plugin-item/remote-plugin-item.js +5 -3
- package/out/provider/ui-action/index.d.ts +2 -1
- package/out/provider/ui-action/index.d.ts.map +1 -1
- package/out/provider/ui-action/index.js +5 -1
- package/out/provider/ui-action/wf-withdraw-ui-action-provider.d.ts +15 -0
- package/out/provider/ui-action/wf-withdraw-ui-action-provider.d.ts.map +1 -0
- package/out/provider/ui-action/wf-withdraw-ui-action-provider.js +18 -0
- package/out/types.d.ts +17 -1
- package/out/types.d.ts.map +1 -1
- package/out/utils/app-de-ui-action-util/app-de-ui-action-util.d.ts +2 -3
- package/out/utils/app-de-ui-action-util/app-de-ui-action-util.d.ts.map +1 -1
- package/out/utils/app-de-ui-action-util/app-de-ui-action-util.js +1 -1
- package/out/utils/app-de-ui-action-util/handler/backend-ui-action-handler.d.ts +1 -2
- package/out/utils/app-de-ui-action-util/handler/backend-ui-action-handler.d.ts.map +1 -1
- package/out/utils/app-de-ui-action-util/handler/backend-ui-action-handler.js +7 -4
- package/out/utils/app-de-ui-action-util/handler/common-sys-ui-action-handler.d.ts +1 -2
- package/out/utils/app-de-ui-action-util/handler/common-sys-ui-action-handler.d.ts.map +1 -1
- package/out/utils/app-de-ui-action-util/handler/common-sys-ui-action-handler.js +1 -1
- package/out/utils/app-de-ui-action-util/handler/front-ui-action-handler.d.ts +1 -2
- package/out/utils/app-de-ui-action-util/handler/front-ui-action-handler.d.ts.map +1 -1
- package/out/utils/app-de-ui-action-util/handler/front-ui-action-handler.js +31 -8
- package/out/utils/app-de-ui-action-util/handler/index.d.ts +1 -0
- package/out/utils/app-de-ui-action-util/handler/index.d.ts.map +1 -1
- package/out/utils/app-de-ui-action-util/handler/index.js +1 -0
- package/out/utils/app-de-ui-action-util/handler/ui-action-handler.d.ts +10 -20
- package/out/utils/app-de-ui-action-util/handler/ui-action-handler.d.ts.map +1 -1
- package/out/utils/app-de-ui-action-util/handler/ui-action-handler.js +82 -59
- package/out/utils/app-de-ui-action-util/handler/wf-withdraw-handler.d.ts +16 -0
- package/out/utils/app-de-ui-action-util/handler/wf-withdraw-handler.d.ts.map +1 -0
- package/out/utils/app-de-ui-action-util/handler/wf-withdraw-handler.js +27 -0
- package/out/utils/index.d.ts +3 -1
- package/out/utils/index.d.ts.map +1 -1
- package/out/utils/index.js +3 -1
- package/out/utils/nav-params/calc-nav-params.d.ts +29 -0
- package/out/utils/nav-params/calc-nav-params.d.ts.map +1 -0
- package/out/utils/nav-params/calc-nav-params.js +34 -0
- package/out/utils/nav-params/nav-params.d.ts +20 -1
- package/out/utils/nav-params/nav-params.d.ts.map +1 -1
- package/out/utils/nav-params/nav-params.js +58 -4
- package/out/utils/open-redirect-view/open-redirect-view.d.ts +19 -8
- package/out/utils/open-redirect-view/open-redirect-view.d.ts.map +1 -1
- package/out/utils/open-redirect-view/open-redirect-view.js +107 -14
- package/out/utils/wf-helper/wf-helper.d.ts +9 -0
- package/out/utils/wf-helper/wf-helper.d.ts.map +1 -0
- package/out/utils/wf-helper/wf-helper.js +14 -0
- package/out/view-logic/view-logic.d.ts +6 -7
- package/out/view-logic/view-logic.d.ts.map +1 -1
- package/out/view-logic/view-logic.js +102 -29
- package/package.json +14 -13
- package/src/command/app/app-func/app-func.ts +24 -24
- package/src/command/app/open-app-view/open-app-view.ts +12 -13
- package/src/config/global-config.ts +22 -0
- package/src/index.ts +1 -0
- package/src/install.ts +6 -0
- package/src/interface/i-global-config/i-global-config.ts +65 -0
- package/src/interface/i-modal/i-modal.ts +8 -0
- package/src/interface/i-modal-options/i-modal-options.ts +9 -0
- package/src/interface/i-plugin-factory/i-plugin-factory.ts +32 -5
- package/src/interface/i-plugin-item/i-plugin-item.ts +27 -0
- package/src/interface/i-ui-action-handler/i-ui-action-handler.ts +2 -3
- package/src/interface/i-ui-action-result/i-ui-action-result.ts +20 -0
- package/src/interface/i-ui-logic-params/i-ui-logic-params.ts +31 -0
- package/src/interface/index.ts +5 -0
- package/src/interface/logic-scheduler/i-scheduler-logic.ts +58 -0
- package/src/interface/logic-scheduler/i-trigger-match-params.ts +18 -0
- package/src/interface/logic-scheduler/index.ts +7 -0
- package/src/interface/util/i-modal-util/i-modal-util.ts +8 -0
- package/src/interface/util/i-open-view-util/i-open-view-util.ts +10 -11
- package/src/logic-scheduler/executor/logic-executor-factory.ts +48 -0
- package/src/logic-scheduler/executor/logic-executor.ts +43 -0
- package/src/logic-scheduler/executor/script-executor.ts +63 -0
- package/src/logic-scheduler/index.ts +41 -0
- package/src/logic-scheduler/logic-scheduler-center.ts +52 -0
- package/src/logic-scheduler/scheduler/control-logic-scheduler.ts +21 -0
- package/src/logic-scheduler/scheduler/logic-scheduler.ts +192 -0
- package/src/logic-scheduler/scheduler/view-logic-scheduler.ts +17 -0
- package/src/logic-scheduler/trigger/item-dyna-logic-trigger.ts +41 -0
- package/src/logic-scheduler/trigger/logic-trigger-factory.ts +48 -0
- package/src/logic-scheduler/trigger/logic-trigger.ts +77 -0
- package/src/plugin/plugin-static-resource/plugin-static-resource.ts +38 -0
- package/src/plugin/remote-plugin-item/remote-plugin-item.ts +14 -3
- package/src/provider/ui-action/index.ts +6 -0
- package/src/provider/ui-action/wf-withdraw-ui-action-provider.ts +22 -0
- package/src/types.ts +19 -0
- package/src/utils/app-de-ui-action-util/app-de-ui-action-util.ts +2 -3
- package/src/utils/app-de-ui-action-util/handler/backend-ui-action-handler.ts +13 -5
- package/src/utils/app-de-ui-action-util/handler/common-sys-ui-action-handler.ts +2 -3
- package/src/utils/app-de-ui-action-util/handler/front-ui-action-handler.ts +46 -23
- package/src/utils/app-de-ui-action-util/handler/index.ts +1 -0
- package/src/utils/app-de-ui-action-util/handler/ui-action-handler.ts +113 -75
- package/src/utils/app-de-ui-action-util/handler/wf-withdraw-handler.ts +36 -0
- package/src/utils/index.ts +6 -1
- package/src/utils/nav-params/calc-nav-params.ts +59 -0
- package/src/utils/nav-params/nav-params.ts +66 -5
- package/src/utils/open-redirect-view/open-redirect-view.ts +142 -14
- package/src/utils/wf-helper/wf-helper.ts +14 -0
- package/src/view-logic/view-logic.ts +111 -31
- package/LICENSE +0 -21
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { IUILogicParams, ISchedulerLogic, ITriggerMatchParams, TriggerType } from '../../interface';
|
|
2
|
+
import { LogicExecutor } from '../executor/logic-executor';
|
|
3
|
+
/**
|
|
4
|
+
* 逻辑触发器
|
|
5
|
+
* @author lxm
|
|
6
|
+
* @date 2023-06-25 06:09:22
|
|
7
|
+
* @export
|
|
8
|
+
* @class LogicTrigger
|
|
9
|
+
*/
|
|
10
|
+
export declare class LogicTrigger {
|
|
11
|
+
protected logic: ISchedulerLogic;
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @author lxm
|
|
15
|
+
* @date 2023-06-25 07:32:04
|
|
16
|
+
*/
|
|
17
|
+
type: TriggerType;
|
|
18
|
+
/**
|
|
19
|
+
* @author lxm
|
|
20
|
+
* @date 2023-06-25 07:32:57
|
|
21
|
+
* @param {ISchedulerLogic} logic 逻辑
|
|
22
|
+
*/
|
|
23
|
+
constructor(logic: ISchedulerLogic);
|
|
24
|
+
/**
|
|
25
|
+
* 执行器
|
|
26
|
+
* @author lxm
|
|
27
|
+
* @date 2023-06-25 07:25:05
|
|
28
|
+
* @type {LogicExecutor}
|
|
29
|
+
*/
|
|
30
|
+
executor?: LogicExecutor;
|
|
31
|
+
/**
|
|
32
|
+
* 绑定执行器
|
|
33
|
+
* @author lxm
|
|
34
|
+
* @date 2023-06-25 07:25:13
|
|
35
|
+
* @param {LogicExecutor} executor
|
|
36
|
+
*/
|
|
37
|
+
bindExecutor(executor: LogicExecutor): void;
|
|
38
|
+
/**
|
|
39
|
+
* 匹配触发器,返回true表示该触发器满足触发条件。
|
|
40
|
+
* @author lxm
|
|
41
|
+
* @date 2023-06-25 07:49:00
|
|
42
|
+
* @param {IData} _args
|
|
43
|
+
* @return {*} {boolean}
|
|
44
|
+
*/
|
|
45
|
+
match(matchParams: ITriggerMatchParams): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* 执行对应的执行器
|
|
48
|
+
* @author lxm
|
|
49
|
+
* @date 2023-06-26 01:45:42
|
|
50
|
+
* @param {Partial<IUILogicParams>} executeParams
|
|
51
|
+
* @return {*}
|
|
52
|
+
*/
|
|
53
|
+
execute(executeParams: IUILogicParams): any;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=logic-trigger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logic-trigger.d.ts","sourceRoot":"","sources":["../../../src/logic-scheduler/trigger/logic-trigger.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,WAAW,EACZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D;;;;;;GAMG;AACH,qBAAa,YAAY;IAaX,SAAS,CAAC,KAAK,EAAE,eAAe;IAZ5C;;;;OAIG;IACH,IAAI,EAAE,WAAW,CAAC;IAElB;;;;OAIG;gBACmB,KAAK,EAAE,eAAe;IAI5C;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAC;IAEzB;;;;;OAKG;IACH,YAAY,CAAC,QAAQ,EAAE,aAAa;IAIpC;;;;;;OAMG;IACH,KAAK,CAAC,WAAW,EAAE,mBAAmB,GAAG,OAAO;IAIhD;;;;;;OAMG;IAEH,OAAO,CAAC,aAAa,EAAE,cAAc,GAAG,GAAG;CAM5C"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { RuntimeError } from '@ibiz-template/core';
|
|
2
|
+
/**
|
|
3
|
+
* 逻辑触发器
|
|
4
|
+
* @author lxm
|
|
5
|
+
* @date 2023-06-25 06:09:22
|
|
6
|
+
* @export
|
|
7
|
+
* @class LogicTrigger
|
|
8
|
+
*/
|
|
9
|
+
export class LogicTrigger {
|
|
10
|
+
/**
|
|
11
|
+
* @author lxm
|
|
12
|
+
* @date 2023-06-25 07:32:57
|
|
13
|
+
* @param {ISchedulerLogic} logic 逻辑
|
|
14
|
+
*/
|
|
15
|
+
constructor(logic) {
|
|
16
|
+
this.logic = logic;
|
|
17
|
+
this.type = logic.triggerType;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* 绑定执行器
|
|
21
|
+
* @author lxm
|
|
22
|
+
* @date 2023-06-25 07:25:13
|
|
23
|
+
* @param {LogicExecutor} executor
|
|
24
|
+
*/
|
|
25
|
+
bindExecutor(executor) {
|
|
26
|
+
this.executor = executor;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 匹配触发器,返回true表示该触发器满足触发条件。
|
|
30
|
+
* @author lxm
|
|
31
|
+
* @date 2023-06-25 07:49:00
|
|
32
|
+
* @param {IData} _args
|
|
33
|
+
* @return {*} {boolean}
|
|
34
|
+
*/
|
|
35
|
+
match(matchParams) {
|
|
36
|
+
return matchParams.triggerType === this.type;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* 执行对应的执行器
|
|
40
|
+
* @author lxm
|
|
41
|
+
* @date 2023-06-26 01:45:42
|
|
42
|
+
* @param {Partial<IUILogicParams>} executeParams
|
|
43
|
+
* @return {*}
|
|
44
|
+
*/
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
46
|
+
execute(executeParams) {
|
|
47
|
+
if (this.executor) {
|
|
48
|
+
return this.executor.execute(executeParams);
|
|
49
|
+
}
|
|
50
|
+
throw new RuntimeError(`${this.logic.id}没有绑定executor`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -16,6 +16,15 @@ export declare class PluginStaticResource {
|
|
|
16
16
|
* @type {string}
|
|
17
17
|
*/
|
|
18
18
|
protected baseDir: string;
|
|
19
|
+
/**
|
|
20
|
+
* 已经输出过路径的 style 标签
|
|
21
|
+
*
|
|
22
|
+
* @author chitanda
|
|
23
|
+
* @date 2023-03-23 10:03:38
|
|
24
|
+
* @protected
|
|
25
|
+
* @type {Map<string, null>}
|
|
26
|
+
*/
|
|
27
|
+
protected styleElementMap: Map<string, null>;
|
|
19
28
|
/**
|
|
20
29
|
* 插件静态资源工具类.
|
|
21
30
|
*
|
|
@@ -33,5 +42,14 @@ export declare class PluginStaticResource {
|
|
|
33
42
|
* @return {*} {string}
|
|
34
43
|
*/
|
|
35
44
|
dir(path: string): string;
|
|
45
|
+
/**
|
|
46
|
+
* 加载样式静态资源
|
|
47
|
+
*
|
|
48
|
+
* @author chitanda
|
|
49
|
+
* @date 2023-03-23 10:03:49
|
|
50
|
+
* @param {string[]} urls
|
|
51
|
+
* @return {*} {Promise<void>}
|
|
52
|
+
*/
|
|
53
|
+
loadStyle(urls: string[]): Promise<void>;
|
|
36
54
|
}
|
|
37
55
|
//# sourceMappingURL=plugin-static-resource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-static-resource.d.ts","sourceRoot":"","sources":["../../../src/plugin/plugin-static-resource/plugin-static-resource.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,qBAAa,oBAAoB;IAC/B;;;;;;;OAOG;IACH,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC;IAE1B;;;;;;OAMG;gBACS,OAAO,EAAE,MAAM;IAI3B;;;;;;;OAOG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;
|
|
1
|
+
{"version":3,"file":"plugin-static-resource.d.ts","sourceRoot":"","sources":["../../../src/plugin/plugin-static-resource/plugin-static-resource.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,qBAAa,oBAAoB;IAC/B;;;;;;;OAOG;IACH,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC;IAE1B;;;;;;;OAOG;IACH,SAAS,CAAC,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAa;IAEzD;;;;;;OAMG;gBACS,OAAO,EAAE,MAAM;IAI3B;;;;;;;OAOG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAIzB;;;;;;;OAOG;IACG,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAmB/C"}
|
|
@@ -15,6 +15,15 @@ export class PluginStaticResource {
|
|
|
15
15
|
* @param {string} mateUrl import.mate.url
|
|
16
16
|
*/
|
|
17
17
|
constructor(mateUrl) {
|
|
18
|
+
/**
|
|
19
|
+
* 已经输出过路径的 style 标签
|
|
20
|
+
*
|
|
21
|
+
* @author chitanda
|
|
22
|
+
* @date 2023-03-23 10:03:38
|
|
23
|
+
* @protected
|
|
24
|
+
* @type {Map<string, null>}
|
|
25
|
+
*/
|
|
26
|
+
this.styleElementMap = new Map();
|
|
18
27
|
this.baseDir = mateUrl.substring(0, mateUrl.lastIndexOf('/'));
|
|
19
28
|
}
|
|
20
29
|
/**
|
|
@@ -28,4 +37,31 @@ export class PluginStaticResource {
|
|
|
28
37
|
dir(path) {
|
|
29
38
|
return this.baseDir + path;
|
|
30
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* 加载样式静态资源
|
|
42
|
+
*
|
|
43
|
+
* @author chitanda
|
|
44
|
+
* @date 2023-03-23 10:03:49
|
|
45
|
+
* @param {string[]} urls
|
|
46
|
+
* @return {*} {Promise<void>}
|
|
47
|
+
*/
|
|
48
|
+
async loadStyle(urls) {
|
|
49
|
+
const all = urls.map(styleUrl => {
|
|
50
|
+
const url = this.dir(styleUrl);
|
|
51
|
+
if (this.styleElementMap.has(url)) {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
this.styleElementMap.set(url, null);
|
|
55
|
+
return new Promise((resolve, reject) => {
|
|
56
|
+
const linkDom = document.createElement('link');
|
|
57
|
+
linkDom.setAttribute('type', 'text/css');
|
|
58
|
+
linkDom.setAttribute('rel', 'stylesheet');
|
|
59
|
+
linkDom.setAttribute('href', url);
|
|
60
|
+
linkDom.onload = resolve;
|
|
61
|
+
linkDom.onerror = reject;
|
|
62
|
+
document.head.appendChild(linkDom);
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
await Promise.all(all);
|
|
66
|
+
}
|
|
31
67
|
}
|
|
@@ -81,6 +81,14 @@ export declare class RemotePluginItem {
|
|
|
81
81
|
* @type {string}
|
|
82
82
|
*/
|
|
83
83
|
readonly tag: string;
|
|
84
|
+
/**
|
|
85
|
+
* 插件模型
|
|
86
|
+
*
|
|
87
|
+
* @author chitanda
|
|
88
|
+
* @date 2023-01-30 15:01:37
|
|
89
|
+
* @type {IPSAppPFPluginRef}
|
|
90
|
+
*/
|
|
91
|
+
readonly repo: string;
|
|
84
92
|
/**
|
|
85
93
|
* 配置参数
|
|
86
94
|
*
|
|
@@ -93,10 +101,11 @@ export declare class RemotePluginItem {
|
|
|
93
101
|
* Creates an instance of RemotePluginItem.
|
|
94
102
|
*
|
|
95
103
|
* @author chitanda
|
|
96
|
-
* @date
|
|
97
|
-
* @param {string} tag
|
|
104
|
+
* @date 2023-02-02 15:02:13
|
|
105
|
+
* @param {string} tag 插件标识名称
|
|
106
|
+
* @param {string} repo 插件路径
|
|
98
107
|
* @param {RemotePluginConfig} config
|
|
99
108
|
*/
|
|
100
|
-
constructor(tag: string, config: RemotePluginConfig);
|
|
109
|
+
constructor(tag: string, repo: string, config: RemotePluginConfig);
|
|
101
110
|
}
|
|
102
111
|
//# sourceMappingURL=remote-plugin-item.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-plugin-item.d.ts","sourceRoot":"","sources":["../../../src/plugin/remote-plugin-item/remote-plugin-item.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1B;;;;;;OAMG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;;;;;;GAOG;AACH,qBAAa,gBAAgB;IAC3B;;;;;;OAMG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAErB;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IAEpC
|
|
1
|
+
{"version":3,"file":"remote-plugin-item.d.ts","sourceRoot":"","sources":["../../../src/plugin/remote-plugin-item/remote-plugin-item.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1B;;;;;;OAMG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;;;;;;GAOG;AACH,qBAAa,gBAAgB;IAC3B;;;;;;OAMG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAErB;;;;;;OAMG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IAEpC;;;;;;;;OAQG;gBACS,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB;CAKlE"}
|
|
@@ -11,12 +11,14 @@ export class RemotePluginItem {
|
|
|
11
11
|
* Creates an instance of RemotePluginItem.
|
|
12
12
|
*
|
|
13
13
|
* @author chitanda
|
|
14
|
-
* @date
|
|
15
|
-
* @param {string} tag
|
|
14
|
+
* @date 2023-02-02 15:02:13
|
|
15
|
+
* @param {string} tag 插件标识名称
|
|
16
|
+
* @param {string} repo 插件路径
|
|
16
17
|
* @param {RemotePluginConfig} config
|
|
17
18
|
*/
|
|
18
|
-
constructor(tag, config) {
|
|
19
|
+
constructor(tag, repo, config) {
|
|
19
20
|
this.tag = tag;
|
|
21
|
+
this.repo = repo;
|
|
20
22
|
this.config = config;
|
|
21
23
|
}
|
|
22
24
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BackendUIActionProvider } from './backend-ui-action-provider';
|
|
2
2
|
import { CommonSysUIActionProvider } from './common-sys-ui-action-provider';
|
|
3
3
|
import { FrontUIActionProvider } from './front-ui-action-provider';
|
|
4
|
+
import { WFWithdrawUIActionProvider } from './wf-withdraw-ui-action-provider';
|
|
4
5
|
/**
|
|
5
6
|
* 预置默认的界面行为适配器
|
|
6
7
|
*
|
|
@@ -9,5 +10,5 @@ import { FrontUIActionProvider } from './front-ui-action-provider';
|
|
|
9
10
|
* @export
|
|
10
11
|
*/
|
|
11
12
|
export declare function presetUIActionProvider(): void;
|
|
12
|
-
export { FrontUIActionProvider, CommonSysUIActionProvider, BackendUIActionProvider, };
|
|
13
|
+
export { FrontUIActionProvider, CommonSysUIActionProvider, BackendUIActionProvider, WFWithdrawUIActionProvider, };
|
|
13
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/provider/ui-action/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/provider/ui-action/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAE9E;;;;;;GAMG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAoC7C;AAED,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,uBAAuB,EACvB,0BAA0B,GAC3B,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BackendUIActionProvider } from './backend-ui-action-provider';
|
|
2
2
|
import { CommonSysUIActionProvider } from './common-sys-ui-action-provider';
|
|
3
3
|
import { FrontUIActionProvider } from './front-ui-action-provider';
|
|
4
|
+
import { WFWithdrawUIActionProvider } from './wf-withdraw-ui-action-provider';
|
|
4
5
|
/**
|
|
5
6
|
* 预置默认的界面行为适配器
|
|
6
7
|
*
|
|
@@ -40,5 +41,8 @@ export function presetUIActionProvider() {
|
|
|
40
41
|
uiAction.register('SYS_Refresh', new CommonSysUIActionProvider());
|
|
41
42
|
uiAction.register('SYS_Import', new CommonSysUIActionProvider());
|
|
42
43
|
uiAction.register('SYS_ExportExcel', new CommonSysUIActionProvider());
|
|
44
|
+
// 预置插件
|
|
45
|
+
// 工作流撤回
|
|
46
|
+
uiAction.register('DEUIACTION_WFWithdraw', new WFWithdrawUIActionProvider());
|
|
43
47
|
}
|
|
44
|
-
export { FrontUIActionProvider, CommonSysUIActionProvider, BackendUIActionProvider, };
|
|
48
|
+
export { FrontUIActionProvider, CommonSysUIActionProvider, BackendUIActionProvider, WFWithdrawUIActionProvider, };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IUIActionHandler, IUIActionProvider } from '../../interface';
|
|
2
|
+
/**
|
|
3
|
+
* 工作流流程撤回界面行为适配器
|
|
4
|
+
*
|
|
5
|
+
* @author lxm
|
|
6
|
+
* @date 2022-10-25 15:10:51
|
|
7
|
+
* @export
|
|
8
|
+
* @class WFWithdrawUIActionProvider
|
|
9
|
+
* @implements {IUIActionProvider}
|
|
10
|
+
*/
|
|
11
|
+
export declare class WFWithdrawUIActionProvider implements IUIActionProvider {
|
|
12
|
+
private handler?;
|
|
13
|
+
getHandler(): Promise<IUIActionHandler>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=wf-withdraw-ui-action-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wf-withdraw-ui-action-provider.d.ts","sourceRoot":"","sources":["../../../src/provider/ui-action/wf-withdraw-ui-action-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGtE;;;;;;;;GAQG;AACH,qBAAa,0BAA2B,YAAW,iBAAiB;IAClE,OAAO,CAAC,OAAO,CAAC,CAAmB;IAE7B,UAAU,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAM9C"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { WFWithdrawUIActionHandler } from '../../utils';
|
|
2
|
+
/**
|
|
3
|
+
* 工作流流程撤回界面行为适配器
|
|
4
|
+
*
|
|
5
|
+
* @author lxm
|
|
6
|
+
* @date 2022-10-25 15:10:51
|
|
7
|
+
* @export
|
|
8
|
+
* @class WFWithdrawUIActionProvider
|
|
9
|
+
* @implements {IUIActionProvider}
|
|
10
|
+
*/
|
|
11
|
+
export class WFWithdrawUIActionProvider {
|
|
12
|
+
async getHandler() {
|
|
13
|
+
if (!this.handler) {
|
|
14
|
+
this.handler = new WFWithdrawUIActionHandler();
|
|
15
|
+
}
|
|
16
|
+
return this.handler;
|
|
17
|
+
}
|
|
18
|
+
}
|
package/out/types.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CommandController } from '@ibiz-template/command';
|
|
2
2
|
import '@ibiz-template/service';
|
|
3
|
-
import { IMessageUtil, INotificationUtil, IOpenViewUtil, IModalUtil, ILoadingUtil, IPluginFactory, IOverlayController } from './interface';
|
|
3
|
+
import { IMessageUtil, INotificationUtil, IOpenViewUtil, IModalUtil, ILoadingUtil, IPluginFactory, IOverlayController, IGlobalConfig } from './interface';
|
|
4
|
+
import { LogicSchedulerCenter } from './logic-scheduler';
|
|
4
5
|
import { RegisterCenter } from './register/register-center';
|
|
5
6
|
declare module '@ibiz-template/core' {
|
|
6
7
|
interface IBizSys {
|
|
@@ -80,6 +81,21 @@ declare module '@ibiz-template/core' {
|
|
|
80
81
|
* @type {Register}
|
|
81
82
|
*/
|
|
82
83
|
register: RegisterCenter;
|
|
84
|
+
/**
|
|
85
|
+
* 全局配置
|
|
86
|
+
*
|
|
87
|
+
* @author lxm
|
|
88
|
+
* @date 2022-12-09 14:12:14
|
|
89
|
+
* @type {IGlobalConfig}
|
|
90
|
+
*/
|
|
91
|
+
config: IGlobalConfig;
|
|
92
|
+
/**
|
|
93
|
+
* 逻辑调度中心
|
|
94
|
+
* @author lxm
|
|
95
|
+
* @date 2023-06-25 06:50:06
|
|
96
|
+
* @type {LogicSchedulerCenter}
|
|
97
|
+
*/
|
|
98
|
+
scheduler: LogicSchedulerCenter;
|
|
83
99
|
}
|
|
84
100
|
}
|
|
85
101
|
//# sourceMappingURL=types.d.ts.map
|
package/out/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,wBAAwB,CAAC;AAChC,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,UAAU,EACV,YAAY,EACZ,cAAc,EACd,kBAAkB,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,wBAAwB,CAAC;AAChC,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,UAAU,EACV,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,aAAa,EACd,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,OAAO;QACf;;;;;;WAMG;QACH,QAAQ,EAAE,iBAAiB,CAAC;QAC5B;;;;;;WAMG;QACH,OAAO,EAAE,YAAY,CAAC;QACtB;;;;;;;WAOG;QACH,KAAK,EAAE,UAAU,CAAC;QAClB;;;;;;;WAOG;QACH,OAAO,EAAE,YAAY,CAAC;QACtB;;;;;;;WAOG;QACH,YAAY,EAAE,iBAAiB,CAAC;QAChC;;;;;;;WAOG;QACH,QAAQ,EAAE,aAAa,CAAC;QACxB;;;;;;WAMG;QACH,OAAO,EAAE,kBAAkB,CAAC;QAC5B;;;;;;WAMG;QACH,MAAM,EAAE,cAAc,CAAC;QACvB;;;;;;WAMG;QACH,QAAQ,EAAE,cAAc,CAAC;QAEzB;;;;;;WAMG;QACH,MAAM,EAAE,aAAa,CAAC;QAEtB;;;;;WAKG;QACH,SAAS,EAAE,oBAAoB,CAAC;KACjC;CACF"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { IBizContext } from '@ibiz-template/core';
|
|
2
1
|
import { IPSAppDEUIAction } from '@ibiz-template/model';
|
|
3
2
|
import { IUIActionResult } from '../../interface';
|
|
4
3
|
/**
|
|
@@ -17,12 +16,12 @@ export declare class AppDEUIActionUtil {
|
|
|
17
16
|
* @date 2022-08-29 15:08:47
|
|
18
17
|
* @static
|
|
19
18
|
* @param {IPSAppDEUIAction} action
|
|
20
|
-
* @param {
|
|
19
|
+
* @param {IContext} context
|
|
21
20
|
* @param {(IData | null)} data
|
|
22
21
|
* @param {IParams} [params]
|
|
23
22
|
* @param {IData} [opts]
|
|
24
23
|
* @return {*} {Promise<IUIActionResult>}
|
|
25
24
|
*/
|
|
26
|
-
static exec(action: IPSAppDEUIAction, context:
|
|
25
|
+
static exec(action: IPSAppDEUIAction, context: IContext, data: IData[] | null, params: IParams, opts?: IData): Promise<IUIActionResult>;
|
|
27
26
|
}
|
|
28
27
|
//# sourceMappingURL=app-de-ui-action-util.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-de-ui-action-util.d.ts","sourceRoot":"","sources":["../../../src/utils/app-de-ui-action-util/app-de-ui-action-util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"app-de-ui-action-util.d.ts","sourceRoot":"","sources":["../../../src/utils/app-de-ui-action-util/app-de-ui-action-util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD;;;;;;;GAOG;AACH,qBAAa,iBAAiB;IAC5B;;;;;;;;;;;;OAYG;WACU,IAAI,CACf,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EACpB,MAAM,EAAE,OAAO,EACf,IAAI,CAAC,EAAE,KAAK,GACX,OAAO,CAAC,eAAe,CAAC;CAK5B"}
|
|
@@ -14,7 +14,7 @@ export class AppDEUIActionUtil {
|
|
|
14
14
|
* @date 2022-08-29 15:08:47
|
|
15
15
|
* @static
|
|
16
16
|
* @param {IPSAppDEUIAction} action
|
|
17
|
-
* @param {
|
|
17
|
+
* @param {IContext} context
|
|
18
18
|
* @param {(IData | null)} data
|
|
19
19
|
* @param {IParams} [params]
|
|
20
20
|
* @param {IData} [opts]
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { IBizContext } from '@ibiz-template/core';
|
|
2
1
|
import { IPSAppDEUIAction } from '@ibiz-template/model';
|
|
3
2
|
import { IUIActionResult } from '../../../interface';
|
|
4
3
|
import { UIActionHandler } from './ui-action-handler';
|
|
@@ -12,6 +11,6 @@ import { UIActionHandler } from './ui-action-handler';
|
|
|
12
11
|
* @extends {UIActionHandler}
|
|
13
12
|
*/
|
|
14
13
|
export declare class BackendUIActionHandler extends UIActionHandler {
|
|
15
|
-
execAction(action: IPSAppDEUIAction, context:
|
|
14
|
+
execAction(action: IPSAppDEUIAction, context: IContext, data: IData[] | null, params: IParams, _opts?: IData | undefined): Promise<IUIActionResult>;
|
|
16
15
|
}
|
|
17
16
|
//# sourceMappingURL=backend-ui-action-handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend-ui-action-handler.d.ts","sourceRoot":"","sources":["../../../../src/utils/app-de-ui-action-util/handler/backend-ui-action-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"backend-ui-action-handler.d.ts","sourceRoot":"","sources":["../../../../src/utils/app-de-ui-action-util/handler/backend-ui-action-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;;;;;;GAQG;AACH,qBAAa,sBAAuB,SAAQ,eAAe;IACnD,UAAU,CACd,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EACpB,MAAM,EAAE,OAAO,EACf,KAAK,CAAC,EAAE,KAAK,GAAG,SAAS,GACxB,OAAO,CAAC,eAAe,CAAC;CA6B5B"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isArray } from 'qx-util';
|
|
1
2
|
import { UIActionHandler } from './ui-action-handler';
|
|
2
3
|
/**
|
|
3
4
|
* 后台调用界面行为处理器
|
|
@@ -10,7 +11,7 @@ import { UIActionHandler } from './ui-action-handler';
|
|
|
10
11
|
*/
|
|
11
12
|
export class BackendUIActionHandler extends UIActionHandler {
|
|
12
13
|
async execAction(action, context, data, params, _opts) {
|
|
13
|
-
var _a, _b, _c;
|
|
14
|
+
var _a, _b, _c, _d;
|
|
14
15
|
const entityName = (_a = action.getPSAppDataEntity()) === null || _a === void 0 ? void 0 : _a.codeName;
|
|
15
16
|
const methodName = (_b = action.getPSAppDEMethod()) === null || _b === void 0 ? void 0 : _b.codeName;
|
|
16
17
|
if (!entityName || !methodName) {
|
|
@@ -20,9 +21,11 @@ export class BackendUIActionHandler extends UIActionHandler {
|
|
|
20
21
|
const { resultContext, resultParams, resultData } = await this.handleParams(action, context, data, params);
|
|
21
22
|
const deService = await ibiz.entityService.getService(entityName);
|
|
22
23
|
const _data = resultData.length > 0
|
|
23
|
-
? ((_c = resultData[0]) === null || _c === void 0 ? void 0 : _c.getRequestData()) || resultData[0]
|
|
24
|
+
? ((_d = (_c = resultData[0]) === null || _c === void 0 ? void 0 : _c.getRequestData) === null || _d === void 0 ? void 0 : _d.call(_c)) || resultData[0]
|
|
24
25
|
: {};
|
|
25
|
-
await deService.exec(methodName, resultContext, _data, resultParams);
|
|
26
|
-
return {
|
|
26
|
+
const res = await deService.exec(methodName, resultContext, _data, resultParams);
|
|
27
|
+
return {
|
|
28
|
+
data: isArray(res.data) ? res.data : [res.data],
|
|
29
|
+
};
|
|
27
30
|
}
|
|
28
31
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { IBizContext } from '@ibiz-template/core';
|
|
2
1
|
import { IPSAppDEUIAction } from '@ibiz-template/model';
|
|
3
2
|
import { IUIActionResult } from '../../../interface';
|
|
4
3
|
import { UIActionHandler } from './ui-action-handler';
|
|
@@ -12,6 +11,6 @@ import { UIActionHandler } from './ui-action-handler';
|
|
|
12
11
|
* @extends {UIActionHandler}
|
|
13
12
|
*/
|
|
14
13
|
export declare class CommonSysUIActionHandler extends UIActionHandler {
|
|
15
|
-
execAction(action: IPSAppDEUIAction, context:
|
|
14
|
+
execAction(action: IPSAppDEUIAction, context: IContext, data: IData[] | null, params: IParams, opts?: IData | undefined): Promise<IUIActionResult>;
|
|
16
15
|
}
|
|
17
16
|
//# sourceMappingURL=common-sys-ui-action-handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common-sys-ui-action-handler.d.ts","sourceRoot":"","sources":["../../../../src/utils/app-de-ui-action-util/handler/common-sys-ui-action-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"common-sys-ui-action-handler.d.ts","sourceRoot":"","sources":["../../../../src/utils/app-de-ui-action-util/handler/common-sys-ui-action-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;;;;;;GAQG;AACH,qBAAa,wBAAyB,SAAQ,eAAe;IACrD,UAAU,CACd,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EACpB,MAAM,EAAE,OAAO,EACf,IAAI,CAAC,EAAE,KAAK,GAAG,SAAS,GACvB,OAAO,CAAC,eAAe,CAAC;CAuG5B"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { IBizContext } from '@ibiz-template/core';
|
|
2
1
|
import { IPSAppDEUIAction } from '@ibiz-template/model';
|
|
3
2
|
import { IUIActionResult } from '../../../interface';
|
|
4
3
|
import { UIActionHandler } from './ui-action-handler';
|
|
@@ -12,6 +11,6 @@ import { UIActionHandler } from './ui-action-handler';
|
|
|
12
11
|
* @extends {UIActionHandler}
|
|
13
12
|
*/
|
|
14
13
|
export declare class FrontUIActionHandler extends UIActionHandler {
|
|
15
|
-
execAction(action: IPSAppDEUIAction, context:
|
|
14
|
+
execAction(action: IPSAppDEUIAction, context: IContext, data: IData[] | null, params: IParams, opts?: IData | undefined): Promise<IUIActionResult>;
|
|
16
15
|
}
|
|
17
16
|
//# sourceMappingURL=front-ui-action-handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"front-ui-action-handler.d.ts","sourceRoot":"","sources":["../../../../src/utils/app-de-ui-action-util/handler/front-ui-action-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"front-ui-action-handler.d.ts","sourceRoot":"","sources":["../../../../src/utils/app-de-ui-action-util/handler/front-ui-action-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAyB,MAAM,sBAAsB,CAAC;AAG/E,OAAO,EAAc,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;;;;;;GAQG;AACH,qBAAa,oBAAqB,SAAQ,eAAe;IACjD,UAAU,CACd,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EACpB,MAAM,EAAE,OAAO,EACf,IAAI,CAAC,EAAE,KAAK,GAAG,SAAS,GACvB,OAAO,CAAC,eAAe,CAAC;CA8C5B"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { UnsupportedModelError } from '@ibiz-template/model';
|
|
2
|
+
import { StringUtil } from '@ibiz-template/core';
|
|
1
3
|
import { OpenAppViewCommand } from '../../../command';
|
|
2
4
|
import { UIActionHandler } from './ui-action-handler';
|
|
3
5
|
/**
|
|
@@ -11,14 +13,35 @@ import { UIActionHandler } from './ui-action-handler';
|
|
|
11
13
|
*/
|
|
12
14
|
export class FrontUIActionHandler extends UIActionHandler {
|
|
13
15
|
async execAction(action, context, data, params, opts) {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
const actionResult = {};
|
|
17
|
+
const { frontProcessType } = action;
|
|
18
|
+
if (frontProcessType === 'OPENHTMLPAGE') {
|
|
19
|
+
// 打开html
|
|
20
|
+
const url = StringUtil.fill(action.htmlPageUrl, context, data === null || data === void 0 ? void 0 : data[0]);
|
|
21
|
+
window.open(url, '_blank');
|
|
17
22
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
if (['TOP', 'WIZARD'].includes(frontProcessType)) {
|
|
24
|
+
const frontPSAppView = action.getFrontPSAppView();
|
|
25
|
+
if (!frontPSAppView) {
|
|
26
|
+
throw new Error('未配置打开视图');
|
|
27
|
+
}
|
|
28
|
+
await frontPSAppView.fill(true);
|
|
29
|
+
// 处理参数
|
|
30
|
+
const { resultContext, resultParams } = await this.handleParams(action, context, data, params);
|
|
31
|
+
const res = await ibiz.commands.execute(OpenAppViewCommand.TAG, frontPSAppView, resultContext, resultParams, opts);
|
|
32
|
+
// 打开视图取消操作时,不执行刷新和关闭视图操作。
|
|
33
|
+
if ((res === null || res === void 0 ? void 0 : res.ok) === false) {
|
|
34
|
+
actionResult.closeView = false;
|
|
35
|
+
actionResult.refresh = false;
|
|
36
|
+
actionResult.cancel = true;
|
|
37
|
+
}
|
|
38
|
+
if ((res === null || res === void 0 ? void 0 : res.ok) && res.data) {
|
|
39
|
+
actionResult.data = res.data;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
throw new UnsupportedModelError(action, `未支持的前台处理模式[${frontProcessType}]`);
|
|
44
|
+
}
|
|
45
|
+
return actionResult;
|
|
23
46
|
}
|
|
24
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/app-de-ui-action-util/handler/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/app-de-ui-action-util/handler/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC"}
|