@ibiz-template/runtime 0.1.29 → 0.1.30
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 +104 -18
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/out/config/global-config.js +1 -1
- package/out/controller/common/control/control.controller.d.ts +18 -0
- package/out/controller/common/control/control.controller.d.ts.map +1 -1
- package/out/controller/common/control/control.controller.js +29 -1
- package/out/controller/control/dashboard/portlet/index.d.ts +1 -0
- package/out/controller/control/dashboard/portlet/index.d.ts.map +1 -1
- package/out/controller/control/dashboard/portlet/index.js +1 -0
- package/out/controller/control/dashboard/portlet/menu-portlet/index.d.ts +2 -0
- package/out/controller/control/dashboard/portlet/menu-portlet/index.d.ts.map +1 -0
- package/out/controller/control/dashboard/portlet/menu-portlet/index.js +1 -0
- package/out/controller/control/dashboard/portlet/menu-portlet/menu-portlet.controller.d.ts +5 -0
- package/out/controller/control/dashboard/portlet/menu-portlet/menu-portlet.controller.d.ts.map +1 -0
- package/out/controller/control/dashboard/portlet/menu-portlet/menu-portlet.controller.js +3 -0
- package/out/controller/control/exp-bar/exp-bar.controller.d.ts +10 -0
- package/out/controller/control/exp-bar/exp-bar.controller.d.ts.map +1 -1
- package/out/controller/control/exp-bar/exp-bar.controller.js +29 -2
- package/out/controller/control/exp-bar/tree-exp-bar.controller.d.ts.map +1 -1
- package/out/controller/control/exp-bar/tree-exp-bar.controller.js +1 -1
- package/out/controller/control/tab-exp-panel/tab-exp-panel.controller.d.ts +10 -0
- package/out/controller/control/tab-exp-panel/tab-exp-panel.controller.d.ts.map +1 -1
- package/out/controller/control/tab-exp-panel/tab-exp-panel.controller.js +19 -0
- package/out/interface/common/i-global-config/i-global-view-config.d.ts +5 -3
- package/out/interface/common/i-global-config/i-global-view-config.d.ts.map +1 -1
- package/out/interface/controller/common/i-nav-view-msg/i-nav-view-msg.d.ts +9 -0
- package/out/interface/controller/common/i-nav-view-msg/i-nav-view-msg.d.ts.map +1 -1
- package/out/service/app-data-entity/app-data-entity.d.ts.map +1 -1
- package/out/service/app-data-entity/app-data-entity.js +4 -0
- package/out/service/service/entity/method/method-renturn.d.ts.map +1 -1
- package/out/service/service/entity/method/method-renturn.js +4 -0
- package/out/ui-action/provider/ui-action-provider-base.js +1 -1
- package/package.json +2 -2
- package/src/config/global-config.ts +1 -1
- package/src/controller/common/control/control.controller.ts +31 -2
- package/src/controller/control/dashboard/portlet/index.ts +1 -0
- package/src/controller/control/dashboard/portlet/menu-portlet/index.ts +1 -0
- package/src/controller/control/dashboard/portlet/menu-portlet/menu-portlet.controller.ts +4 -0
- package/src/controller/control/exp-bar/exp-bar.controller.ts +30 -2
- package/src/controller/control/exp-bar/tree-exp-bar.controller.ts +1 -0
- package/src/controller/control/tab-exp-panel/tab-exp-panel.controller.ts +20 -0
- package/src/interface/common/i-global-config/i-global-view-config.ts +5 -3
- package/src/interface/controller/common/i-nav-view-msg/i-nav-view-msg.ts +10 -0
- package/src/service/app-data-entity/app-data-entity.ts +5 -0
- package/src/service/service/entity/method/method-renturn.ts +4 -0
- package/src/ui-action/provider/ui-action-provider-base.ts +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -6159,7 +6159,7 @@ var GlobalConfig = class {
|
|
|
6159
6159
|
// 全局视图配置
|
|
6160
6160
|
this.view = {
|
|
6161
6161
|
enableDataInfoBar: true,
|
|
6162
|
-
|
|
6162
|
+
expCacheMode: "TABEXPPANEL:"
|
|
6163
6163
|
};
|
|
6164
6164
|
// 全局表格配置
|
|
6165
6165
|
this.grid = {
|
|
@@ -11167,6 +11167,9 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
11167
11167
|
* @return {*} {unknown}
|
|
11168
11168
|
*/
|
|
11169
11169
|
convertVal(value, dataType) {
|
|
11170
|
+
if (value == null) {
|
|
11171
|
+
return value;
|
|
11172
|
+
}
|
|
11170
11173
|
if (isNil7(dataType)) {
|
|
11171
11174
|
return value;
|
|
11172
11175
|
}
|
|
@@ -11361,6 +11364,7 @@ var MethodInput = class {
|
|
|
11361
11364
|
};
|
|
11362
11365
|
|
|
11363
11366
|
// src/service/service/entity/method/method-renturn.ts
|
|
11367
|
+
import { isNilOrEmpty as isNilOrEmpty5 } from "qx-util";
|
|
11364
11368
|
var MethodReturn = class {
|
|
11365
11369
|
/**
|
|
11366
11370
|
* Creates an instance of MethodReturn.
|
|
@@ -11401,6 +11405,9 @@ var MethodReturn = class {
|
|
|
11401
11405
|
const items = await this.dto.sets(context, [data]);
|
|
11402
11406
|
return items[0];
|
|
11403
11407
|
}
|
|
11408
|
+
if (isNilOrEmpty5(data)) {
|
|
11409
|
+
data = {};
|
|
11410
|
+
}
|
|
11404
11411
|
return new AppDataEntity(this.entity, data);
|
|
11405
11412
|
}
|
|
11406
11413
|
};
|
|
@@ -15321,7 +15328,7 @@ function getOriginData(data) {
|
|
|
15321
15328
|
|
|
15322
15329
|
// src/controller/utils/value-rule/value-rule.ts
|
|
15323
15330
|
import { RuntimeError as RuntimeError20 } from "@ibiz-template/core";
|
|
15324
|
-
import { isNilOrEmpty as
|
|
15331
|
+
import { isNilOrEmpty as isNilOrEmpty6 } from "qx-util";
|
|
15325
15332
|
function generateRules(itemVRs, name, valueItemName) {
|
|
15326
15333
|
const rules = [];
|
|
15327
15334
|
itemVRs.forEach((item) => {
|
|
@@ -15360,7 +15367,7 @@ function generateRules(itemVRs, name, valueItemName) {
|
|
|
15360
15367
|
const valueName = valueItemName || name;
|
|
15361
15368
|
rules.push({
|
|
15362
15369
|
validator: (rule, value, callback, source) => {
|
|
15363
|
-
if (
|
|
15370
|
+
if (isNilOrEmpty6(source[valueName])) {
|
|
15364
15371
|
return true;
|
|
15365
15372
|
}
|
|
15366
15373
|
const { isPast, infoMessage } = verifyDeRules(
|
|
@@ -16411,6 +16418,7 @@ var CodeListEditorController = class extends EditorController {
|
|
|
16411
16418
|
// src/controller/common/control/control.controller.ts
|
|
16412
16419
|
import { NoticeError } from "@ibiz-template/core";
|
|
16413
16420
|
import { isNil as isNil16 } from "ramda";
|
|
16421
|
+
import { notNilEmpty as notNilEmpty8 } from "qx-util";
|
|
16414
16422
|
var ControlController = class extends BaseController {
|
|
16415
16423
|
/**
|
|
16416
16424
|
* Creates an instance of ControlController.
|
|
@@ -16423,6 +16431,15 @@ var ControlController = class extends BaseController {
|
|
|
16423
16431
|
*/
|
|
16424
16432
|
constructor(model, context, params, ctx) {
|
|
16425
16433
|
super(model, context, params, ctx);
|
|
16434
|
+
/**
|
|
16435
|
+
* 部件参数
|
|
16436
|
+
*
|
|
16437
|
+
* @author zk
|
|
16438
|
+
* @date 2023-09-26 03:09:21
|
|
16439
|
+
* @type {IData}
|
|
16440
|
+
* @memberof ControlController
|
|
16441
|
+
*/
|
|
16442
|
+
this.controlParams = {};
|
|
16426
16443
|
/**
|
|
16427
16444
|
* 子适配器
|
|
16428
16445
|
* @author lxm
|
|
@@ -16478,6 +16495,7 @@ var ControlController = class extends BaseController {
|
|
|
16478
16495
|
const provider = await getControlProvider(this.controlPanel);
|
|
16479
16496
|
this.providers[this.controlPanel.name] = provider;
|
|
16480
16497
|
}
|
|
16498
|
+
this.handleControlParams();
|
|
16481
16499
|
this.initControlScheduler(this.model.controlLogics);
|
|
16482
16500
|
}
|
|
16483
16501
|
async onDestroyed() {
|
|
@@ -16556,6 +16574,22 @@ var ControlController = class extends BaseController {
|
|
|
16556
16574
|
});
|
|
16557
16575
|
}
|
|
16558
16576
|
}
|
|
16577
|
+
/**
|
|
16578
|
+
* 部件参数解析
|
|
16579
|
+
*
|
|
16580
|
+
* @author zk
|
|
16581
|
+
* @date 2023-09-27 07:09:08
|
|
16582
|
+
* @protected
|
|
16583
|
+
* @memberof ControlController
|
|
16584
|
+
*/
|
|
16585
|
+
handleControlParams() {
|
|
16586
|
+
const { ctrlParams } = this.model.controlParam;
|
|
16587
|
+
let params = {};
|
|
16588
|
+
if (notNilEmpty8(ctrlParams)) {
|
|
16589
|
+
params = convertNavData(ctrlParams, this.params, this.context);
|
|
16590
|
+
}
|
|
16591
|
+
Object.assign(this.controlParams, params);
|
|
16592
|
+
}
|
|
16559
16593
|
/**
|
|
16560
16594
|
* 初始化部件逻辑调度器
|
|
16561
16595
|
* @author lxm
|
|
@@ -19881,7 +19915,7 @@ var UIActionProviderBase = class {
|
|
|
19881
19915
|
async isConfirm(action, args) {
|
|
19882
19916
|
const confirmMsg = this.calcMessage("confirm", action, args);
|
|
19883
19917
|
if (action.enableConfirm && confirmMsg) {
|
|
19884
|
-
return ibiz.
|
|
19918
|
+
return ibiz.confirm.warning({ title: "\u64CD\u4F5C\u786E\u8BA4", desc: confirmMsg });
|
|
19885
19919
|
}
|
|
19886
19920
|
return true;
|
|
19887
19921
|
}
|
|
@@ -20813,6 +20847,10 @@ var ContainerPortletController = class extends PortletPartController {
|
|
|
20813
20847
|
var ViewPortletController = class extends PortletPartController {
|
|
20814
20848
|
};
|
|
20815
20849
|
|
|
20850
|
+
// src/controller/control/dashboard/portlet/menu-portlet/menu-portlet.controller.ts
|
|
20851
|
+
var MenuPortletController = class extends PortletPartController {
|
|
20852
|
+
};
|
|
20853
|
+
|
|
20816
20854
|
// src/controller/control/data-view/data-view.controller.ts
|
|
20817
20855
|
import { RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
|
|
20818
20856
|
import { isNil as isNil18 } from "ramda";
|
|
@@ -21324,6 +21362,24 @@ var ExpBarControlController = class extends ControlController {
|
|
|
21324
21362
|
);
|
|
21325
21363
|
return control;
|
|
21326
21364
|
}
|
|
21365
|
+
/**
|
|
21366
|
+
* 是否缓存
|
|
21367
|
+
*
|
|
21368
|
+
* @author zk
|
|
21369
|
+
* @date 2023-09-27 09:09:59
|
|
21370
|
+
* @readonly
|
|
21371
|
+
* @type {boolean}
|
|
21372
|
+
* @memberof ExpBarControlController
|
|
21373
|
+
*/
|
|
21374
|
+
get isCache() {
|
|
21375
|
+
if (this.controlParams.expcache === "CACHE") {
|
|
21376
|
+
return true;
|
|
21377
|
+
}
|
|
21378
|
+
if (this.controlParams.expcache === "NO_CACHE") {
|
|
21379
|
+
return false;
|
|
21380
|
+
}
|
|
21381
|
+
return ibiz.config.view.expCacheMode.includes(this.model.controlType);
|
|
21382
|
+
}
|
|
21327
21383
|
/**
|
|
21328
21384
|
* 创建完成
|
|
21329
21385
|
*
|
|
@@ -21430,7 +21486,10 @@ var ExpBarControlController = class extends ControlController {
|
|
|
21430
21486
|
this.xDataController.setSelection([selectItem]);
|
|
21431
21487
|
}
|
|
21432
21488
|
this._evt.emit("onNavViewChange", {
|
|
21433
|
-
navViewMsg: {
|
|
21489
|
+
navViewMsg: {
|
|
21490
|
+
key: this.state.srfnav,
|
|
21491
|
+
isCache: this.isCache
|
|
21492
|
+
},
|
|
21434
21493
|
context: this.context
|
|
21435
21494
|
});
|
|
21436
21495
|
} else if (selectItem) {
|
|
@@ -21450,7 +21509,12 @@ var ExpBarControlController = class extends ControlController {
|
|
|
21450
21509
|
const data = this.xDataController.state.items[0];
|
|
21451
21510
|
if (!data) {
|
|
21452
21511
|
this.state.srfnav = "";
|
|
21453
|
-
this._evt.emit("onNavViewChange", {
|
|
21512
|
+
this._evt.emit("onNavViewChange", {
|
|
21513
|
+
navViewMsg: {
|
|
21514
|
+
key: "",
|
|
21515
|
+
isCache: this.isCache
|
|
21516
|
+
}
|
|
21517
|
+
});
|
|
21454
21518
|
return;
|
|
21455
21519
|
}
|
|
21456
21520
|
this.xDataController.setActive(data);
|
|
@@ -21537,7 +21601,8 @@ var ExpBarControlController = class extends ControlController {
|
|
|
21537
21601
|
key: data[this.navKeyName],
|
|
21538
21602
|
context: result.context,
|
|
21539
21603
|
params: result.params,
|
|
21540
|
-
viewId: viewModelId
|
|
21604
|
+
viewId: viewModelId,
|
|
21605
|
+
isCache: this.isCache
|
|
21541
21606
|
};
|
|
21542
21607
|
}
|
|
21543
21608
|
/**
|
|
@@ -21744,6 +21809,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
21744
21809
|
return {
|
|
21745
21810
|
key: nodeId,
|
|
21746
21811
|
viewId: nodeModel.navAppViewId,
|
|
21812
|
+
isCache: this.isCache,
|
|
21747
21813
|
...result
|
|
21748
21814
|
};
|
|
21749
21815
|
}
|
|
@@ -22476,7 +22542,7 @@ var FormButtonController = class extends FormDetailController {
|
|
|
22476
22542
|
|
|
22477
22543
|
// src/controller/control/form/form-detail/form-druipart/form-druipart.controller.ts
|
|
22478
22544
|
import { isOverlap as isOverlap2 } from "@ibiz-template/core";
|
|
22479
|
-
import { createUUID as createUUID4, notNilEmpty as
|
|
22545
|
+
import { createUUID as createUUID4, notNilEmpty as notNilEmpty9 } from "qx-util";
|
|
22480
22546
|
|
|
22481
22547
|
// src/controller/control/form/form-detail/form-druipart/form-druipart.state.ts
|
|
22482
22548
|
var FormDruipartState = class extends FormDetailState {
|
|
@@ -22571,7 +22637,7 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
22571
22637
|
calcViewParams() {
|
|
22572
22638
|
let newContext = this.form.context.clone();
|
|
22573
22639
|
const navContexts = this.model.navigateContexts;
|
|
22574
|
-
if (
|
|
22640
|
+
if (notNilEmpty9(navContexts)) {
|
|
22575
22641
|
newContext = Object.assign(
|
|
22576
22642
|
newContext,
|
|
22577
22643
|
convertNavData(
|
|
@@ -22740,7 +22806,7 @@ var FormGroupPanelController = class extends FormDetailController {
|
|
|
22740
22806
|
|
|
22741
22807
|
// src/controller/control/form/form-detail/form-item/form-item.controller.ts
|
|
22742
22808
|
import Schema from "async-validator";
|
|
22743
|
-
import { isNilOrEmpty as
|
|
22809
|
+
import { isNilOrEmpty as isNilOrEmpty7 } from "qx-util";
|
|
22744
22810
|
|
|
22745
22811
|
// src/controller/control/form/form-detail/form-item/form-item.state.ts
|
|
22746
22812
|
var FormItemState = class extends FormDetailState {
|
|
@@ -22978,7 +23044,7 @@ var FormItemController = class extends FormDetailController {
|
|
|
22978
23044
|
this.state.error = null;
|
|
22979
23045
|
return true;
|
|
22980
23046
|
}
|
|
22981
|
-
if (this.state.required &&
|
|
23047
|
+
if (this.state.required && isNilOrEmpty7(this.data[this.name])) {
|
|
22982
23048
|
this.state.error = "\u8BF7\u586B\u5199".concat(this.model.caption || "");
|
|
22983
23049
|
return false;
|
|
22984
23050
|
}
|
|
@@ -26125,7 +26191,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
26125
26191
|
// src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts
|
|
26126
26192
|
import { RuntimeError as RuntimeError44 } from "@ibiz-template/core";
|
|
26127
26193
|
import Schema2 from "async-validator";
|
|
26128
|
-
import { isNilOrEmpty as
|
|
26194
|
+
import { isNilOrEmpty as isNilOrEmpty8 } from "qx-util";
|
|
26129
26195
|
var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
26130
26196
|
constructor() {
|
|
26131
26197
|
super(...arguments);
|
|
@@ -26358,7 +26424,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
26358
26424
|
*/
|
|
26359
26425
|
async validate(row) {
|
|
26360
26426
|
const editName = this.fieldName;
|
|
26361
|
-
if (ibiz.config.grid.editShowMode !== "cell" && row.editColStates[editName].required &&
|
|
26427
|
+
if (ibiz.config.grid.editShowMode !== "cell" && row.editColStates[editName].required && isNilOrEmpty8(row.data[editName])) {
|
|
26362
26428
|
row.errors[editName] = "\u8BF7\u586B\u5199".concat(this.model.caption || "");
|
|
26363
26429
|
return false;
|
|
26364
26430
|
}
|
|
@@ -27354,6 +27420,24 @@ var TabExpPanelController = class extends ControlController {
|
|
|
27354
27420
|
*/
|
|
27355
27421
|
this.isShowIcon = false;
|
|
27356
27422
|
}
|
|
27423
|
+
/**
|
|
27424
|
+
* 是否缓存
|
|
27425
|
+
*
|
|
27426
|
+
* @author zk
|
|
27427
|
+
* @date 2023-09-27 09:09:59
|
|
27428
|
+
* @readonly
|
|
27429
|
+
* @type {boolean}
|
|
27430
|
+
* @memberof ExpBarControlController
|
|
27431
|
+
*/
|
|
27432
|
+
get isCache() {
|
|
27433
|
+
if (this.controlParams.expcache === "CACHE") {
|
|
27434
|
+
return true;
|
|
27435
|
+
}
|
|
27436
|
+
if (this.controlParams.expcache === "NO_CACHE") {
|
|
27437
|
+
return false;
|
|
27438
|
+
}
|
|
27439
|
+
return ibiz.config.view.expCacheMode.includes(this.model.controlType);
|
|
27440
|
+
}
|
|
27357
27441
|
/**
|
|
27358
27442
|
* 初始化state的属性
|
|
27359
27443
|
*
|
|
@@ -27533,7 +27617,8 @@ var TabExpPanelController = class extends ControlController {
|
|
|
27533
27617
|
key: tabViewPanel.codeName.toLowerCase(),
|
|
27534
27618
|
context,
|
|
27535
27619
|
params,
|
|
27536
|
-
viewId: tabViewPanel.embeddedAppDEViewId
|
|
27620
|
+
viewId: tabViewPanel.embeddedAppDEViewId,
|
|
27621
|
+
isCache: this.isCache
|
|
27537
27622
|
};
|
|
27538
27623
|
}
|
|
27539
27624
|
};
|
|
@@ -30849,7 +30934,7 @@ import {
|
|
|
30849
30934
|
RuntimeError as RuntimeError55,
|
|
30850
30935
|
RuntimeModelError as RuntimeModelError58
|
|
30851
30936
|
} from "@ibiz-template/core";
|
|
30852
|
-
import { notNilEmpty as
|
|
30937
|
+
import { notNilEmpty as notNilEmpty10 } from "qx-util";
|
|
30853
30938
|
var AppUILogicExecutor = class extends LogicExecutor {
|
|
30854
30939
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
30855
30940
|
execute(executeParams) {
|
|
@@ -30911,7 +30996,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30911
30996
|
);
|
|
30912
30997
|
let tempParams = {};
|
|
30913
30998
|
const navParams = openViewRef.navigateParams;
|
|
30914
|
-
if (
|
|
30999
|
+
if (notNilEmpty10(navParams)) {
|
|
30915
31000
|
tempParams = convertNavData(navParams, data[0], params, context);
|
|
30916
31001
|
}
|
|
30917
31002
|
return ibiz.commands.execute(
|
|
@@ -30996,12 +31081,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30996
31081
|
let tempParams = {};
|
|
30997
31082
|
const _data = (data == null ? void 0 : data[0]) || {};
|
|
30998
31083
|
const navContexts = newViewRef.navigateContexts;
|
|
30999
|
-
if (
|
|
31084
|
+
if (notNilEmpty10(navContexts)) {
|
|
31000
31085
|
tempContext = convertNavData(navContexts, _data, params, context);
|
|
31001
31086
|
}
|
|
31002
31087
|
tempContext = Object.assign(context, tempContext);
|
|
31003
31088
|
const navParams = newViewRef.navigateParams;
|
|
31004
|
-
if (
|
|
31089
|
+
if (notNilEmpty10(navParams)) {
|
|
31005
31090
|
tempParams = convertNavData(navParams, _data, params, context);
|
|
31006
31091
|
}
|
|
31007
31092
|
if (params.srfcopymode) {
|
|
@@ -31445,6 +31530,7 @@ export {
|
|
|
31445
31530
|
MDCtrlController,
|
|
31446
31531
|
MDCtrlService,
|
|
31447
31532
|
MDViewEngine,
|
|
31533
|
+
MenuPortletController,
|
|
31448
31534
|
MethodDto,
|
|
31449
31535
|
MobMDCtrlRowState,
|
|
31450
31536
|
MobViewController,
|