Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenAlex Integration #4017

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import {
ChangeDetectorRef,
Component,
EventEmitter,
Input,
Output,
} from '@angular/core';
import { ThemedComponent } from 'src/app/shared/theme-support/themed.component';

import { DSpaceObject } from '../../../../core/shared/dspace-object.model';
import { ThemeService } from '../../../theme-support/theme.service';
import { CreateItemParentSelectorComponent } from './create-item-parent-selector.component';

/**
Expand All @@ -18,20 +23,29 @@
})
export class ThemedCreateItemParentSelectorComponent
extends ThemedComponent<CreateItemParentSelectorComponent> {
@Input() entityType: string;
@Input() entityType: string;
@Output() select: EventEmitter<DSpaceObject> = new EventEmitter<DSpaceObject>();
@Input() emitOnly = false;

Check warning on line 28 in src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts

View check run for this annotation

Codecov / codecov/patch

src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts#L27-L28

Added lines #L27 - L28 were not covered by tests

protected inAndOutputNames: (keyof CreateItemParentSelectorComponent & keyof this)[] = ['entityType'];
protected inAndOutputNames: (keyof CreateItemParentSelectorComponent & keyof this)[] = ['entityType', 'select', 'emitOnly'];

Check warning on line 30 in src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts

View check run for this annotation

Codecov / codecov/patch

src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts#L30

Added line #L30 was not covered by tests

protected getComponentName(): string {
return 'CreateItemParentSelectorComponent';
}
constructor(
protected cdr: ChangeDetectorRef,
protected themeService: ThemeService,

Check warning on line 34 in src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts

View check run for this annotation

Codecov / codecov/patch

src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts#L33-L34

Added lines #L33 - L34 were not covered by tests
) {
super(cdr, themeService);

Check warning on line 36 in src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts

View check run for this annotation

Codecov / codecov/patch

src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts#L36

Added line #L36 was not covered by tests
}

protected importThemedComponent(themeName: string): Promise<any> {
return import(`../../../../../themes/${themeName}/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component`);
}
protected getComponentName(): string {
return 'CreateItemParentSelectorComponent';

Check warning on line 40 in src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts

View check run for this annotation

Codecov / codecov/patch

src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts#L40

Added line #L40 was not covered by tests
}

protected importUnthemedComponent(): Promise<any> {
return import('./create-item-parent-selector.component');
}
protected importThemedComponent(themeName: string): Promise<any> {
return import(`../../../../../themes/${themeName}/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component`);

Check warning on line 44 in src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts

View check run for this annotation

Codecov / codecov/patch

src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts#L44

Added line #L44 was not covered by tests
}

protected importUnthemedComponent(): Promise<any> {
return import('./create-item-parent-selector.component');

Check warning on line 48 in src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts

View check run for this annotation

Codecov / codecov/patch

src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts#L48

Added line #L48 was not covered by tests
}

}
24 changes: 24 additions & 0 deletions src/assets/i18n/en.json5
Original file line number Diff line number Diff line change
Expand Up @@ -2852,6 +2852,8 @@

"item.preview.person.identifier.orcid": "ORCID:",

"item.preview.person.affiliation.name": "Affiliations:",

"item.preview.project.funder.name": "Funder:",

"item.preview.project.funder.identifier": "Funder Identifier:",
Expand Down Expand Up @@ -2880,6 +2882,14 @@

"item.preview.dspace.entity.type": "Entity Type:",

"item.preview.creativework.publisher": "Publisher",

"item.preview.creativeworkseries.issn": "ISSN",

"item.preview.dc.identifier.openalex": "OpenAlex Identifier",

"item.preview.dc.description": "Description",

"item.select.confirm": "Confirm selected",

"item.select.empty": "No items to show",
Expand Down Expand Up @@ -4840,6 +4850,20 @@

"submission.import-external.source.ror": "Research Organization Registry (ROR)",

"submission.import-external.source.openalexPublication": "OpenAlex Search by Title",

"submission.import-external.source.openalexPublicationByAuthorId": "OpenAlex Search by Author ID",

"submission.import-external.source.openalexPerson": "OpenAlex Search by name",

"submission.import-external.source.openalexJournal": "OpenAlex Journals",

"submission.import-external.source.openalexInstitution": "OpenAlex Institutions",

"submission.import-external.source.openalexPublisher": "OpenAlex Publishers",

"submission.import-external.source.openalexFunder": "OpenAlex Funders",

"submission.import-external.preview.title": "Item Preview",

"submission.import-external.preview.title.Publication": "Publication Preview",
Expand Down
Loading