@ibiz-template/runtime 0.1.1 → 0.1.3
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 +122 -92
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
- package/out/controller/common/control/md-control.controller.js +25 -26
- package/out/de-logic/index.d.ts +13 -0
- package/out/de-logic/index.d.ts.map +1 -1
- package/out/de-logic/index.js +34 -2
- package/out/engine/md-view.engine.d.ts +2 -2
- package/out/engine/md-view.engine.d.ts.map +1 -1
- package/out/engine/md-view.engine.js +7 -3
- package/out/index.d.ts +2 -0
- package/out/index.d.ts.map +1 -1
- package/out/index.js +2 -0
- package/out/interface/controller/controller/control/i-pickup-view-panel.controller.d.ts +10 -0
- package/out/interface/controller/controller/control/i-pickup-view-panel.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-tree-exp-bar.controller.d.ts +11 -0
- package/out/interface/controller/controller/control/i-tree-exp-bar.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-tree.controller.d.ts +0 -10
- package/out/interface/controller/controller/control/i-tree.controller.d.ts.map +1 -1
- package/out/interface/controller/event/control/i-pickup-view-panel.event.d.ts +15 -0
- package/out/interface/controller/event/control/i-pickup-view-panel.event.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-grid.state.d.ts +52 -0
- package/out/interface/controller/state/control/i-grid.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-tree.state.d.ts +2 -2
- package/out/interface/controller/state/control/i-tree.state.d.ts.map +1 -1
- package/out/model/layout/layout.d.ts.map +1 -1
- package/out/model/layout/layout.js +8 -2
- package/out/utils/open-redirect-view/open-redirect-view.d.ts.map +1 -1
- package/out/utils/open-redirect-view/open-redirect-view.js +18 -16
- package/package.json +4 -3
- package/src/controller/common/control/md-control.controller.ts +28 -29
- package/src/de-logic/index.ts +50 -2
- package/src/engine/md-view.engine.ts +8 -3
- package/src/index.ts +2 -0
- package/src/interface/controller/controller/control/i-pickup-view-panel.controller.ts +10 -0
- package/src/interface/controller/controller/control/i-tree-exp-bar.controller.ts +13 -1
- package/src/interface/controller/controller/control/i-tree.controller.ts +0 -11
- package/src/interface/controller/event/control/i-pickup-view-panel.event.ts +16 -0
- package/src/interface/controller/state/control/i-grid.state.ts +58 -0
- package/src/interface/controller/state/control/i-tree.state.ts +2 -2
- package/src/model/layout/layout.ts +6 -2
- package/src/utils/open-redirect-view/open-redirect-view.ts +18 -16
package/dist/index.esm.js
CHANGED
|
@@ -711,7 +711,9 @@ function calcLayoutHeightWidth(layoutPos) {
|
|
|
711
711
|
if (widthMode === "FULL") {
|
|
712
712
|
result.width = "100%";
|
|
713
713
|
} else if (width && width > 0) {
|
|
714
|
-
if (
|
|
714
|
+
if (width > 0 && width <= 1) {
|
|
715
|
+
result.width = "".concat(width * 100, "%");
|
|
716
|
+
} else if (widthMode === "PERCENTAGE") {
|
|
715
717
|
result.width = "".concat(width, "%");
|
|
716
718
|
} else {
|
|
717
719
|
result.width = "".concat(width, "px");
|
|
@@ -720,7 +722,9 @@ function calcLayoutHeightWidth(layoutPos) {
|
|
|
720
722
|
if (heightMode === "FULL") {
|
|
721
723
|
result.height = "100%";
|
|
722
724
|
} else if (height && height > 0) {
|
|
723
|
-
if (
|
|
725
|
+
if (height > 0 && height <= 1) {
|
|
726
|
+
result.height = "".concat(height * 100, "%");
|
|
727
|
+
} else if (heightMode === "PERCENTAGE") {
|
|
724
728
|
result.height = "".concat(height, "%");
|
|
725
729
|
} else {
|
|
726
730
|
result.height = "".concat(height, "px");
|
|
@@ -1085,21 +1089,13 @@ async function openDERedirectView(appView, context, params = {}, data = []) {
|
|
|
1085
1089
|
);
|
|
1086
1090
|
throw new RuntimeModelError(
|
|
1087
1091
|
appView,
|
|
1088
|
-
"\u672A\u627E\u5230\u91CD\u5B9A\u5411\u6807\u8BC6[".concat(rdTag, "]\u6216[").concat(deRdTag, "]\u6216[").concat(wfRdTag, "]\u5BF9\u5E94\u89C6\u56FE")
|
|
1092
|
+
"\u672A\u627E\u5230\u91CD\u5B9A\u5411\u6807\u8BC6[".concat(rdTag, "]\u6216[").concat(deRdTag, "]\u6216\u5DE5\u4F5C\u6D41[").concat(wfRdTag, "]\u5BF9\u5E94\u89C6\u56FE")
|
|
1089
1093
|
);
|
|
1090
1094
|
}
|
|
1091
1095
|
return { ok: true, data: [] };
|
|
1092
1096
|
}
|
|
1093
1097
|
async function calcDERdTag(entity, rdView, params, data) {
|
|
1094
1098
|
let rdTag = "";
|
|
1095
|
-
const typeFieldId = rdView.typeAppDEFieldId;
|
|
1096
|
-
if (typeFieldId) {
|
|
1097
|
-
const { codeName } = findFieldById(entity, typeFieldId);
|
|
1098
|
-
const value = data[codeName.toLowerCase()];
|
|
1099
|
-
if (notNilEmpty2(value)) {
|
|
1100
|
-
return value;
|
|
1101
|
-
}
|
|
1102
|
-
}
|
|
1103
1099
|
const defView = "".concat(ibiz.env.isMob ? "MOB" : "", "EDITVIEW");
|
|
1104
1100
|
const srfWf = params.srfwf;
|
|
1105
1101
|
if (notNilEmpty2(srfWf)) {
|
|
@@ -1109,9 +1105,19 @@ async function calcDERdTag(entity, rdView, params, data) {
|
|
|
1109
1105
|
return "".concat(defView, ":").concat(srfWf.toUpperCase());
|
|
1110
1106
|
}
|
|
1111
1107
|
let typeValue = "";
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1108
|
+
const typeFieldId = rdView.typeAppDEFieldId;
|
|
1109
|
+
if (typeFieldId) {
|
|
1110
|
+
const { codeName } = findFieldById(entity, typeFieldId);
|
|
1111
|
+
const value = data[codeName.toLowerCase()];
|
|
1112
|
+
if (notNilEmpty2(value)) {
|
|
1113
|
+
typeValue = value;
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
if (isNilOrEmpty2(typeValue)) {
|
|
1117
|
+
if (entity.indexTypeAppDEFieldId) {
|
|
1118
|
+
const { codeName } = findFieldById(entity, entity.indexTypeAppDEFieldId);
|
|
1119
|
+
typeValue = data[codeName.toLowerCase()];
|
|
1120
|
+
}
|
|
1115
1121
|
}
|
|
1116
1122
|
if (isNilOrEmpty2(typeValue)) {
|
|
1117
1123
|
if (entity.formTypeAppDEFieldId) {
|
|
@@ -1120,7 +1126,7 @@ async function calcDERdTag(entity, rdView, params, data) {
|
|
|
1120
1126
|
}
|
|
1121
1127
|
}
|
|
1122
1128
|
if (notNilEmpty2(typeValue)) {
|
|
1123
|
-
rdTag = "".concat(defView, ":").concat(typeValue);
|
|
1129
|
+
rdTag = "".concat(defView, ":").concat(typeValue.toUpperCase());
|
|
1124
1130
|
} else {
|
|
1125
1131
|
rdTag = "".concat(defView);
|
|
1126
1132
|
}
|
|
@@ -4083,7 +4089,7 @@ var CounterService = class {
|
|
|
4083
4089
|
CounterService.counterMap = /* @__PURE__ */ new Map();
|
|
4084
4090
|
|
|
4085
4091
|
// src/service/service/entity/de.service.ts
|
|
4086
|
-
import { ModelError as ModelError15, RuntimeError as
|
|
4092
|
+
import { ModelError as ModelError15, RuntimeError as RuntimeError11 } from "@ibiz-template/core";
|
|
4087
4093
|
|
|
4088
4094
|
// src/service/service/work-flow/work-flow.service.ts
|
|
4089
4095
|
import { RuntimeError as RuntimeError9 } from "@ibiz-template/core";
|
|
@@ -4903,7 +4909,7 @@ var Method = class {
|
|
|
4903
4909
|
};
|
|
4904
4910
|
|
|
4905
4911
|
// src/de-logic/index.ts
|
|
4906
|
-
import { HttpError as HttpError2, HttpResponse as HttpResponse2 } from "@ibiz-template/core";
|
|
4912
|
+
import { HttpError as HttpError2, HttpResponse as HttpResponse2, RuntimeError as RuntimeError10 } from "@ibiz-template/core";
|
|
4907
4913
|
|
|
4908
4914
|
// src/de-logic/de-logic.ts
|
|
4909
4915
|
import { ModelError as ModelError13, RuntimeModelError as RuntimeModelError17 } from "@ibiz-template/core";
|
|
@@ -5838,6 +5844,10 @@ var DELogic = class {
|
|
|
5838
5844
|
|
|
5839
5845
|
// src/de-logic/index.ts
|
|
5840
5846
|
var deLogicMap = /* @__PURE__ */ new Map();
|
|
5847
|
+
async function findDeLogic(deDELogicId, dataEntityId, appId) {
|
|
5848
|
+
const appDataEntity = await ibiz.hub.getAppDataEntity(dataEntityId, appId);
|
|
5849
|
+
return findDELogic(deDELogicId, appDataEntity);
|
|
5850
|
+
}
|
|
5841
5851
|
async function execDELogic(deDELogic, context, data, params) {
|
|
5842
5852
|
if (!deLogicMap.has(deDELogic)) {
|
|
5843
5853
|
deLogicMap.set(deDELogic, new DELogic(deDELogic));
|
|
@@ -5845,6 +5855,17 @@ async function execDELogic(deDELogic, context, data, params) {
|
|
|
5845
5855
|
const deLogic = deLogicMap.get(deDELogic);
|
|
5846
5856
|
return deLogic.exec(context, data, params);
|
|
5847
5857
|
}
|
|
5858
|
+
async function execDELogicById(deDELogicId, dataEntityId, context, data, params) {
|
|
5859
|
+
const deLogic = await findDeLogic(
|
|
5860
|
+
deDELogicId,
|
|
5861
|
+
dataEntityId,
|
|
5862
|
+
context.srfappid
|
|
5863
|
+
);
|
|
5864
|
+
if (!deLogic) {
|
|
5865
|
+
throw new RuntimeError10("".concat(dataEntityId, "\u627E\u4E0D\u5230\u5B9E\u4F53\u903B\u8F91").concat(deDELogicId));
|
|
5866
|
+
}
|
|
5867
|
+
return execDELogic(deLogic, context, data, params);
|
|
5868
|
+
}
|
|
5848
5869
|
async function execDELogicAction(deDELogic, context, data, params) {
|
|
5849
5870
|
try {
|
|
5850
5871
|
const result = await execDELogic(deDELogic, context, data, params);
|
|
@@ -6408,7 +6429,7 @@ var DEService = class {
|
|
|
6408
6429
|
if (method) {
|
|
6409
6430
|
return method.exec(context, params, params2);
|
|
6410
6431
|
}
|
|
6411
|
-
throw new
|
|
6432
|
+
throw new RuntimeError11("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
|
|
6412
6433
|
}
|
|
6413
6434
|
};
|
|
6414
6435
|
|
|
@@ -6657,7 +6678,7 @@ var ControlService = class {
|
|
|
6657
6678
|
};
|
|
6658
6679
|
|
|
6659
6680
|
// src/service/service/control/md-control.service.ts
|
|
6660
|
-
import { RuntimeError as
|
|
6681
|
+
import { RuntimeError as RuntimeError12 } from "@ibiz-template/core";
|
|
6661
6682
|
import { isArray } from "qx-util";
|
|
6662
6683
|
var MDControlService = class extends ControlService {
|
|
6663
6684
|
/**
|
|
@@ -6766,7 +6787,7 @@ var MDControlService = class extends ControlService {
|
|
|
6766
6787
|
* @returns {*} {Promise<IHttpResponse>}
|
|
6767
6788
|
*/
|
|
6768
6789
|
async exportData(_dataExport, _context, _params = {}) {
|
|
6769
|
-
throw new
|
|
6790
|
+
throw new RuntimeError12("\u672A\u5B9E\u73B0");
|
|
6770
6791
|
}
|
|
6771
6792
|
/**
|
|
6772
6793
|
* 处理响应
|
|
@@ -6801,7 +6822,7 @@ var MDControlService = class extends ControlService {
|
|
|
6801
6822
|
};
|
|
6802
6823
|
|
|
6803
6824
|
// src/service/service/authority/authority.service.ts
|
|
6804
|
-
import { RuntimeError as
|
|
6825
|
+
import { RuntimeError as RuntimeError13 } from "@ibiz-template/core";
|
|
6805
6826
|
|
|
6806
6827
|
// src/service/service/authority/de-authority.service.ts
|
|
6807
6828
|
var DeAuthorityService = class {
|
|
@@ -6937,7 +6958,7 @@ var AuthorityService = class {
|
|
|
6937
6958
|
this.appModel.appId
|
|
6938
6959
|
);
|
|
6939
6960
|
if (!entityModel) {
|
|
6940
|
-
throw new
|
|
6961
|
+
throw new RuntimeError13("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
6941
6962
|
}
|
|
6942
6963
|
const constructor = this.constructorCache.get(id);
|
|
6943
6964
|
let service;
|
|
@@ -6960,7 +6981,7 @@ var AuthorityService = class {
|
|
|
6960
6981
|
*/
|
|
6961
6982
|
async init(appData = ibiz.appData) {
|
|
6962
6983
|
if (!appData) {
|
|
6963
|
-
throw new
|
|
6984
|
+
throw new RuntimeError13("\u6CA1\u6709appData\u6570\u636E");
|
|
6964
6985
|
}
|
|
6965
6986
|
if (appData.unires) {
|
|
6966
6987
|
this.resCodes = appData.unires;
|
|
@@ -7155,7 +7176,7 @@ var UIMapField = class {
|
|
|
7155
7176
|
};
|
|
7156
7177
|
|
|
7157
7178
|
// src/service/de-service-util.ts
|
|
7158
|
-
import { RuntimeError as
|
|
7179
|
+
import { RuntimeError as RuntimeError14 } from "@ibiz-template/core";
|
|
7159
7180
|
var DEServiceUtil = class {
|
|
7160
7181
|
/**
|
|
7161
7182
|
* Creates an instance of DEServiceUtil.
|
|
@@ -7210,7 +7231,7 @@ var DEServiceUtil = class {
|
|
|
7210
7231
|
this.appModel.appId
|
|
7211
7232
|
);
|
|
7212
7233
|
if (!entityModel) {
|
|
7213
|
-
throw new
|
|
7234
|
+
throw new RuntimeError14("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
7214
7235
|
}
|
|
7215
7236
|
const constructor = this.constructorCache.get(id);
|
|
7216
7237
|
let service;
|
|
@@ -7254,7 +7275,7 @@ var DEServiceUtil = class {
|
|
|
7254
7275
|
};
|
|
7255
7276
|
|
|
7256
7277
|
// src/app-hub.ts
|
|
7257
|
-
import { RuntimeError as
|
|
7278
|
+
import { RuntimeError as RuntimeError16 } from "@ibiz-template/core";
|
|
7258
7279
|
|
|
7259
7280
|
// src/application.ts
|
|
7260
7281
|
import { Net } from "@ibiz-template/core";
|
|
@@ -7436,7 +7457,7 @@ var Convert = class {
|
|
|
7436
7457
|
};
|
|
7437
7458
|
|
|
7438
7459
|
// src/hub/config/app-view-config-service.ts
|
|
7439
|
-
import { RuntimeError as
|
|
7460
|
+
import { RuntimeError as RuntimeError15 } from "@ibiz-template/core";
|
|
7440
7461
|
var AppViewConfigService = class {
|
|
7441
7462
|
constructor() {
|
|
7442
7463
|
/**
|
|
@@ -7453,7 +7474,7 @@ var AppViewConfigService = class {
|
|
|
7453
7474
|
if (!this.viewConfigs.has(key)) {
|
|
7454
7475
|
const model = await ibiz.hub.getAppView(key);
|
|
7455
7476
|
if (!model) {
|
|
7456
|
-
throw new
|
|
7477
|
+
throw new RuntimeError15("\u89C6\u56FE[".concat(key, "]\u4E0D\u5B58\u5728"));
|
|
7457
7478
|
}
|
|
7458
7479
|
this.set(model.id, {
|
|
7459
7480
|
id: model.id,
|
|
@@ -7657,7 +7678,7 @@ var AppHub = class {
|
|
|
7657
7678
|
this.registerAppView(appView);
|
|
7658
7679
|
return appView;
|
|
7659
7680
|
}
|
|
7660
|
-
throw new
|
|
7681
|
+
throw new RuntimeError16("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
7661
7682
|
}
|
|
7662
7683
|
/**
|
|
7663
7684
|
* 根据应用实体代码名称查找应用视图
|
|
@@ -7688,7 +7709,7 @@ var AppHub = class {
|
|
|
7688
7709
|
this.registerAppDataEntity(entity, appId);
|
|
7689
7710
|
return entity;
|
|
7690
7711
|
}
|
|
7691
|
-
throw new
|
|
7712
|
+
throw new RuntimeError16("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
7692
7713
|
}
|
|
7693
7714
|
/**
|
|
7694
7715
|
* 新建 hub 应用
|
|
@@ -7709,7 +7730,7 @@ var AppHub = class {
|
|
|
7709
7730
|
appModel = await this.modelLoaderProvider.getApp(id);
|
|
7710
7731
|
this.registerApp(appModel);
|
|
7711
7732
|
} else {
|
|
7712
|
-
throw new
|
|
7733
|
+
throw new RuntimeError16("\u672A\u627E\u5230\u5E94\u7528[".concat(id, "]\u6A21\u578B"));
|
|
7713
7734
|
}
|
|
7714
7735
|
const app = new Application(appModel);
|
|
7715
7736
|
this.appMap.set(id, app);
|
|
@@ -7800,7 +7821,7 @@ var EngineFactory = class {
|
|
|
7800
7821
|
};
|
|
7801
7822
|
|
|
7802
7823
|
// src/engine/view-base.engine.ts
|
|
7803
|
-
import { RuntimeError as
|
|
7824
|
+
import { RuntimeError as RuntimeError17 } from "@ibiz-template/core";
|
|
7804
7825
|
var ViewEngineBase = class {
|
|
7805
7826
|
/**
|
|
7806
7827
|
* 构造函数在视图控制器的构造函数逻辑内部执行
|
|
@@ -7988,7 +8009,7 @@ var ViewEngineBase = class {
|
|
|
7988
8009
|
const { appDataEntityId } = this.view.model;
|
|
7989
8010
|
const { evt, context, params } = this.view;
|
|
7990
8011
|
if (!appDataEntityId) {
|
|
7991
|
-
throw new
|
|
8012
|
+
throw new RuntimeError17("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
|
|
7992
8013
|
}
|
|
7993
8014
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
7994
8015
|
const res = await app.deService.exec(
|
|
@@ -8135,6 +8156,10 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
8135
8156
|
this.copy(args);
|
|
8136
8157
|
return null;
|
|
8137
8158
|
}
|
|
8159
|
+
if (key === "load") {
|
|
8160
|
+
this.load(args);
|
|
8161
|
+
return null;
|
|
8162
|
+
}
|
|
8138
8163
|
return super.call(key, args);
|
|
8139
8164
|
}
|
|
8140
8165
|
getData() {
|
|
@@ -8163,7 +8188,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
8163
8188
|
view: this.view
|
|
8164
8189
|
}));
|
|
8165
8190
|
if (result === -1) {
|
|
8166
|
-
|
|
8191
|
+
ibiz.log.warn("\u89C6\u56FE[".concat(this.view.model.codeName, "]\uFF0C\u672A\u914D\u7F6E\u7F16\u8F91\u6253\u5F00\u89C6\u56FE"));
|
|
8167
8192
|
}
|
|
8168
8193
|
}
|
|
8169
8194
|
/**
|
|
@@ -8215,8 +8240,8 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
8215
8240
|
* @date 2023-05-22 03:17:33
|
|
8216
8241
|
* @return {*} {Promise<void>}
|
|
8217
8242
|
*/
|
|
8218
|
-
async load() {
|
|
8219
|
-
await this.xdataControl.load({ isInitialLoad: true });
|
|
8243
|
+
async load(args = {}) {
|
|
8244
|
+
await this.xdataControl.load({ isInitialLoad: true, ...args });
|
|
8220
8245
|
}
|
|
8221
8246
|
/**
|
|
8222
8247
|
* 视图刷新
|
|
@@ -8471,7 +8496,7 @@ async function getPanelItemProvider(model) {
|
|
|
8471
8496
|
}
|
|
8472
8497
|
|
|
8473
8498
|
// src/register/helper/ui-action-register.ts
|
|
8474
|
-
import { RuntimeError as
|
|
8499
|
+
import { RuntimeError as RuntimeError18 } from "@ibiz-template/core";
|
|
8475
8500
|
var UIACTION_PROVIDER_PREFIX = "UIACTION";
|
|
8476
8501
|
function registerUIActionProvider(key, callback) {
|
|
8477
8502
|
ibiz.register.register("".concat(UIACTION_PROVIDER_PREFIX, "_").concat(key), callback);
|
|
@@ -8488,7 +8513,7 @@ async function getUIActionProvider(model) {
|
|
|
8488
8513
|
provider = getProvider6(uiactionMode);
|
|
8489
8514
|
}
|
|
8490
8515
|
if (!provider) {
|
|
8491
|
-
throw new
|
|
8516
|
+
throw new RuntimeError18("\u627E\u4E0D\u754C\u9762\u884C\u4E3A\u6A21\u5F0F".concat(uiactionMode, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
8492
8517
|
}
|
|
8493
8518
|
return provider;
|
|
8494
8519
|
}
|
|
@@ -8553,7 +8578,7 @@ import { isArray as isArray2 } from "qx-util";
|
|
|
8553
8578
|
import { RuntimeModelError as RuntimeModelError27 } from "@ibiz-template/core";
|
|
8554
8579
|
|
|
8555
8580
|
// src/ui-logic/index.ts
|
|
8556
|
-
import { RuntimeError as
|
|
8581
|
+
import { RuntimeError as RuntimeError21 } from "@ibiz-template/core";
|
|
8557
8582
|
|
|
8558
8583
|
// src/ui-logic/ui-logic.ts
|
|
8559
8584
|
import { ModelError as ModelError22, RuntimeModelError as RuntimeModelError26 } from "@ibiz-template/core";
|
|
@@ -9067,7 +9092,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
9067
9092
|
};
|
|
9068
9093
|
|
|
9069
9094
|
// src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
|
|
9070
|
-
import { RuntimeError as
|
|
9095
|
+
import { RuntimeError as RuntimeError19, RuntimeModelError as RuntimeModelError25 } from "@ibiz-template/core";
|
|
9071
9096
|
import { isFunction } from "lodash-es";
|
|
9072
9097
|
var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
9073
9098
|
async exec(ctx) {
|
|
@@ -9084,21 +9109,21 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
|
9084
9109
|
}
|
|
9085
9110
|
const invokeParam = ctx.params[invokeParamId];
|
|
9086
9111
|
if (!invokeParam) {
|
|
9087
|
-
throw new
|
|
9112
|
+
throw new RuntimeError19("\u6CA1\u6709\u627E\u5230\u64CD\u4F5C\u53C2\u6570".concat(invokeParamId));
|
|
9088
9113
|
}
|
|
9089
9114
|
const invokeCtrl = ctx.params[invokeCtrlId];
|
|
9090
9115
|
if (!invokeCtrl) {
|
|
9091
|
-
throw new
|
|
9116
|
+
throw new RuntimeError19("\u6CA1\u6709\u627E\u5230\u754C\u9762\u5BF9\u8C61".concat(invokeCtrlId));
|
|
9092
9117
|
}
|
|
9093
9118
|
if (!invokeCtrl[invokeMethod] || !isFunction(invokeCtrl[invokeMethod])) {
|
|
9094
|
-
throw new
|
|
9119
|
+
throw new RuntimeError19("\u6CA1\u6709\u627E\u5230\u8C03\u7528\u65B9\u6CD5".concat(invokeMethod));
|
|
9095
9120
|
}
|
|
9096
9121
|
await invokeCtrl[invokeMethod](invokeParam);
|
|
9097
9122
|
}
|
|
9098
9123
|
};
|
|
9099
9124
|
|
|
9100
9125
|
// src/ui-logic/ui-logic-param/ui-logic-param.ts
|
|
9101
|
-
import { ModelError as ModelError21, RuntimeError as
|
|
9126
|
+
import { ModelError as ModelError21, RuntimeError as RuntimeError20 } from "@ibiz-template/core";
|
|
9102
9127
|
var UILogicParam = class {
|
|
9103
9128
|
/**
|
|
9104
9129
|
* Creates an instance of UILogicParam.
|
|
@@ -9133,7 +9158,7 @@ var UILogicParam = class {
|
|
|
9133
9158
|
if (control) {
|
|
9134
9159
|
ctx.params[tag] = control;
|
|
9135
9160
|
} else {
|
|
9136
|
-
throw new
|
|
9161
|
+
throw new RuntimeError20("\u6CA1\u627E\u5230".concat(m.codeName, "\u6307\u5B9A\u90E8\u4EF6\u5BF9\u8C61"));
|
|
9137
9162
|
}
|
|
9138
9163
|
} else if (m.activeViewParam) {
|
|
9139
9164
|
ctx.params[tag] = parameters.view;
|
|
@@ -9351,7 +9376,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
9351
9376
|
const app = ibiz.hub.getApp(parameters.context.srfappid);
|
|
9352
9377
|
const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
|
|
9353
9378
|
if (!deUILogic) {
|
|
9354
|
-
throw new
|
|
9379
|
+
throw new RuntimeError21(
|
|
9355
9380
|
"\u627E\u4E0D\u5230\u5B9E\u4F53".concat(appDataEntityId, "\u7684\u754C\u9762\u903B\u8F91").concat(deUILogicId)
|
|
9356
9381
|
);
|
|
9357
9382
|
}
|
|
@@ -9364,7 +9389,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
9364
9389
|
}
|
|
9365
9390
|
|
|
9366
9391
|
// src/ui-action/uiaction-util.ts
|
|
9367
|
-
import { RuntimeError as
|
|
9392
|
+
import { RuntimeError as RuntimeError22 } from "@ibiz-template/core";
|
|
9368
9393
|
var UIActionUtil = class {
|
|
9369
9394
|
/**
|
|
9370
9395
|
* 执行界面行为
|
|
@@ -9379,7 +9404,7 @@ var UIActionUtil = class {
|
|
|
9379
9404
|
static async exec(actionId, params) {
|
|
9380
9405
|
const action = await getUIActionById(actionId);
|
|
9381
9406
|
if (!action) {
|
|
9382
|
-
throw new
|
|
9407
|
+
throw new RuntimeError22("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
|
|
9383
9408
|
}
|
|
9384
9409
|
const provider = await getUIActionProvider(action);
|
|
9385
9410
|
return provider.exec(action, params);
|
|
@@ -9765,7 +9790,7 @@ function presetUIActionProvider() {
|
|
|
9765
9790
|
}
|
|
9766
9791
|
|
|
9767
9792
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
9768
|
-
import { RuntimeError as
|
|
9793
|
+
import { RuntimeError as RuntimeError23 } from "@ibiz-template/core";
|
|
9769
9794
|
var LogicExecutor = class {
|
|
9770
9795
|
/**
|
|
9771
9796
|
* @author lxm
|
|
@@ -9786,7 +9811,7 @@ var LogicExecutor = class {
|
|
|
9786
9811
|
*/
|
|
9787
9812
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9788
9813
|
execute(_executeParams) {
|
|
9789
|
-
throw new
|
|
9814
|
+
throw new RuntimeError23("Method not implemented.");
|
|
9790
9815
|
}
|
|
9791
9816
|
/**
|
|
9792
9817
|
* 销毁方法
|
|
@@ -9835,7 +9860,7 @@ var LogicExecutorFactory = class {
|
|
|
9835
9860
|
};
|
|
9836
9861
|
|
|
9837
9862
|
// src/logic-scheduler/executor/script-executor.ts
|
|
9838
|
-
import { RuntimeError as
|
|
9863
|
+
import { RuntimeError as RuntimeError24 } from "@ibiz-template/core";
|
|
9839
9864
|
var ScriptExecutor = class extends LogicExecutor {
|
|
9840
9865
|
constructor() {
|
|
9841
9866
|
super(...arguments);
|
|
@@ -9855,7 +9880,7 @@ var ScriptExecutor = class extends LogicExecutor {
|
|
|
9855
9880
|
* @return {*} {IData[]}
|
|
9856
9881
|
*/
|
|
9857
9882
|
convertScriptArgs(_executeParams) {
|
|
9858
|
-
throw new
|
|
9883
|
+
throw new RuntimeError24("\u672A\u8BBE\u7F6E\u811A\u672C\u6267\u884C\u53C2\u6570\u8F6C\u6362\u65B9\u6CD5");
|
|
9859
9884
|
}
|
|
9860
9885
|
/**
|
|
9861
9886
|
* 初始化脚本执行器
|
|
@@ -10184,7 +10209,7 @@ var LogicSchedulerCenter = class {
|
|
|
10184
10209
|
};
|
|
10185
10210
|
|
|
10186
10211
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
10187
|
-
import { RuntimeError as
|
|
10212
|
+
import { RuntimeError as RuntimeError25 } from "@ibiz-template/core";
|
|
10188
10213
|
var LogicTrigger = class {
|
|
10189
10214
|
/**
|
|
10190
10215
|
* @author lxm
|
|
@@ -10227,7 +10252,7 @@ var LogicTrigger = class {
|
|
|
10227
10252
|
if (this.executor) {
|
|
10228
10253
|
return this.executor.execute(executeParams);
|
|
10229
10254
|
}
|
|
10230
|
-
throw new
|
|
10255
|
+
throw new RuntimeError25("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
|
|
10231
10256
|
}
|
|
10232
10257
|
/**
|
|
10233
10258
|
* 销毁方法
|
|
@@ -10244,12 +10269,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
10244
10269
|
};
|
|
10245
10270
|
|
|
10246
10271
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
10247
|
-
import { RuntimeError as
|
|
10272
|
+
import { RuntimeError as RuntimeError26 } from "@ibiz-template/core";
|
|
10248
10273
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
10249
10274
|
bindExecutor(executor) {
|
|
10250
10275
|
super.bindExecutor(executor);
|
|
10251
10276
|
if (this.executor.type !== "SCRIPT") {
|
|
10252
|
-
throw new
|
|
10277
|
+
throw new RuntimeError26(
|
|
10253
10278
|
"\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
|
|
10254
10279
|
);
|
|
10255
10280
|
}
|
|
@@ -10276,12 +10301,12 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
10276
10301
|
if (typeof result === "boolean") {
|
|
10277
10302
|
return result;
|
|
10278
10303
|
}
|
|
10279
|
-
throw new
|
|
10304
|
+
throw new RuntimeError26("".concat(this.logic.id, "\u903B\u8F91\u8FD4\u56DE\u503C\u4E0D\u662F\u5E03\u5C14\u503C"));
|
|
10280
10305
|
}
|
|
10281
10306
|
};
|
|
10282
10307
|
|
|
10283
10308
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
10284
|
-
import { RuntimeError as
|
|
10309
|
+
import { RuntimeError as RuntimeError27 } from "@ibiz-template/core";
|
|
10285
10310
|
var TimerTrigger = class extends LogicTrigger {
|
|
10286
10311
|
constructor() {
|
|
10287
10312
|
super(...arguments);
|
|
@@ -10290,7 +10315,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
10290
10315
|
start() {
|
|
10291
10316
|
this.timer = setInterval(() => {
|
|
10292
10317
|
if (!this.scheduler.defaultParamsCb) {
|
|
10293
|
-
throw new
|
|
10318
|
+
throw new RuntimeError27("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
|
|
10294
10319
|
}
|
|
10295
10320
|
const params = this.scheduler.defaultParamsCb();
|
|
10296
10321
|
this.executor.execute(params);
|
|
@@ -10307,7 +10332,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
10307
10332
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
10308
10333
|
import {
|
|
10309
10334
|
ModelError as ModelError26,
|
|
10310
|
-
RuntimeError as
|
|
10335
|
+
RuntimeError as RuntimeError28,
|
|
10311
10336
|
RuntimeModelError as RuntimeModelError31
|
|
10312
10337
|
} from "@ibiz-template/core";
|
|
10313
10338
|
import { notNilEmpty as notNilEmpty5 } from "qx-util";
|
|
@@ -10343,7 +10368,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
10343
10368
|
const { context, params, ...rest } = parameters;
|
|
10344
10369
|
const { data } = parameters;
|
|
10345
10370
|
if (!(data == null ? void 0 : data[0])) {
|
|
10346
|
-
throw new
|
|
10371
|
+
throw new RuntimeError28("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
|
|
10347
10372
|
}
|
|
10348
10373
|
const openViewRef = appUILogic.openDataAppView;
|
|
10349
10374
|
if (!openViewRef) {
|
|
@@ -10466,12 +10491,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
10466
10491
|
}
|
|
10467
10492
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
10468
10493
|
if (!selectData) {
|
|
10469
|
-
throw new
|
|
10494
|
+
throw new RuntimeError28("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
|
|
10470
10495
|
}
|
|
10471
10496
|
const indexType = selectData.srfkey;
|
|
10472
10497
|
const findView = newDataAppViews == null ? void 0 : newDataAppViews.find((item) => item.refMode === indexType);
|
|
10473
10498
|
if (!findView) {
|
|
10474
|
-
throw new
|
|
10499
|
+
throw new RuntimeError28(
|
|
10475
10500
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
10476
10501
|
);
|
|
10477
10502
|
}
|
|
@@ -10675,13 +10700,13 @@ var PanelNotifyState = /* @__PURE__ */ ((PanelNotifyState2) => {
|
|
|
10675
10700
|
|
|
10676
10701
|
// src/controller/common/view/view.controller.ts
|
|
10677
10702
|
import { createUUID as createUUID2, notNilEmpty as notNilEmpty6 } from "qx-util";
|
|
10678
|
-
import { IBizContext as IBizContext2, RuntimeError as
|
|
10703
|
+
import { IBizContext as IBizContext2, RuntimeError as RuntimeError31 } from "@ibiz-template/core";
|
|
10679
10704
|
|
|
10680
10705
|
// src/controller/utils/loading/loading.state.ts
|
|
10681
10706
|
import { NOOP } from "@ibiz-template/core";
|
|
10682
10707
|
|
|
10683
10708
|
// src/controller/utils/counter/counter.ts
|
|
10684
|
-
import { RuntimeError as
|
|
10709
|
+
import { RuntimeError as RuntimeError29 } from "@ibiz-template/core";
|
|
10685
10710
|
var Counter = class {
|
|
10686
10711
|
/**
|
|
10687
10712
|
* Creates an instance of Counter.
|
|
@@ -10743,7 +10768,7 @@ var Counter = class {
|
|
|
10743
10768
|
return;
|
|
10744
10769
|
}
|
|
10745
10770
|
if (this.count === 0) {
|
|
10746
|
-
throw new
|
|
10771
|
+
throw new RuntimeError29("\u9519\u8BEF\u7684\u8C03\u7528\uFF01decrement\u4E0D\u80FD\u5BF9count\u4E3A0\u8C03\u7528");
|
|
10747
10772
|
}
|
|
10748
10773
|
this.count -= 1;
|
|
10749
10774
|
if (this.count === 0) {
|
|
@@ -11257,7 +11282,7 @@ function getOriginData(data) {
|
|
|
11257
11282
|
}
|
|
11258
11283
|
|
|
11259
11284
|
// src/controller/utils/value-rule/value-rule.ts
|
|
11260
|
-
import { RuntimeError as
|
|
11285
|
+
import { RuntimeError as RuntimeError30 } from "@ibiz-template/core";
|
|
11261
11286
|
import { isNilOrEmpty as isNilOrEmpty6 } from "qx-util";
|
|
11262
11287
|
function generateRules(itemVRs, name, valueItemName) {
|
|
11263
11288
|
const rules = [];
|
|
@@ -11305,7 +11330,7 @@ function generateRules(itemVRs, name, valueItemName) {
|
|
|
11305
11330
|
deRule.groupCond
|
|
11306
11331
|
);
|
|
11307
11332
|
if (!isPast) {
|
|
11308
|
-
callback(new
|
|
11333
|
+
callback(new RuntimeError30(infoMessage || deRule.ruleInfo));
|
|
11309
11334
|
}
|
|
11310
11335
|
return true;
|
|
11311
11336
|
},
|
|
@@ -11755,7 +11780,7 @@ var ViewController = class extends BaseController {
|
|
|
11755
11780
|
async callUIAction(key, args) {
|
|
11756
11781
|
const result = this.call(key, args);
|
|
11757
11782
|
if (result === void 0) {
|
|
11758
|
-
throw new
|
|
11783
|
+
throw new RuntimeError31("\u6CA1\u6709\u5F15\u64CE\u652F\u6301\u9884\u7F6E\u754C\u9762\u884C\u4E3A".concat(key));
|
|
11759
11784
|
}
|
|
11760
11785
|
return result;
|
|
11761
11786
|
}
|
|
@@ -12085,7 +12110,7 @@ var ControlController = class extends BaseController {
|
|
|
12085
12110
|
};
|
|
12086
12111
|
|
|
12087
12112
|
// src/controller/common/control/md-control.controller.ts
|
|
12088
|
-
import { isElementSame, RuntimeError as
|
|
12113
|
+
import { isElementSame, RuntimeError as RuntimeError32 } from "@ibiz-template/core";
|
|
12089
12114
|
var MDControlController = class extends ControlController {
|
|
12090
12115
|
get _evt() {
|
|
12091
12116
|
return this.evt;
|
|
@@ -12103,6 +12128,7 @@ var MDControlController = class extends ControlController {
|
|
|
12103
12128
|
this.state.isLoaded = false;
|
|
12104
12129
|
this.state.singleSelect = true;
|
|
12105
12130
|
this.state.mdctrlActiveMode = 0;
|
|
12131
|
+
this.state.groups = [];
|
|
12106
12132
|
}
|
|
12107
12133
|
/**
|
|
12108
12134
|
* 设置排序
|
|
@@ -12150,35 +12176,34 @@ var MDControlController = class extends ControlController {
|
|
|
12150
12176
|
* @date 2022-08-19 14:08:50
|
|
12151
12177
|
*/
|
|
12152
12178
|
async load(args = {}) {
|
|
12153
|
-
const isInitialLoad = args.isInitialLoad === true;
|
|
12154
|
-
const isLoadMore = args.isLoadMore === true;
|
|
12155
|
-
if (isInitialLoad) {
|
|
12156
|
-
this.state.curPage = 1;
|
|
12157
|
-
} else if (isLoadMore) {
|
|
12158
|
-
this.state.curPage += 1;
|
|
12159
|
-
}
|
|
12160
|
-
const { context } = this.handlerAbilityParams(args);
|
|
12161
|
-
const params = await this.getFetchParams(args == null ? void 0 : args.params);
|
|
12162
12179
|
await this.startLoading();
|
|
12163
|
-
let res;
|
|
12164
12180
|
try {
|
|
12165
|
-
|
|
12181
|
+
const isInitialLoad = args.isInitialLoad === true;
|
|
12182
|
+
const isLoadMore = args.isLoadMore === true;
|
|
12183
|
+
if (isInitialLoad) {
|
|
12184
|
+
this.state.curPage = 1;
|
|
12185
|
+
} else if (isLoadMore) {
|
|
12186
|
+
this.state.curPage += 1;
|
|
12187
|
+
}
|
|
12188
|
+
const { context } = this.handlerAbilityParams(args);
|
|
12189
|
+
const params = await this.getFetchParams(args == null ? void 0 : args.params);
|
|
12190
|
+
const res = await this.service.fetch(context, params);
|
|
12166
12191
|
if (typeof res.total === "number") {
|
|
12167
12192
|
this.state.total = res.total;
|
|
12168
12193
|
}
|
|
12194
|
+
if (isLoadMore) {
|
|
12195
|
+
this.state.items.push(...res.data);
|
|
12196
|
+
} else {
|
|
12197
|
+
this.state.items = res.data;
|
|
12198
|
+
}
|
|
12199
|
+
await this.afterLoad(args, res.data);
|
|
12200
|
+
this.state.isLoaded = true;
|
|
12201
|
+
await this._evt.emit("onLoadSuccess", {
|
|
12202
|
+
isInitialLoad
|
|
12203
|
+
});
|
|
12169
12204
|
} finally {
|
|
12170
12205
|
await this.endLoading();
|
|
12171
12206
|
}
|
|
12172
|
-
if (isLoadMore) {
|
|
12173
|
-
this.state.items.push(...res.data);
|
|
12174
|
-
} else {
|
|
12175
|
-
this.state.items = res.data;
|
|
12176
|
-
}
|
|
12177
|
-
await this.afterLoad(args, res.data);
|
|
12178
|
-
this.state.isLoaded = true;
|
|
12179
|
-
await this._evt.emit("onLoadSuccess", {
|
|
12180
|
-
isInitialLoad
|
|
12181
|
-
});
|
|
12182
12207
|
return this.state.items;
|
|
12183
12208
|
}
|
|
12184
12209
|
/**
|
|
@@ -12211,7 +12236,7 @@ var MDControlController = class extends ControlController {
|
|
|
12211
12236
|
async remove(args) {
|
|
12212
12237
|
const { context, params, data } = this.handlerAbilityParams(args);
|
|
12213
12238
|
if (!(data == null ? void 0 : data.length)) {
|
|
12214
|
-
throw new
|
|
12239
|
+
throw new RuntimeError32("\u672A\u9009\u4E2D\u6570\u636E");
|
|
12215
12240
|
}
|
|
12216
12241
|
const del = await ibiz.modal.confirm({
|
|
12217
12242
|
title: "\u6570\u636E\u5220\u9664",
|
|
@@ -12426,6 +12451,11 @@ export {
|
|
|
12426
12451
|
convertNavDataByArray,
|
|
12427
12452
|
convertNavDataByObject,
|
|
12428
12453
|
convertObjectToNavParams,
|
|
12454
|
+
execDELogic,
|
|
12455
|
+
execDELogicAction,
|
|
12456
|
+
execDELogicById,
|
|
12457
|
+
execFieldLogics,
|
|
12458
|
+
execUILogic,
|
|
12429
12459
|
filterFieldLogics,
|
|
12430
12460
|
filterValueRules,
|
|
12431
12461
|
findChildFormDetails,
|