1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-23 19:53:43 +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:
renovate[bot]
2023-11-29 16:15:20 -05:00
committed by GitHub
parent 4ff5f38e89
commit 28de9439be
1145 changed files with 5898 additions and 5612 deletions

View File

@@ -72,7 +72,7 @@ export enum CollectionDialogAction {
export class CollectionDialogComponent implements OnInit, OnDestroy {
protected flexibleCollectionsEnabled$ = this.configService.getFeatureFlag$(
FeatureFlag.FlexibleCollections,
false
false,
);
private destroy$ = new Subject<void>();
@@ -107,7 +107,7 @@ export class CollectionDialogComponent implements OnInit, OnDestroy {
private organizationUserService: OrganizationUserService,
private dialogService: DialogService,
private changeDetectorRef: ChangeDetectorRef,
private configService: ConfigServiceAbstraction
private configService: ConfigServiceAbstraction,
) {
this.tabIndex = params.initialTab ?? CollectionDialogTabType.Info;
}
@@ -123,8 +123,8 @@ export class CollectionDialogComponent implements OnInit, OnDestroy {
map((orgs) =>
orgs
.filter((o) => o.canCreateNewCollections && !o.isProviderUser)
.sort(Utils.getSortFunction(this.i18nService, "name"))
)
.sort(Utils.getSortFunction(this.i18nService, "name")),
),
);
// patchValue will trigger a call to loadOrg() in this case, so no need to call it again here
this.formGroup.patchValue({ selectedOrg: this.params.organizationId });
@@ -141,7 +141,7 @@ export class CollectionDialogComponent implements OnInit, OnDestroy {
async loadOrg(orgId: string, collectionIds: string[]) {
const organization$ = of(this.organizationService.get(orgId)).pipe(
shareReplay({ refCount: true, bufferSize: 1 })
shareReplay({ refCount: true, bufferSize: 1 }),
);
const groups$ = organization$.pipe(
switchMap((organization) => {
@@ -150,7 +150,7 @@ export class CollectionDialogComponent implements OnInit, OnDestroy {
}
return this.groupService.getAll(orgId);
})
}),
);
combineLatest({
organization: organization$,
@@ -168,7 +168,7 @@ export class CollectionDialogComponent implements OnInit, OnDestroy {
this.organization = organization;
this.accessItems = [].concat(
groups.map(mapGroupToAccessItemView),
users.data.map(mapUserToAccessItemView)
users.data.map(mapUserToAccessItemView),
);
// Force change detection to update the access selector's items
@@ -201,9 +201,8 @@ export class CollectionDialogComponent implements OnInit, OnDestroy {
} else {
this.nestOptions = collections;
const parent = collections.find((c) => c.id === this.params.parentCollectionId);
const currentOrgUserId = users.data.find(
(u) => u.userId === this.organization?.userId
)?.id;
const currentOrgUserId = users.data.find((u) => u.userId === this.organization?.userId)
?.id;
const initialSelection: AccessItemValue[] =
currentOrgUserId !== undefined
? [
@@ -224,7 +223,7 @@ export class CollectionDialogComponent implements OnInit, OnDestroy {
}
this.loading = false;
}
},
);
}
@@ -250,13 +249,13 @@ export class CollectionDialogComponent implements OnInit, OnDestroy {
this.platformUtilsService.showToast(
"error",
null,
this.i18nService.t("fieldOnTabRequiresAttention", this.i18nService.t("collectionInfo"))
this.i18nService.t("fieldOnTabRequiresAttention", this.i18nService.t("collectionInfo")),
);
} else if (this.tabIndex === CollectionDialogTabType.Info && accessTabError) {
this.platformUtilsService.showToast(
"error",
null,
this.i18nService.t("fieldOnTabRequiresAttention", this.i18nService.t("access"))
this.i18nService.t("fieldOnTabRequiresAttention", this.i18nService.t("access")),
);
}
return;
@@ -287,8 +286,8 @@ export class CollectionDialogComponent implements OnInit, OnDestroy {
null,
this.i18nService.t(
this.editMode ? "editedCollectionId" : "createdCollectionId",
collectionView.name
)
collectionView.name,
),
);
this.close(CollectionDialogAction.Saved, savedCollection);
@@ -310,7 +309,7 @@ export class CollectionDialogComponent implements OnInit, OnDestroy {
this.platformUtilsService.showToast(
"success",
null,
this.i18nService.t("deletedCollectionId", this.collection?.name)
this.i18nService.t("deletedCollectionId", this.collection?.name),
);
this.close(CollectionDialogAction.Deleted, this.collection);
@@ -348,7 +347,7 @@ function mapToAccessSelections(collectionDetails: CollectionAdminView): AccessIt
id: selection.id,
type: AccessItemType.Member,
permission: convertToPermission(selection),
}))
})),
);
}
@@ -369,10 +368,10 @@ function validateCanManagePermission(control: AbstractControl) {
*/
export function openCollectionDialog(
dialogService: DialogService,
config: DialogConfig<CollectionDialogParams>
config: DialogConfig<CollectionDialogParams>,
) {
return dialogService.open<CollectionDialogResult, CollectionDialogParams>(
CollectionDialogComponent,
config
config,
);
}

View File

@@ -20,7 +20,7 @@
[routerLink]="[]"
[queryParams]="{ itemId: cipher.id }"
queryParamsHandling="merge"
title="{{ 'editItemWithName' | i18n : cipher.name }}"
title="{{ 'editItemWithName' | i18n: cipher.name }}"
type="button"
appStopProp
>
@@ -52,7 +52,7 @@
<app-org-badge
[disabled]="disabled"
[organizationId]="cipher.organizationId"
[organizationName]="cipher.organizationId | orgNameFromId : organizations"
[organizationName]="cipher.organizationId | orgNameFromId: organizations"
appStopProp
>
</app-org-badge>

View File

@@ -34,7 +34,10 @@ export class VaultCipherRowComponent {
protected CipherType = CipherType;
constructor(private router: Router, private activatedRoute: ActivatedRoute) {}
constructor(
private router: Router,
private activatedRoute: ActivatedRoute,
) {}
@HostBinding("class")
get classes() {

View File

@@ -21,7 +21,7 @@
type="button"
class="tw-w-full tw-truncate tw-text-start tw-leading-snug"
linkType="secondary"
title="{{ 'viewCollectionWithName' | i18n : collection.name }}"
title="{{ 'viewCollectionWithName' | i18n: collection.name }}"
[routerLink]="[]"
[queryParams]="{ collectionId: collection.id }"
queryParamsHandling="merge"
@@ -34,7 +34,7 @@
<app-org-badge
[disabled]="disabled"
[organizationId]="collection.organizationId"
[organizationName]="collection.organizationId | orgNameFromId : organizations"
[organizationName]="collection.organizationId | orgNameFromId: organizations"
appStopProp
>
</app-org-badge>

View File

@@ -32,7 +32,10 @@ export class VaultCollectionRowComponent {
@Input() checked: boolean;
@Output() checkedToggled = new EventEmitter<void>();
constructor(private router: Router, private activatedRoute: ActivatedRoute) {}
constructor(
private router: Router,
private activatedRoute: ActivatedRoute,
) {}
@HostBinding("class")
get classes() {

View File

@@ -75,7 +75,7 @@ export class VaultItemsComponent {
async ngOnInit() {
this.flexibleCollectionsEnabled = await this.configService.getFeatureFlag(
FeatureFlag.FlexibleCollections
FeatureFlag.FlexibleCollections,
);
}
@@ -179,7 +179,7 @@ export class VaultItemsComponent {
this.editableItems = items.filter(
(item) =>
item.cipher !== undefined ||
(item.collection !== undefined && this.canDeleteCollection(item.collection))
(item.collection !== undefined && this.canDeleteCollection(item.collection)),
);
this.dataSource.data = items;
}