mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
Tools - Prefer signal & change detection (#16941)
This commit is contained in:
@@ -17,6 +17,8 @@ export type PasswordStrengthScore = 0 | 1 | 2 | 3 | 4;
|
||||
type SizeTypes = "small" | "default" | "large";
|
||||
type BackgroundTypes = "danger" | "primary" | "success" | "warning";
|
||||
|
||||
// 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: "tools-password-strength",
|
||||
templateUrl: "password-strength-v2.component.html",
|
||||
@@ -27,24 +29,34 @@ export class PasswordStrengthV2Component implements OnChanges {
|
||||
* The size (height) of the password strength component.
|
||||
* Possible values are "default", "small" and "large".
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() size: SizeTypes = "default";
|
||||
/**
|
||||
* Determines whether to show the password strength score text on the progress bar or not.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() showText = false;
|
||||
/**
|
||||
* Optional email address which can be used as input for the password strength calculation
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() email: string;
|
||||
/**
|
||||
* Optional name which can be used as input for the password strength calculation
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() name: string;
|
||||
/**
|
||||
* Sets the password value and updates the password strength.
|
||||
*
|
||||
* @param value - password provided by the hosting component
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() set password(value: string) {
|
||||
this.updatePasswordStrength(value);
|
||||
}
|
||||
@@ -55,11 +67,15 @@ export class PasswordStrengthV2Component implements OnChanges {
|
||||
* The password strength score represents the strength of a password.
|
||||
* It is emitted as an event when the password strength changes.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() passwordStrengthScore = new EventEmitter<PasswordStrengthScore>();
|
||||
|
||||
/**
|
||||
* Emits an event with the password score text and color.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() passwordScoreTextWithColor = new EventEmitter<PasswordColorText>();
|
||||
|
||||
passwordScore: PasswordStrengthScore;
|
||||
|
||||
@@ -56,11 +56,21 @@ interface DatePresetSelectOption {
|
||||
|
||||
@Directive()
|
||||
export class AddEditComponent implements OnInit, OnDestroy {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() sendId: string;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() type: SendType;
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onSavedSend = new EventEmitter<SendView>();
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onDeletedSend = new EventEmitter<SendView>();
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onCancelled = new EventEmitter<SendView>();
|
||||
|
||||
deletionDatePresets: DatePresetSelectOption[] = [
|
||||
|
||||
@@ -38,6 +38,8 @@ import { ImportType } from "../../models";
|
||||
|
||||
type ProfileOption = { id: string; name: string };
|
||||
|
||||
// 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: "import-chrome",
|
||||
templateUrl: "import-chrome.component.html",
|
||||
@@ -70,14 +72,20 @@ export class ImportChromeComponent implements OnInit, OnDestroy {
|
||||
|
||||
profileList: ProfileOption[] = [];
|
||||
|
||||
format = input.required<ImportType>();
|
||||
readonly format = input.required<ImportType>();
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
onLoadProfilesFromBrowser: (browser: string) => Promise<ProfileOption[]>;
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
onImportFromBrowser: (browser: string, profile: string) => Promise<any[]>;
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() csvDataLoaded = new EventEmitter<string>();
|
||||
|
||||
constructor(
|
||||
|
||||
@@ -12,6 +12,8 @@ import {
|
||||
IconButtonModule,
|
||||
} from "@bitwarden/components";
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
|
||||
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
|
||||
@Component({
|
||||
templateUrl: "file-password-prompt.component.html",
|
||||
imports: [
|
||||
|
||||
@@ -16,6 +16,8 @@ export interface ErrorListItem {
|
||||
message: string;
|
||||
}
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
|
||||
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
|
||||
@Component({
|
||||
templateUrl: "./import-error-dialog.component.html",
|
||||
imports: [CommonModule, JslibModule, DialogModule, TableModule, ButtonModule],
|
||||
|
||||
@@ -20,6 +20,8 @@ export interface ResultList {
|
||||
count: number;
|
||||
}
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
|
||||
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
|
||||
@Component({
|
||||
templateUrl: "./import-success-dialog.component.html",
|
||||
imports: [CommonModule, JslibModule, DialogModule, TableModule, ButtonModule],
|
||||
|
||||
@@ -12,6 +12,8 @@ import {
|
||||
IconButtonModule,
|
||||
} from "@bitwarden/components";
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
|
||||
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
|
||||
@Component({
|
||||
templateUrl: "sshkey-password-prompt.component.html",
|
||||
imports: [
|
||||
|
||||
@@ -86,6 +86,8 @@ import {
|
||||
import { ImporterProviders } from "./importer-providers";
|
||||
import { ImportLastPassComponent } from "./lastpass";
|
||||
|
||||
// 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: "tools-import",
|
||||
templateUrl: "import.component.html",
|
||||
@@ -131,6 +133,8 @@ export class ImportComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||
* Enables the hosting control to pass in an organizationId
|
||||
* If a organizationId is provided, the organization selection is disabled.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() set organizationId(value: OrganizationId | string | undefined) {
|
||||
if (Utils.isNullOrEmpty(value)) {
|
||||
this._organizationId = undefined;
|
||||
@@ -157,9 +161,13 @@ export class ImportComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||
});
|
||||
}
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
onLoadProfilesFromBrowser: (browser: string) => Promise<any[]>;
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
onImportFromBrowser: (browser: string, profile: string) => Promise<any[]>;
|
||||
|
||||
@@ -191,15 +199,23 @@ export class ImportComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||
chromiumLoader: [Loader.file as DataLoader],
|
||||
});
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@ViewChild(BitSubmitDirective)
|
||||
private bitSubmit: BitSubmitDirective;
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output()
|
||||
formLoading = new EventEmitter<boolean>();
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output()
|
||||
formDisabled = new EventEmitter<boolean>();
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output()
|
||||
onSuccessfulImport = new EventEmitter<string>();
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@ type LastPassMultifactorPromptData = {
|
||||
variant: LastPassMultifactorPromptVariant;
|
||||
};
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
|
||||
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
|
||||
@Component({
|
||||
templateUrl: "lastpass-multifactor-prompt.component.html",
|
||||
imports: [
|
||||
|
||||
@@ -15,6 +15,8 @@ import {
|
||||
TypographyModule,
|
||||
} from "@bitwarden/components";
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
|
||||
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
|
||||
@Component({
|
||||
templateUrl: "lastpass-password-prompt.component.html",
|
||||
imports: [
|
||||
|
||||
@@ -25,6 +25,8 @@ import {
|
||||
|
||||
import { LastPassDirectImportService } from "./lastpass-direct-import.service";
|
||||
|
||||
// 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: "import-lastpass",
|
||||
templateUrl: "import-lastpass.component.html",
|
||||
@@ -60,6 +62,8 @@ export class ImportLastPassComponent implements OnInit, OnDestroy {
|
||||
}),
|
||||
);
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() csvDataLoaded = new EventEmitter<string>();
|
||||
|
||||
constructor(
|
||||
|
||||
@@ -13,6 +13,8 @@ import { OrganizationId } from "@bitwarden/common/types/guid";
|
||||
import { CalloutModule } from "@bitwarden/components";
|
||||
import { ExportFormat } from "@bitwarden/vault-export-core";
|
||||
|
||||
// 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: "tools-export-scope-callout",
|
||||
templateUrl: "export-scope-callout.component.html",
|
||||
|
||||
@@ -73,6 +73,8 @@ import { EncryptedExportType } from "../enums/encrypted-export-type.enum";
|
||||
|
||||
import { ExportScopeCalloutComponent } from "./export-scope-callout.component";
|
||||
|
||||
// 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: "tools-export",
|
||||
templateUrl: "export.component.html",
|
||||
@@ -101,6 +103,8 @@ export class ExportComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||
* Enables the hosting control to pass in an organizationId
|
||||
* If a organizationId is provided, the organization selection is disabled.
|
||||
*/
|
||||
// TODO: Fix this the next time the file is edited.
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() set organizationId(value: OrganizationId | string | undefined) {
|
||||
if (Utils.isNullOrEmpty(value)) {
|
||||
this._organizationId$.next(undefined);
|
||||
@@ -158,6 +162,8 @@ export class ExportComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||
* The hosting control also needs a bitSubmitDirective (on the Submit button) which calls this components {@link submit}-method.
|
||||
* This components formState (loading/disabled) is emitted back up to the hosting component so for example the Submit button can be enabled/disabled and show loading state.
|
||||
*/
|
||||
// TODO: Fix this the next time the file is edited.
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@ViewChild(BitSubmitDirective)
|
||||
private bitSubmit: BitSubmitDirective;
|
||||
|
||||
@@ -165,6 +171,8 @@ export class ExportComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||
* Emits true when the BitSubmitDirective({@link bitSubmit} is executing {@link submit} and false when execution has completed.
|
||||
* Example: Used to show the loading state of the submit button present on the hosting component
|
||||
* */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output()
|
||||
formLoading = new EventEmitter<boolean>();
|
||||
|
||||
@@ -172,6 +180,8 @@ export class ExportComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||
* Emits true when this form gets disabled and false when enabled.
|
||||
* Example: Used to disable the submit button, which is present on the hosting component
|
||||
* */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output()
|
||||
formDisabled = new EventEmitter<boolean>();
|
||||
|
||||
@@ -180,9 +190,13 @@ export class ExportComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||
* - Emits an undefined when exporting from an individual vault
|
||||
* - Emits the organizationId when exporting from an organizational vault
|
||||
* */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output()
|
||||
onSuccessfulExport = new EventEmitter<OrganizationId | undefined>();
|
||||
|
||||
// TODO: Fix this the next time the file is edited.
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@ViewChild(PasswordStrengthV2Component) passwordStrengthComponent: PasswordStrengthV2Component;
|
||||
|
||||
encryptedExportType = EncryptedExportType;
|
||||
@@ -296,9 +310,9 @@ export class ExportComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||
),
|
||||
);
|
||||
|
||||
/*
|
||||
Determines how organization exports are described in the callout.
|
||||
Admins are exempted from organization data ownership policy,
|
||||
/*
|
||||
Determines how organization exports are described in the callout.
|
||||
Admins are exempted from organization data ownership policy,
|
||||
and so this needs to determine if the policy is enabled for the org, not if it applies to the user.
|
||||
*/
|
||||
this.organizationDataOwnershipPolicyEnabledForOrg$ = combineLatest([
|
||||
@@ -401,9 +415,9 @@ export class ExportComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
Initialize component for organization only export
|
||||
Hides "My Vault" option by returning immediately
|
||||
/*
|
||||
Initialize component for organization only export
|
||||
Hides "My Vault" option by returning immediately
|
||||
*/
|
||||
private initOrganizationOnly(): void {
|
||||
this.organizations$ = this.accountService.activeAccount$.pipe(
|
||||
|
||||
@@ -19,6 +19,8 @@ import {
|
||||
} from "@bitwarden/generator-core";
|
||||
|
||||
/** Options group for catchall emails */
|
||||
// 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: "tools-catchall-settings",
|
||||
templateUrl: "catchall-settings.component.html",
|
||||
@@ -38,6 +40,8 @@ export class CatchallSettingsComponent implements OnInit, OnDestroy, OnChanges {
|
||||
* @remarks this is initialized to null but since it's a required input it'll
|
||||
* never have that value in practice.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true })
|
||||
account!: Account;
|
||||
|
||||
@@ -48,6 +52,8 @@ export class CatchallSettingsComponent implements OnInit, OnDestroy, OnChanges {
|
||||
* to receive live settings updates including the initial update,
|
||||
* use `CredentialGeneratorService.settings(...)` instead.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output()
|
||||
readonly onUpdated = new EventEmitter<CatchallGenerationOptions>();
|
||||
|
||||
|
||||
@@ -27,6 +27,8 @@ import { GeneratorHistoryService } from "@bitwarden/generator-history";
|
||||
import { CredentialGeneratorHistoryComponent as CredentialGeneratorHistoryToolsComponent } from "./credential-generator-history.component";
|
||||
import { EmptyCredentialHistoryComponent } from "./empty-credential-history.component";
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
|
||||
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
|
||||
@Component({
|
||||
templateUrl: "credential-generator-history-dialog.component.html",
|
||||
imports: [
|
||||
@@ -49,6 +51,8 @@ export class CredentialGeneratorHistoryDialogComponent implements OnChanges, OnI
|
||||
private logService: LogService,
|
||||
) {}
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
account: Account | null;
|
||||
|
||||
@@ -59,6 +63,8 @@ export class CredentialGeneratorHistoryDialogComponent implements OnChanges, OnI
|
||||
*
|
||||
* @warning this may reveal sensitive information in plaintext.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
debug: boolean = false;
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@ import { GeneratedCredential, GeneratorHistoryService } from "@bitwarden/generat
|
||||
import { GeneratorModule } from "./generator.module";
|
||||
import { translate } from "./util";
|
||||
|
||||
// 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: "bit-credential-generator-history",
|
||||
templateUrl: "credential-generator-history.component.html",
|
||||
@@ -50,6 +52,8 @@ export class CredentialGeneratorHistoryComponent implements OnChanges, OnInit, O
|
||||
private logService: LogService,
|
||||
) {}
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true })
|
||||
account: Account;
|
||||
|
||||
@@ -60,6 +64,8 @@ export class CredentialGeneratorHistoryComponent implements OnChanges, OnInit, O
|
||||
*
|
||||
* @warning this may reveal sensitive information in plaintext.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
debug: boolean = false;
|
||||
|
||||
|
||||
@@ -64,6 +64,8 @@ const IDENTIFIER = "identifier";
|
||||
const FORWARDER = "forwarder";
|
||||
const NONE_SELECTED = "none";
|
||||
|
||||
// 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: "tools-credential-generator",
|
||||
templateUrl: "credential-generator.component.html",
|
||||
@@ -90,6 +92,8 @@ export class CredentialGeneratorComponent implements OnInit, OnChanges, OnDestro
|
||||
/** Binds the component to a specific user's settings. When this input is not provided,
|
||||
* the form binds to the active user
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
account: Account | null = null;
|
||||
|
||||
@@ -98,6 +102,8 @@ export class CredentialGeneratorComponent implements OnInit, OnChanges, OnDestro
|
||||
*
|
||||
* @warning this may reveal sensitive information in plaintext.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
debug: boolean = false;
|
||||
|
||||
@@ -123,10 +129,14 @@ export class CredentialGeneratorComponent implements OnInit, OnChanges, OnDestro
|
||||
/**
|
||||
* The website associated with the credential generation request.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
website: string | null = null;
|
||||
|
||||
/** Emits credentials created from a generation request. */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output()
|
||||
readonly onGenerated = new EventEmitter<GeneratedCredential>();
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@ import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||
import { NoCredentialsIcon } from "@bitwarden/assets/svg";
|
||||
import { NoItemsModule } from "@bitwarden/components";
|
||||
|
||||
// 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: "bit-empty-credential-history",
|
||||
templateUrl: "empty-credential-history.component.html",
|
||||
|
||||
@@ -26,6 +26,8 @@ const Controls = Object.freeze({
|
||||
});
|
||||
|
||||
/** Options group for forwarder integrations */
|
||||
// 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: "tools-forwarder-settings",
|
||||
templateUrl: "forwarder-settings.component.html",
|
||||
@@ -45,11 +47,15 @@ export class ForwarderSettingsComponent implements OnInit, OnChanges, OnDestroy
|
||||
* @remarks this is initialized to null but since it's a required input it'll
|
||||
* never have that value in practice.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true })
|
||||
account: Account = null!;
|
||||
|
||||
protected account$ = new ReplaySubject<Account>(1);
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true })
|
||||
forwarder: VendorId = null!;
|
||||
|
||||
@@ -58,6 +64,8 @@ export class ForwarderSettingsComponent implements OnInit, OnChanges, OnDestroy
|
||||
* to receive live settings updates including the initial update,
|
||||
* use `CredentialGeneratorService.settings$(...)` instead.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output()
|
||||
readonly onUpdated = new EventEmitter<unknown>();
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@ import { UserId } from "@bitwarden/common/types/guid";
|
||||
import { TypographyModule } from "@bitwarden/components";
|
||||
import { I18nPipe } from "@bitwarden/ui-common";
|
||||
|
||||
// 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: "nudge-generator-spotlight",
|
||||
templateUrl: "nudge-generator-spotlight.component.html",
|
||||
|
||||
@@ -34,6 +34,8 @@ const Controls = Object.freeze({
|
||||
});
|
||||
|
||||
/** Options group for passphrases */
|
||||
// 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: "tools-passphrase-settings",
|
||||
templateUrl: "passphrase-settings.component.html",
|
||||
@@ -57,6 +59,8 @@ export class PassphraseSettingsComponent implements OnInit, OnChanges, OnDestroy
|
||||
*
|
||||
* @warning this may reveal sensitive information in plaintext.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
debug: boolean = false;
|
||||
|
||||
@@ -67,6 +71,8 @@ export class PassphraseSettingsComponent implements OnInit, OnChanges, OnDestroy
|
||||
* @remarks this is initialized to null but since it's a required input it'll
|
||||
* never have that value in practice.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true })
|
||||
account: Account = null!;
|
||||
|
||||
@@ -79,10 +85,14 @@ export class PassphraseSettingsComponent implements OnInit, OnChanges, OnDestroy
|
||||
}
|
||||
|
||||
/** When `true`, an options header is displayed by the component. Otherwise, the header is hidden. */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
showHeader: boolean = true;
|
||||
|
||||
/** Removes bottom margin from `bit-section` */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ transform: coerceBooleanProperty }) disableMargin = false;
|
||||
|
||||
/** Emits settings updates and completes if the settings become unavailable.
|
||||
@@ -90,6 +100,8 @@ export class PassphraseSettingsComponent implements OnInit, OnChanges, OnDestroy
|
||||
* to receive live settings updates including the initial update,
|
||||
* use {@link CredentialGeneratorService.settings} instead.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output()
|
||||
readonly onUpdated = new EventEmitter<PassphraseGenerationOptions>();
|
||||
|
||||
|
||||
@@ -53,6 +53,8 @@ import { GeneratorHistoryService } from "@bitwarden/generator-history";
|
||||
import { toAlgorithmInfo, translate } from "./util";
|
||||
|
||||
/** Options group for passwords */
|
||||
// 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: "tools-password-generator",
|
||||
templateUrl: "password-generator.component.html",
|
||||
@@ -76,6 +78,8 @@ export class PasswordGeneratorComponent implements OnInit, OnChanges, OnDestroy
|
||||
/** Binds the component to a specific user's settings. When this input is not provided,
|
||||
* the form binds to the active user
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
account: Account | null = null;
|
||||
|
||||
@@ -86,6 +90,8 @@ export class PasswordGeneratorComponent implements OnInit, OnChanges, OnDestroy
|
||||
*
|
||||
* @warning this may reveal sensitive information in plaintext.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
debug: boolean = false;
|
||||
|
||||
@@ -110,10 +116,14 @@ export class PasswordGeneratorComponent implements OnInit, OnChanges, OnDestroy
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
profile: GeneratorProfile = Profile.account;
|
||||
|
||||
/** Removes bottom margin, passed to downstream components */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ transform: coerceBooleanProperty })
|
||||
disableMargin = false;
|
||||
|
||||
@@ -154,10 +164,14 @@ export class PasswordGeneratorComponent implements OnInit, OnChanges, OnDestroy
|
||||
}
|
||||
|
||||
/** Emits credentials created from a generation request. */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output()
|
||||
readonly onGenerated = new EventEmitter<GeneratedCredential>();
|
||||
|
||||
/** emits algorithm info when the selected algorithm changes */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output()
|
||||
readonly onAlgorithm = new EventEmitter<AlgorithmInfo>();
|
||||
|
||||
|
||||
@@ -34,6 +34,8 @@ const Controls = Object.freeze({
|
||||
});
|
||||
|
||||
/** Options group for passwords */
|
||||
// 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: "tools-password-settings",
|
||||
templateUrl: "password-settings.component.html",
|
||||
@@ -55,6 +57,8 @@ export class PasswordSettingsComponent implements OnInit, OnChanges, OnDestroy {
|
||||
* @remarks this is initialized to null but since it's a required input it'll
|
||||
* never have that value in practice.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true })
|
||||
account: Account = null!;
|
||||
|
||||
@@ -67,14 +71,20 @@ export class PasswordSettingsComponent implements OnInit, OnChanges, OnDestroy {
|
||||
}
|
||||
|
||||
/** When `true`, an options header is displayed by the component. Otherwise, the header is hidden. */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
showHeader: boolean = true;
|
||||
|
||||
/** Number of milliseconds to wait before accepting user input. */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
waitMs: number = 100;
|
||||
|
||||
/** Removes bottom margin from `bit-section` */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ transform: coerceBooleanProperty }) disableMargin = false;
|
||||
|
||||
/** Emits settings updates and completes if the settings become unavailable.
|
||||
@@ -82,6 +92,8 @@ export class PasswordSettingsComponent implements OnInit, OnChanges, OnDestroy {
|
||||
* to receive live settings updates including the initial update,
|
||||
* use `CredentialGeneratorService.settings(...)` instead.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output()
|
||||
readonly onUpdated = new EventEmitter<PasswordGenerationOptions>();
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@ import {
|
||||
} from "@bitwarden/generator-core";
|
||||
|
||||
/** Options group for plus-addressed emails */
|
||||
// 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: "tools-subaddress-settings",
|
||||
templateUrl: "subaddress-settings.component.html",
|
||||
@@ -38,6 +40,8 @@ export class SubaddressSettingsComponent implements OnInit, OnChanges, OnDestroy
|
||||
* @remarks this is initialized to null but since it's a required input it'll
|
||||
* never have that value in practice.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true })
|
||||
account: Account = null!;
|
||||
|
||||
@@ -54,6 +58,8 @@ export class SubaddressSettingsComponent implements OnInit, OnChanges, OnDestroy
|
||||
* to receive live settings updates including the initial update,
|
||||
* use `CredentialGeneratorService.settings(...)` instead.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output()
|
||||
readonly onUpdated = new EventEmitter<SubaddressGenerationOptions>();
|
||||
|
||||
|
||||
@@ -64,6 +64,8 @@ const FORWARDER = "forwarder";
|
||||
const NONE_SELECTED = "none";
|
||||
|
||||
/** Component that generates usernames and emails */
|
||||
// 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: "tools-username-generator",
|
||||
templateUrl: "username-generator.component.html",
|
||||
@@ -95,6 +97,8 @@ export class UsernameGeneratorComponent implements OnInit, OnChanges, OnDestroy
|
||||
/** Binds the component to a specific user's settings. When this input is not provided,
|
||||
* the form binds to the active user
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
account: Account | null = null;
|
||||
|
||||
@@ -105,6 +109,8 @@ export class UsernameGeneratorComponent implements OnInit, OnChanges, OnDestroy
|
||||
*
|
||||
* @warning this may reveal sensitive information in plaintext.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
debug: boolean = false;
|
||||
|
||||
@@ -132,18 +138,26 @@ export class UsernameGeneratorComponent implements OnInit, OnChanges, OnDestroy
|
||||
/**
|
||||
* The website associated with the credential generation request.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
website: string | null = null;
|
||||
|
||||
/** Emits credentials created from a generation request. */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output()
|
||||
readonly onGenerated = new EventEmitter<GeneratedCredential>();
|
||||
|
||||
/** emits algorithm info when the selected algorithm changes */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output()
|
||||
readonly onAlgorithm = new EventEmitter<AlgorithmInfo | null>();
|
||||
|
||||
/** Removes bottom margin from internal elements */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ transform: coerceBooleanProperty }) disableMargin = false;
|
||||
|
||||
/** Tracks the selected generation algorithm */
|
||||
|
||||
@@ -19,6 +19,8 @@ import {
|
||||
} from "@bitwarden/generator-core";
|
||||
|
||||
/** Options group for usernames */
|
||||
// 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: "tools-username-settings",
|
||||
templateUrl: "username-settings.component.html",
|
||||
@@ -38,6 +40,8 @@ export class UsernameSettingsComponent implements OnInit, OnChanges, OnDestroy {
|
||||
* @remarks this is initialized to null but since it's a required input it'll
|
||||
* never have that value in practice.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true })
|
||||
account: Account = null!;
|
||||
|
||||
@@ -54,6 +58,8 @@ export class UsernameSettingsComponent implements OnInit, OnChanges, OnDestroy {
|
||||
* to receive live settings updates including the initial update,
|
||||
* use `CredentialGeneratorService.settings(...)` instead.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output()
|
||||
readonly onUpdated = new EventEmitter<EffUsernameGenerationOptions>();
|
||||
|
||||
|
||||
@@ -52,6 +52,8 @@ export enum SendItemDialogResult {
|
||||
/**
|
||||
* Component for adding or editing a send item.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
|
||||
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
|
||||
@Component({
|
||||
templateUrl: "send-add-edit-dialog.component.html",
|
||||
imports: [
|
||||
|
||||
@@ -10,13 +10,19 @@ import { BillingAccountProfileStateService } from "@bitwarden/common/billing/abs
|
||||
import { SendType } from "@bitwarden/common/tools/send/enums/send-type";
|
||||
import { ButtonModule, ButtonType, MenuModule } from "@bitwarden/components";
|
||||
|
||||
// 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: "tools-new-send-dropdown",
|
||||
templateUrl: "new-send-dropdown.component.html",
|
||||
imports: [JslibModule, CommonModule, ButtonModule, RouterLink, MenuModule, PremiumBadgeComponent],
|
||||
})
|
||||
export class NewSendDropdownComponent implements OnInit {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() hideIcon: boolean = false;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() buttonType: ButtonType = "primary";
|
||||
|
||||
sendType = SendType;
|
||||
|
||||
@@ -33,6 +33,8 @@ import { CredentialGeneratorService, GenerateRequest, Type } from "@bitwarden/ge
|
||||
import { SendFormConfig } from "../../abstractions/send-form-config.service";
|
||||
import { SendFormContainer } from "../../send-form-container";
|
||||
|
||||
// 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: "tools-send-options",
|
||||
templateUrl: "./send-options.component.html",
|
||||
@@ -52,8 +54,12 @@ import { SendFormContainer } from "../../send-form-container";
|
||||
],
|
||||
})
|
||||
export class SendOptionsComponent implements OnInit {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true })
|
||||
config: SendFormConfig;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
originalSendView: SendView;
|
||||
disableHideEmail = false;
|
||||
|
||||
@@ -47,6 +47,8 @@ export interface DatePresetSelectOption {
|
||||
value: DatePreset | string;
|
||||
}
|
||||
|
||||
// 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: "tools-send-details",
|
||||
templateUrl: "./send-details.component.html",
|
||||
@@ -68,7 +70,11 @@ export interface DatePresetSelectOption {
|
||||
],
|
||||
})
|
||||
export class SendDetailsComponent implements OnInit {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() config: SendFormConfig;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() originalSendView?: SendView;
|
||||
|
||||
FileSendType = SendType.File;
|
||||
|
||||
@@ -17,6 +17,8 @@ import {
|
||||
import { SendFormConfig } from "../../abstractions/send-form-config.service";
|
||||
import { SendFormContainer } from "../../send-form-container";
|
||||
|
||||
// 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: "tools-send-file-details",
|
||||
templateUrl: "./send-file-details.component.html",
|
||||
@@ -32,8 +34,8 @@ import { SendFormContainer } from "../../send-form-container";
|
||||
],
|
||||
})
|
||||
export class SendFileDetailsComponent implements OnInit {
|
||||
config = input.required<SendFormConfig>();
|
||||
originalSendView = input<SendView>();
|
||||
readonly config = input.required<SendFormConfig>();
|
||||
readonly originalSendView = input<SendView>();
|
||||
|
||||
sendFileDetailsForm = this.formBuilder.group({
|
||||
file: this.formBuilder.control<SendFileView | null>(null, Validators.required),
|
||||
|
||||
@@ -10,6 +10,8 @@ import { CheckboxModule, FormFieldModule, SectionComponent } from "@bitwarden/co
|
||||
import { SendFormConfig } from "../../abstractions/send-form-config.service";
|
||||
import { SendFormContainer } from "../../send-form-container";
|
||||
|
||||
// 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: "tools-send-text-details",
|
||||
templateUrl: "./send-text-details.component.html",
|
||||
@@ -23,8 +25,8 @@ import { SendFormContainer } from "../../send-form-container";
|
||||
],
|
||||
})
|
||||
export class SendTextDetailsComponent implements OnInit {
|
||||
config = input.required<SendFormConfig>();
|
||||
originalSendView = input<SendView>();
|
||||
readonly config = input.required<SendFormConfig>();
|
||||
readonly originalSendView = input<SendView>();
|
||||
|
||||
sendTextDetailsForm = this.formBuilder.group({
|
||||
text: new FormControl("", Validators.required),
|
||||
|
||||
@@ -38,6 +38,8 @@ import { SendForm, SendFormContainer } from "../send-form-container";
|
||||
|
||||
import { SendDetailsComponent } from "./send-details/send-details.component";
|
||||
|
||||
// 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: "tools-send-form",
|
||||
templateUrl: "./send-form.component.html",
|
||||
@@ -59,6 +61,8 @@ import { SendDetailsComponent } from "./send-details/send-details.component";
|
||||
],
|
||||
})
|
||||
export class SendFormComponent implements AfterViewInit, OnInit, OnChanges, SendFormContainer {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@ViewChild(BitSubmitDirective)
|
||||
private bitSubmit: BitSubmitDirective;
|
||||
private destroyRef = inject(DestroyRef);
|
||||
@@ -68,27 +72,37 @@ export class SendFormComponent implements AfterViewInit, OnInit, OnChanges, Send
|
||||
/**
|
||||
* The form ID to use for the form. Used to connect it to a submit button.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true }) formId: string;
|
||||
|
||||
/**
|
||||
* The configuration for the add/edit form. Used to determine which controls are shown and what values are available.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true }) config: SendFormConfig;
|
||||
|
||||
/**
|
||||
* Optional submit button that will be disabled or marked as loading when the form is submitting.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
submitBtn?: ButtonComponent;
|
||||
|
||||
/**
|
||||
* Event emitted when the send is created successfully.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onSendCreated = new EventEmitter<SendView>();
|
||||
|
||||
/**
|
||||
* Event emitted when the send is updated successfully.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onSendUpdated = new EventEmitter<SendView>();
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,6 +10,8 @@ import { ChipSelectComponent } from "@bitwarden/components";
|
||||
|
||||
import { SendListFiltersService } from "../services/send-list-filters.service";
|
||||
|
||||
// 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: "app-send-list-filters",
|
||||
templateUrl: "./send-list-filters.component.html",
|
||||
|
||||
@@ -25,6 +25,8 @@ import {
|
||||
TypographyModule,
|
||||
} from "@bitwarden/components";
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
|
||||
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
|
||||
@Component({
|
||||
imports: [
|
||||
CommonModule,
|
||||
@@ -46,9 +48,13 @@ export class SendListItemsContainerComponent {
|
||||
/**
|
||||
* The list of sends to display.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
sends: SendView[] = [];
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
headerText: string;
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@ import { SendItemsService } from "../services/send-items.service";
|
||||
|
||||
const SearchTextDebounceInterval = 200;
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
|
||||
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
|
||||
@Component({
|
||||
imports: [CommonModule, SearchModule, JslibModule, FormsModule],
|
||||
selector: "tools-send-search",
|
||||
|
||||
Reference in New Issue
Block a user