@magic-xpa/gui 4.1000.0-dev4100.403 → 4.1000.0-dev4100.405

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() {
@@ -647,6 +648,16 @@ class GuiInteractiveBase {
647
648
  this.Invoke();
648
649
  return this.resultString;
649
650
  }
651
+ ExecuteOpenOverlayForm(obj, formName, handlerTaskTag, calledTaskTag, inputControls, isDialog) {
652
+ this._commandType = InteractiveCommandType.OPEN_FORM;
653
+ this.controlName = formName;
654
+ this._str = handlerTaskTag;
655
+ this._mgValue = new MgValue();
656
+ this._mgValue.str = calledTaskTag;
657
+ this._mgValue.path = inputControls;
658
+ this._boolVal = isDialog;
659
+ this.Invoke();
660
+ }
650
661
  Invoke() {
651
662
  GuiCommandQueue.getInstance().invoke();
652
663
  if (this._obj2 instanceof ControlBase) {
@@ -1172,6 +1183,13 @@ class Commands {
1172
1183
  }).then((res) => { returnValue = res; });
1173
1184
  return returnValue;
1174
1185
  }
1186
+ static async openOverlayForm(obj, formName, handlerTaskTag, calledTaskTag, inputControls, isDialog) {
1187
+ let guiInteractive = new GuiInteractive();
1188
+ await new Promise((resolve) => {
1189
+ this.SetResolveCallback(resolve);
1190
+ guiInteractive.ExecuteOpenOverlayForm(obj, formName, handlerTaskTag, calledTaskTag, inputControls, isDialog);
1191
+ }).then();
1192
+ }
1175
1193
  static setTitle(topMostForm, title) {
1176
1194
  let guiInteractive = new GuiInteractive();
1177
1195
  guiInteractive.setTitle(topMostForm, title);
@@ -13723,14 +13741,14 @@ class MgFormBase extends GuiFormPropertyAdapter {
13723
13741
  while (this.initInnerObjects(parser.getNextTag())) {
13724
13742
  }
13725
13743
  }
13726
- init() {
13744
+ async init() {
13727
13745
  for (let i = 0; i < this.CtrlTab.getSize(); i = i + 1) {
13728
13746
  let ctrl = this.CtrlTab.getCtrl(i);
13729
13747
  ctrl.Init();
13730
13748
  }
13731
13749
  this.buildLinkedControlsLists();
13732
13750
  this.buildTableColumnsList();
13733
- this.createForm();
13751
+ await this.createForm();
13734
13752
  this._task.setKeyboardMappingState(Constants.ACT_STT_TBL_SCREEN_MODE, this.isScreenMode());
13735
13753
  this._task.setKeyboardMappingState(Constants.ACT_STT_TBL_LEFT_TO_RIGHT, !this.GetComputedProperty(PropInterface.PROP_TYPE_HEBREW).GetComputedValueBoolean());
13736
13754
  }
@@ -13776,11 +13794,14 @@ class MgFormBase extends GuiFormPropertyAdapter {
13776
13794
  }
13777
13795
  Events.WriteExceptionToLog('in Form.FillName() out of bounds');
13778
13796
  }
13779
- createForm() {
13797
+ async createForm() {
13780
13798
  let inputControls = this.GetListOfInputControls();
13781
13799
  let formName = this.buildFormName();
13782
13800
  if (!this.isSubForm()) {
13783
- Commands.addOpenForm(this, formName, '0', this.getTask().getTaskTag(), inputControls, this.isDialog());
13801
+ if (this.isDialog())
13802
+ await Commands.openOverlayForm(this, formName, '0', this.getTask().getTaskTag(), inputControls, this.isDialog());
13803
+ else
13804
+ Commands.addOpenForm(this, formName, '0', this.getTask().getTaskTag(), inputControls, this.isDialog());
13784
13805
  }
13785
13806
  else {
13786
13807
  Commands.addOpensubform(CommandType.CREATE_SUB_FORM, this.getSubFormCtrl(), this.getTask().getTaskTag(), this.getSubFormCtrl().getName(), formName, inputControls, this.getTask().RouterPath, this.getTask().GetRouterParams(), this.getTask().InDefaultRouterOutlet);
@@ -15883,7 +15904,7 @@ class GuiTaskBase {
15883
15904
  async InitForm() {
15884
15905
  if (this.Form !== null && this.isOpenWin()) {
15885
15906
  this.Form.InInitForm = true;
15886
- this.Form.init();
15907
+ await this.Form.init();
15887
15908
  this.SetRefreshType(Constants.TASK_REFRESH_FORM);
15888
15909
  await this.RefreshDisplay();
15889
15910
  Commands.beginInvoke();