@ibiz-template/runtime 0.1.5 → 0.1.7
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.
- package/dist/index.esm.js +188 -85
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/out/command/app/open-app-view/open-app-view.d.ts +3 -3
- package/out/command/app/open-app-view/open-app-view.d.ts.map +1 -1
- package/out/command/app/open-app-view/open-app-view.js +4 -1
- package/out/controller/common/base.controller.js +1 -1
- package/out/controller/common/control/control.controller.js +1 -1
- package/out/controller/common/control/md-control.controller.js +1 -1
- package/out/controller/common/view/view.controller.d.ts.map +1 -1
- package/out/controller/common/view/view.controller.js +13 -3
- package/out/controller/ctx/ctx.d.ts.map +1 -1
- package/out/controller/ctx/ctx.js +1 -1
- package/out/interface/common/i-open-view-options/i-open-view-options.d.ts +38 -0
- package/out/interface/common/i-open-view-options/i-open-view-options.d.ts.map +1 -0
- package/out/interface/common/i-open-view-options/i-open-view-options.js +1 -0
- package/out/interface/common/index.d.ts +1 -0
- package/out/interface/common/index.d.ts.map +1 -1
- package/out/interface/controller/common/i-nav-view-msg/i-nav-view-msg.d.ts +45 -0
- package/out/interface/controller/common/i-nav-view-msg/i-nav-view-msg.d.ts.map +1 -0
- package/out/interface/controller/common/i-nav-view-msg/i-nav-view-msg.js +1 -0
- package/out/interface/controller/common/index.d.ts +1 -0
- package/out/interface/controller/common/index.d.ts.map +1 -1
- package/out/interface/controller/common/index.js +1 -0
- package/out/interface/controller/controller/control/i-exp-bar-control.controller.d.ts +11 -0
- package/out/interface/controller/controller/control/i-exp-bar-control.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-tree-exp-bar.controller.d.ts +0 -11
- package/out/interface/controller/controller/control/i-tree-exp-bar.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/panel-item/i-panel-item-nav-pos.controller.d.ts +1 -46
- package/out/interface/controller/controller/control/panel-item/i-panel-item-nav-pos.controller.d.ts.map +1 -1
- package/out/interface/controller/event/argument/control-trigger.event.d.ts +33 -0
- package/out/interface/controller/event/argument/control-trigger.event.d.ts.map +1 -0
- package/out/interface/controller/event/argument/control-trigger.event.js +1 -0
- package/out/interface/controller/event/argument/index.d.ts +2 -0
- package/out/interface/controller/event/argument/index.d.ts.map +1 -1
- package/out/interface/controller/event/argument/nav-view-change.event.d.ts +20 -0
- package/out/interface/controller/event/argument/nav-view-change.event.d.ts.map +1 -0
- package/out/interface/controller/event/argument/nav-view-change.event.js +1 -0
- package/out/interface/controller/event/control/i-exp-bar-control.event.d.ts +11 -0
- package/out/interface/controller/event/control/i-exp-bar-control.event.d.ts.map +1 -1
- package/out/interface/controller/event/control/i-panel.event.d.ts +15 -1
- package/out/interface/controller/event/control/i-panel.event.d.ts.map +1 -1
- package/out/interface/controller/event/control/i-tab-exp-panel.event.d.ts +11 -0
- package/out/interface/controller/event/control/i-tab-exp-panel.event.d.ts.map +1 -1
- package/out/interface/controller/work-flow/wf-link.d.ts +4 -4
- package/out/interface/logic-scheduler/i-scheduler-logic.d.ts +5 -3
- package/out/interface/logic-scheduler/i-scheduler-logic.d.ts.map +1 -1
- package/out/interface/logic-scheduler/i-trigger-match-params.d.ts +5 -0
- package/out/interface/logic-scheduler/i-trigger-match-params.d.ts.map +1 -1
- package/out/interface/util/i-confirm-util/i-confirm-util.d.ts +82 -0
- package/out/interface/util/i-confirm-util/i-confirm-util.d.ts.map +1 -0
- package/out/interface/util/i-confirm-util/i-confirm-util.js +1 -0
- package/out/interface/util/i-modal-util/i-modal-util.d.ts +8 -0
- package/out/interface/util/i-modal-util/i-modal-util.d.ts.map +1 -1
- package/out/interface/util/index.d.ts +1 -0
- package/out/interface/util/index.d.ts.map +1 -1
- package/out/logic-scheduler/index.d.ts.map +1 -1
- package/out/logic-scheduler/index.js +2 -0
- package/out/logic-scheduler/scheduler/logic-scheduler.d.ts +24 -1
- package/out/logic-scheduler/scheduler/logic-scheduler.d.ts.map +1 -1
- package/out/logic-scheduler/scheduler/logic-scheduler.js +39 -0
- package/out/logic-scheduler/trigger/control-event-trigger.d.ts +27 -0
- package/out/logic-scheduler/trigger/control-event-trigger.d.ts.map +1 -0
- package/out/logic-scheduler/trigger/control-event-trigger.js +33 -0
- package/out/logic-scheduler/trigger/view-event-trigger.d.ts +8 -0
- package/out/logic-scheduler/trigger/view-event-trigger.d.ts.map +1 -1
- package/out/logic-scheduler/trigger/view-event-trigger.js +8 -0
- package/out/service/dto/method.dto.d.ts.map +1 -1
- package/out/service/dto/method.dto.js +3 -9
- package/out/service/service/code-list/code-list.service.d.ts.map +1 -1
- package/out/service/service/code-list/code-list.service.js +5 -1
- package/out/types.d.ts +19 -1
- package/out/types.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/bind-param-node/bind-param-node.d.ts +17 -0
- package/out/ui-logic/ui-logic-node/bind-param-node/bind-param-node.d.ts.map +1 -0
- package/out/ui-logic/ui-logic-node/bind-param-node/bind-param-node.js +22 -0
- package/out/ui-logic/ui-logic-node/index.d.ts +1 -0
- package/out/ui-logic/ui-logic-node/index.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/index.js +1 -0
- package/out/ui-logic/ui-logic-param/ui-logic-param.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-param/ui-logic-param.js +2 -2
- package/out/ui-logic/ui-logic.d.ts.map +1 -1
- package/out/ui-logic/ui-logic.js +5 -3
- package/out/ui-logic/utils/handle-src-val.d.ts.map +1 -1
- package/out/ui-logic/utils/handle-src-val.js +2 -4
- package/out/utils/open-redirect-view/open-redirect-view.d.ts +4 -4
- package/out/utils/open-redirect-view/open-redirect-view.d.ts.map +1 -1
- package/out/utils/open-redirect-view/open-redirect-view.js +10 -9
- package/out/utils/wf-helper/wf-helper.js +2 -2
- package/package.json +3 -3
- package/src/command/app/open-app-view/open-app-view.ts +8 -5
- package/src/controller/common/base.controller.ts +1 -1
- package/src/controller/common/control/control.controller.ts +1 -1
- package/src/controller/common/control/md-control.controller.ts +1 -1
- package/src/controller/common/view/view.controller.ts +16 -3
- package/src/controller/ctx/ctx.ts +1 -1
- package/src/interface/common/i-open-view-options/i-open-view-options.ts +40 -0
- package/src/interface/common/index.ts +1 -0
- package/src/interface/controller/common/i-nav-view-msg/i-nav-view-msg.ts +48 -0
- package/src/interface/controller/common/index.ts +1 -0
- package/src/interface/controller/controller/control/i-exp-bar-control.controller.ts +12 -0
- package/src/interface/controller/controller/control/i-tree-exp-bar.controller.ts +1 -17
- package/src/interface/controller/controller/control/panel-item/i-panel-item-nav-pos.controller.ts +1 -52
- package/src/interface/controller/event/argument/control-trigger.event.ts +35 -0
- package/src/interface/controller/event/argument/index.ts +2 -0
- package/src/interface/controller/event/argument/nav-view-change.event.ts +20 -0
- package/src/interface/controller/event/control/i-exp-bar-control.event.ts +13 -1
- package/src/interface/controller/event/control/i-panel.event.ts +15 -1
- package/src/interface/controller/event/control/i-tab-exp-panel.event.ts +13 -1
- package/src/interface/controller/work-flow/wf-link.ts +4 -4
- package/src/interface/logic-scheduler/i-scheduler-logic.ts +6 -3
- package/src/interface/logic-scheduler/i-trigger-match-params.ts +6 -0
- package/src/interface/util/i-confirm-util/i-confirm-util.ts +82 -0
- package/src/interface/util/i-modal-util/i-modal-util.ts +8 -0
- package/src/interface/util/index.ts +1 -0
- package/src/logic-scheduler/index.ts +5 -0
- package/src/logic-scheduler/scheduler/logic-scheduler.ts +43 -0
- package/src/logic-scheduler/trigger/control-event-trigger.ts +45 -0
- package/src/logic-scheduler/trigger/view-event-trigger.ts +8 -0
- package/src/service/dto/method.dto.ts +3 -8
- package/src/service/service/code-list/code-list.service.ts +8 -1
- package/src/types.ts +21 -0
- package/src/ui-logic/ui-logic-node/bind-param-node/bind-param-node.ts +30 -0
- package/src/ui-logic/ui-logic-node/index.ts +1 -0
- package/src/ui-logic/ui-logic-param/ui-logic-param.ts +5 -2
- package/src/ui-logic/ui-logic.ts +5 -2
- package/src/ui-logic/utils/handle-src-val.ts +3 -6
- package/src/utils/open-redirect-view/open-redirect-view.ts +10 -8
- package/src/utils/wf-helper/wf-helper.ts +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -960,15 +960,15 @@ function getViewEngines(view) {
|
|
|
960
960
|
}
|
|
961
961
|
|
|
962
962
|
// src/utils/open-redirect-view/open-redirect-view.ts
|
|
963
|
-
async function openRedirectView(appView, context, params = {},
|
|
963
|
+
async function openRedirectView(appView, context, params = {}, opts = {}) {
|
|
964
964
|
return openDERedirectView(
|
|
965
965
|
appView,
|
|
966
966
|
context,
|
|
967
967
|
params,
|
|
968
|
-
|
|
968
|
+
opts
|
|
969
969
|
);
|
|
970
970
|
}
|
|
971
|
-
async function toLocalOpenWFRedirectView(context, linkUrl) {
|
|
971
|
+
async function toLocalOpenWFRedirectView(context, linkUrl, opts = {}) {
|
|
972
972
|
const i = linkUrl.lastIndexOf("?");
|
|
973
973
|
const queryStr = decodeURIComponent(
|
|
974
974
|
linkUrl.substring(i + 1, linkUrl.length)
|
|
@@ -1003,10 +1003,12 @@ async function toLocalOpenWFRedirectView(context, linkUrl) {
|
|
|
1003
1003
|
OpenAppViewCommand.TAG,
|
|
1004
1004
|
deRdView.id,
|
|
1005
1005
|
context,
|
|
1006
|
-
params
|
|
1006
|
+
params,
|
|
1007
|
+
opts
|
|
1007
1008
|
);
|
|
1008
1009
|
}
|
|
1009
|
-
async function openDERedirectView(appView, context, params = {},
|
|
1010
|
+
async function openDERedirectView(appView, context, params = {}, opts = {}) {
|
|
1011
|
+
var _a;
|
|
1010
1012
|
const navContext = appView.appViewNavContexts || [];
|
|
1011
1013
|
const navContextData = convertNavData(navContext, context, params);
|
|
1012
1014
|
context = Object.assign(context.clone(), navContextData);
|
|
@@ -1015,7 +1017,7 @@ async function openDERedirectView(appView, context, params = {}, data = []) {
|
|
|
1015
1017
|
Object.assign(params, navParamsData);
|
|
1016
1018
|
const entityId = appView.appDataEntityId;
|
|
1017
1019
|
const key = calcDeCodeNameById(entityId);
|
|
1018
|
-
let curData = data[0] || {};
|
|
1020
|
+
let curData = ((_a = opts.data) == null ? void 0 : _a[0]) || {};
|
|
1019
1021
|
context[key] = curData[key] || context[key] || params[key];
|
|
1020
1022
|
const actionId = appView.getDataAppDEActionId;
|
|
1021
1023
|
const app = ibiz.hub.getApp(appView.appId);
|
|
@@ -1044,7 +1046,7 @@ async function openDERedirectView(appView, context, params = {}, data = []) {
|
|
|
1044
1046
|
});
|
|
1045
1047
|
}
|
|
1046
1048
|
if (linkUrl.startsWith("appredirectview?")) {
|
|
1047
|
-
await toLocalOpenWFRedirectView(context, linkUrl);
|
|
1049
|
+
await toLocalOpenWFRedirectView(context, linkUrl, opts);
|
|
1048
1050
|
return { ok: true, data: [] };
|
|
1049
1051
|
}
|
|
1050
1052
|
return { ok: false, data: [] };
|
|
@@ -1070,7 +1072,7 @@ async function openDERedirectView(appView, context, params = {}, data = []) {
|
|
|
1070
1072
|
viewId,
|
|
1071
1073
|
context,
|
|
1072
1074
|
params,
|
|
1073
|
-
{ data: [curData] }
|
|
1075
|
+
{ ...opts, data: [curData] }
|
|
1074
1076
|
);
|
|
1075
1077
|
if (result) {
|
|
1076
1078
|
return result;
|
|
@@ -1126,7 +1128,7 @@ async function calcDERdTag(entity, rdView, params, data) {
|
|
|
1126
1128
|
}
|
|
1127
1129
|
}
|
|
1128
1130
|
if (notNilEmpty2(typeValue)) {
|
|
1129
|
-
rdTag = "".concat(defView, ":").concat(typeValue.toUpperCase());
|
|
1131
|
+
rdTag = "".concat(defView, ":").concat(typeValue.toString().toUpperCase());
|
|
1130
1132
|
} else {
|
|
1131
1133
|
rdTag = "".concat(defView);
|
|
1132
1134
|
}
|
|
@@ -1861,9 +1863,9 @@ function getWFContext(data) {
|
|
|
1861
1863
|
}
|
|
1862
1864
|
function getWFSubmitViewId(view, link) {
|
|
1863
1865
|
var _a;
|
|
1864
|
-
const { type,
|
|
1866
|
+
const { type, sequenceflowview, sequenceflowmobview } = link;
|
|
1865
1867
|
const appViewRefs = ((_a = view.viewLayoutPanel) == null ? void 0 : _a.appViewRefs) || view.appViewRefs;
|
|
1866
|
-
const key = type ? "WFUTILACTION@".concat(type.toUpperCase()) : "WFACTION@".concat(ibiz.env.isMob ?
|
|
1868
|
+
const key = type ? "WFUTILACTION@".concat(type.toUpperCase()) : "WFACTION@".concat(ibiz.env.isMob ? sequenceflowmobview : sequenceflowview);
|
|
1867
1869
|
const submitViewRef = appViewRefs.find((viewRef) => {
|
|
1868
1870
|
return viewRef.name === key;
|
|
1869
1871
|
});
|
|
@@ -2328,7 +2330,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
2328
2330
|
fullViewModel,
|
|
2329
2331
|
context,
|
|
2330
2332
|
params,
|
|
2331
|
-
opts
|
|
2333
|
+
opts
|
|
2332
2334
|
);
|
|
2333
2335
|
}
|
|
2334
2336
|
const { openMode = "INDEXVIEWTAB" } = appView;
|
|
@@ -2397,6 +2399,9 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
2397
2399
|
* @return {*} {Promise<IModalData>}
|
|
2398
2400
|
*/
|
|
2399
2401
|
async openPopover(appView, event, context, params = {}) {
|
|
2402
|
+
if (!event) {
|
|
2403
|
+
throw new RuntimeError4("\u6C14\u6CE1\u6253\u5F00\u7F3A\u5C11event");
|
|
2404
|
+
}
|
|
2400
2405
|
return ibiz.openView.popover(appView, event, context, params);
|
|
2401
2406
|
}
|
|
2402
2407
|
/**
|
|
@@ -3972,8 +3977,15 @@ var CodeListService = class {
|
|
|
3972
3977
|
formatStaticItems(codeItems, isValueNumber) {
|
|
3973
3978
|
return codeItems.map((codeItem) => {
|
|
3974
3979
|
var _a;
|
|
3980
|
+
let text = codeItem.text;
|
|
3981
|
+
if (codeItem.textLanguageRes) {
|
|
3982
|
+
text = ibiz.i18n.t(
|
|
3983
|
+
codeItem.textLanguageRes.lanResTag,
|
|
3984
|
+
codeItem.textLanguageRes.defaultContent
|
|
3985
|
+
);
|
|
3986
|
+
}
|
|
3975
3987
|
const _codeItem = {
|
|
3976
|
-
text
|
|
3988
|
+
text,
|
|
3977
3989
|
value: isValueNumber ? Number(codeItem.value) : codeItem.value,
|
|
3978
3990
|
color: codeItem.color,
|
|
3979
3991
|
id: codeItem.codeName
|
|
@@ -4582,7 +4594,6 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
4582
4594
|
};
|
|
4583
4595
|
|
|
4584
4596
|
// src/service/dto/method.dto.ts
|
|
4585
|
-
import { isNilOrEmpty as isNilOrEmpty5 } from "qx-util";
|
|
4586
4597
|
import { ModelError as ModelError7 } from "@ibiz-template/core";
|
|
4587
4598
|
var MethodDto = class _MethodDto {
|
|
4588
4599
|
constructor(entity, dto) {
|
|
@@ -4615,12 +4626,6 @@ var MethodDto = class _MethodDto {
|
|
|
4615
4626
|
const key = field.codeName.toLowerCase();
|
|
4616
4627
|
switch (field.type) {
|
|
4617
4628
|
case "SIMPLE": {
|
|
4618
|
-
const val = data[key];
|
|
4619
|
-
if (isNilOrEmpty5(val)) {
|
|
4620
|
-
params[key] = null;
|
|
4621
|
-
} else {
|
|
4622
|
-
params[key] = val;
|
|
4623
|
-
}
|
|
4624
4629
|
break;
|
|
4625
4630
|
}
|
|
4626
4631
|
case "DTOS": {
|
|
@@ -4645,7 +4650,7 @@ var MethodDto = class _MethodDto {
|
|
|
4645
4650
|
);
|
|
4646
4651
|
}
|
|
4647
4652
|
}
|
|
4648
|
-
return params;
|
|
4653
|
+
return { ...data, ...params };
|
|
4649
4654
|
}
|
|
4650
4655
|
/**
|
|
4651
4656
|
* 设置本地 DTO 存储
|
|
@@ -8637,17 +8642,17 @@ async function getPortletProvider(model) {
|
|
|
8637
8642
|
}
|
|
8638
8643
|
|
|
8639
8644
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
8640
|
-
import { RuntimeModelError as
|
|
8645
|
+
import { RuntimeModelError as RuntimeModelError30 } from "@ibiz-template/core";
|
|
8641
8646
|
import { isArray as isArray2 } from "qx-util";
|
|
8642
8647
|
|
|
8643
8648
|
// src/ui-action/provider/ui-action-provider-base.ts
|
|
8644
|
-
import { RuntimeModelError as
|
|
8649
|
+
import { RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
|
|
8645
8650
|
|
|
8646
8651
|
// src/ui-logic/index.ts
|
|
8647
|
-
import { RuntimeError as
|
|
8652
|
+
import { RuntimeError as RuntimeError20 } from "@ibiz-template/core";
|
|
8648
8653
|
|
|
8649
8654
|
// src/ui-logic/ui-logic.ts
|
|
8650
|
-
import { ModelError as ModelError22, RuntimeModelError as
|
|
8655
|
+
import { ModelError as ModelError22, RuntimeModelError as RuntimeModelError28 } from "@ibiz-template/core";
|
|
8651
8656
|
|
|
8652
8657
|
// src/ui-logic/ui-logic-context.ts
|
|
8653
8658
|
var UILogicContext = class {
|
|
@@ -9083,10 +9088,8 @@ import { ModelError as ModelError20 } from "@ibiz-template/core";
|
|
|
9083
9088
|
import { ModelError as ModelError19 } from "@ibiz-template/core";
|
|
9084
9089
|
import { clone as clone10 } from "ramda";
|
|
9085
9090
|
function handleSrcVal2(ctx, srcValParams) {
|
|
9086
|
-
const { srcDEUILogicParamId,
|
|
9087
|
-
|
|
9088
|
-
srcValParams.srcValueType = "SRCDLPARAM";
|
|
9089
|
-
}
|
|
9091
|
+
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
9092
|
+
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
9090
9093
|
let value;
|
|
9091
9094
|
switch (srcValueType) {
|
|
9092
9095
|
case "SRCDLPARAM":
|
|
@@ -9188,8 +9191,24 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
|
9188
9191
|
}
|
|
9189
9192
|
};
|
|
9190
9193
|
|
|
9194
|
+
// src/ui-logic/ui-logic-node/bind-param-node/bind-param-node.ts
|
|
9195
|
+
import { RuntimeModelError as RuntimeModelError26 } from "@ibiz-template/core";
|
|
9196
|
+
var BindParamNode2 = class extends UILogicNode {
|
|
9197
|
+
async exec(ctx) {
|
|
9198
|
+
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
9199
|
+
if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
|
|
9200
|
+
throw new RuntimeModelError26(
|
|
9201
|
+
this.model,
|
|
9202
|
+
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
9203
|
+
);
|
|
9204
|
+
}
|
|
9205
|
+
const srcVal = handleSrcVal2(ctx, this.model);
|
|
9206
|
+
ctx.params[dstDEUILogicParamId] = srcVal;
|
|
9207
|
+
}
|
|
9208
|
+
};
|
|
9209
|
+
|
|
9191
9210
|
// src/ui-logic/ui-logic-param/ui-logic-param.ts
|
|
9192
|
-
import { ModelError as ModelError21,
|
|
9211
|
+
import { ModelError as ModelError21, RuntimeModelError as RuntimeModelError27 } from "@ibiz-template/core";
|
|
9193
9212
|
var UILogicParam = class {
|
|
9194
9213
|
/**
|
|
9195
9214
|
* Creates an instance of UILogicParam.
|
|
@@ -9224,7 +9243,10 @@ var UILogicParam = class {
|
|
|
9224
9243
|
if (control) {
|
|
9225
9244
|
ctx.params[tag] = control;
|
|
9226
9245
|
} else {
|
|
9227
|
-
throw new
|
|
9246
|
+
throw new RuntimeModelError27(
|
|
9247
|
+
this.model,
|
|
9248
|
+
"\u89C6\u56FE\u903B\u8F91\u521D\u59CB\u5316\u53C2\u6570\uFF0C\u672A\u627E\u5230".concat(m.codeName, "\u6307\u5B9A\u90E8\u4EF6\u5BF9\u8C61")
|
|
9249
|
+
);
|
|
9228
9250
|
}
|
|
9229
9251
|
} else if (m.activeViewParam) {
|
|
9230
9252
|
ctx.params[tag] = parameters.view;
|
|
@@ -9305,7 +9327,7 @@ var UILogic = class {
|
|
|
9305
9327
|
this.params = /* @__PURE__ */ new Map();
|
|
9306
9328
|
var _a;
|
|
9307
9329
|
if (!((_a = model.deuilogicNodes) == null ? void 0 : _a.length)) {
|
|
9308
|
-
throw new
|
|
9330
|
+
throw new RuntimeModelError28(model, "\u754C\u9762\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
|
|
9309
9331
|
}
|
|
9310
9332
|
model.deuilogicNodes.forEach((node) => {
|
|
9311
9333
|
const { logicNodeType } = node;
|
|
@@ -9326,12 +9348,14 @@ var UILogic = class {
|
|
|
9326
9348
|
case "PREPAREJSPARAM":
|
|
9327
9349
|
logicNode = new PrepareJSParamNode(node);
|
|
9328
9350
|
break;
|
|
9329
|
-
case "RESETPARAM":
|
|
9330
|
-
case "COPYPARAM":
|
|
9331
9351
|
case "BINDPARAM":
|
|
9352
|
+
logicNode = new BindParamNode2(node);
|
|
9353
|
+
break;
|
|
9332
9354
|
case "VIEWCTRLINVOKE":
|
|
9333
9355
|
logicNode = new ViewCtrlInvokeNode(node);
|
|
9334
9356
|
break;
|
|
9357
|
+
case "RESETPARAM":
|
|
9358
|
+
case "COPYPARAM":
|
|
9335
9359
|
case "VIEWCTRLFIREEVENT":
|
|
9336
9360
|
case "APPENDPARAM":
|
|
9337
9361
|
case "SORTPARAM":
|
|
@@ -9396,7 +9420,7 @@ var UILogic = class {
|
|
|
9396
9420
|
const start = this.nodes.get(startDEUILogicNodeId);
|
|
9397
9421
|
await this.deepExec(start, ctx);
|
|
9398
9422
|
} else {
|
|
9399
|
-
throw new
|
|
9423
|
+
throw new RuntimeModelError28(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
|
|
9400
9424
|
}
|
|
9401
9425
|
if (ctx.isEndNode) {
|
|
9402
9426
|
return ctx.result;
|
|
@@ -9442,7 +9466,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
9442
9466
|
const app = ibiz.hub.getApp(parameters.context.srfappid);
|
|
9443
9467
|
const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
|
|
9444
9468
|
if (!deUILogic) {
|
|
9445
|
-
throw new
|
|
9469
|
+
throw new RuntimeError20(
|
|
9446
9470
|
"\u627E\u4E0D\u5230\u5B9E\u4F53".concat(appDataEntityId, "\u7684\u754C\u9762\u903B\u8F91").concat(deUILogicId)
|
|
9447
9471
|
);
|
|
9448
9472
|
}
|
|
@@ -9455,7 +9479,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
9455
9479
|
}
|
|
9456
9480
|
|
|
9457
9481
|
// src/ui-action/uiaction-util.ts
|
|
9458
|
-
import { RuntimeError as
|
|
9482
|
+
import { RuntimeError as RuntimeError21 } from "@ibiz-template/core";
|
|
9459
9483
|
var UIActionUtil = class {
|
|
9460
9484
|
/**
|
|
9461
9485
|
* 执行界面行为
|
|
@@ -9470,7 +9494,7 @@ var UIActionUtil = class {
|
|
|
9470
9494
|
static async exec(actionId, params) {
|
|
9471
9495
|
const action = await getUIActionById(actionId);
|
|
9472
9496
|
if (!action) {
|
|
9473
|
-
throw new
|
|
9497
|
+
throw new RuntimeError21("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
|
|
9474
9498
|
}
|
|
9475
9499
|
const provider = await getUIActionProvider(action);
|
|
9476
9500
|
return provider.exec(action, params);
|
|
@@ -9512,7 +9536,7 @@ var UIActionProviderBase = class {
|
|
|
9512
9536
|
const { appDEUILogicId, appDataEntityId, uilogicAttachMode } = action;
|
|
9513
9537
|
if (uilogicAttachMode === "REPLACE") {
|
|
9514
9538
|
if (!appDEUILogicId) {
|
|
9515
|
-
throw new
|
|
9539
|
+
throw new RuntimeModelError29(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
9516
9540
|
}
|
|
9517
9541
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
9518
9542
|
return result;
|
|
@@ -9539,7 +9563,7 @@ var UIActionProviderBase = class {
|
|
|
9539
9563
|
}
|
|
9540
9564
|
if (action.uilogicAttachMode === "AFTER") {
|
|
9541
9565
|
if (!appDEUILogicId) {
|
|
9542
|
-
throw new
|
|
9566
|
+
throw new RuntimeModelError29(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
9543
9567
|
}
|
|
9544
9568
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
9545
9569
|
}
|
|
@@ -9673,7 +9697,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
|
|
|
9673
9697
|
const entityName = action.appDataEntityId;
|
|
9674
9698
|
const methodName = action.appDEMethodId;
|
|
9675
9699
|
if (!entityName || !methodName) {
|
|
9676
|
-
throw new
|
|
9700
|
+
throw new RuntimeModelError30(action, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6216\u5B9E\u4F53\u884C\u4E3A");
|
|
9677
9701
|
}
|
|
9678
9702
|
const { resultContext, resultParams, resultData } = await this.handleParams(
|
|
9679
9703
|
action,
|
|
@@ -9745,7 +9769,7 @@ var SysUIActionProvider = class extends UIActionProviderBase {
|
|
|
9745
9769
|
};
|
|
9746
9770
|
|
|
9747
9771
|
// src/ui-action/provider/front-ui-action-provider.ts
|
|
9748
|
-
import { StringUtil, RuntimeModelError as
|
|
9772
|
+
import { StringUtil, RuntimeModelError as RuntimeModelError31, ModelError as ModelError23 } from "@ibiz-template/core";
|
|
9749
9773
|
var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
9750
9774
|
async execAction(action, args) {
|
|
9751
9775
|
const { context, params, data, event, noWaitRoute } = args;
|
|
@@ -9760,7 +9784,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
9760
9784
|
case "WIZARD": {
|
|
9761
9785
|
const frontPSAppView = action.frontAppViewId;
|
|
9762
9786
|
if (!frontPSAppView) {
|
|
9763
|
-
throw new
|
|
9787
|
+
throw new RuntimeModelError31(action, "\u672A\u914D\u7F6E\u6253\u5F00\u89C6\u56FE");
|
|
9764
9788
|
}
|
|
9765
9789
|
const { resultContext, resultParams } = await this.handleParams(
|
|
9766
9790
|
action,
|
|
@@ -9816,7 +9840,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
9816
9840
|
);
|
|
9817
9841
|
return result || {};
|
|
9818
9842
|
}
|
|
9819
|
-
throw new
|
|
9843
|
+
throw new RuntimeModelError31(action, "\u81EA\u5B9A\u4E49\u7C7B\u578B\u7F3A\u5C11\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
|
|
9820
9844
|
}
|
|
9821
9845
|
};
|
|
9822
9846
|
|
|
@@ -9856,7 +9880,7 @@ function presetUIActionProvider() {
|
|
|
9856
9880
|
}
|
|
9857
9881
|
|
|
9858
9882
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
9859
|
-
import { RuntimeError as
|
|
9883
|
+
import { RuntimeError as RuntimeError22 } from "@ibiz-template/core";
|
|
9860
9884
|
var LogicExecutor = class {
|
|
9861
9885
|
/**
|
|
9862
9886
|
* @author lxm
|
|
@@ -9877,7 +9901,7 @@ var LogicExecutor = class {
|
|
|
9877
9901
|
*/
|
|
9878
9902
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9879
9903
|
execute(_executeParams) {
|
|
9880
|
-
throw new
|
|
9904
|
+
throw new RuntimeError22("Method not implemented.");
|
|
9881
9905
|
}
|
|
9882
9906
|
/**
|
|
9883
9907
|
* 销毁方法
|
|
@@ -9926,7 +9950,7 @@ var LogicExecutorFactory = class {
|
|
|
9926
9950
|
};
|
|
9927
9951
|
|
|
9928
9952
|
// src/logic-scheduler/executor/script-executor.ts
|
|
9929
|
-
import { RuntimeError as
|
|
9953
|
+
import { RuntimeError as RuntimeError23 } from "@ibiz-template/core";
|
|
9930
9954
|
var ScriptExecutor = class extends LogicExecutor {
|
|
9931
9955
|
constructor() {
|
|
9932
9956
|
super(...arguments);
|
|
@@ -9946,7 +9970,7 @@ var ScriptExecutor = class extends LogicExecutor {
|
|
|
9946
9970
|
* @return {*} {IData[]}
|
|
9947
9971
|
*/
|
|
9948
9972
|
convertScriptArgs(_executeParams) {
|
|
9949
|
-
throw new
|
|
9973
|
+
throw new RuntimeError23("\u672A\u8BBE\u7F6E\u811A\u672C\u6267\u884C\u53C2\u6570\u8F6C\u6362\u65B9\u6CD5");
|
|
9950
9974
|
}
|
|
9951
9975
|
/**
|
|
9952
9976
|
* 初始化脚本执行器
|
|
@@ -9973,13 +9997,13 @@ var ScriptExecutor = class extends LogicExecutor {
|
|
|
9973
9997
|
};
|
|
9974
9998
|
|
|
9975
9999
|
// src/logic-scheduler/executor/app-de-ui-logic-executor.ts
|
|
9976
|
-
import { RuntimeModelError as
|
|
10000
|
+
import { RuntimeModelError as RuntimeModelError32 } from "@ibiz-template/core";
|
|
9977
10001
|
var AppDEUILogicExecutor = class extends LogicExecutor {
|
|
9978
10002
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9979
10003
|
execute(executeParams) {
|
|
9980
10004
|
const { appDEUILogicId, appDataEntityId } = this.logic;
|
|
9981
10005
|
if (!appDEUILogicId) {
|
|
9982
|
-
throw new
|
|
10006
|
+
throw new RuntimeModelError32(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
9983
10007
|
}
|
|
9984
10008
|
execUILogic(appDEUILogicId, appDataEntityId, executeParams);
|
|
9985
10009
|
}
|
|
@@ -9991,6 +10015,20 @@ var LogicScheduler = class {
|
|
|
9991
10015
|
constructor(logics) {
|
|
9992
10016
|
this.triggers = /* @__PURE__ */ new Map();
|
|
9993
10017
|
this.executors = /* @__PURE__ */ new Map();
|
|
10018
|
+
/**
|
|
10019
|
+
* 是否有视图事件触发类型逻辑
|
|
10020
|
+
* @author lxm
|
|
10021
|
+
* @date 2023-08-14 02:19:51
|
|
10022
|
+
* @type {boolean}
|
|
10023
|
+
*/
|
|
10024
|
+
this.hasViewEventTrigger = false;
|
|
10025
|
+
/**
|
|
10026
|
+
* 是否有部件事件触发类型逻辑
|
|
10027
|
+
* @author lxm
|
|
10028
|
+
* @date 2023-08-14 02:19:51
|
|
10029
|
+
* @type {boolean}
|
|
10030
|
+
*/
|
|
10031
|
+
this.hasControlEventTrigger = false;
|
|
9994
10032
|
this.logics = logics;
|
|
9995
10033
|
logics.forEach((logic) => {
|
|
9996
10034
|
try {
|
|
@@ -10036,6 +10074,15 @@ var LogicScheduler = class {
|
|
|
10036
10074
|
* @return {*} {LogicTrigger}
|
|
10037
10075
|
*/
|
|
10038
10076
|
createTrigger(logic) {
|
|
10077
|
+
switch (logic.triggerType) {
|
|
10078
|
+
case "VIEWEVENT":
|
|
10079
|
+
this.hasViewEventTrigger = true;
|
|
10080
|
+
break;
|
|
10081
|
+
case "CTRLEVENT":
|
|
10082
|
+
this.hasControlEventTrigger = true;
|
|
10083
|
+
break;
|
|
10084
|
+
default:
|
|
10085
|
+
}
|
|
10039
10086
|
return ibiz.scheduler.triggerFactory.createTrigger(logic, this);
|
|
10040
10087
|
}
|
|
10041
10088
|
/**
|
|
@@ -10160,6 +10207,22 @@ var LogicScheduler = class {
|
|
|
10160
10207
|
const params = this.getExecuteParams(executeParams);
|
|
10161
10208
|
return trigger.execute(params);
|
|
10162
10209
|
}
|
|
10210
|
+
/**
|
|
10211
|
+
* 触发部件事件
|
|
10212
|
+
* @author lxm
|
|
10213
|
+
* @date 2023-06-26 02:26:33
|
|
10214
|
+
* @param {string} itemName 子项名称
|
|
10215
|
+
* @param {Partial<IUILogicParams>} executeParams 执行参数
|
|
10216
|
+
* @return {*} {(boolean | undefined)}
|
|
10217
|
+
*/
|
|
10218
|
+
triggerControlEvent(ctrlName, event) {
|
|
10219
|
+
const matchParams = {
|
|
10220
|
+
ctrlName,
|
|
10221
|
+
eventName: event.eventName,
|
|
10222
|
+
triggerType: "CTRLEVENT"
|
|
10223
|
+
};
|
|
10224
|
+
this.triggerAndExecute(matchParams, event);
|
|
10225
|
+
}
|
|
10163
10226
|
};
|
|
10164
10227
|
|
|
10165
10228
|
// src/logic-scheduler/scheduler/control-logic-scheduler.ts
|
|
@@ -10275,7 +10338,7 @@ var LogicSchedulerCenter = class {
|
|
|
10275
10338
|
};
|
|
10276
10339
|
|
|
10277
10340
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
10278
|
-
import { RuntimeError as
|
|
10341
|
+
import { RuntimeError as RuntimeError24 } from "@ibiz-template/core";
|
|
10279
10342
|
var LogicTrigger = class {
|
|
10280
10343
|
/**
|
|
10281
10344
|
* @author lxm
|
|
@@ -10318,7 +10381,7 @@ var LogicTrigger = class {
|
|
|
10318
10381
|
if (this.executor) {
|
|
10319
10382
|
return this.executor.execute(executeParams);
|
|
10320
10383
|
}
|
|
10321
|
-
throw new
|
|
10384
|
+
throw new RuntimeError24("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
|
|
10322
10385
|
}
|
|
10323
10386
|
/**
|
|
10324
10387
|
* 销毁方法
|
|
@@ -10335,12 +10398,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
10335
10398
|
};
|
|
10336
10399
|
|
|
10337
10400
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
10338
|
-
import { RuntimeError as
|
|
10401
|
+
import { RuntimeError as RuntimeError25 } from "@ibiz-template/core";
|
|
10339
10402
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
10340
10403
|
bindExecutor(executor) {
|
|
10341
10404
|
super.bindExecutor(executor);
|
|
10342
10405
|
if (this.executor.type !== "SCRIPT") {
|
|
10343
|
-
throw new
|
|
10406
|
+
throw new RuntimeError25(
|
|
10344
10407
|
"\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
|
|
10345
10408
|
);
|
|
10346
10409
|
}
|
|
@@ -10367,12 +10430,12 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
10367
10430
|
if (typeof result === "boolean") {
|
|
10368
10431
|
return result;
|
|
10369
10432
|
}
|
|
10370
|
-
throw new
|
|
10433
|
+
throw new RuntimeError25("".concat(this.logic.id, "\u903B\u8F91\u8FD4\u56DE\u503C\u4E0D\u662F\u5E03\u5C14\u503C"));
|
|
10371
10434
|
}
|
|
10372
10435
|
};
|
|
10373
10436
|
|
|
10374
10437
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
10375
|
-
import { RuntimeError as
|
|
10438
|
+
import { RuntimeError as RuntimeError26 } from "@ibiz-template/core";
|
|
10376
10439
|
var TimerTrigger = class extends LogicTrigger {
|
|
10377
10440
|
constructor() {
|
|
10378
10441
|
super(...arguments);
|
|
@@ -10381,7 +10444,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
10381
10444
|
start() {
|
|
10382
10445
|
this.timer = setInterval(() => {
|
|
10383
10446
|
if (!this.scheduler.defaultParamsCb) {
|
|
10384
|
-
throw new
|
|
10447
|
+
throw new RuntimeError26("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
|
|
10385
10448
|
}
|
|
10386
10449
|
const params = this.scheduler.defaultParamsCb();
|
|
10387
10450
|
this.executor.execute(params);
|
|
@@ -10398,8 +10461,8 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
10398
10461
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
10399
10462
|
import {
|
|
10400
10463
|
ModelError as ModelError26,
|
|
10401
|
-
RuntimeError as
|
|
10402
|
-
RuntimeModelError as
|
|
10464
|
+
RuntimeError as RuntimeError27,
|
|
10465
|
+
RuntimeModelError as RuntimeModelError33
|
|
10403
10466
|
} from "@ibiz-template/core";
|
|
10404
10467
|
import { notNilEmpty as notNilEmpty5 } from "qx-util";
|
|
10405
10468
|
var AppUILogicExecutor = class extends LogicExecutor {
|
|
@@ -10434,18 +10497,18 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
10434
10497
|
const { context, params, ...rest } = parameters;
|
|
10435
10498
|
const { data } = parameters;
|
|
10436
10499
|
if (!(data == null ? void 0 : data[0])) {
|
|
10437
|
-
throw new
|
|
10500
|
+
throw new RuntimeError27("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
|
|
10438
10501
|
}
|
|
10439
10502
|
const openViewRef = appUILogic.openDataAppView;
|
|
10440
10503
|
if (!openViewRef) {
|
|
10441
|
-
throw new
|
|
10504
|
+
throw new RuntimeModelError33(
|
|
10442
10505
|
appUILogic,
|
|
10443
10506
|
"opendata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE"
|
|
10444
10507
|
);
|
|
10445
10508
|
}
|
|
10446
10509
|
const openView = openViewRef.refAppViewId;
|
|
10447
10510
|
if (!openView) {
|
|
10448
|
-
throw new
|
|
10511
|
+
throw new RuntimeModelError33(
|
|
10449
10512
|
appUILogic,
|
|
10450
10513
|
"opendata\u89C6\u56FE\u903B\u8F91\u7684\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE\u6CA1\u6709\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"
|
|
10451
10514
|
);
|
|
@@ -10497,7 +10560,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
10497
10560
|
} else {
|
|
10498
10561
|
newViewRef = newDataAppView;
|
|
10499
10562
|
if (!newViewRef || !newViewRef.refAppViewId) {
|
|
10500
|
-
throw new
|
|
10563
|
+
throw new RuntimeModelError33(
|
|
10501
10564
|
appUILogic,
|
|
10502
10565
|
"newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE"
|
|
10503
10566
|
);
|
|
@@ -10543,7 +10606,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
10543
10606
|
const { wizardAppView, newDataAppViews } = appUILogic;
|
|
10544
10607
|
const { context, params, ...rest } = parameters;
|
|
10545
10608
|
if (!wizardAppView || !wizardAppView.refAppViewId) {
|
|
10546
|
-
throw new
|
|
10609
|
+
throw new RuntimeModelError33(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
|
|
10547
10610
|
}
|
|
10548
10611
|
const result = await ibiz.commands.execute(
|
|
10549
10612
|
OpenAppViewCommand.TAG,
|
|
@@ -10557,12 +10620,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
10557
10620
|
}
|
|
10558
10621
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
10559
10622
|
if (!selectData) {
|
|
10560
|
-
throw new
|
|
10623
|
+
throw new RuntimeError27("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
|
|
10561
10624
|
}
|
|
10562
10625
|
const indexType = selectData.srfkey;
|
|
10563
10626
|
const findView = newDataAppViews == null ? void 0 : newDataAppViews.find((item) => item.refMode === indexType);
|
|
10564
10627
|
if (!findView) {
|
|
10565
|
-
throw new
|
|
10628
|
+
throw new RuntimeError27(
|
|
10566
10629
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
10567
10630
|
);
|
|
10568
10631
|
}
|
|
@@ -10595,6 +10658,31 @@ var ViewEventTrigger = class extends LogicTrigger {
|
|
|
10595
10658
|
}
|
|
10596
10659
|
};
|
|
10597
10660
|
|
|
10661
|
+
// src/logic-scheduler/trigger/control-event-trigger.ts
|
|
10662
|
+
var ControlEventTrigger = class extends LogicTrigger {
|
|
10663
|
+
constructor(logic, scheduler) {
|
|
10664
|
+
super(logic, scheduler);
|
|
10665
|
+
this.logic = logic;
|
|
10666
|
+
this.scheduler = scheduler;
|
|
10667
|
+
/**
|
|
10668
|
+
* 监听事件名称集合
|
|
10669
|
+
* @author lxm
|
|
10670
|
+
* @date 2023-07-26 05:48:30
|
|
10671
|
+
* @protected
|
|
10672
|
+
* @type {string[]}
|
|
10673
|
+
*/
|
|
10674
|
+
this.listenEventNames = [];
|
|
10675
|
+
const names = logic.eventNames.split(",");
|
|
10676
|
+
this.listenEventNames = names.map(
|
|
10677
|
+
(name) => StudioControlEvents[name] || name
|
|
10678
|
+
);
|
|
10679
|
+
}
|
|
10680
|
+
match(matchParams) {
|
|
10681
|
+
const superResult = super.match(matchParams);
|
|
10682
|
+
return superResult && matchParams.ctrlName === this.logic.ctrlName && this.listenEventNames.includes(matchParams.eventName);
|
|
10683
|
+
}
|
|
10684
|
+
};
|
|
10685
|
+
|
|
10598
10686
|
// src/logic-scheduler/index.ts
|
|
10599
10687
|
function installLogicSchedule() {
|
|
10600
10688
|
ibiz.scheduler = new LogicSchedulerCenter();
|
|
@@ -10622,6 +10710,10 @@ function installLogicSchedule() {
|
|
|
10622
10710
|
"VIEWEVENT",
|
|
10623
10711
|
(logic, scheduler) => new ViewEventTrigger(logic, scheduler)
|
|
10624
10712
|
);
|
|
10713
|
+
ibiz.scheduler.triggerFactory.register(
|
|
10714
|
+
"CTRLEVENT",
|
|
10715
|
+
(logic, scheduler) => new ControlEventTrigger(logic, scheduler)
|
|
10716
|
+
);
|
|
10625
10717
|
ibiz.scheduler.executorFactory.register(
|
|
10626
10718
|
"SCRIPT",
|
|
10627
10719
|
(logic, scheduler) => new ScriptExecutor(logic, scheduler)
|
|
@@ -10766,13 +10858,13 @@ var PanelNotifyState = /* @__PURE__ */ ((PanelNotifyState2) => {
|
|
|
10766
10858
|
|
|
10767
10859
|
// src/controller/common/view/view.controller.ts
|
|
10768
10860
|
import { createUUID as createUUID2, notNilEmpty as notNilEmpty6 } from "qx-util";
|
|
10769
|
-
import { IBizContext as IBizContext2, RuntimeError as
|
|
10861
|
+
import { IBizContext as IBizContext2, RuntimeError as RuntimeError30 } from "@ibiz-template/core";
|
|
10770
10862
|
|
|
10771
10863
|
// src/controller/utils/loading/loading.state.ts
|
|
10772
10864
|
import { NOOP } from "@ibiz-template/core";
|
|
10773
10865
|
|
|
10774
10866
|
// src/controller/utils/counter/counter.ts
|
|
10775
|
-
import { RuntimeError as
|
|
10867
|
+
import { RuntimeError as RuntimeError28 } from "@ibiz-template/core";
|
|
10776
10868
|
var Counter = class {
|
|
10777
10869
|
/**
|
|
10778
10870
|
* Creates an instance of Counter.
|
|
@@ -10834,7 +10926,7 @@ var Counter = class {
|
|
|
10834
10926
|
return;
|
|
10835
10927
|
}
|
|
10836
10928
|
if (this.count === 0) {
|
|
10837
|
-
throw new
|
|
10929
|
+
throw new RuntimeError28("\u9519\u8BEF\u7684\u8C03\u7528\uFF01decrement\u4E0D\u80FD\u5BF9count\u4E3A0\u8C03\u7528");
|
|
10838
10930
|
}
|
|
10839
10931
|
this.count -= 1;
|
|
10840
10932
|
if (this.count === 0) {
|
|
@@ -10926,7 +11018,7 @@ var CTX = class {
|
|
|
10926
11018
|
* @date 2023-04-26 07:54:46
|
|
10927
11019
|
* @protected
|
|
10928
11020
|
*/
|
|
10929
|
-
this.evt = new QXEvent2();
|
|
11021
|
+
this.evt = new QXEvent2(3e3);
|
|
10930
11022
|
/**
|
|
10931
11023
|
* 当前视图控制器集合(包含自身视图控制器,部件控制器,和下一层级的视图的控制器)
|
|
10932
11024
|
* @author lxm
|
|
@@ -11348,8 +11440,8 @@ function getOriginData(data) {
|
|
|
11348
11440
|
}
|
|
11349
11441
|
|
|
11350
11442
|
// src/controller/utils/value-rule/value-rule.ts
|
|
11351
|
-
import { RuntimeError as
|
|
11352
|
-
import { isNilOrEmpty as
|
|
11443
|
+
import { RuntimeError as RuntimeError29 } from "@ibiz-template/core";
|
|
11444
|
+
import { isNilOrEmpty as isNilOrEmpty5 } from "qx-util";
|
|
11353
11445
|
function generateRules(itemVRs, name, valueItemName) {
|
|
11354
11446
|
const rules = [];
|
|
11355
11447
|
itemVRs.forEach((item) => {
|
|
@@ -11387,7 +11479,7 @@ function generateRules(itemVRs, name, valueItemName) {
|
|
|
11387
11479
|
const valueName = valueItemName || name;
|
|
11388
11480
|
rules.push({
|
|
11389
11481
|
validator: (rule, value, callback, source) => {
|
|
11390
|
-
if (
|
|
11482
|
+
if (isNilOrEmpty5(source[valueName])) {
|
|
11391
11483
|
return true;
|
|
11392
11484
|
}
|
|
11393
11485
|
const { isPast, infoMessage } = verifyDeRules(
|
|
@@ -11396,7 +11488,7 @@ function generateRules(itemVRs, name, valueItemName) {
|
|
|
11396
11488
|
deRule.groupCond
|
|
11397
11489
|
);
|
|
11398
11490
|
if (!isPast) {
|
|
11399
|
-
callback(new
|
|
11491
|
+
callback(new RuntimeError29(infoMessage || deRule.ruleInfo));
|
|
11400
11492
|
}
|
|
11401
11493
|
return true;
|
|
11402
11494
|
},
|
|
@@ -11567,7 +11659,7 @@ var BaseController = class {
|
|
|
11567
11659
|
async destroyed() {
|
|
11568
11660
|
await this.onDestroyed();
|
|
11569
11661
|
ibiz.log.debug("".concat(this.constructor.name, ":").concat(this.name, " onDestroyed"));
|
|
11570
|
-
this._evt.emit("onDestroyed", void 0);
|
|
11662
|
+
await this._evt.emit("onDestroyed", void 0);
|
|
11571
11663
|
this.evt.destroy();
|
|
11572
11664
|
}
|
|
11573
11665
|
/**
|
|
@@ -11776,9 +11868,11 @@ var ViewController = class extends BaseController {
|
|
|
11776
11868
|
this.scheduler.defaultParamsCb = () => {
|
|
11777
11869
|
return this.getEventArgs();
|
|
11778
11870
|
};
|
|
11779
|
-
this.
|
|
11780
|
-
this.
|
|
11781
|
-
|
|
11871
|
+
if (this.scheduler.hasViewEventTrigger) {
|
|
11872
|
+
this.evt.onAll((_eventName, event) => {
|
|
11873
|
+
this.scheduler.triggerViewEvent(event);
|
|
11874
|
+
});
|
|
11875
|
+
}
|
|
11782
11876
|
}
|
|
11783
11877
|
if (this.engines.length) {
|
|
11784
11878
|
await Promise.all(this.engines.map((engine) => engine.onCreated()));
|
|
@@ -11846,7 +11940,7 @@ var ViewController = class extends BaseController {
|
|
|
11846
11940
|
async callUIAction(key, args) {
|
|
11847
11941
|
const result = this.call(key, args);
|
|
11848
11942
|
if (result === void 0) {
|
|
11849
|
-
throw new
|
|
11943
|
+
throw new RuntimeError30("\u6CA1\u6709\u5F15\u64CE\u652F\u6301\u9884\u7F6E\u754C\u9762\u884C\u4E3A".concat(key));
|
|
11850
11944
|
}
|
|
11851
11945
|
return result;
|
|
11852
11946
|
}
|
|
@@ -11868,6 +11962,7 @@ var ViewController = class extends BaseController {
|
|
|
11868
11962
|
* @param {IViewLayoutPanelController} panel
|
|
11869
11963
|
*/
|
|
11870
11964
|
setLayoutPanel(panel) {
|
|
11965
|
+
var _a;
|
|
11871
11966
|
this.layoutPanel = panel;
|
|
11872
11967
|
if (this.layoutPanel.state.isMounted) {
|
|
11873
11968
|
this.mountCounter.attend(this.layoutPanel.model.name);
|
|
@@ -11876,6 +11971,14 @@ var ViewController = class extends BaseController {
|
|
|
11876
11971
|
this.mountCounter.attend(this.layoutPanel.model.name);
|
|
11877
11972
|
});
|
|
11878
11973
|
}
|
|
11974
|
+
if ((_a = this.scheduler) == null ? void 0 : _a.hasControlEventTrigger) {
|
|
11975
|
+
panel.evt.on("onControlEvent", (event) => {
|
|
11976
|
+
this.scheduler.triggerControlEvent(
|
|
11977
|
+
event.triggerControlName,
|
|
11978
|
+
event.triggerEvent
|
|
11979
|
+
);
|
|
11980
|
+
});
|
|
11981
|
+
}
|
|
11879
11982
|
}
|
|
11880
11983
|
};
|
|
11881
11984
|
|
|
@@ -11991,7 +12094,7 @@ var EditorController = class {
|
|
|
11991
12094
|
};
|
|
11992
12095
|
|
|
11993
12096
|
// src/controller/common/editor/code-list-editor.controller.ts
|
|
11994
|
-
import { RuntimeModelError as
|
|
12097
|
+
import { RuntimeModelError as RuntimeModelError34 } from "@ibiz-template/core";
|
|
11995
12098
|
var CodeListEditorController = class extends EditorController {
|
|
11996
12099
|
/**
|
|
11997
12100
|
* 加载代码表数据
|
|
@@ -12015,7 +12118,7 @@ var CodeListEditorController = class extends EditorController {
|
|
|
12015
12118
|
);
|
|
12016
12119
|
return dataItems;
|
|
12017
12120
|
}
|
|
12018
|
-
throw new
|
|
12121
|
+
throw new RuntimeModelError34(this.model, "\u8BF7\u914D\u7F6E\u4EE3\u7801\u8868");
|
|
12019
12122
|
}
|
|
12020
12123
|
};
|
|
12021
12124
|
|
|
@@ -12060,7 +12163,7 @@ var ControlController = class extends BaseController {
|
|
|
12060
12163
|
* @protected
|
|
12061
12164
|
*/
|
|
12062
12165
|
registerToCtx() {
|
|
12063
|
-
this.ctx.registerController(this.model.name, this);
|
|
12166
|
+
this.ctx.registerController(this.model.name || this.model.id, this);
|
|
12064
12167
|
}
|
|
12065
12168
|
/**
|
|
12066
12169
|
* 获取部件通用的事件参数
|
|
@@ -12176,7 +12279,7 @@ var ControlController = class extends BaseController {
|
|
|
12176
12279
|
};
|
|
12177
12280
|
|
|
12178
12281
|
// src/controller/common/control/md-control.controller.ts
|
|
12179
|
-
import { isElementSame, RuntimeError as
|
|
12282
|
+
import { isElementSame, RuntimeError as RuntimeError31 } from "@ibiz-template/core";
|
|
12180
12283
|
var MDControlController = class extends ControlController {
|
|
12181
12284
|
get _evt() {
|
|
12182
12285
|
return this.evt;
|
|
@@ -12302,9 +12405,9 @@ var MDControlController = class extends ControlController {
|
|
|
12302
12405
|
async remove(args) {
|
|
12303
12406
|
const { context, params, data } = this.handlerAbilityParams(args);
|
|
12304
12407
|
if (!(data == null ? void 0 : data.length)) {
|
|
12305
|
-
throw new
|
|
12408
|
+
throw new RuntimeError31("\u672A\u9009\u4E2D\u6570\u636E");
|
|
12306
12409
|
}
|
|
12307
|
-
const del = await ibiz.
|
|
12410
|
+
const del = await ibiz.confirm.error({
|
|
12308
12411
|
title: "\u6570\u636E\u5220\u9664",
|
|
12309
12412
|
desc: "\u786E\u8BA4\u5220\u9664\u6570\u636E\uFF1F"
|
|
12310
12413
|
});
|