>>;
- pageSize = 5;
originalOptions = Object.assign(new PaginationComponentOptions(), {
id: 'obo',
currentPage: 1,
- pageSize: this.pageSize
+ pageSize: this.appConfig.item.bitstream.pageSize
});
licenseOptions = Object.assign(new PaginationComponentOptions(), {
id: 'lbo',
currentPage: 1,
- pageSize: this.pageSize
+ pageSize: this.appConfig.item.bitstream.pageSize
});
constructor(
bitstreamDataService: BitstreamDataService,
protected notificationsService: NotificationsService,
protected translateService: TranslateService,
- protected paginationService: PaginationService
+ protected paginationService: PaginationService,
+ @Inject(APP_CONFIG) protected appConfig: AppConfig
) {
- super(bitstreamDataService, notificationsService, translateService);
+ super(bitstreamDataService, notificationsService, translateService, appConfig);
}
ngOnInit(): void {
diff --git a/src/app/item-page/item-page-routing.module.ts b/src/app/item-page/item-page-routing.module.ts
index add2c3d768..b713b8ed78 100644
--- a/src/app/item-page/item-page-routing.module.ts
+++ b/src/app/item-page/item-page-routing.module.ts
@@ -14,9 +14,7 @@ import { ThemedItemPageComponent } from './simple/themed-item-page.component';
import { ThemedFullItemPageComponent } from './full/themed-full-item-page.component';
import { MenuItemType } from '../shared/menu/menu-item-type.model';
import { VersionPageComponent } from './version-page/version-page/version-page.component';
-import {
- BitstreamRequestACopyPageComponent
-} from '../shared/bitstream-request-a-copy-page/bitstream-request-a-copy-page.component';
+import { BitstreamRequestACopyPageComponent } from './bitstreams/request-a-copy/bitstream-request-a-copy-page.component';
import { REQUEST_COPY_MODULE_PATH } from '../app-routing-paths';
import { OrcidPageComponent } from './orcid-page/orcid-page.component';
import { OrcidPageGuard } from './orcid-page/orcid-page.guard';
@@ -67,6 +65,7 @@ import { OrcidPageGuard } from './orcid-page/orcid-page.guard';
id: 'statistics_item_:id',
active: true,
visible: true,
+ index: 2,
model: {
type: MenuItemType.LINK,
text: 'menu.section.statistics',
diff --git a/src/app/item-page/item-page.module.ts b/src/app/item-page/item-page.module.ts
index c4e86a37fb..39c2580921 100644
--- a/src/app/item-page/item-page.module.ts
+++ b/src/app/item-page/item-page.module.ts
@@ -46,6 +46,12 @@ import { OrcidPageComponent } from './orcid-page/orcid-page.component';
import { NgbAccordionModule } from '@ng-bootstrap/ng-bootstrap';
import { OrcidSyncSettingsComponent } from './orcid-page/orcid-sync-settings/orcid-sync-settings.component';
import { OrcidQueueComponent } from './orcid-page/orcid-queue/orcid-queue.component';
+import { UploadModule } from '../shared/upload/upload.module';
+import { ItemAlertsComponent } from './alerts/item-alerts.component';
+import { ItemVersionsModule } from './versions/item-versions.module';
+import { BitstreamRequestACopyPageComponent } from './bitstreams/request-a-copy/bitstream-request-a-copy-page.component';
+import { FileSectionComponent } from './simple/field-components/file-section/file-section.component';
+import { ItemSharedModule } from './item-shared.module';
const ENTRY_COMPONENTS = [
@@ -55,6 +61,7 @@ const ENTRY_COMPONENTS = [
];
const DECLARATIONS = [
+ FileSectionComponent,
ThemedFileSectionComponent,
ItemPageComponent,
ThemedItemPageComponent,
@@ -81,7 +88,10 @@ const DECLARATIONS = [
OrcidPageComponent,
OrcidAuthComponent,
OrcidSyncSettingsComponent,
- OrcidQueueComponent
+ OrcidQueueComponent,
+ ItemAlertsComponent,
+ VersionedItemComponent,
+ BitstreamRequestACopyPageComponent,
];
@NgModule({
@@ -90,18 +100,21 @@ const DECLARATIONS = [
SharedModule.withEntryComponents(),
ItemPageRoutingModule,
EditItemPageModule,
+ ItemVersionsModule,
+ ItemSharedModule,
StatisticsModule.forRoot(),
JournalEntitiesModule.withEntryComponents(),
ResearchEntitiesModule.withEntryComponents(),
NgxGalleryModule,
- NgbAccordionModule
+ NgbAccordionModule,
+ UploadModule,
],
declarations: [
...DECLARATIONS,
- VersionedItemComponent
+
],
exports: [
- ...DECLARATIONS
+ ...DECLARATIONS,
]
})
export class ItemPageModule {
diff --git a/src/app/item-page/item-shared.module.ts b/src/app/item-page/item-shared.module.ts
index b191b6c4b3..c558b11692 100644
--- a/src/app/item-page/item-shared.module.ts
+++ b/src/app/item-page/item-shared.module.ts
@@ -7,10 +7,32 @@ import { TranslateModule } from '@ngx-translate/core';
import { DYNAMIC_FORM_CONTROL_MAP_FN } from '@ng-dynamic-forms/core';
import { dsDynamicFormControlMapFn } from '../shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component';
import { TabbedRelatedEntitiesSearchComponent } from './simple/related-entities/tabbed-related-entities-search/tabbed-related-entities-search.component';
+import { ItemVersionsDeleteModalComponent } from './versions/item-versions-delete-modal/item-versions-delete-modal.component';
+import { ItemVersionsSummaryModalComponent } from './versions/item-versions-summary-modal/item-versions-summary-modal.component';
+import { MetadataValuesComponent } from './field-components/metadata-values/metadata-values.component';
+import { DsoPageVersionButtonComponent } from '../shared/dso-page/dso-page-version-button/dso-page-version-button.component';
+import { PersonPageClaimButtonComponent } from '../shared/dso-page/person-page-claim-button/person-page-claim-button.component';
+import { GenericItemPageFieldComponent } from './simple/field-components/specific-field/generic/generic-item-page-field.component';
+import { MetadataRepresentationListComponent } from './simple/metadata-representation-list/metadata-representation-list.component';
+import { RelatedItemsComponent } from './simple/related-items/related-items-component';
+import { DsoPageOrcidButtonComponent } from '../shared/dso-page/dso-page-orcid-button/dso-page-orcid-button.component';
+
+const ENTRY_COMPONENTS = [
+ ItemVersionsDeleteModalComponent,
+ ItemVersionsSummaryModalComponent,
+];
const COMPONENTS = [
+ ...ENTRY_COMPONENTS,
RelatedEntitiesSearchComponent,
- TabbedRelatedEntitiesSearchComponent
+ TabbedRelatedEntitiesSearchComponent,
+ MetadataValuesComponent,
+ DsoPageVersionButtonComponent,
+ PersonPageClaimButtonComponent,
+ GenericItemPageFieldComponent,
+ MetadataRepresentationListComponent,
+ RelatedItemsComponent,
+ DsoPageOrcidButtonComponent
];
@NgModule({
@@ -30,7 +52,8 @@ const COMPONENTS = [
{
provide: DYNAMIC_FORM_CONTROL_MAP_FN,
useValue: dsDynamicFormControlMapFn
- }
+ },
+ ...ENTRY_COMPONENTS,
]
})
export class ItemSharedModule { }
diff --git a/src/app/item-page/media-viewer/media-viewer-video/caption-info.ts b/src/app/item-page/media-viewer/media-viewer-video/caption-info.ts
new file mode 100644
index 0000000000..43996d096d
--- /dev/null
+++ b/src/app/item-page/media-viewer/media-viewer-video/caption-info.ts
@@ -0,0 +1,11 @@
+/*
+ The class is designed to host information related to Video Captioning support
+ and used in HTML 5 video track
+ src: source vtt file
+ srclang: two letter language code
+ langLabel: language label
+ */
+export class CaptionInfo {
+ constructor(public src: string, public srclang: string, public langLabel: string ) {
+ }
+}
diff --git a/src/app/item-page/media-viewer/media-viewer-video/language-helper.ts b/src/app/item-page/media-viewer/media-viewer-video/language-helper.ts
new file mode 100644
index 0000000000..b27ab9983f
--- /dev/null
+++ b/src/app/item-page/media-viewer/media-viewer-video/language-helper.ts
@@ -0,0 +1,190 @@
+export const languageHelper = {
+ ab: 'Abkhazian',
+ aa: 'Afar',
+ af: 'Afrikaans',
+ ak: 'Akan',
+ sq: 'Albanian',
+ am: 'Amharic',
+ ar: 'Arabic',
+ an: 'Aragonese',
+ hy: 'Armenian',
+ as: 'Assamese',
+ av: 'Avaric',
+ ae: 'Avestan',
+ ay: 'Aymara',
+ az: 'Azerbaijani',
+ bm: 'Bambara',
+ ba: 'Bashkir',
+ eu: 'Basque',
+ be: 'Belarusian',
+ bn: 'Bengali (Bangla)',
+ bh: 'Bihari',
+ bi: 'Bislama',
+ bs: 'Bosnian',
+ br: 'Breton',
+ bg: 'Bulgarian',
+ my: 'Burmese',
+ ca: 'Catalan',
+ ch: 'Chamorro',
+ ce: 'Chechen',
+ ny: 'Chichewa, Chewa, Nyanja',
+ zh: 'Chinese',
+ cv: 'Chuvash',
+ kw: 'Cornish',
+ co: 'Corsican',
+ cr: 'Cree',
+ hr: 'Croatian',
+ cs: 'Czech',
+ da: 'Danish',
+ dv: 'Divehi, Dhivehi, Maldivian',
+ nl: 'Dutch',
+ dz: 'Dzongkha',
+ en: 'English',
+ eo: 'Esperanto',
+ et: 'Estonian',
+ ee: 'Ewe',
+ fo: 'Faroese',
+ fj: 'Fijian',
+ fi: 'Finnish',
+ fr: 'French',
+ ff: 'Fula, Fulah, Pulaar, Pular',
+ gl: 'Galician',
+ gd: 'Gaelic (Scottish)',
+ gv: 'Gaelic (Manx)',
+ ka: 'Georgian',
+ de: 'German',
+ el: 'Greek',
+ gn: 'Guarani',
+ gu: 'Gujarati',
+ ht: 'Haitian Creole',
+ ha: 'Hausa',
+ he: 'Hebrew',
+ hz: 'Herero',
+ hi: 'Hindi',
+ ho: 'Hiri Motu',
+ hu: 'Hungarian',
+ is: 'Icelandic',
+ io: 'Ido',
+ ig: 'Igbo',
+ in: 'Indonesian',
+ ia: 'Interlingua',
+ ie: 'Interlingue',
+ iu: 'Inuktitut',
+ ik: 'Inupiak',
+ ga: 'Irish',
+ it: 'Italian',
+ ja: 'Japanese',
+ jv: 'Javanese',
+ kl: 'Kalaallisut, Greenlandic',
+ kn: 'Kannada',
+ kr: 'Kanuri',
+ ks: 'Kashmiri',
+ kk: 'Kazakh',
+ km: 'Khmer',
+ ki: 'Kikuyu',
+ rw: 'Kinyarwanda (Rwanda)',
+ rn: 'Kirundi',
+ ky: 'Kyrgyz',
+ kv: 'Komi',
+ kg: 'Kongo',
+ ko: 'Korean',
+ ku: 'Kurdish',
+ kj: 'Kwanyama',
+ lo: 'Lao',
+ la: 'Latin',
+ lv: 'Latvian (Lettish)',
+ li: 'Limburgish ( Limburger)',
+ ln: 'Lingala',
+ lt: 'Lithuanian',
+ lu: 'Luga-Katanga',
+ lg: 'Luganda, Ganda',
+ lb: 'Luxembourgish',
+ mk: 'Macedonian',
+ mg: 'Malagasy',
+ ms: 'Malay',
+ ml: 'Malayalam',
+ mt: 'Maltese',
+ mi: 'Maori',
+ mr: 'Marathi',
+ mh: 'Marshallese',
+ mo: 'Moldavian',
+ mn: 'Mongolian',
+ na: 'Nauru',
+ nv: 'Navajo',
+ ng: 'Ndonga',
+ nd: 'Northern Ndebele',
+ ne: 'Nepali',
+ no: 'Norwegian',
+ nb: 'Norwegian bokmål',
+ nn: 'Norwegian nynorsk',
+ oc: 'Occitan',
+ oj: 'Ojibwe',
+ cu: 'Old Church Slavonic, Old Bulgarian',
+ or: 'Oriya',
+ om: 'Oromo (Afaan Oromo)',
+ os: 'Ossetian',
+ pi: 'Pāli',
+ ps: 'Pashto, Pushto',
+ fa: 'Persian (Farsi)',
+ pl: 'Polish',
+ pt: 'Portuguese',
+ pa: 'Punjabi (Eastern)',
+ qu: 'Quechua',
+ rm: 'Romansh',
+ ro: 'Romanian',
+ ru: 'Russian',
+ se: 'Sami',
+ sm: 'Samoan',
+ sg: 'Sango',
+ sa: 'Sanskrit',
+ sr: 'Serbian',
+ sh: 'Serbo-Croatian',
+ st: 'Sesotho',
+ tn: 'Setswana',
+ sn: 'Shona',
+ ii: 'Sichuan Yi, Nuosu',
+ sd: 'Sindhi',
+ si: 'Sinhalese',
+ ss: 'Siswati (Swati)',
+ sk: 'Slovak',
+ sl: 'Slovenian',
+ so: 'Somali',
+ nr: 'Southern Ndebele',
+ es: 'Spanish',
+ su: 'Sundanese',
+ sw: 'Swahili (Kiswahili)',
+ sv: 'Swedish',
+ tl: 'Tagalog',
+ ty: 'Tahitian',
+ tg: 'Tajik',
+ ta: 'Tamil',
+ tt: 'Tatar',
+ te: 'Telugu',
+ th: 'Thai',
+ bo: 'Tibetan',
+ ti: 'Tigrinya',
+ to: 'Tonga',
+ ts: 'Tsonga',
+ tr: 'Turkish',
+ tk: 'Turkmen',
+ tw: 'Twi',
+ ug: 'Uyghur',
+ uk: 'Ukrainian',
+ ur: 'Urdu',
+ uz: 'Uzbek',
+ ve: 'Venda',
+ vi: 'Vietnamese',
+ vo: 'Volapük',
+ wa: 'Wallon',
+ cy: 'Welsh',
+ wo: 'Wolof',
+ fy: 'Western Frisian',
+ xh: 'Xhosa',
+ yi: 'Yiddish',
+ yo: 'Yoruba',
+ za: 'Zhuang, Chuang',
+ zu: 'Zulu'
+};
+
+
+
diff --git a/src/app/item-page/media-viewer/media-viewer-video/media-viewer-video.component.html b/src/app/item-page/media-viewer/media-viewer-video/media-viewer-video.component.html
index a4493e36fc..0cc854b272 100644
--- a/src/app/item-page/media-viewer/media-viewer-video/media-viewer-video.component.html
+++ b/src/app/item-page/media-viewer/media-viewer-video/media-viewer-video.component.html
@@ -1,4 +1,5 @@
+>
+
+
+
+
+
+
+
1">
-
-
+
+
diff --git a/src/app/my-dspace-page/collection-selector/collection-selector.component.spec.ts b/src/app/my-dspace-page/collection-selector/collection-selector.component.spec.ts
index ce54d326fc..af043b447b 100644
--- a/src/app/my-dspace-page/collection-selector/collection-selector.component.spec.ts
+++ b/src/app/my-dspace-page/collection-selector/collection-selector.component.spec.ts
@@ -128,10 +128,13 @@ describe('CollectionSelectorComponent', () => {
beforeEach(() => {
scheduler = getTestScheduler();
- fixture = TestBed.createComponent(CollectionSelectorComponent);
+ fixture = TestBed.overrideComponent(CollectionSelectorComponent, {
+ set: {
+ template: ''
+ }
+ }).createComponent(CollectionSelectorComponent);
component = fixture.componentInstance;
fixture.detectChanges();
-
});
it('should create', () => {
diff --git a/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission.component.spec.ts b/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission.component.spec.ts
index fb43c253eb..ed61fab1d6 100644
--- a/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission.component.spec.ts
+++ b/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission.component.spec.ts
@@ -16,10 +16,10 @@ import { TranslateLoaderMock } from '../../shared/mocks/translate-loader.mock';
import { NotificationsService } from '../../shared/notifications/notifications.service';
import { NotificationsServiceStub } from '../../shared/testing/notifications-service.stub';
import { getMockScrollToService } from '../../shared/mocks/scroll-to-service.mock';
-import { UploaderService } from '../../shared/uploader/uploader.service';
+import { DragService } from '../../core/drag.service';
import { HostWindowService } from '../../shared/host-window.service';
import { HostWindowServiceStub } from '../../shared/testing/host-window-service.stub';
-import { UploaderComponent } from '../../shared/uploader/uploader.component';
+import { UploaderComponent } from '../../shared/upload/uploader/uploader.component';
import { HttpXsrfTokenExtractor } from '@angular/common/http';
import { CookieService } from '../../core/services/cookie.service';
import { CookieServiceMock } from '../../shared/mocks/cookie.service.mock';
@@ -59,7 +59,7 @@ describe('MyDSpaceNewSubmissionComponent test', () => {
NgbModal,
ChangeDetectorRef,
MyDSpaceNewSubmissionComponent,
- UploaderService,
+ DragService,
{ provide: HttpXsrfTokenExtractor, useValue: new HttpXsrfTokenExtractorMock('mock-token') },
{ provide: CookieService, useValue: new CookieServiceMock() },
{ provide: HostWindowService, useValue: new HostWindowServiceStub(800) },
diff --git a/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission.component.ts b/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission.component.ts
index b2ba6fe2af..0694fc63bf 100644
--- a/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission.component.ts
+++ b/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission.component.ts
@@ -8,13 +8,13 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { AuthService } from '../../core/auth/auth.service';
import { DSpaceObject } from '../../core/shared/dspace-object.model';
import { NotificationsService } from '../../shared/notifications/notifications.service';
-import { UploaderOptions } from '../../shared/uploader/uploader-options.model';
+import { UploaderOptions } from '../../shared/upload/uploader/uploader-options.model';
import { HALEndpointService } from '../../core/shared/hal-endpoint.service';
import { hasValue } from '../../shared/empty.util';
import { SearchResult } from '../../shared/search/models/search-result.model';
import { CollectionSelectorComponent } from '../collection-selector/collection-selector.component';
-import { UploaderComponent } from '../../shared/uploader/uploader.component';
-import { UploaderError } from '../../shared/uploader/uploader-error.model';
+import { UploaderComponent } from '../../shared/upload/uploader/uploader.component';
+import { UploaderError } from '../../shared/upload/uploader/uploader-error.model';
import { Router } from '@angular/router';
/**
diff --git a/src/app/my-dspace-page/my-dspace-page.module.ts b/src/app/my-dspace-page/my-dspace-page.module.ts
index 2ccddd87f7..6ad50af96a 100644
--- a/src/app/my-dspace-page/my-dspace-page.module.ts
+++ b/src/app/my-dspace-page/my-dspace-page.module.ts
@@ -14,6 +14,7 @@ import { MyDSpaceNewSubmissionDropdownComponent } from './my-dspace-new-submissi
import { MyDSpaceNewExternalDropdownComponent } from './my-dspace-new-submission/my-dspace-new-external-dropdown/my-dspace-new-external-dropdown.component';
import { ThemedMyDSpacePageComponent } from './themed-my-dspace-page.component';
import { SearchModule } from '../shared/search/search.module';
+import { UploadModule } from '../shared/upload/upload.module';
const DECLARATIONS = [
MyDSpacePageComponent,
@@ -30,7 +31,8 @@ const DECLARATIONS = [
SharedModule,
SearchModule,
MyDspacePageRoutingModule,
- MyDspaceSearchModule.withEntryComponents()
+ MyDspaceSearchModule.withEntryComponents(),
+ UploadModule,
],
declarations: DECLARATIONS,
providers: [
diff --git a/src/app/my-dspace-page/my-dspace-search.module.ts b/src/app/my-dspace-page/my-dspace-search.module.ts
index a0fa76fafa..1ce39991b3 100644
--- a/src/app/my-dspace-page/my-dspace-search.module.ts
+++ b/src/app/my-dspace-page/my-dspace-search.module.ts
@@ -17,9 +17,16 @@ import { PoolSearchResultDetailElementComponent } from '../shared/object-detail/
import { ClaimedApprovedSearchResultListElementComponent } from '../shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-approved-search-result/claimed-approved-search-result-list-element.component';
import { ClaimedDeclinedSearchResultListElementComponent } from '../shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-declined-search-result/claimed-declined-search-result-list-element.component';
import { ResearchEntitiesModule } from '../entity-groups/research-entities/research-entities.module';
+import { ItemSubmitterComponent } from '../shared/object-collection/shared/mydspace-item-submitter/item-submitter.component';
+import { ItemDetailPreviewComponent } from '../shared/object-detail/my-dspace-result-detail-element/item-detail-preview/item-detail-preview.component';
+import { ItemDetailPreviewFieldComponent } from '../shared/object-detail/my-dspace-result-detail-element/item-detail-preview/item-detail-preview-field/item-detail-preview-field.component';
+import { ItemListPreviewComponent } from '../shared/object-list/my-dspace-result-list-element/item-list-preview/item-list-preview.component';
+import { ThemedItemListPreviewComponent } from '../shared/object-list/my-dspace-result-list-element/item-list-preview/themed-item-list-preview.component';
+import { MyDSpaceItemStatusComponent } from '../shared/object-collection/shared/mydspace-item-status/my-dspace-item-status.component';
+import { JournalEntitiesModule } from '../entity-groups/journal-entities/journal-entities.module';
+import { MyDSpaceActionsModule } from '../shared/mydspace-actions/mydspace-actions.module';
const ENTRY_COMPONENTS = [
- // put only entry components that use custom decorator
WorkspaceItemSearchResultListElementComponent,
WorkflowItemSearchResultListElementComponent,
ClaimedSearchResultListElementComponent,
@@ -31,7 +38,17 @@ const ENTRY_COMPONENTS = [
WorkflowItemSearchResultDetailElementComponent,
ClaimedTaskSearchResultDetailElementComponent,
PoolSearchResultDetailElementComponent,
- ItemSearchResultListElementSubmissionComponent
+ ItemSearchResultListElementSubmissionComponent,
+];
+
+const DECLARATIONS = [
+ ...ENTRY_COMPONENTS,
+ ItemSubmitterComponent,
+ ItemDetailPreviewComponent,
+ ItemDetailPreviewFieldComponent,
+ ItemListPreviewComponent,
+ ThemedItemListPreviewComponent,
+ MyDSpaceItemStatusComponent,
];
@NgModule({
@@ -39,10 +56,12 @@ const ENTRY_COMPONENTS = [
CommonModule,
SharedModule,
MyDspacePageRoutingModule,
- ResearchEntitiesModule.withEntryComponents()
+ MyDSpaceActionsModule,
+ ResearchEntitiesModule.withEntryComponents(),
+ JournalEntitiesModule.withEntryComponents(),
],
declarations: [
- ...ENTRY_COMPONENTS
+ ...DECLARATIONS,
]
})
diff --git a/src/app/navbar/navbar.component.scss b/src/app/navbar/navbar.component.scss
index fed88c5c68..441ee82c96 100644
--- a/src/app/navbar/navbar.component.scss
+++ b/src/app/navbar/navbar.component.scss
@@ -1,5 +1,5 @@
nav.navbar {
- border-bottom: 1px var(--bs-gray-400) solid;
+ border-bottom: 1px var(--ds-header-navbar-border-bottom-color) solid;
align-items: baseline;
}
diff --git a/src/app/navbar/navbar.module.ts b/src/app/navbar/navbar.module.ts
index af2bf036bd..de3244099d 100644
--- a/src/app/navbar/navbar.module.ts
+++ b/src/app/navbar/navbar.module.ts
@@ -21,6 +21,7 @@ const effects = [
const ENTRY_COMPONENTS = [
// put only entry components that use custom decorator
NavbarSectionComponent,
+ ExpandableNavbarSectionComponent,
ThemedExpandableNavbarSectionComponent,
];
@@ -34,11 +35,9 @@ const ENTRY_COMPONENTS = [
CoreModule.forRoot()
],
declarations: [
+ ...ENTRY_COMPONENTS,
NavbarComponent,
ThemedNavbarComponent,
- NavbarSectionComponent,
- ExpandableNavbarSectionComponent,
- ThemedExpandableNavbarSectionComponent,
],
providers: [],
exports: [
diff --git a/src/app/register-email-form/register-email-form.component.spec.ts b/src/app/register-email-form/register-email-form.component.spec.ts
index bac922c73b..cf3b4b13d2 100644
--- a/src/app/register-email-form/register-email-form.component.spec.ts
+++ b/src/app/register-email-form/register-email-form.component.spec.ts
@@ -95,6 +95,10 @@ describe('RegisterEmailComponent', () => {
comp.form.patchValue({email: 'valid@email.org'});
expect(comp.form.invalid).toBeFalse();
});
+ it('should be valid when uppercase letters are used', () => {
+ comp.form.patchValue({email: 'VALID@email.org'});
+ expect(comp.form.invalid).toBeFalse();
+ });
});
describe('register', () => {
it('should send a registration to the service and on success display a message and return to home', () => {
diff --git a/src/app/register-email-form/register-email-form.component.ts b/src/app/register-email-form/register-email-form.component.ts
index ced87b9e75..561bd53e67 100644
--- a/src/app/register-email-form/register-email-form.component.ts
+++ b/src/app/register-email-form/register-email-form.component.ts
@@ -79,7 +79,9 @@ export class RegisterEmailFormComponent implements OnInit {
this.form = this.formBuilder.group({
email: new FormControl('', {
validators: [Validators.required,
- Validators.pattern('^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$')
+ // Regex pattern borrowed from HTML5 specs for a valid email address:
+ // https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address
+ Validators.pattern('^[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$')
],
})
});
diff --git a/src/app/search-page/search-page.module.ts b/src/app/search-page/search-page.module.ts
index 758eca15c0..19fd9bd309 100644
--- a/src/app/search-page/search-page.module.ts
+++ b/src/app/search-page/search-page.module.ts
@@ -7,7 +7,6 @@ import { ConfigurationSearchPageGuard } from './configuration-search-page.guard'
import { SearchTrackerComponent } from './search-tracker.component';
import { StatisticsModule } from '../statistics/statistics.module';
import { SearchPageComponent } from './search-page.component';
-import { SidebarFilterService } from '../shared/sidebar/filter/sidebar-filter.service';
import { SearchFilterService } from '../core/shared/search/search-filter.service';
import { SearchConfigurationService } from '../core/shared/search/search-configuration.service';
import { JournalEntitiesModule } from '../entity-groups/journal-entities/journal-entities.module';
@@ -34,7 +33,6 @@ const components = [
declarations: components,
providers: [
SidebarService,
- SidebarFilterService,
SearchFilterService,
ConfigurationSearchPageGuard,
SearchConfigurationService
diff --git a/src/app/shared/collection-dropdown/themed-collection-dropdown.component.ts b/src/app/shared/collection-dropdown/themed-collection-dropdown.component.ts
new file mode 100644
index 0000000000..27c883099d
--- /dev/null
+++ b/src/app/shared/collection-dropdown/themed-collection-dropdown.component.ts
@@ -0,0 +1,33 @@
+import { CollectionDropdownComponent, CollectionListEntry } from './collection-dropdown.component';
+import { ThemedComponent } from '../theme-support/themed.component';
+import { Component, Input, Output, EventEmitter } from '@angular/core';
+
+@Component({
+ selector: 'ds-themed-collection-dropdown',
+ styleUrls: [],
+ templateUrl: '../../shared/theme-support/themed.component.html',
+})
+export class ThemedCollectionDropdownComponent extends ThemedComponent {
+
+ @Input() entityType: string;
+
+ @Output() searchComplete = new EventEmitter();
+
+ @Output() theOnlySelectable = new EventEmitter();
+
+ @Output() selectionChange = new EventEmitter();
+
+ protected inAndOutputNames: (keyof CollectionDropdownComponent & keyof this)[] = ['entityType', 'searchComplete', 'theOnlySelectable', 'selectionChange'];
+
+ protected getComponentName(): string {
+ return 'CollectionDropdownComponent';
+ }
+
+ protected importThemedComponent(themeName: string): Promise {
+ return import(`../../../themes/${themeName}/app/shared/collection-dropdown/collection-dropdown.component`);
+ }
+
+ protected importUnthemedComponent(): Promise {
+ return import(`./collection-dropdown.component`);
+ }
+}
diff --git a/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.ts b/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.ts
index 29be240753..23dfca8616 100644
--- a/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.ts
+++ b/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.ts
@@ -17,8 +17,8 @@ import { MetadataMap, MetadataValue } from '../../../../core/shared/metadata.mod
import { ResourceType } from '../../../../core/shared/resource-type';
import { hasValue, isNotEmpty } from '../../../empty.util';
import { NotificationsService } from '../../../notifications/notifications.service';
-import { UploaderOptions } from '../../../uploader/uploader-options.model';
-import { UploaderComponent } from '../../../uploader/uploader.component';
+import { UploaderOptions } from '../../../upload/uploader/uploader-options.model';
+import { UploaderComponent } from '../../../upload/uploader/uploader.component';
import { Operation } from 'fast-json-patch';
import { NoContent } from '../../../../core/shared/NoContent.model';
import { getFirstCompletedRemoteData } from '../../../../core/shared/operators';
diff --git a/src/app/shared/comcol/comcol.module.ts b/src/app/shared/comcol/comcol.module.ts
index 094387929a..efbcedf2c6 100644
--- a/src/app/shared/comcol/comcol.module.ts
+++ b/src/app/shared/comcol/comcol.module.ts
@@ -15,6 +15,7 @@ import { ThemedComcolPageBrowseByComponent } from './comcol-page-browse-by/theme
import { ComcolRoleComponent } from './comcol-forms/edit-comcol-page/comcol-role/comcol-role.component';
import { SharedModule } from '../shared.module';
import { FormModule } from '../form/form.module';
+import { UploadModule } from '../upload/upload.module';
const COMPONENTS = [
ComcolPageContentComponent,
@@ -28,9 +29,7 @@ const COMPONENTS = [
ComcolPageBrowseByComponent,
ThemedComcolPageBrowseByComponent,
ComcolRoleComponent,
-
ThemedComcolPageHandleComponent
-
];
@NgModule({
@@ -40,10 +39,12 @@ const COMPONENTS = [
imports: [
CommonModule,
FormModule,
- SharedModule
+ SharedModule,
+ UploadModule,
],
exports: [
- ...COMPONENTS
+ ...COMPONENTS,
+ UploadModule,
]
})
export class ComcolModule { }
diff --git a/src/app/shared/cookies/browser-klaro.service.ts b/src/app/shared/cookies/browser-klaro.service.ts
index 56e371242b..2b09c0bf15 100644
--- a/src/app/shared/cookies/browser-klaro.service.ts
+++ b/src/app/shared/cookies/browser-klaro.service.ts
@@ -1,5 +1,4 @@
-import { Injectable } from '@angular/core';
-import { setup, show } from 'klaro/dist/klaro-no-translations';
+import { Inject, Injectable, InjectionToken } from '@angular/core';
import { combineLatest as observableCombineLatest, Observable, of as observableOf } from 'rxjs';
import { AuthService } from '../../core/auth/auth.service';
import { TranslateService } from '@ngx-translate/core';
@@ -43,6 +42,17 @@ const cookiePurposeMessagePrefix = 'cookies.consent.purpose.';
*/
const updateDebounce = 300;
+/**
+ * By using this injection token instead of importing directly we can keep Klaro out of the main bundle
+ */
+const LAZY_KLARO = new InjectionToken>(
+ 'Lazily loaded Klaro',
+ {
+ providedIn: 'root',
+ factory: async () => (await import('klaro/dist/klaro-no-translations')),
+ }
+);
+
/**
* Browser implementation for the KlaroService, representing a service for handling Klaro consent preferences and UI
*/
@@ -65,7 +75,9 @@ export class BrowserKlaroService extends KlaroService {
private authService: AuthService,
private ePersonService: EPersonDataService,
private configService: ConfigurationDataService,
- private cookieService: CookieService) {
+ private cookieService: CookieService,
+ @Inject(LAZY_KLARO) private lazyKlaro: Promise,
+ ) {
super();
}
@@ -103,7 +115,6 @@ export class BrowserKlaroService extends KlaroService {
if (hideRegistrationVerification) {
servicesToHideArray.push(CAPTCHA_NAME);
}
- console.log(servicesToHideArray);
return servicesToHideArray;
})
);
@@ -135,8 +146,7 @@ export class BrowserKlaroService extends KlaroService {
this.translateConfiguration();
this.klaroConfig.services = this.filterConfigServices(servicesToHide);
-
- setup(this.klaroConfig);
+ this.lazyKlaro.then(({ setup }) => setup(this.klaroConfig));
});
}
@@ -220,7 +230,7 @@ export class BrowserKlaroService extends KlaroService {
* Show the cookie consent form
*/
showSettings() {
- show(this.klaroConfig);
+ this.lazyKlaro.then(({show}) => show(this.klaroConfig));
}
/**
diff --git a/src/app/shared/dso-selector/dso-selector/authorized-collection-selector/authorized-collection-selector.component.ts b/src/app/shared/dso-selector/dso-selector/authorized-collection-selector/authorized-collection-selector.component.ts
index ab48d058ca..cc1f9822d6 100644
--- a/src/app/shared/dso-selector/dso-selector/authorized-collection-selector/authorized-collection-selector.component.ts
+++ b/src/app/shared/dso-selector/dso-selector/authorized-collection-selector/authorized-collection-selector.component.ts
@@ -53,8 +53,9 @@ export class AuthorizedCollectionSelectorComponent extends DSOSelectorComponent
* Perform a search for authorized collections with the current query and page
* @param query Query to search objects for
* @param page Page to retrieve
+ * @param useCache Whether or not to use the cache
*/
- search(query: string, page: number): Observable>>> {
+ search(query: string, page: number, useCache: boolean = true): Observable>>> {
let searchListService$: Observable>> = null;
const findOptions: FindListOptions = {
currentPage: page,
@@ -69,7 +70,7 @@ export class AuthorizedCollectionSelectorComponent extends DSOSelectorComponent
findOptions);
} else {
searchListService$ = this.collectionDataService
- .getAuthorizedCollection(query, findOptions, true, false, followLink('parentCommunity'));
+ .getAuthorizedCollection(query, findOptions, useCache, false, followLink('parentCommunity'));
}
return searchListService$.pipe(
getFirstCompletedRemoteData(),
diff --git a/src/app/shared/dso-selector/dso-selector/dso-selector.component.html b/src/app/shared/dso-selector/dso-selector/dso-selector.component.html
index 8abb8ad558..c4f5dbc4cd 100644
--- a/src/app/shared/dso-selector/dso-selector/dso-selector.component.html
+++ b/src/app/shared/dso-selector/dso-selector/dso-selector.component.html
@@ -21,12 +21,12 @@