openaire-library/landingPages/landing-utils/entity-metadata.component.ts

273 lines
14 KiB
TypeScript
Raw Normal View History

import {Component, Input} from "@angular/core";
import {EnvProperties} from "../../utils/properties/env-properties";
import {properties} from "../../../../environments/environment";
import {OpenaireEntities} from "../../utils/properties/searchFields";
2023-02-20 17:17:30 +01:00
import {Organization, Project} from "../../utils/result-preview/result-preview";
@Component({
selector: 'entity-metadata',
template: `
<div class="uk-text-xsmall uk-text-emphasis uk-flex uk-flex-middle uk-flex-wrap">
<!-- oa -->
<ng-container
*ngIf="(openAccessMandatePublications != undefined && openAccessMandatePublications) || (openAccessMandateDatasets != undefined && openAccessMandateDatasets)">
<span class="uk-margin-xsmall-right open-access">
<icon name="open_access" [flex]="true" [ratio]="0.8"></icon>
</span>
<span class="uk-text-bolder"
*ngIf="openAccessMandatePublications != undefined && openAccessMandatePublications && openAccessMandateDatasets != undefined && openAccessMandateDatasets">
Open Access Mandate for {{openaireEntities.PUBLICATIONS}} and {{openaireEntities.DATASETS}}
</span>
<span class="uk-text-bolder"
*ngIf="openAccessMandatePublications != undefined && openAccessMandatePublications && (openAccessMandateDatasets == undefined || !openAccessMandateDatasets)">
Open Access Mandate for {{openaireEntities.PUBLICATIONS}}
</span>
<span class="uk-text-bolder"
*ngIf="openAccessMandateDatasets != undefined && openAccessMandateDatasets && (openAccessMandatePublications == undefined || !openAccessMandatePublications)">
Open Access Mandate for {{openaireEntities.DATASETS}}
</span>
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
</ng-container>
<!-- types -->
<span *ngIf="entityType" class="uk-margin-xsmall-right">
<icon *ngIf="entityType.toLowerCase() == 'publication'" name="description" type="outlined"
[flex]="true" [ratio]="0.8"></icon>
<icon *ngIf="entityType.toLowerCase() == 'research data'" name="database" type="outlined"
[flex]="true" [ratio]="0.8"></icon>
<icon *ngIf="entityType.toLowerCase() == 'research software'" name="integration_instructions"
type="outlined" [flex]="true" [ratio]="0.8"></icon>
<icon *ngIf="entityType.toLowerCase() == 'other research product'" name="apps" type="outlined"
[flex]="true" [ratio]="0.8"></icon>
<icon *ngIf="entityType.toLowerCase() == 'project'" name="assignment_turned_in" type="outlined"
[flex]="true" [ratio]="0.8"></icon>
<icon *ngIf="entityType.toLowerCase() == 'data source'" name="note_add" type="outlined"
[flex]="true" [ratio]="0.8"></icon>
<icon *ngIf="entityType.toLowerCase() == 'organization'" name="corporate_fare" type="outlined"
[flex]="true" [ratio]="0.8"></icon>
</span>
<u *ngIf="entityType" class="uk-text-capitalize uk-text-bolder">{{entityType}}</u>
<span *ngIf="entityType && types && removeUnknown(types, true).length > 0">
<icon name="keyboard_double_arrow_right" [flex]="true" [ratio]="0.8"></icon>
</span>
<span *ngIf="types && removeUnknown(types, true).length > 0" class="uk-text-italic">
{{removeUnknown(types, true).join(' , ')}}
</span>
<!-- years -->
<ng-container *ngIf="year">
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
<span>{{year}}</span>
</ng-container>
<ng-container *ngIf="startYear && !endYear">
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
<span>{{startYear}}</span>
</ng-container>
<ng-container *ngIf="!startYear && endYear">
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
<span>{{endYear}}</span>
</ng-container>
<ng-container *ngIf="startYear && endYear">
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
<ng-container>
<span>{{startYear}} - {{endYear}}</span>
</ng-container>
</ng-container>
<!-- dates -->
<ng-container *ngIf="startDate && !endDate">
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
<span class="uk-margin-xsmall-right">From</span>
<span>{{startDate | date: 'dd MMM yyyy'}}</span>
</ng-container>
<ng-container *ngIf="!startDate && endDate">
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
<span class="uk-margin-xsmall-right">Until</span>
<span>{{endDate | date: 'dd MMM yyyy'}}</span>
</ng-container>
<ng-container *ngIf="startDate && endDate">
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
<ng-container *ngIf="startDate">
<span>{{startDate | date: 'dd MMM yyyy'}}</span>
<span class="uk-margin-xsmall-left">(Started)</span>
</ng-container>
<span *ngIf="startDate && endDate" class="uk-margin-xsmall-left uk-margin-xsmall-right">-</span>
<ng-container *ngIf="endDate">
<span>{{endDate | date: 'dd MMM yyyy'}}</span>
<span class="uk-margin-xsmall-left">{{currentDate >= endDate ? '(Ended)' : '(Ending)'}}</span>
</ng-container>
</ng-container>
<ng-container *ngIf="status">
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
<span>{{status}}</span>
</ng-container>
<ng-container *ngIf="date">
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
<span>{{date | date: 'dd MMM yyyy': 'UTC'}}</span>
</ng-container>
<ng-container *ngIf="embargoEndDate">
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
<span>Embargo end date: {{embargoEndDate | date: 'dd MMM yyyy'}}</span>
</ng-container>
<span *ngIf="underCuration">
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
<span title="{{buildCurationTooltip()}}"uk-tooltip="pos:bottom-right; delay:10;"
class="uk-text-primary">Under curation</span>
</span>
<!-- countries -->
<ng-container *ngIf="countries && removeUnknown(countries).length > 0">
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
<ng-container *ngFor="let country of removeUnknown(countries)">
<span>{{country}}</span>
</ng-container>
</ng-container>
<!-- languages -->
<ng-container *ngIf="languages && removeUnknown(languages).length > 0">
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
<ng-container *ngFor="let language of removeUnknown(languages)">
<span>{{language}}</span>
</ng-container>
</ng-container>
<!-- programming languages -->
<ng-container *ngIf="programmingLanguages && programmingLanguages.length > 0">
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
<ng-container *ngFor="let programmingLanguage of programmingLanguages">
<span>{{programmingLanguage}}</span>
</ng-container>
</ng-container>
<!-- published info -->
<showPublisher [publisher]="publisher" [journal]="journal" [properties]="properties"></showPublisher>
<!-- data provider labels -->
<ng-container *ngIf="compatibility && !(compatibility.info == 'not available' && type == 'service')">
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
<span uk-tooltip title="Compatibility">
<a *ngIf="compatibility.id"
[queryParams]="{datasourceId: compatibility.id}" routerLinkActive="router-link-active"
[routerLink]="properties.searchLinkToDataProvider.split('?')[0]">
{{compatibility.info}}
<ng-container *ngIf="compatibility.name">{{compatibility.name}}</ng-container>
</a>
<span *ngIf="!compatibility.id && compatibility.info">
<ng-container
*ngIf="compatibility.info.toLowerCase() != 'not yet registered'">{{compatibility.info}}</ng-container>
<ng-container *ngIf="compatibility.info.toLowerCase() == 'not yet registered'">
{{compatibility.info}} <span *ngIf="properties.adminToolsPortalType == 'eosc'">in OpenAIRE</span>
</ng-container>
</span>
<span *ngIf="compatibility.name && !compatibility.id">
{{compatibility.name}}
</span>
</span>
</ng-container>
<ng-container *ngIf="compatibilityString">
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
<span uk-tooltip title="Compatibility">{{compatibilityString}}</span>
</ng-container>
<ng-container
*ngIf="aggregationStatus && aggregationStatus.fulltexts && aggregationStatus.fulltexts > 0">
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
<span>OpenAIRE Text Mining</span>
</ng-container>
<ng-container *ngIf="thematic">
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
<span>Thematic</span>
</ng-container>
2023-02-20 17:17:30 +01:00
<!-- Projects -->
<ng-container *ngIf="projects && projects.length > 0">
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
[Library | explore-redesign]: Fixes on FoS and SDGs suggest modal (checked existing subjects, added loading) - In FoS fixed scrolling, search and final response of selected fields. 1. composer.ts & resultLanding.component.ts: Removed "and Technology" from "Fields of Science" typename. 2. resultLanding.component.html: Bind (suggestClicked) to <fos> instead of (feedbackClicked). 3. input.component.ts: [Bug fix] Added check in "filter()" method if option.label. 4. sdg-selection.component.ts: [Bug fix] Set this.loading = false; inside subscribe. 5. fos.component.ts: In title, updated FOS to FoS. 6. sdg-fos-suggest.module.ts: Imported LoadingModule. 7. sdg-fos-suggest.component.ts: Show loading when sending email | Do not initialize <sdg-selection> and <fos-selection> before subjects have value (this way inputs of existing fos/sdgs are checked). 8. fos-selection.component.ts: a. Added @Input() inModal: boolean = false; to set activeSection, when inModal, instead of navigating with fragment. b. [Bug fix] Set this.loading = false; inside subscribe. c. Call this.setObserver(); both in ngOnInit and when keyword changes. d. Updated threshold of observer from 0.25 to 0.1 (large FoS categories were never triggered on scrolling, because less than 25% of their content was visible). e. Updated fosOptions to Map<string, boolean> to track easily checked inputs and updated getSelectedSubjects() accordingly. 9. fos-selection.component.html: In search-input of keyword no options are needed | Updated ngModel of checkbox inputs. 10. cache-interceptor.service.ts: Added check if (!properties.useLongCache) to skip cache.
2023-02-20 19:54:26 +01:00
<span uk-tooltip="Project" *ngFor="let project of projects.slice(0,3) let i=index">
2023-02-20 17:17:30 +01:00
<span class="space">
{{project.funderShortname ? project.funderShortname : project.funderName}}
</span>
<span *ngIf="project.acronym || project.title">
| {{ project.acronym ? project.acronym : (project.title.length > 25 ?
project.title.substring(0, 25) + '...' : project.title)}}
</span>
<span *ngIf="project.code"> ({{project.code}})</span>
<span *ngIf="i < projects.length-1">, </span>
</span>
[Library | explore-redesign]: Fixes on FoS and SDGs suggest modal (checked existing subjects, added loading) - In FoS fixed scrolling, search and final response of selected fields. 1. composer.ts & resultLanding.component.ts: Removed "and Technology" from "Fields of Science" typename. 2. resultLanding.component.html: Bind (suggestClicked) to <fos> instead of (feedbackClicked). 3. input.component.ts: [Bug fix] Added check in "filter()" method if option.label. 4. sdg-selection.component.ts: [Bug fix] Set this.loading = false; inside subscribe. 5. fos.component.ts: In title, updated FOS to FoS. 6. sdg-fos-suggest.module.ts: Imported LoadingModule. 7. sdg-fos-suggest.component.ts: Show loading when sending email | Do not initialize <sdg-selection> and <fos-selection> before subjects have value (this way inputs of existing fos/sdgs are checked). 8. fos-selection.component.ts: a. Added @Input() inModal: boolean = false; to set activeSection, when inModal, instead of navigating with fragment. b. [Bug fix] Set this.loading = false; inside subscribe. c. Call this.setObserver(); both in ngOnInit and when keyword changes. d. Updated threshold of observer from 0.25 to 0.1 (large FoS categories were never triggered on scrolling, because less than 25% of their content was visible). e. Updated fosOptions to Map<string, boolean> to track easily checked inputs and updated getSelectedSubjects() accordingly. 9. fos-selection.component.html: In search-input of keyword no options are needed | Updated ngModel of checkbox inputs. 10. cache-interceptor.service.ts: Added check if (!properties.useLongCache) to skip cache.
2023-02-20 19:54:26 +01:00
<span *ngIf="projects.length > 3">...</span>
2023-02-20 17:17:30 +01:00
</ng-container>
<!-- Organizations -->
<ng-container *ngIf="organizations && organizations.length > 0">
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
[Library | explore-redesign]: Fixes on FoS and SDGs suggest modal (checked existing subjects, added loading) - In FoS fixed scrolling, search and final response of selected fields. 1. composer.ts & resultLanding.component.ts: Removed "and Technology" from "Fields of Science" typename. 2. resultLanding.component.html: Bind (suggestClicked) to <fos> instead of (feedbackClicked). 3. input.component.ts: [Bug fix] Added check in "filter()" method if option.label. 4. sdg-selection.component.ts: [Bug fix] Set this.loading = false; inside subscribe. 5. fos.component.ts: In title, updated FOS to FoS. 6. sdg-fos-suggest.module.ts: Imported LoadingModule. 7. sdg-fos-suggest.component.ts: Show loading when sending email | Do not initialize <sdg-selection> and <fos-selection> before subjects have value (this way inputs of existing fos/sdgs are checked). 8. fos-selection.component.ts: a. Added @Input() inModal: boolean = false; to set activeSection, when inModal, instead of navigating with fragment. b. [Bug fix] Set this.loading = false; inside subscribe. c. Call this.setObserver(); both in ngOnInit and when keyword changes. d. Updated threshold of observer from 0.25 to 0.1 (large FoS categories were never triggered on scrolling, because less than 25% of their content was visible). e. Updated fosOptions to Map<string, boolean> to track easily checked inputs and updated getSelectedSubjects() accordingly. 9. fos-selection.component.html: In search-input of keyword no options are needed | Updated ngModel of checkbox inputs. 10. cache-interceptor.service.ts: Added check if (!properties.useLongCache) to skip cache.
2023-02-20 19:54:26 +01:00
<span uk-tooltip="Partner" *ngFor="let organization of organizations.slice(0,3) let i=index">
2023-02-20 17:17:30 +01:00
<span class="space">{{organization.name}}</span>
[Library | explore-redesign]: Fixes on FoS and SDGs suggest modal (checked existing subjects, added loading) - In FoS fixed scrolling, search and final response of selected fields. 1. composer.ts & resultLanding.component.ts: Removed "and Technology" from "Fields of Science" typename. 2. resultLanding.component.html: Bind (suggestClicked) to <fos> instead of (feedbackClicked). 3. input.component.ts: [Bug fix] Added check in "filter()" method if option.label. 4. sdg-selection.component.ts: [Bug fix] Set this.loading = false; inside subscribe. 5. fos.component.ts: In title, updated FOS to FoS. 6. sdg-fos-suggest.module.ts: Imported LoadingModule. 7. sdg-fos-suggest.component.ts: Show loading when sending email | Do not initialize <sdg-selection> and <fos-selection> before subjects have value (this way inputs of existing fos/sdgs are checked). 8. fos-selection.component.ts: a. Added @Input() inModal: boolean = false; to set activeSection, when inModal, instead of navigating with fragment. b. [Bug fix] Set this.loading = false; inside subscribe. c. Call this.setObserver(); both in ngOnInit and when keyword changes. d. Updated threshold of observer from 0.25 to 0.1 (large FoS categories were never triggered on scrolling, because less than 25% of their content was visible). e. Updated fosOptions to Map<string, boolean> to track easily checked inputs and updated getSelectedSubjects() accordingly. 9. fos-selection.component.html: In search-input of keyword no options are needed | Updated ngModel of checkbox inputs. 10. cache-interceptor.service.ts: Added check if (!properties.useLongCache) to skip cache.
2023-02-20 19:54:26 +01:00
<span *ngIf="i < organizations.length-1">, </span>
2023-02-20 17:17:30 +01:00
</span>
[Library | explore-redesign]: Fixes on FoS and SDGs suggest modal (checked existing subjects, added loading) - In FoS fixed scrolling, search and final response of selected fields. 1. composer.ts & resultLanding.component.ts: Removed "and Technology" from "Fields of Science" typename. 2. resultLanding.component.html: Bind (suggestClicked) to <fos> instead of (feedbackClicked). 3. input.component.ts: [Bug fix] Added check in "filter()" method if option.label. 4. sdg-selection.component.ts: [Bug fix] Set this.loading = false; inside subscribe. 5. fos.component.ts: In title, updated FOS to FoS. 6. sdg-fos-suggest.module.ts: Imported LoadingModule. 7. sdg-fos-suggest.component.ts: Show loading when sending email | Do not initialize <sdg-selection> and <fos-selection> before subjects have value (this way inputs of existing fos/sdgs are checked). 8. fos-selection.component.ts: a. Added @Input() inModal: boolean = false; to set activeSection, when inModal, instead of navigating with fragment. b. [Bug fix] Set this.loading = false; inside subscribe. c. Call this.setObserver(); both in ngOnInit and when keyword changes. d. Updated threshold of observer from 0.25 to 0.1 (large FoS categories were never triggered on scrolling, because less than 25% of their content was visible). e. Updated fosOptions to Map<string, boolean> to track easily checked inputs and updated getSelectedSubjects() accordingly. 9. fos-selection.component.html: In search-input of keyword no options are needed | Updated ngModel of checkbox inputs. 10. cache-interceptor.service.ts: Added check if (!properties.useLongCache) to skip cache.
2023-02-20 19:54:26 +01:00
<span *ngIf="organizations.length > 3">...</span>
2023-02-20 17:17:30 +01:00
</ng-container>
<!-- Subjects -->
<ng-container *ngIf="subjects && subjects.length > 0">
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
[Library | explore-redesign]: Fixes on FoS and SDGs suggest modal (checked existing subjects, added loading) - In FoS fixed scrolling, search and final response of selected fields. 1. composer.ts & resultLanding.component.ts: Removed "and Technology" from "Fields of Science" typename. 2. resultLanding.component.html: Bind (suggestClicked) to <fos> instead of (feedbackClicked). 3. input.component.ts: [Bug fix] Added check in "filter()" method if option.label. 4. sdg-selection.component.ts: [Bug fix] Set this.loading = false; inside subscribe. 5. fos.component.ts: In title, updated FOS to FoS. 6. sdg-fos-suggest.module.ts: Imported LoadingModule. 7. sdg-fos-suggest.component.ts: Show loading when sending email | Do not initialize <sdg-selection> and <fos-selection> before subjects have value (this way inputs of existing fos/sdgs are checked). 8. fos-selection.component.ts: a. Added @Input() inModal: boolean = false; to set activeSection, when inModal, instead of navigating with fragment. b. [Bug fix] Set this.loading = false; inside subscribe. c. Call this.setObserver(); both in ngOnInit and when keyword changes. d. Updated threshold of observer from 0.25 to 0.1 (large FoS categories were never triggered on scrolling, because less than 25% of their content was visible). e. Updated fosOptions to Map<string, boolean> to track easily checked inputs and updated getSelectedSubjects() accordingly. 9. fos-selection.component.html: In search-input of keyword no options are needed | Updated ngModel of checkbox inputs. 10. cache-interceptor.service.ts: Added check if (!properties.useLongCache) to skip cache.
2023-02-20 19:54:26 +01:00
<span uk-tooltip="Subject" *ngFor="let subject of subjects.slice(0,3) let i = index">
2023-02-20 17:17:30 +01:00
<span class="space">{{subject}}</span>
[Library | explore-redesign]: Fixes on FoS and SDGs suggest modal (checked existing subjects, added loading) - In FoS fixed scrolling, search and final response of selected fields. 1. composer.ts & resultLanding.component.ts: Removed "and Technology" from "Fields of Science" typename. 2. resultLanding.component.html: Bind (suggestClicked) to <fos> instead of (feedbackClicked). 3. input.component.ts: [Bug fix] Added check in "filter()" method if option.label. 4. sdg-selection.component.ts: [Bug fix] Set this.loading = false; inside subscribe. 5. fos.component.ts: In title, updated FOS to FoS. 6. sdg-fos-suggest.module.ts: Imported LoadingModule. 7. sdg-fos-suggest.component.ts: Show loading when sending email | Do not initialize <sdg-selection> and <fos-selection> before subjects have value (this way inputs of existing fos/sdgs are checked). 8. fos-selection.component.ts: a. Added @Input() inModal: boolean = false; to set activeSection, when inModal, instead of navigating with fragment. b. [Bug fix] Set this.loading = false; inside subscribe. c. Call this.setObserver(); both in ngOnInit and when keyword changes. d. Updated threshold of observer from 0.25 to 0.1 (large FoS categories were never triggered on scrolling, because less than 25% of their content was visible). e. Updated fosOptions to Map<string, boolean> to track easily checked inputs and updated getSelectedSubjects() accordingly. 9. fos-selection.component.html: In search-input of keyword no options are needed | Updated ngModel of checkbox inputs. 10. cache-interceptor.service.ts: Added check if (!properties.useLongCache) to skip cache.
2023-02-20 19:54:26 +01:00
<span *ngIf="i < subjects.length - 1">, </span>
2023-02-20 17:17:30 +01:00
</span>
[Library | explore-redesign]: Fixes on FoS and SDGs suggest modal (checked existing subjects, added loading) - In FoS fixed scrolling, search and final response of selected fields. 1. composer.ts & resultLanding.component.ts: Removed "and Technology" from "Fields of Science" typename. 2. resultLanding.component.html: Bind (suggestClicked) to <fos> instead of (feedbackClicked). 3. input.component.ts: [Bug fix] Added check in "filter()" method if option.label. 4. sdg-selection.component.ts: [Bug fix] Set this.loading = false; inside subscribe. 5. fos.component.ts: In title, updated FOS to FoS. 6. sdg-fos-suggest.module.ts: Imported LoadingModule. 7. sdg-fos-suggest.component.ts: Show loading when sending email | Do not initialize <sdg-selection> and <fos-selection> before subjects have value (this way inputs of existing fos/sdgs are checked). 8. fos-selection.component.ts: a. Added @Input() inModal: boolean = false; to set activeSection, when inModal, instead of navigating with fragment. b. [Bug fix] Set this.loading = false; inside subscribe. c. Call this.setObserver(); both in ngOnInit and when keyword changes. d. Updated threshold of observer from 0.25 to 0.1 (large FoS categories were never triggered on scrolling, because less than 25% of their content was visible). e. Updated fosOptions to Map<string, boolean> to track easily checked inputs and updated getSelectedSubjects() accordingly. 9. fos-selection.component.html: In search-input of keyword no options are needed | Updated ngModel of checkbox inputs. 10. cache-interceptor.service.ts: Added check if (!properties.useLongCache) to skip cache.
2023-02-20 19:54:26 +01:00
<span *ngIf="subjects.length > 3">...</span>
2023-02-20 17:17:30 +01:00
</ng-container>
<ng-container *ngIf="provenanceAction">
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
<span>{{provenanceAction}}</span>
</ng-container>
<ng-container *ngIf="relationName">
<span class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
<span>{{relationName}}</span>
</ng-container>
</div>
`
})
export class EntityMetadataComponent {
@Input() entityType: string;
@Input() types: string[];
@Input() year: string; // search result
@Input() startDate: number; // project landing
@Input() startYear: string; // search result
@Input() endDate: number; // project landing
@Input() endYear: string; // search result
@Input() currentDate: number; // project landing
@Input() status: string; // project landing
@Input() openAccessMandatePublications: boolean // project landing
@Input() openAccessMandateDatasets: boolean // project landing
@Input() date: Date;
@Input() embargoEndDate: Date | string;
@Input() underCuration: boolean = false;
@Input() publisher; // showPublisher component
@Input() journal; // showPublisher component
@Input() countries;
@Input() languages;
@Input() programmingLanguages;
@Input() compatibilityString: string;
@Input() compatibility; // data provider landing
@Input() aggregationStatus; // data provider landing
@Input() thematic: boolean; // data provider landing
@Input() type; // data provider landing
@Input() provenanceAction: string; // search result
@Input() relationName: string; // search result
@Input() projects: Project[];
2023-02-20 17:17:30 +01:00
@Input() organizations: Organization[];
@Input() subjects: string[];
properties: EnvProperties = properties;
public openaireEntities = OpenaireEntities;
public removeUnknown(array: string[], type: boolean = false): string[] {
if (type) {
return this.removeDuplicates(array).filter(value => value.toLowerCase() !== 'unknown');
} else {
return array.filter(value => value.toLowerCase() !== 'unknown');
}
}
public removeDuplicates(array: string[]): string[] {
return array.filter(value => value.toLowerCase() !== this.entityType);
}
public buildCurationTooltip(): string {
let tooltipContent: string = "<div class='uk-padding-small'>";
tooltipContent += "<h5>Record in preview</h5>";
tooltipContent += "<p>Bibliographic record accepted by the system, but not yet processed by <br> OpenAIRE tools for information quality improvement and de-duplication</p>";
tooltipContent += "</div>";
return tooltipContent;
}
}