@dbg-riskit/angular-login 18.0.0 → 20.0.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/docs/README.md CHANGED
@@ -1,13 +1,12 @@
1
- ![CI](https://github.deutsche-boerse.de/dev/risk-angular-common/workflows/CI/badge.svg?event=push)
2
- ![lint-bash](https://github.deutsche-boerse.de/dev/risk-angular-common/workflows/lint-bash/badge.svg?event=push)
3
- ![lint-docker](https://github.deutsche-boerse.de/dev/risk-angular-common/workflows/lint-docker/badge.svg?event=push)
1
+ ![CI](https://github.deutsche-boerse.de/RiskIT/risk-angular-common/workflows/CI/badge.svg?event=push)
2
+ ![lint-bash](https://github.deutsche-boerse.de/RiskIT/risk-angular-common/workflows/lint-bash/badge.svg?event=push)
3
+ ![lint-docker](https://github.deutsche-boerse.de/RiskIT/risk-angular-common/workflows/lint-docker/badge.svg?event=push)
4
4
 
5
5
  # risk-angular-common (Angular 13 and @angular/material based library for RiskIT applications)
6
6
 
7
7
  Used by:
8
- - [dev/DAVe-UI](https://github.deutsche-boerse.de/dev/DAVe-UI)
9
- - [dev/DAVe-MarginEstimator-UI](https://github.deutsche-boerse.de/dev/DAVe-MarginEstimator-UI)
10
- - [dev/MDH-UI](https://github.deutsche-boerse.de/dev/MDH-UI)
8
+ - [RiskIT/CPME-UI](https://github.deutsche-boerse.de/RiskIT/CPME-UI)
9
+ - [RiskIT/MDH-UI](https://github.deutsche-boerse.de/RiskIT/MDH-UI)
11
10
  - [RiskIT/openid-k8s-token-generator](https://github.deutsche-boerse.de/RiskIT/openid-k8s-token-generator)
12
11
 
13
12
  ## Packages
@@ -1,32 +1,28 @@
1
- import * as i2 from '@angular/common';
2
- import { CommonModule } from '@angular/common';
1
+ import { AsyncPipe } from '@angular/common';
3
2
  import * as i0 from '@angular/core';
4
- import { Component, ChangeDetectionStrategy, Inject, Directive, Input, HostBinding, NgModule } from '@angular/core';
5
- import * as i3 from '@angular/forms';
3
+ import { inject, ChangeDetectorRef, ChangeDetectionStrategy, Component, Directive, HostBinding, Input } from '@angular/core';
4
+ import * as i1 from '@angular/forms';
6
5
  import { FormsModule } from '@angular/forms';
7
- import { RouterModule } from '@angular/router';
8
- import * as i1 from '@dbg-riskit/angular-auth';
9
- import { AuthModule } from '@dbg-riskit/angular-auth';
10
- import * as i4 from '@dbg-riskit/angular-view';
11
- import { BaseComponent, CommonViewModule } from '@dbg-riskit/angular-view';
6
+ import { MatButton } from '@angular/material/button';
7
+ import { MatCard, MatCardActions, MatCardContent, MatCardHeader, MatCardTitle } from '@angular/material/card';
8
+ import { MatFormField } from '@angular/material/form-field';
9
+ import { MatIcon } from '@angular/material/icon';
10
+ import { MatInput } from '@angular/material/input';
11
+ import { MatProgressSpinner } from '@angular/material/progress-spinner';
12
+ import { AuthRoutingFlowService } from '@dbg-riskit/angular-auth';
12
13
  import { AUTH_PROVIDER, SECONDARY_LOGO } from '@dbg-riskit/angular-common';
13
14
  import { toErrorMessage } from '@dbg-riskit/angular-error';
15
+ import { BaseComponent, FlexComponent, FlexSpacerComponent, MessageComponent } from '@dbg-riskit/angular-view';
14
16
  import { takeUntil, first } from 'rxjs/operators';
15
- import * as i3$1 from '@angular/material/button';
16
- import * as i6 from '@angular/material/card';
17
- import * as i7 from '@angular/material/form-field';
18
- import * as i8 from '@angular/material/icon';
19
- import * as i9 from '@angular/material/input';
20
- import * as i10 from '@angular/material/progress-spinner';
21
- import * as i5 from '@angular/material/menu';
17
+ import { MatMenu, MatMenuItem, MatMenuTrigger } from '@angular/material/menu';
22
18
 
23
19
  class LoginComponent extends BaseComponent {
24
- constructor(authProvider, changeDetectorRef, authRoutingFlowService, secondaryLogo) {
20
+ constructor() {
25
21
  super();
26
- this.authProvider = authProvider;
27
- this.changeDetectorRef = changeDetectorRef;
28
- this.authRoutingFlowService = authRoutingFlowService;
29
- this.secondaryLogo = secondaryLogo;
22
+ this.authProvider = inject(AUTH_PROVIDER);
23
+ this.changeDetectorRef = inject(ChangeDetectorRef);
24
+ this.authRoutingFlowService = inject(AuthRoutingFlowService);
25
+ this.secondaryLogo = inject(SECONDARY_LOGO);
30
26
  /**
31
27
  * Control for "login button-to-spinner".
32
28
  */
@@ -34,14 +30,6 @@ class LoginComponent extends BaseComponent {
34
30
  // Update component state on login status change
35
31
  this.authProvider.loggedInStream.pipe(takeUntil(this.destroyed)).subscribe(() => this.changeDetectorRef.markForCheck());
36
32
  }
37
- ngAfterViewInit() {
38
- this.authRoutingFlowService.loginViaService().pipe(takeUntil(this.destroyed)).subscribe(() => {
39
- this.changeDetectorRef.markForCheck();
40
- }, (err) => {
41
- this.errorMessage = toErrorMessage(err).message;
42
- this.changeDetectorRef.markForCheck();
43
- });
44
- }
45
33
  get isDirectFlow() {
46
34
  return this.authRoutingFlowService.directFlow;
47
35
  }
@@ -51,6 +39,17 @@ class LoginComponent extends BaseComponent {
51
39
  get userProfile() {
52
40
  return this.authProvider.userProfile;
53
41
  }
42
+ get logo() {
43
+ return this.secondaryLogo;
44
+ }
45
+ ngAfterViewInit() {
46
+ this.authRoutingFlowService.loginViaService().pipe(takeUntil(this.destroyed)).subscribe(() => {
47
+ this.changeDetectorRef.markForCheck();
48
+ }, (err) => {
49
+ this.errorMessage = toErrorMessage(err).message;
50
+ this.changeDetectorRef.markForCheck();
51
+ });
52
+ }
54
53
  login() {
55
54
  this.loggingIn = true;
56
55
  this.authRoutingFlowService.login(this.username, this.password).pipe(first()).subscribe((res) => {
@@ -65,30 +64,37 @@ class LoginComponent extends BaseComponent {
65
64
  this.changeDetectorRef.markForCheck();
66
65
  });
67
66
  }
68
- get logo() {
69
- return this.secondaryLogo;
70
- }
71
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoginComponent, deps: [{ token: AUTH_PROVIDER }, { token: i0.ChangeDetectorRef }, { token: i1.AuthRoutingFlowService }, { token: SECONDARY_LOGO }], target: i0.ɵɵFactoryTarget.Component }); }
72
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: LoginComponent, selector: "ng-component", host: { properties: { "class.risk-login-form": "true" } }, usesInheritance: true, ngImport: i0, template: "<risk-flex>\n <risk-flex-spacer></risk-flex-spacer>\n\n <div *ngIf=\"isDirectFlow\">\n <ng-template #loggedOut>\n <risk-error *ngIf=\"errorMessage\" [message]=\"errorMessage\"></risk-error>\n\n <form (ngSubmit)=\"login()\" role=\"form\">\n <mat-card>\n <mat-card-header>\n <mat-card-title>Please Sign In</mat-card-title>\n </mat-card-header>\n <mat-card-content>\n <mat-form-field class=\"risk-full-width\">\n <input matInput\n type=\"text\"\n placeholder=\"Username\"\n name=\"username\"\n [(ngModel)]=\"username\"\n autofocus>\n </mat-form-field>\n <mat-form-field class=\"risk-full-width\">\n <input matInput\n type=\"password\"\n placeholder=\"Password\"\n name=\"password\"\n [(ngModel)]=\"password\">\n </mat-form-field>\n </mat-card-content>\n <mat-card-actions>\n <button *ngIf=\"!loggingIn\"\n mat-raised-button\n color=\"primary\"\n type=\"submit\">\n Sign in\n </button>\n <mat-spinner *ngIf=\"loggingIn\" [diameter]=\"36\"></mat-spinner>\n <risk-flex-spacer></risk-flex-spacer>\n <img [src]=\"logo\" alt=\"Company logo\">\n </mat-card-actions>\n </mat-card>\n </form>\n </ng-template>\n\n <ng-template [ngIf]=\"authStatus | async\" [ngIfElse]=\"loggedOut\">\n <ng-template [ngIf]=\"userProfile | async\" let-user=\"ngIf\">\n <risk-good *ngIf=\"user?.name\"\n [message]=\"'Successfully logged in as ' + user.name + '.'\"></risk-good>\n <risk-good *ngIf=\"!user && !user.name\"\n [message]=\"'Successfully logged in!'\"></risk-good>\n </ng-template>\n </ng-template>\n </div>\n\n <div *ngIf=\"!isDirectFlow\">\n <ng-template [ngIf]=\"!errorMessage\">\n <div class=\"risk-login-form-flex-wrapper\">\n <div></div>\n <mat-spinner></mat-spinner>\n <div></div>\n </div>\n <h3>Contacting authentication server...</h3>\n </ng-template>\n <ng-template [ngIf]=\"errorMessage\">\n <div class=\"risk-login-form-flex-wrapper\">\n <div></div>\n <mat-icon class=\"risk-login-form-error\" color=\"warn\">error_outline</mat-icon>\n <div></div>\n </div>\n <h3>Failed to authenticate user: {{errorMessage}}</h3>\n <div class=\"risk-login-form-flex-wrapper\">\n <div></div>\n <button mat-button\n (click)=\"login()\"\n color=\"primary\"\n type=\"button\">\n <mat-icon>autorenew</mat-icon>\n Retry\n </button>\n <div></div>\n </div>\n </ng-template>\n </div>\n\n <risk-flex-spacer></risk-flex-spacer>\n</risk-flex>\n", styles: [":host{display:block;padding:0;margin:0}:host>*{vertical-align:bottom}\n", ".risk-flex>div{width:400px;max-width:97vw;max-height:70vh;margin-top:40px}.mat-mdc-card-actions img{margin:3px 0;height:30px}.risk-login-form-flex-wrapper{display:flex}.risk-login-form-flex-wrapper>div{flex:1}.risk-login-form-error{font-size:100px;height:100px;width:100px}h3{text-align:center}input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px white inset}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i4.MessageComponent, selector: "risk-error, risk-good, risk-info, risk-message, risk-warn, risk-initial-load, risk-no-data, risk-update-failed", inputs: ["message"] }, { kind: "component", type: i3$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i6.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i6.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i6.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i6.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i6.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i4.FlexComponent, selector: "risk-flex", inputs: ["wrapContent"] }, { kind: "component", type: i4.FlexSpacerComponent, selector: "risk-flex-spacer" }, { kind: "component", type: i10.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
67
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: LoginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
68
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: LoginComponent, isStandalone: true, selector: "ng-component", host: { properties: { "class.risk-login-form": "true" } }, usesInheritance: true, ngImport: i0, template: "<risk-flex>\n <risk-flex-spacer/>\n\n @if (isDirectFlow) {\n <div>\n @if (authStatus | async) {\n @if (userProfile | async; as user) {\n @if (user?.name) {\n <risk-good [message]=\"'Successfully logged in as ' + user.name + '.'\"/>\n } @else {\n <risk-good [message]=\"'Successfully logged in!'\"/>\n }\n }\n } @else {\n @if (errorMessage) {\n <risk-error [message]=\"errorMessage\"/>\n }\n <form (ngSubmit)=\"login()\" role=\"form\">\n <mat-card>\n <mat-card-header>\n <mat-card-title>Please Sign In</mat-card-title>\n </mat-card-header>\n <mat-card-content>\n <mat-form-field class=\"risk-full-width\">\n <input [(ngModel)]=\"username\"\n autofocus\n matInput\n name=\"username\"\n placeholder=\"Username\"\n type=\"text\">\n </mat-form-field>\n <mat-form-field class=\"risk-full-width\">\n <input [(ngModel)]=\"password\"\n matInput\n name=\"password\"\n placeholder=\"Password\"\n type=\"password\">\n </mat-form-field>\n </mat-card-content>\n <mat-card-actions>\n @if (!loggingIn) {\n <button\n color=\"primary\"\n mat-raised-button\n type=\"submit\">\n Sign in\n </button>\n }\n @if (loggingIn) {\n <mat-spinner [diameter]=\"36\"/>\n }\n <risk-flex-spacer/>\n <img [src]=\"logo\" alt=\"Company logo\">\n </mat-card-actions>\n </mat-card>\n </form>\n }\n </div>\n } @else {\n <div>\n @if (!errorMessage) {\n <div class=\"risk-login-form-flex-wrapper\">\n <div></div>\n <mat-spinner/>\n <div></div>\n </div>\n <h3>Contacting authentication server...</h3>\n } @else {\n <div class=\"risk-login-form-flex-wrapper\">\n <div></div>\n <mat-icon class=\"risk-login-form-error\" color=\"warn\">error_outline</mat-icon>\n <div></div>\n </div>\n <h3>Failed to authenticate user: {{ errorMessage }}</h3>\n <div class=\"risk-login-form-flex-wrapper\">\n <div></div>\n <button (click)=\"login()\"\n color=\"primary\"\n mat-button\n type=\"button\">\n <mat-icon>autorenew</mat-icon>\n Retry\n </button>\n <div></div>\n </div>\n }\n </div>\n }\n\n <risk-flex-spacer/>\n</risk-flex>\n", styles: [":host{display:block;padding:0;margin:0}:host>*{vertical-align:bottom}\n", ".risk-flex>div{width:400px;max-width:97vw;max-height:70vh;margin-top:40px}.mat-mdc-card-actions img{margin:3px 0;height:30px}.risk-login-form-flex-wrapper{display:flex}.risk-login-form-flex-wrapper>div{flex:1}.risk-login-form-error{font-size:100px;height:100px;width:100px}h3{text-align:center}input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px white inset}\n"], dependencies: [{ kind: "component", type: FlexComponent, selector: "risk-flex", inputs: ["wrapContent"] }, { kind: "component", type: FlexSpacerComponent, selector: "risk-flex-spacer" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: MatCardContent, selector: "mat-card-content" }, { kind: "component", type: MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: MessageComponent, selector: "risk-error, risk-good, risk-info, risk-message, risk-warn, risk-initial-load, risk-no-data, risk-update-failed", inputs: ["message"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
73
69
  }
74
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoginComponent, decorators: [{
70
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: LoginComponent, decorators: [{
75
71
  type: Component,
76
72
  args: [{ host: {
77
73
  '[class.risk-login-form]': 'true'
78
- }, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, template: "<risk-flex>\n <risk-flex-spacer></risk-flex-spacer>\n\n <div *ngIf=\"isDirectFlow\">\n <ng-template #loggedOut>\n <risk-error *ngIf=\"errorMessage\" [message]=\"errorMessage\"></risk-error>\n\n <form (ngSubmit)=\"login()\" role=\"form\">\n <mat-card>\n <mat-card-header>\n <mat-card-title>Please Sign In</mat-card-title>\n </mat-card-header>\n <mat-card-content>\n <mat-form-field class=\"risk-full-width\">\n <input matInput\n type=\"text\"\n placeholder=\"Username\"\n name=\"username\"\n [(ngModel)]=\"username\"\n autofocus>\n </mat-form-field>\n <mat-form-field class=\"risk-full-width\">\n <input matInput\n type=\"password\"\n placeholder=\"Password\"\n name=\"password\"\n [(ngModel)]=\"password\">\n </mat-form-field>\n </mat-card-content>\n <mat-card-actions>\n <button *ngIf=\"!loggingIn\"\n mat-raised-button\n color=\"primary\"\n type=\"submit\">\n Sign in\n </button>\n <mat-spinner *ngIf=\"loggingIn\" [diameter]=\"36\"></mat-spinner>\n <risk-flex-spacer></risk-flex-spacer>\n <img [src]=\"logo\" alt=\"Company logo\">\n </mat-card-actions>\n </mat-card>\n </form>\n </ng-template>\n\n <ng-template [ngIf]=\"authStatus | async\" [ngIfElse]=\"loggedOut\">\n <ng-template [ngIf]=\"userProfile | async\" let-user=\"ngIf\">\n <risk-good *ngIf=\"user?.name\"\n [message]=\"'Successfully logged in as ' + user.name + '.'\"></risk-good>\n <risk-good *ngIf=\"!user && !user.name\"\n [message]=\"'Successfully logged in!'\"></risk-good>\n </ng-template>\n </ng-template>\n </div>\n\n <div *ngIf=\"!isDirectFlow\">\n <ng-template [ngIf]=\"!errorMessage\">\n <div class=\"risk-login-form-flex-wrapper\">\n <div></div>\n <mat-spinner></mat-spinner>\n <div></div>\n </div>\n <h3>Contacting authentication server...</h3>\n </ng-template>\n <ng-template [ngIf]=\"errorMessage\">\n <div class=\"risk-login-form-flex-wrapper\">\n <div></div>\n <mat-icon class=\"risk-login-form-error\" color=\"warn\">error_outline</mat-icon>\n <div></div>\n </div>\n <h3>Failed to authenticate user: {{errorMessage}}</h3>\n <div class=\"risk-login-form-flex-wrapper\">\n <div></div>\n <button mat-button\n (click)=\"login()\"\n color=\"primary\"\n type=\"button\">\n <mat-icon>autorenew</mat-icon>\n Retry\n </button>\n <div></div>\n </div>\n </ng-template>\n </div>\n\n <risk-flex-spacer></risk-flex-spacer>\n</risk-flex>\n", styles: [":host{display:block;padding:0;margin:0}:host>*{vertical-align:bottom}\n", ".risk-flex>div{width:400px;max-width:97vw;max-height:70vh;margin-top:40px}.mat-mdc-card-actions img{margin:3px 0;height:30px}.risk-login-form-flex-wrapper{display:flex}.risk-login-form-flex-wrapper>div{flex:1}.risk-login-form-error{font-size:100px;height:100px;width:100px}h3{text-align:center}input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px white inset}\n"] }]
79
- }], ctorParameters: () => [{ type: undefined, decorators: [{
80
- type: Inject,
81
- args: [AUTH_PROVIDER]
82
- }] }, { type: i0.ChangeDetectorRef }, { type: i1.AuthRoutingFlowService }, { type: undefined, decorators: [{
83
- type: Inject,
84
- args: [SECONDARY_LOGO]
85
- }] }] });
74
+ }, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, imports: [
75
+ AsyncPipe,
76
+ FlexComponent,
77
+ FlexSpacerComponent,
78
+ FormsModule,
79
+ MatButton,
80
+ MatCard,
81
+ MatCardActions,
82
+ MatCardContent,
83
+ MatCardHeader,
84
+ MatCardTitle,
85
+ MatFormField,
86
+ MatIcon,
87
+ MatInput,
88
+ MatProgressSpinner,
89
+ MessageComponent
90
+ ], template: "<risk-flex>\n <risk-flex-spacer/>\n\n @if (isDirectFlow) {\n <div>\n @if (authStatus | async) {\n @if (userProfile | async; as user) {\n @if (user?.name) {\n <risk-good [message]=\"'Successfully logged in as ' + user.name + '.'\"/>\n } @else {\n <risk-good [message]=\"'Successfully logged in!'\"/>\n }\n }\n } @else {\n @if (errorMessage) {\n <risk-error [message]=\"errorMessage\"/>\n }\n <form (ngSubmit)=\"login()\" role=\"form\">\n <mat-card>\n <mat-card-header>\n <mat-card-title>Please Sign In</mat-card-title>\n </mat-card-header>\n <mat-card-content>\n <mat-form-field class=\"risk-full-width\">\n <input [(ngModel)]=\"username\"\n autofocus\n matInput\n name=\"username\"\n placeholder=\"Username\"\n type=\"text\">\n </mat-form-field>\n <mat-form-field class=\"risk-full-width\">\n <input [(ngModel)]=\"password\"\n matInput\n name=\"password\"\n placeholder=\"Password\"\n type=\"password\">\n </mat-form-field>\n </mat-card-content>\n <mat-card-actions>\n @if (!loggingIn) {\n <button\n color=\"primary\"\n mat-raised-button\n type=\"submit\">\n Sign in\n </button>\n }\n @if (loggingIn) {\n <mat-spinner [diameter]=\"36\"/>\n }\n <risk-flex-spacer/>\n <img [src]=\"logo\" alt=\"Company logo\">\n </mat-card-actions>\n </mat-card>\n </form>\n }\n </div>\n } @else {\n <div>\n @if (!errorMessage) {\n <div class=\"risk-login-form-flex-wrapper\">\n <div></div>\n <mat-spinner/>\n <div></div>\n </div>\n <h3>Contacting authentication server...</h3>\n } @else {\n <div class=\"risk-login-form-flex-wrapper\">\n <div></div>\n <mat-icon class=\"risk-login-form-error\" color=\"warn\">error_outline</mat-icon>\n <div></div>\n </div>\n <h3>Failed to authenticate user: {{ errorMessage }}</h3>\n <div class=\"risk-login-form-flex-wrapper\">\n <div></div>\n <button (click)=\"login()\"\n color=\"primary\"\n mat-button\n type=\"button\">\n <mat-icon>autorenew</mat-icon>\n Retry\n </button>\n <div></div>\n </div>\n }\n </div>\n }\n\n <risk-flex-spacer/>\n</risk-flex>\n", styles: [":host{display:block;padding:0;margin:0}:host>*{vertical-align:bottom}\n", ".risk-flex>div{width:400px;max-width:97vw;max-height:70vh;margin-top:40px}.mat-mdc-card-actions img{margin:3px 0;height:30px}.risk-login-form-flex-wrapper{display:flex}.risk-login-form-flex-wrapper>div{flex:1}.risk-login-form-error{font-size:100px;height:100px;width:100px}h3{text-align:center}input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px white inset}\n"] }]
91
+ }], ctorParameters: () => [] });
86
92
 
87
93
  class LoginMenuComponentTitleDirective {
88
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoginMenuComponentTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
89
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: LoginMenuComponentTitleDirective, selector: "risk-login-menu-title-horizontal, risk-login-menu-title-vertical", host: { properties: { "class.risk-login-menu-title": "true" } }, ngImport: i0 }); }
94
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: LoginMenuComponentTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
95
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.12", type: LoginMenuComponentTitleDirective, isStandalone: true, selector: "risk-login-menu-title-horizontal, risk-login-menu-title-vertical", host: { properties: { "class.risk-login-menu-title": "true" } }, ngImport: i0 }); }
90
96
  }
91
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoginMenuComponentTitleDirective, decorators: [{
97
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: LoginMenuComponentTitleDirective, decorators: [{
92
98
  type: Directive,
93
99
  args: [{
94
100
  selector: 'risk-login-menu-title-horizontal, '
@@ -99,10 +105,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
99
105
  }]
100
106
  }] });
101
107
  class LoginMenuItemsDirective {
102
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoginMenuItemsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
103
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: LoginMenuItemsDirective, selector: "risk-login-menu-before-items-horizontal, risk-login-menu-before-items-vertical,risk-login-menu-after-items-horizontal,risk-login-menu-after-items-vertical", ngImport: i0 }); }
108
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: LoginMenuItemsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
109
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.12", type: LoginMenuItemsDirective, isStandalone: true, selector: "risk-login-menu-before-items-horizontal, risk-login-menu-before-items-vertical,risk-login-menu-after-items-horizontal,risk-login-menu-after-items-vertical", ngImport: i0 }); }
104
110
  }
105
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoginMenuItemsDirective, decorators: [{
111
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: LoginMenuItemsDirective, decorators: [{
106
112
  type: Directive,
107
113
  args: [{
108
114
  selector: 'risk-login-menu-before-items-horizontal,'
@@ -112,42 +118,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
112
118
  }]
113
119
  }] });
114
120
  class LoginMenuComponent extends BaseComponent {
121
+ constructor() {
122
+ super();
123
+ this.authProvider = inject(AUTH_PROVIDER);
124
+ this.authRoutingFlowService = inject(AuthRoutingFlowService);
125
+ this.changeDetectorRef = inject(ChangeDetectorRef);
126
+ this.orientation = 'row';
127
+ // Update menu state on login status change
128
+ this.authProvider.loggedInStream.pipe(takeUntil(this.destroyed)).subscribe(() => this.changeDetectorRef.markForCheck());
129
+ }
115
130
  get isRow() {
116
131
  return this.orientation === 'row';
117
132
  }
118
133
  get isColumn() {
119
134
  return this.orientation === 'column';
120
135
  }
121
- constructor(authProvider, authRoutingFlowService, changeDetectorRef) {
122
- super();
123
- this.authProvider = authProvider;
124
- this.authRoutingFlowService = authRoutingFlowService;
125
- this.changeDetectorRef = changeDetectorRef;
126
- this.orientation = 'row';
127
- // Update menu state on login status change
128
- this.authProvider.loggedInStream.pipe(takeUntil(this.destroyed)).subscribe(() => this.changeDetectorRef.markForCheck());
136
+ get authStatus() {
137
+ return this.authProvider.loggedIn;
129
138
  }
130
139
  menuClosed() {
131
140
  this.changeDetectorRef.markForCheck();
132
141
  }
133
- get authStatus() {
134
- return this.authProvider.loggedIn;
135
- }
136
142
  logout() {
137
143
  this.authRoutingFlowService.logout().pipe(first()).subscribe();
138
144
  }
139
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoginMenuComponent, deps: [{ token: AUTH_PROVIDER }, { token: i1.AuthRoutingFlowService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
140
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: LoginMenuComponent, selector: "risk-login-menu", inputs: { orientation: "orientation" }, host: { properties: { "class.risk-login-menu": "true", "class.risk-login-menu-flex-row": "this.isRow", "class.risk-login-menu-flex-column": "this.isColumn" } }, usesInheritance: true, ngImport: i0, template: "<ng-template [ngIf]=\"orientation === 'row'\">\n <mat-menu #loginMenu=\"matMenu\"\n [overlapTrigger]=\"false\">\n <ng-content select=\"risk-login-menu-before-items-horizontal\"></ng-content>\n <ng-template [ngIf]=\"authStatus | async\" [ngIfElse]=\"loggedOut\">\n <button mat-menu-item\n (click)=\"logout()\"\n type=\"button\">\n <mat-icon>exit_to_app</mat-icon>\n Logout\n </button>\n </ng-template>\n <ng-template #loggedOut>\n <button mat-menu-item\n (click)=\"logout()\"\n type=\"button\">\n <mat-icon>launch</mat-icon>\n Login\n </button>\n </ng-template>\n <ng-content select=\"risk-login-menu-after-items-horizontal\"></ng-content>\n </mat-menu>\n <button mat-button\n #menu=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"loginMenu\"\n [class.risk-menu-open]=\"menu.menuOpen\"\n (onMenuClose)=\"menuClosed()\"\n type=\"button\">\n <ng-content select=\"risk-login-menu-title-horizontal\"></ng-content>\n <mat-icon>person</mat-icon>\n </button>\n</ng-template>\n\n<ng-template [ngIf]=\"orientation === 'column'\">\n <ng-content select=\"risk-login-menu-title-vertical\"></ng-content>\n <ng-content select=\"risk-login-menu-before-items-vertical\"></ng-content>\n <ng-template [ngIf]=\"authStatus | async\" [ngIfElse]=\"loggedOut2\">\n <a mat-button\n (click)=\"logout()\">\n <mat-icon>exit_to_app</mat-icon>\n Logout\n </a>\n </ng-template>\n <ng-template #loggedOut2>\n <a mat-button\n (click)=\"logout()\">\n <mat-icon>launch</mat-icon>\n Login\n </a>\n </ng-template>\n <ng-content select=\"risk-login-menu-after-items-vertical\"></ng-content>\n</ng-template>\n", styles: [":host{display:block;padding:0;margin:0}:host>*{vertical-align:bottom}\n", ":host{display:flex!important}:host.risk-login-menu-flex-row{flex-direction:row}:host.risk-login-menu-flex-column{flex-direction:column}:host .risk-login-menu-title{font-weight:700;margin:0 5px}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i3$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i5.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i5.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i5.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
145
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: LoginMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
146
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: LoginMenuComponent, isStandalone: true, selector: "risk-login-menu", inputs: { orientation: "orientation" }, host: { properties: { "class.risk-login-menu": "true", "class.risk-login-menu-flex-row": "this.isRow", "class.risk-login-menu-flex-column": "this.isColumn" } }, usesInheritance: true, ngImport: i0, template: "@if (orientation === 'row') {\n <mat-menu #loginMenu=\"matMenu\"\n [overlapTrigger]=\"false\">\n <ng-content select=\"risk-login-menu-before-items-horizontal\"/>\n @if (authStatus | async) {\n <button (click)=\"logout()\"\n mat-menu-item\n type=\"button\">\n <mat-icon>exit_to_app</mat-icon>\n Logout\n </button>\n } @else {\n <button (click)=\"logout()\"\n mat-menu-item\n type=\"button\">\n <mat-icon>launch</mat-icon>\n Login\n </button>\n }\n <ng-content select=\"risk-login-menu-after-items-horizontal\"/>\n </mat-menu>\n <button #menu=\"matMenuTrigger\"\n (onMenuClose)=\"menuClosed()\"\n [class.risk-menu-open]=\"menu.menuOpen\"\n [matMenuTriggerFor]=\"loginMenu\"\n mat-button\n type=\"button\">\n <ng-content select=\"risk-login-menu-title-horizontal\"/>\n <mat-icon>person</mat-icon>\n </button>\n}\n@if (orientation === 'column') {\n <ng-content select=\"risk-login-menu-title-vertical\"/>\n <ng-content select=\"risk-login-menu-before-items-vertical\"/>\n @if (authStatus | async) {\n <a (click)=\"logout()\"\n mat-button>\n <mat-icon>exit_to_app</mat-icon>\n Logout\n </a>\n } @else {\n <a (click)=\"logout()\"\n mat-button>\n <mat-icon>launch</mat-icon>\n Login\n </a>\n }\n <ng-content select=\"risk-login-menu-after-items-vertical\"/>\n}\n", styles: [":host{display:block;padding:0;margin:0}:host>*{vertical-align:bottom}\n", ":host{display:flex!important}:host.risk-login-menu-flex-row{flex-direction:row}:host.risk-login-menu-flex-column{flex-direction:column}:host .risk-login-menu-title{font-weight:700;margin:0 5px}\n"], dependencies: [{ kind: "component", type: MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
141
147
  }
142
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoginMenuComponent, decorators: [{
148
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: LoginMenuComponent, decorators: [{
143
149
  type: Component,
144
150
  args: [{ selector: 'risk-login-menu', host: {
145
151
  '[class.risk-login-menu]': 'true'
146
- }, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, template: "<ng-template [ngIf]=\"orientation === 'row'\">\n <mat-menu #loginMenu=\"matMenu\"\n [overlapTrigger]=\"false\">\n <ng-content select=\"risk-login-menu-before-items-horizontal\"></ng-content>\n <ng-template [ngIf]=\"authStatus | async\" [ngIfElse]=\"loggedOut\">\n <button mat-menu-item\n (click)=\"logout()\"\n type=\"button\">\n <mat-icon>exit_to_app</mat-icon>\n Logout\n </button>\n </ng-template>\n <ng-template #loggedOut>\n <button mat-menu-item\n (click)=\"logout()\"\n type=\"button\">\n <mat-icon>launch</mat-icon>\n Login\n </button>\n </ng-template>\n <ng-content select=\"risk-login-menu-after-items-horizontal\"></ng-content>\n </mat-menu>\n <button mat-button\n #menu=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"loginMenu\"\n [class.risk-menu-open]=\"menu.menuOpen\"\n (onMenuClose)=\"menuClosed()\"\n type=\"button\">\n <ng-content select=\"risk-login-menu-title-horizontal\"></ng-content>\n <mat-icon>person</mat-icon>\n </button>\n</ng-template>\n\n<ng-template [ngIf]=\"orientation === 'column'\">\n <ng-content select=\"risk-login-menu-title-vertical\"></ng-content>\n <ng-content select=\"risk-login-menu-before-items-vertical\"></ng-content>\n <ng-template [ngIf]=\"authStatus | async\" [ngIfElse]=\"loggedOut2\">\n <a mat-button\n (click)=\"logout()\">\n <mat-icon>exit_to_app</mat-icon>\n Logout\n </a>\n </ng-template>\n <ng-template #loggedOut2>\n <a mat-button\n (click)=\"logout()\">\n <mat-icon>launch</mat-icon>\n Login\n </a>\n </ng-template>\n <ng-content select=\"risk-login-menu-after-items-vertical\"></ng-content>\n</ng-template>\n", styles: [":host{display:block;padding:0;margin:0}:host>*{vertical-align:bottom}\n", ":host{display:flex!important}:host.risk-login-menu-flex-row{flex-direction:row}:host.risk-login-menu-flex-column{flex-direction:column}:host .risk-login-menu-title{font-weight:700;margin:0 5px}\n"] }]
147
- }], ctorParameters: () => [{ type: undefined, decorators: [{
148
- type: Inject,
149
- args: [AUTH_PROVIDER]
150
- }] }, { type: i1.AuthRoutingFlowService }, { type: i0.ChangeDetectorRef }], propDecorators: { orientation: [{
152
+ }, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, imports: [MatMenu, MatMenuItem, MatIcon, MatButton, MatMenuTrigger, AsyncPipe], template: "@if (orientation === 'row') {\n <mat-menu #loginMenu=\"matMenu\"\n [overlapTrigger]=\"false\">\n <ng-content select=\"risk-login-menu-before-items-horizontal\"/>\n @if (authStatus | async) {\n <button (click)=\"logout()\"\n mat-menu-item\n type=\"button\">\n <mat-icon>exit_to_app</mat-icon>\n Logout\n </button>\n } @else {\n <button (click)=\"logout()\"\n mat-menu-item\n type=\"button\">\n <mat-icon>launch</mat-icon>\n Login\n </button>\n }\n <ng-content select=\"risk-login-menu-after-items-horizontal\"/>\n </mat-menu>\n <button #menu=\"matMenuTrigger\"\n (onMenuClose)=\"menuClosed()\"\n [class.risk-menu-open]=\"menu.menuOpen\"\n [matMenuTriggerFor]=\"loginMenu\"\n mat-button\n type=\"button\">\n <ng-content select=\"risk-login-menu-title-horizontal\"/>\n <mat-icon>person</mat-icon>\n </button>\n}\n@if (orientation === 'column') {\n <ng-content select=\"risk-login-menu-title-vertical\"/>\n <ng-content select=\"risk-login-menu-before-items-vertical\"/>\n @if (authStatus | async) {\n <a (click)=\"logout()\"\n mat-button>\n <mat-icon>exit_to_app</mat-icon>\n Logout\n </a>\n } @else {\n <a (click)=\"logout()\"\n mat-button>\n <mat-icon>launch</mat-icon>\n Login\n </a>\n }\n <ng-content select=\"risk-login-menu-after-items-vertical\"/>\n}\n", styles: [":host{display:block;padding:0;margin:0}:host>*{vertical-align:bottom}\n", ":host{display:flex!important}:host.risk-login-menu-flex-row{flex-direction:row}:host.risk-login-menu-flex-column{flex-direction:column}:host .risk-login-menu-title{font-weight:700;margin:0 5px}\n"] }]
153
+ }], ctorParameters: () => [], propDecorators: { orientation: [{
151
154
  type: Input
152
155
  }], isRow: [{
153
156
  type: HostBinding,
@@ -157,51 +160,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
157
160
  args: ['class.risk-login-menu-flex-column']
158
161
  }] } });
159
162
 
160
- class LoginModule {
161
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoginModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
162
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: LoginModule, declarations: [LoginMenuComponent,
163
- LoginComponent,
164
- LoginMenuComponentTitleDirective,
165
- LoginMenuItemsDirective], imports: [CommonModule,
166
- FormsModule,
167
- RouterModule,
168
- AuthModule,
169
- CommonViewModule], exports: [LoginMenuComponent,
170
- LoginMenuComponentTitleDirective,
171
- LoginMenuItemsDirective] }); }
172
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoginModule, imports: [CommonModule,
173
- FormsModule,
174
- RouterModule,
175
- AuthModule,
176
- CommonViewModule] }); }
177
- }
178
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoginModule, decorators: [{
179
- type: NgModule,
180
- args: [{
181
- imports: [
182
- CommonModule,
183
- FormsModule,
184
- RouterModule,
185
- AuthModule,
186
- CommonViewModule
187
- ],
188
- declarations: [
189
- LoginMenuComponent,
190
- LoginComponent,
191
- LoginMenuComponentTitleDirective,
192
- LoginMenuItemsDirective
193
- ],
194
- exports: [
195
- LoginMenuComponent,
196
- LoginMenuComponentTitleDirective,
197
- LoginMenuItemsDirective
198
- ]
199
- }]
200
- }] });
201
-
202
163
  /**
203
164
  * Generated bundle index. Do not edit.
204
165
  */
205
166
 
206
- export { LoginComponent, LoginMenuComponent, LoginMenuComponentTitleDirective, LoginMenuItemsDirective, LoginModule };
167
+ export { LoginComponent, LoginMenuComponent, LoginMenuComponentTitleDirective, LoginMenuItemsDirective };
207
168
  //# sourceMappingURL=dbg-riskit-angular-login.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"dbg-riskit-angular-login.mjs","sources":["../../../../pkg/dbg-riskit/angular-login/src/lib/login.component.ts","../../../../pkg/dbg-riskit/angular-login/src/lib/login.component.html","../../../../pkg/dbg-riskit/angular-login/src/lib/login.menu.component.ts","../../../../pkg/dbg-riskit/angular-login/src/lib/login.menu.component.html","../../../../pkg/dbg-riskit/angular-login/src/lib/login.module.ts","../../../../pkg/dbg-riskit/angular-login/src/dbg-riskit-angular-login.ts"],"sourcesContent":["import {AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject} from '@angular/core';\n\nimport {AuthRoutingFlowService} from '@dbg-riskit/angular-auth';\nimport {AUTH_PROVIDER, SECONDARY_LOGO} from '@dbg-riskit/angular-common';\nimport {ErrorTypes, toErrorMessage} from '@dbg-riskit/angular-error';\nimport {BaseComponent} from '@dbg-riskit/angular-view';\nimport {AuthProvider, UserInfo} from '@dbg-riskit/common';\n\nimport {Observable} from 'rxjs';\nimport {first, takeUntil} from 'rxjs/operators';\n\n@Component({\n templateUrl : 'login.component.html',\n styleUrls : [\n '../../../component.scss',\n 'login.component.scss'\n ],\n host : {\n '[class.risk-login-form]': 'true'\n },\n changeDetection : ChangeDetectionStrategy.OnPush,\n preserveWhitespaces: false\n})\nexport class LoginComponent extends BaseComponent implements AfterViewInit {\n\n /**\n * Error message to be displayed.\n */\n public errorMessage?: string;\n\n /**\n * User name binding.\n */\n public username?: string;\n\n /**\n * Password binding.\n */\n public password?: string;\n\n /**\n * Control for \"login button-to-spinner\".\n */\n public loggingIn = false;\n\n public constructor(@Inject(AUTH_PROVIDER) private readonly authProvider: AuthProvider,\n private readonly changeDetectorRef: ChangeDetectorRef,\n private readonly authRoutingFlowService: AuthRoutingFlowService,\n @Inject(SECONDARY_LOGO) private readonly secondaryLogo: string) {\n super();\n // Update component state on login status change\n this.authProvider.loggedInStream.pipe(\n takeUntil(this.destroyed)\n ).subscribe(() => this.changeDetectorRef.markForCheck());\n }\n\n public ngAfterViewInit(): void {\n this.authRoutingFlowService.loginViaService().pipe(\n takeUntil(this.destroyed)\n ).subscribe(\n () => {\n this.changeDetectorRef.markForCheck();\n },\n (err: ErrorTypes) => {\n this.errorMessage = toErrorMessage(err).message;\n this.changeDetectorRef.markForCheck();\n }\n );\n }\n\n public get isDirectFlow(): boolean {\n return this.authRoutingFlowService.directFlow;\n }\n\n public get authStatus(): Observable<boolean> {\n return this.authProvider.loggedIn;\n }\n\n public get userProfile(): Observable<UserInfo | undefined> {\n return this.authProvider.userProfile;\n }\n\n public login(): void {\n this.loggingIn = true;\n this.authRoutingFlowService.login(this.username, this.password).pipe(\n first()\n ).subscribe(\n (res: boolean) => {\n if (!res) {\n this.errorMessage = 'Authentication failed. Server did not generate a token.';\n }\n this.loggingIn = false;\n this.changeDetectorRef.markForCheck();\n },\n () => {\n this.loggingIn = false;\n this.errorMessage = 'Authentication failed. Is the username and password correct?';\n this.changeDetectorRef.markForCheck();\n }\n );\n }\n\n public get logo(): string {\n return this.secondaryLogo;\n }\n}\n","<risk-flex>\n <risk-flex-spacer></risk-flex-spacer>\n\n <div *ngIf=\"isDirectFlow\">\n <ng-template #loggedOut>\n <risk-error *ngIf=\"errorMessage\" [message]=\"errorMessage\"></risk-error>\n\n <form (ngSubmit)=\"login()\" role=\"form\">\n <mat-card>\n <mat-card-header>\n <mat-card-title>Please Sign In</mat-card-title>\n </mat-card-header>\n <mat-card-content>\n <mat-form-field class=\"risk-full-width\">\n <input matInput\n type=\"text\"\n placeholder=\"Username\"\n name=\"username\"\n [(ngModel)]=\"username\"\n autofocus>\n </mat-form-field>\n <mat-form-field class=\"risk-full-width\">\n <input matInput\n type=\"password\"\n placeholder=\"Password\"\n name=\"password\"\n [(ngModel)]=\"password\">\n </mat-form-field>\n </mat-card-content>\n <mat-card-actions>\n <button *ngIf=\"!loggingIn\"\n mat-raised-button\n color=\"primary\"\n type=\"submit\">\n Sign in\n </button>\n <mat-spinner *ngIf=\"loggingIn\" [diameter]=\"36\"></mat-spinner>\n <risk-flex-spacer></risk-flex-spacer>\n <img [src]=\"logo\" alt=\"Company logo\">\n </mat-card-actions>\n </mat-card>\n </form>\n </ng-template>\n\n <ng-template [ngIf]=\"authStatus | async\" [ngIfElse]=\"loggedOut\">\n <ng-template [ngIf]=\"userProfile | async\" let-user=\"ngIf\">\n <risk-good *ngIf=\"user?.name\"\n [message]=\"'Successfully logged in as ' + user.name + '.'\"></risk-good>\n <risk-good *ngIf=\"!user && !user.name\"\n [message]=\"'Successfully logged in!'\"></risk-good>\n </ng-template>\n </ng-template>\n </div>\n\n <div *ngIf=\"!isDirectFlow\">\n <ng-template [ngIf]=\"!errorMessage\">\n <div class=\"risk-login-form-flex-wrapper\">\n <div></div>\n <mat-spinner></mat-spinner>\n <div></div>\n </div>\n <h3>Contacting authentication server...</h3>\n </ng-template>\n <ng-template [ngIf]=\"errorMessage\">\n <div class=\"risk-login-form-flex-wrapper\">\n <div></div>\n <mat-icon class=\"risk-login-form-error\" color=\"warn\">error_outline</mat-icon>\n <div></div>\n </div>\n <h3>Failed to authenticate user: {{errorMessage}}</h3>\n <div class=\"risk-login-form-flex-wrapper\">\n <div></div>\n <button mat-button\n (click)=\"login()\"\n color=\"primary\"\n type=\"button\">\n <mat-icon>autorenew</mat-icon>\n Retry\n </button>\n <div></div>\n </div>\n </ng-template>\n </div>\n\n <risk-flex-spacer></risk-flex-spacer>\n</risk-flex>\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Directive,\n HostBinding,\n Inject,\n Input\n} from '@angular/core';\n\nimport {AuthRoutingFlowService} from '@dbg-riskit/angular-auth';\nimport {AUTH_PROVIDER} from '@dbg-riskit/angular-common';\nimport {BaseComponent} from '@dbg-riskit/angular-view';\nimport {AuthProvider} from '@dbg-riskit/common';\n\nimport {Observable} from 'rxjs';\nimport {first, takeUntil} from 'rxjs/operators';\n\n@Directive({\n selector: 'risk-login-menu-title-horizontal, '\n + 'risk-login-menu-title-vertical',\n host : {\n '[class.risk-login-menu-title]': 'true'\n }\n})\nexport class LoginMenuComponentTitleDirective {\n}\n\n@Directive({\n selector: 'risk-login-menu-before-items-horizontal,'\n + ' risk-login-menu-before-items-vertical,'\n + 'risk-login-menu-after-items-horizontal,'\n + 'risk-login-menu-after-items-vertical'\n})\nexport class LoginMenuItemsDirective {\n}\n\n@Component({\n selector : 'risk-login-menu',\n templateUrl : 'login.menu.component.html',\n styleUrls : [\n '../../../component.scss',\n 'login.menu.component.scss'\n ],\n host : {\n '[class.risk-login-menu]': 'true'\n },\n changeDetection : ChangeDetectionStrategy.OnPush,\n preserveWhitespaces: false\n})\nexport class LoginMenuComponent extends BaseComponent {\n\n @Input()\n public orientation: 'row' | 'column' = 'row';\n\n @HostBinding('class.risk-login-menu-flex-row')\n public get isRow(): boolean {\n return this.orientation === 'row';\n }\n\n @HostBinding('class.risk-login-menu-flex-column')\n public get isColumn(): boolean {\n return this.orientation === 'column';\n }\n\n public constructor(@Inject(AUTH_PROVIDER) private readonly authProvider: AuthProvider,\n private readonly authRoutingFlowService: AuthRoutingFlowService,\n private readonly changeDetectorRef: ChangeDetectorRef) {\n super();\n\n // Update menu state on login status change\n this.authProvider.loggedInStream.pipe(\n takeUntil(this.destroyed)\n ).subscribe(() => this.changeDetectorRef.markForCheck());\n }\n\n public menuClosed(): void {\n this.changeDetectorRef.markForCheck();\n }\n\n public get authStatus(): Observable<boolean> {\n return this.authProvider.loggedIn;\n }\n\n public logout(): void {\n this.authRoutingFlowService.logout().pipe(\n first()\n ).subscribe();\n }\n}\n","<ng-template [ngIf]=\"orientation === 'row'\">\n <mat-menu #loginMenu=\"matMenu\"\n [overlapTrigger]=\"false\">\n <ng-content select=\"risk-login-menu-before-items-horizontal\"></ng-content>\n <ng-template [ngIf]=\"authStatus | async\" [ngIfElse]=\"loggedOut\">\n <button mat-menu-item\n (click)=\"logout()\"\n type=\"button\">\n <mat-icon>exit_to_app</mat-icon>\n Logout\n </button>\n </ng-template>\n <ng-template #loggedOut>\n <button mat-menu-item\n (click)=\"logout()\"\n type=\"button\">\n <mat-icon>launch</mat-icon>\n Login\n </button>\n </ng-template>\n <ng-content select=\"risk-login-menu-after-items-horizontal\"></ng-content>\n </mat-menu>\n <button mat-button\n #menu=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"loginMenu\"\n [class.risk-menu-open]=\"menu.menuOpen\"\n (onMenuClose)=\"menuClosed()\"\n type=\"button\">\n <ng-content select=\"risk-login-menu-title-horizontal\"></ng-content>\n <mat-icon>person</mat-icon>\n </button>\n</ng-template>\n\n<ng-template [ngIf]=\"orientation === 'column'\">\n <ng-content select=\"risk-login-menu-title-vertical\"></ng-content>\n <ng-content select=\"risk-login-menu-before-items-vertical\"></ng-content>\n <ng-template [ngIf]=\"authStatus | async\" [ngIfElse]=\"loggedOut2\">\n <a mat-button\n (click)=\"logout()\">\n <mat-icon>exit_to_app</mat-icon>\n Logout\n </a>\n </ng-template>\n <ng-template #loggedOut2>\n <a mat-button\n (click)=\"logout()\">\n <mat-icon>launch</mat-icon>\n Login\n </a>\n </ng-template>\n <ng-content select=\"risk-login-menu-after-items-vertical\"></ng-content>\n</ng-template>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {RouterModule} from '@angular/router';\nimport {AuthModule} from '@dbg-riskit/angular-auth';\nimport {CommonViewModule} from '@dbg-riskit/angular-view';\nimport {LoginComponent} from './login.component';\nimport {LoginMenuComponent, LoginMenuComponentTitleDirective, LoginMenuItemsDirective} from './login.menu.component';\n\n@NgModule({\n imports : [\n CommonModule,\n FormsModule,\n RouterModule,\n AuthModule,\n CommonViewModule\n ],\n declarations: [\n LoginMenuComponent,\n LoginComponent,\n LoginMenuComponentTitleDirective,\n LoginMenuItemsDirective\n ],\n exports : [\n LoginMenuComponent,\n LoginMenuComponentTitleDirective,\n LoginMenuItemsDirective\n ]\n})\nexport class LoginModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i5","i3","i4"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuBM,MAAO,cAAe,SAAQ,aAAa,CAAA;AAsB7C,IAAA,WAAA,CAA2D,YAA0B,EACjD,iBAAoC,EACpC,sBAA8C,EACtB,aAAqB,EAAA;AAC7E,QAAA,KAAK,EAAE,CAAC;QAJ+C,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAc;QACjD,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAmB;QACpC,IAAsB,CAAA,sBAAA,GAAtB,sBAAsB,CAAwB;QACtB,IAAa,CAAA,aAAA,GAAb,aAAa,CAAQ;AARjF;;AAEG;QACI,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;;QAQrB,IAAI,CAAC,YAAY,CAAC,cAAc,CAAC,IAAI,CACjC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAC5B,CAAC,SAAS,CAAC,MAAM,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,CAAC,CAAC;KAC5D;IAEM,eAAe,GAAA;AAClB,QAAA,IAAI,CAAC,sBAAsB,CAAC,eAAe,EAAE,CAAC,IAAI,CAC9C,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAC5B,CAAC,SAAS,CACP,MAAK;AACD,YAAA,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,CAAC;AAC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B;AAC1B,qBAAA;AACJ,iBAAA,CAAA;;;AC5BD;;AAEG;;;;"}
1
+ {"version":3,"file":"dbg-riskit-angular-login.mjs","sources":["../../../../pkg/dbg-riskit/angular-login/src/lib/login.component.ts","../../../../pkg/dbg-riskit/angular-login/src/lib/login.component.html","../../../../pkg/dbg-riskit/angular-login/src/lib/login.menu.component.ts","../../../../pkg/dbg-riskit/angular-login/src/lib/login.menu.component.html","../../../../pkg/dbg-riskit/angular-login/src/dbg-riskit-angular-login.ts"],"sourcesContent":["import {AsyncPipe} from '@angular/common';\nimport {AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, inject} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {MatButton} from '@angular/material/button';\nimport {MatCard, MatCardActions, MatCardContent, MatCardHeader, MatCardTitle} from '@angular/material/card';\nimport {MatFormField} from '@angular/material/form-field';\nimport {MatIcon} from '@angular/material/icon';\nimport {MatInput} from '@angular/material/input';\nimport {MatProgressSpinner} from '@angular/material/progress-spinner';\nimport {AuthRoutingFlowService} from '@dbg-riskit/angular-auth';\nimport {AUTH_PROVIDER, SECONDARY_LOGO} from '@dbg-riskit/angular-common';\nimport {ErrorTypes, toErrorMessage} from '@dbg-riskit/angular-error';\nimport {BaseComponent, FlexComponent, FlexSpacerComponent, MessageComponent} from '@dbg-riskit/angular-view';\nimport {AuthProvider, UserInfo} from '@dbg-riskit/common';\nimport {Observable} from 'rxjs';\nimport {first, takeUntil} from 'rxjs/operators';\n\n@Component({\n templateUrl : 'login.component.html',\n styleUrls : [\n '../../../component.scss',\n 'login.component.scss'\n ],\n host : {\n '[class.risk-login-form]': 'true'\n },\n changeDetection : ChangeDetectionStrategy.OnPush,\n preserveWhitespaces: false,\n imports: [\n AsyncPipe,\n FlexComponent,\n FlexSpacerComponent,\n FormsModule,\n MatButton,\n MatCard,\n MatCardActions,\n MatCardContent,\n MatCardHeader,\n MatCardTitle,\n MatFormField,\n MatIcon,\n MatInput,\n MatProgressSpinner,\n MessageComponent\n ]\n})\nexport class LoginComponent extends BaseComponent implements AfterViewInit {\n private readonly authProvider = inject<AuthProvider>(AUTH_PROVIDER);\n private readonly changeDetectorRef = inject(ChangeDetectorRef);\n private readonly authRoutingFlowService = inject(AuthRoutingFlowService);\n private readonly secondaryLogo = inject(SECONDARY_LOGO);\n\n /**\n * Error message to be displayed.\n */\n public errorMessage?: string;\n\n /**\n * User name binding.\n */\n public username?: string;\n\n /**\n * Password binding.\n */\n public password?: string;\n\n /**\n * Control for \"login button-to-spinner\".\n */\n public loggingIn = false;\n\n public constructor() {\n super();\n // Update component state on login status change\n this.authProvider.loggedInStream.pipe(\n takeUntil(this.destroyed)\n ).subscribe(() => this.changeDetectorRef.markForCheck());\n }\n\n public get isDirectFlow(): boolean {\n return this.authRoutingFlowService.directFlow;\n }\n\n public get authStatus(): Observable<boolean> {\n return this.authProvider.loggedIn;\n }\n\n public get userProfile(): Observable<UserInfo | undefined> {\n return this.authProvider.userProfile;\n }\n\n public get logo(): string {\n return this.secondaryLogo;\n }\n\n public ngAfterViewInit(): void {\n this.authRoutingFlowService.loginViaService().pipe(\n takeUntil(this.destroyed)\n ).subscribe(\n () => {\n this.changeDetectorRef.markForCheck();\n },\n (err: ErrorTypes) => {\n this.errorMessage = toErrorMessage(err).message;\n this.changeDetectorRef.markForCheck();\n }\n );\n }\n\n public login(): void {\n this.loggingIn = true;\n this.authRoutingFlowService.login(this.username, this.password).pipe(\n first()\n ).subscribe(\n (res: boolean) => {\n if (!res) {\n this.errorMessage = 'Authentication failed. Server did not generate a token.';\n }\n this.loggingIn = false;\n this.changeDetectorRef.markForCheck();\n },\n () => {\n this.loggingIn = false;\n this.errorMessage = 'Authentication failed. Is the username and password correct?';\n this.changeDetectorRef.markForCheck();\n }\n );\n }\n}\n","<risk-flex>\n <risk-flex-spacer/>\n\n @if (isDirectFlow) {\n <div>\n @if (authStatus | async) {\n @if (userProfile | async; as user) {\n @if (user?.name) {\n <risk-good [message]=\"'Successfully logged in as ' + user.name + '.'\"/>\n } @else {\n <risk-good [message]=\"'Successfully logged in!'\"/>\n }\n }\n } @else {\n @if (errorMessage) {\n <risk-error [message]=\"errorMessage\"/>\n }\n <form (ngSubmit)=\"login()\" role=\"form\">\n <mat-card>\n <mat-card-header>\n <mat-card-title>Please Sign In</mat-card-title>\n </mat-card-header>\n <mat-card-content>\n <mat-form-field class=\"risk-full-width\">\n <input [(ngModel)]=\"username\"\n autofocus\n matInput\n name=\"username\"\n placeholder=\"Username\"\n type=\"text\">\n </mat-form-field>\n <mat-form-field class=\"risk-full-width\">\n <input [(ngModel)]=\"password\"\n matInput\n name=\"password\"\n placeholder=\"Password\"\n type=\"password\">\n </mat-form-field>\n </mat-card-content>\n <mat-card-actions>\n @if (!loggingIn) {\n <button\n color=\"primary\"\n mat-raised-button\n type=\"submit\">\n Sign in\n </button>\n }\n @if (loggingIn) {\n <mat-spinner [diameter]=\"36\"/>\n }\n <risk-flex-spacer/>\n <img [src]=\"logo\" alt=\"Company logo\">\n </mat-card-actions>\n </mat-card>\n </form>\n }\n </div>\n } @else {\n <div>\n @if (!errorMessage) {\n <div class=\"risk-login-form-flex-wrapper\">\n <div></div>\n <mat-spinner/>\n <div></div>\n </div>\n <h3>Contacting authentication server...</h3>\n } @else {\n <div class=\"risk-login-form-flex-wrapper\">\n <div></div>\n <mat-icon class=\"risk-login-form-error\" color=\"warn\">error_outline</mat-icon>\n <div></div>\n </div>\n <h3>Failed to authenticate user: {{ errorMessage }}</h3>\n <div class=\"risk-login-form-flex-wrapper\">\n <div></div>\n <button (click)=\"login()\"\n color=\"primary\"\n mat-button\n type=\"button\">\n <mat-icon>autorenew</mat-icon>\n Retry\n </button>\n <div></div>\n </div>\n }\n </div>\n }\n\n <risk-flex-spacer/>\n</risk-flex>\n","import {AsyncPipe} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Directive,\n HostBinding,\n inject,\n Input\n} from '@angular/core';\nimport {MatButton} from '@angular/material/button';\nimport {MatIcon} from '@angular/material/icon';\nimport {MatMenu, MatMenuItem, MatMenuTrigger} from '@angular/material/menu';\nimport {AuthRoutingFlowService} from '@dbg-riskit/angular-auth';\nimport {AUTH_PROVIDER} from '@dbg-riskit/angular-common';\nimport {BaseComponent} from '@dbg-riskit/angular-view';\nimport {AuthProvider} from '@dbg-riskit/common';\nimport {Observable} from 'rxjs';\nimport {first, takeUntil} from 'rxjs/operators';\n\n@Directive({\n selector: 'risk-login-menu-title-horizontal, '\n + 'risk-login-menu-title-vertical',\n host : {\n '[class.risk-login-menu-title]': 'true'\n }\n})\nexport class LoginMenuComponentTitleDirective {\n}\n\n@Directive({\n selector: 'risk-login-menu-before-items-horizontal,'\n + ' risk-login-menu-before-items-vertical,'\n + 'risk-login-menu-after-items-horizontal,'\n + 'risk-login-menu-after-items-vertical'\n})\nexport class LoginMenuItemsDirective {\n}\n\n@Component({\n selector : 'risk-login-menu',\n templateUrl : 'login.menu.component.html',\n styleUrls : [\n '../../../component.scss',\n 'login.menu.component.scss'\n ],\n host : {\n '[class.risk-login-menu]': 'true'\n },\n changeDetection : ChangeDetectionStrategy.OnPush,\n preserveWhitespaces: false,\n imports : [MatMenu, MatMenuItem, MatIcon, MatButton, MatMenuTrigger, AsyncPipe]\n})\nexport class LoginMenuComponent extends BaseComponent {\n private readonly authProvider = inject<AuthProvider>(AUTH_PROVIDER);\n private readonly authRoutingFlowService = inject(AuthRoutingFlowService);\n private readonly changeDetectorRef = inject(ChangeDetectorRef);\n\n @Input()\n public orientation: 'row' | 'column' = 'row';\n\n public constructor() {\n super();\n\n // Update menu state on login status change\n this.authProvider.loggedInStream.pipe(\n takeUntil(this.destroyed)\n ).subscribe(() => this.changeDetectorRef.markForCheck());\n }\n\n @HostBinding('class.risk-login-menu-flex-row')\n public get isRow(): boolean {\n return this.orientation === 'row';\n }\n\n @HostBinding('class.risk-login-menu-flex-column')\n public get isColumn(): boolean {\n return this.orientation === 'column';\n }\n\n public get authStatus(): Observable<boolean> {\n return this.authProvider.loggedIn;\n }\n\n public menuClosed(): void {\n this.changeDetectorRef.markForCheck();\n }\n\n public logout(): void {\n this.authRoutingFlowService.logout().pipe(\n first()\n ).subscribe();\n }\n}\n","@if (orientation === 'row') {\n <mat-menu #loginMenu=\"matMenu\"\n [overlapTrigger]=\"false\">\n <ng-content select=\"risk-login-menu-before-items-horizontal\"/>\n @if (authStatus | async) {\n <button (click)=\"logout()\"\n mat-menu-item\n type=\"button\">\n <mat-icon>exit_to_app</mat-icon>\n Logout\n </button>\n } @else {\n <button (click)=\"logout()\"\n mat-menu-item\n type=\"button\">\n <mat-icon>launch</mat-icon>\n Login\n </button>\n }\n <ng-content select=\"risk-login-menu-after-items-horizontal\"/>\n </mat-menu>\n <button #menu=\"matMenuTrigger\"\n (onMenuClose)=\"menuClosed()\"\n [class.risk-menu-open]=\"menu.menuOpen\"\n [matMenuTriggerFor]=\"loginMenu\"\n mat-button\n type=\"button\">\n <ng-content select=\"risk-login-menu-title-horizontal\"/>\n <mat-icon>person</mat-icon>\n </button>\n}\n@if (orientation === 'column') {\n <ng-content select=\"risk-login-menu-title-vertical\"/>\n <ng-content select=\"risk-login-menu-before-items-vertical\"/>\n @if (authStatus | async) {\n <a (click)=\"logout()\"\n mat-button>\n <mat-icon>exit_to_app</mat-icon>\n Logout\n </a>\n } @else {\n <a (click)=\"logout()\"\n mat-button>\n <mat-icon>launch</mat-icon>\n Login\n </a>\n }\n <ng-content select=\"risk-login-menu-after-items-vertical\"/>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AA8CM,MAAO,cAAe,SAAQ,aAAa,CAAA;AA0B7C,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,EAAE;AA1BM,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAe,aAAa,CAAC;AAClD,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC7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A,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,SAAS,EAAA,QAAA,EAAA,iOAAA,EAAA,MAAA,EAAA,CAAA,WAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,EAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,cAAc,gSAAE,SAAS,EAAA,IAAA,EAAA,OAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAEhF,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAd9B,SAAS;AACe,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,IAAA,EAMjB;AACjB,wBAAA,yBAAyB,EAAE;AAC9B,qBAAA,EAAA,eAAA,EACoB,uBAAuB,CAAC,MAAM,uBAC9B,KAAK,EAAA,OAAA,EACL,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,CAAC,EAAA,QAAA,EAAA,4oDAAA,EAAA,MAAA,EAAA,CAAA,yEAAA,EAAA,qMAAA,CAAA,EAAA;;sBAOzF;;sBAYA,WAAW;uBAAC,gCAAgC;;sBAK5C,WAAW;uBAAC,mCAAmC;;;AE3EpD;;AAEG;;;;"}
package/index.d.ts CHANGED
@@ -1,5 +1,62 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@dbg-riskit/angular-login" />
5
- export * from './public_api';
1
+ import * as i0 from '@angular/core';
2
+ import { AfterViewInit } from '@angular/core';
3
+ import { BaseComponent } from '@dbg-riskit/angular-view';
4
+ import { UserInfo } from '@dbg-riskit/common';
5
+ import { Observable } from 'rxjs';
6
+
7
+ declare class LoginComponent extends BaseComponent implements AfterViewInit {
8
+ private readonly authProvider;
9
+ private readonly changeDetectorRef;
10
+ private readonly authRoutingFlowService;
11
+ private readonly secondaryLogo;
12
+ /**
13
+ * Error message to be displayed.
14
+ */
15
+ errorMessage?: string;
16
+ /**
17
+ * User name binding.
18
+ */
19
+ username?: string;
20
+ /**
21
+ * Password binding.
22
+ */
23
+ password?: string;
24
+ /**
25
+ * Control for "login button-to-spinner".
26
+ */
27
+ loggingIn: boolean;
28
+ constructor();
29
+ get isDirectFlow(): boolean;
30
+ get authStatus(): Observable<boolean>;
31
+ get userProfile(): Observable<UserInfo | undefined>;
32
+ get logo(): string;
33
+ ngAfterViewInit(): void;
34
+ login(): void;
35
+ static ɵfac: i0.ɵɵFactoryDeclaration<LoginComponent, never>;
36
+ static ɵcmp: i0.ɵɵComponentDeclaration<LoginComponent, "ng-component", never, {}, {}, never, never, true, never>;
37
+ }
38
+
39
+ declare class LoginMenuComponentTitleDirective {
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<LoginMenuComponentTitleDirective, never>;
41
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LoginMenuComponentTitleDirective, "risk-login-menu-title-horizontal, risk-login-menu-title-vertical", never, {}, {}, never, never, true, never>;
42
+ }
43
+ declare class LoginMenuItemsDirective {
44
+ static ɵfac: i0.ɵɵFactoryDeclaration<LoginMenuItemsDirective, never>;
45
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LoginMenuItemsDirective, "risk-login-menu-before-items-horizontal, risk-login-menu-before-items-vertical,risk-login-menu-after-items-horizontal,risk-login-menu-after-items-vertical", never, {}, {}, never, never, true, never>;
46
+ }
47
+ declare class LoginMenuComponent extends BaseComponent {
48
+ private readonly authProvider;
49
+ private readonly authRoutingFlowService;
50
+ private readonly changeDetectorRef;
51
+ orientation: 'row' | 'column';
52
+ constructor();
53
+ get isRow(): boolean;
54
+ get isColumn(): boolean;
55
+ get authStatus(): Observable<boolean>;
56
+ menuClosed(): void;
57
+ logout(): void;
58
+ static ɵfac: i0.ɵɵFactoryDeclaration<LoginMenuComponent, never>;
59
+ static ɵcmp: i0.ɵɵComponentDeclaration<LoginMenuComponent, "risk-login-menu", never, { "orientation": { "alias": "orientation"; "required": false; }; }, {}, never, ["risk-login-menu-before-items-horizontal", "risk-login-menu-after-items-horizontal", "risk-login-menu-title-horizontal", "risk-login-menu-title-vertical", "risk-login-menu-before-items-vertical", "risk-login-menu-after-items-vertical"], true, never>;
60
+ }
61
+
62
+ export { LoginComponent, LoginMenuComponent, LoginMenuComponentTitleDirective, LoginMenuItemsDirective };
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@dbg-riskit/angular-login",
3
- "version": "18.0.0",
3
+ "version": "20.0.0",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "peerDependencies": {
6
- "@angular/core": "^18.2.13",
7
- "@angular/forms": "^18.2.13",
8
- "@angular/router": "^18.2.13",
9
- "@dbg-riskit/common": "~18.0.0",
10
- "@dbg-riskit/angular-auth": "~18.0.0",
11
- "@dbg-riskit/angular-common": "~18.0.0",
12
- "@dbg-riskit/angular-error": "~18.0.0",
13
- "@dbg-riskit/angular-view": "~18.0.0",
14
- "rxjs": "~7.8.1"
6
+ "@angular/core": "^20.3.12",
7
+ "@angular/forms": "^20.3.12",
8
+ "@angular/router": "^20.3.12",
9
+ "@dbg-riskit/common": "~20.0.0",
10
+ "@dbg-riskit/angular-auth": "~20.0.0",
11
+ "@dbg-riskit/angular-common": "~20.0.0",
12
+ "@dbg-riskit/angular-error": "~20.0.0",
13
+ "@dbg-riskit/angular-view": "~20.0.0",
14
+ "rxjs": "~7.8.2"
15
15
  },
16
16
  "dependencies": {
17
- "tslib": "^2.6.2"
17
+ "tslib": "^2.8.1"
18
18
  },
19
19
  "module": "fesm2022/dbg-riskit-angular-login.mjs",
20
20
  "typings": "index.d.ts",
@@ -24,10 +24,7 @@
24
24
  },
25
25
  ".": {
26
26
  "types": "./index.d.ts",
27
- "esm2022": "./esm2022/dbg-riskit-angular-login.mjs",
28
- "esm": "./esm2022/dbg-riskit-angular-login.mjs",
29
27
  "default": "./fesm2022/dbg-riskit-angular-login.mjs"
30
28
  }
31
- },
32
- "sideEffects": false
29
+ }
33
30
  }
@@ -1,5 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- export * from './public_api';
5
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGJnLXJpc2tpdC1hbmd1bGFyLWxvZ2luLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcGtnL2RiZy1yaXNraXQvYW5ndWxhci1sb2dpbi9zcmMvZGJnLXJpc2tpdC1hbmd1bGFyLWxvZ2luLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljX2FwaSc7XG4iXX0=
@@ -1,80 +0,0 @@
1
- import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';
2
- import { AUTH_PROVIDER, SECONDARY_LOGO } from '@dbg-riskit/angular-common';
3
- import { toErrorMessage } from '@dbg-riskit/angular-error';
4
- import { BaseComponent } from '@dbg-riskit/angular-view';
5
- import { first, takeUntil } from 'rxjs/operators';
6
- import * as i0 from "@angular/core";
7
- import * as i1 from "@dbg-riskit/angular-auth";
8
- import * as i2 from "@angular/common";
9
- import * as i3 from "@angular/forms";
10
- import * as i4 from "@dbg-riskit/angular-view";
11
- import * as i5 from "@angular/material/button";
12
- import * as i6 from "@angular/material/card";
13
- import * as i7 from "@angular/material/form-field";
14
- import * as i8 from "@angular/material/icon";
15
- import * as i9 from "@angular/material/input";
16
- import * as i10 from "@angular/material/progress-spinner";
17
- export class LoginComponent extends BaseComponent {
18
- constructor(authProvider, changeDetectorRef, authRoutingFlowService, secondaryLogo) {
19
- super();
20
- this.authProvider = authProvider;
21
- this.changeDetectorRef = changeDetectorRef;
22
- this.authRoutingFlowService = authRoutingFlowService;
23
- this.secondaryLogo = secondaryLogo;
24
- /**
25
- * Control for "login button-to-spinner".
26
- */
27
- this.loggingIn = false;
28
- // Update component state on login status change
29
- this.authProvider.loggedInStream.pipe(takeUntil(this.destroyed)).subscribe(() => this.changeDetectorRef.markForCheck());
30
- }
31
- ngAfterViewInit() {
32
- this.authRoutingFlowService.loginViaService().pipe(takeUntil(this.destroyed)).subscribe(() => {
33
- this.changeDetectorRef.markForCheck();
34
- }, (err) => {
35
- this.errorMessage = toErrorMessage(err).message;
36
- this.changeDetectorRef.markForCheck();
37
- });
38
- }
39
- get isDirectFlow() {
40
- return this.authRoutingFlowService.directFlow;
41
- }
42
- get authStatus() {
43
- return this.authProvider.loggedIn;
44
- }
45
- get userProfile() {
46
- return this.authProvider.userProfile;
47
- }
48
- login() {
49
- this.loggingIn = true;
50
- this.authRoutingFlowService.login(this.username, this.password).pipe(first()).subscribe((res) => {
51
- if (!res) {
52
- this.errorMessage = 'Authentication failed. Server did not generate a token.';
53
- }
54
- this.loggingIn = false;
55
- this.changeDetectorRef.markForCheck();
56
- }, () => {
57
- this.loggingIn = false;
58
- this.errorMessage = 'Authentication failed. Is the username and password correct?';
59
- this.changeDetectorRef.markForCheck();
60
- });
61
- }
62
- get logo() {
63
- return this.secondaryLogo;
64
- }
65
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoginComponent, deps: [{ token: AUTH_PROVIDER }, { token: i0.ChangeDetectorRef }, { token: i1.AuthRoutingFlowService }, { token: SECONDARY_LOGO }], target: i0.ɵɵFactoryTarget.Component }); }
66
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: LoginComponent, selector: "ng-component", host: { properties: { "class.risk-login-form": "true" } }, usesInheritance: true, ngImport: i0, template: "<risk-flex>\n <risk-flex-spacer></risk-flex-spacer>\n\n <div *ngIf=\"isDirectFlow\">\n <ng-template #loggedOut>\n <risk-error *ngIf=\"errorMessage\" [message]=\"errorMessage\"></risk-error>\n\n <form (ngSubmit)=\"login()\" role=\"form\">\n <mat-card>\n <mat-card-header>\n <mat-card-title>Please Sign In</mat-card-title>\n </mat-card-header>\n <mat-card-content>\n <mat-form-field class=\"risk-full-width\">\n <input matInput\n type=\"text\"\n placeholder=\"Username\"\n name=\"username\"\n [(ngModel)]=\"username\"\n autofocus>\n </mat-form-field>\n <mat-form-field class=\"risk-full-width\">\n <input matInput\n type=\"password\"\n placeholder=\"Password\"\n name=\"password\"\n [(ngModel)]=\"password\">\n </mat-form-field>\n </mat-card-content>\n <mat-card-actions>\n <button *ngIf=\"!loggingIn\"\n mat-raised-button\n color=\"primary\"\n type=\"submit\">\n Sign in\n </button>\n <mat-spinner *ngIf=\"loggingIn\" [diameter]=\"36\"></mat-spinner>\n <risk-flex-spacer></risk-flex-spacer>\n <img [src]=\"logo\" alt=\"Company logo\">\n </mat-card-actions>\n </mat-card>\n </form>\n </ng-template>\n\n <ng-template [ngIf]=\"authStatus | async\" [ngIfElse]=\"loggedOut\">\n <ng-template [ngIf]=\"userProfile | async\" let-user=\"ngIf\">\n <risk-good *ngIf=\"user?.name\"\n [message]=\"'Successfully logged in as ' + user.name + '.'\"></risk-good>\n <risk-good *ngIf=\"!user && !user.name\"\n [message]=\"'Successfully logged in!'\"></risk-good>\n </ng-template>\n </ng-template>\n </div>\n\n <div *ngIf=\"!isDirectFlow\">\n <ng-template [ngIf]=\"!errorMessage\">\n <div class=\"risk-login-form-flex-wrapper\">\n <div></div>\n <mat-spinner></mat-spinner>\n <div></div>\n </div>\n <h3>Contacting authentication server...</h3>\n </ng-template>\n <ng-template [ngIf]=\"errorMessage\">\n <div class=\"risk-login-form-flex-wrapper\">\n <div></div>\n <mat-icon class=\"risk-login-form-error\" color=\"warn\">error_outline</mat-icon>\n <div></div>\n </div>\n <h3>Failed to authenticate user: {{errorMessage}}</h3>\n <div class=\"risk-login-form-flex-wrapper\">\n <div></div>\n <button mat-button\n (click)=\"login()\"\n color=\"primary\"\n type=\"button\">\n <mat-icon>autorenew</mat-icon>\n Retry\n </button>\n <div></div>\n </div>\n </ng-template>\n </div>\n\n <risk-flex-spacer></risk-flex-spacer>\n</risk-flex>\n", styles: [":host{display:block;padding:0;margin:0}:host>*{vertical-align:bottom}\n", ".risk-flex>div{width:400px;max-width:97vw;max-height:70vh;margin-top:40px}.mat-mdc-card-actions img{margin:3px 0;height:30px}.risk-login-form-flex-wrapper{display:flex}.risk-login-form-flex-wrapper>div{flex:1}.risk-login-form-error{font-size:100px;height:100px;width:100px}h3{text-align:center}input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px white inset}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i4.MessageComponent, selector: "risk-error, risk-good, risk-info, risk-message, risk-warn, risk-initial-load, risk-no-data, risk-update-failed", inputs: ["message"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i6.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i6.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i6.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i6.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i6.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i4.FlexComponent, selector: "risk-flex", inputs: ["wrapContent"] }, { kind: "component", type: i4.FlexSpacerComponent, selector: "risk-flex-spacer" }, { kind: "component", type: i10.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
67
- }
68
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoginComponent, decorators: [{
69
- type: Component,
70
- args: [{ host: {
71
- '[class.risk-login-form]': 'true'
72
- }, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, template: "<risk-flex>\n <risk-flex-spacer></risk-flex-spacer>\n\n <div *ngIf=\"isDirectFlow\">\n <ng-template #loggedOut>\n <risk-error *ngIf=\"errorMessage\" [message]=\"errorMessage\"></risk-error>\n\n <form (ngSubmit)=\"login()\" role=\"form\">\n <mat-card>\n <mat-card-header>\n <mat-card-title>Please Sign In</mat-card-title>\n </mat-card-header>\n <mat-card-content>\n <mat-form-field class=\"risk-full-width\">\n <input matInput\n type=\"text\"\n placeholder=\"Username\"\n name=\"username\"\n [(ngModel)]=\"username\"\n autofocus>\n </mat-form-field>\n <mat-form-field class=\"risk-full-width\">\n <input matInput\n type=\"password\"\n placeholder=\"Password\"\n name=\"password\"\n [(ngModel)]=\"password\">\n </mat-form-field>\n </mat-card-content>\n <mat-card-actions>\n <button *ngIf=\"!loggingIn\"\n mat-raised-button\n color=\"primary\"\n type=\"submit\">\n Sign in\n </button>\n <mat-spinner *ngIf=\"loggingIn\" [diameter]=\"36\"></mat-spinner>\n <risk-flex-spacer></risk-flex-spacer>\n <img [src]=\"logo\" alt=\"Company logo\">\n </mat-card-actions>\n </mat-card>\n </form>\n </ng-template>\n\n <ng-template [ngIf]=\"authStatus | async\" [ngIfElse]=\"loggedOut\">\n <ng-template [ngIf]=\"userProfile | async\" let-user=\"ngIf\">\n <risk-good *ngIf=\"user?.name\"\n [message]=\"'Successfully logged in as ' + user.name + '.'\"></risk-good>\n <risk-good *ngIf=\"!user && !user.name\"\n [message]=\"'Successfully logged in!'\"></risk-good>\n </ng-template>\n </ng-template>\n </div>\n\n <div *ngIf=\"!isDirectFlow\">\n <ng-template [ngIf]=\"!errorMessage\">\n <div class=\"risk-login-form-flex-wrapper\">\n <div></div>\n <mat-spinner></mat-spinner>\n <div></div>\n </div>\n <h3>Contacting authentication server...</h3>\n </ng-template>\n <ng-template [ngIf]=\"errorMessage\">\n <div class=\"risk-login-form-flex-wrapper\">\n <div></div>\n <mat-icon class=\"risk-login-form-error\" color=\"warn\">error_outline</mat-icon>\n <div></div>\n </div>\n <h3>Failed to authenticate user: {{errorMessage}}</h3>\n <div class=\"risk-login-form-flex-wrapper\">\n <div></div>\n <button mat-button\n (click)=\"login()\"\n color=\"primary\"\n type=\"button\">\n <mat-icon>autorenew</mat-icon>\n Retry\n </button>\n <div></div>\n </div>\n </ng-template>\n </div>\n\n <risk-flex-spacer></risk-flex-spacer>\n</risk-flex>\n", styles: [":host{display:block;padding:0;margin:0}:host>*{vertical-align:bottom}\n", ".risk-flex>div{width:400px;max-width:97vw;max-height:70vh;margin-top:40px}.mat-mdc-card-actions img{margin:3px 0;height:30px}.risk-login-form-flex-wrapper{display:flex}.risk-login-form-flex-wrapper>div{flex:1}.risk-login-form-error{font-size:100px;height:100px;width:100px}h3{text-align:center}input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px white inset}\n"] }]
73
- }], ctorParameters: () => [{ type: undefined, decorators: [{
74
- type: Inject,
75
- args: [AUTH_PROVIDER]
76
- }] }, { type: i0.ChangeDetectorRef }, { type: i1.AuthRoutingFlowService }, { type: undefined, decorators: [{
77
- type: Inject,
78
- args: [SECONDARY_LOGO]
79
- }] }] });
80
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9naW4uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGtnL2RiZy1yaXNraXQvYW5ndWxhci1sb2dpbi9zcmMvbGliL2xvZ2luLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL3BrZy9kYmctcmlza2l0L2FuZ3VsYXItbG9naW4vc3JjL2xpYi9sb2dpbi5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQWdCLHVCQUF1QixFQUFxQixTQUFTLEVBQUUsTUFBTSxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBRzNHLE9BQU8sRUFBQyxhQUFhLEVBQUUsY0FBYyxFQUFDLE1BQU0sNEJBQTRCLENBQUM7QUFDek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ICAgICAgICAgICAgPG1hdC1jYXJkLWhlYWRlcj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxtYXQtY2FyZC10aXRsZT5QbGVhc2UgU2lnbiBJbjwvbWF0LWNhcmQtdGl0bGU+XG4gICAgICAgICAgICAgICAgICAgIDwvbWF0LWNhcmQtaGVhZGVyPlxuICAgICAgICAgICAgICAgICAgICA8bWF0LWNhcmQtY29udGVudD5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxtYXQtZm9ybS1maWVsZCBjbGFzcz1cInJpc2stZnVsbC13aWR0aFwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxpbnB1dCBtYXRJbnB1dFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlPVwidGV4dFwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYWNlaG9sZGVyPVwiVXNlcm5hbWVcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lPVwidXNlcm5hbWVcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbKG5nTW9kZWwpXT1cInVzZXJuYW1lXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXV0b2ZvY3VzPlxuICAgICAgICAgICAgICAgICAgICAgICAgPC9tYXQtZm9ybS1maWVsZD5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxtYXQtZm9ybS1maWVsZCBjbGFzcz1cInJpc2stZnVsbC13aWR0aFwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxpbnB1dCBtYXRJbnB1dFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlPVwicGFzc3dvcmRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGFjZWhvbGRlcj1cIlBhc3N3b3JkXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZT1cInBhc3N3b3JkXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgWyhuZ01vZGVsKV09XCJwYXNzd29yZFwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgPC9tYXQtZm9ybS1maWVsZD5cbiAgICAgICAgICAgICAgICAgICAgPC9tYXQtY2FyZC1jb250ZW50PlxuICAgICAgICAgICAgICAgICAgICA8bWF0LWNhcmQtYWN0aW9ucz5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxidXR0b24gKm5nSWY9XCIhbG9nZ2luZ0luXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF0LXJhaXNlZC1idXR0b25cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I9XCJwcmltYXJ5XCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZT1cInN1Ym1pdFwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNpZ24gaW5cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvYnV0dG9uPlxuICAgICAgICAgICAgICAgICAgICAgICAgPG1hdC1zcGlubmVyICpuZ0lmPVwibG9nZ2luZ0luXCIgW2RpYW1ldGVyXT1cIjM2XCI+PC9tYXQtc3Bpbm5lcj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxyaXNrLWZsZXgtc3BhY2VyPjwvcmlzay1mbGV4LXNwYWNlcj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxpbWcgW3NyY109XCJsb2dvXCIgYWx0PVwiQ29tcGFueSBsb2dvXCI+XG4gICAgICAgICAgICAgICAgICAgIDwvbWF0LWNhcmQtYWN0aW9ucz5cbiAgICAgICAgICAgICAgICA8L21hdC1jYXJkPlxuICAgICAgICAgICAgPC9mb3JtPlxuICAgICAgICA8L25nLXRlbXBsYXRlPlxuXG4gICAgICAgIDxuZy10ZW1wbGF0ZSBbbmdJZl09XCJhdXRoU3RhdHVzIHwgYXN5bmNcIiBbbmdJZkVsc2VdPVwibG9nZ2VkT3V0XCI+XG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l2IGNsYXNzPVwicmlzay1sb2dpbi1mb3JtLWZsZXgtd3JhcHBlclwiPlxuICAgICAgICAgICAgICAgIDxkaXY+PC9kaXY+XG4gICAgICAgICAgICAgICAgPG1hdC1pY29uIGNsYXNzPVwicmlzay1sb2dpbi1mb3JtLWVycm9yXCIgY29sb3I9XCJ3YXJuXCI+ZXJyb3Jfb3V0bGluZTwvbWF0LWljb24+XG4gICAgICAgICAgICAgICAgPGRpdj48L2Rpdj5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPGgzPkZhaWxlZCB0byBhdXRoZW50aWNhdGUgdXNlcjoge3tlcnJvck1lc3NhZ2V9fTwvaDM+XG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwicmlzay1sb2dpbi1mb3JtLWZsZXgtd3JhcHBlclwiPlxuICAgICAgICAgICAgICAgIDxkaXY+PC9kaXY+XG4gICAgICAgICAgICAgICAgPGJ1dHRvbiBtYXQtYnV0dG9uXG4gICAgICAgICAgICAgICAgICAgICAgICAoY2xpY2spPVwibG9naW4oKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xvcj1cInByaW1hcnlcIlxuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZT1cImJ1dHRvblwiPlxuICAgICAgICAgICAgICAgICAgICA8bWF0LWljb24+YXV0b3JlbmV3PC9tYXQtaWNvbj5cbiAgICAgICAgICAgICAgICAgICAgUmV0cnlcbiAgICAgICAgICAgICAgICA8L2J1dHRvbj5cbiAgICAgICAgICAgICAgICA8ZGl2PjwvZGl2PlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgIDwvbmctdGVtcGxhdGU+XG4gICAgPC9kaXY+XG5cbiAgICA8cmlzay1mbGV4LXNwYWNlcj48L3Jpc2stZmxleC1zcGFjZXI+XG48L3Jpc2stZmxleD5cbiJdfQ==
@@ -1,83 +0,0 @@
1
- import { ChangeDetectionStrategy, Component, Directive, HostBinding, Inject, Input } from '@angular/core';
2
- import { AUTH_PROVIDER } from '@dbg-riskit/angular-common';
3
- import { BaseComponent } from '@dbg-riskit/angular-view';
4
- import { first, takeUntil } from 'rxjs/operators';
5
- import * as i0 from "@angular/core";
6
- import * as i1 from "@dbg-riskit/angular-auth";
7
- import * as i2 from "@angular/common";
8
- import * as i3 from "@angular/material/button";
9
- import * as i4 from "@angular/material/icon";
10
- import * as i5 from "@angular/material/menu";
11
- export class LoginMenuComponentTitleDirective {
12
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoginMenuComponentTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
13
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: LoginMenuComponentTitleDirective, selector: "risk-login-menu-title-horizontal, risk-login-menu-title-vertical", host: { properties: { "class.risk-login-menu-title": "true" } }, ngImport: i0 }); }
14
- }
15
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoginMenuComponentTitleDirective, decorators: [{
16
- type: Directive,
17
- args: [{
18
- selector: 'risk-login-menu-title-horizontal, '
19
- + 'risk-login-menu-title-vertical',
20
- host: {
21
- '[class.risk-login-menu-title]': 'true'
22
- }
23
- }]
24
- }] });
25
- export class LoginMenuItemsDirective {
26
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoginMenuItemsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
27
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: LoginMenuItemsDirective, selector: "risk-login-menu-before-items-horizontal, risk-login-menu-before-items-vertical,risk-login-menu-after-items-horizontal,risk-login-menu-after-items-vertical", ngImport: i0 }); }
28
- }
29
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoginMenuItemsDirective, decorators: [{
30
- type: Directive,
31
- args: [{
32
- selector: 'risk-login-menu-before-items-horizontal,'
33
- + ' risk-login-menu-before-items-vertical,'
34
- + 'risk-login-menu-after-items-horizontal,'
35
- + 'risk-login-menu-after-items-vertical'
36
- }]
37
- }] });
38
- export class LoginMenuComponent extends BaseComponent {
39
- get isRow() {
40
- return this.orientation === 'row';
41
- }
42
- get isColumn() {
43
- return this.orientation === 'column';
44
- }
45
- constructor(authProvider, authRoutingFlowService, changeDetectorRef) {
46
- super();
47
- this.authProvider = authProvider;
48
- this.authRoutingFlowService = authRoutingFlowService;
49
- this.changeDetectorRef = changeDetectorRef;
50
- this.orientation = 'row';
51
- // Update menu state on login status change
52
- this.authProvider.loggedInStream.pipe(takeUntil(this.destroyed)).subscribe(() => this.changeDetectorRef.markForCheck());
53
- }
54
- menuClosed() {
55
- this.changeDetectorRef.markForCheck();
56
- }
57
- get authStatus() {
58
- return this.authProvider.loggedIn;
59
- }
60
- logout() {
61
- this.authRoutingFlowService.logout().pipe(first()).subscribe();
62
- }
63
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoginMenuComponent, deps: [{ token: AUTH_PROVIDER }, { token: i1.AuthRoutingFlowService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
64
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: LoginMenuComponent, selector: "risk-login-menu", inputs: { orientation: "orientation" }, host: { properties: { "class.risk-login-menu": "true", "class.risk-login-menu-flex-row": "this.isRow", "class.risk-login-menu-flex-column": "this.isColumn" } }, usesInheritance: true, ngImport: i0, template: "<ng-template [ngIf]=\"orientation === 'row'\">\n <mat-menu #loginMenu=\"matMenu\"\n [overlapTrigger]=\"false\">\n <ng-content select=\"risk-login-menu-before-items-horizontal\"></ng-content>\n <ng-template [ngIf]=\"authStatus | async\" [ngIfElse]=\"loggedOut\">\n <button mat-menu-item\n (click)=\"logout()\"\n type=\"button\">\n <mat-icon>exit_to_app</mat-icon>\n Logout\n </button>\n </ng-template>\n <ng-template #loggedOut>\n <button mat-menu-item\n (click)=\"logout()\"\n type=\"button\">\n <mat-icon>launch</mat-icon>\n Login\n </button>\n </ng-template>\n <ng-content select=\"risk-login-menu-after-items-horizontal\"></ng-content>\n </mat-menu>\n <button mat-button\n #menu=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"loginMenu\"\n [class.risk-menu-open]=\"menu.menuOpen\"\n (onMenuClose)=\"menuClosed()\"\n type=\"button\">\n <ng-content select=\"risk-login-menu-title-horizontal\"></ng-content>\n <mat-icon>person</mat-icon>\n </button>\n</ng-template>\n\n<ng-template [ngIf]=\"orientation === 'column'\">\n <ng-content select=\"risk-login-menu-title-vertical\"></ng-content>\n <ng-content select=\"risk-login-menu-before-items-vertical\"></ng-content>\n <ng-template [ngIf]=\"authStatus | async\" [ngIfElse]=\"loggedOut2\">\n <a mat-button\n (click)=\"logout()\">\n <mat-icon>exit_to_app</mat-icon>\n Logout\n </a>\n </ng-template>\n <ng-template #loggedOut2>\n <a mat-button\n (click)=\"logout()\">\n <mat-icon>launch</mat-icon>\n Login\n </a>\n </ng-template>\n <ng-content select=\"risk-login-menu-after-items-vertical\"></ng-content>\n</ng-template>\n", styles: [":host{display:block;padding:0;margin:0}:host>*{vertical-align:bottom}\n", ":host{display:flex!important}:host.risk-login-menu-flex-row{flex-direction:row}:host.risk-login-menu-flex-column{flex-direction:column}:host .risk-login-menu-title{font-weight:700;margin:0 5px}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i5.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i5.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i5.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
65
- }
66
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoginMenuComponent, decorators: [{
67
- type: Component,
68
- args: [{ selector: 'risk-login-menu', host: {
69
- '[class.risk-login-menu]': 'true'
70
- }, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, template: "<ng-template [ngIf]=\"orientation === 'row'\">\n <mat-menu #loginMenu=\"matMenu\"\n [overlapTrigger]=\"false\">\n <ng-content select=\"risk-login-menu-before-items-horizontal\"></ng-content>\n <ng-template [ngIf]=\"authStatus | async\" [ngIfElse]=\"loggedOut\">\n <button mat-menu-item\n (click)=\"logout()\"\n type=\"button\">\n <mat-icon>exit_to_app</mat-icon>\n Logout\n </button>\n </ng-template>\n <ng-template #loggedOut>\n <button mat-menu-item\n (click)=\"logout()\"\n type=\"button\">\n <mat-icon>launch</mat-icon>\n Login\n </button>\n </ng-template>\n <ng-content select=\"risk-login-menu-after-items-horizontal\"></ng-content>\n </mat-menu>\n <button mat-button\n #menu=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"loginMenu\"\n [class.risk-menu-open]=\"menu.menuOpen\"\n (onMenuClose)=\"menuClosed()\"\n type=\"button\">\n <ng-content select=\"risk-login-menu-title-horizontal\"></ng-content>\n <mat-icon>person</mat-icon>\n </button>\n</ng-template>\n\n<ng-template [ngIf]=\"orientation === 'column'\">\n <ng-content select=\"risk-login-menu-title-vertical\"></ng-content>\n <ng-content select=\"risk-login-menu-before-items-vertical\"></ng-content>\n <ng-template [ngIf]=\"authStatus | async\" [ngIfElse]=\"loggedOut2\">\n <a mat-button\n (click)=\"logout()\">\n <mat-icon>exit_to_app</mat-icon>\n Logout\n </a>\n </ng-template>\n <ng-template #loggedOut2>\n <a mat-button\n (click)=\"logout()\">\n <mat-icon>launch</mat-icon>\n Login\n </a>\n </ng-template>\n <ng-content select=\"risk-login-menu-after-items-vertical\"></ng-content>\n</ng-template>\n", styles: [":host{display:block;padding:0;margin:0}:host>*{vertical-align:bottom}\n", ":host{display:flex!important}:host.risk-login-menu-flex-row{flex-direction:row}:host.risk-login-menu-flex-column{flex-direction:column}:host .risk-login-menu-title{font-weight:700;margin:0 5px}\n"] }]
71
- }], ctorParameters: () => [{ type: undefined, decorators: [{
72
- type: Inject,
73
- args: [AUTH_PROVIDER]
74
- }] }, { type: i1.AuthRoutingFlowService }, { type: i0.ChangeDetectorRef }], propDecorators: { orientation: [{
75
- type: Input
76
- }], isRow: [{
77
- type: HostBinding,
78
- args: ['class.risk-login-menu-flex-row']
79
- }], isColumn: [{
80
- type: HostBinding,
81
- args: ['class.risk-login-menu-flex-column']
82
- }] } });
83
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9naW4ubWVudS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wa2cvZGJnLXJpc2tpdC9hbmd1bGFyLWxvZ2luL3NyYy9saWIvbG9naW4ubWVudS5jb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8L21hdC1pY29uPlxuICAgICAgICAgICAgICAgIExvZ291dFxuICAgICAgICAgICAgPC9idXR0b24+XG4gICAgICAgIDwvbmctdGVtcGxhdGU+XG4gICAgICAgIDxuZy10ZW1wbGF0ZSAjbG9nZ2VkT3V0PlxuICAgICAgICAgICAgPGJ1dHRvbiBtYXQtbWVudS1pdGVtXG4gICAgICAgICAgICAgICAgICAgIChjbGljayk9XCJsb2dvdXQoKVwiXG4gICAgICAgICAgICAgICAgICAgIHR5cGU9XCJidXR0b25cIj5cbiAgICAgICAgICAgICAgICA8bWF0LWljb24+bGF1bmNoPC9tYXQtaWNvbj5cbiAgICAgICAgICAgICAgICBMb2dpblxuICAgICAgICAgICAgPC9idXR0b24+XG4gICAgICAgIDwvbmctdGVtcGxhdGU+XG4gICAgICAgIDxuZy1jb250ZW50IHNlbGVjdD1cInJpc2stbG9naW4tbWVudS1hZnRlci1pdGVtcy1ob3Jpem9udGFsXCI+PC9uZy1jb250ZW50PlxuICAgIDwvbWF0LW1lbnU+XG4gICAgPGJ1dHRvbiBtYXQtYnV0dG9uXG4gICAgICAgICAgICAjbWVudT1cIm1hdE1lbnVUcmlnZ2VyXCJcbiAgICAgICAgICAgIFttYXRNZW51VHJpZ2dlckZvcl09XCJsb2dpbk1lbnVcIlxuICAgICAgICAgICAgW2NsYXNzLnJpc2stbWVudS1vcGVuXT1cIm1lbnUubWVudU9wZW5cIlxuICAgICAgICAgICAgKG9uTWVudUNsb3NlKT1cIm1lbnVDbG9zZWQoKVwiXG4gICAgICAgICAgICB0eXBlPVwiYnV0dG9uXCI+XG4gICAgICAgIDxuZy1jb250ZW50IHNlbGVjdD1cInJpc2stbG9naW4tbWVudS10aXRsZS1ob3Jpem9udGFsXCI+PC9uZy1jb250ZW50PlxuICAgICAgICA8bWF0LWljb24+cGVyc29uPC9tYXQtaWNvbj5cbiAgICA8L2J1dHRvbj5cbjwvbmctdGVtcGxhdGU+XG5cbjxuZy10ZW1wbGF0ZSBbbmdJZl09XCJvcmllbnRhdGlvbiA9PT0gJ2NvbHVtbidcIj5cbiAgICA8bmctY29udGVudCBzZWxlY3Q9XCJyaXNrLWxvZ2luLW1lbnUtdGl0bGUtdmVydGljYWxcIj48L25nLWNvbnRlbnQ+XG4gICAgPG5nLWNvbnRlbnQgc2VsZWN0PVwicmlzay1sb2dpbi1tZW51LWJlZm9yZS1pdGVtcy12ZXJ0aWNhbFwiPjwvbmctY29udGVudD5cbiAgICA8bmctdGVtcGxhdGUgW25nSWZdPVwiYXV0aFN0YXR1cyB8IGFzeW5jXCIgW25nSWZFbHNlXT1cImxvZ2dlZE91dDJcIj5cbiAgICAgICAgPGEgbWF0LWJ1dHRvblxuICAgICAgICAgICAoY2xpY2spPVwibG9nb3V0KClcIj5cbiAgICAgICAgICAgIDxtYXQtaWNvbj5leGl0X3RvX2FwcDwvbWF0LWljb24+XG4gICAgICAgICAgICBMb2dvdXRcbiAgICAgICAgPC9hPlxuICAgIDwvbmctdGVtcGxhdGU+XG4gICAgPG5nLXRlbXBsYXRlICNsb2dnZWRPdXQyPlxuICAgICAgICA8YSBtYXQtYnV0dG9uXG4gICAgICAgICAgIChjbGljayk9XCJsb2dvdXQoKVwiPlxuICAgICAgICAgICAgPG1hdC1pY29uPmxhdW5jaDwvbWF0LWljb24+XG4gICAgICAgICAgICBMb2dpblxuICAgICAgICA8L2E+XG4gICAgPC9uZy10ZW1wbGF0ZT5cbiAgICA8bmctY29udGVudCBzZWxlY3Q9XCJyaXNrLWxvZ2luLW1lbnUtYWZ0ZXItaXRlbXMtdmVydGljYWxcIj48L25nLWNvbnRlbnQ+XG48L25nLXRlbXBsYXRlPlxuIl19
@@ -1,51 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { NgModule } from '@angular/core';
3
- import { FormsModule } from '@angular/forms';
4
- import { RouterModule } from '@angular/router';
5
- import { AuthModule } from '@dbg-riskit/angular-auth';
6
- import { CommonViewModule } from '@dbg-riskit/angular-view';
7
- import { LoginComponent } from './login.component';
8
- import { LoginMenuComponent, LoginMenuComponentTitleDirective, LoginMenuItemsDirective } from './login.menu.component';
9
- import * as i0 from "@angular/core";
10
- export class LoginModule {
11
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoginModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
12
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: LoginModule, declarations: [LoginMenuComponent,
13
- LoginComponent,
14
- LoginMenuComponentTitleDirective,
15
- LoginMenuItemsDirective], imports: [CommonModule,
16
- FormsModule,
17
- RouterModule,
18
- AuthModule,
19
- CommonViewModule], exports: [LoginMenuComponent,
20
- LoginMenuComponentTitleDirective,
21
- LoginMenuItemsDirective] }); }
22
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoginModule, imports: [CommonModule,
23
- FormsModule,
24
- RouterModule,
25
- AuthModule,
26
- CommonViewModule] }); }
27
- }
28
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoginModule, decorators: [{
29
- type: NgModule,
30
- args: [{
31
- imports: [
32
- CommonModule,
33
- FormsModule,
34
- RouterModule,
35
- AuthModule,
36
- CommonViewModule
37
- ],
38
- declarations: [
39
- LoginMenuComponent,
40
- LoginComponent,
41
- LoginMenuComponentTitleDirective,
42
- LoginMenuItemsDirective
43
- ],
44
- exports: [
45
- LoginMenuComponent,
46
- LoginMenuComponentTitleDirective,
47
- LoginMenuItemsDirective
48
- ]
49
- }]
50
- }] });
51
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9naW4ubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGtnL2RiZy1yaXNraXQvYW5ndWxhci1sb2dpbi9zcmMvbGli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21wb25lbnQsXG4gICAgICAgIExvZ2luQ29tcG9uZW50LFxuICAgICAgICBMb2dpbk1lbnVDb21wb25lbnRUaXRsZURpcmVjdGl2ZSxcbiAgICAgICAgTG9naW5NZW51SXRlbXNEaXJlY3RpdmVcbiAgICBdLFxuICAgIGV4cG9ydHMgICAgIDogW1xuICAgICAgICBMb2dpbk1lbnVDb21wb25lbnQsXG4gICAgICAgIExvZ2luTWVudUNvbXBvbmVudFRpdGxlRGlyZWN0aXZlLFxuICAgICAgICBMb2dpbk1lbnVJdGVtc0RpcmVjdGl2ZVxuICAgIF1cbn0pXG5leHBvcnQgY2xhc3MgTG9naW5Nb2R1bGUge1xufVxuIl19
@@ -1,4 +0,0 @@
1
- export * from './lib/login.module';
2
- export * from './lib/login.component';
3
- export * from './lib/login.menu.component';
4
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3BrZy9kYmctcmlza2l0L2FuZ3VsYXItbG9naW4vc3JjL3B1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxvQkFBb0IsQ0FBQztBQUNuQyxjQUFjLHVCQUF1QixDQUFDO0FBQ3RDLGNBQWMsNEJBQTRCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2xpYi9sb2dpbi5tb2R1bGUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvbG9naW4uY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2xvZ2luLm1lbnUuY29tcG9uZW50JztcbiJdfQ==
@@ -1,37 +0,0 @@
1
- import { AfterViewInit, ChangeDetectorRef } from '@angular/core';
2
- import { AuthRoutingFlowService } from '@dbg-riskit/angular-auth';
3
- import { BaseComponent } from '@dbg-riskit/angular-view';
4
- import { AuthProvider, UserInfo } from '@dbg-riskit/common';
5
- import { Observable } from 'rxjs';
6
- import * as i0 from "@angular/core";
7
- export declare class LoginComponent extends BaseComponent implements AfterViewInit {
8
- private readonly authProvider;
9
- private readonly changeDetectorRef;
10
- private readonly authRoutingFlowService;
11
- private readonly secondaryLogo;
12
- /**
13
- * Error message to be displayed.
14
- */
15
- errorMessage?: string;
16
- /**
17
- * User name binding.
18
- */
19
- username?: string;
20
- /**
21
- * Password binding.
22
- */
23
- password?: string;
24
- /**
25
- * Control for "login button-to-spinner".
26
- */
27
- loggingIn: boolean;
28
- constructor(authProvider: AuthProvider, changeDetectorRef: ChangeDetectorRef, authRoutingFlowService: AuthRoutingFlowService, secondaryLogo: string);
29
- ngAfterViewInit(): void;
30
- get isDirectFlow(): boolean;
31
- get authStatus(): Observable<boolean>;
32
- get userProfile(): Observable<UserInfo | undefined>;
33
- login(): void;
34
- get logo(): string;
35
- static ɵfac: i0.ɵɵFactoryDeclaration<LoginComponent, never>;
36
- static ɵcmp: i0.ɵɵComponentDeclaration<LoginComponent, "ng-component", never, {}, {}, never, never, false, never>;
37
- }
@@ -1,28 +0,0 @@
1
- import { ChangeDetectorRef } from '@angular/core';
2
- import { AuthRoutingFlowService } from '@dbg-riskit/angular-auth';
3
- import { BaseComponent } from '@dbg-riskit/angular-view';
4
- import { AuthProvider } from '@dbg-riskit/common';
5
- import { Observable } from 'rxjs';
6
- import * as i0 from "@angular/core";
7
- export declare class LoginMenuComponentTitleDirective {
8
- static ɵfac: i0.ɵɵFactoryDeclaration<LoginMenuComponentTitleDirective, never>;
9
- static ɵdir: i0.ɵɵDirectiveDeclaration<LoginMenuComponentTitleDirective, "risk-login-menu-title-horizontal, risk-login-menu-title-vertical", never, {}, {}, never, never, false, never>;
10
- }
11
- export declare class LoginMenuItemsDirective {
12
- static ɵfac: i0.ɵɵFactoryDeclaration<LoginMenuItemsDirective, never>;
13
- static ɵdir: i0.ɵɵDirectiveDeclaration<LoginMenuItemsDirective, "risk-login-menu-before-items-horizontal, risk-login-menu-before-items-vertical,risk-login-menu-after-items-horizontal,risk-login-menu-after-items-vertical", never, {}, {}, never, never, false, never>;
14
- }
15
- export declare class LoginMenuComponent extends BaseComponent {
16
- private readonly authProvider;
17
- private readonly authRoutingFlowService;
18
- private readonly changeDetectorRef;
19
- orientation: 'row' | 'column';
20
- get isRow(): boolean;
21
- get isColumn(): boolean;
22
- constructor(authProvider: AuthProvider, authRoutingFlowService: AuthRoutingFlowService, changeDetectorRef: ChangeDetectorRef);
23
- menuClosed(): void;
24
- get authStatus(): Observable<boolean>;
25
- logout(): void;
26
- static ɵfac: i0.ɵɵFactoryDeclaration<LoginMenuComponent, never>;
27
- static ɵcmp: i0.ɵɵComponentDeclaration<LoginMenuComponent, "risk-login-menu", never, { "orientation": { "alias": "orientation"; "required": false; }; }, {}, never, ["risk-login-menu-before-items-horizontal", "risk-login-menu-after-items-horizontal", "risk-login-menu-title-horizontal", "risk-login-menu-title-vertical", "risk-login-menu-before-items-vertical", "risk-login-menu-after-items-vertical"], false, never>;
28
- }
@@ -1,13 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./login.menu.component";
3
- import * as i2 from "./login.component";
4
- import * as i3 from "@angular/common";
5
- import * as i4 from "@angular/forms";
6
- import * as i5 from "@angular/router";
7
- import * as i6 from "@dbg-riskit/angular-auth";
8
- import * as i7 from "@dbg-riskit/angular-view";
9
- export declare class LoginModule {
10
- static ɵfac: i0.ɵɵFactoryDeclaration<LoginModule, never>;
11
- static ɵmod: i0.ɵɵNgModuleDeclaration<LoginModule, [typeof i1.LoginMenuComponent, typeof i2.LoginComponent, typeof i1.LoginMenuComponentTitleDirective, typeof i1.LoginMenuItemsDirective], [typeof i3.CommonModule, typeof i4.FormsModule, typeof i5.RouterModule, typeof i6.AuthModule, typeof i7.CommonViewModule], [typeof i1.LoginMenuComponent, typeof i1.LoginMenuComponentTitleDirective, typeof i1.LoginMenuItemsDirective]>;
12
- static ɵinj: i0.ɵɵInjectorDeclaration<LoginModule>;
13
- }
package/public_api.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from './lib/login.module';
2
- export * from './lib/login.component';
3
- export * from './lib/login.menu.component';