@magic-xpa/gui 4.1100.0-dev4110.31 → 4.1100.0-dev4110.35

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.
@@ -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);
@@ -13711,14 +13729,14 @@ class MgFormBase extends GuiFormPropertyAdapter {
13711
13729
  while (this.initInnerObjects(parser.getNextTag())) {
13712
13730
  }
13713
13731
  }
13714
- init() {
13732
+ async init() {
13715
13733
  for (let i = 0; i < this.CtrlTab.getSize(); i = i + 1) {
13716
13734
  let ctrl = this.CtrlTab.getCtrl(i);
13717
13735
  ctrl.Init();
13718
13736
  }
13719
13737
  this.buildLinkedControlsLists();
13720
13738
  this.buildTableColumnsList();
13721
- this.createForm();
13739
+ await this.createForm();
13722
13740
  this._task.setKeyboardMappingState(Constants.ACT_STT_TBL_SCREEN_MODE, this.isScreenMode());
13723
13741
  this._task.setKeyboardMappingState(Constants.ACT_STT_TBL_LEFT_TO_RIGHT, !this.GetComputedProperty(PropInterface.PROP_TYPE_HEBREW).GetComputedValueBoolean());
13724
13742
  }
@@ -13764,10 +13782,12 @@ class MgFormBase extends GuiFormPropertyAdapter {
13764
13782
  }
13765
13783
  Events.WriteExceptionToLog('in Form.FillName() out of bounds');
13766
13784
  }
13767
- createForm() {
13785
+ async createForm() {
13768
13786
  let inputControls = this.GetListOfInputControls();
13769
13787
  let formName = this.buildFormName();
13770
- if (!this.isSubForm()) {
13788
+ if (this.isDialog())
13789
+ await Commands.openOverlayForm(this, formName, '0', this.getTask().getTaskTag(), inputControls, this.isDialog());
13790
+ else if (!this.isSubForm()) {
13771
13791
  Commands.addOpenForm(this, formName, '0', this.getTask().getTaskTag(), inputControls, this.isDialog());
13772
13792
  }
13773
13793
  else {
@@ -15871,7 +15891,7 @@ class GuiTaskBase {
15871
15891
  async InitForm() {
15872
15892
  if (this.Form !== null && this.isOpenWin()) {
15873
15893
  this.Form.InInitForm = true;
15874
- this.Form.init();
15894
+ await this.Form.init();
15875
15895
  this.SetRefreshType(Constants.TASK_REFRESH_FORM);
15876
15896
  await this.RefreshDisplay();
15877
15897
  Commands.beginInvoke();