@ -1,7 +1,7 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { NgClass } from "@angular/common" ;
import { Component , HostListener , ViewChild, computed, inject , input , output } from "@angular/core" ;
import { Component , HostListener , computed, inject , input , output , viewChild } from "@angular/core" ;
import { PremiumBadgeComponent } from "@bitwarden/angular/billing/components/premium-badge/premium-badge.component" ;
import { IconComponent } from "@bitwarden/angular/vault/components/icon.component" ;
@ -13,11 +13,9 @@ import {
CipherViewLikeUtils ,
} from "@bitwarden/common/vault/utils/cipher-view-like-utils" ;
import {
AriaDisableDirective ,
BitIconButtonComponent ,
MenuModule ,
MenuTriggerForDirective ,
TooltipDirective ,
TableModule ,
LinkModule ,
} from "@bitwarden/components" ;
@ -46,9 +44,7 @@ interface CopyFieldConfig {
NgClass ,
I18nPipe ,
TableModule ,
AriaDisableDirective ,
OrganizationNameBadgeComponent ,
TooltipDirective ,
BitIconButtonComponent ,
MenuModule ,
CopyCipherFieldDirective ,
@ -61,9 +57,7 @@ interface CopyFieldConfig {
export class VaultCipherRowComponent < C extends CipherViewLike > {
protected RowHeightClass = ` tw-h-[75px] ` ;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@ViewChild ( MenuTriggerForDirective , { static : false } ) menuTrigger : MenuTriggerForDirective ;
protected readonly menuTrigger = viewChild < MenuTriggerForDirective > ( "optionsMenuTrigger" ) ;
protected readonly disabled = input < boolean > ( ) ;
protected readonly cipher = input < C > ( ) ;
@ -99,7 +93,6 @@ export class VaultCipherRowComponent<C extends CipherViewLike> {
protected readonly showArchiveButton = computed ( ( ) = > {
return (
! this . cipher ( ) . organizationId &&
! CipherViewLikeUtils . isArchived ( this . cipher ( ) ) &&
! CipherViewLikeUtils . isDeleted ( this . cipher ( ) )
) ;
@ -295,8 +288,8 @@ export class VaultCipherRowComponent<C extends CipherViewLike> {
return ;
}
if ( ! this . disabled ( ) && this . menuTrigger ) {
this . menuTrigger .toggleMenuOnRightClick ( event ) ;
if ( ! this . disabled ( ) && this . menuTrigger () ) {
this . menuTrigger () .toggleMenuOnRightClick ( event ) ;
}
}
}