@ibiz-template/runtime 0.4.6-dev.0 → 0.4.8-dev.0

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 (60) hide show
  1. package/dist/index.esm.js +153 -96
  2. package/dist/index.system.min.js +2 -2
  3. package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.d.ts.map +1 -1
  4. package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.js +1 -1
  5. package/out/controller/control/data-view/data-view.controller.d.ts.map +1 -1
  6. package/out/controller/control/data-view/data-view.controller.js +3 -3
  7. package/out/controller/control/form/form-detail/form-button/form-button.controller.d.ts.map +1 -1
  8. package/out/controller/control/form/form-detail/form-button/form-button.controller.js +1 -1
  9. package/out/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.d.ts.map +1 -1
  10. package/out/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.js +1 -1
  11. package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.d.ts.map +1 -1
  12. package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.js +1 -1
  13. package/out/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.d.ts.map +1 -1
  14. package/out/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.js +1 -1
  15. package/out/controller/control/md-ctrl/md-ctrl.controller.d.ts.map +1 -1
  16. package/out/controller/control/md-ctrl/md-ctrl.controller.js +1 -1
  17. package/out/controller/control/toolbar/toolbar.controllerr.d.ts.map +1 -1
  18. package/out/controller/control/toolbar/toolbar.controllerr.js +2 -2
  19. package/out/controller/control/tree/tree.controller.d.ts +5 -3
  20. package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
  21. package/out/controller/control/tree/tree.controller.js +6 -4
  22. package/out/controller/utils/button-state/ui-action-button.state.js +1 -1
  23. package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts +3 -3
  24. package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts.map +1 -1
  25. package/out/interface/controller/controller/control/i-tree.controller.d.ts +5 -3
  26. package/out/interface/controller/controller/control/i-tree.controller.d.ts.map +1 -1
  27. package/out/interface/logic-scheduler/i-scheduler-logic.d.ts +8 -0
  28. package/out/interface/logic-scheduler/i-scheduler-logic.d.ts.map +1 -1
  29. package/out/logic-scheduler/executor/app-ui-action-executor.d.ts.map +1 -1
  30. package/out/logic-scheduler/executor/app-ui-action-executor.js +1 -1
  31. package/out/model/ui-action/ui-action.d.ts +1 -1
  32. package/out/model/ui-action/ui-action.d.ts.map +1 -1
  33. package/out/model/ui-action/ui-action.js +1 -2
  34. package/out/ui-action/provider/ui-action-provider-base.d.ts +1 -1
  35. package/out/ui-action/provider/ui-action-provider-base.d.ts.map +1 -1
  36. package/out/ui-action/provider/ui-action-provider-base.js +4 -4
  37. package/out/ui-action/uiaction-util.d.ts +2 -2
  38. package/out/ui-action/uiaction-util.d.ts.map +1 -1
  39. package/out/ui-action/uiaction-util.js +4 -4
  40. package/out/ui-logic/ui-logic-node/de-ui-action-node/de-ui-action-node.d.ts.map +1 -1
  41. package/out/ui-logic/ui-logic-node/de-ui-action-node/de-ui-action-node.js +1 -1
  42. package/package.json +3 -3
  43. package/src/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.ts +11 -7
  44. package/src/controller/control/data-view/data-view.controller.ts +33 -21
  45. package/src/controller/control/form/form-detail/form-button/form-button.controller.ts +12 -8
  46. package/src/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.ts +11 -7
  47. package/src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts +11 -7
  48. package/src/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.ts +11 -7
  49. package/src/controller/control/md-ctrl/md-ctrl.controller.ts +11 -7
  50. package/src/controller/control/toolbar/toolbar.controllerr.ts +10 -6
  51. package/src/controller/control/tree/tree.controller.ts +14 -7
  52. package/src/controller/utils/button-state/ui-action-button.state.ts +1 -1
  53. package/src/interface/common/i-app-hub-service/i-app-hub-service.ts +3 -3
  54. package/src/interface/controller/controller/control/i-tree.controller.ts +5 -2
  55. package/src/interface/logic-scheduler/i-scheduler-logic.ts +9 -0
  56. package/src/logic-scheduler/executor/app-ui-action-executor.ts +5 -1
  57. package/src/model/ui-action/ui-action.ts +1 -1
  58. package/src/ui-action/provider/ui-action-provider-base.ts +8 -3
  59. package/src/ui-action/uiaction-util.ts +4 -2
  60. package/src/ui-logic/ui-logic-node/de-ui-action-node/de-ui-action-node.ts +10 -6
package/dist/index.esm.js CHANGED
@@ -912,8 +912,7 @@ function findFieldById(entity, fieldId) {
912
912
  }
913
913
 
914
914
  // src/model/ui-action/ui-action.ts
915
- async function getUIActionById(id) {
916
- const [, , appId] = id.split("@");
915
+ async function getUIActionById(id, appId) {
917
916
  const app = ibiz.hub.getApp(appId);
918
917
  return app.getUIAction(id);
919
918
  }
@@ -10130,7 +10129,7 @@ var UIActionButtonState = class {
10130
10129
  this.isInit = true;
10131
10130
  return;
10132
10131
  }
10133
- const uiAction = await getUIActionById(this.uiActionId);
10132
+ const uiAction = await getUIActionById(this.uiActionId, this.appId);
10134
10133
  [, this.appDeName] = this.uiActionId.split("@");
10135
10134
  if (!uiAction) {
10136
10135
  return;
@@ -14448,12 +14447,16 @@ var DEUIActionNode = class extends UILogicNode {
14448
14447
  actionData = [param];
14449
14448
  }
14450
14449
  }
14451
- await UIActionUtil.execAndResolved(dstAppDEUIActionId, {
14452
- ...parameters,
14453
- context: ctx.context,
14454
- params: ctx.viewParam,
14455
- data: actionData
14456
- });
14450
+ await UIActionUtil.execAndResolved(
14451
+ dstAppDEUIActionId,
14452
+ {
14453
+ ...parameters,
14454
+ context: ctx.context,
14455
+ params: ctx.viewParam,
14456
+ data: actionData
14457
+ },
14458
+ this.model.appId
14459
+ );
14457
14460
  }
14458
14461
  };
14459
14462
 
@@ -15319,8 +15322,8 @@ var UIActionUtil = class {
15319
15322
  * @param {IUILogicParams} params 界面行为参数
15320
15323
  * @return {*} {Promise<IUIActionResult>}
15321
15324
  */
15322
- static async exec(actionId, params) {
15323
- const action = await getUIActionById(actionId);
15325
+ static async exec(actionId, params, appId) {
15326
+ const action = await getUIActionById(actionId, appId);
15324
15327
  if (!action) {
15325
15328
  throw new RuntimeError43("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
15326
15329
  }
@@ -15341,9 +15344,9 @@ var UIActionUtil = class {
15341
15344
  * @param {string} actionId 界面行为id
15342
15345
  * @param {IUILogicParams} params 界面行为参数
15343
15346
  */
15344
- static async execAndResolved(actionId, params) {
15347
+ static async execAndResolved(actionId, params, appId) {
15345
15348
  var _a, _b;
15346
- const result = await this.exec(actionId, params);
15349
+ const result = await this.exec(actionId, params, appId);
15347
15350
  if (result.closeView) {
15348
15351
  params.view.modal.ignoreDismissCheck = true;
15349
15352
  params.view.closeView({ ok: true });
@@ -15404,9 +15407,13 @@ var UIActionProviderBase = class {
15404
15407
  params: result.nextParams || params
15405
15408
  };
15406
15409
  if (action.closeEditView) {
15407
- this.doNextAction(action, nextActionParams);
15410
+ this.doNextAction(action, nextActionParams, action.appId);
15408
15411
  } else {
15409
- const nextResult = await this.doNextAction(action, nextActionParams);
15412
+ const nextResult = await this.doNextAction(
15413
+ action,
15414
+ nextActionParams,
15415
+ action.appId
15416
+ );
15410
15417
  if (nextResult) {
15411
15418
  Object.assign(result, nextResult);
15412
15419
  if (nextResult.cancel === true) {
@@ -15464,10 +15471,10 @@ var UIActionProviderBase = class {
15464
15471
  * @param {(IData | undefined)} [opts]
15465
15472
  * @returns {*} {Promise<void>}
15466
15473
  */
15467
- async doNextAction(action, params) {
15474
+ async doNextAction(action, params, appId) {
15468
15475
  const nextActionId = action.nextId;
15469
15476
  if (nextActionId) {
15470
- return UIActionUtil.exec(nextActionId, params);
15477
+ return UIActionUtil.exec(nextActionId, params, appId);
15471
15478
  }
15472
15479
  }
15473
15480
  /**
@@ -16034,7 +16041,7 @@ var ToolbarController = class extends ControlController {
16034
16041
  async doUIAction(item, event, param = {}) {
16035
16042
  if (item.itemType === "DEUIACTION") {
16036
16043
  const actionId = item.uiactionId;
16037
- const uiAction = await getUIActionById(actionId);
16044
+ const uiAction = await getUIActionById(actionId, item.appId);
16038
16045
  if (!uiAction) {
16039
16046
  throw new RuntimeError45("\u6CA1\u6709\u627E\u5230\u754C\u9762\u884C\u4E3A\u6A21\u578B".concat(actionId));
16040
16047
  }
@@ -16047,11 +16054,15 @@ var ToolbarController = class extends ControlController {
16047
16054
  const data = res || [];
16048
16055
  const args = this.getEventArgs();
16049
16056
  args.params = Object.assign(param, args.params);
16050
- await UIActionUtil.execAndResolved(actionId, {
16051
- ...args,
16052
- data,
16053
- event
16054
- });
16057
+ await UIActionUtil.execAndResolved(
16058
+ actionId,
16059
+ {
16060
+ ...args,
16061
+ data,
16062
+ event
16063
+ },
16064
+ item.appId
16065
+ );
16055
16066
  } finally {
16056
16067
  if (enableLoading) {
16057
16068
  this.state.buttonsState.setLoading("");
@@ -16522,13 +16533,17 @@ var PortletPartController = class {
16522
16533
  */
16523
16534
  async onActionClick(detail, event, data = []) {
16524
16535
  const actionId = detail.uiactionId;
16525
- await UIActionUtil.execAndResolved(actionId, {
16526
- context: this.dashboard.context,
16527
- params: this.dashboard.params,
16528
- data,
16529
- view: this.dashboard.view,
16530
- event
16531
- });
16536
+ await UIActionUtil.execAndResolved(
16537
+ actionId,
16538
+ {
16539
+ context: this.dashboard.context,
16540
+ params: this.dashboard.params,
16541
+ data,
16542
+ view: this.dashboard.view,
16543
+ event
16544
+ },
16545
+ detail.appId
16546
+ );
16532
16547
  }
16533
16548
  /**
16534
16549
  * 表单数据变更通知(由表单控制器调用)
@@ -16849,13 +16864,17 @@ var DataViewControlController = class extends MDControlController {
16849
16864
  */
16850
16865
  async onActionClick(detail, item, event) {
16851
16866
  const actionId = detail.uiactionId;
16852
- await UIActionUtil.execAndResolved(actionId, {
16853
- context: this.context,
16854
- params: this.params,
16855
- data: [item],
16856
- view: this.view,
16857
- event
16858
- });
16867
+ await UIActionUtil.execAndResolved(
16868
+ actionId,
16869
+ {
16870
+ context: this.context,
16871
+ params: this.params,
16872
+ data: [item],
16873
+ view: this.view,
16874
+ event
16875
+ },
16876
+ detail.appId
16877
+ );
16859
16878
  }
16860
16879
  /**
16861
16880
  * 处理数据分组
@@ -16990,13 +17009,17 @@ var DataViewControlController = class extends MDControlController {
16990
17009
  */
16991
17010
  onClickNew(event, group) {
16992
17011
  const params = { ...this.params, srfgroup: group };
16993
- UIActionUtil.execAndResolved("new", {
16994
- context: this.context,
16995
- params,
16996
- data: [],
16997
- view: this.view,
16998
- event
16999
- });
17012
+ UIActionUtil.execAndResolved(
17013
+ "new",
17014
+ {
17015
+ context: this.context,
17016
+ params,
17017
+ data: [],
17018
+ view: this.view,
17019
+ event
17020
+ },
17021
+ this.view.model.appId
17022
+ );
17000
17023
  }
17001
17024
  /**
17002
17025
  * 分组工具栏点击处理回调
@@ -17009,13 +17032,17 @@ var DataViewControlController = class extends MDControlController {
17009
17032
  async onGroupToolbarClick(detail, event, group) {
17010
17033
  const actionId = detail.uiactionId;
17011
17034
  const params = { ...this.params, srfgroup: group.key };
17012
- await UIActionUtil.execAndResolved(actionId, {
17013
- context: this.context,
17014
- params,
17015
- data: group.selectedData || [],
17016
- view: this.view,
17017
- event
17018
- });
17035
+ await UIActionUtil.execAndResolved(
17036
+ actionId,
17037
+ {
17038
+ context: this.context,
17039
+ params,
17040
+ data: group.selectedData || [],
17041
+ view: this.view,
17042
+ event
17043
+ },
17044
+ detail.appId
17045
+ );
17019
17046
  }
17020
17047
  /**
17021
17048
  * 初始化排序项集合
@@ -18779,14 +18806,18 @@ var FormButtonController = class extends FormDetailController {
18779
18806
  */
18780
18807
  async doUIAction(event) {
18781
18808
  const actionId = this.model.uiactionId;
18782
- await UIActionUtil.execAndResolved(actionId, {
18783
- context: this.form.context,
18784
- params: this.form.params,
18785
- data: [this.data],
18786
- view: this.form.view,
18787
- event,
18788
- noWaitRoute: true
18789
- });
18809
+ await UIActionUtil.execAndResolved(
18810
+ actionId,
18811
+ {
18812
+ context: this.form.context,
18813
+ params: this.form.params,
18814
+ data: [this.data],
18815
+ view: this.form.view,
18816
+ event,
18817
+ noWaitRoute: true
18818
+ },
18819
+ this.model.appId
18820
+ );
18790
18821
  }
18791
18822
  /**
18792
18823
  * 执行表单项更新
@@ -19060,13 +19091,17 @@ var FormGroupPanelController = class extends FormDetailController {
19060
19091
  */
19061
19092
  async onActionClick(detail, event) {
19062
19093
  const actionId = detail.uiactionId;
19063
- await UIActionUtil.execAndResolved(actionId, {
19064
- context: this.form.context,
19065
- params: this.form.params,
19066
- data: [this.data],
19067
- view: this.form.view,
19068
- event
19069
- });
19094
+ await UIActionUtil.execAndResolved(
19095
+ actionId,
19096
+ {
19097
+ context: this.form.context,
19098
+ params: this.form.params,
19099
+ data: [this.data],
19100
+ view: this.form.view,
19101
+ event
19102
+ },
19103
+ detail.appId
19104
+ );
19070
19105
  }
19071
19106
  };
19072
19107
 
@@ -22007,13 +22042,17 @@ var GridFieldColumnController = class extends GridColumnController {
22007
22042
  */
22008
22043
  async triggerAction(row, event) {
22009
22044
  const actionId = this.model.deuiactionId;
22010
- await UIActionUtil.execAndResolved(actionId, {
22011
- context: this.context,
22012
- params: this.params,
22013
- data: [row.data],
22014
- view: this.grid.view,
22015
- event
22016
- });
22045
+ await UIActionUtil.execAndResolved(
22046
+ actionId,
22047
+ {
22048
+ context: this.context,
22049
+ params: this.params,
22050
+ data: [row.data],
22051
+ view: this.grid.view,
22052
+ event
22053
+ },
22054
+ this.model.appId
22055
+ );
22017
22056
  }
22018
22057
  /**
22019
22058
  * 加载代码表数据
@@ -22164,13 +22203,17 @@ var GridUAColumnController = class extends GridColumnController {
22164
22203
  */
22165
22204
  async onActionClick(detail, row, event) {
22166
22205
  const actionId = detail.uiactionId;
22167
- await UIActionUtil.execAndResolved(actionId, {
22168
- context: this.context,
22169
- params: this.params,
22170
- data: [row.data],
22171
- view: this.grid.view,
22172
- event
22173
- });
22206
+ await UIActionUtil.execAndResolved(
22207
+ actionId,
22208
+ {
22209
+ context: this.context,
22210
+ params: this.params,
22211
+ data: [row.data],
22212
+ view: this.grid.view,
22213
+ event
22214
+ },
22215
+ detail.appId
22216
+ );
22174
22217
  }
22175
22218
  };
22176
22219
 
@@ -24384,21 +24427,27 @@ var TreeController = class extends MDControlController {
24384
24427
  }
24385
24428
  /**
24386
24429
  * 执行界面行为
24387
- * @author lxm
24388
- * @date 2023-07-27 05:31:36
24430
+ *
24431
+ * @author chitanda
24432
+ * @date 2023-12-07 15:12:26
24389
24433
  * @param {string} uiActionId
24390
24434
  * @param {ITreeNodeData} nodeData
24391
24435
  * @param {MouseEvent} event
24436
+ * @param {string} appId
24392
24437
  * @return {*} {Promise<void>}
24393
24438
  */
24394
- async doUIAction(uiActionId, nodeData, event) {
24439
+ async doUIAction(uiActionId, nodeData, event, appId) {
24395
24440
  const eventArgs = this.getEventArgs();
24396
24441
  const nodeParams = this.parseTreeNodeData(nodeData);
24397
- const result = await UIActionUtil.exec(uiActionId, {
24398
- ...eventArgs,
24399
- ...nodeParams,
24400
- event
24401
- });
24442
+ const result = await UIActionUtil.exec(
24443
+ uiActionId,
24444
+ {
24445
+ ...eventArgs,
24446
+ ...nodeParams,
24447
+ event
24448
+ },
24449
+ appId
24450
+ );
24402
24451
  if (result.closeView) {
24403
24452
  this.view.closeView();
24404
24453
  } else if (result.refresh) {
@@ -25010,13 +25059,17 @@ var MDCtrlController = class extends MDControlController {
25010
25059
  */
25011
25060
  async onActionClick(detail, row, event) {
25012
25061
  const actionId = detail.uiactionId;
25013
- await UIActionUtil.execAndResolved(actionId, {
25014
- context: this.context,
25015
- params: this.params,
25016
- data: [row.data],
25017
- view: this.view,
25018
- event
25019
- });
25062
+ await UIActionUtil.execAndResolved(
25063
+ actionId,
25064
+ {
25065
+ context: this.context,
25066
+ params: this.params,
25067
+ data: [row.data],
25068
+ view: this.view,
25069
+ event
25070
+ },
25071
+ detail.appId
25072
+ );
25020
25073
  }
25021
25074
  /**
25022
25075
  * 初始化按钮状态
@@ -28495,7 +28548,11 @@ var AppDEUIActionExecutor = class extends LogicExecutor {
28495
28548
  "\u903B\u8F91\u4E2D\u7F3A\u5C11\u89E6\u53D1\u5E94\u7528\u5B9E\u4F53\u754C\u9762\u884C\u4E3Aid"
28496
28549
  );
28497
28550
  }
28498
- UIActionUtil.execAndResolved(this.logic.appDEUIActionId, executeParams);
28551
+ UIActionUtil.execAndResolved(
28552
+ this.logic.appDEUIActionId,
28553
+ executeParams,
28554
+ this.logic.appId
28555
+ );
28499
28556
  }
28500
28557
  };
28501
28558