diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..1009376 --- /dev/null +++ b/.gitmodules @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..688ae4e --- /dev/null +++ b/CHANGELOG.md @@ -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)* + diff --git a/README.md b/README.md index 41a0a3f..29d5a73 100644 --- a/README.md +++ b/README.md @@ -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.
+Use the `npm run build-beta` for a beta build.
+Use the `npm run build-prod` for a production build. + +## Build - SSR + +Use the `npm run build:ssr-dev` for a development build.
+Use the `npm run build:ssr-beta` for a beta build.
+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/). diff --git a/angular.json b/angular.json new file mode 100644 index 0000000..16fa119 --- /dev/null +++ b/angular.json @@ -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 + } +} diff --git a/e2e/protractor.conf.js b/e2e/protractor.conf.js new file mode 100644 index 0000000..86776a3 --- /dev/null +++ b/e2e/protractor.conf.js @@ -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 } })); + } +}; \ No newline at end of file diff --git a/e2e/src/app.e2e-spec.ts b/e2e/src/app.e2e-spec.ts new file mode 100644 index 0000000..4cad9ad --- /dev/null +++ b/e2e/src/app.e2e-spec.ts @@ -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)); + }); +}); diff --git a/e2e/src/app.po.ts b/e2e/src/app.po.ts new file mode 100644 index 0000000..5776aa9 --- /dev/null +++ b/e2e/src/app.po.ts @@ -0,0 +1,11 @@ +import { browser, by, element } from 'protractor'; + +export class AppPage { + navigateTo() { + return browser.get(browser.baseUrl) as Promise; + } + + getTitleText() { + return element(by.css('app-root h1')).getText() as Promise; + } +} diff --git a/e2e/tsconfig.e2e.json b/e2e/tsconfig.e2e.json new file mode 100644 index 0000000..a6dd622 --- /dev/null +++ b/e2e/tsconfig.e2e.json @@ -0,0 +1,13 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/app", + "module": "commonjs", + "target": "es5", + "types": [ + "jasmine", + "jasminewd2", + "node" + ] + } +} \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..bad0b03 --- /dev/null +++ b/package.json @@ -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" + } +} diff --git a/prometheus.ts b/prometheus.ts new file mode 100644 index 0000000..26bdbf4 --- /dev/null +++ b/prometheus.ts @@ -0,0 +1,125 @@ +import * as prom from 'prom-client'; + + +export class Prometheus { + + register = new prom.Registry(); + + counters: Map = new Map([ + ["/", 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] + })] + ]); +} diff --git a/server.ts b/server.ts new file mode 100644 index 0000000..0a5218d --- /dev/null +++ b/server.ts @@ -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'; diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts new file mode 100644 index 0000000..6c12df9 --- /dev/null +++ b/src/app/app-routing.module.ts @@ -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); + })); + } +} diff --git a/src/app/app.component.ts b/src/app/app.component.ts new file mode 100644 index 0000000..d794d09 --- /dev/null +++ b/src/app/app.component.ts @@ -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: ` + +
+ + + + +
+
+ +
+
+
+ ` +}) +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(' 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); + } + } + +} diff --git a/src/app/app.module.ts b/src/app/app.module.ts new file mode 100755 index 0000000..0534261 --- /dev/null +++ b/src/app/app.module.ts @@ -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 { +} diff --git a/src/app/app.server.module.ts b/src/app/app.server.module.ts new file mode 100644 index 0000000..cc86a55 --- /dev/null +++ b/src/app/app.server.module.ts @@ -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 {} diff --git a/src/app/claims/directLinking/directLinking-routing.module.ts b/src/app/claims/directLinking/directLinking-routing.module.ts new file mode 100644 index 0000000..45d32e6 --- /dev/null +++ b/src/app/claims/directLinking/directLinking-routing.module.ts @@ -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 { } diff --git a/src/app/claims/directLinking/directLinking.component.ts b/src/app/claims/directLinking/directLinking.component.ts new file mode 100644 index 0000000..efab6dd --- /dev/null +++ b/src/app/claims/directLinking/directLinking.component.ts @@ -0,0 +1,10 @@ +import {Component} from '@angular/core'; +import {properties} from "../../../environments/environment"; + +@Component({ + selector: 'openaire-directLinking', + template: ` + ` +}) +export class OpenaireDirectLinkingComponent { +} diff --git a/src/app/claims/directLinking/directLinking.module.ts b/src/app/claims/directLinking/directLinking.module.ts new file mode 100644 index 0000000..34e279d --- /dev/null +++ b/src/app/claims/directLinking/directLinking.module.ts @@ -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 { } diff --git a/src/app/claims/linking/linking-routing.module.ts b/src/app/claims/linking/linking-routing.module.ts new file mode 100644 index 0000000..40d66a5 --- /dev/null +++ b/src/app/claims/linking/linking-routing.module.ts @@ -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 { } diff --git a/src/app/claims/linking/linkingGeneric.component.ts b/src/app/claims/linking/linkingGeneric.component.ts new file mode 100644 index 0000000..d7c5b1b --- /dev/null +++ b/src/app/claims/linking/linkingGeneric.component.ts @@ -0,0 +1,10 @@ +import {Component} from '@angular/core'; +import {properties} from "../../../environments/environment"; + +@Component({ + selector: 'openaire-linking-generic', + template: `` + +}) +export class OpenaireLinkingComponent { +} diff --git a/src/app/claims/linking/linkingGeneric.module.ts b/src/app/claims/linking/linkingGeneric.module.ts new file mode 100644 index 0000000..95ae3ed --- /dev/null +++ b/src/app/claims/linking/linkingGeneric.module.ts @@ -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 { } diff --git a/src/app/claims/myClaims/myClaims-routing.module.ts b/src/app/claims/myClaims/myClaims-routing.module.ts new file mode 100644 index 0000000..ca7e43f --- /dev/null +++ b/src/app/claims/myClaims/myClaims-routing.module.ts @@ -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 { } diff --git a/src/app/claims/myClaims/myClaims.component.ts b/src/app/claims/myClaims/myClaims.component.ts new file mode 100644 index 0000000..c60df6e --- /dev/null +++ b/src/app/claims/myClaims/myClaims.component.ts @@ -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: ` + + +` + +}) + 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; + }); + } +} diff --git a/src/app/claims/myClaims/myClaims.module.ts b/src/app/claims/myClaims/myClaims.module.ts new file mode 100644 index 0000000..8402be1 --- /dev/null +++ b/src/app/claims/myClaims/myClaims.module.ts @@ -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 { } diff --git a/src/app/deposit/deposit-routing.module.ts b/src/app/deposit/deposit-routing.module.ts new file mode 100644 index 0000000..8af8110 --- /dev/null +++ b/src/app/deposit/deposit-routing.module.ts @@ -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 { } diff --git a/src/app/deposit/deposit.component.ts b/src/app/deposit/deposit.component.ts new file mode 100644 index 0000000..e305fd2 --- /dev/null +++ b/src/app/deposit/deposit.component.ts @@ -0,0 +1,12 @@ +import {Component} from '@angular/core'; + +@Component({ + selector: 'openaire-deposit', + template: ` + + ` +}) + +export class OpenaireDepositComponent { +} + diff --git a/src/app/deposit/deposit.module.ts b/src/app/deposit/deposit.module.ts new file mode 100644 index 0000000..e32cbaa --- /dev/null +++ b/src/app/deposit/deposit.module.ts @@ -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 { } diff --git a/src/app/deposit/searchDataprovidersToDeposit-routing.module.ts b/src/app/deposit/searchDataprovidersToDeposit-routing.module.ts new file mode 100644 index 0000000..3dd5eb7 --- /dev/null +++ b/src/app/deposit/searchDataprovidersToDeposit-routing.module.ts @@ -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 { +} diff --git a/src/app/deposit/searchDataprovidersToDeposit.component.ts b/src/app/deposit/searchDataprovidersToDeposit.component.ts new file mode 100644 index 0000000..f4cffa0 --- /dev/null +++ b/src/app/deposit/searchDataprovidersToDeposit.component.ts @@ -0,0 +1,12 @@ +import {Component} from '@angular/core'; + +@Component({ + selector: 'openaire-search-deposit', + template: ` + + ` +}) + +export class OpenaireSearchDataprovidersToDepositComponent { +} + diff --git a/src/app/deposit/searchDataprovidersToDeposit.module.ts b/src/app/deposit/searchDataprovidersToDeposit.module.ts new file mode 100644 index 0000000..2e76ce7 --- /dev/null +++ b/src/app/deposit/searchDataprovidersToDeposit.module.ts @@ -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 { } diff --git a/src/app/develop/develop.component.css b/src/app/develop/develop.component.css new file mode 100644 index 0000000..a1924dd --- /dev/null +++ b/src/app/develop/develop.component.css @@ -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; + } +} diff --git a/src/app/develop/develop.component.ts b/src/app/develop/develop.component.ts new file mode 100644 index 0000000..e3a892d --- /dev/null +++ b/src/app/develop/develop.component.ts @@ -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: ` +
+
+
+

+ Develop +

+
+

Help developers with OpenAIRE APIs +

+
+ Not sure where to start? Let us give you some guides and request examples. +
+

+ For research outcomes + (publications, datasets, software and other research data) you can use the + Selective Access APIs + by adding the country parameter. +

+
+
+ +

+ Request examples: +

+
    +
  • + Access “Publications”
    + GET + https://api.openaire.eu/search/publications?country={{aggregator.valueId}} +
  • +
  • + Access “Open Access Publications”
    + GET + http://api.openaire.eu/search/publications?country={{aggregator.valueId}}&OA=true +
  • +
  • + Access “Datasets”
    + GET + https://api.openaire.eu/search/datasets?country={{aggregator.valueId}} +
  • +
  • + Access “Software”
    + GET + https://api.openaire.eu/search/software?country={{aggregator.valueId}} +
  • +
  • + Access “Other Research”
    + GET + https://api.openaire.eu/search/other?country={{aggregator.valueId}} +
  • +
+
+
+
+ +
+
+
+
+
+ For more information on the full potential of the OpenAIRE APIs please check + the OpenAIRE API Documentation. +
+
+
+
+
+
+ `, + 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}}); + } + + +} diff --git a/src/app/develop/develop.module.ts b/src/app/develop/develop.module.ts new file mode 100644 index 0000000..73d6fcc --- /dev/null +++ b/src/app/develop/develop.module.ts @@ -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 { + +} diff --git a/src/app/error/errorPage.component.ts b/src/app/error/errorPage.component.ts new file mode 100644 index 0000000..52073bc --- /dev/null +++ b/src/app/error/errorPage.component.ts @@ -0,0 +1,12 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'openaire-error', + template: ` + + ` +}) + +export class OpenaireErrorPageComponent { + +} diff --git a/src/app/home/home-routing.module.ts b/src/app/home/home-routing.module.ts new file mode 100644 index 0000000..89a7faa --- /dev/null +++ b/src/app/home/home-routing.module.ts @@ -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 { } diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html new file mode 100644 index 0000000..f10560e --- /dev/null +++ b/src/app/home/home.component.html @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts new file mode 100644 index 0000000..d338016 --- /dev/null +++ b/src/app/home/home.component.ts @@ -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(); +// } +// } diff --git a/src/app/home/home.module.ts b/src/app/home/home.module.ts new file mode 100644 index 0000000..f5e41b9 --- /dev/null +++ b/src/app/home/home.module.ts @@ -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]); + } +} diff --git a/src/app/landingPages/dataProvider/dataProvider-routing.module.ts b/src/app/landingPages/dataProvider/dataProvider-routing.module.ts new file mode 100644 index 0000000..316ccf6 --- /dev/null +++ b/src/app/landingPages/dataProvider/dataProvider-routing.module.ts @@ -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 { } diff --git a/src/app/landingPages/dataProvider/dataProvider.component.ts b/src/app/landingPages/dataProvider/dataProvider.component.ts new file mode 100644 index 0000000..361d3e5 --- /dev/null +++ b/src/app/landingPages/dataProvider/dataProvider.component.ts @@ -0,0 +1,8 @@ +import {Component} from '@angular/core'; + +@Component({ + selector: 'openaire-dataprovider', + template: ``, + }) +export class OpenaireDataProviderComponent{ +} diff --git a/src/app/landingPages/dataProvider/libDataProvider.module.ts b/src/app/landingPages/dataProvider/libDataProvider.module.ts new file mode 100644 index 0000000..d6f8f93 --- /dev/null +++ b/src/app/landingPages/dataProvider/libDataProvider.module.ts @@ -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 { } diff --git a/src/app/landingPages/dataset/dataset-routing.module.ts b/src/app/landingPages/dataset/dataset-routing.module.ts new file mode 100644 index 0000000..455ca4e --- /dev/null +++ b/src/app/landingPages/dataset/dataset-routing.module.ts @@ -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 { } diff --git a/src/app/landingPages/dataset/dataset.component.ts b/src/app/landingPages/dataset/dataset.component.ts new file mode 100644 index 0000000..6b7f525 --- /dev/null +++ b/src/app/landingPages/dataset/dataset.component.ts @@ -0,0 +1,8 @@ +import {Component} from '@angular/core'; + +@Component({ + selector: 'openaire-dataset', + template: ``, + }) +export class OpenaireDatasetComponent{ +} diff --git a/src/app/landingPages/dataset/libDataset.module.ts b/src/app/landingPages/dataset/libDataset.module.ts new file mode 100644 index 0000000..48a0269 --- /dev/null +++ b/src/app/landingPages/dataset/libDataset.module.ts @@ -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 { } diff --git a/src/app/landingPages/htmlProjectReport/htmlProjectReport-routing.module.ts b/src/app/landingPages/htmlProjectReport/htmlProjectReport-routing.module.ts new file mode 100644 index 0000000..b3003f1 --- /dev/null +++ b/src/app/landingPages/htmlProjectReport/htmlProjectReport-routing.module.ts @@ -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 { } diff --git a/src/app/landingPages/htmlProjectReport/htmlProjectReport.component.ts b/src/app/landingPages/htmlProjectReport/htmlProjectReport.component.ts new file mode 100644 index 0000000..5236c9f --- /dev/null +++ b/src/app/landingPages/htmlProjectReport/htmlProjectReport.component.ts @@ -0,0 +1,8 @@ +import {Component} from '@angular/core'; + +@Component({ + selector: 'openaire-htmlProjectReport', + template: ``, + }) +export class OpenaireHtmlProjectReportComponent{ +} diff --git a/src/app/landingPages/htmlProjectReport/libHtmlProjectReport.module.ts b/src/app/landingPages/htmlProjectReport/libHtmlProjectReport.module.ts new file mode 100644 index 0000000..c779678 --- /dev/null +++ b/src/app/landingPages/htmlProjectReport/libHtmlProjectReport.module.ts @@ -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 { } diff --git a/src/app/landingPages/organization/libOrganization.module.ts b/src/app/landingPages/organization/libOrganization.module.ts new file mode 100644 index 0000000..545ad62 --- /dev/null +++ b/src/app/landingPages/organization/libOrganization.module.ts @@ -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 { } diff --git a/src/app/landingPages/organization/organization-routing.module.ts b/src/app/landingPages/organization/organization-routing.module.ts new file mode 100644 index 0000000..3b0a2ab --- /dev/null +++ b/src/app/landingPages/organization/organization-routing.module.ts @@ -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 { } diff --git a/src/app/landingPages/organization/organization.component.ts b/src/app/landingPages/organization/organization.component.ts new file mode 100644 index 0000000..bae58be --- /dev/null +++ b/src/app/landingPages/organization/organization.component.ts @@ -0,0 +1,8 @@ +import {Component} from '@angular/core'; + +@Component({ + selector: 'openaire-organization', + template: ``, + }) +export class OpenaireOrganizationComponent{ +} diff --git a/src/app/landingPages/orp/libOrp.module.ts b/src/app/landingPages/orp/libOrp.module.ts new file mode 100644 index 0000000..8f6bac8 --- /dev/null +++ b/src/app/landingPages/orp/libOrp.module.ts @@ -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 { } diff --git a/src/app/landingPages/orp/orp-routing.module.ts b/src/app/landingPages/orp/orp-routing.module.ts new file mode 100644 index 0000000..13003b9 --- /dev/null +++ b/src/app/landingPages/orp/orp-routing.module.ts @@ -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 { } diff --git a/src/app/landingPages/orp/orp.component.ts b/src/app/landingPages/orp/orp.component.ts new file mode 100644 index 0000000..a5d348b --- /dev/null +++ b/src/app/landingPages/orp/orp.component.ts @@ -0,0 +1,8 @@ +import {Component} from '@angular/core'; + +@Component({ + selector: 'openaire-orp', + template: ``, + }) +export class OpenaireOrpComponent{ +} diff --git a/src/app/landingPages/project/libProject.module.ts b/src/app/landingPages/project/libProject.module.ts new file mode 100644 index 0000000..179a4fe --- /dev/null +++ b/src/app/landingPages/project/libProject.module.ts @@ -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 { } diff --git a/src/app/landingPages/project/project-routing.module.ts b/src/app/landingPages/project/project-routing.module.ts new file mode 100644 index 0000000..9655032 --- /dev/null +++ b/src/app/landingPages/project/project-routing.module.ts @@ -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 { } diff --git a/src/app/landingPages/project/project.component.ts b/src/app/landingPages/project/project.component.ts new file mode 100644 index 0000000..e1c278b --- /dev/null +++ b/src/app/landingPages/project/project.component.ts @@ -0,0 +1,8 @@ +import {Component} from '@angular/core'; + +@Component({ + selector: 'openaire-project', + template: ``, + }) +export class OpenaireProjectComponent{ +} diff --git a/src/app/landingPages/publication/libPublication.module.ts b/src/app/landingPages/publication/libPublication.module.ts new file mode 100644 index 0000000..302dc5a --- /dev/null +++ b/src/app/landingPages/publication/libPublication.module.ts @@ -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 { } diff --git a/src/app/landingPages/publication/publication-routing.module.ts b/src/app/landingPages/publication/publication-routing.module.ts new file mode 100644 index 0000000..8161a3e --- /dev/null +++ b/src/app/landingPages/publication/publication-routing.module.ts @@ -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 { } diff --git a/src/app/landingPages/publication/publication.component.ts b/src/app/landingPages/publication/publication.component.ts new file mode 100644 index 0000000..1d6b86d --- /dev/null +++ b/src/app/landingPages/publication/publication.component.ts @@ -0,0 +1,9 @@ +import {Component} from '@angular/core'; + +@Component({ + selector: 'openaire-publication', + template: ` + `, +}) +export class OpenairePublicationComponent { +} diff --git a/src/app/landingPages/result/libResult.module.ts b/src/app/landingPages/result/libResult.module.ts new file mode 100644 index 0000000..39be478 --- /dev/null +++ b/src/app/landingPages/result/libResult.module.ts @@ -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 { } diff --git a/src/app/landingPages/result/result-routing.module.ts b/src/app/landingPages/result/result-routing.module.ts new file mode 100644 index 0000000..666fcc6 --- /dev/null +++ b/src/app/landingPages/result/result-routing.module.ts @@ -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 { } diff --git a/src/app/landingPages/result/result.component.ts b/src/app/landingPages/result/result.component.ts new file mode 100644 index 0000000..9fa51e2 --- /dev/null +++ b/src/app/landingPages/result/result.component.ts @@ -0,0 +1,8 @@ +import {Component} from '@angular/core'; + +@Component({ + selector: 'openaire-publication', + template: ``, + }) +export class OpenaireResultComponent{ +} diff --git a/src/app/landingPages/service/libService.module.ts b/src/app/landingPages/service/libService.module.ts new file mode 100644 index 0000000..2820134 --- /dev/null +++ b/src/app/landingPages/service/libService.module.ts @@ -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 { } diff --git a/src/app/landingPages/service/service-routing.module.ts b/src/app/landingPages/service/service-routing.module.ts new file mode 100644 index 0000000..b3f753a --- /dev/null +++ b/src/app/landingPages/service/service-routing.module.ts @@ -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 { } diff --git a/src/app/landingPages/service/service.component.ts b/src/app/landingPages/service/service.component.ts new file mode 100644 index 0000000..02d1802 --- /dev/null +++ b/src/app/landingPages/service/service.component.ts @@ -0,0 +1,8 @@ +import {Component} from '@angular/core'; + +@Component({ + selector: 'openaire-dataprovider', + template: ``, + }) +export class OpenaireServiceComponent{ +} diff --git a/src/app/landingPages/software/libSoftware.module.ts b/src/app/landingPages/software/libSoftware.module.ts new file mode 100644 index 0000000..18553aa --- /dev/null +++ b/src/app/landingPages/software/libSoftware.module.ts @@ -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 { } diff --git a/src/app/landingPages/software/software-routing.module.ts b/src/app/landingPages/software/software-routing.module.ts new file mode 100644 index 0000000..7af66cd --- /dev/null +++ b/src/app/landingPages/software/software-routing.module.ts @@ -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 { } diff --git a/src/app/landingPages/software/software.component.ts b/src/app/landingPages/software/software.component.ts new file mode 100644 index 0000000..408862f --- /dev/null +++ b/src/app/landingPages/software/software.component.ts @@ -0,0 +1,8 @@ +import {Component} from '@angular/core'; + +@Component({ + selector: 'openaire-software', + template: ``, + }) +export class OpenaireSoftwareComponent{ +} diff --git a/src/app/login/libUser.module.ts b/src/app/login/libUser.module.ts new file mode 100644 index 0000000..b1040ce --- /dev/null +++ b/src/app/login/libUser.module.ts @@ -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 { } diff --git a/src/app/login/user-routing.module.ts b/src/app/login/user-routing.module.ts new file mode 100644 index 0000000..1a8ad90 --- /dev/null +++ b/src/app/login/user-routing.module.ts @@ -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 { } diff --git a/src/app/login/user.component.ts b/src/app/login/user.component.ts new file mode 100644 index 0000000..76d7038 --- /dev/null +++ b/src/app/login/user.component.ts @@ -0,0 +1,11 @@ +import {Component, ElementRef} from '@angular/core'; +import {Observable} from 'rxjs'; + +@Component({ + selector: 'openaire-user', + template: `` + }) + +export class OpenaireUserComponent { + +} diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary new file mode 160000 index 0000000..9b2524c --- /dev/null +++ b/src/app/openaireLibrary @@ -0,0 +1 @@ +Subproject commit 9b2524c1c72972b593654081e1d917ca8a1a7909 diff --git a/src/app/reload/libReload.module.ts b/src/app/reload/libReload.module.ts new file mode 100644 index 0000000..d982aaa --- /dev/null +++ b/src/app/reload/libReload.module.ts @@ -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 { } diff --git a/src/app/searchPages/advanced/advancedSearchDataProviders-routing.module.ts b/src/app/searchPages/advanced/advancedSearchDataProviders-routing.module.ts new file mode 100644 index 0000000..1f53f4f --- /dev/null +++ b/src/app/searchPages/advanced/advancedSearchDataProviders-routing.module.ts @@ -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 { } diff --git a/src/app/searchPages/advanced/advancedSearchDataProviders.component.ts b/src/app/searchPages/advanced/advancedSearchDataProviders.component.ts new file mode 100644 index 0000000..273155e --- /dev/null +++ b/src/app/searchPages/advanced/advancedSearchDataProviders.component.ts @@ -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: ` + + + + ` +}) + +export class OpenaireAdvancedSearchDataProvidersComponent { + properties: EnvProperties; + public searchForm: SearchForm = {class: 'search-form', dark: true}; + constructor ( ) {} + ngOnInit() { + this.properties = properties; + } +} diff --git a/src/app/searchPages/advanced/advancedSearchDataProviders.module.ts b/src/app/searchPages/advanced/advancedSearchDataProviders.module.ts new file mode 100644 index 0000000..cae770e --- /dev/null +++ b/src/app/searchPages/advanced/advancedSearchDataProviders.module.ts @@ -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 { } diff --git a/src/app/searchPages/advanced/advancedSearchOrganizations-routing.module.ts b/src/app/searchPages/advanced/advancedSearchOrganizations-routing.module.ts new file mode 100644 index 0000000..d46cc46 --- /dev/null +++ b/src/app/searchPages/advanced/advancedSearchOrganizations-routing.module.ts @@ -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 { } diff --git a/src/app/searchPages/advanced/advancedSearchOrganizations.component.ts b/src/app/searchPages/advanced/advancedSearchOrganizations.component.ts new file mode 100644 index 0000000..669edfc --- /dev/null +++ b/src/app/searchPages/advanced/advancedSearchOrganizations.component.ts @@ -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: ` + + + + ` +}) + +export class OpenaireAdvancedSearchOrganizationsComponent { + properties: EnvProperties; + public searchForm: SearchForm = {class: 'search-form', dark: true}; + constructor ( ) {} + ngOnInit() { + this.properties = properties; + } +} diff --git a/src/app/searchPages/advanced/advancedSearchOrganizations.module.ts b/src/app/searchPages/advanced/advancedSearchOrganizations.module.ts new file mode 100644 index 0000000..6999c82 --- /dev/null +++ b/src/app/searchPages/advanced/advancedSearchOrganizations.module.ts @@ -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 { } diff --git a/src/app/searchPages/advanced/advancedSearchProjects-routing.module.ts b/src/app/searchPages/advanced/advancedSearchProjects-routing.module.ts new file mode 100644 index 0000000..fb8875a --- /dev/null +++ b/src/app/searchPages/advanced/advancedSearchProjects-routing.module.ts @@ -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 { } diff --git a/src/app/searchPages/advanced/advancedSearchProjects.component.ts b/src/app/searchPages/advanced/advancedSearchProjects.component.ts new file mode 100644 index 0000000..8dcc913 --- /dev/null +++ b/src/app/searchPages/advanced/advancedSearchProjects.component.ts @@ -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: ` + + + + ` + }) + +export class OpenaireAdvancedSearchProjectsComponent { + properties: EnvProperties; + public searchForm: SearchForm = {class: 'search-form', dark: true}; + constructor ( ) {} + ngOnInit() { + this.properties = properties; + } +} diff --git a/src/app/searchPages/advanced/advancedSearchProjects.module.ts b/src/app/searchPages/advanced/advancedSearchProjects.module.ts new file mode 100644 index 0000000..11b0e61 --- /dev/null +++ b/src/app/searchPages/advanced/advancedSearchProjects.module.ts @@ -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 { } diff --git a/src/app/searchPages/advanced/advancedSearchServices-routing.module.ts b/src/app/searchPages/advanced/advancedSearchServices-routing.module.ts new file mode 100644 index 0000000..b6b37ae --- /dev/null +++ b/src/app/searchPages/advanced/advancedSearchServices-routing.module.ts @@ -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 { } diff --git a/src/app/searchPages/advanced/advancedSearchServices.component.ts b/src/app/searchPages/advanced/advancedSearchServices.component.ts new file mode 100644 index 0000000..e2932bb --- /dev/null +++ b/src/app/searchPages/advanced/advancedSearchServices.component.ts @@ -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: ` + + + ` +}) + +export class OpenaireAdvancedSearchServicesComponent { + properties: EnvProperties; + public openaireEntities = OpenaireEntities; + public searchForm: SearchForm = {class: 'search-form', dark: true}; + constructor ( ) {} + ngOnInit() { + this.properties = properties; + } +} diff --git a/src/app/searchPages/advanced/advancedSearchServices.module.ts b/src/app/searchPages/advanced/advancedSearchServices.module.ts new file mode 100644 index 0000000..88dbd1e --- /dev/null +++ b/src/app/searchPages/advanced/advancedSearchServices.module.ts @@ -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 { } diff --git a/src/app/searchPages/advanced/searchResearchResults-routing.module.ts b/src/app/searchPages/advanced/searchResearchResults-routing.module.ts new file mode 100644 index 0000000..f2a372d --- /dev/null +++ b/src/app/searchPages/advanced/searchResearchResults-routing.module.ts @@ -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 { } diff --git a/src/app/searchPages/advanced/searchResearchResults.component.ts b/src/app/searchPages/advanced/searchResearchResults.component.ts new file mode 100644 index 0000000..c62e7fd --- /dev/null +++ b/src/app/searchPages/advanced/searchResearchResults.component.ts @@ -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: ` + + ` + +}) +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; + } +} diff --git a/src/app/searchPages/advanced/searchResearchResults.module.ts b/src/app/searchPages/advanced/searchResearchResults.module.ts new file mode 100644 index 0000000..9462486 --- /dev/null +++ b/src/app/searchPages/advanced/searchResearchResults.module.ts @@ -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 { } diff --git a/src/app/searchPages/find/libSearch.module.ts b/src/app/searchPages/find/libSearch.module.ts new file mode 100644 index 0000000..77216de --- /dev/null +++ b/src/app/searchPages/find/libSearch.module.ts @@ -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 { } diff --git a/src/app/searchPages/find/mainSearch-routing.module.ts b/src/app/searchPages/find/mainSearch-routing.module.ts new file mode 100644 index 0000000..82cc678 --- /dev/null +++ b/src/app/searchPages/find/mainSearch-routing.module.ts @@ -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 { } diff --git a/src/app/searchPages/find/search.component.ts b/src/app/searchPages/find/search.component.ts new file mode 100644 index 0000000..892084c --- /dev/null +++ b/src/app/searchPages/find/search.component.ts @@ -0,0 +1,13 @@ +import {Component} from '@angular/core'; +import {SearchForm} from "../../openaireLibrary/searchPages/searchUtils/newSearchPage.component"; + +@Component({ + selector: 'openaire-search-find', + template: ` + + `, + }) +export class OpenaireSearchComponent{ + public searchForm: SearchForm = {class: 'search-form', dark: true}; +} diff --git a/src/app/searchPages/simple/searchDataProviders-routing.module.ts b/src/app/searchPages/simple/searchDataProviders-routing.module.ts new file mode 100644 index 0000000..055279f --- /dev/null +++ b/src/app/searchPages/simple/searchDataProviders-routing.module.ts @@ -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 { } diff --git a/src/app/searchPages/simple/searchDataProviders.module.ts b/src/app/searchPages/simple/searchDataProviders.module.ts new file mode 100644 index 0000000..6b13ace --- /dev/null +++ b/src/app/searchPages/simple/searchDataProviders.module.ts @@ -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 { } diff --git a/src/app/searchPages/simple/searchDataproviders.component.ts b/src/app/searchPages/simple/searchDataproviders.component.ts new file mode 100644 index 0000000..ecef3b8 --- /dev/null +++ b/src/app/searchPages/simple/searchDataproviders.component.ts @@ -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: ` + + ` +}) +export class OpenaireSearchDataprovidersComponent { + properties: EnvProperties; + public searchForm: SearchForm = {class: 'search-form', dark: true}; + constructor ( ) {} + ngOnInit() { + this.properties = properties; + } +} diff --git a/src/app/searchPages/simple/searchOrganizations-routing.module.ts b/src/app/searchPages/simple/searchOrganizations-routing.module.ts new file mode 100644 index 0000000..38b457a --- /dev/null +++ b/src/app/searchPages/simple/searchOrganizations-routing.module.ts @@ -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 { } diff --git a/src/app/searchPages/simple/searchOrganizations.component.ts b/src/app/searchPages/simple/searchOrganizations.component.ts new file mode 100644 index 0000000..3a81d73 --- /dev/null +++ b/src/app/searchPages/simple/searchOrganizations.component.ts @@ -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: ` + + ` +}) +export class OpenaireSearchOrganizationsComponent { + properties: EnvProperties; + public searchForm: SearchForm = {class: 'search-form', dark: true}; + constructor ( ) {} + ngOnInit() { + this.properties = properties; + } +} diff --git a/src/app/searchPages/simple/searchOrganizations.module.ts b/src/app/searchPages/simple/searchOrganizations.module.ts new file mode 100644 index 0000000..6c6dc7a --- /dev/null +++ b/src/app/searchPages/simple/searchOrganizations.module.ts @@ -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 { } diff --git a/src/app/searchPages/simple/searchProjects-routing.module.ts b/src/app/searchPages/simple/searchProjects-routing.module.ts new file mode 100644 index 0000000..0282cb8 --- /dev/null +++ b/src/app/searchPages/simple/searchProjects-routing.module.ts @@ -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 { } diff --git a/src/app/searchPages/simple/searchProjects.component.ts b/src/app/searchPages/simple/searchProjects.component.ts new file mode 100644 index 0000000..b7c9d31 --- /dev/null +++ b/src/app/searchPages/simple/searchProjects.component.ts @@ -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: ` + + ` +}) +export class OpenaireSearchProjectsComponent { + properties: EnvProperties; + public searchForm: SearchForm = {class: 'search-form', dark: true}; + constructor ( ) {} + ngOnInit() { + this.properties = properties; + } +} diff --git a/src/app/searchPages/simple/searchProjects.module.ts b/src/app/searchPages/simple/searchProjects.module.ts new file mode 100644 index 0000000..8c7fa82 --- /dev/null +++ b/src/app/searchPages/simple/searchProjects.module.ts @@ -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 { } diff --git a/src/app/searchPages/simple/searchResearchResults-routing.module.ts b/src/app/searchPages/simple/searchResearchResults-routing.module.ts new file mode 100644 index 0000000..215f5f5 --- /dev/null +++ b/src/app/searchPages/simple/searchResearchResults-routing.module.ts @@ -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 { } diff --git a/src/app/searchPages/simple/searchResearchResults.component.ts b/src/app/searchPages/simple/searchResearchResults.component.ts new file mode 100644 index 0000000..71238a5 --- /dev/null +++ b/src/app/searchPages/simple/searchResearchResults.component.ts @@ -0,0 +1,21 @@ +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: ` + + ` +}) +export class OpenaireSearchResearchResultsComponent { + @Input() searchLink: string = "/search/research-results"; + properties: EnvProperties; + public searchForm: SearchForm = {class: 'search-form', dark: true}; + constructor ( ) {} + ngOnInit() { + this.properties = properties; + } +} diff --git a/src/app/searchPages/simple/searchResearchResults.module.ts b/src/app/searchPages/simple/searchResearchResults.module.ts new file mode 100644 index 0000000..b1d52c7 --- /dev/null +++ b/src/app/searchPages/simple/searchResearchResults.module.ts @@ -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 OpenaireSearchResearchResultsModule { } diff --git a/src/app/searchPages/simple/searchServices-routing.module.ts b/src/app/searchPages/simple/searchServices-routing.module.ts new file mode 100644 index 0000000..6439c79 --- /dev/null +++ b/src/app/searchPages/simple/searchServices-routing.module.ts @@ -0,0 +1,19 @@ +import {NgModule} from '@angular/core'; +import {RouterModule} from '@angular/router'; + +import {OpenaireSearchServicesComponent} from './searchServices.component'; +import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; +import {properties} from "../../../environments/environment"; + + +@NgModule({ + imports: [ + RouterModule.forChild([ + { path: '', component: OpenaireSearchServicesComponent,data: { + redirect: properties.errorLink + }, canDeactivate: [PreviousRouteRecorder] } + + ]) + ] +}) +export class SearchServicesRoutingModule { } diff --git a/src/app/searchPages/simple/searchServices.component.ts b/src/app/searchPages/simple/searchServices.component.ts new file mode 100644 index 0000000..0e569f5 --- /dev/null +++ b/src/app/searchPages/simple/searchServices.component.ts @@ -0,0 +1,24 @@ +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-search-services', + template: ` + + + ` +}) +export class OpenaireSearchServicesComponent { + properties: EnvProperties; + public openaireEntities = OpenaireEntities; + public searchForm: SearchForm = {class: 'search-form', dark: true}; + constructor ( ) {} + ngOnInit() { + this.properties = properties; + } +} diff --git a/src/app/searchPages/simple/searchServices.module.ts b/src/app/searchPages/simple/searchServices.module.ts new file mode 100644 index 0000000..9e6c4ee --- /dev/null +++ b/src/app/searchPages/simple/searchServices.module.ts @@ -0,0 +1,23 @@ +import {NgModule} from '@angular/core'; +import {CommonModule} from '@angular/common'; +import {FormsModule} from '@angular/forms'; +import {SearchServicesRoutingModule} from './searchServices-routing.module'; +import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; +import {SearchDataProvidersModule} from "../../openaireLibrary/searchPages/searchDataProviders.module"; +import {OpenaireSearchServicesComponent} from "./searchServices.component"; + +@NgModule({ + imports: [ + CommonModule, FormsModule, + SearchDataProvidersModule, SearchServicesRoutingModule + + ], + declarations: [ + OpenaireSearchServicesComponent + ], + providers:[PreviousRouteRecorder], + exports: [ + OpenaireSearchServicesComponent + ] +}) +export class LibSearchServicesModule { } diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts new file mode 100644 index 0000000..a5d38d7 --- /dev/null +++ b/src/app/shared/shared.module.ts @@ -0,0 +1,45 @@ +import { NgModule, ModuleWithProviders } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { RouterModule } from '@angular/router'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; + + +const MODULES = [ + // Do NOT include UniversalModule, HttpModule, or JsonpModule here + CommonModule, + RouterModule, + FormsModule, + ReactiveFormsModule +]; + +const PIPES = [ + // put pipes here +]; + +const COMPONENTS = [ + // put shared components here +]; + + + +@NgModule({ + imports: [ + ...MODULES + ], + declarations: [ + ...PIPES, + ...COMPONENTS + ], + exports: [ + ...MODULES, + ...PIPES, + ...COMPONENTS + ] +}) +export class SharedModule { + static forRoot(): ModuleWithProviders { + return { + ngModule: SharedModule, + }; + } +} diff --git a/src/app/utils/aggregators.ts b/src/app/utils/aggregators.ts new file mode 100644 index 0000000..68009c8 --- /dev/null +++ b/src/app/utils/aggregators.ts @@ -0,0 +1,65 @@ +import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class"; +import {Portal} from "../openaireLibrary/utils/entities/adminTool/portal"; + +export class AggregatorInfo { + menuId: string; + title: string; + logoUrl: string; + fieldName: string; //Country + queryFieldName: string; //country + valueId: string; //gr + valueName: string; // Greece + graphSectionTitle: string; + graphSectionText: string; + enableLogin: boolean; + customCss:string; + showHeaderAlways:boolean; + + constructor(menuId: string, title: string, logoUrl: string, fieldName: string, queryFieldName: string, valueId: string, + valueName: string, graphSectionTitle: string = null, graphSectionText:string = null, enableLogin:boolean = true, showHeaderAlways:boolean = true, customCss:string = "" ) { + this.menuId = menuId; + this.title = title; + this.logoUrl = logoUrl; + this.fieldName = fieldName; + this.queryFieldName = queryFieldName; + this.valueId = valueId; + this.valueName = valueName; + this.graphSectionTitle = graphSectionTitle; + this.graphSectionText = graphSectionText; + this.enableLogin = enableLogin; + this.showHeaderAlways = showHeaderAlways; + this.customCss = customCss; + } +} + +export class PortalAggregators { + static eoscInfo: AggregatorInfo = + new AggregatorInfo("eosc", "Eosc Explore", "https://marketplace.eosc-portal.eu/packs/media/images/eosc-logo-mono-65a4962b88cf1caa9e35838e33022ca8.png", + null, null, null, null,null,null ,false,false, + ` + + + `); + static disabled = { + pages: ["/participate/deposit/search", "/participate/deposit/learn-how","/participate/claim", "/participate/direct-claim", "/myclaims","/claims", "/develop", + "/search/find/datasources"], + entities: ["datasource"] + }; + + public static getSearchCustomFilterByAggregator(): SearchCustomFilter { + // let filter:SearchCustomFilter = new SearchCustomFilter(PortalAggregators.eoscInfo.fieldName, PortalAggregators.eoscInfo.queryFieldName, PortalAggregators.eoscInfo.valueId, PortalAggregators.eoscInfo.valueName); + // filter.promptToAddFilter = false; + // filter.isHiddenFilter = true; + // console.log(PortalAggregators.eoscInfo.fieldName); + // console.log(filter); + // return filter; + return null; + } + + public static getCommunityInfo(): any { + return Portal.getMockCommunityInfo(PortalAggregators.eoscInfo.menuId, PortalAggregators.eoscInfo.title, PortalAggregators.disabled.entities,PortalAggregators.disabled.pages); + } +} + + + diff --git a/src/assets/aggregator-custom.css b/src/assets/aggregator-custom.css new file mode 100644 index 0000000..066c78c --- /dev/null +++ b/src/assets/aggregator-custom.css @@ -0,0 +1,105 @@ +:root { + --portal-main-color: #313179; + --portal-main-contrast: white; + --portal-dark-color: #4687E6; + --openaire-main-color: #313179; + + --explore-portal-color: #D95F2D; + --provide-portal-color: #37C7E9; + --monitor-portal-color: #9ABB55; + --connect-portal-color: #EBB13E; + --develop-portal-color: #DA65AB; + + --explore-portal-lower-tone: #a0462c; + --provide-portal-lower-tone: #3A8FA3; + --monitor-portal-lower-tone: #7c9144; + --connect-portal-lower-tone: #b48536; + --develop-portal-lower-tone: #9f4e7e; +} + + +.tm-toolbar .uk-subnav-line .custom-explore-li { + background:var(--portal-main-color) !important; +} + +.mainPageSearchForm{ + background-image: /*linear-gradient(rgba(255, 255, 255, 0.5),rgba(255, 255, 255, 0.5)),*/ url('home.jpg'); + +} + +.mainPageBottomInfo{ + background: linear-gradient( rgba(255, 255, 255, 0.5),rgba(255, 255, 255, 0.5)), url('home.jpg'); + background-attachment: scroll, scroll; + background-size: auto auto, auto auto; + background-size: cover; + background-attachment: fixed; + box-sizing: border-box; + min-height: calc(100vh - 412.767px); +} +.box-links .uk-card-header:hover { + text-decoration: underline; + text-decoration-color: currentcolor; + text-decoration-color: #90929D; +} + +.searchForm, .generalSearchForm, +.publicationsSearchForm, +.projectsSearchForm, .projectsTableSearchForm, +.organizationsSearchForm, +.datasetsSearchForm, +.softwareSearchForm, +.orpsSearchForm, +.datasourcesSearchForm, .compatibleDatasourcesSearchForm, .compatibleDatasourcesTableSearchForm, .datasourcesTableSearchForm, + .journalsSearchForm, .journalsTableSearchForm, +.entityRegistriesSearchForm, .entityRegistriesTableSearchForm { + + background: url('./Εxplore-sub.jpg') right !important; + +} + +.ask-explore.uk-grid-divider > :not(.uk-first-column)::before { + border-left: 1px solid var(--portal-main-color) ; +} + +.questions .tm-child-list-divider > ul > li:nth-child(n+2), .questions .uk-list-divider > li:nth-child(n+2) { + border-top: 1px solid #c5c5c5; +} + +.questions { + font-size: 15px; + font-weight: bold; + color: #4687E6; +} + +.uk-card-explore { + background-color: var(--portal-main-color); + color: #fff !important; +} + +.uk-card-explore .uk-h3 { + color: #fff !important; +} + +.uk-card-explore .uk-h6 a { + color: #fff !important; + text-decoration: underline; +} + +.uk-card-explore .uk-h5 { + color: #fff !important; + text-transform: uppercase; + font-size: 15px; + font-weight: bolder; +} + +.emphasis { + color: #000; + font-size: 17px; + font-weight: bold; +} + +.portal-color.emphasis { + color: #37C7E9; + font-size: 60px; + font-weight: 300; +} diff --git a/src/assets/arrow.svg b/src/assets/arrow.svg new file mode 100644 index 0000000..903449c --- /dev/null +++ b/src/assets/arrow.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/common-assets b/src/assets/common-assets new file mode 160000 index 0000000..031329d --- /dev/null +++ b/src/assets/common-assets @@ -0,0 +1 @@ +Subproject commit 031329d5ca890663a0911e3dac5649eb5c00c601 diff --git a/src/assets/eosc-custom.less b/src/assets/eosc-custom.less new file mode 100644 index 0000000..595cc0e --- /dev/null +++ b/src/assets/eosc-custom.less @@ -0,0 +1,173 @@ +/* EOSC */ +//@eosc-color: #3D4DB6; +//@eosc-light-color: #E80000; +//@eosc-dark-color: #AD0000; +//@eosc-secondary-color: #AD0000; +//@eosc-default-background: #F2F2F2; +// +////@global-primary-gradient: linear-gradient(104deg, @eosc-dark-color 0%, @eosc-light-color 100%); +//@global-primary-gradient: @eosc-light-color; +// +///* Button */ +//@button-primary-background: @eosc-color; +//@inverse-button-primary-background: @eosc-color; +//@button-primary-hover-background: @eosc-secondary-color; +//@button-primary-active-background: @eosc-secondary-color; +// +///* Background */ +//@background-primary-background: @eosc-color; +//@background-primary-background-gradient: none; +// +///* Text */ +//@text-primary-color: @eosc-color; +// +///* Label */ +//@label-secondary-color: @eosc-color; +// +///* General */ +//@general-tab-featured-tab: @eosc-color; +// +///* Landing */ +//@landing-portal-color: @eosc-color; +// +//.search-form { +// background-color: rgba(61,77, 182); +//} + +@font-url: e("/assets/media/fonts/inter/static/"); + +/* Inter */ + +@font-face { font-family: "inter"; font-style: normal; font-weight: 100; src: url("@{font-url}Inter-Thin-thin.ttf") format('truetype'); font-display: swap} +@font-face { font-family: "inter"; font-style: normal; font-weight: 300; src: url("@{font-url}Inter-Light.ttf") format('truetype'); font-display: swap} +@font-face { font-family: "inter"; font-style: normal; font-weight: 400; src: url("@{font-url}Inter-Regular.ttf") format('truetype'); font-display: swap} +@font-face { font-family: "inter"; font-style: normal; font-weight: 600; src: url("@{font-url}Inter-SemiBold.ttf") format('truetype'); font-display: swap} +@font-face { font-family: "inter"; font-style: normal; font-weight: 700; src: url("@{font-url}Inter-Bold.ttf") format('truetype'); font-display: swap} +@font-face { font-family: "inter"; font-style: normal; font-weight: 900; src: url("@{font-url}Inter-Black.ttf") format('truetype'); font-display: swap} + + +@global-font-family: 'Inter', sans-serif; + +@eosc-color: #010F87; +@eosc-light-color: #3D4DB6; +@eosc-dark-color: #000745; +//@eosc-secondary-color: #2255A4; +@eosc-secondary-color: #000745; +@eosc-default-background: #F2F2F2; + +@primary-color: @eosc-color; +@primary-light-color: @eosc-light-color; +@primary-dark-color: @eosc-dark-color; +@secondary-color: @eosc-secondary-color; + +@global-link-color: @eosc-color; + +@global-primary-background: @eosc-color; +@global-secondary-background: @eosc-secondary-color; + +@general-search-form-background: @eosc-color; +@base-body-background: @eosc-default-background; +//@global-header-height: 120px; +//.hook-search-misc() { +// .search-input { +// --search-input-border-radius: 8px; +// --search-input-icon-padding-vertical: 5px; +// --search-input-icon-color: @global-primary-background; +// } +//} +//.input-wrapper { +// &.search { +// --input-padding-vertical: 5px !important; +// } +//} + +//.image-front-topbar, .search-form, #main-menu .uk-navbar-container, #main-menu-small .uk-navbar-container { +.eosc-explore-back-search-bar { + //background: @global-primary-background; + //background: #000 url(https://search.marketplace.eosc-portal.eu/top-bar-bg.d5173dd5fee84543.jpg) no-repeat !important; + background: #000 url(top-bar.svg) no-repeat !important; + position: relative; + height: 60px; +} + +#searchImage{ + background: url('https://marketplace.eosc-portal.eu/packs/media/images/eosc-logo-mono-65a4962b88cf1caa9e35838e33022ca8.png') no-repeat center left; + width: 203px; + height: 69px; + background-size: 203px 79px; +} + +.search-results-container { + background-color: white; + border-radius: 25px; +} + +.uk-button-primary { + background-image: none; +} +// +//.contentbox { +// display: block; +// position: relative; +//} +// +//.contentbox > div { +// width: 58%; +// display: flex; +// flex-direction: column; +// justify-content: center; +//} +// +//.contentbox > div > div { +// width: 90%; +//} +// +//aside { +// background: transparent; +// position: absolute; +// top: -25px; +// right: -100px; +// width: 68%; +// +// display: block; +//} +// +//.contentbox img { +// max-width: 100%; +// min-width: 45%; +// height: auto; +//} +// +//@media (max-width: 576px) { +// .contentbox { +// display: flex; +// flex-direction: column-reverse; +// } +//} +// +//@media (max-width: 991px) { +// .contentbox { +// flex-direction: column; +// align-items: normal; +// } +//} +// +//@media (max-width: 1120px) { +// .contentbox > div { +// width: 100%; +// } +//} +// +//@media (max-width: 576px) { +// .contentbox > div > div { +// width: 100%; +// } +//} +// +//@media (max-width: 576px) { +// .contentbox aside { +// position: relative; +// width: 100%; +// right: auto; +// } +//} \ No newline at end of file diff --git a/src/assets/graph.svg b/src/assets/graph.svg new file mode 100644 index 0000000..d94ad1a --- /dev/null +++ b/src/assets/graph.svg @@ -0,0 +1 @@ +graph \ No newline at end of file diff --git a/src/assets/home.jpg b/src/assets/home.jpg new file mode 100644 index 0000000..b0fae78 Binary files /dev/null and b/src/assets/home.jpg differ diff --git a/src/assets/link.svg b/src/assets/link.svg new file mode 100644 index 0000000..d8e54c3 --- /dev/null +++ b/src/assets/link.svg @@ -0,0 +1 @@ +Asset 82 \ No newline at end of file diff --git a/src/assets/media/fonts/inter/Inter-VariableFont_slnt,wght.ttf b/src/assets/media/fonts/inter/Inter-VariableFont_slnt,wght.ttf new file mode 100644 index 0000000..ec3164e Binary files /dev/null and b/src/assets/media/fonts/inter/Inter-VariableFont_slnt,wght.ttf differ diff --git a/src/assets/media/fonts/inter/OFL.txt b/src/assets/media/fonts/inter/OFL.txt new file mode 100644 index 0000000..b525cbf --- /dev/null +++ b/src/assets/media/fonts/inter/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2020 The Inter Project Authors (https://github.com/rsms/inter) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/src/assets/media/fonts/inter/README.txt b/src/assets/media/fonts/inter/README.txt new file mode 100644 index 0000000..3078f19 --- /dev/null +++ b/src/assets/media/fonts/inter/README.txt @@ -0,0 +1,72 @@ +Inter Variable Font +=================== + +This download contains Inter as both a variable font and static fonts. + +Inter is a variable font with these axes: + slnt + wght + +This means all the styles are contained in a single file: + Inter-VariableFont_slnt,wght.ttf + +If your app fully supports variable fonts, you can now pick intermediate styles +that aren’t available as static fonts. Not all apps support variable fonts, and +in those cases you can use the static font files for Inter: + static/Inter-Thin.ttf + static/Inter-ExtraLight.ttf + static/Inter-Light.ttf + static/Inter-Regular.ttf + static/Inter-Medium.ttf + static/Inter-SemiBold.ttf + static/Inter-Bold.ttf + static/Inter-ExtraBold.ttf + static/Inter-Black.ttf + +Get started +----------- + +1. Install the font files you want to use + +2. Use your app's font picker to view the font family and all the +available styles + +Learn more about variable fonts +------------------------------- + + https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts + https://variablefonts.typenetwork.com + https://medium.com/variable-fonts + +In desktop apps + + https://theblog.adobe.com/can-variable-fonts-illustrator-cc + https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts + +Online + + https://developers.google.com/fonts/docs/getting_started + https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide + https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts + +Installing fonts + + MacOS: https://support.apple.com/en-us/HT201749 + Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux + Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows + +Android Apps + + https://developers.google.com/fonts/docs/android + https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts + +License +------- +Please read the full license text (OFL.txt) to understand the permissions, +restrictions and requirements for usage, redistribution, and modification. + +You can use them in your products & projects – print or digital, +commercial or otherwise. + +This isn't legal advice, please consider consulting a lawyer and see the full +license for all details. diff --git a/src/assets/media/fonts/inter/static/Inter-Black.ttf b/src/assets/media/fonts/inter/static/Inter-Black.ttf new file mode 100644 index 0000000..5aecf7d Binary files /dev/null and b/src/assets/media/fonts/inter/static/Inter-Black.ttf differ diff --git a/src/assets/media/fonts/inter/static/Inter-Bold.ttf b/src/assets/media/fonts/inter/static/Inter-Bold.ttf new file mode 100644 index 0000000..8e82c70 Binary files /dev/null and b/src/assets/media/fonts/inter/static/Inter-Bold.ttf differ diff --git a/src/assets/media/fonts/inter/static/Inter-ExtraBold.ttf b/src/assets/media/fonts/inter/static/Inter-ExtraBold.ttf new file mode 100644 index 0000000..cb4b821 Binary files /dev/null and b/src/assets/media/fonts/inter/static/Inter-ExtraBold.ttf differ diff --git a/src/assets/media/fonts/inter/static/Inter-ExtraLight.ttf b/src/assets/media/fonts/inter/static/Inter-ExtraLight.ttf new file mode 100644 index 0000000..64aee30 Binary files /dev/null and b/src/assets/media/fonts/inter/static/Inter-ExtraLight.ttf differ diff --git a/src/assets/media/fonts/inter/static/Inter-Light.ttf b/src/assets/media/fonts/inter/static/Inter-Light.ttf new file mode 100644 index 0000000..9e265d8 Binary files /dev/null and b/src/assets/media/fonts/inter/static/Inter-Light.ttf differ diff --git a/src/assets/media/fonts/inter/static/Inter-Medium.ttf b/src/assets/media/fonts/inter/static/Inter-Medium.ttf new file mode 100644 index 0000000..b53fb1c Binary files /dev/null and b/src/assets/media/fonts/inter/static/Inter-Medium.ttf differ diff --git a/src/assets/media/fonts/inter/static/Inter-Regular.ttf b/src/assets/media/fonts/inter/static/Inter-Regular.ttf new file mode 100644 index 0000000..8d4eebf Binary files /dev/null and b/src/assets/media/fonts/inter/static/Inter-Regular.ttf differ diff --git a/src/assets/media/fonts/inter/static/Inter-SemiBold.ttf b/src/assets/media/fonts/inter/static/Inter-SemiBold.ttf new file mode 100644 index 0000000..c6aeeb1 Binary files /dev/null and b/src/assets/media/fonts/inter/static/Inter-SemiBold.ttf differ diff --git a/src/assets/media/fonts/inter/static/Inter-Thin.ttf b/src/assets/media/fonts/inter/static/Inter-Thin.ttf new file mode 100644 index 0000000..7aed55d Binary files /dev/null and b/src/assets/media/fonts/inter/static/Inter-Thin.ttf differ diff --git a/src/assets/numbers_background_pattern.svg b/src/assets/numbers_background_pattern.svg new file mode 100644 index 0000000..115b87c --- /dev/null +++ b/src/assets/numbers_background_pattern.svg @@ -0,0 +1 @@ +Asset 1 \ No newline at end of file diff --git a/src/assets/openaire-theme b/src/assets/openaire-theme new file mode 160000 index 0000000..ac458b5 --- /dev/null +++ b/src/assets/openaire-theme @@ -0,0 +1 @@ +Subproject commit ac458b5a6d156167d7b6c9005ef1f9cfac75d3ae diff --git a/src/assets/portal-custom.css b/src/assets/portal-custom.css new file mode 100644 index 0000000..6dc0cec --- /dev/null +++ b/src/assets/portal-custom.css @@ -0,0 +1,75 @@ +/*new theme */ +:root { + --primary-color: #E80000; + /*buttons*/ + /*--button-primary-background: var(--primary-color);*/ + /*--button-primary-background-image: linear-gradient(104deg, var(--explore-dark-color) 0%, var(--explore-light-color) 100%);*/ + + /*backgrounds*/ + /*--background-primary:var(--explore-color);*/ + /*--background-primary-image:none;*/ + /*--background-secondary: var(--grey-color);*/ + /*--background-secondary-image:none;*/ + + /*fonts*/ + /*--text-primary-color: var(--explore-color);*/ + /*--text-gradient-color: linear-gradient(110deg, var(--explore-dark-color) 0%, var(--explore-light-color) 100%);*/ + + /* Label */ + /*--label-secondary: var(--explore-color);*/ + + /*slider*/ + /*--slider-dot-background: rgba(var(--explore-color-rgb), 0.5);*/ + /*--slider-dot-active-background: var(--explore-color);*/ +} +.graph-background { + background-size: cover !important; + padding-bottom: 100px; + background-color: #FAFAFA !important; + background: var(--graph-background); +} +.mainPageSearchForm{ + background-color: white !important; + background-image: none !important; + margin-bottom: 20px; + +} + +.searchForm, .generalSearchForm, +.publicationsSearchForm, +.projectsSearchForm, .projectsTableSearchForm, +.organizationsSearchForm, +.datasetsSearchForm, +.softwareSearchForm, +.orpsSearchForm, +.datasourcesSearchForm, .compatibleDatasourcesSearchForm, .compatibleDatasourcesTableSearchForm, .datasourcesTableSearchForm, + .journalsSearchForm, .journalsTableSearchForm, +.entityRegistriesSearchForm, .entityRegistriesTableSearchForm { + + background-color: white !important; + background-image: none !important; +} + +.explorePanelBackground { + background: transparent linear-gradient(133deg, #F5F5F5 0%, #D8D8D8 100%) 0 0 no-repeat padding-box; +} + +.explorePanelBackground .uk-grid-divider > :not(.uk-first-column)::before { + border-left: 1px solid rgba(0, 0, 0, .2); +} + +.explorePanelBackground .uk-breadcrumb > :nth-child(n+2):not(.uk-first-column)::before { + color: #bfbfbf; +} + +.numbers-background { + background: transparent url('numbers_background_pattern.svg') repeat-x center bottom; +} +.number { + color: #1d1d1d; +} + +.search-form { + background-color: inherit !important; + background-image: none !important; +} \ No newline at end of file diff --git a/src/assets/share.svg b/src/assets/share.svg new file mode 100644 index 0000000..f6c165b --- /dev/null +++ b/src/assets/share.svg @@ -0,0 +1 @@ +Asset 83 \ No newline at end of file diff --git a/src/assets/sitemap.xml b/src/assets/sitemap.xml new file mode 100644 index 0000000..fd72dfa --- /dev/null +++ b/src/assets/sitemap.xml @@ -0,0 +1,88 @@ + + + + + weekly + 0.5 + + + + weekly + 0.5 + + + + weekly + 0.5 + + + + weekly + 0.5 + + + + weekly + 0.5 + + + + weekly + 0.5 + + + + weekly + 0.5 + + + + weekly + 0.5 + + + + weekly + 0.5 + + + + weekly + 0.5 + + + + weekly + 0.5 + + + + weekly + 0.5 + + + + weekly + 0.5 + + + + weekly + 0.5 + + + + weekly + 0.5 + + + + weekly + 0.5 + + + + weekly + 0.5 + + diff --git a/src/assets/top-bar.svg b/src/assets/top-bar.svg new file mode 100644 index 0000000..016f84e --- /dev/null +++ b/src/assets/top-bar.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/beta/index.html b/src/beta/index.html new file mode 100644 index 0000000..1dc5df1 --- /dev/null +++ b/src/beta/index.html @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + EOSC Explore + + +
DEMO INSTANCE
+
+ + + +
+ + +
+ + +
+ + + + diff --git a/src/beta/robots.txt b/src/beta/robots.txt new file mode 100644 index 0000000..c6742d8 --- /dev/null +++ b/src/beta/robots.txt @@ -0,0 +1,2 @@ +User-Agent: * +Disallow: / diff --git a/src/environments/environment-aggregator.ts b/src/environments/environment-aggregator.ts new file mode 100644 index 0000000..ee0cf87 --- /dev/null +++ b/src/environments/environment-aggregator.ts @@ -0,0 +1,63 @@ +export const portalProperties = { + aggregator: "canada", + title: "{Title}", + logoPath: "assets/logo.png", + sectionFooter: +` +
+
+
{This is Footer section}
+
+
+
+
+ + + + + + + + +   + + + + + + + + + + +  Unless otherwise indicated, all materials created by OpenAIRE are licenced under CC ATTRIBUTION 4.0 INTERNATIONAL LICENSE.
+
+
+ +
+
+
+
+`, + showNumbersInHhomePage:false, + searchFormSection: `
{Search Form Section}
`, + homeSectionOne: `
{This is section One}
`, + homeSectionTwo: `
{This is section Two}
`, + entities:{ + publication:{isEnabled:true,simpleSearchPage:true,advancedSearchPage:true}, + dataset:{isEnabled:true,simpleSearchPage:true,advancedSearchPage:true}, + software:{isEnabled:true,simpleSearchPage:true,advancedSearchPage:true}, + other:{isEnabled:true,simpleSearchPage:true,advancedSearchPage:true}, + datasource:{isEnabled:true,simpleSearchPage:true,advancedSearchPage:true}, + organization:{isEnabled:true,simpleSearchPage:true,advancedSearchPage:true}, + project:{isEnabled:true,simpleSearchPage:true,advancedSearchPage:true}}, + searchServiceUrl:"" + +}; diff --git a/src/environments/environment.beta.ts b/src/environments/environment.beta.ts new file mode 100644 index 0000000..886615a --- /dev/null +++ b/src/environments/environment.beta.ts @@ -0,0 +1,122 @@ +// The file contents for the current environment will overwrite these during build. +// The build system defaults to the dev environment which uses `environment.ts`, but if you do +// `ng build --env=prod` then `environment.prod.ts` will be used instead. +// The eoscInfo of which env maps to which file can be found in `.angular-cli.json`. + +import {EnvProperties} from "../app/openaireLibrary/utils/properties/env-properties"; + +export let properties: EnvProperties = { + environment: "beta", + adminToolsPortalType: "eosc", + dashboard: "eosc", + enablePiwikTrack: true, + useCache: false, + useLongCache: true, + showAddThis: true, + enableEoscDataTransfer: true, + framesAPIURL: "https://beta.openaire.eu/stats3/", + statisticsAPIURL: "https://beta.services.openaire.eu/stats-api/", + statisticsFrameAPIURL: "https://beta.openaire.eu/stats/", + statisticsFrameNewAPIURL: "https://beta.services.openaire.eu/stats-tool/", + bipFrameAPIURL: "https://bip.imsi.athenarc.gr/api/impact-chart?id=", + useNewStatistisTool: true, + claimsAPIURL: "https://beta.services.openaire.eu/claims/rest/claimsService/", + searchAPIURLLAst: "https://beta.services.openaire.eu/search/v2/api/", + searchResourcesAPIURL: "https://beta.services.openaire.eu/search/v2/api/resources", + openCitationsAPIURL: "https://services.openaire.eu/opencitations/getCitations?id=", + csvAPIURL: "https://services.openaire.eu/search/v2/api/reports", + searchCrossrefAPIURL: "https://api.crossref.org/works", + searchDataciteAPIURL: "https://api.datacite.org/works", + searchOrcidURL: "https://pub.orcid.org/v2.1/", + orcidURL: "https://orcid.org/", + doiURL: "https://doi.org/", + pmcURL: "http://europepmc.org/articles/", + pmidURL: "https://www.ncbi.nlm.nih.gov/pubmed/", + handleURL: "http://hdl.handle.net/", + cordisURL: "http://cordis.europa.eu/projects/", + openDoarURL: "http://v2.sherpa.ac.uk/id/repository/", + r3DataURL: "http://service.re3data.org/repository/", + fairSharingURL: "https://fairsharing.org/", + eoscMarketplaceURL: "https://marketplace.eosc-portal.eu/services/", + sherpaURL: "http://sherpa.ac.uk/romeo/issn/", + sherpaURLSuffix: "/", + zenodo: "https://zenodo.org/", + openAccess: "https://www.openaire.eu/support/faq#article-id-234", + openAccessRepo: "https://www.openaire.eu/support/faq#article-id-310", + fp7Guidlines: "https://www.openaire.eu/open-access-in-fp7-seventh-research-framework-programme", + h2020Guidlines: "https://www.openaire.eu/oa-publications/h2020/open-access-in-horizon-2020", + ercGuidlines: "http://erc.europa.eu/sites/default/files/document/file/ERC_Open_Access_Guidelines-revised_2014.pdf", + helpdesk: "https://www.openaire.eu/support/helpdesk", + helpdeskEmail: "helpdesk@openaire.eu", + utilsService: "https://explore.openaire.eu/utils-service", + vocabulariesAPI: "https://services.openaire.eu/provision/mvc/vocabularies/", + piwikBaseUrl: "https://analytics.openaire.eu/piwik.php?idsite=", + piwikSiteId: "594", + loginUrl: "https://services.openaire.eu/login-service/openid_connect_login", + userInfoUrl: "https://services.openaire.eu/login-service/userInfo", + logoutUrl: "https://services.openaire.eu/login-service/openid_logout", + cookieDomain: ".openaire.eu", + feedbackmail: "feedback@openaire.eu", + cacheUrl: "https://explore.openaire.eu/cache/get?url=", + datasourcesAPI: "https://services.openaire.eu/openaire/ds/search/", + adminToolsCommunity: "eosc", + adminToolsAPIURL: "https://services.openaire.eu/uoa-admin-tools/", + useHelpTexts: false, + contextsAPI: "https://services.openaire.eu/openaire/context", + communityAPI: "https://services.openaire.eu/openaire/community/", + csvLimit: 2000, + pagingLimit: 20, + resultsPerPage: 10, + "baseLink": "/", + "domain": "https://explore.eosc-portal.eu", + searchLinkToResult: "/search/result?id=", + searchLinkToPublication: "/search/publication?articleId=", + searchLinkToProject: "/search/project?projectId=", + searchLinkToDataProvider: "/search/dataprovider?datasourceId=", + searchLinkToService: "/search/service?serviceId=", + searchLinkToDataset: "/search/dataset?datasetId=", + searchLinkToSoftwareLanding: "/search/software?softwareId=", + searchLinkToOrp: "/search/other?orpId=", + searchLinkToOrganization: "/search/organization?organizationId=", + searchLinkToPublications: "/search/find/publications", + searchLinkToDataProviders: "/search/find/dataproviders", + searchLinkToServices: "/search/find/services", + searchLinkToProjects: "/search/find/projects", + searchLinkToDatasets: "/search/find/datasets", + searchLinkToSoftware: "/search/find/software", + searchLinkToOrps: "/search/find/other", + searchLinkToOrganizations: "/search/find/organizations", + searchLinkToCompatibleDataProviders: "/search/content-providers", + searchLinkToEntityRegistriesDataProviders: "/search/entity-registries", + searchLinkToJournals: "/search/journals", + searchLinkToResults: "/search/find/research-outcomes", + searchLinkToAdvancedPublications: "/search/advanced/publications", + searchLinkToAdvancedProjects: "/search/advanced/projects", + searchLinkToAdvancedDatasets: "/search/advanced/datasets", + searchLinkToAdvancedSoftware: "/search/advanced/software", + searchLinkToAdvancedOrps: "/search/advanced/other", + searchLinkToAdvancedDataProviders: "/search/advanced/dataproviders", + searchLinkToAdvancedServices: "/search/advanced/services", + searchLinkToAdvancedOrganizations: "/search/advanced/organizations", + searchLinkToAdvancedResults: "/search/advanced/research-outcomes", + errorLink: "/error", + lastIndexInformationLink: "https://beta.openaire.eu/aggregation-and-content-provision-workflows", + showLastIndexInformationLink: true, + widgetLink: "https://beta.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=", + claimsInformationLink: "https://www.openaire.eu/linking", + lastIndexUpdate: "2020-06-15", + indexInfoAPI: "https://beta.services.openaire.eu/openaire/info/", + depositLearnHowPage: "/participate/deposit/learn-how", + depositSearchPage: "/participate/deposit/search", + altMetricsAPIURL: "https://api.altmetric.com/v1/doi/", + reCaptchaSiteKey: null, + footerGrantText: "", + eoscDataTransferAPI : "https://eosc-data-transfer.vm.fedcloud.eu", + eoscDataTransferLoginUrl:"https://explore.eosc-portal.eu/egi-login-service/openid_connect_login", + eoscDataTransferDestinations : [ + {label: "EGI dCache (dcache-demo.desy.de)", value: + {label : "EGI dCache (dcache-demo.desy.de)", url: "https://dcache-demo.desy.de:2443", id: "dcache", + webpage : "https://dcache-demo.desy.de", defaultFolder: "/", hasBrowse: true, + loginUrl : "https://explore.eosc-portal.eu/egi-login-service/openid_connect_login", cookieName: "EGIAccessToken"} + }] +}; diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts new file mode 100644 index 0000000..2403203 --- /dev/null +++ b/src/environments/environment.prod.ts @@ -0,0 +1,127 @@ +// The file contents for the current environment will overwrite these during build. +// The build system defaults to the dev environment which uses `environment.ts`, but if you do +// `ng build --env=prod` then `environment.prod.ts` will be used instead. +// The eoscInfo of which env maps to which file can be found in `.angular-cli.json`. + +import {EnvProperties} from "../app/openaireLibrary/utils/properties/env-properties"; + +export let properties: EnvProperties = { + environment: "production", + adminToolsPortalType: "eosc", + dashboard: "eosc", + enablePiwikTrack: true, + useCache: false, + useLongCache: true, + showAddThis: true, + enableEoscDataTransfer: true, + framesAPIURL: "https://www.openaire.eu/stats3/", + statisticsAPIURL: "https://beta.services.openaire.eu/stats-api/", + statisticsFrameAPIURL: "https://www.openaire.eu/stats/", + statisticsFrameNewAPIURL: "https://services.openaire.eu/stats-tool/", + bipFrameAPIURL: "https://bip.imsi.athenarc.gr/api/impact-chart?id=", + useNewStatistisTool: true, + claimsAPIURL: "https://services.openaire.eu/claims/rest/claimsService/", + searchAPIURLLAst: "https://services.openaire.eu/search/v2/api/", + searchResourcesAPIURL: "https://services.openaire.eu/search/v2/api/resources", + openCitationsAPIURL: "https://services.openaire.eu/opencitations/getCitations?id=", + csvAPIURL: "https://services.openaire.eu/search/v2/api/reports", + searchCrossrefAPIURL: "https://api.crossref.org/works", + searchDataciteAPIURL: "https://api.datacite.org/works", + searchOrcidURL: "https://pub.orcid.org/v2.1/", + orcidURL: "https://orcid.org/", + doiURL: "https://doi.org/", + pmcURL: "http://europepmc.org/articles/", + pmidURL: "https://www.ncbi.nlm.nih.gov/pubmed/", + handleURL: "http://hdl.handle.net/", + cordisURL: "http://cordis.europa.eu/projects/", + openDoarURL: "http://v2.sherpa.ac.uk/id/repository/", + r3DataURL: "http://service.re3data.org/repository/", + fairSharingURL: "https://fairsharing.org/", + eoscMarketplaceURL: "https://marketplace.eosc-portal.eu/services/", + sherpaURL: "http://sherpa.ac.uk/romeo/issn/", + sherpaURLSuffix: "/", + zenodo: "https://zenodo.org/", + openAccess: "https://www.openaire.eu/support/faq#article-id-234", + openAccessRepo: "https://www.openaire.eu/support/faq#article-id-310", + fp7Guidlines: "https://www.openaire.eu/open-access-in-fp7-seventh-research-framework-programme", + h2020Guidlines: "https://www.openaire.eu/oa-publications/h2020/open-access-in-horizon-2020", + ercGuidlines: "http://erc.europa.eu/sites/default/files/document/file/ERC_Open_Access_Guidelines-revised_2014.pdf", + helpdesk: "https://www.openaire.eu/support/helpdesk", + helpdeskEmail: "helpdesk@openaire.eu", + utilsService: "https://explore.openaire.eu/utils-service", + vocabulariesAPI: "https://services.openaire.eu/provision/mvc/vocabularies/", + piwikBaseUrl: "https://analytics.openaire.eu/piwik.php?idsite=", + piwikSiteId: "594", + loginUrl: "https://services.openaire.eu/login-service/openid_connect_login", + userInfoUrl: "https://services.openaire.eu/login-service/userInfo", + logoutUrl: "https://services.openaire.eu/login-service/openid_logout", + cookieDomain: ".openaire.eu", + feedbackmail: "feedback@openaire.eu", + cacheUrl: "https://explore.openaire.eu/cache/get?url=", + datasourcesAPI: "https://services.openaire.eu/openaire/ds/search/", + adminToolsCommunity: "eosc", + adminToolsAPIURL: "https://services.openaire.eu/uoa-admin-tools/", + useHelpTexts:false, + contextsAPI: "https://services.openaire.eu/openaire/context", + communityAPI: "https://services.openaire.eu/openaire/community/", + csvLimit: 2000, + pagingLimit: 20, + resultsPerPage: 10, + "baseLink" : "/", + "domain": "https://explore.eosc-portal.eu", + searchLinkToResult: "/search/result?id=", + searchLinkToPublication: "/search/publication?articleId=", + searchLinkToProject: "/search/project?projectId=", + searchLinkToDataProvider: "/search/dataprovider?datasourceId=", + searchLinkToService: "/search/service?serviceId=", + searchLinkToDataset: "/search/dataset?datasetId=", + searchLinkToSoftwareLanding: "/search/software?softwareId=", + searchLinkToOrp: "/search/other?orpId=", + searchLinkToOrganization: "/search/organization?organizationId=", + searchLinkToPublications: "/search/find/publications", + searchLinkToDataProviders: "/search/find/dataproviders", + searchLinkToServices: "/search/find/services", + searchLinkToProjects: "/search/find/projects", + searchLinkToDatasets: "/search/find/datasets", + searchLinkToSoftware: "/search/find/software", + searchLinkToOrps: "/search/find/other", + searchLinkToOrganizations: "/search/find/organizations", + searchLinkToCompatibleDataProviders: "/search/content-providers", + searchLinkToEntityRegistriesDataProviders: "/search/entity-registries", + searchLinkToJournals: "/search/journals", + searchLinkToResults: "/search/find/research-outcomes", + searchLinkToAdvancedPublications: "/search/advanced/publications", + searchLinkToAdvancedProjects: "/search/advanced/projects", + searchLinkToAdvancedDatasets: "/search/advanced/datasets", + searchLinkToAdvancedSoftware: "/search/advanced/software", + searchLinkToAdvancedOrps: "/search/advanced/other", + searchLinkToAdvancedDataProviders: "/search/advanced/dataproviders", + searchLinkToAdvancedServices: "/search/advanced/services", + searchLinkToAdvancedOrganizations: "/search/advanced/organizations", + searchLinkToAdvancedResults: "/search/advanced/research-outcomes", + errorLink: "/error", + lastIndexInformationLink: "https://www.openaire.eu/aggregation-and-content-provision-workflows", + showLastIndexInformationLink: true, + widgetLink: "https://www.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=", + claimsInformationLink: "https://www.openaire.eu/linking", + lastIndexUpdate: "2020-06-15", + indexInfoAPI: "https://services.openaire.eu/openaire/info/", + depositLearnHowPage: "/participate/deposit/learn-how", + depositSearchPage: "/participate/deposit/search", + altMetricsAPIURL: "https://api.altmetric.com/v1/doi/", + reCaptchaSiteKey: null, + footerGrantText : "", + eoscDataTransferAPI : "https://eosc-data-transfer.vm.fedcloud.eu", + eoscDataTransferLoginUrl:"https://explore.eosc-portal.eu/egi-login-service/openid_connect_login", + eoscDataTransferDestinations : [ + {label: "dcache", value: + {label : "EGI dCache", id: "dcache", + defaultFolder: "/", auth: "token"} + }, + {label: "FTP", value: + {label : "FTP", id: "ftp", auth: "password"} + }, + {label: "S3", value: + {label : "S3", id: "s3", auth: "keys"} + }] +}; diff --git a/src/environments/environment.ts b/src/environments/environment.ts new file mode 100644 index 0000000..2b26d4a --- /dev/null +++ b/src/environments/environment.ts @@ -0,0 +1,149 @@ +// The file contents for the current environment will overwrite these during build. +// The build system defaults to the dev environment which uses `environment.ts`, but if you do +// `ng build --env=prod` then `environment.prod.ts` will be used instead. +// The eoscInfo of which env maps to which file can be found in `.angular-cli.json`. + +import {EnvProperties} from "../app/openaireLibrary/utils/properties/env-properties"; + +export let properties: EnvProperties = { + environment: "development", + adminToolsPortalType: "eosc", + dashboard: "eosc", + enablePiwikTrack: false, + useCache: false, + useLongCache: false, + showAddThis: true, + enableEoscDataTransfer: true, + framesAPIURL: "https://beta.openaire.eu/stats3/", + statisticsAPIURL: "https://beta.services.openaire.eu/stats-api/", + statisticsFrameAPIURL: "https://beta.openaire.eu/stats/", + statisticsFrameNewAPIURL: "https://beta.services.openaire.eu/stats-tool/", + bipFrameAPIURL: "https://bip.imsi.athenarc.gr/api/impact-chart?id=", + useNewStatistisTool: true, + claimsAPIURL: "http://dl170.madgik.di.uoa.gr:8180/dnet-claims-service-2.0.0-SNAPSHOT/rest/claimsService/", + searchAPIURLLAst: "http://beta.services.openaire.eu/search/v2/api/", + searchResourcesAPIURL: "http://beta.services.openaire.eu/search/v2/api/resources", + openCitationsAPIURL: "https://services.openaire.eu/opencitations/getCitations?id=", + csvAPIURL: "https://beta.services.openaire.eu/search/v2/api/reports", + searchCrossrefAPIURL: "https://api.crossref.org/works", + searchDataciteAPIURL: "https://api.datacite.org/works", + searchOrcidURL: "https://pub.orcid.org/v2.1/", + orcidURL: "https://orcid.org/", + doiURL: "https://dx.doi.org/", + pmcURL: "http://europepmc.org/articles/", + pmidURL: "https://www.ncbi.nlm.nih.gov/pubmed/", + handleURL: "http://hdl.handle.net/", + cordisURL: "http://cordis.europa.eu/projects/", + openDoarURL: "http://v2.sherpa.ac.uk/id/repository/", + r3DataURL: "http://service.re3data.org/repository/", + fairSharingURL: "https://fairsharing.org/", + eoscMarketplaceURL: "https://marketplace.eosc-portal.eu/services/", + sherpaURL: "http://sherpa.ac.uk/romeo/issn/", + sherpaURLSuffix: "/", + zenodo: "https://zenodo.org/", + openAccess: "https://www.openaire.eu/support/faq#article-id-234", + openAccessRepo: "https://www.openaire.eu/support/faq#article-id-310", + fp7Guidlines: "https://www.openaire.eu/open-access-in-fp7-seventh-research-framework-programme", + h2020Guidlines: "https://www.openaire.eu/oa-publications/h2020/open-access-in-horizon-2020", + ercGuidlines: "http://erc.europa.eu/sites/default/files/document/file/ERC_Open_Access_Guidelines-revised_2014.pdf", + helpdesk: "https://www.openaire.eu/support/helpdesk", + helpdeskEmail: "helpdesk@openaire.eu", + utilsService: "http://dl170.madgik.di.uoa.gr:8000", + vocabulariesAPI: "https://dev-openaire.d4science.org/provision/mvc/vocabularies/", + piwikBaseUrl: "https://analytics.openaire.eu/piwik.php?idsite=", + piwikSiteId: "6", + loginUrl: "http://mpagasas.di.uoa.gr:19080/login-service/openid_connect_login", + userInfoUrl: "http://mpagasas.di.uoa.gr:19080/login-service/userInfo", + logoutUrl: "http://mpagasas.di.uoa.gr:19080/login-service/openid_logout", + cookieDomain: ".di.uoa.gr", + feedbackmail: "kostis30fylloy@gmail.com", + cacheUrl: "http://dl170.madgik.di.uoa.gr:3000/get?url=", + adminToolsCommunity: "aggregator", + adminToolsAPIURL: "http://duffy.di.uoa.gr:19280/uoa-admin-tools/", + useHelpTexts: false, + datasourcesAPI: "https://beta.services.openaire.eu/openaire/ds/search/", + contextsAPI: "https://dev-openaire.d4science.org/openaire/context", + communityAPI: "https://dev-openaire.d4science.org/openaire/community/", + csvLimit: 2000, + pagingLimit: 20, + resultsPerPage: 10, + "baseLink" : "", + "domain":"https://explore.eosc-portal.eu", + searchLinkToResult: "/search/result?id=", + searchLinkToPublication: "/search/publication?articleId=", + searchLinkToProject: "/search/project?projectId=", + searchLinkToDataProvider: "/search/dataprovider?datasourceId=", + searchLinkToService: "/search/service?serviceId=", + searchLinkToDataset: "/search/dataset?datasetId=", + searchLinkToSoftwareLanding: "/search/software?softwareId=", + searchLinkToOrp: "/search/other?orpId=", + searchLinkToOrganization: "/search/organization?organizationId=", + searchLinkToPublications: "/search/find/publications", + searchLinkToDataProviders: "/search/find/dataproviders", + searchLinkToServices: "/search/find/services", + searchLinkToProjects: "/search/find/projects", + searchLinkToDatasets: "/search/find/datasets", + searchLinkToSoftware: "/search/find/software", + searchLinkToOrps: "/search/find/other", + searchLinkToOrganizations: "/search/find/organizations", + searchLinkToCompatibleDataProviders: "/search/content-providers", + searchLinkToEntityRegistriesDataProviders: "/search/entity-registries", + searchLinkToJournals: "/search/journals", + searchLinkToResults: "/search/find/research-outcomes", + searchLinkToAdvancedPublications: "/search/advanced/publications", + searchLinkToAdvancedProjects: "/search/advanced/projects", + searchLinkToAdvancedDatasets: "/search/advanced/datasets", + searchLinkToAdvancedSoftware: "/search/advanced/software", + searchLinkToAdvancedOrps: "/search/advanced/other", + searchLinkToAdvancedDataProviders: "/search/advanced/dataproviders", + searchLinkToAdvancedServices: "/search/advanced/services", + searchLinkToAdvancedOrganizations: "/search/advanced/organizations", + searchLinkToAdvancedResults: "/search/advanced/research-outcomes", + errorLink: "/error", + lastIndexInformationLink: "https://www.openaire.eu/aggregation-and-content-provision-workflows", + showLastIndexInformationLink: true, + widgetLink: "https://beta.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=", + claimsInformationLink: "https://www.openaire.eu/linking-beta", + lastIndexUpdate: "2019-11-01", + indexInfoAPI: "https://beta.services.openaire.eu/openaire/info/", + depositLearnHowPage: "/participate/deposit/learn-how", + depositSearchPage: "/participate/deposit/search", + altMetricsAPIURL: "https://api.altmetric.com/v1/doi/", + reCaptchaSiteKey: null, + footerGrantText : "This OpenAIRE gateway is part of a project that has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreements No. 777541 and 101017452", + eoscDataTransferAPI : "https://eosc-data-transfer.test.fedcloud.eu", + eoscDataTransferLoginUrl:"http://rudie.di.uoa.gr:8580/openid_connect_login", + eoscDataTransferDestinations : [ + // {label: "dcache", value: + // {label : "EGI dCache", id: "dcache", + // auth: "token"} + // }, + // {label: "FTP", value: + // {label : "FTP", id: "ftp", auth: "password"} + // }, + // {label: "S3", value: + // {label : "S3", id: "s3", auth: "keys"} + // }] + + { + "kind": "StorageInfo", + "destination": "dcache", + // "id": "dcache", // + "description": "EGI dCache", + // "label": "EGI dCache", // + "authType": "token", + "canBrowse": true, + "transferWith": "EGI Data Transfer" + }, + { + "kind": "StorageInfo", + "destination": "s3", + // "id": "s3", // + "description": "Amazon S3 compatible object storage", + // "label": "Amazon S3 compatible object storage", // + "authType": "keys", + "canBrowse": true, + "transferWith": "EGI Data Transfer" + } +] +}; diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..508e1d9 --- /dev/null +++ b/src/index.html @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Search EOSC + + + +
+ + +
+ + +
+ + +
+ + + + diff --git a/src/karma.conf.js b/src/karma.conf.js new file mode 100644 index 0000000..594752a --- /dev/null +++ b/src/karma.conf.js @@ -0,0 +1,32 @@ +// Karma configuration file, see link for more information +// https://karma-runner.github.io/1.0/config/configuration-file.html + +module.exports = function (config) { + config.set({ + basePath: '', + frameworks: ['jasmine', '@angular-devkit/build-angular'], + plugins: [ + require('karma-jasmine'), + require('karma-chrome-launcher'), + require('karma-jasmine-html-reporter'), + require('karma-coverage-istanbul-reporter'), + require('@angular-devkit/build-angular/plugins/karma') + ], + client: { + clearContext: false // leave Jasmine Spec Runner output visible in browser + }, + coverageIstanbulReporter: { + dir: require('path').join(__dirname, '../coverage/aggregator'), + reports: ['html', 'lcovonly', 'text-summary'], + fixWebpackSourcePaths: true + }, + reporters: ['progress', 'kjhtml'], + port: 9876, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: true, + browsers: ['Chrome'], + singleRun: false, + restartOnFileChange: true + }); +}; diff --git a/src/main.server.ts b/src/main.server.ts new file mode 100644 index 0000000..d8775d6 --- /dev/null +++ b/src/main.server.ts @@ -0,0 +1,15 @@ +/*************************************************************************************************** + * Load `$localize` onto the global scope - used if i18n tags appear in Angular templates. +*/ +import '@angular/localize/init'; + +import { enableProdMode } from '@angular/core'; + +import {properties} from './environments/environment'; + +if (properties.environment !== "development") { + enableProdMode(); +} + +export { AppServerModule } from './app/app.server.module'; +export { renderModule } from '@angular/platform-server'; diff --git a/src/main.ts b/src/main.ts new file mode 100644 index 0000000..82a0683 --- /dev/null +++ b/src/main.ts @@ -0,0 +1,14 @@ +import { enableProdMode } from '@angular/core'; +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + +import { AppModule } from './app/app.module'; +import { properties } from './environments/environment'; + +if (properties.environment !== "development") { + enableProdMode(); +} + +document.addEventListener('DOMContentLoaded', () => { + platformBrowserDynamic().bootstrapModule(AppModule) + .catch(err => console.error(err)); +}); diff --git a/src/polyfills.ts b/src/polyfills.ts new file mode 100644 index 0000000..7e1f7ff --- /dev/null +++ b/src/polyfills.ts @@ -0,0 +1,57 @@ +/*************************************************************************************************** + * Load `$localize` onto the global scope - used if i18n tags appear in Angular templates. + */ +import '@angular/localize/init'; +/** + * This file includes polyfills needed by Angular and is loaded before the app. + * You can add your own extra polyfills to this file. + * + * This file is divided into 2 sections: + * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. + * 2. Application imports. Files imported after ZoneJS that should be loaded before your main + * file. + * + * The current setup is for so-called "evergreen" browsers; the last versions of browsers that + * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), + * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. + * + * Learn more in https://angular.io/guide/browser-support + */ + +/*************************************************************************************************** + * BROWSER POLYFILLS + */ + +/** + * By default, zone.js will patch all possible macroTask and DomEvents + * user can disable parts of macroTask/DomEvents patch by setting following flags + * because those flags need to be set before `zone.js` being loaded, and webpack + * will put import in the top of bundle, so user need to create a separate file + * in this directory (for example: zone-flags.ts), and put the following flags + * into that file, and then add the following code before importing zone.js. + * import './zone-flags.ts'; + * + * The flags allowed in zone-flags.ts are listed here. + * + * The following flags will work for all browsers. + * + * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame + * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick + * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames + * + * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js + * with the following flag, it will bypass `zone.js` patch for IE/Edge + * + * (window as any).__Zone_enable_cross_context_check = true; + * + */ + +/*************************************************************************************************** + * Zone JS is required by default for Angular itself. + */ +import 'zone.js'; // Included with Angular CLI. + + +/*************************************************************************************************** + * APPLICATION IMPORTS + */ diff --git a/src/prod/index.html b/src/prod/index.html new file mode 100644 index 0000000..4d1f6e5 --- /dev/null +++ b/src/prod/index.html @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + EOSC Explore + + +
+ + + +
+ + +
+ + +
+ + + + diff --git a/src/prod/robots.txt b/src/prod/robots.txt new file mode 100644 index 0000000..9cb9da7 --- /dev/null +++ b/src/prod/robots.txt @@ -0,0 +1,2 @@ +User-Agent: * + diff --git a/src/robots.txt b/src/robots.txt new file mode 100644 index 0000000..c6742d8 --- /dev/null +++ b/src/robots.txt @@ -0,0 +1,2 @@ +User-Agent: * +Disallow: / diff --git a/src/styles.less b/src/styles.less new file mode 100644 index 0000000..f476716 --- /dev/null +++ b/src/styles.less @@ -0,0 +1,13 @@ +///* You can add global styles to this file, and also import other style files */ +//@import "assets/openaire-theme/css/import.css"; +//@import "assets/common-assets/library.css"; +//@import "assets/portal-custom.css"; + +/* You can add global styles to this file, and also import other style files */ +@import "~src/assets/openaire-theme/less/_import"; +@import "~src/assets/common-assets/less/general"; +@import "~src/assets/common-assets/less/user"; +@import "~src/assets/common-assets/less/linking"; +@import "~src/assets/common-assets/less/landing"; +//@import "assets/portal-custom.css"; +@import "assets/eosc-custom"; \ No newline at end of file diff --git a/src/test.ts b/src/test.ts new file mode 100644 index 0000000..6b03dbe --- /dev/null +++ b/src/test.ts @@ -0,0 +1,22 @@ +// This file is required by karma.conf.js and loads recursively all the .spec and framework files + +import 'zone.js/testing'; +import { getTestBed } from '@angular/core/testing'; +import { + BrowserDynamicTestingModule, + platformBrowserDynamicTesting +} from '@angular/platform-browser-dynamic/testing'; + +declare const require: any; + +// First, initialize the Angular testing environment. +getTestBed().initTestEnvironment( + BrowserDynamicTestingModule, + platformBrowserDynamicTesting(), { + teardown: { destroyAfterEach: false } +} +); +// Then we find all the tests. +const context = require.context('./', true, /\.spec\.ts$/); +// And load the modules. +context.keys().map(context); diff --git a/src/tsconfig.app.json b/src/tsconfig.app.json new file mode 100644 index 0000000..f3a1b80 --- /dev/null +++ b/src/tsconfig.app.json @@ -0,0 +1,14 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/app", + "types": [] + }, + "files": [ + "main.ts", + "polyfills.ts" + ], + "include": [ + "src/**/*.d.ts" + ] +} diff --git a/src/tsconfig.server.json b/src/tsconfig.server.json new file mode 100644 index 0000000..39f85aa --- /dev/null +++ b/src/tsconfig.server.json @@ -0,0 +1,17 @@ +{ + "extends": "./tsconfig.app.json", + "compilerOptions": { + "outDir": "../out-tsc/app-server", + "target": "es2016", + "types": [ + "node" + ] + }, + "files": [ + "main.server.ts", + "../server.ts" + ], + "angularCompilerOptions": { + "entryModule": "./app/app.server.module#AppServerModule" + } +} diff --git a/src/tsconfig.spec.json b/src/tsconfig.spec.json new file mode 100644 index 0000000..de77336 --- /dev/null +++ b/src/tsconfig.spec.json @@ -0,0 +1,18 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/spec", + "types": [ + "jasmine", + "node" + ] + }, + "files": [ + "test.ts", + "polyfills.ts" + ], + "include": [ + "**/*.spec.ts", + "**/*.d.ts" + ] +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..fc8b4c1 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "baseUrl": "./", + "downlevelIteration": true, + "outDir": "./dist/out-tsc", + "sourceMap": true, + "declaration": false, + "module": "es2020", + "moduleResolution": "node", + "experimentalDecorators": true, + "importHelpers": true, + "target": "es2020", + "typeRoots": [ + "node_modules/@types" + ], + "lib": [ + "es2018", + "dom" + ] + } +}