@firestitch/2fa 12.1.2 → 12.1.3
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/modules/manage/components/manage-methods/manage-methods.component.d.ts +2 -1
- package/app/modules/manage/services/two-factor-manage.service.d.ts +3 -0
- package/bundles/firestitch-2fa.umd.js +43 -18
- package/bundles/firestitch-2fa.umd.js.map +1 -1
- package/esm2015/app/modules/manage/components/email/email.component.js +5 -3
- package/esm2015/app/modules/manage/components/manage-methods/manage-methods.component.js +17 -16
- package/esm2015/app/modules/manage/components/number/number.component.js +4 -2
- package/esm2015/app/modules/manage/services/two-factor-manage.service.js +11 -1
- package/fesm2015/firestitch-2fa.js +31 -18
- package/fesm2015/firestitch-2fa.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ChangeDetectorRef, OnInit, OnDestroy } from '@angular/core';
|
|
2
2
|
import { MatDialog } from '@angular/material/dialog';
|
|
3
|
+
import { TwoFactorManageService } from '../../services';
|
|
3
4
|
import { FsMessage } from '@firestitch/message';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class ManageMethodsComponent implements OnInit, OnDestroy {
|
|
@@ -7,10 +8,10 @@ export declare class ManageMethodsComponent implements OnInit, OnDestroy {
|
|
|
7
8
|
private _cdRef;
|
|
8
9
|
private _dialog;
|
|
9
10
|
private _message;
|
|
11
|
+
twoFactorManageService: TwoFactorManageService;
|
|
10
12
|
verificationMethods: any;
|
|
11
13
|
private _destroy$;
|
|
12
14
|
private _defaultCountry;
|
|
13
|
-
private _twoFactorManageService;
|
|
14
15
|
constructor(_data: any, _cdRef: ChangeDetectorRef, _dialog: MatDialog, _message: FsMessage);
|
|
15
16
|
ngOnInit(): void;
|
|
16
17
|
get defaultSms(): boolean;
|
|
@@ -16,6 +16,9 @@ export declare class TwoFactorManageService implements OnDestroy {
|
|
|
16
16
|
get verificationMethods$(): Observable<any[]>;
|
|
17
17
|
get verificationMethods(): any[];
|
|
18
18
|
get hasVerificationMethods(): boolean;
|
|
19
|
+
get emailVerificationMethods(): any[];
|
|
20
|
+
get smsVerificationMethods(): any[];
|
|
21
|
+
get appVerificationMethods(): any[];
|
|
19
22
|
getVerificationMethods(type: any): any[];
|
|
20
23
|
hasVerificationMethod(type: any): boolean;
|
|
21
24
|
registerVerificationMethodResend(value: any): void;
|
|
@@ -508,7 +508,9 @@
|
|
|
508
508
|
});
|
|
509
509
|
};
|
|
510
510
|
EmailComponent.prototype.codeCompleted = function () {
|
|
511
|
-
this.form.
|
|
511
|
+
if (!this.form.submitting) {
|
|
512
|
+
this.form.triggerSubmit();
|
|
513
|
+
}
|
|
512
514
|
};
|
|
513
515
|
EmailComponent.prototype.codeChanged = function (code) {
|
|
514
516
|
this.code = code;
|
|
@@ -516,7 +518,7 @@
|
|
|
516
518
|
return EmailComponent;
|
|
517
519
|
}());
|
|
518
520
|
EmailComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EmailComponent, deps: [{ token: i1.MAT_DIALOG_DATA }, { token: i1__namespace.MatDialogRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i2__namespace.FsMessage }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
519
|
-
EmailComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: EmailComponent, selector: "ng-component", viewQueries: [{ propertyName: "form", first: true, predicate: i9.FsFormDirective, descendants: true }], ngImport: i0__namespace, 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 <p>The app just sent you an email with a verification code.</p>\n \n <app-code-input \n [code]=\"code\"\n (codeChanged)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted()\">\n </app-code-input> \n\n <div>Did't get the code? <a (click)=\"resend()\">Resend Code</a></div>\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 name=\"email\">\n </mat-form-field>\n <mat-checkbox \n name=\"default\"\n [(ngModel)]=\"default\"\n [disableRipple]=\"true\">\n Make this the default 2-step 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}mat-form-field{width:100%}mat-dialog-content{width:400px}p{margin-top:0}app-code-input{margin-bottom:10px;display:block}\n"], components: [{ type: i3__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: CodeInputComponent, selector: "app-code-input", inputs: ["codeLength", "code"], outputs: ["codeCompleted", "codeChanged"] }, { type: i5__namespace$1.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i3__namespace$2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i7__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i8__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i8__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9__namespace.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "successDelay", "errorDelay", "submit", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.MatLabel, selector: "mat-label" }, { type: i11__namespace.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i8__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i8__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i8__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9__namespace.ɵf, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i9__namespace.ɵw, selector: "button[type=\"submit\"]", inputs: ["dirtySubmit", "name"] }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
521
|
+
EmailComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: EmailComponent, selector: "ng-component", viewQueries: [{ propertyName: "form", first: true, predicate: i9.FsFormDirective, descendants: true }], ngImport: i0__namespace, 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 <p>The app just sent you an email with a verification code.</p>\n \n <app-code-input \n [code]=\"code\"\n (codeChanged)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted()\">\n </app-code-input> \n\n <div>Did't get the code? <a (click)=\"resend()\">Resend Code</a></div>\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 2-step 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}mat-form-field{width:100%}mat-dialog-content{width:400px}p{margin-top:0}app-code-input{margin-bottom:10px;display:block}\n"], components: [{ type: i3__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: CodeInputComponent, selector: "app-code-input", inputs: ["codeLength", "code"], outputs: ["codeCompleted", "codeChanged"] }, { type: i5__namespace$1.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i3__namespace$2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i7__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i8__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i8__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9__namespace.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "successDelay", "errorDelay", "submit", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.MatLabel, selector: "mat-label" }, { type: i11__namespace.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i8__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i8__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i8__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9__namespace.ɵf, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i9__namespace.ɵk, selector: "[fsFormEmail]", inputs: ["fsFormEmailMessage", "fsFormEmail"] }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i9__namespace.ɵw, selector: "button[type=\"submit\"]", inputs: ["dirtySubmit", "name"] }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
520
522
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EmailComponent, decorators: [{
|
|
521
523
|
type: i0.Component,
|
|
522
524
|
args: [{
|
|
@@ -576,7 +578,9 @@
|
|
|
576
578
|
});
|
|
577
579
|
};
|
|
578
580
|
NumberComponent.prototype.codeCompleted = function () {
|
|
579
|
-
this.form.
|
|
581
|
+
if (!this.form.submitting) {
|
|
582
|
+
this.form.triggerSubmit();
|
|
583
|
+
}
|
|
580
584
|
};
|
|
581
585
|
NumberComponent.prototype.codeChanged = function (code) {
|
|
582
586
|
this.code = code;
|
|
@@ -630,6 +634,27 @@
|
|
|
630
634
|
enumerable: false,
|
|
631
635
|
configurable: true
|
|
632
636
|
});
|
|
637
|
+
Object.defineProperty(TwoFactorManageService.prototype, "emailVerificationMethods", {
|
|
638
|
+
get: function () {
|
|
639
|
+
return this.getVerificationMethods(exports.FsVerificationMethodType.Email);
|
|
640
|
+
},
|
|
641
|
+
enumerable: false,
|
|
642
|
+
configurable: true
|
|
643
|
+
});
|
|
644
|
+
Object.defineProperty(TwoFactorManageService.prototype, "smsVerificationMethods", {
|
|
645
|
+
get: function () {
|
|
646
|
+
return this.getVerificationMethods(exports.FsVerificationMethodType.Sms);
|
|
647
|
+
},
|
|
648
|
+
enumerable: false,
|
|
649
|
+
configurable: true
|
|
650
|
+
});
|
|
651
|
+
Object.defineProperty(TwoFactorManageService.prototype, "appVerificationMethods", {
|
|
652
|
+
get: function () {
|
|
653
|
+
return this.getVerificationMethods(exports.FsVerificationMethodType.App);
|
|
654
|
+
},
|
|
655
|
+
enumerable: false,
|
|
656
|
+
configurable: true
|
|
657
|
+
});
|
|
633
658
|
TwoFactorManageService.prototype.getVerificationMethods = function (type) {
|
|
634
659
|
return this.verificationMethods
|
|
635
660
|
.filter(function (verificationMethod) {
|
|
@@ -890,8 +915,8 @@
|
|
|
890
915
|
ManageMethodsComponent.prototype.ngOnInit = function () {
|
|
891
916
|
var _this = this;
|
|
892
917
|
this._defaultCountry = this._data.defaultCountry;
|
|
893
|
-
this.
|
|
894
|
-
this.
|
|
918
|
+
this.twoFactorManageService = this._data.twoFactorManageService;
|
|
919
|
+
this.twoFactorManageService.verificationMethods$
|
|
895
920
|
.subscribe(function (verificationMethods) {
|
|
896
921
|
_this.verificationMethods = verificationMethods;
|
|
897
922
|
_this._cdRef.markForCheck();
|
|
@@ -899,7 +924,7 @@
|
|
|
899
924
|
};
|
|
900
925
|
Object.defineProperty(ManageMethodsComponent.prototype, "defaultSms", {
|
|
901
926
|
get: function () {
|
|
902
|
-
return this.
|
|
927
|
+
return this.twoFactorManageService.smsVerificationMethods
|
|
903
928
|
.some(function (verificationMethod) {
|
|
904
929
|
return verificationMethod.default;
|
|
905
930
|
});
|
|
@@ -909,7 +934,7 @@
|
|
|
909
934
|
});
|
|
910
935
|
Object.defineProperty(ManageMethodsComponent.prototype, "defaultApp", {
|
|
911
936
|
get: function () {
|
|
912
|
-
return this.
|
|
937
|
+
return this.twoFactorManageService.appVerificationMethods
|
|
913
938
|
.some(function (verificationMethod) {
|
|
914
939
|
return verificationMethod.default;
|
|
915
940
|
});
|
|
@@ -919,7 +944,7 @@
|
|
|
919
944
|
});
|
|
920
945
|
Object.defineProperty(ManageMethodsComponent.prototype, "defaultEmail", {
|
|
921
946
|
get: function () {
|
|
922
|
-
return this.
|
|
947
|
+
return this.twoFactorManageService.emailVerificationMethods
|
|
923
948
|
.some(function (verificationMethod) {
|
|
924
949
|
return verificationMethod.default;
|
|
925
950
|
});
|
|
@@ -929,21 +954,21 @@
|
|
|
929
954
|
});
|
|
930
955
|
Object.defineProperty(ManageMethodsComponent.prototype, "textHasVerificationMethod", {
|
|
931
956
|
get: function () {
|
|
932
|
-
return this.
|
|
957
|
+
return this.twoFactorManageService.hasVerificationMethod(exports.FsVerificationMethodType.Sms);
|
|
933
958
|
},
|
|
934
959
|
enumerable: false,
|
|
935
960
|
configurable: true
|
|
936
961
|
});
|
|
937
962
|
Object.defineProperty(ManageMethodsComponent.prototype, "appHasVerificationMethod", {
|
|
938
963
|
get: function () {
|
|
939
|
-
return this.
|
|
964
|
+
return this.twoFactorManageService.hasVerificationMethod(exports.FsVerificationMethodType.App);
|
|
940
965
|
},
|
|
941
966
|
enumerable: false,
|
|
942
967
|
configurable: true
|
|
943
968
|
});
|
|
944
969
|
Object.defineProperty(ManageMethodsComponent.prototype, "emailHasVerificationMethod", {
|
|
945
970
|
get: function () {
|
|
946
|
-
return this.
|
|
971
|
+
return this.twoFactorManageService.hasVerificationMethod(exports.FsVerificationMethodType.Email);
|
|
947
972
|
},
|
|
948
973
|
enumerable: false,
|
|
949
974
|
configurable: true
|
|
@@ -951,24 +976,24 @@
|
|
|
951
976
|
ManageMethodsComponent.prototype.textMessageManage = function () {
|
|
952
977
|
this._dialog.open(NumbersComponent, {
|
|
953
978
|
data: {
|
|
954
|
-
twoFactorManageService: this.
|
|
979
|
+
twoFactorManageService: this.twoFactorManageService,
|
|
955
980
|
defaultCountry: this._defaultCountry,
|
|
956
981
|
},
|
|
957
982
|
});
|
|
958
983
|
};
|
|
959
984
|
ManageMethodsComponent.prototype.textMessageAdd = function () {
|
|
960
|
-
this.
|
|
985
|
+
this.twoFactorManageService.addSms(this._defaultCountry)
|
|
961
986
|
.subscribe();
|
|
962
987
|
};
|
|
963
988
|
ManageMethodsComponent.prototype.emailMessageManage = function () {
|
|
964
989
|
this._dialog.open(EmailsComponent, {
|
|
965
990
|
data: {
|
|
966
|
-
twoFactorManageService: this.
|
|
991
|
+
twoFactorManageService: this.twoFactorManageService,
|
|
967
992
|
},
|
|
968
993
|
});
|
|
969
994
|
};
|
|
970
995
|
ManageMethodsComponent.prototype.emailMessageAdd = function () {
|
|
971
|
-
this.
|
|
996
|
+
this.twoFactorManageService.addEmail()
|
|
972
997
|
.subscribe();
|
|
973
998
|
};
|
|
974
999
|
ManageMethodsComponent.prototype.appRemove = function () {
|
|
@@ -979,14 +1004,14 @@
|
|
|
979
1004
|
return _verificationMethod.type === exports.FsVerificationMethodType.App;
|
|
980
1005
|
});
|
|
981
1006
|
if (verificationMethod) {
|
|
982
|
-
this.
|
|
1007
|
+
this.twoFactorManageService.verificationMethodDelete(verificationMethod)
|
|
983
1008
|
.subscribe(function () {
|
|
984
1009
|
_this._cdRef.markForCheck();
|
|
985
1010
|
});
|
|
986
1011
|
}
|
|
987
1012
|
};
|
|
988
1013
|
ManageMethodsComponent.prototype.appAdd = function () {
|
|
989
|
-
this.
|
|
1014
|
+
this.twoFactorManageService.addApp()
|
|
990
1015
|
.subscribe();
|
|
991
1016
|
};
|
|
992
1017
|
ManageMethodsComponent.prototype.ngOnDestroy = function () {
|
|
@@ -996,7 +1021,7 @@
|
|
|
996
1021
|
return ManageMethodsComponent;
|
|
997
1022
|
}());
|
|
998
1023
|
ManageMethodsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ManageMethodsComponent, deps: [{ token: i1.MAT_DIALOG_DATA }, { token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace.MatDialog }, { token: i2__namespace.FsMessage }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
999
|
-
ManageMethodsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ManageMethodsComponent, selector: "ng-component", ngImport: i0__namespace, template: "<fs-dialog>\n <h1 mat-dialog-title>2-Step Verification</h1>\n <mat-dialog-content>\n <table>\n <tr>\n <td>\n <mat-icon>textsms</mat-icon>\n </td>\n <td>\n <div class=\"type\">\n <span>Text Message</span>\n <app-defaulted *ngIf=\"defaultSms\"></app-defaulted>\n </div>\n <div class=\"small\"
|
|
1024
|
+
ManageMethodsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ManageMethodsComponent, selector: "ng-component", ngImport: i0__namespace, template: "<fs-dialog>\n <h1 mat-dialog-title>2-Step Verification</h1>\n <mat-dialog-content>\n <table>\n <tr>\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>\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>\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"], components: [{ type: i3__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i4__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: DefaultedComponent, selector: "app-defaulted" }, { type: i7__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "fsPhone": i6__namespace.FsPhonePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1000
1025
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ManageMethodsComponent, decorators: [{
|
|
1001
1026
|
type: i0.Component,
|
|
1002
1027
|
args: [{
|