Merge remote-tracking branch 'origin/master' into data-transfer-v2

This commit is contained in:
Konstantina Galouni 2023-03-09 11:16:09 +02:00
commit e37540fe7c
6 changed files with 406 additions and 392 deletions

View File

@ -1,6 +1,6 @@
# Aggregator
# EOSC EXPLORE
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.3.10 and has been updated to 11.2.14.
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.3.10 and has been updated to 14.2.3.
## Install packages

View File

@ -43,51 +43,58 @@ const routes: Routes = [
},
{
path: 'search/find',
loadChildren: () => import('./searchPages/find/libSearch.module').then(m => m.LibMainSearchModule)
redirectTo: ''
// loadChildren: () => import('./searchPages/find/libSearch.module').then(m => m.LibMainSearchModule)
},
{
path: 'search/find/research-outcomes',
loadChildren: () => import('./searchPages/simple/searchResearchResults.module').then(m => m.OpenaireSearchResearchResultsModule)
redirectTo: ''
// loadChildren: () => import('./searchPages/simple/searchResearchResults.module').then(m => m.OpenaireSearchResearchResultsModule)
},
{
path: 'search/find/projects',
loadChildren: () => import('./searchPages/simple/searchProjects.module').then(m => m.LibSearchProjectsModule)
redirectTo: ''
// loadChildren: () => import('./searchPages/simple/searchProjects.module').then(m => m.LibSearchProjectsModule)
},
{
path: 'search/find/dataproviders',
loadChildren: () => import('./searchPages/simple/searchDataProviders.module').then(m => m.LibSearchDataProvidersModule)
redirectTo: ''
// loadChildren: () => import('./searchPages/simple/searchDataProviders.module').then(m => m.LibSearchDataProvidersModule)
},
{
path: 'search/find/services',
loadChildren: () => import('./searchPages/simple/searchServices.module').then(m => m.LibSearchServicesModule)
redirectTo: ''
// loadChildren: () => import('./searchPages/simple/searchServices.module').then(m => m.LibSearchServicesModule)
},
{
path: 'search/find/organizations',
loadChildren: () => import('./searchPages/simple/searchOrganizations.module').then(m => m.LibSearchOrganizationsModule)
redirectTo: ''
// loadChildren: () => import('./searchPages/simple/searchOrganizations.module').then(m => m.LibSearchOrganizationsModule)
},
{
path: 'search/advanced/research-outcomes',
loadChildren: () => import('./searchPages/advanced/searchResearchResults.module').then(m => m.OpenaireAdvancedSearchResearchResultsModule)
redirectTo: ''
// loadChildren: () => import('./searchPages/advanced/searchResearchResults.module').then(m => m.OpenaireAdvancedSearchResearchResultsModule)
},
{
path: 'search/advanced/organizations',
loadChildren: () => import('./searchPages/advanced/advancedSearchOrganizations.module').then(m => m.LibAdvancedSearchOrganizationsModule)
redirectTo: ''
// loadChildren: () => import('./searchPages/advanced/advancedSearchOrganizations.module').then(m => m.LibAdvancedSearchOrganizationsModule)
},
{
path: 'search/advanced/dataproviders',
loadChildren: () => import('./searchPages/advanced/advancedSearchDataProviders.module').then(m => m.LibAdvancedSearchDataProvidersModule)
redirectTo: ''
// loadChildren: () => import('./searchPages/advanced/advancedSearchDataProviders.module').then(m => m.LibAdvancedSearchDataProvidersModule)
},
{
path: 'search/advanced/services',
loadChildren: () => import('./searchPages/advanced/advancedSearchServices.module').then(m => m.LibAdvancedSearchServicesModule)
redirectTo: ''
// loadChildren: () => import('./searchPages/advanced/advancedSearchServices.module').then(m => m.LibAdvancedSearchServicesModule)
},
{
path: 'search/advanced/projects',
loadChildren: () => import('./searchPages/advanced/advancedSearchProjects.module').then(m => m.LibAdvancedSearchProjectsModule)
},
{
path: 'project-report',
loadChildren: () => import('./landingPages/htmlProjectReport/libHtmlProjectReport.module').then(m => m.LibHtmlProjectReportModule)
redirectTo: ''
// loadChildren: () => import('./searchPages/advanced/advancedSearchProjects.module').then(m => m.LibAdvancedSearchProjectsModule)
},
{
path: 'reload',
@ -120,36 +127,10 @@ export class AppRoutingModule {
this.enabledRoutes[data['pages'][i]['route']] = data['pages'][i]['isEnabled'];
}
}
this.getOptionalRoutes();
}
},
error => {
// this.handleError('Error getting community information (e.g. pages,entities) for community with id: ' + this.communityId, error);
}));
}
getOptionalRoutes(){
let optionalRoutes: Routes = [
// Deposit Pages
{ path: 'participate/deposit-datasets', redirectTo: 'participate/deposit/learn-how', pathMatch: 'full'},
{ path: 'participate/deposit-datasets-result', redirectTo: 'participate/deposit/learn-how', pathMatch: 'full'},
{ path: 'participate/deposit-subject-result', redirectTo: 'participate/deposit/learn-how', pathMatch: 'full'},
{ path: 'participate/deposit-publications', redirectTo: 'participate/deposit/learn-how', pathMatch: 'full'},
{ path: 'participate/deposit-publications-result', redirectTo: 'participate/deposit/learn-how', pathMatch: 'full'},
{ path: 'participate/deposit/learn-how', loadChildren: () => import('./deposit/deposit.module').then(m => m.LibDepositModule)},
{ path: 'participate/deposit/search', loadChildren: () => import('./deposit/searchDataprovidersToDeposit.module').then(m => m.LibSearchDataprovidersToDepositModule)},
// Linking Pages
{ path: 'myclaims', loadChildren: () => import('./claims/myClaims/myClaims.module').then(m => m.LibMyClaimsModule)},
{ path: 'participate/claim', loadChildren: () => import('./claims/linking/linkingGeneric.module').then(m => m.LibLinkingGenericModule)},
{ path: 'participate/direct-claim', loadChildren: () => import('./claims/directLinking/directLinking.module').then(m => m.LibDirectLinkingModule)},
{path: 'develop', loadChildren: () => import('./develop/develop.module').then(m => m.DevelopModule)}
];
for (var i = 0; i <optionalRoutes.length; i++) {
if(this.enabledRoutes[("/"+optionalRoutes[i].path)]){
this.router.config.push(optionalRoutes[i]);
}
}
this.router.config.push({path: '**', pathMatch: 'full', component: OpenaireErrorPageComponent});
return routes;
}
}

View File

@ -20,10 +20,10 @@ import {OpenaireEntities} from "./openaireLibrary/utils/properties/searchFields"
template: `
<div id="modal-container"></div>
<div *ngIf="agg">
<navbar *ngIf="properties && loginCheck && header && showHeader" portal="eosc" [properties]=properties [onlyTop]=false
[user]="user" [userMenuItems]="userMenuItems"
[communityId]="properties.adminToolsCommunity" [menuItems]=menuItems
[userMenu]="agg.enableLogin" [header]="header"></navbar>
<!-- <navbar *ngIf="properties && loginCheck && header && showHeader" portal="eosc" [properties]=properties [onlyTop]=false-->
<!-- [user]="user" [userMenuItems]="userMenuItems"-->
<!-- [communityId]="properties.adminToolsCommunity" [menuItems]=menuItems-->
<!-- [userMenu]="agg.enableLogin" [header]="header"></navbar>-->
<div class="custom-main-content">
<main>
<router-outlet></router-outlet>

View File

@ -1,131 +1,131 @@
<div class="image-front-topbar">
<div class="uk-section uk-section-small home-background">
<div id="searchForm" class="uk-container uk-container-large uk-section uk-section-xsmall uk-padding-remove-bottom">
<div class="uk-grid uk-flex uk-flex-center uk-margin-small-top">
<div class="uk-width-1-1 uk-width-auto@m uk-first-column"><div id="searchImage"></div></div>
<div class="uk-width-expand uk-padding-remove-vertical search_box_bg" uk-scrollspy="target: [uk-scrollspy-class]; cls: uk-animation-slide-bottom-medium; delay: 200">
<div class="uk-flex uk-flex-center uk-flex-wrap">
<div class="uk-width-xlarge@l uk-width-large">
<div class="uk-flex uk-flex-center uk-child-width-1-1">
<div [class.uk-invisible]="disableSelect" uk-scrollspy-class>
<advanced-search-input (searchEmitter)="goTo(true)">
<entities-selection #entities [simpleView]="true" currentEntity="all" [selectedEntity]="selectedEntity"
(selectionChange)="entityChanged($event)" (disableSelectEmitter)="disableSelectChange($event)"
[onChangeNavigate]="false" class="uk-width-2-5"></entities-selection>
<div class="uk-width-expand" input placeholder="Scholary works" [hint]="'Search in OpenAIRE'"
[(value)]="keyword" tooltip="true"></div>
</advanced-search-input>
<div *ngIf="selectedEntity === 'result' && !entities.input.focused" class="uk-dropdown uk-display-block uk-margin-top uk-width-auto">
<div class="uk-padding-small">
<quick-selections [resultTypes]="resultTypes" [quickFilter]="resultsQuickFilter"></quick-selections>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="uk-section uk-container uk-container-large">
<div class="contentbox uk-grid uk-child-width-1-1@s uk-flex-row-reverse">
<div class="uk-width-medium@m uk-width-large@l uk-width-xlarge@xl uk-width-1-1 uk-flex uk-flex-middle uk-padding-remove-horizontal">
<img src="https://marketplace.eosc-portal.eu/packs/media/images/gfx_whole_illustation_desktop-fc94d4f7e15455d1785ef4793e1573fb.png">
</div>
<div class="uk-width-expand">
<div class="">
<div class=" ">
<h1 class=" uk-h2 uk-text-normal">Welcome to EOSC Explore</h1>
<h2 class="uk-h5 uk-text-normal uk-text-italics"><br>
<i>The in-context research discovery portal over the EOSC Exchange and the global map of science.</i>
</h2>
</div>
<div class="uk-margin-large-top uk-text-large uk-text-light">The EOSC Explore supports discovery of research products and services onboarded in the EOSC Exchange in the wider context of scientific research outcomes, research funding, and research organization. The EOSC Research Graph, powered by the OpenAIRE Research Graph, provides links from products and services to funders, projects, organizations, and authors, collects and infers SDGs subjects, communities, many more. The portal exploits the EOSC Interoperability Framework to identify relationships between research products in the graph and EOSC Services in the EOSC Marketplace, to facilitate and enable composability of resources. </div>
</div>
</div>
<!-- <aside><img src="https://marketplace.eosc-portal.eu/packs/media/images/gfx_whole_illustation_desktop-fc94d4f7e15455d1785ef4793e1573fb.png"></aside>-->
</div>
<div class="uk-section graph-background" *ngIf="aggregator.graphSectionText && aggregator.graphSectionTitle">
<div class="uk-container">
<div class="uk-flex uk-flex-top uk-child-width-1-1 uk-child-width-1-2@m" uk-grid>
<div class="uk-flex-last@m">
<div [class.lines-10]="!readMore" class="uk-margin-bottom multi-line-ellipsis">
<div class="uk-h3">{{aggregator.graphSectionTitle}}</div>
<p [innerHtml]="aggregator.graphSectionText">
</p>
</div>
<div *ngIf="aggregator.graphSectionText">
<div *ngIf="!readMore" class="uk-text-center clickable" (click)="readMore = true">
<span>Read more<span class="space" uk-icon="chevron-down"></span></span>
</div>
<div *ngIf="readMore" class="uk-text-center clickable" (click)="readMore = false">
<span>Read less<span class="space" uk-icon="chevron-up"></span></span>
</div>
</div>
</div>
<div class="uk-flex uk-flex-bottom">
<div class="uk-width-1-3 uk-width-1-2@m">
<img src="assets/graph.svg">
</div>
<div class="uk-padding uk-width-1-2">
<img src="assets/common-assets/logo-large-graph.png">
</div>
</div>
</div>
</div>
</div>
<div class="uk-section" *ngIf="isRouteAvailable('participate/deposit/learn-how') || isRouteAvailable('participate/claim')">
<div class="uk-padding uk-padding-remove-horizontal">
<div class="uk-container uk-container-small">
<div class="uk-grid-margin uk-grid uk-grid-stack" uk-grid="">
<div class="uk-width-1-1@m uk-first-column">
<div
class="uk-margin uk-text-center uk-child-width-1-1 uk-grid-match uk-child-width-1-1@s uk-child-width-1-2@m uk-child-width-1-2@l uk-grid"
id="page#8" uk-grid="" uk-height-match="target: .target">
<div class="uk-first-column" *ngIf="isRouteAvailable('participate/deposit/learn-how')">
<div class="el-item uk-card uk-card-default uk-card-medium uk-card-body">
<div class="uk-text-center target"><img alt="Share" class="uk-width-1-3@m uk-width-small"
src="assets/share.svg"></div>
<!--<div class="image-front-topbar">-->
<!-- <div class="uk-section uk-section-small home-background">-->
<!-- <div id="searchForm" class="uk-container uk-container-large uk-section uk-section-xsmall uk-padding-remove-bottom">-->
<!-- <div class="uk-grid uk-flex uk-flex-center uk-margin-small-top">-->
<!-- <div class="uk-width-1-1 uk-width-auto@m uk-first-column"><div id="searchImage"></div></div>-->
<!-- <div class="uk-width-expand uk-padding-remove-vertical search_box_bg" uk-scrollspy="target: [uk-scrollspy-class]; cls: uk-animation-slide-bottom-medium; delay: 200">-->
<!-- <div class="uk-flex uk-flex-center uk-flex-wrap">-->
<!-- <div class="uk-width-xlarge@l uk-width-large">-->
<!-- <div class="uk-flex uk-flex-center uk-child-width-1-1">-->
<!-- <div [class.uk-invisible]="disableSelect" uk-scrollspy-class>-->
<!-- <advanced-search-input (searchEmitter)="goTo(true)">-->
<!-- <entities-selection #entities [simpleView]="true" currentEntity="all" [selectedEntity]="selectedEntity"-->
<!-- (selectionChange)="entityChanged($event)" (disableSelectEmitter)="disableSelectChange($event)"-->
<!-- [onChangeNavigate]="false" class="uk-width-2-5"></entities-selection>-->
<!-- <div class="uk-width-expand" input placeholder="Scholary works" [hint]="'Search in OpenAIRE'"-->
<!-- [(value)]="keyword" tooltip="true"></div>-->
<!-- </advanced-search-input>-->
<!-- <div *ngIf="selectedEntity === 'result' && !entities.input.focused" class="uk-dropdown uk-display-block uk-margin-top uk-width-auto">-->
<!-- <div class="uk-padding-small">-->
<!-- <quick-selections [resultTypes]="resultTypes" [quickFilter]="resultsQuickFilter"></quick-selections>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!--</div>-->
<!--<div class="uk-section uk-container uk-container-large">-->
<!-- <div class="contentbox uk-grid uk-child-width-1-1@s uk-flex-row-reverse">-->
<!-- <div class="uk-width-medium@m uk-width-large@l uk-width-xlarge@xl uk-width-1-1 uk-flex uk-flex-middle uk-padding-remove-horizontal">-->
<!-- <img src="https://marketplace.eosc-portal.eu/packs/media/images/gfx_whole_illustation_desktop-fc94d4f7e15455d1785ef4793e1573fb.png">-->
<!-- </div>-->
<!-- <div class="uk-width-expand">-->
<!-- <div class="">-->
<!-- <div class=" ">-->
<!-- <h1 class=" uk-h2 uk-text-normal">Welcome to EOSC Explore</h1>-->
<!-- <h2 class="uk-h5 uk-text-normal uk-text-italics"><br>-->
<!-- <i>The in-context research discovery portal over the EOSC Exchange and the global map of science.</i>-->
<!-- </h2>-->
<!-- </div>-->
<!-- <div class="uk-margin-large-top uk-text-large uk-text-light">The EOSC Explore supports discovery of research products and services onboarded in the EOSC Exchange in the wider context of scientific research outcomes, research funding, and research organization. The EOSC Research Graph, powered by the OpenAIRE Research Graph, provides links from products and services to funders, projects, organizations, and authors, collects and infers SDGs subjects, communities, many more. The portal exploits the EOSC Interoperability Framework to identify relationships between research products in the graph and EOSC Services in the EOSC Marketplace, to facilitate and enable composability of resources. </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- &lt;!&ndash; <aside><img src="https://marketplace.eosc-portal.eu/packs/media/images/gfx_whole_illustation_desktop-fc94d4f7e15455d1785ef4793e1573fb.png"></aside>&ndash;&gt;-->
<!-- </div>-->
<!--<div class="uk-section graph-background" *ngIf="aggregator.graphSectionText && aggregator.graphSectionTitle">-->
<!-- <div class="uk-container">-->
<!-- <div class="uk-flex uk-flex-top uk-child-width-1-1 uk-child-width-1-2@m" uk-grid>-->
<!-- <div class="uk-flex-last@m">-->
<!-- <div [class.lines-10]="!readMore" class="uk-margin-bottom multi-line-ellipsis">-->
<!-- <div class="uk-h3">{{aggregator.graphSectionTitle}}</div>-->
<!-- <p [innerHtml]="aggregator.graphSectionText">-->
<!-- </p>-->
<!-- </div>-->
<!-- <div *ngIf="aggregator.graphSectionText">-->
<!-- <div *ngIf="!readMore" class="uk-text-center clickable" (click)="readMore = true">-->
<!-- <span>Read more<span class="space" uk-icon="chevron-down"></span></span>-->
<!-- </div>-->
<!-- <div *ngIf="readMore" class="uk-text-center clickable" (click)="readMore = false">-->
<!-- <span>Read less<span class="space" uk-icon="chevron-up"></span></span>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="uk-flex uk-flex-bottom">-->
<!-- <div class="uk-width-1-3 uk-width-1-2@m">-->
<!-- <img src="assets/graph.svg">-->
<!-- </div>-->
<!-- <div class="uk-padding uk-width-1-2">-->
<!-- <img src="assets/common-assets/logo-large-graph.png">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!--</div>-->
<!--<div class="uk-section" *ngIf="isRouteAvailable('participate/deposit/learn-how') || isRouteAvailable('participate/claim')">-->
<!-- <div class="uk-padding uk-padding-remove-horizontal">-->
<!-- <div class="uk-container uk-container-small">-->
<!-- <div class="uk-grid-margin uk-grid uk-grid-stack" uk-grid="">-->
<!-- <div class="uk-width-1-1@m uk-first-column">-->
<!-- <div-->
<!-- class="uk-margin uk-text-center uk-child-width-1-1 uk-grid-match uk-child-width-1-1@s uk-child-width-1-2@m uk-child-width-1-2@l uk-grid"-->
<!-- id="page#8" uk-grid="" uk-height-match="target: .target">-->
<!-- <div class="uk-first-column" *ngIf="isRouteAvailable('participate/deposit/learn-how')">-->
<!-- <div class="el-item uk-card uk-card-default uk-card-medium uk-card-body">-->
<!-- <div class="uk-text-center target"><img alt="Share" class="uk-width-1-3@m uk-width-small"-->
<!-- src="assets/share.svg"></div>-->
<div class="el-content uk-margin uk-text-large"><span class="uk-text-bold">Deposit</span> your research
</div>
<!-- <div class="el-content uk-margin uk-text-large"><span class="uk-text-bold">Deposit</span> your research-->
<!-- </div>-->
<div class="uk-margin-small-top uk-text-left card-text uk-flex uk-flex-center">
<div class="uk-margin-left uk-margin-right">Deposit in a repository of your choice.<br>
Select an OpenAIRE compatible<br>
repository (2.0 +) so that your research is linked to your funding information. Use Zenodo, a
catch-all repository hosted by CERN to deposit all your research results (publications, data,
software, etc.)
</div>
</div>
<a class="uk-button portal-button uk-padding uk-padding-remove-vertical uk-margin-small-left ng-star-inserted uk-margin uk-margin-bottom uk-width-1-2"
href="/participate/deposit/learn-how" type="submit">Deposit </a></div>
</div>
<!-- <div class="uk-margin-small-top uk-text-left card-text uk-flex uk-flex-center">-->
<!-- <div class="uk-margin-left uk-margin-right">Deposit in a repository of your choice.<br>-->
<!-- Select an OpenAIRE compatible<br>-->
<!-- repository (2.0 +) so that your research is linked to your funding information. Use Zenodo, a-->
<!-- catch-all repository hosted by CERN to deposit all your research results (publications, data,-->
<!-- software, etc.)-->
<!-- </div>-->
<!-- </div>-->
<!-- <a class="uk-button portal-button uk-padding uk-padding-remove-vertical uk-margin-small-left ng-star-inserted uk-margin uk-margin-bottom uk-width-1-2"-->
<!-- href="/participate/deposit/learn-how" type="submit">Deposit </a></div>-->
<!-- </div>-->
<div *ngIf=" isRouteAvailable('participate/claim')">
<div class="el-item uk-card uk-card-default uk-card-medium uk-card-body">
<div class="uk-text-center target"><img alt="Share" class="uk-width-1-3@m uk-width-small"
src="assets/link.svg"></div>
<!-- <div *ngIf=" isRouteAvailable('participate/claim')">-->
<!-- <div class="el-item uk-card uk-card-default uk-card-medium uk-card-body">-->
<!-- <div class="uk-text-center target"><img alt="Share" class="uk-width-1-3@m uk-width-small"-->
<!-- src="assets/link.svg"></div>-->
<div class="el-content uk-margin uk-text-large"><span class="uk-text-bold">Link</span> your work</div>
<!-- <div class="el-content uk-margin uk-text-large"><span class="uk-text-bold">Link</span> your work</div>-->
<div class="uk-margin-small-top uk-text-left card-text uk-flex uk-flex-center">
<div class="uk-margin-left uk-margin-right">Connect all your research.<br>
If you can't find your research results in OpenAIRE, don't worry! Use our Link Out service , that
reaches out to many<br>
external sources via APIs, to connect<br>
your research results and claim them to your project.
</div>
</div>
<a class="uk-button portal-button uk-padding uk-padding-remove-vertical uk-margin-small-left ng-star-inserted uk-margin uk-margin-bottom uk-width-1-2"
href="/participate/claim" type="submit">Link </a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- <div class="uk-margin-small-top uk-text-left card-text uk-flex uk-flex-center">-->
<!-- <div class="uk-margin-left uk-margin-right">Connect all your research.<br>-->
<!-- If you can't find your research results in OpenAIRE, don't worry! Use our Link Out service , that-->
<!-- reaches out to many<br>-->
<!-- external sources via APIs, to connect<br>-->
<!-- your research results and claim them to your project.-->
<!-- </div>-->
<!-- </div>-->
<!-- <a class="uk-button portal-button uk-padding uk-padding-remove-vertical uk-margin-small-left ng-star-inserted uk-margin uk-margin-bottom uk-width-1-2"-->
<!-- href="/participate/claim" type="submit">Link </a></div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!--</div>-->
<!--</div>-->

View File

@ -1,234 +1,267 @@
import {ChangeDetectorRef, Component, ViewChild} from '@angular/core';
import {Subscription, zip} from 'rxjs';
import {ActivatedRoute, Router} from '@angular/router';
import {Location} from '@angular/common';
import {Meta, Title} from '@angular/platform-browser';
import {ConfigurationService} from '../openaireLibrary/utils/configuration/configuration.service';
import {SearchDataprovidersService} from '../openaireLibrary/services/searchDataproviders.service';
import {SearchProjectsService} from '../openaireLibrary/services/searchProjects.service';
import {SearchOrganizationsService} from '../openaireLibrary/services/searchOrganizations.service';
import {RefineFieldResultsService} from '../openaireLibrary/services/refineFieldResults.service';
import {OpenaireEntities, SearchFields} from '../openaireLibrary/utils/properties/searchFields';
import {RouterHelper} from '../openaireLibrary/utils/routerHelper.class';
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
import {ErrorCodes} from '../openaireLibrary/utils/properties/errorCodes';
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
import {SEOService} from '../openaireLibrary/sharedComponents/SEO/SEO.service';
import {SearchResearchResultsService} from "../openaireLibrary/services/searchResearchResults.service";
import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
import {Filter} from "../openaireLibrary/searchPages/searchUtils/searchHelperClasses.class";
import {AggregatorInfo, PortalAggregators} from "../utils/aggregators";
import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {properties} from "../../environments/environment";
import {portalProperties} from "../../environments/environment-aggregator";
import {Component, Inject} from "@angular/core";
import {DOCUMENT} from "@angular/common";
import {Meta, Title} from "@angular/platform-browser";
@Component({
selector: 'home',
templateUrl: 'home.component.html',
})
export class HomeComponent {
public keyword:string = "";
public searchFields:SearchFields = new SearchFields();
public errorCodes:ErrorCodes = new ErrorCodes();
public routerHelper:RouterHelper = new RouterHelper();
showPublications: boolean = portalProperties.entities.publication.isEnabled;
showDatasets: boolean = portalProperties.entities.dataset.isEnabled;
showSoftware: boolean = portalProperties.entities.software.isEnabled;
showOrp: boolean = portalProperties.entities.other.isEnabled;
showOrganizations: boolean = portalProperties.entities.organization.isEnabled;
showProjects: boolean = portalProperties.entities.project.isEnabled;
showDataProviders: boolean = portalProperties.entities.datasource.isEnabled;
properties: EnvProperties = properties;
public readMore: boolean = false;
private noOfFunders = 3;
public funders = [];
subs: Subscription[] = [];
resultsQuickFilter: { filter: Filter, selected: boolean, filterId: string, value: string } = {
filter: null,
selected: true,
filterId: "resultbestaccessright",
value: "Open Access"
};
selectedEntity = "all";
disableSelect: boolean = true;
selectedEntitySimpleUrl;
selectedEntityAdvancedUrl;
resultTypes:Filter = {values:[],filterId:"type", countSelectedValues: 0, filterType: 'checkbox', originalFilterId: "", valueIsExact: true, title: "Result Types",filterOperator:"or"};
public pageContents = null;
customFilter:SearchCustomFilter= null;
aggregator:AggregatorInfo;
constructor (
private route: ActivatedRoute,
private _router: Router,
private _searchResearchResultsService: SearchResearchResultsService,
private _searchDataprovidersService: SearchDataprovidersService,
private _searchProjectsService: SearchProjectsService,
private _searchOrganizationsService: SearchOrganizationsService,
private _refineFieldResultsService:RefineFieldResultsService,
private location: Location, private _piwikService:PiwikService,
private config: ConfigurationService, private _meta: Meta, private _title: Title, private seoService: SEOService,
private helper: HelperService, private cdr: ChangeDetectorRef
) {
this.aggregator = PortalAggregators.eoscInfo;
this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator();
let description = "OpenAIRE Explore: Over 100M of research deduplicated, 170K research software, 11M research data. One of the largest open scholarly records collection worldwide.";
let title = "OpenAIRE - Explore| " +this.aggregator.title;
constructor(@Inject(DOCUMENT) readonly document: Document, private _meta: Meta, private _title: Title) {
let title = "EOSC Explore";
this._title.setTitle(title);
this._meta.updateTag({content:description},"name='description'");
this._meta.updateTag({content:description},"property='og:description'");
this._meta.updateTag({content:title},"property='og:title'");
}
private getPageContents() {
this.subs.push(this.helper.getPageHelpContents(this.properties, 'openaire', this._router.url).subscribe(contents => {
this.pageContents = contents;
}));
/** The Window object from Document defaultView */
get window(): Window {
return this.document.defaultView;
}
public ceil(num: number) {
return Math.ceil(num);
}
public ngOnInit() {
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.baseLink+this._router.url, false);
this.getPageContents();
if(this.properties!=null){
var url = this.properties.domain + this.properties.baseLink+this._router.url;
this._meta.updateTag({content:url},"property='og:url'");
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.subs.push(this._piwikService.trackView(this.properties, "OpenAIRE").subscribe());
}
//this.config.getCommunityInformation(this.properties, this.properties.adminToolsCommunity ).subscribe(data => {
this.subs.push(this.config.communityInformationState.subscribe(data => {
if(data) {
var showEntity = {};
for (var i = 0; i < data['entities'].length; i++) {
showEntity["" + data['entities'][i]["pid"] + ""] = data['entities'][i]["isEnabled"];
}
this.showPublications = !!showEntity["publication"];
this.showDatasets = !!showEntity["dataset"];
this.showSoftware = !!showEntity["software"];
this.showOrp = !!showEntity["orp"];
this.showProjects = !!showEntity["project"];
this.showDataProviders = !!showEntity["datasource"];
this.showOrganizations = !!showEntity["organization"];
if(this.showPublications){
this.resultTypes.values.push({name: OpenaireEntities.PUBLICATIONS , id:"publications",selected:false, number:0});
}
if(this.showDatasets){
this.resultTypes.values.push({name: OpenaireEntities.DATASETS , id:"datasets",selected:false, number:0});
}
if(this.showSoftware){
this.resultTypes.values.push({name: OpenaireEntities.SOFTWARE , id:"software",selected:false, number:0});
}
if(this.showOrp){
this.resultTypes.values.push({name: OpenaireEntities.OTHER , id:"other",selected:false, number:0});
}
}
},
error => {
this.handleError("Error getting community information", error);
}
));
ngOnInit() {
// this.window.location.href = '...';
if (typeof document !== 'undefined') {
this.window.open('https://search.eosc-portal.eu/search/all?q=*', "_self");
}
}
public ngOnDestroy() {
for (let sub of this.subs) {
sub.unsubscribe();
}
}
private handleError(message: string, error) {
console.error("Home Page: "+message, error);
}
entityChanged($event){
this.selectedEntity = $event.entity;
this.selectedEntitySimpleUrl = $event.simpleUrl;
this.selectedEntityAdvancedUrl = $event.advancedUrl;
}
goTo(simple:boolean){
let url = (simple)?this.selectedEntitySimpleUrl:this.selectedEntityAdvancedUrl;
let parameterNames = [];
let parameterValues = [];
if (this.selectedEntity == "result") {
if (this.resultTypes) {
let values = [];
for(let value of this.resultTypes.values){
if (value.selected) {
values.push(value.id);
}
}
if (values.length > 0 && values.length !=4) {
parameterNames.push("type");
parameterValues.push(values.join(","));
}
if (this.resultsQuickFilter) {
parameterNames.push("qf");
parameterValues.push("" + this.resultsQuickFilter.selected);
}
}
}else if(this.selectedEntity == "all"){
if (this.resultsQuickFilter) {
parameterNames.push("qf");
parameterValues.push("true");
}
}
if(this.keyword.length > 0) {
parameterNames.push("fv0");
parameterValues.push(this.keyword);
parameterNames.push("f0");
parameterValues.push("q");
}
if(this.customFilter){
parameterNames.push(this.customFilter.queryFieldName);
parameterValues.push(this.customFilter.valueId);
parameterNames.push("cf");
parameterValues.push("true");
}
this._router.navigate([url], {queryParams: this.routerHelper.createQueryParams(parameterNames, parameterValues)});
}
getQueryParamsForAdvancedSearch(entity){
let params = {};
if (entity == "result") {
if (this.resultsQuickFilter) {
params["qf"] = "" + this.resultsQuickFilter.selected;
}
}
if(this.keyword.length > 0) {
params["fv0"] = "" + this.keyword;
params["f0"] = "q";
}
if(this.customFilter){
params = this.customFilter.getParameters(params);
}
return params;
}
isRouteAvailable(routeToCheck: string) {
for (let i = 0; i < this._router.config.length; i++) {
let routePath: string = this._router.config[i].path;
if (routePath == routeToCheck) {
return true;
}
}
return false;
}
disableSelectChange(event: boolean) {
this.disableSelect = event;
this.cdr.detectChanges();
}
}
// import {ChangeDetectorRef, Component, Inject, ViewChild} from '@angular/core';
// import {Subscription, zip} from 'rxjs';
// import {ActivatedRoute, Router} from '@angular/router';
// import {DOCUMENT, Location} from '@angular/common';
// import {Meta, Title} from '@angular/platform-browser';
// import {ConfigurationService} from '../openaireLibrary/utils/configuration/configuration.service';
// import {SearchDataprovidersService} from '../openaireLibrary/services/searchDataproviders.service';
// import {SearchProjectsService} from '../openaireLibrary/services/searchProjects.service';
// import {SearchOrganizationsService} from '../openaireLibrary/services/searchOrganizations.service';
// import {RefineFieldResultsService} from '../openaireLibrary/services/refineFieldResults.service';
// import {OpenaireEntities, SearchFields} from '../openaireLibrary/utils/properties/searchFields';
//
// import {RouterHelper} from '../openaireLibrary/utils/routerHelper.class';
// import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
// import {ErrorCodes} from '../openaireLibrary/utils/properties/errorCodes';
// import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
// import {SEOService} from '../openaireLibrary/sharedComponents/SEO/SEO.service';
// import {SearchResearchResultsService} from "../openaireLibrary/services/searchResearchResults.service";
// import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
// import {Filter} from "../openaireLibrary/searchPages/searchUtils/searchHelperClasses.class";
// import {AggregatorInfo, PortalAggregators} from "../utils/aggregators";
// import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class";
// import {properties} from "../../environments/environment";
// import {portalProperties} from "../../environments/environment-aggregator";
//
// @Component({
// selector: 'home',
// templateUrl: 'home.component.html',
// })
// export class HomeComponent {
// public keyword:string = "";
//
// public searchFields:SearchFields = new SearchFields();
// public errorCodes:ErrorCodes = new ErrorCodes();
// public routerHelper:RouterHelper = new RouterHelper();
// showPublications: boolean = portalProperties.entities.publication.isEnabled;
// showDatasets: boolean = portalProperties.entities.dataset.isEnabled;
// showSoftware: boolean = portalProperties.entities.software.isEnabled;
// showOrp: boolean = portalProperties.entities.other.isEnabled;
// showOrganizations: boolean = portalProperties.entities.organization.isEnabled;
// showProjects: boolean = portalProperties.entities.project.isEnabled;
// showDataProviders: boolean = portalProperties.entities.datasource.isEnabled;
// properties: EnvProperties = properties;
// public readMore: boolean = false;
//
// private noOfFunders = 3;
// public funders = [];
//
// subs: Subscription[] = [];
//
// resultsQuickFilter: { filter: Filter, selected: boolean, filterId: string, value: string } = {
// filter: null,
// selected: true,
// filterId: "resultbestaccessright",
// value: "Open Access"
// };
// selectedEntity = "all";
// disableSelect: boolean = true;
// selectedEntitySimpleUrl;
// selectedEntityAdvancedUrl;
// resultTypes:Filter = {values:[],filterId:"type", countSelectedValues: 0, filterType: 'checkbox', originalFilterId: "", valueIsExact: true, title: "Result Types",filterOperator:"or"};
// public pageContents = null;
// customFilter:SearchCustomFilter= null;
// aggregator:AggregatorInfo;
//
// constructor (
// private route: ActivatedRoute,
// private _router: Router,
// private _searchResearchResultsService: SearchResearchResultsService,
// private _searchDataprovidersService: SearchDataprovidersService,
// private _searchProjectsService: SearchProjectsService,
// private _searchOrganizationsService: SearchOrganizationsService,
// private _refineFieldResultsService:RefineFieldResultsService,
// private location: Location, private _piwikService:PiwikService,
// private config: ConfigurationService, private _meta: Meta, private _title: Title, private seoService: SEOService,
// private helper: HelperService, private cdr: ChangeDetectorRef
// ) {
// this.aggregator = PortalAggregators.eoscInfo;
// this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator();
// let description = "OpenAIRE Explore: Over 100M of research deduplicated, 170K research software, 11M research data. One of the largest open scholarly records collection worldwide.";
// let title = "OpenAIRE - Explore| " +this.aggregator.title;
//
// this._title.setTitle(title);
// this._meta.updateTag({content:description},"name='description'");
// this._meta.updateTag({content:description},"property='og:description'");
// this._meta.updateTag({content:title},"property='og:title'");
//
//
// }
//
// private getPageContents() {
// this.subs.push(this.helper.getPageHelpContents(this.properties, 'openaire', this._router.url).subscribe(contents => {
// this.pageContents = contents;
// }));
// }
//
// public ceil(num: number) {
// return Math.ceil(num);
// }
//
// public ngOnInit() {
// this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.baseLink+this._router.url, false);
// this.getPageContents();
// if(this.properties!=null){
// var url = this.properties.domain + this.properties.baseLink+this._router.url;
// this._meta.updateTag({content:url},"property='og:url'");
// if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
// this.subs.push(this._piwikService.trackView(this.properties, "OpenAIRE").subscribe());
// }
//
// //this.config.getCommunityInformation(this.properties, this.properties.adminToolsCommunity ).subscribe(data => {
// this.subs.push(this.config.communityInformationState.subscribe(data => {
// if(data) {
// var showEntity = {};
// for (var i = 0; i < data['entities'].length; i++) {
//
// showEntity["" + data['entities'][i]["pid"] + ""] = data['entities'][i]["isEnabled"];
// }
// this.showPublications = !!showEntity["publication"];
// this.showDatasets = !!showEntity["dataset"];
// this.showSoftware = !!showEntity["software"];
// this.showOrp = !!showEntity["orp"];
// this.showProjects = !!showEntity["project"];
// this.showDataProviders = !!showEntity["datasource"];
// this.showOrganizations = !!showEntity["organization"];
// if(this.showPublications){
// this.resultTypes.values.push({name: OpenaireEntities.PUBLICATIONS , id:"publications",selected:false, number:0});
// }
// if(this.showDatasets){
// this.resultTypes.values.push({name: OpenaireEntities.DATASETS , id:"datasets",selected:false, number:0});
// }
// if(this.showSoftware){
// this.resultTypes.values.push({name: OpenaireEntities.SOFTWARE , id:"software",selected:false, number:0});
// }
// if(this.showOrp){
// this.resultTypes.values.push({name: OpenaireEntities.OTHER , id:"other",selected:false, number:0});
// }
// }
// },
// error => {
// this.handleError("Error getting community information", error);
// }
// ));
// }
//
// }
// public ngOnDestroy() {
// for (let sub of this.subs) {
// sub.unsubscribe();
// }
// }
//
// private handleError(message: string, error) {
// console.error("Home Page: "+message, error);
// }
// entityChanged($event){
// this.selectedEntity = $event.entity;
// this.selectedEntitySimpleUrl = $event.simpleUrl;
// this.selectedEntityAdvancedUrl = $event.advancedUrl;
// }
// goTo(simple:boolean){
// let url = (simple)?this.selectedEntitySimpleUrl:this.selectedEntityAdvancedUrl;
// let parameterNames = [];
// let parameterValues = [];
// if (this.selectedEntity == "result") {
// if (this.resultTypes) {
// let values = [];
// for(let value of this.resultTypes.values){
// if (value.selected) {
// values.push(value.id);
// }
// }
// if (values.length > 0 && values.length !=4) {
// parameterNames.push("type");
// parameterValues.push(values.join(","));
// }
// if (this.resultsQuickFilter) {
// parameterNames.push("qf");
// parameterValues.push("" + this.resultsQuickFilter.selected);
// }
// }
// }else if(this.selectedEntity == "all"){
// if (this.resultsQuickFilter) {
// parameterNames.push("qf");
// parameterValues.push("true");
// }
// }
// if(this.keyword.length > 0) {
// parameterNames.push("fv0");
// parameterValues.push(this.keyword);
// parameterNames.push("f0");
// parameterValues.push("q");
// }
// if(this.customFilter){
// parameterNames.push(this.customFilter.queryFieldName);
// parameterValues.push(this.customFilter.valueId);
// parameterNames.push("cf");
// parameterValues.push("true");
// }
// this._router.navigate([url], {queryParams: this.routerHelper.createQueryParams(parameterNames, parameterValues)});
// }
// getQueryParamsForAdvancedSearch(entity){
// let params = {};
// if (entity == "result") {
// if (this.resultsQuickFilter) {
// params["qf"] = "" + this.resultsQuickFilter.selected;
// }
// }
// if(this.keyword.length > 0) {
// params["fv0"] = "" + this.keyword;
// params["f0"] = "q";
// }
// if(this.customFilter){
// params = this.customFilter.getParameters(params);
// }
// return params;
// }
//
//
// isRouteAvailable(routeToCheck: string) {
// for (let i = 0; i < this._router.config.length; i++) {
// let routePath: string = this._router.config[i].path;
// if (routePath == routeToCheck) {
// return true;
// }
// }
// return false;
// }
//
// disableSelectChange(event: boolean) {
// this.disableSelect = event;
// this.cdr.detectChanges();
// }
// }

View File

@ -40,10 +40,10 @@
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<link id="customCss" rel="stylesheet" href="">
<title>Search OpenAIRE</title>
<title>Search EOSC</title>
</head>
<body>
<div class="uk-badge" style="border: 0px; border-radius: 0px; background: #bc2300 !important; position: absolute; z-index: 1000;">Beta instance</div>
<!-- <div class="uk-badge" style="border: 0px; border-radius: 0px; background: #bc2300 !important; position: absolute; z-index: 1000;">Beta instance</div>-->
<div class="uk-offcanvas-content uk-height-viewport">
<eosc-common-main-header></eosc-common-main-header>
<app-root></app-root>