mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
[deps] Autofill: Update prettier to v3 (#7014)
* [deps] Autofill: Update prettier to v3 * prettier formatting updates --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jonathan Prusik <jprusik@classynemesis.com>
This commit is contained in:
@@ -31,7 +31,10 @@ export class FilePasswordPromptComponent {
|
||||
filePassword: ["", Validators.required],
|
||||
});
|
||||
|
||||
constructor(public dialogRef: DialogRef, protected formBuilder: FormBuilder) {}
|
||||
constructor(
|
||||
public dialogRef: DialogRef,
|
||||
protected formBuilder: FormBuilder,
|
||||
) {}
|
||||
|
||||
submit = () => {
|
||||
this.formGroup.markAsTouched();
|
||||
|
||||
@@ -18,7 +18,10 @@ export interface ErrorListItem {
|
||||
export class ImportErrorDialogComponent implements OnInit {
|
||||
protected dataSource = new TableDataSource<ErrorListItem>();
|
||||
|
||||
constructor(public dialogRef: DialogRef, @Inject(DIALOG_DATA) public data: Error) {}
|
||||
constructor(
|
||||
public dialogRef: DialogRef,
|
||||
@Inject(DIALOG_DATA) public data: Error,
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
const split = this.data.message.split("\n\n");
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
</span>
|
||||
|
||||
<div bitDialogContent>
|
||||
<span>{{ "importSuccessNumberOfItems" | i18n : this.data.ciphers.length }}</span>
|
||||
<span>{{ "importSuccessNumberOfItems" | i18n: this.data.ciphers.length }}</span>
|
||||
<bit-table [dataSource]="dataSource">
|
||||
<ng-container header>
|
||||
<tr>
|
||||
|
||||
@@ -22,7 +22,10 @@ export interface ResultList {
|
||||
export class ImportSuccessDialogComponent implements OnInit {
|
||||
protected dataSource = new TableDataSource<ResultList>();
|
||||
|
||||
constructor(public dialogRef: DialogRef, @Inject(DIALOG_DATA) public data: ImportResult) {}
|
||||
constructor(
|
||||
public dialogRef: DialogRef,
|
||||
@Inject(DIALOG_DATA) public data: ImportResult,
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
if (this.data != null) {
|
||||
|
||||
@@ -54,8 +54,7 @@
|
||||
</bit-select>
|
||||
<bit-hint>{{
|
||||
"importTargetHint"
|
||||
| i18n
|
||||
: (organizationId ? ("collection" | i18n | lowercase) : ("folder" | i18n | lowercase))
|
||||
| i18n: (organizationId ? ("collection" | i18n | lowercase) : ("folder" | i18n | lowercase))
|
||||
}}</bit-hint>
|
||||
</bit-form-field>
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ export class ImportComponent implements OnInit, OnDestroy {
|
||||
protected folderService: FolderService,
|
||||
protected collectionService: CollectionService,
|
||||
protected organizationService: OrganizationService,
|
||||
protected formBuilder: FormBuilder
|
||||
protected formBuilder: FormBuilder,
|
||||
) {}
|
||||
|
||||
protected get importBlockedByPolicy(): boolean {
|
||||
@@ -202,8 +202,8 @@ export class ImportComponent implements OnInit, OnDestroy {
|
||||
this.organizations$ = concat(
|
||||
this.organizationService.memberOrganizations$.pipe(
|
||||
canAccessImportExport(this.i18nService),
|
||||
map((orgs) => orgs.sort(Utils.getSortFunction(this.i18nService, "name")))
|
||||
)
|
||||
map((orgs) => orgs.sort(Utils.getSortFunction(this.i18nService, "name"))),
|
||||
),
|
||||
);
|
||||
|
||||
combineLatest([
|
||||
@@ -225,12 +225,12 @@ export class ImportComponent implements OnInit, OnDestroy {
|
||||
this.collections$ = Utils.asyncToObservable(() =>
|
||||
this.collectionService
|
||||
.getAllDecrypted()
|
||||
.then((c) => c.filter((c2) => c2.organizationId === this.organizationId))
|
||||
.then((c) => c.filter((c2) => c2.organizationId === this.organizationId)),
|
||||
);
|
||||
} else {
|
||||
// Filter out the `no folder`-item from folderViews$
|
||||
this.folders$ = this.folderService.folderViews$.pipe(
|
||||
map((folders) => folders.filter((f) => f.id != null))
|
||||
map((folders) => folders.filter((f) => f.id != null)),
|
||||
);
|
||||
this.formGroup.controls.targetSelector.disable();
|
||||
|
||||
@@ -245,7 +245,7 @@ export class ImportComponent implements OnInit, OnDestroy {
|
||||
this.collections$ = Utils.asyncToObservable(() =>
|
||||
this.collectionService
|
||||
.getAllDecrypted()
|
||||
.then((c) => c.filter((c2) => c2.organizationId === value))
|
||||
.then((c) => c.filter((c2) => c2.organizationId === value)),
|
||||
);
|
||||
}
|
||||
});
|
||||
@@ -273,7 +273,7 @@ export class ImportComponent implements OnInit, OnDestroy {
|
||||
private async asyncValidatorsFinished() {
|
||||
if (this.formGroup.pending) {
|
||||
await firstValueFrom(
|
||||
this.formGroup.statusChanges.pipe(filter((status) => status !== "PENDING"))
|
||||
this.formGroup.statusChanges.pipe(filter((status) => status !== "PENDING")),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -295,7 +295,7 @@ export class ImportComponent implements OnInit, OnDestroy {
|
||||
this.platformUtilsService.showToast(
|
||||
"error",
|
||||
null,
|
||||
this.i18nService.t("personalOwnershipPolicyInEffectImports")
|
||||
this.i18nService.t("personalOwnershipPolicyInEffectImports"),
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -307,14 +307,14 @@ export class ImportComponent implements OnInit, OnDestroy {
|
||||
const importer = this.importService.getImporter(
|
||||
this.format,
|
||||
promptForPassword_callback,
|
||||
this.organizationId
|
||||
this.organizationId,
|
||||
);
|
||||
|
||||
if (importer === null) {
|
||||
this.platformUtilsService.showToast(
|
||||
"error",
|
||||
this.i18nService.t("errorOccurred"),
|
||||
this.i18nService.t("selectFormat")
|
||||
this.i18nService.t("selectFormat"),
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -326,7 +326,7 @@ export class ImportComponent implements OnInit, OnDestroy {
|
||||
this.platformUtilsService.showToast(
|
||||
"error",
|
||||
this.i18nService.t("errorOccurred"),
|
||||
this.i18nService.t("selectFile")
|
||||
this.i18nService.t("selectFile"),
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -346,7 +346,7 @@ export class ImportComponent implements OnInit, OnDestroy {
|
||||
this.platformUtilsService.showToast(
|
||||
"error",
|
||||
this.i18nService.t("errorOccurred"),
|
||||
this.i18nService.t("selectFile")
|
||||
this.i18nService.t("selectFile"),
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -361,7 +361,7 @@ export class ImportComponent implements OnInit, OnDestroy {
|
||||
fileContents,
|
||||
this.organizationId,
|
||||
this.formGroup.controls.targetSelector.value,
|
||||
this.canAccessImportExport(this.organizationId)
|
||||
this.canAccessImportExport(this.organizationId),
|
||||
);
|
||||
|
||||
//No errors, display success message
|
||||
@@ -486,7 +486,7 @@ export class ImportComponent implements OnInit, OnDestroy {
|
||||
},
|
||||
function error(e) {
|
||||
return "";
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ export class LastPassMultifactorPromptComponent {
|
||||
|
||||
constructor(
|
||||
public dialogRef: DialogRef,
|
||||
@Inject(DIALOG_DATA) protected data: LastPassMultifactorPromptData
|
||||
@Inject(DIALOG_DATA) protected data: LastPassMultifactorPromptData,
|
||||
) {}
|
||||
|
||||
submit = () => {
|
||||
|
||||
@@ -56,7 +56,7 @@ export class ImportLastPassComponent implements OnInit, OnDestroy {
|
||||
if (status === "PENDING") {
|
||||
return this.i18nService.t("importingYourAccount");
|
||||
}
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
@Output() csvDataLoaded = new EventEmitter<string>();
|
||||
@@ -66,7 +66,7 @@ export class ImportLastPassComponent implements OnInit, OnDestroy {
|
||||
private controlContainer: ControlContainer,
|
||||
private logService: LogService,
|
||||
private lastPassDirectImportService: LastPassDirectImportService,
|
||||
private i18nService: I18nService
|
||||
private i18nService: I18nService,
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
@@ -88,7 +88,7 @@ export class ImportLastPassComponent implements OnInit, OnDestroy {
|
||||
try {
|
||||
const csvData = await this.lastPassDirectImportService.handleImport(
|
||||
this.formGroup.controls.email.value,
|
||||
this.formGroup.controls.includeSharedFolders.value
|
||||
this.formGroup.controls.includeSharedFolders.value,
|
||||
);
|
||||
this.csvDataLoaded.emit(csvData);
|
||||
return null;
|
||||
|
||||
@@ -41,7 +41,7 @@ export class LastPassDirectImportService {
|
||||
private passwordGenerationService: PasswordGenerationServiceAbstraction,
|
||||
private broadcasterService: BroadcasterService,
|
||||
private ngZone: NgZone,
|
||||
private dialogService: DialogService
|
||||
private dialogService: DialogService,
|
||||
) {
|
||||
this.vault = new Vault(this.cryptoFunctionService, this.tokenService);
|
||||
|
||||
@@ -73,7 +73,7 @@ export class LastPassDirectImportService {
|
||||
const csvData = await this.handleFederatedImport(
|
||||
oidc.oidcCode,
|
||||
oidc.oidcState,
|
||||
includeSharedFolders
|
||||
includeSharedFolders,
|
||||
);
|
||||
return csvData;
|
||||
}
|
||||
@@ -155,7 +155,7 @@ export class LastPassDirectImportService {
|
||||
private async handleStandardImport(
|
||||
email: string,
|
||||
password: string,
|
||||
includeSharedFolders: boolean
|
||||
includeSharedFolders: boolean,
|
||||
): Promise<string> {
|
||||
const clientInfo = await this.createClientInfo(email);
|
||||
await this.vault.open(email, password, clientInfo, this.lastPassDirectImportUIService, {
|
||||
@@ -168,10 +168,10 @@ export class LastPassDirectImportService {
|
||||
private async handleFederatedImport(
|
||||
oidcCode: string,
|
||||
oidcState: string,
|
||||
includeSharedFolders: boolean
|
||||
includeSharedFolders: boolean,
|
||||
): Promise<string> {
|
||||
const response = await this.oidcClient.processSigninResponse(
|
||||
this.getOidcRedirectUrlWithParams(oidcCode, oidcState)
|
||||
this.getOidcRedirectUrlWithParams(oidcCode, oidcState),
|
||||
);
|
||||
const userState = response.userState as any;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user