mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
Vault - Prefer signal & change detection (#16947)
This commit is contained in:
@@ -16,8 +16,14 @@ import { KeyService } from "@bitwarden/key-management";
|
||||
|
||||
@Directive()
|
||||
export class FolderAddEditComponent implements OnInit {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() folderId: string;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onSavedFolder = new EventEmitter<FolderView>();
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onDeletedFolder = new EventEmitter<FolderView>();
|
||||
|
||||
editMode = false;
|
||||
|
||||
@@ -25,14 +25,14 @@ export class IconComponent {
|
||||
/**
|
||||
* The cipher to display the icon for.
|
||||
*/
|
||||
cipher = input.required<CipherViewLike>();
|
||||
readonly cipher = input.required<CipherViewLike>();
|
||||
|
||||
/**
|
||||
* coloredIcon will adjust the size of favicons and the colors of the text icon when user is in the item details view.
|
||||
*/
|
||||
coloredIcon = input<boolean>(false);
|
||||
readonly coloredIcon = input<boolean>(false);
|
||||
|
||||
imageLoaded = signal(false);
|
||||
readonly imageLoaded = signal(false);
|
||||
|
||||
protected data$: Observable<CipherIconDetails>;
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@ import { Component, EventEmitter, Input, Output } from "@angular/core";
|
||||
import { ButtonModule, IconButtonModule, 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: "bit-spotlight",
|
||||
templateUrl: "spotlight.component.html",
|
||||
@@ -11,16 +13,30 @@ import { I18nPipe } from "@bitwarden/ui-common";
|
||||
})
|
||||
export class SpotlightComponent {
|
||||
// The title of the component
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true }) title: string | null = null;
|
||||
// The subtitle of the component
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() subtitle?: string | null = null;
|
||||
// The text to display on the button
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() buttonText?: string;
|
||||
// Wheter the component can be dismissed, if true, the component will not show a close button
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() persistent = false;
|
||||
// Optional icon to display on the button
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() buttonIcon: string | null = null;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onDismiss = new EventEmitter<void>();
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onButtonClick = new EventEmitter();
|
||||
|
||||
handleButtonClick(event: MouseEvent): void {
|
||||
|
||||
@@ -31,10 +31,20 @@ import {
|
||||
|
||||
@Directive()
|
||||
export class VaultItemsComponent<C extends CipherViewLike> implements OnDestroy {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() activeCipherId: string = null;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onCipherClicked = new EventEmitter<C>();
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onCipherRightClicked = new EventEmitter<C>();
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onAddCipher = new EventEmitter<CipherType | undefined>();
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onAddCipherOptions = new EventEmitter();
|
||||
|
||||
loaded = false;
|
||||
|
||||
@@ -13,13 +13,25 @@ import { VaultFilter } from "../models/vault-filter.model";
|
||||
|
||||
@Directive()
|
||||
export class CollectionFilterComponent {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() hide = false;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() collapsedFilterNodes: Set<string>;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() collectionNodes: DynamicTreeNode<CollectionView>;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() activeFilter: VaultFilter;
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onNodeCollapseStateChange: EventEmitter<ITreeNodeObject> =
|
||||
new EventEmitter<ITreeNodeObject>();
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onFilterChange: EventEmitter<VaultFilter> = new EventEmitter<VaultFilter>();
|
||||
DefaultCollectionType = CollectionTypes.DefaultUserCollection;
|
||||
|
||||
|
||||
@@ -11,15 +11,31 @@ import { VaultFilter } from "../models/vault-filter.model";
|
||||
|
||||
@Directive()
|
||||
export class FolderFilterComponent {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() hide = false;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() collapsedFilterNodes: Set<string>;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() folderNodes: DynamicTreeNode<FolderView>;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() activeFilter: VaultFilter;
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onNodeCollapseStateChange: EventEmitter<ITreeNodeObject> =
|
||||
new EventEmitter<ITreeNodeObject>();
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onFilterChange: EventEmitter<VaultFilter> = new EventEmitter<VaultFilter>();
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onAddFolder = new EventEmitter();
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onEditFolder = new EventEmitter<FolderView>();
|
||||
|
||||
get folders() {
|
||||
|
||||
@@ -11,15 +11,31 @@ import { VaultFilter } from "../models/vault-filter.model";
|
||||
|
||||
@Directive()
|
||||
export class OrganizationFilterComponent {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() hide = false;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() collapsedFilterNodes: Set<string>;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() organizations: Organization[];
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() activeFilter: VaultFilter;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() activeOrganizationDataOwnership: boolean;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() activeSingleOrganizationPolicy: boolean;
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onNodeCollapseStateChange: EventEmitter<ITreeNodeObject> =
|
||||
new EventEmitter<ITreeNodeObject>();
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onFilterChange: EventEmitter<VaultFilter> = new EventEmitter<VaultFilter>();
|
||||
|
||||
get displayMode(): DisplayMode {
|
||||
|
||||
@@ -7,10 +7,20 @@ import { VaultFilter } from "../models/vault-filter.model";
|
||||
|
||||
@Directive()
|
||||
export class StatusFilterComponent {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() hideFavorites = false;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() hideTrash = false;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() hideArchive = false;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onFilterChange: EventEmitter<VaultFilter> = new EventEmitter<VaultFilter>();
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() activeFilter: VaultFilter;
|
||||
|
||||
get show() {
|
||||
|
||||
@@ -10,13 +10,25 @@ import { VaultFilter } from "../models/vault-filter.model";
|
||||
|
||||
@Directive()
|
||||
export class TypeFilterComponent {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() hide = false;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() collapsedFilterNodes: Set<string>;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() selectedCipherType: CipherType = null;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() activeFilter: VaultFilter;
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onNodeCollapseStateChange: EventEmitter<ITreeNodeObject> =
|
||||
new EventEmitter<ITreeNodeObject>();
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onFilterChange: EventEmitter<VaultFilter> = new EventEmitter<VaultFilter>();
|
||||
|
||||
readonly typesNode: TopLevelTreeNode = {
|
||||
|
||||
@@ -22,15 +22,33 @@ import { VaultFilter } from "../models/vault-filter.model";
|
||||
// and refactor desktop/browser vault filters
|
||||
@Directive()
|
||||
export class VaultFilterComponent implements OnInit {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() activeFilter: VaultFilter = new VaultFilter();
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() hideFolders = false;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() hideCollections = false;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() hideFavorites = false;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() hideTrash = false;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() hideOrganizations = false;
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onFilterChange = new EventEmitter<VaultFilter>();
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onAddFolder = new EventEmitter<never>();
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onEditFolder = new EventEmitter<FolderView>();
|
||||
|
||||
private activeUserId: UserId;
|
||||
|
||||
@@ -13,11 +13,15 @@ import { CustomFieldsComponent } from "../custom-fields/custom-fields.component"
|
||||
|
||||
import { AdditionalOptionsSectionComponent } from "./additional-options-section.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: "vault-custom-fields",
|
||||
template: "",
|
||||
})
|
||||
class MockCustomFieldsComponent {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() disableSectionMargin: boolean;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@ import { PasswordRepromptService } from "../../../services/password-reprompt.ser
|
||||
import { CipherFormContainer } from "../../cipher-form-container";
|
||||
import { CustomFieldsComponent } from "../custom-fields/custom-fields.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: "vault-additional-options-section",
|
||||
templateUrl: "./additional-options-section.component.html",
|
||||
@@ -39,6 +41,8 @@ import { CustomFieldsComponent } from "../custom-fields/custom-fields.component"
|
||||
],
|
||||
})
|
||||
export class AdditionalOptionsSectionComponent implements OnInit {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@ViewChild(CustomFieldsComponent) customFieldsComponent: CustomFieldsComponent;
|
||||
|
||||
additionalOptionsForm = this.formBuilder.group({
|
||||
@@ -56,6 +60,8 @@ export class AdditionalOptionsSectionComponent implements OnInit {
|
||||
/** True when the form is in `partial-edit` mode */
|
||||
isPartialEdit = false;
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() disableSectionMargin: boolean;
|
||||
|
||||
/** True when the form allows new fields to be added */
|
||||
|
||||
@@ -26,13 +26,21 @@ import { FakeAccountService, mockAccountServiceWith } from "../../../../../commo
|
||||
import { CipherAttachmentsComponent } from "./cipher-attachments.component";
|
||||
import { DeleteAttachmentComponent } from "./delete-attachment/delete-attachment.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: "app-download-attachment",
|
||||
template: "",
|
||||
})
|
||||
class MockDownloadAttachmentComponent {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() attachment: AttachmentView;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() cipher: CipherView;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() admin: boolean = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -56,6 +56,8 @@ type CipherAttachmentForm = FormGroup<{
|
||||
file: FormControl<File | null>;
|
||||
}>;
|
||||
|
||||
// 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-cipher-attachments",
|
||||
templateUrl: "./cipher-attachments.component.html",
|
||||
@@ -77,27 +79,43 @@ export class CipherAttachmentsComponent implements OnInit, AfterViewInit {
|
||||
static attachmentFormID = "attachmentForm";
|
||||
|
||||
/** Reference to the file HTMLInputElement */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@ViewChild("fileInput", { read: ElementRef }) private fileInput: ElementRef<HTMLInputElement>;
|
||||
|
||||
/** Reference to the BitSubmitDirective */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@ViewChild(BitSubmitDirective) bitSubmit: BitSubmitDirective;
|
||||
|
||||
/** The `id` of the cipher in context */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true }) cipherId: CipherId;
|
||||
|
||||
/** The organization ID if this cipher belongs to an organization */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() organizationId?: OrganizationId;
|
||||
|
||||
/** Denotes if the action is occurring from within the admin console */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() admin: boolean = false;
|
||||
|
||||
/** An optional submit button, whose loading/disabled state will be tied to the form state. */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() submitBtn?: ButtonComponent;
|
||||
|
||||
/** Emits after a file has been successfully uploaded */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onUploadSuccess = new EventEmitter<void>();
|
||||
|
||||
/** Emits after a file has been successfully removed */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onRemoveSuccess = new EventEmitter<void>();
|
||||
|
||||
organization: Organization;
|
||||
|
||||
@@ -17,6 +17,8 @@ import {
|
||||
ToastService,
|
||||
} 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: "app-delete-attachment",
|
||||
templateUrl: "./delete-attachment.component.html",
|
||||
@@ -24,15 +26,23 @@ import {
|
||||
})
|
||||
export class DeleteAttachmentComponent {
|
||||
/** Id of the cipher associated with the attachment */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true }) cipherId!: string;
|
||||
|
||||
/** The attachment that is can be deleted */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true }) attachment!: AttachmentView;
|
||||
|
||||
/** Whether the attachment is being accessed from the admin console */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() admin: boolean = false;
|
||||
|
||||
/** Emits when the attachment is successfully deleted */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onDeletionSuccess = new EventEmitter<void>();
|
||||
|
||||
constructor(
|
||||
|
||||
@@ -17,6 +17,8 @@ export type AdvancedUriOptionDialogParams = {
|
||||
onContinue: () => void;
|
||||
};
|
||||
|
||||
// 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: "advanced-uri-option-dialog.component.html",
|
||||
imports: [ButtonLinkDirective, ButtonModule, DialogModule, JslibModule],
|
||||
|
||||
@@ -36,6 +36,8 @@ interface UriField {
|
||||
matchDetection: UriMatchStrategySetting;
|
||||
}
|
||||
|
||||
// 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: "vault-autofill-options",
|
||||
templateUrl: "./autofill-options.component.html",
|
||||
@@ -60,6 +62,8 @@ export class AutofillOptionsComponent implements OnInit {
|
||||
/**
|
||||
* List of rendered UriOptionComponents. Used for focusing newly added Uri inputs.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@ViewChildren(UriOptionComponent)
|
||||
protected uriOptions: QueryList<UriOptionComponent>;
|
||||
|
||||
|
||||
@@ -36,6 +36,8 @@ import {
|
||||
|
||||
import { AdvancedUriOptionDialogComponent } from "./advanced-uri-option-dialog.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: "vault-autofill-uri-option",
|
||||
templateUrl: "./uri-option.component.html",
|
||||
@@ -58,9 +60,13 @@ import { AdvancedUriOptionDialogComponent } from "./advanced-uri-option-dialog.c
|
||||
],
|
||||
})
|
||||
export class UriOptionComponent implements ControlValueAccessor {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@ViewChild("uriInput")
|
||||
private inputElement: ElementRef<HTMLInputElement>;
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@ViewChild("matchDetectionSelect")
|
||||
private matchDetectionSelect: SelectComponent<UriMatchStrategySetting>;
|
||||
|
||||
@@ -92,18 +98,24 @@ export class UriOptionComponent implements ControlValueAccessor {
|
||||
/**
|
||||
* Whether the option can be reordered. If false, the reorder button will be hidden.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true })
|
||||
canReorder: boolean;
|
||||
|
||||
/**
|
||||
* Whether the URI can be removed from the form. If false, the remove button will be hidden.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true })
|
||||
canRemove: boolean;
|
||||
|
||||
/**
|
||||
* The user's current default match detection strategy. Will be displayed in () after "Default"
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true })
|
||||
set defaultMatchDetection(value: UriMatchStrategySetting) {
|
||||
// The default selection has a value of `null` avoid showing "Default (Default)"
|
||||
@@ -120,14 +132,20 @@ export class UriOptionComponent implements ControlValueAccessor {
|
||||
/**
|
||||
* The index of the URI in the form. Used to render the correct label.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true }) index: number;
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output()
|
||||
onKeydown = new EventEmitter<KeyboardEvent>();
|
||||
|
||||
/**
|
||||
* Emits when the remove button is clicked and URI should be removed from the form.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output()
|
||||
remove = new EventEmitter<void>();
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@ import {
|
||||
|
||||
import { CipherFormContainer } from "../../cipher-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: "vault-card-details-section",
|
||||
templateUrl: "./card-details-section.component.html",
|
||||
@@ -40,9 +42,13 @@ import { CipherFormContainer } from "../../cipher-form-container";
|
||||
})
|
||||
export class CardDetailsSectionComponent implements OnInit {
|
||||
/** The original cipher */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() originalCipherView: CipherView;
|
||||
|
||||
/** True when all fields should be disabled */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() disabled: boolean;
|
||||
|
||||
/**
|
||||
|
||||
@@ -49,6 +49,8 @@ import { LoginDetailsSectionComponent } from "./login-details-section/login-deta
|
||||
import { NewItemNudgeComponent } from "./new-item-nudge/new-item-nudge.component";
|
||||
import { SshKeySectionComponent } from "./sshkey-section/sshkey-section.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: "vault-cipher-form",
|
||||
templateUrl: "./cipher-form.component.html",
|
||||
@@ -79,6 +81,8 @@ import { SshKeySectionComponent } from "./sshkey-section/sshkey-section.componen
|
||||
],
|
||||
})
|
||||
export class CipherFormComponent implements AfterViewInit, OnInit, OnChanges, CipherFormContainer {
|
||||
// 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);
|
||||
@@ -87,38 +91,52 @@ export class CipherFormComponent implements AfterViewInit, OnInit, OnChanges, Ci
|
||||
/**
|
||||
* 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: CipherFormConfig;
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
/**
|
||||
* Optional function to call before submitting the form. If the function returns false, the form will not be submitted.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
beforeSubmit: () => Promise<boolean>;
|
||||
|
||||
/**
|
||||
* Event emitted when the cipher is saved successfully.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() cipherSaved = new EventEmitter<CipherView>();
|
||||
|
||||
private formReadySubject = new Subject<void>();
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() formReady = this.formReadySubject.asObservable();
|
||||
|
||||
/**
|
||||
* Emitted when the form is enabled
|
||||
*/
|
||||
private formStatusChangeSubject = new BehaviorSubject<"enabled" | "disabled" | null>(null);
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() formStatusChange$ = this.formStatusChangeSubject.asObservable();
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,19 +6,27 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
|
||||
import { GeneratorModule } from "@bitwarden/generator-components";
|
||||
import { CipherFormGeneratorComponent } 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: "tools-password-generator",
|
||||
template: `<ng-content></ng-content>`,
|
||||
})
|
||||
class MockPasswordGeneratorComponent {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onGenerated = new EventEmitter();
|
||||
}
|
||||
|
||||
// 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",
|
||||
template: `<ng-content></ng-content>`,
|
||||
})
|
||||
class MockUsernameGeneratorComponent {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onGenerated = new EventEmitter();
|
||||
}
|
||||
|
||||
|
||||
@@ -9,30 +9,42 @@ import { AlgorithmInfo, GeneratedCredential } from "@bitwarden/generator-core";
|
||||
* Renders a password or username generator UI and emits the most recently generated value.
|
||||
* Used by the cipher form to be shown in a dialog/modal when generating cipher passwords/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: "vault-cipher-form-generator",
|
||||
templateUrl: "./cipher-form-generator.component.html",
|
||||
imports: [CommonModule, GeneratorModule],
|
||||
})
|
||||
export class CipherFormGeneratorComponent {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
uri: string = "";
|
||||
|
||||
/**
|
||||
* The type of generator form to show.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true })
|
||||
type: "password" | "username" = "password";
|
||||
|
||||
/** Removes bottom margin of internal sections */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ transform: coerceBooleanProperty }) disableMargin = false;
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output()
|
||||
algorithmSelected = new EventEmitter<AlgorithmInfo>();
|
||||
|
||||
/**
|
||||
* Emits an event when a new value is generated.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output()
|
||||
valueGenerated = new EventEmitter<string>();
|
||||
|
||||
|
||||
@@ -28,6 +28,8 @@ export type AddEditCustomFieldDialogData = {
|
||||
disallowHiddenField?: boolean;
|
||||
};
|
||||
|
||||
// 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: "vault-add-edit-custom-field-dialog",
|
||||
templateUrl: "./add-edit-custom-field-dialog.component.html",
|
||||
|
||||
@@ -68,6 +68,8 @@ export type CustomField = {
|
||||
newField: boolean;
|
||||
};
|
||||
|
||||
// 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: "vault-custom-fields",
|
||||
templateUrl: "./custom-fields.component.html",
|
||||
@@ -88,10 +90,16 @@ export type CustomField = {
|
||||
],
|
||||
})
|
||||
export class CustomFieldsComponent implements OnInit, AfterViewInit {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() numberOfFieldsChange = new EventEmitter<number>();
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@ViewChildren("customFieldRow") customFieldRows: QueryList<ElementRef<HTMLDivElement>>;
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() disableSectionMargin: boolean;
|
||||
|
||||
customFieldsForm = this.formBuilder.group({
|
||||
|
||||
@@ -21,6 +21,8 @@ import {
|
||||
|
||||
import { CipherFormContainer } from "../../cipher-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: "vault-identity-section",
|
||||
templateUrl: "./identity.component.html",
|
||||
@@ -38,7 +40,11 @@ import { CipherFormContainer } from "../../cipher-form-container";
|
||||
],
|
||||
})
|
||||
export class IdentitySectionComponent implements OnInit {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() originalCipherView: CipherView;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() disabled: boolean;
|
||||
identityTitleOptions = [
|
||||
{ name: "-- " + this.i18nService.t("select") + " --", value: null },
|
||||
|
||||
@@ -37,6 +37,8 @@ import {
|
||||
} from "../../abstractions/cipher-form-config.service";
|
||||
import { CipherFormContainer } from "../../cipher-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: "vault-item-details-section",
|
||||
templateUrl: "./item-details-section.component.html",
|
||||
@@ -84,9 +86,13 @@ export class ItemDetailsSectionComponent implements OnInit {
|
||||
|
||||
protected favoriteButtonDisabled = false;
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true })
|
||||
config: CipherFormConfig;
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
originalCipherView: CipherView;
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@ import { AutofillOptionsComponent } from "../autofill-options/autofill-options.c
|
||||
|
||||
import { LoginDetailsSectionComponent } from "./login-details-section.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: "vault-autofill-options",
|
||||
template: "",
|
||||
|
||||
@@ -30,6 +30,8 @@ import { TotpCaptureService } from "../../abstractions/totp-capture.service";
|
||||
import { CipherFormContainer } from "../../cipher-form-container";
|
||||
import { AutofillOptionsComponent } from "../autofill-options/autofill-options.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: "vault-login-details-section",
|
||||
templateUrl: "./login-details-section.component.html",
|
||||
|
||||
@@ -11,13 +11,15 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
|
||||
import { UserId } from "@bitwarden/common/types/guid";
|
||||
import { CipherType } from "@bitwarden/sdk-internal";
|
||||
|
||||
// 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: "vault-new-item-nudge",
|
||||
templateUrl: "./new-item-nudge.component.html",
|
||||
imports: [SpotlightComponent, AsyncPipe],
|
||||
})
|
||||
export class NewItemNudgeComponent {
|
||||
configType = input.required<CipherType | null>();
|
||||
readonly configType = input.required<CipherType | null>();
|
||||
activeUserId$ = this.accountService.activeAccount$.pipe(getUserId);
|
||||
showNewItemSpotlight$ = combineLatest([
|
||||
this.activeUserId$,
|
||||
|
||||
@@ -25,6 +25,8 @@ import { generate_ssh_key } from "@bitwarden/sdk-internal";
|
||||
import { SshImportPromptService } from "../../../services/ssh-import-prompt.service";
|
||||
import { CipherFormContainer } from "../../cipher-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: "vault-sshkey-section",
|
||||
templateUrl: "./sshkey-section.component.html",
|
||||
@@ -42,9 +44,13 @@ import { CipherFormContainer } from "../../cipher-form-container";
|
||||
})
|
||||
export class SshKeySectionComponent implements OnInit {
|
||||
/** The original cipher */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() originalCipherView: CipherView;
|
||||
|
||||
/** True when all fields should be disabled */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() disabled: boolean;
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,6 +11,8 @@ import {
|
||||
FormFieldModule,
|
||||
} 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: "app-additional-options",
|
||||
templateUrl: "additional-options.component.html",
|
||||
@@ -26,5 +28,7 @@ import {
|
||||
],
|
||||
})
|
||||
export class AdditionalOptionsComponent {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() notes: string = "";
|
||||
}
|
||||
|
||||
@@ -22,6 +22,8 @@ import { KeyService } from "@bitwarden/key-management";
|
||||
|
||||
import { DownloadAttachmentComponent } from "../../components/download-attachment/download-attachment.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: "app-attachments-v2-view",
|
||||
templateUrl: "attachments-v2-view.component.html",
|
||||
@@ -36,11 +38,17 @@ import { DownloadAttachmentComponent } from "../../components/download-attachmen
|
||||
],
|
||||
})
|
||||
export class AttachmentsV2ViewComponent {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() cipher: CipherView;
|
||||
|
||||
// Required for fetching attachment data when viewed from cipher via emergency access
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() emergencyAccessId?: EmergencyAccessId;
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() admin: boolean = false;
|
||||
|
||||
canAccessPremium: boolean;
|
||||
|
||||
@@ -40,6 +40,8 @@ export interface AttachmentDialogCloseResult {
|
||||
/**
|
||||
* Component for the attachments dialog.
|
||||
*/
|
||||
// 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-vault-attachments-v2",
|
||||
templateUrl: "attachments-v2.component.html",
|
||||
|
||||
@@ -18,6 +18,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({
|
||||
selector: "app-autofill-options-view",
|
||||
templateUrl: "autofill-options-view.component.html",
|
||||
@@ -32,7 +34,11 @@ import {
|
||||
],
|
||||
})
|
||||
export class AutofillOptionsViewComponent {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() loginUris: LoginUriView[];
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() cipherId: string;
|
||||
|
||||
constructor(
|
||||
|
||||
@@ -17,6 +17,8 @@ import {
|
||||
|
||||
import { ReadOnlyCipherCardComponent } from "../read-only-cipher-card/read-only-cipher-card.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: "app-card-details-view",
|
||||
templateUrl: "card-details-view.component.html",
|
||||
@@ -31,6 +33,8 @@ import { ReadOnlyCipherCardComponent } from "../read-only-cipher-card/read-only-
|
||||
],
|
||||
})
|
||||
export class CardDetailsComponent implements OnChanges {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() cipher: CipherView;
|
||||
EventType = EventType;
|
||||
|
||||
|
||||
@@ -39,6 +39,8 @@ import { LoginCredentialsViewComponent } from "./login-credentials/login-credent
|
||||
import { SshKeyViewComponent } from "./sshkey-sections/sshkey-view.component";
|
||||
import { ViewIdentitySectionsComponent } from "./view-identity-sections/view-identity-sections.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: "app-cipher-view",
|
||||
templateUrl: "cipher-view.component.html",
|
||||
@@ -61,9 +63,13 @@ import { ViewIdentitySectionsComponent } from "./view-identity-sections/view-ide
|
||||
],
|
||||
})
|
||||
export class CipherViewComponent implements OnChanges, OnDestroy {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true }) cipher: CipherView | null = null;
|
||||
|
||||
// Required for fetching attachment data when viewed from cipher via emergency access
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() emergencyAccessId?: EmergencyAccessId;
|
||||
|
||||
activeUserId$ = getUserId(this.accountService.activeAccount$);
|
||||
@@ -72,9 +78,13 @@ export class CipherViewComponent implements OnChanges, OnDestroy {
|
||||
* Optional list of collections the cipher is assigned to. If none are provided, they will be fetched using the
|
||||
* `CipherService` and the `collectionIds` property of the cipher.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() collections?: CollectionView[];
|
||||
|
||||
/** Should be set to true when the component is used within the Admin Console */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() isAdminConsole?: boolean = false;
|
||||
|
||||
organization$: Observable<Organization | undefined> | undefined;
|
||||
|
||||
@@ -24,6 +24,8 @@ import {
|
||||
|
||||
import { VaultAutosizeReadOnlyTextArea } from "../../directives/readonly-textarea.directive";
|
||||
|
||||
// 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-custom-fields-v2",
|
||||
templateUrl: "custom-fields-v2.component.html",
|
||||
@@ -42,6 +44,8 @@ import { VaultAutosizeReadOnlyTextArea } from "../../directives/readonly-textare
|
||||
],
|
||||
})
|
||||
export class CustomFieldV2Component implements OnInit, OnChanges {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true }) cipher!: CipherView;
|
||||
fieldType = FieldType;
|
||||
fieldOptions: Map<number, LinkedMetadata> | undefined;
|
||||
|
||||
@@ -22,6 +22,8 @@ import {
|
||||
|
||||
import { OrgIconDirective } from "../../components/org-icon.directive";
|
||||
|
||||
// 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-item-details-v2",
|
||||
templateUrl: "item-details-v2.component.html",
|
||||
|
||||
@@ -16,6 +16,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({
|
||||
selector: "app-item-history-v2",
|
||||
templateUrl: "item-history-v2.component.html",
|
||||
@@ -31,6 +33,8 @@ import {
|
||||
],
|
||||
})
|
||||
export class ItemHistoryV2Component {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() cipher: CipherView;
|
||||
|
||||
constructor(private viewPasswordHistoryService: ViewPasswordHistoryService) {}
|
||||
|
||||
@@ -42,6 +42,8 @@ type TotpCodeValues = {
|
||||
totpCodeFormatted?: 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: "app-login-credentials-view",
|
||||
templateUrl: "login-credentials-view.component.html",
|
||||
@@ -61,10 +63,20 @@ type TotpCodeValues = {
|
||||
],
|
||||
})
|
||||
export class LoginCredentialsViewComponent implements OnChanges {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() cipher: CipherView;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() activeUserId: UserId;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() hadPendingChangePasswordTask: boolean;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() handleChangePassword = new EventEmitter<void>();
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@ViewChild("passwordInput")
|
||||
private passwordInput!: ElementRef<HTMLInputElement>;
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@ import { AfterViewInit, Component, ContentChildren, QueryList } from "@angular/c
|
||||
|
||||
import { CardComponent, BitFormFieldComponent } 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: "read-only-cipher-card",
|
||||
templateUrl: "./read-only-cipher-card.component.html",
|
||||
@@ -11,6 +13,8 @@ import { CardComponent, BitFormFieldComponent } from "@bitwarden/components";
|
||||
* A thin wrapper around the `bit-card` component that disables the bottom border for the last form field.
|
||||
*/
|
||||
export class ReadOnlyCipherCardComponent implements AfterViewInit {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@ContentChildren(BitFormFieldComponent) formFields?: QueryList<BitFormFieldComponent>;
|
||||
|
||||
ngAfterViewInit(): void {
|
||||
|
||||
@@ -14,6 +14,8 @@ import {
|
||||
|
||||
import { ReadOnlyCipherCardComponent } from "../read-only-cipher-card/read-only-cipher-card.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: "app-sshkey-view",
|
||||
templateUrl: "sshkey-view.component.html",
|
||||
@@ -28,6 +30,8 @@ import { ReadOnlyCipherCardComponent } from "../read-only-cipher-card/read-only-
|
||||
],
|
||||
})
|
||||
export class SshKeyViewComponent implements OnChanges {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() sshKey: SshKeyView;
|
||||
|
||||
revealSshKey = false;
|
||||
|
||||
@@ -12,6 +12,8 @@ import {
|
||||
|
||||
import { ReadOnlyCipherCardComponent } from "../read-only-cipher-card/read-only-cipher-card.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: "app-view-identity-sections",
|
||||
templateUrl: "./view-identity-sections.component.html",
|
||||
@@ -26,6 +28,8 @@ import { ReadOnlyCipherCardComponent } from "../read-only-cipher-card/read-only-
|
||||
],
|
||||
})
|
||||
export class ViewIdentitySectionsComponent {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true }) cipher: CipherView | null = null;
|
||||
|
||||
/** Returns all populated address fields */
|
||||
|
||||
@@ -47,6 +47,8 @@ export type AddEditFolderDialogData = {
|
||||
editFolderConfig?: { folder: FolderView };
|
||||
};
|
||||
|
||||
// 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: "vault-add-edit-folder-dialog",
|
||||
templateUrl: "./add-edit-folder-dialog.component.html",
|
||||
@@ -62,7 +64,11 @@ export type AddEditFolderDialogData = {
|
||||
],
|
||||
})
|
||||
export class AddEditFolderDialogComponent implements AfterViewInit, OnInit {
|
||||
// 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-signals
|
||||
@ViewChild("submitBtn") private submitBtn?: ButtonComponent;
|
||||
|
||||
folder: FolderView = new FolderView();
|
||||
|
||||
@@ -96,6 +96,8 @@ export type CollectionAssignmentResult = UnionOfValues<typeof CollectionAssignme
|
||||
|
||||
const MY_VAULT_ID = "MyVault";
|
||||
|
||||
// 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: "assign-collections",
|
||||
templateUrl: "assign-collections.component.html",
|
||||
@@ -112,19 +114,29 @@ const MY_VAULT_ID = "MyVault";
|
||||
],
|
||||
})
|
||||
export class AssignCollectionsComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||
// 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-signals
|
||||
@Input() params: CollectionAssignmentParams;
|
||||
|
||||
/**
|
||||
* Submit button instance 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;
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output()
|
||||
editableItemCountChange = new EventEmitter<number>();
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onCollectionAssign = new EventEmitter<CollectionAssignmentResult>();
|
||||
|
||||
formGroup = this.formBuilder.group({
|
||||
|
||||
@@ -13,6 +13,8 @@ import { CipherAuthorizationService } from "@bitwarden/common/vault/services/cip
|
||||
export class CanDeleteCipherDirective implements OnDestroy {
|
||||
private destroy$ = new Subject<void>();
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input("appCanDeleteCipher") set cipher(cipher: CipherView) {
|
||||
this.viewContainer.clear();
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ import { IconModule } from "@bitwarden/components";
|
||||
|
||||
import { VaultCarouselSlideComponent } from "../carousel-slide/carousel-slide.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: "vault-carousel-button",
|
||||
templateUrl: "carousel-button.component.html",
|
||||
@@ -14,15 +16,23 @@ import { VaultCarouselSlideComponent } from "../carousel-slide/carousel-slide.co
|
||||
})
|
||||
export class VaultCarouselButtonComponent implements FocusableOption {
|
||||
/** Slide component that is associated with the individual button */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true }) slide!: VaultCarouselSlideComponent;
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@ViewChild("btn", { static: true }) button!: ElementRef<HTMLButtonElement>;
|
||||
protected CarouselIcon = CarouselIcon;
|
||||
|
||||
/** When set to true the button is shown in an active state. */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true }) isActive!: boolean;
|
||||
|
||||
/** Emits when the button is clicked. */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() onClick = new EventEmitter<void>();
|
||||
|
||||
/** Focuses the underlying button element. */
|
||||
|
||||
@@ -5,6 +5,8 @@ import { By } from "@angular/platform-browser";
|
||||
|
||||
import { VaultCarouselContentComponent } from "./carousel-content.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: "app-test-template-ref",
|
||||
imports: [VaultCarouselContentComponent],
|
||||
@@ -17,6 +19,8 @@ import { VaultCarouselContentComponent } from "./carousel-content.component";
|
||||
})
|
||||
class TestTemplateRefComponent implements OnInit {
|
||||
// Test template content by creating a wrapping component and then pass a portal to the carousel content component.
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@ViewChild("template", { static: true }) template!: TemplateRef<any>;
|
||||
portal!: TemplatePortal;
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { TemplatePortal, CdkPortalOutlet } from "@angular/cdk/portal";
|
||||
import { Component, Input } from "@angular/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: "vault-carousel-content",
|
||||
templateUrl: "carousel-content.component.html",
|
||||
@@ -8,5 +10,7 @@ import { Component, Input } from "@angular/core";
|
||||
})
|
||||
export class VaultCarouselContentComponent {
|
||||
/** Content to be displayed for the carousel. */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true }) content!: TemplatePortal;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ import { By } from "@angular/platform-browser";
|
||||
|
||||
import { VaultCarouselSlideComponent } from "./carousel-slide.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: "app-test-carousel-slide",
|
||||
imports: [VaultCarouselSlideComponent],
|
||||
|
||||
@@ -11,6 +11,8 @@ import {
|
||||
ViewContainerRef,
|
||||
} from "@angular/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: "vault-carousel-slide",
|
||||
templateUrl: "./carousel-slide.component.html",
|
||||
@@ -18,7 +20,11 @@ import {
|
||||
})
|
||||
export class VaultCarouselSlideComponent implements OnInit {
|
||||
/** `aria-label` that is assigned to the carousel toggle. */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true }) label!: string;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ transform: booleanAttribute }) disablePadding = false;
|
||||
|
||||
/**
|
||||
@@ -29,8 +35,12 @@ export class VaultCarouselSlideComponent implements OnInit {
|
||||
*
|
||||
* @remarks See note 4 of https://www.w3.org/WAI/ARIA/apg/patterns/tabpanel/
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ transform: coerceBooleanProperty }) noFocusableChildren?: true;
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@ViewChild(TemplateRef, { static: true }) implicitContent!: TemplateRef<unknown>;
|
||||
|
||||
private _contentPortal: TemplatePortal | null = null;
|
||||
|
||||
@@ -7,6 +7,8 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
|
||||
import { VaultCarouselSlideComponent } from "./carousel-slide/carousel-slide.component";
|
||||
import { VaultCarouselComponent } from "./carousel.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: "app-test-carousel-slide",
|
||||
imports: [VaultCarouselComponent, VaultCarouselSlideComponent],
|
||||
|
||||
@@ -28,6 +28,8 @@ import { VaultCarouselButtonComponent } from "./carousel-button/carousel-button.
|
||||
import { VaultCarouselContentComponent } from "./carousel-content/carousel-content.component";
|
||||
import { VaultCarouselSlideComponent } from "./carousel-slide/carousel-slide.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: "vault-carousel",
|
||||
templateUrl: "./carousel.component.html",
|
||||
@@ -50,30 +52,46 @@ export class VaultCarouselComponent implements AfterViewInit {
|
||||
* @remarks
|
||||
* The label should not include the word "carousel", `aria-roledescription="carousel"` is already included.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true }) label = "";
|
||||
|
||||
/**
|
||||
* Emits the index of the newly selected slide.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() slideChange = new EventEmitter<number>();
|
||||
|
||||
/** All slides within the carousel. */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@ContentChildren(VaultCarouselSlideComponent) slides!: QueryList<VaultCarouselSlideComponent>;
|
||||
|
||||
/** All buttons that control the carousel */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@ViewChildren(VaultCarouselButtonComponent)
|
||||
carouselButtons!: QueryList<VaultCarouselButtonComponent>;
|
||||
|
||||
/** Wrapping container for the carousel content and buttons */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@ViewChild("container") carouselContainer!: ElementRef<HTMLElement>;
|
||||
|
||||
/** Container for the carousel buttons */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@ViewChild("carouselButtonWrapper") carouselButtonWrapper!: ElementRef<HTMLDivElement>;
|
||||
|
||||
/** Temporary container containing `tempSlideOutlet` */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@ViewChild("tempSlideContainer") tempSlideContainer!: ElementRef<HTMLDivElement>;
|
||||
|
||||
/** Outlet to temporary render each slide within */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@ViewChild(CdkPortalOutlet) tempSlideOutlet!: CdkPortalOutlet;
|
||||
|
||||
/** The currently selected index of the carousel. */
|
||||
|
||||
@@ -30,13 +30,18 @@ import { CopyAction, CopyCipherFieldService } from "@bitwarden/vault";
|
||||
selector: "[appCopyField]",
|
||||
})
|
||||
export class CopyCipherFieldDirective implements OnChanges {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({
|
||||
alias: "appCopyField",
|
||||
required: true,
|
||||
})
|
||||
action!: Exclude<CopyAction, "hiddenField">;
|
||||
|
||||
@Input({ required: true }) cipher!: CipherViewLike;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true })
|
||||
cipher!: CipherViewLike;
|
||||
|
||||
constructor(
|
||||
private copyCipherFieldService: CopyCipherFieldService,
|
||||
|
||||
@@ -40,7 +40,7 @@ export class DarkImageSourceDirective implements OnInit {
|
||||
/**
|
||||
* The image source to use when the dark theme is applied.
|
||||
*/
|
||||
darkImgSrc = input.required<string>({ alias: "appDarkImgSrc" });
|
||||
readonly darkImgSrc = input.required<string>({ alias: "appDarkImgSrc" });
|
||||
|
||||
@HostBinding("attr.src") src: string | undefined;
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@ export type DecryptionFailureDialogParams = {
|
||||
cipherIds: CipherId[];
|
||||
};
|
||||
|
||||
// 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: "vault-decryption-failure-dialog",
|
||||
templateUrl: "./decryption-failure-dialog.component.html",
|
||||
|
||||
@@ -17,6 +17,8 @@ import { AttachmentView } from "@bitwarden/common/vault/models/view/attachment.v
|
||||
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||
import { AsyncActionsModule, IconButtonModule, ToastService } 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: "app-download-attachment",
|
||||
templateUrl: "./download-attachment.component.html",
|
||||
@@ -24,18 +26,28 @@ import { AsyncActionsModule, IconButtonModule, ToastService } from "@bitwarden/c
|
||||
})
|
||||
export class DownloadAttachmentComponent {
|
||||
/** Attachment to download */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true }) attachment: AttachmentView;
|
||||
|
||||
/** The cipher associated with the attachment */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true }) cipher: CipherView;
|
||||
|
||||
// When in view mode, we will want to check for the master password reprompt
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() checkPwReprompt?: boolean = false;
|
||||
|
||||
// Required for fetching attachment data when viewed from cipher via emergency access
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() emergencyAccessId?: EmergencyAccessId;
|
||||
|
||||
/** When owners/admins can mange all items and when accessing from the admin console, use the admin endpoint */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() admin?: boolean = false;
|
||||
|
||||
constructor(
|
||||
|
||||
@@ -9,15 +9,25 @@ import { CIPHER_MENU_ITEMS } from "@bitwarden/common/vault/types/cipher-menu-ite
|
||||
import { ButtonModule, MenuModule } 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: "vault-new-cipher-menu",
|
||||
templateUrl: "new-cipher-menu.component.html",
|
||||
imports: [ButtonModule, CommonModule, MenuModule, I18nPipe, JslibModule],
|
||||
})
|
||||
export class NewCipherMenuComponent {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
canCreateCipher = input(false);
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
canCreateFolder = input(false);
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
canCreateCollection = input(false);
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
canCreateSshKey = input(false);
|
||||
folderAdded = output();
|
||||
collectionAdded = output();
|
||||
|
||||
@@ -8,7 +8,11 @@ export type OrgIconSize = "default" | "small" | "large";
|
||||
selector: "[appOrgIcon]",
|
||||
})
|
||||
export class OrgIconDirective {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true }) tierType!: ProductTierType;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input() size?: OrgIconSize = "default";
|
||||
|
||||
constructor(
|
||||
|
||||
@@ -8,6 +8,8 @@ import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||
import { PasswordHistoryView } from "@bitwarden/common/vault/models/view/password-history.view";
|
||||
import { ItemModule, ColorPasswordModule, 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({
|
||||
selector: "vault-password-history-view",
|
||||
templateUrl: "./password-history-view.component.html",
|
||||
@@ -17,6 +19,8 @@ export class PasswordHistoryViewComponent implements OnInit {
|
||||
/**
|
||||
* Optional cipher view. When included `cipherId` is ignored.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true }) cipher: CipherView;
|
||||
|
||||
/** The password history for the cipher. */
|
||||
|
||||
@@ -26,6 +26,8 @@ export interface ViewPasswordHistoryDialogParams {
|
||||
/**
|
||||
* A dialog component that displays the password history for a cipher.
|
||||
*/
|
||||
// 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-vault-password-history",
|
||||
templateUrl: "password-history.component.html",
|
||||
|
||||
@@ -22,6 +22,8 @@ import { KeyService } from "@bitwarden/key-management";
|
||||
* Used to verify the user's Master Password for the "Master Password Re-prompt" feature only.
|
||||
* See UserVerificationComponent for any other situation where you need to verify the user's identity.
|
||||
*/
|
||||
// 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: "vault-password-reprompt",
|
||||
imports: [
|
||||
|
||||
@@ -4,6 +4,8 @@ import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||
import { LinkModule, PopoverModule } 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: "vault-permit-cipher-details-popover",
|
||||
templateUrl: "./permit-cipher-details-popover.component.html",
|
||||
|
||||
@@ -15,13 +15,19 @@ import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||
import { TotpInfo } from "@bitwarden/common/vault/services/totp.service";
|
||||
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({
|
||||
selector: "[bitTotpCountdown]",
|
||||
templateUrl: "totp-countdown.component.html",
|
||||
imports: [CommonModule, TypographyModule],
|
||||
})
|
||||
export class BitTotpCountdownComponent implements OnInit, OnChanges {
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ required: true }) cipher!: CipherView;
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() sendCopyCode = new EventEmitter();
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user