mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
feat: migrate everything to standalone and fix build errors
This commit is contained in:
@@ -139,7 +139,6 @@
|
||||
}
|
||||
],
|
||||
"@angular-eslint/no-attribute-decorator": "error",
|
||||
"@angular-eslint/no-forward-ref": "error",
|
||||
"@angular-eslint/no-output-native": "warn",
|
||||
"@angular-eslint/no-output-on-prefix": "warn",
|
||||
"@angular-eslint/no-conflicting-lifecycle": "warn",
|
||||
|
@@ -37,11 +37,6 @@ export const ValidateEmailErrorStateMatcher: DynamicErrorMessagesMatcher =
|
||||
NgbAccordionModule,
|
||||
SearchModule,
|
||||
AccessControlFormModule,
|
||||
],
|
||||
exports: [
|
||||
MembersListComponent,
|
||||
],
|
||||
declarations: [
|
||||
EPeopleRegistryComponent,
|
||||
EPersonFormComponent,
|
||||
GroupsRegistryComponent,
|
||||
@@ -50,7 +45,10 @@ export const ValidateEmailErrorStateMatcher: DynamicErrorMessagesMatcher =
|
||||
MembersListComponent,
|
||||
BulkAccessComponent,
|
||||
BulkAccessBrowseComponent,
|
||||
BulkAccessSettingsComponent,
|
||||
BulkAccessSettingsComponent
|
||||
],
|
||||
exports: [
|
||||
MembersListComponent,
|
||||
],
|
||||
providers: [
|
||||
{
|
||||
|
@@ -31,9 +31,9 @@ describe('BulkAccessBrowseComponent', () => {
|
||||
imports: [
|
||||
NgbAccordionModule,
|
||||
NgbNavModule,
|
||||
TranslateModule.forRoot()
|
||||
TranslateModule.forRoot(),
|
||||
BulkAccessBrowseComponent
|
||||
],
|
||||
declarations: [BulkAccessBrowseComponent],
|
||||
providers: [{ provide: SelectableListService, useValue: selectableListService },],
|
||||
schemas: [
|
||||
NO_ERRORS_SCHEMA
|
||||
|
@@ -14,6 +14,19 @@ import { createSuccessfulRemoteDataObject } from '../../../shared/remote-data.ut
|
||||
import { PageInfo } from '../../../core/shared/page-info.model';
|
||||
import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model';
|
||||
import { hasValue } from '../../../shared/empty.util';
|
||||
import { PaginationComponent } from '../../../shared/pagination/pagination.component';
|
||||
import { AsyncPipe, NgForOf, NgIf } from '@angular/common';
|
||||
import { NgbAccordionModule, NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { ThemedSearchComponent } from '../../../shared/search/themed-search.component';
|
||||
import { BrowserOnlyPipe } from '../../../shared/utils/browser-only.pipe';
|
||||
import { NgxPaginationModule } from 'ngx-pagination';
|
||||
import {
|
||||
SelectableListItemControlComponent
|
||||
} from '../../../shared/object-collection/shared/selectable-list-item-control/selectable-list-item-control.component';
|
||||
import {
|
||||
ListableObjectComponentLoaderComponent
|
||||
} from '../../../shared/object-collection/shared/listable-object/listable-object-component-loader.component';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-bulk-access-browse',
|
||||
@@ -24,7 +37,22 @@ import { hasValue } from '../../../shared/empty.util';
|
||||
provide: SEARCH_CONFIG_SERVICE,
|
||||
useClass: SearchConfigurationService
|
||||
}
|
||||
]
|
||||
],
|
||||
imports: [
|
||||
PaginationComponent,
|
||||
AsyncPipe,
|
||||
NgbAccordionModule,
|
||||
TranslateModule,
|
||||
NgIf,
|
||||
NgbNavModule,
|
||||
ThemedSearchComponent,
|
||||
BrowserOnlyPipe,
|
||||
NgForOf,
|
||||
NgxPaginationModule,
|
||||
SelectableListItemControlComponent,
|
||||
ListableObjectComponentLoaderComponent
|
||||
],
|
||||
standalone: true
|
||||
})
|
||||
export class BulkAccessBrowseComponent implements OnInit, OnDestroy {
|
||||
|
||||
|
@@ -71,9 +71,9 @@ describe('BulkAccessComponent', () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [
|
||||
RouterTestingModule,
|
||||
TranslateModule.forRoot()
|
||||
TranslateModule.forRoot(),
|
||||
BulkAccessComponent
|
||||
],
|
||||
declarations: [ BulkAccessComponent ],
|
||||
providers: [
|
||||
{ provide: BulkAccessControlService, useValue: bulkAccessControlServiceMock },
|
||||
{ provide: NotificationsService, useValue: NotificationsServiceStub },
|
||||
|
@@ -7,11 +7,19 @@ import { BulkAccessSettingsComponent } from './settings/bulk-access-settings.com
|
||||
import { BulkAccessControlService } from '../../shared/access-control-form-container/bulk-access-control.service';
|
||||
import { SelectableListState } from '../../shared/object-list/selectable-list/selectable-list.reducer';
|
||||
import { SelectableListService } from '../../shared/object-list/selectable-list/selectable-list.service';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { BulkAccessBrowseComponent } from './browse/bulk-access-browse.component';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-bulk-access',
|
||||
templateUrl: './bulk-access.component.html',
|
||||
styleUrls: ['./bulk-access.component.scss']
|
||||
styleUrls: ['./bulk-access.component.scss'],
|
||||
imports: [
|
||||
TranslateModule,
|
||||
BulkAccessSettingsComponent,
|
||||
BulkAccessBrowseComponent
|
||||
],
|
||||
standalone: true
|
||||
})
|
||||
export class BulkAccessComponent implements OnInit {
|
||||
|
||||
|
@@ -41,8 +41,7 @@ describe('BulkAccessSettingsComponent', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [NgbAccordionModule, TranslateModule.forRoot()],
|
||||
declarations: [BulkAccessSettingsComponent],
|
||||
imports: [NgbAccordionModule, TranslateModule.forRoot(), BulkAccessSettingsComponent],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
}).compileComponents();
|
||||
});
|
||||
|
@@ -2,12 +2,22 @@ import { Component, ViewChild } from '@angular/core';
|
||||
import {
|
||||
AccessControlFormContainerComponent
|
||||
} from '../../../shared/access-control-form-container/access-control-form-container.component';
|
||||
import { NgbAccordionModule } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { NgIf } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-bulk-access-settings',
|
||||
templateUrl: 'bulk-access-settings.component.html',
|
||||
styleUrls: ['./bulk-access-settings.component.scss'],
|
||||
exportAs: 'dsBulkSettings'
|
||||
exportAs: 'dsBulkSettings',
|
||||
imports: [
|
||||
NgbAccordionModule,
|
||||
TranslateModule,
|
||||
NgIf,
|
||||
AccessControlFormContainerComponent
|
||||
],
|
||||
standalone: true
|
||||
})
|
||||
export class BulkAccessSettingsComponent {
|
||||
|
||||
|
@@ -129,9 +129,7 @@ describe('EPeopleRegistryComponent', () => {
|
||||
provide: TranslateLoader,
|
||||
useClass: TranslateLoaderMock
|
||||
}
|
||||
}),
|
||||
],
|
||||
declarations: [EPeopleRegistryComponent],
|
||||
}), EPeopleRegistryComponent],
|
||||
providers: [
|
||||
{ provide: EPersonDataService, useValue: ePersonDataServiceStub },
|
||||
{ provide: NotificationsService, useValue: new NotificationsServiceStub() },
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { Component, OnDestroy, OnInit } from '@angular/core';
|
||||
import { UntypedFormBuilder } from '@angular/forms';
|
||||
import { ReactiveFormsModule, UntypedFormBuilder } from '@angular/forms';
|
||||
import { Router } from '@angular/router';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
||||
import { BehaviorSubject, combineLatest, Observable, Subscription } from 'rxjs';
|
||||
import { map, switchMap, take } from 'rxjs/operators';
|
||||
import { buildPaginatedList, PaginatedList } from '../../core/data/paginated-list.model';
|
||||
@@ -22,10 +22,26 @@ import { PageInfo } from '../../core/shared/page-info.model';
|
||||
import { NoContent } from '../../core/shared/NoContent.model';
|
||||
import { PaginationService } from '../../core/pagination/pagination.service';
|
||||
import { DSONameService } from '../../core/breadcrumbs/dso-name.service';
|
||||
import { AsyncPipe, NgClass, NgForOf, NgIf } from '@angular/common';
|
||||
import { EPersonFormComponent } from './eperson-form/eperson-form.component';
|
||||
import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component';
|
||||
import { PaginationComponent } from '../../shared/pagination/pagination.component';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-epeople-registry',
|
||||
templateUrl: './epeople-registry.component.html',
|
||||
imports: [
|
||||
TranslateModule,
|
||||
AsyncPipe,
|
||||
NgIf,
|
||||
EPersonFormComponent,
|
||||
ReactiveFormsModule,
|
||||
ThemedLoadingComponent,
|
||||
PaginationComponent,
|
||||
NgClass,
|
||||
NgForOf
|
||||
],
|
||||
standalone: true
|
||||
})
|
||||
/**
|
||||
* A component used for managing all existing epeople within the repository.
|
||||
|
@@ -189,9 +189,7 @@ describe('EPersonFormComponent', () => {
|
||||
provide: TranslateLoader,
|
||||
useClass: TranslateLoaderMock
|
||||
}
|
||||
}),
|
||||
],
|
||||
declarations: [EPersonFormComponent],
|
||||
}), EPersonFormComponent],
|
||||
providers: [
|
||||
{ provide: EPersonDataService, useValue: ePersonDataServiceStub },
|
||||
{ provide: GroupDataService, useValue: groupsDataService },
|
||||
|
@@ -6,7 +6,7 @@ import {
|
||||
DynamicFormLayout,
|
||||
DynamicInputModel
|
||||
} from '@ng-dynamic-forms/core';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
||||
import { combineLatest as observableCombineLatest, Observable, of as observableOf, Subscription } from 'rxjs';
|
||||
import { debounceTime, finalize, map, switchMap, take } from 'rxjs/operators';
|
||||
import { PaginatedList } from '../../../core/data/paginated-list.model';
|
||||
@@ -38,10 +38,26 @@ import { Registration } from '../../../core/shared/registration.model';
|
||||
import { EpersonRegistrationService } from '../../../core/data/eperson-registration.service';
|
||||
import { TYPE_REQUEST_FORGOT } from '../../../register-email-form/register-email-form.component';
|
||||
import { DSONameService } from '../../../core/breadcrumbs/dso-name.service';
|
||||
import { FormComponent } from '../../../shared/form/form.component';
|
||||
import { AsyncPipe, NgClass, NgIf } from '@angular/common';
|
||||
import { ThemedLoadingComponent } from '../../../shared/loading/themed-loading.component';
|
||||
import { PaginationComponent } from '../../../shared/pagination/pagination.component';
|
||||
import { RouterLink } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-eperson-form',
|
||||
templateUrl: './eperson-form.component.html',
|
||||
imports: [
|
||||
FormComponent,
|
||||
NgIf,
|
||||
AsyncPipe,
|
||||
TranslateModule,
|
||||
NgClass,
|
||||
ThemedLoadingComponent,
|
||||
PaginationComponent,
|
||||
RouterLink
|
||||
],
|
||||
standalone: true
|
||||
})
|
||||
/**
|
||||
* A form used for creating and editing EPeople
|
||||
|
@@ -197,9 +197,7 @@ describe('GroupFormComponent', () => {
|
||||
provide: TranslateLoader,
|
||||
useClass: TranslateLoaderMock
|
||||
}
|
||||
}),
|
||||
],
|
||||
declarations: [GroupFormComponent],
|
||||
}), GroupFormComponent],
|
||||
providers: [
|
||||
{ provide: DSONameService, useValue: new DSONameServiceMock() },
|
||||
{ provide: EPersonDataService, useValue: ePersonDataServiceStub },
|
||||
|
@@ -8,7 +8,7 @@ import {
|
||||
DynamicInputModel,
|
||||
DynamicTextAreaModel
|
||||
} from '@ng-dynamic-forms/core';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
||||
import {
|
||||
ObservedValueOf,
|
||||
combineLatest as observableCombineLatest,
|
||||
@@ -48,10 +48,27 @@ import { Operation } from 'fast-json-patch';
|
||||
import { ValidateGroupExists } from './validators/group-exists.validator';
|
||||
import { DSONameService } from '../../../core/breadcrumbs/dso-name.service';
|
||||
import { environment } from '../../../../environments/environment';
|
||||
import { FormComponent } from '../../../shared/form/form.component';
|
||||
import { AlertComponent } from '../../../shared/alert/alert.component';
|
||||
import { AsyncPipe, NgIf } from '@angular/common';
|
||||
import { ContextHelpDirective } from '../../../shared/context-help.directive';
|
||||
import { MembersListComponent } from './members-list/members-list.component';
|
||||
import { SubgroupsListComponent } from './subgroup-list/subgroups-list.component';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-group-form',
|
||||
templateUrl: './group-form.component.html'
|
||||
templateUrl: './group-form.component.html',
|
||||
imports: [
|
||||
FormComponent,
|
||||
AlertComponent,
|
||||
NgIf,
|
||||
AsyncPipe,
|
||||
TranslateModule,
|
||||
ContextHelpDirective,
|
||||
MembersListComponent,
|
||||
SubgroupsListComponent
|
||||
],
|
||||
standalone: true
|
||||
})
|
||||
/**
|
||||
* A form used for creating and editing groups
|
||||
|
@@ -127,9 +127,7 @@ describe('MembersListComponent', () => {
|
||||
provide: TranslateLoader,
|
||||
useClass: TranslateLoaderMock
|
||||
}
|
||||
}),
|
||||
],
|
||||
declarations: [MembersListComponent],
|
||||
}), MembersListComponent],
|
||||
providers: [MembersListComponent,
|
||||
{ provide: EPersonDataService, useValue: ePersonDataServiceStub },
|
||||
{ provide: GroupDataService, useValue: groupsDataServiceStub },
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { Component, Input, OnDestroy, OnInit } from '@angular/core';
|
||||
import { UntypedFormBuilder } from '@angular/forms';
|
||||
import { Router } from '@angular/router';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { ReactiveFormsModule, UntypedFormBuilder } from '@angular/forms';
|
||||
import { Router, RouterLink } from '@angular/router';
|
||||
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
||||
import {
|
||||
Observable,
|
||||
of as observableOf,
|
||||
@@ -28,6 +28,9 @@ import { PaginationComponentOptions } from '../../../../shared/pagination/pagina
|
||||
import { EpersonDtoModel } from '../../../../core/eperson/models/eperson-dto.model';
|
||||
import { PaginationService } from '../../../../core/pagination/pagination.service';
|
||||
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
|
||||
import { ContextHelpDirective } from '../../../../shared/context-help.directive';
|
||||
import { PaginationComponent } from '../../../../shared/pagination/pagination.component';
|
||||
import { AsyncPipe, NgClass, NgForOf, NgIf } from '@angular/common';
|
||||
|
||||
/**
|
||||
* Keys to keep track of specific subscriptions
|
||||
@@ -69,7 +72,19 @@ export interface EPersonListActionConfig {
|
||||
|
||||
@Component({
|
||||
selector: 'ds-members-list',
|
||||
templateUrl: './members-list.component.html'
|
||||
templateUrl: './members-list.component.html',
|
||||
imports: [
|
||||
TranslateModule,
|
||||
ContextHelpDirective,
|
||||
ReactiveFormsModule,
|
||||
PaginationComponent,
|
||||
NgIf,
|
||||
AsyncPipe,
|
||||
RouterLink,
|
||||
NgClass,
|
||||
NgForOf
|
||||
],
|
||||
standalone: true
|
||||
})
|
||||
/**
|
||||
* The list of members in the edit group page
|
||||
|
@@ -106,9 +106,7 @@ describe('SubgroupsListComponent', () => {
|
||||
provide: TranslateLoader,
|
||||
useClass: TranslateLoaderMock
|
||||
}
|
||||
}),
|
||||
],
|
||||
declarations: [SubgroupsListComponent],
|
||||
}), SubgroupsListComponent],
|
||||
providers: [SubgroupsListComponent,
|
||||
{ provide: DSONameService, useValue: new DSONameServiceMock() },
|
||||
{ provide: GroupDataService, useValue: groupsDataServiceStub },
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { Component, Input, OnDestroy, OnInit } from '@angular/core';
|
||||
import { UntypedFormBuilder } from '@angular/forms';
|
||||
import { Router } from '@angular/router';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { ReactiveFormsModule, UntypedFormBuilder } from '@angular/forms';
|
||||
import { Router, RouterLink } from '@angular/router';
|
||||
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
||||
import { BehaviorSubject, Observable, of as observableOf, Subscription } from 'rxjs';
|
||||
import { map, mergeMap, switchMap, take } from 'rxjs/operators';
|
||||
import { PaginatedList } from '../../../../core/data/paginated-list.model';
|
||||
@@ -19,6 +19,9 @@ import { NoContent } from '../../../../core/shared/NoContent.model';
|
||||
import { PaginationService } from '../../../../core/pagination/pagination.service';
|
||||
import { followLink } from '../../../../shared/utils/follow-link-config.model';
|
||||
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
|
||||
import { AsyncPipe, NgForOf, NgIf } from "@angular/common";
|
||||
import { ContextHelpDirective } from "../../../../shared/context-help.directive";
|
||||
import { PaginationComponent } from "../../../../shared/pagination/pagination.component";
|
||||
|
||||
/**
|
||||
* Keys to keep track of specific subscriptions
|
||||
@@ -31,7 +34,18 @@ enum SubKey {
|
||||
|
||||
@Component({
|
||||
selector: 'ds-subgroups-list',
|
||||
templateUrl: './subgroups-list.component.html'
|
||||
templateUrl: './subgroups-list.component.html',
|
||||
imports: [
|
||||
RouterLink,
|
||||
AsyncPipe,
|
||||
NgForOf,
|
||||
ContextHelpDirective,
|
||||
TranslateModule,
|
||||
ReactiveFormsModule,
|
||||
PaginationComponent,
|
||||
NgIf
|
||||
],
|
||||
standalone: true
|
||||
})
|
||||
/**
|
||||
* The list of subgroups in the edit group page
|
||||
|
@@ -169,9 +169,7 @@ describe('GroupsRegistryComponent', () => {
|
||||
provide: TranslateLoader,
|
||||
useClass: TranslateLoaderMock
|
||||
}
|
||||
}),
|
||||
],
|
||||
declarations: [GroupsRegistryComponent],
|
||||
}), GroupsRegistryComponent],
|
||||
providers: [GroupsRegistryComponent,
|
||||
{ provide: DSONameService, useValue: new DSONameServiceMock() },
|
||||
{ provide: EPersonDataService, useValue: ePersonDataServiceStub },
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { Component, OnDestroy, OnInit } from '@angular/core';
|
||||
import { UntypedFormBuilder } from '@angular/forms';
|
||||
import { Router } from '@angular/router';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { ReactiveFormsModule, UntypedFormBuilder } from '@angular/forms';
|
||||
import { Router, RouterLink } from '@angular/router';
|
||||
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
||||
import {
|
||||
BehaviorSubject,
|
||||
combineLatest as observableCombineLatest,
|
||||
@@ -38,10 +38,27 @@ import { NoContent } from '../../core/shared/NoContent.model';
|
||||
import { PaginationService } from '../../core/pagination/pagination.service';
|
||||
import { followLink } from '../../shared/utils/follow-link-config.model';
|
||||
import { DSONameService } from '../../core/breadcrumbs/dso-name.service';
|
||||
import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component';
|
||||
import { AsyncPipe, NgIf, NgSwitch, NgSwitchCase } from '@angular/common';
|
||||
import { PaginationComponent } from '../../shared/pagination/pagination.component';
|
||||
import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-groups-registry',
|
||||
templateUrl: './groups-registry.component.html',
|
||||
imports: [
|
||||
ThemedLoadingComponent,
|
||||
TranslateModule,
|
||||
RouterLink,
|
||||
ReactiveFormsModule,
|
||||
AsyncPipe,
|
||||
NgIf,
|
||||
PaginationComponent,
|
||||
NgSwitch,
|
||||
NgSwitchCase,
|
||||
NgbTooltipModule
|
||||
],
|
||||
standalone: true
|
||||
})
|
||||
/**
|
||||
* A component used for managing all existing groups within the repository.
|
||||
|
@@ -9,8 +9,7 @@ describe('AdminCurationTasksComponent', () => {
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [TranslateModule.forRoot()],
|
||||
declarations: [AdminCurationTasksComponent],
|
||||
imports: [TranslateModule.forRoot(), AdminCurationTasksComponent],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
@@ -1,4 +1,6 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { CurationFormComponent } from "../../curation-form/curation-form.component";
|
||||
import { TranslateModule } from "@ngx-translate/core";
|
||||
|
||||
/**
|
||||
* Component responsible for rendering the system wide Curation Task UI
|
||||
@@ -6,6 +8,11 @@ import { Component } from '@angular/core';
|
||||
@Component({
|
||||
selector: 'ds-admin-curation-task',
|
||||
templateUrl: './admin-curation-tasks.component.html',
|
||||
imports: [
|
||||
CurationFormComponent,
|
||||
TranslateModule
|
||||
],
|
||||
standalone: true
|
||||
})
|
||||
export class AdminCurationTasksComponent {
|
||||
|
||||
|
@@ -48,9 +48,9 @@ describe('BatchImportPageComponent', () => {
|
||||
imports: [
|
||||
FormsModule,
|
||||
TranslateModule.forRoot(),
|
||||
RouterTestingModule.withRoutes([])
|
||||
RouterTestingModule.withRoutes([]),
|
||||
BatchImportPageComponent, FileValueAccessorDirective, FileValidator
|
||||
],
|
||||
declarations: [BatchImportPageComponent, FileValueAccessorDirective, FileValidator],
|
||||
providers: [
|
||||
{ provide: NotificationsService, useValue: notificationService },
|
||||
{ provide: ScriptDataService, useValue: scriptService },
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Location } from '@angular/common';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { Location, NgIf } from '@angular/common';
|
||||
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||
import { BATCH_IMPORT_SCRIPT_NAME, ScriptDataService } from '../../core/data/processes/script-data.service';
|
||||
import { Router } from '@angular/router';
|
||||
@@ -17,10 +17,23 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { take } from 'rxjs/operators';
|
||||
import { DSpaceObject } from '../../core/shared/dspace-object.model';
|
||||
import { DSONameService } from '../../core/breadcrumbs/dso-name.service';
|
||||
import { FormsModule } from "@angular/forms";
|
||||
import { UiSwitchModule } from "ngx-ui-switch";
|
||||
import {
|
||||
FileDropzoneNoUploaderComponent
|
||||
} from "../../shared/upload/file-dropzone-no-uploader/file-dropzone-no-uploader.component";
|
||||
|
||||
@Component({
|
||||
selector: 'ds-batch-import-page',
|
||||
templateUrl: './batch-import-page.component.html'
|
||||
templateUrl: './batch-import-page.component.html',
|
||||
imports: [
|
||||
NgIf,
|
||||
TranslateModule,
|
||||
FormsModule,
|
||||
UiSwitchModule,
|
||||
FileDropzoneNoUploaderComponent
|
||||
],
|
||||
standalone: true
|
||||
})
|
||||
export class BatchImportPageComponent {
|
||||
/**
|
||||
|
@@ -45,9 +45,9 @@ describe('MetadataImportPageComponent', () => {
|
||||
imports: [
|
||||
FormsModule,
|
||||
TranslateModule.forRoot(),
|
||||
RouterTestingModule.withRoutes([])
|
||||
RouterTestingModule.withRoutes([]),
|
||||
MetadataImportPageComponent, FileValueAccessorDirective, FileValidator
|
||||
],
|
||||
declarations: [MetadataImportPageComponent, FileValueAccessorDirective, FileValidator],
|
||||
providers: [
|
||||
{ provide: NotificationsService, useValue: notificationService },
|
||||
{ provide: ScriptDataService, useValue: scriptService },
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { Location } from '@angular/common';
|
||||
import { Component } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
||||
import { METADATA_IMPORT_SCRIPT_NAME, ScriptDataService } from '../../core/data/processes/script-data.service';
|
||||
import { ProcessParameter } from '../../process-page/processes/process-parameter.model';
|
||||
import { isNotEmpty } from '../../shared/empty.util';
|
||||
@@ -10,10 +10,20 @@ import { RemoteData } from '../../core/data/remote-data';
|
||||
import { Process } from '../../process-page/processes/process.model';
|
||||
import { getFirstCompletedRemoteData } from '../../core/shared/operators';
|
||||
import { getProcessDetailRoute } from '../../process-page/process-page-routing.paths';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import {
|
||||
FileDropzoneNoUploaderComponent
|
||||
} from '../../shared/upload/file-dropzone-no-uploader/file-dropzone-no-uploader.component';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-metadata-import-page',
|
||||
templateUrl: './metadata-import-page.component.html'
|
||||
templateUrl: './metadata-import-page.component.html',
|
||||
imports: [
|
||||
TranslateModule,
|
||||
FormsModule,
|
||||
FileDropzoneNoUploaderComponent
|
||||
],
|
||||
standalone: true
|
||||
})
|
||||
|
||||
/**
|
||||
|
@@ -17,9 +17,7 @@ import { FormModule } from '../../shared/form/form.module';
|
||||
RouterModule,
|
||||
BitstreamFormatsModule,
|
||||
AdminRegistriesRoutingModule,
|
||||
FormModule
|
||||
],
|
||||
declarations: [
|
||||
FormModule,
|
||||
MetadataRegistryComponent,
|
||||
MetadataSchemaComponent,
|
||||
MetadataSchemaFormComponent,
|
||||
|
@@ -42,8 +42,7 @@ describe('AddBitstreamFormatComponent', () => {
|
||||
});
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||
declarations: [AddBitstreamFormatComponent],
|
||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, AddBitstreamFormatComponent],
|
||||
providers: [
|
||||
{ provide: Router, useValue: router },
|
||||
{ provide: NotificationsService, useValue: notificationService },
|
||||
@@ -82,8 +81,7 @@ describe('AddBitstreamFormatComponent', () => {
|
||||
});
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||
declarations: [AddBitstreamFormatComponent],
|
||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, AddBitstreamFormatComponent],
|
||||
providers: [
|
||||
{ provide: Router, useValue: router },
|
||||
{ provide: NotificationsService, useValue: notificationService },
|
||||
|
@@ -3,10 +3,11 @@ import { Component } from '@angular/core';
|
||||
import { BitstreamFormat } from '../../../../core/shared/bitstream-format.model';
|
||||
import { BitstreamFormatDataService } from '../../../../core/data/bitstream-format-data.service';
|
||||
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
||||
import { getBitstreamFormatsModuleRoute } from '../../admin-registries-routing-paths';
|
||||
import { RemoteData } from '../../../../core/data/remote-data';
|
||||
import { getFirstCompletedRemoteData } from '../../../../core/shared/operators';
|
||||
import { FormatFormComponent } from '../format-form/format-form.component';
|
||||
|
||||
/**
|
||||
* This component renders the page to create a new bitstream format.
|
||||
@@ -14,6 +15,11 @@ import { getFirstCompletedRemoteData } from '../../../../core/shared/operators';
|
||||
@Component({
|
||||
selector: 'ds-add-bitstream-format',
|
||||
templateUrl: './add-bitstream-format.component.html',
|
||||
imports: [
|
||||
FormatFormComponent,
|
||||
TranslateModule
|
||||
],
|
||||
standalone: true
|
||||
})
|
||||
export class AddBitstreamFormatComponent {
|
||||
|
||||
|
@@ -102,8 +102,7 @@ describe('BitstreamFormatsComponent', () => {
|
||||
paginationService = new PaginationServiceStub();
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||
declarations: [BitstreamFormatsComponent, PaginationComponent, EnumKeysPipe],
|
||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, BitstreamFormatsComponent, PaginationComponent, EnumKeysPipe],
|
||||
providers: [
|
||||
{ provide: BitstreamFormatDataService, useValue: bitstreamFormatService },
|
||||
{ provide: HostWindowService, useValue: new HostWindowServiceStub(0) },
|
||||
@@ -230,8 +229,7 @@ describe('BitstreamFormatsComponent', () => {
|
||||
paginationService = new PaginationServiceStub();
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||
declarations: [BitstreamFormatsComponent, PaginationComponent, EnumKeysPipe],
|
||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, BitstreamFormatsComponent, PaginationComponent, EnumKeysPipe],
|
||||
providers: [
|
||||
{ provide: BitstreamFormatDataService, useValue: bitstreamFormatService },
|
||||
{ provide: HostWindowService, useValue: new HostWindowServiceStub(0) },
|
||||
@@ -279,8 +277,7 @@ describe('BitstreamFormatsComponent', () => {
|
||||
paginationService = new PaginationServiceStub();
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||
declarations: [BitstreamFormatsComponent, PaginationComponent, EnumKeysPipe],
|
||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, BitstreamFormatsComponent, PaginationComponent, EnumKeysPipe],
|
||||
providers: [
|
||||
{ provide: BitstreamFormatDataService, useValue: bitstreamFormatService },
|
||||
{ provide: HostWindowService, useValue: new HostWindowServiceStub(0) },
|
||||
|
@@ -7,19 +7,30 @@ import { BitstreamFormat } from '../../../core/shared/bitstream-format.model';
|
||||
import { BitstreamFormatDataService } from '../../../core/data/bitstream-format-data.service';
|
||||
import { map, mergeMap, switchMap, take, toArray } from 'rxjs/operators';
|
||||
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
||||
import { Router } from '@angular/router';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { Router, RouterLink } from '@angular/router';
|
||||
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
||||
import { NoContent } from '../../../core/shared/NoContent.model';
|
||||
import { PaginationService } from '../../../core/pagination/pagination.service';
|
||||
import { FindListOptions } from '../../../core/data/find-list-options.model';
|
||||
import { getFirstCompletedRemoteData } from '../../../core/shared/operators';
|
||||
import { AsyncPipe, NgForOf, NgIf } from "@angular/common";
|
||||
import { PaginationComponent } from "../../../shared/pagination/pagination.component";
|
||||
|
||||
/**
|
||||
* This component renders a list of bitstream formats
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-bitstream-formats',
|
||||
templateUrl: './bitstream-formats.component.html'
|
||||
templateUrl: './bitstream-formats.component.html',
|
||||
imports: [
|
||||
NgIf,
|
||||
AsyncPipe,
|
||||
RouterLink,
|
||||
TranslateModule,
|
||||
PaginationComponent,
|
||||
NgForOf
|
||||
],
|
||||
standalone: true
|
||||
})
|
||||
export class BitstreamFormatsComponent implements OnInit, OnDestroy {
|
||||
|
||||
|
@@ -15,9 +15,7 @@ import { FormModule } from '../../../shared/form/form.module';
|
||||
SharedModule,
|
||||
RouterModule,
|
||||
BitstreamFormatsRoutingModule,
|
||||
FormModule
|
||||
],
|
||||
declarations: [
|
||||
FormModule,
|
||||
BitstreamFormatsComponent,
|
||||
EditBitstreamFormatComponent,
|
||||
AddBitstreamFormatComponent,
|
||||
|
@@ -52,8 +52,7 @@ describe('EditBitstreamFormatComponent', () => {
|
||||
});
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||
declarations: [EditBitstreamFormatComponent],
|
||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, EditBitstreamFormatComponent],
|
||||
providers: [
|
||||
{ provide: ActivatedRoute, useValue: routeStub },
|
||||
{ provide: Router, useValue: router },
|
||||
@@ -103,8 +102,7 @@ describe('EditBitstreamFormatComponent', () => {
|
||||
});
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||
declarations: [EditBitstreamFormatComponent],
|
||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, EditBitstreamFormatComponent],
|
||||
providers: [
|
||||
{ provide: ActivatedRoute, useValue: routeStub },
|
||||
{ provide: Router, useValue: router },
|
||||
|
@@ -6,9 +6,11 @@ import { RemoteData } from '../../../../core/data/remote-data';
|
||||
import { BitstreamFormat } from '../../../../core/shared/bitstream-format.model';
|
||||
import { BitstreamFormatDataService } from '../../../../core/data/bitstream-format-data.service';
|
||||
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
||||
import { getBitstreamFormatsModuleRoute } from '../../admin-registries-routing-paths';
|
||||
import { getFirstCompletedRemoteData } from '../../../../core/shared/operators';
|
||||
import { FormatFormComponent } from '../format-form/format-form.component';
|
||||
import { AsyncPipe } from '@angular/common';
|
||||
|
||||
/**
|
||||
* This component renders the edit page of a bitstream format.
|
||||
@@ -17,6 +19,12 @@ import { getFirstCompletedRemoteData } from '../../../../core/shared/operators';
|
||||
@Component({
|
||||
selector: 'ds-edit-bitstream-format',
|
||||
templateUrl: './edit-bitstream-format.component.html',
|
||||
imports: [
|
||||
FormatFormComponent,
|
||||
TranslateModule,
|
||||
AsyncPipe
|
||||
],
|
||||
standalone: true
|
||||
})
|
||||
export class EditBitstreamFormatComponent implements OnInit {
|
||||
|
||||
|
@@ -40,8 +40,7 @@ describe('FormatFormComponent', () => {
|
||||
|
||||
const initAsync = () => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), ReactiveFormsModule, FormsModule, TranslateModule.forRoot(), NgbModule],
|
||||
declarations: [FormatFormComponent],
|
||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), ReactiveFormsModule, FormsModule, TranslateModule.forRoot(), NgbModule, FormatFormComponent],
|
||||
providers: [
|
||||
{ provide: Router, useValue: router },
|
||||
],
|
||||
|
@@ -16,13 +16,20 @@ import { hasValue, isEmpty } from '../../../../shared/empty.util';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { getBitstreamFormatsModuleRoute } from '../../admin-registries-routing-paths';
|
||||
import { environment } from '../../../../../environments/environment';
|
||||
import { FormComponent } from '../../../../shared/form/form.component';
|
||||
import { NgIf } from '@angular/common';
|
||||
|
||||
/**
|
||||
* The component responsible for rendering the form to create/edit a bitstream format
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-bitstream-format-form',
|
||||
templateUrl: './format-form.component.html'
|
||||
templateUrl: './format-form.component.html',
|
||||
imports: [
|
||||
FormComponent,
|
||||
NgIf
|
||||
],
|
||||
standalone: true
|
||||
})
|
||||
export class FormatFormComponent implements OnInit {
|
||||
|
||||
|
@@ -69,8 +69,7 @@ describe('MetadataRegistryComponent', () => {
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||
declarations: [MetadataRegistryComponent, PaginationComponent, EnumKeysPipe],
|
||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, MetadataRegistryComponent, PaginationComponent, EnumKeysPipe],
|
||||
providers: [
|
||||
{ provide: RegistryService, useValue: registryServiceStub },
|
||||
{ provide: HostWindowService, useValue: new HostWindowServiceStub(0) },
|
||||
|
@@ -7,18 +7,32 @@ import { PaginationComponentOptions } from '../../../shared/pagination/paginatio
|
||||
import { filter, map, switchMap, take } from 'rxjs/operators';
|
||||
import { hasValue } from '../../../shared/empty.util';
|
||||
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
||||
import { Router } from '@angular/router';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { Router, RouterLink } from '@angular/router';
|
||||
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
||||
import { MetadataSchema } from '../../../core/metadata/metadata-schema.model';
|
||||
import { toFindListOptions } from '../../../shared/pagination/pagination.utils';
|
||||
import { NoContent } from '../../../core/shared/NoContent.model';
|
||||
import { getFirstCompletedRemoteData } from '../../../core/shared/operators';
|
||||
import { PaginationService } from '../../../core/pagination/pagination.service';
|
||||
import { MetadataSchemaFormComponent } from './metadata-schema-form/metadata-schema-form.component';
|
||||
import { AsyncPipe, NgClass, NgForOf, NgIf } from '@angular/common';
|
||||
import { PaginationComponent } from '../../../shared/pagination/pagination.component';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-metadata-registry',
|
||||
templateUrl: './metadata-registry.component.html',
|
||||
styleUrls: ['./metadata-registry.component.scss']
|
||||
styleUrls: ['./metadata-registry.component.scss'],
|
||||
imports: [
|
||||
MetadataSchemaFormComponent,
|
||||
TranslateModule,
|
||||
AsyncPipe,
|
||||
PaginationComponent,
|
||||
NgIf,
|
||||
NgForOf,
|
||||
NgClass,
|
||||
RouterLink
|
||||
],
|
||||
standalone: true
|
||||
})
|
||||
/**
|
||||
* A component used for managing all existing metadata schemas within the repository.
|
||||
|
@@ -38,8 +38,7 @@ describe('MetadataSchemaFormComponent', () => {
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
return TestBed.configureTestingModule({
|
||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||
declarations: [MetadataSchemaFormComponent, EnumKeysPipe],
|
||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, MetadataSchemaFormComponent, EnumKeysPipe],
|
||||
providers: [
|
||||
{ provide: RegistryService, useValue: registryServiceStub },
|
||||
{ provide: FormBuilderService, useValue: formBuilderServiceStub }
|
||||
|
@@ -9,13 +9,22 @@ import { UntypedFormGroup } from '@angular/forms';
|
||||
import { RegistryService } from '../../../../core/registry/registry.service';
|
||||
import { FormBuilderService } from '../../../../shared/form/builder/form-builder.service';
|
||||
import { switchMap, take, tap } from 'rxjs/operators';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
||||
import { Observable, combineLatest } from 'rxjs';
|
||||
import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model';
|
||||
import { AsyncPipe, NgIf } from '@angular/common';
|
||||
import { FormComponent } from '../../../../shared/form/form.component';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-metadata-schema-form',
|
||||
templateUrl: './metadata-schema-form.component.html'
|
||||
templateUrl: './metadata-schema-form.component.html',
|
||||
imports: [
|
||||
NgIf,
|
||||
AsyncPipe,
|
||||
TranslateModule,
|
||||
FormComponent
|
||||
],
|
||||
standalone: true
|
||||
})
|
||||
/**
|
||||
* A form used for creating and editing metadata schemas
|
||||
|
@@ -49,8 +49,7 @@ describe('MetadataFieldFormComponent', () => {
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
return TestBed.configureTestingModule({
|
||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||
declarations: [MetadataFieldFormComponent, EnumKeysPipe],
|
||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, MetadataFieldFormComponent, EnumKeysPipe],
|
||||
providers: [
|
||||
{ provide: RegistryService, useValue: registryServiceStub },
|
||||
{ provide: FormBuilderService, useValue: formBuilderServiceStub }
|
||||
|
@@ -9,14 +9,23 @@ import { UntypedFormGroup } from '@angular/forms';
|
||||
import { RegistryService } from '../../../../core/registry/registry.service';
|
||||
import { FormBuilderService } from '../../../../shared/form/builder/form-builder.service';
|
||||
import { take } from 'rxjs/operators';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
||||
import { combineLatest } from 'rxjs';
|
||||
import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model';
|
||||
import { MetadataField } from '../../../../core/metadata/metadata-field.model';
|
||||
import { AsyncPipe, NgIf } from '@angular/common';
|
||||
import { FormComponent } from '../../../../shared/form/form.component';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-metadata-field-form',
|
||||
templateUrl: './metadata-field-form.component.html'
|
||||
templateUrl: './metadata-field-form.component.html',
|
||||
imports: [
|
||||
NgIf,
|
||||
FormComponent,
|
||||
TranslateModule,
|
||||
AsyncPipe
|
||||
],
|
||||
standalone: true
|
||||
})
|
||||
/**
|
||||
* A form used for creating and editing metadata fields
|
||||
|
@@ -131,8 +131,7 @@ describe('MetadataSchemaComponent', () => {
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||
declarations: [MetadataSchemaComponent, PaginationComponent, EnumKeysPipe, VarDirective],
|
||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, MetadataSchemaComponent, PaginationComponent, EnumKeysPipe, VarDirective],
|
||||
providers: [
|
||||
{ provide: RegistryService, useValue: registryServiceStub },
|
||||
{ provide: ActivatedRoute, useValue: activatedRouteStub },
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { RegistryService } from '../../../core/registry/registry.service';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
import {
|
||||
BehaviorSubject,
|
||||
combineLatest as observableCombineLatest,
|
||||
@@ -15,18 +15,34 @@ import { PaginationComponentOptions } from '../../../shared/pagination/paginatio
|
||||
import { map, switchMap, take } from 'rxjs/operators';
|
||||
import { hasValue } from '../../../shared/empty.util';
|
||||
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
||||
import { MetadataField } from '../../../core/metadata/metadata-field.model';
|
||||
import { MetadataSchema } from '../../../core/metadata/metadata-schema.model';
|
||||
import { getFirstCompletedRemoteData, getFirstSucceededRemoteDataPayload } from '../../../core/shared/operators';
|
||||
import { toFindListOptions } from '../../../shared/pagination/pagination.utils';
|
||||
import { NoContent } from '../../../core/shared/NoContent.model';
|
||||
import { PaginationService } from '../../../core/pagination/pagination.service';
|
||||
import { AsyncPipe, NgClass, NgForOf, NgIf } from '@angular/common';
|
||||
import { VarDirective } from '../../../shared/utils/var.directive';
|
||||
import { MetadataFieldFormComponent } from './metadata-field-form/metadata-field-form.component';
|
||||
import { PaginationComponent } from '../../../shared/pagination/pagination.component';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-metadata-schema',
|
||||
templateUrl: './metadata-schema.component.html',
|
||||
styleUrls: ['./metadata-schema.component.scss']
|
||||
styleUrls: ['./metadata-schema.component.scss'],
|
||||
imports: [
|
||||
AsyncPipe,
|
||||
VarDirective,
|
||||
MetadataFieldFormComponent,
|
||||
TranslateModule,
|
||||
PaginationComponent,
|
||||
NgIf,
|
||||
NgForOf,
|
||||
NgClass,
|
||||
RouterLink
|
||||
],
|
||||
standalone: true
|
||||
})
|
||||
/**
|
||||
* A component used for managing all existing metadata fields within the current metadata schema.
|
||||
|
@@ -9,7 +9,7 @@ describe('AdminSearchPageComponent', () => {
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [AdminSearchPageComponent],
|
||||
imports: [AdminSearchPageComponent],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
})
|
||||
.compileComponents();
|
||||
|
@@ -1,10 +1,13 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Context } from '../../core/shared/context.model';
|
||||
import { ConfigurationSearchPageComponent } from '../../search-page/configuration-search-page.component';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-admin-search-page',
|
||||
templateUrl: './admin-search-page.component.html',
|
||||
styleUrls: ['./admin-search-page.component.scss']
|
||||
styleUrls: ['./admin-search-page.component.scss'],
|
||||
standalone: true,
|
||||
imports: [ConfigurationSearchPageComponent]
|
||||
})
|
||||
|
||||
/**
|
||||
|
@@ -47,9 +47,9 @@ describe('CollectionAdminSearchResultGridElementComponent', () => {
|
||||
NoopAnimationsModule,
|
||||
TranslateModule.forRoot(),
|
||||
RouterTestingModule.withRoutes([]),
|
||||
SharedModule
|
||||
SharedModule,
|
||||
CollectionAdminSearchResultGridElementComponent
|
||||
],
|
||||
declarations: [CollectionAdminSearchResultGridElementComponent],
|
||||
providers: [
|
||||
{ provide: TruncatableService, useValue: mockTruncatableService },
|
||||
{ provide: BitstreamDataService, useValue: {} },
|
||||
|
@@ -6,12 +6,16 @@ import { CollectionSearchResult } from '../../../../../shared/object-collection/
|
||||
import { Collection } from '../../../../../core/shared/collection.model';
|
||||
import { SearchResultGridElementComponent } from '../../../../../shared/object-grid/search-result-grid-element/search-result-grid-element.component';
|
||||
import { getCollectionEditRoute } from '../../../../../collection-page/collection-page-routing-paths';
|
||||
import { RouterLink } from '@angular/router';
|
||||
import { CollectionSearchResultGridElementComponent } from '../../../../../shared/object-grid/search-result-grid-element/collection-search-result/collection-search-result-grid-element.component';
|
||||
|
||||
@listableObjectComponent(CollectionSearchResult, ViewMode.GridElement, Context.AdminSearch)
|
||||
@Component({
|
||||
selector: 'ds-collection-admin-search-result-list-element',
|
||||
styleUrls: ['./collection-admin-search-result-grid-element.component.scss'],
|
||||
templateUrl: './collection-admin-search-result-grid-element.component.html'
|
||||
templateUrl: './collection-admin-search-result-grid-element.component.html',
|
||||
standalone: true,
|
||||
imports: [CollectionSearchResultGridElementComponent, RouterLink]
|
||||
})
|
||||
/**
|
||||
* The component for displaying a list element for a collection search result on the admin search page
|
||||
|
@@ -49,9 +49,9 @@ describe('CommunityAdminSearchResultGridElementComponent', () => {
|
||||
NoopAnimationsModule,
|
||||
TranslateModule.forRoot(),
|
||||
RouterTestingModule.withRoutes([]),
|
||||
SharedModule
|
||||
SharedModule,
|
||||
CommunityAdminSearchResultGridElementComponent
|
||||
],
|
||||
declarations: [CommunityAdminSearchResultGridElementComponent],
|
||||
providers: [
|
||||
{ provide: TruncatableService, useValue: mockTruncatableService },
|
||||
{ provide: BitstreamDataService, useValue: {} },
|
||||
|
@@ -6,12 +6,16 @@ import { CommunitySearchResult } from '../../../../../shared/object-collection/s
|
||||
import { Community } from '../../../../../core/shared/community.model';
|
||||
import { SearchResultGridElementComponent } from '../../../../../shared/object-grid/search-result-grid-element/search-result-grid-element.component';
|
||||
import { getCommunityEditRoute } from '../../../../../community-page/community-page-routing-paths';
|
||||
import { RouterLink } from '@angular/router';
|
||||
import { CommunitySearchResultGridElementComponent } from '../../../../../shared/object-grid/search-result-grid-element/community-search-result/community-search-result-grid-element.component';
|
||||
|
||||
@listableObjectComponent(CommunitySearchResult, ViewMode.GridElement, Context.AdminSearch)
|
||||
@Component({
|
||||
selector: 'ds-community-admin-search-result-grid-element',
|
||||
styleUrls: ['./community-admin-search-result-grid-element.component.scss'],
|
||||
templateUrl: './community-admin-search-result-grid-element.component.html'
|
||||
templateUrl: './community-admin-search-result-grid-element.component.html',
|
||||
standalone: true,
|
||||
imports: [CommunitySearchResultGridElementComponent, RouterLink]
|
||||
})
|
||||
/**
|
||||
* The component for displaying a list element for a community search result on the admin search page
|
||||
|
@@ -58,12 +58,12 @@ describe('ItemAdminSearchResultGridElementComponent', () => {
|
||||
init();
|
||||
TestBed.configureTestingModule(
|
||||
{
|
||||
declarations: [ItemAdminSearchResultGridElementComponent],
|
||||
imports: [
|
||||
NoopAnimationsModule,
|
||||
TranslateModule.forRoot(),
|
||||
RouterTestingModule.withRoutes([]),
|
||||
SharedModule
|
||||
SharedModule,
|
||||
ItemAdminSearchResultGridElementComponent
|
||||
],
|
||||
providers: [
|
||||
{ provide: TruncatableService, useValue: mockTruncatableService },
|
||||
|
@@ -14,12 +14,15 @@ import { GenericConstructor } from '../../../../../core/shared/generic-construct
|
||||
import { ListableObjectDirective } from '../../../../../shared/object-collection/shared/listable-object/listable-object.directive';
|
||||
import { ThemeService } from '../../../../../shared/theme-support/theme.service';
|
||||
import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service';
|
||||
import { ItemAdminSearchResultActionsComponent } from '../../item-admin-search-result-actions.component';
|
||||
|
||||
@listableObjectComponent(ItemSearchResult, ViewMode.GridElement, Context.AdminSearch)
|
||||
@Component({
|
||||
selector: 'ds-item-admin-search-result-grid-element',
|
||||
styleUrls: ['./item-admin-search-result-grid-element.component.scss'],
|
||||
templateUrl: './item-admin-search-result-grid-element.component.html'
|
||||
templateUrl: './item-admin-search-result-grid-element.component.html',
|
||||
standalone: true,
|
||||
imports: [ListableObjectDirective, ItemAdminSearchResultActionsComponent]
|
||||
})
|
||||
/**
|
||||
* The component for displaying a list element for an item search result on the admin search page
|
||||
|
@@ -34,9 +34,9 @@ describe('CollectionAdminSearchResultListElementComponent', () => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
RouterTestingModule.withRoutes([])
|
||||
RouterTestingModule.withRoutes([]),
|
||||
CollectionAdminSearchResultListElementComponent
|
||||
],
|
||||
declarations: [CollectionAdminSearchResultListElementComponent],
|
||||
providers: [{ provide: TruncatableService, useValue: {} },
|
||||
{ provide: DSONameService, useClass: DSONameServiceMock },
|
||||
{ provide: APP_CONFIG, useValue: environment }],
|
||||
|
@@ -6,12 +6,17 @@ import { SearchResultListElementComponent } from '../../../../../shared/object-l
|
||||
import { CollectionSearchResult } from '../../../../../shared/object-collection/shared/collection-search-result.model';
|
||||
import { Collection } from '../../../../../core/shared/collection.model';
|
||||
import { getCollectionEditRoute } from '../../../../../collection-page/collection-page-routing-paths';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { RouterLink } from '@angular/router';
|
||||
import { CollectionSearchResultListElementComponent } from '../../../../../shared/object-list/search-result-list-element/collection-search-result/collection-search-result-list-element.component';
|
||||
|
||||
@listableObjectComponent(CollectionSearchResult, ViewMode.ListElement, Context.AdminSearch)
|
||||
@Component({
|
||||
selector: 'ds-collection-admin-search-result-list-element',
|
||||
styleUrls: ['./collection-admin-search-result-list-element.component.scss'],
|
||||
templateUrl: './collection-admin-search-result-list-element.component.html'
|
||||
templateUrl: './collection-admin-search-result-list-element.component.html',
|
||||
standalone: true,
|
||||
imports: [CollectionSearchResultListElementComponent, RouterLink, TranslateModule]
|
||||
})
|
||||
/**
|
||||
* The component for displaying a list element for a collection search result on the admin search page
|
||||
|
@@ -34,9 +34,9 @@ describe('CommunityAdminSearchResultListElementComponent', () => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
RouterTestingModule.withRoutes([])
|
||||
RouterTestingModule.withRoutes([]),
|
||||
CommunityAdminSearchResultListElementComponent
|
||||
],
|
||||
declarations: [CommunityAdminSearchResultListElementComponent],
|
||||
providers: [{ provide: TruncatableService, useValue: {} },
|
||||
{ provide: DSONameService, useClass: DSONameServiceMock },
|
||||
{ provide: APP_CONFIG, useValue: environment }],
|
||||
|
@@ -6,12 +6,17 @@ import { SearchResultListElementComponent } from '../../../../../shared/object-l
|
||||
import { CommunitySearchResult } from '../../../../../shared/object-collection/shared/community-search-result.model';
|
||||
import { Community } from '../../../../../core/shared/community.model';
|
||||
import { getCommunityEditRoute } from '../../../../../community-page/community-page-routing-paths';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { RouterLink } from '@angular/router';
|
||||
import { CommunitySearchResultListElementComponent } from '../../../../../shared/object-list/search-result-list-element/community-search-result/community-search-result-list-element.component';
|
||||
|
||||
@listableObjectComponent(CommunitySearchResult, ViewMode.ListElement, Context.AdminSearch)
|
||||
@Component({
|
||||
selector: 'ds-community-admin-search-result-list-element',
|
||||
styleUrls: ['./community-admin-search-result-list-element.component.scss'],
|
||||
templateUrl: './community-admin-search-result-list-element.component.html'
|
||||
templateUrl: './community-admin-search-result-list-element.component.html',
|
||||
standalone: true,
|
||||
imports: [CommunitySearchResultListElementComponent, RouterLink, TranslateModule]
|
||||
})
|
||||
/**
|
||||
* The component for displaying a list element for a community search result on the admin search page
|
||||
|
@@ -31,9 +31,9 @@ describe('ItemAdminSearchResultListElementComponent', () => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
RouterTestingModule.withRoutes([])
|
||||
RouterTestingModule.withRoutes([]),
|
||||
ItemAdminSearchResultListElementComponent
|
||||
],
|
||||
declarations: [ItemAdminSearchResultListElementComponent],
|
||||
providers: [{ provide: TruncatableService, useValue: {} },
|
||||
{ provide: DSONameService, useClass: DSONameServiceMock },
|
||||
{ provide: APP_CONFIG, useValue: environment }],
|
||||
|
@@ -5,12 +5,16 @@ import { listableObjectComponent } from '../../../../../shared/object-collection
|
||||
import { Context } from '../../../../../core/shared/context.model';
|
||||
import { ItemSearchResult } from '../../../../../shared/object-collection/shared/item-search-result.model';
|
||||
import { SearchResultListElementComponent } from '../../../../../shared/object-list/search-result-list-element/search-result-list-element.component';
|
||||
import { ItemAdminSearchResultActionsComponent } from '../../item-admin-search-result-actions.component';
|
||||
import { ListableObjectComponentLoaderComponent } from '../../../../../shared/object-collection/shared/listable-object/listable-object-component-loader.component';
|
||||
|
||||
@listableObjectComponent(ItemSearchResult, ViewMode.ListElement, Context.AdminSearch)
|
||||
@Component({
|
||||
selector: 'ds-item-admin-search-result-list-element',
|
||||
styleUrls: ['./item-admin-search-result-list-element.component.scss'],
|
||||
templateUrl: './item-admin-search-result-list-element.component.html'
|
||||
templateUrl: './item-admin-search-result-list-element.component.html',
|
||||
standalone: true,
|
||||
imports: [ListableObjectComponentLoaderComponent, ItemAdminSearchResultActionsComponent]
|
||||
})
|
||||
/**
|
||||
* The component for displaying a list element for an item search result on the admin search page
|
||||
|
@@ -34,9 +34,9 @@ describe('ItemAdminSearchResultActionsComponent', () => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
RouterTestingModule.withRoutes([])
|
||||
RouterTestingModule.withRoutes([]),
|
||||
ItemAdminSearchResultActionsComponent
|
||||
],
|
||||
declarations: [ItemAdminSearchResultActionsComponent],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
})
|
||||
.compileComponents();
|
||||
|
@@ -10,11 +10,16 @@ import {
|
||||
ITEM_EDIT_REINSTATE_PATH,
|
||||
ITEM_EDIT_WITHDRAW_PATH
|
||||
} from '../../../item-page/edit-item-page/edit-item-page.routing-paths';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { RouterLink } from '@angular/router';
|
||||
import { NgClass, NgIf } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-item-admin-search-result-actions-element',
|
||||
styleUrls: ['./item-admin-search-result-actions.component.scss'],
|
||||
templateUrl: './item-admin-search-result-actions.component.html'
|
||||
templateUrl: './item-admin-search-result-actions.component.html',
|
||||
standalone: true,
|
||||
imports: [NgClass, RouterLink, NgIf, TranslateModule]
|
||||
})
|
||||
/**
|
||||
* The component for displaying the actions for a list element for an item search result on the admin search page
|
||||
|
@@ -28,9 +28,7 @@ const ENTRY_COMPONENTS = [
|
||||
SearchModule,
|
||||
SharedModule.withEntryComponents(),
|
||||
JournalEntitiesModule.withEntryComponents(),
|
||||
ResearchEntitiesModule.withEntryComponents()
|
||||
],
|
||||
declarations: [
|
||||
ResearchEntitiesModule.withEntryComponents(),
|
||||
AdminSearchPageComponent,
|
||||
...ENTRY_COMPONENTS
|
||||
]
|
||||
|
@@ -21,8 +21,7 @@ describe('AdminSidebarSectionComponent', () => {
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [NoopAnimationsModule, RouterTestingModule, TranslateModule.forRoot()],
|
||||
declarations: [AdminSidebarSectionComponent, TestComponent],
|
||||
imports: [NoopAnimationsModule, RouterTestingModule, TranslateModule.forRoot(), AdminSidebarSectionComponent, TestComponent],
|
||||
providers: [
|
||||
{ provide: 'sectionDataProvider', useValue: { model: { link: 'google.com' }, icon: iconString } },
|
||||
{ provide: MenuService, useValue: menuService },
|
||||
@@ -61,8 +60,7 @@ describe('AdminSidebarSectionComponent', () => {
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [NoopAnimationsModule, RouterTestingModule, TranslateModule.forRoot()],
|
||||
declarations: [AdminSidebarSectionComponent, TestComponent],
|
||||
imports: [NoopAnimationsModule, RouterTestingModule, TranslateModule.forRoot(), AdminSidebarSectionComponent, TestComponent],
|
||||
providers: [
|
||||
{ provide: 'sectionDataProvider', useValue: { model: { link: 'google.com', disabled: true }, icon: iconString } },
|
||||
{ provide: MenuService, useValue: menuService },
|
||||
@@ -102,7 +100,9 @@ describe('AdminSidebarSectionComponent', () => {
|
||||
// declare a test component
|
||||
@Component({
|
||||
selector: 'ds-test-cmp',
|
||||
template: ``
|
||||
template: ``,
|
||||
standalone: true,
|
||||
imports: [RouterTestingModule]
|
||||
})
|
||||
class TestComponent {
|
||||
}
|
||||
|
@@ -6,7 +6,9 @@ import { LinkMenuItemModel } from '../../../shared/menu/menu-item/models/link.mo
|
||||
import { MenuSection } from '../../../shared/menu/menu-section.model';
|
||||
import { MenuID } from '../../../shared/menu/menu-id.model';
|
||||
import { isEmpty } from '../../../shared/empty.util';
|
||||
import { Router } from '@angular/router';
|
||||
import { Router, RouterLink } from '@angular/router';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { NgClass } from '@angular/common';
|
||||
|
||||
/**
|
||||
* Represents a non-expandable section in the admin sidebar
|
||||
@@ -16,7 +18,8 @@ import { Router } from '@angular/router';
|
||||
selector: 'li[ds-admin-sidebar-section]',
|
||||
templateUrl: './admin-sidebar-section.component.html',
|
||||
styleUrls: ['./admin-sidebar-section.component.scss'],
|
||||
|
||||
standalone: true,
|
||||
imports: [NgClass, RouterLink, TranslateModule]
|
||||
})
|
||||
@rendersSectionForMenu(MenuID.ADMIN, false)
|
||||
export class AdminSidebarSectionComponent extends MenuSectionComponent implements OnInit {
|
||||
|
@@ -57,8 +57,7 @@ describe('AdminSidebarComponent', () => {
|
||||
});
|
||||
scriptService = jasmine.createSpyObj('scriptService', { scriptWithNameExistsAndCanExecute: observableOf(true) });
|
||||
TestBed.configureTestingModule({
|
||||
imports: [TranslateModule.forRoot(), NoopAnimationsModule, RouterTestingModule],
|
||||
declarations: [AdminSidebarComponent],
|
||||
imports: [TranslateModule.forRoot(), NoopAnimationsModule, RouterTestingModule, AdminSidebarComponent],
|
||||
providers: [
|
||||
Injector,
|
||||
{ provide: ThemeService, useValue: getMockThemeService() },
|
||||
@@ -71,7 +70,7 @@ describe('AdminSidebarComponent', () => {
|
||||
{ provide: ActivatedRoute, useValue: routeStub },
|
||||
{
|
||||
provide: NgbModal, useValue: {
|
||||
open: () => {/*comment*/
|
||||
open: () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -10,6 +10,9 @@ import { AuthorizationDataService } from '../../core/data/feature-authorization/
|
||||
import { MenuID } from '../../shared/menu/menu-id.model';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { ThemeService } from '../../shared/theme-support/theme.service';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { NgIf, NgClass, NgFor, NgComponentOutlet, AsyncPipe } from '@angular/common';
|
||||
|
||||
/**
|
||||
* Component representing the admin sidebar
|
||||
@@ -18,7 +21,9 @@ import { ThemeService } from '../../shared/theme-support/theme.service';
|
||||
selector: 'ds-admin-sidebar',
|
||||
templateUrl: './admin-sidebar.component.html',
|
||||
styleUrls: ['./admin-sidebar.component.scss'],
|
||||
animations: [slideSidebar]
|
||||
animations: [slideSidebar],
|
||||
standalone: true,
|
||||
imports: [NgIf, NgbDropdownModule, NgClass, NgFor, NgComponentOutlet, AsyncPipe, TranslateModule]
|
||||
})
|
||||
export class AdminSidebarComponent extends MenuComponent implements OnInit {
|
||||
/**
|
||||
|
@@ -20,8 +20,7 @@ describe('ExpandableAdminSidebarSectionComponent', () => {
|
||||
const iconString = 'test';
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [NoopAnimationsModule, TranslateModule.forRoot()],
|
||||
declarations: [ExpandableAdminSidebarSectionComponent, TestComponent],
|
||||
imports: [NoopAnimationsModule, TranslateModule.forRoot(), ExpandableAdminSidebarSectionComponent, TestComponent],
|
||||
providers: [
|
||||
{ provide: 'sectionDataProvider', useValue: { icon: iconString, model: {} } },
|
||||
{ provide: MenuService, useValue: menuService },
|
||||
@@ -72,7 +71,8 @@ describe('ExpandableAdminSidebarSectionComponent', () => {
|
||||
// declare a test component
|
||||
@Component({
|
||||
selector: 'ds-test-cmp',
|
||||
template: ``
|
||||
template: ``,
|
||||
standalone: true
|
||||
})
|
||||
class TestComponent {
|
||||
}
|
||||
|
@@ -10,6 +10,8 @@ import { map } from 'rxjs/operators';
|
||||
import { rendersSectionForMenu } from '../../../shared/menu/menu-section.decorator';
|
||||
import { MenuID } from '../../../shared/menu/menu-id.model';
|
||||
import { Router } from '@angular/router';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { NgClass, NgComponentOutlet, NgIf, NgFor, AsyncPipe } from '@angular/common';
|
||||
|
||||
/**
|
||||
* Represents a expandable section in the sidebar
|
||||
@@ -19,7 +21,9 @@ import { Router } from '@angular/router';
|
||||
selector: 'li[ds-expandable-admin-sidebar-section]',
|
||||
templateUrl: './expandable-admin-sidebar-section.component.html',
|
||||
styleUrls: ['./expandable-admin-sidebar-section.component.scss'],
|
||||
animations: [rotate, slide, bgColor]
|
||||
animations: [rotate, slide, bgColor],
|
||||
standalone: true,
|
||||
imports: [NgClass, NgComponentOutlet, NgIf, NgFor, AsyncPipe, TranslateModule]
|
||||
})
|
||||
|
||||
@rendersSectionForMenu(MenuID.ADMIN, true)
|
||||
|
@@ -9,6 +9,7 @@ import { AdminSidebarComponent } from './admin-sidebar.component';
|
||||
selector: 'ds-themed-admin-sidebar',
|
||||
styleUrls: [],
|
||||
templateUrl: '../../shared/theme-support/themed.component.html',
|
||||
standalone: true
|
||||
})
|
||||
export class ThemedAdminSidebarComponent extends ThemedComponent<AdminSidebarComponent> {
|
||||
protected getComponentName(): string {
|
||||
|
@@ -9,7 +9,7 @@ describe('AdminSearchPageComponent', () => {
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [AdminWorkflowPageComponent],
|
||||
imports: [AdminWorkflowPageComponent],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
})
|
||||
.compileComponents();
|
||||
|
@@ -1,10 +1,13 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Context } from '../../core/shared/context.model';
|
||||
import { ConfigurationSearchPageComponent } from '../../search-page/configuration-search-page.component';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-admin-workflow-page',
|
||||
templateUrl: './admin-workflow-page.component.html',
|
||||
styleUrls: ['./admin-workflow-page.component.scss']
|
||||
styleUrls: ['./admin-workflow-page.component.scss'],
|
||||
standalone: true,
|
||||
imports: [ConfigurationSearchPageComponent]
|
||||
})
|
||||
|
||||
/**
|
||||
|
@@ -37,9 +37,9 @@ describe('WorkflowItemAdminWorkflowActionsComponent', () => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
RouterTestingModule.withRoutes([])
|
||||
RouterTestingModule.withRoutes([]),
|
||||
WorkflowItemAdminWorkflowActionsComponent
|
||||
],
|
||||
declarations: [WorkflowItemAdminWorkflowActionsComponent],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
})
|
||||
.compileComponents();
|
||||
|
@@ -5,11 +5,16 @@ import {
|
||||
getWorkflowItemDeleteRoute,
|
||||
getWorkflowItemSendBackRoute
|
||||
} from '../../../../../workflowitems-edit-page/workflowitems-edit-page-routing-paths';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { RouterLink } from '@angular/router';
|
||||
import { NgClass, NgIf } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-workflow-item-admin-workflow-actions-element',
|
||||
styleUrls: ['./workflow-item-admin-workflow-actions.component.scss'],
|
||||
templateUrl: './workflow-item-admin-workflow-actions.component.html'
|
||||
templateUrl: './workflow-item-admin-workflow-actions.component.html',
|
||||
standalone: true,
|
||||
imports: [NgClass, RouterLink, NgIf, TranslateModule]
|
||||
})
|
||||
/**
|
||||
* The component for displaying the actions for a list element for a workflow-item on the admin workflow search page
|
||||
|
@@ -31,8 +31,7 @@ describe('SupervisionOrderGroupSelectorComponent', () => {
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [TranslateModule.forRoot()],
|
||||
declarations: [SupervisionOrderGroupSelectorComponent],
|
||||
imports: [TranslateModule.forRoot(), SupervisionOrderGroupSelectorComponent],
|
||||
providers: [
|
||||
{ provide: NgbActiveModal, useValue: modalStub },
|
||||
{ provide: SupervisionOrderDataService, useValue: supervisionOrderDataService },
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { Component, EventEmitter, Output } from '@angular/core';
|
||||
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
||||
import { getFirstCompletedRemoteData } from 'src/app/core/shared/operators';
|
||||
import { NotificationsService } from 'src/app/shared/notifications/notifications.service';
|
||||
import { DSONameService } from '../../../../../../core/breadcrumbs/dso-name.service';
|
||||
@@ -8,6 +8,10 @@ import { Group } from '../../../../../../core/eperson/models/group.model';
|
||||
import { SupervisionOrder } from '../../../../../../core/supervision-order/models/supervision-order.model';
|
||||
import { SupervisionOrderDataService } from '../../../../../../core/supervision-order/supervision-order-data.service';
|
||||
import { RemoteData } from '../../../../../../core/data/remote-data';
|
||||
import { EpersonGroupListComponent } from '../../../../../../shared/eperson-group-list/eperson-group-list.component';
|
||||
import { ErrorComponent } from '../../../../../../shared/error/error.component';
|
||||
import { NgIf } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
/**
|
||||
* Component to wrap a dropdown - for type of order -
|
||||
@@ -20,6 +24,8 @@ import { RemoteData } from '../../../../../../core/data/remote-data';
|
||||
selector: 'ds-supervision-group-selector',
|
||||
styleUrls: ['./supervision-order-group-selector.component.scss'],
|
||||
templateUrl: './supervision-order-group-selector.component.html',
|
||||
standalone: true,
|
||||
imports: [FormsModule, NgIf, ErrorComponent, EpersonGroupListComponent, TranslateModule]
|
||||
})
|
||||
export class SupervisionOrderGroupSelectorComponent {
|
||||
|
||||
|
@@ -23,9 +23,9 @@ describe('SupervisionOrderStatusComponent', () => {
|
||||
provide: TranslateLoader,
|
||||
useClass: TranslateLoaderMock
|
||||
}
|
||||
})
|
||||
}),
|
||||
SupervisionOrderStatusComponent, VarDirective
|
||||
],
|
||||
declarations: [ SupervisionOrderStatusComponent, VarDirective ],
|
||||
schemas: [
|
||||
NO_ERRORS_SCHEMA
|
||||
]
|
||||
|
@@ -9,6 +9,10 @@ import { getFirstCompletedRemoteData } from '../../../../../../core/shared/opera
|
||||
import { isNotEmpty } from '../../../../../../shared/empty.util';
|
||||
import { RemoteData } from '../../../../../../core/data/remote-data';
|
||||
import { DSONameService } from '../../../../../../core/breadcrumbs/dso-name.service';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { NgIf, NgFor, AsyncPipe } from '@angular/common';
|
||||
import { VarDirective } from '../../../../../../shared/utils/var.directive';
|
||||
|
||||
export interface SupervisionOrderListEntry {
|
||||
supervisionOrder: SupervisionOrder;
|
||||
@@ -18,7 +22,9 @@ export interface SupervisionOrderListEntry {
|
||||
@Component({
|
||||
selector: 'ds-supervision-order-status',
|
||||
templateUrl: './supervision-order-status.component.html',
|
||||
styleUrls: ['./supervision-order-status.component.scss']
|
||||
styleUrls: ['./supervision-order-status.component.scss'],
|
||||
standalone: true,
|
||||
imports: [VarDirective, NgIf, NgFor, NgbTooltipModule, AsyncPipe, TranslateModule]
|
||||
})
|
||||
export class SupervisionOrderStatusComponent implements OnChanges {
|
||||
|
||||
|
@@ -56,9 +56,9 @@ describe('WorkspaceItemAdminWorkflowActionsComponent', () => {
|
||||
imports: [
|
||||
NgbModalModule,
|
||||
TranslateModule.forRoot(),
|
||||
RouterTestingModule.withRoutes([])
|
||||
RouterTestingModule.withRoutes([]),
|
||||
WorkspaceItemAdminWorkflowActionsComponent
|
||||
],
|
||||
declarations: [WorkspaceItemAdminWorkflowActionsComponent],
|
||||
providers: [
|
||||
{ provide: DSONameService, useClass: DSONameServiceMock },
|
||||
{ provide: NotificationsService, useValue: notificationService },
|
||||
|
@@ -3,7 +3,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { map, Observable } from 'rxjs';
|
||||
import { switchMap, take, tap } from 'rxjs/operators';
|
||||
import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
import { Item } from '../../../../../core/shared/item.model';
|
||||
import { getFirstSucceededRemoteDataPayload } from '../../../../../core/shared/operators';
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
import { ITEM_EDIT_AUTHORIZATIONS_PATH } from '../../../../../item-page/edit-item-page/edit-item-page.routing-paths';
|
||||
import { WorkspaceItem } from '../../../../../core/submission/models/workspaceitem.model';
|
||||
import { SupervisionOrder } from '../../../../../core/supervision-order/models/supervision-order.model';
|
||||
import { SupervisionOrderListEntry } from './supervision-order-status/supervision-order-status.component';
|
||||
import { SupervisionOrderListEntry, SupervisionOrderStatusComponent } from './supervision-order-status/supervision-order-status.component';
|
||||
import { ConfirmationModalComponent } from '../../../../../shared/confirmation-modal/confirmation-modal.component';
|
||||
import { hasValue } from '../../../../../shared/empty.util';
|
||||
import { NotificationsService } from '../../../../../shared/notifications/notifications.service';
|
||||
@@ -24,11 +24,15 @@ import { SupervisionOrderDataService } from '../../../../../core/supervision-ord
|
||||
import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service';
|
||||
import { DSpaceObject } from '../../../../../core/shared/dspace-object.model';
|
||||
import { getSearchResultFor } from '../../../../../shared/search/search-result-element-decorator';
|
||||
import { RouterLink } from '@angular/router';
|
||||
import { NgClass, NgIf } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-workspace-item-admin-workflow-actions-element',
|
||||
styleUrls: ['./workspace-item-admin-workflow-actions.component.scss'],
|
||||
templateUrl: './workspace-item-admin-workflow-actions.component.html'
|
||||
templateUrl: './workspace-item-admin-workflow-actions.component.html',
|
||||
standalone: true,
|
||||
imports: [SupervisionOrderStatusComponent, NgClass, RouterLink, NgIf, TranslateModule]
|
||||
})
|
||||
/**
|
||||
* The component for displaying the actions for a list element for a workspace-item on the admin workflow search page
|
||||
|
@@ -55,11 +55,11 @@ describe('WorkflowItemSearchResultAdminWorkflowGridElementComponent', () => {
|
||||
init();
|
||||
TestBed.configureTestingModule(
|
||||
{
|
||||
declarations: [WorkflowItemSearchResultAdminWorkflowGridElementComponent, ItemGridElementComponent, ListableObjectDirective],
|
||||
imports: [
|
||||
NoopAnimationsModule,
|
||||
TranslateModule.forRoot(),
|
||||
RouterTestingModule.withRoutes([]),
|
||||
WorkflowItemSearchResultAdminWorkflowGridElementComponent, ItemGridElementComponent, ListableObjectDirective
|
||||
],
|
||||
providers: [
|
||||
{ provide: LinkService, useValue: linkService },
|
||||
|
@@ -24,12 +24,17 @@ import { take } from 'rxjs/operators';
|
||||
import { WorkflowItemSearchResult } from '../../../../../shared/object-collection/shared/workflow-item-search-result.model';
|
||||
import { ThemeService } from '../../../../../shared/theme-support/theme.service';
|
||||
import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { WorkflowItemAdminWorkflowActionsComponent } from '../../actions/workflow-item/workflow-item-admin-workflow-actions.component';
|
||||
import { NgIf } from '@angular/common';
|
||||
|
||||
@listableObjectComponent(WorkflowItemSearchResult, ViewMode.GridElement, Context.AdminWorkflowSearch)
|
||||
@Component({
|
||||
selector: 'ds-workflow-item-search-result-admin-workflow-grid-element',
|
||||
styleUrls: ['./workflow-item-search-result-admin-workflow-grid-element.component.scss'],
|
||||
templateUrl: './workflow-item-search-result-admin-workflow-grid-element.component.html'
|
||||
templateUrl: './workflow-item-search-result-admin-workflow-grid-element.component.html',
|
||||
standalone: true,
|
||||
imports: [ListableObjectDirective, NgIf, WorkflowItemAdminWorkflowActionsComponent, TranslateModule]
|
||||
})
|
||||
/**
|
||||
* The component for displaying a grid element for an workflow item on the admin workflow search page
|
||||
|
@@ -67,11 +67,11 @@ describe('WorkspaceItemSearchResultAdminWorkflowGridElementComponent', () => {
|
||||
init();
|
||||
TestBed.configureTestingModule(
|
||||
{
|
||||
declarations: [WorkspaceItemSearchResultAdminWorkflowGridElementComponent, ItemGridElementComponent, ListableObjectDirective],
|
||||
imports: [
|
||||
NoopAnimationsModule,
|
||||
TranslateModule.forRoot(),
|
||||
RouterTestingModule.withRoutes([]),
|
||||
WorkspaceItemSearchResultAdminWorkflowGridElementComponent, ItemGridElementComponent, ListableObjectDirective
|
||||
],
|
||||
providers: [
|
||||
{ provide: LinkService, useValue: linkService },
|
||||
|
@@ -37,12 +37,17 @@ import { SupervisionOrder } from '../../../../../core/supervision-order/models/s
|
||||
import { PaginatedList } from '../../../../../core/data/paginated-list.model';
|
||||
import { SupervisionOrderDataService } from '../../../../../core/supervision-order/supervision-order-data.service';
|
||||
import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { AsyncPipe } from '@angular/common';
|
||||
import { WorkspaceItemAdminWorkflowActionsComponent } from '../../actions/workspace-item/workspace-item-admin-workflow-actions.component';
|
||||
|
||||
@listableObjectComponent(WorkspaceItemSearchResult, ViewMode.GridElement, Context.AdminWorkflowSearch)
|
||||
@Component({
|
||||
selector: 'ds-workflow-item-search-result-admin-workflow-grid-element',
|
||||
styleUrls: ['./workspace-item-search-result-admin-workflow-grid-element.component.scss'],
|
||||
templateUrl: './workspace-item-search-result-admin-workflow-grid-element.component.html'
|
||||
templateUrl: './workspace-item-search-result-admin-workflow-grid-element.component.html',
|
||||
standalone: true,
|
||||
imports: [ListableObjectDirective, WorkspaceItemAdminWorkflowActionsComponent, AsyncPipe, TranslateModule]
|
||||
})
|
||||
/**
|
||||
* The component for displaying a grid element for an workflow item on the admin workflow search page
|
||||
|
@@ -48,11 +48,11 @@ describe('WorkflowItemSearchResultAdminWorkflowListElementComponent', () => {
|
||||
init();
|
||||
TestBed.configureTestingModule(
|
||||
{
|
||||
declarations: [WorkflowItemSearchResultAdminWorkflowListElementComponent],
|
||||
imports: [
|
||||
NoopAnimationsModule,
|
||||
TranslateModule.forRoot(),
|
||||
RouterTestingModule.withRoutes([]),
|
||||
WorkflowItemSearchResultAdminWorkflowListElementComponent
|
||||
],
|
||||
providers: [
|
||||
{ provide: TruncatableService, useValue: mockTruncatableService },
|
||||
|
@@ -20,12 +20,18 @@ import {
|
||||
} from '../../../../../shared/object-collection/shared/workflow-item-search-result.model';
|
||||
import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service';
|
||||
import { APP_CONFIG, AppConfig } from '../../../../../../config/app-config.interface';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { WorkflowItemAdminWorkflowActionsComponent } from '../../actions/workflow-item/workflow-item-admin-workflow-actions.component';
|
||||
import { ListableObjectComponentLoaderComponent } from '../../../../../shared/object-collection/shared/listable-object/listable-object-component-loader.component';
|
||||
import { NgIf, AsyncPipe } from '@angular/common';
|
||||
|
||||
@listableObjectComponent(WorkflowItemSearchResult, ViewMode.ListElement, Context.AdminWorkflowSearch)
|
||||
@Component({
|
||||
selector: 'ds-workflow-item-search-result-admin-workflow-list-element',
|
||||
styleUrls: ['./workflow-item-search-result-admin-workflow-list-element.component.scss'],
|
||||
templateUrl: './workflow-item-search-result-admin-workflow-list-element.component.html'
|
||||
templateUrl: './workflow-item-search-result-admin-workflow-list-element.component.html',
|
||||
standalone: true,
|
||||
imports: [NgIf, ListableObjectComponentLoaderComponent, WorkflowItemAdminWorkflowActionsComponent, AsyncPipe, TranslateModule]
|
||||
})
|
||||
/**
|
||||
* The component for displaying a list element for a workflow item on the admin workflow search page
|
||||
|
@@ -60,11 +60,11 @@ describe('WorkspaceItemSearchResultAdminWorkflowListElementComponent', () => {
|
||||
init();
|
||||
TestBed.configureTestingModule(
|
||||
{
|
||||
declarations: [WorkspaceItemSearchResultAdminWorkflowListElementComponent],
|
||||
imports: [
|
||||
NoopAnimationsModule,
|
||||
TranslateModule.forRoot(),
|
||||
RouterTestingModule.withRoutes([]),
|
||||
WorkspaceItemSearchResultAdminWorkflowListElementComponent
|
||||
],
|
||||
providers: [
|
||||
{ provide: TruncatableService, useValue: mockTruncatableService },
|
||||
|
@@ -31,12 +31,18 @@ import { SupervisionOrder } from '../../../../../core/supervision-order/models/s
|
||||
import { SupervisionOrderDataService } from '../../../../../core/supervision-order/supervision-order-data.service';
|
||||
import { PaginatedList } from '../../../../../core/data/paginated-list.model';
|
||||
import { DSpaceObject } from '../../../../../core/shared/dspace-object.model';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { WorkspaceItemAdminWorkflowActionsComponent } from '../../actions/workspace-item/workspace-item-admin-workflow-actions.component';
|
||||
import { ListableObjectComponentLoaderComponent } from '../../../../../shared/object-collection/shared/listable-object/listable-object-component-loader.component';
|
||||
import { NgIf, AsyncPipe } from '@angular/common';
|
||||
|
||||
@listableObjectComponent(WorkspaceItemSearchResult, ViewMode.ListElement, Context.AdminWorkflowSearch)
|
||||
@Component({
|
||||
selector: 'ds-workflow-item-search-result-admin-workflow-list-element',
|
||||
styleUrls: ['./workspace-item-search-result-admin-workflow-list-element.component.scss'],
|
||||
templateUrl: './workspace-item-search-result-admin-workflow-list-element.component.html'
|
||||
templateUrl: './workspace-item-search-result-admin-workflow-list-element.component.html',
|
||||
standalone: true,
|
||||
imports: [NgIf, ListableObjectComponentLoaderComponent, WorkspaceItemAdminWorkflowActionsComponent, AsyncPipe, TranslateModule]
|
||||
})
|
||||
/**
|
||||
* The component for displaying a list element for a workflow item on the admin workflow search page
|
||||
|
@@ -39,9 +39,7 @@ const ENTRY_COMPONENTS = [
|
||||
@NgModule({
|
||||
imports: [
|
||||
SearchModule,
|
||||
SharedModule.withEntryComponents()
|
||||
],
|
||||
declarations: [
|
||||
SharedModule.withEntryComponents(),
|
||||
AdminWorkflowPageComponent,
|
||||
SupervisionOrderGroupSelectorComponent,
|
||||
SupervisionOrderStatusComponent,
|
||||
|
@@ -30,8 +30,6 @@ const ENTRY_COMPONENTS = [
|
||||
SharedModule,
|
||||
UiSwitchModule,
|
||||
UploadModule,
|
||||
],
|
||||
declarations: [
|
||||
AdminCurationTasksComponent,
|
||||
MetadataImportPageComponent,
|
||||
BatchImportPageComponent
|
||||
|
@@ -186,8 +186,8 @@ import { ThemedPageErrorComponent } from './page-error/themed-page-error.compone
|
||||
},
|
||||
{
|
||||
path: WORKFLOW_ITEM_MODULE_PATH,
|
||||
loadChildren: () => import('./workflowitems-edit-page/workflowitems-edit-page.module')
|
||||
.then((m) => m.WorkflowItemsEditPageModule),
|
||||
loadChildren: () => import('./workflowitems-edit-page/workflowitems-edit-page.routes')
|
||||
.then((m) => m.workflowItemsEditPageRoutes),
|
||||
canActivate: [EndUserAgreementCurrentUserGuard]
|
||||
},
|
||||
{
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { distinctUntilChanged, take, withLatestFrom } from 'rxjs/operators';
|
||||
import { DOCUMENT, isPlatformBrowser } from '@angular/common';
|
||||
import { DOCUMENT, isPlatformBrowser, AsyncPipe } from '@angular/common';
|
||||
import {
|
||||
AfterViewInit,
|
||||
ChangeDetectionStrategy,
|
||||
@@ -31,12 +31,15 @@ import { models } from './core/core.module';
|
||||
import { ThemeService } from './shared/theme-support/theme.service';
|
||||
import { IdleModalComponent } from './shared/idle-modal/idle-modal.component';
|
||||
import { distinctNext } from './core/shared/distinct-next';
|
||||
import { ThemedRootComponent } from './root/themed-root.component';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-app',
|
||||
templateUrl: './app.component.html',
|
||||
styleUrls: ['./app.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
imports: [ThemedRootComponent, AsyncPipe]
|
||||
})
|
||||
export class AppComponent implements OnInit, AfterViewInit {
|
||||
notificationOptions;
|
||||
|
@@ -117,14 +117,12 @@ const EXPORTS = [
|
||||
@NgModule({
|
||||
imports: [
|
||||
BrowserModule.withServerTransition({ appId: 'dspace-angular' }),
|
||||
...IMPORTS
|
||||
...IMPORTS,
|
||||
...DECLARATIONS
|
||||
],
|
||||
providers: [
|
||||
...PROVIDERS
|
||||
],
|
||||
declarations: [
|
||||
...DECLARATIONS,
|
||||
],
|
||||
exports: [
|
||||
...EXPORTS,
|
||||
...DECLARATIONS,
|
||||
|
@@ -49,15 +49,15 @@ describe('BitstreamAuthorizationsComponent', () => {
|
||||
provide: TranslateLoader,
|
||||
useClass: TranslateLoaderMock
|
||||
}
|
||||
})
|
||||
}),
|
||||
BitstreamAuthorizationsComponent
|
||||
],
|
||||
declarations: [BitstreamAuthorizationsComponent],
|
||||
providers: [
|
||||
{ provide: ActivatedRoute, useValue: routeStub },
|
||||
ChangeDetectorRef,
|
||||
BitstreamAuthorizationsComponent,
|
||||
],
|
||||
schemas: [NO_ERRORS_SCHEMA],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
|
@@ -1,15 +1,25 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { ActivatedRoute, RouterLink } from '@angular/router';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
import { first, map } from 'rxjs/operators';
|
||||
|
||||
import { RemoteData } from '../../core/data/remote-data';
|
||||
import { DSpaceObject } from '../../core/shared/dspace-object.model';
|
||||
import { ResourcePoliciesComponent } from '../../shared/resource-policies/resource-policies.component';
|
||||
import { AsyncPipe } from '@angular/common';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-collection-authorizations',
|
||||
templateUrl: './bitstream-authorizations.component.html',
|
||||
imports: [
|
||||
ResourcePoliciesComponent,
|
||||
AsyncPipe,
|
||||
TranslateModule,
|
||||
RouterLink
|
||||
],
|
||||
standalone: true
|
||||
})
|
||||
/**
|
||||
* Component that handles the Collection Authorizations
|
||||
|
@@ -90,8 +90,7 @@ describe('BitstreamDownloadPageComponent', () => {
|
||||
|
||||
function initTestbed() {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CommonModule, TranslateModule.forRoot()],
|
||||
declarations: [BitstreamDownloadPageComponent],
|
||||
imports: [CommonModule, TranslateModule.forRoot(), BitstreamDownloadPageComponent],
|
||||
providers: [
|
||||
{ provide: ActivatedRoute, useValue: activatedRoute },
|
||||
{ provide: Router, useValue: router },
|
||||
|
@@ -13,15 +13,21 @@ import { HardRedirectService } from '../../core/services/hard-redirect.service';
|
||||
import { getForbiddenRoute } from '../../app-routing-paths';
|
||||
import { RemoteData } from '../../core/data/remote-data';
|
||||
import { redirectOn4xx } from '../../core/shared/authorized.operators';
|
||||
import { isPlatformServer, Location } from '@angular/common';
|
||||
import { AsyncPipe, isPlatformServer, Location } from '@angular/common';
|
||||
import { DSONameService } from '../../core/breadcrumbs/dso-name.service';
|
||||
import { SignpostingDataService } from '../../core/data/signposting-data.service';
|
||||
import { ServerResponseService } from '../../core/services/server-response.service';
|
||||
import { SignpostingLink } from '../../core/data/signposting-links.model';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-bitstream-download-page',
|
||||
templateUrl: './bitstream-download-page.component.html'
|
||||
templateUrl: './bitstream-download-page.component.html',
|
||||
imports: [
|
||||
AsyncPipe,
|
||||
TranslateModule
|
||||
],
|
||||
standalone: true
|
||||
})
|
||||
/**
|
||||
* Page component for downloading a bitstream
|
||||
|
@@ -18,13 +18,11 @@ import { ThemedEditBitstreamPageComponent } from './edit-bitstream-page/themed-e
|
||||
SharedModule,
|
||||
BitstreamPageRoutingModule,
|
||||
FormModule,
|
||||
ResourcePoliciesModule
|
||||
],
|
||||
declarations: [
|
||||
ResourcePoliciesModule,
|
||||
BitstreamAuthorizationsComponent,
|
||||
EditBitstreamPageComponent,
|
||||
ThemedEditBitstreamPageComponent,
|
||||
BitstreamDownloadPageComponent,
|
||||
BitstreamDownloadPageComponent
|
||||
]
|
||||
})
|
||||
export class BitstreamPageModule {
|
||||
|
@@ -192,8 +192,7 @@ describe('EditBitstreamPageComponent', () => {
|
||||
});
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
imports: [TranslateModule.forRoot(), RouterTestingModule],
|
||||
declarations: [EditBitstreamPageComponent, FileSizePipe, VarDirective],
|
||||
imports: [TranslateModule.forRoot(), RouterTestingModule, EditBitstreamPageComponent, FileSizePipe, VarDirective],
|
||||
providers: [
|
||||
{ provide: NotificationsService, useValue: notificationsService },
|
||||
{ provide: DynamicFormService, useValue: formService },
|
||||
@@ -481,8 +480,7 @@ describe('EditBitstreamPageComponent', () => {
|
||||
});
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
imports: [TranslateModule.forRoot(), RouterTestingModule],
|
||||
declarations: [EditBitstreamPageComponent, FileSizePipe, VarDirective],
|
||||
imports: [TranslateModule.forRoot(), RouterTestingModule, EditBitstreamPageComponent, FileSizePipe, VarDirective],
|
||||
providers: [
|
||||
{ provide: NotificationsService, useValue: notificationsService },
|
||||
{ provide: DynamicFormService, useValue: formService },
|
||||
@@ -606,8 +604,7 @@ describe('EditBitstreamPageComponent', () => {
|
||||
});
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
imports: [TranslateModule.forRoot(), RouterTestingModule],
|
||||
declarations: [EditBitstreamPageComponent, FileSizePipe, VarDirective],
|
||||
imports: [TranslateModule.forRoot(), RouterTestingModule, EditBitstreamPageComponent, FileSizePipe, VarDirective],
|
||||
providers: [
|
||||
{ provide: NotificationsService, useValue: notificationsService },
|
||||
{ provide: DynamicFormService, useValue: formService },
|
||||
|
@@ -1,11 +1,11 @@
|
||||
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core';
|
||||
import { Bitstream } from '../../core/shared/bitstream.model';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
import { filter, map, switchMap, tap } from 'rxjs/operators';
|
||||
import { combineLatest, combineLatest as observableCombineLatest, Observable, of as observableOf, Subscription } from 'rxjs';
|
||||
import { DynamicFormControlModel, DynamicFormGroupModel, DynamicFormLayout, DynamicFormService, DynamicInputModel, DynamicSelectModel } from '@ng-dynamic-forms/core';
|
||||
import { UntypedFormGroup } from '@angular/forms';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
||||
import { DynamicCustomSwitchModel } from '../../shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.model';
|
||||
import cloneDeep from 'lodash/cloneDeep';
|
||||
import { BitstreamDataService } from '../../core/data/bitstream-data.service';
|
||||
@@ -16,7 +16,7 @@ import { BitstreamFormat } from '../../core/shared/bitstream-format.model';
|
||||
import { BitstreamFormatSupportLevel } from '../../core/shared/bitstream-format-support-level';
|
||||
import { hasValue, hasValueOperator, isEmpty, isNotEmpty } from '../../shared/empty.util';
|
||||
import { Metadata } from '../../core/shared/metadata.utils';
|
||||
import { Location } from '@angular/common';
|
||||
import { AsyncPipe, Location, NgIf } from '@angular/common';
|
||||
import { RemoteData } from '../../core/data/remote-data';
|
||||
import { PaginatedList } from '../../core/data/paginated-list.model';
|
||||
import { getEntityEditRoute } from '../../item-page/item-page-routing-paths';
|
||||
@@ -26,12 +26,31 @@ import { Item } from '../../core/shared/item.model';
|
||||
import { DsDynamicInputModel } from '../../shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-input.model';
|
||||
import { DsDynamicTextAreaModel } from '../../shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-textarea.model';
|
||||
import { PrimaryBitstreamService } from '../../core/data/primary-bitstream.service';
|
||||
import { FormComponent } from '../../shared/form/form.component';
|
||||
import { VarDirective } from '../../shared/utils/var.directive';
|
||||
import { ThemedThumbnailComponent } from '../../thumbnail/themed-thumbnail.component';
|
||||
import { ErrorComponent } from '../../shared/error/error.component';
|
||||
import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component';
|
||||
import { FileSizePipe } from '../../shared/utils/file-size-pipe';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-edit-bitstream-page',
|
||||
styleUrls: ['./edit-bitstream-page.component.scss'],
|
||||
templateUrl: './edit-bitstream-page.component.html',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
imports: [
|
||||
FormComponent,
|
||||
NgIf,
|
||||
VarDirective,
|
||||
ThemedThumbnailComponent,
|
||||
AsyncPipe,
|
||||
RouterLink,
|
||||
ErrorComponent,
|
||||
ThemedLoadingComponent,
|
||||
TranslateModule,
|
||||
FileSizePipe
|
||||
],
|
||||
standalone: true
|
||||
})
|
||||
/**
|
||||
* Page component for editing a bitstream
|
||||
|
@@ -6,6 +6,7 @@ import { ThemedComponent } from '../../shared/theme-support/themed.component';
|
||||
selector: 'ds-themed-edit-bitstream-page',
|
||||
styleUrls: [],
|
||||
templateUrl: '../../shared/theme-support/themed.component.html',
|
||||
standalone: true
|
||||
})
|
||||
export class ThemedEditBitstreamPageComponent extends ThemedComponent<EditBitstreamPageComponent> {
|
||||
protected getComponentName(): string {
|
||||
|
@@ -40,10 +40,6 @@ describe('BreadcrumbsComponent', () => {
|
||||
} as BreadcrumbsService;
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [
|
||||
BreadcrumbsComponent,
|
||||
VarDirective,
|
||||
],
|
||||
imports: [
|
||||
RouterTestingModule.withRoutes([]),
|
||||
TranslateModule.forRoot({
|
||||
@@ -52,10 +48,12 @@ describe('BreadcrumbsComponent', () => {
|
||||
useClass: TranslateLoaderMock,
|
||||
}
|
||||
}),
|
||||
BreadcrumbsComponent,
|
||||
VarDirective
|
||||
],
|
||||
providers: [
|
||||
{ provide: BreadcrumbsService, useValue: breadcrumbsServiceMock },
|
||||
],
|
||||
]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(BreadcrumbsComponent);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user