@ibiz-template/runtime 0.1.6 → 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 +198 -99
- 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/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/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 +1 -15
- 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/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/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/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 +1 -13
- 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/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
|
}
|
|
@@ -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,8 +4594,6 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
4582
4594
|
};
|
|
4583
4595
|
|
|
4584
4596
|
// src/service/dto/method.dto.ts
|
|
4585
|
-
import { clone as clone5 } from "ramda";
|
|
4586
|
-
import { isNilOrEmpty as isNilOrEmpty5 } from "qx-util";
|
|
4587
4597
|
import { ModelError as ModelError7 } from "@ibiz-template/core";
|
|
4588
4598
|
var MethodDto = class _MethodDto {
|
|
4589
4599
|
constructor(entity, dto) {
|
|
@@ -4611,19 +4621,11 @@ var MethodDto = class _MethodDto {
|
|
|
4611
4621
|
*/
|
|
4612
4622
|
async get(context, data) {
|
|
4613
4623
|
const params = {};
|
|
4614
|
-
const copyData = clone5(data);
|
|
4615
4624
|
for (let i = 0; i < this.fields.length; i++) {
|
|
4616
4625
|
const field = this.fields[i];
|
|
4617
4626
|
const key = field.codeName.toLowerCase();
|
|
4618
4627
|
switch (field.type) {
|
|
4619
4628
|
case "SIMPLE": {
|
|
4620
|
-
const val = copyData[key];
|
|
4621
|
-
if (isNilOrEmpty5(val)) {
|
|
4622
|
-
params[key] = null;
|
|
4623
|
-
} else {
|
|
4624
|
-
params[key] = val;
|
|
4625
|
-
}
|
|
4626
|
-
delete copyData[key];
|
|
4627
4629
|
break;
|
|
4628
4630
|
}
|
|
4629
4631
|
case "DTOS": {
|
|
@@ -4648,8 +4650,7 @@ var MethodDto = class _MethodDto {
|
|
|
4648
4650
|
);
|
|
4649
4651
|
}
|
|
4650
4652
|
}
|
|
4651
|
-
|
|
4652
|
-
return params;
|
|
4653
|
+
return { ...data, ...params };
|
|
4653
4654
|
}
|
|
4654
4655
|
/**
|
|
4655
4656
|
* 设置本地 DTO 存储
|
|
@@ -5283,11 +5284,11 @@ var EndNode = class extends DELogicNode {
|
|
|
5283
5284
|
|
|
5284
5285
|
// src/de-logic/de-logic-node/prepare-param-node/prepare-param-node.ts
|
|
5285
5286
|
import { ModelError as ModelError11 } from "@ibiz-template/core";
|
|
5286
|
-
import { clone as
|
|
5287
|
+
import { clone as clone6 } from "ramda";
|
|
5287
5288
|
|
|
5288
5289
|
// src/de-logic/utils/handle-src-val.ts
|
|
5289
5290
|
import { ModelError as ModelError10 } from "@ibiz-template/core";
|
|
5290
|
-
import { clone as
|
|
5291
|
+
import { clone as clone5 } from "ramda";
|
|
5291
5292
|
function handleSrcVal(ctx, srcValParams) {
|
|
5292
5293
|
const { srcDELogicParamId, srcValueType, srcFieldName, srcValue } = srcValParams;
|
|
5293
5294
|
if (!srcValParams.srcValueType) {
|
|
@@ -5311,7 +5312,7 @@ function handleSrcVal(ctx, srcValParams) {
|
|
|
5311
5312
|
value = ctx.context;
|
|
5312
5313
|
break;
|
|
5313
5314
|
case "ENVPARAM":
|
|
5314
|
-
value =
|
|
5315
|
+
value = clone5(ibiz.env);
|
|
5315
5316
|
break;
|
|
5316
5317
|
default:
|
|
5317
5318
|
throw new ModelError10(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
@@ -5367,7 +5368,7 @@ var PrepareParamNode = class extends DELogicNode {
|
|
|
5367
5368
|
copyParam(nodeParam, ctx) {
|
|
5368
5369
|
const { dstDELogicParamId } = nodeParam;
|
|
5369
5370
|
const srcVal = handleSrcVal(ctx, nodeParam);
|
|
5370
|
-
ctx.params[dstDELogicParamId] =
|
|
5371
|
+
ctx.params[dstDELogicParamId] = clone6(srcVal);
|
|
5371
5372
|
}
|
|
5372
5373
|
/**
|
|
5373
5374
|
* 绑定参数
|
|
@@ -5527,7 +5528,7 @@ var RenewParamNode = class extends DELogicNode {
|
|
|
5527
5528
|
|
|
5528
5529
|
// src/de-logic/de-logic-node/copy-param-node/copy-param-node.ts
|
|
5529
5530
|
import { RuntimeModelError as RuntimeModelError14 } from "@ibiz-template/core";
|
|
5530
|
-
import { clone as
|
|
5531
|
+
import { clone as clone7 } from "ramda";
|
|
5531
5532
|
var CopyParamNode = class extends DELogicNode {
|
|
5532
5533
|
async exec(ctx) {
|
|
5533
5534
|
const { dstDELogicParamId, srcDELogicParamId } = this.model;
|
|
@@ -5538,7 +5539,7 @@ var CopyParamNode = class extends DELogicNode {
|
|
|
5538
5539
|
);
|
|
5539
5540
|
}
|
|
5540
5541
|
const srcVal = handleSrcVal(ctx, this.model);
|
|
5541
|
-
ctx.params[dstDELogicParamId] =
|
|
5542
|
+
ctx.params[dstDELogicParamId] = clone7(srcVal);
|
|
5542
5543
|
}
|
|
5543
5544
|
};
|
|
5544
5545
|
|
|
@@ -5604,7 +5605,7 @@ var ThrowExceptionNode = class extends DELogicNode {
|
|
|
5604
5605
|
|
|
5605
5606
|
// src/de-logic/de-logic-param/de-logic-param.ts
|
|
5606
5607
|
import { ModelError as ModelError12 } from "@ibiz-template/core";
|
|
5607
|
-
import { clone as
|
|
5608
|
+
import { clone as clone8 } from "ramda";
|
|
5608
5609
|
var DELogicParam = class {
|
|
5609
5610
|
/**
|
|
5610
5611
|
* Creates an instance of DELogicParam.
|
|
@@ -5632,7 +5633,7 @@ var DELogicParam = class {
|
|
|
5632
5633
|
if (m.default) {
|
|
5633
5634
|
ctx.params[tag] = ctx.data || {};
|
|
5634
5635
|
} else if (m.appGlobalParam) {
|
|
5635
|
-
ctx.params[tag] =
|
|
5636
|
+
ctx.params[tag] = clone8(ibiz.env);
|
|
5636
5637
|
} else if (m.entityListParam) {
|
|
5637
5638
|
ctx.params[tag] = [];
|
|
5638
5639
|
} else if (m.entityPageParam) {
|
|
@@ -5648,7 +5649,7 @@ var DELogicParam = class {
|
|
|
5648
5649
|
} else if (m.simpleParam) {
|
|
5649
5650
|
ctx.params[tag] = {};
|
|
5650
5651
|
} else if (m.cloneParam) {
|
|
5651
|
-
ctx.params[tag] =
|
|
5652
|
+
ctx.params[tag] = clone8(ctx.data || {});
|
|
5652
5653
|
} else if (m.envParam) {
|
|
5653
5654
|
throw new ModelError12(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u7CFB\u7EDF\u73AF\u5883\u53D8\u91CF");
|
|
5654
5655
|
} else if (m.fileListParam) {
|
|
@@ -6188,7 +6189,7 @@ import {
|
|
|
6188
6189
|
RuntimeModelError as RuntimeModelError19
|
|
6189
6190
|
} from "@ibiz-template/core";
|
|
6190
6191
|
import { ascSort, descSort } from "qx-util";
|
|
6191
|
-
import { clone as
|
|
6192
|
+
import { clone as clone9, equals as equals2, isEmpty as isEmpty7, isNil as isNil7, where as where2 } from "ramda";
|
|
6192
6193
|
var FetchMethod = class extends Method {
|
|
6193
6194
|
async exec(context, data, params) {
|
|
6194
6195
|
if (this.isLocalMode) {
|
|
@@ -6324,7 +6325,7 @@ var FetchMethod = class extends Method {
|
|
|
6324
6325
|
const { page, size } = filter;
|
|
6325
6326
|
const start = page * size;
|
|
6326
6327
|
const end = (page + 1) * size - 1;
|
|
6327
|
-
const items = list.slice(start, end).map((item) =>
|
|
6328
|
+
const items = list.slice(start, end).map((item) => clone9(item));
|
|
6328
6329
|
return items;
|
|
6329
6330
|
}
|
|
6330
6331
|
/**
|
|
@@ -8641,17 +8642,17 @@ async function getPortletProvider(model) {
|
|
|
8641
8642
|
}
|
|
8642
8643
|
|
|
8643
8644
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
8644
|
-
import { RuntimeModelError as
|
|
8645
|
+
import { RuntimeModelError as RuntimeModelError30 } from "@ibiz-template/core";
|
|
8645
8646
|
import { isArray as isArray2 } from "qx-util";
|
|
8646
8647
|
|
|
8647
8648
|
// src/ui-action/provider/ui-action-provider-base.ts
|
|
8648
|
-
import { RuntimeModelError as
|
|
8649
|
+
import { RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
|
|
8649
8650
|
|
|
8650
8651
|
// src/ui-logic/index.ts
|
|
8651
|
-
import { RuntimeError as
|
|
8652
|
+
import { RuntimeError as RuntimeError20 } from "@ibiz-template/core";
|
|
8652
8653
|
|
|
8653
8654
|
// src/ui-logic/ui-logic.ts
|
|
8654
|
-
import { ModelError as ModelError22, RuntimeModelError as
|
|
8655
|
+
import { ModelError as ModelError22, RuntimeModelError as RuntimeModelError28 } from "@ibiz-template/core";
|
|
8655
8656
|
|
|
8656
8657
|
// src/ui-logic/ui-logic-context.ts
|
|
8657
8658
|
var UILogicContext = class {
|
|
@@ -9085,12 +9086,10 @@ import { ModelError as ModelError20 } from "@ibiz-template/core";
|
|
|
9085
9086
|
|
|
9086
9087
|
// src/ui-logic/utils/handle-src-val.ts
|
|
9087
9088
|
import { ModelError as ModelError19 } from "@ibiz-template/core";
|
|
9088
|
-
import { clone as
|
|
9089
|
+
import { clone as clone10 } from "ramda";
|
|
9089
9090
|
function handleSrcVal2(ctx, srcValParams) {
|
|
9090
|
-
const { srcDEUILogicParamId,
|
|
9091
|
-
|
|
9092
|
-
srcValParams.srcValueType = "SRCDLPARAM";
|
|
9093
|
-
}
|
|
9091
|
+
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
9092
|
+
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
9094
9093
|
let value;
|
|
9095
9094
|
switch (srcValueType) {
|
|
9096
9095
|
case "SRCDLPARAM":
|
|
@@ -9109,7 +9108,7 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
9109
9108
|
value = ctx.context;
|
|
9110
9109
|
break;
|
|
9111
9110
|
case "ENVPARAM":
|
|
9112
|
-
value =
|
|
9111
|
+
value = clone10(ibiz.env);
|
|
9113
9112
|
break;
|
|
9114
9113
|
default:
|
|
9115
9114
|
throw new ModelError19(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
@@ -9192,8 +9191,24 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
|
9192
9191
|
}
|
|
9193
9192
|
};
|
|
9194
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
|
+
|
|
9195
9210
|
// src/ui-logic/ui-logic-param/ui-logic-param.ts
|
|
9196
|
-
import { ModelError as ModelError21,
|
|
9211
|
+
import { ModelError as ModelError21, RuntimeModelError as RuntimeModelError27 } from "@ibiz-template/core";
|
|
9197
9212
|
var UILogicParam = class {
|
|
9198
9213
|
/**
|
|
9199
9214
|
* Creates an instance of UILogicParam.
|
|
@@ -9228,7 +9243,10 @@ var UILogicParam = class {
|
|
|
9228
9243
|
if (control) {
|
|
9229
9244
|
ctx.params[tag] = control;
|
|
9230
9245
|
} else {
|
|
9231
|
-
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
|
+
);
|
|
9232
9250
|
}
|
|
9233
9251
|
} else if (m.activeViewParam) {
|
|
9234
9252
|
ctx.params[tag] = parameters.view;
|
|
@@ -9309,7 +9327,7 @@ var UILogic = class {
|
|
|
9309
9327
|
this.params = /* @__PURE__ */ new Map();
|
|
9310
9328
|
var _a;
|
|
9311
9329
|
if (!((_a = model.deuilogicNodes) == null ? void 0 : _a.length)) {
|
|
9312
|
-
throw new
|
|
9330
|
+
throw new RuntimeModelError28(model, "\u754C\u9762\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
|
|
9313
9331
|
}
|
|
9314
9332
|
model.deuilogicNodes.forEach((node) => {
|
|
9315
9333
|
const { logicNodeType } = node;
|
|
@@ -9330,12 +9348,14 @@ var UILogic = class {
|
|
|
9330
9348
|
case "PREPAREJSPARAM":
|
|
9331
9349
|
logicNode = new PrepareJSParamNode(node);
|
|
9332
9350
|
break;
|
|
9333
|
-
case "RESETPARAM":
|
|
9334
|
-
case "COPYPARAM":
|
|
9335
9351
|
case "BINDPARAM":
|
|
9352
|
+
logicNode = new BindParamNode2(node);
|
|
9353
|
+
break;
|
|
9336
9354
|
case "VIEWCTRLINVOKE":
|
|
9337
9355
|
logicNode = new ViewCtrlInvokeNode(node);
|
|
9338
9356
|
break;
|
|
9357
|
+
case "RESETPARAM":
|
|
9358
|
+
case "COPYPARAM":
|
|
9339
9359
|
case "VIEWCTRLFIREEVENT":
|
|
9340
9360
|
case "APPENDPARAM":
|
|
9341
9361
|
case "SORTPARAM":
|
|
@@ -9400,7 +9420,7 @@ var UILogic = class {
|
|
|
9400
9420
|
const start = this.nodes.get(startDEUILogicNodeId);
|
|
9401
9421
|
await this.deepExec(start, ctx);
|
|
9402
9422
|
} else {
|
|
9403
|
-
throw new
|
|
9423
|
+
throw new RuntimeModelError28(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
|
|
9404
9424
|
}
|
|
9405
9425
|
if (ctx.isEndNode) {
|
|
9406
9426
|
return ctx.result;
|
|
@@ -9446,7 +9466,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
9446
9466
|
const app = ibiz.hub.getApp(parameters.context.srfappid);
|
|
9447
9467
|
const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
|
|
9448
9468
|
if (!deUILogic) {
|
|
9449
|
-
throw new
|
|
9469
|
+
throw new RuntimeError20(
|
|
9450
9470
|
"\u627E\u4E0D\u5230\u5B9E\u4F53".concat(appDataEntityId, "\u7684\u754C\u9762\u903B\u8F91").concat(deUILogicId)
|
|
9451
9471
|
);
|
|
9452
9472
|
}
|
|
@@ -9459,7 +9479,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
9459
9479
|
}
|
|
9460
9480
|
|
|
9461
9481
|
// src/ui-action/uiaction-util.ts
|
|
9462
|
-
import { RuntimeError as
|
|
9482
|
+
import { RuntimeError as RuntimeError21 } from "@ibiz-template/core";
|
|
9463
9483
|
var UIActionUtil = class {
|
|
9464
9484
|
/**
|
|
9465
9485
|
* 执行界面行为
|
|
@@ -9474,7 +9494,7 @@ var UIActionUtil = class {
|
|
|
9474
9494
|
static async exec(actionId, params) {
|
|
9475
9495
|
const action = await getUIActionById(actionId);
|
|
9476
9496
|
if (!action) {
|
|
9477
|
-
throw new
|
|
9497
|
+
throw new RuntimeError21("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
|
|
9478
9498
|
}
|
|
9479
9499
|
const provider = await getUIActionProvider(action);
|
|
9480
9500
|
return provider.exec(action, params);
|
|
@@ -9516,7 +9536,7 @@ var UIActionProviderBase = class {
|
|
|
9516
9536
|
const { appDEUILogicId, appDataEntityId, uilogicAttachMode } = action;
|
|
9517
9537
|
if (uilogicAttachMode === "REPLACE") {
|
|
9518
9538
|
if (!appDEUILogicId) {
|
|
9519
|
-
throw new
|
|
9539
|
+
throw new RuntimeModelError29(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
9520
9540
|
}
|
|
9521
9541
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
9522
9542
|
return result;
|
|
@@ -9543,7 +9563,7 @@ var UIActionProviderBase = class {
|
|
|
9543
9563
|
}
|
|
9544
9564
|
if (action.uilogicAttachMode === "AFTER") {
|
|
9545
9565
|
if (!appDEUILogicId) {
|
|
9546
|
-
throw new
|
|
9566
|
+
throw new RuntimeModelError29(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
9547
9567
|
}
|
|
9548
9568
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
9549
9569
|
}
|
|
@@ -9677,7 +9697,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
|
|
|
9677
9697
|
const entityName = action.appDataEntityId;
|
|
9678
9698
|
const methodName = action.appDEMethodId;
|
|
9679
9699
|
if (!entityName || !methodName) {
|
|
9680
|
-
throw new
|
|
9700
|
+
throw new RuntimeModelError30(action, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6216\u5B9E\u4F53\u884C\u4E3A");
|
|
9681
9701
|
}
|
|
9682
9702
|
const { resultContext, resultParams, resultData } = await this.handleParams(
|
|
9683
9703
|
action,
|
|
@@ -9749,7 +9769,7 @@ var SysUIActionProvider = class extends UIActionProviderBase {
|
|
|
9749
9769
|
};
|
|
9750
9770
|
|
|
9751
9771
|
// src/ui-action/provider/front-ui-action-provider.ts
|
|
9752
|
-
import { StringUtil, RuntimeModelError as
|
|
9772
|
+
import { StringUtil, RuntimeModelError as RuntimeModelError31, ModelError as ModelError23 } from "@ibiz-template/core";
|
|
9753
9773
|
var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
9754
9774
|
async execAction(action, args) {
|
|
9755
9775
|
const { context, params, data, event, noWaitRoute } = args;
|
|
@@ -9764,7 +9784,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
9764
9784
|
case "WIZARD": {
|
|
9765
9785
|
const frontPSAppView = action.frontAppViewId;
|
|
9766
9786
|
if (!frontPSAppView) {
|
|
9767
|
-
throw new
|
|
9787
|
+
throw new RuntimeModelError31(action, "\u672A\u914D\u7F6E\u6253\u5F00\u89C6\u56FE");
|
|
9768
9788
|
}
|
|
9769
9789
|
const { resultContext, resultParams } = await this.handleParams(
|
|
9770
9790
|
action,
|
|
@@ -9820,7 +9840,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
9820
9840
|
);
|
|
9821
9841
|
return result || {};
|
|
9822
9842
|
}
|
|
9823
|
-
throw new
|
|
9843
|
+
throw new RuntimeModelError31(action, "\u81EA\u5B9A\u4E49\u7C7B\u578B\u7F3A\u5C11\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
|
|
9824
9844
|
}
|
|
9825
9845
|
};
|
|
9826
9846
|
|
|
@@ -9860,7 +9880,7 @@ function presetUIActionProvider() {
|
|
|
9860
9880
|
}
|
|
9861
9881
|
|
|
9862
9882
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
9863
|
-
import { RuntimeError as
|
|
9883
|
+
import { RuntimeError as RuntimeError22 } from "@ibiz-template/core";
|
|
9864
9884
|
var LogicExecutor = class {
|
|
9865
9885
|
/**
|
|
9866
9886
|
* @author lxm
|
|
@@ -9881,7 +9901,7 @@ var LogicExecutor = class {
|
|
|
9881
9901
|
*/
|
|
9882
9902
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9883
9903
|
execute(_executeParams) {
|
|
9884
|
-
throw new
|
|
9904
|
+
throw new RuntimeError22("Method not implemented.");
|
|
9885
9905
|
}
|
|
9886
9906
|
/**
|
|
9887
9907
|
* 销毁方法
|
|
@@ -9930,7 +9950,7 @@ var LogicExecutorFactory = class {
|
|
|
9930
9950
|
};
|
|
9931
9951
|
|
|
9932
9952
|
// src/logic-scheduler/executor/script-executor.ts
|
|
9933
|
-
import { RuntimeError as
|
|
9953
|
+
import { RuntimeError as RuntimeError23 } from "@ibiz-template/core";
|
|
9934
9954
|
var ScriptExecutor = class extends LogicExecutor {
|
|
9935
9955
|
constructor() {
|
|
9936
9956
|
super(...arguments);
|
|
@@ -9950,7 +9970,7 @@ var ScriptExecutor = class extends LogicExecutor {
|
|
|
9950
9970
|
* @return {*} {IData[]}
|
|
9951
9971
|
*/
|
|
9952
9972
|
convertScriptArgs(_executeParams) {
|
|
9953
|
-
throw new
|
|
9973
|
+
throw new RuntimeError23("\u672A\u8BBE\u7F6E\u811A\u672C\u6267\u884C\u53C2\u6570\u8F6C\u6362\u65B9\u6CD5");
|
|
9954
9974
|
}
|
|
9955
9975
|
/**
|
|
9956
9976
|
* 初始化脚本执行器
|
|
@@ -9977,13 +9997,13 @@ var ScriptExecutor = class extends LogicExecutor {
|
|
|
9977
9997
|
};
|
|
9978
9998
|
|
|
9979
9999
|
// src/logic-scheduler/executor/app-de-ui-logic-executor.ts
|
|
9980
|
-
import { RuntimeModelError as
|
|
10000
|
+
import { RuntimeModelError as RuntimeModelError32 } from "@ibiz-template/core";
|
|
9981
10001
|
var AppDEUILogicExecutor = class extends LogicExecutor {
|
|
9982
10002
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9983
10003
|
execute(executeParams) {
|
|
9984
10004
|
const { appDEUILogicId, appDataEntityId } = this.logic;
|
|
9985
10005
|
if (!appDEUILogicId) {
|
|
9986
|
-
throw new
|
|
10006
|
+
throw new RuntimeModelError32(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
9987
10007
|
}
|
|
9988
10008
|
execUILogic(appDEUILogicId, appDataEntityId, executeParams);
|
|
9989
10009
|
}
|
|
@@ -9995,6 +10015,20 @@ var LogicScheduler = class {
|
|
|
9995
10015
|
constructor(logics) {
|
|
9996
10016
|
this.triggers = /* @__PURE__ */ new Map();
|
|
9997
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;
|
|
9998
10032
|
this.logics = logics;
|
|
9999
10033
|
logics.forEach((logic) => {
|
|
10000
10034
|
try {
|
|
@@ -10040,6 +10074,15 @@ var LogicScheduler = class {
|
|
|
10040
10074
|
* @return {*} {LogicTrigger}
|
|
10041
10075
|
*/
|
|
10042
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
|
+
}
|
|
10043
10086
|
return ibiz.scheduler.triggerFactory.createTrigger(logic, this);
|
|
10044
10087
|
}
|
|
10045
10088
|
/**
|
|
@@ -10164,6 +10207,22 @@ var LogicScheduler = class {
|
|
|
10164
10207
|
const params = this.getExecuteParams(executeParams);
|
|
10165
10208
|
return trigger.execute(params);
|
|
10166
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
|
+
}
|
|
10167
10226
|
};
|
|
10168
10227
|
|
|
10169
10228
|
// src/logic-scheduler/scheduler/control-logic-scheduler.ts
|
|
@@ -10279,7 +10338,7 @@ var LogicSchedulerCenter = class {
|
|
|
10279
10338
|
};
|
|
10280
10339
|
|
|
10281
10340
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
10282
|
-
import { RuntimeError as
|
|
10341
|
+
import { RuntimeError as RuntimeError24 } from "@ibiz-template/core";
|
|
10283
10342
|
var LogicTrigger = class {
|
|
10284
10343
|
/**
|
|
10285
10344
|
* @author lxm
|
|
@@ -10322,7 +10381,7 @@ var LogicTrigger = class {
|
|
|
10322
10381
|
if (this.executor) {
|
|
10323
10382
|
return this.executor.execute(executeParams);
|
|
10324
10383
|
}
|
|
10325
|
-
throw new
|
|
10384
|
+
throw new RuntimeError24("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
|
|
10326
10385
|
}
|
|
10327
10386
|
/**
|
|
10328
10387
|
* 销毁方法
|
|
@@ -10339,12 +10398,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
10339
10398
|
};
|
|
10340
10399
|
|
|
10341
10400
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
10342
|
-
import { RuntimeError as
|
|
10401
|
+
import { RuntimeError as RuntimeError25 } from "@ibiz-template/core";
|
|
10343
10402
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
10344
10403
|
bindExecutor(executor) {
|
|
10345
10404
|
super.bindExecutor(executor);
|
|
10346
10405
|
if (this.executor.type !== "SCRIPT") {
|
|
10347
|
-
throw new
|
|
10406
|
+
throw new RuntimeError25(
|
|
10348
10407
|
"\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
|
|
10349
10408
|
);
|
|
10350
10409
|
}
|
|
@@ -10371,12 +10430,12 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
10371
10430
|
if (typeof result === "boolean") {
|
|
10372
10431
|
return result;
|
|
10373
10432
|
}
|
|
10374
|
-
throw new
|
|
10433
|
+
throw new RuntimeError25("".concat(this.logic.id, "\u903B\u8F91\u8FD4\u56DE\u503C\u4E0D\u662F\u5E03\u5C14\u503C"));
|
|
10375
10434
|
}
|
|
10376
10435
|
};
|
|
10377
10436
|
|
|
10378
10437
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
10379
|
-
import { RuntimeError as
|
|
10438
|
+
import { RuntimeError as RuntimeError26 } from "@ibiz-template/core";
|
|
10380
10439
|
var TimerTrigger = class extends LogicTrigger {
|
|
10381
10440
|
constructor() {
|
|
10382
10441
|
super(...arguments);
|
|
@@ -10385,7 +10444,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
10385
10444
|
start() {
|
|
10386
10445
|
this.timer = setInterval(() => {
|
|
10387
10446
|
if (!this.scheduler.defaultParamsCb) {
|
|
10388
|
-
throw new
|
|
10447
|
+
throw new RuntimeError26("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
|
|
10389
10448
|
}
|
|
10390
10449
|
const params = this.scheduler.defaultParamsCb();
|
|
10391
10450
|
this.executor.execute(params);
|
|
@@ -10402,8 +10461,8 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
10402
10461
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
10403
10462
|
import {
|
|
10404
10463
|
ModelError as ModelError26,
|
|
10405
|
-
RuntimeError as
|
|
10406
|
-
RuntimeModelError as
|
|
10464
|
+
RuntimeError as RuntimeError27,
|
|
10465
|
+
RuntimeModelError as RuntimeModelError33
|
|
10407
10466
|
} from "@ibiz-template/core";
|
|
10408
10467
|
import { notNilEmpty as notNilEmpty5 } from "qx-util";
|
|
10409
10468
|
var AppUILogicExecutor = class extends LogicExecutor {
|
|
@@ -10438,18 +10497,18 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
10438
10497
|
const { context, params, ...rest } = parameters;
|
|
10439
10498
|
const { data } = parameters;
|
|
10440
10499
|
if (!(data == null ? void 0 : data[0])) {
|
|
10441
|
-
throw new
|
|
10500
|
+
throw new RuntimeError27("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
|
|
10442
10501
|
}
|
|
10443
10502
|
const openViewRef = appUILogic.openDataAppView;
|
|
10444
10503
|
if (!openViewRef) {
|
|
10445
|
-
throw new
|
|
10504
|
+
throw new RuntimeModelError33(
|
|
10446
10505
|
appUILogic,
|
|
10447
10506
|
"opendata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE"
|
|
10448
10507
|
);
|
|
10449
10508
|
}
|
|
10450
10509
|
const openView = openViewRef.refAppViewId;
|
|
10451
10510
|
if (!openView) {
|
|
10452
|
-
throw new
|
|
10511
|
+
throw new RuntimeModelError33(
|
|
10453
10512
|
appUILogic,
|
|
10454
10513
|
"opendata\u89C6\u56FE\u903B\u8F91\u7684\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE\u6CA1\u6709\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"
|
|
10455
10514
|
);
|
|
@@ -10501,7 +10560,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
10501
10560
|
} else {
|
|
10502
10561
|
newViewRef = newDataAppView;
|
|
10503
10562
|
if (!newViewRef || !newViewRef.refAppViewId) {
|
|
10504
|
-
throw new
|
|
10563
|
+
throw new RuntimeModelError33(
|
|
10505
10564
|
appUILogic,
|
|
10506
10565
|
"newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE"
|
|
10507
10566
|
);
|
|
@@ -10547,7 +10606,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
10547
10606
|
const { wizardAppView, newDataAppViews } = appUILogic;
|
|
10548
10607
|
const { context, params, ...rest } = parameters;
|
|
10549
10608
|
if (!wizardAppView || !wizardAppView.refAppViewId) {
|
|
10550
|
-
throw new
|
|
10609
|
+
throw new RuntimeModelError33(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
|
|
10551
10610
|
}
|
|
10552
10611
|
const result = await ibiz.commands.execute(
|
|
10553
10612
|
OpenAppViewCommand.TAG,
|
|
@@ -10561,12 +10620,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
10561
10620
|
}
|
|
10562
10621
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
10563
10622
|
if (!selectData) {
|
|
10564
|
-
throw new
|
|
10623
|
+
throw new RuntimeError27("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
|
|
10565
10624
|
}
|
|
10566
10625
|
const indexType = selectData.srfkey;
|
|
10567
10626
|
const findView = newDataAppViews == null ? void 0 : newDataAppViews.find((item) => item.refMode === indexType);
|
|
10568
10627
|
if (!findView) {
|
|
10569
|
-
throw new
|
|
10628
|
+
throw new RuntimeError27(
|
|
10570
10629
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
10571
10630
|
);
|
|
10572
10631
|
}
|
|
@@ -10599,6 +10658,31 @@ var ViewEventTrigger = class extends LogicTrigger {
|
|
|
10599
10658
|
}
|
|
10600
10659
|
};
|
|
10601
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
|
+
|
|
10602
10686
|
// src/logic-scheduler/index.ts
|
|
10603
10687
|
function installLogicSchedule() {
|
|
10604
10688
|
ibiz.scheduler = new LogicSchedulerCenter();
|
|
@@ -10626,6 +10710,10 @@ function installLogicSchedule() {
|
|
|
10626
10710
|
"VIEWEVENT",
|
|
10627
10711
|
(logic, scheduler) => new ViewEventTrigger(logic, scheduler)
|
|
10628
10712
|
);
|
|
10713
|
+
ibiz.scheduler.triggerFactory.register(
|
|
10714
|
+
"CTRLEVENT",
|
|
10715
|
+
(logic, scheduler) => new ControlEventTrigger(logic, scheduler)
|
|
10716
|
+
);
|
|
10629
10717
|
ibiz.scheduler.executorFactory.register(
|
|
10630
10718
|
"SCRIPT",
|
|
10631
10719
|
(logic, scheduler) => new ScriptExecutor(logic, scheduler)
|
|
@@ -10770,13 +10858,13 @@ var PanelNotifyState = /* @__PURE__ */ ((PanelNotifyState2) => {
|
|
|
10770
10858
|
|
|
10771
10859
|
// src/controller/common/view/view.controller.ts
|
|
10772
10860
|
import { createUUID as createUUID2, notNilEmpty as notNilEmpty6 } from "qx-util";
|
|
10773
|
-
import { IBizContext as IBizContext2, RuntimeError as
|
|
10861
|
+
import { IBizContext as IBizContext2, RuntimeError as RuntimeError30 } from "@ibiz-template/core";
|
|
10774
10862
|
|
|
10775
10863
|
// src/controller/utils/loading/loading.state.ts
|
|
10776
10864
|
import { NOOP } from "@ibiz-template/core";
|
|
10777
10865
|
|
|
10778
10866
|
// src/controller/utils/counter/counter.ts
|
|
10779
|
-
import { RuntimeError as
|
|
10867
|
+
import { RuntimeError as RuntimeError28 } from "@ibiz-template/core";
|
|
10780
10868
|
var Counter = class {
|
|
10781
10869
|
/**
|
|
10782
10870
|
* Creates an instance of Counter.
|
|
@@ -10838,7 +10926,7 @@ var Counter = class {
|
|
|
10838
10926
|
return;
|
|
10839
10927
|
}
|
|
10840
10928
|
if (this.count === 0) {
|
|
10841
|
-
throw new
|
|
10929
|
+
throw new RuntimeError28("\u9519\u8BEF\u7684\u8C03\u7528\uFF01decrement\u4E0D\u80FD\u5BF9count\u4E3A0\u8C03\u7528");
|
|
10842
10930
|
}
|
|
10843
10931
|
this.count -= 1;
|
|
10844
10932
|
if (this.count === 0) {
|
|
@@ -10930,7 +11018,7 @@ var CTX = class {
|
|
|
10930
11018
|
* @date 2023-04-26 07:54:46
|
|
10931
11019
|
* @protected
|
|
10932
11020
|
*/
|
|
10933
|
-
this.evt = new QXEvent2();
|
|
11021
|
+
this.evt = new QXEvent2(3e3);
|
|
10934
11022
|
/**
|
|
10935
11023
|
* 当前视图控制器集合(包含自身视图控制器,部件控制器,和下一层级的视图的控制器)
|
|
10936
11024
|
* @author lxm
|
|
@@ -11352,8 +11440,8 @@ function getOriginData(data) {
|
|
|
11352
11440
|
}
|
|
11353
11441
|
|
|
11354
11442
|
// src/controller/utils/value-rule/value-rule.ts
|
|
11355
|
-
import { RuntimeError as
|
|
11356
|
-
import { isNilOrEmpty as
|
|
11443
|
+
import { RuntimeError as RuntimeError29 } from "@ibiz-template/core";
|
|
11444
|
+
import { isNilOrEmpty as isNilOrEmpty5 } from "qx-util";
|
|
11357
11445
|
function generateRules(itemVRs, name, valueItemName) {
|
|
11358
11446
|
const rules = [];
|
|
11359
11447
|
itemVRs.forEach((item) => {
|
|
@@ -11391,7 +11479,7 @@ function generateRules(itemVRs, name, valueItemName) {
|
|
|
11391
11479
|
const valueName = valueItemName || name;
|
|
11392
11480
|
rules.push({
|
|
11393
11481
|
validator: (rule, value, callback, source) => {
|
|
11394
|
-
if (
|
|
11482
|
+
if (isNilOrEmpty5(source[valueName])) {
|
|
11395
11483
|
return true;
|
|
11396
11484
|
}
|
|
11397
11485
|
const { isPast, infoMessage } = verifyDeRules(
|
|
@@ -11400,7 +11488,7 @@ function generateRules(itemVRs, name, valueItemName) {
|
|
|
11400
11488
|
deRule.groupCond
|
|
11401
11489
|
);
|
|
11402
11490
|
if (!isPast) {
|
|
11403
|
-
callback(new
|
|
11491
|
+
callback(new RuntimeError29(infoMessage || deRule.ruleInfo));
|
|
11404
11492
|
}
|
|
11405
11493
|
return true;
|
|
11406
11494
|
},
|
|
@@ -11571,7 +11659,7 @@ var BaseController = class {
|
|
|
11571
11659
|
async destroyed() {
|
|
11572
11660
|
await this.onDestroyed();
|
|
11573
11661
|
ibiz.log.debug("".concat(this.constructor.name, ":").concat(this.name, " onDestroyed"));
|
|
11574
|
-
this._evt.emit("onDestroyed", void 0);
|
|
11662
|
+
await this._evt.emit("onDestroyed", void 0);
|
|
11575
11663
|
this.evt.destroy();
|
|
11576
11664
|
}
|
|
11577
11665
|
/**
|
|
@@ -11780,9 +11868,11 @@ var ViewController = class extends BaseController {
|
|
|
11780
11868
|
this.scheduler.defaultParamsCb = () => {
|
|
11781
11869
|
return this.getEventArgs();
|
|
11782
11870
|
};
|
|
11783
|
-
this.
|
|
11784
|
-
this.
|
|
11785
|
-
|
|
11871
|
+
if (this.scheduler.hasViewEventTrigger) {
|
|
11872
|
+
this.evt.onAll((_eventName, event) => {
|
|
11873
|
+
this.scheduler.triggerViewEvent(event);
|
|
11874
|
+
});
|
|
11875
|
+
}
|
|
11786
11876
|
}
|
|
11787
11877
|
if (this.engines.length) {
|
|
11788
11878
|
await Promise.all(this.engines.map((engine) => engine.onCreated()));
|
|
@@ -11850,7 +11940,7 @@ var ViewController = class extends BaseController {
|
|
|
11850
11940
|
async callUIAction(key, args) {
|
|
11851
11941
|
const result = this.call(key, args);
|
|
11852
11942
|
if (result === void 0) {
|
|
11853
|
-
throw new
|
|
11943
|
+
throw new RuntimeError30("\u6CA1\u6709\u5F15\u64CE\u652F\u6301\u9884\u7F6E\u754C\u9762\u884C\u4E3A".concat(key));
|
|
11854
11944
|
}
|
|
11855
11945
|
return result;
|
|
11856
11946
|
}
|
|
@@ -11872,6 +11962,7 @@ var ViewController = class extends BaseController {
|
|
|
11872
11962
|
* @param {IViewLayoutPanelController} panel
|
|
11873
11963
|
*/
|
|
11874
11964
|
setLayoutPanel(panel) {
|
|
11965
|
+
var _a;
|
|
11875
11966
|
this.layoutPanel = panel;
|
|
11876
11967
|
if (this.layoutPanel.state.isMounted) {
|
|
11877
11968
|
this.mountCounter.attend(this.layoutPanel.model.name);
|
|
@@ -11880,6 +11971,14 @@ var ViewController = class extends BaseController {
|
|
|
11880
11971
|
this.mountCounter.attend(this.layoutPanel.model.name);
|
|
11881
11972
|
});
|
|
11882
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
|
+
}
|
|
11883
11982
|
}
|
|
11884
11983
|
};
|
|
11885
11984
|
|
|
@@ -11995,7 +12094,7 @@ var EditorController = class {
|
|
|
11995
12094
|
};
|
|
11996
12095
|
|
|
11997
12096
|
// src/controller/common/editor/code-list-editor.controller.ts
|
|
11998
|
-
import { RuntimeModelError as
|
|
12097
|
+
import { RuntimeModelError as RuntimeModelError34 } from "@ibiz-template/core";
|
|
11999
12098
|
var CodeListEditorController = class extends EditorController {
|
|
12000
12099
|
/**
|
|
12001
12100
|
* 加载代码表数据
|
|
@@ -12019,7 +12118,7 @@ var CodeListEditorController = class extends EditorController {
|
|
|
12019
12118
|
);
|
|
12020
12119
|
return dataItems;
|
|
12021
12120
|
}
|
|
12022
|
-
throw new
|
|
12121
|
+
throw new RuntimeModelError34(this.model, "\u8BF7\u914D\u7F6E\u4EE3\u7801\u8868");
|
|
12023
12122
|
}
|
|
12024
12123
|
};
|
|
12025
12124
|
|
|
@@ -12180,7 +12279,7 @@ var ControlController = class extends BaseController {
|
|
|
12180
12279
|
};
|
|
12181
12280
|
|
|
12182
12281
|
// src/controller/common/control/md-control.controller.ts
|
|
12183
|
-
import { isElementSame, RuntimeError as
|
|
12282
|
+
import { isElementSame, RuntimeError as RuntimeError31 } from "@ibiz-template/core";
|
|
12184
12283
|
var MDControlController = class extends ControlController {
|
|
12185
12284
|
get _evt() {
|
|
12186
12285
|
return this.evt;
|
|
@@ -12306,9 +12405,9 @@ var MDControlController = class extends ControlController {
|
|
|
12306
12405
|
async remove(args) {
|
|
12307
12406
|
const { context, params, data } = this.handlerAbilityParams(args);
|
|
12308
12407
|
if (!(data == null ? void 0 : data.length)) {
|
|
12309
|
-
throw new
|
|
12408
|
+
throw new RuntimeError31("\u672A\u9009\u4E2D\u6570\u636E");
|
|
12310
12409
|
}
|
|
12311
|
-
const del = await ibiz.
|
|
12410
|
+
const del = await ibiz.confirm.error({
|
|
12312
12411
|
title: "\u6570\u636E\u5220\u9664",
|
|
12313
12412
|
desc: "\u786E\u8BA4\u5220\u9664\u6570\u636E\uFF1F"
|
|
12314
12413
|
});
|