@ibiz-template/runtime 0.0.1-alpha.3 → 0.0.1-alpha.5

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.
Files changed (40) hide show
  1. package/out/command/app/open-app-view/open-app-view.d.ts.map +1 -1
  2. package/out/command/app/open-app-view/open-app-view.js +4 -1
  3. package/out/index.d.ts +1 -0
  4. package/out/index.d.ts.map +1 -1
  5. package/out/index.js +1 -0
  6. package/out/install.d.ts.map +1 -1
  7. package/out/install.js +3 -0
  8. package/out/interface/index.d.ts +3 -0
  9. package/out/interface/index.d.ts.map +1 -1
  10. package/out/interface/index.js +3 -0
  11. package/out/interface/provider/i-editor-provider.d.ts +38 -0
  12. package/out/interface/provider/i-editor-provider.d.ts.map +1 -0
  13. package/out/interface/provider/i-editor-provider.js +1 -0
  14. package/out/interface/register/i-editor-register.d.ts +23 -0
  15. package/out/interface/register/i-editor-register.d.ts.map +1 -0
  16. package/out/interface/register/i-editor-register.js +1 -0
  17. package/out/interface/register/i-register.d.ts +38 -0
  18. package/out/interface/register/i-register.d.ts.map +1 -0
  19. package/out/interface/register/i-register.js +1 -0
  20. package/out/register/register.d.ts +20 -0
  21. package/out/register/register.d.ts.map +1 -0
  22. package/out/register/register.js +10 -0
  23. package/out/types.d.ts +9 -0
  24. package/out/types.d.ts.map +1 -1
  25. package/out/utils/app-de-ui-action-util/app-de-ui-action-util.d.ts.map +1 -1
  26. package/out/utils/app-de-ui-action-util/app-de-ui-action-util.js +22 -21
  27. package/out/view-logic/view-logic.d.ts.map +1 -1
  28. package/out/view-logic/view-logic.js +4 -0
  29. package/package.json +10 -9
  30. package/src/command/app/open-app-view/open-app-view.ts +4 -1
  31. package/src/index.ts +1 -0
  32. package/src/install.ts +3 -0
  33. package/src/interface/index.ts +3 -0
  34. package/src/interface/provider/i-editor-provider.ts +44 -0
  35. package/src/interface/register/i-editor-register.ts +23 -0
  36. package/src/interface/register/i-register.ts +40 -0
  37. package/src/register/register.ts +20 -0
  38. package/src/types.ts +10 -0
  39. package/src/utils/app-de-ui-action-util/app-de-ui-action-util.ts +27 -22
  40. package/src/view-logic/view-logic.ts +4 -0
@@ -1 +1 @@
1
- {"version":3,"file":"open-app-view.d.ts","sourceRoot":"","sources":["../../../../src/command/app/open-app-view/open-app-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD;;;;;;;GAOG;AACH,qBAAa,kBAAkB;IAC7B,MAAM,CAAC,QAAQ,CAAC,GAAG,wBAAwB;;IAM3C;;;;;;;;;;OAUG;IACG,IAAI,CACR,OAAO,EAAE,UAAU,EACnB,OAAO,CAAC,EAAE,WAAW,EACrB,MAAM,GAAE,OAAY,EACpB,KAAK,GAAE,KAAU,GAChB,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IA0B7B;;;;;;;;;OASG;IACH,SAAS,CAAC,gBAAgB,CACxB,OAAO,EAAE,UAAU,EACnB,OAAO,CAAC,EAAE,WAAW,EACrB,MAAM,GAAE,OAAY,GACnB,IAAI;IASP;;;;;;;;;OASG;IACH,SAAS,CAAC,gBAAgB,CACxB,OAAO,EAAE,UAAU,EACnB,OAAO,CAAC,EAAE,WAAW,EACrB,MAAM,GAAE,OAAY,GACnB,IAAI;IAIP;;;;;;;;;;OAUG;cACa,SAAS,CACvB,OAAO,EAAE,UAAU,EACnB,OAAO,CAAC,EAAE,WAAW,EACrB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,UAAU,CAAC;IAItB;;;;;;;;;;OAUG;cACa,WAAW,CACzB,OAAO,EAAE,UAAU,EACnB,OAAO,CAAC,EAAE,WAAW,EACrB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,UAAU,CAAC;IAItB;;;;;;;;;;OAUG;cACa,UAAU,CACxB,OAAO,EAAE,UAAU,EACnB,OAAO,CAAC,EAAE,WAAW,EACrB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,UAAU,CAAC;IAItB;;;;;;;;;;OAUG;cACa,cAAc,CAC5B,OAAO,EAAE,UAAU,EACnB,OAAO,CAAC,EAAE,WAAW,EACrB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,UAAU,CAAC;CAGvB"}
1
+ {"version":3,"file":"open-app-view.d.ts","sourceRoot":"","sources":["../../../../src/command/app/open-app-view/open-app-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD;;;;;;;GAOG;AACH,qBAAa,kBAAkB;IAC7B,MAAM,CAAC,QAAQ,CAAC,GAAG,wBAAwB;;IAM3C;;;;;;;;;;OAUG;IACG,IAAI,CACR,OAAO,EAAE,UAAU,EACnB,OAAO,CAAC,EAAE,WAAW,EACrB,MAAM,GAAE,OAAY,EACpB,KAAK,GAAE,KAAU,GAChB,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IA6B7B;;;;;;;;;OASG;IACH,SAAS,CAAC,gBAAgB,CACxB,OAAO,EAAE,UAAU,EACnB,OAAO,CAAC,EAAE,WAAW,EACrB,MAAM,GAAE,OAAY,GACnB,IAAI;IASP;;;;;;;;;OASG;IACH,SAAS,CAAC,gBAAgB,CACxB,OAAO,EAAE,UAAU,EACnB,OAAO,CAAC,EAAE,WAAW,EACrB,MAAM,GAAE,OAAY,GACnB,IAAI;IAIP;;;;;;;;;;OAUG;cACa,SAAS,CACvB,OAAO,EAAE,UAAU,EACnB,OAAO,CAAC,EAAE,WAAW,EACrB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,UAAU,CAAC;IAItB;;;;;;;;;;OAUG;cACa,WAAW,CACzB,OAAO,EAAE,UAAU,EACnB,OAAO,CAAC,EAAE,WAAW,EACrB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,UAAU,CAAC;IAItB;;;;;;;;;;OAUG;cACa,UAAU,CACxB,OAAO,EAAE,UAAU,EACnB,OAAO,CAAC,EAAE,WAAW,EACrB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,UAAU,CAAC;IAItB;;;;;;;;;;OAUG;cACa,cAAc,CAC5B,OAAO,EAAE,UAAU,EACnB,OAAO,CAAC,EAAE,WAAW,EACrB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,UAAU,CAAC;CAGvB"}
@@ -38,7 +38,10 @@ export class OpenAppViewCommand {
38
38
  throw new Error('未支持的视图打开模式: POPUPAPP');
39
39
  case 'POPOVER':
40
40
  return this.openPopover(appView, context, params);
41
- case 'DRAWER':
41
+ case 'DRAWER_LEFT':
42
+ case 'DRAWER_RIGHT':
43
+ case 'DRAWER_TOP':
44
+ case 'DRAWER_BOTTOM':
42
45
  return this.openDrawer(appView, context, params);
43
46
  case 'USER':
44
47
  return this.openUserCustom(appView, context, params);
package/out/index.d.ts CHANGED
@@ -3,6 +3,7 @@ export { install } from './install';
3
3
  export * from './command';
4
4
  export * from './constant';
5
5
  export * from './interface';
6
+ export * from './register/register';
6
7
  export * from './utils';
7
8
  export * from './view-logic';
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAC;AAEjB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAC;AAEjB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
package/out/index.js CHANGED
@@ -3,5 +3,6 @@ export { install } from './install';
3
3
  export * from './command';
4
4
  export * from './constant';
5
5
  export * from './interface';
6
+ export * from './register/register';
6
7
  export * from './utils';
7
8
  export * from './view-logic';
@@ -1 +1 @@
1
- {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,wBAAgB,OAAO,IAAI,IAAI,CAM9B"}
1
+ {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,wBAAgB,OAAO,IAAI,IAAI,CAQ9B"}
package/out/install.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { commands } from '@ibiz-template/command';
2
+ import { Register } from './register/register';
2
3
  import { installCommand } from './command';
3
4
  /**
4
5
  * 安装运行时
@@ -11,6 +12,8 @@ export function install() {
11
12
  const { ibiz } = window;
12
13
  // 挂载指令控制器
13
14
  ibiz.commands = commands;
15
+ // 挂载注册中心
16
+ ibiz.register = new Register();
14
17
  // 安装默认指令
15
18
  installCommand();
16
19
  }
@@ -2,4 +2,7 @@ export { IModal } from './i-modal/i-modal';
2
2
  export { IModalData } from './i-modal-data/i-modal-data';
3
3
  export { IUIActionResult } from './i-ui-action-result/i-ui-action-result';
4
4
  export * from './util';
5
+ export * from './provider/i-editor-provider';
6
+ export * from './register/i-register';
7
+ export * from './register/i-editor-register';
5
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interface/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC1E,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interface/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC1E,cAAc,QAAQ,CAAC;AACvB,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC"}
@@ -1 +1,4 @@
1
1
  export * from './util';
2
+ export * from './provider/i-editor-provider';
3
+ export * from './register/i-register';
4
+ export * from './register/i-editor-register';
@@ -0,0 +1,38 @@
1
+ import { EditorModel } from '@ibiz-template/model';
2
+ /**
3
+ * 编辑器适配器的接口
4
+ *
5
+ * @author lxm
6
+ * @date 2022-09-19 19:09:10
7
+ * @export
8
+ * @interface IProvider
9
+ */
10
+ export interface IEditorProvider<T extends unknown = unknown> {
11
+ /**
12
+ * 表单编辑器组件名称
13
+ *
14
+ * @author lxm
15
+ * @date 2022-09-20 10:09:50
16
+ * @type {string}
17
+ */
18
+ formEditor: string;
19
+ /**
20
+ * 表格编辑器组件名称
21
+ *
22
+ * @author lxm
23
+ * @date 2022-09-20 10:09:08
24
+ * @type {string}
25
+ */
26
+ rowEditor: string;
27
+ /**
28
+ * 创建编辑器控制器
29
+ *
30
+ * @author lxm
31
+ * @date 2022-09-20 10:09:57
32
+ * @param {EditorModel} editorModel 编辑器模型
33
+ * @param {unknown} parentController 父控制器
34
+ * @returns {*} {Promise<T>}
35
+ */
36
+ createController(editorModel: EditorModel, parentController: unknown): Promise<T>;
37
+ }
38
+ //# sourceMappingURL=i-editor-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i-editor-provider.d.ts","sourceRoot":"","sources":["../../../src/interface/provider/i-editor-provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO;IAC1D;;;;;;OAMG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;;;OAQG;IACH,gBAAgB,CACd,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,OAAO,GACxB,OAAO,CAAC,CAAC,CAAC,CAAC;CACf"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,23 @@
1
+ import { EditorModel } from '@ibiz-template/model';
2
+ import { IEditorProvider } from '../provider/i-editor-provider';
3
+ import { IRegister } from './i-register';
4
+ /**
5
+ * 注册器接口
6
+ *
7
+ * @author lxm
8
+ * @date 2022-09-19 19:09:14
9
+ * @export
10
+ * @interface IRegister
11
+ */
12
+ export interface IEditorRegister extends IRegister<IEditorProvider> {
13
+ /**
14
+ * 获取适配器
15
+ *
16
+ * @author lxm
17
+ * @date 2022-09-20 00:09:57
18
+ * @param {EditorModel} model 编辑器模型
19
+ * @returns {*} {(IEditorProvider | undefined)}
20
+ */
21
+ getByModel(model: EditorModel): IEditorProvider | undefined;
22
+ }
23
+ //# sourceMappingURL=i-editor-register.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i-editor-register.d.ts","sourceRoot":"","sources":["../../../src/interface/register/i-editor-register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC;;;;;;;GAOG;AACH,MAAM,WAAW,eAAgB,SAAQ,SAAS,CAAC,eAAe,CAAC;IACjE;;;;;;;OAOG;IACH,UAAU,CAAC,KAAK,EAAE,WAAW,GAAG,eAAe,GAAG,SAAS,CAAC;CAC7D"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,38 @@
1
+ /**
2
+ * 注册器接口
3
+ *
4
+ * @author lxm
5
+ * @date 2022-09-19 19:09:14
6
+ * @export
7
+ * @interface IRegister
8
+ */
9
+ export interface IRegister<T> {
10
+ providers: Map<string, T>;
11
+ /**
12
+ * 注册适配器
13
+ *
14
+ * @author lxm
15
+ * @date 2022-09-19 19:09:48
16
+ * @param {string} key
17
+ * @param {T} provider
18
+ */
19
+ register(key: string, provider: T): void;
20
+ /**
21
+ * 注销适配器
22
+ *
23
+ * @author lxm
24
+ * @date 2022-09-19 19:09:59
25
+ * @param {string} key
26
+ */
27
+ unRegister(key: string): void;
28
+ /**
29
+ * 获取适配器
30
+ *
31
+ * @author lxm
32
+ * @date 2022-09-19 19:09:13
33
+ * @param {string} key
34
+ * @returns {*} {T}
35
+ */
36
+ get(key: string): T | undefined;
37
+ }
38
+ //# sourceMappingURL=i-register.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i-register.d.ts","sourceRoot":"","sources":["../../../src/interface/register/i-register.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAE1B;;;;;;;OAOG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,IAAI,CAAC;IAEzC;;;;;;OAMG;IACH,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B;;;;;;;OAOG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC;CACjC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,20 @@
1
+ import { IEditorRegister } from '../interface';
2
+ /**
3
+ * 注册中心
4
+ *
5
+ * @author lxm
6
+ * @date 2022-09-19 19:09:10
7
+ * @export
8
+ * @class Register
9
+ */
10
+ export declare class Register {
11
+ /**
12
+ * 编辑器注册器
13
+ *
14
+ * @author lxm
15
+ * @date 2022-09-19 22:09:08
16
+ * @type {IEditorRegister}
17
+ */
18
+ editorRegister: IEditorRegister;
19
+ }
20
+ //# sourceMappingURL=register.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/register/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C;;;;;;;GAOG;AACH,qBAAa,QAAQ;IACnB;;;;;;OAMG;IACH,cAAc,EAAG,eAAe,CAAC;CAClC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * 注册中心
3
+ *
4
+ * @author lxm
5
+ * @date 2022-09-19 19:09:10
6
+ * @export
7
+ * @class Register
8
+ */
9
+ export class Register {
10
+ }
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
3
  import { IMessageUtil, INotificationUtil, IOpenViewUtil, IModalUtil, ILoadingUtil } from './interface';
4
+ import { Register } from './register/register';
4
5
  declare module '@ibiz-template/core' {
5
6
  interface IBizSys {
6
7
  /**
@@ -55,6 +56,14 @@ declare module '@ibiz-template/core' {
55
56
  * @type {IOpenViewUtil}
56
57
  */
57
58
  openView: IOpenViewUtil;
59
+ /**
60
+ * 注册中心
61
+ *
62
+ * @author lxm
63
+ * @date 2022-09-19 19:09:23
64
+ * @type {Register}
65
+ */
66
+ register: Register;
58
67
  }
59
68
  }
60
69
  //# sourceMappingURL=types.d.ts.map
@@ -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,EACb,MAAM,aAAa,CAAC;AAErB,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;KACzB;CACF"}
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,EACb,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,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;QAExB;;;;;;WAMG;QACH,QAAQ,EAAE,QAAQ,CAAC;KACpB;CACF"}
@@ -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,gBAAgB,EAAsB,MAAM,sBAAsB,CAAC;AAG5E,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGlD;;;;;;;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;IAsE3B;;;;;;;;;;;;;;;;OAgBG;qBACoB,YAAY,CACjC,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EACpB,MAAM,EAAE,OAAO,GACd,OAAO,CAAC;QACT,aAAa,EAAE,QAAQ,CAAC;QACxB,UAAU,EAAE,KAAK,EAAE,CAAC;QACpB,YAAY,EAAE,OAAO,CAAC;KACvB,CAAC;IAwDF;;;;;;;;OAQG;WACU,kBAAkB,CAC7B,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EACpB,IAAI,CAAC,EAAE,KAAK,GACX,OAAO,CAAC,eAAe,CAAC;IAoF3B;;;;;;;;;;;;OAYG;WACU,oBAAoB,CAC/B,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,QAAQ,EACjB,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI,EACrB,MAAM,EAAE,OAAO,EACf,IAAI,CAAC,EAAE,KAAK,GACX,OAAO,CAAC,eAAe,CAAC;IAiB3B;;;;;;;;;;;OAWG;WACU,sBAAsB,CACjC,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,QAAQ,EACjB,KAAK,EAAE,KAAK,EAAE,EACd,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,eAAe,CAAC;CAY5B"}
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":"AACA,OAAO,EACL,gBAAgB,EAGjB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGlD;;;;;;;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;IAqE3B;;;;;;;;;;;;;;;;OAgBG;qBACoB,YAAY,CACjC,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EACpB,MAAM,EAAE,OAAO,GACd,OAAO,CAAC;QACT,aAAa,EAAE,QAAQ,CAAC;QACxB,UAAU,EAAE,KAAK,EAAE,CAAC;QACpB,YAAY,EAAE,OAAO,CAAC;KACvB,CAAC;IA0DF;;;;;;;;OAQG;WACU,kBAAkB,CAC7B,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EACpB,IAAI,CAAC,EAAE,KAAK,GACX,OAAO,CAAC,eAAe,CAAC;IAmF3B;;;;;;;;;;;;OAYG;WACU,oBAAoB,CAC/B,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,QAAQ,EACjB,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI,EACrB,MAAM,EAAE,OAAO,EACf,IAAI,CAAC,EAAE,KAAK,GACX,OAAO,CAAC,eAAe,CAAC;IAiB3B;;;;;;;;;;;OAWG;WACU,sBAAsB,CACjC,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,QAAQ,EACjB,KAAK,EAAE,KAAK,EAAE,EACd,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,eAAe,CAAC;CAY5B"}
@@ -1,3 +1,5 @@
1
+ import { IBizContext } from '@ibiz-template/core';
2
+ import { UnsupportedModelError, } from '@ibiz-template/model';
1
3
  import { notNilEmpty } from 'qx-util';
2
4
  import { OpenAppViewCommand } from '../../command';
3
5
  import { convertNavData } from '../nav-params/nav-params';
@@ -24,12 +26,11 @@ export class AppDEUIActionUtil {
24
26
  * @return {*} {Promise<IUIActionResult>}
25
27
  */
26
28
  static async exec(action, context, data, params, opts) {
27
- console.log(action);
28
29
  // **用户操作确认**
29
30
  if (action.enableConfirm && action.confirmMsg) {
30
31
  // todo 用户操作确认
31
32
  }
32
- const { intercom } = opts;
33
+ const { neuron } = opts;
33
34
  const result = {
34
35
  refresh: action.reloadData,
35
36
  closeView: action.closeEditView,
@@ -61,17 +62,17 @@ export class AppDEUIActionUtil {
61
62
  }
62
63
  // *刷新引用视图
63
64
  if (result.refresh) {
64
- if (!intercom.call.refresh) {
65
+ if (!neuron.call.refresh) {
65
66
  throw new Error(`该视图不存在刷新能力`);
66
67
  }
67
- await intercom.call.refresh();
68
+ await neuron.call.refresh();
68
69
  }
69
70
  // *关闭引用视图
70
71
  if (result.closeView) {
71
- if (!intercom.call.closeView) {
72
+ if (!neuron.call.closeView) {
72
73
  throw new Error(`该视图不存在关闭视图能力`);
73
74
  }
74
- await intercom.call.closeView();
75
+ await neuron.call.closeView();
75
76
  }
76
77
  return result;
77
78
  }
@@ -121,6 +122,7 @@ export class AppDEUIActionUtil {
121
122
  if (notNilEmpty(navContexts)) {
122
123
  resultContext = convertNavData(navContexts, context, params, (data === null || data === void 0 ? void 0 : data[0]) || {});
123
124
  }
125
+ resultContext = new IBizContext(resultContext, context);
124
126
  // 处理导航视图参数
125
127
  let resultParams = {};
126
128
  const navParams = action.getPSNavigateParams();
@@ -139,7 +141,7 @@ export class AppDEUIActionUtil {
139
141
  * @returns {*} {Promise<IUIActionResult>}
140
142
  */
141
143
  static async executeSysUIAction(action, data, opts) {
142
- const { intercom, event } = opts;
144
+ const { neuron, event } = opts;
143
145
  const { uIActionTag } = action;
144
146
  const result = {};
145
147
  // todo 暂未支持部分
@@ -151,51 +153,50 @@ export class AppDEUIActionUtil {
151
153
  'RefreshAll',
152
154
  'Import',
153
155
  ].indexOf(uIActionTag) !== -1) {
154
- console.log(`${uIActionTag}暂未支持`);
155
- return result;
156
+ throw new UnsupportedModelError(action, `${uIActionTag}暂未支持`);
156
157
  }
157
158
  // 打开新建数据视图
158
159
  if (uIActionTag === 'New') {
159
- if (!intercom.call.newData) {
160
+ if (!neuron.call.newData) {
160
161
  throw new Error(`该视图不存在newData能力`);
161
162
  }
162
- await intercom.call.newData(event);
163
+ await neuron.call.newData(event);
163
164
  }
164
165
  // 打开新建数据视图
165
166
  if (uIActionTag === 'Edit') {
166
- if (!intercom.call.openData) {
167
+ if (!neuron.call.openData) {
167
168
  throw new Error(`该视图不存在openData能力`);
168
169
  }
169
- await intercom.call.openData(data === null || data === void 0 ? void 0 : data[0], event);
170
+ await neuron.call.openData(data === null || data === void 0 ? void 0 : data[0], event);
170
171
  }
171
172
  // 保存能力
172
173
  const saveTags = ['SaveAndExit', 'Save', 'SaveAndStart', 'SaveRow'];
173
174
  if (saveTags.indexOf(uIActionTag) !== -1) {
174
- if (!intercom.call.save) {
175
+ if (!neuron.call.save) {
175
176
  throw new Error(`该视图不存在save能力`);
176
177
  }
177
- await intercom.call.save();
178
+ await neuron.call.save();
178
179
  }
179
180
  // 保存并新建
180
181
  if (uIActionTag === 'SaveAndNew') {
181
- if (!intercom.call.saveAndNew) {
182
+ if (!neuron.call.saveAndNew) {
182
183
  throw new Error(`该视图不存在saveAndNew能力`);
183
184
  }
184
- await intercom.call.saveAndNew();
185
+ await neuron.call.saveAndNew();
185
186
  }
186
187
  // 删除能力
187
188
  if (uIActionTag === 'Remove' || uIActionTag === 'RemoveAndExit') {
188
- if (!intercom.call.remove) {
189
+ if (!neuron.call.remove) {
189
190
  throw new Error(`该视图不存在remove能力`);
190
191
  }
191
- await intercom.call.remove();
192
+ await neuron.call.remove();
192
193
  }
193
194
  // 新建行能力
194
195
  if (uIActionTag === 'NewRow') {
195
- if (!intercom.call.newRow) {
196
+ if (!neuron.call.newRow) {
196
197
  throw new Error(`该视图不存在newRow能力`);
197
198
  }
198
- await intercom.call.newRow();
199
+ await neuron.call.newRow();
199
200
  }
200
201
  // 需要关闭视图的
201
202
  if (['SaveAndExit', 'Exit', 'SaveAndStart', 'RemoveAndExit'].indexOf(uIActionTag) !== -1) {
@@ -1 +1 @@
1
- {"version":3,"file":"view-logic.d.ts","sourceRoot":"","sources":["../../src/view-logic/view-logic.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,oBAAoB,EACpB,qBAAqB,EACrB,eAAe,EAEhB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/C;;;;;;;;;;;GAWG;AACH,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,eAAe,EAC1B,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EACpB,MAAM,EAAE,OAAO,EACf,IAAI,GAAE,KAAU,GACf,OAAO,CAAC,eAAe,CAAC,CA8B1B;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,yBAAyB,CAC7C,UAAU,EAAE,qBAAqB,EACjC,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EACpB,MAAM,EAAE,OAAO,EACf,IAAI,GAAE,KAAU,GACf,OAAO,CAAC,eAAe,CAAC,CA4C1B;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,wBAAwB,CAC5C,UAAU,EAAE,oBAAoB,EAChC,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EACpB,MAAM,EAAE,OAAO,EACf,IAAI,GAAE,KAAU,GACf,OAAO,CAAC,eAAe,CAAC,CA2C1B"}
1
+ {"version":3,"file":"view-logic.d.ts","sourceRoot":"","sources":["../../src/view-logic/view-logic.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,oBAAoB,EACpB,qBAAqB,EACrB,eAAe,EAEhB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/C;;;;;;;;;;;GAWG;AACH,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,eAAe,EAC1B,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EACpB,MAAM,EAAE,OAAO,EACf,IAAI,GAAE,KAAU,GACf,OAAO,CAAC,eAAe,CAAC,CA8B1B;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,yBAAyB,CAC7C,UAAU,EAAE,qBAAqB,EACjC,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EACpB,MAAM,EAAE,OAAO,EACf,IAAI,GAAE,KAAU,GACf,OAAO,CAAC,eAAe,CAAC,CA6C1B;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,wBAAwB,CAC5C,UAAU,EAAE,oBAAoB,EAChC,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EACpB,MAAM,EAAE,OAAO,EACf,IAAI,GAAE,KAAU,GACf,OAAO,CAAC,eAAe,CAAC,CA6C1B"}
@@ -1,3 +1,4 @@
1
+ import { IBizContext } from '@ibiz-template/core';
1
2
  import { notNilEmpty } from 'qx-util';
2
3
  import { AppEntityModel, getPSUIActionByModelObject, } from '@ibiz-template/model';
3
4
  import { OpenAppViewCommand } from '../command';
@@ -70,6 +71,7 @@ export async function executeOpenDataAppUILogic(appUILogic, context, data, param
70
71
  });
71
72
  }
72
73
  tempContext = convertNavData(navContexts, context, params, data[0]);
74
+ tempContext = new IBizContext(tempContext, context);
73
75
  // 处理导航视图参数
74
76
  let tempParams = {};
75
77
  const navParams = openViewRef.getPSNavigateParams();
@@ -114,8 +116,10 @@ export async function executeNewDataAppUILogic(appUILogic, context, data, params
114
116
  if (notNilEmpty(navParams)) {
115
117
  tempParams = convertNavData(navParams, params, context, _data);
116
118
  }
119
+ tempContext = new IBizContext(tempContext, context);
117
120
  // 删除上下文内的主键
118
121
  delete tempContext[appDataEntity.deName.toLowerCase()];
122
+ tempContext[appDataEntity.deName.toLowerCase()] = undefined;
119
123
  // todo 拷贝
120
124
  if (appUILogic.enableWizardAdd) {
121
125
  // todo 向导添加
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template/runtime",
3
- "version": "0.0.1-alpha.3",
3
+ "version": "0.0.1-alpha.5",
4
4
  "description": "控制器包",
5
5
  "main": "out/index.js",
6
6
  "types": "out/index.d.ts",
@@ -19,19 +19,20 @@
19
19
  },
20
20
  "author": "chitanda",
21
21
  "license": "MIT",
22
+ "dependencies": {
23
+ "@ibiz-template/command": "^0.0.1-alpha.2"
24
+ },
22
25
  "devDependencies": {
23
- "@ibiz-template/command": "^0.0.1-alpha.2",
24
- "@ibiz-template/core": "^0.0.1-alpha.3",
25
- "@ibiz-template/model": "^0.0.1-alpha.3",
26
- "@ibiz-template/service": "^0.0.1-alpha.3",
27
- "qx-util": "^0.4.0"
26
+ "@ibiz-template/core": "^0.0.1-alpha.5",
27
+ "@ibiz-template/model": "^0.0.1-alpha.5",
28
+ "@ibiz-template/service": "^0.0.1-alpha.5",
29
+ "qx-util": "^0.4.1"
28
30
  },
29
31
  "peerDependencies": {
30
- "@ibiz-template/command": "^0.0.1-alpha.2",
31
32
  "@ibiz-template/core": "^0.0.1-alpha.2",
32
33
  "@ibiz-template/model": "^0.0.1-alpha.2",
33
34
  "@ibiz-template/service": "^0.0.1-alpha.2",
34
- "qx-util": "^0.4.0"
35
+ "qx-util": "^0.4.1"
35
36
  },
36
- "gitHead": "18f541775c71975fec7f07524e9b8c0135dedbf6"
37
+ "gitHead": "8c4920248d5047ef434647c7f3707b49cb4d7077"
37
38
  }
@@ -50,7 +50,10 @@ export class OpenAppViewCommand {
50
50
  throw new Error('未支持的视图打开模式: POPUPAPP');
51
51
  case 'POPOVER':
52
52
  return this.openPopover(appView, context, params);
53
- case 'DRAWER':
53
+ case 'DRAWER_LEFT':
54
+ case 'DRAWER_RIGHT':
55
+ case 'DRAWER_TOP':
56
+ case 'DRAWER_BOTTOM':
54
57
  return this.openDrawer(appView, context, params);
55
58
  case 'USER':
56
59
  return this.openUserCustom(appView, context, params);
package/src/index.ts CHANGED
@@ -4,5 +4,6 @@ export { install } from './install';
4
4
  export * from './command';
5
5
  export * from './constant';
6
6
  export * from './interface';
7
+ export * from './register/register';
7
8
  export * from './utils';
8
9
  export * from './view-logic';
package/src/install.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { commands } from '@ibiz-template/command';
2
+ import { Register } from './register/register';
2
3
  import { installCommand } from './command';
3
4
 
4
5
  /**
@@ -12,6 +13,8 @@ export function install(): void {
12
13
  const { ibiz } = window;
13
14
  // 挂载指令控制器
14
15
  ibiz.commands = commands;
16
+ // 挂载注册中心
17
+ ibiz.register = new Register();
15
18
  // 安装默认指令
16
19
  installCommand();
17
20
  }
@@ -2,3 +2,6 @@ export { IModal } from './i-modal/i-modal';
2
2
  export { IModalData } from './i-modal-data/i-modal-data';
3
3
  export { IUIActionResult } from './i-ui-action-result/i-ui-action-result';
4
4
  export * from './util';
5
+ export * from './provider/i-editor-provider';
6
+ export * from './register/i-register';
7
+ export * from './register/i-editor-register';
@@ -0,0 +1,44 @@
1
+ /* eslint-disable @typescript-eslint/no-unnecessary-type-constraint */
2
+ import { EditorModel } from '@ibiz-template/model';
3
+
4
+ /**
5
+ * 编辑器适配器的接口
6
+ *
7
+ * @author lxm
8
+ * @date 2022-09-19 19:09:10
9
+ * @export
10
+ * @interface IProvider
11
+ */
12
+ export interface IEditorProvider<T extends unknown = unknown> {
13
+ /**
14
+ * 表单编辑器组件名称
15
+ *
16
+ * @author lxm
17
+ * @date 2022-09-20 10:09:50
18
+ * @type {string}
19
+ */
20
+ formEditor: string;
21
+
22
+ /**
23
+ * 表格编辑器组件名称
24
+ *
25
+ * @author lxm
26
+ * @date 2022-09-20 10:09:08
27
+ * @type {string}
28
+ */
29
+ rowEditor: string;
30
+
31
+ /**
32
+ * 创建编辑器控制器
33
+ *
34
+ * @author lxm
35
+ * @date 2022-09-20 10:09:57
36
+ * @param {EditorModel} editorModel 编辑器模型
37
+ * @param {unknown} parentController 父控制器
38
+ * @returns {*} {Promise<T>}
39
+ */
40
+ createController(
41
+ editorModel: EditorModel,
42
+ parentController: unknown,
43
+ ): Promise<T>;
44
+ }
@@ -0,0 +1,23 @@
1
+ import { EditorModel } from '@ibiz-template/model';
2
+ import { IEditorProvider } from '../provider/i-editor-provider';
3
+ import { IRegister } from './i-register';
4
+
5
+ /**
6
+ * 注册器接口
7
+ *
8
+ * @author lxm
9
+ * @date 2022-09-19 19:09:14
10
+ * @export
11
+ * @interface IRegister
12
+ */
13
+ export interface IEditorRegister extends IRegister<IEditorProvider> {
14
+ /**
15
+ * 获取适配器
16
+ *
17
+ * @author lxm
18
+ * @date 2022-09-20 00:09:57
19
+ * @param {EditorModel} model 编辑器模型
20
+ * @returns {*} {(IEditorProvider | undefined)}
21
+ */
22
+ getByModel(model: EditorModel): IEditorProvider | undefined;
23
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * 注册器接口
3
+ *
4
+ * @author lxm
5
+ * @date 2022-09-19 19:09:14
6
+ * @export
7
+ * @interface IRegister
8
+ */
9
+ export interface IRegister<T> {
10
+ providers: Map<string, T>;
11
+
12
+ /**
13
+ * 注册适配器
14
+ *
15
+ * @author lxm
16
+ * @date 2022-09-19 19:09:48
17
+ * @param {string} key
18
+ * @param {T} provider
19
+ */
20
+ register(key: string, provider: T): void;
21
+
22
+ /**
23
+ * 注销适配器
24
+ *
25
+ * @author lxm
26
+ * @date 2022-09-19 19:09:59
27
+ * @param {string} key
28
+ */
29
+ unRegister(key: string): void;
30
+
31
+ /**
32
+ * 获取适配器
33
+ *
34
+ * @author lxm
35
+ * @date 2022-09-19 19:09:13
36
+ * @param {string} key
37
+ * @returns {*} {T}
38
+ */
39
+ get(key: string): T | undefined;
40
+ }
@@ -0,0 +1,20 @@
1
+ import { IEditorRegister } from '../interface';
2
+
3
+ /**
4
+ * 注册中心
5
+ *
6
+ * @author lxm
7
+ * @date 2022-09-19 19:09:10
8
+ * @export
9
+ * @class Register
10
+ */
11
+ export class Register {
12
+ /**
13
+ * 编辑器注册器
14
+ *
15
+ * @author lxm
16
+ * @date 2022-09-19 22:09:08
17
+ * @type {IEditorRegister}
18
+ */
19
+ editorRegister!: IEditorRegister;
20
+ }
package/src/types.ts CHANGED
@@ -7,6 +7,7 @@ import {
7
7
  IModalUtil,
8
8
  ILoadingUtil,
9
9
  } from './interface';
10
+ import { Register } from './register/register';
10
11
 
11
12
  declare module '@ibiz-template/core' {
12
13
  interface IBizSys {
@@ -62,5 +63,14 @@ declare module '@ibiz-template/core' {
62
63
  * @type {IOpenViewUtil}
63
64
  */
64
65
  openView: IOpenViewUtil;
66
+
67
+ /**
68
+ * 注册中心
69
+ *
70
+ * @author lxm
71
+ * @date 2022-09-19 19:09:23
72
+ * @type {Register}
73
+ */
74
+ register: Register;
65
75
  }
66
76
  }
@@ -1,4 +1,9 @@
1
- import { IPSAppDEUIAction, IPSNavigateContext } from '@ibiz-template/model';
1
+ import { IBizContext } from '@ibiz-template/core';
2
+ import {
3
+ IPSAppDEUIAction,
4
+ IPSNavigateContext,
5
+ UnsupportedModelError,
6
+ } from '@ibiz-template/model';
2
7
  import { notNilEmpty } from 'qx-util';
3
8
  import { OpenAppViewCommand } from '../../command';
4
9
  import { IUIActionResult } from '../../interface';
@@ -33,13 +38,12 @@ export class AppDEUIActionUtil {
33
38
  params: IParams,
34
39
  opts?: IData,
35
40
  ): Promise<IUIActionResult> {
36
- console.log(action);
37
41
  // **用户操作确认**
38
42
  if (action.enableConfirm && action.confirmMsg) {
39
43
  // todo 用户操作确认
40
44
  }
41
45
 
42
- const { intercom } = opts!;
46
+ const { neuron } = opts!;
43
47
  const result: IUIActionResult = {
44
48
  refresh: action.reloadData,
45
49
  closeView: action.closeEditView,
@@ -85,18 +89,18 @@ export class AppDEUIActionUtil {
85
89
 
86
90
  // *刷新引用视图
87
91
  if (result.refresh) {
88
- if (!intercom.call.refresh) {
92
+ if (!neuron.call.refresh) {
89
93
  throw new Error(`该视图不存在刷新能力`);
90
94
  }
91
- await intercom.call.refresh();
95
+ await neuron.call.refresh();
92
96
  }
93
97
 
94
98
  // *关闭引用视图
95
99
  if (result.closeView) {
96
- if (!intercom.call.closeView) {
100
+ if (!neuron.call.closeView) {
97
101
  throw new Error(`该视图不存在关闭视图能力`);
98
102
  }
99
- await intercom.call.closeView();
103
+ await neuron.call.closeView();
100
104
  }
101
105
 
102
106
  return result;
@@ -170,6 +174,8 @@ export class AppDEUIActionUtil {
170
174
  data?.[0] || {},
171
175
  );
172
176
  }
177
+ resultContext = new IBizContext(resultContext, context);
178
+
173
179
  // 处理导航视图参数
174
180
  let resultParams: IData = {};
175
181
  const navParams = action.getPSNavigateParams();
@@ -198,7 +204,7 @@ export class AppDEUIActionUtil {
198
204
  data: IData[] | null,
199
205
  opts?: IData,
200
206
  ): Promise<IUIActionResult> {
201
- const { intercom, event } = opts!;
207
+ const { neuron, event } = opts!;
202
208
  const { uIActionTag } = action;
203
209
  const result: IUIActionResult = {};
204
210
 
@@ -213,56 +219,55 @@ export class AppDEUIActionUtil {
213
219
  'Import',
214
220
  ].indexOf(uIActionTag) !== -1
215
221
  ) {
216
- console.log(`${uIActionTag}暂未支持`);
217
- return result;
222
+ throw new UnsupportedModelError(action, `${uIActionTag}暂未支持`);
218
223
  }
219
224
 
220
225
  // 打开新建数据视图
221
226
  if (uIActionTag === 'New') {
222
- if (!intercom.call.newData) {
227
+ if (!neuron.call.newData) {
223
228
  throw new Error(`该视图不存在newData能力`);
224
229
  }
225
- await intercom.call.newData(event);
230
+ await neuron.call.newData(event);
226
231
  }
227
232
  // 打开新建数据视图
228
233
  if (uIActionTag === 'Edit') {
229
- if (!intercom.call.openData) {
234
+ if (!neuron.call.openData) {
230
235
  throw new Error(`该视图不存在openData能力`);
231
236
  }
232
- await intercom.call.openData(data?.[0], event);
237
+ await neuron.call.openData(data?.[0], event);
233
238
  }
234
239
 
235
240
  // 保存能力
236
241
  const saveTags = ['SaveAndExit', 'Save', 'SaveAndStart', 'SaveRow'];
237
242
  if (saveTags.indexOf(uIActionTag) !== -1) {
238
- if (!intercom.call.save) {
243
+ if (!neuron.call.save) {
239
244
  throw new Error(`该视图不存在save能力`);
240
245
  }
241
- await intercom.call.save();
246
+ await neuron.call.save();
242
247
  }
243
248
 
244
249
  // 保存并新建
245
250
  if (uIActionTag === 'SaveAndNew') {
246
- if (!intercom.call.saveAndNew) {
251
+ if (!neuron.call.saveAndNew) {
247
252
  throw new Error(`该视图不存在saveAndNew能力`);
248
253
  }
249
- await intercom.call.saveAndNew();
254
+ await neuron.call.saveAndNew();
250
255
  }
251
256
 
252
257
  // 删除能力
253
258
  if (uIActionTag === 'Remove' || uIActionTag === 'RemoveAndExit') {
254
- if (!intercom.call.remove) {
259
+ if (!neuron.call.remove) {
255
260
  throw new Error(`该视图不存在remove能力`);
256
261
  }
257
- await intercom.call.remove();
262
+ await neuron.call.remove();
258
263
  }
259
264
 
260
265
  // 新建行能力
261
266
  if (uIActionTag === 'NewRow') {
262
- if (!intercom.call.newRow) {
267
+ if (!neuron.call.newRow) {
263
268
  throw new Error(`该视图不存在newRow能力`);
264
269
  }
265
- await intercom.call.newRow();
270
+ await neuron.call.newRow();
266
271
  }
267
272
 
268
273
  // 需要关闭视图的
@@ -1,3 +1,4 @@
1
+ import { IBizContext } from '@ibiz-template/core';
1
2
  import { notNilEmpty } from 'qx-util';
2
3
  import {
3
4
  AppEntityModel,
@@ -108,6 +109,7 @@ export async function executeOpenDataAppUILogic(
108
109
  } as IPSNavigateParam);
109
110
  }
110
111
  tempContext = convertNavData(navContexts!, context, params, data[0]);
112
+ tempContext = new IBizContext(tempContext, context);
111
113
 
112
114
  // 处理导航视图参数
113
115
  let tempParams: IData = {};
@@ -166,9 +168,11 @@ export async function executeNewDataAppUILogic(
166
168
  if (notNilEmpty(navParams)) {
167
169
  tempParams = convertNavData(navParams!, params, context, _data);
168
170
  }
171
+ tempContext = new IBizContext(tempContext, context);
169
172
 
170
173
  // 删除上下文内的主键
171
174
  delete tempContext[appDataEntity.deName.toLowerCase()];
175
+ tempContext[appDataEntity.deName.toLowerCase()] = undefined;
172
176
 
173
177
  // todo 拷贝
174
178
  if (appUILogic.enableWizardAdd) {