@ibiz-template/runtime 0.5.3-beta.6 → 0.5.3-beta.8
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 +25 -24
- package/dist/index.system.min.js +1 -1
- package/out/application.js +1 -1
- package/out/de-logic/utils/handle-src-val.d.ts +15 -0
- package/out/de-logic/utils/handle-src-val.d.ts.map +1 -1
- package/out/de-logic/utils/handle-src-val.js +10 -1
- package/out/interface/service/service/i-app-de.service.d.ts +0 -2
- package/out/interface/service/service/i-app-de.service.d.ts.map +1 -1
- package/out/service/dto/method.dto.d.ts +1 -3
- package/out/service/dto/method.dto.d.ts.map +1 -1
- package/out/service/dto/method.dto.js +1 -8
- package/out/service/mqtt/mqtt.service.js +2 -2
- package/out/service/service/auth/v7-auth.service.d.ts.map +1 -1
- package/out/service/service/auth/v7-auth.service.js +2 -0
- package/out/service/service/entity/de.service.d.ts +0 -1
- package/out/service/service/entity/de.service.d.ts.map +1 -1
- package/out/service/service/entity/de.service.js +1 -1
- package/out/service/service/entity/method/method-renturn.d.ts.map +1 -1
- package/out/service/service/entity/method/method-renturn.js +6 -0
- package/out/service/utils/res-path/res-path.d.ts +2 -2
- package/out/service/utils/res-path/res-path.d.ts.map +1 -1
- package/out/service/utils/res-path/res-path.js +1 -1
- package/out/ui-logic/ui-logic-node/debug-param-node/debug-param-node.js +1 -1
- package/out/ui-logic/ui-logic-node/raw-js-code-node/raw-js-code-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/raw-js-code-node/raw-js-code-node.js +0 -1
- package/out/utils/script/script-function.js +1 -1
- package/out/utils/ui-domain/ui-domain.d.ts.map +1 -1
- package/out/utils/ui-domain/ui-domain.js +0 -1
- package/package.json +3 -3
- package/src/application.ts +1 -1
- package/src/de-logic/utils/handle-src-val.ts +29 -1
- package/src/interface/service/service/i-app-de.service.ts +0 -2
- package/src/service/dto/method.dto.ts +0 -7
- package/src/service/mqtt/mqtt.service.ts +2 -2
- package/src/service/service/auth/v7-auth.service.ts +2 -0
- package/src/service/service/entity/de.service.ts +1 -8
- package/src/service/service/entity/method/method-renturn.ts +6 -0
- package/src/service/utils/res-path/res-path.ts +2 -2
- package/src/ui-logic/ui-logic-node/debug-param-node/debug-param-node.ts +1 -1
- package/src/ui-logic/ui-logic-node/raw-js-code-node/raw-js-code-node.ts +0 -1
- package/src/utils/script/script-function.ts +1 -1
- package/src/utils/ui-domain/ui-domain.ts +0 -1
package/dist/index.esm.js
CHANGED
|
@@ -1501,7 +1501,7 @@ var ScriptFunction = class {
|
|
|
1501
1501
|
try {
|
|
1502
1502
|
return fn.apply({}, args);
|
|
1503
1503
|
} catch (error) {
|
|
1504
|
-
|
|
1504
|
+
ibiz.log.error("\u62A5\u9519\u811A\u672C", code);
|
|
1505
1505
|
throw error;
|
|
1506
1506
|
}
|
|
1507
1507
|
};
|
|
@@ -2935,7 +2935,6 @@ var UIDomain = class {
|
|
|
2935
2935
|
this.rs2Map.get(major).push(config);
|
|
2936
2936
|
});
|
|
2937
2937
|
});
|
|
2938
|
-
console.log(Array.from(this.rs2Map.values()));
|
|
2939
2938
|
}
|
|
2940
2939
|
/**
|
|
2941
2940
|
* 界面域销毁
|
|
@@ -6014,14 +6013,12 @@ var MethodDto = class {
|
|
|
6014
6013
|
* @param {IAppDataEntity} entity
|
|
6015
6014
|
* @param {boolean} [isLocalMode]
|
|
6016
6015
|
* @param {IAppDEMethodDTO} [dto]
|
|
6017
|
-
* @param {boolean} [inSelfLoop] 是否在自关系循环中
|
|
6018
6016
|
*/
|
|
6019
|
-
constructor(service, entity, isLocalMode, dto
|
|
6017
|
+
constructor(service, entity, isLocalMode, dto) {
|
|
6020
6018
|
this.service = service;
|
|
6021
6019
|
this.entity = entity;
|
|
6022
6020
|
this.isLocalMode = isLocalMode;
|
|
6023
6021
|
this.dto = dto;
|
|
6024
|
-
this.inSelfLoop = inSelfLoop;
|
|
6025
6022
|
this.dtoMap = /* @__PURE__ */ new Map();
|
|
6026
6023
|
if (dto) {
|
|
6027
6024
|
this.app = ibiz.hub.getApp(entity.appId);
|
|
@@ -6151,9 +6148,6 @@ var MethodDto = class {
|
|
|
6151
6148
|
* @return {*} {Promise<IDataEntity[]>}
|
|
6152
6149
|
*/
|
|
6153
6150
|
async sets(context, data) {
|
|
6154
|
-
if (this.isLocalMode && !this.inSelfLoop) {
|
|
6155
|
-
this.service.local.clear();
|
|
6156
|
-
}
|
|
6157
6151
|
const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
|
|
6158
6152
|
if (uiDomain && uiDomain.state.rsInit !== true) {
|
|
6159
6153
|
await this.calcRs(context);
|
|
@@ -6253,12 +6247,10 @@ var MethodDto = class {
|
|
|
6253
6247
|
entity.appDEMethodDTOs || [],
|
|
6254
6248
|
field.refAppDEMethodDTOId
|
|
6255
6249
|
);
|
|
6256
|
-
const inSelfLoop = this.entity.codeName === entity.codeName;
|
|
6257
6250
|
const service = await this.app.deService.getService(context, entity.id);
|
|
6258
6251
|
service.isLocalMode = true;
|
|
6259
6252
|
const dto = service.createMethodDto(methodDto, {
|
|
6260
|
-
isLocalMode: true
|
|
6261
|
-
inSelfLoop
|
|
6253
|
+
isLocalMode: true
|
|
6262
6254
|
});
|
|
6263
6255
|
this.dtoMap.set(field.codeName, dto);
|
|
6264
6256
|
return dto;
|
|
@@ -6504,13 +6496,7 @@ var DEService = class {
|
|
|
6504
6496
|
this.local.clear();
|
|
6505
6497
|
}
|
|
6506
6498
|
createMethodDto(dto, opts) {
|
|
6507
|
-
return new MethodDto(
|
|
6508
|
-
this,
|
|
6509
|
-
this.model,
|
|
6510
|
-
opts == null ? void 0 : opts.isLocalMode,
|
|
6511
|
-
dto,
|
|
6512
|
-
opts == null ? void 0 : opts.inSelfLoop
|
|
6513
|
-
);
|
|
6499
|
+
return new MethodDto(this, this.model, opts == null ? void 0 : opts.isLocalMode, dto);
|
|
6514
6500
|
}
|
|
6515
6501
|
};
|
|
6516
6502
|
|
|
@@ -7230,6 +7216,8 @@ var V7AuthService = class {
|
|
|
7230
7216
|
clearCookie(CoreConst.TOKEN_EXPIRES);
|
|
7231
7217
|
clearCookie(CoreConst.TOKEN_REMEMBER);
|
|
7232
7218
|
clearCookie(CoreConst.IS_ANONYMOUS);
|
|
7219
|
+
ibiz.appData = void 0;
|
|
7220
|
+
ibiz.orgData = void 0;
|
|
7233
7221
|
return true;
|
|
7234
7222
|
} catch (err) {
|
|
7235
7223
|
ibiz.notification.error({
|
|
@@ -7407,6 +7395,11 @@ var MethodReturn = class {
|
|
|
7407
7395
|
*/
|
|
7408
7396
|
async handle(context, data) {
|
|
7409
7397
|
if (this.dto) {
|
|
7398
|
+
const app = ibiz.hub.getApp(this.entity.appId);
|
|
7399
|
+
app.deService.clearTempCache({
|
|
7400
|
+
srfappid: app.appId,
|
|
7401
|
+
srfsessionid: context.srfsessionid
|
|
7402
|
+
});
|
|
7410
7403
|
const items = await this.dto.sets(context, [data]);
|
|
7411
7404
|
return items[0];
|
|
7412
7405
|
}
|
|
@@ -7962,7 +7955,7 @@ import { clone as clone10 } from "ramda";
|
|
|
7962
7955
|
import { ModelError as ModelError10 } from "@ibiz-template/core";
|
|
7963
7956
|
import { clone as clone9 } from "ramda";
|
|
7964
7957
|
function handleSrcVal(ctx, srcValParams) {
|
|
7965
|
-
const { srcDELogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
7958
|
+
const { srcDELogicParamId, srcFieldName, srcValue, expression } = srcValParams;
|
|
7966
7959
|
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
7967
7960
|
let srcField = srcFieldName;
|
|
7968
7961
|
let value;
|
|
@@ -7992,6 +7985,15 @@ function handleSrcVal(ctx, srcValParams) {
|
|
|
7992
7985
|
case "ENVPARAM":
|
|
7993
7986
|
value = clone9(ibiz.env);
|
|
7994
7987
|
break;
|
|
7988
|
+
case "EXPRESSION":
|
|
7989
|
+
if (!expression) {
|
|
7990
|
+
throw new ModelError10(srcValParams, "\u8868\u8FBE\u5F0F\u4E3A\u7A7A");
|
|
7991
|
+
}
|
|
7992
|
+
value = ScriptFactory.execScriptFn(ctx, expression, {
|
|
7993
|
+
singleRowReturn: true,
|
|
7994
|
+
isAsync: false
|
|
7995
|
+
});
|
|
7996
|
+
break;
|
|
7995
7997
|
default:
|
|
7996
7998
|
throw new ModelError10(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
7997
7999
|
}
|
|
@@ -9964,10 +9966,10 @@ var MqttService = class {
|
|
|
9964
9966
|
ibiz.log.debug("mqtt message", topic, payload.toString());
|
|
9965
9967
|
});
|
|
9966
9968
|
this.client.on("reconnect", () => {
|
|
9967
|
-
ibiz.log.
|
|
9969
|
+
ibiz.log.warn("mqtt reconnect");
|
|
9968
9970
|
});
|
|
9969
9971
|
this.client.on("close", () => {
|
|
9970
|
-
|
|
9972
|
+
ibiz.log.warn("mqtt close");
|
|
9971
9973
|
});
|
|
9972
9974
|
}
|
|
9973
9975
|
/**
|
|
@@ -10455,7 +10457,7 @@ var Application = class {
|
|
|
10455
10457
|
async init() {
|
|
10456
10458
|
await this.authority.init();
|
|
10457
10459
|
await this.loadAppModelStyle();
|
|
10458
|
-
if (ibiz.env.enableMqtt && ibiz.appData) {
|
|
10460
|
+
if (ibiz.env.enableMqtt && ibiz.appData && ibiz.auth.isAnonymous !== true) {
|
|
10459
10461
|
this.mqtt = new MqttService(
|
|
10460
10462
|
ibiz.appData.mqtttopic,
|
|
10461
10463
|
getToken(),
|
|
@@ -16017,7 +16019,7 @@ var DebugParamNode = class extends UILogicNode {
|
|
|
16017
16019
|
throw new RuntimeModelError38(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
16018
16020
|
}
|
|
16019
16021
|
const param = ctx.params[dstDEUILogicParamId];
|
|
16020
|
-
|
|
16022
|
+
ibiz.log.debug("\u903B\u8F91\u8282\u70B9".concat(name, "\u64CD\u4F5C\u53C2\u6570\u503C:"), param);
|
|
16021
16023
|
}
|
|
16022
16024
|
};
|
|
16023
16025
|
|
|
@@ -16209,7 +16211,6 @@ var ExecuteDELogicNode = class extends UILogicNode {
|
|
|
16209
16211
|
// src/ui-logic/ui-logic-node/raw-js-code-node/raw-js-code-node.ts
|
|
16210
16212
|
var RawJSCodeNode = class extends UILogicNode {
|
|
16211
16213
|
async exec(ctx) {
|
|
16212
|
-
console.log(ctx);
|
|
16213
16214
|
ScriptFactory.execScriptFn(
|
|
16214
16215
|
{
|
|
16215
16216
|
view: ctx.view,
|