@magic-xpa/engine 4.1000.0-dev4100.13 → 4.1000.0-dev4100.134
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/src/ClientManager.mjs +11 -11
- package/esm2020/src/ConstInterface.mjs +3 -1
- package/esm2020/src/CurrentClientVersion.mjs +2 -2
- package/esm2020/src/commands/ClientToServer/CommandFactory.mjs +10 -2
- 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/env/MirrorString.mjs +2 -3
- package/esm2020/src/event/EventHandler.mjs +8 -3
- package/esm2020/src/event/EventHandlerPosition.mjs +5 -1
- package/esm2020/src/event/RunTimeEvent.mjs +16 -16
- package/esm2020/src/exp/ExpressionDict.mjs +8 -8
- package/esm2020/src/exp/ExpressionEvaluator.mjs +24 -176
- package/esm2020/src/gui/FormsTable.mjs +8 -8
- package/esm2020/src/gui/MgControl.mjs +10 -10
- package/esm2020/src/gui/MgForm.mjs +2 -1
- package/esm2020/src/http/HttpManager.mjs +8 -8
- package/esm2020/src/remote/RemoteCommandsProcessor.mjs +35 -26
- 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 +42 -42
- package/esm2020/src/util/FlowMonitorQueue.mjs +107 -2
- package/esm2020/src/util/PrmMap.mjs +6 -6
- package/esm2020/src/util/ReturnResult.mjs +7 -7
- package/fesm2015/magic-xpa-engine.mjs +522 -558
- package/fesm2015/magic-xpa-engine.mjs.map +1 -1
- package/fesm2020/magic-xpa-engine.mjs +514 -528
- package/fesm2020/magic-xpa-engine.mjs.map +1 -1
- package/package.json +6 -6
- package/src/ConstInterface.d.ts +2 -0
- package/src/commands/ClientToServer/CommandFactory.d.ts +3 -0
- package/src/env/Environment.d.ts +2 -0
- package/src/exp/ExpressionEvaluator.d.ts +1 -9
- package/src/util/FlowMonitorQueue.d.ts +8 -0
- package/src/util/PrmMap.d.ts +1 -1
- 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";
|
|
@@ -475,6 +476,7 @@ ConstInterface.RC_TOKEN_DATA = "DATA=";
|
|
|
475
476
|
ConstInterface.WEBCLIENT_REINITIALIZE_REQUEST = "WCREINITIALIZEREQUEST=Y";
|
|
476
477
|
ConstInterface.MAIN_PROG_VIEW = "MainProgramsDataView";
|
|
477
478
|
ConstInterface.GLOBAL_PARAM_LIST = "GlobalParamList";
|
|
479
|
+
ConstInterface.ENV_VAR_LIST = "EnvVarList";
|
|
478
480
|
ConstInterface.LAST_EXCEPTION = "LastException";
|
|
479
481
|
ConstInterface.CTX_REMOVED_FROM_SRVR = "CtxRemovedFromSrvr";
|
|
480
482
|
ConstInterface.LAST_ROUTE_EVENT = "LastRouteEvent";
|
|
@@ -640,13 +642,6 @@ class CommandSerializationHelper {
|
|
|
640
642
|
}
|
|
641
643
|
|
|
642
644
|
class EventCommand extends ClientOriginatedCommandTaskTag {
|
|
643
|
-
constructor(magicEvent) {
|
|
644
|
-
super();
|
|
645
|
-
this.TaskTag = null;
|
|
646
|
-
this.MagicEvent = 0;
|
|
647
|
-
this.ClientRecId = 0;
|
|
648
|
-
this.MagicEvent = magicEvent;
|
|
649
|
-
}
|
|
650
645
|
get CommandTypeAttribute() {
|
|
651
646
|
return ConstInterface.MG_ATTR_VAL_EVENT;
|
|
652
647
|
}
|
|
@@ -662,6 +657,13 @@ class EventCommand extends ClientOriginatedCommandTaskTag {
|
|
|
662
657
|
return false;
|
|
663
658
|
return true;
|
|
664
659
|
}
|
|
660
|
+
constructor(magicEvent) {
|
|
661
|
+
super();
|
|
662
|
+
this.TaskTag = null;
|
|
663
|
+
this.MagicEvent = 0;
|
|
664
|
+
this.ClientRecId = 0;
|
|
665
|
+
this.MagicEvent = magicEvent;
|
|
666
|
+
}
|
|
665
667
|
SerializeCommandData() {
|
|
666
668
|
let helper = new CommandSerializationHelper();
|
|
667
669
|
helper.SerializeTaskTag(this.TaskTag);
|
|
@@ -1171,15 +1173,6 @@ class OpeningTaskDetails {
|
|
|
1171
1173
|
}
|
|
1172
1174
|
|
|
1173
1175
|
class MgControl extends MgControlBase {
|
|
1174
|
-
constructor(type, taskOrParentMgForm, parentControlOrParentControlIdx) {
|
|
1175
|
-
if (arguments.length === 0)
|
|
1176
|
-
super();
|
|
1177
|
-
else if (arguments.length === 3 && (type === null || type.constructor === Number) && (taskOrParentMgForm === null || taskOrParentMgForm instanceof TaskBase) && (parentControlOrParentControlIdx === null || parentControlOrParentControlIdx.constructor === Number))
|
|
1178
|
-
super(type, taskOrParentMgForm.getForm(), parentControlOrParentControlIdx);
|
|
1179
|
-
else
|
|
1180
|
-
super(type, taskOrParentMgForm, parentControlOrParentControlIdx);
|
|
1181
|
-
this.initialize();
|
|
1182
|
-
}
|
|
1183
1176
|
initialize() {
|
|
1184
1177
|
this._focusedStopExecution = false;
|
|
1185
1178
|
this._inControlSuffix = false;
|
|
@@ -1192,6 +1185,15 @@ class MgControl extends MgControlBase {
|
|
|
1192
1185
|
this.HasZoomHandler = false;
|
|
1193
1186
|
this.ArgList = null;
|
|
1194
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
|
+
}
|
|
1195
1197
|
GetVarIndex() {
|
|
1196
1198
|
return super.getForm().getTask().DataView.Dvcount + this.veeIndx;
|
|
1197
1199
|
}
|
|
@@ -3124,6 +3126,21 @@ class MgPriorityBlockingQueue {
|
|
|
3124
3126
|
}
|
|
3125
3127
|
|
|
3126
3128
|
class RunTimeEvent extends RunTimeEventBase {
|
|
3129
|
+
set Control(value) {
|
|
3130
|
+
this._ctrl = value;
|
|
3131
|
+
}
|
|
3132
|
+
set DisplayLine(value) {
|
|
3133
|
+
this._displayLine = value;
|
|
3134
|
+
}
|
|
3135
|
+
get Control() {
|
|
3136
|
+
return this._ctrl;
|
|
3137
|
+
}
|
|
3138
|
+
get ControlsList() {
|
|
3139
|
+
return this._controlsList;
|
|
3140
|
+
}
|
|
3141
|
+
get Direction() {
|
|
3142
|
+
return this._direction;
|
|
3143
|
+
}
|
|
3127
3144
|
constructor(taskRefOrCtrlRefOrTaskrefOrFldRefOrEvt, ctrlRefOrGuiTriggeredEventOrLineOrControlsListOrDirectionOrColumnHeaderOrRtEvtOrCurrentTask, ignoreSpecifiedControlOrGuiTriggeredEventOrLineOrXOrControlOrActivatedFromMDIFrame, yOrCtlIdx, width, height) {
|
|
3128
3145
|
super();
|
|
3129
3146
|
this._controlsList = null;
|
|
@@ -3185,21 +3202,6 @@ class RunTimeEvent extends RunTimeEventBase {
|
|
|
3185
3202
|
else if (arguments.length === 1 && taskRefOrCtrlRefOrTaskrefOrFldRefOrEvt instanceof RunTimeEvent)
|
|
3186
3203
|
Object.assign(this, taskRefOrCtrlRefOrTaskrefOrFldRefOrEvt);
|
|
3187
3204
|
}
|
|
3188
|
-
set Control(value) {
|
|
3189
|
-
this._ctrl = value;
|
|
3190
|
-
}
|
|
3191
|
-
set DisplayLine(value) {
|
|
3192
|
-
this._displayLine = value;
|
|
3193
|
-
}
|
|
3194
|
-
get Control() {
|
|
3195
|
-
return this._ctrl;
|
|
3196
|
-
}
|
|
3197
|
-
get ControlsList() {
|
|
3198
|
-
return this._controlsList;
|
|
3199
|
-
}
|
|
3200
|
-
get Direction() {
|
|
3201
|
-
return this._direction;
|
|
3202
|
-
}
|
|
3203
3205
|
constructor_5(taskRef) {
|
|
3204
3206
|
this.init(taskRef);
|
|
3205
3207
|
}
|
|
@@ -3529,7 +3531,17 @@ class FlowMonitorQueue {
|
|
|
3529
3531
|
this._isRecompute = false;
|
|
3530
3532
|
this._isTask = false;
|
|
3531
3533
|
this._isTaskFlow = false;
|
|
3534
|
+
this._isDataView = false;
|
|
3532
3535
|
this.ShouldSerialize = false;
|
|
3536
|
+
this.padRight = (string, length, character = ' ') => {
|
|
3537
|
+
let result = "";
|
|
3538
|
+
let totalLength = length - string.length;
|
|
3539
|
+
for (let i = 0; i < totalLength; i++) {
|
|
3540
|
+
result = character + result;
|
|
3541
|
+
}
|
|
3542
|
+
result = result + string;
|
|
3543
|
+
return result;
|
|
3544
|
+
};
|
|
3533
3545
|
}
|
|
3534
3546
|
static get Instance() {
|
|
3535
3547
|
if (FlowMonitorQueue._instance === null)
|
|
@@ -3587,6 +3599,9 @@ class FlowMonitorQueue {
|
|
|
3587
3599
|
case ConstInterface.MG_ATTR_TASKFLW:
|
|
3588
3600
|
this._isTaskFlow = XmlParser.getBoolean(valueStr);
|
|
3589
3601
|
break;
|
|
3602
|
+
case ConstInterface.MG_TAG_DATAVIEW:
|
|
3603
|
+
this._isDataView = XmlParser.getBoolean(valueStr);
|
|
3604
|
+
break;
|
|
3590
3605
|
case ConstInterface.MG_ATTR_RECOMP:
|
|
3591
3606
|
this._isRecompute = XmlParser.getBoolean(valueStr);
|
|
3592
3607
|
break;
|
|
@@ -3644,6 +3659,96 @@ class FlowMonitorQueue {
|
|
|
3644
3659
|
Logger.Instance.WriteSupportToLog(taskInfo + ": " + info, true);
|
|
3645
3660
|
}
|
|
3646
3661
|
}
|
|
3662
|
+
appendVirtualsAndParameters(currentValues) {
|
|
3663
|
+
let act = new ActivityItem(this, FlowMonitorQueue.ACT_TASK_FLW, InternalInterface.MG_ACT_REC_PREFIX);
|
|
3664
|
+
act.setInfo(currentValues);
|
|
3665
|
+
this._queue.put(act);
|
|
3666
|
+
}
|
|
3667
|
+
addDataViewFlow(task) {
|
|
3668
|
+
if (this._isDataView) {
|
|
3669
|
+
let fldTab = task.DataView.GetFieldsTab();
|
|
3670
|
+
let preparedDisplayString = "";
|
|
3671
|
+
let finaldisplayData = "\n";
|
|
3672
|
+
let fldValue;
|
|
3673
|
+
let data = "";
|
|
3674
|
+
for (let i = 0; i < fldTab.getSize(); i++) {
|
|
3675
|
+
let fldDef = fldTab.getField(i);
|
|
3676
|
+
if (!fldDef.IsEventHandlerField && (fldDef.IsVirtual && !fldDef.VirAsReal) || fldDef.isParam()) {
|
|
3677
|
+
fldValue = fldDef.isNull() ? fldDef.getNullValue() : fldDef.getValue(true);
|
|
3678
|
+
data = this.getFieldData(fldDef.getType(), fldValue, fldDef.getPicture(), fldDef.getCellsType(), task);
|
|
3679
|
+
preparedDisplayString = this.PrepareDisplayString(fldDef.isParam(), fldDef.getVarName(), data, true);
|
|
3680
|
+
finaldisplayData = finaldisplayData + preparedDisplayString + "\n";
|
|
3681
|
+
}
|
|
3682
|
+
}
|
|
3683
|
+
this.appendVirtualsAndParameters(finaldisplayData);
|
|
3684
|
+
}
|
|
3685
|
+
}
|
|
3686
|
+
getFieldData(Storagetype, data, picture, vecCellType, task) {
|
|
3687
|
+
switch (Storagetype) {
|
|
3688
|
+
case StorageAttribute.DOTNET:
|
|
3689
|
+
data = FlowMonitorQueue.UNPRINTABLE_STR_LOG;
|
|
3690
|
+
break;
|
|
3691
|
+
case StorageAttribute.BLOB:
|
|
3692
|
+
{
|
|
3693
|
+
if (BlobType.isValidBlob(data)) {
|
|
3694
|
+
let contentType = BlobType.getContentType(data);
|
|
3695
|
+
if (contentType == BlobType.CONTENT_TYPE_ANSI || contentType == BlobType.CONTENT_TYPE_UNICODE)
|
|
3696
|
+
data = data != null ? BlobType.getString(data) : "";
|
|
3697
|
+
else
|
|
3698
|
+
data = FlowMonitorQueue.UNPRINTABLE_STR_LOG;
|
|
3699
|
+
}
|
|
3700
|
+
else
|
|
3701
|
+
data = "";
|
|
3702
|
+
}
|
|
3703
|
+
break;
|
|
3704
|
+
case StorageAttribute.NUMERIC:
|
|
3705
|
+
case StorageAttribute.DATE:
|
|
3706
|
+
case StorageAttribute.TIME:
|
|
3707
|
+
let conv = DisplayConvertor.Instance;
|
|
3708
|
+
data = conv.mg2disp(data, " ", new PIC(picture, Storagetype, task.getCompIdx()), false, task.getCompIdx(), false);
|
|
3709
|
+
break;
|
|
3710
|
+
case StorageAttribute.BLOB_VECTOR:
|
|
3711
|
+
let vecOutData;
|
|
3712
|
+
if (data == null) {
|
|
3713
|
+
vecOutData = "[]";
|
|
3714
|
+
}
|
|
3715
|
+
else {
|
|
3716
|
+
let cellAtt = vecCellType;
|
|
3717
|
+
let vector = new VectorType(data);
|
|
3718
|
+
if (cellAtt == StorageAttribute.BLOB && !VectorType.validateBlobContents(data))
|
|
3719
|
+
vecOutData = "[]";
|
|
3720
|
+
else {
|
|
3721
|
+
let vecSize = VectorType.getVecSize(data);
|
|
3722
|
+
let cellPicture = (cellAtt == StorageAttribute.NUMERIC || cellAtt == StorageAttribute.DATE || cellAtt == StorageAttribute.TIME) ? PIC.buildPicture(cellAtt, vector.getVecCell(1), task.getCompIdx(), true).getFormat() : picture;
|
|
3723
|
+
vecOutData = "[";
|
|
3724
|
+
for (let i = 0; i < vecSize; i++) {
|
|
3725
|
+
vecOutData += this.getFieldData(cellAtt, vector.getVecCell(i + 1), cellPicture, vecCellType, task);
|
|
3726
|
+
vecOutData += i < vecSize - 1 ? "," : "]";
|
|
3727
|
+
}
|
|
3728
|
+
}
|
|
3729
|
+
}
|
|
3730
|
+
data = vecOutData;
|
|
3731
|
+
break;
|
|
3732
|
+
case StorageAttribute.BOOLEAN:
|
|
3733
|
+
data = data == "1" ? "TRUE" : "FALSE";
|
|
3734
|
+
break;
|
|
3735
|
+
}
|
|
3736
|
+
return data;
|
|
3737
|
+
}
|
|
3738
|
+
PrepareDisplayString(mode, name, valueContent, addDoubleQuotes) {
|
|
3739
|
+
let str = "";
|
|
3740
|
+
let finalStringToDisplay = "";
|
|
3741
|
+
if (addDoubleQuotes)
|
|
3742
|
+
finalStringToDisplay = finalStringToDisplay + "\"";
|
|
3743
|
+
finalStringToDisplay = finalStringToDisplay + name;
|
|
3744
|
+
if (addDoubleQuotes)
|
|
3745
|
+
finalStringToDisplay = finalStringToDisplay + "\"";
|
|
3746
|
+
let paddedName = this.padRight(name, 34);
|
|
3747
|
+
let formatOfStringVirtual = `Virtual`;
|
|
3748
|
+
let formatOfStringParameter = `Parameter`;
|
|
3749
|
+
str = (mode ? formatOfStringParameter : formatOfStringVirtual) + " : " + `${paddedName}` + " : " + `${valueContent.trim()}`;
|
|
3750
|
+
return str;
|
|
3751
|
+
}
|
|
3647
3752
|
addTaskFlowRec(id, state, taskInfo) {
|
|
3648
3753
|
if (this._enabled && this._isTaskFlow) {
|
|
3649
3754
|
let info;
|
|
@@ -3808,6 +3913,7 @@ class FlowMonitorQueue {
|
|
|
3808
3913
|
}
|
|
3809
3914
|
}
|
|
3810
3915
|
FlowMonitorQueue._instance = null;
|
|
3916
|
+
FlowMonitorQueue.UNPRINTABLE_STR_LOG = "#UNPRINTABLE#";
|
|
3811
3917
|
FlowMonitorQueue.S_EVENT_STR1 = ">>Starts ";
|
|
3812
3918
|
FlowMonitorQueue.S_EVENT_STR2 = " Event";
|
|
3813
3919
|
FlowMonitorQueue.S_EVENT_PROPAGATED = "Event was propagated";
|
|
@@ -3869,6 +3975,15 @@ class TimerObjectCollection {
|
|
|
3869
3975
|
}
|
|
3870
3976
|
TimerObjectCollection.MgDataToTimerObjList = new Dictionary();
|
|
3871
3977
|
class RCTimer extends MgTimer {
|
|
3978
|
+
get TimerIntervalMiliSeconds() {
|
|
3979
|
+
return this._timerIntervalMilliSeconds;
|
|
3980
|
+
}
|
|
3981
|
+
set IsIdleTimer(value) {
|
|
3982
|
+
this._isIdle = value;
|
|
3983
|
+
}
|
|
3984
|
+
get IsIdleTimer() {
|
|
3985
|
+
return this._isIdle;
|
|
3986
|
+
}
|
|
3872
3987
|
constructor(mgData, milliseconds, isIdle) {
|
|
3873
3988
|
super(milliseconds);
|
|
3874
3989
|
this._mgData = null;
|
|
@@ -3880,15 +3995,6 @@ class RCTimer extends MgTimer {
|
|
|
3880
3995
|
TimerObjectCollection.MgDataToTimerObjList.Add(mgDataId, new List());
|
|
3881
3996
|
TimerObjectCollection.MgDataToTimerObjList.get_Item(mgDataId).push(this);
|
|
3882
3997
|
}
|
|
3883
|
-
get TimerIntervalMiliSeconds() {
|
|
3884
|
-
return this._timerIntervalMilliSeconds;
|
|
3885
|
-
}
|
|
3886
|
-
set IsIdleTimer(value) {
|
|
3887
|
-
this._isIdle = value;
|
|
3888
|
-
}
|
|
3889
|
-
get IsIdleTimer() {
|
|
3890
|
-
return this._isIdle;
|
|
3891
|
-
}
|
|
3892
3998
|
GetMgdata() {
|
|
3893
3999
|
return this._mgData;
|
|
3894
4000
|
}
|
|
@@ -4034,6 +4140,9 @@ class ExecutionStack {
|
|
|
4034
4140
|
}
|
|
4035
4141
|
|
|
4036
4142
|
class ExecOperCommand extends ClientOriginatedCommandTaskTag {
|
|
4143
|
+
get CommandTypeAttribute() {
|
|
4144
|
+
return ConstInterface.MG_ATTR_VAL_EXEC_OPER;
|
|
4145
|
+
}
|
|
4037
4146
|
constructor() {
|
|
4038
4147
|
super();
|
|
4039
4148
|
this.ExecutionStack = null;
|
|
@@ -4047,9 +4156,6 @@ class ExecOperCommand extends ClientOriginatedCommandTaskTag {
|
|
|
4047
4156
|
this.CheckOnly = false;
|
|
4048
4157
|
this.DitIdx = Int32.MinValue;
|
|
4049
4158
|
}
|
|
4050
|
-
get CommandTypeAttribute() {
|
|
4051
|
-
return ConstInterface.MG_ATTR_VAL_EXEC_OPER;
|
|
4052
|
-
}
|
|
4053
4159
|
SerializeCommandData() {
|
|
4054
4160
|
let helper = new CommandSerializationHelper();
|
|
4055
4161
|
let execStackExists = this.ExecutionStack !== null && !this.ExecutionStack.empty();
|
|
@@ -4504,13 +4610,6 @@ class HttpClientAsync extends HttpClientBase {
|
|
|
4504
4610
|
}
|
|
4505
4611
|
|
|
4506
4612
|
class HttpManager {
|
|
4507
|
-
constructor() {
|
|
4508
|
-
this._httpCommunicationTimeoutMS = HttpManager.DEFAULT_HTTP_COMMUNICATION_TIMEOUT;
|
|
4509
|
-
this._httpClientAsync = null;
|
|
4510
|
-
this._isAbortingMagicEngine = false;
|
|
4511
|
-
this._httpClientAsync = new HttpClientAsync(HttpManager._nativeHttpClient);
|
|
4512
|
-
this.RegisterBasicDelegates();
|
|
4513
|
-
}
|
|
4514
4613
|
getHttpClient() {
|
|
4515
4614
|
if (this.IsAbortingMagicEngine)
|
|
4516
4615
|
return new HttpClientSync();
|
|
@@ -4530,6 +4629,13 @@ class HttpManager {
|
|
|
4530
4629
|
}
|
|
4531
4630
|
get IsAbortingMagicEngine() { return this._isAbortingMagicEngine; }
|
|
4532
4631
|
set IsAbortingMagicEngine(isAbortingMagicEngine) { this._isAbortingMagicEngine = isAbortingMagicEngine; }
|
|
4632
|
+
constructor() {
|
|
4633
|
+
this._httpCommunicationTimeoutMS = HttpManager.DEFAULT_HTTP_COMMUNICATION_TIMEOUT;
|
|
4634
|
+
this._httpClientAsync = null;
|
|
4635
|
+
this._isAbortingMagicEngine = false;
|
|
4636
|
+
this._httpClientAsync = new HttpClientAsync(HttpManager._nativeHttpClient);
|
|
4637
|
+
this.RegisterBasicDelegates();
|
|
4638
|
+
}
|
|
4533
4639
|
RegisterBasicDelegates() {
|
|
4534
4640
|
HttpClientEvents.GetHttpCommunicationTimeout_Event = this.GetHttpCommunicationTimeoutMS.bind(this);
|
|
4535
4641
|
}
|
|
@@ -5075,6 +5181,12 @@ var RequestStatus;
|
|
|
5075
5181
|
RequestStatus[RequestStatus["Abort"] = 2] = "Abort";
|
|
5076
5182
|
})(RequestStatus || (RequestStatus = {}));
|
|
5077
5183
|
class RemoteCommandsProcessor extends CommandsProcessorBase {
|
|
5184
|
+
static GetInstance() {
|
|
5185
|
+
if (RemoteCommandsProcessor._instance === null) {
|
|
5186
|
+
RemoteCommandsProcessor._instance = new RemoteCommandsProcessor();
|
|
5187
|
+
}
|
|
5188
|
+
return RemoteCommandsProcessor._instance;
|
|
5189
|
+
}
|
|
5078
5190
|
constructor() {
|
|
5079
5191
|
super();
|
|
5080
5192
|
this._lastRequestTime = 0;
|
|
@@ -5085,12 +5197,6 @@ class RemoteCommandsProcessor extends CommandsProcessorBase {
|
|
|
5085
5197
|
HttpManager.GetInstance();
|
|
5086
5198
|
this.RegisterDelegates();
|
|
5087
5199
|
}
|
|
5088
|
-
static GetInstance() {
|
|
5089
|
-
if (RemoteCommandsProcessor._instance === null) {
|
|
5090
|
-
RemoteCommandsProcessor._instance = new RemoteCommandsProcessor();
|
|
5091
|
-
}
|
|
5092
|
-
return RemoteCommandsProcessor._instance;
|
|
5093
|
-
}
|
|
5094
5200
|
CheckAndSetSessionCounter(newSessionCounter) {
|
|
5095
5201
|
if (newSessionCounter === ConstInterface.SESSION_COUNTER_CLOSE_CTX_INDICATION) {
|
|
5096
5202
|
Debug.Assert(this.GetSessionCounter() === ConstInterface.SESSION_COUNTER_CLOSE_CTX_INDICATION);
|
|
@@ -5123,10 +5229,12 @@ class RemoteCommandsProcessor extends CommandsProcessorBase {
|
|
|
5123
5229
|
async StoreSessionReInitializingDataOnLocalStorage() {
|
|
5124
5230
|
let mainPrgViewStringForServer = await this.BuildXMLForMainProgramDataView();
|
|
5125
5231
|
let globalParamsString = AccessHelper.globalParams.mirrorAllToXML();
|
|
5232
|
+
let changedEnvVarList = AccessHelper.envParamsTable.mirrorAllToXML();
|
|
5126
5233
|
let dataStorage = window.localStorage;
|
|
5127
5234
|
dataStorage.setItem(ConstInterface.IS_SESSION_REINITIALIZING, "true");
|
|
5128
5235
|
dataStorage.setItem(ConstInterface.MAIN_PROG_VIEW, mainPrgViewStringForServer.toString());
|
|
5129
5236
|
dataStorage.setItem(ConstInterface.GLOBAL_PARAM_LIST, globalParamsString);
|
|
5237
|
+
dataStorage.setItem(ConstInterface.ENV_VAR_LIST, changedEnvVarList);
|
|
5130
5238
|
dataStorage.setItem(ConstInterface.LAST_EXCEPTION, RemoteCommandsProcessor.lastExceptionMessage);
|
|
5131
5239
|
if (RuntimeContextBase.Instance.RemovedContextFromServer)
|
|
5132
5240
|
dataStorage.setItem(ConstInterface.CTX_REMOVED_FROM_SRVR, "1");
|
|
@@ -5353,6 +5461,7 @@ class RemoteCommandsProcessor extends CommandsProcessorBase {
|
|
|
5353
5461
|
let reqBuf;
|
|
5354
5462
|
let isInitialCall = sessionStage === CommandsProcessorBase_SessionStage.INITIAL;
|
|
5355
5463
|
let globalParamsString = null;
|
|
5464
|
+
let envVarsString = null;
|
|
5356
5465
|
if (this.DelayCommandExecution)
|
|
5357
5466
|
return;
|
|
5358
5467
|
if (Logger.Instance.LogLevel == Logger_LogLevels.RequestInfo && !isInitialCall)
|
|
@@ -5378,12 +5487,16 @@ class RemoteCommandsProcessor extends CommandsProcessorBase {
|
|
|
5378
5487
|
let buffer = new StringBuilder();
|
|
5379
5488
|
if (!RemoteCommandsProcessor.IsSessionReInitializing)
|
|
5380
5489
|
buffer.Append(reqBuf);
|
|
5381
|
-
if (RemoteCommandsProcessor.IsSessionReInitializing)
|
|
5490
|
+
if (RemoteCommandsProcessor.IsSessionReInitializing) {
|
|
5382
5491
|
globalParamsString = this.RestoreSessionReInitializingDataFromLocalStorage(ConstInterface.GLOBAL_PARAM_LIST);
|
|
5383
|
-
|
|
5492
|
+
envVarsString = this.RestoreSessionReInitializingDataFromLocalStorage(ConstInterface.ENV_VAR_LIST);
|
|
5493
|
+
}
|
|
5494
|
+
else {
|
|
5384
5495
|
globalParamsString = AccessHelper.globalParams.mirrorToXML();
|
|
5496
|
+
envVarsString = AccessHelper.envParamsTable.mirrorToXML();
|
|
5497
|
+
}
|
|
5385
5498
|
changes.Append(globalParamsString);
|
|
5386
|
-
changes.Append(
|
|
5499
|
+
changes.Append(envVarsString);
|
|
5387
5500
|
if (changes.Length > 0) {
|
|
5388
5501
|
changes.Insert(0, "<" + ConstInterface.MG_TAG_ENV_CHANGES + ">");
|
|
5389
5502
|
changes.Append("</" + ConstInterface.MG_TAG_ENV_CHANGES + ">");
|
|
@@ -5422,13 +5535,15 @@ class RemoteCommandsProcessor extends CommandsProcessorBase {
|
|
|
5422
5535
|
dataStorage.removeItem(ConstInterface.IS_SESSION_REINITIALIZING);
|
|
5423
5536
|
dataStorage.removeItem(ConstInterface.MAIN_PROG_VIEW);
|
|
5424
5537
|
dataStorage.removeItem(ConstInterface.GLOBAL_PARAM_LIST);
|
|
5538
|
+
dataStorage.removeItem(ConstInterface.ENV_VAR_LIST);
|
|
5425
5539
|
dataStorage.removeItem(ConstInterface.LAST_EXCEPTION);
|
|
5426
5540
|
}
|
|
5427
5541
|
}
|
|
5428
5542
|
FlowMonitorQueue.Instance.enable(false);
|
|
5429
5543
|
await this.ProcessResponse(respBuf, AccessHelper.mgDataTable.currMgdID, null, res);
|
|
5430
5544
|
if (RemoteCommandsProcessor.IsSessionReInitializing) {
|
|
5431
|
-
AccessHelper.globalParams.
|
|
5545
|
+
AccessHelper.globalParams.RestoreParams(globalParamsString);
|
|
5546
|
+
AccessHelper.envParamsTable.RestoreParams(envVarsString);
|
|
5432
5547
|
let dataStorage = window.localStorage;
|
|
5433
5548
|
let ctxRemoved = dataStorage.getItem(ConstInterface.CTX_REMOVED_FROM_SRVR);
|
|
5434
5549
|
if (ctxRemoved === "1") {
|
|
@@ -5730,21 +5845,6 @@ RemoteCommandsProcessor.InitialUrl = null;
|
|
|
5730
5845
|
RemoteCommandsProcessor.WEB_COMMUNICATION_PROTOCOL_VERSION = "14002";
|
|
5731
5846
|
RemoteCommandsProcessor._shouldScrambleAndUnscrambleMessages = false;
|
|
5732
5847
|
class HandshakeResponse {
|
|
5733
|
-
constructor(responseXML) {
|
|
5734
|
-
this._scrambleMessages = true;
|
|
5735
|
-
this._contextId = null;
|
|
5736
|
-
this._privateSessionId = null;
|
|
5737
|
-
this._inputPassword = false;
|
|
5738
|
-
this._httpTimeout = 0;
|
|
5739
|
-
this._systemLogin = null;
|
|
5740
|
-
this._maxInternalLogLevel = null;
|
|
5741
|
-
try {
|
|
5742
|
-
JSON_Utils.JSONFromXML(responseXML, this.FillFromJSON.bind(this));
|
|
5743
|
-
}
|
|
5744
|
-
catch (ex) {
|
|
5745
|
-
Logger.Instance.WriteExceptionToLog(ex, responseXML);
|
|
5746
|
-
}
|
|
5747
|
-
}
|
|
5748
5848
|
get ScrambleMessages() {
|
|
5749
5849
|
return this._scrambleMessages;
|
|
5750
5850
|
}
|
|
@@ -5766,6 +5866,21 @@ class HandshakeResponse {
|
|
|
5766
5866
|
get MaxInternalLogLevel() {
|
|
5767
5867
|
return this._maxInternalLogLevel;
|
|
5768
5868
|
}
|
|
5869
|
+
constructor(responseXML) {
|
|
5870
|
+
this._scrambleMessages = true;
|
|
5871
|
+
this._contextId = null;
|
|
5872
|
+
this._privateSessionId = null;
|
|
5873
|
+
this._inputPassword = false;
|
|
5874
|
+
this._httpTimeout = 0;
|
|
5875
|
+
this._systemLogin = null;
|
|
5876
|
+
this._maxInternalLogLevel = null;
|
|
5877
|
+
try {
|
|
5878
|
+
JSON_Utils.JSONFromXML(responseXML, this.FillFromJSON.bind(this));
|
|
5879
|
+
}
|
|
5880
|
+
catch (ex) {
|
|
5881
|
+
Logger.Instance.WriteExceptionToLog(ex, responseXML);
|
|
5882
|
+
}
|
|
5883
|
+
}
|
|
5769
5884
|
FillFromJSON(error, result) {
|
|
5770
5885
|
if (error != null) {
|
|
5771
5886
|
throw error;
|
|
@@ -6722,7 +6837,7 @@ ExpressionDict.expDesc = [
|
|
|
6722
6837
|
null,
|
|
6723
6838
|
new ExpDesc('N', 0, 0, 0, "", false),
|
|
6724
6839
|
null,
|
|
6725
|
-
|
|
6840
|
+
null,
|
|
6726
6841
|
new ExpDesc('B', 0, 2, 2, "V ", false),
|
|
6727
6842
|
null,
|
|
6728
6843
|
null,
|
|
@@ -7171,12 +7286,12 @@ ExpressionDict.expDesc = [
|
|
|
7171
7286
|
null,
|
|
7172
7287
|
new ExpDesc('A', 0, 1, 1, "A", false),
|
|
7173
7288
|
new ExpDesc('N', 0, 2, 2, "AA", false),
|
|
7174
|
-
|
|
7175
|
-
|
|
7176
|
-
|
|
7177
|
-
|
|
7178
|
-
|
|
7179
|
-
|
|
7289
|
+
null,
|
|
7290
|
+
null,
|
|
7291
|
+
null,
|
|
7292
|
+
null,
|
|
7293
|
+
null,
|
|
7294
|
+
null,
|
|
7180
7295
|
new ExpDesc('N', 0, 1, 1, "N", false),
|
|
7181
7296
|
null,
|
|
7182
7297
|
null,
|
|
@@ -7263,48 +7378,6 @@ ExpressionDict.expDesc = [
|
|
|
7263
7378
|
new ExpDesc('U', 0, 0, 0, '', false),
|
|
7264
7379
|
];
|
|
7265
7380
|
|
|
7266
|
-
var DataViewCommandType;
|
|
7267
|
-
(function (DataViewCommandType) {
|
|
7268
|
-
DataViewCommandType[DataViewCommandType["Init"] = 0] = "Init";
|
|
7269
|
-
DataViewCommandType[DataViewCommandType["Clear"] = 1] = "Clear";
|
|
7270
|
-
DataViewCommandType[DataViewCommandType["Prepare"] = 2] = "Prepare";
|
|
7271
|
-
DataViewCommandType[DataViewCommandType["FirstChunk"] = 3] = "FirstChunk";
|
|
7272
|
-
DataViewCommandType[DataViewCommandType["RecomputeUnit"] = 4] = "RecomputeUnit";
|
|
7273
|
-
DataViewCommandType[DataViewCommandType["ExecuteLocalUpdates"] = 5] = "ExecuteLocalUpdates";
|
|
7274
|
-
DataViewCommandType[DataViewCommandType["InitDataControlViews"] = 6] = "InitDataControlViews";
|
|
7275
|
-
DataViewCommandType[DataViewCommandType["OpenTransaction"] = 7] = "OpenTransaction";
|
|
7276
|
-
DataViewCommandType[DataViewCommandType["CloseTransaction"] = 8] = "CloseTransaction";
|
|
7277
|
-
DataViewCommandType[DataViewCommandType["SetTransactionState"] = 9] = "SetTransactionState";
|
|
7278
|
-
DataViewCommandType[DataViewCommandType["AddUserRange"] = 10] = "AddUserRange";
|
|
7279
|
-
DataViewCommandType[DataViewCommandType["ResetUserRange"] = 11] = "ResetUserRange";
|
|
7280
|
-
DataViewCommandType[DataViewCommandType["DbDisconnect"] = 12] = "DbDisconnect";
|
|
7281
|
-
DataViewCommandType[DataViewCommandType["AddUserLocate"] = 13] = "AddUserLocate";
|
|
7282
|
-
DataViewCommandType[DataViewCommandType["ResetUserLocate"] = 14] = "ResetUserLocate";
|
|
7283
|
-
DataViewCommandType[DataViewCommandType["AddUserSort"] = 15] = "AddUserSort";
|
|
7284
|
-
DataViewCommandType[DataViewCommandType["ResetUserSort"] = 16] = "ResetUserSort";
|
|
7285
|
-
DataViewCommandType[DataViewCommandType["DataViewToDataSource"] = 17] = "DataViewToDataSource";
|
|
7286
|
-
DataViewCommandType[DataViewCommandType["DbDelete"] = 18] = "DbDelete";
|
|
7287
|
-
DataViewCommandType[DataViewCommandType["ControlItemsRefresh"] = 19] = "ControlItemsRefresh";
|
|
7288
|
-
DataViewCommandType[DataViewCommandType["SQLExecute"] = 20] = "SQLExecute";
|
|
7289
|
-
})(DataViewCommandType || (DataViewCommandType = {}));
|
|
7290
|
-
class DataviewCommand extends ClientOriginatedCommandTaskTag {
|
|
7291
|
-
constructor() {
|
|
7292
|
-
super();
|
|
7293
|
-
this.CommandType = 0;
|
|
7294
|
-
this.TaskTag = null;
|
|
7295
|
-
}
|
|
7296
|
-
get CommandTypeAttribute() {
|
|
7297
|
-
throw new NotImplementedException();
|
|
7298
|
-
}
|
|
7299
|
-
SerializeCommandData() {
|
|
7300
|
-
Debug.Assert(false, "Dataview commands need not be serialized");
|
|
7301
|
-
return null;
|
|
7302
|
-
}
|
|
7303
|
-
get ShouldSerialize() {
|
|
7304
|
-
return false;
|
|
7305
|
-
}
|
|
7306
|
-
}
|
|
7307
|
-
|
|
7308
7381
|
class EventHandlerPosition {
|
|
7309
7382
|
constructor() {
|
|
7310
7383
|
this._handlerIdx = 0;
|
|
@@ -7361,6 +7434,9 @@ class EventHandlerPosition {
|
|
|
7361
7434
|
case InternalInterface.MG_ACT_REC_SUFFIX:
|
|
7362
7435
|
case InternalInterface.MG_ACT_CTRL_PREFIX:
|
|
7363
7436
|
case InternalInterface.MG_ACT_CTRL_SUFFIX: {
|
|
7437
|
+
if (this._rtEvt.getInternalCode() == InternalInterface.MG_ACT_REC_PREFIX) {
|
|
7438
|
+
FlowMonitorQueue.Instance.addDataViewFlow(this._task);
|
|
7439
|
+
}
|
|
7364
7440
|
if (this._handlerIdx === -1) {
|
|
7365
7441
|
for (this._handlerIdx = this._handlersTab.getSize() - 1; this._handlerIdx >= 0; this._handlerIdx--) {
|
|
7366
7442
|
let handler = this._handlersTab.getHandler(this._handlerIdx);
|
|
@@ -7501,6 +7577,48 @@ EventHandlerPosition.PHASE_CONTROL_NON_SPECIFIC = 2;
|
|
|
7501
7577
|
EventHandlerPosition.PHASE_GLOBAL = 3;
|
|
7502
7578
|
EventHandlerPosition.PHASE_GLOBAL_SPECIFIC = 4;
|
|
7503
7579
|
|
|
7580
|
+
var DataViewCommandType;
|
|
7581
|
+
(function (DataViewCommandType) {
|
|
7582
|
+
DataViewCommandType[DataViewCommandType["Init"] = 0] = "Init";
|
|
7583
|
+
DataViewCommandType[DataViewCommandType["Clear"] = 1] = "Clear";
|
|
7584
|
+
DataViewCommandType[DataViewCommandType["Prepare"] = 2] = "Prepare";
|
|
7585
|
+
DataViewCommandType[DataViewCommandType["FirstChunk"] = 3] = "FirstChunk";
|
|
7586
|
+
DataViewCommandType[DataViewCommandType["RecomputeUnit"] = 4] = "RecomputeUnit";
|
|
7587
|
+
DataViewCommandType[DataViewCommandType["ExecuteLocalUpdates"] = 5] = "ExecuteLocalUpdates";
|
|
7588
|
+
DataViewCommandType[DataViewCommandType["InitDataControlViews"] = 6] = "InitDataControlViews";
|
|
7589
|
+
DataViewCommandType[DataViewCommandType["OpenTransaction"] = 7] = "OpenTransaction";
|
|
7590
|
+
DataViewCommandType[DataViewCommandType["CloseTransaction"] = 8] = "CloseTransaction";
|
|
7591
|
+
DataViewCommandType[DataViewCommandType["SetTransactionState"] = 9] = "SetTransactionState";
|
|
7592
|
+
DataViewCommandType[DataViewCommandType["AddUserRange"] = 10] = "AddUserRange";
|
|
7593
|
+
DataViewCommandType[DataViewCommandType["ResetUserRange"] = 11] = "ResetUserRange";
|
|
7594
|
+
DataViewCommandType[DataViewCommandType["DbDisconnect"] = 12] = "DbDisconnect";
|
|
7595
|
+
DataViewCommandType[DataViewCommandType["AddUserLocate"] = 13] = "AddUserLocate";
|
|
7596
|
+
DataViewCommandType[DataViewCommandType["ResetUserLocate"] = 14] = "ResetUserLocate";
|
|
7597
|
+
DataViewCommandType[DataViewCommandType["AddUserSort"] = 15] = "AddUserSort";
|
|
7598
|
+
DataViewCommandType[DataViewCommandType["ResetUserSort"] = 16] = "ResetUserSort";
|
|
7599
|
+
DataViewCommandType[DataViewCommandType["DataViewToDataSource"] = 17] = "DataViewToDataSource";
|
|
7600
|
+
DataViewCommandType[DataViewCommandType["DbDelete"] = 18] = "DbDelete";
|
|
7601
|
+
DataViewCommandType[DataViewCommandType["ControlItemsRefresh"] = 19] = "ControlItemsRefresh";
|
|
7602
|
+
DataViewCommandType[DataViewCommandType["SQLExecute"] = 20] = "SQLExecute";
|
|
7603
|
+
})(DataViewCommandType || (DataViewCommandType = {}));
|
|
7604
|
+
class DataviewCommand extends ClientOriginatedCommandTaskTag {
|
|
7605
|
+
get CommandTypeAttribute() {
|
|
7606
|
+
throw new NotImplementedException();
|
|
7607
|
+
}
|
|
7608
|
+
SerializeCommandData() {
|
|
7609
|
+
Debug.Assert(false, "Dataview commands need not be serialized");
|
|
7610
|
+
return null;
|
|
7611
|
+
}
|
|
7612
|
+
get ShouldSerialize() {
|
|
7613
|
+
return false;
|
|
7614
|
+
}
|
|
7615
|
+
constructor() {
|
|
7616
|
+
super();
|
|
7617
|
+
this.CommandType = 0;
|
|
7618
|
+
this.TaskTag = null;
|
|
7619
|
+
}
|
|
7620
|
+
}
|
|
7621
|
+
|
|
7504
7622
|
class AddUserRangeDataviewCommand extends DataviewCommand {
|
|
7505
7623
|
constructor() {
|
|
7506
7624
|
super();
|
|
@@ -7720,12 +7838,6 @@ class NonReversibleExitEventCommand extends EventCommand {
|
|
|
7720
7838
|
}
|
|
7721
7839
|
|
|
7722
7840
|
class RecomputeCommand extends ClientOriginatedCommandTaskTag {
|
|
7723
|
-
constructor() {
|
|
7724
|
-
super();
|
|
7725
|
-
this.TaskTag = null;
|
|
7726
|
-
this.FldId = 0;
|
|
7727
|
-
this.IgnoreSubformRecompute = false;
|
|
7728
|
-
}
|
|
7729
7841
|
get CommandTypeAttribute() {
|
|
7730
7842
|
return ConstInterface.MG_ATTR_VAL_RECOMP;
|
|
7731
7843
|
}
|
|
@@ -7737,17 +7849,18 @@ class RecomputeCommand extends ClientOriginatedCommandTaskTag {
|
|
|
7737
7849
|
helper.SerializeAttribute(ConstInterface.MG_ATTR_IGNORE_SUBFORM_RECOMPUTE, '1');
|
|
7738
7850
|
return helper.GetString();
|
|
7739
7851
|
}
|
|
7852
|
+
constructor() {
|
|
7853
|
+
super();
|
|
7854
|
+
this.TaskTag = null;
|
|
7855
|
+
this.FldId = 0;
|
|
7856
|
+
this.IgnoreSubformRecompute = false;
|
|
7857
|
+
}
|
|
7740
7858
|
getCommandInfo() {
|
|
7741
7859
|
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());
|
|
7742
7860
|
}
|
|
7743
7861
|
}
|
|
7744
7862
|
|
|
7745
7863
|
class TransactionCommand extends ClientOriginatedCommandTaskTag {
|
|
7746
|
-
constructor() {
|
|
7747
|
-
super();
|
|
7748
|
-
this.TaskTag = null;
|
|
7749
|
-
this.ReversibleExit = false;
|
|
7750
|
-
}
|
|
7751
7864
|
get CommandTypeAttribute() {
|
|
7752
7865
|
return ConstInterface.MG_ATTR_VAL_TRANS;
|
|
7753
7866
|
}
|
|
@@ -7761,6 +7874,11 @@ class TransactionCommand extends ClientOriginatedCommandTaskTag {
|
|
|
7761
7874
|
helper.SerializeAttribute(ConstInterface.MG_ATTR_TRANS_LEVEL, this.Level);
|
|
7762
7875
|
return helper.GetString();
|
|
7763
7876
|
}
|
|
7877
|
+
constructor() {
|
|
7878
|
+
super();
|
|
7879
|
+
this.TaskTag = null;
|
|
7880
|
+
this.ReversibleExit = false;
|
|
7881
|
+
}
|
|
7764
7882
|
getCommandInfo() {
|
|
7765
7883
|
return NString.Format('[{0} in {1}]', this.Oper === 'C' ? 'Commit Transaction' : 'Abort Transaction', this.Task.getTaskInfo());
|
|
7766
7884
|
}
|
|
@@ -7779,6 +7897,9 @@ class UnloadCommand extends ClientOriginatedCommand {
|
|
|
7779
7897
|
}
|
|
7780
7898
|
|
|
7781
7899
|
class EvaluateCommand extends ClientOriginatedCommandTaskTag {
|
|
7900
|
+
get CommandTypeAttribute() {
|
|
7901
|
+
return ConstInterface.MG_ATTR_VAL_EVAL;
|
|
7902
|
+
}
|
|
7782
7903
|
constructor() {
|
|
7783
7904
|
super();
|
|
7784
7905
|
this.TaskTag = null;
|
|
@@ -7787,9 +7908,6 @@ class EvaluateCommand extends ClientOriginatedCommandTaskTag {
|
|
|
7787
7908
|
this.MprgCreator = null;
|
|
7788
7909
|
this.LengthExpVal = Int32.MinValue;
|
|
7789
7910
|
}
|
|
7790
|
-
get CommandTypeAttribute() {
|
|
7791
|
-
return ConstInterface.MG_ATTR_VAL_EVAL;
|
|
7792
|
-
}
|
|
7793
7911
|
SerializeCommandData() {
|
|
7794
7912
|
let helper = new CommandSerializationHelper();
|
|
7795
7913
|
helper.SerializeTaskTag(this.TaskTag);
|
|
@@ -7837,10 +7955,6 @@ class GlobalParamsQueryCommand extends QueryCommand {
|
|
|
7837
7955
|
}
|
|
7838
7956
|
|
|
7839
7957
|
class IniputForceWriteCommand extends ClientOriginatedCommand {
|
|
7840
|
-
constructor() {
|
|
7841
|
-
super();
|
|
7842
|
-
this.Text = null;
|
|
7843
|
-
}
|
|
7844
7958
|
get CommandTypeAttribute() {
|
|
7845
7959
|
return ConstInterface.MG_ATTR_VAL_INIPUT_FORCE_WRITE;
|
|
7846
7960
|
}
|
|
@@ -7850,6 +7964,10 @@ class IniputForceWriteCommand extends ClientOriginatedCommand {
|
|
|
7850
7964
|
SerializeCommandData() {
|
|
7851
7965
|
return " " + ConstInterface.MG_ATTR_VAL_INIPUT_PARAM + "=\"" + XmlParser.escape(this.Text) + "\"";
|
|
7852
7966
|
}
|
|
7967
|
+
constructor() {
|
|
7968
|
+
super();
|
|
7969
|
+
this.Text = null;
|
|
7970
|
+
}
|
|
7853
7971
|
getCommandInfo() {
|
|
7854
7972
|
return NString.Format('[{0} with {1}] ', this.CommandTypeAttribute, this.Text);
|
|
7855
7973
|
}
|
|
@@ -7899,6 +8017,13 @@ class SelectProgramCommand extends ExecOperCommand {
|
|
|
7899
8017
|
}
|
|
7900
8018
|
}
|
|
7901
8019
|
|
|
8020
|
+
class ControlItemsRefreshCommand extends DataviewCommand {
|
|
8021
|
+
constructor() {
|
|
8022
|
+
super();
|
|
8023
|
+
this.Control = null;
|
|
8024
|
+
}
|
|
8025
|
+
}
|
|
8026
|
+
|
|
7902
8027
|
class CommandFactory {
|
|
7903
8028
|
static CreateEventCommand(taskTag, magicEvent) {
|
|
7904
8029
|
let eventCommand = new EventCommand(magicEvent);
|
|
@@ -7917,6 +8042,13 @@ class CommandFactory {
|
|
|
7917
8042
|
dataviewCommand.TaskTag = taskId;
|
|
7918
8043
|
return dataviewCommand;
|
|
7919
8044
|
}
|
|
8045
|
+
static CreateControlItemsRefreshCommand(taskId, control) {
|
|
8046
|
+
let command = new ControlItemsRefreshCommand();
|
|
8047
|
+
command.CommandType = DataViewCommandType.ControlItemsRefresh;
|
|
8048
|
+
command.TaskTag = taskId;
|
|
8049
|
+
command.Control = control;
|
|
8050
|
+
return command;
|
|
8051
|
+
}
|
|
7920
8052
|
static CreateAddUserRangeDataviewCommand(taskId, userRange) {
|
|
7921
8053
|
let addUserRangeDataviewCommand = new AddUserRangeDataviewCommand();
|
|
7922
8054
|
addUserRangeDataviewCommand.TaskTag = taskId;
|
|
@@ -8122,13 +8254,6 @@ class CommandFactory {
|
|
|
8122
8254
|
}
|
|
8123
8255
|
}
|
|
8124
8256
|
|
|
8125
|
-
class Sort {
|
|
8126
|
-
constructor() {
|
|
8127
|
-
this.fldIdx = 0;
|
|
8128
|
-
this.dir = false;
|
|
8129
|
-
}
|
|
8130
|
-
}
|
|
8131
|
-
|
|
8132
8257
|
var ParamParseResult;
|
|
8133
8258
|
(function (ParamParseResult) {
|
|
8134
8259
|
ParamParseResult[ParamParseResult["OK"] = 0] = "OK";
|
|
@@ -8138,10 +8263,6 @@ var ParamParseResult;
|
|
|
8138
8263
|
})(ParamParseResult || (ParamParseResult = {}));
|
|
8139
8264
|
|
|
8140
8265
|
class PrmMap {
|
|
8141
|
-
constructor() {
|
|
8142
|
-
this.values = null;
|
|
8143
|
-
this.values = new Dictionary();
|
|
8144
|
-
}
|
|
8145
8266
|
getvalue(s) {
|
|
8146
8267
|
if (this.values.ContainsKey(s))
|
|
8147
8268
|
return this.values.get_Item(s);
|
|
@@ -8154,6 +8275,10 @@ class PrmMap {
|
|
|
8154
8275
|
remove(s) {
|
|
8155
8276
|
this.values.Remove(s);
|
|
8156
8277
|
}
|
|
8278
|
+
constructor() {
|
|
8279
|
+
this.values = null;
|
|
8280
|
+
this.values = new Dictionary();
|
|
8281
|
+
}
|
|
8157
8282
|
}
|
|
8158
8283
|
class MirrorPrmMap extends PrmMap {
|
|
8159
8284
|
constructor(type) {
|
|
@@ -8234,7 +8359,7 @@ class MirrorPrmMap extends PrmMap {
|
|
|
8234
8359
|
while (this.mirrorFromXML(parser.getNextTag(), parser)) {
|
|
8235
8360
|
}
|
|
8236
8361
|
}
|
|
8237
|
-
|
|
8362
|
+
RestoreParams(xml) {
|
|
8238
8363
|
let parser = new XmlParser(xml);
|
|
8239
8364
|
while (this.mirrorFromXML(parser.getNextTag(), parser)) {
|
|
8240
8365
|
}
|
|
@@ -8309,6 +8434,7 @@ class Environment {
|
|
|
8309
8434
|
this._debugMode = 0;
|
|
8310
8435
|
this._significantNumSize = 0;
|
|
8311
8436
|
this._specialAnsiExpression = false;
|
|
8437
|
+
this._specialImmediatehandlerEnd = false;
|
|
8312
8438
|
this._specialShowStatusBarPanes = false;
|
|
8313
8439
|
this._specialRouteToRootProgOnContextRecreation = false;
|
|
8314
8440
|
this._specialCancelOnCreate = false;
|
|
@@ -8462,6 +8588,9 @@ class Environment {
|
|
|
8462
8588
|
case ConstInterface.MG_ATTR_LOCAL_FLAGS:
|
|
8463
8589
|
this._localFlags = valueStr;
|
|
8464
8590
|
break;
|
|
8591
|
+
case ConstInterface.MG_ATTR_SPECIAL_IMMEDIATE_HANDLER_END:
|
|
8592
|
+
this._specialImmediatehandlerEnd = XmlParser.getBoolean(valueStr);
|
|
8593
|
+
break;
|
|
8465
8594
|
case ConstInterface.MG_ATTR_SPEACIAL_ANSI_EXP:
|
|
8466
8595
|
this._specialAnsiExpression = XmlParser.getBoolean(valueStr);
|
|
8467
8596
|
break;
|
|
@@ -8666,6 +8795,9 @@ class Environment {
|
|
|
8666
8795
|
GetLocalFlag(f) {
|
|
8667
8796
|
return this._localFlags !== null && this._localFlags.indexOf(f) >= 0;
|
|
8668
8797
|
}
|
|
8798
|
+
getSpecialImmediateHandlerEnd() {
|
|
8799
|
+
return this._specialImmediatehandlerEnd;
|
|
8800
|
+
}
|
|
8669
8801
|
getSpecialAnsiExpression() {
|
|
8670
8802
|
return this._specialAnsiExpression;
|
|
8671
8803
|
}
|
|
@@ -8735,6 +8867,12 @@ class Environment {
|
|
|
8735
8867
|
}
|
|
8736
8868
|
Environment.Instance = new Environment();
|
|
8737
8869
|
class EnvironmentDetails {
|
|
8870
|
+
set UpdateInQueryMode(value) {
|
|
8871
|
+
this._updateInQueryMode = value;
|
|
8872
|
+
}
|
|
8873
|
+
set CreateInModifyMode(value) {
|
|
8874
|
+
this._createInModifyMode = value;
|
|
8875
|
+
}
|
|
8738
8876
|
constructor() {
|
|
8739
8877
|
this._createInModifyMode = false;
|
|
8740
8878
|
this._updateInQueryMode = false;
|
|
@@ -8745,12 +8883,6 @@ class EnvironmentDetails {
|
|
|
8745
8883
|
this.ProjDir = null;
|
|
8746
8884
|
this.CompIdx = 0;
|
|
8747
8885
|
}
|
|
8748
|
-
set UpdateInQueryMode(value) {
|
|
8749
|
-
this._updateInQueryMode = value;
|
|
8750
|
-
}
|
|
8751
|
-
set CreateInModifyMode(value) {
|
|
8752
|
-
this._createInModifyMode = value;
|
|
8753
|
-
}
|
|
8754
8886
|
allowUpdateInQueryMode() {
|
|
8755
8887
|
return this._updateInQueryMode;
|
|
8756
8888
|
}
|
|
@@ -8838,17 +8970,6 @@ class GlobalParams extends MirrorPrmMap {
|
|
|
8838
8970
|
GlobalParams.Instance = new GlobalParams();
|
|
8839
8971
|
|
|
8840
8972
|
class UserDetails {
|
|
8841
|
-
constructor() {
|
|
8842
|
-
this.UserName = null;
|
|
8843
|
-
this.UserID = null;
|
|
8844
|
-
this.UserInfo = null;
|
|
8845
|
-
this.Password = null;
|
|
8846
|
-
this.IsLoggedIn = false;
|
|
8847
|
-
this.UserName = NString.Empty;
|
|
8848
|
-
this.UserInfo = NString.Empty;
|
|
8849
|
-
this.IsLoggedIn = false;
|
|
8850
|
-
this.setUserID(NString.Empty);
|
|
8851
|
-
}
|
|
8852
8973
|
setIsLoggedIn(value) {
|
|
8853
8974
|
this.IsLoggedIn = value;
|
|
8854
8975
|
}
|
|
@@ -8868,6 +8989,17 @@ class UserDetails {
|
|
|
8868
8989
|
UserDetails._instance = new UserDetails();
|
|
8869
8990
|
return UserDetails._instance;
|
|
8870
8991
|
}
|
|
8992
|
+
constructor() {
|
|
8993
|
+
this.UserName = null;
|
|
8994
|
+
this.UserID = null;
|
|
8995
|
+
this.UserInfo = null;
|
|
8996
|
+
this.Password = null;
|
|
8997
|
+
this.IsLoggedIn = false;
|
|
8998
|
+
this.UserName = NString.Empty;
|
|
8999
|
+
this.UserInfo = NString.Empty;
|
|
9000
|
+
this.IsLoggedIn = false;
|
|
9001
|
+
this.setUserID(NString.Empty);
|
|
9002
|
+
}
|
|
8871
9003
|
fillData(parser) {
|
|
8872
9004
|
let tokensVector;
|
|
8873
9005
|
let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_TERM, parser.getCurrIndex());
|
|
@@ -9676,8 +9808,7 @@ class MirrorString {
|
|
|
9676
9808
|
this._reserved = false;
|
|
9677
9809
|
}
|
|
9678
9810
|
mirrorToXML() {
|
|
9679
|
-
return ConstInterface.MG_ATTR_ENV_VALUE + "=\"" + XmlParser.escape(this._value) + "\"
|
|
9680
|
-
ConstInterface.MG_ATTR_ENV_WRITEINI + "=F";
|
|
9811
|
+
return ConstInterface.MG_ATTR_ENV_VALUE + "=\"" + XmlParser.escape(this._value) + "\"";
|
|
9681
9812
|
}
|
|
9682
9813
|
init(name, xmlParser) {
|
|
9683
9814
|
let valueStart, valueEnd, reserveStart, paramEnd;
|
|
@@ -10850,6 +10981,11 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
|
10850
10981
|
this.eval_op_VarDisplayName(resVal, val1);
|
|
10851
10982
|
expStrTracker.resetNullResult();
|
|
10852
10983
|
break;
|
|
10984
|
+
case ExpressionInterface.EXP_OP_CONTROL_ITEMS_REFRESH:
|
|
10985
|
+
val2 = valStack.pop();
|
|
10986
|
+
val1 = valStack.pop();
|
|
10987
|
+
await this.eval_op_controlItemRefresh(val1, val2, resVal);
|
|
10988
|
+
break;
|
|
10853
10989
|
case ExpressionInterface.EXP_OP_VARCONTROLID:
|
|
10854
10990
|
val1 = valStack.pop();
|
|
10855
10991
|
this.eval_op_VarControlID(resVal, val1);
|
|
@@ -11238,11 +11374,6 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
|
11238
11374
|
val1 = valStack.pop();
|
|
11239
11375
|
this.eval_op_eoy(resVal, val1);
|
|
11240
11376
|
break;
|
|
11241
|
-
case ExpressionInterface.EXP_OP_ROLLBACK:
|
|
11242
|
-
val2 = valStack.pop();
|
|
11243
|
-
val1 = valStack.pop();
|
|
11244
|
-
await this.eval_op_rollback(resVal);
|
|
11245
|
-
break;
|
|
11246
11377
|
case ExpressionInterface.EXP_OP_VARSET:
|
|
11247
11378
|
val2 = valStack.pop();
|
|
11248
11379
|
val1 = valStack.pop();
|
|
@@ -11607,41 +11738,6 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
|
11607
11738
|
val1 = valStack.pop();
|
|
11608
11739
|
this.eval_op_taskType(resVal, val1);
|
|
11609
11740
|
break;
|
|
11610
|
-
case ExpressionInterface.EXP_OP_RANGE_ADD:
|
|
11611
|
-
nArgs = valStack.pop();
|
|
11612
|
-
if (nArgs > 0) {
|
|
11613
|
-
Exp_params = new Array(nArgs);
|
|
11614
|
-
for (j = 0; j < nArgs; j++)
|
|
11615
|
-
Exp_params[nArgs - 1 - j] = valStack.pop();
|
|
11616
|
-
await this.eval_op_range_add(resVal, Exp_params);
|
|
11617
|
-
}
|
|
11618
|
-
break;
|
|
11619
|
-
case ExpressionInterface.EXP_OP_RANGE_RESET:
|
|
11620
|
-
val1 = valStack.pop();
|
|
11621
|
-
await this.eval_op_range_reset(resVal, val1);
|
|
11622
|
-
break;
|
|
11623
|
-
case ExpressionInterface.EXP_OP_LOCATE_ADD:
|
|
11624
|
-
nArgs = valStack.pop();
|
|
11625
|
-
if (nArgs > 0) {
|
|
11626
|
-
Exp_params = new Array(nArgs);
|
|
11627
|
-
for (j = 0; j < nArgs; j++)
|
|
11628
|
-
Exp_params[nArgs - 1 - j] = valStack.pop();
|
|
11629
|
-
await this.eval_op_locate_add(resVal, Exp_params);
|
|
11630
|
-
}
|
|
11631
|
-
break;
|
|
11632
|
-
case ExpressionInterface.EXP_OP_LOCATE_RESET:
|
|
11633
|
-
val1 = valStack.pop();
|
|
11634
|
-
await this.eval_op_locate_reset(resVal, val1);
|
|
11635
|
-
break;
|
|
11636
|
-
case ExpressionInterface.EXP_OP_SORT_ADD:
|
|
11637
|
-
val2 = valStack.pop();
|
|
11638
|
-
val1 = valStack.pop();
|
|
11639
|
-
await this.eval_op_sort_add(resVal, val1, val2);
|
|
11640
|
-
break;
|
|
11641
|
-
case ExpressionInterface.EXP_OP_SORT_RESET:
|
|
11642
|
-
val1 = valStack.pop();
|
|
11643
|
-
await this.eval_op_sort_reset(resVal, val1);
|
|
11644
|
-
break;
|
|
11645
11741
|
case ExpressionInterface.EXP_OP_TSK_INSTANCE:
|
|
11646
11742
|
val1 = valStack.pop();
|
|
11647
11743
|
this.eval_op_tsk_instance(resVal, val1);
|
|
@@ -12978,6 +13074,23 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
|
12978
13074
|
resVal.StrVal = fld.VarDisplayName;
|
|
12979
13075
|
}
|
|
12980
13076
|
}
|
|
13077
|
+
async eval_op_controlItemRefresh(val1, val2, resVal) {
|
|
13078
|
+
let success = false;
|
|
13079
|
+
let parent = val2.MgNumVal.NUM_2_LONG();
|
|
13080
|
+
resVal.Attr = StorageAttribute.BOOLEAN;
|
|
13081
|
+
if ((parent >= 0 && parent < (this.ExpTask.getTaskDepth(false))) || parent === ExpressionEvaluator.TRIGGER_TASK) {
|
|
13082
|
+
let tsk = super.GetContextTask(parent);
|
|
13083
|
+
if (tsk != null && tsk.getForm() != null) {
|
|
13084
|
+
let control = tsk.getForm().GetCtrl(val1.StrVal);
|
|
13085
|
+
if (control != null && control.isChoiceControl() && control.isDataCtrl()) {
|
|
13086
|
+
let command = CommandFactory.CreateControlItemsRefreshCommand(tsk.getTaskTag(), control);
|
|
13087
|
+
await tsk.DataviewManager.CurrentDataviewManager.Execute(command);
|
|
13088
|
+
success = true;
|
|
13089
|
+
}
|
|
13090
|
+
}
|
|
13091
|
+
}
|
|
13092
|
+
resVal.BoolVal = success;
|
|
13093
|
+
}
|
|
12981
13094
|
eval_op_VarControlID(resVal, val1) {
|
|
12982
13095
|
let ret = 0;
|
|
12983
13096
|
if (val1.MgNumVal !== null) {
|
|
@@ -13263,12 +13376,6 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
|
13263
13376
|
await fld.setValueAndStartRecompute(bufptr, val.IsNull, true, setRecordUpdated, false);
|
|
13264
13377
|
await fld.updateDisplay();
|
|
13265
13378
|
}
|
|
13266
|
-
async eval_op_rollback(resVal) {
|
|
13267
|
-
let task = this.ExpTask.GetContextTask() || this.ExpTask;
|
|
13268
|
-
await AccessHelper.eventsManager.handleInternalEventWithTask(task, InternalInterface.MG_ACT_ROLLBACK);
|
|
13269
|
-
resVal.Attr = StorageAttribute.BOOLEAN;
|
|
13270
|
-
resVal.BoolVal = true;
|
|
13271
|
-
}
|
|
13272
13379
|
eval_op_like(source, maskOrg, resVal) {
|
|
13273
13380
|
let i;
|
|
13274
13381
|
let j;
|
|
@@ -13825,54 +13932,6 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
|
13825
13932
|
resultStr.Replace('\\@', '@');
|
|
13826
13933
|
resVal.StrVal = resultStr.ToString();
|
|
13827
13934
|
}
|
|
13828
|
-
async eval_op_range_add(resVal, Exp_params) {
|
|
13829
|
-
resVal.Attr = StorageAttribute.BOOLEAN;
|
|
13830
|
-
resVal.BoolVal = await this.add_rt_ranges(Exp_params, false);
|
|
13831
|
-
}
|
|
13832
|
-
async eval_op_range_reset(resVal, parent) {
|
|
13833
|
-
resVal.Attr = StorageAttribute.BOOLEAN;
|
|
13834
|
-
let iParent = parent.MgNumVal.NUM_2_LONG();
|
|
13835
|
-
if ((iParent >= 0 && iParent < (this.ExpTask.getTaskDepth(false))) || iParent === ExpressionEvaluator.TRIGGER_TASK) {
|
|
13836
|
-
let task = super.GetContextTask(iParent);
|
|
13837
|
-
if (task !== null) {
|
|
13838
|
-
let command = CommandFactory.CreateDataViewCommand(task.getTaskTag(), DataViewCommandType.ResetUserRange);
|
|
13839
|
-
await task.DataviewManager.Execute(command);
|
|
13840
|
-
resVal.BoolVal = true;
|
|
13841
|
-
}
|
|
13842
|
-
}
|
|
13843
|
-
}
|
|
13844
|
-
async eval_op_locate_add(resVal, Exp_params) {
|
|
13845
|
-
resVal.Attr = StorageAttribute.BOOLEAN;
|
|
13846
|
-
resVal.BoolVal = await this.add_rt_ranges(Exp_params, true);
|
|
13847
|
-
}
|
|
13848
|
-
async eval_op_locate_reset(resVal, parent) {
|
|
13849
|
-
resVal.Attr = StorageAttribute.BOOLEAN;
|
|
13850
|
-
let iParent = parent.MgNumVal.NUM_2_LONG();
|
|
13851
|
-
if ((iParent >= 0 && iParent < (this.ExpTask.getTaskDepth(false))) || iParent === ExpressionEvaluator.TRIGGER_TASK) {
|
|
13852
|
-
let task = super.GetContextTask(iParent);
|
|
13853
|
-
if (task !== null) {
|
|
13854
|
-
let command = CommandFactory.CreateDataViewCommand(task.getTaskTag(), DataViewCommandType.ResetUserLocate);
|
|
13855
|
-
await task.DataviewManager.Execute(command);
|
|
13856
|
-
resVal.BoolVal = true;
|
|
13857
|
-
}
|
|
13858
|
-
}
|
|
13859
|
-
}
|
|
13860
|
-
async eval_op_sort_add(resVal, varnum, dir) {
|
|
13861
|
-
resVal.Attr = StorageAttribute.BOOLEAN;
|
|
13862
|
-
resVal.BoolVal = await this.add_sort(varnum, dir);
|
|
13863
|
-
}
|
|
13864
|
-
async eval_op_sort_reset(resVal, parent) {
|
|
13865
|
-
resVal.Attr = StorageAttribute.BOOLEAN;
|
|
13866
|
-
let iParent = parent.MgNumVal.NUM_2_LONG();
|
|
13867
|
-
if ((iParent >= 0 && iParent < (this.ExpTask.getTaskDepth(false))) || iParent === ExpressionEvaluator.TRIGGER_TASK) {
|
|
13868
|
-
let task = super.GetContextTask(iParent);
|
|
13869
|
-
if (task !== null) {
|
|
13870
|
-
let command = CommandFactory.CreateDataViewCommand(task.getTaskTag(), DataViewCommandType.ResetUserSort);
|
|
13871
|
-
await task.DataviewManager.Execute(command);
|
|
13872
|
-
resVal.BoolVal = true;
|
|
13873
|
-
}
|
|
13874
|
-
}
|
|
13875
|
-
}
|
|
13876
13935
|
eval_op_tsk_instance(resVal, Parent) {
|
|
13877
13936
|
let tag = 0;
|
|
13878
13937
|
let iParent = Parent.MgNumVal.NUM_2_LONG();
|
|
@@ -13886,84 +13945,6 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
|
13886
13945
|
resVal.MgNumVal = new NUM_TYPE();
|
|
13887
13946
|
resVal.MgNumVal.NUM_4_LONG(tag);
|
|
13888
13947
|
}
|
|
13889
|
-
async add_sort(varnum, dir) {
|
|
13890
|
-
if (varnum.MgNumVal === null)
|
|
13891
|
-
return false;
|
|
13892
|
-
let itm = varnum.MgNumVal.NUM_2_LONG();
|
|
13893
|
-
if (itm === 0)
|
|
13894
|
-
return false;
|
|
13895
|
-
let fld = this.GetFieldOfContextTask(itm);
|
|
13896
|
-
if (fld === null)
|
|
13897
|
-
return false;
|
|
13898
|
-
let task = fld.getTask();
|
|
13899
|
-
let vee_idx = fld.getId() + 1;
|
|
13900
|
-
let expr_64 = new Sort();
|
|
13901
|
-
expr_64.fldIdx = vee_idx;
|
|
13902
|
-
expr_64.dir = dir.BoolVal;
|
|
13903
|
-
let sort = expr_64;
|
|
13904
|
-
let command = CommandFactory.CreateAddUserSortDataviewCommand(task.getTaskTag(), sort);
|
|
13905
|
-
await task.DataviewManager.Execute(command);
|
|
13906
|
-
return true;
|
|
13907
|
-
}
|
|
13908
|
-
async add_rt_ranges(Exp_params, locate) {
|
|
13909
|
-
let varnum = Exp_params[0];
|
|
13910
|
-
let min = Exp_params[1];
|
|
13911
|
-
if (varnum.MgNumVal === null)
|
|
13912
|
-
return false;
|
|
13913
|
-
let itm = varnum.MgNumVal.NUM_2_LONG();
|
|
13914
|
-
if (itm === 0)
|
|
13915
|
-
return false;
|
|
13916
|
-
let fld = this.GetFieldOfContextTask(itm);
|
|
13917
|
-
if (fld === null)
|
|
13918
|
-
return false;
|
|
13919
|
-
let task = fld.getTask();
|
|
13920
|
-
let vee_idx = fld.getId() + 1;
|
|
13921
|
-
let expr_78 = new UserRange();
|
|
13922
|
-
expr_78.veeIdx = vee_idx;
|
|
13923
|
-
let rng = expr_78;
|
|
13924
|
-
if (min.IsNull)
|
|
13925
|
-
rng.nullMin = true;
|
|
13926
|
-
if (!rng.nullMin && (min.Attr === StorageAttribute.ALPHA || min.Attr === StorageAttribute.UNICODE) && min.StrVal.length === 0)
|
|
13927
|
-
rng.discardMin = true;
|
|
13928
|
-
else {
|
|
13929
|
-
if (!rng.nullMin) {
|
|
13930
|
-
if (!StorageAttributeCheck.isTheSameType(fld.getType(), min.Attr))
|
|
13931
|
-
return false;
|
|
13932
|
-
if (StorageAttributeCheck.StorageFldAlphaUnicodeOrBlob(fld.getType(), min.Attr))
|
|
13933
|
-
this.ConvertExpVal(min, fld.getType());
|
|
13934
|
-
rng.min = min.ToMgVal();
|
|
13935
|
-
}
|
|
13936
|
-
}
|
|
13937
|
-
if (Exp_params.length === 3) {
|
|
13938
|
-
let max = Exp_params[2];
|
|
13939
|
-
if (max.IsNull)
|
|
13940
|
-
rng.nullMax = true;
|
|
13941
|
-
if (!rng.nullMax && (max.Attr === StorageAttribute.ALPHA || max.Attr === StorageAttribute.UNICODE) && max.StrVal.length === 0)
|
|
13942
|
-
rng.discardMax = true;
|
|
13943
|
-
else {
|
|
13944
|
-
if (!rng.nullMax) {
|
|
13945
|
-
if (!StorageAttributeCheck.isTheSameType(fld.getType(), max.Attr))
|
|
13946
|
-
return false;
|
|
13947
|
-
if (StorageAttributeCheck.StorageFldAlphaUnicodeOrBlob(fld.getType(), max.Attr))
|
|
13948
|
-
this.ConvertExpVal(max, fld.getType());
|
|
13949
|
-
rng.max = max.ToMgVal();
|
|
13950
|
-
}
|
|
13951
|
-
}
|
|
13952
|
-
}
|
|
13953
|
-
else
|
|
13954
|
-
rng.discardMax = true;
|
|
13955
|
-
if (!rng.discardMin || !rng.discardMax) {
|
|
13956
|
-
if (locate) {
|
|
13957
|
-
let command = CommandFactory.CreateAddUserLocateDataviewCommand(task.getTaskTag(), rng);
|
|
13958
|
-
await task.DataviewManager.Execute(command);
|
|
13959
|
-
}
|
|
13960
|
-
else {
|
|
13961
|
-
let command2 = CommandFactory.CreateAddUserRangeDataviewCommand(task.getTaskTag(), rng);
|
|
13962
|
-
await task.DataviewManager.Execute(command2);
|
|
13963
|
-
}
|
|
13964
|
-
}
|
|
13965
|
-
return true;
|
|
13966
|
-
}
|
|
13967
13948
|
eval_op_getParam(resVal, name) {
|
|
13968
13949
|
Debug.Assert(!name.IsNull && name.StrVal !== null);
|
|
13969
13950
|
let expVal = GlobalParams.Instance.get(name.StrVal);
|
|
@@ -14481,6 +14462,12 @@ class DataViewBase extends GuiDataViewBase {
|
|
|
14481
14462
|
}
|
|
14482
14463
|
|
|
14483
14464
|
class Record {
|
|
14465
|
+
get InCompute() {
|
|
14466
|
+
return this._inCompute;
|
|
14467
|
+
}
|
|
14468
|
+
get InRecompute() {
|
|
14469
|
+
return this._inRecompute;
|
|
14470
|
+
}
|
|
14484
14471
|
constructor(dvOrTableCacheOrCIdOrRecord, dataview) {
|
|
14485
14472
|
this._id = Int32.MinValue;
|
|
14486
14473
|
this.dbViewRowIdx = 0;
|
|
@@ -14498,12 +14485,6 @@ class Record {
|
|
|
14498
14485
|
else
|
|
14499
14486
|
this.constructor_1(dvOrTableCacheOrCIdOrRecord, dataview);
|
|
14500
14487
|
}
|
|
14501
|
-
get InCompute() {
|
|
14502
|
-
return this._inCompute;
|
|
14503
|
-
}
|
|
14504
|
-
get InRecompute() {
|
|
14505
|
-
return this._inRecompute;
|
|
14506
|
-
}
|
|
14507
14488
|
constructor_0(dvOrTableCache) {
|
|
14508
14489
|
if (dvOrTableCache instanceof DataViewBase)
|
|
14509
14490
|
this._dataview = dvOrTableCache;
|
|
@@ -15299,14 +15280,14 @@ Record.FLAG_MODIFIED_ATLEAST_ONCE = (0x40);
|
|
|
15299
15280
|
Record.INCREASE = true;
|
|
15300
15281
|
Record.DECREASE = false;
|
|
15301
15282
|
class DcValuesReference extends ObjectReferenceBase {
|
|
15283
|
+
get DcValues() {
|
|
15284
|
+
return this.Referent;
|
|
15285
|
+
}
|
|
15302
15286
|
constructor(controlId, referencedDcValues) {
|
|
15303
15287
|
super(referencedDcValues);
|
|
15304
15288
|
this.ditIdx = 0;
|
|
15305
15289
|
this.ditIdx = controlId;
|
|
15306
15290
|
}
|
|
15307
|
-
get DcValues() {
|
|
15308
|
-
return this.Referent;
|
|
15309
|
-
}
|
|
15310
15291
|
Clone() {
|
|
15311
15292
|
return new DcValuesReference(this.ditIdx, this.Referent);
|
|
15312
15293
|
}
|
|
@@ -15582,21 +15563,6 @@ class RecordsTable {
|
|
|
15582
15563
|
RecordsTable.REC_NOT_FOUND = -1;
|
|
15583
15564
|
|
|
15584
15565
|
class DataviewHeaderBase {
|
|
15585
|
-
constructor(task) {
|
|
15586
|
-
this._cond = null;
|
|
15587
|
-
this._task = null;
|
|
15588
|
-
this.Loc = null;
|
|
15589
|
-
this._dir = '\0';
|
|
15590
|
-
this._id = 0;
|
|
15591
|
-
this._keyIdx = 0;
|
|
15592
|
-
this._retVal = null;
|
|
15593
|
-
this.returnfield = null;
|
|
15594
|
-
this.LinkStartAfterField = 0;
|
|
15595
|
-
this.KeyExpression = 0;
|
|
15596
|
-
this._task = task;
|
|
15597
|
-
this._keyIdx = -1;
|
|
15598
|
-
this._cond = new YesNoExp(true);
|
|
15599
|
-
}
|
|
15600
15566
|
get ReturnField() {
|
|
15601
15567
|
if (this.returnfield === null && this._retVal !== null)
|
|
15602
15568
|
this.returnfield = this.Task.getFieldByValueStr(this._retVal);
|
|
@@ -15617,6 +15583,21 @@ class DataviewHeaderBase {
|
|
|
15617
15583
|
get LinkEvaluateCondition() {
|
|
15618
15584
|
return this._linkEvalCondition;
|
|
15619
15585
|
}
|
|
15586
|
+
constructor(task) {
|
|
15587
|
+
this._cond = null;
|
|
15588
|
+
this._task = null;
|
|
15589
|
+
this.Loc = null;
|
|
15590
|
+
this._dir = '\0';
|
|
15591
|
+
this._id = 0;
|
|
15592
|
+
this._keyIdx = 0;
|
|
15593
|
+
this._retVal = null;
|
|
15594
|
+
this.returnfield = null;
|
|
15595
|
+
this.LinkStartAfterField = 0;
|
|
15596
|
+
this.KeyExpression = 0;
|
|
15597
|
+
this._task = task;
|
|
15598
|
+
this._keyIdx = -1;
|
|
15599
|
+
this._cond = new YesNoExp(true);
|
|
15600
|
+
}
|
|
15620
15601
|
SetAttributes(attributes) {
|
|
15621
15602
|
let keys = attributes.Keys;
|
|
15622
15603
|
keys.forEach((text) => {
|
|
@@ -16907,16 +16888,16 @@ class RecordOutOfDataViewException extends ApplicationException {
|
|
|
16907
16888
|
}
|
|
16908
16889
|
|
|
16909
16890
|
class XMLBasedDcValuesBuilder extends DcValuesBuilderBase {
|
|
16891
|
+
set SerializedDCVals(value) {
|
|
16892
|
+
this.parser.setXMLdata(value);
|
|
16893
|
+
this.parser.setCurrIndex(0);
|
|
16894
|
+
}
|
|
16910
16895
|
constructor() {
|
|
16911
16896
|
super();
|
|
16912
16897
|
this.dcv = null;
|
|
16913
16898
|
this.parser = null;
|
|
16914
16899
|
this.parser = new XmlParser();
|
|
16915
16900
|
}
|
|
16916
|
-
set SerializedDCVals(value) {
|
|
16917
|
-
this.parser.setXMLdata(value);
|
|
16918
|
-
this.parser.setCurrIndex(0);
|
|
16919
|
-
}
|
|
16920
16901
|
Build() {
|
|
16921
16902
|
this.dcv = null;
|
|
16922
16903
|
let endContext = this.parser.getXMLdata().indexOf(XMLConstants.TAG_TERM, this.parser.getCurrIndex());
|
|
@@ -16974,28 +16955,61 @@ class XMLBasedDcValuesBuilder extends DcValuesBuilderBase {
|
|
|
16974
16955
|
}
|
|
16975
16956
|
return super.ParseValues(valueStr, dataType, useHex);
|
|
16976
16957
|
}
|
|
16977
|
-
}
|
|
16978
|
-
|
|
16979
|
-
const SET_DISPLAYLINE_BY_DV = Int32.MinValue;
|
|
16980
|
-
const COMPUTE_NEWREC_ON_CLIENT = 'C';
|
|
16981
|
-
const UNKNOWN_RCMPS_NOT_INITED = 'M';
|
|
16982
|
-
const UNKNOWN_RCMPS_FOUND = 'Y';
|
|
16983
|
-
const INVOKED_FROM_OFFLINE_TASK = '-99999';
|
|
16984
|
-
const CHUNK_CACHE_NEXT = 'N';
|
|
16985
|
-
const CHUNK_CACHE_PREV = 'P';
|
|
16986
|
-
const CHUNK_DV_BOTTOM = 'B';
|
|
16987
|
-
const CHUNK_DV_TOP = 'T';
|
|
16988
|
-
const COMPUTE_FLUSH_UPDATES = 'H';
|
|
16989
|
-
const COMPUTE_NEWREC_ON_SERVER = 'S';
|
|
16990
|
-
const END_DV_TAG = '</' + ConstInterface.MG_TAG_DATAVIEW + '>';
|
|
16991
|
-
const RECOVERY_ACT_BEGIN_SCREEN = 'S';
|
|
16992
|
-
const RECOVERY_ACT_BEGIN_TABLE = 'T';
|
|
16993
|
-
const RECOVERY_ACT_CANCEL = 'C';
|
|
16994
|
-
const RECOVERY_ACT_MOVE_DIRECTION_BEGIN = 'B';
|
|
16995
|
-
const RECOVERY_ACT_NONE = 'N';
|
|
16996
|
-
const TRANS_STAT_CLOSED = 'C';
|
|
16997
|
-
const TRANS_STAT_OPENED = 'O';
|
|
16998
|
-
class DataView extends DataViewBase {
|
|
16958
|
+
}
|
|
16959
|
+
|
|
16960
|
+
const SET_DISPLAYLINE_BY_DV = Int32.MinValue;
|
|
16961
|
+
const COMPUTE_NEWREC_ON_CLIENT = 'C';
|
|
16962
|
+
const UNKNOWN_RCMPS_NOT_INITED = 'M';
|
|
16963
|
+
const UNKNOWN_RCMPS_FOUND = 'Y';
|
|
16964
|
+
const INVOKED_FROM_OFFLINE_TASK = '-99999';
|
|
16965
|
+
const CHUNK_CACHE_NEXT = 'N';
|
|
16966
|
+
const CHUNK_CACHE_PREV = 'P';
|
|
16967
|
+
const CHUNK_DV_BOTTOM = 'B';
|
|
16968
|
+
const CHUNK_DV_TOP = 'T';
|
|
16969
|
+
const COMPUTE_FLUSH_UPDATES = 'H';
|
|
16970
|
+
const COMPUTE_NEWREC_ON_SERVER = 'S';
|
|
16971
|
+
const END_DV_TAG = '</' + ConstInterface.MG_TAG_DATAVIEW + '>';
|
|
16972
|
+
const RECOVERY_ACT_BEGIN_SCREEN = 'S';
|
|
16973
|
+
const RECOVERY_ACT_BEGIN_TABLE = 'T';
|
|
16974
|
+
const RECOVERY_ACT_CANCEL = 'C';
|
|
16975
|
+
const RECOVERY_ACT_MOVE_DIRECTION_BEGIN = 'B';
|
|
16976
|
+
const RECOVERY_ACT_NONE = 'N';
|
|
16977
|
+
const TRANS_STAT_CLOSED = 'C';
|
|
16978
|
+
const TRANS_STAT_OPENED = 'O';
|
|
16979
|
+
class DataView extends DataViewBase {
|
|
16980
|
+
set InsertAt(value) {
|
|
16981
|
+
this._insertAt = value;
|
|
16982
|
+
}
|
|
16983
|
+
get InsertAt() {
|
|
16984
|
+
return this._insertAt;
|
|
16985
|
+
}
|
|
16986
|
+
get CurrRec() {
|
|
16987
|
+
return this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER;
|
|
16988
|
+
}
|
|
16989
|
+
set CurrRec(value) {
|
|
16990
|
+
if (this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER !== null && value === null) {
|
|
16991
|
+
this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER.resetDcValueId();
|
|
16992
|
+
}
|
|
16993
|
+
this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER = value;
|
|
16994
|
+
if (this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER !== null) {
|
|
16995
|
+
this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER.SetDcValueId();
|
|
16996
|
+
}
|
|
16997
|
+
}
|
|
16998
|
+
get FlushUpdates() {
|
|
16999
|
+
return this._flushUpdates;
|
|
17000
|
+
}
|
|
17001
|
+
get HasMainTable() {
|
|
17002
|
+
return this._hasMainTable;
|
|
17003
|
+
}
|
|
17004
|
+
get CurrentRecId() {
|
|
17005
|
+
return this._currRecId;
|
|
17006
|
+
}
|
|
17007
|
+
get FirstRecord() {
|
|
17008
|
+
return this._recordsTab.getRecByIdx(0);
|
|
17009
|
+
}
|
|
17010
|
+
get LastRecord() {
|
|
17011
|
+
return this._recordsTab.getRecByIdx(this._recordsTab.getSize() - 1);
|
|
17012
|
+
}
|
|
16999
17013
|
constructor(taskOrDataView) {
|
|
17000
17014
|
super();
|
|
17001
17015
|
this._cacheLruTimeStamp = 0;
|
|
@@ -17047,39 +17061,6 @@ class DataView extends DataViewBase {
|
|
|
17047
17061
|
Object.assign(this, taskOrDataView);
|
|
17048
17062
|
}
|
|
17049
17063
|
}
|
|
17050
|
-
set InsertAt(value) {
|
|
17051
|
-
this._insertAt = value;
|
|
17052
|
-
}
|
|
17053
|
-
get InsertAt() {
|
|
17054
|
-
return this._insertAt;
|
|
17055
|
-
}
|
|
17056
|
-
get CurrRec() {
|
|
17057
|
-
return this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER;
|
|
17058
|
-
}
|
|
17059
|
-
set CurrRec(value) {
|
|
17060
|
-
if (this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER !== null && value === null) {
|
|
17061
|
-
this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER.resetDcValueId();
|
|
17062
|
-
}
|
|
17063
|
-
this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER = value;
|
|
17064
|
-
if (this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER !== null) {
|
|
17065
|
-
this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER.SetDcValueId();
|
|
17066
|
-
}
|
|
17067
|
-
}
|
|
17068
|
-
get FlushUpdates() {
|
|
17069
|
-
return this._flushUpdates;
|
|
17070
|
-
}
|
|
17071
|
-
get HasMainTable() {
|
|
17072
|
-
return this._hasMainTable;
|
|
17073
|
-
}
|
|
17074
|
-
get CurrentRecId() {
|
|
17075
|
-
return this._currRecId;
|
|
17076
|
-
}
|
|
17077
|
-
get FirstRecord() {
|
|
17078
|
-
return this._recordsTab.getRecByIdx(0);
|
|
17079
|
-
}
|
|
17080
|
-
get LastRecord() {
|
|
17081
|
-
return this._recordsTab.getRecByIdx(this._recordsTab.getSize() - 1);
|
|
17082
|
-
}
|
|
17083
17064
|
Init() {
|
|
17084
17065
|
this.init();
|
|
17085
17066
|
}
|
|
@@ -18652,6 +18633,12 @@ class ReturnResultBase {
|
|
|
18652
18633
|
}
|
|
18653
18634
|
|
|
18654
18635
|
class ReturnResult extends ReturnResultBase {
|
|
18636
|
+
get Success() {
|
|
18637
|
+
return this.success;
|
|
18638
|
+
}
|
|
18639
|
+
get ErrorDescription() {
|
|
18640
|
+
return this.errorDescription;
|
|
18641
|
+
}
|
|
18655
18642
|
constructor(errorDescriptionCodeOrErrorDescriptionOrInnerResult, innerResult) {
|
|
18656
18643
|
super();
|
|
18657
18644
|
this.errorDescription = null;
|
|
@@ -18666,12 +18653,6 @@ class ReturnResult extends ReturnResultBase {
|
|
|
18666
18653
|
else
|
|
18667
18654
|
this.constructor_03(errorDescriptionCodeOrErrorDescriptionOrInnerResult);
|
|
18668
18655
|
}
|
|
18669
|
-
get Success() {
|
|
18670
|
-
return this.success;
|
|
18671
|
-
}
|
|
18672
|
-
get ErrorDescription() {
|
|
18673
|
-
return this.errorDescription;
|
|
18674
|
-
}
|
|
18675
18656
|
constructor_00(errorDescriptionCode) {
|
|
18676
18657
|
this.success = false;
|
|
18677
18658
|
this.ErrorId = errorDescriptionCode;
|
|
@@ -18771,13 +18752,13 @@ class Transaction {
|
|
|
18771
18752
|
}
|
|
18772
18753
|
|
|
18773
18754
|
class TaskTransactionManager {
|
|
18755
|
+
get isClosingTopmostTask() {
|
|
18756
|
+
return MGDataCollection.Instance.StartupMgData.getFirstTask().InEndTask;
|
|
18757
|
+
}
|
|
18774
18758
|
constructor(task) {
|
|
18775
18759
|
this.task = null;
|
|
18776
18760
|
this.task = task;
|
|
18777
18761
|
}
|
|
18778
|
-
get isClosingTopmostTask() {
|
|
18779
|
-
return MGDataCollection.Instance.StartupMgData.getFirstTask().InEndTask;
|
|
18780
|
-
}
|
|
18781
18762
|
AllowTransaction(transBegin, forLocal) {
|
|
18782
18763
|
let result;
|
|
18783
18764
|
if (forLocal)
|
|
@@ -19121,12 +19102,6 @@ class RemoteDataviewManager extends DataviewManagerBase {
|
|
|
19121
19102
|
}
|
|
19122
19103
|
|
|
19123
19104
|
class DataviewManager extends DataviewManagerBase {
|
|
19124
|
-
constructor(task) {
|
|
19125
|
-
super(task);
|
|
19126
|
-
this.RemoteDataviewManager = null;
|
|
19127
|
-
this.HasRemoteData = true;
|
|
19128
|
-
this.RemoteDataviewManager = new RemoteDataviewManager(task);
|
|
19129
|
-
}
|
|
19130
19105
|
get TaskService() {
|
|
19131
19106
|
return this.Task.TaskService;
|
|
19132
19107
|
}
|
|
@@ -19141,11 +19116,24 @@ class DataviewManager extends DataviewManagerBase {
|
|
|
19141
19116
|
get VirtualDataviewManager() {
|
|
19142
19117
|
return this.TaskService.GetDataviewManagerForVirtuals(this.Task);
|
|
19143
19118
|
}
|
|
19119
|
+
constructor(task) {
|
|
19120
|
+
super(task);
|
|
19121
|
+
this.RemoteDataviewManager = null;
|
|
19122
|
+
this.HasRemoteData = true;
|
|
19123
|
+
this.RemoteDataviewManager = new RemoteDataviewManager(task);
|
|
19124
|
+
}
|
|
19144
19125
|
async Execute(command) {
|
|
19145
19126
|
return await this.CurrentDataviewManager.Execute(command);
|
|
19146
19127
|
}
|
|
19147
19128
|
}
|
|
19148
19129
|
|
|
19130
|
+
class Sort {
|
|
19131
|
+
constructor() {
|
|
19132
|
+
this.fldIdx = 0;
|
|
19133
|
+
this.dir = false;
|
|
19134
|
+
}
|
|
19135
|
+
}
|
|
19136
|
+
|
|
19149
19137
|
class SortCollection {
|
|
19150
19138
|
constructor() {
|
|
19151
19139
|
this._sortTab = null;
|
|
@@ -19414,6 +19402,7 @@ class MgForm extends MgFormBase {
|
|
|
19414
19402
|
try {
|
|
19415
19403
|
await this.RefreshDisplay(Constants.TASK_REFRESH_FORM);
|
|
19416
19404
|
await this.setCurrRowByDisplayLine(this.GetDataview().getTopRecIdx() + this.getLastValidRow(), false, true);
|
|
19405
|
+
visibleLine = this.getLastValidRow();
|
|
19417
19406
|
}
|
|
19418
19407
|
catch (Exception) {
|
|
19419
19408
|
}
|
|
@@ -21486,8 +21475,12 @@ class EventHandler {
|
|
|
21486
21475
|
continue;
|
|
21487
21476
|
else if (this._operationTab.getOperation(oper.getBlockEnd()).getServerId() < nextOperIdx)
|
|
21488
21477
|
continue;
|
|
21489
|
-
if (!taskEnd)
|
|
21490
|
-
|
|
21478
|
+
if (!taskEnd) {
|
|
21479
|
+
let mainLevel = this._task.getMainLevel().toLowerCase();
|
|
21480
|
+
if (await this._task.evalEndCond(ConstInterface.END_COND_EVAL_IMMIDIATE) && Environment.Instance.getSpecialImmediateHandlerEnd() &&
|
|
21481
|
+
mainLevel != "RP".toLowerCase() && mainLevel != "TP".toLowerCase() && mainLevel != "RS".toLowerCase() && mainLevel != "TS".toLowerCase())
|
|
21482
|
+
break;
|
|
21483
|
+
}
|
|
21491
21484
|
if (this._taskMgdID !== mgdID)
|
|
21492
21485
|
isChangedCurrWndRef.value = true;
|
|
21493
21486
|
if (!this._task.isMainProg() && this._task.isOpenWin())
|
|
@@ -22281,13 +22274,6 @@ class UserEventsTable {
|
|
|
22281
22274
|
}
|
|
22282
22275
|
|
|
22283
22276
|
class FormsTable {
|
|
22284
|
-
constructor(task, parentForm) {
|
|
22285
|
-
this._task = null;
|
|
22286
|
-
this._parentForm = null;
|
|
22287
|
-
this._formsStringXml = null;
|
|
22288
|
-
this._task = task;
|
|
22289
|
-
this._parentForm = parentForm;
|
|
22290
|
-
}
|
|
22291
22277
|
get Count() {
|
|
22292
22278
|
return this._formsStringXml.length;
|
|
22293
22279
|
}
|
|
@@ -22296,6 +22282,13 @@ class FormsTable {
|
|
|
22296
22282
|
return this._formsStringXml.get_Item(formDisplayIndex - 1);
|
|
22297
22283
|
return null;
|
|
22298
22284
|
}
|
|
22285
|
+
constructor(task, parentForm) {
|
|
22286
|
+
this._task = null;
|
|
22287
|
+
this._parentForm = null;
|
|
22288
|
+
this._formsStringXml = null;
|
|
22289
|
+
this._task = task;
|
|
22290
|
+
this._parentForm = parentForm;
|
|
22291
|
+
}
|
|
22299
22292
|
async fillData() {
|
|
22300
22293
|
this._formsStringXml = new List();
|
|
22301
22294
|
let parser = Manager.GetCurrentRuntimeContext().Parser;
|
|
@@ -22485,6 +22478,47 @@ var Task_Direction;
|
|
|
22485
22478
|
Task_Direction[Task_Direction["FORE"] = 1] = "FORE";
|
|
22486
22479
|
})(Task_Direction || (Task_Direction = {}));
|
|
22487
22480
|
class Task extends TaskBase {
|
|
22481
|
+
get ParentTask() {
|
|
22482
|
+
return this._parentTask;
|
|
22483
|
+
}
|
|
22484
|
+
set TryingToCommit(value) {
|
|
22485
|
+
this._tryingToCommit = value;
|
|
22486
|
+
}
|
|
22487
|
+
get TryingToCommit() {
|
|
22488
|
+
return this._tryingToCommit;
|
|
22489
|
+
}
|
|
22490
|
+
get TaskService() {
|
|
22491
|
+
if (this._taskService == null)
|
|
22492
|
+
this._taskService = new RemoteTaskService();
|
|
22493
|
+
return this._taskService;
|
|
22494
|
+
}
|
|
22495
|
+
static get CommandsProcessor() {
|
|
22496
|
+
return CommandsProcessorManager.GetCommandsProcessor();
|
|
22497
|
+
}
|
|
22498
|
+
get LogicalStudioParentTask() {
|
|
22499
|
+
if (this.StudioParentTask === null && !super.isMainProg()) {
|
|
22500
|
+
return GuiDataCollection.MGDataTable.GetMainProgByCtlIdx(this.ContextID, this._ctlIdx);
|
|
22501
|
+
}
|
|
22502
|
+
return this.StudioParentTask;
|
|
22503
|
+
}
|
|
22504
|
+
get KnownToServer() {
|
|
22505
|
+
return this._knownToServer;
|
|
22506
|
+
}
|
|
22507
|
+
set Transaction(value) {
|
|
22508
|
+
this.DataviewManager.CurrentDataviewManager.Transaction = value;
|
|
22509
|
+
}
|
|
22510
|
+
get Transaction() {
|
|
22511
|
+
return this.DataviewManager.CurrentDataviewManager.Transaction;
|
|
22512
|
+
}
|
|
22513
|
+
get TaskDefinitionId() {
|
|
22514
|
+
if (this.taskDefinitionId === null) {
|
|
22515
|
+
this.taskDefinitionId = new TaskDefinitionId(this._ctlIdx, this.ProgramIsn, this.TaskIsn, this._isPrg);
|
|
22516
|
+
}
|
|
22517
|
+
return this.taskDefinitionId;
|
|
22518
|
+
}
|
|
22519
|
+
static get IsBlockingBatch() {
|
|
22520
|
+
return false;
|
|
22521
|
+
}
|
|
22488
22522
|
constructor(parent) {
|
|
22489
22523
|
super();
|
|
22490
22524
|
this._dvCache = null;
|
|
@@ -22553,47 +22587,6 @@ class Task extends TaskBase {
|
|
|
22553
22587
|
}
|
|
22554
22588
|
this.constructor_1(parent);
|
|
22555
22589
|
}
|
|
22556
|
-
get ParentTask() {
|
|
22557
|
-
return this._parentTask;
|
|
22558
|
-
}
|
|
22559
|
-
set TryingToCommit(value) {
|
|
22560
|
-
this._tryingToCommit = value;
|
|
22561
|
-
}
|
|
22562
|
-
get TryingToCommit() {
|
|
22563
|
-
return this._tryingToCommit;
|
|
22564
|
-
}
|
|
22565
|
-
get TaskService() {
|
|
22566
|
-
if (this._taskService == null)
|
|
22567
|
-
this._taskService = new RemoteTaskService();
|
|
22568
|
-
return this._taskService;
|
|
22569
|
-
}
|
|
22570
|
-
static get CommandsProcessor() {
|
|
22571
|
-
return CommandsProcessorManager.GetCommandsProcessor();
|
|
22572
|
-
}
|
|
22573
|
-
get LogicalStudioParentTask() {
|
|
22574
|
-
if (this.StudioParentTask === null && !super.isMainProg()) {
|
|
22575
|
-
return GuiDataCollection.MGDataTable.GetMainProgByCtlIdx(this.ContextID, this._ctlIdx);
|
|
22576
|
-
}
|
|
22577
|
-
return this.StudioParentTask;
|
|
22578
|
-
}
|
|
22579
|
-
get KnownToServer() {
|
|
22580
|
-
return this._knownToServer;
|
|
22581
|
-
}
|
|
22582
|
-
set Transaction(value) {
|
|
22583
|
-
this.DataviewManager.CurrentDataviewManager.Transaction = value;
|
|
22584
|
-
}
|
|
22585
|
-
get Transaction() {
|
|
22586
|
-
return this.DataviewManager.CurrentDataviewManager.Transaction;
|
|
22587
|
-
}
|
|
22588
|
-
get TaskDefinitionId() {
|
|
22589
|
-
if (this.taskDefinitionId === null) {
|
|
22590
|
-
this.taskDefinitionId = new TaskDefinitionId(this._ctlIdx, this.ProgramIsn, this.TaskIsn, this._isPrg);
|
|
22591
|
-
}
|
|
22592
|
-
return this.taskDefinitionId;
|
|
22593
|
-
}
|
|
22594
|
-
static get IsBlockingBatch() {
|
|
22595
|
-
return false;
|
|
22596
|
-
}
|
|
22597
22590
|
constructor_0() {
|
|
22598
22591
|
this.ActionManager = new ActionManager();
|
|
22599
22592
|
this.DataView = new DataView(this);
|
|
@@ -24990,6 +24983,9 @@ class CompMainPrgTable {
|
|
|
24990
24983
|
}
|
|
24991
24984
|
|
|
24992
24985
|
class MGData {
|
|
24986
|
+
get ForceModal() {
|
|
24987
|
+
return this.forceModal;
|
|
24988
|
+
}
|
|
24993
24989
|
constructor(toClient, toServer, id, parent, isModal, forceModal) {
|
|
24994
24990
|
this._expHandlers = null;
|
|
24995
24991
|
this._id = 0;
|
|
@@ -25010,9 +25006,6 @@ class MGData {
|
|
|
25010
25006
|
else
|
|
25011
25007
|
this.constructor_1(id, parent, isModal, forceModal);
|
|
25012
25008
|
}
|
|
25013
|
-
get ForceModal() {
|
|
25014
|
-
return this.forceModal;
|
|
25015
|
-
}
|
|
25016
25009
|
constructor_0(id, parent, isModal) {
|
|
25017
25010
|
this._timerHandlers = new HandlersTable();
|
|
25018
25011
|
this._expHandlers = new HandlersTable();
|
|
@@ -29014,13 +29007,6 @@ class VerifyCommand extends ClientTargetedCommandBase {
|
|
|
29014
29007
|
}
|
|
29015
29008
|
|
|
29016
29009
|
class EnhancedVerifyCommand extends VerifyCommand {
|
|
29017
|
-
constructor() {
|
|
29018
|
-
super();
|
|
29019
|
-
this._buttonsID = '\0';
|
|
29020
|
-
this._image = '\0';
|
|
29021
|
-
this._returnValStr = null;
|
|
29022
|
-
this._returnVal = null;
|
|
29023
|
-
}
|
|
29024
29010
|
async ProcessMessageBoxResponse(task, returnValue) {
|
|
29025
29011
|
if (task !== null)
|
|
29026
29012
|
await Operation.setoperVerifyReturnValue(returnValue, this._returnVal);
|
|
@@ -29051,6 +29037,13 @@ class EnhancedVerifyCommand extends VerifyCommand {
|
|
|
29051
29037
|
break;
|
|
29052
29038
|
}
|
|
29053
29039
|
}
|
|
29040
|
+
constructor() {
|
|
29041
|
+
super();
|
|
29042
|
+
this._buttonsID = '\0';
|
|
29043
|
+
this._image = '\0';
|
|
29044
|
+
this._returnValStr = null;
|
|
29045
|
+
this._returnVal = null;
|
|
29046
|
+
}
|
|
29054
29047
|
}
|
|
29055
29048
|
|
|
29056
29049
|
class ResetRangeCommand extends ClientTargetedCommandBase {
|
|
@@ -29147,12 +29140,6 @@ class ResetLocateCommand extends ClientTargetedCommandBase {
|
|
|
29147
29140
|
}
|
|
29148
29141
|
|
|
29149
29142
|
class ResultCommand extends ClientTargetedCommandBase {
|
|
29150
|
-
constructor() {
|
|
29151
|
-
super();
|
|
29152
|
-
this._isNull = false;
|
|
29153
|
-
this._attr = StorageAttribute.NONE;
|
|
29154
|
-
this._val = null;
|
|
29155
|
-
}
|
|
29156
29143
|
async Execute(res) {
|
|
29157
29144
|
if (this._isNull)
|
|
29158
29145
|
res.SetResultValue(null, StorageAttribute.NONE);
|
|
@@ -29178,6 +29165,12 @@ class ResultCommand extends ClientTargetedCommandBase {
|
|
|
29178
29165
|
break;
|
|
29179
29166
|
}
|
|
29180
29167
|
}
|
|
29168
|
+
constructor() {
|
|
29169
|
+
super();
|
|
29170
|
+
this._isNull = false;
|
|
29171
|
+
this._attr = StorageAttribute.NONE;
|
|
29172
|
+
this._val = null;
|
|
29173
|
+
}
|
|
29181
29174
|
}
|
|
29182
29175
|
|
|
29183
29176
|
class AddSortCommand extends ClientTargetedCommandBase {
|
|
@@ -29542,19 +29535,9 @@ class CommandsTable {
|
|
|
29542
29535
|
}
|
|
29543
29536
|
}
|
|
29544
29537
|
|
|
29545
|
-
let CurrentClientVersion = '4.1000.0-dev4100.
|
|
29538
|
+
let CurrentClientVersion = '4.1000.0-dev4100.134';
|
|
29546
29539
|
|
|
29547
29540
|
class ClientManager {
|
|
29548
|
-
constructor() {
|
|
29549
|
-
this._globalUniqueSessionId = null;
|
|
29550
|
-
this._buttonIsClicked = false;
|
|
29551
|
-
RuntimeContextBase.Instance.Init(RemoteCommandsProcessor.RC_NO_CONTEXT_ID);
|
|
29552
|
-
LastFocusedManager.Instance.Init(MGDataCollection.Instance);
|
|
29553
|
-
LastFocusedManager.Instance.LastActionTime = Misc.getSystemMilliseconds();
|
|
29554
|
-
RemoteCommandsProcessor.ShouldScrambleAndUnscrambleMessages = true;
|
|
29555
|
-
this._globalUniqueSessionId = UniqueIDUtils.GetUniqueMachineID() + "_";
|
|
29556
|
-
this.RegisterDelegates();
|
|
29557
|
-
}
|
|
29558
29541
|
static get Instance() {
|
|
29559
29542
|
if (ClientManager._instance === null)
|
|
29560
29543
|
ClientManager._instance = new ClientManager();
|
|
@@ -29754,6 +29737,16 @@ class ClientManager {
|
|
|
29754
29737
|
Logger.Instance.WriteToLog("-----------------------------------------------------------------------------", true);
|
|
29755
29738
|
}
|
|
29756
29739
|
}
|
|
29740
|
+
constructor() {
|
|
29741
|
+
this._globalUniqueSessionId = null;
|
|
29742
|
+
this._buttonIsClicked = false;
|
|
29743
|
+
RuntimeContextBase.Instance.Init(RemoteCommandsProcessor.RC_NO_CONTEXT_ID);
|
|
29744
|
+
LastFocusedManager.Instance.Init(MGDataCollection.Instance);
|
|
29745
|
+
LastFocusedManager.Instance.LastActionTime = Misc.getSystemMilliseconds();
|
|
29746
|
+
RemoteCommandsProcessor.ShouldScrambleAndUnscrambleMessages = true;
|
|
29747
|
+
this._globalUniqueSessionId = UniqueIDUtils.GetUniqueMachineID() + "_";
|
|
29748
|
+
this.RegisterDelegates();
|
|
29749
|
+
}
|
|
29757
29750
|
InitGuiManager() {
|
|
29758
29751
|
Manager.EventsManager = EventsManager.Instance;
|
|
29759
29752
|
Manager.DefaultServerName = ServerConfig.Instance.getServer();
|
|
@@ -29973,13 +29966,6 @@ class MagicBridge {
|
|
|
29973
29966
|
}
|
|
29974
29967
|
}
|
|
29975
29968
|
|
|
29976
|
-
class ControlItemsRefreshCommand extends DataviewCommand {
|
|
29977
|
-
constructor() {
|
|
29978
|
-
super();
|
|
29979
|
-
this.Control = null;
|
|
29980
|
-
}
|
|
29981
|
-
}
|
|
29982
|
-
|
|
29983
29969
|
class DataViewOutputCommand extends DataviewCommand {
|
|
29984
29970
|
constructor(OutputCommandType) {
|
|
29985
29971
|
super();
|