mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-15 22:13:02 +00:00
run ng update @angular/core@16 @angular/cli@16 --force
This commit is contained in:
30
package.json
30
package.json
@@ -55,17 +55,17 @@
|
||||
"ts-node": "10.2.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/animations": "^15.2.8",
|
||||
"@angular/animations": "^16.2.12",
|
||||
"@angular/cdk": "^15.2.8",
|
||||
"@angular/common": "^15.2.8",
|
||||
"@angular/compiler": "^15.2.8",
|
||||
"@angular/core": "^15.2.8",
|
||||
"@angular/forms": "^15.2.8",
|
||||
"@angular/localize": "15.2.8",
|
||||
"@angular/platform-browser": "^15.2.8",
|
||||
"@angular/platform-browser-dynamic": "^15.2.8",
|
||||
"@angular/platform-server": "^15.2.8",
|
||||
"@angular/router": "^15.2.8",
|
||||
"@angular/common": "^16.2.12",
|
||||
"@angular/compiler": "^16.2.12",
|
||||
"@angular/core": "^16.2.12",
|
||||
"@angular/forms": "^16.2.12",
|
||||
"@angular/localize": "16.2.12",
|
||||
"@angular/platform-browser": "^16.2.12",
|
||||
"@angular/platform-browser-dynamic": "^16.2.12",
|
||||
"@angular/platform-server": "^16.2.12",
|
||||
"@angular/router": "^16.2.12",
|
||||
"@babel/runtime": "7.21.0",
|
||||
"@kolkov/ngx-gallery": "^2.0.1",
|
||||
"@material-ui/core": "^4.11.0",
|
||||
@@ -132,19 +132,19 @@
|
||||
"sortablejs": "1.15.0",
|
||||
"uuid": "^8.3.2",
|
||||
"webfontloader": "1.6.28",
|
||||
"zone.js": "~0.11.5"
|
||||
"zone.js": "~0.13.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-builders/custom-webpack": "~15.0.0",
|
||||
"@angular-devkit/build-angular": "^15.2.6",
|
||||
"@angular-devkit/build-angular": "^16.2.12",
|
||||
"@angular-eslint/builder": "15.2.1",
|
||||
"@angular-eslint/eslint-plugin": "15.2.1",
|
||||
"@angular-eslint/eslint-plugin-template": "15.2.1",
|
||||
"@angular-eslint/schematics": "15.2.1",
|
||||
"@angular-eslint/template-parser": "15.2.1",
|
||||
"@angular/cli": "^15.2.6",
|
||||
"@angular/compiler-cli": "^15.2.8",
|
||||
"@angular/language-service": "^15.2.8",
|
||||
"@angular/cli": "^16.2.12",
|
||||
"@angular/compiler-cli": "^16.2.12",
|
||||
"@angular/language-service": "^16.2.12",
|
||||
"@cypress/schematic": "^1.5.0",
|
||||
"@fortawesome/fontawesome-free": "^6.4.0",
|
||||
"@ngrx/store-devtools": "^15.4.0",
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { EPerson } from '../../core/eperson/models/eperson.model';
|
||||
import { RemoteData } from '../../core/data/remote-data';
|
||||
@@ -19,7 +19,7 @@ export const EPERSON_EDIT_FOLLOW_LINKS: FollowLinkConfig<EPerson>[] = [
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class EPersonResolver implements Resolve<RemoteData<EPerson>> {
|
||||
export class EPersonResolver {
|
||||
|
||||
constructor(
|
||||
protected ePersonService: EPersonDataService,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
|
||||
/**
|
||||
* Interface for the route parameters.
|
||||
@@ -14,7 +14,7 @@ export interface AdminQualityAssuranceEventsPageParams {
|
||||
* This class represents a resolver that retrieve the route data before the route is activated.
|
||||
*/
|
||||
@Injectable()
|
||||
export class AdminQualityAssuranceEventsPageResolver implements Resolve<AdminQualityAssuranceEventsPageParams> {
|
||||
export class AdminQualityAssuranceEventsPageResolver {
|
||||
|
||||
/**
|
||||
* Method for resolving the parameters in the current route.
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot, Router } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, RouterStateSnapshot, Router } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { PaginatedList } from '../../../core/data/paginated-list.model';
|
||||
@@ -10,7 +10,7 @@ import {environment} from '../../../../environments/environment';
|
||||
* This class represents a resolver that retrieve the route data before the route is activated.
|
||||
*/
|
||||
@Injectable()
|
||||
export class SourceDataResolver implements Resolve<Observable<QualityAssuranceSourceObject[]>> {
|
||||
export class SourceDataResolver {
|
||||
private pageSize = environment.qualityAssuranceConfig.pageSize;
|
||||
/**
|
||||
* Initialize the effect class variables.
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
|
||||
/**
|
||||
* Interface for the route parameters.
|
||||
@@ -14,7 +14,7 @@ export interface AdminQualityAssuranceSourcePageParams {
|
||||
* This class represents a resolver that retrieve the route data before the route is activated.
|
||||
*/
|
||||
@Injectable()
|
||||
export class AdminQualityAssuranceSourcePageResolver implements Resolve<AdminQualityAssuranceSourcePageParams> {
|
||||
export class AdminQualityAssuranceSourcePageResolver {
|
||||
|
||||
/**
|
||||
* Method for resolving the parameters in the current route.
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
|
||||
/**
|
||||
* Interface for the route parameters.
|
||||
@@ -14,7 +14,7 @@ export interface AdminQualityAssuranceTopicsPageParams {
|
||||
* This class represents a resolver that retrieve the route data before the route is activated.
|
||||
*/
|
||||
@Injectable()
|
||||
export class AdminQualityAssuranceTopicsPageResolver implements Resolve<AdminQualityAssuranceTopicsPageParams> {
|
||||
export class AdminQualityAssuranceTopicsPageResolver {
|
||||
|
||||
/**
|
||||
* Method for resolving the parameters in the current route.
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { RemoteData } from '../../../core/data/remote-data';
|
||||
import { BitstreamFormat } from '../../../core/shared/bitstream-format.model';
|
||||
@@ -10,7 +10,7 @@ import { getFirstCompletedRemoteData } from '../../../core/shared/operators';
|
||||
* This class represents a resolver that requests a specific bitstreamFormat before the route is activated
|
||||
*/
|
||||
@Injectable()
|
||||
export class BitstreamFormatsResolver implements Resolve<RemoteData<BitstreamFormat>> {
|
||||
export class BitstreamFormatsResolver {
|
||||
constructor(private bitstreamFormatDataService: BitstreamFormatDataService) {
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import { RemoteData } from '../core/data/remote-data';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Bitstream } from '../core/shared/bitstream.model';
|
||||
@@ -20,7 +20,7 @@ import { getFirstCompletedRemoteData } from '../core/shared/operators';
|
||||
* This class represents a resolver that requests a specific bitstream before the route is activated
|
||||
*/
|
||||
@Injectable()
|
||||
export class BitstreamPageResolver implements Resolve<RemoteData<Bitstream>> {
|
||||
export class BitstreamPageResolver {
|
||||
constructor(private bitstreamService: BitstreamDataService) {
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { RemoteData } from '../core/data/remote-data';
|
||||
import { Bitstream } from '../core/shared/bitstream.model';
|
||||
@@ -13,7 +13,7 @@ import { BitstreamDataService } from '../core/data/bitstream-data.service';
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class LegacyBitstreamUrlResolver implements Resolve<RemoteData<Bitstream>> {
|
||||
export class LegacyBitstreamUrlResolver {
|
||||
constructor(protected bitstreamDataService: BitstreamDataService) {
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot } from '@angular/router';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { DSpaceObjectDataService } from '../core/data/dspace-object-data.service';
|
||||
import { hasNoValue, hasValue } from '../shared/empty.util';
|
||||
@@ -17,7 +17,7 @@ import { PAGE_NOT_FOUND_PATH } from '../app-routing-paths';
|
||||
/**
|
||||
* A guard taking care of the correct route.data being set for the Browse-By components
|
||||
*/
|
||||
export class BrowseByGuard implements CanActivate {
|
||||
export class BrowseByGuard {
|
||||
|
||||
constructor(protected dsoService: DSpaceObjectDataService,
|
||||
protected translate: TranslateService,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import { Collection } from '../core/shared/collection.model';
|
||||
import { Observable } from 'rxjs';
|
||||
import { CollectionDataService } from '../core/data/collection-data.service';
|
||||
@@ -24,7 +24,7 @@ export const COLLECTION_PAGE_LINKS_TO_FOLLOW: FollowLinkConfig<Collection>[] = [
|
||||
* This class represents a resolver that requests a specific collection before the route is activated
|
||||
*/
|
||||
@Injectable()
|
||||
export class CollectionPageResolver implements Resolve<RemoteData<Collection>> {
|
||||
export class CollectionPageResolver {
|
||||
constructor(
|
||||
private collectionService: CollectionDataService,
|
||||
private store: Store<any>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot } from '@angular/router';
|
||||
|
||||
import { hasNoValue, hasValue } from '../../shared/empty.util';
|
||||
import { CommunityDataService } from '../../core/data/community-data.service';
|
||||
@@ -14,7 +14,7 @@ import { getFirstCompletedRemoteData } from '../../core/shared/operators';
|
||||
* @class CreateCollectionPageGuard
|
||||
*/
|
||||
@Injectable()
|
||||
export class CreateCollectionPageGuard implements CanActivate {
|
||||
export class CreateCollectionPageGuard {
|
||||
public constructor(private router: Router, private communityService: CommunityDataService) {
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import { RemoteData } from '../../core/data/remote-data';
|
||||
import { Item } from '../../core/shared/item.model';
|
||||
import { ItemTemplateDataService } from '../../core/data/item-template-data.service';
|
||||
@@ -12,7 +12,7 @@ import { DSONameService } from '../../core/breadcrumbs/dso-name.service';
|
||||
* This class represents a resolver that requests a specific collection's item template before the route is activated
|
||||
*/
|
||||
@Injectable()
|
||||
export class ItemTemplatePageResolver implements Resolve<RemoteData<Item>> {
|
||||
export class ItemTemplatePageResolver {
|
||||
constructor(
|
||||
public dsoNameService: DSONameService,
|
||||
private itemTemplateService: ItemTemplateDataService,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { RemoteData } from '../core/data/remote-data';
|
||||
import { Community } from '../core/shared/community.model';
|
||||
@@ -24,7 +24,7 @@ export const COMMUNITY_PAGE_LINKS_TO_FOLLOW: FollowLinkConfig<Community>[] = [
|
||||
* This class represents a resolver that requests a specific community before the route is activated
|
||||
*/
|
||||
@Injectable()
|
||||
export class CommunityPageResolver implements Resolve<RemoteData<Community>> {
|
||||
export class CommunityPageResolver {
|
||||
constructor(
|
||||
private communityService: CommunityDataService,
|
||||
private store: Store<any>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot } from '@angular/router';
|
||||
|
||||
import { hasNoValue, hasValue } from '../../shared/empty.util';
|
||||
import { CommunityDataService } from '../../core/data/community-data.service';
|
||||
@@ -14,7 +14,7 @@ import { getFirstCompletedRemoteData } from '../../core/shared/operators';
|
||||
* @class CreateCommunityPageGuard
|
||||
*/
|
||||
@Injectable()
|
||||
export class CreateCommunityPageGuard implements CanActivate {
|
||||
export class CreateCommunityPageGuard {
|
||||
public constructor(private router: Router, private communityService: CommunityDataService) {
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { CanActivate } from '@angular/router';
|
||||
|
||||
import { select, Store } from '@ngrx/store';
|
||||
import { Observable } from 'rxjs';
|
||||
import { distinctUntilChanged, filter, map, take } from 'rxjs/operators';
|
||||
@@ -14,7 +14,7 @@ import { isAuthenticationBlocking } from './selectors';
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class AuthBlockingGuard implements CanActivate {
|
||||
export class AuthBlockingGuard {
|
||||
|
||||
constructor(private store: Store<AppState>) {
|
||||
}
|
||||
|
@@ -1,11 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
ActivatedRouteSnapshot,
|
||||
CanActivate,
|
||||
Router,
|
||||
RouterStateSnapshot,
|
||||
UrlTree
|
||||
} from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
import { map, find, switchMap } from 'rxjs/operators';
|
||||
@@ -20,7 +14,7 @@ import { CoreState } from '../core-state.model';
|
||||
* @class AuthenticatedGuard
|
||||
*/
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class AuthenticatedGuard implements CanActivate {
|
||||
export class AuthenticatedGuard {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { BreadcrumbConfig } from '../../breadcrumbs/breadcrumb/breadcrumb-config.model';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import { DSOBreadcrumbsService } from './dso-breadcrumbs.service';
|
||||
import { getFirstCompletedRemoteData, getRemoteDataPayload } from '../shared/operators';
|
||||
import { map } from 'rxjs/operators';
|
||||
@@ -17,7 +17,7 @@ import { IdentifiableDataService } from '../data/base/identifiable-data.service'
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export abstract class DSOBreadcrumbResolver<T extends ChildHALResource & DSpaceObject> implements Resolve<BreadcrumbConfig<T>> {
|
||||
export abstract class DSOBreadcrumbResolver<T extends ChildHALResource & DSpaceObject> {
|
||||
protected constructor(
|
||||
protected breadcrumbService: DSOBreadcrumbsService,
|
||||
protected dataService: IdentifiableDataService<T>,
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { BreadcrumbConfig } from '../../breadcrumbs/breadcrumb/breadcrumb-config.model';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import { I18nBreadcrumbsService } from './i18n-breadcrumbs.service';
|
||||
import { hasNoValue } from '../../shared/empty.util';
|
||||
import { currentPathFromSnapshot } from '../../shared/utils/route.utils';
|
||||
@@ -11,7 +11,7 @@ import { currentPathFromSnapshot } from '../../shared/utils/route.utils';
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class I18nBreadcrumbResolver implements Resolve<BreadcrumbConfig<string>> {
|
||||
export class I18nBreadcrumbResolver {
|
||||
constructor(protected breadcrumbService: I18nBreadcrumbsService) {
|
||||
}
|
||||
|
||||
|
@@ -1,12 +1,12 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {QualityAssuranceBreadcrumbService} from './quality-assurance-breadcrumb.service';
|
||||
import {ActivatedRouteSnapshot, Resolve, RouterStateSnapshot} from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import {BreadcrumbConfig} from '../../breadcrumbs/breadcrumb/breadcrumb-config.model';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class QualityAssuranceBreadcrumbResolver implements Resolve<BreadcrumbConfig<string>> {
|
||||
export class QualityAssuranceBreadcrumbResolver {
|
||||
constructor(protected breadcrumbService: QualityAssuranceBreadcrumbService) {}
|
||||
|
||||
/**
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { AuthorizationDataService } from '../authorization-data.service';
|
||||
import { ActivatedRouteSnapshot, Resolve, Router, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot, ResolveFn } from '@angular/router';
|
||||
import { RemoteData } from '../../remote-data';
|
||||
import { Observable, of as observableOf } from 'rxjs';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../../../../shared/remote-data.utils';
|
||||
@@ -12,7 +12,9 @@ import { AuthService } from '../../../auth/auth.service';
|
||||
* Test implementation of abstract class DsoPageSingleFeatureGuard
|
||||
*/
|
||||
class DsoPageSingleFeatureGuardImpl extends DsoPageSingleFeatureGuard<any> {
|
||||
constructor(protected resolver: Resolve<RemoteData<any>>,
|
||||
constructor(protected resolver: {
|
||||
resolve: ResolveFn<RemoteData<any>>;
|
||||
},
|
||||
protected authorizationService: AuthorizationDataService,
|
||||
protected router: Router,
|
||||
protected authService: AuthService,
|
||||
@@ -30,7 +32,9 @@ describe('DsoPageSingleFeatureGuard', () => {
|
||||
let authorizationService: AuthorizationDataService;
|
||||
let router: Router;
|
||||
let authService: AuthService;
|
||||
let resolver: Resolve<RemoteData<any>>;
|
||||
let resolver: {
|
||||
resolve: ResolveFn<RemoteData<any>>;
|
||||
};
|
||||
let object: DSpaceObject;
|
||||
let route;
|
||||
let parentRoute;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { AuthorizationDataService } from '../authorization-data.service';
|
||||
import { ActivatedRouteSnapshot, Resolve, Router, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot, ResolveFn } from '@angular/router';
|
||||
import { RemoteData } from '../../remote-data';
|
||||
import { Observable, of as observableOf } from 'rxjs';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../../../../shared/remote-data.utils';
|
||||
@@ -12,7 +12,9 @@ import { DsoPageSomeFeatureGuard } from './dso-page-some-feature.guard';
|
||||
* Test implementation of abstract class DsoPageSomeFeatureGuard
|
||||
*/
|
||||
class DsoPageSomeFeatureGuardImpl extends DsoPageSomeFeatureGuard<any> {
|
||||
constructor(protected resolver: Resolve<RemoteData<any>>,
|
||||
constructor(protected resolver: {
|
||||
resolve: ResolveFn<RemoteData<any>>;
|
||||
},
|
||||
protected authorizationService: AuthorizationDataService,
|
||||
protected router: Router,
|
||||
protected authService: AuthService,
|
||||
@@ -30,7 +32,9 @@ describe('DsoPageSomeFeatureGuard', () => {
|
||||
let authorizationService: AuthorizationDataService;
|
||||
let router: Router;
|
||||
let authService: AuthService;
|
||||
let resolver: Resolve<RemoteData<any>>;
|
||||
let resolver: {
|
||||
resolve: ResolveFn<RemoteData<any>>;
|
||||
};
|
||||
let object: DSpaceObject;
|
||||
let route;
|
||||
let parentRoute;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { ActivatedRouteSnapshot, Resolve, Router, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot, ResolveFn } from '@angular/router';
|
||||
import { RemoteData } from '../../remote-data';
|
||||
import { AuthorizationDataService } from '../authorization-data.service';
|
||||
import { Observable } from 'rxjs';
|
||||
@@ -14,7 +14,9 @@ import { SomeFeatureAuthorizationGuard } from './some-feature-authorization.guar
|
||||
* This guard utilizes a resolver to retrieve the relevant object to check authorizations for
|
||||
*/
|
||||
export abstract class DsoPageSomeFeatureGuard<T extends DSpaceObject> extends SomeFeatureAuthorizationGuard {
|
||||
constructor(protected resolver: Resolve<RemoteData<T>>,
|
||||
constructor(protected resolver: {
|
||||
resolve: ResolveFn<RemoteData<T>>;
|
||||
},
|
||||
protected authorizationService: AuthorizationDataService,
|
||||
protected router: Router,
|
||||
protected authService: AuthService) {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
|
||||
import { AuthorizationDataService } from '../authorization-data.service';
|
||||
import { FeatureID } from '../feature-id';
|
||||
import { combineLatest as observableCombineLatest, Observable, of as observableOf } from 'rxjs';
|
||||
@@ -11,7 +11,7 @@ import { returnForbiddenUrlTreeOrLoginOnAllFalse } from '../../../shared/authori
|
||||
* doesn't have authorized rights on any of the specified features and/or object.
|
||||
* Override the desired getters in the parent class for checking specific authorization on a list of features and/or object.
|
||||
*/
|
||||
export abstract class SomeFeatureAuthorizationGuard implements CanActivate {
|
||||
export abstract class SomeFeatureAuthorizationGuard {
|
||||
constructor(protected authorizationService: AuthorizationDataService,
|
||||
protected router: Router,
|
||||
protected authService: AuthService) {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
|
||||
import { Observable, of as observableOf } from 'rxjs';
|
||||
import { returnEndUserAgreementUrlTreeOnFalse } from '../shared/authorized.operators';
|
||||
import { environment } from '../../../environments/environment';
|
||||
@@ -7,7 +7,7 @@ import { environment } from '../../../environments/environment';
|
||||
* An abstract guard for redirecting users to the user agreement page if a certain condition is met
|
||||
* That condition is defined by abstract method hasAccepted
|
||||
*/
|
||||
export abstract class AbstractEndUserAgreementGuard implements CanActivate {
|
||||
export abstract class AbstractEndUserAgreementGuard {
|
||||
|
||||
constructor(protected router: Router) {
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot, UrlTree } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, RouterStateSnapshot, UrlTree } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { AuthorizationDataService } from '../data/feature-authorization/authorization-data.service';
|
||||
import { FeatureID } from '../data/feature-authorization/feature-id';
|
||||
@@ -8,7 +8,7 @@ import { Injectable } from '@angular/core';
|
||||
* An guard for redirecting users to the feedback page if user is authorized
|
||||
*/
|
||||
@Injectable()
|
||||
export class FeedbackGuard implements CanActivate {
|
||||
export class FeedbackGuard {
|
||||
|
||||
constructor(private authorizationService: AuthorizationDataService) {
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Inject, Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
|
||||
import { AppConfig, APP_CONFIG } from '../../../config/app-config.interface';
|
||||
import { isNotEmpty } from '../../shared/empty.util';
|
||||
|
||||
@@ -8,7 +8,7 @@ import { isNotEmpty } from '../../shared/empty.util';
|
||||
* When no redirect url is found, the user is redirected to the homepage
|
||||
*/
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class ReloadGuard implements CanActivate {
|
||||
export class ReloadGuard {
|
||||
constructor(
|
||||
private router: Router,
|
||||
@Inject(APP_CONFIG) private appConfig: AppConfig,
|
||||
|
@@ -1,12 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
ActivatedRouteSnapshot,
|
||||
CanActivateChild,
|
||||
Router,
|
||||
RouterStateSnapshot,
|
||||
UrlTree,
|
||||
NavigationStart
|
||||
} from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot, UrlTree, NavigationStart } from '@angular/router';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
import { take, map, filter } from 'rxjs/operators';
|
||||
@@ -21,7 +14,7 @@ import { getPageInternalServerErrorRoute } from '../../app-routing-paths';
|
||||
* A guard that checks if root api endpoint is reachable.
|
||||
* If not redirect to 500 error page
|
||||
*/
|
||||
export class ServerCheckGuard implements CanActivateChild {
|
||||
export class ServerCheckGuard {
|
||||
constructor(private router: Router, private rootDataService: RootDataService) {
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { followLink } from '../../../shared/utils/follow-link-config.model';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { switchMap } from 'rxjs/operators';
|
||||
@@ -12,7 +12,7 @@ import { IdentifiableDataService } from '../../data/base/identifiable-data.servi
|
||||
* This class represents a resolver that requests a specific item before the route is activated
|
||||
*/
|
||||
@Injectable()
|
||||
export class SubmissionObjectResolver<T> implements Resolve<RemoteData<T>> {
|
||||
export class SubmissionObjectResolver<T> {
|
||||
constructor(
|
||||
protected dataService: IdentifiableDataService<any>,
|
||||
protected store: Store<any>,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import { SiteDataService } from '../core/data/site-data.service';
|
||||
import { Site } from '../core/shared/site.model';
|
||||
import { Observable } from 'rxjs';
|
||||
@@ -9,7 +9,7 @@ import { take } from 'rxjs/operators';
|
||||
* The class that resolve the Site object for a route
|
||||
*/
|
||||
@Injectable()
|
||||
export class HomePageResolver implements Resolve<Site> {
|
||||
export class HomePageResolver {
|
||||
constructor(private siteService: SiteDataService) {
|
||||
}
|
||||
|
||||
|
@@ -3,14 +3,7 @@ import { ComponentFixture, fakeAsync, TestBed, waitForAsync } from '@angular/cor
|
||||
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
||||
import { TranslateLoaderMock } from '../../shared/mocks/translate-loader.mock';
|
||||
import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import {
|
||||
ActivatedRoute,
|
||||
ActivatedRouteSnapshot,
|
||||
CanActivate,
|
||||
RouterModule,
|
||||
RouterStateSnapshot,
|
||||
UrlTree
|
||||
} from '@angular/router';
|
||||
import { ActivatedRoute, ActivatedRouteSnapshot, RouterModule, RouterStateSnapshot, UrlTree } from '@angular/router';
|
||||
import { EditItemPageComponent } from './edit-item-page.component';
|
||||
import { Observable, of as observableOf } from 'rxjs';
|
||||
import { By } from '@angular/platform-browser';
|
||||
@@ -21,13 +14,13 @@ describe('ItemPageComponent', () => {
|
||||
let comp: EditItemPageComponent;
|
||||
let fixture: ComponentFixture<EditItemPageComponent>;
|
||||
|
||||
class AcceptAllGuard implements CanActivate {
|
||||
class AcceptAllGuard {
|
||||
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
|
||||
return observableOf(true);
|
||||
}
|
||||
}
|
||||
|
||||
class AcceptNoneGuard implements CanActivate {
|
||||
class AcceptNoneGuard {
|
||||
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
|
||||
return observableOf(false);
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { fadeIn, fadeInOut } from '../../shared/animations/fade';
|
||||
import { ChangeDetectionStrategy, Component, Injector, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, CanActivate, Route, Router, RouterLink, RouterOutlet } from '@angular/router';
|
||||
import { ActivatedRoute, Route, Router, RouterLink, RouterOutlet, CanActivateFn } from '@angular/router';
|
||||
import { RemoteData } from '../../core/data/remote-data';
|
||||
import { Item } from '../../core/shared/item.model';
|
||||
import { combineLatest as observableCombineLatest, Observable, of as observableOf } from 'rxjs';
|
||||
@@ -63,8 +63,14 @@ export class EditItemPageComponent implements OnInit {
|
||||
.map((child: Route) => {
|
||||
let enabled = observableOf(true);
|
||||
if (isNotEmpty(child.canActivate)) {
|
||||
enabled = observableCombineLatest(child.canActivate.map((guardConstructor: GenericConstructor<CanActivate>) => {
|
||||
const guard: CanActivate = this.injector.get<CanActivate>(guardConstructor);
|
||||
enabled = observableCombineLatest(child.canActivate.map((guardConstructor: GenericConstructor<{
|
||||
canActivate: CanActivateFn;
|
||||
}>) => {
|
||||
const guard: {
|
||||
canActivate: CanActivateFn;
|
||||
} = this.injector.get<{
|
||||
canActivate: CanActivateFn;
|
||||
}>(guardConstructor);
|
||||
return guard.canActivate(this.route.snapshot, this.router.routerState.snapshot);
|
||||
})
|
||||
).pipe(
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, Router, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { RemoteData } from '../core/data/remote-data';
|
||||
import { ItemDataService } from '../core/data/item-data.service';
|
||||
@@ -27,7 +27,7 @@ export const ITEM_PAGE_LINKS_TO_FOLLOW: FollowLinkConfig<Item>[] = [
|
||||
* This class represents a resolver that requests a specific item before the route is activated
|
||||
*/
|
||||
@Injectable()
|
||||
export class ItemResolver implements Resolve<RemoteData<Item>> {
|
||||
export class ItemResolver {
|
||||
constructor(
|
||||
protected itemService: ItemDataService,
|
||||
protected store: Store<any>,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, Router, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { RemoteData } from '../../core/data/remote-data';
|
||||
import { followLink, FollowLinkConfig } from '../../shared/utils/follow-link-config.model';
|
||||
@@ -21,7 +21,7 @@ export const VERSION_PAGE_LINKS_TO_FOLLOW: FollowLinkConfig<Version>[] = [
|
||||
* This class represents a resolver that requests a specific version before the route is activated
|
||||
*/
|
||||
@Injectable()
|
||||
export class VersionResolver implements Resolve<RemoteData<Version>> {
|
||||
export class VersionResolver {
|
||||
constructor(
|
||||
protected versionService: VersionDataService,
|
||||
protected store: Store<any>,
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { IdentifierType } from '../core/data/request.models';
|
||||
import { Observable } from 'rxjs';
|
||||
@@ -13,7 +13,7 @@ interface LookupParams {
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
export class LookupGuard implements CanActivate {
|
||||
export class LookupGuard {
|
||||
|
||||
constructor(private dsoService: DsoRedirectService) {
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import { combineLatest as observableCombineLatest, combineLatest, Observable } from 'rxjs';
|
||||
import { MenuID } from './shared/menu/menu-id.model';
|
||||
import { MenuState } from './shared/menu/menu-state.model';
|
||||
@@ -54,7 +54,7 @@ import {
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class MenuResolver implements Resolve<boolean> {
|
||||
export class MenuResolver {
|
||||
constructor(
|
||||
protected menuService: MenuService,
|
||||
protected browseService: BrowseService,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, CanActivate, NavigationExtras, Router, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, NavigationExtras, Router, RouterStateSnapshot } from '@angular/router';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
import { first, map } from 'rxjs/operators';
|
||||
@@ -13,7 +13,7 @@ import { MyDSpaceConfigurationService } from './my-dspace-configuration.service'
|
||||
* @class MyDSpaceGuard
|
||||
*/
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class MyDSpaceGuard implements CanActivate {
|
||||
export class MyDSpaceGuard {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { Process } from './processes/process.model';
|
||||
@@ -13,7 +13,7 @@ import { ProcessBreadcrumbsService } from './process-breadcrumbs.service';
|
||||
* This class represents a resolver that requests a specific process before the route is activated
|
||||
*/
|
||||
@Injectable()
|
||||
export class ProcessBreadcrumbResolver implements Resolve<BreadcrumbConfig<Process>> {
|
||||
export class ProcessBreadcrumbResolver {
|
||||
constructor(protected breadcrumbService: ProcessBreadcrumbsService, private processService: ProcessDataService) {
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import { RemoteData } from '../core/data/remote-data';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Process } from './processes/process.model';
|
||||
@@ -11,7 +11,7 @@ import { getFirstCompletedRemoteData } from '../core/shared/operators';
|
||||
* This class represents a resolver that requests a specific process before the route is activated
|
||||
*/
|
||||
@Injectable()
|
||||
export class ProcessPageResolver implements Resolve<RemoteData<Process>> {
|
||||
export class ProcessPageResolver {
|
||||
constructor(private processService: ProcessDataService) {
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import { EpersonRegistrationService } from '../core/data/eperson-registration.service';
|
||||
import { Registration } from '../core/shared/registration.model';
|
||||
import { Observable } from 'rxjs';
|
||||
@@ -10,7 +10,7 @@ import { getFirstCompletedRemoteData } from '../core/shared/operators';
|
||||
/**
|
||||
* Resolver to resolve a Registration object based on the provided token
|
||||
*/
|
||||
export class RegistrationResolver implements Resolve<RemoteData<Registration>> {
|
||||
export class RegistrationResolver {
|
||||
|
||||
constructor(private epersonRegistrationService: EpersonRegistrationService) {
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot } from '@angular/router';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs/internal/Observable';
|
||||
import { EpersonRegistrationService } from '../core/data/eperson-registration.service';
|
||||
@@ -15,7 +15,7 @@ import { redirectOn4xx } from '../core/shared/authorized.operators';
|
||||
* The guard also adds the resulting RemoteData<Registration> object to the route's data for further usage in components
|
||||
* The reason this is a guard and not a resolver, is because it has to run before the EndUserAgreementCookieGuard
|
||||
*/
|
||||
export class RegistrationGuard implements CanActivate {
|
||||
export class RegistrationGuard {
|
||||
constructor(private epersonRegistrationService: EpersonRegistrationService,
|
||||
private router: Router,
|
||||
private authService: AuthService) {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import { RemoteData } from '../core/data/remote-data';
|
||||
import { ItemRequest } from '../core/shared/item-request.model';
|
||||
import { Observable } from 'rxjs';
|
||||
@@ -10,7 +10,7 @@ import { getFirstCompletedRemoteData } from '../core/shared/operators';
|
||||
* Resolves an {@link ItemRequest} from the token found in the route's parameters
|
||||
*/
|
||||
@Injectable()
|
||||
export class RequestCopyResolver implements Resolve<RemoteData<ItemRequest>> {
|
||||
export class RequestCopyResolver {
|
||||
|
||||
constructor(
|
||||
private itemRequestDataService: ItemRequestDataService,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
@Injectable()
|
||||
@@ -8,7 +8,7 @@ import { Observable } from 'rxjs';
|
||||
* The format of the key will be "{configuration}.search.title" with:
|
||||
* - configuration: The current configuration stored in route.params
|
||||
*/
|
||||
export class ConfigurationSearchPageGuard implements CanActivate {
|
||||
export class ConfigurationSearchPageGuard {
|
||||
canActivate(
|
||||
route: ActivatedRouteSnapshot,
|
||||
state: RouterStateSnapshot): Observable<boolean> | Promise<boolean> | boolean {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import { combineLatest, Observable, of as observableOf } from 'rxjs';
|
||||
import { FeatureID } from '../../core/data/feature-authorization/feature-id';
|
||||
import { MenuService } from '../menu/menu.service';
|
||||
@@ -31,7 +31,7 @@ import { Collection } from '../../core/shared/collection.model';
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class DSOEditMenuResolver implements Resolve<{ [key: string]: MenuSection[] }> {
|
||||
export class DSOEditMenuResolver {
|
||||
|
||||
constructor(
|
||||
protected dSpaceObjectDataService: DSpaceObjectDataService,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, Router, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot } from '@angular/router';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
@@ -15,7 +15,7 @@ import { getDataServiceFor } from '../../../core/data/base/data-service.decorato
|
||||
* This class represents a resolver that requests a specific item before the route is activated
|
||||
*/
|
||||
@Injectable()
|
||||
export class ResourcePolicyTargetResolver implements Resolve<RemoteData<DSpaceObject>> {
|
||||
export class ResourcePolicyTargetResolver {
|
||||
/**
|
||||
* The data service used to make request.
|
||||
*/
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, Router, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot } from '@angular/router';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
@@ -14,7 +14,7 @@ import { getFirstCompletedRemoteData } from '../../../core/shared/operators';
|
||||
* This class represents a resolver that requests a specific item before the route is activated
|
||||
*/
|
||||
@Injectable()
|
||||
export class ResourcePolicyResolver implements Resolve<RemoteData<ResourcePolicy>> {
|
||||
export class ResourcePolicyResolver {
|
||||
|
||||
constructor(private resourcePolicyService: ResourcePolicyDataService, private router: Router) {
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Resolve } from '@angular/router';
|
||||
|
||||
import { RemoteData } from '../core/data/remote-data';
|
||||
import { Item } from '../core/shared/item.model';
|
||||
import { Store } from '@ngrx/store';
|
||||
@@ -10,7 +10,7 @@ import { SubmissionObjectResolver } from '../core/submission/resolver/submission
|
||||
* This class represents a resolver that requests a specific item before the route is activated
|
||||
*/
|
||||
@Injectable()
|
||||
export class ItemFromWorkflowResolver extends SubmissionObjectResolver<Item> implements Resolve<RemoteData<Item>> {
|
||||
export class ItemFromWorkflowResolver extends SubmissionObjectResolver<Item> {
|
||||
constructor(
|
||||
private workflowItemService: WorkflowItemDataService,
|
||||
protected store: Store<any>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { RemoteData } from '../core/data/remote-data';
|
||||
import { followLink } from '../shared/utils/follow-link-config.model';
|
||||
@@ -11,7 +11,7 @@ import { getFirstCompletedRemoteData } from '../core/shared/operators';
|
||||
* This class represents a resolver that requests a specific workflow item before the route is activated
|
||||
*/
|
||||
@Injectable()
|
||||
export class WorkflowItemPageResolver implements Resolve<RemoteData<WorkflowItem>> {
|
||||
export class WorkflowItemPageResolver {
|
||||
constructor(private workflowItemService: WorkflowItemDataService) {
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Resolve } from '@angular/router';
|
||||
|
||||
import { RemoteData } from '../core/data/remote-data';
|
||||
import { Item } from '../core/shared/item.model';
|
||||
import { Store } from '@ngrx/store';
|
||||
@@ -10,7 +10,7 @@ import { WorkspaceitemDataService } from '../core/submission/workspaceitem-data.
|
||||
* This class represents a resolver that requests a specific item before the route is activated
|
||||
*/
|
||||
@Injectable()
|
||||
export class ItemFromWorkspaceResolver extends SubmissionObjectResolver<Item> implements Resolve<RemoteData<Item>> {
|
||||
export class ItemFromWorkspaceResolver extends SubmissionObjectResolver<Item> {
|
||||
constructor(
|
||||
private workspaceItemService: WorkspaceitemDataService,
|
||||
protected store: Store<any>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { RemoteData } from '../core/data/remote-data';
|
||||
import { followLink } from '../shared/utils/follow-link-config.model';
|
||||
@@ -11,7 +11,7 @@ import { getFirstCompletedRemoteData } from '../core/shared/operators';
|
||||
* This class represents a resolver that requests a specific workflow item before the route is activated
|
||||
*/
|
||||
@Injectable()
|
||||
export class WorkspaceItemPageResolver implements Resolve<RemoteData<WorkflowItem>> {
|
||||
export class WorkspaceItemPageResolver {
|
||||
constructor(private workspaceItemService: WorkspaceitemDataService) {
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user