Adding code files (sources & assets)

This commit is contained in:
Konstantina Galouni 2023-09-22 10:08:25 +03:00
parent 157427aa75
commit 6244439392
153 changed files with 4915 additions and 0 deletions

9
.gitmodules vendored Normal file
View File

@ -0,0 +1,9 @@
[submodule "openaireLibrary"]
path = src/app/openaireLibrary
url = gitea@code-repo.d4science.org:MaDgIK/openaire-library.git
[submodule "common-assets"]
path = src/assets/common-assets
url = gitea@code-repo.d4science.org:MaDgIK/openaire-assets.git
[submodule "src/assets/openaire-theme"]
path = src/assets/openaire-theme
url = gitea@code-repo.d4science.org:MaDgIK/openaire-theme.git

16
CHANGELOG.md Normal file
View File

@ -0,0 +1,16 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
*For each release, use the following sub-sections:*
- *Added (for new features)*
- *Changed (for changes in existing functionality)*
- *Deprecated (for soon-to-be removed features)*
- *Removed (for now removed features)*
- *Fixed (for any bug fixes)*
- *Security (in case of vulnerabilities)*

View File

@ -1,2 +1,41 @@
# faircore4eosc-explore
# EOSC EXPLORE
This project was built with [Angular CLI](https://github.com/angular/angular-cli) version 14.2.3.
## Install packages
Run npm install (maybe needs sudo), a script that will delete unused files from library will be run.
## Development server
Run `npm start` for a dev server. Navigate to `http://localhost:5200/`. The app will automatically reload if you change any of the source files.
## Build - CSR
Use the `npm run build-dev` for a development build.<br>
Use the `npm run build-beta` for a beta build.<br>
Use the `npm run build-prod` for a production build.
## Build - SSR
Use the `npm run build:ssr-dev` for a development build.<br>
Use the `npm run build:ssr-beta` for a beta build.<br>
Use the `npm run build:ssr-prod` for a production build.
## Run SSR
`npm run serve:ssr` will run the last server build.
## Webpack Analyzer
In order to analyze bundle size you can run `npm run webpack-bundle-analyzer`
## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).

307
angular.json Normal file
View File

@ -0,0 +1,307 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"eosc": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {
"@schematics/angular:class": {
"skipTests": true
},
"@schematics/angular:component": {
"skipTests": true
},
"@schematics/angular:directive": {
"skipTests": true
},
"@schematics/angular:guard": {
"skipTests": true
},
"@schematics/angular:module": {
},
"@schematics/angular:pipe": {
"skipTests": true
},
"@schematics/angular:service": {
"skipTests": true
}
},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/eosc/browser",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/assets",
"src/robots.txt"
],
"styles": [
"src/styles.less",
"src/assets/common-assets/library-css/material.scss"
],
"scripts": [
"node_modules/uikit/dist/js/uikit.min.js",
"node_modules/uikit/dist/js/uikit-icons.min.js",
"node_modules/jquery/dist/jquery.js"
],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"development": {
"optimization": {
"scripts": true,
"styles": {
"minify": true,
"inlineCritical": false
},
"fonts": true
},
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
]
},
"beta": {
"assets": [
"src/assets",
{
"input": "src/beta/",
"output": "/",
"glob": "*.txt"
}
],
"index": {
"input": "src/beta/index.html",
"output": "index.html"
},
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.beta.ts"
}
],
"optimization": {
"scripts": true,
"styles": {
"minify": true,
"inlineCritical": false
},
"fonts": true
},
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
]
},
"production": {
"assets": [
"src/assets",
{
"input": "src/prod/",
"output": "/",
"glob": "*.txt"
}
],
"index": {
"input": "src/prod/index.html",
"output": "index.html"
},
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": {
"scripts": true,
"styles": {
"minify": true,
"inlineCritical": false
},
"fonts": true
},
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
]
}
},
"defaultConfiguration": ""
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "eosc:build"
},
"configurations": {
"production": {
"browserTarget": "eosc:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "eosc:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.less"
],
"scripts": [],
"assets": [
"src/assets"
]
}
},
"server": {
"builder": "@angular-devkit/build-angular:server",
"options": {
"outputPath": "dist/eosc/server",
"main": "server.ts",
"tsConfig": "src/tsconfig.server.json",
"sourceMap": true,
"optimization": false
},
"configurations": {
"development": {
"outputHashing": "media",
"sourceMap": false,
"optimization": true
},
"beta": {
"outputHashing": "media",
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.beta.ts"
}
],
"sourceMap": false,
"optimization": true
},
"production": {
"outputHashing": "media",
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"sourceMap": false,
"optimization": true
}
},
"defaultConfiguration": ""
},
"serve-ssr": {
"builder": "@nguniversal/builders:ssr-dev-server",
"options": {
"browserTarget": "eosc:build",
"serverTarget": "eosc:server"
},
"configurations": {
"production": {
"browserTarget": "eosc:build:production",
"serverTarget": "eosc:server:production"
}
}
},
"prerender": {
"builder": "@nguniversal/builders:prerender",
"options": {
"browserTarget": "eosc:build:production",
"serverTarget": "eosc:server:production",
"routes": [
"/"
]
},
"configurations": {
"production": {}
}
}
}
},
"eosc-e2e": {
"root": "e2e/",
"projectType": "application",
"prefix": "",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "eosc:serve"
},
"configurations": {
"production": {
"devServerTarget": "eosc:serve:production"
}
}
}
}
}
},
"cli": {
"analytics": false
}
}

28
e2e/protractor.conf.js Normal file
View File

@ -0,0 +1,28 @@
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require('jasmine-spec-reporter');
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./src/**/*.e2e-spec.ts'
],
capabilities: {
'browserName': 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.e2e.json')
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};

23
e2e/src/app.e2e-spec.ts Normal file
View File

@ -0,0 +1,23 @@
import { AppPage } from './app.po';
import { browser, logging } from 'protractor';
describe('workspace-project App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display welcome message', () => {
page.navigateTo();
expect(page.getTitleText()).toEqual('Welcome to aggregator!');
});
afterEach(async () => {
// Assert that there are no errors emitted from the browser
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
expect(logs).not.toContain(jasmine.objectContaining({
level: logging.Level.SEVERE,
} as logging.Entry));
});
});

11
e2e/src/app.po.ts Normal file
View File

@ -0,0 +1,11 @@
import { browser, by, element } from 'protractor';
export class AppPage {
navigateTo() {
return browser.get(browser.baseUrl) as Promise<any>;
}
getTitleText() {
return element(by.css('app-root h1')).getText() as Promise<string>;
}
}

13
e2e/tsconfig.e2e.json Normal file
View File

@ -0,0 +1,13 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"module": "commonjs",
"target": "es5",
"types": [
"jasmine",
"jasminewd2",
"node"
]
}
}

72
package.json Normal file
View File

@ -0,0 +1,72 @@
{
"name": "eosc",
"version": "3.1.0",
"scripts": {
"ng": "ng",
"start": "ng serve --disable-host-check --host 0.0.0.0 --port 5200",
"build": "ng build",
"build-dev": "ng build --configuration=development",
"build-beta": "ng build --configuration=beta",
"build-prod": "ng build --configuration production",
"webpack-bundle-analyzer": "ng build --stats-json && webpack-bundle-analyzer dist/eosc/browser/stats-es2015.json --host 0.0.0.0",
"test": "ng test",
"e2e": "ng e2e",
"dev:ssr": "ng run eosc:serve-ssr",
"serve:ssr": "node dist/eosc/server/main.js",
"build:ssr-dev": "npm run build-dev && ng run eosc:server:development",
"build:ssr-beta": "npm run build-beta && ng run eosc:server:beta",
"build:ssr-prod": "npm run build-prod && ng run eosc:server:production",
"prerender": "ng run eosc:prerender",
"after-build-clean": "rm -rf dist/eosc/browser/assets/common-assets/.git/ src/app/openaireLibrary/.git node_modules .angular .git*"
},
"private": true,
"dependencies": {
"@angular/animations": "^14.2.3",
"@angular/cdk": "^14.2.2",
"@angular/common": "^14.2.3",
"@angular/compiler": "^14.2.3",
"@angular/core": "^14.2.3",
"@angular/forms": "^14.2.3",
"@angular/localize": "^14.2.3",
"@angular/material": "^14.2.2",
"@angular/platform-browser": "^14.2.3",
"@angular/platform-browser-dynamic": "^14.2.3",
"@angular/platform-server": "^14.2.3",
"@angular/router": "^14.2.3",
"@nguniversal/express-engine": "^14.2.0",
"clipboard": "^1.5.16",
"core-js": "^2.5.4",
"express": "^4.15.2",
"jquery": "^3.4.1",
"ng-recaptcha": "^10.0.0",
"prom-client": "^11.3.0",
"rxjs": "^6.5.1",
"ts-md5": "^1.2.0",
"tslib": "^2.0.0",
"uikit": "3.13.10",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^14.2.3",
"@angular/cli": "^14.2.3",
"@angular/compiler-cli": "^14.2.3",
"@angular/language-service": "^14.2.3",
"@nguniversal/builders": "^14.2.0",
"@types/express": "^4.17.0",
"@types/compression": "^1.7.0",
"@types/node": "^12.11.1",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "~2.0.3",
"codelyzer": "^6.0.0",
"jasmine-core": "~3.8.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.3.3",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.6.0",
"protractor": "~7.0.0",
"ts-node": "~7.0.0",
"typescript": "~4.6.4"
}
}

125
prometheus.ts Normal file
View File

@ -0,0 +1,125 @@
import * as prom from 'prom-client';
export class Prometheus {
register = new prom.Registry();
counters: Map<string, prom.Counter> = new Map<string, prom.Counter>([
["/", new prom.Counter({
name: 'home',
help: 'Home Page Counter',
registers: [this.register]
})],
["/search/publication", new prom.Counter({
name: 'search_publication',
help: 'Publication Landing Page Counter',
registers: [this.register]
})],
["/search/dataset", new prom.Counter({
name: 'search_dataset',
help: 'Dataset Landing Page Counter',
registers: [this.register]
})],
["/search/software", new prom.Counter({
name: 'search_software',
help: 'Software Landing Page Counter',
registers: [this.register]
})],
["/search/other", new prom.Counter({
name: 'search_other',
help: 'Other Landing Page Counter',
registers: [this.register]
})],
["/search/project", new prom.Counter({
name: 'search_project',
help: 'Project Landing Page Counter',
registers: [this.register]
})],
["/search/dataprovider", new prom.Counter({
name: 'search_dataprovider',
help: 'DataProvider Landing Page Counter',
registers: [this.register]
})],
["/search/organization", new prom.Counter({
name: 'search_organization',
help: 'organization Landing Page Counter',
registers: [this.register]
})],
["/search/find", new prom.Counter({
name: 'search_find',
help: 'Main Search Page Counter',
registers: [this.register]
})],
["/search/find/publications", new prom.Counter({
name: 'search_find_publications',
help: 'Publications Search Page Counter',
registers: [this.register]
})],
["/search/find/datasets", new prom.Counter({
name: 'search_find_datasets',
help: 'Datasets Search Page Counter',
registers: [this.register]
})],
["/search/find/software", new prom.Counter({
name: 'search_find_software',
help: 'Software Search Page Counter',
registers: [this.register]
})],
["/search/find/other", new prom.Counter({
name: 'search_find_other',
help: 'Other Search Page Counter',
registers: [this.register]
})],
["/search/find/projects", new prom.Counter({
name: 'search_find_projects',
help: 'Projects Search Page Counter',
registers: [this.register]
})],
["/search/find/dataproviders", new prom.Counter({
name: 'search_find_dataproviders',
help: 'DataProviders Search Page Counter',
registers: [this.register]
})],
["/search/find/organizations", new prom.Counter({
name: 'search_find_organizations',
help: 'Organizations Search Page Counter',
registers: [this.register]
})],
["/search/advanced/publications", new prom.Counter({
name: 'search_advanced_publications',
help: 'Publications Advanced Search Page Counter',
registers: [this.register]
})],
["/search/advanced/datasets", new prom.Counter({
name: 'search_advanced_datasets',
help: 'Datasets Advanced Search Page Counter',
registers: [this.register]
})],
["/search/advanced/software", new prom.Counter({
name: 'search_advanced_software',
help: 'Software Advanced Search Page Counter',
registers: [this.register]
})],
["/search/advanced/other", new prom.Counter({
name: 'search_advanced_other',
help: 'Other Advanced Search Page Counter',
registers: [this.register]
})],
["/search/advanced/projects", new prom.Counter({
name: 'search_advanced_projects',
help: 'Projects Advanced Search Page Counter',
registers: [this.register]
})],
["/search/advanced/dataproviders", new prom.Counter({
name: 'search_advanced_dataproviders',
help: 'DataProviders Advanced Search Page Counter',
registers: [this.register]
})],
["/search/advanced/organizations", new prom.Counter({
name: 'search_advanced_organizations',
help: 'Organizations Advanced Search Page Counter',
registers: [this.register]
})]
]);
}

110
server.ts Normal file
View File

@ -0,0 +1,110 @@
import 'zone.js/node';
import { ngExpressEngine } from '@nguniversal/express-engine';
import * as express from 'express';
import * as compression from 'compression';
import { join } from 'path';
import { AppServerModule } from './src/main.server';
import { APP_BASE_HREF } from '@angular/common';
import { existsSync } from 'fs';
import {Prometheus} from "./prometheus";
import {Counter} from "prom-client";
import {REQUEST, RESPONSE} from "./src/app/openaireLibrary/utils/tokens";
// The Express app is exported so that it can be used by serverless Functions.
export function app() {
const server = express();
server.use(compression());
const distFolder = join(process.cwd(), 'dist/eosc/browser');
const indexHtml = existsSync(join(distFolder, 'index.original.html')) ? 'index.original.html' : 'index';
const prometheus: Prometheus = new Prometheus();
// Our Universal express-engine (found @ https://github.com/angular/universal/tree/master/modules/express-engine)
server.engine('html', ngExpressEngine({
bootstrap: AppServerModule,
inlineCriticalCss: false
}));
server.set('view engine', 'html');
server.set('views', distFolder);
// Example Express Rest API endpoints
// server.get('/api/**', (req, res) => { });
// Serve static files from /browser
server.get('*.*', express.static(distFolder, {
maxAge: '1y'
}));
server.get('/metrics', (req, res) => {
res.set('Content-Type', prometheus.register.contentType);
res.end(prometheus.register.metrics());
});
// All regular routes use the Universal engine
server.get('*', (req, res) => {
let start = new Date();
let counter: Counter = prometheus.counters.get(req.path);
if(counter !== undefined) {
counter.inc(1, new Date());
res.render(indexHtml, {
req, providers: [
{
provide: APP_BASE_HREF,
useValue: req.baseUrl
},
{
provide: REQUEST, useValue: (req)
},
{
provide: RESPONSE, useValue: (res)
}
]
});
// event triggers when express is done sending response
res.on('finish', function() {
console.log(new Date().getTime() - start.getTime());
});
} else {
res.render(indexHtml, {
req, providers: [
{
provide: APP_BASE_HREF,
useValue: req.baseUrl
},
{
provide: REQUEST, useValue: (req)
},
{
provide: RESPONSE, useValue: (res)
}
]
});
}
});
return server;
}
function run() {
const port = process.env.PORT || 4000;
// Start up the Node server
const server = app();
server.listen(port, () => {
console.log(`Node Express server listening on http://localhost:${port}`);
});
}
// Webpack will replace 'require' with '__webpack_require__'
// '__non_webpack_require__' is a proxy to Node 'require'
// The below code is to ensure that the server is run only when not requiring the bundle.
declare const __non_webpack_require__: NodeRequire;
const mainModule = __non_webpack_require__.main;
const moduleFilename = mainModule && mainModule.filename || '';
if (moduleFilename === __filename || moduleFilename.includes('iisnode')) {
run();
}
export * from './src/main.server';

View File

@ -0,0 +1,136 @@
import {NgModule} from '@angular/core';
import {Router, RouterModule, Routes} from '@angular/router';
import {OpenaireErrorPageComponent} from './error/errorPage.component';
import {ConfigurationService} from "./openaireLibrary/utils/configuration/configuration.service";
const routes: Routes = [
{path: '', loadChildren: () => import('./home/home.module').then(m => m.HomeModule)},
{
path: 'search/result',
loadChildren: () => import('./landingPages/result/libResult.module').then(m => m.LibResultModule), data: { showHeader: true}
},
{
path: 'search/publication',
loadChildren: () => import('./landingPages/publication/libPublication.module').then(m => m.LibPublicationModule), data: { showHeader: true}
},
{
path: 'search/dataset',
loadChildren: () => import('./landingPages/dataset/libDataset.module').then(m => m.LibDatasetModule), data: { showHeader: true}
},
{
path: 'search/software',
loadChildren: () => import('./landingPages/software/libSoftware.module').then(m => m.LibSoftwareModule), data: { showHeader: true}
},
{
path: 'search/other',
loadChildren: () => import('./landingPages/orp/libOrp.module').then(m => m.LibOrpModule), data: { showHeader: true}
},
{
path: 'search/project',
loadChildren: () => import('./landingPages/project/libProject.module').then(m => m.LibProjectModule), data: { showHeader: true}
},
{
path: 'search/dataprovider',
loadChildren: () => import('./landingPages/dataProvider/libDataProvider.module').then(m => m.LibDataProviderModule), data: { showHeader: true}
},
{
path: 'search/service',
loadChildren: () => import('./landingPages/service/libService.module').then(m => m.LibServiceModule), data: { showHeader: true}
},
{
path: 'search/organization',
loadChildren: () => import('./landingPages/organization/libOrganization.module').then(m => m.LibOrganizationModule), data: { showHeader: true}
},
{
path: 'search/find',
redirectTo: ''
// loadChildren: () => import('./searchPages/find/libSearch.module').then(m => m.LibMainSearchModule)
},
{
path: 'search/find/research-outcomes',
redirectTo: ''
// loadChildren: () => import('./searchPages/simple/searchResearchResults.module').then(m => m.OpenaireSearchResearchResultsModule)
},
{
path: 'search/find/projects',
redirectTo: ''
// loadChildren: () => import('./searchPages/simple/searchProjects.module').then(m => m.LibSearchProjectsModule)
},
{
path: 'search/find/dataproviders',
redirectTo: ''
// loadChildren: () => import('./searchPages/simple/searchDataProviders.module').then(m => m.LibSearchDataProvidersModule)
},
{
path: 'search/find/services',
redirectTo: ''
// loadChildren: () => import('./searchPages/simple/searchServices.module').then(m => m.LibSearchServicesModule)
},
{
path: 'search/find/organizations',
redirectTo: ''
// loadChildren: () => import('./searchPages/simple/searchOrganizations.module').then(m => m.LibSearchOrganizationsModule)
},
{
path: 'search/advanced/research-outcomes',
redirectTo: ''
// loadChildren: () => import('./searchPages/advanced/searchResearchResults.module').then(m => m.OpenaireAdvancedSearchResearchResultsModule)
},
{
path: 'search/advanced/organizations',
redirectTo: ''
// loadChildren: () => import('./searchPages/advanced/advancedSearchOrganizations.module').then(m => m.LibAdvancedSearchOrganizationsModule)
},
{
path: 'search/advanced/dataproviders',
redirectTo: ''
// loadChildren: () => import('./searchPages/advanced/advancedSearchDataProviders.module').then(m => m.LibAdvancedSearchDataProvidersModule)
},
{
path: 'search/advanced/services',
redirectTo: ''
// loadChildren: () => import('./searchPages/advanced/advancedSearchServices.module').then(m => m.LibAdvancedSearchServicesModule)
},
{
path: 'search/advanced/projects',
redirectTo: ''
// loadChildren: () => import('./searchPages/advanced/advancedSearchProjects.module').then(m => m.LibAdvancedSearchProjectsModule)
},
{
path: 'reload',
loadChildren: () => import('./reload/libReload.module').then(m => m.LibReloadModule),
data: {hasSidebar: false}
},
{path: 'user-info', loadChildren: () => import('./login/libUser.module').then(m => m.LibUserModule)},
{path: 'error', component: OpenaireErrorPageComponent}
];
@NgModule({
imports: [RouterModule.forRoot(routes, {
onSameUrlNavigation: "reload",
})],
exports: [RouterModule]
})
export class AppRoutingModule {
subs = [];
enabledRoutes =[];
ngOnDestroy() {
for (let sub of this.subs) {
sub.unsubscribe();
}
}
constructor( private config: ConfigurationService, private router: Router){
this.subs.push(this.config.portalAsObservable.subscribe(data => {
if (data) {
if (data['pages']) {
for (var i = 0; i < data['pages'].length; i++) {
this.enabledRoutes[data['pages'][i]['route']] = data['pages'][i]['isEnabled'];
}
}
}
},
error => {
// this.handleError('Error getting community information (e.g. pages,entities) for community with id: ' + this.communityId, error);
}));
}
}

163
src/app/app.component.ts Normal file
View File

@ -0,0 +1,163 @@
import {Component, Inject, RendererFactory2, ViewEncapsulation} from '@angular/core';
import {EnvProperties} from './openaireLibrary/utils/properties/env-properties';
import {MenuItem} from './openaireLibrary/sharedComponents/menu';
import {AggregatorInfo, PortalAggregators} from "./utils/aggregators";
import {UserManagementService} from "./openaireLibrary/services/user-management.service";
import {User} from "./openaireLibrary/login/utils/helper.class";
import {Header} from "./openaireLibrary/sharedComponents/navigationBar.component";
import {portalProperties} from "../environments/environment-aggregator";
import {properties} from "../environments/environment";
import {ConnectHelper} from "./openaireLibrary/connect/connectHelper";
import {ConfigurationService} from "./openaireLibrary/utils/configuration/configuration.service";
import {Subscriber} from "rxjs";
import {DOCUMENT} from "@angular/common";
import {SmoothScroll} from "./openaireLibrary/utils/smooth-scroll";
import {ActivatedRoute, NavigationEnd, Router} from "@angular/router";
import {OpenaireEntities} from "./openaireLibrary/utils/properties/searchFields";
@Component({
selector: 'app-root',
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>-->
<div class="custom-main-content">
<main>
<router-outlet></router-outlet>
</main>
</div>
</div>
`
})
export class AppComponent {
isClient: boolean = false;
menuItems: MenuItem [] = [];
userMenuItems: MenuItem[] = [];
community = null;
properties: EnvProperties = properties;
user: User;
loginCheck: boolean = false;
footer = portalProperties.sectionFooter;
header: Header;
showHeader;
agg: AggregatorInfo = null;
subscriptions = [];
constructor(private userManagementService: UserManagementService,
private configurationService: ConfigurationService, private smoothScroll: SmoothScroll,
@Inject(DOCUMENT) private document, private rendererFactory: RendererFactory2, private router: Router, private route: ActivatedRoute) {
this.agg = PortalAggregators.eoscInfo;
this.setStyles();
this.configurationService.initStaticPortal(PortalAggregators.getCommunityInfo());
this.showHeader = this.agg.showHeaderAlways;
}
ngOnInit() {
this.subscriptions.push(this.router.events.subscribe(event => {
if (event instanceof NavigationEnd) {
let r = this.route;
while (r.firstChild) {
r = r.firstChild;
}
this.showHeader = (r.snapshot.data.showHeader == true || this.agg.showHeaderAlways);
}
}));
if (typeof document !== 'undefined') {
this.isClient = true;
}
this.agg = PortalAggregators.eoscInfo;
if (this.agg) {
this.header = {
route: '/',
url: null,
title: this.agg.title,
logoUrl: this.agg.logoUrl,
logoSmallUrl: this.agg.logoUrl,
position: 'center',
menuPosition: 'center',
badge: false,
darkBg: true
};
this.buildMenu();
}
this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
this.user = user;
this.loginCheck = true;
this.userMenuItems = [];
if (this.user) {
this.userMenuItems.push(new MenuItem("", "My links", "", "/myclaims", false, [], [], {}));
// this.userMenuItems.push(new MenuItem("", "User information", "", "/user-info", false, [], [], {}));
}
}));
}
ngOnDestroy() {
this.subscriptions.forEach(subscription => {
if (subscription instanceof Subscriber) {
subscription.unsubscribe();
}
});
this.configurationService.clearSubscriptions();
this.userManagementService.clearSubscriptions();
this.smoothScroll.clearSubscriptions();
}
private buildMenu() {
this.menuItems = [
new MenuItem("home", "Home", "", "/", false, [], null, {}),
new MenuItem("search", "Search", "", "/search/find", false, [], ["/search/find"], {}),
new MenuItem("deposit", "Deposit", "", "/participate/deposit/learn-how", false, [], ["/participate/deposit/learn-how"], {}),
new MenuItem("link", "Link", "", "/participate/claim", false, [], ["/participate/claim"], {},
null, null, null, null, "_blank", "internal", false,
[
new MenuItem("", "Start linking", "", "/participate/claim", false, [], ["/participate/claim"], {}),
new MenuItem("", "Learn more", this.properties.claimsInformationLink, "", false, [], [], {})
]
),
new MenuItem("develop", "Develop", "", "/develop", false, [], ["/develop"], {})
];
let params = {};
// params[this.agg.queryFieldName] = this.agg.valueId;
this.menuItems[1].items.push(new MenuItem("", OpenaireEntities.RESULTS, "", properties.searchLinkToResults, false, [], ["/search/find/research-outcomes"], params));
this.menuItems[1].items.push(new MenuItem("", OpenaireEntities.PROJECTS, "", properties.searchLinkToProjects, false, ["project"], ["/search/find/projects"], params));
this.menuItems[1].items.push(new MenuItem("", OpenaireEntities.DATASOURCES, "", properties.searchLinkToDataProviders, false, ["datasource"], ["/search/find/dataproviders"], params));
this.menuItems[1].items.push(new MenuItem("", OpenaireEntities.SERVICES, "", properties.searchLinkToServices, false, ["service"], ["/search/find/services"], params));
this.menuItems[1].items.push(new MenuItem("", OpenaireEntities.ORGANIZATIONS, "", properties.searchLinkToOrganizations, false, ["organization"], ["/search/find/organizations"], params));
}
setStyles(){
let css:string = this.agg.customCss;
try {
if( this.document.getElementById('customStyle')){
try {
this.document.getElementById('customStyle').append(css);
}catch(e){
console.log("error with append style")
}
}else {
const renderer = this.rendererFactory.createRenderer(this.document, {
id: '-1',
encapsulation: ViewEncapsulation.None,
styles: [],
data: {}
});
const head = this.document.head;
if (head === null) {
throw new Error('<head> not found within DOCUMENT.');
}
const style = renderer.createElement('style');
renderer.setAttribute(style, "id", "customStyle");
let CSSElement = renderer.createText(css);
renderer.appendChild(head, style);
renderer.appendChild(style, CSSElement);
}
} catch (e) {
console.error('Renderrer Error to append style ', e);
}
}
}

54
src/app/app.module.ts Executable file
View File

@ -0,0 +1,54 @@
import {NgModule} from '@angular/core';
import {SharedModule} from './shared/shared.module';
import {BrowserModule, BrowserTransferStateModule} from '@angular/platform-browser';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {CommonModule} from '@angular/common';
import {HTTP_INTERCEPTORS, HttpClientModule} from '@angular/common/http';
import {AppComponent} from './app.component';
import {NavigationBarModule} from './openaireLibrary/sharedComponents/navigationBar.module';
import {CookieLawModule} from './openaireLibrary/sharedComponents/cookie-law/cookie-law.module';
import {BottomModule} from './openaireLibrary/sharedComponents/bottom.module';
import {FeedbackModule} from './openaireLibrary/sharedComponents/feedback/feedback.module';
import {ErrorModule} from './openaireLibrary/error/error.module';
import {OpenaireErrorPageComponent} from './error/errorPage.component';
import {AppRoutingModule} from './app-routing.module';
import {HttpInterceptorService} from "./openaireLibrary/http-interceptor.service";
import {ErrorInterceptorService} from "./openaireLibrary/error-interceptor.service";
import {DEFAULT_TIMEOUT, TimeoutInterceptor} from "./openaireLibrary/timeout-interceptor.service";
import {ConfigurationService} from "./openaireLibrary/utils/configuration/configuration.service";
@NgModule({
imports: [
SharedModule,
BrowserAnimationsModule,
CommonModule,
HttpClientModule,
ErrorModule,
NavigationBarModule, FeedbackModule, BottomModule,
CookieLawModule,
BrowserAnimationsModule,
BrowserTransferStateModule,
BrowserModule.withServerTransition({appId: 'eosc'}),
AppRoutingModule
],
declarations: [AppComponent, OpenaireErrorPageComponent],
exports: [AppComponent],
providers: [
ConfigurationService,
{
provide: HTTP_INTERCEPTORS,
useClass: HttpInterceptorService,
multi: true
},
{
provide: HTTP_INTERCEPTORS,
useClass: ErrorInterceptorService,
multi: true
},
[{provide: HTTP_INTERCEPTORS, useClass: TimeoutInterceptor, multi: true}],
[{provide: DEFAULT_TIMEOUT, useValue: 30000}]
],
bootstrap: [AppComponent]
})
export class AppModule {
}

View File

@ -0,0 +1,15 @@
import { NgModule } from '@angular/core';
import {ServerModule, ServerTransferStateModule} from '@angular/platform-server';
import { AppModule } from './app.module';
import { AppComponent } from './app.component';
@NgModule({
imports: [
AppModule,
ServerModule,
ServerTransferStateModule
],
bootstrap: [AppComponent],
})
export class AppServerModule {}

View File

@ -0,0 +1,21 @@
import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {OpenaireDirectLinkingComponent} from './directLinking.component';
import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from "../../openaireLibrary/error/isRouteEnabled.guard";
import {properties} from "../../../environments/environment";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireDirectLinkingComponent, canActivate: [IsRouteEnabled, LoginGuard], data: {
redirect: properties.errorLink, community : 'openaire'
}, canDeactivate: [PreviousRouteRecorder]},
])
]
})
export class DirectLinkingRoutingModule { }

View File

@ -0,0 +1,10 @@
import {Component} from '@angular/core';
import {properties} from "../../../environments/environment";
@Component({
selector: 'openaire-directLinking',
template: `
<directLinking></directLinking>`
})
export class OpenaireDirectLinkingComponent {
}

View File

@ -0,0 +1,20 @@
import { NgModule } from '@angular/core';
import { SharedModule } from '../../shared/shared.module';
import { OpenaireDirectLinkingComponent } from './directLinking.component';
import{ DirectLinkingModule} from '../../openaireLibrary/claims/directLinking/directLinking.module';
import {DirectLinkingRoutingModule} from './directLinking-routing.module';
import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
@NgModule({
imports: [
SharedModule, DirectLinkingModule, DirectLinkingRoutingModule
],
providers:[LoginGuard, PreviousRouteRecorder, IsRouteEnabled],
declarations: [
OpenaireDirectLinkingComponent
], exports:[OpenaireDirectLinkingComponent]
})
export class LibDirectLinkingModule { }

View File

@ -0,0 +1,20 @@
import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {OpenaireLinkingComponent} from './linkingGeneric.component';
import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from "../../openaireLibrary/error/isRouteEnabled.guard";
import {properties} from "../../../environments/environment";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireLinkingComponent, canActivate: [IsRouteEnabled, LoginGuard], data: {
redirect: properties.errorLink, community : 'openaire'
}, canDeactivate: [PreviousRouteRecorder]},
])
]
})
export class LinkingRoutingModule { }

View File

@ -0,0 +1,10 @@
import {Component} from '@angular/core';
import {properties} from "../../../environments/environment";
@Component({
selector: 'openaire-linking-generic',
template: `<linking-generic pageTitle="Linking"></linking-generic>`
})
export class OpenaireLinkingComponent {
}

View File

@ -0,0 +1,21 @@
import { NgModule } from '@angular/core';
import { SharedModule } from '../../shared/shared.module';
import {OpenaireLinkingComponent} from './linkingGeneric.component';
import {LinkingRoutingModule} from './linking-routing.module';
import{ LinkingGenericModule} from '../../openaireLibrary/claims/linking/linkingGeneric.module';
import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
@NgModule({
imports: [
SharedModule, LinkingRoutingModule, LinkingGenericModule
],
providers:[LoginGuard, PreviousRouteRecorder, IsRouteEnabled],
declarations: [
OpenaireLinkingComponent
], exports:[
OpenaireLinkingComponent ]
})
export class LibLinkingGenericModule { }

View File

@ -0,0 +1,18 @@
import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {OpenaireMyClaimsComponent} from './myClaims.component';
import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from "../../openaireLibrary/error/isRouteEnabled.guard";
import {properties} from "../../../environments/environment";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireMyClaimsComponent, canActivate: [IsRouteEnabled, LoginGuard],
data: {redirect: properties.errorLink, community : 'openaire'}, canDeactivate: [PreviousRouteRecorder]}])
]
})
export class MyClaimsRoutingModule { }

View File

@ -0,0 +1,36 @@
import {Component} from '@angular/core';
import {ActivatedRoute} from '@angular/router';
import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
import {Subscriber} from "rxjs";
import {properties} from "../../../environments/environment";
@Component({
selector: 'openaire-my-claims',
template: `
<my-claims *ngIf="userInfoURL && claimsInfoURL" [claimsInfoURL]=claimsInfoURL [userInfoURL]="userInfoURL">
</my-claims>
`
})
export class OpenaireMyClaimsComponent {
claimsInfoURL:string;
userInfoURL: string;
sub;
constructor (private route: ActivatedRoute) {
}
ngOnDestroy() {
if (this.sub instanceof Subscriber) {
this.sub.unsubscribe();
}
}
public ngOnInit() {
this.sub = this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.claimsInfoURL = data.envSpecific.claimsInformationLink;
this.userInfoURL = data.envSpecific.userInfoUrl;
});
}
}

View File

@ -0,0 +1,24 @@
import { NgModule } from '@angular/core';
import { SharedModule } from '../../shared/shared.module';
import { OpenaireMyClaimsComponent } from './myClaims.component';
import { MyClaimsRoutingModule } from './myClaims-routing.module';
import{ MyClaimsModule} from '../../openaireLibrary/claims/myClaims/myClaims.module';
import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
@NgModule({
imports: [
SharedModule,
MyClaimsRoutingModule,
MyClaimsModule
],
providers:[LoginGuard, PreviousRouteRecorder, IsRouteEnabled],
declarations: [
OpenaireMyClaimsComponent
]
})
export class LibMyClaimsModule { }

View File

@ -0,0 +1,18 @@
import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {OpenaireDepositComponent} from './deposit.component';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from "../openaireLibrary/error/isRouteEnabled.guard";
import {properties} from "../../environments/environment";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireDepositComponent, data: {
redirect: properties.errorLink
}, canDeactivate: [PreviousRouteRecorder], canActivate: [IsRouteEnabled] }
])
]
})
export class DepositRoutingModule { }

View File

@ -0,0 +1,12 @@
import {Component} from '@angular/core';
@Component({
selector: 'openaire-deposit',
template: `
<deposit-first-page></deposit-first-page>
`
})
export class OpenaireDepositComponent {
}

View File

@ -0,0 +1,31 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../openaireLibrary/error/isRouteEnabled.guard';
import {OpenaireDepositComponent} from "./deposit.component";
import {DepositRoutingModule} from "./deposit-routing.module";
import {DepositFirstPageModule} from "../openaireLibrary/deposit/depositFirstPage.module";
import {ZenodoCommunitiesService} from "../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service";
import {CommunityService} from "../openaireLibrary/connect/community/community.service";
import {SearchZenodoCommunitiesService} from "../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunities.service";
@NgModule({
imports: [
CommonModule, FormsModule,
DepositRoutingModule, DepositFirstPageModule
],
declarations: [
OpenaireDepositComponent
],
exports: [
OpenaireDepositComponent,
],
providers: [PreviousRouteRecorder, IsRouteEnabled,
ZenodoCommunitiesService, CommunityService, SearchZenodoCommunitiesService]
})
export class LibDepositModule { }

View File

@ -0,0 +1,21 @@
import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {OpenaireSearchDataprovidersToDepositComponent} from './searchDataprovidersToDeposit.component';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from "../openaireLibrary/error/isRouteEnabled.guard";
import {properties} from "../../environments/environment";
@NgModule({
imports: [
RouterModule.forChild([
{
path: '', component: OpenaireSearchDataprovidersToDepositComponent, data: {
redirect: properties.errorLink
}, canDeactivate: [PreviousRouteRecorder], canActivate: [IsRouteEnabled]
}
])
]
})
export class SearchDataprovidersToDepositRoutingModule {
}

View File

@ -0,0 +1,12 @@
import {Component} from '@angular/core';
@Component({
selector: 'openaire-search-deposit',
template: `
<deposit-search-dataproviders></deposit-search-dataproviders>
`
})
export class OpenaireSearchDataprovidersToDepositComponent {
}

View File

@ -0,0 +1,31 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { OpenaireSearchDataprovidersToDepositComponent } from './searchDataprovidersToDeposit.component';
import {SearchDataprovidersToDepositRoutingModule} from './searchDataprovidersToDeposit-routing.module';
import {SearchDataprovidersToDepositModule} from '../openaireLibrary/deposit/searchDataprovidersToDeposit.module';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../openaireLibrary/error/isRouteEnabled.guard';
import {ZenodoCommunitiesServiceModule} from '../openaireLibrary/connect/zenodoCommunities/zenodo-communitiesService.module';
import {SearchZenodoCommunitiesServiceModule} from '../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunitiesService.module';
import {CommunityService} from '../openaireLibrary/connect/community/community.service';
@NgModule({
imports: [
CommonModule, FormsModule,
SearchDataprovidersToDepositModule,
SearchDataprovidersToDepositRoutingModule,
ZenodoCommunitiesServiceModule, SearchZenodoCommunitiesServiceModule
],
declarations: [
OpenaireSearchDataprovidersToDepositComponent
],
exports: [
OpenaireSearchDataprovidersToDepositComponent,
],
providers: [PreviousRouteRecorder, IsRouteEnabled, CommunityService]
})
export class LibSearchDataprovidersToDepositModule { }

View File

@ -0,0 +1,60 @@
.uk-card {
box-shadow: 0 6px 15px #0000001A;
border-radius: 36px;
padding: 65px;
font-family: "Roboto", sans-serif;
font-size: var(--large-font-size);;
}
ul.portal-circle {
list-style: none;
padding-left: 40px;
font-family: "Open Sans", sans-serif;
font-size: var(--font-size);;
}
ul.portal-circle li {
margin: 0 0 20px 0;
position: relative;
}
ul.portal-circle li:before {
content: "";
border: 5px var(--portal-main-color) solid !important;
border-radius: 50px;
line-height: 21px;
margin-left: -20px;
position: absolute;
top: 7px;
}
.documentation {
max-width: 500px;
background: #EEF7E6;
border-radius: 15px;
padding: 30px;
font-family: "Open Sans", sans-serif;
font-size: var(--small-font-size);
}
@media only screen and (max-width: 959px) {
.uk-card {
padding: 30px;
}
ul.portal-circle {
padding-left: 20px;
}
ul.light-blue-triangle li {
margin: 0 0 20px 0;
}
ul.light-blue-circle.large li {
margin: 0 0 20px 0;
}
.documentation {
padding: 10px;
}
}

View File

@ -0,0 +1,134 @@
import {Component, OnInit} from "@angular/core";
import {Meta, Title} from "@angular/platform-browser";
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
import {properties} from "../../environments/environment";
import {Router} from "@angular/router";
import {AggregatorInfo, PortalAggregators} from "../utils/aggregators";
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service";
import {Subscription} from "rxjs";
@Component({
selector: 'develop',
template: `
<div page-content>
<div inner>
<div *ngIf="aggregator" class="uk-container uk-container-large uk-section-small">
<h2 class="uk-text-center">
Develop
</h2>
<div class="uk-margin-medium-top uk-card uk-card-body uk-card-default">
<h3 class="uk-text-center">Help developers with <span
class="portal-color uk-text-bold">OpenAIRE APIs</span>
</h3>
<div class="uk-margin-large-top uk-margin-medium-bottom">
Not sure where to start? Let us give you some guides and request examples.
</div>
<p>
<span class="uk-text-bold">For research outcomes </span>
(publications, datasets, software and other research data) you can use the
<a href="https://graph.openaire.eu/develop/api.html" target="_blank">Selective Access APIs</a>
by adding the <span class="uk-text-lowercase">country</span> parameter.
</p>
<div class="uk-grid uk-child-width-1-2@m uk-child-width-1-1@s" uk-grid>
<div>
<p>
Request examples:
</p>
<ul class="portal-circle">
<li>
<span class="uk-text-bold">Access Publications</span><br>
<span class="uk-text-bold">GET</span>
<span
class="uk-text-break space">https://api.openaire.eu/search/publications?country={{aggregator.valueId}}</span>
</li>
<li>
<span class="uk-text-bold">Access Open Access Publications</span><br>
<span class="uk-text-bold">GET</span>
<span
class="uk-text-break space">http://api.openaire.eu/search/publications?country={{aggregator.valueId}}&OA=true</span>
</li>
<li>
<span class="uk-text-bold">Access Datasets</span><br>
<span class="uk-text-bold">GET</span>
<span
class="uk-text-break space">https://api.openaire.eu/search/datasets?country={{aggregator.valueId}}</span>
</li>
<li>
<span class="uk-text-bold">Access Software</span><br>
<span class="uk-text-bold">GET</span>
<span
class="uk-text-break space">https://api.openaire.eu/search/software?country={{aggregator.valueId}}</span>
</li>
<li>
<span class="uk-text-bold">Access Other Research</span><br>
<span class="uk-text-bold">GET</span>
<span
class="uk-text-break space">https://api.openaire.eu/search/other?country={{aggregator.valueId}}</span>
</li>
</ul>
</div>
<div class="uk-flex uk-flex-middle">
<div class="uk-flex uk-flex-center uk-width-1-1 uk-margin-medium-top">
<img width="350" src="assets/develop.png">
</div>
</div>
</div>
<div class="uk-margin-large-top uk-flex uk-flex-center uk-padding">
<div class="documentation">
For <span
class="uk-text-bold">more information</span> on the full potential of the OpenAIRE APIs please check
the <a href="https://graph.openaire.eu/develop" target="_blank">OpenAIRE API Documentation</a>.
</div>
</div>
</div>
</div>
</div>
</div>
`,
styleUrls: ['develop.component.css']
})
export class DevelopComponent implements OnInit {
public aggregator: AggregatorInfo = null;
subs: Subscription[] = [];
constructor(private seoService: SEOService,
private _meta: Meta,
private _router: Router,
private _title: Title, private _piwikService:PiwikService) {
}
public ngOnDestroy() {
for (let sub of this.subs) {
sub.unsubscribe();
}
}
ngOnInit() {
this.aggregator = PortalAggregators.eoscInfo;
if (this.aggregator) {
/* Metadata */
const url = properties.domain + properties.baseLink + this._router.url;
this.seoService.createLinkForCanonicalURL(url, false);
this._meta.updateTag({content: url}, "property='og:url'");
const description = "Develop | " + this.aggregator.valueName;
const title = "Develop | " + this.aggregator.valueName;
this._meta.updateTag({content: description}, "name='description'");
this._meta.updateTag({content: description}, "property='og:description'");
this._meta.updateTag({content: title}, "property='og:title'");
this._title.setTitle(title);
this.subs.push(this._piwikService.trackView(properties, "OpenAIRE").subscribe());
}else {
this.navigateToError();
}
}
private navigateToError() {
this._router.navigate([properties.errorLink], {queryParams: {'page': this._router.url}});
}
}

View File

@ -0,0 +1,21 @@
import {NgModule} from "@angular/core";
import {CommonModule} from "@angular/common";
import {DevelopComponent} from "./develop.component";
import {RouterModule} from "@angular/router";
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
import {PiwikServiceModule} from "../openaireLibrary/utils/piwik/piwikService.module";
@NgModule({
declarations: [DevelopComponent],
imports: [CommonModule,PiwikServiceModule, RouterModule.forChild([
{
path: '',
component: DevelopComponent,
canDeactivate: [PreviousRouteRecorder]
},
])],
exports: [DevelopComponent]
})
export class DevelopModule {
}

View File

@ -0,0 +1,12 @@
import { Component } from '@angular/core';
@Component({
selector: 'openaire-error',
template: `
<error></error>
`
})
export class OpenaireErrorPageComponent {
}

View File

@ -0,0 +1,14 @@
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import{HomeComponent} from './home.component';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: HomeComponent,canDeactivate: [PreviousRouteRecorder] }
])
]
})
export class HomeRoutingModule { }

View File

@ -0,0 +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>-->
<!-- &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="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 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>-->

View File

@ -0,0 +1,268 @@
import {Component, Inject} from "@angular/core";
import {DOCUMENT} from "@angular/common";
import {Meta, Title} from "@angular/platform-browser";
import {properties} from "../../environments/environment";
@Component({
selector: 'home',
templateUrl: 'home.component.html',
})
export class HomeComponent {
constructor(@Inject(DOCUMENT) readonly document: Document, private _meta: Meta, private _title: Title) {
let title = "EOSC Explore";
this._title.setTitle(title);
this._meta.updateTag({content:title},"property='og:title'");
}
/** The Window object from Document defaultView */
get window(): Window {
return this.document.defaultView;
}
ngOnInit() {
// this.window.location.href = '...';
if (typeof document !== 'undefined') {
this.window.open('https://'+(properties.environment == "beta" ? "beta." : "")+'search.marketplace.eosc-portal.eu/search/all?q=*', "_self");
}
}
}
// 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

@ -0,0 +1,59 @@
import { NgModule} from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import {HomeRoutingModule} from './home-routing.module';
import {HomeComponent} from './home.component';
import { DataProvidersServiceModule} from '../openaireLibrary/services/dataProvidersService.module';
import { SearchResearchResultsServiceModule} from '../openaireLibrary/services/searchResearchResultsService.module';
import { ProjectsServiceModule} from '../openaireLibrary/services/projectsService.module';
import { OrganizationsServiceModule} from '../openaireLibrary/services/organizationsService.module';
import { SearchFormModule} from '../openaireLibrary/searchPages/searchUtils/searchForm.module';
import { PiwikServiceModule} from '../openaireLibrary/utils/piwik/piwikService.module';
import {HelperModule} from '../openaireLibrary/utils/helper/helper.module';
import {RefineFieldResultsServiceModule} from '../openaireLibrary/services/refineFieldResultsService.module';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import { SEOServiceModule } from '../openaireLibrary/sharedComponents/SEO/SEOService.module';
import {ErrorMessagesModule} from '../openaireLibrary/utils/errorMessages.module';
import {EntitiesSelectionModule} from "../openaireLibrary/searchPages/searchUtils/entitiesSelection.module";
import {QuickSelectionsModule} from "../openaireLibrary/searchPages/searchUtils/quick-selections.module";
import {IconsModule} from "../openaireLibrary/utils/icons/icons.module";
import {IconsService} from "../openaireLibrary/utils/icons/icons.service";
import {book, cog, database, earth} from "../openaireLibrary/utils/icons/icons";
import {NumbersModule} from "../openaireLibrary/sharedComponents/numbers/numbers.module";
import {AdvancedSearchInputModule} from "../openaireLibrary/sharedComponents/advanced-search-input/advanced-search-input.module";
import {InputModule} from "../openaireLibrary/sharedComponents/input/input.module";
@NgModule({
imports: [
CommonModule, FormsModule, RouterModule,
RefineFieldResultsServiceModule,
DataProvidersServiceModule, SearchResearchResultsServiceModule,
ProjectsServiceModule, OrganizationsServiceModule,
SearchFormModule,
PiwikServiceModule,
HomeRoutingModule,
HelperModule,
ErrorMessagesModule,
SEOServiceModule, EntitiesSelectionModule, QuickSelectionsModule, IconsModule, NumbersModule, AdvancedSearchInputModule, InputModule
],
declarations: [
HomeComponent
],
providers:[
PreviousRouteRecorder
],
exports: [
HomeComponent
]
})
export class HomeModule {
constructor(private iconsService: IconsService) {
this.iconsService.registerIcons([book, earth, cog, database]);
}
}

View File

@ -0,0 +1,19 @@
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { OpenaireDataProviderComponent } from './dataProvider.component';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {properties} from "../../../environments/environment";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireDataProviderComponent, canActivate: [FreeGuard], data: {
redirect: properties.errorLink
},canDeactivate: [PreviousRouteRecorder] }
])
]
})
export class DataProviderRoutingModule { }

View File

@ -0,0 +1,8 @@
import {Component} from '@angular/core';
@Component({
selector: 'openaire-dataprovider',
template: `<dataprovider></dataprovider>`,
})
export class OpenaireDataProviderComponent{
}

View File

@ -0,0 +1,14 @@
import { NgModule} from '@angular/core';
import { DataProviderModule } from '../../openaireLibrary/landingPages/dataProvider/dataProvider.module';
import { OpenaireDataProviderComponent } from './dataProvider.component';
import {DataProviderRoutingModule} from './dataProvider-routing.module';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
@NgModule({
imports: [DataProviderModule, DataProviderRoutingModule],
declarations:[OpenaireDataProviderComponent],
providers:[FreeGuard, PreviousRouteRecorder],
exports:[OpenaireDataProviderComponent]
})
export class LibDataProviderModule { }

View File

@ -0,0 +1,19 @@
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { OpenaireDatasetComponent } from './dataset.component';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {properties} from "../../../environments/environment";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireDatasetComponent, canActivate: [FreeGuard], data: {
redirect: properties.errorLink
},canDeactivate: [PreviousRouteRecorder] }
])
]
})
export class DatasetRoutingModule { }

View File

@ -0,0 +1,8 @@
import {Component} from '@angular/core';
@Component({
selector: 'openaire-dataset',
template: `<result-landing type="dataset"></result-landing>`,
})
export class OpenaireDatasetComponent{
}

View File

@ -0,0 +1,13 @@
import { NgModule} from '@angular/core';
import {ResultLandingModule} from "../../openaireLibrary/landingPages/result/resultLanding.module";
import { OpenaireDatasetComponent } from './dataset.component';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {DatasetRoutingModule} from './dataset-routing.module';
@NgModule({
imports: [ResultLandingModule, DatasetRoutingModule],
declarations:[OpenaireDatasetComponent],
providers:[FreeGuard, PreviousRouteRecorder],
exports:[OpenaireDatasetComponent]
})
export class LibDatasetModule { }

View File

@ -0,0 +1,15 @@
import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {OpenaireHtmlProjectReportComponent} from './htmlProjectReport.component';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireHtmlProjectReportComponent , canActivate: [FreeGuard],canDeactivate: [PreviousRouteRecorder]}
])
]
})
export class HtmlProjectReportRoutingModule { }

View File

@ -0,0 +1,8 @@
import {Component} from '@angular/core';
@Component({
selector: 'openaire-htmlProjectReport',
template: `<htmlProjectReport></htmlProjectReport>`,
})
export class OpenaireHtmlProjectReportComponent{
}

View File

@ -0,0 +1,14 @@
import {NgModule} from '@angular/core';
import {HtmlProjectReportModule} from '../../openaireLibrary/landingPages/htmlProjectReport/htmlProjectReport.module';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {OpenaireHtmlProjectReportComponent} from './htmlProjectReport.component';
import {HtmlProjectReportRoutingModule} from './htmlProjectReport-routing.module';
@NgModule({
imports: [HtmlProjectReportModule, HtmlProjectReportRoutingModule],
declarations:[OpenaireHtmlProjectReportComponent],
providers:[FreeGuard, PreviousRouteRecorder],
exports:[OpenaireHtmlProjectReportComponent]
})
export class LibHtmlProjectReportModule { }

View File

@ -0,0 +1,14 @@
import {NgModule} from '@angular/core';
import {OrganizationModule} from '../../openaireLibrary/landingPages/organization/organization.module';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {OpenaireOrganizationComponent} from './organization.component';
import {OrganizationRoutingModule} from './organization-routing.module';
@NgModule({
imports: [OrganizationModule, OrganizationRoutingModule],
declarations:[OpenaireOrganizationComponent],
providers:[FreeGuard, PreviousRouteRecorder],
exports:[OpenaireOrganizationComponent]
})
export class LibOrganizationModule { }

View File

@ -0,0 +1,19 @@
import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {OpenaireOrganizationComponent} from './organization.component';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {properties} from "../../../environments/environment";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireOrganizationComponent, canActivate: [FreeGuard], data: {
redirect: properties.errorLink
},canDeactivate: [PreviousRouteRecorder] }
])
]
})
export class OrganizationRoutingModule { }

View File

@ -0,0 +1,8 @@
import {Component} from '@angular/core';
@Component({
selector: 'openaire-organization',
template: `<organization ></organization>`,
})
export class OpenaireOrganizationComponent{
}

View File

@ -0,0 +1,14 @@
import {NgModule} from '@angular/core';
import {ResultLandingModule} from "../../openaireLibrary/landingPages/result/resultLanding.module";
import {OpenaireOrpComponent} from './orp.component';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {OrpRoutingModule} from './orp-routing.module';
@NgModule({
imports: [ResultLandingModule, OrpRoutingModule],
declarations:[OpenaireOrpComponent],
providers:[FreeGuard, PreviousRouteRecorder],
exports:[OpenaireOrpComponent]
})
export class LibOrpModule { }

View File

@ -0,0 +1,18 @@
import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {OpenaireOrpComponent} from './orp.component';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {properties} from "../../../environments/environment";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireOrpComponent, canActivate: [FreeGuard], data: {
redirect: properties.errorLink
},canDeactivate: [PreviousRouteRecorder] }
])
]
})
export class OrpRoutingModule { }

View File

@ -0,0 +1,8 @@
import {Component} from '@angular/core';
@Component({
selector: 'openaire-orp',
template: `<result-landing type="orp"></result-landing>`,
})
export class OpenaireOrpComponent{
}

View File

@ -0,0 +1,14 @@
import {NgModule} from '@angular/core';
import {ProjectModule} from '../../openaireLibrary/landingPages/project/project.module';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {OpenaireProjectComponent} from './project.component';
import {ProjectRoutingModule} from './project-routing.module';
@NgModule({
imports: [ProjectModule, ProjectRoutingModule],
declarations:[OpenaireProjectComponent],
providers:[FreeGuard, PreviousRouteRecorder],
exports:[OpenaireProjectComponent]
})
export class LibProjectModule { }

View File

@ -0,0 +1,19 @@
import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {OpenaireProjectComponent} from './project.component';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {properties} from "../../../environments/environment";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireProjectComponent, canActivate: [FreeGuard], data: {
redirect: properties.errorLink
},canDeactivate: [PreviousRouteRecorder] }
])
]
})
export class ProjectRoutingModule { }

View File

@ -0,0 +1,8 @@
import {Component} from '@angular/core';
@Component({
selector: 'openaire-project',
template: `<project></project>`,
})
export class OpenaireProjectComponent{
}

View File

@ -0,0 +1,14 @@
import {NgModule} from '@angular/core';
import {ResultLandingModule} from "../../openaireLibrary/landingPages/result/resultLanding.module";
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {OpenairePublicationComponent} from './publication.component';
import {PublicationRoutingModule} from './publication-routing.module';
@NgModule({
imports: [ResultLandingModule, PublicationRoutingModule],
declarations:[OpenairePublicationComponent],
providers:[FreeGuard, PreviousRouteRecorder],
exports:[OpenairePublicationComponent]
})
export class LibPublicationModule { }

View File

@ -0,0 +1,19 @@
import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {OpenairePublicationComponent} from './publication.component';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {properties} from "../../../environments/environment";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenairePublicationComponent, canActivate: [FreeGuard], data: {
redirect: properties.errorLink
},canDeactivate: [PreviousRouteRecorder] }
])
]
})
export class PublicationRoutingModule { }

View File

@ -0,0 +1,9 @@
import {Component} from '@angular/core';
@Component({
selector: 'openaire-publication',
template: `
<result-landing type="publication"></result-landing>`,
})
export class OpenairePublicationComponent {
}

View File

@ -0,0 +1,13 @@
import {NgModule} from '@angular/core';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {OpenaireResultComponent} from './result.component';
import {ResultRoutingModule} from './result-routing.module';
import {ResultLandingModule} from "../../openaireLibrary/landingPages/result/resultLanding.module";
@NgModule({
imports: [ResultRoutingModule, ResultLandingModule],
declarations:[OpenaireResultComponent],
providers:[PreviousRouteRecorder],
exports:[OpenaireResultComponent]
})
export class LibResultModule { }

View File

@ -0,0 +1,18 @@
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import {OpenaireResultComponent } from './result.component';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {properties} from "../../../environments/environment";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireResultComponent, data: {
redirect: properties.errorLink, community : 'openaire'
},canDeactivate: [PreviousRouteRecorder] }
])
]
})
export class ResultRoutingModule { }

View File

@ -0,0 +1,8 @@
import {Component} from '@angular/core';
@Component({
selector: 'openaire-publication',
template: `<result-landing type="result"></result-landing>`,
})
export class OpenaireResultComponent{
}

View File

@ -0,0 +1,14 @@
import { NgModule} from '@angular/core';
import { DataProviderModule } from '../../openaireLibrary/landingPages/dataProvider/dataProvider.module';
import { OpenaireServiceComponent } from './service.component';
import {ServiceRoutingModule} from './service-routing.module';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
@NgModule({
imports: [DataProviderModule, ServiceRoutingModule],
declarations:[OpenaireServiceComponent],
providers:[FreeGuard, PreviousRouteRecorder],
exports:[OpenaireServiceComponent]
})
export class LibServiceModule { }

View File

@ -0,0 +1,19 @@
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { OpenaireServiceComponent } from './service.component';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {properties} from "../../../environments/environment";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireServiceComponent, canActivate: [FreeGuard], data: {
redirect: properties.errorLink
},canDeactivate: [PreviousRouteRecorder] }
])
]
})
export class ServiceRoutingModule { }

View File

@ -0,0 +1,8 @@
import {Component} from '@angular/core';
@Component({
selector: 'openaire-dataprovider',
template: `<dataprovider type="service"></dataprovider>`,
})
export class OpenaireServiceComponent{
}

View File

@ -0,0 +1,15 @@
import {NgModule} from '@angular/core';
import {ResultLandingModule} from "../../openaireLibrary/landingPages/result/resultLanding.module";
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {OpenaireSoftwareComponent} from './software.component';
import {SoftwareRoutingModule} from './software-routing.module';
@NgModule({
imports: [ResultLandingModule, SoftwareRoutingModule],
declarations:[OpenaireSoftwareComponent],
providers:[FreeGuard, PreviousRouteRecorder],
exports:[OpenaireSoftwareComponent]
})
export class LibSoftwareModule { }

View File

@ -0,0 +1,15 @@
import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {OpenaireSoftwareComponent} from './software.component';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireSoftwareComponent, canActivate: [FreeGuard],canDeactivate: [PreviousRouteRecorder] }
])
]
})
export class SoftwareRoutingModule { }

View File

@ -0,0 +1,8 @@
import {Component} from '@angular/core';
@Component({
selector: 'openaire-software',
template: `<result-landing type="software"></result-landing>`,
})
export class OpenaireSoftwareComponent{
}

View File

@ -0,0 +1,23 @@
import { NgModule} from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import {OpenaireUserComponent } from './user.component';
import { UserRoutingModule } from './user-routing.module';
import { UserModule} from '../openaireLibrary/login/user.module';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
@NgModule({
imports: [
CommonModule, FormsModule,
UserRoutingModule, UserModule
],
providers:[PreviousRouteRecorder],
declarations: [
OpenaireUserComponent
]
})
export class LibUserModule { }

View File

@ -0,0 +1,15 @@
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import {OpenaireUserComponent } from './user.component';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireUserComponent, canDeactivate: [PreviousRouteRecorder]},
])
]
})
export class UserRoutingModule { }

View File

@ -0,0 +1,11 @@
import {Component, ElementRef} from '@angular/core';
import {Observable} from 'rxjs';
@Component({
selector: 'openaire-user',
template: `<user></user>`
})
export class OpenaireUserComponent {
}

@ -0,0 +1 @@
Subproject commit 9b2524c1c72972b593654081e1d917ca8a1a7909

View File

@ -0,0 +1,23 @@
import { NgModule} from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import{ReloadModule} from '../openaireLibrary/reload/reload.module';
@NgModule({
imports: [
CommonModule, FormsModule, RouterModule, ReloadModule
],
declarations: [
],
providers:[
],
exports: [
]
})
export class LibReloadModule { }

View File

@ -0,0 +1,18 @@
import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {OpenaireAdvancedSearchDataProvidersComponent} from './advancedSearchDataProviders.component';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {properties} from "../../../environments/environment";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireAdvancedSearchDataProvidersComponent, data: {
redirect: properties.errorLink
}, canDeactivate: [PreviousRouteRecorder] }
])
]
})
export class AdvancedSearchDataProvidersRoutingModule { }

View File

@ -0,0 +1,24 @@
import {Component} from '@angular/core';
import {properties} from "../../../environments/environment";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
import {SearchForm} from "../../openaireLibrary/searchPages/searchUtils/newSearchPage.component";
@Component({
selector: 'openaire-advanced-search-dataprovider',
template: `
<search-dataproviders [simpleView]="false"
[hasPrefix]="false" [searchForm]="searchForm">
</search-dataproviders>
`
})
export class OpenaireAdvancedSearchDataProvidersComponent {
properties: EnvProperties;
public searchForm: SearchForm = {class: 'search-form', dark: true};
constructor ( ) {}
ngOnInit() {
this.properties = properties;
}
}

View File

@ -0,0 +1,25 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {FormsModule} from '@angular/forms';
import {AdvancedSearchDataProvidersRoutingModule} from './advancedSearchDataProviders-routing.module';
import {OpenaireAdvancedSearchDataProvidersComponent} from './advancedSearchDataProviders.component';
import {SearchDataProvidersModule} from "../../openaireLibrary/searchPages/searchDataProviders.module";
@NgModule({
imports: [
CommonModule, FormsModule,
AdvancedSearchDataProvidersRoutingModule,
SearchDataProvidersModule
],
declarations: [
OpenaireAdvancedSearchDataProvidersComponent
],
providers:[],
exports: [
OpenaireAdvancedSearchDataProvidersComponent
]
})
export class LibAdvancedSearchDataProvidersModule { }

View File

@ -0,0 +1,19 @@
import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {OpenaireAdvancedSearchOrganizationsComponent} from './advancedSearchOrganizations.component';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {properties} from "../../../environments/environment";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireAdvancedSearchOrganizationsComponent , data: {
redirect: properties.errorLink
},canDeactivate: [PreviousRouteRecorder]}
])
]
})
export class AdvancedSearchOrganizationsRoutingModule { }

View File

@ -0,0 +1,23 @@
import {Component} from '@angular/core';
import {properties} from "../../../environments/environment";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
import {SearchForm} from "../../openaireLibrary/searchPages/searchUtils/newSearchPage.component";
@Component({
selector: 'openaire-advanced-search-organizations',
template: `
<search-organizations [simpleView]="false" [hasPrefix]="false" [searchForm]="searchForm">
</search-organizations>
`
})
export class OpenaireAdvancedSearchOrganizationsComponent {
properties: EnvProperties;
public searchForm: SearchForm = {class: 'search-form', dark: true};
constructor ( ) {}
ngOnInit() {
this.properties = properties;
}
}

View File

@ -0,0 +1,23 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {FormsModule} from '@angular/forms';
import {AdvancedSearchOrganizationsRoutingModule} from './advancedSearchOrganizations-routing.module';
import {OpenaireAdvancedSearchOrganizationsComponent} from './advancedSearchOrganizations.component';
import {SearchOrganizationsModule} from "../../openaireLibrary/searchPages/searchOrganizations.module";
@NgModule({
imports: [
CommonModule, FormsModule,
SearchOrganizationsModule,
AdvancedSearchOrganizationsRoutingModule
],
declarations: [
OpenaireAdvancedSearchOrganizationsComponent
],
providers:[],
exports: [
OpenaireAdvancedSearchOrganizationsComponent
]
})
export class LibAdvancedSearchOrganizationsModule { }

View File

@ -0,0 +1,18 @@
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import{OpenaireAdvancedSearchProjectsComponent} from './advancedSearchProjects.component';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {properties} from "../../../environments/environment";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireAdvancedSearchProjectsComponent, data: {
redirect: properties.errorLink
}, canDeactivate: [PreviousRouteRecorder] }
])
]
})
export class AdvancedSearchProjectsRoutingModule { }

View File

@ -0,0 +1,22 @@
import {Component} from '@angular/core';
import {properties} from "../../../environments/environment";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
import {SearchForm} from "../../openaireLibrary/searchPages/searchUtils/newSearchPage.component";
@Component({
selector: 'openaire-advanced-search-projects',
template: `
<search-projects [simpleView]="false" [hasPrefix]="false" [searchForm]="searchForm">
</search-projects>
`
})
export class OpenaireAdvancedSearchProjectsComponent {
properties: EnvProperties;
public searchForm: SearchForm = {class: 'search-form', dark: true};
constructor ( ) {}
ngOnInit() {
this.properties = properties;
}
}

View File

@ -0,0 +1,23 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {FormsModule} from '@angular/forms';
import {AdvancedSearchProjectsRoutingModule} from './advancedSearchProjects-routing.module';
import {OpenaireAdvancedSearchProjectsComponent} from './advancedSearchProjects.component';
import {SearchProjectsModule} from "../../openaireLibrary/searchPages/searchProjects.module";
@NgModule({
imports: [
CommonModule, FormsModule,
SearchProjectsModule,
AdvancedSearchProjectsRoutingModule
],
declarations: [
OpenaireAdvancedSearchProjectsComponent
],
providers:[],
exports: [
OpenaireAdvancedSearchProjectsComponent
]
})
export class LibAdvancedSearchProjectsModule { }

View File

@ -0,0 +1,18 @@
import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {OpenaireAdvancedSearchServicesComponent} from './advancedSearchServices.component';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {properties} from "../../../environments/environment";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireAdvancedSearchServicesComponent, data: {
redirect: properties.errorLink
}, canDeactivate: [PreviousRouteRecorder] }
])
]
})
export class AdvancedSearchServicesRoutingModule { }

View File

@ -0,0 +1,26 @@
import {Component} from '@angular/core';
import {properties} from "../../../environments/environment";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
import {OpenaireEntities} from "../../openaireLibrary/utils/properties/searchFields";
import {SearchForm} from "../../openaireLibrary/searchPages/searchUtils/newSearchPage.component";
@Component({
selector: 'openaire-advanced-search-service',
template: `
<search-dataproviders [simpleView]="false" [hasPrefix]="false"
type="services" entityType="service" [typeName]="openaireEntities.SERVICES"
[searchForm]="searchForm">
</search-dataproviders>
`
})
export class OpenaireAdvancedSearchServicesComponent {
properties: EnvProperties;
public openaireEntities = OpenaireEntities;
public searchForm: SearchForm = {class: 'search-form', dark: true};
constructor ( ) {}
ngOnInit() {
this.properties = properties;
}
}

View File

@ -0,0 +1,25 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {FormsModule} from '@angular/forms';
import {OpenaireAdvancedSearchServicesComponent} from './advancedSearchServices.component';
import {SearchDataProvidersModule} from "../../openaireLibrary/searchPages/searchDataProviders.module";
import {AdvancedSearchServicesRoutingModule} from "./advancedSearchServices-routing.module";
@NgModule({
imports: [
CommonModule, FormsModule,
AdvancedSearchServicesRoutingModule,
SearchDataProvidersModule
],
declarations: [
OpenaireAdvancedSearchServicesComponent
],
providers:[],
exports: [
OpenaireAdvancedSearchServicesComponent
]
})
export class LibAdvancedSearchServicesModule { }

View File

@ -0,0 +1,19 @@
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import{OpenaireSearchResearchResultsComponent} from './searchResearchResults.component';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {properties} from "../../../environments/environment";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireSearchResearchResultsComponent, data: {
redirect: properties.errorLink, community : 'openaire'
}, canDeactivate: [PreviousRouteRecorder] }
])
]
})
export class SearchResearchResultsRoutingModule { }

View File

@ -0,0 +1,22 @@
import {Component, Input} from '@angular/core';
import {properties} from "../../../environments/environment";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
import {SearchForm} from "../../openaireLibrary/searchPages/searchUtils/newSearchPage.component";
@Component({
selector: 'openaire-search-results',
template: `
<search-research-results resultType="result" [simpleView]="false"
[hasPrefix]="false" [searchForm]="searchForm"></search-research-results>
`
})
export class OpenaireSearchResearchResultsComponent {
@Input() searchLink: string = "/search/advanced/research-results";
properties: EnvProperties;
public searchForm: SearchForm = {class: 'search-form', dark: true};
constructor ( ) {}
ngOnInit() {
this.properties = properties;
}
}

View File

@ -0,0 +1,25 @@
import { NgModule} from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import{ SearchResearchResultsRoutingModule} from './searchResearchResults-routing.module';
import{OpenaireSearchResearchResultsComponent} from './searchResearchResults.component';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {SearchResearchResultsModule} from "../../openaireLibrary/searchPages/searchResearchResults.module";
@NgModule({
imports: [
CommonModule, FormsModule,
SearchResearchResultsRoutingModule, SearchResearchResultsModule
],
declarations: [
OpenaireSearchResearchResultsComponent
],
providers:[PreviousRouteRecorder],
exports: [
OpenaireSearchResearchResultsComponent
]
})
export class OpenaireAdvancedSearchResearchResultsModule { }

View File

@ -0,0 +1,14 @@
import {NgModule} from '@angular/core';
import {OpenaireSearchComponent} from './search.component';
import {MainSearchRoutingModule} from './mainSearch-routing.module';
import {PreviousRouteRecorder} from "../../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
import {SearchAllModule} from "../../openaireLibrary/searchPages/find/searchAll.module";
@NgModule({
imports: [ MainSearchRoutingModule, SearchAllModule],
declarations:[OpenaireSearchComponent],
exports:[OpenaireSearchComponent],
providers: [ PreviousRouteRecorder]
})
export class LibMainSearchModule { }

View File

@ -0,0 +1,16 @@
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import{OpenaireSearchComponent} from './search.component';
import {PreviousRouteRecorder} from "../../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireSearchComponent,canDeactivate: [PreviousRouteRecorder] }
])
]
})
export class MainSearchRoutingModule { }

View File

@ -0,0 +1,13 @@
import {Component} from '@angular/core';
import {SearchForm} from "../../openaireLibrary/searchPages/searchUtils/newSearchPage.component";
@Component({
selector: 'openaire-search-find',
template: `
<search-all logoURL="/assets/common-assets/logo-small-aggregator.png" name="OpenAIRE"
[searchForm]="searchForm"></search-all>
`,
})
export class OpenaireSearchComponent{
public searchForm: SearchForm = {class: 'search-form', dark: true};
}

View File

@ -0,0 +1,20 @@
import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {OpenaireSearchDataprovidersComponent} from './searchDataproviders.component';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {properties} from "../../../environments/environment";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireSearchDataprovidersComponent,data: {
redirect: properties.errorLink
}, canDeactivate: [PreviousRouteRecorder] }
])
]
})
export class SearchDataProvidersRoutingModule { }

View File

@ -0,0 +1,23 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {FormsModule} from '@angular/forms';
import {OpenaireSearchDataprovidersComponent} from './searchDataproviders.component';
import {SearchDataProvidersRoutingModule} from './searchDataProviders-routing.module';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {SearchDataProvidersModule} from "../../openaireLibrary/searchPages/searchDataProviders.module";
@NgModule({
imports: [
CommonModule, FormsModule,
SearchDataProvidersModule, SearchDataProvidersRoutingModule
],
declarations: [
OpenaireSearchDataprovidersComponent
],
providers:[PreviousRouteRecorder],
exports: [
OpenaireSearchDataprovidersComponent
]
})
export class LibSearchDataProvidersModule { }

View File

@ -0,0 +1,19 @@
import {Component} from '@angular/core';
import {properties} from "../../../environments/environment";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
import {SearchForm} from "../../openaireLibrary/searchPages/searchUtils/newSearchPage.component";
@Component({
selector: 'openaire-search-dataproviders',
template: `
<search-dataproviders [hasPrefix]="false" [searchForm]="searchForm"></search-dataproviders>
`
})
export class OpenaireSearchDataprovidersComponent {
properties: EnvProperties;
public searchForm: SearchForm = {class: 'search-form', dark: true};
constructor ( ) {}
ngOnInit() {
this.properties = properties;
}
}

View File

@ -0,0 +1,18 @@
import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {OpenaireSearchOrganizationsComponent} from './searchOrganizations.component';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {properties} from "../../../environments/environment";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireSearchOrganizationsComponent, data: {
redirect: properties.errorLink
}, canDeactivate: [PreviousRouteRecorder] }
])
]
})
export class SearchOrganizationsRoutingModule { }

View File

@ -0,0 +1,19 @@
import {Component} from '@angular/core';
import {properties} from "../../../environments/environment";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
import {SearchForm} from "../../openaireLibrary/searchPages/searchUtils/newSearchPage.component";
@Component({
selector: 'openaire-search-organizations',
template: `
<search-organizations [hasPrefix]="false" [searchForm]="searchForm"></search-organizations>
`
})
export class OpenaireSearchOrganizationsComponent {
properties: EnvProperties;
public searchForm: SearchForm = {class: 'search-form', dark: true};
constructor ( ) {}
ngOnInit() {
this.properties = properties;
}
}

View File

@ -0,0 +1,26 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {FormsModule} from '@angular/forms';
import {SearchOrganizationsRoutingModule} from './searchOrganizations-routing.module';
import {OpenaireSearchOrganizationsComponent} from './searchOrganizations.component';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {SearchOrganizationsModule} from "../../openaireLibrary/searchPages/searchOrganizations.module";
@NgModule({
imports: [
CommonModule, FormsModule,
SearchOrganizationsRoutingModule, SearchOrganizationsModule
],
declarations: [
OpenaireSearchOrganizationsComponent
],
providers:[PreviousRouteRecorder],
exports: [
OpenaireSearchOrganizationsComponent
]
})
export class LibSearchOrganizationsModule { }

View File

@ -0,0 +1,19 @@
import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {OpenaireSearchProjectsComponent} from './searchProjects.component';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {properties} from "../../../environments/environment";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireSearchProjectsComponent, data: {
redirect: properties.errorLink
}, canDeactivate: [PreviousRouteRecorder] }
])
]
})
export class SearchProjectsRoutingModule { }

View File

@ -0,0 +1,19 @@
import {Component} from '@angular/core';
import {properties} from "../../../environments/environment";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
import {SearchForm} from "../../openaireLibrary/searchPages/searchUtils/newSearchPage.component";
@Component({
selector: 'openaire-search-projects',
template: `
<search-projects [hasPrefix]="false" [searchForm]="searchForm"></search-projects>
`
})
export class OpenaireSearchProjectsComponent {
properties: EnvProperties;
public searchForm: SearchForm = {class: 'search-form', dark: true};
constructor ( ) {}
ngOnInit() {
this.properties = properties;
}
}

View File

@ -0,0 +1,24 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {FormsModule} from '@angular/forms';
import {SearchProjectsRoutingModule} from './searchProjects-routing.module';
import {OpenaireSearchProjectsComponent} from './searchProjects.component';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {SearchProjectsModule} from "../../openaireLibrary/searchPages/searchProjects.module";
@NgModule({
imports: [
CommonModule, FormsModule, SearchProjectsRoutingModule, SearchProjectsModule
],
declarations: [
OpenaireSearchProjectsComponent
],
providers:[PreviousRouteRecorder],
exports: [
OpenaireSearchProjectsComponent
]
})
export class LibSearchProjectsModule { }

Some files were not shown because too many files have changed in this diff Show More