ESLint: fix no-negated-async violations

This commit is contained in:
Yury Bondarenko
2023-06-27 14:06:36 +02:00
parent fa2c22d240
commit 741c6009f4
78 changed files with 175 additions and 159 deletions

View File

@@ -47,7 +47,7 @@
<ds-themed-loading *ngIf="searching$ | async"></ds-themed-loading>
<ds-pagination
*ngIf="(pageInfoState$ | async)?.totalElements > 0 && !(searching$ | async)"
*ngIf="(pageInfoState$ | async)?.totalElements > 0 && (searching$ | async) === false"
[paginationOptions]="config"
[pageInfoState]="pageInfoState$"
[collectionSize]="(pageInfoState$ | async)?.totalElements"

View File

@@ -20,19 +20,19 @@
class="btn btn-outline-secondary"><i class="fas fa-arrow-left"></i> {{messagePrefix + '.return' | translate}}</button>
</div>
<div *ngIf="displayResetPassword" between class="btn-group">
<button class="btn btn-primary" [disabled]="!(canReset$ | async)" (click)="resetPassword()">
<button class="btn btn-primary" [disabled]="(canReset$ | async) === false" (click)="resetPassword()">
<i class="fa fa-key"></i> {{'admin.access-control.epeople.actions.reset' | translate}}
</button>
</div>
<div between class="btn-group ml-1">
<button *ngIf="!isImpersonated" class="btn btn-primary" [ngClass]="{'d-none' : !(canImpersonate$ | async)}" (click)="impersonate()">
<button *ngIf="!isImpersonated" class="btn btn-primary" [ngClass]="{'d-none' : (canImpersonate$ | async) === false}" (click)="impersonate()">
<i class="fa fa-user-secret"></i> {{'admin.access-control.epeople.actions.impersonate' | translate}}
</button>
<button *ngIf="isImpersonated" class="btn btn-primary" (click)="stopImpersonating()">
<i class="fa fa-user-secret"></i> {{'admin.access-control.epeople.actions.stop-impersonating' | translate}}
</button>
</div>
<button after class="btn btn-danger delete-button" [disabled]="!(canDelete$ | async)" (click)="delete()">
<button after class="btn btn-danger delete-button" [disabled]="(canDelete$ | async) === false" (click)="delete()">
<i class="fas fa-trash"></i> {{'admin.access-control.epeople.actions.delete' | translate}}
</button>
</ds-form>
@@ -42,13 +42,13 @@
<div *ngIf="epersonService.getActiveEPerson() | async">
<h5>{{messagePrefix + '.groupsEPersonIsMemberOf' | translate}}</h5>
<ds-themed-loading [showMessage]="false" *ngIf="!(groups | async)"></ds-themed-loading>
<ds-themed-loading [showMessage]="false" *ngIf="(groups$ | async) === undefined"></ds-themed-loading>
<ds-pagination
*ngIf="(groups | async)?.payload?.totalElements > 0"
*ngIf="(groups$ | async)?.payload?.totalElements > 0"
[paginationOptions]="config"
[pageInfoState]="(groups | async)?.payload"
[collectionSize]="(groups | async)?.payload?.totalElements"
[pageInfoState]="groupsPageInfoState$"
[collectionSize]="(groups$ | async)?.payload?.totalElements"
[hideGear]="true"
[hidePagerWhenSinglePage]="true"
(pageChange)="onPageChange($event)">
@@ -63,7 +63,7 @@
</tr>
</thead>
<tbody>
<tr *ngFor="let group of (groups | async)?.payload?.page">
<tr *ngFor="let group of (groups$ | async)?.payload?.page">
<td class="align-middle">{{group.id}}</td>
<td class="align-middle">
<a (click)="groupsDataService.startEditingNewGroup(group)"
@@ -79,7 +79,7 @@
</ds-pagination>
<div *ngIf="(groups | async)?.payload?.totalElements == 0" class="alert alert-info w-100 mb-2" role="alert">
<div *ngIf="(groups$ | async)?.payload?.totalElements == 0" class="alert alert-info w-100 mb-2" role="alert">
<div>{{messagePrefix + '.memberOfNoGroups' | translate}}</div>
<div>
<button [routerLink]="[groupsDataService.getGroupRegistryRouterLink()]"

View File

@@ -38,6 +38,7 @@ import { Registration } from '../../../core/shared/registration.model';
import { EpersonRegistrationService } from '../../../core/data/eperson-registration.service';
import { TYPE_REQUEST_FORGOT } from '../../../register-email-form/register-email-form.component';
import { DSONameService } from '../../../core/breadcrumbs/dso-name.service';
import { PageInfo } from '../../../core/shared/page-info.model';
@Component({
selector: 'ds-eperson-form',
@@ -145,7 +146,12 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
/**
* A list of all the groups this EPerson is a member of
*/
groups: Observable<RemoteData<PaginatedList<Group>>>;
groups$: Observable<RemoteData<PaginatedList<Group>>>;
/**
* The pagination of the {@link groups$} list.
*/
groupsPageInfoState$: Observable<PageInfo>;
/**
* Pagination config used to display the list of groups
@@ -279,7 +285,7 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
this.formGroup = this.formBuilderService.createFormGroup(this.formModel);
this.subs.push(this.epersonService.getActiveEPerson().subscribe((eperson: EPerson) => {
if (eperson != null) {
this.groups = this.groupsDataService.findListByHref(eperson._links.groups.href, {
this.groups$ = this.groupsDataService.findListByHref(eperson._links.groups.href, {
currentPage: 1,
elementsPerPage: this.config.pageSize
});
@@ -302,7 +308,7 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
const activeEPerson$ = this.epersonService.getActiveEPerson();
this.groups = activeEPerson$.pipe(
this.groups$ = activeEPerson$.pipe(
switchMap((eperson) => {
return observableCombineLatest([observableOf(eperson), this.paginationService.getFindListOptions(this.config.id, {
currentPage: 1,
@@ -317,6 +323,10 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
})
);
this.groupsPageInfoState$ = this.groups$.pipe(
map(groupsRD => groupsRD.payload.pageInfo),
);
this.canImpersonate$ = activeEPerson$.pipe(
switchMap((eperson) => {
if (hasValue(eperson)) {
@@ -578,7 +588,7 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
*/
private updateGroups(options) {
this.subs.push(this.epersonService.getActiveEPerson().subscribe((eperson: EPerson) => {
this.groups = this.groupsDataService.findListByHref(eperson._links.groups.href, options);
this.groups$ = this.groupsDataService.findListByHref(eperson._links.groups.href, options);
}));
}
}

View File

@@ -25,7 +25,7 @@
<ds-alert *ngIf="groupBeingEdited?.permanent" [type]="AlertTypeEnum.Warning"
[content]="messagePrefix + '.alert.permanent'"></ds-alert>
<ds-alert *ngIf="!(canEdit$ | async) && (groupDataService.getActiveGroup() | async)" [type]="AlertTypeEnum.Warning"
<ds-alert *ngIf="(canEdit$ | async) === false && (groupDataService.getActiveGroup() | async)" [type]="AlertTypeEnum.Warning"
[content]="(messagePrefix + '.alert.workflowGroup' | translate:{ name: dsoNameService.getName((getLinkedDSO(groupBeingEdited) | async)?.payload), comcol: (getLinkedDSO(groupBeingEdited) | async)?.payload?.type, comcolEditRolesRoute: (getLinkedEditRolesRoute(groupBeingEdited) | async) })">
</ds-alert>
@@ -40,7 +40,7 @@
class="btn btn-outline-secondary"><i class="fas fa-arrow-left"></i> {{messagePrefix + '.return' | translate}}</button>
</div>
<div after *ngIf="groupBeingEdited != null" class="btn-group">
<button class="btn btn-danger delete-button" [disabled]="!(canEdit$ | async) || groupBeingEdited.permanent"
<button class="btn btn-danger delete-button" [disabled]="(canEdit$ | async) === false || groupBeingEdited.permanent"
(click)="delete()">
<i class="fa fa-trash"></i> {{ messagePrefix + '.actions.delete' | translate}}
</button>

View File

@@ -62,7 +62,7 @@
<td class="align-middle">{{ dsoNameService.getName((group.object | async)?.payload) }}</td>
<td class="align-middle">
<div class="btn-group edit-field">
<button *ngIf="(isSubgroupOfGroup(group) | async) && !(isActiveGroup(group) | async)"
<button *ngIf="(isSubgroupOfGroup(group) | async) && (isActiveGroup(group) | async) === false"
(click)="deleteSubgroupFromGroup(group)"
class="btn btn-outline-danger btn-sm deleteButton"
title="{{messagePrefix + '.table.edit.buttons.remove' | translate: { name: dsoNameService.getName(group) } }}">
@@ -71,7 +71,7 @@
<span *ngIf="(isActiveGroup(group) | async)">{{ messagePrefix + '.table.edit.currentGroup' | translate }}</span>
<button *ngIf="!(isSubgroupOfGroup(group) | async) && !(isActiveGroup(group) | async)"
<button *ngIf="(isSubgroupOfGroup(group) | async) === false && (isActiveGroup(group) | async) === false"
(click)="addSubgroupToGroup(group)"
class="btn btn-outline-primary btn-sm addButton"
title="{{messagePrefix + '.table.edit.buttons.add' | translate: { name: dsoNameService.getName(group) } }}">
@@ -94,7 +94,7 @@
<ds-pagination *ngIf="(subGroups$ | async)?.payload?.totalElements > 0"
[paginationOptions]="config"
[pageInfoState]="(subGroups$ | async)?.payload"
[pageInfoState]="subGroupsPageInfoState$"
[collectionSize]="(subGroups$ | async)?.payload?.totalElements"
[hideGear]="true"
[hidePagerWhenSinglePage]="true">

View File

@@ -19,6 +19,7 @@ import { NoContent } from '../../../../core/shared/NoContent.model';
import { PaginationService } from '../../../../core/pagination/pagination.service';
import { followLink } from '../../../../shared/utils/follow-link-config.model';
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
import { PageInfo } from '../../../../core/shared/page-info.model';
/**
* Keys to keep track of specific subscriptions
@@ -50,6 +51,8 @@ export class SubgroupsListComponent implements OnInit, OnDestroy {
*/
subGroups$: BehaviorSubject<RemoteData<PaginatedList<Group>>> = new BehaviorSubject(undefined);
subGroupsPageInfoState$: Observable<PageInfo>;
/**
* Map of active subscriptions
*/
@@ -105,6 +108,9 @@ export class SubgroupsListComponent implements OnInit, OnDestroy {
this.retrieveSubGroups();
}
}));
this.subGroupsPageInfoState$ = this.subGroups$.pipe(
map(subGroupsRD => subGroupsRD?.payload?.pageInfo),
);
}
/**

View File

@@ -35,7 +35,7 @@
<ds-themed-loading *ngIf="loading$ | async"></ds-themed-loading>
<ds-pagination
*ngIf="(pageInfoState$ | async)?.totalElements > 0 && !(loading$ | async)"
*ngIf="(pageInfoState$ | async)?.totalElements > 0 && (loading$ | async) === false"
[paginationOptions]="config"
[pageInfoState]="pageInfoState$"
[collectionSize]="(pageInfoState$ | async)?.totalElements"

View File

@@ -1,7 +1,7 @@
<nav class="navbar navbar-dark p-0"
[ngClass]="{'active': sidebarOpen, 'inactive': sidebarClosed}"
[@slideSidebar]="{
value: (!(sidebarExpanded | async) ? 'collapsed' : 'expanded'),
value: ((sidebarExpanded | async) === false ? 'collapsed' : 'expanded'),
params: {sidebarWidth: (sidebarWidth | async)}
}" (@slideSidebar.done)="finishSlide($event)" (@slideSidebar.start)="startSlide($event)"
*ngIf="menuVisible | async"
@@ -42,12 +42,12 @@
<div class="shortcut-icon">
<i *ngIf="(menuCollapsed | async)" class="fas fa-fw fa-angle-double-right"
[title]="'menu.section.icon.pin' | translate"></i>
<i *ngIf="!(menuCollapsed | async)" class="fas fa-fw fa-angle-double-left"
<i *ngIf="(menuCollapsed | async) === false" class="fas fa-fw fa-angle-double-left"
[title]="'menu.section.icon.unpin' | translate"></i>
</div>
<div class="sidebar-collapsible">
<span *ngIf="menuCollapsed | async" class="section-header-text">{{'menu.section.pin' | translate }}</span>
<span *ngIf="!(menuCollapsed | async)" class="section-header-text">{{'menu.section.unpin' | translate }}</span>
<span *ngIf="(menuCollapsed | async) === false" class="section-header-text">{{'menu.section.unpin' | translate }}</span>
</div>
</a>
</div>

View File

@@ -11,7 +11,7 @@
</button>
<button class="btn btn-danger" (click)="onConfirm(dso)" [disabled]="(processing$ | async)">
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'collection.delete.processing' | translate}}</span>
<span *ngIf="!(processing$ | async)"><i class="fas fa-trash"></i> {{'collection.delete.confirm' | translate}}</span>
<span *ngIf="(processing$ | async) === false"><i class="fas fa-trash"></i> {{'collection.delete.confirm' | translate}}</span>
</button>
</div>
</div>

View File

@@ -18,7 +18,7 @@
<span>{{contentSource?.message ? contentSource?.message: 'collection.source.controls.harvest.no-information'|translate }}</span>
</div>
<button *ngIf="!(testConfigRunning$ |async)" class="btn btn-secondary"
<button *ngIf="(testConfigRunning$ |async) === false" class="btn btn-secondary"
[disabled]="!(isEnabled)"
(click)="testConfiguration(contentSource)">
<span>{{'collection.source.controls.test.submit' | translate}}</span>
@@ -28,7 +28,7 @@
<span class="spinner-border spinner-border-sm spinner-button" role="status" aria-hidden="true"></span>
<span>{{'collection.source.controls.test.running' | translate}}</span>
</button>
<button *ngIf="!(importRunning$ |async)" class="btn btn-primary"
<button *ngIf="(importRunning$ |async) === false" class="btn btn-primary"
[disabled]="!(isEnabled)"
(click)="importNow()">
<span class="d-none d-sm-inline">{{'collection.source.controls.import.submit' | translate}}</span>
@@ -38,7 +38,7 @@
<span class="spinner-border spinner-border-sm spinner-button" role="status" aria-hidden="true"></span>
<span class="d-none d-sm-inline">{{'collection.source.controls.import.running' | translate}}</span>
</button>
<button *ngIf="!(reImportRunning$ |async)" class="btn btn-primary"
<button *ngIf="(reImportRunning$ |async) === false" class="btn btn-primary"
[disabled]="!(isEnabled)"
(click)="resetAndReimport()">
<span class="d-none d-sm-inline">&nbsp;{{'collection.source.controls.reset.submit' | translate}}</span>

View File

@@ -1,7 +1,7 @@
<div class="container-fluid">
<div class="d-inline-block float-right space-children-mr">
<button class=" btn btn-danger" *ngIf="!(isReinstatable() | async)"
[disabled]="!(hasChanges() | async)"
<button class=" btn btn-danger" *ngIf="(isReinstatable() | async) === false"
[disabled]="(hasChanges() | async) === false"
(click)="discard()"><i
class="fas fa-times"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.discard-button" | translate}}</span>
@@ -12,7 +12,7 @@
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.reinstate-button" | translate}}</span>
</button>
<button class="btn btn-primary"
[disabled]="!(hasChanges() | async) || !isValid() || (initialHarvestType === harvestTypeNone && contentSource.harvestType === initialHarvestType)"
[disabled]="(hasChanges() | async) === false || !isValid() || (initialHarvestType === harvestTypeNone && contentSource.harvestType === initialHarvestType)"
(click)="onSubmit()"><i
class="fas fa-save"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.save-button" | translate}}</span>
@@ -44,8 +44,8 @@
<div class="row">
<div class="col-12">
<div class="d-inline-block float-right ml-1 space-children-mr">
<button class=" btn btn-danger" *ngIf="!(isReinstatable() | async)"
[disabled]="!(hasChanges() | async)"
<button class=" btn btn-danger" *ngIf="(isReinstatable() | async) === false"
[disabled]="(hasChanges() | async) === false"
(click)="discard()"><i
class="fas fa-times"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.discard-button" | translate}}</span>
@@ -56,7 +56,7 @@
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.reinstate-button" | translate}}</span>
</button>
<button class="btn btn-primary"
[disabled]="!(hasChanges() | async) || !isValid() || (initialHarvestType === harvestTypeNone && contentSource.harvestType === initialHarvestType)"
[disabled]="(hasChanges() | async) === false || !isValid() || (initialHarvestType === harvestTypeNone && contentSource.harvestType === initialHarvestType)"
(click)="onSubmit()"><i
class="fas fa-save"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.save-button" | translate}}</span>
@@ -66,7 +66,7 @@
</div>
</div>
<ds-collection-source-controls
[isEnabled]="!(hasChanges()|async)"
[isEnabled]="(hasChanges() | async) === false"
[shouldShow]="contentSource?.harvestType !== harvestTypeNone"
[collection]="(collectionRD$ |async)?.payload"
>

View File

@@ -11,7 +11,7 @@
</button>
<button class="btn btn-danger" (click)="onConfirm(dso)" [disabled]="(processing$ | async)">
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'community.delete.processing' | translate}}</span>
<span *ngIf="!(processing$ | async)"><i class="fas fa-trash"></i> {{'community.delete.confirm' | translate}}</span>
<span *ngIf="(processing$ | async) === false"><i class="fas fa-trash"></i> {{'community.delete.confirm' | translate}}</span>
</button>
</div>
</div>

View File

@@ -1,4 +1,4 @@
<div [ngClass]="{'open': !(isNavBarCollapsed | async)}">
<div [ngClass]="{'open': (isNavBarCollapsed | async) === false}">
<ds-themed-header></ds-themed-header>
<ds-themed-navbar></ds-themed-navbar>
</div>

View File

@@ -21,7 +21,7 @@
</ul>
<div [ngbNavOutlet]="nav" class="mt-2"></div>
</div>
<ds-alert *ngIf="!(healthResponse | async) || !(healthInfoResponse | async)" [type]="'alert-danger'" [content]="'health-page.error.msg'"></ds-alert>
<ds-alert *ngIf="(healthResponse | async) === null || (healthInfoResponse | async) === null" [type]="'alert-danger'" [content]="'health-page.error.msg'"></ds-alert>
</div>

View File

@@ -12,7 +12,7 @@
{{'item.edit.tabs.' + page.page + '.head' | translate}}
</a>
<span [ngbTooltip]="'item.edit.tabs.disabled.tooltip' | translate">
<button *ngIf="!(page.enabled | async)"
<button *ngIf="(page.enabled | async) === false"
class="nav-link disabled">
{{'item.edit.tabs.' + page.page + '.head' | translate}}
</button>

View File

@@ -10,13 +10,13 @@
class="fas fa-undo-alt"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.bitstreams.reinstate-button" | translate}}</span>
</button>
<button class="btn btn-primary" [disabled]="!(hasChanges() | async) || submitting"
<button class="btn btn-primary" [disabled]="(hasChanges() | async) === false || submitting"
(click)="submit()"><i
class="fas fa-save"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.bitstreams.save-button" | translate}}</span>
</button>
<button class="btn btn-danger" *ngIf="!(isReinstatable() | async)"
[disabled]="!(hasChanges() | async) || submitting"
<button class="btn btn-danger" *ngIf="(isReinstatable() | async) === false"
[disabled]="(hasChanges() | async) === false || submitting"
(click)="discard()"><i
class="fas fa-times"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.bitstreams.discard-button" | translate}}</span>
@@ -53,13 +53,13 @@
class="fas fa-undo-alt"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.bitstreams.reinstate-button" | translate}}</span>
</button>
<button class="btn btn-primary" [disabled]="!(hasChanges() | async) || submitting"
<button class="btn btn-primary" [disabled]="(hasChanges() | async) === false || submitting"
(click)="submit()"><i
class="fas fa-save"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.bitstreams.save-button" | translate}}</span>
</button>
<button class="btn btn-danger" *ngIf="!(isReinstatable() | async)"
[disabled]="!(hasChanges() | async) || submitting"
<button class="btn btn-danger" *ngIf="(isReinstatable() | async) === false"
[disabled]="(hasChanges() | async) === false || submitting"
(click)="discard()"><i
class="fas fa-times"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.bitstreams.discard-button" | translate}}</span>

View File

@@ -5,7 +5,7 @@
[paginationOptions]="options"
[pageInfoState]="(objectsRD$ | async)?.payload"
[collectionSize]="(objectsRD$ | async)?.payload?.totalElements">
<ng-container *ngIf="!(loading$ | async)">
<ng-container *ngIf="(loading$ | async) === false">
<div [id]="bundle.id" class="bundle-bitstreams-list"
[ngClass]="{'mb-3': (objectsRD$ | async)?.payload?.totalElements > pageSize}"
*ngVar="(updates$ | async) as updates" cdkDropList (cdkDropListDropped)="drop($event)">

View File

@@ -6,7 +6,7 @@
</button>
</h5>
<ng-container *ngVar="updates$ | async as updates">
<ng-container *ngIf="updates && !(loading$ | async)">
<ng-container *ngIf="updates && (loading$ | async) === false">
<ng-container *ngVar="updates | dsObjectValues as updateValues">
<ds-pagination
[paginationOptions]="paginationConfig"

View File

@@ -2,8 +2,8 @@
<ng-container *ngVar="entityType$ | async as entityType">
<ng-container *ngIf="entityType">
<div class="button-row top d-flex space-children-mr">
<button class="btn btn-danger ml-auto" *ngIf="!(isReinstatable() | async)"
[disabled]="!(hasChanges() | async)"
<button class="btn btn-danger ml-auto" *ngIf="(isReinstatable() | async) === false"
[disabled]="(hasChanges() | async) === false"
(click)="discard()"><i
class="fas fa-times"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.discard-button" | translate}}</span>
@@ -13,7 +13,7 @@
class="fas fa-undo-alt"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.reinstate-button" | translate}}</span>
</button>
<button class="btn btn-primary" [disabled]="!(hasChanges() | async)"
<button class="btn btn-primary" [disabled]="(hasChanges() | async) === false"
(click)="submit()"><i
class="fas fa-save"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.save-button" | translate}}</span>
@@ -36,8 +36,8 @@
</ng-container>
<div class="button-row bottom">
<div class="float-right space-children-mr ml-gap">
<button class="btn btn-danger" *ngIf="!(isReinstatable() | async)"
[disabled]="!(hasChanges() | async)"
<button class="btn btn-danger" *ngIf="(isReinstatable() | async) === false"
[disabled]="(hasChanges() | async) === false"
(click)="discard()"><i
class="fas fa-times"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.discard-button" | translate}}</span>
@@ -47,7 +47,7 @@
class="fas fa-undo-alt"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.reinstate-button" | translate}}</span>
</button>
<button class="btn btn-primary" [disabled]="!(hasChanges() | async)"
<button class="btn btn-primary" [disabled]="(hasChanges() | async) === false"
(click)="submit()"><i
class="fas fa-save"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.save-button" | translate}}</span>

View File

@@ -10,7 +10,7 @@
</div>
<a
*ngIf="!(isLoading$ | async) && (hasMore$ | async)"
*ngIf="(isLoading$ | async) === false && (hasMore$ | async)"
(click)="$event.preventDefault(); handleLoadMore()"
class="load-more-btn btn btn-sm btn-outline-secondary"
role="button"

View File

@@ -25,7 +25,7 @@
<div class="card-header">{{ 'person.page.orcid.missing-authorizations'| translate }}</div>
<div class="card-body">
<div class="container">
<ds-alert *ngIf="!(hasMissingOrcidAuthorizations() | async)" [type]="'alert-success'" data-test="noMissingOrcidAuthorizations">
<ds-alert *ngIf="(hasMissingOrcidAuthorizations() | async) === false" [type]="'alert-success'" data-test="noMissingOrcidAuthorizations">
{{'person.page.orcid.no-missing-authorizations-message' | translate}}
</ds-alert>
<ds-alert *ngIf="(hasMissingOrcidAuthorizations() | async)" [type]="'alert-warning'" data-test="missingOrcidAuthorizations">
@@ -41,7 +41,7 @@
</div>
</div>
</div>
<ds-alert *ngIf="(onlyAdminCanDisconnectProfileFromOrcid() | async) && !(ownerCanDisconnectProfileFromOrcid() | async)"
<ds-alert *ngIf="(onlyAdminCanDisconnectProfileFromOrcid() | async) && (ownerCanDisconnectProfileFromOrcid() | async) === false"
[type]="'alert-warning'" data-test="unlinkOnlyAdmin">
{{ 'person.page.orcid.remove-orcid-message' | translate}}
</ds-alert>
@@ -49,7 +49,7 @@
<div class="col">
<button type="submit" class="btn btn-danger float-right" (click)="unlinkOrcid()"
[disabled]="(unlinkProcessing | async)">
<span *ngIf="!(unlinkProcessing | async)"><i
<span *ngIf="(unlinkProcessing | async) === false"><i
class="fas fa-unlink"></i> {{ 'person.page.orcid.unlink' | translate }}</span>
<span *ngIf="(unlinkProcessing | async)"><i
class='fas fa-circle-notch fa-spin'></i> {{'person.page.orcid.unlink.processing' | translate}}</span>

View File

@@ -1,4 +1,4 @@
<div *ngIf="!(processingConnection | async) && (item | async)" class="container">
<div *ngIf="(processingConnection | async) === false && (item | async)" class="container">
<div class="button-row bottom mb-3">
<div class="text-right">
<a [routerLink]="getItemPage()" role="button" class="btn btn-outline-secondary" data-test="back-button">
@@ -9,10 +9,10 @@
</div>
<ds-loading *ngIf="(processingConnection | async)" [message]="'person.page.orcid.link.processing' | translate"></ds-loading>
<div class="container" *ngIf="!(processingConnection | async) && !(connectionStatus | async)" data-test="error-box">
<div class="container" *ngIf="(processingConnection | async) === false && (connectionStatus | async) === false" data-test="error-box">
<ds-alert [type]="'alert-danger'">{{'person.page.orcid.link.error.message' | translate}}</ds-alert>
</div>
<ng-container *ngIf="!(processingConnection | async) && (item | async) && (connectionStatus | async)" >
<ng-container *ngIf="(processingConnection | async) === false && (item | async) && (connectionStatus | async)" >
<ds-orcid-auth [item]="(item | async)" (unlink)="updateItem()" data-test="orcid-auth"></ds-orcid-auth>
<ds-orcid-sync-setting *ngIf="isLinkedToOrcid()" [item]="(item | async)" (settingsUpdated)="updateItem()" data-test="orcid-sync-setting"></ds-orcid-sync-setting>
<ds-orcid-queue *ngIf="isLinkedToOrcid()" [item]="(item | async)"></ds-orcid-queue>

View File

@@ -3,11 +3,11 @@
<div class="container">
<h2>{{ 'person.orcid.registry.queue' | translate }}</h2>
<ds-alert *ngIf="!(processing$ | async) && (getList() | async)?.payload?.totalElements == 0"
<ds-alert *ngIf="(processing$ | async) === false && (getList() | async)?.payload?.totalElements == 0"
[type]="AlertTypeEnum.Info">
{{ 'person.page.orcid.sync-queue.empty-message' | translate}}
</ds-alert>
<ds-pagination *ngIf="!(processing$ | async) && (getList() | async)?.payload?.totalElements > 0"
<ds-pagination *ngIf="(processing$ | async) === false && (getList() | async)?.payload?.totalElements > 0"
[paginationOptions]="paginationOptions"
[collectionSize]="(getList() | async)?.payload?.totalElements"
[retainScrollPosition]="false" [hideGear]="true" (paginationChange)="updateList()">

View File

@@ -1,4 +1,4 @@
<div *ngIf="!(this.submitted$ | async); else waiting">
<div *ngIf="(this.submitted$ | async) === false; else waiting">
<div class="modal-header">{{'item.version.create.modal.header' | translate}}
<button type="button" class="close" (click)="onModalClose()" aria-label="Close">
<span aria-hidden="true">×</span>

View File

@@ -1,5 +1,5 @@
<div class="add" *ngIf="!(moreThanOne$ | async)">
<button class="btn btn-lg btn-outline-primary mt-1 ml-2" [disabled]="!(initialized$|async)"
<div class="add" *ngIf="(moreThanOne$ | async) === false">
<button class="btn btn-lg btn-outline-primary mt-1 ml-2" [disabled]="(initialized$ | async) === false"
(click)="openPage(singleEntity)" role="button"
title="{{'mydspace.new-submission-external' | translate}}">
<i class="fa fa-file-import" aria-hidden="true"></i>
@@ -9,7 +9,7 @@
ngbDropdown
*ngIf="(moreThanOne$ | async)">
<button class="btn btn-lg btn-outline-primary mt-1 ml-2" id="dropdownImport" ngbDropdownToggle
type="button" [disabled]="!(initialized$|async)"
type="button" [disabled]="(initialized$ | async) === false"
attr.aria-label="{{'mydspace.new-submission-external' | translate}}"
[attr.data-test]="'import-dropdown' | dsBrowserOnly"
title="{{'mydspace.new-submission-external' | translate}}">

View File

@@ -1,5 +1,5 @@
<div class="add" *ngIf="!(moreThanOne$ | async)">
<button class="btn btn-lg btn-primary mt-1 ml-2" [disabled]="!(initialized$|async)" (click)="openDialog(singleEntity)" role="button">
<div class="add" *ngIf="(moreThanOne$ | async) === false">
<button class="btn btn-lg btn-primary mt-1 ml-2" [disabled]="(initialized$ | async) === false" (click)="openDialog(singleEntity)" role="button">
<i class="fa fa-plus-circle" aria-hidden="true"></i>
</button>
</div>
@@ -7,7 +7,7 @@
ngbDropdown
*ngIf="(moreThanOne$ | async)">
<button class="btn btn-lg btn-primary mt-1 ml-2" id="dropdownSubmission" ngbDropdownToggle
type="button" [disabled]="!(initialized$|async)"
type="button" [disabled]="(initialized$ | async) === false"
attr.aria-label="{{'mydspace.new-submission' | translate}}"
[attr.data-test]="'submission-dropdown' | dsBrowserOnly"
title="{{'mydspace.new-submission' | translate}}">

View File

@@ -1,7 +1,7 @@
<nav [ngClass]="{'open': !(menuCollapsed | async)}" [@slideMobileNav]="!(windowService.isXsOrSm() | async) ? 'default' : ((menuCollapsed | async) ? 'collapsed' : 'expanded')"
<nav [ngClass]="{'open': (menuCollapsed | async) === false}" [@slideMobileNav]="(windowService.isXsOrSm() | async) === false ? 'default' : ((menuCollapsed | async) ? 'collapsed' : 'expanded')"
class="navbar navbar-light navbar-expand-md p-md-0 navbar-container" role="navigation" [attr.aria-label]="'nav.main.description' | translate">
<!-- TODO remove navbar-container class when https://github.com/twbs/bootstrap/issues/24726 is fixed -->
<div class="navbar-inner-container w-100" [class.container]="!(isXsOrSm$ | async)">
<div class="navbar-inner-container w-100" [class.container]="(isXsOrSm$ | async) === false">
<div class="reset-padding-md w-100">
<div id="collapsingNav">
<ul class="navbar-nav navbar-navigation mr-auto shadow-none">

View File

@@ -55,8 +55,8 @@
message="{{ 'process.detail.logs.loading' | translate }}"></ds-themed-loading>
<pre class="font-weight-bold text-secondary bg-light p-3"
*ngIf="showOutputLogs && (outputLogs$ | async)?.length > 0">{{ (outputLogs$ | async) }}</pre>
<p id="no-output-logs-message" *ngIf="(!(retrievingOutputLogs$ | async) && showOutputLogs)
&& !(outputLogs$ | async) || (outputLogs$ | async)?.length == 0 || !process._links.output">
<p id="no-output-logs-message" *ngIf="((retrievingOutputLogs$ | async) === false && showOutputLogs)
&& (outputLogs$ | async) === null || (outputLogs$ | async)?.length === 0 || !process._links.output">
{{ 'process.detail.logs.none' | translate }}
</p>
</ds-process-detail-field>

View File

@@ -1,6 +1,6 @@
<ng-container *ngIf="fromExisting$ && (fromExisting$ | async)">
<ds-process-form *ngVar="fromExisting$ | async as process" headerKey="process.new.header" [selectedScript]="script$ | async" [parameters]="process.parameters"></ds-process-form>
</ng-container>
<ng-container *ngIf="!fromExisting$ || !(fromExisting$ | async)">
<ng-container *ngIf="!fromExisting$ || (fromExisting$ | async) === null">
<ds-process-form headerKey="process.new.header"></ds-process-form>
</ng-container>

View File

@@ -70,7 +70,7 @@
</div>
<div class="modal-body">
<div *ngIf="!(processBulkDeleteService.isProcessing$() |async)">{{'process.overview.delete.body' | translate: {count: processBulkDeleteService.getAmountOfSelectedProcesses()} }}</div>
<div *ngIf="(processBulkDeleteService.isProcessing$() | async) === false">{{'process.overview.delete.body' | translate: {count: processBulkDeleteService.getAmountOfSelectedProcesses()} }}</div>
<div *ngIf="processBulkDeleteService.isProcessing$() |async" class="alert alert-info">
<span class="spinner-border spinner-border-sm spinner-button" role="status" aria-hidden="true"></span>
<span> {{ 'process.overview.delete.processing' | translate: {count: processBulkDeleteService.getAmountOfSelectedProcesses()} }}</span>

View File

@@ -18,7 +18,7 @@
<span *ngIf="(isProcessingCreate() | async)">
<i class='fas fa-circle-notch fa-spin'></i> {{'researcher.profile.action.processing' | translate}}
</span>
<span *ngIf="!(isProcessingCreate() | async)">
<span *ngIf="(isProcessingCreate() | async) === false">
<i class="fas fa-plus"></i> &nbsp;{{'researcher.profile.create.new' | translate}}
</span>
</button>
@@ -30,7 +30,7 @@
<span *ngIf="(isProcessingDelete() | async)">
<i class='fas fa-circle-notch fa-spin'></i> {{'researcher.profile.action.processing' | translate}}
</span>
<span *ngIf="!(isProcessingDelete() | async)">
<span *ngIf="(isProcessingDelete() | async) === false">
<i class="fas fa-trash-alt"></i> &nbsp;{{'researcher.profile.delete' | translate}}
</span>
</button>

View File

@@ -47,7 +47,7 @@
(showNotification)="showNotification($event)"></ds-google-recaptcha>
</div>
<ng-container *ngIf="!((googleRecaptchaService.captchaVersion() | async) === 'v2' && (googleRecaptchaService.captchaMode() | async) === 'invisible'); else v2Invisible">
<ng-container *ngIf="((googleRecaptchaService.captchaVersion() | async) !== 'v2' && (googleRecaptchaService.captchaMode() | async) === 'invisible'); else v2Invisible">
<button class="btn btn-primary" [disabled]="form.invalid || registrationVerification && !isRecaptchaCookieAccepted() || disableUntilChecked" (click)="register()">
{{ MESSAGE_PREFIX + '.submit' | translate }}
</button>

View File

@@ -1,5 +1,5 @@
<div class="outer-wrapper" [class.d-none]="shouldShowFullscreenLoader" [@slideSidebarPadding]="{
value: (!(sidebarVisible | async) ? 'hidden' : (slideSidebarOver | async) ? 'shown' : 'expanded'),
value: ((sidebarVisible | async) === false ? 'hidden' : (slideSidebarOver | async) ? 'shown' : 'expanded'),
params: {collapsedSidebarWidth: (collapsedSidebarWidth | async), totalSidebarWidth: (totalSidebarWidth | async)}
}">
<ds-themed-admin-sidebar></ds-themed-admin-sidebar>

View File

@@ -1,5 +1,5 @@
<ul class="navbar-nav" [ngClass]="{'mr-auto': (isXsOrSm$ | async)}">
<li *ngIf="!(isAuthenticated | async) && !(isXsOrSm$ | async) && (showAuth | async)" class="nav-item"
<li *ngIf="(isAuthenticated | async) === false && (isXsOrSm$ | async) === false && (showAuth | async)" class="nav-item"
(click)="$event.stopPropagation();">
<div ngbDropdown #loginDrop display="dynamic" placement="bottom-right" class="d-inline-block" @fadeInOut>
<a href="javascript:void(0);" class="dropdownLogin px-1" [attr.aria-label]="'nav.login' |translate"
@@ -12,12 +12,12 @@
</div>
</div>
</li>
<li *ngIf="!(isAuthenticated | async) && (isXsOrSm$ | async)" class="nav-item">
<li *ngIf="(isAuthenticated | async) === false && (isXsOrSm$ | async)" class="nav-item">
<a routerLink="/login" routerLinkActive="active" class="loginLink px-1">
{{ 'nav.login' | translate }}<span class="sr-only">(current)</span>
</a>
</li>
<li *ngIf="(isAuthenticated | async) && !(isXsOrSm$ | async) && (showAuth | async)" class="nav-item">
<li *ngIf="(isAuthenticated | async) && (isXsOrSm$ | async) === false && (showAuth | async)" class="nav-item">
<div ngbDropdown display="dynamic" placement="bottom-right" class="d-inline-block" @fadeInOut>
<a href="javascript:void(0);" role="button" [attr.aria-label]="'nav.user-profile-menu-and-logout' |translate" (click)="$event.preventDefault()" [title]="'nav.user-profile-menu-and-logout' | translate" class="dropdownLogout px-1" [attr.data-test]="'user-menu' | dsBrowserOnly" ngbDropdownToggle>
<i class="fas fa-user-circle fa-lg fa-fw"></i></a>

View File

@@ -1,5 +1,5 @@
<ds-themed-loading *ngIf="(loading$ | async)"></ds-themed-loading>
<div *ngIf="!(loading$ | async)">
<div *ngIf="(loading$ | async) === false">
<span class="dropdown-item-text" [class.pl-0]="inExpandableNavbar">
{{dsoNameService.getName(user$ | async)}}<br>
<span class="text-muted">{{(user$ | async)?.email}}</span>

View File

@@ -18,7 +18,7 @@
[scrollWindow]="false"
(scrolled)="onScrollDown()">
<li class="dropdown-item disabled" *ngIf="searchListCollection?.length == 0 && !(isLoading | async)">
<li class="dropdown-item disabled" *ngIf="searchListCollection?.length == 0 && (isLoading | async) === false">
{{'submission.sections.general.no-collection' | translate}}
</li>
<ng-container *ngIf="searchListCollection?.length > 0">

View File

@@ -13,7 +13,7 @@
<div class="d-flex flex-md-row justify-content-between flex-column">
<div class="w-100 d-flex align-items-center">
<ds-themed-loading *ngIf="!(groupRD$ | async)"></ds-themed-loading>
<ds-themed-loading *ngIf="(groupRD$ | async) === null"></ds-themed-loading>
<div *ngIf="hasNoGroup$ | async">
{{'comcol-role.edit.no-group' | translate}}
</div>

View File

@@ -9,7 +9,7 @@
[fromRoot]="true"
[scrollWindow]="false"
(scrolled)="onScrollDown()">
<button class="dropdown-item disabled" *ngIf="searchListEntity?.length == 0 && !(isLoadingList | async)">
<button class="dropdown-item disabled" *ngIf="searchListEntity?.length == 0 && (isLoadingList | async) === false">
{{'submission.sections.general.no-entity' | translate}}
</button>
<button *ngFor="let listItem of searchListEntity"

View File

@@ -1,5 +1,5 @@
<a [routerLink]="(bitstreamPath$| async)?.routerLink" class="dont-break-out" [queryParams]="(bitstreamPath$| async)?.queryParams" [target]="isBlank ? '_blank': '_self'" [ngClass]="cssClasses">
<span *ngIf="!(canDownload$ |async)" class="pr-1"><i class="fas fa-lock"></i></span>
<span *ngIf="(canDownload$ | async) === false" class="pr-1"><i class="fas fa-lock"></i></span>
<ng-container *ngTemplateOutlet="content"></ng-container>
</a>

View File

@@ -1,6 +1,6 @@
<div class="d-flex">
<span class="mr-auto text-contents">
<ng-container *ngIf="!(metadataRepresentation$ | async)">
<ng-container *ngIf="(metadataRepresentation$ | async) === undefined">
<ds-themed-loading [showMessage]="false"></ds-themed-loading>
</ng-container>
<ng-container *ngIf="(metadataRepresentation$ | async)">

View File

@@ -1,6 +1,6 @@
<div class="d-flex">
<div class="flex-grow-1 mr-auto">
<ng-container *ngIf="!(relatedItem$ | async)">
<ng-container *ngIf="(relatedItem$ | async) === undefined">
<ds-themed-loading [showMessage]="false"></ds-themed-loading>
</ng-container>
<ng-container *ngIf="(relatedItem$ | async)">

View File

@@ -20,7 +20,7 @@
</ul>
</ng-template>
<div *ngIf="!(isHierarchicalVocabulary() | async)" class="position-relative right-addon">
<div *ngIf="(isHierarchicalVocabulary() | async) === false" class="position-relative right-addon">
<i *ngIf="searching" class="fas fa-circle-notch fa-spin fa-2x fa-fw text-primary position-absolute mt-1 p-0" aria-hidden="true"></i>
<i *ngIf="!searching"
dsAuthorityConfidenceState

View File

@@ -1,4 +1,4 @@
<a *ngIf="!(formCollapsed | async)"
<a *ngIf="(formCollapsed | async) === false"
class="close position-relative"
ngbTooltip="{{'form.group-collapse-help' | translate}}"
placement="left">
@@ -16,7 +16,7 @@
</a>
<div class="pt-2" [ngClass]="{'border-top': !showErrorMessages, 'border border-danger': showErrorMessages}">
<div *ngIf="!(formCollapsed | async)" class="pl-2 row" @shrinkInOut>
<div *ngIf="(formCollapsed | async) === false" class="pl-2 row" @shrinkInOut>
<ds-form #formRef="formComponent"
class="col-sm-12 col-md-8 col-lg-9 col-xl-10 pl-0"
[formId]="formId"
@@ -28,7 +28,7 @@
(dfFocus)="onFocus($event)"></ds-form>
<div *ngIf="!(formCollapsed | async)" class="col p-0 m-0 d-flex justify-content-center align-items-center">
<div *ngIf="(formCollapsed | async) === false" class="col p-0 m-0 d-flex justify-content-center align-items-center">
<button type="button"
class="btn btn-link"

View File

@@ -22,7 +22,7 @@
Checkboxes that are in the indeterminate state always switch to checked when clicked
This seemed like the cleanest and clearest solution to solve this issue for now. -->
<input *ngIf="!allSelected && !(someSelected$ | async)"
<input *ngIf="!allSelected && (someSelected$ | async) === false"
type="checkbox"
[indeterminate]="false"
(change)="selectAll()">

View File

@@ -62,7 +62,7 @@
</button>
<ng-content select="[between]"></ng-content>
<button *ngIf="displaySubmit" type="submit" class="btn btn-primary" (click)="onSubmit()"
[disabled]="!(isValid() | async)"><i class="fas fa-save"></i> {{submitLabel | translate}}
[disabled]="(isValid() | async) === false"><i class="fas fa-save"></i> {{submitLabel | translate}}
</button>
<ng-content select="[after]"></ng-content>
</div>

View File

@@ -16,7 +16,7 @@
</div>
<div class="treeview-container">
<ds-themed-loading *ngIf="loading | async" [showMessage]="false"></ds-themed-loading>
<h4 *ngIf="!(loading | async) && dataSource.data.length === 0" class="text-center text-muted mt-4" >
<h4 *ngIf="(loading | async) === false && dataSource.data.length === 0" class="text-center text-muted mt-4" >
<span>{{'vocabulary-treeview.search.no-result' | translate}}</span>
</h4>
<cdk-tree [dataSource]="dataSource" [treeControl]="treeControl">

View File

@@ -1,5 +1,5 @@
<ds-themed-loading *ngIf="(loading | async) || (isAuthenticated | async)" class="m-5"></ds-themed-loading>
<div *ngIf="!(loading | async) && !(isAuthenticated | async)" class="px-4 py-3 mx-auto login-container">
<div *ngIf="(loading | async) === false && (isAuthenticated | async) === false" class="px-4 py-3 mx-auto login-container">
<ng-container *ngFor="let authMethod of (authMethods); let i = index">
<div *ngIf="i === 1" class="text-center mt-2">
<span class="align-middle">{{"login.form.or-divider" | translate}}</span>

View File

@@ -4,5 +4,5 @@
[disabled]="processing$ | async"
(click)="submitTask()">
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}}</span>
<span *ngIf="!(processing$ | async)"><i class="fa fa-thumbs-up"></i> {{'submission.workflow.tasks.claimed.approve' | translate}}</span>
<span *ngIf="(processing$ | async) === false"><i class="fa fa-thumbs-up"></i> {{'submission.workflow.tasks.claimed.approve' | translate}}</span>
</button>

View File

@@ -6,7 +6,7 @@
<span *ngIf="processing$ | async">
<i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}}
</span>
<span *ngIf="!(processing$ | async)">
<span *ngIf="(processing$ | async) === false">
<i class="fa fa-ban"></i> {{'submission.workflow.tasks.claimed.decline' | translate}}
</span>
</button>

View File

@@ -4,7 +4,7 @@
[disabled]="processing$ | async"
(click)="openRejectModal(rejectModal)" >
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}}</span>
<span *ngIf="!(processing$ | async)"><i class="fa fa-trash"></i> {{'submission.workflow.tasks.claimed.reject.submit' | translate}}</span>
<span *ngIf="(processing$ | async) === false"><i class="fa fa-trash"></i> {{'submission.workflow.tasks.claimed.reject.submit' | translate}}</span>
</button>
<ng-template #rejectModal let-c="close" let-d="dismiss">
@@ -31,7 +31,7 @@
[disabled]="!rejectForm.valid || (processing$ | async)"
type="submit">
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}}</span>
<span *ngIf="!(processing$ | async)">{{'submission.workflow.tasks.claimed.reject.reason.submit' | translate}}</span>
<span *ngIf="(processing$ | async) === false">{{'submission.workflow.tasks.claimed.reject.reason.submit' | translate}}</span>
</button>
</form>
</div>

View File

@@ -4,5 +4,5 @@
[disabled]="processing$ | async"
(click)="submitTask()">
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}}</span>
<span *ngIf="!(processing$ | async)"><i class="fa fa-undo"></i> {{'submission.workflow.tasks.claimed.return' | translate}}</span>
<span *ngIf="(processing$ | async) === false"><i class="fa fa-undo"></i> {{'submission.workflow.tasks.claimed.return' | translate}}</span>
</button>

View File

@@ -3,7 +3,7 @@
(click)="claim()">
<span *ngIf="(processing$ | async)"><i class='fas fa-circle-notch fa-spin'></i>
{{'submission.workflow.tasks.generic.processing' | translate}}</span>
<span *ngIf="!(processing$ | async)"><i class="fas fa-hand-paper"></i> {{'submission.workflow.tasks.pool.claim' |
<span *ngIf="(processing$ | async) === false"><i class="fas fa-hand-paper"></i> {{'submission.workflow.tasks.pool.claim' |
translate}}</span>
</button>
<button class="btn btn-primary workflow-view ml-1 mt-1 mb-3" data-test="view-btn"

View File

@@ -22,7 +22,7 @@
(click)="$event.preventDefault();confirmDiscard(content)">
<span *ngIf="(processingDelete$ | async)"><i class='fas fa-circle-notch fa-spin'></i>
{{'submission.workflow.tasks.generic.processing' | translate}}</span>
<span *ngIf="!(processingDelete$ | async)"><i class="fa fa-trash"></i> {{'submission.workflow.generic.delete' |
<span *ngIf="(processingDelete$ | async) === false"><i class="fa fa-trash"></i> {{'submission.workflow.generic.delete' |
translate}}</span>
</button>
</div>

View File

@@ -11,5 +11,5 @@
</ng-container>
<ds-themed-loading
*ngIf="!(derivedSearchResult$ | async)"
*ngIf="(derivedSearchResult$ | async) === undefined"
[showMessage]="false"></ds-themed-loading>

View File

@@ -1,7 +1,6 @@
import { Component, Inject } from '@angular/core';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { BehaviorSubject } from 'rxjs';
import { LinkService } from '../../../../core/cache/builders/link.service';
import { Item } from '../../../../core/shared/item.model';
@@ -37,7 +36,7 @@ export class WorkflowItemSearchResultListElementComponent extends SearchResultLi
/**
* The item search result derived from the WorkspaceItemSearchResult
*/
derivedSearchResult$: Observable<ItemSearchResult>;
derivedSearchResult$: BehaviorSubject<ItemSearchResult> = new BehaviorSubject(undefined);
/**
* Represents the badge context
@@ -69,13 +68,14 @@ export class WorkflowItemSearchResultListElementComponent extends SearchResultLi
private deriveSearchResult() {
this.linkService.resolveLink(this.object.indexableObject, followLink('item'));
this.derivedSearchResult$ = this.object.indexableObject.item.pipe(
this.object.indexableObject.item.pipe(
getFirstSucceededRemoteDataPayload(),
map((item: Item) => {
const result = new ItemSearchResult();
result.indexableObject = item;
result.hitHighlights = this.object.hitHighlights;
return result;
).subscribe((item: Item) => {
const result = new ItemSearchResult();
this.derivedSearchResult$.next(Object.assign(new ItemSearchResult(), {
indexableObject: item,
hitHighlights: this.object.hitHighlights,
}));
});
}
}

View File

@@ -10,5 +10,5 @@
</div>
</ng-container>
<ds-themed-loading
*ngIf="!(derivedSearchResult$ | async)"
*ngIf="(derivedSearchResult$ | async) === undefined"
[showMessage]="false"></ds-themed-loading>

View File

@@ -1,6 +1,6 @@
import { Component, Inject } from '@angular/core';
import { Observable } from 'rxjs';
import { BehaviorSubject } from 'rxjs';
import { LinkService } from '../../../../core/cache/builders/link.service';
import { Item } from '../../../../core/shared/item.model';
@@ -13,7 +13,6 @@ import { SearchResultListElementComponent } from '../../search-result-list-eleme
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
import { APP_CONFIG, AppConfig } from '../../../../../config/app-config.interface';
import { ItemSearchResult } from '../../../object-collection/shared/item-search-result.model';
import { map } from 'rxjs/operators';
import { getFirstSucceededRemoteDataPayload } from '../../../../core/shared/operators';
import { CollectionElementLinkType } from '../../../object-collection/collection-element-link.type';
import { followLink } from '../../../utils/follow-link-config.model';
@@ -37,7 +36,7 @@ export class WorkspaceItemSearchResultListElementComponent extends SearchResult
/**
* The item search result derived from the WorkspaceItemSearchResult
*/
derivedSearchResult$: Observable<ItemSearchResult>;
derivedSearchResult$: BehaviorSubject<ItemSearchResult> = new BehaviorSubject(undefined);
/**
* Represents the badge context
@@ -69,13 +68,14 @@ export class WorkspaceItemSearchResultListElementComponent extends SearchResult
private deriveSearchResult() {
this.linkService.resolveLink(this.object.indexableObject, followLink('item'));
this.derivedSearchResult$ = this.object.indexableObject.item.pipe(
this.object.indexableObject.item.pipe(
getFirstSucceededRemoteDataPayload(),
map((item: Item) => {
).subscribe((item: Item) => {
const result = new ItemSearchResult();
result.indexableObject = item;
result.hitHighlights = this.object.hitHighlights;
return result;
}));
this.derivedSearchResult$.next(Object.assign(new ItemSearchResult(), {
indexableObject: item,
hitHighlights: this.object.hitHighlights,
}));
});
}
}

View File

@@ -19,7 +19,7 @@
</thead>
<tbody>
<tr *ngFor="let item of itemsRD?.payload?.page">
<td><input [disabled]="!(canSelect(item) | async)" class="item-checkbox" [ngModel]="getSelected(item.id) | async" (change)="switch(item.id)" type="checkbox" name="{{item.id}}"></td>
<td><input [disabled]="(canSelect(item) | async) === false" class="item-checkbox" [ngModel]="getSelected(item.id) | async" (change)="switch(item.id)" type="checkbox" name="{{item.id}}"></td>
<td *ngIf="!hideCollection">
<span *ngVar="(item.owningCollection | async)?.payload as collection">
<a *ngIf="collection" [routerLink]="['/collections', collection?.id]">

View File

@@ -35,12 +35,12 @@
(click)="onReset()">{{'form.cancel' | translate}}</button>
<button type="button"
class="btn btn-primary"
[disabled]="!(isFormValid() | async) || (isProcessing | async)"
[disabled]="(isFormValid() | async) === false || (isProcessing | async)"
(click)="onSubmit()">
<span *ngIf="(isProcessing | async)">
<i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}}
</span>
<span *ngIf="!(isProcessing | async)">
<span *ngIf="(isProcessing | async) === false">
{{'form.submit' | translate}}
</span>
</button>

View File

@@ -13,13 +13,13 @@
</span>
<div class="space-children-mr flex-shrink-0">
<button class="btn btn-danger p-1"
[disabled]="(!(canDelete() | async)) || (isProcessingDelete() | async)"
[disabled]="((canDelete() | async) === false) || (isProcessingDelete() | async)"
[title]="'resource-policies.delete.btn.title' | translate"
(click)="deleteSelectedResourcePolicies()">
<span *ngIf="(isProcessingDelete() | async)">
<i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}}
</span>
<span *ngIf="!(isProcessingDelete() | async)">
<span *ngIf="(isProcessingDelete() | async) === false">
<i class='fas fa-trash-alt fa-fw'></i>
{{'resource-policies.delete.btn' | translate}}
</span>

View File

@@ -7,7 +7,7 @@
</div>
</ng-container>
<div class="clearfix toggle-more-filters">
<a class="float-left" *ngIf="!(isLastPage$ | async)"
<a class="float-left" *ngIf="(isLastPage$ | async) === false"
(click)="showMore()" href="javascript:void(0);">
{{"search.filters.filter.show-more" | translate}}
</a>

View File

@@ -7,7 +7,7 @@
</div>
</ng-container>
<div class="clearfix toggle-more-filters">
<a class="float-left" *ngIf="!(isLastPage$ | async)"
<a class="float-left" *ngIf="(isLastPage$ | async) === false"
(click)="showMore()" href="javascript:void(0);">
{{"search.filters.filter.show-more" | translate}}
</a>

View File

@@ -7,7 +7,7 @@
</div>
</ng-container>
<div class="clearfix toggle-more-filters">
<a class="float-left" *ngIf="!(isLastPage$ | async)"
<a class="float-left" *ngIf="(isLastPage$ | async) === false"
(click)="showMore()" href="javascript:void(0);">
{{"search.filters.filter.show-more" | translate}}
</a>

View File

@@ -7,7 +7,7 @@
</div>
</ng-container>
<div class="clearfix toggle-more-filters">
<a class="float-left" *ngIf="!(isLastPage$ | async)"
<a class="float-left" *ngIf="(isLastPage$ | async) === false"
(click)="showMore()" href="javascript:void(0);">
{{"search.filters.filter.show-more" | translate}}
</a>

View File

@@ -16,7 +16,7 @@
<ng-template #searchContent>
<div class="row">
<div class="col-12" *ngIf="!(isXsOrSm$ | async)">
<div class="col-12" *ngIf="(isXsOrSm$ | async) === false">
<ng-template *ngTemplateOutlet="searchForm"></ng-template>
<ng-content select="[additionalSearchOptions]"></ng-content>
</div>
@@ -47,7 +47,7 @@
</ng-template>
<ng-template #sidebarContent>
<ds-themed-search-sidebar id="search-sidebar" *ngIf="!(isXsOrSm$ | async)"
<ds-themed-search-sidebar id="search-sidebar" *ngIf="(isXsOrSm$ | async) === false"
[configurationList]="configurationList"
[configuration]="(currentConfiguration$ | async)"
[currentScope]="(currentScope$ | async)"

View File

@@ -38,7 +38,7 @@
<span *ngIf="(processing$ | async)">
<i class='fas fa-circle-notch fa-spin'></i> {{'subscriptions.modal.new-subscription-form.processing' | translate}}
</span>
<span *ngIf="!(processing$ | async)">
<span *ngIf="(processing$ | async) === false">
{{'subscriptions.modal.new-subscription-form.submit' | translate}}
</span>
</button>

View File

@@ -19,7 +19,7 @@
[report]="report"
class="m-2 {{ report.id }}">
</ds-statistics-table>
<div *ngIf="!(hasData$ | async)">
<div *ngIf="(hasData$ | async) === false">
{{ 'statistics.page.no-data' | translate }}
</div>
</ng-container>

View File

@@ -1,6 +1,6 @@
<div>
<div
*ngIf="!(available$ | async)"
*ngIf="(available$ | async) === false"
class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text">{{ 'submission.sections.general.collection' | translate }}</span>
@@ -28,7 +28,7 @@
[disabled]="(processingChange$ | async) || collectionModifiable == false || isReadonly"
ngbDropdownToggle>
<span *ngIf="(processingChange$ | async)"><i class='fas fa-circle-notch fa-spin'></i></span>
<span *ngIf="!(processingChange$ | async)">{{ selectedCollectionName$ | async }}</span>
<span *ngIf="(processingChange$ | async) === false">{{ selectedCollectionName$ | async }}</span>
</button>
<div ngbDropdownMenu

View File

@@ -11,10 +11,10 @@
</button>
</div>
<div class="col text-right d-flex justify-content-end align-items-center">
<span *ngIf="!(hasUnsavedModification | async) && !(processingSaveStatus | async) && !(processingDepositStatus | async)">
<span *ngIf="(hasUnsavedModification | async) === false && (processingSaveStatus | async) === false && (processingDepositStatus | async) === false">
<i class="fas fa-check-circle"></i> {{'submission.general.info.saved' | translate}}
</span>
<span *ngIf="(hasUnsavedModification | async) && !(processingSaveStatus | async) && !(processingDepositStatus | async)">
<span *ngIf="(hasUnsavedModification | async) && (processingSaveStatus | async) === false && (processingDepositStatus | async) === false">
<i class="fas fa-exclamation-circle"></i> {{'submission.general.info.pending-changes' | translate}}
</span>
<div *ngIf="(processingSaveStatus | async) || (processingDepositStatus | async)" class="col d-flex justify-content-end align-items-center">
@@ -28,12 +28,12 @@
class="btn btn-secondary"
id="save"
[attr.data-test]="'save' | dsBrowserOnly"
[disabled]="(processingSaveStatus | async) || !(hasUnsavedModification | async)"
[disabled]="(processingSaveStatus | async) || (hasUnsavedModification | async) === false"
(click)="save($event)">
<span><i class="fas fa-save"></i> {{'submission.general.save' | translate}}</span>
</button>
<button type="button"
[class.btn-primary]="!(showDepositAndDiscard | async)"
[class.btn-primary]="(showDepositAndDiscard | async) === false"
[class.btn-secondary]="(showDepositAndDiscard | async)"
class="btn"
id="saveForLater"

View File

@@ -5,7 +5,7 @@
[ngClass]="{'w-100': windowService.isXs()}">
<button class="btn btn-outline-primary dropdown-toggle"
id="sectionControls"
[disabled]="!(hasSections$ | async)"
[disabled]="(hasSections$ | async) === false"
[ngClass]="{'w-100': (windowService.isXs() | async)}"
ngbDropdownToggle>
{{ 'submission.sections.general.add-more' | translate }} <i class="fa fa-plus" aria-hidden="true"></i>
@@ -14,7 +14,7 @@
class="sections-dropdown-menu"
aria-labelledby="sectionControls"
[ngClass]="{'w-100': (windowService.isXs() | async)}">
<button class="dropdown-item disabled" *ngIf="!(hasSections$ | async)">
<button class="dropdown-item disabled" *ngIf="(hasSections$ | async) === false">
{{ 'submission.sections.general.no-sections' | translate }}
</button>
<button class="dropdown-item" *ngFor="let listItem of (sectionList$ | async)" (click)="addSection(listItem.id)">

View File

@@ -1,5 +1,5 @@
<div class="container-fluid">
<div *ngIf="!(isLoading() | async)" class="submission-form-header mb-3 d-flex flex-wrap position-sticky">
<div *ngIf="(isLoading() | async) === false" class="submission-form-header mb-3 d-flex flex-wrap position-sticky">
<div *ngIf="(uploadEnabled$ | async)" class="w-100">
<ds-submission-upload-files [submissionId]="submissionId"
[collectionId]="collectionId"
@@ -33,7 +33,7 @@
[sectionData]="object"></ds-submission-section-container>
</ng-container>
</div>
<div *ngIf="!(isLoading() | async)" class="submission-form-footer mt-3 mb-3 position-sticky">
<div *ngIf="(isLoading() | async) === false" class="submission-form-footer mt-3 mb-3 position-sticky">
<ds-submission-form-footer [submissionId]="submissionId"></ds-submission-form-footer>
</div>
</div>

View File

@@ -2,8 +2,8 @@
<input type="text" class="form-control" (keyup.enter)="(searchString === '')?null:search()" [(ngModel)]="searchString" placeholder="{{'submission.import-external.search.placeholder' |translate}}" aria-label="" aria-describedby="">
</div>
<div class="input-group mb-5">
<input *ngIf="!(isXsOrSm$ | async)" type="text" class="form-control" (keyup.enter)="(searchString === '')?null:search()" [(ngModel)]="searchString" placeholder="{{'submission.import-external.search.placeholder' |translate}}" aria-label="" aria-describedby="">
<div [ngClass]="{'input-group-append': !(isXsOrSm$ | async)}" ngbDropdown role="group" aria-label="">
<input *ngIf="(isXsOrSm$ | async) === false" type="text" class="form-control" (keyup.enter)="(searchString === '')?null:search()" [(ngModel)]="searchString" placeholder="{{'submission.import-external.search.placeholder' |translate}}" aria-label="" aria-describedby="">
<div [ngClass]="{'input-group-append': (isXsOrSm$ | async) === false}" ngbDropdown role="group" aria-label="">
<button class="btn btn-outline-secondary w-fx" title="{{'submission.import-external.search.source.hint' |translate}}" ngbDropdownToggle>{{'submission.import-external.source.' + selectedElement?.name | translate}}</button>
<div ngbDropdownMenu class="dropdown-menu scrollable-dropdown-menu w-100"
aria-haspopup="true"

View File

@@ -12,7 +12,7 @@
<div *ngIf="reload$.value.sourceId !== ''" class="col-md-12">
<ng-container *ngVar="(entriesRD$ | async) as entriesRD">
<h3 *ngIf="entriesRD && entriesRD?.payload?.page?.length !== 0">{{ 'submission.sections.describe.relationship-lookup.selection-tab.title' | translate}}</h3>
<ds-viewable-collection *ngIf="entriesRD?.hasSucceeded && !(isLoading$ | async) && entriesRD?.payload?.page?.length > 0" @fadeIn
<ds-viewable-collection *ngIf="entriesRD?.hasSucceeded && (isLoading$ | async) === false && entriesRD?.payload?.page?.length > 0" @fadeIn
[objects]="entriesRD"
[selectionConfig]="{ repeatable: repeatable, listId: listId }"
[config]="initialPagination"
@@ -24,10 +24,10 @@
</ds-viewable-collection>
<ds-themed-loading *ngIf="(isLoading$ | async)"
message="{{'loading.search-results' | translate}}"></ds-themed-loading>
<div *ngIf="!(isLoading$ | async) && entriesRD?.payload?.page?.length === 0" data-test="empty-external-entry-list">
<div *ngIf="(isLoading$ | async) === false && entriesRD?.payload?.page?.length === 0" data-test="empty-external-entry-list">
<ds-alert [type]="'alert-info'">{{ 'search.results.empty' | translate }}</ds-alert>
</div>
<div *ngIf="!(isLoading$ | async) && entriesRD.statusCode === 500" data-test="empty-external-error-500">
<div *ngIf="(isLoading$ | async) === false && entriesRD.statusCode === 500" data-test="empty-external-error-500">
<ds-alert [type]="'alert-info'">{{ 'search.results.response.500' | translate }}</ds-alert>
</div>
</ng-container>

View File

@@ -9,7 +9,7 @@
'submission.sections.'+sectionData.header | translate
}}</span>
<div class="d-inline-block float-right">
<i *ngIf="!(sectionRef.isValid() | async) && !(sectionRef.hasErrors()) && !(sectionRef.isInfo())"
<i *ngIf="(sectionRef.isValid() | async) === false && !(sectionRef.hasErrors()) && !(sectionRef.isInfo())"
class="fas fa-exclamation-circle text-warning mr-3"
title="{{'submission.sections.status.warnings.title' | translate}}" role="img"
[attr.aria-label]="'submission.sections.status.warnings.aria' | translate"></i>

View File

@@ -25,7 +25,7 @@
[disabled]="(processingDelete$ | async)"
(click)="$event.preventDefault();confirmDelete(content);">
<i *ngIf="(processingDelete$ | async)" class="fas fa-circle-notch fa-spin fa-2x text-danger"></i>
<i *ngIf="!(processingDelete$ | async)" class="fa fa-trash fa-2x text-danger"></i>
<i *ngIf="(processingDelete$ | async) === false" class="fa fa-trash fa-2x text-danger"></i>
</button>
</ng-container>
</div>

View File

@@ -7,7 +7,7 @@
<ds-themed-loading *ngIf="loading$ | async"></ds-themed-loading>
<ng-container *ngVar="(subscriptions$ | async) as subscriptions">
<ds-pagination *ngIf="subscriptions?.pageInfo?.totalElements > 0 && !(loading$ | async)"
<ds-pagination *ngIf="subscriptions?.pageInfo?.totalElements > 0 && (loading$ | async) === false"
[paginationOptions]="config"
[collectionSize]="subscriptions?.pageInfo?.totalElements"
[hideGear]="true"
@@ -34,7 +34,7 @@
</div>
</ds-pagination>
<ds-alert *ngIf="subscriptions?.pageInfo?.totalElements == 0 && !(loading$ | async)" [type]="'alert-info'" data-test="empty-alert">
<ds-alert *ngIf="subscriptions?.pageInfo?.totalElements == 0 && (loading$ | async) === false" [type]="'alert-info'" data-test="empty-alert">
{{ 'subscriptions.table.empty.message' | translate }}
</ds-alert>

View File

@@ -1,3 +1,3 @@
<div [ngClass]="{'open': !(isNavBarCollapsed | async)}">
<div [ngClass]="{'open': (isNavBarCollapsed | async) === false}">
<ds-themed-header></ds-themed-header>
</div>

View File

@@ -1,6 +1,6 @@
<nav [ngClass]="{'open': !(menuCollapsed | async)}" [@slideMobileNav]="!(windowService.isXsOrSm() | async) ? 'default' : ((menuCollapsed | async) ? 'collapsed' : 'expanded')"
<nav [ngClass]="{'open': (menuCollapsed | async) === false}" [@slideMobileNav]="(windowService.isXsOrSm() | async) === false ? 'default' : ((menuCollapsed | async) ? 'collapsed' : 'expanded')"
class="navbar navbar-expand-md navbar-light p-0 navbar-container" role="navigation" [attr.aria-label]="'nav.main.description' | translate">
<div class="navbar-inner-container w-100 h-100" [class.container]="!(isXsOrSm$ | async)">
<div class="navbar-inner-container w-100 h-100" [class.container]="(isXsOrSm$ | async) === false">
<a class="navbar-brand my-2" routerLink="/home">
<img src="assets/images/dspace-logo.svg" [attr.alt]="'menu.header.image.logo' | translate" />
</a>