@magic-xpa/engine 4.1000.0-dev4100.109 → 4.1000.0-dev4100.116

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 (45) hide show
  1. package/esm2020/src/ClientManager.mjs +11 -11
  2. package/esm2020/src/ConstInterface.mjs +3 -1
  3. package/esm2020/src/CurrentClientVersion.mjs +2 -2
  4. package/esm2020/src/commands/ClientToServer/DataviewCommand.mjs +6 -6
  5. package/esm2020/src/commands/ClientToServer/EvaluateCommand.mjs +4 -4
  6. package/esm2020/src/commands/ClientToServer/EventCommand.mjs +8 -8
  7. package/esm2020/src/commands/ClientToServer/ExecOperCommand.mjs +4 -4
  8. package/esm2020/src/commands/ClientToServer/IniputForceWriteCommand.mjs +5 -5
  9. package/esm2020/src/commands/ClientToServer/RecomputeCommand.mjs +7 -7
  10. package/esm2020/src/commands/ClientToServer/TransactionCommand.mjs +6 -6
  11. package/esm2020/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +8 -8
  12. package/esm2020/src/commands/ServerToClient/ResultCommand.mjs +7 -7
  13. package/esm2020/src/data/DataView.mjs +34 -34
  14. package/esm2020/src/data/DataviewManager.mjs +7 -7
  15. package/esm2020/src/data/Record.mjs +10 -10
  16. package/esm2020/src/data/TaskTransactionManager.mjs +4 -4
  17. package/esm2020/src/data/XMLBasedDcValuesBuilder.mjs +5 -5
  18. package/esm2020/src/env/Environment.mjs +14 -7
  19. package/esm2020/src/env/MirrorString.mjs +2 -3
  20. package/esm2020/src/event/EventHandler.mjs +6 -3
  21. package/esm2020/src/event/EventHandlerPosition.mjs +5 -1
  22. package/esm2020/src/event/RunTimeEvent.mjs +16 -16
  23. package/esm2020/src/gui/FormsTable.mjs +8 -8
  24. package/esm2020/src/gui/MgControl.mjs +10 -10
  25. package/esm2020/src/gui/MgForm.mjs +3 -6
  26. package/esm2020/src/http/HttpManager.mjs +8 -8
  27. package/esm2020/src/remote/RemoteCommandsProcessor.mjs +35 -26
  28. package/esm2020/src/rt/DataviewHeaderBase.mjs +16 -16
  29. package/esm2020/src/security/UserDetails.mjs +12 -12
  30. package/esm2020/src/tasks/MGData.mjs +4 -4
  31. package/esm2020/src/tasks/RCTimer.mjs +10 -10
  32. package/esm2020/src/tasks/Task.mjs +42 -42
  33. package/esm2020/src/util/FlowMonitorQueue.mjs +107 -2
  34. package/esm2020/src/util/PrmMap.mjs +6 -6
  35. package/esm2020/src/util/ReturnResult.mjs +7 -7
  36. package/fesm2015/magic-xpa-engine.mjs +404 -281
  37. package/fesm2015/magic-xpa-engine.mjs.map +1 -1
  38. package/fesm2020/magic-xpa-engine.mjs +404 -281
  39. package/fesm2020/magic-xpa-engine.mjs.map +1 -1
  40. package/package.json +6 -6
  41. package/src/ConstInterface.d.ts +2 -0
  42. package/src/env/Environment.d.ts +2 -0
  43. package/src/util/FlowMonitorQueue.d.ts +8 -0
  44. package/src/util/PrmMap.d.ts +1 -1
  45. 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";
@@ -476,6 +477,7 @@ ConstInterface.RC_TOKEN_DATA = "DATA=";
476
477
  ConstInterface.WEBCLIENT_REINITIALIZE_REQUEST = "WCREINITIALIZEREQUEST=Y";
477
478
  ConstInterface.MAIN_PROG_VIEW = "MainProgramsDataView";
478
479
  ConstInterface.GLOBAL_PARAM_LIST = "GlobalParamList";
480
+ ConstInterface.ENV_VAR_LIST = "EnvVarList";
479
481
  ConstInterface.LAST_EXCEPTION = "LastException";
480
482
  ConstInterface.CTX_REMOVED_FROM_SRVR = "CtxRemovedFromSrvr";
481
483
  ConstInterface.LAST_ROUTE_EVENT = "LastRouteEvent";
@@ -641,13 +643,6 @@ class CommandSerializationHelper {
641
643
  }
642
644
 
643
645
  class EventCommand extends ClientOriginatedCommandTaskTag {
644
- constructor(magicEvent) {
645
- super();
646
- this.TaskTag = null;
647
- this.MagicEvent = 0;
648
- this.ClientRecId = 0;
649
- this.MagicEvent = magicEvent;
650
- }
651
646
  get CommandTypeAttribute() {
652
647
  return ConstInterface.MG_ATTR_VAL_EVENT;
653
648
  }
@@ -663,6 +658,13 @@ class EventCommand extends ClientOriginatedCommandTaskTag {
663
658
  return false;
664
659
  return true;
665
660
  }
661
+ constructor(magicEvent) {
662
+ super();
663
+ this.TaskTag = null;
664
+ this.MagicEvent = 0;
665
+ this.ClientRecId = 0;
666
+ this.MagicEvent = magicEvent;
667
+ }
666
668
  SerializeCommandData() {
667
669
  let helper = new CommandSerializationHelper();
668
670
  helper.SerializeTaskTag(this.TaskTag);
@@ -1202,15 +1204,6 @@ class OpeningTaskDetails {
1202
1204
  }
1203
1205
 
1204
1206
  class MgControl extends MgControlBase {
1205
- constructor(type, taskOrParentMgForm, parentControlOrParentControlIdx) {
1206
- if (arguments.length === 0)
1207
- super();
1208
- else if (arguments.length === 3 && (type === null || type.constructor === Number) && (taskOrParentMgForm === null || taskOrParentMgForm instanceof TaskBase) && (parentControlOrParentControlIdx === null || parentControlOrParentControlIdx.constructor === Number))
1209
- super(type, taskOrParentMgForm.getForm(), parentControlOrParentControlIdx);
1210
- else
1211
- super(type, taskOrParentMgForm, parentControlOrParentControlIdx);
1212
- this.initialize();
1213
- }
1214
1207
  initialize() {
1215
1208
  this._focusedStopExecution = false;
1216
1209
  this._inControlSuffix = false;
@@ -1223,6 +1216,15 @@ class MgControl extends MgControlBase {
1223
1216
  this.HasZoomHandler = false;
1224
1217
  this.ArgList = null;
1225
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
+ }
1226
1228
  GetVarIndex() {
1227
1229
  return super.getForm().getTask().DataView.Dvcount + this.veeIndx;
1228
1230
  }
@@ -3232,6 +3234,21 @@ class MgPriorityBlockingQueue {
3232
3234
  }
3233
3235
 
3234
3236
  class RunTimeEvent extends RunTimeEventBase {
3237
+ set Control(value) {
3238
+ this._ctrl = value;
3239
+ }
3240
+ set DisplayLine(value) {
3241
+ this._displayLine = value;
3242
+ }
3243
+ get Control() {
3244
+ return this._ctrl;
3245
+ }
3246
+ get ControlsList() {
3247
+ return this._controlsList;
3248
+ }
3249
+ get Direction() {
3250
+ return this._direction;
3251
+ }
3235
3252
  constructor(taskRefOrCtrlRefOrTaskrefOrFldRefOrEvt, ctrlRefOrGuiTriggeredEventOrLineOrControlsListOrDirectionOrColumnHeaderOrRtEvtOrCurrentTask, ignoreSpecifiedControlOrGuiTriggeredEventOrLineOrXOrControlOrActivatedFromMDIFrame, yOrCtlIdx, width, height) {
3236
3253
  super();
3237
3254
  this._controlsList = null;
@@ -3293,21 +3310,6 @@ class RunTimeEvent extends RunTimeEventBase {
3293
3310
  else if (arguments.length === 1 && taskRefOrCtrlRefOrTaskrefOrFldRefOrEvt instanceof RunTimeEvent)
3294
3311
  Object.assign(this, taskRefOrCtrlRefOrTaskrefOrFldRefOrEvt);
3295
3312
  }
3296
- set Control(value) {
3297
- this._ctrl = value;
3298
- }
3299
- set DisplayLine(value) {
3300
- this._displayLine = value;
3301
- }
3302
- get Control() {
3303
- return this._ctrl;
3304
- }
3305
- get ControlsList() {
3306
- return this._controlsList;
3307
- }
3308
- get Direction() {
3309
- return this._direction;
3310
- }
3311
3313
  constructor_5(taskRef) {
3312
3314
  this.init(taskRef);
3313
3315
  }
@@ -3637,7 +3639,17 @@ class FlowMonitorQueue {
3637
3639
  this._isRecompute = false;
3638
3640
  this._isTask = false;
3639
3641
  this._isTaskFlow = false;
3642
+ this._isDataView = false;
3640
3643
  this.ShouldSerialize = false;
3644
+ this.padRight = (string, length, character = ' ') => {
3645
+ let result = "";
3646
+ let totalLength = length - string.length;
3647
+ for (let i = 0; i < totalLength; i++) {
3648
+ result = character + result;
3649
+ }
3650
+ result = result + string;
3651
+ return result;
3652
+ };
3641
3653
  }
3642
3654
  static get Instance() {
3643
3655
  if (FlowMonitorQueue._instance === null)
@@ -3695,6 +3707,9 @@ class FlowMonitorQueue {
3695
3707
  case ConstInterface.MG_ATTR_TASKFLW:
3696
3708
  this._isTaskFlow = XmlParser.getBoolean(valueStr);
3697
3709
  break;
3710
+ case ConstInterface.MG_TAG_DATAVIEW:
3711
+ this._isDataView = XmlParser.getBoolean(valueStr);
3712
+ break;
3698
3713
  case ConstInterface.MG_ATTR_RECOMP:
3699
3714
  this._isRecompute = XmlParser.getBoolean(valueStr);
3700
3715
  break;
@@ -3752,6 +3767,96 @@ class FlowMonitorQueue {
3752
3767
  Logger.Instance.WriteSupportToLog(taskInfo + ": " + info, true);
3753
3768
  }
3754
3769
  }
3770
+ appendVirtualsAndParameters(currentValues) {
3771
+ let act = new ActivityItem(this, FlowMonitorQueue.ACT_TASK_FLW, InternalInterface.MG_ACT_REC_PREFIX);
3772
+ act.setInfo(currentValues);
3773
+ this._queue.put(act);
3774
+ }
3775
+ addDataViewFlow(task) {
3776
+ if (this._isDataView) {
3777
+ let fldTab = task.DataView.GetFieldsTab();
3778
+ let preparedDisplayString = "";
3779
+ let finaldisplayData = "\n";
3780
+ let fldValue;
3781
+ let data = "";
3782
+ for (let i = 0; i < fldTab.getSize(); i++) {
3783
+ let fldDef = fldTab.getField(i);
3784
+ if (!fldDef.IsEventHandlerField && (fldDef.IsVirtual && !fldDef.VirAsReal) || fldDef.isParam()) {
3785
+ fldValue = fldDef.isNull() ? fldDef.getNullValue() : fldDef.getValue(true);
3786
+ data = this.getFieldData(fldDef.getType(), fldValue, fldDef.getPicture(), fldDef.getCellsType(), task);
3787
+ preparedDisplayString = this.PrepareDisplayString(fldDef.isParam(), fldDef.getVarName(), data, true);
3788
+ finaldisplayData = finaldisplayData + preparedDisplayString + "\n";
3789
+ }
3790
+ }
3791
+ this.appendVirtualsAndParameters(finaldisplayData);
3792
+ }
3793
+ }
3794
+ getFieldData(Storagetype, data, picture, vecCellType, task) {
3795
+ switch (Storagetype) {
3796
+ case StorageAttribute.DOTNET:
3797
+ data = FlowMonitorQueue.UNPRINTABLE_STR_LOG;
3798
+ break;
3799
+ case StorageAttribute.BLOB:
3800
+ {
3801
+ if (BlobType.isValidBlob(data)) {
3802
+ let contentType = BlobType.getContentType(data);
3803
+ if (contentType == BlobType.CONTENT_TYPE_ANSI || contentType == BlobType.CONTENT_TYPE_UNICODE)
3804
+ data = data != null ? BlobType.getString(data) : "";
3805
+ else
3806
+ data = FlowMonitorQueue.UNPRINTABLE_STR_LOG;
3807
+ }
3808
+ else
3809
+ data = "";
3810
+ }
3811
+ break;
3812
+ case StorageAttribute.NUMERIC:
3813
+ case StorageAttribute.DATE:
3814
+ case StorageAttribute.TIME:
3815
+ let conv = DisplayConvertor.Instance;
3816
+ data = conv.mg2disp(data, " ", new PIC(picture, Storagetype, task.getCompIdx()), false, task.getCompIdx(), false);
3817
+ break;
3818
+ case StorageAttribute.BLOB_VECTOR:
3819
+ let vecOutData;
3820
+ if (data == null) {
3821
+ vecOutData = "[]";
3822
+ }
3823
+ else {
3824
+ let cellAtt = vecCellType;
3825
+ let vector = new VectorType(data);
3826
+ if (cellAtt == StorageAttribute.BLOB && !VectorType.validateBlobContents(data))
3827
+ vecOutData = "[]";
3828
+ else {
3829
+ let vecSize = VectorType.getVecSize(data);
3830
+ let cellPicture = (cellAtt == StorageAttribute.NUMERIC || cellAtt == StorageAttribute.DATE || cellAtt == StorageAttribute.TIME) ? PIC.buildPicture(cellAtt, vector.getVecCell(1), task.getCompIdx(), true).getFormat() : picture;
3831
+ vecOutData = "[";
3832
+ for (let i = 0; i < vecSize; i++) {
3833
+ vecOutData += this.getFieldData(cellAtt, vector.getVecCell(i + 1), cellPicture, vecCellType, task);
3834
+ vecOutData += i < vecSize - 1 ? "," : "]";
3835
+ }
3836
+ }
3837
+ }
3838
+ data = vecOutData;
3839
+ break;
3840
+ case StorageAttribute.BOOLEAN:
3841
+ data = data == "1" ? "TRUE" : "FALSE";
3842
+ break;
3843
+ }
3844
+ return data;
3845
+ }
3846
+ PrepareDisplayString(mode, name, valueContent, addDoubleQuotes) {
3847
+ let str = "";
3848
+ let finalStringToDisplay = "";
3849
+ if (addDoubleQuotes)
3850
+ finalStringToDisplay = finalStringToDisplay + "\"";
3851
+ finalStringToDisplay = finalStringToDisplay + name;
3852
+ if (addDoubleQuotes)
3853
+ finalStringToDisplay = finalStringToDisplay + "\"";
3854
+ let paddedName = this.padRight(name, 34);
3855
+ let formatOfStringVirtual = `Virtual`;
3856
+ let formatOfStringParameter = `Parameter`;
3857
+ str = (mode ? formatOfStringParameter : formatOfStringVirtual) + " : " + `${paddedName}` + " : " + `${valueContent.trim()}`;
3858
+ return str;
3859
+ }
3755
3860
  addTaskFlowRec(id, state, taskInfo) {
3756
3861
  if (this._enabled && this._isTaskFlow) {
3757
3862
  let info;
@@ -3918,6 +4023,7 @@ class FlowMonitorQueue {
3918
4023
  }
3919
4024
  }
3920
4025
  FlowMonitorQueue._instance = null;
4026
+ FlowMonitorQueue.UNPRINTABLE_STR_LOG = "#UNPRINTABLE#";
3921
4027
  FlowMonitorQueue.S_EVENT_STR1 = ">>Starts ";
3922
4028
  FlowMonitorQueue.S_EVENT_STR2 = " Event";
3923
4029
  FlowMonitorQueue.S_EVENT_PROPAGATED = "Event was propagated";
@@ -3979,6 +4085,15 @@ class TimerObjectCollection {
3979
4085
  }
3980
4086
  TimerObjectCollection.MgDataToTimerObjList = new Dictionary();
3981
4087
  class RCTimer extends MgTimer {
4088
+ get TimerIntervalMiliSeconds() {
4089
+ return this._timerIntervalMilliSeconds;
4090
+ }
4091
+ set IsIdleTimer(value) {
4092
+ this._isIdle = value;
4093
+ }
4094
+ get IsIdleTimer() {
4095
+ return this._isIdle;
4096
+ }
3982
4097
  constructor(mgData, milliseconds, isIdle) {
3983
4098
  super(milliseconds);
3984
4099
  this._mgData = null;
@@ -3990,15 +4105,6 @@ class RCTimer extends MgTimer {
3990
4105
  TimerObjectCollection.MgDataToTimerObjList.Add(mgDataId, new List());
3991
4106
  TimerObjectCollection.MgDataToTimerObjList.get_Item(mgDataId).push(this);
3992
4107
  }
3993
- get TimerIntervalMiliSeconds() {
3994
- return this._timerIntervalMilliSeconds;
3995
- }
3996
- set IsIdleTimer(value) {
3997
- this._isIdle = value;
3998
- }
3999
- get IsIdleTimer() {
4000
- return this._isIdle;
4001
- }
4002
4108
  GetMgdata() {
4003
4109
  return this._mgData;
4004
4110
  }
@@ -4144,6 +4250,9 @@ class ExecutionStack {
4144
4250
  }
4145
4251
 
4146
4252
  class ExecOperCommand extends ClientOriginatedCommandTaskTag {
4253
+ get CommandTypeAttribute() {
4254
+ return ConstInterface.MG_ATTR_VAL_EXEC_OPER;
4255
+ }
4147
4256
  constructor() {
4148
4257
  super();
4149
4258
  this.ExecutionStack = null;
@@ -4157,9 +4266,6 @@ class ExecOperCommand extends ClientOriginatedCommandTaskTag {
4157
4266
  this.CheckOnly = false;
4158
4267
  this.DitIdx = Int32.MinValue;
4159
4268
  }
4160
- get CommandTypeAttribute() {
4161
- return ConstInterface.MG_ATTR_VAL_EXEC_OPER;
4162
- }
4163
4269
  SerializeCommandData() {
4164
4270
  let helper = new CommandSerializationHelper();
4165
4271
  let execStackExists = this.ExecutionStack !== null && !this.ExecutionStack.empty();
@@ -4640,13 +4746,6 @@ class HttpClientAsync extends HttpClientBase {
4640
4746
  }
4641
4747
 
4642
4748
  class HttpManager {
4643
- constructor() {
4644
- this._httpCommunicationTimeoutMS = HttpManager.DEFAULT_HTTP_COMMUNICATION_TIMEOUT;
4645
- this._httpClientAsync = null;
4646
- this._isAbortingMagicEngine = false;
4647
- this._httpClientAsync = new HttpClientAsync(HttpManager._nativeHttpClient);
4648
- this.RegisterBasicDelegates();
4649
- }
4650
4749
  getHttpClient() {
4651
4750
  if (this.IsAbortingMagicEngine)
4652
4751
  return new HttpClientSync();
@@ -4666,6 +4765,13 @@ class HttpManager {
4666
4765
  }
4667
4766
  get IsAbortingMagicEngine() { return this._isAbortingMagicEngine; }
4668
4767
  set IsAbortingMagicEngine(isAbortingMagicEngine) { this._isAbortingMagicEngine = isAbortingMagicEngine; }
4768
+ constructor() {
4769
+ this._httpCommunicationTimeoutMS = HttpManager.DEFAULT_HTTP_COMMUNICATION_TIMEOUT;
4770
+ this._httpClientAsync = null;
4771
+ this._isAbortingMagicEngine = false;
4772
+ this._httpClientAsync = new HttpClientAsync(HttpManager._nativeHttpClient);
4773
+ this.RegisterBasicDelegates();
4774
+ }
4669
4775
  RegisterBasicDelegates() {
4670
4776
  HttpClientEvents.GetHttpCommunicationTimeout_Event = this.GetHttpCommunicationTimeoutMS.bind(this);
4671
4777
  }
@@ -5223,6 +5329,12 @@ var RequestStatus;
5223
5329
  RequestStatus[RequestStatus["Abort"] = 2] = "Abort";
5224
5330
  })(RequestStatus || (RequestStatus = {}));
5225
5331
  class RemoteCommandsProcessor extends CommandsProcessorBase {
5332
+ static GetInstance() {
5333
+ if (RemoteCommandsProcessor._instance === null) {
5334
+ RemoteCommandsProcessor._instance = new RemoteCommandsProcessor();
5335
+ }
5336
+ return RemoteCommandsProcessor._instance;
5337
+ }
5226
5338
  constructor() {
5227
5339
  super();
5228
5340
  this._lastRequestTime = 0;
@@ -5233,12 +5345,6 @@ class RemoteCommandsProcessor extends CommandsProcessorBase {
5233
5345
  HttpManager.GetInstance();
5234
5346
  this.RegisterDelegates();
5235
5347
  }
5236
- static GetInstance() {
5237
- if (RemoteCommandsProcessor._instance === null) {
5238
- RemoteCommandsProcessor._instance = new RemoteCommandsProcessor();
5239
- }
5240
- return RemoteCommandsProcessor._instance;
5241
- }
5242
5348
  CheckAndSetSessionCounter(newSessionCounter) {
5243
5349
  if (newSessionCounter === ConstInterface.SESSION_COUNTER_CLOSE_CTX_INDICATION) {
5244
5350
  Debug.Assert(this.GetSessionCounter() === ConstInterface.SESSION_COUNTER_CLOSE_CTX_INDICATION);
@@ -5274,10 +5380,12 @@ class RemoteCommandsProcessor extends CommandsProcessorBase {
5274
5380
  return __awaiter(this, void 0, void 0, function* () {
5275
5381
  let mainPrgViewStringForServer = yield this.BuildXMLForMainProgramDataView();
5276
5382
  let globalParamsString = AccessHelper.globalParams.mirrorAllToXML();
5383
+ let changedEnvVarList = AccessHelper.envParamsTable.mirrorAllToXML();
5277
5384
  let dataStorage = window.localStorage;
5278
5385
  dataStorage.setItem(ConstInterface.IS_SESSION_REINITIALIZING, "true");
5279
5386
  dataStorage.setItem(ConstInterface.MAIN_PROG_VIEW, mainPrgViewStringForServer.toString());
5280
5387
  dataStorage.setItem(ConstInterface.GLOBAL_PARAM_LIST, globalParamsString);
5388
+ dataStorage.setItem(ConstInterface.ENV_VAR_LIST, changedEnvVarList);
5281
5389
  dataStorage.setItem(ConstInterface.LAST_EXCEPTION, RemoteCommandsProcessor.lastExceptionMessage);
5282
5390
  if (RuntimeContextBase.Instance.RemovedContextFromServer)
5283
5391
  dataStorage.setItem(ConstInterface.CTX_REMOVED_FROM_SRVR, "1");
@@ -5514,6 +5622,7 @@ class RemoteCommandsProcessor extends CommandsProcessorBase {
5514
5622
  let reqBuf;
5515
5623
  let isInitialCall = sessionStage === CommandsProcessorBase_SessionStage.INITIAL;
5516
5624
  let globalParamsString = null;
5625
+ let envVarsString = null;
5517
5626
  if (this.DelayCommandExecution)
5518
5627
  return;
5519
5628
  if (Logger.Instance.LogLevel == Logger_LogLevels.RequestInfo && !isInitialCall)
@@ -5539,12 +5648,16 @@ class RemoteCommandsProcessor extends CommandsProcessorBase {
5539
5648
  let buffer = new StringBuilder();
5540
5649
  if (!RemoteCommandsProcessor.IsSessionReInitializing)
5541
5650
  buffer.Append(reqBuf);
5542
- if (RemoteCommandsProcessor.IsSessionReInitializing)
5651
+ if (RemoteCommandsProcessor.IsSessionReInitializing) {
5543
5652
  globalParamsString = this.RestoreSessionReInitializingDataFromLocalStorage(ConstInterface.GLOBAL_PARAM_LIST);
5544
- else
5653
+ envVarsString = this.RestoreSessionReInitializingDataFromLocalStorage(ConstInterface.ENV_VAR_LIST);
5654
+ }
5655
+ else {
5545
5656
  globalParamsString = AccessHelper.globalParams.mirrorToXML();
5657
+ envVarsString = AccessHelper.envParamsTable.mirrorToXML();
5658
+ }
5546
5659
  changes.Append(globalParamsString);
5547
- changes.Append(AccessHelper.envParamsTable.mirrorToXML());
5660
+ changes.Append(envVarsString);
5548
5661
  if (changes.Length > 0) {
5549
5662
  changes.Insert(0, "<" + ConstInterface.MG_TAG_ENV_CHANGES + ">");
5550
5663
  changes.Append("</" + ConstInterface.MG_TAG_ENV_CHANGES + ">");
@@ -5583,13 +5696,15 @@ class RemoteCommandsProcessor extends CommandsProcessorBase {
5583
5696
  dataStorage.removeItem(ConstInterface.IS_SESSION_REINITIALIZING);
5584
5697
  dataStorage.removeItem(ConstInterface.MAIN_PROG_VIEW);
5585
5698
  dataStorage.removeItem(ConstInterface.GLOBAL_PARAM_LIST);
5699
+ dataStorage.removeItem(ConstInterface.ENV_VAR_LIST);
5586
5700
  dataStorage.removeItem(ConstInterface.LAST_EXCEPTION);
5587
5701
  }
5588
5702
  }
5589
5703
  FlowMonitorQueue.Instance.enable(false);
5590
5704
  yield this.ProcessResponse(respBuf, AccessHelper.mgDataTable.currMgdID, null, res);
5591
5705
  if (RemoteCommandsProcessor.IsSessionReInitializing) {
5592
- AccessHelper.globalParams.RestoreGlobalParams(globalParamsString);
5706
+ AccessHelper.globalParams.RestoreParams(globalParamsString);
5707
+ AccessHelper.envParamsTable.RestoreParams(envVarsString);
5593
5708
  let dataStorage = window.localStorage;
5594
5709
  let ctxRemoved = dataStorage.getItem(ConstInterface.CTX_REMOVED_FROM_SRVR);
5595
5710
  if (ctxRemoved === "1") {
@@ -5906,21 +6021,6 @@ RemoteCommandsProcessor.InitialUrl = null;
5906
6021
  RemoteCommandsProcessor.WEB_COMMUNICATION_PROTOCOL_VERSION = "14002";
5907
6022
  RemoteCommandsProcessor._shouldScrambleAndUnscrambleMessages = false;
5908
6023
  class HandshakeResponse {
5909
- constructor(responseXML) {
5910
- this._scrambleMessages = true;
5911
- this._contextId = null;
5912
- this._privateSessionId = null;
5913
- this._inputPassword = false;
5914
- this._httpTimeout = 0;
5915
- this._systemLogin = null;
5916
- this._maxInternalLogLevel = null;
5917
- try {
5918
- JSON_Utils.JSONFromXML(responseXML, this.FillFromJSON.bind(this));
5919
- }
5920
- catch (ex) {
5921
- Logger.Instance.WriteExceptionToLog(ex, responseXML);
5922
- }
5923
- }
5924
6024
  get ScrambleMessages() {
5925
6025
  return this._scrambleMessages;
5926
6026
  }
@@ -5942,6 +6042,21 @@ class HandshakeResponse {
5942
6042
  get MaxInternalLogLevel() {
5943
6043
  return this._maxInternalLogLevel;
5944
6044
  }
6045
+ constructor(responseXML) {
6046
+ this._scrambleMessages = true;
6047
+ this._contextId = null;
6048
+ this._privateSessionId = null;
6049
+ this._inputPassword = false;
6050
+ this._httpTimeout = 0;
6051
+ this._systemLogin = null;
6052
+ this._maxInternalLogLevel = null;
6053
+ try {
6054
+ JSON_Utils.JSONFromXML(responseXML, this.FillFromJSON.bind(this));
6055
+ }
6056
+ catch (ex) {
6057
+ Logger.Instance.WriteExceptionToLog(ex, responseXML);
6058
+ }
6059
+ }
5945
6060
  FillFromJSON(error, result) {
5946
6061
  if (error != null) {
5947
6062
  throw error;
@@ -7515,6 +7630,9 @@ class EventHandlerPosition {
7515
7630
  case InternalInterface.MG_ACT_REC_SUFFIX:
7516
7631
  case InternalInterface.MG_ACT_CTRL_PREFIX:
7517
7632
  case InternalInterface.MG_ACT_CTRL_SUFFIX: {
7633
+ if (this._rtEvt.getInternalCode() == InternalInterface.MG_ACT_REC_PREFIX) {
7634
+ FlowMonitorQueue.Instance.addDataViewFlow(this._task);
7635
+ }
7518
7636
  if (this._handlerIdx === -1) {
7519
7637
  for (this._handlerIdx = this._handlersTab.getSize() - 1; this._handlerIdx >= 0; this._handlerIdx--) {
7520
7638
  let handler = this._handlersTab.getHandler(this._handlerIdx);
@@ -7680,11 +7798,6 @@ var DataViewCommandType;
7680
7798
  DataViewCommandType[DataViewCommandType["SQLExecute"] = 20] = "SQLExecute";
7681
7799
  })(DataViewCommandType || (DataViewCommandType = {}));
7682
7800
  class DataviewCommand extends ClientOriginatedCommandTaskTag {
7683
- constructor() {
7684
- super();
7685
- this.CommandType = 0;
7686
- this.TaskTag = null;
7687
- }
7688
7801
  get CommandTypeAttribute() {
7689
7802
  throw new NotImplementedException();
7690
7803
  }
@@ -7695,6 +7808,11 @@ class DataviewCommand extends ClientOriginatedCommandTaskTag {
7695
7808
  get ShouldSerialize() {
7696
7809
  return false;
7697
7810
  }
7811
+ constructor() {
7812
+ super();
7813
+ this.CommandType = 0;
7814
+ this.TaskTag = null;
7815
+ }
7698
7816
  }
7699
7817
 
7700
7818
  class AddUserRangeDataviewCommand extends DataviewCommand {
@@ -7916,12 +8034,6 @@ class NonReversibleExitEventCommand extends EventCommand {
7916
8034
  }
7917
8035
 
7918
8036
  class RecomputeCommand extends ClientOriginatedCommandTaskTag {
7919
- constructor() {
7920
- super();
7921
- this.TaskTag = null;
7922
- this.FldId = 0;
7923
- this.IgnoreSubformRecompute = false;
7924
- }
7925
8037
  get CommandTypeAttribute() {
7926
8038
  return ConstInterface.MG_ATTR_VAL_RECOMP;
7927
8039
  }
@@ -7933,17 +8045,18 @@ class RecomputeCommand extends ClientOriginatedCommandTaskTag {
7933
8045
  helper.SerializeAttribute(ConstInterface.MG_ATTR_IGNORE_SUBFORM_RECOMPUTE, '1');
7934
8046
  return helper.GetString();
7935
8047
  }
8048
+ constructor() {
8049
+ super();
8050
+ this.TaskTag = null;
8051
+ this.FldId = 0;
8052
+ this.IgnoreSubformRecompute = false;
8053
+ }
7936
8054
  getCommandInfo() {
7937
8055
  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());
7938
8056
  }
7939
8057
  }
7940
8058
 
7941
8059
  class TransactionCommand extends ClientOriginatedCommandTaskTag {
7942
- constructor() {
7943
- super();
7944
- this.TaskTag = null;
7945
- this.ReversibleExit = false;
7946
- }
7947
8060
  get CommandTypeAttribute() {
7948
8061
  return ConstInterface.MG_ATTR_VAL_TRANS;
7949
8062
  }
@@ -7957,6 +8070,11 @@ class TransactionCommand extends ClientOriginatedCommandTaskTag {
7957
8070
  helper.SerializeAttribute(ConstInterface.MG_ATTR_TRANS_LEVEL, this.Level);
7958
8071
  return helper.GetString();
7959
8072
  }
8073
+ constructor() {
8074
+ super();
8075
+ this.TaskTag = null;
8076
+ this.ReversibleExit = false;
8077
+ }
7960
8078
  getCommandInfo() {
7961
8079
  return NString.Format('[{0} in {1}]', this.Oper === 'C' ? 'Commit Transaction' : 'Abort Transaction', this.Task.getTaskInfo());
7962
8080
  }
@@ -7975,6 +8093,9 @@ class UnloadCommand extends ClientOriginatedCommand {
7975
8093
  }
7976
8094
 
7977
8095
  class EvaluateCommand extends ClientOriginatedCommandTaskTag {
8096
+ get CommandTypeAttribute() {
8097
+ return ConstInterface.MG_ATTR_VAL_EVAL;
8098
+ }
7978
8099
  constructor() {
7979
8100
  super();
7980
8101
  this.TaskTag = null;
@@ -7983,9 +8104,6 @@ class EvaluateCommand extends ClientOriginatedCommandTaskTag {
7983
8104
  this.MprgCreator = null;
7984
8105
  this.LengthExpVal = Int32.MinValue;
7985
8106
  }
7986
- get CommandTypeAttribute() {
7987
- return ConstInterface.MG_ATTR_VAL_EVAL;
7988
- }
7989
8107
  SerializeCommandData() {
7990
8108
  let helper = new CommandSerializationHelper();
7991
8109
  helper.SerializeTaskTag(this.TaskTag);
@@ -8033,10 +8151,6 @@ class GlobalParamsQueryCommand extends QueryCommand {
8033
8151
  }
8034
8152
 
8035
8153
  class IniputForceWriteCommand extends ClientOriginatedCommand {
8036
- constructor() {
8037
- super();
8038
- this.Text = null;
8039
- }
8040
8154
  get CommandTypeAttribute() {
8041
8155
  return ConstInterface.MG_ATTR_VAL_INIPUT_FORCE_WRITE;
8042
8156
  }
@@ -8046,6 +8160,10 @@ class IniputForceWriteCommand extends ClientOriginatedCommand {
8046
8160
  SerializeCommandData() {
8047
8161
  return " " + ConstInterface.MG_ATTR_VAL_INIPUT_PARAM + "=\"" + XmlParser.escape(this.Text) + "\"";
8048
8162
  }
8163
+ constructor() {
8164
+ super();
8165
+ this.Text = null;
8166
+ }
8049
8167
  getCommandInfo() {
8050
8168
  return NString.Format('[{0} with {1}] ', this.CommandTypeAttribute, this.Text);
8051
8169
  }
@@ -8345,10 +8463,6 @@ var ParamParseResult;
8345
8463
  })(ParamParseResult || (ParamParseResult = {}));
8346
8464
 
8347
8465
  class PrmMap {
8348
- constructor() {
8349
- this.values = null;
8350
- this.values = new Dictionary();
8351
- }
8352
8466
  getvalue(s) {
8353
8467
  if (this.values.ContainsKey(s))
8354
8468
  return this.values.get_Item(s);
@@ -8361,6 +8475,10 @@ class PrmMap {
8361
8475
  remove(s) {
8362
8476
  this.values.Remove(s);
8363
8477
  }
8478
+ constructor() {
8479
+ this.values = null;
8480
+ this.values = new Dictionary();
8481
+ }
8364
8482
  }
8365
8483
  class MirrorPrmMap extends PrmMap {
8366
8484
  constructor(type) {
@@ -8441,7 +8559,7 @@ class MirrorPrmMap extends PrmMap {
8441
8559
  while (this.mirrorFromXML(parser.getNextTag(), parser)) {
8442
8560
  }
8443
8561
  }
8444
- RestoreGlobalParams(xml) {
8562
+ RestoreParams(xml) {
8445
8563
  let parser = new XmlParser(xml);
8446
8564
  while (this.mirrorFromXML(parser.getNextTag(), parser)) {
8447
8565
  }
@@ -8516,6 +8634,7 @@ class Environment {
8516
8634
  this._debugMode = 0;
8517
8635
  this._significantNumSize = 0;
8518
8636
  this._specialAnsiExpression = false;
8637
+ this._specialImmediatehandlerEnd = false;
8519
8638
  this._specialShowStatusBarPanes = false;
8520
8639
  this._specialRouteToRootProgOnContextRecreation = false;
8521
8640
  this._specialCancelOnCreate = false;
@@ -8669,6 +8788,9 @@ class Environment {
8669
8788
  case ConstInterface.MG_ATTR_LOCAL_FLAGS:
8670
8789
  this._localFlags = valueStr;
8671
8790
  break;
8791
+ case ConstInterface.MG_ATTR_SPECIAL_IMMEDIATE_HANDLER_END:
8792
+ this._specialImmediatehandlerEnd = XmlParser.getBoolean(valueStr);
8793
+ break;
8672
8794
  case ConstInterface.MG_ATTR_SPEACIAL_ANSI_EXP:
8673
8795
  this._specialAnsiExpression = XmlParser.getBoolean(valueStr);
8674
8796
  break;
@@ -8875,6 +8997,9 @@ class Environment {
8875
8997
  GetLocalFlag(f) {
8876
8998
  return this._localFlags !== null && this._localFlags.indexOf(f) >= 0;
8877
8999
  }
9000
+ getSpecialImmediateHandlerEnd() {
9001
+ return this._specialImmediatehandlerEnd;
9002
+ }
8878
9003
  getSpecialAnsiExpression() {
8879
9004
  return this._specialAnsiExpression;
8880
9005
  }
@@ -8944,6 +9069,12 @@ class Environment {
8944
9069
  }
8945
9070
  Environment.Instance = new Environment();
8946
9071
  class EnvironmentDetails {
9072
+ set UpdateInQueryMode(value) {
9073
+ this._updateInQueryMode = value;
9074
+ }
9075
+ set CreateInModifyMode(value) {
9076
+ this._createInModifyMode = value;
9077
+ }
8947
9078
  constructor() {
8948
9079
  this._createInModifyMode = false;
8949
9080
  this._updateInQueryMode = false;
@@ -8954,12 +9085,6 @@ class EnvironmentDetails {
8954
9085
  this.ProjDir = null;
8955
9086
  this.CompIdx = 0;
8956
9087
  }
8957
- set UpdateInQueryMode(value) {
8958
- this._updateInQueryMode = value;
8959
- }
8960
- set CreateInModifyMode(value) {
8961
- this._createInModifyMode = value;
8962
- }
8963
9088
  allowUpdateInQueryMode() {
8964
9089
  return this._updateInQueryMode;
8965
9090
  }
@@ -9047,17 +9172,6 @@ class GlobalParams extends MirrorPrmMap {
9047
9172
  GlobalParams.Instance = new GlobalParams();
9048
9173
 
9049
9174
  class UserDetails {
9050
- constructor() {
9051
- this.UserName = null;
9052
- this.UserID = null;
9053
- this.UserInfo = null;
9054
- this.Password = null;
9055
- this.IsLoggedIn = false;
9056
- this.UserName = NString.Empty;
9057
- this.UserInfo = NString.Empty;
9058
- this.IsLoggedIn = false;
9059
- this.setUserID(NString.Empty);
9060
- }
9061
9175
  setIsLoggedIn(value) {
9062
9176
  this.IsLoggedIn = value;
9063
9177
  }
@@ -9077,6 +9191,17 @@ class UserDetails {
9077
9191
  UserDetails._instance = new UserDetails();
9078
9192
  return UserDetails._instance;
9079
9193
  }
9194
+ constructor() {
9195
+ this.UserName = null;
9196
+ this.UserID = null;
9197
+ this.UserInfo = null;
9198
+ this.Password = null;
9199
+ this.IsLoggedIn = false;
9200
+ this.UserName = NString.Empty;
9201
+ this.UserInfo = NString.Empty;
9202
+ this.IsLoggedIn = false;
9203
+ this.setUserID(NString.Empty);
9204
+ }
9080
9205
  fillData(parser) {
9081
9206
  let tokensVector;
9082
9207
  let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_TERM, parser.getCurrIndex());
@@ -9913,8 +10038,7 @@ class MirrorString {
9913
10038
  this._reserved = false;
9914
10039
  }
9915
10040
  mirrorToXML() {
9916
- return ConstInterface.MG_ATTR_ENV_VALUE + "=\"" + XmlParser.escape(this._value) + "\" " +
9917
- ConstInterface.MG_ATTR_ENV_WRITEINI + "=F";
10041
+ return ConstInterface.MG_ATTR_ENV_VALUE + "=\"" + XmlParser.escape(this._value) + "\"";
9918
10042
  }
9919
10043
  init(name, xmlParser) {
9920
10044
  let valueStart, valueEnd, reserveStart, paramEnd;
@@ -14618,6 +14742,12 @@ class DataViewBase extends GuiDataViewBase {
14618
14742
  }
14619
14743
 
14620
14744
  class Record {
14745
+ get InCompute() {
14746
+ return this._inCompute;
14747
+ }
14748
+ get InRecompute() {
14749
+ return this._inRecompute;
14750
+ }
14621
14751
  constructor(dvOrTableCacheOrCIdOrRecord, dataview) {
14622
14752
  this._id = Int32.MinValue;
14623
14753
  this.dbViewRowIdx = 0;
@@ -14635,12 +14765,6 @@ class Record {
14635
14765
  else
14636
14766
  this.constructor_1(dvOrTableCacheOrCIdOrRecord, dataview);
14637
14767
  }
14638
- get InCompute() {
14639
- return this._inCompute;
14640
- }
14641
- get InRecompute() {
14642
- return this._inRecompute;
14643
- }
14644
14768
  constructor_0(dvOrTableCache) {
14645
14769
  if (dvOrTableCache instanceof DataViewBase)
14646
14770
  this._dataview = dvOrTableCache;
@@ -15436,14 +15560,14 @@ Record.FLAG_MODIFIED_ATLEAST_ONCE = (0x40);
15436
15560
  Record.INCREASE = true;
15437
15561
  Record.DECREASE = false;
15438
15562
  class DcValuesReference extends ObjectReferenceBase {
15563
+ get DcValues() {
15564
+ return this.Referent;
15565
+ }
15439
15566
  constructor(controlId, referencedDcValues) {
15440
15567
  super(referencedDcValues);
15441
15568
  this.ditIdx = 0;
15442
15569
  this.ditIdx = controlId;
15443
15570
  }
15444
- get DcValues() {
15445
- return this.Referent;
15446
- }
15447
15571
  Clone() {
15448
15572
  return new DcValuesReference(this.ditIdx, this.Referent);
15449
15573
  }
@@ -15719,21 +15843,6 @@ class RecordsTable {
15719
15843
  RecordsTable.REC_NOT_FOUND = -1;
15720
15844
 
15721
15845
  class DataviewHeaderBase {
15722
- constructor(task) {
15723
- this._cond = null;
15724
- this._task = null;
15725
- this.Loc = null;
15726
- this._dir = '\0';
15727
- this._id = 0;
15728
- this._keyIdx = 0;
15729
- this._retVal = null;
15730
- this.returnfield = null;
15731
- this.LinkStartAfterField = 0;
15732
- this.KeyExpression = 0;
15733
- this._task = task;
15734
- this._keyIdx = -1;
15735
- this._cond = new YesNoExp(true);
15736
- }
15737
15846
  get ReturnField() {
15738
15847
  if (this.returnfield === null && this._retVal !== null)
15739
15848
  this.returnfield = this.Task.getFieldByValueStr(this._retVal);
@@ -15754,6 +15863,21 @@ class DataviewHeaderBase {
15754
15863
  get LinkEvaluateCondition() {
15755
15864
  return this._linkEvalCondition;
15756
15865
  }
15866
+ constructor(task) {
15867
+ this._cond = null;
15868
+ this._task = null;
15869
+ this.Loc = null;
15870
+ this._dir = '\0';
15871
+ this._id = 0;
15872
+ this._keyIdx = 0;
15873
+ this._retVal = null;
15874
+ this.returnfield = null;
15875
+ this.LinkStartAfterField = 0;
15876
+ this.KeyExpression = 0;
15877
+ this._task = task;
15878
+ this._keyIdx = -1;
15879
+ this._cond = new YesNoExp(true);
15880
+ }
15757
15881
  SetAttributes(attributes) {
15758
15882
  let keys = attributes.Keys;
15759
15883
  keys.forEach((text) => {
@@ -17091,16 +17215,16 @@ class RecordOutOfDataViewException extends ApplicationException {
17091
17215
  }
17092
17216
 
17093
17217
  class XMLBasedDcValuesBuilder extends DcValuesBuilderBase {
17218
+ set SerializedDCVals(value) {
17219
+ this.parser.setXMLdata(value);
17220
+ this.parser.setCurrIndex(0);
17221
+ }
17094
17222
  constructor() {
17095
17223
  super();
17096
17224
  this.dcv = null;
17097
17225
  this.parser = null;
17098
17226
  this.parser = new XmlParser();
17099
17227
  }
17100
- set SerializedDCVals(value) {
17101
- this.parser.setXMLdata(value);
17102
- this.parser.setCurrIndex(0);
17103
- }
17104
17228
  Build() {
17105
17229
  this.dcv = null;
17106
17230
  let endContext = this.parser.getXMLdata().indexOf(XMLConstants.TAG_TERM, this.parser.getCurrIndex());
@@ -17180,6 +17304,39 @@ const RECOVERY_ACT_NONE = 'N';
17180
17304
  const TRANS_STAT_CLOSED = 'C';
17181
17305
  const TRANS_STAT_OPENED = 'O';
17182
17306
  class DataView extends DataViewBase {
17307
+ set InsertAt(value) {
17308
+ this._insertAt = value;
17309
+ }
17310
+ get InsertAt() {
17311
+ return this._insertAt;
17312
+ }
17313
+ get CurrRec() {
17314
+ return this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER;
17315
+ }
17316
+ set CurrRec(value) {
17317
+ if (this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER !== null && value === null) {
17318
+ this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER.resetDcValueId();
17319
+ }
17320
+ this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER = value;
17321
+ if (this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER !== null) {
17322
+ this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER.SetDcValueId();
17323
+ }
17324
+ }
17325
+ get FlushUpdates() {
17326
+ return this._flushUpdates;
17327
+ }
17328
+ get HasMainTable() {
17329
+ return this._hasMainTable;
17330
+ }
17331
+ get CurrentRecId() {
17332
+ return this._currRecId;
17333
+ }
17334
+ get FirstRecord() {
17335
+ return this._recordsTab.getRecByIdx(0);
17336
+ }
17337
+ get LastRecord() {
17338
+ return this._recordsTab.getRecByIdx(this._recordsTab.getSize() - 1);
17339
+ }
17183
17340
  constructor(taskOrDataView) {
17184
17341
  super();
17185
17342
  this._cacheLruTimeStamp = 0;
@@ -17231,39 +17388,6 @@ class DataView extends DataViewBase {
17231
17388
  Object.assign(this, taskOrDataView);
17232
17389
  }
17233
17390
  }
17234
- set InsertAt(value) {
17235
- this._insertAt = value;
17236
- }
17237
- get InsertAt() {
17238
- return this._insertAt;
17239
- }
17240
- get CurrRec() {
17241
- return this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER;
17242
- }
17243
- set CurrRec(value) {
17244
- if (this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER !== null && value === null) {
17245
- this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER.resetDcValueId();
17246
- }
17247
- this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER = value;
17248
- if (this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER !== null) {
17249
- this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER.SetDcValueId();
17250
- }
17251
- }
17252
- get FlushUpdates() {
17253
- return this._flushUpdates;
17254
- }
17255
- get HasMainTable() {
17256
- return this._hasMainTable;
17257
- }
17258
- get CurrentRecId() {
17259
- return this._currRecId;
17260
- }
17261
- get FirstRecord() {
17262
- return this._recordsTab.getRecByIdx(0);
17263
- }
17264
- get LastRecord() {
17265
- return this._recordsTab.getRecByIdx(this._recordsTab.getSize() - 1);
17266
- }
17267
17391
  Init() {
17268
17392
  this.init();
17269
17393
  }
@@ -18893,6 +19017,12 @@ class ReturnResultBase {
18893
19017
  }
18894
19018
 
18895
19019
  class ReturnResult extends ReturnResultBase {
19020
+ get Success() {
19021
+ return this.success;
19022
+ }
19023
+ get ErrorDescription() {
19024
+ return this.errorDescription;
19025
+ }
18896
19026
  constructor(errorDescriptionCodeOrErrorDescriptionOrInnerResult, innerResult) {
18897
19027
  super();
18898
19028
  this.errorDescription = null;
@@ -18907,12 +19037,6 @@ class ReturnResult extends ReturnResultBase {
18907
19037
  else
18908
19038
  this.constructor_03(errorDescriptionCodeOrErrorDescriptionOrInnerResult);
18909
19039
  }
18910
- get Success() {
18911
- return this.success;
18912
- }
18913
- get ErrorDescription() {
18914
- return this.errorDescription;
18915
- }
18916
19040
  constructor_00(errorDescriptionCode) {
18917
19041
  this.success = false;
18918
19042
  this.ErrorId = errorDescriptionCode;
@@ -19016,13 +19140,13 @@ class Transaction {
19016
19140
  }
19017
19141
 
19018
19142
  class TaskTransactionManager {
19143
+ get isClosingTopmostTask() {
19144
+ return MGDataCollection.Instance.StartupMgData.getFirstTask().InEndTask;
19145
+ }
19019
19146
  constructor(task) {
19020
19147
  this.task = null;
19021
19148
  this.task = task;
19022
19149
  }
19023
- get isClosingTopmostTask() {
19024
- return MGDataCollection.Instance.StartupMgData.getFirstTask().InEndTask;
19025
- }
19026
19150
  AllowTransaction(transBegin, forLocal) {
19027
19151
  let result;
19028
19152
  if (forLocal)
@@ -19403,12 +19527,6 @@ class RemoteDataviewManager extends DataviewManagerBase {
19403
19527
  }
19404
19528
 
19405
19529
  class DataviewManager extends DataviewManagerBase {
19406
- constructor(task) {
19407
- super(task);
19408
- this.RemoteDataviewManager = null;
19409
- this.HasRemoteData = true;
19410
- this.RemoteDataviewManager = new RemoteDataviewManager(task);
19411
- }
19412
19530
  get TaskService() {
19413
19531
  return this.Task.TaskService;
19414
19532
  }
@@ -19423,6 +19541,12 @@ class DataviewManager extends DataviewManagerBase {
19423
19541
  get VirtualDataviewManager() {
19424
19542
  return this.TaskService.GetDataviewManagerForVirtuals(this.Task);
19425
19543
  }
19544
+ constructor(task) {
19545
+ super(task);
19546
+ this.RemoteDataviewManager = null;
19547
+ this.HasRemoteData = true;
19548
+ this.RemoteDataviewManager = new RemoteDataviewManager(task);
19549
+ }
19426
19550
  Execute(command) {
19427
19551
  return __awaiter(this, void 0, void 0, function* () {
19428
19552
  return yield this.CurrentDataviewManager.Execute(command);
@@ -19672,11 +19796,7 @@ class MgForm extends MgFormBase {
19672
19796
  this.GetDataview().setTopRecIdxModified(true);
19673
19797
  try {
19674
19798
  this._suffixDone = false;
19675
- let newDisplayLine = this.GetDataview().getCurrRecIdx() + size;
19676
- if (unit === Constants.MOVE_UNIT_PAGE && this.isLineMode())
19677
- if (newDisplayLine > this.GetDataview().getSize() - 1)
19678
- visibleLine -= newDisplayLine - (this.GetDataview().getSize() - 1);
19679
- yield this.setCurrRowByDisplayLine(newDisplayLine, true, false);
19799
+ yield this.setCurrRowByDisplayLine(this.GetDataview().getCurrRecIdx() + size, true, false);
19680
19800
  this.GetDataview().setTopRecIdxModified(false);
19681
19801
  yield this.RefreshDisplay(Constants.TASK_REFRESH_FORM);
19682
19802
  }
@@ -19716,6 +19836,7 @@ class MgForm extends MgFormBase {
19716
19836
  try {
19717
19837
  yield this.RefreshDisplay(Constants.TASK_REFRESH_FORM);
19718
19838
  yield this.setCurrRowByDisplayLine(this.GetDataview().getTopRecIdx() + this.getLastValidRow(), false, true);
19839
+ visibleLine = this.getLastValidRow();
19719
19840
  }
19720
19841
  catch (Exception) {
19721
19842
  }
@@ -21895,8 +22016,10 @@ class EventHandler {
21895
22016
  continue;
21896
22017
  else if (this._operationTab.getOperation(oper.getBlockEnd()).getServerId() < nextOperIdx)
21897
22018
  continue;
21898
- if (!taskEnd)
21899
- yield this._task.evalEndCond(ConstInterface.END_COND_EVAL_IMMIDIATE);
22019
+ if (!taskEnd) {
22020
+ if ((yield this._task.evalEndCond(ConstInterface.END_COND_EVAL_IMMIDIATE)) && Environment.Instance.getSpecialImmediateHandlerEnd())
22021
+ break;
22022
+ }
21900
22023
  if (this._taskMgdID !== mgdID)
21901
22024
  isChangedCurrWndRef.value = true;
21902
22025
  if (!this._task.isMainProg() && this._task.isOpenWin())
@@ -22707,13 +22830,6 @@ class UserEventsTable {
22707
22830
  }
22708
22831
 
22709
22832
  class FormsTable {
22710
- constructor(task, parentForm) {
22711
- this._task = null;
22712
- this._parentForm = null;
22713
- this._formsStringXml = null;
22714
- this._task = task;
22715
- this._parentForm = parentForm;
22716
- }
22717
22833
  get Count() {
22718
22834
  return this._formsStringXml.length;
22719
22835
  }
@@ -22722,6 +22838,13 @@ class FormsTable {
22722
22838
  return this._formsStringXml.get_Item(formDisplayIndex - 1);
22723
22839
  return null;
22724
22840
  }
22841
+ constructor(task, parentForm) {
22842
+ this._task = null;
22843
+ this._parentForm = null;
22844
+ this._formsStringXml = null;
22845
+ this._task = task;
22846
+ this._parentForm = parentForm;
22847
+ }
22725
22848
  fillData() {
22726
22849
  return __awaiter(this, void 0, void 0, function* () {
22727
22850
  this._formsStringXml = new List();
@@ -22917,6 +23040,47 @@ var Task_Direction;
22917
23040
  Task_Direction[Task_Direction["FORE"] = 1] = "FORE";
22918
23041
  })(Task_Direction || (Task_Direction = {}));
22919
23042
  class Task extends TaskBase {
23043
+ get ParentTask() {
23044
+ return this._parentTask;
23045
+ }
23046
+ set TryingToCommit(value) {
23047
+ this._tryingToCommit = value;
23048
+ }
23049
+ get TryingToCommit() {
23050
+ return this._tryingToCommit;
23051
+ }
23052
+ get TaskService() {
23053
+ if (this._taskService == null)
23054
+ this._taskService = new RemoteTaskService();
23055
+ return this._taskService;
23056
+ }
23057
+ static get CommandsProcessor() {
23058
+ return CommandsProcessorManager.GetCommandsProcessor();
23059
+ }
23060
+ get LogicalStudioParentTask() {
23061
+ if (this.StudioParentTask === null && !super.isMainProg()) {
23062
+ return GuiDataCollection.MGDataTable.GetMainProgByCtlIdx(this.ContextID, this._ctlIdx);
23063
+ }
23064
+ return this.StudioParentTask;
23065
+ }
23066
+ get KnownToServer() {
23067
+ return this._knownToServer;
23068
+ }
23069
+ set Transaction(value) {
23070
+ this.DataviewManager.CurrentDataviewManager.Transaction = value;
23071
+ }
23072
+ get Transaction() {
23073
+ return this.DataviewManager.CurrentDataviewManager.Transaction;
23074
+ }
23075
+ get TaskDefinitionId() {
23076
+ if (this.taskDefinitionId === null) {
23077
+ this.taskDefinitionId = new TaskDefinitionId(this._ctlIdx, this.ProgramIsn, this.TaskIsn, this._isPrg);
23078
+ }
23079
+ return this.taskDefinitionId;
23080
+ }
23081
+ static get IsBlockingBatch() {
23082
+ return false;
23083
+ }
22920
23084
  constructor(parent) {
22921
23085
  super();
22922
23086
  this._dvCache = null;
@@ -22985,47 +23149,6 @@ class Task extends TaskBase {
22985
23149
  }
22986
23150
  this.constructor_1(parent);
22987
23151
  }
22988
- get ParentTask() {
22989
- return this._parentTask;
22990
- }
22991
- set TryingToCommit(value) {
22992
- this._tryingToCommit = value;
22993
- }
22994
- get TryingToCommit() {
22995
- return this._tryingToCommit;
22996
- }
22997
- get TaskService() {
22998
- if (this._taskService == null)
22999
- this._taskService = new RemoteTaskService();
23000
- return this._taskService;
23001
- }
23002
- static get CommandsProcessor() {
23003
- return CommandsProcessorManager.GetCommandsProcessor();
23004
- }
23005
- get LogicalStudioParentTask() {
23006
- if (this.StudioParentTask === null && !super.isMainProg()) {
23007
- return GuiDataCollection.MGDataTable.GetMainProgByCtlIdx(this.ContextID, this._ctlIdx);
23008
- }
23009
- return this.StudioParentTask;
23010
- }
23011
- get KnownToServer() {
23012
- return this._knownToServer;
23013
- }
23014
- set Transaction(value) {
23015
- this.DataviewManager.CurrentDataviewManager.Transaction = value;
23016
- }
23017
- get Transaction() {
23018
- return this.DataviewManager.CurrentDataviewManager.Transaction;
23019
- }
23020
- get TaskDefinitionId() {
23021
- if (this.taskDefinitionId === null) {
23022
- this.taskDefinitionId = new TaskDefinitionId(this._ctlIdx, this.ProgramIsn, this.TaskIsn, this._isPrg);
23023
- }
23024
- return this.taskDefinitionId;
23025
- }
23026
- static get IsBlockingBatch() {
23027
- return false;
23028
- }
23029
23152
  constructor_0() {
23030
23153
  this.ActionManager = new ActionManager();
23031
23154
  this.DataView = new DataView(this);
@@ -25523,6 +25646,9 @@ class CompMainPrgTable {
25523
25646
  }
25524
25647
 
25525
25648
  class MGData {
25649
+ get ForceModal() {
25650
+ return this.forceModal;
25651
+ }
25526
25652
  constructor(toClient, toServer, id, parent, isModal, forceModal) {
25527
25653
  this._expHandlers = null;
25528
25654
  this._id = 0;
@@ -25543,9 +25669,6 @@ class MGData {
25543
25669
  else
25544
25670
  this.constructor_1(id, parent, isModal, forceModal);
25545
25671
  }
25546
- get ForceModal() {
25547
- return this.forceModal;
25548
- }
25549
25672
  constructor_0(id, parent, isModal) {
25550
25673
  this._timerHandlers = new HandlersTable();
25551
25674
  this._expHandlers = new HandlersTable();
@@ -29687,13 +29810,6 @@ class VerifyCommand extends ClientTargetedCommandBase {
29687
29810
  }
29688
29811
 
29689
29812
  class EnhancedVerifyCommand extends VerifyCommand {
29690
- constructor() {
29691
- super();
29692
- this._buttonsID = '\0';
29693
- this._image = '\0';
29694
- this._returnValStr = null;
29695
- this._returnVal = null;
29696
- }
29697
29813
  ProcessMessageBoxResponse(task, returnValue) {
29698
29814
  return __awaiter(this, void 0, void 0, function* () {
29699
29815
  if (task !== null)
@@ -29726,6 +29842,13 @@ class EnhancedVerifyCommand extends VerifyCommand {
29726
29842
  break;
29727
29843
  }
29728
29844
  }
29845
+ constructor() {
29846
+ super();
29847
+ this._buttonsID = '\0';
29848
+ this._image = '\0';
29849
+ this._returnValStr = null;
29850
+ this._returnVal = null;
29851
+ }
29729
29852
  }
29730
29853
 
29731
29854
  class ResetRangeCommand extends ClientTargetedCommandBase {
@@ -29830,12 +29953,6 @@ class ResetLocateCommand extends ClientTargetedCommandBase {
29830
29953
  }
29831
29954
 
29832
29955
  class ResultCommand extends ClientTargetedCommandBase {
29833
- constructor() {
29834
- super();
29835
- this._isNull = false;
29836
- this._attr = StorageAttribute.NONE;
29837
- this._val = null;
29838
- }
29839
29956
  Execute(res) {
29840
29957
  return __awaiter(this, void 0, void 0, function* () {
29841
29958
  if (this._isNull)
@@ -29863,6 +29980,12 @@ class ResultCommand extends ClientTargetedCommandBase {
29863
29980
  break;
29864
29981
  }
29865
29982
  }
29983
+ constructor() {
29984
+ super();
29985
+ this._isNull = false;
29986
+ this._attr = StorageAttribute.NONE;
29987
+ this._val = null;
29988
+ }
29866
29989
  }
29867
29990
 
29868
29991
  class AddSortCommand extends ClientTargetedCommandBase {
@@ -30233,19 +30356,9 @@ class CommandsTable {
30233
30356
  }
30234
30357
  }
30235
30358
 
30236
- let CurrentClientVersion = '4.1000.0-dev4100.109';
30359
+ let CurrentClientVersion = '4.1000.0-dev4100.116';
30237
30360
 
30238
30361
  class ClientManager {
30239
- constructor() {
30240
- this._globalUniqueSessionId = null;
30241
- this._buttonIsClicked = false;
30242
- RuntimeContextBase.Instance.Init(RemoteCommandsProcessor.RC_NO_CONTEXT_ID);
30243
- LastFocusedManager.Instance.Init(MGDataCollection.Instance);
30244
- LastFocusedManager.Instance.LastActionTime = Misc.getSystemMilliseconds();
30245
- RemoteCommandsProcessor.ShouldScrambleAndUnscrambleMessages = true;
30246
- this._globalUniqueSessionId = UniqueIDUtils.GetUniqueMachineID() + "_";
30247
- this.RegisterDelegates();
30248
- }
30249
30362
  static get Instance() {
30250
30363
  if (ClientManager._instance === null)
30251
30364
  ClientManager._instance = new ClientManager();
@@ -30447,6 +30560,16 @@ class ClientManager {
30447
30560
  Logger.Instance.WriteToLog("-----------------------------------------------------------------------------", true);
30448
30561
  }
30449
30562
  }
30563
+ constructor() {
30564
+ this._globalUniqueSessionId = null;
30565
+ this._buttonIsClicked = false;
30566
+ RuntimeContextBase.Instance.Init(RemoteCommandsProcessor.RC_NO_CONTEXT_ID);
30567
+ LastFocusedManager.Instance.Init(MGDataCollection.Instance);
30568
+ LastFocusedManager.Instance.LastActionTime = Misc.getSystemMilliseconds();
30569
+ RemoteCommandsProcessor.ShouldScrambleAndUnscrambleMessages = true;
30570
+ this._globalUniqueSessionId = UniqueIDUtils.GetUniqueMachineID() + "_";
30571
+ this.RegisterDelegates();
30572
+ }
30450
30573
  InitGuiManager() {
30451
30574
  Manager.EventsManager = EventsManager.Instance;
30452
30575
  Manager.DefaultServerName = ServerConfig.Instance.getServer();