@ibiz-template/runtime 0.6.3 → 0.6.4
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 +69 -21
- package/dist/index.system.min.js +1 -1
- package/out/controller/control/toolbar/toolbar.controllerr.d.ts.map +1 -1
- package/out/controller/control/toolbar/toolbar.controllerr.js +12 -0
- package/out/controller/notification/internal-message.controller.d.ts +4 -2
- package/out/controller/notification/internal-message.controller.d.ts.map +1 -1
- package/out/controller/notification/internal-message.controller.js +6 -6
- package/out/engine/view-base.engine.d.ts.map +1 -1
- package/out/engine/view-base.engine.js +6 -1
- package/out/interface/common/i-modal/i-modal.d.ts +1 -1
- package/out/interface/common/i-modal/i-modal.d.ts.map +1 -1
- package/out/interface/controller/controller/notice/i-internal-message.controller.d.ts +16 -1
- package/out/interface/controller/controller/notice/i-internal-message.controller.d.ts.map +1 -1
- package/out/interface/provider/i-internal-message.provider.d.ts +8 -0
- package/out/interface/provider/i-internal-message.provider.d.ts.map +1 -1
- package/out/interface/util/i-notification-util/i-notification-util.d.ts +7 -0
- package/out/interface/util/i-notification-util/i-notification-util.d.ts.map +1 -1
- package/out/logic-scheduler/trigger/item-dyna-logic-trigger.d.ts.map +1 -1
- package/out/logic-scheduler/trigger/item-dyna-logic-trigger.js +3 -2
- package/out/service/dto/method.dto.js +2 -2
- package/out/service/service/entity/method/de-action.d.ts.map +1 -1
- package/out/service/service/entity/method/de-action.js +15 -0
- package/out/service/service/entity/method/method-renturn.d.ts.map +1 -1
- package/out/service/service/entity/method/method-renturn.js +1 -0
- package/out/utils/modal/modal.d.ts +1 -1
- package/out/utils/modal/modal.d.ts.map +1 -1
- package/out/utils/modal/modal.js +2 -2
- package/out/utils/ui-domain/ui-domain.d.ts +22 -2
- package/out/utils/ui-domain/ui-domain.d.ts.map +1 -1
- package/out/utils/ui-domain/ui-domain.js +26 -2
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -2720,11 +2720,11 @@ var Modal = class {
|
|
|
2720
2720
|
this._dismiss = dismiss;
|
|
2721
2721
|
}
|
|
2722
2722
|
async dismiss(data = { ok: false, data: [] }) {
|
|
2723
|
-
const context = {
|
|
2723
|
+
const context = {};
|
|
2724
2724
|
if (this.ignoreDismissCheck !== true) {
|
|
2725
2725
|
await this.hooks.shouldDismiss.call(context);
|
|
2726
2726
|
}
|
|
2727
|
-
if (
|
|
2727
|
+
if (context.allowClose === false) {
|
|
2728
2728
|
ibiz.log.debug("shouldDismiss\u7ED3\u679C\u4E3Afalse,\u5173\u95ED\u4E2D\u65AD\u3002");
|
|
2729
2729
|
return false;
|
|
2730
2730
|
}
|
|
@@ -2985,8 +2985,7 @@ var UIDomain = class {
|
|
|
2985
2985
|
* Creates an instance of UIDomain.
|
|
2986
2986
|
*
|
|
2987
2987
|
* @author chitanda
|
|
2988
|
-
* @date
|
|
2989
|
-
* @param {string} appId
|
|
2988
|
+
* @date 2024-03-04 13:03:29
|
|
2990
2989
|
* @param {string} [id]
|
|
2991
2990
|
*/
|
|
2992
2991
|
constructor(id) {
|
|
@@ -3024,12 +3023,37 @@ var UIDomain = class {
|
|
|
3024
3023
|
* @type {Transaction}
|
|
3025
3024
|
*/
|
|
3026
3025
|
this.transaction = new Transaction();
|
|
3026
|
+
/**
|
|
3027
|
+
* 界面域是否发生数据变更,在域下数据修改后改为 true ,在数据提交后改为 false
|
|
3028
|
+
*
|
|
3029
|
+
* @author chitanda
|
|
3030
|
+
* @date 2024-03-04 13:03:08
|
|
3031
|
+
*/
|
|
3032
|
+
this.dataModification = false;
|
|
3027
3033
|
if (id) {
|
|
3028
3034
|
this.id = id;
|
|
3029
3035
|
} else {
|
|
3030
3036
|
this.id = createUUID();
|
|
3031
3037
|
}
|
|
3032
3038
|
}
|
|
3039
|
+
/**
|
|
3040
|
+
* 界面域数据发生变更
|
|
3041
|
+
*
|
|
3042
|
+
* @author chitanda
|
|
3043
|
+
* @date 2024-03-04 14:03:06
|
|
3044
|
+
*/
|
|
3045
|
+
dataChange() {
|
|
3046
|
+
this.dataModification = true;
|
|
3047
|
+
}
|
|
3048
|
+
/**
|
|
3049
|
+
* 界面域数据变更已提交
|
|
3050
|
+
*
|
|
3051
|
+
* @author chitanda
|
|
3052
|
+
* @date 2024-03-04 14:03:15
|
|
3053
|
+
*/
|
|
3054
|
+
dataChangeCompleted() {
|
|
3055
|
+
this.dataModification = false;
|
|
3056
|
+
}
|
|
3033
3057
|
/**
|
|
3034
3058
|
* 设置当前界面域下,指定实体的相关父关系以及属性。在 DTO 包解析时设置此参数,销毁时清空
|
|
3035
3059
|
*
|
|
@@ -8177,7 +8201,7 @@ var MethodDto = class {
|
|
|
8177
8201
|
* @return {*} {Promise<IData>}
|
|
8178
8202
|
*/
|
|
8179
8203
|
async get(context, data, ignore = false) {
|
|
8180
|
-
if (context.srfsimple === true) {
|
|
8204
|
+
if (context.srfsimple === true && this.isLocalMode === false) {
|
|
8181
8205
|
return data;
|
|
8182
8206
|
}
|
|
8183
8207
|
const params = {};
|
|
@@ -8264,7 +8288,7 @@ var MethodDto = class {
|
|
|
8264
8288
|
* @return {*} {Promise<IDataEntity[]>}
|
|
8265
8289
|
*/
|
|
8266
8290
|
async sets(context, data) {
|
|
8267
|
-
if (context.srfsimple === true) {
|
|
8291
|
+
if (context.srfsimple === true && this.isLocalMode === false) {
|
|
8268
8292
|
if (data && data.length > 0) {
|
|
8269
8293
|
return data.map((item) => {
|
|
8270
8294
|
return this.service.createEntity(item);
|
|
@@ -9585,6 +9609,7 @@ var MethodReturn = class {
|
|
|
9585
9609
|
uiDomain.calcParentRs();
|
|
9586
9610
|
uiDomain.state.rsInit = true;
|
|
9587
9611
|
}
|
|
9612
|
+
uiDomain.dataChangeCompleted();
|
|
9588
9613
|
app.deService.clearTempCacheByRs(
|
|
9589
9614
|
{
|
|
9590
9615
|
srfappid: app.appId,
|
|
@@ -11137,6 +11162,10 @@ var DEActionMethod = class extends Method {
|
|
|
11137
11162
|
this.attach(context, addData)
|
|
11138
11163
|
);
|
|
11139
11164
|
}
|
|
11165
|
+
const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
|
|
11166
|
+
if (uiDomain) {
|
|
11167
|
+
uiDomain.dataChange();
|
|
11168
|
+
}
|
|
11140
11169
|
return new HttpResponse3(resultData);
|
|
11141
11170
|
} catch (err) {
|
|
11142
11171
|
throw new HttpError5(err);
|
|
@@ -11189,6 +11218,10 @@ var DEActionMethod = class extends Method {
|
|
|
11189
11218
|
}
|
|
11190
11219
|
const data = this.service.local.delete(context, key);
|
|
11191
11220
|
if (data) {
|
|
11221
|
+
const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
|
|
11222
|
+
if (uiDomain) {
|
|
11223
|
+
uiDomain.dataChange();
|
|
11224
|
+
}
|
|
11192
11225
|
return new HttpResponse3(data);
|
|
11193
11226
|
}
|
|
11194
11227
|
return new HttpResponse3(data, 500);
|
|
@@ -11316,6 +11349,10 @@ var DEActionMethod = class extends Method {
|
|
|
11316
11349
|
);
|
|
11317
11350
|
}
|
|
11318
11351
|
if (resultData) {
|
|
11352
|
+
const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
|
|
11353
|
+
if (uiDomain) {
|
|
11354
|
+
uiDomain.dataChange();
|
|
11355
|
+
}
|
|
11319
11356
|
return new HttpResponse3(resultData);
|
|
11320
11357
|
}
|
|
11321
11358
|
return new HttpResponse3(resultData, 500);
|
|
@@ -20387,6 +20424,16 @@ var ToolbarController = class extends ControlController {
|
|
|
20387
20424
|
);
|
|
20388
20425
|
this.state.buttonsState.addState(uiItem.id, buttonState);
|
|
20389
20426
|
}
|
|
20427
|
+
if (item.controlLogics) {
|
|
20428
|
+
for (let i = 0; i < item.controlLogics.length; i++) {
|
|
20429
|
+
const controlLogic = item.controlLogics[i];
|
|
20430
|
+
const itemState = this.state.buttonsState[item.id];
|
|
20431
|
+
if (controlLogic.itemName === item.id && controlLogic.triggerType === "ITEMVISIBLE") {
|
|
20432
|
+
itemState.visible = false;
|
|
20433
|
+
break;
|
|
20434
|
+
}
|
|
20435
|
+
}
|
|
20436
|
+
}
|
|
20390
20437
|
},
|
|
20391
20438
|
{ childrenFields: ["detoolbarItems"] }
|
|
20392
20439
|
);
|
|
@@ -34590,9 +34637,6 @@ var AsyncActionController = class {
|
|
|
34590
34637
|
};
|
|
34591
34638
|
|
|
34592
34639
|
// src/controller/notification/internal-message.controller.ts
|
|
34593
|
-
import {
|
|
34594
|
-
IBizContext as IBizContext4
|
|
34595
|
-
} from "@ibiz-template/core";
|
|
34596
34640
|
import { QXEvent as QXEvent8 } from "qx-util";
|
|
34597
34641
|
function isHTML(str) {
|
|
34598
34642
|
if (str === "")
|
|
@@ -34616,6 +34660,8 @@ var InternalMessageController = class {
|
|
|
34616
34660
|
this.messages = [];
|
|
34617
34661
|
this.unreadOnly = false;
|
|
34618
34662
|
this.service = new InternalMessageService();
|
|
34663
|
+
this.ns = null;
|
|
34664
|
+
this.provider = null;
|
|
34619
34665
|
}
|
|
34620
34666
|
async init() {
|
|
34621
34667
|
this.listenMqtt();
|
|
@@ -34699,6 +34745,7 @@ var InternalMessageController = class {
|
|
|
34699
34745
|
*/
|
|
34700
34746
|
listenMqtt() {
|
|
34701
34747
|
ibiz.mc.command.internalMessage.on(async (msg) => {
|
|
34748
|
+
var _a;
|
|
34702
34749
|
ibiz.log.debug("mqtt internalMessage: ", msg);
|
|
34703
34750
|
if (msg.subtype !== "INTERNALMESSAGE") {
|
|
34704
34751
|
return;
|
|
@@ -34708,16 +34755,11 @@ var InternalMessageController = class {
|
|
|
34708
34755
|
isHtmlDesc: isHTML(msg.content),
|
|
34709
34756
|
desc: msg.content,
|
|
34710
34757
|
position: "bottom-right",
|
|
34758
|
+
class: (_a = this.ns) == null ? void 0 : _a.b("notice"),
|
|
34711
34759
|
onClick: () => {
|
|
34712
34760
|
const redirectUrl = ibiz.env.isMob ? msg.mobileurl : msg.url;
|
|
34713
|
-
if (
|
|
34714
|
-
|
|
34715
|
-
ibiz.commands.execute(
|
|
34716
|
-
OpenAppViewCommand.TAG,
|
|
34717
|
-
viewId,
|
|
34718
|
-
IBizContext4.create(context),
|
|
34719
|
-
params
|
|
34720
|
-
);
|
|
34761
|
+
if (this.provider) {
|
|
34762
|
+
this.provider.openViewByUrl(redirectUrl);
|
|
34721
34763
|
}
|
|
34722
34764
|
}
|
|
34723
34765
|
});
|
|
@@ -35258,7 +35300,12 @@ var ViewEngineBase = class {
|
|
|
35258
35300
|
init() {
|
|
35259
35301
|
}
|
|
35260
35302
|
async onCreated() {
|
|
35261
|
-
const { childNames } = this.view;
|
|
35303
|
+
const { childNames, modal } = this.view;
|
|
35304
|
+
modal.hooks.shouldDismiss.tapPromise(async (context) => {
|
|
35305
|
+
if (this.view.state.isLoading) {
|
|
35306
|
+
context.allowClose = false;
|
|
35307
|
+
}
|
|
35308
|
+
});
|
|
35262
35309
|
childNames.push("captionbar", "toolbar");
|
|
35263
35310
|
this.calcDynamicLayout();
|
|
35264
35311
|
}
|
|
@@ -36517,14 +36564,15 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
36517
36564
|
}
|
|
36518
36565
|
bindScriptExecutor(executor) {
|
|
36519
36566
|
executor.init(
|
|
36520
|
-
["context", "viewparams", "data", "env"],
|
|
36567
|
+
["context", "viewparams", "data", "env", "view"],
|
|
36521
36568
|
(executeParams) => {
|
|
36522
|
-
const { context, params, data } = executeParams;
|
|
36569
|
+
const { context, params, data, view } = executeParams;
|
|
36523
36570
|
return {
|
|
36524
36571
|
context,
|
|
36525
36572
|
params,
|
|
36526
36573
|
data: (data == null ? void 0 : data[0]) || {},
|
|
36527
|
-
env: ibiz.env
|
|
36574
|
+
env: ibiz.env,
|
|
36575
|
+
view
|
|
36528
36576
|
};
|
|
36529
36577
|
},
|
|
36530
36578
|
{
|