@ibiz-template/runtime 0.0.1-beta.1 → 0.0.1-beta.130

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 (186) hide show
  1. package/dist/system/index.system.js +1 -1
  2. package/out/command/app/app-func/app-func.d.ts +10 -11
  3. package/out/command/app/app-func/app-func.d.ts.map +1 -1
  4. package/out/command/app/app-func/app-func.js +19 -20
  5. package/out/command/app/open-app-view/open-app-view.d.ts +12 -13
  6. package/out/command/app/open-app-view/open-app-view.d.ts.map +1 -1
  7. package/out/command/app/open-app-view/open-app-view.js +6 -6
  8. package/out/config/global-config.d.ts +18 -0
  9. package/out/config/global-config.d.ts.map +1 -0
  10. package/out/config/global-config.js +18 -0
  11. package/out/index.d.ts +1 -0
  12. package/out/index.d.ts.map +1 -1
  13. package/out/index.js +1 -0
  14. package/out/install.d.ts.map +1 -1
  15. package/out/install.js +6 -0
  16. package/out/interface/i-global-config/i-global-config.d.ts +62 -0
  17. package/out/interface/i-global-config/i-global-config.d.ts.map +1 -0
  18. package/out/interface/i-global-config/i-global-config.js +1 -0
  19. package/out/interface/i-modal/i-modal.d.ts +7 -0
  20. package/out/interface/i-modal/i-modal.d.ts.map +1 -1
  21. package/out/interface/i-modal-options/i-modal-options.d.ts +8 -0
  22. package/out/interface/i-modal-options/i-modal-options.d.ts.map +1 -1
  23. package/out/interface/i-plugin-factory/i-plugin-factory.d.ts +32 -5
  24. package/out/interface/i-plugin-factory/i-plugin-factory.d.ts.map +1 -1
  25. package/out/interface/i-plugin-item/i-plugin-item.d.ts +28 -0
  26. package/out/interface/i-plugin-item/i-plugin-item.d.ts.map +1 -0
  27. package/out/interface/i-plugin-item/i-plugin-item.js +1 -0
  28. package/out/interface/i-ui-action-handler/i-ui-action-handler.d.ts +2 -3
  29. package/out/interface/i-ui-action-handler/i-ui-action-handler.d.ts.map +1 -1
  30. package/out/interface/i-ui-action-result/i-ui-action-result.d.ts +17 -0
  31. package/out/interface/i-ui-action-result/i-ui-action-result.d.ts.map +1 -1
  32. package/out/interface/i-ui-logic-params/i-ui-logic-params.d.ts +31 -0
  33. package/out/interface/i-ui-logic-params/i-ui-logic-params.d.ts.map +1 -0
  34. package/out/interface/i-ui-logic-params/i-ui-logic-params.js +1 -0
  35. package/out/interface/index.d.ts +4 -0
  36. package/out/interface/index.d.ts.map +1 -1
  37. package/out/interface/index.js +1 -0
  38. package/out/interface/logic-scheduler/i-scheduler-logic.d.ts +35 -0
  39. package/out/interface/logic-scheduler/i-scheduler-logic.d.ts.map +1 -0
  40. package/out/interface/logic-scheduler/i-scheduler-logic.js +1 -0
  41. package/out/interface/logic-scheduler/i-trigger-match-params.d.ts +17 -0
  42. package/out/interface/logic-scheduler/i-trigger-match-params.d.ts.map +1 -0
  43. package/out/interface/logic-scheduler/i-trigger-match-params.js +1 -0
  44. package/out/interface/logic-scheduler/index.d.ts +3 -0
  45. package/out/interface/logic-scheduler/index.d.ts.map +1 -0
  46. package/out/interface/logic-scheduler/index.js +1 -0
  47. package/out/interface/util/i-modal-util/i-modal-util.d.ts +8 -0
  48. package/out/interface/util/i-modal-util/i-modal-util.d.ts.map +1 -1
  49. package/out/interface/util/i-open-view-util/i-open-view-util.d.ts +10 -11
  50. package/out/interface/util/i-open-view-util/i-open-view-util.d.ts.map +1 -1
  51. package/out/logic-scheduler/executor/logic-executor-factory.d.ts +34 -0
  52. package/out/logic-scheduler/executor/logic-executor-factory.d.ts.map +1 -0
  53. package/out/logic-scheduler/executor/logic-executor-factory.js +42 -0
  54. package/out/logic-scheduler/executor/logic-executor.d.ts +32 -0
  55. package/out/logic-scheduler/executor/logic-executor.d.ts.map +1 -0
  56. package/out/logic-scheduler/executor/logic-executor.js +30 -0
  57. package/out/logic-scheduler/executor/script-executor.d.ts +39 -0
  58. package/out/logic-scheduler/executor/script-executor.d.ts.map +1 -0
  59. package/out/logic-scheduler/executor/script-executor.js +53 -0
  60. package/out/logic-scheduler/index.d.ts +12 -0
  61. package/out/logic-scheduler/index.d.ts.map +1 -0
  62. package/out/logic-scheduler/index.js +17 -0
  63. package/out/logic-scheduler/logic-scheduler-center.d.ts +45 -0
  64. package/out/logic-scheduler/logic-scheduler-center.d.ts.map +1 -0
  65. package/out/logic-scheduler/logic-scheduler-center.js +49 -0
  66. package/out/logic-scheduler/scheduler/control-logic-scheduler.d.ts +14 -0
  67. package/out/logic-scheduler/scheduler/control-logic-scheduler.d.ts.map +1 -0
  68. package/out/logic-scheduler/scheduler/control-logic-scheduler.js +16 -0
  69. package/out/logic-scheduler/scheduler/logic-scheduler.d.ts +105 -0
  70. package/out/logic-scheduler/scheduler/logic-scheduler.d.ts.map +1 -0
  71. package/out/logic-scheduler/scheduler/logic-scheduler.js +148 -0
  72. package/out/logic-scheduler/scheduler/view-logic-scheduler.d.ts +14 -0
  73. package/out/logic-scheduler/scheduler/view-logic-scheduler.d.ts.map +1 -0
  74. package/out/logic-scheduler/scheduler/view-logic-scheduler.js +14 -0
  75. package/out/logic-scheduler/trigger/item-dyna-logic-trigger.d.ts +12 -0
  76. package/out/logic-scheduler/trigger/item-dyna-logic-trigger.d.ts.map +1 -0
  77. package/out/logic-scheduler/trigger/item-dyna-logic-trigger.js +26 -0
  78. package/out/logic-scheduler/trigger/logic-trigger-factory.d.ts +34 -0
  79. package/out/logic-scheduler/trigger/logic-trigger-factory.d.ts.map +1 -0
  80. package/out/logic-scheduler/trigger/logic-trigger-factory.js +42 -0
  81. package/out/logic-scheduler/trigger/logic-trigger.d.ts +55 -0
  82. package/out/logic-scheduler/trigger/logic-trigger.d.ts.map +1 -0
  83. package/out/logic-scheduler/trigger/logic-trigger.js +52 -0
  84. package/out/plugin/plugin-static-resource/plugin-static-resource.d.ts +18 -0
  85. package/out/plugin/plugin-static-resource/plugin-static-resource.d.ts.map +1 -1
  86. package/out/plugin/plugin-static-resource/plugin-static-resource.js +36 -0
  87. package/out/plugin/remote-plugin-item/remote-plugin-item.d.ts +12 -3
  88. package/out/plugin/remote-plugin-item/remote-plugin-item.d.ts.map +1 -1
  89. package/out/plugin/remote-plugin-item/remote-plugin-item.js +5 -3
  90. package/out/provider/ui-action/index.d.ts +2 -1
  91. package/out/provider/ui-action/index.d.ts.map +1 -1
  92. package/out/provider/ui-action/index.js +5 -1
  93. package/out/provider/ui-action/wf-withdraw-ui-action-provider.d.ts +15 -0
  94. package/out/provider/ui-action/wf-withdraw-ui-action-provider.d.ts.map +1 -0
  95. package/out/provider/ui-action/wf-withdraw-ui-action-provider.js +18 -0
  96. package/out/types.d.ts +17 -1
  97. package/out/types.d.ts.map +1 -1
  98. package/out/utils/app-de-ui-action-util/app-de-ui-action-util.d.ts +2 -3
  99. package/out/utils/app-de-ui-action-util/app-de-ui-action-util.d.ts.map +1 -1
  100. package/out/utils/app-de-ui-action-util/app-de-ui-action-util.js +1 -1
  101. package/out/utils/app-de-ui-action-util/handler/backend-ui-action-handler.d.ts +1 -2
  102. package/out/utils/app-de-ui-action-util/handler/backend-ui-action-handler.d.ts.map +1 -1
  103. package/out/utils/app-de-ui-action-util/handler/backend-ui-action-handler.js +7 -4
  104. package/out/utils/app-de-ui-action-util/handler/common-sys-ui-action-handler.d.ts +1 -2
  105. package/out/utils/app-de-ui-action-util/handler/common-sys-ui-action-handler.d.ts.map +1 -1
  106. package/out/utils/app-de-ui-action-util/handler/common-sys-ui-action-handler.js +1 -1
  107. package/out/utils/app-de-ui-action-util/handler/front-ui-action-handler.d.ts +1 -2
  108. package/out/utils/app-de-ui-action-util/handler/front-ui-action-handler.d.ts.map +1 -1
  109. package/out/utils/app-de-ui-action-util/handler/front-ui-action-handler.js +31 -8
  110. package/out/utils/app-de-ui-action-util/handler/index.d.ts +1 -0
  111. package/out/utils/app-de-ui-action-util/handler/index.d.ts.map +1 -1
  112. package/out/utils/app-de-ui-action-util/handler/index.js +1 -0
  113. package/out/utils/app-de-ui-action-util/handler/ui-action-handler.d.ts +10 -20
  114. package/out/utils/app-de-ui-action-util/handler/ui-action-handler.d.ts.map +1 -1
  115. package/out/utils/app-de-ui-action-util/handler/ui-action-handler.js +82 -59
  116. package/out/utils/app-de-ui-action-util/handler/wf-withdraw-handler.d.ts +16 -0
  117. package/out/utils/app-de-ui-action-util/handler/wf-withdraw-handler.d.ts.map +1 -0
  118. package/out/utils/app-de-ui-action-util/handler/wf-withdraw-handler.js +27 -0
  119. package/out/utils/index.d.ts +3 -1
  120. package/out/utils/index.d.ts.map +1 -1
  121. package/out/utils/index.js +3 -1
  122. package/out/utils/nav-params/calc-nav-params.d.ts +29 -0
  123. package/out/utils/nav-params/calc-nav-params.d.ts.map +1 -0
  124. package/out/utils/nav-params/calc-nav-params.js +34 -0
  125. package/out/utils/nav-params/nav-params.d.ts +20 -1
  126. package/out/utils/nav-params/nav-params.d.ts.map +1 -1
  127. package/out/utils/nav-params/nav-params.js +58 -4
  128. package/out/utils/open-redirect-view/open-redirect-view.d.ts +19 -8
  129. package/out/utils/open-redirect-view/open-redirect-view.d.ts.map +1 -1
  130. package/out/utils/open-redirect-view/open-redirect-view.js +107 -14
  131. package/out/utils/wf-helper/wf-helper.d.ts +9 -0
  132. package/out/utils/wf-helper/wf-helper.d.ts.map +1 -0
  133. package/out/utils/wf-helper/wf-helper.js +14 -0
  134. package/out/view-logic/view-logic.d.ts +6 -7
  135. package/out/view-logic/view-logic.d.ts.map +1 -1
  136. package/out/view-logic/view-logic.js +102 -29
  137. package/package.json +14 -13
  138. package/src/command/app/app-func/app-func.ts +24 -24
  139. package/src/command/app/open-app-view/open-app-view.ts +12 -13
  140. package/src/config/global-config.ts +22 -0
  141. package/src/index.ts +1 -0
  142. package/src/install.ts +6 -0
  143. package/src/interface/i-global-config/i-global-config.ts +65 -0
  144. package/src/interface/i-modal/i-modal.ts +8 -0
  145. package/src/interface/i-modal-options/i-modal-options.ts +9 -0
  146. package/src/interface/i-plugin-factory/i-plugin-factory.ts +32 -5
  147. package/src/interface/i-plugin-item/i-plugin-item.ts +27 -0
  148. package/src/interface/i-ui-action-handler/i-ui-action-handler.ts +2 -3
  149. package/src/interface/i-ui-action-result/i-ui-action-result.ts +20 -0
  150. package/src/interface/i-ui-logic-params/i-ui-logic-params.ts +31 -0
  151. package/src/interface/index.ts +5 -0
  152. package/src/interface/logic-scheduler/i-scheduler-logic.ts +58 -0
  153. package/src/interface/logic-scheduler/i-trigger-match-params.ts +18 -0
  154. package/src/interface/logic-scheduler/index.ts +7 -0
  155. package/src/interface/util/i-modal-util/i-modal-util.ts +8 -0
  156. package/src/interface/util/i-open-view-util/i-open-view-util.ts +10 -11
  157. package/src/logic-scheduler/executor/logic-executor-factory.ts +48 -0
  158. package/src/logic-scheduler/executor/logic-executor.ts +43 -0
  159. package/src/logic-scheduler/executor/script-executor.ts +63 -0
  160. package/src/logic-scheduler/index.ts +41 -0
  161. package/src/logic-scheduler/logic-scheduler-center.ts +52 -0
  162. package/src/logic-scheduler/scheduler/control-logic-scheduler.ts +21 -0
  163. package/src/logic-scheduler/scheduler/logic-scheduler.ts +192 -0
  164. package/src/logic-scheduler/scheduler/view-logic-scheduler.ts +17 -0
  165. package/src/logic-scheduler/trigger/item-dyna-logic-trigger.ts +41 -0
  166. package/src/logic-scheduler/trigger/logic-trigger-factory.ts +48 -0
  167. package/src/logic-scheduler/trigger/logic-trigger.ts +77 -0
  168. package/src/plugin/plugin-static-resource/plugin-static-resource.ts +38 -0
  169. package/src/plugin/remote-plugin-item/remote-plugin-item.ts +14 -3
  170. package/src/provider/ui-action/index.ts +6 -0
  171. package/src/provider/ui-action/wf-withdraw-ui-action-provider.ts +22 -0
  172. package/src/types.ts +19 -0
  173. package/src/utils/app-de-ui-action-util/app-de-ui-action-util.ts +2 -3
  174. package/src/utils/app-de-ui-action-util/handler/backend-ui-action-handler.ts +13 -5
  175. package/src/utils/app-de-ui-action-util/handler/common-sys-ui-action-handler.ts +2 -3
  176. package/src/utils/app-de-ui-action-util/handler/front-ui-action-handler.ts +46 -23
  177. package/src/utils/app-de-ui-action-util/handler/index.ts +1 -0
  178. package/src/utils/app-de-ui-action-util/handler/ui-action-handler.ts +113 -75
  179. package/src/utils/app-de-ui-action-util/handler/wf-withdraw-handler.ts +36 -0
  180. package/src/utils/index.ts +6 -1
  181. package/src/utils/nav-params/calc-nav-params.ts +59 -0
  182. package/src/utils/nav-params/nav-params.ts +66 -5
  183. package/src/utils/open-redirect-view/open-redirect-view.ts +142 -14
  184. package/src/utils/wf-helper/wf-helper.ts +14 -0
  185. package/src/view-logic/view-logic.ts +111 -31
  186. package/LICENSE +0 -21
@@ -1,4 +1,3 @@
1
- import { IBizContext } from '@ibiz-template/core';
2
1
  import { IPSAppRedirectView, IPSAppView } from '@ibiz-template/model';
3
2
  import { IModalData } from '../../../interface';
4
3
  import { openRedirectView } from '../../../utils';
@@ -24,14 +23,14 @@ export class OpenAppViewCommand {
24
23
  * @author chitanda
25
24
  * @date 2022-08-25 23:08:08
26
25
  * @param {IPSAppView} appView
27
- * @param {IBizContext} [context]
26
+ * @param {IContext} [context]
28
27
  * @param {IParams} [params={}]
29
28
  * @param {IData} [_opts={}]
30
29
  * @return {*} {(Promise<IModalData | void>)}
31
30
  */
32
31
  async exec(
33
32
  appView: IPSAppView,
34
- context?: IBizContext,
33
+ context: IContext,
35
34
  params: IParams = {},
36
35
  opts: IData = {},
37
36
  ): Promise<IModalData | void> {
@@ -75,12 +74,12 @@ export class OpenAppViewCommand {
75
74
  * @date 2022-07-25 20:07:43
76
75
  * @protected
77
76
  * @param {IPSAppView} appView
78
- * @param {IBizContext} [context]
77
+ * @param {IContext} [context]
79
78
  * @param {IParams} [params={}]
80
79
  */
81
80
  protected openIndexViewTab(
82
81
  appView: IPSAppView,
83
- context?: IBizContext,
82
+ context: IContext,
84
83
  params: IParams = {},
85
84
  ): void {
86
85
  return ibiz.openView.root(appView, context, params);
@@ -93,13 +92,13 @@ export class OpenAppViewCommand {
93
92
  * @date 2022-07-25 20:07:55
94
93
  * @protected
95
94
  * @param {IPSAppView} appView
96
- * @param {IBizContext} [context]
95
+ * @param {IContext} [context]
97
96
  * @param {IParams} [params={}]
98
97
  * @return {*} {Promise<IModalData>}
99
98
  */
100
99
  protected async openModal(
101
100
  appView: IPSAppView,
102
- context?: IBizContext,
101
+ context: IContext,
103
102
  params: IParams = {},
104
103
  ): Promise<IModalData> {
105
104
  return ibiz.openView.modal(appView, context, params);
@@ -112,14 +111,14 @@ export class OpenAppViewCommand {
112
111
  * @date 2022-07-25 20:07:17
113
112
  * @protected
114
113
  * @param {IPSAppView} appView
115
- * @param {IBizContext} [context]
114
+ * @param {IContext} [context]
116
115
  * @param {IParams} [params={}]
117
116
  * @return {*} {Promise<IModalData>}
118
117
  */
119
118
  protected async openPopover(
120
119
  appView: IPSAppView,
121
120
  event: MouseEvent,
122
- context?: IBizContext,
121
+ context: IContext,
123
122
  params: IParams = {},
124
123
  ): Promise<IModalData> {
125
124
  return ibiz.openView.popover(appView, event, context, params);
@@ -132,13 +131,13 @@ export class OpenAppViewCommand {
132
131
  * @date 2022-07-25 20:07:08
133
132
  * @protected
134
133
  * @param {IPSAppView} appView
135
- * @param {IBizContext} [context]
134
+ * @param {IContext} [context]
136
135
  * @param {IParams} [params={}]
137
136
  * @return {*} {Promise<void>}
138
137
  */
139
138
  protected async openDrawer(
140
139
  appView: IPSAppView,
141
- context?: IBizContext,
140
+ context: IContext,
142
141
  params: IParams = {},
143
142
  ): Promise<IModalData> {
144
143
  return ibiz.openView.drawer(appView, context, params);
@@ -151,13 +150,13 @@ export class OpenAppViewCommand {
151
150
  * @date 2022-07-25 20:07:41
152
151
  * @protected
153
152
  * @param {IPSAppView} appView
154
- * @param {IBizContext} [context]
153
+ * @param {IContext} [context]
155
154
  * @param {IParams} [params={}]
156
155
  * @return {*} {Promise<void>}
157
156
  */
158
157
  protected async openUserCustom(
159
158
  appView: IPSAppView,
160
- context?: IBizContext,
159
+ context: IContext,
161
160
  params: IParams = {},
162
161
  ): Promise<IModalData> {
163
162
  return ibiz.openView.custom(appView, context, params);
@@ -0,0 +1,22 @@
1
+ import { IGlobalConfig } from '../interface/i-global-config/i-global-config';
2
+
3
+ /**
4
+ * 全局配置类,控制应用的功能开关。
5
+ *
6
+ * @author lxm
7
+ * @date 2022-12-09 14:12:28
8
+ * @export
9
+ * @class GlobalConfig
10
+ * @implements {IGlobalConfig}
11
+ */
12
+ export class GlobalConfig implements IGlobalConfig {
13
+ enableDataInfoBar: boolean = true;
14
+
15
+ defaultCodeListCacheTimeout: number = 3600000;
16
+
17
+ gridEditShowMode: 'cell' | 'row' | 'all' = 'cell';
18
+
19
+ gridEditSaveMode: 'cell-blur' | 'auto' | 'manual' = 'cell-blur';
20
+
21
+ isShowTabPageExp: boolean = false;
22
+ }
package/src/index.ts CHANGED
@@ -9,3 +9,4 @@ export * from './provider';
9
9
  export * from './register';
10
10
  export * from './utils';
11
11
  export * from './view-logic';
12
+ export * from './logic-scheduler';
package/src/install.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  import { commands } from '@ibiz-template/command';
2
+ import { GlobalConfig } from './config/global-config';
2
3
  import { RegisterCenter } from './register/register-center';
3
4
  import { installCommand } from './command';
4
5
  import { presetUIActionProvider } from './provider';
6
+ import { installLogicSchedule } from './logic-scheduler';
5
7
 
6
8
  /**
7
9
  * 安装运行时
@@ -16,8 +18,12 @@ export function install(): void {
16
18
  ibiz.commands = commands;
17
19
  // 挂载注册中心
18
20
  ibiz.register = new RegisterCenter();
21
+ // 初始化全局配置
22
+ ibiz.config = new GlobalConfig();
19
23
  // 安装默认指令
20
24
  installCommand();
21
25
  // 注册预置的界面行为适配器
22
26
  presetUIActionProvider();
27
+ // 安装逻辑调度器
28
+ installLogicSchedule();
23
29
  }
@@ -0,0 +1,65 @@
1
+ /**
2
+ * 全局配置类,控制应用的功能开关。
3
+ *
4
+ * @author lxm
5
+ * @date 2022-12-09 14:12:44
6
+ * @export
7
+ * @interface IGlobalConfig
8
+ */
9
+ export interface IGlobalConfig {
10
+ /**
11
+ * 是否启用信息栏
12
+ * - true:后才会识别模型的isShowDataInfoBar来控制是否显示信息栏
13
+ * - false:则一律不显示信息栏
14
+ *
15
+ * @author lxm
16
+ * @date 2022-12-09 14:12:13
17
+ * @type {boolean}
18
+ */
19
+ enableDataInfoBar: boolean;
20
+
21
+ /**
22
+ * 默认代码表超时时间(单位:毫秒)
23
+ *
24
+ * @author lxm
25
+ * @date 2023-03-08 03:12:28
26
+ * @type {number}
27
+ * @memberof IGlobalConfig
28
+ */
29
+ defaultCodeListCacheTimeout: number;
30
+
31
+ /**
32
+ * 表格行编辑呈现模式
33
+ * - cell 每次只呈现悬浮点击之后的一个单元格的编辑态
34
+ * - row 每次呈现编辑中的那一行所有单元格的编辑态 TODO
35
+ * - all 呈现所有编辑项的编辑态
36
+ * @author lxm
37
+ * @date 2023-03-06 09:42:44
38
+ * @type {('cell' | 'row' | 'all')}
39
+ * @memberof IGlobalConfig
40
+ */
41
+ gridEditShowMode: 'cell' | 'row' | 'all';
42
+
43
+ /**
44
+ * 表格行编辑保存模式
45
+ * - cell-blur 单元格失焦时保存整行数据
46
+ * - auto 自动保存,值变更之后一段时间保存整行数据
47
+ * - manual 手动保存,由界面行为调用表格整体保存或行保存。
48
+ * @author lxm
49
+ * @date 2023-03-06 03:33:35
50
+ * @type {('cell-blur' | 'auto' | 'manual')}
51
+ * @memberof IGlobalConfig
52
+ */
53
+ gridEditSaveMode: 'cell-blur' | 'auto' | 'manual';
54
+
55
+ /**
56
+ * 是否启用首页多标签导航
57
+ * - true:启用
58
+ * - false:不启用
59
+ *
60
+ * @author lxm
61
+ * @date 2022-12-09 14:12:13
62
+ * @type {boolean}
63
+ */
64
+ isShowTabPageExp: boolean;
65
+ }
@@ -18,6 +18,14 @@ export interface IModal {
18
18
  */
19
19
  mode: ViewMode;
20
20
 
21
+ /**
22
+ * 路由层级
23
+ *
24
+ * @type {number}
25
+ * @memberof IModal
26
+ */
27
+ level?: number;
28
+
21
29
  /**
22
30
  * 关闭模态窗
23
31
  *
@@ -32,4 +32,13 @@ export interface IModalOptions {
32
32
  * @type {'center'}
33
33
  */
34
34
  placement?: 'center';
35
+
36
+ /**
37
+ * 自定义模态的类名,用来自定义模态样式
38
+ *
39
+ * @author lxm
40
+ * @date 2022-11-21 15:11:29
41
+ * @type {string}
42
+ */
43
+ modalClass?: string;
35
44
  }
@@ -1,4 +1,5 @@
1
- import { IPSAppPFPluginRef, IPSSysPFPlugin } from '@ibiz-template/model';
1
+ import { IPSSysPFPlugin } from '@ibiz-template/model';
2
+ import { IPluginItem } from '../i-plugin-item/i-plugin-item';
2
3
 
3
4
  /**
4
5
  * 插件工厂
@@ -28,12 +29,38 @@ export interface IPluginFactory {
28
29
  */
29
30
  loadPlugin(plugin: IPSSysPFPlugin): Promise<boolean>;
30
31
  /**
31
- * 加载应用饮用插件
32
+ * 加载应用引用插件
32
33
  *
33
34
  * @author chitanda
34
- * @date 2022-10-31 16:10:58
35
- * @param {IPSAppPFPluginRef} pluginRef
35
+ * @date 2023-02-02 15:02:58
36
+ * @param {string} rtObjectName
37
+ * @param {string} rtObjectRepo
36
38
  * @return {*} {Promise<boolean>}
37
39
  */
38
- loadPluginRef(pluginRef: IPSAppPFPluginRef): Promise<boolean>;
40
+ loadPluginRef(rtObjectName: string, rtObjectRepo: string): Promise<boolean>;
41
+ /**
42
+ * 给入应用实例,将已经加载的过插件注入。主要用于多实例的情况
43
+ *
44
+ * @author chitanda
45
+ * @date 2023-02-02 16:02:39
46
+ * @param {unknown} app
47
+ */
48
+ register(app: unknown): void;
49
+ /**
50
+ * 注册默认视图插件
51
+ *
52
+ * @author chitanda
53
+ * @date 2023-02-06 21:02:06
54
+ * @param {IPluginItem} plugin 其中 Name 将作为插件标识
55
+ */
56
+ registerPredefinedPlugin(plugin: IPluginItem): void;
57
+ /**
58
+ * 加载指定标识视图插件
59
+ *
60
+ * @author chitanda
61
+ * @date 2023-03-09 18:03:44
62
+ * @param {string} name 插件标识
63
+ * @return {*} {Promise<void>}
64
+ */
65
+ loadPredefinedPlugin(name: string): Promise<void>;
39
66
  }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * 插件项
3
+ *
4
+ * @author chitanda
5
+ * @date 2023-02-06 21:02:03
6
+ * @export
7
+ * @interface IPluginItem
8
+ */
9
+ export interface IPluginItem {
10
+ /**
11
+ * 插件名称,对应模型 rtObjectName
12
+ *
13
+ * @description 预置插件类型名称规则: 视图(VIEW_${视图类型}_DEFAULT)、部件(CONTROL_${部件类型}_DEFAULT)、编辑器(EDITOR_${编辑器类型}_DEFAULT)
14
+ * @author chitanda
15
+ * @date 2023-02-06 21:02:21
16
+ * @type {string}
17
+ */
18
+ name: string;
19
+ /**
20
+ * 插件对应路径,对应模型 rtObjectRepo
21
+ *
22
+ * @author chitanda
23
+ * @date 2023-02-06 21:02:39
24
+ * @type {string}
25
+ */
26
+ path: string;
27
+ }
@@ -1,4 +1,3 @@
1
- import { IBizContext } from '@ibiz-template/core';
2
1
  import { IPSAppDEUIAction } from '@ibiz-template/model';
3
2
  import { IUIActionResult } from '../i-ui-action-result/i-ui-action-result';
4
3
 
@@ -17,7 +16,7 @@ export interface IUIActionHandler {
17
16
  * @author lxm
18
17
  * @date 2022-10-25 14:10:15
19
18
  * @param {IPSAppDEUIAction} action 界面行为模型
20
- * @param {IBizContext} context 上下文
19
+ * @param {IContext} context 上下文
21
20
  * @param {(IData[] | null)} data 数据集合
22
21
  * @param {IParams} params 视图参数
23
22
  * @param {IData} [opts] 额外参数
@@ -25,7 +24,7 @@ export interface IUIActionHandler {
25
24
  */
26
25
  exec(
27
26
  action: IPSAppDEUIAction,
28
- context: IBizContext,
27
+ context: IContext,
29
28
  data: IData[] | null,
30
29
  params: IParams,
31
30
  opts?: IData,
@@ -15,6 +15,7 @@ export interface IUIActionResult {
15
15
  * @type {boolean}
16
16
  */
17
17
  refresh?: boolean;
18
+
18
19
  /**
19
20
  * 是否关闭界面
20
21
  *
@@ -23,4 +24,23 @@ export interface IUIActionResult {
23
24
  * @type {boolean}
24
25
  */
25
26
  closeView?: boolean;
27
+
28
+ /**
29
+ * 中途取消操作
30
+ *
31
+ * @author lxm
32
+ * @date 2023-02-09 06:51:37
33
+ * @type {boolean}
34
+ * @memberof IUIActionResult
35
+ */
36
+ cancel?: boolean;
37
+
38
+ /**
39
+ * 返回的数据
40
+ *
41
+ * @author chitanda
42
+ * @date 2022-08-17 18:08:20
43
+ * @type {IData[]}
44
+ */
45
+ data?: IData[];
26
46
  }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * 界面逻辑通用参数(界面行为,事件,界面逻辑,实体逻辑等)
3
+ * @author lxm
4
+ * @date 2023-05-08 09:31:01
5
+ * @export
6
+ * @interface IUILogicParams
7
+ */
8
+ export interface IUILogicParams {
9
+ /**
10
+ * 上下文
11
+ * @author lxm
12
+ * @date 2023-03-21 05:53:33
13
+ * @type {IContext}
14
+ */
15
+ context: IContext;
16
+ /**
17
+ * 视图参数
18
+ * @author lxm
19
+ * @date 2023-03-21 05:54:23
20
+ * @type {IParams}
21
+ */
22
+ params: IParams;
23
+
24
+ /**
25
+ * 涉及的数据集合
26
+ * @author lxm
27
+ * @date 2023-03-21 05:54:33
28
+ * @type {IData[]}
29
+ */
30
+ data: IData[];
31
+ }
@@ -7,8 +7,13 @@ export { IModal } from './i-modal/i-modal';
7
7
  export { IModalData } from './i-modal-data/i-modal-data';
8
8
  export { IModalOptions } from './i-modal-options/i-modal-options';
9
9
  export { IPluginFactory } from './i-plugin-factory/i-plugin-factory';
10
+ export { IPluginItem } from './i-plugin-item/i-plugin-item';
10
11
  export { IUIActionResult } from './i-ui-action-result/i-ui-action-result';
11
12
  export { IUIActionHandler } from './i-ui-action-handler/i-ui-action-handler';
13
+ export { IGlobalConfig } from './i-global-config/i-global-config';
14
+ export { IUILogicParams } from './i-ui-logic-params/i-ui-logic-params';
15
+
12
16
  export * from './util';
13
17
  export * from './provider';
14
18
  export * from './register';
19
+ export * from './logic-scheduler';
@@ -0,0 +1,58 @@
1
+ export type TriggerType =
2
+ | 'TIMER'
3
+ | 'CTRLEVENT'
4
+ | 'ITEMVISIBLE'
5
+ | 'ITEMENABLE'
6
+ | 'ITEMBLANK'
7
+ | 'ATTRIBUTE'
8
+ | 'CUSTOM'
9
+ | 'VUE_DIRECTIVE';
10
+
11
+ export type LogicType =
12
+ | 'APPDEUILOGIC'
13
+ | 'APPDEUIACTION'
14
+ | 'APPUILOGIC'
15
+ | 'APPVIEWLOGIC'
16
+ | 'APPVIEWENGINE'
17
+ | 'PFPLUGIN'
18
+ | 'SCRIPT'
19
+ | 'DEUILOGIC'
20
+ | 'DEUIACTION'
21
+ | 'SYSVIEWLOGIC';
22
+
23
+ export interface ISchedulerLogic {
24
+ /**
25
+ * 触发器类型
26
+ * @author lxm
27
+ * @date 2023-06-25 06:19:21
28
+ */
29
+ triggerType: TriggerType;
30
+
31
+ /**
32
+ * 逻辑执行类型
33
+ * @author lxm
34
+ * @date 2023-06-25 06:23:53
35
+ * @type {LogicType}
36
+ */
37
+ logicType: LogicType;
38
+
39
+ /**
40
+ * 唯一标识
41
+ * @author lxm
42
+ * @date 2023-06-25 07:13:40
43
+ * @type {string}
44
+ */
45
+ id: string;
46
+
47
+ /**
48
+ * 子项名称
49
+ * @type {string}
50
+ */
51
+ itemName?: string;
52
+
53
+ /**
54
+ * 脚本代码
55
+ * @type {string}
56
+ */
57
+ scriptCode?: string;
58
+ }
@@ -0,0 +1,18 @@
1
+ import { TriggerType } from './i-scheduler-logic';
2
+
3
+ export interface ITriggerMatchParams {
4
+ /**
5
+ * 触发类型
6
+ * @author lxm
7
+ * @date 2023-06-26 01:34:14
8
+ * @type {TriggerType}
9
+ */
10
+ triggerType: TriggerType;
11
+
12
+ /**
13
+ * 子项名称
14
+ * @type {string}
15
+ * 来源 getItemName
16
+ */
17
+ itemName?: string;
18
+ }
@@ -0,0 +1,7 @@
1
+ export type {
2
+ TriggerType,
3
+ ISchedulerLogic,
4
+ LogicType,
5
+ } from './i-scheduler-logic';
6
+
7
+ export type { ITriggerMatchParams } from './i-trigger-match-params';
@@ -23,6 +23,14 @@ export interface ModalParams {
23
23
  * @type {string}
24
24
  */
25
25
  desc?: string;
26
+ /**
27
+ * ok文本
28
+ *
29
+ * @author fzh
30
+ * @date 2023-10-18 14:04:09
31
+ * @type {string}
32
+ */
33
+ okText?: string;
26
34
  }
27
35
 
28
36
  /**
@@ -1,4 +1,3 @@
1
- import { IBizContext } from '@ibiz-template/core';
2
1
  import { IPSAppView } from '@ibiz-template/model';
3
2
  import { IModalData } from '../../i-modal-data/i-modal-data';
4
3
 
@@ -18,10 +17,10 @@ export interface IOpenViewUtil {
18
17
  * @author chitanda
19
18
  * @date 2022-08-16 20:08:57
20
19
  * @param {IPSAppView} appView
21
- * @param {IBizContext} [context]
20
+ * @param {IContext} [context]
22
21
  * @param {IParams} [params]
23
22
  */
24
- root(appView: IPSAppView, context?: IBizContext, params?: IParams): void;
23
+ root(appView: IPSAppView, context: IContext, params?: IParams): void;
25
24
 
26
25
  /**
27
26
  * 打开模态视图
@@ -29,13 +28,13 @@ export interface IOpenViewUtil {
29
28
  * @author chitanda
30
29
  * @date 2022-08-16 20:08:41
31
30
  * @param {IPSAppView} appView
32
- * @param {IBizContext} [context]
31
+ * @param {IContext} [context]
33
32
  * @param {IParams} [params]
34
33
  * @return {*} {Promise<IModalData>}
35
34
  */
36
35
  modal(
37
36
  appView: IPSAppView,
38
- context?: IBizContext,
37
+ context: IContext,
39
38
  params?: IParams,
40
39
  ): Promise<IModalData>;
41
40
 
@@ -45,14 +44,14 @@ export interface IOpenViewUtil {
45
44
  * @author chitanda
46
45
  * @date 2022-08-16 20:08:22
47
46
  * @param {IPSAppView} appView
48
- * @param {IBizContext} [context]
47
+ * @param {IContext} [context]
49
48
  * @param {IParams} [params]
50
49
  * @return {*} {Promise<IModalData>}
51
50
  */
52
51
  popover(
53
52
  appView: IPSAppView,
54
53
  event: MouseEvent,
55
- context?: IBizContext,
54
+ context: IContext,
56
55
  params?: IParams,
57
56
  ): Promise<IModalData>;
58
57
 
@@ -62,13 +61,13 @@ export interface IOpenViewUtil {
62
61
  * @author chitanda
63
62
  * @date 2022-08-16 20:08:46
64
63
  * @param {IPSAppView} appView
65
- * @param {IBizContext} [context]
64
+ * @param {IContext} [context]
66
65
  * @param {IParams} [params]
67
66
  * @return {*} {Promise<IModalData>}
68
67
  */
69
68
  drawer(
70
69
  appView: IPSAppView,
71
- context?: IBizContext,
70
+ context: IContext,
72
71
  params?: IParams,
73
72
  ): Promise<IModalData>;
74
73
 
@@ -78,13 +77,13 @@ export interface IOpenViewUtil {
78
77
  * @author chitanda
79
78
  * @date 2022-08-16 20:08:29
80
79
  * @param {IPSAppView} appView
81
- * @param {IBizContext} [context]
80
+ * @param {IContext} [context]
82
81
  * @param {IParams} [params]
83
82
  * @return {*} {Promise<IModalData>}
84
83
  */
85
84
  custom(
86
85
  appView: IPSAppView,
87
- context?: IBizContext,
86
+ context: IContext,
88
87
  params?: IParams,
89
88
  ): Promise<IModalData>;
90
89
  }
@@ -0,0 +1,48 @@
1
+ import { IPSModelObject, UnsupportedModelError } from '@ibiz-template/model';
2
+ import type { ISchedulerLogic } from '../../interface';
3
+ import { LogicExecutor } from './logic-executor';
4
+
5
+ /**
6
+ * 逻辑执行工厂
7
+ * @author lxm
8
+ * @date 2023-06-25 06:37:54
9
+ * @export
10
+ * @class LogicExecutorFactory
11
+ */
12
+ export class LogicExecutorFactory {
13
+ /**
14
+ * 构造回调方法集合
15
+ * @author lxm
16
+ * @date 2023-06-25 06:53:31
17
+ */
18
+ constructorMap = new Map<string, (logic: ISchedulerLogic) => LogicExecutor>();
19
+
20
+ /**
21
+ * 注册
22
+ * @author lxm
23
+ * @date 2023-06-25 06:54:17
24
+ * @param {string} key 注册标识
25
+ * @param {(logic: ISchedulerLogic) => LogicExecutor} callback
26
+ */
27
+ register(key: string, callback: (logic: ISchedulerLogic) => LogicExecutor) {
28
+ this.constructorMap.set(key, callback);
29
+ }
30
+
31
+ /**
32
+ * 创建执行器实例
33
+ * @author lxm
34
+ * @date 2023-06-25 06:59:51
35
+ * @param {ISchedulerLogic} logic
36
+ * @return {*}
37
+ */
38
+ createExecutor(logic: ISchedulerLogic) {
39
+ const constructor = this.constructorMap.get(logic.logicType);
40
+ if (!constructor) {
41
+ throw new UnsupportedModelError(
42
+ logic as IData as IPSModelObject,
43
+ `逻辑类型 ${logic.logicType} 暂未支持!`,
44
+ );
45
+ }
46
+ return constructor(logic);
47
+ }
48
+ }