import { ChangeDetectorRef, Component, EventEmitter, NgZone, OnChanges, Output, } from '@angular/core'; import { AuditService } from 'jslib/abstractions/audit.service'; import { CipherService } from 'jslib/abstractions/cipher.service'; import { CryptoService } from 'jslib/abstractions/crypto.service'; import { I18nService } from 'jslib/abstractions/i18n.service'; import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service'; import { TokenService } from 'jslib/abstractions/token.service'; import { TotpService } from 'jslib/abstractions/totp.service'; import { UserService } from 'jslib/abstractions/user.service'; import { BroadcasterService } from 'jslib/angular/services/broadcaster.service'; import { ViewComponent as BaseViewComponent } from 'jslib/angular/components/view.component'; import { CipherView } from 'jslib/models/view/cipherView'; @Component({ selector: 'app-vault-view', templateUrl: 'view.component.html', }) export class ViewComponent extends BaseViewComponent implements OnChanges { @Output() onViewCipherPasswordHistory = new EventEmitter(); constructor(cipherService: CipherService, totpService: TotpService, tokenService: TokenService, i18nService: I18nService, cryptoService: CryptoService, platformUtilsService: PlatformUtilsService, auditService: AuditService, broadcasterService: BroadcasterService, ngZone: NgZone, changeDetectorRef: ChangeDetectorRef, userService: UserService) { super(cipherService, totpService, tokenService, i18nService, cryptoService, platformUtilsService, auditService, window, broadcasterService, ngZone, changeDetectorRef, userService); } async ngOnChanges() { await super.load(); } viewHistory() { this.platformUtilsService.eventTrack('View Password History'); this.onViewCipherPasswordHistory.emit(this.cipher); } }