diff --git a/src/app/+collection-page/collection-form/collection-form.component.ts b/src/app/+collection-page/collection-form/collection-form.component.ts index d91d9fc1fb..a1d6a08290 100644 --- a/src/app/+collection-page/collection-form/collection-form.component.ts +++ b/src/app/+collection-page/collection-form/collection-form.component.ts @@ -3,7 +3,6 @@ import { DynamicFormService, DynamicInputModel, DynamicTextAreaModel } from '@ng import { DynamicFormControlModel } from '@ng-dynamic-forms/core/src/model/dynamic-form-control.model'; import { Collection } from '../../core/shared/collection.model'; import { ComColFormComponent } from '../../shared/comcol-forms/comcol-form/comcol-form.component'; -import { NormalizedCollection } from '../../core/cache/models/normalized-collection.model'; import { Location } from '@angular/common'; import { TranslateService } from '@ngx-translate/core'; import { NotificationsService } from '../../shared/notifications/notifications.service'; @@ -27,7 +26,7 @@ export class CollectionFormComponent extends ComColFormComponent { /** * @type {Collection.type} This is a collection-type form */ - protected type = Collection.type; + type = Collection.type; /** * The dynamic form fields used for creating/editing a collection diff --git a/src/app/+collection-page/edit-collection-page/edit-collection-page.component.ts b/src/app/+collection-page/edit-collection-page/edit-collection-page.component.ts index 21671fe112..209ce5149a 100644 --- a/src/app/+collection-page/edit-collection-page/edit-collection-page.component.ts +++ b/src/app/+collection-page/edit-collection-page/edit-collection-page.component.ts @@ -12,7 +12,7 @@ import { getCollectionPageRoute } from '../collection-page-routing.module'; templateUrl: '../../shared/comcol-forms/edit-comcol-page/edit-comcol-page.component.html' }) export class EditCollectionPageComponent extends EditComColPageComponent { - protected type = 'collection'; + type = 'collection'; public constructor( protected router: Router, diff --git a/src/app/+community-page/community-form/community-form.component.ts b/src/app/+community-page/community-form/community-form.component.ts index fc1e77c445..8e4f98c14e 100644 --- a/src/app/+community-page/community-form/community-form.component.ts +++ b/src/app/+community-page/community-form/community-form.component.ts @@ -27,7 +27,7 @@ export class CommunityFormComponent extends ComColFormComponent { /** * @type {Community.type} This is a community-type form */ - protected type = Community.type; + type = Community.type; /** * The dynamic form fields used for creating/editing a community diff --git a/src/app/+community-page/edit-community-page/edit-community-page.component.ts b/src/app/+community-page/edit-community-page/edit-community-page.component.ts index a8d4d32b7d..c0adfe0ff1 100644 --- a/src/app/+community-page/edit-community-page/edit-community-page.component.ts +++ b/src/app/+community-page/edit-community-page/edit-community-page.component.ts @@ -12,7 +12,7 @@ import { getCommunityPageRoute } from '../community-page-routing.module'; templateUrl: '../../shared/comcol-forms/edit-comcol-page/edit-comcol-page.component.html' }) export class EditCommunityPageComponent extends EditComColPageComponent { - protected type = 'community'; + type = 'community'; public constructor( protected router: Router, diff --git a/src/app/shared/comcol-forms/comcol-form/comcol-form.component.ts b/src/app/shared/comcol-forms/comcol-form/comcol-form.component.ts index 6e8b04e589..1fdaac33dd 100644 --- a/src/app/shared/comcol-forms/comcol-form/comcol-form.component.ts +++ b/src/app/shared/comcol-forms/comcol-form/comcol-form.component.ts @@ -47,7 +47,7 @@ export class ComColFormComponent implements OnInit, OnDe /** * Type of DSpaceObject that the form represents */ - protected type: ResourceType; + type: ResourceType; /** * @type {string} Key prefix used to generate form labels @@ -95,7 +95,7 @@ export class ComColFormComponent implements OnInit, OnDe * Observable keeping track whether or not the uploader has finished initializing * Used to start rendering the uploader component */ - private initializedUploaderOptions = new BehaviorSubject(false); + initializedUploaderOptions = new BehaviorSubject(false); /** * Array to track all subscriptions and unsubscribe them onDestroy diff --git a/src/app/shared/comcol-forms/edit-comcol-page/edit-comcol-page.component.ts b/src/app/shared/comcol-forms/edit-comcol-page/edit-comcol-page.component.ts index b1b37f265e..0f9d4c55b4 100644 --- a/src/app/shared/comcol-forms/edit-comcol-page/edit-comcol-page.component.ts +++ b/src/app/shared/comcol-forms/edit-comcol-page/edit-comcol-page.component.ts @@ -19,7 +19,7 @@ export class EditComColPageComponent implements On /** * The type of DSpaceObject (used to create i18n messages) */ - protected type: string; + public type: string; /** * The current page outlet string diff --git a/src/app/shared/uploader/uploader.component.spec.ts b/src/app/shared/uploader/uploader.component.spec.ts index a36bd7241b..dcdac911bf 100644 --- a/src/app/shared/uploader/uploader.component.spec.ts +++ b/src/app/shared/uploader/uploader.component.spec.ts @@ -64,12 +64,12 @@ describe('Chips component', () => { template: `` }) class TestComponent { - public uploadFilesOptions: UploaderOptions = { + public uploadFilesOptions: UploaderOptions = Object.assign(new UploaderOptions(), { url: 'http://test', authToken: null, disableMultipart: false, itemAlias: null - }; + }); /* tslint:disable:no-empty */ public onBeforeUpload = () => { diff --git a/src/app/submission/form/submission-upload-files/submission-upload-files.component.spec.ts b/src/app/submission/form/submission-upload-files/submission-upload-files.component.spec.ts index 60a572df54..34d291f0e4 100644 --- a/src/app/submission/form/submission-upload-files/submission-upload-files.component.spec.ts +++ b/src/app/submission/form/submission-upload-files/submission-upload-files.component.spec.ts @@ -28,6 +28,7 @@ import { SubmissionJsonPatchOperationsServiceStub } from '../../../shared/testin import { SubmissionJsonPatchOperationsService } from '../../../core/submission/submission-json-patch-operations.service'; import { SharedModule } from '../../../shared/shared.module'; import { createTestComponent } from '../../../shared/testing/utils'; +import { UploaderOptions } from '../../../shared/uploader/uploader-options.model'; describe('SubmissionUploadFilesComponent Component', () => { @@ -112,12 +113,12 @@ describe('SubmissionUploadFilesComponent Component', () => { comp.submissionId = submissionId; comp.collectionId = collectionId; comp.sectionId = 'upload'; - comp.uploadFilesOptions = { + comp.uploadFilesOptions = Object.assign(new UploaderOptions(),{ url: '', authToken: null, disableMultipart: false, itemAlias: null - }; + }); }); @@ -208,11 +209,11 @@ class TestComponent { submissionId = mockSubmissionId; collectionId = mockSubmissionCollectionId; sectionId = 'upload'; - uploadFilesOptions = { + uploadFilesOptions = Object.assign(new UploaderOptions(), { url: '', authToken: null, disableMultipart: false, itemAlias: null - }; + }); }