@magic-xpa/gui 4.1000.0-dev4100.33 → 4.1000.0-dev4100.331

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;
@@ -1018,6 +1018,8 @@ var CommandType;
1018
1018
  CommandType[CommandType["PROP_SET_BINDING_LEVEL"] = 154] = "PROP_SET_BINDING_LEVEL";
1019
1019
  CommandType[CommandType["SHOW_SPINNER"] = 155] = "SHOW_SPINNER";
1020
1020
  CommandType[CommandType["SHOW_HTML_ERROR"] = 156] = "SHOW_HTML_ERROR";
1021
+ CommandType[CommandType["SET_WC_IDLE"] = 157] = "SET_WC_IDLE";
1022
+ CommandType[CommandType["SET_CHUNK_SIZE"] = 158] = "SET_CHUNK_SIZE";
1021
1023
  })(CommandType || (CommandType = {}));
1022
1024
  var HtmlProperties;
1023
1025
  (function (HtmlProperties) {
@@ -1154,8 +1156,6 @@ class GuiCommand {
1154
1156
  }
1155
1157
 
1156
1158
  class Commands {
1157
- constructor() {
1158
- }
1159
1159
  static SetResolveCallback(resolveCallback) {
1160
1160
  this.resolveCallback = resolveCallback;
1161
1161
  }
@@ -1320,6 +1320,8 @@ class Commands {
1320
1320
  static invoke() {
1321
1321
  GuiCommandQueue.getInstance().invoke();
1322
1322
  }
1323
+ constructor() {
1324
+ }
1323
1325
  }
1324
1326
  Commands.resolveCallback = null;
1325
1327
 
@@ -3277,6 +3279,12 @@ class ValidationDetailsBase {
3277
3279
  }
3278
3280
 
3279
3281
  class NUM_TYPE {
3282
+ set Data(value) {
3283
+ this._data = value;
3284
+ }
3285
+ get Data() {
3286
+ return this._data;
3287
+ }
3280
3288
  constructor(recordHexStrOrByteValOrDecStrOrNumFrom, offsetOrPic, lengthOrCompIdx) {
3281
3289
  this.COMMACHAR = ',';
3282
3290
  this.DECIMALCHAR = '.';
@@ -3304,12 +3312,6 @@ class NUM_TYPE {
3304
3312
  }
3305
3313
  this.constructor_5(recordHexStrOrByteValOrDecStrOrNumFrom);
3306
3314
  }
3307
- set Data(value) {
3308
- this._data = value;
3309
- }
3310
- get Data() {
3311
- return this._data;
3312
- }
3313
3315
  constructor_0() {
3314
3316
  this.initConst();
3315
3317
  this.NUM_ZERO();
@@ -5323,17 +5325,17 @@ HebrewDate.DOW_LEN = 5;
5323
5325
  HebrewDate._localDows = new Array(8);
5324
5326
 
5325
5327
  class DisplayConvertor {
5326
- constructor() {
5327
- this._environment = null;
5328
- this.DATECHAR = 0;
5329
- this._environment = GuiEnvironment.Environment;
5330
- }
5331
5328
  static get Instance() {
5332
5329
  if (DisplayConvertor._instance === null) {
5333
5330
  DisplayConvertor._instance = new DisplayConvertor();
5334
5331
  }
5335
5332
  return DisplayConvertor._instance;
5336
5333
  }
5334
+ constructor() {
5335
+ this._environment = null;
5336
+ this.DATECHAR = 0;
5337
+ this._environment = GuiEnvironment.Environment;
5338
+ }
5337
5339
  getNewDateBreakParams() {
5338
5340
  return new DateBreakParams();
5339
5341
  }
@@ -6097,10 +6099,33 @@ class DisplayConvertor {
6097
6099
  let time = new NUM_TYPE(dataStr).NUM_2_ULONG();
6098
6100
  let breakParams = new TimeBreakParams();
6099
6101
  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);
6102
+ let nativeDt = new Date(0);
6103
+ let maskStr = pic.getMask();
6104
+ let outVal = NString.ToCharArray(maskStr);
6105
+ let len = pic.getMaskSize();
6106
+ let outIdx = 0;
6107
+ while (len > 0) {
6108
+ switch (outVal[outIdx].charCodeAt(0)) {
6109
+ case (PICInterface.PIC_HH):
6110
+ nativeDt.setHours(breakParams.hour);
6111
+ outIdx += 2;
6112
+ len -= 2;
6113
+ break;
6114
+ case (PICInterface.PIC_MMT):
6115
+ nativeDt.setMinutes(breakParams.minute);
6116
+ outIdx += 2;
6117
+ len -= 2;
6118
+ break;
6119
+ case (PICInterface.PIC_SS):
6120
+ nativeDt.setSeconds(breakParams.second);
6121
+ outIdx += 2;
6122
+ len -= 2;
6123
+ break;
6124
+ default:
6125
+ outIdx++;
6126
+ len--;
6127
+ }
6128
+ }
6104
6129
  return nativeDt;
6105
6130
  }
6106
6131
  time_2_a_pic(AsciiStr, AsciiL, time, pic, time_pic_Z_edt, milliSeconds) {
@@ -7088,7 +7113,7 @@ class RecordUtils {
7088
7113
  case StorageAttribute.TIME:
7089
7114
  itemVal = !toBase64
7090
7115
  ? itemVal.substr(0, significantNumSize)
7091
- : Base64.encode(this.byteStreamToString(itemVal.substr(0, significantNumSize)), GuiEnvironment.Environment.GetEncoding());
7116
+ : Base64.encode(this.byteStreamToString(itemVal.substr(0, significantNumSize)));
7092
7117
  break;
7093
7118
  case StorageAttribute.ALPHA:
7094
7119
  case StorageAttribute.UNICODE:
@@ -7171,7 +7196,7 @@ class RecordUtils {
7171
7196
  itemVal = itemVal.substr(pos, (fldValLen) - (pos));
7172
7197
  itemVal = !toBase64
7173
7198
  ? StrUtil.stringToHexaDump(itemVal, 4)
7174
- : Base64.encode(itemVal, GuiEnvironment.Environment.GetEncoding());
7199
+ : Base64.encode(itemVal);
7175
7200
  pos = fldValLen;
7176
7201
  }
7177
7202
  else {
@@ -7180,7 +7205,7 @@ class RecordUtils {
7180
7205
  if (!toBase64)
7181
7206
  tmpBuf.Append(StrUtil.stringToHexaDump(itemVal.substr(pos, 0x7FFF), 4));
7182
7207
  else
7183
- tmpBuf.Append(Base64.encode(itemVal.substr(pos, 0x7FFF), GuiEnvironment.Environment.GetEncoding()));
7208
+ tmpBuf.Append(Base64.encode(itemVal.substr(pos, 0x7FFF)));
7184
7209
  tmpBuf.Append("0000");
7185
7210
  pos += 0x7FFF;
7186
7211
  }
@@ -8015,6 +8040,12 @@ class CellElement {
8015
8040
  }
8016
8041
 
8017
8042
  class FieldDef {
8043
+ set DbModifiable(value) {
8044
+ this._dbModifiable = value;
8045
+ }
8046
+ get DbModifiable() {
8047
+ return this._dbModifiable;
8048
+ }
8018
8049
  constructor(id) {
8019
8050
  this.DefaultValue = null;
8020
8051
  this.NullAllowed = false;
@@ -8038,12 +8069,6 @@ class FieldDef {
8038
8069
  this._id = id;
8039
8070
  this.VarDisplayName = NString.Empty;
8040
8071
  }
8041
- set DbModifiable(value) {
8042
- this._dbModifiable = value;
8043
- }
8044
- get DbModifiable() {
8045
- return this._dbModifiable;
8046
- }
8047
8072
  get PartOfDataview() {
8048
8073
  return this._partOfDataview;
8049
8074
  }
@@ -8777,6 +8802,9 @@ class CustomValidator {
8777
8802
  getErrMessage() { return this._errorMessage; }
8778
8803
  }
8779
8804
  class Property {
8805
+ get TaskDefinitionId() {
8806
+ return this._taskDefinitionId;
8807
+ }
8780
8808
  constructor(cId, cParentObj, parType, val) {
8781
8809
  this._id = Int32.MinValue;
8782
8810
  this._dataType = StorageAttribute.NONE;
@@ -8801,9 +8829,6 @@ class Property {
8801
8829
  else
8802
8830
  this.constructor_2(cId, cParentObj, parType, val);
8803
8831
  }
8804
- get TaskDefinitionId() {
8805
- return this._taskDefinitionId;
8806
- }
8807
8832
  constructor_0() {
8808
8833
  this._prevValues = new List();
8809
8834
  }
@@ -11094,6 +11119,15 @@ class FieldValidator {
11094
11119
  }
11095
11120
 
11096
11121
  class ValidationDetails extends ValidationDetailsBase {
11122
+ get ErrorMessage() {
11123
+ return this.errMessage;
11124
+ }
11125
+ set ErrorMessage(msg) {
11126
+ this.errMessage = msg;
11127
+ }
11128
+ get ValidationFailed() {
11129
+ return this._validationFailed;
11130
+ }
11097
11131
  constructor(oldvalueOrRangeStrOrVd, val, range, pic, control) {
11098
11132
  super();
11099
11133
  this._control = null;
@@ -11114,15 +11148,6 @@ class ValidationDetails extends ValidationDetailsBase {
11114
11148
  else if (arguments.length === 1 && (oldvalueOrRangeStrOrVd === null || oldvalueOrRangeStrOrVd instanceof ValidationDetails))
11115
11149
  this.constructor_2(oldvalueOrRangeStrOrVd);
11116
11150
  }
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
11151
  constructor_0(oldvalue, val, range, pic, control) {
11127
11152
  this._picData = pic;
11128
11153
  this._oldvalue = oldvalue;
@@ -11339,6 +11364,9 @@ class ValidationDetails extends ValidationDetailsBase {
11339
11364
  const EMPTY_DCREF = -2;
11340
11365
  const NOT_FOUND = GuiConstants.DEFAULT_VALUE_INT;
11341
11366
  class DcValues {
11367
+ get HasReferences() {
11368
+ return this._refCount > 0;
11369
+ }
11342
11370
  constructor(empty) {
11343
11371
  this._id = 0;
11344
11372
  this._type = StorageAttribute.NONE;
@@ -11353,9 +11381,6 @@ class DcValues {
11353
11381
  }
11354
11382
  this._isNumericType = false;
11355
11383
  }
11356
- get HasReferences() {
11357
- return this._refCount > 0;
11358
- }
11359
11384
  GetAttr() {
11360
11385
  return this._type;
11361
11386
  }
@@ -11616,6 +11641,16 @@ class FocusManager {
11616
11641
  }
11617
11642
 
11618
11643
  class MgControlBase extends GuiControlPropertyAdapter {
11644
+ set Form(value) {
11645
+ this._form = value;
11646
+ this.GuiMgForm = value;
11647
+ }
11648
+ get Form() {
11649
+ return this._form;
11650
+ }
11651
+ get ControlIsn() {
11652
+ return this._controlIsn;
11653
+ }
11619
11654
  constructor(type, parentMgForm, parentControl) {
11620
11655
  super();
11621
11656
  this._ditIdx = 0;
@@ -11668,16 +11703,6 @@ class MgControlBase extends GuiControlPropertyAdapter {
11668
11703
  }
11669
11704
  this.constructor_1(type, parentMgForm, parentControl);
11670
11705
  }
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
11706
  constructor_0() {
11682
11707
  this._linkedControls = new List();
11683
11708
  this.DataType = StorageAttribute.NONE;
@@ -13152,7 +13177,7 @@ class MgControlBase extends GuiControlPropertyAdapter {
13152
13177
  valueChanged = yield this.refreshAndSetItemListByDataSource(line, valueChanged);
13153
13178
  if (!valueChanged)
13154
13179
  return;
13155
- this.setRadioChecked(this.Value);
13180
+ this.setRadioChecked(+this.Value);
13156
13181
  break;
13157
13182
  default:
13158
13183
  Events.WriteExceptionToLog(NString.Format("in Control.RefreshDisplayValue() unknown type: {0}", this.Type));
@@ -13255,38 +13280,21 @@ class MgControlBase extends GuiControlPropertyAdapter {
13255
13280
  }
13256
13281
  });
13257
13282
  }
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
13283
  refreshAndSetItemsList(line, execComputeChoice) {
13269
13284
  const _super = Object.create(null, {
13270
- isSelectionCtrl: { get: () => super.isSelectionCtrl },
13271
- isTabControl: { get: () => super.isTabControl },
13272
- isRadio: { get: () => super.isRadio }
13285
+ isChoiceControl: { get: () => super.isChoiceControl }
13273
13286
  });
13274
13287
  return __awaiter(this, void 0, void 0, function* () {
13275
13288
  if (execComputeChoice) {
13276
13289
  this.clearRange(line);
13277
13290
  }
13278
13291
  let optionsStrings = yield this.refreshDispRange(execComputeChoice);
13279
- if (_super.isSelectionCtrl.call(this) || _super.isTabControl.call(this) || this.HasAutocomplete()) {
13292
+ if (_super.isChoiceControl.call(this) || this.HasAutocomplete()) {
13280
13293
  let options = optionsStrings.map((displayValue, index) => {
13281
13294
  return { index, displayValue };
13282
13295
  });
13283
13296
  Commands.addOperationWithLine(CommandType.SET_PROPERTY, this, line, HtmlProperties.ItemsList, options);
13284
13297
  }
13285
- else {
13286
- if (_super.isRadio.call(this)) {
13287
- yield this.refreshAndSetItemsListForRadioButton(line, execComputeChoice);
13288
- }
13289
- }
13290
13298
  });
13291
13299
  }
13292
13300
  refreshDispRange(execComputeChoice) {
@@ -14025,7 +14033,7 @@ class MgFormBase extends GuiFormPropertyAdapter {
14025
14033
  }
14026
14034
  }
14027
14035
  else {
14028
- items.AddRange(yield mgControl.GetItemsRange());
14036
+ items.AddRange(yield mgControl.GetDisplayRange());
14029
14037
  }
14030
14038
  return MgFormBase.ConvertArrayListToString(items, false);
14031
14039
  }
@@ -14382,6 +14390,7 @@ class MgFormBase extends GuiFormPropertyAdapter {
14382
14390
  InitTableControl_1(dvSize, tableItemsCount) {
14383
14391
  if (this._tableMgControl != null) {
14384
14392
  Commands.addWithNumber(CommandType.SET_TABLE_ITEMS_COUNT, this._tableMgControl, tableItemsCount);
14393
+ Commands.addWithNumber(CommandType.SET_CHUNK_SIZE, this._tableMgControl, (this._task.DataView).getChunkSize());
14385
14394
  this._tableItemsCount = tableItemsCount;
14386
14395
  this.Rows.SetSize(dvSize);
14387
14396
  this._prevGuiTopIndex = -2;
@@ -15535,6 +15544,9 @@ class ExpVal {
15535
15544
  class MagicHelp {
15536
15545
  }
15537
15546
  class InternalHelp extends MagicHelp {
15547
+ GetHelpType() {
15548
+ return HelpType.Internal;
15549
+ }
15538
15550
  constructor() {
15539
15551
  super();
15540
15552
  this.val = null;
@@ -15551,47 +15563,44 @@ class InternalHelp extends MagicHelp {
15551
15563
  this.TitleBar = 0;
15552
15564
  this.FontTableIndex = 0;
15553
15565
  }
15554
- GetHelpType() {
15555
- return HelpType.Internal;
15556
- }
15557
15566
  }
15558
15567
  class PromptpHelp extends MagicHelp {
15568
+ GetHelpType() {
15569
+ return HelpType.Prompt;
15570
+ }
15559
15571
  constructor() {
15560
15572
  super();
15561
15573
  this.PromptHelpText = null;
15562
15574
  }
15563
- GetHelpType() {
15564
- return HelpType.Prompt;
15565
- }
15566
15575
  }
15567
15576
  class ToolTipHelp extends MagicHelp {
15577
+ GetHelpType() {
15578
+ return HelpType.Tooltip;
15579
+ }
15568
15580
  constructor() {
15569
15581
  super();
15570
15582
  this.tooltipHelpText = null;
15571
15583
  }
15572
- GetHelpType() {
15573
- return HelpType.Tooltip;
15574
- }
15575
15584
  }
15576
15585
  class URLHelp extends MagicHelp {
15586
+ GetHelpType() {
15587
+ return HelpType.URL;
15588
+ }
15577
15589
  constructor() {
15578
15590
  super();
15579
15591
  this.urlHelpText = null;
15580
15592
  }
15581
- GetHelpType() {
15582
- return HelpType.URL;
15583
- }
15584
15593
  }
15585
15594
  class WindowsHelp extends MagicHelp {
15595
+ GetHelpType() {
15596
+ return HelpType.Windows;
15597
+ }
15586
15598
  constructor() {
15587
15599
  super();
15588
15600
  this.FilePath = null;
15589
15601
  this.HelpCommand = 0;
15590
15602
  this.HelpKey = null;
15591
15603
  }
15592
- GetHelpType() {
15593
- return HelpType.Windows;
15594
- }
15595
15604
  }
15596
15605
  class Helps {
15597
15606
  constructor() {
@@ -15771,6 +15780,21 @@ class GuiDataCollection {
15771
15780
  GuiDataCollection.MGDataTable = null;
15772
15781
 
15773
15782
  class GuiTaskBase {
15783
+ Init() {
15784
+ this.DataView.Init();
15785
+ }
15786
+ get RouterPath() {
15787
+ return this.routerPath;
15788
+ }
15789
+ get RouterParams() {
15790
+ return this.routeParams;
15791
+ }
15792
+ get InDefaultRouterOutlet() {
15793
+ return this.inDefaultRouterOutlet;
15794
+ }
15795
+ get IsBlockingBatch() {
15796
+ return !this._isMainPrg && this.isOpenWin() && !this._allowEvents && !this.IsInteractive;
15797
+ }
15774
15798
  constructor() {
15775
15799
  this._flowMonitor = null;
15776
15800
  this._keyboardMappingState = 0xFFFF0000;
@@ -15815,21 +15839,6 @@ class GuiTaskBase {
15815
15839
  this._nullArithmetic = Constants.NULL_ARITH_USE_DEF;
15816
15840
  this._propTab = new PropTable(this);
15817
15841
  }
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
15842
  getTaskTag() {
15834
15843
  return this._taskTag;
15835
15844
  }