forked from hazza/dspace-angular
lint fixes
This commit is contained in:
@@ -67,8 +67,8 @@ export class MetadataImportPageComponent implements OnInit {
|
|||||||
);
|
);
|
||||||
this.uploaderId = 'ds-drag-and-drop-uploader' + uniqueId();
|
this.uploaderId = 'ds-drag-and-drop-uploader' + uniqueId();
|
||||||
this.isOverDocumentDropZone = observableOf(false);
|
this.isOverDocumentDropZone = observableOf(false);
|
||||||
window.addEventListener('drop', e => {
|
window.addEventListener('drop', (e: DragEvent) => {
|
||||||
e && e.preventDefault();
|
return e && e.preventDefault();
|
||||||
}, false);
|
}, false);
|
||||||
this.uploader = new FileUploader({
|
this.uploader = new FileUploader({
|
||||||
// required, but using onFileDrop, not uploader
|
// required, but using onFileDrop, not uploader
|
||||||
|
@@ -21,8 +21,8 @@ import { dataService } from '../../cache/builders/build-decorators';
|
|||||||
import { SCRIPT } from '../../../process-page/scripts/script.resource-type';
|
import { SCRIPT } from '../../../process-page/scripts/script.resource-type';
|
||||||
import { hasValue } from '../../../shared/empty.util';
|
import { hasValue } from '../../../shared/empty.util';
|
||||||
|
|
||||||
export const METADATA_IMPORT_SCRIPT_NAME: string = 'metadata-import';
|
export const METADATA_IMPORT_SCRIPT_NAME = 'metadata-import';
|
||||||
export const METADATA_EXPORT_SCRIPT_NAME: string = 'metadata-export';
|
export const METADATA_EXPORT_SCRIPT_NAME = 'metadata-export';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
@dataService(SCRIPT)
|
@dataService(SCRIPT)
|
||||||
|
@@ -99,7 +99,7 @@ export class DSOSelectorComponent implements OnInit {
|
|||||||
return this.searchService.search(
|
return this.searchService.search(
|
||||||
new PaginatedSearchOptions({
|
new PaginatedSearchOptions({
|
||||||
query: query,
|
query: query,
|
||||||
dsoType: this.type != DSpaceObjectType.DSPACEOBJECT ? this.type : null,
|
dsoType: this.type !== DSpaceObjectType.DSPACEOBJECT ? this.type : null,
|
||||||
pagination: this.defaultPagination
|
pagination: this.defaultPagination
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
@@ -18,7 +18,7 @@ import { BehaviorSubject } from 'rxjs';
|
|||||||
selector: 'ds-menu-section',
|
selector: 'ds-menu-section',
|
||||||
template: ''
|
template: ''
|
||||||
})
|
})
|
||||||
export class MenuSectionComponent implements OnInit, OnDestroy{
|
export class MenuSectionComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Observable that emits whether or not this section is currently active
|
* Observable that emits whether or not this section is currently active
|
||||||
@@ -43,7 +43,6 @@ export class MenuSectionComponent implements OnInit, OnDestroy{
|
|||||||
component: GenericConstructor<MenuSectionComponent>
|
component: GenericConstructor<MenuSectionComponent>
|
||||||
}>> = new BehaviorSubject(new Map());
|
}>> = new BehaviorSubject(new Map());
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array to track all subscriptions and unsubscribe them onDestroy
|
* Array to track all subscriptions and unsubscribe them onDestroy
|
||||||
* @type {Array}
|
* @type {Array}
|
||||||
|
@@ -86,7 +86,7 @@ export class MenuComponent implements OnInit, OnDestroy {
|
|||||||
// So this switchMap is equivalent to a subscribe with a forEach inside
|
// So this switchMap is equivalent to a subscribe with a forEach inside
|
||||||
switchMap((sections: MenuSection[]) => sections),
|
switchMap((sections: MenuSection[]) => sections),
|
||||||
switchMap((section: MenuSection) => this.getSectionComponent(section).pipe(
|
switchMap((section: MenuSection) => this.getSectionComponent(section).pipe(
|
||||||
map((component: GenericConstructor<MenuSectionComponent>) => ({ section, component }))
|
map((component: GenericConstructor<MenuSectionComponent>) => ({ section, component }))
|
||||||
)),
|
)),
|
||||||
distinctUntilChanged((x,y) => x.section.id === y.section.id)
|
distinctUntilChanged((x,y) => x.section.id === y.section.id)
|
||||||
).subscribe(({ section, component}) => {
|
).subscribe(({ section, component}) => {
|
||||||
|
Reference in New Issue
Block a user