@magic-xpa/engine 4.1300.0-dev4130.116 → 4.1300.0-dev4130.120

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.
@@ -1,5 +1,5 @@
1
1
  import { StringBuilder, Int32, NString, ApplicationException, NNumber, List, Debug, Char, RefParam, NumberStyles, HashUtils, DateTime, Dictionary, Stack, NChar, isNullOrUndefined, WebException, Thread, Encoding, Exception, isUndefined, Hashtable, NotImplementedException, Array_Enumerator, ISO_8859_1_Encoding, Int64 } from '@magic-xpa/mscorelib';
2
- import { XMLConstants, StorageAttribute, ViewRefreshMode, InternalInterface, Logger, StorageAttributeCheck, StrUtil, SubformType, TableBehaviour, MgControlType, ScrollBarThumbType, ForceExit, XmlParser, Misc, Base64, Priority, SyncExecutionHelper, Queue, Constants, DateTimeUtils, Logger_LogLevels, Logger_MessageDirection, MsgInterface, RequestInfo, OSEnvironment, JSON_Utils, UtilDateJpn, UtilStrByteMode, PICInterface, WindowType, BrkScope, RaiseAt, CtrlButtonTypeGui } from '@magic-xpa/utils';
2
+ import { XMLConstants, StorageAttribute, ViewRefreshMode, InternalInterface, Logger, StorageAttributeCheck, StrUtil, SubformType, TableBehaviour, MgControlType, ScrollBarThumbType, ForceExit, XmlParser, Misc, Base64, Priority, SyncExecutionHelper, Queue, Constants, DateTimeUtils, Logger_LogLevels, Logger_MessageDirection, MsgInterface, RequestInfo, OSEnvironment, JSON_Utils, UtilDateJpn, UtilStrByteMode, PICInterface, SubscriberClient, WindowType, BrkScope, RaiseAt, CtrlButtonTypeGui } from '@magic-xpa/utils';
3
3
  import { RecordUtils, GuiFieldBase, ExpVal, BlobType, FieldDef, GuiTaskBase, MgControlBase, PropInterface, GuiDataCollection, CommandType, Commands, HtmlProperties, ControlTable, Modifiers, KeyboardItem, TaskDefinitionIdTableSaxHandler, DisplayConvertor, VectorType, PIC, MgTimer, GuiConstants, RuntimeContextBase, UsernamePasswordCredentials, Styles, Manager, NUM_TYPE, GuiExpressionEvaluator, ExpressionInterface, DataModificationTypes, GuiDataViewBase, ObjectReferencesCollection, EMPTY_DCREF, ObjectReferenceBase, PropTable, FieldsTable as FieldsTable$1, DcValuesBuilderBase, MgFormBase, GuiEnvironment, TaskDefinitionId, Events, Helps, FocusManager, EventsProcessor, UIBridge } from '@magic-xpa/gui';
4
4
  import { HttpHeaders, HttpErrorResponse } from '@angular/common/http';
5
5
  import { timer, Subject } from 'rxjs';
@@ -9751,6 +9751,10 @@ class ExpressionDict {
9751
9751
  null,
9752
9752
  null,
9753
9753
  new ExpDesc('NO', 0, 2, 2, 'A', false), /* 716- Hash */
9754
+ null,
9755
+ null,
9756
+ new ExpDesc('U', 0, -1, -1, 'B', false), /* 719- Subscribe */
9757
+ new ExpDesc('U', 0, -1, -1, 'B', false), /* 720- Unsubscribe */
9754
9758
  ];
9755
9759
  }
9756
9760
 
@@ -13824,6 +13828,7 @@ class CookieService {
13824
13828
  }
13825
13829
  }
13826
13830
 
13831
+ //import { SubscriberClient } from "@magic-xpa/utils"
13827
13832
  class ExpressionEvaluator extends GuiExpressionEvaluator {
13828
13833
  static ASTERISK_CHR = String.fromCharCode(1);
13829
13834
  static QUESTION_CHR = String.fromCharCode(2);
@@ -15464,6 +15469,26 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
15464
15469
  this.eval_op_Hash(val1, val2, resVal);
15465
15470
  expStrTracker.resetNullResult();
15466
15471
  break;
15472
+ case ExpressionInterface.EXP_OP_SUBSCRIBE:
15473
+ nArgs = valStack.pop();
15474
+ if (nArgs > 0) {
15475
+ // get the parameters
15476
+ Exp_params = new Array(nArgs);
15477
+ for (j = 0; j < nArgs; j++)
15478
+ Exp_params[nArgs - 1 - j] = valStack.pop();
15479
+ this.eval_op_Subscribe(Exp_params, resVal);
15480
+ }
15481
+ break;
15482
+ case ExpressionInterface.EXP_OP_UNSUBSCRIBE:
15483
+ nArgs = valStack.pop();
15484
+ if (nArgs > 0) {
15485
+ // get the parameters
15486
+ Exp_params = new Array(nArgs);
15487
+ for (j = 0; j < nArgs; j++)
15488
+ Exp_params[nArgs - 1 - j] = valStack.pop();
15489
+ this.eval_op_UnSubscribe(Exp_params, resVal);
15490
+ }
15491
+ break;
15467
15492
  default:
15468
15493
  return;
15469
15494
  }
@@ -18556,6 +18581,23 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
18556
18581
  }
18557
18582
  return CryptoJS.lib.WordArray.create(words, u8.length);
18558
18583
  }
18584
+ eval_op_Subscribe(val1, resVal) {
18585
+ resVal.Attr = StorageAttribute.BOOLEAN;
18586
+ resVal.BoolVal = false;
18587
+ let sc = SubscriberClient.getInstance();
18588
+ let topics = this.params2arguments(val1, 0, val1.length);
18589
+ sc.subscribeToTopics(topics);
18590
+ topics.forEach(topic => sc.onMessageForTopic(topic).subscribe(data => {
18591
+ console.log("Received message: " + data.message);
18592
+ }));
18593
+ }
18594
+ eval_op_UnSubscribe(val1, resVal) {
18595
+ resVal.Attr = StorageAttribute.BOOLEAN;
18596
+ resVal.BoolVal = false;
18597
+ let sc = SubscriberClient.getInstance();
18598
+ let topics = this.params2arguments(val1, 0, val1.length);
18599
+ sc.unsubscribeFromTopics(topics);
18600
+ }
18559
18601
  }
18560
18602
  /// <summary>
18561
18603
  /// This exception used when at least one of the operands is null
@@ -39642,7 +39684,7 @@ class CommandsTable {
39642
39684
  }
39643
39685
  }
39644
39686
 
39645
- let CurrentClientVersion = '4.1300.0-dev4130.116';
39687
+ let CurrentClientVersion = '4.1300.0-dev4130.120';
39646
39688
 
39647
39689
  // @dynamic
39648
39690
  class ClientManager {