mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 15:33:04 +00:00
77643: Rename BreadcrumbsService to BreadcrumbsProviderService
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { BreadcrumbsService } from '../../core/breadcrumbs/breadcrumbs.service';
|
import { BreadcrumbsProviderService } from '../../core/breadcrumbs/breadcrumbsProviderService';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface for breadcrumb configuration objects
|
* Interface for breadcrumb configuration objects
|
||||||
@@ -7,7 +7,7 @@ export interface BreadcrumbConfig<T> {
|
|||||||
/**
|
/**
|
||||||
* The service used to calculate the breadcrumb object
|
* The service used to calculate the breadcrumb object
|
||||||
*/
|
*/
|
||||||
provider: BreadcrumbsService<T>;
|
provider: BreadcrumbsProviderService<T>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The key that is used to calculate the breadcrumb display value
|
* The key that is used to calculate the breadcrumb display value
|
||||||
|
@@ -7,14 +7,14 @@ import { RouterTestingModule } from '@angular/router/testing';
|
|||||||
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
||||||
import { TranslateLoaderMock } from '../shared/testing/translate-loader.mock';
|
import { TranslateLoaderMock } from '../shared/testing/translate-loader.mock';
|
||||||
import { BreadcrumbConfig } from './breadcrumb/breadcrumb-config.model';
|
import { BreadcrumbConfig } from './breadcrumb/breadcrumb-config.model';
|
||||||
import { BreadcrumbsService } from '../core/breadcrumbs/breadcrumbs.service';
|
import { BreadcrumbsProviderService } from '../core/breadcrumbs/breadcrumbsProviderService';
|
||||||
import { Breadcrumb } from './breadcrumb/breadcrumb.model';
|
import { Breadcrumb } from './breadcrumb/breadcrumb.model';
|
||||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||||
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
||||||
import { VarDirective } from '../shared/utils/var.directive';
|
import { VarDirective } from '../shared/utils/var.directive';
|
||||||
import { getTestScheduler } from 'jasmine-marbles';
|
import { getTestScheduler } from 'jasmine-marbles';
|
||||||
|
|
||||||
class TestBreadcrumbsService implements BreadcrumbsService<string> {
|
class TestBreadcrumbsService implements BreadcrumbsProviderService<string> {
|
||||||
getBreadcrumbs(key: string, url: string): Observable<Breadcrumb[]> {
|
getBreadcrumbs(key: string, url: string): Observable<Breadcrumb[]> {
|
||||||
return observableOf([new Breadcrumb(key, url)]);
|
return observableOf([new Breadcrumb(key, url)]);
|
||||||
}
|
}
|
||||||
|
@@ -4,7 +4,7 @@ import { Observable } from 'rxjs';
|
|||||||
/**
|
/**
|
||||||
* Service to calculate breadcrumbs for a single part of the route
|
* Service to calculate breadcrumbs for a single part of the route
|
||||||
*/
|
*/
|
||||||
export interface BreadcrumbsService<T> {
|
export interface BreadcrumbsProviderService<T> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method to calculate the breadcrumbs for a part of the route
|
* Method to calculate the breadcrumbs for a part of the route
|
@@ -1,5 +1,5 @@
|
|||||||
import { Breadcrumb } from '../../breadcrumbs/breadcrumb/breadcrumb.model';
|
import { Breadcrumb } from '../../breadcrumbs/breadcrumb/breadcrumb.model';
|
||||||
import { BreadcrumbsService } from './breadcrumbs.service';
|
import { BreadcrumbsProviderService } from './breadcrumbsProviderService';
|
||||||
import { DSONameService } from './dso-name.service';
|
import { DSONameService } from './dso-name.service';
|
||||||
import { Observable, of as observableOf } from 'rxjs';
|
import { Observable, of as observableOf } from 'rxjs';
|
||||||
import { ChildHALResource } from '../shared/child-hal-resource.model';
|
import { ChildHALResource } from '../shared/child-hal-resource.model';
|
||||||
@@ -18,7 +18,7 @@ import { getDSORoute } from '../../app-routing-paths';
|
|||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class DSOBreadcrumbsService implements BreadcrumbsService<ChildHALResource & DSpaceObject> {
|
export class DSOBreadcrumbsService implements BreadcrumbsProviderService<ChildHALResource & DSpaceObject> {
|
||||||
constructor(
|
constructor(
|
||||||
private linkService: LinkService,
|
private linkService: LinkService,
|
||||||
private dsoNameService: DSONameService
|
private dsoNameService: DSONameService
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { Breadcrumb } from '../../breadcrumbs/breadcrumb/breadcrumb.model';
|
import { Breadcrumb } from '../../breadcrumbs/breadcrumb/breadcrumb.model';
|
||||||
import { BreadcrumbsService } from './breadcrumbs.service';
|
import { BreadcrumbsProviderService } from './breadcrumbsProviderService';
|
||||||
import { Observable, of as observableOf } from 'rxjs';
|
import { Observable, of as observableOf } from 'rxjs';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ export const BREADCRUMB_MESSAGE_POSTFIX = '.breadcrumbs';
|
|||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class I18nBreadcrumbsService implements BreadcrumbsService<string> {
|
export class I18nBreadcrumbsService implements BreadcrumbsProviderService<string> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method to calculate the breadcrumbs
|
* Method to calculate the breadcrumbs
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import { Observable, of as observableOf } from 'rxjs';
|
import { Observable, of as observableOf } from 'rxjs';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { BreadcrumbsService } from '../core/breadcrumbs/breadcrumbs.service';
|
import { BreadcrumbsProviderService } from '../core/breadcrumbs/breadcrumbsProviderService';
|
||||||
import { Breadcrumb } from '../breadcrumbs/breadcrumb/breadcrumb.model';
|
import { Breadcrumb } from '../breadcrumbs/breadcrumb/breadcrumb.model';
|
||||||
import { Process } from './processes/process.model';
|
import { Process } from './processes/process.model';
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@ import { Process } from './processes/process.model';
|
|||||||
* Service to calculate process breadcrumbs for a single part of the route
|
* Service to calculate process breadcrumbs for a single part of the route
|
||||||
*/
|
*/
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ProcessBreadcrumbsService implements BreadcrumbsService<Process> {
|
export class ProcessBreadcrumbsService implements BreadcrumbsProviderService<Process> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method to calculate the breadcrumbs
|
* Method to calculate the breadcrumbs
|
||||||
|
Reference in New Issue
Block a user