Revision 58240
Added by Konstantinos Triantafyllou about 4 years ago
modules/uoa-services-library/branches/landing-redesign/ng-openaire-library/src/app/searchPages/searchUtils/highlight/highlight.component.ts | ||
---|---|---|
1 | 1 |
import {Component, Input, OnInit} from "@angular/core"; |
2 | 2 |
import {StringUtils} from "../../../utils/string-utils.class"; |
3 |
import {Organization, Project} from "../../../utils/entities/searchResult";
|
|
3 |
import {Organization, Project} from "../../../utils/result-preview/result-preview";
|
|
4 | 4 |
|
5 | 5 |
export interface Keyword { |
6 | 6 |
field: string, |
... | ... | |
68 | 68 |
} |
69 | 69 |
return false; |
70 | 70 |
} |
71 |
} |
|
71 |
} |
modules/uoa-services-library/branches/landing-redesign/ng-openaire-library/src/app/landingPages/landing-utils/parsingFunctions.class.ts | ||
---|---|---|
1 |
import {Project} from "../../utils/entities/searchResult"; |
|
2 |
import {HostedByCollectedFrom, Journal, RelationResult} from "../../utils/entities/resultLandingInfo"; |
|
1 |
import {HostedByCollectedFrom, Journal, Project, RelationResult} from "../../utils/result-preview/result-preview"; |
|
3 | 2 |
|
4 | 3 |
export class ParsingFunctions { |
5 | 4 |
|
... | ... | |
12 | 11 |
public parseFundingByProjects(fundedByProjects: Project[], relation: any, |
13 | 12 |
provenanceActionVocabulary: any): Project[] { |
14 | 13 |
if (fundedByProjects == undefined) { |
15 |
fundedByProjects = new Array<{ |
|
16 |
"id": string, "acronym": string, "title": string, |
|
17 |
"funderShortname": string, "funderName": string, |
|
18 |
"funding": string, "code": string, |
|
19 |
"provenanceAction": string, "inline": boolean |
|
20 |
}>(); |
|
14 |
fundedByProjects = []; |
|
21 | 15 |
} |
22 | 16 |
|
23 |
let fundedByProject: { |
|
24 |
"id": string, "acronym": string, "title": string, |
|
25 |
"funderShortname": string, "funderName": string, |
|
26 |
"funding": string, "code": string, |
|
27 |
"provenanceAction": string, "inline": boolean |
|
28 |
} = { |
|
17 |
let fundedByProject: Project = { |
|
29 | 18 |
"id": "", "acronym": "", "title": "", |
30 | 19 |
"funderShortname": "", "funderName": "", |
31 | 20 |
"funding": "", "code": "", "provenanceAction": "", "inline": false |
modules/uoa-services-library/branches/landing-redesign/ng-openaire-library/src/app/landingPages/landing-utils/landing-header/landing-header.component.ts | ||
---|---|---|
1 | 1 |
import {Component, Input} from "@angular/core"; |
2 | 2 |
import {EnvProperties} from "../../../utils/properties/env-properties"; |
3 |
import {Author} from "../../../utils/entities/searchResult";
|
|
3 |
import {Author} from "../../../utils/result-preview/result-preview";
|
|
4 | 4 |
|
5 | 5 |
@Component({ |
6 | 6 |
selector: 'landing-header', |
... | ... | |
96 | 96 |
tooltipContent += "</div>"; |
97 | 97 |
return tooltipContent; |
98 | 98 |
} |
99 |
} |
|
99 |
} |
modules/uoa-services-library/branches/landing-redesign/ng-openaire-library/src/app/landingPages/result/resultLanding.service.ts | ||
---|---|---|
5 | 5 |
import {EnvProperties} from '../../utils/properties/env-properties'; |
6 | 6 |
import {ParsingFunctions} from '../landing-utils/parsingFunctions.class'; |
7 | 7 |
import {map, tap} from "rxjs/operators"; |
8 |
import {Organization} from "../../utils/entities/searchResult";
|
|
8 |
import {Organization} from "../../utils/result-preview/result-preview";
|
|
9 | 9 |
|
10 | 10 |
@Injectable() |
11 | 11 |
export class ResultLandingService { |
modules/uoa-services-library/branches/landing-redesign/ng-openaire-library/src/app/landingPages/result/resultLanding.component.ts | ||
---|---|---|
1 |
import {ChangeDetectorRef, Component, ElementRef, Input, ViewChild} from '@angular/core';
|
|
1 |
import {ChangeDetectorRef, Component, Input, ViewChild} from '@angular/core'; |
|
2 | 2 |
import {ActivatedRoute, Router} from '@angular/router'; |
3 | 3 |
import {Meta, Title} from '@angular/platform-browser'; |
4 | 4 |
|
5 | 5 |
import {EnvProperties} from '../../utils/properties/env-properties'; |
6 |
import {RelationResult, ResultLandingInfo} from '../../utils/entities/resultLandingInfo';
|
|
6 |
import {ResultLandingInfo} from '../../utils/entities/resultLandingInfo'; |
|
7 | 7 |
import {RouterHelper} from '../../utils/routerHelper.class'; |
8 | 8 |
|
9 | 9 |
import {PiwikService} from '../../utils/piwik/piwik.service'; |
... | ... | |
13 | 13 |
import {HelperService} from '../../utils/helper/helper.service'; |
14 | 14 |
import {Location} from "@angular/common"; |
15 | 15 |
import {MetricsService} from "../../services/metrics.service"; |
16 |
import {ResultPreview} from "../../utils/result-preview/result-preview"; |
|
17 |
import {Organization} from "../../utils/entities/searchResult"; |
|
16 |
import {Organization, RelationResult, ResultPreview} from "../../utils/result-preview/result-preview"; |
|
18 | 17 |
|
19 | 18 |
|
20 | 19 |
@Component({ |
modules/uoa-services-library/branches/landing-redesign/ng-openaire-library/src/app/utils/entities/searchResult.ts | ||
---|---|---|
1 |
export interface Project { |
|
2 |
id: string; |
|
3 |
acronym: string; |
|
4 |
title: string; |
|
5 |
funderShortname: string; |
|
6 |
funderName: string; |
|
7 |
funding?: string; |
|
8 |
code: string; |
|
9 |
budget?: string; |
|
10 |
contribution?: string; |
|
11 |
currency?: string; |
|
12 |
provenanceAction?: string; |
|
13 |
inline?: boolean |
|
14 |
} |
|
1 |
import {Author, Organization, Project, ResultTitle} from "../result-preview/result-preview"; |
|
15 | 2 |
|
16 |
export interface Author { |
|
17 |
fullName: string; |
|
18 |
orcid: string; |
|
19 |
} |
|
20 |
|
|
21 |
export interface ResultTitle { |
|
22 |
name: string; |
|
23 |
accessMode: string; |
|
24 |
sc39: string; |
|
25 |
} |
|
26 |
|
|
27 |
export interface Organization { |
|
28 |
id: string; |
|
29 |
name: string; |
|
30 |
shortname?: string; |
|
31 |
websiteUrl?: string; |
|
32 |
country?: string; |
|
33 |
trust?: number; |
|
34 |
} |
|
35 |
|
|
36 | 3 |
export class SearchResult { |
37 | 4 |
title: ResultTitle; |
38 | 5 |
id: string; |
modules/uoa-services-library/branches/landing-redesign/ng-openaire-library/src/app/utils/entities/resultLandingInfo.ts | ||
---|---|---|
1 |
import {Author, Organization, Project} from "./searchResult"; |
|
1 |
import { |
|
2 |
Author, |
|
3 |
HostedByCollectedFrom, |
|
4 |
Journal, |
|
5 |
Organization, |
|
6 |
Project, |
|
7 |
RelationResult |
|
8 |
} from "../result-preview/result-preview"; |
|
2 | 9 |
|
3 |
export interface HostedByCollectedFrom { |
|
4 |
downloadName: string; |
|
5 |
downloadUrl: string[]; |
|
6 |
collectedName: string; |
|
7 |
collectedId: string; |
|
8 |
accessMode: string[]; |
|
9 |
bestAccessMode: string; |
|
10 |
type: string; |
|
11 |
year: string; |
|
12 |
} |
|
13 |
|
|
14 |
export interface Journal { |
|
15 |
journal?: string; |
|
16 |
issn?: string; |
|
17 |
lissn: string; |
|
18 |
eissn?: string; |
|
19 |
issue?: string; |
|
20 |
volume?: string; |
|
21 |
start_page?: string; |
|
22 |
end_page?: string; |
|
23 |
} |
|
24 |
|
|
25 |
export interface RelationResult { |
|
26 |
name: string; |
|
27 |
id: string; |
|
28 |
date: string; |
|
29 |
percentage: number; |
|
30 |
class: string |
|
31 |
provenanceAction?: string; |
|
32 |
} |
|
33 |
|
|
34 | 10 |
export class ResultLandingInfo { |
35 | 11 |
// PUBLICATION, DATASET, SOFTWARE, ORP |
36 | 12 |
record; |
modules/uoa-services-library/branches/landing-redesign/ng-openaire-library/src/app/utils/authors/showAuthors.component.ts | ||
---|---|---|
4 | 4 |
import {RouterHelper} from "../routerHelper.class"; |
5 | 5 |
import {EnvProperties} from '../properties/env-properties'; |
6 | 6 |
import {isPlatformBrowser} from "@angular/common"; |
7 |
import {Author} from "../entities/searchResult";
|
|
7 |
import {Author} from "../result-preview/result-preview";
|
|
8 | 8 |
|
9 | 9 |
@Component({ |
10 | 10 |
selector: 'showAuthors', |
modules/uoa-services-library/branches/landing-redesign/ng-openaire-library/src/app/utils/result-preview/result-preview.ts | ||
---|---|---|
1 |
import {Author, Organization, Project, SearchResult} from "../entities/searchResult";
|
|
2 |
import {HostedByCollectedFrom, RelationResult, ResultLandingInfo} from "../entities/resultLandingInfo";
|
|
1 |
import {SearchResult} from "../entities/searchResult"; |
|
2 |
import {ResultLandingInfo} from "../entities/resultLandingInfo"; |
|
3 | 3 |
import {OrganizationInfo} from "../entities/organizationInfo"; |
4 | 4 |
|
5 |
export interface HostedByCollectedFrom { |
|
6 |
downloadName: string; |
|
7 |
downloadUrl: string[]; |
|
8 |
collectedName: string; |
|
9 |
collectedId: string; |
|
10 |
accessMode: string[]; |
|
11 |
bestAccessMode: string; |
|
12 |
type: string; |
|
13 |
year: string; |
|
14 |
} |
|
15 |
|
|
16 |
export interface Journal { |
|
17 |
journal?: string; |
|
18 |
issn?: string; |
|
19 |
lissn: string; |
|
20 |
eissn?: string; |
|
21 |
issue?: string; |
|
22 |
volume?: string; |
|
23 |
start_page?: string; |
|
24 |
end_page?: string; |
|
25 |
} |
|
26 |
|
|
27 |
export interface RelationResult { |
|
28 |
name: string; |
|
29 |
id: string; |
|
30 |
date: string; |
|
31 |
percentage: number; |
|
32 |
class: string |
|
33 |
provenanceAction?: string; |
|
34 |
} |
|
35 |
|
|
36 |
export interface Project { |
|
37 |
id: string; |
|
38 |
acronym: string; |
|
39 |
title: string; |
|
40 |
funderShortname: string; |
|
41 |
funderName: string; |
|
42 |
funding?: string; |
|
43 |
code: string; |
|
44 |
budget?: string; |
|
45 |
contribution?: string; |
|
46 |
currency?: string; |
|
47 |
provenanceAction?: string; |
|
48 |
inline?: boolean |
|
49 |
} |
|
50 |
|
|
51 |
export interface Author { |
|
52 |
fullName: string; |
|
53 |
orcid: string; |
|
54 |
} |
|
55 |
|
|
56 |
export interface ResultTitle { |
|
57 |
name: string; |
|
58 |
accessMode: string; |
|
59 |
sc39: string; |
|
60 |
} |
|
61 |
|
|
62 |
export interface Organization { |
|
63 |
id: string; |
|
64 |
name: string; |
|
65 |
shortname?: string; |
|
66 |
websiteUrl?: string; |
|
67 |
country?: string; |
|
68 |
trust?: number; |
|
69 |
} |
|
70 |
|
|
5 | 71 |
export class ResultPreview { |
6 | 72 |
id: string; |
7 | 73 |
title: string; |
... | ... | |
187 | 253 |
return resultPreview; |
188 | 254 |
} |
189 | 255 |
|
190 |
} |
|
256 |
} |
Also available in: Unified diff
[Library | Landing-redesign]: Move all related interfaces to result-preview