@firestitch/2fa 15.0.0 → 15.0.1
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/app/enums/index.d.ts +1 -1
- package/app/enums/verification-method-type.enum.d.ts +5 -5
- package/app/interfaces/index.d.ts +1 -1
- package/app/interfaces/verification-method.interface.d.ts +11 -11
- package/app/modules/code-input/code-input.module.d.ts +11 -11
- package/app/modules/code-input/components/code-input/code-input.component.d.ts +15 -15
- package/app/modules/code-input/components/code-input/index.d.ts +1 -1
- package/app/modules/code-input/index.d.ts +1 -1
- package/app/modules/defaulted/components/defaulted/defaulted.component.d.ts +5 -5
- package/app/modules/defaulted/components/defaulted/index.d.ts +1 -1
- package/app/modules/defaulted/defaulted.module.d.ts +7 -7
- package/app/modules/manage/components/2fa-manage/2fa-manage.component.d.ts +30 -30
- package/app/modules/manage/components/2fa-manage/index.d.ts +1 -1
- package/app/modules/manage/components/app/app.component.d.ts +32 -32
- package/app/modules/manage/components/app/index.d.ts +1 -1
- package/app/modules/manage/components/email/email.component.d.ts +27 -27
- package/app/modules/manage/components/email/index.d.ts +1 -1
- package/app/modules/manage/components/emails/emails.component.d.ts +19 -19
- package/app/modules/manage/components/emails/index.d.ts +1 -1
- package/app/modules/manage/components/manage-methods/index.d.ts +1 -1
- package/app/modules/manage/components/manage-methods/manage-methods.component.d.ts +35 -35
- package/app/modules/manage/components/number/index.d.ts +1 -1
- package/app/modules/manage/components/number/number.component.d.ts +28 -28
- package/app/modules/manage/components/numbers/index.d.ts +1 -1
- package/app/modules/manage/components/numbers/numbers.component.d.ts +20 -20
- package/app/modules/manage/fs-2f-manage.module.d.ts +33 -33
- package/app/modules/manage/services/index.d.ts +1 -1
- package/app/modules/manage/services/two-factor-manage.service.d.ts +52 -52
- package/app/modules/resend/components/resend/index.d.ts +1 -1
- package/app/modules/resend/components/resend/resend.component.d.ts +14 -14
- package/app/modules/resend/resend.module.d.ts +9 -9
- package/app/modules/verification/components/2fa-verification/2fa-verification.component.d.ts +39 -39
- package/app/modules/verification/components/2fa-verification-code/2fa-verification-code.component.d.ts +22 -22
- package/app/modules/verification/components/2fa-verification-methods/2fa-verification-methods.component.d.ts +22 -22
- package/app/modules/verification/directives/2fa-verification-resend.directive.d.ts +11 -11
- package/app/modules/verification/directives/index.d.ts +1 -1
- package/app/modules/verification/fs-2fa-verification.module.d.ts +25 -25
- package/app/modules/verification-methods/components/verification-methods/index.d.ts +1 -1
- package/app/modules/verification-methods/components/verification-methods/verification-methods.component.d.ts +26 -26
- package/app/modules/verification-methods/fs-2f-verification-methods.module.d.ts +14 -14
- package/app/modules/verification-methods/index.d.ts +1 -1
- package/esm2020/app/enums/index.mjs +1 -1
- package/esm2020/app/enums/verification-method-type.enum.mjs +6 -6
- package/esm2020/app/interfaces/index.mjs +1 -1
- package/esm2020/app/interfaces/verification-method.interface.mjs +1 -1
- package/esm2020/app/modules/code-input/code-input.module.mjs +35 -35
- package/esm2020/app/modules/code-input/components/code-input/code-input.component.mjs +39 -39
- package/esm2020/app/modules/code-input/components/code-input/index.mjs +1 -1
- package/esm2020/app/modules/code-input/index.mjs +1 -1
- package/esm2020/app/modules/defaulted/components/defaulted/defaulted.component.mjs +10 -10
- package/esm2020/app/modules/defaulted/components/defaulted/index.mjs +1 -1
- package/esm2020/app/modules/defaulted/defaulted.module.mjs +17 -17
- package/esm2020/app/modules/manage/components/2fa-manage/2fa-manage.component.mjs +97 -97
- package/esm2020/app/modules/manage/components/2fa-manage/index.mjs +1 -1
- package/esm2020/app/modules/manage/components/app/app.component.mjs +83 -83
- package/esm2020/app/modules/manage/components/app/index.mjs +1 -1
- package/esm2020/app/modules/manage/components/email/email.component.mjs +82 -82
- package/esm2020/app/modules/manage/components/email/index.mjs +1 -1
- package/esm2020/app/modules/manage/components/emails/emails.component.mjs +46 -46
- package/esm2020/app/modules/manage/components/emails/index.mjs +1 -1
- package/esm2020/app/modules/manage/components/manage-methods/index.mjs +1 -1
- package/esm2020/app/modules/manage/components/manage-methods/manage-methods.component.mjs +124 -124
- package/esm2020/app/modules/manage/components/number/index.mjs +1 -1
- package/esm2020/app/modules/manage/components/number/number.component.mjs +86 -86
- package/esm2020/app/modules/manage/components/numbers/index.mjs +1 -1
- package/esm2020/app/modules/manage/components/numbers/numbers.component.mjs +47 -47
- package/esm2020/app/modules/manage/fs-2f-manage.module.mjs +115 -115
- package/esm2020/app/modules/manage/services/index.mjs +1 -1
- package/esm2020/app/modules/manage/services/two-factor-manage.service.mjs +160 -160
- package/esm2020/app/modules/resend/components/resend/index.mjs +1 -1
- package/esm2020/app/modules/resend/components/resend/resend.component.mjs +34 -34
- package/esm2020/app/modules/resend/resend.module.mjs +27 -27
- package/esm2020/app/modules/verification/components/2fa-verification/2fa-verification.component.mjs +120 -120
- package/esm2020/app/modules/verification/components/2fa-verification-code/2fa-verification-code.component.mjs +59 -59
- package/esm2020/app/modules/verification/components/2fa-verification-methods/2fa-verification-methods.component.mjs +55 -55
- package/esm2020/app/modules/verification/directives/2fa-verification-resend.directive.mjs +31 -31
- package/esm2020/app/modules/verification/directives/index.mjs +1 -1
- package/esm2020/app/modules/verification/fs-2fa-verification.module.mjs +94 -94
- package/esm2020/app/modules/verification-methods/components/verification-methods/index.mjs +1 -1
- package/esm2020/app/modules/verification-methods/components/verification-methods/verification-methods.component.mjs +116 -116
- package/esm2020/app/modules/verification-methods/fs-2f-verification-methods.module.mjs +45 -45
- package/esm2020/app/modules/verification-methods/index.mjs +1 -1
- package/esm2020/firestitch-2fa.mjs +4 -4
- package/esm2020/public_api.mjs +8 -8
- package/fesm2015/firestitch-2fa.mjs +1248 -1248
- package/fesm2020/firestitch-2fa.mjs +1234 -1234
- package/index.d.ts +5 -5
- package/package.json +1 -1
- package/public_api.d.ts +9 -9
|
@@ -45,1300 +45,1300 @@ import * as i10$1 from '@firestitch/qrcode';
|
|
|
45
45
|
import { FsQrcodeModule } from '@firestitch/qrcode';
|
|
46
46
|
import * as i1$1 from '@firestitch/prompt';
|
|
47
47
|
|
|
48
|
-
var VerificationMethodType;
|
|
49
|
-
(function (VerificationMethodType) {
|
|
50
|
-
VerificationMethodType["Sms"] = "sms";
|
|
51
|
-
VerificationMethodType["Email"] = "email";
|
|
52
|
-
VerificationMethodType["App"] = "app";
|
|
48
|
+
var VerificationMethodType;
|
|
49
|
+
(function (VerificationMethodType) {
|
|
50
|
+
VerificationMethodType["Sms"] = "sms";
|
|
51
|
+
VerificationMethodType["Email"] = "email";
|
|
52
|
+
VerificationMethodType["App"] = "app";
|
|
53
53
|
})(VerificationMethodType || (VerificationMethodType = {}));
|
|
54
54
|
|
|
55
|
-
class CodeInputComponent {
|
|
56
|
-
constructor() {
|
|
57
|
-
this.codeCompleted = new EventEmitter();
|
|
58
|
-
this.codeChanged = new EventEmitter();
|
|
59
|
-
}
|
|
60
|
-
ngOnInit() {
|
|
61
|
-
if (!this.codeLength) {
|
|
62
|
-
this.codeLength = 6;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
codeComplete(code) {
|
|
66
|
-
this.codeCompleted.emit(code);
|
|
67
|
-
}
|
|
68
|
-
focus() {
|
|
69
|
-
this.codeInput.focusOnField(0);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
CodeInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CodeInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
73
|
-
CodeInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CodeInputComponent, selector: "app-code-input", inputs: { codeLength: "codeLength", code: "code" }, outputs: { codeCompleted: "codeCompleted", codeChanged: "codeChanged" }, viewQueries: [{ propertyName: "codeInput", first: true, predicate: FsCodeInputComponent, descendants: true }], ngImport: i0, template: "<fs-code-input\n [codeLength]=\"codeLength\"\n [ngModel]=\"code\"\n name=\"code\"\n [isPrevFocusableAfterClearing]=\"false\"\n (completedLast)=\"codeComplete($event)\"\n (ngModelChange)=\"codeChanged.emit($event)\">\n</fs-code-input>\n", styles: ["code-input{--item-spacing: 10px;--item-height: 20px;--item-border: none;--item-border-bottom: 2px solid #949494;--item-border-has-value: none;--item-border-bottom-has-value: 2px solid #949494;--item-border-focused: none;--item-border-bottom-focused: 2px solid #0061AF;--item-shadow-focused: none;--item-border-radius: 0px}code-input ::ng-deep span:first-child{padding-left:0!important}code-input ::ng-deep span:last-child{padding-right:0!important}code-input ::ng-deep input{font-size:20px!important;height:40px!important;padding:0!important}\n"], dependencies: [{ kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.FsCodeInputComponent, selector: "fs-code-input", inputs: ["codeLength", "inputType", "inputMode", "initialFocusField", "isCharsCode", "isCodeHidden", "isPrevFocusableAfterClearing", "isFocusingOnLastByClickIfFilled", "disabled", "autocapitalize"], outputs: ["changed", "completed", "completedLast"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
74
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CodeInputComponent, decorators: [{
|
|
75
|
-
type: Component,
|
|
76
|
-
args: [{ selector: 'app-code-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<fs-code-input\n [codeLength]=\"codeLength\"\n [ngModel]=\"code\"\n name=\"code\"\n [isPrevFocusableAfterClearing]=\"false\"\n (completedLast)=\"codeComplete($event)\"\n (ngModelChange)=\"codeChanged.emit($event)\">\n</fs-code-input>\n", styles: ["code-input{--item-spacing: 10px;--item-height: 20px;--item-border: none;--item-border-bottom: 2px solid #949494;--item-border-has-value: none;--item-border-bottom-has-value: 2px solid #949494;--item-border-focused: none;--item-border-bottom-focused: 2px solid #0061AF;--item-shadow-focused: none;--item-border-radius: 0px}code-input ::ng-deep span:first-child{padding-left:0!important}code-input ::ng-deep span:last-child{padding-right:0!important}code-input ::ng-deep input{font-size:20px!important;height:40px!important;padding:0!important}\n"] }]
|
|
77
|
-
}], propDecorators: { codeInput: [{
|
|
78
|
-
type: ViewChild,
|
|
79
|
-
args: [FsCodeInputComponent]
|
|
80
|
-
}], codeLength: [{
|
|
81
|
-
type: Input
|
|
82
|
-
}], code: [{
|
|
83
|
-
type: Input
|
|
84
|
-
}], codeCompleted: [{
|
|
85
|
-
type: Output
|
|
86
|
-
}], codeChanged: [{
|
|
87
|
-
type: Output
|
|
55
|
+
class CodeInputComponent {
|
|
56
|
+
constructor() {
|
|
57
|
+
this.codeCompleted = new EventEmitter();
|
|
58
|
+
this.codeChanged = new EventEmitter();
|
|
59
|
+
}
|
|
60
|
+
ngOnInit() {
|
|
61
|
+
if (!this.codeLength) {
|
|
62
|
+
this.codeLength = 6;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
codeComplete(code) {
|
|
66
|
+
this.codeCompleted.emit(code);
|
|
67
|
+
}
|
|
68
|
+
focus() {
|
|
69
|
+
this.codeInput.focusOnField(0);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
CodeInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CodeInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
73
|
+
CodeInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CodeInputComponent, selector: "app-code-input", inputs: { codeLength: "codeLength", code: "code" }, outputs: { codeCompleted: "codeCompleted", codeChanged: "codeChanged" }, viewQueries: [{ propertyName: "codeInput", first: true, predicate: FsCodeInputComponent, descendants: true }], ngImport: i0, template: "<fs-code-input\n [codeLength]=\"codeLength\"\n [ngModel]=\"code\"\n name=\"code\"\n [isPrevFocusableAfterClearing]=\"false\"\n (completedLast)=\"codeComplete($event)\"\n (ngModelChange)=\"codeChanged.emit($event)\">\n</fs-code-input>\n", styles: ["code-input{--item-spacing: 10px;--item-height: 20px;--item-border: none;--item-border-bottom: 2px solid #949494;--item-border-has-value: none;--item-border-bottom-has-value: 2px solid #949494;--item-border-focused: none;--item-border-bottom-focused: 2px solid #0061AF;--item-shadow-focused: none;--item-border-radius: 0px}code-input ::ng-deep span:first-child{padding-left:0!important}code-input ::ng-deep span:last-child{padding-right:0!important}code-input ::ng-deep input{font-size:20px!important;height:40px!important;padding:0!important}\n"], dependencies: [{ kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.FsCodeInputComponent, selector: "fs-code-input", inputs: ["codeLength", "inputType", "inputMode", "initialFocusField", "isCharsCode", "isCodeHidden", "isPrevFocusableAfterClearing", "isFocusingOnLastByClickIfFilled", "disabled", "autocapitalize"], outputs: ["changed", "completed", "completedLast"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
74
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CodeInputComponent, decorators: [{
|
|
75
|
+
type: Component,
|
|
76
|
+
args: [{ selector: 'app-code-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<fs-code-input\n [codeLength]=\"codeLength\"\n [ngModel]=\"code\"\n name=\"code\"\n [isPrevFocusableAfterClearing]=\"false\"\n (completedLast)=\"codeComplete($event)\"\n (ngModelChange)=\"codeChanged.emit($event)\">\n</fs-code-input>\n", styles: ["code-input{--item-spacing: 10px;--item-height: 20px;--item-border: none;--item-border-bottom: 2px solid #949494;--item-border-has-value: none;--item-border-bottom-has-value: 2px solid #949494;--item-border-focused: none;--item-border-bottom-focused: 2px solid #0061AF;--item-shadow-focused: none;--item-border-radius: 0px}code-input ::ng-deep span:first-child{padding-left:0!important}code-input ::ng-deep span:last-child{padding-right:0!important}code-input ::ng-deep input{font-size:20px!important;height:40px!important;padding:0!important}\n"] }]
|
|
77
|
+
}], propDecorators: { codeInput: [{
|
|
78
|
+
type: ViewChild,
|
|
79
|
+
args: [FsCodeInputComponent]
|
|
80
|
+
}], codeLength: [{
|
|
81
|
+
type: Input
|
|
82
|
+
}], code: [{
|
|
83
|
+
type: Input
|
|
84
|
+
}], codeCompleted: [{
|
|
85
|
+
type: Output
|
|
86
|
+
}], codeChanged: [{
|
|
87
|
+
type: Output
|
|
88
88
|
}] } });
|
|
89
89
|
|
|
90
|
-
class Fs2faVerificationCodeComponent {
|
|
91
|
-
constructor(_form) {
|
|
92
|
-
this._form = _form;
|
|
93
|
-
this.codeChanged = new EventEmitter();
|
|
94
|
-
this.codeCompleted = new EventEmitter();
|
|
95
|
-
this.VerificationMethodType = VerificationMethodType;
|
|
96
|
-
}
|
|
97
|
-
codeComplete(code) {
|
|
98
|
-
this.codeCompleted.emit(code);
|
|
99
|
-
}
|
|
100
|
-
codeChange(code) {
|
|
101
|
-
this.code = code;
|
|
102
|
-
this.codeChanged.emit(this.code);
|
|
103
|
-
this._form.dirty();
|
|
104
|
-
}
|
|
105
|
-
focus() {
|
|
106
|
-
this.codeInputComponent.focus();
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
Fs2faVerificationCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationCodeComponent, deps: [{ token: i10.FsFormDirective }], target: i0.ɵɵFactoryTarget.Component });
|
|
110
|
-
Fs2faVerificationCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: Fs2faVerificationCodeComponent, selector: "fs-2fa-verification-code", inputs: { type: "type", recipient: "recipient", codeLength: "codeLength", code: "code" }, outputs: { codeChanged: "codeChanged", codeCompleted: "codeCompleted" }, viewQueries: [{ propertyName: "codeInputComponent", first: true, predicate: CodeInputComponent, descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"type === VerificationMethodType.Sms\">\n <p class=\"description\">\n A text message with a verification code was just sent to <span style=\"white-space: nowrap;\">{{ recipient }}</span> to verify it's you.\n </p>\n\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"type === VerificationMethodType.Email\">\n <p class=\"description\">\n An email with a verification code was just sent to {{ recipient }} to verify it's you.\n </p>\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"type === VerificationMethodType.App\">\n <p class=\"description\">\n Enter the verification code generated by your 2 factor authenticator app to verify it's you.\n </p>\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-template #input> \n <app-code-input \n [code]=\"code\"\n [codeLength]=\"codeLength\"\n (codeChanged)=\"codeChange($event)\"\n (codeCompleted)=\"codeComplete($event)\">\n </app-code-input> \n</ng-template> ", styles: ["mat-form-field{width:100%}mat-form-field ::ng-deep .mat-form-field-subscript-wrapper{min-height:unset!important}mat-form-field ::ng-deep .mat-form-field-subscript-wrapper .fs-form-error{padding-bottom:5px}app-code-input{margin-bottom:5px}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: CodeInputComponent, selector: "app-code-input", inputs: ["codeLength", "code"], outputs: ["codeCompleted", "codeChanged"] }], viewProviders: [
|
|
111
|
-
{
|
|
112
|
-
provide: ControlContainer,
|
|
113
|
-
useExisting: NgForm,
|
|
114
|
-
},
|
|
115
|
-
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
116
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationCodeComponent, decorators: [{
|
|
117
|
-
type: Component,
|
|
118
|
-
args: [{ selector: 'fs-2fa-verification-code', changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [
|
|
119
|
-
{
|
|
120
|
-
provide: ControlContainer,
|
|
121
|
-
useExisting: NgForm,
|
|
122
|
-
},
|
|
123
|
-
], template: "<ng-container *ngIf=\"type === VerificationMethodType.Sms\">\n <p class=\"description\">\n A text message with a verification code was just sent to <span style=\"white-space: nowrap;\">{{ recipient }}</span> to verify it's you.\n </p>\n\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"type === VerificationMethodType.Email\">\n <p class=\"description\">\n An email with a verification code was just sent to {{ recipient }} to verify it's you.\n </p>\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"type === VerificationMethodType.App\">\n <p class=\"description\">\n Enter the verification code generated by your 2 factor authenticator app to verify it's you.\n </p>\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-template #input> \n <app-code-input \n [code]=\"code\"\n [codeLength]=\"codeLength\"\n (codeChanged)=\"codeChange($event)\"\n (codeCompleted)=\"codeComplete($event)\">\n </app-code-input> \n</ng-template> ", styles: ["mat-form-field{width:100%}mat-form-field ::ng-deep .mat-form-field-subscript-wrapper{min-height:unset!important}mat-form-field ::ng-deep .mat-form-field-subscript-wrapper .fs-form-error{padding-bottom:5px}app-code-input{margin-bottom:5px}\n"] }]
|
|
124
|
-
}], ctorParameters: function () { return [{ type: i10.FsFormDirective }]; }, propDecorators: { codeInputComponent: [{
|
|
125
|
-
type: ViewChild,
|
|
126
|
-
args: [CodeInputComponent]
|
|
127
|
-
}], type: [{
|
|
128
|
-
type: Input
|
|
129
|
-
}], recipient: [{
|
|
130
|
-
type: Input
|
|
131
|
-
}], codeLength: [{
|
|
132
|
-
type: Input
|
|
133
|
-
}], code: [{
|
|
134
|
-
type: Input
|
|
135
|
-
}], codeChanged: [{
|
|
136
|
-
type: Output
|
|
137
|
-
}], codeCompleted: [{
|
|
138
|
-
type: Output
|
|
90
|
+
class Fs2faVerificationCodeComponent {
|
|
91
|
+
constructor(_form) {
|
|
92
|
+
this._form = _form;
|
|
93
|
+
this.codeChanged = new EventEmitter();
|
|
94
|
+
this.codeCompleted = new EventEmitter();
|
|
95
|
+
this.VerificationMethodType = VerificationMethodType;
|
|
96
|
+
}
|
|
97
|
+
codeComplete(code) {
|
|
98
|
+
this.codeCompleted.emit(code);
|
|
99
|
+
}
|
|
100
|
+
codeChange(code) {
|
|
101
|
+
this.code = code;
|
|
102
|
+
this.codeChanged.emit(this.code);
|
|
103
|
+
this._form.dirty();
|
|
104
|
+
}
|
|
105
|
+
focus() {
|
|
106
|
+
this.codeInputComponent.focus();
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
Fs2faVerificationCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationCodeComponent, deps: [{ token: i10.FsFormDirective }], target: i0.ɵɵFactoryTarget.Component });
|
|
110
|
+
Fs2faVerificationCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: Fs2faVerificationCodeComponent, selector: "fs-2fa-verification-code", inputs: { type: "type", recipient: "recipient", codeLength: "codeLength", code: "code" }, outputs: { codeChanged: "codeChanged", codeCompleted: "codeCompleted" }, viewQueries: [{ propertyName: "codeInputComponent", first: true, predicate: CodeInputComponent, descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"type === VerificationMethodType.Sms\">\n <p class=\"description\">\n A text message with a verification code was just sent to <span style=\"white-space: nowrap;\">{{ recipient }}</span> to verify it's you.\n </p>\n\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"type === VerificationMethodType.Email\">\n <p class=\"description\">\n An email with a verification code was just sent to {{ recipient }} to verify it's you.\n </p>\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"type === VerificationMethodType.App\">\n <p class=\"description\">\n Enter the verification code generated by your 2 factor authenticator app to verify it's you.\n </p>\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-template #input> \n <app-code-input \n [code]=\"code\"\n [codeLength]=\"codeLength\"\n (codeChanged)=\"codeChange($event)\"\n (codeCompleted)=\"codeComplete($event)\">\n </app-code-input> \n</ng-template> ", styles: ["mat-form-field{width:100%}mat-form-field ::ng-deep .mat-form-field-subscript-wrapper{min-height:unset!important}mat-form-field ::ng-deep .mat-form-field-subscript-wrapper .fs-form-error{padding-bottom:5px}app-code-input{margin-bottom:5px}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: CodeInputComponent, selector: "app-code-input", inputs: ["codeLength", "code"], outputs: ["codeCompleted", "codeChanged"] }], viewProviders: [
|
|
111
|
+
{
|
|
112
|
+
provide: ControlContainer,
|
|
113
|
+
useExisting: NgForm,
|
|
114
|
+
},
|
|
115
|
+
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
116
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationCodeComponent, decorators: [{
|
|
117
|
+
type: Component,
|
|
118
|
+
args: [{ selector: 'fs-2fa-verification-code', changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [
|
|
119
|
+
{
|
|
120
|
+
provide: ControlContainer,
|
|
121
|
+
useExisting: NgForm,
|
|
122
|
+
},
|
|
123
|
+
], template: "<ng-container *ngIf=\"type === VerificationMethodType.Sms\">\n <p class=\"description\">\n A text message with a verification code was just sent to <span style=\"white-space: nowrap;\">{{ recipient }}</span> to verify it's you.\n </p>\n\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"type === VerificationMethodType.Email\">\n <p class=\"description\">\n An email with a verification code was just sent to {{ recipient }} to verify it's you.\n </p>\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"type === VerificationMethodType.App\">\n <p class=\"description\">\n Enter the verification code generated by your 2 factor authenticator app to verify it's you.\n </p>\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-template #input> \n <app-code-input \n [code]=\"code\"\n [codeLength]=\"codeLength\"\n (codeChanged)=\"codeChange($event)\"\n (codeCompleted)=\"codeComplete($event)\">\n </app-code-input> \n</ng-template> ", styles: ["mat-form-field{width:100%}mat-form-field ::ng-deep .mat-form-field-subscript-wrapper{min-height:unset!important}mat-form-field ::ng-deep .mat-form-field-subscript-wrapper .fs-form-error{padding-bottom:5px}app-code-input{margin-bottom:5px}\n"] }]
|
|
124
|
+
}], ctorParameters: function () { return [{ type: i10.FsFormDirective }]; }, propDecorators: { codeInputComponent: [{
|
|
125
|
+
type: ViewChild,
|
|
126
|
+
args: [CodeInputComponent]
|
|
127
|
+
}], type: [{
|
|
128
|
+
type: Input
|
|
129
|
+
}], recipient: [{
|
|
130
|
+
type: Input
|
|
131
|
+
}], codeLength: [{
|
|
132
|
+
type: Input
|
|
133
|
+
}], code: [{
|
|
134
|
+
type: Input
|
|
135
|
+
}], codeChanged: [{
|
|
136
|
+
type: Output
|
|
137
|
+
}], codeCompleted: [{
|
|
138
|
+
type: Output
|
|
139
139
|
}] } });
|
|
140
140
|
|
|
141
|
-
class Fs2faVerificationMethodsComponent {
|
|
142
|
-
constructor(_dialogData, _dialogRef) {
|
|
143
|
-
this._dialogData = _dialogData;
|
|
144
|
-
this._dialogRef = _dialogRef;
|
|
145
|
-
this.verificationMethodType = VerificationMethodType;
|
|
146
|
-
this.setVerificationMethod = () => {
|
|
147
|
-
return this._selectVerificationMethod(this.verificationMethod)
|
|
148
|
-
.pipe(tap((method) => {
|
|
149
|
-
this._dialogRef.close(method);
|
|
150
|
-
}));
|
|
151
|
-
};
|
|
152
|
-
this._selectVerificationMethod = _dialogData.selectVerificationMethod;
|
|
153
|
-
this._setActiveMethod();
|
|
154
|
-
this._initMethods(_dialogData.verificationMethods);
|
|
155
|
-
}
|
|
156
|
-
compareWith(o1, o2) {
|
|
157
|
-
return o1 && o2 && o1.id === o2.id;
|
|
158
|
-
}
|
|
159
|
-
_setActiveMethod() {
|
|
160
|
-
var _a;
|
|
161
|
-
this.verificationMethod = (_a = this._dialogData) === null || _a === void 0 ? void 0 : _a.verificationMethod;
|
|
162
|
-
}
|
|
163
|
-
_initMethods(verificationMethods) {
|
|
164
|
-
this.verificationMethods = verificationMethods
|
|
165
|
-
.reduce((acc, method) => {
|
|
166
|
-
if (!acc[method.type]) {
|
|
167
|
-
acc[method.type] = [];
|
|
168
|
-
}
|
|
169
|
-
acc[method.type].push(method);
|
|
170
|
-
return acc;
|
|
171
|
-
}, {});
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
Fs2faVerificationMethodsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationMethodsComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
175
|
-
Fs2faVerificationMethodsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: Fs2faVerificationMethodsComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog>\n <h1 mat-dialog-title>\n Verification Methods\n </h1>\n <form fsForm [submit]=\"setVerificationMethod\" [dirtySubmitButton]=\"false\">\n <mat-dialog-content>\n <ng-container>\n <fs-radio-group [(ngModel)]=\"verificationMethod\" name=\"method\" [compareWith]=\"compareWith\">\n <ng-container *ngFor=\"let methodMap of verificationMethods | keyvalue\">\n <div class=\"method\">\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n textsms\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Text Message</div>\n <div class=\"method-subtitle\">\n Send verification code to a mobile number\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n mail\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Email</div>\n <div class=\"method-subtitle\">\n Send verification code to an email address\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.App\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n phone_iphone\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Authenticator App</div>\n <div class=\"method-subtitle\">\n Send verification code to your authenticator app\n </div>\n </div>\n </div>\n </ng-container> \n </ng-container>\n\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n {{ method.phoneNumber }}\n </ng-container>\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n {{ method.email }}\n </ng-container>\n <ng-container *ngSwitchCase=\"verificationMethodType.App\">\n Authenticator App\n </ng-container> \n </ng-container>\n </mat-radio-button>\n </div>\n </ng-container>\n </fs-radio-group>\n </ng-container>\n </mat-dialog-content>\n <mat-dialog-actions>\n <div class=\"actions\">\n <button mat-button type=\"submit\" color=\"primary\">Next</button>\n <button mat-button type=\"button\" [mat-dialog-close]=\"null\">Cancel</button>\n </div>\n </mat-dialog-actions>\n </form>\n</fs-dialog>\n", styles: [".method{display:block;margin-bottom:20px}.method .method-header{display:flex;align-items:flex-start}.method .method-header .method-name{margin-left:10px}.method .method-header .method-name .method-title{font-size:14px;font-weight:400}.method .method-header .method-name .method-subtitle{font-size:12px;color:#a3a3a3}.method .method-item{display:block;margin:10px 0 0 35px}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { 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: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { kind: "directive", type: i10.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup", "deactivationGuard"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"], exportAs: ["fsForm"] }, { kind: "directive", type: i10.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "directive", type: i10.FsButtonDirective, selector: "[mat-raised-button]:not([fsFormButtonStandalone]),[mat-button]:not([fsFormButtonStandalone]),[mat-flat-button]:not([fsFormButtonStandalone]),[mat-stroked-button]:not([fsFormButtonStandalone])", inputs: ["name", "dirtySubmit", "form"] }, { kind: "component", type: i8.FsRadioGroupComponent, selector: "fs-radio-group", inputs: ["orientation", "label", "name", "disabled", "radioPosition", "compareWith", "required"] }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i9.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout", "dock", "dockable", "fullscreenPercent"] }, { kind: "pipe", type: i2$1.KeyValuePipe, name: "keyvalue" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
176
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationMethodsComponent, decorators: [{
|
|
177
|
-
type: Component,
|
|
178
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<fs-dialog>\n <h1 mat-dialog-title>\n Verification Methods\n </h1>\n <form fsForm [submit]=\"setVerificationMethod\" [dirtySubmitButton]=\"false\">\n <mat-dialog-content>\n <ng-container>\n <fs-radio-group [(ngModel)]=\"verificationMethod\" name=\"method\" [compareWith]=\"compareWith\">\n <ng-container *ngFor=\"let methodMap of verificationMethods | keyvalue\">\n <div class=\"method\">\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n textsms\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Text Message</div>\n <div class=\"method-subtitle\">\n Send verification code to a mobile number\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n mail\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Email</div>\n <div class=\"method-subtitle\">\n Send verification code to an email address\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.App\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n phone_iphone\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Authenticator App</div>\n <div class=\"method-subtitle\">\n Send verification code to your authenticator app\n </div>\n </div>\n </div>\n </ng-container> \n </ng-container>\n\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n {{ method.phoneNumber }}\n </ng-container>\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n {{ method.email }}\n </ng-container>\n <ng-container *ngSwitchCase=\"verificationMethodType.App\">\n Authenticator App\n </ng-container> \n </ng-container>\n </mat-radio-button>\n </div>\n </ng-container>\n </fs-radio-group>\n </ng-container>\n </mat-dialog-content>\n <mat-dialog-actions>\n <div class=\"actions\">\n <button mat-button type=\"submit\" color=\"primary\">Next</button>\n <button mat-button type=\"button\" [mat-dialog-close]=\"null\">Cancel</button>\n </div>\n </mat-dialog-actions>\n </form>\n</fs-dialog>\n", styles: [".method{display:block;margin-bottom:20px}.method .method-header{display:flex;align-items:flex-start}.method .method-header .method-name{margin-left:10px}.method .method-header .method-name .method-title{font-size:14px;font-weight:400}.method .method-header .method-name .method-subtitle{font-size:12px;color:#a3a3a3}.method .method-item{display:block;margin:10px 0 0 35px}\n"] }]
|
|
179
|
-
}], ctorParameters: function () {
|
|
180
|
-
return [{ type: undefined, decorators: [{
|
|
181
|
-
type: Inject,
|
|
182
|
-
args: [MAT_DIALOG_DATA]
|
|
183
|
-
}] }, { type: i1.MatDialogRef }];
|
|
141
|
+
class Fs2faVerificationMethodsComponent {
|
|
142
|
+
constructor(_dialogData, _dialogRef) {
|
|
143
|
+
this._dialogData = _dialogData;
|
|
144
|
+
this._dialogRef = _dialogRef;
|
|
145
|
+
this.verificationMethodType = VerificationMethodType;
|
|
146
|
+
this.setVerificationMethod = () => {
|
|
147
|
+
return this._selectVerificationMethod(this.verificationMethod)
|
|
148
|
+
.pipe(tap((method) => {
|
|
149
|
+
this._dialogRef.close(method);
|
|
150
|
+
}));
|
|
151
|
+
};
|
|
152
|
+
this._selectVerificationMethod = _dialogData.selectVerificationMethod;
|
|
153
|
+
this._setActiveMethod();
|
|
154
|
+
this._initMethods(_dialogData.verificationMethods);
|
|
155
|
+
}
|
|
156
|
+
compareWith(o1, o2) {
|
|
157
|
+
return o1 && o2 && o1.id === o2.id;
|
|
158
|
+
}
|
|
159
|
+
_setActiveMethod() {
|
|
160
|
+
var _a;
|
|
161
|
+
this.verificationMethod = (_a = this._dialogData) === null || _a === void 0 ? void 0 : _a.verificationMethod;
|
|
162
|
+
}
|
|
163
|
+
_initMethods(verificationMethods) {
|
|
164
|
+
this.verificationMethods = verificationMethods
|
|
165
|
+
.reduce((acc, method) => {
|
|
166
|
+
if (!acc[method.type]) {
|
|
167
|
+
acc[method.type] = [];
|
|
168
|
+
}
|
|
169
|
+
acc[method.type].push(method);
|
|
170
|
+
return acc;
|
|
171
|
+
}, {});
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
Fs2faVerificationMethodsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationMethodsComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
175
|
+
Fs2faVerificationMethodsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: Fs2faVerificationMethodsComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog>\n <h1 mat-dialog-title>\n Verification Methods\n </h1>\n <form fsForm [submit]=\"setVerificationMethod\" [dirtySubmitButton]=\"false\">\n <mat-dialog-content>\n <ng-container>\n <fs-radio-group [(ngModel)]=\"verificationMethod\" name=\"method\" [compareWith]=\"compareWith\">\n <ng-container *ngFor=\"let methodMap of verificationMethods | keyvalue\">\n <div class=\"method\">\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n textsms\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Text Message</div>\n <div class=\"method-subtitle\">\n Send verification code to a mobile number\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n mail\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Email</div>\n <div class=\"method-subtitle\">\n Send verification code to an email address\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.App\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n phone_iphone\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Authenticator App</div>\n <div class=\"method-subtitle\">\n Send verification code to your authenticator app\n </div>\n </div>\n </div>\n </ng-container> \n </ng-container>\n\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n {{ method.phoneNumber }}\n </ng-container>\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n {{ method.email }}\n </ng-container>\n <ng-container *ngSwitchCase=\"verificationMethodType.App\">\n Authenticator App\n </ng-container> \n </ng-container>\n </mat-radio-button>\n </div>\n </ng-container>\n </fs-radio-group>\n </ng-container>\n </mat-dialog-content>\n <mat-dialog-actions>\n <div class=\"actions\">\n <button mat-button type=\"submit\" color=\"primary\">Next</button>\n <button mat-button type=\"button\" [mat-dialog-close]=\"null\">Cancel</button>\n </div>\n </mat-dialog-actions>\n </form>\n</fs-dialog>\n", styles: [".method{display:block;margin-bottom:20px}.method .method-header{display:flex;align-items:flex-start}.method .method-header .method-name{margin-left:10px}.method .method-header .method-name .method-title{font-size:14px;font-weight:400}.method .method-header .method-name .method-subtitle{font-size:12px;color:#a3a3a3}.method .method-item{display:block;margin:10px 0 0 35px}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { 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: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { kind: "directive", type: i10.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup", "deactivationGuard"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"], exportAs: ["fsForm"] }, { kind: "directive", type: i10.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "directive", type: i10.FsButtonDirective, selector: "[mat-raised-button]:not([fsFormButtonStandalone]),[mat-button]:not([fsFormButtonStandalone]),[mat-flat-button]:not([fsFormButtonStandalone]),[mat-stroked-button]:not([fsFormButtonStandalone])", inputs: ["name", "dirtySubmit", "form"] }, { kind: "component", type: i8.FsRadioGroupComponent, selector: "fs-radio-group", inputs: ["orientation", "label", "name", "disabled", "radioPosition", "compareWith", "required"] }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i9.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout", "dock", "dockable", "fullscreenPercent"] }, { kind: "pipe", type: i2$1.KeyValuePipe, name: "keyvalue" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
176
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationMethodsComponent, decorators: [{
|
|
177
|
+
type: Component,
|
|
178
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<fs-dialog>\n <h1 mat-dialog-title>\n Verification Methods\n </h1>\n <form fsForm [submit]=\"setVerificationMethod\" [dirtySubmitButton]=\"false\">\n <mat-dialog-content>\n <ng-container>\n <fs-radio-group [(ngModel)]=\"verificationMethod\" name=\"method\" [compareWith]=\"compareWith\">\n <ng-container *ngFor=\"let methodMap of verificationMethods | keyvalue\">\n <div class=\"method\">\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n textsms\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Text Message</div>\n <div class=\"method-subtitle\">\n Send verification code to a mobile number\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n mail\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Email</div>\n <div class=\"method-subtitle\">\n Send verification code to an email address\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.App\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n phone_iphone\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Authenticator App</div>\n <div class=\"method-subtitle\">\n Send verification code to your authenticator app\n </div>\n </div>\n </div>\n </ng-container> \n </ng-container>\n\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n {{ method.phoneNumber }}\n </ng-container>\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n {{ method.email }}\n </ng-container>\n <ng-container *ngSwitchCase=\"verificationMethodType.App\">\n Authenticator App\n </ng-container> \n </ng-container>\n </mat-radio-button>\n </div>\n </ng-container>\n </fs-radio-group>\n </ng-container>\n </mat-dialog-content>\n <mat-dialog-actions>\n <div class=\"actions\">\n <button mat-button type=\"submit\" color=\"primary\">Next</button>\n <button mat-button type=\"button\" [mat-dialog-close]=\"null\">Cancel</button>\n </div>\n </mat-dialog-actions>\n </form>\n</fs-dialog>\n", styles: [".method{display:block;margin-bottom:20px}.method .method-header{display:flex;align-items:flex-start}.method .method-header .method-name{margin-left:10px}.method .method-header .method-name .method-title{font-size:14px;font-weight:400}.method .method-header .method-name .method-subtitle{font-size:12px;color:#a3a3a3}.method .method-item{display:block;margin:10px 0 0 35px}\n"] }]
|
|
179
|
+
}], ctorParameters: function () {
|
|
180
|
+
return [{ type: undefined, decorators: [{
|
|
181
|
+
type: Inject,
|
|
182
|
+
args: [MAT_DIALOG_DATA]
|
|
183
|
+
}] }, { type: i1.MatDialogRef }];
|
|
184
184
|
} });
|
|
185
185
|
|
|
186
|
-
class Fs2faVerificationComponent {
|
|
187
|
-
constructor(_cdRef, _dialog, _message) {
|
|
188
|
-
this._cdRef = _cdRef;
|
|
189
|
-
this._dialog = _dialog;
|
|
190
|
-
this._message = _message;
|
|
191
|
-
this.showTrustedDevice = true;
|
|
192
|
-
this.trustDevice = true;
|
|
193
|
-
this.formatRecipient = false;
|
|
194
|
-
this.verified = new EventEmitter();
|
|
195
|
-
this.codeChanged = new EventEmitter();
|
|
196
|
-
this.codeCompleted = new EventEmitter();
|
|
197
|
-
this.trustDeviceChange = new EventEmitter();
|
|
198
|
-
this.code = '';
|
|
199
|
-
this.VerificationMethodType = VerificationMethodType;
|
|
200
|
-
this._destroy$ = new Subject();
|
|
201
|
-
}
|
|
202
|
-
get recipient() {
|
|
203
|
-
if (this.verificationMethod.type === VerificationMethodType.Email) {
|
|
204
|
-
return this.verificationMethod.email;
|
|
205
|
-
}
|
|
206
|
-
if (this.verificationMethod.type === VerificationMethodType.Sms) {
|
|
207
|
-
return this.verificationMethod.phoneNumber;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
codeComplete(code) {
|
|
211
|
-
this.code = code;
|
|
212
|
-
this.codeCompleted.emit(this.code);
|
|
213
|
-
}
|
|
214
|
-
ngOnDestroy() {
|
|
215
|
-
this._destroy$.next();
|
|
216
|
-
this._destroy$.complete();
|
|
217
|
-
}
|
|
218
|
-
ngAfterViewInit() {
|
|
219
|
-
this.verificationCodeComponent.focus();
|
|
220
|
-
}
|
|
221
|
-
resendCode() {
|
|
222
|
-
return this.resend()
|
|
223
|
-
.pipe(tap(() => {
|
|
224
|
-
this.code = '';
|
|
225
|
-
this._message.success('Resent Code');
|
|
226
|
-
}), finalize(() => {
|
|
227
|
-
this.verificationCodeComponent.focus();
|
|
228
|
-
}));
|
|
229
|
-
}
|
|
230
|
-
showVerificationMethods() {
|
|
231
|
-
this.getVerificationMethods()
|
|
232
|
-
.pipe(switchMap((verificationMethods) => {
|
|
233
|
-
return this._dialog.open(Fs2faVerificationMethodsComponent, {
|
|
234
|
-
data: {
|
|
235
|
-
verificationMethod: this.verificationMethod,
|
|
236
|
-
verificationMethods,
|
|
237
|
-
selectVerificationMethod: this.selectVerificationMethod,
|
|
238
|
-
},
|
|
239
|
-
})
|
|
240
|
-
.afterClosed()
|
|
241
|
-
.pipe(filter((verificationMethod) => !!verificationMethod));
|
|
242
|
-
}))
|
|
243
|
-
.subscribe((verificationMethod) => {
|
|
244
|
-
this.verificationMethod = verificationMethod;
|
|
245
|
-
this.code = '';
|
|
246
|
-
this._cdRef.markForCheck();
|
|
247
|
-
setTimeout(() => {
|
|
248
|
-
this.verificationCodeComponent.focus();
|
|
249
|
-
});
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
Fs2faVerificationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i9.FsDialog }, { token: i2$2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
|
|
254
|
-
Fs2faVerificationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: Fs2faVerificationComponent, selector: "fs-2fa-verification", inputs: { verificationMethod: "verificationMethod", resend: "resend", showTrustedDevice: "showTrustedDevice", trustDevice: "trustDevice", codeLength: "codeLength", trustDays: "trustDays", formatRecipient: "formatRecipient", getVerificationMethods: "getVerificationMethods", selectVerificationMethod: "selectVerificationMethod" }, outputs: { verified: "verified", codeChanged: "codeChanged", codeCompleted: "codeCompleted", trustDeviceChange: "trustDeviceChange" }, viewQueries: [{ propertyName: "verificationCodeComponent", first: true, predicate: Fs2faVerificationCodeComponent, descendants: true }], ngImport: i0, template: "<div class=\"code-container\">\n <fs-2fa-verification-code\n [recipient]=\"(formatRecipient && verificationMethod.type === VerificationMethodType.Sms) ? (recipient | fsPhone) : recipient\"\n [type]=\"verificationMethod.type\"\n [code]=\"code\"\n [codeLength]=\"codeLength\"\n (codeChanged)=\"codeChanged.emit($event)\"\n (codeCompleted)=\"codeComplete($event)\">\n </fs-2fa-verification-code>\n</div>\n\n<div class=\"additional\">\n <div \n class=\"trust-device\"\n *ngIf=\"showTrustedDevice\">\n <mat-checkbox\n name=\"trust-device\"\n [(ngModel)]=\"trustDevice\"\n (ngModelChange)=\"trustDeviceChange.emit($event)\">\n <div class=\"small\">\n Bypass verification \n <ng-container *ngIf=\"trustDays\">for {{trustDays}} days</ng-container> \n <ng-container *ngIf=\"!trustDays\">for future signins</ng-container> \n unless cookies are cleared\n </div>\n </mat-checkbox>\n </div>\n</div>", styles: [":host ::ng-deep .mat-checkbox{margin:2px 0}:host ::ng-deep .mat-checkbox .mat-checkbox-label{line-height:normal}:host ::ng-deep .mat-checkbox .mat-checkbox-layout{white-space:normal}.code-container{text-align:center}.additional{display:flex;justify-content:space-between;align-items:center;margin:4px 0 5px}.additional small{color:inherit}.additional .resend{cursor:pointer;text-transform:none}.additional .resend mat-spinner{display:inline-block;vertical-align:middle}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i10.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "component", type: Fs2faVerificationCodeComponent, selector: "fs-2fa-verification-code", inputs: ["type", "recipient", "codeLength", "code"], outputs: ["codeChanged", "codeCompleted"] }, { kind: "pipe", type: i8$2.FsPhonePipe, name: "fsPhone" }], viewProviders: [{ provide: ControlContainer, useExisting: NgForm }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
255
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationComponent, decorators: [{
|
|
256
|
-
type: Component,
|
|
257
|
-
args: [{ selector: 'fs-2fa-verification', changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [{ provide: ControlContainer, useExisting: NgForm }], template: "<div class=\"code-container\">\n <fs-2fa-verification-code\n [recipient]=\"(formatRecipient && verificationMethod.type === VerificationMethodType.Sms) ? (recipient | fsPhone) : recipient\"\n [type]=\"verificationMethod.type\"\n [code]=\"code\"\n [codeLength]=\"codeLength\"\n (codeChanged)=\"codeChanged.emit($event)\"\n (codeCompleted)=\"codeComplete($event)\">\n </fs-2fa-verification-code>\n</div>\n\n<div class=\"additional\">\n <div \n class=\"trust-device\"\n *ngIf=\"showTrustedDevice\">\n <mat-checkbox\n name=\"trust-device\"\n [(ngModel)]=\"trustDevice\"\n (ngModelChange)=\"trustDeviceChange.emit($event)\">\n <div class=\"small\">\n Bypass verification \n <ng-container *ngIf=\"trustDays\">for {{trustDays}} days</ng-container> \n <ng-container *ngIf=\"!trustDays\">for future signins</ng-container> \n unless cookies are cleared\n </div>\n </mat-checkbox>\n </div>\n</div>", styles: [":host ::ng-deep .mat-checkbox{margin:2px 0}:host ::ng-deep .mat-checkbox .mat-checkbox-label{line-height:normal}:host ::ng-deep .mat-checkbox .mat-checkbox-layout{white-space:normal}.code-container{text-align:center}.additional{display:flex;justify-content:space-between;align-items:center;margin:4px 0 5px}.additional small{color:inherit}.additional .resend{cursor:pointer;text-transform:none}.additional .resend mat-spinner{display:inline-block;vertical-align:middle}\n"] }]
|
|
258
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i9.FsDialog }, { type: i2$2.FsMessage }]; }, propDecorators: { verificationCodeComponent: [{
|
|
259
|
-
type: ViewChild,
|
|
260
|
-
args: [Fs2faVerificationCodeComponent]
|
|
261
|
-
}], verificationMethod: [{
|
|
262
|
-
type: Input
|
|
263
|
-
}], resend: [{
|
|
264
|
-
type: Input
|
|
265
|
-
}], showTrustedDevice: [{
|
|
266
|
-
type: Input
|
|
267
|
-
}], trustDevice: [{
|
|
268
|
-
type: Input
|
|
269
|
-
}], codeLength: [{
|
|
270
|
-
type: Input
|
|
271
|
-
}], trustDays: [{
|
|
272
|
-
type: Input
|
|
273
|
-
}], formatRecipient: [{
|
|
274
|
-
type: Input
|
|
275
|
-
}], getVerificationMethods: [{
|
|
276
|
-
type: Input
|
|
277
|
-
}], selectVerificationMethod: [{
|
|
278
|
-
type: Input
|
|
279
|
-
}], verified: [{
|
|
280
|
-
type: Output
|
|
281
|
-
}], codeChanged: [{
|
|
282
|
-
type: Output
|
|
283
|
-
}], codeCompleted: [{
|
|
284
|
-
type: Output
|
|
285
|
-
}], trustDeviceChange: [{
|
|
286
|
-
type: Output
|
|
186
|
+
class Fs2faVerificationComponent {
|
|
187
|
+
constructor(_cdRef, _dialog, _message) {
|
|
188
|
+
this._cdRef = _cdRef;
|
|
189
|
+
this._dialog = _dialog;
|
|
190
|
+
this._message = _message;
|
|
191
|
+
this.showTrustedDevice = true;
|
|
192
|
+
this.trustDevice = true;
|
|
193
|
+
this.formatRecipient = false;
|
|
194
|
+
this.verified = new EventEmitter();
|
|
195
|
+
this.codeChanged = new EventEmitter();
|
|
196
|
+
this.codeCompleted = new EventEmitter();
|
|
197
|
+
this.trustDeviceChange = new EventEmitter();
|
|
198
|
+
this.code = '';
|
|
199
|
+
this.VerificationMethodType = VerificationMethodType;
|
|
200
|
+
this._destroy$ = new Subject();
|
|
201
|
+
}
|
|
202
|
+
get recipient() {
|
|
203
|
+
if (this.verificationMethod.type === VerificationMethodType.Email) {
|
|
204
|
+
return this.verificationMethod.email;
|
|
205
|
+
}
|
|
206
|
+
if (this.verificationMethod.type === VerificationMethodType.Sms) {
|
|
207
|
+
return this.verificationMethod.phoneNumber;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
codeComplete(code) {
|
|
211
|
+
this.code = code;
|
|
212
|
+
this.codeCompleted.emit(this.code);
|
|
213
|
+
}
|
|
214
|
+
ngOnDestroy() {
|
|
215
|
+
this._destroy$.next();
|
|
216
|
+
this._destroy$.complete();
|
|
217
|
+
}
|
|
218
|
+
ngAfterViewInit() {
|
|
219
|
+
this.verificationCodeComponent.focus();
|
|
220
|
+
}
|
|
221
|
+
resendCode() {
|
|
222
|
+
return this.resend()
|
|
223
|
+
.pipe(tap(() => {
|
|
224
|
+
this.code = '';
|
|
225
|
+
this._message.success('Resent Code');
|
|
226
|
+
}), finalize(() => {
|
|
227
|
+
this.verificationCodeComponent.focus();
|
|
228
|
+
}));
|
|
229
|
+
}
|
|
230
|
+
showVerificationMethods() {
|
|
231
|
+
this.getVerificationMethods()
|
|
232
|
+
.pipe(switchMap((verificationMethods) => {
|
|
233
|
+
return this._dialog.open(Fs2faVerificationMethodsComponent, {
|
|
234
|
+
data: {
|
|
235
|
+
verificationMethod: this.verificationMethod,
|
|
236
|
+
verificationMethods,
|
|
237
|
+
selectVerificationMethod: this.selectVerificationMethod,
|
|
238
|
+
},
|
|
239
|
+
})
|
|
240
|
+
.afterClosed()
|
|
241
|
+
.pipe(filter((verificationMethod) => !!verificationMethod));
|
|
242
|
+
}))
|
|
243
|
+
.subscribe((verificationMethod) => {
|
|
244
|
+
this.verificationMethod = verificationMethod;
|
|
245
|
+
this.code = '';
|
|
246
|
+
this._cdRef.markForCheck();
|
|
247
|
+
setTimeout(() => {
|
|
248
|
+
this.verificationCodeComponent.focus();
|
|
249
|
+
});
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
Fs2faVerificationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i9.FsDialog }, { token: i2$2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
|
|
254
|
+
Fs2faVerificationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: Fs2faVerificationComponent, selector: "fs-2fa-verification", inputs: { verificationMethod: "verificationMethod", resend: "resend", showTrustedDevice: "showTrustedDevice", trustDevice: "trustDevice", codeLength: "codeLength", trustDays: "trustDays", formatRecipient: "formatRecipient", getVerificationMethods: "getVerificationMethods", selectVerificationMethod: "selectVerificationMethod" }, outputs: { verified: "verified", codeChanged: "codeChanged", codeCompleted: "codeCompleted", trustDeviceChange: "trustDeviceChange" }, viewQueries: [{ propertyName: "verificationCodeComponent", first: true, predicate: Fs2faVerificationCodeComponent, descendants: true }], ngImport: i0, template: "<div class=\"code-container\">\n <fs-2fa-verification-code\n [recipient]=\"(formatRecipient && verificationMethod.type === VerificationMethodType.Sms) ? (recipient | fsPhone) : recipient\"\n [type]=\"verificationMethod.type\"\n [code]=\"code\"\n [codeLength]=\"codeLength\"\n (codeChanged)=\"codeChanged.emit($event)\"\n (codeCompleted)=\"codeComplete($event)\">\n </fs-2fa-verification-code>\n</div>\n\n<div class=\"additional\">\n <div \n class=\"trust-device\"\n *ngIf=\"showTrustedDevice\">\n <mat-checkbox\n name=\"trust-device\"\n [(ngModel)]=\"trustDevice\"\n (ngModelChange)=\"trustDeviceChange.emit($event)\">\n <div class=\"small\">\n Bypass verification \n <ng-container *ngIf=\"trustDays\">for {{trustDays}} days</ng-container> \n <ng-container *ngIf=\"!trustDays\">for future signins</ng-container> \n unless cookies are cleared\n </div>\n </mat-checkbox>\n </div>\n</div>", styles: [":host ::ng-deep .mat-checkbox{margin:2px 0}:host ::ng-deep .mat-checkbox .mat-checkbox-label{line-height:normal}:host ::ng-deep .mat-checkbox .mat-checkbox-layout{white-space:normal}.code-container{text-align:center}.additional{display:flex;justify-content:space-between;align-items:center;margin:4px 0 5px}.additional small{color:inherit}.additional .resend{cursor:pointer;text-transform:none}.additional .resend mat-spinner{display:inline-block;vertical-align:middle}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i10.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "component", type: Fs2faVerificationCodeComponent, selector: "fs-2fa-verification-code", inputs: ["type", "recipient", "codeLength", "code"], outputs: ["codeChanged", "codeCompleted"] }, { kind: "pipe", type: i8$2.FsPhonePipe, name: "fsPhone" }], viewProviders: [{ provide: ControlContainer, useExisting: NgForm }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
255
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationComponent, decorators: [{
|
|
256
|
+
type: Component,
|
|
257
|
+
args: [{ selector: 'fs-2fa-verification', changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [{ provide: ControlContainer, useExisting: NgForm }], template: "<div class=\"code-container\">\n <fs-2fa-verification-code\n [recipient]=\"(formatRecipient && verificationMethod.type === VerificationMethodType.Sms) ? (recipient | fsPhone) : recipient\"\n [type]=\"verificationMethod.type\"\n [code]=\"code\"\n [codeLength]=\"codeLength\"\n (codeChanged)=\"codeChanged.emit($event)\"\n (codeCompleted)=\"codeComplete($event)\">\n </fs-2fa-verification-code>\n</div>\n\n<div class=\"additional\">\n <div \n class=\"trust-device\"\n *ngIf=\"showTrustedDevice\">\n <mat-checkbox\n name=\"trust-device\"\n [(ngModel)]=\"trustDevice\"\n (ngModelChange)=\"trustDeviceChange.emit($event)\">\n <div class=\"small\">\n Bypass verification \n <ng-container *ngIf=\"trustDays\">for {{trustDays}} days</ng-container> \n <ng-container *ngIf=\"!trustDays\">for future signins</ng-container> \n unless cookies are cleared\n </div>\n </mat-checkbox>\n </div>\n</div>", styles: [":host ::ng-deep .mat-checkbox{margin:2px 0}:host ::ng-deep .mat-checkbox .mat-checkbox-label{line-height:normal}:host ::ng-deep .mat-checkbox .mat-checkbox-layout{white-space:normal}.code-container{text-align:center}.additional{display:flex;justify-content:space-between;align-items:center;margin:4px 0 5px}.additional small{color:inherit}.additional .resend{cursor:pointer;text-transform:none}.additional .resend mat-spinner{display:inline-block;vertical-align:middle}\n"] }]
|
|
258
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i9.FsDialog }, { type: i2$2.FsMessage }]; }, propDecorators: { verificationCodeComponent: [{
|
|
259
|
+
type: ViewChild,
|
|
260
|
+
args: [Fs2faVerificationCodeComponent]
|
|
261
|
+
}], verificationMethod: [{
|
|
262
|
+
type: Input
|
|
263
|
+
}], resend: [{
|
|
264
|
+
type: Input
|
|
265
|
+
}], showTrustedDevice: [{
|
|
266
|
+
type: Input
|
|
267
|
+
}], trustDevice: [{
|
|
268
|
+
type: Input
|
|
269
|
+
}], codeLength: [{
|
|
270
|
+
type: Input
|
|
271
|
+
}], trustDays: [{
|
|
272
|
+
type: Input
|
|
273
|
+
}], formatRecipient: [{
|
|
274
|
+
type: Input
|
|
275
|
+
}], getVerificationMethods: [{
|
|
276
|
+
type: Input
|
|
277
|
+
}], selectVerificationMethod: [{
|
|
278
|
+
type: Input
|
|
279
|
+
}], verified: [{
|
|
280
|
+
type: Output
|
|
281
|
+
}], codeChanged: [{
|
|
282
|
+
type: Output
|
|
283
|
+
}], codeCompleted: [{
|
|
284
|
+
type: Output
|
|
285
|
+
}], trustDeviceChange: [{
|
|
286
|
+
type: Output
|
|
287
287
|
}] } });
|
|
288
288
|
|
|
289
|
-
class CodeInputModule {
|
|
290
|
-
}
|
|
291
|
-
CodeInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CodeInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
292
|
-
CodeInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CodeInputModule, declarations: [CodeInputComponent], imports: [FormsModule,
|
|
293
|
-
MatFormFieldModule,
|
|
294
|
-
MatInputModule,
|
|
295
|
-
FsCodeInputModule], exports: [CodeInputComponent] });
|
|
296
|
-
CodeInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CodeInputModule, imports: [FormsModule,
|
|
297
|
-
MatFormFieldModule,
|
|
298
|
-
MatInputModule,
|
|
299
|
-
FsCodeInputModule] });
|
|
300
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CodeInputModule, decorators: [{
|
|
301
|
-
type: NgModule,
|
|
302
|
-
args: [{
|
|
303
|
-
imports: [
|
|
304
|
-
FormsModule,
|
|
305
|
-
MatFormFieldModule,
|
|
306
|
-
MatInputModule,
|
|
307
|
-
FsCodeInputModule,
|
|
308
|
-
],
|
|
309
|
-
declarations: [
|
|
310
|
-
CodeInputComponent,
|
|
311
|
-
],
|
|
312
|
-
exports: [
|
|
313
|
-
CodeInputComponent,
|
|
314
|
-
],
|
|
315
|
-
}]
|
|
289
|
+
class CodeInputModule {
|
|
290
|
+
}
|
|
291
|
+
CodeInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CodeInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
292
|
+
CodeInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CodeInputModule, declarations: [CodeInputComponent], imports: [FormsModule,
|
|
293
|
+
MatFormFieldModule,
|
|
294
|
+
MatInputModule,
|
|
295
|
+
FsCodeInputModule], exports: [CodeInputComponent] });
|
|
296
|
+
CodeInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CodeInputModule, imports: [FormsModule,
|
|
297
|
+
MatFormFieldModule,
|
|
298
|
+
MatInputModule,
|
|
299
|
+
FsCodeInputModule] });
|
|
300
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CodeInputModule, decorators: [{
|
|
301
|
+
type: NgModule,
|
|
302
|
+
args: [{
|
|
303
|
+
imports: [
|
|
304
|
+
FormsModule,
|
|
305
|
+
MatFormFieldModule,
|
|
306
|
+
MatInputModule,
|
|
307
|
+
FsCodeInputModule,
|
|
308
|
+
],
|
|
309
|
+
declarations: [
|
|
310
|
+
CodeInputComponent,
|
|
311
|
+
],
|
|
312
|
+
exports: [
|
|
313
|
+
CodeInputComponent,
|
|
314
|
+
],
|
|
315
|
+
}]
|
|
316
316
|
}] });
|
|
317
317
|
|
|
318
|
-
class ResendComponent {
|
|
319
|
-
constructor(_cdRef) {
|
|
320
|
-
this._cdRef = _cdRef;
|
|
321
|
-
this.resendInProgress = false;
|
|
322
|
-
this._destroy$ = new Subject();
|
|
323
|
-
}
|
|
324
|
-
resendClick() {
|
|
325
|
-
this.resendInProgress = true;
|
|
326
|
-
this.resend()
|
|
327
|
-
.pipe(finalize(() => {
|
|
328
|
-
this.resendInProgress = false;
|
|
329
|
-
this._cdRef.markForCheck();
|
|
330
|
-
}), takeUntil(this._destroy$))
|
|
331
|
-
.subscribe();
|
|
332
|
-
}
|
|
333
|
-
ngOnDestroy() {
|
|
334
|
-
this._destroy$.next();
|
|
335
|
-
this._destroy$.complete();
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
ResendComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ResendComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
339
|
-
ResendComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ResendComponent, selector: "app-resend", inputs: { resend: "resend" }, ngImport: i0, template: "<ng-container *ngIf=\"!resendInProgress else sending\">\n Didn't receive a code? <a (click)=\"resendClick()\">Resend</a>\n</ng-container>\n<ng-template #sending>\n <div class=\"sending\">\n <mat-spinner [diameter]=\"12\"></mat-spinner> Sending\n </div>\n</ng-template>\n\n", styles: ["small{color:inherit}.sending{display:inline-flex;align-items:center}.sending mat-spinner{margin-right:2px}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$3.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
340
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ResendComponent, decorators: [{
|
|
341
|
-
type: Component,
|
|
342
|
-
args: [{ selector: 'app-resend', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"!resendInProgress else sending\">\n Didn't receive a code? <a (click)=\"resendClick()\">Resend</a>\n</ng-container>\n<ng-template #sending>\n <div class=\"sending\">\n <mat-spinner [diameter]=\"12\"></mat-spinner> Sending\n </div>\n</ng-template>\n\n", styles: ["small{color:inherit}.sending{display:inline-flex;align-items:center}.sending mat-spinner{margin-right:2px}\n"] }]
|
|
343
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { resend: [{
|
|
344
|
-
type: Input
|
|
318
|
+
class ResendComponent {
|
|
319
|
+
constructor(_cdRef) {
|
|
320
|
+
this._cdRef = _cdRef;
|
|
321
|
+
this.resendInProgress = false;
|
|
322
|
+
this._destroy$ = new Subject();
|
|
323
|
+
}
|
|
324
|
+
resendClick() {
|
|
325
|
+
this.resendInProgress = true;
|
|
326
|
+
this.resend()
|
|
327
|
+
.pipe(finalize(() => {
|
|
328
|
+
this.resendInProgress = false;
|
|
329
|
+
this._cdRef.markForCheck();
|
|
330
|
+
}), takeUntil(this._destroy$))
|
|
331
|
+
.subscribe();
|
|
332
|
+
}
|
|
333
|
+
ngOnDestroy() {
|
|
334
|
+
this._destroy$.next();
|
|
335
|
+
this._destroy$.complete();
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
ResendComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ResendComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
339
|
+
ResendComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ResendComponent, selector: "app-resend", inputs: { resend: "resend" }, ngImport: i0, template: "<ng-container *ngIf=\"!resendInProgress else sending\">\n Didn't receive a code? <a (click)=\"resendClick()\">Resend</a>\n</ng-container>\n<ng-template #sending>\n <div class=\"sending\">\n <mat-spinner [diameter]=\"12\"></mat-spinner> Sending\n </div>\n</ng-template>\n\n", styles: ["small{color:inherit}.sending{display:inline-flex;align-items:center}.sending mat-spinner{margin-right:2px}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$3.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
340
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ResendComponent, decorators: [{
|
|
341
|
+
type: Component,
|
|
342
|
+
args: [{ selector: 'app-resend', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"!resendInProgress else sending\">\n Didn't receive a code? <a (click)=\"resendClick()\">Resend</a>\n</ng-container>\n<ng-template #sending>\n <div class=\"sending\">\n <mat-spinner [diameter]=\"12\"></mat-spinner> Sending\n </div>\n</ng-template>\n\n", styles: ["small{color:inherit}.sending{display:inline-flex;align-items:center}.sending mat-spinner{margin-right:2px}\n"] }]
|
|
343
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { resend: [{
|
|
344
|
+
type: Input
|
|
345
345
|
}] } });
|
|
346
346
|
|
|
347
|
-
class ResendModule {
|
|
348
|
-
}
|
|
349
|
-
ResendModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ResendModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
350
|
-
ResendModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: ResendModule, declarations: [ResendComponent], imports: [CommonModule,
|
|
351
|
-
MatProgressSpinnerModule], exports: [ResendComponent] });
|
|
352
|
-
ResendModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ResendModule, imports: [CommonModule,
|
|
353
|
-
MatProgressSpinnerModule] });
|
|
354
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ResendModule, decorators: [{
|
|
355
|
-
type: NgModule,
|
|
356
|
-
args: [{
|
|
357
|
-
imports: [
|
|
358
|
-
CommonModule,
|
|
359
|
-
MatProgressSpinnerModule,
|
|
360
|
-
],
|
|
361
|
-
declarations: [
|
|
362
|
-
ResendComponent,
|
|
363
|
-
],
|
|
364
|
-
exports: [
|
|
365
|
-
ResendComponent,
|
|
366
|
-
],
|
|
367
|
-
}]
|
|
347
|
+
class ResendModule {
|
|
348
|
+
}
|
|
349
|
+
ResendModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ResendModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
350
|
+
ResendModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: ResendModule, declarations: [ResendComponent], imports: [CommonModule,
|
|
351
|
+
MatProgressSpinnerModule], exports: [ResendComponent] });
|
|
352
|
+
ResendModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ResendModule, imports: [CommonModule,
|
|
353
|
+
MatProgressSpinnerModule] });
|
|
354
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ResendModule, decorators: [{
|
|
355
|
+
type: NgModule,
|
|
356
|
+
args: [{
|
|
357
|
+
imports: [
|
|
358
|
+
CommonModule,
|
|
359
|
+
MatProgressSpinnerModule,
|
|
360
|
+
],
|
|
361
|
+
declarations: [
|
|
362
|
+
ResendComponent,
|
|
363
|
+
],
|
|
364
|
+
exports: [
|
|
365
|
+
ResendComponent,
|
|
366
|
+
],
|
|
367
|
+
}]
|
|
368
368
|
}] });
|
|
369
369
|
|
|
370
|
-
class Fs2faVerificationResendDirective {
|
|
371
|
-
click() {
|
|
372
|
-
this._button.disabled = true;
|
|
373
|
-
this.verification.resendCode()
|
|
374
|
-
.pipe(finalize(() => this._button.disabled = false))
|
|
375
|
-
.subscribe();
|
|
376
|
-
}
|
|
377
|
-
constructor(_button) {
|
|
378
|
-
this._button = _button;
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
Fs2faVerificationResendDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationResendDirective, deps: [{ token: i5.MatButton }], target: i0.ɵɵFactoryTarget.Directive });
|
|
382
|
-
Fs2faVerificationResendDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: Fs2faVerificationResendDirective, selector: "[fs2faVerificationResend]", inputs: { verification: ["fs2faVerificationResend", "verification"] }, host: { listeners: { "click": "click()" } }, ngImport: i0 });
|
|
383
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationResendDirective, decorators: [{
|
|
384
|
-
type: Directive,
|
|
385
|
-
args: [{
|
|
386
|
-
selector: '[fs2faVerificationResend]',
|
|
387
|
-
}]
|
|
388
|
-
}], ctorParameters: function () { return [{ type: i5.MatButton }]; }, propDecorators: { verification: [{
|
|
389
|
-
type: Input,
|
|
390
|
-
args: ['fs2faVerificationResend']
|
|
391
|
-
}], click: [{
|
|
392
|
-
type: HostListener,
|
|
393
|
-
args: ['click']
|
|
370
|
+
class Fs2faVerificationResendDirective {
|
|
371
|
+
click() {
|
|
372
|
+
this._button.disabled = true;
|
|
373
|
+
this.verification.resendCode()
|
|
374
|
+
.pipe(finalize(() => this._button.disabled = false))
|
|
375
|
+
.subscribe();
|
|
376
|
+
}
|
|
377
|
+
constructor(_button) {
|
|
378
|
+
this._button = _button;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
Fs2faVerificationResendDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationResendDirective, deps: [{ token: i5.MatButton }], target: i0.ɵɵFactoryTarget.Directive });
|
|
382
|
+
Fs2faVerificationResendDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: Fs2faVerificationResendDirective, selector: "[fs2faVerificationResend]", inputs: { verification: ["fs2faVerificationResend", "verification"] }, host: { listeners: { "click": "click()" } }, ngImport: i0 });
|
|
383
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationResendDirective, decorators: [{
|
|
384
|
+
type: Directive,
|
|
385
|
+
args: [{
|
|
386
|
+
selector: '[fs2faVerificationResend]',
|
|
387
|
+
}]
|
|
388
|
+
}], ctorParameters: function () { return [{ type: i5.MatButton }]; }, propDecorators: { verification: [{
|
|
389
|
+
type: Input,
|
|
390
|
+
args: ['fs2faVerificationResend']
|
|
391
|
+
}], click: [{
|
|
392
|
+
type: HostListener,
|
|
393
|
+
args: ['click']
|
|
394
394
|
}] } });
|
|
395
395
|
|
|
396
|
-
class Fs2faVerificationModule {
|
|
397
|
-
}
|
|
398
|
-
Fs2faVerificationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
399
|
-
Fs2faVerificationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationModule, declarations: [Fs2faVerificationComponent,
|
|
400
|
-
Fs2faVerificationCodeComponent,
|
|
401
|
-
Fs2faVerificationMethodsComponent,
|
|
402
|
-
Fs2faVerificationResendDirective], imports: [CommonModule,
|
|
403
|
-
FormsModule,
|
|
404
|
-
MatFormFieldModule,
|
|
405
|
-
MatInputModule,
|
|
406
|
-
MatButtonModule,
|
|
407
|
-
MatIconModule,
|
|
408
|
-
MatRadioModule,
|
|
409
|
-
MatCheckboxModule,
|
|
410
|
-
FsFormModule,
|
|
411
|
-
FsRadioGroupModule,
|
|
412
|
-
FsDialogModule,
|
|
413
|
-
FsSkeletonModule,
|
|
414
|
-
FsPhoneModule,
|
|
415
|
-
FsSkeletonModule,
|
|
416
|
-
ResendModule,
|
|
417
|
-
CodeInputModule], exports: [Fs2faVerificationComponent,
|
|
418
|
-
Fs2faVerificationResendDirective] });
|
|
419
|
-
Fs2faVerificationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationModule, imports: [CommonModule,
|
|
420
|
-
FormsModule,
|
|
421
|
-
MatFormFieldModule,
|
|
422
|
-
MatInputModule,
|
|
423
|
-
MatButtonModule,
|
|
424
|
-
MatIconModule,
|
|
425
|
-
MatRadioModule,
|
|
426
|
-
MatCheckboxModule,
|
|
427
|
-
FsFormModule,
|
|
428
|
-
FsRadioGroupModule,
|
|
429
|
-
FsDialogModule,
|
|
430
|
-
FsSkeletonModule,
|
|
431
|
-
FsPhoneModule,
|
|
432
|
-
FsSkeletonModule,
|
|
433
|
-
ResendModule,
|
|
434
|
-
CodeInputModule] });
|
|
435
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationModule, decorators: [{
|
|
436
|
-
type: NgModule,
|
|
437
|
-
args: [{
|
|
438
|
-
imports: [
|
|
439
|
-
CommonModule,
|
|
440
|
-
FormsModule,
|
|
441
|
-
MatFormFieldModule,
|
|
442
|
-
MatInputModule,
|
|
443
|
-
MatButtonModule,
|
|
444
|
-
MatIconModule,
|
|
445
|
-
MatRadioModule,
|
|
446
|
-
MatCheckboxModule,
|
|
447
|
-
FsFormModule,
|
|
448
|
-
FsRadioGroupModule,
|
|
449
|
-
FsDialogModule,
|
|
450
|
-
FsSkeletonModule,
|
|
451
|
-
FsPhoneModule,
|
|
452
|
-
FsSkeletonModule,
|
|
453
|
-
ResendModule,
|
|
454
|
-
CodeInputModule,
|
|
455
|
-
],
|
|
456
|
-
declarations: [
|
|
457
|
-
Fs2faVerificationComponent,
|
|
458
|
-
Fs2faVerificationCodeComponent,
|
|
459
|
-
Fs2faVerificationMethodsComponent,
|
|
460
|
-
Fs2faVerificationResendDirective,
|
|
461
|
-
],
|
|
462
|
-
exports: [
|
|
463
|
-
Fs2faVerificationComponent,
|
|
464
|
-
Fs2faVerificationResendDirective,
|
|
465
|
-
],
|
|
466
|
-
providers: [],
|
|
467
|
-
}]
|
|
396
|
+
class Fs2faVerificationModule {
|
|
397
|
+
}
|
|
398
|
+
Fs2faVerificationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
399
|
+
Fs2faVerificationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationModule, declarations: [Fs2faVerificationComponent,
|
|
400
|
+
Fs2faVerificationCodeComponent,
|
|
401
|
+
Fs2faVerificationMethodsComponent,
|
|
402
|
+
Fs2faVerificationResendDirective], imports: [CommonModule,
|
|
403
|
+
FormsModule,
|
|
404
|
+
MatFormFieldModule,
|
|
405
|
+
MatInputModule,
|
|
406
|
+
MatButtonModule,
|
|
407
|
+
MatIconModule,
|
|
408
|
+
MatRadioModule,
|
|
409
|
+
MatCheckboxModule,
|
|
410
|
+
FsFormModule,
|
|
411
|
+
FsRadioGroupModule,
|
|
412
|
+
FsDialogModule,
|
|
413
|
+
FsSkeletonModule,
|
|
414
|
+
FsPhoneModule,
|
|
415
|
+
FsSkeletonModule,
|
|
416
|
+
ResendModule,
|
|
417
|
+
CodeInputModule], exports: [Fs2faVerificationComponent,
|
|
418
|
+
Fs2faVerificationResendDirective] });
|
|
419
|
+
Fs2faVerificationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationModule, imports: [CommonModule,
|
|
420
|
+
FormsModule,
|
|
421
|
+
MatFormFieldModule,
|
|
422
|
+
MatInputModule,
|
|
423
|
+
MatButtonModule,
|
|
424
|
+
MatIconModule,
|
|
425
|
+
MatRadioModule,
|
|
426
|
+
MatCheckboxModule,
|
|
427
|
+
FsFormModule,
|
|
428
|
+
FsRadioGroupModule,
|
|
429
|
+
FsDialogModule,
|
|
430
|
+
FsSkeletonModule,
|
|
431
|
+
FsPhoneModule,
|
|
432
|
+
FsSkeletonModule,
|
|
433
|
+
ResendModule,
|
|
434
|
+
CodeInputModule] });
|
|
435
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationModule, decorators: [{
|
|
436
|
+
type: NgModule,
|
|
437
|
+
args: [{
|
|
438
|
+
imports: [
|
|
439
|
+
CommonModule,
|
|
440
|
+
FormsModule,
|
|
441
|
+
MatFormFieldModule,
|
|
442
|
+
MatInputModule,
|
|
443
|
+
MatButtonModule,
|
|
444
|
+
MatIconModule,
|
|
445
|
+
MatRadioModule,
|
|
446
|
+
MatCheckboxModule,
|
|
447
|
+
FsFormModule,
|
|
448
|
+
FsRadioGroupModule,
|
|
449
|
+
FsDialogModule,
|
|
450
|
+
FsSkeletonModule,
|
|
451
|
+
FsPhoneModule,
|
|
452
|
+
FsSkeletonModule,
|
|
453
|
+
ResendModule,
|
|
454
|
+
CodeInputModule,
|
|
455
|
+
],
|
|
456
|
+
declarations: [
|
|
457
|
+
Fs2faVerificationComponent,
|
|
458
|
+
Fs2faVerificationCodeComponent,
|
|
459
|
+
Fs2faVerificationMethodsComponent,
|
|
460
|
+
Fs2faVerificationResendDirective,
|
|
461
|
+
],
|
|
462
|
+
exports: [
|
|
463
|
+
Fs2faVerificationComponent,
|
|
464
|
+
Fs2faVerificationResendDirective,
|
|
465
|
+
],
|
|
466
|
+
providers: [],
|
|
467
|
+
}]
|
|
468
468
|
}] });
|
|
469
469
|
|
|
470
|
-
class DefaultedComponent {
|
|
471
|
-
}
|
|
472
|
-
DefaultedComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DefaultedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
473
|
-
DefaultedComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DefaultedComponent, selector: "app-defaulted", ngImport: i0, template: "<span>Default</span>", styles: ["span{font-size:75%;background-color:#02a7f0;padding:2px 4px;border-radius:4px;color:#fff}:host{display:flex}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
474
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DefaultedComponent, decorators: [{
|
|
475
|
-
type: Component,
|
|
476
|
-
args: [{ selector: 'app-defaulted', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span>Default</span>", styles: ["span{font-size:75%;background-color:#02a7f0;padding:2px 4px;border-radius:4px;color:#fff}:host{display:flex}\n"] }]
|
|
470
|
+
class DefaultedComponent {
|
|
471
|
+
}
|
|
472
|
+
DefaultedComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DefaultedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
473
|
+
DefaultedComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DefaultedComponent, selector: "app-defaulted", ngImport: i0, template: "<span>Default</span>", styles: ["span{font-size:75%;background-color:#02a7f0;padding:2px 4px;border-radius:4px;color:#fff}:host{display:flex}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
474
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DefaultedComponent, decorators: [{
|
|
475
|
+
type: Component,
|
|
476
|
+
args: [{ selector: 'app-defaulted', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span>Default</span>", styles: ["span{font-size:75%;background-color:#02a7f0;padding:2px 4px;border-radius:4px;color:#fff}:host{display:flex}\n"] }]
|
|
477
477
|
}] });
|
|
478
478
|
|
|
479
|
-
class DefautledModule {
|
|
480
|
-
}
|
|
481
|
-
DefautledModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DefautledModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
482
|
-
DefautledModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: DefautledModule, declarations: [DefaultedComponent], exports: [DefaultedComponent] });
|
|
483
|
-
DefautledModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DefautledModule });
|
|
484
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DefautledModule, decorators: [{
|
|
485
|
-
type: NgModule,
|
|
486
|
-
args: [{
|
|
487
|
-
declarations: [
|
|
488
|
-
DefaultedComponent,
|
|
489
|
-
],
|
|
490
|
-
exports: [DefaultedComponent],
|
|
491
|
-
}]
|
|
479
|
+
class DefautledModule {
|
|
480
|
+
}
|
|
481
|
+
DefautledModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DefautledModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
482
|
+
DefautledModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: DefautledModule, declarations: [DefaultedComponent], exports: [DefaultedComponent] });
|
|
483
|
+
DefautledModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DefautledModule });
|
|
484
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DefautledModule, decorators: [{
|
|
485
|
+
type: NgModule,
|
|
486
|
+
args: [{
|
|
487
|
+
declarations: [
|
|
488
|
+
DefaultedComponent,
|
|
489
|
+
],
|
|
490
|
+
exports: [DefaultedComponent],
|
|
491
|
+
}]
|
|
492
492
|
}] });
|
|
493
493
|
|
|
494
|
-
class VerificationMethodsComponent {
|
|
495
|
-
constructor(_prompt) {
|
|
496
|
-
this._prompt = _prompt;
|
|
497
|
-
this.deleted = new EventEmitter();
|
|
498
|
-
this.VerificationMethodType = VerificationMethodType;
|
|
499
|
-
}
|
|
500
|
-
ngOnInit() {
|
|
501
|
-
var _a, _b, _c, _d;
|
|
502
|
-
if (!this.verificationMethodDefault && ((_a = this.twoFactorManageService) === null || _a === void 0 ? void 0 : _a.hasVerificationMethodDefault)) {
|
|
503
|
-
this.verificationMethodDefault = (verificationMethod) => {
|
|
504
|
-
return this.twoFactorManageService.verificationMethodDefault$(verificationMethod);
|
|
505
|
-
};
|
|
506
|
-
}
|
|
507
|
-
if (!this.verificationMethodDelete && ((_b = this.twoFactorManageService) === null || _b === void 0 ? void 0 : _b.hasVerificationMethodDelete)) {
|
|
508
|
-
this.verificationMethodDelete = (verificationMethod) => {
|
|
509
|
-
return this.twoFactorManageService.verificationMethodDelete$(verificationMethod);
|
|
510
|
-
};
|
|
511
|
-
}
|
|
512
|
-
if (!this.verificationMethodsFetch && ((_c = this.twoFactorManageService) === null || _c === void 0 ? void 0 : _c.hasVerificationMethodsFetch)) {
|
|
513
|
-
this.verificationMethodsFetch = (query) => {
|
|
514
|
-
return this.twoFactorManageService.verificationMethodsFetch$(query);
|
|
515
|
-
};
|
|
516
|
-
}
|
|
517
|
-
if (!this.accountVerify && ((_d = this.twoFactorManageService) === null || _d === void 0 ? void 0 : _d.hasVerificationMethodVerify)) {
|
|
518
|
-
this.accountVerify = () => {
|
|
519
|
-
var _a;
|
|
520
|
-
return (_a = this.twoFactorManageService) === null || _a === void 0 ? void 0 : _a.accountVerify$();
|
|
521
|
-
};
|
|
522
|
-
}
|
|
523
|
-
this.listConfig = {
|
|
524
|
-
paging: false,
|
|
525
|
-
rowActions: [
|
|
526
|
-
{
|
|
527
|
-
click: (verificationMethod) => {
|
|
528
|
-
this.accountVerify()
|
|
529
|
-
.pipe(switchMap(() => this.verificationMethodDefault(verificationMethod)))
|
|
530
|
-
.subscribe(() => {
|
|
531
|
-
this.list.reload();
|
|
532
|
-
});
|
|
533
|
-
},
|
|
534
|
-
show: (data) => {
|
|
535
|
-
return !!this.verificationMethodDefault && !data.default;
|
|
536
|
-
},
|
|
537
|
-
label: 'Set as Default',
|
|
538
|
-
},
|
|
539
|
-
{
|
|
540
|
-
click: (verificationMethod) => {
|
|
541
|
-
this._prompt.confirm({
|
|
542
|
-
title: 'Confirm',
|
|
543
|
-
template: 'Would you like to delete this verification method?',
|
|
544
|
-
})
|
|
545
|
-
.pipe(switchMap(() => this.accountVerify()), switchMap(() => this.verificationMethodDelete(verificationMethod)))
|
|
546
|
-
.subscribe(() => {
|
|
547
|
-
this.deleted.emit();
|
|
548
|
-
this.list.reload();
|
|
549
|
-
});
|
|
550
|
-
},
|
|
551
|
-
show: () => {
|
|
552
|
-
return !!this.verificationMethodDelete;
|
|
553
|
-
},
|
|
554
|
-
label: 'Delete',
|
|
555
|
-
},
|
|
556
|
-
],
|
|
557
|
-
fetch: (query) => {
|
|
558
|
-
query = Object.assign(Object.assign({}, query), { type: this.type });
|
|
559
|
-
return this.verificationMethodsFetch(query)
|
|
560
|
-
.pipe(map((verificationMethods) => ({
|
|
561
|
-
data: verificationMethods.filter((verificationMethod) => {
|
|
562
|
-
return !this.type || verificationMethod.type === this.type;
|
|
563
|
-
}),
|
|
564
|
-
})));
|
|
565
|
-
},
|
|
566
|
-
};
|
|
567
|
-
}
|
|
568
|
-
reload() {
|
|
569
|
-
this.list.reload();
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
VerificationMethodsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: VerificationMethodsComponent, deps: [{ token: i1$1.FsPrompt }], target: i0.ɵɵFactoryTarget.Component });
|
|
573
|
-
VerificationMethodsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: VerificationMethodsComponent, selector: "fs-2fa-verification-methods", inputs: { type: "type", accountVerify: "accountVerify", verificationMethodsFetch: "verificationMethodsFetch", verificationMethodDelete: "verificationMethodDelete", verificationMethodDefault: "verificationMethodDefault", twoFactorManageService: "twoFactorManageService" }, outputs: { deleted: "deleted" }, viewQueries: [{ propertyName: "list", first: true, predicate: FsListComponent, descendants: true }], ngImport: i0, template: "<fs-list [config]=\"listConfig\">\n <fs-list-column class=\"col-icon\" width=\"1%\">\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.type === VerificationMethodType.Sms\">\n <mat-icon>textsms</mat-icon>\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.Email\">\n <mat-icon>email</mat-icon>\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.App\">\n <mat-icon>phone_iphone</mat-icon>\n </ng-container>\n </ng-template>\n </fs-list-column>\n <fs-list-column class=\"col-name\">\n <ng-template fs-list-cell let-row=\"row\">\n <div class=\"row\">\n <ng-container *ngIf=\"row.type === VerificationMethodType.Sms\">\n <div class=\"row\">\n <fs-country [code]=\"row.phoneCountry\" [showName]=\"false\"></fs-country> \n <span>{{row.phoneNumber | fsPhone}}</span>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.Email\">\n {{row.email}}\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.App\">\n App\n </ng-container>\n\n <app-defaulted *ngIf=\"row.default\"></app-defaulted>\n </div>\n </ng-template>\n </fs-list-column>\n</fs-list>", styles: [":host ::ng-deep .col-name .row{display:flex;align-items:center}:host ::ng-deep .col-name fs-country img{display:flex}fs-country{margin-right:5px}app-defaulted{margin-left:5px}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { kind: "directive", type: i4$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "sortableDirection", "direction", "align", "width", "class"] }, { kind: "directive", type: i4$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { kind: "component", type: i5$1.FsCountryComponent, selector: "fs-country", inputs: ["code", "showIcon", "showName", "region", "width"] }, { kind: "component", type: DefaultedComponent, selector: "app-defaulted" }, { kind: "pipe", type: i8$2.FsPhonePipe, name: "fsPhone" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
574
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: VerificationMethodsComponent, decorators: [{
|
|
575
|
-
type: Component,
|
|
576
|
-
args: [{ selector: 'fs-2fa-verification-methods', changeDetection: ChangeDetectionStrategy.OnPush, template: "<fs-list [config]=\"listConfig\">\n <fs-list-column class=\"col-icon\" width=\"1%\">\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.type === VerificationMethodType.Sms\">\n <mat-icon>textsms</mat-icon>\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.Email\">\n <mat-icon>email</mat-icon>\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.App\">\n <mat-icon>phone_iphone</mat-icon>\n </ng-container>\n </ng-template>\n </fs-list-column>\n <fs-list-column class=\"col-name\">\n <ng-template fs-list-cell let-row=\"row\">\n <div class=\"row\">\n <ng-container *ngIf=\"row.type === VerificationMethodType.Sms\">\n <div class=\"row\">\n <fs-country [code]=\"row.phoneCountry\" [showName]=\"false\"></fs-country> \n <span>{{row.phoneNumber | fsPhone}}</span>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.Email\">\n {{row.email}}\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.App\">\n App\n </ng-container>\n\n <app-defaulted *ngIf=\"row.default\"></app-defaulted>\n </div>\n </ng-template>\n </fs-list-column>\n</fs-list>", styles: [":host ::ng-deep .col-name .row{display:flex;align-items:center}:host ::ng-deep .col-name fs-country img{display:flex}fs-country{margin-right:5px}app-defaulted{margin-left:5px}\n"] }]
|
|
577
|
-
}], ctorParameters: function () { return [{ type: i1$1.FsPrompt }]; }, propDecorators: { list: [{
|
|
578
|
-
type: ViewChild,
|
|
579
|
-
args: [FsListComponent]
|
|
580
|
-
}], type: [{
|
|
581
|
-
type: Input
|
|
582
|
-
}], accountVerify: [{
|
|
583
|
-
type: Input
|
|
584
|
-
}], verificationMethodsFetch: [{
|
|
585
|
-
type: Input
|
|
586
|
-
}], verificationMethodDelete: [{
|
|
587
|
-
type: Input
|
|
588
|
-
}], verificationMethodDefault: [{
|
|
589
|
-
type: Input
|
|
590
|
-
}], twoFactorManageService: [{
|
|
591
|
-
type: Input
|
|
592
|
-
}], deleted: [{
|
|
593
|
-
type: Output
|
|
494
|
+
class VerificationMethodsComponent {
|
|
495
|
+
constructor(_prompt) {
|
|
496
|
+
this._prompt = _prompt;
|
|
497
|
+
this.deleted = new EventEmitter();
|
|
498
|
+
this.VerificationMethodType = VerificationMethodType;
|
|
499
|
+
}
|
|
500
|
+
ngOnInit() {
|
|
501
|
+
var _a, _b, _c, _d;
|
|
502
|
+
if (!this.verificationMethodDefault && ((_a = this.twoFactorManageService) === null || _a === void 0 ? void 0 : _a.hasVerificationMethodDefault)) {
|
|
503
|
+
this.verificationMethodDefault = (verificationMethod) => {
|
|
504
|
+
return this.twoFactorManageService.verificationMethodDefault$(verificationMethod);
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
if (!this.verificationMethodDelete && ((_b = this.twoFactorManageService) === null || _b === void 0 ? void 0 : _b.hasVerificationMethodDelete)) {
|
|
508
|
+
this.verificationMethodDelete = (verificationMethod) => {
|
|
509
|
+
return this.twoFactorManageService.verificationMethodDelete$(verificationMethod);
|
|
510
|
+
};
|
|
511
|
+
}
|
|
512
|
+
if (!this.verificationMethodsFetch && ((_c = this.twoFactorManageService) === null || _c === void 0 ? void 0 : _c.hasVerificationMethodsFetch)) {
|
|
513
|
+
this.verificationMethodsFetch = (query) => {
|
|
514
|
+
return this.twoFactorManageService.verificationMethodsFetch$(query);
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
if (!this.accountVerify && ((_d = this.twoFactorManageService) === null || _d === void 0 ? void 0 : _d.hasVerificationMethodVerify)) {
|
|
518
|
+
this.accountVerify = () => {
|
|
519
|
+
var _a;
|
|
520
|
+
return (_a = this.twoFactorManageService) === null || _a === void 0 ? void 0 : _a.accountVerify$();
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
this.listConfig = {
|
|
524
|
+
paging: false,
|
|
525
|
+
rowActions: [
|
|
526
|
+
{
|
|
527
|
+
click: (verificationMethod) => {
|
|
528
|
+
this.accountVerify()
|
|
529
|
+
.pipe(switchMap(() => this.verificationMethodDefault(verificationMethod)))
|
|
530
|
+
.subscribe(() => {
|
|
531
|
+
this.list.reload();
|
|
532
|
+
});
|
|
533
|
+
},
|
|
534
|
+
show: (data) => {
|
|
535
|
+
return !!this.verificationMethodDefault && !data.default;
|
|
536
|
+
},
|
|
537
|
+
label: 'Set as Default',
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
click: (verificationMethod) => {
|
|
541
|
+
this._prompt.confirm({
|
|
542
|
+
title: 'Confirm',
|
|
543
|
+
template: 'Would you like to delete this verification method?',
|
|
544
|
+
})
|
|
545
|
+
.pipe(switchMap(() => this.accountVerify()), switchMap(() => this.verificationMethodDelete(verificationMethod)))
|
|
546
|
+
.subscribe(() => {
|
|
547
|
+
this.deleted.emit();
|
|
548
|
+
this.list.reload();
|
|
549
|
+
});
|
|
550
|
+
},
|
|
551
|
+
show: () => {
|
|
552
|
+
return !!this.verificationMethodDelete;
|
|
553
|
+
},
|
|
554
|
+
label: 'Delete',
|
|
555
|
+
},
|
|
556
|
+
],
|
|
557
|
+
fetch: (query) => {
|
|
558
|
+
query = Object.assign(Object.assign({}, query), { type: this.type });
|
|
559
|
+
return this.verificationMethodsFetch(query)
|
|
560
|
+
.pipe(map((verificationMethods) => ({
|
|
561
|
+
data: verificationMethods.filter((verificationMethod) => {
|
|
562
|
+
return !this.type || verificationMethod.type === this.type;
|
|
563
|
+
}),
|
|
564
|
+
})));
|
|
565
|
+
},
|
|
566
|
+
};
|
|
567
|
+
}
|
|
568
|
+
reload() {
|
|
569
|
+
this.list.reload();
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
VerificationMethodsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: VerificationMethodsComponent, deps: [{ token: i1$1.FsPrompt }], target: i0.ɵɵFactoryTarget.Component });
|
|
573
|
+
VerificationMethodsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: VerificationMethodsComponent, selector: "fs-2fa-verification-methods", inputs: { type: "type", accountVerify: "accountVerify", verificationMethodsFetch: "verificationMethodsFetch", verificationMethodDelete: "verificationMethodDelete", verificationMethodDefault: "verificationMethodDefault", twoFactorManageService: "twoFactorManageService" }, outputs: { deleted: "deleted" }, viewQueries: [{ propertyName: "list", first: true, predicate: FsListComponent, descendants: true }], ngImport: i0, template: "<fs-list [config]=\"listConfig\">\n <fs-list-column class=\"col-icon\" width=\"1%\">\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.type === VerificationMethodType.Sms\">\n <mat-icon>textsms</mat-icon>\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.Email\">\n <mat-icon>email</mat-icon>\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.App\">\n <mat-icon>phone_iphone</mat-icon>\n </ng-container>\n </ng-template>\n </fs-list-column>\n <fs-list-column class=\"col-name\">\n <ng-template fs-list-cell let-row=\"row\">\n <div class=\"row\">\n <ng-container *ngIf=\"row.type === VerificationMethodType.Sms\">\n <div class=\"row\">\n <fs-country [code]=\"row.phoneCountry\" [showName]=\"false\"></fs-country> \n <span>{{row.phoneNumber | fsPhone}}</span>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.Email\">\n {{row.email}}\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.App\">\n App\n </ng-container>\n\n <app-defaulted *ngIf=\"row.default\"></app-defaulted>\n </div>\n </ng-template>\n </fs-list-column>\n</fs-list>", styles: [":host ::ng-deep .col-name .row{display:flex;align-items:center}:host ::ng-deep .col-name fs-country img{display:flex}fs-country{margin-right:5px}app-defaulted{margin-left:5px}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { kind: "directive", type: i4$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "sortableDirection", "direction", "align", "width", "class"] }, { kind: "directive", type: i4$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { kind: "component", type: i5$1.FsCountryComponent, selector: "fs-country", inputs: ["code", "showIcon", "showName", "region", "width"] }, { kind: "component", type: DefaultedComponent, selector: "app-defaulted" }, { kind: "pipe", type: i8$2.FsPhonePipe, name: "fsPhone" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
574
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: VerificationMethodsComponent, decorators: [{
|
|
575
|
+
type: Component,
|
|
576
|
+
args: [{ selector: 'fs-2fa-verification-methods', changeDetection: ChangeDetectionStrategy.OnPush, template: "<fs-list [config]=\"listConfig\">\n <fs-list-column class=\"col-icon\" width=\"1%\">\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.type === VerificationMethodType.Sms\">\n <mat-icon>textsms</mat-icon>\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.Email\">\n <mat-icon>email</mat-icon>\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.App\">\n <mat-icon>phone_iphone</mat-icon>\n </ng-container>\n </ng-template>\n </fs-list-column>\n <fs-list-column class=\"col-name\">\n <ng-template fs-list-cell let-row=\"row\">\n <div class=\"row\">\n <ng-container *ngIf=\"row.type === VerificationMethodType.Sms\">\n <div class=\"row\">\n <fs-country [code]=\"row.phoneCountry\" [showName]=\"false\"></fs-country> \n <span>{{row.phoneNumber | fsPhone}}</span>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.Email\">\n {{row.email}}\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.App\">\n App\n </ng-container>\n\n <app-defaulted *ngIf=\"row.default\"></app-defaulted>\n </div>\n </ng-template>\n </fs-list-column>\n</fs-list>", styles: [":host ::ng-deep .col-name .row{display:flex;align-items:center}:host ::ng-deep .col-name fs-country img{display:flex}fs-country{margin-right:5px}app-defaulted{margin-left:5px}\n"] }]
|
|
577
|
+
}], ctorParameters: function () { return [{ type: i1$1.FsPrompt }]; }, propDecorators: { list: [{
|
|
578
|
+
type: ViewChild,
|
|
579
|
+
args: [FsListComponent]
|
|
580
|
+
}], type: [{
|
|
581
|
+
type: Input
|
|
582
|
+
}], accountVerify: [{
|
|
583
|
+
type: Input
|
|
584
|
+
}], verificationMethodsFetch: [{
|
|
585
|
+
type: Input
|
|
586
|
+
}], verificationMethodDelete: [{
|
|
587
|
+
type: Input
|
|
588
|
+
}], verificationMethodDefault: [{
|
|
589
|
+
type: Input
|
|
590
|
+
}], twoFactorManageService: [{
|
|
591
|
+
type: Input
|
|
592
|
+
}], deleted: [{
|
|
593
|
+
type: Output
|
|
594
594
|
}] } });
|
|
595
595
|
|
|
596
|
-
class Fs2faVerificationMethodsModule {
|
|
597
|
-
}
|
|
598
|
-
Fs2faVerificationMethodsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationMethodsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
599
|
-
Fs2faVerificationMethodsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationMethodsModule, declarations: [VerificationMethodsComponent], imports: [CommonModule,
|
|
600
|
-
FormsModule,
|
|
601
|
-
MatIconModule,
|
|
602
|
-
FsListModule,
|
|
603
|
-
FsPhoneModule,
|
|
604
|
-
FsCountryModule,
|
|
605
|
-
DefautledModule], exports: [VerificationMethodsComponent] });
|
|
606
|
-
Fs2faVerificationMethodsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationMethodsModule, imports: [CommonModule,
|
|
607
|
-
FormsModule,
|
|
608
|
-
MatIconModule,
|
|
609
|
-
FsListModule,
|
|
610
|
-
FsPhoneModule,
|
|
611
|
-
FsCountryModule,
|
|
612
|
-
DefautledModule] });
|
|
613
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationMethodsModule, decorators: [{
|
|
614
|
-
type: NgModule,
|
|
615
|
-
args: [{
|
|
616
|
-
imports: [
|
|
617
|
-
CommonModule,
|
|
618
|
-
FormsModule,
|
|
619
|
-
MatIconModule,
|
|
620
|
-
FsListModule,
|
|
621
|
-
FsPhoneModule,
|
|
622
|
-
FsCountryModule,
|
|
623
|
-
DefautledModule,
|
|
624
|
-
],
|
|
625
|
-
declarations: [
|
|
626
|
-
VerificationMethodsComponent,
|
|
627
|
-
],
|
|
628
|
-
exports: [VerificationMethodsComponent],
|
|
629
|
-
}]
|
|
596
|
+
class Fs2faVerificationMethodsModule {
|
|
597
|
+
}
|
|
598
|
+
Fs2faVerificationMethodsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationMethodsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
599
|
+
Fs2faVerificationMethodsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationMethodsModule, declarations: [VerificationMethodsComponent], imports: [CommonModule,
|
|
600
|
+
FormsModule,
|
|
601
|
+
MatIconModule,
|
|
602
|
+
FsListModule,
|
|
603
|
+
FsPhoneModule,
|
|
604
|
+
FsCountryModule,
|
|
605
|
+
DefautledModule], exports: [VerificationMethodsComponent] });
|
|
606
|
+
Fs2faVerificationMethodsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationMethodsModule, imports: [CommonModule,
|
|
607
|
+
FormsModule,
|
|
608
|
+
MatIconModule,
|
|
609
|
+
FsListModule,
|
|
610
|
+
FsPhoneModule,
|
|
611
|
+
FsCountryModule,
|
|
612
|
+
DefautledModule] });
|
|
613
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faVerificationMethodsModule, decorators: [{
|
|
614
|
+
type: NgModule,
|
|
615
|
+
args: [{
|
|
616
|
+
imports: [
|
|
617
|
+
CommonModule,
|
|
618
|
+
FormsModule,
|
|
619
|
+
MatIconModule,
|
|
620
|
+
FsListModule,
|
|
621
|
+
FsPhoneModule,
|
|
622
|
+
FsCountryModule,
|
|
623
|
+
DefautledModule,
|
|
624
|
+
],
|
|
625
|
+
declarations: [
|
|
626
|
+
VerificationMethodsComponent,
|
|
627
|
+
],
|
|
628
|
+
exports: [VerificationMethodsComponent],
|
|
629
|
+
}]
|
|
630
630
|
}] });
|
|
631
631
|
|
|
632
|
-
class AppComponent {
|
|
633
|
-
constructor(_data, _dialogRef, _cdRef, _message) {
|
|
634
|
-
this._data = _data;
|
|
635
|
-
this._dialogRef = _dialogRef;
|
|
636
|
-
this._cdRef = _cdRef;
|
|
637
|
-
this._message = _message;
|
|
638
|
-
this.mode = 'qr-code';
|
|
639
|
-
this.verify = () => {
|
|
640
|
-
return this.twoFactorManageService.verificationMethodVerify$(this.code, true)
|
|
641
|
-
.pipe(switchMap(() => {
|
|
642
|
-
return this.default && this.twoFactorManageService.verificationMethodDefault$ ?
|
|
643
|
-
this.twoFactorManageService.verificationMethodDefault$(this.verificationMethod) :
|
|
644
|
-
of(true);
|
|
645
|
-
}), tap(() => {
|
|
646
|
-
this._message.success('Created app authenticator verification method');
|
|
647
|
-
this._dialogRef.close(true);
|
|
648
|
-
}));
|
|
649
|
-
};
|
|
650
|
-
}
|
|
651
|
-
ngOnInit() {
|
|
652
|
-
this.twoFactorManageService = this._data.twoFactorManageService;
|
|
653
|
-
this.accountId = this._data.accountId;
|
|
654
|
-
this.default = !this.twoFactorManageService.hasVerificationMethods;
|
|
655
|
-
}
|
|
656
|
-
appTypeGoogle() {
|
|
657
|
-
this.appTypeSelect('google');
|
|
658
|
-
}
|
|
659
|
-
appTypeAuthy() {
|
|
660
|
-
this.appTypeSelect('authy');
|
|
661
|
-
}
|
|
662
|
-
appTypeSelect(appType) {
|
|
663
|
-
this.appType = appType;
|
|
664
|
-
this.twoFactorManageService.verificationMethodCreate$({
|
|
665
|
-
type: VerificationMethodType.App,
|
|
666
|
-
})
|
|
667
|
-
.subscribe((verificationMethod) => {
|
|
668
|
-
this.verificationMethod = verificationMethod;
|
|
669
|
-
this.qrCodeUrl = verificationMethod.qrCodeUrl;
|
|
670
|
-
this._cdRef.markForCheck();
|
|
671
|
-
});
|
|
672
|
-
}
|
|
673
|
-
codeCompleted() {
|
|
674
|
-
this.form.triggerSubmit();
|
|
675
|
-
}
|
|
676
|
-
codeChanged(code) {
|
|
677
|
-
this.code = code;
|
|
678
|
-
this.form.dirty();
|
|
679
|
-
}
|
|
680
|
-
next() {
|
|
681
|
-
this.mode = 'code-input';
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
AppComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i0.ChangeDetectorRef }, { token: i2$2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
|
|
685
|
-
AppComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AppComponent, selector: "ng-component", viewQueries: [{ propertyName: "form", first: true, predicate: FsFormDirective, descendants: true }], ngImport: i0, template: "<form fsForm [submit]=\"verify\">\n <fs-dialog>\n <h1 mat-dialog-title>Authenticator App Setup</h1>\n <mat-dialog-content>\n\n <div *ngIf=\"mode === 'qr-code'\" class=\"qr-code\">\n <ng-container *ngIf=\"appType\">\n <ol>\n <li>\n <ng-container *ngIf=\"appType === 'authy'\">\n Install the Authy Authenticator App from the <a href=\"https://apps.apple.com/us/app/authy/id494168017\" target=\"_blank\">App Store</a> or\n the <a href=\"https://play.google.com/store/apps/details?id=com.authy.authy\" target=\"_blank\">Google Play Store</a>.\n </ng-container>\n\n <ng-container *ngIf=\"appType === 'google'\">\n Install the Google Authenticator App from the <a href=\"https://apps.apple.com/us/app/google-authenticator/id388497605\" target=\"_blank\">App Store</a> or\n the <a href=\"https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=en_US&gl=US\" target=\"_blank\">Google Play Store</a>.\n </ng-container>\n </li>\n <ng-container *ngIf=\"appType === 'authy'\">\n <li>\n Open the Authy app and select <b>Add Account</b>.\n </li>\n <li>\n Select <b>Scan QR Code</b> and scan the QR code below.\n </li>\n </ng-container> \n <ng-container *ngIf=\"appType === 'google'\">\n <li>\n Open the Google Authentictor app and click the <b>Plus icon</b> in the lower right corner.\n </li>\n <li>\n Select <b>Scan a QR code</b> and scan the QR code below.\n </li>\n </ng-container>\n </ol>\n\n <ng-container *fsSkeleton=\"qrCodeUrl\">\n <fs-qrcode\n [value]=\"qrCodeUrl\"\n [width]=\"300\"\n [height]=\"300\">\n </fs-qrcode>\n </ng-container>\n </ng-container>\n\n <div class=\"app-types\" *ngIf=\"!appType\">\n <p>Select the Authenticator App you prefer</p>\n\n <div class=\"row\">\n <span>\n <a (click)=\"appTypeAuthy()\">\n <svg width=\"50\" height=\"50\" viewBox=\"0 0 256 256\" xmlns=\"http://www.w3.org/2000/svg\" preserveAspectRatio=\"xMidYMid\"><path d=\"M256 127.998C256 198.696 198.694 256 127.997 256 57.304 256 0 198.696 0 127.998 0 57.305 57.304 0 127.997 0 198.694 0 256 57.305 256 127.998z\" fill=\"#EC1C24\"/><path d=\"M117.024 100.89l30.691 30.68c4.43 4.436 11.623 4.436 16.064 0 4.431-4.435 4.441-11.622 0-16.058L133.086 84.82C111.125 62.854 75.631 62.5 53.204 83.704a9.536 9.536 0 0 0-.605.548c-.098.098-.178.202-.275.29-.1.096-.202.182-.297.278-.194.193-.371.396-.54.597-21.215 22.437-20.85 57.932 1.113 79.897L83.292 196c4.44 4.433 11.623 4.433 16.062 0 4.442-4.437 4.442-11.633.011-16.06l-30.693-30.691c-13.398-13.393-13.488-35.129-.278-48.637 13.506-13.21 35.23-13.114 48.63.279zm39.612-40.873c-4.435 4.437-4.435 11.623.012 16.059l30.681 30.693c13.39 13.392 13.477 35.125.268 48.636-13.51 13.2-35.227 13.112-48.623-.282l-30.692-30.689c-4.438-4.437-11.633-4.437-16.066 0-4.443 4.433-4.443 11.642 0 16.065l30.682 30.694c21.968 21.965 57.458 22.322 79.889 1.116.208-.184.404-.355.61-.549.094-.095.182-.192.273-.29.1-.095.197-.183.29-.289.197-.183.365-.384.54-.594 21.215-22.428 20.86-57.911-1.102-79.889l-30.692-30.682c-4.436-4.443-11.638-4.443-16.07.001z\" fill=\"#FFF\"/></svg>\n </a>\n Authy\n </span>\n \n <span>\n <a (click)=\"appTypeGoogle()\"> \n <svg width=\"50\" height=\"50\" viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"m457.07 45.92c73.67-8.62 149.41.22 218.93 26.24 62.75 23.47 120.59 60.41 167.72 108.09-40.31 39.97-80.25 80.31-120.51 120.33-25.95-25.45-56.19-46.65-89.47-61.37-44.22-19.82-93.39-28.54-141.72-25.2-54.6 3.52-108.11 22.49-152.63 54.3-55.24 38.95-96.61 97.22-114.8 162.35-13.64 47.78-14.77 98.97-3.76 147.4 8.85 39.61 26.09 77.29 50.05 110.03 22.24 30.45 50.3 56.64 82.22 76.71 36.79 23.24 78.76 38.22 121.96 43.48 37.02 4.65 74.9 2.23 111.05-7 3.97-1.91 6.24 2.61 8.73 4.86 40.74 40.95 81.68 81.7 122.43 122.63-73.31 35.6-155.99 51.86-237.3 46.12-68.05-4.51-135.07-24.08-194.71-57.18-24.87-13.6-48.23-29.82-70.33-47.54-17.46-14.81-34.71-30.01-49.72-47.35-25.41-27.39-47.21-58.11-65.17-90.87-4-7.72-8.64-15.12-11.9-23.2-4.47-9.05-8.37-18.36-12.25-27.67-4.96-13.27-10.26-26.44-13.88-40.15-.43-1.81-1.53-3.33-2.52-4.85-8.3-28.66-12.95-58.33-15.44-88.04-2.62-37.36-1.33-75.05 4.78-112.03 12.18-75.48 43.41-147.74 89.86-208.44 30.12-39.5 66.53-74.21 107.46-102.35 62.44-43.11 135.53-70.69 210.92-79.3m49.18 50.48c-5.7.99-10.96 3.76-15.38 7.43-10.4 8.93-14.14 24.81-8.17 37.28 6.33 15.02 25.16 23.1 40.36 17 15.43-5.24 24.78-23.51 19.74-39.06-4.1-15.43-20.92-25.79-36.55-22.65m-267.96 111.99c-5.33.28-10.59 1.92-15.16 4.68-11.47 7.03-17.88 21.74-14.36 34.86 3.09 14.08 16.78 25.06 31.26 24.61 15.03.41 29.08-11.39 31.54-26.17 2.24-10.33-1.61-21.55-9.14-28.85-6.24-6.33-15.3-9.62-24.14-9.13m-115.96 272c-6.62 1.23-12.84 4.58-17.54 9.4-9.45 9.72-11.72 25.57-5.02 37.42 7.16 13.96 25.48 20.86 39.98 14.62 15.02-5.51 23.99-23.42 19.06-38.71-4.04-15.41-20.86-25.96-36.48-22.73m111.98 272.05c-11.49 1.95-21.48 10.72-24.84 21.88-3.87 11.63-.13 25.16 8.9 33.36 6.15 5.48 14.4 8.7 22.67 8.32 11.16-.25 21.98-6.87 27.12-16.8 4.93-8.83 5.15-20.02.71-29.1-5.82-12.78-20.81-20.33-34.56-17.66m272.06 112.03c-11.76 2.02-21.92 11.07-25.09 22.6-3.87 12.57 1.13 27.25 11.91 34.79 7.86 5.79 18.42 7.67 27.77 4.86 9.61-2.77 17.7-10.24 21.07-19.68 4.97-12.74.36-28.32-10.58-36.46-7.02-5.45-16.35-7.67-25.08-6.11z\" fill=\"#a0a0a0\"/>\n <g fill=\"#c1c1c1\">\n <path d=\"m506.25 96.4c15.63-3.14 32.45 7.22 36.55 22.65 5.04 15.55-4.31 33.82-19.74 39.06-15.2 6.1-34.03-1.98-40.36-17-5.97-12.47-2.23-28.35 8.17-37.28 4.42-3.67 9.68-6.44 15.38-7.43z\"/>\n <path d=\"m122.33 480.39c15.62-3.23 32.44 7.32 36.48 22.73 4.93 15.29-4.04 33.2-19.06 38.71-14.5 6.24-32.82-.66-39.98-14.62-6.7-11.85-4.43-27.7 5.02-37.42 4.7-4.82 10.92-8.17 17.54-9.4z\"/>\n </g>\n <path d=\"m843.72 180.25.11-.11c24.64 25.12 46.96 52.6 65.61 82.47 36.01 57.16 59.38 122.22 67.87 189.25 5.67 44.88 5.27 90.6-2.05 135.27-12.7 80.01-46.94 156.41-97.9 219.36-42.3 52.48-95.87 96.04-156.41 125.76l-.63-.26c-1.01-1.1-2.03-2.16-3.05-3.22-40.75-40.93-81.69-81.68-122.43-122.63-2.49-2.25-4.76-6.77-8.73-4.86-36.15 9.23-74.03 11.65-111.05 7-43.2-5.26-85.17-20.24-121.96-43.48-31.92-20.07-59.98-46.26-82.22-76.71-23.96-32.74-41.2-70.42-50.05-110.03-11.01-48.43-9.88-99.62 3.76-147.4 18.19-65.13 59.56-123.4 114.8-162.35 44.52-31.81 98.03-50.78 152.63-54.3 48.33-3.34 97.5 5.38 141.72 25.2 33.28 14.72 63.52 35.92 89.47 61.37 40.26-40.02 80.2-80.36 120.51-120.33m-351.75 183.97c-21.23 2.85-41.89 10.28-59.88 21.94-23.08 14.45-41.76 35.58-53.9 59.91-14.58 29.2-18.64 63.21-12.5 95.17 3.93 19.85 12.03 38.88 23.56 55.51 7.93 11.52 17.65 21.66 27.65 31.38 57.33 57.41 114.61 114.86 171.99 172.21 49.09-13.07 94.67-38.94 131.05-74.4 45.11-43.34 75.66-101.44 86.31-163.06.24-1.04.22-2.91 1.85-2.6 29.63.04 59.26-.01 88.9.05 19.04-.3 36.87-14.77 40.76-33.46.22-1.21 0-2.32-.67-3.35 1.22-5.71 2.08-11.58 1.38-17.43l-.24.4c-2.05-20.34-20.84-37.12-41.25-37.17-80.64-.07-161.28-.01-241.93-.07-6.44-22.08-18.5-42.33-34.03-59.23-25.8-27.5-62.26-45.01-100.02-46.82-9.68.02-19.44-.54-29.03 1.02m286.37 388.31c-12.64 2.06-23.37 12.59-25.7 25.18-1.48 8.14-.14 17.02 4.73 23.85 5.76 9.2 16.8 14.76 27.61 14.25 8.32.03 16.28-3.95 22.16-9.66 4.87-5.6 8.45-12.67 8.67-20.2.86-11.37-5.06-23.1-14.87-28.96-6.52-4.46-14.89-5.75-22.6-4.46z\" fill=\"#686868\"/>\n <path d=\"m238.29 208.39c8.84-.49 17.9 2.8 24.14 9.13 7.53 7.3 11.38 18.52 9.14 28.85-2.46 14.78-16.51 26.58-31.54 26.17-14.48.45-28.17-10.53-31.26-24.61-3.52-13.12 2.89-27.83 14.36-34.86 4.57-2.76 9.83-4.4 15.16-4.68z\" fill=\"#c3c3c3\"/>\n <path d=\"m491.97 364.22c9.59-1.56 19.35-1 29.03-1.02 37.76 1.81 74.22 19.32 100.02 46.82 15.53 16.9 27.59 37.15 34.03 59.23-47.67-.01-95.35-.01-143.03-.01-12.19-.11-24.23 5.42-32.21 14.61-6.01 6.85-9.74 15.65-10.44 24.74-1.19 14.17 5.36 28.7 16.69 37.28 7.62 5.91 17.28 9 26.92 8.8 126.69-.04 253.39-.06 380.08.03 4.76.04 9.59-.15 14.2-1.48 14.21-3.82 26.02-15.47 29.83-29.7.67 1.03.89 2.14.67 3.35-3.89 18.69-21.72 33.16-40.76 33.46-29.64-.06-59.27-.01-88.9-.05-1.63-.31-1.61 1.56-1.85 2.6-10.65 61.62-41.2 119.72-86.31 163.06-36.38 35.46-81.96 61.33-131.05 74.4-57.38-57.35-114.66-114.8-171.99-172.21-10-9.72-19.72-19.86-27.65-31.38-11.53-16.63-19.63-35.66-23.56-55.51-6.14-31.96-2.08-65.97 12.5-95.17 12.14-24.33 30.82-45.46 53.9-59.91 17.99-11.66 38.65-19.09 59.88-21.94z\" fill=\"#474747\"/>\n <g fill=\"#bfbfbf\">\n <path d=\"m479.81 483.85c7.98-9.19 20.02-14.72 32.21-14.61 47.68 0 95.36 0 143.03.01 80.65.06 161.29 0 241.93.07 20.41.05 39.2 16.83 41.25 37.17-.19.33-.58.97-.78 1.29-3.68-18.51-21.57-33.16-40.47-33.05-124.97.1-249.94.12-374.91.17-7.73.13-15.74-.8-23.15 1.96-9.06 2.84-16.73 9.1-22.27 16.7-3.34 4.55-4.39 10.24-7.28 15.03.7-9.09 4.43-17.89 10.44-24.74z\"/>\n <path d=\"m234.31 752.44c13.75-2.67 28.74 4.88 34.56 17.66 4.44 9.08 4.22 20.27-.71 29.1-5.14 9.93-15.96 16.55-27.12 16.8-8.27.38-16.52-2.84-22.67-8.32-9.03-8.2-12.77-21.73-8.9-33.36 3.36-11.16 13.35-19.93 24.84-21.88z\"/>\n </g>\n <path d=\"m498.92 476.86c7.41-2.76 15.42-1.83 23.15-1.96 124.97-.05 249.94-.07 374.91-.17 18.9-.11 36.79 14.54 40.47 33.05.2-.32.59-.96.78-1.29l.24-.4c.7 5.85-.16 11.72-1.38 17.43-3.81 14.23-15.62 25.88-29.83 29.7-4.61 1.33-9.44 1.52-14.2 1.48-126.69-.09-253.39-.07-380.08-.03-9.64.2-19.3-2.89-26.92-8.8-11.33-8.58-17.88-23.11-16.69-37.28 2.89-4.79 3.94-10.48 7.28-15.03 5.54-7.6 13.21-13.86 22.27-16.7z\" fill=\"#b0b0b0\"/>\n <path d=\"m59.49 636.08c.99 1.52 2.09 3.04 2.52 4.85 3.62 13.71 8.92 26.88 13.88 40.15 3.88 9.31 7.78 18.62 12.25 27.67 3.26 8.08 7.9 15.48 11.9 23.2 17.96 32.76 39.76 63.48 65.17 90.87 15.01 17.34 32.26 32.54 49.72 47.35 22.1 17.72 45.46 33.94 70.33 47.54 59.64 33.1 126.66 52.67 194.71 57.18 81.31 5.74 163.99-10.52 237.3-46.12 1.02 1.06 2.04 2.12 3.05 3.22l.03.61c-42.32 21.03-87.88 35.53-134.56 42.91-56.91 8.9-115.46 7.49-171.82-4.5-67.89-14.35-132.42-44.21-187.42-86.51-63.52-48.63-114.32-113.73-145.86-187.27-8.42-19.87-15.93-40.22-21.2-61.15z\" fill=\"#939393\"/>\n <path d=\"m778.34 752.53c7.71-1.29 16.08 0 22.6 4.46 9.81 5.86 15.73 17.59 14.87 28.96-.22 7.53-3.8 14.6-8.67 20.2-5.88 5.71-13.84 9.69-22.16 9.66-10.81.51-21.85-5.05-27.61-14.25-4.87-6.83-6.21-15.71-4.73-23.85 2.33-12.59 13.06-23.12 25.7-25.18z\" fill=\"#767676\"/>\n <path d=\"m506.37 864.47c8.73-1.56 18.06.66 25.08 6.11 10.94 8.14 15.55 23.72 10.58 36.46-3.37 9.44-11.46 16.91-21.07 19.68-9.35 2.81-19.91.93-27.77-4.86-10.78-7.54-15.78-22.22-11.91-34.79 3.17-11.53 13.33-20.58 25.09-22.6z\" fill=\"#bebebe\"/>\n </svg>\n </a>\n Google Authenticator\n </span>\n </div>\n </div>\n \n </div>\n\n <div *ngIf=\"mode === 'code-input'\" class=\"code-input\">\n <div>\n Enter the 6-digit code you see in the App.\n </div>\n\n <app-code-input\n (codeChanged)=\"codeChanged($event)\">\n </app-code-input>\n \n <div class=\"checkboxes\">\n <mat-checkbox name=\"default\" [(ngModel)]=\"default\" [disableRipple]=\"true\">\n Make this the default verification method\n </mat-checkbox>\n </div>\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <ng-container *ngIf=\"appType\">\n <button\n *ngIf=\"mode === 'qr-code'\"\n type=\"button\"\n mat-button\n color=\"primary\"\n (click)=\"next()\">\n Next\n </button>\n <button\n *ngIf=\"mode === 'code-input'\"\n type=\"submit\"\n mat-button\n color=\"primary\"\n (click)=\"next()\">\n Verify\n </button> \n </ng-container>\n <button\n type=\"button\"\n mat-button\n [mat-dialog-close]=\"null\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: ["ul{margin:0;padding-left:24px}fs-qrcode{display:flex;justify-content:center;margin:30px}app-code-input{margin-top:10px}.code-input{width:400px}.app-types{text-align:center;padding:0 40px}.app-types .row{display:flex;justify-content:center}.app-types .row span{display:flex;flex-direction:column;text-align:center;max-width:100px}.app-types .row span+span{margin-left:40px}.checkboxes{margin:8px 0}.checkboxes mat-checkbox{display:block}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { 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: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i8$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i9.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout", "dock", "dockable", "fullscreenPercent"] }, { kind: "directive", type: i10.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup", "deactivationGuard"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"], exportAs: ["fsForm"] }, { kind: "directive", type: i10.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "directive", type: i10.FsButtonDirective, selector: "[mat-raised-button]:not([fsFormButtonStandalone]),[mat-button]:not([fsFormButtonStandalone]),[mat-flat-button]:not([fsFormButtonStandalone]),[mat-stroked-button]:not([fsFormButtonStandalone])", inputs: ["name", "dirtySubmit", "form"] }, { kind: "directive", type: i9$1.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { kind: "component", type: i10$1.FsClipboardComponent, selector: "fs-qrcode", inputs: ["value", "width", "height"] }, { kind: "component", type: CodeInputComponent, selector: "app-code-input", inputs: ["codeLength", "code"], outputs: ["codeCompleted", "codeChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
686
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppComponent, decorators: [{
|
|
687
|
-
type: Component,
|
|
688
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<form fsForm [submit]=\"verify\">\n <fs-dialog>\n <h1 mat-dialog-title>Authenticator App Setup</h1>\n <mat-dialog-content>\n\n <div *ngIf=\"mode === 'qr-code'\" class=\"qr-code\">\n <ng-container *ngIf=\"appType\">\n <ol>\n <li>\n <ng-container *ngIf=\"appType === 'authy'\">\n Install the Authy Authenticator App from the <a href=\"https://apps.apple.com/us/app/authy/id494168017\" target=\"_blank\">App Store</a> or\n the <a href=\"https://play.google.com/store/apps/details?id=com.authy.authy\" target=\"_blank\">Google Play Store</a>.\n </ng-container>\n\n <ng-container *ngIf=\"appType === 'google'\">\n Install the Google Authenticator App from the <a href=\"https://apps.apple.com/us/app/google-authenticator/id388497605\" target=\"_blank\">App Store</a> or\n the <a href=\"https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=en_US&gl=US\" target=\"_blank\">Google Play Store</a>.\n </ng-container>\n </li>\n <ng-container *ngIf=\"appType === 'authy'\">\n <li>\n Open the Authy app and select <b>Add Account</b>.\n </li>\n <li>\n Select <b>Scan QR Code</b> and scan the QR code below.\n </li>\n </ng-container> \n <ng-container *ngIf=\"appType === 'google'\">\n <li>\n Open the Google Authentictor app and click the <b>Plus icon</b> in the lower right corner.\n </li>\n <li>\n Select <b>Scan a QR code</b> and scan the QR code below.\n </li>\n </ng-container>\n </ol>\n\n <ng-container *fsSkeleton=\"qrCodeUrl\">\n <fs-qrcode\n [value]=\"qrCodeUrl\"\n [width]=\"300\"\n [height]=\"300\">\n </fs-qrcode>\n </ng-container>\n </ng-container>\n\n <div class=\"app-types\" *ngIf=\"!appType\">\n <p>Select the Authenticator App you prefer</p>\n\n <div class=\"row\">\n <span>\n <a (click)=\"appTypeAuthy()\">\n <svg width=\"50\" height=\"50\" viewBox=\"0 0 256 256\" xmlns=\"http://www.w3.org/2000/svg\" preserveAspectRatio=\"xMidYMid\"><path d=\"M256 127.998C256 198.696 198.694 256 127.997 256 57.304 256 0 198.696 0 127.998 0 57.305 57.304 0 127.997 0 198.694 0 256 57.305 256 127.998z\" fill=\"#EC1C24\"/><path d=\"M117.024 100.89l30.691 30.68c4.43 4.436 11.623 4.436 16.064 0 4.431-4.435 4.441-11.622 0-16.058L133.086 84.82C111.125 62.854 75.631 62.5 53.204 83.704a9.536 9.536 0 0 0-.605.548c-.098.098-.178.202-.275.29-.1.096-.202.182-.297.278-.194.193-.371.396-.54.597-21.215 22.437-20.85 57.932 1.113 79.897L83.292 196c4.44 4.433 11.623 4.433 16.062 0 4.442-4.437 4.442-11.633.011-16.06l-30.693-30.691c-13.398-13.393-13.488-35.129-.278-48.637 13.506-13.21 35.23-13.114 48.63.279zm39.612-40.873c-4.435 4.437-4.435 11.623.012 16.059l30.681 30.693c13.39 13.392 13.477 35.125.268 48.636-13.51 13.2-35.227 13.112-48.623-.282l-30.692-30.689c-4.438-4.437-11.633-4.437-16.066 0-4.443 4.433-4.443 11.642 0 16.065l30.682 30.694c21.968 21.965 57.458 22.322 79.889 1.116.208-.184.404-.355.61-.549.094-.095.182-.192.273-.29.1-.095.197-.183.29-.289.197-.183.365-.384.54-.594 21.215-22.428 20.86-57.911-1.102-79.889l-30.692-30.682c-4.436-4.443-11.638-4.443-16.07.001z\" fill=\"#FFF\"/></svg>\n </a>\n Authy\n </span>\n \n <span>\n <a (click)=\"appTypeGoogle()\"> \n <svg width=\"50\" height=\"50\" viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"m457.07 45.92c73.67-8.62 149.41.22 218.93 26.24 62.75 23.47 120.59 60.41 167.72 108.09-40.31 39.97-80.25 80.31-120.51 120.33-25.95-25.45-56.19-46.65-89.47-61.37-44.22-19.82-93.39-28.54-141.72-25.2-54.6 3.52-108.11 22.49-152.63 54.3-55.24 38.95-96.61 97.22-114.8 162.35-13.64 47.78-14.77 98.97-3.76 147.4 8.85 39.61 26.09 77.29 50.05 110.03 22.24 30.45 50.3 56.64 82.22 76.71 36.79 23.24 78.76 38.22 121.96 43.48 37.02 4.65 74.9 2.23 111.05-7 3.97-1.91 6.24 2.61 8.73 4.86 40.74 40.95 81.68 81.7 122.43 122.63-73.31 35.6-155.99 51.86-237.3 46.12-68.05-4.51-135.07-24.08-194.71-57.18-24.87-13.6-48.23-29.82-70.33-47.54-17.46-14.81-34.71-30.01-49.72-47.35-25.41-27.39-47.21-58.11-65.17-90.87-4-7.72-8.64-15.12-11.9-23.2-4.47-9.05-8.37-18.36-12.25-27.67-4.96-13.27-10.26-26.44-13.88-40.15-.43-1.81-1.53-3.33-2.52-4.85-8.3-28.66-12.95-58.33-15.44-88.04-2.62-37.36-1.33-75.05 4.78-112.03 12.18-75.48 43.41-147.74 89.86-208.44 30.12-39.5 66.53-74.21 107.46-102.35 62.44-43.11 135.53-70.69 210.92-79.3m49.18 50.48c-5.7.99-10.96 3.76-15.38 7.43-10.4 8.93-14.14 24.81-8.17 37.28 6.33 15.02 25.16 23.1 40.36 17 15.43-5.24 24.78-23.51 19.74-39.06-4.1-15.43-20.92-25.79-36.55-22.65m-267.96 111.99c-5.33.28-10.59 1.92-15.16 4.68-11.47 7.03-17.88 21.74-14.36 34.86 3.09 14.08 16.78 25.06 31.26 24.61 15.03.41 29.08-11.39 31.54-26.17 2.24-10.33-1.61-21.55-9.14-28.85-6.24-6.33-15.3-9.62-24.14-9.13m-115.96 272c-6.62 1.23-12.84 4.58-17.54 9.4-9.45 9.72-11.72 25.57-5.02 37.42 7.16 13.96 25.48 20.86 39.98 14.62 15.02-5.51 23.99-23.42 19.06-38.71-4.04-15.41-20.86-25.96-36.48-22.73m111.98 272.05c-11.49 1.95-21.48 10.72-24.84 21.88-3.87 11.63-.13 25.16 8.9 33.36 6.15 5.48 14.4 8.7 22.67 8.32 11.16-.25 21.98-6.87 27.12-16.8 4.93-8.83 5.15-20.02.71-29.1-5.82-12.78-20.81-20.33-34.56-17.66m272.06 112.03c-11.76 2.02-21.92 11.07-25.09 22.6-3.87 12.57 1.13 27.25 11.91 34.79 7.86 5.79 18.42 7.67 27.77 4.86 9.61-2.77 17.7-10.24 21.07-19.68 4.97-12.74.36-28.32-10.58-36.46-7.02-5.45-16.35-7.67-25.08-6.11z\" fill=\"#a0a0a0\"/>\n <g fill=\"#c1c1c1\">\n <path d=\"m506.25 96.4c15.63-3.14 32.45 7.22 36.55 22.65 5.04 15.55-4.31 33.82-19.74 39.06-15.2 6.1-34.03-1.98-40.36-17-5.97-12.47-2.23-28.35 8.17-37.28 4.42-3.67 9.68-6.44 15.38-7.43z\"/>\n <path d=\"m122.33 480.39c15.62-3.23 32.44 7.32 36.48 22.73 4.93 15.29-4.04 33.2-19.06 38.71-14.5 6.24-32.82-.66-39.98-14.62-6.7-11.85-4.43-27.7 5.02-37.42 4.7-4.82 10.92-8.17 17.54-9.4z\"/>\n </g>\n <path d=\"m843.72 180.25.11-.11c24.64 25.12 46.96 52.6 65.61 82.47 36.01 57.16 59.38 122.22 67.87 189.25 5.67 44.88 5.27 90.6-2.05 135.27-12.7 80.01-46.94 156.41-97.9 219.36-42.3 52.48-95.87 96.04-156.41 125.76l-.63-.26c-1.01-1.1-2.03-2.16-3.05-3.22-40.75-40.93-81.69-81.68-122.43-122.63-2.49-2.25-4.76-6.77-8.73-4.86-36.15 9.23-74.03 11.65-111.05 7-43.2-5.26-85.17-20.24-121.96-43.48-31.92-20.07-59.98-46.26-82.22-76.71-23.96-32.74-41.2-70.42-50.05-110.03-11.01-48.43-9.88-99.62 3.76-147.4 18.19-65.13 59.56-123.4 114.8-162.35 44.52-31.81 98.03-50.78 152.63-54.3 48.33-3.34 97.5 5.38 141.72 25.2 33.28 14.72 63.52 35.92 89.47 61.37 40.26-40.02 80.2-80.36 120.51-120.33m-351.75 183.97c-21.23 2.85-41.89 10.28-59.88 21.94-23.08 14.45-41.76 35.58-53.9 59.91-14.58 29.2-18.64 63.21-12.5 95.17 3.93 19.85 12.03 38.88 23.56 55.51 7.93 11.52 17.65 21.66 27.65 31.38 57.33 57.41 114.61 114.86 171.99 172.21 49.09-13.07 94.67-38.94 131.05-74.4 45.11-43.34 75.66-101.44 86.31-163.06.24-1.04.22-2.91 1.85-2.6 29.63.04 59.26-.01 88.9.05 19.04-.3 36.87-14.77 40.76-33.46.22-1.21 0-2.32-.67-3.35 1.22-5.71 2.08-11.58 1.38-17.43l-.24.4c-2.05-20.34-20.84-37.12-41.25-37.17-80.64-.07-161.28-.01-241.93-.07-6.44-22.08-18.5-42.33-34.03-59.23-25.8-27.5-62.26-45.01-100.02-46.82-9.68.02-19.44-.54-29.03 1.02m286.37 388.31c-12.64 2.06-23.37 12.59-25.7 25.18-1.48 8.14-.14 17.02 4.73 23.85 5.76 9.2 16.8 14.76 27.61 14.25 8.32.03 16.28-3.95 22.16-9.66 4.87-5.6 8.45-12.67 8.67-20.2.86-11.37-5.06-23.1-14.87-28.96-6.52-4.46-14.89-5.75-22.6-4.46z\" fill=\"#686868\"/>\n <path d=\"m238.29 208.39c8.84-.49 17.9 2.8 24.14 9.13 7.53 7.3 11.38 18.52 9.14 28.85-2.46 14.78-16.51 26.58-31.54 26.17-14.48.45-28.17-10.53-31.26-24.61-3.52-13.12 2.89-27.83 14.36-34.86 4.57-2.76 9.83-4.4 15.16-4.68z\" fill=\"#c3c3c3\"/>\n <path d=\"m491.97 364.22c9.59-1.56 19.35-1 29.03-1.02 37.76 1.81 74.22 19.32 100.02 46.82 15.53 16.9 27.59 37.15 34.03 59.23-47.67-.01-95.35-.01-143.03-.01-12.19-.11-24.23 5.42-32.21 14.61-6.01 6.85-9.74 15.65-10.44 24.74-1.19 14.17 5.36 28.7 16.69 37.28 7.62 5.91 17.28 9 26.92 8.8 126.69-.04 253.39-.06 380.08.03 4.76.04 9.59-.15 14.2-1.48 14.21-3.82 26.02-15.47 29.83-29.7.67 1.03.89 2.14.67 3.35-3.89 18.69-21.72 33.16-40.76 33.46-29.64-.06-59.27-.01-88.9-.05-1.63-.31-1.61 1.56-1.85 2.6-10.65 61.62-41.2 119.72-86.31 163.06-36.38 35.46-81.96 61.33-131.05 74.4-57.38-57.35-114.66-114.8-171.99-172.21-10-9.72-19.72-19.86-27.65-31.38-11.53-16.63-19.63-35.66-23.56-55.51-6.14-31.96-2.08-65.97 12.5-95.17 12.14-24.33 30.82-45.46 53.9-59.91 17.99-11.66 38.65-19.09 59.88-21.94z\" fill=\"#474747\"/>\n <g fill=\"#bfbfbf\">\n <path d=\"m479.81 483.85c7.98-9.19 20.02-14.72 32.21-14.61 47.68 0 95.36 0 143.03.01 80.65.06 161.29 0 241.93.07 20.41.05 39.2 16.83 41.25 37.17-.19.33-.58.97-.78 1.29-3.68-18.51-21.57-33.16-40.47-33.05-124.97.1-249.94.12-374.91.17-7.73.13-15.74-.8-23.15 1.96-9.06 2.84-16.73 9.1-22.27 16.7-3.34 4.55-4.39 10.24-7.28 15.03.7-9.09 4.43-17.89 10.44-24.74z\"/>\n <path d=\"m234.31 752.44c13.75-2.67 28.74 4.88 34.56 17.66 4.44 9.08 4.22 20.27-.71 29.1-5.14 9.93-15.96 16.55-27.12 16.8-8.27.38-16.52-2.84-22.67-8.32-9.03-8.2-12.77-21.73-8.9-33.36 3.36-11.16 13.35-19.93 24.84-21.88z\"/>\n </g>\n <path d=\"m498.92 476.86c7.41-2.76 15.42-1.83 23.15-1.96 124.97-.05 249.94-.07 374.91-.17 18.9-.11 36.79 14.54 40.47 33.05.2-.32.59-.96.78-1.29l.24-.4c.7 5.85-.16 11.72-1.38 17.43-3.81 14.23-15.62 25.88-29.83 29.7-4.61 1.33-9.44 1.52-14.2 1.48-126.69-.09-253.39-.07-380.08-.03-9.64.2-19.3-2.89-26.92-8.8-11.33-8.58-17.88-23.11-16.69-37.28 2.89-4.79 3.94-10.48 7.28-15.03 5.54-7.6 13.21-13.86 22.27-16.7z\" fill=\"#b0b0b0\"/>\n <path d=\"m59.49 636.08c.99 1.52 2.09 3.04 2.52 4.85 3.62 13.71 8.92 26.88 13.88 40.15 3.88 9.31 7.78 18.62 12.25 27.67 3.26 8.08 7.9 15.48 11.9 23.2 17.96 32.76 39.76 63.48 65.17 90.87 15.01 17.34 32.26 32.54 49.72 47.35 22.1 17.72 45.46 33.94 70.33 47.54 59.64 33.1 126.66 52.67 194.71 57.18 81.31 5.74 163.99-10.52 237.3-46.12 1.02 1.06 2.04 2.12 3.05 3.22l.03.61c-42.32 21.03-87.88 35.53-134.56 42.91-56.91 8.9-115.46 7.49-171.82-4.5-67.89-14.35-132.42-44.21-187.42-86.51-63.52-48.63-114.32-113.73-145.86-187.27-8.42-19.87-15.93-40.22-21.2-61.15z\" fill=\"#939393\"/>\n <path d=\"m778.34 752.53c7.71-1.29 16.08 0 22.6 4.46 9.81 5.86 15.73 17.59 14.87 28.96-.22 7.53-3.8 14.6-8.67 20.2-5.88 5.71-13.84 9.69-22.16 9.66-10.81.51-21.85-5.05-27.61-14.25-4.87-6.83-6.21-15.71-4.73-23.85 2.33-12.59 13.06-23.12 25.7-25.18z\" fill=\"#767676\"/>\n <path d=\"m506.37 864.47c8.73-1.56 18.06.66 25.08 6.11 10.94 8.14 15.55 23.72 10.58 36.46-3.37 9.44-11.46 16.91-21.07 19.68-9.35 2.81-19.91.93-27.77-4.86-10.78-7.54-15.78-22.22-11.91-34.79 3.17-11.53 13.33-20.58 25.09-22.6z\" fill=\"#bebebe\"/>\n </svg>\n </a>\n Google Authenticator\n </span>\n </div>\n </div>\n \n </div>\n\n <div *ngIf=\"mode === 'code-input'\" class=\"code-input\">\n <div>\n Enter the 6-digit code you see in the App.\n </div>\n\n <app-code-input\n (codeChanged)=\"codeChanged($event)\">\n </app-code-input>\n \n <div class=\"checkboxes\">\n <mat-checkbox name=\"default\" [(ngModel)]=\"default\" [disableRipple]=\"true\">\n Make this the default verification method\n </mat-checkbox>\n </div>\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <ng-container *ngIf=\"appType\">\n <button\n *ngIf=\"mode === 'qr-code'\"\n type=\"button\"\n mat-button\n color=\"primary\"\n (click)=\"next()\">\n Next\n </button>\n <button\n *ngIf=\"mode === 'code-input'\"\n type=\"submit\"\n mat-button\n color=\"primary\"\n (click)=\"next()\">\n Verify\n </button> \n </ng-container>\n <button\n type=\"button\"\n mat-button\n [mat-dialog-close]=\"null\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: ["ul{margin:0;padding-left:24px}fs-qrcode{display:flex;justify-content:center;margin:30px}app-code-input{margin-top:10px}.code-input{width:400px}.app-types{text-align:center;padding:0 40px}.app-types .row{display:flex;justify-content:center}.app-types .row span{display:flex;flex-direction:column;text-align:center;max-width:100px}.app-types .row span+span{margin-left:40px}.checkboxes{margin:8px 0}.checkboxes mat-checkbox{display:block}\n"] }]
|
|
689
|
-
}], ctorParameters: function () {
|
|
690
|
-
return [{ type: undefined, decorators: [{
|
|
691
|
-
type: Inject,
|
|
692
|
-
args: [MAT_DIALOG_DATA]
|
|
693
|
-
}] }, { type: i1.MatDialogRef }, { type: i0.ChangeDetectorRef }, { type: i2$2.FsMessage }];
|
|
694
|
-
}, propDecorators: { form: [{
|
|
695
|
-
type: ViewChild,
|
|
696
|
-
args: [FsFormDirective]
|
|
632
|
+
class AppComponent {
|
|
633
|
+
constructor(_data, _dialogRef, _cdRef, _message) {
|
|
634
|
+
this._data = _data;
|
|
635
|
+
this._dialogRef = _dialogRef;
|
|
636
|
+
this._cdRef = _cdRef;
|
|
637
|
+
this._message = _message;
|
|
638
|
+
this.mode = 'qr-code';
|
|
639
|
+
this.verify = () => {
|
|
640
|
+
return this.twoFactorManageService.verificationMethodVerify$(this.code, true)
|
|
641
|
+
.pipe(switchMap(() => {
|
|
642
|
+
return this.default && this.twoFactorManageService.verificationMethodDefault$ ?
|
|
643
|
+
this.twoFactorManageService.verificationMethodDefault$(this.verificationMethod) :
|
|
644
|
+
of(true);
|
|
645
|
+
}), tap(() => {
|
|
646
|
+
this._message.success('Created app authenticator verification method');
|
|
647
|
+
this._dialogRef.close(true);
|
|
648
|
+
}));
|
|
649
|
+
};
|
|
650
|
+
}
|
|
651
|
+
ngOnInit() {
|
|
652
|
+
this.twoFactorManageService = this._data.twoFactorManageService;
|
|
653
|
+
this.accountId = this._data.accountId;
|
|
654
|
+
this.default = !this.twoFactorManageService.hasVerificationMethods;
|
|
655
|
+
}
|
|
656
|
+
appTypeGoogle() {
|
|
657
|
+
this.appTypeSelect('google');
|
|
658
|
+
}
|
|
659
|
+
appTypeAuthy() {
|
|
660
|
+
this.appTypeSelect('authy');
|
|
661
|
+
}
|
|
662
|
+
appTypeSelect(appType) {
|
|
663
|
+
this.appType = appType;
|
|
664
|
+
this.twoFactorManageService.verificationMethodCreate$({
|
|
665
|
+
type: VerificationMethodType.App,
|
|
666
|
+
})
|
|
667
|
+
.subscribe((verificationMethod) => {
|
|
668
|
+
this.verificationMethod = verificationMethod;
|
|
669
|
+
this.qrCodeUrl = verificationMethod.qrCodeUrl;
|
|
670
|
+
this._cdRef.markForCheck();
|
|
671
|
+
});
|
|
672
|
+
}
|
|
673
|
+
codeCompleted() {
|
|
674
|
+
this.form.triggerSubmit();
|
|
675
|
+
}
|
|
676
|
+
codeChanged(code) {
|
|
677
|
+
this.code = code;
|
|
678
|
+
this.form.dirty();
|
|
679
|
+
}
|
|
680
|
+
next() {
|
|
681
|
+
this.mode = 'code-input';
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
AppComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i0.ChangeDetectorRef }, { token: i2$2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
|
|
685
|
+
AppComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AppComponent, selector: "ng-component", viewQueries: [{ propertyName: "form", first: true, predicate: FsFormDirective, descendants: true }], ngImport: i0, template: "<form fsForm [submit]=\"verify\">\n <fs-dialog>\n <h1 mat-dialog-title>Authenticator App Setup</h1>\n <mat-dialog-content>\n\n <div *ngIf=\"mode === 'qr-code'\" class=\"qr-code\">\n <ng-container *ngIf=\"appType\">\n <ol>\n <li>\n <ng-container *ngIf=\"appType === 'authy'\">\n Install the Authy Authenticator App from the <a href=\"https://apps.apple.com/us/app/authy/id494168017\" target=\"_blank\">App Store</a> or\n the <a href=\"https://play.google.com/store/apps/details?id=com.authy.authy\" target=\"_blank\">Google Play Store</a>.\n </ng-container>\n\n <ng-container *ngIf=\"appType === 'google'\">\n Install the Google Authenticator App from the <a href=\"https://apps.apple.com/us/app/google-authenticator/id388497605\" target=\"_blank\">App Store</a> or\n the <a href=\"https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=en_US&gl=US\" target=\"_blank\">Google Play Store</a>.\n </ng-container>\n </li>\n <ng-container *ngIf=\"appType === 'authy'\">\n <li>\n Open the Authy app and select <b>Add Account</b>.\n </li>\n <li>\n Select <b>Scan QR Code</b> and scan the QR code below.\n </li>\n </ng-container> \n <ng-container *ngIf=\"appType === 'google'\">\n <li>\n Open the Google Authentictor app and click the <b>Plus icon</b> in the lower right corner.\n </li>\n <li>\n Select <b>Scan a QR code</b> and scan the QR code below.\n </li>\n </ng-container>\n </ol>\n\n <ng-container *fsSkeleton=\"qrCodeUrl\">\n <fs-qrcode\n [value]=\"qrCodeUrl\"\n [width]=\"300\"\n [height]=\"300\">\n </fs-qrcode>\n </ng-container>\n </ng-container>\n\n <div class=\"app-types\" *ngIf=\"!appType\">\n <p>Select the Authenticator App you prefer</p>\n\n <div class=\"row\">\n <span>\n <a (click)=\"appTypeAuthy()\">\n <svg width=\"50\" height=\"50\" viewBox=\"0 0 256 256\" xmlns=\"http://www.w3.org/2000/svg\" preserveAspectRatio=\"xMidYMid\"><path d=\"M256 127.998C256 198.696 198.694 256 127.997 256 57.304 256 0 198.696 0 127.998 0 57.305 57.304 0 127.997 0 198.694 0 256 57.305 256 127.998z\" fill=\"#EC1C24\"/><path d=\"M117.024 100.89l30.691 30.68c4.43 4.436 11.623 4.436 16.064 0 4.431-4.435 4.441-11.622 0-16.058L133.086 84.82C111.125 62.854 75.631 62.5 53.204 83.704a9.536 9.536 0 0 0-.605.548c-.098.098-.178.202-.275.29-.1.096-.202.182-.297.278-.194.193-.371.396-.54.597-21.215 22.437-20.85 57.932 1.113 79.897L83.292 196c4.44 4.433 11.623 4.433 16.062 0 4.442-4.437 4.442-11.633.011-16.06l-30.693-30.691c-13.398-13.393-13.488-35.129-.278-48.637 13.506-13.21 35.23-13.114 48.63.279zm39.612-40.873c-4.435 4.437-4.435 11.623.012 16.059l30.681 30.693c13.39 13.392 13.477 35.125.268 48.636-13.51 13.2-35.227 13.112-48.623-.282l-30.692-30.689c-4.438-4.437-11.633-4.437-16.066 0-4.443 4.433-4.443 11.642 0 16.065l30.682 30.694c21.968 21.965 57.458 22.322 79.889 1.116.208-.184.404-.355.61-.549.094-.095.182-.192.273-.29.1-.095.197-.183.29-.289.197-.183.365-.384.54-.594 21.215-22.428 20.86-57.911-1.102-79.889l-30.692-30.682c-4.436-4.443-11.638-4.443-16.07.001z\" fill=\"#FFF\"/></svg>\n </a>\n Authy\n </span>\n \n <span>\n <a (click)=\"appTypeGoogle()\"> \n <svg width=\"50\" height=\"50\" viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"m457.07 45.92c73.67-8.62 149.41.22 218.93 26.24 62.75 23.47 120.59 60.41 167.72 108.09-40.31 39.97-80.25 80.31-120.51 120.33-25.95-25.45-56.19-46.65-89.47-61.37-44.22-19.82-93.39-28.54-141.72-25.2-54.6 3.52-108.11 22.49-152.63 54.3-55.24 38.95-96.61 97.22-114.8 162.35-13.64 47.78-14.77 98.97-3.76 147.4 8.85 39.61 26.09 77.29 50.05 110.03 22.24 30.45 50.3 56.64 82.22 76.71 36.79 23.24 78.76 38.22 121.96 43.48 37.02 4.65 74.9 2.23 111.05-7 3.97-1.91 6.24 2.61 8.73 4.86 40.74 40.95 81.68 81.7 122.43 122.63-73.31 35.6-155.99 51.86-237.3 46.12-68.05-4.51-135.07-24.08-194.71-57.18-24.87-13.6-48.23-29.82-70.33-47.54-17.46-14.81-34.71-30.01-49.72-47.35-25.41-27.39-47.21-58.11-65.17-90.87-4-7.72-8.64-15.12-11.9-23.2-4.47-9.05-8.37-18.36-12.25-27.67-4.96-13.27-10.26-26.44-13.88-40.15-.43-1.81-1.53-3.33-2.52-4.85-8.3-28.66-12.95-58.33-15.44-88.04-2.62-37.36-1.33-75.05 4.78-112.03 12.18-75.48 43.41-147.74 89.86-208.44 30.12-39.5 66.53-74.21 107.46-102.35 62.44-43.11 135.53-70.69 210.92-79.3m49.18 50.48c-5.7.99-10.96 3.76-15.38 7.43-10.4 8.93-14.14 24.81-8.17 37.28 6.33 15.02 25.16 23.1 40.36 17 15.43-5.24 24.78-23.51 19.74-39.06-4.1-15.43-20.92-25.79-36.55-22.65m-267.96 111.99c-5.33.28-10.59 1.92-15.16 4.68-11.47 7.03-17.88 21.74-14.36 34.86 3.09 14.08 16.78 25.06 31.26 24.61 15.03.41 29.08-11.39 31.54-26.17 2.24-10.33-1.61-21.55-9.14-28.85-6.24-6.33-15.3-9.62-24.14-9.13m-115.96 272c-6.62 1.23-12.84 4.58-17.54 9.4-9.45 9.72-11.72 25.57-5.02 37.42 7.16 13.96 25.48 20.86 39.98 14.62 15.02-5.51 23.99-23.42 19.06-38.71-4.04-15.41-20.86-25.96-36.48-22.73m111.98 272.05c-11.49 1.95-21.48 10.72-24.84 21.88-3.87 11.63-.13 25.16 8.9 33.36 6.15 5.48 14.4 8.7 22.67 8.32 11.16-.25 21.98-6.87 27.12-16.8 4.93-8.83 5.15-20.02.71-29.1-5.82-12.78-20.81-20.33-34.56-17.66m272.06 112.03c-11.76 2.02-21.92 11.07-25.09 22.6-3.87 12.57 1.13 27.25 11.91 34.79 7.86 5.79 18.42 7.67 27.77 4.86 9.61-2.77 17.7-10.24 21.07-19.68 4.97-12.74.36-28.32-10.58-36.46-7.02-5.45-16.35-7.67-25.08-6.11z\" fill=\"#a0a0a0\"/>\n <g fill=\"#c1c1c1\">\n <path d=\"m506.25 96.4c15.63-3.14 32.45 7.22 36.55 22.65 5.04 15.55-4.31 33.82-19.74 39.06-15.2 6.1-34.03-1.98-40.36-17-5.97-12.47-2.23-28.35 8.17-37.28 4.42-3.67 9.68-6.44 15.38-7.43z\"/>\n <path d=\"m122.33 480.39c15.62-3.23 32.44 7.32 36.48 22.73 4.93 15.29-4.04 33.2-19.06 38.71-14.5 6.24-32.82-.66-39.98-14.62-6.7-11.85-4.43-27.7 5.02-37.42 4.7-4.82 10.92-8.17 17.54-9.4z\"/>\n </g>\n <path d=\"m843.72 180.25.11-.11c24.64 25.12 46.96 52.6 65.61 82.47 36.01 57.16 59.38 122.22 67.87 189.25 5.67 44.88 5.27 90.6-2.05 135.27-12.7 80.01-46.94 156.41-97.9 219.36-42.3 52.48-95.87 96.04-156.41 125.76l-.63-.26c-1.01-1.1-2.03-2.16-3.05-3.22-40.75-40.93-81.69-81.68-122.43-122.63-2.49-2.25-4.76-6.77-8.73-4.86-36.15 9.23-74.03 11.65-111.05 7-43.2-5.26-85.17-20.24-121.96-43.48-31.92-20.07-59.98-46.26-82.22-76.71-23.96-32.74-41.2-70.42-50.05-110.03-11.01-48.43-9.88-99.62 3.76-147.4 18.19-65.13 59.56-123.4 114.8-162.35 44.52-31.81 98.03-50.78 152.63-54.3 48.33-3.34 97.5 5.38 141.72 25.2 33.28 14.72 63.52 35.92 89.47 61.37 40.26-40.02 80.2-80.36 120.51-120.33m-351.75 183.97c-21.23 2.85-41.89 10.28-59.88 21.94-23.08 14.45-41.76 35.58-53.9 59.91-14.58 29.2-18.64 63.21-12.5 95.17 3.93 19.85 12.03 38.88 23.56 55.51 7.93 11.52 17.65 21.66 27.65 31.38 57.33 57.41 114.61 114.86 171.99 172.21 49.09-13.07 94.67-38.94 131.05-74.4 45.11-43.34 75.66-101.44 86.31-163.06.24-1.04.22-2.91 1.85-2.6 29.63.04 59.26-.01 88.9.05 19.04-.3 36.87-14.77 40.76-33.46.22-1.21 0-2.32-.67-3.35 1.22-5.71 2.08-11.58 1.38-17.43l-.24.4c-2.05-20.34-20.84-37.12-41.25-37.17-80.64-.07-161.28-.01-241.93-.07-6.44-22.08-18.5-42.33-34.03-59.23-25.8-27.5-62.26-45.01-100.02-46.82-9.68.02-19.44-.54-29.03 1.02m286.37 388.31c-12.64 2.06-23.37 12.59-25.7 25.18-1.48 8.14-.14 17.02 4.73 23.85 5.76 9.2 16.8 14.76 27.61 14.25 8.32.03 16.28-3.95 22.16-9.66 4.87-5.6 8.45-12.67 8.67-20.2.86-11.37-5.06-23.1-14.87-28.96-6.52-4.46-14.89-5.75-22.6-4.46z\" fill=\"#686868\"/>\n <path d=\"m238.29 208.39c8.84-.49 17.9 2.8 24.14 9.13 7.53 7.3 11.38 18.52 9.14 28.85-2.46 14.78-16.51 26.58-31.54 26.17-14.48.45-28.17-10.53-31.26-24.61-3.52-13.12 2.89-27.83 14.36-34.86 4.57-2.76 9.83-4.4 15.16-4.68z\" fill=\"#c3c3c3\"/>\n <path d=\"m491.97 364.22c9.59-1.56 19.35-1 29.03-1.02 37.76 1.81 74.22 19.32 100.02 46.82 15.53 16.9 27.59 37.15 34.03 59.23-47.67-.01-95.35-.01-143.03-.01-12.19-.11-24.23 5.42-32.21 14.61-6.01 6.85-9.74 15.65-10.44 24.74-1.19 14.17 5.36 28.7 16.69 37.28 7.62 5.91 17.28 9 26.92 8.8 126.69-.04 253.39-.06 380.08.03 4.76.04 9.59-.15 14.2-1.48 14.21-3.82 26.02-15.47 29.83-29.7.67 1.03.89 2.14.67 3.35-3.89 18.69-21.72 33.16-40.76 33.46-29.64-.06-59.27-.01-88.9-.05-1.63-.31-1.61 1.56-1.85 2.6-10.65 61.62-41.2 119.72-86.31 163.06-36.38 35.46-81.96 61.33-131.05 74.4-57.38-57.35-114.66-114.8-171.99-172.21-10-9.72-19.72-19.86-27.65-31.38-11.53-16.63-19.63-35.66-23.56-55.51-6.14-31.96-2.08-65.97 12.5-95.17 12.14-24.33 30.82-45.46 53.9-59.91 17.99-11.66 38.65-19.09 59.88-21.94z\" fill=\"#474747\"/>\n <g fill=\"#bfbfbf\">\n <path d=\"m479.81 483.85c7.98-9.19 20.02-14.72 32.21-14.61 47.68 0 95.36 0 143.03.01 80.65.06 161.29 0 241.93.07 20.41.05 39.2 16.83 41.25 37.17-.19.33-.58.97-.78 1.29-3.68-18.51-21.57-33.16-40.47-33.05-124.97.1-249.94.12-374.91.17-7.73.13-15.74-.8-23.15 1.96-9.06 2.84-16.73 9.1-22.27 16.7-3.34 4.55-4.39 10.24-7.28 15.03.7-9.09 4.43-17.89 10.44-24.74z\"/>\n <path d=\"m234.31 752.44c13.75-2.67 28.74 4.88 34.56 17.66 4.44 9.08 4.22 20.27-.71 29.1-5.14 9.93-15.96 16.55-27.12 16.8-8.27.38-16.52-2.84-22.67-8.32-9.03-8.2-12.77-21.73-8.9-33.36 3.36-11.16 13.35-19.93 24.84-21.88z\"/>\n </g>\n <path d=\"m498.92 476.86c7.41-2.76 15.42-1.83 23.15-1.96 124.97-.05 249.94-.07 374.91-.17 18.9-.11 36.79 14.54 40.47 33.05.2-.32.59-.96.78-1.29l.24-.4c.7 5.85-.16 11.72-1.38 17.43-3.81 14.23-15.62 25.88-29.83 29.7-4.61 1.33-9.44 1.52-14.2 1.48-126.69-.09-253.39-.07-380.08-.03-9.64.2-19.3-2.89-26.92-8.8-11.33-8.58-17.88-23.11-16.69-37.28 2.89-4.79 3.94-10.48 7.28-15.03 5.54-7.6 13.21-13.86 22.27-16.7z\" fill=\"#b0b0b0\"/>\n <path d=\"m59.49 636.08c.99 1.52 2.09 3.04 2.52 4.85 3.62 13.71 8.92 26.88 13.88 40.15 3.88 9.31 7.78 18.62 12.25 27.67 3.26 8.08 7.9 15.48 11.9 23.2 17.96 32.76 39.76 63.48 65.17 90.87 15.01 17.34 32.26 32.54 49.72 47.35 22.1 17.72 45.46 33.94 70.33 47.54 59.64 33.1 126.66 52.67 194.71 57.18 81.31 5.74 163.99-10.52 237.3-46.12 1.02 1.06 2.04 2.12 3.05 3.22l.03.61c-42.32 21.03-87.88 35.53-134.56 42.91-56.91 8.9-115.46 7.49-171.82-4.5-67.89-14.35-132.42-44.21-187.42-86.51-63.52-48.63-114.32-113.73-145.86-187.27-8.42-19.87-15.93-40.22-21.2-61.15z\" fill=\"#939393\"/>\n <path d=\"m778.34 752.53c7.71-1.29 16.08 0 22.6 4.46 9.81 5.86 15.73 17.59 14.87 28.96-.22 7.53-3.8 14.6-8.67 20.2-5.88 5.71-13.84 9.69-22.16 9.66-10.81.51-21.85-5.05-27.61-14.25-4.87-6.83-6.21-15.71-4.73-23.85 2.33-12.59 13.06-23.12 25.7-25.18z\" fill=\"#767676\"/>\n <path d=\"m506.37 864.47c8.73-1.56 18.06.66 25.08 6.11 10.94 8.14 15.55 23.72 10.58 36.46-3.37 9.44-11.46 16.91-21.07 19.68-9.35 2.81-19.91.93-27.77-4.86-10.78-7.54-15.78-22.22-11.91-34.79 3.17-11.53 13.33-20.58 25.09-22.6z\" fill=\"#bebebe\"/>\n </svg>\n </a>\n Google Authenticator\n </span>\n </div>\n </div>\n \n </div>\n\n <div *ngIf=\"mode === 'code-input'\" class=\"code-input\">\n <div>\n Enter the 6-digit code you see in the App.\n </div>\n\n <app-code-input\n (codeChanged)=\"codeChanged($event)\">\n </app-code-input>\n \n <div class=\"checkboxes\">\n <mat-checkbox name=\"default\" [(ngModel)]=\"default\" [disableRipple]=\"true\">\n Make this the default verification method\n </mat-checkbox>\n </div>\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <ng-container *ngIf=\"appType\">\n <button\n *ngIf=\"mode === 'qr-code'\"\n type=\"button\"\n mat-button\n color=\"primary\"\n (click)=\"next()\">\n Next\n </button>\n <button\n *ngIf=\"mode === 'code-input'\"\n type=\"submit\"\n mat-button\n color=\"primary\"\n (click)=\"next()\">\n Verify\n </button> \n </ng-container>\n <button\n type=\"button\"\n mat-button\n [mat-dialog-close]=\"null\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: ["ul{margin:0;padding-left:24px}fs-qrcode{display:flex;justify-content:center;margin:30px}app-code-input{margin-top:10px}.code-input{width:400px}.app-types{text-align:center;padding:0 40px}.app-types .row{display:flex;justify-content:center}.app-types .row span{display:flex;flex-direction:column;text-align:center;max-width:100px}.app-types .row span+span{margin-left:40px}.checkboxes{margin:8px 0}.checkboxes mat-checkbox{display:block}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { 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: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i8$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i9.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout", "dock", "dockable", "fullscreenPercent"] }, { kind: "directive", type: i10.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup", "deactivationGuard"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"], exportAs: ["fsForm"] }, { kind: "directive", type: i10.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "directive", type: i10.FsButtonDirective, selector: "[mat-raised-button]:not([fsFormButtonStandalone]),[mat-button]:not([fsFormButtonStandalone]),[mat-flat-button]:not([fsFormButtonStandalone]),[mat-stroked-button]:not([fsFormButtonStandalone])", inputs: ["name", "dirtySubmit", "form"] }, { kind: "directive", type: i9$1.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { kind: "component", type: i10$1.FsClipboardComponent, selector: "fs-qrcode", inputs: ["value", "width", "height"] }, { kind: "component", type: CodeInputComponent, selector: "app-code-input", inputs: ["codeLength", "code"], outputs: ["codeCompleted", "codeChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
686
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppComponent, decorators: [{
|
|
687
|
+
type: Component,
|
|
688
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<form fsForm [submit]=\"verify\">\n <fs-dialog>\n <h1 mat-dialog-title>Authenticator App Setup</h1>\n <mat-dialog-content>\n\n <div *ngIf=\"mode === 'qr-code'\" class=\"qr-code\">\n <ng-container *ngIf=\"appType\">\n <ol>\n <li>\n <ng-container *ngIf=\"appType === 'authy'\">\n Install the Authy Authenticator App from the <a href=\"https://apps.apple.com/us/app/authy/id494168017\" target=\"_blank\">App Store</a> or\n the <a href=\"https://play.google.com/store/apps/details?id=com.authy.authy\" target=\"_blank\">Google Play Store</a>.\n </ng-container>\n\n <ng-container *ngIf=\"appType === 'google'\">\n Install the Google Authenticator App from the <a href=\"https://apps.apple.com/us/app/google-authenticator/id388497605\" target=\"_blank\">App Store</a> or\n the <a href=\"https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=en_US&gl=US\" target=\"_blank\">Google Play Store</a>.\n </ng-container>\n </li>\n <ng-container *ngIf=\"appType === 'authy'\">\n <li>\n Open the Authy app and select <b>Add Account</b>.\n </li>\n <li>\n Select <b>Scan QR Code</b> and scan the QR code below.\n </li>\n </ng-container> \n <ng-container *ngIf=\"appType === 'google'\">\n <li>\n Open the Google Authentictor app and click the <b>Plus icon</b> in the lower right corner.\n </li>\n <li>\n Select <b>Scan a QR code</b> and scan the QR code below.\n </li>\n </ng-container>\n </ol>\n\n <ng-container *fsSkeleton=\"qrCodeUrl\">\n <fs-qrcode\n [value]=\"qrCodeUrl\"\n [width]=\"300\"\n [height]=\"300\">\n </fs-qrcode>\n </ng-container>\n </ng-container>\n\n <div class=\"app-types\" *ngIf=\"!appType\">\n <p>Select the Authenticator App you prefer</p>\n\n <div class=\"row\">\n <span>\n <a (click)=\"appTypeAuthy()\">\n <svg width=\"50\" height=\"50\" viewBox=\"0 0 256 256\" xmlns=\"http://www.w3.org/2000/svg\" preserveAspectRatio=\"xMidYMid\"><path d=\"M256 127.998C256 198.696 198.694 256 127.997 256 57.304 256 0 198.696 0 127.998 0 57.305 57.304 0 127.997 0 198.694 0 256 57.305 256 127.998z\" fill=\"#EC1C24\"/><path d=\"M117.024 100.89l30.691 30.68c4.43 4.436 11.623 4.436 16.064 0 4.431-4.435 4.441-11.622 0-16.058L133.086 84.82C111.125 62.854 75.631 62.5 53.204 83.704a9.536 9.536 0 0 0-.605.548c-.098.098-.178.202-.275.29-.1.096-.202.182-.297.278-.194.193-.371.396-.54.597-21.215 22.437-20.85 57.932 1.113 79.897L83.292 196c4.44 4.433 11.623 4.433 16.062 0 4.442-4.437 4.442-11.633.011-16.06l-30.693-30.691c-13.398-13.393-13.488-35.129-.278-48.637 13.506-13.21 35.23-13.114 48.63.279zm39.612-40.873c-4.435 4.437-4.435 11.623.012 16.059l30.681 30.693c13.39 13.392 13.477 35.125.268 48.636-13.51 13.2-35.227 13.112-48.623-.282l-30.692-30.689c-4.438-4.437-11.633-4.437-16.066 0-4.443 4.433-4.443 11.642 0 16.065l30.682 30.694c21.968 21.965 57.458 22.322 79.889 1.116.208-.184.404-.355.61-.549.094-.095.182-.192.273-.29.1-.095.197-.183.29-.289.197-.183.365-.384.54-.594 21.215-22.428 20.86-57.911-1.102-79.889l-30.692-30.682c-4.436-4.443-11.638-4.443-16.07.001z\" fill=\"#FFF\"/></svg>\n </a>\n Authy\n </span>\n \n <span>\n <a (click)=\"appTypeGoogle()\"> \n <svg width=\"50\" height=\"50\" viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"m457.07 45.92c73.67-8.62 149.41.22 218.93 26.24 62.75 23.47 120.59 60.41 167.72 108.09-40.31 39.97-80.25 80.31-120.51 120.33-25.95-25.45-56.19-46.65-89.47-61.37-44.22-19.82-93.39-28.54-141.72-25.2-54.6 3.52-108.11 22.49-152.63 54.3-55.24 38.95-96.61 97.22-114.8 162.35-13.64 47.78-14.77 98.97-3.76 147.4 8.85 39.61 26.09 77.29 50.05 110.03 22.24 30.45 50.3 56.64 82.22 76.71 36.79 23.24 78.76 38.22 121.96 43.48 37.02 4.65 74.9 2.23 111.05-7 3.97-1.91 6.24 2.61 8.73 4.86 40.74 40.95 81.68 81.7 122.43 122.63-73.31 35.6-155.99 51.86-237.3 46.12-68.05-4.51-135.07-24.08-194.71-57.18-24.87-13.6-48.23-29.82-70.33-47.54-17.46-14.81-34.71-30.01-49.72-47.35-25.41-27.39-47.21-58.11-65.17-90.87-4-7.72-8.64-15.12-11.9-23.2-4.47-9.05-8.37-18.36-12.25-27.67-4.96-13.27-10.26-26.44-13.88-40.15-.43-1.81-1.53-3.33-2.52-4.85-8.3-28.66-12.95-58.33-15.44-88.04-2.62-37.36-1.33-75.05 4.78-112.03 12.18-75.48 43.41-147.74 89.86-208.44 30.12-39.5 66.53-74.21 107.46-102.35 62.44-43.11 135.53-70.69 210.92-79.3m49.18 50.48c-5.7.99-10.96 3.76-15.38 7.43-10.4 8.93-14.14 24.81-8.17 37.28 6.33 15.02 25.16 23.1 40.36 17 15.43-5.24 24.78-23.51 19.74-39.06-4.1-15.43-20.92-25.79-36.55-22.65m-267.96 111.99c-5.33.28-10.59 1.92-15.16 4.68-11.47 7.03-17.88 21.74-14.36 34.86 3.09 14.08 16.78 25.06 31.26 24.61 15.03.41 29.08-11.39 31.54-26.17 2.24-10.33-1.61-21.55-9.14-28.85-6.24-6.33-15.3-9.62-24.14-9.13m-115.96 272c-6.62 1.23-12.84 4.58-17.54 9.4-9.45 9.72-11.72 25.57-5.02 37.42 7.16 13.96 25.48 20.86 39.98 14.62 15.02-5.51 23.99-23.42 19.06-38.71-4.04-15.41-20.86-25.96-36.48-22.73m111.98 272.05c-11.49 1.95-21.48 10.72-24.84 21.88-3.87 11.63-.13 25.16 8.9 33.36 6.15 5.48 14.4 8.7 22.67 8.32 11.16-.25 21.98-6.87 27.12-16.8 4.93-8.83 5.15-20.02.71-29.1-5.82-12.78-20.81-20.33-34.56-17.66m272.06 112.03c-11.76 2.02-21.92 11.07-25.09 22.6-3.87 12.57 1.13 27.25 11.91 34.79 7.86 5.79 18.42 7.67 27.77 4.86 9.61-2.77 17.7-10.24 21.07-19.68 4.97-12.74.36-28.32-10.58-36.46-7.02-5.45-16.35-7.67-25.08-6.11z\" fill=\"#a0a0a0\"/>\n <g fill=\"#c1c1c1\">\n <path d=\"m506.25 96.4c15.63-3.14 32.45 7.22 36.55 22.65 5.04 15.55-4.31 33.82-19.74 39.06-15.2 6.1-34.03-1.98-40.36-17-5.97-12.47-2.23-28.35 8.17-37.28 4.42-3.67 9.68-6.44 15.38-7.43z\"/>\n <path d=\"m122.33 480.39c15.62-3.23 32.44 7.32 36.48 22.73 4.93 15.29-4.04 33.2-19.06 38.71-14.5 6.24-32.82-.66-39.98-14.62-6.7-11.85-4.43-27.7 5.02-37.42 4.7-4.82 10.92-8.17 17.54-9.4z\"/>\n </g>\n <path d=\"m843.72 180.25.11-.11c24.64 25.12 46.96 52.6 65.61 82.47 36.01 57.16 59.38 122.22 67.87 189.25 5.67 44.88 5.27 90.6-2.05 135.27-12.7 80.01-46.94 156.41-97.9 219.36-42.3 52.48-95.87 96.04-156.41 125.76l-.63-.26c-1.01-1.1-2.03-2.16-3.05-3.22-40.75-40.93-81.69-81.68-122.43-122.63-2.49-2.25-4.76-6.77-8.73-4.86-36.15 9.23-74.03 11.65-111.05 7-43.2-5.26-85.17-20.24-121.96-43.48-31.92-20.07-59.98-46.26-82.22-76.71-23.96-32.74-41.2-70.42-50.05-110.03-11.01-48.43-9.88-99.62 3.76-147.4 18.19-65.13 59.56-123.4 114.8-162.35 44.52-31.81 98.03-50.78 152.63-54.3 48.33-3.34 97.5 5.38 141.72 25.2 33.28 14.72 63.52 35.92 89.47 61.37 40.26-40.02 80.2-80.36 120.51-120.33m-351.75 183.97c-21.23 2.85-41.89 10.28-59.88 21.94-23.08 14.45-41.76 35.58-53.9 59.91-14.58 29.2-18.64 63.21-12.5 95.17 3.93 19.85 12.03 38.88 23.56 55.51 7.93 11.52 17.65 21.66 27.65 31.38 57.33 57.41 114.61 114.86 171.99 172.21 49.09-13.07 94.67-38.94 131.05-74.4 45.11-43.34 75.66-101.44 86.31-163.06.24-1.04.22-2.91 1.85-2.6 29.63.04 59.26-.01 88.9.05 19.04-.3 36.87-14.77 40.76-33.46.22-1.21 0-2.32-.67-3.35 1.22-5.71 2.08-11.58 1.38-17.43l-.24.4c-2.05-20.34-20.84-37.12-41.25-37.17-80.64-.07-161.28-.01-241.93-.07-6.44-22.08-18.5-42.33-34.03-59.23-25.8-27.5-62.26-45.01-100.02-46.82-9.68.02-19.44-.54-29.03 1.02m286.37 388.31c-12.64 2.06-23.37 12.59-25.7 25.18-1.48 8.14-.14 17.02 4.73 23.85 5.76 9.2 16.8 14.76 27.61 14.25 8.32.03 16.28-3.95 22.16-9.66 4.87-5.6 8.45-12.67 8.67-20.2.86-11.37-5.06-23.1-14.87-28.96-6.52-4.46-14.89-5.75-22.6-4.46z\" fill=\"#686868\"/>\n <path d=\"m238.29 208.39c8.84-.49 17.9 2.8 24.14 9.13 7.53 7.3 11.38 18.52 9.14 28.85-2.46 14.78-16.51 26.58-31.54 26.17-14.48.45-28.17-10.53-31.26-24.61-3.52-13.12 2.89-27.83 14.36-34.86 4.57-2.76 9.83-4.4 15.16-4.68z\" fill=\"#c3c3c3\"/>\n <path d=\"m491.97 364.22c9.59-1.56 19.35-1 29.03-1.02 37.76 1.81 74.22 19.32 100.02 46.82 15.53 16.9 27.59 37.15 34.03 59.23-47.67-.01-95.35-.01-143.03-.01-12.19-.11-24.23 5.42-32.21 14.61-6.01 6.85-9.74 15.65-10.44 24.74-1.19 14.17 5.36 28.7 16.69 37.28 7.62 5.91 17.28 9 26.92 8.8 126.69-.04 253.39-.06 380.08.03 4.76.04 9.59-.15 14.2-1.48 14.21-3.82 26.02-15.47 29.83-29.7.67 1.03.89 2.14.67 3.35-3.89 18.69-21.72 33.16-40.76 33.46-29.64-.06-59.27-.01-88.9-.05-1.63-.31-1.61 1.56-1.85 2.6-10.65 61.62-41.2 119.72-86.31 163.06-36.38 35.46-81.96 61.33-131.05 74.4-57.38-57.35-114.66-114.8-171.99-172.21-10-9.72-19.72-19.86-27.65-31.38-11.53-16.63-19.63-35.66-23.56-55.51-6.14-31.96-2.08-65.97 12.5-95.17 12.14-24.33 30.82-45.46 53.9-59.91 17.99-11.66 38.65-19.09 59.88-21.94z\" fill=\"#474747\"/>\n <g fill=\"#bfbfbf\">\n <path d=\"m479.81 483.85c7.98-9.19 20.02-14.72 32.21-14.61 47.68 0 95.36 0 143.03.01 80.65.06 161.29 0 241.93.07 20.41.05 39.2 16.83 41.25 37.17-.19.33-.58.97-.78 1.29-3.68-18.51-21.57-33.16-40.47-33.05-124.97.1-249.94.12-374.91.17-7.73.13-15.74-.8-23.15 1.96-9.06 2.84-16.73 9.1-22.27 16.7-3.34 4.55-4.39 10.24-7.28 15.03.7-9.09 4.43-17.89 10.44-24.74z\"/>\n <path d=\"m234.31 752.44c13.75-2.67 28.74 4.88 34.56 17.66 4.44 9.08 4.22 20.27-.71 29.1-5.14 9.93-15.96 16.55-27.12 16.8-8.27.38-16.52-2.84-22.67-8.32-9.03-8.2-12.77-21.73-8.9-33.36 3.36-11.16 13.35-19.93 24.84-21.88z\"/>\n </g>\n <path d=\"m498.92 476.86c7.41-2.76 15.42-1.83 23.15-1.96 124.97-.05 249.94-.07 374.91-.17 18.9-.11 36.79 14.54 40.47 33.05.2-.32.59-.96.78-1.29l.24-.4c.7 5.85-.16 11.72-1.38 17.43-3.81 14.23-15.62 25.88-29.83 29.7-4.61 1.33-9.44 1.52-14.2 1.48-126.69-.09-253.39-.07-380.08-.03-9.64.2-19.3-2.89-26.92-8.8-11.33-8.58-17.88-23.11-16.69-37.28 2.89-4.79 3.94-10.48 7.28-15.03 5.54-7.6 13.21-13.86 22.27-16.7z\" fill=\"#b0b0b0\"/>\n <path d=\"m59.49 636.08c.99 1.52 2.09 3.04 2.52 4.85 3.62 13.71 8.92 26.88 13.88 40.15 3.88 9.31 7.78 18.62 12.25 27.67 3.26 8.08 7.9 15.48 11.9 23.2 17.96 32.76 39.76 63.48 65.17 90.87 15.01 17.34 32.26 32.54 49.72 47.35 22.1 17.72 45.46 33.94 70.33 47.54 59.64 33.1 126.66 52.67 194.71 57.18 81.31 5.74 163.99-10.52 237.3-46.12 1.02 1.06 2.04 2.12 3.05 3.22l.03.61c-42.32 21.03-87.88 35.53-134.56 42.91-56.91 8.9-115.46 7.49-171.82-4.5-67.89-14.35-132.42-44.21-187.42-86.51-63.52-48.63-114.32-113.73-145.86-187.27-8.42-19.87-15.93-40.22-21.2-61.15z\" fill=\"#939393\"/>\n <path d=\"m778.34 752.53c7.71-1.29 16.08 0 22.6 4.46 9.81 5.86 15.73 17.59 14.87 28.96-.22 7.53-3.8 14.6-8.67 20.2-5.88 5.71-13.84 9.69-22.16 9.66-10.81.51-21.85-5.05-27.61-14.25-4.87-6.83-6.21-15.71-4.73-23.85 2.33-12.59 13.06-23.12 25.7-25.18z\" fill=\"#767676\"/>\n <path d=\"m506.37 864.47c8.73-1.56 18.06.66 25.08 6.11 10.94 8.14 15.55 23.72 10.58 36.46-3.37 9.44-11.46 16.91-21.07 19.68-9.35 2.81-19.91.93-27.77-4.86-10.78-7.54-15.78-22.22-11.91-34.79 3.17-11.53 13.33-20.58 25.09-22.6z\" fill=\"#bebebe\"/>\n </svg>\n </a>\n Google Authenticator\n </span>\n </div>\n </div>\n \n </div>\n\n <div *ngIf=\"mode === 'code-input'\" class=\"code-input\">\n <div>\n Enter the 6-digit code you see in the App.\n </div>\n\n <app-code-input\n (codeChanged)=\"codeChanged($event)\">\n </app-code-input>\n \n <div class=\"checkboxes\">\n <mat-checkbox name=\"default\" [(ngModel)]=\"default\" [disableRipple]=\"true\">\n Make this the default verification method\n </mat-checkbox>\n </div>\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <ng-container *ngIf=\"appType\">\n <button\n *ngIf=\"mode === 'qr-code'\"\n type=\"button\"\n mat-button\n color=\"primary\"\n (click)=\"next()\">\n Next\n </button>\n <button\n *ngIf=\"mode === 'code-input'\"\n type=\"submit\"\n mat-button\n color=\"primary\"\n (click)=\"next()\">\n Verify\n </button> \n </ng-container>\n <button\n type=\"button\"\n mat-button\n [mat-dialog-close]=\"null\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: ["ul{margin:0;padding-left:24px}fs-qrcode{display:flex;justify-content:center;margin:30px}app-code-input{margin-top:10px}.code-input{width:400px}.app-types{text-align:center;padding:0 40px}.app-types .row{display:flex;justify-content:center}.app-types .row span{display:flex;flex-direction:column;text-align:center;max-width:100px}.app-types .row span+span{margin-left:40px}.checkboxes{margin:8px 0}.checkboxes mat-checkbox{display:block}\n"] }]
|
|
689
|
+
}], ctorParameters: function () {
|
|
690
|
+
return [{ type: undefined, decorators: [{
|
|
691
|
+
type: Inject,
|
|
692
|
+
args: [MAT_DIALOG_DATA]
|
|
693
|
+
}] }, { type: i1.MatDialogRef }, { type: i0.ChangeDetectorRef }, { type: i2$2.FsMessage }];
|
|
694
|
+
}, propDecorators: { form: [{
|
|
695
|
+
type: ViewChild,
|
|
696
|
+
args: [FsFormDirective]
|
|
697
697
|
}] } });
|
|
698
698
|
|
|
699
|
-
class EmailComponent {
|
|
700
|
-
constructor(_data, _dialogRef, _cdRef, _message) {
|
|
701
|
-
this._data = _data;
|
|
702
|
-
this._dialogRef = _dialogRef;
|
|
703
|
-
this._cdRef = _cdRef;
|
|
704
|
-
this._message = _message;
|
|
705
|
-
this.verificationMethod = null;
|
|
706
|
-
this.trustDevice = true;
|
|
707
|
-
this.resend = () => {
|
|
708
|
-
return this.twoFactorManageService.verificationMethodResend()
|
|
709
|
-
.pipe(tap(() => {
|
|
710
|
-
this._message.success('Resent verification code');
|
|
711
|
-
}));
|
|
712
|
-
};
|
|
713
|
-
this.submit = () => {
|
|
714
|
-
return of(true)
|
|
715
|
-
.pipe(switchMap(() => {
|
|
716
|
-
return this.verificationMethod ?
|
|
717
|
-
this.twoFactorManageService.verificationMethodVerify$(this.code, this.trustDevice)
|
|
718
|
-
.pipe(tap((verificationMethod) => {
|
|
719
|
-
this._message.success('Created email verification method');
|
|
720
|
-
this._dialogRef.close(verificationMethod);
|
|
721
|
-
})) :
|
|
722
|
-
this.twoFactorManageService.verificationMethodCreate$({
|
|
723
|
-
type: VerificationMethodType.Email,
|
|
724
|
-
email: this.email,
|
|
725
|
-
default: this.default,
|
|
726
|
-
})
|
|
727
|
-
.pipe(tap((verificationMethod) => {
|
|
728
|
-
this.verificationMethod = verificationMethod;
|
|
729
|
-
this.form.clear();
|
|
730
|
-
this._cdRef.markForCheck();
|
|
731
|
-
}));
|
|
732
|
-
}));
|
|
733
|
-
};
|
|
734
|
-
this.twoFactorManageService = _data.twoFactorManageService;
|
|
735
|
-
this.default = !this.twoFactorManageService.hasVerificationMethods;
|
|
736
|
-
}
|
|
737
|
-
codeCompleted(code) {
|
|
738
|
-
this.code = code;
|
|
739
|
-
//Legacy support
|
|
740
|
-
setTimeout(() => {
|
|
741
|
-
if (!this.form.submitting) {
|
|
742
|
-
this.form.triggerSubmit();
|
|
743
|
-
}
|
|
744
|
-
});
|
|
745
|
-
}
|
|
746
|
-
codeChanged(code) {
|
|
747
|
-
this.code = code;
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
EmailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EmailComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i0.ChangeDetectorRef }, { token: i2$2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
|
|
751
|
-
EmailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: EmailComponent, selector: "ng-component", viewQueries: [{ propertyName: "form", first: true, predicate: FsFormDirective, descendants: true }], ngImport: i0, template: "<form fsForm [submit]=\"submit\">\n <fs-dialog>\n <h1 mat-dialog-title>\n Email Setup\n </h1>\n <mat-dialog-content>\n <ng-container *ngIf=\"verificationMethod; else notVerificationMethod\">\n <fs-2fa-verification\n [verificationMethod]=\"verificationMethod\"\n (codeChanged)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted($event)\"\n [resend]=\"resend\"\n [(trustDevice)]=\"trustDevice\">\n </fs-2fa-verification>\n </ng-container>\n\n <ng-template #notVerificationMethod>\n <p>The app will only use this email for verifying your account security. </p>\n <mat-form-field>\n <mat-label>Email</mat-label>\n <input\n matInput\n [required]=\"true\"\n [(ngModel)]=\"email\"\n [fsFormEmail]=\"true\"\n name=\"email\">\n </mat-form-field>\n <mat-checkbox \n name=\"default\"\n [(ngModel)]=\"default\"\n [disableRipple]=\"true\">\n Make this the default verification method\n </mat-checkbox>\n </ng-template>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n type=\"submit\">\n Next\n </button>\n <button\n mat-button\n type=\"button\"\n [mat-dialog-close]=\"undefined\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: [":host ::ng-deep mat-checkbox .mat-ripple{display:none}:host ::ng-deep mat-checkbox .mat-checkbox-layout{white-space:wrap}mat-form-field{width:100%}mat-dialog-content{width:400px;max-width:100%}p{margin-top:0}app-code-input{margin-bottom:5px;display:block}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { 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: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i6$1.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: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatLabel, selector: "mat-label" }, { kind: "component", type: i8$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i9.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout", "dock", "dockable", "fullscreenPercent"] }, { kind: "directive", type: i10.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup", "deactivationGuard"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"], exportAs: ["fsForm"] }, { kind: "directive", type: i10.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { kind: "directive", type: i10.FsFormEmailDirective, selector: "[fsFormEmail]", inputs: ["fsFormEmail", "fsFormEmailMessage"] }, { kind: "directive", type: i10.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "directive", type: i10.FsButtonDirective, selector: "[mat-raised-button]:not([fsFormButtonStandalone]),[mat-button]:not([fsFormButtonStandalone]),[mat-flat-button]:not([fsFormButtonStandalone]),[mat-stroked-button]:not([fsFormButtonStandalone])", inputs: ["name", "dirtySubmit", "form"] }, { kind: "component", type: Fs2faVerificationComponent, selector: "fs-2fa-verification", inputs: ["verificationMethod", "resend", "showTrustedDevice", "trustDevice", "codeLength", "trustDays", "formatRecipient", "getVerificationMethods", "selectVerificationMethod"], outputs: ["verified", "codeChanged", "codeCompleted", "trustDeviceChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
752
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EmailComponent, decorators: [{
|
|
753
|
-
type: Component,
|
|
754
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<form fsForm [submit]=\"submit\">\n <fs-dialog>\n <h1 mat-dialog-title>\n Email Setup\n </h1>\n <mat-dialog-content>\n <ng-container *ngIf=\"verificationMethod; else notVerificationMethod\">\n <fs-2fa-verification\n [verificationMethod]=\"verificationMethod\"\n (codeChanged)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted($event)\"\n [resend]=\"resend\"\n [(trustDevice)]=\"trustDevice\">\n </fs-2fa-verification>\n </ng-container>\n\n <ng-template #notVerificationMethod>\n <p>The app will only use this email for verifying your account security. </p>\n <mat-form-field>\n <mat-label>Email</mat-label>\n <input\n matInput\n [required]=\"true\"\n [(ngModel)]=\"email\"\n [fsFormEmail]=\"true\"\n name=\"email\">\n </mat-form-field>\n <mat-checkbox \n name=\"default\"\n [(ngModel)]=\"default\"\n [disableRipple]=\"true\">\n Make this the default verification method\n </mat-checkbox>\n </ng-template>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n type=\"submit\">\n Next\n </button>\n <button\n mat-button\n type=\"button\"\n [mat-dialog-close]=\"undefined\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: [":host ::ng-deep mat-checkbox .mat-ripple{display:none}:host ::ng-deep mat-checkbox .mat-checkbox-layout{white-space:wrap}mat-form-field{width:100%}mat-dialog-content{width:400px;max-width:100%}p{margin-top:0}app-code-input{margin-bottom:5px;display:block}\n"] }]
|
|
755
|
-
}], ctorParameters: function () {
|
|
756
|
-
return [{ type: undefined, decorators: [{
|
|
757
|
-
type: Inject,
|
|
758
|
-
args: [MAT_DIALOG_DATA]
|
|
759
|
-
}] }, { type: i1.MatDialogRef }, { type: i0.ChangeDetectorRef }, { type: i2$2.FsMessage }];
|
|
760
|
-
}, propDecorators: { form: [{
|
|
761
|
-
type: ViewChild,
|
|
762
|
-
args: [FsFormDirective, { static: false }]
|
|
699
|
+
class EmailComponent {
|
|
700
|
+
constructor(_data, _dialogRef, _cdRef, _message) {
|
|
701
|
+
this._data = _data;
|
|
702
|
+
this._dialogRef = _dialogRef;
|
|
703
|
+
this._cdRef = _cdRef;
|
|
704
|
+
this._message = _message;
|
|
705
|
+
this.verificationMethod = null;
|
|
706
|
+
this.trustDevice = true;
|
|
707
|
+
this.resend = () => {
|
|
708
|
+
return this.twoFactorManageService.verificationMethodResend()
|
|
709
|
+
.pipe(tap(() => {
|
|
710
|
+
this._message.success('Resent verification code');
|
|
711
|
+
}));
|
|
712
|
+
};
|
|
713
|
+
this.submit = () => {
|
|
714
|
+
return of(true)
|
|
715
|
+
.pipe(switchMap(() => {
|
|
716
|
+
return this.verificationMethod ?
|
|
717
|
+
this.twoFactorManageService.verificationMethodVerify$(this.code, this.trustDevice)
|
|
718
|
+
.pipe(tap((verificationMethod) => {
|
|
719
|
+
this._message.success('Created email verification method');
|
|
720
|
+
this._dialogRef.close(verificationMethod);
|
|
721
|
+
})) :
|
|
722
|
+
this.twoFactorManageService.verificationMethodCreate$({
|
|
723
|
+
type: VerificationMethodType.Email,
|
|
724
|
+
email: this.email,
|
|
725
|
+
default: this.default,
|
|
726
|
+
})
|
|
727
|
+
.pipe(tap((verificationMethod) => {
|
|
728
|
+
this.verificationMethod = verificationMethod;
|
|
729
|
+
this.form.clear();
|
|
730
|
+
this._cdRef.markForCheck();
|
|
731
|
+
}));
|
|
732
|
+
}));
|
|
733
|
+
};
|
|
734
|
+
this.twoFactorManageService = _data.twoFactorManageService;
|
|
735
|
+
this.default = !this.twoFactorManageService.hasVerificationMethods;
|
|
736
|
+
}
|
|
737
|
+
codeCompleted(code) {
|
|
738
|
+
this.code = code;
|
|
739
|
+
//Legacy support
|
|
740
|
+
setTimeout(() => {
|
|
741
|
+
if (!this.form.submitting) {
|
|
742
|
+
this.form.triggerSubmit();
|
|
743
|
+
}
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
codeChanged(code) {
|
|
747
|
+
this.code = code;
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
EmailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EmailComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i0.ChangeDetectorRef }, { token: i2$2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
|
|
751
|
+
EmailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: EmailComponent, selector: "ng-component", viewQueries: [{ propertyName: "form", first: true, predicate: FsFormDirective, descendants: true }], ngImport: i0, template: "<form fsForm [submit]=\"submit\">\n <fs-dialog>\n <h1 mat-dialog-title>\n Email Setup\n </h1>\n <mat-dialog-content>\n <ng-container *ngIf=\"verificationMethod; else notVerificationMethod\">\n <fs-2fa-verification\n [verificationMethod]=\"verificationMethod\"\n (codeChanged)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted($event)\"\n [resend]=\"resend\"\n [(trustDevice)]=\"trustDevice\">\n </fs-2fa-verification>\n </ng-container>\n\n <ng-template #notVerificationMethod>\n <p>The app will only use this email for verifying your account security. </p>\n <mat-form-field>\n <mat-label>Email</mat-label>\n <input\n matInput\n [required]=\"true\"\n [(ngModel)]=\"email\"\n [fsFormEmail]=\"true\"\n name=\"email\">\n </mat-form-field>\n <mat-checkbox \n name=\"default\"\n [(ngModel)]=\"default\"\n [disableRipple]=\"true\">\n Make this the default verification method\n </mat-checkbox>\n </ng-template>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n type=\"submit\">\n Next\n </button>\n <button\n mat-button\n type=\"button\"\n [mat-dialog-close]=\"undefined\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: [":host ::ng-deep mat-checkbox .mat-ripple{display:none}:host ::ng-deep mat-checkbox .mat-checkbox-layout{white-space:wrap}mat-form-field{width:100%}mat-dialog-content{width:400px;max-width:100%}p{margin-top:0}app-code-input{margin-bottom:5px;display:block}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { 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: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i6$1.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: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatLabel, selector: "mat-label" }, { kind: "component", type: i8$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i9.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout", "dock", "dockable", "fullscreenPercent"] }, { kind: "directive", type: i10.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup", "deactivationGuard"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"], exportAs: ["fsForm"] }, { kind: "directive", type: i10.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { kind: "directive", type: i10.FsFormEmailDirective, selector: "[fsFormEmail]", inputs: ["fsFormEmail", "fsFormEmailMessage"] }, { kind: "directive", type: i10.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "directive", type: i10.FsButtonDirective, selector: "[mat-raised-button]:not([fsFormButtonStandalone]),[mat-button]:not([fsFormButtonStandalone]),[mat-flat-button]:not([fsFormButtonStandalone]),[mat-stroked-button]:not([fsFormButtonStandalone])", inputs: ["name", "dirtySubmit", "form"] }, { kind: "component", type: Fs2faVerificationComponent, selector: "fs-2fa-verification", inputs: ["verificationMethod", "resend", "showTrustedDevice", "trustDevice", "codeLength", "trustDays", "formatRecipient", "getVerificationMethods", "selectVerificationMethod"], outputs: ["verified", "codeChanged", "codeCompleted", "trustDeviceChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
752
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EmailComponent, decorators: [{
|
|
753
|
+
type: Component,
|
|
754
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<form fsForm [submit]=\"submit\">\n <fs-dialog>\n <h1 mat-dialog-title>\n Email Setup\n </h1>\n <mat-dialog-content>\n <ng-container *ngIf=\"verificationMethod; else notVerificationMethod\">\n <fs-2fa-verification\n [verificationMethod]=\"verificationMethod\"\n (codeChanged)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted($event)\"\n [resend]=\"resend\"\n [(trustDevice)]=\"trustDevice\">\n </fs-2fa-verification>\n </ng-container>\n\n <ng-template #notVerificationMethod>\n <p>The app will only use this email for verifying your account security. </p>\n <mat-form-field>\n <mat-label>Email</mat-label>\n <input\n matInput\n [required]=\"true\"\n [(ngModel)]=\"email\"\n [fsFormEmail]=\"true\"\n name=\"email\">\n </mat-form-field>\n <mat-checkbox \n name=\"default\"\n [(ngModel)]=\"default\"\n [disableRipple]=\"true\">\n Make this the default verification method\n </mat-checkbox>\n </ng-template>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n type=\"submit\">\n Next\n </button>\n <button\n mat-button\n type=\"button\"\n [mat-dialog-close]=\"undefined\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: [":host ::ng-deep mat-checkbox .mat-ripple{display:none}:host ::ng-deep mat-checkbox .mat-checkbox-layout{white-space:wrap}mat-form-field{width:100%}mat-dialog-content{width:400px;max-width:100%}p{margin-top:0}app-code-input{margin-bottom:5px;display:block}\n"] }]
|
|
755
|
+
}], ctorParameters: function () {
|
|
756
|
+
return [{ type: undefined, decorators: [{
|
|
757
|
+
type: Inject,
|
|
758
|
+
args: [MAT_DIALOG_DATA]
|
|
759
|
+
}] }, { type: i1.MatDialogRef }, { type: i0.ChangeDetectorRef }, { type: i2$2.FsMessage }];
|
|
760
|
+
}, propDecorators: { form: [{
|
|
761
|
+
type: ViewChild,
|
|
762
|
+
args: [FsFormDirective, { static: false }]
|
|
763
763
|
}] } });
|
|
764
764
|
|
|
765
|
-
class NumberComponent {
|
|
766
|
-
constructor(_data, _dialogRef, _cdRef, _message) {
|
|
767
|
-
this._data = _data;
|
|
768
|
-
this._dialogRef = _dialogRef;
|
|
769
|
-
this._cdRef = _cdRef;
|
|
770
|
-
this._message = _message;
|
|
771
|
-
this.trustDevice = true;
|
|
772
|
-
this.verificationMethod = null;
|
|
773
|
-
this.resend = () => {
|
|
774
|
-
return this.twoFactorManageService.verificationMethodResend()
|
|
775
|
-
.pipe(tap(() => {
|
|
776
|
-
this._message.success('Resent verification code');
|
|
777
|
-
}));
|
|
778
|
-
};
|
|
779
|
-
this.submit = () => {
|
|
780
|
-
return of(true)
|
|
781
|
-
.pipe(switchMap(() => {
|
|
782
|
-
return this.verificationMethod ?
|
|
783
|
-
this.twoFactorManageService.verificationMethodVerify$(this.code, this.trustDevice)
|
|
784
|
-
.pipe(tap((verificationMethod) => {
|
|
785
|
-
this._message.success('Created text message verification method');
|
|
786
|
-
this._dialogRef.close(verificationMethod);
|
|
787
|
-
})) :
|
|
788
|
-
this.twoFactorManageService.verificationMethodCreate$({
|
|
789
|
-
type: VerificationMethodType.Sms,
|
|
790
|
-
phoneNumber: this.phone.number,
|
|
791
|
-
phoneCode: this.phone.countryCode,
|
|
792
|
-
phoneCountry: this.phone.isoCode,
|
|
793
|
-
default: this.default,
|
|
794
|
-
})
|
|
795
|
-
.pipe(tap((verificationMethod) => {
|
|
796
|
-
this.verificationMethod = verificationMethod;
|
|
797
|
-
this.form.clear();
|
|
798
|
-
this._cdRef.markForCheck();
|
|
799
|
-
}));
|
|
800
|
-
}));
|
|
801
|
-
};
|
|
802
|
-
this.twoFactorManageService = _data.twoFactorManageService;
|
|
803
|
-
this.defaultCountry = _data.defaultCountry;
|
|
804
|
-
this.default = !this.twoFactorManageService.hasVerificationMethods;
|
|
805
|
-
}
|
|
806
|
-
codeCompleted(code) {
|
|
807
|
-
this.code = code;
|
|
808
|
-
//Legacy support
|
|
809
|
-
setTimeout(() => {
|
|
810
|
-
if (!this.form.submitting) {
|
|
811
|
-
this.form.triggerSubmit();
|
|
812
|
-
}
|
|
813
|
-
});
|
|
814
|
-
}
|
|
815
|
-
codeChanged(code) {
|
|
816
|
-
this.code = code;
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
NumberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NumberComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i0.ChangeDetectorRef }, { token: i2$2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
|
|
820
|
-
NumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: NumberComponent, selector: "ng-component", viewQueries: [{ propertyName: "form", first: true, predicate: FsFormDirective, descendants: true }], ngImport: i0, template: "<form fsForm [submit]=\"submit\" [autocomplete]=\"false\">\n <fs-dialog>\n <h1 mat-dialog-title>\n Text Message Setup\n </h1>\n <mat-dialog-content>\n <ng-container *ngIf=\"verificationMethod; else notVerificationMethod\">\n <fs-2fa-verification\n [verificationMethod]=\"verificationMethod\"\n (codeChanged)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted($event)\"\n [resend]=\"resend\"\n [formatRecipient]=\"true\"\n [(trustDevice)]=\"trustDevice\">\n </fs-2fa-verification>\n </ng-container>\n\n <ng-template #notVerificationMethod>\n <p>The app will only use this number for verifying your account security. Message and data rates may apply by your cell phone provider.</p>\n <mat-form-field>\n <mat-label>Phone number</mat-label>\n <input \n matInput\n fsPhoneField\n [(ngModel)]=\"phone\"\n [required]=\"true\"\n [country]=\"defaultCountry\"\n [mode]=\"'object'\"\n autocomplete=\"off\"\n name=\"phone\">\n </mat-form-field>\n <mat-checkbox \n name=\"default\"\n [(ngModel)]=\"default\"\n [disableRipple]=\"true\">\n Make this the default verification method\n </mat-checkbox>\n </ng-template>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n type=\"submit\">\n Next\n </button>\n <button\n mat-button\n type=\"button\"\n [mat-dialog-close]=\"undefined\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: [":host ::ng-deep mat-checkbox .mat-ripple{display:none}:host ::ng-deep mat-checkbox .mat-checkbox-layout{white-space:wrap}app-code-input{margin-bottom:5px;display:block}mat-form-field{width:100%}mat-dialog-content{width:400px;max-width:100%}p{margin-top:0}h1{display:flex;align-items:center}h1 mat-icon{margin-right:5px}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { 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: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i6$1.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: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatLabel, selector: "mat-label" }, { kind: "component", type: i8$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i9.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout", "dock", "dockable", "fullscreenPercent"] }, { kind: "directive", type: i10.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup", "deactivationGuard"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"], exportAs: ["fsForm"] }, { kind: "directive", type: i10.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { kind: "directive", type: i10.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "directive", type: i10.FsButtonDirective, selector: "[mat-raised-button]:not([fsFormButtonStandalone]),[mat-button]:not([fsFormButtonStandalone]),[mat-flat-button]:not([fsFormButtonStandalone]),[mat-stroked-button]:not([fsFormButtonStandalone])", inputs: ["name", "dirtySubmit", "form"] }, { kind: "component", type: i8$2.FsPhoneFieldComponent, selector: "[fsPhoneField]", inputs: ["allowNumberExt", "placeholder", "required", "disabled", "mode", "country", "autocomplete"] }, { kind: "component", type: Fs2faVerificationComponent, selector: "fs-2fa-verification", inputs: ["verificationMethod", "resend", "showTrustedDevice", "trustDevice", "codeLength", "trustDays", "formatRecipient", "getVerificationMethods", "selectVerificationMethod"], outputs: ["verified", "codeChanged", "codeCompleted", "trustDeviceChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
821
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NumberComponent, decorators: [{
|
|
822
|
-
type: Component,
|
|
823
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<form fsForm [submit]=\"submit\" [autocomplete]=\"false\">\n <fs-dialog>\n <h1 mat-dialog-title>\n Text Message Setup\n </h1>\n <mat-dialog-content>\n <ng-container *ngIf=\"verificationMethod; else notVerificationMethod\">\n <fs-2fa-verification\n [verificationMethod]=\"verificationMethod\"\n (codeChanged)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted($event)\"\n [resend]=\"resend\"\n [formatRecipient]=\"true\"\n [(trustDevice)]=\"trustDevice\">\n </fs-2fa-verification>\n </ng-container>\n\n <ng-template #notVerificationMethod>\n <p>The app will only use this number for verifying your account security. Message and data rates may apply by your cell phone provider.</p>\n <mat-form-field>\n <mat-label>Phone number</mat-label>\n <input \n matInput\n fsPhoneField\n [(ngModel)]=\"phone\"\n [required]=\"true\"\n [country]=\"defaultCountry\"\n [mode]=\"'object'\"\n autocomplete=\"off\"\n name=\"phone\">\n </mat-form-field>\n <mat-checkbox \n name=\"default\"\n [(ngModel)]=\"default\"\n [disableRipple]=\"true\">\n Make this the default verification method\n </mat-checkbox>\n </ng-template>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n type=\"submit\">\n Next\n </button>\n <button\n mat-button\n type=\"button\"\n [mat-dialog-close]=\"undefined\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: [":host ::ng-deep mat-checkbox .mat-ripple{display:none}:host ::ng-deep mat-checkbox .mat-checkbox-layout{white-space:wrap}app-code-input{margin-bottom:5px;display:block}mat-form-field{width:100%}mat-dialog-content{width:400px;max-width:100%}p{margin-top:0}h1{display:flex;align-items:center}h1 mat-icon{margin-right:5px}\n"] }]
|
|
824
|
-
}], ctorParameters: function () {
|
|
825
|
-
return [{ type: undefined, decorators: [{
|
|
826
|
-
type: Inject,
|
|
827
|
-
args: [MAT_DIALOG_DATA]
|
|
828
|
-
}] }, { type: i1.MatDialogRef }, { type: i0.ChangeDetectorRef }, { type: i2$2.FsMessage }];
|
|
829
|
-
}, propDecorators: { form: [{
|
|
830
|
-
type: ViewChild,
|
|
831
|
-
args: [FsFormDirective, { static: false }]
|
|
765
|
+
class NumberComponent {
|
|
766
|
+
constructor(_data, _dialogRef, _cdRef, _message) {
|
|
767
|
+
this._data = _data;
|
|
768
|
+
this._dialogRef = _dialogRef;
|
|
769
|
+
this._cdRef = _cdRef;
|
|
770
|
+
this._message = _message;
|
|
771
|
+
this.trustDevice = true;
|
|
772
|
+
this.verificationMethod = null;
|
|
773
|
+
this.resend = () => {
|
|
774
|
+
return this.twoFactorManageService.verificationMethodResend()
|
|
775
|
+
.pipe(tap(() => {
|
|
776
|
+
this._message.success('Resent verification code');
|
|
777
|
+
}));
|
|
778
|
+
};
|
|
779
|
+
this.submit = () => {
|
|
780
|
+
return of(true)
|
|
781
|
+
.pipe(switchMap(() => {
|
|
782
|
+
return this.verificationMethod ?
|
|
783
|
+
this.twoFactorManageService.verificationMethodVerify$(this.code, this.trustDevice)
|
|
784
|
+
.pipe(tap((verificationMethod) => {
|
|
785
|
+
this._message.success('Created text message verification method');
|
|
786
|
+
this._dialogRef.close(verificationMethod);
|
|
787
|
+
})) :
|
|
788
|
+
this.twoFactorManageService.verificationMethodCreate$({
|
|
789
|
+
type: VerificationMethodType.Sms,
|
|
790
|
+
phoneNumber: this.phone.number,
|
|
791
|
+
phoneCode: this.phone.countryCode,
|
|
792
|
+
phoneCountry: this.phone.isoCode,
|
|
793
|
+
default: this.default,
|
|
794
|
+
})
|
|
795
|
+
.pipe(tap((verificationMethod) => {
|
|
796
|
+
this.verificationMethod = verificationMethod;
|
|
797
|
+
this.form.clear();
|
|
798
|
+
this._cdRef.markForCheck();
|
|
799
|
+
}));
|
|
800
|
+
}));
|
|
801
|
+
};
|
|
802
|
+
this.twoFactorManageService = _data.twoFactorManageService;
|
|
803
|
+
this.defaultCountry = _data.defaultCountry;
|
|
804
|
+
this.default = !this.twoFactorManageService.hasVerificationMethods;
|
|
805
|
+
}
|
|
806
|
+
codeCompleted(code) {
|
|
807
|
+
this.code = code;
|
|
808
|
+
//Legacy support
|
|
809
|
+
setTimeout(() => {
|
|
810
|
+
if (!this.form.submitting) {
|
|
811
|
+
this.form.triggerSubmit();
|
|
812
|
+
}
|
|
813
|
+
});
|
|
814
|
+
}
|
|
815
|
+
codeChanged(code) {
|
|
816
|
+
this.code = code;
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
NumberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NumberComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i0.ChangeDetectorRef }, { token: i2$2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
|
|
820
|
+
NumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: NumberComponent, selector: "ng-component", viewQueries: [{ propertyName: "form", first: true, predicate: FsFormDirective, descendants: true }], ngImport: i0, template: "<form fsForm [submit]=\"submit\" [autocomplete]=\"false\">\n <fs-dialog>\n <h1 mat-dialog-title>\n Text Message Setup\n </h1>\n <mat-dialog-content>\n <ng-container *ngIf=\"verificationMethod; else notVerificationMethod\">\n <fs-2fa-verification\n [verificationMethod]=\"verificationMethod\"\n (codeChanged)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted($event)\"\n [resend]=\"resend\"\n [formatRecipient]=\"true\"\n [(trustDevice)]=\"trustDevice\">\n </fs-2fa-verification>\n </ng-container>\n\n <ng-template #notVerificationMethod>\n <p>The app will only use this number for verifying your account security. Message and data rates may apply by your cell phone provider.</p>\n <mat-form-field>\n <mat-label>Phone number</mat-label>\n <input \n matInput\n fsPhoneField\n [(ngModel)]=\"phone\"\n [required]=\"true\"\n [country]=\"defaultCountry\"\n [mode]=\"'object'\"\n autocomplete=\"off\"\n name=\"phone\">\n </mat-form-field>\n <mat-checkbox \n name=\"default\"\n [(ngModel)]=\"default\"\n [disableRipple]=\"true\">\n Make this the default verification method\n </mat-checkbox>\n </ng-template>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n type=\"submit\">\n Next\n </button>\n <button\n mat-button\n type=\"button\"\n [mat-dialog-close]=\"undefined\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: [":host ::ng-deep mat-checkbox .mat-ripple{display:none}:host ::ng-deep mat-checkbox .mat-checkbox-layout{white-space:wrap}app-code-input{margin-bottom:5px;display:block}mat-form-field{width:100%}mat-dialog-content{width:400px;max-width:100%}p{margin-top:0}h1{display:flex;align-items:center}h1 mat-icon{margin-right:5px}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { 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: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i6$1.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: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatLabel, selector: "mat-label" }, { kind: "component", type: i8$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i9.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout", "dock", "dockable", "fullscreenPercent"] }, { kind: "directive", type: i10.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup", "deactivationGuard"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"], exportAs: ["fsForm"] }, { kind: "directive", type: i10.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { kind: "directive", type: i10.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "directive", type: i10.FsButtonDirective, selector: "[mat-raised-button]:not([fsFormButtonStandalone]),[mat-button]:not([fsFormButtonStandalone]),[mat-flat-button]:not([fsFormButtonStandalone]),[mat-stroked-button]:not([fsFormButtonStandalone])", inputs: ["name", "dirtySubmit", "form"] }, { kind: "component", type: i8$2.FsPhoneFieldComponent, selector: "[fsPhoneField]", inputs: ["allowNumberExt", "placeholder", "required", "disabled", "mode", "country", "autocomplete"] }, { kind: "component", type: Fs2faVerificationComponent, selector: "fs-2fa-verification", inputs: ["verificationMethod", "resend", "showTrustedDevice", "trustDevice", "codeLength", "trustDays", "formatRecipient", "getVerificationMethods", "selectVerificationMethod"], outputs: ["verified", "codeChanged", "codeCompleted", "trustDeviceChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
821
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NumberComponent, decorators: [{
|
|
822
|
+
type: Component,
|
|
823
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<form fsForm [submit]=\"submit\" [autocomplete]=\"false\">\n <fs-dialog>\n <h1 mat-dialog-title>\n Text Message Setup\n </h1>\n <mat-dialog-content>\n <ng-container *ngIf=\"verificationMethod; else notVerificationMethod\">\n <fs-2fa-verification\n [verificationMethod]=\"verificationMethod\"\n (codeChanged)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted($event)\"\n [resend]=\"resend\"\n [formatRecipient]=\"true\"\n [(trustDevice)]=\"trustDevice\">\n </fs-2fa-verification>\n </ng-container>\n\n <ng-template #notVerificationMethod>\n <p>The app will only use this number for verifying your account security. Message and data rates may apply by your cell phone provider.</p>\n <mat-form-field>\n <mat-label>Phone number</mat-label>\n <input \n matInput\n fsPhoneField\n [(ngModel)]=\"phone\"\n [required]=\"true\"\n [country]=\"defaultCountry\"\n [mode]=\"'object'\"\n autocomplete=\"off\"\n name=\"phone\">\n </mat-form-field>\n <mat-checkbox \n name=\"default\"\n [(ngModel)]=\"default\"\n [disableRipple]=\"true\">\n Make this the default verification method\n </mat-checkbox>\n </ng-template>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n type=\"submit\">\n Next\n </button>\n <button\n mat-button\n type=\"button\"\n [mat-dialog-close]=\"undefined\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: [":host ::ng-deep mat-checkbox .mat-ripple{display:none}:host ::ng-deep mat-checkbox .mat-checkbox-layout{white-space:wrap}app-code-input{margin-bottom:5px;display:block}mat-form-field{width:100%}mat-dialog-content{width:400px;max-width:100%}p{margin-top:0}h1{display:flex;align-items:center}h1 mat-icon{margin-right:5px}\n"] }]
|
|
824
|
+
}], ctorParameters: function () {
|
|
825
|
+
return [{ type: undefined, decorators: [{
|
|
826
|
+
type: Inject,
|
|
827
|
+
args: [MAT_DIALOG_DATA]
|
|
828
|
+
}] }, { type: i1.MatDialogRef }, { type: i0.ChangeDetectorRef }, { type: i2$2.FsMessage }];
|
|
829
|
+
}, propDecorators: { form: [{
|
|
830
|
+
type: ViewChild,
|
|
831
|
+
args: [FsFormDirective, { static: false }]
|
|
832
832
|
}] } });
|
|
833
833
|
|
|
834
|
-
class TwoFactorManageService {
|
|
835
|
-
constructor(_dialog) {
|
|
836
|
-
this._dialog = _dialog;
|
|
837
|
-
this._destroy$ = new Subject();
|
|
838
|
-
this._verificationMethods$ = new BehaviorSubject([]);
|
|
839
|
-
}
|
|
840
|
-
get verificationMethods$() {
|
|
841
|
-
return this._verificationMethods$
|
|
842
|
-
.pipe(takeUntil(this._destroy$));
|
|
843
|
-
}
|
|
844
|
-
get verificationMethods() {
|
|
845
|
-
return this._verificationMethods$.getValue();
|
|
846
|
-
}
|
|
847
|
-
get hasVerificationMethods() {
|
|
848
|
-
return !!this._verificationMethods$.getValue().length;
|
|
849
|
-
}
|
|
850
|
-
get emailVerificationMethods() {
|
|
851
|
-
return this.getVerificationMethods(VerificationMethodType.Email);
|
|
852
|
-
}
|
|
853
|
-
get smsVerificationMethods() {
|
|
854
|
-
return this.getVerificationMethods(VerificationMethodType.Sms);
|
|
855
|
-
}
|
|
856
|
-
get appVerificationMethods() {
|
|
857
|
-
return this.getVerificationMethods(VerificationMethodType.App);
|
|
858
|
-
}
|
|
859
|
-
getVerificationMethods(type) {
|
|
860
|
-
return this.verificationMethods
|
|
861
|
-
.filter((verificationMethod) => {
|
|
862
|
-
return verificationMethod.type === type;
|
|
863
|
-
});
|
|
864
|
-
}
|
|
865
|
-
hasVerificationMethod(type) {
|
|
866
|
-
return this.verificationMethods
|
|
867
|
-
.some((verificationMethod) => {
|
|
868
|
-
return verificationMethod.type === type;
|
|
869
|
-
});
|
|
870
|
-
}
|
|
871
|
-
registerVerificationMethodDefault(value) {
|
|
872
|
-
this._verificationMethodDefault = value;
|
|
873
|
-
}
|
|
874
|
-
registerVerificationMethodResend(value) {
|
|
875
|
-
this._verificationMethodResend = value;
|
|
876
|
-
}
|
|
877
|
-
registerVerificationMethodsFetch(value) {
|
|
878
|
-
this._verificationMethodsFetch = value;
|
|
879
|
-
}
|
|
880
|
-
registerVerificationMethodDelete(value) {
|
|
881
|
-
this._verificationMethodDelete = value;
|
|
882
|
-
}
|
|
883
|
-
registerVerificationMethodCreate(value) {
|
|
884
|
-
this._verificationMethodCreate = value;
|
|
885
|
-
}
|
|
886
|
-
registerVerificationMethodVerify(value) {
|
|
887
|
-
this._verificationMethodVerify = value;
|
|
888
|
-
}
|
|
889
|
-
registerAccountVerify(value) {
|
|
890
|
-
this._accountVerify = value;
|
|
891
|
-
}
|
|
892
|
-
get hasVerificationMethodResend() {
|
|
893
|
-
return !!this._verificationMethodResend;
|
|
894
|
-
}
|
|
895
|
-
get hasVerificationMethodDefault() {
|
|
896
|
-
return !!this._verificationMethodDefault;
|
|
897
|
-
}
|
|
898
|
-
get hasVerificationMethodsFetch() {
|
|
899
|
-
return !!this._verificationMethodsFetch;
|
|
900
|
-
}
|
|
901
|
-
get hasVerificationMethodDelete() {
|
|
902
|
-
return !!this._verificationMethodDelete;
|
|
903
|
-
}
|
|
904
|
-
get hasVerificationMethodCreate() {
|
|
905
|
-
return !!this._verificationMethodCreate;
|
|
906
|
-
}
|
|
907
|
-
get hasVerificationMethodVerify() {
|
|
908
|
-
return !!this._verificationMethodVerify;
|
|
909
|
-
}
|
|
910
|
-
verificationMethodDelete$(verificationMethod) {
|
|
911
|
-
return this._verificationMethodDelete(verificationMethod)
|
|
912
|
-
.pipe(tap(() => {
|
|
913
|
-
this.verificationMethodsFetch();
|
|
914
|
-
}));
|
|
915
|
-
}
|
|
916
|
-
verificationMethodVerify$(code, trustDevice) {
|
|
917
|
-
return this._verificationMethodVerify(code, trustDevice)
|
|
918
|
-
.pipe(tap(() => {
|
|
919
|
-
this.verificationMethodsFetch();
|
|
920
|
-
}));
|
|
921
|
-
}
|
|
922
|
-
verificationMethodCreate$(verificationMethod) {
|
|
923
|
-
return this._verificationMethodCreate(verificationMethod);
|
|
924
|
-
}
|
|
925
|
-
verificationMethodDefault$(verificationMethod) {
|
|
926
|
-
return this._verificationMethodDefault(verificationMethod);
|
|
927
|
-
}
|
|
928
|
-
verificationMethodResend() {
|
|
929
|
-
return this._verificationMethodResend();
|
|
930
|
-
}
|
|
931
|
-
verificationMethodsFetch(query) {
|
|
932
|
-
this.verificationMethodsFetch$(query)
|
|
933
|
-
.subscribe();
|
|
934
|
-
}
|
|
935
|
-
verificationMethodsFetch$(query) {
|
|
936
|
-
return this._verificationMethodsFetch(query)
|
|
937
|
-
.pipe(tap((verificationMethods) => {
|
|
938
|
-
this._verificationMethods$.next(verificationMethods);
|
|
939
|
-
}));
|
|
940
|
-
}
|
|
941
|
-
accountVerify$() {
|
|
942
|
-
return this._accountVerify ? this._accountVerify() : of(true);
|
|
943
|
-
}
|
|
944
|
-
ngOnDestroy() {
|
|
945
|
-
this._destroy$.next();
|
|
946
|
-
this._destroy$.complete();
|
|
947
|
-
}
|
|
948
|
-
addSms$(defaultCountry) {
|
|
949
|
-
return this.accountVerify$()
|
|
950
|
-
.pipe(switchMap(() => this._dialog.open(NumberComponent, {
|
|
951
|
-
data: {
|
|
952
|
-
defaultCountry,
|
|
953
|
-
twoFactorManageService: this,
|
|
954
|
-
},
|
|
955
|
-
})
|
|
956
|
-
.afterClosed()), tap(() => {
|
|
957
|
-
this.verificationMethodsFetch();
|
|
958
|
-
}), takeUntil(this._destroy$));
|
|
959
|
-
}
|
|
960
|
-
addEmail$() {
|
|
961
|
-
return this.accountVerify$()
|
|
962
|
-
.pipe(switchMap(() => this._dialog.open(EmailComponent, {
|
|
963
|
-
data: { twoFactorManageService: this },
|
|
964
|
-
})
|
|
965
|
-
.afterClosed()), tap(() => {
|
|
966
|
-
this.verificationMethodsFetch();
|
|
967
|
-
}), takeUntil(this._destroy$));
|
|
968
|
-
}
|
|
969
|
-
addApp$() {
|
|
970
|
-
return this.accountVerify$()
|
|
971
|
-
.pipe(switchMap(() => this._dialog.open(AppComponent, {
|
|
972
|
-
data: { twoFactorManageService: this },
|
|
973
|
-
})
|
|
974
|
-
.afterClosed()), tap(() => {
|
|
975
|
-
this.verificationMethodsFetch();
|
|
976
|
-
}), takeUntil(this._destroy$));
|
|
977
|
-
}
|
|
978
|
-
}
|
|
979
|
-
TwoFactorManageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TwoFactorManageService, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
980
|
-
TwoFactorManageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TwoFactorManageService });
|
|
981
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TwoFactorManageService, decorators: [{
|
|
982
|
-
type: Injectable
|
|
834
|
+
class TwoFactorManageService {
|
|
835
|
+
constructor(_dialog) {
|
|
836
|
+
this._dialog = _dialog;
|
|
837
|
+
this._destroy$ = new Subject();
|
|
838
|
+
this._verificationMethods$ = new BehaviorSubject([]);
|
|
839
|
+
}
|
|
840
|
+
get verificationMethods$() {
|
|
841
|
+
return this._verificationMethods$
|
|
842
|
+
.pipe(takeUntil(this._destroy$));
|
|
843
|
+
}
|
|
844
|
+
get verificationMethods() {
|
|
845
|
+
return this._verificationMethods$.getValue();
|
|
846
|
+
}
|
|
847
|
+
get hasVerificationMethods() {
|
|
848
|
+
return !!this._verificationMethods$.getValue().length;
|
|
849
|
+
}
|
|
850
|
+
get emailVerificationMethods() {
|
|
851
|
+
return this.getVerificationMethods(VerificationMethodType.Email);
|
|
852
|
+
}
|
|
853
|
+
get smsVerificationMethods() {
|
|
854
|
+
return this.getVerificationMethods(VerificationMethodType.Sms);
|
|
855
|
+
}
|
|
856
|
+
get appVerificationMethods() {
|
|
857
|
+
return this.getVerificationMethods(VerificationMethodType.App);
|
|
858
|
+
}
|
|
859
|
+
getVerificationMethods(type) {
|
|
860
|
+
return this.verificationMethods
|
|
861
|
+
.filter((verificationMethod) => {
|
|
862
|
+
return verificationMethod.type === type;
|
|
863
|
+
});
|
|
864
|
+
}
|
|
865
|
+
hasVerificationMethod(type) {
|
|
866
|
+
return this.verificationMethods
|
|
867
|
+
.some((verificationMethod) => {
|
|
868
|
+
return verificationMethod.type === type;
|
|
869
|
+
});
|
|
870
|
+
}
|
|
871
|
+
registerVerificationMethodDefault(value) {
|
|
872
|
+
this._verificationMethodDefault = value;
|
|
873
|
+
}
|
|
874
|
+
registerVerificationMethodResend(value) {
|
|
875
|
+
this._verificationMethodResend = value;
|
|
876
|
+
}
|
|
877
|
+
registerVerificationMethodsFetch(value) {
|
|
878
|
+
this._verificationMethodsFetch = value;
|
|
879
|
+
}
|
|
880
|
+
registerVerificationMethodDelete(value) {
|
|
881
|
+
this._verificationMethodDelete = value;
|
|
882
|
+
}
|
|
883
|
+
registerVerificationMethodCreate(value) {
|
|
884
|
+
this._verificationMethodCreate = value;
|
|
885
|
+
}
|
|
886
|
+
registerVerificationMethodVerify(value) {
|
|
887
|
+
this._verificationMethodVerify = value;
|
|
888
|
+
}
|
|
889
|
+
registerAccountVerify(value) {
|
|
890
|
+
this._accountVerify = value;
|
|
891
|
+
}
|
|
892
|
+
get hasVerificationMethodResend() {
|
|
893
|
+
return !!this._verificationMethodResend;
|
|
894
|
+
}
|
|
895
|
+
get hasVerificationMethodDefault() {
|
|
896
|
+
return !!this._verificationMethodDefault;
|
|
897
|
+
}
|
|
898
|
+
get hasVerificationMethodsFetch() {
|
|
899
|
+
return !!this._verificationMethodsFetch;
|
|
900
|
+
}
|
|
901
|
+
get hasVerificationMethodDelete() {
|
|
902
|
+
return !!this._verificationMethodDelete;
|
|
903
|
+
}
|
|
904
|
+
get hasVerificationMethodCreate() {
|
|
905
|
+
return !!this._verificationMethodCreate;
|
|
906
|
+
}
|
|
907
|
+
get hasVerificationMethodVerify() {
|
|
908
|
+
return !!this._verificationMethodVerify;
|
|
909
|
+
}
|
|
910
|
+
verificationMethodDelete$(verificationMethod) {
|
|
911
|
+
return this._verificationMethodDelete(verificationMethod)
|
|
912
|
+
.pipe(tap(() => {
|
|
913
|
+
this.verificationMethodsFetch();
|
|
914
|
+
}));
|
|
915
|
+
}
|
|
916
|
+
verificationMethodVerify$(code, trustDevice) {
|
|
917
|
+
return this._verificationMethodVerify(code, trustDevice)
|
|
918
|
+
.pipe(tap(() => {
|
|
919
|
+
this.verificationMethodsFetch();
|
|
920
|
+
}));
|
|
921
|
+
}
|
|
922
|
+
verificationMethodCreate$(verificationMethod) {
|
|
923
|
+
return this._verificationMethodCreate(verificationMethod);
|
|
924
|
+
}
|
|
925
|
+
verificationMethodDefault$(verificationMethod) {
|
|
926
|
+
return this._verificationMethodDefault(verificationMethod);
|
|
927
|
+
}
|
|
928
|
+
verificationMethodResend() {
|
|
929
|
+
return this._verificationMethodResend();
|
|
930
|
+
}
|
|
931
|
+
verificationMethodsFetch(query) {
|
|
932
|
+
this.verificationMethodsFetch$(query)
|
|
933
|
+
.subscribe();
|
|
934
|
+
}
|
|
935
|
+
verificationMethodsFetch$(query) {
|
|
936
|
+
return this._verificationMethodsFetch(query)
|
|
937
|
+
.pipe(tap((verificationMethods) => {
|
|
938
|
+
this._verificationMethods$.next(verificationMethods);
|
|
939
|
+
}));
|
|
940
|
+
}
|
|
941
|
+
accountVerify$() {
|
|
942
|
+
return this._accountVerify ? this._accountVerify() : of(true);
|
|
943
|
+
}
|
|
944
|
+
ngOnDestroy() {
|
|
945
|
+
this._destroy$.next();
|
|
946
|
+
this._destroy$.complete();
|
|
947
|
+
}
|
|
948
|
+
addSms$(defaultCountry) {
|
|
949
|
+
return this.accountVerify$()
|
|
950
|
+
.pipe(switchMap(() => this._dialog.open(NumberComponent, {
|
|
951
|
+
data: {
|
|
952
|
+
defaultCountry,
|
|
953
|
+
twoFactorManageService: this,
|
|
954
|
+
},
|
|
955
|
+
})
|
|
956
|
+
.afterClosed()), tap(() => {
|
|
957
|
+
this.verificationMethodsFetch();
|
|
958
|
+
}), takeUntil(this._destroy$));
|
|
959
|
+
}
|
|
960
|
+
addEmail$() {
|
|
961
|
+
return this.accountVerify$()
|
|
962
|
+
.pipe(switchMap(() => this._dialog.open(EmailComponent, {
|
|
963
|
+
data: { twoFactorManageService: this },
|
|
964
|
+
})
|
|
965
|
+
.afterClosed()), tap(() => {
|
|
966
|
+
this.verificationMethodsFetch();
|
|
967
|
+
}), takeUntil(this._destroy$));
|
|
968
|
+
}
|
|
969
|
+
addApp$() {
|
|
970
|
+
return this.accountVerify$()
|
|
971
|
+
.pipe(switchMap(() => this._dialog.open(AppComponent, {
|
|
972
|
+
data: { twoFactorManageService: this },
|
|
973
|
+
})
|
|
974
|
+
.afterClosed()), tap(() => {
|
|
975
|
+
this.verificationMethodsFetch();
|
|
976
|
+
}), takeUntil(this._destroy$));
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
TwoFactorManageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TwoFactorManageService, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
980
|
+
TwoFactorManageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TwoFactorManageService });
|
|
981
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TwoFactorManageService, decorators: [{
|
|
982
|
+
type: Injectable
|
|
983
983
|
}], ctorParameters: function () { return [{ type: i1.MatDialog }]; } });
|
|
984
984
|
|
|
985
|
-
class NumbersComponent {
|
|
986
|
-
constructor(_data, _dialogRef, _message) {
|
|
987
|
-
this._data = _data;
|
|
988
|
-
this._dialogRef = _dialogRef;
|
|
989
|
-
this._message = _message;
|
|
990
|
-
this.VerificationMethodType = VerificationMethodType;
|
|
991
|
-
this.twoFactorManageService = _data.twoFactorManageService;
|
|
992
|
-
this.defaultCountry = _data.defaultCountry;
|
|
993
|
-
}
|
|
994
|
-
add() {
|
|
995
|
-
this.twoFactorManageService.addSms$(this.defaultCountry)
|
|
996
|
-
.subscribe(() => {
|
|
997
|
-
this.verificationMethods.reload();
|
|
998
|
-
});
|
|
999
|
-
}
|
|
1000
|
-
deleted() {
|
|
1001
|
-
this._message.success('Deleted text message verification method');
|
|
1002
|
-
if (!this.twoFactorManageService.hasVerificationMethod(VerificationMethodType.Sms)) {
|
|
1003
|
-
this._dialogRef.close();
|
|
1004
|
-
}
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
1007
|
-
NumbersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NumbersComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i2$2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
|
|
1008
|
-
NumbersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: NumbersComponent, selector: "ng-component", viewQueries: [{ propertyName: "verificationMethods", first: true, predicate: VerificationMethodsComponent, descendants: true }], ngImport: i0, template: "<fs-dialog>\n <h1 mat-dialog-title>\n <mat-icon>textsms</mat-icon> Text Message Numbers\n </h1>\n <mat-dialog-content>\n <fs-2fa-verification-methods\n [type]=\"VerificationMethodType.Sms\"\n [twoFactorManageService]=\"twoFactorManageService\"\n (deleted)=\"deleted()\">\n </fs-2fa-verification-methods> \n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [mat-dialog-close]=\"undefined\">\n Close\n </button>\n <button\n mat-button\n (click)=\"add()\"\n type=\"button\">\n Add Number\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [""], dependencies: [{ 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: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i9.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout", "dock", "dockable", "fullscreenPercent"] }, { kind: "directive", type: i10.FsButtonDirective, selector: "[mat-raised-button]:not([fsFormButtonStandalone]),[mat-button]:not([fsFormButtonStandalone]),[mat-flat-button]:not([fsFormButtonStandalone]),[mat-stroked-button]:not([fsFormButtonStandalone])", inputs: ["name", "dirtySubmit", "form"] }, { kind: "component", type: VerificationMethodsComponent, selector: "fs-2fa-verification-methods", inputs: ["type", "accountVerify", "verificationMethodsFetch", "verificationMethodDelete", "verificationMethodDefault", "twoFactorManageService"], outputs: ["deleted"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1009
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NumbersComponent, decorators: [{
|
|
1010
|
-
type: Component,
|
|
1011
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<fs-dialog>\n <h1 mat-dialog-title>\n <mat-icon>textsms</mat-icon> Text Message Numbers\n </h1>\n <mat-dialog-content>\n <fs-2fa-verification-methods\n [type]=\"VerificationMethodType.Sms\"\n [twoFactorManageService]=\"twoFactorManageService\"\n (deleted)=\"deleted()\">\n </fs-2fa-verification-methods> \n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [mat-dialog-close]=\"undefined\">\n Close\n </button>\n <button\n mat-button\n (click)=\"add()\"\n type=\"button\">\n Add Number\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n" }]
|
|
1012
|
-
}], ctorParameters: function () {
|
|
1013
|
-
return [{ type: undefined, decorators: [{
|
|
1014
|
-
type: Inject,
|
|
1015
|
-
args: [MAT_DIALOG_DATA]
|
|
1016
|
-
}] }, { type: i1.MatDialogRef }, { type: i2$2.FsMessage }];
|
|
1017
|
-
}, propDecorators: { verificationMethods: [{
|
|
1018
|
-
type: ViewChild,
|
|
1019
|
-
args: [VerificationMethodsComponent]
|
|
985
|
+
class NumbersComponent {
|
|
986
|
+
constructor(_data, _dialogRef, _message) {
|
|
987
|
+
this._data = _data;
|
|
988
|
+
this._dialogRef = _dialogRef;
|
|
989
|
+
this._message = _message;
|
|
990
|
+
this.VerificationMethodType = VerificationMethodType;
|
|
991
|
+
this.twoFactorManageService = _data.twoFactorManageService;
|
|
992
|
+
this.defaultCountry = _data.defaultCountry;
|
|
993
|
+
}
|
|
994
|
+
add() {
|
|
995
|
+
this.twoFactorManageService.addSms$(this.defaultCountry)
|
|
996
|
+
.subscribe(() => {
|
|
997
|
+
this.verificationMethods.reload();
|
|
998
|
+
});
|
|
999
|
+
}
|
|
1000
|
+
deleted() {
|
|
1001
|
+
this._message.success('Deleted text message verification method');
|
|
1002
|
+
if (!this.twoFactorManageService.hasVerificationMethod(VerificationMethodType.Sms)) {
|
|
1003
|
+
this._dialogRef.close();
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
NumbersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NumbersComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i2$2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
|
|
1008
|
+
NumbersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: NumbersComponent, selector: "ng-component", viewQueries: [{ propertyName: "verificationMethods", first: true, predicate: VerificationMethodsComponent, descendants: true }], ngImport: i0, template: "<fs-dialog>\n <h1 mat-dialog-title>\n <mat-icon>textsms</mat-icon> Text Message Numbers\n </h1>\n <mat-dialog-content>\n <fs-2fa-verification-methods\n [type]=\"VerificationMethodType.Sms\"\n [twoFactorManageService]=\"twoFactorManageService\"\n (deleted)=\"deleted()\">\n </fs-2fa-verification-methods> \n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [mat-dialog-close]=\"undefined\">\n Close\n </button>\n <button\n mat-button\n (click)=\"add()\"\n type=\"button\">\n Add Number\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [""], dependencies: [{ 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: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i9.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout", "dock", "dockable", "fullscreenPercent"] }, { kind: "directive", type: i10.FsButtonDirective, selector: "[mat-raised-button]:not([fsFormButtonStandalone]),[mat-button]:not([fsFormButtonStandalone]),[mat-flat-button]:not([fsFormButtonStandalone]),[mat-stroked-button]:not([fsFormButtonStandalone])", inputs: ["name", "dirtySubmit", "form"] }, { kind: "component", type: VerificationMethodsComponent, selector: "fs-2fa-verification-methods", inputs: ["type", "accountVerify", "verificationMethodsFetch", "verificationMethodDelete", "verificationMethodDefault", "twoFactorManageService"], outputs: ["deleted"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1009
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NumbersComponent, decorators: [{
|
|
1010
|
+
type: Component,
|
|
1011
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<fs-dialog>\n <h1 mat-dialog-title>\n <mat-icon>textsms</mat-icon> Text Message Numbers\n </h1>\n <mat-dialog-content>\n <fs-2fa-verification-methods\n [type]=\"VerificationMethodType.Sms\"\n [twoFactorManageService]=\"twoFactorManageService\"\n (deleted)=\"deleted()\">\n </fs-2fa-verification-methods> \n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [mat-dialog-close]=\"undefined\">\n Close\n </button>\n <button\n mat-button\n (click)=\"add()\"\n type=\"button\">\n Add Number\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n" }]
|
|
1012
|
+
}], ctorParameters: function () {
|
|
1013
|
+
return [{ type: undefined, decorators: [{
|
|
1014
|
+
type: Inject,
|
|
1015
|
+
args: [MAT_DIALOG_DATA]
|
|
1016
|
+
}] }, { type: i1.MatDialogRef }, { type: i2$2.FsMessage }];
|
|
1017
|
+
}, propDecorators: { verificationMethods: [{
|
|
1018
|
+
type: ViewChild,
|
|
1019
|
+
args: [VerificationMethodsComponent]
|
|
1020
1020
|
}] } });
|
|
1021
1021
|
|
|
1022
|
-
class EmailsComponent {
|
|
1023
|
-
constructor(_data, _dialogRef, _message) {
|
|
1024
|
-
this._data = _data;
|
|
1025
|
-
this._dialogRef = _dialogRef;
|
|
1026
|
-
this._message = _message;
|
|
1027
|
-
this.VerificationMethodType = VerificationMethodType;
|
|
1028
|
-
this.twoFactorManageService = _data.twoFactorManageService;
|
|
1029
|
-
}
|
|
1030
|
-
add() {
|
|
1031
|
-
this.twoFactorManageService.addEmail$()
|
|
1032
|
-
.subscribe(() => {
|
|
1033
|
-
this.verificationMethods.reload();
|
|
1034
|
-
});
|
|
1035
|
-
}
|
|
1036
|
-
deleted() {
|
|
1037
|
-
this._message.success('Deleted email verification method');
|
|
1038
|
-
if (!this.twoFactorManageService.hasVerificationMethod(VerificationMethodType.Email)) {
|
|
1039
|
-
this._dialogRef.close();
|
|
1040
|
-
}
|
|
1041
|
-
}
|
|
1042
|
-
}
|
|
1043
|
-
EmailsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EmailsComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i2$2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
|
|
1044
|
-
EmailsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: EmailsComponent, selector: "ng-component", viewQueries: [{ propertyName: "verificationMethods", first: true, predicate: VerificationMethodsComponent, descendants: true }], ngImport: i0, template: "<fs-dialog>\n <h1 mat-dialog-title>\n <mat-icon>email</mat-icon> Emails\n </h1>\n <mat-dialog-content>\n <fs-2fa-verification-methods\n [type]=\"VerificationMethodType.Email\"\n [twoFactorManageService]=\"twoFactorManageService\"\n (deleted)=\"deleted()\">\n </fs-2fa-verification-methods>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [mat-dialog-close]=\"undefined\">\n Close\n </button>\n <button\n mat-button\n (click)=\"add()\"\n type=\"button\">\n Add Email\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: ["h1{display:flex;align-items:center}h1 mat-icon{margin-right:5px}\n"], dependencies: [{ 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: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i9.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout", "dock", "dockable", "fullscreenPercent"] }, { kind: "directive", type: i10.FsButtonDirective, selector: "[mat-raised-button]:not([fsFormButtonStandalone]),[mat-button]:not([fsFormButtonStandalone]),[mat-flat-button]:not([fsFormButtonStandalone]),[mat-stroked-button]:not([fsFormButtonStandalone])", inputs: ["name", "dirtySubmit", "form"] }, { kind: "component", type: VerificationMethodsComponent, selector: "fs-2fa-verification-methods", inputs: ["type", "accountVerify", "verificationMethodsFetch", "verificationMethodDelete", "verificationMethodDefault", "twoFactorManageService"], outputs: ["deleted"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1045
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EmailsComponent, decorators: [{
|
|
1046
|
-
type: Component,
|
|
1047
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<fs-dialog>\n <h1 mat-dialog-title>\n <mat-icon>email</mat-icon> Emails\n </h1>\n <mat-dialog-content>\n <fs-2fa-verification-methods\n [type]=\"VerificationMethodType.Email\"\n [twoFactorManageService]=\"twoFactorManageService\"\n (deleted)=\"deleted()\">\n </fs-2fa-verification-methods>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [mat-dialog-close]=\"undefined\">\n Close\n </button>\n <button\n mat-button\n (click)=\"add()\"\n type=\"button\">\n Add Email\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: ["h1{display:flex;align-items:center}h1 mat-icon{margin-right:5px}\n"] }]
|
|
1048
|
-
}], ctorParameters: function () {
|
|
1049
|
-
return [{ type: undefined, decorators: [{
|
|
1050
|
-
type: Inject,
|
|
1051
|
-
args: [MAT_DIALOG_DATA]
|
|
1052
|
-
}] }, { type: i1.MatDialogRef }, { type: i2$2.FsMessage }];
|
|
1053
|
-
}, propDecorators: { verificationMethods: [{
|
|
1054
|
-
type: ViewChild,
|
|
1055
|
-
args: [VerificationMethodsComponent]
|
|
1022
|
+
class EmailsComponent {
|
|
1023
|
+
constructor(_data, _dialogRef, _message) {
|
|
1024
|
+
this._data = _data;
|
|
1025
|
+
this._dialogRef = _dialogRef;
|
|
1026
|
+
this._message = _message;
|
|
1027
|
+
this.VerificationMethodType = VerificationMethodType;
|
|
1028
|
+
this.twoFactorManageService = _data.twoFactorManageService;
|
|
1029
|
+
}
|
|
1030
|
+
add() {
|
|
1031
|
+
this.twoFactorManageService.addEmail$()
|
|
1032
|
+
.subscribe(() => {
|
|
1033
|
+
this.verificationMethods.reload();
|
|
1034
|
+
});
|
|
1035
|
+
}
|
|
1036
|
+
deleted() {
|
|
1037
|
+
this._message.success('Deleted email verification method');
|
|
1038
|
+
if (!this.twoFactorManageService.hasVerificationMethod(VerificationMethodType.Email)) {
|
|
1039
|
+
this._dialogRef.close();
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
EmailsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EmailsComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i2$2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
|
|
1044
|
+
EmailsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: EmailsComponent, selector: "ng-component", viewQueries: [{ propertyName: "verificationMethods", first: true, predicate: VerificationMethodsComponent, descendants: true }], ngImport: i0, template: "<fs-dialog>\n <h1 mat-dialog-title>\n <mat-icon>email</mat-icon> Emails\n </h1>\n <mat-dialog-content>\n <fs-2fa-verification-methods\n [type]=\"VerificationMethodType.Email\"\n [twoFactorManageService]=\"twoFactorManageService\"\n (deleted)=\"deleted()\">\n </fs-2fa-verification-methods>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [mat-dialog-close]=\"undefined\">\n Close\n </button>\n <button\n mat-button\n (click)=\"add()\"\n type=\"button\">\n Add Email\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: ["h1{display:flex;align-items:center}h1 mat-icon{margin-right:5px}\n"], dependencies: [{ 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: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i9.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout", "dock", "dockable", "fullscreenPercent"] }, { kind: "directive", type: i10.FsButtonDirective, selector: "[mat-raised-button]:not([fsFormButtonStandalone]),[mat-button]:not([fsFormButtonStandalone]),[mat-flat-button]:not([fsFormButtonStandalone]),[mat-stroked-button]:not([fsFormButtonStandalone])", inputs: ["name", "dirtySubmit", "form"] }, { kind: "component", type: VerificationMethodsComponent, selector: "fs-2fa-verification-methods", inputs: ["type", "accountVerify", "verificationMethodsFetch", "verificationMethodDelete", "verificationMethodDefault", "twoFactorManageService"], outputs: ["deleted"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1045
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EmailsComponent, decorators: [{
|
|
1046
|
+
type: Component,
|
|
1047
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<fs-dialog>\n <h1 mat-dialog-title>\n <mat-icon>email</mat-icon> Emails\n </h1>\n <mat-dialog-content>\n <fs-2fa-verification-methods\n [type]=\"VerificationMethodType.Email\"\n [twoFactorManageService]=\"twoFactorManageService\"\n (deleted)=\"deleted()\">\n </fs-2fa-verification-methods>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [mat-dialog-close]=\"undefined\">\n Close\n </button>\n <button\n mat-button\n (click)=\"add()\"\n type=\"button\">\n Add Email\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: ["h1{display:flex;align-items:center}h1 mat-icon{margin-right:5px}\n"] }]
|
|
1048
|
+
}], ctorParameters: function () {
|
|
1049
|
+
return [{ type: undefined, decorators: [{
|
|
1050
|
+
type: Inject,
|
|
1051
|
+
args: [MAT_DIALOG_DATA]
|
|
1052
|
+
}] }, { type: i1.MatDialogRef }, { type: i2$2.FsMessage }];
|
|
1053
|
+
}, propDecorators: { verificationMethods: [{
|
|
1054
|
+
type: ViewChild,
|
|
1055
|
+
args: [VerificationMethodsComponent]
|
|
1056
1056
|
}] } });
|
|
1057
1057
|
|
|
1058
|
-
class ManageMethodsComponent {
|
|
1059
|
-
constructor(_data, _cdRef, _dialog, _message) {
|
|
1060
|
-
this._data = _data;
|
|
1061
|
-
this._cdRef = _cdRef;
|
|
1062
|
-
this._dialog = _dialog;
|
|
1063
|
-
this._message = _message;
|
|
1064
|
-
this.verificationMethodTypes = {};
|
|
1065
|
-
this.VerificationMethodType = VerificationMethodType;
|
|
1066
|
-
this._destroy$ = new Subject();
|
|
1067
|
-
}
|
|
1068
|
-
ngOnInit() {
|
|
1069
|
-
this._defaultCountry = this._data.defaultCountry;
|
|
1070
|
-
this.twoFactorManageService = this._data.twoFactorManageService;
|
|
1071
|
-
this.verificationMethodTypes = this._data.verificationMethodTypes
|
|
1072
|
-
.reduce((verificationMethodTypes, verificationMethodType) => {
|
|
1073
|
-
verificationMethodTypes[verificationMethodType] = true;
|
|
1074
|
-
return verificationMethodTypes;
|
|
1075
|
-
}, {});
|
|
1076
|
-
this.twoFactorManageService.verificationMethods$
|
|
1077
|
-
.subscribe((verificationMethods) => {
|
|
1078
|
-
this.verificationMethods = verificationMethods;
|
|
1079
|
-
this._cdRef.markForCheck();
|
|
1080
|
-
});
|
|
1081
|
-
}
|
|
1082
|
-
get defaultSms() {
|
|
1083
|
-
return this.twoFactorManageService.smsVerificationMethods
|
|
1084
|
-
.some((verificationMethod) => {
|
|
1085
|
-
return verificationMethod.default;
|
|
1086
|
-
});
|
|
1087
|
-
}
|
|
1088
|
-
get defaultApp() {
|
|
1089
|
-
return this.twoFactorManageService.appVerificationMethods
|
|
1090
|
-
.some((verificationMethod) => {
|
|
1091
|
-
return verificationMethod.default;
|
|
1092
|
-
});
|
|
1093
|
-
}
|
|
1094
|
-
get defaultEmail() {
|
|
1095
|
-
return this.twoFactorManageService.emailVerificationMethods
|
|
1096
|
-
.some((verificationMethod) => {
|
|
1097
|
-
return verificationMethod.default;
|
|
1098
|
-
});
|
|
1099
|
-
}
|
|
1100
|
-
get textHasVerificationMethod() {
|
|
1101
|
-
return this.twoFactorManageService.hasVerificationMethod(VerificationMethodType.Sms);
|
|
1102
|
-
}
|
|
1103
|
-
get appHasVerificationMethod() {
|
|
1104
|
-
return this.twoFactorManageService.hasVerificationMethod(VerificationMethodType.App);
|
|
1105
|
-
}
|
|
1106
|
-
get emailHasVerificationMethod() {
|
|
1107
|
-
return this.twoFactorManageService.hasVerificationMethod(VerificationMethodType.Email);
|
|
1108
|
-
}
|
|
1109
|
-
textMessageManage() {
|
|
1110
|
-
this._dialog.open(NumbersComponent, {
|
|
1111
|
-
data: {
|
|
1112
|
-
twoFactorManageService: this.twoFactorManageService,
|
|
1113
|
-
defaultCountry: this._defaultCountry,
|
|
1114
|
-
},
|
|
1115
|
-
});
|
|
1116
|
-
}
|
|
1117
|
-
textMessageAdd() {
|
|
1118
|
-
this.twoFactorManageService.addSms$(this._defaultCountry)
|
|
1119
|
-
.subscribe();
|
|
1120
|
-
}
|
|
1121
|
-
emailMessageManage() {
|
|
1122
|
-
this._dialog.open(EmailsComponent, {
|
|
1123
|
-
data: {
|
|
1124
|
-
twoFactorManageService: this.twoFactorManageService,
|
|
1125
|
-
},
|
|
1126
|
-
});
|
|
1127
|
-
}
|
|
1128
|
-
emailMessageAdd() {
|
|
1129
|
-
this.twoFactorManageService.addEmail$()
|
|
1130
|
-
.subscribe();
|
|
1131
|
-
}
|
|
1132
|
-
appRemove() {
|
|
1133
|
-
const verificationMethod = this.verificationMethods
|
|
1134
|
-
.find((_verificationMethod) => {
|
|
1135
|
-
return _verificationMethod.type === VerificationMethodType.App;
|
|
1136
|
-
});
|
|
1137
|
-
if (verificationMethod) {
|
|
1138
|
-
this.twoFactorManageService.accountVerify$()
|
|
1139
|
-
.pipe(switchMap(() => this.twoFactorManageService.verificationMethodDelete$(verificationMethod)))
|
|
1140
|
-
.subscribe(() => {
|
|
1141
|
-
this._message.success('Removed App Authenticator verification method');
|
|
1142
|
-
this._cdRef.markForCheck();
|
|
1143
|
-
});
|
|
1144
|
-
}
|
|
1145
|
-
}
|
|
1146
|
-
appAdd() {
|
|
1147
|
-
this.twoFactorManageService.addApp$()
|
|
1148
|
-
.subscribe();
|
|
1149
|
-
}
|
|
1150
|
-
ngOnDestroy() {
|
|
1151
|
-
this._destroy$.next();
|
|
1152
|
-
this._destroy$.complete();
|
|
1153
|
-
}
|
|
1154
|
-
}
|
|
1155
|
-
ManageMethodsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ManageMethodsComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i0.ChangeDetectorRef }, { token: i1.MatDialog }, { token: i2$2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
|
|
1156
|
-
ManageMethodsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ManageMethodsComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog>\n <h1 mat-dialog-title>2-Step Verification</h1>\n <mat-dialog-content>\n <table>\n <tr *ngIf=\"verificationMethodTypes[VerificationMethodType.Sms]\">\n <td>\n <mat-icon>textsms</mat-icon>\n </td>\n <td>\n <div class=\"type\">\n <span>Text Message</span>\n <span *ngIf=\"textHasVerificationMethod\" class=\"enabled\"></span>\n <app-defaulted *ngIf=\"defaultSms\"></app-defaulted>\n </div>\n <div class=\"small\">\n Verification codes are sent by text message\n <ng-container *ngIf=\"textHasVerificationMethod\">\n to <span class=\"items\">\n <span *ngFor=\"let item of twoFactorManageService.smsVerificationMethods\">{{item.phoneNumber | fsPhone}}</span>\n </span>\n </ng-container>\n </div>\n </td>\n <td>\n <button \n *ngIf=\"textHasVerificationMethod; else textMessageManageButton\"\n mat-raised-button \n type=\"button\"\n (click)=\"textMessageManage()\">\n Manage\n </button>\n <ng-template #textMessageManageButton>\n <button \n mat-raised-button \n color=\"primary\"\n type=\"button\"\n (click)=\"textMessageAdd()\">\n Turn On\n </button>\n </ng-template>\n </td>\n </tr>\n <tr *ngIf=\"verificationMethodTypes[VerificationMethodType.Email]\">\n <td>\n <mat-icon>email</mat-icon>\n </td>\n <td>\n <div class=\"type\">\n <span>Email</span> \n <span *ngIf=\"emailHasVerificationMethod\" class=\"enabled\"></span>\n <app-defaulted *ngIf=\"defaultEmail\"></app-defaulted>\n </div>\n <div class=\"small\">\n Verification codes are sent by email\n <ng-container *ngIf=\"emailHasVerificationMethod\">\n to <span class=\"items\">\n <span *ngFor=\"let item of twoFactorManageService.emailVerificationMethods\">{{item.email}}</span>\n </span>\n </ng-container>\n </div>\n </td>\n <td>\n <button \n *ngIf=\"emailHasVerificationMethod; else emailMessageManageButton\"\n mat-raised-button \n type=\"button\"\n (click)=\"emailMessageManage()\">\n Manage\n </button>\n <ng-template #emailMessageManageButton>\n <button \n mat-raised-button \n color=\"primary\"\n type=\"button\"\n (click)=\"emailMessageAdd()\">\n Turn On\n </button>\n </ng-template>\n </td>\n </tr>\n <tr *ngIf=\"verificationMethodTypes[VerificationMethodType.App]\">\n <td>\n <mat-icon>phone_iphone</mat-icon>\n </td>\n <td>\n <div class=\"type\">\n <span>Authenticator App</span>\n <span *ngIf=\"appHasVerificationMethod\" class=\"enabled\"></span>\n <app-defaulted *ngIf=\"defaultApp\"></app-defaulted>\n </div>\n <div class=\"small\">Verification code is generated by an authenticator app such as Authy or Google Authenticator</div>\n </td>\n <td>\n <button \n *ngIf=\"appHasVerificationMethod; else appMessageManageButton\"\n mat-raised-button \n type=\"button\"\n (click)=\"appRemove()\">\n Remove\n </button>\n <ng-template #appMessageManageButton>\n <button \n mat-raised-button \n color=\"primary\"\n type=\"button\"\n (click)=\"appAdd()\">\n Turn On\n </button>\n </ng-template>\n </td>\n </tr> \n </table> \n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n type=\"button\"\n [mat-dialog-close]=\"undefined\">\n Close\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: ["mat-dialog-content{max-width:500px}.enabled{font-size:75%;background-color:#70b601;padding:2px 4px;border-radius:4px;color:#fff;margin-left:4px}.enabled:after{content:\"Enabled\"}table tr td:first-child,table tr td:last-child{width:1%}table tr td:first-child mat-icon,table tr td:last-child mat-icon{display:flex}table tr td{padding:6px;vertical-align:middle}table tr .type{display:flex;align-items:center}table tr .type app-defaulted{margin-left:4px}.items span+span:not(:last-child):before{content:\", \"}.items span+span:last-child:before{content:\" and \"}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i9.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout", "dock", "dockable", "fullscreenPercent"] }, { kind: "directive", type: i10.FsButtonDirective, selector: "[mat-raised-button]:not([fsFormButtonStandalone]),[mat-button]:not([fsFormButtonStandalone]),[mat-flat-button]:not([fsFormButtonStandalone]),[mat-stroked-button]:not([fsFormButtonStandalone])", inputs: ["name", "dirtySubmit", "form"] }, { kind: "component", type: DefaultedComponent, selector: "app-defaulted" }, { kind: "pipe", type: i8$2.FsPhonePipe, name: "fsPhone" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1157
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ManageMethodsComponent, decorators: [{
|
|
1158
|
-
type: Component,
|
|
1159
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<fs-dialog>\n <h1 mat-dialog-title>2-Step Verification</h1>\n <mat-dialog-content>\n <table>\n <tr *ngIf=\"verificationMethodTypes[VerificationMethodType.Sms]\">\n <td>\n <mat-icon>textsms</mat-icon>\n </td>\n <td>\n <div class=\"type\">\n <span>Text Message</span>\n <span *ngIf=\"textHasVerificationMethod\" class=\"enabled\"></span>\n <app-defaulted *ngIf=\"defaultSms\"></app-defaulted>\n </div>\n <div class=\"small\">\n Verification codes are sent by text message\n <ng-container *ngIf=\"textHasVerificationMethod\">\n to <span class=\"items\">\n <span *ngFor=\"let item of twoFactorManageService.smsVerificationMethods\">{{item.phoneNumber | fsPhone}}</span>\n </span>\n </ng-container>\n </div>\n </td>\n <td>\n <button \n *ngIf=\"textHasVerificationMethod; else textMessageManageButton\"\n mat-raised-button \n type=\"button\"\n (click)=\"textMessageManage()\">\n Manage\n </button>\n <ng-template #textMessageManageButton>\n <button \n mat-raised-button \n color=\"primary\"\n type=\"button\"\n (click)=\"textMessageAdd()\">\n Turn On\n </button>\n </ng-template>\n </td>\n </tr>\n <tr *ngIf=\"verificationMethodTypes[VerificationMethodType.Email]\">\n <td>\n <mat-icon>email</mat-icon>\n </td>\n <td>\n <div class=\"type\">\n <span>Email</span> \n <span *ngIf=\"emailHasVerificationMethod\" class=\"enabled\"></span>\n <app-defaulted *ngIf=\"defaultEmail\"></app-defaulted>\n </div>\n <div class=\"small\">\n Verification codes are sent by email\n <ng-container *ngIf=\"emailHasVerificationMethod\">\n to <span class=\"items\">\n <span *ngFor=\"let item of twoFactorManageService.emailVerificationMethods\">{{item.email}}</span>\n </span>\n </ng-container>\n </div>\n </td>\n <td>\n <button \n *ngIf=\"emailHasVerificationMethod; else emailMessageManageButton\"\n mat-raised-button \n type=\"button\"\n (click)=\"emailMessageManage()\">\n Manage\n </button>\n <ng-template #emailMessageManageButton>\n <button \n mat-raised-button \n color=\"primary\"\n type=\"button\"\n (click)=\"emailMessageAdd()\">\n Turn On\n </button>\n </ng-template>\n </td>\n </tr>\n <tr *ngIf=\"verificationMethodTypes[VerificationMethodType.App]\">\n <td>\n <mat-icon>phone_iphone</mat-icon>\n </td>\n <td>\n <div class=\"type\">\n <span>Authenticator App</span>\n <span *ngIf=\"appHasVerificationMethod\" class=\"enabled\"></span>\n <app-defaulted *ngIf=\"defaultApp\"></app-defaulted>\n </div>\n <div class=\"small\">Verification code is generated by an authenticator app such as Authy or Google Authenticator</div>\n </td>\n <td>\n <button \n *ngIf=\"appHasVerificationMethod; else appMessageManageButton\"\n mat-raised-button \n type=\"button\"\n (click)=\"appRemove()\">\n Remove\n </button>\n <ng-template #appMessageManageButton>\n <button \n mat-raised-button \n color=\"primary\"\n type=\"button\"\n (click)=\"appAdd()\">\n Turn On\n </button>\n </ng-template>\n </td>\n </tr> \n </table> \n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n type=\"button\"\n [mat-dialog-close]=\"undefined\">\n Close\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: ["mat-dialog-content{max-width:500px}.enabled{font-size:75%;background-color:#70b601;padding:2px 4px;border-radius:4px;color:#fff;margin-left:4px}.enabled:after{content:\"Enabled\"}table tr td:first-child,table tr td:last-child{width:1%}table tr td:first-child mat-icon,table tr td:last-child mat-icon{display:flex}table tr td{padding:6px;vertical-align:middle}table tr .type{display:flex;align-items:center}table tr .type app-defaulted{margin-left:4px}.items span+span:not(:last-child):before{content:\", \"}.items span+span:last-child:before{content:\" and \"}\n"] }]
|
|
1160
|
-
}], ctorParameters: function () {
|
|
1161
|
-
return [{ type: undefined, decorators: [{
|
|
1162
|
-
type: Inject,
|
|
1163
|
-
args: [MAT_DIALOG_DATA]
|
|
1164
|
-
}] }, { type: i0.ChangeDetectorRef }, { type: i1.MatDialog }, { type: i2$2.FsMessage }];
|
|
1058
|
+
class ManageMethodsComponent {
|
|
1059
|
+
constructor(_data, _cdRef, _dialog, _message) {
|
|
1060
|
+
this._data = _data;
|
|
1061
|
+
this._cdRef = _cdRef;
|
|
1062
|
+
this._dialog = _dialog;
|
|
1063
|
+
this._message = _message;
|
|
1064
|
+
this.verificationMethodTypes = {};
|
|
1065
|
+
this.VerificationMethodType = VerificationMethodType;
|
|
1066
|
+
this._destroy$ = new Subject();
|
|
1067
|
+
}
|
|
1068
|
+
ngOnInit() {
|
|
1069
|
+
this._defaultCountry = this._data.defaultCountry;
|
|
1070
|
+
this.twoFactorManageService = this._data.twoFactorManageService;
|
|
1071
|
+
this.verificationMethodTypes = this._data.verificationMethodTypes
|
|
1072
|
+
.reduce((verificationMethodTypes, verificationMethodType) => {
|
|
1073
|
+
verificationMethodTypes[verificationMethodType] = true;
|
|
1074
|
+
return verificationMethodTypes;
|
|
1075
|
+
}, {});
|
|
1076
|
+
this.twoFactorManageService.verificationMethods$
|
|
1077
|
+
.subscribe((verificationMethods) => {
|
|
1078
|
+
this.verificationMethods = verificationMethods;
|
|
1079
|
+
this._cdRef.markForCheck();
|
|
1080
|
+
});
|
|
1081
|
+
}
|
|
1082
|
+
get defaultSms() {
|
|
1083
|
+
return this.twoFactorManageService.smsVerificationMethods
|
|
1084
|
+
.some((verificationMethod) => {
|
|
1085
|
+
return verificationMethod.default;
|
|
1086
|
+
});
|
|
1087
|
+
}
|
|
1088
|
+
get defaultApp() {
|
|
1089
|
+
return this.twoFactorManageService.appVerificationMethods
|
|
1090
|
+
.some((verificationMethod) => {
|
|
1091
|
+
return verificationMethod.default;
|
|
1092
|
+
});
|
|
1093
|
+
}
|
|
1094
|
+
get defaultEmail() {
|
|
1095
|
+
return this.twoFactorManageService.emailVerificationMethods
|
|
1096
|
+
.some((verificationMethod) => {
|
|
1097
|
+
return verificationMethod.default;
|
|
1098
|
+
});
|
|
1099
|
+
}
|
|
1100
|
+
get textHasVerificationMethod() {
|
|
1101
|
+
return this.twoFactorManageService.hasVerificationMethod(VerificationMethodType.Sms);
|
|
1102
|
+
}
|
|
1103
|
+
get appHasVerificationMethod() {
|
|
1104
|
+
return this.twoFactorManageService.hasVerificationMethod(VerificationMethodType.App);
|
|
1105
|
+
}
|
|
1106
|
+
get emailHasVerificationMethod() {
|
|
1107
|
+
return this.twoFactorManageService.hasVerificationMethod(VerificationMethodType.Email);
|
|
1108
|
+
}
|
|
1109
|
+
textMessageManage() {
|
|
1110
|
+
this._dialog.open(NumbersComponent, {
|
|
1111
|
+
data: {
|
|
1112
|
+
twoFactorManageService: this.twoFactorManageService,
|
|
1113
|
+
defaultCountry: this._defaultCountry,
|
|
1114
|
+
},
|
|
1115
|
+
});
|
|
1116
|
+
}
|
|
1117
|
+
textMessageAdd() {
|
|
1118
|
+
this.twoFactorManageService.addSms$(this._defaultCountry)
|
|
1119
|
+
.subscribe();
|
|
1120
|
+
}
|
|
1121
|
+
emailMessageManage() {
|
|
1122
|
+
this._dialog.open(EmailsComponent, {
|
|
1123
|
+
data: {
|
|
1124
|
+
twoFactorManageService: this.twoFactorManageService,
|
|
1125
|
+
},
|
|
1126
|
+
});
|
|
1127
|
+
}
|
|
1128
|
+
emailMessageAdd() {
|
|
1129
|
+
this.twoFactorManageService.addEmail$()
|
|
1130
|
+
.subscribe();
|
|
1131
|
+
}
|
|
1132
|
+
appRemove() {
|
|
1133
|
+
const verificationMethod = this.verificationMethods
|
|
1134
|
+
.find((_verificationMethod) => {
|
|
1135
|
+
return _verificationMethod.type === VerificationMethodType.App;
|
|
1136
|
+
});
|
|
1137
|
+
if (verificationMethod) {
|
|
1138
|
+
this.twoFactorManageService.accountVerify$()
|
|
1139
|
+
.pipe(switchMap(() => this.twoFactorManageService.verificationMethodDelete$(verificationMethod)))
|
|
1140
|
+
.subscribe(() => {
|
|
1141
|
+
this._message.success('Removed App Authenticator verification method');
|
|
1142
|
+
this._cdRef.markForCheck();
|
|
1143
|
+
});
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
appAdd() {
|
|
1147
|
+
this.twoFactorManageService.addApp$()
|
|
1148
|
+
.subscribe();
|
|
1149
|
+
}
|
|
1150
|
+
ngOnDestroy() {
|
|
1151
|
+
this._destroy$.next();
|
|
1152
|
+
this._destroy$.complete();
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
ManageMethodsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ManageMethodsComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i0.ChangeDetectorRef }, { token: i1.MatDialog }, { token: i2$2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
|
|
1156
|
+
ManageMethodsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ManageMethodsComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog>\n <h1 mat-dialog-title>2-Step Verification</h1>\n <mat-dialog-content>\n <table>\n <tr *ngIf=\"verificationMethodTypes[VerificationMethodType.Sms]\">\n <td>\n <mat-icon>textsms</mat-icon>\n </td>\n <td>\n <div class=\"type\">\n <span>Text Message</span>\n <span *ngIf=\"textHasVerificationMethod\" class=\"enabled\"></span>\n <app-defaulted *ngIf=\"defaultSms\"></app-defaulted>\n </div>\n <div class=\"small\">\n Verification codes are sent by text message\n <ng-container *ngIf=\"textHasVerificationMethod\">\n to <span class=\"items\">\n <span *ngFor=\"let item of twoFactorManageService.smsVerificationMethods\">{{item.phoneNumber | fsPhone}}</span>\n </span>\n </ng-container>\n </div>\n </td>\n <td>\n <button \n *ngIf=\"textHasVerificationMethod; else textMessageManageButton\"\n mat-raised-button \n type=\"button\"\n (click)=\"textMessageManage()\">\n Manage\n </button>\n <ng-template #textMessageManageButton>\n <button \n mat-raised-button \n color=\"primary\"\n type=\"button\"\n (click)=\"textMessageAdd()\">\n Turn On\n </button>\n </ng-template>\n </td>\n </tr>\n <tr *ngIf=\"verificationMethodTypes[VerificationMethodType.Email]\">\n <td>\n <mat-icon>email</mat-icon>\n </td>\n <td>\n <div class=\"type\">\n <span>Email</span> \n <span *ngIf=\"emailHasVerificationMethod\" class=\"enabled\"></span>\n <app-defaulted *ngIf=\"defaultEmail\"></app-defaulted>\n </div>\n <div class=\"small\">\n Verification codes are sent by email\n <ng-container *ngIf=\"emailHasVerificationMethod\">\n to <span class=\"items\">\n <span *ngFor=\"let item of twoFactorManageService.emailVerificationMethods\">{{item.email}}</span>\n </span>\n </ng-container>\n </div>\n </td>\n <td>\n <button \n *ngIf=\"emailHasVerificationMethod; else emailMessageManageButton\"\n mat-raised-button \n type=\"button\"\n (click)=\"emailMessageManage()\">\n Manage\n </button>\n <ng-template #emailMessageManageButton>\n <button \n mat-raised-button \n color=\"primary\"\n type=\"button\"\n (click)=\"emailMessageAdd()\">\n Turn On\n </button>\n </ng-template>\n </td>\n </tr>\n <tr *ngIf=\"verificationMethodTypes[VerificationMethodType.App]\">\n <td>\n <mat-icon>phone_iphone</mat-icon>\n </td>\n <td>\n <div class=\"type\">\n <span>Authenticator App</span>\n <span *ngIf=\"appHasVerificationMethod\" class=\"enabled\"></span>\n <app-defaulted *ngIf=\"defaultApp\"></app-defaulted>\n </div>\n <div class=\"small\">Verification code is generated by an authenticator app such as Authy or Google Authenticator</div>\n </td>\n <td>\n <button \n *ngIf=\"appHasVerificationMethod; else appMessageManageButton\"\n mat-raised-button \n type=\"button\"\n (click)=\"appRemove()\">\n Remove\n </button>\n <ng-template #appMessageManageButton>\n <button \n mat-raised-button \n color=\"primary\"\n type=\"button\"\n (click)=\"appAdd()\">\n Turn On\n </button>\n </ng-template>\n </td>\n </tr> \n </table> \n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n type=\"button\"\n [mat-dialog-close]=\"undefined\">\n Close\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: ["mat-dialog-content{max-width:500px}.enabled{font-size:75%;background-color:#70b601;padding:2px 4px;border-radius:4px;color:#fff;margin-left:4px}.enabled:after{content:\"Enabled\"}table tr td:first-child,table tr td:last-child{width:1%}table tr td:first-child mat-icon,table tr td:last-child mat-icon{display:flex}table tr td{padding:6px;vertical-align:middle}table tr .type{display:flex;align-items:center}table tr .type app-defaulted{margin-left:4px}.items span+span:not(:last-child):before{content:\", \"}.items span+span:last-child:before{content:\" and \"}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i9.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout", "dock", "dockable", "fullscreenPercent"] }, { kind: "directive", type: i10.FsButtonDirective, selector: "[mat-raised-button]:not([fsFormButtonStandalone]),[mat-button]:not([fsFormButtonStandalone]),[mat-flat-button]:not([fsFormButtonStandalone]),[mat-stroked-button]:not([fsFormButtonStandalone])", inputs: ["name", "dirtySubmit", "form"] }, { kind: "component", type: DefaultedComponent, selector: "app-defaulted" }, { kind: "pipe", type: i8$2.FsPhonePipe, name: "fsPhone" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ManageMethodsComponent, decorators: [{
|
|
1158
|
+
type: Component,
|
|
1159
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<fs-dialog>\n <h1 mat-dialog-title>2-Step Verification</h1>\n <mat-dialog-content>\n <table>\n <tr *ngIf=\"verificationMethodTypes[VerificationMethodType.Sms]\">\n <td>\n <mat-icon>textsms</mat-icon>\n </td>\n <td>\n <div class=\"type\">\n <span>Text Message</span>\n <span *ngIf=\"textHasVerificationMethod\" class=\"enabled\"></span>\n <app-defaulted *ngIf=\"defaultSms\"></app-defaulted>\n </div>\n <div class=\"small\">\n Verification codes are sent by text message\n <ng-container *ngIf=\"textHasVerificationMethod\">\n to <span class=\"items\">\n <span *ngFor=\"let item of twoFactorManageService.smsVerificationMethods\">{{item.phoneNumber | fsPhone}}</span>\n </span>\n </ng-container>\n </div>\n </td>\n <td>\n <button \n *ngIf=\"textHasVerificationMethod; else textMessageManageButton\"\n mat-raised-button \n type=\"button\"\n (click)=\"textMessageManage()\">\n Manage\n </button>\n <ng-template #textMessageManageButton>\n <button \n mat-raised-button \n color=\"primary\"\n type=\"button\"\n (click)=\"textMessageAdd()\">\n Turn On\n </button>\n </ng-template>\n </td>\n </tr>\n <tr *ngIf=\"verificationMethodTypes[VerificationMethodType.Email]\">\n <td>\n <mat-icon>email</mat-icon>\n </td>\n <td>\n <div class=\"type\">\n <span>Email</span> \n <span *ngIf=\"emailHasVerificationMethod\" class=\"enabled\"></span>\n <app-defaulted *ngIf=\"defaultEmail\"></app-defaulted>\n </div>\n <div class=\"small\">\n Verification codes are sent by email\n <ng-container *ngIf=\"emailHasVerificationMethod\">\n to <span class=\"items\">\n <span *ngFor=\"let item of twoFactorManageService.emailVerificationMethods\">{{item.email}}</span>\n </span>\n </ng-container>\n </div>\n </td>\n <td>\n <button \n *ngIf=\"emailHasVerificationMethod; else emailMessageManageButton\"\n mat-raised-button \n type=\"button\"\n (click)=\"emailMessageManage()\">\n Manage\n </button>\n <ng-template #emailMessageManageButton>\n <button \n mat-raised-button \n color=\"primary\"\n type=\"button\"\n (click)=\"emailMessageAdd()\">\n Turn On\n </button>\n </ng-template>\n </td>\n </tr>\n <tr *ngIf=\"verificationMethodTypes[VerificationMethodType.App]\">\n <td>\n <mat-icon>phone_iphone</mat-icon>\n </td>\n <td>\n <div class=\"type\">\n <span>Authenticator App</span>\n <span *ngIf=\"appHasVerificationMethod\" class=\"enabled\"></span>\n <app-defaulted *ngIf=\"defaultApp\"></app-defaulted>\n </div>\n <div class=\"small\">Verification code is generated by an authenticator app such as Authy or Google Authenticator</div>\n </td>\n <td>\n <button \n *ngIf=\"appHasVerificationMethod; else appMessageManageButton\"\n mat-raised-button \n type=\"button\"\n (click)=\"appRemove()\">\n Remove\n </button>\n <ng-template #appMessageManageButton>\n <button \n mat-raised-button \n color=\"primary\"\n type=\"button\"\n (click)=\"appAdd()\">\n Turn On\n </button>\n </ng-template>\n </td>\n </tr> \n </table> \n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n type=\"button\"\n [mat-dialog-close]=\"undefined\">\n Close\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: ["mat-dialog-content{max-width:500px}.enabled{font-size:75%;background-color:#70b601;padding:2px 4px;border-radius:4px;color:#fff;margin-left:4px}.enabled:after{content:\"Enabled\"}table tr td:first-child,table tr td:last-child{width:1%}table tr td:first-child mat-icon,table tr td:last-child mat-icon{display:flex}table tr td{padding:6px;vertical-align:middle}table tr .type{display:flex;align-items:center}table tr .type app-defaulted{margin-left:4px}.items span+span:not(:last-child):before{content:\", \"}.items span+span:last-child:before{content:\" and \"}\n"] }]
|
|
1160
|
+
}], ctorParameters: function () {
|
|
1161
|
+
return [{ type: undefined, decorators: [{
|
|
1162
|
+
type: Inject,
|
|
1163
|
+
args: [MAT_DIALOG_DATA]
|
|
1164
|
+
}] }, { type: i0.ChangeDetectorRef }, { type: i1.MatDialog }, { type: i2$2.FsMessage }];
|
|
1165
1165
|
} });
|
|
1166
1166
|
|
|
1167
|
-
class Fs2faManageComponent {
|
|
1168
|
-
constructor(_cdRef, _dialog, _twoFactorManageService) {
|
|
1169
|
-
this._cdRef = _cdRef;
|
|
1170
|
-
this._dialog = _dialog;
|
|
1171
|
-
this._twoFactorManageService = _twoFactorManageService;
|
|
1172
|
-
this._destroy$ = new Subject();
|
|
1173
|
-
}
|
|
1174
|
-
ngOnInit() {
|
|
1175
|
-
this.verificationMethodTypes = this.verificationMethodTypes || [
|
|
1176
|
-
VerificationMethodType.Sms,
|
|
1177
|
-
VerificationMethodType.Email,
|
|
1178
|
-
VerificationMethodType.App
|
|
1179
|
-
];
|
|
1180
|
-
this._twoFactorManageService.registerVerificationMethodsFetch(this.verificationMethodsFetch);
|
|
1181
|
-
this._twoFactorManageService.registerVerificationMethodDelete(this.verificationMethodDelete);
|
|
1182
|
-
this._twoFactorManageService.registerVerificationMethodCreate(this.verificationMethodCreate);
|
|
1183
|
-
this._twoFactorManageService.registerVerificationMethodVerify(this.verificationMethodVerify);
|
|
1184
|
-
this._twoFactorManageService.registerVerificationMethodResend(this.verificationMethodResend);
|
|
1185
|
-
this._twoFactorManageService.registerVerificationMethodDefault(this.verificationMethodDefault);
|
|
1186
|
-
this._twoFactorManageService.registerAccountVerify(this.accountVerify);
|
|
1187
|
-
this._twoFactorManageService.verificationMethods$
|
|
1188
|
-
.subscribe((verificationMethods) => {
|
|
1189
|
-
const types = {
|
|
1190
|
-
sms: 'Text Message',
|
|
1191
|
-
email: 'Email',
|
|
1192
|
-
app: 'Authenticator App',
|
|
1193
|
-
};
|
|
1194
|
-
this.statuses = Object.keys(verificationMethods.reduce((accum, verificationMethod) => {
|
|
1195
|
-
accum[verificationMethod.type] = true;
|
|
1196
|
-
return accum;
|
|
1197
|
-
}, {}))
|
|
1198
|
-
.map((type) => {
|
|
1199
|
-
return types[type];
|
|
1200
|
-
});
|
|
1201
|
-
this._cdRef.markForCheck();
|
|
1202
|
-
});
|
|
1203
|
-
this._twoFactorManageService.verificationMethodsFetch();
|
|
1204
|
-
}
|
|
1205
|
-
manage() {
|
|
1206
|
-
const dialogRef = this._dialog.open(ManageMethodsComponent, {
|
|
1207
|
-
autoFocus: false,
|
|
1208
|
-
data: {
|
|
1209
|
-
defaultCountry: this.defaultCountry,
|
|
1210
|
-
twoFactorManageService: this._twoFactorManageService,
|
|
1211
|
-
verificationMethodTypes: this.verificationMethodTypes,
|
|
1212
|
-
},
|
|
1213
|
-
});
|
|
1214
|
-
dialogRef.afterClosed()
|
|
1215
|
-
.pipe(takeUntil(this._destroy$))
|
|
1216
|
-
.subscribe(() => {
|
|
1217
|
-
this._cdRef.markForCheck();
|
|
1218
|
-
});
|
|
1219
|
-
}
|
|
1220
|
-
reload() {
|
|
1221
|
-
this._twoFactorManageService.verificationMethodsFetch();
|
|
1222
|
-
}
|
|
1223
|
-
ngOnDestroy() {
|
|
1224
|
-
this._destroy$.next();
|
|
1225
|
-
this._destroy$.complete();
|
|
1226
|
-
}
|
|
1227
|
-
}
|
|
1228
|
-
Fs2faManageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faManageComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.MatDialog }, { token: TwoFactorManageService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1229
|
-
Fs2faManageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: Fs2faManageComponent, selector: "fs-2fa-manage", inputs: { accountVerify: "accountVerify", defaultCountry: "defaultCountry", verificationMethodTypes: "verificationMethodTypes", verificationMethodsFetch: "verificationMethodsFetch", verificationMethodDelete: "verificationMethodDelete", verificationMethodCreate: "verificationMethodCreate", verificationMethodDefault: "verificationMethodDefault", verificationMethodVerify: "verificationMethodVerify", verificationMethodResend: "verificationMethodResend" }, providers: [TwoFactorManageService], ngImport: i0, template: "<fs-label-field>\n <fs-label>Status</fs-label>\n <ng-container *ngIf=\"statuses\">\n <ng-container *ngIf=\"statuses.length === 1\">\n {{statuses[0]}} verification is enabled\n </ng-container>\n\n <ng-container *ngIf=\"statuses.length > 1\">\n {{statuses.join(', ')}} verifications are enabled\n </ng-container>\n\n <ng-container *ngIf=\"statuses.length === 0\">\n No verification methods are enabled\n </ng-container>\n </ng-container>\n</fs-label-field>", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$3.FsLabelComponent, selector: "fs-label" }, { kind: "component", type: i4$3.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1230
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faManageComponent, decorators: [{
|
|
1231
|
-
type: Component,
|
|
1232
|
-
args: [{ selector: 'fs-2fa-manage', changeDetection: ChangeDetectionStrategy.OnPush, providers: [TwoFactorManageService], template: "<fs-label-field>\n <fs-label>Status</fs-label>\n <ng-container *ngIf=\"statuses\">\n <ng-container *ngIf=\"statuses.length === 1\">\n {{statuses[0]}} verification is enabled\n </ng-container>\n\n <ng-container *ngIf=\"statuses.length > 1\">\n {{statuses.join(', ')}} verifications are enabled\n </ng-container>\n\n <ng-container *ngIf=\"statuses.length === 0\">\n No verification methods are enabled\n </ng-container>\n </ng-container>\n</fs-label-field>" }]
|
|
1233
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.MatDialog }, { type: TwoFactorManageService }]; }, propDecorators: { accountVerify: [{
|
|
1234
|
-
type: Input
|
|
1235
|
-
}], defaultCountry: [{
|
|
1236
|
-
type: Input
|
|
1237
|
-
}], verificationMethodTypes: [{
|
|
1238
|
-
type: Input
|
|
1239
|
-
}], verificationMethodsFetch: [{
|
|
1240
|
-
type: Input
|
|
1241
|
-
}], verificationMethodDelete: [{
|
|
1242
|
-
type: Input
|
|
1243
|
-
}], verificationMethodCreate: [{
|
|
1244
|
-
type: Input
|
|
1245
|
-
}], verificationMethodDefault: [{
|
|
1246
|
-
type: Input
|
|
1247
|
-
}], verificationMethodVerify: [{
|
|
1248
|
-
type: Input
|
|
1249
|
-
}], verificationMethodResend: [{
|
|
1250
|
-
type: Input
|
|
1167
|
+
class Fs2faManageComponent {
|
|
1168
|
+
constructor(_cdRef, _dialog, _twoFactorManageService) {
|
|
1169
|
+
this._cdRef = _cdRef;
|
|
1170
|
+
this._dialog = _dialog;
|
|
1171
|
+
this._twoFactorManageService = _twoFactorManageService;
|
|
1172
|
+
this._destroy$ = new Subject();
|
|
1173
|
+
}
|
|
1174
|
+
ngOnInit() {
|
|
1175
|
+
this.verificationMethodTypes = this.verificationMethodTypes || [
|
|
1176
|
+
VerificationMethodType.Sms,
|
|
1177
|
+
VerificationMethodType.Email,
|
|
1178
|
+
VerificationMethodType.App
|
|
1179
|
+
];
|
|
1180
|
+
this._twoFactorManageService.registerVerificationMethodsFetch(this.verificationMethodsFetch);
|
|
1181
|
+
this._twoFactorManageService.registerVerificationMethodDelete(this.verificationMethodDelete);
|
|
1182
|
+
this._twoFactorManageService.registerVerificationMethodCreate(this.verificationMethodCreate);
|
|
1183
|
+
this._twoFactorManageService.registerVerificationMethodVerify(this.verificationMethodVerify);
|
|
1184
|
+
this._twoFactorManageService.registerVerificationMethodResend(this.verificationMethodResend);
|
|
1185
|
+
this._twoFactorManageService.registerVerificationMethodDefault(this.verificationMethodDefault);
|
|
1186
|
+
this._twoFactorManageService.registerAccountVerify(this.accountVerify);
|
|
1187
|
+
this._twoFactorManageService.verificationMethods$
|
|
1188
|
+
.subscribe((verificationMethods) => {
|
|
1189
|
+
const types = {
|
|
1190
|
+
sms: 'Text Message',
|
|
1191
|
+
email: 'Email',
|
|
1192
|
+
app: 'Authenticator App',
|
|
1193
|
+
};
|
|
1194
|
+
this.statuses = Object.keys(verificationMethods.reduce((accum, verificationMethod) => {
|
|
1195
|
+
accum[verificationMethod.type] = true;
|
|
1196
|
+
return accum;
|
|
1197
|
+
}, {}))
|
|
1198
|
+
.map((type) => {
|
|
1199
|
+
return types[type];
|
|
1200
|
+
});
|
|
1201
|
+
this._cdRef.markForCheck();
|
|
1202
|
+
});
|
|
1203
|
+
this._twoFactorManageService.verificationMethodsFetch();
|
|
1204
|
+
}
|
|
1205
|
+
manage() {
|
|
1206
|
+
const dialogRef = this._dialog.open(ManageMethodsComponent, {
|
|
1207
|
+
autoFocus: false,
|
|
1208
|
+
data: {
|
|
1209
|
+
defaultCountry: this.defaultCountry,
|
|
1210
|
+
twoFactorManageService: this._twoFactorManageService,
|
|
1211
|
+
verificationMethodTypes: this.verificationMethodTypes,
|
|
1212
|
+
},
|
|
1213
|
+
});
|
|
1214
|
+
dialogRef.afterClosed()
|
|
1215
|
+
.pipe(takeUntil(this._destroy$))
|
|
1216
|
+
.subscribe(() => {
|
|
1217
|
+
this._cdRef.markForCheck();
|
|
1218
|
+
});
|
|
1219
|
+
}
|
|
1220
|
+
reload() {
|
|
1221
|
+
this._twoFactorManageService.verificationMethodsFetch();
|
|
1222
|
+
}
|
|
1223
|
+
ngOnDestroy() {
|
|
1224
|
+
this._destroy$.next();
|
|
1225
|
+
this._destroy$.complete();
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
Fs2faManageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faManageComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.MatDialog }, { token: TwoFactorManageService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1229
|
+
Fs2faManageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: Fs2faManageComponent, selector: "fs-2fa-manage", inputs: { accountVerify: "accountVerify", defaultCountry: "defaultCountry", verificationMethodTypes: "verificationMethodTypes", verificationMethodsFetch: "verificationMethodsFetch", verificationMethodDelete: "verificationMethodDelete", verificationMethodCreate: "verificationMethodCreate", verificationMethodDefault: "verificationMethodDefault", verificationMethodVerify: "verificationMethodVerify", verificationMethodResend: "verificationMethodResend" }, providers: [TwoFactorManageService], ngImport: i0, template: "<fs-label-field>\n <fs-label>Status</fs-label>\n <ng-container *ngIf=\"statuses\">\n <ng-container *ngIf=\"statuses.length === 1\">\n {{statuses[0]}} verification is enabled\n </ng-container>\n\n <ng-container *ngIf=\"statuses.length > 1\">\n {{statuses.join(', ')}} verifications are enabled\n </ng-container>\n\n <ng-container *ngIf=\"statuses.length === 0\">\n No verification methods are enabled\n </ng-container>\n </ng-container>\n</fs-label-field>", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$3.FsLabelComponent, selector: "fs-label" }, { kind: "component", type: i4$3.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1230
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faManageComponent, decorators: [{
|
|
1231
|
+
type: Component,
|
|
1232
|
+
args: [{ selector: 'fs-2fa-manage', changeDetection: ChangeDetectionStrategy.OnPush, providers: [TwoFactorManageService], template: "<fs-label-field>\n <fs-label>Status</fs-label>\n <ng-container *ngIf=\"statuses\">\n <ng-container *ngIf=\"statuses.length === 1\">\n {{statuses[0]}} verification is enabled\n </ng-container>\n\n <ng-container *ngIf=\"statuses.length > 1\">\n {{statuses.join(', ')}} verifications are enabled\n </ng-container>\n\n <ng-container *ngIf=\"statuses.length === 0\">\n No verification methods are enabled\n </ng-container>\n </ng-container>\n</fs-label-field>" }]
|
|
1233
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.MatDialog }, { type: TwoFactorManageService }]; }, propDecorators: { accountVerify: [{
|
|
1234
|
+
type: Input
|
|
1235
|
+
}], defaultCountry: [{
|
|
1236
|
+
type: Input
|
|
1237
|
+
}], verificationMethodTypes: [{
|
|
1238
|
+
type: Input
|
|
1239
|
+
}], verificationMethodsFetch: [{
|
|
1240
|
+
type: Input
|
|
1241
|
+
}], verificationMethodDelete: [{
|
|
1242
|
+
type: Input
|
|
1243
|
+
}], verificationMethodCreate: [{
|
|
1244
|
+
type: Input
|
|
1245
|
+
}], verificationMethodDefault: [{
|
|
1246
|
+
type: Input
|
|
1247
|
+
}], verificationMethodVerify: [{
|
|
1248
|
+
type: Input
|
|
1249
|
+
}], verificationMethodResend: [{
|
|
1250
|
+
type: Input
|
|
1251
1251
|
}] } });
|
|
1252
1252
|
|
|
1253
|
-
class Fs2faManageModule {
|
|
1254
|
-
}
|
|
1255
|
-
Fs2faManageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faManageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1256
|
-
Fs2faManageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: Fs2faManageModule, declarations: [Fs2faManageComponent,
|
|
1257
|
-
ManageMethodsComponent,
|
|
1258
|
-
NumbersComponent,
|
|
1259
|
-
AppComponent,
|
|
1260
|
-
EmailComponent,
|
|
1261
|
-
NumberComponent,
|
|
1262
|
-
EmailsComponent], imports: [CommonModule,
|
|
1263
|
-
FormsModule,
|
|
1264
|
-
MatButtonModule,
|
|
1265
|
-
MatDialogModule,
|
|
1266
|
-
MatInputModule,
|
|
1267
|
-
MatIconModule,
|
|
1268
|
-
MatCheckboxModule,
|
|
1269
|
-
FsDialogModule,
|
|
1270
|
-
FsListModule,
|
|
1271
|
-
FsFormModule,
|
|
1272
|
-
FsLabelModule,
|
|
1273
|
-
FsPhoneModule,
|
|
1274
|
-
FsSkeletonModule,
|
|
1275
|
-
FsCountryModule,
|
|
1276
|
-
FsQrcodeModule,
|
|
1277
|
-
CodeInputModule,
|
|
1278
|
-
ResendModule,
|
|
1279
|
-
DefautledModule,
|
|
1280
|
-
Fs2faVerificationModule,
|
|
1281
|
-
Fs2faVerificationMethodsModule], exports: [Fs2faManageComponent] });
|
|
1282
|
-
Fs2faManageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faManageModule, imports: [CommonModule,
|
|
1283
|
-
FormsModule,
|
|
1284
|
-
MatButtonModule,
|
|
1285
|
-
MatDialogModule,
|
|
1286
|
-
MatInputModule,
|
|
1287
|
-
MatIconModule,
|
|
1288
|
-
MatCheckboxModule,
|
|
1289
|
-
FsDialogModule,
|
|
1290
|
-
FsListModule,
|
|
1291
|
-
FsFormModule,
|
|
1292
|
-
FsLabelModule,
|
|
1293
|
-
FsPhoneModule,
|
|
1294
|
-
FsSkeletonModule,
|
|
1295
|
-
FsCountryModule,
|
|
1296
|
-
FsQrcodeModule,
|
|
1297
|
-
CodeInputModule,
|
|
1298
|
-
ResendModule,
|
|
1299
|
-
DefautledModule,
|
|
1300
|
-
Fs2faVerificationModule,
|
|
1301
|
-
Fs2faVerificationMethodsModule] });
|
|
1302
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faManageModule, decorators: [{
|
|
1303
|
-
type: NgModule,
|
|
1304
|
-
args: [{
|
|
1305
|
-
imports: [
|
|
1306
|
-
CommonModule,
|
|
1307
|
-
FormsModule,
|
|
1308
|
-
MatButtonModule,
|
|
1309
|
-
MatDialogModule,
|
|
1310
|
-
MatInputModule,
|
|
1311
|
-
MatIconModule,
|
|
1312
|
-
MatCheckboxModule,
|
|
1313
|
-
FsDialogModule,
|
|
1314
|
-
FsListModule,
|
|
1315
|
-
FsFormModule,
|
|
1316
|
-
FsLabelModule,
|
|
1317
|
-
FsPhoneModule,
|
|
1318
|
-
FsSkeletonModule,
|
|
1319
|
-
FsCountryModule,
|
|
1320
|
-
FsQrcodeModule,
|
|
1321
|
-
CodeInputModule,
|
|
1322
|
-
ResendModule,
|
|
1323
|
-
DefautledModule,
|
|
1324
|
-
Fs2faVerificationModule,
|
|
1325
|
-
Fs2faVerificationMethodsModule,
|
|
1326
|
-
],
|
|
1327
|
-
declarations: [
|
|
1328
|
-
Fs2faManageComponent,
|
|
1329
|
-
ManageMethodsComponent,
|
|
1330
|
-
NumbersComponent,
|
|
1331
|
-
AppComponent,
|
|
1332
|
-
EmailComponent,
|
|
1333
|
-
NumberComponent,
|
|
1334
|
-
EmailsComponent,
|
|
1335
|
-
],
|
|
1336
|
-
exports: [Fs2faManageComponent],
|
|
1337
|
-
}]
|
|
1253
|
+
class Fs2faManageModule {
|
|
1254
|
+
}
|
|
1255
|
+
Fs2faManageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faManageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1256
|
+
Fs2faManageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: Fs2faManageModule, declarations: [Fs2faManageComponent,
|
|
1257
|
+
ManageMethodsComponent,
|
|
1258
|
+
NumbersComponent,
|
|
1259
|
+
AppComponent,
|
|
1260
|
+
EmailComponent,
|
|
1261
|
+
NumberComponent,
|
|
1262
|
+
EmailsComponent], imports: [CommonModule,
|
|
1263
|
+
FormsModule,
|
|
1264
|
+
MatButtonModule,
|
|
1265
|
+
MatDialogModule,
|
|
1266
|
+
MatInputModule,
|
|
1267
|
+
MatIconModule,
|
|
1268
|
+
MatCheckboxModule,
|
|
1269
|
+
FsDialogModule,
|
|
1270
|
+
FsListModule,
|
|
1271
|
+
FsFormModule,
|
|
1272
|
+
FsLabelModule,
|
|
1273
|
+
FsPhoneModule,
|
|
1274
|
+
FsSkeletonModule,
|
|
1275
|
+
FsCountryModule,
|
|
1276
|
+
FsQrcodeModule,
|
|
1277
|
+
CodeInputModule,
|
|
1278
|
+
ResendModule,
|
|
1279
|
+
DefautledModule,
|
|
1280
|
+
Fs2faVerificationModule,
|
|
1281
|
+
Fs2faVerificationMethodsModule], exports: [Fs2faManageComponent] });
|
|
1282
|
+
Fs2faManageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faManageModule, imports: [CommonModule,
|
|
1283
|
+
FormsModule,
|
|
1284
|
+
MatButtonModule,
|
|
1285
|
+
MatDialogModule,
|
|
1286
|
+
MatInputModule,
|
|
1287
|
+
MatIconModule,
|
|
1288
|
+
MatCheckboxModule,
|
|
1289
|
+
FsDialogModule,
|
|
1290
|
+
FsListModule,
|
|
1291
|
+
FsFormModule,
|
|
1292
|
+
FsLabelModule,
|
|
1293
|
+
FsPhoneModule,
|
|
1294
|
+
FsSkeletonModule,
|
|
1295
|
+
FsCountryModule,
|
|
1296
|
+
FsQrcodeModule,
|
|
1297
|
+
CodeInputModule,
|
|
1298
|
+
ResendModule,
|
|
1299
|
+
DefautledModule,
|
|
1300
|
+
Fs2faVerificationModule,
|
|
1301
|
+
Fs2faVerificationMethodsModule] });
|
|
1302
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Fs2faManageModule, decorators: [{
|
|
1303
|
+
type: NgModule,
|
|
1304
|
+
args: [{
|
|
1305
|
+
imports: [
|
|
1306
|
+
CommonModule,
|
|
1307
|
+
FormsModule,
|
|
1308
|
+
MatButtonModule,
|
|
1309
|
+
MatDialogModule,
|
|
1310
|
+
MatInputModule,
|
|
1311
|
+
MatIconModule,
|
|
1312
|
+
MatCheckboxModule,
|
|
1313
|
+
FsDialogModule,
|
|
1314
|
+
FsListModule,
|
|
1315
|
+
FsFormModule,
|
|
1316
|
+
FsLabelModule,
|
|
1317
|
+
FsPhoneModule,
|
|
1318
|
+
FsSkeletonModule,
|
|
1319
|
+
FsCountryModule,
|
|
1320
|
+
FsQrcodeModule,
|
|
1321
|
+
CodeInputModule,
|
|
1322
|
+
ResendModule,
|
|
1323
|
+
DefautledModule,
|
|
1324
|
+
Fs2faVerificationModule,
|
|
1325
|
+
Fs2faVerificationMethodsModule,
|
|
1326
|
+
],
|
|
1327
|
+
declarations: [
|
|
1328
|
+
Fs2faManageComponent,
|
|
1329
|
+
ManageMethodsComponent,
|
|
1330
|
+
NumbersComponent,
|
|
1331
|
+
AppComponent,
|
|
1332
|
+
EmailComponent,
|
|
1333
|
+
NumberComponent,
|
|
1334
|
+
EmailsComponent,
|
|
1335
|
+
],
|
|
1336
|
+
exports: [Fs2faManageComponent],
|
|
1337
|
+
}]
|
|
1338
1338
|
}] });
|
|
1339
1339
|
|
|
1340
|
-
/**
|
|
1341
|
-
* Generated bundle index. Do not edit.
|
|
1340
|
+
/**
|
|
1341
|
+
* Generated bundle index. Do not edit.
|
|
1342
1342
|
*/
|
|
1343
1343
|
|
|
1344
1344
|
export { Fs2faManageComponent, Fs2faManageModule, Fs2faVerificationComponent, Fs2faVerificationMethodsModule, Fs2faVerificationModule, Fs2faVerificationResendDirective, VerificationMethodType, VerificationMethodsComponent };
|