From 928d7a45a372003547b86be1ff3725288da43ad4 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Tue, 27 Jun 2023 15:26:49 +0200 Subject: [PATCH 001/186] 103176: Fix vcr not being defined yet in OnInit hook --- src/app/shared/theme-support/themed.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/shared/theme-support/themed.component.ts b/src/app/shared/theme-support/themed.component.ts index 2ff0713f460..920fbba6e56 100644 --- a/src/app/shared/theme-support/themed.component.ts +++ b/src/app/shared/theme-support/themed.component.ts @@ -1,10 +1,10 @@ import { + AfterViewInit, Component, ViewChild, ViewContainerRef, ComponentRef, SimpleChanges, - OnInit, OnDestroy, ComponentFactoryResolver, ChangeDetectorRef, @@ -21,7 +21,7 @@ import { GenericConstructor } from '../../core/shared/generic-constructor'; styleUrls: ['./themed.component.scss'], templateUrl: './themed.component.html', }) -export abstract class ThemedComponent implements OnInit, OnDestroy, OnChanges { +export abstract class ThemedComponent implements AfterViewInit, OnDestroy, OnChanges { @ViewChild('vcr', { read: ViewContainerRef }) vcr: ViewContainerRef; protected compRef: ComponentRef; @@ -49,7 +49,7 @@ export abstract class ThemedComponent implements OnInit, OnDestroy, OnChanges } } - ngOnInit(): void { + ngAfterViewInit(): void { this.destroyComponentInstance(); this.themeSub = this.themeService.getThemeName$().subscribe(() => { this.renderComponentInstance(); From a35b7d8356e17f4cdd8568389695b1685b27eb84 Mon Sep 17 00:00:00 2001 From: Kim Shepherd Date: Thu, 29 Jun 2023 16:09:54 +0200 Subject: [PATCH 002/186] catch and handle unsuccessful "convert rels to items" responses --- .../shared/item-relationships-utils.ts | 41 +++++++++++++------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/src/app/item-page/simple/item-types/shared/item-relationships-utils.ts b/src/app/item-page/simple/item-types/shared/item-relationships-utils.ts index b4c3da2cdc3..0c4e82178f5 100644 --- a/src/app/item-page/simple/item-types/shared/item-relationships-utils.ts +++ b/src/app/item-page/simple/item-types/shared/item-relationships-utils.ts @@ -5,8 +5,7 @@ import { RemoteData } from '../../../../core/data/remote-data'; import { Relationship } from '../../../../core/shared/item-relationships/relationship.model'; import { Item } from '../../../../core/shared/item.model'; import { - getFirstSucceededRemoteDataPayload, - getFirstSucceededRemoteData + getFirstCompletedRemoteData } from '../../../../core/shared/operators'; import { hasValue } from '../../../../shared/empty.util'; import { InjectionToken } from '@angular/core'; @@ -77,24 +76,42 @@ export const relationsToItems = (thisId: string) => * @param {string} thisId The item's id of which the relations belong to * @returns {(source: Observable) => Observable} */ -export const paginatedRelationsToItems = (thisId: string) => - (source: Observable>>): Observable>> => +export const paginatedRelationsToItems = (thisId: string) => (source: Observable>>): Observable>> => source.pipe( - getFirstSucceededRemoteData(), + getFirstCompletedRemoteData(), switchMap((relationshipsRD: RemoteData>) => { return observableCombineLatest( relationshipsRD.payload.page.map((rel: Relationship) => observableCombineLatest([ - rel.leftItem.pipe(getFirstSucceededRemoteDataPayload()), - rel.rightItem.pipe(getFirstSucceededRemoteDataPayload())] + rel.leftItem.pipe( + getFirstCompletedRemoteData(), + map((rd: RemoteData) => { + if (rd.hasSucceeded) { + return rd.payload; + } else { + return null; + } + }) + ), + rel.rightItem.pipe( + getFirstCompletedRemoteData(), + map((rd: RemoteData) => { + if (rd.hasSucceeded) { + return rd.payload; + } else { + return null; + } + }) + ), + ] ) - )).pipe( + ) + ).pipe( map((arr) => - arr - .map(([leftItem, rightItem]) => { - if (leftItem.id === thisId) { + arr.map(([leftItem, rightItem]) => { + if (hasValue(leftItem) && leftItem.id === thisId) { return rightItem; - } else if (rightItem.id === thisId) { + } else if (hasValue(rightItem) && rightItem.id === thisId) { return leftItem; } }) From ae6b183faec9cda0d2932143a52e14ef94bd945c Mon Sep 17 00:00:00 2001 From: Art Lowel Date: Wed, 14 Jun 2023 18:51:42 +0200 Subject: [PATCH 003/186] 103236: fix issue where setStaleByHrefSubtring wouldn't emit after all requests were stale --- src/app/core/data/request.service.ts | 36 +++++++++++++++++++++------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/src/app/core/data/request.service.ts b/src/app/core/data/request.service.ts index 2d5acb2cb3d..3b7ee80ffb0 100644 --- a/src/app/core/data/request.service.ts +++ b/src/app/core/data/request.service.ts @@ -2,8 +2,8 @@ import { Injectable } from '@angular/core'; import { HttpHeaders } from '@angular/common/http'; import { createSelector, MemoizedSelector, select, Store } from '@ngrx/store'; -import { Observable } from 'rxjs'; -import { filter, map, take, tap } from 'rxjs/operators'; +import { Observable, from as observableFrom } from 'rxjs'; +import { filter, find, map, mergeMap, switchMap, take, tap, toArray } from 'rxjs/operators'; import { cloneDeep } from 'lodash'; import { hasValue, isEmpty, isNotEmpty, hasNoValue } from '../../shared/empty.util'; import { ObjectCacheEntry } from '../cache/object-cache.reducer'; @@ -292,22 +292,42 @@ export class RequestService { * Set all requests that match (part of) the href to stale * * @param href A substring of the request(s) href - * @return Returns an observable emitting whether or not the cache is removed + * @return Returns an observable emitting when those requests are all stale */ setStaleByHrefSubstring(href: string): Observable { - this.store.pipe( + const requestUUIDs$ = this.store.pipe( select(uuidsFromHrefSubstringSelector(requestIndexSelector, href)), take(1) - ).subscribe((uuids: string[]) => { + ); + requestUUIDs$.subscribe((uuids: string[]) => { for (const uuid of uuids) { this.store.dispatch(new RequestStaleAction(uuid)); } }); this.requestsOnTheirWayToTheStore = this.requestsOnTheirWayToTheStore.filter((reqHref: string) => reqHref.indexOf(href) < 0); - return this.store.pipe( - select(uuidsFromHrefSubstringSelector(requestIndexSelector, href)), - map((uuids) => isEmpty(uuids)) + // emit true after all requests are stale + return requestUUIDs$.pipe( + switchMap((uuids: string[]) => { + if (isEmpty(uuids)) { + // if there were no matching requests, emit true immediately + return [true]; + } else { + // otherwise emit all request uuids in order + return observableFrom(uuids).pipe( + // retrieve the RequestEntry for each uuid + mergeMap((uuid: string) => this.getByUUID(uuid)), + // check whether it is undefined or stale + map((request: RequestEntry) => hasNoValue(request) || isStale(request.state)), + // if it is, complete + find((stale: boolean) => stale === true), + // after all observables above are completed, emit them as a single array + toArray(), + // when the array comes in, emit true + map(() => true) + ); + } + }) ); } From 02a20c8862ca4d93919ca07e900d70a722ebbb5d Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Fri, 30 Jun 2023 16:56:37 +0200 Subject: [PATCH 004/186] 103236: Added tests for setStaleByHrefSubstring --- src/app/core/data/request.service.spec.ts | 46 ++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/src/app/core/data/request.service.spec.ts b/src/app/core/data/request.service.spec.ts index fe35d840d7d..4493c61a69c 100644 --- a/src/app/core/data/request.service.spec.ts +++ b/src/app/core/data/request.service.spec.ts @@ -1,6 +1,6 @@ import { Store, StoreModule } from '@ngrx/store'; import { cold, getTestScheduler } from 'jasmine-marbles'; -import { EMPTY, of as observableOf } from 'rxjs'; +import { EMPTY, Observable, of as observableOf } from 'rxjs'; import { TestScheduler } from 'rxjs/testing'; import { getMockObjectCacheService } from '../../shared/mocks/object-cache.service.mock'; @@ -625,4 +625,48 @@ describe('RequestService', () => { expect(done$).toBeObservable(cold('-----(t|)', { t: true })); })); }); + + describe('setStaleByHrefSubstring', () => { + let dispatchSpy: jasmine.Spy; + let getByUUIDSpy: jasmine.Spy; + + beforeEach(() => { + dispatchSpy = spyOn(store, 'dispatch'); + getByUUIDSpy = spyOn(service, 'getByUUID').and.callThrough(); + }); + + describe('with an empty/no matching requests in the state', () => { + it('should return true', () => { + const done$: Observable = service.setStaleByHrefSubstring('https://rest.api/endpoint/selfLink'); + expect(done$).toBeObservable(cold('(a|)', { a: true })); + }); + }); + + describe('with a matching request in the state', () => { + beforeEach(() => { + const state = Object.assign({}, initialState, { + core: Object.assign({}, initialState.core, { + 'index': { + 'get-request/href-to-uuid': { + 'https://rest.api/endpoint/selfLink': '5f2a0d2a-effa-4d54-bd54-5663b960f9eb' + } + } + }) + }); + mockStore.setState(state); + }); + + it('should return an Observable that emits true as soon as the request is stale', () => { + dispatchSpy.and.callFake(() => { /* empty */ }); // don't actually set as stale + getByUUIDSpy.and.returnValue(cold('a-b--c--d-', { // but fake the state in the cache + a: { state: RequestEntryState.ResponsePending }, + b: { state: RequestEntryState.Success }, + c: { state: RequestEntryState.SuccessStale }, + d: { state: RequestEntryState.Error }, + })); + const done$: Observable = service.setStaleByHrefSubstring('https://rest.api/endpoint/selfLink'); + expect(done$).toBeObservable(cold('-----(a|)', { a: true })); + }); + }); + }); }); From b2b1782cd8505cf079782811bab4238e5cc0a359 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Fri, 30 Jun 2023 20:23:51 +0200 Subject: [PATCH 005/186] Hide entity field in collection form when entities aren't initialized --- .../collection-form/collection-form.component.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 23698de84e9..b52d282f634 100644 --- a/src/app/collection-page/collection-form/collection-form.component.ts +++ b/src/app/collection-page/collection-form/collection-form.component.ts @@ -79,9 +79,8 @@ export class CollectionFormComponent extends ComColFormComponent imp // retrieve all entity types to populate the dropdowns selection entities$.subscribe((entityTypes: ItemType[]) => { - entityTypes - .filter((type: ItemType) => type.label !== NONE_ENTITY_TYPE) - .forEach((type: ItemType, index: number) => { + entityTypes = entityTypes.filter((type: ItemType) => type.label !== NONE_ENTITY_TYPE); + entityTypes.forEach((type: ItemType, index: number) => { this.entityTypeSelection.add({ disabled: false, label: type.label, @@ -93,7 +92,7 @@ export class CollectionFormComponent extends ComColFormComponent imp } }); - this.formModel = [...collectionFormModels, this.entityTypeSelection]; + this.formModel = entityTypes.length === 0 ? collectionFormModels : [...collectionFormModels, this.entityTypeSelection]; super.ngOnInit(); }); From cf777268666587d5980408d7bc3872260606ae71 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Fri, 30 Jun 2023 22:41:07 +0200 Subject: [PATCH 006/186] Fix enter not submitting collection form correctly Fixed it for communities, collections, ePersons & groups --- .../eperson-form/eperson-form.component.html | 10 +++++----- .../group-form/group-form.component.html | 4 ++-- .../comcol-form/comcol-form.component.html | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.html b/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.html index e9cc48aee3d..156f2e776da 100644 --- a/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.html +++ b/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.html @@ -15,23 +15,23 @@

{{messagePrefix + '.edit' | translate}}

[displayCancel]="false" (submitForm)="onSubmit()">
-
-
- -
- diff --git a/src/app/access-control/group-registry/group-form/group-form.component.html b/src/app/access-control/group-registry/group-form/group-form.component.html index 0fc5a574b7d..e50a4790904 100644 --- a/src/app/access-control/group-registry/group-form/group-form.component.html +++ b/src/app/access-control/group-registry/group-form/group-form.component.html @@ -25,12 +25,12 @@

{{messagePrefix + '.head.edit' | translate}}

[displayCancel]="false" (submitForm)="onSubmit()">
-
diff --git a/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.html b/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.html index 5d7b092f740..b7b3d344b1e 100644 --- a/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.html +++ b/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.html @@ -42,7 +42,7 @@ [formModel]="formModel" [displayCancel]="false" (submitForm)="onSubmit()"> - From b5a70e8f95d1046bed0e33d5b0bdc8109d645676 Mon Sep 17 00:00:00 2001 From: Nona Luypaert Date: Sat, 8 Jul 2023 00:20:30 +0200 Subject: [PATCH 007/186] Fix VocabularyTreeview not updating + i18n for nsi --- .../vocabulary-treeview/vocabulary-treeview.component.ts | 9 +++++++-- src/assets/i18n/en.json5 | 6 ++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/app/shared/form/vocabulary-treeview/vocabulary-treeview.component.ts b/src/app/shared/form/vocabulary-treeview/vocabulary-treeview.component.ts index 017416e8c25..13d4495e614 100644 --- a/src/app/shared/form/vocabulary-treeview/vocabulary-treeview.component.ts +++ b/src/app/shared/form/vocabulary-treeview/vocabulary-treeview.component.ts @@ -1,5 +1,5 @@ import { FlatTreeControl } from '@angular/cdk/tree'; -import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core'; +import { Component, EventEmitter, Input, OnDestroy, OnInit, Output, OnChanges, SimpleChanges } from '@angular/core'; import { map } from 'rxjs/operators'; import { Observable, Subscription } from 'rxjs'; @@ -28,7 +28,7 @@ import { getFirstSucceededRemoteDataPayload } from '../../../core/shared/operato templateUrl: './vocabulary-treeview.component.html', styleUrls: ['./vocabulary-treeview.component.scss'] }) -export class VocabularyTreeviewComponent implements OnDestroy, OnInit { +export class VocabularyTreeviewComponent implements OnDestroy, OnInit, OnChanges { /** * The {@link VocabularyOptions} object @@ -322,4 +322,9 @@ export class VocabularyTreeviewComponent implements OnDestroy, OnInit { private getEntryId(entry: VocabularyEntry): string { return entry.authority || entry.otherInformation.id || undefined; } + + ngOnChanges(changes: SimpleChanges): void { + this.reset(); + this.vocabularyTreeviewService.initialize(this.vocabularyOptions, new PageInfo(), this.selectedItems, null); + } } diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5 index 6c91bae4c16..ee594a9cb29 100644 --- a/src/assets/i18n/en.json5 +++ b/src/assets/i18n/en.json5 @@ -782,6 +782,8 @@ "browse.comcol.by.srsc": "By Subject Category", + "browse.comcol.by.nsi": "By Norwegian Science Index", + "browse.comcol.by.title": "By Title", "browse.comcol.head": "Browse", @@ -804,6 +806,8 @@ "browse.metadata.srsc.breadcrumbs": "Browse by Subject Category", + "browse.metadata.nsi.breadcrumbs": "Browse by Norwegian Science Index", + "browse.metadata.title.breadcrumbs": "Browse by Title", "pagination.next.button": "Next", @@ -2826,6 +2830,8 @@ "menu.section.browse_global_by_srsc": "By Subject Category", + "menu.section.browse_global_by_nsi": "By Norwegian Science Index", + "menu.section.browse_global_by_title": "By Title", "menu.section.browse_global_communities_and_collections": "Communities & Collections", From 23aefb7385a987c5cb3f3eb169b37037f032a126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eike=20Martin=20L=C3=B6hden?= Date: Mon, 10 Jul 2023 15:29:14 +0200 Subject: [PATCH 008/186] Added themed-user-menu component. --- .../user-menu/themed-user-menu.component.ts | 33 +++++++++++++++++++ src/app/shared/shared.module.ts | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 src/app/shared/auth-nav-menu/user-menu/themed-user-menu.component.ts diff --git a/src/app/shared/auth-nav-menu/user-menu/themed-user-menu.component.ts b/src/app/shared/auth-nav-menu/user-menu/themed-user-menu.component.ts new file mode 100644 index 00000000000..09f02eb761c --- /dev/null +++ b/src/app/shared/auth-nav-menu/user-menu/themed-user-menu.component.ts @@ -0,0 +1,33 @@ +import {Component, Input} from '@angular/core' +import {ThemedComponent} from '../../theme-support/themed.component'; +import {UserMenuComponent} from './user-menu.component'; + +/** + * This component represents the user nav menu. + */ +@Component({ + selector: 'ds-themed-user-menu', + templateUrl: './../../theme-support/themed.component.html', + styleUrls: [] +}) +export class ThemedUserMenuComponent extends ThemedComponent{ + + /** + * The input flag to show user details in navbar expandable menu + */ + @Input() inExpandableNavbar = false; + + protected inAndOutputNames: (keyof UserMenuComponent & keyof this)[] = ['inExpandableNavbar']; + + protected getComponentName(): string { + return 'UserMenuComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import((`../../../../themes/${themeName}/app/shared/auth-nav-menu/user-menu/user-menu.component`)); + } + + protected importUnthemedComponent(): Promise { + return import('./user-menu.component'); + } +} diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 0f7871f7f9b..91175736baf 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -284,6 +284,7 @@ import { } from '../item-page/simple/field-components/specific-field/title/themed-item-page-field.component'; import { BitstreamListItemComponent } from './object-list/bitstream-list-item/bitstream-list-item.component'; import { NgxPaginationModule } from 'ngx-pagination'; +import {ThemedUserMenuComponent} from './auth-nav-menu/user-menu/themed-user-menu.component'; const MODULES = [ CommonModule, @@ -332,6 +333,7 @@ const COMPONENTS = [ AuthNavMenuComponent, ThemedAuthNavMenuComponent, UserMenuComponent, + ThemedUserMenuComponent, DsSelectComponent, ErrorComponent, LangSwitchComponent, From 63582cfa0d40497b73f39088aaf949f41571e5bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eike=20Martin=20L=C3=B6hden?= Date: Mon, 10 Jul 2023 15:34:25 +0200 Subject: [PATCH 009/186] Corrected missing semicolon. --- .../auth-nav-menu/user-menu/themed-user-menu.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/shared/auth-nav-menu/user-menu/themed-user-menu.component.ts b/src/app/shared/auth-nav-menu/user-menu/themed-user-menu.component.ts index 09f02eb761c..cecafc9d5cd 100644 --- a/src/app/shared/auth-nav-menu/user-menu/themed-user-menu.component.ts +++ b/src/app/shared/auth-nav-menu/user-menu/themed-user-menu.component.ts @@ -1,4 +1,4 @@ -import {Component, Input} from '@angular/core' +import {Component, Input} from '@angular/core'; import {ThemedComponent} from '../../theme-support/themed.component'; import {UserMenuComponent} from './user-menu.component'; From ed84f4513225d3fdef45edcafd2d434271b5f4cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eike=20Martin=20L=C3=B6hden?= Date: Mon, 10 Jul 2023 15:38:32 +0200 Subject: [PATCH 010/186] Replaced tags for ds-user-menu. --- src/app/navbar/navbar.component.html | 2 +- src/app/shared/auth-nav-menu/auth-nav-menu.component.html | 2 +- src/app/shared/auth-nav-menu/auth-nav-menu.component.spec.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/navbar/navbar.component.html b/src/app/navbar/navbar.component.html index bc1e04f5130..8608ee7b02d 100644 --- a/src/app/navbar/navbar.component.html +++ b/src/app/navbar/navbar.component.html @@ -6,7 +6,7 @@
diff --git a/src/app/shared/auth-nav-menu/auth-nav-menu.component.spec.ts b/src/app/shared/auth-nav-menu/auth-nav-menu.component.spec.ts index 58a1edfabde..0b9ea6ef4b4 100644 --- a/src/app/shared/auth-nav-menu/auth-nav-menu.component.spec.ts +++ b/src/app/shared/auth-nav-menu/auth-nav-menu.component.spec.ts @@ -248,7 +248,7 @@ describe('AuthNavMenuComponent', () => { component = null; }); it('should render UserMenuComponent component', () => { - const logoutDropdownMenu = deNavMenuItem.query(By.css('ds-user-menu')); + const logoutDropdownMenu = deNavMenuItem.query(By.css('ds-themed-user-menu')); expect(logoutDropdownMenu.nativeElement).toBeDefined(); }); }); From e3f57dae44de6f58e1ba2bf91d0de092b9416f7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eike=20Martin=20L=C3=B6hden?= Date: Mon, 10 Jul 2023 15:54:09 +0200 Subject: [PATCH 011/186] Included user-menu component in custom theme. --- .../user-menu/user-menu.component.html | 0 .../user-menu/user-menu.component.scss | 0 .../user-menu/user-menu.component.ts | 15 +++++++++++++++ src/themes/custom/lazy-theme.module.ts | 2 ++ 4 files changed, 17 insertions(+) create mode 100644 src/themes/custom/app/shared/auth-nav-menu/user-menu/user-menu.component.html create mode 100644 src/themes/custom/app/shared/auth-nav-menu/user-menu/user-menu.component.scss create mode 100644 src/themes/custom/app/shared/auth-nav-menu/user-menu/user-menu.component.ts diff --git a/src/themes/custom/app/shared/auth-nav-menu/user-menu/user-menu.component.html b/src/themes/custom/app/shared/auth-nav-menu/user-menu/user-menu.component.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/themes/custom/app/shared/auth-nav-menu/user-menu/user-menu.component.scss b/src/themes/custom/app/shared/auth-nav-menu/user-menu/user-menu.component.scss new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/themes/custom/app/shared/auth-nav-menu/user-menu/user-menu.component.ts b/src/themes/custom/app/shared/auth-nav-menu/user-menu/user-menu.component.ts new file mode 100644 index 00000000000..f9f1db65ee6 --- /dev/null +++ b/src/themes/custom/app/shared/auth-nav-menu/user-menu/user-menu.component.ts @@ -0,0 +1,15 @@ +import { Component } from '@angular/core'; +import { UserMenuComponent as BaseComponent } from '../../../../../../app/shared/auth-nav-menu/user-menu/user-menu.component'; + +/** + * Component representing the {@link UserMenuComponent} of a page + */ +@Component({ + selector: 'ds-user-menu', + // templateUrl: 'user-menu.component.html', + templateUrl: '../../../../../../app/shared/auth-nav-menu/user-menu/user-menu.component.html', + // styleUrls: ['user-menu.component.scss'], + styleUrls: ['../../../../../../app/shared/auth-nav-menu/user-menu/user-menu.component.scss'], +}) +export class UserMenuComponent extends BaseComponent { +} diff --git a/src/themes/custom/lazy-theme.module.ts b/src/themes/custom/lazy-theme.module.ts index edb3f5478c9..937e174b7f8 100644 --- a/src/themes/custom/lazy-theme.module.ts +++ b/src/themes/custom/lazy-theme.module.ts @@ -156,6 +156,7 @@ import { ItemStatusComponent } from './app/item-page/edit-item-page/item-status/ import { EditBitstreamPageComponent } from './app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component'; import { FormModule } from '../../app/shared/form/form.module'; import { RequestCopyModule } from 'src/app/request-copy/request-copy.module'; +import {UserMenuComponent} from './app/shared/auth-nav-menu/user-menu/user-menu.component'; const DECLARATIONS = [ FileSectionComponent, @@ -239,6 +240,7 @@ const DECLARATIONS = [ SubmissionSectionUploadFileComponent, ItemStatusComponent, EditBitstreamPageComponent, + UserMenuComponent, ]; @NgModule({ From cac1407f08290adbc1a827fb1769011d3ecba803 Mon Sep 17 00:00:00 2001 From: Kristof De Langhe Date: Wed, 12 Jul 2023 15:11:38 +0200 Subject: [PATCH 012/186] 104189: Allow CSV export on related entity search --- .../related-entities-search.component.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/item-page/simple/related-entities/related-entities-search/related-entities-search.component.html b/src/app/item-page/simple/related-entities/related-entities-search/related-entities-search.component.html index 2a08efeb2ca..36340bebfa0 100644 --- a/src/app/item-page/simple/related-entities/related-entities-search/related-entities-search.component.html +++ b/src/app/item-page/simple/related-entities/related-entities-search/related-entities-search.component.html @@ -2,5 +2,6 @@ [fixedFilterQuery]="fixedFilter" [configuration]="configuration" [searchEnabled]="searchEnabled" - [sideBarWidth]="sideBarWidth"> + [sideBarWidth]="sideBarWidth" + [showCsvExport]="true"> From 45ad5f73168ccdf3d4f7ab617d44a0e28c94545a Mon Sep 17 00:00:00 2001 From: Kristof De Langhe Date: Wed, 12 Jul 2023 16:32:56 +0200 Subject: [PATCH 013/186] 104189: CSV export add fixedFilter --- .../search-export-csv.component.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/app/shared/search/search-export-csv/search-export-csv.component.ts b/src/app/shared/search/search-export-csv/search-export-csv.component.ts index 6ad105342f6..1997a663a13 100644 --- a/src/app/shared/search/search-export-csv/search-export-csv.component.ts +++ b/src/app/shared/search/search-export-csv/search-export-csv.component.ts @@ -94,6 +94,19 @@ export class SearchExportCsvComponent implements OnInit { } }); } + if (isNotEmpty(this.searchConfig.fixedFilter)) { + const fixedFilter = this.searchConfig.fixedFilter.substring(2); + const keyAndValue = fixedFilter.split('='); + if (keyAndValue.length > 1) { + const key = keyAndValue[0]; + const valueAndOperator = keyAndValue[1].split(','); + if (valueAndOperator.length > 1) { + const value = valueAndOperator[0]; + const operator = valueAndOperator[1]; + parameters.push({name: '-f', value: `${key},${operator}=${value}`}); + } + } + } } this.scriptDataService.invoke('metadata-export-search', parameters, []).pipe( From 03e1f677b610498b6dbb54b1f3e6310bef5a1407 Mon Sep 17 00:00:00 2001 From: Kristof De Langhe Date: Mon, 17 Jul 2023 15:08:54 +0200 Subject: [PATCH 014/186] 104126: ProcessDetailComponent test improvement --- .../detail/process-detail.component.spec.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/app/process-page/detail/process-detail.component.spec.ts b/src/app/process-page/detail/process-detail.component.spec.ts index 9552f9a092a..9a0d89a8827 100644 --- a/src/app/process-page/detail/process-detail.component.spec.ts +++ b/src/app/process-page/detail/process-detail.component.spec.ts @@ -147,7 +147,7 @@ describe('ProcessDetailComponent', () => { providers: [ { provide: ActivatedRoute, - useValue: { data: observableOf({ process: createSuccessfulRemoteDataObject(process) }) } + useValue: { data: observableOf({ process: createSuccessfulRemoteDataObject(process) }), snapshot: { params: { id: 1 } } }, }, { provide: ProcessDataService, useValue: processService }, { provide: BitstreamDataService, useValue: bitstreamDataService }, @@ -310,10 +310,11 @@ describe('ProcessDetailComponent', () => { }); it('should call refresh method every 5 seconds, until process is completed', fakeAsync(() => { - spyOn(component, 'refresh'); - spyOn(component, 'stopRefreshTimer'); + spyOn(component, 'refresh').and.callThrough(); + spyOn(component, 'stopRefreshTimer').and.callThrough(); - process.processStatus = ProcessStatus.COMPLETED; + // start off with a running process in order for the refresh counter starts counting up + process.processStatus = ProcessStatus.RUNNING; // set findbyId to return a completed process (processService.findById as jasmine.Spy).and.returnValue(observableOf(createSuccessfulRemoteDataObject(process))); @@ -336,6 +337,10 @@ describe('ProcessDetailComponent', () => { tick(1001); // 1 second + 1 ms by the setTimeout expect(component.refreshCounter$.value).toBe(0); // 1 - 1 + // set the process to completed right before the counter checks the process + process.processStatus = ProcessStatus.COMPLETED; + (processService.findById as jasmine.Spy).and.returnValue(observableOf(createSuccessfulRemoteDataObject(process))); + tick(1000); // 1 second expect(component.refresh).toHaveBeenCalledTimes(1); From 648925f3e1c0a51fc3eb61b7257e7a44ea57fee6 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Wed, 19 Jul 2023 14:01:41 +0200 Subject: [PATCH 015/186] 104312: DsDynamicLookupRelationExternalSourceTabComponent should have the form value already filled in the search input --- .../dynamic-lookup-relation-modal.component.html | 1 + ...ookup-relation-external-source-tab.component.ts | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.html b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.html index f95cd98c656..4c635b931f0 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.html +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.html @@ -42,6 +42,7 @@ diff --git a/src/app/shared/sidebar/sidebar-dropdown.component.html b/src/app/shared/sidebar/sidebar-dropdown.component.html index 0c2a1c05d25..2eadac09f75 100644 --- a/src/app/shared/sidebar/sidebar-dropdown.component.html +++ b/src/app/shared/sidebar/sidebar-dropdown.component.html @@ -1,5 +1,5 @@
-
+

diff --git a/src/themes/dspace/styles/_global-styles.scss b/src/themes/dspace/styles/_global-styles.scss index e41dae0e3f2..5bd4c19bc04 100644 --- a/src/themes/dspace/styles/_global-styles.scss +++ b/src/themes/dspace/styles/_global-styles.scss @@ -17,7 +17,7 @@ background-color: var(--bs-primary); } - h5 { + h4 { font-size: 1.1rem } } From a6c1120700398fb0cf99ffd6e1a7ff52e5858a40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Carvalho?= Date: Wed, 30 Aug 2023 15:52:34 +0100 Subject: [PATCH 083/186] Minor pt-PT translation fixes --- src/assets/i18n/pt-PT.json5 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/assets/i18n/pt-PT.json5 b/src/assets/i18n/pt-PT.json5 index 5aa4817e881..faa027705e0 100644 --- a/src/assets/i18n/pt-PT.json5 +++ b/src/assets/i18n/pt-PT.json5 @@ -2259,7 +2259,7 @@ "confirmation-modal.delete-eperson.header": "Apagar Utilizador \"{{ dsoName }}\"", // "confirmation-modal.delete-eperson.info": "Are you sure you want to delete EPerson \"{{ dsoName }}\"", - "confirmation-modal.delete-eperson.info": "Pretende apagar o utilizar \"{{ dsoName }}\"", + "confirmation-modal.delete-eperson.info": "Pretende apagar o utilizador \"{{ dsoName }}\"", // "confirmation-modal.delete-eperson.cancel": "Cancel", "confirmation-modal.delete-eperson.cancel": "Cancelar", @@ -2666,7 +2666,7 @@ "health-page.property.status": "Código Estado", // "health-page.section.db.title": "Database", - "health-page.section.db.title": "Base Dados", + "health-page.section.db.title": "Base de Dados", // "health-page.section.geoIp.title": "GeoIp", "health-page.section.geoIp.title": "GeoIp", From 18febff7a6c8e92d3d30016e6a4d93f7fe521dd0 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Fri, 1 Sep 2023 21:09:40 +0200 Subject: [PATCH 084/186] Fix routes not working with baseHref --- .../item-edit-bitstream/item-edit-bitstream.component.html | 2 +- .../item-edit-bitstream.component.spec.ts | 6 +++++- src/app/shared/cookies/klaro-configuration.ts | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.html b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.html index 0f0fad21993..a3e29ac10c2 100644 --- a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.html +++ b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.html @@ -25,7 +25,7 @@
- diff --git a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.spec.ts b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.spec.ts index aafa5a4fe45..f3c897aa738 100644 --- a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.spec.ts @@ -13,6 +13,7 @@ import { createSuccessfulRemoteDataObject$ } from '../../../../shared/remote-dat import { getBitstreamDownloadRoute } from '../../../../app-routing-paths'; import { By } from '@angular/platform-browser'; import { BrowserOnlyMockPipe } from '../../../../shared/testing/browser-only-mock.pipe'; +import { RouterTestingModule } from '@angular/router/testing'; let comp: ItemEditBitstreamComponent; let fixture: ComponentFixture; @@ -72,7 +73,10 @@ describe('ItemEditBitstreamComponent', () => { ); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], + imports: [ + RouterTestingModule.withRoutes([]), + TranslateModule.forRoot(), + ], declarations: [ ItemEditBitstreamComponent, VarDirective, diff --git a/src/app/shared/cookies/klaro-configuration.ts b/src/app/shared/cookies/klaro-configuration.ts index a41b641dec1..c818ddc19cb 100644 --- a/src/app/shared/cookies/klaro-configuration.ts +++ b/src/app/shared/cookies/klaro-configuration.ts @@ -22,7 +22,7 @@ export const GOOGLE_ANALYTICS_KLARO_KEY = 'google-analytics'; export const klaroConfiguration: any = { storageName: ANONYMOUS_STORAGE_NAME_KLARO, - privacyPolicy: '/info/privacy', + privacyPolicy: './info/privacy', /* Setting 'hideLearnMore' to 'true' will hide the "learn more / customize" link in From 3e5524de69fa09808e3a7d0ab4042e5e3ffc98e0 Mon Sep 17 00:00:00 2001 From: Hugo Dominguez Date: Fri, 8 Sep 2023 11:31:26 -0600 Subject: [PATCH 085/186] =?UTF-8?q?=F0=9F=8E=A8=20revert=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../metadata-schema-form.component.ts | 119 ++++++++---------- 1 file changed, 55 insertions(+), 64 deletions(-) diff --git a/src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts b/src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts index 61766a4a109..24bf4306619 100644 --- a/src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts +++ b/src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts @@ -1,10 +1,4 @@ -import { - Component, - EventEmitter, - OnDestroy, - OnInit, - Output, -} from '@angular/core'; +import { Component, EventEmitter, OnDestroy, OnInit, Output } from '@angular/core'; import { DynamicFormControlModel, DynamicFormGroupModel, @@ -21,12 +15,13 @@ import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model' @Component({ selector: 'ds-metadata-schema-form', - templateUrl: './metadata-schema-form.component.html', + templateUrl: './metadata-schema-form.component.html' }) /** * A form used for creating and editing metadata schemas */ export class MetadataSchemaFormComponent implements OnInit, OnDestroy { + /** * A unique id used for ds-form */ @@ -58,14 +53,14 @@ export class MetadataSchemaFormComponent implements OnInit, OnDestroy { formLayout: DynamicFormLayout = { name: { grid: { - host: 'col col-sm-6 d-inline-block', - }, + host: 'col col-sm-6 d-inline-block' + } }, namespace: { grid: { - host: 'col col-sm-6 d-inline-block', - }, - }, + host: 'col col-sm-6 d-inline-block' + } + } }; /** @@ -78,67 +73,63 @@ export class MetadataSchemaFormComponent implements OnInit, OnDestroy { */ @Output() submitForm: EventEmitter = new EventEmitter(); - constructor( - public registryService: RegistryService, - private formBuilderService: FormBuilderService, - private translateService: TranslateService - ) {} + constructor(public registryService: RegistryService, private formBuilderService: FormBuilderService, private translateService: TranslateService) { + } ngOnInit() { combineLatest([ this.translateService.get(`${this.messagePrefix}.name`), - this.translateService.get(`${this.messagePrefix}.namespace`), + this.translateService.get(`${this.messagePrefix}.namespace`) ]).subscribe(([name, namespace]) => { this.name = new DynamicInputModel({ - id: 'name', - label: name, - name: 'name', - validators: { - required: null, - pattern: '^[^. ,]*$', - maxLength: 32, - }, - required: true, - errorMessages: { - pattern: 'error.validation.metadata.name.invalid-pattern', - maxLength: 'error.validation.metadata.name.max-length', - }, - }); + id: 'name', + label: name, + name: 'name', + validators: { + required: null, + pattern: '^[^. ,]*$', + maxLength: 32, + }, + required: true, + errorMessages: { + pattern: 'error.validation.metadata.name.invalid-pattern', + maxLength: 'error.validation.metadata.name.max-length', + }, + }); this.namespace = new DynamicInputModel({ - id: 'namespace', - label: namespace, - name: 'namespace', - validators: { - required: null, - maxLength: 256, - }, - required: true, - errorMessages: { - maxLength: 'error.validation.metadata.namespace.max-length', - }, - }); + id: 'namespace', + label: namespace, + name: 'namespace', + validators: { + required: null, + maxLength: 256, + }, + required: true, + errorMessages: { + maxLength: 'error.validation.metadata.namespace.max-length', + }, + }); this.formModel = [ - new DynamicFormGroupModel({ - id: 'metadatadataschemagroup', - group: [this.namespace, this.name], - }), + new DynamicFormGroupModel( + { + id: 'metadatadataschemagroup', + group:[this.namespace, this.name] + }) ]; this.formGroup = this.formBuilderService.createFormGroup(this.formModel); - this.registryService - .getActiveMetadataSchema() - .subscribe((schema: MetadataSchema) => { - if (schema == null) { - this.clearFields(); - } else { - this.formGroup.patchValue({ - metadatadataschemagroup: { - name: schema.prefix, - namespace: schema.namespace, - }, - }); - this.name.disabled = true; - } - }); + this.registryService.getActiveMetadataSchema().subscribe((schema: MetadataSchema) => { + if (schema == null) { + this.clearFields(); + } else { + this.formGroup.patchValue({ + metadatadataschemagroup: { + name: schema.prefix, + namespace: schema.namespace, + }, + }); + this.name.disabled = true; + } + }); }); } From 13e4052c4da07014a1c01087bfc6d293a8bb71c5 Mon Sep 17 00:00:00 2001 From: Hugo Dominguez Date: Fri, 8 Sep 2023 11:51:42 -0600 Subject: [PATCH 086/186] =?UTF-8?q?=F0=9F=8E=A8revert=20unnecessary=20form?= =?UTF-8?q?at?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workspaceitem-section-upload-file.model.ts | 4 ++-- .../file/view/section-upload-file-view.component.ts | 12 +++++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/app/core/submission/models/workspaceitem-section-upload-file.model.ts b/src/app/core/submission/models/workspaceitem-section-upload-file.model.ts index 59a8faf6342..785d7c402fa 100644 --- a/src/app/core/submission/models/workspaceitem-section-upload-file.model.ts +++ b/src/app/core/submission/models/workspaceitem-section-upload-file.model.ts @@ -1,5 +1,5 @@ -import {SubmissionUploadFileAccessConditionObject} from './submission-upload-file-access-condition.model'; -import {WorkspaceitemSectionFormObject} from './workspaceitem-section-form.model'; +import { SubmissionUploadFileAccessConditionObject } from './submission-upload-file-access-condition.model'; +import { WorkspaceitemSectionFormObject } from './workspaceitem-section-form.model'; /** * An interface to represent submission's upload section file entry. diff --git a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts index b0ea2487e10..b15b0ab3211 100644 --- a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts +++ b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts @@ -1,11 +1,9 @@ -import {Component, Input, OnInit} from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; -import { - WorkspaceitemSectionUploadFileObject -} from '../../../../../core/submission/models/workspaceitem-section-upload-file.model'; -import {isNotEmpty} from '../../../../../shared/empty.util'; -import {Metadata} from '../../../../../core/shared/metadata.utils'; -import {MetadataMap, MetadataValue} from '../../../../../core/shared/metadata.models'; +import { WorkspaceitemSectionUploadFileObject } from '../../../../../core/submission/models/workspaceitem-section-upload-file.model'; +import { isNotEmpty } from '../../../../../shared/empty.util'; +import { Metadata } from '../../../../../core/shared/metadata.utils'; +import { MetadataMap, MetadataValue } from '../../../../../core/shared/metadata.models'; /** * This component allow to show bitstream's metadata From 01c8a4d9c3347cb5b30d4d912a3f7e18b81f989a Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Fri, 8 Sep 2023 14:28:23 -0500 Subject: [PATCH 087/186] Update workspaceitem-section-upload-file.model.ts Fix code comment --- .../models/workspaceitem-section-upload-file.model.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/core/submission/models/workspaceitem-section-upload-file.model.ts b/src/app/core/submission/models/workspaceitem-section-upload-file.model.ts index 785d7c402fa..725e646d761 100644 --- a/src/app/core/submission/models/workspaceitem-section-upload-file.model.ts +++ b/src/app/core/submission/models/workspaceitem-section-upload-file.model.ts @@ -30,7 +30,7 @@ export class WorkspaceitemSectionUploadFileObject { }; /** - * The file check sum + * The file format information */ format: { shortDescription: string, From 0905a53db5eca45220809831663ba8d6761e55c5 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Fri, 8 Sep 2023 22:35:27 +0200 Subject: [PATCH 088/186] Fix innerText still being undefined in ssr mode --- src/app/shared/log-in/log-in.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/shared/log-in/log-in.component.html b/src/app/shared/log-in/log-in.component.html index 05d8d4370f0..857b977360e 100644 --- a/src/app/shared/log-in/log-in.component.html +++ b/src/app/shared/log-in/log-in.component.html @@ -1,7 +1,7 @@ diff --git a/src/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts b/src/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts index 5bc69bcbb4e..d32fa46a327 100644 --- a/src/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts +++ b/src/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts @@ -4,7 +4,6 @@ import { MenuService } from '../../shared/menu/menu.service'; import { slide } from '../../shared/animations/slide'; import { first } from 'rxjs/operators'; import { HostWindowService } from '../../shared/host-window.service'; -import { rendersSectionForMenu } from '../../shared/menu/menu-section.decorator'; import { MenuID } from '../../shared/menu/menu-id.model'; /** @@ -16,7 +15,6 @@ import { MenuID } from '../../shared/menu/menu-id.model'; styleUrls: ['./expandable-navbar-section.component.scss'], animations: [slide] }) -@rendersSectionForMenu(MenuID.PUBLIC, true) export class ExpandableNavbarSectionComponent extends NavbarSectionComponent implements OnInit { /** * This section resides in the Public Navbar diff --git a/src/app/navbar/expandable-navbar-section/themed-expandable-navbar-section.component.ts b/src/app/navbar/expandable-navbar-section/themed-expandable-navbar-section.component.ts index e33dca41049..8f474e99490 100644 --- a/src/app/navbar/expandable-navbar-section/themed-expandable-navbar-section.component.ts +++ b/src/app/navbar/expandable-navbar-section/themed-expandable-navbar-section.component.ts @@ -8,8 +8,7 @@ import { MenuID } from '../../shared/menu/menu-id.model'; * Themed wrapper for ExpandableNavbarSectionComponent */ @Component({ - /* eslint-disable @angular-eslint/component-selector */ - selector: 'li[ds-themed-expandable-navbar-section]', + selector: 'ds-themed-expandable-navbar-section', styleUrls: [], templateUrl: '../../shared/theme-support/themed.component.html', }) diff --git a/src/app/navbar/navbar-section/navbar-section.component.ts b/src/app/navbar/navbar-section/navbar-section.component.ts index 9f75a96f6e7..9b86aa10f2b 100644 --- a/src/app/navbar/navbar-section/navbar-section.component.ts +++ b/src/app/navbar/navbar-section/navbar-section.component.ts @@ -8,8 +8,7 @@ import { MenuID } from '../../shared/menu/menu-id.model'; * Represents a non-expandable section in the navbar */ @Component({ - /* eslint-disable @angular-eslint/component-selector */ - selector: 'li[ds-navbar-section]', + selector: 'ds-navbar-section', templateUrl: './navbar-section.component.html', styleUrls: ['./navbar-section.component.scss'] }) diff --git a/src/app/navbar/navbar.component.html b/src/app/navbar/navbar.component.html index bc1e04f5130..edfc4bb8ee0 100644 --- a/src/app/navbar/navbar.component.html +++ b/src/app/navbar/navbar.component.html @@ -8,9 +8,9 @@
  • - +
  • - +
  • diff --git a/src/app/shared/dso-page/dso-edit-menu/dso-edit-expandable-menu-section/dso-edit-menu-expandable-section.component.ts b/src/app/shared/dso-page/dso-edit-menu/dso-edit-expandable-menu-section/dso-edit-menu-expandable-section.component.ts index 8e4a7008afe..1925099418a 100644 --- a/src/app/shared/dso-page/dso-edit-menu/dso-edit-expandable-menu-section/dso-edit-menu-expandable-section.component.ts +++ b/src/app/shared/dso-page/dso-edit-menu/dso-edit-expandable-menu-section/dso-edit-menu-expandable-section.component.ts @@ -13,7 +13,6 @@ import { hasValue } from '../../../empty.util'; * Represents an expandable section in the dso edit menus */ @Component({ - /* tslint:disable:component-selector */ selector: 'ds-dso-edit-menu-expandable-section', templateUrl: './dso-edit-menu-expandable-section.component.html', styleUrls: ['./dso-edit-menu-expandable-section.component.scss'], diff --git a/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.ts b/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.ts index af3381ef716..060049ef5fc 100644 --- a/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.ts +++ b/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.ts @@ -10,7 +10,6 @@ import { MenuSection } from '../../../menu/menu-section.model'; * Represents a non-expandable section in the dso edit menus */ @Component({ - /* tslint:disable:component-selector */ selector: 'ds-dso-edit-menu-section', templateUrl: './dso-edit-menu-section.component.html', styleUrls: ['./dso-edit-menu-section.component.scss'] diff --git a/src/themes/dspace/app/navbar/navbar.component.html b/src/themes/dspace/app/navbar/navbar.component.html index d9631aad182..c14671cf683 100644 --- a/src/themes/dspace/app/navbar/navbar.component.html +++ b/src/themes/dspace/app/navbar/navbar.component.html @@ -10,9 +10,9 @@
  • - +
  • - +