diff --git a/projects/player/src/app/app.component.ts b/projects/player/src/app/app.component.ts index 5a9a0be0e78fc7a6265c3666840fc0bf265db081..440cd9a7d51351c68c61088c24dc34d678ac099b 100644 --- a/projects/player/src/app/app.component.ts +++ b/projects/player/src/app/app.component.ts @@ -1,7 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { registerLocaleData } from '@angular/common'; import localeDe from '@angular/common/locales/de'; -import { MatDialog } from '@angular/material/dialog'; import { TranslateService } from '@ngx-translate/core'; import { PlayerConfig, VopStartCommand } from './models/verona'; import { UnitStateElementMapperService } from './services/unit-state-element-mapper.service'; @@ -11,7 +10,6 @@ import { NativeEventService } from './services/native-event.service'; import { MetaDataService } from './services/meta-data.service'; import { UnitStateService } from './services/unit-state.service'; import { MediaPlayerService } from './services/media-player.service'; -import { AlertDialogComponent } from './components/alert-dialog/alert-dialog.component'; import { Page, Unit } from '../../../common/interfaces/unit'; import { UnitDefinitionSanitizer } from '../../../common/util/unit-definition-sanitizer'; import { ValidatorService } from './services/validator.service'; @@ -38,8 +36,7 @@ export class AppComponent implements OnInit { private unitStateService: UnitStateService, private mediaPlayerService: MediaPlayerService, private unitStateElementMapperService: UnitStateElementMapperService, - private validatorService: ValidatorService, - private dialog: MatDialog) { + private validatorService: ValidatorService) { } ngOnInit(): void { @@ -65,24 +62,14 @@ export class AppComponent implements OnInit { if (message.unitDefinition) { const unitDefinition: Unit = UnitDefinitionSanitizer.sanitize(JSON.parse(message.unitDefinition)); this.unitStateElementMapperService.registerDropListValueIds(unitDefinition); - if (this.metaDataService.verifyUnitDefinitionVersion(unitDefinition.unitDefinitionType)) { - this.playerConfig = message.playerConfig || {}; - this.veronaPostService.sessionId = message.sessionId; - this.veronaPostService.stateReportPolicy = message.playerConfig?.stateReportPolicy || 'none'; - this.pages = unitDefinition.pages; - this.unitStateService.unitStateElementCodes = message.unitState?.dataParts?.elementCodes ? - JSON.parse(message.unitState.dataParts.elementCodes) : []; - // eslint-disable-next-line no-console - console.log('player: unitStateElementCodes', this.unitStateService.unitStateElementCodes); - } else { - this.dialog.open(AlertDialogComponent, { - data: { - title: this.translateService.instant('dialogTitle.wrongUnitDefinitionType'), - content: this.translateService.instant('dialogContent.wrongUnitDefinitionType', - { version: this.metaDataService.playerMetadata.supportedUnitDefinitionTypes }) - } - }); - } + this.playerConfig = message.playerConfig || {}; + this.veronaPostService.sessionId = message.sessionId; + this.veronaPostService.stateReportPolicy = message.playerConfig?.stateReportPolicy || 'none'; + this.pages = unitDefinition.pages; + this.unitStateService.unitStateElementCodes = message.unitState?.dataParts?.elementCodes ? + JSON.parse(message.unitState.dataParts.elementCodes) : []; + // eslint-disable-next-line no-console + console.log('player: unitStateElementCodes', this.unitStateService.unitStateElementCodes); } else { // eslint-disable-next-line no-console console.warn('player: message has no unitDefinition'); diff --git a/projects/player/src/app/app.module.ts b/projects/player/src/app/app.module.ts index 9d277016869bcd46032eecf62a0aaeb1eea233be..b7bc636907f073863be7d01e61b6c137b2562fe1 100644 --- a/projects/player/src/app/app.module.ts +++ b/projects/player/src/app/app.module.ts @@ -14,7 +14,6 @@ import { PlayerTranslateLoader } from './classes/player-translate-loader'; import { LayoutComponent } from './components/layout/layout.component'; import { HideFirstChildDirective } from './directives/hide-first-child.directive'; import { ScrollIndexDirective } from './directives/scroll-index.directive'; -import { AlertDialogComponent } from './components/alert-dialog/alert-dialog.component'; import { IntersectionDetectionDirective } from './directives/intersection-detection.directive'; import { KeyboardComponent } from './components/keyboard/keyboard.component'; import { KeyComponent } from './components/key/key.component'; @@ -46,7 +45,6 @@ import { UnitStateComponent } from './components/unit-state/unit-state.component SectionComponent, PlayerStateComponent, LayoutComponent, - AlertDialogComponent, HideFirstChildDirective, ScrollIndexDirective, IntersectionDetectionDirective, diff --git a/projects/player/src/app/components/alert-dialog/alert-dialog.component.css b/projects/player/src/app/components/alert-dialog/alert-dialog.component.css deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/projects/player/src/app/components/alert-dialog/alert-dialog.component.html b/projects/player/src/app/components/alert-dialog/alert-dialog.component.html deleted file mode 100644 index 66e813d925ebdd9596cb6fb29319b46a7741f58c..0000000000000000000000000000000000000000 --- a/projects/player/src/app/components/alert-dialog/alert-dialog.component.html +++ /dev/null @@ -1,7 +0,0 @@ -<h2 mat-dialog-title>{{data.title}}</h2> -<mat-dialog-content class="mat-typography"> - <p>{{data.content}}</p> -</mat-dialog-content> -<mat-dialog-actions> - <button mat-button mat-dialog-close>{{'close' | translate}}</button> -</mat-dialog-actions> diff --git a/projects/player/src/app/components/alert-dialog/alert-dialog.component.ts b/projects/player/src/app/components/alert-dialog/alert-dialog.component.ts deleted file mode 100644 index 5711738379f4553dfa0a1233ac951535da4d421f..0000000000000000000000000000000000000000 --- a/projects/player/src/app/components/alert-dialog/alert-dialog.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Component, Inject } from '@angular/core'; -import { MAT_DIALOG_DATA } from '@angular/material/dialog'; - -@Component({ - selector: 'aspect-alert-dialog', - templateUrl: './alert-dialog.component.html', - styleUrls: ['./alert-dialog.component.css'] -}) -export class AlertDialogComponent { - constructor(@Inject(MAT_DIALOG_DATA) public data: { title: string, content: string }) { } -} diff --git a/projects/player/src/app/services/meta-data.service.ts b/projects/player/src/app/services/meta-data.service.ts index 495247c199b028a0153d64fa0207066ab675a4dc..3c5a5e4cd45409355fa25c9017937a7e7f3f0c1e 100644 --- a/projects/player/src/app/services/meta-data.service.ts +++ b/projects/player/src/app/services/meta-data.service.ts @@ -13,16 +13,4 @@ export class MetaDataService { this.playerMetadata = JSON.parse(playerMetadata); } } - - // eslint-disable-next-line class-methods-use-this - verifyUnitDefinitionVersion(unitDefinition: string | undefined): boolean { - return true; - // return (!!unitDefinition && unitDefinition === this.playerMetadata.supportedUnitDefinitionTypes); - } - - // eslint-disable-next-line class-methods-use-this - verifyUnitStateDataType(unitStateDataType: string | undefined): boolean { - return true; - // return (!!unitStateDataType && unitStateDataType === this.playerMetadata.supportedUnitStateDataTypes); - } }