@magic-xpa/engine 4.1000.0-dev4100.106 → 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/CurrentClientVersion.mjs +2 -2
- package/esm2020/src/event/EventHandler.mjs +2 -4
- package/esm2020/src/event/EventHandlerPosition.mjs +5 -1
- package/esm2020/src/util/FlowMonitorQueue.mjs +103 -2
- package/fesm2015/magic-xpa-engine.mjs +106 -5
- package/fesm2015/magic-xpa-engine.mjs.map +1 -1
- package/fesm2020/magic-xpa-engine.mjs +106 -5
- package/fesm2020/magic-xpa-engine.mjs.map +1 -1
- package/package.json +4 -4
- 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
|
|
|
@@ -3639,7 +3639,17 @@ class FlowMonitorQueue {
|
|
|
3639
3639
|
this._isRecompute = false;
|
|
3640
3640
|
this._isTask = false;
|
|
3641
3641
|
this._isTaskFlow = false;
|
|
3642
|
+
this._isDataView = false;
|
|
3642
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
|
+
};
|
|
3643
3653
|
}
|
|
3644
3654
|
static get Instance() {
|
|
3645
3655
|
if (FlowMonitorQueue._instance === null)
|
|
@@ -3697,6 +3707,9 @@ class FlowMonitorQueue {
|
|
|
3697
3707
|
case ConstInterface.MG_ATTR_TASKFLW:
|
|
3698
3708
|
this._isTaskFlow = XmlParser.getBoolean(valueStr);
|
|
3699
3709
|
break;
|
|
3710
|
+
case ConstInterface.MG_TAG_DATAVIEW:
|
|
3711
|
+
this._isDataView = XmlParser.getBoolean(valueStr);
|
|
3712
|
+
break;
|
|
3700
3713
|
case ConstInterface.MG_ATTR_RECOMP:
|
|
3701
3714
|
this._isRecompute = XmlParser.getBoolean(valueStr);
|
|
3702
3715
|
break;
|
|
@@ -3754,6 +3767,92 @@ class FlowMonitorQueue {
|
|
|
3754
3767
|
Logger.Instance.WriteSupportToLog(taskInfo + ": " + info, true);
|
|
3755
3768
|
}
|
|
3756
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
|
+
}
|
|
3757
3856
|
addTaskFlowRec(id, state, taskInfo) {
|
|
3758
3857
|
if (this._enabled && this._isTaskFlow) {
|
|
3759
3858
|
let info;
|
|
@@ -3920,6 +4019,7 @@ class FlowMonitorQueue {
|
|
|
3920
4019
|
}
|
|
3921
4020
|
}
|
|
3922
4021
|
FlowMonitorQueue._instance = null;
|
|
4022
|
+
FlowMonitorQueue.UNPRINTABLE_STR_LOG = "#UNPRINTABLE#";
|
|
3923
4023
|
FlowMonitorQueue.S_EVENT_STR1 = ">>Starts ";
|
|
3924
4024
|
FlowMonitorQueue.S_EVENT_STR2 = " Event";
|
|
3925
4025
|
FlowMonitorQueue.S_EVENT_PROPAGATED = "Event was propagated";
|
|
@@ -7526,6 +7626,9 @@ class EventHandlerPosition {
|
|
|
7526
7626
|
case InternalInterface.MG_ACT_REC_SUFFIX:
|
|
7527
7627
|
case InternalInterface.MG_ACT_CTRL_PREFIX:
|
|
7528
7628
|
case InternalInterface.MG_ACT_CTRL_SUFFIX: {
|
|
7629
|
+
if (this._rtEvt.getInternalCode() == InternalInterface.MG_ACT_REC_PREFIX) {
|
|
7630
|
+
FlowMonitorQueue.Instance.addDataViewFlow(this._task);
|
|
7631
|
+
}
|
|
7529
7632
|
if (this._handlerIdx === -1) {
|
|
7530
7633
|
for (this._handlerIdx = this._handlersTab.getSize() - 1; this._handlerIdx >= 0; this._handlerIdx--) {
|
|
7531
7634
|
let handler = this._handlersTab.getHandler(this._handlerIdx);
|
|
@@ -21910,10 +22013,8 @@ class EventHandler {
|
|
|
21910
22013
|
else if (this._operationTab.getOperation(oper.getBlockEnd()).getServerId() < nextOperIdx)
|
|
21911
22014
|
continue;
|
|
21912
22015
|
if (!taskEnd) {
|
|
21913
|
-
if ((yield this._task.evalEndCond(ConstInterface.END_COND_EVAL_IMMIDIATE)) && Environment.Instance.getSpecialImmediateHandlerEnd())
|
|
21914
|
-
AccessHelper.eventsManager.setStopExecution(true);
|
|
22016
|
+
if ((yield this._task.evalEndCond(ConstInterface.END_COND_EVAL_IMMIDIATE)) && Environment.Instance.getSpecialImmediateHandlerEnd())
|
|
21915
22017
|
break;
|
|
21916
|
-
}
|
|
21917
22018
|
}
|
|
21918
22019
|
if (this._taskMgdID !== mgdID)
|
|
21919
22020
|
isChangedCurrWndRef.value = true;
|
|
@@ -30251,7 +30352,7 @@ class CommandsTable {
|
|
|
30251
30352
|
}
|
|
30252
30353
|
}
|
|
30253
30354
|
|
|
30254
|
-
let CurrentClientVersion = '4.1000.0-dev4100.
|
|
30355
|
+
let CurrentClientVersion = '4.1000.0-dev4100.107';
|
|
30255
30356
|
|
|
30256
30357
|
class ClientManager {
|
|
30257
30358
|
constructor() {
|