@magic-xpa/engine 4.1000.0-dev4100.106 → 4.1000.0-dev4100.108
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 +107 -2
- package/fesm2015/magic-xpa-engine.mjs +110 -5
- package/fesm2015/magic-xpa-engine.mjs.map +1 -1
- package/fesm2020/magic-xpa-engine.mjs +110 -5
- package/fesm2020/magic-xpa-engine.mjs.map +1 -1
- package/package.json +4 -4
- package/src/util/FlowMonitorQueue.d.ts +8 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StringBuilder, Int32, NString, ApplicationException, NNumber, List, Debug, Char, RefParam, NumberStyles, HashUtils, DateTime, Dictionary, Stack, NChar, isNullOrUndefined, WebException, Thread, Encoding, Exception, isUndefined, Hashtable, NotImplementedException, Array_Enumerator, ISO_8859_1_Encoding, Int64 } from '@magic-xpa/mscorelib';
|
|
2
2
|
import { XMLConstants, StorageAttribute, ViewRefreshMode, InternalInterface, Logger, StorageAttributeCheck, StrUtil, SubformType, TableBehaviour, MgControlType, ScrollBarThumbType, ForceExit, XmlParser, Misc, Base64, Priority, SyncExecutionHelper, Queue, Constants, DateTimeUtils, Logger_LogLevels, Logger_MessageDirection, MsgInterface, RequestInfo, OSEnvironment, JSON_Utils, UtilDateJpn, UtilStrByteMode, PICInterface, WindowType, BrkScope, RaiseAt, CtrlButtonTypeGui } from '@magic-xpa/utils';
|
|
3
|
-
import { RecordUtils, GuiFieldBase, ExpVal, BlobType, FieldDef, GuiTaskBase, MgControlBase, PropInterface, GuiDataCollection, CommandType, Commands, HtmlProperties, ControlTable, Modifiers, KeyboardItem, TaskDefinitionIdTableSaxHandler, DisplayConvertor, MgTimer, GuiConstants, RuntimeContextBase, UsernamePasswordCredentials, Styles, Manager, NUM_TYPE,
|
|
3
|
+
import { RecordUtils, GuiFieldBase, ExpVal, BlobType, FieldDef, GuiTaskBase, MgControlBase, PropInterface, GuiDataCollection, CommandType, Commands, HtmlProperties, ControlTable, Modifiers, KeyboardItem, TaskDefinitionIdTableSaxHandler, DisplayConvertor, VectorType, PIC, MgTimer, GuiConstants, RuntimeContextBase, UsernamePasswordCredentials, Styles, Manager, NUM_TYPE, GuiExpressionEvaluator, ExpressionInterface, DataModificationTypes, GuiDataViewBase, ObjectReferencesCollection, EMPTY_DCREF, ObjectReferenceBase, PropTable, FieldsTable as FieldsTable$1, DcValuesBuilderBase, MgFormBase, GuiEnvironment, TaskDefinitionId, Events, Helps, FocusManager, EventsProcessor, UIBridge } from '@magic-xpa/gui';
|
|
4
4
|
import { HttpHeaders, HttpErrorResponse } from '@angular/common/http';
|
|
5
5
|
import { timer, Subject } from 'rxjs';
|
|
6
6
|
|
|
@@ -3531,7 +3531,17 @@ class FlowMonitorQueue {
|
|
|
3531
3531
|
this._isRecompute = false;
|
|
3532
3532
|
this._isTask = false;
|
|
3533
3533
|
this._isTaskFlow = false;
|
|
3534
|
+
this._isDataView = false;
|
|
3534
3535
|
this.ShouldSerialize = false;
|
|
3536
|
+
this.padRight = (string, length, character = ' ') => {
|
|
3537
|
+
let result = "";
|
|
3538
|
+
let totalLength = length - string.length;
|
|
3539
|
+
for (let i = 0; i < totalLength; i++) {
|
|
3540
|
+
result = character + result;
|
|
3541
|
+
}
|
|
3542
|
+
result = result + string;
|
|
3543
|
+
return result;
|
|
3544
|
+
};
|
|
3535
3545
|
}
|
|
3536
3546
|
static get Instance() {
|
|
3537
3547
|
if (FlowMonitorQueue._instance === null)
|
|
@@ -3589,6 +3599,9 @@ class FlowMonitorQueue {
|
|
|
3589
3599
|
case ConstInterface.MG_ATTR_TASKFLW:
|
|
3590
3600
|
this._isTaskFlow = XmlParser.getBoolean(valueStr);
|
|
3591
3601
|
break;
|
|
3602
|
+
case ConstInterface.MG_TAG_DATAVIEW:
|
|
3603
|
+
this._isDataView = XmlParser.getBoolean(valueStr);
|
|
3604
|
+
break;
|
|
3592
3605
|
case ConstInterface.MG_ATTR_RECOMP:
|
|
3593
3606
|
this._isRecompute = XmlParser.getBoolean(valueStr);
|
|
3594
3607
|
break;
|
|
@@ -3646,6 +3659,96 @@ class FlowMonitorQueue {
|
|
|
3646
3659
|
Logger.Instance.WriteSupportToLog(taskInfo + ": " + info, true);
|
|
3647
3660
|
}
|
|
3648
3661
|
}
|
|
3662
|
+
appendVirtualsAndParameters(currentValues) {
|
|
3663
|
+
let act = new ActivityItem(this, FlowMonitorQueue.ACT_TASK_FLW, InternalInterface.MG_ACT_REC_PREFIX);
|
|
3664
|
+
act.setInfo(currentValues);
|
|
3665
|
+
this._queue.put(act);
|
|
3666
|
+
}
|
|
3667
|
+
addDataViewFlow(task) {
|
|
3668
|
+
if (this._isDataView) {
|
|
3669
|
+
let fldTab = task.DataView.GetFieldsTab();
|
|
3670
|
+
let preparedDisplayString = "";
|
|
3671
|
+
let finaldisplayData = "\n";
|
|
3672
|
+
let fldValue;
|
|
3673
|
+
let data = "";
|
|
3674
|
+
for (let i = 0; i < fldTab.getSize(); i++) {
|
|
3675
|
+
let fldDef = fldTab.getField(i);
|
|
3676
|
+
if (!fldDef.IsEventHandlerField && (fldDef.IsVirtual && !fldDef.VirAsReal) || fldDef.isParam()) {
|
|
3677
|
+
fldValue = fldDef.isNull() ? fldDef.getNullValue() : fldDef.getValue(true);
|
|
3678
|
+
data = this.getFieldData(fldDef.getType(), fldValue, fldDef.getPicture(), fldDef.getCellsType(), task);
|
|
3679
|
+
preparedDisplayString = this.PrepareDisplayString(fldDef.isParam(), fldDef.getVarName(), data, true);
|
|
3680
|
+
finaldisplayData = finaldisplayData + preparedDisplayString + "\n";
|
|
3681
|
+
}
|
|
3682
|
+
}
|
|
3683
|
+
this.appendVirtualsAndParameters(finaldisplayData);
|
|
3684
|
+
}
|
|
3685
|
+
}
|
|
3686
|
+
getFieldData(Storagetype, data, picture, vecCellType, task) {
|
|
3687
|
+
switch (Storagetype) {
|
|
3688
|
+
case StorageAttribute.DOTNET:
|
|
3689
|
+
data = FlowMonitorQueue.UNPRINTABLE_STR_LOG;
|
|
3690
|
+
break;
|
|
3691
|
+
case StorageAttribute.BLOB:
|
|
3692
|
+
{
|
|
3693
|
+
if (BlobType.isValidBlob(data)) {
|
|
3694
|
+
let contentType = BlobType.getContentType(data);
|
|
3695
|
+
if (contentType == BlobType.CONTENT_TYPE_ANSI || contentType == BlobType.CONTENT_TYPE_UNICODE)
|
|
3696
|
+
data = data != null ? BlobType.getString(data) : "";
|
|
3697
|
+
else
|
|
3698
|
+
data = FlowMonitorQueue.UNPRINTABLE_STR_LOG;
|
|
3699
|
+
}
|
|
3700
|
+
else
|
|
3701
|
+
data = "";
|
|
3702
|
+
}
|
|
3703
|
+
break;
|
|
3704
|
+
case StorageAttribute.NUMERIC:
|
|
3705
|
+
case StorageAttribute.DATE:
|
|
3706
|
+
case StorageAttribute.TIME:
|
|
3707
|
+
let conv = DisplayConvertor.Instance;
|
|
3708
|
+
data = conv.mg2disp(data, " ", new PIC(picture, Storagetype, task.getCompIdx()), false, task.getCompIdx(), false);
|
|
3709
|
+
break;
|
|
3710
|
+
case StorageAttribute.BLOB_VECTOR:
|
|
3711
|
+
let vecOutData;
|
|
3712
|
+
if (data == null) {
|
|
3713
|
+
vecOutData = "[]";
|
|
3714
|
+
}
|
|
3715
|
+
else {
|
|
3716
|
+
let cellAtt = vecCellType;
|
|
3717
|
+
let vector = new VectorType(data);
|
|
3718
|
+
if (cellAtt == StorageAttribute.BLOB && !VectorType.validateBlobContents(data))
|
|
3719
|
+
vecOutData = "[]";
|
|
3720
|
+
else {
|
|
3721
|
+
let vecSize = VectorType.getVecSize(data);
|
|
3722
|
+
let cellPicture = (cellAtt == StorageAttribute.NUMERIC || cellAtt == StorageAttribute.DATE || cellAtt == StorageAttribute.TIME) ? PIC.buildPicture(cellAtt, vector.getVecCell(1), task.getCompIdx(), true).getFormat() : picture;
|
|
3723
|
+
vecOutData = "[";
|
|
3724
|
+
for (let i = 0; i < vecSize; i++) {
|
|
3725
|
+
vecOutData += this.getFieldData(cellAtt, vector.getVecCell(i + 1), cellPicture, vecCellType, task);
|
|
3726
|
+
vecOutData += i < vecSize - 1 ? "," : "]";
|
|
3727
|
+
}
|
|
3728
|
+
}
|
|
3729
|
+
}
|
|
3730
|
+
data = vecOutData;
|
|
3731
|
+
break;
|
|
3732
|
+
case StorageAttribute.BOOLEAN:
|
|
3733
|
+
data = data == "1" ? "TRUE" : "FALSE";
|
|
3734
|
+
break;
|
|
3735
|
+
}
|
|
3736
|
+
return data;
|
|
3737
|
+
}
|
|
3738
|
+
PrepareDisplayString(mode, name, valueContent, addDoubleQuotes) {
|
|
3739
|
+
let str = "";
|
|
3740
|
+
let finalStringToDisplay = "";
|
|
3741
|
+
if (addDoubleQuotes)
|
|
3742
|
+
finalStringToDisplay = finalStringToDisplay + "\"";
|
|
3743
|
+
finalStringToDisplay = finalStringToDisplay + name;
|
|
3744
|
+
if (addDoubleQuotes)
|
|
3745
|
+
finalStringToDisplay = finalStringToDisplay + "\"";
|
|
3746
|
+
let paddedName = this.padRight(name, 34);
|
|
3747
|
+
let formatOfStringVirtual = `Virtual`;
|
|
3748
|
+
let formatOfStringParameter = `Parameter`;
|
|
3749
|
+
str = (mode ? formatOfStringParameter : formatOfStringVirtual) + " : " + `${paddedName}` + " : " + `${valueContent}`;
|
|
3750
|
+
return str;
|
|
3751
|
+
}
|
|
3649
3752
|
addTaskFlowRec(id, state, taskInfo) {
|
|
3650
3753
|
if (this._enabled && this._isTaskFlow) {
|
|
3651
3754
|
let info;
|
|
@@ -3810,6 +3913,7 @@ class FlowMonitorQueue {
|
|
|
3810
3913
|
}
|
|
3811
3914
|
}
|
|
3812
3915
|
FlowMonitorQueue._instance = null;
|
|
3916
|
+
FlowMonitorQueue.UNPRINTABLE_STR_LOG = "#UNPRINTABLE#";
|
|
3813
3917
|
FlowMonitorQueue.S_EVENT_STR1 = ">>Starts ";
|
|
3814
3918
|
FlowMonitorQueue.S_EVENT_STR2 = " Event";
|
|
3815
3919
|
FlowMonitorQueue.S_EVENT_PROPAGATED = "Event was propagated";
|
|
@@ -7330,6 +7434,9 @@ class EventHandlerPosition {
|
|
|
7330
7434
|
case InternalInterface.MG_ACT_REC_SUFFIX:
|
|
7331
7435
|
case InternalInterface.MG_ACT_CTRL_PREFIX:
|
|
7332
7436
|
case InternalInterface.MG_ACT_CTRL_SUFFIX: {
|
|
7437
|
+
if (this._rtEvt.getInternalCode() == InternalInterface.MG_ACT_REC_PREFIX) {
|
|
7438
|
+
FlowMonitorQueue.Instance.addDataViewFlow(this._task);
|
|
7439
|
+
}
|
|
7333
7440
|
if (this._handlerIdx === -1) {
|
|
7334
7441
|
for (this._handlerIdx = this._handlersTab.getSize() - 1; this._handlerIdx >= 0; this._handlerIdx--) {
|
|
7335
7442
|
let handler = this._handlersTab.getHandler(this._handlerIdx);
|
|
@@ -21369,10 +21476,8 @@ class EventHandler {
|
|
|
21369
21476
|
else if (this._operationTab.getOperation(oper.getBlockEnd()).getServerId() < nextOperIdx)
|
|
21370
21477
|
continue;
|
|
21371
21478
|
if (!taskEnd) {
|
|
21372
|
-
if (await this._task.evalEndCond(ConstInterface.END_COND_EVAL_IMMIDIATE) && Environment.Instance.getSpecialImmediateHandlerEnd())
|
|
21373
|
-
AccessHelper.eventsManager.setStopExecution(true);
|
|
21479
|
+
if (await this._task.evalEndCond(ConstInterface.END_COND_EVAL_IMMIDIATE) && Environment.Instance.getSpecialImmediateHandlerEnd())
|
|
21374
21480
|
break;
|
|
21375
|
-
}
|
|
21376
21481
|
}
|
|
21377
21482
|
if (this._taskMgdID !== mgdID)
|
|
21378
21483
|
isChangedCurrWndRef.value = true;
|
|
@@ -29428,7 +29533,7 @@ class CommandsTable {
|
|
|
29428
29533
|
}
|
|
29429
29534
|
}
|
|
29430
29535
|
|
|
29431
|
-
let CurrentClientVersion = '4.1000.0-dev4100.
|
|
29536
|
+
let CurrentClientVersion = '4.1000.0-dev4100.108';
|
|
29432
29537
|
|
|
29433
29538
|
class ClientManager {
|
|
29434
29539
|
constructor() {
|