Skip to content

Commit

Permalink
Merge branch 'main' into transifex
Browse files Browse the repository at this point in the history
  • Loading branch information
leomendoza123 committed Oct 9, 2023
2 parents 602d132 + 55419a4 commit 672ad1e
Show file tree
Hide file tree
Showing 9 changed files with 93 additions and 16 deletions.
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
## v2.42.2 - 2023-10-06

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

### Fix

- Remove one trust auto-blocking blocks google analytics even if config was set to ignore (#2072)

## v2.42.1 - 2023-10-06

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

- [#2071](https://github.com/ORCID/orcid-angular/pull/2071): Enable Sort Togglz For Professional & Educational activities

## v2.42.0 - 2023-10-06

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

### Fix

- Add one trust auto-blocking script and remove unused attributes in gtag (#2070)

## v2.41.0 - 2023-10-04

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

- [#2069](https://github.com/ORCID/orcid-angular/pull/2069): feature: Add `SOURCE_SORTING` togglz

### Fix

- Add source sorting togglz inside togglz subscribe

### Feature

- Add `SOURCE_SORTING` togglz

## v2.40.6 - 2023-10-04

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.40.5...v2.40.6)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
[(expandedContent)]="expandedContent['EMPLOYMENT']"
(expandedContentChange)="expandedContentChange.emit(expandedContent)"
[isPublicRecord]="isPublicRecord"
[sortTypes]="['title', 'start', 'end', 'source']"
[sortTypes]="sortTypes"
[sortType]="'end'"
(sort)="sortEvent($event, 'EMPLOYMENT')"
id="cy-affiliation-employment"
Expand Down Expand Up @@ -86,7 +86,7 @@
[(expandedContent)]="expandedContent['EDUCATION_AND_QUALIFICATION']"
(expandedContentChange)="expandedContentChange.emit(expandedContent)"
[isPublicRecord]="isPublicRecord"
[sortTypes]="['title', 'start', 'end', 'source']"
[sortTypes]="educationAndQualificationSortTypes"
[sortType]="'end'"
(sort)="sortEvent($event, 'EDUCATION_AND_QUALIFICATION')"
id="cy-affiliation-education-and-qualification"
Expand Down Expand Up @@ -289,7 +289,7 @@
[(expandedContent)]="expandedContent['PROFESSIONAL_ACTIVITIES']"
(expandedContentChange)="expandedContentChange.emit(expandedContent)"
[isPublicRecord]="isPublicRecord"
[sortTypes]="['title', 'type', 'start', 'end', 'source']"
[sortTypes]="professionalActivitiesSortTypes"
(sort)="sortEvent($event, 'PROFESSIONAL_ACTIVITIES')"
[professionalActivitiesTogglz]="professionalActivitiesTogglz"
id="cy-affiliation-professional-activities"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
UserRecord,
UserRecordOptions,
} from 'src/app/types/record.local'
import { SortData } from 'src/app/types/sort'
import { SortData, SortOrderType } from 'src/app/types/sort'

import { UserInfo } from '../../../types'
import { TogglzService } from '../../../core/togglz/togglz.service'
Expand Down Expand Up @@ -54,7 +54,18 @@ export class AffiliationStacksGroupsComponent implements OnInit {
@Output()
expandedContentChange: EventEmitter<MainPanelsState> = new EventEmitter()
professionalActivitiesTogglz = false

sortTypes: SortOrderType[] = ['title', 'start', 'end']
professionalActivitiesSortTypes: SortOrderType[] = [
'title',
'type',
'start',
'end',
]
educationAndQualificationSortTypes: SortOrderType[] = [
'title',
'start',
'end',
]
constructor(
private _record: RecordService,
private _recordAffiliationService: RecordAffiliationService,
Expand All @@ -66,6 +77,16 @@ export class AffiliationStacksGroupsComponent implements OnInit {
.getStateOf('PROFESSIONAL_ACTIVITIES')
.pipe(take(1))
.subscribe((value) => (this.professionalActivitiesTogglz = value))
this._togglz
.getStateOf('SOURCE_SORTING')
.pipe(take(1))
.subscribe((sourceSortingTogglz: boolean) => {
if (sourceSortingTogglz) {
this.sortTypes.push('source')
this.professionalActivitiesSortTypes.push('source')
this.educationAndQualificationSortTypes.push('source')
}
})
this.$loading = this._recordAffiliationService.$loading
this._record
.getRecord({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
[isPublicRecord]="isPublicRecord"
[(expandedContent)]="expandedContent['FUNDING']"
(expandedContentChange)="expandedContentChange.emit(expandedContent)"
[sortTypes]="['date', 'title', 'type', 'source']"
[sortTypes]="sortTypes"
[sortType]="'date'"
(sort)="sortEvent($event)"
>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
import { Observable, Subject } from 'rxjs'
import { first, takeUntil } from 'rxjs/operators'
import { first, take, takeUntil } from 'rxjs/operators'
import { UserService } from 'src/app/core'
import { RecordCountriesService } from 'src/app/core/record-countries/record-countries.service'
import { RecordService } from 'src/app/core/record/record.service'
Expand All @@ -11,10 +11,11 @@ import {
UserRecordOptions,
} from 'src/app/types/record.local'
import { UserSession } from 'src/app/types/session.local'
import { SortData } from 'src/app/types/sort'
import { SortData, SortOrderType } from 'src/app/types/sort'

import { RecordFundingsService } from '../../../core/record-fundings/record-fundings.service'
import { UserInfo } from '../../../types'
import { TogglzService } from '../../../core/togglz/togglz.service'

@Component({
selector: 'app-fundings',
Expand All @@ -40,15 +41,25 @@ export class FundingStacksGroupsComponent implements OnInit {
ngOrcidFunding = $localize`:@@shared.funding:Funding`
countryCodes: { key: string; value: string }[]
loading = true
sortTypes: SortOrderType[] = ['title', 'start', 'end']

constructor(
private _userSession: UserService,
private _record: RecordService,
private _recordFundingsService: RecordFundingsService,
private _recordCountryService: RecordCountriesService
private _recordCountryService: RecordCountriesService,
private _togglz: TogglzService
) {}

ngOnInit(): void {
this._togglz
.getStateOf('SOURCE_SORTING')
.pipe(take(1))
.subscribe((sourceSortingTogglz: boolean) => {
if (sourceSortingTogglz) {
this.sortTypes.push('source')
}
})
this.getRecord()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
[isPublicRecord]="isPublicRecord"
[(expandedContent)]="expandedContent['WORK']"
(expandedContentChange)="expandedContentChange.emit(expandedContent)"
[sortTypes]="['date', 'title', 'type', 'source']"
[sortTypes]="sortTypes"
[sortType]="'date'"
[addMenuOptions]="addMenuOptions"
(sort)="sortEvent($event)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { MatDialog } from '@angular/material/dialog'
import { MatPaginatorIntl, PageEvent } from '@angular/material/paginator'
import { isEmpty } from 'lodash'
import { Observable, Subject } from 'rxjs'
import { first } from 'rxjs/operators'
import { first, take } from 'rxjs/operators'
import { PlatformInfo, PlatformInfoService } from 'src/app/cdk/platform-info'
import {
ADD_EVENT_ACTION,
Expand All @@ -34,7 +34,7 @@ import {
UserRecord,
UserRecordOptions,
} from 'src/app/types/record.local'
import { SortData } from 'src/app/types/sort'
import { SortData, SortOrderType } from 'src/app/types/sort'

import { UserInfo } from '../../../types'
import { ModalDeleteItemsComponent } from '../modals/modal-delete-item/modal-delete-items.component'
Expand All @@ -49,6 +49,7 @@ import { WorkBibtexModalComponent } from './modals/work-bibtex-modal/work-bibtex
import { ModalCombineWorksWithSelectorComponent } from '../work/modals/modal-combine-works-with-selector/modal-combine-works-with-selector.component'
import { GroupingSuggestions } from 'src/app/types/works.endpoint'
import { AnnouncerService } from 'src/app/core/announcer/announcer.service'
import { TogglzService } from '../../../core/togglz/togglz.service'

@Component({
selector: 'app-work-stack-group',
Expand Down Expand Up @@ -127,6 +128,7 @@ export class WorkStackGroupComponent implements OnInit {
platform: PlatformInfo
selectedWorks: string[] = []
selectAll: false
sortTypes: SortOrderType[] = ['title', 'start', 'end']

@ViewChildren('selectAllCheckbox') selectAllCheckbox: MatCheckbox
@ViewChildren('appWorkStacks') appWorkStacks: QueryList<WorkStackComponent>
Expand All @@ -138,10 +140,19 @@ export class WorkStackGroupComponent implements OnInit {
private _record: RecordService,
private _works: RecordWorksService,
private _matPaginatorIntl: MatPaginatorIntl,
private _announce: AnnouncerService
private _announce: AnnouncerService,
private _togglz: TogglzService
) {}

ngOnInit(): void {
this._togglz
.getStateOf('SOURCE_SORTING')
.pipe(take(1))
.subscribe((sourceSortingTogglz: boolean) => {
if (sourceSortingTogglz) {
this.sortTypes.push('source')
}
})
this.$loading = this._works.$loading
this._record
.getRecord({ publicRecordId: this.isPublicRecord })
Expand Down
2 changes: 1 addition & 1 deletion src/environments/environment.local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const environment = {
BASE_URL: '',
INFO_SITE: 'https://info.orcid.org/',
GOOGLE_ANALYTICS_TESTING_MODE: true,
GOOGLE_TAG_MANAGER: 'GTM-M9Z7DHS',
GOOGLE_TAG_MANAGER: 'GTM-0000000',
GOOGLE_RECAPTCHA: '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI',
HELP_HERO_ID: 'oYFQMrzFHA',
ZENDESK: null,
Expand Down
2 changes: 0 additions & 2 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,13 @@
gtag('consent', 'default', {
analytics_storage: 'denied',
ad_storage: 'denied',
functionality_storage: 'denied',
region: countries,
wait_for_update: 500,
})

gtag('consent', 'default', {
analytics_storage: 'granted',
ad_storage: 'granted',
functionality_storage: 'granted',
wait_for_update: 500,
})
</script>
Expand Down

0 comments on commit 672ad1e

Please sign in to comment.