@magic-xpa/engine 4.1000.0-dev4100.105 → 4.1000.0-dev4100.107
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/src/ConstInterface.mjs +2 -1
- package/esm2020/src/CurrentClientVersion.mjs +2 -2
- package/esm2020/src/env/Environment.mjs +8 -1
- package/esm2020/src/event/EventHandler.mjs +6 -3
- package/esm2020/src/event/EventHandlerPosition.mjs +5 -1
- package/esm2020/src/util/FlowMonitorQueue.mjs +103 -2
- package/fesm2015/magic-xpa-engine.mjs +117 -4
- package/fesm2015/magic-xpa-engine.mjs.map +1 -1
- package/fesm2020/magic-xpa-engine.mjs +117 -4
- package/fesm2020/magic-xpa-engine.mjs.map +1 -1
- package/package.json +4 -4
- package/src/ConstInterface.d.ts +1 -0
- package/src/env/Environment.d.ts +2 -0
- package/src/util/FlowMonitorQueue.d.ts +8 -0
|
@@ -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";
|
|
@@ -3638,7 +3639,17 @@ class FlowMonitorQueue {
|
|
|
3638
3639
|
this._isRecompute = false;
|
|
3639
3640
|
this._isTask = false;
|
|
3640
3641
|
this._isTaskFlow = false;
|
|
3642
|
+
this._isDataView = false;
|
|
3641
3643
|
this.ShouldSerialize = false;
|
|
3644
|
+
this.padRight = (string, length, character = ' ') => {
|
|
3645
|
+
let result = "";
|
|
3646
|
+
let totalLength = length - string.length;
|
|
3647
|
+
for (let i = 0; i < totalLength; i++) {
|
|
3648
|
+
result = character + result;
|
|
3649
|
+
}
|
|
3650
|
+
result = result + string;
|
|
3651
|
+
return result;
|
|
3652
|
+
};
|
|
3642
3653
|
}
|
|
3643
3654
|
static get Instance() {
|
|
3644
3655
|
if (FlowMonitorQueue._instance === null)
|
|
@@ -3696,6 +3707,9 @@ class FlowMonitorQueue {
|
|
|
3696
3707
|
case ConstInterface.MG_ATTR_TASKFLW:
|
|
3697
3708
|
this._isTaskFlow = XmlParser.getBoolean(valueStr);
|
|
3698
3709
|
break;
|
|
3710
|
+
case ConstInterface.MG_TAG_DATAVIEW:
|
|
3711
|
+
this._isDataView = XmlParser.getBoolean(valueStr);
|
|
3712
|
+
break;
|
|
3699
3713
|
case ConstInterface.MG_ATTR_RECOMP:
|
|
3700
3714
|
this._isRecompute = XmlParser.getBoolean(valueStr);
|
|
3701
3715
|
break;
|
|
@@ -3753,6 +3767,92 @@ class FlowMonitorQueue {
|
|
|
3753
3767
|
Logger.Instance.WriteSupportToLog(taskInfo + ": " + info, true);
|
|
3754
3768
|
}
|
|
3755
3769
|
}
|
|
3770
|
+
appendVirtualsAndParameters(currentValues) {
|
|
3771
|
+
let act = new ActivityItem(this, FlowMonitorQueue.ACT_TASK_FLW, InternalInterface.MG_ACT_REC_PREFIX);
|
|
3772
|
+
act.setInfo(currentValues);
|
|
3773
|
+
this._queue.put(act);
|
|
3774
|
+
}
|
|
3775
|
+
addDataViewFlow(task) {
|
|
3776
|
+
if (this._isDataView) {
|
|
3777
|
+
let fldTab = task.DataView.GetFieldsTab();
|
|
3778
|
+
let preparedDisplayString = "";
|
|
3779
|
+
let finaldisplayData = "\n";
|
|
3780
|
+
let fldValue;
|
|
3781
|
+
let data = "";
|
|
3782
|
+
for (let i = 0; i < fldTab.getSize(); i++) {
|
|
3783
|
+
let fldDef = fldTab.getField(i);
|
|
3784
|
+
if (!fldDef.IsEventHandlerField && (fldDef.IsVirtual && !fldDef.VirAsReal) || fldDef.isParam()) {
|
|
3785
|
+
fldValue = fldDef.isNull() ? fldDef.getNullValue() : fldDef.getValue(true);
|
|
3786
|
+
data = this.getFieldData(fldDef.getType(), fldValue, fldDef.getPicture(), fldDef.getCellsType(), task);
|
|
3787
|
+
preparedDisplayString = this.PrepareDisplayString(fldDef.isParam(), fldDef.getVarName(), data, true);
|
|
3788
|
+
finaldisplayData = finaldisplayData + preparedDisplayString + "\n";
|
|
3789
|
+
}
|
|
3790
|
+
}
|
|
3791
|
+
this.appendVirtualsAndParameters(finaldisplayData);
|
|
3792
|
+
}
|
|
3793
|
+
}
|
|
3794
|
+
getFieldData(Storagetype, data, picture, vecCellType, task) {
|
|
3795
|
+
switch (Storagetype) {
|
|
3796
|
+
case StorageAttribute.DOTNET:
|
|
3797
|
+
data = FlowMonitorQueue.UNPRINTABLE_STR_LOG;
|
|
3798
|
+
break;
|
|
3799
|
+
case StorageAttribute.BLOB:
|
|
3800
|
+
{
|
|
3801
|
+
let contentType = BlobType.getContentType(data);
|
|
3802
|
+
if (contentType == BlobType.CONTENT_TYPE_ANSI || contentType == BlobType.CONTENT_TYPE_UNICODE)
|
|
3803
|
+
data = data != null ? BlobType.getString(data) : "";
|
|
3804
|
+
else
|
|
3805
|
+
data = FlowMonitorQueue.UNPRINTABLE_STR_LOG;
|
|
3806
|
+
}
|
|
3807
|
+
break;
|
|
3808
|
+
case StorageAttribute.NUMERIC:
|
|
3809
|
+
case StorageAttribute.DATE:
|
|
3810
|
+
case StorageAttribute.TIME:
|
|
3811
|
+
let conv = DisplayConvertor.Instance;
|
|
3812
|
+
data = conv.mg2disp(data, " ", new PIC(picture, Storagetype, task.getCompIdx()), false, task.getCompIdx(), false);
|
|
3813
|
+
break;
|
|
3814
|
+
case StorageAttribute.BLOB_VECTOR:
|
|
3815
|
+
let vecOutData;
|
|
3816
|
+
if (data == null) {
|
|
3817
|
+
vecOutData = "[]";
|
|
3818
|
+
}
|
|
3819
|
+
else {
|
|
3820
|
+
let cellAtt = vecCellType;
|
|
3821
|
+
let vector = new VectorType(data);
|
|
3822
|
+
if (cellAtt == StorageAttribute.BLOB && !VectorType.validateBlobContents(data))
|
|
3823
|
+
vecOutData = "[]";
|
|
3824
|
+
else {
|
|
3825
|
+
let vecSize = VectorType.getVecSize(data);
|
|
3826
|
+
let cellPicture = (cellAtt == StorageAttribute.NUMERIC || cellAtt == StorageAttribute.DATE || cellAtt == StorageAttribute.TIME) ? PIC.buildPicture(cellAtt, vector.getVecCell(1), task.getCompIdx(), true).getFormat() : picture;
|
|
3827
|
+
vecOutData = "[";
|
|
3828
|
+
for (let i = 0; i < vecSize; i++) {
|
|
3829
|
+
vecOutData += this.getFieldData(cellAtt, vector.getVecCell(i + 1), cellPicture, vecCellType, task);
|
|
3830
|
+
vecOutData += i < vecSize - 1 ? "," : "]";
|
|
3831
|
+
}
|
|
3832
|
+
}
|
|
3833
|
+
}
|
|
3834
|
+
data = vecOutData;
|
|
3835
|
+
break;
|
|
3836
|
+
case StorageAttribute.BOOLEAN:
|
|
3837
|
+
data = data == "1" ? "TRUE" : "FALSE";
|
|
3838
|
+
break;
|
|
3839
|
+
}
|
|
3840
|
+
return data;
|
|
3841
|
+
}
|
|
3842
|
+
PrepareDisplayString(mode, name, valueContent, addDoubleQuotes) {
|
|
3843
|
+
let str = "";
|
|
3844
|
+
let finalStringToDisplay = "";
|
|
3845
|
+
if (addDoubleQuotes)
|
|
3846
|
+
finalStringToDisplay = finalStringToDisplay + "\"";
|
|
3847
|
+
finalStringToDisplay = finalStringToDisplay + name;
|
|
3848
|
+
if (addDoubleQuotes)
|
|
3849
|
+
finalStringToDisplay = finalStringToDisplay + "\"";
|
|
3850
|
+
let paddedName = this.padRight(name, 34);
|
|
3851
|
+
let formatOfStringVirtual = `Virtual`;
|
|
3852
|
+
let formatOfStringParameter = `Parameter`;
|
|
3853
|
+
str = (mode ? formatOfStringParameter : formatOfStringVirtual) + " : " + `${paddedName}` + " : " + `${valueContent}`;
|
|
3854
|
+
return str;
|
|
3855
|
+
}
|
|
3756
3856
|
addTaskFlowRec(id, state, taskInfo) {
|
|
3757
3857
|
if (this._enabled && this._isTaskFlow) {
|
|
3758
3858
|
let info;
|
|
@@ -3919,6 +4019,7 @@ class FlowMonitorQueue {
|
|
|
3919
4019
|
}
|
|
3920
4020
|
}
|
|
3921
4021
|
FlowMonitorQueue._instance = null;
|
|
4022
|
+
FlowMonitorQueue.UNPRINTABLE_STR_LOG = "#UNPRINTABLE#";
|
|
3922
4023
|
FlowMonitorQueue.S_EVENT_STR1 = ">>Starts ";
|
|
3923
4024
|
FlowMonitorQueue.S_EVENT_STR2 = " Event";
|
|
3924
4025
|
FlowMonitorQueue.S_EVENT_PROPAGATED = "Event was propagated";
|
|
@@ -7525,6 +7626,9 @@ class EventHandlerPosition {
|
|
|
7525
7626
|
case InternalInterface.MG_ACT_REC_SUFFIX:
|
|
7526
7627
|
case InternalInterface.MG_ACT_CTRL_PREFIX:
|
|
7527
7628
|
case InternalInterface.MG_ACT_CTRL_SUFFIX: {
|
|
7629
|
+
if (this._rtEvt.getInternalCode() == InternalInterface.MG_ACT_REC_PREFIX) {
|
|
7630
|
+
FlowMonitorQueue.Instance.addDataViewFlow(this._task);
|
|
7631
|
+
}
|
|
7528
7632
|
if (this._handlerIdx === -1) {
|
|
7529
7633
|
for (this._handlerIdx = this._handlersTab.getSize() - 1; this._handlerIdx >= 0; this._handlerIdx--) {
|
|
7530
7634
|
let handler = this._handlersTab.getHandler(this._handlerIdx);
|
|
@@ -8526,6 +8630,7 @@ class Environment {
|
|
|
8526
8630
|
this._debugMode = 0;
|
|
8527
8631
|
this._significantNumSize = 0;
|
|
8528
8632
|
this._specialAnsiExpression = false;
|
|
8633
|
+
this._specialImmediatehandlerEnd = false;
|
|
8529
8634
|
this._specialShowStatusBarPanes = false;
|
|
8530
8635
|
this._specialRouteToRootProgOnContextRecreation = false;
|
|
8531
8636
|
this._specialCancelOnCreate = false;
|
|
@@ -8679,6 +8784,9 @@ class Environment {
|
|
|
8679
8784
|
case ConstInterface.MG_ATTR_LOCAL_FLAGS:
|
|
8680
8785
|
this._localFlags = valueStr;
|
|
8681
8786
|
break;
|
|
8787
|
+
case ConstInterface.MG_ATTR_SPECIAL_IMMEDIATE_HANDLER_END:
|
|
8788
|
+
this._specialImmediatehandlerEnd = XmlParser.getBoolean(valueStr);
|
|
8789
|
+
break;
|
|
8682
8790
|
case ConstInterface.MG_ATTR_SPEACIAL_ANSI_EXP:
|
|
8683
8791
|
this._specialAnsiExpression = XmlParser.getBoolean(valueStr);
|
|
8684
8792
|
break;
|
|
@@ -8885,6 +8993,9 @@ class Environment {
|
|
|
8885
8993
|
GetLocalFlag(f) {
|
|
8886
8994
|
return this._localFlags !== null && this._localFlags.indexOf(f) >= 0;
|
|
8887
8995
|
}
|
|
8996
|
+
getSpecialImmediateHandlerEnd() {
|
|
8997
|
+
return this._specialImmediatehandlerEnd;
|
|
8998
|
+
}
|
|
8888
8999
|
getSpecialAnsiExpression() {
|
|
8889
9000
|
return this._specialAnsiExpression;
|
|
8890
9001
|
}
|
|
@@ -21901,8 +22012,10 @@ class EventHandler {
|
|
|
21901
22012
|
continue;
|
|
21902
22013
|
else if (this._operationTab.getOperation(oper.getBlockEnd()).getServerId() < nextOperIdx)
|
|
21903
22014
|
continue;
|
|
21904
|
-
if (!taskEnd)
|
|
21905
|
-
yield this._task.evalEndCond(ConstInterface.END_COND_EVAL_IMMIDIATE)
|
|
22015
|
+
if (!taskEnd) {
|
|
22016
|
+
if ((yield this._task.evalEndCond(ConstInterface.END_COND_EVAL_IMMIDIATE)) && Environment.Instance.getSpecialImmediateHandlerEnd())
|
|
22017
|
+
break;
|
|
22018
|
+
}
|
|
21906
22019
|
if (this._taskMgdID !== mgdID)
|
|
21907
22020
|
isChangedCurrWndRef.value = true;
|
|
21908
22021
|
if (!this._task.isMainProg() && this._task.isOpenWin())
|
|
@@ -30239,7 +30352,7 @@ class CommandsTable {
|
|
|
30239
30352
|
}
|
|
30240
30353
|
}
|
|
30241
30354
|
|
|
30242
|
-
let CurrentClientVersion = '4.1000.0-dev4100.
|
|
30355
|
+
let CurrentClientVersion = '4.1000.0-dev4100.107';
|
|
30243
30356
|
|
|
30244
30357
|
class ClientManager {
|
|
30245
30358
|
constructor() {
|