mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
89984: Add ThemedLoadingComponent
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<ds-loading *ngIf="searching$ | async"></ds-loading>
|
||||
<ds-themed-loading *ngIf="searching$ | async"></ds-themed-loading>
|
||||
<ds-pagination
|
||||
*ngIf="(pageInfoState$ | async)?.totalElements > 0 && !(searching$ | async)"
|
||||
[paginationOptions]="config"
|
||||
|
@@ -36,12 +36,12 @@
|
||||
</button>
|
||||
</ds-form>
|
||||
|
||||
<ds-loading [showMessage]="false" *ngIf="!formGroup"></ds-loading>
|
||||
<ds-themed-loading [showMessage]="false" *ngIf="!formGroup"></ds-themed-loading>
|
||||
|
||||
<div *ngIf="epersonService.getActiveEPerson() | async">
|
||||
<h5>{{messagePrefix + '.groupsEPersonIsMemberOf' | translate}}</h5>
|
||||
|
||||
<ds-loading [showMessage]="false" *ngIf="!(groups | async)"></ds-loading>
|
||||
<ds-themed-loading [showMessage]="false" *ngIf="!(groups | async)"></ds-themed-loading>
|
||||
|
||||
<ds-pagination
|
||||
*ngIf="(groups | async)?.payload?.totalElements > 0"
|
||||
|
@@ -33,7 +33,7 @@
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<ds-loading *ngIf="loading$ | async"></ds-loading>
|
||||
<ds-themed-loading *ngIf="loading$ | async"></ds-themed-loading>
|
||||
<ds-pagination
|
||||
*ngIf="(pageInfoState$ | async)?.totalElements > 0 && !(loading$ | async)"
|
||||
[paginationOptions]="config"
|
||||
|
@@ -27,7 +27,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<ds-error *ngIf="bitstreamRD?.hasFailed" message="{{'error.bitstream' | translate}}"></ds-error>
|
||||
<ds-loading *ngIf="!bitstreamRD || !formatsRD || bitstreamRD?.isLoading || formatsRD?.isLoading"
|
||||
message="{{'loading.bitstream' | translate}}"></ds-loading>
|
||||
<ds-themed-loading *ngIf="!bitstreamRD || !formatsRD || bitstreamRD?.isLoading || formatsRD?.isLoading"
|
||||
message="{{'loading.bitstream' | translate}}"></ds-themed-loading>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
@@ -35,7 +35,7 @@
|
||||
(prev)="goPrev()"
|
||||
(next)="goNext()">
|
||||
</ds-browse-by>
|
||||
<ds-loading *ngIf="!startsWithOptions" message="{{'loading.browse-by-page' | translate}}"></ds-loading>
|
||||
<ds-themed-loading *ngIf="!startsWithOptions" message="{{'loading.browse-by-page' | translate}}"></ds-themed-loading>
|
||||
</div>
|
||||
</section>
|
||||
<ng-container *ngVar="(parent$ | async) as parent">
|
||||
|
@@ -57,8 +57,8 @@
|
||||
</div>
|
||||
<ds-error *ngIf="itemRD?.hasFailed"
|
||||
message="{{'error.recent-submissions' | translate}}"></ds-error>
|
||||
<ds-loading *ngIf="!itemRD || itemRD.isLoading"
|
||||
message="{{'loading.recent-submissions' | translate}}"></ds-loading>
|
||||
<ds-themed-loading *ngIf="!itemRD || itemRD.isLoading"
|
||||
message="{{'loading.recent-submissions' | translate}}"></ds-themed-loading>
|
||||
<div *ngIf="!itemRD?.isLoading && itemRD?.payload?.page.length === 0" class="alert alert-info w-100" role="alert">
|
||||
{{'collection.page.browse.recent.empty' | translate}}
|
||||
</div>
|
||||
@@ -75,7 +75,7 @@
|
||||
</div>
|
||||
<ds-error *ngIf="collectionRD?.hasFailed"
|
||||
message="{{'error.collection' | translate}}"></ds-error>
|
||||
<ds-loading *ngIf="collectionRD?.isLoading"
|
||||
message="{{'loading.collection' | translate}}"></ds-loading>
|
||||
<ds-themed-loading *ngIf="collectionRD?.isLoading"
|
||||
message="{{'loading.collection' | translate}}"></ds-themed-loading>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -25,7 +25,7 @@
|
||||
<label class="form-check-label"
|
||||
for="externalSourceCheck">{{ 'collection.edit.tabs.source.external' | translate }}</label>
|
||||
</div>
|
||||
<ds-loading *ngIf="!contentSource" [message]="'loading.content-source' | translate"></ds-loading>
|
||||
<ds-themed-loading *ngIf="!contentSource" [message]="'loading.content-source' | translate"></ds-themed-loading>
|
||||
<h4 *ngIf="contentSource && (contentSource?.harvestType !== harvestTypeNone)">{{ 'collection.edit.tabs.source.form.head' | translate }}</h4>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<ds-item-metadata [updateService]="itemTemplateService" [item]="itemRD?.payload"></ds-item-metadata>
|
||||
<button [routerLink]="getCollectionEditUrl(collection)" class="btn btn-outline-secondary">{{ 'collection.edit.template.cancel' | translate }}</button>
|
||||
</ng-container>
|
||||
<ds-loading *ngIf="itemRD?.isLoading" [message]="'collection.edit.template.loading' | translate"></ds-loading>
|
||||
<ds-themed-loading *ngIf="itemRD?.isLoading" [message]="'collection.edit.template.loading' | translate"></ds-themed-loading>
|
||||
<ds-alert *ngIf="itemRD?.hasFailed" [type]="AlertTypeEnum.Error" [content]="'collection.edit.template.error' | translate"></ds-alert>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<ds-loading *ngIf="(dataSource.loading$ | async) && !loadingNode" class="ds-loading"></ds-loading>
|
||||
<ds-themed-loading *ngIf="(dataSource.loading$ | async) && !loadingNode" class="ds-themed-loading"></ds-themed-loading>
|
||||
<cdk-tree [dataSource]="dataSource" [treeControl]="treeControl">
|
||||
<!-- This is the tree node template for show more node -->
|
||||
<cdk-tree-node *cdkTreeNodeDef="let node; when: isShowMore" cdkTreeNodePadding
|
||||
@@ -12,7 +12,7 @@
|
||||
class="btn btn-outline-primary btn-sm" role="button">
|
||||
<i class="fas fa-angle-down"></i> {{ 'communityList.showMore' | translate }}
|
||||
</a>
|
||||
<ds-loading *ngIf="node===loadingNode && dataSource.loading$ | async" class="ds-loading"></ds-loading>
|
||||
<ds-themed-loading *ngIf="node===loadingNode && dataSource.loading$ | async" class="ds-themed-loading"></ds-themed-loading>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-muted" cdkTreeNodePadding>
|
||||
@@ -57,7 +57,7 @@
|
||||
<span class="{{node.isExpanded ? 'fa fa-chevron-down' : 'fa fa-chevron-right'}}"
|
||||
aria-hidden="true"></span>
|
||||
</button>
|
||||
<ds-loading class="ds-loading"></ds-loading>
|
||||
<ds-themed-loading class="ds-themed-loading"></ds-themed-loading>
|
||||
</div>
|
||||
</cdk-tree-node>
|
||||
<!-- This is the tree node template for leaf nodes (collections and (sub)coms without children) -->
|
||||
|
@@ -41,5 +41,5 @@
|
||||
</div>
|
||||
|
||||
<ds-error *ngIf="communityRD?.hasFailed" message="{{'error.community' | translate}}"></ds-error>
|
||||
<ds-loading *ngIf="communityRD?.isLoading" message="{{'loading.community' | translate}}"></ds-loading>
|
||||
<ds-themed-loading *ngIf="communityRD?.isLoading" message="{{'loading.community' | translate}}"></ds-themed-loading>
|
||||
</div>
|
||||
|
@@ -9,5 +9,5 @@
|
||||
</ds-viewable-collection>
|
||||
</div>
|
||||
<ds-error *ngIf="subCollectionsRD?.hasFailed" message="{{'error.sub-collections' | translate}}"></ds-error>
|
||||
<ds-loading *ngIf="subCollectionsRD?.isLoading" message="{{'loading.sub-collections' | translate}}"></ds-loading>
|
||||
<ds-themed-loading *ngIf="subCollectionsRD?.isLoading" message="{{'loading.sub-collections' | translate}}"></ds-themed-loading>
|
||||
</ng-container>
|
||||
|
@@ -9,5 +9,5 @@
|
||||
</ds-viewable-collection>
|
||||
</div>
|
||||
<ds-error *ngIf="subCommunitiesRD?.hasFailed" message="{{'error.sub-communities' | translate}}"></ds-error>
|
||||
<ds-loading *ngIf="subCommunitiesRD?.isLoading" message="{{'loading.sub-communities' | translate}}"></ds-loading>
|
||||
<ds-themed-loading *ngIf="subCommunitiesRD?.isLoading" message="{{'loading.sub-communities' | translate}}"></ds-themed-loading>
|
||||
</ng-container>
|
||||
|
@@ -10,4 +10,4 @@
|
||||
</ds-viewable-collection>
|
||||
</div>
|
||||
<ds-error *ngIf="communitiesRD?.hasFailed " message="{{'error.top-level-communites' | translate}}"></ds-error>
|
||||
<ds-loading *ngIf="communitiesRD?.isLoading " message="{{'loading.top-level-communities' | translate}}"></ds-loading></ng-container>
|
||||
<ds-themed-loading *ngIf="communitiesRD?.isLoading " message="{{'loading.top-level-communities' | translate}}"></ds-themed-loading></ng-container>
|
||||
|
@@ -44,7 +44,7 @@
|
||||
class="alert alert-info w-100 d-inline-block mt-4" role="alert">
|
||||
{{'item.edit.bitstreams.empty' | translate}}
|
||||
</div>
|
||||
<ds-loading *ngIf="!bundles" message="{{'loading.bitstreams' | translate}}"></ds-loading>
|
||||
<ds-themed-loading *ngIf="!bundles" message="{{'loading.bitstreams' | translate}}"></ds-themed-loading>
|
||||
|
||||
<div class="button-row bottom">
|
||||
<div class="mt-4 float-right">
|
||||
|
@@ -29,5 +29,5 @@
|
||||
</ng-container>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ds-loading *ngIf="(loading$ | async)" [message]="'loading.bitstreams' | translate"></ds-loading>
|
||||
<ds-themed-loading *ngIf="(loading$ | async)" [message]="'loading.bitstreams' | translate"></ds-themed-loading>
|
||||
</ds-pagination>
|
||||
|
@@ -31,5 +31,5 @@
|
||||
<div *ngIf="updateValues.length === 0">{{"item.edit.relationships.no-relationships" | translate}}</div>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
<ds-loading *ngIf="loading$ | async"></ds-loading>
|
||||
<ds-themed-loading *ngIf="loading$ | async"></ds-themed-loading>
|
||||
</ng-container>
|
||||
|
@@ -32,7 +32,7 @@
|
||||
></ds-edit-relationship-list>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ds-loading *ngIf="!relationshipTypes"></ds-loading>
|
||||
<ds-themed-loading *ngIf="!relationshipTypes"></ds-themed-loading>
|
||||
</ng-container>
|
||||
<div class="button-row bottom">
|
||||
<div class="float-right">
|
||||
|
@@ -37,5 +37,5 @@
|
||||
</div>
|
||||
</div>
|
||||
<ds-error *ngIf="itemRD?.hasFailed" message="{{'error.item' | translate}}"></ds-error>
|
||||
<ds-loading *ngIf="itemRD?.isLoading" message="{{'loading.item' | translate}}"></ds-loading>
|
||||
<ds-themed-loading *ngIf="itemRD?.isLoading" message="{{'loading.item' | translate}}"></ds-themed-loading>
|
||||
</div>
|
||||
|
@@ -1,9 +1,9 @@
|
||||
<ng-container *ngVar="mediaList$ | async as mediaList">
|
||||
<ds-loading
|
||||
<ds-themed-loading
|
||||
*ngIf="isLoading"
|
||||
message="{{ 'loading.default' | translate }}"
|
||||
[showMessage]="false"
|
||||
></ds-loading>
|
||||
></ds-themed-loading>
|
||||
<div class="media-viewer" *ngIf="!isLoading">
|
||||
<ng-container *ngIf="mediaList.length > 0">
|
||||
<ng-container *ngIf="videoOptions">
|
||||
|
@@ -110,7 +110,7 @@ describe('MediaViewerComponent', () => {
|
||||
});
|
||||
|
||||
it('should display a loading component', () => {
|
||||
const loading = fixture.debugElement.query(By.css('ds-loading'));
|
||||
const loading = fixture.debugElement.query(By.css('ds-themed-loading'));
|
||||
expect(loading.nativeElement).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<span>({{(file?.sizeBytes) | dsFileSize }})</span>
|
||||
<span *ngIf="!last" innerHTML="{{separator}}"></span>
|
||||
</ds-file-download-link>
|
||||
<ds-loading *ngIf="isLoading" message="{{'loading.default' | translate}}" [showMessage]="false"></ds-loading>
|
||||
<ds-themed-loading *ngIf="isLoading" message="{{'loading.default' | translate}}" [showMessage]="false"></ds-themed-loading>
|
||||
<div *ngIf="!isLastPage" class="mt-1" id="view-more">
|
||||
<a class="bitstream-view-more btn btn-outline-secondary btn-sm" [routerLink]="" (click)="getNextPage()">{{'item.page.bitstreams.view-more' | translate}}</a>
|
||||
</div>
|
||||
|
@@ -86,7 +86,7 @@ describe('FileSectionComponent', () => {
|
||||
});
|
||||
|
||||
it('should display a loading component', () => {
|
||||
const loading = fixture.debugElement.query(By.css('ds-loading'));
|
||||
const loading = fixture.debugElement.query(By.css('ds-themed-loading'));
|
||||
expect(loading.nativeElement).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
@@ -9,5 +9,5 @@
|
||||
</div>
|
||||
</div>
|
||||
<ds-error *ngIf="itemRD?.hasFailed" message="{{'error.item' | translate}}"></ds-error>
|
||||
<ds-loading *ngIf="itemRD?.isLoading" message="{{'loading.item' | translate}}"></ds-loading>
|
||||
<ds-themed-loading *ngIf="itemRD?.isLoading" message="{{'loading.item' | translate}}"></ds-themed-loading>
|
||||
</div>
|
||||
|
@@ -85,7 +85,7 @@ describe('ItemPageComponent', () => {
|
||||
});
|
||||
|
||||
it('should display a loading component', () => {
|
||||
const loading = fixture.debugElement.query(By.css('ds-loading'));
|
||||
const loading = fixture.debugElement.query(By.css('ds-themed-loading'));
|
||||
expect(loading.nativeElement).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<ds-metadata-representation-loader *ngFor="let rep of representations"
|
||||
[mdRepresentation]="rep">
|
||||
</ds-metadata-representation-loader>
|
||||
<ds-loading *ngIf="(i + 1) === objects.length && (i > 0) && (!representations || representations?.length === 0)" message="{{'loading.default' | translate}}"></ds-loading>
|
||||
<ds-themed-loading *ngIf="(i + 1) === objects.length && (i > 0) && (!representations || representations?.length === 0)" message="{{'loading.default' | translate}}"></ds-themed-loading>
|
||||
<div class="d-inline-block w-100 mt-2" *ngIf="(i + 1) === objects.length && representations?.length > 0">
|
||||
<div *ngIf="(objects.length * incrementBy) < total" class="float-left">
|
||||
<a [routerLink]="" (click)="increase()">{{'item.page.related-items.view-more' |
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<ds-listable-object-component-loader *ngFor="let item of itemsRD?.payload?.page"
|
||||
[object]="item" [viewMode]="viewMode">
|
||||
</ds-listable-object-component-loader>
|
||||
<ds-loading *ngIf="(i + 1) === objects.length && (itemsRD || i > 0) && !(itemsRD?.hasSucceeded && itemsRD?.payload && itemsRD?.payload?.page?.length > 0)" message="{{'loading.default' | translate}}"></ds-loading>
|
||||
<ds-themed-loading *ngIf="(i + 1) === objects.length && (itemsRD || i > 0) && !(itemsRD?.hasSucceeded && itemsRD?.payload && itemsRD?.payload?.page?.length > 0)" message="{{'loading.default' | translate}}"></ds-themed-loading>
|
||||
<div class="d-inline-block w-100 mt-2" *ngIf="(i + 1) === objects.length && itemsRD?.payload?.page?.length > 0">
|
||||
<div *ngIf="itemsRD?.payload?.totalPages > objects.length" class="float-left" id="view-more">
|
||||
<a [routerLink]="" (click)="increase()">{{'item.page.related-items.view-more' |
|
||||
|
@@ -38,7 +38,7 @@
|
||||
<button *ngIf="!showOutputLogs && process?._links?.output?.href != undefined" id="showOutputButton" class="btn btn-primary" (click)="showProcessOutputLogs()">
|
||||
{{ 'process.detail.logs.button' | translate }}
|
||||
</button>
|
||||
<ds-loading *ngIf="retrievingOutputLogs$ | async" class="ds-loading" message="{{ 'process.detail.logs.loading' | translate }}"></ds-loading>
|
||||
<ds-themed-loading *ngIf="retrievingOutputLogs$ | async" class="ds-themed-loading" 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)
|
||||
|
@@ -5,5 +5,5 @@
|
||||
|
||||
<ds-email-request-copy [subject]="subject$ | async" [message]="message$ | async" (send)="deny($event)"></ds-email-request-copy>
|
||||
</div>
|
||||
<ds-loading *ngIf="!itemRequestRD || itemRequestRD?.isLoading"></ds-loading>
|
||||
<ds-themed-loading *ngIf="!itemRequestRD || itemRequestRD?.isLoading"></ds-themed-loading>
|
||||
</div>
|
||||
|
@@ -26,5 +26,5 @@
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<ds-loading *ngIf="!itemRequestRD || itemRequestRD?.isLoading"></ds-loading>
|
||||
<ds-themed-loading *ngIf="!itemRequestRD || itemRequestRD?.isLoading"></ds-themed-loading>
|
||||
</div>
|
||||
|
@@ -13,5 +13,5 @@
|
||||
</form>
|
||||
</ds-email-request-copy>
|
||||
</div>
|
||||
<ds-loading *ngIf="!itemRequestRD || itemRequestRD?.isLoading"></ds-loading>
|
||||
<ds-themed-loading *ngIf="!itemRequestRD || itemRequestRD?.isLoading"></ds-themed-loading>
|
||||
</div>
|
||||
|
@@ -13,7 +13,7 @@
|
||||
<ds-themed-breadcrumbs></ds-themed-breadcrumbs>
|
||||
|
||||
<div class="container d-flex justify-content-center align-items-center h-100" *ngIf="shouldShowRouteLoader">
|
||||
<ds-loading [showMessage]="false"></ds-loading>
|
||||
<ds-themed-loading [showMessage]="false"></ds-themed-loading>
|
||||
</div>
|
||||
<div [class.d-none]="shouldShowRouteLoader">
|
||||
<router-outlet></router-outlet>
|
||||
@@ -25,6 +25,6 @@
|
||||
</div>
|
||||
<ng-template #fullScreenLoader>
|
||||
<div class="ds-full-screen-loader">
|
||||
<ds-loading [showMessage]="false"></ds-loading>
|
||||
<ds-themed-loading [showMessage]="false"></ds-themed-loading>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<ds-loading *ngIf="(loading$ | async)"></ds-loading>
|
||||
<ds-themed-loading *ngIf="(loading$ | async)"></ds-themed-loading>
|
||||
<div *ngIf="!(loading$ | async)">
|
||||
<span class="dropdown-item-text">{{(user$ | async)?.name}} ({{(user$ | async)?.email}})</span>
|
||||
<a class="dropdown-item" [routerLink]="[profileRoute]" routerLinkActive="active">{{'nav.profile' | translate}}</a>
|
||||
|
@@ -34,7 +34,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ds-loading *ngIf="!objects || objects?.isLoading" message="{{'loading.browse-by' | translate}}"></ds-loading>
|
||||
<ds-themed-loading *ngIf="!objects || objects?.isLoading" message="{{'loading.browse-by' | translate}}"></ds-themed-loading>
|
||||
<ds-error *ngIf="objects?.hasFailed" message="{{'error.browse-by' | translate}}"></ds-error>
|
||||
<div *ngIf="!objects?.isLoading && objects?.payload?.page.length === 0" class="alert alert-info w-100" role="alert">
|
||||
{{'browse.empty' | translate}}
|
||||
|
@@ -114,7 +114,7 @@ describe('BrowseByComponent', () => {
|
||||
it('should display a loading message when objects is empty', () => {
|
||||
(comp as any).objects = undefined;
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.query(By.css('ds-loading'))).toBeDefined();
|
||||
expect(fixture.debugElement.query(By.css('ds-themed-loading'))).toBeDefined();
|
||||
});
|
||||
|
||||
it('should display results when objects is not empty', () => {
|
||||
|
@@ -35,8 +35,8 @@
|
||||
</button>
|
||||
</ng-container>
|
||||
<button class="dropdown-item disabled" *ngIf="(isLoading | async)">
|
||||
<ds-loading message="{{'loading.default' | translate}}">
|
||||
</ds-loading>
|
||||
<ds-themed-loading message="{{'loading.default' | translate}}">
|
||||
</ds-themed-loading>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
@@ -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-loading *ngIf="!(groupRD$ | async)"></ds-loading>
|
||||
<ds-themed-loading *ngIf="!(groupRD$ | async)"></ds-themed-loading>
|
||||
<div *ngIf="hasNoGroup$ | async">
|
||||
{{'comcol-role.edit.no-group' | translate}}
|
||||
</div>
|
||||
|
@@ -31,7 +31,7 @@
|
||||
</ng-container>
|
||||
<button *ngIf="loading"
|
||||
class="list-group-item list-group-item-action border-0 list-entry">
|
||||
<ds-loading [showMessage]="false"></ds-loading>
|
||||
<ds-themed-loading [showMessage]="false"></ds-themed-loading>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -21,8 +21,8 @@
|
||||
</ul>
|
||||
</button>
|
||||
<button class="dropdown-item disabled" *ngIf="(isLoadingList | async)" >
|
||||
<ds-loading message="{{'loading.default' | translate}}">
|
||||
</ds-loading>
|
||||
<ds-themed-loading message="{{'loading.default' | translate}}">
|
||||
</ds-themed-loading>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<div class="d-flex">
|
||||
<span class="mr-auto text-contents">
|
||||
<ng-container *ngIf="!(metadataRepresentation$ | async)">
|
||||
<ds-loading [showMessage]="false"></ds-loading>
|
||||
<ds-themed-loading [showMessage]="false"></ds-themed-loading>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="(metadataRepresentation$ | async)">
|
||||
<ds-metadata-representation-loader [mdRepresentation]="metadataRepresentation$ | async"></ds-metadata-representation-loader>
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<div class="d-flex">
|
||||
<span class="mr-auto text-contents">
|
||||
<ng-container *ngIf="!(relatedItem$ | async)">
|
||||
<ds-loading [showMessage]="false"></ds-loading>
|
||||
<ds-themed-loading [showMessage]="false"></ds-themed-loading>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="(relatedItem$ | async)">
|
||||
<ds-listable-object-component-loader [showLabel]="false" [viewMode]="viewType" [object]="(relatedItem$ | async)"></ds-listable-object-component-loader>
|
||||
|
@@ -57,7 +57,7 @@
|
||||
</div>
|
||||
|
||||
<div class="d-flex">
|
||||
<ds-loading *ngIf="!chips" [showMessage]="false"></ds-loading>
|
||||
<ds-themed-loading *ngIf="!chips" [showMessage]="false"></ds-themed-loading>
|
||||
<div *ngIf="chips && !chips.hasItems()">
|
||||
<input type="text"
|
||||
class="border-0 form-control-plaintext tag-input mt-1 mb-1 pl-2 text-muted"
|
||||
|
@@ -6,7 +6,7 @@
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<ds-loading *ngIf="!item || !collection"></ds-loading>
|
||||
<ds-themed-loading *ngIf="!item || !collection"></ds-themed-loading>
|
||||
<ng-container *ngIf="item && collection">
|
||||
<ul ngbNav #nav="ngbNav" class="nav-tabs">
|
||||
<li ngbNavItem>
|
||||
|
@@ -21,8 +21,8 @@
|
||||
[importConfig]="importConfig"
|
||||
(importObject)="import($event)">
|
||||
</ds-viewable-collection>
|
||||
<ds-loading *ngIf="!entriesRD || entriesRD?.isLoading"
|
||||
message="{{'loading.search-results' | translate}}"></ds-loading>
|
||||
<ds-themed-loading *ngIf="!entriesRD || entriesRD?.isLoading"
|
||||
message="{{'loading.search-results' | translate}}"></ds-themed-loading>
|
||||
<ds-error *ngIf="entriesRD?.hasFailed && (!entriesRD?.errorMessage || entriesRD?.statusCode != 400)"
|
||||
message="{{'error.search-results' | translate}}"></ds-error>
|
||||
<div *ngIf="entriesRD?.payload?.page?.length == 0 || entriesRD?.statusCode == 400" id="empty-external-entry-list">
|
||||
|
@@ -145,8 +145,8 @@ describe('DsDynamicLookupRelationExternalSourceTabComponent', () => {
|
||||
expect(viewableCollection).toBeNull();
|
||||
});
|
||||
|
||||
it('should display a ds-loading component', () => {
|
||||
const loading = fixture.debugElement.query(By.css('ds-loading'));
|
||||
it('should display a ds-themed-loading component', () => {
|
||||
const loading = fixture.debugElement.query(By.css('ds-themed-loading'));
|
||||
expect(loading).not.toBeNull();
|
||||
});
|
||||
});
|
||||
|
31
src/app/shared/loading/themed-loading.component.ts
Normal file
31
src/app/shared/loading/themed-loading.component.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { ThemedComponent } from '../../shared/theme-support/themed.component';
|
||||
import { LoadingComponent } from './loading.component';
|
||||
|
||||
/**
|
||||
* Themed wrapper for LoadingComponent
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-themed-loading',
|
||||
styleUrls: [],
|
||||
templateUrl: '../../shared/theme-support/themed.component.html',
|
||||
})
|
||||
export class ThemedLoadingComponent extends ThemedComponent<LoadingComponent> {
|
||||
|
||||
@Input() message: string;
|
||||
@Input() showMessage = true;
|
||||
|
||||
protected inAndOutputNames: (keyof LoadingComponent & keyof this)[] = ['message', 'showMessage'];
|
||||
|
||||
protected getComponentName(): string {
|
||||
return 'LoadingComponent';
|
||||
}
|
||||
|
||||
protected importThemedComponent(themeName: string): Promise<any> {
|
||||
return import(`../../../themes/${themeName}/app/shared/loading/loading.component`);
|
||||
}
|
||||
|
||||
protected importUnthemedComponent(): Promise<any> {
|
||||
return import('./loading.component');
|
||||
}
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
<ds-loading *ngIf="(loading | async) || (isAuthenticated | async)" class="m-5"></ds-loading>
|
||||
<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 login-container">
|
||||
<ng-container *ngFor="let authMethod of (authMethods | async); let i = index">
|
||||
<div *ngIf="i === 1" class="text-center mt-2">
|
||||
|
@@ -18,5 +18,5 @@
|
||||
</div>
|
||||
</div>
|
||||
<ds-error *ngIf="objects.hasFailed" message="{{'error.objects' | translate}}"></ds-error>
|
||||
<ds-loading *ngIf="objects.isLoading" message="{{'loading.objects' | translate}}"></ds-loading>
|
||||
<ds-themed-loading *ngIf="objects.isLoading" message="{{'loading.objects' | translate}}"></ds-themed-loading>
|
||||
</ds-pagination>
|
||||
|
@@ -19,6 +19,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<ds-error *ngIf="objects.hasFailed" message="{{'error.objects' | translate}}"></ds-error>
|
||||
<ds-loading *ngIf="objects.isLoading" message="{{'loading.objects' | translate}}"></ds-loading>
|
||||
<ds-themed-loading *ngIf="objects.isLoading" message="{{'loading.objects' | translate}}"></ds-themed-loading>
|
||||
</ds-pagination>
|
||||
|
||||
|
@@ -6,6 +6,6 @@
|
||||
|
||||
<ds-workflowitem-actions [object]="dso" (processCompleted)="reloadedObject.emit($event.reloadedObject)"></ds-workflowitem-actions>
|
||||
</ng-container>
|
||||
<ds-loading
|
||||
<ds-themed-loading
|
||||
*ngIf="!(item$ | async)"
|
||||
[showMessage]="false"></ds-loading>
|
||||
[showMessage]="false"></ds-themed-loading>
|
||||
|
@@ -6,6 +6,6 @@
|
||||
|
||||
<ds-workspaceitem-actions [object]="dso" (processCompleted)="reloadedObject.emit($event.reloadedObject)"></ds-workspaceitem-actions>
|
||||
</ng-container>
|
||||
<ds-loading
|
||||
<ds-themed-loading
|
||||
*ngIf="!(item$ | async)"
|
||||
[showMessage]="false"></ds-loading>
|
||||
[showMessage]="false"></ds-themed-loading>
|
||||
|
@@ -28,7 +28,7 @@
|
||||
{{'collection.select.empty' | translate}}
|
||||
</div>
|
||||
<ds-error *ngIf="collectionsRD?.hasFailed" message="{{'error.collections' | translate}}"></ds-error>
|
||||
<ds-loading *ngIf="!collectionsRD || collectionsRD?.isLoading" message="{{'loading.collections' | translate}}"></ds-loading>
|
||||
<ds-themed-loading *ngIf="!collectionsRD || collectionsRD?.isLoading" message="{{'loading.collections' | translate}}"></ds-themed-loading>
|
||||
<div *ngVar="(selectedIds$ | async) as selectedIds">
|
||||
<button class="btn collection-confirm float-right"
|
||||
[ngClass]="{'btn-danger': dangerConfirm, 'btn-primary': !dangerConfirm}"
|
||||
|
@@ -36,7 +36,7 @@
|
||||
{{'item.select.empty' | translate}}
|
||||
</div>
|
||||
<ds-error *ngIf="itemsRD?.hasFailed" message="{{'error.items' | translate}}"></ds-error>
|
||||
<ds-loading *ngIf="!itemsRD || itemsRD?.isLoading" message="{{'loading.items' | translate}}"></ds-loading>
|
||||
<ds-themed-loading *ngIf="!itemsRD || itemsRD?.isLoading" message="{{'loading.items' | translate}}"></ds-themed-loading>
|
||||
<div *ngVar="(selectedIds$ | async) as selectedIds">
|
||||
<button class="btn btn-outline-secondary item-cancel float-left" (click)="onCancel()">{{cancelButton | translate}}</button>
|
||||
<button class="btn item-confirm float-right"
|
||||
|
@@ -15,7 +15,7 @@
|
||||
>
|
||||
</ds-viewable-collection>
|
||||
</div>
|
||||
<ds-loading *ngIf="isLoading()" message="{{'loading.search-results' | translate}}"></ds-loading>
|
||||
<ds-themed-loading *ngIf="isLoading()" message="{{'loading.search-results' | translate}}"></ds-themed-loading>
|
||||
<ds-error
|
||||
*ngIf="showError()"
|
||||
message="{{errorMessageLabel() | translate}}"></ds-error>
|
||||
|
@@ -177,6 +177,7 @@ import { ScopeSelectorModalComponent } from './search-form/scope-selector-modal/
|
||||
import { BitstreamRequestACopyPageComponent } from './bitstream-request-a-copy-page/bitstream-request-a-copy-page.component';
|
||||
import { DsSelectComponent } from './ds-select/ds-select.component';
|
||||
import { LogInOidcComponent } from './log-in/methods/oidc/log-in-oidc.component';
|
||||
import { ThemedLoadingComponent } from './loading/themed-loading.component';
|
||||
|
||||
const MODULES = [
|
||||
// Do NOT include UniversalModule, HttpModule, or JsonpModule here
|
||||
@@ -234,6 +235,7 @@ const COMPONENTS = [
|
||||
FileSectionComponent,
|
||||
LangSwitchComponent,
|
||||
LoadingComponent,
|
||||
ThemedLoadingComponent,
|
||||
LogInComponent,
|
||||
LogOutComponent,
|
||||
NumberPickerComponent,
|
||||
|
@@ -23,7 +23,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="treeview-container">
|
||||
<ds-loading *ngIf="loading | async" [showMessage]="false"></ds-loading>
|
||||
<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" >
|
||||
<span>{{'vocabulary-treeview.search.no-result' | translate}}</span>
|
||||
</h4>
|
||||
|
@@ -11,7 +11,7 @@
|
||||
<ng-container *ngVar="reports$ | async as reports">
|
||||
|
||||
<ng-container *ngIf="!reports">
|
||||
<ds-loading></ds-loading>
|
||||
<ds-themed-loading></ds-themed-loading>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="reports">
|
||||
|
@@ -22,7 +22,7 @@
|
||||
</div>
|
||||
|
||||
<div class="submission-form-content">
|
||||
<ds-loading *ngIf="(isLoading() | async)" message="Loading..."></ds-loading>
|
||||
<ds-themed-loading *ngIf="(isLoading() | async)" message="Loading..."></ds-themed-loading>
|
||||
<ng-container *ngFor="let object of (submissionSections | async)">
|
||||
<ds-submission-section-container [collectionId]="collectionId"
|
||||
[submissionId]="submissionId"
|
||||
|
@@ -5,7 +5,7 @@
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<ds-loading *ngIf="isLoading()"></ds-loading>
|
||||
<ds-themed-loading *ngIf="isLoading()"></ds-themed-loading>
|
||||
<ds-collection-dropdown [ngClass]="{'d-none': isLoading()}"
|
||||
(selectionChange)="selectObject($event)"
|
||||
(searchComplete)="searchComplete()"
|
||||
|
@@ -22,8 +22,8 @@
|
||||
[importConfig]="importConfig"
|
||||
(importObject)="import($event)">
|
||||
</ds-viewable-collection>
|
||||
<ds-loading *ngIf="(isLoading$ | async)"
|
||||
message="{{'loading.search-results' | translate}}"></ds-loading>
|
||||
<ds-themed-loading *ngIf="(isLoading$ | async)"
|
||||
message="{{'loading.search-results' | translate}}"></ds-themed-loading>
|
||||
<div *ngIf="!(isLoading$ | async) && entriesRD?.payload?.page?.length === 0" id="empty-external-entry-list">
|
||||
<ds-alert [type]="'alert-info'">{{ 'search.results.empty' | translate }}</ds-alert>
|
||||
</div>
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
<ng-container class="selection">
|
||||
<span *ngIf="!submissionCcLicenses">
|
||||
<ds-loading></ds-loading>
|
||||
<ds-themed-loading></ds-themed-loading>
|
||||
</span>
|
||||
<span *ngIf="getSelectedCcLicense()">
|
||||
{{ getSelectedCcLicense().name }}
|
||||
@@ -121,7 +121,7 @@
|
||||
<ng-container *ngIf="getCcLicenseLink$()">
|
||||
<ng-container *ngVar="getCcLicenseLink$() | async as licenseLink">
|
||||
<div *ngIf="!licenseLink">
|
||||
<ds-loading></ds-loading>
|
||||
<ds-themed-loading></ds-themed-loading>
|
||||
</div>
|
||||
<div *ngIf="licenseLink"
|
||||
class="mt-2 p-4 bg-light text-dark">
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<ds-loading *ngIf="isLoading" message="Loading..."></ds-loading>
|
||||
<ds-themed-loading *ngIf="isLoading" message="Loading..."></ds-themed-loading>
|
||||
<ds-form *ngIf="!isLoading && formModel" #formRef="formComponent"
|
||||
[formId]="formId"
|
||||
[formModel]="formModel"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<div class="thumbnail" [class.limit-width]="limitWidth">
|
||||
<ds-loading *ngIf="isLoading; else showThumbnail" class="thumbnail-content" [showMessage]="false">
|
||||
<ds-themed-loading *ngIf="isLoading; else showThumbnail" class="thumbnail-content" [showMessage]="false">
|
||||
text-content
|
||||
</ds-loading>
|
||||
</ds-themed-loading>
|
||||
<ng-template #showThumbnail>
|
||||
<img *ngIf="src !== null" class="thumbnail-content img-fluid"
|
||||
[src]="src | dsSafeUrl" [alt]="alt | translate" (error)="errorHandler()">
|
||||
|
@@ -115,7 +115,7 @@ describe('ThumbnailComponent', () => {
|
||||
comp.thumbnail = thumbnail;
|
||||
comp.ngOnChanges();
|
||||
fixture.detectChanges();
|
||||
expect(de.query(By.css('ds-loading'))).toBeTruthy();
|
||||
expect(de.query(By.css('ds-themed-loading'))).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user