@magic-xpa/engine 4.1000.0-dev4100.87 → 4.1000.0-dev4100.88

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.
@@ -6722,7 +6722,7 @@ ExpressionDict.expDesc = [
6722
6722
  null,
6723
6723
  new ExpDesc('N', 0, 0, 0, "", false),
6724
6724
  null,
6725
- new ExpDesc('B', 0, 2, 2, "BN", false),
6725
+ null,
6726
6726
  new ExpDesc('B', 0, 2, 2, "V ", false),
6727
6727
  null,
6728
6728
  null,
@@ -7171,12 +7171,12 @@ ExpressionDict.expDesc = [
7171
7171
  null,
7172
7172
  new ExpDesc('A', 0, 1, 1, "A", false),
7173
7173
  new ExpDesc('N', 0, 2, 2, "AA", false),
7174
- new ExpDesc('B', 0, -2, -2, "V ", false),
7175
- new ExpDesc('B', 0, 1, 1, "N", false),
7176
- new ExpDesc('B', 0, -2, -2, "V ", false),
7177
- new ExpDesc('B', 0, 1, 1, "N", false),
7178
- new ExpDesc('B', 0, 2, 2, "VB", false),
7179
- new ExpDesc('B', 0, 1, 1, "N", false),
7174
+ null,
7175
+ null,
7176
+ null,
7177
+ null,
7178
+ null,
7179
+ null,
7180
7180
  new ExpDesc('N', 0, 1, 1, "N", false),
7181
7181
  null,
7182
7182
  null,
@@ -7263,48 +7263,6 @@ ExpressionDict.expDesc = [
7263
7263
  new ExpDesc('U', 0, 0, 0, '', false),
7264
7264
  ];
7265
7265
 
7266
- var DataViewCommandType;
7267
- (function (DataViewCommandType) {
7268
- DataViewCommandType[DataViewCommandType["Init"] = 0] = "Init";
7269
- DataViewCommandType[DataViewCommandType["Clear"] = 1] = "Clear";
7270
- DataViewCommandType[DataViewCommandType["Prepare"] = 2] = "Prepare";
7271
- DataViewCommandType[DataViewCommandType["FirstChunk"] = 3] = "FirstChunk";
7272
- DataViewCommandType[DataViewCommandType["RecomputeUnit"] = 4] = "RecomputeUnit";
7273
- DataViewCommandType[DataViewCommandType["ExecuteLocalUpdates"] = 5] = "ExecuteLocalUpdates";
7274
- DataViewCommandType[DataViewCommandType["InitDataControlViews"] = 6] = "InitDataControlViews";
7275
- DataViewCommandType[DataViewCommandType["OpenTransaction"] = 7] = "OpenTransaction";
7276
- DataViewCommandType[DataViewCommandType["CloseTransaction"] = 8] = "CloseTransaction";
7277
- DataViewCommandType[DataViewCommandType["SetTransactionState"] = 9] = "SetTransactionState";
7278
- DataViewCommandType[DataViewCommandType["AddUserRange"] = 10] = "AddUserRange";
7279
- DataViewCommandType[DataViewCommandType["ResetUserRange"] = 11] = "ResetUserRange";
7280
- DataViewCommandType[DataViewCommandType["DbDisconnect"] = 12] = "DbDisconnect";
7281
- DataViewCommandType[DataViewCommandType["AddUserLocate"] = 13] = "AddUserLocate";
7282
- DataViewCommandType[DataViewCommandType["ResetUserLocate"] = 14] = "ResetUserLocate";
7283
- DataViewCommandType[DataViewCommandType["AddUserSort"] = 15] = "AddUserSort";
7284
- DataViewCommandType[DataViewCommandType["ResetUserSort"] = 16] = "ResetUserSort";
7285
- DataViewCommandType[DataViewCommandType["DataViewToDataSource"] = 17] = "DataViewToDataSource";
7286
- DataViewCommandType[DataViewCommandType["DbDelete"] = 18] = "DbDelete";
7287
- DataViewCommandType[DataViewCommandType["ControlItemsRefresh"] = 19] = "ControlItemsRefresh";
7288
- DataViewCommandType[DataViewCommandType["SQLExecute"] = 20] = "SQLExecute";
7289
- })(DataViewCommandType || (DataViewCommandType = {}));
7290
- class DataviewCommand extends ClientOriginatedCommandTaskTag {
7291
- constructor() {
7292
- super();
7293
- this.CommandType = 0;
7294
- this.TaskTag = null;
7295
- }
7296
- get CommandTypeAttribute() {
7297
- throw new NotImplementedException();
7298
- }
7299
- SerializeCommandData() {
7300
- Debug.Assert(false, "Dataview commands need not be serialized");
7301
- return null;
7302
- }
7303
- get ShouldSerialize() {
7304
- return false;
7305
- }
7306
- }
7307
-
7308
7266
  class EventHandlerPosition {
7309
7267
  constructor() {
7310
7268
  this._handlerIdx = 0;
@@ -7501,6 +7459,48 @@ EventHandlerPosition.PHASE_CONTROL_NON_SPECIFIC = 2;
7501
7459
  EventHandlerPosition.PHASE_GLOBAL = 3;
7502
7460
  EventHandlerPosition.PHASE_GLOBAL_SPECIFIC = 4;
7503
7461
 
7462
+ var DataViewCommandType;
7463
+ (function (DataViewCommandType) {
7464
+ DataViewCommandType[DataViewCommandType["Init"] = 0] = "Init";
7465
+ DataViewCommandType[DataViewCommandType["Clear"] = 1] = "Clear";
7466
+ DataViewCommandType[DataViewCommandType["Prepare"] = 2] = "Prepare";
7467
+ DataViewCommandType[DataViewCommandType["FirstChunk"] = 3] = "FirstChunk";
7468
+ DataViewCommandType[DataViewCommandType["RecomputeUnit"] = 4] = "RecomputeUnit";
7469
+ DataViewCommandType[DataViewCommandType["ExecuteLocalUpdates"] = 5] = "ExecuteLocalUpdates";
7470
+ DataViewCommandType[DataViewCommandType["InitDataControlViews"] = 6] = "InitDataControlViews";
7471
+ DataViewCommandType[DataViewCommandType["OpenTransaction"] = 7] = "OpenTransaction";
7472
+ DataViewCommandType[DataViewCommandType["CloseTransaction"] = 8] = "CloseTransaction";
7473
+ DataViewCommandType[DataViewCommandType["SetTransactionState"] = 9] = "SetTransactionState";
7474
+ DataViewCommandType[DataViewCommandType["AddUserRange"] = 10] = "AddUserRange";
7475
+ DataViewCommandType[DataViewCommandType["ResetUserRange"] = 11] = "ResetUserRange";
7476
+ DataViewCommandType[DataViewCommandType["DbDisconnect"] = 12] = "DbDisconnect";
7477
+ DataViewCommandType[DataViewCommandType["AddUserLocate"] = 13] = "AddUserLocate";
7478
+ DataViewCommandType[DataViewCommandType["ResetUserLocate"] = 14] = "ResetUserLocate";
7479
+ DataViewCommandType[DataViewCommandType["AddUserSort"] = 15] = "AddUserSort";
7480
+ DataViewCommandType[DataViewCommandType["ResetUserSort"] = 16] = "ResetUserSort";
7481
+ DataViewCommandType[DataViewCommandType["DataViewToDataSource"] = 17] = "DataViewToDataSource";
7482
+ DataViewCommandType[DataViewCommandType["DbDelete"] = 18] = "DbDelete";
7483
+ DataViewCommandType[DataViewCommandType["ControlItemsRefresh"] = 19] = "ControlItemsRefresh";
7484
+ DataViewCommandType[DataViewCommandType["SQLExecute"] = 20] = "SQLExecute";
7485
+ })(DataViewCommandType || (DataViewCommandType = {}));
7486
+ class DataviewCommand extends ClientOriginatedCommandTaskTag {
7487
+ constructor() {
7488
+ super();
7489
+ this.CommandType = 0;
7490
+ this.TaskTag = null;
7491
+ }
7492
+ get CommandTypeAttribute() {
7493
+ throw new NotImplementedException();
7494
+ }
7495
+ SerializeCommandData() {
7496
+ Debug.Assert(false, "Dataview commands need not be serialized");
7497
+ return null;
7498
+ }
7499
+ get ShouldSerialize() {
7500
+ return false;
7501
+ }
7502
+ }
7503
+
7504
7504
  class AddUserRangeDataviewCommand extends DataviewCommand {
7505
7505
  constructor() {
7506
7506
  super();
@@ -8136,13 +8136,6 @@ class CommandFactory {
8136
8136
  }
8137
8137
  }
8138
8138
 
8139
- class Sort {
8140
- constructor() {
8141
- this.fldIdx = 0;
8142
- this.dir = false;
8143
- }
8144
- }
8145
-
8146
8139
  var ParamParseResult;
8147
8140
  (function (ParamParseResult) {
8148
8141
  ParamParseResult[ParamParseResult["OK"] = 0] = "OK";
@@ -11257,11 +11250,6 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
11257
11250
  val1 = valStack.pop();
11258
11251
  this.eval_op_eoy(resVal, val1);
11259
11252
  break;
11260
- case ExpressionInterface.EXP_OP_ROLLBACK:
11261
- val2 = valStack.pop();
11262
- val1 = valStack.pop();
11263
- await this.eval_op_rollback(resVal);
11264
- break;
11265
11253
  case ExpressionInterface.EXP_OP_VARSET:
11266
11254
  val2 = valStack.pop();
11267
11255
  val1 = valStack.pop();
@@ -11626,41 +11614,6 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
11626
11614
  val1 = valStack.pop();
11627
11615
  this.eval_op_taskType(resVal, val1);
11628
11616
  break;
11629
- case ExpressionInterface.EXP_OP_RANGE_ADD:
11630
- nArgs = valStack.pop();
11631
- if (nArgs > 0) {
11632
- Exp_params = new Array(nArgs);
11633
- for (j = 0; j < nArgs; j++)
11634
- Exp_params[nArgs - 1 - j] = valStack.pop();
11635
- await this.eval_op_range_add(resVal, Exp_params);
11636
- }
11637
- break;
11638
- case ExpressionInterface.EXP_OP_RANGE_RESET:
11639
- val1 = valStack.pop();
11640
- await this.eval_op_range_reset(resVal, val1);
11641
- break;
11642
- case ExpressionInterface.EXP_OP_LOCATE_ADD:
11643
- nArgs = valStack.pop();
11644
- if (nArgs > 0) {
11645
- Exp_params = new Array(nArgs);
11646
- for (j = 0; j < nArgs; j++)
11647
- Exp_params[nArgs - 1 - j] = valStack.pop();
11648
- await this.eval_op_locate_add(resVal, Exp_params);
11649
- }
11650
- break;
11651
- case ExpressionInterface.EXP_OP_LOCATE_RESET:
11652
- val1 = valStack.pop();
11653
- await this.eval_op_locate_reset(resVal, val1);
11654
- break;
11655
- case ExpressionInterface.EXP_OP_SORT_ADD:
11656
- val2 = valStack.pop();
11657
- val1 = valStack.pop();
11658
- await this.eval_op_sort_add(resVal, val1, val2);
11659
- break;
11660
- case ExpressionInterface.EXP_OP_SORT_RESET:
11661
- val1 = valStack.pop();
11662
- await this.eval_op_sort_reset(resVal, val1);
11663
- break;
11664
11617
  case ExpressionInterface.EXP_OP_TSK_INSTANCE:
11665
11618
  val1 = valStack.pop();
11666
11619
  this.eval_op_tsk_instance(resVal, val1);
@@ -13299,12 +13252,6 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
13299
13252
  await fld.setValueAndStartRecompute(bufptr, val.IsNull, true, setRecordUpdated, false);
13300
13253
  await fld.updateDisplay();
13301
13254
  }
13302
- async eval_op_rollback(resVal) {
13303
- let task = this.ExpTask.GetContextTask() || this.ExpTask;
13304
- await AccessHelper.eventsManager.handleInternalEventWithTask(task, InternalInterface.MG_ACT_ROLLBACK);
13305
- resVal.Attr = StorageAttribute.BOOLEAN;
13306
- resVal.BoolVal = true;
13307
- }
13308
13255
  eval_op_like(source, maskOrg, resVal) {
13309
13256
  let i;
13310
13257
  let j;
@@ -13861,54 +13808,6 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
13861
13808
  resultStr.Replace('\\@', '@');
13862
13809
  resVal.StrVal = resultStr.ToString();
13863
13810
  }
13864
- async eval_op_range_add(resVal, Exp_params) {
13865
- resVal.Attr = StorageAttribute.BOOLEAN;
13866
- resVal.BoolVal = await this.add_rt_ranges(Exp_params, false);
13867
- }
13868
- async eval_op_range_reset(resVal, parent) {
13869
- resVal.Attr = StorageAttribute.BOOLEAN;
13870
- let iParent = parent.MgNumVal.NUM_2_LONG();
13871
- if ((iParent >= 0 && iParent < (this.ExpTask.getTaskDepth(false))) || iParent === ExpressionEvaluator.TRIGGER_TASK) {
13872
- let task = super.GetContextTask(iParent);
13873
- if (task !== null) {
13874
- let command = CommandFactory.CreateDataViewCommand(task.getTaskTag(), DataViewCommandType.ResetUserRange);
13875
- await task.DataviewManager.Execute(command);
13876
- resVal.BoolVal = true;
13877
- }
13878
- }
13879
- }
13880
- async eval_op_locate_add(resVal, Exp_params) {
13881
- resVal.Attr = StorageAttribute.BOOLEAN;
13882
- resVal.BoolVal = await this.add_rt_ranges(Exp_params, true);
13883
- }
13884
- async eval_op_locate_reset(resVal, parent) {
13885
- resVal.Attr = StorageAttribute.BOOLEAN;
13886
- let iParent = parent.MgNumVal.NUM_2_LONG();
13887
- if ((iParent >= 0 && iParent < (this.ExpTask.getTaskDepth(false))) || iParent === ExpressionEvaluator.TRIGGER_TASK) {
13888
- let task = super.GetContextTask(iParent);
13889
- if (task !== null) {
13890
- let command = CommandFactory.CreateDataViewCommand(task.getTaskTag(), DataViewCommandType.ResetUserLocate);
13891
- await task.DataviewManager.Execute(command);
13892
- resVal.BoolVal = true;
13893
- }
13894
- }
13895
- }
13896
- async eval_op_sort_add(resVal, varnum, dir) {
13897
- resVal.Attr = StorageAttribute.BOOLEAN;
13898
- resVal.BoolVal = await this.add_sort(varnum, dir);
13899
- }
13900
- async eval_op_sort_reset(resVal, parent) {
13901
- resVal.Attr = StorageAttribute.BOOLEAN;
13902
- let iParent = parent.MgNumVal.NUM_2_LONG();
13903
- if ((iParent >= 0 && iParent < (this.ExpTask.getTaskDepth(false))) || iParent === ExpressionEvaluator.TRIGGER_TASK) {
13904
- let task = super.GetContextTask(iParent);
13905
- if (task !== null) {
13906
- let command = CommandFactory.CreateDataViewCommand(task.getTaskTag(), DataViewCommandType.ResetUserSort);
13907
- await task.DataviewManager.Execute(command);
13908
- resVal.BoolVal = true;
13909
- }
13910
- }
13911
- }
13912
13811
  eval_op_tsk_instance(resVal, Parent) {
13913
13812
  let tag = 0;
13914
13813
  let iParent = Parent.MgNumVal.NUM_2_LONG();
@@ -13922,84 +13821,6 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
13922
13821
  resVal.MgNumVal = new NUM_TYPE();
13923
13822
  resVal.MgNumVal.NUM_4_LONG(tag);
13924
13823
  }
13925
- async add_sort(varnum, dir) {
13926
- if (varnum.MgNumVal === null)
13927
- return false;
13928
- let itm = varnum.MgNumVal.NUM_2_LONG();
13929
- if (itm === 0)
13930
- return false;
13931
- let fld = this.GetFieldOfContextTask(itm);
13932
- if (fld === null)
13933
- return false;
13934
- let task = fld.getTask();
13935
- let vee_idx = fld.getId() + 1;
13936
- let expr_64 = new Sort();
13937
- expr_64.fldIdx = vee_idx;
13938
- expr_64.dir = dir.BoolVal;
13939
- let sort = expr_64;
13940
- let command = CommandFactory.CreateAddUserSortDataviewCommand(task.getTaskTag(), sort);
13941
- await task.DataviewManager.Execute(command);
13942
- return true;
13943
- }
13944
- async add_rt_ranges(Exp_params, locate) {
13945
- let varnum = Exp_params[0];
13946
- let min = Exp_params[1];
13947
- if (varnum.MgNumVal === null)
13948
- return false;
13949
- let itm = varnum.MgNumVal.NUM_2_LONG();
13950
- if (itm === 0)
13951
- return false;
13952
- let fld = this.GetFieldOfContextTask(itm);
13953
- if (fld === null)
13954
- return false;
13955
- let task = fld.getTask();
13956
- let vee_idx = fld.getId() + 1;
13957
- let expr_78 = new UserRange();
13958
- expr_78.veeIdx = vee_idx;
13959
- let rng = expr_78;
13960
- if (min.IsNull)
13961
- rng.nullMin = true;
13962
- if (!rng.nullMin && (min.Attr === StorageAttribute.ALPHA || min.Attr === StorageAttribute.UNICODE) && min.StrVal.length === 0)
13963
- rng.discardMin = true;
13964
- else {
13965
- if (!rng.nullMin) {
13966
- if (!StorageAttributeCheck.isTheSameType(fld.getType(), min.Attr))
13967
- return false;
13968
- if (StorageAttributeCheck.StorageFldAlphaUnicodeOrBlob(fld.getType(), min.Attr))
13969
- this.ConvertExpVal(min, fld.getType());
13970
- rng.min = min.ToMgVal();
13971
- }
13972
- }
13973
- if (Exp_params.length === 3) {
13974
- let max = Exp_params[2];
13975
- if (max.IsNull)
13976
- rng.nullMax = true;
13977
- if (!rng.nullMax && (max.Attr === StorageAttribute.ALPHA || max.Attr === StorageAttribute.UNICODE) && max.StrVal.length === 0)
13978
- rng.discardMax = true;
13979
- else {
13980
- if (!rng.nullMax) {
13981
- if (!StorageAttributeCheck.isTheSameType(fld.getType(), max.Attr))
13982
- return false;
13983
- if (StorageAttributeCheck.StorageFldAlphaUnicodeOrBlob(fld.getType(), max.Attr))
13984
- this.ConvertExpVal(max, fld.getType());
13985
- rng.max = max.ToMgVal();
13986
- }
13987
- }
13988
- }
13989
- else
13990
- rng.discardMax = true;
13991
- if (!rng.discardMin || !rng.discardMax) {
13992
- if (locate) {
13993
- let command = CommandFactory.CreateAddUserLocateDataviewCommand(task.getTaskTag(), rng);
13994
- await task.DataviewManager.Execute(command);
13995
- }
13996
- else {
13997
- let command2 = CommandFactory.CreateAddUserRangeDataviewCommand(task.getTaskTag(), rng);
13998
- await task.DataviewManager.Execute(command2);
13999
- }
14000
- }
14001
- return true;
14002
- }
14003
13824
  eval_op_getParam(resVal, name) {
14004
13825
  Debug.Assert(!name.IsNull && name.StrVal !== null);
14005
13826
  let expVal = GlobalParams.Instance.get(name.StrVal);
@@ -19182,6 +19003,13 @@ class DataviewManager extends DataviewManagerBase {
19182
19003
  }
19183
19004
  }
19184
19005
 
19006
+ class Sort {
19007
+ constructor() {
19008
+ this.fldIdx = 0;
19009
+ this.dir = false;
19010
+ }
19011
+ }
19012
+
19185
19013
  class SortCollection {
19186
19014
  constructor() {
19187
19015
  this._sortTab = null;
@@ -29582,7 +29410,7 @@ class CommandsTable {
29582
29410
  }
29583
29411
  }
29584
29412
 
29585
- let CurrentClientVersion = '4.1000.0-dev4100.87';
29413
+ let CurrentClientVersion = '4.1000.0-dev4100.88';
29586
29414
 
29587
29415
  class ClientManager {
29588
29416
  constructor() {