@testgorilla/tgo-coding-test 2.0.5 → 2.0.6

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.
@@ -4060,6 +4060,7 @@ let TgoCodingTestCandidateViewComponent = class TgoCodingTestCandidateViewCompon
4060
4060
  apiService = inject(ApiService);
4061
4061
  route = inject(ActivatedRoute);
4062
4062
  codingTestConfigService = inject(CodingTestConfigService);
4063
+ invitationUUID = '';
4063
4064
  assessment;
4064
4065
  question;
4065
4066
  test;
@@ -4251,10 +4252,9 @@ let TgoCodingTestCandidateViewComponent = class TgoCodingTestCandidateViewCompon
4251
4252
  });
4252
4253
  }
4253
4254
  setApiParams() {
4254
- const invitationUuid = this.route.snapshot.firstChild?.url[0].path || '';
4255
4255
  const contentLanguage = this.assessment?.locale ?? 'en';
4256
4256
  const apiUrl = this.codingTestConfigService.getApiUrl();
4257
- this.apiService.setParams(invitationUuid, contentLanguage, ROOT_TRANSLATIONS_SCOPE, apiUrl);
4257
+ this.apiService.setParams(this.invitationUUID, contentLanguage, ROOT_TRANSLATIONS_SCOPE, apiUrl);
4258
4258
  }
4259
4259
  setIsSQL() {
4260
4260
  this.isSQL = this.question?.context.code_language === 'sql';
@@ -4337,6 +4337,10 @@ let TgoCodingTestCandidateViewComponent = class TgoCodingTestCandidateViewCompon
4337
4337
  this.initCode = initCode;
4338
4338
  this.updateCode(this.initCode);
4339
4339
  }
4340
+ }), catchError(err => {
4341
+ this.loadingStateChanged.emit(false);
4342
+ console.error(err);
4343
+ return of([]);
4340
4344
  }))
4341
4345
  .subscribe(() => {
4342
4346
  this.libCodingTestService.setBoilerplateLoadingStatus(false);
@@ -4414,7 +4418,7 @@ let TgoCodingTestCandidateViewComponent = class TgoCodingTestCandidateViewCompon
4414
4418
  }
4415
4419
  }
4416
4420
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TgoCodingTestCandidateViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4417
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TgoCodingTestCandidateViewComponent, isStandalone: true, selector: "tgo-coding-test-candidate-view", inputs: { assessment: "assessment", question: "question", test: "test", expirationObservable: "expirationObservable", completeObservable: "completeObservable", isDemo: "isDemo" }, outputs: { validationStatusChanged: "validationStatusChanged", antiCheatingConfigurationChanged: "antiCheatingConfigurationChanged", fullscreenChanged: "fullscreenChanged", themeChanged: "themeChanged", codingFullscreenChanged: "codingFullscreenChanged", navigationButtonStateChanged: "navigationButtonStateChanged", configurationStateChanged: "configurationStateChanged", submissionStateChanged: "submissionStateChanged", loadingStateChanged: "loadingStateChanged" }, host: { properties: { "class": "this.hostClass" } }, providers: [
4421
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TgoCodingTestCandidateViewComponent, isStandalone: true, selector: "tgo-coding-test-candidate-view", inputs: { invitationUUID: "invitationUUID", assessment: "assessment", question: "question", test: "test", expirationObservable: "expirationObservable", completeObservable: "completeObservable", isDemo: "isDemo" }, outputs: { validationStatusChanged: "validationStatusChanged", antiCheatingConfigurationChanged: "antiCheatingConfigurationChanged", fullscreenChanged: "fullscreenChanged", themeChanged: "themeChanged", codingFullscreenChanged: "codingFullscreenChanged", navigationButtonStateChanged: "navigationButtonStateChanged", configurationStateChanged: "configurationStateChanged", submissionStateChanged: "submissionStateChanged", loadingStateChanged: "loadingStateChanged" }, host: { properties: { "class": "this.hostClass" } }, providers: [
4418
4422
  TranslocoLazyModuleUtils.getScopeProvider('tgo-coding-test', getAvailableLangs(), ROOT_TRANSLATIONS_SCOPE, (lang) => {
4419
4423
  // Fetch from app assets; demo app copies the library assets to
4420
4424
  // /assets/tgo-coding-test via project.json.
@@ -4464,7 +4468,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
4464
4468
  // use MockedApiService for local demo ONLY
4465
4469
  ApiService, //{ provide: ApiService, useClass: MockedApiService },
4466
4470
  ], template: "<ng-container *transloco=\"let t; read: 'CODING_QUESTION'\">\n @if (languages()?.length && codingLibTranslations()) {\n <tgo-coding-test\n class=\"coding-lib\"\n [assessmentId]=\"assessment!.uuid!\"\n [questionId]=\"question!.question_id!\"\n [isLAT]=\"isLAT\"\n [canAddCustomTestCases]=\"isLAT\"\n [isSQL]=\"isSQL\"\n [languages]=\"languages()\"\n [initCode]=\"initCode\"\n [mode]=\"mode\"\n [viewMode]=\"viewModes.Full\"\n [loading]=\"testResultsLoading()\"\n [companyColor]=\"companyColor\"\n [questionText]=\"question.text\"\n [testCasesStatus]=\"codingTestResults?.resume\"\n [runTestResponse]=\"codingTestResults?.listResponse!\"\n [exampleTestCases]=\"exampleTestCases\"\n [applicationTheme]=\"canopyUiTheme\"\n [translations]=\"codingLibTranslations()\"\n (codeChange)=\"updateCode($event)\"\n (runTestClick)=\"runTest()\"\n (languageChange)=\"languageChange($event)\"\n (pasteEvent)=\"screenshotPaste($event)\"\n >\n </tgo-coding-test>\n }\n</ng-container>\n\n<ngx-guided-tour\n [ngClass]=\"activeGuidedTourId$ | async\"\n [ngStyle]=\"{ '--company-color': companyColor }\"\n [class.dark]=\"canopyUiTheme === 'dark'\"\n></ngx-guided-tour>\n\n", styles: ["body.tour-open{overflow:hidden}ngx-guided-tour .guided-tour-user-input-mask{z-index:1081}ngx-guided-tour .guided-tour-spotlight-overlay{z-index:1082}ngx-guided-tour .tour-orb{z-index:1079;background-color:#625aff;box-shadow:0 0 .3rem .1rem #625aff}ngx-guided-tour .tour-orb .tour-orb-ring:after{border:1rem solid #625aff;box-shadow:0 0 .1rem .1rem #625aff}ngx-guided-tour .tour-step{z-index:1083}ngx-guided-tour .tour-step.tour-bottom .tour-arrow:before,ngx-guided-tour .tour-step.tour-bottom-right .tour-arrow:before,ngx-guided-tour .tour-step.tour-bottom-left .tour-arrow:before{width:0;height:0;content:\"\";z-index:2;border-bottom:1rem solid #ffffff;border-left:1rem solid transparent;border-right:1rem solid transparent}ngx-guided-tour .tour-step.tour-top .tour-arrow:before,ngx-guided-tour .tour-step.tour-top-right .tour-arrow:before,ngx-guided-tour .tour-step.tour-top-left .tour-arrow:before{width:0;height:0;content:\"\";z-index:2;border-top:1rem solid #ffffff;border-left:1rem solid transparent;border-right:1rem solid transparent}ngx-guided-tour .tour-step.tour-left .tour-arrow:before{width:0;height:0;content:\"\";z-index:2;border-left:1rem solid #ffffff;border-bottom:1rem solid transparent;border-top:1rem solid transparent}ngx-guided-tour .tour-step.tour-right .tour-arrow:before{width:0;height:0;content:\"\";z-index:2;border-right:1rem solid #ffffff;border-bottom:1rem solid transparent;border-top:1rem solid transparent}ngx-guided-tour .tour-step .tour-block{color:#231f1f;background-color:#fff;box-shadow:0 .4rem .6rem #4c4c4c}ngx-guided-tour .tour-step .tour-buttons button.skip-button{color:#5e5e5e}ngx-guided-tour .tour-step .tour-buttons .back-button{color:#007bff}ngx-guided-tour .tour-step .tour-buttons .next-button{background-color:#007bff;color:#fff}ngx-guided-tour .tour-step .tour-buttons .next-button:hover{background-color:#0069d9;color:#fff}.bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}body.tour-open ngx-guided-tour{--guided-tour-background-color: #ffffff;--guided-tour-text-color: #000000}body.tour-open ngx-guided-tour.dark{--guided-tour-background-color: #2d2d2d;--guided-tour-text-color: #ffffff}body.tour-open ngx-guided-tour .tour-step.hidden{display:none}body.tour-open ngx-guided-tour .tour-step h2.tour-title,body.tour-open ngx-guided-tour .tour-step h3.tour-title{font-size:20px;padding-bottom:0;margin-top:0}body.tour-open ngx-guided-tour .tour-step .tour-block{color:var(--guided-tour-text-color);background-color:var(--guided-tour-background-color);border-radius:5px;padding:37px;box-shadow:0 0 13px #bbb}body.tour-open ngx-guided-tour .tour-step .tour-buttons button{text-align:center;border-radius:5px;width:45%;height:48px;padding:0;font-weight:600}body.tour-open ngx-guided-tour .tour-step .tour-buttons button.skip-button{background:#e2e2e2}body.tour-open ngx-guided-tour .tour-step .tour-buttons button.next-button{color:#fff;background-color:#46a997}body.tour-open ngx-guided-tour .tour-step .tour-buttons button.back-button{display:none}body.tour-open ngx-guided-tour .tour-step.tour-bottom .tour-arrow:before{border-bottom:1rem solid var(--guided-tour-background-color)}body.tour-open ngx-guided-tour .tour-step.tour-top .tour-arrow:before{border-top:1rem solid var(--guided-tour-background-color)}body.tour-open ngx-guided-tour .tour-step.tour-left .tour-arrow:before{border-left:1rem solid var(--guided-tour-background-color)}body.tour-open ngx-guided-tour .tour-step.tour-right .tour-arrow:before{border-right:1rem solid var(--guided-tour-background-color)}body.tour-open ngx-guided-tour .tour-step.tour-bottom-right .tour-arrow:before{border-bottom-color:var(--guided-tour-background-color)}body.tour-open ngx-guided-tour .tour-step .tour-content{text-align:center;font-size:14px}body.tour-open ngx-guided-tour .tour-step h2.tour-title{text-align:center}body.tour-open ngx-guided-tour .tour-step h3.tour-title{text-align:center}body.tour-open ngx-guided-tour .guided-tour-spotlight-overlay{box-shadow:0 0 0 9999px #0000004d,0 0 1.5rem #00000026;border-radius:5px}body.tour-open ngx-guided-tour.lat-coding-tour h3.tour-title,body.tour-open ngx-guided-tour.lat-coding-tour h2.tour-title,body.tour-open ngx-guided-tour.lat-coding-tour .tour-content{text-align:left}body.tour-open ngx-guided-tour.lat-coding-tour .tour-content{padding-bottom:24px}body.tour-open ngx-guided-tour.lat-coding-tour .tour-buttons button.skip-button{background:#fff;border:1px solid #000000}body.tour-open ngx-guided-tour.lat-coding-tour .tour-buttons button.next-button{background-color:var(--company-color, #D410AA)}body.tour-open[theme=dark] ngx-guided-tour .tour-step .tour-block{box-shadow:none}body.tour-open[theme=dark] ngx-guided-tour .guided-tour-spotlight-overlay{box-shadow:0 0 0 9999px #000000a6,0 0 1.5rem #00000080;border-radius:5px}body.theme-dark ngx-guided-tour .tour-step .tour-block{box-shadow:none}body.theme-dark ngx-guided-tour .guided-tour-spotlight-overlay{box-shadow:0 0 0 9999px #000000a6,0 0 1.5rem #00000080;border-radius:5px}body .tgo-test-code{display:flex;flex:1;justify-content:center}body .tgo-test-code tgo-question,body .tgo-test-code tgo-micro-test-library-shell-container{display:flex}body[theme=dark] .micro-question-code .coding-lib ui-dropdown .mat-mdc-text-field-wrapper,body[theme=dark] .micro-question-code .coding-lib ui-field .mat-mdc-text-field-wrapper{background-color:transparent}.micro-question-code{display:flex}.micro-question-code .coding-lib{display:block;height:100%}\n"] }]
4467
- }], propDecorators: { assessment: [{
4471
+ }], propDecorators: { invitationUUID: [{
4472
+ type: Input,
4473
+ args: [{ required: true }]
4474
+ }], assessment: [{
4468
4475
  type: Input
4469
4476
  }], question: [{
4470
4477
  type: Input,