@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.
@@ -26,8 +26,6 @@ class GuiMgForm extends ControlBase {
26
26
  }
27
27
 
28
28
  class Events {
29
- constructor() {
30
- }
31
29
  static OnFocus(ctrl, line, isProduceClick, onMultiMark) {
32
30
  Debug.Assert(Events.FocusEvent !== null);
33
31
  Events.FocusEvent(ctrl, line, isProduceClick, onMultiMark);
@@ -376,6 +374,8 @@ class Events {
376
374
  Events.CopyDataEvent(guiMgForm, copyData);
377
375
  }
378
376
  }
377
+ constructor() {
378
+ }
379
379
  }
380
380
  Events.NonParkableLastParkedCtrlEvent = null;
381
381
  Events.IsBatchRunningInMainContextEvent = null;
@@ -1154,8 +1154,6 @@ class GuiCommand {
1154
1154
  }
1155
1155
 
1156
1156
  class Commands {
1157
- constructor() {
1158
- }
1159
1157
  static SetResolveCallback(resolveCallback) {
1160
1158
  this.resolveCallback = resolveCallback;
1161
1159
  }
@@ -1320,6 +1318,8 @@ class Commands {
1320
1318
  static invoke() {
1321
1319
  GuiCommandQueue.getInstance().invoke();
1322
1320
  }
1321
+ constructor() {
1322
+ }
1323
1323
  }
1324
1324
  Commands.resolveCallback = null;
1325
1325
 
@@ -3277,6 +3277,12 @@ class ValidationDetailsBase {
3277
3277
  }
3278
3278
 
3279
3279
  class NUM_TYPE {
3280
+ set Data(value) {
3281
+ this._data = value;
3282
+ }
3283
+ get Data() {
3284
+ return this._data;
3285
+ }
3280
3286
  constructor(recordHexStrOrByteValOrDecStrOrNumFrom, offsetOrPic, lengthOrCompIdx) {
3281
3287
  this.COMMACHAR = ',';
3282
3288
  this.DECIMALCHAR = '.';
@@ -3304,12 +3310,6 @@ class NUM_TYPE {
3304
3310
  }
3305
3311
  this.constructor_5(recordHexStrOrByteValOrDecStrOrNumFrom);
3306
3312
  }
3307
- set Data(value) {
3308
- this._data = value;
3309
- }
3310
- get Data() {
3311
- return this._data;
3312
- }
3313
3313
  constructor_0() {
3314
3314
  this.initConst();
3315
3315
  this.NUM_ZERO();
@@ -5323,17 +5323,17 @@ HebrewDate.DOW_LEN = 5;
5323
5323
  HebrewDate._localDows = new Array(8);
5324
5324
 
5325
5325
  class DisplayConvertor {
5326
- constructor() {
5327
- this._environment = null;
5328
- this.DATECHAR = 0;
5329
- this._environment = GuiEnvironment.Environment;
5330
- }
5331
5326
  static get Instance() {
5332
5327
  if (DisplayConvertor._instance === null) {
5333
5328
  DisplayConvertor._instance = new DisplayConvertor();
5334
5329
  }
5335
5330
  return DisplayConvertor._instance;
5336
5331
  }
5332
+ constructor() {
5333
+ this._environment = null;
5334
+ this.DATECHAR = 0;
5335
+ this._environment = GuiEnvironment.Environment;
5336
+ }
5337
5337
  getNewDateBreakParams() {
5338
5338
  return new DateBreakParams();
5339
5339
  }
@@ -6097,10 +6097,33 @@ class DisplayConvertor {
6097
6097
  let time = new NUM_TYPE(dataStr).NUM_2_ULONG();
6098
6098
  let breakParams = new TimeBreakParams();
6099
6099
  DisplayConvertor.time_break(breakParams, time);
6100
- let nativeDt = new Date();
6101
- nativeDt.setHours(breakParams.hour);
6102
- nativeDt.setMinutes(breakParams.minute);
6103
- nativeDt.setSeconds(breakParams.second);
6100
+ let nativeDt = new Date(0);
6101
+ let maskStr = pic.getMask();
6102
+ let outVal = NString.ToCharArray(maskStr);
6103
+ let len = pic.getMaskSize();
6104
+ let outIdx = 0;
6105
+ while (len > 0) {
6106
+ switch (outVal[outIdx].charCodeAt(0)) {
6107
+ case (PICInterface.PIC_HH):
6108
+ nativeDt.setHours(breakParams.hour);
6109
+ outIdx += 2;
6110
+ len -= 2;
6111
+ break;
6112
+ case (PICInterface.PIC_MMT):
6113
+ nativeDt.setMinutes(breakParams.minute);
6114
+ outIdx += 2;
6115
+ len -= 2;
6116
+ break;
6117
+ case (PICInterface.PIC_SS):
6118
+ nativeDt.setSeconds(breakParams.second);
6119
+ outIdx += 2;
6120
+ len -= 2;
6121
+ break;
6122
+ default:
6123
+ outIdx++;
6124
+ len--;
6125
+ }
6126
+ }
6104
6127
  return nativeDt;
6105
6128
  }
6106
6129
  time_2_a_pic(AsciiStr, AsciiL, time, pic, time_pic_Z_edt, milliSeconds) {
@@ -7088,7 +7111,7 @@ class RecordUtils {
7088
7111
  case StorageAttribute.TIME:
7089
7112
  itemVal = !toBase64
7090
7113
  ? itemVal.substr(0, significantNumSize)
7091
- : Base64.encode(this.byteStreamToString(itemVal.substr(0, significantNumSize)), GuiEnvironment.Environment.GetEncoding());
7114
+ : Base64.encode(this.byteStreamToString(itemVal.substr(0, significantNumSize)));
7092
7115
  break;
7093
7116
  case StorageAttribute.ALPHA:
7094
7117
  case StorageAttribute.UNICODE:
@@ -7171,7 +7194,7 @@ class RecordUtils {
7171
7194
  itemVal = itemVal.substr(pos, (fldValLen) - (pos));
7172
7195
  itemVal = !toBase64
7173
7196
  ? StrUtil.stringToHexaDump(itemVal, 4)
7174
- : Base64.encode(itemVal, GuiEnvironment.Environment.GetEncoding());
7197
+ : Base64.encode(itemVal);
7175
7198
  pos = fldValLen;
7176
7199
  }
7177
7200
  else {
@@ -7180,7 +7203,7 @@ class RecordUtils {
7180
7203
  if (!toBase64)
7181
7204
  tmpBuf.Append(StrUtil.stringToHexaDump(itemVal.substr(pos, 0x7FFF), 4));
7182
7205
  else
7183
- tmpBuf.Append(Base64.encode(itemVal.substr(pos, 0x7FFF), GuiEnvironment.Environment.GetEncoding()));
7206
+ tmpBuf.Append(Base64.encode(itemVal.substr(pos, 0x7FFF)));
7184
7207
  tmpBuf.Append("0000");
7185
7208
  pos += 0x7FFF;
7186
7209
  }
@@ -8015,6 +8038,12 @@ class CellElement {
8015
8038
  }
8016
8039
 
8017
8040
  class FieldDef {
8041
+ set DbModifiable(value) {
8042
+ this._dbModifiable = value;
8043
+ }
8044
+ get DbModifiable() {
8045
+ return this._dbModifiable;
8046
+ }
8018
8047
  constructor(id) {
8019
8048
  this.DefaultValue = null;
8020
8049
  this.NullAllowed = false;
@@ -8038,12 +8067,6 @@ class FieldDef {
8038
8067
  this._id = id;
8039
8068
  this.VarDisplayName = NString.Empty;
8040
8069
  }
8041
- set DbModifiable(value) {
8042
- this._dbModifiable = value;
8043
- }
8044
- get DbModifiable() {
8045
- return this._dbModifiable;
8046
- }
8047
8070
  get PartOfDataview() {
8048
8071
  return this._partOfDataview;
8049
8072
  }
@@ -8777,6 +8800,9 @@ class CustomValidator {
8777
8800
  getErrMessage() { return this._errorMessage; }
8778
8801
  }
8779
8802
  class Property {
8803
+ get TaskDefinitionId() {
8804
+ return this._taskDefinitionId;
8805
+ }
8780
8806
  constructor(cId, cParentObj, parType, val) {
8781
8807
  this._id = Int32.MinValue;
8782
8808
  this._dataType = StorageAttribute.NONE;
@@ -8801,9 +8827,6 @@ class Property {
8801
8827
  else
8802
8828
  this.constructor_2(cId, cParentObj, parType, val);
8803
8829
  }
8804
- get TaskDefinitionId() {
8805
- return this._taskDefinitionId;
8806
- }
8807
8830
  constructor_0() {
8808
8831
  this._prevValues = new List();
8809
8832
  }
@@ -11094,6 +11117,15 @@ class FieldValidator {
11094
11117
  }
11095
11118
 
11096
11119
  class ValidationDetails extends ValidationDetailsBase {
11120
+ get ErrorMessage() {
11121
+ return this.errMessage;
11122
+ }
11123
+ set ErrorMessage(msg) {
11124
+ this.errMessage = msg;
11125
+ }
11126
+ get ValidationFailed() {
11127
+ return this._validationFailed;
11128
+ }
11097
11129
  constructor(oldvalueOrRangeStrOrVd, val, range, pic, control) {
11098
11130
  super();
11099
11131
  this._control = null;
@@ -11114,15 +11146,6 @@ class ValidationDetails extends ValidationDetailsBase {
11114
11146
  else if (arguments.length === 1 && (oldvalueOrRangeStrOrVd === null || oldvalueOrRangeStrOrVd instanceof ValidationDetails))
11115
11147
  this.constructor_2(oldvalueOrRangeStrOrVd);
11116
11148
  }
11117
- get ErrorMessage() {
11118
- return this.errMessage;
11119
- }
11120
- set ErrorMessage(msg) {
11121
- this.errMessage = msg;
11122
- }
11123
- get ValidationFailed() {
11124
- return this._validationFailed;
11125
- }
11126
11149
  constructor_0(oldvalue, val, range, pic, control) {
11127
11150
  this._picData = pic;
11128
11151
  this._oldvalue = oldvalue;
@@ -11339,6 +11362,9 @@ class ValidationDetails extends ValidationDetailsBase {
11339
11362
  const EMPTY_DCREF = -2;
11340
11363
  const NOT_FOUND = GuiConstants.DEFAULT_VALUE_INT;
11341
11364
  class DcValues {
11365
+ get HasReferences() {
11366
+ return this._refCount > 0;
11367
+ }
11342
11368
  constructor(empty) {
11343
11369
  this._id = 0;
11344
11370
  this._type = StorageAttribute.NONE;
@@ -11353,9 +11379,6 @@ class DcValues {
11353
11379
  }
11354
11380
  this._isNumericType = false;
11355
11381
  }
11356
- get HasReferences() {
11357
- return this._refCount > 0;
11358
- }
11359
11382
  GetAttr() {
11360
11383
  return this._type;
11361
11384
  }
@@ -11616,6 +11639,16 @@ class FocusManager {
11616
11639
  }
11617
11640
 
11618
11641
  class MgControlBase extends GuiControlPropertyAdapter {
11642
+ set Form(value) {
11643
+ this._form = value;
11644
+ this.GuiMgForm = value;
11645
+ }
11646
+ get Form() {
11647
+ return this._form;
11648
+ }
11649
+ get ControlIsn() {
11650
+ return this._controlIsn;
11651
+ }
11619
11652
  constructor(type, parentMgForm, parentControl) {
11620
11653
  super();
11621
11654
  this._ditIdx = 0;
@@ -11668,16 +11701,6 @@ class MgControlBase extends GuiControlPropertyAdapter {
11668
11701
  }
11669
11702
  this.constructor_1(type, parentMgForm, parentControl);
11670
11703
  }
11671
- set Form(value) {
11672
- this._form = value;
11673
- this.GuiMgForm = value;
11674
- }
11675
- get Form() {
11676
- return this._form;
11677
- }
11678
- get ControlIsn() {
11679
- return this._controlIsn;
11680
- }
11681
11704
  constructor_0() {
11682
11705
  this._linkedControls = new List();
11683
11706
  this.DataType = StorageAttribute.NONE;
@@ -13152,7 +13175,7 @@ class MgControlBase extends GuiControlPropertyAdapter {
13152
13175
  valueChanged = yield this.refreshAndSetItemListByDataSource(line, valueChanged);
13153
13176
  if (!valueChanged)
13154
13177
  return;
13155
- this.setRadioChecked(this.Value);
13178
+ this.setRadioChecked(+this.Value);
13156
13179
  break;
13157
13180
  default:
13158
13181
  Events.WriteExceptionToLog(NString.Format("in Control.RefreshDisplayValue() unknown type: {0}", this.Type));
@@ -13255,38 +13278,21 @@ class MgControlBase extends GuiControlPropertyAdapter {
13255
13278
  }
13256
13279
  });
13257
13280
  }
13258
- refreshAndSetItemsListForRadioButton(line, execComputeChoice) {
13259
- return __awaiter(this, void 0, void 0, function* () {
13260
- let displayList = yield this.refreshDispRange(execComputeChoice);
13261
- let options = displayList.map((displayValue, counter) => {
13262
- let index = counter.toString();
13263
- return { index, displayValue };
13264
- });
13265
- Commands.addOperationWithLine(CommandType.SET_PROPERTY, this, line, HtmlProperties.ItemsList, options);
13266
- });
13267
- }
13268
13281
  refreshAndSetItemsList(line, execComputeChoice) {
13269
13282
  const _super = Object.create(null, {
13270
- isSelectionCtrl: { get: () => super.isSelectionCtrl },
13271
- isTabControl: { get: () => super.isTabControl },
13272
- isRadio: { get: () => super.isRadio }
13283
+ isChoiceControl: { get: () => super.isChoiceControl }
13273
13284
  });
13274
13285
  return __awaiter(this, void 0, void 0, function* () {
13275
13286
  if (execComputeChoice) {
13276
13287
  this.clearRange(line);
13277
13288
  }
13278
13289
  let optionsStrings = yield this.refreshDispRange(execComputeChoice);
13279
- if (_super.isSelectionCtrl.call(this) || _super.isTabControl.call(this) || this.HasAutocomplete()) {
13290
+ if (_super.isChoiceControl.call(this) || this.HasAutocomplete()) {
13280
13291
  let options = optionsStrings.map((displayValue, index) => {
13281
13292
  return { index, displayValue };
13282
13293
  });
13283
13294
  Commands.addOperationWithLine(CommandType.SET_PROPERTY, this, line, HtmlProperties.ItemsList, options);
13284
13295
  }
13285
- else {
13286
- if (_super.isRadio.call(this)) {
13287
- yield this.refreshAndSetItemsListForRadioButton(line, execComputeChoice);
13288
- }
13289
- }
13290
13296
  });
13291
13297
  }
13292
13298
  refreshDispRange(execComputeChoice) {
@@ -14025,7 +14031,7 @@ class MgFormBase extends GuiFormPropertyAdapter {
14025
14031
  }
14026
14032
  }
14027
14033
  else {
14028
- items.AddRange(yield mgControl.GetItemsRange());
14034
+ items.AddRange(yield mgControl.GetDisplayRange());
14029
14035
  }
14030
14036
  return MgFormBase.ConvertArrayListToString(items, false);
14031
14037
  }
@@ -15535,6 +15541,9 @@ class ExpVal {
15535
15541
  class MagicHelp {
15536
15542
  }
15537
15543
  class InternalHelp extends MagicHelp {
15544
+ GetHelpType() {
15545
+ return HelpType.Internal;
15546
+ }
15538
15547
  constructor() {
15539
15548
  super();
15540
15549
  this.val = null;
@@ -15551,47 +15560,44 @@ class InternalHelp extends MagicHelp {
15551
15560
  this.TitleBar = 0;
15552
15561
  this.FontTableIndex = 0;
15553
15562
  }
15554
- GetHelpType() {
15555
- return HelpType.Internal;
15556
- }
15557
15563
  }
15558
15564
  class PromptpHelp extends MagicHelp {
15565
+ GetHelpType() {
15566
+ return HelpType.Prompt;
15567
+ }
15559
15568
  constructor() {
15560
15569
  super();
15561
15570
  this.PromptHelpText = null;
15562
15571
  }
15563
- GetHelpType() {
15564
- return HelpType.Prompt;
15565
- }
15566
15572
  }
15567
15573
  class ToolTipHelp extends MagicHelp {
15574
+ GetHelpType() {
15575
+ return HelpType.Tooltip;
15576
+ }
15568
15577
  constructor() {
15569
15578
  super();
15570
15579
  this.tooltipHelpText = null;
15571
15580
  }
15572
- GetHelpType() {
15573
- return HelpType.Tooltip;
15574
- }
15575
15581
  }
15576
15582
  class URLHelp extends MagicHelp {
15583
+ GetHelpType() {
15584
+ return HelpType.URL;
15585
+ }
15577
15586
  constructor() {
15578
15587
  super();
15579
15588
  this.urlHelpText = null;
15580
15589
  }
15581
- GetHelpType() {
15582
- return HelpType.URL;
15583
- }
15584
15590
  }
15585
15591
  class WindowsHelp extends MagicHelp {
15592
+ GetHelpType() {
15593
+ return HelpType.Windows;
15594
+ }
15586
15595
  constructor() {
15587
15596
  super();
15588
15597
  this.FilePath = null;
15589
15598
  this.HelpCommand = 0;
15590
15599
  this.HelpKey = null;
15591
15600
  }
15592
- GetHelpType() {
15593
- return HelpType.Windows;
15594
- }
15595
15601
  }
15596
15602
  class Helps {
15597
15603
  constructor() {
@@ -15771,6 +15777,21 @@ class GuiDataCollection {
15771
15777
  GuiDataCollection.MGDataTable = null;
15772
15778
 
15773
15779
  class GuiTaskBase {
15780
+ Init() {
15781
+ this.DataView.Init();
15782
+ }
15783
+ get RouterPath() {
15784
+ return this.routerPath;
15785
+ }
15786
+ get RouterParams() {
15787
+ return this.routeParams;
15788
+ }
15789
+ get InDefaultRouterOutlet() {
15790
+ return this.inDefaultRouterOutlet;
15791
+ }
15792
+ get IsBlockingBatch() {
15793
+ return !this._isMainPrg && this.isOpenWin() && !this._allowEvents && !this.IsInteractive;
15794
+ }
15774
15795
  constructor() {
15775
15796
  this._flowMonitor = null;
15776
15797
  this._keyboardMappingState = 0xFFFF0000;
@@ -15815,21 +15836,6 @@ class GuiTaskBase {
15815
15836
  this._nullArithmetic = Constants.NULL_ARITH_USE_DEF;
15816
15837
  this._propTab = new PropTable(this);
15817
15838
  }
15818
- Init() {
15819
- this.DataView.Init();
15820
- }
15821
- get RouterPath() {
15822
- return this.routerPath;
15823
- }
15824
- get RouterParams() {
15825
- return this.routeParams;
15826
- }
15827
- get InDefaultRouterOutlet() {
15828
- return this.inDefaultRouterOutlet;
15829
- }
15830
- get IsBlockingBatch() {
15831
- return !this._isMainPrg && this.isOpenWin() && !this._allowEvents && !this.IsInteractive;
15832
- }
15833
15839
  getTaskTag() {
15834
15840
  return this._taskTag;
15835
15841
  }