@odx/auth 3.1.2 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/index.mjs +2 -1
- package/esm2020/lib/auth-overlay.component.mjs +46 -0
- package/esm2020/lib/auth.component.mjs +3 -4
- package/esm2020/lib/auth.providers.mjs +7 -1
- package/fesm2015/odx-auth.mjs +64 -20
- package/fesm2015/odx-auth.mjs.map +1 -1
- package/fesm2020/odx-auth.mjs +63 -20
- package/fesm2020/odx-auth.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/lib/auth-overlay.component.d.ts +9 -0
- package/package.json +1 -1
package/esm2020/index.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './lib/auth-overlay.component';
|
|
1
2
|
export * from './lib/auth.component';
|
|
2
3
|
export * from './lib/auth.config';
|
|
3
4
|
export * from './lib/auth.directive';
|
|
@@ -11,4 +12,4 @@ export * from './lib/helpers';
|
|
|
11
12
|
export * from './lib/models';
|
|
12
13
|
export * from './lib/plugins';
|
|
13
14
|
export * from './lib/unauth.guard';
|
|
14
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wYWNrYWdlcy9hdXRoL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLDhCQUE4QixDQUFDO0FBQzdDLGNBQWMsc0JBQXNCLENBQUM7QUFDckMsY0FBYyxtQkFBbUIsQ0FBQztBQUNsQyxjQUFjLHNCQUFzQixDQUFDO0FBQ3JDLGNBQWMsa0JBQWtCLENBQUM7QUFDakMsY0FBYyxtQkFBbUIsQ0FBQztBQUNsQyxjQUFjLHNCQUFzQixDQUFDO0FBQ3JDLGNBQWMsb0JBQW9CLENBQUM7QUFDbkMsY0FBYyxvQkFBb0IsQ0FBQztBQUNuQyxjQUFjLGtCQUFrQixDQUFDO0FBQ2pDLGNBQWMsZUFBZSxDQUFDO0FBQzlCLGNBQWMsY0FBYyxDQUFDO0FBQzdCLGNBQWMsZUFBZSxDQUFDO0FBQzlCLGNBQWMsb0JBQW9CLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2xpYi9hdXRoLW92ZXJsYXkuY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2F1dGguY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2F1dGguY29uZmlnJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2F1dGguZGlyZWN0aXZlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2F1dGguZ3VhcmQnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvYXV0aC5tb2R1bGUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvYXV0aC5wcm92aWRlcnMnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvYXV0aC5zZXJ2aWNlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2F1dGgudHlwaW5ncyc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9kaXJlY3RpdmVzJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2hlbHBlcnMnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvbW9kZWxzJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3BsdWdpbnMnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvdW5hdXRoLmd1YXJkJztcbiJdfQ==
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { transition, trigger, useAnimation } from '@angular/animations';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { ChangeDetectionStrategy, Component, inject, ViewEncapsulation } from '@angular/core';
|
|
4
|
+
import { fadeOut } from '@odx/angular/animations';
|
|
5
|
+
import { DynamicViewService } from '@odx/angular/cdk/dynamic-view';
|
|
6
|
+
import { ButtonComponent } from '@odx/angular/components/button';
|
|
7
|
+
import { CircularProgressComponent } from '@odx/angular/components/circular-progress';
|
|
8
|
+
import { IconComponent } from '@odx/angular/components/icon';
|
|
9
|
+
import { LogoDirective } from '@odx/angular/components/logo';
|
|
10
|
+
import { distinctUntilChanged, map, startWith } from 'rxjs';
|
|
11
|
+
import { injectAuthConfig } from './auth.config';
|
|
12
|
+
import { AuthService } from './auth.service';
|
|
13
|
+
import * as i0 from "@angular/core";
|
|
14
|
+
import * as i1 from "@angular/common";
|
|
15
|
+
export class AuthOverlayComponent {
|
|
16
|
+
constructor() {
|
|
17
|
+
this.icon$ = inject(AuthService).isRedirecting$.pipe(startWith(false), distinctUntilChanged(), map((isRedirecting) => (isRedirecting ? 'link-external' : 'user')));
|
|
18
|
+
}
|
|
19
|
+
static initialize() {
|
|
20
|
+
const dynamicViewService = inject(DynamicViewService);
|
|
21
|
+
inject(AuthService).isLoading$.subscribe((isLoading) => {
|
|
22
|
+
if (isLoading) {
|
|
23
|
+
AuthOverlayComponent.instance ?? (AuthOverlayComponent.instance = dynamicViewService.createView(AuthOverlayComponent));
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
AuthOverlayComponent.instance?.destroy();
|
|
27
|
+
AuthOverlayComponent.instance = null;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
AuthOverlayComponent.instance = null;
|
|
33
|
+
AuthOverlayComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
34
|
+
AuthOverlayComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: AuthOverlayComponent, isStandalone: true, selector: "div.odx-auth-overlay", host: { properties: { "@hostAnimation": "true" } }, ngImport: i0, template: "<div class=\"odx-auth-overlay__content\" odxLayout=\"grid 12 horizontal-center vertical-center gap-small\">\n <odx-logo size=\"large\"></odx-logo>\n <odx-circular-progress class=\"odx-auth-overlay-spinner\" value=\"-1\" size=\"medium\" stroke=\"3\">\n <odx-icon [name]=\"icon$ | async\" iconSet=\"core\"></odx-icon>\n </odx-circular-progress>\n</div>\n", styles: ["@keyframes odx-auth-overlay-animation{0%{opacity:0;transform:translate(-50%,-50%) scale(.9)}to{opacity:1;transform:translate(-50%,-50%)}}.odx-auth-overlay{--odx-c-highlight: var(--odx-c-primary);background-color:var(--odx-c-background-content);position:fixed;z-index:var(--odx-v-layer-5);inset:0}.odx-auth-overlay__content{top:50%;left:50%;transform:translate(-50%,-50%);position:absolute;animation:odx-auth-overlay-animation .75s ease}.odx-auth-overlay-spinner{position:relative}.odx-auth-overlay-spinner .odx-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet"] }, { kind: "directive", type: LogoDirective, selector: "odx-logo", inputs: ["size", "variant"] }, { kind: "component", type: CircularProgressComponent, selector: "odx-circular-progress", inputs: ["stroke", "size", "value"] }], animations: [trigger('hostAnimation', [transition(':leave', useAnimation(fadeOut()))])], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
35
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthOverlayComponent, decorators: [{
|
|
36
|
+
type: Component,
|
|
37
|
+
args: [{ standalone: true, selector: 'div.odx-auth-overlay', imports: [CommonModule, ButtonComponent, IconComponent, LogoDirective, CircularProgressComponent], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
38
|
+
'[@hostAnimation]': 'true',
|
|
39
|
+
}, animations: [trigger('hostAnimation', [transition(':leave', useAnimation(fadeOut()))])], template: "<div class=\"odx-auth-overlay__content\" odxLayout=\"grid 12 horizontal-center vertical-center gap-small\">\n <odx-logo size=\"large\"></odx-logo>\n <odx-circular-progress class=\"odx-auth-overlay-spinner\" value=\"-1\" size=\"medium\" stroke=\"3\">\n <odx-icon [name]=\"icon$ | async\" iconSet=\"core\"></odx-icon>\n </odx-circular-progress>\n</div>\n", styles: ["@keyframes odx-auth-overlay-animation{0%{opacity:0;transform:translate(-50%,-50%) scale(.9)}to{opacity:1;transform:translate(-50%,-50%)}}.odx-auth-overlay{--odx-c-highlight: var(--odx-c-primary);background-color:var(--odx-c-background-content);position:fixed;z-index:var(--odx-v-layer-5);inset:0}.odx-auth-overlay__content{top:50%;left:50%;transform:translate(-50%,-50%);position:absolute;animation:odx-auth-overlay-animation .75s ease}.odx-auth-overlay-spinner{position:relative}.odx-auth-overlay-spinner .odx-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}\n"] }]
|
|
40
|
+
}] });
|
|
41
|
+
export function initalizeAuthOverlay() {
|
|
42
|
+
if (!injectAuthConfig().showRedirectOverlay)
|
|
43
|
+
return;
|
|
44
|
+
AuthOverlayComponent.initialize();
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aC1vdmVybGF5LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2F1dGgvc3JjL2xpYi9hdXRoLW92ZXJsYXkuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvYXV0aC9zcmMvbGliL2F1dGgtb3ZlcmxheS5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE9BQU8sRUFB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BvcnQgZnVuY3Rpb24gaW5pdGFsaXplQXV0aE92ZXJsYXkoKTogdm9pZCB7XG4gIGlmICghaW5qZWN0QXV0aENvbmZpZygpLnNob3dSZWRpcmVjdE92ZXJsYXkpIHJldHVybjtcbiAgQXV0aE92ZXJsYXlDb21wb25lbnQuaW5pdGlhbGl6ZSgpO1xufVxuIiwiPGRpdiBjbGFzcz1cIm9keC1hdXRoLW92ZXJsYXlfX2NvbnRlbnRcIiBvZHhMYXlvdXQ9XCJncmlkIDEyIGhvcml6b250YWwtY2VudGVyIHZlcnRpY2FsLWNlbnRlciBnYXAtc21hbGxcIj5cbiAgPG9keC1sb2dvIHNpemU9XCJsYXJnZVwiPjwvb2R4LWxvZ28+XG4gIDxvZHgtY2lyY3VsYXItcHJvZ3Jlc3MgY2xhc3M9XCJvZHgtYXV0aC1vdmVybGF5LXNwaW5uZXJcIiB2YWx1ZT1cIi0xXCIgc2l6ZT1cIm1lZGl1bVwiIHN0cm9rZT1cIjNcIj5cbiAgICA8b2R4LWljb24gW25hbWVdPVwiaWNvbiQgfCBhc3luY1wiIGljb25TZXQ9XCJjb3JlXCI+PC9vZHgtaWNvbj5cbiAgPC9vZHgtY2lyY3VsYXItcHJvZ3Jlc3M+XG48L2Rpdj5cbiJdfQ==
|
|
@@ -18,7 +18,6 @@ import * as i5 from "@odx/angular/components/action-group";
|
|
|
18
18
|
import * as i6 from "@odx/angular/components/button";
|
|
19
19
|
import * as i7 from "@odx/angular/components/icon";
|
|
20
20
|
import * as i8 from "@odx/angular/components/dropdown";
|
|
21
|
-
import * as i9 from "@odx/angular/components/loading-spinner";
|
|
22
21
|
export class AuthComponent {
|
|
23
22
|
constructor() {
|
|
24
23
|
this.authConfig = injectAuthConfig();
|
|
@@ -33,13 +32,13 @@ export class AuthComponent {
|
|
|
33
32
|
}
|
|
34
33
|
}
|
|
35
34
|
AuthComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
36
|
-
AuthComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: AuthComponent, isStandalone: true, selector: "odx-auth", inputs: { signInButtonText: "signInButtonText", signOutButtonText: "signOutButtonText" }, ngImport: i0, template: "<odx-action-group>\n <ng-template [ngrxLet]=\"{ idClaims: authService.identityClaims$, isAuthenticated: authService.isAuthenticated$ }\" let-vm>\n <ng-template [ngIf]=\"vm.isAuthenticated\" [ngIfElse]=\"notAuthenticated\">\n <button odxButton [odxDropdown]=\"userProfileMenu\" [odxDropdownOptions]=\"dropdownOptions\" data-testid=\"odx-auth-user-profile-button\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\"></ng-template>\n </button>\n <ng-template #userProfileMenu>\n <odx-area-header class=\"odx-padding-x-12\" size=\"small\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\" ngProjectAs=\"odx-avatar\"></ng-template>\n {{ vm.idClaims?.username }}\n <odx-area-header-subtitle>\n {{ vm.idClaims?.email }}\n </odx-area-header-subtitle>\n </odx-area-header>\n <ng-content></ng-content>\n <div class=\"odx-margin-top-12\" odxLayout=\"flex vertical-center\">\n <odx-logo odxLayout=\"auto\" class=\"odx-margin-left-12 odx-margin-right-auto\"></odx-logo>\n <
|
|
35
|
+
AuthComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: AuthComponent, isStandalone: true, selector: "odx-auth", inputs: { signInButtonText: "signInButtonText", signOutButtonText: "signOutButtonText" }, ngImport: i0, template: "<odx-action-group>\n <ng-template [ngrxLet]=\"{ idClaims: authService.identityClaims$, isAuthenticated: authService.isAuthenticated$ }\" let-vm>\n <ng-template [ngIf]=\"vm.isAuthenticated\" [ngIfElse]=\"notAuthenticated\">\n <button odxButton [odxDropdown]=\"userProfileMenu\" [odxDropdownOptions]=\"dropdownOptions\" data-testid=\"odx-auth-user-profile-button\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\"></ng-template>\n </button>\n <ng-template #userProfileMenu>\n <odx-area-header class=\"odx-padding-x-12\" size=\"small\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\" ngProjectAs=\"odx-avatar\"></ng-template>\n {{ vm.idClaims?.username }}\n <odx-area-header-subtitle>\n {{ vm.idClaims?.email }}\n </odx-area-header-subtitle>\n </odx-area-header>\n <ng-content></ng-content>\n <div class=\"odx-margin-top-12\" odxLayout=\"flex vertical-center\">\n <odx-logo odxLayout=\"auto\" class=\"odx-margin-left-12 odx-margin-right-auto\"></odx-logo>\n <button odxButton odxAuthSignOut variant=\"ghost\" data-testid=\"odx-auth-sign-out-button\">\n {{ signOutButtonText }}\n <odx-icon name=\"logout\" alignRight></odx-icon>\n </button>\n </div>\n </ng-template>\n </ng-template>\n <ng-template #notAuthenticated>\n <button class=\"odx-auth-sign-in\" odxButton odxAuthSignIn variant=\"secondary\" data-testid=\"odx-auth-sign-in-button\">\n <odx-icon name=\"user\" alignLeft></odx-icon>\n {{ signInButtonText }}\n </button>\n </ng-template>\n <ng-template #userAvatar>\n <odx-avatar class=\"odx-auth-user-avatar\">\n {{ vm.idClaims?.initials ?? '' }}\n </odx-avatar>\n </ng-template>\n </ng-template>\n</odx-action-group>\n", styles: [".odx-auth-user-profile .odx-dropdown__inner>.odx-area-header{max-width:max(360px,25vw);min-width:296px}\n"], dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.LetDirective, selector: "[ngrxLet]", inputs: ["ngrxLet", "ngrxLetSuspenseTpl"] }, { kind: "ngmodule", type: AreaHeaderModule }, { kind: "component", type: i3.AreaHeaderComponent, selector: "odx-area-header", inputs: ["size"] }, { kind: "directive", type: i3.AreaHeaderSubtitleDirective, selector: "odx-area-header-subtitle" }, { kind: "component", type: i4.AvatarComponent, selector: "odx-avatar", inputs: ["size", "variant"] }, { kind: "component", type: i5.ActionGroupComponent, selector: "odx-action-group", inputs: ["reverse"] }, { kind: "component", type: i6.ButtonComponent, selector: "button[odxButton], a[odxButton]", inputs: ["variant", "size"] }, { kind: "component", type: i7.IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "directive", type: i8.DropdownDirective, selector: "[odxDropdown]", inputs: ["odxDropdown", "odxDropdownDisabled", "odxDropdownShowLoader", "odxDropdownClickOutsideActive", "odxDropdownOptions", "odxDropdownReferenceElement", "odxDropdownTriggerElement", "odxDropdownHost", "odxDropdownOpenTrigger", "odxDropdownCloseTrigger"], outputs: ["odxDropdownBeforeOpen", "odxDropdownAfterOpen", "odxDropdownBeforeClose", "odxDropdownAfterClose"], exportAs: ["odxDropdown"] }, { kind: "ngmodule", type: HeaderModule }, { kind: "directive", type: LogoDirective, selector: "odx-logo", inputs: ["size", "variant"] }, { kind: "directive", type: SignInDirective, selector: "[odxButton][odxAuthSignIn]", outputs: ["odxAuthSignIn"] }, { kind: "directive", type: SignOutDirective, selector: "[odxButton][odxAuthSignOut]", outputs: ["odxAuthSignOut"] }, { kind: "ngmodule", type: LoadingSpinnerModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
37
36
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthComponent, decorators: [{
|
|
38
37
|
type: Component,
|
|
39
|
-
args: [{ standalone: true, selector: 'odx-auth', imports: [CoreModule, AreaHeaderModule, DropdownModule, HeaderModule, LogoDirective, SignInDirective, SignOutDirective, LoadingSpinnerModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<odx-action-group>\n <ng-template [ngrxLet]=\"{ idClaims: authService.identityClaims$, isAuthenticated: authService.isAuthenticated$ }\" let-vm>\n <ng-template [ngIf]=\"vm.isAuthenticated\" [ngIfElse]=\"notAuthenticated\">\n <button odxButton [odxDropdown]=\"userProfileMenu\" [odxDropdownOptions]=\"dropdownOptions\" data-testid=\"odx-auth-user-profile-button\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\"></ng-template>\n </button>\n <ng-template #userProfileMenu>\n <odx-area-header class=\"odx-padding-x-12\" size=\"small\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\" ngProjectAs=\"odx-avatar\"></ng-template>\n {{ vm.idClaims?.username }}\n <odx-area-header-subtitle>\n {{ vm.idClaims?.email }}\n </odx-area-header-subtitle>\n </odx-area-header>\n <ng-content></ng-content>\n <div class=\"odx-margin-top-12\" odxLayout=\"flex vertical-center\">\n <odx-logo odxLayout=\"auto\" class=\"odx-margin-left-12 odx-margin-right-auto\"></odx-logo>\n <
|
|
38
|
+
args: [{ standalone: true, selector: 'odx-auth', imports: [CoreModule, AreaHeaderModule, DropdownModule, HeaderModule, LogoDirective, SignInDirective, SignOutDirective, LoadingSpinnerModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<odx-action-group>\n <ng-template [ngrxLet]=\"{ idClaims: authService.identityClaims$, isAuthenticated: authService.isAuthenticated$ }\" let-vm>\n <ng-template [ngIf]=\"vm.isAuthenticated\" [ngIfElse]=\"notAuthenticated\">\n <button odxButton [odxDropdown]=\"userProfileMenu\" [odxDropdownOptions]=\"dropdownOptions\" data-testid=\"odx-auth-user-profile-button\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\"></ng-template>\n </button>\n <ng-template #userProfileMenu>\n <odx-area-header class=\"odx-padding-x-12\" size=\"small\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\" ngProjectAs=\"odx-avatar\"></ng-template>\n {{ vm.idClaims?.username }}\n <odx-area-header-subtitle>\n {{ vm.idClaims?.email }}\n </odx-area-header-subtitle>\n </odx-area-header>\n <ng-content></ng-content>\n <div class=\"odx-margin-top-12\" odxLayout=\"flex vertical-center\">\n <odx-logo odxLayout=\"auto\" class=\"odx-margin-left-12 odx-margin-right-auto\"></odx-logo>\n <button odxButton odxAuthSignOut variant=\"ghost\" data-testid=\"odx-auth-sign-out-button\">\n {{ signOutButtonText }}\n <odx-icon name=\"logout\" alignRight></odx-icon>\n </button>\n </div>\n </ng-template>\n </ng-template>\n <ng-template #notAuthenticated>\n <button class=\"odx-auth-sign-in\" odxButton odxAuthSignIn variant=\"secondary\" data-testid=\"odx-auth-sign-in-button\">\n <odx-icon name=\"user\" alignLeft></odx-icon>\n {{ signInButtonText }}\n </button>\n </ng-template>\n <ng-template #userAvatar>\n <odx-avatar class=\"odx-auth-user-avatar\">\n {{ vm.idClaims?.initials ?? '' }}\n </odx-avatar>\n </ng-template>\n </ng-template>\n</odx-action-group>\n", styles: [".odx-auth-user-profile .odx-dropdown__inner>.odx-area-header{max-width:max(360px,25vw);min-width:296px}\n"] }]
|
|
40
39
|
}], propDecorators: { signInButtonText: [{
|
|
41
40
|
type: Input
|
|
42
41
|
}], signOutButtonText: [{
|
|
43
42
|
type: Input
|
|
44
43
|
}] } });
|
|
45
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
44
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9hdXRoL3NyYy9saWIvYXV0aC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9hdXRoL3NyYy9saWIvYXV0aC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLE1BQU0sRUFBRSxLQUFLLEVBQUUsaUJ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uZy10ZW1wbGF0ZT5cbiAgICA8L25nLXRlbXBsYXRlPlxuICAgIDxuZy10ZW1wbGF0ZSAjbm90QXV0aGVudGljYXRlZD5cbiAgICAgIDxidXR0b24gY2xhc3M9XCJvZHgtYXV0aC1zaWduLWluXCIgb2R4QnV0dG9uIG9keEF1dGhTaWduSW4gdmFyaWFudD1cInNlY29uZGFyeVwiIGRhdGEtdGVzdGlkPVwib2R4LWF1dGgtc2lnbi1pbi1idXR0b25cIj5cbiAgICAgICAgPG9keC1pY29uIG5hbWU9XCJ1c2VyXCIgYWxpZ25MZWZ0Pjwvb2R4LWljb24+XG4gICAgICAgIHt7IHNpZ25JbkJ1dHRvblRleHQgfX1cbiAgICAgIDwvYnV0dG9uPlxuICAgIDwvbmctdGVtcGxhdGU+XG4gICAgPG5nLXRlbXBsYXRlICN1c2VyQXZhdGFyPlxuICAgICAgPG9keC1hdmF0YXIgY2xhc3M9XCJvZHgtYXV0aC11c2VyLWF2YXRhclwiPlxuICAgICAgICB7eyB2bS5pZENsYWltcz8uaW5pdGlhbHMgPz8gJycgfX1cbiAgICAgIDwvb2R4LWF2YXRhcj5cbiAgICA8L25nLXRlbXBsYXRlPlxuICA8L25nLXRlbXBsYXRlPlxuPC9vZHgtYWN0aW9uLWdyb3VwPlxuIl19
|
|
@@ -3,6 +3,7 @@ import { WindowRef } from '@odx/angular';
|
|
|
3
3
|
import { buildUrl, isString } from '@odx/angular/utils';
|
|
4
4
|
import { OAuthModuleConfig, OAuthStorage, provideOAuthClient } from 'angular-oauth2-oidc';
|
|
5
5
|
import { tap } from 'rxjs';
|
|
6
|
+
import { initalizeAuthOverlay } from './auth-overlay.component';
|
|
6
7
|
import { AuthConfig, DEFAULT_AUTH_SCOPES, DEFAULT_ISSUERS, injectAuthConfig, ODX_AUTH_CORE_PLUGINS, provideAuthConfig } from './auth.config';
|
|
7
8
|
import { AuthService } from './auth.service';
|
|
8
9
|
import { coreIdentityPlugin } from './plugins';
|
|
@@ -52,6 +53,11 @@ export function provideAuth(config) {
|
|
|
52
53
|
useValue: initializeAuthErrorHandler,
|
|
53
54
|
multi: true,
|
|
54
55
|
},
|
|
56
|
+
{
|
|
57
|
+
provide: ENVIRONMENT_INITIALIZER,
|
|
58
|
+
useValue: initalizeAuthOverlay,
|
|
59
|
+
multi: true,
|
|
60
|
+
},
|
|
55
61
|
{
|
|
56
62
|
provide: APP_INITIALIZER,
|
|
57
63
|
useFactory: initalizeAuthConfig,
|
|
@@ -67,4 +73,4 @@ export function provideAuth(config) {
|
|
|
67
73
|
},
|
|
68
74
|
]);
|
|
69
75
|
}
|
|
70
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
76
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aC5wcm92aWRlcnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9hdXRoL3NyYy9saWIvYXV0aC5wcm92aWRlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGVBQWUsRUFBRSxtQkFBbUIsRUFBd0IsdUJBQXVCLEVBQUUsTUFBTSxFQUFFLHdCQUF3QixFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3RKLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxjQUFjLENBQUM7QUFDekMsT0FBTyxFQUFFLFFBQVEsRUFBc0MsUUFBUSxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFDNUYsT0FBTyxFQUFFLGlCQUFpQixFQUFFLFlBQVksRUFBRSxrQkFBa0IsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQzFGLE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFDM0IsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFDaEUsT0FBTyxFQUFFLFVBQVUsRUFB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gIHVzZVZhbHVlOiBpbml0aWFsaXplQXV0aEVycm9ySGFuZGxlcixcbiAgICAgIG11bHRpOiB0cnVlLFxuICAgIH0sXG4gICAge1xuICAgICAgcHJvdmlkZTogRU5WSVJPTk1FTlRfSU5JVElBTElaRVIsXG4gICAgICB1c2VWYWx1ZTogaW5pdGFsaXplQXV0aE92ZXJsYXksXG4gICAgICBtdWx0aTogdHJ1ZSxcbiAgICB9LFxuICAgIHtcbiAgICAgIHByb3ZpZGU6IEFQUF9JTklUSUFMSVpFUixcbiAgICAgIHVzZUZhY3Rvcnk6IGluaXRhbGl6ZUF1dGhDb25maWcsXG4gICAgICBtdWx0aTogdHJ1ZSxcbiAgICB9LFxuICAgIHtcbiAgICAgIHByb3ZpZGU6IE9BdXRoU3RvcmFnZSxcbiAgICAgIHVzZUZhY3Rvcnk6ICgpID0+IGluamVjdChBdXRoQ29uZmlnKS5zdG9yYWdlID8/IGluamVjdChXaW5kb3dSZWYpLm5hdGl2ZVdpbmRvdy5sb2NhbFN0b3JhZ2UsXG4gICAgfSxcbiAgICB7XG4gICAgICBwcm92aWRlOiBPRFhfQVVUSF9DT1JFX1BMVUdJTlMsXG4gICAgICB1c2VWYWx1ZTogW2NvcmVJZGVudGl0eVBsdWdpbl0sXG4gICAgfSxcbiAgXSk7XG59XG4iXX0=
|
package/fesm2015/odx-auth.mjs
CHANGED
|
@@ -1,29 +1,35 @@
|
|
|
1
|
+
import { trigger, transition, useAnimation } from '@angular/animations';
|
|
2
|
+
import * as i1 from '@angular/common';
|
|
3
|
+
import { CommonModule, NgIf } from '@angular/common';
|
|
1
4
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, Injectable,
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { LoadingSpinnerDirective, LoadingSpinnerModule } from '@odx/angular/components/loading-spinner';
|
|
5
|
+
import { InjectionToken, inject, Injectable, Component, ChangeDetectionStrategy, ViewEncapsulation, Directive, EventEmitter, Output, HostListener, Input, NgModule, EnvironmentInjector, makeEnvironmentProviders, ENVIRONMENT_INITIALIZER, APP_INITIALIZER } from '@angular/core';
|
|
6
|
+
import { fadeOut } from '@odx/angular/animations';
|
|
7
|
+
import { DynamicViewService } from '@odx/angular/cdk/dynamic-view';
|
|
8
|
+
import * as i6 from '@odx/angular/components/button';
|
|
9
|
+
import { ButtonComponent } from '@odx/angular/components/button';
|
|
10
|
+
import { CircularProgressComponent } from '@odx/angular/components/circular-progress';
|
|
11
|
+
import * as i7 from '@odx/angular/components/icon';
|
|
12
|
+
import { IconComponent } from '@odx/angular/components/icon';
|
|
11
13
|
import { LogoDirective } from '@odx/angular/components/logo';
|
|
14
|
+
import { BehaviorSubject, filter, map, distinctUntilChanged, share, of, switchMap, combineLatest, tap, take, fromEvent, startWith, merge, shareReplay, EMPTY } from 'rxjs';
|
|
12
15
|
import { isString, createConfigTokens, untilDestroyed, Position, buildUrl } from '@odx/angular/utils';
|
|
13
16
|
import { __awaiter } from 'tslib';
|
|
14
17
|
import { HttpErrorResponse } from '@angular/common/http';
|
|
15
18
|
import { Router } from '@angular/router';
|
|
19
|
+
import { WindowRef, CoreModule } from '@odx/angular';
|
|
16
20
|
import { OAuthService, OAuthErrorEvent, provideOAuthClient, OAuthModuleConfig, OAuthStorage } from 'angular-oauth2-oidc';
|
|
17
21
|
import { deepmerge } from 'deepmerge-ts';
|
|
18
22
|
import jwtDecode from 'jwt-decode';
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
23
|
+
import * as i3 from '@odx/angular/components/area-header';
|
|
24
|
+
import { AreaHeaderModule } from '@odx/angular/components/area-header';
|
|
25
|
+
import * as i8 from '@odx/angular/components/dropdown';
|
|
26
|
+
import { DropdownModule } from '@odx/angular/components/dropdown';
|
|
27
|
+
import { HeaderModule } from '@odx/angular/components/header';
|
|
28
|
+
import * as i1$1 from '@odx/angular/components/loading-spinner';
|
|
29
|
+
import { LoadingSpinnerDirective, LoadingSpinnerModule } from '@odx/angular/components/loading-spinner';
|
|
22
30
|
import * as i2 from '@ngrx/component';
|
|
23
31
|
import * as i4 from '@odx/angular/components/avatar';
|
|
24
32
|
import * as i5 from '@odx/angular/components/action-group';
|
|
25
|
-
import * as i6 from '@odx/angular/components/button';
|
|
26
|
-
import * as i7 from '@odx/angular/components/icon';
|
|
27
33
|
|
|
28
34
|
function createInitials(value) {
|
|
29
35
|
if (!value)
|
|
@@ -299,6 +305,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
299
305
|
args: [{ providedIn: 'root' }]
|
|
300
306
|
}], ctorParameters: function () { return []; } });
|
|
301
307
|
|
|
308
|
+
class AuthOverlayComponent {
|
|
309
|
+
constructor() {
|
|
310
|
+
this.icon$ = inject(AuthService).isRedirecting$.pipe(startWith(false), distinctUntilChanged(), map((isRedirecting) => (isRedirecting ? 'link-external' : 'user')));
|
|
311
|
+
}
|
|
312
|
+
static initialize() {
|
|
313
|
+
const dynamicViewService = inject(DynamicViewService);
|
|
314
|
+
inject(AuthService).isLoading$.subscribe((isLoading) => {
|
|
315
|
+
var _a, _b;
|
|
316
|
+
if (isLoading) {
|
|
317
|
+
(_a = AuthOverlayComponent.instance) !== null && _a !== void 0 ? _a : (AuthOverlayComponent.instance = dynamicViewService.createView(AuthOverlayComponent));
|
|
318
|
+
}
|
|
319
|
+
else {
|
|
320
|
+
(_b = AuthOverlayComponent.instance) === null || _b === void 0 ? void 0 : _b.destroy();
|
|
321
|
+
AuthOverlayComponent.instance = null;
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
AuthOverlayComponent.instance = null;
|
|
327
|
+
AuthOverlayComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
328
|
+
AuthOverlayComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: AuthOverlayComponent, isStandalone: true, selector: "div.odx-auth-overlay", host: { properties: { "@hostAnimation": "true" } }, ngImport: i0, template: "<div class=\"odx-auth-overlay__content\" odxLayout=\"grid 12 horizontal-center vertical-center gap-small\">\n <odx-logo size=\"large\"></odx-logo>\n <odx-circular-progress class=\"odx-auth-overlay-spinner\" value=\"-1\" size=\"medium\" stroke=\"3\">\n <odx-icon [name]=\"icon$ | async\" iconSet=\"core\"></odx-icon>\n </odx-circular-progress>\n</div>\n", styles: ["@keyframes odx-auth-overlay-animation{0%{opacity:0;transform:translate(-50%,-50%) scale(.9)}to{opacity:1;transform:translate(-50%,-50%)}}.odx-auth-overlay{--odx-c-highlight: var(--odx-c-primary);background-color:var(--odx-c-background-content);position:fixed;z-index:var(--odx-v-layer-5);inset:0}.odx-auth-overlay__content{top:50%;left:50%;transform:translate(-50%,-50%);position:absolute;animation:odx-auth-overlay-animation .75s ease}.odx-auth-overlay-spinner{position:relative}.odx-auth-overlay-spinner .odx-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet"] }, { kind: "directive", type: LogoDirective, selector: "odx-logo", inputs: ["size", "variant"] }, { kind: "component", type: CircularProgressComponent, selector: "odx-circular-progress", inputs: ["stroke", "size", "value"] }], animations: [trigger('hostAnimation', [transition(':leave', useAnimation(fadeOut()))])], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
329
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthOverlayComponent, decorators: [{
|
|
330
|
+
type: Component,
|
|
331
|
+
args: [{ standalone: true, selector: 'div.odx-auth-overlay', imports: [CommonModule, ButtonComponent, IconComponent, LogoDirective, CircularProgressComponent], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
332
|
+
'[@hostAnimation]': 'true',
|
|
333
|
+
}, animations: [trigger('hostAnimation', [transition(':leave', useAnimation(fadeOut()))])], template: "<div class=\"odx-auth-overlay__content\" odxLayout=\"grid 12 horizontal-center vertical-center gap-small\">\n <odx-logo size=\"large\"></odx-logo>\n <odx-circular-progress class=\"odx-auth-overlay-spinner\" value=\"-1\" size=\"medium\" stroke=\"3\">\n <odx-icon [name]=\"icon$ | async\" iconSet=\"core\"></odx-icon>\n </odx-circular-progress>\n</div>\n", styles: ["@keyframes odx-auth-overlay-animation{0%{opacity:0;transform:translate(-50%,-50%) scale(.9)}to{opacity:1;transform:translate(-50%,-50%)}}.odx-auth-overlay{--odx-c-highlight: var(--odx-c-primary);background-color:var(--odx-c-background-content);position:fixed;z-index:var(--odx-v-layer-5);inset:0}.odx-auth-overlay__content{top:50%;left:50%;transform:translate(-50%,-50%);position:absolute;animation:odx-auth-overlay-animation .75s ease}.odx-auth-overlay-spinner{position:relative}.odx-auth-overlay-spinner .odx-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}\n"] }]
|
|
334
|
+
}] });
|
|
335
|
+
function initalizeAuthOverlay() {
|
|
336
|
+
if (!injectAuthConfig().showRedirectOverlay)
|
|
337
|
+
return;
|
|
338
|
+
AuthOverlayComponent.initialize();
|
|
339
|
+
}
|
|
340
|
+
|
|
302
341
|
class AuthActionDirective {
|
|
303
342
|
constructor() {
|
|
304
343
|
this.takeUntilDestroyed = untilDestroyed();
|
|
@@ -330,7 +369,7 @@ class SignInDirective extends AuthActionDirective {
|
|
|
330
369
|
}
|
|
331
370
|
}
|
|
332
371
|
SignInDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SignInDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
333
|
-
SignInDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: SignInDirective, isStandalone: true, selector: "[odxButton][odxAuthSignIn]", outputs: { afterSignIn: "odxAuthSignIn" }, host: { listeners: { "click": "handleClick()" } }, usesInheritance: true, hostDirectives: [{ directive: i1.LoadingSpinnerDirective }], ngImport: i0 });
|
|
372
|
+
SignInDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: SignInDirective, isStandalone: true, selector: "[odxButton][odxAuthSignIn]", outputs: { afterSignIn: "odxAuthSignIn" }, host: { listeners: { "click": "handleClick()" } }, usesInheritance: true, hostDirectives: [{ directive: i1$1.LoadingSpinnerDirective }], ngImport: i0 });
|
|
334
373
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SignInDirective, decorators: [{
|
|
335
374
|
type: Directive,
|
|
336
375
|
args: [{
|
|
@@ -358,7 +397,7 @@ class SignOutDirective extends AuthActionDirective {
|
|
|
358
397
|
}
|
|
359
398
|
}
|
|
360
399
|
SignOutDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SignOutDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
361
|
-
SignOutDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: SignOutDirective, isStandalone: true, selector: "[odxButton][odxAuthSignOut]", outputs: { afterSignOut: "odxAuthSignOut" }, host: { listeners: { "click": "handleClick()" } }, usesInheritance: true, hostDirectives: [{ directive: i1.LoadingSpinnerDirective }], ngImport: i0 });
|
|
400
|
+
SignOutDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: SignOutDirective, isStandalone: true, selector: "[odxButton][odxAuthSignOut]", outputs: { afterSignOut: "odxAuthSignOut" }, host: { listeners: { "click": "handleClick()" } }, usesInheritance: true, hostDirectives: [{ directive: i1$1.LoadingSpinnerDirective }], ngImport: i0 });
|
|
362
401
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SignOutDirective, decorators: [{
|
|
363
402
|
type: Directive,
|
|
364
403
|
args: [{
|
|
@@ -388,10 +427,10 @@ class AuthComponent {
|
|
|
388
427
|
}
|
|
389
428
|
}
|
|
390
429
|
AuthComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
391
|
-
AuthComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: AuthComponent, isStandalone: true, selector: "odx-auth", inputs: { signInButtonText: "signInButtonText", signOutButtonText: "signOutButtonText" }, ngImport: i0, template: "<odx-action-group>\n <ng-template [ngrxLet]=\"{ idClaims: authService.identityClaims$, isAuthenticated: authService.isAuthenticated$ }\" let-vm>\n <ng-template [ngIf]=\"vm.isAuthenticated\" [ngIfElse]=\"notAuthenticated\">\n <button odxButton [odxDropdown]=\"userProfileMenu\" [odxDropdownOptions]=\"dropdownOptions\" data-testid=\"odx-auth-user-profile-button\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\"></ng-template>\n </button>\n <ng-template #userProfileMenu>\n <odx-area-header class=\"odx-padding-x-12\" size=\"small\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\" ngProjectAs=\"odx-avatar\"></ng-template>\n {{ vm.idClaims?.username }}\n <odx-area-header-subtitle>\n {{ vm.idClaims?.email }}\n </odx-area-header-subtitle>\n </odx-area-header>\n <ng-content></ng-content>\n <div class=\"odx-margin-top-12\" odxLayout=\"flex vertical-center\">\n <odx-logo odxLayout=\"auto\" class=\"odx-margin-left-12 odx-margin-right-auto\"></odx-logo>\n <
|
|
430
|
+
AuthComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: AuthComponent, isStandalone: true, selector: "odx-auth", inputs: { signInButtonText: "signInButtonText", signOutButtonText: "signOutButtonText" }, ngImport: i0, template: "<odx-action-group>\n <ng-template [ngrxLet]=\"{ idClaims: authService.identityClaims$, isAuthenticated: authService.isAuthenticated$ }\" let-vm>\n <ng-template [ngIf]=\"vm.isAuthenticated\" [ngIfElse]=\"notAuthenticated\">\n <button odxButton [odxDropdown]=\"userProfileMenu\" [odxDropdownOptions]=\"dropdownOptions\" data-testid=\"odx-auth-user-profile-button\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\"></ng-template>\n </button>\n <ng-template #userProfileMenu>\n <odx-area-header class=\"odx-padding-x-12\" size=\"small\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\" ngProjectAs=\"odx-avatar\"></ng-template>\n {{ vm.idClaims?.username }}\n <odx-area-header-subtitle>\n {{ vm.idClaims?.email }}\n </odx-area-header-subtitle>\n </odx-area-header>\n <ng-content></ng-content>\n <div class=\"odx-margin-top-12\" odxLayout=\"flex vertical-center\">\n <odx-logo odxLayout=\"auto\" class=\"odx-margin-left-12 odx-margin-right-auto\"></odx-logo>\n <button odxButton odxAuthSignOut variant=\"ghost\" data-testid=\"odx-auth-sign-out-button\">\n {{ signOutButtonText }}\n <odx-icon name=\"logout\" alignRight></odx-icon>\n </button>\n </div>\n </ng-template>\n </ng-template>\n <ng-template #notAuthenticated>\n <button class=\"odx-auth-sign-in\" odxButton odxAuthSignIn variant=\"secondary\" data-testid=\"odx-auth-sign-in-button\">\n <odx-icon name=\"user\" alignLeft></odx-icon>\n {{ signInButtonText }}\n </button>\n </ng-template>\n <ng-template #userAvatar>\n <odx-avatar class=\"odx-auth-user-avatar\">\n {{ vm.idClaims?.initials ?? '' }}\n </odx-avatar>\n </ng-template>\n </ng-template>\n</odx-action-group>\n", styles: [".odx-auth-user-profile .odx-dropdown__inner>.odx-area-header{max-width:max(360px,25vw);min-width:296px}\n"], dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.LetDirective, selector: "[ngrxLet]", inputs: ["ngrxLet", "ngrxLetSuspenseTpl"] }, { kind: "ngmodule", type: AreaHeaderModule }, { kind: "component", type: i3.AreaHeaderComponent, selector: "odx-area-header", inputs: ["size"] }, { kind: "directive", type: i3.AreaHeaderSubtitleDirective, selector: "odx-area-header-subtitle" }, { kind: "component", type: i4.AvatarComponent, selector: "odx-avatar", inputs: ["size", "variant"] }, { kind: "component", type: i5.ActionGroupComponent, selector: "odx-action-group", inputs: ["reverse"] }, { kind: "component", type: i6.ButtonComponent, selector: "button[odxButton], a[odxButton]", inputs: ["variant", "size"] }, { kind: "component", type: i7.IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "directive", type: i8.DropdownDirective, selector: "[odxDropdown]", inputs: ["odxDropdown", "odxDropdownDisabled", "odxDropdownShowLoader", "odxDropdownClickOutsideActive", "odxDropdownOptions", "odxDropdownReferenceElement", "odxDropdownTriggerElement", "odxDropdownHost", "odxDropdownOpenTrigger", "odxDropdownCloseTrigger"], outputs: ["odxDropdownBeforeOpen", "odxDropdownAfterOpen", "odxDropdownBeforeClose", "odxDropdownAfterClose"], exportAs: ["odxDropdown"] }, { kind: "ngmodule", type: HeaderModule }, { kind: "directive", type: LogoDirective, selector: "odx-logo", inputs: ["size", "variant"] }, { kind: "directive", type: SignInDirective, selector: "[odxButton][odxAuthSignIn]", outputs: ["odxAuthSignIn"] }, { kind: "directive", type: SignOutDirective, selector: "[odxButton][odxAuthSignOut]", outputs: ["odxAuthSignOut"] }, { kind: "ngmodule", type: LoadingSpinnerModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
392
431
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthComponent, decorators: [{
|
|
393
432
|
type: Component,
|
|
394
|
-
args: [{ standalone: true, selector: 'odx-auth', imports: [CoreModule, AreaHeaderModule, DropdownModule, HeaderModule, LogoDirective, SignInDirective, SignOutDirective, LoadingSpinnerModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<odx-action-group>\n <ng-template [ngrxLet]=\"{ idClaims: authService.identityClaims$, isAuthenticated: authService.isAuthenticated$ }\" let-vm>\n <ng-template [ngIf]=\"vm.isAuthenticated\" [ngIfElse]=\"notAuthenticated\">\n <button odxButton [odxDropdown]=\"userProfileMenu\" [odxDropdownOptions]=\"dropdownOptions\" data-testid=\"odx-auth-user-profile-button\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\"></ng-template>\n </button>\n <ng-template #userProfileMenu>\n <odx-area-header class=\"odx-padding-x-12\" size=\"small\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\" ngProjectAs=\"odx-avatar\"></ng-template>\n {{ vm.idClaims?.username }}\n <odx-area-header-subtitle>\n {{ vm.idClaims?.email }}\n </odx-area-header-subtitle>\n </odx-area-header>\n <ng-content></ng-content>\n <div class=\"odx-margin-top-12\" odxLayout=\"flex vertical-center\">\n <odx-logo odxLayout=\"auto\" class=\"odx-margin-left-12 odx-margin-right-auto\"></odx-logo>\n <
|
|
433
|
+
args: [{ standalone: true, selector: 'odx-auth', imports: [CoreModule, AreaHeaderModule, DropdownModule, HeaderModule, LogoDirective, SignInDirective, SignOutDirective, LoadingSpinnerModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<odx-action-group>\n <ng-template [ngrxLet]=\"{ idClaims: authService.identityClaims$, isAuthenticated: authService.isAuthenticated$ }\" let-vm>\n <ng-template [ngIf]=\"vm.isAuthenticated\" [ngIfElse]=\"notAuthenticated\">\n <button odxButton [odxDropdown]=\"userProfileMenu\" [odxDropdownOptions]=\"dropdownOptions\" data-testid=\"odx-auth-user-profile-button\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\"></ng-template>\n </button>\n <ng-template #userProfileMenu>\n <odx-area-header class=\"odx-padding-x-12\" size=\"small\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\" ngProjectAs=\"odx-avatar\"></ng-template>\n {{ vm.idClaims?.username }}\n <odx-area-header-subtitle>\n {{ vm.idClaims?.email }}\n </odx-area-header-subtitle>\n </odx-area-header>\n <ng-content></ng-content>\n <div class=\"odx-margin-top-12\" odxLayout=\"flex vertical-center\">\n <odx-logo odxLayout=\"auto\" class=\"odx-margin-left-12 odx-margin-right-auto\"></odx-logo>\n <button odxButton odxAuthSignOut variant=\"ghost\" data-testid=\"odx-auth-sign-out-button\">\n {{ signOutButtonText }}\n <odx-icon name=\"logout\" alignRight></odx-icon>\n </button>\n </div>\n </ng-template>\n </ng-template>\n <ng-template #notAuthenticated>\n <button class=\"odx-auth-sign-in\" odxButton odxAuthSignIn variant=\"secondary\" data-testid=\"odx-auth-sign-in-button\">\n <odx-icon name=\"user\" alignLeft></odx-icon>\n {{ signInButtonText }}\n </button>\n </ng-template>\n <ng-template #userAvatar>\n <odx-avatar class=\"odx-auth-user-avatar\">\n {{ vm.idClaims?.initials ?? '' }}\n </odx-avatar>\n </ng-template>\n </ng-template>\n</odx-action-group>\n", styles: [".odx-auth-user-profile .odx-dropdown__inner>.odx-area-header{max-width:max(360px,25vw);min-width:296px}\n"] }]
|
|
395
434
|
}], propDecorators: { signInButtonText: [{
|
|
396
435
|
type: Input
|
|
397
436
|
}], signOutButtonText: [{
|
|
@@ -417,7 +456,7 @@ class AuthDirective {
|
|
|
417
456
|
}
|
|
418
457
|
}
|
|
419
458
|
AuthDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
420
|
-
AuthDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: AuthDirective, isStandalone: true, selector: "ng-template[odxAuth]", inputs: { authorizationHandler: ["odxAuth", "authorizationHandler"], elseTemplate: ["odxAuthElse", "elseTemplate"] }, hostDirectives: [{ directive: i1
|
|
459
|
+
AuthDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: AuthDirective, isStandalone: true, selector: "ng-template[odxAuth]", inputs: { authorizationHandler: ["odxAuth", "authorizationHandler"], elseTemplate: ["odxAuthElse", "elseTemplate"] }, hostDirectives: [{ directive: i1.NgIf }], ngImport: i0 });
|
|
421
460
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthDirective, decorators: [{
|
|
422
461
|
type: Directive,
|
|
423
462
|
args: [{
|
|
@@ -530,6 +569,11 @@ function provideAuth(config) {
|
|
|
530
569
|
useValue: initializeAuthErrorHandler,
|
|
531
570
|
multi: true,
|
|
532
571
|
},
|
|
572
|
+
{
|
|
573
|
+
provide: ENVIRONMENT_INITIALIZER,
|
|
574
|
+
useValue: initalizeAuthOverlay,
|
|
575
|
+
multi: true,
|
|
576
|
+
},
|
|
533
577
|
{
|
|
534
578
|
provide: APP_INITIALIZER,
|
|
535
579
|
useFactory: initalizeAuthConfig,
|
|
@@ -573,5 +617,5 @@ function unauthGuard(authorizedHandler, redirectTo) {
|
|
|
573
617
|
* Generated bundle index. Do not edit.
|
|
574
618
|
*/
|
|
575
619
|
|
|
576
|
-
export { AuthActionDirective, AuthComponent, AuthConfig, AuthDefaultConfig, AuthDirective, AuthHttpCache, AuthModule, AuthPluginManager, AuthService, DEFAULT_AUTH_SCOPES, DEFAULT_ISSUERS, ODX_AUTH_CORE_PLUGINS, ODX_AUTH_HTTP_CACHE_STORAGE, ODX_AUTH_PLUGINS, SignInDirective, SignOutDirective, authGuard, configureInterceptor, coreIdentityPlugin, createInitials, initalizeAuthConfig, initializeAuthErrorHandler, injectAuthConfig, provideAuth, provideAuthConfig, resolveEmail, resolveUsername, unauthGuard };
|
|
620
|
+
export { AuthActionDirective, AuthComponent, AuthConfig, AuthDefaultConfig, AuthDirective, AuthHttpCache, AuthModule, AuthOverlayComponent, AuthPluginManager, AuthService, DEFAULT_AUTH_SCOPES, DEFAULT_ISSUERS, ODX_AUTH_CORE_PLUGINS, ODX_AUTH_HTTP_CACHE_STORAGE, ODX_AUTH_PLUGINS, SignInDirective, SignOutDirective, authGuard, configureInterceptor, coreIdentityPlugin, createInitials, initalizeAuthConfig, initalizeAuthOverlay, initializeAuthErrorHandler, injectAuthConfig, provideAuth, provideAuthConfig, resolveEmail, resolveUsername, unauthGuard };
|
|
577
621
|
//# sourceMappingURL=odx-auth.mjs.map
|