@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,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,92 @@ 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
|
+
let contentType = BlobType.getContentType(data);
|
|
3694
|
+
if (contentType == BlobType.CONTENT_TYPE_ANSI || contentType == BlobType.CONTENT_TYPE_UNICODE)
|
|
3695
|
+
data = data != null ? BlobType.getString(data) : "";
|
|
3696
|
+
else
|
|
3697
|
+
data = FlowMonitorQueue.UNPRINTABLE_STR_LOG;
|
|
3698
|
+
}
|
|
3699
|
+
break;
|
|
3700
|
+
case StorageAttribute.NUMERIC:
|
|
3701
|
+
case StorageAttribute.DATE:
|
|
3702
|
+
case StorageAttribute.TIME:
|
|
3703
|
+
let conv = DisplayConvertor.Instance;
|
|
3704
|
+
data = conv.mg2disp(data, " ", new PIC(picture, Storagetype, task.getCompIdx()), false, task.getCompIdx(), false);
|
|
3705
|
+
break;
|
|
3706
|
+
case StorageAttribute.BLOB_VECTOR:
|
|
3707
|
+
let vecOutData;
|
|
3708
|
+
if (data == null) {
|
|
3709
|
+
vecOutData = "[]";
|
|
3710
|
+
}
|
|
3711
|
+
else {
|
|
3712
|
+
let cellAtt = vecCellType;
|
|
3713
|
+
let vector = new VectorType(data);
|
|
3714
|
+
if (cellAtt == StorageAttribute.BLOB && !VectorType.validateBlobContents(data))
|
|
3715
|
+
vecOutData = "[]";
|
|
3716
|
+
else {
|
|
3717
|
+
let vecSize = VectorType.getVecSize(data);
|
|
3718
|
+
let cellPicture = (cellAtt == StorageAttribute.NUMERIC || cellAtt == StorageAttribute.DATE || cellAtt == StorageAttribute.TIME) ? PIC.buildPicture(cellAtt, vector.getVecCell(1), task.getCompIdx(), true).getFormat() : picture;
|
|
3719
|
+
vecOutData = "[";
|
|
3720
|
+
for (let i = 0; i < vecSize; i++) {
|
|
3721
|
+
vecOutData += this.getFieldData(cellAtt, vector.getVecCell(i + 1), cellPicture, vecCellType, task);
|
|
3722
|
+
vecOutData += i < vecSize - 1 ? "," : "]";
|
|
3723
|
+
}
|
|
3724
|
+
}
|
|
3725
|
+
}
|
|
3726
|
+
data = vecOutData;
|
|
3727
|
+
break;
|
|
3728
|
+
case StorageAttribute.BOOLEAN:
|
|
3729
|
+
data = data == "1" ? "TRUE" : "FALSE";
|
|
3730
|
+
break;
|
|
3731
|
+
}
|
|
3732
|
+
return data;
|
|
3733
|
+
}
|
|
3734
|
+
PrepareDisplayString(mode, name, valueContent, addDoubleQuotes) {
|
|
3735
|
+
let str = "";
|
|
3736
|
+
let finalStringToDisplay = "";
|
|
3737
|
+
if (addDoubleQuotes)
|
|
3738
|
+
finalStringToDisplay = finalStringToDisplay + "\"";
|
|
3739
|
+
finalStringToDisplay = finalStringToDisplay + name;
|
|
3740
|
+
if (addDoubleQuotes)
|
|
3741
|
+
finalStringToDisplay = finalStringToDisplay + "\"";
|
|
3742
|
+
let paddedName = this.padRight(name, 34);
|
|
3743
|
+
let formatOfStringVirtual = `Virtual`;
|
|
3744
|
+
let formatOfStringParameter = `Parameter`;
|
|
3745
|
+
str = (mode ? formatOfStringParameter : formatOfStringVirtual) + " : " + `${paddedName}` + " : " + `${valueContent}`;
|
|
3746
|
+
return str;
|
|
3747
|
+
}
|
|
3649
3748
|
addTaskFlowRec(id, state, taskInfo) {
|
|
3650
3749
|
if (this._enabled && this._isTaskFlow) {
|
|
3651
3750
|
let info;
|
|
@@ -3810,6 +3909,7 @@ class FlowMonitorQueue {
|
|
|
3810
3909
|
}
|
|
3811
3910
|
}
|
|
3812
3911
|
FlowMonitorQueue._instance = null;
|
|
3912
|
+
FlowMonitorQueue.UNPRINTABLE_STR_LOG = "#UNPRINTABLE#";
|
|
3813
3913
|
FlowMonitorQueue.S_EVENT_STR1 = ">>Starts ";
|
|
3814
3914
|
FlowMonitorQueue.S_EVENT_STR2 = " Event";
|
|
3815
3915
|
FlowMonitorQueue.S_EVENT_PROPAGATED = "Event was propagated";
|
|
@@ -7330,6 +7430,9 @@ class EventHandlerPosition {
|
|
|
7330
7430
|
case InternalInterface.MG_ACT_REC_SUFFIX:
|
|
7331
7431
|
case InternalInterface.MG_ACT_CTRL_PREFIX:
|
|
7332
7432
|
case InternalInterface.MG_ACT_CTRL_SUFFIX: {
|
|
7433
|
+
if (this._rtEvt.getInternalCode() == InternalInterface.MG_ACT_REC_PREFIX) {
|
|
7434
|
+
FlowMonitorQueue.Instance.addDataViewFlow(this._task);
|
|
7435
|
+
}
|
|
7333
7436
|
if (this._handlerIdx === -1) {
|
|
7334
7437
|
for (this._handlerIdx = this._handlersTab.getSize() - 1; this._handlerIdx >= 0; this._handlerIdx--) {
|
|
7335
7438
|
let handler = this._handlersTab.getHandler(this._handlerIdx);
|
|
@@ -21369,10 +21472,8 @@ class EventHandler {
|
|
|
21369
21472
|
else if (this._operationTab.getOperation(oper.getBlockEnd()).getServerId() < nextOperIdx)
|
|
21370
21473
|
continue;
|
|
21371
21474
|
if (!taskEnd) {
|
|
21372
|
-
if (await this._task.evalEndCond(ConstInterface.END_COND_EVAL_IMMIDIATE) && Environment.Instance.getSpecialImmediateHandlerEnd())
|
|
21373
|
-
AccessHelper.eventsManager.setStopExecution(true);
|
|
21475
|
+
if (await this._task.evalEndCond(ConstInterface.END_COND_EVAL_IMMIDIATE) && Environment.Instance.getSpecialImmediateHandlerEnd())
|
|
21374
21476
|
break;
|
|
21375
|
-
}
|
|
21376
21477
|
}
|
|
21377
21478
|
if (this._taskMgdID !== mgdID)
|
|
21378
21479
|
isChangedCurrWndRef.value = true;
|
|
@@ -29428,7 +29529,7 @@ class CommandsTable {
|
|
|
29428
29529
|
}
|
|
29429
29530
|
}
|
|
29430
29531
|
|
|
29431
|
-
let CurrentClientVersion = '4.1000.0-dev4100.
|
|
29532
|
+
let CurrentClientVersion = '4.1000.0-dev4100.107';
|
|
29432
29533
|
|
|
29433
29534
|
class ClientManager {
|
|
29434
29535
|
constructor() {
|