@testgorilla/tgo-immersive-test 1.0.0 → 2.0.2
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.
- package/README.md +0 -1
- package/fesm2022/testgorilla-tgo-immersive-test.mjs +31 -41
- package/fesm2022/testgorilla-tgo-immersive-test.mjs.map +1 -1
- package/lib/components/immersive-test/immersive-test.component.d.ts +1 -1
- package/lib/components/video-countdown/video-countdown.component.d.ts +2 -2
- package/lib/models/index.d.ts +1 -1
- package/lib/models/translations.d.ts +1 -1
- package/lib/services/index.d.ts +1 -1
- package/package.json +18 -16
- package/esm2022/index.mjs +0 -5
- package/esm2022/lib/components/immersive-test/immersive-test.component.mjs +0 -257
- package/esm2022/lib/components/index.mjs +0 -6
- package/esm2022/lib/components/review-instructions-dialog/index.mjs +0 -2
- package/esm2022/lib/components/review-instructions-dialog/review-instructions-dialog.component.mjs +0 -69
- package/esm2022/lib/components/ringing-phone-animation/index.mjs +0 -2
- package/esm2022/lib/components/ringing-phone-animation/ringing-phone-animation.component.mjs +0 -43
- package/esm2022/lib/components/ringing-phone-animation/ringing-phone-animation.sound.mjs +0 -2
- package/esm2022/lib/components/video-countdown/index.mjs +0 -2
- package/esm2022/lib/components/video-countdown/video-countdown.component.mjs +0 -105
- package/esm2022/lib/models/index.mjs +0 -2
- package/esm2022/lib/models/translations.mjs +0 -3
- package/esm2022/lib/services/index.mjs +0 -3
- package/esm2022/shared/index.mjs +0 -5
- package/esm2022/shared/lib/components/audio-animation/audio-animation.component.mjs +0 -114
- package/esm2022/shared/lib/components/audio-animation/index.mjs +0 -2
- package/esm2022/shared/lib/components/index.mjs +0 -3
- package/esm2022/shared/lib/components/vimeo-video/index.mjs +0 -2
- package/esm2022/shared/lib/components/vimeo-video/vimeo-video.component.mjs +0 -101
- package/esm2022/shared/lib/models/answer.mjs +0 -2
- package/esm2022/shared/lib/models/assessment.mjs +0 -2
- package/esm2022/shared/lib/models/environment.mjs +0 -2
- package/esm2022/shared/lib/models/index.mjs +0 -9
- package/esm2022/shared/lib/models/question-component.mjs +0 -2
- package/esm2022/shared/lib/models/question.mjs +0 -2
- package/esm2022/shared/lib/models/test.mjs +0 -2
- package/esm2022/shared/lib/models/translations.mjs +0 -2
- package/esm2022/shared/lib/models/window.mjs +0 -2
- package/esm2022/shared/lib/services/api/api.service.mjs +0 -97
- package/esm2022/shared/lib/services/api/mocked-api.service.mjs +0 -131
- package/esm2022/shared/lib/services/environment/environment.service.mjs +0 -13
- package/esm2022/shared/lib/services/index.mjs +0 -10
- package/esm2022/shared/lib/services/localization/languages.model.mjs +0 -19
- package/esm2022/shared/lib/services/localization/transloco-lazy-module-utils.mjs +0 -27
- package/esm2022/shared/lib/services/localization/transloco-testing.module.mjs +0 -11
- package/esm2022/shared/lib/services/media/media.service.mjs +0 -129
- package/esm2022/shared/lib/services/mixpanel/mixpanel.service.mjs +0 -30
- package/esm2022/shared/lib/services/theme/theme.service.mjs +0 -24
- package/esm2022/shared/test-mocks/assessment-test.mock.mjs +0 -112
- package/esm2022/shared/test-mocks/index.mjs +0 -3
- package/esm2022/shared/test-mocks/tgo-ui.mock.mjs +0 -39
- package/esm2022/testgorilla-tgo-immersive-test.mjs +0 -5
- package/shared/index.d.ts +0 -4
- package/shared/lib/components/audio-animation/audio-animation.component.d.ts +0 -27
- package/shared/lib/components/audio-animation/index.d.ts +0 -1
- package/shared/lib/components/index.d.ts +0 -2
- package/shared/lib/components/vimeo-video/index.d.ts +0 -1
- package/shared/lib/components/vimeo-video/vimeo-video.component.d.ts +0 -24
- package/shared/lib/models/answer.d.ts +0 -17
- package/shared/lib/models/assessment.d.ts +0 -80
- package/shared/lib/models/environment.d.ts +0 -1
- package/shared/lib/models/index.d.ts +0 -8
- package/shared/lib/models/question-component.d.ts +0 -54
- package/shared/lib/models/question.d.ts +0 -102
- package/shared/lib/models/test.d.ts +0 -81
- package/shared/lib/models/translations.d.ts +0 -1
- package/shared/lib/models/window.d.ts +0 -6
- package/shared/lib/services/api/api.service.d.ts +0 -25
- package/shared/lib/services/api/mocked-api.service.d.ts +0 -35
- package/shared/lib/services/environment/environment.service.d.ts +0 -6
- package/shared/lib/services/index.d.ts +0 -9
- package/shared/lib/services/localization/languages.model.d.ts +0 -15
- package/shared/lib/services/localization/transloco-lazy-module-utils.d.ts +0 -11
- package/shared/lib/services/localization/transloco-testing.module.d.ts +0 -2
- package/shared/lib/services/media/media.service.d.ts +0 -29
- package/shared/lib/services/mixpanel/mixpanel.service.d.ts +0 -10
- package/shared/lib/services/theme/theme.service.d.ts +0 -8
- package/shared/test-mocks/assessment-test.mock.d.ts +0 -21
- package/shared/test-mocks/index.d.ts +0 -2
- package/shared/test-mocks/tgo-ui.mock.d.ts +0 -21
package/README.md
CHANGED
|
@@ -95,7 +95,6 @@ This library requires the following peer dependencies:
|
|
|
95
95
|
- `@angular/material` ~18.2.14 (for dialog support)
|
|
96
96
|
- `@ngneat/transloco` ~4.3.0
|
|
97
97
|
- `@testgorilla/tgo-ui` ~3.14.10
|
|
98
|
-
- `@vimeo/player` ^2.25.1
|
|
99
98
|
- `ngx-quill` ^26.0.10 (for rich text display in review instructions)
|
|
100
99
|
- `rxjs` ~7.8.1
|
|
101
100
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TranslocoLazyModuleUtils, getAvailableLangs, MediaService, ThemeService, VimeoVideoComponent, AudioAnimationComponent, ROOT_TRANSLATIONS_SCOPE } from '
|
|
2
|
-
export { MediaService, ROOT_TRANSLATIONS_SCOPE, ThemeService, TranslocoLazyModuleUtils, getAvailableLangs } from '
|
|
1
|
+
import { TranslocoLazyModuleUtils, getAvailableLangs, MediaService, ThemeService, VimeoVideoComponent, AudioAnimationComponent, ROOT_TRANSLATIONS_SCOPE } from '@testgorilla/tgo-shared-lib';
|
|
2
|
+
export { MediaService, ROOT_TRANSLATIONS_SCOPE, ThemeService, TranslocoLazyModuleUtils, getAvailableLangs } from '@testgorilla/tgo-shared-lib';
|
|
3
3
|
import { trigger, transition, style, animate } from '@angular/animations';
|
|
4
4
|
import * as i1 from '@angular/common';
|
|
5
5
|
import { CommonModule } from '@angular/common';
|
|
@@ -19,7 +19,7 @@ class VideoCountdownComponent {
|
|
|
19
19
|
startFrom = 5;
|
|
20
20
|
endAt = 0;
|
|
21
21
|
interval = 1325;
|
|
22
|
-
|
|
22
|
+
finished = new EventEmitter();
|
|
23
23
|
isActive = false;
|
|
24
24
|
displayNum = {
|
|
25
25
|
key: this.startFrom,
|
|
@@ -55,7 +55,7 @@ class VideoCountdownComponent {
|
|
|
55
55
|
this.updateNumber();
|
|
56
56
|
this.cdr.markForCheck();
|
|
57
57
|
if (this.displayNum && this.displayNum.value === this.endAt) {
|
|
58
|
-
this.
|
|
58
|
+
this.finished.emit();
|
|
59
59
|
this.isActive = false;
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
@@ -72,8 +72,8 @@ class VideoCountdownComponent {
|
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
76
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
75
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: VideoCountdownComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
76
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: VideoCountdownComponent, isStandalone: true, selector: "tgo-video-countdown", inputs: { startFrom: "startFrom", endAt: "endAt", interval: "interval" }, outputs: { finished: "finished" }, ngImport: i0, template: "<div class=\"video-countdown\">\n <div\n class=\"video-countdown-element\"\n *ngFor=\"let num of [displayNum]\"\n @zoomInOut\n >\n {{ num.value }}\n </div>\n</div>\n\n", styles: [".video-countdown{display:flex;justify-content:center}.video-countdown-element{position:absolute;font-size:80px;font-weight:700;line-height:1;-webkit-user-select:none;user-select:none;opacity:1;backface-visibility:hidden}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], animations: [
|
|
77
77
|
trigger('zoomInOut', [
|
|
78
78
|
transition(':enter', [
|
|
79
79
|
style({ transform: 'scale(0)', opacity: 0 }),
|
|
@@ -88,7 +88,7 @@ class VideoCountdownComponent {
|
|
|
88
88
|
]),
|
|
89
89
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
90
90
|
}
|
|
91
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
91
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: VideoCountdownComponent, decorators: [{
|
|
92
92
|
type: Component,
|
|
93
93
|
args: [{ selector: 'tgo-video-countdown', animations: [
|
|
94
94
|
trigger('zoomInOut', [
|
|
@@ -103,14 +103,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
103
103
|
animate('200ms ease-in', style({ transform: 'scale(0)', opacity: 0 })),
|
|
104
104
|
]),
|
|
105
105
|
]),
|
|
106
|
-
], changeDetection: ChangeDetectionStrategy.OnPush,
|
|
106
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule], template: "<div class=\"video-countdown\">\n <div\n class=\"video-countdown-element\"\n *ngFor=\"let num of [displayNum]\"\n @zoomInOut\n >\n {{ num.value }}\n </div>\n</div>\n\n", styles: [".video-countdown{display:flex;justify-content:center}.video-countdown-element{position:absolute;font-size:80px;font-weight:700;line-height:1;-webkit-user-select:none;user-select:none;opacity:1;backface-visibility:hidden}\n"] }]
|
|
107
107
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { startFrom: [{
|
|
108
108
|
type: Input
|
|
109
109
|
}], endAt: [{
|
|
110
110
|
type: Input
|
|
111
111
|
}], interval: [{
|
|
112
112
|
type: Input
|
|
113
|
-
}],
|
|
113
|
+
}], finished: [{
|
|
114
114
|
type: Output
|
|
115
115
|
}] } });
|
|
116
116
|
|
|
@@ -144,12 +144,12 @@ class RingingPhoneAnimationComponent {
|
|
|
144
144
|
this.audio.volume = 0.15;
|
|
145
145
|
void this.audio.play();
|
|
146
146
|
}
|
|
147
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
148
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
147
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: RingingPhoneAnimationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
148
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: RingingPhoneAnimationComponent, isStandalone: true, selector: "tgo-ringing-phone-animation", inputs: { isRinging: "isRinging" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"ringing-phone-animation-wrapper\">\n <section class=\"ringing-phone-animation-container\">\n <div class=\"ringing-effect\" *ngIf=\"ringingSignal()\">\n <div class=\"ringing-line first-line\"></div>\n <div class=\"ringing-line second-line\"></div>\n <div class=\"ringing-line third-line\"></div>\n </div>\n <svg width=\"76\" height=\"30\" viewBox=\"0 0 76 30\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M9.33348 28.5122L1.66681 21.0122C1.00014 20.3455 0.666809 19.5678 0.666809 18.6789C0.666809 17.79 1.00014 17.0122 1.66681 16.3455C6.5557 11.0678 12.1946 7.10943 18.5835 4.47054C24.9724 1.83165 31.4446 0.512207 38.0001 0.512207C44.5557 0.512207 51.014 1.83165 57.3751 4.47054C63.7363 7.10943 69.389 11.0678 74.3335 16.3455C75.0001 17.0122 75.3335 17.79 75.3335 18.6789C75.3335 19.5678 75.0001 20.3455 74.3335 21.0122L66.6668 28.5122C66.0557 29.1233 65.3474 29.4567 64.5418 29.5122C63.7363 29.5678 63.0001 29.3455 62.3335 28.8455L52.6668 21.5122C52.2224 21.1789 51.889 20.79 51.6668 20.3455C51.4446 19.9011 51.3335 19.4011 51.3335 18.8455V9.34554C49.2224 8.67888 47.0557 8.1511 44.8335 7.76221C42.6113 7.37332 40.3335 7.17887 38.0001 7.17887C35.6668 7.17887 33.389 7.37332 31.1668 7.76221C28.9446 8.1511 26.7779 8.67888 24.6668 9.34554V18.8455C24.6668 19.4011 24.5557 19.9011 24.3335 20.3455C24.1113 20.79 23.7779 21.1789 23.3335 21.5122L13.6668 28.8455C13.0001 29.3455 12.264 29.5678 11.4585 29.5122C10.6529 29.4567 9.94459 29.1233 9.33348 28.5122ZM18.0001 11.6789C16.389 12.5122 14.8335 13.4705 13.3335 14.5539C11.8335 15.6372 10.2779 16.8455 8.66681 18.1789L12.0001 21.5122L18.0001 16.8455V11.6789ZM58.0001 11.8455V16.8455L64.0001 21.5122L67.3335 18.3455C65.7224 16.9011 64.1668 15.6511 62.6668 14.5955C61.1668 13.54 59.6113 12.6233 58.0001 11.8455Z\"\n fill=\"white\"\n />\n </svg>\n </section>\n</div>\n\n", styles: [".ringing-phone-animation-wrapper{display:flex;justify-content:center;align-items:center}.ringing-phone-animation-wrapper .ringing-phone-animation-container{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px}.ringing-phone-animation-wrapper .ringing-phone-animation-container .ringing-effect{display:flex;gap:15px;opacity:1;animation:blink-wrapper 1.4s infinite;animation-delay:.8s}.ringing-phone-animation-wrapper .ringing-phone-animation-container .ringing-effect .ringing-line{width:6px;height:16px;background-color:#fff;opacity:0}.ringing-phone-animation-wrapper .ringing-phone-animation-container .ringing-effect .first-line{animation:blink-line 1.4s infinite;animation-delay:.1s;transform:rotate(-45deg)}.ringing-phone-animation-wrapper .ringing-phone-animation-container .ringing-effect .second-line{animation:blink-line 1.4s infinite;animation-delay:.3s;transform:translateY(-50%)}.ringing-phone-animation-wrapper .ringing-phone-animation-container .ringing-effect .third-line{animation:blink-line 1.4s infinite;animation-delay:.6s;transform:rotate(45deg)}.ringing-phone-animation-wrapper .ringing-phone-animation-container .answer-btn{margin-top:20px;padding:10px 20px;background-color:#fff;border:none;border-radius:20px;cursor:pointer;font-size:16px}@keyframes blink-line{0%,49%{opacity:0}50%,to{opacity:1}}@keyframes blink-wrapper{0%,49%{opacity:1}50%,to{opacity:0}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
149
149
|
}
|
|
150
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
150
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: RingingPhoneAnimationComponent, decorators: [{
|
|
151
151
|
type: Component,
|
|
152
|
-
args: [{ selector: 'tgo-ringing-phone-animation',
|
|
152
|
+
args: [{ selector: 'tgo-ringing-phone-animation', imports: [CommonModule], template: "<div class=\"ringing-phone-animation-wrapper\">\n <section class=\"ringing-phone-animation-container\">\n <div class=\"ringing-effect\" *ngIf=\"ringingSignal()\">\n <div class=\"ringing-line first-line\"></div>\n <div class=\"ringing-line second-line\"></div>\n <div class=\"ringing-line third-line\"></div>\n </div>\n <svg width=\"76\" height=\"30\" viewBox=\"0 0 76 30\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M9.33348 28.5122L1.66681 21.0122C1.00014 20.3455 0.666809 19.5678 0.666809 18.6789C0.666809 17.79 1.00014 17.0122 1.66681 16.3455C6.5557 11.0678 12.1946 7.10943 18.5835 4.47054C24.9724 1.83165 31.4446 0.512207 38.0001 0.512207C44.5557 0.512207 51.014 1.83165 57.3751 4.47054C63.7363 7.10943 69.389 11.0678 74.3335 16.3455C75.0001 17.0122 75.3335 17.79 75.3335 18.6789C75.3335 19.5678 75.0001 20.3455 74.3335 21.0122L66.6668 28.5122C66.0557 29.1233 65.3474 29.4567 64.5418 29.5122C63.7363 29.5678 63.0001 29.3455 62.3335 28.8455L52.6668 21.5122C52.2224 21.1789 51.889 20.79 51.6668 20.3455C51.4446 19.9011 51.3335 19.4011 51.3335 18.8455V9.34554C49.2224 8.67888 47.0557 8.1511 44.8335 7.76221C42.6113 7.37332 40.3335 7.17887 38.0001 7.17887C35.6668 7.17887 33.389 7.37332 31.1668 7.76221C28.9446 8.1511 26.7779 8.67888 24.6668 9.34554V18.8455C24.6668 19.4011 24.5557 19.9011 24.3335 20.3455C24.1113 20.79 23.7779 21.1789 23.3335 21.5122L13.6668 28.8455C13.0001 29.3455 12.264 29.5678 11.4585 29.5122C10.6529 29.4567 9.94459 29.1233 9.33348 28.5122ZM18.0001 11.6789C16.389 12.5122 14.8335 13.4705 13.3335 14.5539C11.8335 15.6372 10.2779 16.8455 8.66681 18.1789L12.0001 21.5122L18.0001 16.8455V11.6789ZM58.0001 11.8455V16.8455L64.0001 21.5122L67.3335 18.3455C65.7224 16.9011 64.1668 15.6511 62.6668 14.5955C61.1668 13.54 59.6113 12.6233 58.0001 11.8455Z\"\n fill=\"white\"\n />\n </svg>\n </section>\n</div>\n\n", styles: [".ringing-phone-animation-wrapper{display:flex;justify-content:center;align-items:center}.ringing-phone-animation-wrapper .ringing-phone-animation-container{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px}.ringing-phone-animation-wrapper .ringing-phone-animation-container .ringing-effect{display:flex;gap:15px;opacity:1;animation:blink-wrapper 1.4s infinite;animation-delay:.8s}.ringing-phone-animation-wrapper .ringing-phone-animation-container .ringing-effect .ringing-line{width:6px;height:16px;background-color:#fff;opacity:0}.ringing-phone-animation-wrapper .ringing-phone-animation-container .ringing-effect .first-line{animation:blink-line 1.4s infinite;animation-delay:.1s;transform:rotate(-45deg)}.ringing-phone-animation-wrapper .ringing-phone-animation-container .ringing-effect .second-line{animation:blink-line 1.4s infinite;animation-delay:.3s;transform:translateY(-50%)}.ringing-phone-animation-wrapper .ringing-phone-animation-container .ringing-effect .third-line{animation:blink-line 1.4s infinite;animation-delay:.6s;transform:rotate(45deg)}.ringing-phone-animation-wrapper .ringing-phone-animation-container .answer-btn{margin-top:20px;padding:10px 20px;background-color:#fff;border:none;border-radius:20px;cursor:pointer;font-size:16px}@keyframes blink-line{0%,49%{opacity:0}50%,to{opacity:1}}@keyframes blink-wrapper{0%,49%{opacity:1}50%,to{opacity:0}}\n"] }]
|
|
153
153
|
}], propDecorators: { isRinging: [{
|
|
154
154
|
type: Input
|
|
155
155
|
}] } });
|
|
@@ -178,8 +178,8 @@ class ReviewInstructionsDialogComponent {
|
|
|
178
178
|
this.translations = await firstValueFrom(this.translocoService.selectTranslateObject(`INSTRUCTIONS_MODAL`, {}, this.translationScope));
|
|
179
179
|
this.cdr.markForCheck();
|
|
180
180
|
}
|
|
181
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
182
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
181
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ReviewInstructionsDialogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: TRANSLOCO_SCOPE }, { token: i1$1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
182
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: ReviewInstructionsDialogComponent, isStandalone: true, selector: "tgo-review-instructions-dialog", providers: [
|
|
183
183
|
TranslocoLazyModuleUtils.getScopeProvider('tgo-immersive-test-review-instructions', getAvailableLangs(), 'INSTRUCTIONS_MODAL', (lang) => {
|
|
184
184
|
// Fetch from app assets; demo app copies the library assets to
|
|
185
185
|
// /assets/tgo-immersive-test via project.json.
|
|
@@ -188,7 +188,7 @@ class ReviewInstructionsDialogComponent {
|
|
|
188
188
|
}),
|
|
189
189
|
], ngImport: i0, template: "<ng-container *transloco=\"let t\">\n <ui-dialog\n class=\"dialog-wrapper\"\n [title]=\"translations['TITLE']\"\n [secondaryButtonLabel]=\"translations['CLOSE']\"\n (secondaryButtonClickEvent)=\"closeDialog()\"\n >\n <section class=\"containers-section\">\n <div class=\"immersive-test-instructions-container\">\n <div\n class=\"background-information-container\"\n *ngIf=\"dialogData?.backgroundInfoData\"\n >\n <ui-card class=\"background-information-card\" variant=\"neutral\">\n <quill-view\n theme=\"snow\"\n [content]=\"dialogData?.backgroundInfoData\"\n class=\"content-container notranslate\"\n ></quill-view>\n </ui-card>\n </div>\n\n <div\n class=\"inner-instructions-container\"\n *ngIf=\"dialogData?.instructionsInfoData\"\n >\n <ui-card class=\"instructions-card\" variant=\"educative\">\n <quill-view\n theme=\"snow\"\n [content]=\"dialogData?.instructionsInfoData\"\n class=\"content-container notranslate\"\n ></quill-view>\n </ui-card>\n </div>\n </div>\n </section>\n </ui-dialog>\n</ng-container>\n\n", styles: ["@charset \"UTF-8\";:host .dialog-wrapper{width:100%}:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section{width:100%;display:flex;flex-direction:column;justify-content:center;padding:.3rem .8rem}:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container{display:flex;justify-content:space-between;width:100%;gap:2.5rem}:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .background-information-container{display:flex;flex-direction:column;width:100%;max-width:450px}:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .background-information-container .background-information-card .content-container .ql-container .ql-editor{padding:0}:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .background-information-container .background-information-card .content-container .ql-container .ql-editor h1,:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .background-information-container .background-information-card .content-container .ql-container .ql-editor h2,:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .background-information-container .background-information-card .content-container .ql-container .ql-editor h3,:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .background-information-container .background-information-card .content-container .ql-container .ql-editor h4,:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .background-information-container .background-information-card .content-container .ql-container .ql-editor h5,:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .background-information-container .background-information-card .content-container .ql-container .ql-editor h6{font-size:16px;font-weight:700;line-height:20px;margin-bottom:.6rem}:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .background-information-container .background-information-card .content-container .ql-container .ql-editor p,:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .background-information-container .background-information-card .content-container .ql-container .ql-editor span{font-size:14px;margin-bottom:1.5rem}:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .background-information-container .background-information-card .content-container .ql-container .ql-editor p:last-child,:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .background-information-container .background-information-card .content-container .ql-container .ql-editor span:last-child{margin-bottom:0}:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .background-information-container .background-information-card .content-container .ql-container .ql-editor br{display:none}:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .inner-instructions-container{display:flex;flex-direction:column;gap:2.5rem;width:100%;max-width:450px}:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .inner-instructions-container .instructions-card .card-container{border-width:1px}:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .inner-instructions-container .instructions-card .card-container .ql-container .ql-editor{padding:0}:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .inner-instructions-container .instructions-card .card-container .ql-container .ql-editor h1,:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .inner-instructions-container .instructions-card .card-container .ql-container .ql-editor h2,:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .inner-instructions-container .instructions-card .card-container .ql-container .ql-editor h3,:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .inner-instructions-container .instructions-card .card-container .ql-container .ql-editor h4,:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .inner-instructions-container .instructions-card .card-container .ql-container .ql-editor h5,:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .inner-instructions-container .instructions-card .card-container .ql-container .ql-editor h6{font-size:16px;font-weight:700;line-height:20px;margin-bottom:.6rem}:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .inner-instructions-container .instructions-card .card-container .ql-container .ql-editor p:before,:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .inner-instructions-container .instructions-card .card-container .ql-container .ql-editor span:before{content:\"\\2022 \";color:#000;font-size:1em;position:absolute;left:8px;top:0}:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .inner-instructions-container .instructions-card .card-container .ql-container .ql-editor p,:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .inner-instructions-container .instructions-card .card-container .ql-container .ql-editor span{position:relative;font-size:14px;padding-left:22px;margin:3px 0 0}:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .inner-instructions-container .instructions-card .card-container .ql-container .ql-editor ul,:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .inner-instructions-container .instructions-card .card-container .ql-container .ql-editor ol{padding-left:10px;margin:5px 0 0}:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .inner-instructions-container .instructions-card .card-container .ql-container .ql-editor ul li,:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .inner-instructions-container .instructions-card .card-container .ql-container .ql-editor ol li{font-size:14px;padding-left:0}:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .inner-instructions-container .instructions-card .card-container .ql-container .ql-editor ul li span:before,:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .inner-instructions-container .instructions-card .card-container .ql-container .ql-editor ol li span:before{top:-3px}:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .inner-instructions-container .instructions-card .card-container .ql-container .ql-editor ul li span,:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .inner-instructions-container .instructions-card .card-container .ql-container .ql-editor ol li span{padding-left:12px}:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .inner-instructions-container .instructions-card .card-container .ql-container .ql-editor br{display:none}@media (max-width: 799px){:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section{padding-top:0}:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container{flex-wrap:wrap}:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .background-information-container{max-width:none}:host .dialog-wrapper ::ng-deep .mat-mdc-dialog-content .containers-section .immersive-test-instructions-container .inner-instructions-container{max-width:none}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "directive", type: i3.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: DialogComponentModule }, { kind: "component", type: i4.DialogComponent, selector: "ui-dialog", inputs: ["title", "showCloseButton", "canCloseFn", "secondaryButtonLabel", "footerMessage", "primaryButtonLabel", "primaryButtonIconName", "secondaryButtonType", "primaryButtonType", "primaryButtonDataTestId", "secondaryButtonDataTestId", "companyColor", "applicationTheme", "disablePrimaryButton", "disableClose", "shouldDisableButtons", "ariaLabelledby", "ariaDescribedby", "keyboardOpen", "primaryButtonIconPosition"], outputs: ["closeEvent", "secondaryButtonClickEvent", "primaryButtonClickEvent"] }, { kind: "ngmodule", type: CardComponentModule }, { kind: "component", type: i4.CardComponent, selector: "ui-card", inputs: ["size", "variant", "applicationTheme", "errors", "errorsSize", "selected", "allowSelect", "allowFocus"], outputs: ["cardSelected"] }, { kind: "component", type: QuillViewComponent, selector: "quill-view", inputs: ["format", "theme", "modules", "debug", "formats", "sanitize", "beforeRender", "strict", "content", "customModules", "customOptions"], outputs: ["onEditorCreated"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
190
190
|
}
|
|
191
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
191
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ReviewInstructionsDialogComponent, decorators: [{
|
|
192
192
|
type: Component,
|
|
193
193
|
args: [{ selector: 'tgo-review-instructions-dialog', providers: [
|
|
194
194
|
TranslocoLazyModuleUtils.getScopeProvider('tgo-immersive-test-review-instructions', getAvailableLangs(), 'INSTRUCTIONS_MODAL', (lang) => {
|
|
@@ -197,7 +197,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
197
197
|
const url = new URL(`assets/tgo-immersive-test/i18n/${lang}.json`, document.baseURI).href;
|
|
198
198
|
return fetch(url).then((res) => res.json());
|
|
199
199
|
}),
|
|
200
|
-
], changeDetection: ChangeDetectionStrategy.OnPush,
|
|
200
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
201
201
|
CommonModule,
|
|
202
202
|
TranslocoModule,
|
|
203
203
|
DialogComponentModule,
|
|
@@ -293,13 +293,13 @@ class ImmersiveTestComponent {
|
|
|
293
293
|
this.isAnswering.set(true);
|
|
294
294
|
this.mediaService
|
|
295
295
|
.recordAudio()
|
|
296
|
-
.pipe(takeUntil(this.unsubscribe$), catchError(
|
|
296
|
+
.pipe(takeUntil(this.unsubscribe$), catchError(error => {
|
|
297
297
|
console.error('Error recording answer', error);
|
|
298
298
|
this.isAnswering.set(false);
|
|
299
299
|
this.startCountdown();
|
|
300
300
|
throw error;
|
|
301
301
|
}))
|
|
302
|
-
.subscribe(
|
|
302
|
+
.subscribe(event => {
|
|
303
303
|
if (event.type === 'complete') {
|
|
304
304
|
if (!this.test.is_preview_mode) {
|
|
305
305
|
this.submissionStateChanged.emit({ file: event.file, text: '' });
|
|
@@ -351,9 +351,7 @@ class ImmersiveTestComponent {
|
|
|
351
351
|
this.cdr.markForCheck();
|
|
352
352
|
}
|
|
353
353
|
initExpirationSubscription() {
|
|
354
|
-
this.expirationObservable
|
|
355
|
-
?.pipe(takeUntil(this.unsubscribe$))
|
|
356
|
-
.subscribe(() => {
|
|
354
|
+
this.expirationObservable?.pipe(takeUntil(this.unsubscribe$)).subscribe(() => {
|
|
357
355
|
if (!this.test?.is_preview_mode) {
|
|
358
356
|
if (this.mediaService.isRecording()) {
|
|
359
357
|
this.stopRecording();
|
|
@@ -365,9 +363,7 @@ class ImmersiveTestComponent {
|
|
|
365
363
|
});
|
|
366
364
|
}
|
|
367
365
|
initMediaAccessSubscription() {
|
|
368
|
-
this.mediaAccessChanged
|
|
369
|
-
?.pipe(takeUntil(this.unsubscribe$))
|
|
370
|
-
.subscribe((selectedMediaDevices) => {
|
|
366
|
+
this.mediaAccessChanged?.pipe(takeUntil(this.unsubscribe$)).subscribe(selectedMediaDevices => {
|
|
371
367
|
this.mediaService.setSelectedMediaDevices(selectedMediaDevices);
|
|
372
368
|
if (!this.isCountingDown()) {
|
|
373
369
|
void this.startCountdown();
|
|
@@ -375,37 +371,31 @@ class ImmersiveTestComponent {
|
|
|
375
371
|
void this.initVideoStream();
|
|
376
372
|
});
|
|
377
373
|
}
|
|
378
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
379
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
374
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ImmersiveTestComponent, deps: [{ token: TRANSLOCO_SCOPE }], target: i0.ɵɵFactoryTarget.Component });
|
|
375
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: ImmersiveTestComponent, isStandalone: true, selector: "tgo-immersive-test", inputs: { question: "question", test: "test", isFirstQuestion: "isFirstQuestion", expirationObservable: "expirationObservable", selectedMediaDevices: "selectedMediaDevices", mediaAccessChanged: "mediaAccessChanged" }, outputs: { submissionStateChanged: "submissionStateChanged", loadingStateChanged: "loadingStateChanged", requestMediaAccess: "requestMediaAccess" }, providers: [
|
|
380
376
|
TranslocoLazyModuleUtils.getScopeProvider('tgo-immersive-test', getAvailableLangs(), ROOT_TRANSLATIONS_SCOPE, (lang) => {
|
|
381
377
|
// Fetch from app assets; demo app copies the library assets to
|
|
382
378
|
// /assets/tgo-immersive-test via project.json.
|
|
383
379
|
const url = new URL(`assets/tgo-immersive-test/i18n/${lang}.json`, document.baseURI).href;
|
|
384
|
-
return fetch(url).then(
|
|
380
|
+
return fetch(url).then(res => res.json());
|
|
385
381
|
}),
|
|
386
382
|
DialogService,
|
|
387
383
|
ThemeService,
|
|
388
|
-
], viewQueries: [{ propertyName: "videoElement", first: true, predicate: ["video"], descendants: true }, { propertyName: "audioElement", first: true, predicate: ["audio"], descendants: true }], ngImport: i0, template: "<div class=\"immersive-test\">\n <div class=\"test-container\">\n <div\n class=\"media-container\"\n [class.is-video-visible]=\"isQuestionPlaying() && !isAnswering()\"\n [class.is-playing]=\"isVideoPlaying()\"\n [class.is-answering]=\"isAnswering()\"\n >\n <div class=\"candidate-no-camera\" *ngIf=\"!candidateVideoStreamReady()\">\n <h3> </h3>\n <tgo-audio-animation\n *ngIf=\"isAnswering()\"\n [volume]=\"volume()\"\n [fakeData]=\"false\"\n ></tgo-audio-animation>\n <ui-icon name=\"User-profile-in-line\" color=\"white\" size=\"24\"></ui-icon>\n <h3 class=\"bold\">{{ translations['YOU'] }}</h3>\n </div>\n <div class=\"candidate-camera\" [hidden]=\"!candidateVideoStreamReady()\">\n <tgo-audio-animation\n *ngIf=\"isAnswering() && candidateVideoStreamReady()\"\n [volume]=\"volume()\"\n [fakeData]=\"false\"\n ></tgo-audio-animation>\n <video height #video id=\"video\" playsinline (loadedmetadata)=\"onVideoLoad()\"></video>\n <h3 class=\"bold\" *ngIf=\"candidateVideoStreamReady()\">\n {{ translations['YOU'] }}\n </h3>\n </div>\n <tgo-audio-animation *ngIf=\"isVideoPlaying()\" [fakeData]=\"true\"></tgo-audio-animation>\n <tgo-vimeo-video\n *ngIf=\"isVideo\"\n [isPlaying]=\"isQuestionPlaying()\"\n [videoUrl]=\"fileUrl\"\n (videoEnded)=\"startCountdown()\"\n (videoStarted)=\"isVideoPlaying.set(true)\"\n ></tgo-vimeo-video>\n <div class=\"audio-info\" *ngIf=\"isQuestionPlaying() && !isVideo\">\n <ui-icon name=\"User-profile-filled\" color=\"white\" size=\"80\"></ui-icon>\n </div>\n <div class=\"start\" *ngIf=\"isFirstQuestion && !isQuestionPlaying()\">\n <tgo-ringing-phone-animation [isRinging]=\"true\"></tgo-ringing-phone-animation>\n <ui-button\n [label]=\"translations['ANSWER']\"\n [class.white-btn]=\"test.is_preview_mode\"\n variant=\"primary\"\n [companyColor]=\"companyColor\"\n (click)=\"startQuestion()\"\n data-testid=\"immersive-test.start-question-btn\"\n ></ui-button>\n </div>\n <div class=\"overlay\" *ngIf=\"isAnswering() || isCountingDown()\" [@fadeInFadeOut]>\n <div class=\"answer\" *ngIf=\"!audioUrl() && isAnswering()\">\n <div>\n <h3 class=\"uppercase recording-started\">\n <span class=\"recording-dot\"></span>{{ translations['RECORDING_STARTED'] }}\n </h3>\n <h1 class=\"bold\">\n {{ translations['ANSWER_THE_QUESTION'] }}\n </h1>\n </div>\n <ui-button\n [label]=\"translations['ANSWER_COMPLETED']\"\n [class.white-btn]=\"test.is_preview_mode\"\n variant=\"primary\"\n [companyColor]=\"companyColor\"\n (click)=\"stopRecording()\"\n data-testid=\"immersive-test.stop-recording-btn\"\n ></ui-button>\n </div>\n <div class=\"answer\" *ngIf=\"isCountingDown()\">\n <div>\n <h1 class=\"bold\">\n {{ translations['GET_READY'] }}\n </h1>\n </div>\n <tgo-video-countdown (finish)=\"startRecordAnswer()\"></tgo-video-countdown>\n <div> </div>\n </div>\n <div class=\"preview\" [class.hidden]=\"!audioUrl()\" *ngIf=\"test.is_preview_mode\">\n <h4>{{ translations['AUDIO_READY'] }}</h4>\n <p>{{ translations['AUDIO_PREVIEW'] }}</p>\n <audio #audio controls></audio>\n </div>\n </div>\n </div>\n <div class=\"media-info\">\n <h3 class=\"bold\">{{ translations['CUSTOMER'] }}</h3>\n <ui-button\n [hidden]=\"!test.test_instruction && !test.intro_text\"\n class=\"review-button\"\n [label]=\"translations['REVIEW_INSTRUCTIONS']\"\n variant=\"secondary\"\n size=\"small\"\n (click)=\"openReviewInstructionsDialog()\"\n data-testid=\"immersive-test.review-instructions-btn\"\n ></ui-button>\n </div>\n </div>\n</div>\n", styles: [".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}.immersive-test{padding:0 64px;margin-top:40px}.immersive-test .media-info{width:100%;display:flex;justify-content:space-between;align-items:center;background:#242424a8;background-color:#242424;border-bottom-left-radius:10px;border-bottom-right-radius:10px;padding:13px 32px;color:#fff}.immersive-test .media-info ::ng-deep ui-button button{border-color:#fff;color:#fff}.immersive-test .test-container{min-width:360px;max-width:1312px;min-height:725px;height:min(725px,100%,max(100vw - 200px,100vh - 200px,200px));border-radius:10px;display:flex;flex-direction:column;justify-content:space-between;position:relative;background-color:#242424}.immersive-test .media-container{position:relative;color:#fff;flex-grow:1;border-top-left-radius:10px;border-top-right-radius:10px;aspect-ratio:16/9}.immersive-test .media-container .candidate-no-camera{position:absolute;width:200px;aspect-ratio:16/9;z-index:3;top:32px;left:32px;border-radius:10px;background-color:#1a47aa;display:flex;justify-content:space-between;flex-direction:column;padding:16px}.immersive-test .media-container .candidate-no-camera ui-icon{margin:auto}.immersive-test .media-container .candidate-camera{position:absolute;width:200px;top:32px;left:32px;z-index:3}.immersive-test .media-container .candidate-camera video{width:200px;border-radius:10px}.immersive-test .media-container .candidate-camera h3{position:absolute;bottom:16px;left:16px}.immersive-test .media-container tgo-audio-animation{position:absolute;top:32px;right:32px;z-index:1}.immersive-test .media-container tgo-vimeo-video{display:none;position:absolute;height:100%;width:100%}.immersive-test .media-container.is-video-visible tgo-vimeo-video{display:block}.immersive-test .media-container.is-playing{border:4px solid #0165FC;border-bottom-width:3px}.immersive-test .media-container.is-answering .candidate-camera tgo-audio-animation,.immersive-test .media-container.is-answering .candidate-no-camera tgo-audio-animation{position:absolute;top:16px;right:16px}.immersive-test .media-container.is-answering .candidate-camera video,.immersive-test .media-container.is-answering .candidate-no-camera{border:3px solid #0165FC;border-radius:10px}.immersive-test .media-container.is-answering tgo-vimeo-video{display:block}.immersive-test .media-container .start,.immersive-test .media-container .audio-info,.immersive-test .media-container .overlay,.immersive-test .media-container .answer{display:flex;justify-content:center;align-items:center;flex-direction:column;gap:40px;height:100%}.immersive-test .media-container .preview{height:100%;display:flex;align-items:center;flex-direction:column;justify-content:flex-end;padding:24px}.immersive-test .media-container .preview p{color:#d3d3d3;margin:8px 0}.immersive-test .media-container .preview audio{margin:16px 0}.immersive-test .media-container .preview.hidden{display:none}.immersive-test h3,.immersive-test h4{color:#fff}.immersive-test .bold{font-weight:700}.immersive-test ui-button.review-button ::ng-deep button{border:1px solid #ffffff}.immersive-test ui-button.white-btn ::ng-deep button{background-color:#fff;border-color:#fff;color:#000}.immersive-test ui-button.white-btn ::ng-deep button:hover{background-color:#666!important}.immersive-test .overlay{top:0;position:absolute;width:100%;height:100%;background-color:#242424e0;z-index:2;border-radius:10px}.immersive-test .overlay h1,.immersive-test .overlay h3{color:#fff;text-align:center}.immersive-test .overlay h3{margin-bottom:10px}.immersive-test tgo-radial-progress{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.immersive-test .uppercase{text-transform:uppercase}.immersive-test .recording-started{display:flex;align-items:center;justify-content:center;gap:10px}.immersive-test .recording-dot{background-color:#ff3003;display:inline-block;width:20px;height:20px;border-radius:50%}@media screen and (max-width: 600px){.immersive-test{padding:0 24px;margin-top:16px}}\n"], dependencies: [{ kind: "ngmodule", type: TranslocoModule }, { kind: "ngmodule", type: ButtonComponentModule }, { kind: "component", type: i4.ButtonComponent, selector: "ui-button", inputs: ["size", "variant", "label", "iconPosition", "justIcon", "iconName", "disabled", "loading", "fullWidth", "url", "urlTarget", "value", "tooltip", "isPremium", "type", "companyColor", "buttonBadgeConfig", "applicationTheme", "disabledScaleOnClick", "ariaLabel", "ariaRequired", "ariaLabelledby", "ariaDescribedby", "preventDefault", "hasBackground", "tooltipPosition", "role", "iconFilled"], outputs: ["buttonClickEvent", "buttonHoverEvent"] }, { kind: "ngmodule", type: IconComponentModule }, { kind: "component", type: i4.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: VimeoVideoComponent, selector: "tgo-vimeo-video", inputs: ["videoUrl", "isPlaying", "options"], outputs: ["videoEnded", "videoStarted"] }, { kind: "component", type: VideoCountdownComponent, selector: "tgo-video-countdown", inputs: ["startFrom", "endAt", "interval"], outputs: ["finish"] }, { kind: "component", type: RingingPhoneAnimationComponent, selector: "tgo-ringing-phone-animation", inputs: ["isRinging"] }, { kind: "component", type: AudioAnimationComponent, selector: "tgo-audio-animation", inputs: ["volume", "fakeData"] }], animations: [
|
|
384
|
+
], viewQueries: [{ propertyName: "videoElement", first: true, predicate: ["video"], descendants: true }, { propertyName: "audioElement", first: true, predicate: ["audio"], descendants: true }], ngImport: i0, template: "<div class=\"immersive-test\">\n <div class=\"test-container\">\n <div\n class=\"media-container\"\n [class.is-video-visible]=\"isQuestionPlaying() && !isAnswering()\"\n [class.is-playing]=\"isVideoPlaying()\"\n [class.is-answering]=\"isAnswering()\"\n >\n <div class=\"candidate-no-camera\" *ngIf=\"!candidateVideoStreamReady()\">\n <h3> </h3>\n <tgo-audio-animation\n *ngIf=\"isAnswering()\"\n [volume]=\"volume()\"\n [fakeData]=\"false\"\n ></tgo-audio-animation>\n <ui-icon name=\"User-profile-in-line\" color=\"white\" size=\"24\"></ui-icon>\n <h3 class=\"bold\">{{ translations['YOU'] }}</h3>\n </div>\n <div class=\"candidate-camera\" [hidden]=\"!candidateVideoStreamReady()\">\n <tgo-audio-animation\n *ngIf=\"isAnswering() && candidateVideoStreamReady()\"\n [volume]=\"volume()\"\n [fakeData]=\"false\"\n ></tgo-audio-animation>\n <video height #video id=\"video\" playsinline (loadedmetadata)=\"onVideoLoad()\"></video>\n <h3 class=\"bold\" *ngIf=\"candidateVideoStreamReady()\">\n {{ translations['YOU'] }}\n </h3>\n </div>\n <tgo-audio-animation *ngIf=\"isVideoPlaying()\" [fakeData]=\"true\"></tgo-audio-animation>\n <tgo-vimeo-video\n *ngIf=\"isVideo\"\n [isPlaying]=\"isQuestionPlaying()\"\n [videoUrl]=\"fileUrl\"\n (videoEnded)=\"startCountdown()\"\n (videoStarted)=\"isVideoPlaying.set(true)\"\n ></tgo-vimeo-video>\n <div class=\"audio-info\" *ngIf=\"isQuestionPlaying() && !isVideo\">\n <ui-icon name=\"User-profile-filled\" color=\"white\" size=\"80\"></ui-icon>\n </div>\n <div class=\"start\" *ngIf=\"isFirstQuestion && !isQuestionPlaying()\">\n <tgo-ringing-phone-animation [isRinging]=\"true\"></tgo-ringing-phone-animation>\n <ui-button\n [label]=\"translations['ANSWER']\"\n [class.white-btn]=\"test.is_preview_mode\"\n variant=\"primary\"\n [companyColor]=\"companyColor\"\n (click)=\"startQuestion()\"\n data-testid=\"immersive-test.start-question-btn\"\n ></ui-button>\n </div>\n <div class=\"overlay\" *ngIf=\"isAnswering() || isCountingDown()\" [@fadeInFadeOut]>\n <div class=\"answer\" *ngIf=\"!audioUrl() && isAnswering()\">\n <div>\n <h3 class=\"uppercase recording-started\">\n <span class=\"recording-dot\"></span>{{ translations['RECORDING_STARTED'] }}\n </h3>\n <h1 class=\"bold\">\n {{ translations['ANSWER_THE_QUESTION'] }}\n </h1>\n </div>\n <ui-button\n [label]=\"translations['ANSWER_COMPLETED']\"\n [class.white-btn]=\"test.is_preview_mode\"\n variant=\"primary\"\n [companyColor]=\"companyColor\"\n (click)=\"stopRecording()\"\n data-testid=\"immersive-test.stop-recording-btn\"\n ></ui-button>\n </div>\n <div class=\"answer\" *ngIf=\"isCountingDown()\">\n <div>\n <h1 class=\"bold\">\n {{ translations['GET_READY'] }}\n </h1>\n </div>\n <tgo-video-countdown (finished)=\"startRecordAnswer()\"></tgo-video-countdown>\n <div> </div>\n </div>\n <div class=\"preview\" [class.hidden]=\"!audioUrl()\" *ngIf=\"test.is_preview_mode\">\n <h4>{{ translations['AUDIO_READY'] }}</h4>\n <p>{{ translations['AUDIO_PREVIEW'] }}</p>\n <audio #audio controls></audio>\n </div>\n </div>\n </div>\n <div class=\"media-info\">\n <h3 class=\"bold\">{{ translations['CUSTOMER'] }}</h3>\n <ui-button\n [hidden]=\"!test.test_instruction && !test.intro_text\"\n class=\"review-button\"\n [label]=\"translations['REVIEW_INSTRUCTIONS']\"\n variant=\"secondary\"\n size=\"small\"\n (click)=\"openReviewInstructionsDialog()\"\n data-testid=\"immersive-test.review-instructions-btn\"\n ></ui-button>\n </div>\n </div>\n</div>\n", styles: [".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}.immersive-test{padding:0 64px;margin-top:40px}.immersive-test .media-info{width:100%;display:flex;justify-content:space-between;align-items:center;background:#242424a8;background-color:#242424;border-bottom-left-radius:10px;border-bottom-right-radius:10px;padding:13px 32px;color:#fff}.immersive-test .media-info ::ng-deep ui-button button{border-color:#fff;color:#fff}.immersive-test .test-container{min-width:360px;max-width:1312px;min-height:725px;height:min(725px,100%,max(100vw - 200px,100vh - 200px,200px));border-radius:10px;display:flex;flex-direction:column;justify-content:space-between;position:relative;background-color:#242424}.immersive-test .media-container{position:relative;color:#fff;flex-grow:1;border-top-left-radius:10px;border-top-right-radius:10px;aspect-ratio:16/9}.immersive-test .media-container .candidate-no-camera{position:absolute;width:200px;aspect-ratio:16/9;z-index:3;top:32px;left:32px;border-radius:10px;background-color:#1a47aa;display:flex;justify-content:space-between;flex-direction:column;padding:16px}.immersive-test .media-container .candidate-no-camera ui-icon{margin:auto}.immersive-test .media-container .candidate-camera{position:absolute;width:200px;top:32px;left:32px;z-index:3}.immersive-test .media-container .candidate-camera video{width:200px;border-radius:10px}.immersive-test .media-container .candidate-camera h3{position:absolute;bottom:16px;left:16px}.immersive-test .media-container tgo-audio-animation{position:absolute;top:32px;right:32px;z-index:1}.immersive-test .media-container tgo-vimeo-video{display:none;position:absolute;height:100%;width:100%}.immersive-test .media-container.is-video-visible tgo-vimeo-video{display:block}.immersive-test .media-container.is-playing{border:4px solid #0165FC;border-bottom-width:3px}.immersive-test .media-container.is-answering .candidate-camera tgo-audio-animation,.immersive-test .media-container.is-answering .candidate-no-camera tgo-audio-animation{position:absolute;top:16px;right:16px}.immersive-test .media-container.is-answering .candidate-camera video,.immersive-test .media-container.is-answering .candidate-no-camera{border:3px solid #0165FC;border-radius:10px}.immersive-test .media-container.is-answering tgo-vimeo-video{display:block}.immersive-test .media-container .start,.immersive-test .media-container .audio-info,.immersive-test .media-container .overlay,.immersive-test .media-container .answer{display:flex;justify-content:center;align-items:center;flex-direction:column;gap:40px;height:100%}.immersive-test .media-container .preview{height:100%;display:flex;align-items:center;flex-direction:column;justify-content:flex-end;padding:24px}.immersive-test .media-container .preview p{color:#d3d3d3;margin:8px 0}.immersive-test .media-container .preview audio{margin:16px 0}.immersive-test .media-container .preview.hidden{display:none}.immersive-test h3,.immersive-test h4{color:#fff}.immersive-test .bold{font-weight:700}.immersive-test ui-button.review-button ::ng-deep button{border:1px solid #ffffff}.immersive-test ui-button.white-btn ::ng-deep button{background-color:#fff;border-color:#fff;color:#000}.immersive-test ui-button.white-btn ::ng-deep button:hover{background-color:#666!important}.immersive-test .overlay{top:0;position:absolute;width:100%;height:100%;background-color:#242424e0;z-index:2;border-radius:10px}.immersive-test .overlay h1,.immersive-test .overlay h3{color:#fff;text-align:center}.immersive-test .overlay h3{margin-bottom:10px}.immersive-test tgo-radial-progress{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.immersive-test .uppercase{text-transform:uppercase}.immersive-test .recording-started{display:flex;align-items:center;justify-content:center;gap:10px}.immersive-test .recording-dot{background-color:#ff3003;display:inline-block;width:20px;height:20px;border-radius:50%}@media screen and (max-width: 600px){.immersive-test{padding:0 24px;margin-top:16px}}\n"], dependencies: [{ kind: "ngmodule", type: TranslocoModule }, { kind: "ngmodule", type: ButtonComponentModule }, { kind: "component", type: i4.ButtonComponent, selector: "ui-button", inputs: ["size", "variant", "label", "iconPosition", "justIcon", "iconName", "disabled", "loading", "fullWidth", "url", "urlTarget", "value", "tooltip", "isPremium", "type", "companyColor", "buttonBadgeConfig", "applicationTheme", "disabledScaleOnClick", "ariaLabel", "ariaRequired", "ariaLabelledby", "ariaDescribedby", "preventDefault", "hasBackground", "tooltipPosition", "role", "iconFilled"], outputs: ["buttonClickEvent", "buttonHoverEvent"] }, { kind: "ngmodule", type: IconComponentModule }, { kind: "component", type: i4.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: VimeoVideoComponent, selector: "tgo-vimeo-video", inputs: ["videoUrl", "isPlaying", "options"], outputs: ["videoEnded", "videoStarted"] }, { kind: "component", type: VideoCountdownComponent, selector: "tgo-video-countdown", inputs: ["startFrom", "endAt", "interval"], outputs: ["finished"] }, { kind: "component", type: RingingPhoneAnimationComponent, selector: "tgo-ringing-phone-animation", inputs: ["isRinging"] }, { kind: "component", type: AudioAnimationComponent, selector: "tgo-audio-animation", inputs: ["volume", "fakeData"] }], animations: [
|
|
389
385
|
trigger('fadeInFadeOut', [
|
|
390
|
-
transition(':enter', [
|
|
391
|
-
style({ opacity: 0 }),
|
|
392
|
-
animate('600ms', style({ opacity: 1 })),
|
|
393
|
-
]),
|
|
386
|
+
transition(':enter', [style({ opacity: 0 }), animate('600ms', style({ opacity: 1 }))]),
|
|
394
387
|
transition(':leave', [animate('600ms', style({ opacity: 0 }))]),
|
|
395
388
|
]),
|
|
396
389
|
] });
|
|
397
390
|
}
|
|
398
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
391
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ImmersiveTestComponent, decorators: [{
|
|
399
392
|
type: Component,
|
|
400
393
|
args: [{ selector: 'tgo-immersive-test', animations: [
|
|
401
394
|
trigger('fadeInFadeOut', [
|
|
402
|
-
transition(':enter', [
|
|
403
|
-
style({ opacity: 0 }),
|
|
404
|
-
animate('600ms', style({ opacity: 1 })),
|
|
405
|
-
]),
|
|
395
|
+
transition(':enter', [style({ opacity: 0 }), animate('600ms', style({ opacity: 1 }))]),
|
|
406
396
|
transition(':leave', [animate('600ms', style({ opacity: 0 }))]),
|
|
407
397
|
]),
|
|
408
|
-
],
|
|
398
|
+
], imports: [
|
|
409
399
|
TranslocoModule,
|
|
410
400
|
ButtonComponentModule,
|
|
411
401
|
IconComponentModule,
|
|
@@ -420,11 +410,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
420
410
|
// Fetch from app assets; demo app copies the library assets to
|
|
421
411
|
// /assets/tgo-immersive-test via project.json.
|
|
422
412
|
const url = new URL(`assets/tgo-immersive-test/i18n/${lang}.json`, document.baseURI).href;
|
|
423
|
-
return fetch(url).then(
|
|
413
|
+
return fetch(url).then(res => res.json());
|
|
424
414
|
}),
|
|
425
415
|
DialogService,
|
|
426
416
|
ThemeService,
|
|
427
|
-
], template: "<div class=\"immersive-test\">\n <div class=\"test-container\">\n <div\n class=\"media-container\"\n [class.is-video-visible]=\"isQuestionPlaying() && !isAnswering()\"\n [class.is-playing]=\"isVideoPlaying()\"\n [class.is-answering]=\"isAnswering()\"\n >\n <div class=\"candidate-no-camera\" *ngIf=\"!candidateVideoStreamReady()\">\n <h3> </h3>\n <tgo-audio-animation\n *ngIf=\"isAnswering()\"\n [volume]=\"volume()\"\n [fakeData]=\"false\"\n ></tgo-audio-animation>\n <ui-icon name=\"User-profile-in-line\" color=\"white\" size=\"24\"></ui-icon>\n <h3 class=\"bold\">{{ translations['YOU'] }}</h3>\n </div>\n <div class=\"candidate-camera\" [hidden]=\"!candidateVideoStreamReady()\">\n <tgo-audio-animation\n *ngIf=\"isAnswering() && candidateVideoStreamReady()\"\n [volume]=\"volume()\"\n [fakeData]=\"false\"\n ></tgo-audio-animation>\n <video height #video id=\"video\" playsinline (loadedmetadata)=\"onVideoLoad()\"></video>\n <h3 class=\"bold\" *ngIf=\"candidateVideoStreamReady()\">\n {{ translations['YOU'] }}\n </h3>\n </div>\n <tgo-audio-animation *ngIf=\"isVideoPlaying()\" [fakeData]=\"true\"></tgo-audio-animation>\n <tgo-vimeo-video\n *ngIf=\"isVideo\"\n [isPlaying]=\"isQuestionPlaying()\"\n [videoUrl]=\"fileUrl\"\n (videoEnded)=\"startCountdown()\"\n (videoStarted)=\"isVideoPlaying.set(true)\"\n ></tgo-vimeo-video>\n <div class=\"audio-info\" *ngIf=\"isQuestionPlaying() && !isVideo\">\n <ui-icon name=\"User-profile-filled\" color=\"white\" size=\"80\"></ui-icon>\n </div>\n <div class=\"start\" *ngIf=\"isFirstQuestion && !isQuestionPlaying()\">\n <tgo-ringing-phone-animation [isRinging]=\"true\"></tgo-ringing-phone-animation>\n <ui-button\n [label]=\"translations['ANSWER']\"\n [class.white-btn]=\"test.is_preview_mode\"\n variant=\"primary\"\n [companyColor]=\"companyColor\"\n (click)=\"startQuestion()\"\n data-testid=\"immersive-test.start-question-btn\"\n ></ui-button>\n </div>\n <div class=\"overlay\" *ngIf=\"isAnswering() || isCountingDown()\" [@fadeInFadeOut]>\n <div class=\"answer\" *ngIf=\"!audioUrl() && isAnswering()\">\n <div>\n <h3 class=\"uppercase recording-started\">\n <span class=\"recording-dot\"></span>{{ translations['RECORDING_STARTED'] }}\n </h3>\n <h1 class=\"bold\">\n {{ translations['ANSWER_THE_QUESTION'] }}\n </h1>\n </div>\n <ui-button\n [label]=\"translations['ANSWER_COMPLETED']\"\n [class.white-btn]=\"test.is_preview_mode\"\n variant=\"primary\"\n [companyColor]=\"companyColor\"\n (click)=\"stopRecording()\"\n data-testid=\"immersive-test.stop-recording-btn\"\n ></ui-button>\n </div>\n <div class=\"answer\" *ngIf=\"isCountingDown()\">\n <div>\n <h1 class=\"bold\">\n {{ translations['GET_READY'] }}\n </h1>\n </div>\n <tgo-video-countdown (finish)=\"startRecordAnswer()\"></tgo-video-countdown>\n <div> </div>\n </div>\n <div class=\"preview\" [class.hidden]=\"!audioUrl()\" *ngIf=\"test.is_preview_mode\">\n <h4>{{ translations['AUDIO_READY'] }}</h4>\n <p>{{ translations['AUDIO_PREVIEW'] }}</p>\n <audio #audio controls></audio>\n </div>\n </div>\n </div>\n <div class=\"media-info\">\n <h3 class=\"bold\">{{ translations['CUSTOMER'] }}</h3>\n <ui-button\n [hidden]=\"!test.test_instruction && !test.intro_text\"\n class=\"review-button\"\n [label]=\"translations['REVIEW_INSTRUCTIONS']\"\n variant=\"secondary\"\n size=\"small\"\n (click)=\"openReviewInstructionsDialog()\"\n data-testid=\"immersive-test.review-instructions-btn\"\n ></ui-button>\n </div>\n </div>\n</div>\n", styles: [".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}.immersive-test{padding:0 64px;margin-top:40px}.immersive-test .media-info{width:100%;display:flex;justify-content:space-between;align-items:center;background:#242424a8;background-color:#242424;border-bottom-left-radius:10px;border-bottom-right-radius:10px;padding:13px 32px;color:#fff}.immersive-test .media-info ::ng-deep ui-button button{border-color:#fff;color:#fff}.immersive-test .test-container{min-width:360px;max-width:1312px;min-height:725px;height:min(725px,100%,max(100vw - 200px,100vh - 200px,200px));border-radius:10px;display:flex;flex-direction:column;justify-content:space-between;position:relative;background-color:#242424}.immersive-test .media-container{position:relative;color:#fff;flex-grow:1;border-top-left-radius:10px;border-top-right-radius:10px;aspect-ratio:16/9}.immersive-test .media-container .candidate-no-camera{position:absolute;width:200px;aspect-ratio:16/9;z-index:3;top:32px;left:32px;border-radius:10px;background-color:#1a47aa;display:flex;justify-content:space-between;flex-direction:column;padding:16px}.immersive-test .media-container .candidate-no-camera ui-icon{margin:auto}.immersive-test .media-container .candidate-camera{position:absolute;width:200px;top:32px;left:32px;z-index:3}.immersive-test .media-container .candidate-camera video{width:200px;border-radius:10px}.immersive-test .media-container .candidate-camera h3{position:absolute;bottom:16px;left:16px}.immersive-test .media-container tgo-audio-animation{position:absolute;top:32px;right:32px;z-index:1}.immersive-test .media-container tgo-vimeo-video{display:none;position:absolute;height:100%;width:100%}.immersive-test .media-container.is-video-visible tgo-vimeo-video{display:block}.immersive-test .media-container.is-playing{border:4px solid #0165FC;border-bottom-width:3px}.immersive-test .media-container.is-answering .candidate-camera tgo-audio-animation,.immersive-test .media-container.is-answering .candidate-no-camera tgo-audio-animation{position:absolute;top:16px;right:16px}.immersive-test .media-container.is-answering .candidate-camera video,.immersive-test .media-container.is-answering .candidate-no-camera{border:3px solid #0165FC;border-radius:10px}.immersive-test .media-container.is-answering tgo-vimeo-video{display:block}.immersive-test .media-container .start,.immersive-test .media-container .audio-info,.immersive-test .media-container .overlay,.immersive-test .media-container .answer{display:flex;justify-content:center;align-items:center;flex-direction:column;gap:40px;height:100%}.immersive-test .media-container .preview{height:100%;display:flex;align-items:center;flex-direction:column;justify-content:flex-end;padding:24px}.immersive-test .media-container .preview p{color:#d3d3d3;margin:8px 0}.immersive-test .media-container .preview audio{margin:16px 0}.immersive-test .media-container .preview.hidden{display:none}.immersive-test h3,.immersive-test h4{color:#fff}.immersive-test .bold{font-weight:700}.immersive-test ui-button.review-button ::ng-deep button{border:1px solid #ffffff}.immersive-test ui-button.white-btn ::ng-deep button{background-color:#fff;border-color:#fff;color:#000}.immersive-test ui-button.white-btn ::ng-deep button:hover{background-color:#666!important}.immersive-test .overlay{top:0;position:absolute;width:100%;height:100%;background-color:#242424e0;z-index:2;border-radius:10px}.immersive-test .overlay h1,.immersive-test .overlay h3{color:#fff;text-align:center}.immersive-test .overlay h3{margin-bottom:10px}.immersive-test tgo-radial-progress{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.immersive-test .uppercase{text-transform:uppercase}.immersive-test .recording-started{display:flex;align-items:center;justify-content:center;gap:10px}.immersive-test .recording-dot{background-color:#ff3003;display:inline-block;width:20px;height:20px;border-radius:50%}@media screen and (max-width: 600px){.immersive-test{padding:0 24px;margin-top:16px}}\n"] }]
|
|
417
|
+
], template: "<div class=\"immersive-test\">\n <div class=\"test-container\">\n <div\n class=\"media-container\"\n [class.is-video-visible]=\"isQuestionPlaying() && !isAnswering()\"\n [class.is-playing]=\"isVideoPlaying()\"\n [class.is-answering]=\"isAnswering()\"\n >\n <div class=\"candidate-no-camera\" *ngIf=\"!candidateVideoStreamReady()\">\n <h3> </h3>\n <tgo-audio-animation\n *ngIf=\"isAnswering()\"\n [volume]=\"volume()\"\n [fakeData]=\"false\"\n ></tgo-audio-animation>\n <ui-icon name=\"User-profile-in-line\" color=\"white\" size=\"24\"></ui-icon>\n <h3 class=\"bold\">{{ translations['YOU'] }}</h3>\n </div>\n <div class=\"candidate-camera\" [hidden]=\"!candidateVideoStreamReady()\">\n <tgo-audio-animation\n *ngIf=\"isAnswering() && candidateVideoStreamReady()\"\n [volume]=\"volume()\"\n [fakeData]=\"false\"\n ></tgo-audio-animation>\n <video height #video id=\"video\" playsinline (loadedmetadata)=\"onVideoLoad()\"></video>\n <h3 class=\"bold\" *ngIf=\"candidateVideoStreamReady()\">\n {{ translations['YOU'] }}\n </h3>\n </div>\n <tgo-audio-animation *ngIf=\"isVideoPlaying()\" [fakeData]=\"true\"></tgo-audio-animation>\n <tgo-vimeo-video\n *ngIf=\"isVideo\"\n [isPlaying]=\"isQuestionPlaying()\"\n [videoUrl]=\"fileUrl\"\n (videoEnded)=\"startCountdown()\"\n (videoStarted)=\"isVideoPlaying.set(true)\"\n ></tgo-vimeo-video>\n <div class=\"audio-info\" *ngIf=\"isQuestionPlaying() && !isVideo\">\n <ui-icon name=\"User-profile-filled\" color=\"white\" size=\"80\"></ui-icon>\n </div>\n <div class=\"start\" *ngIf=\"isFirstQuestion && !isQuestionPlaying()\">\n <tgo-ringing-phone-animation [isRinging]=\"true\"></tgo-ringing-phone-animation>\n <ui-button\n [label]=\"translations['ANSWER']\"\n [class.white-btn]=\"test.is_preview_mode\"\n variant=\"primary\"\n [companyColor]=\"companyColor\"\n (click)=\"startQuestion()\"\n data-testid=\"immersive-test.start-question-btn\"\n ></ui-button>\n </div>\n <div class=\"overlay\" *ngIf=\"isAnswering() || isCountingDown()\" [@fadeInFadeOut]>\n <div class=\"answer\" *ngIf=\"!audioUrl() && isAnswering()\">\n <div>\n <h3 class=\"uppercase recording-started\">\n <span class=\"recording-dot\"></span>{{ translations['RECORDING_STARTED'] }}\n </h3>\n <h1 class=\"bold\">\n {{ translations['ANSWER_THE_QUESTION'] }}\n </h1>\n </div>\n <ui-button\n [label]=\"translations['ANSWER_COMPLETED']\"\n [class.white-btn]=\"test.is_preview_mode\"\n variant=\"primary\"\n [companyColor]=\"companyColor\"\n (click)=\"stopRecording()\"\n data-testid=\"immersive-test.stop-recording-btn\"\n ></ui-button>\n </div>\n <div class=\"answer\" *ngIf=\"isCountingDown()\">\n <div>\n <h1 class=\"bold\">\n {{ translations['GET_READY'] }}\n </h1>\n </div>\n <tgo-video-countdown (finished)=\"startRecordAnswer()\"></tgo-video-countdown>\n <div> </div>\n </div>\n <div class=\"preview\" [class.hidden]=\"!audioUrl()\" *ngIf=\"test.is_preview_mode\">\n <h4>{{ translations['AUDIO_READY'] }}</h4>\n <p>{{ translations['AUDIO_PREVIEW'] }}</p>\n <audio #audio controls></audio>\n </div>\n </div>\n </div>\n <div class=\"media-info\">\n <h3 class=\"bold\">{{ translations['CUSTOMER'] }}</h3>\n <ui-button\n [hidden]=\"!test.test_instruction && !test.intro_text\"\n class=\"review-button\"\n [label]=\"translations['REVIEW_INSTRUCTIONS']\"\n variant=\"secondary\"\n size=\"small\"\n (click)=\"openReviewInstructionsDialog()\"\n data-testid=\"immersive-test.review-instructions-btn\"\n ></ui-button>\n </div>\n </div>\n</div>\n", styles: [".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}.immersive-test{padding:0 64px;margin-top:40px}.immersive-test .media-info{width:100%;display:flex;justify-content:space-between;align-items:center;background:#242424a8;background-color:#242424;border-bottom-left-radius:10px;border-bottom-right-radius:10px;padding:13px 32px;color:#fff}.immersive-test .media-info ::ng-deep ui-button button{border-color:#fff;color:#fff}.immersive-test .test-container{min-width:360px;max-width:1312px;min-height:725px;height:min(725px,100%,max(100vw - 200px,100vh - 200px,200px));border-radius:10px;display:flex;flex-direction:column;justify-content:space-between;position:relative;background-color:#242424}.immersive-test .media-container{position:relative;color:#fff;flex-grow:1;border-top-left-radius:10px;border-top-right-radius:10px;aspect-ratio:16/9}.immersive-test .media-container .candidate-no-camera{position:absolute;width:200px;aspect-ratio:16/9;z-index:3;top:32px;left:32px;border-radius:10px;background-color:#1a47aa;display:flex;justify-content:space-between;flex-direction:column;padding:16px}.immersive-test .media-container .candidate-no-camera ui-icon{margin:auto}.immersive-test .media-container .candidate-camera{position:absolute;width:200px;top:32px;left:32px;z-index:3}.immersive-test .media-container .candidate-camera video{width:200px;border-radius:10px}.immersive-test .media-container .candidate-camera h3{position:absolute;bottom:16px;left:16px}.immersive-test .media-container tgo-audio-animation{position:absolute;top:32px;right:32px;z-index:1}.immersive-test .media-container tgo-vimeo-video{display:none;position:absolute;height:100%;width:100%}.immersive-test .media-container.is-video-visible tgo-vimeo-video{display:block}.immersive-test .media-container.is-playing{border:4px solid #0165FC;border-bottom-width:3px}.immersive-test .media-container.is-answering .candidate-camera tgo-audio-animation,.immersive-test .media-container.is-answering .candidate-no-camera tgo-audio-animation{position:absolute;top:16px;right:16px}.immersive-test .media-container.is-answering .candidate-camera video,.immersive-test .media-container.is-answering .candidate-no-camera{border:3px solid #0165FC;border-radius:10px}.immersive-test .media-container.is-answering tgo-vimeo-video{display:block}.immersive-test .media-container .start,.immersive-test .media-container .audio-info,.immersive-test .media-container .overlay,.immersive-test .media-container .answer{display:flex;justify-content:center;align-items:center;flex-direction:column;gap:40px;height:100%}.immersive-test .media-container .preview{height:100%;display:flex;align-items:center;flex-direction:column;justify-content:flex-end;padding:24px}.immersive-test .media-container .preview p{color:#d3d3d3;margin:8px 0}.immersive-test .media-container .preview audio{margin:16px 0}.immersive-test .media-container .preview.hidden{display:none}.immersive-test h3,.immersive-test h4{color:#fff}.immersive-test .bold{font-weight:700}.immersive-test ui-button.review-button ::ng-deep button{border:1px solid #ffffff}.immersive-test ui-button.white-btn ::ng-deep button{background-color:#fff;border-color:#fff;color:#000}.immersive-test ui-button.white-btn ::ng-deep button:hover{background-color:#666!important}.immersive-test .overlay{top:0;position:absolute;width:100%;height:100%;background-color:#242424e0;z-index:2;border-radius:10px}.immersive-test .overlay h1,.immersive-test .overlay h3{color:#fff;text-align:center}.immersive-test .overlay h3{margin-bottom:10px}.immersive-test tgo-radial-progress{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.immersive-test .uppercase{text-transform:uppercase}.immersive-test .recording-started{display:flex;align-items:center;justify-content:center;gap:10px}.immersive-test .recording-dot{background-color:#ff3003;display:inline-block;width:20px;height:20px;border-radius:50%}@media screen and (max-width: 600px){.immersive-test{padding:0 24px;margin-top:16px}}\n"] }]
|
|
428
418
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
429
419
|
type: Inject,
|
|
430
420
|
args: [TRANSLOCO_SCOPE]
|