@ibiz-template/runtime 0.2.18-dev.1 → 0.2.18

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 (106) hide show
  1. package/dist/index.esm.js +363 -195
  2. package/dist/index.system.min.js +2 -2
  3. package/dist/index.system.min.js.map +1 -1
  4. package/out/controller/control/form/form/form.controller.d.ts.map +1 -1
  5. package/out/controller/control/form/form/form.controller.js +5 -0
  6. package/out/controller/control/form/form-detail/form-button/form-button.controller.d.ts.map +1 -1
  7. package/out/controller/control/form/form-detail/form-button/form-button.controller.js +1 -0
  8. package/out/controller/control/form/form-detail/form-detail/form-detail.controller.d.ts +6 -0
  9. package/out/controller/control/form/form-detail/form-detail/form-detail.controller.d.ts.map +1 -1
  10. package/out/controller/control/form/form-detail/form-detail/form-detail.controller.js +13 -0
  11. package/out/controller/control/form/form-detail/form-item/form-item.controller.d.ts +18 -0
  12. package/out/controller/control/form/form-detail/form-item/form-item.controller.d.ts.map +1 -1
  13. package/out/controller/control/form/form-detail/form-item/form-item.controller.js +41 -0
  14. package/out/controller/control/panel/panel/panel-item.controller.d.ts.map +1 -1
  15. package/out/controller/control/panel/panel/panel-item.controller.js +2 -1
  16. package/out/controller/utils/data-file-util/data-file-util.d.ts +1 -1
  17. package/out/controller/utils/data-file-util/data-file-util.d.ts.map +1 -1
  18. package/out/controller/utils/data-file-util/data-file-util.js +10 -23
  19. package/out/install.d.ts.map +1 -1
  20. package/out/install.js +3 -1
  21. package/out/interface/controller/event/argument/form-detail.event.d.ts +48 -0
  22. package/out/interface/controller/event/argument/form-detail.event.d.ts.map +1 -0
  23. package/out/interface/controller/event/argument/form-detail.event.js +24 -0
  24. package/out/interface/controller/event/argument/index.d.ts +3 -0
  25. package/out/interface/controller/event/argument/index.d.ts.map +1 -1
  26. package/out/interface/controller/event/argument/index.js +2 -1
  27. package/out/interface/controller/event/argument/panel-item.event.d.ts +23 -1
  28. package/out/interface/controller/event/argument/panel-item.event.d.ts.map +1 -1
  29. package/out/interface/controller/event/argument/panel-item.event.js +24 -1
  30. package/out/interface/controller/event/control/i-form.event.d.ts +13 -1
  31. package/out/interface/controller/event/control/i-form.event.d.ts.map +1 -1
  32. package/out/interface/controller/event/view/i-map-view.event.d.ts +12 -0
  33. package/out/interface/controller/event/view/i-map-view.event.d.ts.map +1 -0
  34. package/out/interface/controller/event/view/i-map-view.event.js +1 -0
  35. package/out/interface/controller/event/view/index.d.ts +1 -0
  36. package/out/interface/controller/event/view/index.d.ts.map +1 -1
  37. package/out/interface/controller/event/view/index.js +1 -0
  38. package/out/interface/controller/state/view/i-map-view.state.d.ts +11 -0
  39. package/out/interface/controller/state/view/i-map-view.state.d.ts.map +1 -0
  40. package/out/interface/controller/state/view/i-map-view.state.js +1 -0
  41. package/out/interface/controller/state/view/index.d.ts +1 -0
  42. package/out/interface/controller/state/view/index.d.ts.map +1 -1
  43. package/out/interface/controller/state/view/index.js +1 -0
  44. package/out/interface/provider/i-async-action.provider.d.ts +27 -0
  45. package/out/interface/provider/i-async-action.provider.d.ts.map +1 -0
  46. package/out/interface/provider/i-async-action.provider.js +1 -0
  47. package/out/interface/provider/index.d.ts +1 -0
  48. package/out/interface/provider/index.d.ts.map +1 -1
  49. package/out/interface/service/service/i-async-action.service.d.ts +28 -0
  50. package/out/interface/service/service/i-async-action.service.d.ts.map +1 -0
  51. package/out/interface/service/service/i-async-action.service.js +1 -0
  52. package/out/interface/service/service/index.d.ts +1 -0
  53. package/out/interface/service/service/index.d.ts.map +1 -1
  54. package/out/model/utils/util.d.ts.map +1 -1
  55. package/out/model/utils/util.js +7 -2
  56. package/out/register/helper/async-action-register.d.ts +22 -0
  57. package/out/register/helper/async-action-register.d.ts.map +1 -0
  58. package/out/register/helper/async-action-register.js +35 -0
  59. package/out/register/helper/index.d.ts +1 -0
  60. package/out/register/helper/index.d.ts.map +1 -1
  61. package/out/register/helper/index.js +1 -0
  62. package/out/service/app-data-entity/app-data-entity.d.ts +3 -3
  63. package/out/service/app-data-entity/app-data-entity.d.ts.map +1 -1
  64. package/out/service/app-data-entity/app-data-entity.js +3 -3
  65. package/out/service/dto/method.dto.d.ts +14 -0
  66. package/out/service/dto/method.dto.d.ts.map +1 -1
  67. package/out/service/dto/method.dto.js +63 -23
  68. package/out/service/service/async-action/async-action.service.d.ts +28 -0
  69. package/out/service/service/async-action/async-action.service.d.ts.map +1 -0
  70. package/out/service/service/async-action/async-action.service.js +31 -0
  71. package/out/service/service/index.d.ts +1 -0
  72. package/out/service/service/index.d.ts.map +1 -1
  73. package/out/service/service/index.js +1 -0
  74. package/out/types.d.ts +9 -1
  75. package/out/types.d.ts.map +1 -1
  76. package/out/utils/handlebars/handlebars.d.ts.map +1 -1
  77. package/out/utils/handlebars/handlebars.js +3 -1
  78. package/package.json +3 -3
  79. package/src/controller/control/form/form/form.controller.ts +9 -0
  80. package/src/controller/control/form/form-detail/form-button/form-button.controller.ts +1 -0
  81. package/src/controller/control/form/form-detail/form-detail/form-detail.controller.ts +14 -0
  82. package/src/controller/control/form/form-detail/form-item/form-item.controller.ts +44 -0
  83. package/src/controller/control/panel/panel/panel-item.controller.ts +2 -1
  84. package/src/controller/utils/data-file-util/data-file-util.ts +16 -27
  85. package/src/install.ts +7 -1
  86. package/src/interface/controller/event/argument/form-detail.event.ts +51 -0
  87. package/src/interface/controller/event/argument/index.ts +3 -0
  88. package/src/interface/controller/event/argument/panel-item.event.ts +25 -1
  89. package/src/interface/controller/event/control/i-form.event.ts +14 -1
  90. package/src/interface/controller/event/view/i-map-view.event.ts +12 -0
  91. package/src/interface/controller/event/view/index.ts +1 -0
  92. package/src/interface/controller/state/view/i-map-view.state.ts +10 -0
  93. package/src/interface/controller/state/view/index.ts +1 -0
  94. package/src/interface/provider/i-async-action.provider.ts +29 -0
  95. package/src/interface/provider/index.ts +1 -0
  96. package/src/interface/service/service/i-async-action.service.ts +29 -0
  97. package/src/interface/service/service/index.ts +1 -0
  98. package/src/model/utils/util.ts +7 -4
  99. package/src/register/helper/async-action-register.ts +47 -0
  100. package/src/register/helper/index.ts +1 -0
  101. package/src/service/app-data-entity/app-data-entity.ts +3 -3
  102. package/src/service/dto/method.dto.ts +70 -26
  103. package/src/service/service/async-action/async-action.service.ts +37 -0
  104. package/src/service/service/index.ts +1 -0
  105. package/src/types.ts +10 -0
  106. package/src/utils/handlebars/handlebars.ts +3 -1
@@ -10,4 +10,5 @@ export type * from './i-editor.provider';
10
10
  export type * from './i-portlet.provider';
11
11
  export type { IAppCounterProvider } from './i-app-counter.provider';
12
12
  export type { IUILogicNodeProvider } from './i-ui-login-node.provider';
13
+ export type { IAsyncActionProvider } from './i-async-action.provider';
13
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interface/provider/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,cAAc,CAAC;AAClC,mBAAmB,wBAAwB,CAAC;AAC5C,YAAY,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,mBAAmB,mBAAmB,CAAC;AACvC,mBAAmB,sBAAsB,CAAC;AAC1C,mBAAmB,0BAA0B,CAAC;AAC9C,mBAAmB,yBAAyB,CAAC;AAC7C,mBAAmB,0BAA0B,CAAC;AAC9C,mBAAmB,qBAAqB,CAAC;AACzC,mBAAmB,sBAAsB,CAAC;AAC1C,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,YAAY,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interface/provider/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,cAAc,CAAC;AAClC,mBAAmB,wBAAwB,CAAC;AAC5C,YAAY,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,mBAAmB,mBAAmB,CAAC;AACvC,mBAAmB,sBAAsB,CAAC;AAC1C,mBAAmB,0BAA0B,CAAC;AAC9C,mBAAmB,yBAAyB,CAAC;AAC7C,mBAAmB,0BAA0B,CAAC;AAC9C,mBAAmB,qBAAqB,CAAC;AACzC,mBAAmB,sBAAsB,CAAC;AAC1C,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,YAAY,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AACvE,YAAY,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { IHttpResponse, IPortalAsyncAction } from '@ibiz-template/core';
2
+ /**
3
+ * 异步操作服务
4
+ *
5
+ * @author chitanda
6
+ * @date 2023-08-17 16:08:08
7
+ * @export
8
+ * @interface IAuthService
9
+ */
10
+ export interface IAsyncActionService {
11
+ /**
12
+ * 获取异步操作的集合
13
+ * @author lxm
14
+ * @date 2023-11-15 10:55:25
15
+ * @param {IParams} [params={}]
16
+ * @return {*} {Promise<IHttpResponse<IPortalAsyncAction[]>>}
17
+ */
18
+ fetch(params?: IParams): Promise<IHttpResponse<IPortalAsyncAction[]>>;
19
+ /**
20
+ * 获取单条异步操作
21
+ * @author lxm
22
+ * @date 2023-11-15 10:57:08
23
+ * @param {string} actionID
24
+ * @return {*} {Promise<IHttpResponse<IPortalAsyncAction[]>>}
25
+ */
26
+ get(actionID: string): Promise<IHttpResponse<IPortalAsyncAction[]>>;
27
+ }
28
+ //# sourceMappingURL=i-async-action.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i-async-action.service.d.ts","sourceRoot":"","sources":["../../../../src/interface/service/service/i-async-action.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAExE;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;;OAMG;IACH,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC;IAEtE;;;;;;OAMG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC;CACrE"}
@@ -4,4 +4,5 @@ export type { IAppDEService } from './i-app-de.service';
4
4
  export type { IAuthService } from './i-auth.service';
5
5
  export type { IFileService } from './i-file.service';
6
6
  export type { IWorkFlowService } from './i-wf.service';
7
+ export type { IAsyncActionService } from './i-async-action.service';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/interface/service/service/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAC3E,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/interface/service/service/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAC3E,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/model/utils/util.ts"],"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;;;;GAQG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,QAAQ,EACd,GAAG,EAAE,MAAM,GACV,WAAW,GAAG,SAAS,CAQzB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG;IACnE,gBAAgB,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,OAAO,CAAC;IACxB,KAAK,EAAE,OAAO,CAAC;CAChB,CAyBA;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,GAAG,YAAY,CAMvE"}
@@ -9,8 +9,13 @@
9
9
  * @return {*} {(IModelObject | null)}
10
10
  */
11
11
  export function findModelChild(models, id) {
12
- if (models) {
13
- const model = models.find(item => item.id.toLowerCase() === id.toLowerCase());
12
+ if (models && id) {
13
+ const model = models.find(item => {
14
+ if (item.id) {
15
+ return item.id.toLowerCase() === id.toLowerCase();
16
+ }
17
+ return false;
18
+ });
14
19
  if (model) {
15
20
  return model;
16
21
  }
@@ -0,0 +1,22 @@
1
+ import { IAsyncActionProvider } from '../../interface';
2
+ /** 界面行为适配器前缀 */
3
+ export declare const ASYNC_ACTION_PROVIDER_PREFIX = "ASYNC_ACTION";
4
+ /**
5
+ * 注册界面行为适配器
6
+ * @author lxm
7
+ * @date 2023-05-06 09:14:16
8
+ * @export
9
+ * @param {string} key
10
+ * @param {() => IAsyncActionProvider} callback 生成界面行为适配器的回调
11
+ */
12
+ export declare function registerAsyncActionProvider(key: string, callback: () => IAsyncActionProvider): void;
13
+ /**
14
+ * 获取界面行为适配器
15
+ * @author lxm
16
+ * @date 2023-05-06 09:29:23
17
+ * @export
18
+ * @param {IAppView} model
19
+ * @return {*} {Promise<IAsyncActionProvider>}
20
+ */
21
+ export declare function getAsyncActionProvider(actiontype: string): IAsyncActionProvider;
22
+ //# sourceMappingURL=async-action-register.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"async-action-register.d.ts","sourceRoot":"","sources":["../../../src/register/helper/async-action-register.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD,gBAAgB;AAChB,eAAO,MAAM,4BAA4B,iBAAiB,CAAC;AAE3D;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,oBAAoB,GACnC,IAAI,CAEN;AAQD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,MAAM,GACjB,oBAAoB,CAStB"}
@@ -0,0 +1,35 @@
1
+ import { RuntimeError } from '@ibiz-template/core';
2
+ /** 界面行为适配器前缀 */
3
+ export const ASYNC_ACTION_PROVIDER_PREFIX = 'ASYNC_ACTION';
4
+ /**
5
+ * 注册界面行为适配器
6
+ * @author lxm
7
+ * @date 2023-05-06 09:14:16
8
+ * @export
9
+ * @param {string} key
10
+ * @param {() => IAsyncActionProvider} callback 生成界面行为适配器的回调
11
+ */
12
+ export function registerAsyncActionProvider(key, callback) {
13
+ ibiz.register.register(`${ASYNC_ACTION_PROVIDER_PREFIX}_${key}`, callback);
14
+ }
15
+ function getProvider(key) {
16
+ return ibiz.register.get(`${ASYNC_ACTION_PROVIDER_PREFIX}_${key}`);
17
+ }
18
+ /**
19
+ * 获取界面行为适配器
20
+ * @author lxm
21
+ * @date 2023-05-06 09:29:23
22
+ * @export
23
+ * @param {IAppView} model
24
+ * @return {*} {Promise<IAsyncActionProvider>}
25
+ */
26
+ export function getAsyncActionProvider(actiontype) {
27
+ const provider = getProvider(actiontype);
28
+ // 找异步操作类型
29
+ if (!provider) {
30
+ throw new RuntimeError(`找不异步操作类型${actiontype}对应的适配器`);
31
+ }
32
+ else {
33
+ return provider;
34
+ }
35
+ }
@@ -8,4 +8,5 @@ export * from './portlet-register';
8
8
  export * from './ui-action-register';
9
9
  export * from './ui-logic-node-register';
10
10
  export * from './view-register';
11
+ export * from './async-action-register';
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/register/helper/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/register/helper/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC"}
@@ -8,3 +8,4 @@ export * from './portlet-register';
8
8
  export * from './ui-action-register';
9
9
  export * from './ui-logic-node-register';
10
10
  export * from './view-register';
11
+ export * from './async-action-register';
@@ -25,11 +25,11 @@ export declare class AppDataEntity implements IDataEntity {
25
25
  * Creates an instance of AppDataEntity.
26
26
  *
27
27
  * @author chitanda
28
- * @date 2022-10-11 21:10:21
28
+ * @date 2023-11-16 15:11:08
29
29
  * @param {IAppDataEntity} entity
30
- * @param {(IData | AppDataEntity)} data
30
+ * @param {(IData | AppDataEntity)} [data={}]
31
31
  */
32
- constructor(entity: IAppDataEntity, data: IData | AppDataEntity);
32
+ constructor(entity: IAppDataEntity, data?: IData | AppDataEntity);
33
33
  /**
34
34
  * 代理实际数据
35
35
  *
@@ -1 +1 @@
1
- {"version":3,"file":"app-data-entity.d.ts","sourceRoot":"","sources":["../../../src/service/app-data-entity/app-data-entity.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIlD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C;;;;;;;GAOG;AACH,qBAAa,aAAc,YAAW,WAAW;IAC/C,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG,CAAC;IAE5B,UAAkB,KAAK,EAAE,KAAK,CAAC;IAE/B,UAAkB,OAAO,EAAE,cAAc,CAAC;IAElC,OAAO,EAAE,MAAM,CAAC;IAEhB,aAAa,EAAE,MAAM,CAAC;IAEtB,WAAW,EAAE,MAAM,CAAC;IAEpB,aAAa,EAAE,MAAM,CAAC;IAEtB,MAAM,EAAE,MAAM,CAAC;IAEf,YAAY,EAAE,MAAM,CAAC;IAErB,UAAU,EAAE,MAAM,CAAC;IAE3B,IAAI,KAAK,IAAI,KAAK,CAEjB;IAED;;;;;;;OAOG;gBACS,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,KAAK,GAAG,aAAa;IAiF/D;;;;;;OAMG;IACH,SAAS,CAAC,gBAAgB,IAAI,IAAI;IAgClC;;;;;;OAMG;IACH,KAAK,IAAI,aAAa;IAMtB;;;;;;;OAOG;IACH,MAAM,CAAC,IAAI,EAAE,KAAK,GAAG,aAAa,GAAG,aAAa;IASlD;;;;;;;;OAQG;IACH,SAAS,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO;CAyB5E"}
1
+ {"version":3,"file":"app-data-entity.d.ts","sourceRoot":"","sources":["../../../src/service/app-data-entity/app-data-entity.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIlD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C;;;;;;;GAOG;AACH,qBAAa,aAAc,YAAW,WAAW;IAC/C,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG,CAAC;IAE5B,UAAkB,KAAK,EAAE,KAAK,CAAC;IAE/B,UAAkB,OAAO,EAAE,cAAc,CAAC;IAElC,OAAO,EAAE,MAAM,CAAC;IAEhB,aAAa,EAAE,MAAM,CAAC;IAEtB,WAAW,EAAE,MAAM,CAAC;IAEpB,aAAa,EAAE,MAAM,CAAC;IAEtB,MAAM,EAAE,MAAM,CAAC;IAEf,YAAY,EAAE,MAAM,CAAC;IAErB,UAAU,EAAE,MAAM,CAAC;IAE3B,IAAI,KAAK,IAAI,KAAK,CAEjB;IAED;;;;;;;OAOG;gBACS,MAAM,EAAE,cAAc,EAAE,IAAI,GAAE,KAAK,GAAG,aAAkB;IAiFpE;;;;;;OAMG;IACH,SAAS,CAAC,gBAAgB,IAAI,IAAI;IAgClC;;;;;;OAMG;IACH,KAAK,IAAI,aAAa;IAMtB;;;;;;;OAOG;IACH,MAAM,CAAC,IAAI,EAAE,KAAK,GAAG,aAAa,GAAG,aAAa;IASlD;;;;;;;;OAQG;IACH,SAAS,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO;CAyB5E"}
@@ -19,11 +19,11 @@ export class AppDataEntity {
19
19
  * Creates an instance of AppDataEntity.
20
20
  *
21
21
  * @author chitanda
22
- * @date 2022-10-11 21:10:21
22
+ * @date 2023-11-16 15:11:08
23
23
  * @param {IAppDataEntity} entity
24
- * @param {(IData | AppDataEntity)} data
24
+ * @param {(IData | AppDataEntity)} [data={}]
25
25
  */
26
- constructor(entity, data) {
26
+ constructor(entity, data = {}) {
27
27
  Object.defineProperty(this, '_entity', {
28
28
  enumerable: false,
29
29
  configurable: true,
@@ -17,6 +17,20 @@ export declare class MethodDto {
17
17
  protected fields: IAppDEMethodDTOField[];
18
18
  protected dtoMap: Map<string, MethodDto>;
19
19
  constructor(entity: IAppDataEntity, isLocalMode?: boolean | undefined, dto?: IAppDEMethodDTO | undefined);
20
+ /**
21
+ * 转换数组成ListMap
22
+ *
23
+ * @param {IData[]} arr
24
+ * @return {*} listMap
25
+ */
26
+ private convertArrayToListMap;
27
+ /**
28
+ * 转换ListMap成数组
29
+ *
30
+ * @param {listMap} obj
31
+ * @return {*} IData[]
32
+ */
33
+ private convertListMapToArray;
20
34
  /**
21
35
  * 请求参数组合 DTO
22
36
  *
@@ -1 +1 @@
1
- {"version":3,"file":"method.dto.d.ts","sourceRoot":"","sources":["../../../src/service/dto/method.dto.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,eAAe,EACf,oBAAoB,EACrB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAGnE;;;;;;;GAOG;AACH,qBAAa,SAAS;IAQlB,SAAS,CAAC,MAAM,EAAE,cAAc;IAChC,SAAS,CAAC,WAAW,CAAC;IACtB,SAAS,CAAC,GAAG,CAAC;IAThB,SAAS,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC;IAE5B,SAAS,CAAC,MAAM,EAAG,oBAAoB,EAAE,CAAC;IAE1C,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAa;gBAGzC,MAAM,EAAE,cAAc,EACtB,WAAW,CAAC,qBAAS,EACrB,GAAG,CAAC,6BAAiB;IAUjC;;;;;;;;OAQG;IACG,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;IA2CxD;;;;;;;;OAQG;IACG,IAAI,CAAC,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S,CAAC;CAgB7E"}
@@ -23,6 +23,33 @@ export class MethodDto {
23
23
  this.fields = [];
24
24
  }
25
25
  }
26
+ /**
27
+ * 转换数组成ListMap
28
+ *
29
+ * @param {IData[]} arr
30
+ * @return {*} listMap
31
+ */
32
+ convertArrayToListMap(arr) {
33
+ const result = {};
34
+ arr.forEach((obj, index) => {
35
+ result[index + 1] = obj;
36
+ });
37
+ return result;
38
+ }
39
+ /**
40
+ * 转换ListMap成数组
41
+ *
42
+ * @param {listMap} obj
43
+ * @return {*} IData[]
44
+ */
45
+ convertListMapToArray(obj) {
46
+ const result = [];
47
+ Object.keys(obj).forEach(key => {
48
+ const index = parseInt(key, 10);
49
+ result[index - 1] = obj[index];
50
+ });
51
+ return result;
52
+ }
26
53
  /**
27
54
  * 请求参数组合 DTO
28
55
  *
@@ -43,22 +70,30 @@ export class MethodDto {
43
70
  break;
44
71
  }
45
72
  case 'DTOS': {
46
- if (data[key] !== undefined) {
47
- break;
48
- }
49
- // 没有实体id的不处理
50
- if (!field.refAppDataEntityId) {
51
- break;
73
+ if (field.listMap) {
74
+ params[key] =
75
+ data[key] && data[key].length > 0
76
+ ? this.convertArrayToListMap(data[key])
77
+ : null;
52
78
  }
53
- const dto = await this.getFieldDto(field);
54
- const service = await this.app.deService.getService(field.refAppDataEntityId);
55
- const items = service.local.getList(context);
56
- if (items) {
57
- const arr = [];
58
- for (let j = 0; j < items.length; j++) {
59
- arr.push(await dto.get(context, items[j]));
79
+ else {
80
+ if (data[key] !== undefined) {
81
+ break;
82
+ }
83
+ // 没有实体id的不处理
84
+ if (!field.refAppDataEntityId) {
85
+ break;
86
+ }
87
+ const dto = await this.getFieldDto(field);
88
+ const service = await this.app.deService.getService(field.refAppDataEntityId);
89
+ const items = service.local.getList(context);
90
+ if (items) {
91
+ const arr = [];
92
+ for (let j = 0; j < items.length; j++) {
93
+ arr.push(await dto.get(context, items[j]));
94
+ }
95
+ params[key] = arr;
60
96
  }
61
- params[key] = arr;
62
97
  }
63
98
  break;
64
99
  }
@@ -87,18 +122,23 @@ export class MethodDto {
87
122
  const all = this.fields
88
123
  .filter(field => field.type === 'DTOS')
89
124
  .map(async (field) => {
90
- // 没有实体id的不处理
91
- if (!field.refAppDataEntityId) {
92
- return;
93
- }
94
125
  const key = field.codeName.toLowerCase();
95
- const dto = await this.getFieldDto(field);
96
- const items = datum[key];
97
- if (items) {
98
- await dto.sets(context, items);
126
+ if (field.listMap && typeof datum[key] === 'object') {
127
+ datum[key] = this.convertListMapToArray(datum[key]);
99
128
  }
100
129
  else {
101
- await dto.sets(context, []);
130
+ // 没有实体id的不处理
131
+ if (!field.refAppDataEntityId) {
132
+ return;
133
+ }
134
+ const dto = await this.getFieldDto(field);
135
+ const items = datum[key];
136
+ if (items) {
137
+ await dto.sets(context, items);
138
+ }
139
+ else {
140
+ await dto.sets(context, []);
141
+ }
102
142
  }
103
143
  });
104
144
  for (let i = 0; i < all.length; i++) {
@@ -0,0 +1,28 @@
1
+ import { IHttpResponse, IPortalAsyncAction } from '@ibiz-template/core';
2
+ import { IAsyncActionService } from '../../../interface';
3
+ /**
4
+ * 异步操作服务
5
+ * @author lxm
6
+ * @date 2023-11-15 10:52:06
7
+ * @export
8
+ * @class AsyncActionService
9
+ */
10
+ export declare class AsyncActionService implements IAsyncActionService {
11
+ /**
12
+ * 获取异步操作的集合
13
+ * @author lxm
14
+ * @date 2023-11-15 10:55:25
15
+ * @param {IParams} [params={}]
16
+ * @return {*} {Promise<IHttpResponse<IPortalAsyncAction[]>>}
17
+ */
18
+ fetch(params?: IParams): Promise<IHttpResponse<IPortalAsyncAction[]>>;
19
+ /**
20
+ * 获取单条异步操作
21
+ * @author lxm
22
+ * @date 2023-11-15 10:57:08
23
+ * @param {string} actionID
24
+ * @return {*} {Promise<IHttpResponse<IPortalAsyncAction[]>>}
25
+ */
26
+ get(actionID: string): Promise<IHttpResponse<IPortalAsyncAction[]>>;
27
+ }
28
+ //# sourceMappingURL=async-action.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"async-action.service.d.ts","sourceRoot":"","sources":["../../../../src/service/service/async-action/async-action.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD;;;;;;GAMG;AACH,qBAAa,kBAAmB,YAAW,mBAAmB;IAC5D;;;;;;OAMG;IACG,KAAK,CACT,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,aAAa,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAK/C;;;;;;OAMG;IACG,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,kBAAkB,EAAE,CAAC,CAAC;CAI1E"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * 异步操作服务
3
+ * @author lxm
4
+ * @date 2023-11-15 10:52:06
5
+ * @export
6
+ * @class AsyncActionService
7
+ */
8
+ export class AsyncActionService {
9
+ /**
10
+ * 获取异步操作的集合
11
+ * @author lxm
12
+ * @date 2023-11-15 10:55:25
13
+ * @param {IParams} [params={}]
14
+ * @return {*} {Promise<IHttpResponse<IPortalAsyncAction[]>>}
15
+ */
16
+ async fetch(params = {}) {
17
+ const res = await ibiz.net.post('/portal/asyncaction/all', params);
18
+ return res;
19
+ }
20
+ /**
21
+ * 获取单条异步操作
22
+ * @author lxm
23
+ * @date 2023-11-15 10:57:08
24
+ * @param {string} actionID
25
+ * @return {*} {Promise<IHttpResponse<IPortalAsyncAction[]>>}
26
+ */
27
+ async get(actionID) {
28
+ const res = await ibiz.net.get(`/portal/asyncaction/${actionID}`);
29
+ return res;
30
+ }
31
+ }
@@ -6,4 +6,5 @@ export { WorkFlowService } from './work-flow/work-flow.service';
6
6
  export * from './control';
7
7
  export * from './authority';
8
8
  export { V7AuthService } from './auth/v7-auth.service';
9
+ export { AsyncActionService } from './async-action/async-action.service';
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/service/service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/service/service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC"}
@@ -6,3 +6,4 @@ export { WorkFlowService } from './work-flow/work-flow.service';
6
6
  export * from './control';
7
7
  export * from './authority';
8
8
  export { V7AuthService } from './auth/v7-auth.service';
9
+ export { AsyncActionService } from './async-action/async-action.service';
package/out/types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { I18n } from '@ibiz-template/core/src/interface';
2
2
  import { EngineFactory } from './engine';
3
3
  import { GlobalUtil } from './global';
4
- import { IMessageUtil, INotificationUtil, IOpenViewUtil, IModalUtil, IConfirmUtil, ILoadingUtil, IPluginFactory, IOverlayController, IGlobalConfig, IAppHubService, IAuthService } from './interface';
4
+ import { IMessageUtil, INotificationUtil, IOpenViewUtil, IModalUtil, IConfirmUtil, ILoadingUtil, IPluginFactory, IOverlayController, IGlobalConfig, IAppHubService, IAuthService, IAsyncActionService } from './interface';
5
5
  import { LogicSchedulerCenter } from './logic-scheduler';
6
6
  import { RegisterCenter } from './register/register-center';
7
7
  declare module '@ibiz-template/core' {
@@ -107,6 +107,14 @@ declare module '@ibiz-template/core' {
107
107
  * @type {IAuthService}
108
108
  */
109
109
  auth: IAuthService;
110
+ /**
111
+ * 异步操作服务
112
+ *
113
+ * @author chitanda
114
+ * @date 2022-07-20 10:07:33
115
+ * @type {IAuthService}
116
+ */
117
+ asyncAction: IAsyncActionService;
110
118
  /**
111
119
  * 引擎工厂
112
120
  * @author lxm
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mCAAmC,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,YAAY,EACb,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,OAAO;QACf;;;;;;WAMG;QACH,OAAO,EAAE,YAAY,CAAC;QAEtB;;;;;;WAMG;QACH,GAAG,EAAE,cAAc,CAAC;QAEpB;;;;;;;WAOG;QACH,KAAK,EAA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,IAAI,CAAQ;IAE5C;;;;;;;OAOG;IACH,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED;;;;;;OAMG;IACG,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC;IAc9B;;;;;;;;OAQG;IACG,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC;IAQ5D;;;;;;;;;OASG;IACH,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,GAAG,MAAM;CAOlD"}
1
+ {"version":3,"file":"handlebars.d.ts","sourceRoot":"","sources":["../../../src/utils/handlebars/handlebars.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,qBAAa,cAAc;IAEzB,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC;IAEnB;;;;;;;OAOG;IACH,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,CAAQ;IAE5C;;;;;;;OAOG;IACH,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED;;;;;;OAMG;IACG,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC;IAgB9B;;;;;;;;OAQG;IACG,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC;IAQ5D;;;;;;;;;OASG;IACH,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,GAAG,MAAM;CAOlD"}
@@ -45,7 +45,9 @@ export class HandlebarsUtil {
45
45
  return this.p;
46
46
  }
47
47
  this.p = import('handlebars');
48
- this.hsb = await this.p;
48
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
49
+ const module = (await this.p);
50
+ this.hsb = module.default || module;
49
51
  this.p = null;
50
52
  installHelpers(this.hsb);
51
53
  return this.hsb;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template/runtime",
3
- "version": "0.2.18-dev.1",
3
+ "version": "0.2.18",
4
4
  "description": "控制器包",
5
5
  "type": "module",
6
6
  "main": "out/index.js",
@@ -29,7 +29,7 @@
29
29
  "author": "chitanda",
30
30
  "license": "MIT",
31
31
  "devDependencies": {
32
- "@ibiz-template/core": "^0.2.18-dev.1",
32
+ "@ibiz-template/core": "^0.2.18",
33
33
  "@ibiz/model-core": "^0.0.20",
34
34
  "@types/path-browserify": "^1.0.2",
35
35
  "@types/qs": "^6.9.10",
@@ -59,5 +59,5 @@
59
59
  "qx-util": "^0.4.8",
60
60
  "ramda": "^0.29.0"
61
61
  },
62
- "gitHead": "a097e3cf18cdf9e3e04767d441f101f330eab149"
62
+ "gitHead": "90638f0e02996149d42c3b8e610fe0697121251e"
63
63
  }
@@ -137,6 +137,15 @@ export abstract class FormController<
137
137
  },
138
138
  200,
139
139
  );
140
+
141
+ // 监听表单成员事件,触发对应部件逻辑
142
+ this._evt.on('onFormDetailEvent', event => {
143
+ this.scheduler?.triggerControlEvent(
144
+ event.formDetailName,
145
+ event.formDetailEventName,
146
+ event,
147
+ );
148
+ });
140
149
  }
141
150
 
142
151
  /**
@@ -48,6 +48,7 @@ export class FormButtonController extends FormDetailController<IDEFormButton> {
48
48
  } finally {
49
49
  this.state.loading = false;
50
50
  }
51
+ super.onClick(event);
51
52
  }
52
53
 
53
54
  /**
@@ -3,6 +3,7 @@ import { IDEFormDetail } from '@ibiz/model-core';
3
3
  import {
4
4
  IFormDetailController,
5
5
  IFormDetailContainerController,
6
+ FormDetailEventName,
6
7
  } from '../../../../../interface';
7
8
  import { calcLayoutHeightWidth, calcDynaClass } from '../../../../../model';
8
9
  import { verifyFormGroupLogic } from '../../../../../utils';
@@ -354,4 +355,17 @@ export class FormDetailController<T extends IDEFormDetail = IDEFormDetail>
354
355
  this.state.required = required;
355
356
  }
356
357
  }
358
+
359
+ /**
360
+ * 点击事件
361
+ * @author lxm
362
+ * @date 2023-10-11 05:03:26
363
+ */
364
+ async onClick(event?: MouseEvent): Promise<void> {
365
+ this.form.evt.emit('onFormDetailEvent', {
366
+ formDetailName: this.model.id!,
367
+ formDetailEventName: FormDetailEventName.CLICK,
368
+ event,
369
+ });
370
+ }
357
371
  }
@@ -7,6 +7,7 @@ import { FormController } from '../../form/form.controller';
7
7
  import { FormDetailController } from '../form-detail/form-detail.controller';
8
8
  import { FormItemState } from './form-item.state';
9
9
  import {
10
+ FormDetailEventName,
10
11
  IEditorContainerController,
11
12
  IEditorController,
12
13
  IEditorProvider,
@@ -344,6 +345,10 @@ export class FormItemController
344
345
  async setDataValue(value: unknown, name?: string): Promise<void> {
345
346
  name = name || this.name;
346
347
  await this.form.setDataValue(name, value);
348
+ this.form.evt.emit('onFormDetailEvent', {
349
+ formDetailName: this.model.id!,
350
+ formDetailEventName: FormDetailEventName.CHANGE,
351
+ });
347
352
  }
348
353
 
349
354
  /**
@@ -371,4 +376,43 @@ export class FormItemController
371
376
  data[this.name] = defaultVal;
372
377
  }
373
378
  }
379
+
380
+ /**
381
+ * 聚焦事件
382
+ * @author lxm
383
+ * @date 2023-10-11 05:03:26
384
+ */
385
+ onFocus(event: MouseEvent): void {
386
+ this.form.evt.emit('onFormDetailEvent', {
387
+ formDetailName: this.model.id!,
388
+ formDetailEventName: FormDetailEventName.FOCUS,
389
+ event,
390
+ });
391
+ }
392
+
393
+ /**
394
+ * 失焦事件
395
+ * @author lxm
396
+ * @date 2023-10-11 05:03:26
397
+ */
398
+ onBlur(event: MouseEvent): void {
399
+ this.form.evt.emit('onFormDetailEvent', {
400
+ formDetailName: this.model.id!,
401
+ formDetailEventName: FormDetailEventName.BLUR,
402
+ event,
403
+ });
404
+ }
405
+
406
+ /**
407
+ * 回车事件
408
+ * @author lxm
409
+ * @date 2023-10-11 05:03:26
410
+ */
411
+ onEnter(event: MouseEvent): void {
412
+ this.form.evt.emit('onFormDetailEvent', {
413
+ formDetailName: this.model.id!,
414
+ formDetailEventName: FormDetailEventName.ENTER,
415
+ event,
416
+ });
417
+ }
374
418
  }
@@ -5,6 +5,7 @@ import {
5
5
  IPanelController,
6
6
  IPanelDataContainerController,
7
7
  IPanelItemState,
8
+ PanelItemEventName,
8
9
  } from '../../../../interface';
9
10
  import { calcLayoutHeightWidth, calcDynaClass } from '../../../../model';
10
11
  import { verifyPanelGroupLogic } from '../../../../utils';
@@ -362,7 +363,7 @@ export class PanelItemController<T extends IPanelItem = IPanelItem>
362
363
  onClick(): void {
363
364
  this.panel.evt.emit('onPanelItemEvent', {
364
365
  panelItemName: this.model.id!,
365
- panelItemEventName: 'onClick',
366
+ panelItemEventName: PanelItemEventName.CLICK,
366
367
  });
367
368
  }
368
369
  }