@testgorilla/tgo-coding-test 2.0.1 → 2.0.3

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.
Files changed (39) hide show
  1. package/README.md +8 -5
  2. package/fesm2022/testgorilla-tgo-coding-test.mjs +24 -37
  3. package/fesm2022/testgorilla-tgo-coding-test.mjs.map +1 -1
  4. package/index.d.ts +1 -1
  5. package/lib/components/tgo-coding-test-candidate-view/tgo-coding-test-candidate-view.component.d.ts +1 -1
  6. package/lib/config/index.d.ts +1 -1
  7. package/lib/config/tgo-coding-test.token.d.ts +19 -0
  8. package/lib/services/candidate-coding-test-services/candidature-api.service.d.ts +1 -1
  9. package/lib/services/candidate-coding-test-services/coding-test.service.d.ts +1 -1
  10. package/package.json +25 -21
  11. package/lib/config/tgo-coding-test.provider.d.ts +0 -26
  12. package/shared/index.d.ts +0 -4
  13. package/shared/lib/components/audio-animation/audio-animation.component.d.ts +0 -27
  14. package/shared/lib/components/audio-animation/index.d.ts +0 -1
  15. package/shared/lib/components/index.d.ts +0 -2
  16. package/shared/lib/components/vimeo-video/index.d.ts +0 -1
  17. package/shared/lib/components/vimeo-video/vimeo-video.component.d.ts +0 -24
  18. package/shared/lib/models/answer.d.ts +0 -17
  19. package/shared/lib/models/assessment.d.ts +0 -80
  20. package/shared/lib/models/environment.d.ts +0 -1
  21. package/shared/lib/models/index.d.ts +0 -8
  22. package/shared/lib/models/question-component.d.ts +0 -54
  23. package/shared/lib/models/question.d.ts +0 -102
  24. package/shared/lib/models/test.d.ts +0 -81
  25. package/shared/lib/models/translations.d.ts +0 -1
  26. package/shared/lib/models/window.d.ts +0 -6
  27. package/shared/lib/services/api/api.service.d.ts +0 -25
  28. package/shared/lib/services/api/mocked-api.service.d.ts +0 -35
  29. package/shared/lib/services/environment/environment.service.d.ts +0 -6
  30. package/shared/lib/services/index.d.ts +0 -9
  31. package/shared/lib/services/localization/languages.model.d.ts +0 -15
  32. package/shared/lib/services/localization/transloco-lazy-module-utils.d.ts +0 -11
  33. package/shared/lib/services/localization/transloco-testing.module.d.ts +0 -2
  34. package/shared/lib/services/media/media.service.d.ts +0 -29
  35. package/shared/lib/services/mixpanel/mixpanel.service.d.ts +0 -10
  36. package/shared/lib/services/theme/theme.service.d.ts +0 -8
  37. package/shared/test-mocks/assessment-test.mock.d.ts +0 -21
  38. package/shared/test-mocks/index.d.ts +0 -2
  39. package/shared/test-mocks/tgo-ui.mock.d.ts +0 -21
package/README.md CHANGED
@@ -18,16 +18,19 @@ In your application's `app.config.ts` (for standalone apps) or module providers:
18
18
 
19
19
  ```typescript
20
20
  import { ApplicationConfig } from '@angular/core';
21
- import { provideTgoCodingTest } from '@testgorilla/tgo-coding-test';
21
+ import { TGO_CODING_TEST_CONFIG } from '@testgorilla/tgo-coding-test';
22
22
  import { environment } from './environments/environment';
23
23
 
24
24
  export const appConfig: ApplicationConfig = {
25
25
  providers: [
26
26
  // Provide TGO Coding Test library configuration
27
- provideTgoCodingTest({
28
- apiUrl: environment.apiUrl,
29
- coderunnerV2Endpoint: environment.coderunnerV2Endpoint,
30
- }),
27
+ {
28
+ provide: TGO_CODING_TEST_CONFIG,
29
+ useValue: {
30
+ apiUrl: environment.apiUrl,
31
+ coderunnerV2Endpoint: environment.coderunnerV2Endpoint,
32
+ }
33
+ },
31
34
  // ... other providers
32
35
  ],
33
36
  };
@@ -1,6 +1,6 @@
1
1
  import { __decorate, __metadata } from 'tslib';
2
2
  import * as i0 from '@angular/core';
3
- import { Injectable, inject, ChangeDetectorRef, EventEmitter, ElementRef, ViewChild, Output, Input, ChangeDetectionStrategy, Component, Pipe, ViewEncapsulation, InjectionToken, signal, computed, HostBinding, makeEnvironmentProviders } from '@angular/core';
3
+ import { Injectable, inject, ChangeDetectorRef, EventEmitter, ElementRef, ViewChild, Output, Input, ChangeDetectionStrategy, Component, Pipe, ViewEncapsulation, InjectionToken, signal, computed, HostBinding } from '@angular/core';
4
4
  import * as i1$1 from '@angular/common';
5
5
  import { CommonModule } from '@angular/common';
6
6
  import { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy';
@@ -28,8 +28,8 @@ import { MatTabsModule } from '@angular/material/tabs';
28
28
  import { ActivatedRoute, RouterModule } from '@angular/router';
29
29
  import * as i1$4 from '@ngneat/transloco';
30
30
  import { translate, TRANSLOCO_SCOPE, TranslocoService, TranslocoModule } from '@ngneat/transloco';
31
- import * as i3$1 from '../esm2022/shared/index.mjs';
32
- import { ApiService, EnvironmentService, ThemeService as ThemeService$1, TranslocoLazyModuleUtils, MixpanelService, getAvailableLangs } from '../esm2022/shared/index.mjs';
31
+ import * as i3$1 from '@testgorilla/tgo-shared-lib';
32
+ import { ApiService, EnvironmentService, ThemeService as ThemeService$1, TranslocoLazyModuleUtils, MixpanelService, getAvailableLangs } from '@testgorilla/tgo-shared-lib';
33
33
  import * as i1$3 from 'ngx-guided-tour';
34
34
  import { Orientation, GuidedTourModule, GuidedTourService } from 'ngx-guided-tour';
35
35
  import { take as take$1, catchError, tap as tap$1, switchMap, map as map$1 } from 'rxjs/operators';
@@ -3350,11 +3350,30 @@ const TIMEOUT_SIGNAL = 'SIGKILL';
3350
3350
  *
3351
3351
  * This token is used to inject the runtime configuration provided
3352
3352
  * by the consuming application into library services.
3353
+ *
3354
+ * @example
3355
+ * ```typescript
3356
+ * // In your app.config.ts
3357
+ * import { TGO_CODING_TEST_CONFIG } from '@testgorilla/tgo-coding-test';
3358
+ * import { environment } from './environments/environment';
3359
+ *
3360
+ * export const appConfig: ApplicationConfig = {
3361
+ * providers: [
3362
+ * {
3363
+ * provide: TGO_CODING_TEST_CONFIG,
3364
+ * useValue: {
3365
+ * apiUrl: environment.apiUrl,
3366
+ * coderunnerV2Endpoint: environment.coderunnerV2Endpoint
3367
+ * }
3368
+ * }
3369
+ * ]
3370
+ * };
3371
+ * ```
3353
3372
  */
3354
3373
  const TGO_CODING_TEST_CONFIG = new InjectionToken('TGO_CODING_TEST_CONFIG', {
3355
3374
  providedIn: 'root',
3356
3375
  factory: () => {
3357
- throw new Error('TGO_CODING_TEST_CONFIG must be provided. Use provideTgoCodingTest() in your app.config.ts or component providers.');
3376
+ throw new Error('TGO_CODING_TEST_CONFIG must be provided. Please provide this token with your configuration in app.config.ts or component providers.');
3358
3377
  },
3359
3378
  });
3360
3379
 
@@ -4482,38 +4501,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
4482
4501
  args: ['class']
4483
4502
  }] } });
4484
4503
 
4485
- /**
4486
- * Provides the TGO Coding Test library configuration.
4487
- *
4488
- * This function should be called in the consuming application's
4489
- * app.config.ts (for standalone apps) or module providers.
4490
- *
4491
- * @param config - The configuration object containing required settings
4492
- * @returns EnvironmentProviders that can be added to the application providers
4493
- *
4494
- * @example
4495
- * ```typescript
4496
- * import { provideTgoCodingTest } from '@testgorilla/tgo-coding-test';
4497
- * import { environment } from './environments/environment';
4498
- *
4499
- * export const appConfig: ApplicationConfig = {
4500
- * providers: [
4501
- * provideTgoCodingTest({
4502
- * coderunnerV2Endpoint: environment.coderunnerV2Endpoint,
4503
- * }),
4504
- * ],
4505
- * };
4506
- * ```
4507
- */
4508
- function provideTgoCodingTest(config) {
4509
- return makeEnvironmentProviders([
4510
- {
4511
- provide: TGO_CODING_TEST_CONFIG,
4512
- useValue: config,
4513
- },
4514
- ]);
4515
- }
4516
-
4517
4504
  /*
4518
4505
  * Public API Surface of coding-test
4519
4506
  */
@@ -4522,5 +4509,5 @@ function provideTgoCodingTest(config) {
4522
4509
  * Generated bundle index. Do not edit.
4523
4510
  */
4524
4511
 
4525
- export { CodingTestConfigService, LibCodingTestService, StorageCodingService, TgoCodingTestCandidateViewComponent, TgoCodingTestComponent, ViewMode, provideTgoCodingTest };
4512
+ export { CodingTestConfigService, LibCodingTestService, StorageCodingService, TGO_CODING_TEST_CONFIG, TgoCodingTestCandidateViewComponent, TgoCodingTestComponent, ViewMode };
4526
4513
  //# sourceMappingURL=testgorilla-tgo-coding-test.mjs.map