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:
@@ -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>();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -9,6 +9,7 @@ import { BillingAccountProfileStateService } from "@bitwarden/common/billing/abs
|
||||
*/
|
||||
@Directive({
|
||||
selector: "[appNotPremium]",
|
||||
standalone: false,
|
||||
})
|
||||
export class NotPremiumDirective implements OnInit {
|
||||
constructor(
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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>;
|
||||
|
||||
@@ -6,6 +6,7 @@ import { Subscription } from "rxjs";
|
||||
|
||||
@Directive({
|
||||
selector: "[appA11yInvalid]",
|
||||
standalone: false,
|
||||
})
|
||||
export class A11yInvalidDirective implements OnDestroy, OnInit {
|
||||
private sub: Subscription;
|
||||
|
||||
@@ -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>;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -7,6 +7,7 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl
|
||||
|
||||
@Directive({
|
||||
selector: "[appCopyText]",
|
||||
standalone: false,
|
||||
})
|
||||
export class CopyTextDirective {
|
||||
constructor(
|
||||
|
||||
@@ -4,6 +4,7 @@ import { Directive, ElementRef, HostListener, Input } from "@angular/core";
|
||||
|
||||
@Directive({
|
||||
selector: "[appFallbackSrc]",
|
||||
standalone: false,
|
||||
})
|
||||
export class FallbackSrcDirective {
|
||||
@Input("appFallbackSrc") appFallbackSrc: string;
|
||||
|
||||
@@ -14,6 +14,7 @@ import { LogService } from "@bitwarden/common/platform/abstractions/log.service"
|
||||
*/
|
||||
@Directive({
|
||||
selector: "[appIfFeature]",
|
||||
standalone: false,
|
||||
})
|
||||
export class IfFeatureDirective implements OnInit {
|
||||
/**
|
||||
|
||||
@@ -5,6 +5,7 @@ import { NgControl } from "@angular/forms";
|
||||
|
||||
@Directive({
|
||||
selector: "input[appInputStripSpaces]",
|
||||
standalone: false,
|
||||
})
|
||||
export class InputStripSpacesDirective {
|
||||
constructor(
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -5,6 +5,7 @@ import { Utils } from "@bitwarden/common/platform/misc/utils";
|
||||
|
||||
@Directive({
|
||||
selector: "[appLaunchClick]",
|
||||
standalone: false,
|
||||
})
|
||||
export class LaunchClickDirective {
|
||||
constructor(private platformUtilsService: PlatformUtilsService) {}
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Directive, HostListener } from "@angular/core";
|
||||
|
||||
@Directive({
|
||||
selector: "[appStopClick]",
|
||||
standalone: false,
|
||||
})
|
||||
export class StopClickDirective {
|
||||
@HostListener("click", ["$event"]) onClick($event: MouseEvent) {
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Directive, HostListener } from "@angular/core";
|
||||
|
||||
@Directive({
|
||||
selector: "[appStopProp]",
|
||||
standalone: false,
|
||||
})
|
||||
export class StopPropDirective {
|
||||
@HostListener("click", ["$event"]) onClick($event: MouseEvent) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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) =>
|
||||
|
||||
@@ -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) =>
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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[] {
|
||||
|
||||
@@ -6,6 +6,7 @@ type PropertyValueFunction<T> = (item: T) => { toString: () => string };
|
||||
|
||||
@Pipe({
|
||||
name: "search",
|
||||
standalone: false,
|
||||
})
|
||||
export class SearchPipe implements PipeTransform {
|
||||
transform<T>(
|
||||
|
||||
@@ -9,6 +9,7 @@ export interface User {
|
||||
|
||||
@Pipe({
|
||||
name: "userName",
|
||||
standalone: false,
|
||||
})
|
||||
export class UserNamePipe implements PipeTransform {
|
||||
transform(user?: User): string {
|
||||
|
||||
@@ -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) {}
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Pipe, PipeTransform } from "@angular/core";
|
||||
|
||||
@Pipe({
|
||||
name: "ellipsis",
|
||||
standalone: false,
|
||||
})
|
||||
/**
|
||||
* @deprecated Use the tailwind class 'tw-truncate' instead
|
||||
|
||||
@@ -5,6 +5,7 @@ import { KeyService } from "@bitwarden/key-management";
|
||||
|
||||
@Pipe({
|
||||
name: "fingerprint",
|
||||
standalone: false,
|
||||
})
|
||||
export class FingerprintPipe {
|
||||
constructor(private keyService: KeyService) {}
|
||||
|
||||
@@ -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) {}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
/**
|
||||
|
||||
@@ -3,6 +3,7 @@ import { Component } from "@angular/core";
|
||||
@Component({
|
||||
selector: "app-root",
|
||||
template: "",
|
||||
standalone: false,
|
||||
})
|
||||
export class AppComponent {
|
||||
title = "components";
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user