@dbg-riskit/angular-login 9999.9999.9999-rc.445048 → 9999.9999.9999-rc.4579154
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 +5 -6
- package/fesm2022/dbg-riskit-angular-login.mjs +103 -159
- package/fesm2022/dbg-riskit-angular-login.mjs.map +1 -1
- package/index.d.ts +43 -5
- package/package.json +12 -15
- package/esm2022/dbg-riskit-angular-login.mjs +0 -5
- package/esm2022/lib/login.component.mjs +0 -80
- package/esm2022/lib/login.menu.component.mjs +0 -83
- package/esm2022/lib/login.module.mjs +0 -51
- package/esm2022/public_api.mjs +0 -4
- package/lib/login.component.d.ts +0 -37
- package/lib/login.menu.component.d.ts +0 -28
- package/lib/login.module.d.ts +0 -13
- package/public_api.d.ts +0 -3
package/docs/README.md
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-

|
|
2
|
+

|
|
3
|
+

|
|
4
4
|
|
|
5
5
|
# risk-angular-common (Angular 13 and @angular/material based library for RiskIT applications)
|
|
6
6
|
|
|
7
7
|
Used by:
|
|
8
|
-
- [
|
|
9
|
-
- [
|
|
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,94 +1,98 @@
|
|
|
1
|
-
import * as i2 from '@angular/common';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
1
|
import * as i0 from '@angular/core';
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
2
|
+
import { inject, signal, ChangeDetectionStrategy, Component, Directive, input } from '@angular/core';
|
|
3
|
+
import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
|
+
import * as i1 from '@angular/forms';
|
|
5
|
+
import { FormGroup, FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
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';
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import
|
|
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';
|
|
15
|
+
import { RiskFlexComponent, RiskFlexSpacerComponent, RiskMessageComponent } from '@dbg-riskit/angular-view';
|
|
16
|
+
import { switchMap, first } from 'rxjs/operators';
|
|
17
|
+
import { MatMenu, MatMenuItem, MatMenuTrigger } from '@angular/material/menu';
|
|
22
18
|
|
|
23
|
-
class
|
|
24
|
-
constructor(authProvider, changeDetectorRef, authRoutingFlowService, secondaryLogo) {
|
|
25
|
-
super();
|
|
26
|
-
this.authProvider = authProvider;
|
|
27
|
-
this.changeDetectorRef = changeDetectorRef;
|
|
28
|
-
this.authRoutingFlowService = authRoutingFlowService;
|
|
29
|
-
this.secondaryLogo = secondaryLogo;
|
|
30
|
-
/**
|
|
31
|
-
* Control for "login button-to-spinner".
|
|
32
|
-
*/
|
|
33
|
-
this.loggingIn = false;
|
|
34
|
-
// Update component state on login status change
|
|
35
|
-
this.authProvider.loggedInStream.pipe(takeUntil(this.destroyed)).subscribe(() => this.changeDetectorRef.markForCheck());
|
|
36
|
-
}
|
|
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
|
-
}
|
|
19
|
+
class RiskLoginComponent {
|
|
45
20
|
get isDirectFlow() {
|
|
46
21
|
return this.authRoutingFlowService.directFlow;
|
|
47
22
|
}
|
|
48
|
-
get
|
|
49
|
-
return this.
|
|
23
|
+
get logo() {
|
|
24
|
+
return this.secondaryLogo;
|
|
50
25
|
}
|
|
51
|
-
|
|
52
|
-
|
|
26
|
+
constructor() {
|
|
27
|
+
this.authProvider = inject(AUTH_PROVIDER);
|
|
28
|
+
this.authRoutingFlowService = inject(AuthRoutingFlowService);
|
|
29
|
+
this.secondaryLogo = inject(SECONDARY_LOGO);
|
|
30
|
+
this.errorMessage = signal(undefined, ...(ngDevMode ? [{ debugName: "errorMessage" }] : []));
|
|
31
|
+
this.loggingIn = signal(false, ...(ngDevMode ? [{ debugName: "loggingIn" }] : []));
|
|
32
|
+
this.loginForm = new FormGroup({
|
|
33
|
+
username: new FormControl(''),
|
|
34
|
+
password: new FormControl('')
|
|
35
|
+
});
|
|
36
|
+
this.authStatus = toSignal(this.authProvider.loggedInStream);
|
|
37
|
+
this.userProfile = signal(undefined, ...(ngDevMode ? [{ debugName: "userProfile" }] : []));
|
|
38
|
+
this.authRoutingFlowService.loginViaService().pipe(takeUntilDestroyed()).subscribe({
|
|
39
|
+
error: (err) => {
|
|
40
|
+
this.errorMessage.set(toErrorMessage(err).message);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
this.authProvider.loggedInStream.pipe(takeUntilDestroyed(), switchMap(() => this.authProvider.userProfile)).subscribe({
|
|
44
|
+
next: (profile) => {
|
|
45
|
+
this.userProfile.set(profile);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
53
48
|
}
|
|
54
49
|
login() {
|
|
55
|
-
this.loggingIn
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
this.loggingIn.set(true);
|
|
51
|
+
const username = this.loginForm.get('username')?.value ?? undefined;
|
|
52
|
+
const password = this.loginForm.get('password')?.value ?? undefined;
|
|
53
|
+
this.authRoutingFlowService.login(username, password).pipe(first()).subscribe({
|
|
54
|
+
next: (res) => {
|
|
55
|
+
if (!res) {
|
|
56
|
+
this.errorMessage.set('Authentication failed. Server did not generate a token.');
|
|
57
|
+
}
|
|
58
|
+
this.loggingIn.set(false);
|
|
59
|
+
},
|
|
60
|
+
error: () => {
|
|
61
|
+
this.loggingIn.set(false);
|
|
62
|
+
this.errorMessage.set('Authentication failed. Is the username and password correct?');
|
|
59
63
|
}
|
|
60
|
-
this.loggingIn = false;
|
|
61
|
-
this.changeDetectorRef.markForCheck();
|
|
62
|
-
}, () => {
|
|
63
|
-
this.loggingIn = false;
|
|
64
|
-
this.errorMessage = 'Authentication failed. Is the username and password correct?';
|
|
65
|
-
this.changeDetectorRef.markForCheck();
|
|
66
64
|
});
|
|
67
65
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", 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: "16.2.12", 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] ", inputs: ["disabled", "disableRipple", "color"], 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 }); }
|
|
66
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: RiskLoginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
67
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: RiskLoginComponent, isStandalone: true, selector: "ng-component", host: { properties: { "class.risk-login-form": "true" } }, ngImport: i0, template: "<risk-flex>\n <risk-flex-spacer/>\n\n @if (isDirectFlow) {\n <div>\n @if (authStatus()) {\n @if (userProfile(); 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 [formGroup]=\"loginForm\" (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 formControlName=\"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 formControlName=\"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: 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: "ngmodule", type: ReactiveFormsModule }, { 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.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: RiskFlexComponent, selector: "risk-flex", inputs: ["wrapContent"] }, { kind: "component", type: RiskFlexSpacerComponent, selector: "risk-flex-spacer" }, { kind: "component", type: RiskMessageComponent, selector: "risk-error, risk-good, risk-info, risk-message, risk-warn, risk-initial-load, risk-no-data, risk-update-failed", inputs: ["message"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
73
68
|
}
|
|
74
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
69
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: RiskLoginComponent, decorators: [{
|
|
75
70
|
type: Component,
|
|
76
|
-
args: [{ host: {
|
|
71
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
77
72
|
'[class.risk-login-form]': 'true'
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
73
|
+
}, imports: [
|
|
74
|
+
MatButton,
|
|
75
|
+
MatCard,
|
|
76
|
+
MatCardActions,
|
|
77
|
+
MatCardContent,
|
|
78
|
+
MatCardHeader,
|
|
79
|
+
MatCardTitle,
|
|
80
|
+
MatFormField,
|
|
81
|
+
MatIcon,
|
|
82
|
+
MatInput,
|
|
83
|
+
MatProgressSpinner,
|
|
84
|
+
ReactiveFormsModule,
|
|
85
|
+
RiskFlexComponent,
|
|
86
|
+
RiskFlexSpacerComponent,
|
|
87
|
+
RiskMessageComponent
|
|
88
|
+
], template: "<risk-flex>\n <risk-flex-spacer/>\n\n @if (isDirectFlow) {\n <div>\n @if (authStatus()) {\n @if (userProfile(); 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 [formGroup]=\"loginForm\" (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 formControlName=\"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 formControlName=\"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"] }]
|
|
89
|
+
}], ctorParameters: () => [] });
|
|
86
90
|
|
|
87
|
-
class
|
|
88
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
89
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
91
|
+
class RiskLoginMenuComponentTitleDirective {
|
|
92
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: RiskLoginMenuComponentTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
93
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: RiskLoginMenuComponentTitleDirective, isStandalone: true, selector: "risk-login-menu-title-horizontal, risk-login-menu-title-vertical", host: { properties: { "class.risk-login-menu-title": "true" } }, ngImport: i0 }); }
|
|
90
94
|
}
|
|
91
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: RiskLoginMenuComponentTitleDirective, decorators: [{
|
|
92
96
|
type: Directive,
|
|
93
97
|
args: [{
|
|
94
98
|
selector: 'risk-login-menu-title-horizontal, '
|
|
@@ -98,11 +102,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
98
102
|
}
|
|
99
103
|
}]
|
|
100
104
|
}] });
|
|
101
|
-
class
|
|
102
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
103
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
105
|
+
class RiskLoginMenuItemsDirective {
|
|
106
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: RiskLoginMenuItemsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
107
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: RiskLoginMenuItemsDirective, 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
108
|
}
|
|
105
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: RiskLoginMenuItemsDirective, decorators: [{
|
|
106
110
|
type: Directive,
|
|
107
111
|
args: [{
|
|
108
112
|
selector: 'risk-login-menu-before-items-horizontal,'
|
|
@@ -111,97 +115,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
111
115
|
+ 'risk-login-menu-after-items-vertical'
|
|
112
116
|
}]
|
|
113
117
|
}] });
|
|
114
|
-
class
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
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());
|
|
129
|
-
}
|
|
130
|
-
menuClosed() {
|
|
131
|
-
this.changeDetectorRef.markForCheck();
|
|
132
|
-
}
|
|
133
|
-
get authStatus() {
|
|
134
|
-
return this.authProvider.loggedIn;
|
|
118
|
+
class RiskLoginMenuComponent {
|
|
119
|
+
constructor() {
|
|
120
|
+
this.authProvider = inject(AUTH_PROVIDER);
|
|
121
|
+
this.authRoutingFlowService = inject(AuthRoutingFlowService);
|
|
122
|
+
this.orientation = input('row', ...(ngDevMode ? [{ debugName: "orientation" }] : []));
|
|
123
|
+
this.authStatus = toSignal(this.authProvider.loggedInStream);
|
|
135
124
|
}
|
|
136
125
|
logout() {
|
|
137
126
|
this.authRoutingFlowService.logout().pipe(first()).subscribe();
|
|
138
127
|
}
|
|
139
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
140
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
128
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: RiskLoginMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
129
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: RiskLoginMenuComponent, isStandalone: true, selector: "risk-login-menu", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.risk-login-menu": "true", "class.risk-login-menu-flex-row": "orientation() === \"row\"", "class.risk-login-menu-flex-column": "orientation() === \"column\"" } }, 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()) {\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 [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()) {\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: 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: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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: "directive", type: MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
141
130
|
}
|
|
142
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: RiskLoginMenuComponent, decorators: [{
|
|
143
132
|
type: Component,
|
|
144
|
-
args: [{ selector: 'risk-login-menu', host: {
|
|
145
|
-
'[class.risk-login-menu]': 'true'
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
type: HostBinding,
|
|
157
|
-
args: ['class.risk-login-menu-flex-column']
|
|
158
|
-
}] } });
|
|
159
|
-
|
|
160
|
-
class LoginModule {
|
|
161
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LoginModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
162
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", 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: "16.2.12", ngImport: i0, type: LoginModule, imports: [CommonModule,
|
|
173
|
-
FormsModule,
|
|
174
|
-
RouterModule,
|
|
175
|
-
AuthModule,
|
|
176
|
-
CommonViewModule] }); }
|
|
177
|
-
}
|
|
178
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", 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
|
-
}] });
|
|
133
|
+
args: [{ selector: 'risk-login-menu', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
134
|
+
'[class.risk-login-menu]': 'true',
|
|
135
|
+
'[class.risk-login-menu-flex-row]': 'orientation() === "row"',
|
|
136
|
+
'[class.risk-login-menu-flex-column]': 'orientation() === "column"'
|
|
137
|
+
}, imports: [
|
|
138
|
+
MatButton,
|
|
139
|
+
MatIcon,
|
|
140
|
+
MatMenu,
|
|
141
|
+
MatMenuItem,
|
|
142
|
+
MatMenuTrigger
|
|
143
|
+
], 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()) {\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 [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()) {\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"] }]
|
|
144
|
+
}], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }] } });
|
|
201
145
|
|
|
202
146
|
/**
|
|
203
147
|
* Generated bundle index. Do not edit.
|
|
204
148
|
*/
|
|
205
149
|
|
|
206
|
-
export {
|
|
150
|
+
export { RiskLoginComponent, RiskLoginMenuComponent, RiskLoginMenuComponentTitleDirective, RiskLoginMenuItemsDirective };
|
|
207
151
|
//# 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,C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
|
+
{"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 {ChangeDetectionStrategy, Component, inject, signal} from '@angular/core';\nimport {takeUntilDestroyed, toSignal} from '@angular/core/rxjs-interop';\nimport {FormControl, FormGroup, ReactiveFormsModule} 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 {RiskFlexComponent, RiskFlexSpacerComponent, RiskMessageComponent} from '@dbg-riskit/angular-view';\nimport {AuthProvider, UserInfo} from '@dbg-riskit/common';\nimport {first, switchMap} from 'rxjs/operators';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\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 imports: [\n MatButton,\n MatCard,\n MatCardActions,\n MatCardContent,\n MatCardHeader,\n MatCardTitle,\n MatFormField,\n MatIcon,\n MatInput,\n MatProgressSpinner,\n ReactiveFormsModule,\n RiskFlexComponent,\n RiskFlexSpacerComponent,\n RiskMessageComponent\n ]\n})\nexport class RiskLoginComponent {\n private readonly authProvider = inject<AuthProvider>(AUTH_PROVIDER);\n private readonly authRoutingFlowService = inject(AuthRoutingFlowService);\n private readonly secondaryLogo = inject(SECONDARY_LOGO);\n\n public readonly errorMessage = signal<string | undefined>(undefined);\n public readonly loggingIn = signal(false);\n\n public readonly loginForm = new FormGroup({\n username: new FormControl(''),\n password: new FormControl('')\n });\n\n public readonly authStatus = toSignal(this.authProvider.loggedInStream);\n public readonly userProfile = signal<UserInfo | undefined>(undefined);\n\n public get isDirectFlow(): boolean {\n return this.authRoutingFlowService.directFlow;\n }\n\n public get logo(): string {\n return this.secondaryLogo;\n }\n\n public constructor() {\n this.authRoutingFlowService.loginViaService().pipe(\n takeUntilDestroyed()\n ).subscribe({\n error: (err: ErrorTypes) => {\n this.errorMessage.set(toErrorMessage(err).message);\n }\n });\n\n this.authProvider.loggedInStream.pipe(\n takeUntilDestroyed(),\n switchMap(() => this.authProvider.userProfile)\n ).subscribe({\n next: (profile) => {\n this.userProfile.set(profile);\n }\n });\n }\n\n public login(): void {\n this.loggingIn.set(true);\n const username = this.loginForm.get('username')?.value ?? undefined;\n const password = this.loginForm.get('password')?.value ?? undefined;\n this.authRoutingFlowService.login(username, password).pipe(\n first()\n ).subscribe({\n next : (res: boolean) => {\n if (!res) {\n this.errorMessage.set('Authentication failed. Server did not generate a token.');\n }\n this.loggingIn.set(false);\n },\n error: () => {\n this.loggingIn.set(false);\n this.errorMessage.set('Authentication failed. Is the username and password correct?');\n }\n });\n }\n}\n","<risk-flex>\n <risk-flex-spacer/>\n\n @if (isDirectFlow) {\n <div>\n @if (authStatus()) {\n @if (userProfile(); 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 [formGroup]=\"loginForm\" (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 formControlName=\"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 formControlName=\"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 {ChangeDetectionStrategy, Component, Directive, inject, input} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\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 {AuthProvider} from '@dbg-riskit/common';\nimport {first} 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 RiskLoginMenuComponentTitleDirective {\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 RiskLoginMenuItemsDirective {\n}\n\n@Component({\n selector : 'risk-login-menu',\n changeDetection: ChangeDetectionStrategy.OnPush,\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 '[class.risk-login-menu-flex-row]' : 'orientation() === \"row\"',\n '[class.risk-login-menu-flex-column]': 'orientation() === \"column\"'\n },\n imports : [\n MatButton,\n MatIcon,\n MatMenu,\n MatMenuItem,\n MatMenuTrigger\n ]\n})\nexport class RiskLoginMenuComponent {\n private readonly authProvider = inject<AuthProvider>(AUTH_PROVIDER);\n private readonly authRoutingFlowService = inject(AuthRoutingFlowService);\n\n public readonly orientation = input<'row' | 'column'>('row');\n public readonly authStatus = toSignal(this.authProvider.loggedInStream);\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()) {\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 [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()) {\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":";;;;;;;;;;;;;;;;;;MA2Ca,kBAAkB,CAAA;AAgB3B,IAAA,IAAW,YAAY,GAAA;AACnB,QAAA,OAAO,IAAI,CAAC,sBAAsB,CAAC,UAAU;IACjD;AAEA,IAAA,IAAW,IAAI,GAAA;QACX,OAAO,IAAI,CAAC,aAAa;IAC7B;AAEA,IAAA,WAAA,GAAA;AAvBiB,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAe,aAAa,CAAC;AAClD,QAAA,IAAA,CAAA,sBAAsB,GAAG,MAAM,CAAC,sBAAsB,CAAC;AACvD,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,cAAc,CAAC;AAEvC,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAqB,SAAS,wDAAC;AACpD,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,KAAK,qDAAC;QAEzB,IAAA,CAAA,SAAS,GAAG,IAAI,SAAS,CAAC;AACtC,YAAA,QAAQ,EAAE,IAAI,WAAW,CAAC,EAAE,CAAC;AAC7B,YAAA,QAAQ,EAAE,IAAI,WAAW,CAAC,EAAE;AAC/B,SAAA,CAAC;QAEc,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,cAAc,CAAC;AACvD,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAA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X;AACH,qBAAA,EAAA,QAAA,EAAA,wlDAAA,EAAA,MAAA,EAAA,CAAA,yEAAA,EAAA,qMAAA,CAAA,EAAA;;;AEhDL;;AAEG;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { FormGroup, FormControl } from '@angular/forms';
|
|
3
|
+
import { UserInfo } from '@dbg-riskit/common';
|
|
4
|
+
|
|
5
|
+
declare class RiskLoginComponent {
|
|
6
|
+
private readonly authProvider;
|
|
7
|
+
private readonly authRoutingFlowService;
|
|
8
|
+
private readonly secondaryLogo;
|
|
9
|
+
readonly errorMessage: i0.WritableSignal<string | undefined>;
|
|
10
|
+
readonly loggingIn: i0.WritableSignal<boolean>;
|
|
11
|
+
readonly loginForm: FormGroup<{
|
|
12
|
+
username: FormControl<string | null>;
|
|
13
|
+
password: FormControl<string | null>;
|
|
14
|
+
}>;
|
|
15
|
+
readonly authStatus: i0.Signal<boolean | undefined>;
|
|
16
|
+
readonly userProfile: i0.WritableSignal<UserInfo | undefined>;
|
|
17
|
+
get isDirectFlow(): boolean;
|
|
18
|
+
get logo(): string;
|
|
19
|
+
constructor();
|
|
20
|
+
login(): void;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RiskLoginComponent, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RiskLoginComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare class RiskLoginMenuComponentTitleDirective {
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RiskLoginMenuComponentTitleDirective, never>;
|
|
27
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RiskLoginMenuComponentTitleDirective, "risk-login-menu-title-horizontal, risk-login-menu-title-vertical", never, {}, {}, never, never, true, never>;
|
|
28
|
+
}
|
|
29
|
+
declare class RiskLoginMenuItemsDirective {
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RiskLoginMenuItemsDirective, never>;
|
|
31
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RiskLoginMenuItemsDirective, "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>;
|
|
32
|
+
}
|
|
33
|
+
declare class RiskLoginMenuComponent {
|
|
34
|
+
private readonly authProvider;
|
|
35
|
+
private readonly authRoutingFlowService;
|
|
36
|
+
readonly orientation: i0.InputSignal<"row" | "column">;
|
|
37
|
+
readonly authStatus: i0.Signal<boolean | undefined>;
|
|
38
|
+
logout(): void;
|
|
39
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RiskLoginMenuComponent, never>;
|
|
40
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RiskLoginMenuComponent, "risk-login-menu", never, { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; }, {}, 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>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { RiskLoginComponent, RiskLoginMenuComponent, RiskLoginMenuComponentTitleDirective, RiskLoginMenuItemsDirective };
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dbg-riskit/angular-login",
|
|
3
|
-
"version": "9999.9999.9999-rc.
|
|
3
|
+
"version": "9999.9999.9999-rc.4579154",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@angular/core": "^
|
|
7
|
-
"@angular/forms": "^
|
|
8
|
-
"@angular/router": "^
|
|
9
|
-
"@dbg-riskit/common": "~9999.9999.9999-rc.
|
|
10
|
-
"@dbg-riskit/angular-auth": "~9999.9999.9999-rc.
|
|
11
|
-
"@dbg-riskit/angular-common": "~9999.9999.9999-rc.
|
|
12
|
-
"@dbg-riskit/angular-error": "~9999.9999.9999-rc.
|
|
13
|
-
"@dbg-riskit/angular-view": "~9999.9999.9999-rc.
|
|
14
|
-
"rxjs": "~7.8.
|
|
6
|
+
"@angular/core": "^20.3.15",
|
|
7
|
+
"@angular/forms": "^20.3.15",
|
|
8
|
+
"@angular/router": "^20.3.15",
|
|
9
|
+
"@dbg-riskit/common": "~9999.9999.9999-rc.4579154",
|
|
10
|
+
"@dbg-riskit/angular-auth": "~9999.9999.9999-rc.4579154",
|
|
11
|
+
"@dbg-riskit/angular-common": "~9999.9999.9999-rc.4579154",
|
|
12
|
+
"@dbg-riskit/angular-error": "~9999.9999.9999-rc.4579154",
|
|
13
|
+
"@dbg-riskit/angular-view": "~9999.9999.9999-rc.4579154",
|
|
14
|
+
"rxjs": "~7.8.2"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"tslib": "^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: "16.2.12", 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: "16.2.12", 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] ", inputs: ["disabled", "disableRipple", "color"], 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: "16.2.12", 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: function () { return [{ 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
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Y2hhbmdlXG4gICAgICAgIHRoaXMuYXV0aFByb3ZpZGVyLmxvZ2dlZEluU3RyZWFtLnBpcGUoXG4gICAgICAgICAgICB0YWtlVW50aWwodGhpcy5kZXN0cm95ZWQpXG4gICAgICAgICkuc3Vic2NyaWJlKCgpID0+IHRoaXMuY2hhbmdlRGV0ZWN0b3JSZWYubWFya0ZvckNoZWNrKCkpO1xuICAgIH1cblxuICAgIHB1YmxpYyBuZ0FmdGVyVmlld0luaXQoKTogdm9pZCB7XG4gICAgICAgIHRoaXMuYXV0aFJvdXRpbmdGbG93U2VydmljZS5sb2dpblZpYVNlcnZpY2UoKS5waXBlKFxuICAgICAgICAgICAgdGFrZVVudGlsKHRoaXMuZGVzdHJveWVkKVxuICAgICAgICApLnN1YnNjcmliZShcbiAgICAgICAgICAgICgpID0+IHtcbiAgICAgICAgICAgICAgICB0aGlzLmNoYW5nZURldGVjdG9yUmVmLm1hcmtGb3JDaGVjaygpO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIChlcnI6IEVycm9yVHlwZXMpID0+IHtcbiAgICAgICAgICAgICAgICB0aGlzLmVycm9yTWVzc2FnZSA9IHRvRXJyb3JNZXNzYWdlKGVycikubWVzc2FnZTtcbiAgICAgICAgICAgICAgICB0aGlzLmNoYW5nZURldGVjdG9yUmVmLm1hcmtGb3JDaGVjaygpO1xuICAgICAgICAgICAgfVxuICAgICAgICApO1xuICAgIH1cblxuICAgIHB1YmxpYyBnZXQgaXNEaXJlY3RGbG93KCk6IGJvb2xlYW4ge1xuICAgICAgICByZXR1cm4gdGhpcy5hdXRoUm91dGluZ0Zsb3dTZXJ2aWNlLmRpcmVjdEZsb3c7XG4gICAgfVxuXG4gICAgcHVibGljIGdldCBhdXRoU3RhdHVzKCk6IE9ic2VydmFibGU8Ym9vbGVhbj4ge1xuICAgICAgICByZXR1cm4gdGhpcy5hdXRoUHJvdmlkZXIubG9nZ2VkSW47XG4gICAgfVxuXG4gICAgcHVibGljIGdldCB1c2Vy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yBnZXQgbG9nbygpOiBzdHJpbmcge1xuICAgICAgICByZXR1cm4gdGhpcy5zZWNvbmRhcnlMb2dvO1xuICAgIH1cbn1cbiIsIjxyaXNrLWZsZXg+XG4gICAgPHJpc2stZmxleC1zcGFjZXI+PC9yaXNrLWZsZXgtc3BhY2VyPlxuXG4gICAgPGRpdiAqbmdJZj1cImlzRGlyZWN0Rmxvd1wiPlxuICAgICAgICA8bmctdGVtcGxhdGUgI2xvZ2dlZE91dD5cbiAgICAgICAgICAgIDxyaXNrLWVycm9yICpuZ0lmPVwiZXJyb3JNZXNzYWdlXCIgW21lc3NhZ2VdPVwiZXJyb3JNZXNzYWdlXCI+PC9yaXNrLWVycm9yPlxuXG4gICAgICAgICAgICA8Zm9ybSAobmdTdWJtaXQpPVwibG9naW4oKVwiIHJvbGU9XCJmb3JtXCI+XG4gICAgICAgICAgICAgICAgPG1hdC1jYXJkPlxuICAgICAgICAgICAgICAgICAgICA8bWF0LWNhcmQtaGVhZGVyPlxuICAgICAgICAgICAgICAgICAgICAgICAgPG1hdC1jYXJkLXRpdGxlPlBsZWFzZSBTaWduIEluPC9tYXQtY2FyZC10aXRsZT5cbiAgICAgICAgICAgICAgICAgICAgPC9tYXQtY2FyZC1oZWFkZXI+XG4gICAgICAgICAgICAgICAgICAgIDxtYXQtY2FyZC1jb250ZW50PlxuICAgICAgICAgICAgICAgICAgICAgICAgPG1hdC1mb3JtLWZpZWxkIGNsYXNzPVwicmlzay1mdWxsLXdpZHRoXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPGlucHV0IG1hdElucHV0XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU9XCJ0ZXh0XCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxhY2Vob2xkZXI9XCJVc2VybmFtZVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU9XCJ1c2VybmFtZVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFsobmdNb2RlbCldPVwidXNlcm5hbWVcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdXRvZm9jdXM+XG4gICAgICAgICAgICAgICAgICAgICAgICA8L21hdC1mb3JtLWZpZWxkPlxuICAgICAgICAgICAgICAgICAgICAgICAgPG1hdC1mb3JtLWZpZWxkIGNsYXNzPVwicmlzay1mdWxsLXdpZHRoXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPGlucHV0IG1hdElucHV0XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU9XCJwYXNzd29yZFwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYWNlaG9sZGVyPVwiUGFzc3dvcmRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lPVwicGFzc3dvcmRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbKG5nTW9kZWwpXT1cInBhc3N3b3JkXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICA8L21hdC1mb3JtLWZpZWxkPlxuICAgICAgICAgICAgICAgICAgICA8L21hdC1jYXJkLWNvbnRlbnQ+XG4gICAgICAgICAgICAgICAgICAgIDxtYXQtY2FyZC1hY3Rpb25zPlxuICAgICAgICAgICAgICAgICAgICAgICAgPGJ1dHRvbiAqbmdJZj1cIiFsb2dnaW5nSW5cIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXQtcmFpc2VkLWJ1dHRvblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvcj1cInByaW1hcnlcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlPVwic3VibWl0XCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgU2lnbiBpblxuICAgICAgICAgICAgICAgICAgICAgICAgPC9idXR0b24+XG4gICAgICAgICAgICAgICAgICAgICAgICA8bWF0LXNwaW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CJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yPVwicHJpbWFyeVwiXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlPVwiYnV0dG9uXCI+XG4gICAgICAgICAgICAgICAgICAgIDxtYXQtaWNvbj5hdXRvcmVuZXc8L21hdC1pY29uPlxuICAgICAgICAgICAgICAgICAgICBSZXRyeVxuICAgICAgICAgICAgICAgIDwvYnV0dG9uPlxuICAgICAgICAgICAgICAgIDxkaXY+PC9kaXY+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgPC9uZy10ZW1wbGF0ZT5cbiAgICA8L2Rpdj5cblxuICAgIDxyaXNrLWZsZXgtc3BhY2VyPjwvcmlzay1mbGV4LXNwYWNlcj5cbjwvcmlzay1mbGV4PlxuIl19
|
|
@@ -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: "16.2.12", ngImport: i0, type: LoginMenuComponentTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
13
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", 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: "16.2.12", 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: "16.2.12", ngImport: i0, type: LoginMenuItemsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
27
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", 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: "16.2.12", 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: "16.2.12", 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: "16.2.12", 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]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], 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", exportAs: ["matMenu"] }, { kind: "component", type: i5.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i5.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
65
|
-
}
|
|
66
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", 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: function () { return [{ 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9naW4ubWVudS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wa2cvZGJnLXJpc2tpdC9hbmd1bGFyLWxvZ2luL3NyYy9saWIvbG9naW4ubWVudS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9wa2cvZGJnLXJpc2tpdC9hbmd1bGFyLWxvZ2luL3NyYy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ctdGVtcGxhdGU+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: "16.2.12", ngImport: i0, type: LoginModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
12
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", 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: "16.2.12", ngImport: i0, type: LoginModule, imports: [CommonModule,
|
|
23
|
-
FormsModule,
|
|
24
|
-
RouterModule,
|
|
25
|
-
AuthModule,
|
|
26
|
-
CommonViewModule] }); }
|
|
27
|
-
}
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", 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
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mV9IGZyb20gJy4vbG9naW4ubWVudS5jb21wb25lbnQnO1xuXG5ATmdNb2R1bGUoe1xuICAgIGltcG9ydHMgICAgIDogW1xuICAgICAgICBDb21tb25Nb2R1bGUsXG4gICAgICAgIEZvcm1zTW9kdWxlLFxuICAgICAgICBSb3V0ZXJNb2R1bGUsXG4gICAgICAgIEF1dGhNb2R1bGUsXG4gICAgICAgIENvbW1vblZpZXdNb2R1bGVcbiAgICBdLFxuICAgIGRlY2xhcmF0aW9uczogW1xuICAgICAgICBMb2dpbk1lbnVDb21wb25lbnQsXG4gICAgICAgIExvZ2luQ29tcG9uZW50LFxuICAgICAgICBMb2dpbk1lbnVDb21wb25lbnRUaXRsZURpcmVjdGl2ZSxcbiAgICAgICAgTG9naW5NZW51SXRlbXNEaXJlY3RpdmVcbiAgICBdLFxuICAgIGV4cG9ydHMgICAgIDogW1xuICAgICAgICBMb2dpbk1lbnVDb21wb25lbnQsXG4gICAgICAgIExvZ2luTWVudUNvbXBvbmVudFRpdGxlRGlyZWN0aXZlLFxuICAgICAgICBMb2dpbk1lbnVJdGVtc0RpcmVjdGl2ZVxuICAgIF1cbn0pXG5leHBvcnQgY2xhc3MgTG9naW5Nb2R1bGUge1xufVxuIl19
|
package/esm2022/public_api.mjs
DELETED
|
@@ -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==
|
package/lib/login.component.d.ts
DELETED
|
@@ -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
|
-
}
|
package/lib/login.module.d.ts
DELETED
|
@@ -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