@ibiz-template/runtime 0.0.1-alpha.2 → 0.0.1-alpha.20

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 (54) hide show
  1. package/out/command/app/open-app-view/open-app-view.d.ts +0 -11
  2. package/out/command/app/open-app-view/open-app-view.d.ts.map +1 -1
  3. package/out/command/app/open-app-view/open-app-view.js +6 -15
  4. package/out/index.d.ts +1 -0
  5. package/out/index.d.ts.map +1 -1
  6. package/out/index.js +1 -0
  7. package/out/install.d.ts.map +1 -1
  8. package/out/install.js +3 -0
  9. package/out/interface/index.d.ts +3 -0
  10. package/out/interface/index.d.ts.map +1 -1
  11. package/out/interface/index.js +3 -0
  12. package/out/interface/provider/i-editor-provider.d.ts +38 -0
  13. package/out/interface/provider/i-editor-provider.d.ts.map +1 -0
  14. package/out/interface/provider/i-editor-provider.js +1 -0
  15. package/out/interface/register/i-editor-register.d.ts +23 -0
  16. package/out/interface/register/i-editor-register.d.ts.map +1 -0
  17. package/out/interface/register/i-editor-register.js +1 -0
  18. package/out/interface/register/i-register.d.ts +38 -0
  19. package/out/interface/register/i-register.d.ts.map +1 -0
  20. package/out/interface/register/i-register.js +1 -0
  21. package/out/interface/util/i-loading-util/i-loading-util.d.ts +14 -0
  22. package/out/interface/util/i-loading-util/i-loading-util.d.ts.map +1 -1
  23. package/out/register/register.d.ts +20 -0
  24. package/out/register/register.d.ts.map +1 -0
  25. package/out/register/register.js +10 -0
  26. package/out/types.d.ts +9 -0
  27. package/out/types.d.ts.map +1 -1
  28. package/out/utils/app-de-ui-action-util/app-de-ui-action-util.d.ts +11 -10
  29. package/out/utils/app-de-ui-action-util/app-de-ui-action-util.d.ts.map +1 -1
  30. package/out/utils/app-de-ui-action-util/app-de-ui-action-util.js +52 -31
  31. package/out/utils/index.d.ts +1 -0
  32. package/out/utils/index.d.ts.map +1 -1
  33. package/out/utils/index.js +1 -0
  34. package/out/utils/open-redirect-view/open-redirect-view.d.ts +42 -0
  35. package/out/utils/open-redirect-view/open-redirect-view.d.ts.map +1 -0
  36. package/out/utils/open-redirect-view/open-redirect-view.js +149 -0
  37. package/out/view-logic/view-logic.d.ts +7 -6
  38. package/out/view-logic/view-logic.d.ts.map +1 -1
  39. package/out/view-logic/view-logic.js +20 -10
  40. package/package.json +15 -8
  41. package/src/command/app/open-app-view/open-app-view.ts +12 -26
  42. package/src/index.ts +1 -0
  43. package/src/install.ts +3 -0
  44. package/src/interface/index.ts +3 -0
  45. package/src/interface/provider/i-editor-provider.ts +44 -0
  46. package/src/interface/register/i-editor-register.ts +23 -0
  47. package/src/interface/register/i-register.ts +40 -0
  48. package/src/interface/util/i-loading-util/i-loading-util.ts +14 -0
  49. package/src/register/register.ts +20 -0
  50. package/src/types.ts +10 -0
  51. package/src/utils/app-de-ui-action-util/app-de-ui-action-util.ts +64 -41
  52. package/src/utils/index.ts +1 -0
  53. package/src/utils/open-redirect-view/open-redirect-view.ts +187 -0
  54. package/src/view-logic/view-logic.ts +31 -14
@@ -24,17 +24,6 @@ export declare class OpenAppViewCommand {
24
24
  * @return {*} {(Promise<IModalData | void>)}
25
25
  */
26
26
  exec(appView: IPSAppView, context?: IBizContext, params?: IParams, _opts?: IData): Promise<IModalData | void>;
27
- /**
28
- * 打开重定向视图
29
- *
30
- * @author chitanda
31
- * @date 2022-07-25 20:07:24
32
- * @protected
33
- * @param {IPSAppView} appView
34
- * @param {IBizContext} [context]
35
- * @param {IParams} [params={}]
36
- */
37
- protected openRedirectView(appView: IPSAppView, context?: IBizContext, params?: IParams): void;
38
27
  /**
39
28
  * 首页导航模式打开
40
29
  *
@@ -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,EAAsB,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD;;;;;;;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;IAkC7B;;;;;;;;;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,3 +1,4 @@
1
+ import { openRedirectView } from '../../../utils';
1
2
  /**
2
3
  * 打开应用视图
3
4
  *
@@ -24,7 +25,7 @@ export class OpenAppViewCommand {
24
25
  async exec(appView, context, params = {}, _opts = {}) {
25
26
  await appView.fill(true);
26
27
  if (appView.redirectView) {
27
- return this.openRedirectView(appView);
28
+ return openRedirectView(appView, context, params, _opts.data);
28
29
  }
29
30
  const { openMode = 'INDEXVIEWTAB' } = appView;
30
31
  switch (openMode) {
@@ -38,7 +39,10 @@ export class OpenAppViewCommand {
38
39
  throw new Error('未支持的视图打开模式: POPUPAPP');
39
40
  case 'POPOVER':
40
41
  return this.openPopover(appView, context, params);
41
- case 'DRAWER':
42
+ case 'DRAWER_LEFT':
43
+ case 'DRAWER_RIGHT':
44
+ case 'DRAWER_TOP':
45
+ case 'DRAWER_BOTTOM':
42
46
  return this.openDrawer(appView, context, params);
43
47
  case 'USER':
44
48
  return this.openUserCustom(appView, context, params);
@@ -46,19 +50,6 @@ export class OpenAppViewCommand {
46
50
  return this.openIndexViewTab(appView, context, params);
47
51
  }
48
52
  }
49
- /**
50
- * 打开重定向视图
51
- *
52
- * @author chitanda
53
- * @date 2022-07-25 20:07:24
54
- * @protected
55
- * @param {IPSAppView} appView
56
- * @param {IBizContext} [context]
57
- * @param {IParams} [params={}]
58
- */
59
- openRedirectView(appView, context, params = {}) {
60
- console.log('OpenAppViewCommand.openRedirectView', appView, context, params);
61
- }
62
53
  /**
63
54
  * 首页导航模式打开
64
55
  *
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 {};
@@ -22,5 +22,19 @@ export interface ILoadingUtil {
22
22
  * @date 2022-08-17 17:08:48
23
23
  */
24
24
  hide(): void;
25
+ /**
26
+ * 显示顶部全局加载动画
27
+ *
28
+ * @author chitanda
29
+ * @date 2022-10-08 16:10:18
30
+ */
31
+ showRedirect(): void;
32
+ /**
33
+ * 隐藏顶部全局加载动画
34
+ *
35
+ * @author chitanda
36
+ * @date 2022-10-08 16:10:29
37
+ */
38
+ hideRedirect(): void;
25
39
  }
26
40
  //# sourceMappingURL=i-loading-util.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"i-loading-util.d.ts","sourceRoot":"","sources":["../../../../src/interface/util/i-loading-util/i-loading-util.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;OAMG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;;;;OAKG;IACH,IAAI,IAAI,IAAI,CAAC;CACd"}
1
+ {"version":3,"file":"i-loading-util.d.ts","sourceRoot":"","sources":["../../../../src/interface/util/i-loading-util/i-loading-util.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;OAMG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;;;;OAKG;IACH,IAAI,IAAI,IAAI,CAAC;IACb;;;;;OAKG;IACH,YAAY,IAAI,IAAI,CAAC;IACrB;;;;;OAKG;IACH,YAAY,IAAI,IAAI,CAAC;CACtB"}
@@ -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,3 +1,4 @@
1
+ import { IBizContext } from '@ibiz-template/core';
1
2
  import { IPSAppDEUIAction } from '@ibiz-template/model';
2
3
  import { IUIActionResult } from '../../interface';
3
4
  /**
@@ -16,13 +17,13 @@ export declare class AppDEUIActionUtil {
16
17
  * @date 2022-08-29 15:08:47
17
18
  * @static
18
19
  * @param {IPSAppDEUIAction} action
19
- * @param {IContext} context
20
+ * @param {IBizContext} context
20
21
  * @param {(IData | null)} data
21
22
  * @param {IParams} [params]
22
23
  * @param {IData} [opts]
23
24
  * @return {*} {Promise<IUIActionResult>}
24
25
  */
25
- static exec(action: IPSAppDEUIAction, context: IContext, data: IData[] | null, params: IParams, opts?: IData): Promise<IUIActionResult>;
26
+ static exec(action: IPSAppDEUIAction, context: IBizContext, data: IData[] | null, params: IParams, opts?: IData): Promise<IUIActionResult>;
26
27
  /**
27
28
  * 参数处理(根据数据目标和数据参数,导航参数)
28
29
  *
@@ -31,17 +32,17 @@ export declare class AppDEUIActionUtil {
31
32
  * @protected
32
33
  * @static
33
34
  * @param {IPSAppDEUIAction} action 界面行为
34
- * @param {IContext} context 上下文
35
+ * @param {IBizContext} context 上下文
35
36
  * @param {(IData[] | null)} data 数据集合
36
37
  * @param {IParams} params 视图参数
37
38
  * @returns {*} {Promise<{
38
- * resultContext: IContext; 处理后的上下文
39
+ * resultContext: IBizContext; 处理后的上下文
39
40
  * resultData: IData[]; 处理后的数据集合
40
41
  * resultParams: IParams; 处理后的视图参数
41
42
  * }>}
42
43
  */
43
- protected static handleParams(action: IPSAppDEUIAction, context: IContext, data: IData[] | null, params: IParams): Promise<{
44
- resultContext: IContext;
44
+ protected static handleParams(action: IPSAppDEUIAction, context: IBizContext, data: IData[] | null, params: IParams): Promise<{
45
+ resultContext: IBizContext;
45
46
  resultData: IData[];
46
47
  resultParams: IParams;
47
48
  }>;
@@ -62,13 +63,13 @@ export declare class AppDEUIActionUtil {
62
63
  * @date 2022-08-29 15:08:51
63
64
  * @static
64
65
  * @param {IPSAppDEUIAction} action
65
- * @param {IContext} context
66
+ * @param {IBizContext} context
66
67
  * @param {(IData[] | null)} data
67
68
  * @param {IParams} params
68
69
  * @param {IData} [opts]
69
70
  * @returns {*} {Promise<IUIActionResult>}
70
71
  */
71
- static executeFrontUIAction(action: IPSAppDEUIAction, context: IContext, _data: IData[] | null, params: IParams, opts?: IData): Promise<IUIActionResult>;
72
+ static executeFrontUIAction(action: IPSAppDEUIAction, context: IBizContext, _data: IData[] | null, params: IParams, opts?: IData): Promise<IUIActionResult>;
72
73
  /**
73
74
  * 执行后台调用
74
75
  *
@@ -76,11 +77,11 @@ export declare class AppDEUIActionUtil {
76
77
  * @date 2022-08-28 20:08:35
77
78
  * @export
78
79
  * @param {IPSAppDEUIAction} action
79
- * @param {IContext} context
80
+ * @param {IBizContext} context
80
81
  * @param {IData[]} data
81
82
  * @param {IParams} params
82
83
  * @returns {*} {Promise<IUIActionResult>}
83
84
  */
84
- static executeBackEndUIAction(action: IPSAppDEUIAction, context: IContext, _data: IData[], params: IParams): Promise<IUIActionResult>;
85
+ static executeBackEndUIAction(action: IPSAppDEUIAction, context: IBizContext, _data: IData[], params: IParams): Promise<IUIActionResult>;
85
86
  }
86
87
  //# sourceMappingURL=app-de-ui-action-util.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app-de-ui-action-util.d.ts","sourceRoot":"","sources":["../../../src/utils/app-de-ui-action-util/app-de-ui-action-util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,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":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,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,WAAW,EACpB,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,WAAW,EACpB,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EACpB,MAAM,EAAE,OAAO,GACd,OAAO,CAAC;QACT,aAAa,EAAE,WAAW,CAAC;QAC3B,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;IAqG3B;;;;;;;;;;;;OAYG;WACU,oBAAoB,CAC/B,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,WAAW,EACpB,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,WAAW,EACpB,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';
@@ -17,19 +19,18 @@ export class AppDEUIActionUtil {
17
19
  * @date 2022-08-29 15:08:47
18
20
  * @static
19
21
  * @param {IPSAppDEUIAction} action
20
- * @param {IContext} context
22
+ * @param {IBizContext} context
21
23
  * @param {(IData | null)} data
22
24
  * @param {IParams} [params]
23
25
  * @param {IData} [opts]
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
  }
@@ -83,11 +84,11 @@ export class AppDEUIActionUtil {
83
84
  * @protected
84
85
  * @static
85
86
  * @param {IPSAppDEUIAction} action 界面行为
86
- * @param {IContext} context 上下文
87
+ * @param {IBizContext} context 上下文
87
88
  * @param {(IData[] | null)} data 数据集合
88
89
  * @param {IParams} params 视图参数
89
90
  * @returns {*} {Promise<{
90
- * resultContext: IContext; 处理后的上下文
91
+ * resultContext: IBizContext; 处理后的上下文
91
92
  * resultData: IData[]; 处理后的数据集合
92
93
  * resultParams: IParams; 处理后的视图参数
93
94
  * }>}
@@ -104,7 +105,7 @@ export class AppDEUIActionUtil {
104
105
  resultData = [];
105
106
  }
106
107
  // 处理上下文导航参数
107
- let resultContext = {};
108
+ let tempContext = {};
108
109
  const navContexts = action.getPSNavigateContexts() || [];
109
110
  // 单项数据主键时,在导航参数开头加一个主键的导航参数,可以被配置的同名导航参数覆盖。
110
111
  const appDataEntity = action.getPSAppDataEntity();
@@ -119,8 +120,9 @@ export class AppDEUIActionUtil {
119
120
  });
120
121
  }
121
122
  if (notNilEmpty(navContexts)) {
122
- resultContext = convertNavData(navContexts, context, params, (data === null || data === void 0 ? void 0 : data[0]) || {});
123
+ tempContext = convertNavData(navContexts, context, params, (data === null || data === void 0 ? void 0 : data[0]) || {});
123
124
  }
125
+ const resultContext = new IBizContext(tempContext, 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,54 +153,73 @@ 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
- const saveTags = ['SaveAndExit', 'Save', 'SaveAndStart', 'SaveRow'];
173
+ const saveTags = ['SaveAndExit', 'Save', '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();
200
+ }
201
+ // 切换搜索表单能力
202
+ if (uIActionTag === 'ToggleFilter') {
203
+ if (!neuron.call.toggleFilter) {
204
+ throw new Error(`该视图不存在ToggleFilter能力`);
205
+ }
206
+ neuron.call.toggleFilter();
207
+ }
208
+ // 工作流相关
209
+ if (uIActionTag === 'SaveAndStart') {
210
+ if (!neuron.call.wfStart) {
211
+ throw new Error(`该视图不存在SaveAndStart能力`);
212
+ }
213
+ await neuron.call.wfStart();
214
+ }
215
+ if (uIActionTag === 'ViewWFStep') {
216
+ if (!neuron.call.wfSubmit) {
217
+ throw new Error(`该视图不存在ViewWFStep能力`);
218
+ }
219
+ await neuron.call.wfSubmit();
199
220
  }
200
221
  // 需要关闭视图的
201
- if (['SaveAndExit', 'Exit', 'SaveAndStart', 'RemoveAndExit'].indexOf(uIActionTag) !== -1) {
222
+ if (['SaveAndExit', 'Exit', 'RemoveAndExit'].indexOf(uIActionTag) !== -1) {
202
223
  result.closeView = true;
203
224
  }
204
225
  // 需要刷新界面的
@@ -214,7 +235,7 @@ export class AppDEUIActionUtil {
214
235
  * @date 2022-08-29 15:08:51
215
236
  * @static
216
237
  * @param {IPSAppDEUIAction} action
217
- * @param {IContext} context
238
+ * @param {IBizContext} context
218
239
  * @param {(IData[] | null)} data
219
240
  * @param {IParams} params
220
241
  * @param {IData} [opts]
@@ -236,7 +257,7 @@ export class AppDEUIActionUtil {
236
257
  * @date 2022-08-28 20:08:35
237
258
  * @export
238
259
  * @param {IPSAppDEUIAction} action
239
- * @param {IContext} context
260
+ * @param {IBizContext} context
240
261
  * @param {IData[]} data
241
262
  * @param {IParams} params
242
263
  * @returns {*} {Promise<IUIActionResult>}
@@ -1,3 +1,4 @@
1
1
  export { AppDEUIActionUtil } from './app-de-ui-action-util/app-de-ui-action-util';
2
2
  export * from './nav-params/nav-params';
3
+ export { openRedirectView } from './open-redirect-view/open-redirect-view';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export { AppDEUIActionUtil } from './app-de-ui-action-util/app-de-ui-action-util';
2
2
  export * from './nav-params/nav-params';
3
+ export { openRedirectView } from './open-redirect-view/open-redirect-view';