1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-11 22:13:32 +00:00

Convert to standalone

This commit is contained in:
Hinton
2026-01-27 10:41:45 +01:00
parent 19d65cfe3c
commit c9eae44393
4 changed files with 54 additions and 54 deletions

View File

@@ -1,7 +1,11 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { Component, HostListener, ViewChild, computed, input, output, inject } from "@angular/core";
import { NgClass } from "@angular/common";
import { Component, HostListener, ViewChild, computed, inject, input, output } from "@angular/core";
import { RouterLink } from "@angular/router";
import { PremiumBadgeComponent } from "@bitwarden/angular/billing/components/premium-badge/premium-badge.component";
import { JslibModule } from "@bitwarden/angular/jslib.module";
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { CipherType } from "@bitwarden/common/vault/enums";
@@ -9,15 +13,42 @@ import {
CipherViewLike,
CipherViewLikeUtils,
} from "@bitwarden/common/vault/utils/cipher-view-like-utils";
import { MenuTriggerForDirective } from "@bitwarden/components";
import { VaultItemEvent } from "@bitwarden/vault";
import {
AriaDisableDirective,
BitIconButtonComponent,
ButtonLinkDirective,
MenuModule,
MenuTriggerForDirective,
TooltipDirective,
TableModule,
} from "@bitwarden/components";
import {
CopyCipherFieldDirective,
GetOrgNameFromIdPipe,
OrganizationNameBadgeComponent,
VaultItemEvent,
} from "@bitwarden/vault";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({
selector: "tr[appVaultCipherRow]",
templateUrl: "vault-cipher-row.component.html",
standalone: false,
imports: [
NgClass,
JslibModule,
TableModule,
AriaDisableDirective,
ButtonLinkDirective,
RouterLink,
OrganizationNameBadgeComponent,
TooltipDirective,
BitIconButtonComponent,
MenuModule,
CopyCipherFieldDirective,
PremiumBadgeComponent,
GetOrgNameFromIdPipe,
],
})
export class VaultCipherRowComponent<C extends CipherViewLike> {
protected RowHeightClass = `tw-h-[75px]`;

View File

@@ -1,19 +1,33 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { NgClass } from "@angular/common";
import { Component, input } from "@angular/core";
import { RouterLink } from "@angular/router";
import { JslibModule } from "@bitwarden/angular/jslib.module";
import {
CollectionView,
CollectionTypes,
} from "@bitwarden/common/admin-console/models/collections";
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
import { AriaDisableDirective, TableModule, ButtonLinkDirective } from "@bitwarden/components";
import { GetOrgNameFromIdPipe, OrganizationNameBadgeComponent } from "@bitwarden/vault";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({
selector: "tr[appVaultCollectionRow]",
templateUrl: "vault-collection-row.component.html",
standalone: false,
imports: [
TableModule,
NgClass,
AriaDisableDirective,
ButtonLinkDirective,
JslibModule,
RouterLink,
OrganizationNameBadgeComponent,
GetOrgNameFromIdPipe,
],
})
export class VaultCollectionRowComponent {
protected RowHeightClass = `tw-h-[75px]`;

View File

@@ -1,47 +0,0 @@
import { ScrollingModule } from "@angular/cdk/scrolling";
import { CommonModule } from "@angular/common";
import { NgModule } from "@angular/core";
import { RouterModule } from "@angular/router";
import { PremiumBadgeComponent } from "@bitwarden/angular/billing/components/premium-badge";
import { JslibModule } from "@bitwarden/angular/jslib.module";
import {
BadgeModule,
IconButtonModule,
IconModule,
LinkModule,
MenuModule,
ScrollLayoutDirective,
TableModule,
} from "@bitwarden/components";
import {
CopyCipherFieldDirective,
GetOrgNameFromIdPipe,
OrganizationNameBadgeComponent,
} from "@bitwarden/vault";
import { VaultCipherRowComponent } from "./vault-cipher-row.component";
import { VaultCollectionRowComponent } from "./vault-collection-row.component";
@NgModule({
imports: [
CommonModule,
RouterModule,
ScrollingModule,
JslibModule,
TableModule,
MenuModule,
IconButtonModule,
IconModule,
LinkModule,
BadgeModule,
CopyCipherFieldDirective,
ScrollLayoutDirective,
PremiumBadgeComponent,
OrganizationNameBadgeComponent,
GetOrgNameFromIdPipe,
],
declarations: [VaultCipherRowComponent, VaultCollectionRowComponent],
exports: [VaultCipherRowComponent, VaultCollectionRowComponent],
})
export class VaultItemsModule {}

View File

@@ -38,7 +38,8 @@ import { NewCipherMenuComponent, VaultItem, VaultItemEvent } from "@bitwarden/va
import { DesktopHeaderComponent } from "../../../app/layout/header/desktop-header.component";
import { VaultItemsModule } from "./vault-items/vault-items.module";
import { VaultCipherRowComponent } from "./vault-items/vault-cipher-row.component";
import { VaultCollectionRowComponent } from "./vault-items/vault-collection-row.component";
// Fixed manual row height required due to how cdk-virtual-scroll works
export const RowHeight = 75;
@@ -57,11 +58,12 @@ export const RowHeightClass = `tw-h-[75px]`;
MenuModule,
ButtonModule,
IconButtonModule,
VaultItemsModule,
SearchModule,
FormsModule,
DesktopHeaderComponent,
NewCipherMenuComponent,
VaultCollectionRowComponent,
VaultCipherRowComponent,
],
})
export class VaultListComponent<C extends CipherViewLike> {