From 2340164394915bad302194bb0eff1e0305d1fc49 Mon Sep 17 00:00:00 2001 From: Kristof De Langhe Date: Fri, 27 May 2022 17:21:21 +0200 Subject: [PATCH 01/45] 91874: Themed DsDynamicLookupRelationSearchTabComponent and MetadataRepresentationListComponent --- .../item-pages/project/project.component.html | 4 +- .../publication/publication.component.html | 4 +- .../untyped-item/untyped-item.component.html | 4 +- ...-metadata-representation-list.component.ts | 35 +++++++++ ...ic-lookup-relation-search-tab.component.ts | 71 +++++++++++++++++++ src/app/shared/form/form.module.ts | 2 + src/app/shared/shared.module.ts | 2 + ...etadata-representation-list.component.html | 0 .../metadata-representation-list.component.ts | 11 +++ ...-lookup-relation-search-tab.component.html | 0 ...-lookup-relation-search-tab.component.scss | 0 ...ic-lookup-relation-search-tab.component.ts | 21 ++++++ src/themes/custom/theme.module.ts | 6 +- 13 files changed, 153 insertions(+), 7 deletions(-) create mode 100644 src/app/item-page/simple/metadata-representation-list/themed-metadata-representation-list.component.ts create mode 100644 src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/themed-dynamic-lookup-relation-search-tab.component.ts create mode 100644 src/themes/custom/app/item-page/simple/metadata-representation-list/metadata-representation-list.component.html create mode 100644 src/themes/custom/app/item-page/simple/metadata-representation-list/metadata-representation-list.component.ts create mode 100644 src/themes/custom/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.html create mode 100644 src/themes/custom/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.scss create mode 100644 src/themes/custom/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.ts diff --git a/src/app/entity-groups/research-entities/item-pages/project/project.component.html b/src/app/entity-groups/research-entities/item-pages/project/project.component.html index 8f2ff6adcd..515a278a85 100644 --- a/src/app/entity-groups/research-entities/item-pages/project/project.component.html +++ b/src/app/entity-groups/research-entities/item-pages/project/project.component.html @@ -20,12 +20,12 @@ - - + diff --git a/src/app/item-page/simple/item-types/publication/publication.component.html b/src/app/item-page/simple/item-types/publication/publication.component.html index bace9fcd0a..4cf0c1f185 100644 --- a/src/app/item-page/simple/item-types/publication/publication.component.html +++ b/src/app/item-page/simple/item-types/publication/publication.component.html @@ -27,12 +27,12 @@ - - + diff --git a/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.html b/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.html index 04794717f1..160f716309 100644 --- a/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.html +++ b/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.html @@ -30,12 +30,12 @@ - - + diff --git a/src/app/item-page/simple/metadata-representation-list/themed-metadata-representation-list.component.ts b/src/app/item-page/simple/metadata-representation-list/themed-metadata-representation-list.component.ts new file mode 100644 index 0000000000..e7a526bb05 --- /dev/null +++ b/src/app/item-page/simple/metadata-representation-list/themed-metadata-representation-list.component.ts @@ -0,0 +1,35 @@ +import { ThemedComponent } from '../../../shared/theme-support/themed.component'; +import { MetadataRepresentationListComponent } from './metadata-representation-list.component'; +import { Component, Input } from '@angular/core'; +import { Item } from '../../../core/shared/item.model'; + +@Component({ + selector: 'ds-themed-metadata-representation-list', + styleUrls: [], + templateUrl: '../../../shared/theme-support/themed.component.html', +}) +export class ThemedMetadataRepresentationListComponent extends ThemedComponent { + protected inAndOutputNames: (keyof MetadataRepresentationListComponent & keyof this)[] = ['parentItem', 'itemType', 'metadataFields', 'label', 'incrementBy']; + + @Input() parentItem: Item; + + @Input() itemType: string; + + @Input() metadataFields: string[]; + + @Input() label: string; + + @Input() incrementBy = 10; + + protected getComponentName(): string { + return 'MetadataRepresentationListComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../../themes/${themeName}/app/item-page/simple/metadata-representation-list/metadata-representation-list.component`); + } + + protected importUnthemedComponent(): Promise { + return import(`./metadata-representation-list.component`); + } +} diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/themed-dynamic-lookup-relation-search-tab.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/themed-dynamic-lookup-relation-search-tab.component.ts new file mode 100644 index 0000000000..da998ed5a6 --- /dev/null +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/themed-dynamic-lookup-relation-search-tab.component.ts @@ -0,0 +1,71 @@ +import { ThemedComponent } from '../../../../../theme-support/themed.component'; +import { DsDynamicLookupRelationSearchTabComponent } from './dynamic-lookup-relation-search-tab.component'; +import { Component, EventEmitter, Input, Output } from '@angular/core'; +import { RelationshipOptions } from '../../../models/relationship-options.model'; +import { Observable } from 'rxjs'; +import { ListableObject } from '../../../../../object-collection/shared/listable-object.model'; +import { Context } from '../../../../../../core/shared/context.model'; +import { RelationshipType } from '../../../../../../core/shared/item-relationships/relationship-type.model'; +import { Item } from '../../../../../../core/shared/item.model'; +import { SearchResult } from '../../../../../search/models/search-result.model'; +import { SearchObjects } from '../../../../../search/models/search-objects.model'; +import { DSpaceObject } from '../../../../../../core/shared/dspace-object.model'; +import { SEARCH_CONFIG_SERVICE } from '../../../../../../my-dspace-page/my-dspace-page.component'; +import { SearchConfigurationService } from '../../../../../../core/shared/search/search-configuration.service'; + +@Component({ + selector: 'ds-themed-dynamic-lookup-relation-search-tab', + styleUrls: [], + templateUrl: '../../../../../theme-support/themed.component.html', + providers: [ + { + provide: SEARCH_CONFIG_SERVICE, + useClass: SearchConfigurationService + } + ] +}) +export class ThemedDynamicLookupRelationSearchTabComponent extends ThemedComponent { + protected inAndOutputNames: (keyof DsDynamicLookupRelationSearchTabComponent & keyof this)[] = ['relationship', 'listId', + 'query', 'repeatable', 'selection$', 'context', 'relationshipType', 'item', 'isLeft', 'toRemove', 'isEditRelationship', + 'deselectObject', 'selectObject', 'resultFound']; + + @Input() relationship: RelationshipOptions; + + @Input() listId: string; + + @Input() query: string; + + @Input() repeatable: boolean; + + @Input() selection$: Observable; + + @Input() context: Context; + + @Input() relationshipType: RelationshipType; + + @Input() item: Item; + + @Input() isLeft: boolean; + + @Input() toRemove: SearchResult[]; + + @Input() isEditRelationship: boolean; + + @Output() deselectObject: EventEmitter = new EventEmitter(); + + @Output() selectObject: EventEmitter = new EventEmitter(); + + @Output() resultFound: EventEmitter> = new EventEmitter>(); + + protected getComponentName(): string { + return 'DsDynamicLookupRelationSearchTabComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../../../../../themes/${themeName}/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component`); + } + + protected importUnthemedComponent(): Promise { + return import(`./dynamic-lookup-relation-search-tab.component`); + } +} diff --git a/src/app/shared/form/form.module.ts b/src/app/shared/form/form.module.ts index 62ab5bd647..ae85022719 100644 --- a/src/app/shared/form/form.module.ts +++ b/src/app/shared/form/form.module.ts @@ -30,6 +30,7 @@ import { ExistingRelationListElementComponent } from './builder/ds-dynamic-form- import { ExternalSourceEntryImportModalComponent } from './builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component'; import { CustomSwitchComponent } from './builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.component'; import { DynamicFormsNGBootstrapUIModule } from '@ng-dynamic-forms/ui-ng-bootstrap'; +import { ThemedDynamicLookupRelationSearchTabComponent } from './builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/themed-dynamic-lookup-relation-search-tab.component'; const COMPONENTS = [ CustomSwitchComponent, @@ -38,6 +39,7 @@ const COMPONENTS = [ DsDynamicListComponent, DsDynamicLookupComponent, DsDynamicLookupRelationSearchTabComponent, + ThemedDynamicLookupRelationSearchTabComponent, DsDynamicLookupRelationSelectionTabComponent, DsDynamicLookupRelationExternalSourceTabComponent, DsDynamicDisabledComponent, diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 715ee66a99..b6e153db91 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -177,6 +177,7 @@ import { ScopeSelectorModalComponent } from './search-form/scope-selector-modal/ import { BitstreamRequestACopyPageComponent } from './bitstream-request-a-copy-page/bitstream-request-a-copy-page.component'; import { DsSelectComponent } from './ds-select/ds-select.component'; import { LogInOidcComponent } from './log-in/methods/oidc/log-in-oidc.component'; +import { ThemedMetadataRepresentationListComponent } from '../item-page/simple/metadata-representation-list/themed-metadata-representation-list.component'; const MODULES = [ // Do NOT include UniversalModule, HttpModule, or JsonpModule here @@ -412,6 +413,7 @@ const SHARED_ITEM_PAGE_COMPONENTS = [ ItemAlertsComponent, GenericItemPageFieldComponent, MetadataRepresentationListComponent, + ThemedMetadataRepresentationListComponent, RelatedItemsComponent, ]; diff --git a/src/themes/custom/app/item-page/simple/metadata-representation-list/metadata-representation-list.component.html b/src/themes/custom/app/item-page/simple/metadata-representation-list/metadata-representation-list.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/item-page/simple/metadata-representation-list/metadata-representation-list.component.ts b/src/themes/custom/app/item-page/simple/metadata-representation-list/metadata-representation-list.component.ts new file mode 100644 index 0000000000..8a6036a23b --- /dev/null +++ b/src/themes/custom/app/item-page/simple/metadata-representation-list/metadata-representation-list.component.ts @@ -0,0 +1,11 @@ +import { MetadataRepresentationListComponent as BaseComponent } from '../../../../../../app/item-page/simple/metadata-representation-list/metadata-representation-list.component'; +import { Component } from '@angular/core'; + +@Component({ + selector: 'ds-metadata-representation-list', + // templateUrl: './metadata-representation-list.component.html' + templateUrl: '../../../../../../app/item-page/simple/metadata-representation-list/metadata-representation-list.component.html' +}) +export class MetadataRepresentationListComponent extends BaseComponent { + +} diff --git a/src/themes/custom/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.html b/src/themes/custom/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.scss b/src/themes/custom/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.ts b/src/themes/custom/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.ts new file mode 100644 index 0000000000..2380cc67e8 --- /dev/null +++ b/src/themes/custom/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.ts @@ -0,0 +1,21 @@ +import { DsDynamicLookupRelationSearchTabComponent as BaseComponent } from '../../../../../../../../../app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component'; +import { Component } from '@angular/core'; +import { SEARCH_CONFIG_SERVICE } from '../../../../../../../../../app/my-dspace-page/my-dspace-page.component'; +import { SearchConfigurationService } from '../../../../../../../../../app/core/shared/search/search-configuration.service'; + +@Component({ + selector: 'ds-dynamic-lookup-relation-search-tab', + // styleUrls: ['./dynamic-lookup-relation-search-tab.component.scss'], + styleUrls: ['../../../../../../../../../app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.scss'], + // templateUrl: './dynamic-lookup-relation-search-tab.component.html', + templateUrl: '../../../../../../../../../app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.html', + providers: [ + { + provide: SEARCH_CONFIG_SERVICE, + useClass: SearchConfigurationService + } + ] +}) +export class DsDynamicLookupRelationSearchTabComponent extends BaseComponent { + +} diff --git a/src/themes/custom/theme.module.ts b/src/themes/custom/theme.module.ts index e2e97b9087..94250b416f 100644 --- a/src/themes/custom/theme.module.ts +++ b/src/themes/custom/theme.module.ts @@ -84,6 +84,8 @@ import { SearchModule } from '../../app/shared/search/search.module'; import { ResourcePoliciesModule } from '../../app/shared/resource-policies/resource-policies.module'; import { ComcolModule } from '../../app/shared/comcol/comcol.module'; import { FeedbackComponent } from './app/info/feedback/feedback.component'; +import { MetadataRepresentationListComponent } from './app/item-page/simple/metadata-representation-list/metadata-representation-list.component'; +import { DsDynamicLookupRelationSearchTabComponent } from './app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component'; const DECLARATIONS = [ FileSectionComponent, @@ -126,7 +128,9 @@ const DECLARATIONS = [ NavbarComponent, HeaderNavbarWrapperComponent, BreadcrumbsComponent, - FeedbackComponent + FeedbackComponent, + MetadataRepresentationListComponent, + DsDynamicLookupRelationSearchTabComponent, ]; @NgModule({ From 7eaa50949df4273fa1b9fa55429a62f80b823fd4 Mon Sep 17 00:00:00 2001 From: Kristof De Langhe Date: Mon, 30 May 2022 14:53:43 +0200 Subject: [PATCH 02/45] 90761: Themed DsDynamicLookupRelationExternalSourceTabComponent --- ...-relation-external-source-tab.component.ts | 62 +++++++++++++++++++ src/app/shared/form/form.module.ts | 2 + ...elation-external-source-tab.component.html | 0 ...elation-external-source-tab.component.scss | 0 ...-relation-external-source-tab.component.ts | 26 ++++++++ src/themes/custom/theme.module.ts | 2 + 6 files changed, 92 insertions(+) create mode 100644 src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/themed-dynamic-lookup-relation-external-source-tab.component.ts create mode 100644 src/themes/custom/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component.html create mode 100644 src/themes/custom/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component.scss create mode 100644 src/themes/custom/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component.ts diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/themed-dynamic-lookup-relation-external-source-tab.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/themed-dynamic-lookup-relation-external-source-tab.component.ts new file mode 100644 index 0000000000..f3d8421365 --- /dev/null +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/themed-dynamic-lookup-relation-external-source-tab.component.ts @@ -0,0 +1,62 @@ +import { ThemedComponent } from '../../../../../theme-support/themed.component'; +import { Component, EventEmitter, Input, Output } from '@angular/core'; +import { RelationshipOptions } from '../../../models/relationship-options.model'; +import { ListableObject } from '../../../../../object-collection/shared/listable-object.model'; +import { Context } from '../../../../../../core/shared/context.model'; +import { Item } from '../../../../../../core/shared/item.model'; +import { SEARCH_CONFIG_SERVICE } from '../../../../../../my-dspace-page/my-dspace-page.component'; +import { SearchConfigurationService } from '../../../../../../core/shared/search/search-configuration.service'; +import { Collection } from '../../../../../../core/shared/collection.model'; +import { ExternalSource } from '../../../../../../core/shared/external-source.model'; +import { DsDynamicLookupRelationExternalSourceTabComponent } from './dynamic-lookup-relation-external-source-tab.component'; +import { fadeIn, fadeInOut } from '../../../../../animations/fade'; + +@Component({ + selector: 'ds-themed-dynamic-lookup-relation-external-source-tab', + styleUrls: [], + templateUrl: '../../../../../theme-support/themed.component.html', + providers: [ + { + provide: SEARCH_CONFIG_SERVICE, + useClass: SearchConfigurationService + } + ], + animations: [ + fadeIn, + fadeInOut + ] +}) +export class ThemedDynamicLookupRelationExternalSourceTabComponent extends ThemedComponent { + protected inAndOutputNames: (keyof DsDynamicLookupRelationExternalSourceTabComponent & keyof this)[] = ['label', 'listId', + 'item', 'collection', 'relationship', 'context', 'repeatable', 'importedObject', 'externalSource']; + + @Input() label: string; + + @Input() listId: string; + + @Input() item: Item; + + @Input() collection: Collection; + + @Input() relationship: RelationshipOptions; + + @Input() context: Context; + + @Input() repeatable: boolean; + + @Output() importedObject: EventEmitter = new EventEmitter(); + + @Input() externalSource: ExternalSource; + + protected getComponentName(): string { + return 'DsDynamicLookupRelationExternalSourceTabComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../../../../../themes/${themeName}/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component`); + } + + protected importUnthemedComponent(): Promise { + return import(`./dynamic-lookup-relation-external-source-tab.component`); + } +} diff --git a/src/app/shared/form/form.module.ts b/src/app/shared/form/form.module.ts index ae85022719..4e9eee7e3a 100644 --- a/src/app/shared/form/form.module.ts +++ b/src/app/shared/form/form.module.ts @@ -31,6 +31,7 @@ import { ExternalSourceEntryImportModalComponent } from './builder/ds-dynamic-fo import { CustomSwitchComponent } from './builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.component'; import { DynamicFormsNGBootstrapUIModule } from '@ng-dynamic-forms/ui-ng-bootstrap'; import { ThemedDynamicLookupRelationSearchTabComponent } from './builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/themed-dynamic-lookup-relation-search-tab.component'; +import { ThemedDynamicLookupRelationExternalSourceTabComponent } from './builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/themed-dynamic-lookup-relation-external-source-tab.component'; const COMPONENTS = [ CustomSwitchComponent, @@ -42,6 +43,7 @@ const COMPONENTS = [ ThemedDynamicLookupRelationSearchTabComponent, DsDynamicLookupRelationSelectionTabComponent, DsDynamicLookupRelationExternalSourceTabComponent, + ThemedDynamicLookupRelationExternalSourceTabComponent, DsDynamicDisabledComponent, DsDynamicLookupRelationModalComponent, DsDynamicScrollableDropdownComponent, diff --git a/src/themes/custom/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component.html b/src/themes/custom/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component.scss b/src/themes/custom/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component.ts b/src/themes/custom/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component.ts new file mode 100644 index 0000000000..569d007b4d --- /dev/null +++ b/src/themes/custom/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component.ts @@ -0,0 +1,26 @@ +import { DsDynamicLookupRelationExternalSourceTabComponent as BaseComponent } from '../../../../../../../../../app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component'; +import { Component } from '@angular/core'; +import { SEARCH_CONFIG_SERVICE } from '../../../../../../../../../app/my-dspace-page/my-dspace-page.component'; +import { SearchConfigurationService } from '../../../../../../../../../app/core/shared/search/search-configuration.service'; +import { fadeIn, fadeInOut } from '../../../../../../../../../app/shared/animations/fade'; + +@Component({ + selector: 'ds-dynamic-lookup-relation-external-source-tab', + // styleUrls: ['./dynamic-lookup-relation-external-source-tab.component.scss'], + styleUrls: ['../../../../../../../../../app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component.scss'], + // templateUrl: './dynamic-lookup-relation-external-source-tab.component.html', + templateUrl: '../../../../../../../../../app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component.html', + providers: [ + { + provide: SEARCH_CONFIG_SERVICE, + useClass: SearchConfigurationService + } + ], + animations: [ + fadeIn, + fadeInOut + ] +}) +export class DsDynamicLookupRelationExternalSourceTabComponent extends BaseComponent { + +} diff --git a/src/themes/custom/theme.module.ts b/src/themes/custom/theme.module.ts index 94250b416f..f37b0f820c 100644 --- a/src/themes/custom/theme.module.ts +++ b/src/themes/custom/theme.module.ts @@ -86,6 +86,7 @@ import { ComcolModule } from '../../app/shared/comcol/comcol.module'; import { FeedbackComponent } from './app/info/feedback/feedback.component'; import { MetadataRepresentationListComponent } from './app/item-page/simple/metadata-representation-list/metadata-representation-list.component'; import { DsDynamicLookupRelationSearchTabComponent } from './app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component'; +import { DsDynamicLookupRelationExternalSourceTabComponent } from './app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component'; const DECLARATIONS = [ FileSectionComponent, @@ -131,6 +132,7 @@ const DECLARATIONS = [ FeedbackComponent, MetadataRepresentationListComponent, DsDynamicLookupRelationSearchTabComponent, + DsDynamicLookupRelationExternalSourceTabComponent, ]; @NgModule({ From 86e084bf0520eaa9fb3705d76c55012884aa97d8 Mon Sep 17 00:00:00 2001 From: Kristof De Langhe Date: Mon, 30 May 2022 16:27:28 +0200 Subject: [PATCH 03/45] 90761: themed component calls --- .../dynamic-lookup-relation-modal.component.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 f95cd98c65..9a7aeee4d2 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 @@ -12,7 +12,7 @@
  • {{'submission.sections.describe.relationship-lookup.search-tab.tab-title.' + relationshipOptions.relationshipType | translate : { count: (totalInternal$ | async)} }} - - +
  • {{'submission.sections.describe.relationship-lookup.search-tab.tab-title.' + source.id | translate : { count: (totalExternal$ | async)[idx] } }} - - +
  • From e96954cf607ae4f1ef569b809a94c83e6ae402ee Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Thu, 1 Dec 2022 10:27:10 +0100 Subject: [PATCH 04/45] 94688: Added ThemedSearchFormComponent --- .../collection-item-mapper.component.html | 4 +- src/app/home-page/home-page.component.html | 2 +- .../item-collection-mapper.component.html | 4 +- ...elation-external-source-tab.component.html | 4 +- .../themed-search-form.component.ts | 50 +++++++++++++++++++ src/app/shared/search/search.component.html | 4 +- src/app/shared/shared.module.ts | 2 + 7 files changed, 61 insertions(+), 9 deletions(-) create mode 100644 src/app/shared/search-form/themed-search-form.component.ts diff --git a/src/app/collection-page/collection-item-mapper/collection-item-mapper.component.html b/src/app/collection-page/collection-item-mapper/collection-item-mapper.component.html index 042beddc84..a48c4d15bf 100644 --- a/src/app/collection-page/collection-item-mapper/collection-item-mapper.component.html +++ b/src/app/collection-page/collection-item-mapper/collection-item-mapper.component.html @@ -28,14 +28,14 @@
    - - +
    diff --git a/src/app/home-page/home-page.component.html b/src/app/home-page/home-page.component.html index 1000dbe9a4..87613b56d0 100644 --- a/src/app/home-page/home-page.component.html +++ b/src/app/home-page/home-page.component.html @@ -3,7 +3,7 @@ - + diff --git a/src/app/item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.html b/src/app/item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.html index c779c4aafa..507e35e630 100644 --- a/src/app/item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.html +++ b/src/app/item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.html @@ -27,13 +27,13 @@
    - - +
    diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component.html b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component.html index dac0e03444..cf8cb56577 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component.html +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component.html @@ -4,10 +4,10 @@
    - - +

    {{ 'submission.sections.describe.relationship-lookup.selection-tab.title.' + externalSource.id | translate}}

    diff --git a/src/app/shared/search-form/themed-search-form.component.ts b/src/app/shared/search-form/themed-search-form.component.ts new file mode 100644 index 0000000000..a8a511bd35 --- /dev/null +++ b/src/app/shared/search-form/themed-search-form.component.ts @@ -0,0 +1,50 @@ +import { Component, Input, Output, EventEmitter } from '@angular/core'; +import { ThemedComponent } from '../theme-support/themed.component'; +import { SearchFormComponent } from './search-form.component'; + +/** + * Themed wrapper for {@link SearchFormComponent} + */ +@Component({ + selector: 'ds-themed-search-form', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', +}) +export class ThemedSearchFormComponent extends ThemedComponent { + + @Input() query: string; + + @Input() inPlaceSearch; + + @Input() scope = ''; + + @Input() currentUrl: string; + + @Input() large = false; + + @Input() brandColor = 'primary'; + + @Input() searchPlaceholder: string; + + @Input() showScopeSelector = false; + + @Output() submitSearch = new EventEmitter(); + + protected inAndOutputNames: (keyof SearchFormComponent & keyof this)[] = [ + 'query', 'inPlaceSearch', 'scope', 'currentUrl', 'large', 'brandColor', 'searchPlaceholder', 'showScopeSelector', + 'submitSearch', + ]; + + protected getComponentName(): string { + return 'SearchFormComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../themes/${themeName}/app/shared/search-form/search-form.component`); + } + + protected importUnthemedComponent(): Promise { + return import('./search-form.component'); + } + +} diff --git a/src/app/shared/search/search.component.html b/src/app/shared/search/search.component.html index cdad62dcbd..4a601a6c4c 100644 --- a/src/app/shared/search/search.component.html +++ b/src/app/shared/search/search.component.html @@ -79,14 +79,14 @@ - - +
    diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 45e9764151..a259d15912 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -60,6 +60,7 @@ import { LoadingComponent } from './loading/loading.component'; import { PaginationComponent } from './pagination/pagination.component'; import { ThumbnailComponent } from '../thumbnail/thumbnail.component'; import { SearchFormComponent } from './search-form/search-form.component'; +import { ThemedSearchFormComponent } from './search-form/themed-search-form.component'; import { SearchResultGridElementComponent } from './object-grid/search-result-grid-element/search-result-grid-element.component'; @@ -396,6 +397,7 @@ const COMPONENTS = [ PaginationComponent, RSSComponent, SearchFormComponent, + ThemedSearchFormComponent, PageWithSidebarComponent, SidebarDropdownComponent, SidebarFilterComponent, From ba15b28c7cd65b4fd50819eecd220c88bb52d876 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Thu, 1 Dec 2022 10:28:15 +0100 Subject: [PATCH 05/45] 94688: Added themeable template of SearchFormComponent --- .../shared/search-form/search-form.component.html | 0 .../shared/search-form/search-form.component.scss | 0 .../shared/search-form/search-form.component.ts | 14 ++++++++++++++ src/themes/custom/lazy-theme.module.ts | 2 ++ 4 files changed, 16 insertions(+) create mode 100644 src/themes/custom/app/shared/search-form/search-form.component.html create mode 100644 src/themes/custom/app/shared/search-form/search-form.component.scss create mode 100644 src/themes/custom/app/shared/search-form/search-form.component.ts diff --git a/src/themes/custom/app/shared/search-form/search-form.component.html b/src/themes/custom/app/shared/search-form/search-form.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/shared/search-form/search-form.component.scss b/src/themes/custom/app/shared/search-form/search-form.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/shared/search-form/search-form.component.ts b/src/themes/custom/app/shared/search-form/search-form.component.ts new file mode 100644 index 0000000000..5721f8196c --- /dev/null +++ b/src/themes/custom/app/shared/search-form/search-form.component.ts @@ -0,0 +1,14 @@ +import { Component } from '@angular/core'; +import { + SearchFormComponent as BaseComponent, +} from '../../../../../app/shared/search-form/search-form.component'; + +@Component({ + selector: 'ds-search-form', + // styleUrls: ['./search-form.component.scss'], + styleUrls: ['../../../../../app/shared/search-form/search-form.component.scss'], + // templateUrl: './search-form.component.html', + templateUrl: '../../../../../app/shared/search-form/search-form.component.html', +}) +export class SearchFormComponent extends BaseComponent { +} diff --git a/src/themes/custom/lazy-theme.module.ts b/src/themes/custom/lazy-theme.module.ts index d2ac0ae787..6d1f9157b8 100644 --- a/src/themes/custom/lazy-theme.module.ts +++ b/src/themes/custom/lazy-theme.module.ts @@ -50,6 +50,7 @@ import { BrowseBySwitcherComponent } from './app/browse-by/browse-by-switcher/br import { CommunityListPageComponent } from './app/community-list-page/community-list-page.component'; import { SearchPageComponent } from './app/search-page/search-page.component'; import { ConfigurationSearchPageComponent } from './app/search-page/configuration-search-page.component'; +import { SearchFormComponent } from './app/shared/search-form/search-form.component'; import { EndUserAgreementComponent } from './app/info/end-user-agreement/end-user-agreement.component'; import { PageNotFoundComponent } from './app/pagenotfound/pagenotfound.component'; import { ObjectNotFoundComponent } from './app/lookup-by-id/objectnotfound/objectnotfound.component'; @@ -123,6 +124,7 @@ const DECLARATIONS = [ CommunityListPageComponent, SearchPageComponent, ConfigurationSearchPageComponent, + SearchFormComponent, EndUserAgreementComponent, PageNotFoundComponent, ObjectNotFoundComponent, From 8949e7cc270f499c446c65550bc1243c2f0ce4f3 Mon Sep 17 00:00:00 2001 From: Adan Roman Date: Tue, 20 Dec 2022 15:42:56 +0100 Subject: [PATCH 06/45] DS-8408 - In Advanced Search, list collections alphabetically --- .../dso-selector/dso-selector/dso-selector.component.ts | 9 ++++++++- .../create-community-parent-selector.component.html | 2 +- .../create-community-parent-selector.component.ts | 6 ++++++ .../dso-selector-modal-wrapper.component.html | 2 +- .../dso-selector-modal-wrapper.component.ts | 6 ++++++ .../scope-selector-modal.component.html | 2 +- .../scope-selector-modal.component.ts | 7 ++++++- .../create-collection-parent-selector.component.html | 2 +- .../create-community-parent-selector.component.html | 2 +- .../edit-collection-selector.component.html | 2 +- .../edit-community-selector.component.html | 2 +- .../edit-item-selector/edit-item-selector.component.html | 2 +- 12 files changed, 34 insertions(+), 10 deletions(-) diff --git a/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts b/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts index 0c799369ef..087ef3216d 100644 --- a/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts +++ b/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts @@ -31,6 +31,7 @@ import { getFirstCompletedRemoteData, getFirstSucceededRemoteDataPayload } from import { hasNoValue, hasValue, isEmpty, isNotEmpty } from '../../empty.util'; import { buildPaginatedList, PaginatedList } from '../../../core/data/paginated-list.model'; import { SearchResult } from '../../search/models/search-result.model'; +import {SortDirection, SortOptions} from '../../../core/cache/models/sort-options.model'; import { RemoteData } from '../../../core/data/remote-data'; import { NotificationsService } from '../../notifications/notifications.service'; import { TranslateService } from '@ngx-translate/core'; @@ -61,6 +62,11 @@ export class DSOSelectorComponent implements OnInit, OnDestroy { */ @Input() types: DSpaceObjectType[]; + /** + * The sorting options + */ + @Input() sort: SortOptions; + // list of allowed selectable dsoTypes typesString: string; @@ -219,7 +225,8 @@ export class DSOSelectorComponent implements OnInit, OnDestroy { dsoTypes: this.types, pagination: Object.assign({}, this.defaultPagination, { currentPage: page - }) + }), + sort: this.sort }) ).pipe( getFirstCompletedRemoteData() diff --git a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html index 84fdd34c01..2ec9a4f5ab 100644 --- a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html +++ b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html @@ -14,6 +14,6 @@
    {{'dso-selector.create.community.sub-level' | translate}}
    - +
    diff --git a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts index a7f583df50..f344c1c3f3 100644 --- a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts @@ -12,6 +12,7 @@ import { getCommunityCreateRoute, COMMUNITY_PARENT_PARAMETER } from '../../../../community-page/community-page-routing-paths'; +import {SortDirection, SortOptions} from '../../../../core/cache/models/sort-options.model'; /** * Component to wrap a button - for top communities - @@ -30,6 +31,11 @@ export class CreateCommunityParentSelectorComponent extends DSOSelectorModalWrap selectorTypes = [DSpaceObjectType.COMMUNITY]; action = SelectorActionType.CREATE; + /** + * Default DSO ordering + */ + defaultSort = new SortOptions('dc.title', SortDirection.ASC); + constructor(protected activeModal: NgbActiveModal, protected route: ActivatedRoute, private router: Router) { super(activeModal, route); } diff --git a/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.html b/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.html index 85d8797e66..54044f5d79 100644 --- a/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.html +++ b/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.html @@ -6,6 +6,6 @@
    diff --git a/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.ts b/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.ts index 113ca518fd..2a25da2f72 100644 --- a/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.ts @@ -5,6 +5,7 @@ import { RemoteData } from '../../../core/data/remote-data'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { DSpaceObjectType } from '../../../core/shared/dspace-object-type.model'; import { hasValue, isNotEmpty } from '../../empty.util'; +import {SortDirection, SortOptions} from '../../../core/cache/models/sort-options.model'; export enum SelectorActionType { CREATE = 'create', @@ -49,6 +50,11 @@ export abstract class DSOSelectorModalWrapperComponent implements OnInit { */ action: SelectorActionType; + /** + * Default DSO ordering + */ + defaultSort = new SortOptions('dc.title', SortDirection.ASC); + constructor(protected activeModal: NgbActiveModal, protected route: ActivatedRoute) { } diff --git a/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.html b/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.html index bf5c15e963..ad360be677 100644 --- a/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.html +++ b/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.html @@ -14,6 +14,6 @@
    {{'dso-selector.' + action + '.' + objectType.toString().toLowerCase() + '.input-header' | translate}}
    - + diff --git a/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.ts b/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.ts index 86c3010287..416242520c 100644 --- a/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.ts +++ b/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.ts @@ -4,7 +4,7 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { DSpaceObjectType } from '../../../core/shared/dspace-object-type.model'; import { DSOSelectorModalWrapperComponent, SelectorActionType } from '../../dso-selector/modal-wrappers/dso-selector-modal-wrapper.component'; import { DSpaceObject } from '../../../core/shared/dspace-object.model'; - +import {SortDirection, SortOptions} from '../../../core/cache/models/sort-options.model'; /** * Component to wrap a button - to select the entire repository - * and a list of parent communities - for scope selection @@ -33,6 +33,11 @@ export class ScopeSelectorModalComponent extends DSOSelectorModalWrapperComponen */ scopeChange = new EventEmitter(); + /** + * Default DSO ordering + */ + defaultSort = new SortOptions('dc.title', SortDirection.ASC); + constructor(protected activeModal: NgbActiveModal, protected route: ActivatedRoute) { super(activeModal, route); } diff --git a/src/themes/custom/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.html b/src/themes/custom/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.html index 85d8797e66..54044f5d79 100644 --- a/src/themes/custom/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.html +++ b/src/themes/custom/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.html @@ -6,6 +6,6 @@ diff --git a/src/themes/custom/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html b/src/themes/custom/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html index 84fdd34c01..2ec9a4f5ab 100644 --- a/src/themes/custom/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html +++ b/src/themes/custom/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html @@ -14,6 +14,6 @@
    {{'dso-selector.create.community.sub-level' | translate}}
    - + diff --git a/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.html b/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.html index 85d8797e66..54044f5d79 100644 --- a/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.html +++ b/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.html @@ -6,6 +6,6 @@ diff --git a/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.html b/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.html index 85d8797e66..54044f5d79 100644 --- a/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.html +++ b/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.html @@ -6,6 +6,6 @@ diff --git a/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.html b/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.html index 85d8797e66..54044f5d79 100644 --- a/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.html +++ b/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.html @@ -6,6 +6,6 @@ From d6402fbaf80e309de6e600caf9cfc8714f7db2e3 Mon Sep 17 00:00:00 2001 From: Adan Roman Date: Wed, 21 Dec 2022 08:31:42 +0100 Subject: [PATCH 07/45] DS-8408 - Unused dependency --- .../shared/dso-selector/dso-selector/dso-selector.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts b/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts index 3900de8571..4b5d8c7614 100644 --- a/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts +++ b/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts @@ -31,7 +31,7 @@ import { getFirstCompletedRemoteData, getFirstSucceededRemoteDataPayload } from import { hasNoValue, hasValue, isEmpty, isNotEmpty } from '../../empty.util'; import { buildPaginatedList, PaginatedList } from '../../../core/data/paginated-list.model'; import { SearchResult } from '../../search/models/search-result.model'; -import {SortDirection, SortOptions} from '../../../core/cache/models/sort-options.model'; +import { SortOptions } from '../../../core/cache/models/sort-options.model'; import { RemoteData } from '../../../core/data/remote-data'; import { NotificationsService } from '../../notifications/notifications.service'; import { TranslateService } from '@ngx-translate/core'; From 2451bbbd34bb0044056567411cc8ff386012e8be Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Wed, 21 Dec 2022 13:35:54 +0100 Subject: [PATCH 08/45] 97729: Themed ItemAlertsComponent --- .../full/full-item-page.component.html | 2 +- .../item-page/simple/item-page.component.html | 2 +- .../themed-item-alerts.component.ts | 30 +++++++++++++++++++ src/app/shared/shared.module.ts | 2 ++ .../item-alerts/item-alerts.component.html | 0 .../item-alerts/item-alerts.component.scss | 0 .../item/item-alerts/item-alerts.component.ts | 12 ++++++++ src/themes/custom/lazy-theme.module.ts | 4 +-- 8 files changed, 48 insertions(+), 4 deletions(-) create mode 100644 src/app/shared/item/item-alerts/themed-item-alerts.component.ts create mode 100644 src/themes/custom/app/shared/item/item-alerts/item-alerts.component.html create mode 100644 src/themes/custom/app/shared/item/item-alerts/item-alerts.component.scss create mode 100644 src/themes/custom/app/shared/item/item-alerts/item-alerts.component.ts diff --git a/src/app/item-page/full/full-item-page.component.html b/src/app/item-page/full/full-item-page.component.html index ee4ead2835..9fbfa08cfd 100644 --- a/src/app/item-page/full/full-item-page.component.html +++ b/src/app/item-page/full/full-item-page.component.html @@ -1,7 +1,7 @@
    - +
    diff --git a/src/app/item-page/simple/item-page.component.html b/src/app/item-page/simple/item-page.component.html index 0fc423c195..cc9983bb35 100644 --- a/src/app/item-page/simple/item-page.component.html +++ b/src/app/item-page/simple/item-page.component.html @@ -1,7 +1,7 @@
    - + diff --git a/src/app/shared/item/item-alerts/themed-item-alerts.component.ts b/src/app/shared/item/item-alerts/themed-item-alerts.component.ts new file mode 100644 index 0000000000..a650699984 --- /dev/null +++ b/src/app/shared/item/item-alerts/themed-item-alerts.component.ts @@ -0,0 +1,30 @@ +import { Component, Input } from '@angular/core'; +import { Item } from '../../../core/shared/item.model'; +import { ItemAlertsComponent } from './item-alerts.component'; +import { ThemedComponent } from '../../theme-support/themed.component'; + +/** + * Themed wrapper for {@link ItemAlertsComponent} + */ +@Component({ + selector: 'ds-themed-item-alerts', + styleUrls: [], + templateUrl: '../../theme-support/themed.component.html', +}) +export class ThemedItemAlertsComponent extends ThemedComponent { + protected inAndOutputNames: (keyof ItemAlertsComponent & keyof this)[] = ['item']; + + @Input() item: Item; + + protected getComponentName(): string { + return 'ItemAlertsComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../../themes/${themeName}/app/shared/item/item-alerts/item-alerts.component`); + } + + protected importUnthemedComponent(): Promise { + return import('./item-alerts.component'); + } +} diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 45e9764151..342077eb05 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -324,6 +324,7 @@ import { } from '../item-page/simple/field-components/specific-field/title/item-page-title-field.component'; import { MarkdownPipe } from './utils/markdown.pipe'; import { GoogleRecaptchaModule } from '../core/google-recaptcha/google-recaptcha.module'; +import { ThemedItemAlertsComponent } from './item/item-alerts/themed-item-alerts.component'; const MODULES = [ CommonModule, @@ -587,6 +588,7 @@ const SHARED_ITEM_PAGE_COMPONENTS = [ DsoPageVersionButtonComponent, PersonPageClaimButtonComponent, ItemAlertsComponent, + ThemedItemAlertsComponent, GenericItemPageFieldComponent, MetadataRepresentationListComponent, RelatedItemsComponent, diff --git a/src/themes/custom/app/shared/item/item-alerts/item-alerts.component.html b/src/themes/custom/app/shared/item/item-alerts/item-alerts.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/shared/item/item-alerts/item-alerts.component.scss b/src/themes/custom/app/shared/item/item-alerts/item-alerts.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/shared/item/item-alerts/item-alerts.component.ts b/src/themes/custom/app/shared/item/item-alerts/item-alerts.component.ts new file mode 100644 index 0000000000..3b63a1e69d --- /dev/null +++ b/src/themes/custom/app/shared/item/item-alerts/item-alerts.component.ts @@ -0,0 +1,12 @@ +import { Component } from '@angular/core'; +import { ItemAlertsComponent as BaseComponent } from '../../../../../../app/shared/item/item-alerts/item-alerts.component'; + +@Component({ + selector: 'ds-item-alerts', + // templateUrl: './item-alerts.component.html', + templateUrl: '../../../../../../app/shared/item/item-alerts/item-alerts.component.html', + // styleUrls: ['./item-alerts.component.scss'], + styleUrls: ['../../../../../../app/shared/item/item-alerts/item-alerts.component.scss'], +}) +export class ItemAlertsComponent extends BaseComponent { +} diff --git a/src/themes/custom/lazy-theme.module.ts b/src/themes/custom/lazy-theme.module.ts index d2ac0ae787..3a76150621 100644 --- a/src/themes/custom/lazy-theme.module.ts +++ b/src/themes/custom/lazy-theme.module.ts @@ -114,6 +114,7 @@ import { ObjectListComponent } from './app/shared/object-list/object-list.compon import { BrowseByMetadataPageComponent } from './app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component'; import { BrowseByDatePageComponent } from './app/browse-by/browse-by-date-page/browse-by-date-page.component'; import { BrowseByTitlePageComponent } from './app/browse-by/browse-by-title-page/browse-by-title-page.component'; +import { ItemAlertsComponent } from './app/shared/item/item-alerts/item-alerts.component'; const DECLARATIONS = [ FileSectionComponent, @@ -168,8 +169,7 @@ const DECLARATIONS = [ BrowseByMetadataPageComponent, BrowseByDatePageComponent, BrowseByTitlePageComponent, - - + ItemAlertsComponent, ]; @NgModule({ From 6523b029134db91a449d17085dcb58b79e335f21 Mon Sep 17 00:00:00 2001 From: aroman-arvo Date: Mon, 16 Jan 2023 13:07:19 +0100 Subject: [PATCH 09/45] DS-8408: Edit item is ordered by relevance --- .../edit-item-selector.component.html | 11 +++++++++++ .../edit-item-selector.component.ts | 2 +- .../edit-item-selector.component.html | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.html diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.html b/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.html new file mode 100644 index 0000000000..85d8797e66 --- /dev/null +++ b/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.html @@ -0,0 +1,11 @@ +
    + + +
    diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.ts index 4822849e4c..c1ae583908 100644 --- a/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.ts @@ -14,7 +14,7 @@ import { Item } from '../../../../core/shared/item.model'; @Component({ selector: 'ds-edit-item-selector', - templateUrl: '../dso-selector-modal-wrapper.component.html', + templateUrl: 'edit-item-selector.component.html', }) export class EditItemSelectorComponent extends DSOSelectorModalWrapperComponent implements OnInit { objectType = DSpaceObjectType.ITEM; diff --git a/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.html b/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.html index 54044f5d79..85d8797e66 100644 --- a/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.html +++ b/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.html @@ -6,6 +6,6 @@
    From 660a6dbd56b46a5e7745c53f9b88ce178c0107f2 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Thu, 19 Jan 2023 13:52:57 +0100 Subject: [PATCH 10/45] 98661: Created themeable FullFileSectionComponent --- .../themed-full-file-section.component.ts | 32 +++++++++++++++++++ .../full/full-item-page.component.html | 2 +- src/app/item-page/item-page.module.ts | 4 +++ .../full-file-section.component.html | 0 .../full-file-section.component.scss | 0 .../full-file-section.component.ts | 14 ++++++++ src/themes/custom/theme.module.ts | 6 +++- 7 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 src/app/item-page/full/field-components/file-section/themed-full-file-section.component.ts create mode 100644 src/themes/custom/app/item-page/full/field-components/file-section/full-file-section.component.html create mode 100644 src/themes/custom/app/item-page/full/field-components/file-section/full-file-section.component.scss create mode 100644 src/themes/custom/app/item-page/full/field-components/file-section/full-file-section.component.ts diff --git a/src/app/item-page/full/field-components/file-section/themed-full-file-section.component.ts b/src/app/item-page/full/field-components/file-section/themed-full-file-section.component.ts new file mode 100644 index 0000000000..015eec285c --- /dev/null +++ b/src/app/item-page/full/field-components/file-section/themed-full-file-section.component.ts @@ -0,0 +1,32 @@ +import { Component, Input } from '@angular/core'; +import { ThemedComponent } from '../../../../shared/theme-support/themed.component'; +import { FullFileSectionComponent } from './full-file-section.component'; +import { Item } from '../../../../core/shared/item.model'; + +/** + * Themed wrapper for {@link FullFileSectionComponent} + */ +@Component({ + selector: 'ds-themed-item-page-full-file-section', + styleUrls: [], + templateUrl: './../../../../shared/theme-support/themed.component.html', +}) +export class ThemedFullFileSectionComponent extends ThemedComponent { + + @Input() item: Item; + + protected inAndOutputNames: (keyof FullFileSectionComponent & keyof this)[] = ['item']; + + protected getComponentName(): string { + return 'FullFileSectionComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../../../themes/${themeName}/app/item-page/full/field-components/file-section/full-file-section.component`); + } + + protected importUnthemedComponent(): Promise { + return import('./full-file-section.component'); + } + +} diff --git a/src/app/item-page/full/full-item-page.component.html b/src/app/item-page/full/full-item-page.component.html index d2655c4ad0..45a473e532 100644 --- a/src/app/item-page/full/full-item-page.component.html +++ b/src/app/item-page/full/full-item-page.component.html @@ -26,7 +26,7 @@ - +
    diff --git a/src/app/item-page/item-page.module.ts b/src/app/item-page/item-page.module.ts index 80cb1f61a2..d07ab678a7 100644 --- a/src/app/item-page/item-page.module.ts +++ b/src/app/item-page/item-page.module.ts @@ -34,6 +34,9 @@ import { MiradorViewerComponent } from './mirador-viewer/mirador-viewer.componen import { VersionPageComponent } from './version-page/version-page/version-page.component'; import { VersionedItemComponent } from './simple/item-types/versioned-item/versioned-item.component'; import { ThemedFileSectionComponent } from './simple/field-components/file-section/themed-file-section.component'; +import { + ThemedFullFileSectionComponent +} from './full/field-components/file-section/themed-full-file-section.component'; const ENTRY_COMPONENTS = [ @@ -57,6 +60,7 @@ const DECLARATIONS = [ ItemPageFieldComponent, CollectionsComponent, FullFileSectionComponent, + ThemedFullFileSectionComponent, PublicationComponent, UntypedItemComponent, ItemComponent, diff --git a/src/themes/custom/app/item-page/full/field-components/file-section/full-file-section.component.html b/src/themes/custom/app/item-page/full/field-components/file-section/full-file-section.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/item-page/full/field-components/file-section/full-file-section.component.scss b/src/themes/custom/app/item-page/full/field-components/file-section/full-file-section.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/item-page/full/field-components/file-section/full-file-section.component.ts b/src/themes/custom/app/item-page/full/field-components/file-section/full-file-section.component.ts new file mode 100644 index 0000000000..39c27b7350 --- /dev/null +++ b/src/themes/custom/app/item-page/full/field-components/file-section/full-file-section.component.ts @@ -0,0 +1,14 @@ +import { Component } from '@angular/core'; +import { + FullFileSectionComponent as BaseComponent +} from '../../../../../../../app/item-page/full/field-components/file-section/full-file-section.component'; + +@Component({ + selector: 'ds-item-page-full-file-section', + // styleUrls: ['./full-file-section.component.scss'], + styleUrls: ['../../../../../../../app/item-page/full/field-components/file-section/full-file-section.component.scss'], + // templateUrl: './full-file-section.component.html', + templateUrl: '../../../../../../../app/item-page/full/field-components/file-section/full-file-section.component.html', +}) +export class FullFileSectionComponent extends BaseComponent { +} diff --git a/src/themes/custom/theme.module.ts b/src/themes/custom/theme.module.ts index e2e97b9087..bb9e59f48d 100644 --- a/src/themes/custom/theme.module.ts +++ b/src/themes/custom/theme.module.ts @@ -84,6 +84,9 @@ import { SearchModule } from '../../app/shared/search/search.module'; import { ResourcePoliciesModule } from '../../app/shared/resource-policies/resource-policies.module'; import { ComcolModule } from '../../app/shared/comcol/comcol.module'; import { FeedbackComponent } from './app/info/feedback/feedback.component'; +import { + FullFileSectionComponent +} from './app/item-page/full/field-components/file-section/full-file-section.component'; const DECLARATIONS = [ FileSectionComponent, @@ -126,7 +129,8 @@ const DECLARATIONS = [ NavbarComponent, HeaderNavbarWrapperComponent, BreadcrumbsComponent, - FeedbackComponent + FeedbackComponent, + FullFileSectionComponent, ]; @NgModule({ From d49ae535a11ee8837606fce309896056a2583e1d Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Mon, 23 Jan 2023 18:08:59 +0100 Subject: [PATCH 11/45] 98819: Added StartsWithDateComponent & StartsWithTextComponent to custom folder --- .../date/starts-with-date.component.html | 0 .../date/starts-with-date.component.scss | 0 .../date/starts-with-date.component.ts | 16 ++++++++++++++++ .../text/starts-with-text.component.html | 0 .../text/starts-with-text.component.scss | 0 .../text/starts-with-text.component.ts | 16 ++++++++++++++++ src/themes/custom/entry-components.ts | 6 +++++- src/themes/custom/theme.module.ts | 6 +++++- 8 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 src/themes/custom/app/shared/starts-with/date/starts-with-date.component.html create mode 100644 src/themes/custom/app/shared/starts-with/date/starts-with-date.component.scss create mode 100644 src/themes/custom/app/shared/starts-with/date/starts-with-date.component.ts create mode 100644 src/themes/custom/app/shared/starts-with/text/starts-with-text.component.html create mode 100644 src/themes/custom/app/shared/starts-with/text/starts-with-text.component.scss create mode 100644 src/themes/custom/app/shared/starts-with/text/starts-with-text.component.ts diff --git a/src/themes/custom/app/shared/starts-with/date/starts-with-date.component.html b/src/themes/custom/app/shared/starts-with/date/starts-with-date.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/shared/starts-with/date/starts-with-date.component.scss b/src/themes/custom/app/shared/starts-with/date/starts-with-date.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/shared/starts-with/date/starts-with-date.component.ts b/src/themes/custom/app/shared/starts-with/date/starts-with-date.component.ts new file mode 100644 index 0000000000..ed7efb3ba6 --- /dev/null +++ b/src/themes/custom/app/shared/starts-with/date/starts-with-date.component.ts @@ -0,0 +1,16 @@ +import { Component } from '@angular/core'; +import { renderStartsWithFor, StartsWithType } from '../../../../../../app/shared/starts-with/starts-with-decorator'; +import { + StartsWithDateComponent as BaseComponent +} from '../../../../../../app/shared/starts-with/date/starts-with-date.component'; + +@Component({ + selector: 'ds-starts-with-date', + // styleUrls: ['./starts-with-date.component.scss'], + styleUrls: ['../../../../../../app/shared/starts-with/date/starts-with-date.component.scss'], + // templateUrl: './starts-with-date.component.html', + templateUrl: '../../../../../../app/shared/starts-with/date/starts-with-date.component.html', +}) +@renderStartsWithFor(StartsWithType.date) +export class StartsWithDateComponent extends BaseComponent { +} diff --git a/src/themes/custom/app/shared/starts-with/text/starts-with-text.component.html b/src/themes/custom/app/shared/starts-with/text/starts-with-text.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/shared/starts-with/text/starts-with-text.component.scss b/src/themes/custom/app/shared/starts-with/text/starts-with-text.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/shared/starts-with/text/starts-with-text.component.ts b/src/themes/custom/app/shared/starts-with/text/starts-with-text.component.ts new file mode 100644 index 0000000000..9c7a721230 --- /dev/null +++ b/src/themes/custom/app/shared/starts-with/text/starts-with-text.component.ts @@ -0,0 +1,16 @@ +import { Component } from '@angular/core'; +import { renderStartsWithFor, StartsWithType } from '../../../../../../app/shared/starts-with/starts-with-decorator'; +import { + StartsWithTextComponent as BaseComponent +} from '../../../../../../app/shared/starts-with/text/starts-with-text.component'; + +@Component({ + selector: 'ds-starts-with-text', + // styleUrls: ['./starts-with-text.component.scss'], + styleUrls: ['../../../../../../app/shared/starts-with/text/starts-with-text.component.scss'], + // templateUrl: './starts-with-text.component.html', + templateUrl: '../../../../../../app/shared/starts-with/text/starts-with-text.component.html', +}) +@renderStartsWithFor(StartsWithType.text) +export class StartsWithTextComponent extends BaseComponent { +} diff --git a/src/themes/custom/entry-components.ts b/src/themes/custom/entry-components.ts index b518e4cc45..b70fa065f4 100644 --- a/src/themes/custom/entry-components.ts +++ b/src/themes/custom/entry-components.ts @@ -1,5 +1,9 @@ import { PublicationComponent } from './app/item-page/simple/item-types/publication/publication.component'; +import { StartsWithDateComponent } from './app/shared/starts-with/date/starts-with-date.component'; +import { StartsWithTextComponent } from './app/shared/starts-with/text/starts-with-text.component'; export const ENTRY_COMPONENTS = [ - PublicationComponent + PublicationComponent, + StartsWithDateComponent, + StartsWithTextComponent, ]; diff --git a/src/themes/custom/theme.module.ts b/src/themes/custom/theme.module.ts index dac941546b..9d2cccbc8c 100644 --- a/src/themes/custom/theme.module.ts +++ b/src/themes/custom/theme.module.ts @@ -79,6 +79,8 @@ import { HeaderComponent } from './app/header/header.component'; import { FooterComponent } from './app/footer/footer.component'; import { BreadcrumbsComponent } from './app/breadcrumbs/breadcrumbs.component'; import { HeaderNavbarWrapperComponent } from './app/header-nav-wrapper/header-navbar-wrapper.component'; +import { StartsWithDateComponent } from './app/shared/starts-with/date/starts-with-date.component'; +import { StartsWithTextComponent } from './app/shared/starts-with/text/starts-with-text.component'; const DECLARATIONS = [ HomePageComponent, @@ -119,7 +121,9 @@ const DECLARATIONS = [ HeaderComponent, NavbarComponent, HeaderNavbarWrapperComponent, - BreadcrumbsComponent + BreadcrumbsComponent, + StartsWithDateComponent, + StartsWithTextComponent, ]; @NgModule({ From fbeaec1a54e31facaffee9cc912fb052efb62099 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Tue, 31 Jan 2023 14:21:36 +0100 Subject: [PATCH 12/45] 98891: Make it possible to provide query to SearchComponent --- src/app/shared/search/search.component.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/app/shared/search/search.component.ts b/src/app/shared/search/search.component.ts index c017a5065b..5868cdcf0b 100644 --- a/src/app/shared/search/search.component.ts +++ b/src/app/shared/search/search.component.ts @@ -134,6 +134,11 @@ export class SearchComponent implements OnInit { */ @Input() viewModeList: ViewMode[]; + /** + * The search query + */ + @Input() query: string; + /** * The current configuration used during the search */ @@ -275,6 +280,9 @@ export class SearchComponent implements OnInit { configuration: searchOptions.configuration || configuration, sort: sortOption || searchOptions.sort }); + if (combinedOptions.query === '') { + combinedOptions.query = this.query; + } const newSearchOptions = new PaginatedSearchOptions(combinedOptions); // check if search options are changed // if so retrieve new related results otherwise skip it From c6ecc0cbd4c3d10523d2c44da6ffd3d1ff207eaa Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Tue, 31 Jan 2023 14:40:36 +0100 Subject: [PATCH 13/45] 98891: DsDynamicLookupRelationSearchTabComponent should have the form value already filled in the search input --- .../search-tab/dynamic-lookup-relation-search-tab.component.html | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.html b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.html index 54ac149d48..4e88b17b64 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.html +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.html @@ -8,6 +8,7 @@ [selectable]="true" [selectionConfig]="{ repeatable: repeatable, listId: listId }" [showViewModes]="false" + [query]="query" (resultFound)="onResultFound($event)" (deselectObject)="deselectObject.emit($event)" (selectObject)="selectObject.emit($event)"> From b3c65f59a45cfabdf505ee5f16b2e23b340643c2 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Tue, 6 Dec 2022 20:42:06 +0100 Subject: [PATCH 14/45] 97281: Added ItemSearchResultListElementComponent & PublicationSidebarSearchListElementComponent to custom theme --- ...-search-result-list-element.component.html | 0 ...-search-result-list-element.component.scss | 0 ...em-search-result-list-element.component.ts | 24 +++++++++++++ ...sidebar-search-list-element.component.html | 0 ...n-sidebar-search-list-element.component.ts | 20 +++++++++++ src/themes/custom/eager-theme.module.ts | 36 +++++++++++-------- 6 files changed, 66 insertions(+), 14 deletions(-) create mode 100644 src/themes/custom/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.html create mode 100644 src/themes/custom/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.scss create mode 100644 src/themes/custom/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.ts create mode 100644 src/themes/custom/app/shared/object-list/sidebar-search-list-element/item-types/publication-sidebar-search-list-element.component.html create mode 100644 src/themes/custom/app/shared/object-list/sidebar-search-list-element/item-types/publication-sidebar-search-list-element.component.ts diff --git a/src/themes/custom/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.html b/src/themes/custom/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.scss b/src/themes/custom/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.ts b/src/themes/custom/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.ts new file mode 100644 index 0000000000..269a6b35d2 --- /dev/null +++ b/src/themes/custom/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.ts @@ -0,0 +1,24 @@ +import { Component } from '@angular/core'; +import { + listableObjectComponent +} from '../../../../../../../../../app/shared/object-collection/shared/listable-object/listable-object.decorator'; +import { ViewMode } from '../../../../../../../../../app/core/shared/view-mode.model'; +import { + ItemSearchResult +} from '../../../../../../../../../app/shared/object-collection/shared/item-search-result.model'; +import { + ItemSearchResultListElementComponent as BaseComponent +} from '../../../../../../../../../app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component'; +import { Context } from '../../../../../../../../../app/core/shared/context.model'; + +@listableObjectComponent('PublicationSearchResult', ViewMode.ListElement, Context.Any, 'custom') +@listableObjectComponent(ItemSearchResult, ViewMode.ListElement, Context.Any, 'custom') +@Component({ + selector: 'ds-item-search-result-list-element', + // styleUrls: ['./item-search-result-list-element.component.scss'], + styleUrls: ['../../../../../../../../../app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.scss'], + // templateUrl: './item-search-result-list-element.component.html', + templateUrl: '../../../../../../../../../app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.html', +}) +export class ItemSearchResultListElementComponent extends BaseComponent { +} diff --git a/src/themes/custom/app/shared/object-list/sidebar-search-list-element/item-types/publication-sidebar-search-list-element.component.html b/src/themes/custom/app/shared/object-list/sidebar-search-list-element/item-types/publication-sidebar-search-list-element.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/shared/object-list/sidebar-search-list-element/item-types/publication-sidebar-search-list-element.component.ts b/src/themes/custom/app/shared/object-list/sidebar-search-list-element/item-types/publication-sidebar-search-list-element.component.ts new file mode 100644 index 0000000000..1c2a70cabf --- /dev/null +++ b/src/themes/custom/app/shared/object-list/sidebar-search-list-element/item-types/publication-sidebar-search-list-element.component.ts @@ -0,0 +1,20 @@ +import { listableObjectComponent } from '../../../../../../../app/shared/object-collection/shared/listable-object/listable-object.decorator'; +import { ViewMode } from '../../../../../../../app/core/shared/view-mode.model'; +import { Component } from '@angular/core'; +import { Context } from '../../../../../../../app/core/shared/context.model'; +import { ItemSearchResult } from '../../../../../../../app/shared/object-collection/shared/item-search-result.model'; +import { + PublicationSidebarSearchListElementComponent as BaseComponent +} from '../../../../../../../app/shared/object-list/sidebar-search-list-element/item-types/publication/publication-sidebar-search-list-element.component'; + +@listableObjectComponent('PublicationSearchResult', ViewMode.ListElement, Context.SideBarSearchModal, 'custom') +@listableObjectComponent('PublicationSearchResult', ViewMode.ListElement, Context.SideBarSearchModalCurrent, 'custom') +@listableObjectComponent(ItemSearchResult, ViewMode.ListElement, Context.SideBarSearchModal, 'custom') +@listableObjectComponent(ItemSearchResult, ViewMode.ListElement, Context.SideBarSearchModalCurrent, 'custom') +@Component({ + selector: 'ds-publication-sidebar-search-list-element', + // templateUrl: './publication-sidebar-search-list-element.component.html', + templateUrl: '../../../../../../../app/shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.html', +}) +export class PublicationSidebarSearchListElementComponent extends BaseComponent { +} diff --git a/src/themes/custom/eager-theme.module.ts b/src/themes/custom/eager-theme.module.ts index 5f610db6fa..9166d54016 100644 --- a/src/themes/custom/eager-theme.module.ts +++ b/src/themes/custom/eager-theme.module.ts @@ -45,6 +45,12 @@ import { SharedBrowseByModule } from '../../app/shared/browse-by/shared-browse-b import { ResultsBackButtonModule } from '../../app/shared/results-back-button/results-back-button.module'; import { StartsWithDateComponent } from './app/shared/starts-with/date/starts-with-date.component'; import { StartsWithTextComponent } from './app/shared/starts-with/text/starts-with-text.component'; +import { + PublicationSidebarSearchListElementComponent +} from './app/shared/object-list/sidebar-search-list-element/item-types/publication-sidebar-search-list-element.component'; +import { + ItemSearchResultListElementComponent +} from './app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component'; /** * Add components that use a custom decorator to ENTRY_COMPONENTS as well as DECLARATIONS. @@ -61,6 +67,8 @@ const ENTRY_COMPONENTS = [ CollectionDropdownComponent, StartsWithDateComponent, StartsWithTextComponent, + PublicationSidebarSearchListElementComponent, + ItemSearchResultListElementComponent, ]; const DECLARATIONS = [ @@ -80,20 +88,20 @@ const DECLARATIONS = [ ]; @NgModule({ - imports: [ - CommonModule, - SharedModule, - RootModule, - NavbarModule, - SharedBrowseByModule, - ResultsBackButtonModule, - ItemPageModule, - ItemSharedModule, - ], - declarations: DECLARATIONS, - providers: [ - ...ENTRY_COMPONENTS.map((component) => ({provide: component})) - ], + imports: [ + CommonModule, + SharedModule, + RootModule, + NavbarModule, + SharedBrowseByModule, + ResultsBackButtonModule, + ItemPageModule, + ItemSharedModule, + ], + declarations: DECLARATIONS, + providers: [ + ...ENTRY_COMPONENTS.map((component) => ({provide: component})) + ], }) /** * This module is included in the main bundle that gets downloaded at first page load. So it should From e4e973bbefc6222818eb1b97702e04dfbdd033a4 Mon Sep 17 00:00:00 2001 From: cris Date: Thu, 9 Feb 2023 20:53:28 +0000 Subject: [PATCH 15/45] ul and li replaced to role list and listitem --- src/app/shared/form/chips/chips.component.html | 8 ++++---- src/app/shared/form/chips/chips.component.spec.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/app/shared/form/chips/chips.component.html b/src/app/shared/form/chips/chips.component.html index 2233c1bd16..a6b90b23aa 100644 --- a/src/app/shared/form/chips/chips.component.html +++ b/src/app/shared/form/chips/chips.component.html @@ -1,5 +1,5 @@
    - +
    diff --git a/src/app/shared/form/chips/chips.component.spec.ts b/src/app/shared/form/chips/chips.component.spec.ts index 2b8a469bd1..050950ed4d 100644 --- a/src/app/shared/form/chips/chips.component.spec.ts +++ b/src/app/shared/form/chips/chips.component.spec.ts @@ -122,7 +122,7 @@ describe('ChipsComponent test suite', () => { })); it('should save chips item index when drag and drop start', fakeAsync(() => { - const de = chipsFixture.debugElement.query(By.css('li.nav-item')); + const de = chipsFixture.debugElement.query(By.css('div.nav-item')); de.triggerEventHandler('dragstart', null); @@ -131,7 +131,7 @@ describe('ChipsComponent test suite', () => { it('should update chips item order when drag and drop end', fakeAsync(() => { spyOn(chipsComp.chips, 'updateOrder'); - const de = chipsFixture.debugElement.query(By.css('li.nav-item')); + const de = chipsFixture.debugElement.query(By.css('div.nav-item')); de.triggerEventHandler('dragend', null); @@ -158,7 +158,7 @@ describe('ChipsComponent test suite', () => { }); it('should show icon for every field that has a configured icon', () => { - const de = chipsFixture.debugElement.query(By.css('li.nav-item')); + const de = chipsFixture.debugElement.query(By.css('div.nav-item')); const icons = de.queryAll(By.css('i.fas')); expect(icons.length).toBe(4); @@ -166,7 +166,7 @@ describe('ChipsComponent test suite', () => { }); it('should show tooltip on mouse over an icon', () => { - const de = chipsFixture.debugElement.query(By.css('li.nav-item')); + const de = chipsFixture.debugElement.query(By.css('div.nav-item')); const icons = de.queryAll(By.css('i.fas')); icons[0].triggerEventHandler('mouseover', null); From e1beb615252973fceb8d48d12a77b83e94a2a057 Mon Sep 17 00:00:00 2001 From: cris Date: Thu, 9 Feb 2023 21:44:02 +0000 Subject: [PATCH 16/45] ul and li in dropdwon collection in submissions form --- .../collection-dropdown.component.html | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/app/shared/collection-dropdown/collection-dropdown.component.html b/src/app/shared/collection-dropdown/collection-dropdown.component.html index db6c1fb41d..470291373f 100644 --- a/src/app/shared/collection-dropdown/collection-dropdown.component.html +++ b/src/app/shared/collection-dropdown/collection-dropdown.component.html @@ -7,7 +7,7 @@ #searchFieldEl>
    -
    - +
  • - + +
    {{ listItem.collection.name}}
    + +
    - + From 1d69e1581adbffd53b01b1c7342669b383273242 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Fri, 10 Feb 2023 17:45:59 +0100 Subject: [PATCH 17/45] 97755: Call spy before component is created --- src/app/admin/admin-sidebar/admin-sidebar.component.spec.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/app/admin/admin-sidebar/admin-sidebar.component.spec.ts b/src/app/admin/admin-sidebar/admin-sidebar.component.spec.ts index 65026c1504..fe8e4187d3 100644 --- a/src/app/admin/admin-sidebar/admin-sidebar.component.spec.ts +++ b/src/app/admin/admin-sidebar/admin-sidebar.component.spec.ts @@ -55,6 +55,7 @@ describe('AdminSidebarComponent', () => { isAuthorized: observableOf(true) }); scriptService = jasmine.createSpyObj('scriptService', { scriptWithNameExistsAndCanExecute: observableOf(true) }); + spyOn(menuService, 'addSection').and.callThrough(); TestBed.configureTestingModule({ imports: [TranslateModule.forRoot(), NoopAnimationsModule, RouterTestingModule], declarations: [AdminSidebarComponent], @@ -184,10 +185,6 @@ describe('AdminSidebarComponent', () => { }); describe('menu', () => { - beforeEach(() => { - spyOn(menuService, 'addSection'); - }); - describe('for regular user', () => { beforeEach(() => { authorizationService.isAuthorized = createSpy('isAuthorized').and.callFake(() => { From eeda26e122859bfac8fcbc6ea806eae86c19431e Mon Sep 17 00:00:00 2001 From: aroman-arvo Date: Mon, 13 Feb 2023 10:42:56 +0100 Subject: [PATCH 18/45] 8408 - sort ordering is parametrized and used only when no text query is send. --- config/config.example.yml | 5 +++++ config/config.yml | 6 +++--- .../dso-selector/dso-selector.component.ts | 4 +++- .../create-community-parent-selector.component.ts | 6 ------ .../dso-selector-modal-wrapper.component.ts | 5 +++-- .../scope-selector-modal.component.ts | 7 +------ src/config/app-config.interface.ts | 2 ++ src/config/default-app-config.ts | 7 +++++++ src/config/discovery-sort.config.ts | 14 ++++++++++++++ src/environments/environment.test.ts | 4 ++++ 10 files changed, 42 insertions(+), 18 deletions(-) create mode 100644 src/config/discovery-sort.config.ts diff --git a/config/config.example.yml b/config/config.example.yml index 9abf167b90..c5a9ea6f85 100644 --- a/config/config.example.yml +++ b/config/config.example.yml @@ -310,3 +310,8 @@ info: markdown: enabled: false mathjax: false + +# Default collection/community sorting order at Advanced search, Create/update community and collection when there are not a query. +collectionSelectionSort: + sortMetadata: "dc.title" + sortDirection: "ASC" \ No newline at end of file diff --git a/config/config.yml b/config/config.yml index b5eecd112f..38ac562b15 100644 --- a/config/config.yml +++ b/config/config.yml @@ -1,5 +1,5 @@ rest: - ssl: true - host: api7.dspace.org - port: 443 + ssl: false + host: localhost + port: 9090 nameSpace: /server diff --git a/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts b/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts index 4b5d8c7614..52ca9224b1 100644 --- a/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts +++ b/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts @@ -227,6 +227,8 @@ export class DSOSelectorComponent implements OnInit, OnDestroy { * @param useCache Whether or not to use the cache */ search(query: string, page: number, useCache: boolean = true): Observable>>> { + // default sort is only used when there is not query + var efectiveSort=query?null:this.sort; return this.searchService.search( new PaginatedSearchOptions({ query: query, @@ -234,7 +236,7 @@ export class DSOSelectorComponent implements OnInit, OnDestroy { pagination: Object.assign({}, this.defaultPagination, { currentPage: page }), - sort: this.sort + sort: efectiveSort }), null, useCache, diff --git a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts index f344c1c3f3..a7f583df50 100644 --- a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts @@ -12,7 +12,6 @@ import { getCommunityCreateRoute, COMMUNITY_PARENT_PARAMETER } from '../../../../community-page/community-page-routing-paths'; -import {SortDirection, SortOptions} from '../../../../core/cache/models/sort-options.model'; /** * Component to wrap a button - for top communities - @@ -31,11 +30,6 @@ export class CreateCommunityParentSelectorComponent extends DSOSelectorModalWrap selectorTypes = [DSpaceObjectType.COMMUNITY]; action = SelectorActionType.CREATE; - /** - * Default DSO ordering - */ - defaultSort = new SortOptions('dc.title', SortDirection.ASC); - constructor(protected activeModal: NgbActiveModal, protected route: ActivatedRoute, private router: Router) { super(activeModal, route); } diff --git a/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.ts b/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.ts index 2a25da2f72..fcb8aea9d2 100644 --- a/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.ts @@ -5,7 +5,8 @@ import { RemoteData } from '../../../core/data/remote-data'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { DSpaceObjectType } from '../../../core/shared/dspace-object-type.model'; import { hasValue, isNotEmpty } from '../../empty.util'; -import {SortDirection, SortOptions} from '../../../core/cache/models/sort-options.model'; +import { SortDirection, SortOptions } from '../../../core/cache/models/sort-options.model'; +import { environment } from '../../../../environments/environment'; export enum SelectorActionType { CREATE = 'create', @@ -53,7 +54,7 @@ export abstract class DSOSelectorModalWrapperComponent implements OnInit { /** * Default DSO ordering */ - defaultSort = new SortOptions('dc.title', SortDirection.ASC); + defaultSort = new SortOptions(environment.collectionSelectionSort.sortMetadata, environment.collectionSelectionSort.sortDirection as SortDirection); constructor(protected activeModal: NgbActiveModal, protected route: ActivatedRoute) { } diff --git a/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.ts b/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.ts index 416242520c..86c3010287 100644 --- a/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.ts +++ b/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.ts @@ -4,7 +4,7 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { DSpaceObjectType } from '../../../core/shared/dspace-object-type.model'; import { DSOSelectorModalWrapperComponent, SelectorActionType } from '../../dso-selector/modal-wrappers/dso-selector-modal-wrapper.component'; import { DSpaceObject } from '../../../core/shared/dspace-object.model'; -import {SortDirection, SortOptions} from '../../../core/cache/models/sort-options.model'; + /** * Component to wrap a button - to select the entire repository - * and a list of parent communities - for scope selection @@ -33,11 +33,6 @@ export class ScopeSelectorModalComponent extends DSOSelectorModalWrapperComponen */ scopeChange = new EventEmitter(); - /** - * Default DSO ordering - */ - defaultSort = new SortOptions('dc.title', SortDirection.ASC); - constructor(protected activeModal: NgbActiveModal, protected route: ActivatedRoute) { super(activeModal, route); } diff --git a/src/config/app-config.interface.ts b/src/config/app-config.interface.ts index ce9c8b3bf7..cc7227d11e 100644 --- a/src/config/app-config.interface.ts +++ b/src/config/app-config.interface.ts @@ -20,6 +20,7 @@ import { InfoConfig } from './info-config.interface'; import { CommunityListConfig } from './community-list-config.interface'; import { HomeConfig } from './homepage-config.interface'; import { MarkdownConfig } from './markdown-config.interface'; +import { DiscoverySortConfig } from './discovery-sort.config'; interface AppConfig extends Config { ui: UIServerConfig; @@ -44,6 +45,7 @@ interface AppConfig extends Config { actuators: ActuatorsConfig info: InfoConfig; markdown: MarkdownConfig; + collectionSelectionSort: DiscoverySortConfig; } /** diff --git a/src/config/default-app-config.ts b/src/config/default-app-config.ts index 276d2d7150..572f757f86 100644 --- a/src/config/default-app-config.ts +++ b/src/config/default-app-config.ts @@ -20,6 +20,7 @@ import { InfoConfig } from './info-config.interface'; import { CommunityListConfig } from './community-list-config.interface'; import { HomeConfig } from './homepage-config.interface'; import { MarkdownConfig } from './markdown-config.interface'; +import { DiscoverySortConfig } from './discovery-sort.config'; export class DefaultAppConfig implements AppConfig { production = false; @@ -385,4 +386,10 @@ export class DefaultAppConfig implements AppConfig { enabled: false, mathjax: false, }; + + // Configuration that determines the metadata sorting of community and collection edition and creation when there are not a search query. + collectionSelectionSort: DiscoverySortConfig = { + sortMetadata:"dc.title", + sortDirection:"ASC", + }; } diff --git a/src/config/discovery-sort.config.ts b/src/config/discovery-sort.config.ts new file mode 100644 index 0000000000..02428f70a8 --- /dev/null +++ b/src/config/discovery-sort.config.ts @@ -0,0 +1,14 @@ +import { Config } from './config.interface'; + +/** + * Config that determines a metadata sorting config. + * It's created mainly to sort by metadata community and collection edition and creation + */ +export class DiscoverySortConfig implements Config { + + public sortMetadata: string; + /** + * ASC / DESC values expected + */ + public sortDirection: string; +} diff --git a/src/environments/environment.test.ts b/src/environments/environment.test.ts index 19eec26a14..2cdbee9c29 100644 --- a/src/environments/environment.test.ts +++ b/src/environments/environment.test.ts @@ -283,4 +283,8 @@ export const environment: BuildConfig = { enabled: false, mathjax: false, }, + collectionSelectionSort: { + sortMetadata:"dc.title", + sortDirection:"ASC", + }, }; From e2668cdf972e22ee5142427d551e48956848e342 Mon Sep 17 00:00:00 2001 From: aroman-arvo Date: Mon, 13 Feb 2023 12:22:07 +0100 Subject: [PATCH 19/45] DS-8408 - lint errors --- .../dso-selector/dso-selector/dso-selector.component.ts | 2 +- src/config/default-app-config.ts | 4 ++-- src/config/discovery-sort.config.ts | 2 +- src/environments/environment.test.ts | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts b/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts index 52ca9224b1..05fb512c9a 100644 --- a/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts +++ b/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts @@ -228,7 +228,7 @@ export class DSOSelectorComponent implements OnInit, OnDestroy { */ search(query: string, page: number, useCache: boolean = true): Observable>>> { // default sort is only used when there is not query - var efectiveSort=query?null:this.sort; + var efectiveSort=query ? null : this.sort; return this.searchService.search( new PaginatedSearchOptions({ query: query, diff --git a/src/config/default-app-config.ts b/src/config/default-app-config.ts index 095a20a4e5..89a627f459 100644 --- a/src/config/default-app-config.ts +++ b/src/config/default-app-config.ts @@ -425,7 +425,7 @@ export class DefaultAppConfig implements AppConfig { // Configuration that determines the metadata sorting of community and collection edition and creation when there are not a search query. collectionSelectionSort: DiscoverySortConfig = { - sortMetadata:"dc.title", - sortDirection:"ASC", + sortMetadata:'dc.title', + sortDirection:'ASC', }; } diff --git a/src/config/discovery-sort.config.ts b/src/config/discovery-sort.config.ts index 02428f70a8..3f08b3fb17 100644 --- a/src/config/discovery-sort.config.ts +++ b/src/config/discovery-sort.config.ts @@ -1,7 +1,7 @@ import { Config } from './config.interface'; /** - * Config that determines a metadata sorting config. + * Config that determines a metadata sorting config. * It's created mainly to sort by metadata community and collection edition and creation */ export class DiscoverySortConfig implements Config { diff --git a/src/environments/environment.test.ts b/src/environments/environment.test.ts index c352cdca92..8b132dab60 100644 --- a/src/environments/environment.test.ts +++ b/src/environments/environment.test.ts @@ -298,8 +298,8 @@ export const environment: BuildConfig = { mathjax: false, }, collectionSelectionSort: { - sortMetadata:"dc.title", - sortDirection:"ASC", + sortMetadata:'dc.title', + sortDirection:'ASC', }, vocabularies: [ From 0121e6d895de30c6c1054b8087fa6ecb1b7dd0bd Mon Sep 17 00:00:00 2001 From: aroman-arvo Date: Mon, 13 Feb 2023 12:34:13 +0100 Subject: [PATCH 20/45] DS-8408 - more lint problems --- .../shared/dso-selector/dso-selector/dso-selector.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts b/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts index 05fb512c9a..fe64c0a41e 100644 --- a/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts +++ b/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts @@ -228,7 +228,7 @@ export class DSOSelectorComponent implements OnInit, OnDestroy { */ search(query: string, page: number, useCache: boolean = true): Observable>>> { // default sort is only used when there is not query - var efectiveSort=query ? null : this.sort; + let efectiveSort = query ? null : this.sort; return this.searchService.search( new PaginatedSearchOptions({ query: query, From 742922dba04f3a189bdfab80bd2a57093adcb142 Mon Sep 17 00:00:00 2001 From: aroman-arvo Date: Mon, 13 Feb 2023 19:32:47 +0100 Subject: [PATCH 21/45] DS-8408: Test cases and some fixes or comcol ordering --- config/config.example.yml | 6 +-- .../dso-selector.component.spec.ts | 40 ++++++++++++++++++- ...te-collection-parent-selector.component.ts | 4 +- ...ate-community-parent-selector.component.ts | 5 ++- .../create-item-parent-selector.component.ts | 3 ++ .../dso-selector-modal-wrapper.component.ts | 5 +-- .../edit-collection-selector.component.ts | 5 ++- .../edit-community-selector.component.ts | 5 ++- .../scope-selector-modal.component.ts | 7 ++++ src/config/app-config.interface.ts | 2 +- src/config/default-app-config.ts | 4 +- src/config/discovery-sort.config.ts | 2 +- src/environments/environment.test.ts | 4 +- 13 files changed, 75 insertions(+), 17 deletions(-) diff --git a/config/config.example.yml b/config/config.example.yml index 5fad57c654..7c784b4a8e 100644 --- a/config/config.example.yml +++ b/config/config.example.yml @@ -371,6 +371,6 @@ vocabularies: enabled: true # Default collection/community sorting order at Advanced search, Create/update community and collection when there are not a query. -collectionSelectionSort: - sortMetadata: "dc.title" - sortDirection: "ASC" \ No newline at end of file +comcolSelectionSort: + sortMetadata: 'dc.title' + sortDirection: 'ASC' \ No newline at end of file diff --git a/src/app/shared/dso-selector/dso-selector/dso-selector.component.spec.ts b/src/app/shared/dso-selector/dso-selector/dso-selector.component.spec.ts index 7c28859388..e2acd17bc0 100644 --- a/src/app/shared/dso-selector/dso-selector/dso-selector.component.spec.ts +++ b/src/app/shared/dso-selector/dso-selector/dso-selector.component.spec.ts @@ -11,6 +11,7 @@ import { PaginatedSearchOptions } from '../../search/models/paginated-search-opt import { hasValue } from '../../empty.util'; import { createPaginatedList } from '../../testing/utils.test'; import { NotificationsService } from '../../notifications/notifications.service'; +import { SortDirection, SortOptions } from '../../../core/cache/models/sort-options.model'; describe('DSOSelectorComponent', () => { let component: DSOSelectorComponent; @@ -34,7 +35,7 @@ describe('DSOSelectorComponent', () => { ]; const searchService = { - search: (options: PaginatedSearchOptions) => { + search: (options: PaginatedSearchOptions, responseMsToLive?: number, useCachedVersionIfAvailable = true) => { if (hasValue(options.query) && options.query.startsWith('search.resourceid')) { return createSuccessfulRemoteDataObject$(createPaginatedList([searchResult])); } else if (options.pagination.currentPage === 1) { @@ -120,6 +121,43 @@ describe('DSOSelectorComponent', () => { }); }); + describe('search', () => { + beforeEach(() => { + spyOn(searchService, 'search').and.callThrough(); + }); + + it('should specify how to sort if no query is given', () => { + component.sort = new SortOptions('dc.title', SortDirection.ASC); + component.search(undefined, 0); + + expect(searchService.search).toHaveBeenCalledWith( + jasmine.objectContaining({ + query: undefined, + sort: jasmine.objectContaining({ + field: 'dc.title', + direction: SortDirection.ASC, + }), + }), + null, + true + ); + }); + + it('should not specify how to sort if a query is given', () => { + component.sort = new SortOptions('dc.title', SortDirection.ASC); + component.search('testQuery', 0); + + expect(searchService.search).toHaveBeenCalledWith( + jasmine.objectContaining({ + query: 'testQuery', + sort: null, + }), + null, + true + ); + }); + }); + describe('when search returns an error', () => { beforeEach(() => { spyOn(searchService, 'search').and.returnValue(createFailedRemoteDataObject$()); diff --git a/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.ts index 8b38b62378..e0b7c1675b 100644 --- a/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.ts @@ -8,7 +8,8 @@ import { getCollectionCreateRoute, COLLECTION_PARENT_PARAMETER } from '../../../../collection-page/collection-page-routing-paths'; - +import { SortDirection, SortOptions } from '../../../../core/cache/models/sort-options.model'; +import { environment } from '../../../../../environments/environment'; /** * Component to wrap a list of existing communities inside a modal * Used to choose a community from to create a new collection in @@ -23,6 +24,7 @@ export class CreateCollectionParentSelectorComponent extends DSOSelectorModalWra selectorTypes = [DSpaceObjectType.COMMUNITY]; action = SelectorActionType.CREATE; header = 'dso-selector.create.collection.sub-level'; + defaultSort = new SortOptions(environment.comcolSelectionSort.sortField, environment.comcolSelectionSort.sortDirection as SortDirection); constructor(protected activeModal: NgbActiveModal, protected route: ActivatedRoute, private router: Router) { super(activeModal, route); diff --git a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts index a7f583df50..005c0e5f23 100644 --- a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts @@ -12,6 +12,8 @@ import { getCommunityCreateRoute, COMMUNITY_PARENT_PARAMETER } from '../../../../community-page/community-page-routing-paths'; +import { SortDirection, SortOptions } from '../../../../core/cache/models/sort-options.model'; +import { environment } from '../../../../../environments/environment'; /** * Component to wrap a button - for top communities - @@ -29,7 +31,8 @@ export class CreateCommunityParentSelectorComponent extends DSOSelectorModalWrap objectType = DSpaceObjectType.COMMUNITY; selectorTypes = [DSpaceObjectType.COMMUNITY]; action = SelectorActionType.CREATE; - + defaultSort = new SortOptions(environment.comcolSelectionSort.sortField, environment.comcolSelectionSort.sortDirection as SortDirection); + constructor(protected activeModal: NgbActiveModal, protected route: ActivatedRoute, private router: Router) { super(activeModal, route); } diff --git a/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component.ts index b109be0af2..ed8a7b0780 100644 --- a/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component.ts @@ -4,6 +4,8 @@ import { DSpaceObjectType } from '../../../../core/shared/dspace-object-type.mod import { DSpaceObject } from '../../../../core/shared/dspace-object.model'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { DSOSelectorModalWrapperComponent, SelectorActionType } from '../dso-selector-modal-wrapper.component'; +import { SortDirection, SortOptions } from '../../../../core/cache/models/sort-options.model'; +import { environment } from '../../../../../environments/environment'; /** * Component to wrap a list of existing collections inside a modal @@ -21,6 +23,7 @@ export class CreateItemParentSelectorComponent extends DSOSelectorModalWrapperCo selectorTypes = [DSpaceObjectType.COLLECTION]; action = SelectorActionType.CREATE; header = 'dso-selector.create.item.sub-level'; + defaultSort = new SortOptions(environment.comcolSelectionSort.sortField, environment.comcolSelectionSort.sortDirection as SortDirection); /** * If present this value is used to filter collection list by entity type diff --git a/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.ts b/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.ts index fcb8aea9d2..3f81687c9f 100644 --- a/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.ts @@ -5,8 +5,7 @@ import { RemoteData } from '../../../core/data/remote-data'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { DSpaceObjectType } from '../../../core/shared/dspace-object-type.model'; import { hasValue, isNotEmpty } from '../../empty.util'; -import { SortDirection, SortOptions } from '../../../core/cache/models/sort-options.model'; -import { environment } from '../../../../environments/environment'; +import { SortOptions } from '../../../core/cache/models/sort-options.model'; export enum SelectorActionType { CREATE = 'create', @@ -54,7 +53,7 @@ export abstract class DSOSelectorModalWrapperComponent implements OnInit { /** * Default DSO ordering */ - defaultSort = new SortOptions(environment.collectionSelectionSort.sortMetadata, environment.collectionSelectionSort.sortDirection as SortDirection); + defaultSort: SortOptions; constructor(protected activeModal: NgbActiveModal, protected route: ActivatedRoute) { } diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.ts index cfc2ea282d..ed117995b8 100644 --- a/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.ts @@ -8,6 +8,8 @@ import { SelectorActionType } from '../dso-selector-modal-wrapper.component'; import { getCollectionEditRoute } from '../../../../collection-page/collection-page-routing-paths'; +import { SortDirection, SortOptions } from '../../../../core/cache/models/sort-options.model'; +import { environment } from '../../../../../environments/environment'; /** * Component to wrap a list of existing collections inside a modal @@ -22,7 +24,8 @@ export class EditCollectionSelectorComponent extends DSOSelectorModalWrapperComp objectType = DSpaceObjectType.COLLECTION; selectorTypes = [DSpaceObjectType.COLLECTION]; action = SelectorActionType.EDIT; - + defaultSort = new SortOptions(environment.comcolSelectionSort.sortField, environment.comcolSelectionSort.sortDirection as SortDirection); + constructor(protected activeModal: NgbActiveModal, protected route: ActivatedRoute, private router: Router) { super(activeModal, route); } diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.ts index d73a7b48c5..ce09cd498e 100644 --- a/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.ts @@ -8,6 +8,8 @@ import { SelectorActionType } from '../dso-selector-modal-wrapper.component'; import { getCommunityEditRoute } from '../../../../community-page/community-page-routing-paths'; +import { SortDirection, SortOptions } from '../../../../core/cache/models/sort-options.model'; +import { environment } from '../../../../../environments/environment'; /** * Component to wrap a list of existing communities inside a modal @@ -23,7 +25,8 @@ export class EditCommunitySelectorComponent extends DSOSelectorModalWrapperCompo objectType = DSpaceObjectType.COMMUNITY; selectorTypes = [DSpaceObjectType.COMMUNITY]; action = SelectorActionType.EDIT; - + defaultSort = new SortOptions(environment.comcolSelectionSort.sortField, environment.comcolSelectionSort.sortDirection as SortDirection); + constructor(protected activeModal: NgbActiveModal, protected route: ActivatedRoute, private router: Router) { super(activeModal, route); } diff --git a/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.ts b/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.ts index 86c3010287..3301435956 100644 --- a/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.ts +++ b/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.ts @@ -4,6 +4,8 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { DSpaceObjectType } from '../../../core/shared/dspace-object-type.model'; import { DSOSelectorModalWrapperComponent, SelectorActionType } from '../../dso-selector/modal-wrappers/dso-selector-modal-wrapper.component'; import { DSpaceObject } from '../../../core/shared/dspace-object.model'; +import { SortDirection, SortOptions } from '../../../core/cache/models/sort-options.model'; +import { environment } from '../../../../environments/environment'; /** * Component to wrap a button - to select the entire repository - @@ -33,6 +35,11 @@ export class ScopeSelectorModalComponent extends DSOSelectorModalWrapperComponen */ scopeChange = new EventEmitter(); + /** + * Default DSO ordering + */ + defaultSort = new SortOptions(environment.comcolSelectionSort.sortField, environment.comcolSelectionSort.sortDirection as SortDirection); + constructor(protected activeModal: NgbActiveModal, protected route: ActivatedRoute) { super(activeModal, route); } diff --git a/src/config/app-config.interface.ts b/src/config/app-config.interface.ts index 1bc3e33b8a..e3f8988744 100644 --- a/src/config/app-config.interface.ts +++ b/src/config/app-config.interface.ts @@ -47,7 +47,7 @@ interface AppConfig extends Config { info: InfoConfig; markdown: MarkdownConfig; vocabularies: FilterVocabularyConfig[]; - collectionSelectionSort: DiscoverySortConfig; + comcolSelectionSort: DiscoverySortConfig; } /** diff --git a/src/config/default-app-config.ts b/src/config/default-app-config.ts index 89a627f459..67c2feada8 100644 --- a/src/config/default-app-config.ts +++ b/src/config/default-app-config.ts @@ -424,8 +424,8 @@ export class DefaultAppConfig implements AppConfig { ]; // Configuration that determines the metadata sorting of community and collection edition and creation when there are not a search query. - collectionSelectionSort: DiscoverySortConfig = { - sortMetadata:'dc.title', + comcolSelectionSort: DiscoverySortConfig = { + sortField:'dc.title', sortDirection:'ASC', }; } diff --git a/src/config/discovery-sort.config.ts b/src/config/discovery-sort.config.ts index 3f08b3fb17..c0d5e5e391 100644 --- a/src/config/discovery-sort.config.ts +++ b/src/config/discovery-sort.config.ts @@ -6,7 +6,7 @@ import { Config } from './config.interface'; */ export class DiscoverySortConfig implements Config { - public sortMetadata: string; + public sortField: string; /** * ASC / DESC values expected */ diff --git a/src/environments/environment.test.ts b/src/environments/environment.test.ts index 8b132dab60..08d7739f7d 100644 --- a/src/environments/environment.test.ts +++ b/src/environments/environment.test.ts @@ -297,8 +297,8 @@ export const environment: BuildConfig = { enabled: false, mathjax: false, }, - collectionSelectionSort: { - sortMetadata:'dc.title', + comcolSelectionSort: { + sortField:'dc.title', sortDirection:'ASC', }, From 9a2b885501dddda76ead69184ce48680cd791e28 Mon Sep 17 00:00:00 2001 From: aroman-arvo Date: Mon, 13 Feb 2023 19:38:32 +0100 Subject: [PATCH 22/45] DS-8498: ling fixes --- .../create-community-parent-selector.component.ts | 2 +- .../edit-collection-selector.component.ts | 2 +- .../edit-community-selector.component.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts index 005c0e5f23..77458d9802 100644 --- a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts @@ -32,7 +32,7 @@ export class CreateCommunityParentSelectorComponent extends DSOSelectorModalWrap selectorTypes = [DSpaceObjectType.COMMUNITY]; action = SelectorActionType.CREATE; defaultSort = new SortOptions(environment.comcolSelectionSort.sortField, environment.comcolSelectionSort.sortDirection as SortDirection); - + constructor(protected activeModal: NgbActiveModal, protected route: ActivatedRoute, private router: Router) { super(activeModal, route); } diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.ts index ed117995b8..fd54cd44ed 100644 --- a/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.ts @@ -25,7 +25,7 @@ export class EditCollectionSelectorComponent extends DSOSelectorModalWrapperComp selectorTypes = [DSpaceObjectType.COLLECTION]; action = SelectorActionType.EDIT; defaultSort = new SortOptions(environment.comcolSelectionSort.sortField, environment.comcolSelectionSort.sortDirection as SortDirection); - + constructor(protected activeModal: NgbActiveModal, protected route: ActivatedRoute, private router: Router) { super(activeModal, route); } diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.ts index ce09cd498e..cf2f97c6d3 100644 --- a/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.ts @@ -26,7 +26,7 @@ export class EditCommunitySelectorComponent extends DSOSelectorModalWrapperCompo selectorTypes = [DSpaceObjectType.COMMUNITY]; action = SelectorActionType.EDIT; defaultSort = new SortOptions(environment.comcolSelectionSort.sortField, environment.comcolSelectionSort.sortDirection as SortDirection); - + constructor(protected activeModal: NgbActiveModal, protected route: ActivatedRoute, private router: Router) { super(activeModal, route); } From 1d00b431acd74895064fc56ab57b842e0f8e5106 Mon Sep 17 00:00:00 2001 From: cris Date: Tue, 14 Feb 2023 03:18:28 +0000 Subject: [PATCH 23/45] aria-label added to edit, view and delete button --- .../workspaceitem/workspaceitem-actions.component.html | 5 ++++- src/assets/i18n/en.json5 | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.html b/src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.html index c658651790..f789f4df47 100644 --- a/src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.html +++ b/src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.html @@ -2,18 +2,21 @@ {{'submission.workflow.generic.edit' | translate}} - + \ No newline at end of file diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5 index fa6f2694fa..3491c066a1 100644 --- a/src/assets/i18n/en.json5 +++ b/src/assets/i18n/en.json5 @@ -4635,7 +4635,7 @@ "submission.workflow.generic.delete": "Delete", - "submission.workflow.generic.delete-help": "If you would to discard this item, select \"Delete\". You will then be asked to confirm it.", + "submission.workflow.generic.delete-help": "Select this option if you would to discard this item, select \"Delete\". You will then be asked to confirm it.", "submission.workflow.generic.edit": "Edit", From 938bf33ad24bc8d0545c8fc936bfc6bcaadf93d0 Mon Sep 17 00:00:00 2001 From: aroman-arvo Date: Wed, 15 Feb 2023 19:20:20 +0100 Subject: [PATCH 24/45] DS-8404 - fix config param name --- config/config.example.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.example.yml b/config/config.example.yml index 7c784b4a8e..f1e6be76aa 100644 --- a/config/config.example.yml +++ b/config/config.example.yml @@ -372,5 +372,5 @@ vocabularies: # Default collection/community sorting order at Advanced search, Create/update community and collection when there are not a query. comcolSelectionSort: - sortMetadata: 'dc.title' + sortField: 'dc.title' sortDirection: 'ASC' \ No newline at end of file From d1ec9897b154af06df41674504169ba45d24d06c Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Fri, 17 Feb 2023 10:35:32 -0600 Subject: [PATCH 25/45] Update version tag for release --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 184f1a5647..56ad493a2b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dspace-angular", - "version": "7.5.0-next", + "version": "7.5.0", "scripts": { "ng": "ng", "config:watch": "nodemon", From bbec2fd038e11e65495c3bae6dfd09b6b20cdcde Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Fri, 17 Feb 2023 10:48:04 -0600 Subject: [PATCH 26/45] Update version tag for development of next release --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 56ad493a2b..9249884c8e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dspace-angular", - "version": "7.5.0", + "version": "7.6.0-next", "scripts": { "ng": "ng", "config:watch": "nodemon", From 6078ca9e8a7710de9caaf83ee67b6470b59c2670 Mon Sep 17 00:00:00 2001 From: Leonardo Guerrero Date: Fri, 17 Feb 2023 21:57:49 -0500 Subject: [PATCH 27/45] update es.json5 --- src/assets/i18n/es.json5 | 700 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 687 insertions(+), 13 deletions(-) diff --git a/src/assets/i18n/es.json5 b/src/assets/i18n/es.json5 index 3184e4f22b..7d7e74e6ea 100644 --- a/src/assets/i18n/es.json5 +++ b/src/assets/i18n/es.json5 @@ -169,7 +169,7 @@ "admin.registries.bitstream-formats.edit.success.head": "Éxito", // "admin.registries.bitstream-formats.edit.supportLevel.hint": "The level of support your institution pledges for this format.", - "admin.registries.bitstream-formats.edit.supportLevel.hint": "El nivel de apoyo que su institución promete para este formato.", + "admin.registries.bitstream-formats.edit.supportLevel.hint": "El nivel de soporte que su institución promete para este formato.", // "admin.registries.bitstream-formats.edit.supportLevel.label": "Support level", "admin.registries.bitstream-formats.edit.supportLevel.label": "Nivel de soporte", @@ -309,13 +309,13 @@ "admin.registries.schema.notification.deleted.success": "{{ amount }} esquemas de metadatos eliminados correctamente", // "admin.registries.schema.notification.edited": "Successfully edited metadata schema \"{{prefix}}\"", - "admin.registries.schema.notification.edited": "Esquema de metadatos editado correctamente \"{{ prefix }}\"", + "admin.registries.schema.notification.edited": "Esquema de metadatos \"{{ prefix }}\" editado correctamente", // "admin.registries.schema.notification.failure": "Error", "admin.registries.schema.notification.failure": "Error", // "admin.registries.schema.notification.field.created": "Successfully created metadata field \"{{field}}\"", - "admin.registries.schema.notification.field.created": "Campo de metadatos creado correctamente \"{{ field }}\"", + "admin.registries.schema.notification.field.created": "Campo de metadatos \"{{ field }}\" creado correctamente", // "admin.registries.schema.notification.field.deleted.failure": "Failed to delete {{amount}} metadata fields", "admin.registries.schema.notification.field.deleted.failure": "No se pudieron borrar {{ amount }} campos de metadatos", @@ -324,7 +324,7 @@ "admin.registries.schema.notification.field.deleted.success": "{{ amount }} campos de metadatos eliminados correctamente", // "admin.registries.schema.notification.field.edited": "Successfully edited metadata field \"{{field}}\"", - "admin.registries.schema.notification.field.edited": "Campo de metadatos editado correctamente \"{{ field }}\"", + "admin.registries.schema.notification.field.edited": "Campo de metadatos \"{{ field }}\" editado correctamente", // "admin.registries.schema.notification.success": "Success", "admin.registries.schema.notification.success": "Éxito", @@ -655,7 +655,7 @@ // "admin.access-control.groups.form.members-list.table.edit.buttons.remove": "Remove member with name \"{{name}}\"", "admin.access-control.groups.form.members-list.table.edit.buttons.remove": "Eliminar miembro con nombre \"{{ name }}\"", - +// AQUI // "admin.access-control.groups.form.members-list.notification.success.addMember": "Successfully added member: \"{{name}}\"", "admin.access-control.groups.form.members-list.notification.success.addMember": "Miembro agregado exitosamente: \"{{ name }}\"", @@ -746,7 +746,14 @@ // "admin.access-control.groups.form.return": "Back", "admin.access-control.groups.form.return": "Atrás", + // "admin.access-control.groups.form.tooltip.editGroupPage": "On this page, you can modify the properties and members of a group. In the top section, you can edit the group name and description, unless this is an admin group for a collection or community, in which case the group name and description are auto-generated and cannot be edited. In the following sections, you can edit group membership. See [the wiki](https://wiki.lyrasis.org/display/DSDOC7x/Create+or+manage+a+user+group) for more details.", + "admin.access-control.groups.form.tooltip.editGroupPage": "En esta página, puede modificar las propiedades y miembros de un grupo. En la sección superior, puede editar el nombre del grupo y la descripción, a menos que este sea un grupo de administración de una colección o comunidad, en cuyo caso el nombre y descripción del grupo fueron auto-generadas y no podrán ser editadas. En las secciones siguientes, puede editar la afiliación al grupo. Para más detalles ver [la wiki](https://wiki.lyrasis.org/display/DSDOC7x/Create+or+manage+a+user+group.", + // "admin.access-control.groups.form.tooltip.editGroup.addEpeople": "To add or remove an EPerson to/from this group, either click the 'Browse All' button or use the search bar below to search for users (use the dropdown to the left of the search bar to choose whether to search by metadata or by email). Then click the plus icon for each user you wish to add in the list below, or the trash can icon for each user you wish to remove. The list below may have several pages: use the page controls below the list to navigate to the next pages. Once you are ready, save your changes by clicking the 'Save' button in the top section.", + "admin.access-control.groups.form.tooltip.editGroup.addEpeople": "Para agregar o remover una persona en este grupo, pulse el botón ‘Examinar todo’ o utilice la barra de búsqueda de abajo para buscar los usuario (Use el desplegable que se encuentra a la derecha de la barra de búsqueda para seleccionar entre buscar por metadato o por correo electrónico). Posteriormente pulse el botón con el icono más por cada usuario que desea agregar a la lista, o el icono de papelera por cada usuario que desea remover. La lista puede contener varias páginas: utilice los controles de paginación debajo de la lista, para navegar a las siguientes páginas. Cuando haya finalizado, guarde sus cambios pulsando el botón ‘Guardar’ ubicado en la parte superior de la sección.", + + // "admin.access-control.groups.form.tooltip.editGroup.addSubgroups": "To add or remove a Subgroup to/from this group, either click the 'Browse All' button or use the search bar below to search for subgroups. Then click the plus icon for each subgroup you wish to add in the list below, or the trash can icon for each subgroup you wish to remove. The list below may have several pages: use the page controls below the list to navigate to the next pages. Once you are ready, save your changes by clicking the 'Save' button in the top section.", + "admin.access-control.groups.form.tooltip.editGroup.addSubgroups": "Para agregar o remover un sub-grupo en este grupo, pulse el botón ‘Examinar todo’ o utilice la barra de búsqueda de abajo para buscar los subgrupos- Posteriormente pulse el botón con el icono más por cada sub-grupo que desea agregar a la lista, o el icono de papelera por cada sub-grupo que desea remover. La lista puede contener varias páginas: utilice los controles de paginación debajo de la lista, para navegar a las siguientes páginas. Cuando haya finalizado, guarde sus cambios pulsando el botón ‘Guardar’ ubicado en la parte superior de la sección.", // "admin.search.breadcrumbs": "Administrative Search", "admin.search.breadcrumbs": "Búsqueda administrativa", @@ -796,12 +803,21 @@ // "admin.workflow.item.workflow": "Workflow", "admin.workflow.item.workflow": "Flujo de trabajo", + // "admin.workflow.item.workspace": "Workspace", + "admin.workflow.item.workspace": "Espacio de trabajo", + // "admin.workflow.item.delete": "Delete", "admin.workflow.item.delete": "Borrar", // "admin.workflow.item.send-back": "Send back", "admin.workflow.item.send-back": "Enviar de vuelta", + // "admin.workflow.item.policies": "Policies", + "admin.workflow.item.policies": "Políticas", + + // "admin.workflow.item.supervision": "Supervision", + "admin.workflow.item.supervision": "Supervisión", + // "admin.metadata-import.breadcrumbs": "Import Metadata", @@ -861,6 +877,101 @@ // "admin.metadata-import.page.validateOnly.hint": "When selected, the uploaded CSV will be validated. You will receive a report of detected changes, but no changes will be saved.", "admin.metadata-import.page.validateOnly.hint": "Al seleccionar, se validará el CSV subido. Recibirá un informe con los cambios detectados, pero no se efectuarán dichos cambios.", + // "advanced-workflow-action.rating.form.rating.label": "Rating", + "advanced-workflow-action.rating.form.rating.label": "Evaluación", + + // "advanced-workflow-action.rating.form.rating.error": "You must rate the item", + "advanced-workflow-action.rating.form.rating.error": "Usted debe evaluar el ítem", + + // "advanced-workflow-action.rating.form.review.label": "Review", + "advanced-workflow-action.rating.form.review.label": "Revisión", + + // "advanced-workflow-action.rating.form.review.error": "You must enter a review to submit this rating", + "advanced-workflow-action.rating.form.review.error": "Debe ingresar una revisión para enviar esta evaluación", + + // "advanced-workflow-action.rating.description": "Please select a rating below", + "advanced-workflow-action.rating.description": "Por favor, a continuación seleccione una evaluación", + + // "advanced-workflow-action.rating.description-requiredDescription": "Please select a rating below and also add a review", + "advanced-workflow-action.rating.description-requiredDescription": "Por favor, seleccione una evaluación y también agregue una revisión", + + + // "advanced-workflow-action.select-reviewer.description-single": "Please select a single reviewer below before submitting", + "advanced-workflow-action.select-reviewer.description-single": "Por favor, seleccione un revisor antes de realizar el envío", + + // "advanced-workflow-action.select-reviewer.description-multiple": "Please select one or more reviewers below before submitting", + "advanced-workflow-action.select-reviewer.description-multiple": "Por favor, seleccione uno o mas revisores antes de realizar el envío", + + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.head": "EPeople", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.head": "Usuario", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.search.head": "Add EPeople", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.search.head": "Agregar usuario", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.button.see-all": "Browse All", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.button.see-all": "Explorar todo", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.headMembers": "Current Members", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.headMembers": "Miembros actuales", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.search.scope.metadata": "Metadata", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.search.scope.metadata": "Metadatos", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.search.scope.email": "E-mail (exact)", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.search.scope.email": "Correo electrónico (exacto)", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.search.button": "Search", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.search.button": "Buscar", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.id": "ID", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.id": "ID", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.name": "Name", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.name": "Nombre", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.identity": "Identity", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.identity": "Identidad", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.email": "Email", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.email": "Correo electrónico", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.netid": "NetID", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.netid": "NetID", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.edit": "Remove / Add", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.edit": "Eliminar / Agregar", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.edit.buttons.remove": "Remove member with name \"{{name}}\"", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.edit.buttons.remove": "Eliminar miembro con nombre \"{{name}}\"", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.notification.success.addMember": "Successfully added member: \"{{name}}\"", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.notification.success.addMember": "Miembro agregado exitosamente: \"{{name}}\"", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.notification.failure.addMember": "Failed to add member: \"{{name}}\"", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.notification.failure.addMember": "Error al agregar miembro: \"{{name}}\"", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.notification.success.deleteMember": "Successfully deleted member: \"{{name}}\"", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.notification.success.deleteMember": "Miembro borrado exitosamente: \"{{name}}\"", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.notification.failure.deleteMember": "Failed to delete member: \"{{name}}\"", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.notification.failure.deleteMember": "No fue posible borrar el miembro: \"{{name}}\"", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.edit.buttons.add": "Add member with name \"{{name}}\"", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.edit.buttons.add": "Agregar miembro con nombre \"{{name}}\"", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.notification.failure.noActiveGroup": "No current active group, submit a name first.", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.notification.failure.noActiveGroup": "Actualmente no hay un grupo activo, primero envíe un nombre.", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.no-members-yet": "No members in group yet, search and add.", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.no-members-yet": "Aún no hay miembros en el grupo, busque y agregue.", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.no-items": "No EPeople found in that search", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.no-items": "No se encontró ningún usuario en la búsqueda", + + // "advanced-workflow-action.select-reviewer.no-reviewer-selected.error": "No reviewer selected.", + "advanced-workflow-action.select-reviewer.no-reviewer-selected.error": "Ningún revisor selecionado.", + // "admin.batch-import.page.validateOnly.hint": "When selected, the uploaded ZIP will be validated. You will receive a report of detected changes, but no changes will be saved.", "admin.batch-import.page.validateOnly.hint": "Al seleccionar, se validará el archivo ZIP subido. Recibirá un informe con los cambios detectados, pero no se efectuarán dichos cambios.", @@ -1158,10 +1269,23 @@ "browse.title.page": "Examinando {{ collection }} por {{ field }} {{ value }}", + // "search.browse.item-back": "Back to Results", + "search.browse.item-back": "Volver a los resultados", + + // "chips.remove": "Remove chip", "chips.remove": "Quitar chip", + // "claimed-approved-search-result-list-element.title": "Approved", + "claimed-approved-search-result-list-element.title": "Aprobado", + + // "claimed-declined-search-result-list-element.title": "Rejected, sent back to submitter", + "claimed-declined-search-result-list-element.title": "Rechazado, enviar de vuelta al depositante", + + // "claimed-declined-task-search-result-list-element.title": "Declined, sent back to Review Manager's workflow", + "claimed-declined-task-search-result-list-element.title": "Declinado, enviar de vuelta al Administrador de Revisión del flujo de trabajo", + // "collection.create.head": "Create a Collection", "collection.create.head": "Crear una colección", @@ -1766,6 +1890,13 @@ "comcol-role.edit.reviewer.description": "Los revisores pueden aceptar o rechazar envíos entrantes. Sin embargo, no pueden editar los metadatos del envío.", + // "comcol-role.edit.scorereviewers.name": "Score Reviewers", + // TODO New key - Add a translation + "comcol-role.edit.scorereviewers.name": "Score Reviewers", + + // "comcol-role.edit.scorereviewers.description": "Reviewers are able to give a score to incoming submissions, this will define whether the submission will be rejected or not.", + // TODO New key - Add a translation + // "comcol-role.edit.scorereviewers.description": "Reviewers are able to give a score to incoming submissions, this will define whether the submission will be rejected or not.", // "community.form.abstract": "Short Description", "community.form.abstract": "Breve descripción", @@ -1842,7 +1973,7 @@ "cookies.consent.close": "Cerrar", // "cookies.consent.decline": "Decline", - "cookies.consent.decline": "Declinar", + "cookies.consent.decline": "Rechazar", // "cookies.consent.ok": "That's ok", "cookies.consent.ok": "Aceptar", @@ -1951,8 +2082,8 @@ // "curation-task.task.vscan.label": "Virus Scan", "curation-task.task.vscan.label": "Búsqueda de virus", - // "curation-task.task.registerdoi.label": "Register DOI", - "curation-task.task.registerdoi.label": "Registra DOI", + // "curation-task.task.register-doi.label": "Register DOI", + "curation-task.task.register-doi.label": "Registro DOI", @@ -2094,6 +2225,46 @@ // "dso-selector.results-could-not-be-retrieved": "Something went wrong, please refresh again ↻", "dso-selector.results-could-not-be-retrieved": "Algo salió mal, por favor actualice de nuevo ↻", + // "supervision-group-selector.header": "Supervision Group Selector", + "supervision-group-selector.header": "Selector de grupo de supervisión", + + // "supervision-group-selector.select.type-of-order.label": "Select a type of Order", + "supervision-group-selector.select.type-of-order.label": "Seleccione un tipo de Orden", + + // "supervision-group-selector.select.type-of-order.option.none": "NONE", + + "supervision-group-selector.select.type-of-order.option.none": "NINGUNO", + + // "supervision-group-selector.select.type-of-order.option.editor": "EDITOR", + "supervision-group-selector.select.type-of-order.option.editor": "EDITOR", + + // "supervision-group-selector.select.type-of-order.option.observer": "OBSERVER", + "supervision-group-selector.select.type-of-order.option.observer": "OBSERVADOR", + + // "supervision-group-selector.select.group.label": "Select a Group", + "supervision-group-selector.select.group.label": "Seleccione un grupo", + + // "supervision-group-selector.button.cancel": "Cancel", + "supervision-group-selector.button.cancel": "Cancelar", + + // "supervision-group-selector.button.save": "Save", + "supervision-group-selector.button.save": "Guardar", + + // "supervision-group-selector.select.type-of-order.error": "Please select a type of order", + "supervision-group-selector.select.type-of-order.error": "Por favor seleccione un tipo de orden", + + // "supervision-group-selector.select.group.error": "Please select a group", + "supervision-group-selector.select.group.error": "Por favor seleccione un grupo", + + // "supervision-group-selector.notification.create.success.title": "Successfully created supervision order for group {{ name }}", + "supervision-group-selector.notification.create.success.title": "Orden de supervisión creada exitosamente para el grupo {{ name }}", + + // "supervision-group-selector.notification.create.failure.title": "Error", + "supervision-group-selector.notification.create.failure.title": "Error", + + // "supervision-group-selector.notification.create.already-existing" : "A supervision order already exists on this item for selected group", + "supervision-group-selector.notification.create.already-existing" : "Ya existe una orden de supervisión para este ítem en el grupo selecionado", + // "confirmation-modal.export-metadata.header": "Export metadata for {{ dsoName }}", "confirmation-modal.export-metadata.header": "Exportar metadatos para {{ dsoName }}", @@ -2142,6 +2313,17 @@ // "confirmation-modal.delete-profile.confirm": "Delete", "confirmation-modal.delete-profile.confirm": "Borrar", + // "confirmation-modal.delete-subscription.header": "Delete Subscription", + "confirmation-modal.delete-subscription.header": "Borrar suscripción", + + // "confirmation-modal.delete-subscription.info": "Are you sure you want to delete subscription for \"{{ dsoName }}\"", + "confirmation-modal.delete-subscription.info": "Esta usted seguro que desea borrar la suscripción a \"{{ dsoName }}\"", + + // "confirmation-modal.delete-subscription.cancel": "Cancel", + "confirmation-modal.delete-subscription.cancel": "Cancelar", + + // "confirmation-modal.delete-subscription.confirm": "Delete", + "confirmation-modal.delete-subscription.confirm": "Borrar", // "error.bitstream": "Error fetching bitstream", "error.bitstream": "Error al obtener el archivo", @@ -2260,8 +2442,8 @@ // "forgot-email.form.email.error.required": "Please fill in an email address", "forgot-email.form.email.error.required": "Por favor introduzca una dirección de correo electrónico", - // "forgot-email.form.email.error.pattern": "Please fill in a valid email address", - "forgot-email.form.email.error.pattern": "Por favor introduzca una dirección de correo electrónico válida", + // "forgot-email.form.email.error.not-email-form": "Please fill in a valid email address", + "forgot-email.form.email.error.not-email-form": "Por favor introduzca una dirección de correo electrónico valida", // "forgot-email.form.email.hint": "An email will be sent to this address with a further instructions.", "forgot-email.form.email.hint": "Se le enviará un mensaje a esa dirección con las instrucciones pertinentes.", @@ -2818,6 +3000,69 @@ // "item.edit.tabs.item-mapper.title": "Item Edit - Collection Mapper", "item.edit.tabs.item-mapper.title": "Edición de ítem - Mapeador de colecciones", + // "item.edit.identifiers.doi.status.UNKNOWN": "Unknown", + "item.edit.identifiers.doi.status.UNKNOWN": "Desconocido", + + // "item.edit.identifiers.doi.status.TO_BE_REGISTERED": "Queued for registration", + "item.edit.identifiers.doi.status.TO_BE_REGISTERED": "En cola para registro", + + // "item.edit.identifiers.doi.status.TO_BE_RESERVED": "Queued for reservation", + "item.edit.identifiers.doi.status.TO_BE_RESERVED": "En cola para reserva", + + // "item.edit.identifiers.doi.status.IS_REGISTERED": "Registered", + "item.edit.identifiers.doi.status.IS_REGISTERED": "Registrado", + + // "item.edit.identifiers.doi.status.IS_RESERVED": "Reserved", + "item.edit.identifiers.doi.status.IS_RESERVED": "Reservado", + + // "item.edit.identifiers.doi.status.UPDATE_RESERVED": "Reserved (update queued)", + "item.edit.identifiers.doi.status.UPDATE_RESERVED": "Reservado (actualización en cola)", + + // "item.edit.identifiers.doi.status.UPDATE_REGISTERED": "Registered (update queued)", + "item.edit.identifiers.doi.status.UPDATE_REGISTERED": "Registrado (actualización en cola)", + + // "item.edit.identifiers.doi.status.UPDATE_BEFORE_REGISTRATION": "Queued for update and registration", + "item.edit.identifiers.doi.status.UPDATE_BEFORE_REGISTRATION": "En cola para actualización y registro", + + // "item.edit.identifiers.doi.status.TO_BE_DELETED": "Queued for deletion", + "item.edit.identifiers.doi.status.TO_BE_DELETED": "En cola para eliminación", + + // "item.edit.identifiers.doi.status.DELETED": "Deleted", + "item.edit.identifiers.doi.status.DELETED": "Borrado", + + // "item.edit.identifiers.doi.status.PENDING": "Pending (not registered)", + "item.edit.identifiers.doi.status.PENDING": "Pendiente (no registrado)", + + // "item.edit.identifiers.doi.status.MINTED": "Minted (not registered)", + "item.edit.identifiers.doi.status.MINTED": "Asignado (no registrado)", + + // "item.edit.tabs.status.buttons.register-doi.label": "Register a new or pending DOI", + "item.edit.tabs.status.buttons.register-doi.label": "Registrar un nuevo DOI o uno pendiente", + + // "item.edit.tabs.status.buttons.register-doi.button": "Register DOI...", + "item.edit.tabs.status.buttons.register-doi.button": "Registrar DOI...", + + // "item.edit.register-doi.header": "Register a new or pending DOI", + "item.edit.register-doi.header": "Registrar un nuevo DOI o uno pendiente", + + // "item.edit.register-doi.description": "Review any pending identifiers and item metadata below and click Confirm to proceed with DOI registration, or Cancel to back out", + "item.edit.register-doi.description": "Revise los identificadores pendientes y los metadatos a continuación y pulse Confirmar para proceder con el registro DOI, o pulse Cancelar para devolverse", + + // "item.edit.register-doi.confirm": "Confirm", + "item.edit.register-doi.confirm": "Confirmar", + + // "item.edit.register-doi.cancel": "Cancel", + "item.edit.register-doi.cancel": "Cancelar", + + // "item.edit.register-doi.success": "DOI queued for registration successfully.", + "item.edit.register-doi.success": "Registro exitoso del DOI en cola.", + + // "item.edit.register-doi.error": "Error registering DOI", + "item.edit.register-doi.error": "Error registrando el DOI", + + // "item.edit.register-doi.to-update": "The following DOI has already been minted and will be queued for registration online", + "item.edit.register-doi.to-update": "El siguiente DOI ya ha sido asignado y estará en cola para el registro en línea", + // "item.edit.item-mapper.buttons.add": "Map item to selected collections", "item.edit.item-mapper.buttons.add": "Asignar ítem a colecciones seleccionadas", @@ -2880,6 +3125,12 @@ // "item.edit.metadata.discard-button": "Discard", "item.edit.metadata.discard-button": "Descartar", + // "item.edit.metadata.edit.buttons.confirm": "Confirm", + "item.edit.metadata.edit.buttons.confirm": "Confirmar", + + // "item.edit.metadata.edit.buttons.drag": "Drag to reorder", + "item.edit.metadata.edit.buttons.drag": "Arrastre para reordenar", + // "item.edit.metadata.edit.buttons.edit": "Edit", "item.edit.metadata.edit.buttons.edit": "Editar", @@ -2892,6 +3143,9 @@ // "item.edit.metadata.edit.buttons.unedit": "Stop editing", "item.edit.metadata.edit.buttons.unedit": "Dejar de editar", + // "item.edit.metadata.edit.buttons.virtual": "This is a virtual metadata value, i.e. a value inherited from a related entity. It can’t be modified directly. Add or remove the corresponding relationship in the \"Relationships\" tab", + "item.edit.metadata.edit.buttons.virtual": "Este es un valor de metadato virtual, es decir, un valor heredado de una entidad relacionada. Este no pude ser modificado directamente. Agregue o remueva la relación correspondiente en la pestaña \"Relaciones\"", + // "item.edit.metadata.empty": "The item currently doesn't contain any metadata. Click Add to start adding a metadata value.", "item.edit.metadata.empty": "Actualmente, el ítem no contiene metadatos. Haga clic en Agregar para comenzar a agregar un valor de metadatos.", @@ -2907,8 +3161,11 @@ // "item.edit.metadata.headers.value": "Value", "item.edit.metadata.headers.value": "Valor", + // "item.edit.metadata.metadatafield.error": "An error occurred validating the metadata field", + "item.edit.metadata.metadatafield.error": "Un error ha ocurrido al validar el campo del metadato", + // "item.edit.metadata.metadatafield.invalid": "Please choose a valid metadata field", - "item.edit.metadata.metadatafield.invalid": "Elija un campo de metadatos válido", + "item.edit.metadata.metadatafield.invalid": "Por favor, escoja un campo de metadato valido", // "item.edit.metadata.notifications.discarded.content": "Your changes were discarded. To reinstate your changes click the 'Undo' button", "item.edit.metadata.notifications.discarded.content": "Tus cambios fueron descartados. ", @@ -2940,6 +3197,9 @@ // "item.edit.metadata.reinstate-button": "Undo", "item.edit.metadata.reinstate-button": "Deshacer", + // "item.edit.metadata.reset-order-button": "Undo reorder", + "item.edit.metadata.reset-order-button": "Deshacer reordenar", + // "item.edit.metadata.save-button": "Save", "item.edit.metadata.save-button": "Guardar", @@ -3275,6 +3535,30 @@ // "item.truncatable-part.show-less": "Collapse", "item.truncatable-part.show-less": "Contraer", + // "workflow-item.search.result.delete-supervision.modal.header": "Delete Supervision Order", + "workflow-item.search.result.delete-supervision.modal.header": "Borrar Orden de Supervisión", + + // "workflow-item.search.result.delete-supervision.modal.info": "Are you sure you want to delete Supervision Order", + "workflow-item.search.result.delete-supervision.modal.info": "Esta seguro de querer borrar la Orden de Supervisión", + + // "workflow-item.search.result.delete-supervision.modal.cancel": "Cancel", + "workflow-item.search.result.delete-supervision.modal.cancel": "Cancelar", + + // "workflow-item.search.result.delete-supervision.modal.confirm": "Delete", + "workflow-item.search.result.delete-supervision.modal.confirm": "Borrar", + + // "workflow-item.search.result.notification.deleted.success": "Successfully deleted supervision order \"{{name}}\"", + "workflow-item.search.result.notification.deleted.success": "La orden de supervisión \”{{ name }}”\ ha sido borrada exitosamente", + + // "workflow-item.search.result.notification.deleted.failure": "Failed to delete supervision order \"{{name}}\"", + "workflow-item.search.result.notification.deleted.failure": "Error al borrar la orden de supervisión \”{{ name }}”\", + + // "workflow-item.search.result.list.element.supervised-by": "Supervised by:", + "workflow-item.search.result.list.element.supervised-by": "Supervisado por:", + + // "workflow-item.search.result.list.element.supervised.remove-tooltip": "Remove supervision group", + "workflow-item.search.result.list.element.supervised.remove-tooltip": "Borrar grupo de supervisión", + // "item.page.abstract": "Abstract", @@ -3622,6 +3906,89 @@ + // "itemtemplate.edit.metadata.add-button": "Add", + "itemtemplate.edit.metadata.add-button": "Agregar", + + // "itemtemplate.edit.metadata.discard-button": "Discard", + "itemtemplate.edit.metadata.discard-button": "Descartar", + + // "itemtemplate.edit.metadata.edit.buttons.confirm": "Confirm", + "itemtemplate.edit.metadata.edit.buttons.confirm": "Confirmar", + + // "itemtemplate.edit.metadata.edit.buttons.drag": "Drag to reorder", + "itemtemplate.edit.metadata.edit.buttons.drag": "Arrastre para reordenar", + + // "itemtemplate.edit.metadata.edit.buttons.edit": "Edit", + "itemtemplate.edit.metadata.edit.buttons.edit": "Editar", + + // "itemtemplate.edit.metadata.edit.buttons.remove": "Remove", + "itemtemplate.edit.metadata.edit.buttons.remove": "Eliminar", + + // "itemtemplate.edit.metadata.edit.buttons.undo": "Undo changes", + "itemtemplate.edit.metadata.edit.buttons.undo": "Deshacer cambios", + + // "itemtemplate.edit.metadata.edit.buttons.unedit": "Stop editing", + "itemtemplate.edit.metadata.edit.buttons.unedit": "Dejar de editar", + + // "itemtemplate.edit.metadata.empty": "The item template currently doesn't contain any metadata. Click Add to start adding a metadata value.", + "itemtemplate.edit.metadata.empty": "La plantilla de ítem no contiene ningún metadato. Pulse Agregar para empezar a agregar valores de metadatos.", + + // "itemtemplate.edit.metadata.headers.edit": "Edit", + "itemtemplate.edit.metadata.headers.edit": "Editar", + + // "itemtemplate.edit.metadata.headers.field": "Field", + "itemtemplate.edit.metadata.headers.field": "Campo", + + // "itemtemplate.edit.metadata.headers.language": "Lang", + "itemtemplate.edit.metadata.headers.language": "Idioma", + + // "itemtemplate.edit.metadata.headers.value": "Value", + "itemtemplate.edit.metadata.headers.value": "Valor", + + // "itemtemplate.edit.metadata.metadatafield.error": "An error occurred validating the metadata field", + "itemtemplate.edit.metadata.metadatafield.error": "Un error ha ocurrido al validar el campo del metadato", + + // "itemtemplate.edit.metadata.metadatafield.invalid": "Please choose a valid metadata field", + "itemtemplate.edit.metadata.metadatafield.invalid": "Por favor, escoja un campo de metadato valido", + + // "itemtemplate.edit.metadata.notifications.discarded.content": "Your changes were discarded. To reinstate your changes click the 'Undo' button", + "itemtemplate.edit.metadata.notifications.discarded.content": "Sus cambios fueron descartados. Para recuperar sus cambios pulse el botón 'Deshacer'", + + // "itemtemplate.edit.metadata.notifications.discarded.title": "Changed discarded", + "itemtemplate.edit.metadata.notifications.discarded.title": "Cambio descartado", + + // "itemtemplate.edit.metadata.notifications.error.title": "An error occurred", + "itemtemplate.edit.metadata.notifications.error.title": "Ocurrió un error", + + // "itemtemplate.edit.metadata.notifications.invalid.content": "Your changes were not saved. Please make sure all fields are valid before you save.", + "itemtemplate.edit.metadata.notifications.invalid.content": "Sus cambios no se guardaron. Asegúrese de que todos los campos sean válidos antes de guardar.", + + // "itemtemplate.edit.metadata.notifications.invalid.title": "Metadata invalid", + "itemtemplate.edit.metadata.notifications.invalid.title": "Metadatos inválidos", + + // "itemtemplate.edit.metadata.notifications.outdated.content": "The item template you're currently working on has been changed by another user. Your current changes are discarded to prevent conflicts", + "itemtemplate.edit.metadata.notifications.outdated.content": "La plantilla de ítem en la que usted esta trabajando actualmente ha sido cambiada por otro usuario. Sus cambios han sido descartados para evitar conflictos", + + // "itemtemplate.edit.metadata.notifications.outdated.title": "Changed outdated", + "itemtemplate.edit.metadata.notifications.outdated.title": "Cambiado obsoleto", + + // "itemtemplate.edit.metadata.notifications.saved.content": "Your changes to this item template's metadata were saved.", + "itemtemplate.edit.metadata.notifications.saved.content": "Sus cambios a los metadatos de esta plantilla de ítem han sido guardados.", + + // "itemtemplate.edit.metadata.notifications.saved.title": "Metadata saved", + "itemtemplate.edit.metadata.notifications.saved.title": "Metadatos guardados", + + // "itemtemplate.edit.metadata.reinstate-button": "Undo", + "itemtemplate.edit.metadata.reinstate-button": "Deshacer", + + // "itemtemplate.edit.metadata.reset-order-button": "Undo reorder", + "itemtemplate.edit.metadata.reset-order-button": "Deshacer reordenar", + + // "itemtemplate.edit.metadata.save-button": "Save", + "itemtemplate.edit.metadata.save-button": "Guardar", + + + // "journal.listelement.badge": "Journal", "journal.listelement.badge": "Revista", @@ -4193,6 +4560,9 @@ // "mydspace.show.workspace": "Your Submissions", "mydspace.show.workspace": "Sus envíos", + // "mydspace.show.supervisedWorkspace": "Supervised items", + "mydspace.show.supervisedWorkspace": "Ítems supervisados", + // "mydspace.status.archived": "Archived", "mydspace.status.archived": "Archivado", @@ -4234,6 +4604,9 @@ // "nav.community-browse.header": "By Community", "nav.community-browse.header": "Por comunidad", + // "nav.context-help-toggle": "Toggle context help", + "nav.context-help-toggle": "Alternar ayuda contextual", + // "nav.language": "Language switch", "nav.language": "Cambio de idioma", @@ -4264,6 +4637,9 @@ // "nav.stop-impersonating": "Stop impersonating EPerson", "nav.stop-impersonating": "Dejar de hacerse pasar por usuario", + // "nav.subscriptions" : "Subscriptions", + "nav.subscriptions" : "Suscripciones", + // "nav.toggle" : "Toggle navigation", "nav.toggle": "Alternar navegación", @@ -4807,8 +5183,11 @@ // "register-page.registration.email.error.required": "Please fill in an email address", "register-page.registration.email.error.required": "Por favor, introduzca una dirección de correo electrónico", - // "register-page.registration.email.error.pattern": "Please fill in a valid email address", - "register-page.registration.email.error.pattern": "Por favor, introduzca una dirección de correo electrónico válida", + // "register-page.registration.email.error.not-email-form": "Please fill in a valid email address.", + "register-page.registration.email.error.not-email-form": "Por favor, introduzca una dirección de correo electrónico válida.", + + // "register-page.registration.email.error.not-valid-domain": "Use email with allowed domains: {{ domains }}", + "register-page.registration.email.error.not-valid-domain": "Utilice un correo electrónico con uno de los dominos permitidos: {{ domains }}", // "register-page.registration.email.hint": "This address will be verified and used as your login name.", "register-page.registration.email.hint": "Esta dirección será verificada y utilizada como su nombre de inicio de sesión.", @@ -4834,6 +5213,9 @@ // "register-page.registration.google-recaptcha.must-accept-cookies": "In order to register you must accept the Registration and Password recovery (Google reCaptcha) cookies.", "register-page.registration.google-recaptcha.must-accept-cookies": "Para registrarse debe aceptar las cookies de Registro y recuperación de contraseña (Google reCaptcha).", + // "register-page.registration.error.maildomain": "This email address is not on the list of domains who can register. Allowed domains are {{ domains }}", + "register-page.registration.error.maildomain": "Este correo electrónico no esta en la lista de dominios que pueden registrarse. Los dominios permitidos son {{ domains }}", + // "register-page.registration.google-recaptcha.open-cookie-settings": "Open cookie settings", "register-page.registration.google-recaptcha.open-cookie-settings": "Abrir configuración de cookies", @@ -4846,6 +5228,9 @@ // "register-page.registration.google-recaptcha.notification.message.expired": "Verification expired. Please verify again.", "register-page.registration.google-recaptcha.notification.message.expired": "Verificación caducada. Verifique de nuevo.", + // "register-page.registration.info.maildomain": "Accounts can be registered for mail addresses of the domains", + "register-page.registration.info.maildomain": "Las cuentas pueden registrarse para las direcciones de correo de los dominios", + // "relationships.add.error.relationship-type.content": "No suitable match could be found for relationship type {{ type }} between the two items", "relationships.add.error.relationship-type.content": "No se pudo encontrar una coincidencia adecuada para el tipo de relación {{ type }} entre los dos ítems", @@ -5151,6 +5536,9 @@ // "search.filters.applied.f.birthDate.min": "Start birth date", "search.filters.applied.f.birthDate.min": "Fecha de nacimiento, inicial", + // "search.filters.applied.f.supervisedBy": "Supervised by", + "search.filters.applied.f.supervisedBy": "Supervisado por", + // "search.filters.applied.f.withdrawn": "Withdrawn", "search.filters.applied.f.withdrawn": "Retirado", @@ -5366,6 +5754,16 @@ // "search.filters.filter.show-tree": "Browse {{ name }} tree", "search.filters.filter.show-tree": "Examinar árbol {{ name }}", + // "search.filters.filter.supervisedBy.head": "Supervised By", + "search.filters.filter.supervisedBy.head": "Supervisado Por", + + // "search.filters.filter.supervisedBy.placeholder": "Supervised By", + "search.filters.filter.supervisedBy.placeholder": "Supervisado Por", + + // "search.filters.filter.supervisedBy.label": "Search Supervised By", + "search.filters.filter.supervisedBy.label": "Búsqueda Supervisada Por", + + // "search.filters.entityType.JournalIssue": "Journal Issue", "search.filters.entityType.JournalIssue": "Número de la revista", @@ -6209,7 +6607,23 @@ // "submission.sections.general.sections_not_valid": "There are incomplete sections.", "submission.sections.general.sections_not_valid": "Hay secciones incompletas.", + // "submission.sections.identifiers.info": "The following identifiers will be created for your item:", + "submission.sections.identifiers.info": "Se crearán los siguientes identificadores para su ítem:", + // "submission.sections.identifiers.no_handle": "No handles have been minted for this item.", + "submission.sections.identifiers.no_handle": "Ningún handle ha sido asignado a este ítem.", + + // "submission.sections.identifiers.no_doi": "No DOIs have been minted for this item.", + "submission.sections.identifiers.no_doi": "No se han asignado DOIs para este ítem.", + + // "submission.sections.identifiers.handle_label": "Handle: ", + "submission.sections.identifiers.handle_label": "Handle: ", + + // "submission.sections.identifiers.doi_label": "DOI: ", + "submission.sections.identifiers.doi_label": "DOI: ", + + // "submission.sections.identifiers.otherIdentifiers_label": "Other identifiers: ", + "submission.sections.identifiers.otherIdentifiers_label": "Otros identificadores: ", // "submission.sections.submit.progressbar.accessCondition": "Item access conditions", "submission.sections.submit.progressbar.accessCondition": "Condiciones de acceso al ítem", @@ -6232,6 +6646,9 @@ // "submission.sections.submit.progressbar.detect-duplicate": "Potential duplicates", "submission.sections.submit.progressbar.detect-duplicate": "Posibles duplicados", + // "submission.sections.submit.progressbar.identifiers": "Identifiers", + "submission.sections.submit.progressbar.identifiers": "Identificadores", + // "submission.sections.submit.progressbar.license": "Deposit license", "submission.sections.submit.progressbar.license": "Licencia de depósito", @@ -6536,6 +6953,19 @@ "submission.workflow.generic.view-help": "Seleccione esta opción para ver los metadatos del ítem.", + // "submission.workflow.generic.submit_select_reviewer": "Select Reviewer", + "submission.workflow.generic.submit_select_reviewer": "Seleccionar revisor", + + // "submission.workflow.generic.submit_select_reviewer-help": "", + "submission.workflow.generic.submit_select_reviewer-help": "", + + + // "submission.workflow.generic.submit_score": "Rate", + "submission.workflow.generic.submit_score": "Evaluar", + + // "submission.workflow.generic.submit_score-help": "", + "submission.workflow.generic.submit_score-help": "", + // "submission.workflow.tasks.claimed.approve": "Approve", "submission.workflow.tasks.claimed.approve": "Aprobar", @@ -6549,6 +6979,12 @@ // "submission.workflow.tasks.claimed.edit_help": "Select this option to change the item's metadata.", "submission.workflow.tasks.claimed.edit_help": "Seleccione esta opción para cambiar los metadatos del ítem.", + // "submission.workflow.tasks.claimed.decline": "Decline", + "submission.workflow.tasks.claimed.decline": "Rechazar", + + // "submission.workflow.tasks.claimed.decline_help": "", + "submission.workflow.tasks.claimed.decline_help": "", + // "submission.workflow.tasks.claimed.reject.reason.info": "Please enter your reason for rejecting the submission into the box below, indicating whether the submitter may fix a problem and resubmit.", "submission.workflow.tasks.claimed.reject.reason.info": "Introduzca su motivo para rechazar el envío en el cuadro a continuación, indicando si el remitente puede solucionar un problema y volver a enviarlo.", @@ -6609,6 +7045,112 @@ "submission.workspace.generic.view-help": "Seleccione esta opción para ver los metadatos del ítem.", + // "subscriptions.title": "Subscriptions", + "subscriptions.title": "Suscripciones", + + // "subscriptions.item": "Subscriptions for items", + "subscriptions.item": "Suscripciones a ítems", + + // "subscriptions.collection": "Subscriptions for collections", + "subscriptions.collection": "Suscripciones a colecciones", + + // "subscriptions.community": "Subscriptions for communities", + "subscriptions.community": "Suscripciones a comunidades", + + // "subscriptions.subscription_type": "Subscription type", + "subscriptions.subscription_type": "Tipo de suscripción", + + // "subscriptions.frequency": "Subscription frequency", + "subscriptions.frequency": "Frecuencia de la suscripción", + + // "subscriptions.frequency.D": "Daily", + "subscriptions.frequency.D": "Diaria", + + // "subscriptions.frequency.M": "Monthly", + "subscriptions.frequency.M": "Mensual", + + // "subscriptions.frequency.W": "Weekly", + "subscriptions.frequency.W": "Semanal", + + // "subscriptions.tooltip": "Subscribe", + "subscriptions.tooltip": "Suscribir", + + // "subscriptions.modal.title": "Subscriptions", + "subscriptions.modal.title": "Suscripciones", + + // "subscriptions.modal.type-frequency": "Type and frequency", + "subscriptions.modal.type-frequency": "Tipo y frecuencia", + + // "subscriptions.modal.close": "Close", + "subscriptions.modal.close": "Cerrar", + + // "subscriptions.modal.delete-info": "To remove this subscription, please visit the \"Subscriptions\" page under your user profile", + "subscriptions.modal.delete-info": "Para eliminar esta suscripción, por favor visite la página \”Suscripciones”\ en su perfil de usuario", + + // "subscriptions.modal.new-subscription-form.type.content": "Content", + "subscriptions.modal.new-subscription-form.type.content": "Contenido", + + // "subscriptions.modal.new-subscription-form.frequency.D": "Diario", + "subscriptions.modal.new-subscription-form.frequency.D": "Diario", + + // "subscriptions.modal.new-subscription-form.frequency.W": "Weekly", + "subscriptions.modal.new-subscription-form.frequency.W": "Semanal", + + // "subscriptions.modal.new-subscription-form.frequency.M": "Monthly", + "subscriptions.modal.new-subscription-form.frequency.M": "Mensual", + + // "subscriptions.modal.new-subscription-form.submit": "Submit", + "subscriptions.modal.new-subscription-form.submit": "Enviar", + + // "subscriptions.modal.new-subscription-form.processing": "Processing...", + "subscriptions.modal.new-subscription-form.processing": "Procesando...", + + // "subscriptions.modal.create.success": "Subscribed to {{ type }} successfully.", + "subscriptions.modal.create.success": "Suscrito a {{ type }} exitosamente.", + + // "subscriptions.modal.delete.success": "Subscription deleted successfully", + "subscriptions.modal.delete.success": "La suscripción fue borrada exitosamente", + + // "subscriptions.modal.update.success": "Subscription to {{ type }} updated successfully", + "subscriptions.modal.update.success": "La suscripción a {{ type }} fue exitosamente actualizada", + + // "subscriptions.modal.create.error": "An error occurs during the subscription creation", + "subscriptions.modal.create.error": "Un error ocurrió durante la creación de la suscripción", + + // "subscriptions.modal.delete.error": "An error occurs during the subscription delete", + "subscriptions.modal.delete.error": "Un error ocurrió durante la eliminación de la suscripción", + + // "subscriptions.modal.update.error": "An error occurs during the subscription update", + "subscriptions.modal.update.error": "Un error ocurrió durante la actualización de la suscripción", + + // "subscriptions.table.dso": "Subject", + "subscriptions.table.dso": "Tema", + + // "subscriptions.table.subscription_type": "Subscription Type", + "subscriptions.table.subscription_type": "Tipo de suscripción", + + // "subscriptions.table.subscription_frequency": "Subscription Frequency", + "subscriptions.table.subscription_frequency": "Frecuencia de Suscripción", + + // "subscriptions.table.action": "Action", + "subscriptions.table.action": "Acción", + + // "subscriptions.table.edit": "Edit", + "subscriptions.table.edit": "Editar", + + // "subscriptions.table.delete": "Delete", + "subscriptions.table.delete": "Borrar", + + // "subscriptions.table.not-available": "Not available", + "subscriptions.table.not-available": "No disponible", + + // "subscriptions.table.not-available-message": "The subscribed item has been deleted, or you don't currently have the permission to view it", + "subscriptions.table.not-available-message": "El ítem suscrito ha sido eliminado, o actualmente usted no tiene permisos suficiente para poder visualizarlo.", + + // "subscriptions.table.empty.message": "You do not have any subscriptions at this time. To subscribe to email updates for a Community or Collection, use the subscription button on the object's page.", + "subscriptions.table.empty.message": "Usted no tiene suscripciones. Para subscribirse a las actualizaciones por correo electrónico de una Comunidad o Colección, utilice el botón de suscripción en la página del objeto.", + + // "thumbnail.default.alt": "Thumbnail Image", "thumbnail.default.alt": "Miniatura", @@ -6693,6 +7235,9 @@ + // "supervisedWorkspace.search.results.head": "Supervised Items", + "supervisedWorkspace.search.results.head": "Ítems supervisados", + // "workspace.search.results.head": "Your submissions", "workspace.search.results.head": "Sus envíos", @@ -6702,6 +7247,9 @@ // "workflow.search.results.head": "Workflow tasks", "workflow.search.results.head": "Tareas del flujo de trabajo", + // "supervision.search.results.head": "Workflow and Workspace tasks", + "supervision.search.results.head": "Tareas del flujo de trabajo y del espacio de trabajo", + // "workflow-item.edit.breadcrumbs": "Edit workflowitem", @@ -6768,6 +7316,60 @@ // "workspace-item.view.title": "Workspace View", "workspace-item.view.title": "Vista del flujo de trabajo", + + // "workflow-item.advanced.title": "Advanced workflow", + "workflow-item.advanced.title": "Flujo de trabajo avanzado", + + + // "workflow-item.selectrevieweraction.notification.success.title": "Selected reviewer", + "workflow-item.selectrevieweraction.notification.success.title": "Revisor seleccionado", + + // "workflow-item.selectrevieweraction.notification.success.content": "The reviewer for this workflow item has been successfully selected", + "workflow-item.selectrevieweraction.notification.success.content": "El revisor para este flujo de trabajo ha sido seleccionado exitosamente", + + // "workflow-item.selectrevieweraction.notification.error.title": "Something went wrong", + "workflow-item.selectrevieweraction.notification.error.title": "Algo salió mal", + + // "workflow-item.selectrevieweraction.notification.error.content": "Couldn't select the reviewer for this workflow item", + "workflow-item.selectrevieweraction.notification.error.content": "No fue posible seleccionar el revisor para este flujo de trabajo", + + // "workflow-item.selectrevieweraction.title": "Select Reviewer", + "workflow-item.selectrevieweraction.title": "Seleccionar revisor", + + // "workflow-item.selectrevieweraction.header": "Select Reviewer", + "workflow-item.selectrevieweraction.header": "Seleccionar revisor", + + // "workflow-item.selectrevieweraction.button.cancel": "Cancel", + "workflow-item.selectrevieweraction.button.cancel": "Cancelar", + + // "workflow-item.selectrevieweraction.button.confirm": "Confirm", + "workflow-item.selectrevieweraction.button.confirm": "Confirmar", + + + // "workflow-item.scorereviewaction.notification.success.title": "Revisar evaluación", + "workflow-item.scorereviewaction.notification.success.title": "Revisar evaluación", + + // "workflow-item.scorereviewaction.notification.success.content": "The rating for this item workflow item has been successfully submitted", + "workflow-item.scorereviewaction.notification.success.content": " // "workflow-item.scorereviewaction.notification.success.content": "La evaluación para este ítem ha sido enviada exitosamente", + + // "workflow-item.scorereviewaction.notification.error.title": "Something went wrong", + "workflow-item.scorereviewaction.notification.error.title": "Algo salió mal", + + // "workflow-item.scorereviewaction.notification.error.content": "Couldn't rate this item", + "workflow-item.scorereviewaction.notification.error.content": "No fue posible evaluar este ítem", + + // "workflow-item.scorereviewaction.title": "Rate this item", + "workflow-item.scorereviewaction.title": "Evaluar este ítem", + + // "workflow-item.scorereviewaction.header": "Rate this item", + "workflow-item.scorereviewaction.header": "Evaluar este ítem", + + // "workflow-item.scorereviewaction.button.cancel": "Cancel", + "workflow-item.scorereviewaction.button.cancel": "Cancelar", + + // "workflow-item.scorereviewaction.button.confirm": "Confirm", + "workflow-item.scorereviewaction.button.confirm": "Confirmar", + // "idle-modal.header": "Session will expire soon", "idle-modal.header": "La sesión caducará pronto", @@ -7152,4 +7754,76 @@ "listable-notification-object.default-message": "Este objeto no se pudo recuperar", + // "system-wide-alert-banner.retrieval.error": "Something went wrong retrieving the system-wide alert banner", + "system-wide-alert-banner.retrieval.error": "Algo salió mal al recuperar el banner de alerta del sistema", + + // "system-wide-alert-banner.countdown.prefix": "In", + "system-wide-alert-banner.countdown.prefix": "En", + + // "system-wide-alert-banner.countdown.days": "{{days}} day(s),", + "system-wide-alert-banner.countdown.days": "{{days}} día(s),", + + // "system-wide-alert-banner.countdown.hours": "{{hours}} hour(s) and", + "system-wide-alert-banner.countdown.hours": "{{hours}} hora(s) y", + + // "system-wide-alert-banner.countdown.minutes": "{{minutes}} minute(s):", + "system-wide-alert-banner.countdown.minutes": "{{minutes}} minuto(s):", + + + + // "menu.section.system-wide-alert": "System-wide Alert", + "menu.section.system-wide-alert": "Alerta del Sistema", + + // "system-wide-alert.form.header": "System-wide Alert", + "system-wide-alert.form.header": "Alerta del Sistema", + + // "system-wide-alert-form.retrieval.error": "Something went wrong retrieving the system-wide alert", + "system-wide-alert-form.retrieval.error": "Algo salió mal al recuperar la alerta del sistema", + + // "system-wide-alert.form.cancel": "Cancel", + "system-wide-alert.form.cancel": "Cancelar", + + // "system-wide-alert.form.save": "Save", + "system-wide-alert.form.save": "Guardar", + + // "system-wide-alert.form.label.active": "ACTIVE", + "system-wide-alert.form.label.active": "ACTIVO", + + // "system-wide-alert.form.label.inactive": "INACTIVE", + "system-wide-alert.form.label.inactive": "INACTIVO", + + // "system-wide-alert.form.error.message": "The system wide alert must have a message", + "system-wide-alert.form.error.message": "La alerta de sistema debe tener un mensaje", + + // "system-wide-alert.form.label.message": "Alert message", + "system-wide-alert.form.label.message": "Mensaje de alerta", + + // "system-wide-alert.form.label.countdownTo.enable": "Enable a countdown timer", + "system-wide-alert.form.label.countdownTo.enable": "Habilitar un temporizador de cuenta regresiva", + + // "system-wide-alert.form.label.countdownTo.hint": "Hint: Set a countdown timer. When enabled, a date can be set in the future and the system-wide alert banner will perform a countdown to the set date. When this timer ends, it will disappear from the alert. The server will NOT be automatically stopped.", + "system-wide-alert.form.label.countdownTo.hint": "Sugerencia: Configure un temporizador. Cuando esté habilitado, se puede establecer una fecha en el futuro y el banner del sistema de alerta realizara una cuenta regresiva hasta la fecha establecida. Cuando finalice el temporizador, este desaparecerá de la alerta. El servidor NO se detendrá automáticamente..", + + // "system-wide-alert.form.label.preview": "System-wide alert preview", + "system-wide-alert.form.label.preview": "Vista preliminar de la alerta del sistema", + + // "system-wide-alert.form.update.success": "The system-wide alert was successfully updated", + "system-wide-alert.form.update.success": "La alerta de sistema fue actualizada exitosamente", + + // "system-wide-alert.form.update.error": "Something went wrong when updating the system-wide alert", + "system-wide-alert.form.update.error": "Algo salió mal al actualizar la alerta del sistema", + + // "system-wide-alert.form.create.success": "The system-wide alert was successfully created", + "system-wide-alert.form.create.success": "La alerta del sistema fue creada exitosamente", + + // "system-wide-alert.form.create.error": "Something went wrong when creating the system-wide alert", + "system-wide-alert.form.create.error": "Algo salió mal al crear la alerta del sistema", + + // "admin.system-wide-alert.breadcrumbs": "System-wide Alerts", + "admin.system-wide-alert.breadcrumbs": "Alertas del sistema", + + // "admin.system-wide-alert.title": "System-wide Alerts", + "admin.system-wide-alert.title": "Alertas del sistema", + + } From 9e03faac54b938942aceade612563816fb9feb4d Mon Sep 17 00:00:00 2001 From: Leonardo Guerrero Date: Fri, 17 Feb 2023 22:10:46 -0500 Subject: [PATCH 28/45] Fix some typo mistakes --- src/assets/i18n/es.json5 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/assets/i18n/es.json5 b/src/assets/i18n/es.json5 index 7d7e74e6ea..ee87c63860 100644 --- a/src/assets/i18n/es.json5 +++ b/src/assets/i18n/es.json5 @@ -3551,7 +3551,7 @@ "workflow-item.search.result.notification.deleted.success": "La orden de supervisión \”{{ name }}”\ ha sido borrada exitosamente", // "workflow-item.search.result.notification.deleted.failure": "Failed to delete supervision order \"{{name}}\"", - "workflow-item.search.result.notification.deleted.failure": "Error al borrar la orden de supervisión \”{{ name }}”\", + "workflow-item.search.result.notification.deleted.failure": "Error al borrar la orden de supervisión \”{{ name }}\”", // "workflow-item.search.result.list.element.supervised-by": "Supervised by:", "workflow-item.search.result.list.element.supervised-by": "Supervisado por:", @@ -7350,7 +7350,7 @@ "workflow-item.scorereviewaction.notification.success.title": "Revisar evaluación", // "workflow-item.scorereviewaction.notification.success.content": "The rating for this item workflow item has been successfully submitted", - "workflow-item.scorereviewaction.notification.success.content": " // "workflow-item.scorereviewaction.notification.success.content": "La evaluación para este ítem ha sido enviada exitosamente", + "workflow-item.scorereviewaction.notification.success.content": "La evaluación para este ítem ha sido enviada exitosamente", // "workflow-item.scorereviewaction.notification.error.title": "Something went wrong", "workflow-item.scorereviewaction.notification.error.title": "Algo salió mal", From 7844a939cae46831ddd31b4bfcce5dde292c78d4 Mon Sep 17 00:00:00 2001 From: Leonardo Guerrero Date: Fri, 17 Feb 2023 22:27:49 -0500 Subject: [PATCH 29/45] Arranges after personal review --- src/assets/i18n/es.json5 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/assets/i18n/es.json5 b/src/assets/i18n/es.json5 index ee87c63860..303fc7fc61 100644 --- a/src/assets/i18n/es.json5 +++ b/src/assets/i18n/es.json5 @@ -655,7 +655,7 @@ // "admin.access-control.groups.form.members-list.table.edit.buttons.remove": "Remove member with name \"{{name}}\"", "admin.access-control.groups.form.members-list.table.edit.buttons.remove": "Eliminar miembro con nombre \"{{ name }}\"", -// AQUI + // "admin.access-control.groups.form.members-list.notification.success.addMember": "Successfully added member: \"{{name}}\"", "admin.access-control.groups.form.members-list.notification.success.addMember": "Miembro agregado exitosamente: \"{{ name }}\"", @@ -747,7 +747,7 @@ "admin.access-control.groups.form.return": "Atrás", // "admin.access-control.groups.form.tooltip.editGroupPage": "On this page, you can modify the properties and members of a group. In the top section, you can edit the group name and description, unless this is an admin group for a collection or community, in which case the group name and description are auto-generated and cannot be edited. In the following sections, you can edit group membership. See [the wiki](https://wiki.lyrasis.org/display/DSDOC7x/Create+or+manage+a+user+group) for more details.", - "admin.access-control.groups.form.tooltip.editGroupPage": "En esta página, puede modificar las propiedades y miembros de un grupo. En la sección superior, puede editar el nombre del grupo y la descripción, a menos que este sea un grupo de administración de una colección o comunidad, en cuyo caso el nombre y descripción del grupo fueron auto-generadas y no podrán ser editadas. En las secciones siguientes, puede editar la afiliación al grupo. Para más detalles ver [la wiki](https://wiki.lyrasis.org/display/DSDOC7x/Create+or+manage+a+user+group.", + "admin.access-control.groups.form.tooltip.editGroupPage": "En esta página, puede modificar las propiedades y miembros de un grupo. En la sección superior, puede editar el nombre del grupo y la descripción, a menos que este sea un grupo de administración de una colección o comunidad, en cuyo caso el nombre y descripción del grupo fueron auto-generadas y no podrán ser editadas. En las secciones siguientes, puede editar la afiliación al grupo. Para más detalles ver [la wiki](https://wiki.lyrasis.org/display/DSDOC7x/Create+or+manage+a+user+group).", // "admin.access-control.groups.form.tooltip.editGroup.addEpeople": "To add or remove an EPerson to/from this group, either click the 'Browse All' button or use the search bar below to search for users (use the dropdown to the left of the search bar to choose whether to search by metadata or by email). Then click the plus icon for each user you wish to add in the list below, or the trash can icon for each user you wish to remove. The list below may have several pages: use the page controls below the list to navigate to the next pages. Once you are ready, save your changes by clicking the 'Save' button in the top section.", "admin.access-control.groups.form.tooltip.editGroup.addEpeople": "Para agregar o remover una persona en este grupo, pulse el botón ‘Examinar todo’ o utilice la barra de búsqueda de abajo para buscar los usuario (Use el desplegable que se encuentra a la derecha de la barra de búsqueda para seleccionar entre buscar por metadato o por correo electrónico). Posteriormente pulse el botón con el icono más por cada usuario que desea agregar a la lista, o el icono de papelera por cada usuario que desea remover. La lista puede contener varias páginas: utilice los controles de paginación debajo de la lista, para navegar a las siguientes páginas. Cuando haya finalizado, guarde sus cambios pulsando el botón ‘Guardar’ ubicado en la parte superior de la sección.", @@ -1896,7 +1896,7 @@ // "comcol-role.edit.scorereviewers.description": "Reviewers are able to give a score to incoming submissions, this will define whether the submission will be rejected or not.", // TODO New key - Add a translation - // "comcol-role.edit.scorereviewers.description": "Reviewers are able to give a score to incoming submissions, this will define whether the submission will be rejected or not.", + "comcol-role.edit.scorereviewers.description": "Reviewers are able to give a score to incoming submissions, this will define whether the submission will be rejected or not.", // "community.form.abstract": "Short Description", "community.form.abstract": "Breve descripción", @@ -2232,7 +2232,6 @@ "supervision-group-selector.select.type-of-order.label": "Seleccione un tipo de Orden", // "supervision-group-selector.select.type-of-order.option.none": "NONE", - "supervision-group-selector.select.type-of-order.option.none": "NINGUNO", // "supervision-group-selector.select.type-of-order.option.editor": "EDITOR", @@ -3165,7 +3164,7 @@ "item.edit.metadata.metadatafield.error": "Un error ha ocurrido al validar el campo del metadato", // "item.edit.metadata.metadatafield.invalid": "Please choose a valid metadata field", - "item.edit.metadata.metadatafield.invalid": "Por favor, escoja un campo de metadato valido", + "item.edit.metadata.metadatafield.invalid": "Por favor, escoja un campo de metadatos valido", // "item.edit.metadata.notifications.discarded.content": "Your changes were discarded. To reinstate your changes click the 'Undo' button", "item.edit.metadata.notifications.discarded.content": "Tus cambios fueron descartados. ", From 718db3466deefcd733b39e069559e61bc07d9a60 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Thu, 19 Jan 2023 00:07:57 +0100 Subject: [PATCH 30/45] Fixed false positive tests caused by fixture.debugElement.query().toBeDefined() --- .../members-list.component.spec.ts | 84 ++++++++++--------- .../members-list/members-list.component.ts | 1 + .../subgroups-list.component.spec.ts | 69 +++++++-------- .../core/locale/locale.interceptor.spec.ts | 2 +- src/app/core/xsrf/xsrf.interceptor.spec.ts | 8 +- .../full/full-item-page.component.spec.ts | 12 ++- .../mirador-viewer.component.spec.ts | 2 +- .../file-section.component.spec.ts | 2 +- ...item-page-abstract-field.component.spec.ts | 2 +- .../browse-by/browse-by.component.spec.ts | 37 +++++--- .../lang-switch/lang-switch.component.spec.ts | 2 +- ...med-task-actions-approve.component.spec.ts | 4 +- ...sk-actions-edit-metadata.component.spec.ts | 2 +- ...imed-task-actions-reject.component.spec.ts | 4 +- ...k-actions-return-to-pool.component.spec.ts | 4 +- .../pool-task-actions.component.spec.ts | 6 +- .../workflowitem-actions.component.spec.ts | 4 +- .../workspaceitem-actions.component.spec.ts | 8 +- .../object-collection.component.spec.ts | 23 +++-- .../my-dspace-item-status.component.spec.ts | 2 +- .../item-submitter.component.spec.ts | 2 +- .../page-size-selector.component.spec.ts | 11 +-- .../search-settings.component.spec.ts | 6 +- ...rch-switch-configuration.component.spec.ts | 2 +- ...mission-form-section-add.component.spec.ts | 3 +- .../section-container.component.spec.ts | 12 +-- 26 files changed, 168 insertions(+), 146 deletions(-) diff --git a/src/app/access-control/group-registry/group-form/members-list/members-list.component.spec.ts b/src/app/access-control/group-registry/group-form/members-list/members-list.component.spec.ts index 8d0ddf0a85..4cf018445c 100644 --- a/src/app/access-control/group-registry/group-form/members-list/members-list.component.spec.ts +++ b/src/app/access-control/group-registry/group-form/members-list/members-list.component.spec.ts @@ -1,5 +1,5 @@ import { CommonModule } from '@angular/common'; -import { NO_ERRORS_SCHEMA } from '@angular/core'; +import { DebugElement, NO_ERRORS_SCHEMA } from '@angular/core'; import { ComponentFixture, fakeAsync, flush, inject, TestBed, tick, waitForAsync } from '@angular/core/testing'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { BrowserModule, By } from '@angular/platform-browser'; @@ -37,10 +37,10 @@ describe('MembersListComponent', () => { let ePersonDataServiceStub: any; let groupsDataServiceStub: any; let activeGroup; - let allEPersons; - let allGroups; - let epersonMembers; - let subgroupMembers; + let allEPersons: EPerson[]; + let allGroups: Group[]; + let epersonMembers: EPerson[]; + let subgroupMembers: Group[]; let paginationService; beforeEach(waitForAsync(() => { @@ -53,7 +53,7 @@ describe('MembersListComponent', () => { activeGroup: activeGroup, epersonMembers: epersonMembers, subgroupMembers: subgroupMembers, - findListByHref(href: string): Observable>> { + findListByHref(_href: string): Observable>> { return createSuccessfulRemoteDataObject$(buildPaginatedList(new PageInfo(), groupsDataServiceStub.getEPersonMembers())); }, searchByScope(scope: string, query: string): Observable>> { @@ -147,6 +147,7 @@ describe('MembersListComponent', () => { }); afterEach(fakeAsync(() => { fixture.destroy(); + fixture.debugElement.nativeElement.remove(); flush(); component = null; })); @@ -167,12 +168,19 @@ describe('MembersListComponent', () => { describe('search', () => { describe('when searching without query', () => { - let epersonsFound; + let epersonsFound: DebugElement[]; beforeEach(fakeAsync(() => { + spyOn(component, 'isMemberOfGroup').and.callFake((ePerson: EPerson) => { + return observableOf(activeGroup.epersons.includes(ePerson)); + }); component.search({ scope: 'metadata', query: '' }); tick(); fixture.detectChanges(); epersonsFound = fixture.debugElement.queryAll(By.css('#epersonsSearch tbody tr')); + // Stop using the fake spy function (because otherwise the clicking on the buttons will not change anything + // because they don't change the value of activeGroup.epersons) + jasmine.getEnv().allowRespy(true); + spyOn(component, 'isMemberOfGroup').and.callThrough(); })); it('should display all epersons', () => { @@ -181,62 +189,56 @@ describe('MembersListComponent', () => { describe('if eperson is already a eperson', () => { it('should have delete button, else it should have add button', () => { - activeGroup.epersons.map((eperson: EPerson) => { - epersonsFound.map((foundEPersonRowElement) => { - if (foundEPersonRowElement.debugElement !== undefined) { - const epersonId = foundEPersonRowElement.debugElement.query(By.css('td:first-child')); - const addButton = foundEPersonRowElement.debugElement.query(By.css('td:last-child .fa-plus')); - const deleteButton = foundEPersonRowElement.debugElement.query(By.css('td:last-child .fa-trash-alt')); - if (epersonId.nativeElement.textContent === eperson.id) { - expect(addButton).toBeUndefined(); - expect(deleteButton).toBeDefined(); - } else { - expect(deleteButton).toBeUndefined(); - expect(addButton).toBeDefined(); - } - } - }); + const memberIds: string[] = activeGroup.epersons.map((ePerson: EPerson) => ePerson.id); + epersonsFound.map((foundEPersonRowElement: DebugElement) => { + const epersonId: DebugElement = foundEPersonRowElement.query(By.css('td:first-child')); + const addButton: DebugElement = foundEPersonRowElement.query(By.css('td:last-child .fa-plus')); + const deleteButton: DebugElement = foundEPersonRowElement.query(By.css('td:last-child .fa-trash-alt')); + if (memberIds.includes(epersonId.nativeElement.textContent)) { + expect(addButton).toBeNull(); + expect(deleteButton).not.toBeNull(); + } else { + expect(deleteButton).toBeNull(); + expect(addButton).not.toBeNull(); + } }); }); }); describe('if first add button is pressed', () => { beforeEach(fakeAsync(() => { - const addButton = fixture.debugElement.query(By.css('#epersonsSearch tbody .fa-plus')); + const addButton: DebugElement = fixture.debugElement.query(By.css('#epersonsSearch tbody .fa-plus')); addButton.nativeElement.click(); tick(); fixture.detectChanges(); })); - it('all groups in search member of selected group', () => { + it('then all the ePersons are member of the active group', () => { epersonsFound = fixture.debugElement.queryAll(By.css('#epersonsSearch tbody tr')); expect(epersonsFound.length).toEqual(2); - epersonsFound.map((foundEPersonRowElement) => { - if (foundEPersonRowElement.debugElement !== undefined) { - const addButton = foundEPersonRowElement.debugElement.query(By.css('td:last-child .fa-plus')); - const deleteButton = foundEPersonRowElement.debugElement.query(By.css('td:last-child .fa-trash-alt')); - expect(addButton).toBeUndefined(); - expect(deleteButton).toBeDefined(); - } + epersonsFound.map((foundEPersonRowElement: DebugElement) => { + const addButton: DebugElement = foundEPersonRowElement.query(By.css('td:last-child .fa-plus')); + const deleteButton: DebugElement = foundEPersonRowElement.query(By.css('td:last-child .fa-trash-alt')); + expect(addButton).toBeNull(); + expect(deleteButton).not.toBeNull(); }); }); }); describe('if first delete button is pressed', () => { beforeEach(fakeAsync(() => { - const addButton = fixture.debugElement.query(By.css('#epersonsSearch tbody .fa-trash-alt')); - addButton.nativeElement.click(); + const deleteButton: DebugElement = fixture.debugElement.query(By.css('#epersonsSearch tbody .fa-trash-alt')); + deleteButton.nativeElement.click(); tick(); fixture.detectChanges(); })); - it('first eperson in search delete button, because now member', () => { + it('then no ePerson is member of the active group', () => { epersonsFound = fixture.debugElement.queryAll(By.css('#epersonsSearch tbody tr')); - epersonsFound.map((foundEPersonRowElement) => { - if (foundEPersonRowElement.debugElement !== undefined) { - const addButton = foundEPersonRowElement.debugElement.query(By.css('td:last-child .fa-plus')); - const deleteButton = foundEPersonRowElement.debugElement.query(By.css('td:last-child .fa-trash-alt')); - expect(deleteButton).toBeUndefined(); - expect(addButton).toBeDefined(); - } + expect(epersonsFound.length).toEqual(2); + epersonsFound.map((foundEPersonRowElement: DebugElement) => { + const addButton: DebugElement = foundEPersonRowElement.query(By.css('td:last-child .fa-plus')); + const deleteButton: DebugElement = foundEPersonRowElement.query(By.css('td:last-child .fa-trash-alt')); + expect(deleteButton).toBeNull(); + expect(addButton).not.toBeNull(); }); }); }); diff --git a/src/app/access-control/group-registry/group-form/members-list/members-list.component.ts b/src/app/access-control/group-registry/group-form/members-list/members-list.component.ts index 169d009d63..c569522be4 100644 --- a/src/app/access-control/group-registry/group-form/members-list/members-list.component.ts +++ b/src/app/access-control/group-registry/group-form/members-list/members-list.component.ts @@ -205,6 +205,7 @@ export class MembersListComponent implements OnInit, OnDestroy { * @param ePerson EPerson we want to delete as member from group that is currently being edited */ deleteMemberFromGroup(ePerson: EpersonDtoModel) { + ePerson.memberOfGroup = false; this.groupDataService.getActiveGroup().pipe(take(1)).subscribe((activeGroup: Group) => { if (activeGroup != null) { const response = this.groupDataService.deleteMemberFromGroup(activeGroup, ePerson.eperson); diff --git a/src/app/access-control/group-registry/group-form/subgroup-list/subgroups-list.component.spec.ts b/src/app/access-control/group-registry/group-form/subgroup-list/subgroups-list.component.spec.ts index 1ca6c88c5f..ff0fd121af 100644 --- a/src/app/access-control/group-registry/group-form/subgroup-list/subgroups-list.component.spec.ts +++ b/src/app/access-control/group-registry/group-form/subgroup-list/subgroups-list.component.spec.ts @@ -1,14 +1,6 @@ import { CommonModule } from '@angular/common'; -import { NO_ERRORS_SCHEMA } from '@angular/core'; -import { - ComponentFixture, - fakeAsync, - flush, - inject, - TestBed, - tick, - waitForAsync -} from '@angular/core/testing'; +import { NO_ERRORS_SCHEMA, DebugElement } from '@angular/core'; +import { ComponentFixture, fakeAsync, flush, inject, TestBed, tick, waitForAsync } from '@angular/core/testing'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { BrowserModule, By } from '@angular/platform-browser'; import { Router } from '@angular/router'; @@ -46,8 +38,8 @@ describe('SubgroupsListComponent', () => { let ePersonDataServiceStub: any; let groupsDataServiceStub: any; let activeGroup; - let subgroups; - let allGroups; + let subgroups: Group[]; + let allGroups: Group[]; let routerStub; let paginationService; @@ -65,7 +57,7 @@ describe('SubgroupsListComponent', () => { getSubgroups(): Group { return this.activeGroup; }, - findListByHref(href: string): Observable>> { + findListByHref(_href: string): Observable>> { return this.subgroups$.pipe( map((currentGroups: Group[]) => { return createSuccessfulRemoteDataObject(buildPaginatedList(new PageInfo(), currentGroups)); @@ -133,6 +125,7 @@ describe('SubgroupsListComponent', () => { }); afterEach(fakeAsync(() => { fixture.destroy(); + fixture.debugElement.nativeElement.remove(); flush(); component = null; })); @@ -152,7 +145,7 @@ describe('SubgroupsListComponent', () => { }); describe('if first group delete button is pressed', () => { - let groupsFound; + let groupsFound: DebugElement[]; beforeEach(fakeAsync(() => { const addButton = fixture.debugElement.query(By.css('#subgroupsOfGroup tbody .deleteButton')); addButton.triggerEventHandler('click', { @@ -170,7 +163,7 @@ describe('SubgroupsListComponent', () => { describe('search', () => { describe('when searching with empty query', () => { - let groupsFound; + let groupsFound: DebugElement[]; beforeEach(fakeAsync(() => { component.search({ query: '' }); groupsFound = fixture.debugElement.queryAll(By.css('#groupsSearch tbody tr')); @@ -181,9 +174,9 @@ describe('SubgroupsListComponent', () => { groupsFound = fixture.debugElement.queryAll(By.css('#groupsSearch tbody tr')); expect(groupsFound.length).toEqual(2); groupsFound = fixture.debugElement.queryAll(By.css('#groupsSearch tbody tr')); - const groupIdsFound = fixture.debugElement.queryAll(By.css('#groupsSearch tbody tr td:first-child')); + const groupIdsFound: DebugElement[] = fixture.debugElement.queryAll(By.css('#groupsSearch tbody tr td:first-child')); allGroups.map((group: Group) => { - expect(groupIdsFound.find((foundEl) => { + expect(groupIdsFound.find((foundEl: DebugElement) => { return (foundEl.nativeElement.textContent.trim() === group.uuid); })).toBeTruthy(); }); @@ -195,30 +188,30 @@ describe('SubgroupsListComponent', () => { groupsFound = fixture.debugElement.queryAll(By.css('#groupsSearch tbody tr')); const getSubgroups = groupsDataServiceStub.getSubgroups().subgroups; if (getSubgroups !== undefined && getSubgroups.length > 0) { - groupsFound.map((foundGroupRowElement) => { - if (foundGroupRowElement.debugElement !== undefined) { - const addButton = foundGroupRowElement.debugElement.query(By.css('td:last-child .fa-plus')); - const deleteButton = foundGroupRowElement.debugElement.query(By.css('td:last-child .fa-trash-alt')); - expect(addButton).toBeUndefined(); - expect(deleteButton).toBeDefined(); + groupsFound.map((foundGroupRowElement: DebugElement) => { + const groupId: DebugElement = foundGroupRowElement.query(By.css('td:first-child')); + const addButton: DebugElement = foundGroupRowElement.query(By.css('td:last-child .fa-plus')); + const deleteButton: DebugElement = foundGroupRowElement.query(By.css('td:last-child .fa-trash-alt')); + expect(addButton).toBeNull(); + if (activeGroup.id === groupId.nativeElement.textContent) { + expect(deleteButton).toBeNull(); + } else { + expect(deleteButton).not.toBeNull(); } }); } else { - getSubgroups.map((group: Group) => { - groupsFound.map((foundGroupRowElement) => { - if (foundGroupRowElement.debugElement !== undefined) { - const groupId = foundGroupRowElement.debugElement.query(By.css('td:first-child')); - const addButton = foundGroupRowElement.debugElement.query(By.css('td:last-child .fa-plus')); - const deleteButton = foundGroupRowElement.debugElement.query(By.css('td:last-child .fa-trash-alt')); - if (groupId.nativeElement.textContent === group.id) { - expect(addButton).toBeUndefined(); - expect(deleteButton).toBeDefined(); - } else { - expect(deleteButton).toBeUndefined(); - expect(addButton).toBeDefined(); - } - } - }); + const subgroupIds: string[] = activeGroup.subgroups.map((group: Group) => group.id); + groupsFound.map((foundGroupRowElement: DebugElement) => { + const groupId: DebugElement = foundGroupRowElement.query(By.css('td:first-child')); + const addButton: DebugElement = foundGroupRowElement.query(By.css('td:last-child .fa-plus')); + const deleteButton: DebugElement = foundGroupRowElement.query(By.css('td:last-child .fa-trash-alt')); + if (subgroupIds.includes(groupId.nativeElement.textContent)) { + expect(addButton).toBeNull(); + expect(deleteButton).not.toBeNull(); + } else { + expect(deleteButton).toBeNull(); + expect(addButton).not.toBeNull(); + } }); } }); diff --git a/src/app/core/locale/locale.interceptor.spec.ts b/src/app/core/locale/locale.interceptor.spec.ts index 9e298fefcc..e96126d19c 100644 --- a/src/app/core/locale/locale.interceptor.spec.ts +++ b/src/app/core/locale/locale.interceptor.spec.ts @@ -52,7 +52,7 @@ describe(`LocaleInterceptor`, () => { expect(httpRequest.request.headers.has('Accept-Language')); const lang = httpRequest.request.headers.get('Accept-Language'); - expect(lang).toBeDefined(); + expect(lang).not.toBeNull(); expect(lang).toBe(languageList.toString()); }); diff --git a/src/app/core/xsrf/xsrf.interceptor.spec.ts b/src/app/core/xsrf/xsrf.interceptor.spec.ts index 742c4a4a45..4a78b60fc1 100644 --- a/src/app/core/xsrf/xsrf.interceptor.spec.ts +++ b/src/app/core/xsrf/xsrf.interceptor.spec.ts @@ -67,7 +67,7 @@ describe(`XsrfInterceptor`, () => { expect(httpRequest.request.headers.has('X-XSRF-TOKEN')).toBeTrue(); expect(httpRequest.request.withCredentials).toBeTrue(); const token = httpRequest.request.headers.get('X-XSRF-TOKEN'); - expect(token).toBeDefined(); + expect(token).not.toBeNull(); expect(token).toBe(testToken.toString()); httpRequest.flush(mockPayload, { status: mockStatusCode, statusText: mockStatusText }); @@ -116,11 +116,11 @@ describe(`XsrfInterceptor`, () => { // ensure mock XSRF token is in response expect(response.headers.has('DSPACE-XSRF-TOKEN')).toBeTrue(); const token = response.headers.get('DSPACE-XSRF-TOKEN'); - expect(token).toBeDefined(); + expect(token).not.toBeNull(); expect(token).toBe(mockNewXSRFToken.toString()); // ensure our XSRF-TOKEN cookie exists & has the same value as the new DSPACE-XSRF-TOKEN header - expect(cookieService.get('XSRF-TOKEN')).toBeDefined(); + expect(cookieService.get('XSRF-TOKEN')).not.toBeNull(); expect(cookieService.get('XSRF-TOKEN')).toBe(mockNewXSRFToken.toString()); done(); @@ -153,7 +153,7 @@ describe(`XsrfInterceptor`, () => { expect(error.statusText).toBe(mockErrorText); // ensure our XSRF-TOKEN cookie exists & has the same value as the new DSPACE-XSRF-TOKEN header - expect(cookieService.get('XSRF-TOKEN')).toBeDefined(); + expect(cookieService.get('XSRF-TOKEN')).not.toBeNull(); expect(cookieService.get('XSRF-TOKEN')).toBe(mockNewXSRFToken.toString()); done(); diff --git a/src/app/item-page/full/full-item-page.component.spec.ts b/src/app/item-page/full/full-item-page.component.spec.ts index 66c6488b8e..53e36be1d1 100644 --- a/src/app/item-page/full/full-item-page.component.spec.ts +++ b/src/app/item-page/full/full-item-page.component.spec.ts @@ -104,9 +104,13 @@ describe('FullItemPageComponent', () => { fixture.detectChanges(); })); + afterEach(() => { + fixture.debugElement.nativeElement.remove(); + }); + it('should display the item\'s metadata', () => { const table = fixture.debugElement.query(By.css('table')); - for (const metadatum of mockItem.allMetadata([])) { + for (const metadatum of mockItem.allMetadata(Object.keys(mockItem.metadata))) { expect(table.nativeElement.innerHTML).toContain(metadatum.value); } }); @@ -137,7 +141,7 @@ describe('FullItemPageComponent', () => { it('should display the item', () => { const objectLoader = fixture.debugElement.query(By.css('.full-item-info')); - expect(objectLoader.nativeElement).toBeDefined(); + expect(objectLoader.nativeElement).not.toBeNull(); }); }); describe('when the item is withdrawn and the user is not an admin', () => { @@ -161,7 +165,7 @@ describe('FullItemPageComponent', () => { it('should display the item', () => { const objectLoader = fixture.debugElement.query(By.css('.full-item-info')); - expect(objectLoader.nativeElement).toBeDefined(); + expect(objectLoader).not.toBeNull(); }); }); @@ -173,7 +177,7 @@ describe('FullItemPageComponent', () => { it('should display the item', () => { const objectLoader = fixture.debugElement.query(By.css('.full-item-info')); - expect(objectLoader.nativeElement).toBeDefined(); + expect(objectLoader).not.toBeNull(); }); }); }); diff --git a/src/app/item-page/mirador-viewer/mirador-viewer.component.spec.ts b/src/app/item-page/mirador-viewer/mirador-viewer.component.spec.ts index 40ad0fd5d0..2727391dff 100644 --- a/src/app/item-page/mirador-viewer/mirador-viewer.component.spec.ts +++ b/src/app/item-page/mirador-viewer/mirador-viewer.component.spec.ts @@ -253,7 +253,7 @@ describe('MiradorViewerComponent in development mode', () => { it('should show message', (() => { const value = fixture.debugElement .nativeElement.querySelector('#viewer-message'); - expect(value).toBeDefined(); + expect(value).not.toBeNull(); })); }); diff --git a/src/app/item-page/simple/field-components/file-section/file-section.component.spec.ts b/src/app/item-page/simple/field-components/file-section/file-section.component.spec.ts index 2d185aef9c..a90abe9c90 100644 --- a/src/app/item-page/simple/field-components/file-section/file-section.component.spec.ts +++ b/src/app/item-page/simple/field-components/file-section/file-section.component.spec.ts @@ -143,7 +143,7 @@ describe('FileSectionComponent', () => { it('should contain a view less link', () => { const viewLess = fixture.debugElement.query(By.css('.bitstream-collapse')); - expect(viewLess).toBeDefined(); + expect(viewLess).not.toBeNull(); }); it('clicking on the view less link should reset the pages and call getNextPage()', () => { diff --git a/src/app/item-page/simple/field-components/specific-field/abstract/item-page-abstract-field.component.spec.ts b/src/app/item-page/simple/field-components/specific-field/abstract/item-page-abstract-field.component.spec.ts index 53f0522f39..bf1815c6b6 100644 --- a/src/app/item-page/simple/field-components/specific-field/abstract/item-page-abstract-field.component.spec.ts +++ b/src/app/item-page/simple/field-components/specific-field/abstract/item-page-abstract-field.component.spec.ts @@ -41,6 +41,6 @@ describe('ItemPageAbstractFieldComponent', () => { })); it('should render a ds-metadata-values', () => { - expect(fixture.debugElement.query(By.css('ds-metadata-values'))).toBeDefined(); + expect(fixture.debugElement.query(By.css('ds-metadata-values'))).not.toBeNull(); }); }); diff --git a/src/app/shared/browse-by/browse-by.component.spec.ts b/src/app/shared/browse-by/browse-by.component.spec.ts index 43a3910216..83bbe15801 100644 --- a/src/app/shared/browse-by/browse-by.component.spec.ts +++ b/src/app/shared/browse-by/browse-by.component.spec.ts @@ -47,7 +47,7 @@ import { getMockThemeService } from '../mocks/theme-service.mock'; @listableObjectComponent(BrowseEntry, ViewMode.ListElement, DEFAULT_CONTEXT, 'custom') @Component({ - selector: 'ds-browse-entry-list-element', + selector: '', template: '' }) class MockThemedBrowseEntryListElementComponent { @@ -147,19 +147,21 @@ describe('BrowseByComponent', () => { it('should display a loading message when objects is empty', () => { (comp as any).objects = undefined; fixture.detectChanges(); - expect(fixture.debugElement.query(By.css('ds-themed-loading'))).toBeDefined(); + expect(fixture.debugElement.query(By.css('ds-themed-loading'))).not.toBeNull(); }); it('should display results when objects is not empty', () => { - (comp as any).objects = observableOf({ - payload: { - page: { - length: 1 - } - } - }); + comp.objects$ = createSuccessfulRemoteDataObject$(buildPaginatedList(new PageInfo(), [ + Object.assign(new BrowseEntry(), { + type: ITEM, + authority: 'authority key 1', + value: 'browse entry 1', + language: null, + count: 1, + }), + ])); fixture.detectChanges(); - expect(fixture.debugElement.query(By.css('ds-viewable-collection'))).toBeDefined(); + expect(fixture.debugElement.query(By.css('ds-viewable-collection'))).not.toBeNull(); }); describe('when showPaginator is true and browseEntries are provided', () => { @@ -231,15 +233,24 @@ describe('BrowseByComponent', () => { describe('reset filters button', () => { it('should not be present when no startsWith or value is present ', () => { - const button = fixture.debugElement.query(By.css('reset')); + const button = fixture.debugElement.query(By.css('.reset')); expect(button).toBeNull(); }); it('should be present when a startsWith or value is present ', () => { + comp.objects$ = createSuccessfulRemoteDataObject$(buildPaginatedList(new PageInfo(), [ + Object.assign(new BrowseEntry(), { + type: ITEM, + authority: 'authority key 1', + value: 'browse entry 1', + language: null, + count: 1, + }), + ])); comp.shouldDisplayResetButton$ = observableOf(true); fixture.detectChanges(); - const button = fixture.debugElement.query(By.css('reset')); - expect(button).toBeDefined(); + const button = fixture.debugElement.query(By.css('.reset')); + expect(button).not.toBeNull(); }); }); describe('back', () => { diff --git a/src/app/shared/lang-switch/lang-switch.component.spec.ts b/src/app/shared/lang-switch/lang-switch.component.spec.ts index 7757622f4c..6d3c847086 100644 --- a/src/app/shared/lang-switch/lang-switch.component.spec.ts +++ b/src/app/shared/lang-switch/lang-switch.component.spec.ts @@ -109,7 +109,7 @@ describe('LangSwitchComponent', () => { })); it('should define the main A HREF in the UI', (() => { - expect(langSwitchElement.querySelector('a')).toBeDefined(); + expect(langSwitchElement.querySelector('a')).not.toBeNull(); })); describe('when selecting a language', () => { diff --git a/src/app/shared/mydspace-actions/claimed-task/approve/claimed-task-actions-approve.component.spec.ts b/src/app/shared/mydspace-actions/claimed-task/approve/claimed-task-actions-approve.component.spec.ts index ce67da1349..b15e246f53 100644 --- a/src/app/shared/mydspace-actions/claimed-task/approve/claimed-task-actions-approve.component.spec.ts +++ b/src/app/shared/mydspace-actions/claimed-task/approve/claimed-task-actions-approve.component.spec.ts @@ -72,7 +72,7 @@ describe('ClaimedTaskActionsApproveComponent', () => { it('should display approve button', () => { const btn = fixture.debugElement.query(By.css('.btn-success')); - expect(btn).toBeDefined(); + expect(btn).not.toBeNull(); }); it('should display spin icon when approve is pending', () => { @@ -81,7 +81,7 @@ describe('ClaimedTaskActionsApproveComponent', () => { const span = fixture.debugElement.query(By.css('.btn-success .fa-spin')); - expect(span).toBeDefined(); + expect(span).not.toBeNull(); }); describe('submitTask', () => { diff --git a/src/app/shared/mydspace-actions/claimed-task/edit-metadata/claimed-task-actions-edit-metadata.component.spec.ts b/src/app/shared/mydspace-actions/claimed-task/edit-metadata/claimed-task-actions-edit-metadata.component.spec.ts index 5bcddc9b11..7bdf57561f 100644 --- a/src/app/shared/mydspace-actions/claimed-task/edit-metadata/claimed-task-actions-edit-metadata.component.spec.ts +++ b/src/app/shared/mydspace-actions/claimed-task/edit-metadata/claimed-task-actions-edit-metadata.component.spec.ts @@ -66,7 +66,7 @@ describe('ClaimedTaskActionsEditMetadataComponent', () => { it('should display edit button', () => { const btn = fixture.debugElement.query(By.css('.btn-primary')); - expect(btn).toBeDefined(); + expect(btn).not.toBeNull(); }); }); diff --git a/src/app/shared/mydspace-actions/claimed-task/reject/claimed-task-actions-reject.component.spec.ts b/src/app/shared/mydspace-actions/claimed-task/reject/claimed-task-actions-reject.component.spec.ts index 2ccb671d83..b3ea5e1258 100644 --- a/src/app/shared/mydspace-actions/claimed-task/reject/claimed-task-actions-reject.component.spec.ts +++ b/src/app/shared/mydspace-actions/claimed-task/reject/claimed-task-actions-reject.component.spec.ts @@ -89,7 +89,7 @@ describe('ClaimedTaskActionsRejectComponent', () => { it('should display reject button', () => { const btn = fixture.debugElement.query(By.css('.btn-danger')); - expect(btn).toBeDefined(); + expect(btn).not.toBeNull(); }); it('should display spin icon when reject is pending', () => { @@ -98,7 +98,7 @@ describe('ClaimedTaskActionsRejectComponent', () => { const span = fixture.debugElement.query(By.css('.btn-danger .fa-spin')); - expect(span).toBeDefined(); + expect(span).not.toBeNull(); }); it('should call openRejectModal on reject button click', () => { diff --git a/src/app/shared/mydspace-actions/claimed-task/return-to-pool/claimed-task-actions-return-to-pool.component.spec.ts b/src/app/shared/mydspace-actions/claimed-task/return-to-pool/claimed-task-actions-return-to-pool.component.spec.ts index 46e89d9d3a..765849f0ae 100644 --- a/src/app/shared/mydspace-actions/claimed-task/return-to-pool/claimed-task-actions-return-to-pool.component.spec.ts +++ b/src/app/shared/mydspace-actions/claimed-task/return-to-pool/claimed-task-actions-return-to-pool.component.spec.ts @@ -72,7 +72,7 @@ describe('ClaimedTaskActionsReturnToPoolComponent', () => { it('should display return to pool button', () => { const btn = fixture.debugElement.query(By.css('.btn-secondary')); - expect(btn).toBeDefined(); + expect(btn).not.toBeNull(); }); it('should display spin icon when return to pool action is pending', () => { @@ -81,7 +81,7 @@ describe('ClaimedTaskActionsReturnToPoolComponent', () => { const span = fixture.debugElement.query(By.css('.btn-secondary .fa-spin')); - expect(span).toBeDefined(); + expect(span).not.toBeNull(); }); describe('actionExecution', () => { diff --git a/src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.spec.ts b/src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.spec.ts index 385dea73f3..cb0799caa6 100644 --- a/src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.spec.ts +++ b/src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.spec.ts @@ -131,13 +131,13 @@ describe('PoolTaskActionsComponent', () => { it('should display claim task button', () => { const btn = fixture.debugElement.query(By.css('.btn-info')); - expect(btn).toBeDefined(); + expect(btn).not.toBeNull(); }); it('should display view button', () => { - const btn = fixture.debugElement.query(By.css('button [data-test="view-btn"]')); + const btn = fixture.debugElement.query(By.css('button[data-test="view-btn"]')); - expect(btn).toBeDefined(); + expect(btn).not.toBeNull(); }); it('should call claim task with href of getPoolTaskEndpointById', ((done) => { diff --git a/src/app/shared/mydspace-actions/workflowitem/workflowitem-actions.component.spec.ts b/src/app/shared/mydspace-actions/workflowitem/workflowitem-actions.component.spec.ts index 79aece892e..9f266d054e 100644 --- a/src/app/shared/mydspace-actions/workflowitem/workflowitem-actions.component.spec.ts +++ b/src/app/shared/mydspace-actions/workflowitem/workflowitem-actions.component.spec.ts @@ -107,9 +107,9 @@ describe('WorkflowitemActionsComponent', () => { }); it('should display view button', () => { - const btn = fixture.debugElement.query(By.css('button [data-test="view-btn"]')); + const btn = fixture.debugElement.query(By.css('button[data-test="view-btn"]')); - expect(btn).toBeDefined(); + expect(btn).not.toBeNull(); }); }); diff --git a/src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.spec.ts b/src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.spec.ts index 7299c28df2..14d3c07650 100644 --- a/src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.spec.ts +++ b/src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.spec.ts @@ -123,19 +123,19 @@ describe('WorkspaceitemActionsComponent', () => { it('should display edit button', () => { const btn = fixture.debugElement.query(By.css('.btn-primary')); - expect(btn).toBeDefined(); + expect(btn).not.toBeNull(); }); it('should display delete button', () => { const btn = fixture.debugElement.query(By.css('.btn-danger')); - expect(btn).toBeDefined(); + expect(btn).not.toBeNull(); }); it('should display view button', () => { - const btn = fixture.debugElement.query(By.css('button [data-test="view-btn"]')); + const btn = fixture.debugElement.query(By.css('button[data-test="view-btn"]')); - expect(btn).toBeDefined(); + expect(btn).not.toBeNull(); }); describe('on discard confirmation', () => { diff --git a/src/app/shared/object-collection/object-collection.component.spec.ts b/src/app/shared/object-collection/object-collection.component.spec.ts index c28df74aa7..1619e56b0d 100644 --- a/src/app/shared/object-collection/object-collection.component.spec.ts +++ b/src/app/shared/object-collection/object-collection.component.spec.ts @@ -30,27 +30,34 @@ describe('ObjectCollectionComponent', () => { }).compileComponents(); // compile template and css })); - beforeEach(waitForAsync(() => { + beforeEach(() => { fixture = TestBed.createComponent(ObjectCollectionComponent); objectCollectionComponent = fixture.componentInstance; - })); + fixture.detectChanges(); + }); it('should only show the grid component when the viewmode is set to grid', () => { objectCollectionComponent.currentMode$ = observableOf(ViewMode.GridElement); + fixture.detectChanges(); - expect(fixture.debugElement.query(By.css('ds-object-grid'))).toBeDefined(); - expect(fixture.debugElement.query(By.css('ds-object-list'))).toBeNull(); + expect(fixture.debugElement.query(By.css('ds-object-grid'))).not.toBeNull(); + expect(fixture.debugElement.query(By.css('ds-themed-object-list'))).toBeNull(); }); it('should only show the list component when the viewmode is set to list', () => { objectCollectionComponent.currentMode$ = observableOf(ViewMode.ListElement); + fixture.detectChanges(); - expect(fixture.debugElement.query(By.css('ds-object-list'))).toBeDefined(); + expect(fixture.debugElement.query(By.css('ds-themed-object-list'))).not.toBeNull(); expect(fixture.debugElement.query(By.css('ds-object-grid'))).toBeNull(); }); - it('should set fallback placeholder font size during test', () => { - objectCollectionComponent.currentMode$ = observableOf(ViewMode.ListElement); - expect(fixture.debugElement.query(By.css('thumb-font-3'))).toBeDefined(); + it('should set fallback placeholder font size during test', async () => { + objectCollectionComponent.currentMode$ = observableOf(ViewMode.ListElement); + fixture.detectChanges(); + + const comp = fixture.debugElement.query(By.css('ds-themed-object-list')); + expect(comp).not.toBeNull(); + expect(comp.nativeElement.classList).not.toContain('hide-placeholder-text'); }); }); diff --git a/src/app/shared/object-collection/shared/mydspace-item-status/my-dspace-item-status.component.spec.ts b/src/app/shared/object-collection/shared/mydspace-item-status/my-dspace-item-status.component.spec.ts index 44e6a44b70..f3d1e868b7 100644 --- a/src/app/shared/object-collection/shared/mydspace-item-status/my-dspace-item-status.component.spec.ts +++ b/src/app/shared/object-collection/shared/mydspace-item-status/my-dspace-item-status.component.spec.ts @@ -48,7 +48,7 @@ describe('MyDSpaceItemStatusComponent', () => { it('should display badge', () => { const badge = fixture.debugElement.query(By.css('span')); - expect(badge).toBeDefined(); + expect(badge).not.toBeNull(); }); it('should init badge content and class', () => { diff --git a/src/app/shared/object-collection/shared/mydspace-item-submitter/item-submitter.component.spec.ts b/src/app/shared/object-collection/shared/mydspace-item-submitter/item-submitter.component.spec.ts index 227db9ec82..cf1de597f6 100644 --- a/src/app/shared/object-collection/shared/mydspace-item-submitter/item-submitter.component.spec.ts +++ b/src/app/shared/object-collection/shared/mydspace-item-submitter/item-submitter.component.spec.ts @@ -63,7 +63,7 @@ describe('ItemSubmitterComponent', () => { it('should show a badge with submitter name', () => { const badge = fixture.debugElement.query(By.css('.badge')); - expect(badge).toBeDefined(); + expect(badge).not.toBeNull(); expect(badge.nativeElement.innerHTML).toBe(EPersonMock.name); }); }); diff --git a/src/app/shared/page-size-selector/page-size-selector.component.spec.ts b/src/app/shared/page-size-selector/page-size-selector.component.spec.ts index 67947c3425..80956e7184 100644 --- a/src/app/shared/page-size-selector/page-size-selector.component.spec.ts +++ b/src/app/shared/page-size-selector/page-size-selector.component.spec.ts @@ -72,9 +72,9 @@ describe('PageSizeSelectorComponent', () => { }); it('it should show the size settings with the respective selectable options', (done) => { - (comp as any).paginationOptions$.pipe(first()).subscribe((options) => { + comp.paginationOptions$.pipe(first()).subscribe((options: PaginationComponentOptions) => { const pageSizeSetting = fixture.debugElement.query(By.css('div.page-size-settings')); - expect(pageSizeSetting).toBeDefined(); + expect(pageSizeSetting).not.toBeNull(); const childElements = pageSizeSetting.queryAll(By.css('option')); expect(childElements.length).toEqual(options.pageSizeOptions.length); done(); @@ -83,10 +83,11 @@ describe('PageSizeSelectorComponent', () => { }); it('should have the proper rpp value selected by default', (done) => { - (comp as any).paginationOptions$.pipe(take(1)).subscribe((options) => { + comp.paginationOptions$.pipe(take(1)).subscribe(() => { const pageSizeSetting = fixture.debugElement.query(By.css('div.page-size-settings')); - const childElementToBeSelected = pageSizeSetting.query(By.css('option[value="10"][selected="selected"]')); - expect(childElementToBeSelected).toBeDefined(); + const childElementToBeSelected = pageSizeSetting.query(By.css('option[value="10"]')); + expect(childElementToBeSelected).not.toBeNull(); + expect(childElementToBeSelected.nativeElement.selected).toBeTrue() done(); }); }); diff --git a/src/app/shared/search/search-settings/search-settings.component.spec.ts b/src/app/shared/search/search-settings/search-settings.component.spec.ts index 06e506ddb0..d0b51f04b1 100644 --- a/src/app/shared/search/search-settings/search-settings.component.spec.ts +++ b/src/app/shared/search/search-settings/search-settings.component.spec.ts @@ -107,6 +107,7 @@ describe('SearchSettingsComponent', () => { new SortOptions('dc.title', SortDirection.ASC), new SortOptions('dc.title', SortDirection.DESC) ]; + comp.currentSortOption = new SortOptions('score', SortDirection.DESC); // SearchPageComponent test instance fixture.detectChanges(); @@ -133,7 +134,8 @@ describe('SearchSettingsComponent', () => { it('should have the proper order value selected by default', () => { fixture.detectChanges(); const orderSetting = fixture.debugElement.query(By.css('div.result-order-settings')); - const childElementToBeSelected = orderSetting.query(By.css('option[value="score,DESC"][selected="selected"]')); - expect(childElementToBeSelected).toBeDefined(); + const childElementToBeSelected = orderSetting.query(By.css('option[value="score,DESC"]')); + expect(childElementToBeSelected).not.toBeNull(); + expect(childElementToBeSelected.nativeElement.selected).toBeTrue(); }); }); diff --git a/src/app/shared/search/search-switch-configuration/search-switch-configuration.component.spec.ts b/src/app/shared/search/search-switch-configuration/search-switch-configuration.component.spec.ts index fadde46e53..8fc178c67a 100644 --- a/src/app/shared/search/search-switch-configuration/search-switch-configuration.component.spec.ts +++ b/src/app/shared/search/search-switch-configuration/search-switch-configuration.component.spec.ts @@ -78,7 +78,7 @@ describe('SearchSwitchConfigurationComponent', () => { it('should display select field properly', () => { const selectField = fixture.debugElement.query(By.css('.form-control')); - expect(selectField).toBeDefined(); + expect(selectField).not.toBeNull(); const childElements = selectField.children; expect(childElements.length).toEqual(comp.configurationList.length); diff --git a/src/app/submission/form/section-add/submission-form-section-add.component.spec.ts b/src/app/submission/form/section-add/submission-form-section-add.component.spec.ts index 971b15d7b0..a8ad7fbe49 100644 --- a/src/app/submission/form/section-add/submission-form-section-add.component.spec.ts +++ b/src/app/submission/form/section-add/submission-form-section-add.component.spec.ts @@ -96,6 +96,7 @@ describe('SubmissionFormSectionAddComponent Component', () => { afterEach(() => { testFixture.destroy(); + testFixture.debugElement.nativeElement.remove(); }); it('should create SubmissionFormSectionAddComponent', inject([SubmissionFormSectionAddComponent], (app: SubmissionFormSectionAddComponent) => { @@ -163,7 +164,7 @@ describe('SubmissionFormSectionAddComponent Component', () => { it('should have dropdown menu closed', () => { - expect(dropdowBtn).not.toBeUndefined(); + expect(dropdowBtn).not.toBeNull(); expect(dropdownMenu.nativeElement.classList).not.toContain('show'); }); diff --git a/src/app/submission/sections/container/section-container.component.spec.ts b/src/app/submission/sections/container/section-container.component.spec.ts index 7568b17ea7..8a4b3ebc56 100644 --- a/src/app/submission/sections/container/section-container.component.spec.ts +++ b/src/app/submission/sections/container/section-container.component.spec.ts @@ -137,7 +137,7 @@ describe('SubmissionSectionContainerComponent test suite', () => { const section = fixture.debugElement.query(By.css('[id^=\'sectionContent_\']')); expect(comp.getSectionContent).toHaveBeenCalled(); - expect(section).toBeDefined(); + expect(section).not.toBeNull(); }); it('should call removeSection properly', () => { @@ -165,7 +165,7 @@ describe('SubmissionSectionContainerComponent test suite', () => { fixture.detectChanges(); sectionErrorsDiv = fixture.debugElement.query(By.css('[id^=\'sectionGenericError_\']')); - expect(sectionErrorsDiv).toBeDefined(); + expect(sectionErrorsDiv).not.toBeNull(); }); it('should display warning icon', () => { @@ -180,7 +180,7 @@ describe('SubmissionSectionContainerComponent test suite', () => { const iconWarn = fixture.debugElement.query(By.css('i.text-warning')); const iconErr = fixture.debugElement.query(By.css('i.text-danger')); const iconSuccess = fixture.debugElement.query(By.css('i.text-success')); - expect(iconWarn).toBeDefined(); + expect(iconWarn).not.toBeNull(); expect(iconErr).toBeNull(); expect(iconSuccess).toBeNull(); }); @@ -198,7 +198,7 @@ describe('SubmissionSectionContainerComponent test suite', () => { const iconErr = fixture.debugElement.query(By.css('i.text-danger')); const iconSuccess = fixture.debugElement.query(By.css('i.text-success')); expect(iconWarn).toBeNull(); - expect(iconErr).toBeDefined(); + expect(iconErr).not.toBeNull(); expect(iconSuccess).toBeNull(); }); @@ -216,7 +216,7 @@ describe('SubmissionSectionContainerComponent test suite', () => { const iconSuccess = fixture.debugElement.query(By.css('i.text-success')); expect(iconWarn).toBeNull(); expect(iconErr).toBeNull(); - expect(iconSuccess).toBeDefined(); + expect(iconSuccess).not.toBeNull(); }); }); @@ -224,7 +224,7 @@ describe('SubmissionSectionContainerComponent test suite', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', + selector: '', template: `` }) class TestComponent { From 4f14d66400e069fe69797171f6e0469aa97e9591 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Sun, 19 Feb 2023 01:04:25 +0100 Subject: [PATCH 31/45] Fixed lint issues --- src/app/shared/browse-by/browse-by.component.spec.ts | 1 + .../page-size-selector/page-size-selector.component.spec.ts | 2 +- .../sections/container/section-container.component.spec.ts | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/shared/browse-by/browse-by.component.spec.ts b/src/app/shared/browse-by/browse-by.component.spec.ts index 83bbe15801..87bc2eb99e 100644 --- a/src/app/shared/browse-by/browse-by.component.spec.ts +++ b/src/app/shared/browse-by/browse-by.component.spec.ts @@ -47,6 +47,7 @@ import { getMockThemeService } from '../mocks/theme-service.mock'; @listableObjectComponent(BrowseEntry, ViewMode.ListElement, DEFAULT_CONTEXT, 'custom') @Component({ + // eslint-disable-next-line @angular-eslint/component-selector selector: '', template: '' }) diff --git a/src/app/shared/page-size-selector/page-size-selector.component.spec.ts b/src/app/shared/page-size-selector/page-size-selector.component.spec.ts index 80956e7184..6b0e9d265b 100644 --- a/src/app/shared/page-size-selector/page-size-selector.component.spec.ts +++ b/src/app/shared/page-size-selector/page-size-selector.component.spec.ts @@ -87,7 +87,7 @@ describe('PageSizeSelectorComponent', () => { const pageSizeSetting = fixture.debugElement.query(By.css('div.page-size-settings')); const childElementToBeSelected = pageSizeSetting.query(By.css('option[value="10"]')); expect(childElementToBeSelected).not.toBeNull(); - expect(childElementToBeSelected.nativeElement.selected).toBeTrue() + expect(childElementToBeSelected.nativeElement.selected).toBeTrue(); done(); }); }); diff --git a/src/app/submission/sections/container/section-container.component.spec.ts b/src/app/submission/sections/container/section-container.component.spec.ts index 8a4b3ebc56..d3f4a93762 100644 --- a/src/app/submission/sections/container/section-container.component.spec.ts +++ b/src/app/submission/sections/container/section-container.component.spec.ts @@ -224,6 +224,7 @@ describe('SubmissionSectionContainerComponent test suite', () => { // declare a test component @Component({ + // eslint-disable-next-line @angular-eslint/component-selector selector: '', template: `` }) From 17afdfa34b2786a7450012dcb74a17fa2f4c76e7 Mon Sep 17 00:00:00 2001 From: cris Date: Tue, 21 Feb 2023 22:44:45 +0000 Subject: [PATCH 32/45] avoiding error when user unselect a filter option --- .../search-labels/search-label/search-label.component.ts | 4 +++- .../shared/search/search-labels/search-labels.component.ts | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/shared/search/search-labels/search-label/search-label.component.ts b/src/app/shared/search/search-labels/search-label/search-label.component.ts index 74526ad2ad..ab4c57d9f5 100644 --- a/src/app/shared/search/search-labels/search-label/search-label.component.ts +++ b/src/app/shared/search/search-labels/search-label/search-label.component.ts @@ -7,6 +7,7 @@ import { SearchService } from '../../../../core/shared/search/search.service'; import { currentPath } from '../../../utils/route.utils'; import { PaginationService } from '../../../../core/pagination/pagination.service'; import { SearchConfigurationService } from '../../../../core/shared/search/search-configuration.service'; +import { stripOperatorFromFilterValue } from '../../search.utils'; @Component({ selector: 'ds-search-label', @@ -83,7 +84,8 @@ export class SearchLabelComponent implements OnInit { normalizeFilterValue(value: string) { // const pattern = /,[^,]*$/g; const pattern = /,authority*$/g; - return value.replace(pattern, ''); + value = value.replace(pattern, ''); + return stripOperatorFromFilterValue(value); } private getFilterName(): string { diff --git a/src/app/shared/search/search-labels/search-labels.component.ts b/src/app/shared/search/search-labels/search-labels.component.ts index 8f77d73b21..2cc1919f50 100644 --- a/src/app/shared/search/search-labels/search-labels.component.ts +++ b/src/app/shared/search/search-labels/search-labels.component.ts @@ -4,7 +4,6 @@ import { Observable } from 'rxjs'; import { Params, Router } from '@angular/router'; import { SearchConfigurationService } from '../../../core/shared/search/search-configuration.service'; import { map } from 'rxjs/operators'; -import { stripOperatorFromFilterValue } from '../search.utils'; @Component({ selector: 'ds-search-labels', @@ -37,7 +36,7 @@ export class SearchLabelsComponent { const labels = {}; Object.keys(params) .forEach((key) => { - labels[key] = [...params[key].map((value) => stripOperatorFromFilterValue(value))]; + labels[key] = [...params[key].map((value) => value)]; }); return labels; }) From 5e726f891637cab49877b9165bc70a09a90655f2 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Wed, 22 Feb 2023 14:28:15 +0100 Subject: [PATCH 33/45] Made private constructor arguments protected to be accessible in themed components --- .../metadata-representation-list.component.ts | 6 ++++-- ...okup-relation-external-source-tab.component.ts | 13 +++++++------ ...ynamic-lookup-relation-search-tab.component.ts | 8 ++++---- .../shared/search-form/search-form.component.ts | 15 ++++++++------- 4 files changed, 23 insertions(+), 19 deletions(-) diff --git a/src/app/item-page/simple/metadata-representation-list/metadata-representation-list.component.ts b/src/app/item-page/simple/metadata-representation-list/metadata-representation-list.component.ts index d5e6547778..59a5377f77 100644 --- a/src/app/item-page/simple/metadata-representation-list/metadata-representation-list.component.ts +++ b/src/app/item-page/simple/metadata-representation-list/metadata-representation-list.component.ts @@ -59,8 +59,10 @@ export class MetadataRepresentationListComponent extends AbstractIncrementalList */ total: number; - constructor(public relationshipService: RelationshipDataService, - private browseDefinitionDataService: BrowseDefinitionDataService) { + constructor( + public relationshipService: RelationshipDataService, + protected browseDefinitionDataService: BrowseDefinitionDataService, + ) { super(); } diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component.ts index 22fcc4e8bb..601bd8cce8 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component.ts @@ -124,12 +124,13 @@ export class DsDynamicLookupRelationExternalSourceTabComponent implements OnInit */ relatedEntityType: ItemType; - constructor(private router: Router, - public searchConfigService: SearchConfigurationService, - private externalSourceService: ExternalSourceDataService, - private modalService: NgbModal, - private selectableListService: SelectableListService, - private paginationService: PaginationService + constructor( + protected router: Router, + public searchConfigService: SearchConfigurationService, + protected externalSourceService: ExternalSourceDataService, + protected modalService: NgbModal, + protected selectableListService: SelectableListService, + protected paginationService: PaginationService, ) { } diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.ts index cd4a8f7690..9452918a97 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.ts @@ -147,12 +147,12 @@ export class DsDynamicLookupRelationSearchTabComponent implements OnInit, OnDest @Output() resultFound: EventEmitter> = new EventEmitter>(); constructor( - private searchService: SearchService, - private selectableListService: SelectableListService, + protected searchService: SearchService, + protected selectableListService: SelectableListService, public searchConfigService: SearchConfigurationService, public lookupRelationService: LookupRelationService, - private relationshipService: RelationshipDataService, - private paginationService: PaginationService + protected relationshipService: RelationshipDataService, + protected paginationService: PaginationService, ) { } diff --git a/src/app/shared/search-form/search-form.component.ts b/src/app/shared/search-form/search-form.component.ts index 4d267381d8..9a569d1bb2 100644 --- a/src/app/shared/search-form/search-form.component.ts +++ b/src/app/shared/search-form/search-form.component.ts @@ -74,12 +74,13 @@ export class SearchFormComponent implements OnInit { */ @Output() submitSearch = new EventEmitter(); - constructor(private router: Router, - private searchService: SearchService, - private paginationService: PaginationService, - private searchConfig: SearchConfigurationService, - private modalService: NgbModal, - private dsoService: DSpaceObjectDataService + constructor( + protected router: Router, + protected searchService: SearchService, + protected paginationService: PaginationService, + protected searchConfig: SearchConfigurationService, + protected modalService: NgbModal, + protected dsoService: DSpaceObjectDataService, ) { } @@ -120,7 +121,7 @@ export class SearchFormComponent implements OnInit { updateSearch(data: any) { const queryParams = Object.assign({}, data); - this.router.navigate(this.getSearchLinkParts(), { + void this.router.navigate(this.getSearchLinkParts(), { queryParams: queryParams, queryParamsHandling: 'merge' }); From 0a4f027129297994007e15ef7b5875aafa07dec5 Mon Sep 17 00:00:00 2001 From: lotte Date: Thu, 23 Feb 2023 15:44:06 +0100 Subject: [PATCH 34/45] 99615: Fixed #2087 and #2088 --- .../field-components/file-section/file-section.component.html | 2 +- .../file-download-link/file-download-link.component.html | 2 +- .../item/item-search-result-list-element.component.html | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/item-page/simple/field-components/file-section/file-section.component.html b/src/app/item-page/simple/field-components/file-section/file-section.component.html index 9d61b0a0e0..2f23f931bc 100644 --- a/src/app/item-page/simple/field-components/file-section/file-section.component.html +++ b/src/app/item-page/simple/field-components/file-section/file-section.component.html @@ -3,7 +3,7 @@
    {{file?.name}} - ({{(file?.sizeBytes) | dsFileSize }}) + ({{(file?.sizeBytes) | dsFileSize }}) diff --git a/src/app/shared/file-download-link/file-download-link.component.html b/src/app/shared/file-download-link/file-download-link.component.html index ba81ee3d20..8ebe622a5b 100644 --- a/src/app/shared/file-download-link/file-download-link.component.html +++ b/src/app/shared/file-download-link/file-download-link.component.html @@ -1,5 +1,5 @@ - + diff --git a/src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.html b/src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.html index 6b2951495d..d7a462e62c 100644 --- a/src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.html +++ b/src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.html @@ -25,7 +25,8 @@ - ( + ( + , ) From af23a3a8e3603f9c90dd8032ee993c53729b7540 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Thu, 23 Feb 2023 21:56:04 +0100 Subject: [PATCH 35/45] Fixed css issues of LogInComponent where text would overflow --- src/app/shared/log-in/log-in.component.html | 2 +- src/app/shared/log-in/log-in.component.scss | 5 +++++ 2 files changed, 6 insertions(+), 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 8fb5a33954..302ff1aca8 100644 --- a/src/app/shared/log-in/log-in.component.html +++ b/src/app/shared/log-in/log-in.component.html @@ -1,5 +1,5 @@ -