@ibiz-template/runtime 0.6.7 → 0.6.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 +110 -1
- package/dist/index.system.min.js +1 -1
- 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 +3 -0
- package/out/controller/common/view/view.controller.d.ts.map +1 -1
- package/out/controller/common/view/view.controller.js +3 -0
- package/out/controller/control/form/form-detail/form-button/form-button.controller.d.ts +36 -0
- package/out/controller/control/form/form-detail/form-button/form-button.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-button/form-button.controller.js +66 -0
- package/out/controller/control/wizard-panel/wizard-panel.controller.js +1 -1
- package/out/engine/md-view.engine.d.ts +7 -0
- package/out/engine/md-view.engine.d.ts.map +1 -1
- package/out/engine/md-view.engine.js +9 -0
- package/out/engine/view-base.engine.d.ts +7 -0
- package/out/engine/view-base.engine.d.ts.map +1 -1
- package/out/engine/view-base.engine.js +7 -0
- package/out/interface/engine/i-view.engine.d.ts +7 -0
- package/out/interface/engine/i-view.engine.d.ts.map +1 -1
- package/out/interface/provider/i-error-view.provider.d.ts +19 -0
- package/out/interface/provider/i-error-view.provider.d.ts.map +1 -0
- package/out/interface/provider/i-error-view.provider.js +1 -0
- package/out/interface/provider/index.d.ts +1 -0
- package/out/interface/provider/index.d.ts.map +1 -1
- package/out/register/helper/error-view-register.d.ts +22 -0
- package/out/register/helper/error-view-register.d.ts.map +1 -0
- package/out/register/helper/error-view-register.js +32 -0
- package/out/register/helper/index.d.ts +1 -0
- package/out/register/helper/index.d.ts.map +1 -1
- package/out/register/helper/index.js +1 -0
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -6101,6 +6101,24 @@ function getInternalMessageProvider(msg) {
|
|
|
6101
6101
|
}
|
|
6102
6102
|
}
|
|
6103
6103
|
|
|
6104
|
+
// src/register/helper/error-view-register.ts
|
|
6105
|
+
var ERROR_VIEW_PROVIDER_PREFIX = "ERROR_VIEW";
|
|
6106
|
+
function registerErrorViewProvider(key, callback) {
|
|
6107
|
+
ibiz.register.register("".concat(ERROR_VIEW_PROVIDER_PREFIX, "_").concat(key), callback);
|
|
6108
|
+
}
|
|
6109
|
+
function getProvider16(key) {
|
|
6110
|
+
return ibiz.register.get(
|
|
6111
|
+
"".concat(ERROR_VIEW_PROVIDER_PREFIX, "_").concat(key)
|
|
6112
|
+
);
|
|
6113
|
+
}
|
|
6114
|
+
function getErrorViewProvider(code) {
|
|
6115
|
+
let provider;
|
|
6116
|
+
if (!provider) {
|
|
6117
|
+
provider = getProvider16(code);
|
|
6118
|
+
}
|
|
6119
|
+
return provider;
|
|
6120
|
+
}
|
|
6121
|
+
|
|
6104
6122
|
// src/service/utils/app-counter/app-counter.ts
|
|
6105
6123
|
import { IBizContext, RuntimeError as RuntimeError14 } from "@ibiz-template/core";
|
|
6106
6124
|
import { notNilEmpty as notNilEmpty5, QXEvent as QXEvent2 } from "qx-util";
|
|
@@ -12889,6 +12907,9 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
12889
12907
|
*/
|
|
12890
12908
|
async exec(appViewId, _context, params = {}, opts = {}) {
|
|
12891
12909
|
const context = clone17(_context);
|
|
12910
|
+
if (context.srfsimple !== null) {
|
|
12911
|
+
context.srfsimple = void 0;
|
|
12912
|
+
}
|
|
12892
12913
|
const appView = await ibiz.hub.config.view.get(appViewId);
|
|
12893
12914
|
if (!appView) {
|
|
12894
12915
|
throw new RuntimeError25("\u5E94\u7528\u89C6\u56FE[".concat(appViewId, "]\u4E0D\u5B58\u5728"));
|
|
@@ -15178,6 +15199,9 @@ var ViewController = class extends BaseController {
|
|
|
15178
15199
|
params = convertNavData(navParams, this.params, this.context);
|
|
15179
15200
|
}
|
|
15180
15201
|
Object.assign(this.params, params);
|
|
15202
|
+
this.engines.forEach((engine2) => {
|
|
15203
|
+
engine2.handleContextParams();
|
|
15204
|
+
});
|
|
15181
15205
|
if (this.state.isMounted) {
|
|
15182
15206
|
this.callUIAction("Refresh" /* REFRESH */);
|
|
15183
15207
|
}
|
|
@@ -23398,10 +23422,75 @@ var FormButtonState = class extends FormDetailState {
|
|
|
23398
23422
|
|
|
23399
23423
|
// src/controller/control/form/form-detail/form-button/form-button.controller.ts
|
|
23400
23424
|
var FormButtonController = class extends FormDetailController {
|
|
23425
|
+
constructor() {
|
|
23426
|
+
super(...arguments);
|
|
23427
|
+
/**
|
|
23428
|
+
*界面行为状态
|
|
23429
|
+
*
|
|
23430
|
+
* @author zzq
|
|
23431
|
+
* @date 2024-03-11 15:09:43
|
|
23432
|
+
*/
|
|
23433
|
+
this.actionState = null;
|
|
23434
|
+
}
|
|
23401
23435
|
createState() {
|
|
23402
23436
|
var _a;
|
|
23403
23437
|
return new FormButtonState((_a = this.parent) == null ? void 0 : _a.state);
|
|
23404
23438
|
}
|
|
23439
|
+
async onInit() {
|
|
23440
|
+
super.onInit();
|
|
23441
|
+
await this.initActionStates();
|
|
23442
|
+
}
|
|
23443
|
+
/**
|
|
23444
|
+
* 初始化界面行为按钮的状态
|
|
23445
|
+
*
|
|
23446
|
+
* @author zzq
|
|
23447
|
+
* @date 2024-03-11 15:09:43
|
|
23448
|
+
*/
|
|
23449
|
+
async initActionStates() {
|
|
23450
|
+
const actionid = this.model.uiactionId;
|
|
23451
|
+
if (actionid) {
|
|
23452
|
+
this.actionState = new UIActionButtonState(
|
|
23453
|
+
this.model.id,
|
|
23454
|
+
this.form.context.srfappid,
|
|
23455
|
+
actionid
|
|
23456
|
+
);
|
|
23457
|
+
}
|
|
23458
|
+
}
|
|
23459
|
+
/**
|
|
23460
|
+
* 表单状态变更通知
|
|
23461
|
+
*
|
|
23462
|
+
* @author zzq
|
|
23463
|
+
* @date 2024-03-11 15:09:43
|
|
23464
|
+
*/
|
|
23465
|
+
async formStateNotify(_state) {
|
|
23466
|
+
if (this.actionState) {
|
|
23467
|
+
const deCodeName = calcDeCodeNameById(this.form.model.appDataEntityId);
|
|
23468
|
+
await this.actionState.update(this.data, deCodeName);
|
|
23469
|
+
}
|
|
23470
|
+
await super.formStateNotify(_state);
|
|
23471
|
+
}
|
|
23472
|
+
/**
|
|
23473
|
+
* 计算项的禁用状态
|
|
23474
|
+
*
|
|
23475
|
+
* @param {IData} data
|
|
23476
|
+
*/
|
|
23477
|
+
calcDetailDisabled(data) {
|
|
23478
|
+
super.calcDetailDisabled(data);
|
|
23479
|
+
if (this.actionState) {
|
|
23480
|
+
this.state.disabled = !!(this.state.disabled || this.actionState.disabled);
|
|
23481
|
+
}
|
|
23482
|
+
}
|
|
23483
|
+
/**
|
|
23484
|
+
* 计算项的显示状态
|
|
23485
|
+
*
|
|
23486
|
+
* @param {IData} data
|
|
23487
|
+
*/
|
|
23488
|
+
calcDetailVisible(data) {
|
|
23489
|
+
super.calcDetailVisible(data);
|
|
23490
|
+
if (this.actionState) {
|
|
23491
|
+
this.state.visible = !!(this.state.visible && this.actionState.visible);
|
|
23492
|
+
}
|
|
23493
|
+
}
|
|
23405
23494
|
/**
|
|
23406
23495
|
* 按钮点击处理回调
|
|
23407
23496
|
*
|
|
@@ -31099,7 +31188,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
31099
31188
|
* @memberof WizardPanelController
|
|
31100
31189
|
*/
|
|
31101
31190
|
async onNextClick() {
|
|
31102
|
-
const data = await this.activeFormController.save();
|
|
31191
|
+
const data = await this.activeFormController.save({ silent: true });
|
|
31103
31192
|
let nextTag;
|
|
31104
31193
|
if (data.srfnextform) {
|
|
31105
31194
|
const wizardForm = this.getWizardFormByTag(data.srfnextform);
|
|
@@ -35388,6 +35477,14 @@ var ViewEngineBase = class {
|
|
|
35388
35477
|
*/
|
|
35389
35478
|
init() {
|
|
35390
35479
|
}
|
|
35480
|
+
/**
|
|
35481
|
+
* 重新计算上下文,主要用于视图控制器再算上下文后,每个视图控制器可自身根据变动重新计算
|
|
35482
|
+
* @author zpc
|
|
35483
|
+
* @date 2024-03-12 13:50:07
|
|
35484
|
+
* @return {*} {Promise<void>}
|
|
35485
|
+
*/
|
|
35486
|
+
handleContextParams() {
|
|
35487
|
+
}
|
|
35391
35488
|
async onCreated() {
|
|
35392
35489
|
const { childNames, modal } = this.view;
|
|
35393
35490
|
modal.hooks.shouldDismiss.tapPromise(async (context) => {
|
|
@@ -35692,6 +35789,15 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
35692
35789
|
this.load();
|
|
35693
35790
|
}
|
|
35694
35791
|
}
|
|
35792
|
+
}
|
|
35793
|
+
/**
|
|
35794
|
+
* 重新计算上下文,主要用于视图控制器再算上下文后,每个视图控制器可自身根据变动重新计算
|
|
35795
|
+
* @author zpc
|
|
35796
|
+
* @date 2024-03-12 13:52:06
|
|
35797
|
+
* @return {*} {Promise<void>}
|
|
35798
|
+
*/
|
|
35799
|
+
handleContextParams() {
|
|
35800
|
+
super.handleContextParams();
|
|
35695
35801
|
if (this.view.context.srfsimple == null) {
|
|
35696
35802
|
this.view.context.srfsimple = true;
|
|
35697
35803
|
}
|
|
@@ -37316,6 +37422,7 @@ export {
|
|
|
37316
37422
|
DefaultErrorHandler,
|
|
37317
37423
|
DynamicCodeListCache,
|
|
37318
37424
|
EDITOR_PROVIDER_PREFIX,
|
|
37425
|
+
ERROR_VIEW_PROVIDER_PREFIX,
|
|
37319
37426
|
EditFormController,
|
|
37320
37427
|
EditFormService,
|
|
37321
37428
|
EditorController,
|
|
@@ -37537,6 +37644,7 @@ export {
|
|
|
37537
37644
|
getDefaultValue,
|
|
37538
37645
|
getEditorProvider,
|
|
37539
37646
|
getEntitySchema,
|
|
37647
|
+
getErrorViewProvider,
|
|
37540
37648
|
getFormDetailProvider,
|
|
37541
37649
|
getGridColumnProvider,
|
|
37542
37650
|
getInternalMessageProvider,
|
|
@@ -37583,6 +37691,7 @@ export {
|
|
|
37583
37691
|
registerControlProvider,
|
|
37584
37692
|
registerDEMethodProvider,
|
|
37585
37693
|
registerEditorProvider,
|
|
37694
|
+
registerErrorViewProvider,
|
|
37586
37695
|
registerFormDetailProvider,
|
|
37587
37696
|
registerGridColumnProvider,
|
|
37588
37697
|
registerInternalMessageProvider,
|