1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-22 11:13:46 +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

@@ -32,7 +32,7 @@ export abstract class BaseEventsComponent {
protected exportService: EventExportService,
protected platformUtilsService: PlatformUtilsService,
protected logService: LogService,
protected fileDownloadService: FileDownloadService
protected fileDownloadService: FileDownloadService,
) {
const defaultDates = this.eventService.getDefaultDateFilters();
this.start = defaultDates[0];
@@ -79,7 +79,7 @@ export abstract class BaseEventsComponent {
const promise = this.loadAndParseEvents(
dates[0],
dates[1],
clearExisting ? null : this.continuationToken
clearExisting ? null : this.continuationToken,
);
if (clearExisting) {
this.refreshPromise = promise;
@@ -108,14 +108,14 @@ export abstract class BaseEventsComponent {
protected abstract requestEvents(
startDate: string,
endDate: string,
continuationToken: string
continuationToken: string,
): Promise<ListResponse<EventResponse>>;
protected abstract getUserName(r: EventResponse, userId: string): { name: string; email: string };
protected async loadAndParseEvents(
startDate: string,
endDate: string,
continuationToken: string
continuationToken: string,
) {
const response = await this.requestEvents(startDate, endDate, continuationToken);
@@ -141,7 +141,7 @@ export abstract class BaseEventsComponent {
systemUser: r.systemUser,
serviceAccountId: r.serviceAccountId,
});
})
}),
);
return { continuationToken: response.continuationToken, events: events };
}
@@ -154,7 +154,7 @@ export abstract class BaseEventsComponent {
this.platformUtilsService.showToast(
"error",
this.i18nService.t("errorOccurred"),
this.i18nService.t("invalidDateRange")
this.i18nService.t("invalidDateRange"),
);
return null;
}

View File

@@ -31,7 +31,7 @@ const MaxCheckedCount = 500;
@Directive()
export abstract class BasePeopleComponent<
UserType extends ProviderUserUserDetailsResponse | OrganizationUserView
UserType extends ProviderUserUserDetailsResponse | OrganizationUserView,
> {
@ViewChild("confirmTemplate", { read: ViewContainerRef, static: true })
confirmModalRef: ViewContainerRef;
@@ -110,7 +110,7 @@ export abstract class BasePeopleComponent<
private searchPipe: SearchPipe,
protected userNamePipe: UserNamePipe,
protected stateService: StateService,
protected dialogService: DialogService
protected dialogService: DialogService,
) {}
abstract edit(user: UserType): void;
@@ -138,8 +138,8 @@ export abstract class BasePeopleComponent<
this.allUsers.sort(
Utils.getSortFunction<ProviderUserUserDetailsResponse | OrganizationUserView>(
this.i18nService,
"email"
)
"email",
),
);
this.allUsers.forEach((u) => {
if (!this.statusMap.has(u.status)) {
@@ -178,7 +178,7 @@ export abstract class BasePeopleComponent<
}
if (this.users.length > pagedLength) {
this.pagedUsers = this.pagedUsers.concat(
this.users.slice(pagedLength, pagedLength + pagedSize)
this.users.slice(pagedLength, pagedLength + pagedSize),
);
}
this.pagedUsersCount = this.pagedUsers.length;
@@ -199,7 +199,7 @@ export abstract class BasePeopleComponent<
this.searchText,
"name",
"email",
"id"
"id",
);
const selectCount =
@@ -238,7 +238,7 @@ export abstract class BasePeopleComponent<
this.platformUtilsService.showToast(
"success",
null,
this.i18nService.t("removedUserId", this.userNamePipe.transform(user))
this.i18nService.t("removedUserId", this.userNamePipe.transform(user)),
);
this.removeUser(user);
} catch (e) {
@@ -269,7 +269,7 @@ export abstract class BasePeopleComponent<
this.platformUtilsService.showToast(
"success",
null,
this.i18nService.t("revokedUserId", this.userNamePipe.transform(user))
this.i18nService.t("revokedUserId", this.userNamePipe.transform(user)),
);
await this.load();
} catch (e) {
@@ -285,7 +285,7 @@ export abstract class BasePeopleComponent<
this.platformUtilsService.showToast(
"success",
null,
this.i18nService.t("restoredUserId", this.userNamePipe.transform(user))
this.i18nService.t("restoredUserId", this.userNamePipe.transform(user)),
);
await this.load();
} catch (e) {
@@ -305,7 +305,7 @@ export abstract class BasePeopleComponent<
this.platformUtilsService.showToast(
"success",
null,
this.i18nService.t("hasBeenReinvited", this.userNamePipe.transform(user))
this.i18nService.t("hasBeenReinvited", this.userNamePipe.transform(user)),
);
} catch (e) {
this.validationService.showError(e);
@@ -331,7 +331,7 @@ export abstract class BasePeopleComponent<
this.platformUtilsService.showToast(
"success",
null,
this.i18nService.t("hasBeenConfirmed", this.userNamePipe.transform(user))
this.i18nService.t("hasBeenConfirmed", this.userNamePipe.transform(user)),
);
} catch (e) {
this.validationService.showError(e);
@@ -368,7 +368,7 @@ export abstract class BasePeopleComponent<
this.logService.error(e);
}
});
}
},
);
return;
}

View File

@@ -33,7 +33,7 @@
>
<div class="tw-px-5 tw-py-2">
<i class="bwi bwi-exclamation-triangle" aria-hidden="true"></i>
{{ "accessingUsingProvider" | i18n : activeOrganization.providerName }}
{{ "accessingUsingProvider" | i18n: activeOrganization.providerName }}
</div>
</div>
</div>

View File

@@ -14,7 +14,10 @@ import { Utils } from "@bitwarden/common/platform/misc/utils";
templateUrl: "organization-switcher.component.html",
})
export class OrganizationSwitcherComponent implements OnInit {
constructor(private organizationService: OrganizationService, private i18nService: I18nService) {}
constructor(
private organizationService: OrganizationService,
private i18nService: I18nService,
) {}
@Input() activeOrganization: Organization = null;
organizations$: Observable<Organization[]>;
@@ -24,7 +27,7 @@ export class OrganizationSwitcherComponent implements OnInit {
async ngOnInit() {
this.organizations$ = this.organizationService.memberOrganizations$.pipe(
canAccessAdmin(this.i18nService),
map((orgs) => orgs.sort(Utils.getSortFunction(this.i18nService, "name")))
map((orgs) => orgs.sort(Utils.getSortFunction(this.i18nService, "name"))),
);
this.loaded = true;

View File

@@ -23,7 +23,7 @@ export class GroupService {
"/organizations/" + orgId + "/groups/" + groupId + "/details",
null,
true,
true
true,
);
return GroupView.fromResponse(new GroupDetailsResponse(r));
@@ -35,7 +35,7 @@ export class GroupService {
"/organizations/" + orgId + "/groups",
null,
true,
true
true,
);
const listResponse = new ListResponse(r, GroupDetailsResponse);
@@ -56,7 +56,7 @@ export class InternalGroupService extends GroupService {
"/organizations/" + orgId + "/groups/" + groupId,
null,
true,
false
false,
);
}
@@ -66,7 +66,7 @@ export class InternalGroupService extends GroupService {
"/organizations/" + orgId + "/groups",
new OrganizationGroupBulkRequest(groupIds),
true,
true
true,
);
}
@@ -76,7 +76,7 @@ export class InternalGroupService extends GroupService {
request.accessAll = group.accessAll;
request.users = group.members;
request.collections = group.collections.map(
(c) => new SelectionReadOnlyRequest(c.id, c.readOnly, c.hidePasswords, c.manage)
(c) => new SelectionReadOnlyRequest(c.id, c.readOnly, c.hidePasswords, c.manage),
);
if (group.id == undefined) {
@@ -92,7 +92,7 @@ export class InternalGroupService extends GroupService {
"/organizations/" + organizationId + "/groups",
request,
true,
true
true,
);
return GroupView.fromResponse(new GroupResponse(r));
}
@@ -100,14 +100,14 @@ export class InternalGroupService extends GroupService {
private async putGroup(
organizationId: string,
id: string,
request: GroupRequest
request: GroupRequest,
): Promise<GroupView> {
const r = await this.apiService.send(
"PUT",
"/organizations/" + organizationId + "/groups/" + id,
request,
true,
true
true,
);
return GroupView.fromResponse(new GroupResponse(r));
}

View File

@@ -16,14 +16,14 @@ export class UserAdminService {
async get(
organizationId: string,
organizationUserId: string
organizationUserId: string,
): Promise<OrganizationUserAdminView | undefined> {
const userResponse = await this.organizationUserService.getOrganizationUser(
organizationId,
organizationUserId,
{
includeGroups: true,
}
},
);
if (userResponse == null) {
@@ -62,7 +62,7 @@ export class UserAdminService {
private async decryptMany(
organizationId: string,
users: OrganizationUserDetailsResponse[]
users: OrganizationUserDetailsResponse[],
): Promise<OrganizationUserAdminView[]> {
const promises = users.map(async (u) => {
const view = new OrganizationUserAdminView();

View File

@@ -13,7 +13,7 @@ export class IsPaidOrgGuard implements CanActivate {
private router: Router,
private organizationService: OrganizationService,
private messagingService: MessagingService,
private dialogService: DialogService
private dialogService: DialogService,
) {}
async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {

View File

@@ -23,7 +23,7 @@ const orgFactory = (props: Partial<Organization> = {}) =>
enabled: true,
type: OrganizationUserType.Admin,
},
props
props,
);
describe("Organization Permissions Guard", () => {
@@ -52,7 +52,7 @@ describe("Organization Permissions Guard", () => {
organizationService,
mock<PlatformUtilsService>(),
mock<I18nService>(),
mock<SyncService>()
mock<SyncService>(),
);
});

View File

@@ -19,7 +19,7 @@ export class OrganizationPermissionsGuard implements CanActivate {
private organizationService: OrganizationService,
private platformUtilsService: PlatformUtilsService,
private i18nService: I18nService,
private syncService: SyncService
private syncService: SyncService,
) {}
async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
@@ -37,7 +37,7 @@ export class OrganizationPermissionsGuard implements CanActivate {
this.platformUtilsService.showToast(
"error",
null,
this.i18nService.t("organizationIsDisabled")
this.i18nService.t("organizationIsDisabled"),
);
return this.router.createUrlTree(["/"]);
}

View File

@@ -10,7 +10,10 @@ import {
providedIn: "root",
})
export class OrganizationRedirectGuard implements CanActivate {
constructor(private router: Router, private organizationService: OrganizationService) {}
constructor(
private router: Router,
private organizationService: OrganizationService,
) {}
async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
const org = this.organizationService.get(route.params.organizationId);

View File

@@ -23,7 +23,10 @@ export class OrganizationLayoutComponent implements OnInit, OnDestroy {
private _destroy = new Subject<void>();
constructor(private route: ActivatedRoute, private organizationService: OrganizationService) {}
constructor(
private route: ActivatedRoute,
private organizationService: OrganizationService,
) {}
ngOnInit() {
document.body.classList.remove("layout_frontend");
@@ -36,7 +39,7 @@ export class OrganizationLayoutComponent implements OnInit, OnDestroy {
return this.organizationService.organizations$
.pipe(takeUntil(this._destroy))
.pipe(getOrganizationById(id));
})
}),
);
}

View File

@@ -54,7 +54,7 @@
</ng-container>
<ng-template body let-rows$>
<tr bitRow *ngFor="let r of rows$ | async">
<td bitCell>{{ r.date | date : "medium" }}</td>
<td bitCell>{{ r.date | date: "medium" }}</td>
<td bitCell>
<i
class="tw-text-muted bwi bwi-lg {{ r.appIcon }}"

View File

@@ -62,7 +62,7 @@ export class EntityEventsComponent implements OnInit {
private logService: LogService,
private organizationUserService: OrganizationUserService,
private formBuilder: FormBuilder,
private validationService: ValidationService
private validationService: ValidationService,
) {}
async ngOnInit() {
@@ -106,13 +106,13 @@ export class EntityEventsComponent implements OnInit {
try {
dates = this.eventService.formatDateFilters(
this.filterFormGroup.value.start,
this.filterFormGroup.value.end
this.filterFormGroup.value.end,
);
} catch (e) {
this.platformUtilsService.showToast(
"error",
this.i18nService.t("errorOccurred"),
this.i18nService.t("invalidDateRange")
this.i18nService.t("invalidDateRange"),
);
return;
}
@@ -124,7 +124,7 @@ export class EntityEventsComponent implements OnInit {
this.params.entityId,
dates[0],
dates[1],
clearExisting ? null : this.continuationToken
clearExisting ? null : this.continuationToken,
);
} else if (this.params.entity === "user") {
response = await this.apiService.getEventsOrganizationUser(
@@ -132,14 +132,14 @@ export class EntityEventsComponent implements OnInit {
this.params.entityId,
dates[0],
dates[1],
clearExisting ? null : this.continuationToken
clearExisting ? null : this.continuationToken,
);
} else {
response = await this.apiService.getEventsCipher(
this.params.entityId,
dates[0],
dates[1],
clearExisting ? null : this.continuationToken
clearExisting ? null : this.continuationToken,
);
}
@@ -168,7 +168,7 @@ export class EntityEventsComponent implements OnInit {
systemUser: r.systemUser,
serviceAccountId: r.serviceAccountId,
});
})
}),
);
if (!clearExisting && this.dataSource.data != null && this.dataSource.data.length > 0) {
@@ -186,7 +186,7 @@ export class EntityEventsComponent implements OnInit {
*/
export const openEntityEventsDialog = (
dialogService: DialogService,
config: DialogConfig<EntityEventsDialogParams>
config: DialogConfig<EntityEventsDialogParams>,
) => {
return dialogService.open<void, EntityEventsDialogParams>(EntityEventsComponent, config);
};

View File

@@ -77,7 +77,7 @@
</ng-container>
<ng-template body>
<tr bitRow *ngFor="let e of events" alignContent="top">
<td bitCell class="tw-whitespace-nowrap">{{ e.date | date : "medium" }}</td>
<td bitCell class="tw-whitespace-nowrap">{{ e.date | date: "medium" }}</td>
<td bitCell>
<span title="{{ e.appName }}, {{ e.ip }}">{{ e.appName }}</span>
</td>

View File

@@ -49,7 +49,7 @@ export class EventsComponent extends BaseEventsComponent implements OnInit, OnDe
private organizationService: OrganizationService,
private organizationUserService: OrganizationUserService,
private providerService: ProviderService,
fileDownloadService: FileDownloadService
fileDownloadService: FileDownloadService,
) {
super(
eventService,
@@ -57,7 +57,7 @@ export class EventsComponent extends BaseEventsComponent implements OnInit, OnDe
exportService,
platformUtilsService,
logService,
fileDownloadService
fileDownloadService,
);
}
@@ -73,7 +73,7 @@ export class EventsComponent extends BaseEventsComponent implements OnInit, OnDe
}
await this.load();
}),
takeUntil(this.destroy$)
takeUntil(this.destroy$),
)
.subscribe();
}
@@ -93,7 +93,7 @@ export class EventsComponent extends BaseEventsComponent implements OnInit, OnDe
(await this.providerService.get(this.organization.providerId)).canManageUsers
) {
const providerUsersResponse = await this.apiService.getProviderUsers(
this.organization.providerId
this.organization.providerId,
);
providerUsersResponse.data.forEach((u) => {
const name = this.userNamePipe.transform(u);
@@ -117,7 +117,7 @@ export class EventsComponent extends BaseEventsComponent implements OnInit, OnDe
this.organizationId,
startDate,
endDate,
continuationToken
continuationToken,
);
}

View File

@@ -21,7 +21,7 @@
<bit-form-field>
<bit-label>{{ "name" | i18n }}</bit-label>
<input bitInput appAutofocus type="text" formControlName="name" />
<bit-hint>{{ "characterMaximum" | i18n : 100 }}</bit-hint>
<bit-hint>{{ "characterMaximum" | i18n: 100 }}</bit-hint>
</bit-form-field>
<bit-form-field>
<bit-label>{{ "externalId" | i18n }}</bit-label>

View File

@@ -67,11 +67,11 @@ export enum GroupAddEditDialogResultType {
*/
export const openGroupAddEditDialog = (
dialogService: DialogService,
config: DialogConfig<GroupAddEditDialogParams>
config: DialogConfig<GroupAddEditDialogParams>,
) => {
return dialogService.open<GroupAddEditDialogResultType, GroupAddEditDialogParams>(
GroupAddEditComponent,
config
config,
);
};
@@ -82,7 +82,7 @@ export const openGroupAddEditDialog = (
export class GroupAddEditComponent implements OnInit, OnDestroy {
protected flexibleCollectionsEnabled$ = this.configService.getFeatureFlag$(
FeatureFlag.FlexibleCollections,
false
false,
);
protected PermissionMode = PermissionMode;
@@ -120,9 +120,9 @@ export class GroupAddEditComponent implements OnInit, OnDestroy {
return from(
this.collectionService.decryptMany(
response.data.map(
(r) => new Collection(new CollectionData(r as CollectionDetailsResponse))
)
)
(r) => new Collection(new CollectionData(r as CollectionDetailsResponse)),
),
),
);
}),
map((collections) =>
@@ -131,8 +131,8 @@ export class GroupAddEditComponent implements OnInit, OnDestroy {
type: AccessItemType.Collection,
labelName: c.name,
listName: c.name,
}))
)
})),
),
);
}
@@ -147,8 +147,8 @@ export class GroupAddEditComponent implements OnInit, OnDestroy {
listName: m.name?.length > 0 ? `${m.name} (${m.email})` : m.email,
labelName: m.name || m.email,
status: m.status,
}))
)
})),
),
);
}
@@ -172,7 +172,7 @@ export class GroupAddEditComponent implements OnInit, OnDestroy {
this.logService.error(e.toString());
}
return of(undefined);
})
}),
);
}
@@ -189,7 +189,7 @@ export class GroupAddEditComponent implements OnInit, OnDestroy {
private formBuilder: FormBuilder,
private changeDetectorRef: ChangeDetectorRef,
private dialogService: DialogService,
private configService: ConfigServiceAbstraction
private configService: ConfigServiceAbstraction,
) {
this.tabIndex = params.initialTab ?? GroupAddEditTabType.Info;
}
@@ -243,7 +243,7 @@ export class GroupAddEditComponent implements OnInit, OnDestroy {
this.platformUtilsService.showToast(
"error",
null,
this.i18nService.t("fieldOnTabRequiresAttention", this.i18nService.t("groupInfo"))
this.i18nService.t("fieldOnTabRequiresAttention", this.i18nService.t("groupInfo")),
);
}
return;
@@ -267,7 +267,7 @@ export class GroupAddEditComponent implements OnInit, OnDestroy {
this.platformUtilsService.showToast(
"success",
null,
this.i18nService.t(this.editMode ? "editedGroupId" : "createdGroupId", formValue.name)
this.i18nService.t(this.editMode ? "editedGroupId" : "createdGroupId", formValue.name),
);
this.dialogRef.close(GroupAddEditDialogResultType.Saved);
@@ -292,7 +292,7 @@ export class GroupAddEditComponent implements OnInit, OnDestroy {
this.platformUtilsService.showToast(
"success",
null,
this.i18nService.t("deletedGroupId", this.group.name)
this.i18nService.t("deletedGroupId", this.group.name),
);
this.dialogRef.close(GroupAddEditDialogResultType.Deleted);
};

View File

@@ -130,7 +130,7 @@ export class GroupsComponent implements OnInit, OnDestroy {
private searchService: SearchService,
private logService: LogService,
private collectionService: CollectionService,
private searchPipe: SearchPipe
private searchPipe: SearchPipe,
) {}
async ngOnInit() {
@@ -141,13 +141,13 @@ export class GroupsComponent implements OnInit, OnDestroy {
combineLatest([
// collectionMap
from(this.apiService.getCollections(this.organizationId)).pipe(
concatMap((response) => this.toCollectionMap(response))
concatMap((response) => this.toCollectionMap(response)),
),
// groups
this.refreshGroups$.pipe(
switchMap(() => this.groupService.getAll(this.organizationId))
switchMap(() => this.groupService.getAll(this.organizationId)),
),
])
]),
),
map(([collectionMap, groups]) => {
return groups
@@ -162,7 +162,7 @@ export class GroupsComponent implements OnInit, OnDestroy {
.sort(this.i18nService.collator?.compare),
}));
}),
takeUntil(this.destroy$)
takeUntil(this.destroy$),
)
.subscribe((groups) => {
this.groups = groups;
@@ -177,7 +177,7 @@ export class GroupsComponent implements OnInit, OnDestroy {
concatMap(async (qParams) => {
this.searchText = qParams.search;
}),
takeUntil(this.destroy$)
takeUntil(this.destroy$),
)
.subscribe();
}
@@ -198,7 +198,7 @@ export class GroupsComponent implements OnInit, OnDestroy {
}
if (this.groups.length > pagedLength) {
this.pagedGroups = this.pagedGroups.concat(
this.groups.slice(pagedLength, pagedLength + pagedSize)
this.groups.slice(pagedLength, pagedLength + pagedSize),
);
}
this.pagedGroupsCount = this.pagedGroups.length;
@@ -207,7 +207,7 @@ export class GroupsComponent implements OnInit, OnDestroy {
async edit(
group: GroupDetailsRow,
startingTabIndex: GroupAddEditTabType = GroupAddEditTabType.Info
startingTabIndex: GroupAddEditTabType = GroupAddEditTabType.Info,
) {
const dialogRef = openGroupAddEditDialog(this.dialogService, {
data: {
@@ -245,7 +245,7 @@ export class GroupsComponent implements OnInit, OnDestroy {
this.platformUtilsService.showToast(
"success",
null,
this.i18nService.t("deletedGroupId", groupRow.details.name)
this.i18nService.t("deletedGroupId", groupRow.details.name),
);
this.removeGroup(groupRow.details.id);
} catch (e) {
@@ -276,12 +276,12 @@ export class GroupsComponent implements OnInit, OnDestroy {
try {
await this.groupService.deleteMany(
this.organizationId,
groupsToDelete.map((g) => g.details.id)
groupsToDelete.map((g) => g.details.id),
);
this.platformUtilsService.showToast(
"success",
null,
this.i18nService.t("deletedManyGroups", groupsToDelete.length.toString())
this.i18nService.t("deletedManyGroups", groupsToDelete.length.toString()),
);
groupsToDelete.forEach((g) => this.removeGroup(g.details.id));
@@ -326,7 +326,7 @@ export class GroupsComponent implements OnInit, OnDestroy {
private async toCollectionMap(response: ListResponse<CollectionResponse>) {
const collections = response.data.map(
(r) => new Collection(new CollectionData(r as CollectionDetailsResponse))
(r) => new Collection(new CollectionData(r as CollectionDetailsResponse)),
);
const decryptedCollections = await this.collectionService.decryptMany(collections);
@@ -344,7 +344,7 @@ export class GroupsComponent implements OnInit, OnDestroy {
this.groups,
this.searchText,
(group) => group.details.name,
(group) => group.details.id
(group) => group.details.id,
);
}
}

View File

@@ -22,7 +22,7 @@ export class UserConfirmComponent implements OnInit {
constructor(
private cryptoService: CryptoService,
private logService: LogService,
private stateService: StateService
private stateService: StateService,
) {}
async ngOnInit() {

View File

@@ -33,7 +33,7 @@ export class BulkConfirmComponent implements OnInit {
protected cryptoService: CryptoService,
protected apiService: ApiService,
private organizationUserService: OrganizationUserService,
private i18nService: I18nService
private i18nService: I18nService,
) {}
async ngOnInit() {
@@ -95,7 +95,7 @@ export class BulkConfirmComponent implements OnInit {
protected async getPublicKeys() {
return await this.organizationUserService.postOrganizationUsersPublicKey(
this.organizationId,
this.filteredUsers.map((user) => user.id)
this.filteredUsers.map((user) => user.id),
);
}
@@ -107,7 +107,7 @@ export class BulkConfirmComponent implements OnInit {
const request = new OrganizationUserBulkConfirmRequest(userIdsWithKeys);
return await this.organizationUserService.postOrganizationUserBulkConfirm(
this.organizationId,
request
request,
);
}
}

View File

@@ -23,7 +23,7 @@ export class BulkEnableSecretsManagerDialogComponent implements OnInit {
@Inject(DIALOG_DATA) private data: BulkEnableSecretsManagerDialogData,
private organizationUserService: OrganizationUserService,
private platformUtilsService: PlatformUtilsService,
private i18nService: I18nService
private i18nService: I18nService,
) {}
ngOnInit(): void {
@@ -33,12 +33,12 @@ export class BulkEnableSecretsManagerDialogComponent implements OnInit {
submit = async () => {
await this.organizationUserService.putOrganizationUserBulkEnableSecretsManager(
this.data.orgId,
this.dataSource.data.map((u) => u.id)
this.dataSource.data.map((u) => u.id),
);
this.platformUtilsService.showToast(
"success",
null,
this.i18nService.t("activatedAccessToSecretsManager")
this.i18nService.t("activatedAccessToSecretsManager"),
);
this.dialogRef.close();
};
@@ -46,7 +46,7 @@ export class BulkEnableSecretsManagerDialogComponent implements OnInit {
static open(dialogService: DialogService, data: BulkEnableSecretsManagerDialogData) {
return dialogService.open<unknown, BulkEnableSecretsManagerDialogData>(
BulkEnableSecretsManagerDialogComponent,
{ data }
{ data },
);
}
}

View File

@@ -33,7 +33,7 @@ export class BulkRemoveComponent {
constructor(
protected apiService: ApiService,
protected i18nService: I18nService,
private organizationUserService: OrganizationUserService
private organizationUserService: OrganizationUserService,
) {}
async submit() {
@@ -56,7 +56,7 @@ export class BulkRemoveComponent {
protected async deleteUsers() {
return await this.organizationUserService.deleteManyOrganizationUsers(
this.organizationId,
this.users.map((user) => user.id)
this.users.map((user) => user.id),
);
}

View File

@@ -32,7 +32,7 @@ export class BulkRestoreRevokeComponent {
constructor(
protected i18nService: I18nService,
private organizationUserService: OrganizationUserService,
@Inject(DIALOG_DATA) protected data: BulkRestoreDialogParams
@Inject(DIALOG_DATA) protected data: BulkRestoreDialogParams,
) {
this.isRevoking = data.isRevoking;
this.organizationId = data.organizationId;
@@ -65,12 +65,12 @@ export class BulkRestoreRevokeComponent {
if (this.isRevoking) {
return await this.organizationUserService.revokeManyOrganizationUsers(
this.organizationId,
userIds
userIds,
);
} else {
return await this.organizationUserService.restoreManyOrganizationUsers(
this.organizationId,
userIds
userIds,
);
}
}

View File

@@ -25,7 +25,7 @@
<input id="emails" type="text" appAutoFocus bitInput formControlName="emails" />
<bit-hint>{{
"inviteMultipleEmailDesc"
| i18n : (organization.planProductType === ProductType.TeamsStarter ? "10" : "20")
| i18n: (organization.planProductType === ProductType.TeamsStarter ? "10" : "20")
}}</bit-hint>
</bit-form-field>
</ng-container>

View File

@@ -71,7 +71,7 @@ export enum MemberDialogResult {
export class MemberDialogComponent implements OnInit, OnDestroy {
protected flexibleCollectionsEnabled$ = this.configService.getFeatureFlag$(
FeatureFlag.FlexibleCollections,
false
false,
);
loading = true;
@@ -145,7 +145,7 @@ export class MemberDialogComponent implements OnInit, OnDestroy {
private userService: UserAdminService,
private organizationUserService: OrganizationUserService,
private dialogService: DialogService,
private configService: ConfigServiceAbstraction
private configService: ConfigServiceAbstraction,
) {}
async ngOnInit() {
@@ -154,7 +154,7 @@ export class MemberDialogComponent implements OnInit, OnDestroy {
this.title = this.i18nService.t(this.editMode ? "editMember" : "inviteMember");
const organization$ = of(this.organizationService.get(this.params.organizationId)).pipe(
shareReplay({ refCount: true, bufferSize: 1 })
shareReplay({ refCount: true, bufferSize: 1 }),
);
const groups$ = organization$.pipe(
switchMap((organization) => {
@@ -163,7 +163,7 @@ export class MemberDialogComponent implements OnInit, OnDestroy {
}
return this.groupService.getAll(this.params.organizationId);
})
}),
);
combineLatest({
@@ -186,12 +186,12 @@ export class MemberDialogComponent implements OnInit, OnDestroy {
orgWithoutAdditionalSeatLimitReachedWithUpgradePathValidator(
this.organization,
this.params.allOrganizationUserEmails,
this.i18nService.t("subscriptionFreePlan", organization.seats)
this.i18nService.t("subscriptionFreePlan", organization.seats),
),
orgWithoutAdditionalSeatLimitReachedWithoutUpgradePathValidator(
this.organization,
this.params.allOrganizationUserEmails,
this.i18nService.t("subscriptionFamiliesPlan", organization.seats)
this.i18nService.t("subscriptionFamiliesPlan", organization.seats),
),
];
@@ -200,11 +200,11 @@ export class MemberDialogComponent implements OnInit, OnDestroy {
emailsControl.updateValueAndValidity();
this.collectionAccessItems = [].concat(
collections.map((c) => mapCollectionToAccessItemView(c))
collections.map((c) => mapCollectionToAccessItemView(c)),
);
this.groupAccessItems = [].concat(
groups.map<AccessItemView>((g) => mapGroupToAccessItemView(g))
groups.map<AccessItemView>((g) => mapGroupToAccessItemView(g)),
);
if (this.params.organizationUserId) {
@@ -252,13 +252,13 @@ export class MemberDialogComponent implements OnInit, OnDestroy {
group.collections.map((accessSelection) => {
const collection = collections.find((c) => c.id === accessSelection.id);
return { group, collection, accessSelection };
})
}),
);
this.collectionAccessItems = this.collectionAccessItems.concat(
collectionsFromGroups.map(({ collection, accessSelection, group }) =>
mapCollectionToAccessItemView(collection, accessSelection, group)
)
mapCollectionToAccessItemView(collection, accessSelection, group),
),
);
const accessSelections = mapToAccessSelections(userDetails);
@@ -328,7 +328,7 @@ export class MemberDialogComponent implements OnInit, OnDestroy {
this.platformUtilsService.showToast(
"info",
null,
this.i18nService.t("accountRecoveryManageUsers")
this.i18nService.t("accountRecoveryManageUsers"),
);
}
}
@@ -341,7 +341,7 @@ export class MemberDialogComponent implements OnInit, OnDestroy {
this.platformUtilsService.showToast(
"error",
null,
this.i18nService.t("fieldOnTabRequiresAttention", this.i18nService.t("role"))
this.i18nService.t("fieldOnTabRequiresAttention", this.i18nService.t("role")),
);
}
return;
@@ -351,7 +351,7 @@ export class MemberDialogComponent implements OnInit, OnDestroy {
this.platformUtilsService.showToast(
"error",
null,
this.i18nService.t("customNonEnterpriseError")
this.i18nService.t("customNonEnterpriseError"),
);
return;
}
@@ -363,7 +363,7 @@ export class MemberDialogComponent implements OnInit, OnDestroy {
userView.type = this.formGroup.value.type;
userView.permissions = this.setRequestPermissions(
userView.permissions ?? new PermissionsApi(),
userView.type !== OrganizationUserType.Custom
userView.type !== OrganizationUserType.Custom,
);
userView.collections = this.formGroup.value.access
.filter((v) => v.type === AccessItemType.Collection)
@@ -399,7 +399,7 @@ export class MemberDialogComponent implements OnInit, OnDestroy {
this.platformUtilsService.showToast(
"success",
null,
this.i18nService.t(this.editMode ? "editedUserId" : "invitedUsers", this.params.name)
this.i18nService.t(this.editMode ? "editedUserId" : "invitedUsers", this.params.name),
);
this.close(MemberDialogResult.Saved);
};
@@ -433,13 +433,13 @@ export class MemberDialogComponent implements OnInit, OnDestroy {
await this.organizationUserService.deleteOrganizationUser(
this.params.organizationId,
this.params.organizationUserId
this.params.organizationUserId,
);
this.platformUtilsService.showToast(
"success",
null,
this.i18nService.t("removedUserId", this.params.name)
this.i18nService.t("removedUserId", this.params.name),
);
this.close(MemberDialogResult.Deleted);
};
@@ -470,13 +470,13 @@ export class MemberDialogComponent implements OnInit, OnDestroy {
await this.organizationUserService.revokeOrganizationUser(
this.params.organizationId,
this.params.organizationUserId
this.params.organizationUserId,
);
this.platformUtilsService.showToast(
"success",
null,
this.i18nService.t("revokedUserId", this.params.name)
this.i18nService.t("revokedUserId", this.params.name),
);
this.isRevoked = true;
this.close(MemberDialogResult.Revoked);
@@ -489,13 +489,13 @@ export class MemberDialogComponent implements OnInit, OnDestroy {
await this.organizationUserService.restoreOrganizationUser(
this.params.organizationId,
this.params.organizationUserId
this.params.organizationUserId,
);
this.platformUtilsService.showToast(
"success",
null,
this.i18nService.t("restoredUserId", this.params.name)
this.i18nService.t("restoredUserId", this.params.name),
);
this.isRevoked = false;
this.close(MemberDialogResult.Restored);
@@ -533,7 +533,7 @@ export class MemberDialogComponent implements OnInit, OnDestroy {
function mapCollectionToAccessItemView(
collection: CollectionView,
accessSelection?: CollectionAccessSelectionView,
group?: GroupView
group?: GroupView,
): AccessItemView {
return {
type: AccessItemType.Collection,
@@ -564,7 +564,7 @@ function mapToAccessSelections(user: OrganizationUserAdminView): AccessItemValue
id: selection.id,
type: AccessItemType.Collection,
permission: convertToPermission(selection),
}))
})),
);
}
@@ -576,7 +576,7 @@ function mapToGroupAccessSelections(groups: string[]): AccessItemValue[] {
groups.map((groupId) => ({
id: groupId,
type: AccessItemType.Group,
}))
})),
);
}
@@ -587,7 +587,7 @@ function mapToGroupAccessSelections(groups: string[]): AccessItemValue[] {
*/
export function openUserAddEditDialog(
dialogService: DialogService,
config: DialogConfig<MemberDialogParams>
config: DialogConfig<MemberDialogParams>,
) {
return dialogService.open<MemberDialogResult, MemberDialogParams>(MemberDialogComponent, config);
}

View File

@@ -29,7 +29,7 @@ export class NestedCheckboxComponent implements OnInit, OnDestroy {
.pipe(takeUntil(this.destroy$))
.subscribe((value) => {
Object.values(this.checkboxes.controls).forEach((control) =>
control.setValue(value, { emitEvent: false })
control.setValue(value, { emitEvent: false }),
);
});
}

View File

@@ -14,7 +14,7 @@ const orgFactory = (props: Partial<Organization> = {}) =>
enabled: true,
type: OrganizationUserType.Admin,
},
props
props,
);
describe("orgWithoutAdditionalSeatLimitReachedWithUpgradePathValidator", () => {
@@ -30,7 +30,7 @@ describe("orgWithoutAdditionalSeatLimitReachedWithUpgradePathValidator", () => {
validatorFn = orgWithoutAdditionalSeatLimitReachedWithUpgradePathValidator(
organization,
allOrganizationUserEmails,
"You cannot invite more than 2 members without upgrading your plan."
"You cannot invite more than 2 members without upgrading your plan.",
);
const control = new FormControl("");
@@ -43,7 +43,7 @@ describe("orgWithoutAdditionalSeatLimitReachedWithUpgradePathValidator", () => {
validatorFn = orgWithoutAdditionalSeatLimitReachedWithUpgradePathValidator(
organization,
allOrganizationUserEmails,
"You cannot invite more than 2 members without upgrading your plan."
"You cannot invite more than 2 members without upgrading your plan.",
);
const control = new FormControl(null);
@@ -60,7 +60,7 @@ describe("orgWithoutAdditionalSeatLimitReachedWithUpgradePathValidator", () => {
validatorFn = orgWithoutAdditionalSeatLimitReachedWithUpgradePathValidator(
organization,
allOrganizationUserEmails,
"You cannot invite more than 2 members without upgrading your plan."
"You cannot invite more than 2 members without upgrading your plan.",
);
const control = new FormControl("user2@example.com");
@@ -77,7 +77,7 @@ describe("orgWithoutAdditionalSeatLimitReachedWithUpgradePathValidator", () => {
validatorFn = orgWithoutAdditionalSeatLimitReachedWithUpgradePathValidator(
organization,
allOrganizationUserEmails,
"You cannot invite more than 10 members without upgrading your plan."
"You cannot invite more than 10 members without upgrading your plan.",
);
const control = new FormControl(
"user2@example.com," +
@@ -88,7 +88,7 @@ describe("orgWithoutAdditionalSeatLimitReachedWithUpgradePathValidator", () => {
"user7@example.com," +
"user8@example.com," +
"user9@example.com," +
"user10@example.com"
"user10@example.com",
);
const result = validatorFn(control);
@@ -105,7 +105,7 @@ describe("orgWithoutAdditionalSeatLimitReachedWithUpgradePathValidator", () => {
validatorFn = orgWithoutAdditionalSeatLimitReachedWithUpgradePathValidator(
organization,
allOrganizationUserEmails,
"You cannot invite more than 2 members without upgrading your plan."
"You cannot invite more than 2 members without upgrading your plan.",
);
const control = new FormControl("user2@example.com,user3@example.com");
@@ -123,7 +123,7 @@ describe("orgWithoutAdditionalSeatLimitReachedWithUpgradePathValidator", () => {
validatorFn = orgWithoutAdditionalSeatLimitReachedWithUpgradePathValidator(
organization,
allOrganizationUserEmails,
"You cannot invite more than 2 members without upgrading your plan."
"You cannot invite more than 2 members without upgrading your plan.",
);
const result = validatorFn(control);

View File

@@ -14,7 +14,7 @@ import { ProductType } from "@bitwarden/common/enums";
export function orgWithoutAdditionalSeatLimitReachedWithUpgradePathValidator(
organization: Organization,
allOrganizationUserEmails: string[],
errorMessage: string
errorMessage: string,
): ValidatorFn {
return (control: AbstractControl): ValidationErrors | null => {
if (control.value === "" || !control.value) {
@@ -30,10 +30,10 @@ export function orgWithoutAdditionalSeatLimitReachedWithUpgradePathValidator(
newEmailToAdd &&
newEmailToAdd.trim() !== "" &&
!allOrganizationUserEmails.some(
(existingEmail) => existingEmail === newEmailToAdd.trim()
)
)
)
(existingEmail) => existingEmail === newEmailToAdd.trim(),
),
),
),
);
return organization.planProductType === ProductType.Free &&

View File

@@ -14,7 +14,7 @@ import { ProductType } from "@bitwarden/common/enums";
export function orgWithoutAdditionalSeatLimitReachedWithoutUpgradePathValidator(
organization: Organization,
allOrganizationUserEmails: string[],
errorMessage: string
errorMessage: string,
): ValidatorFn {
return (control: AbstractControl): ValidationErrors | null => {
if (control.value === "" || !control.value) {
@@ -30,10 +30,10 @@ export function orgWithoutAdditionalSeatLimitReachedWithoutUpgradePathValidator(
newEmailToAdd &&
newEmailToAdd.trim() !== "" &&
!allOrganizationUserEmails.some(
(existingEmail) => existingEmail === newEmailToAdd.trim()
)
)
)
(existingEmail) => existingEmail === newEmailToAdd.trim(),
),
),
),
);
return (organization.planProductType === ProductType.Families ||

View File

@@ -17,7 +17,7 @@
</div>
<div class="modal-body">
<app-callout type="warning"
>{{ "resetPasswordLoggedOutWarning" | i18n : loggedOutWarningName }}
>{{ "resetPasswordLoggedOutWarning" | i18n: loggedOutWarningName }}
</app-callout>
<auth-password-callout
[policy]="enforcedPolicyOptions"

View File

@@ -57,7 +57,7 @@ export class ResetPasswordComponent implements OnInit, OnDestroy {
private cryptoService: CryptoService,
private logService: LogService,
private organizationUserService: OrganizationUserService,
private dialogService: DialogService
private dialogService: DialogService,
) {}
async ngOnInit() {
@@ -66,7 +66,7 @@ export class ResetPasswordComponent implements OnInit, OnDestroy {
.pipe(takeUntil(this.destroy$))
.subscribe(
(enforcedPasswordPolicyOptions) =>
(this.enforcedPolicyOptions = enforcedPasswordPolicyOptions)
(this.enforcedPolicyOptions = enforcedPasswordPolicyOptions),
);
}
@@ -99,7 +99,7 @@ export class ResetPasswordComponent implements OnInit, OnDestroy {
this.platformUtilsService.showToast(
"info",
null,
this.i18nService.t("valueCopied", this.i18nService.t("password"))
this.i18nService.t("valueCopied", this.i18nService.t("password")),
);
}
@@ -109,7 +109,7 @@ export class ResetPasswordComponent implements OnInit, OnDestroy {
this.platformUtilsService.showToast(
"error",
this.i18nService.t("errorOccurred"),
this.i18nService.t("masterPasswordRequired")
this.i18nService.t("masterPasswordRequired"),
);
return false;
}
@@ -118,7 +118,7 @@ export class ResetPasswordComponent implements OnInit, OnDestroy {
this.platformUtilsService.showToast(
"error",
this.i18nService.t("errorOccurred"),
this.i18nService.t("masterPasswordMinlength", Utils.minimumPasswordLength)
this.i18nService.t("masterPasswordMinlength", Utils.minimumPasswordLength),
);
return false;
}
@@ -128,13 +128,13 @@ export class ResetPasswordComponent implements OnInit, OnDestroy {
!this.policyService.evaluateMasterPassword(
this.passwordStrengthResult.score,
this.newPassword,
this.enforcedPolicyOptions
this.enforcedPolicyOptions,
)
) {
this.platformUtilsService.showToast(
"error",
this.i18nService.t("errorOccurred"),
this.i18nService.t("masterPasswordPolicyRequirementsNotMet")
this.i18nService.t("masterPasswordPolicyRequirementsNotMet"),
);
return;
}
@@ -171,7 +171,7 @@ export class ResetPasswordComponent implements OnInit, OnDestroy {
const orgSymKey = await this.cryptoService.getOrgKey(this.organizationId);
const decPrivateKey = await this.cryptoService.decryptToBytes(
new EncString(encryptedPrivateKey),
orgSymKey
orgSymKey,
);
// Decrypt User's Reset Password Key to get UserKey
@@ -183,17 +183,17 @@ export class ResetPasswordComponent implements OnInit, OnDestroy {
this.newPassword,
this.email.trim().toLowerCase(),
kdfType,
new KdfConfig(kdfIterations, kdfMemory, kdfParallelism)
new KdfConfig(kdfIterations, kdfMemory, kdfParallelism),
);
const newMasterKeyHash = await this.cryptoService.hashMasterKey(
this.newPassword,
newMasterKey
newMasterKey,
);
// Create new encrypted user key for the User
const newUserKey = await this.cryptoService.encryptUserKeyWithMasterKey(
newMasterKey,
existingUserKey
existingUserKey,
);
// Create request
@@ -205,7 +205,7 @@ export class ResetPasswordComponent implements OnInit, OnDestroy {
return this.organizationUserService.putOrganizationUserResetPassword(
this.organizationId,
this.id,
request
request,
);
});
@@ -213,7 +213,7 @@ export class ResetPasswordComponent implements OnInit, OnDestroy {
this.platformUtilsService.showToast(
"success",
null,
this.i18nService.t("resetPasswordSuccess")
this.i18nService.t("resetPasswordSuccess"),
);
this.onPasswordReset.emit();
} catch (e) {

View File

@@ -52,7 +52,7 @@
!loading &&
(isPaging()
? pagedUsers
: (users | search : searchText : 'name' : 'email' : 'id')) as searchedUsers
: (users | search: searchText : 'name' : 'email' : 'id')) as searchedUsers
"
>
<p *ngIf="!searchedUsers.length">{{ "noMembersInList" | i18n }}</p>

View File

@@ -123,7 +123,7 @@ export class PeopleComponent
dialogService: DialogService,
private router: Router,
private groupService: GroupService,
private collectionService: CollectionService
private collectionService: CollectionService,
) {
super(
apiService,
@@ -137,30 +137,30 @@ export class PeopleComponent
searchPipe,
userNamePipe,
stateService,
dialogService
dialogService,
);
}
async ngOnInit() {
const organization$ = this.route.params.pipe(
map((params) => this.organizationService.get(params.organizationId)),
shareReplay({ refCount: true, bufferSize: 1 })
shareReplay({ refCount: true, bufferSize: 1 }),
);
this.canUseSecretsManager$ = organization$.pipe(
map((org) => org.useSecretsManager && flagEnabled("secretsManager"))
map((org) => org.useSecretsManager && flagEnabled("secretsManager")),
);
const policies$ = organization$.pipe(
switchMap((organization) => {
if (organization.isProviderUser) {
return from(this.policyApiService.getPolicies(organization.id)).pipe(
map((response) => this.policyService.mapPoliciesFromToken(response))
map((response) => this.policyService.mapPoliciesFromToken(response)),
);
}
return this.policyService.policies$;
})
}),
);
combineLatest([this.route.queryParams, policies$, organization$])
@@ -178,7 +178,7 @@ export class PeopleComponent
const request = new OrganizationKeysRequest(orgKeys[0], orgKeys[1].encryptedString);
const response = await this.organizationApiService.updateKeys(
this.organization.id,
request
request,
);
if (response != null) {
this.organization.hasPublicAndPrivateKeys =
@@ -204,7 +204,7 @@ export class PeopleComponent
}
}
}),
takeUntil(this.destroy$)
takeUntil(this.destroy$),
)
.subscribe();
}
@@ -270,7 +270,7 @@ export class PeopleComponent
const response = await this.apiService.getCollections(this.organization.id);
const collections = response.data.map(
(r) => new Collection(new CollectionData(r as CollectionDetailsResponse))
(r) => new Collection(new CollectionData(r as CollectionDetailsResponse)),
);
const decryptedCollections = await this.collectionService.decryptMany(collections);
@@ -303,7 +303,7 @@ export class PeopleComponent
await this.organizationUserService.postOrganizationUserConfirm(
this.organization.id,
user.id,
request
request,
);
}
@@ -378,7 +378,7 @@ export class PeopleComponent
private getDialogContent(): string {
return this.i18nService.t(
this.getProductKey(this.organization.planProductType),
this.organization.seats
this.organization.seats,
);
}
@@ -399,7 +399,7 @@ export class PeopleComponent
case ProductType.Free:
await this.router.navigate(
["/organizations", this.organization.id, "billing", "subscription"],
{ queryParams: { upgrade: true } }
{ queryParams: { upgrade: true } },
);
break;
case ProductType.TeamsStarter:
@@ -431,7 +431,7 @@ export class PeopleComponent
this.platformUtilsService.showToast(
"error",
this.i18nService.t("seatLimitReached"),
this.i18nService.t("contactYourProvider")
this.i18nService.t("contactYourProvider"),
);
return;
}
@@ -487,7 +487,7 @@ export class PeopleComponent
(comp) => {
comp.organizationId = this.organization.id;
comp.users = this.getCheckedUsers();
}
},
);
await modal.onClosedPromise();
@@ -529,7 +529,7 @@ export class PeopleComponent
this.platformUtilsService.showToast(
"error",
this.i18nService.t("errorOccurred"),
this.i18nService.t("noSelectedUsersApplicable")
this.i18nService.t("noSelectedUsersApplicable"),
);
return;
}
@@ -537,13 +537,13 @@ export class PeopleComponent
try {
const response = this.organizationUserService.postManyOrganizationUserReinvite(
this.organization.id,
filteredUsers.map((user) => user.id)
filteredUsers.map((user) => user.id),
);
this.showBulkStatus(
users,
filteredUsers,
response,
this.i18nService.t("bulkReinviteMessage")
this.i18nService.t("bulkReinviteMessage"),
);
} catch (e) {
this.validationService.showError(e);
@@ -562,7 +562,7 @@ export class PeopleComponent
(comp) => {
comp.organizationId = this.organization.id;
comp.users = this.getCheckedUsers();
}
},
);
await modal.onClosedPromise();
@@ -575,7 +575,7 @@ export class PeopleComponent
this.platformUtilsService.showToast(
"error",
this.i18nService.t("errorOccurred"),
this.i18nService.t("noSelectedUsersApplicable")
this.i18nService.t("noSelectedUsersApplicable"),
);
return;
}
@@ -616,7 +616,7 @@ export class PeopleComponent
modal.close();
this.load();
});
}
},
);
}
@@ -668,14 +668,14 @@ export class PeopleComponent
users: OrganizationUserView[],
filteredUsers: OrganizationUserView[],
request: Promise<ListResponse<OrganizationUserBulkResponse>>,
successfullMessage: string
successfullMessage: string,
) {
const [modal, childComponent] = await this.modalService.openViewRef(
BulkStatusComponent,
this.bulkStatusModalRef,
(comp) => {
comp.loading = true;
}
},
);
// Workaround to handle closing the modal shortly after it has been opened

View File

@@ -45,7 +45,7 @@ const routes: Routes = [
path: "settings",
loadChildren: () =>
import("./settings/organization-settings.module").then(
(m) => m.OrganizationSettingsModule
(m) => m.OrganizationSettingsModule,
),
},
{
@@ -65,14 +65,14 @@ const routes: Routes = [
path: "reporting",
loadChildren: () =>
import("../organizations/reporting/organization-reporting.module").then(
(m) => m.OrganizationReportingModule
(m) => m.OrganizationReportingModule,
),
},
{
path: "billing",
loadChildren: () =>
import("../../billing/organizations/organization-billing.module").then(
(m) => m.OrganizationBillingModule
(m) => m.OrganizationBillingModule,
),
},
],

View File

@@ -40,7 +40,7 @@ export class MasterPasswordPolicyComponent extends BasePolicyComponent {
constructor(
private formBuilder: FormBuilder,
i18nService: I18nService,
private organizationService: OrganizationService
private organizationService: OrganizationService,
) {
super();

View File

@@ -34,7 +34,10 @@ export class PasswordGeneratorPolicyComponent extends BasePolicyComponent {
defaultTypes: { name: string; value: string }[];
constructor(private formBuilder: UntypedFormBuilder, i18nService: I18nService) {
constructor(
private formBuilder: UntypedFormBuilder,
i18nService: I18nService,
) {
super();
this.defaultTypes = [

View File

@@ -37,7 +37,7 @@ export class PoliciesComponent implements OnInit {
private organizationService: OrganizationService,
private policyApiService: PolicyApiServiceAbstraction,
private policyListService: PolicyListService,
private router: Router
private router: Router,
) {}
async ngOnInit() {
@@ -93,7 +93,7 @@ export class PoliciesComponent implements OnInit {
modal.close();
this.load();
});
}
},
);
}
}

View File

@@ -47,7 +47,7 @@ export class PolicyEditComponent {
private platformUtilsService: PlatformUtilsService,
private componentFactoryResolver: ComponentFactoryResolver,
private cdr: ChangeDetectorRef,
private logService: LogService
private logService: LogService,
) {}
async ngAfterViewInit() {
@@ -67,7 +67,7 @@ export class PolicyEditComponent {
try {
this.policyResponse = await this.policyApiService.getPolicy(
this.organizationId,
this.policy.type
this.policy.type,
);
} catch (e) {
if (e.statusCode === 404) {
@@ -91,13 +91,13 @@ export class PolicyEditComponent {
this.formPromise = this.policyApiService.putPolicy(
this.organizationId,
this.policy.type,
request
request,
);
await this.formPromise;
this.platformUtilsService.showToast(
"success",
null,
this.i18nService.t("editedPolicyId", this.i18nService.t(this.policy.name))
this.i18nService.t("editedPolicyId", this.i18nService.t(this.policy.name)),
);
this.onSavedPolicy.emit();
} catch (e) {

View File

@@ -28,7 +28,10 @@ export class ResetPasswordPolicyComponent extends BasePolicyComponent {
});
showKeyConnectorInfo = false;
constructor(private formBuilder: FormBuilder, private organizationService: OrganizationService) {
constructor(
private formBuilder: FormBuilder,
private organizationService: OrganizationService,
) {
super();
}

View File

@@ -26,13 +26,16 @@ export class SingleOrgPolicyComponent extends BasePolicyComponent {
if (!this.enabled.value) {
if (policiesEnabledMap.get(PolicyType.RequireSso) ?? false) {
throw new Error(
this.i18nService.t("disableRequiredError", this.i18nService.t("requireSso"))
this.i18nService.t("disableRequiredError", this.i18nService.t("requireSso")),
);
}
if (policiesEnabledMap.get(PolicyType.MaximumVaultTimeout) ?? false) {
throw new Error(
this.i18nService.t("disableRequiredError", this.i18nService.t("maximumVaultTimeoutLabel"))
this.i18nService.t(
"disableRequiredError",
this.i18nService.t("maximumVaultTimeoutLabel"),
),
);
}
}

View File

@@ -13,17 +13,20 @@ export class ReportingComponent implements OnInit {
organization$: Observable<Organization>;
showLeftNav$: Observable<boolean>;
constructor(private route: ActivatedRoute, private organizationService: OrganizationService) {}
constructor(
private route: ActivatedRoute,
private organizationService: OrganizationService,
) {}
ngOnInit() {
this.organization$ = this.route.params.pipe(
switchMap((params) => this.organizationService.get$(params.organizationId)),
shareReplay({ refCount: true, bufferSize: 1 })
shareReplay({ refCount: true, bufferSize: 1 }),
);
this.showLeftNav$ = this.organization$.pipe(
map((o) => o.canAccessEventLogs && o.canAccessReports),
startWith(true)
startWith(true),
);
}
}

View File

@@ -19,19 +19,19 @@ export class ReportsHomeComponent implements OnInit {
private route: ActivatedRoute,
private stateService: StateService,
private organizationService: OrganizationService,
private router: Router
private router: Router,
) {}
ngOnInit() {
this.homepage$ = this.router.events.pipe(
filter((event) => event instanceof NavigationEnd),
map((event) => (event as NavigationEnd).urlAfterRedirects.endsWith("/reports")),
startWith(true)
startWith(true),
);
this.reports$ = this.route.params.pipe(
map((params) => this.organizationService.get(params.organizationId)),
map((org) => this.buildReports(org.isFreeOrg))
map((org) => this.buildReports(org.isFreeOrg)),
);
}

View File

@@ -43,11 +43,11 @@ export class AccountComponent {
taxFormPromise: Promise<unknown>;
flexibleCollectionsEnabled$ = this.configService.getFeatureFlag$(
FeatureFlag.FlexibleCollections,
false
false,
);
flexibleCollectionsV1Enabled$ = this.configService.getFeatureFlag$(
FeatureFlag.FlexibleCollectionsV1,
false
false,
);
// FormGroup validators taken from server Organization domain object
@@ -57,15 +57,15 @@ export class AccountComponent {
{
validators: [Validators.required, Validators.maxLength(50)],
updateOn: "change",
}
},
),
billingEmail: this.formBuilder.control(
{ value: "", disabled: true },
{ validators: [Validators.required, Validators.email, Validators.maxLength(256)] }
{ validators: [Validators.required, Validators.email, Validators.maxLength(256)] },
),
businessName: this.formBuilder.control(
{ value: "", disabled: true },
{ validators: [Validators.maxLength(50)] }
{ validators: [Validators.maxLength(50)] },
),
});
@@ -93,7 +93,7 @@ export class AccountComponent {
private organizationApiService: OrganizationApiServiceAbstraction,
private dialogService: DialogService,
private formBuilder: FormBuilder,
private configService: ConfigServiceAbstraction
private configService: ConfigServiceAbstraction,
) {}
async ngOnInit() {
@@ -111,7 +111,7 @@ export class AccountComponent {
from(this.organizationApiService.getKeys(organization.id)),
]);
}),
takeUntil(this.destroy$)
takeUntil(this.destroy$),
)
.subscribe(([organization, orgResponse, orgKeys]) => {
// Set domain level organization variables
@@ -198,7 +198,7 @@ export class AccountComponent {
this.platformUtilsService.showToast(
"success",
null,
this.i18nService.t("collectionManagementUpdated")
this.i18nService.t("collectionManagementUpdated"),
);
};
@@ -228,7 +228,7 @@ export class AccountComponent {
comp.keyType = "organization";
comp.entityId = this.organizationId;
comp.postKey = this.organizationApiService.getOrCreateApiKey.bind(
this.organizationApiService
this.organizationApiService,
);
comp.scope = "api.organization";
comp.grantType = "client_credentials";

View File

@@ -3,7 +3,7 @@
<span bitDialogTitle>{{ "deleteOrganization" | i18n }}</span>
<div bitDialogContent>
<app-callout type="warning">{{
"deletingOrganizationIsPermanentWarning" | i18n : organization?.name
"deletingOrganizationIsPermanentWarning" | i18n: organization?.name
}}</app-callout>
<p id="organizationDeleteDescription">
<ng-container
@@ -16,7 +16,7 @@
</ng-container>
<ng-template #regularDelete>
<ng-container *ngIf="organizationContentSummary.totalItemCount > 0">
{{ "deletingOrganizationContentWarning" | i18n : organization?.name }}
{{ "deletingOrganizationContentWarning" | i18n: organization?.name }}
<ul>
<li *ngFor="let type of organizationContentSummary.itemCountByType">
{{ type.count }} {{ type.localizationKey | i18n }}

View File

@@ -93,7 +93,7 @@ export class DeleteOrganizationDialogComponent implements OnInit, OnDestroy {
private cipherService: CipherService,
private organizationService: OrganizationService,
private organizationApiService: OrganizationApiServiceAbstraction,
private formBuilder: FormBuilder
private formBuilder: FormBuilder,
) {}
ngOnDestroy(): void {
@@ -124,7 +124,7 @@ export class DeleteOrganizationDialogComponent implements OnInit, OnDestroy {
this.platformUtilsService.showToast(
"success",
this.i18nService.t("organizationDeleted"),
this.i18nService.t("organizationDeletedDesc")
this.i18nService.t("organizationDeletedDesc"),
);
this.dialogRef.close(DeleteOrganizationDialogResult.Deleted);
};
@@ -144,8 +144,8 @@ export class DeleteOrganizationDialogComponent implements OnInit, OnDestroy {
organizationContentSummary.itemCountByType.push(
new OrganizationContentSummaryItem(
count,
this.getOrganizationItemLocalizationKeysByType(CipherType[cipherType])
)
this.getOrganizationItemLocalizationKeysByType(CipherType[cipherType]),
),
);
}
}
@@ -169,10 +169,10 @@ export class DeleteOrganizationDialogComponent implements OnInit, OnDestroy {
*/
export function openDeleteOrganizationDialog(
dialogService: DialogService,
config: DialogConfig<DeleteOrganizationDialogParams>
config: DialogConfig<DeleteOrganizationDialogParams>,
) {
return dialogService.open<DeleteOrganizationDialogResult, DeleteOrganizationDialogParams>(
DeleteOrganizationDialogComponent,
config
config,
);
}

View File

@@ -50,7 +50,7 @@ const routes: Routes = [
path: "import",
loadComponent: () =>
import("../../../tools/import/import-web.component").then(
(mod) => mod.ImportWebComponent
(mod) => mod.ImportWebComponent,
),
canActivate: [OrganizationPermissionsGuard],
data: {
@@ -62,7 +62,7 @@ const routes: Routes = [
path: "export",
loadChildren: () =>
import("../tools/vault-export/org-vault-export.module").then(
(m) => m.OrganizationVaultExportModule
(m) => m.OrganizationVaultExportModule,
),
},
],

View File

@@ -14,11 +14,14 @@ export class SettingsComponent implements OnInit {
organization$: Observable<Organization>;
FeatureFlag = FeatureFlag;
constructor(private route: ActivatedRoute, private organizationService: OrganizationService) {}
constructor(
private route: ActivatedRoute,
private organizationService: OrganizationService,
) {}
ngOnInit() {
this.organization$ = this.route.params.pipe(
switchMap((params) => this.organizationService.get$(params.organizationId))
switchMap((params) => this.organizationService.get$(params.organizationId)),
);
}
}

View File

@@ -28,7 +28,7 @@ export class TwoFactorSetupComponent extends BaseTwoFactorSetupComponent {
policyService: PolicyService,
private route: ActivatedRoute,
stateService: StateService,
private organizationService: OrganizationService
private organizationService: OrganizationService,
) {
super(apiService, modalService, messagingService, policyService, stateService);
}
@@ -41,7 +41,7 @@ export class TwoFactorSetupComponent extends BaseTwoFactorSetupComponent {
this.organization = this.organizationService.get(this.organizationId);
}),
concatMap(async () => await super.ngOnInit()),
takeUntil(this.destroy$)
takeUntil(this.destroy$),
)
.subscribe();
}

View File

@@ -130,7 +130,7 @@
</td>
<td bitCell *ngIf="showMemberRoles">
{{ $any(item).role | userType : "-" }}
{{ $any(item).role | userType: "-" }}
</td>
<td bitCell *ngIf="showGroupColumn">

View File

@@ -138,7 +138,7 @@ describe("AccessSelectorComponent", () => {
expect(mockChange.mock.lastCall[0]).toHaveProperty("[0].id", "123");
expect(mockChange.mock.lastCall[0]).toHaveProperty(
"[0].permission",
CollectionPermission.Edit
CollectionPermission.Edit,
);
});
@@ -246,7 +246,7 @@ describe("AccessSelectorComponent", () => {
// Assert
const colHeading = fixture.nativeElement.querySelector("#permissionColHeading");
expect(!!colHeading).toEqual(shouldShowColumn);
}
},
);
});
});

View File

@@ -63,7 +63,7 @@ export class AccessSelectorComponent implements ControlValueAccessor, OnInit, On
*/
private updateRowControlDisableState = (
controlRow: FormGroup<ControlsOf<AccessItemValue>>,
item: AccessItemView
item: AccessItemView,
) => {
// Disable entire row form group if readonly
if (item.readonly) {
@@ -140,14 +140,14 @@ export class AccessSelectorComponent implements ControlValueAccessor, OnInit, On
set items(val: AccessItemView[]) {
const selected = (this.selectionList.formArray.getRawValue() ?? []).concat(
val.filter((m) => m.readonly)
val.filter((m) => m.readonly),
);
this.selectionList.populateItems(
val.map((m) => {
m.icon = m.icon ?? this.itemIcon(m); // Ensure an icon is set
return m;
}),
selected
selected,
);
}
@@ -203,7 +203,7 @@ export class AccessSelectorComponent implements ControlValueAccessor, OnInit, On
constructor(
private readonly formBuilder: FormBuilder,
private readonly i18nService: I18nService
private readonly i18nService: I18nService,
) {}
/** Required for NG_VALUE_ACCESSOR */

View File

@@ -33,41 +33,40 @@ export enum AccessItemType {
* and then joined back with the base type.
*
*/
export type AccessItemView =
| SelectItemView & {
/**
* Flag that this group/member can access all items.
* This will disable the permission editor for this item.
*/
accessAllItems?: boolean;
export type AccessItemView = SelectItemView & {
/**
* Flag that this group/member can access all items.
* This will disable the permission editor for this item.
*/
accessAllItems?: boolean;
/**
* Flag that this item cannot be modified.
* This will disable the permission editor and will keep
* the item always selected.
*/
readonly?: boolean;
/**
* Flag that this item cannot be modified.
* This will disable the permission editor and will keep
* the item always selected.
*/
readonly?: boolean;
/**
* Optional permission that will be rendered for this
* item if it set to readonly.
*/
readonlyPermission?: CollectionPermission;
} & (
| {
type: AccessItemType.Collection;
viaGroupName?: string;
}
| {
type: AccessItemType.Group;
}
| {
type: AccessItemType.Member; // Members have a few extra details required to display, so they're added here
email: string;
role: OrganizationUserType;
status: OrganizationUserStatusType;
}
);
/**
* Optional permission that will be rendered for this
* item if it set to readonly.
*/
readonlyPermission?: CollectionPermission;
} & (
| {
type: AccessItemType.Collection;
viaGroupName?: string;
}
| {
type: AccessItemType.Group;
}
| {
type: AccessItemType.Member; // Members have a few extra details required to display, so they're added here
email: string;
role: OrganizationUserType;
status: OrganizationUserStatusType;
}
);
/**
* A type that is emitted as a value for the ngControl

View File

@@ -100,7 +100,7 @@ const sampleMembers = itemsFactory(10, AccessItemType.Member);
const sampleGroups = itemsFactory(6, AccessItemType.Group);
const StandaloneAccessSelectorTemplate: Story<AccessSelectorComponent> = (
args: AccessSelectorComponent
args: AccessSelectorComponent,
) => ({
props: {
items: [],
@@ -126,7 +126,7 @@ const StandaloneAccessSelectorTemplate: Story<AccessSelectorComponent> = (
});
const DialogAccessSelectorTemplate: Story<AccessSelectorComponent> = (
args: AccessSelectorComponent
args: AccessSelectorComponent,
) => ({
props: {
items: [],
@@ -338,7 +338,7 @@ GroupMembersAccess.story = {
const fb = new FormBuilder();
const ReactiveFormAccessSelectorTemplate: Story<AccessSelectorComponent> = (
args: AccessSelectorComponent
args: AccessSelectorComponent,
) => ({
props: {
items: [],

View File

@@ -64,7 +64,7 @@ export class FamiliesForEnterpriseSetupComponent implements OnInit, OnDestroy {
private syncService: SyncService,
private validationService: ValidationService,
private organizationService: OrganizationService,
private dialogService: DialogService
private dialogService: DialogService,
) {}
async ngOnInit() {
@@ -77,7 +77,7 @@ export class FamiliesForEnterpriseSetupComponent implements OnInit, OnDestroy {
"error",
null,
this.i18nService.t("sponsoredFamiliesAcceptFailed"),
{ timeout: 10000 }
{ timeout: 10000 },
);
this.router.navigate(["/"]);
return;
@@ -91,7 +91,7 @@ export class FamiliesForEnterpriseSetupComponent implements OnInit, OnDestroy {
});
this.existingFamilyOrganizations$ = this.organizationService.organizations$.pipe(
map((orgs) => orgs.filter((o) => o.planProductType === ProductType.Families))
map((orgs) => orgs.filter((o) => o.planProductType === ProductType.Families)),
);
this.existingFamilyOrganizations$.pipe(takeUntil(this._destroy)).subscribe((orgs) => {
@@ -131,7 +131,7 @@ export class FamiliesForEnterpriseSetupComponent implements OnInit, OnDestroy {
this.platformUtilsService.showToast(
"success",
null,
this.i18nService.t("sponsoredFamiliesOfferRedeemed")
this.i18nService.t("sponsoredFamiliesOfferRedeemed"),
);
await this.syncService.fullSync(true);

View File

@@ -26,7 +26,7 @@ export class ExposedPasswordsReportComponent extends BaseExposedPasswordsReportC
modalService: ModalService,
organizationService: OrganizationService,
private route: ActivatedRoute,
passwordRepromptService: PasswordRepromptService
passwordRepromptService: PasswordRepromptService,
) {
super(cipherService, auditService, organizationService, modalService, passwordRepromptService);
}

View File

@@ -23,7 +23,7 @@ export class InactiveTwoFactorReportComponent extends BaseInactiveTwoFactorRepor
private route: ActivatedRoute,
logService: LogService,
passwordRepromptService: PasswordRepromptService,
organizationService: OrganizationService
organizationService: OrganizationService,
) {
super(cipherService, organizationService, modalService, logService, passwordRepromptService);
}

View File

@@ -24,7 +24,7 @@ export class ReusedPasswordsReportComponent extends BaseReusedPasswordsReportCom
modalService: ModalService,
private route: ActivatedRoute,
organizationService: OrganizationService,
passwordRepromptService: PasswordRepromptService
passwordRepromptService: PasswordRepromptService,
) {
super(cipherService, organizationService, modalService, passwordRepromptService);
}

View File

@@ -18,7 +18,7 @@ export class ToolsComponent {
constructor(
private route: ActivatedRoute,
private organizationService: OrganizationService,
private messagingService: MessagingService
private messagingService: MessagingService,
) {}
ngOnInit() {

View File

@@ -21,7 +21,7 @@ export class UnsecuredWebsitesReportComponent extends BaseUnsecuredWebsitesRepor
modalService: ModalService,
private route: ActivatedRoute,
organizationService: OrganizationService,
passwordRepromptService: PasswordRepromptService
passwordRepromptService: PasswordRepromptService,
) {
super(cipherService, organizationService, modalService, passwordRepromptService);
}

View File

@@ -34,7 +34,7 @@ export class OrganizationVaultExportComponent extends ExportComponent {
userVerificationService: UserVerificationService,
formBuilder: UntypedFormBuilder,
fileDownloadService: FileDownloadService,
dialogService: DialogService
dialogService: DialogService,
) {
super(
cryptoService,
@@ -47,7 +47,7 @@ export class OrganizationVaultExportComponent extends ExportComponent {
userVerificationService,
formBuilder,
fileDownloadService,
dialogService
dialogService,
);
}
@@ -80,7 +80,7 @@ export class OrganizationVaultExportComponent extends ExportComponent {
EventType.Organization_ClientExportedVault,
null,
null,
this.organizationId
this.organizationId,
);
}
}

View File

@@ -26,14 +26,14 @@ export class WeakPasswordsReportComponent extends BaseWeakPasswordsReportCompone
modalService: ModalService,
private route: ActivatedRoute,
organizationService: OrganizationService,
passwordRepromptService: PasswordRepromptService
passwordRepromptService: PasswordRepromptService,
) {
super(
cipherService,
passwordStrengthService,
organizationService,
modalService,
passwordRepromptService
passwordRepromptService,
);
}

View File

@@ -41,7 +41,7 @@ export class EnrollMasterPasswordReset {
private syncService: SyncService,
private logService: LogService,
private organizationApiService: OrganizationApiServiceAbstraction,
private organizationUserService: OrganizationUserService
private organizationUserService: OrganizationUserService,
) {
this.organization = data.organization;
}
@@ -53,7 +53,7 @@ export class EnrollMasterPasswordReset {
await this.userVerificationService
.buildRequest(
this.formGroup.value.verification,
OrganizationUserResetPasswordEnrollmentRequest
OrganizationUserResetPasswordEnrollmentRequest,
)
.then(async (request) => {
// Set variables
@@ -78,7 +78,7 @@ export class EnrollMasterPasswordReset {
await this.organizationUserService.putOrganizationUserResetPasswordEnrollment(
this.organization.id,
this.organization.userId,
request
request,
);
await this.syncService.fullSync(true);

View File

@@ -14,7 +14,10 @@ export class ProvidersComponent implements OnInit {
loaded = false;
actionPromise: Promise<any>;
constructor(private providerService: ProviderService, private i18nService: I18nService) {}
constructor(
private providerService: ProviderService,
private i18nService: I18nService,
) {}
async ngOnInit() {
document.body.classList.remove("layout_frontend");

View File

@@ -43,7 +43,7 @@ export class SponsoredFamiliesComponent implements OnInit, OnDestroy {
private syncService: SyncService,
private organizationService: OrganizationService,
private formBuilder: FormBuilder,
private stateService: StateService
private stateService: StateService,
) {
this.sponsorshipForm = this.formBuilder.group<RequestSponsorshipForm>({
selectedSponsorshipOrgId: new FormControl("", {
@@ -61,7 +61,7 @@ export class SponsoredFamiliesComponent implements OnInit, OnDestroy {
async ngOnInit() {
this.availableSponsorshipOrgs$ = this.organizationService.organizations$.pipe(
map((orgs) => orgs.filter((o) => o.familySponsorshipAvailable))
map((orgs) => orgs.filter((o) => o.familySponsorshipAvailable)),
);
this.availableSponsorshipOrgs$.pipe(takeUntil(this._destroy)).subscribe((orgs) => {
@@ -75,7 +75,7 @@ export class SponsoredFamiliesComponent implements OnInit, OnDestroy {
this.anyOrgsAvailable$ = this.availableSponsorshipOrgs$.pipe(map((orgs) => orgs.length > 0));
this.activeSponsorshipOrgs$ = this.organizationService.organizations$.pipe(
map((orgs) => orgs.filter((o) => o.familySponsorshipFriendlyName !== null))
map((orgs) => orgs.filter((o) => o.familySponsorshipFriendlyName !== null)),
);
this.anyActiveSponsorships$ = this.activeSponsorshipOrgs$.pipe(map((orgs) => orgs.length > 0));
@@ -95,7 +95,7 @@ export class SponsoredFamiliesComponent implements OnInit, OnDestroy {
sponsoredEmail: this.sponsorshipForm.value.sponsorshipEmail,
planSponsorshipType: PlanSponsorshipType.FamiliesForEnterprise,
friendlyName: this.sponsorshipForm.value.sponsorshipEmail,
}
},
);
await this.formPromise;

View File

@@ -28,7 +28,7 @@
class="dropdown-item btn-submit"
[disabled]="$any(resendEmailBtn).loading"
(click)="resendEmail()"
[attr.aria-label]="'resendEmailLabel' | i18n : sponsoringOrg.familySponsorshipFriendlyName"
[attr.aria-label]="'resendEmailLabel' | i18n: sponsoringOrg.familySponsorshipFriendlyName"
>
<i class="bwi bwi-spinner bwi-spin" title="{{ 'loading' | i18n }}" aria-hidden="true"></i>
<span>{{ "resendEmail" | i18n }}</span>
@@ -40,7 +40,7 @@
class="dropdown-item text-danger btn-submit"
[disabled]="$any(revokeSponsorshipBtn).loading"
(click)="revokeSponsorship()"
[attr.aria-label]="'revokeAccount' | i18n : sponsoringOrg.familySponsorshipFriendlyName"
[attr.aria-label]="'revokeAccount' | i18n: sponsoringOrg.familySponsorshipFriendlyName"
>
<i class="bwi bwi-spinner bwi-spin" title="{{ 'loading' | i18n }}" aria-hidden="true"></i>
<span>{{ "remove" | i18n }}</span>

View File

@@ -32,7 +32,7 @@ export class SponsoringOrgRowComponent implements OnInit {
private i18nService: I18nService,
private logService: LogService,
private platformUtilsService: PlatformUtilsService,
private dialogService: DialogService
private dialogService: DialogService,
) {}
async ngOnInit() {
@@ -42,7 +42,7 @@ export class SponsoringOrgRowComponent implements OnInit {
this.isSelfHosted,
this.sponsoringOrg.familySponsorshipToDelete,
this.sponsoringOrg.familySponsorshipValidUntil,
this.sponsoringOrg.familySponsorshipLastSyncDate
this.sponsoringOrg.familySponsorshipLastSyncDate,
);
}
@@ -89,7 +89,7 @@ export class SponsoringOrgRowComponent implements OnInit {
selfHosted: boolean,
toDelete?: boolean,
validUntil?: Date,
lastSyncDate?: Date
lastSyncDate?: Date,
) {
/*
* Possible Statuses:
@@ -104,7 +104,7 @@ export class SponsoringOrgRowComponent implements OnInit {
// They want to delete but there is a valid until date which means there is an active sponsorship
this.statusMessage = this.i18nService.t(
"revokeWhenExpired",
formatDate(validUntil, "MM/dd/yyyy", this.locale)
formatDate(validUntil, "MM/dd/yyyy", this.locale),
);
this.statusClass = "text-danger";
} else if (toDelete) {