1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

Add standalone false to all non migrated (#14797)

Adds standalone: false to all components since Angular is changing the default to true and we'd rather not have the angular PR change 300+ files.
This commit is contained in:
Oscar Hinton
2025-05-15 16:44:07 +02:00
committed by GitHub
parent 623deea4fc
commit ac49e594c1
311 changed files with 350 additions and 8 deletions

View File

@@ -57,6 +57,7 @@ export interface EnvironmentSelectorRouteData {
transition("* => void", animate("100ms linear", style({ opacity: 0 }))),
]),
],
standalone: false,
})
export class EnvironmentSelectorComponent implements OnInit, OnDestroy {
@Output() onOpenSelfHostedSettings = new EventEmitter<void>();

View File

@@ -10,6 +10,7 @@ import { WebAuthnIcon } from "../icons/webauthn.icon";
@Component({
selector: "auth-two-factor-icon",
templateUrl: "./two-factor-icon.component.html",
standalone: false,
})
export class TwoFactorIconComponent {
@Input() provider: any;

View File

@@ -22,6 +22,7 @@ import { KeyService } from "@bitwarden/key-management";
*/
@Directive({
selector: "app-user-verification",
standalone: false,
})
export class UserVerificationComponent implements ControlValueAccessor, OnInit, OnDestroy {
private _invalidSecret = false;

View File

@@ -48,6 +48,7 @@ type PayPalConfig = {
@Component({
templateUrl: "./add-account-credit-dialog.component.html",
standalone: false,
})
export class AddAccountCreditDialogComponent implements OnInit {
@ViewChild("payPalForm", { read: ElementRef, static: true }) payPalForm: ElementRef;

View File

@@ -11,6 +11,7 @@ import { FileDownloadService } from "@bitwarden/common/platform/abstractions/fil
@Component({
selector: "app-invoices",
templateUrl: "./invoices.component.html",
standalone: false,
})
export class InvoicesComponent implements OnInit {
@Input() startWith?: InvoicesResponse;

View File

@@ -30,6 +30,7 @@ const partnerTrustIcon = svgIcon`
<bit-icon [icon]="icon"></bit-icon>
<p class="tw-mt-4">{{ "noInvoicesToList" | i18n }}</p>
</div>`,
standalone: false,
})
export class NoInvoicesComponent {
icon = partnerTrustIcon;

View File

@@ -11,6 +11,7 @@ import { CountryListItem, TaxInformation } from "@bitwarden/common/billing/model
@Component({
selector: "app-manage-tax-information",
templateUrl: "./manage-tax-information.component.html",
standalone: false,
})
export class ManageTaxInformationComponent implements OnInit, OnDestroy {
@Input() startWith: TaxInformation;

View File

@@ -9,6 +9,7 @@ import { BillingAccountProfileStateService } from "@bitwarden/common/billing/abs
*/
@Directive({
selector: "[appNotPremium]",
standalone: false,
})
export class NotPremiumDirective implements OnInit {
constructor(

View File

@@ -12,6 +12,7 @@ import { CalloutTypes } from "@bitwarden/components";
@Component({
selector: "app-callout",
templateUrl: "callout.component.html",
standalone: false,
})
export class DeprecatedCalloutComponent implements OnInit {
@Input() type: CalloutTypes = "info";

View File

@@ -18,6 +18,7 @@ import { ModalRef } from "./modal.ref";
@Component({
selector: "app-modal",
template: "<ng-template #modalContent></ng-template>",
standalone: false,
})
export class DynamicModalComponent implements AfterViewInit, OnDestroy {
componentRef: ComponentRef<any>;

View File

@@ -6,6 +6,7 @@ import { Subscription } from "rxjs";
@Directive({
selector: "[appA11yInvalid]",
standalone: false,
})
export class A11yInvalidDirective implements OnDestroy, OnInit {
private sub: Subscription;

View File

@@ -15,6 +15,7 @@ import { ValidationService } from "@bitwarden/common/platform/abstractions/valid
*/
@Directive({
selector: "[appApiAction]",
standalone: false,
})
export class ApiActionDirective implements OnChanges {
@Input() appApiAction: Promise<any>;

View File

@@ -4,6 +4,7 @@ import { Directive, ElementRef, HostListener, OnInit } from "@angular/core";
@Directive({
selector: "[appBoxRow]",
standalone: false,
})
export class BoxRowDirective implements OnInit {
el: HTMLElement = null;

View File

@@ -7,6 +7,7 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl
@Directive({
selector: "[appCopyText]",
standalone: false,
})
export class CopyTextDirective {
constructor(

View File

@@ -4,6 +4,7 @@ import { Directive, ElementRef, HostListener, Input } from "@angular/core";
@Directive({
selector: "[appFallbackSrc]",
standalone: false,
})
export class FallbackSrcDirective {
@Input("appFallbackSrc") appFallbackSrc: string;

View File

@@ -14,6 +14,7 @@ import { LogService } from "@bitwarden/common/platform/abstractions/log.service"
*/
@Directive({
selector: "[appIfFeature]",
standalone: false,
})
export class IfFeatureDirective implements OnInit {
/**

View File

@@ -5,6 +5,7 @@ import { NgControl } from "@angular/forms";
@Directive({
selector: "input[appInputStripSpaces]",
standalone: false,
})
export class InputStripSpacesDirective {
constructor(

View File

@@ -4,6 +4,7 @@ import { Directive, ElementRef, Input, OnInit, Renderer2 } from "@angular/core";
@Directive({
selector: "[appInputVerbatim]",
standalone: false,
})
export class InputVerbatimDirective implements OnInit {
@Input() set appInputVerbatim(condition: boolean | string) {

View File

@@ -5,6 +5,7 @@ import { Utils } from "@bitwarden/common/platform/misc/utils";
@Directive({
selector: "[appLaunchClick]",
standalone: false,
})
export class LaunchClickDirective {
constructor(private platformUtilsService: PlatformUtilsService) {}

View File

@@ -2,6 +2,7 @@ import { Directive, HostListener } from "@angular/core";
@Directive({
selector: "[appStopClick]",
standalone: false,
})
export class StopClickDirective {
@HostListener("click", ["$event"]) onClick($event: MouseEvent) {

View File

@@ -2,6 +2,7 @@ import { Directive, HostListener } from "@angular/core";
@Directive({
selector: "[appStopProp]",
standalone: false,
})
export class StopPropDirective {
@HostListener("click", ["$event"]) onClick($event: MouseEvent) {

View File

@@ -11,6 +11,7 @@ import { ControlValueAccessor, NG_VALUE_ACCESSOR } from "@angular/forms";
multi: true,
},
],
standalone: false,
})
export class TrueFalseValueDirective implements ControlValueAccessor {
@Input() trueValue: boolean | string = true;

View File

@@ -7,7 +7,10 @@ import { ColorPasswordPipe } from "./color-password.pipe";
/*
An updated pipe that extends ColourPasswordPipe to include a character count
*/
@Pipe({ name: "colorPasswordCount" })
@Pipe({
name: "colorPasswordCount",
standalone: false,
})
export class ColorPasswordCountPipe extends ColorPasswordPipe {
transform(password: string) {
const template = (character: string, type: string, index: number) =>

View File

@@ -6,7 +6,10 @@ import { Utils } from "@bitwarden/common/platform/misc/utils";
An updated pipe that sanitizes HTML, highlights numbers and special characters (in different colors each)
and handles Unicode / Emoji characters correctly.
*/
@Pipe({ name: "colorPassword" })
@Pipe({
name: "colorPassword",
standalone: false,
})
export class ColorPasswordPipe implements PipeTransform {
transform(password: string) {
const template = (character: string, type: string) =>

View File

@@ -28,7 +28,10 @@ const numberFormats: Record<string, CardRuleEntry[]> = {
Other: [{ cardLength: 16, blocks: [4, 4, 4, 4] }],
};
@Pipe({ name: "creditCardNumber" })
@Pipe({
name: "creditCardNumber",
standalone: false,
})
export class CreditCardNumberPipe implements PipeTransform {
transform(creditCardNumber: string, brand: string): string {
let rules = numberFormats[brand];

View File

@@ -4,6 +4,7 @@ import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
@Pipe({
name: "searchCiphers",
standalone: false,
})
export class SearchCiphersPipe implements PipeTransform {
transform(ciphers: CipherView[], searchText: string, deleted = false): CipherView[] {

View File

@@ -6,6 +6,7 @@ type PropertyValueFunction<T> = (item: T) => { toString: () => string };
@Pipe({
name: "search",
standalone: false,
})
export class SearchPipe implements PipeTransform {
transform<T>(

View File

@@ -9,6 +9,7 @@ export interface User {
@Pipe({
name: "userName",
standalone: false,
})
export class UserNamePipe implements PipeTransform {
transform(user?: User): string {

View File

@@ -5,6 +5,7 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
@Pipe({
name: "userType",
standalone: false,
})
export class UserTypePipe implements PipeTransform {
constructor(private i18nService: I18nService) {}

View File

@@ -2,6 +2,7 @@ import { Pipe, PipeTransform } from "@angular/core";
@Pipe({
name: "ellipsis",
standalone: false,
})
/**
* @deprecated Use the tailwind class 'tw-truncate' instead

View File

@@ -5,6 +5,7 @@ import { KeyService } from "@bitwarden/key-management";
@Pipe({
name: "fingerprint",
standalone: false,
})
export class FingerprintPipe {
constructor(private keyService: KeyService) {}

View File

@@ -7,6 +7,7 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
*/
@Pipe({
name: "i18n",
standalone: false,
})
export class I18nPipe implements PipeTransform {
constructor(private i18nService: I18nService) {}

View File

@@ -16,6 +16,7 @@ export interface PasswordColorText {
@Component({
selector: "app-password-strength",
templateUrl: "password-strength.component.html",
standalone: false,
})
export class PasswordStrengthComponent implements OnChanges {
@Input() showText = false;

View File

@@ -19,6 +19,7 @@ import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
selector: "app-vault-icon",
templateUrl: "icon.component.html",
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class IconComponent {
/**

View File

@@ -3,6 +3,7 @@ import { Component } from "@angular/core";
@Component({
selector: "app-root",
template: "",
standalone: false,
})
export class AppComponent {
title = "components";

View File

@@ -19,6 +19,7 @@ import { FocusableElement } from "../shared/focusable-element";
*/
@Directive({
selector: "[appAutofocus], [bitAutofocus]",
standalone: false,
})
export class AutofocusDirective implements AfterContentChecked {
@Input() set appAutofocus(condition: boolean | string) {

View File

@@ -24,6 +24,7 @@ import {
@Component({
selector: "tools-catchall-settings",
templateUrl: "catchall-settings.component.html",
standalone: false,
})
export class CatchallSettingsComponent implements OnInit, OnDestroy, OnChanges {
/** Instantiates the component

View File

@@ -67,6 +67,7 @@ const NONE_SELECTED = "none";
@Component({
selector: "tools-credential-generator",
templateUrl: "credential-generator.component.html",
standalone: false,
})
export class CredentialGeneratorComponent implements OnInit, OnChanges, OnDestroy {
private readonly destroyed = new Subject<void>();

View File

@@ -33,6 +33,7 @@ const Controls = Object.freeze({
@Component({
selector: "tools-forwarder-settings",
templateUrl: "forwarder-settings.component.html",
standalone: false,
})
export class ForwarderSettingsComponent implements OnInit, OnChanges, OnDestroy {
/** Instantiates the component

View File

@@ -33,6 +33,7 @@ const Controls = Object.freeze({
@Component({
selector: "tools-passphrase-settings",
templateUrl: "passphrase-settings.component.html",
standalone: false,
})
export class PassphraseSettingsComponent implements OnInit, OnChanges, OnDestroy {
/** Instantiates the component

View File

@@ -53,6 +53,7 @@ import { GeneratorHistoryService } from "@bitwarden/generator-history";
@Component({
selector: "tools-password-generator",
templateUrl: "password-generator.component.html",
standalone: false,
})
export class PasswordGeneratorComponent implements OnInit, OnChanges, OnDestroy {
constructor(

View File

@@ -37,6 +37,7 @@ const Controls = Object.freeze({
@Component({
selector: "tools-password-settings",
templateUrl: "password-settings.component.html",
standalone: false,
})
export class PasswordSettingsComponent implements OnInit, OnChanges, OnDestroy {
/** Instantiates the component

View File

@@ -24,6 +24,7 @@ import {
@Component({
selector: "tools-subaddress-settings",
templateUrl: "subaddress-settings.component.html",
standalone: false,
})
export class SubaddressSettingsComponent implements OnInit, OnChanges, OnDestroy {
/** Instantiates the component

View File

@@ -67,6 +67,7 @@ const NONE_SELECTED = "none";
@Component({
selector: "tools-username-generator",
templateUrl: "username-generator.component.html",
standalone: false,
})
export class UsernameGeneratorComponent implements OnInit, OnChanges, OnDestroy {
/** Instantiates the username generator

View File

@@ -24,6 +24,7 @@ import {
@Component({
selector: "tools-username-settings",
templateUrl: "username-settings.component.html",
standalone: false,
})
export class UsernameSettingsComponent implements OnInit, OnChanges, OnDestroy {
/** Instantiates the component