Initial setup of project.

This commit is contained in:
Konstantina Galouni 2023-10-12 10:53:30 +03:00
parent 2d29854b77
commit e78029945f
35 changed files with 938 additions and 0 deletions

11
.browserslistrc Normal file
View File

@ -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

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
.angular
node_modules/
dist/
.idea/
package-lock.json

9
.gitmodules vendored Normal file
View File

@ -0,0 +1,9 @@
[submodule "src/app/openaireLibrary"]
path = src/app/openaireLibrary
url = gitea@code-repo.d4science.org:MaDgIK/openaire-library.git
[submodule "src/assets/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

197
angular.json Normal file
View File

@ -0,0 +1,197 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"eosc-metadata-harvester": {
"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-metadata-harvester",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/assets",
"src/robots.txt",
"src/.htaccess"
],
"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": 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": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.beta.ts"
}
],
"optimization": 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": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": 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-metadata-harvester:build"
},
"configurations": {
"production": {
"browserTarget": "eosc-metadata-harvester:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "eosc-metadata-harvester: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.css"
],
"scripts": [],
"assets": [
"src/assets"
]
}
}
}
},
"eosc-metadata-harvester-e2e": {
"root": "e2e/",
"projectType": "application",
"prefix": "",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "eosc-metadata-harvester:serve"
},
"configurations": {
"production": {
"devServerTarget": "eosc-metadata-harvester:serve:production"
}
}
}
}
}
},
"cli": {
"analytics": false
}
}

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

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

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

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

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

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

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

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

64
package.json Normal file
View File

@ -0,0 +1,64 @@
{
"name": "eosc-metadata-harvester",
"version": "0.0.1",
"scripts": {
"ng": "ng",
"start": "ng serve --host 0.0.0.0 --disable-host-check --port=5300",
"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/monitor-dashboard/browser/stats.json --host 0.0.0.0",
"test": "ng test",
"e2e": "ng e2e",
"after-build-clean": "rm -rf dist/eosc-metadata-harvester/assets/common-assets/.git dist/eosc-metadata-harvester/assets/openaire-theme/.git .angular"
},
"private": true,
"dependencies": {
"@angular/animations": "^16.1.8",
"@angular/cdk": "^16.1.7",
"@angular/common": "^16.1.8",
"@angular/compiler": "^16.1.8",
"@angular/core": "^16.1.8",
"@angular/forms": "^16.1.8",
"@angular/localize": "^16.1.8",
"@angular/material": "^16.1.7",
"@angular/platform-browser": "^16.1.8",
"@angular/platform-browser-dynamic": "^16.1.8",
"@angular/router": "^16.1.8",
"clipboard": "^1.5.16",
"core-js": "^2.5.4",
"express": "^4.15.2",
"jquery": "^3.4.1",
"ng-recaptcha": "^12.0.2",
"ng2-ckeditor": "1.3.7",
"ngx-color-picker": "^14.0.0",
"rxjs": "^6.5.1",
"sass-loader": "7.3.1",
"ts-md5": "^1.2.0",
"tslib": "^2.0.0",
"uikit": "3.16.24",
"zone.js": "~0.13.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "^16.1.7",
"@angular/cli": "^16.1.7",
"@angular/compiler-cli": "^16.1.8",
"@angular/language-service": "^16.1.8",
"@types/ckeditor": "^4.9.10",
"@types/express": "^4.17.0",
"@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.4",
"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.9.5"
}
}

View File

@ -0,0 +1,17 @@
<!--<div *ngIf="loading == true">-->
<!-- <loading [full]="true"></loading>-->
<!--</div>-->
<div>
<div id="modal-container"></div>
<!-- <navbar *ngIf="hasHeader" portal="connect-admin" [header]="menuHeader"-->
<!-- [menuItems]="menuItems"></navbar>-->
<!-- <navbar *ngIf="hasHeader" [header]="menuHeader" portal="graph" [onlyTop]="false" [userMenu]="true"-->
<!-- [menuItems]=menuItems [properties]=properties></navbar>-->
<div>
<dashboard-sidebar *ngIf="hasSidebar" [items]="sideBarItems" [backItem]="backItem"></dashboard-sidebar>
<main>
<router-outlet></router-outlet>
</main>
</div>
</div>

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

@ -0,0 +1,171 @@
import {ChangeDetectorRef, Component, HostListener, OnInit} from '@angular/core';
import {MenuItem} from './openaireLibrary/sharedComponents/menu';
import {ActivatedRoute, Data, NavigationEnd, Params, Router} from '@angular/router';
import {EnvProperties} from './openaireLibrary/utils/properties/env-properties';
import {Header} from './openaireLibrary/sharedComponents/navigationBar.component';
import {LayoutService} from "./openaireLibrary/dashboard/sharedComponents/sidebar/layout.service";
import {properties} from "../environments/environment";
import {BehaviorSubject, Subscriber} from "rxjs";
import {SmoothScroll} from "./openaireLibrary/utils/smooth-scroll";
import {ConnectHelper} from './openaireLibrary/connect/connectHelper';
import {ConfigurationService} from './openaireLibrary/utils/configuration/configuration.service';
import {StringUtils} from "./openaireLibrary/utils/string-utils.class";
import {OpenaireEntities} from "./openaireLibrary/utils/properties/searchFields";
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
})
export class AppComponent implements OnInit {
title = 'Research Community Dashboard | Administrator';
properties: EnvProperties = properties;
params: BehaviorSubject<Params> = new BehaviorSubject<Params>(null);
data: BehaviorSubject<Data> = new BehaviorSubject<Data>(null);
hasSidebar: boolean = false;
hasHeader: boolean = true;
hasAdminMenu: boolean = false;
isFrontPage: boolean = false;
sideBarItems: MenuItem[] = [];
backItem: MenuItem = null;
menuItems: MenuItem[] = [];
menuHeader: Header = {
route: "/",
url: null,
title: "Default menu header",
logoUrl: null,
logoSmallUrl: null,
position: 'center',
badge: false
};
userMenuItems: MenuItem[] = [];
loading: boolean = true;
paramsResolved: boolean = false;
innerWidth;
private subscriptions: any[] = [];
headerLogoUrl: string;
headerUrl: string;
constructor(private route: ActivatedRoute,
private router: Router,
private cdr: ChangeDetectorRef,
private smoothScroll: SmoothScroll,
private layoutService: LayoutService,
private configurationService: ConfigurationService) {
this.subscriptions.push(this.router.events.subscribe(event => {
if (event instanceof NavigationEnd) {
let r = this.route;
while (r.firstChild) {
r = r.firstChild;
}
this.paramsResolved = true;
this.params.next(r.snapshot.params);
this.data.next(r.snapshot.data);
}
}));
}
ngOnInit() {
// if (typeof document !== 'undefined' && window) {
// this.innerWidth = window.innerWidth;
// }
// this.subscriptions.push(this.layoutService.hasSidebar.subscribe(hasSidebar => {
// this.hasSidebar = hasSidebar;
// this.cdr.detectChanges();
// }));
// this.subscriptions.push(this.layoutService.hasHeader.subscribe(hasHeader => {
// this.hasHeader = hasHeader;
// this.cdr.detectChanges();
// }));
// this.subscriptions.push(this.layoutService.hasAdminMenu.subscribe(hasAdminMenu => {
// this.hasAdminMenu = hasAdminMenu;
// this.cdr.detectChanges();
// }));
// this.subscriptions.push(this.layoutService.isFrontPage.subscribe(isFrontPage => {
// this.isFrontPage = isFrontPage;
// this.cdr.detectChanges();
// }));
// this.layoutService.setSmallScreen((this.innerWidth && this.innerWidth <= 640));
// this.layoutService.setOpen(!(this.innerWidth && this.innerWidth <= 640));
// this.subscriptions.push(this.params.subscribe(params => {
// if (this.paramsResolved) {
// this.loading = true;
// }
// }));
// this.subscriptions.push(this.data.subscribe(data => {
// if(data && data.portal) {
// this.setProperties(data.portal);
// this.configurationService.initPortal(this.properties, this.properties.adminToolsCommunity);
// }
// }));
}
// @HostListener('window:resize', ['$event'])
// onResize(event) {
// if (this.layoutService.isSmallScreen && event.target.innerWidth > 1219) {
// this.layoutService.setSmallScreen(false);
// } else if (!this.layoutService.isSmallScreen && event.target.innerWidth < 1219) {
// this.layoutService.setSmallScreen(true);
// this.layoutService.setOpen(false);
// }
// }
public ngOnDestroy() {
this.subscriptions.forEach(value => {
if (value instanceof Subscriber) {
value.unsubscribe();
}
});
this.layoutService.clearSubscriptions();
this.smoothScroll.clearSubscriptions();
}
// setProperties(id, type = null){
// this.properties.adminToolsCommunity = id;
// if(type) {
// this.properties.adminToolsPortalType = type;
// } else {
// ConnectHelper.setPortalTypeFromPid(id);
// }
// this.configurationService.initPortal(this.properties, this.properties.adminToolsCommunity);
// }
//
// public get open() {
// return this.layoutService.open;
// }
//
// public get hover() {
// return this.layoutService.hover;
// }
//
// private buildMenu() {
// this.userMenuItems = [];
// this.sideBarItems = [];
// this.headerLogoUrl = null;
// this.headerUrl = 'https://' + ((properties.environment !== 'production')?'beta.':'') + 'connect.openaire.eu';
// this.menuHeader = {
// route: null,
// url: this.headerUrl,
// title: "Monitor",
// logoUrl: 'assets/common-assets/logo-services/connect/small.svg',
// logoSmallUrl: "assets/common-assets/logo-services/connect/small.svg",
// position: 'left',
// badge: true,
// menuPosition: "center"
// };
// this.menuItems = [];
// this.menuItems.push(
// new MenuItem("about", "About", this.headerUrl + "/about/learn-how", "", false, [], [], {}, null, null, null, null, "_self",
// "internal", false,
// [
// new MenuItem("", "Learn the process", this.headerUrl + "/about/learn-how", "", false, [], [], {}, null, null, null, null, "_self"),
// ]
// )
// );
// this.menuItems.push(
// new MenuItem("communities", "Communities", this.headerUrl + "/search/find/communities", "", false, [], [], {}, null, null, null, null, "_self")
// );
//
// this.backItem = null;
// this.hasSidebar = this.hasSidebar && this.sideBarItems.length > 1;
// }
}

48
src/app/app.module.ts Normal file
View File

@ -0,0 +1,48 @@
import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {HTTP_INTERCEPTORS, HttpClientModule} from '@angular/common/http';
import {AppComponent} from './app.component';
import {AppRoutingModule} from './app.routing';
import {ReactiveFormsModule} from '@angular/forms';
import {NavigationBarModule} from './openaireLibrary/sharedComponents/navigationBar.module';
import {BottomModule} from './openaireLibrary/sharedComponents/bottom.module';
import {ErrorModule} from './openaireLibrary/error/error.module';
import {TitleCasePipe} from '@angular/common';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {LoadingModule} from "./openaireLibrary/utils/loading/loading.module";
import {SideBarModule} from "./openaireLibrary/dashboard/sharedComponents/sidebar/sideBar.module";
import {SharedModule} from "./openaireLibrary/shared/shared.module";
import {ErrorInterceptorService} from "./openaireLibrary/error-interceptor.service";
import {DEFAULT_TIMEOUT, TimeoutInterceptor} from "./openaireLibrary/timeout-interceptor.service";
import { HomeModule } from './home/home.module';
@NgModule({
imports: [
AppRoutingModule,
BrowserModule,
HttpClientModule,
ReactiveFormsModule,
BottomModule, NavigationBarModule,
ErrorModule,
SharedModule,
BrowserAnimationsModule, LoadingModule, SideBarModule,
HomeModule
],
declarations: [
AppComponent,
],
providers: [
TitleCasePipe,
{
provide: HTTP_INTERCEPTORS,
useClass: ErrorInterceptorService,
multi: true
},
[{provide: HTTP_INTERCEPTORS, useClass: TimeoutInterceptor, multi: true}],
[{provide: DEFAULT_TIMEOUT, useValue: 30000}]
],
bootstrap: [AppComponent]
})
export class AppModule {
}

31
src/app/app.routing.ts Normal file
View File

@ -0,0 +1,31 @@
import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {LoginGuard} from "./openaireLibrary/login/loginGuard.guard";
const routes: Routes = [
{
path: '',
loadChildren: () => import('./home/home.module').then(m => m.HomeModule)
},
{
path: 'reload',
loadChildren: () => import('./reload/libReload.module').then(m => m.LibReloadModule),
data: {hasSidebar: false, hasHeader: false}
},
// { path: 'error',
// pathMatch: 'full',
// component: AdminErrorPageComponent,
// data: {hasSidebar: false}
// },
// { path: '**',
// pathMatch: 'full',
// component: AdminErrorPageComponent
// }
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [ RouterModule ]
})
export class AppRoutingModule {}

View File

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

View File

View File

@ -0,0 +1 @@
<p>home works!</p>

View File

@ -0,0 +1,10 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.css']
})
export class HomeComponent {
}

View File

@ -0,0 +1,35 @@
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 {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module";
import {OtherPortalsModule} from "../openaireLibrary/sharedComponents/other-portals/other-portals.module";
import {IconsModule} from "../openaireLibrary/utils/icons/icons.module";
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";
import {SearchInputModule} from "../openaireLibrary/sharedComponents/search-input/search-input.module";
import {HomeComponent} from "./home.component";
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
@NgModule({
imports: [
CommonModule, FormsModule, RouterModule,
HomeRoutingModule,
// SEOServiceModule, OtherPortalsModule, IconsModule, NumbersModule,
// AdvancedSearchInputModule, InputModule, SearchInputModule
],
declarations: [
HomeComponent
],
providers:[
PreviousRouteRecorder
],
exports: [
HomeComponent
]
})
export class HomeModule {}

@ -0,0 +1 @@
Subproject commit 1a030e2a0d54602b1d975c9879e9ee290d08d135

View File

@ -0,0 +1,14 @@
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
]
})
export class LibReloadModule { }

@ -0,0 +1 @@
Subproject commit 031329d5ca890663a0911e3dac5649eb5c00c601

@ -0,0 +1 @@
Subproject commit ac458b5a6d156167d7b6c9005ef1f9cfac75d3ae

View File

@ -0,0 +1,5 @@
import {EnvProperties} from '../app/openaireLibrary/utils/properties/env-properties';
export let properties: EnvProperties = {
environment: "beta"
};

View File

@ -0,0 +1,5 @@
import {EnvProperties} from '../app/openaireLibrary/utils/properties/env-properties';
export let properties: EnvProperties = {
environment:"production"
};

View File

@ -0,0 +1,10 @@
// 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 list 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'
};

32
src/index.html Normal file
View File

@ -0,0 +1,32 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<base href="/">
<title>EOSC Metadata Harvester</title>
<meta charset="UTF-8">
<link rel="apple-touch-icon" sizes="57x57" href="assets/common-assets/logo/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="assets/common-assets/logo/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="assets/common-assets/logo/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="assets/common-assets/logo/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="assets/common-assets/logo/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="assets/common-assets/logo/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="assets/common-assets/logo/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="assets/common-assets/logo/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="assets/common-assets/logo/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="assets/common-assets/logo/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="assets/common-assets/logo/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="assets/common-assets/logo/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="assets/common-assets/logo/favicon-16x16.png">
<link href="assets/common-assets/logo/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon"/>
<meta name="robots" content="noindex">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://cdn.ckeditor.com/4.5.11/full-all/ckeditor.js"></script>
<script src="https://unpkg.com/smoothscroll-polyfill@0.4.3/dist/smoothscroll.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<app-root></app-root>
</body>
</html>

32
src/karma.conf.js Normal file
View File

@ -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/connect-admin'),
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
});
};

12
src/main.ts Normal file
View File

@ -0,0 +1,12 @@
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();
}
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));

57
src/polyfills.ts Normal file
View File

@ -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
*/

4
src/robots.txt Normal file
View File

@ -0,0 +1,4 @@
User-Agent: *
Disallow: /cache
Disallow: /upload
Disallow: /

5
src/styles.less Normal file
View File

@ -0,0 +1,5 @@
/* 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/dashboard";

16
src/test.ts Normal file
View File

@ -0,0 +1,16 @@
// 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';
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false }
}
);

14
src/tsconfig.app.json Normal file
View File

@ -0,0 +1,14 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"types": []
},
"files": [
"main.ts",
"polyfills.ts"
],
"include": [
"src/**/*.d.ts"
]
}

18
src/tsconfig.spec.json Normal file
View File

@ -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"
]
}

23
tsconfig.json Normal file
View File

@ -0,0 +1,23 @@
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"downlevelIteration": true,
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"module": "es2020",
"moduleResolution": "node",
"experimentalDecorators": true,
"importHelpers": true,
"target": "ES2022",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"dom"
],
"useDefineForClassFields": false
}
}