Skip to content

Commit 9954256

Browse files
committed
Reapply "Merge branch 'main' into aromanovv/PD-4790-improve-auth-challenge"
This reverts commit aa4e21c.
1 parent aa4e21c commit 9954256

79 files changed

Lines changed: 3928 additions & 1052 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,37 @@
1+
## v2.129.9 - 2026-02-13
2+
3+
[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.129.8...v2.129.9)
4+
5+
- [#2745](https://github.com/ORCID/orcid-angular/pull/2745): PD-4994,PD-4993
6+
7+
## v2.129.8 - 2026-02-12
8+
9+
[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.129.7...v2.129.8)
10+
11+
## v2.129.7 - 2026-02-11
12+
13+
[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.129.6...v2.129.7)
14+
15+
## v2.129.6 - 2026-02-11
16+
17+
[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.129.5...v2.129.6)
18+
19+
- [#2742](https://github.com/ORCID/orcid-angular/pull/2742): Lmendoza/pd 3855
20+
21+
## v2.129.5 - 2026-02-10
22+
23+
[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.129.4...v2.129.5)
24+
25+
- [#2741](https://github.com/ORCID/orcid-angular/pull/2741): ${PD-4790} revert pr #2737
26+
27+
## v2.129.4 - 2026-02-10
28+
29+
[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.129.3...v2.129.4)
30+
31+
## v2.129.3 - 2026-02-10
32+
33+
[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.129.2...v2.129.3)
34+
135
## v2.129.2 - 2026-02-04
236

337
[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.129.1...v2.129.2)

SUPPORTED_BROWSERS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
| Apple Safari | 16.4 or newer |
99
| Google Chrome | 115 or newer |
1010
| Microsoft Edge | 115 or newer |
11-
| Mozilla Firefox | 115 or newer |
11+
| Mozilla Firefox | 116 or newer |
1212
| Opera | 101 or newer |
1313
| Opera Mobile | 80 or newer |
1414
| Samsung Internet | 23 or newer |

angular.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,33 @@
442442
}
443443
}
444444
},
445+
"orcid-registry-ui": {
446+
"projectType": "library",
447+
"root": "projects/orcid-registry-ui",
448+
"sourceRoot": "projects/orcid-registry-ui/src",
449+
"prefix": "orcid",
450+
"architect": {
451+
"build": {
452+
"builder": "@angular/build:ng-packagr",
453+
"configurations": {
454+
"production": {
455+
"tsConfig": "projects/orcid-registry-ui/tsconfig.lib.prod.json"
456+
},
457+
"development": {
458+
"tsConfig": "projects/orcid-registry-ui/tsconfig.lib.json"
459+
}
460+
},
461+
"defaultConfiguration": "production"
462+
},
463+
"test": {
464+
"builder": "@angular/build:karma",
465+
"options": {
466+
"tsConfig": "projects/orcid-registry-ui/tsconfig.spec.json",
467+
"polyfills": ["zone.js", "zone.js/testing"]
468+
}
469+
}
470+
}
471+
},
445472
"orcid-tokens": {
446473
"projectType": "library",
447474
"root": "projects/orcid-tokens",
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3+
"dest": "../../dist/orcid-registry-ui",
4+
"lib": {
5+
"entryFile": "src/public-api.ts"
6+
}
7+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "@orcid/registry-ui",
3+
"version": "0.0.1",
4+
"peerDependencies": {
5+
"@angular/common": "^20.1.0",
6+
"@angular/core": "^20.1.0",
7+
"@angular/material": "^20.1.0",
8+
"@orcid/ui": "^0.0.1",
9+
"rxjs": "~7.8.0"
10+
},
11+
"dependencies": {
12+
"tslib": "^2.3.0"
13+
},
14+
"publishConfig": {
15+
"access": "public"
16+
},
17+
"sideEffects": false
18+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<orcid-action-surface-container [title]="title" [subtitle]="subtitle">
2+
<div class="permission-notifications__list">
3+
<orcid-action-surface
4+
*ngFor="let notification of visibleNotifications; let index = index"
5+
[icon]="notification.icon"
6+
[iconColor]="
7+
notification.iconColor ??
8+
'var(--orcid-color-state-notice-dark, #ff9c00)'
9+
"
10+
>
11+
<span text [innerHTML]="getTrustedHtml(notification.text)"></span>
12+
<div actions>
13+
<ng-container
14+
*ngFor="let action of notification.actions; let actionIndex = index"
15+
>
16+
<ng-container [ngSwitch]="action.variant">
17+
<button
18+
*ngSwitchCase="'flat'"
19+
mat-flat-button
20+
[orcidBrandSecondaryDarkButton]="!action.color"
21+
[color]="action.color"
22+
[disabled]="action.disabled"
23+
[ngClass]="{
24+
'registry-underline-button': action.underline
25+
}"
26+
(click)="onActionClick(notification, index, action, actionIndex)"
27+
>
28+
{{ action.label }}
29+
</button>
30+
<button
31+
*ngSwitchCase="'stroked'"
32+
mat-stroked-button
33+
[color]="action.color"
34+
[disabled]="action.disabled"
35+
[ngClass]="{ 'registry-underline-button': action.underline }"
36+
(click)="onActionClick(notification, index, action, actionIndex)"
37+
>
38+
{{ action.label }}
39+
</button>
40+
<button
41+
*ngSwitchDefault
42+
mat-button
43+
[color]="action.color"
44+
[disabled]="action.disabled"
45+
[orcidUnderlineButton]="action.underline"
46+
(click)="onActionClick(notification, index, action, actionIndex)"
47+
>
48+
{{ action.label }}
49+
</button>
50+
</ng-container>
51+
</ng-container>
52+
</div>
53+
</orcid-action-surface>
54+
</div>
55+
</orcid-action-surface-container>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
:host {
2+
display: block;
3+
width: 100%;
4+
}
5+
6+
.permission-notifications__list {
7+
display: grid;
8+
gap: var(--orcid-space-4, 16px);
9+
}
10+
11+
.registry-brand-secondary-dark:hover {
12+
background-color: var(--orcid-color-brand-secondary-dark, #085c77);
13+
}
14+
15+
.registry-brand-secondary-dark:disabled {
16+
background-color: var(--orcid-color-brand-secondary-dark, #085c77);
17+
opacity: 0.6;
18+
}
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
import {
2+
ChangeDetectionStrategy,
3+
Component,
4+
EventEmitter,
5+
Input,
6+
Output,
7+
} from '@angular/core'
8+
import { DomSanitizer } from '@angular/platform-browser'
9+
import {
10+
NgClass,
11+
NgFor,
12+
NgSwitch,
13+
NgSwitchCase,
14+
NgSwitchDefault,
15+
} from '@angular/common'
16+
import { MatButtonModule } from '@angular/material/button'
17+
import {
18+
ActionSurfaceComponent,
19+
ActionSurfaceContainerComponent,
20+
BrandSecondaryDarkButtonDirective,
21+
UnderlineButtonDirective,
22+
} from '@orcid/ui'
23+
24+
export type RegistryNotificationButtonVariant = 'text' | 'flat' | 'stroked'
25+
26+
export interface RegistryNotificationAction {
27+
id?: string
28+
label: string
29+
variant?: RegistryNotificationButtonVariant
30+
color?: 'primary' | 'accent' | 'warn'
31+
underline?: boolean
32+
disabled?: boolean
33+
}
34+
35+
export interface RegistryPermissionNotification {
36+
id?: string
37+
text: string
38+
icon?: string
39+
iconColor?: string
40+
actions: RegistryNotificationAction[]
41+
}
42+
43+
export interface RegistryNotificationActionEvent {
44+
notificationIndex: number
45+
actionIndex: number
46+
notificationId?: string
47+
actionId?: string
48+
action: RegistryNotificationAction
49+
}
50+
51+
@Component({
52+
selector: 'orcid-registry-permission-notifications',
53+
standalone: true,
54+
changeDetection: ChangeDetectionStrategy.OnPush,
55+
imports: [
56+
NgClass,
57+
NgFor,
58+
NgSwitch,
59+
NgSwitchCase,
60+
NgSwitchDefault,
61+
MatButtonModule,
62+
ActionSurfaceComponent,
63+
ActionSurfaceContainerComponent,
64+
BrandSecondaryDarkButtonDirective,
65+
UnderlineButtonDirective,
66+
],
67+
templateUrl: './permission-notifications.component.html',
68+
styleUrls: ['./permission-notifications.component.scss'],
69+
})
70+
export class PermissionNotificationsComponent {
71+
@Input() title = ''
72+
@Input() subtitle = ''
73+
@Input() notifications: RegistryPermissionNotification[] = []
74+
75+
@Output() actionClicked = new EventEmitter<RegistryNotificationActionEvent>()
76+
77+
constructor(private _sanitizer: DomSanitizer) {}
78+
79+
getTrustedHtml(text: string) {
80+
return this._sanitizer.bypassSecurityTrustHtml(text)
81+
}
82+
83+
get visibleNotifications(): RegistryPermissionNotification[] {
84+
return (this.notifications || []).slice(0, 3)
85+
}
86+
87+
onActionClick(
88+
notification: RegistryPermissionNotification,
89+
notificationIndex: number,
90+
action: RegistryNotificationAction,
91+
actionIndex: number
92+
): void {
93+
this.actionClicked.emit({
94+
notificationIndex,
95+
actionIndex,
96+
notificationId: notification.id,
97+
actionId: action.id,
98+
action,
99+
})
100+
}
101+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { ComponentFixture, TestBed } from '@angular/core/testing'
2+
3+
import { OrcidRegistryUi } from './orcid-registry-ui'
4+
5+
describe('OrcidRegistryUi', () => {
6+
let component: OrcidRegistryUi
7+
let fixture: ComponentFixture<OrcidRegistryUi>
8+
9+
beforeEach(async () => {
10+
await TestBed.configureTestingModule({
11+
imports: [OrcidRegistryUi],
12+
}).compileComponents()
13+
14+
fixture = TestBed.createComponent(OrcidRegistryUi)
15+
component = fixture.componentInstance
16+
fixture.detectChanges()
17+
})
18+
19+
it('should create', () => {
20+
expect(component).toBeTruthy()
21+
})
22+
})
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { Component } from '@angular/core'
2+
3+
@Component({
4+
selector: 'orcid-orcid-registry-ui',
5+
standalone: true,
6+
imports: [],
7+
template: `
8+
<section class="orcid-registry-ui-placeholder">
9+
<h1 class="orc-ui-font-heading">Orcid Registry UI library</h1>
10+
<p class="orc-ui-font-body">
11+
This is a placeholder component from <code>@orcid/registry-ui</code>.
12+
</p>
13+
</section>
14+
`,
15+
styles: `
16+
:host {
17+
display: block;
18+
padding: 1.5rem;
19+
background: var(--orcid-surface-subtle, #f5f5f5);
20+
color: var(--orcid-color-text, #222);
21+
}
22+
23+
.orcid-registry-ui-placeholder h1 {
24+
margin: 0 0 0.5rem 0;
25+
}
26+
27+
.orcid-registry-ui-placeholder p {
28+
margin: 0;
29+
}
30+
`,
31+
})
32+
export class OrcidRegistryUi {}

0 commit comments

Comments
 (0)