@magic-xpa/engine 4.1000.0-dev4100.43 → 4.1000.0-dev4100.436
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 +3 -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/env/MirrorString.mjs +2 -3
- 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/ExpressionDict.mjs +8 -8
- package/esm2020/src/exp/ExpressionEvaluator.mjs +9 -179
- package/esm2020/src/gui/FormsTable.mjs +8 -8
- package/esm2020/src/gui/MgControl.mjs +10 -13
- package/esm2020/src/gui/MgForm.mjs +11 -28
- package/esm2020/src/http/HttpManager.mjs +8 -8
- package/esm2020/src/remote/RemoteCommandsProcessor.mjs +47 -27
- 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 +6 -6
- package/esm2020/src/util/ReturnResult.mjs +7 -7
- package/esm2020/src/util/Scrambler.mjs +3 -1
- package/fesm2015/magic-xpa-engine.mjs +548 -591
- package/fesm2015/magic-xpa-engine.mjs.map +1 -1
- package/fesm2020/magic-xpa-engine.mjs +536 -547
- package/fesm2020/magic-xpa-engine.mjs.map +1 -1
- package/package.json +6 -6
- package/src/ConstInterface.d.ts +2 -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 -10
- 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/src/util/PrmMap.d.ts +1 -1
- package/magic-xpa-engine.d.ts +0 -2
@@ -1,7 +1,7 @@
|
|
1
1
|
import { __awaiter } from 'tslib';
|
2
2
|
import { StringBuilder, Int32, NString, ApplicationException, NNumber, List, Debug, Char, RefParam, NumberStyles, HashUtils, DateTime, Dictionary, Stack, NChar, isNullOrUndefined, WebException, Thread, Encoding, Exception, isUndefined, Hashtable, NotImplementedException, Array_Enumerator, ISO_8859_1_Encoding, Int64 } from '@magic-xpa/mscorelib';
|
3
3
|
import { XMLConstants, StorageAttribute, ViewRefreshMode, InternalInterface, Logger, StorageAttributeCheck, StrUtil, SubformType, TableBehaviour, MgControlType, ScrollBarThumbType, ForceExit, XmlParser, Misc, Base64, Priority, SyncExecutionHelper, Queue, Constants, DateTimeUtils, Logger_LogLevels, Logger_MessageDirection, MsgInterface, RequestInfo, OSEnvironment, JSON_Utils, UtilDateJpn, UtilStrByteMode, PICInterface, WindowType, BrkScope, RaiseAt, CtrlButtonTypeGui } from '@magic-xpa/utils';
|
4
|
-
import { RecordUtils, GuiFieldBase, ExpVal, BlobType, FieldDef, GuiTaskBase, MgControlBase, PropInterface, GuiDataCollection, CommandType, Commands, HtmlProperties, ControlTable, Modifiers, KeyboardItem, TaskDefinitionIdTableSaxHandler, DisplayConvertor, MgTimer, GuiConstants, RuntimeContextBase, UsernamePasswordCredentials, Styles, Manager, NUM_TYPE,
|
4
|
+
import { RecordUtils, GuiFieldBase, ExpVal, BlobType, FieldDef, GuiTaskBase, MgControlBase, PropInterface, GuiDataCollection, CommandType, Commands, HtmlProperties, ControlTable, Modifiers, KeyboardItem, TaskDefinitionIdTableSaxHandler, DisplayConvertor, VectorType, PIC, MgTimer, GuiConstants, RuntimeContextBase, UsernamePasswordCredentials, Styles, Manager, NUM_TYPE, GuiExpressionEvaluator, ExpressionInterface, DataModificationTypes, GuiDataViewBase, ObjectReferencesCollection, EMPTY_DCREF, ObjectReferenceBase, PropTable, FieldsTable as FieldsTable$1, DcValuesBuilderBase, MgFormBase, GuiEnvironment, TaskDefinitionId, Events, Helps, FocusManager, EventsProcessor, UIBridge } from '@magic-xpa/gui';
|
5
5
|
import { HttpHeaders, HttpErrorResponse } from '@angular/common/http';
|
6
6
|
import { timer, Subject } from 'rxjs';
|
7
7
|
|
@@ -272,6 +272,7 @@ ConstInterface.MG_ATTR_LOCAL_AS400SET = "local_as400set";
|
|
272
272
|
ConstInterface.MG_ATTR_LOCAL_EXTRA_GENGO = "local_extraGengo";
|
273
273
|
ConstInterface.MG_ATTR_LOCAL_FLAGS = "local_flags";
|
274
274
|
ConstInterface.MG_ATTR_SPEACIAL_ANSI_EXP = "SpecialAnsiExpression";
|
275
|
+
ConstInterface.MG_ATTR_SPECIAL_IMMEDIATE_HANDLER_END = "SpecialImmediateHandlerEnd";
|
275
276
|
ConstInterface.MG_ATTR_SPECIAL_SHOW_STATUSBAR_PANES = "SpecialShowStatusBarPanes";
|
276
277
|
ConstInterface.MG_ATTR_SPECIAL_ROUTE_TO_ROOT_PROG_ON_CONTEXT_RECREATION = "SpecialRouteToRootProgramOnContextRecreation";
|
277
278
|
ConstInterface.MG_ATTR_SPECIAL_SPECIAL_EDIT_LEFT_ALIGN = "SpecialEditLeftAlign";
|
@@ -476,6 +477,7 @@ ConstInterface.RC_TOKEN_DATA = "DATA=";
|
|
476
477
|
ConstInterface.WEBCLIENT_REINITIALIZE_REQUEST = "WCREINITIALIZEREQUEST=Y";
|
477
478
|
ConstInterface.MAIN_PROG_VIEW = "MainProgramsDataView";
|
478
479
|
ConstInterface.GLOBAL_PARAM_LIST = "GlobalParamList";
|
480
|
+
ConstInterface.ENV_VAR_LIST = "EnvVarList";
|
479
481
|
ConstInterface.LAST_EXCEPTION = "LastException";
|
480
482
|
ConstInterface.CTX_REMOVED_FROM_SRVR = "CtxRemovedFromSrvr";
|
481
483
|
ConstInterface.LAST_ROUTE_EVENT = "LastRouteEvent";
|
@@ -641,13 +643,6 @@ class CommandSerializationHelper {
|
|
641
643
|
}
|
642
644
|
|
643
645
|
class EventCommand extends ClientOriginatedCommandTaskTag {
|
644
|
-
constructor(magicEvent) {
|
645
|
-
super();
|
646
|
-
this.TaskTag = null;
|
647
|
-
this.MagicEvent = 0;
|
648
|
-
this.ClientRecId = 0;
|
649
|
-
this.MagicEvent = magicEvent;
|
650
|
-
}
|
651
646
|
get CommandTypeAttribute() {
|
652
647
|
return ConstInterface.MG_ATTR_VAL_EVENT;
|
653
648
|
}
|
@@ -663,6 +658,13 @@ class EventCommand extends ClientOriginatedCommandTaskTag {
|
|
663
658
|
return false;
|
664
659
|
return true;
|
665
660
|
}
|
661
|
+
constructor(magicEvent) {
|
662
|
+
super();
|
663
|
+
this.TaskTag = null;
|
664
|
+
this.MagicEvent = 0;
|
665
|
+
this.ClientRecId = 0;
|
666
|
+
this.MagicEvent = magicEvent;
|
667
|
+
}
|
666
668
|
SerializeCommandData() {
|
667
669
|
let helper = new CommandSerializationHelper();
|
668
670
|
helper.SerializeTaskTag(this.TaskTag);
|
@@ -1202,15 +1204,6 @@ class OpeningTaskDetails {
|
|
1202
1204
|
}
|
1203
1205
|
|
1204
1206
|
class MgControl extends MgControlBase {
|
1205
|
-
constructor(type, taskOrParentMgForm, parentControlOrParentControlIdx) {
|
1206
|
-
if (arguments.length === 0)
|
1207
|
-
super();
|
1208
|
-
else if (arguments.length === 3 && (type === null || type.constructor === Number) && (taskOrParentMgForm === null || taskOrParentMgForm instanceof TaskBase) && (parentControlOrParentControlIdx === null || parentControlOrParentControlIdx.constructor === Number))
|
1209
|
-
super(type, taskOrParentMgForm.getForm(), parentControlOrParentControlIdx);
|
1210
|
-
else
|
1211
|
-
super(type, taskOrParentMgForm, parentControlOrParentControlIdx);
|
1212
|
-
this.initialize();
|
1213
|
-
}
|
1214
1207
|
initialize() {
|
1215
1208
|
this._focusedStopExecution = false;
|
1216
1209
|
this._inControlSuffix = false;
|
@@ -1223,6 +1216,15 @@ class MgControl extends MgControlBase {
|
|
1223
1216
|
this.HasZoomHandler = false;
|
1224
1217
|
this.ArgList = null;
|
1225
1218
|
}
|
1219
|
+
constructor(type, taskOrParentMgForm, parentControlOrParentControlIdx) {
|
1220
|
+
if (arguments.length === 0)
|
1221
|
+
super();
|
1222
|
+
else if (arguments.length === 3 && (type === null || type.constructor === Number) && (taskOrParentMgForm === null || taskOrParentMgForm instanceof TaskBase) && (parentControlOrParentControlIdx === null || parentControlOrParentControlIdx.constructor === Number))
|
1223
|
+
super(type, taskOrParentMgForm.getForm(), parentControlOrParentControlIdx);
|
1224
|
+
else
|
1225
|
+
super(type, taskOrParentMgForm, parentControlOrParentControlIdx);
|
1226
|
+
this.initialize();
|
1227
|
+
}
|
1226
1228
|
GetVarIndex() {
|
1227
1229
|
return super.getForm().getTask().DataView.Dvcount + this.veeIndx;
|
1228
1230
|
}
|
@@ -1547,14 +1549,6 @@ class MgControl extends MgControlBase {
|
|
1547
1549
|
}
|
1548
1550
|
});
|
1549
1551
|
}
|
1550
|
-
refreshAndSetItemsListForRadioButton(line, execComputeChoice) {
|
1551
|
-
const _super = Object.create(null, {
|
1552
|
-
refreshAndSetItemsListForRadioButton: { get: () => super.refreshAndSetItemsListForRadioButton }
|
1553
|
-
});
|
1554
|
-
return __awaiter(this, void 0, void 0, function* () {
|
1555
|
-
yield _super.refreshAndSetItemsListForRadioButton.call(this, line, execComputeChoice);
|
1556
|
-
});
|
1557
|
-
}
|
1558
1552
|
getSubformTask() {
|
1559
1553
|
return this._subformTask;
|
1560
1554
|
}
|
@@ -2923,6 +2917,9 @@ class Event {
|
|
2923
2917
|
case InternalInterface.MG_ACT_INDEX_CHANGE:
|
2924
2918
|
description = 'Index Change';
|
2925
2919
|
break;
|
2920
|
+
case InternalInterface.MG_ACT_DUMP_ENVIRONMENT:
|
2921
|
+
description = 'Dump Environment';
|
2922
|
+
break;
|
2926
2923
|
default:
|
2927
2924
|
description = '';
|
2928
2925
|
break;
|
@@ -3232,6 +3229,27 @@ class MgPriorityBlockingQueue {
|
|
3232
3229
|
}
|
3233
3230
|
|
3234
3231
|
class RunTimeEvent extends RunTimeEventBase {
|
3232
|
+
set ShouldHandleZoom(value) {
|
3233
|
+
this._shouldHandleZoom = value;
|
3234
|
+
}
|
3235
|
+
get ShouldHandleZoom() {
|
3236
|
+
return this._shouldHandleZoom;
|
3237
|
+
}
|
3238
|
+
set Control(value) {
|
3239
|
+
this._ctrl = value;
|
3240
|
+
}
|
3241
|
+
set DisplayLine(value) {
|
3242
|
+
this._displayLine = value;
|
3243
|
+
}
|
3244
|
+
get Control() {
|
3245
|
+
return this._ctrl;
|
3246
|
+
}
|
3247
|
+
get ControlsList() {
|
3248
|
+
return this._controlsList;
|
3249
|
+
}
|
3250
|
+
get Direction() {
|
3251
|
+
return this._direction;
|
3252
|
+
}
|
3235
3253
|
constructor(taskRefOrCtrlRefOrTaskrefOrFldRefOrEvt, ctrlRefOrGuiTriggeredEventOrLineOrControlsListOrDirectionOrColumnHeaderOrRtEvtOrCurrentTask, ignoreSpecifiedControlOrGuiTriggeredEventOrLineOrXOrControlOrActivatedFromMDIFrame, yOrCtlIdx, width, height) {
|
3236
3254
|
super();
|
3237
3255
|
this._controlsList = null;
|
@@ -3260,6 +3278,7 @@ class RunTimeEvent extends RunTimeEventBase {
|
|
3260
3278
|
this._task = null;
|
3261
3279
|
this._taskTag = null;
|
3262
3280
|
this._val = null;
|
3281
|
+
this._shouldHandleZoom = false;
|
3263
3282
|
this.IgnoreSpecifiedControl = false;
|
3264
3283
|
this.LastFocusedVal = null;
|
3265
3284
|
if (arguments.length === 1 && (taskRefOrCtrlRefOrTaskrefOrFldRefOrEvt === null || taskRefOrCtrlRefOrTaskrefOrFldRefOrEvt instanceof TaskBase))
|
@@ -3293,21 +3312,6 @@ class RunTimeEvent extends RunTimeEventBase {
|
|
3293
3312
|
else if (arguments.length === 1 && taskRefOrCtrlRefOrTaskrefOrFldRefOrEvt instanceof RunTimeEvent)
|
3294
3313
|
Object.assign(this, taskRefOrCtrlRefOrTaskrefOrFldRefOrEvt);
|
3295
3314
|
}
|
3296
|
-
set Control(value) {
|
3297
|
-
this._ctrl = value;
|
3298
|
-
}
|
3299
|
-
set DisplayLine(value) {
|
3300
|
-
this._displayLine = value;
|
3301
|
-
}
|
3302
|
-
get Control() {
|
3303
|
-
return this._ctrl;
|
3304
|
-
}
|
3305
|
-
get ControlsList() {
|
3306
|
-
return this._controlsList;
|
3307
|
-
}
|
3308
|
-
get Direction() {
|
3309
|
-
return this._direction;
|
3310
|
-
}
|
3311
3315
|
constructor_5(taskRef) {
|
3312
3316
|
this.init(taskRef);
|
3313
3317
|
}
|
@@ -3637,7 +3641,17 @@ class FlowMonitorQueue {
|
|
3637
3641
|
this._isRecompute = false;
|
3638
3642
|
this._isTask = false;
|
3639
3643
|
this._isTaskFlow = false;
|
3644
|
+
this._isDataView = false;
|
3640
3645
|
this.ShouldSerialize = false;
|
3646
|
+
this.padRight = (string, length, character = ' ') => {
|
3647
|
+
let result = "";
|
3648
|
+
let totalLength = length - string.length;
|
3649
|
+
for (let i = 0; i < totalLength; i++) {
|
3650
|
+
result = character + result;
|
3651
|
+
}
|
3652
|
+
result = result + string;
|
3653
|
+
return result;
|
3654
|
+
};
|
3641
3655
|
}
|
3642
3656
|
static get Instance() {
|
3643
3657
|
if (FlowMonitorQueue._instance === null)
|
@@ -3695,6 +3709,9 @@ class FlowMonitorQueue {
|
|
3695
3709
|
case ConstInterface.MG_ATTR_TASKFLW:
|
3696
3710
|
this._isTaskFlow = XmlParser.getBoolean(valueStr);
|
3697
3711
|
break;
|
3712
|
+
case ConstInterface.MG_TAG_DATAVIEW:
|
3713
|
+
this._isDataView = XmlParser.getBoolean(valueStr);
|
3714
|
+
break;
|
3698
3715
|
case ConstInterface.MG_ATTR_RECOMP:
|
3699
3716
|
this._isRecompute = XmlParser.getBoolean(valueStr);
|
3700
3717
|
break;
|
@@ -3752,6 +3769,96 @@ class FlowMonitorQueue {
|
|
3752
3769
|
Logger.Instance.WriteSupportToLog(taskInfo + ": " + info, true);
|
3753
3770
|
}
|
3754
3771
|
}
|
3772
|
+
appendVirtualsAndParameters(currentValues) {
|
3773
|
+
let act = new ActivityItem(this, FlowMonitorQueue.ACT_TASK_FLW, InternalInterface.MG_ACT_REC_PREFIX);
|
3774
|
+
act.setInfo(currentValues);
|
3775
|
+
this._queue.put(act);
|
3776
|
+
}
|
3777
|
+
addDataViewFlow(task) {
|
3778
|
+
if (this._isDataView) {
|
3779
|
+
let fldTab = task.DataView.GetFieldsTab();
|
3780
|
+
let preparedDisplayString = "";
|
3781
|
+
let finaldisplayData = "\n";
|
3782
|
+
let fldValue;
|
3783
|
+
let data = "";
|
3784
|
+
for (let i = 0; i < fldTab.getSize(); i++) {
|
3785
|
+
let fldDef = fldTab.getField(i);
|
3786
|
+
if (!fldDef.IsEventHandlerField && (fldDef.IsVirtual && !fldDef.VirAsReal) || fldDef.isParam()) {
|
3787
|
+
fldValue = fldDef.isNull() ? fldDef.getNullValue() : fldDef.getValue(true);
|
3788
|
+
data = this.getFieldData(fldDef.getType(), fldValue, fldDef.getPicture(), fldDef.getCellsType(), task);
|
3789
|
+
preparedDisplayString = this.PrepareDisplayString(fldDef.isParam(), fldDef.getVarName(), data, true);
|
3790
|
+
finaldisplayData = finaldisplayData + preparedDisplayString + "\n";
|
3791
|
+
}
|
3792
|
+
}
|
3793
|
+
this.appendVirtualsAndParameters(finaldisplayData);
|
3794
|
+
}
|
3795
|
+
}
|
3796
|
+
getFieldData(Storagetype, data, picture, vecCellType, task) {
|
3797
|
+
switch (Storagetype) {
|
3798
|
+
case StorageAttribute.DOTNET:
|
3799
|
+
data = FlowMonitorQueue.UNPRINTABLE_STR_LOG;
|
3800
|
+
break;
|
3801
|
+
case StorageAttribute.BLOB:
|
3802
|
+
{
|
3803
|
+
if (BlobType.isValidBlob(data)) {
|
3804
|
+
let contentType = BlobType.getContentType(data);
|
3805
|
+
if (contentType == BlobType.CONTENT_TYPE_ANSI || contentType == BlobType.CONTENT_TYPE_UNICODE)
|
3806
|
+
data = data != null ? BlobType.getString(data) : "";
|
3807
|
+
else
|
3808
|
+
data = FlowMonitorQueue.UNPRINTABLE_STR_LOG;
|
3809
|
+
}
|
3810
|
+
else
|
3811
|
+
data = "";
|
3812
|
+
}
|
3813
|
+
break;
|
3814
|
+
case StorageAttribute.NUMERIC:
|
3815
|
+
case StorageAttribute.DATE:
|
3816
|
+
case StorageAttribute.TIME:
|
3817
|
+
let conv = DisplayConvertor.Instance;
|
3818
|
+
data = conv.mg2disp(data, " ", new PIC(picture, Storagetype, task.getCompIdx()), false, task.getCompIdx(), false);
|
3819
|
+
break;
|
3820
|
+
case StorageAttribute.BLOB_VECTOR:
|
3821
|
+
let vecOutData;
|
3822
|
+
if (data == null) {
|
3823
|
+
vecOutData = "[]";
|
3824
|
+
}
|
3825
|
+
else {
|
3826
|
+
let cellAtt = vecCellType;
|
3827
|
+
let vector = new VectorType(data);
|
3828
|
+
if (cellAtt == StorageAttribute.BLOB && !VectorType.validateBlobContents(data))
|
3829
|
+
vecOutData = "[]";
|
3830
|
+
else {
|
3831
|
+
let vecSize = VectorType.getVecSize(data);
|
3832
|
+
let cellPicture = (cellAtt == StorageAttribute.NUMERIC || cellAtt == StorageAttribute.DATE || cellAtt == StorageAttribute.TIME) ? PIC.buildPicture(cellAtt, vector.getVecCell(1), task.getCompIdx(), true).getFormat() : picture;
|
3833
|
+
vecOutData = "[";
|
3834
|
+
for (let i = 0; i < vecSize; i++) {
|
3835
|
+
vecOutData += this.getFieldData(cellAtt, vector.getVecCell(i + 1), cellPicture, vecCellType, task);
|
3836
|
+
vecOutData += i < vecSize - 1 ? "," : "]";
|
3837
|
+
}
|
3838
|
+
}
|
3839
|
+
}
|
3840
|
+
data = vecOutData;
|
3841
|
+
break;
|
3842
|
+
case StorageAttribute.BOOLEAN:
|
3843
|
+
data = data == "1" ? "TRUE" : "FALSE";
|
3844
|
+
break;
|
3845
|
+
}
|
3846
|
+
return data;
|
3847
|
+
}
|
3848
|
+
PrepareDisplayString(mode, name, valueContent, addDoubleQuotes) {
|
3849
|
+
let str = "";
|
3850
|
+
let finalStringToDisplay = "";
|
3851
|
+
if (addDoubleQuotes)
|
3852
|
+
finalStringToDisplay = finalStringToDisplay + "\"";
|
3853
|
+
finalStringToDisplay = finalStringToDisplay + name;
|
3854
|
+
if (addDoubleQuotes)
|
3855
|
+
finalStringToDisplay = finalStringToDisplay + "\"";
|
3856
|
+
let paddedName = this.padRight(name, 34);
|
3857
|
+
let formatOfStringVirtual = `Virtual`;
|
3858
|
+
let formatOfStringParameter = `Parameter`;
|
3859
|
+
str = (mode ? formatOfStringParameter : formatOfStringVirtual) + " : " + `${paddedName}` + " : " + `${valueContent.trim()}`;
|
3860
|
+
return str;
|
3861
|
+
}
|
3755
3862
|
addTaskFlowRec(id, state, taskInfo) {
|
3756
3863
|
if (this._enabled && this._isTaskFlow) {
|
3757
3864
|
let info;
|
@@ -3918,6 +4025,7 @@ class FlowMonitorQueue {
|
|
3918
4025
|
}
|
3919
4026
|
}
|
3920
4027
|
FlowMonitorQueue._instance = null;
|
4028
|
+
FlowMonitorQueue.UNPRINTABLE_STR_LOG = "#UNPRINTABLE#";
|
3921
4029
|
FlowMonitorQueue.S_EVENT_STR1 = ">>Starts ";
|
3922
4030
|
FlowMonitorQueue.S_EVENT_STR2 = " Event";
|
3923
4031
|
FlowMonitorQueue.S_EVENT_PROPAGATED = "Event was propagated";
|
@@ -3979,6 +4087,15 @@ class TimerObjectCollection {
|
|
3979
4087
|
}
|
3980
4088
|
TimerObjectCollection.MgDataToTimerObjList = new Dictionary();
|
3981
4089
|
class RCTimer extends MgTimer {
|
4090
|
+
get TimerIntervalMiliSeconds() {
|
4091
|
+
return this._timerIntervalMilliSeconds;
|
4092
|
+
}
|
4093
|
+
set IsIdleTimer(value) {
|
4094
|
+
this._isIdle = value;
|
4095
|
+
}
|
4096
|
+
get IsIdleTimer() {
|
4097
|
+
return this._isIdle;
|
4098
|
+
}
|
3982
4099
|
constructor(mgData, milliseconds, isIdle) {
|
3983
4100
|
super(milliseconds);
|
3984
4101
|
this._mgData = null;
|
@@ -3990,15 +4107,6 @@ class RCTimer extends MgTimer {
|
|
3990
4107
|
TimerObjectCollection.MgDataToTimerObjList.Add(mgDataId, new List());
|
3991
4108
|
TimerObjectCollection.MgDataToTimerObjList.get_Item(mgDataId).push(this);
|
3992
4109
|
}
|
3993
|
-
get TimerIntervalMiliSeconds() {
|
3994
|
-
return this._timerIntervalMilliSeconds;
|
3995
|
-
}
|
3996
|
-
set IsIdleTimer(value) {
|
3997
|
-
this._isIdle = value;
|
3998
|
-
}
|
3999
|
-
get IsIdleTimer() {
|
4000
|
-
return this._isIdle;
|
4001
|
-
}
|
4002
4110
|
GetMgdata() {
|
4003
4111
|
return this._mgData;
|
4004
4112
|
}
|
@@ -4144,6 +4252,9 @@ class ExecutionStack {
|
|
4144
4252
|
}
|
4145
4253
|
|
4146
4254
|
class ExecOperCommand extends ClientOriginatedCommandTaskTag {
|
4255
|
+
get CommandTypeAttribute() {
|
4256
|
+
return ConstInterface.MG_ATTR_VAL_EXEC_OPER;
|
4257
|
+
}
|
4147
4258
|
constructor() {
|
4148
4259
|
super();
|
4149
4260
|
this.ExecutionStack = null;
|
@@ -4157,9 +4268,6 @@ class ExecOperCommand extends ClientOriginatedCommandTaskTag {
|
|
4157
4268
|
this.CheckOnly = false;
|
4158
4269
|
this.DitIdx = Int32.MinValue;
|
4159
4270
|
}
|
4160
|
-
get CommandTypeAttribute() {
|
4161
|
-
return ConstInterface.MG_ATTR_VAL_EXEC_OPER;
|
4162
|
-
}
|
4163
4271
|
SerializeCommandData() {
|
4164
4272
|
let helper = new CommandSerializationHelper();
|
4165
4273
|
let execStackExists = this.ExecutionStack !== null && !this.ExecutionStack.empty();
|
@@ -4211,6 +4319,8 @@ class Scrambler {
|
|
4211
4319
|
let currChr;
|
4212
4320
|
let length = inVal.length;
|
4213
4321
|
let random = Scrambler.RandomScramble(length);
|
4322
|
+
if (random === -18)
|
4323
|
+
random = Scrambler.RandomScramble(length);
|
4214
4324
|
let key = Math.floor(Math.sqrt(length)) + random;
|
4215
4325
|
let outVal = new StringBuilder(length + 1);
|
4216
4326
|
outVal.Append(String.fromCharCode(random + 81));
|
@@ -4640,13 +4750,6 @@ class HttpClientAsync extends HttpClientBase {
|
|
4640
4750
|
}
|
4641
4751
|
|
4642
4752
|
class HttpManager {
|
4643
|
-
constructor() {
|
4644
|
-
this._httpCommunicationTimeoutMS = HttpManager.DEFAULT_HTTP_COMMUNICATION_TIMEOUT;
|
4645
|
-
this._httpClientAsync = null;
|
4646
|
-
this._isAbortingMagicEngine = false;
|
4647
|
-
this._httpClientAsync = new HttpClientAsync(HttpManager._nativeHttpClient);
|
4648
|
-
this.RegisterBasicDelegates();
|
4649
|
-
}
|
4650
4753
|
getHttpClient() {
|
4651
4754
|
if (this.IsAbortingMagicEngine)
|
4652
4755
|
return new HttpClientSync();
|
@@ -4666,6 +4769,13 @@ class HttpManager {
|
|
4666
4769
|
}
|
4667
4770
|
get IsAbortingMagicEngine() { return this._isAbortingMagicEngine; }
|
4668
4771
|
set IsAbortingMagicEngine(isAbortingMagicEngine) { this._isAbortingMagicEngine = isAbortingMagicEngine; }
|
4772
|
+
constructor() {
|
4773
|
+
this._httpCommunicationTimeoutMS = HttpManager.DEFAULT_HTTP_COMMUNICATION_TIMEOUT;
|
4774
|
+
this._httpClientAsync = null;
|
4775
|
+
this._isAbortingMagicEngine = false;
|
4776
|
+
this._httpClientAsync = new HttpClientAsync(HttpManager._nativeHttpClient);
|
4777
|
+
this.RegisterBasicDelegates();
|
4778
|
+
}
|
4669
4779
|
RegisterBasicDelegates() {
|
4670
4780
|
HttpClientEvents.GetHttpCommunicationTimeout_Event = this.GetHttpCommunicationTimeoutMS.bind(this);
|
4671
4781
|
}
|
@@ -5223,6 +5333,12 @@ var RequestStatus;
|
|
5223
5333
|
RequestStatus[RequestStatus["Abort"] = 2] = "Abort";
|
5224
5334
|
})(RequestStatus || (RequestStatus = {}));
|
5225
5335
|
class RemoteCommandsProcessor extends CommandsProcessorBase {
|
5336
|
+
static GetInstance() {
|
5337
|
+
if (RemoteCommandsProcessor._instance === null) {
|
5338
|
+
RemoteCommandsProcessor._instance = new RemoteCommandsProcessor();
|
5339
|
+
}
|
5340
|
+
return RemoteCommandsProcessor._instance;
|
5341
|
+
}
|
5226
5342
|
constructor() {
|
5227
5343
|
super();
|
5228
5344
|
this._lastRequestTime = 0;
|
@@ -5233,12 +5349,6 @@ class RemoteCommandsProcessor extends CommandsProcessorBase {
|
|
5233
5349
|
HttpManager.GetInstance();
|
5234
5350
|
this.RegisterDelegates();
|
5235
5351
|
}
|
5236
|
-
static GetInstance() {
|
5237
|
-
if (RemoteCommandsProcessor._instance === null) {
|
5238
|
-
RemoteCommandsProcessor._instance = new RemoteCommandsProcessor();
|
5239
|
-
}
|
5240
|
-
return RemoteCommandsProcessor._instance;
|
5241
|
-
}
|
5242
5352
|
CheckAndSetSessionCounter(newSessionCounter) {
|
5243
5353
|
if (newSessionCounter === ConstInterface.SESSION_COUNTER_CLOSE_CTX_INDICATION) {
|
5244
5354
|
Debug.Assert(this.GetSessionCounter() === ConstInterface.SESSION_COUNTER_CLOSE_CTX_INDICATION);
|
@@ -5274,10 +5384,12 @@ class RemoteCommandsProcessor extends CommandsProcessorBase {
|
|
5274
5384
|
return __awaiter(this, void 0, void 0, function* () {
|
5275
5385
|
let mainPrgViewStringForServer = yield this.BuildXMLForMainProgramDataView();
|
5276
5386
|
let globalParamsString = AccessHelper.globalParams.mirrorAllToXML();
|
5387
|
+
let changedEnvVarList = AccessHelper.envParamsTable.mirrorAllToXML();
|
5277
5388
|
let dataStorage = window.localStorage;
|
5278
5389
|
dataStorage.setItem(ConstInterface.IS_SESSION_REINITIALIZING, "true");
|
5279
5390
|
dataStorage.setItem(ConstInterface.MAIN_PROG_VIEW, mainPrgViewStringForServer.toString());
|
5280
5391
|
dataStorage.setItem(ConstInterface.GLOBAL_PARAM_LIST, globalParamsString);
|
5392
|
+
dataStorage.setItem(ConstInterface.ENV_VAR_LIST, changedEnvVarList);
|
5281
5393
|
dataStorage.setItem(ConstInterface.LAST_EXCEPTION, RemoteCommandsProcessor.lastExceptionMessage);
|
5282
5394
|
if (RuntimeContextBase.Instance.RemovedContextFromServer)
|
5283
5395
|
dataStorage.setItem(ConstInterface.CTX_REMOVED_FROM_SRVR, "1");
|
@@ -5514,6 +5626,7 @@ class RemoteCommandsProcessor extends CommandsProcessorBase {
|
|
5514
5626
|
let reqBuf;
|
5515
5627
|
let isInitialCall = sessionStage === CommandsProcessorBase_SessionStage.INITIAL;
|
5516
5628
|
let globalParamsString = null;
|
5629
|
+
let envVarsString = null;
|
5517
5630
|
if (this.DelayCommandExecution)
|
5518
5631
|
return;
|
5519
5632
|
if (Logger.Instance.LogLevel == Logger_LogLevels.RequestInfo && !isInitialCall)
|
@@ -5539,12 +5652,16 @@ class RemoteCommandsProcessor extends CommandsProcessorBase {
|
|
5539
5652
|
let buffer = new StringBuilder();
|
5540
5653
|
if (!RemoteCommandsProcessor.IsSessionReInitializing)
|
5541
5654
|
buffer.Append(reqBuf);
|
5542
|
-
if (RemoteCommandsProcessor.IsSessionReInitializing)
|
5655
|
+
if (RemoteCommandsProcessor.IsSessionReInitializing) {
|
5543
5656
|
globalParamsString = this.RestoreSessionReInitializingDataFromLocalStorage(ConstInterface.GLOBAL_PARAM_LIST);
|
5544
|
-
|
5657
|
+
envVarsString = this.RestoreSessionReInitializingDataFromLocalStorage(ConstInterface.ENV_VAR_LIST);
|
5658
|
+
}
|
5659
|
+
else {
|
5545
5660
|
globalParamsString = AccessHelper.globalParams.mirrorToXML();
|
5661
|
+
envVarsString = AccessHelper.envParamsTable.mirrorToXML();
|
5662
|
+
}
|
5546
5663
|
changes.Append(globalParamsString);
|
5547
|
-
changes.Append(
|
5664
|
+
changes.Append(envVarsString);
|
5548
5665
|
if (changes.Length > 0) {
|
5549
5666
|
changes.Insert(0, "<" + ConstInterface.MG_TAG_ENV_CHANGES + ">");
|
5550
5667
|
changes.Append("</" + ConstInterface.MG_TAG_ENV_CHANGES + ">");
|
@@ -5583,13 +5700,15 @@ class RemoteCommandsProcessor extends CommandsProcessorBase {
|
|
5583
5700
|
dataStorage.removeItem(ConstInterface.IS_SESSION_REINITIALIZING);
|
5584
5701
|
dataStorage.removeItem(ConstInterface.MAIN_PROG_VIEW);
|
5585
5702
|
dataStorage.removeItem(ConstInterface.GLOBAL_PARAM_LIST);
|
5703
|
+
dataStorage.removeItem(ConstInterface.ENV_VAR_LIST);
|
5586
5704
|
dataStorage.removeItem(ConstInterface.LAST_EXCEPTION);
|
5587
5705
|
}
|
5588
5706
|
}
|
5589
5707
|
FlowMonitorQueue.Instance.enable(false);
|
5590
5708
|
yield this.ProcessResponse(respBuf, AccessHelper.mgDataTable.currMgdID, null, res);
|
5591
5709
|
if (RemoteCommandsProcessor.IsSessionReInitializing) {
|
5592
|
-
AccessHelper.globalParams.
|
5710
|
+
AccessHelper.globalParams.RestoreParams(globalParamsString);
|
5711
|
+
AccessHelper.envParamsTable.RestoreParams(envVarsString);
|
5593
5712
|
let dataStorage = window.localStorage;
|
5594
5713
|
let ctxRemoved = dataStorage.getItem(ConstInterface.CTX_REMOVED_FROM_SRVR);
|
5595
5714
|
if (ctxRemoved === "1") {
|
@@ -5687,12 +5806,23 @@ class RemoteCommandsProcessor extends CommandsProcessorBase {
|
|
5687
5806
|
}
|
5688
5807
|
}
|
5689
5808
|
}
|
5690
|
-
|
5809
|
+
this.clearLocalStorage();
|
5691
5810
|
throw ex;
|
5692
5811
|
}
|
5693
5812
|
return response;
|
5694
5813
|
});
|
5695
5814
|
}
|
5815
|
+
clearLocalStorage() {
|
5816
|
+
window.localStorage.removeItem(ConstInterface.LAST_ROUTE_EVENT);
|
5817
|
+
window.localStorage.removeItem(ConstInterface.LAST_ROUTE_EVENT_SRC_TSK);
|
5818
|
+
window.localStorage.removeItem(ConstInterface.LAST_ROUTE_EVENT_ARG_LIST);
|
5819
|
+
window.localStorage.removeItem(ConstInterface.IS_SESSION_REINITIALIZING);
|
5820
|
+
window.localStorage.removeItem(ConstInterface.MAIN_PROG_VIEW);
|
5821
|
+
window.localStorage.removeItem(ConstInterface.GLOBAL_PARAM_LIST);
|
5822
|
+
window.localStorage.removeItem(ConstInterface.ENV_VAR_LIST);
|
5823
|
+
window.localStorage.removeItem(ConstInterface.LAST_EXCEPTION);
|
5824
|
+
window.localStorage.removeItem(ConstInterface.CTX_REMOVED_FROM_SRVR);
|
5825
|
+
}
|
5696
5826
|
HandleErrorResponse(response) {
|
5697
5827
|
try {
|
5698
5828
|
Logger.Instance.WriteServerMessagesToLog("MESSAGE FROM SERVER: " + response);
|
@@ -5906,21 +6036,6 @@ RemoteCommandsProcessor.InitialUrl = null;
|
|
5906
6036
|
RemoteCommandsProcessor.WEB_COMMUNICATION_PROTOCOL_VERSION = "14002";
|
5907
6037
|
RemoteCommandsProcessor._shouldScrambleAndUnscrambleMessages = false;
|
5908
6038
|
class HandshakeResponse {
|
5909
|
-
constructor(responseXML) {
|
5910
|
-
this._scrambleMessages = true;
|
5911
|
-
this._contextId = null;
|
5912
|
-
this._privateSessionId = null;
|
5913
|
-
this._inputPassword = false;
|
5914
|
-
this._httpTimeout = 0;
|
5915
|
-
this._systemLogin = null;
|
5916
|
-
this._maxInternalLogLevel = null;
|
5917
|
-
try {
|
5918
|
-
JSON_Utils.JSONFromXML(responseXML, this.FillFromJSON.bind(this));
|
5919
|
-
}
|
5920
|
-
catch (ex) {
|
5921
|
-
Logger.Instance.WriteExceptionToLog(ex, responseXML);
|
5922
|
-
}
|
5923
|
-
}
|
5924
6039
|
get ScrambleMessages() {
|
5925
6040
|
return this._scrambleMessages;
|
5926
6041
|
}
|
@@ -5942,6 +6057,21 @@ class HandshakeResponse {
|
|
5942
6057
|
get MaxInternalLogLevel() {
|
5943
6058
|
return this._maxInternalLogLevel;
|
5944
6059
|
}
|
6060
|
+
constructor(responseXML) {
|
6061
|
+
this._scrambleMessages = true;
|
6062
|
+
this._contextId = null;
|
6063
|
+
this._privateSessionId = null;
|
6064
|
+
this._inputPassword = false;
|
6065
|
+
this._httpTimeout = 0;
|
6066
|
+
this._systemLogin = null;
|
6067
|
+
this._maxInternalLogLevel = null;
|
6068
|
+
try {
|
6069
|
+
JSON_Utils.JSONFromXML(responseXML, this.FillFromJSON.bind(this));
|
6070
|
+
}
|
6071
|
+
catch (ex) {
|
6072
|
+
Logger.Instance.WriteExceptionToLog(ex, responseXML);
|
6073
|
+
}
|
6074
|
+
}
|
5945
6075
|
FillFromJSON(error, result) {
|
5946
6076
|
if (error != null) {
|
5947
6077
|
throw error;
|
@@ -6918,7 +7048,7 @@ ExpressionDict.expDesc = [
|
|
6918
7048
|
null,
|
6919
7049
|
new ExpDesc('N', 0, 0, 0, "", false),
|
6920
7050
|
null,
|
6921
|
-
|
7051
|
+
null,
|
6922
7052
|
new ExpDesc('B', 0, 2, 2, "V ", false),
|
6923
7053
|
null,
|
6924
7054
|
null,
|
@@ -7367,12 +7497,12 @@ ExpressionDict.expDesc = [
|
|
7367
7497
|
null,
|
7368
7498
|
new ExpDesc('A', 0, 1, 1, "A", false),
|
7369
7499
|
new ExpDesc('N', 0, 2, 2, "AA", false),
|
7370
|
-
|
7371
|
-
|
7372
|
-
|
7373
|
-
|
7374
|
-
|
7375
|
-
|
7500
|
+
null,
|
7501
|
+
null,
|
7502
|
+
null,
|
7503
|
+
null,
|
7504
|
+
null,
|
7505
|
+
null,
|
7376
7506
|
new ExpDesc('N', 0, 1, 1, "N", false),
|
7377
7507
|
null,
|
7378
7508
|
null,
|
@@ -7459,48 +7589,6 @@ ExpressionDict.expDesc = [
|
|
7459
7589
|
new ExpDesc('U', 0, 0, 0, '', false),
|
7460
7590
|
];
|
7461
7591
|
|
7462
|
-
var DataViewCommandType;
|
7463
|
-
(function (DataViewCommandType) {
|
7464
|
-
DataViewCommandType[DataViewCommandType["Init"] = 0] = "Init";
|
7465
|
-
DataViewCommandType[DataViewCommandType["Clear"] = 1] = "Clear";
|
7466
|
-
DataViewCommandType[DataViewCommandType["Prepare"] = 2] = "Prepare";
|
7467
|
-
DataViewCommandType[DataViewCommandType["FirstChunk"] = 3] = "FirstChunk";
|
7468
|
-
DataViewCommandType[DataViewCommandType["RecomputeUnit"] = 4] = "RecomputeUnit";
|
7469
|
-
DataViewCommandType[DataViewCommandType["ExecuteLocalUpdates"] = 5] = "ExecuteLocalUpdates";
|
7470
|
-
DataViewCommandType[DataViewCommandType["InitDataControlViews"] = 6] = "InitDataControlViews";
|
7471
|
-
DataViewCommandType[DataViewCommandType["OpenTransaction"] = 7] = "OpenTransaction";
|
7472
|
-
DataViewCommandType[DataViewCommandType["CloseTransaction"] = 8] = "CloseTransaction";
|
7473
|
-
DataViewCommandType[DataViewCommandType["SetTransactionState"] = 9] = "SetTransactionState";
|
7474
|
-
DataViewCommandType[DataViewCommandType["AddUserRange"] = 10] = "AddUserRange";
|
7475
|
-
DataViewCommandType[DataViewCommandType["ResetUserRange"] = 11] = "ResetUserRange";
|
7476
|
-
DataViewCommandType[DataViewCommandType["DbDisconnect"] = 12] = "DbDisconnect";
|
7477
|
-
DataViewCommandType[DataViewCommandType["AddUserLocate"] = 13] = "AddUserLocate";
|
7478
|
-
DataViewCommandType[DataViewCommandType["ResetUserLocate"] = 14] = "ResetUserLocate";
|
7479
|
-
DataViewCommandType[DataViewCommandType["AddUserSort"] = 15] = "AddUserSort";
|
7480
|
-
DataViewCommandType[DataViewCommandType["ResetUserSort"] = 16] = "ResetUserSort";
|
7481
|
-
DataViewCommandType[DataViewCommandType["DataViewToDataSource"] = 17] = "DataViewToDataSource";
|
7482
|
-
DataViewCommandType[DataViewCommandType["DbDelete"] = 18] = "DbDelete";
|
7483
|
-
DataViewCommandType[DataViewCommandType["ControlItemsRefresh"] = 19] = "ControlItemsRefresh";
|
7484
|
-
DataViewCommandType[DataViewCommandType["SQLExecute"] = 20] = "SQLExecute";
|
7485
|
-
})(DataViewCommandType || (DataViewCommandType = {}));
|
7486
|
-
class DataviewCommand extends ClientOriginatedCommandTaskTag {
|
7487
|
-
constructor() {
|
7488
|
-
super();
|
7489
|
-
this.CommandType = 0;
|
7490
|
-
this.TaskTag = null;
|
7491
|
-
}
|
7492
|
-
get CommandTypeAttribute() {
|
7493
|
-
throw new NotImplementedException();
|
7494
|
-
}
|
7495
|
-
SerializeCommandData() {
|
7496
|
-
Debug.Assert(false, "Dataview commands need not be serialized");
|
7497
|
-
return null;
|
7498
|
-
}
|
7499
|
-
get ShouldSerialize() {
|
7500
|
-
return false;
|
7501
|
-
}
|
7502
|
-
}
|
7503
|
-
|
7504
7592
|
class EventHandlerPosition {
|
7505
7593
|
constructor() {
|
7506
7594
|
this._handlerIdx = 0;
|
@@ -7557,6 +7645,9 @@ class EventHandlerPosition {
|
|
7557
7645
|
case InternalInterface.MG_ACT_REC_SUFFIX:
|
7558
7646
|
case InternalInterface.MG_ACT_CTRL_PREFIX:
|
7559
7647
|
case InternalInterface.MG_ACT_CTRL_SUFFIX: {
|
7648
|
+
if (this._rtEvt.getInternalCode() == InternalInterface.MG_ACT_REC_PREFIX) {
|
7649
|
+
FlowMonitorQueue.Instance.addDataViewFlow(this._task);
|
7650
|
+
}
|
7560
7651
|
if (this._handlerIdx === -1) {
|
7561
7652
|
for (this._handlerIdx = this._handlersTab.getSize() - 1; this._handlerIdx >= 0; this._handlerIdx--) {
|
7562
7653
|
let handler = this._handlersTab.getHandler(this._handlerIdx);
|
@@ -7697,6 +7788,48 @@ EventHandlerPosition.PHASE_CONTROL_NON_SPECIFIC = 2;
|
|
7697
7788
|
EventHandlerPosition.PHASE_GLOBAL = 3;
|
7698
7789
|
EventHandlerPosition.PHASE_GLOBAL_SPECIFIC = 4;
|
7699
7790
|
|
7791
|
+
var DataViewCommandType;
|
7792
|
+
(function (DataViewCommandType) {
|
7793
|
+
DataViewCommandType[DataViewCommandType["Init"] = 0] = "Init";
|
7794
|
+
DataViewCommandType[DataViewCommandType["Clear"] = 1] = "Clear";
|
7795
|
+
DataViewCommandType[DataViewCommandType["Prepare"] = 2] = "Prepare";
|
7796
|
+
DataViewCommandType[DataViewCommandType["FirstChunk"] = 3] = "FirstChunk";
|
7797
|
+
DataViewCommandType[DataViewCommandType["RecomputeUnit"] = 4] = "RecomputeUnit";
|
7798
|
+
DataViewCommandType[DataViewCommandType["ExecuteLocalUpdates"] = 5] = "ExecuteLocalUpdates";
|
7799
|
+
DataViewCommandType[DataViewCommandType["InitDataControlViews"] = 6] = "InitDataControlViews";
|
7800
|
+
DataViewCommandType[DataViewCommandType["OpenTransaction"] = 7] = "OpenTransaction";
|
7801
|
+
DataViewCommandType[DataViewCommandType["CloseTransaction"] = 8] = "CloseTransaction";
|
7802
|
+
DataViewCommandType[DataViewCommandType["SetTransactionState"] = 9] = "SetTransactionState";
|
7803
|
+
DataViewCommandType[DataViewCommandType["AddUserRange"] = 10] = "AddUserRange";
|
7804
|
+
DataViewCommandType[DataViewCommandType["ResetUserRange"] = 11] = "ResetUserRange";
|
7805
|
+
DataViewCommandType[DataViewCommandType["DbDisconnect"] = 12] = "DbDisconnect";
|
7806
|
+
DataViewCommandType[DataViewCommandType["AddUserLocate"] = 13] = "AddUserLocate";
|
7807
|
+
DataViewCommandType[DataViewCommandType["ResetUserLocate"] = 14] = "ResetUserLocate";
|
7808
|
+
DataViewCommandType[DataViewCommandType["AddUserSort"] = 15] = "AddUserSort";
|
7809
|
+
DataViewCommandType[DataViewCommandType["ResetUserSort"] = 16] = "ResetUserSort";
|
7810
|
+
DataViewCommandType[DataViewCommandType["DataViewToDataSource"] = 17] = "DataViewToDataSource";
|
7811
|
+
DataViewCommandType[DataViewCommandType["DbDelete"] = 18] = "DbDelete";
|
7812
|
+
DataViewCommandType[DataViewCommandType["ControlItemsRefresh"] = 19] = "ControlItemsRefresh";
|
7813
|
+
DataViewCommandType[DataViewCommandType["SQLExecute"] = 20] = "SQLExecute";
|
7814
|
+
})(DataViewCommandType || (DataViewCommandType = {}));
|
7815
|
+
class DataviewCommand extends ClientOriginatedCommandTaskTag {
|
7816
|
+
get CommandTypeAttribute() {
|
7817
|
+
throw new NotImplementedException();
|
7818
|
+
}
|
7819
|
+
SerializeCommandData() {
|
7820
|
+
Debug.Assert(false, "Dataview commands need not be serialized");
|
7821
|
+
return null;
|
7822
|
+
}
|
7823
|
+
get ShouldSerialize() {
|
7824
|
+
return false;
|
7825
|
+
}
|
7826
|
+
constructor() {
|
7827
|
+
super();
|
7828
|
+
this.CommandType = 0;
|
7829
|
+
this.TaskTag = null;
|
7830
|
+
}
|
7831
|
+
}
|
7832
|
+
|
7700
7833
|
class AddUserRangeDataviewCommand extends DataviewCommand {
|
7701
7834
|
constructor() {
|
7702
7835
|
super();
|
@@ -7916,12 +8049,6 @@ class NonReversibleExitEventCommand extends EventCommand {
|
|
7916
8049
|
}
|
7917
8050
|
|
7918
8051
|
class RecomputeCommand extends ClientOriginatedCommandTaskTag {
|
7919
|
-
constructor() {
|
7920
|
-
super();
|
7921
|
-
this.TaskTag = null;
|
7922
|
-
this.FldId = 0;
|
7923
|
-
this.IgnoreSubformRecompute = false;
|
7924
|
-
}
|
7925
8052
|
get CommandTypeAttribute() {
|
7926
8053
|
return ConstInterface.MG_ATTR_VAL_RECOMP;
|
7927
8054
|
}
|
@@ -7933,17 +8060,18 @@ class RecomputeCommand extends ClientOriginatedCommandTaskTag {
|
|
7933
8060
|
helper.SerializeAttribute(ConstInterface.MG_ATTR_IGNORE_SUBFORM_RECOMPUTE, '1');
|
7934
8061
|
return helper.GetString();
|
7935
8062
|
}
|
8063
|
+
constructor() {
|
8064
|
+
super();
|
8065
|
+
this.TaskTag = null;
|
8066
|
+
this.FldId = 0;
|
8067
|
+
this.IgnoreSubformRecompute = false;
|
8068
|
+
}
|
7936
8069
|
getCommandInfo() {
|
7937
8070
|
return NString.Format('[{0} in {1} for Field {2}]', this.CommandTypeAttribute.charAt(0).toUpperCase() + this.CommandTypeAttribute.substr(1, this.CommandTypeAttribute.length), this.Task.getTaskInfo(), this.Task.getFieldDef(this.FldId).getName());
|
7938
8071
|
}
|
7939
8072
|
}
|
7940
8073
|
|
7941
8074
|
class TransactionCommand extends ClientOriginatedCommandTaskTag {
|
7942
|
-
constructor() {
|
7943
|
-
super();
|
7944
|
-
this.TaskTag = null;
|
7945
|
-
this.ReversibleExit = false;
|
7946
|
-
}
|
7947
8075
|
get CommandTypeAttribute() {
|
7948
8076
|
return ConstInterface.MG_ATTR_VAL_TRANS;
|
7949
8077
|
}
|
@@ -7957,6 +8085,11 @@ class TransactionCommand extends ClientOriginatedCommandTaskTag {
|
|
7957
8085
|
helper.SerializeAttribute(ConstInterface.MG_ATTR_TRANS_LEVEL, this.Level);
|
7958
8086
|
return helper.GetString();
|
7959
8087
|
}
|
8088
|
+
constructor() {
|
8089
|
+
super();
|
8090
|
+
this.TaskTag = null;
|
8091
|
+
this.ReversibleExit = false;
|
8092
|
+
}
|
7960
8093
|
getCommandInfo() {
|
7961
8094
|
return NString.Format('[{0} in {1}]', this.Oper === 'C' ? 'Commit Transaction' : 'Abort Transaction', this.Task.getTaskInfo());
|
7962
8095
|
}
|
@@ -7975,6 +8108,9 @@ class UnloadCommand extends ClientOriginatedCommand {
|
|
7975
8108
|
}
|
7976
8109
|
|
7977
8110
|
class EvaluateCommand extends ClientOriginatedCommandTaskTag {
|
8111
|
+
get CommandTypeAttribute() {
|
8112
|
+
return ConstInterface.MG_ATTR_VAL_EVAL;
|
8113
|
+
}
|
7978
8114
|
constructor() {
|
7979
8115
|
super();
|
7980
8116
|
this.TaskTag = null;
|
@@ -7983,9 +8119,6 @@ class EvaluateCommand extends ClientOriginatedCommandTaskTag {
|
|
7983
8119
|
this.MprgCreator = null;
|
7984
8120
|
this.LengthExpVal = Int32.MinValue;
|
7985
8121
|
}
|
7986
|
-
get CommandTypeAttribute() {
|
7987
|
-
return ConstInterface.MG_ATTR_VAL_EVAL;
|
7988
|
-
}
|
7989
8122
|
SerializeCommandData() {
|
7990
8123
|
let helper = new CommandSerializationHelper();
|
7991
8124
|
helper.SerializeTaskTag(this.TaskTag);
|
@@ -8030,13 +8163,9 @@ class GlobalParamsQueryCommand extends QueryCommand {
|
|
8030
8163
|
constructor() {
|
8031
8164
|
super();
|
8032
8165
|
}
|
8033
|
-
}
|
8034
|
-
|
8035
|
-
class IniputForceWriteCommand extends ClientOriginatedCommand {
|
8036
|
-
constructor() {
|
8037
|
-
super();
|
8038
|
-
this.Text = null;
|
8039
|
-
}
|
8166
|
+
}
|
8167
|
+
|
8168
|
+
class IniputForceWriteCommand extends ClientOriginatedCommand {
|
8040
8169
|
get CommandTypeAttribute() {
|
8041
8170
|
return ConstInterface.MG_ATTR_VAL_INIPUT_FORCE_WRITE;
|
8042
8171
|
}
|
@@ -8046,6 +8175,10 @@ class IniputForceWriteCommand extends ClientOriginatedCommand {
|
|
8046
8175
|
SerializeCommandData() {
|
8047
8176
|
return " " + ConstInterface.MG_ATTR_VAL_INIPUT_PARAM + "=\"" + XmlParser.escape(this.Text) + "\"";
|
8048
8177
|
}
|
8178
|
+
constructor() {
|
8179
|
+
super();
|
8180
|
+
this.Text = null;
|
8181
|
+
}
|
8049
8182
|
getCommandInfo() {
|
8050
8183
|
return NString.Format('[{0} with {1}] ', this.CommandTypeAttribute, this.Text);
|
8051
8184
|
}
|
@@ -8336,13 +8469,6 @@ class CommandFactory {
|
|
8336
8469
|
}
|
8337
8470
|
}
|
8338
8471
|
|
8339
|
-
class Sort {
|
8340
|
-
constructor() {
|
8341
|
-
this.fldIdx = 0;
|
8342
|
-
this.dir = false;
|
8343
|
-
}
|
8344
|
-
}
|
8345
|
-
|
8346
8472
|
var ParamParseResult;
|
8347
8473
|
(function (ParamParseResult) {
|
8348
8474
|
ParamParseResult[ParamParseResult["OK"] = 0] = "OK";
|
@@ -8352,10 +8478,6 @@ var ParamParseResult;
|
|
8352
8478
|
})(ParamParseResult || (ParamParseResult = {}));
|
8353
8479
|
|
8354
8480
|
class PrmMap {
|
8355
|
-
constructor() {
|
8356
|
-
this.values = null;
|
8357
|
-
this.values = new Dictionary();
|
8358
|
-
}
|
8359
8481
|
getvalue(s) {
|
8360
8482
|
if (this.values.ContainsKey(s))
|
8361
8483
|
return this.values.get_Item(s);
|
@@ -8368,6 +8490,10 @@ class PrmMap {
|
|
8368
8490
|
remove(s) {
|
8369
8491
|
this.values.Remove(s);
|
8370
8492
|
}
|
8493
|
+
constructor() {
|
8494
|
+
this.values = null;
|
8495
|
+
this.values = new Dictionary();
|
8496
|
+
}
|
8371
8497
|
}
|
8372
8498
|
class MirrorPrmMap extends PrmMap {
|
8373
8499
|
constructor(type) {
|
@@ -8448,7 +8574,7 @@ class MirrorPrmMap extends PrmMap {
|
|
8448
8574
|
while (this.mirrorFromXML(parser.getNextTag(), parser)) {
|
8449
8575
|
}
|
8450
8576
|
}
|
8451
|
-
|
8577
|
+
RestoreParams(xml) {
|
8452
8578
|
let parser = new XmlParser(xml);
|
8453
8579
|
while (this.mirrorFromXML(parser.getNextTag(), parser)) {
|
8454
8580
|
}
|
@@ -8523,6 +8649,7 @@ class Environment {
|
|
8523
8649
|
this._debugMode = 0;
|
8524
8650
|
this._significantNumSize = 0;
|
8525
8651
|
this._specialAnsiExpression = false;
|
8652
|
+
this._specialImmediatehandlerEnd = false;
|
8526
8653
|
this._specialShowStatusBarPanes = false;
|
8527
8654
|
this._specialRouteToRootProgOnContextRecreation = false;
|
8528
8655
|
this._specialCancelOnCreate = false;
|
@@ -8676,6 +8803,9 @@ class Environment {
|
|
8676
8803
|
case ConstInterface.MG_ATTR_LOCAL_FLAGS:
|
8677
8804
|
this._localFlags = valueStr;
|
8678
8805
|
break;
|
8806
|
+
case ConstInterface.MG_ATTR_SPECIAL_IMMEDIATE_HANDLER_END:
|
8807
|
+
this._specialImmediatehandlerEnd = XmlParser.getBoolean(valueStr);
|
8808
|
+
break;
|
8679
8809
|
case ConstInterface.MG_ATTR_SPEACIAL_ANSI_EXP:
|
8680
8810
|
this._specialAnsiExpression = XmlParser.getBoolean(valueStr);
|
8681
8811
|
break;
|
@@ -8882,6 +9012,9 @@ class Environment {
|
|
8882
9012
|
GetLocalFlag(f) {
|
8883
9013
|
return this._localFlags !== null && this._localFlags.indexOf(f) >= 0;
|
8884
9014
|
}
|
9015
|
+
getSpecialImmediateHandlerEnd() {
|
9016
|
+
return this._specialImmediatehandlerEnd;
|
9017
|
+
}
|
8885
9018
|
getSpecialAnsiExpression() {
|
8886
9019
|
return this._specialAnsiExpression;
|
8887
9020
|
}
|
@@ -8951,6 +9084,12 @@ class Environment {
|
|
8951
9084
|
}
|
8952
9085
|
Environment.Instance = new Environment();
|
8953
9086
|
class EnvironmentDetails {
|
9087
|
+
set UpdateInQueryMode(value) {
|
9088
|
+
this._updateInQueryMode = value;
|
9089
|
+
}
|
9090
|
+
set CreateInModifyMode(value) {
|
9091
|
+
this._createInModifyMode = value;
|
9092
|
+
}
|
8954
9093
|
constructor() {
|
8955
9094
|
this._createInModifyMode = false;
|
8956
9095
|
this._updateInQueryMode = false;
|
@@ -8961,12 +9100,6 @@ class EnvironmentDetails {
|
|
8961
9100
|
this.ProjDir = null;
|
8962
9101
|
this.CompIdx = 0;
|
8963
9102
|
}
|
8964
|
-
set UpdateInQueryMode(value) {
|
8965
|
-
this._updateInQueryMode = value;
|
8966
|
-
}
|
8967
|
-
set CreateInModifyMode(value) {
|
8968
|
-
this._createInModifyMode = value;
|
8969
|
-
}
|
8970
9103
|
allowUpdateInQueryMode() {
|
8971
9104
|
return this._updateInQueryMode;
|
8972
9105
|
}
|
@@ -9054,17 +9187,6 @@ class GlobalParams extends MirrorPrmMap {
|
|
9054
9187
|
GlobalParams.Instance = new GlobalParams();
|
9055
9188
|
|
9056
9189
|
class UserDetails {
|
9057
|
-
constructor() {
|
9058
|
-
this.UserName = null;
|
9059
|
-
this.UserID = null;
|
9060
|
-
this.UserInfo = null;
|
9061
|
-
this.Password = null;
|
9062
|
-
this.IsLoggedIn = false;
|
9063
|
-
this.UserName = NString.Empty;
|
9064
|
-
this.UserInfo = NString.Empty;
|
9065
|
-
this.IsLoggedIn = false;
|
9066
|
-
this.setUserID(NString.Empty);
|
9067
|
-
}
|
9068
9190
|
setIsLoggedIn(value) {
|
9069
9191
|
this.IsLoggedIn = value;
|
9070
9192
|
}
|
@@ -9084,6 +9206,17 @@ class UserDetails {
|
|
9084
9206
|
UserDetails._instance = new UserDetails();
|
9085
9207
|
return UserDetails._instance;
|
9086
9208
|
}
|
9209
|
+
constructor() {
|
9210
|
+
this.UserName = null;
|
9211
|
+
this.UserID = null;
|
9212
|
+
this.UserInfo = null;
|
9213
|
+
this.Password = null;
|
9214
|
+
this.IsLoggedIn = false;
|
9215
|
+
this.UserName = NString.Empty;
|
9216
|
+
this.UserInfo = NString.Empty;
|
9217
|
+
this.IsLoggedIn = false;
|
9218
|
+
this.setUserID(NString.Empty);
|
9219
|
+
}
|
9087
9220
|
fillData(parser) {
|
9088
9221
|
let tokensVector;
|
9089
9222
|
let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_TERM, parser.getCurrIndex());
|
@@ -9920,8 +10053,7 @@ class MirrorString {
|
|
9920
10053
|
this._reserved = false;
|
9921
10054
|
}
|
9922
10055
|
mirrorToXML() {
|
9923
|
-
return ConstInterface.MG_ATTR_ENV_VALUE + "=\"" + XmlParser.escape(this._value) + "\"
|
9924
|
-
ConstInterface.MG_ATTR_ENV_WRITEINI + "=F";
|
10056
|
+
return ConstInterface.MG_ATTR_ENV_VALUE + "=\"" + XmlParser.escape(this._value) + "\"";
|
9925
10057
|
}
|
9926
10058
|
init(name, xmlParser) {
|
9927
10059
|
let valueStart, valueEnd, reserveStart, paramEnd;
|
@@ -11497,11 +11629,6 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
11497
11629
|
val1 = valStack.pop();
|
11498
11630
|
this.eval_op_eoy(resVal, val1);
|
11499
11631
|
break;
|
11500
|
-
case ExpressionInterface.EXP_OP_ROLLBACK:
|
11501
|
-
val2 = valStack.pop();
|
11502
|
-
val1 = valStack.pop();
|
11503
|
-
yield this.eval_op_rollback(resVal);
|
11504
|
-
break;
|
11505
11632
|
case ExpressionInterface.EXP_OP_VARSET:
|
11506
11633
|
val2 = valStack.pop();
|
11507
11634
|
val1 = valStack.pop();
|
@@ -11866,41 +11993,6 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
11866
11993
|
val1 = valStack.pop();
|
11867
11994
|
this.eval_op_taskType(resVal, val1);
|
11868
11995
|
break;
|
11869
|
-
case ExpressionInterface.EXP_OP_RANGE_ADD:
|
11870
|
-
nArgs = valStack.pop();
|
11871
|
-
if (nArgs > 0) {
|
11872
|
-
Exp_params = new Array(nArgs);
|
11873
|
-
for (j = 0; j < nArgs; j++)
|
11874
|
-
Exp_params[nArgs - 1 - j] = valStack.pop();
|
11875
|
-
yield this.eval_op_range_add(resVal, Exp_params);
|
11876
|
-
}
|
11877
|
-
break;
|
11878
|
-
case ExpressionInterface.EXP_OP_RANGE_RESET:
|
11879
|
-
val1 = valStack.pop();
|
11880
|
-
yield this.eval_op_range_reset(resVal, val1);
|
11881
|
-
break;
|
11882
|
-
case ExpressionInterface.EXP_OP_LOCATE_ADD:
|
11883
|
-
nArgs = valStack.pop();
|
11884
|
-
if (nArgs > 0) {
|
11885
|
-
Exp_params = new Array(nArgs);
|
11886
|
-
for (j = 0; j < nArgs; j++)
|
11887
|
-
Exp_params[nArgs - 1 - j] = valStack.pop();
|
11888
|
-
yield this.eval_op_locate_add(resVal, Exp_params);
|
11889
|
-
}
|
11890
|
-
break;
|
11891
|
-
case ExpressionInterface.EXP_OP_LOCATE_RESET:
|
11892
|
-
val1 = valStack.pop();
|
11893
|
-
yield this.eval_op_locate_reset(resVal, val1);
|
11894
|
-
break;
|
11895
|
-
case ExpressionInterface.EXP_OP_SORT_ADD:
|
11896
|
-
val2 = valStack.pop();
|
11897
|
-
val1 = valStack.pop();
|
11898
|
-
yield this.eval_op_sort_add(resVal, val1, val2);
|
11899
|
-
break;
|
11900
|
-
case ExpressionInterface.EXP_OP_SORT_RESET:
|
11901
|
-
val1 = valStack.pop();
|
11902
|
-
yield this.eval_op_sort_reset(resVal, val1);
|
11903
|
-
break;
|
11904
11996
|
case ExpressionInterface.EXP_OP_TSK_INSTANCE:
|
11905
11997
|
val1 = valStack.pop();
|
11906
11998
|
this.eval_op_tsk_instance(resVal, val1);
|
@@ -11929,7 +12021,7 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
11929
12021
|
Exp_params = new Array(nArgs);
|
11930
12022
|
for (j = 0; j < nArgs; j++)
|
11931
12023
|
Exp_params[nArgs - 1 - j] = valStack.pop();
|
11932
|
-
this.eval_op_CallJS(this.ExpTask, valStack.pop().StrVal, Exp_params, resVal);
|
12024
|
+
yield this.eval_op_CallJS(this.ExpTask, valStack.pop().StrVal, Exp_params, resVal);
|
11933
12025
|
}
|
11934
12026
|
break;
|
11935
12027
|
case ExpressionInterface.EXP_OP_SET_COOKIE:
|
@@ -13569,14 +13661,6 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
13569
13661
|
yield fld.updateDisplay();
|
13570
13662
|
});
|
13571
13663
|
}
|
13572
|
-
eval_op_rollback(resVal) {
|
13573
|
-
return __awaiter(this, void 0, void 0, function* () {
|
13574
|
-
let task = this.ExpTask.GetContextTask() || this.ExpTask;
|
13575
|
-
yield AccessHelper.eventsManager.handleInternalEventWithTask(task, InternalInterface.MG_ACT_ROLLBACK);
|
13576
|
-
resVal.Attr = StorageAttribute.BOOLEAN;
|
13577
|
-
resVal.BoolVal = true;
|
13578
|
-
});
|
13579
|
-
}
|
13580
13664
|
eval_op_like(source, maskOrg, resVal) {
|
13581
13665
|
let i;
|
13582
13666
|
let j;
|
@@ -14137,75 +14221,6 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
14137
14221
|
resultStr.Replace('\\@', '@');
|
14138
14222
|
resVal.StrVal = resultStr.ToString();
|
14139
14223
|
}
|
14140
|
-
eval_op_range_add(resVal, Exp_params) {
|
14141
|
-
return __awaiter(this, void 0, void 0, function* () {
|
14142
|
-
resVal.Attr = StorageAttribute.BOOLEAN;
|
14143
|
-
resVal.BoolVal = yield this.add_rt_ranges(Exp_params, false);
|
14144
|
-
});
|
14145
|
-
}
|
14146
|
-
eval_op_range_reset(resVal, parent) {
|
14147
|
-
const _super = Object.create(null, {
|
14148
|
-
GetContextTask: { get: () => super.GetContextTask }
|
14149
|
-
});
|
14150
|
-
return __awaiter(this, void 0, void 0, function* () {
|
14151
|
-
resVal.Attr = StorageAttribute.BOOLEAN;
|
14152
|
-
let iParent = parent.MgNumVal.NUM_2_LONG();
|
14153
|
-
if ((iParent >= 0 && iParent < (this.ExpTask.getTaskDepth(false))) || iParent === ExpressionEvaluator.TRIGGER_TASK) {
|
14154
|
-
let task = _super.GetContextTask.call(this, iParent);
|
14155
|
-
if (task !== null) {
|
14156
|
-
let command = CommandFactory.CreateDataViewCommand(task.getTaskTag(), DataViewCommandType.ResetUserRange);
|
14157
|
-
yield task.DataviewManager.Execute(command);
|
14158
|
-
resVal.BoolVal = true;
|
14159
|
-
}
|
14160
|
-
}
|
14161
|
-
});
|
14162
|
-
}
|
14163
|
-
eval_op_locate_add(resVal, Exp_params) {
|
14164
|
-
return __awaiter(this, void 0, void 0, function* () {
|
14165
|
-
resVal.Attr = StorageAttribute.BOOLEAN;
|
14166
|
-
resVal.BoolVal = yield this.add_rt_ranges(Exp_params, true);
|
14167
|
-
});
|
14168
|
-
}
|
14169
|
-
eval_op_locate_reset(resVal, parent) {
|
14170
|
-
const _super = Object.create(null, {
|
14171
|
-
GetContextTask: { get: () => super.GetContextTask }
|
14172
|
-
});
|
14173
|
-
return __awaiter(this, void 0, void 0, function* () {
|
14174
|
-
resVal.Attr = StorageAttribute.BOOLEAN;
|
14175
|
-
let iParent = parent.MgNumVal.NUM_2_LONG();
|
14176
|
-
if ((iParent >= 0 && iParent < (this.ExpTask.getTaskDepth(false))) || iParent === ExpressionEvaluator.TRIGGER_TASK) {
|
14177
|
-
let task = _super.GetContextTask.call(this, iParent);
|
14178
|
-
if (task !== null) {
|
14179
|
-
let command = CommandFactory.CreateDataViewCommand(task.getTaskTag(), DataViewCommandType.ResetUserLocate);
|
14180
|
-
yield task.DataviewManager.Execute(command);
|
14181
|
-
resVal.BoolVal = true;
|
14182
|
-
}
|
14183
|
-
}
|
14184
|
-
});
|
14185
|
-
}
|
14186
|
-
eval_op_sort_add(resVal, varnum, dir) {
|
14187
|
-
return __awaiter(this, void 0, void 0, function* () {
|
14188
|
-
resVal.Attr = StorageAttribute.BOOLEAN;
|
14189
|
-
resVal.BoolVal = yield this.add_sort(varnum, dir);
|
14190
|
-
});
|
14191
|
-
}
|
14192
|
-
eval_op_sort_reset(resVal, parent) {
|
14193
|
-
const _super = Object.create(null, {
|
14194
|
-
GetContextTask: { get: () => super.GetContextTask }
|
14195
|
-
});
|
14196
|
-
return __awaiter(this, void 0, void 0, function* () {
|
14197
|
-
resVal.Attr = StorageAttribute.BOOLEAN;
|
14198
|
-
let iParent = parent.MgNumVal.NUM_2_LONG();
|
14199
|
-
if ((iParent >= 0 && iParent < (this.ExpTask.getTaskDepth(false))) || iParent === ExpressionEvaluator.TRIGGER_TASK) {
|
14200
|
-
let task = _super.GetContextTask.call(this, iParent);
|
14201
|
-
if (task !== null) {
|
14202
|
-
let command = CommandFactory.CreateDataViewCommand(task.getTaskTag(), DataViewCommandType.ResetUserSort);
|
14203
|
-
yield task.DataviewManager.Execute(command);
|
14204
|
-
resVal.BoolVal = true;
|
14205
|
-
}
|
14206
|
-
}
|
14207
|
-
});
|
14208
|
-
}
|
14209
14224
|
eval_op_tsk_instance(resVal, Parent) {
|
14210
14225
|
let tag = 0;
|
14211
14226
|
let iParent = Parent.MgNumVal.NUM_2_LONG();
|
@@ -14219,88 +14234,6 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
14219
14234
|
resVal.MgNumVal = new NUM_TYPE();
|
14220
14235
|
resVal.MgNumVal.NUM_4_LONG(tag);
|
14221
14236
|
}
|
14222
|
-
add_sort(varnum, dir) {
|
14223
|
-
return __awaiter(this, void 0, void 0, function* () {
|
14224
|
-
if (varnum.MgNumVal === null)
|
14225
|
-
return false;
|
14226
|
-
let itm = varnum.MgNumVal.NUM_2_LONG();
|
14227
|
-
if (itm === 0)
|
14228
|
-
return false;
|
14229
|
-
let fld = this.GetFieldOfContextTask(itm);
|
14230
|
-
if (fld === null)
|
14231
|
-
return false;
|
14232
|
-
let task = fld.getTask();
|
14233
|
-
let vee_idx = fld.getId() + 1;
|
14234
|
-
let expr_64 = new Sort();
|
14235
|
-
expr_64.fldIdx = vee_idx;
|
14236
|
-
expr_64.dir = dir.BoolVal;
|
14237
|
-
let sort = expr_64;
|
14238
|
-
let command = CommandFactory.CreateAddUserSortDataviewCommand(task.getTaskTag(), sort);
|
14239
|
-
yield task.DataviewManager.Execute(command);
|
14240
|
-
return true;
|
14241
|
-
});
|
14242
|
-
}
|
14243
|
-
add_rt_ranges(Exp_params, locate) {
|
14244
|
-
return __awaiter(this, void 0, void 0, function* () {
|
14245
|
-
let varnum = Exp_params[0];
|
14246
|
-
let min = Exp_params[1];
|
14247
|
-
if (varnum.MgNumVal === null)
|
14248
|
-
return false;
|
14249
|
-
let itm = varnum.MgNumVal.NUM_2_LONG();
|
14250
|
-
if (itm === 0)
|
14251
|
-
return false;
|
14252
|
-
let fld = this.GetFieldOfContextTask(itm);
|
14253
|
-
if (fld === null)
|
14254
|
-
return false;
|
14255
|
-
let task = fld.getTask();
|
14256
|
-
let vee_idx = fld.getId() + 1;
|
14257
|
-
let expr_78 = new UserRange();
|
14258
|
-
expr_78.veeIdx = vee_idx;
|
14259
|
-
let rng = expr_78;
|
14260
|
-
if (min.IsNull)
|
14261
|
-
rng.nullMin = true;
|
14262
|
-
if (!rng.nullMin && (min.Attr === StorageAttribute.ALPHA || min.Attr === StorageAttribute.UNICODE) && min.StrVal.length === 0)
|
14263
|
-
rng.discardMin = true;
|
14264
|
-
else {
|
14265
|
-
if (!rng.nullMin) {
|
14266
|
-
if (!StorageAttributeCheck.isTheSameType(fld.getType(), min.Attr))
|
14267
|
-
return false;
|
14268
|
-
if (StorageAttributeCheck.StorageFldAlphaUnicodeOrBlob(fld.getType(), min.Attr))
|
14269
|
-
this.ConvertExpVal(min, fld.getType());
|
14270
|
-
rng.min = min.ToMgVal();
|
14271
|
-
}
|
14272
|
-
}
|
14273
|
-
if (Exp_params.length === 3) {
|
14274
|
-
let max = Exp_params[2];
|
14275
|
-
if (max.IsNull)
|
14276
|
-
rng.nullMax = true;
|
14277
|
-
if (!rng.nullMax && (max.Attr === StorageAttribute.ALPHA || max.Attr === StorageAttribute.UNICODE) && max.StrVal.length === 0)
|
14278
|
-
rng.discardMax = true;
|
14279
|
-
else {
|
14280
|
-
if (!rng.nullMax) {
|
14281
|
-
if (!StorageAttributeCheck.isTheSameType(fld.getType(), max.Attr))
|
14282
|
-
return false;
|
14283
|
-
if (StorageAttributeCheck.StorageFldAlphaUnicodeOrBlob(fld.getType(), max.Attr))
|
14284
|
-
this.ConvertExpVal(max, fld.getType());
|
14285
|
-
rng.max = max.ToMgVal();
|
14286
|
-
}
|
14287
|
-
}
|
14288
|
-
}
|
14289
|
-
else
|
14290
|
-
rng.discardMax = true;
|
14291
|
-
if (!rng.discardMin || !rng.discardMax) {
|
14292
|
-
if (locate) {
|
14293
|
-
let command = CommandFactory.CreateAddUserLocateDataviewCommand(task.getTaskTag(), rng);
|
14294
|
-
yield task.DataviewManager.Execute(command);
|
14295
|
-
}
|
14296
|
-
else {
|
14297
|
-
let command2 = CommandFactory.CreateAddUserRangeDataviewCommand(task.getTaskTag(), rng);
|
14298
|
-
yield task.DataviewManager.Execute(command2);
|
14299
|
-
}
|
14300
|
-
}
|
14301
|
-
return true;
|
14302
|
-
});
|
14303
|
-
}
|
14304
14237
|
eval_op_getParam(resVal, name) {
|
14305
14238
|
Debug.Assert(!name.IsNull && name.StrVal !== null);
|
14306
14239
|
let expVal = GlobalParams.Instance.get(name.StrVal);
|
@@ -14507,18 +14440,24 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
14507
14440
|
});
|
14508
14441
|
}
|
14509
14442
|
eval_op_CallJS(task, methodName, expVal, resVal) {
|
14510
|
-
|
14511
|
-
resVal.StrVal = '';
|
14512
|
-
if (task.isMainProg()) {
|
14513
|
-
console.error("CallJS cannot be used in Main Program");
|
14514
|
-
return;
|
14515
|
-
}
|
14516
|
-
let form = task.getForm();
|
14517
|
-
let args = this.params2arguments(expVal, 0, expVal.length);
|
14518
|
-
if (!isNullOrUndefined(args)) {
|
14519
|
-
resVal.StrVal = Commands.addCallJS(form, form.UniqueName, methodName, args);
|
14443
|
+
return __awaiter(this, void 0, void 0, function* () {
|
14520
14444
|
resVal.Attr = StorageAttribute.ALPHA;
|
14521
|
-
|
14445
|
+
resVal.StrVal = '';
|
14446
|
+
if (task.isMainProg()) {
|
14447
|
+
console.error("CallJS cannot be used in Main Program");
|
14448
|
+
return;
|
14449
|
+
}
|
14450
|
+
let form = task.getForm();
|
14451
|
+
let args = this.params2arguments(expVal, 0, expVal.length);
|
14452
|
+
if (!isNullOrUndefined(args)) {
|
14453
|
+
if (task.isFirstRecordCycle()) {
|
14454
|
+
Commands.invoke();
|
14455
|
+
yield Thread.Sleep(10);
|
14456
|
+
}
|
14457
|
+
resVal.StrVal = Commands.addCallJS(form, form.UniqueName, methodName, args);
|
14458
|
+
resVal.Attr = StorageAttribute.ALPHA;
|
14459
|
+
}
|
14460
|
+
});
|
14522
14461
|
}
|
14523
14462
|
eval_op_set_cookie(cookieName, expVal, resVal) {
|
14524
14463
|
resVal.Attr = StorageAttribute.BOOLEAN;
|
@@ -14824,6 +14763,12 @@ class DataViewBase extends GuiDataViewBase {
|
|
14824
14763
|
}
|
14825
14764
|
|
14826
14765
|
class Record {
|
14766
|
+
get InCompute() {
|
14767
|
+
return this._inCompute;
|
14768
|
+
}
|
14769
|
+
get InRecompute() {
|
14770
|
+
return this._inRecompute;
|
14771
|
+
}
|
14827
14772
|
constructor(dvOrTableCacheOrCIdOrRecord, dataview) {
|
14828
14773
|
this._id = Int32.MinValue;
|
14829
14774
|
this.dbViewRowIdx = 0;
|
@@ -14841,12 +14786,6 @@ class Record {
|
|
14841
14786
|
else
|
14842
14787
|
this.constructor_1(dvOrTableCacheOrCIdOrRecord, dataview);
|
14843
14788
|
}
|
14844
|
-
get InCompute() {
|
14845
|
-
return this._inCompute;
|
14846
|
-
}
|
14847
|
-
get InRecompute() {
|
14848
|
-
return this._inRecompute;
|
14849
|
-
}
|
14850
14789
|
constructor_0(dvOrTableCache) {
|
14851
14790
|
if (dvOrTableCache instanceof DataViewBase)
|
14852
14791
|
this._dataview = dvOrTableCache;
|
@@ -15642,14 +15581,14 @@ Record.FLAG_MODIFIED_ATLEAST_ONCE = (0x40);
|
|
15642
15581
|
Record.INCREASE = true;
|
15643
15582
|
Record.DECREASE = false;
|
15644
15583
|
class DcValuesReference extends ObjectReferenceBase {
|
15584
|
+
get DcValues() {
|
15585
|
+
return this.Referent;
|
15586
|
+
}
|
15645
15587
|
constructor(controlId, referencedDcValues) {
|
15646
15588
|
super(referencedDcValues);
|
15647
15589
|
this.ditIdx = 0;
|
15648
15590
|
this.ditIdx = controlId;
|
15649
15591
|
}
|
15650
|
-
get DcValues() {
|
15651
|
-
return this.Referent;
|
15652
|
-
}
|
15653
15592
|
Clone() {
|
15654
15593
|
return new DcValuesReference(this.ditIdx, this.Referent);
|
15655
15594
|
}
|
@@ -15925,21 +15864,6 @@ class RecordsTable {
|
|
15925
15864
|
RecordsTable.REC_NOT_FOUND = -1;
|
15926
15865
|
|
15927
15866
|
class DataviewHeaderBase {
|
15928
|
-
constructor(task) {
|
15929
|
-
this._cond = null;
|
15930
|
-
this._task = null;
|
15931
|
-
this.Loc = null;
|
15932
|
-
this._dir = '\0';
|
15933
|
-
this._id = 0;
|
15934
|
-
this._keyIdx = 0;
|
15935
|
-
this._retVal = null;
|
15936
|
-
this.returnfield = null;
|
15937
|
-
this.LinkStartAfterField = 0;
|
15938
|
-
this.KeyExpression = 0;
|
15939
|
-
this._task = task;
|
15940
|
-
this._keyIdx = -1;
|
15941
|
-
this._cond = new YesNoExp(true);
|
15942
|
-
}
|
15943
15867
|
get ReturnField() {
|
15944
15868
|
if (this.returnfield === null && this._retVal !== null)
|
15945
15869
|
this.returnfield = this.Task.getFieldByValueStr(this._retVal);
|
@@ -15960,6 +15884,21 @@ class DataviewHeaderBase {
|
|
15960
15884
|
get LinkEvaluateCondition() {
|
15961
15885
|
return this._linkEvalCondition;
|
15962
15886
|
}
|
15887
|
+
constructor(task) {
|
15888
|
+
this._cond = null;
|
15889
|
+
this._task = null;
|
15890
|
+
this.Loc = null;
|
15891
|
+
this._dir = '\0';
|
15892
|
+
this._id = 0;
|
15893
|
+
this._keyIdx = 0;
|
15894
|
+
this._retVal = null;
|
15895
|
+
this.returnfield = null;
|
15896
|
+
this.LinkStartAfterField = 0;
|
15897
|
+
this.KeyExpression = 0;
|
15898
|
+
this._task = task;
|
15899
|
+
this._keyIdx = -1;
|
15900
|
+
this._cond = new YesNoExp(true);
|
15901
|
+
}
|
15963
15902
|
SetAttributes(attributes) {
|
15964
15903
|
let keys = attributes.Keys;
|
15965
15904
|
keys.forEach((text) => {
|
@@ -17297,16 +17236,16 @@ class RecordOutOfDataViewException extends ApplicationException {
|
|
17297
17236
|
}
|
17298
17237
|
|
17299
17238
|
class XMLBasedDcValuesBuilder extends DcValuesBuilderBase {
|
17239
|
+
set SerializedDCVals(value) {
|
17240
|
+
this.parser.setXMLdata(value);
|
17241
|
+
this.parser.setCurrIndex(0);
|
17242
|
+
}
|
17300
17243
|
constructor() {
|
17301
17244
|
super();
|
17302
17245
|
this.dcv = null;
|
17303
17246
|
this.parser = null;
|
17304
17247
|
this.parser = new XmlParser();
|
17305
17248
|
}
|
17306
|
-
set SerializedDCVals(value) {
|
17307
|
-
this.parser.setXMLdata(value);
|
17308
|
-
this.parser.setCurrIndex(0);
|
17309
|
-
}
|
17310
17249
|
Build() {
|
17311
17250
|
this.dcv = null;
|
17312
17251
|
let endContext = this.parser.getXMLdata().indexOf(XMLConstants.TAG_TERM, this.parser.getCurrIndex());
|
@@ -17386,6 +17325,39 @@ const RECOVERY_ACT_NONE = 'N';
|
|
17386
17325
|
const TRANS_STAT_CLOSED = 'C';
|
17387
17326
|
const TRANS_STAT_OPENED = 'O';
|
17388
17327
|
class DataView extends DataViewBase {
|
17328
|
+
set InsertAt(value) {
|
17329
|
+
this._insertAt = value;
|
17330
|
+
}
|
17331
|
+
get InsertAt() {
|
17332
|
+
return this._insertAt;
|
17333
|
+
}
|
17334
|
+
get CurrRec() {
|
17335
|
+
return this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER;
|
17336
|
+
}
|
17337
|
+
set CurrRec(value) {
|
17338
|
+
if (this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER !== null && value === null) {
|
17339
|
+
this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER.resetDcValueId();
|
17340
|
+
}
|
17341
|
+
this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER = value;
|
17342
|
+
if (this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER !== null) {
|
17343
|
+
this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER.SetDcValueId();
|
17344
|
+
}
|
17345
|
+
}
|
17346
|
+
get FlushUpdates() {
|
17347
|
+
return this._flushUpdates;
|
17348
|
+
}
|
17349
|
+
get HasMainTable() {
|
17350
|
+
return this._hasMainTable;
|
17351
|
+
}
|
17352
|
+
get CurrentRecId() {
|
17353
|
+
return this._currRecId;
|
17354
|
+
}
|
17355
|
+
get FirstRecord() {
|
17356
|
+
return this._recordsTab.getRecByIdx(0);
|
17357
|
+
}
|
17358
|
+
get LastRecord() {
|
17359
|
+
return this._recordsTab.getRecByIdx(this._recordsTab.getSize() - 1);
|
17360
|
+
}
|
17389
17361
|
constructor(taskOrDataView) {
|
17390
17362
|
super();
|
17391
17363
|
this._cacheLruTimeStamp = 0;
|
@@ -17437,39 +17409,6 @@ class DataView extends DataViewBase {
|
|
17437
17409
|
Object.assign(this, taskOrDataView);
|
17438
17410
|
}
|
17439
17411
|
}
|
17440
|
-
set InsertAt(value) {
|
17441
|
-
this._insertAt = value;
|
17442
|
-
}
|
17443
|
-
get InsertAt() {
|
17444
|
-
return this._insertAt;
|
17445
|
-
}
|
17446
|
-
get CurrRec() {
|
17447
|
-
return this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER;
|
17448
|
-
}
|
17449
|
-
set CurrRec(value) {
|
17450
|
-
if (this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER !== null && value === null) {
|
17451
|
-
this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER.resetDcValueId();
|
17452
|
-
}
|
17453
|
-
this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER = value;
|
17454
|
-
if (this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER !== null) {
|
17455
|
-
this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER.SetDcValueId();
|
17456
|
-
}
|
17457
|
-
}
|
17458
|
-
get FlushUpdates() {
|
17459
|
-
return this._flushUpdates;
|
17460
|
-
}
|
17461
|
-
get HasMainTable() {
|
17462
|
-
return this._hasMainTable;
|
17463
|
-
}
|
17464
|
-
get CurrentRecId() {
|
17465
|
-
return this._currRecId;
|
17466
|
-
}
|
17467
|
-
get FirstRecord() {
|
17468
|
-
return this._recordsTab.getRecByIdx(0);
|
17469
|
-
}
|
17470
|
-
get LastRecord() {
|
17471
|
-
return this._recordsTab.getRecByIdx(this._recordsTab.getSize() - 1);
|
17472
|
-
}
|
17473
17412
|
Init() {
|
17474
17413
|
this.init();
|
17475
17414
|
}
|
@@ -19099,6 +19038,12 @@ class ReturnResultBase {
|
|
19099
19038
|
}
|
19100
19039
|
|
19101
19040
|
class ReturnResult extends ReturnResultBase {
|
19041
|
+
get Success() {
|
19042
|
+
return this.success;
|
19043
|
+
}
|
19044
|
+
get ErrorDescription() {
|
19045
|
+
return this.errorDescription;
|
19046
|
+
}
|
19102
19047
|
constructor(errorDescriptionCodeOrErrorDescriptionOrInnerResult, innerResult) {
|
19103
19048
|
super();
|
19104
19049
|
this.errorDescription = null;
|
@@ -19113,12 +19058,6 @@ class ReturnResult extends ReturnResultBase {
|
|
19113
19058
|
else
|
19114
19059
|
this.constructor_03(errorDescriptionCodeOrErrorDescriptionOrInnerResult);
|
19115
19060
|
}
|
19116
|
-
get Success() {
|
19117
|
-
return this.success;
|
19118
|
-
}
|
19119
|
-
get ErrorDescription() {
|
19120
|
-
return this.errorDescription;
|
19121
|
-
}
|
19122
19061
|
constructor_00(errorDescriptionCode) {
|
19123
19062
|
this.success = false;
|
19124
19063
|
this.ErrorId = errorDescriptionCode;
|
@@ -19222,13 +19161,13 @@ class Transaction {
|
|
19222
19161
|
}
|
19223
19162
|
|
19224
19163
|
class TaskTransactionManager {
|
19164
|
+
get isClosingTopmostTask() {
|
19165
|
+
return MGDataCollection.Instance.StartupMgData.getFirstTask().InEndTask;
|
19166
|
+
}
|
19225
19167
|
constructor(task) {
|
19226
19168
|
this.task = null;
|
19227
19169
|
this.task = task;
|
19228
19170
|
}
|
19229
|
-
get isClosingTopmostTask() {
|
19230
|
-
return MGDataCollection.Instance.StartupMgData.getFirstTask().InEndTask;
|
19231
|
-
}
|
19232
19171
|
AllowTransaction(transBegin, forLocal) {
|
19233
19172
|
let result;
|
19234
19173
|
if (forLocal)
|
@@ -19609,12 +19548,6 @@ class RemoteDataviewManager extends DataviewManagerBase {
|
|
19609
19548
|
}
|
19610
19549
|
|
19611
19550
|
class DataviewManager extends DataviewManagerBase {
|
19612
|
-
constructor(task) {
|
19613
|
-
super(task);
|
19614
|
-
this.RemoteDataviewManager = null;
|
19615
|
-
this.HasRemoteData = true;
|
19616
|
-
this.RemoteDataviewManager = new RemoteDataviewManager(task);
|
19617
|
-
}
|
19618
19551
|
get TaskService() {
|
19619
19552
|
return this.Task.TaskService;
|
19620
19553
|
}
|
@@ -19629,6 +19562,12 @@ class DataviewManager extends DataviewManagerBase {
|
|
19629
19562
|
get VirtualDataviewManager() {
|
19630
19563
|
return this.TaskService.GetDataviewManagerForVirtuals(this.Task);
|
19631
19564
|
}
|
19565
|
+
constructor(task) {
|
19566
|
+
super(task);
|
19567
|
+
this.RemoteDataviewManager = null;
|
19568
|
+
this.HasRemoteData = true;
|
19569
|
+
this.RemoteDataviewManager = new RemoteDataviewManager(task);
|
19570
|
+
}
|
19632
19571
|
Execute(command) {
|
19633
19572
|
return __awaiter(this, void 0, void 0, function* () {
|
19634
19573
|
return yield this.CurrentDataviewManager.Execute(command);
|
@@ -19636,6 +19575,13 @@ class DataviewManager extends DataviewManagerBase {
|
|
19636
19575
|
}
|
19637
19576
|
}
|
19638
19577
|
|
19578
|
+
class Sort {
|
19579
|
+
constructor() {
|
19580
|
+
this.fldIdx = 0;
|
19581
|
+
this.dir = false;
|
19582
|
+
}
|
19583
|
+
}
|
19584
|
+
|
19639
19585
|
class SortCollection {
|
19640
19586
|
constructor() {
|
19641
19587
|
this._sortTab = null;
|
@@ -19764,23 +19710,9 @@ class MgForm extends MgFormBase {
|
|
19764
19710
|
dv = this._task.DataView;
|
19765
19711
|
return (dv);
|
19766
19712
|
}
|
19767
|
-
moveInView(unit, direction
|
19768
|
-
return __awaiter(this, void 0, void 0, function* () {
|
19769
|
-
if (isNullOrUndefined(returnToCtrl))
|
19770
|
-
yield this.moveInView_0(unit, direction);
|
19771
|
-
else
|
19772
|
-
yield this.moveInView_1(unit, direction, returnToCtrl);
|
19773
|
-
});
|
19774
|
-
}
|
19775
|
-
moveInView_0(unit, direction) {
|
19776
|
-
return __awaiter(this, void 0, void 0, function* () {
|
19777
|
-
yield this.moveInView(unit, direction, true);
|
19778
|
-
});
|
19779
|
-
}
|
19780
|
-
moveInView_1(unit, direction, returnToCtrl) {
|
19713
|
+
moveInView(unit, direction) {
|
19781
19714
|
return __awaiter(this, void 0, void 0, function* () {
|
19782
19715
|
let oldRecId = Int32.MinValue;
|
19783
|
-
let lastParkedCtrl;
|
19784
19716
|
let currRec = this.GetDataview().getCurrRec();
|
19785
19717
|
let oldTaskMode = ' ';
|
19786
19718
|
let returnToVisibleLine = false;
|
@@ -19871,11 +19803,7 @@ class MgForm extends MgFormBase {
|
|
19871
19803
|
this.GetDataview().setTopRecIdxModified(true);
|
19872
19804
|
try {
|
19873
19805
|
this._suffixDone = false;
|
19874
|
-
|
19875
|
-
if (unit === Constants.MOVE_UNIT_PAGE && this.isLineMode())
|
19876
|
-
if (newDisplayLine > this.GetDataview().getSize() - 1)
|
19877
|
-
visibleLine -= newDisplayLine - (this.GetDataview().getSize() - 1);
|
19878
|
-
yield this.setCurrRowByDisplayLine(newDisplayLine, true, false);
|
19806
|
+
yield this.setCurrRowByDisplayLine(this.GetDataview().getCurrRecIdx() + size, true, false);
|
19879
19807
|
this.GetDataview().setTopRecIdxModified(false);
|
19880
19808
|
yield this.RefreshDisplay(Constants.TASK_REFRESH_FORM);
|
19881
19809
|
}
|
@@ -19915,6 +19843,7 @@ class MgForm extends MgFormBase {
|
|
19915
19843
|
try {
|
19916
19844
|
yield this.RefreshDisplay(Constants.TASK_REFRESH_FORM);
|
19917
19845
|
yield this.setCurrRowByDisplayLine(this.GetDataview().getTopRecIdx() + this.getLastValidRow(), false, true);
|
19846
|
+
visibleLine = this.getLastValidRow();
|
19918
19847
|
}
|
19919
19848
|
catch (Exception) {
|
19920
19849
|
}
|
@@ -20038,15 +19967,6 @@ class MgForm extends MgFormBase {
|
|
20038
19967
|
else
|
20039
19968
|
this.SetTableTopIndex();
|
20040
19969
|
yield AccessHelper.eventsManager.handleInternalEventWithTask(this._task, InternalInterface.MG_ACT_REC_PREFIX);
|
20041
|
-
if (returnToCtrl) {
|
20042
|
-
lastParkedCtrl = this._task.getLastParkedCtrl();
|
20043
|
-
if (lastParkedCtrl != null) {
|
20044
|
-
let cursorMoved = yield lastParkedCtrl.invoke();
|
20045
|
-
if (!cursorMoved) {
|
20046
|
-
yield AccessHelper.eventsManager.HandleNonParkableControls(this._task);
|
20047
|
-
}
|
20048
|
-
}
|
20049
|
-
}
|
20050
19970
|
}
|
20051
19971
|
catch (e) {
|
20052
19972
|
if (e instanceof RecordOutOfDataViewException) {
|
@@ -20635,8 +20555,13 @@ class MgForm extends MgFormBase {
|
|
20635
20555
|
finally {
|
20636
20556
|
this._inRefreshDisp = false;
|
20637
20557
|
}
|
20638
|
-
if (refreshType === Constants.TASK_REFRESH_CURR_REC && (!_super.isLineMode.call(this) || this._tableRefreshed))
|
20558
|
+
if (refreshType === Constants.TASK_REFRESH_CURR_REC && (!_super.isLineMode.call(this) || this._tableRefreshed)) {
|
20639
20559
|
this.FormRefreshed = true;
|
20560
|
+
if (this._task.isFirstRecordCycle() || AccessHelper.eventsManager.getIsInViewRefresh()) {
|
20561
|
+
Commands.addNoParameters(CommandType.SET_WC_IDLE, this);
|
20562
|
+
AccessHelper.eventsManager.setIsInViewRefresh(false);
|
20563
|
+
}
|
20564
|
+
}
|
20640
20565
|
return true;
|
20641
20566
|
});
|
20642
20567
|
}
|
@@ -22094,8 +22019,12 @@ class EventHandler {
|
|
22094
22019
|
continue;
|
22095
22020
|
else if (this._operationTab.getOperation(oper.getBlockEnd()).getServerId() < nextOperIdx)
|
22096
22021
|
continue;
|
22097
|
-
if (!taskEnd)
|
22098
|
-
|
22022
|
+
if (!taskEnd) {
|
22023
|
+
let mainLevel = this._task.getMainLevel().toLowerCase();
|
22024
|
+
if ((yield this._task.evalEndCond(ConstInterface.END_COND_EVAL_IMMIDIATE)) && Environment.Instance.getSpecialImmediateHandlerEnd() &&
|
22025
|
+
mainLevel != "RP".toLowerCase() && mainLevel != "TP".toLowerCase() && mainLevel != "RS".toLowerCase() && mainLevel != "TS".toLowerCase())
|
22026
|
+
break;
|
22027
|
+
}
|
22099
22028
|
if (this._taskMgdID !== mgdID)
|
22100
22029
|
isChangedCurrWndRef.value = true;
|
22101
22030
|
if (!this._task.isMainProg() && this._task.isOpenWin())
|
@@ -22906,13 +22835,6 @@ class UserEventsTable {
|
|
22906
22835
|
}
|
22907
22836
|
|
22908
22837
|
class FormsTable {
|
22909
|
-
constructor(task, parentForm) {
|
22910
|
-
this._task = null;
|
22911
|
-
this._parentForm = null;
|
22912
|
-
this._formsStringXml = null;
|
22913
|
-
this._task = task;
|
22914
|
-
this._parentForm = parentForm;
|
22915
|
-
}
|
22916
22838
|
get Count() {
|
22917
22839
|
return this._formsStringXml.length;
|
22918
22840
|
}
|
@@ -22921,6 +22843,13 @@ class FormsTable {
|
|
22921
22843
|
return this._formsStringXml.get_Item(formDisplayIndex - 1);
|
22922
22844
|
return null;
|
22923
22845
|
}
|
22846
|
+
constructor(task, parentForm) {
|
22847
|
+
this._task = null;
|
22848
|
+
this._parentForm = null;
|
22849
|
+
this._formsStringXml = null;
|
22850
|
+
this._task = task;
|
22851
|
+
this._parentForm = parentForm;
|
22852
|
+
}
|
22924
22853
|
fillData() {
|
22925
22854
|
return __awaiter(this, void 0, void 0, function* () {
|
22926
22855
|
this._formsStringXml = new List();
|
@@ -23116,6 +23045,47 @@ var Task_Direction;
|
|
23116
23045
|
Task_Direction[Task_Direction["FORE"] = 1] = "FORE";
|
23117
23046
|
})(Task_Direction || (Task_Direction = {}));
|
23118
23047
|
class Task extends TaskBase {
|
23048
|
+
get ParentTask() {
|
23049
|
+
return this._parentTask;
|
23050
|
+
}
|
23051
|
+
set TryingToCommit(value) {
|
23052
|
+
this._tryingToCommit = value;
|
23053
|
+
}
|
23054
|
+
get TryingToCommit() {
|
23055
|
+
return this._tryingToCommit;
|
23056
|
+
}
|
23057
|
+
get TaskService() {
|
23058
|
+
if (this._taskService == null)
|
23059
|
+
this._taskService = new RemoteTaskService();
|
23060
|
+
return this._taskService;
|
23061
|
+
}
|
23062
|
+
static get CommandsProcessor() {
|
23063
|
+
return CommandsProcessorManager.GetCommandsProcessor();
|
23064
|
+
}
|
23065
|
+
get LogicalStudioParentTask() {
|
23066
|
+
if (this.StudioParentTask === null && !super.isMainProg()) {
|
23067
|
+
return GuiDataCollection.MGDataTable.GetMainProgByCtlIdx(this.ContextID, this._ctlIdx);
|
23068
|
+
}
|
23069
|
+
return this.StudioParentTask;
|
23070
|
+
}
|
23071
|
+
get KnownToServer() {
|
23072
|
+
return this._knownToServer;
|
23073
|
+
}
|
23074
|
+
set Transaction(value) {
|
23075
|
+
this.DataviewManager.CurrentDataviewManager.Transaction = value;
|
23076
|
+
}
|
23077
|
+
get Transaction() {
|
23078
|
+
return this.DataviewManager.CurrentDataviewManager.Transaction;
|
23079
|
+
}
|
23080
|
+
get TaskDefinitionId() {
|
23081
|
+
if (this.taskDefinitionId === null) {
|
23082
|
+
this.taskDefinitionId = new TaskDefinitionId(this._ctlIdx, this.ProgramIsn, this.TaskIsn, this._isPrg);
|
23083
|
+
}
|
23084
|
+
return this.taskDefinitionId;
|
23085
|
+
}
|
23086
|
+
static get IsBlockingBatch() {
|
23087
|
+
return false;
|
23088
|
+
}
|
23119
23089
|
constructor(parent) {
|
23120
23090
|
super();
|
23121
23091
|
this._dvCache = null;
|
@@ -23184,47 +23154,6 @@ class Task extends TaskBase {
|
|
23184
23154
|
}
|
23185
23155
|
this.constructor_1(parent);
|
23186
23156
|
}
|
23187
|
-
get ParentTask() {
|
23188
|
-
return this._parentTask;
|
23189
|
-
}
|
23190
|
-
set TryingToCommit(value) {
|
23191
|
-
this._tryingToCommit = value;
|
23192
|
-
}
|
23193
|
-
get TryingToCommit() {
|
23194
|
-
return this._tryingToCommit;
|
23195
|
-
}
|
23196
|
-
get TaskService() {
|
23197
|
-
if (this._taskService == null)
|
23198
|
-
this._taskService = new RemoteTaskService();
|
23199
|
-
return this._taskService;
|
23200
|
-
}
|
23201
|
-
static get CommandsProcessor() {
|
23202
|
-
return CommandsProcessorManager.GetCommandsProcessor();
|
23203
|
-
}
|
23204
|
-
get LogicalStudioParentTask() {
|
23205
|
-
if (this.StudioParentTask === null && !super.isMainProg()) {
|
23206
|
-
return GuiDataCollection.MGDataTable.GetMainProgByCtlIdx(this.ContextID, this._ctlIdx);
|
23207
|
-
}
|
23208
|
-
return this.StudioParentTask;
|
23209
|
-
}
|
23210
|
-
get KnownToServer() {
|
23211
|
-
return this._knownToServer;
|
23212
|
-
}
|
23213
|
-
set Transaction(value) {
|
23214
|
-
this.DataviewManager.CurrentDataviewManager.Transaction = value;
|
23215
|
-
}
|
23216
|
-
get Transaction() {
|
23217
|
-
return this.DataviewManager.CurrentDataviewManager.Transaction;
|
23218
|
-
}
|
23219
|
-
get TaskDefinitionId() {
|
23220
|
-
if (this.taskDefinitionId === null) {
|
23221
|
-
this.taskDefinitionId = new TaskDefinitionId(this._ctlIdx, this.ProgramIsn, this.TaskIsn, this._isPrg);
|
23222
|
-
}
|
23223
|
-
return this.taskDefinitionId;
|
23224
|
-
}
|
23225
|
-
static get IsBlockingBatch() {
|
23226
|
-
return false;
|
23227
|
-
}
|
23228
23157
|
constructor_0() {
|
23229
23158
|
this.ActionManager = new ActionManager();
|
23230
23159
|
this.DataView = new DataView(this);
|
@@ -25103,6 +25032,7 @@ class Task extends TaskBase {
|
|
25103
25032
|
this.ActionManager.enable(InternalInterface.MG_ACT_SORT_RECORDS, enable);
|
25104
25033
|
enable = yield this.checkProp(PropInterface.PROP_TYPE_TASK_PROPERTIES_ALLOW_INDEX, true);
|
25105
25034
|
this.ActionManager.enable(InternalInterface.MG_ACT_VIEW_BY_KEY, enable);
|
25035
|
+
this.ActionManager.enable(InternalInterface.MG_ACT_DUMP_ENVIRONMENT, true);
|
25106
25036
|
});
|
25107
25037
|
}
|
25108
25038
|
setEnableZoomHandler() {
|
@@ -25722,6 +25652,9 @@ class CompMainPrgTable {
|
|
25722
25652
|
}
|
25723
25653
|
|
25724
25654
|
class MGData {
|
25655
|
+
get ForceModal() {
|
25656
|
+
return this.forceModal;
|
25657
|
+
}
|
25725
25658
|
constructor(toClient, toServer, id, parent, isModal, forceModal) {
|
25726
25659
|
this._expHandlers = null;
|
25727
25660
|
this._id = 0;
|
@@ -25742,9 +25675,6 @@ class MGData {
|
|
25742
25675
|
else
|
25743
25676
|
this.constructor_1(id, parent, isModal, forceModal);
|
25744
25677
|
}
|
25745
|
-
get ForceModal() {
|
25746
|
-
return this.forceModal;
|
25747
|
-
}
|
25748
25678
|
constructor_0(id, parent, isModal) {
|
25749
25679
|
this._timerHandlers = new HandlersTable();
|
25750
25680
|
this._expHandlers = new HandlersTable();
|
@@ -26357,6 +26287,7 @@ class EventsManager {
|
|
26357
26287
|
this.confirmationDialogTitle = 'Session is about to be terminated!';
|
26358
26288
|
this._lastFailedFocusedControl = null;
|
26359
26289
|
this.isSpinnerShown = false;
|
26290
|
+
this.isInViewRefresh = false;
|
26360
26291
|
this.SpinnerStopped = new Subject();
|
26361
26292
|
this._rtEvents = new Stack();
|
26362
26293
|
this._eventsQueue = new MgPriorityBlockingQueue();
|
@@ -26577,7 +26508,7 @@ class EventsManager {
|
|
26577
26508
|
if (raiseAt === RaiseAt.TaskInFocus)
|
26578
26509
|
mgControl.setRtEvtTask(LastFocusedManager.Instance.getLastFocusedTask());
|
26579
26510
|
}
|
26580
|
-
yield this.handleFocus(mgControl, line, produceClick);
|
26511
|
+
yield this.handleFocus(mgControl, line, produceClick, false);
|
26581
26512
|
currTask.setCancelWasRaised(cancelWasRaised);
|
26582
26513
|
if (this._stopExecution)
|
26583
26514
|
return;
|
@@ -27193,7 +27124,7 @@ class EventsManager {
|
|
27193
27124
|
this.setLastSavedRouteEvent(aRtEvt);
|
27194
27125
|
}
|
27195
27126
|
}
|
27196
|
-
handleFocus(ctrl, line, onClick) {
|
27127
|
+
handleFocus(ctrl, line, onClick, shouldHandleZoom) {
|
27197
27128
|
return __awaiter(this, void 0, void 0, function* () {
|
27198
27129
|
try {
|
27199
27130
|
if (ctrl.isStatic())
|
@@ -27212,6 +27143,10 @@ class EventsManager {
|
|
27212
27143
|
let prevCtrl = LastFocusedManager.getLastFocusedControl();
|
27213
27144
|
if (ctrl === prevCtrl && !ctrl.isRepeatable()) {
|
27214
27145
|
yield ctrl.getForm().bringRecordToPage();
|
27146
|
+
yield this.HandleZoomIfNeeded(ctrl, line, shouldHandleZoom);
|
27147
|
+
let rtEvnt = this.getLastRtEvent();
|
27148
|
+
if (rtEvnt != null && rtEvnt.ShouldHandleZoom)
|
27149
|
+
FocusManager.SetFocus(ctrl, -1);
|
27215
27150
|
return;
|
27216
27151
|
}
|
27217
27152
|
let prevTask = LastFocusedManager.Instance.getLastFocusedTask();
|
@@ -27251,8 +27186,10 @@ class EventsManager {
|
|
27251
27186
|
}
|
27252
27187
|
else
|
27253
27188
|
yield this.HandleNonParkableControls(ctrl.getForm().getTask());
|
27254
|
-
if (!this._stopExecution && MgControl.ReturnToCtrl === ctrl)
|
27189
|
+
if (!this._stopExecution && MgControl.ReturnToCtrl === ctrl) {
|
27255
27190
|
LastFocusedManager.setLastFocusedControl(ctrl.getForm().getTask(), ctrl);
|
27191
|
+
yield this.HandleZoomIfNeeded(ctrl, line, shouldHandleZoom);
|
27192
|
+
}
|
27256
27193
|
return;
|
27257
27194
|
}
|
27258
27195
|
finally {
|
@@ -27318,6 +27255,15 @@ class EventsManager {
|
|
27318
27255
|
}
|
27319
27256
|
});
|
27320
27257
|
}
|
27258
|
+
HandleZoomIfNeeded(ctrl, line, shouldHandleZoom) {
|
27259
|
+
return __awaiter(this, void 0, void 0, function* () {
|
27260
|
+
if (shouldHandleZoom) {
|
27261
|
+
var rtEvt = new RunTimeEvent(ctrl, line, true);
|
27262
|
+
rtEvt.setInternal(InternalInterface.MG_ACT_ZOOM);
|
27263
|
+
yield this.handleEvent(rtEvt, false);
|
27264
|
+
}
|
27265
|
+
});
|
27266
|
+
}
|
27321
27267
|
canGoToControl(ctrl, onClick) {
|
27322
27268
|
if (onClick && (ctrl.Type === MgControlType.CTRL_TYPE_SUBFORM || ctrl.Type === MgControlType.CTRL_TYPE_BROWSER))
|
27323
27269
|
return false;
|
@@ -27565,7 +27511,7 @@ class EventsManager {
|
|
27565
27511
|
case InternalInterface.MG_ACT_WEB_ON_DBLICK:
|
27566
27512
|
break;
|
27567
27513
|
case InternalInterface.MG_ACT_CTRL_FOCUS:
|
27568
|
-
yield this.handleFocus(ctrl, displayLine, evt.isProduceClick());
|
27514
|
+
yield this.handleFocus(ctrl, displayLine, evt.isProduceClick(), evt.ShouldHandleZoom);
|
27569
27515
|
return false;
|
27570
27516
|
case InternalInterface.MG_ACT_CTRL_FOCUS_ON_NON_MAGIC_CONTROL:
|
27571
27517
|
yield this.handleFocusOnNonMagicControl(ctrl);
|
@@ -28275,6 +28221,7 @@ class EventsManager {
|
|
28275
28221
|
}
|
28276
28222
|
break;
|
28277
28223
|
case InternalInterface.MG_ACT_SERVER_TERMINATION:
|
28224
|
+
case InternalInterface.MG_ACT_DUMP_ENVIRONMENT:
|
28278
28225
|
cmd = CommandFactory.CreateEventCommand(task.getTaskTag(), intEvtCode);
|
28279
28226
|
cmdsToServer.Add(cmd);
|
28280
28227
|
yield CommandsProcessorManager.GetCommandsProcessor().Execute(CommandsProcessorBase_SendingInstruction.TASKS_AND_COMMANDS);
|
@@ -28610,6 +28557,7 @@ class EventsManager {
|
|
28610
28557
|
else if (intEvtCode === InternalInterface.MG_ACT_RT_REFRESH_SCREEN && task.getMode() !== Constants.TASK_MODE_QUERY && !task.getAfterRetry()) {
|
28611
28558
|
yield dv.currRecCompute(true);
|
28612
28559
|
}
|
28560
|
+
this.setIsInViewRefresh(true);
|
28613
28561
|
yield this.handleInternalEventWithTask(task, InternalInterface.MG_ACT_REC_PREFIX);
|
28614
28562
|
if (!this.GetStopExecutionFlag() && !task.getPreventControlChange()) {
|
28615
28563
|
if (!(task === LastFocusedManager.Instance.getLastFocusedTask() || !task.pathContains(LastFocusedManager.Instance.getLastFocusedTask())))
|
@@ -29364,6 +29312,12 @@ class EventsManager {
|
|
29364
29312
|
return false;
|
29365
29313
|
return true;
|
29366
29314
|
}
|
29315
|
+
getIsInViewRefresh() {
|
29316
|
+
return this.isInViewRefresh;
|
29317
|
+
}
|
29318
|
+
setIsInViewRefresh(inViewRefresh) {
|
29319
|
+
this.isInViewRefresh = inViewRefresh;
|
29320
|
+
}
|
29367
29321
|
}
|
29368
29322
|
EventsManager.REAL_ONLY = true;
|
29369
29323
|
EventsManager.MAX_OPER = 9999;
|
@@ -29472,15 +29426,15 @@ class GuiEventsProcessor extends EventsProcessor {
|
|
29472
29426
|
}
|
29473
29427
|
static processSelection(val, guiMgCtrl, line, produceClick) {
|
29474
29428
|
let mgControl = guiMgCtrl;
|
29475
|
-
if (mgControl.Type === MgControlType.CTRL_TYPE_BUTTON && mgControl.getForm().getTask().getLastParkedCtrl() !== mgControl)
|
29476
|
-
produceClick = true;
|
29477
29429
|
if (guiMgCtrl.ConnectedControl) {
|
29478
29430
|
let rtEvt = new RunTimeEvent(mgControl, +line, true);
|
29479
|
-
rtEvt.setInternal(InternalInterface.
|
29480
|
-
rtEvt.
|
29431
|
+
rtEvt.setInternal(InternalInterface.MG_ACT_CTRL_FOCUS);
|
29432
|
+
rtEvt.ShouldHandleZoom = true;
|
29481
29433
|
EventsManager.Instance.addToTail(rtEvt);
|
29482
29434
|
}
|
29483
29435
|
else {
|
29436
|
+
if (mgControl.Type === MgControlType.CTRL_TYPE_BUTTON && mgControl.getForm().getTask().getLastParkedCtrl() !== mgControl)
|
29437
|
+
produceClick = true;
|
29484
29438
|
let rtEvt = new RunTimeEvent(mgControl, +line, true);
|
29485
29439
|
rtEvt.setInternal(InternalInterface.MG_ACT_SELECTION);
|
29486
29440
|
rtEvt.setValue(val);
|
@@ -29886,13 +29840,6 @@ class VerifyCommand extends ClientTargetedCommandBase {
|
|
29886
29840
|
}
|
29887
29841
|
|
29888
29842
|
class EnhancedVerifyCommand extends VerifyCommand {
|
29889
|
-
constructor() {
|
29890
|
-
super();
|
29891
|
-
this._buttonsID = '\0';
|
29892
|
-
this._image = '\0';
|
29893
|
-
this._returnValStr = null;
|
29894
|
-
this._returnVal = null;
|
29895
|
-
}
|
29896
29843
|
ProcessMessageBoxResponse(task, returnValue) {
|
29897
29844
|
return __awaiter(this, void 0, void 0, function* () {
|
29898
29845
|
if (task !== null)
|
@@ -29925,6 +29872,13 @@ class EnhancedVerifyCommand extends VerifyCommand {
|
|
29925
29872
|
break;
|
29926
29873
|
}
|
29927
29874
|
}
|
29875
|
+
constructor() {
|
29876
|
+
super();
|
29877
|
+
this._buttonsID = '\0';
|
29878
|
+
this._image = '\0';
|
29879
|
+
this._returnValStr = null;
|
29880
|
+
this._returnVal = null;
|
29881
|
+
}
|
29928
29882
|
}
|
29929
29883
|
|
29930
29884
|
class ResetRangeCommand extends ClientTargetedCommandBase {
|
@@ -30029,12 +29983,6 @@ class ResetLocateCommand extends ClientTargetedCommandBase {
|
|
30029
29983
|
}
|
30030
29984
|
|
30031
29985
|
class ResultCommand extends ClientTargetedCommandBase {
|
30032
|
-
constructor() {
|
30033
|
-
super();
|
30034
|
-
this._isNull = false;
|
30035
|
-
this._attr = StorageAttribute.NONE;
|
30036
|
-
this._val = null;
|
30037
|
-
}
|
30038
29986
|
Execute(res) {
|
30039
29987
|
return __awaiter(this, void 0, void 0, function* () {
|
30040
29988
|
if (this._isNull)
|
@@ -30062,6 +30010,12 @@ class ResultCommand extends ClientTargetedCommandBase {
|
|
30062
30010
|
break;
|
30063
30011
|
}
|
30064
30012
|
}
|
30013
|
+
constructor() {
|
30014
|
+
super();
|
30015
|
+
this._isNull = false;
|
30016
|
+
this._attr = StorageAttribute.NONE;
|
30017
|
+
this._val = null;
|
30018
|
+
}
|
30065
30019
|
}
|
30066
30020
|
|
30067
30021
|
class AddSortCommand extends ClientTargetedCommandBase {
|
@@ -30432,19 +30386,9 @@ class CommandsTable {
|
|
30432
30386
|
}
|
30433
30387
|
}
|
30434
30388
|
|
30435
|
-
let CurrentClientVersion = '4.1000.0-dev4100.
|
30389
|
+
let CurrentClientVersion = '4.1000.0-dev4100.436';
|
30436
30390
|
|
30437
30391
|
class ClientManager {
|
30438
|
-
constructor() {
|
30439
|
-
this._globalUniqueSessionId = null;
|
30440
|
-
this._buttonIsClicked = false;
|
30441
|
-
RuntimeContextBase.Instance.Init(RemoteCommandsProcessor.RC_NO_CONTEXT_ID);
|
30442
|
-
LastFocusedManager.Instance.Init(MGDataCollection.Instance);
|
30443
|
-
LastFocusedManager.Instance.LastActionTime = Misc.getSystemMilliseconds();
|
30444
|
-
RemoteCommandsProcessor.ShouldScrambleAndUnscrambleMessages = true;
|
30445
|
-
this._globalUniqueSessionId = UniqueIDUtils.GetUniqueMachineID() + "_";
|
30446
|
-
this.RegisterDelegates();
|
30447
|
-
}
|
30448
30392
|
static get Instance() {
|
30449
30393
|
if (ClientManager._instance === null)
|
30450
30394
|
ClientManager._instance = new ClientManager();
|
@@ -30470,7 +30414,7 @@ class ClientManager {
|
|
30470
30414
|
}
|
30471
30415
|
break;
|
30472
30416
|
case "mousedown":
|
30473
|
-
if (control.isButton()) {
|
30417
|
+
if (control.isButton() || (control.ConnectedControl && guiEvent.fromButton)) {
|
30474
30418
|
this._buttonIsClicked = true;
|
30475
30419
|
}
|
30476
30420
|
else if (!control.isSubform())
|
@@ -30489,7 +30433,7 @@ class ClientManager {
|
|
30489
30433
|
}
|
30490
30434
|
break;
|
30491
30435
|
case "focus":
|
30492
|
-
if (this._buttonIsClicked)
|
30436
|
+
if (this._buttonIsClicked || (control.ConnectedControl && guiEvent.fromButton))
|
30493
30437
|
return;
|
30494
30438
|
Events.OnFocus(control, lineIdx, true, false);
|
30495
30439
|
break;
|
@@ -30505,6 +30449,9 @@ class ClientManager {
|
|
30505
30449
|
case "setexternalvalue":
|
30506
30450
|
EventsManager.Instance.AddExternalValueEvent(control, guiEvent.externalValue, guiEvent.param);
|
30507
30451
|
break;
|
30452
|
+
case "setAsThreeState":
|
30453
|
+
control.setAsThreeState();
|
30454
|
+
break;
|
30508
30455
|
default:
|
30509
30456
|
break;
|
30510
30457
|
}
|
@@ -30646,6 +30593,16 @@ class ClientManager {
|
|
30646
30593
|
Logger.Instance.WriteToLog("-----------------------------------------------------------------------------", true);
|
30647
30594
|
}
|
30648
30595
|
}
|
30596
|
+
constructor() {
|
30597
|
+
this._globalUniqueSessionId = null;
|
30598
|
+
this._buttonIsClicked = false;
|
30599
|
+
RuntimeContextBase.Instance.Init(RemoteCommandsProcessor.RC_NO_CONTEXT_ID);
|
30600
|
+
LastFocusedManager.Instance.Init(MGDataCollection.Instance);
|
30601
|
+
LastFocusedManager.Instance.LastActionTime = Misc.getSystemMilliseconds();
|
30602
|
+
RemoteCommandsProcessor.ShouldScrambleAndUnscrambleMessages = true;
|
30603
|
+
this._globalUniqueSessionId = UniqueIDUtils.GetUniqueMachineID() + "_";
|
30604
|
+
this.RegisterDelegates();
|
30605
|
+
}
|
30649
30606
|
InitGuiManager() {
|
30650
30607
|
Manager.EventsManager = EventsManager.Instance;
|
30651
30608
|
Manager.DefaultServerName = ServerConfig.Instance.getServer();
|
@@ -30701,7 +30658,7 @@ class ClientManager {
|
|
30701
30658
|
yield MGDataCollection.Instance.addMGData(mgd, 0, true);
|
30702
30659
|
yield ClientManager.Instance.WorkThreadExecution();
|
30703
30660
|
if (Logger.Instance.ShouldLog()) {
|
30704
|
-
Logger.Instance.WriteToLog(OSEnvironment.EolSeq + "Ended on " + DateTimeUtils.ToString(DateTime.Now,
|
30661
|
+
Logger.Instance.WriteToLog(OSEnvironment.EolSeq + "Ended on " + DateTimeUtils.ToString(DateTime.Now, XMLConstants.ERROR_LOG_DATE_FORMAT, Logger.Instance) + OSEnvironment.EolSeq + OSEnvironment.EolSeq, false);
|
30705
30662
|
}
|
30706
30663
|
}
|
30707
30664
|
else {
|