@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.
- package/esm2020/index.mjs +1 -1
- package/esm2020/src/ClientManager.mjs +17 -14
- package/esm2020/src/ConstInterface.mjs +2 -1
- package/esm2020/src/CurrentClientVersion.mjs +2 -2
- package/esm2020/src/GuiEventsProcessor.mjs +5 -5
- package/esm2020/src/commands/ClientToServer/DataviewCommand.mjs +6 -6
- package/esm2020/src/commands/ClientToServer/EvaluateCommand.mjs +4 -4
- package/esm2020/src/commands/ClientToServer/EventCommand.mjs +8 -8
- package/esm2020/src/commands/ClientToServer/ExecOperCommand.mjs +4 -4
- package/esm2020/src/commands/ClientToServer/IniputForceWriteCommand.mjs +5 -5
- package/esm2020/src/commands/ClientToServer/RecomputeCommand.mjs +7 -7
- package/esm2020/src/commands/ClientToServer/TransactionCommand.mjs +6 -6
- package/esm2020/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +8 -8
- package/esm2020/src/commands/ServerToClient/ResultCommand.mjs +7 -7
- package/esm2020/src/data/DataView.mjs +34 -34
- package/esm2020/src/data/DataviewManager.mjs +7 -7
- package/esm2020/src/data/Record.mjs +10 -10
- package/esm2020/src/data/TaskTransactionManager.mjs +4 -4
- package/esm2020/src/data/XMLBasedDcValuesBuilder.mjs +5 -5
- package/esm2020/src/env/Environment.mjs +14 -7
- package/esm2020/src/event/Event.mjs +4 -1
- package/esm2020/src/event/EventHandler.mjs +8 -3
- package/esm2020/src/event/EventHandlerPosition.mjs +5 -1
- package/esm2020/src/event/EventsManager.mjs +27 -5
- package/esm2020/src/event/IEventsManager.mjs +1 -1
- package/esm2020/src/event/RunTimeEvent.mjs +23 -16
- package/esm2020/src/exp/ExpressionEvaluator.mjs +8 -4
- package/esm2020/src/gui/FormsTable.mjs +8 -8
- package/esm2020/src/gui/MgControl.mjs +10 -13
- package/esm2020/src/gui/MgForm.mjs +9 -23
- package/esm2020/src/http/HttpManager.mjs +8 -8
- package/esm2020/src/remote/RemoteCommandsProcessor.mjs +34 -23
- package/esm2020/src/rt/DataviewHeaderBase.mjs +16 -16
- package/esm2020/src/security/UserDetails.mjs +12 -12
- package/esm2020/src/tasks/MGData.mjs +4 -4
- package/esm2020/src/tasks/RCTimer.mjs +10 -10
- package/esm2020/src/tasks/Task.mjs +43 -42
- package/esm2020/src/util/FlowMonitorQueue.mjs +107 -2
- package/esm2020/src/util/PrmMap.mjs +5 -5
- package/esm2020/src/util/ReturnResult.mjs +7 -7
- package/fesm2015/magic-xpa-engine.mjs +474 -326
- package/fesm2015/magic-xpa-engine.mjs.map +1 -1
- package/fesm2020/magic-xpa-engine.mjs +482 -329
- package/fesm2020/magic-xpa-engine.mjs.map +1 -1
- package/package.json +6 -6
- package/src/ConstInterface.d.ts +1 -0
- package/src/env/Environment.d.ts +2 -0
- package/src/event/EventsManager.d.ts +4 -0
- package/src/event/IEventsManager.d.ts +2 -0
- package/src/event/RunTimeEvent.d.ts +3 -0
- package/src/exp/ExpressionEvaluator.d.ts +1 -1
- package/src/gui/MgControl.d.ts +0 -1
- package/src/gui/MgForm.d.ts +1 -3
- package/src/remote/RemoteCommandsProcessor.d.ts +1 -0
- package/src/util/FlowMonitorQueue.d.ts +8 -0
- package/magic-xpa-engine.d.ts +0 -2
@@ -1,6 +1,6 @@
|
|
1
1
|
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';
|
2
2
|
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';
|
3
|
-
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,
|
3
|
+
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';
|
4
4
|
import { HttpHeaders, HttpErrorResponse } from '@angular/common/http';
|
5
5
|
import { timer, Subject } from 'rxjs';
|
6
6
|
|
@@ -271,6 +271,7 @@ ConstInterface.MG_ATTR_LOCAL_AS400SET = "local_as400set";
|
|
271
271
|
ConstInterface.MG_ATTR_LOCAL_EXTRA_GENGO = "local_extraGengo";
|
272
272
|
ConstInterface.MG_ATTR_LOCAL_FLAGS = "local_flags";
|
273
273
|
ConstInterface.MG_ATTR_SPEACIAL_ANSI_EXP = "SpecialAnsiExpression";
|
274
|
+
ConstInterface.MG_ATTR_SPECIAL_IMMEDIATE_HANDLER_END = "SpecialImmediateHandlerEnd";
|
274
275
|
ConstInterface.MG_ATTR_SPECIAL_SHOW_STATUSBAR_PANES = "SpecialShowStatusBarPanes";
|
275
276
|
ConstInterface.MG_ATTR_SPECIAL_ROUTE_TO_ROOT_PROG_ON_CONTEXT_RECREATION = "SpecialRouteToRootProgramOnContextRecreation";
|
276
277
|
ConstInterface.MG_ATTR_SPECIAL_SPECIAL_EDIT_LEFT_ALIGN = "SpecialEditLeftAlign";
|
@@ -641,13 +642,6 @@ class CommandSerializationHelper {
|
|
641
642
|
}
|
642
643
|
|
643
644
|
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
645
|
get CommandTypeAttribute() {
|
652
646
|
return ConstInterface.MG_ATTR_VAL_EVENT;
|
653
647
|
}
|
@@ -663,6 +657,13 @@ class EventCommand extends ClientOriginatedCommandTaskTag {
|
|
663
657
|
return false;
|
664
658
|
return true;
|
665
659
|
}
|
660
|
+
constructor(magicEvent) {
|
661
|
+
super();
|
662
|
+
this.TaskTag = null;
|
663
|
+
this.MagicEvent = 0;
|
664
|
+
this.ClientRecId = 0;
|
665
|
+
this.MagicEvent = magicEvent;
|
666
|
+
}
|
666
667
|
SerializeCommandData() {
|
667
668
|
let helper = new CommandSerializationHelper();
|
668
669
|
helper.SerializeTaskTag(this.TaskTag);
|
@@ -1172,15 +1173,6 @@ class OpeningTaskDetails {
|
|
1172
1173
|
}
|
1173
1174
|
|
1174
1175
|
class MgControl extends MgControlBase {
|
1175
|
-
constructor(type, taskOrParentMgForm, parentControlOrParentControlIdx) {
|
1176
|
-
if (arguments.length === 0)
|
1177
|
-
super();
|
1178
|
-
else if (arguments.length === 3 && (type === null || type.constructor === Number) && (taskOrParentMgForm === null || taskOrParentMgForm instanceof TaskBase) && (parentControlOrParentControlIdx === null || parentControlOrParentControlIdx.constructor === Number))
|
1179
|
-
super(type, taskOrParentMgForm.getForm(), parentControlOrParentControlIdx);
|
1180
|
-
else
|
1181
|
-
super(type, taskOrParentMgForm, parentControlOrParentControlIdx);
|
1182
|
-
this.initialize();
|
1183
|
-
}
|
1184
1176
|
initialize() {
|
1185
1177
|
this._focusedStopExecution = false;
|
1186
1178
|
this._inControlSuffix = false;
|
@@ -1193,6 +1185,15 @@ class MgControl extends MgControlBase {
|
|
1193
1185
|
this.HasZoomHandler = false;
|
1194
1186
|
this.ArgList = null;
|
1195
1187
|
}
|
1188
|
+
constructor(type, taskOrParentMgForm, parentControlOrParentControlIdx) {
|
1189
|
+
if (arguments.length === 0)
|
1190
|
+
super();
|
1191
|
+
else if (arguments.length === 3 && (type === null || type.constructor === Number) && (taskOrParentMgForm === null || taskOrParentMgForm instanceof TaskBase) && (parentControlOrParentControlIdx === null || parentControlOrParentControlIdx.constructor === Number))
|
1192
|
+
super(type, taskOrParentMgForm.getForm(), parentControlOrParentControlIdx);
|
1193
|
+
else
|
1194
|
+
super(type, taskOrParentMgForm, parentControlOrParentControlIdx);
|
1195
|
+
this.initialize();
|
1196
|
+
}
|
1196
1197
|
GetVarIndex() {
|
1197
1198
|
return super.getForm().getTask().DataView.Dvcount + this.veeIndx;
|
1198
1199
|
}
|
@@ -1459,9 +1460,6 @@ class MgControl extends MgControlBase {
|
|
1459
1460
|
this.KeyStrokeOn = false;
|
1460
1461
|
}
|
1461
1462
|
}
|
1462
|
-
async refreshAndSetItemsListForRadioButton(line, execComputeChoice) {
|
1463
|
-
await super.refreshAndSetItemsListForRadioButton(line, execComputeChoice);
|
1464
|
-
}
|
1465
1463
|
getSubformTask() {
|
1466
1464
|
return this._subformTask;
|
1467
1465
|
}
|
@@ -2818,6 +2816,9 @@ class Event {
|
|
2818
2816
|
case InternalInterface.MG_ACT_INDEX_CHANGE:
|
2819
2817
|
description = 'Index Change';
|
2820
2818
|
break;
|
2819
|
+
case InternalInterface.MG_ACT_DUMP_ENVIRONMENT:
|
2820
|
+
description = 'Dump Environment';
|
2821
|
+
break;
|
2821
2822
|
default:
|
2822
2823
|
description = '';
|
2823
2824
|
break;
|
@@ -3125,6 +3126,27 @@ class MgPriorityBlockingQueue {
|
|
3125
3126
|
}
|
3126
3127
|
|
3127
3128
|
class RunTimeEvent extends RunTimeEventBase {
|
3129
|
+
set ShouldHandleZoom(value) {
|
3130
|
+
this._shouldHandleZoom = value;
|
3131
|
+
}
|
3132
|
+
get ShouldHandleZoom() {
|
3133
|
+
return this._shouldHandleZoom;
|
3134
|
+
}
|
3135
|
+
set Control(value) {
|
3136
|
+
this._ctrl = value;
|
3137
|
+
}
|
3138
|
+
set DisplayLine(value) {
|
3139
|
+
this._displayLine = value;
|
3140
|
+
}
|
3141
|
+
get Control() {
|
3142
|
+
return this._ctrl;
|
3143
|
+
}
|
3144
|
+
get ControlsList() {
|
3145
|
+
return this._controlsList;
|
3146
|
+
}
|
3147
|
+
get Direction() {
|
3148
|
+
return this._direction;
|
3149
|
+
}
|
3128
3150
|
constructor(taskRefOrCtrlRefOrTaskrefOrFldRefOrEvt, ctrlRefOrGuiTriggeredEventOrLineOrControlsListOrDirectionOrColumnHeaderOrRtEvtOrCurrentTask, ignoreSpecifiedControlOrGuiTriggeredEventOrLineOrXOrControlOrActivatedFromMDIFrame, yOrCtlIdx, width, height) {
|
3129
3151
|
super();
|
3130
3152
|
this._controlsList = null;
|
@@ -3153,6 +3175,7 @@ class RunTimeEvent extends RunTimeEventBase {
|
|
3153
3175
|
this._task = null;
|
3154
3176
|
this._taskTag = null;
|
3155
3177
|
this._val = null;
|
3178
|
+
this._shouldHandleZoom = false;
|
3156
3179
|
this.IgnoreSpecifiedControl = false;
|
3157
3180
|
this.LastFocusedVal = null;
|
3158
3181
|
if (arguments.length === 1 && (taskRefOrCtrlRefOrTaskrefOrFldRefOrEvt === null || taskRefOrCtrlRefOrTaskrefOrFldRefOrEvt instanceof TaskBase))
|
@@ -3186,21 +3209,6 @@ class RunTimeEvent extends RunTimeEventBase {
|
|
3186
3209
|
else if (arguments.length === 1 && taskRefOrCtrlRefOrTaskrefOrFldRefOrEvt instanceof RunTimeEvent)
|
3187
3210
|
Object.assign(this, taskRefOrCtrlRefOrTaskrefOrFldRefOrEvt);
|
3188
3211
|
}
|
3189
|
-
set Control(value) {
|
3190
|
-
this._ctrl = value;
|
3191
|
-
}
|
3192
|
-
set DisplayLine(value) {
|
3193
|
-
this._displayLine = value;
|
3194
|
-
}
|
3195
|
-
get Control() {
|
3196
|
-
return this._ctrl;
|
3197
|
-
}
|
3198
|
-
get ControlsList() {
|
3199
|
-
return this._controlsList;
|
3200
|
-
}
|
3201
|
-
get Direction() {
|
3202
|
-
return this._direction;
|
3203
|
-
}
|
3204
3212
|
constructor_5(taskRef) {
|
3205
3213
|
this.init(taskRef);
|
3206
3214
|
}
|
@@ -3530,7 +3538,17 @@ class FlowMonitorQueue {
|
|
3530
3538
|
this._isRecompute = false;
|
3531
3539
|
this._isTask = false;
|
3532
3540
|
this._isTaskFlow = false;
|
3541
|
+
this._isDataView = false;
|
3533
3542
|
this.ShouldSerialize = false;
|
3543
|
+
this.padRight = (string, length, character = ' ') => {
|
3544
|
+
let result = "";
|
3545
|
+
let totalLength = length - string.length;
|
3546
|
+
for (let i = 0; i < totalLength; i++) {
|
3547
|
+
result = character + result;
|
3548
|
+
}
|
3549
|
+
result = result + string;
|
3550
|
+
return result;
|
3551
|
+
};
|
3534
3552
|
}
|
3535
3553
|
static get Instance() {
|
3536
3554
|
if (FlowMonitorQueue._instance === null)
|
@@ -3588,6 +3606,9 @@ class FlowMonitorQueue {
|
|
3588
3606
|
case ConstInterface.MG_ATTR_TASKFLW:
|
3589
3607
|
this._isTaskFlow = XmlParser.getBoolean(valueStr);
|
3590
3608
|
break;
|
3609
|
+
case ConstInterface.MG_TAG_DATAVIEW:
|
3610
|
+
this._isDataView = XmlParser.getBoolean(valueStr);
|
3611
|
+
break;
|
3591
3612
|
case ConstInterface.MG_ATTR_RECOMP:
|
3592
3613
|
this._isRecompute = XmlParser.getBoolean(valueStr);
|
3593
3614
|
break;
|
@@ -3645,6 +3666,96 @@ class FlowMonitorQueue {
|
|
3645
3666
|
Logger.Instance.WriteSupportToLog(taskInfo + ": " + info, true);
|
3646
3667
|
}
|
3647
3668
|
}
|
3669
|
+
appendVirtualsAndParameters(currentValues) {
|
3670
|
+
let act = new ActivityItem(this, FlowMonitorQueue.ACT_TASK_FLW, InternalInterface.MG_ACT_REC_PREFIX);
|
3671
|
+
act.setInfo(currentValues);
|
3672
|
+
this._queue.put(act);
|
3673
|
+
}
|
3674
|
+
addDataViewFlow(task) {
|
3675
|
+
if (this._isDataView) {
|
3676
|
+
let fldTab = task.DataView.GetFieldsTab();
|
3677
|
+
let preparedDisplayString = "";
|
3678
|
+
let finaldisplayData = "\n";
|
3679
|
+
let fldValue;
|
3680
|
+
let data = "";
|
3681
|
+
for (let i = 0; i < fldTab.getSize(); i++) {
|
3682
|
+
let fldDef = fldTab.getField(i);
|
3683
|
+
if (!fldDef.IsEventHandlerField && (fldDef.IsVirtual && !fldDef.VirAsReal) || fldDef.isParam()) {
|
3684
|
+
fldValue = fldDef.isNull() ? fldDef.getNullValue() : fldDef.getValue(true);
|
3685
|
+
data = this.getFieldData(fldDef.getType(), fldValue, fldDef.getPicture(), fldDef.getCellsType(), task);
|
3686
|
+
preparedDisplayString = this.PrepareDisplayString(fldDef.isParam(), fldDef.getVarName(), data, true);
|
3687
|
+
finaldisplayData = finaldisplayData + preparedDisplayString + "\n";
|
3688
|
+
}
|
3689
|
+
}
|
3690
|
+
this.appendVirtualsAndParameters(finaldisplayData);
|
3691
|
+
}
|
3692
|
+
}
|
3693
|
+
getFieldData(Storagetype, data, picture, vecCellType, task) {
|
3694
|
+
switch (Storagetype) {
|
3695
|
+
case StorageAttribute.DOTNET:
|
3696
|
+
data = FlowMonitorQueue.UNPRINTABLE_STR_LOG;
|
3697
|
+
break;
|
3698
|
+
case StorageAttribute.BLOB:
|
3699
|
+
{
|
3700
|
+
if (BlobType.isValidBlob(data)) {
|
3701
|
+
let contentType = BlobType.getContentType(data);
|
3702
|
+
if (contentType == BlobType.CONTENT_TYPE_ANSI || contentType == BlobType.CONTENT_TYPE_UNICODE)
|
3703
|
+
data = data != null ? BlobType.getString(data) : "";
|
3704
|
+
else
|
3705
|
+
data = FlowMonitorQueue.UNPRINTABLE_STR_LOG;
|
3706
|
+
}
|
3707
|
+
else
|
3708
|
+
data = "";
|
3709
|
+
}
|
3710
|
+
break;
|
3711
|
+
case StorageAttribute.NUMERIC:
|
3712
|
+
case StorageAttribute.DATE:
|
3713
|
+
case StorageAttribute.TIME:
|
3714
|
+
let conv = DisplayConvertor.Instance;
|
3715
|
+
data = conv.mg2disp(data, " ", new PIC(picture, Storagetype, task.getCompIdx()), false, task.getCompIdx(), false);
|
3716
|
+
break;
|
3717
|
+
case StorageAttribute.BLOB_VECTOR:
|
3718
|
+
let vecOutData;
|
3719
|
+
if (data == null) {
|
3720
|
+
vecOutData = "[]";
|
3721
|
+
}
|
3722
|
+
else {
|
3723
|
+
let cellAtt = vecCellType;
|
3724
|
+
let vector = new VectorType(data);
|
3725
|
+
if (cellAtt == StorageAttribute.BLOB && !VectorType.validateBlobContents(data))
|
3726
|
+
vecOutData = "[]";
|
3727
|
+
else {
|
3728
|
+
let vecSize = VectorType.getVecSize(data);
|
3729
|
+
let cellPicture = (cellAtt == StorageAttribute.NUMERIC || cellAtt == StorageAttribute.DATE || cellAtt == StorageAttribute.TIME) ? PIC.buildPicture(cellAtt, vector.getVecCell(1), task.getCompIdx(), true).getFormat() : picture;
|
3730
|
+
vecOutData = "[";
|
3731
|
+
for (let i = 0; i < vecSize; i++) {
|
3732
|
+
vecOutData += this.getFieldData(cellAtt, vector.getVecCell(i + 1), cellPicture, vecCellType, task);
|
3733
|
+
vecOutData += i < vecSize - 1 ? "," : "]";
|
3734
|
+
}
|
3735
|
+
}
|
3736
|
+
}
|
3737
|
+
data = vecOutData;
|
3738
|
+
break;
|
3739
|
+
case StorageAttribute.BOOLEAN:
|
3740
|
+
data = data == "1" ? "TRUE" : "FALSE";
|
3741
|
+
break;
|
3742
|
+
}
|
3743
|
+
return data;
|
3744
|
+
}
|
3745
|
+
PrepareDisplayString(mode, name, valueContent, addDoubleQuotes) {
|
3746
|
+
let str = "";
|
3747
|
+
let finalStringToDisplay = "";
|
3748
|
+
if (addDoubleQuotes)
|
3749
|
+
finalStringToDisplay = finalStringToDisplay + "\"";
|
3750
|
+
finalStringToDisplay = finalStringToDisplay + name;
|
3751
|
+
if (addDoubleQuotes)
|
3752
|
+
finalStringToDisplay = finalStringToDisplay + "\"";
|
3753
|
+
let paddedName = this.padRight(name, 34);
|
3754
|
+
let formatOfStringVirtual = `Virtual`;
|
3755
|
+
let formatOfStringParameter = `Parameter`;
|
3756
|
+
str = (mode ? formatOfStringParameter : formatOfStringVirtual) + " : " + `${paddedName}` + " : " + `${valueContent.trim()}`;
|
3757
|
+
return str;
|
3758
|
+
}
|
3648
3759
|
addTaskFlowRec(id, state, taskInfo) {
|
3649
3760
|
if (this._enabled && this._isTaskFlow) {
|
3650
3761
|
let info;
|
@@ -3809,6 +3920,7 @@ class FlowMonitorQueue {
|
|
3809
3920
|
}
|
3810
3921
|
}
|
3811
3922
|
FlowMonitorQueue._instance = null;
|
3923
|
+
FlowMonitorQueue.UNPRINTABLE_STR_LOG = "#UNPRINTABLE#";
|
3812
3924
|
FlowMonitorQueue.S_EVENT_STR1 = ">>Starts ";
|
3813
3925
|
FlowMonitorQueue.S_EVENT_STR2 = " Event";
|
3814
3926
|
FlowMonitorQueue.S_EVENT_PROPAGATED = "Event was propagated";
|
@@ -3870,6 +3982,15 @@ class TimerObjectCollection {
|
|
3870
3982
|
}
|
3871
3983
|
TimerObjectCollection.MgDataToTimerObjList = new Dictionary();
|
3872
3984
|
class RCTimer extends MgTimer {
|
3985
|
+
get TimerIntervalMiliSeconds() {
|
3986
|
+
return this._timerIntervalMilliSeconds;
|
3987
|
+
}
|
3988
|
+
set IsIdleTimer(value) {
|
3989
|
+
this._isIdle = value;
|
3990
|
+
}
|
3991
|
+
get IsIdleTimer() {
|
3992
|
+
return this._isIdle;
|
3993
|
+
}
|
3873
3994
|
constructor(mgData, milliseconds, isIdle) {
|
3874
3995
|
super(milliseconds);
|
3875
3996
|
this._mgData = null;
|
@@ -3881,15 +4002,6 @@ class RCTimer extends MgTimer {
|
|
3881
4002
|
TimerObjectCollection.MgDataToTimerObjList.Add(mgDataId, new List());
|
3882
4003
|
TimerObjectCollection.MgDataToTimerObjList.get_Item(mgDataId).push(this);
|
3883
4004
|
}
|
3884
|
-
get TimerIntervalMiliSeconds() {
|
3885
|
-
return this._timerIntervalMilliSeconds;
|
3886
|
-
}
|
3887
|
-
set IsIdleTimer(value) {
|
3888
|
-
this._isIdle = value;
|
3889
|
-
}
|
3890
|
-
get IsIdleTimer() {
|
3891
|
-
return this._isIdle;
|
3892
|
-
}
|
3893
4005
|
GetMgdata() {
|
3894
4006
|
return this._mgData;
|
3895
4007
|
}
|
@@ -4035,6 +4147,9 @@ class ExecutionStack {
|
|
4035
4147
|
}
|
4036
4148
|
|
4037
4149
|
class ExecOperCommand extends ClientOriginatedCommandTaskTag {
|
4150
|
+
get CommandTypeAttribute() {
|
4151
|
+
return ConstInterface.MG_ATTR_VAL_EXEC_OPER;
|
4152
|
+
}
|
4038
4153
|
constructor() {
|
4039
4154
|
super();
|
4040
4155
|
this.ExecutionStack = null;
|
@@ -4048,9 +4163,6 @@ class ExecOperCommand extends ClientOriginatedCommandTaskTag {
|
|
4048
4163
|
this.CheckOnly = false;
|
4049
4164
|
this.DitIdx = Int32.MinValue;
|
4050
4165
|
}
|
4051
|
-
get CommandTypeAttribute() {
|
4052
|
-
return ConstInterface.MG_ATTR_VAL_EXEC_OPER;
|
4053
|
-
}
|
4054
4166
|
SerializeCommandData() {
|
4055
4167
|
let helper = new CommandSerializationHelper();
|
4056
4168
|
let execStackExists = this.ExecutionStack !== null && !this.ExecutionStack.empty();
|
@@ -4505,13 +4617,6 @@ class HttpClientAsync extends HttpClientBase {
|
|
4505
4617
|
}
|
4506
4618
|
|
4507
4619
|
class HttpManager {
|
4508
|
-
constructor() {
|
4509
|
-
this._httpCommunicationTimeoutMS = HttpManager.DEFAULT_HTTP_COMMUNICATION_TIMEOUT;
|
4510
|
-
this._httpClientAsync = null;
|
4511
|
-
this._isAbortingMagicEngine = false;
|
4512
|
-
this._httpClientAsync = new HttpClientAsync(HttpManager._nativeHttpClient);
|
4513
|
-
this.RegisterBasicDelegates();
|
4514
|
-
}
|
4515
4620
|
getHttpClient() {
|
4516
4621
|
if (this.IsAbortingMagicEngine)
|
4517
4622
|
return new HttpClientSync();
|
@@ -4531,6 +4636,13 @@ class HttpManager {
|
|
4531
4636
|
}
|
4532
4637
|
get IsAbortingMagicEngine() { return this._isAbortingMagicEngine; }
|
4533
4638
|
set IsAbortingMagicEngine(isAbortingMagicEngine) { this._isAbortingMagicEngine = isAbortingMagicEngine; }
|
4639
|
+
constructor() {
|
4640
|
+
this._httpCommunicationTimeoutMS = HttpManager.DEFAULT_HTTP_COMMUNICATION_TIMEOUT;
|
4641
|
+
this._httpClientAsync = null;
|
4642
|
+
this._isAbortingMagicEngine = false;
|
4643
|
+
this._httpClientAsync = new HttpClientAsync(HttpManager._nativeHttpClient);
|
4644
|
+
this.RegisterBasicDelegates();
|
4645
|
+
}
|
4534
4646
|
RegisterBasicDelegates() {
|
4535
4647
|
HttpClientEvents.GetHttpCommunicationTimeout_Event = this.GetHttpCommunicationTimeoutMS.bind(this);
|
4536
4648
|
}
|
@@ -5076,6 +5188,12 @@ var RequestStatus;
|
|
5076
5188
|
RequestStatus[RequestStatus["Abort"] = 2] = "Abort";
|
5077
5189
|
})(RequestStatus || (RequestStatus = {}));
|
5078
5190
|
class RemoteCommandsProcessor extends CommandsProcessorBase {
|
5191
|
+
static GetInstance() {
|
5192
|
+
if (RemoteCommandsProcessor._instance === null) {
|
5193
|
+
RemoteCommandsProcessor._instance = new RemoteCommandsProcessor();
|
5194
|
+
}
|
5195
|
+
return RemoteCommandsProcessor._instance;
|
5196
|
+
}
|
5079
5197
|
constructor() {
|
5080
5198
|
super();
|
5081
5199
|
this._lastRequestTime = 0;
|
@@ -5086,12 +5204,6 @@ class RemoteCommandsProcessor extends CommandsProcessorBase {
|
|
5086
5204
|
HttpManager.GetInstance();
|
5087
5205
|
this.RegisterDelegates();
|
5088
5206
|
}
|
5089
|
-
static GetInstance() {
|
5090
|
-
if (RemoteCommandsProcessor._instance === null) {
|
5091
|
-
RemoteCommandsProcessor._instance = new RemoteCommandsProcessor();
|
5092
|
-
}
|
5093
|
-
return RemoteCommandsProcessor._instance;
|
5094
|
-
}
|
5095
5207
|
CheckAndSetSessionCounter(newSessionCounter) {
|
5096
5208
|
if (newSessionCounter === ConstInterface.SESSION_COUNTER_CLOSE_CTX_INDICATION) {
|
5097
5209
|
Debug.Assert(this.GetSessionCounter() === ConstInterface.SESSION_COUNTER_CLOSE_CTX_INDICATION);
|
@@ -5534,11 +5646,22 @@ class RemoteCommandsProcessor extends CommandsProcessorBase {
|
|
5534
5646
|
}
|
5535
5647
|
}
|
5536
5648
|
}
|
5537
|
-
|
5649
|
+
this.clearLocalStorage();
|
5538
5650
|
throw ex;
|
5539
5651
|
}
|
5540
5652
|
return response;
|
5541
5653
|
}
|
5654
|
+
clearLocalStorage() {
|
5655
|
+
window.localStorage.removeItem(ConstInterface.LAST_ROUTE_EVENT);
|
5656
|
+
window.localStorage.removeItem(ConstInterface.LAST_ROUTE_EVENT_SRC_TSK);
|
5657
|
+
window.localStorage.removeItem(ConstInterface.LAST_ROUTE_EVENT_ARG_LIST);
|
5658
|
+
window.localStorage.removeItem(ConstInterface.IS_SESSION_REINITIALIZING);
|
5659
|
+
window.localStorage.removeItem(ConstInterface.MAIN_PROG_VIEW);
|
5660
|
+
window.localStorage.removeItem(ConstInterface.GLOBAL_PARAM_LIST);
|
5661
|
+
window.localStorage.removeItem(ConstInterface.ENV_VAR_LIST);
|
5662
|
+
window.localStorage.removeItem(ConstInterface.LAST_EXCEPTION);
|
5663
|
+
window.localStorage.removeItem(ConstInterface.CTX_REMOVED_FROM_SRVR);
|
5664
|
+
}
|
5542
5665
|
HandleErrorResponse(response) {
|
5543
5666
|
try {
|
5544
5667
|
Logger.Instance.WriteServerMessagesToLog("MESSAGE FROM SERVER: " + response);
|
@@ -5740,21 +5863,6 @@ RemoteCommandsProcessor.InitialUrl = null;
|
|
5740
5863
|
RemoteCommandsProcessor.WEB_COMMUNICATION_PROTOCOL_VERSION = "14002";
|
5741
5864
|
RemoteCommandsProcessor._shouldScrambleAndUnscrambleMessages = false;
|
5742
5865
|
class HandshakeResponse {
|
5743
|
-
constructor(responseXML) {
|
5744
|
-
this._scrambleMessages = true;
|
5745
|
-
this._contextId = null;
|
5746
|
-
this._privateSessionId = null;
|
5747
|
-
this._inputPassword = false;
|
5748
|
-
this._httpTimeout = 0;
|
5749
|
-
this._systemLogin = null;
|
5750
|
-
this._maxInternalLogLevel = null;
|
5751
|
-
try {
|
5752
|
-
JSON_Utils.JSONFromXML(responseXML, this.FillFromJSON.bind(this));
|
5753
|
-
}
|
5754
|
-
catch (ex) {
|
5755
|
-
Logger.Instance.WriteExceptionToLog(ex, responseXML);
|
5756
|
-
}
|
5757
|
-
}
|
5758
5866
|
get ScrambleMessages() {
|
5759
5867
|
return this._scrambleMessages;
|
5760
5868
|
}
|
@@ -5776,6 +5884,21 @@ class HandshakeResponse {
|
|
5776
5884
|
get MaxInternalLogLevel() {
|
5777
5885
|
return this._maxInternalLogLevel;
|
5778
5886
|
}
|
5887
|
+
constructor(responseXML) {
|
5888
|
+
this._scrambleMessages = true;
|
5889
|
+
this._contextId = null;
|
5890
|
+
this._privateSessionId = null;
|
5891
|
+
this._inputPassword = false;
|
5892
|
+
this._httpTimeout = 0;
|
5893
|
+
this._systemLogin = null;
|
5894
|
+
this._maxInternalLogLevel = null;
|
5895
|
+
try {
|
5896
|
+
JSON_Utils.JSONFromXML(responseXML, this.FillFromJSON.bind(this));
|
5897
|
+
}
|
5898
|
+
catch (ex) {
|
5899
|
+
Logger.Instance.WriteExceptionToLog(ex, responseXML);
|
5900
|
+
}
|
5901
|
+
}
|
5779
5902
|
FillFromJSON(error, result) {
|
5780
5903
|
if (error != null) {
|
5781
5904
|
throw error;
|
@@ -7329,6 +7452,9 @@ class EventHandlerPosition {
|
|
7329
7452
|
case InternalInterface.MG_ACT_REC_SUFFIX:
|
7330
7453
|
case InternalInterface.MG_ACT_CTRL_PREFIX:
|
7331
7454
|
case InternalInterface.MG_ACT_CTRL_SUFFIX: {
|
7455
|
+
if (this._rtEvt.getInternalCode() == InternalInterface.MG_ACT_REC_PREFIX) {
|
7456
|
+
FlowMonitorQueue.Instance.addDataViewFlow(this._task);
|
7457
|
+
}
|
7332
7458
|
if (this._handlerIdx === -1) {
|
7333
7459
|
for (this._handlerIdx = this._handlersTab.getSize() - 1; this._handlerIdx >= 0; this._handlerIdx--) {
|
7334
7460
|
let handler = this._handlersTab.getHandler(this._handlerIdx);
|
@@ -7494,11 +7620,6 @@ var DataViewCommandType;
|
|
7494
7620
|
DataViewCommandType[DataViewCommandType["SQLExecute"] = 20] = "SQLExecute";
|
7495
7621
|
})(DataViewCommandType || (DataViewCommandType = {}));
|
7496
7622
|
class DataviewCommand extends ClientOriginatedCommandTaskTag {
|
7497
|
-
constructor() {
|
7498
|
-
super();
|
7499
|
-
this.CommandType = 0;
|
7500
|
-
this.TaskTag = null;
|
7501
|
-
}
|
7502
7623
|
get CommandTypeAttribute() {
|
7503
7624
|
throw new NotImplementedException();
|
7504
7625
|
}
|
@@ -7509,6 +7630,11 @@ class DataviewCommand extends ClientOriginatedCommandTaskTag {
|
|
7509
7630
|
get ShouldSerialize() {
|
7510
7631
|
return false;
|
7511
7632
|
}
|
7633
|
+
constructor() {
|
7634
|
+
super();
|
7635
|
+
this.CommandType = 0;
|
7636
|
+
this.TaskTag = null;
|
7637
|
+
}
|
7512
7638
|
}
|
7513
7639
|
|
7514
7640
|
class AddUserRangeDataviewCommand extends DataviewCommand {
|
@@ -7730,12 +7856,6 @@ class NonReversibleExitEventCommand extends EventCommand {
|
|
7730
7856
|
}
|
7731
7857
|
|
7732
7858
|
class RecomputeCommand extends ClientOriginatedCommandTaskTag {
|
7733
|
-
constructor() {
|
7734
|
-
super();
|
7735
|
-
this.TaskTag = null;
|
7736
|
-
this.FldId = 0;
|
7737
|
-
this.IgnoreSubformRecompute = false;
|
7738
|
-
}
|
7739
7859
|
get CommandTypeAttribute() {
|
7740
7860
|
return ConstInterface.MG_ATTR_VAL_RECOMP;
|
7741
7861
|
}
|
@@ -7747,17 +7867,18 @@ class RecomputeCommand extends ClientOriginatedCommandTaskTag {
|
|
7747
7867
|
helper.SerializeAttribute(ConstInterface.MG_ATTR_IGNORE_SUBFORM_RECOMPUTE, '1');
|
7748
7868
|
return helper.GetString();
|
7749
7869
|
}
|
7870
|
+
constructor() {
|
7871
|
+
super();
|
7872
|
+
this.TaskTag = null;
|
7873
|
+
this.FldId = 0;
|
7874
|
+
this.IgnoreSubformRecompute = false;
|
7875
|
+
}
|
7750
7876
|
getCommandInfo() {
|
7751
7877
|
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());
|
7752
7878
|
}
|
7753
7879
|
}
|
7754
7880
|
|
7755
7881
|
class TransactionCommand extends ClientOriginatedCommandTaskTag {
|
7756
|
-
constructor() {
|
7757
|
-
super();
|
7758
|
-
this.TaskTag = null;
|
7759
|
-
this.ReversibleExit = false;
|
7760
|
-
}
|
7761
7882
|
get CommandTypeAttribute() {
|
7762
7883
|
return ConstInterface.MG_ATTR_VAL_TRANS;
|
7763
7884
|
}
|
@@ -7771,6 +7892,11 @@ class TransactionCommand extends ClientOriginatedCommandTaskTag {
|
|
7771
7892
|
helper.SerializeAttribute(ConstInterface.MG_ATTR_TRANS_LEVEL, this.Level);
|
7772
7893
|
return helper.GetString();
|
7773
7894
|
}
|
7895
|
+
constructor() {
|
7896
|
+
super();
|
7897
|
+
this.TaskTag = null;
|
7898
|
+
this.ReversibleExit = false;
|
7899
|
+
}
|
7774
7900
|
getCommandInfo() {
|
7775
7901
|
return NString.Format('[{0} in {1}]', this.Oper === 'C' ? 'Commit Transaction' : 'Abort Transaction', this.Task.getTaskInfo());
|
7776
7902
|
}
|
@@ -7789,6 +7915,9 @@ class UnloadCommand extends ClientOriginatedCommand {
|
|
7789
7915
|
}
|
7790
7916
|
|
7791
7917
|
class EvaluateCommand extends ClientOriginatedCommandTaskTag {
|
7918
|
+
get CommandTypeAttribute() {
|
7919
|
+
return ConstInterface.MG_ATTR_VAL_EVAL;
|
7920
|
+
}
|
7792
7921
|
constructor() {
|
7793
7922
|
super();
|
7794
7923
|
this.TaskTag = null;
|
@@ -7797,9 +7926,6 @@ class EvaluateCommand extends ClientOriginatedCommandTaskTag {
|
|
7797
7926
|
this.MprgCreator = null;
|
7798
7927
|
this.LengthExpVal = Int32.MinValue;
|
7799
7928
|
}
|
7800
|
-
get CommandTypeAttribute() {
|
7801
|
-
return ConstInterface.MG_ATTR_VAL_EVAL;
|
7802
|
-
}
|
7803
7929
|
SerializeCommandData() {
|
7804
7930
|
let helper = new CommandSerializationHelper();
|
7805
7931
|
helper.SerializeTaskTag(this.TaskTag);
|
@@ -7847,10 +7973,6 @@ class GlobalParamsQueryCommand extends QueryCommand {
|
|
7847
7973
|
}
|
7848
7974
|
|
7849
7975
|
class IniputForceWriteCommand extends ClientOriginatedCommand {
|
7850
|
-
constructor() {
|
7851
|
-
super();
|
7852
|
-
this.Text = null;
|
7853
|
-
}
|
7854
7976
|
get CommandTypeAttribute() {
|
7855
7977
|
return ConstInterface.MG_ATTR_VAL_INIPUT_FORCE_WRITE;
|
7856
7978
|
}
|
@@ -7860,6 +7982,10 @@ class IniputForceWriteCommand extends ClientOriginatedCommand {
|
|
7860
7982
|
SerializeCommandData() {
|
7861
7983
|
return " " + ConstInterface.MG_ATTR_VAL_INIPUT_PARAM + "=\"" + XmlParser.escape(this.Text) + "\"";
|
7862
7984
|
}
|
7985
|
+
constructor() {
|
7986
|
+
super();
|
7987
|
+
this.Text = null;
|
7988
|
+
}
|
7863
7989
|
getCommandInfo() {
|
7864
7990
|
return NString.Format('[{0} with {1}] ', this.CommandTypeAttribute, this.Text);
|
7865
7991
|
}
|
@@ -8155,10 +8281,6 @@ var ParamParseResult;
|
|
8155
8281
|
})(ParamParseResult || (ParamParseResult = {}));
|
8156
8282
|
|
8157
8283
|
class PrmMap {
|
8158
|
-
constructor() {
|
8159
|
-
this.values = null;
|
8160
|
-
this.values = new Dictionary();
|
8161
|
-
}
|
8162
8284
|
getvalue(s) {
|
8163
8285
|
if (this.values.ContainsKey(s))
|
8164
8286
|
return this.values.get_Item(s);
|
@@ -8171,6 +8293,10 @@ class PrmMap {
|
|
8171
8293
|
remove(s) {
|
8172
8294
|
this.values.Remove(s);
|
8173
8295
|
}
|
8296
|
+
constructor() {
|
8297
|
+
this.values = null;
|
8298
|
+
this.values = new Dictionary();
|
8299
|
+
}
|
8174
8300
|
}
|
8175
8301
|
class MirrorPrmMap extends PrmMap {
|
8176
8302
|
constructor(type) {
|
@@ -8326,6 +8452,7 @@ class Environment {
|
|
8326
8452
|
this._debugMode = 0;
|
8327
8453
|
this._significantNumSize = 0;
|
8328
8454
|
this._specialAnsiExpression = false;
|
8455
|
+
this._specialImmediatehandlerEnd = false;
|
8329
8456
|
this._specialShowStatusBarPanes = false;
|
8330
8457
|
this._specialRouteToRootProgOnContextRecreation = false;
|
8331
8458
|
this._specialCancelOnCreate = false;
|
@@ -8479,6 +8606,9 @@ class Environment {
|
|
8479
8606
|
case ConstInterface.MG_ATTR_LOCAL_FLAGS:
|
8480
8607
|
this._localFlags = valueStr;
|
8481
8608
|
break;
|
8609
|
+
case ConstInterface.MG_ATTR_SPECIAL_IMMEDIATE_HANDLER_END:
|
8610
|
+
this._specialImmediatehandlerEnd = XmlParser.getBoolean(valueStr);
|
8611
|
+
break;
|
8482
8612
|
case ConstInterface.MG_ATTR_SPEACIAL_ANSI_EXP:
|
8483
8613
|
this._specialAnsiExpression = XmlParser.getBoolean(valueStr);
|
8484
8614
|
break;
|
@@ -8683,6 +8813,9 @@ class Environment {
|
|
8683
8813
|
GetLocalFlag(f) {
|
8684
8814
|
return this._localFlags !== null && this._localFlags.indexOf(f) >= 0;
|
8685
8815
|
}
|
8816
|
+
getSpecialImmediateHandlerEnd() {
|
8817
|
+
return this._specialImmediatehandlerEnd;
|
8818
|
+
}
|
8686
8819
|
getSpecialAnsiExpression() {
|
8687
8820
|
return this._specialAnsiExpression;
|
8688
8821
|
}
|
@@ -8752,6 +8885,12 @@ class Environment {
|
|
8752
8885
|
}
|
8753
8886
|
Environment.Instance = new Environment();
|
8754
8887
|
class EnvironmentDetails {
|
8888
|
+
set UpdateInQueryMode(value) {
|
8889
|
+
this._updateInQueryMode = value;
|
8890
|
+
}
|
8891
|
+
set CreateInModifyMode(value) {
|
8892
|
+
this._createInModifyMode = value;
|
8893
|
+
}
|
8755
8894
|
constructor() {
|
8756
8895
|
this._createInModifyMode = false;
|
8757
8896
|
this._updateInQueryMode = false;
|
@@ -8762,12 +8901,6 @@ class EnvironmentDetails {
|
|
8762
8901
|
this.ProjDir = null;
|
8763
8902
|
this.CompIdx = 0;
|
8764
8903
|
}
|
8765
|
-
set UpdateInQueryMode(value) {
|
8766
|
-
this._updateInQueryMode = value;
|
8767
|
-
}
|
8768
|
-
set CreateInModifyMode(value) {
|
8769
|
-
this._createInModifyMode = value;
|
8770
|
-
}
|
8771
8904
|
allowUpdateInQueryMode() {
|
8772
8905
|
return this._updateInQueryMode;
|
8773
8906
|
}
|
@@ -8855,17 +8988,6 @@ class GlobalParams extends MirrorPrmMap {
|
|
8855
8988
|
GlobalParams.Instance = new GlobalParams();
|
8856
8989
|
|
8857
8990
|
class UserDetails {
|
8858
|
-
constructor() {
|
8859
|
-
this.UserName = null;
|
8860
|
-
this.UserID = null;
|
8861
|
-
this.UserInfo = null;
|
8862
|
-
this.Password = null;
|
8863
|
-
this.IsLoggedIn = false;
|
8864
|
-
this.UserName = NString.Empty;
|
8865
|
-
this.UserInfo = NString.Empty;
|
8866
|
-
this.IsLoggedIn = false;
|
8867
|
-
this.setUserID(NString.Empty);
|
8868
|
-
}
|
8869
8991
|
setIsLoggedIn(value) {
|
8870
8992
|
this.IsLoggedIn = value;
|
8871
8993
|
}
|
@@ -8885,6 +9007,17 @@ class UserDetails {
|
|
8885
9007
|
UserDetails._instance = new UserDetails();
|
8886
9008
|
return UserDetails._instance;
|
8887
9009
|
}
|
9010
|
+
constructor() {
|
9011
|
+
this.UserName = null;
|
9012
|
+
this.UserID = null;
|
9013
|
+
this.UserInfo = null;
|
9014
|
+
this.Password = null;
|
9015
|
+
this.IsLoggedIn = false;
|
9016
|
+
this.UserName = NString.Empty;
|
9017
|
+
this.UserInfo = NString.Empty;
|
9018
|
+
this.IsLoggedIn = false;
|
9019
|
+
this.setUserID(NString.Empty);
|
9020
|
+
}
|
8888
9021
|
fillData(parser) {
|
8889
9022
|
let tokensVector;
|
8890
9023
|
let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_TERM, parser.getCurrIndex());
|
@@ -11651,7 +11784,7 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
11651
11784
|
Exp_params = new Array(nArgs);
|
11652
11785
|
for (j = 0; j < nArgs; j++)
|
11653
11786
|
Exp_params[nArgs - 1 - j] = valStack.pop();
|
11654
|
-
this.eval_op_CallJS(this.ExpTask, valStack.pop().StrVal, Exp_params, resVal);
|
11787
|
+
await this.eval_op_CallJS(this.ExpTask, valStack.pop().StrVal, Exp_params, resVal);
|
11655
11788
|
}
|
11656
11789
|
break;
|
11657
11790
|
case ExpressionInterface.EXP_OP_SET_COOKIE:
|
@@ -14029,7 +14162,7 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
14029
14162
|
resVal.MgNumVal = NUM_TYPE.from_double(programIndex);
|
14030
14163
|
}
|
14031
14164
|
}
|
14032
|
-
eval_op_CallJS(task, methodName, expVal, resVal) {
|
14165
|
+
async eval_op_CallJS(task, methodName, expVal, resVal) {
|
14033
14166
|
resVal.Attr = StorageAttribute.ALPHA;
|
14034
14167
|
resVal.StrVal = '';
|
14035
14168
|
if (task.isMainProg()) {
|
@@ -14039,6 +14172,10 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
14039
14172
|
let form = task.getForm();
|
14040
14173
|
let args = this.params2arguments(expVal, 0, expVal.length);
|
14041
14174
|
if (!isNullOrUndefined(args)) {
|
14175
|
+
if (task.isFirstRecordCycle()) {
|
14176
|
+
Commands.invoke();
|
14177
|
+
await Thread.Sleep(10);
|
14178
|
+
}
|
14042
14179
|
resVal.StrVal = Commands.addCallJS(form, form.UniqueName, methodName, args);
|
14043
14180
|
resVal.Attr = StorageAttribute.ALPHA;
|
14044
14181
|
}
|
@@ -14347,6 +14484,12 @@ class DataViewBase extends GuiDataViewBase {
|
|
14347
14484
|
}
|
14348
14485
|
|
14349
14486
|
class Record {
|
14487
|
+
get InCompute() {
|
14488
|
+
return this._inCompute;
|
14489
|
+
}
|
14490
|
+
get InRecompute() {
|
14491
|
+
return this._inRecompute;
|
14492
|
+
}
|
14350
14493
|
constructor(dvOrTableCacheOrCIdOrRecord, dataview) {
|
14351
14494
|
this._id = Int32.MinValue;
|
14352
14495
|
this.dbViewRowIdx = 0;
|
@@ -14364,12 +14507,6 @@ class Record {
|
|
14364
14507
|
else
|
14365
14508
|
this.constructor_1(dvOrTableCacheOrCIdOrRecord, dataview);
|
14366
14509
|
}
|
14367
|
-
get InCompute() {
|
14368
|
-
return this._inCompute;
|
14369
|
-
}
|
14370
|
-
get InRecompute() {
|
14371
|
-
return this._inRecompute;
|
14372
|
-
}
|
14373
14510
|
constructor_0(dvOrTableCache) {
|
14374
14511
|
if (dvOrTableCache instanceof DataViewBase)
|
14375
14512
|
this._dataview = dvOrTableCache;
|
@@ -15165,14 +15302,14 @@ Record.FLAG_MODIFIED_ATLEAST_ONCE = (0x40);
|
|
15165
15302
|
Record.INCREASE = true;
|
15166
15303
|
Record.DECREASE = false;
|
15167
15304
|
class DcValuesReference extends ObjectReferenceBase {
|
15305
|
+
get DcValues() {
|
15306
|
+
return this.Referent;
|
15307
|
+
}
|
15168
15308
|
constructor(controlId, referencedDcValues) {
|
15169
15309
|
super(referencedDcValues);
|
15170
15310
|
this.ditIdx = 0;
|
15171
15311
|
this.ditIdx = controlId;
|
15172
15312
|
}
|
15173
|
-
get DcValues() {
|
15174
|
-
return this.Referent;
|
15175
|
-
}
|
15176
15313
|
Clone() {
|
15177
15314
|
return new DcValuesReference(this.ditIdx, this.Referent);
|
15178
15315
|
}
|
@@ -15448,21 +15585,6 @@ class RecordsTable {
|
|
15448
15585
|
RecordsTable.REC_NOT_FOUND = -1;
|
15449
15586
|
|
15450
15587
|
class DataviewHeaderBase {
|
15451
|
-
constructor(task) {
|
15452
|
-
this._cond = null;
|
15453
|
-
this._task = null;
|
15454
|
-
this.Loc = null;
|
15455
|
-
this._dir = '\0';
|
15456
|
-
this._id = 0;
|
15457
|
-
this._keyIdx = 0;
|
15458
|
-
this._retVal = null;
|
15459
|
-
this.returnfield = null;
|
15460
|
-
this.LinkStartAfterField = 0;
|
15461
|
-
this.KeyExpression = 0;
|
15462
|
-
this._task = task;
|
15463
|
-
this._keyIdx = -1;
|
15464
|
-
this._cond = new YesNoExp(true);
|
15465
|
-
}
|
15466
15588
|
get ReturnField() {
|
15467
15589
|
if (this.returnfield === null && this._retVal !== null)
|
15468
15590
|
this.returnfield = this.Task.getFieldByValueStr(this._retVal);
|
@@ -15483,6 +15605,21 @@ class DataviewHeaderBase {
|
|
15483
15605
|
get LinkEvaluateCondition() {
|
15484
15606
|
return this._linkEvalCondition;
|
15485
15607
|
}
|
15608
|
+
constructor(task) {
|
15609
|
+
this._cond = null;
|
15610
|
+
this._task = null;
|
15611
|
+
this.Loc = null;
|
15612
|
+
this._dir = '\0';
|
15613
|
+
this._id = 0;
|
15614
|
+
this._keyIdx = 0;
|
15615
|
+
this._retVal = null;
|
15616
|
+
this.returnfield = null;
|
15617
|
+
this.LinkStartAfterField = 0;
|
15618
|
+
this.KeyExpression = 0;
|
15619
|
+
this._task = task;
|
15620
|
+
this._keyIdx = -1;
|
15621
|
+
this._cond = new YesNoExp(true);
|
15622
|
+
}
|
15486
15623
|
SetAttributes(attributes) {
|
15487
15624
|
let keys = attributes.Keys;
|
15488
15625
|
keys.forEach((text) => {
|
@@ -16773,16 +16910,16 @@ class RecordOutOfDataViewException extends ApplicationException {
|
|
16773
16910
|
}
|
16774
16911
|
|
16775
16912
|
class XMLBasedDcValuesBuilder extends DcValuesBuilderBase {
|
16913
|
+
set SerializedDCVals(value) {
|
16914
|
+
this.parser.setXMLdata(value);
|
16915
|
+
this.parser.setCurrIndex(0);
|
16916
|
+
}
|
16776
16917
|
constructor() {
|
16777
16918
|
super();
|
16778
16919
|
this.dcv = null;
|
16779
16920
|
this.parser = null;
|
16780
16921
|
this.parser = new XmlParser();
|
16781
16922
|
}
|
16782
|
-
set SerializedDCVals(value) {
|
16783
|
-
this.parser.setXMLdata(value);
|
16784
|
-
this.parser.setCurrIndex(0);
|
16785
|
-
}
|
16786
16923
|
Build() {
|
16787
16924
|
this.dcv = null;
|
16788
16925
|
let endContext = this.parser.getXMLdata().indexOf(XMLConstants.TAG_TERM, this.parser.getCurrIndex());
|
@@ -16840,28 +16977,61 @@ class XMLBasedDcValuesBuilder extends DcValuesBuilderBase {
|
|
16840
16977
|
}
|
16841
16978
|
return super.ParseValues(valueStr, dataType, useHex);
|
16842
16979
|
}
|
16843
|
-
}
|
16844
|
-
|
16845
|
-
const SET_DISPLAYLINE_BY_DV = Int32.MinValue;
|
16846
|
-
const COMPUTE_NEWREC_ON_CLIENT = 'C';
|
16847
|
-
const UNKNOWN_RCMPS_NOT_INITED = 'M';
|
16848
|
-
const UNKNOWN_RCMPS_FOUND = 'Y';
|
16849
|
-
const INVOKED_FROM_OFFLINE_TASK = '-99999';
|
16850
|
-
const CHUNK_CACHE_NEXT = 'N';
|
16851
|
-
const CHUNK_CACHE_PREV = 'P';
|
16852
|
-
const CHUNK_DV_BOTTOM = 'B';
|
16853
|
-
const CHUNK_DV_TOP = 'T';
|
16854
|
-
const COMPUTE_FLUSH_UPDATES = 'H';
|
16855
|
-
const COMPUTE_NEWREC_ON_SERVER = 'S';
|
16856
|
-
const END_DV_TAG = '</' + ConstInterface.MG_TAG_DATAVIEW + '>';
|
16857
|
-
const RECOVERY_ACT_BEGIN_SCREEN = 'S';
|
16858
|
-
const RECOVERY_ACT_BEGIN_TABLE = 'T';
|
16859
|
-
const RECOVERY_ACT_CANCEL = 'C';
|
16860
|
-
const RECOVERY_ACT_MOVE_DIRECTION_BEGIN = 'B';
|
16861
|
-
const RECOVERY_ACT_NONE = 'N';
|
16862
|
-
const TRANS_STAT_CLOSED = 'C';
|
16863
|
-
const TRANS_STAT_OPENED = 'O';
|
16864
|
-
class DataView extends DataViewBase {
|
16980
|
+
}
|
16981
|
+
|
16982
|
+
const SET_DISPLAYLINE_BY_DV = Int32.MinValue;
|
16983
|
+
const COMPUTE_NEWREC_ON_CLIENT = 'C';
|
16984
|
+
const UNKNOWN_RCMPS_NOT_INITED = 'M';
|
16985
|
+
const UNKNOWN_RCMPS_FOUND = 'Y';
|
16986
|
+
const INVOKED_FROM_OFFLINE_TASK = '-99999';
|
16987
|
+
const CHUNK_CACHE_NEXT = 'N';
|
16988
|
+
const CHUNK_CACHE_PREV = 'P';
|
16989
|
+
const CHUNK_DV_BOTTOM = 'B';
|
16990
|
+
const CHUNK_DV_TOP = 'T';
|
16991
|
+
const COMPUTE_FLUSH_UPDATES = 'H';
|
16992
|
+
const COMPUTE_NEWREC_ON_SERVER = 'S';
|
16993
|
+
const END_DV_TAG = '</' + ConstInterface.MG_TAG_DATAVIEW + '>';
|
16994
|
+
const RECOVERY_ACT_BEGIN_SCREEN = 'S';
|
16995
|
+
const RECOVERY_ACT_BEGIN_TABLE = 'T';
|
16996
|
+
const RECOVERY_ACT_CANCEL = 'C';
|
16997
|
+
const RECOVERY_ACT_MOVE_DIRECTION_BEGIN = 'B';
|
16998
|
+
const RECOVERY_ACT_NONE = 'N';
|
16999
|
+
const TRANS_STAT_CLOSED = 'C';
|
17000
|
+
const TRANS_STAT_OPENED = 'O';
|
17001
|
+
class DataView extends DataViewBase {
|
17002
|
+
set InsertAt(value) {
|
17003
|
+
this._insertAt = value;
|
17004
|
+
}
|
17005
|
+
get InsertAt() {
|
17006
|
+
return this._insertAt;
|
17007
|
+
}
|
17008
|
+
get CurrRec() {
|
17009
|
+
return this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER;
|
17010
|
+
}
|
17011
|
+
set CurrRec(value) {
|
17012
|
+
if (this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER !== null && value === null) {
|
17013
|
+
this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER.resetDcValueId();
|
17014
|
+
}
|
17015
|
+
this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER = value;
|
17016
|
+
if (this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER !== null) {
|
17017
|
+
this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER.SetDcValueId();
|
17018
|
+
}
|
17019
|
+
}
|
17020
|
+
get FlushUpdates() {
|
17021
|
+
return this._flushUpdates;
|
17022
|
+
}
|
17023
|
+
get HasMainTable() {
|
17024
|
+
return this._hasMainTable;
|
17025
|
+
}
|
17026
|
+
get CurrentRecId() {
|
17027
|
+
return this._currRecId;
|
17028
|
+
}
|
17029
|
+
get FirstRecord() {
|
17030
|
+
return this._recordsTab.getRecByIdx(0);
|
17031
|
+
}
|
17032
|
+
get LastRecord() {
|
17033
|
+
return this._recordsTab.getRecByIdx(this._recordsTab.getSize() - 1);
|
17034
|
+
}
|
16865
17035
|
constructor(taskOrDataView) {
|
16866
17036
|
super();
|
16867
17037
|
this._cacheLruTimeStamp = 0;
|
@@ -16913,39 +17083,6 @@ class DataView extends DataViewBase {
|
|
16913
17083
|
Object.assign(this, taskOrDataView);
|
16914
17084
|
}
|
16915
17085
|
}
|
16916
|
-
set InsertAt(value) {
|
16917
|
-
this._insertAt = value;
|
16918
|
-
}
|
16919
|
-
get InsertAt() {
|
16920
|
-
return this._insertAt;
|
16921
|
-
}
|
16922
|
-
get CurrRec() {
|
16923
|
-
return this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER;
|
16924
|
-
}
|
16925
|
-
set CurrRec(value) {
|
16926
|
-
if (this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER !== null && value === null) {
|
16927
|
-
this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER.resetDcValueId();
|
16928
|
-
}
|
16929
|
-
this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER = value;
|
16930
|
-
if (this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER !== null) {
|
16931
|
-
this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER.SetDcValueId();
|
16932
|
-
}
|
16933
|
-
}
|
16934
|
-
get FlushUpdates() {
|
16935
|
-
return this._flushUpdates;
|
16936
|
-
}
|
16937
|
-
get HasMainTable() {
|
16938
|
-
return this._hasMainTable;
|
16939
|
-
}
|
16940
|
-
get CurrentRecId() {
|
16941
|
-
return this._currRecId;
|
16942
|
-
}
|
16943
|
-
get FirstRecord() {
|
16944
|
-
return this._recordsTab.getRecByIdx(0);
|
16945
|
-
}
|
16946
|
-
get LastRecord() {
|
16947
|
-
return this._recordsTab.getRecByIdx(this._recordsTab.getSize() - 1);
|
16948
|
-
}
|
16949
17086
|
Init() {
|
16950
17087
|
this.init();
|
16951
17088
|
}
|
@@ -18518,6 +18655,12 @@ class ReturnResultBase {
|
|
18518
18655
|
}
|
18519
18656
|
|
18520
18657
|
class ReturnResult extends ReturnResultBase {
|
18658
|
+
get Success() {
|
18659
|
+
return this.success;
|
18660
|
+
}
|
18661
|
+
get ErrorDescription() {
|
18662
|
+
return this.errorDescription;
|
18663
|
+
}
|
18521
18664
|
constructor(errorDescriptionCodeOrErrorDescriptionOrInnerResult, innerResult) {
|
18522
18665
|
super();
|
18523
18666
|
this.errorDescription = null;
|
@@ -18532,12 +18675,6 @@ class ReturnResult extends ReturnResultBase {
|
|
18532
18675
|
else
|
18533
18676
|
this.constructor_03(errorDescriptionCodeOrErrorDescriptionOrInnerResult);
|
18534
18677
|
}
|
18535
|
-
get Success() {
|
18536
|
-
return this.success;
|
18537
|
-
}
|
18538
|
-
get ErrorDescription() {
|
18539
|
-
return this.errorDescription;
|
18540
|
-
}
|
18541
18678
|
constructor_00(errorDescriptionCode) {
|
18542
18679
|
this.success = false;
|
18543
18680
|
this.ErrorId = errorDescriptionCode;
|
@@ -18637,13 +18774,13 @@ class Transaction {
|
|
18637
18774
|
}
|
18638
18775
|
|
18639
18776
|
class TaskTransactionManager {
|
18777
|
+
get isClosingTopmostTask() {
|
18778
|
+
return MGDataCollection.Instance.StartupMgData.getFirstTask().InEndTask;
|
18779
|
+
}
|
18640
18780
|
constructor(task) {
|
18641
18781
|
this.task = null;
|
18642
18782
|
this.task = task;
|
18643
18783
|
}
|
18644
|
-
get isClosingTopmostTask() {
|
18645
|
-
return MGDataCollection.Instance.StartupMgData.getFirstTask().InEndTask;
|
18646
|
-
}
|
18647
18784
|
AllowTransaction(transBegin, forLocal) {
|
18648
18785
|
let result;
|
18649
18786
|
if (forLocal)
|
@@ -18987,12 +19124,6 @@ class RemoteDataviewManager extends DataviewManagerBase {
|
|
18987
19124
|
}
|
18988
19125
|
|
18989
19126
|
class DataviewManager extends DataviewManagerBase {
|
18990
|
-
constructor(task) {
|
18991
|
-
super(task);
|
18992
|
-
this.RemoteDataviewManager = null;
|
18993
|
-
this.HasRemoteData = true;
|
18994
|
-
this.RemoteDataviewManager = new RemoteDataviewManager(task);
|
18995
|
-
}
|
18996
19127
|
get TaskService() {
|
18997
19128
|
return this.Task.TaskService;
|
18998
19129
|
}
|
@@ -19007,6 +19138,12 @@ class DataviewManager extends DataviewManagerBase {
|
|
19007
19138
|
get VirtualDataviewManager() {
|
19008
19139
|
return this.TaskService.GetDataviewManagerForVirtuals(this.Task);
|
19009
19140
|
}
|
19141
|
+
constructor(task) {
|
19142
|
+
super(task);
|
19143
|
+
this.RemoteDataviewManager = null;
|
19144
|
+
this.HasRemoteData = true;
|
19145
|
+
this.RemoteDataviewManager = new RemoteDataviewManager(task);
|
19146
|
+
}
|
19010
19147
|
async Execute(command) {
|
19011
19148
|
return await this.CurrentDataviewManager.Execute(command);
|
19012
19149
|
}
|
@@ -19145,18 +19282,8 @@ class MgForm extends MgFormBase {
|
|
19145
19282
|
dv = this._task.DataView;
|
19146
19283
|
return (dv);
|
19147
19284
|
}
|
19148
|
-
async moveInView(unit, direction
|
19149
|
-
if (isNullOrUndefined(returnToCtrl))
|
19150
|
-
await this.moveInView_0(unit, direction);
|
19151
|
-
else
|
19152
|
-
await this.moveInView_1(unit, direction, returnToCtrl);
|
19153
|
-
}
|
19154
|
-
async moveInView_0(unit, direction) {
|
19155
|
-
await this.moveInView(unit, direction, true);
|
19156
|
-
}
|
19157
|
-
async moveInView_1(unit, direction, returnToCtrl) {
|
19285
|
+
async moveInView(unit, direction) {
|
19158
19286
|
let oldRecId = Int32.MinValue;
|
19159
|
-
let lastParkedCtrl;
|
19160
19287
|
let currRec = this.GetDataview().getCurrRec();
|
19161
19288
|
let oldTaskMode = ' ';
|
19162
19289
|
let returnToVisibleLine = false;
|
@@ -19411,15 +19538,6 @@ class MgForm extends MgFormBase {
|
|
19411
19538
|
else
|
19412
19539
|
this.SetTableTopIndex();
|
19413
19540
|
await AccessHelper.eventsManager.handleInternalEventWithTask(this._task, InternalInterface.MG_ACT_REC_PREFIX);
|
19414
|
-
if (returnToCtrl) {
|
19415
|
-
lastParkedCtrl = this._task.getLastParkedCtrl();
|
19416
|
-
if (lastParkedCtrl != null) {
|
19417
|
-
let cursorMoved = await lastParkedCtrl.invoke();
|
19418
|
-
if (!cursorMoved) {
|
19419
|
-
await AccessHelper.eventsManager.HandleNonParkableControls(this._task);
|
19420
|
-
}
|
19421
|
-
}
|
19422
|
-
}
|
19423
19541
|
}
|
19424
19542
|
catch (e) {
|
19425
19543
|
if (e instanceof RecordOutOfDataViewException) {
|
@@ -19951,8 +20069,13 @@ class MgForm extends MgFormBase {
|
|
19951
20069
|
finally {
|
19952
20070
|
this._inRefreshDisp = false;
|
19953
20071
|
}
|
19954
|
-
if (refreshType === Constants.TASK_REFRESH_CURR_REC && (!super.isLineMode() || this._tableRefreshed))
|
20072
|
+
if (refreshType === Constants.TASK_REFRESH_CURR_REC && (!super.isLineMode() || this._tableRefreshed)) {
|
19955
20073
|
this.FormRefreshed = true;
|
20074
|
+
if (this._task.isFirstRecordCycle() || AccessHelper.eventsManager.getIsInViewRefresh()) {
|
20075
|
+
Commands.addNoParameters(CommandType.SET_WC_IDLE, this);
|
20076
|
+
AccessHelper.eventsManager.setIsInViewRefresh(false);
|
20077
|
+
}
|
20078
|
+
}
|
19956
20079
|
return true;
|
19957
20080
|
}
|
19958
20081
|
RefreshUI() {
|
@@ -21360,8 +21483,12 @@ class EventHandler {
|
|
21360
21483
|
continue;
|
21361
21484
|
else if (this._operationTab.getOperation(oper.getBlockEnd()).getServerId() < nextOperIdx)
|
21362
21485
|
continue;
|
21363
|
-
if (!taskEnd)
|
21364
|
-
|
21486
|
+
if (!taskEnd) {
|
21487
|
+
let mainLevel = this._task.getMainLevel().toLowerCase();
|
21488
|
+
if (await this._task.evalEndCond(ConstInterface.END_COND_EVAL_IMMIDIATE) && Environment.Instance.getSpecialImmediateHandlerEnd() &&
|
21489
|
+
mainLevel != "RP".toLowerCase() && mainLevel != "TP".toLowerCase() && mainLevel != "RS".toLowerCase() && mainLevel != "TS".toLowerCase())
|
21490
|
+
break;
|
21491
|
+
}
|
21365
21492
|
if (this._taskMgdID !== mgdID)
|
21366
21493
|
isChangedCurrWndRef.value = true;
|
21367
21494
|
if (!this._task.isMainProg() && this._task.isOpenWin())
|
@@ -22155,13 +22282,6 @@ class UserEventsTable {
|
|
22155
22282
|
}
|
22156
22283
|
|
22157
22284
|
class FormsTable {
|
22158
|
-
constructor(task, parentForm) {
|
22159
|
-
this._task = null;
|
22160
|
-
this._parentForm = null;
|
22161
|
-
this._formsStringXml = null;
|
22162
|
-
this._task = task;
|
22163
|
-
this._parentForm = parentForm;
|
22164
|
-
}
|
22165
22285
|
get Count() {
|
22166
22286
|
return this._formsStringXml.length;
|
22167
22287
|
}
|
@@ -22170,6 +22290,13 @@ class FormsTable {
|
|
22170
22290
|
return this._formsStringXml.get_Item(formDisplayIndex - 1);
|
22171
22291
|
return null;
|
22172
22292
|
}
|
22293
|
+
constructor(task, parentForm) {
|
22294
|
+
this._task = null;
|
22295
|
+
this._parentForm = null;
|
22296
|
+
this._formsStringXml = null;
|
22297
|
+
this._task = task;
|
22298
|
+
this._parentForm = parentForm;
|
22299
|
+
}
|
22173
22300
|
async fillData() {
|
22174
22301
|
this._formsStringXml = new List();
|
22175
22302
|
let parser = Manager.GetCurrentRuntimeContext().Parser;
|
@@ -22359,6 +22486,47 @@ var Task_Direction;
|
|
22359
22486
|
Task_Direction[Task_Direction["FORE"] = 1] = "FORE";
|
22360
22487
|
})(Task_Direction || (Task_Direction = {}));
|
22361
22488
|
class Task extends TaskBase {
|
22489
|
+
get ParentTask() {
|
22490
|
+
return this._parentTask;
|
22491
|
+
}
|
22492
|
+
set TryingToCommit(value) {
|
22493
|
+
this._tryingToCommit = value;
|
22494
|
+
}
|
22495
|
+
get TryingToCommit() {
|
22496
|
+
return this._tryingToCommit;
|
22497
|
+
}
|
22498
|
+
get TaskService() {
|
22499
|
+
if (this._taskService == null)
|
22500
|
+
this._taskService = new RemoteTaskService();
|
22501
|
+
return this._taskService;
|
22502
|
+
}
|
22503
|
+
static get CommandsProcessor() {
|
22504
|
+
return CommandsProcessorManager.GetCommandsProcessor();
|
22505
|
+
}
|
22506
|
+
get LogicalStudioParentTask() {
|
22507
|
+
if (this.StudioParentTask === null && !super.isMainProg()) {
|
22508
|
+
return GuiDataCollection.MGDataTable.GetMainProgByCtlIdx(this.ContextID, this._ctlIdx);
|
22509
|
+
}
|
22510
|
+
return this.StudioParentTask;
|
22511
|
+
}
|
22512
|
+
get KnownToServer() {
|
22513
|
+
return this._knownToServer;
|
22514
|
+
}
|
22515
|
+
set Transaction(value) {
|
22516
|
+
this.DataviewManager.CurrentDataviewManager.Transaction = value;
|
22517
|
+
}
|
22518
|
+
get Transaction() {
|
22519
|
+
return this.DataviewManager.CurrentDataviewManager.Transaction;
|
22520
|
+
}
|
22521
|
+
get TaskDefinitionId() {
|
22522
|
+
if (this.taskDefinitionId === null) {
|
22523
|
+
this.taskDefinitionId = new TaskDefinitionId(this._ctlIdx, this.ProgramIsn, this.TaskIsn, this._isPrg);
|
22524
|
+
}
|
22525
|
+
return this.taskDefinitionId;
|
22526
|
+
}
|
22527
|
+
static get IsBlockingBatch() {
|
22528
|
+
return false;
|
22529
|
+
}
|
22362
22530
|
constructor(parent) {
|
22363
22531
|
super();
|
22364
22532
|
this._dvCache = null;
|
@@ -22427,47 +22595,6 @@ class Task extends TaskBase {
|
|
22427
22595
|
}
|
22428
22596
|
this.constructor_1(parent);
|
22429
22597
|
}
|
22430
|
-
get ParentTask() {
|
22431
|
-
return this._parentTask;
|
22432
|
-
}
|
22433
|
-
set TryingToCommit(value) {
|
22434
|
-
this._tryingToCommit = value;
|
22435
|
-
}
|
22436
|
-
get TryingToCommit() {
|
22437
|
-
return this._tryingToCommit;
|
22438
|
-
}
|
22439
|
-
get TaskService() {
|
22440
|
-
if (this._taskService == null)
|
22441
|
-
this._taskService = new RemoteTaskService();
|
22442
|
-
return this._taskService;
|
22443
|
-
}
|
22444
|
-
static get CommandsProcessor() {
|
22445
|
-
return CommandsProcessorManager.GetCommandsProcessor();
|
22446
|
-
}
|
22447
|
-
get LogicalStudioParentTask() {
|
22448
|
-
if (this.StudioParentTask === null && !super.isMainProg()) {
|
22449
|
-
return GuiDataCollection.MGDataTable.GetMainProgByCtlIdx(this.ContextID, this._ctlIdx);
|
22450
|
-
}
|
22451
|
-
return this.StudioParentTask;
|
22452
|
-
}
|
22453
|
-
get KnownToServer() {
|
22454
|
-
return this._knownToServer;
|
22455
|
-
}
|
22456
|
-
set Transaction(value) {
|
22457
|
-
this.DataviewManager.CurrentDataviewManager.Transaction = value;
|
22458
|
-
}
|
22459
|
-
get Transaction() {
|
22460
|
-
return this.DataviewManager.CurrentDataviewManager.Transaction;
|
22461
|
-
}
|
22462
|
-
get TaskDefinitionId() {
|
22463
|
-
if (this.taskDefinitionId === null) {
|
22464
|
-
this.taskDefinitionId = new TaskDefinitionId(this._ctlIdx, this.ProgramIsn, this.TaskIsn, this._isPrg);
|
22465
|
-
}
|
22466
|
-
return this.taskDefinitionId;
|
22467
|
-
}
|
22468
|
-
static get IsBlockingBatch() {
|
22469
|
-
return false;
|
22470
|
-
}
|
22471
22598
|
constructor_0() {
|
22472
22599
|
this.ActionManager = new ActionManager();
|
22473
22600
|
this.DataView = new DataView(this);
|
@@ -24278,6 +24405,7 @@ class Task extends TaskBase {
|
|
24278
24405
|
this.ActionManager.enable(InternalInterface.MG_ACT_SORT_RECORDS, enable);
|
24279
24406
|
enable = await this.checkProp(PropInterface.PROP_TYPE_TASK_PROPERTIES_ALLOW_INDEX, true);
|
24280
24407
|
this.ActionManager.enable(InternalInterface.MG_ACT_VIEW_BY_KEY, enable);
|
24408
|
+
this.ActionManager.enable(InternalInterface.MG_ACT_DUMP_ENVIRONMENT, true);
|
24281
24409
|
}
|
24282
24410
|
setEnableZoomHandler() {
|
24283
24411
|
this._enableZoomHandler = true;
|
@@ -24864,6 +24992,9 @@ class CompMainPrgTable {
|
|
24864
24992
|
}
|
24865
24993
|
|
24866
24994
|
class MGData {
|
24995
|
+
get ForceModal() {
|
24996
|
+
return this.forceModal;
|
24997
|
+
}
|
24867
24998
|
constructor(toClient, toServer, id, parent, isModal, forceModal) {
|
24868
24999
|
this._expHandlers = null;
|
24869
25000
|
this._id = 0;
|
@@ -24884,9 +25015,6 @@ class MGData {
|
|
24884
25015
|
else
|
24885
25016
|
this.constructor_1(id, parent, isModal, forceModal);
|
24886
25017
|
}
|
24887
|
-
get ForceModal() {
|
24888
|
-
return this.forceModal;
|
24889
|
-
}
|
24890
25018
|
constructor_0(id, parent, isModal) {
|
24891
25019
|
this._timerHandlers = new HandlersTable();
|
24892
25020
|
this._expHandlers = new HandlersTable();
|
@@ -25485,6 +25613,7 @@ class EventsManager {
|
|
25485
25613
|
this.confirmationDialogTitle = 'Session is about to be terminated!';
|
25486
25614
|
this._lastFailedFocusedControl = null;
|
25487
25615
|
this.isSpinnerShown = false;
|
25616
|
+
this.isInViewRefresh = false;
|
25488
25617
|
this.SpinnerStopped = new Subject();
|
25489
25618
|
this._rtEvents = new Stack();
|
25490
25619
|
this._eventsQueue = new MgPriorityBlockingQueue();
|
@@ -25696,7 +25825,7 @@ class EventsManager {
|
|
25696
25825
|
if (raiseAt === RaiseAt.TaskInFocus)
|
25697
25826
|
mgControl.setRtEvtTask(LastFocusedManager.Instance.getLastFocusedTask());
|
25698
25827
|
}
|
25699
|
-
await this.handleFocus(mgControl, line, produceClick);
|
25828
|
+
await this.handleFocus(mgControl, line, produceClick, false);
|
25700
25829
|
currTask.setCancelWasRaised(cancelWasRaised);
|
25701
25830
|
if (this._stopExecution)
|
25702
25831
|
return;
|
@@ -26279,7 +26408,7 @@ class EventsManager {
|
|
26279
26408
|
this.setLastSavedRouteEvent(aRtEvt);
|
26280
26409
|
}
|
26281
26410
|
}
|
26282
|
-
async handleFocus(ctrl, line, onClick) {
|
26411
|
+
async handleFocus(ctrl, line, onClick, shouldHandleZoom) {
|
26283
26412
|
try {
|
26284
26413
|
if (ctrl.isStatic())
|
26285
26414
|
return;
|
@@ -26297,6 +26426,10 @@ class EventsManager {
|
|
26297
26426
|
let prevCtrl = LastFocusedManager.getLastFocusedControl();
|
26298
26427
|
if (ctrl === prevCtrl && !ctrl.isRepeatable()) {
|
26299
26428
|
await ctrl.getForm().bringRecordToPage();
|
26429
|
+
await this.HandleZoomIfNeeded(ctrl, line, shouldHandleZoom);
|
26430
|
+
let rtEvnt = this.getLastRtEvent();
|
26431
|
+
if (rtEvnt != null && rtEvnt.ShouldHandleZoom)
|
26432
|
+
FocusManager.SetFocus(ctrl, -1);
|
26300
26433
|
return;
|
26301
26434
|
}
|
26302
26435
|
let prevTask = LastFocusedManager.Instance.getLastFocusedTask();
|
@@ -26336,8 +26469,10 @@ class EventsManager {
|
|
26336
26469
|
}
|
26337
26470
|
else
|
26338
26471
|
await this.HandleNonParkableControls(ctrl.getForm().getTask());
|
26339
|
-
if (!this._stopExecution && MgControl.ReturnToCtrl === ctrl)
|
26472
|
+
if (!this._stopExecution && MgControl.ReturnToCtrl === ctrl) {
|
26340
26473
|
LastFocusedManager.setLastFocusedControl(ctrl.getForm().getTask(), ctrl);
|
26474
|
+
await this.HandleZoomIfNeeded(ctrl, line, shouldHandleZoom);
|
26475
|
+
}
|
26341
26476
|
return;
|
26342
26477
|
}
|
26343
26478
|
finally {
|
@@ -26398,6 +26533,13 @@ class EventsManager {
|
|
26398
26533
|
}
|
26399
26534
|
}
|
26400
26535
|
}
|
26536
|
+
async HandleZoomIfNeeded(ctrl, line, shouldHandleZoom) {
|
26537
|
+
if (shouldHandleZoom) {
|
26538
|
+
var rtEvt = new RunTimeEvent(ctrl, line, true);
|
26539
|
+
rtEvt.setInternal(InternalInterface.MG_ACT_ZOOM);
|
26540
|
+
await this.handleEvent(rtEvt, false);
|
26541
|
+
}
|
26542
|
+
}
|
26401
26543
|
canGoToControl(ctrl, onClick) {
|
26402
26544
|
if (onClick && (ctrl.Type === MgControlType.CTRL_TYPE_SUBFORM || ctrl.Type === MgControlType.CTRL_TYPE_BROWSER))
|
26403
26545
|
return false;
|
@@ -26630,7 +26772,7 @@ class EventsManager {
|
|
26630
26772
|
case InternalInterface.MG_ACT_WEB_ON_DBLICK:
|
26631
26773
|
break;
|
26632
26774
|
case InternalInterface.MG_ACT_CTRL_FOCUS:
|
26633
|
-
await this.handleFocus(ctrl, displayLine, evt.isProduceClick());
|
26775
|
+
await this.handleFocus(ctrl, displayLine, evt.isProduceClick(), evt.ShouldHandleZoom);
|
26634
26776
|
return false;
|
26635
26777
|
case InternalInterface.MG_ACT_CTRL_FOCUS_ON_NON_MAGIC_CONTROL:
|
26636
26778
|
await this.handleFocusOnNonMagicControl(ctrl);
|
@@ -27324,6 +27466,7 @@ class EventsManager {
|
|
27324
27466
|
}
|
27325
27467
|
break;
|
27326
27468
|
case InternalInterface.MG_ACT_SERVER_TERMINATION:
|
27469
|
+
case InternalInterface.MG_ACT_DUMP_ENVIRONMENT:
|
27327
27470
|
cmd = CommandFactory.CreateEventCommand(task.getTaskTag(), intEvtCode);
|
27328
27471
|
cmdsToServer.Add(cmd);
|
27329
27472
|
await CommandsProcessorManager.GetCommandsProcessor().Execute(CommandsProcessorBase_SendingInstruction.TASKS_AND_COMMANDS);
|
@@ -27643,6 +27786,7 @@ class EventsManager {
|
|
27643
27786
|
else if (intEvtCode === InternalInterface.MG_ACT_RT_REFRESH_SCREEN && task.getMode() !== Constants.TASK_MODE_QUERY && !task.getAfterRetry()) {
|
27644
27787
|
await dv.currRecCompute(true);
|
27645
27788
|
}
|
27789
|
+
this.setIsInViewRefresh(true);
|
27646
27790
|
await this.handleInternalEventWithTask(task, InternalInterface.MG_ACT_REC_PREFIX);
|
27647
27791
|
if (!this.GetStopExecutionFlag() && !task.getPreventControlChange()) {
|
27648
27792
|
if (!(task === LastFocusedManager.Instance.getLastFocusedTask() || !task.pathContains(LastFocusedManager.Instance.getLastFocusedTask())))
|
@@ -28372,6 +28516,12 @@ class EventsManager {
|
|
28372
28516
|
return false;
|
28373
28517
|
return true;
|
28374
28518
|
}
|
28519
|
+
getIsInViewRefresh() {
|
28520
|
+
return this.isInViewRefresh;
|
28521
|
+
}
|
28522
|
+
setIsInViewRefresh(inViewRefresh) {
|
28523
|
+
this.isInViewRefresh = inViewRefresh;
|
28524
|
+
}
|
28375
28525
|
}
|
28376
28526
|
EventsManager.REAL_ONLY = true;
|
28377
28527
|
EventsManager.MAX_OPER = 9999;
|
@@ -28480,15 +28630,15 @@ class GuiEventsProcessor extends EventsProcessor {
|
|
28480
28630
|
}
|
28481
28631
|
static processSelection(val, guiMgCtrl, line, produceClick) {
|
28482
28632
|
let mgControl = guiMgCtrl;
|
28483
|
-
if (mgControl.Type === MgControlType.CTRL_TYPE_BUTTON && mgControl.getForm().getTask().getLastParkedCtrl() !== mgControl)
|
28484
|
-
produceClick = true;
|
28485
28633
|
if (guiMgCtrl.ConnectedControl) {
|
28486
28634
|
let rtEvt = new RunTimeEvent(mgControl, +line, true);
|
28487
|
-
rtEvt.setInternal(InternalInterface.
|
28488
|
-
rtEvt.
|
28635
|
+
rtEvt.setInternal(InternalInterface.MG_ACT_CTRL_FOCUS);
|
28636
|
+
rtEvt.ShouldHandleZoom = true;
|
28489
28637
|
EventsManager.Instance.addToTail(rtEvt);
|
28490
28638
|
}
|
28491
28639
|
else {
|
28640
|
+
if (mgControl.Type === MgControlType.CTRL_TYPE_BUTTON && mgControl.getForm().getTask().getLastParkedCtrl() !== mgControl)
|
28641
|
+
produceClick = true;
|
28492
28642
|
let rtEvt = new RunTimeEvent(mgControl, +line, true);
|
28493
28643
|
rtEvt.setInternal(InternalInterface.MG_ACT_SELECTION);
|
28494
28644
|
rtEvt.setValue(val);
|
@@ -28888,13 +29038,6 @@ class VerifyCommand extends ClientTargetedCommandBase {
|
|
28888
29038
|
}
|
28889
29039
|
|
28890
29040
|
class EnhancedVerifyCommand extends VerifyCommand {
|
28891
|
-
constructor() {
|
28892
|
-
super();
|
28893
|
-
this._buttonsID = '\0';
|
28894
|
-
this._image = '\0';
|
28895
|
-
this._returnValStr = null;
|
28896
|
-
this._returnVal = null;
|
28897
|
-
}
|
28898
29041
|
async ProcessMessageBoxResponse(task, returnValue) {
|
28899
29042
|
if (task !== null)
|
28900
29043
|
await Operation.setoperVerifyReturnValue(returnValue, this._returnVal);
|
@@ -28925,6 +29068,13 @@ class EnhancedVerifyCommand extends VerifyCommand {
|
|
28925
29068
|
break;
|
28926
29069
|
}
|
28927
29070
|
}
|
29071
|
+
constructor() {
|
29072
|
+
super();
|
29073
|
+
this._buttonsID = '\0';
|
29074
|
+
this._image = '\0';
|
29075
|
+
this._returnValStr = null;
|
29076
|
+
this._returnVal = null;
|
29077
|
+
}
|
28928
29078
|
}
|
28929
29079
|
|
28930
29080
|
class ResetRangeCommand extends ClientTargetedCommandBase {
|
@@ -29021,12 +29171,6 @@ class ResetLocateCommand extends ClientTargetedCommandBase {
|
|
29021
29171
|
}
|
29022
29172
|
|
29023
29173
|
class ResultCommand extends ClientTargetedCommandBase {
|
29024
|
-
constructor() {
|
29025
|
-
super();
|
29026
|
-
this._isNull = false;
|
29027
|
-
this._attr = StorageAttribute.NONE;
|
29028
|
-
this._val = null;
|
29029
|
-
}
|
29030
29174
|
async Execute(res) {
|
29031
29175
|
if (this._isNull)
|
29032
29176
|
res.SetResultValue(null, StorageAttribute.NONE);
|
@@ -29052,6 +29196,12 @@ class ResultCommand extends ClientTargetedCommandBase {
|
|
29052
29196
|
break;
|
29053
29197
|
}
|
29054
29198
|
}
|
29199
|
+
constructor() {
|
29200
|
+
super();
|
29201
|
+
this._isNull = false;
|
29202
|
+
this._attr = StorageAttribute.NONE;
|
29203
|
+
this._val = null;
|
29204
|
+
}
|
29055
29205
|
}
|
29056
29206
|
|
29057
29207
|
class AddSortCommand extends ClientTargetedCommandBase {
|
@@ -29416,19 +29566,9 @@ class CommandsTable {
|
|
29416
29566
|
}
|
29417
29567
|
}
|
29418
29568
|
|
29419
|
-
let CurrentClientVersion = '4.1000.
|
29569
|
+
let CurrentClientVersion = '4.1000.04100.428';
|
29420
29570
|
|
29421
29571
|
class ClientManager {
|
29422
|
-
constructor() {
|
29423
|
-
this._globalUniqueSessionId = null;
|
29424
|
-
this._buttonIsClicked = false;
|
29425
|
-
RuntimeContextBase.Instance.Init(RemoteCommandsProcessor.RC_NO_CONTEXT_ID);
|
29426
|
-
LastFocusedManager.Instance.Init(MGDataCollection.Instance);
|
29427
|
-
LastFocusedManager.Instance.LastActionTime = Misc.getSystemMilliseconds();
|
29428
|
-
RemoteCommandsProcessor.ShouldScrambleAndUnscrambleMessages = true;
|
29429
|
-
this._globalUniqueSessionId = UniqueIDUtils.GetUniqueMachineID() + "_";
|
29430
|
-
this.RegisterDelegates();
|
29431
|
-
}
|
29432
29572
|
static get Instance() {
|
29433
29573
|
if (ClientManager._instance === null)
|
29434
29574
|
ClientManager._instance = new ClientManager();
|
@@ -29454,7 +29594,7 @@ class ClientManager {
|
|
29454
29594
|
}
|
29455
29595
|
break;
|
29456
29596
|
case "mousedown":
|
29457
|
-
if (control.isButton()) {
|
29597
|
+
if (control.isButton() || (control.ConnectedControl && guiEvent.fromButton)) {
|
29458
29598
|
this._buttonIsClicked = true;
|
29459
29599
|
}
|
29460
29600
|
else if (!control.isSubform())
|
@@ -29473,7 +29613,7 @@ class ClientManager {
|
|
29473
29613
|
}
|
29474
29614
|
break;
|
29475
29615
|
case "focus":
|
29476
|
-
if (this._buttonIsClicked)
|
29616
|
+
if (this._buttonIsClicked || (control.ConnectedControl && guiEvent.fromButton))
|
29477
29617
|
return;
|
29478
29618
|
Events.OnFocus(control, lineIdx, true, false);
|
29479
29619
|
break;
|
@@ -29489,6 +29629,9 @@ class ClientManager {
|
|
29489
29629
|
case "setexternalvalue":
|
29490
29630
|
EventsManager.Instance.AddExternalValueEvent(control, guiEvent.externalValue, guiEvent.param);
|
29491
29631
|
break;
|
29632
|
+
case "setAsThreeState":
|
29633
|
+
control.setAsThreeState();
|
29634
|
+
break;
|
29492
29635
|
default:
|
29493
29636
|
break;
|
29494
29637
|
}
|
@@ -29628,6 +29771,16 @@ class ClientManager {
|
|
29628
29771
|
Logger.Instance.WriteToLog("-----------------------------------------------------------------------------", true);
|
29629
29772
|
}
|
29630
29773
|
}
|
29774
|
+
constructor() {
|
29775
|
+
this._globalUniqueSessionId = null;
|
29776
|
+
this._buttonIsClicked = false;
|
29777
|
+
RuntimeContextBase.Instance.Init(RemoteCommandsProcessor.RC_NO_CONTEXT_ID);
|
29778
|
+
LastFocusedManager.Instance.Init(MGDataCollection.Instance);
|
29779
|
+
LastFocusedManager.Instance.LastActionTime = Misc.getSystemMilliseconds();
|
29780
|
+
RemoteCommandsProcessor.ShouldScrambleAndUnscrambleMessages = true;
|
29781
|
+
this._globalUniqueSessionId = UniqueIDUtils.GetUniqueMachineID() + "_";
|
29782
|
+
this.RegisterDelegates();
|
29783
|
+
}
|
29631
29784
|
InitGuiManager() {
|
29632
29785
|
Manager.EventsManager = EventsManager.Instance;
|
29633
29786
|
Manager.DefaultServerName = ServerConfig.Instance.getServer();
|
@@ -29680,7 +29833,7 @@ class ClientManager {
|
|
29680
29833
|
await MGDataCollection.Instance.addMGData(mgd, 0, true);
|
29681
29834
|
await ClientManager.Instance.WorkThreadExecution();
|
29682
29835
|
if (Logger.Instance.ShouldLog()) {
|
29683
|
-
Logger.Instance.WriteToLog(OSEnvironment.EolSeq + "Ended on " + DateTimeUtils.ToString(DateTime.Now,
|
29836
|
+
Logger.Instance.WriteToLog(OSEnvironment.EolSeq + "Ended on " + DateTimeUtils.ToString(DateTime.Now, XMLConstants.ERROR_LOG_DATE_FORMAT, Logger.Instance) + OSEnvironment.EolSeq + OSEnvironment.EolSeq, false);
|
29684
29837
|
}
|
29685
29838
|
}
|
29686
29839
|
else {
|