@magic-xpa/engine 4.1000.0-dev4100.9 → 4.1000.0-dev4100.91
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/commands/ClientToServer/CommandFactory.mjs +10 -2
- package/esm2020/src/exp/ExpressionDict.mjs +8 -8
- package/esm2020/src/exp/ExpressionEvaluator.mjs +24 -176
- package/esm2020/src/gui/MgForm.mjs +6 -2
- package/fesm2015/magic-xpa-engine.mjs +103 -264
- package/fesm2015/magic-xpa-engine.mjs.map +1 -1
- package/fesm2020/magic-xpa-engine.mjs +98 -237
- package/fesm2020/magic-xpa-engine.mjs.map +1 -1
- package/package.json +4 -4
- package/src/commands/ClientToServer/CommandFactory.d.ts +3 -0
- package/src/exp/ExpressionEvaluator.d.ts +1 -9
@@ -6722,7 +6722,7 @@ ExpressionDict.expDesc = [
|
|
6722
6722
|
null,
|
6723
6723
|
new ExpDesc('N', 0, 0, 0, "", false),
|
6724
6724
|
null,
|
6725
|
-
|
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
|
-
|
7175
|
-
|
7176
|
-
|
7177
|
-
|
7178
|
-
|
7179
|
-
|
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();
|
@@ -7899,6 +7899,13 @@ class SelectProgramCommand extends ExecOperCommand {
|
|
7899
7899
|
}
|
7900
7900
|
}
|
7901
7901
|
|
7902
|
+
class ControlItemsRefreshCommand extends DataviewCommand {
|
7903
|
+
constructor() {
|
7904
|
+
super();
|
7905
|
+
this.Control = null;
|
7906
|
+
}
|
7907
|
+
}
|
7908
|
+
|
7902
7909
|
class CommandFactory {
|
7903
7910
|
static CreateEventCommand(taskTag, magicEvent) {
|
7904
7911
|
let eventCommand = new EventCommand(magicEvent);
|
@@ -7917,6 +7924,13 @@ class CommandFactory {
|
|
7917
7924
|
dataviewCommand.TaskTag = taskId;
|
7918
7925
|
return dataviewCommand;
|
7919
7926
|
}
|
7927
|
+
static CreateControlItemsRefreshCommand(taskId, control) {
|
7928
|
+
let command = new ControlItemsRefreshCommand();
|
7929
|
+
command.CommandType = DataViewCommandType.ControlItemsRefresh;
|
7930
|
+
command.TaskTag = taskId;
|
7931
|
+
command.Control = control;
|
7932
|
+
return command;
|
7933
|
+
}
|
7920
7934
|
static CreateAddUserRangeDataviewCommand(taskId, userRange) {
|
7921
7935
|
let addUserRangeDataviewCommand = new AddUserRangeDataviewCommand();
|
7922
7936
|
addUserRangeDataviewCommand.TaskTag = taskId;
|
@@ -8122,13 +8136,6 @@ class CommandFactory {
|
|
8122
8136
|
}
|
8123
8137
|
}
|
8124
8138
|
|
8125
|
-
class Sort {
|
8126
|
-
constructor() {
|
8127
|
-
this.fldIdx = 0;
|
8128
|
-
this.dir = false;
|
8129
|
-
}
|
8130
|
-
}
|
8131
|
-
|
8132
8139
|
var ParamParseResult;
|
8133
8140
|
(function (ParamParseResult) {
|
8134
8141
|
ParamParseResult[ParamParseResult["OK"] = 0] = "OK";
|
@@ -10850,6 +10857,11 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
10850
10857
|
this.eval_op_VarDisplayName(resVal, val1);
|
10851
10858
|
expStrTracker.resetNullResult();
|
10852
10859
|
break;
|
10860
|
+
case ExpressionInterface.EXP_OP_CONTROL_ITEMS_REFRESH:
|
10861
|
+
val2 = valStack.pop();
|
10862
|
+
val1 = valStack.pop();
|
10863
|
+
await this.eval_op_controlItemRefresh(val1, val2, resVal);
|
10864
|
+
break;
|
10853
10865
|
case ExpressionInterface.EXP_OP_VARCONTROLID:
|
10854
10866
|
val1 = valStack.pop();
|
10855
10867
|
this.eval_op_VarControlID(resVal, val1);
|
@@ -11238,11 +11250,6 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
11238
11250
|
val1 = valStack.pop();
|
11239
11251
|
this.eval_op_eoy(resVal, val1);
|
11240
11252
|
break;
|
11241
|
-
case ExpressionInterface.EXP_OP_ROLLBACK:
|
11242
|
-
val2 = valStack.pop();
|
11243
|
-
val1 = valStack.pop();
|
11244
|
-
await this.eval_op_rollback(resVal);
|
11245
|
-
break;
|
11246
11253
|
case ExpressionInterface.EXP_OP_VARSET:
|
11247
11254
|
val2 = valStack.pop();
|
11248
11255
|
val1 = valStack.pop();
|
@@ -11607,41 +11614,6 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
11607
11614
|
val1 = valStack.pop();
|
11608
11615
|
this.eval_op_taskType(resVal, val1);
|
11609
11616
|
break;
|
11610
|
-
case ExpressionInterface.EXP_OP_RANGE_ADD:
|
11611
|
-
nArgs = valStack.pop();
|
11612
|
-
if (nArgs > 0) {
|
11613
|
-
Exp_params = new Array(nArgs);
|
11614
|
-
for (j = 0; j < nArgs; j++)
|
11615
|
-
Exp_params[nArgs - 1 - j] = valStack.pop();
|
11616
|
-
await this.eval_op_range_add(resVal, Exp_params);
|
11617
|
-
}
|
11618
|
-
break;
|
11619
|
-
case ExpressionInterface.EXP_OP_RANGE_RESET:
|
11620
|
-
val1 = valStack.pop();
|
11621
|
-
await this.eval_op_range_reset(resVal, val1);
|
11622
|
-
break;
|
11623
|
-
case ExpressionInterface.EXP_OP_LOCATE_ADD:
|
11624
|
-
nArgs = valStack.pop();
|
11625
|
-
if (nArgs > 0) {
|
11626
|
-
Exp_params = new Array(nArgs);
|
11627
|
-
for (j = 0; j < nArgs; j++)
|
11628
|
-
Exp_params[nArgs - 1 - j] = valStack.pop();
|
11629
|
-
await this.eval_op_locate_add(resVal, Exp_params);
|
11630
|
-
}
|
11631
|
-
break;
|
11632
|
-
case ExpressionInterface.EXP_OP_LOCATE_RESET:
|
11633
|
-
val1 = valStack.pop();
|
11634
|
-
await this.eval_op_locate_reset(resVal, val1);
|
11635
|
-
break;
|
11636
|
-
case ExpressionInterface.EXP_OP_SORT_ADD:
|
11637
|
-
val2 = valStack.pop();
|
11638
|
-
val1 = valStack.pop();
|
11639
|
-
await this.eval_op_sort_add(resVal, val1, val2);
|
11640
|
-
break;
|
11641
|
-
case ExpressionInterface.EXP_OP_SORT_RESET:
|
11642
|
-
val1 = valStack.pop();
|
11643
|
-
await this.eval_op_sort_reset(resVal, val1);
|
11644
|
-
break;
|
11645
11617
|
case ExpressionInterface.EXP_OP_TSK_INSTANCE:
|
11646
11618
|
val1 = valStack.pop();
|
11647
11619
|
this.eval_op_tsk_instance(resVal, val1);
|
@@ -12978,6 +12950,23 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
12978
12950
|
resVal.StrVal = fld.VarDisplayName;
|
12979
12951
|
}
|
12980
12952
|
}
|
12953
|
+
async eval_op_controlItemRefresh(val1, val2, resVal) {
|
12954
|
+
let success = false;
|
12955
|
+
let parent = val2.MgNumVal.NUM_2_LONG();
|
12956
|
+
resVal.Attr = StorageAttribute.BOOLEAN;
|
12957
|
+
if ((parent >= 0 && parent < (this.ExpTask.getTaskDepth(false))) || parent === ExpressionEvaluator.TRIGGER_TASK) {
|
12958
|
+
let tsk = super.GetContextTask(parent);
|
12959
|
+
if (tsk != null && tsk.getForm() != null) {
|
12960
|
+
let control = tsk.getForm().GetCtrl(val1.StrVal);
|
12961
|
+
if (control != null && control.isChoiceControl() && control.isDataCtrl()) {
|
12962
|
+
let command = CommandFactory.CreateControlItemsRefreshCommand(tsk.getTaskTag(), control);
|
12963
|
+
await tsk.DataviewManager.CurrentDataviewManager.Execute(command);
|
12964
|
+
success = true;
|
12965
|
+
}
|
12966
|
+
}
|
12967
|
+
}
|
12968
|
+
resVal.BoolVal = success;
|
12969
|
+
}
|
12981
12970
|
eval_op_VarControlID(resVal, val1) {
|
12982
12971
|
let ret = 0;
|
12983
12972
|
if (val1.MgNumVal !== null) {
|
@@ -13263,12 +13252,6 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
13263
13252
|
await fld.setValueAndStartRecompute(bufptr, val.IsNull, true, setRecordUpdated, false);
|
13264
13253
|
await fld.updateDisplay();
|
13265
13254
|
}
|
13266
|
-
async eval_op_rollback(resVal) {
|
13267
|
-
let task = this.ExpTask.GetContextTask() || this.ExpTask;
|
13268
|
-
await AccessHelper.eventsManager.handleInternalEventWithTask(task, InternalInterface.MG_ACT_ROLLBACK);
|
13269
|
-
resVal.Attr = StorageAttribute.BOOLEAN;
|
13270
|
-
resVal.BoolVal = true;
|
13271
|
-
}
|
13272
13255
|
eval_op_like(source, maskOrg, resVal) {
|
13273
13256
|
let i;
|
13274
13257
|
let j;
|
@@ -13825,54 +13808,6 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
13825
13808
|
resultStr.Replace('\\@', '@');
|
13826
13809
|
resVal.StrVal = resultStr.ToString();
|
13827
13810
|
}
|
13828
|
-
async eval_op_range_add(resVal, Exp_params) {
|
13829
|
-
resVal.Attr = StorageAttribute.BOOLEAN;
|
13830
|
-
resVal.BoolVal = await this.add_rt_ranges(Exp_params, false);
|
13831
|
-
}
|
13832
|
-
async eval_op_range_reset(resVal, parent) {
|
13833
|
-
resVal.Attr = StorageAttribute.BOOLEAN;
|
13834
|
-
let iParent = parent.MgNumVal.NUM_2_LONG();
|
13835
|
-
if ((iParent >= 0 && iParent < (this.ExpTask.getTaskDepth(false))) || iParent === ExpressionEvaluator.TRIGGER_TASK) {
|
13836
|
-
let task = super.GetContextTask(iParent);
|
13837
|
-
if (task !== null) {
|
13838
|
-
let command = CommandFactory.CreateDataViewCommand(task.getTaskTag(), DataViewCommandType.ResetUserRange);
|
13839
|
-
await task.DataviewManager.Execute(command);
|
13840
|
-
resVal.BoolVal = true;
|
13841
|
-
}
|
13842
|
-
}
|
13843
|
-
}
|
13844
|
-
async eval_op_locate_add(resVal, Exp_params) {
|
13845
|
-
resVal.Attr = StorageAttribute.BOOLEAN;
|
13846
|
-
resVal.BoolVal = await this.add_rt_ranges(Exp_params, true);
|
13847
|
-
}
|
13848
|
-
async eval_op_locate_reset(resVal, parent) {
|
13849
|
-
resVal.Attr = StorageAttribute.BOOLEAN;
|
13850
|
-
let iParent = parent.MgNumVal.NUM_2_LONG();
|
13851
|
-
if ((iParent >= 0 && iParent < (this.ExpTask.getTaskDepth(false))) || iParent === ExpressionEvaluator.TRIGGER_TASK) {
|
13852
|
-
let task = super.GetContextTask(iParent);
|
13853
|
-
if (task !== null) {
|
13854
|
-
let command = CommandFactory.CreateDataViewCommand(task.getTaskTag(), DataViewCommandType.ResetUserLocate);
|
13855
|
-
await task.DataviewManager.Execute(command);
|
13856
|
-
resVal.BoolVal = true;
|
13857
|
-
}
|
13858
|
-
}
|
13859
|
-
}
|
13860
|
-
async eval_op_sort_add(resVal, varnum, dir) {
|
13861
|
-
resVal.Attr = StorageAttribute.BOOLEAN;
|
13862
|
-
resVal.BoolVal = await this.add_sort(varnum, dir);
|
13863
|
-
}
|
13864
|
-
async eval_op_sort_reset(resVal, parent) {
|
13865
|
-
resVal.Attr = StorageAttribute.BOOLEAN;
|
13866
|
-
let iParent = parent.MgNumVal.NUM_2_LONG();
|
13867
|
-
if ((iParent >= 0 && iParent < (this.ExpTask.getTaskDepth(false))) || iParent === ExpressionEvaluator.TRIGGER_TASK) {
|
13868
|
-
let task = super.GetContextTask(iParent);
|
13869
|
-
if (task !== null) {
|
13870
|
-
let command = CommandFactory.CreateDataViewCommand(task.getTaskTag(), DataViewCommandType.ResetUserSort);
|
13871
|
-
await task.DataviewManager.Execute(command);
|
13872
|
-
resVal.BoolVal = true;
|
13873
|
-
}
|
13874
|
-
}
|
13875
|
-
}
|
13876
13811
|
eval_op_tsk_instance(resVal, Parent) {
|
13877
13812
|
let tag = 0;
|
13878
13813
|
let iParent = Parent.MgNumVal.NUM_2_LONG();
|
@@ -13886,84 +13821,6 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
13886
13821
|
resVal.MgNumVal = new NUM_TYPE();
|
13887
13822
|
resVal.MgNumVal.NUM_4_LONG(tag);
|
13888
13823
|
}
|
13889
|
-
async add_sort(varnum, dir) {
|
13890
|
-
if (varnum.MgNumVal === null)
|
13891
|
-
return false;
|
13892
|
-
let itm = varnum.MgNumVal.NUM_2_LONG();
|
13893
|
-
if (itm === 0)
|
13894
|
-
return false;
|
13895
|
-
let fld = this.GetFieldOfContextTask(itm);
|
13896
|
-
if (fld === null)
|
13897
|
-
return false;
|
13898
|
-
let task = fld.getTask();
|
13899
|
-
let vee_idx = fld.getId() + 1;
|
13900
|
-
let expr_64 = new Sort();
|
13901
|
-
expr_64.fldIdx = vee_idx;
|
13902
|
-
expr_64.dir = dir.BoolVal;
|
13903
|
-
let sort = expr_64;
|
13904
|
-
let command = CommandFactory.CreateAddUserSortDataviewCommand(task.getTaskTag(), sort);
|
13905
|
-
await task.DataviewManager.Execute(command);
|
13906
|
-
return true;
|
13907
|
-
}
|
13908
|
-
async add_rt_ranges(Exp_params, locate) {
|
13909
|
-
let varnum = Exp_params[0];
|
13910
|
-
let min = Exp_params[1];
|
13911
|
-
if (varnum.MgNumVal === null)
|
13912
|
-
return false;
|
13913
|
-
let itm = varnum.MgNumVal.NUM_2_LONG();
|
13914
|
-
if (itm === 0)
|
13915
|
-
return false;
|
13916
|
-
let fld = this.GetFieldOfContextTask(itm);
|
13917
|
-
if (fld === null)
|
13918
|
-
return false;
|
13919
|
-
let task = fld.getTask();
|
13920
|
-
let vee_idx = fld.getId() + 1;
|
13921
|
-
let expr_78 = new UserRange();
|
13922
|
-
expr_78.veeIdx = vee_idx;
|
13923
|
-
let rng = expr_78;
|
13924
|
-
if (min.IsNull)
|
13925
|
-
rng.nullMin = true;
|
13926
|
-
if (!rng.nullMin && (min.Attr === StorageAttribute.ALPHA || min.Attr === StorageAttribute.UNICODE) && min.StrVal.length === 0)
|
13927
|
-
rng.discardMin = true;
|
13928
|
-
else {
|
13929
|
-
if (!rng.nullMin) {
|
13930
|
-
if (!StorageAttributeCheck.isTheSameType(fld.getType(), min.Attr))
|
13931
|
-
return false;
|
13932
|
-
if (StorageAttributeCheck.StorageFldAlphaUnicodeOrBlob(fld.getType(), min.Attr))
|
13933
|
-
this.ConvertExpVal(min, fld.getType());
|
13934
|
-
rng.min = min.ToMgVal();
|
13935
|
-
}
|
13936
|
-
}
|
13937
|
-
if (Exp_params.length === 3) {
|
13938
|
-
let max = Exp_params[2];
|
13939
|
-
if (max.IsNull)
|
13940
|
-
rng.nullMax = true;
|
13941
|
-
if (!rng.nullMax && (max.Attr === StorageAttribute.ALPHA || max.Attr === StorageAttribute.UNICODE) && max.StrVal.length === 0)
|
13942
|
-
rng.discardMax = true;
|
13943
|
-
else {
|
13944
|
-
if (!rng.nullMax) {
|
13945
|
-
if (!StorageAttributeCheck.isTheSameType(fld.getType(), max.Attr))
|
13946
|
-
return false;
|
13947
|
-
if (StorageAttributeCheck.StorageFldAlphaUnicodeOrBlob(fld.getType(), max.Attr))
|
13948
|
-
this.ConvertExpVal(max, fld.getType());
|
13949
|
-
rng.max = max.ToMgVal();
|
13950
|
-
}
|
13951
|
-
}
|
13952
|
-
}
|
13953
|
-
else
|
13954
|
-
rng.discardMax = true;
|
13955
|
-
if (!rng.discardMin || !rng.discardMax) {
|
13956
|
-
if (locate) {
|
13957
|
-
let command = CommandFactory.CreateAddUserLocateDataviewCommand(task.getTaskTag(), rng);
|
13958
|
-
await task.DataviewManager.Execute(command);
|
13959
|
-
}
|
13960
|
-
else {
|
13961
|
-
let command2 = CommandFactory.CreateAddUserRangeDataviewCommand(task.getTaskTag(), rng);
|
13962
|
-
await task.DataviewManager.Execute(command2);
|
13963
|
-
}
|
13964
|
-
}
|
13965
|
-
return true;
|
13966
|
-
}
|
13967
13824
|
eval_op_getParam(resVal, name) {
|
13968
13825
|
Debug.Assert(!name.IsNull && name.StrVal !== null);
|
13969
13826
|
let expVal = GlobalParams.Instance.get(name.StrVal);
|
@@ -19146,6 +19003,13 @@ class DataviewManager extends DataviewManagerBase {
|
|
19146
19003
|
}
|
19147
19004
|
}
|
19148
19005
|
|
19006
|
+
class Sort {
|
19007
|
+
constructor() {
|
19008
|
+
this.fldIdx = 0;
|
19009
|
+
this.dir = false;
|
19010
|
+
}
|
19011
|
+
}
|
19012
|
+
|
19149
19013
|
class SortCollection {
|
19150
19014
|
constructor() {
|
19151
19015
|
this._sortTab = null;
|
@@ -19374,7 +19238,11 @@ class MgForm extends MgFormBase {
|
|
19374
19238
|
this.GetDataview().setTopRecIdxModified(true);
|
19375
19239
|
try {
|
19376
19240
|
this._suffixDone = false;
|
19377
|
-
|
19241
|
+
let newDisplayLine = this.GetDataview().getCurrRecIdx() + size;
|
19242
|
+
if (unit === Constants.MOVE_UNIT_PAGE && this.isLineMode())
|
19243
|
+
if (newDisplayLine > this.GetDataview().getSize() - 1)
|
19244
|
+
visibleLine -= newDisplayLine - (this.GetDataview().getSize() - 1);
|
19245
|
+
await this.setCurrRowByDisplayLine(newDisplayLine, true, false);
|
19378
19246
|
this.GetDataview().setTopRecIdxModified(false);
|
19379
19247
|
await this.RefreshDisplay(Constants.TASK_REFRESH_FORM);
|
19380
19248
|
}
|
@@ -29542,7 +29410,7 @@ class CommandsTable {
|
|
29542
29410
|
}
|
29543
29411
|
}
|
29544
29412
|
|
29545
|
-
let CurrentClientVersion = '4.1000.0-dev4100.
|
29413
|
+
let CurrentClientVersion = '4.1000.0-dev4100.91';
|
29546
29414
|
|
29547
29415
|
class ClientManager {
|
29548
29416
|
constructor() {
|
@@ -29973,13 +29841,6 @@ class MagicBridge {
|
|
29973
29841
|
}
|
29974
29842
|
}
|
29975
29843
|
|
29976
|
-
class ControlItemsRefreshCommand extends DataviewCommand {
|
29977
|
-
constructor() {
|
29978
|
-
super();
|
29979
|
-
this.Control = null;
|
29980
|
-
}
|
29981
|
-
}
|
29982
|
-
|
29983
29844
|
class DataViewOutputCommand extends DataviewCommand {
|
29984
29845
|
constructor(OutputCommandType) {
|
29985
29846
|
super();
|