@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.
@@ -8095,6 +8095,13 @@ class SelectProgramCommand extends ExecOperCommand {
8095
8095
  }
8096
8096
  }
8097
8097
 
8098
+ class ControlItemsRefreshCommand extends DataviewCommand {
8099
+ constructor() {
8100
+ super();
8101
+ this.Control = null;
8102
+ }
8103
+ }
8104
+
8098
8105
  class CommandFactory {
8099
8106
  static CreateEventCommand(taskTag, magicEvent) {
8100
8107
  let eventCommand = new EventCommand(magicEvent);
@@ -8113,6 +8120,13 @@ class CommandFactory {
8113
8120
  dataviewCommand.TaskTag = taskId;
8114
8121
  return dataviewCommand;
8115
8122
  }
8123
+ static CreateControlItemsRefreshCommand(taskId, control) {
8124
+ let command = new ControlItemsRefreshCommand();
8125
+ command.CommandType = DataViewCommandType.ControlItemsRefresh;
8126
+ command.TaskTag = taskId;
8127
+ command.Control = control;
8128
+ return command;
8129
+ }
8116
8130
  static CreateAddUserRangeDataviewCommand(taskId, userRange) {
8117
8131
  let addUserRangeDataviewCommand = new AddUserRangeDataviewCommand();
8118
8132
  addUserRangeDataviewCommand.TaskTag = taskId;
@@ -11090,6 +11104,11 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
11090
11104
  this.eval_op_VarDisplayName(resVal, val1);
11091
11105
  expStrTracker.resetNullResult();
11092
11106
  break;
11107
+ case ExpressionInterface.EXP_OP_CONTROL_ITEMS_REFRESH:
11108
+ val2 = valStack.pop();
11109
+ val1 = valStack.pop();
11110
+ yield this.eval_op_controlItemRefresh(val1, val2, resVal);
11111
+ break;
11093
11112
  case ExpressionInterface.EXP_OP_VARCONTROLID:
11094
11113
  val1 = valStack.pop();
11095
11114
  this.eval_op_VarControlID(resVal, val1);
@@ -13234,6 +13253,28 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
13234
13253
  resVal.StrVal = fld.VarDisplayName;
13235
13254
  }
13236
13255
  }
13256
+ eval_op_controlItemRefresh(val1, val2, resVal) {
13257
+ const _super = Object.create(null, {
13258
+ GetContextTask: { get: () => super.GetContextTask }
13259
+ });
13260
+ return __awaiter(this, void 0, void 0, function* () {
13261
+ let success = false;
13262
+ let parent = val2.MgNumVal.NUM_2_LONG();
13263
+ resVal.Attr = StorageAttribute.BOOLEAN;
13264
+ if ((parent >= 0 && parent < (this.ExpTask.getTaskDepth(false))) || parent === ExpressionEvaluator.TRIGGER_TASK) {
13265
+ let tsk = _super.GetContextTask.call(this, parent);
13266
+ if (tsk != null && tsk.getForm() != null) {
13267
+ let control = tsk.getForm().GetCtrl(val1.StrVal);
13268
+ if (control != null && control.isChoiceControl() && control.isDataCtrl()) {
13269
+ let command = CommandFactory.CreateControlItemsRefreshCommand(tsk.getTaskTag(), control);
13270
+ yield tsk.DataviewManager.CurrentDataviewManager.Execute(command);
13271
+ success = true;
13272
+ }
13273
+ }
13274
+ }
13275
+ resVal.BoolVal = success;
13276
+ });
13277
+ }
13237
13278
  eval_op_VarControlID(resVal, val1) {
13238
13279
  let ret = 0;
13239
13280
  if (val1.MgNumVal !== null) {
@@ -19830,7 +19871,11 @@ class MgForm extends MgFormBase {
19830
19871
  this.GetDataview().setTopRecIdxModified(true);
19831
19872
  try {
19832
19873
  this._suffixDone = false;
19833
- yield this.setCurrRowByDisplayLine(this.GetDataview().getCurrRecIdx() + size, true, false);
19874
+ let newDisplayLine = this.GetDataview().getCurrRecIdx() + size;
19875
+ if (unit === Constants.MOVE_UNIT_PAGE && this.isLineMode())
19876
+ if (newDisplayLine > this.GetDataview().getSize() - 1)
19877
+ visibleLine -= newDisplayLine - (this.GetDataview().getSize() - 1);
19878
+ yield this.setCurrRowByDisplayLine(newDisplayLine, true, false);
19834
19879
  this.GetDataview().setTopRecIdxModified(false);
19835
19880
  yield this.RefreshDisplay(Constants.TASK_REFRESH_FORM);
19836
19881
  }
@@ -30387,7 +30432,7 @@ class CommandsTable {
30387
30432
  }
30388
30433
  }
30389
30434
 
30390
- let CurrentClientVersion = '4.1000.0-dev4100.6';
30435
+ let CurrentClientVersion = '4.1000.0-dev4100.64';
30391
30436
 
30392
30437
  class ClientManager {
30393
30438
  constructor() {
@@ -30828,13 +30873,6 @@ class MagicBridge {
30828
30873
  }
30829
30874
  }
30830
30875
 
30831
- class ControlItemsRefreshCommand extends DataviewCommand {
30832
- constructor() {
30833
- super();
30834
- this.Control = null;
30835
- }
30836
- }
30837
-
30838
30876
  class DataViewOutputCommand extends DataviewCommand {
30839
30877
  constructor(OutputCommandType) {
30840
30878
  super();