@magic-xpa/gui 4.1000.0-dev4100.27 → 4.1000.0-dev4100.270

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.
@@ -25,8 +25,6 @@ class GuiMgForm extends ControlBase {
25
25
  }
26
26
 
27
27
  class Events {
28
- constructor() {
29
- }
30
28
  static OnFocus(ctrl, line, isProduceClick, onMultiMark) {
31
29
  Debug.Assert(Events.FocusEvent !== null);
32
30
  Events.FocusEvent(ctrl, line, isProduceClick, onMultiMark);
@@ -375,6 +373,8 @@ class Events {
375
373
  Events.CopyDataEvent(guiMgForm, copyData);
376
374
  }
377
375
  }
376
+ constructor() {
377
+ }
378
378
  }
379
379
  Events.NonParkableLastParkedCtrlEvent = null;
380
380
  Events.IsBatchRunningInMainContextEvent = null;
@@ -1153,8 +1153,6 @@ class GuiCommand {
1153
1153
  }
1154
1154
 
1155
1155
  class Commands {
1156
- constructor() {
1157
- }
1158
1156
  static SetResolveCallback(resolveCallback) {
1159
1157
  this.resolveCallback = resolveCallback;
1160
1158
  }
@@ -1317,6 +1315,8 @@ class Commands {
1317
1315
  static invoke() {
1318
1316
  GuiCommandQueue.getInstance().invoke();
1319
1317
  }
1318
+ constructor() {
1319
+ }
1320
1320
  }
1321
1321
  Commands.resolveCallback = null;
1322
1322
 
@@ -3270,6 +3270,12 @@ class ValidationDetailsBase {
3270
3270
  }
3271
3271
 
3272
3272
  class NUM_TYPE {
3273
+ set Data(value) {
3274
+ this._data = value;
3275
+ }
3276
+ get Data() {
3277
+ return this._data;
3278
+ }
3273
3279
  constructor(recordHexStrOrByteValOrDecStrOrNumFrom, offsetOrPic, lengthOrCompIdx) {
3274
3280
  this.COMMACHAR = ',';
3275
3281
  this.DECIMALCHAR = '.';
@@ -3297,12 +3303,6 @@ class NUM_TYPE {
3297
3303
  }
3298
3304
  this.constructor_5(recordHexStrOrByteValOrDecStrOrNumFrom);
3299
3305
  }
3300
- set Data(value) {
3301
- this._data = value;
3302
- }
3303
- get Data() {
3304
- return this._data;
3305
- }
3306
3306
  constructor_0() {
3307
3307
  this.initConst();
3308
3308
  this.NUM_ZERO();
@@ -5316,17 +5316,17 @@ HebrewDate.DOW_LEN = 5;
5316
5316
  HebrewDate._localDows = new Array(8);
5317
5317
 
5318
5318
  class DisplayConvertor {
5319
- constructor() {
5320
- this._environment = null;
5321
- this.DATECHAR = 0;
5322
- this._environment = GuiEnvironment.Environment;
5323
- }
5324
5319
  static get Instance() {
5325
5320
  if (DisplayConvertor._instance === null) {
5326
5321
  DisplayConvertor._instance = new DisplayConvertor();
5327
5322
  }
5328
5323
  return DisplayConvertor._instance;
5329
5324
  }
5325
+ constructor() {
5326
+ this._environment = null;
5327
+ this.DATECHAR = 0;
5328
+ this._environment = GuiEnvironment.Environment;
5329
+ }
5330
5330
  getNewDateBreakParams() {
5331
5331
  return new DateBreakParams();
5332
5332
  }
@@ -6090,10 +6090,33 @@ class DisplayConvertor {
6090
6090
  let time = new NUM_TYPE(dataStr).NUM_2_ULONG();
6091
6091
  let breakParams = new TimeBreakParams();
6092
6092
  DisplayConvertor.time_break(breakParams, time);
6093
- let nativeDt = new Date();
6094
- nativeDt.setHours(breakParams.hour);
6095
- nativeDt.setMinutes(breakParams.minute);
6096
- nativeDt.setSeconds(breakParams.second);
6093
+ let nativeDt = new Date(0);
6094
+ let maskStr = pic.getMask();
6095
+ let outVal = NString.ToCharArray(maskStr);
6096
+ let len = pic.getMaskSize();
6097
+ let outIdx = 0;
6098
+ while (len > 0) {
6099
+ switch (outVal[outIdx].charCodeAt(0)) {
6100
+ case (PICInterface.PIC_HH):
6101
+ nativeDt.setHours(breakParams.hour);
6102
+ outIdx += 2;
6103
+ len -= 2;
6104
+ break;
6105
+ case (PICInterface.PIC_MMT):
6106
+ nativeDt.setMinutes(breakParams.minute);
6107
+ outIdx += 2;
6108
+ len -= 2;
6109
+ break;
6110
+ case (PICInterface.PIC_SS):
6111
+ nativeDt.setSeconds(breakParams.second);
6112
+ outIdx += 2;
6113
+ len -= 2;
6114
+ break;
6115
+ default:
6116
+ outIdx++;
6117
+ len--;
6118
+ }
6119
+ }
6097
6120
  return nativeDt;
6098
6121
  }
6099
6122
  time_2_a_pic(AsciiStr, AsciiL, time, pic, time_pic_Z_edt, milliSeconds) {
@@ -7081,7 +7104,7 @@ class RecordUtils {
7081
7104
  case StorageAttribute.TIME:
7082
7105
  itemVal = !toBase64
7083
7106
  ? itemVal.substr(0, significantNumSize)
7084
- : Base64.encode(this.byteStreamToString(itemVal.substr(0, significantNumSize)), GuiEnvironment.Environment.GetEncoding());
7107
+ : Base64.encode(this.byteStreamToString(itemVal.substr(0, significantNumSize)));
7085
7108
  break;
7086
7109
  case StorageAttribute.ALPHA:
7087
7110
  case StorageAttribute.UNICODE:
@@ -7164,7 +7187,7 @@ class RecordUtils {
7164
7187
  itemVal = itemVal.substr(pos, (fldValLen) - (pos));
7165
7188
  itemVal = !toBase64
7166
7189
  ? StrUtil.stringToHexaDump(itemVal, 4)
7167
- : Base64.encode(itemVal, GuiEnvironment.Environment.GetEncoding());
7190
+ : Base64.encode(itemVal);
7168
7191
  pos = fldValLen;
7169
7192
  }
7170
7193
  else {
@@ -7173,7 +7196,7 @@ class RecordUtils {
7173
7196
  if (!toBase64)
7174
7197
  tmpBuf.Append(StrUtil.stringToHexaDump(itemVal.substr(pos, 0x7FFF), 4));
7175
7198
  else
7176
- tmpBuf.Append(Base64.encode(itemVal.substr(pos, 0x7FFF), GuiEnvironment.Environment.GetEncoding()));
7199
+ tmpBuf.Append(Base64.encode(itemVal.substr(pos, 0x7FFF)));
7177
7200
  tmpBuf.Append("0000");
7178
7201
  pos += 0x7FFF;
7179
7202
  }
@@ -8008,6 +8031,12 @@ class CellElement {
8008
8031
  }
8009
8032
 
8010
8033
  class FieldDef {
8034
+ set DbModifiable(value) {
8035
+ this._dbModifiable = value;
8036
+ }
8037
+ get DbModifiable() {
8038
+ return this._dbModifiable;
8039
+ }
8011
8040
  constructor(id) {
8012
8041
  this.DefaultValue = null;
8013
8042
  this.NullAllowed = false;
@@ -8031,12 +8060,6 @@ class FieldDef {
8031
8060
  this._id = id;
8032
8061
  this.VarDisplayName = NString.Empty;
8033
8062
  }
8034
- set DbModifiable(value) {
8035
- this._dbModifiable = value;
8036
- }
8037
- get DbModifiable() {
8038
- return this._dbModifiable;
8039
- }
8040
8063
  get PartOfDataview() {
8041
8064
  return this._partOfDataview;
8042
8065
  }
@@ -8756,6 +8779,9 @@ class CustomValidator {
8756
8779
  getErrMessage() { return this._errorMessage; }
8757
8780
  }
8758
8781
  class Property {
8782
+ get TaskDefinitionId() {
8783
+ return this._taskDefinitionId;
8784
+ }
8759
8785
  constructor(cId, cParentObj, parType, val) {
8760
8786
  this._id = Int32.MinValue;
8761
8787
  this._dataType = StorageAttribute.NONE;
@@ -8780,9 +8806,6 @@ class Property {
8780
8806
  else
8781
8807
  this.constructor_2(cId, cParentObj, parType, val);
8782
8808
  }
8783
- get TaskDefinitionId() {
8784
- return this._taskDefinitionId;
8785
- }
8786
8809
  constructor_0() {
8787
8810
  this._prevValues = new List();
8788
8811
  }
@@ -11041,6 +11064,15 @@ class FieldValidator {
11041
11064
  }
11042
11065
 
11043
11066
  class ValidationDetails extends ValidationDetailsBase {
11067
+ get ErrorMessage() {
11068
+ return this.errMessage;
11069
+ }
11070
+ set ErrorMessage(msg) {
11071
+ this.errMessage = msg;
11072
+ }
11073
+ get ValidationFailed() {
11074
+ return this._validationFailed;
11075
+ }
11044
11076
  constructor(oldvalueOrRangeStrOrVd, val, range, pic, control) {
11045
11077
  super();
11046
11078
  this._control = null;
@@ -11061,15 +11093,6 @@ class ValidationDetails extends ValidationDetailsBase {
11061
11093
  else if (arguments.length === 1 && (oldvalueOrRangeStrOrVd === null || oldvalueOrRangeStrOrVd instanceof ValidationDetails))
11062
11094
  this.constructor_2(oldvalueOrRangeStrOrVd);
11063
11095
  }
11064
- get ErrorMessage() {
11065
- return this.errMessage;
11066
- }
11067
- set ErrorMessage(msg) {
11068
- this.errMessage = msg;
11069
- }
11070
- get ValidationFailed() {
11071
- return this._validationFailed;
11072
- }
11073
11096
  constructor_0(oldvalue, val, range, pic, control) {
11074
11097
  this._picData = pic;
11075
11098
  this._oldvalue = oldvalue;
@@ -11286,6 +11309,9 @@ class ValidationDetails extends ValidationDetailsBase {
11286
11309
  const EMPTY_DCREF = -2;
11287
11310
  const NOT_FOUND = GuiConstants.DEFAULT_VALUE_INT;
11288
11311
  class DcValues {
11312
+ get HasReferences() {
11313
+ return this._refCount > 0;
11314
+ }
11289
11315
  constructor(empty) {
11290
11316
  this._id = 0;
11291
11317
  this._type = StorageAttribute.NONE;
@@ -11300,9 +11326,6 @@ class DcValues {
11300
11326
  }
11301
11327
  this._isNumericType = false;
11302
11328
  }
11303
- get HasReferences() {
11304
- return this._refCount > 0;
11305
- }
11306
11329
  GetAttr() {
11307
11330
  return this._type;
11308
11331
  }
@@ -11557,6 +11580,16 @@ class FocusManager {
11557
11580
  }
11558
11581
 
11559
11582
  class MgControlBase extends GuiControlPropertyAdapter {
11583
+ set Form(value) {
11584
+ this._form = value;
11585
+ this.GuiMgForm = value;
11586
+ }
11587
+ get Form() {
11588
+ return this._form;
11589
+ }
11590
+ get ControlIsn() {
11591
+ return this._controlIsn;
11592
+ }
11560
11593
  constructor(type, parentMgForm, parentControl) {
11561
11594
  super();
11562
11595
  this._ditIdx = 0;
@@ -11609,16 +11642,6 @@ class MgControlBase extends GuiControlPropertyAdapter {
11609
11642
  }
11610
11643
  this.constructor_1(type, parentMgForm, parentControl);
11611
11644
  }
11612
- set Form(value) {
11613
- this._form = value;
11614
- this.GuiMgForm = value;
11615
- }
11616
- get Form() {
11617
- return this._form;
11618
- }
11619
- get ControlIsn() {
11620
- return this._controlIsn;
11621
- }
11622
11645
  constructor_0() {
11623
11646
  this._linkedControls = new List();
11624
11647
  this.DataType = StorageAttribute.NONE;
@@ -13030,7 +13053,7 @@ class MgControlBase extends GuiControlPropertyAdapter {
13030
13053
  valueChanged = await this.refreshAndSetItemListByDataSource(line, valueChanged);
13031
13054
  if (!valueChanged)
13032
13055
  return;
13033
- this.setRadioChecked(this.Value);
13056
+ this.setRadioChecked(+this.Value);
13034
13057
  break;
13035
13058
  default:
13036
13059
  Events.WriteExceptionToLog(NString.Format("in Control.RefreshDisplayValue() unknown type: {0}", this.Type));
@@ -13121,30 +13144,17 @@ class MgControlBase extends GuiControlPropertyAdapter {
13121
13144
  await this.SetAndRefreshDisplayValue(currentLinkValue, this.IsNull);
13122
13145
  }
13123
13146
  }
13124
- async refreshAndSetItemsListForRadioButton(line, execComputeChoice) {
13125
- let displayList = await this.refreshDispRange(execComputeChoice);
13126
- let options = displayList.map((displayValue, counter) => {
13127
- let index = counter.toString();
13128
- return { index, displayValue };
13129
- });
13130
- Commands.addOperationWithLine(CommandType.SET_PROPERTY, this, line, HtmlProperties.ItemsList, options);
13131
- }
13132
13147
  async refreshAndSetItemsList(line, execComputeChoice) {
13133
13148
  if (execComputeChoice) {
13134
13149
  this.clearRange(line);
13135
13150
  }
13136
13151
  let optionsStrings = await this.refreshDispRange(execComputeChoice);
13137
- if (super.isSelectionCtrl() || super.isTabControl() || this.HasAutocomplete()) {
13152
+ if (super.isChoiceControl() || this.HasAutocomplete()) {
13138
13153
  let options = optionsStrings.map((displayValue, index) => {
13139
13154
  return { index, displayValue };
13140
13155
  });
13141
13156
  Commands.addOperationWithLine(CommandType.SET_PROPERTY, this, line, HtmlProperties.ItemsList, options);
13142
13157
  }
13143
- else {
13144
- if (super.isRadio()) {
13145
- await this.refreshAndSetItemsListForRadioButton(line, execComputeChoice);
13146
- }
13147
- }
13148
13158
  }
13149
13159
  async refreshDispRange(execComputeChoice) {
13150
13160
  let selectCmd = new Array(0);
@@ -13856,7 +13866,7 @@ class MgFormBase extends GuiFormPropertyAdapter {
13856
13866
  }
13857
13867
  }
13858
13868
  else {
13859
- items.AddRange(await mgControl.GetItemsRange());
13869
+ items.AddRange(await mgControl.GetDisplayRange());
13860
13870
  }
13861
13871
  return MgFormBase.ConvertArrayListToString(items, false);
13862
13872
  }
@@ -15359,6 +15369,9 @@ class ExpVal {
15359
15369
  class MagicHelp {
15360
15370
  }
15361
15371
  class InternalHelp extends MagicHelp {
15372
+ GetHelpType() {
15373
+ return HelpType.Internal;
15374
+ }
15362
15375
  constructor() {
15363
15376
  super();
15364
15377
  this.val = null;
@@ -15375,47 +15388,44 @@ class InternalHelp extends MagicHelp {
15375
15388
  this.TitleBar = 0;
15376
15389
  this.FontTableIndex = 0;
15377
15390
  }
15378
- GetHelpType() {
15379
- return HelpType.Internal;
15380
- }
15381
15391
  }
15382
15392
  class PromptpHelp extends MagicHelp {
15393
+ GetHelpType() {
15394
+ return HelpType.Prompt;
15395
+ }
15383
15396
  constructor() {
15384
15397
  super();
15385
15398
  this.PromptHelpText = null;
15386
15399
  }
15387
- GetHelpType() {
15388
- return HelpType.Prompt;
15389
- }
15390
15400
  }
15391
15401
  class ToolTipHelp extends MagicHelp {
15402
+ GetHelpType() {
15403
+ return HelpType.Tooltip;
15404
+ }
15392
15405
  constructor() {
15393
15406
  super();
15394
15407
  this.tooltipHelpText = null;
15395
15408
  }
15396
- GetHelpType() {
15397
- return HelpType.Tooltip;
15398
- }
15399
15409
  }
15400
15410
  class URLHelp extends MagicHelp {
15411
+ GetHelpType() {
15412
+ return HelpType.URL;
15413
+ }
15401
15414
  constructor() {
15402
15415
  super();
15403
15416
  this.urlHelpText = null;
15404
15417
  }
15405
- GetHelpType() {
15406
- return HelpType.URL;
15407
- }
15408
15418
  }
15409
15419
  class WindowsHelp extends MagicHelp {
15420
+ GetHelpType() {
15421
+ return HelpType.Windows;
15422
+ }
15410
15423
  constructor() {
15411
15424
  super();
15412
15425
  this.FilePath = null;
15413
15426
  this.HelpCommand = 0;
15414
15427
  this.HelpKey = null;
15415
15428
  }
15416
- GetHelpType() {
15417
- return HelpType.Windows;
15418
- }
15419
15429
  }
15420
15430
  class Helps {
15421
15431
  constructor() {
@@ -15595,6 +15605,21 @@ class GuiDataCollection {
15595
15605
  GuiDataCollection.MGDataTable = null;
15596
15606
 
15597
15607
  class GuiTaskBase {
15608
+ Init() {
15609
+ this.DataView.Init();
15610
+ }
15611
+ get RouterPath() {
15612
+ return this.routerPath;
15613
+ }
15614
+ get RouterParams() {
15615
+ return this.routeParams;
15616
+ }
15617
+ get InDefaultRouterOutlet() {
15618
+ return this.inDefaultRouterOutlet;
15619
+ }
15620
+ get IsBlockingBatch() {
15621
+ return !this._isMainPrg && this.isOpenWin() && !this._allowEvents && !this.IsInteractive;
15622
+ }
15598
15623
  constructor() {
15599
15624
  this._flowMonitor = null;
15600
15625
  this._keyboardMappingState = 0xFFFF0000;
@@ -15639,21 +15664,6 @@ class GuiTaskBase {
15639
15664
  this._nullArithmetic = Constants.NULL_ARITH_USE_DEF;
15640
15665
  this._propTab = new PropTable(this);
15641
15666
  }
15642
- Init() {
15643
- this.DataView.Init();
15644
- }
15645
- get RouterPath() {
15646
- return this.routerPath;
15647
- }
15648
- get RouterParams() {
15649
- return this.routeParams;
15650
- }
15651
- get InDefaultRouterOutlet() {
15652
- return this.inDefaultRouterOutlet;
15653
- }
15654
- get IsBlockingBatch() {
15655
- return !this._isMainPrg && this.isOpenWin() && !this._allowEvents && !this.IsInteractive;
15656
- }
15657
15667
  getTaskTag() {
15658
15668
  return this._taskTag;
15659
15669
  }