mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-16 14:33:03 +00:00
[DURACOM-191] fix errors at runtime
This commit is contained in:
@@ -27,7 +27,7 @@ import { ItemAdminSearchResultActionsComponent } from '../../item-admin-search-r
|
||||
styleUrls: ['./item-admin-search-result-grid-element.component.scss'],
|
||||
templateUrl: './item-admin-search-result-grid-element.component.html',
|
||||
standalone: true,
|
||||
imports: [ItemAdminSearchResultActionsComponent]
|
||||
imports: [ItemAdminSearchResultActionsComponent, DynamicComponentLoaderDirective]
|
||||
})
|
||||
/**
|
||||
* The component for displaying a list element for an item search result on the admin search page
|
||||
|
@@ -20,9 +20,6 @@ import {
|
||||
import {
|
||||
DynamicComponentLoaderDirective
|
||||
} from '../../../../../shared/abstract-component-loader/dynamic-component-loader.directive';
|
||||
import {
|
||||
ListableObjectDirective
|
||||
} from '../../../../../shared/object-collection/shared/listable-object/listable-object.directive';
|
||||
import {
|
||||
WorkflowItemSearchResult
|
||||
} from '../../../../../shared/object-collection/shared/workflow-item-search-result.model';
|
||||
@@ -64,14 +61,12 @@ describe('WorkflowItemSearchResultAdminWorkflowGridElementComponent', () => {
|
||||
TestBed.configureTestingModule(
|
||||
{
|
||||
imports: [
|
||||
ListableObjectDirective,
|
||||
WorkflowItemSearchResultAdminWorkflowGridElementComponent,
|
||||
ItemGridElementComponent,
|
||||
DynamicComponentLoaderDirective,
|
||||
NoopAnimationsModule,
|
||||
TranslateModule.forRoot(),
|
||||
RouterTestingModule.withRoutes([]),
|
||||
ListableObjectDirective,
|
||||
ListableModule,
|
||||
WorkflowItemSearchResultAdminWorkflowGridElementComponent
|
||||
],
|
||||
|
@@ -38,7 +38,7 @@ import { NgIf } from '@angular/common';
|
||||
styleUrls: ['./workflow-item-search-result-admin-workflow-grid-element.component.scss'],
|
||||
templateUrl: './workflow-item-search-result-admin-workflow-grid-element.component.html',
|
||||
standalone: true,
|
||||
imports: [NgIf, WorkflowItemAdminWorkflowActionsComponent, TranslateModule]
|
||||
imports: [NgIf, WorkflowItemAdminWorkflowActionsComponent, TranslateModule, DynamicComponentLoaderDirective]
|
||||
})
|
||||
/**
|
||||
* The component for displaying a grid element for an workflow item on the admin workflow search page
|
||||
|
@@ -22,9 +22,6 @@ import {
|
||||
import {
|
||||
DynamicComponentLoaderDirective
|
||||
} from '../../../../../shared/abstract-component-loader/dynamic-component-loader.directive';
|
||||
import {
|
||||
ListableObjectDirective
|
||||
} from '../../../../../shared/object-collection/shared/listable-object/listable-object.directive';
|
||||
import {
|
||||
WorkflowItemSearchResult
|
||||
} from '../../../../../shared/object-collection/shared/workflow-item-search-result.model';
|
||||
@@ -84,7 +81,6 @@ describe('WorkspaceItemSearchResultAdminWorkflowGridElementComponent', () => {
|
||||
TranslateModule.forRoot(),
|
||||
RouterTestingModule.withRoutes([]),
|
||||
ListableModule,
|
||||
ListableObjectDirective,
|
||||
WorkspaceItemSearchResultAdminWorkflowGridElementComponent
|
||||
],
|
||||
providers: [
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { Component, ComponentFactoryResolver, ElementRef, OnInit, ViewChild, OnDestroy, ComponentRef } from '@angular/core';
|
||||
import { Component, ComponentRef, ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/core';
|
||||
|
||||
import { BehaviorSubject, Observable } from 'rxjs';
|
||||
import { map, mergeMap, take, tap } from 'rxjs/operators';
|
||||
@@ -16,7 +16,9 @@ import {
|
||||
import { TruncatableService } from '../../../../../shared/truncatable/truncatable.service';
|
||||
import { BitstreamDataService } from '../../../../../core/data/bitstream-data.service';
|
||||
import { GenericConstructor } from '../../../../../core/shared/generic-constructor';
|
||||
import { DynamicComponentLoaderDirective } from '../../../../../shared/abstract-component-loader/dynamic-component-loader.directive';
|
||||
import {
|
||||
DynamicComponentLoaderDirective
|
||||
} from '../../../../../shared/abstract-component-loader/dynamic-component-loader.directive';
|
||||
import { WorkspaceItem } from '../../../../../core/submission/models/workspaceitem.model';
|
||||
import { LinkService } from '../../../../../core/cache/builders/link.service';
|
||||
import { followLink } from '../../../../../shared/utils/follow-link-config.model';
|
||||
@@ -38,7 +40,9 @@ import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service
|
||||
import { hasValue } from '../../../../../shared/empty.util';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { AsyncPipe } from '@angular/common';
|
||||
import { WorkspaceItemAdminWorkflowActionsComponent } from '../../actions/workspace-item/workspace-item-admin-workflow-actions.component';
|
||||
import {
|
||||
WorkspaceItemAdminWorkflowActionsComponent
|
||||
} from '../../actions/workspace-item/workspace-item-admin-workflow-actions.component';
|
||||
|
||||
@listableObjectComponent(WorkspaceItemSearchResult, ViewMode.GridElement, Context.AdminWorkflowSearch)
|
||||
@Component({
|
||||
@@ -46,7 +50,7 @@ import { WorkspaceItemAdminWorkflowActionsComponent } from '../../actions/worksp
|
||||
styleUrls: ['./workspace-item-search-result-admin-workflow-grid-element.component.scss'],
|
||||
templateUrl: './workspace-item-search-result-admin-workflow-grid-element.component.html',
|
||||
standalone: true,
|
||||
imports: [WorkspaceItemAdminWorkflowActionsComponent, AsyncPipe, TranslateModule]
|
||||
imports: [WorkspaceItemAdminWorkflowActionsComponent, AsyncPipe, TranslateModule, DynamicComponentLoaderDirective]
|
||||
})
|
||||
/**
|
||||
* The component for displaying a grid element for an workflow item on the admin workflow search page
|
||||
|
@@ -34,8 +34,6 @@ import { BrowseByComponent } from '../../shared/browse-by/browse-by.component';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component';
|
||||
import { ThemedBrowseByComponent } from 'src/app/shared/browse-by/themed-browse-by.component';
|
||||
import { rendersBrowseBy } from '../browse-by-switcher/browse-by-decorator';
|
||||
import { BrowseByDataType } from '../browse-by-switcher/browse-by-data-type';
|
||||
import { StartsWithType } from '../../shared/starts-with/starts-with-type';
|
||||
|
||||
@Component({
|
||||
@@ -64,7 +62,6 @@ import { StartsWithType } from '../../shared/starts-with/starts-with-type';
|
||||
* A metadata definition (a.k.a. browse id) is a short term used to describe one or multiple metadata fields.
|
||||
* An example would be 'dateissued' for 'dc.date.issued'
|
||||
*/
|
||||
@rendersBrowseBy(BrowseByDataType.Date)
|
||||
export class BrowseByDateComponent extends BrowseByMetadataComponent implements OnInit {
|
||||
|
||||
/**
|
||||
|
@@ -2,10 +2,10 @@ import {
|
||||
BehaviorSubject,
|
||||
combineLatest as observableCombineLatest,
|
||||
Observable,
|
||||
Subscription,
|
||||
of as observableOf
|
||||
of as observableOf,
|
||||
Subscription
|
||||
} from 'rxjs';
|
||||
import { Component, Inject, OnInit, OnDestroy, Input, OnChanges } from '@angular/core';
|
||||
import { Component, Inject, Input, OnChanges, OnDestroy, OnInit } from '@angular/core';
|
||||
import { RemoteData } from '../../core/data/remote-data';
|
||||
import { PaginatedList } from '../../core/data/paginated-list.model';
|
||||
import { PaginationComponentOptions } from '../../shared/pagination/pagination-component-options.model';
|
||||
@@ -38,7 +38,6 @@ import { BrowseByComponent } from '../../shared/browse-by/browse-by.component';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component';
|
||||
import { ThemedBrowseByComponent } from 'src/app/shared/browse-by/themed-browse-by.component';
|
||||
import { rendersBrowseBy } from '../browse-by-switcher/browse-by-decorator';
|
||||
import { BrowseByDataType } from '../browse-by-switcher/browse-by-data-type';
|
||||
import { Context } from '../../core/shared/context.model';
|
||||
import { StartsWithType } from '../../shared/starts-with/starts-with-type';
|
||||
@@ -72,7 +71,6 @@ export const BBM_PAGINATION_ID = 'bbm';
|
||||
* or multiple metadata fields. An example would be 'author' for
|
||||
* 'dc.contributor.*'
|
||||
*/
|
||||
@rendersBrowseBy(BrowseByDataType.Metadata)
|
||||
export class BrowseByMetadataComponent implements OnInit, OnChanges, OnDestroy {
|
||||
|
||||
/**
|
||||
|
@@ -5,7 +5,9 @@ import { AbstractComponentLoaderComponent } from '../../shared/abstract-componen
|
||||
import { BrowseByDataType } from './browse-by-data-type';
|
||||
import { Context } from '../../core/shared/context.model';
|
||||
import { AsyncPipe, NgComponentOutlet } from '@angular/common';
|
||||
import { DynamicComponentLoaderDirective } from './dynamic-component-loader.directive';
|
||||
import {
|
||||
DynamicComponentLoaderDirective
|
||||
} from '../../shared/abstract-component-loader/dynamic-component-loader.directive';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-browse-by-switcher',
|
||||
|
@@ -1,17 +0,0 @@
|
||||
import { Directive, ViewContainerRef } from '@angular/core';
|
||||
|
||||
/**
|
||||
* Directive used as a hook to know where to inject the dynamic loaded component
|
||||
*/
|
||||
@Directive({
|
||||
selector: '[dsDynamicComponentLoader]',
|
||||
standalone: true
|
||||
})
|
||||
export class DynamicComponentLoaderDirective {
|
||||
|
||||
constructor(
|
||||
public viewContainerRef: ViewContainerRef,
|
||||
) {
|
||||
}
|
||||
|
||||
}
|
@@ -4,7 +4,6 @@ import { VocabularyEntryDetail } from '../../core/submission/vocabularies/models
|
||||
import { ActivatedRoute, Params, RouterLink } from '@angular/router';
|
||||
import { BehaviorSubject, Observable, Subscription } from 'rxjs';
|
||||
import { BrowseDefinition } from '../../core/shared/browse-definition.model';
|
||||
import { rendersBrowseBy } from '../browse-by-switcher/browse-by-decorator';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { HierarchicalBrowseDefinition } from '../../core/shared/hierarchical-browse-definition.model';
|
||||
import { VocabularyTreeviewComponent } from '../../shared/form/vocabulary-treeview/vocabulary-treeview.component';
|
||||
@@ -54,7 +53,6 @@ import { ThemedBrowseByComponent } from '../../shared/browse-by/themed-browse-by
|
||||
/**
|
||||
* Component for browsing items by metadata in a hierarchical controlled vocabulary
|
||||
*/
|
||||
@rendersBrowseBy(BrowseByDataType.Hierarchy)
|
||||
export class BrowseByTaxonomyComponent implements OnInit, OnChanges, OnDestroy {
|
||||
|
||||
/**
|
||||
|
@@ -3,13 +3,12 @@ import { Component, OnInit } from '@angular/core';
|
||||
import { Params } from '@angular/router';
|
||||
import {
|
||||
BrowseByMetadataComponent,
|
||||
browseParamsToOptions, getBrowseSearchOptions
|
||||
browseParamsToOptions,
|
||||
getBrowseSearchOptions
|
||||
} from '../browse-by-metadata/browse-by-metadata.component';
|
||||
import { SortDirection, SortOptions } from '../../core/cache/models/sort-options.model';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { PaginationComponentOptions } from '../../shared/pagination/pagination-component-options.model';
|
||||
import { rendersBrowseBy } from '../browse-by-switcher/browse-by-decorator';
|
||||
import { BrowseByDataType } from '../browse-by-switcher/browse-by-data-type';
|
||||
import { VarDirective } from '../../shared/utils/var.directive';
|
||||
import { AsyncPipe, NgIf } from '@angular/common';
|
||||
import { ComcolPageHeaderComponent } from '../../shared/comcol/comcol-page-header/comcol-page-header.component';
|
||||
@@ -51,7 +50,6 @@ import { ThemedBrowseByComponent } from '../../shared/browse-by/themed-browse-by
|
||||
/**
|
||||
* Component for browsing items by title (dc.title)
|
||||
*/
|
||||
@rendersBrowseBy(BrowseByDataType.Title)
|
||||
export class BrowseByTitleComponent extends BrowseByMetadataComponent implements OnInit {
|
||||
|
||||
ngOnInit(): void {
|
||||
|
@@ -65,7 +65,7 @@ export class SuggestionDataServiceImpl extends UpdateDataServiceImpl<Suggestion>
|
||||
/**
|
||||
* The service handling all Suggestion Target REST requests.
|
||||
*/
|
||||
@Injectable()
|
||||
@Injectable({ providedIn: 'root' })
|
||||
@dataService(SUGGESTION)
|
||||
export class SuggestionsDataService {
|
||||
protected searchFindBySourceMethod = 'findBySource';
|
||||
|
@@ -22,7 +22,7 @@ import { SearchData, SearchDataImpl } from '../../data/base/search-data';
|
||||
import { DefaultChangeAnalyzer } from '../../data/default-change-analyzer.service';
|
||||
import { SUGGESTION_TARGET } from '../models/suggestion-target-object.resource-type';
|
||||
|
||||
@Injectable()
|
||||
@Injectable({ providedIn: 'root' })
|
||||
@dataService(SUGGESTION_TARGET)
|
||||
export class SuggestionTargetDataService extends IdentifiableDataService<SuggestionTarget> {
|
||||
|
||||
|
@@ -25,7 +25,7 @@ import {
|
||||
/**
|
||||
* The service handling the Suggestion targets State.
|
||||
*/
|
||||
@Injectable()
|
||||
@Injectable({providedIn: 'root'})
|
||||
export class SuggestionTargetsStateService {
|
||||
|
||||
/**
|
||||
|
@@ -40,7 +40,7 @@ export interface SuggestionBulkResult {
|
||||
/**
|
||||
* The service handling all Suggestion Target requests to the REST service.
|
||||
*/
|
||||
@Injectable()
|
||||
@Injectable({providedIn: 'root'})
|
||||
export class SuggestionsService {
|
||||
|
||||
/**
|
||||
|
@@ -4,6 +4,7 @@ import { Directive, ViewContainerRef } from '@angular/core';
|
||||
* Directive used as a hook to know where to inject the dynamic loaded component
|
||||
*/
|
||||
@Directive({
|
||||
standalone: true,
|
||||
selector: '[dsDynamicComponentLoader]'
|
||||
})
|
||||
export class DynamicComponentLoaderDirective {
|
||||
|
@@ -50,7 +50,6 @@ describe('ListableObjectComponentLoaderComponent', () => {
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ListableObjectComponentLoaderComponent,
|
||||
ListableObjectDirective,
|
||||
ListableModule,
|
||||
ItemListElementComponent,
|
||||
DynamicComponentLoaderDirective
|
||||
|
@@ -3,9 +3,18 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { AdvancedWorkflowActionsLoaderComponent } from './advanced-workflow-actions-loader.component';
|
||||
import { Router } from '@angular/router';
|
||||
import { RouterStub } from '../../../shared/testing/router.stub';
|
||||
import { ChangeDetectionStrategy, Component, ComponentFactoryResolver, Directive, Injector, NO_ERRORS_SCHEMA, ViewContainerRef } from '@angular/core';
|
||||
import { AdvancedWorkflowActionsDirective } from './advanced-workflow-actions.directive';
|
||||
import { DynamicComponentLoaderDirective } from '../../../shared/abstract-component-loader/dynamic-component-loader.directive';
|
||||
import {
|
||||
ChangeDetectionStrategy,
|
||||
Component,
|
||||
ComponentFactoryResolver,
|
||||
Directive,
|
||||
Injector,
|
||||
NO_ERRORS_SCHEMA,
|
||||
ViewContainerRef
|
||||
} from '@angular/core';
|
||||
import {
|
||||
DynamicComponentLoaderDirective
|
||||
} from '../../../shared/abstract-component-loader/dynamic-component-loader.directive';
|
||||
import {
|
||||
rendersAdvancedWorkflowTaskOption
|
||||
} from '../../../shared/mydspace-actions/claimed-task/switcher/claimed-task-actions-decorator';
|
||||
@@ -38,7 +47,6 @@ describe('AdvancedWorkflowActionsLoaderComponent', () => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
AdvancedWorkflowActionsDirective,
|
||||
RouterTestingModule,
|
||||
DynamicComponentLoaderDirective,
|
||||
AdvancedWorkflowActionsLoaderComponent,
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { ThemedHeaderComponent } from '../../../../app/header/themed-header.component';
|
||||
import { AsyncPipe, NgClass } from '@angular/common';
|
||||
import { AsyncPipe, NgClass, NgIf } from '@angular/common';
|
||||
import { ThemedNavbarComponent } from '../../../../app/navbar/themed-navbar.component';
|
||||
import { HeaderNavbarWrapperComponent as BaseComponent } from '../../../../app/header-nav-wrapper/header-navbar-wrapper.component';
|
||||
import { slideMobileNav } from '../../../../app/shared/animations/slide';
|
||||
@@ -14,7 +14,7 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
styleUrls: ['header-navbar-wrapper.component.scss'],
|
||||
templateUrl: 'header-navbar-wrapper.component.html',
|
||||
standalone: true,
|
||||
imports: [NgClass, ThemedHeaderComponent, ThemedNavbarComponent, AsyncPipe, TranslateModule],
|
||||
imports: [NgClass, ThemedHeaderComponent, ThemedNavbarComponent, AsyncPipe, TranslateModule, NgIf],
|
||||
animations: [slideMobileNav],
|
||||
})
|
||||
export class HeaderNavbarWrapperComponent extends BaseComponent {
|
||||
|
Reference in New Issue
Block a user