@ibiz-template/runtime 0.0.1-alpha.9 → 0.0.1-beta.1

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 (183) hide show
  1. package/dist/system/index.system.js +1 -0
  2. package/out/command/app/app-func/app-func.js +3 -3
  3. package/out/command/app/open-app-view/open-app-view.d.ts +2 -13
  4. package/out/command/app/open-app-view/open-app-view.d.ts.map +1 -1
  5. package/out/command/app/open-app-view/open-app-view.js +6 -18
  6. package/out/index.d.ts +3 -1
  7. package/out/index.d.ts.map +1 -1
  8. package/out/index.js +3 -1
  9. package/out/install.d.ts.map +1 -1
  10. package/out/install.js +5 -2
  11. package/out/interface/i-drawer-options/i-drawer-options.d.ts +29 -0
  12. package/out/interface/i-drawer-options/i-drawer-options.d.ts.map +1 -0
  13. package/out/interface/{provider/i-editor-provider.js → i-drawer-options/i-drawer-options.js} +0 -0
  14. package/out/interface/i-modal-data/i-modal-data.d.ts +1 -1
  15. package/out/interface/i-modal-data/i-modal-data.d.ts.map +1 -1
  16. package/out/interface/i-modal-options/i-modal-options.d.ts +35 -0
  17. package/out/interface/i-modal-options/i-modal-options.d.ts.map +1 -0
  18. package/out/interface/{register/i-editor-register.js → i-modal-options/i-modal-options.js} +0 -0
  19. package/out/interface/i-plugin-factory/i-plugin-factory.d.ts +39 -0
  20. package/out/interface/i-plugin-factory/i-plugin-factory.d.ts.map +1 -0
  21. package/out/interface/i-plugin-factory/i-plugin-factory.js +1 -0
  22. package/out/interface/i-popover-options/i-popover-options.d.ts +84 -0
  23. package/out/interface/i-popover-options/i-popover-options.d.ts.map +1 -0
  24. package/out/interface/i-popover-options/i-popover-options.js +1 -0
  25. package/out/interface/i-ui-action-handler/i-ui-action-handler.d.ts +27 -0
  26. package/out/interface/i-ui-action-handler/i-ui-action-handler.d.ts.map +1 -0
  27. package/out/interface/i-ui-action-handler/i-ui-action-handler.js +1 -0
  28. package/out/interface/index.d.ts +7 -3
  29. package/out/interface/index.d.ts.map +1 -1
  30. package/out/interface/index.js +2 -3
  31. package/out/interface/provider/i-ui-action-provider.d.ts +20 -0
  32. package/out/interface/provider/i-ui-action-provider.d.ts.map +1 -0
  33. package/out/interface/provider/i-ui-action-provider.js +1 -0
  34. package/out/interface/provider/index.d.ts +2 -0
  35. package/out/interface/provider/index.d.ts.map +1 -0
  36. package/out/interface/provider/index.js +1 -0
  37. package/out/interface/register/i-register.d.ts +8 -1
  38. package/out/interface/register/i-register.d.ts.map +1 -1
  39. package/out/interface/register/i-ui-action-register.d.ts +15 -0
  40. package/out/interface/register/i-ui-action-register.d.ts.map +1 -0
  41. package/out/interface/register/i-ui-action-register.js +1 -0
  42. package/out/interface/register/index.d.ts +3 -0
  43. package/out/interface/register/index.d.ts.map +1 -0
  44. package/out/interface/register/index.js +2 -0
  45. package/out/interface/util/i-loading-util/i-loading-util.d.ts +14 -0
  46. package/out/interface/util/i-loading-util/i-loading-util.d.ts.map +1 -1
  47. package/out/interface/util/i-open-view-util/i-open-view-util.d.ts +1 -1
  48. package/out/interface/util/i-open-view-util/i-open-view-util.d.ts.map +1 -1
  49. package/out/interface/util/i-overlay-container/i-overlay-container.d.ts +37 -0
  50. package/out/interface/util/i-overlay-container/i-overlay-container.d.ts.map +1 -0
  51. package/out/interface/util/i-overlay-container/i-overlay-container.js +1 -0
  52. package/out/interface/util/i-overlay-controller/i-overlay-controller.d.ts +86 -0
  53. package/out/interface/util/i-overlay-controller/i-overlay-controller.d.ts.map +1 -0
  54. package/out/interface/util/i-overlay-controller/i-overlay-controller.js +1 -0
  55. package/out/interface/util/i-overlay-popover-container/i-overlay-popover-container.d.ts +23 -0
  56. package/out/interface/util/i-overlay-popover-container/i-overlay-popover-container.d.ts.map +1 -0
  57. package/out/interface/util/i-overlay-popover-container/i-overlay-popover-container.js +1 -0
  58. package/out/interface/util/index.d.ts +3 -0
  59. package/out/interface/util/index.d.ts.map +1 -1
  60. package/out/plugin/index.d.ts +3 -0
  61. package/out/plugin/index.d.ts.map +1 -0
  62. package/out/plugin/index.js +2 -0
  63. package/out/plugin/plugin-static-resource/plugin-static-resource.d.ts +37 -0
  64. package/out/plugin/plugin-static-resource/plugin-static-resource.d.ts.map +1 -0
  65. package/out/plugin/plugin-static-resource/plugin-static-resource.js +31 -0
  66. package/out/plugin/remote-plugin-item/remote-plugin-item.d.ts +102 -0
  67. package/out/plugin/remote-plugin-item/remote-plugin-item.d.ts.map +1 -0
  68. package/out/plugin/remote-plugin-item/remote-plugin-item.js +22 -0
  69. package/out/provider/index.d.ts +2 -0
  70. package/out/provider/index.d.ts.map +1 -0
  71. package/out/provider/index.js +1 -0
  72. package/out/provider/ui-action/backend-ui-action-provider.d.ts +15 -0
  73. package/out/provider/ui-action/backend-ui-action-provider.d.ts.map +1 -0
  74. package/out/provider/ui-action/backend-ui-action-provider.js +18 -0
  75. package/out/provider/ui-action/common-sys-ui-action-provider.d.ts +15 -0
  76. package/out/provider/ui-action/common-sys-ui-action-provider.d.ts.map +1 -0
  77. package/out/provider/ui-action/common-sys-ui-action-provider.js +18 -0
  78. package/out/provider/ui-action/front-ui-action-provider.d.ts +15 -0
  79. package/out/provider/ui-action/front-ui-action-provider.d.ts.map +1 -0
  80. package/out/provider/ui-action/front-ui-action-provider.js +18 -0
  81. package/out/provider/ui-action/index.d.ts +13 -0
  82. package/out/provider/ui-action/index.d.ts.map +1 -0
  83. package/out/provider/ui-action/index.js +44 -0
  84. package/out/register/index.d.ts +4 -0
  85. package/out/register/index.d.ts.map +1 -0
  86. package/out/register/index.js +3 -0
  87. package/out/register/register-base.d.ts +18 -0
  88. package/out/register/register-base.d.ts.map +1 -0
  89. package/out/register/register-base.js +24 -0
  90. package/out/register/register-center.d.ts +20 -0
  91. package/out/register/register-center.d.ts.map +1 -0
  92. package/out/register/register-center.js +21 -0
  93. package/out/register/ui-action-register.d.ts +17 -0
  94. package/out/register/ui-action-register.d.ts.map +1 -0
  95. package/out/register/ui-action-register.js +41 -0
  96. package/out/types.d.ts +19 -3
  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 +3 -61
  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 +4 -241
  101. package/out/utils/app-de-ui-action-util/handler/backend-ui-action-handler.d.ts +17 -0
  102. package/out/utils/app-de-ui-action-util/handler/backend-ui-action-handler.d.ts.map +1 -0
  103. package/out/utils/app-de-ui-action-util/handler/backend-ui-action-handler.js +28 -0
  104. package/out/utils/app-de-ui-action-util/handler/common-sys-ui-action-handler.d.ts +17 -0
  105. package/out/utils/app-de-ui-action-util/handler/common-sys-ui-action-handler.d.ts.map +1 -0
  106. package/out/utils/app-de-ui-action-util/handler/common-sys-ui-action-handler.js +103 -0
  107. package/out/utils/app-de-ui-action-util/handler/front-ui-action-handler.d.ts +17 -0
  108. package/out/utils/app-de-ui-action-util/handler/front-ui-action-handler.d.ts.map +1 -0
  109. package/out/utils/app-de-ui-action-util/handler/front-ui-action-handler.js +24 -0
  110. package/out/utils/app-de-ui-action-util/handler/index.d.ts +5 -0
  111. package/out/utils/app-de-ui-action-util/handler/index.d.ts.map +1 -0
  112. package/out/utils/app-de-ui-action-util/handler/index.js +4 -0
  113. package/out/utils/app-de-ui-action-util/handler/ui-action-handler.d.ts +82 -0
  114. package/out/utils/app-de-ui-action-util/handler/ui-action-handler.d.ts.map +1 -0
  115. package/out/utils/app-de-ui-action-util/handler/ui-action-handler.js +143 -0
  116. package/out/utils/app-de-ui-action-util/index.d.ts +3 -0
  117. package/out/utils/app-de-ui-action-util/index.d.ts.map +1 -0
  118. package/out/utils/app-de-ui-action-util/index.js +2 -0
  119. package/out/utils/index.d.ts +2 -1
  120. package/out/utils/index.d.ts.map +1 -1
  121. package/out/utils/index.js +2 -1
  122. package/out/utils/open-redirect-view/open-redirect-view.d.ts +43 -0
  123. package/out/utils/open-redirect-view/open-redirect-view.d.ts.map +1 -0
  124. package/out/utils/open-redirect-view/open-redirect-view.js +139 -0
  125. package/out/view-logic/view-logic.d.ts +7 -6
  126. package/out/view-logic/view-logic.d.ts.map +1 -1
  127. package/out/view-logic/view-logic.js +19 -13
  128. package/package.json +22 -12
  129. package/src/command/app/app-func/app-func.ts +3 -3
  130. package/src/command/app/open-app-view/open-app-view.ts +12 -28
  131. package/src/index.ts +3 -1
  132. package/src/install.ts +5 -2
  133. package/src/interface/i-drawer-options/i-drawer-options.ts +28 -0
  134. package/src/interface/i-modal-data/i-modal-data.ts +1 -1
  135. package/src/interface/i-modal-options/i-modal-options.ts +35 -0
  136. package/src/interface/i-plugin-factory/i-plugin-factory.ts +39 -0
  137. package/src/interface/i-popover-options/i-popover-options.ts +85 -0
  138. package/src/interface/i-ui-action-handler/i-ui-action-handler.ts +33 -0
  139. package/src/interface/index.ts +10 -3
  140. package/src/interface/provider/i-ui-action-provider.ts +20 -0
  141. package/src/interface/provider/index.ts +1 -0
  142. package/src/interface/register/i-register.ts +8 -1
  143. package/src/interface/register/i-ui-action-register.ts +15 -0
  144. package/src/interface/register/index.ts +2 -0
  145. package/src/interface/util/i-loading-util/i-loading-util.ts +14 -0
  146. package/src/interface/util/i-open-view-util/i-open-view-util.ts +1 -0
  147. package/src/interface/util/i-overlay-container/i-overlay-container.ts +38 -0
  148. package/src/interface/util/i-overlay-controller/i-overlay-controller.ts +116 -0
  149. package/src/interface/util/i-overlay-popover-container/i-overlay-popover-container.ts +23 -0
  150. package/src/interface/util/index.ts +3 -0
  151. package/src/plugin/index.ts +5 -0
  152. package/src/plugin/plugin-static-resource/plugin-static-resource.ts +42 -0
  153. package/src/plugin/remote-plugin-item/remote-plugin-item.ts +107 -0
  154. package/src/provider/index.ts +1 -0
  155. package/src/provider/ui-action/backend-ui-action-provider.ts +22 -0
  156. package/src/provider/ui-action/common-sys-ui-action-provider.ts +22 -0
  157. package/src/provider/ui-action/front-ui-action-provider.ts +22 -0
  158. package/src/provider/ui-action/index.ts +50 -0
  159. package/src/register/index.ts +3 -0
  160. package/src/register/register-base.ts +27 -0
  161. package/src/register/register-center.ts +20 -0
  162. package/src/register/ui-action-register.ts +48 -0
  163. package/src/types.ts +20 -3
  164. package/src/utils/app-de-ui-action-util/app-de-ui-action-util.ts +6 -330
  165. package/src/utils/app-de-ui-action-util/handler/backend-ui-action-handler.ts +43 -0
  166. package/src/utils/app-de-ui-action-util/handler/common-sys-ui-action-handler.ts +125 -0
  167. package/src/utils/app-de-ui-action-util/handler/front-ui-action-handler.ts +46 -0
  168. package/src/utils/app-de-ui-action-util/handler/index.ts +4 -0
  169. package/src/utils/app-de-ui-action-util/handler/ui-action-handler.ts +215 -0
  170. package/src/utils/app-de-ui-action-util/index.ts +2 -0
  171. package/src/utils/index.ts +2 -1
  172. package/src/utils/open-redirect-view/open-redirect-view.ts +180 -0
  173. package/src/view-logic/view-logic.ts +30 -17
  174. package/out/interface/provider/i-editor-provider.d.ts +0 -38
  175. package/out/interface/provider/i-editor-provider.d.ts.map +0 -1
  176. package/out/interface/register/i-editor-register.d.ts +0 -23
  177. package/out/interface/register/i-editor-register.d.ts.map +0 -1
  178. package/out/register/register.d.ts +0 -20
  179. package/out/register/register.d.ts.map +0 -1
  180. package/out/register/register.js +0 -10
  181. package/src/interface/provider/i-editor-provider.ts +0 -44
  182. package/src/interface/register/i-editor-register.ts +0 -23
  183. package/src/register/register.ts +0 -20
@@ -1 +1 @@
1
- {"version":3,"file":"view-logic.d.ts","sourceRoot":"","sources":["../../src/view-logic/view-logic.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,oBAAoB,EACpB,qBAAqB,EACrB,eAAe,EAEhB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/C;;;;;;;;;;;GAWG;AACH,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,eAAe,EAC1B,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EACpB,MAAM,EAAE,OAAO,EACf,IAAI,GAAE,KAAU,GACf,OAAO,CAAC,eAAe,CAAC,CA8B1B;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,yBAAyB,CAC7C,UAAU,EAAE,qBAAqB,EACjC,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EACpB,MAAM,EAAE,OAAO,EACf,IAAI,GAAE,KAAU,GACf,OAAO,CAAC,eAAe,CAAC,CA6C1B;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,wBAAwB,CAC5C,UAAU,EAAE,oBAAoB,EAChC,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EACpB,MAAM,EAAE,OAAO,EACf,IAAI,GAAE,KAAU,GACf,OAAO,CAAC,eAAe,CAAC,CA6C1B"}
1
+ {"version":3,"file":"view-logic.d.ts","sourceRoot":"","sources":["../../src/view-logic/view-logic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAIL,oBAAoB,EACpB,qBAAqB,EACrB,eAAe,EAEhB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/C;;;;;;;;;;;GAWG;AACH,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,eAAe,EAC1B,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EACpB,MAAM,EAAE,OAAO,EACf,IAAI,GAAE,KAAU,GACf,OAAO,CAAC,eAAe,CAAC,CA8B1B;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,yBAAyB,CAC7C,UAAU,EAAE,qBAAqB,EACjC,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EACpB,MAAM,EAAE,OAAO,EACf,IAAI,GAAE,KAAU,GACf,OAAO,CAAC,eAAe,CAAC,CAoD1B;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,wBAAwB,CAC5C,UAAU,EAAE,oBAAoB,EAChC,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EACpB,MAAM,EAAE,OAAO,EACf,IAAI,GAAE,KAAU,GACf,OAAO,CAAC,eAAe,CAAC,CAmD1B"}
@@ -10,7 +10,7 @@ import { AppDEUIActionUtil, convertNavData } from '../utils';
10
10
  * @date 2022-08-22 09:08:40
11
11
  * @export
12
12
  * @param {IPSAppViewLogic} viewLogic 视图逻辑模型对象
13
- * @param {IContext} context 上下文参数
13
+ * @param {IBizContext} context 上下文参数
14
14
  * @param {IParams} params 视图参数
15
15
  * @param {(IData | null)} data 数据集合
16
16
  * @param {IData} [opts] 额外参数,event是js原生事件
@@ -20,7 +20,7 @@ export async function executeViewLogic(viewLogic, context, data, params, opts =
20
20
  // 执行打开数据界面逻辑
21
21
  return executeOpenDataAppUILogic(viewLogic.getPSAppUILogic(), context, data, params, opts);
22
22
  }
23
- if (viewLogic.name === 'newdata') {
23
+ if (viewLogic.name === 'newdata' && viewLogic.getPSAppUILogic()) {
24
24
  // 执行新建数据逻辑
25
25
  return executeNewDataAppUILogic(viewLogic.getPSAppUILogic(), context, data, params, opts);
26
26
  }
@@ -38,7 +38,7 @@ export async function executeViewLogic(viewLogic, context, data, params, opts =
38
38
  * @date 2022-08-22 14:08:03
39
39
  * @export
40
40
  * @param {IPSAppUIOpenDataLogic} appUILogic 应用预置界面逻辑opendata模型对象
41
- * @param {IContext} context 上下文参数
41
+ * @param {IBizContext} context 上下文参数
42
42
  * @param {(IData | null)} data 数据集合
43
43
  * @param {IParams} params 视图参数
44
44
  * @param {IData} [opts] 额外参数,event是js原生事件
@@ -58,7 +58,6 @@ export async function executeOpenDataAppUILogic(appUILogic, context, data, param
58
58
  const appDataEntity = new AppEntityModel(openView.getPSAppDataEntity());
59
59
  await appDataEntity.init();
60
60
  // 处理导航参数
61
- let tempContext = {};
62
61
  // 处理上下文导航参数
63
62
  const navContexts = openViewRef.getPSNavigateContexts() || [];
64
63
  // 默认添加主键的上下文导航参数
@@ -70,8 +69,7 @@ export async function executeOpenDataAppUILogic(appUILogic, context, data, param
70
69
  rawValue: false,
71
70
  });
72
71
  }
73
- tempContext = convertNavData(navContexts, context, params, data[0]);
74
- tempContext = new IBizContext(tempContext, context);
72
+ const tempContext = new IBizContext(convertNavData(navContexts, context, params, data[0]), context);
75
73
  // 处理导航视图参数
76
74
  let tempParams = {};
77
75
  const navParams = openViewRef.getPSNavigateParams();
@@ -79,7 +77,11 @@ export async function executeOpenDataAppUILogic(appUILogic, context, data, param
79
77
  tempParams = convertNavData(navParams, params, context, data[0]);
80
78
  }
81
79
  // 打开视图
82
- return ibiz.commands.execute(OpenAppViewCommand.TAG, openView, tempContext, tempParams, opts);
80
+ await ibiz.commands.execute(OpenAppViewCommand.TAG, openView, tempContext, tempParams, opts);
81
+ // 刷新上一个视图
82
+ const { neuron } = opts;
83
+ neuron.call.refresh();
84
+ return {};
83
85
  }
84
86
  /**
85
87
  * 执行应用预置界面逻辑newdata
@@ -88,7 +90,7 @@ export async function executeOpenDataAppUILogic(appUILogic, context, data, param
88
90
  * @date 2022-08-22 14:08:03
89
91
  * @export
90
92
  * @param {IPSAppUINewDataLogic} appUILogic 应用预置界面逻辑newdata模型对象
91
- * @param {IContext} context 上下文参数
93
+ * @param {IBizContext} context 上下文参数
92
94
  * @param {(IData | null)} data 数据集合
93
95
  * @param {IParams} params 视图参数
94
96
  * @param {IData} [opts] 额外参数,event是js原生事件
@@ -112,14 +114,14 @@ export async function executeNewDataAppUILogic(appUILogic, context, data, params
112
114
  if (notNilEmpty(navContexts)) {
113
115
  tempContext = convertNavData(navContexts, context, params, _data);
114
116
  }
115
- const navParams = newViewRef.getPSNavigateParams();
116
- if (notNilEmpty(navParams)) {
117
- tempParams = convertNavData(navParams, params, context, _data);
118
- }
119
117
  tempContext = new IBizContext(tempContext, context);
120
118
  // 删除上下文内的主键
121
119
  delete tempContext[appDataEntity.deName.toLowerCase()];
122
120
  tempContext[appDataEntity.deName.toLowerCase()] = undefined;
121
+ const navParams = newViewRef.getPSNavigateParams();
122
+ if (notNilEmpty(navParams)) {
123
+ tempParams = convertNavData(navParams, params, context, _data);
124
+ }
123
125
  // todo 拷贝
124
126
  if (appUILogic.enableWizardAdd) {
125
127
  // todo 向导添加
@@ -131,5 +133,9 @@ export async function executeNewDataAppUILogic(appUILogic, context, data, params
131
133
  // todo 只支持批添加
132
134
  }
133
135
  // 打开视图
134
- return ibiz.commands.execute(OpenAppViewCommand.TAG, newView, tempContext, tempParams, opts);
136
+ await ibiz.commands.execute(OpenAppViewCommand.TAG, newView, tempContext, tempParams, opts);
137
+ // 刷新上一个视图
138
+ const { neuron } = opts;
139
+ neuron.call.refresh();
140
+ return {};
135
141
  }
package/package.json CHANGED
@@ -1,38 +1,48 @@
1
1
  {
2
2
  "name": "@ibiz-template/runtime",
3
- "version": "0.0.1-alpha.9",
3
+ "version": "0.0.1-beta.1",
4
4
  "description": "控制器包",
5
+ "type": "module",
5
6
  "main": "out/index.js",
6
7
  "types": "out/index.d.ts",
8
+ "system": "./dist/system/index.system.js",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://gitee.com/iBizModeling/ibiz-template.git"
12
+ },
7
13
  "files": [
14
+ "dist",
8
15
  "out",
9
16
  "src"
10
17
  ],
11
18
  "scripts": {
12
19
  "dev": "tsc --watch",
13
- "build": "npm run lint && npm run clean && tsc --build",
20
+ "build": "npm run lint && npm run clean && npm run build:rollup && tsc --build",
21
+ "build:rollup": "rollup -c",
14
22
  "lint": "eslint 'src/**/*.ts'",
15
23
  "lint:fix": "eslint --fix 'src/**/*.ts'",
16
- "clean": "rimraf out",
17
- "publish:next": "npm run build && npm publish --access public --tag next",
18
- "publish:npm": "npm run build && npm publish --access public"
24
+ "clean": "rimraf out dist",
25
+ "prepublish": "npm run build",
26
+ "publish:next": "npm publish --access public --tag next",
27
+ "publish:npm": "npm publish --access public"
19
28
  },
20
29
  "author": "chitanda",
21
30
  "license": "MIT",
22
31
  "dependencies": {
23
- "@ibiz-template/command": "^0.0.1-alpha.2"
32
+ "@ibiz-template/command": "^0.0.1-beta.1"
24
33
  },
25
34
  "devDependencies": {
26
- "@ibiz-template/core": "^0.0.1-alpha.6",
27
- "@ibiz-template/model": "^0.0.1-alpha.9",
28
- "@ibiz-template/service": "^0.0.1-alpha.9",
29
- "qx-util": "^0.4.1"
35
+ "@ibiz-template/core": "^0.0.1-beta.1",
36
+ "@ibiz-template/model": "^0.0.1-beta.1",
37
+ "@ibiz-template/service": "^0.0.1-beta.1",
38
+ "@types/systemjs": "^6.1.1",
39
+ "qx-util": "^0.4.4"
30
40
  },
31
41
  "peerDependencies": {
32
42
  "@ibiz-template/core": "^0.0.1-alpha.2",
33
43
  "@ibiz-template/model": "^0.0.1-alpha.2",
34
44
  "@ibiz-template/service": "^0.0.1-alpha.2",
35
- "qx-util": "^0.4.1"
45
+ "qx-util": "^0.4.4"
36
46
  },
37
- "gitHead": "36f86effeb183c0fad87a82feec576dab4a61eff"
47
+ "gitHead": "9514cbc720208af6160c67bc43e822262274da1f"
38
48
  }
@@ -128,7 +128,7 @@ export class AppFuncCommand {
128
128
  context?: IBizContext,
129
129
  params?: IParams,
130
130
  ): void {
131
- console.log('openPdAppFunc', appFunc, context, params);
131
+ ibiz.log.warn('openPdAppFunc', appFunc, context, params);
132
132
  throw new Error('未实现');
133
133
  }
134
134
 
@@ -147,7 +147,7 @@ export class AppFuncCommand {
147
147
  context?: IBizContext,
148
148
  params?: IParams,
149
149
  ): void {
150
- console.log('executeJavaScript', appFunc, context, params);
150
+ ibiz.log.warn('executeJavaScript', appFunc, context, params);
151
151
  throw new Error('未实现');
152
152
  }
153
153
 
@@ -166,7 +166,7 @@ export class AppFuncCommand {
166
166
  context?: IBizContext,
167
167
  params?: IParams,
168
168
  ): void {
169
- console.log('custom', appFunc, context, params);
169
+ ibiz.log.warn('custom', appFunc, context, params);
170
170
  throw new Error('未实现');
171
171
  }
172
172
  }
@@ -1,6 +1,7 @@
1
1
  import { IBizContext } from '@ibiz-template/core';
2
- import { IPSAppView } from '@ibiz-template/model';
2
+ import { IPSAppRedirectView, IPSAppView } from '@ibiz-template/model';
3
3
  import { IModalData } from '../../../interface';
4
+ import { openRedirectView } from '../../../utils';
4
5
 
5
6
  /**
6
7
  * 打开应用视图
@@ -32,11 +33,16 @@ export class OpenAppViewCommand {
32
33
  appView: IPSAppView,
33
34
  context?: IBizContext,
34
35
  params: IParams = {},
35
- _opts: IData = {},
36
+ opts: IData = {},
36
37
  ): Promise<IModalData | void> {
37
38
  await appView.fill(true);
38
39
  if (appView.redirectView) {
39
- return this.openRedirectView(appView);
40
+ return openRedirectView(
41
+ appView as IPSAppRedirectView,
42
+ context,
43
+ params,
44
+ opts.data,
45
+ );
40
46
  }
41
47
  const { openMode = 'INDEXVIEWTAB' } = appView;
42
48
  switch (openMode) {
@@ -49,7 +55,7 @@ export class OpenAppViewCommand {
49
55
  case 'POPUPAPP':
50
56
  throw new Error('未支持的视图打开模式: POPUPAPP');
51
57
  case 'POPOVER':
52
- return this.openPopover(appView, context, params);
58
+ return this.openPopover(appView, opts.event, context, params);
53
59
  case 'DRAWER_LEFT':
54
60
  case 'DRAWER_RIGHT':
55
61
  case 'DRAWER_TOP':
@@ -62,29 +68,6 @@ export class OpenAppViewCommand {
62
68
  }
63
69
  }
64
70
 
65
- /**
66
- * 打开重定向视图
67
- *
68
- * @author chitanda
69
- * @date 2022-07-25 20:07:24
70
- * @protected
71
- * @param {IPSAppView} appView
72
- * @param {IBizContext} [context]
73
- * @param {IParams} [params={}]
74
- */
75
- protected openRedirectView(
76
- appView: IPSAppView,
77
- context?: IBizContext,
78
- params: IParams = {},
79
- ): void {
80
- console.log(
81
- 'OpenAppViewCommand.openRedirectView',
82
- appView,
83
- context,
84
- params,
85
- );
86
- }
87
-
88
71
  /**
89
72
  * 首页导航模式打开
90
73
  *
@@ -135,10 +118,11 @@ export class OpenAppViewCommand {
135
118
  */
136
119
  protected async openPopover(
137
120
  appView: IPSAppView,
121
+ event: MouseEvent,
138
122
  context?: IBizContext,
139
123
  params: IParams = {},
140
124
  ): Promise<IModalData> {
141
- return ibiz.openView.popover(appView, context, params);
125
+ return ibiz.openView.popover(appView, event, context, params);
142
126
  }
143
127
 
144
128
  /**
package/src/index.ts CHANGED
@@ -4,6 +4,8 @@ export { install } from './install';
4
4
  export * from './command';
5
5
  export * from './constant';
6
6
  export * from './interface';
7
- export * from './register/register';
7
+ export * from './plugin';
8
+ export * from './provider';
9
+ export * from './register';
8
10
  export * from './utils';
9
11
  export * from './view-logic';
package/src/install.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { commands } from '@ibiz-template/command';
2
- import { Register } from './register/register';
2
+ import { RegisterCenter } from './register/register-center';
3
3
  import { installCommand } from './command';
4
+ import { presetUIActionProvider } from './provider';
4
5
 
5
6
  /**
6
7
  * 安装运行时
@@ -14,7 +15,9 @@ export function install(): void {
14
15
  // 挂载指令控制器
15
16
  ibiz.commands = commands;
16
17
  // 挂载注册中心
17
- ibiz.register = new Register();
18
+ ibiz.register = new RegisterCenter();
18
19
  // 安装默认指令
19
20
  installCommand();
21
+ // 注册预置的界面行为适配器
22
+ presetUIActionProvider();
20
23
  }
@@ -0,0 +1,28 @@
1
+ export interface IDrawerOptions {
2
+ /**
3
+ * 抽屉宽度
4
+ * 左、右方向时可用。当其值不大于 100 时以百分比显示,大于 100 时为像素
5
+ *
6
+ * @author lxm
7
+ * @date 2022-09-12 20:09:20
8
+ * @type {string | number}
9
+ */
10
+ width?: string | number;
11
+ /**
12
+ * 抽屉高度
13
+ * 上、下方向时可用。当其值不大于 100 时以百分比显示,大于 100 时为像素
14
+ *
15
+ * @author lxm
16
+ * @date 2022-09-12 20:09:22
17
+ * @type {string | number}
18
+ */
19
+ height?: string | number;
20
+ /**
21
+ * 抽屉的方向
22
+ *
23
+ * @author lxm
24
+ * @date 2022-09-15 14:09:13
25
+ * @type {('left' | 'right' | 'top' | 'bottom')}
26
+ */
27
+ placement?: 'left' | 'right' | 'top' | 'bottom';
28
+ }
@@ -22,7 +22,7 @@ export interface IModalData {
22
22
  * @date 2022-08-17 18:08:20
23
23
  * @type {IData[]}
24
24
  */
25
- data: IData[];
25
+ data?: IData[];
26
26
  /**
27
27
  * 额外参数
28
28
  *
@@ -0,0 +1,35 @@
1
+ export interface IModalOptions {
2
+ /**
3
+ * 宽度
4
+ *
5
+ * @author lxm
6
+ * @date 2022-09-12 20:09:20
7
+ * @type {string | number}
8
+ */
9
+ width?: string | number;
10
+ /**
11
+ * 高度
12
+ *
13
+ * @author lxm
14
+ * @date 2022-09-12 20:09:22
15
+ * @type {string | number}
16
+ */
17
+ height?: string | number;
18
+ /**
19
+ * 是否隐藏底部按钮(默认false)
20
+ *
21
+ * @author lxm
22
+ * @date 2022-09-12 20:09:23
23
+ * @type {boolean}
24
+ */
25
+ footerHide?: boolean;
26
+
27
+ /**
28
+ * 显示位置
29
+ *
30
+ * @author lxm
31
+ * @date 2022-11-08 16:11:38
32
+ * @type {'center'}
33
+ */
34
+ placement?: 'center';
35
+ }
@@ -0,0 +1,39 @@
1
+ import { IPSAppPFPluginRef, IPSSysPFPlugin } from '@ibiz-template/model';
2
+
3
+ /**
4
+ * 插件工厂
5
+ *
6
+ * @author chitanda
7
+ * @date 2022-10-21 16:10:19
8
+ * @export
9
+ * @interface IPluginFactory
10
+ */
11
+ export interface IPluginFactory {
12
+ /**
13
+ * 设置开发插件,用于本地调试
14
+ *
15
+ * @author chitanda
16
+ * @date 2022-11-02 21:11:01
17
+ * @param {string} name
18
+ * @param {() => Promise<unknown>} fn
19
+ */
20
+ setDevPlugin(name: string, fn: () => Promise<unknown>): void;
21
+ /**
22
+ * 加载插件
23
+ *
24
+ * @author chitanda
25
+ * @date 2022-10-21 16:10:27
26
+ * @param {IPSSysPFPlugin} plugin
27
+ * @return {*} {Promise<boolean>}
28
+ */
29
+ loadPlugin(plugin: IPSSysPFPlugin): Promise<boolean>;
30
+ /**
31
+ * 加载应用饮用插件
32
+ *
33
+ * @author chitanda
34
+ * @date 2022-10-31 16:10:58
35
+ * @param {IPSAppPFPluginRef} pluginRef
36
+ * @return {*} {Promise<boolean>}
37
+ */
38
+ loadPluginRef(pluginRef: IPSAppPFPluginRef): Promise<boolean>;
39
+ }
@@ -0,0 +1,85 @@
1
+ export declare type Alignment = 'start' | 'end';
2
+ export declare type Side = 'top' | 'right' | 'bottom' | 'left';
3
+ export declare type AlignedPlacement = `${Side}-${Alignment}`;
4
+ export declare type Placement = Side | AlignedPlacement;
5
+ interface AxesOffsets {
6
+ /**
7
+ * 浮动元素与参考元素之间的间距
8
+ *
9
+ * @author lxm
10
+ * @date 2022-11-16 18:11:27
11
+ * @type {number}
12
+ */
13
+ mainAxis?: number;
14
+ /**
15
+ * 浮动元素与参考元素之间的偏移量,与mainAxis垂直
16
+ *
17
+ * @author lxm
18
+ * @date 2022-11-16 18:11:49
19
+ * @type {number}
20
+ */
21
+ crossAxis?: number;
22
+ alignmentAxis?: number | null;
23
+ }
24
+
25
+ /**
26
+ * 飘窗参数
27
+ *
28
+ * @author chitanda
29
+ * @date 2022-11-08 16:11:37
30
+ * @export
31
+ * @interface IPopoverOptions
32
+ */
33
+ export interface IPopoverOptions {
34
+ /**
35
+ * 宽度
36
+ *
37
+ * @author chitanda
38
+ * @date 2022-11-08 16:11:26
39
+ * @type {string}
40
+ */
41
+ width?: string;
42
+ /**
43
+ * 高度
44
+ *
45
+ * @author chitanda
46
+ * @date 2022-11-08 16:11:33
47
+ * @type {string}
48
+ */
49
+ height?: string;
50
+ /**
51
+ * 展示方向
52
+ *
53
+ * @author chitanda
54
+ * @date 2022-11-08 16:11:41
55
+ * @type {Placement}
56
+ */
57
+ placement?: Placement;
58
+ /**
59
+ * 是否自动关闭
60
+ *
61
+ * @default true
62
+ * @author chitanda
63
+ * @date 2022-11-08 16:11:43
64
+ * @type {boolean}
65
+ */
66
+ autoClose?: boolean;
67
+
68
+ /**
69
+ * offset的参数
70
+ *
71
+ * @author lxm
72
+ * @date 2022-11-16 18:11:13
73
+ * @type {(AxesOffsets | number)}
74
+ */
75
+ offsetOpts?: AxesOffsets | number;
76
+
77
+ /**
78
+ * 不显示箭头
79
+ *
80
+ * @author lxm
81
+ * @date 2022-11-16 20:11:58
82
+ * @type {boolean}
83
+ */
84
+ noArrow?: boolean;
85
+ }
@@ -0,0 +1,33 @@
1
+ import { IBizContext } from '@ibiz-template/core';
2
+ import { IPSAppDEUIAction } from '@ibiz-template/model';
3
+ import { IUIActionResult } from '../i-ui-action-result/i-ui-action-result';
4
+
5
+ /**
6
+ * 界面行为处理器接口
7
+ *
8
+ * @author lxm
9
+ * @date 2022-10-25 14:10:59
10
+ * @export
11
+ * @interface IUIActionHandler
12
+ */
13
+ export interface IUIActionHandler {
14
+ /**
15
+ * 执行界面行为
16
+ *
17
+ * @author lxm
18
+ * @date 2022-10-25 14:10:15
19
+ * @param {IPSAppDEUIAction} action 界面行为模型
20
+ * @param {IBizContext} context 上下文
21
+ * @param {(IData[] | null)} data 数据集合
22
+ * @param {IParams} params 视图参数
23
+ * @param {IData} [opts] 额外参数
24
+ * @returns {*} {Promise<IUIActionResult>}
25
+ */
26
+ exec(
27
+ action: IPSAppDEUIAction,
28
+ context: IBizContext,
29
+ data: IData[] | null,
30
+ params: IParams,
31
+ opts?: IData,
32
+ ): Promise<IUIActionResult>;
33
+ }
@@ -1,7 +1,14 @@
1
+ export { IDrawerOptions } from './i-drawer-options/i-drawer-options';
2
+ export {
3
+ IPopoverOptions,
4
+ Placement,
5
+ } from './i-popover-options/i-popover-options';
1
6
  export { IModal } from './i-modal/i-modal';
2
7
  export { IModalData } from './i-modal-data/i-modal-data';
8
+ export { IModalOptions } from './i-modal-options/i-modal-options';
9
+ export { IPluginFactory } from './i-plugin-factory/i-plugin-factory';
3
10
  export { IUIActionResult } from './i-ui-action-result/i-ui-action-result';
11
+ export { IUIActionHandler } from './i-ui-action-handler/i-ui-action-handler';
4
12
  export * from './util';
5
- export * from './provider/i-editor-provider';
6
- export * from './register/i-register';
7
- export * from './register/i-editor-register';
13
+ export * from './provider';
14
+ export * from './register';
@@ -0,0 +1,20 @@
1
+ import { IUIActionHandler } from '../i-ui-action-handler/i-ui-action-handler';
2
+
3
+ /**
4
+ * 界面行为适配器的接口
5
+ *
6
+ * @author lxm
7
+ * @date 2022-10-25 13:10:45
8
+ * @export
9
+ * @interface IUIActionProvider
10
+ */
11
+ export interface IUIActionProvider {
12
+ /**
13
+ * 获取界面行为处理器
14
+ *
15
+ * @author lxm
16
+ * @date 2022-10-25 15:10:52
17
+ * @returns {*} {Promise<IUIActionHandler>}
18
+ */
19
+ getHandler(): Promise<IUIActionHandler>;
20
+ }
@@ -0,0 +1 @@
1
+ export * from './i-ui-action-provider';
@@ -7,6 +7,13 @@
7
7
  * @interface IRegister
8
8
  */
9
9
  export interface IRegister<T> {
10
+ /**
11
+ * 适配器集合
12
+ *
13
+ * @author lxm
14
+ * @date 2022-10-17 16:10:54
15
+ * @type {Map<string, T>}
16
+ */
10
17
  providers: Map<string, T>;
11
18
 
12
19
  /**
@@ -36,5 +43,5 @@ export interface IRegister<T> {
36
43
  * @param {string} key
37
44
  * @returns {*} {T}
38
45
  */
39
- get(key: string): T | undefined;
46
+ getByKey(key: string): T | undefined;
40
47
  }
@@ -0,0 +1,15 @@
1
+ import { IPSAppUIAction } from '@ibiz-template/model';
2
+ import { IUIActionProvider } from '../provider';
3
+ import { IRegister } from './i-register';
4
+
5
+ export interface IUIActionRegister extends IRegister<IUIActionProvider> {
6
+ /**
7
+ * 获取适配器
8
+ *
9
+ * @author lxm
10
+ * @date 2022-09-20 00:09:57
11
+ * @param {IPSAppUIAction} model 界面行为模型
12
+ * @returns {*} {(IEditorProvider)}
13
+ */
14
+ get(model: IPSAppUIAction): Promise<IUIActionProvider>;
15
+ }
@@ -0,0 +1,2 @@
1
+ export * from './i-register';
2
+ export * from './i-ui-action-register';
@@ -22,4 +22,18 @@ 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
  }
@@ -51,6 +51,7 @@ export interface IOpenViewUtil {
51
51
  */
52
52
  popover(
53
53
  appView: IPSAppView,
54
+ event: MouseEvent,
54
55
  context?: IBizContext,
55
56
  params?: IParams,
56
57
  ): Promise<IModalData>;