Compare commits

...

13 Commits

Author SHA1 Message Date
Konstantina Galouni 8672fb6359 [deprecated-angular-upgrade | DONE | FIXED]: number-utils.class.ts: avoid rounding numbers < 1000 (3-digit) | refineFieldResults.service.ts: Added method "getAllRefineFieldResultsByFieldName()" to get all values of a specific refine field (not just first 100) | numbers.component.ts: Updated method called in refine query to get funders of projects from "getRefineFieldsResultsByEntityName()" to "getAllRefineFieldResultsByFieldName()" to be able to get more than 100 funders each time. 2023-11-24 13:53:46 +02:00
Konstantinos Triantafyllou 93cdc71cf0 Update angular to version 16 2023-08-24 16:31:24 +03:00
Alex Martzios 145cd1dd94 Rename of 'content provider', 'dataset', 'software' 2023-03-21 10:52:57 +02:00
Alex Martzios 4dfe5f989a update OpenAIRE Graph name 2023-02-23 14:28:02 +02:00
Alex Martzios 8f2fce6a19 new menu entries for Graph 2022-12-20 14:19:26 +02:00
Alex Martzios e837d55e27 progress on changing the graph menu items 2022-12-20 10:04:16 +02:00
Alex Martzios 825e29b5af changes for FormGroup and FormBuilder 2022-12-15 13:00:31 +02:00
Alex Martzios b93dff4f1b Fix all Promises with type <any> to type <void> 2022-12-15 12:44:38 +02:00
Konstantina Galouni b90c7a4ebf [Library | Deprecated]: navigationBar.component.html: Added class="uk-position-top-right" to fix navbar - do not become sticky, stay on top fixed. 2022-09-27 15:23:04 +03:00
Alex Martzios 3c1429f6b7 update url for newsletter in the footer 2022-08-02 13:04:57 +03:00
argirok ad60292049 add [Beta] indication for FOS/SDGs 2022-04-18 16:26:56 +03:00
argirok 45be028336 remove b2note components, dependencies, properties and remove from landing 2022-04-15 17:01:32 +03:00
argirok 14b80fb1c3 update query for datasources (registries, journals, etc) 2022-04-15 16:59:41 +03:00
34 changed files with 69 additions and 480 deletions

View File

@ -1,6 +1,6 @@
import { Injectable, Inject, PLATFORM_ID } from '@angular/core';
import { HttpInterceptor, HttpRequest, HttpHandler } from '@angular/common/http';
import { TransferState } from '@angular/platform-browser';
import { TransferState } from '@angular/core';
import { properties } from "../../environments/environment";
@Injectable({

View File

@ -1,5 +1,5 @@
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
import {FormGroup} from '@angular/forms';
import {UntypedFormGroup} from '@angular/forms';
import {EnvProperties} from "../utils/properties/env-properties";
import {Observable} from "rxjs";
import {map, startWith} from "rxjs/operators";
@ -12,7 +12,7 @@ import {map, startWith} from "rxjs/operators";
export class ContactUsComponent {
@Input()
public contactForm: FormGroup;
public contactForm: UntypedFormGroup;
@Input() formTitle: string;
@Input() properties: EnvProperties;
@Output() sendEmitter: EventEmitter<any> = new EventEmitter<any>();

View File

@ -1,13 +1,13 @@
import {Observable} from 'rxjs';
import {take, tap} from 'rxjs/operators';
import {Injectable} from '@angular/core';
import {ActivatedRouteSnapshot, CanActivate, Data, Router, RouterStateSnapshot, UrlTree} from '@angular/router';
import { ActivatedRouteSnapshot, Data, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
import {ConfigurationService} from '../utils/configuration/configuration.service';
import {ConnectHelper} from '../connect/connectHelper';
import {properties} from "../../../environments/environment";
@Injectable()
export class IsRouteEnabled implements CanActivate {
export class IsRouteEnabled {
constructor(private router: Router,
private config: ConfigurationService) {

View File

@ -2,7 +2,7 @@ import { Injectable, Inject, PLATFORM_ID } from '@angular/core';
import { HttpInterceptor, HttpRequest, HttpHandler, HttpEvent, HttpResponse } from '@angular/common/http';
import { Observable, of } from 'rxjs';
import { tap } from 'rxjs/operators';
import { TransferState, makeStateKey, StateKey } from '@angular/platform-browser';
import { TransferState, makeStateKey, StateKey } from '@angular/core';
import { isPlatformServer } from '@angular/common';
import {properties} from "../../environments/environment";

View File

@ -1,225 +0,0 @@
import {
Component,
ElementRef,
EventEmitter,
HostListener,
Input,
OnDestroy,
OnInit,
Output,
ViewChild
} from "@angular/core";
import {Annotation, AnnotationService} from "./annotation.service";
import {ResultLandingInfo} from "../../utils/entities/resultLandingInfo";
import {EnvProperties} from "../../utils/properties/env-properties";
import {properties} from "../../../../environments/environment";
import {UserManagementService} from "../../services/user-management.service";
import {COOKIE, Session, User} from "../../login/utils/helper.class";
import {Subscriber} from "rxjs";
@Component({
selector: 'b2note',
template: `
<div *ngIf="annotations && annotations.length > 0" class="sideInfoTitle uk-margin-small-bottom">Annotations</div>
<div class="b2note">
<form #form ngNoForm *ngIf="pid && isLoggedIn"
[action]="properties.b2noteAPIURL + 'widget'"
method="post"
target="b2note_iframe"
class="uk-padding-small uk-padding-remove-vertical">
<!--URL of the annotated record-->
<input
type="hidden"
name="recordurl_tofeed"
[value]="url">
<!--PID of the annotated record-->
<input
type="hidden"
name="pid_tofeed"
[value]="pid">
</form>
<loading *ngIf="loading" class="uk-margin-medium-top"></loading>
<ul *ngIf="annotations && !loading" class="uk-list uk-list-divider">
<li *ngFor="let annotation of annotations.slice(0, visibleAnnotations); let i=index" uk-grid
class="uk-flex uk-flex-top uk-margin-remove-left">
<div [ngClass]="annotation.type" class="type">{{annotation.type}}</div>
<div [class.uk-width-1-3]="annotation.targets"
[class.uk-width-1-6@s]="annotation.targets">{{annotation.text}}</div>
<ul class="uk-width-expand uk-list uk-margin-remove-top" *ngIf="annotation.targets">
<li *ngFor="let target of annotation.targets.slice(0, annotation.targetSize)">
<a *ngIf="target.url" [href]="target.url" target="_blank">{{target.id}}</a>
<a *ngIf="!target.url" routerLink="/search/result"
[queryParams]="searchPid(target.id)">{{target.id}}</a>
</li>
<li *ngIf="annotation.targetSize < annotation.targets.length"><a
(click)="open(i)">+ {{annotation.targets.length - annotation.targetSize}}
more</a></li>
</ul>
</li>
</ul>
<div *ngIf="visibleAnnotations < annotations.length" class="uk-margin-medium-top uk-text-center">
<button class="uk-button uk-button-primary"
(click)="visibleAnnotations = (visibleAnnotations + annotationSize)">Load More
</button>
</div>
</div>
<div [class.uk-hidden]="!visible">
<div class="widget-container" cdkDrag>
<button type="button" class="close" aria-label="Close" (click)="toggleAnnotation($event)">
<span aria-hidden="true">×</span>
</button>
<iframe #iframe id="b2note_iframe" name="b2note_iframe" class="b2note-iframe">
</iframe>
</div>
</div>`,
styleUrls: ['annotation.css']
})
export class AnnotationComponent implements OnInit, OnDestroy {
@Input()
public landingInfo: ResultLandingInfo = null;
@Input()
public id: string = null;
public properties: EnvProperties = properties;
public url: string = null;
public pid: string = null;
public keywords: string[] = [];
public visible: boolean = false;
public annotations: Annotation[] = [];
public annotationSize: number = 10;
public isLoggedIn: boolean = Session.isLoggedIn();
public visibleAnnotations: number;
public loading: boolean = false;
public submitted: boolean = false;
@Output()
public pidEmitter: EventEmitter<string> = new EventEmitter<string>();
@ViewChild('iframe') iframe: ElementRef;
@ViewChild('form') form: ElementRef;
private subscriptions: any[] = [];
constructor(private annotationService: AnnotationService) {
}
@HostListener('window:message', ['$event'])
public onChange(event) {
if (this.properties.b2noteAPIURL.includes(event.origin)) {
if (event.data === "B2NOTE loaded") {
let token = COOKIE.getCookie('AccessToken');
this.iframe.nativeElement.contentWindow.postMessage({token: token}, this.properties.b2noteAPIURL);
} else {
this.getAnnotations();
}
}
}
ngOnInit(): void {
this.visibleAnnotations = this.annotationSize;
if (typeof window !== "undefined") {
let id = this.id;
this.url = window.location.href;
if (this.landingInfo.deletedByInferenceIds) {
id = this.landingInfo.deletedByInferenceIds[0];
this.url = this.url.replace(this.id, id);
}
if (this.landingInfo.identifiers && this.landingInfo.identifiers.size > 0) {
if (this.landingInfo.identifiers.get('doi')) {
this.pid = this.landingInfo.identifiers.get('doi')[0];
} else {
const key: string = this.landingInfo.identifiers.keys().next().value;
if (key) {
this.pid = this.landingInfo.identifiers.get(key)[0];
}
}
}
if (this.pid) {
this.getAnnotations();
}
this.pidEmitter.emit(this.pid);
}
}
public get enabled(): boolean {
return this.pid && this.isLoggedIn;
}
private clearSubscriptions() {
this.subscriptions.forEach(subscription => {
if (subscription instanceof Subscriber) {
subscription.unsubscribe();
}
});
this.subscriptions = [];
}
private getAnnotations() {
if (!this.annotations || this.annotations.length === 0) {
this.loading = true;
}
this.subscriptions.push(this.annotationService.getAllAnnotations(this.pid).subscribe(annotations => {
this.annotations.forEach((annotation, index) => {
if (!annotations.find(element => element.type === annotation.type && element.text === annotation.text)) {
this.annotations.splice(index, 1);
}
});
annotations.forEach(annotation => {
if (!this.annotations.find(element => element.type === annotation.type && element.text === annotation.text)) {
annotation.targetSize = 3;
this.annotationService.getAnnotationTargets(annotation.text, annotation.type).subscribe(targets => {
annotation.targets = targets.filter(target => target.id !== this.pid);
});
this.annotations.push(annotation);
}
});
this.annotations = this.sort(this.annotations);
this.loading = false;
}, error => {
this.loading = false;
}));
}
public sort(annotations: Annotation[]): Annotation[] {
return annotations.sort((a, b) => {
if (a.type === b.type) {
return 1;
} else if (a.type === 'semantic') {
return -1;
} else if (b.type === 'semantic') {
return 1;
} else if (a.type === 'keyword') {
return -1;
} else if (b.type === 'keyword') {
return 1;
}
});
}
public searchPid(pid: string): { [k: string]: any; } {
return {
pid: pid
}
}
ngOnDestroy() {
this.clearSubscriptions();
}
toggleAnnotation(event) {
if (this.visible) {
event.preventDefault();
} else if(!this.submitted) {
this.form.nativeElement.submit();
this.submitted = true;
}
this.visible = !this.visible;
}
open(i: number) {
this.annotations.forEach((annotation, index) => {
if (index != i) {
annotation.targetSize = 3;
} else {
annotation.targetSize = annotation.targets.length
}
});
}
}

View File

@ -1,41 +0,0 @@
.widget-container {
position: fixed;
left: 50%;
top: 50%;
z-index: 1000;
padding: 19px;
margin-left: -167px;
margin-top: -311px;
box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2),
0 2px 2px 0 rgba(0, 0, 0, 0.14),
0 1px 5px 0 rgba(0, 0, 0, 0.12);
border: 1px solid #e3e3e3;
border-radius: 4px;
outline: 0;
min-height: 20px;
background-color: #f5f5f5;
cursor: move;
}
.widget-container:hover, .widget-container:active{
box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2),
0 8px 10px 1px rgba(0, 0, 0, 0.14),
0 3px 14px 2px rgba(0, 0, 0, 0.12);
}
.close {
float: right;
padding: 0;
cursor: pointer;
background: transparent;
border: 0;
font-size: 21px;
font-weight: bold;
opacity: 0.2;
}
.b2note-iframe {
width: 100%;
height: 600px;
border: 1px solid #dddddd;
}

View File

@ -1,13 +0,0 @@
import {NgModule} from "@angular/core";
import {AnnotationComponent} from "./annotation.component";
import {CommonModule} from "@angular/common";
import {DragDropModule} from "@angular/cdk/drag-drop";
import {RouterModule} from "@angular/router";
import {LoadingModule} from "../../utils/loading/loading.module";
@NgModule({
imports: [CommonModule, DragDropModule, RouterModule, LoadingModule],
declarations: [AnnotationComponent],
exports: [AnnotationComponent]
})
export class AnnotationModule {}

View File

@ -1,95 +0,0 @@
import {Injectable} from "@angular/core";
import {HttpClient} from "@angular/common/http";
import {Observable} from "rxjs";
import {EnvProperties} from "../../utils/properties/env-properties";
import {map} from "rxjs/operators";
import {properties} from "../../../../environments/environment";
export interface AnnotationTarget {
id: string;
url: string;
}
export interface Annotation {
text: string;
type: 'semantic' | 'keyword' | 'comment';
targets?: AnnotationTarget[];
targetSize?: number;
}
@Injectable({
providedIn: "root"
})
export class AnnotationService {
api = 'api/';
constructor(private http: HttpClient) {
}
getAllAnnotations(source: string): Observable<Annotation[]> {
let url = properties.b2noteAPIURL + this.api + 'annotations?target-id[]=' + encodeURIComponent(source);
return this.http.get<Annotation[]>(url).pipe(map((response: any[]) => {
return this.parseAnnotations(response);
}));
}
getAnnotationTargets(value: string, type: 'semantic' | 'keyword' | 'comment'): Observable<AnnotationTarget[]> {
let url = properties.b2noteAPIURL + this.api + 'annotations?value=' + encodeURIComponent(value) + '&type[]=' + type;
return this.http.get<AnnotationTarget[]>(url).pipe(map((response: any[]) => {
return this.parseAnnotationTargets(response);
}));
}
private parseAnnotations(response: any[]): Annotation[] {
let annotations: Annotation[] = [];
if (response && response.length > 0) {
response.forEach(value => {
if (value.visibility === 'public') {
let body = value.body;
if (body.type === 'TextualBody') {
if (body.purpose === 'tagging') {
annotations.push({
text: body.value,
type: "keyword"
});
} else {
annotations.push({
text: body.value,
type: "comment"
});
}
} else {
let items = body.items;
let text: string = null;
items.forEach(item => {
if (item.type === 'TextualBody') {
text = item.value;
}
});
annotations.push({
text: text,
type: "semantic"
});
}
}
});
}
return annotations;
}
private parseAnnotationTargets(response: any[]): AnnotationTarget[] {
let targets: AnnotationTarget[] = [];
if (response && response.length > 0) {
response.forEach(value => {
if (value.visibility === 'public') {
targets.push({
id: value.target.id,
url: value.target.source
});
}
});
}
return targets;
}
}

View File

@ -482,7 +482,7 @@
<div class="uk-width-2-3@m uk-width-1-2">
<img src="assets/common-assets/graph.svg" style="opacity: 0.4; width:20px; height:22px" loading="lazy"
alt="graph">
<span class="uk-margin-small-left uk-text-baseline uk-text-muted">Powered by <a href="https://graph.openaire.eu" class="graph-color">OpenAIRE Research Graph</a></span>
<span class="uk-margin-small-left uk-text-baseline uk-text-muted">Powered by <a href="https://graph.openaire.eu" class="graph-color">OpenAIRE Graph</a></span>
<span *ngIf="indexUpdateDate" class="uk-text-baseline uk-text-muted">
. Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
</span>

View File

@ -253,7 +253,7 @@
<div class="uk-width-2-3@m uk-width-1-2">
<img src="assets/common-assets/graph.svg" style="opacity: 0.4; width:20px; height:22px" loading="lazy"
alt="graph">
<span class="uk-margin-small-left uk-text-baseline uk-text-muted">Powered by <a href="https://graph.openaire.eu" class="graph-color">OpenAIRE Research Graph</a></span>
<span class="uk-margin-small-left uk-text-baseline uk-text-muted">Powered by <a href="https://graph.openaire.eu" class="graph-color">OpenAIRE Graph</a></span>
<span *ngIf="indexUpdateDate" class="uk-text-baseline uk-text-muted">
. Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
</span>

View File

@ -735,7 +735,7 @@
<img src="assets/common-assets/graph.svg" style="opacity: 0.4; width:20px; height:22px" loading="lazy"
alt="graph">
<span class="uk-margin-small-left uk-text-baseline uk-text-muted">Powered by <a
href="https://graph.openaire.eu" class="graph-color">OpenAIRE Research Graph</a></span>
href="https://graph.openaire.eu" class="graph-color">OpenAIRE Graph</a></span>
<span *ngIf="indexUpdateDate" class="uk-text-baseline uk-text-muted">
. Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
</span>

View File

@ -104,23 +104,6 @@
[pids]="pidsArrayString" [pageType]="'landing'">
</orcid-work>
</li>
<li *ngIf="properties.b2noteAPIURL">
<a *ngIf="isLoggedIn && pid" class="uk-link-text uk-text-bold uk-text-uppercase" (click)="annotation.toggleAnnotation($event)">
<span class="uk-icon-button uk-button-primary uk-icon">
<img src="assets/common-assets/b2note.png" loading="lazy" alt="b2note" style="width:34px; height:21px">
</span>
<span class="uk-margin-small-left">add annotation</span>
</a>
<span *ngIf="!pid || !isLoggedIn" class="uk-link-text uk-text-bold uk-text-uppercase uk-text-muted half-opacity"
[attr.uk-tooltip]="!pid?'Annotations are available only for resources with a PID (persistent identifier) like DOI, handle, PMID':
'Annotations are available only for logged in users'">
<span class="uk-icon-button uk-button-primary uk-icon uk-disabled">
<img src="assets/common-assets/b2note.png" loading="lazy" alt="b2note" style="width:34px;
height:21px">
</span>
<span class="uk-margin-small-left">add annotation</span>
</span>
</li>
<!-- EGI Notebook-->
<li *ngIf="resultLandingInfo.showEgiNotebookButton && properties.adminToolsPortalType == 'explore'
&& (properties.environment == 'beta' || properties.environment == 'development')">
@ -184,7 +167,7 @@
<!-- Subjects -->
<div *ngIf="resultLandingInfo.fos" class="uk-margin-medium-bottom">
<div class="uk-text-muted">
Fields of Science and Technology classification (FOS)
Fields of Science (FOS) <span uk-text-small>[Beta]</span>
</div>
<div class="uk-margin-small-top">
<div *ngIf="resultLandingInfo.fos && resultLandingInfo.fos.length > 0">
@ -198,7 +181,7 @@
</div>
<div *ngIf="resultLandingInfo.sdg" class="uk-margin-medium-bottom">
<div class="uk-text-muted">
Sustainable Development Goals (SDG)
Sustainable Development Goals (SDG) <span uk-text-small>[Beta]</span>
</div>
<div class="uk-margin-small-top">
<div *ngIf="resultLandingInfo.sdg && resultLandingInfo.sdg.length > 0">
@ -663,7 +646,7 @@
<div class="uk-width-2-3@m uk-width-1-2">
<img src="assets/common-assets/graph.svg" style="opacity: 0.4; width:20px; height:22px" loading="lazy"
alt="graph">
<span class="uk-margin-small-left uk-text-baseline uk-text-muted">Powered by <a href="https://graph.openaire.eu" class="graph-color">OpenAIRE Research Graph</a></span>
<span class="uk-margin-small-left uk-text-baseline uk-text-muted">Powered by <a href="https://graph.openaire.eu" class="graph-color">OpenAIRE Graph</a></span>
<span *ngIf="indexUpdateDate" class="uk-text-baseline uk-text-muted">
. Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
</span>
@ -674,10 +657,6 @@
<a (click)="showFeedback = true; scroll()" class="portal-link space">Report an Issue</a>
</div>
</div>
<!-- B2 Note-->
<div *ngIf="properties.b2noteAPIURL && resultLandingInfo" class="uk-margin-medium-top">
<b2note #annotation [id]="id" [landingInfo]="resultLandingInfo" (pidEmitter)="pidInit($event)"></b2note>
</div>
</div>
</div>
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"

View File

@ -20,10 +20,8 @@ import {properties} from "../../../../environments/environment";
import {ISVocabulariesService} from "../../utils/staticAutoComplete/ISVocabularies.service";
import {Subscriber} from "rxjs";
import {Session} from "../../login/utils/helper.class";
import {AnnotationComponent} from "../annotation/annotation.component";
import {ParsingFunctions} from "../landing-utils/parsingFunctions.class";
import {ConnectHelper} from "../../connect/connectHelper";
import {$e} from "codelyzer/angular/styles/chars";
@Component({
@ -111,7 +109,6 @@ export class ResultLandingComponent {
public isLoggedIn: boolean = Session.isLoggedIn();
public pid: string;
@ViewChild("annotation") annotation: AnnotationComponent;
public contextsWithLink: any;
public relatedClassSelected: string = "";

View File

@ -21,7 +21,6 @@ import {ShowAuthorsModule} from "../../utils/authors/showAuthors.modu
import {HelperModule} from "../../utils/helper/helper.module";
import {ResultLandingUtilsModule} from "../landing-utils/resultLandingUtils.module";
import {AlertModalModule} from "../../utils/modal/alertModal.module";
import {AnnotationModule} from "../annotation/annotation.module";
import {LandingHeaderModule} from "../landing-utils/landing-header/landing-header.module";
import {NoLoadPaging} from "../../searchPages/searchUtils/no-load-paging.module";
import {ResultPreviewModule} from "../../utils/result-preview/result-preview.module";
@ -38,7 +37,7 @@ import {MatSelectModule} from "@angular/material/select";
CiteThisModule, PagingModule, IFrameModule,
MetricsModule, AltMetricsModule, Schema2jsonldModule, SEOServiceModule,
DeletedByInferenceModule, ShowAuthorsModule, HelperModule, ResultLandingUtilsModule, AlertModalModule,
AnnotationModule, LandingHeaderModule, NoLoadPaging, ResultPreviewModule, FeedbackModule, TabsModule, LoadingModule,
LandingHeaderModule, NoLoadPaging, ResultPreviewModule, FeedbackModule, TabsModule, LoadingModule,
OrcidModule, MatFormFieldModule, MatSelectModule
],
declarations: [

View File

@ -1,16 +1,10 @@
import { Injectable } from '@angular/core';
import {
Router,
CanActivate,
ActivatedRouteSnapshot,
RouterStateSnapshot,
UrlTree
} from '@angular/router';
import { Router, ActivatedRouteSnapshot, RouterStateSnapshot, UrlTree } from '@angular/router';
import {Observable} from 'rxjs';
import {LoginErrorCodes} from './utils/guardHelper.class';
@Injectable()
export class FreeGuard implements CanActivate {
export class FreeGuard {
constructor(private router: Router) {
}

View File

@ -23,7 +23,7 @@ import {Component} from "@angular/core";
<img src="assets/common-assets/monitor-assets/how/3.png" loading="lazy">
</div>
<div class="uk-text-center">
build an open, global<br>and trusted Research graph
build an open, global<br>and trusted OpenAIRE Graph
</div>
</div>
</div>

View File

@ -25,7 +25,7 @@
</div>
<schema2jsonld *ngIf="name && logoURL" [URL]="properties.domain+ properties.baseLink +'/search/find'"
[logoURL]="properties.domain + properties.baseLink+logoURL" type="search" [name]=name
description="Search for research outcomes (publications, datasets, software, other research products), projects, organizations, content providers in the OpenAIRE Research Graph. "></schema2jsonld>
description="Search for research outcomes (publications, datasets, software, other research products), projects, organizations, content providers in the OpenAIRE Graph. "></schema2jsonld>
<div class="uk-container-large uk-container">
<ul class=" portalTabs uk-tab uk-width-1-1 " uk-tab="animation: uk-animation-fade">

View File

@ -144,7 +144,7 @@ export class SearchAllComponent {
public ngOnInit() {
var description = "Search for research outcomes (publications, datasets, software, other research products), projects, organizations, content providers in the OpenAIRE Research Graph. ";
var description = "Search for research outcomes (publications, datasets, software, other research products), projects, organizations, content providers in the OpenAIRE Graph. ";
var title = "OpenAIRE |Search for research outcomes, projects, content providers & organizations";
this.properties = properties;
var url = this.properties.domain + this.properties.baseLink + this._router.url;

View File

@ -43,37 +43,18 @@ export class DatasourcesHelperClass {
}
}
public static getQueryPrefix(type: "all" | "registries" | "journals" | "compatible" | "deposit"): string {
if(properties.environment == "production") {
if (type == "registries") {
return ' (datasourcetypeuiid = "entityregistry" or datasourcetypeuiid = "entityregistry::products" or datasourcetypeuiid = "entityregistry::repositories" ' +
'or datasourcetypeuiid = "entityregistry::organizations" or datasourcetypeuiid = "entityregistry::researchers" ) ';
return 'datasourcetypeuiname exact "Registry"';
} else if (type == "journals") {
// return ' not(datasourcecompatibilityid = UNKNOWN) not(datasourcecompatibilityid = notCompatible) and (datasourcetypeuiid exact "pubsrepository::journal" or datasourcetypeuiid exact "aggregator::pubsrepository::journals" ) ';
return 'oaftype exact datasource not datasourcecompatibilityid = notCompatible and (datasourcetypeuiid exact "pubsrepository::journal" or datasourcetypeuiid exact "aggregator::pubsrepository::journals" ) ';
return 'oaftype exact datasource not datasourcecompatibilityid = notCompatible and datasourcetypeuiname exact "Journal archive" ';
} else if (type == "compatible") {
return ' oaftype exact datasource and datasourcecompatibilityid <> notCompatible and datasourcetypeuiid <> other and datasourcetypeuiid <> "pubsrepository::journal" and datasourcetypeuiid <> "aggregator::pubsrepository::journals" ';
return ' oaftype exact datasource and datasourcecompatibilityid <> notCompatible and datasourcetypeuiname exact "Repository" ';
}else if (type == "deposit") {
return ' oaftype exact datasource ';
return ' oaftype exact datasource and (datasourcetypeuiname exact "Journal archive" or datasourcetypeuiname exact "Repository")';
} else {
return "";
}
}else{
if (type == "registries") {
return 'datasourcetypeuiname exact "Registry"';
} else if (type == "journals") {
// return ' not(datasourcecompatibilityid = UNKNOWN) not(datasourcecompatibilityid = notCompatible) and (datasourcetypeuiid exact "pubsrepository::journal" or datasourcetypeuiid exact "aggregator::pubsrepository::journals" ) ';
return 'oaftype exact datasource not datasourcecompatibilityid = notCompatible and datasourcetypeuiname exact "Journal archive" ';
} else if (type == "compatible") {
return ' oaftype exact datasource and datasourcecompatibilityid <> notCompatible and datasourcetypeuiname exact "Repository" ';
}else if (type == "deposit") {
return ' oaftype exact datasource and (datasourcetypeuiname exact "Journal archive" or datasourcetypeuiname exact "Repository")';
} else {
return "";
}
}
}
public static createFilters(type: "all" | "registries" | "journals" | "compatible" | "deposit"): Filter[] {

View File

@ -1,7 +1,7 @@
import {Component, Input} from '@angular/core';
import {DateValue} from './searchHelperClasses.class';
import {FormControl} from "@angular/forms";
import {UntypedFormControl} from "@angular/forms";
import { MatDatepickerInputEvent } from "@angular/material/datepicker";
@Component({
@ -62,8 +62,8 @@ ngOnInit() {
this.updateDefaultRangeDates(this.dateValue.from,this.dateValue.to);
}
updateDefaultRangeDates(df:Date,dt:Date){
this.fromDate = new FormControl(df);
this.toDate = new FormControl(dt);
this.fromDate = new UntypedFormControl(df);
this.toDate = new UntypedFormControl(dt);
}
typeChanged(type:string){

View File

@ -1,5 +1,5 @@
import {Component, EventEmitter, Input, Output, ViewChild} from '@angular/core';
import {FormBuilder} from "@angular/forms";
import {UntypedFormBuilder} from "@angular/forms";
import {EnvProperties} from "../../utils/properties/env-properties";
import {SearchCustomFilter} from "./searchUtils.class";
import {ConfigurationService} from "../../utils/configuration/configuration.service";
@ -96,7 +96,7 @@ export class EntitiesSelectionComponent {
subs: Subscription[] = [];
constructor(private _fb: FormBuilder, private config: ConfigurationService, private router: Router) {}
constructor(private _fb: UntypedFormBuilder, private config: ConfigurationService, private router: Router) {}
ngOnInit() {
this.show = 0;

View File

@ -394,7 +394,7 @@
<div class="">
<img src="assets/common-assets/graph.svg" style="opacity: 0.4; width:20px; height:22px" loading="lazy"
alt="graph">
<span class="uk-margin-small-left uk-text-baseline uk-text-muted">Powered by <a href="https://graph.openaire.eu" class="graph-color">OpenAIRE Research Graph</a></span>
<span class="uk-margin-small-left uk-text-baseline uk-text-muted">Powered by <a href="https://graph.openaire.eu" class="graph-color">OpenAIRE Graph</a></span>
</div>
<div class="uk-text-right">
<span *ngIf="indexUpdateDate" class="uk-text-baseline uk-text-muted">

View File

@ -1,5 +1,5 @@
import {ChangeDetectorRef, Component, EventEmitter, Input, Output} from '@angular/core';
import {FormBuilder} from "@angular/forms";
import {UntypedFormBuilder} from "@angular/forms";
import {Filter} from "./searchHelperClasses.class";
import {EnvProperties} from "../../utils/properties/env-properties";
import {ConfigurationService} from "../../utils/configuration/configuration.service";
@ -58,7 +58,7 @@ export class QuickSelectionsComponent {
subs: Subscription[] = [];
constructor(private _fb: FormBuilder, private config: ConfigurationService, private _router: Router, private route: ActivatedRoute, private cdr:ChangeDetectorRef) {
constructor(private _fb: UntypedFormBuilder, private config: ConfigurationService, private _router: Router, private route: ActivatedRoute, private cdr:ChangeDetectorRef) {
}
changed() {

View File

@ -26,6 +26,19 @@ export class RefineFieldResultsService {
.pipe(map(res => [res['meta'].total, RefineResultsUtils.parse(res['refineResults'],fields, entityName)]));
}
getAllRefineFieldResultsByFieldName(fieldName:string, entityName:string, properties:EnvProperties, refineQuery:string=null):any{
// let keys:string[]=["funder", "relfunder", "fundinglevel"];
let url = properties.searchAPIURLLAst +this.getSearchAPIURLForEntity(entityName)+"?fields="+fieldName +('&sf='+fieldName)+ "&format=json";
if(refineQuery!= null && refineQuery != '' ) {
url += refineQuery;
}
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
//.map(res => <any> res.json())
.pipe(map(res => [res['meta'].total, RefineResultsUtils.parse(res['refineResults'],[fieldName], entityName)]));
}
getRefineFieldResultsByFieldName(fieldName:string, entityName:string, properties:EnvProperties):any{
let key:string="fundinglevel";
let link = properties.searchAPIURLLAst +this.getSearchAPIURLForEntity(entityName)+"?fields="+fieldName +(fieldName.toString().indexOf(key)!=-1?('&sf='+fieldName):'')+ "&format=json";

View File

@ -148,7 +148,7 @@
<li><a target="_blank" href="https://www.openaire.eu/news/">News</a></li>
<li><a target="_blank" href="https://www.openaire.eu/events">Events</a></li>
<li><a target="_blank" href="https://www.openaire.eu/blogs/magazine">Blogs</a></li>
<li><a target="_blank" href="https://www.openaire.eu/newsletter">Newsletters</a></li>
<li><a target="_blank" href="https://www.openaire.eu/newsletters">Newsletters</a></li>
<li><a target="_blank" href="https://www.openaire.eu/documents">Documents</a></li>
</ul>
</div>
@ -210,9 +210,9 @@
</a>
</div>
<div>
<a target="_blank" href="https://www.openaire.eu/newsletter" class="el-link newsletter">
<a target="_blank" href="https://www.openaire.eu/newsletters" class="el-link newsletter">
<span class="el-title uk-margin uk-text-large">
Newsletter
Newsletters
<span class="el-image uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<circle cx="3.12" cy="16.8" r="1.85"></circle>

View File

@ -17,7 +17,7 @@ export class MenuItem {
customClass: string = null;
isFeatured: boolean;
constructor(id: string, title: string, url: string, route: string, needsAuthorization: boolean, entitiesRequired: string[], routeRequired: string[], params, icon=null, fragment = null, customClass = null, routeActive = null) {
constructor(id: string, title: string, url: string, route: string, needsAuthorization: boolean, entitiesRequired: string[], routeRequired: string[], params, items=null, icon=null, fragment = null, customClass = null, routeActive = null) {
this._id = id;
this.title = title;
this.url = url;
@ -28,7 +28,7 @@ export class MenuItem {
this.routeRequired = routeRequired;
this.params = params;
this.markAsActive = true;
this.items = [];
this.items = items;
this.icon = icon;
this.fragment = fragment;
this.customClass = customClass;

View File

@ -188,7 +188,7 @@
</div>
<!-- <div *ngIf="!onlyTop" class="uk-navbar-center"> -->
<div *ngIf="!onlyTop" [class.uk-navbar-right]="header.menuPosition != 'center'"
[class.uk-navbar-center]="header.menuPosition == 'center'">
[class.uk-navbar-center]="header.menuPosition == 'center'" class="uk-position-top-right">
<div *ngIf="showLogo && header.position == 'center' && header.menuPosition == 'center' "
class="uk-margin-large-right uk-visible@m">
<ng-container *ngTemplateOutlet="header_template; context: {mobile: false}"></ng-container>
@ -212,7 +212,7 @@
<div *ngIf="menu.items.length > 0" class="uk-navbar-dropdown uk-navbar-dropdown-bottom-left"
style="top: 80px; left: 0px;" id="{{menu.rootItem.id}}" uk-toggle>
<div class="uk-navbar-dropdown-grid uk-child-width-1-1 uk-grid uk-grid-stack" uk-grid="">
<div class="uk-first-column uk-height-max-medium uk-overflow-auto">
<div class="uk-first-column uk-overflow-auto"> <!-- uk-height-max-medium -->
<ul class="uk-nav uk-navbar-dropdown-nav">
<ng-container *ngFor="let submenu of menu.items">
<li *ngIf="isEnabled(submenu.entitiesRequired,showEntity) &&
@ -231,7 +231,7 @@
routerLink="{{subsubmenu.route}}" [queryParams]="subsubmenu.params"
[fragment]="subsubmenu.fragment">{{subsubmenu.title}}</a>
<a *ngIf="subsubmenu.route.length == 0 && subsubmenu.url.length > 0" routerLinkActive="uk-link"
href="{{subsubmenu.url}}" target="_blank">{{subsubmenu.title}}</a>
href="{{subsubmenu.url}}" target="{{submenu.url.includes('http') ? '_blank' : '_self'}}">{{subsubmenu.title}}</a>
</li>
</ng-container>
</ul>

View File

@ -58,7 +58,7 @@ interface Link {
class="number-size">{{numbers.datasourcesSize.size}}</span>
</a>
</h3>
<span class="uk-text-uppercase uk-text-large">Content providers</span>
<span class="uk-text-uppercase uk-text-large">Data sources</span>
</div>
<div *ngIf="numbers.projectsSize">
<h3>
@ -113,7 +113,7 @@ interface Link {
class="number uk-text-bold uk-margin-bottom uk-text-center uk-text-left@m">{{numbers.softwareSize.count|number}}</a>
<div class="uk-text-uppercase uk-flex uk-flex-middle uk-flex-center uk-flex-left@m">
<icon name="cog" ratio="1.5" [flex]="true" class="uk-margin-right" [customClass]="colorClass"></icon>
<span>software</span>
<span>research software</span>
</div>
</div>
</div>
@ -259,7 +259,7 @@ export class NumbersComponent implements OnInit, OnDestroy {
(getSoftware) ? this.searchResearchResultsService.numOfSearchResults('software', '', this.properties, refineParams) : this.empty,
(getSoftwareLinked) ? this.searchResearchResultsService.numOfSearchResultsLinkedToPub("software", this.properties) : this.empty,
(getOther) ? this.searchResearchResultsService.numOfSearchResults('other', '', this.properties, refineParams) : this.empty,
(getProjects) ? this.refineFieldResultsService.getRefineFieldsResultsByEntityName(['funder'], 'project', this.properties, refineParams) : this.empty,
(getProjects) ? this.refineFieldResultsService.getAllRefineFieldResultsByFieldName('funder', 'project', this.properties, refineParams) : this.empty,
(getDataProviders) ? this.searchDataprovidersService.numOfSearchDataproviders('', this.properties, refineParams) : this.empty
).subscribe((data: any[]) => {
if (data[0] && data[0] > 0) {

View File

@ -11,7 +11,7 @@ export class ConfigurationService{
private communityInformation: BehaviorSubject<Portal> = new BehaviorSubject(null);
private sub: Subscription = null;
private source: Observable<Portal> = null;
private promise: Promise<boolean> = null;
private promise: Promise<void> = null;
constructor(private http: HttpClient ) {}
@ -35,7 +35,7 @@ export class ConfigurationService{
}
public initStaticCommunityInformation(communityInformation: Portal) {
this.promise = new Promise<any>((resolve => {
this.promise = new Promise<void>((resolve => {
this.communityInformation.next(communityInformation);
resolve();
}));
@ -44,7 +44,7 @@ export class ConfigurationService{
if(community == null) return;
let url = properties.adminToolsAPIURL +"/" + properties.adminToolsPortalType + "/" + community + "/full";
this.promise = new Promise<any>((resolve => {
this.promise = new Promise<void>((resolve => {
this.source = this.http.get<Portal>((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url);
this.sub = this.source

View File

@ -96,7 +96,7 @@ export class Composer {
public static composeEmailForGraph(contactForm: any, admins: any): Email {
let email: Email = new Email();
email.subject = "OpenAIRE - Research Graph";
email.subject = "OpenAIRE - Graph";
email.body = "<div style='font-size:" + this.noteBodySize + "'>"
+ "<span><b>Name</b>: " + contactForm.name + "</span><br>"
+ "<span><b>Email</b>: " + contactForm.email + "</span><br>"

View File

@ -18,11 +18,11 @@ export class NumberUtils{
num=num/1000;
num= Math.round(num);
roundNum = { number: num, size: "K", count: initialNum};
}else if (num >= 100) {
num=num/100;
num= Math.round(num);
num=num*100;
roundNum = { number: num, size: "" , count: initialNum};
// }else if (num >= 100) {
// num=num/100;
// num= Math.round(num);
// num=num*100;
// roundNum = { number: num, size: "" , count: initialNum};
}else{
roundNum = { number: num, size: "" , count: initialNum};
}

View File

@ -1,13 +1,13 @@
import { Injectable } from '@angular/core';
import { CanDeactivate, Router} from '@angular/router';
import { Router } from '@angular/router';
import {Observable} from 'rxjs';
import {properties} from "../../../../environments/environment";
@Injectable({
providedIn: 'root'
}) // do not forget to register this class as a provider
export class PreviousRouteRecorder implements CanDeactivate<any> {
export class PreviousRouteRecorder {
constructor(private router: Router) {
}
canDeactivate(component: any): Observable<boolean> | boolean {

View File

@ -232,7 +232,7 @@ export class SearchFields {
filterType: "checkbox"
},
["sdg"]: {
name: "SDG",
name: "SDG [Beta]",
type: "vocabulary",
param: "sdg",
operator: "sg",
@ -240,7 +240,7 @@ export class SearchFields {
filterType: "checkbox"
},
["fos"]: {
name: "Field of Science",
name: "Field of Science [Beta]",
type: "vocabulary",
param: "fos",
operator: "fs",

View File

@ -91,7 +91,7 @@ export class ISVocabulariesService {
async getVocabularyFromServiceAsync(vocabularyName: string, properties: EnvProperties): Promise<AutoCompleteValue[]> {
if(!this.vocabularies.has(vocabularyName)) {
await new Promise<any>(resolve => {
await new Promise<void>(resolve => {
this.vocabularies.set(vocabularyName, new BehaviorSubject<any>(null));
this.subscriptions.push(this.getVocabularyFromService(vocabularyName, properties).subscribe(
@ -201,7 +201,7 @@ export class ISVocabulariesService {
async getProvenanceActionVocabularyFromServiceAsync (vocabularyName: string, properties: EnvProperties): Promise<{}> {
if(!this.provenanceActionVocabulary || !this.provenanceActionVocabulary.getValue()) {
await new Promise<any>(resolve => {
await new Promise<void>(resolve => {
this.subscriptions.push(this.getProvenanceActionVocabularyFromService(vocabularyName, properties).subscribe(
vocabularyRes => {
this.provenanceActionVocabulary.next(vocabularyRes);