Skip to content

Commit

Permalink
Merge branch 'main' into feat/docker-builds
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesw authored Oct 9, 2024
2 parents 0c088a0 + f200a93 commit cb6d9d3
Show file tree
Hide file tree
Showing 64 changed files with 1,199 additions and 71 deletions.
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
## v2.105.7 - 2024-10-02

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.105.6...v2.105.7)

- [#2358](https://github.com/ORCID/orcid-angular/pull/2358): lmendoza/fixes-oct-1
- [#2359](https://github.com/ORCID/orcid-angular/pull/2359): tx pull

## v2.105.6 - 2024-09-26

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.105.5...v2.105.6)

- [#2355](https://github.com/ORCID/orcid-angular/pull/2355): Observability
- [#2354](https://github.com/ORCID/orcid-angular/pull/2354): lmendoza/sep-25-batch-of-fixes

## v2.105.5 - 2024-09-25

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.105.4...v2.105.5)

- [#2353](https://github.com/ORCID/orcid-angular/pull/2353): 24-sep-bach-fixes

## v2.105.4 - 2024-09-24

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.105.3...v2.105.4)

- [#2352](https://github.com/ORCID/orcid-angular/pull/2352): summary-batch-update-sep

## v2.105.3 - 2024-09-19

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.105.2...v2.105.3)

## v2.105.2 - 2024-09-13

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.105.1...v2.105.2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ export class SummarySimplePanelComponent implements OnInit {
constructor(@Inject(WINDOW) private _window: Window) {}

ngOnInit(): void {
this.acitivityCountOverflow = this.simpleActivities.length > 3
this.acitivityCountOverflow =
this.simpleActivities.length > 3 || this.count > 3
this.simpleActivities = this.simpleActivities.slice(0, 3)
}
goToUrl(url?: string, event?: KeyboardEvent) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,38 @@ <h1 class="orc-font-body-large">
[activitySection]="'affiliations'"
></app-summary-panel>
</ng-container>
<ng-container *ngIf="emailDomains?.length >= 1">
<a
tabindex="0"
rel="noopener noreferrer"
(click)="goToActivitySection('emails-panel')"
(keydown)="goToActivitySection('emails-panel', $event)"
[attr.aria-label]="ariaLabelEmailDomains"
(mouseenter)="emailDomainsHover = true"
(mouseleave)="emailDomainsHover = false"
>
<h3
class="orc-font-small-print"
i18n="@@summary.emailDomains"
[ngClass]="{ 'hover-effect': emailDomainsHover }"
>
EMAIL DOMAINS
</h3>
</a>
<app-summary-simple-panel
[simpleActivities]="emailDomains"
[count]="trustedSummary.emailDomainsCount"
[overflowUrl]="trustedSummary?.orcid + '#emails-panel'"
[moreLabel]="labelMoreEmailDomains"
[moreLabelSingular]="labelMoreEmailDomain"
[ariaLabelActivitySection]="labelMoreEmailDomains"
[hoverEffect]="emailDomainsHover"
[standaloneMode]="standaloneMode"
[activitySection]="'emails-panel'"
[trustedSummary]="trustedSummary"
*ngIf="!loading"
></app-summary-simple-panel>
</ng-container>
<ng-container *ngIf="lastUpdateDate || creationDateWithOffset">
<h3 class="orc-font-small-print" i18n="@@summary.keyDates">
KEY DATES
Expand Down Expand Up @@ -193,7 +225,12 @@ <h3 class="orc-font-small-print" i18n="@@summary.keyDates">
<div
class="column"
[ngClass]="{ 'column-border': !mobile && threeColumns }"
*ngIf="peerReviews?.length || works?.length || funds?.length"
*ngIf="
peerReviews?.length ||
works?.length ||
funds?.length ||
researchResoruces?.length
"
>
<ng-container *ngIf="works?.length">
<a
Expand Down Expand Up @@ -271,12 +308,39 @@ <h3 class="orc-font-small-print" i18n="@@summary.keyDates">
[simpleActivities]="funds"
></app-summary-simple-panel>
</ng-container>
<ng-container *ngIf="researchResoruces?.length">
<a
tabindex="0"
rel="noopener noreferrer"
(mouseenter)="researchResorucesHover = true"
(mouseleave)="researchResorucesHover = false"
(click)="goToActivitySection('research-resources')"
(keydown)="goToActivitySection('research-resources', $event)"
[attr.aria-label]="ariaLabelResearchResources"
>
<h3
class="orc-font-small-print"
[ngClass]="{
'hover-effect': researchResorucesHover
}"
i18n="@@summary.researchResources"
>
RESEARCH RESOURCES
</h3>
</a>

<app-summary-simple-panel
[hoverEffect]="researchResorucesHover"
[simpleActivities]="researchResoruces"
></app-summary-simple-panel>
</ng-container>
</div>
<div
class="column"
*ngIf="
trustedSummary.professionalActivities?.length ||
externalIdentifiers?.length
externalIdentifiers?.length ||
trustedSummary.educationQualifications?.length
"
>
<ng-container *ngIf="trustedSummary.professionalActivities?.length">
Expand Down Expand Up @@ -311,13 +375,47 @@ <h3 class="orc-font-small-print" i18n="@@summary.keyDates">
[activitySection]="'professional-activities'"
></app-summary-panel>
</ng-container>
<ng-container *ngIf="trustedSummary.educationQualifications?.length">
<a
tabindex="0"
rel="noopener noreferrer"
(mouseenter)="educationQualificationsHover = true"
(mouseleave)="educationQualificationsHover = false"
(click)="goToActivitySection('education-and-qualification')"
(keydown)="goToActivitySection('education-and-qualification', $event)"
>
<h3
class="orc-font-small-print"
i18n="@@summary.educationQualificationActivites"
[ngClass]="{
'hover-effect': educationQualificationsHover
}"
[attr.aria-label]="ariaLabelEducationQualificationsActions"
>
EDUCATION AND QUALIFICATIONS
</h3>
</a>
<app-summary-panel
[hoverEffect]="educationQualificationsHover"
[url]="trustedSummary?.orcid + '#education-and-qualification'"
[activitySummary]="trustedSummary.educationQualifications"
[count]="trustedSummary.educationQualificationsCount"
[moreLabel]="labelMoreEducationQualifications"
[moreLabelSingular]="labelMoreEducationQualification"
[ariaLabelActivitySection]="ariaLabelEducationQualificationsActions"
[standaloneMode]="standaloneMode"
[activitySection]="'education-and-qualification'"
></app-summary-panel>
</ng-container>
<ng-container *ngIf="externalIdentifiers?.length">
<a
tabindex="0"
rel="noopener noreferrer"
(click)="goToActivitySection('other-identifiers')"
(keydown)="goToActivitySection('other-identifiers', $event)"
[attr.aria-label]="ariaLabelIdentifiers"
(mouseenter)="externalIdentifiersHover = true"
(mouseleave)="externalIdentifiersHover = false"
>
<h3
class="orc-font-small-print"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import { Component, Inject, Input, OnDestroy, OnInit } from '@angular/core'
import {
ChangeDetectorRef,
Component,
Inject,
Input,
OnDestroy,
OnInit,
} from '@angular/core'
import { Router } from '@angular/router'
import { TrustedSummaryService } from 'src/app/core/trusted-summary/trusted-summary.service'
import { TrustedSummary } from 'src/app/types/trust-summary'
Expand All @@ -10,6 +17,7 @@ import { RobotsMetaTagsService } from 'src/app/core/robots-meta-tags/robots-meta
import { ZendeskService } from 'src/app/core/zendesk/zendesk.service'
import { WINDOW } from 'src/app/cdk/window'
import { RecordUtil } from 'src/app/shared/utils/record.util'
import { concat } from 'lodash'

@Component({
selector: 'app-trusted-summary',
Expand All @@ -30,15 +38,22 @@ export class TrustedSummaryComponent implements OnInit, OnDestroy {
worksHover = false
peerReviewsHover = false
fundsHover = false
researchResorucesHover = false
externalIdentifiersHover = false
professionalActivitiesHover = false
educationQualificationsHover = false
emailDomainsHover = false

insideIframe: boolean
ariaLabelAffiliations: string
ariaLabelWorks: string
ariaLabelFundings: string
ariaLabelPeerReviews: string
ariaLabelProfessionalActivities: string
ariaLabelEducationQualificationsActions: string
ariaLabelResearchResources: string
ariaLabelIdentifiers: string
ariaLabelEmailDomains: string

labelValidatedWorks = $localize`:@@summary.validatedWorks:Validated works`
labelValidatedWork = $localize`:@@summary.validatedWork:Validated work`
Expand All @@ -48,31 +63,46 @@ export class TrustedSummaryComponent implements OnInit, OnDestroy {
labelValidatedFundings = $localize`:@@summary.validatedFundings:Validated fundings`
labelSelfAssertedFunding = $localize`:@@summary.selfAssertedFunding:Self-asserted funding`
labelSelfAssertedFundings = $localize`:@@summary.selfAssertedFundings:Self-asserted fundings`
labelSelfAssertedResearchResources = $localize`:@@summary.selfAssertedResearchResources:Self-asserted research resources`
labelValidatedResearchResources = $localize`:@@summary.validatedResearchResources:Validated research resources`
labelSelfAssertedResearchResource = $localize`:@@summary.selfAssertedResearchResource:Self-asserted research resource`
labelValidatedResearchResource = $localize`:@@summary.validatedResearchResource:Validated research resource`
labelReviesFor = $localize`:@@summary.reviewsFor:reviews for`
labelReviewFor = $localize`:@@summary.reviewFor:review for`
labelpublicationgrants = $localize`:@@summary.publicationgrantes:publications/grants`
labelpublicationgrant = $localize`:@@summary.publicationgrant:publication/grant`
labelMoreAffiliations = $localize`:@@summary.moreAffiliations:more Affiliations`
labelMoreProfessionalActivities = $localize`:@@summary.moreProfessionalActivities:more Professional activities`
labelMoreOtherIdentifiers = $localize`:@@summary.moreOtherIdentifiers:more Other Identifiers`
labelMoreEmailDomains = $localize`:@@summary.moreEmailDomains:more Email Domains`
labelMoreEmailDomain = $localize`:@@summary.moreEmailDomain:more Email Domain`
labelMoreAffiliation = $localize`:@@summary.moreAffiliation:more Affiliation`
labelMoreProfessionalActivitie = $localize`:@@summary.moreProfessionalActivitie:more Professional activity`
labelMoreOtherIdentifier = $localize`:@@summary.moreOtherIdentifier:more Other Identifier`
labelMoreEducationQualifications = $localize`:@@summary.moreEducationQualifications:more Education and Qualifications`
labelMoreEducationQualification = $localize`:@@summary.moreEducationQualification:more Education and Qualification`
labelEmailDomains = $localize`:@@summary.emailDomainsLabel:Email Domains`
labelOrcidRecord = $localize`:@@public-layout.my_orcid:ORCID Record`
labelViewAffiliations = $localize`:@@summary.viewAffiliations:View all affiliations in`
labelViewWorks = $localize`:@@summary.viewWorks:View all works in`
labelViewFundings = $localize`:@@summary.viewFundings:View all funding in`
labelViewResearchResources = $localize`:@@summary.viewResearchResources:View all research and resources in`
labelViewPeerReviews = $localize`:@@summary.viewPeerReviews:View all peer reviews in`
labelViewProfessionalActivities = $localize`:@@summary.viewProfessionalActivities:View all professional activities in`
labelViewIdentifiers = $localize`:@@summary.viewIdentifiers:View all identifiers in`
labelViewEducationQualificationsActivities = $localize`:@@summary.viewEducationQualificationsActivities:View all education and qualifications in`
labelViewEducationQualificationsActivitie = $localize`:@@summary.viewEducationQualificationsActivitie:View education and qualification in`
labelViewDomain = $localize`:@@summary.viewDomain:View all email domains in`

funds: SimpleActivityModel[] = []
researchResoruces: SimpleActivityModel[] = []
peerReviews: SimpleActivityModel[] = []
mobile: boolean
externalIdentifiers: SimpleActivityModel[]
emailDomains: SimpleActivityModel[]
twoColumns: boolean = false
threeColumns: boolean = false
oneColumn: boolean
oneColumn: boolean = false
createdToday = false
modifiedToday: boolean
creationDateWithOffset: any
Expand All @@ -85,6 +115,8 @@ export class TrustedSummaryComponent implements OnInit, OnDestroy {
private _platform: PlatformInfoService,
private _robotsMetaTags: RobotsMetaTagsService,
private _zendeskService: ZendeskService,
private _changeDetectorRef: ChangeDetectorRef,

// import window
@Inject(WINDOW) private _window: Window
) {}
Expand Down Expand Up @@ -167,6 +199,28 @@ export class TrustedSummaryComponent implements OnInit, OnDestroy {
: this.labelValidatedFunding,
})
}

if (this.trustedSummary.validatedResearchResources) {
this.researchResoruces.push({
verified: true,
countA: this.trustedSummary.validatedResearchResources,
stringA:
this.trustedSummary.validatedResearchResources > 1
? this.labelValidatedResearchResources
: this.labelValidatedResearchResource,
})
}
if (this.trustedSummary.selfAssertedResearchResources) {
this.researchResoruces.push({
verified: false,
countA: this.trustedSummary.selfAssertedResearchResources,
stringA:
this.trustedSummary.selfAssertedResearchResources > 1
? this.labelSelfAssertedResearchResources
: this.labelSelfAssertedResearchResource,
})
}

if (this.trustedSummary.selfAssertedFunds) {
this.funds.push({
verified: false,
Expand Down Expand Up @@ -204,41 +258,62 @@ export class TrustedSummaryComponent implements OnInit, OnDestroy {
}
}
)

this.emailDomains = this.trustedSummary.emailDomains?.map((domain) => {
return {
verified: true,
stringA: domain.value,
}
})
if (
(this.works.length > 0 ||
this.funds.length > 0 ||
this.peerReviews.length > 0) &&
this.peerReviews.length > 0 ||
this.researchResoruces.length) &&
(this.externalIdentifiers?.length > 0 ||
this.trustedSummary.professionalActivitiesCount > 0 ||
this.trustedSummary.externalIdentifiers.length > 0)
this.trustedSummary.educationQualifications?.length > 0)
) {
this.threeColumns = true
} else if (
this.works.length > 0 ||
this.funds.length > 0 ||
this.peerReviews.length > 0 ||
this.researchResoruces.length > 0 ||
this.externalIdentifiers?.length > 0 ||
this.trustedSummary.professionalActivitiesCount > 0
this.trustedSummary.professionalActivitiesCount > 0 ||
this.trustedSummary.educationQualifications?.length > 0
) {
this.twoColumns = true
} else {
this.oneColumn = true
}
this._changeDetectorRef.markForCheck()
this.ariaLabelAffiliations = this.getAriaLabelSection(
this.labelViewAffiliations
)
this.ariaLabelWorks = this.getAriaLabelSection(this.labelViewWorks)
this.ariaLabelFundings = this.getAriaLabelSection(this.labelViewFundings)
this.ariaLabelResearchResources = this.getAriaLabelSection(
this.labelViewResearchResources
)
this.ariaLabelPeerReviews = this.getAriaLabelSection(
this.labelViewPeerReviews
)
this.ariaLabelProfessionalActivities = this.getAriaLabelSection(
this.labelViewProfessionalActivities
)

this.ariaLabelEducationQualificationsActions = this.getAriaLabelSection(
this.labelViewEducationQualificationsActivities
)

this.ariaLabelIdentifiers = this.getAriaLabelSection(
this.labelViewIdentifiers
)

this.ariaLabelEmailDomains = this.getAriaLabelSection(
this.labelViewDomain
)
})
}
dateWithOffset(creation: string): any {
Expand Down
Loading

0 comments on commit cb6d9d3

Please sign in to comment.