@magic-xpa/engine 4.1100.0-dev4110.31 → 4.1100.0-dev4110.34

Sign up to get free protection for your applications and to get access to all the features.
@@ -730,6 +730,7 @@ export class Task extends TaskBase {
730
730
  await subTask.doFirstRecordCycle();
731
731
  }
732
732
  }
733
+ await AccessHelper.eventsManager.handleInternalEventWithTask(this, InternalInterface.MG_ACT_REC_SUFFIX);
733
734
  }
734
735
  }
735
736
  this.SubformExecMode = Task_SubformExecModeEnum.SET_FOCUS;
@@ -2492,4 +2493,4 @@ export class Task extends TaskBase {
2492
2493
  }
2493
2494
  Task.StartProgLevel = 0;
2494
2495
  Task._idleTimerStarted = false;
2495
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVGFzay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2VuZ2luZS9zcmMvdGFza3MvVGFzay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsS0FBSyxFQUFFLFNBQVMsRUFBRSxJQUFJLEVBQUUsT0FBTyxFQUFFLE9BQU8sRUFBRSxRQUFRLEVBQUUsS0FBSyxFQUFFLGFBQWEsRUFBRSxpQkFBaUIsRUFBQyxNQUFNLHNCQUFzQixDQUFDO0FBQ2pJLE9BQU8sRUFDTCxTQUFTLEVBQ1QsaUJBQWlCLEVBQ2pCLE1BQU0sRUFDTixnQkFBZ0IsRUFDaEIsZ0JBQWdCLEVBQ2hCLE9BQU8sRUFFUCxVQUFVLEVBQ1YsWUFBWSxFQUNaLFNBQVMsRUFDVixNQUFNLGtCQUFrQixDQUFDO0FBQzFCLE9BQU8sRUFDTCxRQUFRLEVBQ1IscUJBQXFCLEVBQ3JCLGdCQUFnQixFQUNoQixNQUFNLEVBRU4saUJBQWlCLEVBQ2pCLEtBQUssRUFFTCxPQUFPLEVBR1AsUUFBUSxFQUNSLEdBQUcsRUFFSCxhQUFhLE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yVGFzay5Gb3JtICE9IG51bGwpIHtcclxuICAgICAgICAgIG5vT2ZDb250cm9sc0luQ3VycnRhc2sgPSBjdXJyVGFzay5Gb3JtLmdldEN0cmxDb3VudCgpO1xyXG5cclxuICAgICAgICAgIC8vIEZvdW5kIHRoZSB0YXNrIHdoaWNoIGNvbnRhaW5zIHRoZSBuZWVkZWQgY29udHJvbFxyXG4gICAgICAgICAgaWYgKGNvbnRyb2xJRCA8IChub09mQ29udHJvbHNCZWZvcmVDdXJyVGFzayArIG5vT2ZDb250cm9sc0luQ3VycnRhc2spKSB7XHJcbiAgICAgICAgICAgIC8vIElkeCBvZiB0aGUgY29udHJvbCBpbiBjdXJyZW50IHRhc2tcclxuICAgICAgICAgICAgY29udHJvbElkeCA9IGNvbnRyb2xJRCAtIG5vT2ZDb250cm9sc0JlZm9yZUN1cnJUYXNrO1xyXG4gICAgICAgICAgICBjb250cm9sID0gPE1nQ29udHJvbD5jdXJyVGFzay5Gb3JtLkN0cmxUYWIuZ2V0Q3RybChjb250cm9sSWR4KTtcclxuICAgICAgICAgICAgY2FsbGVyVGFzayA9IGN1cnJUYXNrO1xyXG4gICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICBub09mQ29udHJvbHNCZWZvcmVDdXJyVGFzayArPSBub09mQ29udHJvbHNJbkN1cnJ0YXNrO1xyXG4gICAgICAgIH1cclxuICAgICAgfVxyXG5cclxuICAgICAgLy8gR2V0IHBhcmVudFxyXG4gICAgICBpZiAoY29udHJvbCAhPSBudWxsKSB7XHJcbiAgICAgICAgcGFyZW50LnZhbHVlID0gMDtcclxuICAgICAgICBsZXQgcHJldkN0bElkeDogbnVtYmVyID0gdHJlZVJvdXRlWzBdLlRhc2tEZWZpbml0aW9uSWQuQ3RsSW5kZXg7XHJcblxyXG4gICAgICAgIGZvciAobGV0IHRhc2s6IG51bWJlciA9IDA7IHRhc2sgPCB0cmVlUm91dGUubGVuZ3RoIC0gMTsgdGFzays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AgICAgICAgIGxldCBwZW5kaW5nVHJhbnNhY3Rpb25zOiBib29sZWFuID0gdHJ1ZTtcclxuICAgICAgICAgICAgICBsZXQgY2xpZW50T3BlckV4aXN0OiBib29sZWFuID0gYXdhaXQgdGhpcy5DaGVja0lmQ2xpZW50T3BlcmF0aW9uRXhpc3RzSW5TdWJmb3JtVGFza3ModGhpcyxcclxuICAgICAgICAgICAgICAgIEludGVybmFsSW50ZXJmYWNlLk1HX0FDVF9UQVNLX1NVRkZJWCk7XHJcbiAgICAgICAgICAgICAgaWYgKCFjbGllbnRPcGVyRXhpc3QpIHtcclxuICAgICAgICAgICAgICAgIGNsaWVudE9wZXJFeGlzdCA9IGF3YWl0IHRoaXMuQ2hlY2tJZkNsaWVudE9wZXJhdGlvbkV4aXN0c0luU3ViZm9ybVRhc2tzKHRoaXMsXHJcbiAgICAgICAgICAgICAgICAgIEludGVybmFsSW50ZXJmYWNlLk1HX0FDVF9SRUNfU1VGRklYKTtcclxuICAgICAgICAgICAgICBpZiAoIWNsaWVudE9wZXJFeGlzdClcclxuICAgICAgICAgICAgICAgICAgcGVuZGluZ1RyYW5zYWN0aW9ucyA9IHRoaXMuQ2hlY2tJZlBlbmRpbmdUcmFuc2FjdGlvbnModGhpcyk7XHJcbiAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgIGlmICghY2xpZW50T3BlckV4aXN0ICYmICFwZW5kaW5nVHJhbnNhY3Rpb25zKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmFsbG93UmVtb3RlQ21kRXhlY3V0aW9uID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICB0aGlzLlNldFNlcnZlclNpZGVUYXNrU3VmZml4KHRoaXMpO1xyXG5cclxuICAgICAgICAgICAgICAgIFJlbW90ZUNvbW1hbmRzUHJvY2Vzc29yLkdldEluc3RhbmNlKCkuRGVsYXlDb21tYW5kRXhlY3V0aW9uID0gdHJ1ZTtcclxuICAgICAgICAgICAgICB9XHJcbiAgICAgICA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09ORElUSU9OLCBmYWxzZSk7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gTm8gbmVlZCB0byBlbmQgdGhlIHJvb3QgdGFzayBpZiB3ZSBhcmUgYWxyZWFkeSBkb2luZyBpdC5cclxuICAgICAgICAgICAgICAgIGlmICh0aGlzICE9PSByb290VGFzayAmJiBlbmRNYWluUHJnKSB7XHJcbiAgICAgICAgICAgICAgICAgIGxldCBydEV2dCA9IG5ldyBSdW5UaW1lRXZlbnQocm9vdFRhc2spO1xyXG4gICAgICAgICAgICAgICAgICBydEV2dC5zZXRJbnRlcm5hbChJbnRlcm5hbEludGVyZmFjZS5NR19BQ1RfQ0xPU0UpO1xyXG4gICAgICAgICAgICAgICAgICBydEV2dC5zZXRDdHJsKG51bGwpO1xyXG4gICAgICAgICAgICAgICAgICBydEV2dC5zZXRBcmdMaXN0KG51bGwpO1xyXG4gICAgICAgICAgICAgICAgICBBY2Nlc3NIZWxwZXIuZXZlbnRzTWFuYWdlci5hZGRUb1RhaWwocnRFdnQpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICBNZ0Zvcm0uQ3JlYXRlZEZvcm1zLnJlbW92ZSg8TWdGb3JtPnRoaXMuRm9ybSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuXHJcbiAgICAgIGZpbmFsbHkge1xyXG4gICAgICAgIGlmICghdGhpcy5Jc1N1YkZvcm0gfHwgc3ViZm9ybURlc3RpbmF0aW9uKVxyXG4gICAgICAgICAgdGhpcy5oYW5kbGVGaW5hbGx5RW5kVGFzayhzdWNjZWVkZWQsIHJldmVyc2libGVFeGl0KTtcclxuICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIC8vIFFjciAjOTE0NjQ1IDogcmV0dXJuIGZhbHNlIGluIGEgcmVjdXJzaXZlIGNhbGwuXHJcbiAgICAvLyBvdGhlcndpc2UgY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gKGxldCBpID0gMDsgaSA8IGNudDsgaSsrKSB7XHJcbiAgICAgICAgICBsZXQgb3BlciA9IGhhbmRsZXIuZ2V0T3BlcmF0aW9uVGFiKCkuZ2V0T3BlcmF0aW9uKGkpO1xyXG4gICAgICAgICAgaWYgKG9wZXIuZ2V0RXhlY09uQ2xpZW50KCkpIHtcclxuICAgICAgICAgICAgY2xpZW50T3BlcmF0aW9uRXhpc3QgPSB0cnVlO1xyXG4gICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgIH1cclxuICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICBpZiAob3Blci5nZXRUeXBlKCkgPT0gQ29uc3RJbnRlcmZhY2UuTUdfT1BFUl9SQUlTRV9FVkVOVCl7XHJcbiAgICAgICAgICAgICAgaWYgKG9wZXIuR2V0UnVudGltZUV2ZW50KCkuZ2V0VHlwZSgpID09IENvbnN0SW50ZXJmYWNlLkVWRU5UX1RZUEVfSU5URVJOQUwgJiZcclxuICAgICAgICAgICAgICBvcGVyLkdldFJ1bnRpbWVFdmVudCgpLmdldEludGVybmFsQ29kZSgpID09PSBJbnRlcm5hbEludGVyZmFjZS5NR19BQ1RfUlRfUkVGUkVTSF9WSUVXKSB7XHJcbiAgICAgICAgICAgICAgICBjbGllbnRPcGVyYXRpb25FeGlzdCA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuXHJcbiAgICAgIGlmICghY2xpZW50T3BlcmF0aW9uRXhpc3QgJiYgdGFzay5oYXNTdWJUYXNrcygpKSB7XHJcbiAgICAgICAgZm9yIChsZXQgaSA9IDA7ICghY2xpZW50T3BlcmF0aW9uRXhpc3QgJiYgaSA8IHRhc2suZ2V0U3ViVGFza3MoKS5nZXRTaXplKCkpOyBpKyspIHtcclxuICAgICAgICAgIGxldCBzdWJUYXNrID0gPFR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NrICsgbm9PZkNvbnRyb2xzSW5DdXJydGFzaykpIHtcclxuICAgICAgICAgICAgLy8gSWR4IG9mIHRoZSBjb250cm9sIGluIGN1cnJlbnQgdGFza1xyXG4gICAgICAgICAgICBjb250cm9sSWR4ID0gY29udHJvbElEIC0gbm9PZkNvbnRyb2xzQmVmb3JlQ3VyclRhc2s7XHJcbiAgICAgICAgICAgIGNvbnRyb2wgPSA8TWdDb250cm9sPmN1cnJUYXNrLkZvcm0uQ3RybFRhYi5nZXRDdHJsKGNvbnRyb2xJZHgpO1xyXG4gICAgICAgICAgICBjYWxsZXJUYXNrID0gY3VyclRhc2s7XHJcbiAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgfVxyXG5cclxuICAgICAgICAgIG5vT2ZDb250cm9sc0JlZm9yZUN1cnJUYXNrICs9IG5vT2ZDb250cm9sc0luQ3VycnRhc2s7XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcblxyXG4gICAgICAvLyBHZXQgcGFyZW50XHJcbiAgICAgIGlmIChjb250cm9sICE9IG51bGwpIHtcclxuICAgICAgICBwYXJlbnQudmFsdWUgPSAwO1xyXG4gICAgICAgIGxldCBwcmV2Q3RsSWR4OiBudW1iZXIgPSB0cmVlUm91dGVbMF0uVGFza0RlZmluaXRpb25JZC5DdGxJbmRleDtcclxuXHJcbiAgICAgICAgZm9yIChsZXQgdGFzazogbnVtYmVyID0gMDsgdGFzayA8IHRyZWVSb3V0ZS5sZW5ndGggLSAxOyB0YXNrKyspIHtcclxuICAgICAgICAgIGN1cnJUYXNrID0gdHJlZVJvdXRlW3Rhc2tdO1xyXG5cclxuICAgICAgICAgIGlmIChwcmV2Q3RsSWR4ICE9PSBjdXJyVGFzay5UYXNrRGVmaW5pdGlvbklkLkN0bEluZGV4KVxyXG4gICAgICAgICAgICBwYXJlbnQudmFsdWUrKztcclxuXHJcbiAgICAgICAgICBpZiAoY2FsbGVyVGFzay5UYXNrRGVmaW5pdGlvbklkLkN0bEluZGV4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