@magic-xpa/gui 4.900.0-dev490.9 → 4.900.0-dev490.90

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.
@@ -1595,7 +1595,7 @@ class Manager {
1595
1595
  return Commands.getValue(ctrl, ctrl.getDisplayLine(true));
1596
1596
  }
1597
1597
  static async SetReadOnlyControl(ctrl, isReadOnly) {
1598
- if (ctrl.isTextControl() || ctrl.IsRepeatable) {
1598
+ if (ctrl.isTextControl() || ctrl.IsRepeatable || ctrl.isComboBox() || ctrl.isListBox() || ctrl.isCheckBox()) {
1599
1599
  if (UtilStrByteMode.isLocaleDefLangDBCS()) {
1600
1600
  if (await ctrl.getForm().getTask().checkProp(PropInterface.PROP_TYPE_ALLOW_LOCATE_IN_QUERY, false))
1601
1601
  return;
@@ -5638,25 +5638,16 @@ class DisplayConvertor {
5638
5638
  case PICInterface.PIC_YY:
5639
5639
  {
5640
5640
  this.int_2_a(outVal, outIdx, 2, breakParams.year, '0');
5641
- let yearStr = NString.FromChars(outVal);
5642
- year = +yearStr.substr(outIdx);
5643
- outIdx += 2;
5644
- len -= 2;
5645
- }
5646
- break;
5647
- case PICInterface.PIC_YY:
5648
- {
5649
- this.int_2_a(outVal, outIdx, 2, breakParams.year, '0');
5650
- let yearStr = NString.FromChars(outVal);
5651
- year = +yearStr.substr(outIdx);
5641
+ let yearStr = NString.FromChars(outVal, outIdx, 2);
5642
+ year = +yearStr;
5652
5643
  outIdx += 2;
5653
5644
  len -= 2;
5654
5645
  }
5655
5646
  break;
5656
5647
  case PICInterface.PIC_YYYY:
5657
- this.int_2_a(outVal, outIdx, 4, year, '0');
5658
- let yearStr = NString.FromChars(outVal);
5659
- year = +yearStr.substr(outIdx);
5648
+ this.int_2_a(outVal, outIdx, 4, breakParams.year, '0');
5649
+ let yearStr = NString.FromChars(outVal, outIdx, 4);
5650
+ year = +yearStr;
5660
5651
  outIdx += 4;
5661
5652
  len -= 4;
5662
5653
  break;
@@ -10386,7 +10377,7 @@ class FieldValidator {
10386
10377
  return valDet;
10387
10378
  }
10388
10379
  if (ctrl.DataType !== StorageAttribute.ALPHA && ctrl.DataType !== StorageAttribute.UNICODE && ctrl.DataType !== StorageAttribute.BLOB) {
10389
- if ((typeof this._newvalue === 'string' && this._newvalue.trim().length === 0) || (ctrl.DataType === StorageAttribute.DATE && (ctrl.isDateZero(this._newvalue) || this.isNullDisplayVal()))) {
10380
+ if ((typeof this._newvalue === 'string' && this._newvalue.trim().length === 0) || (ctrl.DataType == StorageAttribute.NUMERIC && this._newvalue == null) || (ctrl.DataType === StorageAttribute.DATE && (ctrl.isDateZero(this._newvalue) || this.isNullDisplayVal()))) {
10390
10381
  let field = ctrl.getField();
10391
10382
  let defaultValue = field.getDefaultValue();
10392
10383
  let text = null;
@@ -11576,7 +11567,6 @@ class MgControlBase extends GuiControlPropertyAdapter {
11576
11567
  this._firstRefreshProperties = true;
11577
11568
  this._form = null;
11578
11569
  this._hasValidItmAndDispVal = false;
11579
- this._id = -1;
11580
11570
  this._controlIsn = -1;
11581
11571
  this._linkedParentDitIdx = -1;
11582
11572
  this._orgChoiceDisps = null;
@@ -11619,9 +11609,6 @@ class MgControlBase extends GuiControlPropertyAdapter {
11619
11609
  get Form() {
11620
11610
  return this._form;
11621
11611
  }
11622
- get Id() {
11623
- return this._id;
11624
- }
11625
11612
  get ControlIsn() {
11626
11613
  return this._controlIsn;
11627
11614
  }
@@ -11843,9 +11830,6 @@ class MgControlBase extends GuiControlPropertyAdapter {
11843
11830
  case XMLConstants.MG_ATTR_CONTAINER:
11844
11831
  this.setContainer(XmlParser.getInt(valueStr));
11845
11832
  break;
11846
- case XMLConstants.MG_ATTR_ID:
11847
- this._id = XmlParser.getInt(valueStr);
11848
- break;
11849
11833
  case XMLConstants.MG_ATTR_CONTROL_ISN:
11850
11834
  this._controlIsn = XmlParser.getInt(valueStr);
11851
11835
  break;
@@ -12058,7 +12042,7 @@ class MgControlBase extends GuiControlPropertyAdapter {
12058
12042
  }
12059
12043
  getRangedValue(newVal) {
12060
12044
  let vd;
12061
- vd = this.buildCopyPicture(this.Value, newVal);
12045
+ vd = this.buildPicture(this.Value, newVal);
12062
12046
  vd.evaluate();
12063
12047
  this.ModifiedByUser = true;
12064
12048
  let val = vd.getDispValue();
@@ -12068,7 +12052,7 @@ class MgControlBase extends GuiControlPropertyAdapter {
12068
12052
  let vd;
12069
12053
  let modified = this.ModifiedByUser;
12070
12054
  this.ModifiedByUser = true;
12071
- vd = this.buildCopyPicture(this.Value, newVal);
12055
+ vd = this.buildPicture(this.Value, newVal);
12072
12056
  vd.evaluate();
12073
12057
  this.ModifiedByUser = modified;
12074
12058
  if (vd.ValidationFailed)
@@ -15439,9 +15423,16 @@ class Helps {
15439
15423
  initInnerObjects(foundTagName, parser) {
15440
15424
  if (foundTagName === null)
15441
15425
  return false;
15442
- if (foundTagName === XMLConstants.MG_TAG_HELPTABLE)
15426
+ if (foundTagName === XMLConstants.MG_TAG_HELPTABLE) {
15427
+ let currrentIndex = parser.getCurrIndex();
15428
+ let encoded = parser.ReadContentOfCurrentElement().trim();
15429
+ let decoded = Base64.decode(encoded.substr(0, encoded.length).trim());
15430
+ let newXmlData = parser.getXMLdata().replace(encoded.trim(), decoded);
15431
+ parser.setXMLdata(newXmlData);
15432
+ parser.setCurrIndex(currrentIndex);
15443
15433
  parser.setCurrIndex(parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex()) +
15444
15434
  1);
15435
+ }
15445
15436
  else if (foundTagName === XMLConstants.MG_TAG_HELPITEM) {
15446
15437
  let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_TERM, parser.getCurrIndex());
15447
15438
  if (endContext !== -1 && endContext < parser.getXMLdata().length) {
@@ -16011,7 +16002,8 @@ class GuiTaskBase {
16011
16002
  this.IsParallel = XmlParser.getBoolean(valueStr);
16012
16003
  break;
16013
16004
  case XMLConstants.MG_ATTR_ROUTER_PATH:
16014
- this.routerPath = valueStr;
16005
+ if (valueStr.trim() != "")
16006
+ this.routerPath = valueStr;
16015
16007
  break;
16016
16008
  case XMLConstants.MG_ATTR_IN_DEFAULT_ROUTER_OUTLET:
16017
16009
  this.inDefaultRouterOutlet = XmlParser.getBoolean(valueStr);