@ibiz-template/runtime 0.7.41-alpha.108 → 0.7.41-alpha.109
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 +48 -5
- package/dist/index.system.min.js +1 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-md.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-md.controller.js +10 -1
- package/out/controller/control/form/search-form/search-form.controller.d.ts +3 -1
- package/out/controller/control/form/search-form/search-form.controller.d.ts.map +1 -1
- package/out/controller/control/form/search-form/search-form.controller.js +21 -1
- package/out/controller/control/search-bar/search-bar.controller.d.ts +1 -1
- package/out/controller/control/search-bar/search-bar.controller.d.ts.map +1 -1
- package/out/controller/control/search-bar/search-bar.controller.js +12 -2
- package/out/interface/api/controller/control/i-api-search-bar.controller.d.ts +1 -1
- package/out/interface/api/controller/control/i-api-search-bar.controller.d.ts.map +1 -1
- package/out/interface/api/controller/control/i-api-search-form.controller.d.ts +4 -1
- package/out/interface/api/controller/control/i-api-search-form.controller.d.ts.map +1 -1
- package/out/interface/controller/event/argument/before-search.event.d.ts +13 -0
- package/out/interface/controller/event/argument/before-search.event.d.ts.map +1 -0
- package/out/interface/controller/event/argument/before-search.event.js +1 -0
- package/out/interface/controller/event/argument/index.d.ts +1 -0
- package/out/interface/controller/event/argument/index.d.ts.map +1 -1
- package/out/interface/controller/event/control/i-search-bar.event.d.ts +18 -1
- package/out/interface/controller/event/control/i-search-bar.event.d.ts.map +1 -1
- package/out/interface/controller/event/control/i-search-form.event.d.ts +18 -1
- package/out/interface/controller/event/control/i-search-form.event.d.ts.map +1 -1
- package/out/ui-action/provider/ui-action-provider-base.d.ts.map +1 -1
- package/out/ui-action/provider/ui-action-provider-base.js +9 -1
- package/package.json +4 -4
- package/src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-md.controller.ts +11 -1
- package/src/controller/control/form/search-form/search-form.controller.ts +23 -1
- package/src/controller/control/search-bar/search-bar.controller.ts +13 -2
- package/src/interface/api/controller/control/i-api-search-bar.controller.ts +1 -1
- package/src/interface/api/controller/control/i-api-search-form.controller.ts +2 -1
- package/src/interface/controller/event/argument/before-search.event.ts +12 -0
- package/src/interface/controller/event/argument/index.ts +1 -0
- package/src/interface/controller/event/control/i-search-bar.event.ts +14 -1
- package/src/interface/controller/event/control/i-search-form.event.ts +14 -1
- package/src/ui-action/provider/ui-action-provider-base.ts +18 -1
package/dist/index.esm.js
CHANGED
|
@@ -34684,7 +34684,7 @@ var UIActionProviderBase = class {
|
|
|
34684
34684
|
refreshMode: action.refreshMode,
|
|
34685
34685
|
closeView: action.closeEditView
|
|
34686
34686
|
};
|
|
34687
|
-
const { context, params, data, view } = args;
|
|
34687
|
+
const { context, params, data, view, ctrl } = args;
|
|
34688
34688
|
if (action.closeEditView) {
|
|
34689
34689
|
view.state.isClosing = true;
|
|
34690
34690
|
}
|
|
@@ -34718,6 +34718,12 @@ var UIActionProviderBase = class {
|
|
|
34718
34718
|
result.cancel = true;
|
|
34719
34719
|
return this.returnError(result, view);
|
|
34720
34720
|
}
|
|
34721
|
+
if (action.beforeCode) {
|
|
34722
|
+
await ScriptFactory.asyncExecScriptFn(
|
|
34723
|
+
{ context, params, data, view, ctrl, args },
|
|
34724
|
+
action.beforeCode
|
|
34725
|
+
);
|
|
34726
|
+
}
|
|
34721
34727
|
const _result = await this.execAction(action, args);
|
|
34722
34728
|
const { presetParams } = await this.handleParams(
|
|
34723
34729
|
action,
|
|
@@ -34729,6 +34735,12 @@ var UIActionProviderBase = class {
|
|
|
34729
34735
|
view.modal.ignoreDismissCheck = true;
|
|
34730
34736
|
}
|
|
34731
34737
|
Object.assign(result, _result);
|
|
34738
|
+
if (action.afterCode) {
|
|
34739
|
+
await ScriptFactory.asyncExecScriptFn(
|
|
34740
|
+
{ context, params, data: result, view, ctrl, args },
|
|
34741
|
+
action.afterCode
|
|
34742
|
+
);
|
|
34743
|
+
}
|
|
34732
34744
|
if (result.cancel === true) {
|
|
34733
34745
|
return this.returnError(result, view);
|
|
34734
34746
|
}
|
|
@@ -42560,7 +42572,15 @@ var SearchBarController = class extends ControlController {
|
|
|
42560
42572
|
* @description 搜索
|
|
42561
42573
|
* @memberof SearchBarController
|
|
42562
42574
|
*/
|
|
42563
|
-
onSearch() {
|
|
42575
|
+
async onSearch() {
|
|
42576
|
+
const eventCtx = {};
|
|
42577
|
+
await this.evt.emit("onBeforeSearch", {
|
|
42578
|
+
data: [this.getFilterParams()],
|
|
42579
|
+
args: { eventCtx }
|
|
42580
|
+
});
|
|
42581
|
+
if (eventCtx.allowSearch === false) {
|
|
42582
|
+
return;
|
|
42583
|
+
}
|
|
42564
42584
|
this.evt.emit("onSearch", void 0);
|
|
42565
42585
|
}
|
|
42566
42586
|
/**
|
|
@@ -42621,7 +42641,7 @@ var SearchBarController = class extends ControlController {
|
|
|
42621
42641
|
resetFilter() {
|
|
42622
42642
|
this.state.filterNodes = getOriginFilterNodes();
|
|
42623
42643
|
this.evt.emit("onReset", void 0);
|
|
42624
|
-
this.
|
|
42644
|
+
this.onSearch();
|
|
42625
42645
|
}
|
|
42626
42646
|
/**
|
|
42627
42647
|
* 初始化过滤项控制器
|
|
@@ -46447,7 +46467,22 @@ var SearchFormController = class extends FormController {
|
|
|
46447
46467
|
* @date 2023-03-26 02:27:23
|
|
46448
46468
|
* @return {*} {Promise<void>}
|
|
46449
46469
|
*/
|
|
46450
|
-
async search() {
|
|
46470
|
+
async search(args) {
|
|
46471
|
+
const isValid2 = (args == null ? void 0 : args.silentVerify) === true ? await this.silentValidate() : await this.validate();
|
|
46472
|
+
if (!isValid2) {
|
|
46473
|
+
if ((args == null ? void 0 : args.silentVerify) === true) {
|
|
46474
|
+
return;
|
|
46475
|
+
}
|
|
46476
|
+
this.handleValidateFail();
|
|
46477
|
+
}
|
|
46478
|
+
const eventCtx = {};
|
|
46479
|
+
await this.evt.emit("onBeforeSearch", {
|
|
46480
|
+
data: [this.data],
|
|
46481
|
+
args: { eventCtx }
|
|
46482
|
+
});
|
|
46483
|
+
if (eventCtx.allowSearch === false) {
|
|
46484
|
+
return;
|
|
46485
|
+
}
|
|
46451
46486
|
await this.evt.emit("onSearch", void 0);
|
|
46452
46487
|
}
|
|
46453
46488
|
/**
|
|
@@ -48668,7 +48703,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
48668
48703
|
async onInit() {
|
|
48669
48704
|
var _a3;
|
|
48670
48705
|
await super.onInit();
|
|
48671
|
-
const { contentControl } = this.model;
|
|
48706
|
+
const { appId: appId2, contentControl } = this.model;
|
|
48672
48707
|
if (!contentControl) {
|
|
48673
48708
|
if (((_a3 = this.context) == null ? void 0 : _a3.srfrunmode) === "DESIGN") {
|
|
48674
48709
|
return;
|
|
@@ -48678,6 +48713,14 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
48678
48713
|
ibiz.i18n.t("runtime.controller.control.form.unconfiguredWidgets")
|
|
48679
48714
|
);
|
|
48680
48715
|
}
|
|
48716
|
+
if (this.model.ctrlParams) {
|
|
48717
|
+
mergeInLeft2(contentControl, {
|
|
48718
|
+
controlParam: {
|
|
48719
|
+
appId: appId2,
|
|
48720
|
+
ctrlParams: this.model.ctrlParams
|
|
48721
|
+
}
|
|
48722
|
+
});
|
|
48723
|
+
}
|
|
48681
48724
|
if (contentControl.controlType === "GRID") {
|
|
48682
48725
|
mergeInLeft2(contentControl, {
|
|
48683
48726
|
enableRowEdit: this.enableCreate || this.enableUpdate,
|