diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts
index a081e8e..ca53e4c 100644
--- a/src/app/home/home.component.ts
+++ b/src/app/home/home.component.ts
@@ -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) {
diff --git a/src/app/main.ts b/src/app/main.ts
deleted file mode 100644
index fd47b5e..0000000
--- a/src/app/main.ts
+++ /dev/null
@@ -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);
diff --git a/src/app/polyfills.ts b/src/app/polyfills.ts
deleted file mode 100644
index 9dcf73e..0000000
--- a/src/app/polyfills.ts
+++ /dev/null
@@ -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');
-//
-// }
diff --git a/karma.conf.js b/src/karma.conf.js
similarity index 81%
rename from karma.conf.js
rename to src/karma.conf.js
index 0840f6c..248dfcb 100644
--- a/karma.conf.js
+++ b/src/karma.conf.js
@@ -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
});
};
diff --git a/src/main.ts b/src/main.ts
index 9be6714..c203640 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -8,4 +8,5 @@ if (properties.environment !== "development") {
enableProdMode();
}
-platformBrowserDynamic().bootstrapModule(AppModule);
+platformBrowserDynamic().bootstrapModule(AppModule)
+ .catch(err => console.error(err));
diff --git a/src/polyfills.ts b/src/polyfills.ts
index 4e77c07..7c9e495 100644
--- a/src/polyfills.ts
+++ b/src/polyfills.ts
@@ -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';
diff --git a/src/index.prod.html b/src/prod/index.html
similarity index 100%
rename from src/index.prod.html
rename to src/prod/index.html
diff --git a/src/robots.prod.txt b/src/prod/robots.txt
similarity index 100%
rename from src/robots.prod.txt
rename to src/prod/robots.txt
diff --git a/src/styles.css b/src/styles.css
index 71dc31d..0ca971e 100644
--- a/src/styles.css
+++ b/src/styles.css
@@ -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 {
diff --git a/src/test.ts b/src/test.ts
index cd612ee..1631789 100644
--- a/src/test.ts
+++ b/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();
diff --git a/src/tsconfig.app.json b/src/tsconfig.app.json
index c300528..f3a1b80 100644
--- a/src/tsconfig.app.json
+++ b/src/tsconfig.app.json
@@ -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"
]
}
diff --git a/src/tsconfig.spec.json b/src/tsconfig.spec.json
index 18bad40..de77336 100644
--- a/src/tsconfig.spec.json
+++ b/src/tsconfig.spec.json
@@ -2,9 +2,6 @@
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/spec",
- "baseUrl": "./",
- "module": "commonjs",
- "target": "es5",
"types": [
"jasmine",
"node"
diff --git a/src/typings.d.ts b/src/typings.d.ts
deleted file mode 100644
index ef5c7bd..0000000
--- a/src/typings.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-/* SystemJS module definition */
-declare var module: NodeModule;
-interface NodeModule {
- id: string;
-}
diff --git a/tsconfig.json b/tsconfig.json
index 8cd9a30..8c693a2 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -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": "./"
+ ]
}
-}
\ No newline at end of file
+}
diff --git a/tslint.json b/tslint.json
deleted file mode 100644
index 7223e1a..0000000
--- a/tslint.json
+++ /dev/null
@@ -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
- }
-}