@ibiz-template/runtime 0.7.41-alpha.7 → 0.7.41-alpha.8
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 +427 -287
- package/dist/index.system.min.js +1 -1
- package/out/controller/common/editor/editor.controller.d.ts.map +1 -1
- package/out/controller/common/editor/editor.controller.js +3 -0
- package/out/controller/control/data-view/data-view.controller.d.ts +9 -11
- package/out/controller/control/data-view/data-view.controller.d.ts.map +1 -1
- package/out/controller/control/data-view/data-view.controller.js +30 -37
- package/out/controller/control/form/edit-form/edit-form.service.d.ts.map +1 -1
- package/out/controller/control/form/edit-form/edit-form.service.js +5 -1
- package/out/controller/control/kanban/kanban.controller.d.ts +31 -12
- package/out/controller/control/kanban/kanban.controller.d.ts.map +1 -1
- package/out/controller/control/kanban/kanban.controller.js +146 -50
- package/out/controller/ctx/ctx.js +2 -2
- package/out/interface/api/controller/control/i-api-edit-form.controller.d.ts +1 -0
- package/out/interface/api/controller/control/i-api-edit-form.controller.d.ts.map +1 -1
- package/out/interface/api/controller/control/i-api-kanban.controller.d.ts +2 -0
- package/out/interface/api/controller/control/i-api-kanban.controller.d.ts.map +1 -1
- package/out/interface/common/i-modal/i-modal.d.ts +3 -0
- package/out/interface/common/i-modal/i-modal.d.ts.map +1 -1
- package/out/interface/controller/controller/common/i-drag-change-info.d.ts +22 -14
- package/out/interface/controller/controller/common/i-drag-change-info.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-data-view-control.state.d.ts +8 -0
- package/out/interface/controller/state/control/i-data-view-control.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-kanban.state.d.ts +43 -8
- package/out/interface/controller/state/control/i-kanban.state.d.ts.map +1 -1
- package/out/interface/util/i-app-util/i-app-util.d.ts +6 -0
- package/out/interface/util/i-app-util/i-app-util.d.ts.map +1 -1
- package/out/ui-action/provider/custom-ui-action-provider.js +1 -1
- package/out/ui-action/provider/front-ui-action-provider.d.ts.map +1 -1
- package/out/ui-action/provider/front-ui-action-provider.js +54 -40
- package/out/ui-action/provider/ui-action-provider-base.d.ts +1 -0
- package/out/ui-action/provider/ui-action-provider-base.d.ts.map +1 -1
- package/out/ui-action/provider/ui-action-provider-base.js +14 -2
- package/out/ui-action/uiaction-util.js +2 -2
- package/out/ui-logic/ui-logic.d.ts.map +1 -1
- package/out/ui-logic/ui-logic.js +5 -1
- package/out/utils/modal/modal.d.ts +3 -0
- package/out/utils/modal/modal.d.ts.map +1 -1
- package/out/utils/modal/modal.js +7 -0
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i-modal.d.ts","sourceRoot":"","sources":["../../../../src/interface/common/i-modal/i-modal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,KAAK,UAAU,GAAG;IAChB,aAAa,EAAE,eAAe,CAC5B;KAAE,EACF;QACE,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB,CACF,CAAC;IACF,aAAa,EAAE,eAAe,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;CAChD,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,WAAW,MAAM;IACrB;;;;;;OAMG;IACH,IAAI,EAAE,QAAQ,CAAC;IAEf;;;;;;OAMG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAE5B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;OAKG;IACH,KAAK,EAAE,UAAU,CAAC;IAElB;;;;;;OAMG;IACH,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,UAAU,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAClD"}
|
|
1
|
+
{"version":3,"file":"i-modal.d.ts","sourceRoot":"","sources":["../../../../src/interface/common/i-modal/i-modal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,KAAK,UAAU,GAAG;IAChB,UAAU,EAAE,eAAe,CAAC,EAAE,EAAE;QAAE,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACzD,aAAa,EAAE,eAAe,CAC5B;KAAE,EACF;QACE,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB,CACF,CAAC;IACF,aAAa,EAAE,eAAe,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;CAChD,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,WAAW,MAAM;IACrB;;;;;;OAMG;IACH,IAAI,EAAE,QAAQ,CAAC;IAEf;;;;;;OAMG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAE5B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;OAKG;IACH,KAAK,EAAE,UAAU,CAAC;IAElB;;;;;;OAMG;IACH,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,UAAU,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAClD"}
|
|
@@ -7,32 +7,40 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export interface IDragChangeInfo {
|
|
9
9
|
/**
|
|
10
|
-
* 变更前的分组标识
|
|
11
|
-
* @
|
|
12
|
-
* @
|
|
13
|
-
* @type {string}
|
|
10
|
+
* @description 变更前的分组标识
|
|
11
|
+
* @type {(string | number)}
|
|
12
|
+
* @memberof IDragChangeInfo
|
|
14
13
|
*/
|
|
15
14
|
from: string | number;
|
|
16
15
|
/**
|
|
17
|
-
* 变更后的分组标识
|
|
18
|
-
* @
|
|
19
|
-
* @
|
|
20
|
-
* @type {string}
|
|
16
|
+
* @description 变更后的分组标识
|
|
17
|
+
* @type {(string | number)}
|
|
18
|
+
* @memberof IDragChangeInfo
|
|
21
19
|
*/
|
|
22
20
|
to: string | number;
|
|
23
21
|
/**
|
|
24
|
-
* 变更前的索引位置
|
|
25
|
-
* @author lxm
|
|
26
|
-
* @date 2023-08-30 04:25:02
|
|
22
|
+
* @description 变更前的索引位置
|
|
27
23
|
* @type {number}
|
|
24
|
+
* @memberof IDragChangeInfo
|
|
28
25
|
*/
|
|
29
26
|
fromIndex: number;
|
|
30
27
|
/**
|
|
31
|
-
* 变更后的索引位置
|
|
32
|
-
* @author lxm
|
|
33
|
-
* @date 2023-08-30 04:24:53
|
|
28
|
+
* @description 变更后的索引位置
|
|
34
29
|
* @type {number}
|
|
30
|
+
* @memberof IDragChangeInfo
|
|
35
31
|
*/
|
|
36
32
|
toIndex: number;
|
|
33
|
+
/**
|
|
34
|
+
* @description 变更前的泳道
|
|
35
|
+
* @type {string}
|
|
36
|
+
* @memberof IDragChangeInfo
|
|
37
|
+
*/
|
|
38
|
+
fromLane?: string;
|
|
39
|
+
/**
|
|
40
|
+
* @description 变更后的泳道
|
|
41
|
+
* @type {string}
|
|
42
|
+
* @memberof IDragChangeInfo
|
|
43
|
+
*/
|
|
44
|
+
toLane?: string;
|
|
37
45
|
}
|
|
38
46
|
//# sourceMappingURL=i-drag-change-info.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i-drag-change-info.d.ts","sourceRoot":"","sources":["../../../../../src/interface/controller/controller/common/i-drag-change-info.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B
|
|
1
|
+
{"version":3,"file":"i-drag-change-info.d.ts","sourceRoot":"","sources":["../../../../../src/interface/controller/controller/common/i-drag-change-info.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAEtB;;;;OAIG;IACH,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IAEpB;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -9,6 +9,14 @@ import { IMDControlState } from './i-md-control.state';
|
|
|
9
9
|
* @extends {IApiDataViewControlState}
|
|
10
10
|
*/
|
|
11
11
|
export interface IDataViewControlState extends IMDControlState, IApiDataViewControlState {
|
|
12
|
+
/**
|
|
13
|
+
* @description 操作项状态
|
|
14
|
+
* @type {{ [p: string]: IButtonContainerState }}
|
|
15
|
+
* @memberof IKanbanState
|
|
16
|
+
*/
|
|
17
|
+
uaState: {
|
|
18
|
+
[p: string]: IButtonContainerState;
|
|
19
|
+
};
|
|
12
20
|
/**
|
|
13
21
|
* @description 分组界面行为组状态
|
|
14
22
|
* @type {IButtonContainerState}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i-data-view-control.state.d.ts","sourceRoot":"","sources":["../../../../../src/interface/controller/state/control/i-data-view-control.state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;;;;GAMG;AACH,MAAM,WAAW,qBACf,SAAQ,eAAe,EACrB,wBAAwB;IAC1B;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;CAC/C"}
|
|
1
|
+
{"version":3,"file":"i-data-view-control.state.d.ts","sourceRoot":"","sources":["../../../../../src/interface/controller/state/control/i-data-view-control.state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;;;;GAMG;AACH,MAAM,WAAW,qBACf,SAAQ,eAAe,EACrB,wBAAwB;IAC1B;;;;OAIG;IACH,OAAO,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,qBAAqB,CAAA;KAAE,CAAC;IAChD;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;CAC/C"}
|
|
@@ -10,20 +10,49 @@ import { IMDControlGroupState } from './i-md-control.state';
|
|
|
10
10
|
* @extends {IApiKanbanState}
|
|
11
11
|
*/
|
|
12
12
|
export interface IKanbanState extends IDataViewControlState, IApiKanbanState {
|
|
13
|
-
/**
|
|
14
|
-
* @description 看板卡片操作项状态
|
|
15
|
-
* @type {{ [p: string]: IButtonContainerState }}
|
|
16
|
-
* @memberof IKanbanState
|
|
17
|
-
*/
|
|
18
|
-
uaState: {
|
|
19
|
-
[p: string]: IButtonContainerState;
|
|
20
|
-
};
|
|
21
13
|
/**
|
|
22
14
|
* @description 分组数据
|
|
23
15
|
* @type {IKanbanGroupState[]}
|
|
24
16
|
* @memberof IKanbanState
|
|
25
17
|
*/
|
|
26
18
|
groups: IKanbanGroupState[];
|
|
19
|
+
/**
|
|
20
|
+
* @description 泳道数据
|
|
21
|
+
* @type {IKanbanLane[]}
|
|
22
|
+
* @memberof IKanbanState
|
|
23
|
+
*/
|
|
24
|
+
lanes: IKanbanLane[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @description 看板泳道数据
|
|
28
|
+
* @export
|
|
29
|
+
* @interface IKanbanLane
|
|
30
|
+
*/
|
|
31
|
+
export interface IKanbanLane {
|
|
32
|
+
/**
|
|
33
|
+
* @description 泳道标识
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof IKanbanLane
|
|
36
|
+
*/
|
|
37
|
+
key?: string;
|
|
38
|
+
/**
|
|
39
|
+
* @description 泳道标题
|
|
40
|
+
* @type {string}
|
|
41
|
+
* @memberof IKanbanLane
|
|
42
|
+
*/
|
|
43
|
+
caption: string;
|
|
44
|
+
/**
|
|
45
|
+
* @description 是否展开泳道
|
|
46
|
+
* @type {boolean}
|
|
47
|
+
* @memberof IKanbanLane
|
|
48
|
+
*/
|
|
49
|
+
isExpand: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* @description 数量
|
|
52
|
+
* @type {number}
|
|
53
|
+
* @memberof IKanbanLane
|
|
54
|
+
*/
|
|
55
|
+
count: number;
|
|
27
56
|
}
|
|
28
57
|
/**
|
|
29
58
|
* @description 看板部件分组数据
|
|
@@ -33,6 +62,12 @@ export interface IKanbanState extends IDataViewControlState, IApiKanbanState {
|
|
|
33
62
|
* @extends {IApiKanbanGroupState}
|
|
34
63
|
*/
|
|
35
64
|
export interface IKanbanGroupState extends IMDControlGroupState, IApiKanbanGroupState {
|
|
65
|
+
/**
|
|
66
|
+
* @description 分组是否展开
|
|
67
|
+
* @type {boolean}
|
|
68
|
+
* @memberof IKanbanGroupState
|
|
69
|
+
*/
|
|
70
|
+
isExpand?: boolean;
|
|
36
71
|
/**
|
|
37
72
|
* @description 分组界面行为组状态
|
|
38
73
|
* @type {IButtonContainerState}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i-kanban.state.d.ts","sourceRoot":"","sources":["../../../../../src/interface/controller/state/control/i-kanban.state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;;;;;GAMG;AACH,MAAM,WAAW,YAAa,SAAQ,qBAAqB,EAAE,eAAe;IAC1E;;;;OAIG;IACH,
|
|
1
|
+
{"version":3,"file":"i-kanban.state.d.ts","sourceRoot":"","sources":["../../../../../src/interface/controller/state/control/i-kanban.state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;;;;;GAMG;AACH,MAAM,WAAW,YAAa,SAAQ,qBAAqB,EAAE,eAAe;IAC1E;;;;OAIG;IACH,MAAM,EAAE,iBAAiB,EAAE,CAAC;IAE5B;;;;OAIG;IACH,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,MAAM,WAAW,iBACf,SAAQ,oBAAoB,EAC1B,oBAAoB;IACtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;CAC/C"}
|
|
@@ -69,6 +69,12 @@ export interface IAiChatParam {
|
|
|
69
69
|
* @interface IAppUtil
|
|
70
70
|
*/
|
|
71
71
|
export interface IAppUtil {
|
|
72
|
+
/**
|
|
73
|
+
* @description 路由是否初始化构建完成
|
|
74
|
+
* @returns {*} {Promise<void>}
|
|
75
|
+
* @memberof IAppUtil
|
|
76
|
+
*/
|
|
77
|
+
onRouteIsReady(): Promise<void>;
|
|
72
78
|
/**
|
|
73
79
|
* 登录(包含调用登录逻辑,及跳转应用界面)
|
|
74
80
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i-app-util.d.ts","sourceRoot":"","sources":["../../../../src/interface/util/i-app-util/i-app-util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEvE;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;OAKG;IACH,OAAO,EAAE,QAAQ,CAAC;IAElB;;;;;;OAMG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;;;;;OAMG;IACH,IAAI,EAAE,KAAK,CAAC;IAEZ;;;;;OAKG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;;;;OAKG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;;OAKG;IACH,IAAI,EAAE,eAAe,CAAC;IAEtB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,kBAAkB,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,QAAQ;IACvB;;;;;;;;;;;OAWG;IACH,KAAK,CACH,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,OAAO,EAClB,OAAO,CAAC,EAAE,KAAK,EACf,IAAI,CAAC,EAAE,KAAK,GACX,OAAO,CAAC,OAAO,CAAC,CAAC;IAEpB;;;;;;;OAOG;IACH,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEvC;;;;;;;;;OASG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAE9E;;;;;;;;;OASG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE9E;;;;;;;;;OASG;IACH,WAAW,CACT,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,IAAI,CAAC,EAAE,KAAK,GACX,OAAO,CAAC,OAAO,CAAC,CAAC;IAEpB;;;;;;;;;OASG;IACH,cAAc,CACZ,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,IAAI,CAAC,EAAE,KAAK,GACX,OAAO,CAAC,OAAO,CAAC,CAAC;IAEpB;;;;;OAKG;IACH,aAAa,IAAI,OAAO,GAAG,SAAS,CAAC;IAErC;;;;;;OAMG;IACH,UAAU,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;CAC3D"}
|
|
1
|
+
{"version":3,"file":"i-app-util.d.ts","sourceRoot":"","sources":["../../../../src/interface/util/i-app-util/i-app-util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEvE;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;OAKG;IACH,OAAO,EAAE,QAAQ,CAAC;IAElB;;;;;;OAMG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;;;;;OAMG;IACH,IAAI,EAAE,KAAK,CAAC;IAEZ;;;;;OAKG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;;;;OAKG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;;OAKG;IACH,IAAI,EAAE,eAAe,CAAC;IAEtB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,kBAAkB,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,QAAQ;IACvB;;;;OAIG;IACH,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC;;;;;;;;;;;OAWG;IACH,KAAK,CACH,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,OAAO,EAClB,OAAO,CAAC,EAAE,KAAK,EACf,IAAI,CAAC,EAAE,KAAK,GACX,OAAO,CAAC,OAAO,CAAC,CAAC;IAEpB;;;;;;;OAOG;IACH,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEvC;;;;;;;;;OASG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAE9E;;;;;;;;;OASG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE9E;;;;;;;;;OASG;IACH,WAAW,CACT,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,IAAI,CAAC,EAAE,KAAK,GACX,OAAO,CAAC,OAAO,CAAC,CAAC;IAEpB;;;;;;;;;OASG;IACH,cAAc,CACZ,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,IAAI,CAAC,EAAE,KAAK,GACX,OAAO,CAAC,OAAO,CAAC,CAAC;IAEpB;;;;;OAKG;IACH,aAAa,IAAI,OAAO,GAAG,SAAS,CAAC;IAErC;;;;;;OAMG;IACH,UAAU,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;CAC3D"}
|
|
@@ -6,7 +6,7 @@ export class CustomUIActionProvider extends UIActionProviderBase {
|
|
|
6
6
|
const { scriptCode } = action;
|
|
7
7
|
const { context, params, data, event, view, ctrl } = args;
|
|
8
8
|
if (scriptCode) {
|
|
9
|
-
const result = (await ScriptFactory.asyncExecScriptFn({ context, params, data, el: event === null || event === void 0 ? void 0 : event.target, view, ctrl }, scriptCode));
|
|
9
|
+
const result = (await ScriptFactory.asyncExecScriptFn({ context, params, data, el: event === null || event === void 0 ? void 0 : event.target, view, ctrl, action }, scriptCode));
|
|
10
10
|
return result || {};
|
|
11
11
|
}
|
|
12
12
|
throw new RuntimeModelError(action, ibiz.i18n.t('runtime.uiAction.missingConfigurationScriptCode'));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"front-ui-action-provider.d.ts","sourceRoot":"","sources":["../../../src/ui-action/provider/front-ui-action-provider.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,cAAc,EACd,WAAW,EACX,aAAa,EAEd,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,cAAc,EACd,eAAe,EAKhB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"front-ui-action-provider.d.ts","sourceRoot":"","sources":["../../../src/ui-action/provider/front-ui-action-provider.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,cAAc,EACd,WAAW,EACX,aAAa,EAEd,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,cAAc,EACd,eAAe,EAKhB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAKjE;;;;;;GAMG;AACH,qBAAa,qBAAsB,SAAQ,oBAAoB;IACvD,UAAU,CACd,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,eAAe,CAAC;IA8F3B;;;;;;;;OAQG;cACa,OAAO,CACrB,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,eAAe,CAAC;IAoB3B;;;;;;OAMG;cACa,YAAY,CAC1B,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,IAAI,CAAC;IA0EhB;;;;;;OAMG;cACa,iBAAiB,CAC/B,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,eAAe,CAAC;IA+B3B;;;;;;OAMG;cACa,iBAAiB,CAC/B,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,IAAI,CAAC;IAkEhB;;;;;;;;OAQG;cACa,YAAY,CAC1B,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,eAAe,CAAC;IA4D3B;;;;;;;;OAQG;cACa,aAAa,CAC3B,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,eAAe,CAAC;IAuD3B;;;;;;;;OAQG;IACH,SAAS,CAAC,kBAAkB,CAC1B,SAAS,EAAE,WAAW,GAAG,SAAS,EAClC,WAAW,CAAC,EAAE,aAAa,GAC1B,WAAW,GAAG,SAAS;IAc1B;;;;;;;;OAQG;cACa,UAAU,CACxB,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,eAAe,CAAC;CA0B5B"}
|
|
@@ -5,6 +5,7 @@ import { ScriptFactory } from '../../utils';
|
|
|
5
5
|
import { UIActionProviderBase } from './ui-action-provider-base';
|
|
6
6
|
import { openDataImport } from '../../controller/utils';
|
|
7
7
|
import { SysUIActionTag } from '../../constant';
|
|
8
|
+
import { calcResPath } from '../../service';
|
|
8
9
|
/**
|
|
9
10
|
* 前台调用界面行为适配器
|
|
10
11
|
*
|
|
@@ -96,7 +97,7 @@ export class FrontUIActionProvider extends UIActionProviderBase {
|
|
|
96
97
|
return result || {};
|
|
97
98
|
}
|
|
98
99
|
if (scriptCode) {
|
|
99
|
-
const result = (await ScriptFactory.asyncExecScriptFn({ context, params, data, el: event === null || event === void 0 ? void 0 : event.target, view, ctrl }, scriptCode));
|
|
100
|
+
const result = (await ScriptFactory.asyncExecScriptFn({ context, params, data, el: event === null || event === void 0 ? void 0 : event.target, view, ctrl, action }, scriptCode));
|
|
100
101
|
return result || {};
|
|
101
102
|
}
|
|
102
103
|
throw new RuntimeModelError(action, ibiz.i18n.t('runtime.uiAction.missingConfigurationScriptCode'));
|
|
@@ -109,52 +110,63 @@ export class FrontUIActionProvider extends UIActionProviderBase {
|
|
|
109
110
|
* @return {*}
|
|
110
111
|
*/
|
|
111
112
|
async executePrint(action, args) {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
if (appDEPrint) {
|
|
120
|
-
let requestUrl = '';
|
|
121
|
-
if (resultContext &&
|
|
122
|
-
resultContext[appDataEntity.codeName.toLowerCase()]) {
|
|
123
|
-
// TODO 临时写死printdata, 非标准,后续优化
|
|
124
|
-
requestUrl += `/${appDataEntity.deapicodeName2}/printdata/${resultContext[appDataEntity.codeName.toLowerCase()]}`;
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
throw new RuntimeError(ibiz.i18n.t('runtime.uiAction.dataPrimaryKey'));
|
|
128
|
-
}
|
|
129
|
-
const res = await ibiz.net.request(requestUrl, {
|
|
130
|
-
method: 'get',
|
|
131
|
-
responseType: 'blob',
|
|
132
|
-
params: Object.assign({ srfprinttag: appDEPrint.codeName }, resultParams),
|
|
113
|
+
const execute = async (data) => {
|
|
114
|
+
var _a;
|
|
115
|
+
// 处理参数
|
|
116
|
+
const { resultContext, resultParams } = await this.handleParams(action, args.context, data, args.params);
|
|
117
|
+
const appDataEntity = await ibiz.hub.getAppDataEntity(action.appDataEntityId, action.appId);
|
|
118
|
+
const appDEPrint = (_a = appDataEntity.appDEPrints) === null || _a === void 0 ? void 0 : _a.find(print => {
|
|
119
|
+
return print.id === action.appDEPrintId;
|
|
133
120
|
});
|
|
134
|
-
if (
|
|
135
|
-
|
|
136
|
-
if (
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
const
|
|
140
|
-
|
|
141
|
-
a.download = fileName;
|
|
142
|
-
document.body.appendChild(a);
|
|
143
|
-
a.click();
|
|
144
|
-
document.body.removeChild(a);
|
|
145
|
-
URL.revokeObjectURL(href);
|
|
121
|
+
if (appDEPrint) {
|
|
122
|
+
let requestUrl = '';
|
|
123
|
+
if (resultContext &&
|
|
124
|
+
resultContext[appDataEntity.codeName.toLowerCase()]) {
|
|
125
|
+
// TODO 临时写死printdata, 非标准,后续优化
|
|
126
|
+
const resPath = calcResPath(resultContext, appDataEntity);
|
|
127
|
+
requestUrl += `${resPath}/${appDataEntity.deapicodeName2}/printdata/${resultContext[appDataEntity.codeName.toLowerCase()]}`;
|
|
146
128
|
}
|
|
147
129
|
else {
|
|
148
|
-
|
|
149
|
-
|
|
130
|
+
throw new RuntimeError(ibiz.i18n.t('runtime.uiAction.dataPrimaryKey'));
|
|
131
|
+
}
|
|
132
|
+
const app = await ibiz.hub.getAppAsync(action.appId);
|
|
133
|
+
const res = await app.net.request(requestUrl, {
|
|
134
|
+
method: 'get',
|
|
135
|
+
responseType: 'blob',
|
|
136
|
+
params: Object.assign({ srfprinttag: appDEPrint.codeName }, resultParams),
|
|
137
|
+
});
|
|
138
|
+
if (res.ok) {
|
|
139
|
+
// 存在srfcontenttype参数需响应文件
|
|
140
|
+
if (resultParams && resultParams.srfcontenttype) {
|
|
141
|
+
const fileName = ibiz.util.file.getFileName(res);
|
|
142
|
+
const href = URL.createObjectURL(res.data);
|
|
143
|
+
const a = document.createElement('a');
|
|
144
|
+
a.href = href;
|
|
145
|
+
a.download = fileName;
|
|
146
|
+
document.body.appendChild(a);
|
|
147
|
+
a.click();
|
|
148
|
+
document.body.removeChild(a);
|
|
149
|
+
URL.revokeObjectURL(href);
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
const link = window.URL.createObjectURL(res.data);
|
|
153
|
+
window.open(link, '_blank');
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
throw new RuntimeError(ibiz.i18n.t('runtime.uiAction.printFailure'));
|
|
150
158
|
}
|
|
151
159
|
}
|
|
152
160
|
else {
|
|
153
|
-
throw new RuntimeError(ibiz.i18n.t('runtime.uiAction.
|
|
161
|
+
throw new RuntimeError(ibiz.i18n.t('runtime.uiAction.physicalPrint'));
|
|
154
162
|
}
|
|
163
|
+
};
|
|
164
|
+
const isMultiData = ['MULTIKEY', 'MULTIDATA'].includes(action.actionTarget);
|
|
165
|
+
if (isMultiData) {
|
|
166
|
+
await Promise.all(args.data.map(item => execute([item])));
|
|
155
167
|
}
|
|
156
168
|
else {
|
|
157
|
-
|
|
169
|
+
await execute(args.data);
|
|
158
170
|
}
|
|
159
171
|
}
|
|
160
172
|
/**
|
|
@@ -200,7 +212,8 @@ export class FrontUIActionProvider extends UIActionProviderBase {
|
|
|
200
212
|
});
|
|
201
213
|
if (appDEDataExport) {
|
|
202
214
|
// TODO 临时写死fetchdefault,应该从appDEDataExport的主表格上获取加载行为,但现在缺主表格模型,后续优化
|
|
203
|
-
const
|
|
215
|
+
const resPath = calcResPath(resultContext, appDataEntity);
|
|
216
|
+
const url = `${resPath}/${appDataEntity.deapicodeName2}/exportdata/fetchdefault`;
|
|
204
217
|
// 查询参数
|
|
205
218
|
const queryParam = { srfexporttag: appDEDataExport.codeName };
|
|
206
219
|
if (resultContext === null || resultContext === void 0 ? void 0 : resultContext.srfdatatype) {
|
|
@@ -208,7 +221,8 @@ export class FrontUIActionProvider extends UIActionProviderBase {
|
|
|
208
221
|
}
|
|
209
222
|
// 参数
|
|
210
223
|
const params = Object.assign(Object.assign({ page: 0, size: appDEDataExport.maxRowCount ? appDEDataExport.maxRowCount : 1000 }, args.params), resultParams);
|
|
211
|
-
const
|
|
224
|
+
const app = await ibiz.hub.getAppAsync(action.appId);
|
|
225
|
+
const res = await app.net.request(url, {
|
|
212
226
|
method: 'post',
|
|
213
227
|
responseType: 'blob',
|
|
214
228
|
params: queryParam,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-action-provider-base.d.ts","sourceRoot":"","sources":["../../../src/ui-action/provider/ui-action-provider-base.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ui-action-provider-base.d.ts","sourceRoot":"","sources":["../../../src/ui-action/provider/ui-action-provider-base.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAgC,MAAM,kBAAkB,CAAC;AAChF,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAMzB;;;;;;;GAOG;AACH,8BAAsB,oBAAqB,YAAW,iBAAiB;IACrE;;;;;;;OAOG;IACG,IAAI,CACR,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,eAAe,CAAC;IA4F3B;;;;;;;;OAQG;IACH,SAAS,CAAC,iBAAiB,CACzB,IAAI,EAAE,cAAc,EACpB,MAAM,EAAE,eAAe,GACtB,cAAc;IASjB;;;;;;;;OAQG;IACH,SAAS,CAAC,WAAW,CACnB,MAAM,EAAE,eAAe,EACvB,IAAI,EAAE,eAAe,GACpB,eAAe;IAUlB;;;;;;;OAOG;IACG,SAAS,CACb,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,OAAO,CAAC;IAWnB;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,UAAU,CACjB,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,eAAe,CAAC;IAE3B;;;;;;;;;;;OAWG;IACG,YAAY,CAChB,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,cAAc,EACtB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC;IAOvC;;;;;;;;;;;;;;;;OAgBG;cACa,YAAY,CAC1B,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EAAE,EACb,MAAM,EAAE,OAAO,GACd,OAAO,CAAC;QACT,aAAa,EAAE,QAAQ,CAAC;QACxB,UAAU,EAAE,KAAK,EAAE,CAAC;QACpB,YAAY,EAAE,OAAO,CAAC;QACtB,YAAY,EAAE,OAAO,CAAC;KACvB,CAAC;IA4GF;;;;;;;;;OASG;IACH,SAAS,CAAC,WAAW,CACnB,IAAI,EAAE,SAAS,GAAG,SAAS,EAC3B,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,MAAM,GAAG,SAAS;IA4CrB;;;;;;;;OAQG;IACH,sBAAsB,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK;CAc5C"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable no-prototype-builtins */
|
|
1
2
|
import { RuntimeModelError } from '@ibiz-template/core';
|
|
2
3
|
import { calcDeCodeNameById } from '../../model';
|
|
3
4
|
import { execUILogic } from '../../ui-logic';
|
|
@@ -26,7 +27,7 @@ export class UIActionProviderBase {
|
|
|
26
27
|
refreshMode: action.refreshMode,
|
|
27
28
|
closeView: action.closeEditView,
|
|
28
29
|
};
|
|
29
|
-
const { view } = args;
|
|
30
|
+
const { context, params, data, view } = args;
|
|
30
31
|
if (action.closeEditView) {
|
|
31
32
|
view.state.isClosing = true;
|
|
32
33
|
}
|
|
@@ -46,6 +47,11 @@ export class UIActionProviderBase {
|
|
|
46
47
|
}
|
|
47
48
|
// ** 执行不同类型的界面行为独有逻辑,并且合并result
|
|
48
49
|
const _result = await this.execAction(action, args);
|
|
50
|
+
// 预置属性相关处理
|
|
51
|
+
const { presetParams } = await this.handleParams(action, context, data, params);
|
|
52
|
+
if (presetParams.ignoredirtycheck === 'true') {
|
|
53
|
+
view.modal.ignoreDismissCheck = true;
|
|
54
|
+
}
|
|
49
55
|
Object.assign(result, _result);
|
|
50
56
|
// 如果是取消操作则中断后续处理逻辑。
|
|
51
57
|
if (result.cancel === true) {
|
|
@@ -236,7 +242,13 @@ export class UIActionProviderBase {
|
|
|
236
242
|
navContexts,
|
|
237
243
|
navParams,
|
|
238
244
|
}, tempContext);
|
|
239
|
-
|
|
245
|
+
// 预置属性(ignoredirtycheck)处理
|
|
246
|
+
const presetParams = {};
|
|
247
|
+
if (resultParams.hasOwnProperty('ignoredirtycheck')) {
|
|
248
|
+
presetParams.ignoredirtycheck = resultParams.ignoredirtycheck;
|
|
249
|
+
delete resultParams.ignoredirtycheck;
|
|
250
|
+
}
|
|
251
|
+
return { resultContext, resultData, resultParams, presetParams };
|
|
240
252
|
}
|
|
241
253
|
/**
|
|
242
254
|
* 计算消息信息(动态,多语言资源)
|
|
@@ -46,8 +46,8 @@ export class UIActionUtil {
|
|
|
46
46
|
var _a, _b;
|
|
47
47
|
const result = await this.exec(actionId, params, appId);
|
|
48
48
|
if (result.closeView) {
|
|
49
|
-
//
|
|
50
|
-
|
|
49
|
+
// 编辑器失焦后,调整数据后直接点击关闭按钮导致无法触发自动保存通过modal中preDismiss钩子执行,shouldDismiss钩子仅负责计算是否可关闭视图参数,不能混为一谈
|
|
50
|
+
params.view.modal.ignoreDismissCheck = true;
|
|
51
51
|
params.view.closeView({ ok: true });
|
|
52
52
|
}
|
|
53
53
|
else if (result.refresh) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-logic.d.ts","sourceRoot":"","sources":["../../src/ui-logic/ui-logic.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ui-logic.d.ts","sourceRoot":"","sources":["../../src/ui-logic/ui-logic.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAmBL,WAAW,EAGZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE/D;;;;;;;GAOG;AACH,qBAAa,OAAO;IA2BN,SAAS,CAAC,KAAK,EAAE,UAAU;IA1BvC;;;;;;;OAOG;IACH,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAa;IAEtD;;;;;;;OAOG;IACH,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAa;IAExD;;;;;OAKG;gBACmB,KAAK,EAAE,UAAU;IA+FvC;;;;;;;;;;OAUG;IACH,SAAS,CAAC,eAAe,CAAC,GAAG,EAAE,cAAc,GAAG,IAAI;IASpD;;;;;;;;;OASG;IACG,IAAI,CAAC,UAAU,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC;IAyBxD;;;;;;;;;;;;;OAaG;cACa,QAAQ,CACtB,IAAI,EAAE,WAAW,EACjB,GAAG,EAAE,cAAc,GAClB,OAAO,CAAC,IAAI,CAAC;CAiBjB"}
|
package/out/ui-logic/ui-logic.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* eslint-disable no-await-in-loop */
|
|
2
|
-
import { ModelError, RuntimeModelError } from '@ibiz-template/core';
|
|
2
|
+
import { IBizContext, ModelError, RuntimeModelError, } from '@ibiz-template/core';
|
|
3
|
+
import { clone } from 'ramda';
|
|
3
4
|
import { UILogicContext } from './ui-logic-context';
|
|
4
5
|
import { AppendParamNode, BindParamNode, CopyParamNode, DataSetNode, DEActionNode, DebugParamNode, DEUIActionNode, EndNode, ExecuteDELogicNode, MsgBoxNode, PFPluginNode, PrepareJSParamNode, RawJSCodeNode, RenewParamNode, ResetParamNode, SortParamNode, StartNode, ThrowExceptionNode, ViewCtrlFireEventNode, ViewCtrlInvokeNode, } from './ui-logic-node';
|
|
5
6
|
import { UILogicParam } from './ui-logic-param/ui-logic-param';
|
|
@@ -156,6 +157,9 @@ export class UILogic {
|
|
|
156
157
|
* @return {*} {Promise<IData>}
|
|
157
158
|
*/
|
|
158
159
|
async exec(parameters) {
|
|
160
|
+
// 克隆传入应用上下文参数和视图参数
|
|
161
|
+
parameters.context = IBizContext.create(parameters.context);
|
|
162
|
+
parameters.params = clone(parameters.params || {});
|
|
159
163
|
const ctx = new UILogicContext(this.params, parameters);
|
|
160
164
|
this.initLogicParams(ctx);
|
|
161
165
|
const { startDEUILogicNodeId } = this.model;
|
|
@@ -18,6 +18,9 @@ export declare class Modal implements IModal {
|
|
|
18
18
|
viewUsage: number;
|
|
19
19
|
ignoreDismissCheck: boolean;
|
|
20
20
|
hooks: {
|
|
21
|
+
preDismiss: AsyncSeriesHook<[], {
|
|
22
|
+
allowNext?: boolean | undefined;
|
|
23
|
+
}>;
|
|
21
24
|
shouldDismiss: AsyncSeriesHook<[], {
|
|
22
25
|
allowClose?: boolean | undefined;
|
|
23
26
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/utils/modal/modal.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAErD,KAAK,eAAe,GAAG;IACrB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;CACtC,CAAC;AACF,qBAAa,KAAM,YAAW,MAAM;IAClC,IAAI,EAAE,QAAQ,CAAkB;IAEhC,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,SAAS,EAAE,MAAM,CAAK;IAEtB,kBAAkB,EAAE,OAAO,CAAS;IAEpC,KAAK
|
|
1
|
+
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/utils/modal/modal.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAErD,KAAK,eAAe,GAAG;IACrB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;CACtC,CAAC;AACF,qBAAa,KAAM,YAAW,MAAM;IAClC,IAAI,EAAE,QAAQ,CAAkB;IAEhC,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,SAAS,EAAE,MAAM,CAAK;IAEtB,kBAAkB,EAAE,OAAO,CAAS;IAEpC,KAAK;;;;;;;;MAIH;gBAEU,IAAI,EAAE,eAAe;IAejC;;;;OAIG;IACH,QAAQ,SAAU,UAAU,KAAG,IAAI,CAKjC;IAEF;;;;;OAKG;IACH,aAAa,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,GAAG,IAAI;IAIlD,OAAO,CAAC,IAAI,GAAE,UAAoC,GAAG,OAAO,CAAC,OAAO,CAAC;IA2B3E;;;;;OAKG;IACH,SAAS,CAAC,OAAO,IAAI,IAAI;CAK1B"}
|
package/out/utils/modal/modal.js
CHANGED
|
@@ -7,6 +7,7 @@ export class Modal {
|
|
|
7
7
|
this.viewUsage = 4;
|
|
8
8
|
this.ignoreDismissCheck = false;
|
|
9
9
|
this.hooks = {
|
|
10
|
+
preDismiss: new AsyncSeriesHook(),
|
|
10
11
|
shouldDismiss: new AsyncSeriesHook(),
|
|
11
12
|
beforeDismiss: new AsyncSeriesHook(),
|
|
12
13
|
};
|
|
@@ -42,6 +43,11 @@ export class Modal {
|
|
|
42
43
|
}
|
|
43
44
|
async dismiss(data = { ok: false, data: [] }) {
|
|
44
45
|
const context = {};
|
|
46
|
+
// 关闭前执行操作
|
|
47
|
+
await this.hooks.preDismiss.call(context);
|
|
48
|
+
if (context.allowNext === false) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
45
51
|
if (this.ignoreDismissCheck !== true) {
|
|
46
52
|
// 判断是否执行关闭
|
|
47
53
|
await this.hooks.shouldDismiss.call(context);
|
|
@@ -64,6 +70,7 @@ export class Modal {
|
|
|
64
70
|
* @protected
|
|
65
71
|
*/
|
|
66
72
|
destroy() {
|
|
73
|
+
this.hooks.preDismiss.clear();
|
|
67
74
|
this.hooks.shouldDismiss.clear();
|
|
68
75
|
this.hooks.beforeDismiss.clear();
|
|
69
76
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/runtime",
|
|
3
|
-
"version": "0.7.41-alpha.
|
|
3
|
+
"version": "0.7.41-alpha.8",
|
|
4
4
|
"description": "运行时逻辑库",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "out/index.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@ibiz-template/core": "^0.7.41-alpha.7",
|
|
41
|
-
"@ibiz/model-core": "^0.1.
|
|
41
|
+
"@ibiz/model-core": "^0.1.78",
|
|
42
42
|
"@types/animejs": "^3.1.12",
|
|
43
43
|
"@types/path-browserify": "^1.0.2",
|
|
44
44
|
"@types/qs": "^6.9.11",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"@ibiz-template/core": "^0.6.0",
|
|
59
|
-
"@ibiz/model-core": "^0.1.
|
|
59
|
+
"@ibiz/model-core": "^0.1.78",
|
|
60
60
|
"async-validator": "^4.2.5",
|
|
61
61
|
"dayjs": "^1.11.7",
|
|
62
62
|
"echarts": "^5.4.3",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"qx-util": "^0.4.8",
|
|
69
69
|
"ramda": "^0.29.0"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "b5fa27223c43fe8eaedee3418ebc275aecc8faa1"
|
|
72
72
|
}
|