@magic-xpa/engine 4.1000.0-dev4100.1 → 4.1000.0-dev4100.100
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 -2
- package/esm2020/src/CurrentClientVersion.mjs +2 -2
- package/esm2020/src/commands/ClientToServer/CommandFactory.mjs +10 -2
- package/esm2020/src/env/MirrorString.mjs +2 -3
- package/esm2020/src/exp/ExpressionDict.mjs +8 -8
- package/esm2020/src/exp/ExpressionEvaluator.mjs +24 -176
- package/esm2020/src/gui/MgForm.mjs +2 -1
- package/esm2020/src/remote/RemoteCommandsProcessor.mjs +14 -5
- package/esm2020/src/util/PrmMap.mjs +2 -2
- package/fesm2015/magic-xpa-engine.mjs +115 -271
- package/fesm2015/magic-xpa-engine.mjs.map +1 -1
- package/fesm2020/magic-xpa-engine.mjs +110 -244
- package/fesm2020/magic-xpa-engine.mjs.map +1 -1
- package/package.json +4 -4
- package/src/ConstInterface.d.ts +1 -1
- package/src/commands/ClientToServer/CommandFactory.d.ts +3 -0
- package/src/exp/ExpressionEvaluator.d.ts +1 -9
- package/src/util/PrmMap.d.ts +1 -1
|
@@ -38,7 +38,6 @@ var ClientTargetedCommandType;
|
|
|
38
38
|
})(ClientTargetedCommandType || (ClientTargetedCommandType = {}));
|
|
39
39
|
|
|
40
40
|
class ConstInterface {
|
|
41
|
-
;
|
|
42
41
|
}
|
|
43
42
|
ConstInterface.MG_TAG_CONTEXT = "context";
|
|
44
43
|
ConstInterface.MG_TAG_ENV = "env";
|
|
@@ -476,6 +475,7 @@ ConstInterface.RC_TOKEN_DATA = "DATA=";
|
|
|
476
475
|
ConstInterface.WEBCLIENT_REINITIALIZE_REQUEST = "WCREINITIALIZEREQUEST=Y";
|
|
477
476
|
ConstInterface.MAIN_PROG_VIEW = "MainProgramsDataView";
|
|
478
477
|
ConstInterface.GLOBAL_PARAM_LIST = "GlobalParamList";
|
|
478
|
+
ConstInterface.ENV_VAR_LIST = "EnvVarList";
|
|
479
479
|
ConstInterface.LAST_EXCEPTION = "LastException";
|
|
480
480
|
ConstInterface.CTX_REMOVED_FROM_SRVR = "CtxRemovedFromSrvr";
|
|
481
481
|
ConstInterface.LAST_ROUTE_EVENT = "LastRouteEvent";
|
|
@@ -5124,10 +5124,12 @@ class RemoteCommandsProcessor extends CommandsProcessorBase {
|
|
|
5124
5124
|
async StoreSessionReInitializingDataOnLocalStorage() {
|
|
5125
5125
|
let mainPrgViewStringForServer = await this.BuildXMLForMainProgramDataView();
|
|
5126
5126
|
let globalParamsString = AccessHelper.globalParams.mirrorAllToXML();
|
|
5127
|
+
let changedEnvVarList = AccessHelper.envParamsTable.mirrorAllToXML();
|
|
5127
5128
|
let dataStorage = window.localStorage;
|
|
5128
5129
|
dataStorage.setItem(ConstInterface.IS_SESSION_REINITIALIZING, "true");
|
|
5129
5130
|
dataStorage.setItem(ConstInterface.MAIN_PROG_VIEW, mainPrgViewStringForServer.toString());
|
|
5130
5131
|
dataStorage.setItem(ConstInterface.GLOBAL_PARAM_LIST, globalParamsString);
|
|
5132
|
+
dataStorage.setItem(ConstInterface.ENV_VAR_LIST, changedEnvVarList);
|
|
5131
5133
|
dataStorage.setItem(ConstInterface.LAST_EXCEPTION, RemoteCommandsProcessor.lastExceptionMessage);
|
|
5132
5134
|
if (RuntimeContextBase.Instance.RemovedContextFromServer)
|
|
5133
5135
|
dataStorage.setItem(ConstInterface.CTX_REMOVED_FROM_SRVR, "1");
|
|
@@ -5354,6 +5356,7 @@ class RemoteCommandsProcessor extends CommandsProcessorBase {
|
|
|
5354
5356
|
let reqBuf;
|
|
5355
5357
|
let isInitialCall = sessionStage === CommandsProcessorBase_SessionStage.INITIAL;
|
|
5356
5358
|
let globalParamsString = null;
|
|
5359
|
+
let envVarsString = null;
|
|
5357
5360
|
if (this.DelayCommandExecution)
|
|
5358
5361
|
return;
|
|
5359
5362
|
if (Logger.Instance.LogLevel == Logger_LogLevels.RequestInfo && !isInitialCall)
|
|
@@ -5379,12 +5382,16 @@ class RemoteCommandsProcessor extends CommandsProcessorBase {
|
|
|
5379
5382
|
let buffer = new StringBuilder();
|
|
5380
5383
|
if (!RemoteCommandsProcessor.IsSessionReInitializing)
|
|
5381
5384
|
buffer.Append(reqBuf);
|
|
5382
|
-
if (RemoteCommandsProcessor.IsSessionReInitializing)
|
|
5385
|
+
if (RemoteCommandsProcessor.IsSessionReInitializing) {
|
|
5383
5386
|
globalParamsString = this.RestoreSessionReInitializingDataFromLocalStorage(ConstInterface.GLOBAL_PARAM_LIST);
|
|
5384
|
-
|
|
5387
|
+
envVarsString = this.RestoreSessionReInitializingDataFromLocalStorage(ConstInterface.ENV_VAR_LIST);
|
|
5388
|
+
}
|
|
5389
|
+
else {
|
|
5385
5390
|
globalParamsString = AccessHelper.globalParams.mirrorToXML();
|
|
5391
|
+
envVarsString = AccessHelper.envParamsTable.mirrorToXML();
|
|
5392
|
+
}
|
|
5386
5393
|
changes.Append(globalParamsString);
|
|
5387
|
-
changes.Append(
|
|
5394
|
+
changes.Append(envVarsString);
|
|
5388
5395
|
if (changes.Length > 0) {
|
|
5389
5396
|
changes.Insert(0, "<" + ConstInterface.MG_TAG_ENV_CHANGES + ">");
|
|
5390
5397
|
changes.Append("</" + ConstInterface.MG_TAG_ENV_CHANGES + ">");
|
|
@@ -5423,13 +5430,15 @@ class RemoteCommandsProcessor extends CommandsProcessorBase {
|
|
|
5423
5430
|
dataStorage.removeItem(ConstInterface.IS_SESSION_REINITIALIZING);
|
|
5424
5431
|
dataStorage.removeItem(ConstInterface.MAIN_PROG_VIEW);
|
|
5425
5432
|
dataStorage.removeItem(ConstInterface.GLOBAL_PARAM_LIST);
|
|
5433
|
+
dataStorage.removeItem(ConstInterface.ENV_VAR_LIST);
|
|
5426
5434
|
dataStorage.removeItem(ConstInterface.LAST_EXCEPTION);
|
|
5427
5435
|
}
|
|
5428
5436
|
}
|
|
5429
5437
|
FlowMonitorQueue.Instance.enable(false);
|
|
5430
5438
|
await this.ProcessResponse(respBuf, AccessHelper.mgDataTable.currMgdID, null, res);
|
|
5431
5439
|
if (RemoteCommandsProcessor.IsSessionReInitializing) {
|
|
5432
|
-
AccessHelper.globalParams.
|
|
5440
|
+
AccessHelper.globalParams.RestoreParams(globalParamsString);
|
|
5441
|
+
AccessHelper.envParamsTable.RestoreParams(envVarsString);
|
|
5433
5442
|
let dataStorage = window.localStorage;
|
|
5434
5443
|
let ctxRemoved = dataStorage.getItem(ConstInterface.CTX_REMOVED_FROM_SRVR);
|
|
5435
5444
|
if (ctxRemoved === "1") {
|
|
@@ -6723,7 +6732,7 @@ ExpressionDict.expDesc = [
|
|
|
6723
6732
|
null,
|
|
6724
6733
|
new ExpDesc('N', 0, 0, 0, "", false),
|
|
6725
6734
|
null,
|
|
6726
|
-
|
|
6735
|
+
null,
|
|
6727
6736
|
new ExpDesc('B', 0, 2, 2, "V ", false),
|
|
6728
6737
|
null,
|
|
6729
6738
|
null,
|
|
@@ -7172,12 +7181,12 @@ ExpressionDict.expDesc = [
|
|
|
7172
7181
|
null,
|
|
7173
7182
|
new ExpDesc('A', 0, 1, 1, "A", false),
|
|
7174
7183
|
new ExpDesc('N', 0, 2, 2, "AA", false),
|
|
7175
|
-
|
|
7176
|
-
|
|
7177
|
-
|
|
7178
|
-
|
|
7179
|
-
|
|
7180
|
-
|
|
7184
|
+
null,
|
|
7185
|
+
null,
|
|
7186
|
+
null,
|
|
7187
|
+
null,
|
|
7188
|
+
null,
|
|
7189
|
+
null,
|
|
7181
7190
|
new ExpDesc('N', 0, 1, 1, "N", false),
|
|
7182
7191
|
null,
|
|
7183
7192
|
null,
|
|
@@ -7264,48 +7273,6 @@ ExpressionDict.expDesc = [
|
|
|
7264
7273
|
new ExpDesc('U', 0, 0, 0, '', false),
|
|
7265
7274
|
];
|
|
7266
7275
|
|
|
7267
|
-
var DataViewCommandType;
|
|
7268
|
-
(function (DataViewCommandType) {
|
|
7269
|
-
DataViewCommandType[DataViewCommandType["Init"] = 0] = "Init";
|
|
7270
|
-
DataViewCommandType[DataViewCommandType["Clear"] = 1] = "Clear";
|
|
7271
|
-
DataViewCommandType[DataViewCommandType["Prepare"] = 2] = "Prepare";
|
|
7272
|
-
DataViewCommandType[DataViewCommandType["FirstChunk"] = 3] = "FirstChunk";
|
|
7273
|
-
DataViewCommandType[DataViewCommandType["RecomputeUnit"] = 4] = "RecomputeUnit";
|
|
7274
|
-
DataViewCommandType[DataViewCommandType["ExecuteLocalUpdates"] = 5] = "ExecuteLocalUpdates";
|
|
7275
|
-
DataViewCommandType[DataViewCommandType["InitDataControlViews"] = 6] = "InitDataControlViews";
|
|
7276
|
-
DataViewCommandType[DataViewCommandType["OpenTransaction"] = 7] = "OpenTransaction";
|
|
7277
|
-
DataViewCommandType[DataViewCommandType["CloseTransaction"] = 8] = "CloseTransaction";
|
|
7278
|
-
DataViewCommandType[DataViewCommandType["SetTransactionState"] = 9] = "SetTransactionState";
|
|
7279
|
-
DataViewCommandType[DataViewCommandType["AddUserRange"] = 10] = "AddUserRange";
|
|
7280
|
-
DataViewCommandType[DataViewCommandType["ResetUserRange"] = 11] = "ResetUserRange";
|
|
7281
|
-
DataViewCommandType[DataViewCommandType["DbDisconnect"] = 12] = "DbDisconnect";
|
|
7282
|
-
DataViewCommandType[DataViewCommandType["AddUserLocate"] = 13] = "AddUserLocate";
|
|
7283
|
-
DataViewCommandType[DataViewCommandType["ResetUserLocate"] = 14] = "ResetUserLocate";
|
|
7284
|
-
DataViewCommandType[DataViewCommandType["AddUserSort"] = 15] = "AddUserSort";
|
|
7285
|
-
DataViewCommandType[DataViewCommandType["ResetUserSort"] = 16] = "ResetUserSort";
|
|
7286
|
-
DataViewCommandType[DataViewCommandType["DataViewToDataSource"] = 17] = "DataViewToDataSource";
|
|
7287
|
-
DataViewCommandType[DataViewCommandType["DbDelete"] = 18] = "DbDelete";
|
|
7288
|
-
DataViewCommandType[DataViewCommandType["ControlItemsRefresh"] = 19] = "ControlItemsRefresh";
|
|
7289
|
-
DataViewCommandType[DataViewCommandType["SQLExecute"] = 20] = "SQLExecute";
|
|
7290
|
-
})(DataViewCommandType || (DataViewCommandType = {}));
|
|
7291
|
-
class DataviewCommand extends ClientOriginatedCommandTaskTag {
|
|
7292
|
-
constructor() {
|
|
7293
|
-
super();
|
|
7294
|
-
this.CommandType = 0;
|
|
7295
|
-
this.TaskTag = null;
|
|
7296
|
-
}
|
|
7297
|
-
get CommandTypeAttribute() {
|
|
7298
|
-
throw new NotImplementedException();
|
|
7299
|
-
}
|
|
7300
|
-
SerializeCommandData() {
|
|
7301
|
-
Debug.Assert(false, "Dataview commands need not be serialized");
|
|
7302
|
-
return null;
|
|
7303
|
-
}
|
|
7304
|
-
get ShouldSerialize() {
|
|
7305
|
-
return false;
|
|
7306
|
-
}
|
|
7307
|
-
}
|
|
7308
|
-
|
|
7309
7276
|
class EventHandlerPosition {
|
|
7310
7277
|
constructor() {
|
|
7311
7278
|
this._handlerIdx = 0;
|
|
@@ -7502,6 +7469,48 @@ EventHandlerPosition.PHASE_CONTROL_NON_SPECIFIC = 2;
|
|
|
7502
7469
|
EventHandlerPosition.PHASE_GLOBAL = 3;
|
|
7503
7470
|
EventHandlerPosition.PHASE_GLOBAL_SPECIFIC = 4;
|
|
7504
7471
|
|
|
7472
|
+
var DataViewCommandType;
|
|
7473
|
+
(function (DataViewCommandType) {
|
|
7474
|
+
DataViewCommandType[DataViewCommandType["Init"] = 0] = "Init";
|
|
7475
|
+
DataViewCommandType[DataViewCommandType["Clear"] = 1] = "Clear";
|
|
7476
|
+
DataViewCommandType[DataViewCommandType["Prepare"] = 2] = "Prepare";
|
|
7477
|
+
DataViewCommandType[DataViewCommandType["FirstChunk"] = 3] = "FirstChunk";
|
|
7478
|
+
DataViewCommandType[DataViewCommandType["RecomputeUnit"] = 4] = "RecomputeUnit";
|
|
7479
|
+
DataViewCommandType[DataViewCommandType["ExecuteLocalUpdates"] = 5] = "ExecuteLocalUpdates";
|
|
7480
|
+
DataViewCommandType[DataViewCommandType["InitDataControlViews"] = 6] = "InitDataControlViews";
|
|
7481
|
+
DataViewCommandType[DataViewCommandType["OpenTransaction"] = 7] = "OpenTransaction";
|
|
7482
|
+
DataViewCommandType[DataViewCommandType["CloseTransaction"] = 8] = "CloseTransaction";
|
|
7483
|
+
DataViewCommandType[DataViewCommandType["SetTransactionState"] = 9] = "SetTransactionState";
|
|
7484
|
+
DataViewCommandType[DataViewCommandType["AddUserRange"] = 10] = "AddUserRange";
|
|
7485
|
+
DataViewCommandType[DataViewCommandType["ResetUserRange"] = 11] = "ResetUserRange";
|
|
7486
|
+
DataViewCommandType[DataViewCommandType["DbDisconnect"] = 12] = "DbDisconnect";
|
|
7487
|
+
DataViewCommandType[DataViewCommandType["AddUserLocate"] = 13] = "AddUserLocate";
|
|
7488
|
+
DataViewCommandType[DataViewCommandType["ResetUserLocate"] = 14] = "ResetUserLocate";
|
|
7489
|
+
DataViewCommandType[DataViewCommandType["AddUserSort"] = 15] = "AddUserSort";
|
|
7490
|
+
DataViewCommandType[DataViewCommandType["ResetUserSort"] = 16] = "ResetUserSort";
|
|
7491
|
+
DataViewCommandType[DataViewCommandType["DataViewToDataSource"] = 17] = "DataViewToDataSource";
|
|
7492
|
+
DataViewCommandType[DataViewCommandType["DbDelete"] = 18] = "DbDelete";
|
|
7493
|
+
DataViewCommandType[DataViewCommandType["ControlItemsRefresh"] = 19] = "ControlItemsRefresh";
|
|
7494
|
+
DataViewCommandType[DataViewCommandType["SQLExecute"] = 20] = "SQLExecute";
|
|
7495
|
+
})(DataViewCommandType || (DataViewCommandType = {}));
|
|
7496
|
+
class DataviewCommand extends ClientOriginatedCommandTaskTag {
|
|
7497
|
+
constructor() {
|
|
7498
|
+
super();
|
|
7499
|
+
this.CommandType = 0;
|
|
7500
|
+
this.TaskTag = null;
|
|
7501
|
+
}
|
|
7502
|
+
get CommandTypeAttribute() {
|
|
7503
|
+
throw new NotImplementedException();
|
|
7504
|
+
}
|
|
7505
|
+
SerializeCommandData() {
|
|
7506
|
+
Debug.Assert(false, "Dataview commands need not be serialized");
|
|
7507
|
+
return null;
|
|
7508
|
+
}
|
|
7509
|
+
get ShouldSerialize() {
|
|
7510
|
+
return false;
|
|
7511
|
+
}
|
|
7512
|
+
}
|
|
7513
|
+
|
|
7505
7514
|
class AddUserRangeDataviewCommand extends DataviewCommand {
|
|
7506
7515
|
constructor() {
|
|
7507
7516
|
super();
|
|
@@ -7900,6 +7909,13 @@ class SelectProgramCommand extends ExecOperCommand {
|
|
|
7900
7909
|
}
|
|
7901
7910
|
}
|
|
7902
7911
|
|
|
7912
|
+
class ControlItemsRefreshCommand extends DataviewCommand {
|
|
7913
|
+
constructor() {
|
|
7914
|
+
super();
|
|
7915
|
+
this.Control = null;
|
|
7916
|
+
}
|
|
7917
|
+
}
|
|
7918
|
+
|
|
7903
7919
|
class CommandFactory {
|
|
7904
7920
|
static CreateEventCommand(taskTag, magicEvent) {
|
|
7905
7921
|
let eventCommand = new EventCommand(magicEvent);
|
|
@@ -7918,6 +7934,13 @@ class CommandFactory {
|
|
|
7918
7934
|
dataviewCommand.TaskTag = taskId;
|
|
7919
7935
|
return dataviewCommand;
|
|
7920
7936
|
}
|
|
7937
|
+
static CreateControlItemsRefreshCommand(taskId, control) {
|
|
7938
|
+
let command = new ControlItemsRefreshCommand();
|
|
7939
|
+
command.CommandType = DataViewCommandType.ControlItemsRefresh;
|
|
7940
|
+
command.TaskTag = taskId;
|
|
7941
|
+
command.Control = control;
|
|
7942
|
+
return command;
|
|
7943
|
+
}
|
|
7921
7944
|
static CreateAddUserRangeDataviewCommand(taskId, userRange) {
|
|
7922
7945
|
let addUserRangeDataviewCommand = new AddUserRangeDataviewCommand();
|
|
7923
7946
|
addUserRangeDataviewCommand.TaskTag = taskId;
|
|
@@ -8123,13 +8146,6 @@ class CommandFactory {
|
|
|
8123
8146
|
}
|
|
8124
8147
|
}
|
|
8125
8148
|
|
|
8126
|
-
class Sort {
|
|
8127
|
-
constructor() {
|
|
8128
|
-
this.fldIdx = 0;
|
|
8129
|
-
this.dir = false;
|
|
8130
|
-
}
|
|
8131
|
-
}
|
|
8132
|
-
|
|
8133
8149
|
var ParamParseResult;
|
|
8134
8150
|
(function (ParamParseResult) {
|
|
8135
8151
|
ParamParseResult[ParamParseResult["OK"] = 0] = "OK";
|
|
@@ -8235,7 +8251,7 @@ class MirrorPrmMap extends PrmMap {
|
|
|
8235
8251
|
while (this.mirrorFromXML(parser.getNextTag(), parser)) {
|
|
8236
8252
|
}
|
|
8237
8253
|
}
|
|
8238
|
-
|
|
8254
|
+
RestoreParams(xml) {
|
|
8239
8255
|
let parser = new XmlParser(xml);
|
|
8240
8256
|
while (this.mirrorFromXML(parser.getNextTag(), parser)) {
|
|
8241
8257
|
}
|
|
@@ -9677,8 +9693,7 @@ class MirrorString {
|
|
|
9677
9693
|
this._reserved = false;
|
|
9678
9694
|
}
|
|
9679
9695
|
mirrorToXML() {
|
|
9680
|
-
return ConstInterface.MG_ATTR_ENV_VALUE + "=\"" + XmlParser.escape(this._value) + "\"
|
|
9681
|
-
ConstInterface.MG_ATTR_ENV_WRITEINI + "=F";
|
|
9696
|
+
return ConstInterface.MG_ATTR_ENV_VALUE + "=\"" + XmlParser.escape(this._value) + "\"";
|
|
9682
9697
|
}
|
|
9683
9698
|
init(name, xmlParser) {
|
|
9684
9699
|
let valueStart, valueEnd, reserveStart, paramEnd;
|
|
@@ -10851,6 +10866,11 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
|
10851
10866
|
this.eval_op_VarDisplayName(resVal, val1);
|
|
10852
10867
|
expStrTracker.resetNullResult();
|
|
10853
10868
|
break;
|
|
10869
|
+
case ExpressionInterface.EXP_OP_CONTROL_ITEMS_REFRESH:
|
|
10870
|
+
val2 = valStack.pop();
|
|
10871
|
+
val1 = valStack.pop();
|
|
10872
|
+
await this.eval_op_controlItemRefresh(val1, val2, resVal);
|
|
10873
|
+
break;
|
|
10854
10874
|
case ExpressionInterface.EXP_OP_VARCONTROLID:
|
|
10855
10875
|
val1 = valStack.pop();
|
|
10856
10876
|
this.eval_op_VarControlID(resVal, val1);
|
|
@@ -11239,11 +11259,6 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
|
11239
11259
|
val1 = valStack.pop();
|
|
11240
11260
|
this.eval_op_eoy(resVal, val1);
|
|
11241
11261
|
break;
|
|
11242
|
-
case ExpressionInterface.EXP_OP_ROLLBACK:
|
|
11243
|
-
val2 = valStack.pop();
|
|
11244
|
-
val1 = valStack.pop();
|
|
11245
|
-
await this.eval_op_rollback(resVal);
|
|
11246
|
-
break;
|
|
11247
11262
|
case ExpressionInterface.EXP_OP_VARSET:
|
|
11248
11263
|
val2 = valStack.pop();
|
|
11249
11264
|
val1 = valStack.pop();
|
|
@@ -11608,41 +11623,6 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
|
11608
11623
|
val1 = valStack.pop();
|
|
11609
11624
|
this.eval_op_taskType(resVal, val1);
|
|
11610
11625
|
break;
|
|
11611
|
-
case ExpressionInterface.EXP_OP_RANGE_ADD:
|
|
11612
|
-
nArgs = valStack.pop();
|
|
11613
|
-
if (nArgs > 0) {
|
|
11614
|
-
Exp_params = new Array(nArgs);
|
|
11615
|
-
for (j = 0; j < nArgs; j++)
|
|
11616
|
-
Exp_params[nArgs - 1 - j] = valStack.pop();
|
|
11617
|
-
await this.eval_op_range_add(resVal, Exp_params);
|
|
11618
|
-
}
|
|
11619
|
-
break;
|
|
11620
|
-
case ExpressionInterface.EXP_OP_RANGE_RESET:
|
|
11621
|
-
val1 = valStack.pop();
|
|
11622
|
-
await this.eval_op_range_reset(resVal, val1);
|
|
11623
|
-
break;
|
|
11624
|
-
case ExpressionInterface.EXP_OP_LOCATE_ADD:
|
|
11625
|
-
nArgs = valStack.pop();
|
|
11626
|
-
if (nArgs > 0) {
|
|
11627
|
-
Exp_params = new Array(nArgs);
|
|
11628
|
-
for (j = 0; j < nArgs; j++)
|
|
11629
|
-
Exp_params[nArgs - 1 - j] = valStack.pop();
|
|
11630
|
-
await this.eval_op_locate_add(resVal, Exp_params);
|
|
11631
|
-
}
|
|
11632
|
-
break;
|
|
11633
|
-
case ExpressionInterface.EXP_OP_LOCATE_RESET:
|
|
11634
|
-
val1 = valStack.pop();
|
|
11635
|
-
await this.eval_op_locate_reset(resVal, val1);
|
|
11636
|
-
break;
|
|
11637
|
-
case ExpressionInterface.EXP_OP_SORT_ADD:
|
|
11638
|
-
val2 = valStack.pop();
|
|
11639
|
-
val1 = valStack.pop();
|
|
11640
|
-
await this.eval_op_sort_add(resVal, val1, val2);
|
|
11641
|
-
break;
|
|
11642
|
-
case ExpressionInterface.EXP_OP_SORT_RESET:
|
|
11643
|
-
val1 = valStack.pop();
|
|
11644
|
-
await this.eval_op_sort_reset(resVal, val1);
|
|
11645
|
-
break;
|
|
11646
11626
|
case ExpressionInterface.EXP_OP_TSK_INSTANCE:
|
|
11647
11627
|
val1 = valStack.pop();
|
|
11648
11628
|
this.eval_op_tsk_instance(resVal, val1);
|
|
@@ -12979,6 +12959,23 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
|
12979
12959
|
resVal.StrVal = fld.VarDisplayName;
|
|
12980
12960
|
}
|
|
12981
12961
|
}
|
|
12962
|
+
async eval_op_controlItemRefresh(val1, val2, resVal) {
|
|
12963
|
+
let success = false;
|
|
12964
|
+
let parent = val2.MgNumVal.NUM_2_LONG();
|
|
12965
|
+
resVal.Attr = StorageAttribute.BOOLEAN;
|
|
12966
|
+
if ((parent >= 0 && parent < (this.ExpTask.getTaskDepth(false))) || parent === ExpressionEvaluator.TRIGGER_TASK) {
|
|
12967
|
+
let tsk = super.GetContextTask(parent);
|
|
12968
|
+
if (tsk != null && tsk.getForm() != null) {
|
|
12969
|
+
let control = tsk.getForm().GetCtrl(val1.StrVal);
|
|
12970
|
+
if (control != null && control.isChoiceControl() && control.isDataCtrl()) {
|
|
12971
|
+
let command = CommandFactory.CreateControlItemsRefreshCommand(tsk.getTaskTag(), control);
|
|
12972
|
+
await tsk.DataviewManager.CurrentDataviewManager.Execute(command);
|
|
12973
|
+
success = true;
|
|
12974
|
+
}
|
|
12975
|
+
}
|
|
12976
|
+
}
|
|
12977
|
+
resVal.BoolVal = success;
|
|
12978
|
+
}
|
|
12982
12979
|
eval_op_VarControlID(resVal, val1) {
|
|
12983
12980
|
let ret = 0;
|
|
12984
12981
|
if (val1.MgNumVal !== null) {
|
|
@@ -13264,12 +13261,6 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
|
13264
13261
|
await fld.setValueAndStartRecompute(bufptr, val.IsNull, true, setRecordUpdated, false);
|
|
13265
13262
|
await fld.updateDisplay();
|
|
13266
13263
|
}
|
|
13267
|
-
async eval_op_rollback(resVal) {
|
|
13268
|
-
let task = this.ExpTask.GetContextTask() || this.ExpTask;
|
|
13269
|
-
await AccessHelper.eventsManager.handleInternalEventWithTask(task, InternalInterface.MG_ACT_ROLLBACK);
|
|
13270
|
-
resVal.Attr = StorageAttribute.BOOLEAN;
|
|
13271
|
-
resVal.BoolVal = true;
|
|
13272
|
-
}
|
|
13273
13264
|
eval_op_like(source, maskOrg, resVal) {
|
|
13274
13265
|
let i;
|
|
13275
13266
|
let j;
|
|
@@ -13826,54 +13817,6 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
|
13826
13817
|
resultStr.Replace('\\@', '@');
|
|
13827
13818
|
resVal.StrVal = resultStr.ToString();
|
|
13828
13819
|
}
|
|
13829
|
-
async eval_op_range_add(resVal, Exp_params) {
|
|
13830
|
-
resVal.Attr = StorageAttribute.BOOLEAN;
|
|
13831
|
-
resVal.BoolVal = await this.add_rt_ranges(Exp_params, false);
|
|
13832
|
-
}
|
|
13833
|
-
async eval_op_range_reset(resVal, parent) {
|
|
13834
|
-
resVal.Attr = StorageAttribute.BOOLEAN;
|
|
13835
|
-
let iParent = parent.MgNumVal.NUM_2_LONG();
|
|
13836
|
-
if ((iParent >= 0 && iParent < (this.ExpTask.getTaskDepth(false))) || iParent === ExpressionEvaluator.TRIGGER_TASK) {
|
|
13837
|
-
let task = super.GetContextTask(iParent);
|
|
13838
|
-
if (task !== null) {
|
|
13839
|
-
let command = CommandFactory.CreateDataViewCommand(task.getTaskTag(), DataViewCommandType.ResetUserRange);
|
|
13840
|
-
await task.DataviewManager.Execute(command);
|
|
13841
|
-
resVal.BoolVal = true;
|
|
13842
|
-
}
|
|
13843
|
-
}
|
|
13844
|
-
}
|
|
13845
|
-
async eval_op_locate_add(resVal, Exp_params) {
|
|
13846
|
-
resVal.Attr = StorageAttribute.BOOLEAN;
|
|
13847
|
-
resVal.BoolVal = await this.add_rt_ranges(Exp_params, true);
|
|
13848
|
-
}
|
|
13849
|
-
async eval_op_locate_reset(resVal, parent) {
|
|
13850
|
-
resVal.Attr = StorageAttribute.BOOLEAN;
|
|
13851
|
-
let iParent = parent.MgNumVal.NUM_2_LONG();
|
|
13852
|
-
if ((iParent >= 0 && iParent < (this.ExpTask.getTaskDepth(false))) || iParent === ExpressionEvaluator.TRIGGER_TASK) {
|
|
13853
|
-
let task = super.GetContextTask(iParent);
|
|
13854
|
-
if (task !== null) {
|
|
13855
|
-
let command = CommandFactory.CreateDataViewCommand(task.getTaskTag(), DataViewCommandType.ResetUserLocate);
|
|
13856
|
-
await task.DataviewManager.Execute(command);
|
|
13857
|
-
resVal.BoolVal = true;
|
|
13858
|
-
}
|
|
13859
|
-
}
|
|
13860
|
-
}
|
|
13861
|
-
async eval_op_sort_add(resVal, varnum, dir) {
|
|
13862
|
-
resVal.Attr = StorageAttribute.BOOLEAN;
|
|
13863
|
-
resVal.BoolVal = await this.add_sort(varnum, dir);
|
|
13864
|
-
}
|
|
13865
|
-
async eval_op_sort_reset(resVal, parent) {
|
|
13866
|
-
resVal.Attr = StorageAttribute.BOOLEAN;
|
|
13867
|
-
let iParent = parent.MgNumVal.NUM_2_LONG();
|
|
13868
|
-
if ((iParent >= 0 && iParent < (this.ExpTask.getTaskDepth(false))) || iParent === ExpressionEvaluator.TRIGGER_TASK) {
|
|
13869
|
-
let task = super.GetContextTask(iParent);
|
|
13870
|
-
if (task !== null) {
|
|
13871
|
-
let command = CommandFactory.CreateDataViewCommand(task.getTaskTag(), DataViewCommandType.ResetUserSort);
|
|
13872
|
-
await task.DataviewManager.Execute(command);
|
|
13873
|
-
resVal.BoolVal = true;
|
|
13874
|
-
}
|
|
13875
|
-
}
|
|
13876
|
-
}
|
|
13877
13820
|
eval_op_tsk_instance(resVal, Parent) {
|
|
13878
13821
|
let tag = 0;
|
|
13879
13822
|
let iParent = Parent.MgNumVal.NUM_2_LONG();
|
|
@@ -13887,84 +13830,6 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
|
13887
13830
|
resVal.MgNumVal = new NUM_TYPE();
|
|
13888
13831
|
resVal.MgNumVal.NUM_4_LONG(tag);
|
|
13889
13832
|
}
|
|
13890
|
-
async add_sort(varnum, dir) {
|
|
13891
|
-
if (varnum.MgNumVal === null)
|
|
13892
|
-
return false;
|
|
13893
|
-
let itm = varnum.MgNumVal.NUM_2_LONG();
|
|
13894
|
-
if (itm === 0)
|
|
13895
|
-
return false;
|
|
13896
|
-
let fld = this.GetFieldOfContextTask(itm);
|
|
13897
|
-
if (fld === null)
|
|
13898
|
-
return false;
|
|
13899
|
-
let task = fld.getTask();
|
|
13900
|
-
let vee_idx = fld.getId() + 1;
|
|
13901
|
-
let expr_64 = new Sort();
|
|
13902
|
-
expr_64.fldIdx = vee_idx;
|
|
13903
|
-
expr_64.dir = dir.BoolVal;
|
|
13904
|
-
let sort = expr_64;
|
|
13905
|
-
let command = CommandFactory.CreateAddUserSortDataviewCommand(task.getTaskTag(), sort);
|
|
13906
|
-
await task.DataviewManager.Execute(command);
|
|
13907
|
-
return true;
|
|
13908
|
-
}
|
|
13909
|
-
async add_rt_ranges(Exp_params, locate) {
|
|
13910
|
-
let varnum = Exp_params[0];
|
|
13911
|
-
let min = Exp_params[1];
|
|
13912
|
-
if (varnum.MgNumVal === null)
|
|
13913
|
-
return false;
|
|
13914
|
-
let itm = varnum.MgNumVal.NUM_2_LONG();
|
|
13915
|
-
if (itm === 0)
|
|
13916
|
-
return false;
|
|
13917
|
-
let fld = this.GetFieldOfContextTask(itm);
|
|
13918
|
-
if (fld === null)
|
|
13919
|
-
return false;
|
|
13920
|
-
let task = fld.getTask();
|
|
13921
|
-
let vee_idx = fld.getId() + 1;
|
|
13922
|
-
let expr_78 = new UserRange();
|
|
13923
|
-
expr_78.veeIdx = vee_idx;
|
|
13924
|
-
let rng = expr_78;
|
|
13925
|
-
if (min.IsNull)
|
|
13926
|
-
rng.nullMin = true;
|
|
13927
|
-
if (!rng.nullMin && (min.Attr === StorageAttribute.ALPHA || min.Attr === StorageAttribute.UNICODE) && min.StrVal.length === 0)
|
|
13928
|
-
rng.discardMin = true;
|
|
13929
|
-
else {
|
|
13930
|
-
if (!rng.nullMin) {
|
|
13931
|
-
if (!StorageAttributeCheck.isTheSameType(fld.getType(), min.Attr))
|
|
13932
|
-
return false;
|
|
13933
|
-
if (StorageAttributeCheck.StorageFldAlphaUnicodeOrBlob(fld.getType(), min.Attr))
|
|
13934
|
-
this.ConvertExpVal(min, fld.getType());
|
|
13935
|
-
rng.min = min.ToMgVal();
|
|
13936
|
-
}
|
|
13937
|
-
}
|
|
13938
|
-
if (Exp_params.length === 3) {
|
|
13939
|
-
let max = Exp_params[2];
|
|
13940
|
-
if (max.IsNull)
|
|
13941
|
-
rng.nullMax = true;
|
|
13942
|
-
if (!rng.nullMax && (max.Attr === StorageAttribute.ALPHA || max.Attr === StorageAttribute.UNICODE) && max.StrVal.length === 0)
|
|
13943
|
-
rng.discardMax = true;
|
|
13944
|
-
else {
|
|
13945
|
-
if (!rng.nullMax) {
|
|
13946
|
-
if (!StorageAttributeCheck.isTheSameType(fld.getType(), max.Attr))
|
|
13947
|
-
return false;
|
|
13948
|
-
if (StorageAttributeCheck.StorageFldAlphaUnicodeOrBlob(fld.getType(), max.Attr))
|
|
13949
|
-
this.ConvertExpVal(max, fld.getType());
|
|
13950
|
-
rng.max = max.ToMgVal();
|
|
13951
|
-
}
|
|
13952
|
-
}
|
|
13953
|
-
}
|
|
13954
|
-
else
|
|
13955
|
-
rng.discardMax = true;
|
|
13956
|
-
if (!rng.discardMin || !rng.discardMax) {
|
|
13957
|
-
if (locate) {
|
|
13958
|
-
let command = CommandFactory.CreateAddUserLocateDataviewCommand(task.getTaskTag(), rng);
|
|
13959
|
-
await task.DataviewManager.Execute(command);
|
|
13960
|
-
}
|
|
13961
|
-
else {
|
|
13962
|
-
let command2 = CommandFactory.CreateAddUserRangeDataviewCommand(task.getTaskTag(), rng);
|
|
13963
|
-
await task.DataviewManager.Execute(command2);
|
|
13964
|
-
}
|
|
13965
|
-
}
|
|
13966
|
-
return true;
|
|
13967
|
-
}
|
|
13968
13833
|
eval_op_getParam(resVal, name) {
|
|
13969
13834
|
Debug.Assert(!name.IsNull && name.StrVal !== null);
|
|
13970
13835
|
let expVal = GlobalParams.Instance.get(name.StrVal);
|
|
@@ -19147,6 +19012,13 @@ class DataviewManager extends DataviewManagerBase {
|
|
|
19147
19012
|
}
|
|
19148
19013
|
}
|
|
19149
19014
|
|
|
19015
|
+
class Sort {
|
|
19016
|
+
constructor() {
|
|
19017
|
+
this.fldIdx = 0;
|
|
19018
|
+
this.dir = false;
|
|
19019
|
+
}
|
|
19020
|
+
}
|
|
19021
|
+
|
|
19150
19022
|
class SortCollection {
|
|
19151
19023
|
constructor() {
|
|
19152
19024
|
this._sortTab = null;
|
|
@@ -19415,6 +19287,7 @@ class MgForm extends MgFormBase {
|
|
|
19415
19287
|
try {
|
|
19416
19288
|
await this.RefreshDisplay(Constants.TASK_REFRESH_FORM);
|
|
19417
19289
|
await this.setCurrRowByDisplayLine(this.GetDataview().getTopRecIdx() + this.getLastValidRow(), false, true);
|
|
19290
|
+
visibleLine = this.getLastValidRow();
|
|
19418
19291
|
}
|
|
19419
19292
|
catch (Exception) {
|
|
19420
19293
|
}
|
|
@@ -29543,7 +29416,7 @@ class CommandsTable {
|
|
|
29543
29416
|
}
|
|
29544
29417
|
}
|
|
29545
29418
|
|
|
29546
|
-
let CurrentClientVersion = '4.1000.0-dev4100.
|
|
29419
|
+
let CurrentClientVersion = '4.1000.0-dev4100.100';
|
|
29547
29420
|
|
|
29548
29421
|
class ClientManager {
|
|
29549
29422
|
constructor() {
|
|
@@ -29974,13 +29847,6 @@ class MagicBridge {
|
|
|
29974
29847
|
}
|
|
29975
29848
|
}
|
|
29976
29849
|
|
|
29977
|
-
class ControlItemsRefreshCommand extends DataviewCommand {
|
|
29978
|
-
constructor() {
|
|
29979
|
-
super();
|
|
29980
|
-
this.Control = null;
|
|
29981
|
-
}
|
|
29982
|
-
}
|
|
29983
|
-
|
|
29984
29850
|
class DataViewOutputCommand extends DataviewCommand {
|
|
29985
29851
|
constructor(OutputCommandType) {
|
|
29986
29852
|
super();
|