@magic-xpa/gui 4.901.0-dev491.317 → 4.901.0-dev491.321
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/esm2020/src/Commands.mjs +8 -1
- package/esm2020/src/gui/low/GuiInteractive.mjs +12 -1
- package/esm2020/src/management/gui/MgFormBase.mjs +7 -5
- package/esm2020/src/management/tasks/GuiTaskBase.mjs +2 -2
- package/fesm2015/magic-xpa-gui.mjs +47 -21
- package/fesm2015/magic-xpa-gui.mjs.map +1 -1
- package/fesm2020/magic-xpa-gui.mjs +25 -5
- package/fesm2020/magic-xpa-gui.mjs.map +1 -1
- package/package.json +2 -2
- package/src/Commands.d.ts +1 -0
- package/src/gui/low/GuiInteractive.d.ts +3 -1
- package/src/management/gui/MgFormBase.d.ts +2 -2
|
@@ -524,6 +524,7 @@ var InteractiveCommandType;
|
|
|
524
524
|
InteractiveCommandType[InteractiveCommandType["GET_MAX_ROWS_IN_PAGINATED_TABLE"] = 11] = "GET_MAX_ROWS_IN_PAGINATED_TABLE";
|
|
525
525
|
InteractiveCommandType[InteractiveCommandType["CALL_JS"] = 12] = "CALL_JS";
|
|
526
526
|
InteractiveCommandType[InteractiveCommandType["GET_LAST_ROUTE"] = 13] = "GET_LAST_ROUTE";
|
|
527
|
+
InteractiveCommandType[InteractiveCommandType["OPEN_FORM"] = 14] = "OPEN_FORM";
|
|
527
528
|
})(InteractiveCommandType || (InteractiveCommandType = {}));
|
|
528
529
|
class GuiInteractiveBase {
|
|
529
530
|
constructor() {
|
|
@@ -646,6 +647,16 @@ class GuiInteractiveBase {
|
|
|
646
647
|
this.Invoke();
|
|
647
648
|
return this.resultString;
|
|
648
649
|
}
|
|
650
|
+
ExecuteOpenOverlayForm(obj, formName, handlerTaskTag, calledTaskTag, inputControls, isDialog) {
|
|
651
|
+
this._commandType = InteractiveCommandType.OPEN_FORM;
|
|
652
|
+
this.controlName = formName;
|
|
653
|
+
this._str = handlerTaskTag;
|
|
654
|
+
this._mgValue = new MgValue();
|
|
655
|
+
this._mgValue.str = calledTaskTag;
|
|
656
|
+
this._mgValue.path = inputControls;
|
|
657
|
+
this._boolVal = isDialog;
|
|
658
|
+
this.Invoke();
|
|
659
|
+
}
|
|
649
660
|
Invoke() {
|
|
650
661
|
GuiCommandQueue.getInstance().invoke();
|
|
651
662
|
if (this._obj2 instanceof ControlBase) {
|
|
@@ -1170,6 +1181,13 @@ class Commands {
|
|
|
1170
1181
|
}).then((res) => { returnValue = res; });
|
|
1171
1182
|
return returnValue;
|
|
1172
1183
|
}
|
|
1184
|
+
static async openOverlayForm(obj, formName, handlerTaskTag, calledTaskTag, inputControls, isDialog) {
|
|
1185
|
+
let guiInteractive = new GuiInteractive();
|
|
1186
|
+
await new Promise((resolve) => {
|
|
1187
|
+
this.SetResolveCallback(resolve);
|
|
1188
|
+
guiInteractive.ExecuteOpenOverlayForm(obj, formName, handlerTaskTag, calledTaskTag, inputControls, isDialog);
|
|
1189
|
+
}).then();
|
|
1190
|
+
}
|
|
1173
1191
|
static setTitle(topMostForm, title) {
|
|
1174
1192
|
let guiInteractive = new GuiInteractive();
|
|
1175
1193
|
guiInteractive.setTitle(topMostForm, title);
|
|
@@ -13696,14 +13714,14 @@ class MgFormBase extends GuiFormPropertyAdapter {
|
|
|
13696
13714
|
while (this.initInnerObjects(parser.getNextTag())) {
|
|
13697
13715
|
}
|
|
13698
13716
|
}
|
|
13699
|
-
init() {
|
|
13717
|
+
async init() {
|
|
13700
13718
|
for (let i = 0; i < this.CtrlTab.getSize(); i = i + 1) {
|
|
13701
13719
|
let ctrl = this.CtrlTab.getCtrl(i);
|
|
13702
13720
|
ctrl.Init();
|
|
13703
13721
|
}
|
|
13704
13722
|
this.buildLinkedControlsLists();
|
|
13705
13723
|
this.buildTableColumnsList();
|
|
13706
|
-
this.createForm();
|
|
13724
|
+
await this.createForm();
|
|
13707
13725
|
this._task.setKeyboardMappingState(Constants.ACT_STT_TBL_SCREEN_MODE, this.isScreenMode());
|
|
13708
13726
|
this._task.setKeyboardMappingState(Constants.ACT_STT_TBL_LEFT_TO_RIGHT, !this.GetComputedProperty(PropInterface.PROP_TYPE_HEBREW).GetComputedValueBoolean());
|
|
13709
13727
|
}
|
|
@@ -13749,10 +13767,12 @@ class MgFormBase extends GuiFormPropertyAdapter {
|
|
|
13749
13767
|
}
|
|
13750
13768
|
Events.WriteExceptionToLog('in Form.FillName() out of bounds');
|
|
13751
13769
|
}
|
|
13752
|
-
createForm() {
|
|
13770
|
+
async createForm() {
|
|
13753
13771
|
let inputControls = this.GetListOfInputControls();
|
|
13754
13772
|
let formName = this.buildFormName();
|
|
13755
|
-
if (
|
|
13773
|
+
if (this.isDialog())
|
|
13774
|
+
await Commands.openOverlayForm(this, formName, '0', this.getTask().getTaskTag(), inputControls, this.isDialog());
|
|
13775
|
+
else if (!this.isSubForm()) {
|
|
13756
13776
|
Commands.addOpenForm(this, formName, '0', this.getTask().getTaskTag(), inputControls, this.isDialog());
|
|
13757
13777
|
}
|
|
13758
13778
|
else {
|
|
@@ -15854,7 +15874,7 @@ class GuiTaskBase {
|
|
|
15854
15874
|
async InitForm() {
|
|
15855
15875
|
if (this.Form !== null && this.isOpenWin()) {
|
|
15856
15876
|
this.Form.InInitForm = true;
|
|
15857
|
-
this.Form.init();
|
|
15877
|
+
await this.Form.init();
|
|
15858
15878
|
this.SetRefreshType(Constants.TASK_REFRESH_FORM);
|
|
15859
15879
|
await this.RefreshDisplay();
|
|
15860
15880
|
Commands.beginInvoke();
|