[Graph]: Update trunk to angular 11. Delete branch from angular 11
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-graph-portal/trunk@61398 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
16fe768efa
commit
e22d4f1c95
|
@ -0,0 +1,11 @@
|
|||
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
|
||||
# For additional information regarding the format and rule options, please see:
|
||||
# https://github.com/browserslist/browserslist#queries
|
||||
#
|
||||
# For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed
|
||||
|
||||
> 0.5%
|
||||
last 2 versions
|
||||
Firefox ESR
|
||||
not dead
|
||||
not IE 9-11
|
25
README.md
25
README.md
|
@ -1,18 +1,24 @@
|
|||
# Graph Portal
|
||||
# Graph
|
||||
|
||||
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.3.0.
|
||||
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.3.10 and has been updated to 11.2.14.
|
||||
|
||||
## Install packages
|
||||
|
||||
Run npm install (maybe needs sudo), a script that will delete unused files from library will be run.
|
||||
|
||||
## Development server
|
||||
|
||||
Run `ng serve` for a dev server. Navigate to `http://localhost:4900/`. The app will automatically reload if you change any of the source files.
|
||||
Run `npm start` for a dev server. Navigate to `http://localhost:4900/`. The app will automatically reload if you change any of the source files.
|
||||
|
||||
## Code scaffolding
|
||||
## Build - CSR
|
||||
|
||||
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
|
||||
Use the `npm run build-dev` for a development build.<br>
|
||||
Use the `npm run build-beta` for a beta build.<br>
|
||||
Use the `npm run build-prod` for a production build.
|
||||
|
||||
## Build
|
||||
## Webpack Analyzer
|
||||
|
||||
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.
|
||||
In order to analyze bundle size you can run `npm run webpack-bundle-analyzer`
|
||||
|
||||
## Running unit tests
|
||||
|
||||
|
@ -21,8 +27,3 @@ Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.
|
|||
## Running end-to-end tests
|
||||
|
||||
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
|
||||
Before running the tests make sure you are serving the app via `ng serve`.
|
||||
|
||||
## Further help
|
||||
|
||||
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
|
||||
|
|
15
README.txt
15
README.txt
|
@ -1,15 +0,0 @@
|
|||
*******Useful project infrmation***********
|
||||
Project has 2 external folders. Check them using
|
||||
svn propget svn:externals ./
|
||||
|
||||
Above command should show the following:
|
||||
./src/app/openaireLibrary https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app
|
||||
./src/assets/common-assets https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/assets
|
||||
|
||||
After initial checkout, you may have to exlude ./src/app/openaireLibrary/app.* files in order the project to run properly.
|
||||
Exclude the files from your local copy, but keep them in the repository.
|
||||
|
||||
Use the following command, to exclude the files:
|
||||
cd ./src/app/openaireLibrary
|
||||
svn update --set-depth exclude ./app.*
|
||||
svn update --set-depth exclude ./dashboard
|
162
angular.json
162
angular.json
|
@ -1,21 +1,46 @@
|
|||
{
|
||||
"$schema": "./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json",
|
||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||
"version": 1,
|
||||
"newProjectRoot": "projects",
|
||||
"projects": {
|
||||
"graph-portal": {
|
||||
"graph": {
|
||||
"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": {
|
||||
"skipTests": true
|
||||
},
|
||||
"@schematics/angular:pipe": {
|
||||
"skipTests": true
|
||||
},
|
||||
"@schematics/angular:service": {
|
||||
"skipTests": true
|
||||
}
|
||||
},
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:browser",
|
||||
"options": {
|
||||
"outputPath": "dist",
|
||||
"aot": true,
|
||||
"outputPath": "dist/graph",
|
||||
"index": "src/index.html",
|
||||
"main": "src/main.ts",
|
||||
"tsConfig": "src/tsconfig.app.json",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "src/tsconfig.app.json",
|
||||
"assets": [
|
||||
"src/assets",
|
||||
"src/robots.txt",
|
||||
|
@ -33,45 +58,91 @@
|
|||
]
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"development": {
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"extractCss": true,
|
||||
"namedChunks": false,
|
||||
"aot": true,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": true,
|
||||
"fileReplacements": [
|
||||
"budgets": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.prod.ts"
|
||||
"type": "initial",
|
||||
"maximumWarning": "2mb",
|
||||
"maximumError": "5mb"
|
||||
},
|
||||
{
|
||||
"replace": "src/index.html",
|
||||
"with": "src/index.prod.html"
|
||||
},
|
||||
{
|
||||
"replace": "src/robots.txt",
|
||||
"with": "src/robots.prod.txt"
|
||||
"type": "anyComponentStyle",
|
||||
"maximumWarning": "6kb"
|
||||
}
|
||||
]
|
||||
},
|
||||
"beta": {
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.beta.ts"
|
||||
}
|
||||
],
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"extractCss": true,
|
||||
"namedChunks": false,
|
||||
"aot": true,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": true,
|
||||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "2mb",
|
||||
"maximumError": "5mb"
|
||||
},
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
"maximumWarning": "6kb"
|
||||
}
|
||||
]
|
||||
},
|
||||
"production": {
|
||||
"assets": [
|
||||
"src/assets",
|
||||
"src/sitemap.xml",
|
||||
{
|
||||
"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.beta.ts"
|
||||
"with": "src/environments/environment.prod.ts"
|
||||
}
|
||||
],
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"namedChunks": false,
|
||||
"aot": true,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": true,
|
||||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "2mb",
|
||||
"maximumError": "5mb"
|
||||
},
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
"maximumWarning": "6kb"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -80,46 +151,33 @@
|
|||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"options": {
|
||||
"browserTarget": "graph-portal:build"
|
||||
"browserTarget": "graph:build"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "graph-portal:build:production"
|
||||
},
|
||||
"beta": {
|
||||
"browserTarget": "graph-portal:build:beta"
|
||||
"browserTarget": "graph:build:production"
|
||||
}
|
||||
}
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "graph-portal:build"
|
||||
"browserTarget": "graph:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"main": "src/test.ts",
|
||||
"karmaConfig": "./karma.conf.js",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "src/tsconfig.spec.json",
|
||||
"scripts": [
|
||||
"node_modules/jquery/dist/jquery.js",
|
||||
"node_modules/datatables.net/js/jquery.dataTables.js",
|
||||
"node_modules/interactiveminingv3/assets/js/ResizeSensor.js",
|
||||
"node_modules/interactiveminingv3/assets/js/jquery.sticky-sidebar.js"
|
||||
],
|
||||
"karmaConfig": "src/karma.conf.js",
|
||||
"styles": [
|
||||
"src/styles.css",
|
||||
"node_modules/datatables.net-dt/css/jquery.dataTables.css",
|
||||
"node_modules/interactiveminingv3/assets/css/interactive-mining.css",
|
||||
"node_modules/interactiveminingv3/assets/css/animations.css"
|
||||
"src/styles.css"
|
||||
],
|
||||
"scripts": [],
|
||||
"assets": [
|
||||
"src/assets",
|
||||
"src/robots.txt",
|
||||
"src/sitemap.xml"
|
||||
"src/assets"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
@ -137,24 +195,27 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"graph-portal-e2e": {
|
||||
"root": "e2e",
|
||||
"sourceRoot": "e2e",
|
||||
"graph-e2e": {
|
||||
"root": "e2e/",
|
||||
"projectType": "application",
|
||||
"prefix": "",
|
||||
"architect": {
|
||||
"e2e": {
|
||||
"builder": "@angular-devkit/build-angular:protractor",
|
||||
"options": {
|
||||
"protractorConfig": "./protractor.conf.js",
|
||||
"devServerTarget": "graph-portal:serve"
|
||||
"protractorConfig": "e2e/protractor.conf.js",
|
||||
"devServerTarget": "graph:serve"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"devServerTarget": "graph:serve:production"
|
||||
}
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"tsConfig": [
|
||||
"e2e/tsconfig.e2e.json"
|
||||
],
|
||||
"tsConfig": "e2e/tsconfig.e2e.json",
|
||||
"exclude": [
|
||||
"**/node_modules/**"
|
||||
]
|
||||
|
@ -163,14 +224,5 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"defaultProject": "graph-portal",
|
||||
"schematics": {
|
||||
"@schematics/angular:component": {
|
||||
"prefix": "app",
|
||||
"styleext": "css"
|
||||
},
|
||||
"@schematics/angular:directive": {
|
||||
"prefix": "app"
|
||||
}
|
||||
}
|
||||
"defaultProject": "graph"
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
cd src/app/openaireLibrary
|
||||
# Exclude Dashboard files
|
||||
echo "Exclude Dashboard files"
|
||||
svn update --set-depth exclude ./dashboard
|
||||
# Exclude ck-editor usages
|
||||
echo "Exclude ck-editor usages"
|
||||
svn update --set-depth exclude ./sharedComponents/subscriber-invite
|
||||
cd ../../../
|
||||
echo "Done"
|
|
@ -1,14 +0,0 @@
|
|||
import { AppPage } from './app.po';
|
||||
|
||||
describe('graph-portal App', () => {
|
||||
let page: AppPage;
|
||||
|
||||
beforeEach(() => {
|
||||
page = new AppPage();
|
||||
});
|
||||
|
||||
it('should display welcome message', () => {
|
||||
page.navigateTo();
|
||||
expect(page.getParagraphText()).toEqual('Welcome to app!');
|
||||
});
|
||||
});
|
|
@ -1,11 +0,0 @@
|
|||
import { browser, by, element } from 'protractor';
|
||||
|
||||
export class AppPage {
|
||||
navigateTo() {
|
||||
return browser.get('/');
|
||||
}
|
||||
|
||||
getParagraphText() {
|
||||
return element(by.css('app-root h1')).getText();
|
||||
}
|
||||
}
|
|
@ -6,13 +6,13 @@ const { SpecReporter } = require('jasmine-spec-reporter');
|
|||
exports.config = {
|
||||
allScriptsTimeout: 11000,
|
||||
specs: [
|
||||
'./e2e/**/*.e2e-spec.ts'
|
||||
'./src/**/*.e2e-spec.ts'
|
||||
],
|
||||
capabilities: {
|
||||
'browserName': 'chrome'
|
||||
},
|
||||
directConnect: true,
|
||||
baseUrl: 'http://localhost:4900/',
|
||||
baseUrl: 'http://localhost:4200/',
|
||||
framework: 'jasmine',
|
||||
jasmineNodeOpts: {
|
||||
showColors: true,
|
||||
|
@ -21,8 +21,8 @@ exports.config = {
|
|||
},
|
||||
onPrepare() {
|
||||
require('ts-node').register({
|
||||
project: 'e2e/tsconfig.e2e.json'
|
||||
project: require('path').join(__dirname, './tsconfig.e2e.json')
|
||||
});
|
||||
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
|
||||
}
|
||||
};
|
||||
};
|
|
@ -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 graph!');
|
||||
});
|
||||
|
||||
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));
|
||||
});
|
||||
});
|
|
@ -0,0 +1,11 @@
|
|||
import { browser, by, element } from 'protractor';
|
||||
|
||||
export class AppPage {
|
||||
navigateTo() {
|
||||
return browser.get(browser.baseUrl) as Promise<any>;
|
||||
}
|
||||
|
||||
getTitleText() {
|
||||
return element(by.css('app-root h1')).getText() as Promise<string>;
|
||||
}
|
||||
}
|
|
@ -1,8 +1,7 @@
|
|||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../out-tsc/e2e",
|
||||
"baseUrl": "./",
|
||||
"outDir": "../out-tsc/app",
|
||||
"module": "commonjs",
|
||||
"target": "es5",
|
||||
"types": [
|
||||
|
@ -11,4 +10,4 @@
|
|||
"node"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
96
package.json
96
package.json
|
@ -1,72 +1,62 @@
|
|||
{
|
||||
"name": "graph-portal",
|
||||
"version": "0.0.1",
|
||||
"license": "MIT",
|
||||
"name": "graph",
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve --host 0.0.0.0 --disable-host-check --port=4900",
|
||||
"build": "ng build --prod",
|
||||
"build": "ng build",
|
||||
"build-dev": "ng build --configuration=development",
|
||||
"build-beta": "ng build --configuration=beta",
|
||||
"build-prod": "ng build --prod",
|
||||
"webpack-bundle-analyzer": "ng build --stats-json && webpack-bundle-analyzer dist/graph/browser/stats.json --host 0.0.0.0",
|
||||
"test": "ng test",
|
||||
"lint": "ng lint",
|
||||
"e2e": "ng e2e",
|
||||
"after-build-clean": "rm -rf dist/assets/common-assets/.svn/"
|
||||
"postinstall": "chmod +x clean-library.sh && ./clean-library.sh",
|
||||
"after-build-clean": "rm -rf dist/graph/assets/common-assets/.svn/"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "7.2.14",
|
||||
"@angular/cdk": "^7.3.7",
|
||||
"@angular/common": "7.2.14",
|
||||
"@angular/compiler": "7.2.14",
|
||||
"@angular/core": "7.2.14",
|
||||
"@angular/forms": "7.2.14",
|
||||
"@angular/http": "7.2.14",
|
||||
"@angular/material": "^7.3.7",
|
||||
"@angular/platform-browser": "7.2.14",
|
||||
"@angular/platform-browser-dynamic": "7.2.14",
|
||||
"@angular/router": "7.2.14",
|
||||
"@nguniversal/express-engine": "^6.0.0",
|
||||
"@types/express": "^4.16.1",
|
||||
"angular-datatables": "^4.4.1",
|
||||
"@angular/animations": "~11.2.14",
|
||||
"@angular/cdk": "^11.2.13",
|
||||
"@angular/common": "~11.2.14",
|
||||
"@angular/compiler": "~11.2.14",
|
||||
"@angular/core": "~11.2.14",
|
||||
"@angular/forms": "~11.2.14",
|
||||
"@angular/localize": "^11.2.14",
|
||||
"@angular/material": "^11.2.13",
|
||||
"@angular/platform-browser": "~11.2.14",
|
||||
"@angular/platform-browser-dynamic": "~11.2.14",
|
||||
"@angular/router": "~11.2.14",
|
||||
"clipboard": "^1.5.16",
|
||||
"core-js": "2.6.8",
|
||||
"datatables.net": "^1.10.19",
|
||||
"datatables.net-dt": "^1.10.19",
|
||||
"core-js": "^2.5.4",
|
||||
"express": "^4.15.2",
|
||||
"jquery": "^3.4.1",
|
||||
"ng2-ckeditor": "1.1.9",
|
||||
"ngx-bootstrap": "^1.6.6",
|
||||
"ngx-color-picker": "^8.1.0",
|
||||
"ngx-json-ld": "0.1.6",
|
||||
"ng-recaptcha": "^3.0.5",
|
||||
"ng-recaptcha": "^7.0.1",
|
||||
"rxjs": "^6.5.1",
|
||||
"ts-md5": "^1.2.0",
|
||||
"tslib": "^1.9.0",
|
||||
"zone.js": "0.8.29"
|
||||
"tslib": "^2.0.0",
|
||||
"zone.js": "~0.10.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~0.13.0",
|
||||
"@angular/cli": "7.3.9",
|
||||
"@angular/compiler-cli": "7.2.14",
|
||||
"@angular/language-service": "7.2.14",
|
||||
"@types/datatables.net": "^1.10.17",
|
||||
"@types/jasmine": "~2.8.8",
|
||||
"@angular-devkit/build-angular": "~0.1102.14",
|
||||
"@angular/cli": "~11.2.14",
|
||||
"@angular/compiler-cli": "~11.2.14",
|
||||
"@angular/language-service": "~11.2.14",
|
||||
"@types/node": "^12.11.1",
|
||||
"@types/express": "^4.17.0",
|
||||
"@types/jasmine": "~3.6.0",
|
||||
"@types/jasminewd2": "~2.0.3",
|
||||
"@types/jquery": "^3.3.29",
|
||||
"@types/node": "12.11.1",
|
||||
"codelyzer": "~4.5.0",
|
||||
"jasmine-core": "~2.99.1",
|
||||
"jasmine-spec-reporter": "~4.2.1",
|
||||
"karma": "~3.0.0",
|
||||
"karma-chrome-launcher": "~2.1.1",
|
||||
"karma-cli": "~1.0.1",
|
||||
"karma-coverage-istanbul-reporter": "~2.0.1",
|
||||
"karma-jasmine": "~1.1.2",
|
||||
"karma-jasmine-html-reporter": "^0.2.2",
|
||||
"protractor": "~5.4.0",
|
||||
"rxjs": "6.5.1",
|
||||
"rxjs-compat": "^6.5.1",
|
||||
"rxjs-tslint": "^0.1.7",
|
||||
"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",
|
||||
"tslint": "^5.7.0",
|
||||
"typescript": "3.2.4"
|
||||
"tslint": "~6.1.0",
|
||||
"typescript": "~4.0.7"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {Routes, RouterModule, PreloadAllModules} from '@angular/router';
|
||||
import {RouterModule, Routes} from '@angular/router';
|
||||
import {ErrorPageComponent} from './openaireLibrary/error/errorPage.component';
|
||||
import {PreviousRouteRecorder} from './openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
const appRoutes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
loadChildren: './home/home.module#HomeModule',
|
||||
loadChildren: () => import('./home/home.module').then(m => m.HomeModule),
|
||||
data: {
|
||||
isHome: true
|
||||
}, canDeactivate: [PreviousRouteRecorder]
|
||||
},
|
||||
{
|
||||
path: 'resources',
|
||||
loadChildren: './resources/resources.module#ResourcesModule',
|
||||
loadChildren: () => import('./resources/resources.module').then(m => m.ResourcesModule),
|
||||
canDeactivate: [PreviousRouteRecorder]
|
||||
},
|
||||
{
|
||||
path: 'support',
|
||||
loadChildren: './contact/contact.module#ContactModule',
|
||||
loadChildren: () => import('./contact/contact.module').then(m => m.ContactModule),
|
||||
canDeactivate: [PreviousRouteRecorder]
|
||||
},
|
||||
{
|
||||
path: 'about',
|
||||
loadChildren: './about/about.module#AboutModule',
|
||||
loadChildren: () => import('./about/about.module').then(m => m.AboutModule),
|
||||
canDeactivate: [PreviousRouteRecorder]
|
||||
},
|
||||
{ path: '**',pathMatch: 'full',component: ErrorPageComponent}
|
||||
|
@ -31,9 +31,7 @@ const appRoutes: Routes = [
|
|||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forRoot(appRoutes, {
|
||||
preloadingStrategy: PreloadAllModules,
|
||||
onSameUrlNavigation: "reload",
|
||||
relativeLinkResolution: 'corrected'
|
||||
onSameUrlNavigation: "reload"
|
||||
})],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
|
|
|
@ -15,10 +15,8 @@
|
|||
<div class="uk-width-2-3@m">
|
||||
<div class="uk-padding-small">
|
||||
<h3 class="uk-margin-top">Do you have a question? <span class="portal-color">Contact us</span>.</h3>
|
||||
|
||||
<div *ngIf="showLoading" class="uk-margin-large">
|
||||
<div class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert"><span
|
||||
class="loading-gif uk-align-center"></span></div>
|
||||
<loading></loading>
|
||||
</div>
|
||||
<div *ngIf="!showLoading">
|
||||
<contact-us [properties]="properties" [errorMessage]="errorMessage"
|
||||
|
|
|
@ -31,7 +31,6 @@ export class ContactComponent implements OnInit, OnDestroy {
|
|||
title = "OpenAIRE - Research Graph | Support";
|
||||
public contactForm: FormGroup;
|
||||
@ViewChild('AlertModal') modal;
|
||||
@ViewChild('recaptcha') recaptcha;
|
||||
|
||||
public breadcrumbs: Breadcrumb[] = [
|
||||
{
|
||||
|
|
|
@ -16,6 +16,7 @@ import {BreadcrumbsModule} from '../openaireLibrary/utils/breadcrumbs/breadcrumb
|
|||
import {IconsModule} from "../openaireLibrary/utils/icons/icons.module";
|
||||
import {IconsService} from "../openaireLibrary/utils/icons/icons.service";
|
||||
import {arrow_right} from "../openaireLibrary/utils/icons/icons";
|
||||
import {LoadingModule} from '../openaireLibrary/utils/loading/loading.module';
|
||||
|
||||
|
||||
@NgModule({
|
||||
|
@ -23,8 +24,8 @@ import {arrow_right} from "../openaireLibrary/utils/icons/icons";
|
|||
RouterModule.forChild([{
|
||||
path: '', component: ContactComponent
|
||||
}]), CommonModule, RouterModule,
|
||||
AlertModalModule, RecaptchaModule.forRoot(), HelperModule,
|
||||
Schema2jsonldModule, SEOServiceModule, ContactUsModule, BreadcrumbsModule, IconsModule
|
||||
AlertModalModule, HelperModule,
|
||||
Schema2jsonldModule, SEOServiceModule, ContactUsModule, BreadcrumbsModule, IconsModule, LoadingModule
|
||||
],
|
||||
declarations: [
|
||||
ContactComponent
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
height: 150px;
|
||||
}
|
||||
|
||||
.explore {
|
||||
.explore-search {
|
||||
background-color: #F9DBD1;
|
||||
--portal-main-color: var(--explore-color);
|
||||
--portal-dark-color: var(--explore-dark-color);
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="explore">
|
||||
<div class="explore-search">
|
||||
<div class="uk-section uk-text-small uk-container uk-container-large">
|
||||
<div class="uk-text-center uk-margin-large-top">
|
||||
<img class="uk-width-medium" src="assets/common-assets/logo-large-explore.png">
|
||||
|
|
|
@ -2,7 +2,6 @@ import {Component, OnDestroy, OnInit} from '@angular/core';
|
|||
import {Subscription} from 'rxjs';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Location} from '@angular/common';
|
||||
import 'rxjs/add/observable/zip';
|
||||
import {Meta, Title} from '@angular/platform-browser';
|
||||
import {ConfigurationService} from '../openaireLibrary/utils/configuration/configuration.service';
|
||||
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
||||
|
@ -132,15 +131,15 @@ export class HomeComponent implements OnInit, OnDestroy {
|
|||
parameterNames.push('type');
|
||||
parameterValues.push(values.join(','));
|
||||
}
|
||||
if (this.resultsQuickFilter) {
|
||||
parameterNames.push('qf');
|
||||
parameterValues.push('' + this.resultsQuickFilter.selected);
|
||||
if (this.resultsQuickFilter && this.resultsQuickFilter.selected) {
|
||||
parameterNames.push(this.resultsQuickFilter.filterId);
|
||||
parameterValues.push('"'+ encodeURIComponent(this.resultsQuickFilter.value)+'"');
|
||||
}
|
||||
}
|
||||
} else if (this.selectedEntity == 'all') {
|
||||
if (this.resultsQuickFilter) {
|
||||
parameterNames.push('qf');
|
||||
parameterValues.push('true');
|
||||
if (this.resultsQuickFilter && this.resultsQuickFilter.selected) {
|
||||
parameterNames.push(this.resultsQuickFilter.filterId);
|
||||
parameterValues.push('"'+ encodeURIComponent(this.resultsQuickFilter.value)+'"');
|
||||
}
|
||||
}
|
||||
if (this.keyword.length > 0) {
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
import './polyfills.ts';
|
||||
//import './vendors.ts';
|
||||
|
||||
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
|
||||
import {AppModule} from './app.module';
|
||||
import {enableProdMode} from "@angular/core";
|
||||
import {properties} from "../environments/environment";
|
||||
|
||||
const platform = platformBrowserDynamic();
|
||||
if (properties.environment !== "development") {
|
||||
enableProdMode();
|
||||
}
|
||||
platform.bootstrapModule(AppModule);
|
|
@ -1,49 +0,0 @@
|
|||
/**
|
||||
* Created by stefanos on 25/4/2017.
|
||||
*/
|
||||
// Polyfills
|
||||
|
||||
// import 'ie-shim'; // Internet Explorer 9 support
|
||||
import 'reflect-metadata';
|
||||
// import 'core-js/es6';
|
||||
// Added parts of es6 which are necessary for your project or your browser support requirements.
|
||||
import 'core-js/es6/symbol';
|
||||
import 'core-js/es6/object';
|
||||
import 'core-js/es6/function';
|
||||
import 'core-js/es6/parse-int';
|
||||
import 'core-js/es6/parse-float';
|
||||
import 'core-js/es6/number';
|
||||
import 'core-js/es6/math';
|
||||
import 'core-js/es6/string';
|
||||
import 'core-js/es6/date';
|
||||
import 'core-js/es6/array';
|
||||
import 'core-js/es6/regexp';
|
||||
import 'core-js/es6/map';
|
||||
import 'core-js/es6/set';
|
||||
import 'core-js/es6/weak-map';
|
||||
import 'core-js/es6/weak-set';
|
||||
import 'core-js/es6/typed';
|
||||
import 'core-js/es6/reflect';
|
||||
// see issue https://github.com/AngularClass/angular2-webpack-starter/issues/709
|
||||
// import 'core-js/es6/promise';
|
||||
|
||||
import 'intl';
|
||||
import 'intl/locale-data/jsonp/en';
|
||||
|
||||
import 'core-js/es7/reflect';
|
||||
import 'zone.js/dist/zone';
|
||||
|
||||
// import 'ng2-ckeditor/lib';
|
||||
|
||||
// if ('production' === ENV) {
|
||||
// // Production
|
||||
//
|
||||
// } else {
|
||||
//
|
||||
// // Development
|
||||
// Error.stackTraceLimit = Infinity;
|
||||
//
|
||||
// /* tslint:disable no-var-requires */
|
||||
// require('zone.js/dist/long-stack-trace-zone');
|
||||
//
|
||||
// }
|
|
@ -12,20 +12,21 @@ module.exports = function (config) {
|
|||
require('karma-coverage-istanbul-reporter'),
|
||||
require('@angular-devkit/build-angular/plugins/karma')
|
||||
],
|
||||
client:{
|
||||
client: {
|
||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
coverageIstanbulReporter: {
|
||||
dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ],
|
||||
dir: require('path').join(__dirname, '../coverage/graph'),
|
||||
reports: ['html', 'lcovonly', 'text-summary'],
|
||||
fixWebpackSourcePaths: true
|
||||
},
|
||||
|
||||
reporters: ['progress', 'kjhtml'],
|
||||
port: 9876,
|
||||
colors: true,
|
||||
logLevel: config.LOG_INFO,
|
||||
autoWatch: true,
|
||||
browsers: ['Chrome'],
|
||||
singleRun: false
|
||||
singleRun: false,
|
||||
restartOnFileChange: true
|
||||
});
|
||||
};
|
|
@ -8,4 +8,5 @@ if (properties.environment !== "development") {
|
|||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/***************************************************************************************************
|
||||
* 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.
|
||||
|
@ -11,61 +15,53 @@
|
|||
* 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/docs/ts/latest/guide/browser-support.html
|
||||
* Learn more in https://angular.io/guide/browser-support
|
||||
*/
|
||||
|
||||
/***************************************************************************************************
|
||||
* BROWSER POLYFILLS
|
||||
*/
|
||||
|
||||
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
|
||||
import 'core-js/es6/symbol';
|
||||
import 'core-js/es6/object';
|
||||
import 'core-js/es6/function';
|
||||
import 'core-js/es6/parse-int';
|
||||
import 'core-js/es6/parse-float';
|
||||
import 'core-js/es6/number';
|
||||
import 'core-js/es6/math';
|
||||
import 'core-js/es6/string';
|
||||
import 'core-js/es6/date';
|
||||
import 'core-js/es6/array';
|
||||
import 'core-js/es6/regexp';
|
||||
import 'core-js/es6/map';
|
||||
import 'core-js/es6/weak-map';
|
||||
import 'core-js/es6/set';
|
||||
|
||||
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
|
||||
// import 'classlist.js'; // Run `npm install --save classlist.js`.
|
||||
|
||||
/** Evergreen browsers require these. **/
|
||||
import 'core-js/es6/reflect';
|
||||
|
||||
|
||||
/**
|
||||
* Required to support Web Animations `@angular/animation`.
|
||||
* Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
|
||||
**/
|
||||
* Web Animations `@angular/platform-browser/animations`
|
||||
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
|
||||
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
|
||||
*/
|
||||
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
|
||||
|
||||
|
||||
/**
|
||||
* 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 Angular itself.
|
||||
* Zone JS is required by default for Angular itself.
|
||||
*/
|
||||
import 'zone.js/dist/zone'; // Included with Angular CLI.
|
||||
|
||||
|
||||
|
||||
/***************************************************************************************************
|
||||
* APPLICATION IMPORTS
|
||||
*/
|
||||
|
||||
/**
|
||||
* Date, currency, decimal and percent pipes.
|
||||
* Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
|
||||
*/
|
||||
// import 'intl'; // Run `npm install --save intl`.
|
||||
/**
|
||||
* Need to import at least one locale-data with intl.
|
||||
*/
|
||||
// import 'intl/locale-data/jsonp/en';
|
||||
|
|
|
@ -149,7 +149,7 @@ ul.uk-text-small.portal-circle li:before {
|
|||
}
|
||||
|
||||
.numbers-background {
|
||||
background: transparent url('assets/graph-assets/home/5.svg') repeat-x center bottom;
|
||||
background: transparent url('/assets/graph-assets/home/5.svg') repeat-x center bottom;
|
||||
}
|
||||
|
||||
.number {
|
||||
|
|
14
src/test.ts
14
src/test.ts
|
@ -1,24 +1,14 @@
|
|||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||
|
||||
import 'zone.js/dist/long-stack-trace-zone';
|
||||
import 'zone.js/dist/proxy.js';
|
||||
import 'zone.js/dist/sync-test';
|
||||
import 'zone.js/dist/jasmine-patch';
|
||||
import 'zone.js/dist/async-test';
|
||||
import 'zone.js/dist/fake-async-test';
|
||||
import 'zone.js/dist/zone-testing';
|
||||
import { getTestBed } from '@angular/core/testing';
|
||||
import {
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
|
||||
declare const __karma__: any;
|
||||
declare const require: any;
|
||||
|
||||
// Prevent Karma from running prematurely.
|
||||
__karma__.loaded = function () {};
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
|
@ -28,5 +18,3 @@ getTestBed().initTestEnvironment(
|
|||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
// And load the modules.
|
||||
context.keys().map(context);
|
||||
// Finally, start Karma to run the tests.
|
||||
__karma__.start();
|
||||
|
|
|
@ -1,23 +1,14 @@
|
|||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"paths": {
|
||||
"*": [
|
||||
"types/*"
|
||||
]
|
||||
},
|
||||
"paths": {
|
||||
"*": [
|
||||
"types/*"
|
||||
]
|
||||
},
|
||||
"outDir": "../out-tsc/app",
|
||||
"baseUrl": "./",
|
||||
"module": "es2015",
|
||||
"types": ["node"]
|
||||
"types": []
|
||||
},
|
||||
"exclude": [
|
||||
"test.ts",
|
||||
"**/*.spec.ts"
|
||||
"files": [
|
||||
"main.ts",
|
||||
"polyfills.ts"
|
||||
],
|
||||
"include": [
|
||||
"src/**/*.d.ts"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../out-tsc/spec",
|
||||
"baseUrl": "./",
|
||||
"module": "commonjs",
|
||||
"target": "es5",
|
||||
"types": [
|
||||
"jasmine",
|
||||
"node"
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
/* SystemJS module definition */
|
||||
declare var module: NodeModule;
|
||||
interface NodeModule {
|
||||
id: string;
|
||||
}
|
|
@ -1,22 +1,23 @@
|
|||
{
|
||||
"compileOnSave": false,
|
||||
"compilerOptions": {
|
||||
"importHelpers": true,
|
||||
"baseUrl": "./",
|
||||
"downlevelIteration": true,
|
||||
"outDir": "./dist/out-tsc",
|
||||
"sourceMap": true,
|
||||
"declaration": false,
|
||||
"module": "es2020",
|
||||
"moduleResolution": "node",
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"target": "es5",
|
||||
"importHelpers": true,
|
||||
"target": "es2015",
|
||||
"typeRoots": [
|
||||
"node_modules/@types"
|
||||
],
|
||||
"lib": [
|
||||
"es2017",
|
||||
"es2018",
|
||||
"dom"
|
||||
],
|
||||
"module": "es2015",
|
||||
"baseUrl": "./"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
141
tslint.json
141
tslint.json
|
@ -1,141 +0,0 @@
|
|||
{
|
||||
"rulesDirectory": [
|
||||
"node_modules/codelyzer"
|
||||
],
|
||||
"rules": {
|
||||
"arrow-return-shorthand": true,
|
||||
"callable-types": true,
|
||||
"class-name": true,
|
||||
"comment-format": [
|
||||
true,
|
||||
"check-space"
|
||||
],
|
||||
"curly": true,
|
||||
"eofline": true,
|
||||
"forin": true,
|
||||
"import-blacklist": [
|
||||
true
|
||||
],
|
||||
"import-spacing": true,
|
||||
"indent": [
|
||||
true,
|
||||
"spaces"
|
||||
],
|
||||
"interface-over-type-literal": true,
|
||||
"label-position": true,
|
||||
"max-line-length": [
|
||||
true,
|
||||
140
|
||||
],
|
||||
"member-access": false,
|
||||
"member-ordering": [
|
||||
true,
|
||||
{
|
||||
"order": [
|
||||
"static-field",
|
||||
"instance-field",
|
||||
"static-method",
|
||||
"instance-method"
|
||||
]
|
||||
}
|
||||
],
|
||||
"no-arg": true,
|
||||
"no-bitwise": true,
|
||||
"no-console": [
|
||||
true,
|
||||
"debug",
|
||||
"info",
|
||||
"time",
|
||||
"timeEnd",
|
||||
"trace"
|
||||
],
|
||||
"no-construct": true,
|
||||
"no-debugger": true,
|
||||
"no-duplicate-super": true,
|
||||
"no-empty": false,
|
||||
"no-empty-interface": true,
|
||||
"no-eval": true,
|
||||
"no-inferrable-types": [
|
||||
true,
|
||||
"ignore-params"
|
||||
],
|
||||
"no-misused-new": true,
|
||||
"no-non-null-assertion": true,
|
||||
"no-shadowed-variable": true,
|
||||
"no-string-literal": false,
|
||||
"no-string-throw": true,
|
||||
"no-switch-case-fall-through": true,
|
||||
"no-trailing-whitespace": true,
|
||||
"no-unnecessary-initializer": true,
|
||||
"no-unused-expression": true,
|
||||
"no-use-before-declare": true,
|
||||
"no-var-keyword": true,
|
||||
"object-literal-sort-keys": false,
|
||||
"one-line": [
|
||||
true,
|
||||
"check-open-brace",
|
||||
"check-catch",
|
||||
"check-else",
|
||||
"check-whitespace"
|
||||
],
|
||||
"prefer-const": true,
|
||||
"quotemark": [
|
||||
true,
|
||||
"single"
|
||||
],
|
||||
"radix": true,
|
||||
"semicolon": [
|
||||
true,
|
||||
"always"
|
||||
],
|
||||
"triple-equals": [
|
||||
true,
|
||||
"allow-null-check"
|
||||
],
|
||||
"typedef-whitespace": [
|
||||
true,
|
||||
{
|
||||
"call-signature": "nospace",
|
||||
"index-signature": "nospace",
|
||||
"parameter": "nospace",
|
||||
"property-declaration": "nospace",
|
||||
"variable-declaration": "nospace"
|
||||
}
|
||||
],
|
||||
"typeof-compare": true,
|
||||
"unified-signatures": true,
|
||||
"variable-name": false,
|
||||
"whitespace": [
|
||||
true,
|
||||
"check-branch",
|
||||
"check-decl",
|
||||
"check-operator",
|
||||
"check-separator",
|
||||
"check-type"
|
||||
],
|
||||
"directive-selector": [
|
||||
true,
|
||||
"attribute",
|
||||
"app",
|
||||
"camelCase"
|
||||
],
|
||||
"component-selector": [
|
||||
true,
|
||||
"element",
|
||||
"app",
|
||||
"kebab-case"
|
||||
],
|
||||
"use-input-property-decorator": true,
|
||||
"use-output-property-decorator": true,
|
||||
"use-host-property-decorator": true,
|
||||
"no-input-rename": true,
|
||||
"no-output-rename": true,
|
||||
"use-life-cycle-interface": true,
|
||||
"use-pipe-transform-interface": true,
|
||||
"component-class-suffix": true,
|
||||
"directive-class-suffix": true,
|
||||
"no-access-missing-member": true,
|
||||
"templates-use-public": true,
|
||||
"invoke-injectable": true
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue