@ibiz-template/runtime 0.7.41-alpha.124 → 0.7.41-alpha.125
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 +206 -111
- package/dist/index.system.min.js +1 -1
- package/out/application.d.ts +7 -0
- package/out/application.d.ts.map +1 -1
- package/out/application.js +21 -0
- package/out/controller/control/form/form-detail/form-item/form-item.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-item/form-item.controller.js +1 -1
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.js +1 -1
- package/out/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.js +1 -1
- package/out/interface/register/i-register-params.d.ts +20 -35
- package/out/interface/register/i-register-params.d.ts.map +1 -1
- package/out/locale/en/index.d.ts +11 -0
- package/out/locale/en/index.d.ts.map +1 -1
- package/out/locale/en/index.js +11 -0
- package/out/locale/zh-CN/index.d.ts +11 -0
- package/out/locale/zh-CN/index.d.ts.map +1 -1
- package/out/locale/zh-CN/index.js +11 -0
- package/out/register/custom-register.d.ts +38 -22
- package/out/register/custom-register.d.ts.map +1 -1
- package/out/register/custom-register.js +123 -78
- package/out/register/helper/control-register.js +2 -2
- package/out/register/helper/de-method-register.d.ts +1 -1
- package/out/register/helper/de-method-register.d.ts.map +1 -1
- package/out/register/helper/de-method-register.js +4 -4
- package/out/register/helper/editor-register.d.ts +2 -3
- package/out/register/helper/editor-register.d.ts.map +1 -1
- package/out/register/helper/editor-register.js +4 -6
- package/out/register/helper/form-detail-register.js +3 -3
- package/out/register/helper/grid-column-register.d.ts +3 -3
- package/out/register/helper/grid-column-register.d.ts.map +1 -1
- package/out/register/helper/grid-column-register.js +9 -9
- package/out/register/helper/panel-item-register.js +4 -4
- package/out/register/helper/ui-action-register.js +2 -2
- package/out/register/helper/view-register.d.ts.map +1 -1
- package/out/register/helper/view-register.js +14 -0
- package/package.json +2 -2
- package/src/application.ts +23 -0
- package/src/controller/control/form/form-detail/form-item/form-item.controller.ts +0 -1
- package/src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts +0 -1
- package/src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts +0 -1
- package/src/interface/register/i-register-params.ts +28 -38
- package/src/locale/en/index.ts +20 -0
- package/src/locale/zh-CN/index.ts +19 -0
- package/src/register/custom-register.ts +126 -81
- package/src/register/helper/control-register.ts +2 -2
- package/src/register/helper/de-method-register.ts +4 -4
- package/src/register/helper/editor-register.ts +4 -7
- package/src/register/helper/form-detail-register.ts +3 -3
- package/src/register/helper/grid-column-register.ts +9 -9
- package/src/register/helper/panel-item-register.ts +4 -4
- package/src/register/helper/ui-action-register.ts +2 -2
- package/src/register/helper/view-register.ts +15 -0
|
@@ -13,57 +13,47 @@ import {
|
|
|
13
13
|
*/
|
|
14
14
|
export interface IRegisterParams {
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* @author ljx
|
|
19
|
-
* @date 2024-04-15 16:10:54
|
|
20
|
-
* @type {IModel}
|
|
21
|
-
*/
|
|
22
|
-
controlItemModel?: IControlItem;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* 部件模型
|
|
26
|
-
*
|
|
27
|
-
* @author ljx
|
|
28
|
-
* @date 2024-04-15 16:10:54
|
|
29
|
-
* @type {IPanel}
|
|
30
|
-
*/
|
|
31
|
-
controlModel?: IControl;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* 视图模型
|
|
35
|
-
*
|
|
36
|
-
* @author ljx
|
|
37
|
-
* @date 2024-04-15 16:10:54
|
|
16
|
+
* @description 部件模型
|
|
38
17
|
* @type {IControl}
|
|
39
|
-
*/
|
|
40
|
-
viewModel?: IAppView;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* @description 界面行为模型
|
|
44
|
-
* @type {IAppUIAction}
|
|
45
18
|
* @memberof IRegisterParams
|
|
46
19
|
*/
|
|
47
|
-
|
|
20
|
+
control?: IControl;
|
|
48
21
|
|
|
49
22
|
/**
|
|
50
|
-
* @description
|
|
51
|
-
* @type {
|
|
23
|
+
* @description 视图模型
|
|
24
|
+
* @type {IAppView}
|
|
52
25
|
* @memberof IRegisterParams
|
|
53
26
|
*/
|
|
54
|
-
|
|
27
|
+
view?: IAppView;
|
|
55
28
|
|
|
56
29
|
/**
|
|
57
|
-
* @description
|
|
58
|
-
* @type {
|
|
30
|
+
* @description 应用实体模型
|
|
31
|
+
* @type {IAppDataEntity}
|
|
59
32
|
* @memberof IRegisterParams
|
|
60
33
|
*/
|
|
61
|
-
|
|
34
|
+
entity?: IAppDataEntity;
|
|
62
35
|
|
|
63
36
|
/**
|
|
64
|
-
* @description
|
|
65
|
-
* @type {
|
|
37
|
+
* @description 主模型
|
|
38
|
+
* @type {
|
|
39
|
+
* | IAppView
|
|
40
|
+
* | IAppDataEntity
|
|
41
|
+
* | IAppDEMethod
|
|
42
|
+
* | IAppUIAction
|
|
43
|
+
* | IControl
|
|
44
|
+
* | IControlItem
|
|
45
|
+
* | IEditor
|
|
46
|
+
* | IAppDEMethod
|
|
47
|
+
* }
|
|
66
48
|
* @memberof IRegisterParams
|
|
67
49
|
*/
|
|
68
|
-
|
|
50
|
+
mainModel:
|
|
51
|
+
| IAppView
|
|
52
|
+
| IAppDataEntity
|
|
53
|
+
| IAppDEMethod
|
|
54
|
+
| IAppUIAction
|
|
55
|
+
| IControl
|
|
56
|
+
| IControlItem
|
|
57
|
+
| IAppDEMethod
|
|
58
|
+
| IEditor;
|
|
69
59
|
}
|
package/src/locale/en/index.ts
CHANGED
|
@@ -444,6 +444,10 @@ export const en = {
|
|
|
444
444
|
noImplementedRouting:
|
|
445
445
|
'Getting view routing parameter variables is not implemented',
|
|
446
446
|
},
|
|
447
|
+
application: {
|
|
448
|
+
noExtensionPlugin:
|
|
449
|
+
'Attempted to load application [{appId}] extension plugin, but no extension plugin was found',
|
|
450
|
+
},
|
|
447
451
|
hub: {
|
|
448
452
|
failedParse: 'View parameter {paramsName} failed to parse: {error}',
|
|
449
453
|
noExist: 'View [{id}] does not exist',
|
|
@@ -578,6 +582,22 @@ export const en = {
|
|
|
578
582
|
'Cannot find the adapter corresponding to the toolbar item plugin {pluginKey}.',
|
|
579
583
|
acItem:
|
|
580
584
|
'Cannot find the adapter corresponding to the ac item plugin {pluginKey}.',
|
|
585
|
+
viewCustomRegistration:
|
|
586
|
+
'[Custom Extended View] Cannot find an adapter with a custom registration ID of [{registerKey}].',
|
|
587
|
+
ctrlCustomRegistration:
|
|
588
|
+
'[Custom Extended Control] Cannot find an adapter with a custom registration ID of [{registerKey}].',
|
|
589
|
+
panelItemCustomRegistration:
|
|
590
|
+
'[Custom Extended Panel Item] Cannot find an adapter with a custom registration ID of [{registerKey}].',
|
|
591
|
+
formDetailCustomRegistration:
|
|
592
|
+
'[Custom Extended Form Detail] Cannot find an adapter with a custom registration ID of [{registerKey}].',
|
|
593
|
+
gridColumnCustomRegistration:
|
|
594
|
+
'[Custom Extended Grid Column] Cannot find an adapter with a custom registration ID of [{registerKey}].',
|
|
595
|
+
editorCustomRegistration:
|
|
596
|
+
'[Custom Extended Editor] Cannot find an adapter with a custom registration ID of [{registerKey}].',
|
|
597
|
+
uiactionCustomRegistration:
|
|
598
|
+
'[Custom Extended UIAction] Cannot find an adapter with a custom registration ID of [{registerKey}].',
|
|
599
|
+
deMethodCustomRegistration:
|
|
600
|
+
'[Custom Extended DEMethod] Cannot find an adapter with a custom registration ID of [{registerKey}].',
|
|
581
601
|
},
|
|
582
602
|
},
|
|
583
603
|
service: {
|
|
@@ -371,6 +371,9 @@ export const zhCn = {
|
|
|
371
371
|
global: {
|
|
372
372
|
noImplemented: '获取应用全局变量没有实现',
|
|
373
373
|
},
|
|
374
|
+
application: {
|
|
375
|
+
noExtensionPlugin: '尝试加载应用[{appId}]扩展插件,暂未找到扩展插件',
|
|
376
|
+
},
|
|
374
377
|
hub: {
|
|
375
378
|
failedParse: '视图参数 {paramsName} 解析失败:{error}',
|
|
376
379
|
noExist: '视图[{id}]不存在',
|
|
@@ -468,6 +471,22 @@ export const zhCn = {
|
|
|
468
471
|
'找不到视图类型:[{viewType}]的视图样式:[{viewStyle}]对应的适配器',
|
|
469
472
|
toolbarItem: '找不到工具栏项插件{pluginKey}对应的适配器',
|
|
470
473
|
acItem: '找不到自填列表项插件{pluginKey}对应的适配器',
|
|
474
|
+
viewCustomRegistration:
|
|
475
|
+
'[自定义扩展视图] 找不到自定义注册标识为[{registerKey}]对应的适配器',
|
|
476
|
+
ctrlCustomRegistration:
|
|
477
|
+
'[自定义扩展部件] 找不到自定义注册标识为[{registerKey}]对应的适配器',
|
|
478
|
+
panelItemCustomRegistration:
|
|
479
|
+
'[自定义扩展面板项] 找不到自定义注册标识为[{registerKey}]对应的适配器',
|
|
480
|
+
formDetailCustomRegistration:
|
|
481
|
+
'[自定义扩展表单成员] 找不到自定义注册标识为[{registerKey}]对应的适配器',
|
|
482
|
+
gridColumnCustomRegistration:
|
|
483
|
+
'[自定义扩展表格列] 找不到自定义注册标识为[{registerKey}]对应的适配器',
|
|
484
|
+
editorCustomRegistration:
|
|
485
|
+
'[自定义扩展编辑器] 找不到自定义注册标识为[{registerKey}]对应的适配器',
|
|
486
|
+
uiactionCustomRegistration:
|
|
487
|
+
'[自定义扩展界面行为] 找不到自定义注册标识为[{registerKey}]对应的适配器',
|
|
488
|
+
deMethodCustomRegistration:
|
|
489
|
+
'[自定义扩展实体方法] 找不到自定义注册标识为[{registerKey}]对应的适配器',
|
|
471
490
|
},
|
|
472
491
|
},
|
|
473
492
|
service: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IAppDEMethod, IControl } from '@ibiz/model-core';
|
|
2
2
|
import { IRegisterParams } from '../interface';
|
|
3
3
|
import {
|
|
4
4
|
CONTROL_PROVIDER_PREFIX,
|
|
@@ -8,81 +8,82 @@ import {
|
|
|
8
8
|
GRIDCOLUMN_PROVIDER_PREFIX,
|
|
9
9
|
PANELITEM_PROVIDER_PREFIX,
|
|
10
10
|
UIACTION_PROVIDER_PREFIX,
|
|
11
|
+
VIEW_PROVIDER_PREFIX,
|
|
11
12
|
} from './helper';
|
|
13
|
+
import { calcDeCodeNameById } from '../model';
|
|
12
14
|
|
|
13
15
|
/**
|
|
14
16
|
* 自定义注册
|
|
15
17
|
*/
|
|
16
18
|
export class CustomRegister {
|
|
17
19
|
/**
|
|
18
|
-
* 获取适配器注册key
|
|
19
|
-
*
|
|
20
|
-
* @author ljx
|
|
21
|
-
* @date 2024-04-16 23:08:08
|
|
20
|
+
* @description 获取适配器注册key
|
|
21
|
+
* @static
|
|
22
22
|
* @param {string} registerType
|
|
23
23
|
* @param {IRegisterParams} opts
|
|
24
|
-
* @
|
|
24
|
+
* @returns {*} {string}
|
|
25
|
+
* @memberof CustomRegister
|
|
25
26
|
*/
|
|
26
27
|
static getRegisterKey(registerType: string, opts: IRegisterParams): string {
|
|
27
28
|
switch (registerType) {
|
|
29
|
+
case VIEW_PROVIDER_PREFIX:
|
|
30
|
+
return this.calcExtensionViewKey(opts);
|
|
31
|
+
case CONTROL_PROVIDER_PREFIX:
|
|
32
|
+
return this.calcExtensionControlKey(opts);
|
|
28
33
|
case PANELITEM_PROVIDER_PREFIX:
|
|
29
|
-
return this.
|
|
34
|
+
return this.calcExtensionPanelItemKey(opts);
|
|
30
35
|
case FORMDETAIL_PROVIDER_PREFIX:
|
|
31
36
|
case GRIDCOLUMN_PROVIDER_PREFIX:
|
|
32
|
-
|
|
33
|
-
|
|
37
|
+
return this.calcExtensionControlItemKey(opts);
|
|
38
|
+
case EDITOR_PROVIDER_PREFIX:
|
|
39
|
+
return this.calcExtensionEditorKey(opts);
|
|
34
40
|
case UIACTION_PROVIDER_PREFIX:
|
|
35
|
-
return this.
|
|
41
|
+
return this.calcExtensionUIActionKey(opts);
|
|
36
42
|
case DEMETHOD_PROVIDER_PREFIX:
|
|
37
|
-
return this.
|
|
38
|
-
|
|
39
|
-
return this.calcKeyByEditor(opts);
|
|
43
|
+
return this.calcExtensionMethodKey(opts);
|
|
44
|
+
|
|
40
45
|
default:
|
|
41
46
|
return '';
|
|
42
47
|
}
|
|
43
48
|
}
|
|
44
49
|
|
|
45
50
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* @author ljx
|
|
49
|
-
* @date 2024-04-16 23:08:08
|
|
51
|
+
* @description 计算扩展视图key,(appId@codeName)全大写
|
|
52
|
+
* @static
|
|
50
53
|
* @param {IRegisterParams} opts
|
|
51
|
-
* @
|
|
54
|
+
* @returns {*} {string}
|
|
55
|
+
* @memberof CustomRegister
|
|
52
56
|
*/
|
|
53
|
-
static
|
|
54
|
-
const {
|
|
57
|
+
static calcExtensionViewKey(opts: IRegisterParams): string {
|
|
58
|
+
const { mainModel } = opts;
|
|
55
59
|
let key = '';
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
key += `${viewModel.codeName.toUpperCase()}`;
|
|
60
|
+
if (mainModel.appId) {
|
|
61
|
+
key += `${mainModel.appId.toUpperCase()}`;
|
|
59
62
|
}
|
|
60
63
|
|
|
61
|
-
if (
|
|
62
|
-
key += `@${
|
|
63
|
-
}
|
|
64
|
-
// TODO 面板项模型中没有codeName暂用id
|
|
65
|
-
if (controlItemModel?.id) {
|
|
66
|
-
key += `@${controlItemModel.id.toUpperCase()}`;
|
|
64
|
+
if (mainModel.codeName) {
|
|
65
|
+
key += `@${mainModel.codeName.toUpperCase()}`;
|
|
67
66
|
}
|
|
68
67
|
return key;
|
|
69
68
|
}
|
|
70
69
|
|
|
71
70
|
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
* @date 2024-04-16 23:08:08
|
|
71
|
+
* @description 计算扩展部件key,(appId/DEFAULT@实体codeName/APP@部件类型@部件codeName)全大写
|
|
72
|
+
* @static
|
|
75
73
|
* @param {IRegisterParams} opts
|
|
76
|
-
* @
|
|
74
|
+
* @returns {*} {string}
|
|
75
|
+
* @memberof CustomRegister
|
|
77
76
|
*/
|
|
78
|
-
static
|
|
79
|
-
const { controlModel, controlItemModel } = opts;
|
|
77
|
+
static calcExtensionControlKey(opts: IRegisterParams): string {
|
|
80
78
|
let key = '';
|
|
81
|
-
|
|
82
|
-
if (
|
|
83
|
-
|
|
79
|
+
const { mainModel } = opts;
|
|
80
|
+
if (mainModel) {
|
|
81
|
+
key = (mainModel.appId || 'DEFAULT').toUpperCase();
|
|
82
|
+
const { appDataEntityId, controlType, codeName } = mainModel as IControl;
|
|
84
83
|
if (appDataEntityId) {
|
|
85
|
-
|
|
84
|
+
key += `@${calcDeCodeNameById(appDataEntityId).toUpperCase()}`;
|
|
85
|
+
} else {
|
|
86
|
+
key += '@APP';
|
|
86
87
|
}
|
|
87
88
|
if (controlType) {
|
|
88
89
|
key += `@${controlType.toUpperCase()}`;
|
|
@@ -91,91 +92,135 @@ export class CustomRegister {
|
|
|
91
92
|
key += `@${codeName.toUpperCase()}`;
|
|
92
93
|
}
|
|
93
94
|
}
|
|
95
|
+
return key;
|
|
96
|
+
}
|
|
94
97
|
|
|
95
|
-
|
|
96
|
-
|
|
98
|
+
/**
|
|
99
|
+
* @description 计算扩展面板key,(appId/DEFAULT@视图codeName@部件codeName@面板项标识)全大写
|
|
100
|
+
* @static
|
|
101
|
+
* @param {IRegisterParams} opts
|
|
102
|
+
* @returns {*} {string}
|
|
103
|
+
* @memberof CustomRegister
|
|
104
|
+
*/
|
|
105
|
+
static calcExtensionPanelItemKey(opts: IRegisterParams): string {
|
|
106
|
+
const { mainModel, view, control } = opts;
|
|
107
|
+
let key = `${(mainModel.appId || 'DEFAULT').toUpperCase()}`;
|
|
108
|
+
|
|
109
|
+
if (view?.codeName) {
|
|
110
|
+
key += `@${view.codeName.toUpperCase()}`;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if (control?.codeName) {
|
|
114
|
+
key += `@${control.codeName.toUpperCase()}`;
|
|
115
|
+
}
|
|
116
|
+
if (mainModel?.id) {
|
|
117
|
+
key += `@${mainModel.id.toUpperCase()}`;
|
|
97
118
|
}
|
|
98
|
-
key = prefix + key;
|
|
99
119
|
return key;
|
|
100
120
|
}
|
|
101
121
|
|
|
102
122
|
/**
|
|
103
|
-
* @description
|
|
123
|
+
* @description 计算扩展部件项key,(appId/DEFAULT@实体codeName/APP@部件类型@部件codeName@部件项codeName)全大写
|
|
104
124
|
* @static
|
|
105
125
|
* @param {IRegisterParams} opts
|
|
106
126
|
* @returns {*} {string}
|
|
107
127
|
* @memberof CustomRegister
|
|
108
128
|
*/
|
|
109
|
-
static
|
|
110
|
-
const {
|
|
111
|
-
let prefix: string = 'APP';
|
|
129
|
+
static calcExtensionControlItemKey(opts: IRegisterParams): string {
|
|
130
|
+
const { mainModel, control } = opts;
|
|
112
131
|
let key = '';
|
|
113
|
-
if (
|
|
114
|
-
|
|
132
|
+
if (mainModel) {
|
|
133
|
+
key = (mainModel.appId || 'DEFAULT').toUpperCase();
|
|
134
|
+
const { appDataEntityId, controlType, codeName } = control as IControl;
|
|
115
135
|
if (appDataEntityId) {
|
|
116
|
-
|
|
136
|
+
key += `@${calcDeCodeNameById(appDataEntityId).toUpperCase()}`;
|
|
137
|
+
} else {
|
|
138
|
+
key += '@APP';
|
|
117
139
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
140
|
+
if (controlType) {
|
|
141
|
+
key += `@${controlType.toUpperCase()}`;
|
|
142
|
+
}
|
|
143
|
+
if (codeName) {
|
|
144
|
+
key += `@${codeName.toUpperCase()}`;
|
|
145
|
+
}
|
|
146
|
+
if (mainModel.codeName) {
|
|
147
|
+
key += `@${mainModel.codeName.toUpperCase()}`;
|
|
121
148
|
}
|
|
122
149
|
}
|
|
123
150
|
return key;
|
|
124
151
|
}
|
|
125
152
|
|
|
126
153
|
/**
|
|
127
|
-
* @description
|
|
154
|
+
* @description 计算扩展编辑器key,(appId/DEFAULT@实体codeName/APP@部件类型@部件codeName@项标识_EDITOR)全大写
|
|
128
155
|
* @static
|
|
129
156
|
* @param {IRegisterParams} opts
|
|
130
157
|
* @returns {*} {string}
|
|
131
158
|
* @memberof CustomRegister
|
|
132
159
|
*/
|
|
133
|
-
static
|
|
134
|
-
const {
|
|
135
|
-
let key
|
|
136
|
-
if (
|
|
137
|
-
const {
|
|
138
|
-
if (
|
|
139
|
-
key += calcDeCodeNameById(
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
key += `@${methodType.toUpperCase()}@${codeName.toUpperCase()}`;
|
|
160
|
+
static calcExtensionEditorKey(opts: IRegisterParams): string {
|
|
161
|
+
const { mainModel, control } = opts;
|
|
162
|
+
let key = (mainModel.appId || 'DEFAULT').toUpperCase();
|
|
163
|
+
if (control) {
|
|
164
|
+
const { appDataEntityId, controlType, codeName } = control as IControl;
|
|
165
|
+
if (appDataEntityId) {
|
|
166
|
+
key += `@${calcDeCodeNameById(appDataEntityId).toUpperCase()}`;
|
|
167
|
+
} else {
|
|
168
|
+
key += '@APP';
|
|
143
169
|
}
|
|
170
|
+
key += `@${(controlType || 'DEFAULT').toUpperCase()}`;
|
|
171
|
+
key += `@${(codeName || 'DEFAULT').toUpperCase()}`;
|
|
172
|
+
}
|
|
173
|
+
if (mainModel.id) {
|
|
174
|
+
key += `@${mainModel.id.toUpperCase()}_EDITOR`;
|
|
144
175
|
}
|
|
145
176
|
return key;
|
|
146
177
|
}
|
|
147
178
|
|
|
148
179
|
/**
|
|
149
|
-
* @description
|
|
180
|
+
* @description 计算扩展界面行为key,(appId/DEFAULT@实体codeName/APP@界面行为标记)全大写
|
|
181
|
+
* @author tony001
|
|
182
|
+
* @date 2026-08-11 17:08:45
|
|
150
183
|
* @static
|
|
151
184
|
* @param {IRegisterParams} opts
|
|
152
185
|
* @returns {*} {string}
|
|
153
186
|
* @memberof CustomRegister
|
|
154
187
|
*/
|
|
155
|
-
static
|
|
156
|
-
const {
|
|
157
|
-
let key = '';
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
const { appDataEntityId, controlType, codeName } = controlModel;
|
|
188
|
+
static calcExtensionUIActionKey(opts: IRegisterParams): string {
|
|
189
|
+
const { mainModel } = opts;
|
|
190
|
+
let key: string = (mainModel.appId || 'DEFAULT').toUpperCase();
|
|
191
|
+
if (mainModel) {
|
|
192
|
+
const { appDataEntityId, uiactionTag } = mainModel as IData;
|
|
161
193
|
if (appDataEntityId) {
|
|
162
|
-
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
key += `@${controlType.toUpperCase()}`;
|
|
194
|
+
key += `@${calcDeCodeNameById(appDataEntityId).toUpperCase()}`;
|
|
195
|
+
} else {
|
|
196
|
+
key += '@APP';
|
|
166
197
|
}
|
|
167
|
-
if (
|
|
168
|
-
key += `@${
|
|
198
|
+
if (uiactionTag) {
|
|
199
|
+
key += `@${uiactionTag.toUpperCase()}`;
|
|
169
200
|
}
|
|
170
201
|
}
|
|
202
|
+
return key;
|
|
203
|
+
}
|
|
171
204
|
|
|
172
|
-
|
|
173
|
-
|
|
205
|
+
/**
|
|
206
|
+
* @description 计算扩展实体方法key,(appId/DEFAULT@实体codeName/方法类型/方法codeName)全大写
|
|
207
|
+
* @static
|
|
208
|
+
* @param {IRegisterParams} opts
|
|
209
|
+
* @returns {*} {string}
|
|
210
|
+
* @memberof CustomRegister
|
|
211
|
+
*/
|
|
212
|
+
static calcExtensionMethodKey(opts: IRegisterParams): string {
|
|
213
|
+
const { mainModel, entity } = opts;
|
|
214
|
+
let key: string = (mainModel.appId || 'DEFAULT').toUpperCase();
|
|
215
|
+
if (entity?.id) {
|
|
216
|
+
key += `@${calcDeCodeNameById(entity.id).toUpperCase()}`;
|
|
174
217
|
}
|
|
175
|
-
if (
|
|
176
|
-
|
|
218
|
+
if (mainModel) {
|
|
219
|
+
const { methodType, codeName } = mainModel as IAppDEMethod;
|
|
220
|
+
if (methodType && codeName) {
|
|
221
|
+
key += `@${methodType.toUpperCase()}@${codeName.toUpperCase()}`;
|
|
222
|
+
}
|
|
177
223
|
}
|
|
178
|
-
key = prefix + key;
|
|
179
224
|
return key;
|
|
180
225
|
}
|
|
181
226
|
}
|
|
@@ -44,13 +44,13 @@ export async function getControlProvider(
|
|
|
44
44
|
|
|
45
45
|
// 找自定义注册的适配器
|
|
46
46
|
const registerKey = CustomRegister.getRegisterKey(CONTROL_PROVIDER_PREFIX, {
|
|
47
|
-
|
|
47
|
+
mainModel: model,
|
|
48
48
|
});
|
|
49
49
|
provider = getProvider(registerKey);
|
|
50
50
|
|
|
51
51
|
if (!provider) {
|
|
52
52
|
ibiz.log.debug(
|
|
53
|
-
ibiz.i18n.t('runtime.register.helper.
|
|
53
|
+
ibiz.i18n.t('runtime.register.helper.ctrlCustomRegistration', {
|
|
54
54
|
registerKey,
|
|
55
55
|
}),
|
|
56
56
|
);
|
|
@@ -38,18 +38,18 @@ function getProvider(key: string): IDEMethodProvider | undefined {
|
|
|
38
38
|
*/
|
|
39
39
|
export async function getDEMethodProvider(
|
|
40
40
|
model: IAppDEMethod,
|
|
41
|
-
|
|
41
|
+
entity?: IAppDataEntity,
|
|
42
42
|
): Promise<IDEMethodProvider> {
|
|
43
43
|
let provider: IDEMethodProvider | undefined;
|
|
44
44
|
const { methodType, sysPFPluginId, appId } = model as Required<IAppDEMethod>;
|
|
45
45
|
const registerKey = CustomRegister.getRegisterKey(DEMETHOD_PROVIDER_PREFIX, {
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
mainModel: model,
|
|
47
|
+
entity,
|
|
48
48
|
});
|
|
49
49
|
provider = getProvider(registerKey);
|
|
50
50
|
if (!provider) {
|
|
51
51
|
ibiz.log.debug(
|
|
52
|
-
ibiz.i18n.t('runtime.register.helper.
|
|
52
|
+
ibiz.i18n.t('runtime.register.helper.deMethodCustomRegistration', {
|
|
53
53
|
registerKey,
|
|
54
54
|
}),
|
|
55
55
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IControl,
|
|
1
|
+
import { IControl, IEditor } from '@ibiz/model-core';
|
|
2
2
|
import { IEditorProvider } from '../../interface';
|
|
3
3
|
import { getPluginRegisterKey } from './common-register';
|
|
4
4
|
import { CustomRegister } from '../custom-register';
|
|
@@ -31,13 +31,11 @@ function getProvider(key: string): IEditorProvider | undefined {
|
|
|
31
31
|
* @description 获取编辑器适配器
|
|
32
32
|
* @export
|
|
33
33
|
* @param {IEditor} model 编辑器模型
|
|
34
|
-
* @param {IControlItem} [ctrlItem] 控件项模型
|
|
35
34
|
* @param {IControl} [ctrl] 部件模型
|
|
36
35
|
* @returns {*} {(Promise<IEditorProvider | undefined>)}
|
|
37
36
|
*/
|
|
38
37
|
export async function getEditorProvider(
|
|
39
38
|
model: IEditor,
|
|
40
|
-
ctrlItem?: IControlItem,
|
|
41
39
|
ctrl?: IControl,
|
|
42
40
|
): Promise<IEditorProvider | undefined> {
|
|
43
41
|
let provider: IEditorProvider | undefined;
|
|
@@ -46,14 +44,13 @@ export async function getEditorProvider(
|
|
|
46
44
|
|
|
47
45
|
// 找自定义的编辑器适配器
|
|
48
46
|
const registerKey = CustomRegister.getRegisterKey(EDITOR_PROVIDER_PREFIX, {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
editorModel: model,
|
|
47
|
+
mainModel: model,
|
|
48
|
+
control: ctrl,
|
|
52
49
|
});
|
|
53
50
|
provider = getProvider(registerKey);
|
|
54
51
|
if (!provider) {
|
|
55
52
|
ibiz.log.debug(
|
|
56
|
-
ibiz.i18n.t('runtime.register.helper.
|
|
53
|
+
ibiz.i18n.t('runtime.register.helper.editorCustomRegistration', {
|
|
57
54
|
registerKey,
|
|
58
55
|
}),
|
|
59
56
|
);
|
|
@@ -46,14 +46,14 @@ export async function getFormDetailProvider(
|
|
|
46
46
|
const registerKey = CustomRegister.getRegisterKey(
|
|
47
47
|
FORMDETAIL_PROVIDER_PREFIX,
|
|
48
48
|
{
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
mainModel: model,
|
|
50
|
+
control: formModel,
|
|
51
51
|
},
|
|
52
52
|
);
|
|
53
53
|
provider = getProvider(registerKey);
|
|
54
54
|
if (!provider) {
|
|
55
55
|
ibiz.log.debug(
|
|
56
|
-
ibiz.i18n.t('runtime.register.helper.
|
|
56
|
+
ibiz.i18n.t('runtime.register.helper.formDetailCustomRegistration', {
|
|
57
57
|
registerKey,
|
|
58
58
|
}),
|
|
59
59
|
);
|
|
@@ -37,7 +37,7 @@ function getProvider(key: string): IGridColumnProvider | undefined {
|
|
|
37
37
|
*/
|
|
38
38
|
export async function getGridColumnProvider(
|
|
39
39
|
model: IDEGridColumn,
|
|
40
|
-
|
|
40
|
+
grid: IDEGrid,
|
|
41
41
|
): Promise<IGridColumnProvider | undefined> {
|
|
42
42
|
let provider: IGridColumnProvider | undefined;
|
|
43
43
|
const { columnType, enableRowEdit, sysPFPluginId, appId } =
|
|
@@ -47,14 +47,14 @@ export async function getGridColumnProvider(
|
|
|
47
47
|
const registerKey = CustomRegister.getRegisterKey(
|
|
48
48
|
GRIDCOLUMN_PROVIDER_PREFIX,
|
|
49
49
|
{
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
mainModel: model,
|
|
51
|
+
control: grid,
|
|
52
52
|
},
|
|
53
53
|
);
|
|
54
54
|
provider = getProvider(registerKey);
|
|
55
55
|
if (!provider) {
|
|
56
56
|
ibiz.log.debug(
|
|
57
|
-
ibiz.i18n.t('runtime.register.helper.
|
|
57
|
+
ibiz.i18n.t('runtime.register.helper.gridColumnCustomRegistration', {
|
|
58
58
|
registerKey,
|
|
59
59
|
}),
|
|
60
60
|
);
|
|
@@ -98,12 +98,12 @@ export async function getGridColumnProvider(
|
|
|
98
98
|
*
|
|
99
99
|
* @export
|
|
100
100
|
* @param {IDEGridColumn} model
|
|
101
|
-
* @param {IDEGrid}
|
|
101
|
+
* @param {IDEGrid} grid
|
|
102
102
|
* @return {*} {(Promise<IGridColumnProvider | undefined>)}
|
|
103
103
|
*/
|
|
104
104
|
export async function getAutoGridColumnProvider(
|
|
105
105
|
model: IDEGridColumn,
|
|
106
|
-
|
|
106
|
+
grid: IDEGrid,
|
|
107
107
|
): Promise<IGridColumnProvider | undefined> {
|
|
108
108
|
let provider: IGridColumnProvider | undefined;
|
|
109
109
|
const { columnType, enableRowEdit, sysPFPluginId, appId } =
|
|
@@ -113,14 +113,14 @@ export async function getAutoGridColumnProvider(
|
|
|
113
113
|
const registerKey = CustomRegister.getRegisterKey(
|
|
114
114
|
GRIDCOLUMN_PROVIDER_PREFIX,
|
|
115
115
|
{
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
mainModel: model,
|
|
117
|
+
control: grid,
|
|
118
118
|
},
|
|
119
119
|
);
|
|
120
120
|
provider = getProvider(registerKey);
|
|
121
121
|
if (!provider) {
|
|
122
122
|
ibiz.log.debug(
|
|
123
|
-
ibiz.i18n.t('runtime.register.helper.
|
|
123
|
+
ibiz.i18n.t('runtime.register.helper.gridColumnCustomRegistration', {
|
|
124
124
|
registerKey,
|
|
125
125
|
}),
|
|
126
126
|
);
|
|
@@ -56,14 +56,14 @@ export async function getPanelItemProvider(
|
|
|
56
56
|
|
|
57
57
|
// 找自定义注册的适配器
|
|
58
58
|
const registerKey = CustomRegister.getRegisterKey(PANELITEM_PROVIDER_PREFIX, {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
mainModel: model,
|
|
60
|
+
view: viewModel,
|
|
61
|
+
control: panelModel,
|
|
62
62
|
});
|
|
63
63
|
provider = getProvider(registerKey);
|
|
64
64
|
if (!provider) {
|
|
65
65
|
ibiz.log.debug(
|
|
66
|
-
ibiz.i18n.t('runtime.register.helper.
|
|
66
|
+
ibiz.i18n.t('runtime.register.helper.panelItemCustomRegistration', {
|
|
67
67
|
registerKey,
|
|
68
68
|
}),
|
|
69
69
|
);
|
|
@@ -44,12 +44,12 @@ export async function getUIActionProvider(
|
|
|
44
44
|
model as Required<IAppUIAction>;
|
|
45
45
|
// 找自定义注册的适配器
|
|
46
46
|
const registerKey = CustomRegister.getRegisterKey(UIACTION_PROVIDER_PREFIX, {
|
|
47
|
-
|
|
47
|
+
mainModel: model,
|
|
48
48
|
});
|
|
49
49
|
provider = getProvider(registerKey);
|
|
50
50
|
if (!provider) {
|
|
51
51
|
ibiz.log.debug(
|
|
52
|
-
ibiz.i18n.t('runtime.register.helper.
|
|
52
|
+
ibiz.i18n.t('runtime.register.helper.uiactionCustomRegistration', {
|
|
53
53
|
registerKey,
|
|
54
54
|
}),
|
|
55
55
|
);
|