@bitblit/ngx-acute-warden 5.0.545-alpha
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/CHANGELOG.md +1 -0
- package/License.txt +13 -0
- package/README.md +7 -0
- package/lib/build/ngx-acute-warden-info.d.ts +5 -0
- package/lib/build/ngx-acute-warden-info.js +15 -0
- package/lib/build/ngx-acute-warden-info.js.map +1 -0
- package/lib/components/create-user/create-user.component.d.ts +22 -0
- package/lib/components/create-user/create-user.component.js +174 -0
- package/lib/components/create-user/create-user.component.js.map +1 -0
- package/lib/components/login/login.component.d.ts +39 -0
- package/lib/components/login/login.component.js +296 -0
- package/lib/components/login/login.component.js.map +1 -0
- package/lib/components/magic-lander/magic-lander.component.d.ts +16 -0
- package/lib/components/magic-lander/magic-lander.component.js +95 -0
- package/lib/components/magic-lander/magic-lander.component.js.map +1 -0
- package/lib/components/user-profile/user-profile.component.d.ts +12 -0
- package/lib/components/user-profile/user-profile.component.js +70 -0
- package/lib/components/user-profile/user-profile.component.js.map +1 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.js +7 -0
- package/lib/index.js.map +1 -0
- package/lib/services/warden-adapter.service.d.ts +15 -0
- package/lib/services/warden-adapter.service.js +34 -0
- package/lib/services/warden-adapter.service.js.map +1 -0
- package/package.json +77 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#TODO
|
package/License.txt
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Copyright 2018-2024 Christopher Weiss
|
|
2
|
+
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export class NgxAcuteWardenInfo {
|
|
2
|
+
constructor() { }
|
|
3
|
+
static buildInformation() {
|
|
4
|
+
const val = {
|
|
5
|
+
version: 'LOCAL-SNAPSHOT',
|
|
6
|
+
hash: 'LOCAL-HASH',
|
|
7
|
+
branch: 'LOCAL-BRANCH',
|
|
8
|
+
tag: 'LOCAL-TAG',
|
|
9
|
+
timeBuiltISO: 'LOCAL-TIME-ISO',
|
|
10
|
+
notes: 'LOCAL-NOTES',
|
|
11
|
+
};
|
|
12
|
+
return val;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=ngx-acute-warden-info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-acute-warden-info.js","sourceRoot":"","sources":["../../src/build/ngx-acute-warden-info.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,kBAAkB;IAG7B,gBAAuB,CAAC;IAEjB,MAAM,CAAC,gBAAgB;QAC5B,MAAM,GAAG,GAAqB;YAC5B,OAAO,EAAE,gBAAgB;YACzB,IAAI,EAAE,YAAY;YAClB,MAAM,EAAE,cAAc;YACtB,GAAG,EAAE,WAAW;YAChB,YAAY,EAAE,gBAAgB;YAC9B,KAAK,EAAE,aAAa;SACrB,CAAC;QACF,OAAO,GAAG,CAAC;IACb,CAAC;CACF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
|
+
import { WardenClient } from "@bitblit/ratchet-warden-common/client/warden-client";
|
|
4
|
+
import { AbstractControl, FormBuilder, FormGroup } from '@angular/forms';
|
|
5
|
+
import { DialogService } from "primeng/dynamicdialog";
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class CreateUserComponent implements OnInit {
|
|
8
|
+
private route;
|
|
9
|
+
private router;
|
|
10
|
+
private wardenClient;
|
|
11
|
+
private fb;
|
|
12
|
+
private dlgService;
|
|
13
|
+
form: FormGroup;
|
|
14
|
+
userContactTypes: string[];
|
|
15
|
+
constructor(route: ActivatedRoute, router: Router, wardenClient: WardenClient, fb: FormBuilder, dlgService: DialogService);
|
|
16
|
+
f(name: string): AbstractControl;
|
|
17
|
+
go(): void;
|
|
18
|
+
ngOnInit(): void;
|
|
19
|
+
createUser(): Promise<void>;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CreateUserComponent, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CreateUserComponent, "ngx-acute-warden-create-user", never, {}, {}, never, never, true, never>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { ActivatedRoute, Router, RouterModule } from '@angular/router';
|
|
3
|
+
import { Logger } from '@bitblit/ratchet-common/logger/logger';
|
|
4
|
+
import { WardenClient } from "@bitblit/ratchet-warden-common/client/warden-client";
|
|
5
|
+
import { No } from "@bitblit/ratchet-common/lang/no";
|
|
6
|
+
import { StringRatchet } from "@bitblit/ratchet-common/lang/string-ratchet";
|
|
7
|
+
import { FormBuilder, FormsModule, ReactiveFormsModule, Validators } from '@angular/forms';
|
|
8
|
+
import { WardenContactType } from "@bitblit/ratchet-warden-common/common/model/warden-contact-type";
|
|
9
|
+
import { EnumRatchet } from "@bitblit/ratchet-common/lang/enum-ratchet";
|
|
10
|
+
import { MessagesModule } from "primeng/messages";
|
|
11
|
+
import { CommonModule } from "@angular/common";
|
|
12
|
+
import { CardModule } from "primeng/card";
|
|
13
|
+
import { ButtonModule } from "primeng/button";
|
|
14
|
+
import { DropdownModule } from "primeng/dropdown";
|
|
15
|
+
import { AlertComponent } from "@bitblit/ngx-acute-common";
|
|
16
|
+
import { DialogService } from "primeng/dynamicdialog";
|
|
17
|
+
import { Ripple } from "primeng/ripple";
|
|
18
|
+
import { InputTextModule } from "primeng/inputtext";
|
|
19
|
+
import * as i0 from "@angular/core";
|
|
20
|
+
import * as i1 from "@angular/router";
|
|
21
|
+
import * as i2 from "@bitblit/ratchet-warden-common/client/warden-client";
|
|
22
|
+
import * as i3 from "@angular/forms";
|
|
23
|
+
import * as i4 from "primeng/dynamicdialog";
|
|
24
|
+
import * as i5 from "@angular/common";
|
|
25
|
+
import * as i6 from "primeng/card";
|
|
26
|
+
import * as i7 from "primeng/button";
|
|
27
|
+
import * as i8 from "primeng/dropdown";
|
|
28
|
+
import * as i9 from "primeng/inputtext";
|
|
29
|
+
const _c0 = () => ({ "min-width": "50%" });
|
|
30
|
+
function CreateUserComponent_ng_container_12_span_1_Template(rf, ctx) { if (rf & 1) {
|
|
31
|
+
i0.ɵɵelementStart(0, "span", 13);
|
|
32
|
+
i0.ɵɵtext(1, "Contact is Required");
|
|
33
|
+
i0.ɵɵelementEnd();
|
|
34
|
+
} }
|
|
35
|
+
function CreateUserComponent_ng_container_12_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
36
|
+
i0.ɵɵelementStart(0, "span", 13);
|
|
37
|
+
i0.ɵɵtext(1, "Please enter a valid email address");
|
|
38
|
+
i0.ɵɵelementEnd();
|
|
39
|
+
} }
|
|
40
|
+
function CreateUserComponent_ng_container_12_Template(rf, ctx) { if (rf & 1) {
|
|
41
|
+
i0.ɵɵelementContainerStart(0);
|
|
42
|
+
i0.ɵɵtemplate(1, CreateUserComponent_ng_container_12_span_1_Template, 2, 0, "span", 12)(2, CreateUserComponent_ng_container_12_span_2_Template, 2, 0, "span", 12);
|
|
43
|
+
i0.ɵɵelementContainerEnd();
|
|
44
|
+
} if (rf & 2) {
|
|
45
|
+
let tmp_1_0;
|
|
46
|
+
let tmp_2_0;
|
|
47
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
48
|
+
i0.ɵɵadvance();
|
|
49
|
+
i0.ɵɵproperty("ngIf", (tmp_1_0 = ctx_r0.f("userContactValue").errors) == null ? null : tmp_1_0["required"]);
|
|
50
|
+
i0.ɵɵadvance();
|
|
51
|
+
i0.ɵɵproperty("ngIf", (tmp_2_0 = ctx_r0.f("userContactValue").errors) == null ? null : tmp_2_0["email"]);
|
|
52
|
+
} }
|
|
53
|
+
function CreateUserComponent_ng_container_17_span_1_Template(rf, ctx) { if (rf & 1) {
|
|
54
|
+
i0.ɵɵelementStart(0, "span", 13);
|
|
55
|
+
i0.ɵɵtext(1, "Full name is Required");
|
|
56
|
+
i0.ɵɵelementEnd();
|
|
57
|
+
} }
|
|
58
|
+
function CreateUserComponent_ng_container_17_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
59
|
+
i0.ɵɵelementStart(0, "span", 13);
|
|
60
|
+
i0.ɵɵtext(1, "Please enter a longer name");
|
|
61
|
+
i0.ɵɵelementEnd();
|
|
62
|
+
} }
|
|
63
|
+
function CreateUserComponent_ng_container_17_span_3_Template(rf, ctx) { if (rf & 1) {
|
|
64
|
+
i0.ɵɵelementStart(0, "span", 13);
|
|
65
|
+
i0.ɵɵtext(1, "Please enter a shorter name");
|
|
66
|
+
i0.ɵɵelementEnd();
|
|
67
|
+
} }
|
|
68
|
+
function CreateUserComponent_ng_container_17_Template(rf, ctx) { if (rf & 1) {
|
|
69
|
+
i0.ɵɵelementContainerStart(0);
|
|
70
|
+
i0.ɵɵtemplate(1, CreateUserComponent_ng_container_17_span_1_Template, 2, 0, "span", 12)(2, CreateUserComponent_ng_container_17_span_2_Template, 2, 0, "span", 12)(3, CreateUserComponent_ng_container_17_span_3_Template, 2, 0, "span", 12);
|
|
71
|
+
i0.ɵɵelementContainerEnd();
|
|
72
|
+
} if (rf & 2) {
|
|
73
|
+
let tmp_1_0;
|
|
74
|
+
let tmp_2_0;
|
|
75
|
+
let tmp_3_0;
|
|
76
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
77
|
+
i0.ɵɵadvance();
|
|
78
|
+
i0.ɵɵproperty("ngIf", (tmp_1_0 = ctx_r0.f("userFullName").errors) == null ? null : tmp_1_0["required"]);
|
|
79
|
+
i0.ɵɵadvance();
|
|
80
|
+
i0.ɵɵproperty("ngIf", (tmp_2_0 = ctx_r0.f("userFullName").errors) == null ? null : tmp_2_0["minlength"]);
|
|
81
|
+
i0.ɵɵadvance();
|
|
82
|
+
i0.ɵɵproperty("ngIf", (tmp_3_0 = ctx_r0.f("userFullName").errors) == null ? null : tmp_3_0["maxlength"]);
|
|
83
|
+
} }
|
|
84
|
+
export class CreateUserComponent {
|
|
85
|
+
route;
|
|
86
|
+
router;
|
|
87
|
+
wardenClient;
|
|
88
|
+
fb;
|
|
89
|
+
dlgService;
|
|
90
|
+
form;
|
|
91
|
+
userContactTypes = [StringRatchet.safeString(WardenContactType.EmailAddress)];
|
|
92
|
+
constructor(route, router, wardenClient, fb, dlgService) {
|
|
93
|
+
this.route = route;
|
|
94
|
+
this.router = router;
|
|
95
|
+
this.wardenClient = wardenClient;
|
|
96
|
+
this.fb = fb;
|
|
97
|
+
this.dlgService = dlgService;
|
|
98
|
+
this.form = this.fb.group({
|
|
99
|
+
userFullName: [null, Validators.compose([Validators.required, Validators.minLength(2), Validators.maxLength(35)])],
|
|
100
|
+
userContactValue: [null, Validators.compose([Validators.required, Validators.email])],
|
|
101
|
+
userContactType: [StringRatchet.safeString(WardenContactType.EmailAddress), Validators.compose([Validators.required])],
|
|
102
|
+
}, { validators: [] });
|
|
103
|
+
}
|
|
104
|
+
f(name) {
|
|
105
|
+
return this.form.controls[name];
|
|
106
|
+
}
|
|
107
|
+
go() {
|
|
108
|
+
Logger.info('Errors: %j : %j : %j', this.form.errors, this.f('userContactValue').errors, this.f('userContactValue').dirty);
|
|
109
|
+
}
|
|
110
|
+
ngOnInit() {
|
|
111
|
+
Logger.info('ngi: %j', this.route.queryParamMap);
|
|
112
|
+
}
|
|
113
|
+
async createUser() {
|
|
114
|
+
try {
|
|
115
|
+
const type = EnumRatchet.keyToEnum(WardenContactType, this.form.controls['userContactType'].value, false);
|
|
116
|
+
if (StringRatchet.trimToNull(this.form.controls['userContactValue'].value) &&
|
|
117
|
+
StringRatchet.trimToNull(this.form.controls['userFullName'].value) &&
|
|
118
|
+
type) {
|
|
119
|
+
const userId = await this.wardenClient.createAccount({ type: type, value: this.form.controls['userContactValue'].value }, true, this.form.controls['userFullName'].value, []);
|
|
120
|
+
Logger.info('Got user id %s', userId);
|
|
121
|
+
this.router.navigate(['/public/login']).then(No.op);
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
AlertComponent.showAlert(this.dlgService, 'Missing data');
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
catch (err) {
|
|
128
|
+
AlertComponent.showAlert(this.dlgService, 'Failed: ' + err);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
static ɵfac = function CreateUserComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CreateUserComponent)(i0.ɵɵdirectiveInject(i1.ActivatedRoute), i0.ɵɵdirectiveInject(i1.Router), i0.ɵɵdirectiveInject(i2.WardenClient), i0.ɵɵdirectiveInject(i3.FormBuilder), i0.ɵɵdirectiveInject(i4.DialogService)); };
|
|
132
|
+
static ɵcmp = i0.ɵɵdefineComponent({ type: CreateUserComponent, selectors: [["ngx-acute-warden-create-user"]], standalone: true, features: [i0.ɵɵStandaloneFeature], decls: 23, vars: 7, consts: [[1, "row"], ["header", "Create User"], [3, "formGroup"], [2, "display", "flex", "flex-direction", "column"], [1, "p-inputgroup"], [1, "p-inputgroup-addon"], ["formControlName", "userContactType", "id", "userContactType", 3, "options"], ["pInputText", "", "formControlName", "userContactValue", "placeholder", "e.g., test@test.com", "id", "userContactValue"], [4, "ngIf"], ["pInputText", "", "formControlName", "userFullName", "id", "userFullName", "placeholder", "e.g., Tom Smith"], ["pRipple", "", "styleClass", "p-button-raised", 3, "click"], ["pRipple", "", "styleClass", "p-button-raised", "routerLink", "/public/login"], ["style", "color:red", 4, "ngIf"], [2, "color", "red"]], template: function CreateUserComponent_Template(rf, ctx) { if (rf & 1) {
|
|
133
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "p-card", 1)(2, "form", 2)(3, "div", 3)(4, "div", 4)(5, "label", 5);
|
|
134
|
+
i0.ɵɵtext(6, "Contact Type");
|
|
135
|
+
i0.ɵɵelementEnd();
|
|
136
|
+
i0.ɵɵelement(7, "p-dropdown", 6);
|
|
137
|
+
i0.ɵɵelementEnd();
|
|
138
|
+
i0.ɵɵelementStart(8, "div", 4)(9, "span", 5);
|
|
139
|
+
i0.ɵɵtext(10, "Contact");
|
|
140
|
+
i0.ɵɵelementEnd();
|
|
141
|
+
i0.ɵɵelement(11, "input", 7);
|
|
142
|
+
i0.ɵɵtemplate(12, CreateUserComponent_ng_container_12_Template, 3, 2, "ng-container", 8);
|
|
143
|
+
i0.ɵɵelementEnd();
|
|
144
|
+
i0.ɵɵelementStart(13, "div", 4)(14, "span", 5);
|
|
145
|
+
i0.ɵɵtext(15, "Full name");
|
|
146
|
+
i0.ɵɵelementEnd();
|
|
147
|
+
i0.ɵɵelement(16, "input", 9);
|
|
148
|
+
i0.ɵɵtemplate(17, CreateUserComponent_ng_container_17_Template, 4, 3, "ng-container", 8);
|
|
149
|
+
i0.ɵɵelementEnd()();
|
|
150
|
+
i0.ɵɵelementStart(18, "div")(19, "p-button", 10);
|
|
151
|
+
i0.ɵɵlistener("click", function CreateUserComponent_Template_p_button_click_19_listener() { return ctx.createUser(); });
|
|
152
|
+
i0.ɵɵtext(20, "Create user");
|
|
153
|
+
i0.ɵɵelementEnd();
|
|
154
|
+
i0.ɵɵelementStart(21, "p-button", 11);
|
|
155
|
+
i0.ɵɵtext(22, "Cancel");
|
|
156
|
+
i0.ɵɵelementEnd()()()()();
|
|
157
|
+
} if (rf & 2) {
|
|
158
|
+
i0.ɵɵadvance(2);
|
|
159
|
+
i0.ɵɵproperty("formGroup", ctx.form);
|
|
160
|
+
i0.ɵɵadvance(5);
|
|
161
|
+
i0.ɵɵstyleMap(i0.ɵɵpureFunction0(6, _c0));
|
|
162
|
+
i0.ɵɵproperty("options", ctx.userContactTypes);
|
|
163
|
+
i0.ɵɵadvance(5);
|
|
164
|
+
i0.ɵɵproperty("ngIf", ctx.f("userContactValue").dirty);
|
|
165
|
+
i0.ɵɵadvance(5);
|
|
166
|
+
i0.ɵɵproperty("ngIf", ctx.f("userFullName").dirty);
|
|
167
|
+
} }, dependencies: [MessagesModule, RouterModule, i1.RouterLink, FormsModule, i3.ɵNgNoValidate, i3.DefaultValueAccessor, i3.NgControlStatus, i3.NgControlStatusGroup, ReactiveFormsModule, i3.FormGroupDirective, i3.FormControlName, CommonModule, i5.NgIf, CardModule, i6.Card, ButtonModule, i7.Button, DropdownModule, i8.Dropdown, Ripple, InputTextModule, i9.InputText], encapsulation: 2 });
|
|
168
|
+
}
|
|
169
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CreateUserComponent, [{
|
|
170
|
+
type: Component,
|
|
171
|
+
args: [{ selector: 'ngx-acute-warden-create-user', standalone: true, imports: [MessagesModule, RouterModule, FormsModule, ReactiveFormsModule, CommonModule, CardModule, ButtonModule, DropdownModule, Ripple, InputTextModule], template: "<div class=\"row\">\n <p-card header=\"Create User\">\n <form [formGroup]=\"form\">\n <div style=\"display: flex; flex-direction: column\">\n <div class=\"p-inputgroup\">\n <label class=\"p-inputgroup-addon\">Contact Type</label>\n <p-dropdown [options]=\"userContactTypes\" formControlName=\"userContactType\"\n id=\"userContactType\"\n [style]=\"{'min-width':'50%'}\"></p-dropdown>\n </div>\n <div class=\"p-inputgroup\">\n <span class=\"p-inputgroup-addon\">Contact</span>\n <input pInputText formControlName=\"userContactValue\" placeholder=\"e.g., test@test.com\" id=\"userContactValue\"\n >\n <ng-container *ngIf=\"f('userContactValue').dirty\">\n <span style=\"color:red\" *ngIf=\"f('userContactValue').errors?.['required']\">Contact is Required</span>\n <span style=\"color:red\" *ngIf=\"f('userContactValue').errors?.['email']\">Please enter a valid email address</span>\n </ng-container>\n </div>\n <div class=\"p-inputgroup\">\n <span class=\"p-inputgroup-addon\">Full name</span>\n <input pInputText formControlName=\"userFullName\" id=\"userFullName\" placeholder=\"e.g., Tom Smith\">\n <ng-container *ngIf=\"f('userFullName').dirty\">\n <span style=\"color:red\" *ngIf=\"f('userFullName').errors?.['required']\">Full name is Required</span>\n <span style=\"color:red\" *ngIf=\"f('userFullName').errors?.['minlength']\">Please enter a longer name</span>\n <span style=\"color:red\" *ngIf=\"f('userFullName').errors?.['maxlength']\">Please enter a shorter name</span>\n </ng-container>\n </div>\n </div>\n <div>\n <p-button pRipple styleClass=\"p-button-raised\" (click)=\"createUser()\">Create user</p-button>\n <p-button pRipple styleClass=\"p-button-raised\" routerLink=\"/public/login\">Cancel</p-button>\n </div>\n </form>\n </p-card>\n\n</div>\n" }]
|
|
172
|
+
}], () => [{ type: i1.ActivatedRoute }, { type: i1.Router }, { type: i2.WardenClient }, { type: i3.FormBuilder }, { type: i4.DialogService }], null); })();
|
|
173
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CreateUserComponent, { className: "CreateUserComponent", filePath: "components/create-user/create-user.component.ts", lineNumber: 27 }); })();
|
|
174
|
+
//# sourceMappingURL=create-user.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-user.component.js","sourceRoot":"","sources":["../../../src/components/create-user/create-user.component.ts","../../../src/components/create-user/create-user.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAS,MAAM,eAAe,CAAC;AAChD,OAAO,EAAC,cAAc,EAAE,MAAM,EAAE,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAErE,OAAO,EAAC,MAAM,EAAC,MAAM,uCAAuC,CAAC;AAC7D,OAAO,EAAC,YAAY,EAAC,MAAM,qDAAqD,CAAC;AACjF,OAAO,EAAC,EAAE,EAAC,MAAM,i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I,CAAC,UAAU,EAAE,UAAU,GAAG,GAAG,CAAC,CAAC;QAC9D,CAAC;IACH,CAAC;6GA5DU,mBAAmB;+CAAnB,mBAAmB;YCrBhB,AADJ,AADJ,AADA,AADJ,AADJ,8BAAiB,gBACgB,cACC,aACyB,aACrB,eACY;YAAA,4BAAY;YAAA,iBAAQ;YACtD,gCAEuD;YAC3D,iBAAM;YAEF,AADJ,8BAA0B,cACW;YAAA,wBAAO;YAAA,iBAAO;YAC/C,4BACC;YACD,wFAAkD;YAItD,iBAAM;YAEF,AADJ,+BAA0B,eACW;YAAA,0BAAS;YAAA,iBAAO;YACjD,4BAAiG;YACjG,wFAA8C;YAMtD,AADI,iBAAM,EACJ;YAEF,AADJ,4BAAK,oBACqE;YAAvB,mGAAS,gBAAY,IAAC;YAAC,4BAAW;YAAA,iBAAW;YAC5F,qCAA0E;YAAA,uBAAM;YAK5F,AAFI,AADI,AADA,AADoF,iBAAW,EACzF,EACC,EACF,EAEP;;YAlCS,eAAkB;YAAlB,oCAAkB;YAML,eAA6B;YAA7B,yCAA6B;YAF7B,8CAA4B;YAQzB,eAAiC;YAAjC,sDAAiC;YAQjC,eAA6B;YAA7B,kDAA6B;4BDEhD,cAAc,EAAE,YAAY,iBAAE,WAAW,0FAAE,mBAAmB,6CAAE,YAAY,WAAE,UAAU,WAAE,YAAY,aAAE,cAAc,eAAE,MAAM,EAAE,eAAe;;iFAE9I,mBAAmB;cAN/B,SAAS;2BACE,8BAA8B,cAE5B,IAAI,WACP,CAAC,cAAc,EAAE,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,EAAE,eAAe,CAAC;;kFAE/I,mBAAmB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
|
+
import { WardenClient } from "@bitblit/ratchet-warden-common/client/warden-client";
|
|
4
|
+
import { WardenUserService } from "@bitblit/ratchet-warden-common/client/warden-user-service";
|
|
5
|
+
import { WardenContact } from "@bitblit/ratchet-warden-common/common/model/warden-contact";
|
|
6
|
+
import { WardenRecentLoginDescriptor } from "@bitblit/ratchet-warden-common/client/provider/warden-recent-login-descriptor";
|
|
7
|
+
import { WindowRefService } from "@bitblit/ngx-acute-common";
|
|
8
|
+
import { DialogService } from "primeng/dynamicdialog";
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
export declare class LoginComponent implements OnInit {
|
|
11
|
+
private route;
|
|
12
|
+
private router;
|
|
13
|
+
userService: WardenUserService<any>;
|
|
14
|
+
wardenClient: WardenClient;
|
|
15
|
+
private win;
|
|
16
|
+
private dlgService;
|
|
17
|
+
showCodeCard: boolean;
|
|
18
|
+
verificationCode: string;
|
|
19
|
+
waitingContact: WardenContact;
|
|
20
|
+
newContactValue: string;
|
|
21
|
+
constructor(route: ActivatedRoute, router: Router, userService: WardenUserService<any>, wardenClient: WardenClient, win: WindowRefService, dlgService: DialogService);
|
|
22
|
+
userById(index: number, ld: WardenRecentLoginDescriptor): string;
|
|
23
|
+
contactByName(index: number, contact: WardenContact): string;
|
|
24
|
+
get hasRecentLogins(): boolean;
|
|
25
|
+
get recentLogins(): WardenRecentLoginDescriptor[];
|
|
26
|
+
clearSavedLogins(): void;
|
|
27
|
+
ngOnInit(): void;
|
|
28
|
+
goToDashboard(): void;
|
|
29
|
+
sendCodeToNewContact(value: string): Promise<void>;
|
|
30
|
+
sendCodeToContact(contact: WardenContact): Promise<void>;
|
|
31
|
+
submitVerificationCode(input: string, verificationCode: string): Promise<void>;
|
|
32
|
+
processWebAuthnLogin(userId: string): Promise<void>;
|
|
33
|
+
sendMagicLink(contact: WardenContact): Promise<void>;
|
|
34
|
+
removeSingleLogin(userId: string): void;
|
|
35
|
+
toggleCard(clearCode: boolean): void;
|
|
36
|
+
contactValueInvalidAndDirty(): boolean;
|
|
37
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoginComponent, never>;
|
|
38
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LoginComponent, "ngx-acute-warden-login", never, {}, {}, never, never, true, never>;
|
|
39
|
+
}
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { ActivatedRoute, Router, RouterModule } from '@angular/router';
|
|
3
|
+
import { Logger } from '@bitblit/ratchet-common/logger/logger';
|
|
4
|
+
import { WardenClient } from "@bitblit/ratchet-warden-common/client/warden-client";
|
|
5
|
+
import { WardenUserService } from "@bitblit/ratchet-warden-common/client/warden-user-service";
|
|
6
|
+
import { No } from "@bitblit/ratchet-common/lang/no";
|
|
7
|
+
import { StringRatchet } from "@bitblit/ratchet-common/lang/string-ratchet";
|
|
8
|
+
import { WardenUtils } from "@bitblit/ratchet-warden-common/common/util/warden-utils";
|
|
9
|
+
import { WardenContactType } from "@bitblit/ratchet-warden-common/common/model/warden-contact-type";
|
|
10
|
+
import { ButtonModule } from "primeng/button";
|
|
11
|
+
import { FormsModule } from "@angular/forms";
|
|
12
|
+
import { CommonModule } from "@angular/common";
|
|
13
|
+
import { CardModule } from "primeng/card";
|
|
14
|
+
import { TooltipModule } from "primeng/tooltip";
|
|
15
|
+
import { FieldsetModule } from "primeng/fieldset";
|
|
16
|
+
import { AlertComponent, WindowRefService } from "@bitblit/ngx-acute-common";
|
|
17
|
+
import { DialogService } from "primeng/dynamicdialog";
|
|
18
|
+
import { InputTextModule } from "primeng/inputtext";
|
|
19
|
+
import * as i0 from "@angular/core";
|
|
20
|
+
import * as i1 from "@angular/router";
|
|
21
|
+
import * as i2 from "@bitblit/ratchet-warden-common/client/warden-user-service";
|
|
22
|
+
import * as i3 from "@bitblit/ratchet-warden-common/client/warden-client";
|
|
23
|
+
import * as i4 from "@bitblit/ngx-acute-common";
|
|
24
|
+
import * as i5 from "primeng/dynamicdialog";
|
|
25
|
+
import * as i6 from "primeng/button";
|
|
26
|
+
import * as i7 from "@angular/forms";
|
|
27
|
+
import * as i8 from "@angular/common";
|
|
28
|
+
import * as i9 from "primeng/card";
|
|
29
|
+
import * as i10 from "primeng/tooltip";
|
|
30
|
+
import * as i11 from "primeng/fieldset";
|
|
31
|
+
import * as i12 from "primeng/inputtext";
|
|
32
|
+
function LoginComponent_p_card_2_span_6_Template(rf, ctx) { if (rf & 1) {
|
|
33
|
+
i0.ɵɵelementStart(0, "span", 12);
|
|
34
|
+
i0.ɵɵtext(1, "Valid email or phone number required");
|
|
35
|
+
i0.ɵɵelementEnd();
|
|
36
|
+
} }
|
|
37
|
+
function LoginComponent_p_card_2_hr_7_Template(rf, ctx) { if (rf & 1) {
|
|
38
|
+
i0.ɵɵelement(0, "hr");
|
|
39
|
+
} }
|
|
40
|
+
function LoginComponent_p_card_2_p_fieldset_8_div_1_p_button_2_Template(rf, ctx) { if (rf & 1) {
|
|
41
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
42
|
+
i0.ɵɵelementStart(0, "p-button", 19);
|
|
43
|
+
i0.ɵɵlistener("click", function LoginComponent_p_card_2_p_fieldset_8_div_1_p_button_2_Template_p_button_click_0_listener() { i0.ɵɵrestoreView(_r4); const lg_r5 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.processWebAuthnLogin(lg_r5.user.userId)); });
|
|
44
|
+
i0.ɵɵelementEnd();
|
|
45
|
+
} }
|
|
46
|
+
function LoginComponent_p_card_2_p_fieldset_8_div_1_div_3_p_button_1_Template(rf, ctx) { if (rf & 1) {
|
|
47
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
48
|
+
i0.ɵɵelementStart(0, "p-button", 23);
|
|
49
|
+
i0.ɵɵlistener("click", function LoginComponent_p_card_2_p_fieldset_8_div_1_div_3_p_button_1_Template_p_button_click_0_listener() { i0.ɵɵrestoreView(_r7); const e_r8 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.sendCodeToContact(e_r8)); });
|
|
50
|
+
i0.ɵɵelementEnd();
|
|
51
|
+
} if (rf & 2) {
|
|
52
|
+
const e_r8 = i0.ɵɵnextContext().$implicit;
|
|
53
|
+
i0.ɵɵpropertyInterpolate1("label", "Send magic link via email to ", e_r8.value, "");
|
|
54
|
+
} }
|
|
55
|
+
function LoginComponent_p_card_2_p_fieldset_8_div_1_div_3_p_button_2_Template(rf, ctx) { if (rf & 1) {
|
|
56
|
+
const _r9 = i0.ɵɵgetCurrentView();
|
|
57
|
+
i0.ɵɵelementStart(0, "p-button", 23);
|
|
58
|
+
i0.ɵɵlistener("click", function LoginComponent_p_card_2_p_fieldset_8_div_1_div_3_p_button_2_Template_p_button_click_0_listener() { i0.ɵɵrestoreView(_r9); const e_r8 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.sendCodeToContact(e_r8)); });
|
|
59
|
+
i0.ɵɵelementEnd();
|
|
60
|
+
} if (rf & 2) {
|
|
61
|
+
const e_r8 = i0.ɵɵnextContext().$implicit;
|
|
62
|
+
i0.ɵɵpropertyInterpolate1("label", "Send magic link via text message to ", e_r8.value, "");
|
|
63
|
+
} }
|
|
64
|
+
function LoginComponent_p_card_2_p_fieldset_8_div_1_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
65
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
66
|
+
i0.ɵɵelementStart(0, "div", 20);
|
|
67
|
+
i0.ɵɵtemplate(1, LoginComponent_p_card_2_p_fieldset_8_div_1_div_3_p_button_1_Template, 1, 2, "p-button", 21)(2, LoginComponent_p_card_2_p_fieldset_8_div_1_div_3_p_button_2_Template, 1, 2, "p-button", 21);
|
|
68
|
+
i0.ɵɵelementStart(3, "p-button", 22);
|
|
69
|
+
i0.ɵɵlistener("click", function LoginComponent_p_card_2_p_fieldset_8_div_1_div_3_Template_p_button_click_3_listener() { i0.ɵɵrestoreView(_r6); const lg_r5 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.removeSingleLogin(lg_r5.user.userId)); });
|
|
70
|
+
i0.ɵɵelementEnd()();
|
|
71
|
+
} if (rf & 2) {
|
|
72
|
+
const e_r8 = ctx.$implicit;
|
|
73
|
+
i0.ɵɵadvance();
|
|
74
|
+
i0.ɵɵproperty("ngIf", e_r8.type === "EmailAddress");
|
|
75
|
+
i0.ɵɵadvance();
|
|
76
|
+
i0.ɵɵproperty("ngIf", e_r8.type === "TextCapablePhoneNumber");
|
|
77
|
+
i0.ɵɵadvance();
|
|
78
|
+
i0.ɵɵpropertyInterpolate1("label", "Forget ", e_r8.value, "");
|
|
79
|
+
} }
|
|
80
|
+
function LoginComponent_p_card_2_p_fieldset_8_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
81
|
+
i0.ɵɵelementStart(0, "div")(1, "p-fieldset", 16);
|
|
82
|
+
i0.ɵɵtemplate(2, LoginComponent_p_card_2_p_fieldset_8_div_1_p_button_2_Template, 1, 0, "p-button", 17)(3, LoginComponent_p_card_2_p_fieldset_8_div_1_div_3_Template, 4, 4, "div", 18);
|
|
83
|
+
i0.ɵɵelementEnd()();
|
|
84
|
+
} if (rf & 2) {
|
|
85
|
+
const lg_r5 = ctx.$implicit;
|
|
86
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
87
|
+
i0.ɵɵadvance();
|
|
88
|
+
i0.ɵɵproperty("legend", lg_r5.user.userLabel);
|
|
89
|
+
i0.ɵɵadvance();
|
|
90
|
+
i0.ɵɵproperty("ngIf", lg_r5 == null ? null : lg_r5.user == null ? null : lg_r5.user.webAuthnAuthenticatorSummaries == null ? null : lg_r5.user.webAuthnAuthenticatorSummaries.length);
|
|
91
|
+
i0.ɵɵadvance();
|
|
92
|
+
i0.ɵɵproperty("ngForOf", lg_r5.user.contactMethods)("ngForTrackBy", ctx_r1.contactByName);
|
|
93
|
+
} }
|
|
94
|
+
function LoginComponent_p_card_2_p_fieldset_8_Template(rf, ctx) { if (rf & 1) {
|
|
95
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
96
|
+
i0.ɵɵelementStart(0, "p-fieldset", 13);
|
|
97
|
+
i0.ɵɵtemplate(1, LoginComponent_p_card_2_p_fieldset_8_div_1_Template, 4, 4, "div", 14);
|
|
98
|
+
i0.ɵɵelement(2, "hr");
|
|
99
|
+
i0.ɵɵelementStart(3, "button", 15);
|
|
100
|
+
i0.ɵɵlistener("click", function LoginComponent_p_card_2_p_fieldset_8_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.clearSavedLogins()); });
|
|
101
|
+
i0.ɵɵelementEnd()();
|
|
102
|
+
} if (rf & 2) {
|
|
103
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
104
|
+
i0.ɵɵadvance();
|
|
105
|
+
i0.ɵɵproperty("ngForOf", ctx_r1.recentLogins)("ngForTrackBy", ctx_r1.userById);
|
|
106
|
+
} }
|
|
107
|
+
function LoginComponent_p_card_2_Template(rf, ctx) { if (rf & 1) {
|
|
108
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
109
|
+
i0.ɵɵelementStart(0, "p-card", 4)(1, "div")(2, "p-fieldset", 5)(3, "div", 6)(4, "input", 7);
|
|
110
|
+
i0.ɵɵtwoWayListener("ngModelChange", function LoginComponent_p_card_2_Template_input_ngModelChange_4_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.newContactValue, $event) || (ctx_r1.newContactValue = $event); return i0.ɵɵresetView($event); });
|
|
111
|
+
i0.ɵɵelementEnd();
|
|
112
|
+
i0.ɵɵelementStart(5, "p-button", 8);
|
|
113
|
+
i0.ɵɵlistener("click", function LoginComponent_p_card_2_Template_p_button_click_5_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.sendCodeToNewContact(ctx_r1.newContactValue)); });
|
|
114
|
+
i0.ɵɵelementEnd()();
|
|
115
|
+
i0.ɵɵtemplate(6, LoginComponent_p_card_2_span_6_Template, 2, 0, "span", 9);
|
|
116
|
+
i0.ɵɵelementEnd();
|
|
117
|
+
i0.ɵɵtemplate(7, LoginComponent_p_card_2_hr_7_Template, 1, 0, "hr", 10)(8, LoginComponent_p_card_2_p_fieldset_8_Template, 4, 2, "p-fieldset", 11);
|
|
118
|
+
i0.ɵɵelementEnd()();
|
|
119
|
+
} if (rf & 2) {
|
|
120
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
121
|
+
i0.ɵɵadvance(4);
|
|
122
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.newContactValue);
|
|
123
|
+
i0.ɵɵadvance(2);
|
|
124
|
+
i0.ɵɵproperty("ngIf", ctx_r1.contactValueInvalidAndDirty());
|
|
125
|
+
i0.ɵɵadvance();
|
|
126
|
+
i0.ɵɵproperty("ngIf", ctx_r1.hasRecentLogins);
|
|
127
|
+
i0.ɵɵadvance();
|
|
128
|
+
i0.ɵɵproperty("ngIf", ctx_r1.hasRecentLogins);
|
|
129
|
+
} }
|
|
130
|
+
function LoginComponent_p_card_3_Template(rf, ctx) { if (rf & 1) {
|
|
131
|
+
const _r10 = i0.ɵɵgetCurrentView();
|
|
132
|
+
i0.ɵɵelementStart(0, "p-card", 24)(1, "p-fieldset", 25)(2, "div", 26)(3, "div");
|
|
133
|
+
i0.ɵɵtext(4, "Code sent to ");
|
|
134
|
+
i0.ɵɵelementStart(5, "span", 27);
|
|
135
|
+
i0.ɵɵtext(6);
|
|
136
|
+
i0.ɵɵelementEnd()();
|
|
137
|
+
i0.ɵɵelementStart(7, "input", 28);
|
|
138
|
+
i0.ɵɵtwoWayListener("ngModelChange", function LoginComponent_p_card_3_Template_input_ngModelChange_7_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.waitingContact.value, $event) || (ctx_r1.waitingContact.value = $event); return i0.ɵɵresetView($event); });
|
|
139
|
+
i0.ɵɵelementEnd();
|
|
140
|
+
i0.ɵɵelementStart(8, "input", 29);
|
|
141
|
+
i0.ɵɵtwoWayListener("ngModelChange", function LoginComponent_p_card_3_Template_input_ngModelChange_8_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.verificationCode, $event) || (ctx_r1.verificationCode = $event); return i0.ɵɵresetView($event); });
|
|
142
|
+
i0.ɵɵelementEnd();
|
|
143
|
+
i0.ɵɵelementStart(9, "div", 6)(10, "p-button", 30);
|
|
144
|
+
i0.ɵɵlistener("click", function LoginComponent_p_card_3_Template_p_button_click_10_listener() { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.submitVerificationCode(ctx_r1.waitingContact.value, ctx_r1.verificationCode)); });
|
|
145
|
+
i0.ɵɵelementEnd();
|
|
146
|
+
i0.ɵɵelementStart(11, "p-button", 31);
|
|
147
|
+
i0.ɵɵlistener("click", function LoginComponent_p_card_3_Template_p_button_click_11_listener() { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.toggleCard(true)); });
|
|
148
|
+
i0.ɵɵelementEnd()()()()();
|
|
149
|
+
} if (rf & 2) {
|
|
150
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
151
|
+
i0.ɵɵadvance(6);
|
|
152
|
+
i0.ɵɵtextInterpolate(ctx_r1.waitingContact.value);
|
|
153
|
+
i0.ɵɵadvance();
|
|
154
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.waitingContact.value);
|
|
155
|
+
i0.ɵɵadvance();
|
|
156
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.verificationCode);
|
|
157
|
+
} }
|
|
158
|
+
export class LoginComponent {
|
|
159
|
+
route;
|
|
160
|
+
router;
|
|
161
|
+
userService;
|
|
162
|
+
wardenClient;
|
|
163
|
+
win;
|
|
164
|
+
dlgService;
|
|
165
|
+
showCodeCard = false;
|
|
166
|
+
verificationCode;
|
|
167
|
+
waitingContact;
|
|
168
|
+
newContactValue;
|
|
169
|
+
constructor(route, router, userService, wardenClient, win, dlgService) {
|
|
170
|
+
this.route = route;
|
|
171
|
+
this.router = router;
|
|
172
|
+
this.userService = userService;
|
|
173
|
+
this.wardenClient = wardenClient;
|
|
174
|
+
this.win = win;
|
|
175
|
+
this.dlgService = dlgService;
|
|
176
|
+
Logger.info('Found %s recent logins', this.recentLogins.length);
|
|
177
|
+
}
|
|
178
|
+
userById(index, ld) {
|
|
179
|
+
return ld.user.userId;
|
|
180
|
+
}
|
|
181
|
+
contactByName(index, contact) {
|
|
182
|
+
return contact.value;
|
|
183
|
+
}
|
|
184
|
+
get hasRecentLogins() {
|
|
185
|
+
return this.recentLogins.length > 0;
|
|
186
|
+
}
|
|
187
|
+
get recentLogins() {
|
|
188
|
+
return this.userService?.serviceOptions?.recentLoginProvider?.fetchAllLogins() || [];
|
|
189
|
+
}
|
|
190
|
+
clearSavedLogins() {
|
|
191
|
+
if (confirm('Are you sure you want to clear saved logins?')) {
|
|
192
|
+
this.userService.serviceOptions.recentLoginProvider.clearAllLogins();
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
ngOnInit() {
|
|
196
|
+
Logger.info('ngi: %j', this.route.queryParamMap);
|
|
197
|
+
}
|
|
198
|
+
goToDashboard() {
|
|
199
|
+
this.router.navigate(['/secure/dashboard']).then(No.op);
|
|
200
|
+
}
|
|
201
|
+
async sendCodeToNewContact(value) {
|
|
202
|
+
Logger.info('Trying to send code to %s %s %s', value, WardenUtils.stringIsEmailAddress(value), WardenUtils.stringIsPhoneNumber(value));
|
|
203
|
+
if (StringRatchet.trimToNull(value)) {
|
|
204
|
+
let ct = null;
|
|
205
|
+
if (WardenUtils.stringIsEmailAddress(value)) {
|
|
206
|
+
ct = WardenContactType.EmailAddress;
|
|
207
|
+
}
|
|
208
|
+
else if (WardenUtils.stringIsPhoneNumber(value)) {
|
|
209
|
+
ct = WardenContactType.TextCapablePhoneNumber;
|
|
210
|
+
}
|
|
211
|
+
if (!ct) {
|
|
212
|
+
AlertComponent.showAlert(this.dlgService, 'Cannot treat this as an email or a phone number - ignoring');
|
|
213
|
+
}
|
|
214
|
+
else {
|
|
215
|
+
this.waitingContact = { type: ct, value: value };
|
|
216
|
+
const val = await this.userService.sendExpiringCode(this.waitingContact);
|
|
217
|
+
if (val) {
|
|
218
|
+
this.showCodeCard = true;
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
AlertComponent.showAlert(this.dlgService, 'Failed to send code');
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
async sendCodeToContact(contact) {
|
|
227
|
+
if (contact && StringRatchet.trimToNull(contact.value) && contact.type) {
|
|
228
|
+
this.waitingContact = contact;
|
|
229
|
+
const val = await this.userService.sendExpiringCode(contact);
|
|
230
|
+
if (val) {
|
|
231
|
+
this.showCodeCard = true;
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
alert('Failed to send code');
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
Logger.info('Failed to send code to contact : %j', contact);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
async submitVerificationCode(input, verificationCode) {
|
|
242
|
+
Logger.info('Submit: %s, %s', input, verificationCode);
|
|
243
|
+
const val = await this.userService.executeValidationTokenBasedLogin({ type: WardenUtils.stringToContactType(input), value: input }, verificationCode);
|
|
244
|
+
if (val) {
|
|
245
|
+
await this.router.navigate(['/secure/dashboard']);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
async processWebAuthnLogin(userId) {
|
|
249
|
+
Logger.info('processWebAuthnLogin: %s', userId);
|
|
250
|
+
const val = await this.userService.executeWebAuthnBasedLogin(userId);
|
|
251
|
+
if (val) {
|
|
252
|
+
await this.router.navigate(['/secure/dashboard']);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
async sendMagicLink(contact) {
|
|
256
|
+
const loc = this.win.nativeWindow().location;
|
|
257
|
+
let curUrl = loc.toString();
|
|
258
|
+
curUrl = curUrl.indexOf('?') > -1 ? curUrl.substring(0, curUrl.indexOf('?')) : curUrl;
|
|
259
|
+
let landingUrl = curUrl.split('public/login').join('public/magic-lander');
|
|
260
|
+
landingUrl += '?code={CODE}&meta={META}';
|
|
261
|
+
const meta = {
|
|
262
|
+
redirect: '/secure/dashboard',
|
|
263
|
+
};
|
|
264
|
+
const sent = await this.wardenClient.sendMagicLink(contact, landingUrl, meta);
|
|
265
|
+
Logger.info('Sent was %s : %s', sent, landingUrl);
|
|
266
|
+
}
|
|
267
|
+
removeSingleLogin(userId) {
|
|
268
|
+
this.userService.serviceOptions.recentLoginProvider.removeUser(userId);
|
|
269
|
+
}
|
|
270
|
+
toggleCard(clearCode) {
|
|
271
|
+
this.showCodeCard = !this.showCodeCard;
|
|
272
|
+
if (clearCode) {
|
|
273
|
+
this.verificationCode = null;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
contactValueInvalidAndDirty() {
|
|
277
|
+
return StringRatchet.trimToNull(this.newContactValue) && !WardenUtils.stringIsPhoneNumber(this.newContactValue);
|
|
278
|
+
}
|
|
279
|
+
static ɵfac = function LoginComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LoginComponent)(i0.ɵɵdirectiveInject(i1.ActivatedRoute), i0.ɵɵdirectiveInject(i1.Router), i0.ɵɵdirectiveInject(i2.WardenUserService), i0.ɵɵdirectiveInject(i3.WardenClient), i0.ɵɵdirectiveInject(i4.WindowRefService), i0.ɵɵdirectiveInject(i5.DialogService)); };
|
|
280
|
+
static ɵcmp = i0.ɵɵdefineComponent({ type: LoginComponent, selectors: [["ngx-acute-warden-login"]], standalone: true, features: [i0.ɵɵStandaloneFeature], decls: 4, vars: 2, consts: [[2, "display", "flex", "flex-direction", "column", "justify-content", "center"], [2, "display", "flex", "flex-direction", "row", "justify-content", "center"], ["header", "ParaTrade", 4, "ngIf"], ["header", "ParaTrade Authorization Code", 4, "ngIf"], ["header", "ParaTrade"], ["legend", "New Login"], [2, "display", "flex", "flex-direction", "row", "justify-content", "space-between", "gap", "5px"], ["id", "newContactValue", "pInputText", "", "placeholder", "Your Email or Phone", "type", "text", 1, "p-inputtext", "rounded-input", 2, "width", "100%", 3, "ngModelChange", "ngModel"], ["icon", "pi pi-envelope", "pTooltip", "Send code", 3, "click"], ["style", "color:red", 4, "ngIf"], [4, "ngIf"], ["legend", "Previous Logins", 4, "ngIf"], [2, "color", "red"], ["legend", "Previous Logins"], [4, "ngFor", "ngForOf", "ngForTrackBy"], ["pButton", "", "icon", "pi pi-ban", "label", "Clear Saved Logins", 2, "margin-top", "10px", 3, "click"], [3, "legend"], ["icon", "pi pi-lock-open", "pTooltip", "Send WebAuthn", "label", "Authenticate by device (WebAuthn)", 3, "click", 4, "ngIf"], ["style", "display: flex; flex-direction: row; gap: 5px", 4, "ngFor", "ngForOf", "ngForTrackBy"], ["icon", "pi pi-lock-open", "pTooltip", "Send WebAuthn", "label", "Authenticate by device (WebAuthn)", 3, "click"], [2, "display", "flex", "flex-direction", "row", "gap", "5px"], ["icon", "pi pi-sign-in", 3, "label", "click", 4, "ngIf"], ["icon", "pi pi-delete-left", 3, "click", "label"], ["icon", "pi pi-sign-in", 3, "click", "label"], ["header", "ParaTrade Authorization Code"], ["legend", "Email"], [2, "display", "flex", "flex-direction", "column", "min-width", "100%", "justify-content", "center", "align-items", "center", "gap", "10px"], [2, "font-weight", "bolder"], ["type", "hidden", "id", "waitingContactValue", "readonly", "true", 1, "p-inputtext", "rounded-input", 3, "ngModelChange", "ngModel"], ["type", "text", "id", "verificationCode", "placeholder", "Enter the code from your email", 1, "p-inputtext", "rounded-input", 2, "width", "100%", 3, "ngModelChange", "ngModel"], ["label", "Submit code", 3, "click"], ["label", "Cancel", 3, "click"]], template: function LoginComponent_Template(rf, ctx) { if (rf & 1) {
|
|
281
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
|
|
282
|
+
i0.ɵɵtemplate(2, LoginComponent_p_card_2_Template, 9, 4, "p-card", 2)(3, LoginComponent_p_card_3_Template, 12, 3, "p-card", 3);
|
|
283
|
+
i0.ɵɵelementEnd()();
|
|
284
|
+
} if (rf & 2) {
|
|
285
|
+
i0.ɵɵadvance(2);
|
|
286
|
+
i0.ɵɵproperty("ngIf", !ctx.showCodeCard);
|
|
287
|
+
i0.ɵɵadvance();
|
|
288
|
+
i0.ɵɵproperty("ngIf", ctx.showCodeCard);
|
|
289
|
+
} }, dependencies: [ButtonModule, i6.ButtonDirective, i6.Button, RouterModule, FormsModule, i7.DefaultValueAccessor, i7.NgControlStatus, i7.NgModel, CommonModule, i8.NgForOf, i8.NgIf, CardModule, i9.Card, TooltipModule, i10.Tooltip, FieldsetModule, i11.Fieldset, InputTextModule, i12.InputText], encapsulation: 2 });
|
|
290
|
+
}
|
|
291
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LoginComponent, [{
|
|
292
|
+
type: Component,
|
|
293
|
+
args: [{ selector: 'ngx-acute-warden-login', standalone: true, imports: [ButtonModule, RouterModule, FormsModule, CommonModule, CardModule, TooltipModule, ButtonModule, FieldsetModule, InputTextModule], template: "<div style=\"display: flex; flex-direction: column; justify-content: center\">\n <div style=\"display: flex; flex-direction: row; justify-content: center\">\n\n <p-card *ngIf=\"!showCodeCard\" header=\"ParaTrade\">\n <div>\n <p-fieldset legend=\"New Login\">\n <div style=\"display: flex; flex-direction: row; justify-content: space-between; gap: 5px\">\n <input class=\"p-inputtext rounded-input\" [(ngModel)]=\"newContactValue\" id=\"newContactValue\"\n pInputText style=\"width: 100%\"\n placeholder=\"Your Email or Phone\" type=\"text\">\n <p-button icon=\"pi pi-envelope\" (click)=\"sendCodeToNewContact(newContactValue)\"\n pTooltip=\"Send code\">\n </p-button>\n </div>\n <span *ngIf=\"contactValueInvalidAndDirty()\" style=\"color:red\">Valid email or phone number required</span>\n </p-fieldset>\n\n <hr *ngIf=\"hasRecentLogins\" />\n\n <p-fieldset *ngIf=\"hasRecentLogins\" legend=\"Previous Logins\">\n <div *ngFor=\"let lg of recentLogins; trackBy:userById\">\n\n <p-fieldset [legend]=\"lg.user.userLabel\">\n\n\n <p-button *ngIf=\"lg?.user?.webAuthnAuthenticatorSummaries?.length\" icon=\"pi pi-lock-open\"\n (click)=\"processWebAuthnLogin(lg.user.userId)\" pTooltip=\"Send WebAuthn\" label=\"Authenticate by device (WebAuthn)\">\n </p-button>\n\n <div *ngFor=\"let e of lg.user.contactMethods; trackBy:contactByName\" style=\"display: flex; flex-direction: row; gap: 5px\">\n\n <p-button *ngIf=\"e.type==='EmailAddress'\" icon=\"pi pi-sign-in\"\n (click)=\"sendCodeToContact(e)\" label=\"Send magic link via email to {{e.value}}\"></p-button>\n <p-button *ngIf=\"e.type==='TextCapablePhoneNumber'\" icon=\"pi pi-sign-in\"\n (click)=\"sendCodeToContact(e)\" label=\"Send magic link via text message to {{e.value}}\"></p-button>\n <p-button icon=\"pi pi-delete-left\"\n (click)=\"removeSingleLogin(lg.user.userId)\" label=\"Forget {{e.value}}\"></p-button>\n </div>\n </p-fieldset>\n </div>\n\n <hr/>\n <button pButton icon=\"pi pi-ban\" label=\"Clear Saved Logins\" (click)=\"clearSavedLogins()\" style=\"margin-top: 10px\"></button>\n\n </p-fieldset>\n\n\n </div>\n </p-card>\n\n <p-card *ngIf=\"showCodeCard\" header=\"ParaTrade Authorization Code\">\n\n <p-fieldset legend=\"Email\">\n <div style=\"display: flex; flex-direction: column; min-width: 100%; justify-content: center; align-items: center; gap: 10px\">\n <div>Code sent to <span style=\"font-weight: bolder\">{{waitingContact.value}}</span></div>\n <input type=\"hidden\" class=\"p-inputtext rounded-input\" [(ngModel)]=\"waitingContact.value\" id=\"waitingContactValue\" readonly=\"true\">\n <input class=\"p-inputtext rounded-input\" [(ngModel)]=\"verificationCode\" type=\"text\" id=\"verificationCode\"\n placeholder=\"Enter the code from your email\" style=\"width: 100%\">\n\n <div style=\"display: flex; flex-direction: row; justify-content: space-between; gap: 5px\">\n <p-button (click)=\"submitVerificationCode(waitingContact.value, verificationCode)\"\n label=\"Submit code\">\n </p-button>\n\n <p-button (click)=\"toggleCard(true)\" label=\"Cancel\"></p-button>\n\n </div>\n </div>\n </p-fieldset>\n\n </p-card>\n\n\n </div>\n</div>\n\n" }]
|
|
294
|
+
}], () => [{ type: i1.ActivatedRoute }, { type: i1.Router }, { type: i2.WardenUserService }, { type: i3.WardenClient }, { type: i4.WindowRefService }, { type: i5.DialogService }], null); })();
|
|
295
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LoginComponent, { className: "LoginComponent", filePath: "components/login/login.component.ts", lineNumber: 33 }); })();
|
|
296
|
+
//# sourceMappingURL=login.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"login.component.js","sourceRoot":"","sources":["../../../src/components/login/login.component.ts","../../../src/components/login/login.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAS,MAAM,eAAe,CAAC;AAChD,OAAO,EAAC,cAAc,EAAE,MAAM,EAAE,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAErE,OAAO,EAAC,MAAM,EAAC,MAAM,uCAAuC,CAAC;AAC7D,OAAO,EAAC,YAAY,EAAC,MAAM,qDAAqD,CAAC;AACjF,OAAO,EAAC,iBAAiB,EAAC,MAAM,2DAA2D,CAAC;AAC5F,OAAO,EAAC,EAAE,EAAC,MAAM,iCAAiC,CAAC;AACnD,OAAO,EAAC,aAAa,EAAC,MAAM,6CAA6C,CAAC;AAK1E,OAAO,EAAC,WAAW,EAAC,MAAM,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vB,YAAY,iCAAE,YAAY,EAAE,WAAW,2DAAE,YAAY,uBAAE,UAAU,WAAE,aAAa,eAAgB,cAAc,gBAAE,eAAe;;iFAE9H,cAAc;cAN1B,SAAS;2BACE,wBAAwB,cAEtB,IAAI,WACP,CAAC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,EAAE,eAAe,CAAC;;kFAE/H,cAAc"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
|
+
import { WardenUserService } from "@bitblit/ratchet-warden-common/client/warden-user-service";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class MagicLanderComponent implements OnInit {
|
|
6
|
+
private route;
|
|
7
|
+
private router;
|
|
8
|
+
userService: WardenUserService<any>;
|
|
9
|
+
currentStatus: string;
|
|
10
|
+
showLoginButton: boolean;
|
|
11
|
+
constructor(route: ActivatedRoute, router: Router, userService: WardenUserService<any>);
|
|
12
|
+
ngOnInit(): void;
|
|
13
|
+
processParameters(verificationCode: string, meta: any): Promise<void>;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MagicLanderComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MagicLanderComponent, "ngx-acute-warden-magic-lander", never, {}, {}, never, never, true, never>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { ActivatedRoute, Router, RouterModule } from '@angular/router';
|
|
3
|
+
import { Logger } from '@bitblit/ratchet-common/logger/logger';
|
|
4
|
+
import { WardenUserService } from "@bitblit/ratchet-warden-common/client/warden-user-service";
|
|
5
|
+
import { No } from "@bitblit/ratchet-common/lang/no";
|
|
6
|
+
import { StringRatchet } from "@bitblit/ratchet-common/lang/string-ratchet";
|
|
7
|
+
import { Base64Ratchet } from "@bitblit/ratchet-common/lang/base64-ratchet";
|
|
8
|
+
import { CardModule } from "primeng/card";
|
|
9
|
+
import { FormsModule } from "@angular/forms";
|
|
10
|
+
import { CommonModule } from "@angular/common";
|
|
11
|
+
import { ButtonDirective } from "primeng/button";
|
|
12
|
+
import * as i0 from "@angular/core";
|
|
13
|
+
import * as i1 from "@angular/router";
|
|
14
|
+
import * as i2 from "@bitblit/ratchet-warden-common/client/warden-user-service";
|
|
15
|
+
import * as i3 from "primeng/card";
|
|
16
|
+
import * as i4 from "@angular/common";
|
|
17
|
+
const _c0 = () => ["/public/login"];
|
|
18
|
+
function MagicLanderComponent_a_5_Template(rf, ctx) { if (rf & 1) {
|
|
19
|
+
i0.ɵɵelementStart(0, "a", 4);
|
|
20
|
+
i0.ɵɵtext(1, "Back to login page");
|
|
21
|
+
i0.ɵɵelementEnd();
|
|
22
|
+
} if (rf & 2) {
|
|
23
|
+
i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction0(1, _c0));
|
|
24
|
+
} }
|
|
25
|
+
export class MagicLanderComponent {
|
|
26
|
+
route;
|
|
27
|
+
router;
|
|
28
|
+
userService;
|
|
29
|
+
currentStatus = 'Starting up...';
|
|
30
|
+
showLoginButton = false;
|
|
31
|
+
constructor(route, router, userService) {
|
|
32
|
+
this.route = route;
|
|
33
|
+
this.router = router;
|
|
34
|
+
this.userService = userService;
|
|
35
|
+
}
|
|
36
|
+
ngOnInit() {
|
|
37
|
+
this.currentStatus = 'Parsing parameters...';
|
|
38
|
+
const codeString = StringRatchet.trimToNull(this.route.snapshot.queryParamMap.get('code'));
|
|
39
|
+
const metaString = this.route.snapshot.queryParamMap.get('meta');
|
|
40
|
+
const t2 = Base64Ratchet.base64StringToString(metaString);
|
|
41
|
+
const meta = Base64Ratchet.safeBase64JSONParse(metaString);
|
|
42
|
+
Logger.info('ngi: %j : Code %s : Meta %s :: %s :: MetaP: %j', this.route.queryParamMap, codeString, metaString, t2, meta);
|
|
43
|
+
this.processParameters(codeString, meta).then(No.op);
|
|
44
|
+
}
|
|
45
|
+
async processParameters(verificationCode, meta) {
|
|
46
|
+
const targetContact = (meta || {}).contact;
|
|
47
|
+
if (verificationCode && targetContact?.value && targetContact?.type) {
|
|
48
|
+
this.currentStatus = 'Logging in...';
|
|
49
|
+
Logger.info('Logging in with code');
|
|
50
|
+
try {
|
|
51
|
+
const val = await this.userService.executeValidationTokenBasedLogin(targetContact, verificationCode);
|
|
52
|
+
Logger.info('Rval from login was : %j', val);
|
|
53
|
+
}
|
|
54
|
+
catch (err) {
|
|
55
|
+
Logger.error('Failed to login : %s', err, err);
|
|
56
|
+
this.currentStatus = 'Failed to login : ' + err;
|
|
57
|
+
this.showLoginButton = true;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
Logger.info('Could not login, missing code or contact : %s : %j', verificationCode, targetContact);
|
|
62
|
+
}
|
|
63
|
+
if (this.userService.isLoggedIn()) {
|
|
64
|
+
if (meta?.redirect) {
|
|
65
|
+
Logger.info('Meta redirect to %s requested', meta.redirect);
|
|
66
|
+
this.currentStatus = 'Redirecting to ' + meta.redirect;
|
|
67
|
+
await this.router.navigate([meta.redirect]);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
Logger.info('Ignoring meta - not logged in.');
|
|
72
|
+
this.currentStatus = 'Login failed - sending to login page';
|
|
73
|
+
this.showLoginButton = true;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
static ɵfac = function MagicLanderComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MagicLanderComponent)(i0.ɵɵdirectiveInject(i1.ActivatedRoute), i0.ɵɵdirectiveInject(i1.Router), i0.ɵɵdirectiveInject(i2.WardenUserService)); };
|
|
77
|
+
static ɵcmp = i0.ɵɵdefineComponent({ type: MagicLanderComponent, selectors: [["ngx-acute-warden-magic-lander"]], standalone: true, features: [i0.ɵɵStandaloneFeature], decls: 6, vars: 2, consts: [[1, "row"], ["header", "Magic Lander"], [2, "display", "flex", "flex-direction", "column"], ["pButton", "", 3, "routerLink", 4, "ngIf"], ["pButton", "", 3, "routerLink"]], template: function MagicLanderComponent_Template(rf, ctx) { if (rf & 1) {
|
|
78
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "p-card", 1)(2, "div", 2)(3, "p");
|
|
79
|
+
i0.ɵɵtext(4);
|
|
80
|
+
i0.ɵɵelementEnd();
|
|
81
|
+
i0.ɵɵtemplate(5, MagicLanderComponent_a_5_Template, 2, 2, "a", 3);
|
|
82
|
+
i0.ɵɵelementEnd()()();
|
|
83
|
+
} if (rf & 2) {
|
|
84
|
+
i0.ɵɵadvance(4);
|
|
85
|
+
i0.ɵɵtextInterpolate(ctx.currentStatus);
|
|
86
|
+
i0.ɵɵadvance();
|
|
87
|
+
i0.ɵɵproperty("ngIf", ctx.showLoginButton);
|
|
88
|
+
} }, dependencies: [CardModule, i3.Card, RouterModule, i1.RouterLink, FormsModule, CommonModule, i4.NgIf, ButtonDirective], encapsulation: 2 });
|
|
89
|
+
}
|
|
90
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicLanderComponent, [{
|
|
91
|
+
type: Component,
|
|
92
|
+
args: [{ selector: 'ngx-acute-warden-magic-lander', standalone: true, imports: [CardModule, RouterModule, FormsModule, CommonModule, CardModule, ButtonDirective], template: "<div class=\"row\">\n <p-card header=\"Magic Lander\">\n <div style=\"display: flex; flex-direction: column\">\n <p>{{currentStatus}}</p>\n <a [routerLink]=\"['/public/login']\" *ngIf=\"showLoginButton\" pButton>Back to login page</a>\n </div>\n </p-card>\n\n</div>\n" }]
|
|
93
|
+
}], () => [{ type: i1.ActivatedRoute }, { type: i1.Router }, { type: i2.WardenUserService }], null); })();
|
|
94
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MagicLanderComponent, { className: "MagicLanderComponent", filePath: "components/magic-lander/magic-lander.component.ts", lineNumber: 23 }); })();
|
|
95
|
+
//# sourceMappingURL=magic-lander.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"magic-lander.component.js","sourceRoot":"","sources":["../../../src/components/magic-lander/magic-lander.component.ts","../../../src/components/magic-lander/magic-lander.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAS,MAAM,eAAe,CAAC;AAChD,OAAO,EAAC,cAAc,EAAE,MAAM,EAAE,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAErE,OAAO,EAAC,MAAM,EAAC,MAAM,uCAAuC,CAAC;AAE7D,OAAO,EAAC,iBAAiB,EAAC,MAAM,2DAA2D,CAAC;AAC5F,OAAO,EAAC,EAAE,EAAC,MAAM,iCAAiC,CAAC;AACnD,OAAO,EAAC,aAAa,EAAC,MAAM,6CAA6C,CAAC;AAC1E,OAAO,EAAC,aAAa,EAAC,MAAM,6CAA6C,CAAC;AAG1E,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;;;;;;;;ICVnC,4BAAoE;IAAA,kCAAkB;IAAA,iBAAI;;IAAvF,uDAAgC;;ADkBjD,MAAM,OAAO,oBAAoB;IAKrB;IACA;IACD;IANF,aAAa,GAAW,gBAAgB,CAAC;IACzC,eAAe,GAAY,KAAK,CAAC;IAExC,YACU,KAAqB,EACrB,MAAc,EACf,WAAmC;QAFlC,UAAK,GAAL,KAAK,CAAgB;QACrB,WAAM,GAAN,MAAM,CAAQ;QACf,gBAAW,GAAX,WAAW,CAAwB;IACzC,CAAC;IAEJ,QAAQ;QACN,IAAI,CAAC,aAAa,GAAG,uBAAuB,CAAC;QAC7C,MAAM,UAAU,GAAW,aAAa,CAAC,UAAU,CAAC,IAAI,C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} from "@bitblit/ratchet-warden-common/client/warden-user-service";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class UserProfileComponent {
|
|
5
|
+
private router;
|
|
6
|
+
userService: WardenUserService<any>;
|
|
7
|
+
user: any;
|
|
8
|
+
constructor(router: Router, userService: WardenUserService<any>);
|
|
9
|
+
performLogout(): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UserProfileComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UserProfileComponent, "ngx-acute-warden-user-profile", never, {}, {}, never, never, true, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { Router } from '@angular/router';
|
|
3
|
+
import { Logger } from '@bitblit/ratchet-common/logger/logger';
|
|
4
|
+
import { WardenUserService } from "@bitblit/ratchet-warden-common/client/warden-user-service";
|
|
5
|
+
import { No } from "@bitblit/ratchet-common/lang/no";
|
|
6
|
+
import { CardModule } from "primeng/card";
|
|
7
|
+
import { Button } from "primeng/button";
|
|
8
|
+
import { JsonPipe, NgIf } from "@angular/common";
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
import * as i1 from "@angular/router";
|
|
11
|
+
import * as i2 from "@bitblit/ratchet-warden-common/client/warden-user-service";
|
|
12
|
+
import * as i3 from "primeng/card";
|
|
13
|
+
function UserProfileComponent_ul_3_Template(rf, ctx) { if (rf & 1) {
|
|
14
|
+
i0.ɵɵelementStart(0, "ul")(1, "li");
|
|
15
|
+
i0.ɵɵtext(2);
|
|
16
|
+
i0.ɵɵelementEnd();
|
|
17
|
+
i0.ɵɵelementStart(3, "li");
|
|
18
|
+
i0.ɵɵtext(4);
|
|
19
|
+
i0.ɵɵelementEnd();
|
|
20
|
+
i0.ɵɵelementStart(5, "li");
|
|
21
|
+
i0.ɵɵtext(6);
|
|
22
|
+
i0.ɵɵpipe(7, "json");
|
|
23
|
+
i0.ɵɵelementEnd()();
|
|
24
|
+
} if (rf & 2) {
|
|
25
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
26
|
+
i0.ɵɵadvance(2);
|
|
27
|
+
i0.ɵɵtextInterpolate(ctx_r0.userService.fetchLoggedInUserObject().name);
|
|
28
|
+
i0.ɵɵadvance(2);
|
|
29
|
+
i0.ɵɵtextInterpolate(ctx_r0.userService.fetchLoggedInUserObject().email);
|
|
30
|
+
i0.ɵɵadvance(2);
|
|
31
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(7, 3, ctx_r0.userService.fetchLoggedInUserObject()));
|
|
32
|
+
} }
|
|
33
|
+
export class UserProfileComponent {
|
|
34
|
+
router;
|
|
35
|
+
userService;
|
|
36
|
+
user = { name: 'x', email: 'y' };
|
|
37
|
+
constructor(router, userService) {
|
|
38
|
+
this.router = router;
|
|
39
|
+
this.userService = userService;
|
|
40
|
+
Logger.info('Construct userprofile');
|
|
41
|
+
}
|
|
42
|
+
performLogout() {
|
|
43
|
+
this.userService.logout();
|
|
44
|
+
this.router.navigate(['/public/login']).then(No.op);
|
|
45
|
+
}
|
|
46
|
+
static ɵfac = function UserProfileComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || UserProfileComponent)(i0.ɵɵdirectiveInject(i1.Router), i0.ɵɵdirectiveInject(i2.WardenUserService)); };
|
|
47
|
+
static ɵcmp = i0.ɵɵdefineComponent({ type: UserProfileComponent, selectors: [["ngx-acute-warden-user-profile"]], standalone: true, features: [i0.ɵɵStandaloneFeature], decls: 5, vars: 1, consts: [[1, "simpleEvenlySpacedRow"], ["header", "User Profile"], [4, "ngIf"], ["label", "Logout", 3, "click"]], template: function UserProfileComponent_Template(rf, ctx) { if (rf & 1) {
|
|
48
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "p-card", 1)(2, "div");
|
|
49
|
+
i0.ɵɵtemplate(3, UserProfileComponent_ul_3_Template, 8, 5, "ul", 2);
|
|
50
|
+
i0.ɵɵelementStart(4, "p-button", 3);
|
|
51
|
+
i0.ɵɵlistener("click", function UserProfileComponent_Template_p_button_click_4_listener() { return ctx.performLogout(); });
|
|
52
|
+
i0.ɵɵelementEnd()()()();
|
|
53
|
+
} if (rf & 2) {
|
|
54
|
+
i0.ɵɵadvance(3);
|
|
55
|
+
i0.ɵɵproperty("ngIf", ctx.userService.isLoggedIn());
|
|
56
|
+
} }, dependencies: [CardModule, i3.Card, Button,
|
|
57
|
+
JsonPipe,
|
|
58
|
+
NgIf], encapsulation: 2 });
|
|
59
|
+
}
|
|
60
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UserProfileComponent, [{
|
|
61
|
+
type: Component,
|
|
62
|
+
args: [{ selector: "ngx-acute-warden-user-profile", imports: [
|
|
63
|
+
CardModule,
|
|
64
|
+
Button,
|
|
65
|
+
JsonPipe,
|
|
66
|
+
NgIf
|
|
67
|
+
], standalone: true, template: "<div class=\"simpleEvenlySpacedRow\">\n <p-card header=\"User Profile\">\n <div>\n <ul *ngIf=\"userService.isLoggedIn()\">\n <li>{{ userService.fetchLoggedInUserObject().name }}</li>\n <li>{{ userService.fetchLoggedInUserObject().email }}</li>\n <li>{{userService.fetchLoggedInUserObject() | json}}</li>\n </ul>\n <p-button (click)=\"performLogout()\" label=\"Logout\"></p-button>\n </div>\n </p-card>\n</div>\n" }]
|
|
68
|
+
}], () => [{ type: i1.Router }, { type: i2.WardenUserService }], null); })();
|
|
69
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UserProfileComponent, { className: "UserProfileComponent", filePath: "components/user-profile/user-profile.component.ts", lineNumber: 22 }); })();
|
|
70
|
+
//# sourceMappingURL=user-profile.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-profile.component.js","sourceRoot":"","sources":["../../../src/components/user-profile/user-profile.component.ts","../../../src/components/user-profile/user-profile.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS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GzC,AADE,AADE,AADqD,iBAAW,EAC1D,EACC,EACL;;YARK,eAA8B;YAA9B,mDAA8B;4BDWrC,UAAU,WACV,MAAM;YACN,QAAQ;YACR,IAAI;;iFAIK,oBAAoB;cAXhC,SAAS;2BACE,+BAA+B,WAEhC;oBACP,UAAU;oBACV,MAAM;oBACN,QAAQ;oBACR,IAAI;iBACL,cACW,IAAI;;kFAEL,oBAAoB"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './build/ngx-acute-warden-info';
|
|
2
|
+
export * from './components/create-user/create-user.component';
|
|
3
|
+
export * from './components/login/login.component';
|
|
4
|
+
export * from './components/magic-lander/magic-lander.component';
|
|
5
|
+
export * from './components/user-profile/user-profile.component';
|
|
6
|
+
export * from './services/warden-adapter.service';
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './build/ngx-acute-warden-info';
|
|
2
|
+
export * from './components/create-user/create-user.component';
|
|
3
|
+
export * from './components/login/login.component';
|
|
4
|
+
export * from './components/magic-lander/magic-lander.component';
|
|
5
|
+
export * from './components/user-profile/user-profile.component';
|
|
6
|
+
export * from './services/warden-adapter.service';
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAE9C,cAAc,gDAAgD,CAAC;AAC/D,cAAc,oCAAoC,CAAC;AACnD,cAAc,kDAAkD,CAAC;AACjE,cAAc,kDAAkD,CAAC;AAEjE,cAAc,mCAAmC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Router } from '@angular/router';
|
|
2
|
+
import { WardenUserServiceEventProcessingProvider } from '@bitblit/ratchet-warden-common/client/provider/warden-user-service-event-processing-provider';
|
|
3
|
+
import { WardenLoggedInUserWrapper } from '@bitblit/ratchet-warden-common/client/provider/warden-logged-in-user-wrapper';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class WardenAdapterService implements WardenUserServiceEventProcessingProvider<any> {
|
|
6
|
+
router: Router;
|
|
7
|
+
constructor(router: Router);
|
|
8
|
+
onAutomaticLogout(): void;
|
|
9
|
+
onAutomaticTokenRefresh(_refreshUser: WardenLoggedInUserWrapper<any>): void;
|
|
10
|
+
onLoginFailure(reason: string): void;
|
|
11
|
+
onLogout(): void;
|
|
12
|
+
onSuccessfulLogin(newUser: WardenLoggedInUserWrapper<any>): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WardenAdapterService, never>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<WardenAdapterService>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { Logger } from '@bitblit/ratchet-common/logger/logger';
|
|
3
|
+
import { No } from "@bitblit/ratchet-common/lang/no";
|
|
4
|
+
import { Router } from '@angular/router';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "@angular/router";
|
|
7
|
+
export class WardenAdapterService {
|
|
8
|
+
router;
|
|
9
|
+
constructor(router) {
|
|
10
|
+
this.router = router;
|
|
11
|
+
}
|
|
12
|
+
onAutomaticLogout() {
|
|
13
|
+
this.router.navigate(['/public/login']).then(No.op);
|
|
14
|
+
}
|
|
15
|
+
onAutomaticTokenRefresh(_refreshUser) {
|
|
16
|
+
Logger.info('User token refreshed');
|
|
17
|
+
}
|
|
18
|
+
onLoginFailure(reason) {
|
|
19
|
+
Logger.info('Failed to login: %s', reason);
|
|
20
|
+
}
|
|
21
|
+
onLogout() {
|
|
22
|
+
this.router.navigate(['/public/login']).then(No.op);
|
|
23
|
+
}
|
|
24
|
+
onSuccessfulLogin(newUser) {
|
|
25
|
+
Logger.info('Logged in as %s', newUser?.userObject?.loginData?.userLabel);
|
|
26
|
+
}
|
|
27
|
+
static ɵfac = function WardenAdapterService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || WardenAdapterService)(i0.ɵɵinject(i1.Router)); };
|
|
28
|
+
static ɵprov = i0.ɵɵdefineInjectable({ token: WardenAdapterService, factory: WardenAdapterService.ɵfac, providedIn: 'root' });
|
|
29
|
+
}
|
|
30
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WardenAdapterService, [{
|
|
31
|
+
type: Injectable,
|
|
32
|
+
args: [{ providedIn: 'root' }]
|
|
33
|
+
}], () => [{ type: i1.Router }], null); })();
|
|
34
|
+
//# sourceMappingURL=warden-adapter.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warden-adapter.service.js","sourceRoot":"","sources":["../../src/services/warden-adapter.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,OAAO,EAAC,MAAM,EAAC,MAAM,uCAAuC,CAAC;AAC7D,OAAO,EAAC,EAAE,EAAC,MAAM,iCAAiC,CAAC;AACnD,OAAO,EAAC,MAAM,EAAC,MAAM,iBAAiB,CAAC;;;AAKvC,MAAM,OAAO,oBAAoB;IACZ;IAAnB,YAAmB,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAC9B,iBAAiB;QAEtB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IACtD,CAAC;IAEM,uBAAuB,CAAC,YAA4C;QACzE,MAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;IACtC,CAAC;IAEM,cAAc,CAAC,MAAc;QAClC,MAAM,CAAC,IAAI,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;IAC7C,CAAC;IAEM,QAAQ;QAEb,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IACtD,CAAC;IAEM,iBAAiB,CAAC,OAAuC;QAC9D,MAAM,CAAC,IAAI,CAAC,iBAAiB,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IAC5E,CAAC;8GAtBU,oBAAoB;kDAApB,oBAAoB,WAApB,oBAAoB,mBADR,MAAM;;iFAClB,oBAAoB;cADhC,UAAU;eAAC,EAAC,UAAU,EAAE,MAAM,EAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@bitblit/ngx-acute-warden",
|
|
3
|
+
"version": "5.0.545-alpha",
|
|
4
|
+
"description": "Library for using angular with ratchet-warden",
|
|
5
|
+
"module": "lib/index.js",
|
|
6
|
+
"types": "lib/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"lib/**",
|
|
9
|
+
"bin/**"
|
|
10
|
+
],
|
|
11
|
+
"exports": {
|
|
12
|
+
"./package.json": {
|
|
13
|
+
"default": "./package.json"
|
|
14
|
+
},
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./lib/index.d.ts",
|
|
17
|
+
"esm2022": "./lib/index.js",
|
|
18
|
+
"esm": "./lib/index.js",
|
|
19
|
+
"default": "./lib/index.js"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"contributors": [
|
|
23
|
+
"Christopher Weiss <bitblit@gmail.com>"
|
|
24
|
+
],
|
|
25
|
+
"husky": {
|
|
26
|
+
"hooks": {
|
|
27
|
+
"pre-commit": "pretty-quick --staged"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"prettier": {
|
|
31
|
+
"printWidth": 140,
|
|
32
|
+
"singleQuote": true,
|
|
33
|
+
"arrowParens": "always"
|
|
34
|
+
},
|
|
35
|
+
"config": {},
|
|
36
|
+
"license": "Apache-2.0",
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@angular/animations": "18.2.9",
|
|
39
|
+
"@angular/common": "18.2.9",
|
|
40
|
+
"@angular/compiler": "18.2.9",
|
|
41
|
+
"@angular/core": "18.2.9",
|
|
42
|
+
"@angular/forms": "18.2.9",
|
|
43
|
+
"@angular/platform-browser": "18.2.9",
|
|
44
|
+
"@angular/platform-browser-dynamic": "18.2.9",
|
|
45
|
+
"@angular/router": "18.2.9",
|
|
46
|
+
"@bitblit/ngx-acute-common": "5.0.545-alpha",
|
|
47
|
+
"@bitblit/ratchet-common": "5.0.545-alpha",
|
|
48
|
+
"@bitblit/ratchet-warden-common": "5.0.545-alpha",
|
|
49
|
+
"primeflex": "3.3.1",
|
|
50
|
+
"primeicons": "7.0.0",
|
|
51
|
+
"primeng": "17.18.11",
|
|
52
|
+
"rxjs": "7.8.1",
|
|
53
|
+
"zone.js": "0.14.10"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"@angular/animations": "^18.2.9",
|
|
57
|
+
"@angular/common": "^18.2.9",
|
|
58
|
+
"@angular/compiler": "^18.2.9",
|
|
59
|
+
"@angular/core": "^18.2.9",
|
|
60
|
+
"@angular/forms": "^18.2.9",
|
|
61
|
+
"@angular/platform-browser": "^18.2.9",
|
|
62
|
+
"@angular/platform-browser-dynamic": "^18.2.9",
|
|
63
|
+
"@angular/router": "^18.2.9",
|
|
64
|
+
"@bitblit/ngx-acute-common": "5.0.545-alpha",
|
|
65
|
+
"@bitblit/ratchet-common": "5.0.545-alpha",
|
|
66
|
+
"@bitblit/ratchet-warden-common": "5.0.545-alpha",
|
|
67
|
+
"primeflex": "3.3.1",
|
|
68
|
+
"primeicons": "7.0.0",
|
|
69
|
+
"primeng": "17.18.11",
|
|
70
|
+
"rxjs": "7.8.1",
|
|
71
|
+
"zone.js": "0.14.10"
|
|
72
|
+
},
|
|
73
|
+
"devDependencies": {
|
|
74
|
+
"@angular/compiler-cli": "18.2.9",
|
|
75
|
+
"@bitblit/ratchet-node-only": "5.0.545-alpha"
|
|
76
|
+
}
|
|
77
|
+
}
|