@ibiz-template/model-helper 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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IAppView, IControl, ISubAppRef } from '@ibiz/model-core';
|
|
1
|
+
import { IAppView, IControl, IDEToolbarItem, ISubAppRef } from '@ibiz/model-core';
|
|
2
2
|
import { DSLHelper } from '@ibiz/rt-model-api';
|
|
3
3
|
/**
|
|
4
4
|
* 子应用模型合并对象
|
|
@@ -56,6 +56,14 @@ export declare class MergeSubModelHelper {
|
|
|
56
56
|
* @param {ISubAppRef[]} subAppRefs
|
|
57
57
|
*/
|
|
58
58
|
mergeSubAppToolbarActionGroup(view: IAppView, controls: IControl[] | undefined, subAppRefs: ISubAppRef[]): void;
|
|
59
|
+
/**
|
|
60
|
+
* @description 递归合并工具项界面行为组
|
|
61
|
+
* @param {IDEToolbarItem[]} dstToolBarItems
|
|
62
|
+
* @param {IAppView} view
|
|
63
|
+
* @param {ISubAppRef[]} subAppRefs
|
|
64
|
+
* @memberof MergeSubModelHelper
|
|
65
|
+
*/
|
|
66
|
+
recursiveMergeSubAppToolbarItemActionGroup(dstToolBarItems: IDEToolbarItem[], view: IAppView, subAppRefs: ISubAppRef[]): void;
|
|
59
67
|
/**
|
|
60
68
|
* 合并树上下文菜单
|
|
61
69
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge-model-helper.d.ts","sourceRoot":"","sources":["../../../src/utils/merge-model/merge-model-helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EACR,QAAQ,
|
|
1
|
+
{"version":3,"file":"merge-model-helper.d.ts","sourceRoot":"","sources":["../../../src/utils/merge-model/merge-model-helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EACR,QAAQ,EASR,cAAc,EAEd,UAAU,EAEX,MAAM,kBAAkB,CAAC;AAC1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,EAAE,UAAU,EAAE,GACvB,IAAI;IAuCP;;;;;;;;OAQG;IACH,gCAAgC,CAC9B,IAAI,EAAE,QAAQ,EACd,QAAQ,EAAE,QAAQ,EAAE,GAAG,SAAS,EAChC,UAAU,EAAE,UAAU,EAAE,GACvB,IAAI;IAqCP;;;;;;OAMG;IACH,eAAe,CACb,IAAI,EAAE,QAAQ,EACd,QAAQ,EAAE,QAAQ,EAAE,GAAG,SAAS,EAChC,UAAU,EAAE,UAAU,EAAE,GACvB,IAAI;CAmBR"}
|
|
@@ -114,27 +114,7 @@ export class MergeSubModelHelper {
|
|
|
114
114
|
});
|
|
115
115
|
if (dstToolBar && dstToolBar.detoolbarItems) {
|
|
116
116
|
const dstToolBarItems = dstToolBar.detoolbarItems;
|
|
117
|
-
|
|
118
|
-
for (let i = 0; i < dstToolBarItems.length; i++) {
|
|
119
|
-
const dstToolBarItem = dstToolBarItems[i];
|
|
120
|
-
if (dstToolBarItem &&
|
|
121
|
-
dstToolBarItem.uiactionGroup) {
|
|
122
|
-
const dstUIActionGroup = dstToolBarItem
|
|
123
|
-
.uiactionGroup;
|
|
124
|
-
if (dstUIActionGroup) {
|
|
125
|
-
for (let j = 0; j < subAppRefs.length; j++) {
|
|
126
|
-
if (subAppRefs[j].appId === view.appId) {
|
|
127
|
-
continue;
|
|
128
|
-
}
|
|
129
|
-
const srcAppDEUIActionGroup = ibiz.hub.getSubAppDEUIActionGroups(dstUIActionGroup.uniqueTag, subAppRefs[j].appId);
|
|
130
|
-
if (srcAppDEUIActionGroup) {
|
|
131
|
-
mergeAppDEUIActionGroup(dstToolBarItems[i].uiactionGroup, srcAppDEUIActionGroup);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
117
|
+
this.recursiveMergeSubAppToolbarItemActionGroup(dstToolBarItems, view, subAppRefs);
|
|
138
118
|
}
|
|
139
119
|
controls.forEach(control => {
|
|
140
120
|
if (control && control.controls) {
|
|
@@ -142,6 +122,40 @@ export class MergeSubModelHelper {
|
|
|
142
122
|
}
|
|
143
123
|
});
|
|
144
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* @description 递归合并工具项界面行为组
|
|
127
|
+
* @param {IDEToolbarItem[]} dstToolBarItems
|
|
128
|
+
* @param {IAppView} view
|
|
129
|
+
* @param {ISubAppRef[]} subAppRefs
|
|
130
|
+
* @memberof MergeSubModelHelper
|
|
131
|
+
*/
|
|
132
|
+
recursiveMergeSubAppToolbarItemActionGroup(dstToolBarItems, view, subAppRefs) {
|
|
133
|
+
if (dstToolBarItems && dstToolBarItems.length > 0) {
|
|
134
|
+
for (let i = 0; i < dstToolBarItems.length; i++) {
|
|
135
|
+
const dstToolBarItem = dstToolBarItems[i];
|
|
136
|
+
if (dstToolBarItem &&
|
|
137
|
+
dstToolBarItem.uiactionGroup) {
|
|
138
|
+
const dstUIActionGroup = dstToolBarItem
|
|
139
|
+
.uiactionGroup;
|
|
140
|
+
if (dstUIActionGroup) {
|
|
141
|
+
for (let j = 0; j < subAppRefs.length; j++) {
|
|
142
|
+
if (subAppRefs[j].appId === view.appId) {
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
const srcAppDEUIActionGroup = ibiz.hub.getSubAppDEUIActionGroups(dstUIActionGroup.uniqueTag, subAppRefs[j].appId);
|
|
146
|
+
if (srcAppDEUIActionGroup) {
|
|
147
|
+
mergeAppDEUIActionGroup(dstToolBarItems[i].uiactionGroup, srcAppDEUIActionGroup);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
if (dstToolBarItem.detoolbarItems) {
|
|
153
|
+
this.recursiveMergeSubAppToolbarItemActionGroup(dstToolBarItem
|
|
154
|
+
.detoolbarItems, view, subAppRefs);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
145
159
|
/**
|
|
146
160
|
* 合并树上下文菜单
|
|
147
161
|
*
|
|
@@ -180,13 +194,15 @@ export class MergeSubModelHelper {
|
|
|
180
194
|
if (srcAppDEUIActionGroup) {
|
|
181
195
|
mergeAppDEUIActionGroup(dstContextMenuItems[i]
|
|
182
196
|
.uiactionGroup, srcAppDEUIActionGroup);
|
|
183
|
-
const
|
|
197
|
+
const targetDeTreeNodes = (_b = dstTree.detreeNodes) === null || _b === void 0 ? void 0 : _b.filter(treeNode => {
|
|
184
198
|
return (treeNode.decontextMenu &&
|
|
185
199
|
treeNode.decontextMenu.modelId ===
|
|
186
200
|
dstContextMenu.modelId);
|
|
187
201
|
});
|
|
188
|
-
if (
|
|
189
|
-
targetDeTreeNode
|
|
202
|
+
if (targetDeTreeNodes && targetDeTreeNodes.length > 0) {
|
|
203
|
+
targetDeTreeNodes.forEach(targetDeTreeNode => {
|
|
204
|
+
targetDeTreeNode.decontextMenu = dstContextMenu;
|
|
205
|
+
});
|
|
190
206
|
}
|
|
191
207
|
}
|
|
192
208
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/model-helper",
|
|
3
|
-
"version": "0.7.41-alpha.
|
|
3
|
+
"version": "0.7.41-alpha.8",
|
|
4
4
|
"description": "模型辅助库",
|
|
5
5
|
"main": "out/index.js",
|
|
6
6
|
"types": "out/index.d.ts",
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@ibiz-template/core": "^0.7.41-alpha.7",
|
|
34
|
-
"@ibiz/model-core": "^0.1.
|
|
35
|
-
"@ibiz/rt-model-api": "0.2.
|
|
34
|
+
"@ibiz/model-core": "^0.1.78",
|
|
35
|
+
"@ibiz/rt-model-api": "0.2.75",
|
|
36
36
|
"pluralize": "^8.0.0",
|
|
37
37
|
"ramda": "^0.29.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@ibiz-template/runtime": "^0.7.41-alpha.
|
|
40
|
+
"@ibiz-template/runtime": "^0.7.41-alpha.8",
|
|
41
41
|
"@types/pluralize": "^0.0.33",
|
|
42
42
|
"@types/ramda": "^0.29.10"
|
|
43
43
|
},
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"@ibiz-template/runtime": "^0.6.0",
|
|
46
46
|
"ramda": "^0.29.0"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "b5fa27223c43fe8eaedee3418ebc275aecc8faa1"
|
|
49
49
|
}
|