@magic-xpa/engine 4.1100.0-dev4110.244 → 4.1100.0-dev4110.246
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2022/src/CurrentClientVersion.mjs +2 -2
- package/esm2022/src/commands/ClientToServer/ColumnSortEventCommand.mjs +4 -1
- package/esm2022/src/commands/ClientToServer/ComputeEventCommand.mjs +4 -1
- package/esm2022/src/commands/ClientToServer/ContextTerminationEventCommand.mjs +4 -1
- package/esm2022/src/commands/ClientToServer/ContextTimeoutResetCommand.mjs +4 -1
- package/esm2022/src/commands/ClientToServer/EvaluateCommand.mjs +4 -1
- package/esm2022/src/commands/ClientToServer/EventCommand.mjs +4 -1
- package/esm2022/src/commands/ClientToServer/ExecOperCommand.mjs +5 -2
- package/esm2022/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +4 -1
- package/esm2022/src/commands/ClientToServer/IndexChangeEventCommand.mjs +4 -1
- package/esm2022/src/commands/ClientToServer/IniputForceWriteCommand.mjs +4 -1
- package/esm2022/src/commands/ClientToServer/NonReversibleExitEventCommand.mjs +4 -1
- package/esm2022/src/commands/ClientToServer/RecomputeCommand.mjs +4 -1
- package/esm2022/src/commands/ClientToServer/RefreshEventCommand.mjs +4 -1
- package/esm2022/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +4 -1
- package/esm2022/src/commands/ClientToServer/RollbackEventCommand.mjs +4 -1
- package/esm2022/src/commands/ClientToServer/SelectProgramCommand.mjs +5 -1
- package/esm2022/src/commands/ClientToServer/SubformOpenEventCommand.mjs +4 -1
- package/esm2022/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +4 -1
- package/esm2022/src/commands/ClientToServer/UnloadCommand.mjs +4 -1
- package/esm2022/src/data/Record.mjs +4 -6
- package/fesm2022/magic-xpa-engine.mjs +61 -6
- package/fesm2022/magic-xpa-engine.mjs.map +1 -1
- package/package.json +4 -4
- package/src/commands/ClientToServer/ColumnSortEventCommand.d.ts +1 -0
- package/src/commands/ClientToServer/ComputeEventCommand.d.ts +1 -0
- package/src/commands/ClientToServer/ContextTerminationEventCommand.d.ts +1 -0
- package/src/commands/ClientToServer/ContextTimeoutResetCommand.d.ts +1 -0
- package/src/commands/ClientToServer/EvaluateCommand.d.ts +1 -0
- package/src/commands/ClientToServer/EventCommand.d.ts +1 -0
- package/src/commands/ClientToServer/ExecOperCommand.d.ts +1 -0
- package/src/commands/ClientToServer/FetchDataControlValuesEventCommand.d.ts +1 -0
- package/src/commands/ClientToServer/IndexChangeEventCommand.d.ts +1 -0
- package/src/commands/ClientToServer/IniputForceWriteCommand.d.ts +1 -0
- package/src/commands/ClientToServer/NonReversibleExitEventCommand.d.ts +1 -0
- package/src/commands/ClientToServer/RecomputeCommand.d.ts +1 -0
- package/src/commands/ClientToServer/RefreshEventCommand.d.ts +1 -0
- package/src/commands/ClientToServer/RefreshScreenEventCommand.d.ts +1 -0
- package/src/commands/ClientToServer/RollbackEventCommand.d.ts +1 -0
- package/src/commands/ClientToServer/SelectProgramCommand.d.ts +1 -0
- package/src/commands/ClientToServer/SubformOpenEventCommand.d.ts +1 -0
- package/src/commands/ClientToServer/SubformRefreshEventCommand.d.ts +1 -0
- package/src/commands/ClientToServer/UnloadCommand.d.ts +1 -0
@@ -692,15 +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
|
-
fields.push(' ' + field.
|
700
|
-
}
|
697
|
+
if (!this.fldValsEqual(originalRec, i))
|
698
|
+
fields.push(' ' + field.getTableName() + '.' + field.getVarName());
|
701
699
|
}
|
702
700
|
if (fields.length > 0)
|
703
|
-
return
|
701
|
+
return fields.toString().trim();
|
704
702
|
}
|
705
703
|
fldValsEqual(rec, fldIdx) {
|
706
704
|
let type = this.getFieldsTab().getField(fldIdx).getType();
|
@@ -879,4 +877,4 @@ export class DcValuesReference extends ObjectReferenceBase {
|
|
879
877
|
return new DcValuesReference(controlId, dcValuesOwner.getDcValues(dcId));
|
880
878
|
}
|
881
879
|
}
|
882
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVjb3JkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZW5naW5lL3NyYy9kYXRhL1JlY29yZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wscUJBQXFCLEVBRXJCLFdBQVcsRUFDWCxNQUFNLEVBR04sbUJBQW1CLEVBQ25CLDBCQUEwQixFQUMxQixXQUFXLEVBQ1osTUFBTSxnQkFBZ0IsQ0FBQztBQUN4QixPQUFPLEVBQ0wsb0JBQW9CLEVBRXBCLEtBQUssRUFDTCxtQkFBbUIsRUFFbkIsT0FBTyxFQUNQLE9BQU8sRUFDUCxRQUFRLEVBQ1IsYUFBYSxFQUNiLGlCQUFpQixFQUNsQixNQUFNLHNCQUFzQixDQUFDO0FBQzlCLE9BQU8sRUFDTCxNQUFNLEVBQ04sU0FBUyxFQUNULE1BQU0sRUFDTixnQkFBZ0IsRUFDaEIscUJBQXFCLEVBQ3JCLE9BQU8sRUFDUCxlQUFlLEVBQ2YsWUFBWSxFQUNaLFNBQVMsRUFDVixNQUFNLGtCQUFrQixDQUFDO0FBSTFCLE9BQU8sRUFBQyxtQkFBbUIsRUFBRSxrQkFBa0IsRUFBQyxNQUFNLDRCQUE0QixDQUFDO0FBTW5GLE9BQU8sRUFBQyxjQUFjLEVBQUMsTUFBTSxtQkFBbUIsQ0FBQztBQUVqRCxPQUFPLEVBQUMsV0FBVyxFQUFDLE1BQU0sb0JBQW9CLENBQUM7QUFDL0MsT0FBTyxFQUFDLFlBQVksRUFBQyxNQUFNLGdCQUF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ICYmIGNvbXBUby5Jc051bGwoY3VyckZsZElkKSlcclxuICAgICAgICAgIGNvbnRpbnVlO1xyXG4gICAgICAgIGVsc2UgaWYgKHRoaXMuSXNOdWxsKGN1cnJGbGRJZCkgJiYgIWNvbXBUby5Jc051bGwoY3VyckZsZElkKSkge1xyXG4gICAgICAgICAgLy8gbnVsbCBpcyB0aGUgZ3JlYXRlc3QgdmFsdWUgdGhlcmVmb3JlIHdlIGFyZSB0aGUgZ3JlYXRlclxyXG4gICAgICAgICAgcmVzID0gMTtcclxuICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlIGlmICghdGhpcy5Jc051bGwoY3VyckZsZElkKSAmJiBjb21wVG8uSXNOdWxsKGN1cnJGbGRJZCkpIHtcclxuICAgICAgICAgIHJlcyA9IC0xO1xyXG4gICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIC8vIGJvdGggYXJlIG5vdCBudWxsXHJcbiAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICBsZXQgZmlyc3QgPSBuZXcgRXhwVmFsKGN1cnJGbGQuZ2V0VHlwZSgpLCBmYWxzZSxcclxuICAgICAgICAgICAgICB0aGlzLkdldEZpZWxkVmFsdWUoY3VyckZsZElkKSk7XHJcbiAgICAgICAgICAgIGxldCBzZWNvbmQgPSBuZXcgRXhwVmFsKGN1cnJGbGQuZ2V0VHlwZSgpLCBmYWxzZSxcclxuICAgICAgICAgICAgICBjb21wVG8uR2V0RmllbGRWYWx1ZShjdXJyRmxkSWQpKTtcclxuXHJcbiAgICAgICAgICAgIHJlcyA9IEV4cHJlc3Npb25FdmFsdWF0b3IudmFsX2NtcF9hbnkoZmlyc3QsIHNlY29uZCk7XHJcblxyXG4gICAgICAgICAgICBpZiAocmVzICE9PSAwKVxyXG4gICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgICAgY2F0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haztcclxuICAgICAgICBjYXNlIENvbnN0SW50ZXJmYWNlLk1HX0FUVFJfQ1VSUl9SRUM6IHtcclxuXHJcbiAgICAgICAgfVxyXG4gICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgY2FzZSBDb25zdEludGVyZmFjZS5NR19BVFRSX0FERF9BRlRFUjpcclxuICAgICAgICAgIHRoaXMuX2FkZEFmdGVyID0gWG1sUGFyc2VyLmdldEludCh2YWx1ZVN0cik7XHJcbiAgICAgICAgICBicmVhaztcclxuICAgICAgICBjYXNlIENvbnN0SW50ZXJmYWNlLk1HX0FUVFJfRkxBR1M6XHJcbiAgICAgICAgICByZWNGbGFncyA9IHZhbHVlU3RyO1xyXG4gICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgY2FzZSBDb25zdEludGVyZmFjZS5NR19BVFRSX01PRElGSUVEOlxyXG4gICAgICAgICAgdGhpcy5fbW9kaWZpZWQgPSB0cnVlO1xyXG4gICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgY2FzZSBDb25zdEludGVyZmFjZS5NR19BVFRSX0RDX1JFRlM6XHJcbiAgICAgICAgICB0aGlzLmZpbGxEQ1JlZih2YWx1ZVN0cik7XHJcbiAgICAgICAgICBicmVhaztcclxuICAgICAgICBjYXNlIENvbnN0SW50ZXJmYWNlLk1HX0FUVFJfREJQT1M6XHJcbiAgICAgICAgICB0aGlzLl9kYlBvc0Jhc2U2NFZhbCA9IHZhbHVlU3RyO1xyXG4gICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgZGVmYXVsdDpcclxuICAgICAgICAgIExvZ2dlci5JbnN0YW5jZS5Xcml0ZUV4Y2VwdGlvblRvTG9nV2l0aE1zZyhcImluIFJlY29yZC5pbml0RWxlbWVudHMoKSB1bmtub3duIGF0dHJpYnV0ZTogXCIgKyBhdHRyaWJ1dGUpO1xyXG4gICAgICAgICAgYnJlYWs7XHJcbiAgICAgIH1cclxuICAgIH1cclxuICAgIGlmICh0aGlzLlZhbHVlSW5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2Vjb25kID0gbmV3IEV4cFZhbChjdXJyRmxkLmdldFR5cGUoKSwgZmFsc2UsXHJcbiAgICAgICAgICAgICAgY29tcFRvLkdldEZpZWxkVmFsdWUoY3VyckZsZElkKSk7XHJcblxyXG4gICAgICAgICAgICByZXMgPSBFeHByZXNzaW9uRXZhbHVhdG9yLnZhbF9jbXBfYW55KGZpcnN0LCBzZWNvbmQpO1xyXG5cclxuICAgICAgICAgICAgaWYgKHJlcyAhPT0gMClcclxuICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgIH1cclxuICAgICAgICAgIGNhdGNoIChlcnIpXHJcbiAgICAgICAgICAgIC8vIG9uZSBvZiB0aGUgdmFsdWVzIHdlIGFyZSBjb21wYXJpbmcgdXNpbmcgdmxfY21wX2FueSAgaXMgbnVsbCB3ZSBzaG91bGQgbmV2ZXIgZ2V0IGhlcmVcclxuICAgICAgICAgIHtcclxuICAgICAgICAgICAgaWYgKGVyciBpbnN0YW5jZW9mIE51bGxWYWx1ZUV4Y2VwdGlvbilcclxuICAgICAgICAgICAgICBMb2dnZXIuSW5zdGFuY2UuV3JpdGVFeGNlcHRpb25Ub0xvZ1dpdGhNc2coXCIgaW4gUmVjb3JkLkNvbXBhcmVUbyBudWxsIHZhbHVlIHdhcyByZWFjaGVkXCIpO1xyXG4gICAgICAgICAgfVxyXG5cclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgICAgcmV0dXJuIHJlcztcclxuICAgIH1cclxuICAgIGVsc2Uge1xyXG4gICAgICByZXMgPSAtMTtcclxuICAgICAgcmV0dXJuIHJlcztcclxuICAgIH1cclxuICB9XHJcblxyXG4gIC8vLyA8c3VtbWFyeT5cclxuICAvLy8gICBnZXQgdGhlIG1vZGVcclxuICAvLy8gPC9zdW1tYXJ5PlxyXG4gIGdldE1vZGUoKTogRGF0YU1vZGlmaWNhdGlvblR5cGVzIHtcclxuICAgIHJldHVybiB0aGlzLl9tb2RlO1xyXG4gIH1cclxuXHJcbi8vLyA8c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