@magic-xpa/engine 4.1000.0-dev4100.3 → 4.1000.0-dev4100.32

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.
@@ -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
+ 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) {
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) {
@@ -29542,7 +29578,7 @@ class CommandsTable {
29542
29578
  }
29543
29579
  }
29544
29580
 
29545
- let CurrentClientVersion = '4.1000.0-dev4100.3';
29581
+ let CurrentClientVersion = '4.1000.0-dev4100.32';
29546
29582
 
29547
29583
  class ClientManager {
29548
29584
  constructor() {
@@ -29973,13 +30009,6 @@ class MagicBridge {
29973
30009
  }
29974
30010
  }
29975
30011
 
29976
- class ControlItemsRefreshCommand extends DataviewCommand {
29977
- constructor() {
29978
- super();
29979
- this.Control = null;
29980
- }
29981
- }
29982
-
29983
30012
  class DataViewOutputCommand extends DataviewCommand {
29984
30013
  constructor(OutputCommandType) {
29985
30014
  super();