Merge pull request 'angular-16' (#6) from angular-16 into develop

Reviewed-on: #6
This commit is contained in:
Konstantinos Triantafyllou 2023-11-01 13:03:17 +01:00
commit e6a5dbc2b4
17 changed files with 59 additions and 61 deletions

View File

@ -1,7 +1,7 @@
rm -f interactiveminingv3.tgz rm -f interactiveminingv3.tgz
git clone https://code-repo.d4science.org/MaDgIK/interactive-mining.git git clone https://code-repo.d4science.org/MaDgIK/interactive-mining.git
cd interactive-mining/ cd interactive-mining/
git checkout angular-14 git checkout angular-16
cd interactive-mining-angular-frontend/ cd interactive-mining-angular-frontend/
npm install npm install
npm run packagr npm run packagr

View File

@ -17,41 +17,40 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "^14.2.3", "@angular/animations": "^16.1.8",
"@angular/cdk": "^14.2.2", "@angular/cdk": "^16.1.7",
"@angular/common": "^14.2.3", "@angular/common": "^16.1.8",
"@angular/compiler": "^14.2.3", "@angular/compiler": "^16.1.8",
"@angular/core": "^14.2.3", "@angular/core": "^16.1.8",
"@angular/forms": "^14.2.3", "@angular/forms": "^16.1.8",
"@angular/localize": "^14.2.3", "@angular/localize": "^16.1.8",
"@angular/material": "^14.2.2", "@angular/material": "^16.1.7",
"@angular/platform-browser": "^14.2.3", "@angular/platform-browser": "^16.1.8",
"@angular/platform-browser-dynamic": "^14.2.3", "@angular/platform-browser-dynamic": "^16.1.8",
"@angular/router": "^14.2.3", "@angular/router": "^16.1.8",
"clipboard": "^1.5.16", "clipboard": "^1.5.16",
"core-js": "^2.5.4", "core-js": "^2.5.4",
"express": "^4.15.2", "express": "^4.15.2",
"jquery": "^3.4.1", "jquery": "^3.4.1",
"ng-recaptcha": "^10.0.0", "ng-recaptcha": "^12.0.2",
"ng2-ckeditor": "1.3.7", "ng2-ckeditor": "1.3.7",
"ngx-color-picker": "^8.1.0", "ngx-color-picker": "^14.0.0",
"rxjs": "^6.5.1", "rxjs": "^6.5.1",
"sass-loader": "7.3.1", "sass-loader": "7.3.1",
"ts-md5": "^1.2.0", "ts-md5": "^1.2.0",
"tslib": "^2.0.0", "tslib": "^2.0.0",
"uikit": "3.13.10", "uikit": "3.16.24",
"zone.js": "~0.11.4" "zone.js": "~0.13.1"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "^14.2.3", "@angular-devkit/build-angular": "^16.1.7",
"@angular/cli": "^14.2.3", "@angular/cli": "^16.1.7",
"@angular/compiler-cli": "^14.2.3", "@angular/compiler-cli": "^16.1.8",
"@angular/language-service": "^14.2.3", "@angular/language-service": "^16.1.8",
"@types/ckeditor": "^4.9.10",
"@types/express": "^4.17.0", "@types/express": "^4.17.0",
"@types/jasmine": "~3.6.0", "@types/jasmine": "~3.6.0",
"@types/jasminewd2": "~2.0.3", "@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1",
"@types/ckeditor": "^4.9.10",
"codelyzer": "^6.0.0", "codelyzer": "^6.0.0",
"jasmine-core": "~3.8.0", "jasmine-core": "~3.8.0",
"jasmine-spec-reporter": "~5.0.0", "jasmine-spec-reporter": "~5.0.0",
@ -62,6 +61,6 @@
"karma-jasmine-html-reporter": "^1.6.0", "karma-jasmine-html-reporter": "^1.6.0",
"protractor": "~7.0.0", "protractor": "~7.0.0",
"ts-node": "~7.0.0", "ts-node": "~7.0.0",
"typescript": "~4.6.4" "typescript": "~4.9.5"
} }
} }

View File

@ -2,17 +2,15 @@
<loading [full]="true"></loading> <loading [full]="true"></loading>
</div> </div>
<div *ngIf="loading == false"> <div *ngIf="loading == false">
<div class="sidebar_main_swipe" [class.sidebar_main_active]="open && hasSidebar" [class.sidebar_mini]="!open && hasSidebar" <div id="modal-container"></div>
<navbar *ngIf="hasHeader" portal="connect-admin" [header]="menuHeader" [communityId]="community ? community.communityId : null"
[userMenuItems]=userMenuItems [menuItems]="menuItems" [user]="user"></navbar>
<div class="sidebar_main_swipe uk-flex" [class.sidebar_main_active]="open && hasSidebar" [class.sidebar_mini]="!open && hasSidebar"
[class.sidebar_hover]="hover"> [class.sidebar_hover]="hover">
<div id="modal-container"></div>
<navbar *ngIf="hasHeader" portal="connect-admin" [header]="menuHeader" [communityId]="community ? community.communityId : null"
[userMenuItems]=userMenuItems [menuItems]="menuItems" [user]="user"></navbar>
<div>
<dashboard-sidebar *ngIf="hasSidebar" [items]="sideBarItems" [backItem]="backItem"></dashboard-sidebar> <dashboard-sidebar *ngIf="hasSidebar" [items]="sideBarItems" [backItem]="backItem"></dashboard-sidebar>
<main> <main class="uk-width-1-1">
<router-outlet></router-outlet> <router-outlet></router-outlet>
</main> </main>
</div>
</div> </div>
</div> </div>

@ -1 +1 @@
Subproject commit c12916583247fc225ee49c4851b8b4183edc2be0 Subproject commit 64e8919925eb283df124fc1bcef826a5b62bf991

View File

@ -42,7 +42,7 @@ import {ClearCacheService} from "../../../../openaireLibrary/services/clear-cach
<div class="uk-width-1-1"> <div class="uk-width-1-1">
<input #file id="photo" type="file" class="uk-hidden" (change)="fileChangeEvent($event)"/> <input #file id="photo" type="file" class="uk-hidden" (change)="fileChangeEvent($event)"/>
<div *ngIf="!communityFb.get('isUpload').value" class="uk-grid uk-grid-column-large" uk-grid> <div *ngIf="!communityFb.get('isUpload').value" class="uk-grid uk-grid-column-large" uk-grid>
<div class="uk-margin-top uk-width-auto@l uk-width-1-1"> <div class="uk-margin-xsmall-top uk-width-auto@l uk-width-1-1">
<div class="uk-grid uk-grid-column-large uk-flex-middle" uk-grid> <div class="uk-grid uk-grid-column-large uk-flex-middle" uk-grid>
<div class="uk-width-auto@l uk-width-1-1 uk-flex uk-flex-center"> <div class="uk-width-auto@l uk-width-1-1 uk-flex uk-flex-center">
<button class="uk-button uk-button-primary uk-flex uk-flex-middle uk-flex-wrap" <button class="uk-button uk-button-primary uk-flex uk-flex-middle uk-flex-wrap"

View File

@ -21,14 +21,14 @@ import {CustomizationOptions} from '../../openaireLibrary/connect/community/Cust
`, `,
styles:[ styles:[
` `
.color-input{ .color-input{
width:24px; width:24px;
height:14px; height:14px;
border-radius:3px; border-radius:3px;
border:0.1px solid #707070; border:0.1px solid #707070;
cursor: pointer; cursor: pointer;
}` }`
] ]
}) })

View File

@ -82,14 +82,14 @@
<div class="uk-card uk-card-default"> <div class="uk-card uk-card-default">
<div class="uk-card-body"> <div class="uk-card-body">
<h6 class="uk-margin-bottom"> <h6 class="uk-margin-bottom">
<a *ngIf="item.openaireId || (item.grantId && item.funder)" <a *ngIf="(item.openaireId || (item.grantId && item.funder)) && (!item['availableSince'] || !lastDBLoadDate || item['availableSince']<lastDBLoadDate)"
target="_blank" class="custom-external uk-link-text" target="_blank" class="custom-external uk-link-text"
[href]="projectUrl+'?' + ((item.openaireId) ? 'projectId='+item.openaireId : 'grantId='+item.grantId+'&funder='+item.funder)"> [href]="projectUrl+'?' + ((item.openaireId) ? 'projectId='+item.openaireId : 'grantId='+item.grantId+'&funder='+item.funder)">
<span *ngIf="item.name">{{item.name}}</span> <span *ngIf="item.name">{{item.name}}</span>
<span *ngIf="item.name && item.acronym"> (</span><span *ngIf="item.acronym">{{item.acronym}}</span><span *ngIf="item.name && item.acronym">)</span> <span *ngIf="item.name && item.acronym"> (</span><span *ngIf="item.acronym">{{item.acronym}}</span><span *ngIf="item.name && item.acronym">)</span>
<span *ngIf="!item.name && !item.acronym">[no title available]</span> <span *ngIf="!item.name && !item.acronym">[no title available]</span>
</a> </a>
<span *ngIf="!item.openaireId && !(item.grantId && item.funder)"> <span *ngIf="(!item.openaireId && !(item.grantId && item.funder) || (item['availableSince'] && lastDBLoadDate && item['availableSince'] >= lastDBLoadDate))">
<span *ngIf="item.name">{{item.name}}</span> <span *ngIf="item.name">{{item.name}}</span>
<span *ngIf="item.name && item.acronym"> (</span><span *ngIf="item.acronym">{{item.acronym}}</span><span *ngIf="item.name && item.acronym">)</span> <span *ngIf="item.name && item.acronym"> (</span><span *ngIf="item.acronym">{{item.acronym}}</span><span *ngIf="item.name && item.acronym">)</span>
<span *ngIf="!item.name && !item.acronym">[no title available]</span> <span *ngIf="!item.name && !item.acronym">[no title available]</span>

View File

@ -20,6 +20,7 @@ import {HelperFunctions} from "../../openaireLibrary/utils/HelperFunctions.class
import {NotificationHandler} from "../../openaireLibrary/utils/notification-handler"; import {NotificationHandler} from "../../openaireLibrary/utils/notification-handler";
import {ClearCacheService} from "../../openaireLibrary/services/clear-cache.service"; import {ClearCacheService} from "../../openaireLibrary/services/clear-cache.service";
import {debounceTime, distinctUntilChanged} from "rxjs/operators"; import {debounceTime, distinctUntilChanged} from "rxjs/operators";
import {IndexInfoService} from "../../openaireLibrary/utils/indexInfo.service";
@Component({ @Component({
selector: 'remove-projects', selector: 'remove-projects',
@ -63,18 +64,21 @@ export class RemoveProjectsComponent implements OnInit {
]; ];
public openaireEntiites = OpenaireEntities; public openaireEntiites = OpenaireEntities;
lastDBLoadDate = null;
constructor(private route: ActivatedRoute, private _router: Router, constructor(private route: ActivatedRoute, private _router: Router,
private _fb: UntypedFormBuilder, private _fb: UntypedFormBuilder,
private communityService: CommunityService, private communityService: CommunityService,
private _manageCommunityProjectsService: ManageCommunityProjectsService, private _manageCommunityProjectsService: ManageCommunityProjectsService,
private _searchCommunityProjectsService: SearchCommunityProjectsService, private _searchCommunityProjectsService: SearchCommunityProjectsService,
private _clearCacheService: ClearCacheService) { private _clearCacheService: ClearCacheService, private indexInfoService: IndexInfoService) {
this.errorCodes = new ErrorCodes(); this.errorCodes = new ErrorCodes();
this.communitySearchUtils.status = this.errorCodes.LOADING; this.communitySearchUtils.status = this.errorCodes.LOADING;
} }
ngOnInit() { ngOnInit() {
this.subscriptions.push(this.indexInfoService.getDBLoadLastDate(this.properties).subscribe(res => {
this.lastDBLoadDate = res;
}));
this.communitySearchUtils.keyword = ""; this.communitySearchUtils.keyword = "";
this.filterForm = this._fb.group({ this.filterForm = this._fb.group({
@ -254,4 +258,6 @@ export class RemoveProjectsComponent implements OnInit {
isSelected(value: string) { isSelected(value: string) {
return this.filterForm && this.filterForm.get('funder').value && this.filterForm.get('funder').value.id === value; return this.filterForm && this.filterForm.get('funder').value && this.filterForm.get('funder').value.id === value;
} }
} }

View File

@ -62,7 +62,7 @@ export class ZenodoCommunitiesComponent implements OnInit, OnDestroy {
this.masterZenodoCommunityId = this.community.zenodoCommunity; this.masterZenodoCommunityId = this.community.zenodoCommunity;
if (this.masterZenodoCommunityId) { if (this.masterZenodoCommunityId) {
this.subscriptions.push(this._zenodoCommunitieService.getZenodoCommunityById(this.properties, this.subscriptions.push(this._zenodoCommunitieService.getZenodoCommunityById(this.properties,
this.properties.zenodoCommunities + this.masterZenodoCommunityId).subscribe( this.masterZenodoCommunityId).subscribe(
result => { result => {
this.masterZenodoCommunity = result; this.masterZenodoCommunity = result;
this.selectedCommunities.unshift(this.masterZenodoCommunity); this.selectedCommunities.unshift(this.masterZenodoCommunity);
@ -113,7 +113,7 @@ export class ZenodoCommunitiesComponent implements OnInit, OnDestroy {
getZenodoCommunityById(zenodoid) { getZenodoCommunityById(zenodoid) {
this.subscriptions.push(this._zenodoCommunitieService.getZenodoCommunityById(this.properties, this.subscriptions.push(this._zenodoCommunitieService.getZenodoCommunityById(this.properties,
this.properties.zenodoCommunities + zenodoid).subscribe( zenodoid).subscribe(
result => { result => {
this.selectedCommunities.push(result); this.selectedCommunities.push(result);
this.zenodocommunitiesloadedCount++; this.zenodocommunitiesloadedCount++;

@ -1 +1 @@
Subproject commit d18e0a7e43e5ab74649481ecbf352ba49893c66f Subproject commit d1b2d5e585722751792d12645d17f820cd6a7860

@ -1 +1 @@
Subproject commit 2df4b377a3e89b7dd26a011a2e1e1f07fdcedf2a Subproject commit 2dadcf85926bc0f11fff22ed94dc197ddd8587c6

View File

@ -8,7 +8,7 @@ export let properties: EnvProperties = {
enablePiwikTrack: false, enablePiwikTrack: false,
useCache: false, useCache: false,
framesAPIURL: "https://beta.openaire.eu/stats3/", framesAPIURL: "https://beta.openaire.eu/stats3/",
claimsAPIURL: "https://beta.services.openaire.eu/claims/rest/claimsService/", claimsAPIURL: "https://beta.services.openaire.eu/claims-new/rest/claimsService/",
statisticsAPIURL: "https://beta.services.openaire.eu/stats-api/", statisticsAPIURL: "https://beta.services.openaire.eu/stats-api/",
statisticsFrameAPIURL: "https://beta.openaire.eu/stats/", statisticsFrameAPIURL: "https://beta.openaire.eu/stats/",
statisticsFrameNewAPIURL: "https://stats.madgik.di.uoa.gr/stats-api/", statisticsFrameNewAPIURL: "https://stats.madgik.di.uoa.gr/stats-api/",
@ -28,7 +28,7 @@ export let properties: EnvProperties = {
swhURL: "https://archive.softwareheritage.org/", swhURL: "https://archive.softwareheritage.org/",
sherpaURL: "http://www.sherpa.ac.uk/romeo/search.php?issn=", sherpaURL: "http://www.sherpa.ac.uk/romeo/search.php?issn=",
zenodo: "https://zenodo.org/", zenodo: "https://zenodo.org/",
zenodoCommunities: "https://zenodo.org/api/communities/", zenodoCommunities: "https://zenodo.org/api/communities",
openAccess: "https://www.openaire.eu/support/faq#article-id-234", openAccess: "https://www.openaire.eu/support/faq#article-id-234",
openAccessRepo: "https://www.openaire.eu/support/faq#article-id-310", openAccessRepo: "https://www.openaire.eu/support/faq#article-id-310",
fp7Guidlines: "https://www.openaire.eu/open-access-in-fp7-seventh-research-framework-programme", fp7Guidlines: "https://www.openaire.eu/open-access-in-fp7-seventh-research-framework-programme",

View File

@ -28,7 +28,7 @@ export let properties: EnvProperties = {
swhURL: "https://archive.softwareheritage.org/", swhURL: "https://archive.softwareheritage.org/",
sherpaURL: "http://www.sherpa.ac.uk/romeo/search.php?issn=", sherpaURL: "http://www.sherpa.ac.uk/romeo/search.php?issn=",
zenodo: "https://zenodo.org/", zenodo: "https://zenodo.org/",
zenodoCommunities: "https://zenodo.org/api/communities/", zenodoCommunities: "https://zenodo.org/api/communities",
openAccess: "https://www.openaire.eu/support/faq#article-id-234", openAccess: "https://www.openaire.eu/support/faq#article-id-234",
openAccessRepo: "https://www.openaire.eu/support/faq#article-id-310", openAccessRepo: "https://www.openaire.eu/support/faq#article-id-310",
fp7Guidlines: "https://www.openaire.eu/open-access-in-fp7-seventh-research-framework-programme", fp7Guidlines: "https://www.openaire.eu/open-access-in-fp7-seventh-research-framework-programme",

View File

@ -33,7 +33,7 @@ export let properties: EnvProperties = {
swhURL: "https://archive.softwareheritage.org/", swhURL: "https://archive.softwareheritage.org/",
sherpaURL: 'http://www.sherpa.ac.uk/romeo/search.php?issn=', sherpaURL: 'http://www.sherpa.ac.uk/romeo/search.php?issn=',
zenodo: 'https://zenodo.org/', zenodo: 'https://zenodo.org/',
zenodoCommunities: 'https://zenodo.org/api/communities/', zenodoCommunities: 'https://zenodo.org/api/communities',
openAccess: 'https://www.openaire.eu/support/faq#article-id-234', openAccess: 'https://www.openaire.eu/support/faq#article-id-234',
openAccessRepo: 'https://www.openaire.eu/support/faq#article-id-310', openAccessRepo: 'https://www.openaire.eu/support/faq#article-id-310',
fp7Guidlines: 'https://www.openaire.eu/open-access-in-fp7-seventh-research-framework-programme', fp7Guidlines: 'https://www.openaire.eu/open-access-in-fp7-seventh-research-framework-programme',

View File

@ -1,5 +1,5 @@
@use "sass:meta"; @use "sass:meta";
@import "~interactiveminingv3/assets/css/variables.css"; @import "node_modules/interactiveminingv3/assets/css/variables.css";
.mining { .mining {

View File

@ -7,8 +7,6 @@ import {
platformBrowserDynamicTesting platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing'; } from '@angular/platform-browser-dynamic/testing';
declare const require: any;
// First, initialize the Angular testing environment. // First, initialize the Angular testing environment.
getTestBed().initTestEnvironment( getTestBed().initTestEnvironment(
BrowserDynamicTestingModule, BrowserDynamicTestingModule,
@ -16,7 +14,3 @@ getTestBed().initTestEnvironment(
teardown: { destroyAfterEach: false } teardown: { destroyAfterEach: false }
} }
); );
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);

View File

@ -10,13 +10,14 @@
"moduleResolution": "node", "moduleResolution": "node",
"experimentalDecorators": true, "experimentalDecorators": true,
"importHelpers": true, "importHelpers": true,
"target": "es2020", "target": "ES2022",
"typeRoots": [ "typeRoots": [
"node_modules/@types" "node_modules/@types"
], ],
"lib": [ "lib": [
"es2018", "es2018",
"dom" "dom"
] ],
"useDefineForClassFields": false
} }
} }