@magic-xpa/engine 4.1100.0-dev4110.245 → 4.1100.0-dev4110.246

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,2 +1,2 @@
1
- export let CurrentClientVersion = '4.1100.0-dev4110.245';
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ3VycmVudENsaWVudFZlcnNpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbmdpbmUvc3JjL0N1cnJlbnRDbGllbnRWZXJzaW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sQ0FBQyxJQUFJLG9CQUFvQixHQUFHLHNCQUFzQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGxldCBDdXJyZW50Q2xpZW50VmVyc2lvbiA9ICc0LjExMDAuMC1kZXY0MTEwLjI0NSc7Il19
1
+ export let CurrentClientVersion = '4.1100.0-dev4110.246';
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ3VycmVudENsaWVudFZlcnNpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbmdpbmUvc3JjL0N1cnJlbnRDbGllbnRWZXJzaW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sQ0FBQyxJQUFJLG9CQUFvQixHQUFHLHNCQUFzQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGxldCBDdXJyZW50Q2xpZW50VmVyc2lvbiA9ICc0LjExMDAuMC1kZXY0MTEwLjI0Nic7Il19
@@ -692,17 +692,13 @@ export class Record {
692
692
  let size = this.getSizeFld(false);
693
693
  let start = this.getFromFldIdx(false);
694
694
  let fields = [];
695
- let tableName = this.getFieldsTab().getField(0).getTableName();
696
695
  for (let i = 0; i < start + size; i++) {
697
696
  const field = this.getFieldsTab().getField(i);
698
- if (!this.fldValsEqual(originalRec, i)) {
699
- const fieldName = field.getCtrl().getName();
700
- if (fieldName)
701
- fields.push(fieldName.includes(tableName) ? ' ' + fieldName.substring(tableName.length + 1) : ' ' + fieldName);
702
- }
697
+ if (!this.fldValsEqual(originalRec, i))
698
+ fields.push(' ' + field.getTableName() + '.' + field.getVarName());
703
699
  }
704
700
  if (fields.length > 0)
705
- return tableName + ':' + fields.toString();
701
+ return fields.toString().trim();
706
702
  }
707
703
  fldValsEqual(rec, fldIdx) {
708
704
  let type = this.getFieldsTab().getField(fldIdx).getType();
@@ -881,4 +877,4 @@ export class DcValuesReference extends ObjectReferenceBase {
881
877
  return new DcValuesReference(controlId, dcValuesOwner.getDcValues(dcId));
882
878
  }
883
879
  }
884
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVjb3JkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZW5naW5lL3NyYy9kYXRhL1JlY29yZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wscUJBQXFCLEVBRXJCLFdBQVcsRUFDWCxNQUFNLEVBR04sbUJBQW1CLEVBQ25CLDBCQUEwQixFQUMxQixXQUFXLEVBQ1osTUFBTSxnQkFBZ0IsQ0FBQztBQUN4QixPQUFPLEVBQ0wsb0JBQW9CLEVBRXBCLEtBQUssRUFDTCxtQkFBbUIsRUFFbkIsT0FBTyxFQUNQLE9BQU8sRUFDUCxRQUFRLEVBQ1IsYUFBYSxFQUNiLGlCQUFpQixFQUNsQixNQUFNLHNCQUFzQixDQUFDO0FBQzlCLE9BQU8sRUFDTCxNQUFNLEVBQ04sU0FBUyxFQUNULE1BQU0sRUFDTixnQkFBZ0IsRUFDaEIscUJBQXFCLEVBQ3JCLE9BQU8sRUFDUCxl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Bib3RoIGFyZSBub3QgbnVsbFxyXG4gICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgdHJ5IHtcclxuICAgICAgICAgICAgbGV0IGZpcnN0ID0gbmV3IEV4cFZhbChjdXJyRmxkLmdldFR5cGUoKSwgZmFsc2UsXHJcbiAgICAgICAgICAgICAgdGhpcy5HZXRGaWVsZFZhbHVlKGN1cnJGbGRJZCkpO1xyXG4gICAgICAgICAgICBsZXQgc2Vjb25kID0gbmV3IEV4cFZhbChjdXJyRmxkLmdldFR5cGUoKSwgZmFsc2UsXHJcbiAgICAgICAgICAgICAgY29tcFRvLkdldEZpZWxkVmFsdWUoY3VyckZsZElkKSk7XHJcblxyXG4gICAgICAgICAgICByZXMgPSBFeHByZXNzaW9uRXZhbHVhdG9yLnZhbF9jbXBfYW55KGZpcnN0LCBzZWNvbmQpO1xyXG5cclxuICAgICAgICAgICAgaWYgKHJlcyAhPT0gMClcclxuICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgIH1cclxuICAgICAgICAgIGNhdGNoIChlcnIpXHJcbiAgICAgICAgICAgIC8vIG9uZSBvZiB0aGUgdmFsdWVzIHdlIGFyZSBjb21wYXJpbmcgdXNpbmcgdmxfY21wX2FueSAgaXMgbnVsbCB3ZSBzaG91bGQgbmV2ZXIgZ2V0IGhlcmVcclxuICAgICAgICAgIHtcclxuICAgICAgICAgICAgaWYgKGVyciBpbnN0YW5jZW9mIE51bGxWYWx1ZUV4Y2VwdGlvbilcclxuICAgICAgICAgICAgICBMb2dnZXIuSW5zdGFuY2UuV3JpdGVFeGNlcHRpb25Ub0xvZ1dpdGhNc2coXCIgaW4gUmVjb3JkLkNvbXBhcmVUbyBudWxsIHZhbHVlIHdhcyByZWFjaGVkXCIpO1xyXG4gICAgICAgICAgfVxyXG5cclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgICAgcmV0dXJuIHJlcztcclxuICAgIH1cclxuICAgIGVsc2Uge1xyXG4gICAgICByZXMgPSAtMTtcclx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gICAgIC8vIG51bGwgaXMgdGhlIGdyZWF0ZXN0IHZhbHVlIHRoZXJlZm9yZSB3ZSBhcmUgdGhlIGdyZWF0ZXJcclxuICAgICAgICAgIHJlcyA9IDE7XHJcbiAgICAgICAgICBicmVhaztcclxuICAgICAgICB9XHJcbiAgICAgICAgZWxzZSBpZiAoIXRoaXMuSXNOdWxsKGN1cnJGbGRJZCkgJiYgY29tcFRvLklzTnVsbChjdXJyRmxkSWQpKSB7XHJcbiAgICAgICAgICByZXMgPSAtMTtcclxuICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgIH1cclxuICAgICAgICAvLyBib3RoIGFyZSBub3QgbnVsbFxyXG4gICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgdHJ5IHtcclxuICAgICAgICAgICAgbGV0IGZpcnN0ID0gbmV3IEV4cFZhbChjdXJyRmxkLmdldFR5cGUoKSwgZmFsc2UsXHJcbiAgICAgICAgICAgICAgdGhpcy5HZXRGaWVsZFZhbHVlKGN1cnJGbGRJZCkpO1xyXG4gICAgICAgICAgICBsZXQgc2Vjb25kID0gbmV3IEV4cFZhbChjdXJyRmxkLmdldFR5cGUoKSwgZmFsc2UsXHJcbiAgICAgICAgICAgICAgY29tcFRvLkdldEZpZWxkVmFsdWUoY3VyckZsZElkKSk7XHJcblxyXG4gICAgICAgICAgICByZXMgPSBFeHByZXNzaW9uRXZhbHVhdG9yLnZhbF9jbXBfYW55KGZpcnN0LCBzZWNvbmQpO1xyXG5cclxuICAgICAgICAgICAgaWYgKHJlcyAhPT0gMClcclxuICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgIH1cclxuICAgICAgICAgIGNhdGNoIChlcnIpXHJcbiAgICAgICAgICAgIC8vIG9uZSBvZiB0aGUgdmFsdWVzIHdlIGFyZSBjb21wYXJpbmcgdXNpbmcgdmxfY21wX2FueSAgaXMgbnVsbCB3ZSBzaG91bGQgbmV2ZXIgZ2V0IGhlcmVcclxuICAgICAgICAgIHtcclxuICAgICAg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