diff --git a/sharedComponents/tabs/slider-tabs.component.ts b/sharedComponents/tabs/slider-tabs.component.ts
index d4246f23..666f90a2 100644
--- a/sharedComponents/tabs/slider-tabs.component.ts
+++ b/sharedComponents/tabs/slider-tabs.component.ts
@@ -6,11 +6,14 @@ import {
ElementRef, EventEmitter,
Input, OnDestroy, Output,
QueryList,
- ViewChild
+ ViewChild,
+ Inject,
+ PLATFORM_ID
} from "@angular/core";
import {SliderTabComponent} from "./slider-tab.component";
import {ActivatedRoute, Router} from "@angular/router";
import {Subscription} from "rxjs";
+import {isPlatformServer} from "@angular/common";
import Timeout = NodeJS.Timeout;
declare var UIkit;
@@ -20,7 +23,7 @@ declare var UIkit;
template: `
-
`,
})
@@ -112,6 +117,11 @@ export class SliderTabsComponent implements AfterViewInit, OnDestroy {
* */
@Input()
public flexPosition: 'center' | 'left' | 'right' = 'left';
+ /**
+ * Set a class for the container
+ * */
+ @Input()
+ public containerClass: string;
/**
* Set a class above tabs
* */
@@ -138,10 +148,13 @@ export class SliderTabsComponent implements AfterViewInit, OnDestroy {
private subscriptions: any[] = [];
private observer: IntersectionObserver;
private timeout: Timeout;
+ isServer: boolean;
constructor(private route: ActivatedRoute,
private router: Router,
- private cdr: ChangeDetectorRef) {
+ private cdr: ChangeDetectorRef,
+ @Inject(PLATFORM_ID) private platform: any) {
+ this.isServer = isPlatformServer(this.platform);
}
ngAfterViewInit() {
@@ -164,7 +177,7 @@ export class SliderTabsComponent implements AfterViewInit, OnDestroy {
}
});
if (this.type === 'static') {
- let tabs = UIkit.tab(this.tabsElement.nativeElement, {connect: this.connect});
+ let tabs = UIkit.switcher(this.tabsElement.nativeElement, {connect: this.connect});
tabs.show(this.activeIndex);
if (this.connect.includes('#')) {
this.scrollToStart();
diff --git a/utils/email/composer.ts b/utils/email/composer.ts
index 676dc4c2..ab3c69f0 100644
--- a/utils/email/composer.ts
+++ b/utils/email/composer.ts
@@ -2,6 +2,7 @@ import {Email} from "./email";
import {Body} from "./body";
import {properties} from "../../../../environments/environment";
import {User} from "../../login/utils/helper.class";
+import {StakeholderConfiguration} from "../../monitor-admin/utils/indicator-utils";
export class Composer {
private static noteBodySize = "14px";
@@ -335,13 +336,13 @@ export class Composer {
email.subject = 'National Open Access Monitor Ireland | ' + name;
email.recipient = recipient;
email.body = '
Dear user,
' +
- '
You have been invited to be a ' + role +' of the for the National Open Access Monitor, Ireland dashboard for the ' + name + '.
' +
+ '
You have been invited to be a ' + StakeholderConfiguration.ROLES[role] +' of the for the National Open Access Monitor, Ireland dashboard for the ' + name + '.
' +
'
Click this URL and use the verification code below to accept the invitation.
' +
'
The verification code is ((__code__)).
' +
'
At your first sign in you will be asked to accept and consent to the "OpenAIRE Personal Data Protection Policy and Consent Form" to be able to use the service.
' +
(role === "manager"?
- '
As a manager of the National Open Access Monitor, Ireland, you will have access to the administration part of the dashboard, where you will be able to also invite other users to become managers.
':
- '
As a member of the OpenAIRE Monitor Dashboard, you will have access to the restricted access areas of the profile for the ' + name + '.') +
+ '
As a ' + StakeholderConfiguration.ROLES[role] + ' of the National Open Access Monitor, Ireland, you will have access to the administration part of the dashboard, where you will be able to also invite other users to become ' + StakeholderConfiguration.ROLES['member'] + 's.
':
+ '
As a ' + StakeholderConfiguration.ROLES[role] + ' of the National Open Access Monitor, Ireland, you will have access to the sandbox of the profile for the ' + name + '.') +
'
Please contact us at ' + properties.helpdeskEmail +
' if you have any questions or concerns.
' +
'
Kind Regards
The OpenAIRE Team
' +
diff --git a/utils/properties/environments/environment.ts b/utils/properties/environments/environment.ts
index fb86e5d4..283a1295 100644
--- a/utils/properties/environments/environment.ts
+++ b/utils/properties/environments/environment.ts
@@ -23,7 +23,7 @@ export let common: EnvProperties = {
rorURL: "https://ror.org/",
isniURL: "https://isni.org/isni/",
wikiDataURL: "https://www.wikidata.org/wiki/",
- fundRefURL: "https://api.crossref.org/funders/",
+ fundRefURL: "https://data.crossref.org/fundingdata/funder/",
fairSharingURL: "https://fairsharing.org/",
eoscMarketplaceURL: "https://marketplace.eosc-portal.eu/services/",
sherpaURL: "http://sherpa.ac.uk/romeo/issn/",
diff --git a/utils/properties/searchFields.base.ts b/utils/properties/searchFields.base.ts
index 79ece5b3..a029a42e 100644
--- a/utils/properties/searchFields.base.ts
+++ b/utils/properties/searchFields.base.ts
@@ -333,6 +333,14 @@ export class SearchFieldsBase {
operator: "pf",
equalityOperator: " = ",
filterType: "triplet"
+ },
+ ["haslicense"]: {
+ name: "License",
+ type: "triplet",
+ param: "haslicense",
+ operator: "hl",
+ equalityOperator: " = ",
+ filterType: "triplet"
}
};
@@ -369,6 +377,11 @@ export class SearchFieldsBase {
{ name: "All", id: "", count: "0" },
{ name: "Yes", id: "true", count: "0" },
{ name: "No", id: "false", count: "0" }
+ ],
+ ["haslicense"]: [
+ { name: "All", id: "", count: "0" },
+ { name: "Yes", id: "true", count: "0" },
+ { name: "No", id: "false", count: "0" }
]
};
@@ -784,8 +797,8 @@ export class SearchFieldsBase {
//ORGANIZATION
- public ORGANIZATION_REFINE_FIELDS: string[] = ["country"]
- public ORGANIZATION_ADVANCED_FIELDS: string[] = ["q", "organizationlegalname", "organizationlegalshortname", "country"];
+ public ORGANIZATION_REFINE_FIELDS: string[] = ["countrynojurisdiction"]
+ public ORGANIZATION_ADVANCED_FIELDS: string[] = ["q", "organizationlegalname", "organizationlegalshortname", "countrynojurisdiction", "pid"];
public ORGANIZATION_FIELDS: { [key: string]: FieldDetails } = {
["q"]: {name: "Any field", type: "keyword", param: "q", operator: "op", equalityOperator: "=", filterType: null},
@@ -805,7 +818,7 @@ export class SearchFieldsBase {
equalityOperator: "=",
filterType: null
},
- ["country"]: {
+ ["countrynojurisdiction"]: {
name: "Country",
type: "vocabulary",
param: "country",
@@ -813,6 +826,7 @@ export class SearchFieldsBase {
equalityOperator: " exact ",
filterType: "checkbox"
},
+ ["pid"]: {name: "PID", type: "keyword", param: "pid", operator: "pd", equalityOperator: " exact ", filterType: null}
};
// public ORGANIZATION_INDEX:string[] = ["organizationcountryname"]//,"organizationeclegalbody"];
// public ADVANCED_SEARCH_ORGANIZATION_PARAM:string[] = ["q","contenttype","compatibility","country","type"];
@@ -948,7 +962,7 @@ export class SearchFieldsBase {
return "and";
} else if (fieldId == "instancetypename" || fieldId == "eoscdatasourcetype"
|| fieldId == "resultlanguagename" || fieldId == "datasourceodlanguages"
- || fieldId == "datasourcecompatibilityname" || fieldId == "country" || fieldId == "datasourceodcontenttypes"
+ || fieldId == "datasourcecompatibilityname" || fieldId == "country" || fieldId == "countrynojurisdiction" || fieldId == "datasourceodcontenttypes"
|| fieldId == "resulthostingdatasource" || fieldId == "collectedfrom") {
return "or";
}
diff --git a/utils/result-preview/result-preview.module.ts b/utils/result-preview/result-preview.module.ts
index 5ad90baf..12726cc6 100644
--- a/utils/result-preview/result-preview.module.ts
+++ b/utils/result-preview/result-preview.module.ts
@@ -4,15 +4,15 @@ import {ResultPreviewComponent} from "./result-preview.component";
import {RouterModule} from "@angular/router";
import {ShowAuthorsModule} from "../authors/showAuthors.module";
import {ResultLandingUtilsModule} from "../../landingPages/landing-utils/resultLandingUtils.module";
-import {OrcidModule} from "../../orcid/orcid.module";
import {IconsModule} from "../icons/icons.module";
import {IconsService} from "../icons/icons.service";
import {cite, fire, landmark, link, link_to, quotes, rocket} from "../icons/icons";
import {EntityActionsModule} from "../entity-actions/entity-actions.module";
import {EntityMetadataModule} from "../../landingPages/landing-utils/entity-metadata.module";
+import {OrcidCoreModule} from "../../orcid/orcid-core.module";
@NgModule({
- imports: [CommonModule, RouterModule, ShowAuthorsModule, ResultLandingUtilsModule, OrcidModule, IconsModule, EntityActionsModule, EntityMetadataModule],
+ imports: [CommonModule, RouterModule, ShowAuthorsModule, ResultLandingUtilsModule, OrcidCoreModule, IconsModule, EntityActionsModule, EntityMetadataModule],
declarations: [ResultPreviewComponent],
exports: [ResultPreviewComponent]
})
diff --git a/utils/string-utils.class.ts b/utils/string-utils.class.ts
index cbce9848..3ccf6e6b 100644
--- a/utils/string-utils.class.ts
+++ b/utils/string-utils.class.ts
@@ -150,7 +150,7 @@ export class DOI {
}
export class Identifier {
- class: "doi" | "pmc" | "pmid" | "handle" | "ORCID" | "re3data" | "swhid" = null;
+ class: "doi" | "pmc" | "pmid" | "handle" | "ORCID" | "re3data" | "swhid" | "ror" | "wikidata" | "fundref" | "isni" = null;
id: string;
public static getDOIsFromString(str: string): string[] {
@@ -205,14 +205,22 @@ export class Identifier {
return {"class": "re3data", "id": pid};
} else if (Identifier.isValidSwhId(pid)) {
return {"class": "swhid", "id": pid};
+ } else if (Identifier.isValidRor(pid)) {
+ return {"class": "ror", "id": pid};
+ } else if (Identifier.isValidFundRef(pid)) {
+ return {"class": "fundref", "id": pid};
+ } else if (Identifier.isValidWikidata(pid)) {
+ return {"class": "wikidata", "id": pid};
+ } else if (Identifier.isValidIsni(pid)) {
+ return {"class": "isni", "id": pid};
}
//set it as a doi, to catch the case that doi has not valid format
return (strict?null:{"class": "doi", "id": pid});
}
public static getPIDFromIdentifiers(identifiers: Map
): Identifier {
- let classes:string [] = ["doi", "handle", "pmc", "pmid", "re3data", "swhid"];
- if(identifiers) {
+ let classes:string [] = ["doi", "handle", "pmc", "pmid", "re3data", "swhid", "ror", "wikidata", "fundref", "isni"];
+ if(identifiers && identifiers.size > 0) {
for (let cl of classes) {
if (identifiers.get(cl)) {
for (let pid of identifiers.get(cl)) {
@@ -258,6 +266,7 @@ export class Identifier {
}
public static isValidHANDLE(str: string): boolean {
+ // let exp = /\b[0-9a-zA-Z-]*\/[0-9a-zA-Z-]*$/g; // resolve with url - need to add method for raw value
let exp = /^[0-9a-zA-Z-]*\/[0-9a-zA-Z-]*$/g;
return str.match(exp) != null;
}
@@ -272,6 +281,28 @@ export class Identifier {
let exp = /swh:1:snp:[0-9a-f]{40}/g;
return str.match(exp) != null;
}
+
+ public static isValidRor(str: string): boolean {
+ let exp = /0[a-z|0-9]{6}[0-9]{2}\b/g;
+ return str.match(exp) != null;
+ }
+
+ public static isValidIsni(str: string): boolean {
+ let exp = /^[0]{7}[0-9]{8}[0-9X]$/g;
+ return str.match(exp) != null;
+ }
+
+ public static isValidWikidata(str: string): boolean {
+ let exp = /^Q\d+$/g;
+ return str.match(exp) != null;
+ }
+
+ public static isValidFundRef(str: string): boolean {
+ // let exp = /aaa/g;
+ let exp = /^[1-9]\d+$/g;
+ return str.match(exp) != null;
+ }
+
}
export class StringUtils {
diff --git a/utils/transition-group/transition-group.component.ts b/utils/transition-group/transition-group.component.ts
index 53530868..8cea910d 100644
--- a/utils/transition-group/transition-group.component.ts
+++ b/utils/transition-group/transition-group.component.ts
@@ -1,6 +1,6 @@
import {TransitionGroupItemDirective} from "./transition-group-item.directive";
import {
- AfterViewInit,
+ AfterViewInit, ChangeDetectorRef,
Component,
ContentChildren,
ElementRef, Input,
@@ -29,15 +29,14 @@ export class TransitionGroupComponent implements AfterViewInit, OnDestroy {
@ContentChildren(TransitionGroupItemDirective) items: QueryList;
@Input()
public id: string;
- private disabled: boolean = false;
+ public size: number;
private subscription: Subscription;
constructor(public element: ElementRef) {}
ngAfterViewInit() {
- this.init();
this.subscription = this.items.changes.subscribe(items => {
- if(!this.disabled) {
+ if(items.length === this.size) {
items.forEach(item => item.prevPos = item.newPos || item.prevPos);
items.forEach(this.runCallback);
this.refreshPosition('newPos');
@@ -80,6 +79,7 @@ export class TransitionGroupComponent implements AfterViewInit, OnDestroy {
init() {
this.refreshPosition('prevPos');
this.refreshPosition('newPos');
+ this.size = this.items.length;
}
runCallback(item: TransitionGroupItemDirective) {
@@ -126,17 +126,17 @@ export class TransitionGroupComponent implements AfterViewInit, OnDestroy {
/**
* Enable transition
- *
+ * @deprecated
* */
enable() {
- this.disabled = false;
+ console.debug('Deprecated')
}
/**
* Disable transition
- *
+ * @deprecated
* */
disable() {
- this.disabled = true;
+ console.debug('Deprecated')
}
}