@magic-xpa/engine 4.1000.0-dev4100.6 → 4.1000.0-dev4100.64
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/ExpressionEvaluator.mjs +23 -1
- package/esm2020/src/gui/MgForm.mjs +6 -2
- package/fesm2015/magic-xpa-engine.mjs +47 -9
- package/fesm2015/magic-xpa-engine.mjs.map +1 -1
- package/fesm2020/magic-xpa-engine.mjs +42 -9
- 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 -0
@@ -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;
|
@@ -10850,6 +10864,11 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
10850
10864
|
this.eval_op_VarDisplayName(resVal, val1);
|
10851
10865
|
expStrTracker.resetNullResult();
|
10852
10866
|
break;
|
10867
|
+
case ExpressionInterface.EXP_OP_CONTROL_ITEMS_REFRESH:
|
10868
|
+
val2 = valStack.pop();
|
10869
|
+
val1 = valStack.pop();
|
10870
|
+
await this.eval_op_controlItemRefresh(val1, val2, resVal);
|
10871
|
+
break;
|
10853
10872
|
case ExpressionInterface.EXP_OP_VARCONTROLID:
|
10854
10873
|
val1 = valStack.pop();
|
10855
10874
|
this.eval_op_VarControlID(resVal, val1);
|
@@ -12978,6 +12997,23 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
|
|
12978
12997
|
resVal.StrVal = fld.VarDisplayName;
|
12979
12998
|
}
|
12980
12999
|
}
|
13000
|
+
async eval_op_controlItemRefresh(val1, val2, resVal) {
|
13001
|
+
let success = false;
|
13002
|
+
let parent = val2.MgNumVal.NUM_2_LONG();
|
13003
|
+
resVal.Attr = StorageAttribute.BOOLEAN;
|
13004
|
+
if ((parent >= 0 && parent < (this.ExpTask.getTaskDepth(false))) || parent === ExpressionEvaluator.TRIGGER_TASK) {
|
13005
|
+
let tsk = super.GetContextTask(parent);
|
13006
|
+
if (tsk != null && tsk.getForm() != null) {
|
13007
|
+
let control = tsk.getForm().GetCtrl(val1.StrVal);
|
13008
|
+
if (control != null && control.isChoiceControl() && control.isDataCtrl()) {
|
13009
|
+
let command = CommandFactory.CreateControlItemsRefreshCommand(tsk.getTaskTag(), control);
|
13010
|
+
await tsk.DataviewManager.CurrentDataviewManager.Execute(command);
|
13011
|
+
success = true;
|
13012
|
+
}
|
13013
|
+
}
|
13014
|
+
}
|
13015
|
+
resVal.BoolVal = success;
|
13016
|
+
}
|
12981
13017
|
eval_op_VarControlID(resVal, val1) {
|
12982
13018
|
let ret = 0;
|
12983
13019
|
if (val1.MgNumVal !== null) {
|
@@ -19374,7 +19410,11 @@ class MgForm extends MgFormBase {
|
|
19374
19410
|
this.GetDataview().setTopRecIdxModified(true);
|
19375
19411
|
try {
|
19376
19412
|
this._suffixDone = false;
|
19377
|
-
|
19413
|
+
let newDisplayLine = this.GetDataview().getCurrRecIdx() + size;
|
19414
|
+
if (unit === Constants.MOVE_UNIT_PAGE && this.isLineMode())
|
19415
|
+
if (newDisplayLine > this.GetDataview().getSize() - 1)
|
19416
|
+
visibleLine -= newDisplayLine - (this.GetDataview().getSize() - 1);
|
19417
|
+
await this.setCurrRowByDisplayLine(newDisplayLine, true, false);
|
19378
19418
|
this.GetDataview().setTopRecIdxModified(false);
|
19379
19419
|
await this.RefreshDisplay(Constants.TASK_REFRESH_FORM);
|
19380
19420
|
}
|
@@ -29542,7 +29582,7 @@ class CommandsTable {
|
|
29542
29582
|
}
|
29543
29583
|
}
|
29544
29584
|
|
29545
|
-
let CurrentClientVersion = '4.1000.0-dev4100.
|
29585
|
+
let CurrentClientVersion = '4.1000.0-dev4100.64';
|
29546
29586
|
|
29547
29587
|
class ClientManager {
|
29548
29588
|
constructor() {
|
@@ -29973,13 +30013,6 @@ class MagicBridge {
|
|
29973
30013
|
}
|
29974
30014
|
}
|
29975
30015
|
|
29976
|
-
class ControlItemsRefreshCommand extends DataviewCommand {
|
29977
|
-
constructor() {
|
29978
|
-
super();
|
29979
|
-
this.Control = null;
|
29980
|
-
}
|
29981
|
-
}
|
29982
|
-
|
29983
30016
|
class DataViewOutputCommand extends DataviewCommand {
|
29984
30017
|
constructor(OutputCommandType) {
|
29985
30018
|
super();
|