@magic-xpa/engine 4.1000.0-dev4100.99 → 4.1000.410-0.428

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.
Files changed (56) hide show
  1. package/esm2020/index.mjs +1 -1
  2. package/esm2020/src/ClientManager.mjs +17 -14
  3. package/esm2020/src/ConstInterface.mjs +2 -1
  4. package/esm2020/src/CurrentClientVersion.mjs +2 -2
  5. package/esm2020/src/GuiEventsProcessor.mjs +5 -5
  6. package/esm2020/src/commands/ClientToServer/DataviewCommand.mjs +6 -6
  7. package/esm2020/src/commands/ClientToServer/EvaluateCommand.mjs +4 -4
  8. package/esm2020/src/commands/ClientToServer/EventCommand.mjs +8 -8
  9. package/esm2020/src/commands/ClientToServer/ExecOperCommand.mjs +4 -4
  10. package/esm2020/src/commands/ClientToServer/IniputForceWriteCommand.mjs +5 -5
  11. package/esm2020/src/commands/ClientToServer/RecomputeCommand.mjs +7 -7
  12. package/esm2020/src/commands/ClientToServer/TransactionCommand.mjs +6 -6
  13. package/esm2020/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +8 -8
  14. package/esm2020/src/commands/ServerToClient/ResultCommand.mjs +7 -7
  15. package/esm2020/src/data/DataView.mjs +34 -34
  16. package/esm2020/src/data/DataviewManager.mjs +7 -7
  17. package/esm2020/src/data/Record.mjs +10 -10
  18. package/esm2020/src/data/TaskTransactionManager.mjs +4 -4
  19. package/esm2020/src/data/XMLBasedDcValuesBuilder.mjs +5 -5
  20. package/esm2020/src/env/Environment.mjs +14 -7
  21. package/esm2020/src/event/Event.mjs +4 -1
  22. package/esm2020/src/event/EventHandler.mjs +8 -3
  23. package/esm2020/src/event/EventHandlerPosition.mjs +5 -1
  24. package/esm2020/src/event/EventsManager.mjs +27 -5
  25. package/esm2020/src/event/IEventsManager.mjs +1 -1
  26. package/esm2020/src/event/RunTimeEvent.mjs +23 -16
  27. package/esm2020/src/exp/ExpressionEvaluator.mjs +8 -4
  28. package/esm2020/src/gui/FormsTable.mjs +8 -8
  29. package/esm2020/src/gui/MgControl.mjs +10 -13
  30. package/esm2020/src/gui/MgForm.mjs +9 -23
  31. package/esm2020/src/http/HttpManager.mjs +8 -8
  32. package/esm2020/src/remote/RemoteCommandsProcessor.mjs +34 -23
  33. package/esm2020/src/rt/DataviewHeaderBase.mjs +16 -16
  34. package/esm2020/src/security/UserDetails.mjs +12 -12
  35. package/esm2020/src/tasks/MGData.mjs +4 -4
  36. package/esm2020/src/tasks/RCTimer.mjs +10 -10
  37. package/esm2020/src/tasks/Task.mjs +43 -42
  38. package/esm2020/src/util/FlowMonitorQueue.mjs +107 -2
  39. package/esm2020/src/util/PrmMap.mjs +5 -5
  40. package/esm2020/src/util/ReturnResult.mjs +7 -7
  41. package/fesm2015/magic-xpa-engine.mjs +474 -326
  42. package/fesm2015/magic-xpa-engine.mjs.map +1 -1
  43. package/fesm2020/magic-xpa-engine.mjs +482 -329
  44. package/fesm2020/magic-xpa-engine.mjs.map +1 -1
  45. package/package.json +6 -6
  46. package/src/ConstInterface.d.ts +1 -0
  47. package/src/env/Environment.d.ts +2 -0
  48. package/src/event/EventsManager.d.ts +4 -0
  49. package/src/event/IEventsManager.d.ts +2 -0
  50. package/src/event/RunTimeEvent.d.ts +3 -0
  51. package/src/exp/ExpressionEvaluator.d.ts +1 -1
  52. package/src/gui/MgControl.d.ts +0 -1
  53. package/src/gui/MgForm.d.ts +1 -3
  54. package/src/remote/RemoteCommandsProcessor.d.ts +1 -0
  55. package/src/util/FlowMonitorQueue.d.ts +8 -0
  56. package/magic-xpa-engine.d.ts +0 -2
@@ -1,7 +1,7 @@
1
1
  import { __awaiter } from 'tslib';
2
2
  import { StringBuilder, Int32, NString, ApplicationException, NNumber, List, Debug, Char, RefParam, NumberStyles, HashUtils, DateTime, Dictionary, Stack, NChar, isNullOrUndefined, WebException, Thread, Encoding, Exception, isUndefined, Hashtable, NotImplementedException, Array_Enumerator, ISO_8859_1_Encoding, Int64 } from '@magic-xpa/mscorelib';
3
3
  import { XMLConstants, StorageAttribute, ViewRefreshMode, InternalInterface, Logger, StorageAttributeCheck, StrUtil, SubformType, TableBehaviour, MgControlType, ScrollBarThumbType, ForceExit, XmlParser, Misc, Base64, Priority, SyncExecutionHelper, Queue, Constants, DateTimeUtils, Logger_LogLevels, Logger_MessageDirection, MsgInterface, RequestInfo, OSEnvironment, JSON_Utils, UtilDateJpn, UtilStrByteMode, PICInterface, WindowType, BrkScope, RaiseAt, CtrlButtonTypeGui } from '@magic-xpa/utils';
4
- import { RecordUtils, GuiFieldBase, ExpVal, BlobType, FieldDef, GuiTaskBase, MgControlBase, PropInterface, GuiDataCollection, CommandType, Commands, HtmlProperties, ControlTable, Modifiers, KeyboardItem, TaskDefinitionIdTableSaxHandler, DisplayConvertor, MgTimer, GuiConstants, RuntimeContextBase, UsernamePasswordCredentials, Styles, Manager, NUM_TYPE, VectorType, GuiExpressionEvaluator, ExpressionInterface, PIC, DataModificationTypes, GuiDataViewBase, ObjectReferencesCollection, EMPTY_DCREF, ObjectReferenceBase, PropTable, FieldsTable as FieldsTable$1, DcValuesBuilderBase, MgFormBase, GuiEnvironment, TaskDefinitionId, Events, Helps, FocusManager, EventsProcessor, UIBridge } from '@magic-xpa/gui';
4
+ import { RecordUtils, GuiFieldBase, ExpVal, BlobType, FieldDef, GuiTaskBase, MgControlBase, PropInterface, GuiDataCollection, CommandType, Commands, HtmlProperties, ControlTable, Modifiers, KeyboardItem, TaskDefinitionIdTableSaxHandler, DisplayConvertor, VectorType, PIC, MgTimer, GuiConstants, RuntimeContextBase, UsernamePasswordCredentials, Styles, Manager, NUM_TYPE, GuiExpressionEvaluator, ExpressionInterface, DataModificationTypes, GuiDataViewBase, ObjectReferencesCollection, EMPTY_DCREF, ObjectReferenceBase, PropTable, FieldsTable as FieldsTable$1, DcValuesBuilderBase, MgFormBase, GuiEnvironment, TaskDefinitionId, Events, Helps, FocusManager, EventsProcessor, UIBridge } from '@magic-xpa/gui';
5
5
  import { HttpHeaders, HttpErrorResponse } from '@angular/common/http';
6
6
  import { timer, Subject } from 'rxjs';
7
7
 
@@ -272,6 +272,7 @@ ConstInterface.MG_ATTR_LOCAL_AS400SET = "local_as400set";
272
272
  ConstInterface.MG_ATTR_LOCAL_EXTRA_GENGO = "local_extraGengo";
273
273
  ConstInterface.MG_ATTR_LOCAL_FLAGS = "local_flags";
274
274
  ConstInterface.MG_ATTR_SPEACIAL_ANSI_EXP = "SpecialAnsiExpression";
275
+ ConstInterface.MG_ATTR_SPECIAL_IMMEDIATE_HANDLER_END = "SpecialImmediateHandlerEnd";
275
276
  ConstInterface.MG_ATTR_SPECIAL_SHOW_STATUSBAR_PANES = "SpecialShowStatusBarPanes";
276
277
  ConstInterface.MG_ATTR_SPECIAL_ROUTE_TO_ROOT_PROG_ON_CONTEXT_RECREATION = "SpecialRouteToRootProgramOnContextRecreation";
277
278
  ConstInterface.MG_ATTR_SPECIAL_SPECIAL_EDIT_LEFT_ALIGN = "SpecialEditLeftAlign";
@@ -642,13 +643,6 @@ class CommandSerializationHelper {
642
643
  }
643
644
 
644
645
  class EventCommand extends ClientOriginatedCommandTaskTag {
645
- constructor(magicEvent) {
646
- super();
647
- this.TaskTag = null;
648
- this.MagicEvent = 0;
649
- this.ClientRecId = 0;
650
- this.MagicEvent = magicEvent;
651
- }
652
646
  get CommandTypeAttribute() {
653
647
  return ConstInterface.MG_ATTR_VAL_EVENT;
654
648
  }
@@ -664,6 +658,13 @@ class EventCommand extends ClientOriginatedCommandTaskTag {
664
658
  return false;
665
659
  return true;
666
660
  }
661
+ constructor(magicEvent) {
662
+ super();
663
+ this.TaskTag = null;
664
+ this.MagicEvent = 0;
665
+ this.ClientRecId = 0;
666
+ this.MagicEvent = magicEvent;
667
+ }
667
668
  SerializeCommandData() {
668
669
  let helper = new CommandSerializationHelper();
669
670
  helper.SerializeTaskTag(this.TaskTag);
@@ -1203,15 +1204,6 @@ class OpeningTaskDetails {
1203
1204
  }
1204
1205
 
1205
1206
  class MgControl extends MgControlBase {
1206
- constructor(type, taskOrParentMgForm, parentControlOrParentControlIdx) {
1207
- if (arguments.length === 0)
1208
- super();
1209
- else if (arguments.length === 3 && (type === null || type.constructor === Number) && (taskOrParentMgForm === null || taskOrParentMgForm instanceof TaskBase) && (parentControlOrParentControlIdx === null || parentControlOrParentControlIdx.constructor === Number))
1210
- super(type, taskOrParentMgForm.getForm(), parentControlOrParentControlIdx);
1211
- else
1212
- super(type, taskOrParentMgForm, parentControlOrParentControlIdx);
1213
- this.initialize();
1214
- }
1215
1207
  initialize() {
1216
1208
  this._focusedStopExecution = false;
1217
1209
  this._inControlSuffix = false;
@@ -1224,6 +1216,15 @@ class MgControl extends MgControlBase {
1224
1216
  this.HasZoomHandler = false;
1225
1217
  this.ArgList = null;
1226
1218
  }
1219
+ constructor(type, taskOrParentMgForm, parentControlOrParentControlIdx) {
1220
+ if (arguments.length === 0)
1221
+ super();
1222
+ else if (arguments.length === 3 && (type === null || type.constructor === Number) && (taskOrParentMgForm === null || taskOrParentMgForm instanceof TaskBase) && (parentControlOrParentControlIdx === null || parentControlOrParentControlIdx.constructor === Number))
1223
+ super(type, taskOrParentMgForm.getForm(), parentControlOrParentControlIdx);
1224
+ else
1225
+ super(type, taskOrParentMgForm, parentControlOrParentControlIdx);
1226
+ this.initialize();
1227
+ }
1227
1228
  GetVarIndex() {
1228
1229
  return super.getForm().getTask().DataView.Dvcount + this.veeIndx;
1229
1230
  }
@@ -1548,14 +1549,6 @@ class MgControl extends MgControlBase {
1548
1549
  }
1549
1550
  });
1550
1551
  }
1551
- refreshAndSetItemsListForRadioButton(line, execComputeChoice) {
1552
- const _super = Object.create(null, {
1553
- refreshAndSetItemsListForRadioButton: { get: () => super.refreshAndSetItemsListForRadioButton }
1554
- });
1555
- return __awaiter(this, void 0, void 0, function* () {
1556
- yield _super.refreshAndSetItemsListForRadioButton.call(this, line, execComputeChoice);
1557
- });
1558
- }
1559
1552
  getSubformTask() {
1560
1553
  return this._subformTask;
1561
1554
  }
@@ -2924,6 +2917,9 @@ class Event {
2924
2917
  case InternalInterface.MG_ACT_INDEX_CHANGE:
2925
2918
  description = 'Index Change';
2926
2919
  break;
2920
+ case InternalInterface.MG_ACT_DUMP_ENVIRONMENT:
2921
+ description = 'Dump Environment';
2922
+ break;
2927
2923
  default:
2928
2924
  description = '';
2929
2925
  break;
@@ -3233,6 +3229,27 @@ class MgPriorityBlockingQueue {
3233
3229
  }
3234
3230
 
3235
3231
  class RunTimeEvent extends RunTimeEventBase {
3232
+ set ShouldHandleZoom(value) {
3233
+ this._shouldHandleZoom = value;
3234
+ }
3235
+ get ShouldHandleZoom() {
3236
+ return this._shouldHandleZoom;
3237
+ }
3238
+ set Control(value) {
3239
+ this._ctrl = value;
3240
+ }
3241
+ set DisplayLine(value) {
3242
+ this._displayLine = value;
3243
+ }
3244
+ get Control() {
3245
+ return this._ctrl;
3246
+ }
3247
+ get ControlsList() {
3248
+ return this._controlsList;
3249
+ }
3250
+ get Direction() {
3251
+ return this._direction;
3252
+ }
3236
3253
  constructor(taskRefOrCtrlRefOrTaskrefOrFldRefOrEvt, ctrlRefOrGuiTriggeredEventOrLineOrControlsListOrDirectionOrColumnHeaderOrRtEvtOrCurrentTask, ignoreSpecifiedControlOrGuiTriggeredEventOrLineOrXOrControlOrActivatedFromMDIFrame, yOrCtlIdx, width, height) {
3237
3254
  super();
3238
3255
  this._controlsList = null;
@@ -3261,6 +3278,7 @@ class RunTimeEvent extends RunTimeEventBase {
3261
3278
  this._task = null;
3262
3279
  this._taskTag = null;
3263
3280
  this._val = null;
3281
+ this._shouldHandleZoom = false;
3264
3282
  this.IgnoreSpecifiedControl = false;
3265
3283
  this.LastFocusedVal = null;
3266
3284
  if (arguments.length === 1 && (taskRefOrCtrlRefOrTaskrefOrFldRefOrEvt === null || taskRefOrCtrlRefOrTaskrefOrFldRefOrEvt instanceof TaskBase))
@@ -3294,21 +3312,6 @@ class RunTimeEvent extends RunTimeEventBase {
3294
3312
  else if (arguments.length === 1 && taskRefOrCtrlRefOrTaskrefOrFldRefOrEvt instanceof RunTimeEvent)
3295
3313
  Object.assign(this, taskRefOrCtrlRefOrTaskrefOrFldRefOrEvt);
3296
3314
  }
3297
- set Control(value) {
3298
- this._ctrl = value;
3299
- }
3300
- set DisplayLine(value) {
3301
- this._displayLine = value;
3302
- }
3303
- get Control() {
3304
- return this._ctrl;
3305
- }
3306
- get ControlsList() {
3307
- return this._controlsList;
3308
- }
3309
- get Direction() {
3310
- return this._direction;
3311
- }
3312
3315
  constructor_5(taskRef) {
3313
3316
  this.init(taskRef);
3314
3317
  }
@@ -3638,7 +3641,17 @@ class FlowMonitorQueue {
3638
3641
  this._isRecompute = false;
3639
3642
  this._isTask = false;
3640
3643
  this._isTaskFlow = false;
3644
+ this._isDataView = false;
3641
3645
  this.ShouldSerialize = false;
3646
+ this.padRight = (string, length, character = ' ') => {
3647
+ let result = "";
3648
+ let totalLength = length - string.length;
3649
+ for (let i = 0; i < totalLength; i++) {
3650
+ result = character + result;
3651
+ }
3652
+ result = result + string;
3653
+ return result;
3654
+ };
3642
3655
  }
3643
3656
  static get Instance() {
3644
3657
  if (FlowMonitorQueue._instance === null)
@@ -3696,6 +3709,9 @@ class FlowMonitorQueue {
3696
3709
  case ConstInterface.MG_ATTR_TASKFLW:
3697
3710
  this._isTaskFlow = XmlParser.getBoolean(valueStr);
3698
3711
  break;
3712
+ case ConstInterface.MG_TAG_DATAVIEW:
3713
+ this._isDataView = XmlParser.getBoolean(valueStr);
3714
+ break;
3699
3715
  case ConstInterface.MG_ATTR_RECOMP:
3700
3716
  this._isRecompute = XmlParser.getBoolean(valueStr);
3701
3717
  break;
@@ -3753,6 +3769,96 @@ class FlowMonitorQueue {
3753
3769
  Logger.Instance.WriteSupportToLog(taskInfo + ": " + info, true);
3754
3770
  }
3755
3771
  }
3772
+ appendVirtualsAndParameters(currentValues) {
3773
+ let act = new ActivityItem(this, FlowMonitorQueue.ACT_TASK_FLW, InternalInterface.MG_ACT_REC_PREFIX);
3774
+ act.setInfo(currentValues);
3775
+ this._queue.put(act);
3776
+ }
3777
+ addDataViewFlow(task) {
3778
+ if (this._isDataView) {
3779
+ let fldTab = task.DataView.GetFieldsTab();
3780
+ let preparedDisplayString = "";
3781
+ let finaldisplayData = "\n";
3782
+ let fldValue;
3783
+ let data = "";
3784
+ for (let i = 0; i < fldTab.getSize(); i++) {
3785
+ let fldDef = fldTab.getField(i);
3786
+ if (!fldDef.IsEventHandlerField && (fldDef.IsVirtual && !fldDef.VirAsReal) || fldDef.isParam()) {
3787
+ fldValue = fldDef.isNull() ? fldDef.getNullValue() : fldDef.getValue(true);
3788
+ data = this.getFieldData(fldDef.getType(), fldValue, fldDef.getPicture(), fldDef.getCellsType(), task);
3789
+ preparedDisplayString = this.PrepareDisplayString(fldDef.isParam(), fldDef.getVarName(), data, true);
3790
+ finaldisplayData = finaldisplayData + preparedDisplayString + "\n";
3791
+ }
3792
+ }
3793
+ this.appendVirtualsAndParameters(finaldisplayData);
3794
+ }
3795
+ }
3796
+ getFieldData(Storagetype, data, picture, vecCellType, task) {
3797
+ switch (Storagetype) {
3798
+ case StorageAttribute.DOTNET:
3799
+ data = FlowMonitorQueue.UNPRINTABLE_STR_LOG;
3800
+ break;
3801
+ case StorageAttribute.BLOB:
3802
+ {
3803
+ if (BlobType.isValidBlob(data)) {
3804
+ let contentType = BlobType.getContentType(data);
3805
+ if (contentType == BlobType.CONTENT_TYPE_ANSI || contentType == BlobType.CONTENT_TYPE_UNICODE)
3806
+ data = data != null ? BlobType.getString(data) : "";
3807
+ else
3808
+ data = FlowMonitorQueue.UNPRINTABLE_STR_LOG;
3809
+ }
3810
+ else
3811
+ data = "";
3812
+ }
3813
+ break;
3814
+ case StorageAttribute.NUMERIC:
3815
+ case StorageAttribute.DATE:
3816
+ case StorageAttribute.TIME:
3817
+ let conv = DisplayConvertor.Instance;
3818
+ data = conv.mg2disp(data, " ", new PIC(picture, Storagetype, task.getCompIdx()), false, task.getCompIdx(), false);
3819
+ break;
3820
+ case StorageAttribute.BLOB_VECTOR:
3821
+ let vecOutData;
3822
+ if (data == null) {
3823
+ vecOutData = "[]";
3824
+ }
3825
+ else {
3826
+ let cellAtt = vecCellType;
3827
+ let vector = new VectorType(data);
3828
+ if (cellAtt == StorageAttribute.BLOB && !VectorType.validateBlobContents(data))
3829
+ vecOutData = "[]";
3830
+ else {
3831
+ let vecSize = VectorType.getVecSize(data);
3832
+ let cellPicture = (cellAtt == StorageAttribute.NUMERIC || cellAtt == StorageAttribute.DATE || cellAtt == StorageAttribute.TIME) ? PIC.buildPicture(cellAtt, vector.getVecCell(1), task.getCompIdx(), true).getFormat() : picture;
3833
+ vecOutData = "[";
3834
+ for (let i = 0; i < vecSize; i++) {
3835
+ vecOutData += this.getFieldData(cellAtt, vector.getVecCell(i + 1), cellPicture, vecCellType, task);
3836
+ vecOutData += i < vecSize - 1 ? "," : "]";
3837
+ }
3838
+ }
3839
+ }
3840
+ data = vecOutData;
3841
+ break;
3842
+ case StorageAttribute.BOOLEAN:
3843
+ data = data == "1" ? "TRUE" : "FALSE";
3844
+ break;
3845
+ }
3846
+ return data;
3847
+ }
3848
+ PrepareDisplayString(mode, name, valueContent, addDoubleQuotes) {
3849
+ let str = "";
3850
+ let finalStringToDisplay = "";
3851
+ if (addDoubleQuotes)
3852
+ finalStringToDisplay = finalStringToDisplay + "\"";
3853
+ finalStringToDisplay = finalStringToDisplay + name;
3854
+ if (addDoubleQuotes)
3855
+ finalStringToDisplay = finalStringToDisplay + "\"";
3856
+ let paddedName = this.padRight(name, 34);
3857
+ let formatOfStringVirtual = `Virtual`;
3858
+ let formatOfStringParameter = `Parameter`;
3859
+ str = (mode ? formatOfStringParameter : formatOfStringVirtual) + " : " + `${paddedName}` + " : " + `${valueContent.trim()}`;
3860
+ return str;
3861
+ }
3756
3862
  addTaskFlowRec(id, state, taskInfo) {
3757
3863
  if (this._enabled && this._isTaskFlow) {
3758
3864
  let info;
@@ -3919,6 +4025,7 @@ class FlowMonitorQueue {
3919
4025
  }
3920
4026
  }
3921
4027
  FlowMonitorQueue._instance = null;
4028
+ FlowMonitorQueue.UNPRINTABLE_STR_LOG = "#UNPRINTABLE#";
3922
4029
  FlowMonitorQueue.S_EVENT_STR1 = ">>Starts ";
3923
4030
  FlowMonitorQueue.S_EVENT_STR2 = " Event";
3924
4031
  FlowMonitorQueue.S_EVENT_PROPAGATED = "Event was propagated";
@@ -3980,6 +4087,15 @@ class TimerObjectCollection {
3980
4087
  }
3981
4088
  TimerObjectCollection.MgDataToTimerObjList = new Dictionary();
3982
4089
  class RCTimer extends MgTimer {
4090
+ get TimerIntervalMiliSeconds() {
4091
+ return this._timerIntervalMilliSeconds;
4092
+ }
4093
+ set IsIdleTimer(value) {
4094
+ this._isIdle = value;
4095
+ }
4096
+ get IsIdleTimer() {
4097
+ return this._isIdle;
4098
+ }
3983
4099
  constructor(mgData, milliseconds, isIdle) {
3984
4100
  super(milliseconds);
3985
4101
  this._mgData = null;
@@ -3991,15 +4107,6 @@ class RCTimer extends MgTimer {
3991
4107
  TimerObjectCollection.MgDataToTimerObjList.Add(mgDataId, new List());
3992
4108
  TimerObjectCollection.MgDataToTimerObjList.get_Item(mgDataId).push(this);
3993
4109
  }
3994
- get TimerIntervalMiliSeconds() {
3995
- return this._timerIntervalMilliSeconds;
3996
- }
3997
- set IsIdleTimer(value) {
3998
- this._isIdle = value;
3999
- }
4000
- get IsIdleTimer() {
4001
- return this._isIdle;
4002
- }
4003
4110
  GetMgdata() {
4004
4111
  return this._mgData;
4005
4112
  }
@@ -4145,6 +4252,9 @@ class ExecutionStack {
4145
4252
  }
4146
4253
 
4147
4254
  class ExecOperCommand extends ClientOriginatedCommandTaskTag {
4255
+ get CommandTypeAttribute() {
4256
+ return ConstInterface.MG_ATTR_VAL_EXEC_OPER;
4257
+ }
4148
4258
  constructor() {
4149
4259
  super();
4150
4260
  this.ExecutionStack = null;
@@ -4158,9 +4268,6 @@ class ExecOperCommand extends ClientOriginatedCommandTaskTag {
4158
4268
  this.CheckOnly = false;
4159
4269
  this.DitIdx = Int32.MinValue;
4160
4270
  }
4161
- get CommandTypeAttribute() {
4162
- return ConstInterface.MG_ATTR_VAL_EXEC_OPER;
4163
- }
4164
4271
  SerializeCommandData() {
4165
4272
  let helper = new CommandSerializationHelper();
4166
4273
  let execStackExists = this.ExecutionStack !== null && !this.ExecutionStack.empty();
@@ -4641,13 +4748,6 @@ class HttpClientAsync extends HttpClientBase {
4641
4748
  }
4642
4749
 
4643
4750
  class HttpManager {
4644
- constructor() {
4645
- this._httpCommunicationTimeoutMS = HttpManager.DEFAULT_HTTP_COMMUNICATION_TIMEOUT;
4646
- this._httpClientAsync = null;
4647
- this._isAbortingMagicEngine = false;
4648
- this._httpClientAsync = new HttpClientAsync(HttpManager._nativeHttpClient);
4649
- this.RegisterBasicDelegates();
4650
- }
4651
4751
  getHttpClient() {
4652
4752
  if (this.IsAbortingMagicEngine)
4653
4753
  return new HttpClientSync();
@@ -4667,6 +4767,13 @@ class HttpManager {
4667
4767
  }
4668
4768
  get IsAbortingMagicEngine() { return this._isAbortingMagicEngine; }
4669
4769
  set IsAbortingMagicEngine(isAbortingMagicEngine) { this._isAbortingMagicEngine = isAbortingMagicEngine; }
4770
+ constructor() {
4771
+ this._httpCommunicationTimeoutMS = HttpManager.DEFAULT_HTTP_COMMUNICATION_TIMEOUT;
4772
+ this._httpClientAsync = null;
4773
+ this._isAbortingMagicEngine = false;
4774
+ this._httpClientAsync = new HttpClientAsync(HttpManager._nativeHttpClient);
4775
+ this.RegisterBasicDelegates();
4776
+ }
4670
4777
  RegisterBasicDelegates() {
4671
4778
  HttpClientEvents.GetHttpCommunicationTimeout_Event = this.GetHttpCommunicationTimeoutMS.bind(this);
4672
4779
  }
@@ -5224,6 +5331,12 @@ var RequestStatus;
5224
5331
  RequestStatus[RequestStatus["Abort"] = 2] = "Abort";
5225
5332
  })(RequestStatus || (RequestStatus = {}));
5226
5333
  class RemoteCommandsProcessor extends CommandsProcessorBase {
5334
+ static GetInstance() {
5335
+ if (RemoteCommandsProcessor._instance === null) {
5336
+ RemoteCommandsProcessor._instance = new RemoteCommandsProcessor();
5337
+ }
5338
+ return RemoteCommandsProcessor._instance;
5339
+ }
5227
5340
  constructor() {
5228
5341
  super();
5229
5342
  this._lastRequestTime = 0;
@@ -5234,12 +5347,6 @@ class RemoteCommandsProcessor extends CommandsProcessorBase {
5234
5347
  HttpManager.GetInstance();
5235
5348
  this.RegisterDelegates();
5236
5349
  }
5237
- static GetInstance() {
5238
- if (RemoteCommandsProcessor._instance === null) {
5239
- RemoteCommandsProcessor._instance = new RemoteCommandsProcessor();
5240
- }
5241
- return RemoteCommandsProcessor._instance;
5242
- }
5243
5350
  CheckAndSetSessionCounter(newSessionCounter) {
5244
5351
  if (newSessionCounter === ConstInterface.SESSION_COUNTER_CLOSE_CTX_INDICATION) {
5245
5352
  Debug.Assert(this.GetSessionCounter() === ConstInterface.SESSION_COUNTER_CLOSE_CTX_INDICATION);
@@ -5697,12 +5804,23 @@ class RemoteCommandsProcessor extends CommandsProcessorBase {
5697
5804
  }
5698
5805
  }
5699
5806
  }
5700
- window.localStorage.clear();
5807
+ this.clearLocalStorage();
5701
5808
  throw ex;
5702
5809
  }
5703
5810
  return response;
5704
5811
  });
5705
5812
  }
5813
+ clearLocalStorage() {
5814
+ window.localStorage.removeItem(ConstInterface.LAST_ROUTE_EVENT);
5815
+ window.localStorage.removeItem(ConstInterface.LAST_ROUTE_EVENT_SRC_TSK);
5816
+ window.localStorage.removeItem(ConstInterface.LAST_ROUTE_EVENT_ARG_LIST);
5817
+ window.localStorage.removeItem(ConstInterface.IS_SESSION_REINITIALIZING);
5818
+ window.localStorage.removeItem(ConstInterface.MAIN_PROG_VIEW);
5819
+ window.localStorage.removeItem(ConstInterface.GLOBAL_PARAM_LIST);
5820
+ window.localStorage.removeItem(ConstInterface.ENV_VAR_LIST);
5821
+ window.localStorage.removeItem(ConstInterface.LAST_EXCEPTION);
5822
+ window.localStorage.removeItem(ConstInterface.CTX_REMOVED_FROM_SRVR);
5823
+ }
5706
5824
  HandleErrorResponse(response) {
5707
5825
  try {
5708
5826
  Logger.Instance.WriteServerMessagesToLog("MESSAGE FROM SERVER: " + response);
@@ -5916,21 +6034,6 @@ RemoteCommandsProcessor.InitialUrl = null;
5916
6034
  RemoteCommandsProcessor.WEB_COMMUNICATION_PROTOCOL_VERSION = "14002";
5917
6035
  RemoteCommandsProcessor._shouldScrambleAndUnscrambleMessages = false;
5918
6036
  class HandshakeResponse {
5919
- constructor(responseXML) {
5920
- this._scrambleMessages = true;
5921
- this._contextId = null;
5922
- this._privateSessionId = null;
5923
- this._inputPassword = false;
5924
- this._httpTimeout = 0;
5925
- this._systemLogin = null;
5926
- this._maxInternalLogLevel = null;
5927
- try {
5928
- JSON_Utils.JSONFromXML(responseXML, this.FillFromJSON.bind(this));
5929
- }
5930
- catch (ex) {
5931
- Logger.Instance.WriteExceptionToLog(ex, responseXML);
5932
- }
5933
- }
5934
6037
  get ScrambleMessages() {
5935
6038
  return this._scrambleMessages;
5936
6039
  }
@@ -5952,6 +6055,21 @@ class HandshakeResponse {
5952
6055
  get MaxInternalLogLevel() {
5953
6056
  return this._maxInternalLogLevel;
5954
6057
  }
6058
+ constructor(responseXML) {
6059
+ this._scrambleMessages = true;
6060
+ this._contextId = null;
6061
+ this._privateSessionId = null;
6062
+ this._inputPassword = false;
6063
+ this._httpTimeout = 0;
6064
+ this._systemLogin = null;
6065
+ this._maxInternalLogLevel = null;
6066
+ try {
6067
+ JSON_Utils.JSONFromXML(responseXML, this.FillFromJSON.bind(this));
6068
+ }
6069
+ catch (ex) {
6070
+ Logger.Instance.WriteExceptionToLog(ex, responseXML);
6071
+ }
6072
+ }
5955
6073
  FillFromJSON(error, result) {
5956
6074
  if (error != null) {
5957
6075
  throw error;
@@ -7525,6 +7643,9 @@ class EventHandlerPosition {
7525
7643
  case InternalInterface.MG_ACT_REC_SUFFIX:
7526
7644
  case InternalInterface.MG_ACT_CTRL_PREFIX:
7527
7645
  case InternalInterface.MG_ACT_CTRL_SUFFIX: {
7646
+ if (this._rtEvt.getInternalCode() == InternalInterface.MG_ACT_REC_PREFIX) {
7647
+ FlowMonitorQueue.Instance.addDataViewFlow(this._task);
7648
+ }
7528
7649
  if (this._handlerIdx === -1) {
7529
7650
  for (this._handlerIdx = this._handlersTab.getSize() - 1; this._handlerIdx >= 0; this._handlerIdx--) {
7530
7651
  let handler = this._handlersTab.getHandler(this._handlerIdx);
@@ -7690,11 +7811,6 @@ var DataViewCommandType;
7690
7811
  DataViewCommandType[DataViewCommandType["SQLExecute"] = 20] = "SQLExecute";
7691
7812
  })(DataViewCommandType || (DataViewCommandType = {}));
7692
7813
  class DataviewCommand extends ClientOriginatedCommandTaskTag {
7693
- constructor() {
7694
- super();
7695
- this.CommandType = 0;
7696
- this.TaskTag = null;
7697
- }
7698
7814
  get CommandTypeAttribute() {
7699
7815
  throw new NotImplementedException();
7700
7816
  }
@@ -7705,6 +7821,11 @@ class DataviewCommand extends ClientOriginatedCommandTaskTag {
7705
7821
  get ShouldSerialize() {
7706
7822
  return false;
7707
7823
  }
7824
+ constructor() {
7825
+ super();
7826
+ this.CommandType = 0;
7827
+ this.TaskTag = null;
7828
+ }
7708
7829
  }
7709
7830
 
7710
7831
  class AddUserRangeDataviewCommand extends DataviewCommand {
@@ -7926,12 +8047,6 @@ class NonReversibleExitEventCommand extends EventCommand {
7926
8047
  }
7927
8048
 
7928
8049
  class RecomputeCommand extends ClientOriginatedCommandTaskTag {
7929
- constructor() {
7930
- super();
7931
- this.TaskTag = null;
7932
- this.FldId = 0;
7933
- this.IgnoreSubformRecompute = false;
7934
- }
7935
8050
  get CommandTypeAttribute() {
7936
8051
  return ConstInterface.MG_ATTR_VAL_RECOMP;
7937
8052
  }
@@ -7943,17 +8058,18 @@ class RecomputeCommand extends ClientOriginatedCommandTaskTag {
7943
8058
  helper.SerializeAttribute(ConstInterface.MG_ATTR_IGNORE_SUBFORM_RECOMPUTE, '1');
7944
8059
  return helper.GetString();
7945
8060
  }
8061
+ constructor() {
8062
+ super();
8063
+ this.TaskTag = null;
8064
+ this.FldId = 0;
8065
+ this.IgnoreSubformRecompute = false;
8066
+ }
7946
8067
  getCommandInfo() {
7947
8068
  return NString.Format('[{0} in {1} for Field {2}]', this.CommandTypeAttribute.charAt(0).toUpperCase() + this.CommandTypeAttribute.substr(1, this.CommandTypeAttribute.length), this.Task.getTaskInfo(), this.Task.getFieldDef(this.FldId).getName());
7948
8069
  }
7949
8070
  }
7950
8071
 
7951
8072
  class TransactionCommand extends ClientOriginatedCommandTaskTag {
7952
- constructor() {
7953
- super();
7954
- this.TaskTag = null;
7955
- this.ReversibleExit = false;
7956
- }
7957
8073
  get CommandTypeAttribute() {
7958
8074
  return ConstInterface.MG_ATTR_VAL_TRANS;
7959
8075
  }
@@ -7967,6 +8083,11 @@ class TransactionCommand extends ClientOriginatedCommandTaskTag {
7967
8083
  helper.SerializeAttribute(ConstInterface.MG_ATTR_TRANS_LEVEL, this.Level);
7968
8084
  return helper.GetString();
7969
8085
  }
8086
+ constructor() {
8087
+ super();
8088
+ this.TaskTag = null;
8089
+ this.ReversibleExit = false;
8090
+ }
7970
8091
  getCommandInfo() {
7971
8092
  return NString.Format('[{0} in {1}]', this.Oper === 'C' ? 'Commit Transaction' : 'Abort Transaction', this.Task.getTaskInfo());
7972
8093
  }
@@ -7985,6 +8106,9 @@ class UnloadCommand extends ClientOriginatedCommand {
7985
8106
  }
7986
8107
 
7987
8108
  class EvaluateCommand extends ClientOriginatedCommandTaskTag {
8109
+ get CommandTypeAttribute() {
8110
+ return ConstInterface.MG_ATTR_VAL_EVAL;
8111
+ }
7988
8112
  constructor() {
7989
8113
  super();
7990
8114
  this.TaskTag = null;
@@ -7993,9 +8117,6 @@ class EvaluateCommand extends ClientOriginatedCommandTaskTag {
7993
8117
  this.MprgCreator = null;
7994
8118
  this.LengthExpVal = Int32.MinValue;
7995
8119
  }
7996
- get CommandTypeAttribute() {
7997
- return ConstInterface.MG_ATTR_VAL_EVAL;
7998
- }
7999
8120
  SerializeCommandData() {
8000
8121
  let helper = new CommandSerializationHelper();
8001
8122
  helper.SerializeTaskTag(this.TaskTag);
@@ -8043,10 +8164,6 @@ class GlobalParamsQueryCommand extends QueryCommand {
8043
8164
  }
8044
8165
 
8045
8166
  class IniputForceWriteCommand extends ClientOriginatedCommand {
8046
- constructor() {
8047
- super();
8048
- this.Text = null;
8049
- }
8050
8167
  get CommandTypeAttribute() {
8051
8168
  return ConstInterface.MG_ATTR_VAL_INIPUT_FORCE_WRITE;
8052
8169
  }
@@ -8056,6 +8173,10 @@ class IniputForceWriteCommand extends ClientOriginatedCommand {
8056
8173
  SerializeCommandData() {
8057
8174
  return " " + ConstInterface.MG_ATTR_VAL_INIPUT_PARAM + "=\"" + XmlParser.escape(this.Text) + "\"";
8058
8175
  }
8176
+ constructor() {
8177
+ super();
8178
+ this.Text = null;
8179
+ }
8059
8180
  getCommandInfo() {
8060
8181
  return NString.Format('[{0} with {1}] ', this.CommandTypeAttribute, this.Text);
8061
8182
  }
@@ -8355,10 +8476,6 @@ var ParamParseResult;
8355
8476
  })(ParamParseResult || (ParamParseResult = {}));
8356
8477
 
8357
8478
  class PrmMap {
8358
- constructor() {
8359
- this.values = null;
8360
- this.values = new Dictionary();
8361
- }
8362
8479
  getvalue(s) {
8363
8480
  if (this.values.ContainsKey(s))
8364
8481
  return this.values.get_Item(s);
@@ -8371,6 +8488,10 @@ class PrmMap {
8371
8488
  remove(s) {
8372
8489
  this.values.Remove(s);
8373
8490
  }
8491
+ constructor() {
8492
+ this.values = null;
8493
+ this.values = new Dictionary();
8494
+ }
8374
8495
  }
8375
8496
  class MirrorPrmMap extends PrmMap {
8376
8497
  constructor(type) {
@@ -8526,6 +8647,7 @@ class Environment {
8526
8647
  this._debugMode = 0;
8527
8648
  this._significantNumSize = 0;
8528
8649
  this._specialAnsiExpression = false;
8650
+ this._specialImmediatehandlerEnd = false;
8529
8651
  this._specialShowStatusBarPanes = false;
8530
8652
  this._specialRouteToRootProgOnContextRecreation = false;
8531
8653
  this._specialCancelOnCreate = false;
@@ -8679,6 +8801,9 @@ class Environment {
8679
8801
  case ConstInterface.MG_ATTR_LOCAL_FLAGS:
8680
8802
  this._localFlags = valueStr;
8681
8803
  break;
8804
+ case ConstInterface.MG_ATTR_SPECIAL_IMMEDIATE_HANDLER_END:
8805
+ this._specialImmediatehandlerEnd = XmlParser.getBoolean(valueStr);
8806
+ break;
8682
8807
  case ConstInterface.MG_ATTR_SPEACIAL_ANSI_EXP:
8683
8808
  this._specialAnsiExpression = XmlParser.getBoolean(valueStr);
8684
8809
  break;
@@ -8885,6 +9010,9 @@ class Environment {
8885
9010
  GetLocalFlag(f) {
8886
9011
  return this._localFlags !== null && this._localFlags.indexOf(f) >= 0;
8887
9012
  }
9013
+ getSpecialImmediateHandlerEnd() {
9014
+ return this._specialImmediatehandlerEnd;
9015
+ }
8888
9016
  getSpecialAnsiExpression() {
8889
9017
  return this._specialAnsiExpression;
8890
9018
  }
@@ -8954,6 +9082,12 @@ class Environment {
8954
9082
  }
8955
9083
  Environment.Instance = new Environment();
8956
9084
  class EnvironmentDetails {
9085
+ set UpdateInQueryMode(value) {
9086
+ this._updateInQueryMode = value;
9087
+ }
9088
+ set CreateInModifyMode(value) {
9089
+ this._createInModifyMode = value;
9090
+ }
8957
9091
  constructor() {
8958
9092
  this._createInModifyMode = false;
8959
9093
  this._updateInQueryMode = false;
@@ -8964,12 +9098,6 @@ class EnvironmentDetails {
8964
9098
  this.ProjDir = null;
8965
9099
  this.CompIdx = 0;
8966
9100
  }
8967
- set UpdateInQueryMode(value) {
8968
- this._updateInQueryMode = value;
8969
- }
8970
- set CreateInModifyMode(value) {
8971
- this._createInModifyMode = value;
8972
- }
8973
9101
  allowUpdateInQueryMode() {
8974
9102
  return this._updateInQueryMode;
8975
9103
  }
@@ -9057,17 +9185,6 @@ class GlobalParams extends MirrorPrmMap {
9057
9185
  GlobalParams.Instance = new GlobalParams();
9058
9186
 
9059
9187
  class UserDetails {
9060
- constructor() {
9061
- this.UserName = null;
9062
- this.UserID = null;
9063
- this.UserInfo = null;
9064
- this.Password = null;
9065
- this.IsLoggedIn = false;
9066
- this.UserName = NString.Empty;
9067
- this.UserInfo = NString.Empty;
9068
- this.IsLoggedIn = false;
9069
- this.setUserID(NString.Empty);
9070
- }
9071
9188
  setIsLoggedIn(value) {
9072
9189
  this.IsLoggedIn = value;
9073
9190
  }
@@ -9087,6 +9204,17 @@ class UserDetails {
9087
9204
  UserDetails._instance = new UserDetails();
9088
9205
  return UserDetails._instance;
9089
9206
  }
9207
+ constructor() {
9208
+ this.UserName = null;
9209
+ this.UserID = null;
9210
+ this.UserInfo = null;
9211
+ this.Password = null;
9212
+ this.IsLoggedIn = false;
9213
+ this.UserName = NString.Empty;
9214
+ this.UserInfo = NString.Empty;
9215
+ this.IsLoggedIn = false;
9216
+ this.setUserID(NString.Empty);
9217
+ }
9090
9218
  fillData(parser) {
9091
9219
  let tokensVector;
9092
9220
  let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_TERM, parser.getCurrIndex());
@@ -11891,7 +12019,7 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
11891
12019
  Exp_params = new Array(nArgs);
11892
12020
  for (j = 0; j < nArgs; j++)
11893
12021
  Exp_params[nArgs - 1 - j] = valStack.pop();
11894
- this.eval_op_CallJS(this.ExpTask, valStack.pop().StrVal, Exp_params, resVal);
12022
+ yield this.eval_op_CallJS(this.ExpTask, valStack.pop().StrVal, Exp_params, resVal);
11895
12023
  }
11896
12024
  break;
11897
12025
  case ExpressionInterface.EXP_OP_SET_COOKIE:
@@ -14310,18 +14438,24 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
14310
14438
  });
14311
14439
  }
14312
14440
  eval_op_CallJS(task, methodName, expVal, resVal) {
14313
- resVal.Attr = StorageAttribute.ALPHA;
14314
- resVal.StrVal = '';
14315
- if (task.isMainProg()) {
14316
- console.error("CallJS cannot be used in Main Program");
14317
- return;
14318
- }
14319
- let form = task.getForm();
14320
- let args = this.params2arguments(expVal, 0, expVal.length);
14321
- if (!isNullOrUndefined(args)) {
14322
- resVal.StrVal = Commands.addCallJS(form, form.UniqueName, methodName, args);
14441
+ return __awaiter(this, void 0, void 0, function* () {
14323
14442
  resVal.Attr = StorageAttribute.ALPHA;
14324
- }
14443
+ resVal.StrVal = '';
14444
+ if (task.isMainProg()) {
14445
+ console.error("CallJS cannot be used in Main Program");
14446
+ return;
14447
+ }
14448
+ let form = task.getForm();
14449
+ let args = this.params2arguments(expVal, 0, expVal.length);
14450
+ if (!isNullOrUndefined(args)) {
14451
+ if (task.isFirstRecordCycle()) {
14452
+ Commands.invoke();
14453
+ yield Thread.Sleep(10);
14454
+ }
14455
+ resVal.StrVal = Commands.addCallJS(form, form.UniqueName, methodName, args);
14456
+ resVal.Attr = StorageAttribute.ALPHA;
14457
+ }
14458
+ });
14325
14459
  }
14326
14460
  eval_op_set_cookie(cookieName, expVal, resVal) {
14327
14461
  resVal.Attr = StorageAttribute.BOOLEAN;
@@ -14627,6 +14761,12 @@ class DataViewBase extends GuiDataViewBase {
14627
14761
  }
14628
14762
 
14629
14763
  class Record {
14764
+ get InCompute() {
14765
+ return this._inCompute;
14766
+ }
14767
+ get InRecompute() {
14768
+ return this._inRecompute;
14769
+ }
14630
14770
  constructor(dvOrTableCacheOrCIdOrRecord, dataview) {
14631
14771
  this._id = Int32.MinValue;
14632
14772
  this.dbViewRowIdx = 0;
@@ -14644,12 +14784,6 @@ class Record {
14644
14784
  else
14645
14785
  this.constructor_1(dvOrTableCacheOrCIdOrRecord, dataview);
14646
14786
  }
14647
- get InCompute() {
14648
- return this._inCompute;
14649
- }
14650
- get InRecompute() {
14651
- return this._inRecompute;
14652
- }
14653
14787
  constructor_0(dvOrTableCache) {
14654
14788
  if (dvOrTableCache instanceof DataViewBase)
14655
14789
  this._dataview = dvOrTableCache;
@@ -15445,14 +15579,14 @@ Record.FLAG_MODIFIED_ATLEAST_ONCE = (0x40);
15445
15579
  Record.INCREASE = true;
15446
15580
  Record.DECREASE = false;
15447
15581
  class DcValuesReference extends ObjectReferenceBase {
15582
+ get DcValues() {
15583
+ return this.Referent;
15584
+ }
15448
15585
  constructor(controlId, referencedDcValues) {
15449
15586
  super(referencedDcValues);
15450
15587
  this.ditIdx = 0;
15451
15588
  this.ditIdx = controlId;
15452
15589
  }
15453
- get DcValues() {
15454
- return this.Referent;
15455
- }
15456
15590
  Clone() {
15457
15591
  return new DcValuesReference(this.ditIdx, this.Referent);
15458
15592
  }
@@ -15728,21 +15862,6 @@ class RecordsTable {
15728
15862
  RecordsTable.REC_NOT_FOUND = -1;
15729
15863
 
15730
15864
  class DataviewHeaderBase {
15731
- constructor(task) {
15732
- this._cond = null;
15733
- this._task = null;
15734
- this.Loc = null;
15735
- this._dir = '\0';
15736
- this._id = 0;
15737
- this._keyIdx = 0;
15738
- this._retVal = null;
15739
- this.returnfield = null;
15740
- this.LinkStartAfterField = 0;
15741
- this.KeyExpression = 0;
15742
- this._task = task;
15743
- this._keyIdx = -1;
15744
- this._cond = new YesNoExp(true);
15745
- }
15746
15865
  get ReturnField() {
15747
15866
  if (this.returnfield === null && this._retVal !== null)
15748
15867
  this.returnfield = this.Task.getFieldByValueStr(this._retVal);
@@ -15763,6 +15882,21 @@ class DataviewHeaderBase {
15763
15882
  get LinkEvaluateCondition() {
15764
15883
  return this._linkEvalCondition;
15765
15884
  }
15885
+ constructor(task) {
15886
+ this._cond = null;
15887
+ this._task = null;
15888
+ this.Loc = null;
15889
+ this._dir = '\0';
15890
+ this._id = 0;
15891
+ this._keyIdx = 0;
15892
+ this._retVal = null;
15893
+ this.returnfield = null;
15894
+ this.LinkStartAfterField = 0;
15895
+ this.KeyExpression = 0;
15896
+ this._task = task;
15897
+ this._keyIdx = -1;
15898
+ this._cond = new YesNoExp(true);
15899
+ }
15766
15900
  SetAttributes(attributes) {
15767
15901
  let keys = attributes.Keys;
15768
15902
  keys.forEach((text) => {
@@ -17100,16 +17234,16 @@ class RecordOutOfDataViewException extends ApplicationException {
17100
17234
  }
17101
17235
 
17102
17236
  class XMLBasedDcValuesBuilder extends DcValuesBuilderBase {
17237
+ set SerializedDCVals(value) {
17238
+ this.parser.setXMLdata(value);
17239
+ this.parser.setCurrIndex(0);
17240
+ }
17103
17241
  constructor() {
17104
17242
  super();
17105
17243
  this.dcv = null;
17106
17244
  this.parser = null;
17107
17245
  this.parser = new XmlParser();
17108
17246
  }
17109
- set SerializedDCVals(value) {
17110
- this.parser.setXMLdata(value);
17111
- this.parser.setCurrIndex(0);
17112
- }
17113
17247
  Build() {
17114
17248
  this.dcv = null;
17115
17249
  let endContext = this.parser.getXMLdata().indexOf(XMLConstants.TAG_TERM, this.parser.getCurrIndex());
@@ -17189,6 +17323,39 @@ const RECOVERY_ACT_NONE = 'N';
17189
17323
  const TRANS_STAT_CLOSED = 'C';
17190
17324
  const TRANS_STAT_OPENED = 'O';
17191
17325
  class DataView extends DataViewBase {
17326
+ set InsertAt(value) {
17327
+ this._insertAt = value;
17328
+ }
17329
+ get InsertAt() {
17330
+ return this._insertAt;
17331
+ }
17332
+ get CurrRec() {
17333
+ return this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER;
17334
+ }
17335
+ set CurrRec(value) {
17336
+ if (this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER !== null && value === null) {
17337
+ this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER.resetDcValueId();
17338
+ }
17339
+ this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER = value;
17340
+ if (this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER !== null) {
17341
+ this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER.SetDcValueId();
17342
+ }
17343
+ }
17344
+ get FlushUpdates() {
17345
+ return this._flushUpdates;
17346
+ }
17347
+ get HasMainTable() {
17348
+ return this._hasMainTable;
17349
+ }
17350
+ get CurrentRecId() {
17351
+ return this._currRecId;
17352
+ }
17353
+ get FirstRecord() {
17354
+ return this._recordsTab.getRecByIdx(0);
17355
+ }
17356
+ get LastRecord() {
17357
+ return this._recordsTab.getRecByIdx(this._recordsTab.getSize() - 1);
17358
+ }
17192
17359
  constructor(taskOrDataView) {
17193
17360
  super();
17194
17361
  this._cacheLruTimeStamp = 0;
@@ -17240,39 +17407,6 @@ class DataView extends DataViewBase {
17240
17407
  Object.assign(this, taskOrDataView);
17241
17408
  }
17242
17409
  }
17243
- set InsertAt(value) {
17244
- this._insertAt = value;
17245
- }
17246
- get InsertAt() {
17247
- return this._insertAt;
17248
- }
17249
- get CurrRec() {
17250
- return this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER;
17251
- }
17252
- set CurrRec(value) {
17253
- if (this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER !== null && value === null) {
17254
- this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER.resetDcValueId();
17255
- }
17256
- this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER = value;
17257
- if (this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER !== null) {
17258
- this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER.SetDcValueId();
17259
- }
17260
- }
17261
- get FlushUpdates() {
17262
- return this._flushUpdates;
17263
- }
17264
- get HasMainTable() {
17265
- return this._hasMainTable;
17266
- }
17267
- get CurrentRecId() {
17268
- return this._currRecId;
17269
- }
17270
- get FirstRecord() {
17271
- return this._recordsTab.getRecByIdx(0);
17272
- }
17273
- get LastRecord() {
17274
- return this._recordsTab.getRecByIdx(this._recordsTab.getSize() - 1);
17275
- }
17276
17410
  Init() {
17277
17411
  this.init();
17278
17412
  }
@@ -18902,6 +19036,12 @@ class ReturnResultBase {
18902
19036
  }
18903
19037
 
18904
19038
  class ReturnResult extends ReturnResultBase {
19039
+ get Success() {
19040
+ return this.success;
19041
+ }
19042
+ get ErrorDescription() {
19043
+ return this.errorDescription;
19044
+ }
18905
19045
  constructor(errorDescriptionCodeOrErrorDescriptionOrInnerResult, innerResult) {
18906
19046
  super();
18907
19047
  this.errorDescription = null;
@@ -18916,12 +19056,6 @@ class ReturnResult extends ReturnResultBase {
18916
19056
  else
18917
19057
  this.constructor_03(errorDescriptionCodeOrErrorDescriptionOrInnerResult);
18918
19058
  }
18919
- get Success() {
18920
- return this.success;
18921
- }
18922
- get ErrorDescription() {
18923
- return this.errorDescription;
18924
- }
18925
19059
  constructor_00(errorDescriptionCode) {
18926
19060
  this.success = false;
18927
19061
  this.ErrorId = errorDescriptionCode;
@@ -19025,13 +19159,13 @@ class Transaction {
19025
19159
  }
19026
19160
 
19027
19161
  class TaskTransactionManager {
19162
+ get isClosingTopmostTask() {
19163
+ return MGDataCollection.Instance.StartupMgData.getFirstTask().InEndTask;
19164
+ }
19028
19165
  constructor(task) {
19029
19166
  this.task = null;
19030
19167
  this.task = task;
19031
19168
  }
19032
- get isClosingTopmostTask() {
19033
- return MGDataCollection.Instance.StartupMgData.getFirstTask().InEndTask;
19034
- }
19035
19169
  AllowTransaction(transBegin, forLocal) {
19036
19170
  let result;
19037
19171
  if (forLocal)
@@ -19412,12 +19546,6 @@ class RemoteDataviewManager extends DataviewManagerBase {
19412
19546
  }
19413
19547
 
19414
19548
  class DataviewManager extends DataviewManagerBase {
19415
- constructor(task) {
19416
- super(task);
19417
- this.RemoteDataviewManager = null;
19418
- this.HasRemoteData = true;
19419
- this.RemoteDataviewManager = new RemoteDataviewManager(task);
19420
- }
19421
19549
  get TaskService() {
19422
19550
  return this.Task.TaskService;
19423
19551
  }
@@ -19432,6 +19560,12 @@ class DataviewManager extends DataviewManagerBase {
19432
19560
  get VirtualDataviewManager() {
19433
19561
  return this.TaskService.GetDataviewManagerForVirtuals(this.Task);
19434
19562
  }
19563
+ constructor(task) {
19564
+ super(task);
19565
+ this.RemoteDataviewManager = null;
19566
+ this.HasRemoteData = true;
19567
+ this.RemoteDataviewManager = new RemoteDataviewManager(task);
19568
+ }
19435
19569
  Execute(command) {
19436
19570
  return __awaiter(this, void 0, void 0, function* () {
19437
19571
  return yield this.CurrentDataviewManager.Execute(command);
@@ -19574,23 +19708,9 @@ class MgForm extends MgFormBase {
19574
19708
  dv = this._task.DataView;
19575
19709
  return (dv);
19576
19710
  }
19577
- moveInView(unit, direction, returnToCtrl) {
19578
- return __awaiter(this, void 0, void 0, function* () {
19579
- if (isNullOrUndefined(returnToCtrl))
19580
- yield this.moveInView_0(unit, direction);
19581
- else
19582
- yield this.moveInView_1(unit, direction, returnToCtrl);
19583
- });
19584
- }
19585
- moveInView_0(unit, direction) {
19586
- return __awaiter(this, void 0, void 0, function* () {
19587
- yield this.moveInView(unit, direction, true);
19588
- });
19589
- }
19590
- moveInView_1(unit, direction, returnToCtrl) {
19711
+ moveInView(unit, direction) {
19591
19712
  return __awaiter(this, void 0, void 0, function* () {
19592
19713
  let oldRecId = Int32.MinValue;
19593
- let lastParkedCtrl;
19594
19714
  let currRec = this.GetDataview().getCurrRec();
19595
19715
  let oldTaskMode = ' ';
19596
19716
  let returnToVisibleLine = false;
@@ -19845,15 +19965,6 @@ class MgForm extends MgFormBase {
19845
19965
  else
19846
19966
  this.SetTableTopIndex();
19847
19967
  yield AccessHelper.eventsManager.handleInternalEventWithTask(this._task, InternalInterface.MG_ACT_REC_PREFIX);
19848
- if (returnToCtrl) {
19849
- lastParkedCtrl = this._task.getLastParkedCtrl();
19850
- if (lastParkedCtrl != null) {
19851
- let cursorMoved = yield lastParkedCtrl.invoke();
19852
- if (!cursorMoved) {
19853
- yield AccessHelper.eventsManager.HandleNonParkableControls(this._task);
19854
- }
19855
- }
19856
- }
19857
19968
  }
19858
19969
  catch (e) {
19859
19970
  if (e instanceof RecordOutOfDataViewException) {
@@ -20442,8 +20553,13 @@ class MgForm extends MgFormBase {
20442
20553
  finally {
20443
20554
  this._inRefreshDisp = false;
20444
20555
  }
20445
- if (refreshType === Constants.TASK_REFRESH_CURR_REC && (!_super.isLineMode.call(this) || this._tableRefreshed))
20556
+ if (refreshType === Constants.TASK_REFRESH_CURR_REC && (!_super.isLineMode.call(this) || this._tableRefreshed)) {
20446
20557
  this.FormRefreshed = true;
20558
+ if (this._task.isFirstRecordCycle() || AccessHelper.eventsManager.getIsInViewRefresh()) {
20559
+ Commands.addNoParameters(CommandType.SET_WC_IDLE, this);
20560
+ AccessHelper.eventsManager.setIsInViewRefresh(false);
20561
+ }
20562
+ }
20447
20563
  return true;
20448
20564
  });
20449
20565
  }
@@ -21901,8 +22017,12 @@ class EventHandler {
21901
22017
  continue;
21902
22018
  else if (this._operationTab.getOperation(oper.getBlockEnd()).getServerId() < nextOperIdx)
21903
22019
  continue;
21904
- if (!taskEnd)
21905
- yield this._task.evalEndCond(ConstInterface.END_COND_EVAL_IMMIDIATE);
22020
+ if (!taskEnd) {
22021
+ let mainLevel = this._task.getMainLevel().toLowerCase();
22022
+ if ((yield this._task.evalEndCond(ConstInterface.END_COND_EVAL_IMMIDIATE)) && Environment.Instance.getSpecialImmediateHandlerEnd() &&
22023
+ mainLevel != "RP".toLowerCase() && mainLevel != "TP".toLowerCase() && mainLevel != "RS".toLowerCase() && mainLevel != "TS".toLowerCase())
22024
+ break;
22025
+ }
21906
22026
  if (this._taskMgdID !== mgdID)
21907
22027
  isChangedCurrWndRef.value = true;
21908
22028
  if (!this._task.isMainProg() && this._task.isOpenWin())
@@ -22713,13 +22833,6 @@ class UserEventsTable {
22713
22833
  }
22714
22834
 
22715
22835
  class FormsTable {
22716
- constructor(task, parentForm) {
22717
- this._task = null;
22718
- this._parentForm = null;
22719
- this._formsStringXml = null;
22720
- this._task = task;
22721
- this._parentForm = parentForm;
22722
- }
22723
22836
  get Count() {
22724
22837
  return this._formsStringXml.length;
22725
22838
  }
@@ -22728,6 +22841,13 @@ class FormsTable {
22728
22841
  return this._formsStringXml.get_Item(formDisplayIndex - 1);
22729
22842
  return null;
22730
22843
  }
22844
+ constructor(task, parentForm) {
22845
+ this._task = null;
22846
+ this._parentForm = null;
22847
+ this._formsStringXml = null;
22848
+ this._task = task;
22849
+ this._parentForm = parentForm;
22850
+ }
22731
22851
  fillData() {
22732
22852
  return __awaiter(this, void 0, void 0, function* () {
22733
22853
  this._formsStringXml = new List();
@@ -22923,6 +23043,47 @@ var Task_Direction;
22923
23043
  Task_Direction[Task_Direction["FORE"] = 1] = "FORE";
22924
23044
  })(Task_Direction || (Task_Direction = {}));
22925
23045
  class Task extends TaskBase {
23046
+ get ParentTask() {
23047
+ return this._parentTask;
23048
+ }
23049
+ set TryingToCommit(value) {
23050
+ this._tryingToCommit = value;
23051
+ }
23052
+ get TryingToCommit() {
23053
+ return this._tryingToCommit;
23054
+ }
23055
+ get TaskService() {
23056
+ if (this._taskService == null)
23057
+ this._taskService = new RemoteTaskService();
23058
+ return this._taskService;
23059
+ }
23060
+ static get CommandsProcessor() {
23061
+ return CommandsProcessorManager.GetCommandsProcessor();
23062
+ }
23063
+ get LogicalStudioParentTask() {
23064
+ if (this.StudioParentTask === null && !super.isMainProg()) {
23065
+ return GuiDataCollection.MGDataTable.GetMainProgByCtlIdx(this.ContextID, this._ctlIdx);
23066
+ }
23067
+ return this.StudioParentTask;
23068
+ }
23069
+ get KnownToServer() {
23070
+ return this._knownToServer;
23071
+ }
23072
+ set Transaction(value) {
23073
+ this.DataviewManager.CurrentDataviewManager.Transaction = value;
23074
+ }
23075
+ get Transaction() {
23076
+ return this.DataviewManager.CurrentDataviewManager.Transaction;
23077
+ }
23078
+ get TaskDefinitionId() {
23079
+ if (this.taskDefinitionId === null) {
23080
+ this.taskDefinitionId = new TaskDefinitionId(this._ctlIdx, this.ProgramIsn, this.TaskIsn, this._isPrg);
23081
+ }
23082
+ return this.taskDefinitionId;
23083
+ }
23084
+ static get IsBlockingBatch() {
23085
+ return false;
23086
+ }
22926
23087
  constructor(parent) {
22927
23088
  super();
22928
23089
  this._dvCache = null;
@@ -22991,47 +23152,6 @@ class Task extends TaskBase {
22991
23152
  }
22992
23153
  this.constructor_1(parent);
22993
23154
  }
22994
- get ParentTask() {
22995
- return this._parentTask;
22996
- }
22997
- set TryingToCommit(value) {
22998
- this._tryingToCommit = value;
22999
- }
23000
- get TryingToCommit() {
23001
- return this._tryingToCommit;
23002
- }
23003
- get TaskService() {
23004
- if (this._taskService == null)
23005
- this._taskService = new RemoteTaskService();
23006
- return this._taskService;
23007
- }
23008
- static get CommandsProcessor() {
23009
- return CommandsProcessorManager.GetCommandsProcessor();
23010
- }
23011
- get LogicalStudioParentTask() {
23012
- if (this.StudioParentTask === null && !super.isMainProg()) {
23013
- return GuiDataCollection.MGDataTable.GetMainProgByCtlIdx(this.ContextID, this._ctlIdx);
23014
- }
23015
- return this.StudioParentTask;
23016
- }
23017
- get KnownToServer() {
23018
- return this._knownToServer;
23019
- }
23020
- set Transaction(value) {
23021
- this.DataviewManager.CurrentDataviewManager.Transaction = value;
23022
- }
23023
- get Transaction() {
23024
- return this.DataviewManager.CurrentDataviewManager.Transaction;
23025
- }
23026
- get TaskDefinitionId() {
23027
- if (this.taskDefinitionId === null) {
23028
- this.taskDefinitionId = new TaskDefinitionId(this._ctlIdx, this.ProgramIsn, this.TaskIsn, this._isPrg);
23029
- }
23030
- return this.taskDefinitionId;
23031
- }
23032
- static get IsBlockingBatch() {
23033
- return false;
23034
- }
23035
23155
  constructor_0() {
23036
23156
  this.ActionManager = new ActionManager();
23037
23157
  this.DataView = new DataView(this);
@@ -24910,6 +25030,7 @@ class Task extends TaskBase {
24910
25030
  this.ActionManager.enable(InternalInterface.MG_ACT_SORT_RECORDS, enable);
24911
25031
  enable = yield this.checkProp(PropInterface.PROP_TYPE_TASK_PROPERTIES_ALLOW_INDEX, true);
24912
25032
  this.ActionManager.enable(InternalInterface.MG_ACT_VIEW_BY_KEY, enable);
25033
+ this.ActionManager.enable(InternalInterface.MG_ACT_DUMP_ENVIRONMENT, true);
24913
25034
  });
24914
25035
  }
24915
25036
  setEnableZoomHandler() {
@@ -25529,6 +25650,9 @@ class CompMainPrgTable {
25529
25650
  }
25530
25651
 
25531
25652
  class MGData {
25653
+ get ForceModal() {
25654
+ return this.forceModal;
25655
+ }
25532
25656
  constructor(toClient, toServer, id, parent, isModal, forceModal) {
25533
25657
  this._expHandlers = null;
25534
25658
  this._id = 0;
@@ -25549,9 +25673,6 @@ class MGData {
25549
25673
  else
25550
25674
  this.constructor_1(id, parent, isModal, forceModal);
25551
25675
  }
25552
- get ForceModal() {
25553
- return this.forceModal;
25554
- }
25555
25676
  constructor_0(id, parent, isModal) {
25556
25677
  this._timerHandlers = new HandlersTable();
25557
25678
  this._expHandlers = new HandlersTable();
@@ -26164,6 +26285,7 @@ class EventsManager {
26164
26285
  this.confirmationDialogTitle = 'Session is about to be terminated!';
26165
26286
  this._lastFailedFocusedControl = null;
26166
26287
  this.isSpinnerShown = false;
26288
+ this.isInViewRefresh = false;
26167
26289
  this.SpinnerStopped = new Subject();
26168
26290
  this._rtEvents = new Stack();
26169
26291
  this._eventsQueue = new MgPriorityBlockingQueue();
@@ -26384,7 +26506,7 @@ class EventsManager {
26384
26506
  if (raiseAt === RaiseAt.TaskInFocus)
26385
26507
  mgControl.setRtEvtTask(LastFocusedManager.Instance.getLastFocusedTask());
26386
26508
  }
26387
- yield this.handleFocus(mgControl, line, produceClick);
26509
+ yield this.handleFocus(mgControl, line, produceClick, false);
26388
26510
  currTask.setCancelWasRaised(cancelWasRaised);
26389
26511
  if (this._stopExecution)
26390
26512
  return;
@@ -27000,7 +27122,7 @@ class EventsManager {
27000
27122
  this.setLastSavedRouteEvent(aRtEvt);
27001
27123
  }
27002
27124
  }
27003
- handleFocus(ctrl, line, onClick) {
27125
+ handleFocus(ctrl, line, onClick, shouldHandleZoom) {
27004
27126
  return __awaiter(this, void 0, void 0, function* () {
27005
27127
  try {
27006
27128
  if (ctrl.isStatic())
@@ -27019,6 +27141,10 @@ class EventsManager {
27019
27141
  let prevCtrl = LastFocusedManager.getLastFocusedControl();
27020
27142
  if (ctrl === prevCtrl && !ctrl.isRepeatable()) {
27021
27143
  yield ctrl.getForm().bringRecordToPage();
27144
+ yield this.HandleZoomIfNeeded(ctrl, line, shouldHandleZoom);
27145
+ let rtEvnt = this.getLastRtEvent();
27146
+ if (rtEvnt != null && rtEvnt.ShouldHandleZoom)
27147
+ FocusManager.SetFocus(ctrl, -1);
27022
27148
  return;
27023
27149
  }
27024
27150
  let prevTask = LastFocusedManager.Instance.getLastFocusedTask();
@@ -27058,8 +27184,10 @@ class EventsManager {
27058
27184
  }
27059
27185
  else
27060
27186
  yield this.HandleNonParkableControls(ctrl.getForm().getTask());
27061
- if (!this._stopExecution && MgControl.ReturnToCtrl === ctrl)
27187
+ if (!this._stopExecution && MgControl.ReturnToCtrl === ctrl) {
27062
27188
  LastFocusedManager.setLastFocusedControl(ctrl.getForm().getTask(), ctrl);
27189
+ yield this.HandleZoomIfNeeded(ctrl, line, shouldHandleZoom);
27190
+ }
27063
27191
  return;
27064
27192
  }
27065
27193
  finally {
@@ -27125,6 +27253,15 @@ class EventsManager {
27125
27253
  }
27126
27254
  });
27127
27255
  }
27256
+ HandleZoomIfNeeded(ctrl, line, shouldHandleZoom) {
27257
+ return __awaiter(this, void 0, void 0, function* () {
27258
+ if (shouldHandleZoom) {
27259
+ var rtEvt = new RunTimeEvent(ctrl, line, true);
27260
+ rtEvt.setInternal(InternalInterface.MG_ACT_ZOOM);
27261
+ yield this.handleEvent(rtEvt, false);
27262
+ }
27263
+ });
27264
+ }
27128
27265
  canGoToControl(ctrl, onClick) {
27129
27266
  if (onClick && (ctrl.Type === MgControlType.CTRL_TYPE_SUBFORM || ctrl.Type === MgControlType.CTRL_TYPE_BROWSER))
27130
27267
  return false;
@@ -27372,7 +27509,7 @@ class EventsManager {
27372
27509
  case InternalInterface.MG_ACT_WEB_ON_DBLICK:
27373
27510
  break;
27374
27511
  case InternalInterface.MG_ACT_CTRL_FOCUS:
27375
- yield this.handleFocus(ctrl, displayLine, evt.isProduceClick());
27512
+ yield this.handleFocus(ctrl, displayLine, evt.isProduceClick(), evt.ShouldHandleZoom);
27376
27513
  return false;
27377
27514
  case InternalInterface.MG_ACT_CTRL_FOCUS_ON_NON_MAGIC_CONTROL:
27378
27515
  yield this.handleFocusOnNonMagicControl(ctrl);
@@ -28082,6 +28219,7 @@ class EventsManager {
28082
28219
  }
28083
28220
  break;
28084
28221
  case InternalInterface.MG_ACT_SERVER_TERMINATION:
28222
+ case InternalInterface.MG_ACT_DUMP_ENVIRONMENT:
28085
28223
  cmd = CommandFactory.CreateEventCommand(task.getTaskTag(), intEvtCode);
28086
28224
  cmdsToServer.Add(cmd);
28087
28225
  yield CommandsProcessorManager.GetCommandsProcessor().Execute(CommandsProcessorBase_SendingInstruction.TASKS_AND_COMMANDS);
@@ -28417,6 +28555,7 @@ class EventsManager {
28417
28555
  else if (intEvtCode === InternalInterface.MG_ACT_RT_REFRESH_SCREEN && task.getMode() !== Constants.TASK_MODE_QUERY && !task.getAfterRetry()) {
28418
28556
  yield dv.currRecCompute(true);
28419
28557
  }
28558
+ this.setIsInViewRefresh(true);
28420
28559
  yield this.handleInternalEventWithTask(task, InternalInterface.MG_ACT_REC_PREFIX);
28421
28560
  if (!this.GetStopExecutionFlag() && !task.getPreventControlChange()) {
28422
28561
  if (!(task === LastFocusedManager.Instance.getLastFocusedTask() || !task.pathContains(LastFocusedManager.Instance.getLastFocusedTask())))
@@ -29171,6 +29310,12 @@ class EventsManager {
29171
29310
  return false;
29172
29311
  return true;
29173
29312
  }
29313
+ getIsInViewRefresh() {
29314
+ return this.isInViewRefresh;
29315
+ }
29316
+ setIsInViewRefresh(inViewRefresh) {
29317
+ this.isInViewRefresh = inViewRefresh;
29318
+ }
29174
29319
  }
29175
29320
  EventsManager.REAL_ONLY = true;
29176
29321
  EventsManager.MAX_OPER = 9999;
@@ -29279,15 +29424,15 @@ class GuiEventsProcessor extends EventsProcessor {
29279
29424
  }
29280
29425
  static processSelection(val, guiMgCtrl, line, produceClick) {
29281
29426
  let mgControl = guiMgCtrl;
29282
- if (mgControl.Type === MgControlType.CTRL_TYPE_BUTTON && mgControl.getForm().getTask().getLastParkedCtrl() !== mgControl)
29283
- produceClick = true;
29284
29427
  if (guiMgCtrl.ConnectedControl) {
29285
29428
  let rtEvt = new RunTimeEvent(mgControl, +line, true);
29286
- rtEvt.setInternal(InternalInterface.MG_ACT_ZOOM);
29287
- rtEvt.setProduceClick(produceClick);
29429
+ rtEvt.setInternal(InternalInterface.MG_ACT_CTRL_FOCUS);
29430
+ rtEvt.ShouldHandleZoom = true;
29288
29431
  EventsManager.Instance.addToTail(rtEvt);
29289
29432
  }
29290
29433
  else {
29434
+ if (mgControl.Type === MgControlType.CTRL_TYPE_BUTTON && mgControl.getForm().getTask().getLastParkedCtrl() !== mgControl)
29435
+ produceClick = true;
29291
29436
  let rtEvt = new RunTimeEvent(mgControl, +line, true);
29292
29437
  rtEvt.setInternal(InternalInterface.MG_ACT_SELECTION);
29293
29438
  rtEvt.setValue(val);
@@ -29693,13 +29838,6 @@ class VerifyCommand extends ClientTargetedCommandBase {
29693
29838
  }
29694
29839
 
29695
29840
  class EnhancedVerifyCommand extends VerifyCommand {
29696
- constructor() {
29697
- super();
29698
- this._buttonsID = '\0';
29699
- this._image = '\0';
29700
- this._returnValStr = null;
29701
- this._returnVal = null;
29702
- }
29703
29841
  ProcessMessageBoxResponse(task, returnValue) {
29704
29842
  return __awaiter(this, void 0, void 0, function* () {
29705
29843
  if (task !== null)
@@ -29732,6 +29870,13 @@ class EnhancedVerifyCommand extends VerifyCommand {
29732
29870
  break;
29733
29871
  }
29734
29872
  }
29873
+ constructor() {
29874
+ super();
29875
+ this._buttonsID = '\0';
29876
+ this._image = '\0';
29877
+ this._returnValStr = null;
29878
+ this._returnVal = null;
29879
+ }
29735
29880
  }
29736
29881
 
29737
29882
  class ResetRangeCommand extends ClientTargetedCommandBase {
@@ -29836,12 +29981,6 @@ class ResetLocateCommand extends ClientTargetedCommandBase {
29836
29981
  }
29837
29982
 
29838
29983
  class ResultCommand extends ClientTargetedCommandBase {
29839
- constructor() {
29840
- super();
29841
- this._isNull = false;
29842
- this._attr = StorageAttribute.NONE;
29843
- this._val = null;
29844
- }
29845
29984
  Execute(res) {
29846
29985
  return __awaiter(this, void 0, void 0, function* () {
29847
29986
  if (this._isNull)
@@ -29869,6 +30008,12 @@ class ResultCommand extends ClientTargetedCommandBase {
29869
30008
  break;
29870
30009
  }
29871
30010
  }
30011
+ constructor() {
30012
+ super();
30013
+ this._isNull = false;
30014
+ this._attr = StorageAttribute.NONE;
30015
+ this._val = null;
30016
+ }
29872
30017
  }
29873
30018
 
29874
30019
  class AddSortCommand extends ClientTargetedCommandBase {
@@ -30239,19 +30384,9 @@ class CommandsTable {
30239
30384
  }
30240
30385
  }
30241
30386
 
30242
- let CurrentClientVersion = '4.1000.0-dev4100.99';
30387
+ let CurrentClientVersion = '4.1000.04100.428';
30243
30388
 
30244
30389
  class ClientManager {
30245
- constructor() {
30246
- this._globalUniqueSessionId = null;
30247
- this._buttonIsClicked = false;
30248
- RuntimeContextBase.Instance.Init(RemoteCommandsProcessor.RC_NO_CONTEXT_ID);
30249
- LastFocusedManager.Instance.Init(MGDataCollection.Instance);
30250
- LastFocusedManager.Instance.LastActionTime = Misc.getSystemMilliseconds();
30251
- RemoteCommandsProcessor.ShouldScrambleAndUnscrambleMessages = true;
30252
- this._globalUniqueSessionId = UniqueIDUtils.GetUniqueMachineID() + "_";
30253
- this.RegisterDelegates();
30254
- }
30255
30390
  static get Instance() {
30256
30391
  if (ClientManager._instance === null)
30257
30392
  ClientManager._instance = new ClientManager();
@@ -30277,7 +30412,7 @@ class ClientManager {
30277
30412
  }
30278
30413
  break;
30279
30414
  case "mousedown":
30280
- if (control.isButton()) {
30415
+ if (control.isButton() || (control.ConnectedControl && guiEvent.fromButton)) {
30281
30416
  this._buttonIsClicked = true;
30282
30417
  }
30283
30418
  else if (!control.isSubform())
@@ -30296,7 +30431,7 @@ class ClientManager {
30296
30431
  }
30297
30432
  break;
30298
30433
  case "focus":
30299
- if (this._buttonIsClicked)
30434
+ if (this._buttonIsClicked || (control.ConnectedControl && guiEvent.fromButton))
30300
30435
  return;
30301
30436
  Events.OnFocus(control, lineIdx, true, false);
30302
30437
  break;
@@ -30312,6 +30447,9 @@ class ClientManager {
30312
30447
  case "setexternalvalue":
30313
30448
  EventsManager.Instance.AddExternalValueEvent(control, guiEvent.externalValue, guiEvent.param);
30314
30449
  break;
30450
+ case "setAsThreeState":
30451
+ control.setAsThreeState();
30452
+ break;
30315
30453
  default:
30316
30454
  break;
30317
30455
  }
@@ -30453,6 +30591,16 @@ class ClientManager {
30453
30591
  Logger.Instance.WriteToLog("-----------------------------------------------------------------------------", true);
30454
30592
  }
30455
30593
  }
30594
+ constructor() {
30595
+ this._globalUniqueSessionId = null;
30596
+ this._buttonIsClicked = false;
30597
+ RuntimeContextBase.Instance.Init(RemoteCommandsProcessor.RC_NO_CONTEXT_ID);
30598
+ LastFocusedManager.Instance.Init(MGDataCollection.Instance);
30599
+ LastFocusedManager.Instance.LastActionTime = Misc.getSystemMilliseconds();
30600
+ RemoteCommandsProcessor.ShouldScrambleAndUnscrambleMessages = true;
30601
+ this._globalUniqueSessionId = UniqueIDUtils.GetUniqueMachineID() + "_";
30602
+ this.RegisterDelegates();
30603
+ }
30456
30604
  InitGuiManager() {
30457
30605
  Manager.EventsManager = EventsManager.Instance;
30458
30606
  Manager.DefaultServerName = ServerConfig.Instance.getServer();
@@ -30508,7 +30656,7 @@ class ClientManager {
30508
30656
  yield MGDataCollection.Instance.addMGData(mgd, 0, true);
30509
30657
  yield ClientManager.Instance.WorkThreadExecution();
30510
30658
  if (Logger.Instance.ShouldLog()) {
30511
- Logger.Instance.WriteToLog(OSEnvironment.EolSeq + "Ended on " + DateTimeUtils.ToString(DateTime.Now, "dd/MM/yyyy", Logger.Instance) + OSEnvironment.EolSeq + OSEnvironment.EolSeq, false);
30659
+ Logger.Instance.WriteToLog(OSEnvironment.EolSeq + "Ended on " + DateTimeUtils.ToString(DateTime.Now, XMLConstants.ERROR_LOG_DATE_FORMAT, Logger.Instance) + OSEnvironment.EolSeq + OSEnvironment.EolSeq, false);
30512
30660
  }
30513
30661
  }
30514
30662
  else {