@firestitch/2fa 12.8.4 → 12.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/enums/index.d.ts +1 -0
- package/app/interfaces/index.d.ts +1 -0
- package/app/modules/manage/components/2fa-manage/2fa-manage.component.d.ts +4 -3
- package/app/modules/manage/components/emails/emails.component.d.ts +2 -0
- package/app/modules/manage/components/numbers/numbers.component.d.ts +2 -0
- package/app/modules/manage/fs-2f-manage.module.d.ts +23 -23
- package/app/modules/manage/services/two-factor-manage.service.d.ts +14 -10
- package/app/modules/{manage → verification-methods}/components/verification-methods/index.d.ts +0 -0
- package/app/modules/verification-methods/components/verification-methods/verification-methods.component.d.ts +10 -5
- package/app/modules/verification-methods/index.d.ts +1 -0
- package/bundles/firestitch-2fa.umd.js +190 -165
- package/bundles/firestitch-2fa.umd.js.map +1 -1
- package/esm2015/app/enums/index.js +2 -0
- package/esm2015/app/interfaces/index.js +2 -0
- package/esm2015/app/modules/manage/components/2fa-manage/2fa-manage.component.js +9 -6
- package/esm2015/app/modules/manage/components/app/app.component.js +3 -3
- package/esm2015/app/modules/manage/components/email/email.component.js +3 -3
- package/esm2015/app/modules/manage/components/emails/emails.component.js +13 -7
- package/esm2015/app/modules/manage/components/manage-methods/manage-methods.component.js +6 -6
- package/esm2015/app/modules/manage/components/number/number.component.js +3 -3
- package/esm2015/app/modules/manage/components/numbers/numbers.component.js +13 -7
- package/esm2015/app/modules/manage/fs-2f-manage.module.js +6 -5
- package/esm2015/app/modules/manage/services/two-factor-manage.service.js +33 -23
- package/esm2015/app/modules/verification-methods/components/verification-methods/index.js +2 -0
- package/esm2015/app/modules/verification-methods/components/verification-methods/verification-methods.component.js +60 -5
- package/esm2015/app/modules/verification-methods/index.js +2 -0
- package/esm2015/public_api.js +2 -2
- package/fesm2015/firestitch-2fa.js +179 -154
- package/fesm2015/firestitch-2fa.js.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +2 -2
- package/app/modules/manage/components/verification-methods/verification-methods.component.d.ts +0 -20
- package/esm2015/app/modules/manage/components/verification-methods/index.js +0 -2
- package/esm2015/app/modules/manage/components/verification-methods/verification-methods.component.js +0 -65
|
@@ -36,10 +36,10 @@ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
|
36
36
|
import * as i6$2 from '@firestitch/phone';
|
|
37
37
|
import { FsPhoneModule } from '@firestitch/phone';
|
|
38
38
|
import * as i2$1 from '@firestitch/list';
|
|
39
|
-
import {
|
|
40
|
-
import * as i3$
|
|
39
|
+
import { FsListComponent, FsListModule } from '@firestitch/list';
|
|
40
|
+
import * as i3$2 from '@firestitch/label';
|
|
41
41
|
import { FsLabelModule } from '@firestitch/label';
|
|
42
|
-
import * as
|
|
42
|
+
import * as i4$2 from '@firestitch/country';
|
|
43
43
|
import { FsCountryModule } from '@firestitch/country';
|
|
44
44
|
import * as i4$1 from 'ng-qrcode';
|
|
45
45
|
import { QrCodeModule } from 'ng-qrcode';
|
|
@@ -484,7 +484,7 @@ class AppComponent {
|
|
|
484
484
|
this.mode = 'qr-code';
|
|
485
485
|
this.trustDevice = true;
|
|
486
486
|
this.verify = () => {
|
|
487
|
-
return this.twoFactorManageService.verificationMethodVerify(this.code, this.trustDevice)
|
|
487
|
+
return this.twoFactorManageService.verificationMethodVerify$(this.code, this.trustDevice)
|
|
488
488
|
.pipe(tap(() => {
|
|
489
489
|
this._message.success('Created app authenticator verification method');
|
|
490
490
|
this._dialogRef.close(true);
|
|
@@ -504,7 +504,7 @@ class AppComponent {
|
|
|
504
504
|
}
|
|
505
505
|
appTypeSelect(appType) {
|
|
506
506
|
this.appType = appType;
|
|
507
|
-
this.twoFactorManageService.verificationMethodCreate({
|
|
507
|
+
this.twoFactorManageService.verificationMethodCreate$({
|
|
508
508
|
type: VerificationMethodType.App,
|
|
509
509
|
default: this.default,
|
|
510
510
|
})
|
|
@@ -559,12 +559,12 @@ class EmailComponent {
|
|
|
559
559
|
return of(true)
|
|
560
560
|
.pipe(switchMap(() => {
|
|
561
561
|
return this.verificationMethod ?
|
|
562
|
-
this.twoFactorManageService.verificationMethodVerify(this.code, this.trustDevice)
|
|
562
|
+
this.twoFactorManageService.verificationMethodVerify$(this.code, this.trustDevice)
|
|
563
563
|
.pipe(tap((verificationMethod) => {
|
|
564
564
|
this._message.success('Created email verification method');
|
|
565
565
|
this._dialogRef.close(verificationMethod);
|
|
566
566
|
})) :
|
|
567
|
-
this.twoFactorManageService.verificationMethodCreate({
|
|
567
|
+
this.twoFactorManageService.verificationMethodCreate$({
|
|
568
568
|
type: VerificationMethodType.Email,
|
|
569
569
|
email: this.email,
|
|
570
570
|
default: this.default,
|
|
@@ -623,12 +623,12 @@ class NumberComponent {
|
|
|
623
623
|
return of(true)
|
|
624
624
|
.pipe(switchMap(() => {
|
|
625
625
|
return this.verificationMethod ?
|
|
626
|
-
this.twoFactorManageService.verificationMethodVerify(this.code, this.trustDevice)
|
|
626
|
+
this.twoFactorManageService.verificationMethodVerify$(this.code, this.trustDevice)
|
|
627
627
|
.pipe(tap((verificationMethod) => {
|
|
628
628
|
this._message.success('Created text message verification method');
|
|
629
629
|
this._dialogRef.close(verificationMethod);
|
|
630
630
|
})) :
|
|
631
|
-
this.twoFactorManageService.verificationMethodCreate({
|
|
631
|
+
this.twoFactorManageService.verificationMethodCreate$({
|
|
632
632
|
type: VerificationMethodType.Sms,
|
|
633
633
|
phoneNumber: this.phone.number,
|
|
634
634
|
phoneCode: this.phone.countryCode,
|
|
@@ -709,11 +709,14 @@ class TwoFactorManageService {
|
|
|
709
709
|
return verificationMethod.type === type;
|
|
710
710
|
});
|
|
711
711
|
}
|
|
712
|
+
registerVerificationMethodDefault(value) {
|
|
713
|
+
this._verificationMethodDefault = value;
|
|
714
|
+
}
|
|
712
715
|
registerVerificationMethodResend(value) {
|
|
713
716
|
this._verificationMethodResend = value;
|
|
714
717
|
}
|
|
715
|
-
|
|
716
|
-
this.
|
|
718
|
+
registerVerificationMethodsFetch(value) {
|
|
719
|
+
this._verificationMethodsFetch = value;
|
|
717
720
|
}
|
|
718
721
|
registerVerificationMethodDelete(value) {
|
|
719
722
|
this._verificationMethodDelete = value;
|
|
@@ -727,39 +730,46 @@ class TwoFactorManageService {
|
|
|
727
730
|
registerAccountVerify(value) {
|
|
728
731
|
this._accountVerify = value;
|
|
729
732
|
}
|
|
730
|
-
verificationMethodDelete(verificationMethod) {
|
|
733
|
+
verificationMethodDelete$(verificationMethod) {
|
|
731
734
|
return this._verificationMethodDelete(verificationMethod)
|
|
732
735
|
.pipe(tap(() => {
|
|
733
|
-
this.
|
|
736
|
+
this.verificationMethodsFetch();
|
|
734
737
|
}));
|
|
735
738
|
}
|
|
736
|
-
verificationMethodVerify(code, trustDevice) {
|
|
739
|
+
verificationMethodVerify$(code, trustDevice) {
|
|
737
740
|
return this._verificationMethodVerify(code, trustDevice)
|
|
738
741
|
.pipe(tap(() => {
|
|
739
|
-
this.
|
|
742
|
+
this.verificationMethodsFetch();
|
|
740
743
|
}));
|
|
741
744
|
}
|
|
742
|
-
verificationMethodCreate(verificationMethod) {
|
|
745
|
+
verificationMethodCreate$(verificationMethod) {
|
|
743
746
|
return this._verificationMethodCreate(verificationMethod);
|
|
744
747
|
}
|
|
748
|
+
verificationMethodDefault$(verificationMethod) {
|
|
749
|
+
return this._verificationMethodDefault(verificationMethod);
|
|
750
|
+
}
|
|
745
751
|
verificationMethodResend() {
|
|
746
752
|
return this._verificationMethodResend();
|
|
747
753
|
}
|
|
748
|
-
|
|
749
|
-
this.
|
|
750
|
-
.subscribe(
|
|
754
|
+
verificationMethodsFetch(query) {
|
|
755
|
+
this.verificationMethodsFetch$(query)
|
|
756
|
+
.subscribe();
|
|
757
|
+
}
|
|
758
|
+
verificationMethodsFetch$(query) {
|
|
759
|
+
return this._verificationMethodsFetch(query)
|
|
760
|
+
.pipe(tap((verificationMethods) => {
|
|
751
761
|
this._verificationMethods$.next(verificationMethods);
|
|
752
|
-
});
|
|
762
|
+
}));
|
|
753
763
|
}
|
|
754
|
-
accountVerify() {
|
|
764
|
+
accountVerify$() {
|
|
755
765
|
return this._accountVerify ? this._accountVerify() : of(true);
|
|
756
766
|
}
|
|
757
767
|
ngOnDestroy() {
|
|
758
768
|
this._destroy$.next();
|
|
759
769
|
this._destroy$.complete();
|
|
760
770
|
}
|
|
761
|
-
addSms(defaultCountry) {
|
|
762
|
-
return this.accountVerify()
|
|
771
|
+
addSms$(defaultCountry) {
|
|
772
|
+
return this.accountVerify$()
|
|
763
773
|
.pipe(switchMap(() => this._dialog.open(NumberComponent, {
|
|
764
774
|
data: {
|
|
765
775
|
defaultCountry,
|
|
@@ -767,25 +777,25 @@ class TwoFactorManageService {
|
|
|
767
777
|
},
|
|
768
778
|
})
|
|
769
779
|
.afterClosed()), tap(() => {
|
|
770
|
-
this.
|
|
780
|
+
this.verificationMethodsFetch();
|
|
771
781
|
}), takeUntil(this._destroy$));
|
|
772
782
|
}
|
|
773
|
-
addEmail() {
|
|
774
|
-
return this.accountVerify()
|
|
783
|
+
addEmail$() {
|
|
784
|
+
return this.accountVerify$()
|
|
775
785
|
.pipe(switchMap(() => this._dialog.open(EmailComponent, {
|
|
776
786
|
data: { twoFactorManageService: this },
|
|
777
787
|
})
|
|
778
788
|
.afterClosed()), tap(() => {
|
|
779
|
-
this.
|
|
789
|
+
this.verificationMethodsFetch();
|
|
780
790
|
}), takeUntil(this._destroy$));
|
|
781
791
|
}
|
|
782
|
-
addApp() {
|
|
783
|
-
return this.accountVerify()
|
|
792
|
+
addApp$() {
|
|
793
|
+
return this.accountVerify$()
|
|
784
794
|
.pipe(switchMap(() => this._dialog.open(AppComponent, {
|
|
785
795
|
data: { twoFactorManageService: this },
|
|
786
796
|
})
|
|
787
797
|
.afterClosed()), tap(() => {
|
|
788
|
-
this.
|
|
798
|
+
this.verificationMethodsFetch();
|
|
789
799
|
}), takeUntil(this._destroy$));
|
|
790
800
|
}
|
|
791
801
|
}
|
|
@@ -809,55 +819,109 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
809
819
|
}]
|
|
810
820
|
}] });
|
|
811
821
|
|
|
812
|
-
class VerificationMethodsComponent
|
|
822
|
+
class VerificationMethodsComponent {
|
|
813
823
|
constructor(_prompt) {
|
|
814
824
|
this._prompt = _prompt;
|
|
815
825
|
this.deleted = new EventEmitter();
|
|
816
826
|
this.VerificationMethodType = VerificationMethodType;
|
|
817
827
|
}
|
|
818
828
|
ngOnInit() {
|
|
829
|
+
var _a, _b, _c, _d;
|
|
830
|
+
if (!this.verificationMethodDefault && ((_a = this.twoFactorManageService) === null || _a === void 0 ? void 0 : _a.verificationMethodDefault$)) {
|
|
831
|
+
this.verificationMethodDefault = (verificationMethod) => {
|
|
832
|
+
return this.twoFactorManageService.verificationMethodDefault$(verificationMethod);
|
|
833
|
+
};
|
|
834
|
+
}
|
|
835
|
+
if (!this.verificationMethodDelete && ((_b = this.twoFactorManageService) === null || _b === void 0 ? void 0 : _b.verificationMethodDelete$)) {
|
|
836
|
+
this.verificationMethodDelete = (verificationMethod) => {
|
|
837
|
+
return this.twoFactorManageService.verificationMethodDelete$(verificationMethod);
|
|
838
|
+
};
|
|
839
|
+
}
|
|
840
|
+
if (!this.verificationMethodsFetch && ((_c = this.twoFactorManageService) === null || _c === void 0 ? void 0 : _c.verificationMethodsFetch$)) {
|
|
841
|
+
this.verificationMethodsFetch = (query) => {
|
|
842
|
+
return this.twoFactorManageService.verificationMethodsFetch$(query);
|
|
843
|
+
};
|
|
844
|
+
}
|
|
845
|
+
if (!this.accountVerify && ((_d = this.twoFactorManageService) === null || _d === void 0 ? void 0 : _d.accountVerify$)) {
|
|
846
|
+
this.accountVerify = () => {
|
|
847
|
+
var _a;
|
|
848
|
+
return (_a = this.twoFactorManageService) === null || _a === void 0 ? void 0 : _a.accountVerify$();
|
|
849
|
+
};
|
|
850
|
+
}
|
|
819
851
|
this.listConfig = {
|
|
852
|
+
paging: false,
|
|
820
853
|
rowActions: [
|
|
854
|
+
{
|
|
855
|
+
click: (verificationMethod) => {
|
|
856
|
+
this.accountVerify()
|
|
857
|
+
.pipe(switchMap(() => this.verificationMethodDefault(verificationMethod)))
|
|
858
|
+
.subscribe(() => {
|
|
859
|
+
this.list.reload();
|
|
860
|
+
});
|
|
861
|
+
},
|
|
862
|
+
show: () => {
|
|
863
|
+
return !!this.verificationMethodDefault;
|
|
864
|
+
},
|
|
865
|
+
label: 'Set as Default',
|
|
866
|
+
},
|
|
821
867
|
{
|
|
822
868
|
click: (verificationMethod) => {
|
|
823
869
|
this._prompt.confirm({
|
|
824
870
|
title: 'Confirm',
|
|
825
871
|
template: 'Would you like to delete this verification method?',
|
|
826
872
|
})
|
|
827
|
-
.pipe(switchMap(() => this.
|
|
828
|
-
.verificationMethodDelete(verificationMethod)))
|
|
873
|
+
.pipe(switchMap(() => this.accountVerify()), switchMap(() => this.verificationMethodDelete(verificationMethod)))
|
|
829
874
|
.subscribe(() => {
|
|
830
|
-
this.deleted.emit(
|
|
875
|
+
this.deleted.emit();
|
|
876
|
+
this.list.reload();
|
|
831
877
|
});
|
|
832
878
|
},
|
|
879
|
+
show: () => {
|
|
880
|
+
return !!this.verificationMethodDelete;
|
|
881
|
+
},
|
|
833
882
|
label: 'Delete',
|
|
834
883
|
},
|
|
835
884
|
],
|
|
836
|
-
fetch: () => {
|
|
837
|
-
|
|
885
|
+
fetch: (query) => {
|
|
886
|
+
query = Object.assign(Object.assign({}, query), { type: this.type });
|
|
887
|
+
return this.verificationMethodsFetch(query)
|
|
838
888
|
.pipe(map((verificationMethods) => ({
|
|
839
889
|
data: verificationMethods.filter((verificationMethod) => {
|
|
840
|
-
return verificationMethod.type === this.type;
|
|
890
|
+
return !this.type || verificationMethod.type === this.type;
|
|
841
891
|
}),
|
|
842
892
|
})));
|
|
843
893
|
},
|
|
844
894
|
};
|
|
845
895
|
}
|
|
896
|
+
reload() {
|
|
897
|
+
this.list.reload();
|
|
898
|
+
}
|
|
846
899
|
}
|
|
847
|
-
VerificationMethodsComponent
|
|
848
|
-
VerificationMethodsComponent
|
|
849
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: VerificationMethodsComponent
|
|
900
|
+
VerificationMethodsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: VerificationMethodsComponent, deps: [{ token: i1$3.FsPrompt }], target: i0.ɵɵFactoryTarget.Component });
|
|
901
|
+
VerificationMethodsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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"], components: [{ type: i2$1.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4$2.FsCountryComponent, selector: "fs-country", inputs: ["code", "showIcon", "showName", "region", "width"] }, { type: DefaultedComponent, selector: "app-defaulted" }], directives: [{ type: i2$1.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$1.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i9$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "fsPhone": i6$2.FsPhonePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
902
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: VerificationMethodsComponent, decorators: [{
|
|
850
903
|
type: Component,
|
|
851
904
|
args: [{
|
|
852
|
-
selector: '
|
|
905
|
+
selector: 'fs-2fa-verification-methods',
|
|
853
906
|
templateUrl: './verification-methods.component.html',
|
|
854
907
|
styleUrls: ['./verification-methods.component.scss'],
|
|
855
908
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
856
909
|
}]
|
|
857
|
-
}], ctorParameters: function () { return [{ type: i1$3.FsPrompt }]; }, propDecorators: {
|
|
858
|
-
type:
|
|
910
|
+
}], ctorParameters: function () { return [{ type: i1$3.FsPrompt }]; }, propDecorators: { list: [{
|
|
911
|
+
type: ViewChild,
|
|
912
|
+
args: [FsListComponent]
|
|
859
913
|
}], type: [{
|
|
860
914
|
type: Input
|
|
915
|
+
}], accountVerify: [{
|
|
916
|
+
type: Input
|
|
917
|
+
}], verificationMethodsFetch: [{
|
|
918
|
+
type: Input
|
|
919
|
+
}], verificationMethodDelete: [{
|
|
920
|
+
type: Input
|
|
921
|
+
}], verificationMethodDefault: [{
|
|
922
|
+
type: Input
|
|
923
|
+
}], twoFactorManageService: [{
|
|
924
|
+
type: Input
|
|
861
925
|
}], deleted: [{
|
|
862
926
|
type: Output
|
|
863
927
|
}] } });
|
|
@@ -872,8 +936,10 @@ class NumbersComponent {
|
|
|
872
936
|
this.defaultCountry = _data.defaultCountry;
|
|
873
937
|
}
|
|
874
938
|
add() {
|
|
875
|
-
this.twoFactorManageService.addSms(this.defaultCountry)
|
|
876
|
-
.subscribe()
|
|
939
|
+
this.twoFactorManageService.addSms$(this.defaultCountry)
|
|
940
|
+
.subscribe(() => {
|
|
941
|
+
this.verificationMethods.reload();
|
|
942
|
+
});
|
|
877
943
|
}
|
|
878
944
|
deleted() {
|
|
879
945
|
this._message.success('Deleted text message verification method');
|
|
@@ -883,7 +949,7 @@ class NumbersComponent {
|
|
|
883
949
|
}
|
|
884
950
|
}
|
|
885
951
|
NumbersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NumbersComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
|
|
886
|
-
NumbersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NumbersComponent, selector: "ng-component", 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 <
|
|
952
|
+
NumbersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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: [""], components: [{ type: i3.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: VerificationMethodsComponent, selector: "fs-2fa-verification-methods", inputs: ["type", "accountVerify", "verificationMethodsFetch", "verificationMethodDelete", "verificationMethodDefault", "twoFactorManageService"], outputs: ["deleted"] }, { type: i6.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.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
887
953
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NumbersComponent, decorators: [{
|
|
888
954
|
type: Component,
|
|
889
955
|
args: [{
|
|
@@ -894,7 +960,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
894
960
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
895
961
|
type: Inject,
|
|
896
962
|
args: [MAT_DIALOG_DATA]
|
|
897
|
-
}] }, { type: i1.MatDialogRef }, { type: i2.FsMessage }]; }
|
|
963
|
+
}] }, { type: i1.MatDialogRef }, { type: i2.FsMessage }]; }, propDecorators: { verificationMethods: [{
|
|
964
|
+
type: ViewChild,
|
|
965
|
+
args: [VerificationMethodsComponent]
|
|
966
|
+
}] } });
|
|
898
967
|
|
|
899
968
|
class EmailsComponent {
|
|
900
969
|
constructor(_data, _dialogRef, _message) {
|
|
@@ -905,8 +974,10 @@ class EmailsComponent {
|
|
|
905
974
|
this.twoFactorManageService = _data.twoFactorManageService;
|
|
906
975
|
}
|
|
907
976
|
add() {
|
|
908
|
-
this.twoFactorManageService.addEmail()
|
|
909
|
-
.subscribe()
|
|
977
|
+
this.twoFactorManageService.addEmail$()
|
|
978
|
+
.subscribe(() => {
|
|
979
|
+
this.verificationMethods.reload();
|
|
980
|
+
});
|
|
910
981
|
}
|
|
911
982
|
deleted() {
|
|
912
983
|
this._message.success('Deleted email verification method');
|
|
@@ -916,7 +987,7 @@ class EmailsComponent {
|
|
|
916
987
|
}
|
|
917
988
|
}
|
|
918
989
|
EmailsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EmailsComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
|
|
919
|
-
EmailsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: EmailsComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog>\n <h1 mat-dialog-title>\n <mat-icon>email</mat-icon> Emails\n </h1>\n <mat-dialog-content>\n <
|
|
990
|
+
EmailsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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"], components: [{ type: i3.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: VerificationMethodsComponent, selector: "fs-2fa-verification-methods", inputs: ["type", "accountVerify", "verificationMethodsFetch", "verificationMethodDelete", "verificationMethodDefault", "twoFactorManageService"], outputs: ["deleted"] }, { type: i6.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.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
920
991
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EmailsComponent, decorators: [{
|
|
921
992
|
type: Component,
|
|
922
993
|
args: [{
|
|
@@ -927,7 +998,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
927
998
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
928
999
|
type: Inject,
|
|
929
1000
|
args: [MAT_DIALOG_DATA]
|
|
930
|
-
}] }, { type: i1.MatDialogRef }, { type: i2.FsMessage }]; }
|
|
1001
|
+
}] }, { type: i1.MatDialogRef }, { type: i2.FsMessage }]; }, propDecorators: { verificationMethods: [{
|
|
1002
|
+
type: ViewChild,
|
|
1003
|
+
args: [VerificationMethodsComponent]
|
|
1004
|
+
}] } });
|
|
931
1005
|
|
|
932
1006
|
class ManageMethodsComponent {
|
|
933
1007
|
constructor(_data, _cdRef, _dialog, _message) {
|
|
@@ -989,7 +1063,7 @@ class ManageMethodsComponent {
|
|
|
989
1063
|
});
|
|
990
1064
|
}
|
|
991
1065
|
textMessageAdd() {
|
|
992
|
-
this.twoFactorManageService.addSms(this._defaultCountry)
|
|
1066
|
+
this.twoFactorManageService.addSms$(this._defaultCountry)
|
|
993
1067
|
.subscribe();
|
|
994
1068
|
}
|
|
995
1069
|
emailMessageManage() {
|
|
@@ -1000,7 +1074,7 @@ class ManageMethodsComponent {
|
|
|
1000
1074
|
});
|
|
1001
1075
|
}
|
|
1002
1076
|
emailMessageAdd() {
|
|
1003
|
-
this.twoFactorManageService.addEmail()
|
|
1077
|
+
this.twoFactorManageService.addEmail$()
|
|
1004
1078
|
.subscribe();
|
|
1005
1079
|
}
|
|
1006
1080
|
appRemove() {
|
|
@@ -1009,8 +1083,8 @@ class ManageMethodsComponent {
|
|
|
1009
1083
|
return _verificationMethod.type === VerificationMethodType.App;
|
|
1010
1084
|
});
|
|
1011
1085
|
if (verificationMethod) {
|
|
1012
|
-
this.twoFactorManageService.accountVerify()
|
|
1013
|
-
.pipe(switchMap(() => this.twoFactorManageService.verificationMethodDelete(verificationMethod)))
|
|
1086
|
+
this.twoFactorManageService.accountVerify$()
|
|
1087
|
+
.pipe(switchMap(() => this.twoFactorManageService.verificationMethodDelete$(verificationMethod)))
|
|
1014
1088
|
.subscribe(() => {
|
|
1015
1089
|
this._message.success('Removed App Authenticator verification method');
|
|
1016
1090
|
this._cdRef.markForCheck();
|
|
@@ -1018,7 +1092,7 @@ class ManageMethodsComponent {
|
|
|
1018
1092
|
}
|
|
1019
1093
|
}
|
|
1020
1094
|
appAdd() {
|
|
1021
|
-
this.twoFactorManageService.addApp()
|
|
1095
|
+
this.twoFactorManageService.addApp$()
|
|
1022
1096
|
.subscribe();
|
|
1023
1097
|
}
|
|
1024
1098
|
ngOnDestroy() {
|
|
@@ -1053,11 +1127,12 @@ class Fs2faManageComponent {
|
|
|
1053
1127
|
VerificationMethodType.Email,
|
|
1054
1128
|
VerificationMethodType.App
|
|
1055
1129
|
];
|
|
1056
|
-
this._twoFactorManageService.
|
|
1130
|
+
this._twoFactorManageService.registerVerificationMethodsFetch(this.verificationMethodsFetch);
|
|
1057
1131
|
this._twoFactorManageService.registerVerificationMethodDelete(this.verificationMethodDelete);
|
|
1058
1132
|
this._twoFactorManageService.registerVerificationMethodCreate(this.verificationMethodCreate);
|
|
1059
1133
|
this._twoFactorManageService.registerVerificationMethodVerify(this.verificationMethodVerify);
|
|
1060
1134
|
this._twoFactorManageService.registerVerificationMethodResend(this.verificationMethodResend);
|
|
1135
|
+
this._twoFactorManageService.registerVerificationMethodDefault(this.verificationMethodDefault);
|
|
1061
1136
|
this._twoFactorManageService.registerAccountVerify(this.accountVerify);
|
|
1062
1137
|
this._twoFactorManageService.verificationMethods$
|
|
1063
1138
|
.subscribe((verificationMethods) => {
|
|
@@ -1075,7 +1150,7 @@ class Fs2faManageComponent {
|
|
|
1075
1150
|
});
|
|
1076
1151
|
this._cdRef.markForCheck();
|
|
1077
1152
|
});
|
|
1078
|
-
this._twoFactorManageService.
|
|
1153
|
+
this._twoFactorManageService.verificationMethodsFetch();
|
|
1079
1154
|
}
|
|
1080
1155
|
manage() {
|
|
1081
1156
|
const dialogRef = this._dialog.open(ManageMethodsComponent, {
|
|
@@ -1093,7 +1168,7 @@ class Fs2faManageComponent {
|
|
|
1093
1168
|
});
|
|
1094
1169
|
}
|
|
1095
1170
|
reload() {
|
|
1096
|
-
this._twoFactorManageService.
|
|
1171
|
+
this._twoFactorManageService.verificationMethodsFetch();
|
|
1097
1172
|
}
|
|
1098
1173
|
ngOnDestroy() {
|
|
1099
1174
|
this._destroy$.next();
|
|
@@ -1101,7 +1176,7 @@ class Fs2faManageComponent {
|
|
|
1101
1176
|
}
|
|
1102
1177
|
}
|
|
1103
1178
|
Fs2faManageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faManageComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.MatDialog }, { token: TwoFactorManageService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1104
|
-
Fs2faManageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2faManageComponent, selector: "fs-2fa-manage", inputs: { accountVerify: "accountVerify", defaultCountry: "defaultCountry", verificationMethodTypes: "verificationMethodTypes", verificationMethodsFetch: "verificationMethodsFetch", verificationMethodDelete: "verificationMethodDelete", verificationMethodCreate: "verificationMethodCreate", 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: [""], components: [{ type: i3$
|
|
1179
|
+
Fs2faManageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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: [""], components: [{ type: i3$2.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i3$2.FsLabelComponent, selector: "fs-label" }], directives: [{ type: i9$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1105
1180
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faManageComponent, decorators: [{
|
|
1106
1181
|
type: Component,
|
|
1107
1182
|
args: [{
|
|
@@ -1123,6 +1198,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1123
1198
|
type: Input
|
|
1124
1199
|
}], verificationMethodCreate: [{
|
|
1125
1200
|
type: Input
|
|
1201
|
+
}], verificationMethodDefault: [{
|
|
1202
|
+
type: Input
|
|
1126
1203
|
}], verificationMethodVerify: [{
|
|
1127
1204
|
type: Input
|
|
1128
1205
|
}], verificationMethodResend: [{
|
|
@@ -1144,6 +1221,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1144
1221
|
}]
|
|
1145
1222
|
}] });
|
|
1146
1223
|
|
|
1224
|
+
class Fs2faVerificationMethodsModule {
|
|
1225
|
+
}
|
|
1226
|
+
Fs2faVerificationMethodsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationMethodsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1227
|
+
Fs2faVerificationMethodsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationMethodsModule, declarations: [VerificationMethodsComponent], imports: [CommonModule,
|
|
1228
|
+
FormsModule,
|
|
1229
|
+
MatIconModule,
|
|
1230
|
+
FsListModule,
|
|
1231
|
+
FsPhoneModule,
|
|
1232
|
+
FsCountryModule,
|
|
1233
|
+
DefautledModule], exports: [VerificationMethodsComponent] });
|
|
1234
|
+
Fs2faVerificationMethodsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationMethodsModule, imports: [[
|
|
1235
|
+
CommonModule,
|
|
1236
|
+
FormsModule,
|
|
1237
|
+
MatIconModule,
|
|
1238
|
+
FsListModule,
|
|
1239
|
+
FsPhoneModule,
|
|
1240
|
+
FsCountryModule,
|
|
1241
|
+
DefautledModule,
|
|
1242
|
+
]] });
|
|
1243
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationMethodsModule, decorators: [{
|
|
1244
|
+
type: NgModule,
|
|
1245
|
+
args: [{
|
|
1246
|
+
imports: [
|
|
1247
|
+
CommonModule,
|
|
1248
|
+
FormsModule,
|
|
1249
|
+
MatIconModule,
|
|
1250
|
+
FsListModule,
|
|
1251
|
+
FsPhoneModule,
|
|
1252
|
+
FsCountryModule,
|
|
1253
|
+
DefautledModule,
|
|
1254
|
+
],
|
|
1255
|
+
declarations: [
|
|
1256
|
+
VerificationMethodsComponent,
|
|
1257
|
+
],
|
|
1258
|
+
exports: [VerificationMethodsComponent],
|
|
1259
|
+
}]
|
|
1260
|
+
}] });
|
|
1261
|
+
|
|
1147
1262
|
class Fs2faManageModule {
|
|
1148
1263
|
}
|
|
1149
1264
|
Fs2faManageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faManageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -1152,7 +1267,6 @@ Fs2faManageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versi
|
|
|
1152
1267
|
NumbersComponent,
|
|
1153
1268
|
AppComponent,
|
|
1154
1269
|
EmailComponent,
|
|
1155
|
-
VerificationMethodsComponent$1,
|
|
1156
1270
|
NumberComponent,
|
|
1157
1271
|
EmailsComponent], imports: [CommonModule,
|
|
1158
1272
|
FormsModule,
|
|
@@ -1172,7 +1286,8 @@ Fs2faManageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versi
|
|
|
1172
1286
|
QrCodeModule,
|
|
1173
1287
|
ResendModule,
|
|
1174
1288
|
DefautledModule,
|
|
1175
|
-
Fs2faVerificationModule
|
|
1289
|
+
Fs2faVerificationModule,
|
|
1290
|
+
Fs2faVerificationMethodsModule], exports: [Fs2faManageComponent] });
|
|
1176
1291
|
Fs2faManageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faManageModule, imports: [[
|
|
1177
1292
|
CommonModule,
|
|
1178
1293
|
FormsModule,
|
|
@@ -1193,6 +1308,7 @@ Fs2faManageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versi
|
|
|
1193
1308
|
ResendModule,
|
|
1194
1309
|
DefautledModule,
|
|
1195
1310
|
Fs2faVerificationModule,
|
|
1311
|
+
Fs2faVerificationMethodsModule,
|
|
1196
1312
|
]] });
|
|
1197
1313
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faManageModule, decorators: [{
|
|
1198
1314
|
type: NgModule,
|
|
@@ -1217,6 +1333,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1217
1333
|
ResendModule,
|
|
1218
1334
|
DefautledModule,
|
|
1219
1335
|
Fs2faVerificationModule,
|
|
1336
|
+
Fs2faVerificationMethodsModule,
|
|
1220
1337
|
],
|
|
1221
1338
|
declarations: [
|
|
1222
1339
|
Fs2faManageComponent,
|
|
@@ -1224,7 +1341,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1224
1341
|
NumbersComponent,
|
|
1225
1342
|
AppComponent,
|
|
1226
1343
|
EmailComponent,
|
|
1227
|
-
VerificationMethodsComponent$1,
|
|
1228
1344
|
NumberComponent,
|
|
1229
1345
|
EmailsComponent,
|
|
1230
1346
|
],
|
|
@@ -1232,97 +1348,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1232
1348
|
}]
|
|
1233
1349
|
}] });
|
|
1234
1350
|
|
|
1235
|
-
class VerificationMethodsComponent {
|
|
1236
|
-
constructor(_prompt) {
|
|
1237
|
-
this._prompt = _prompt;
|
|
1238
|
-
this.VerificationMethodType = VerificationMethodType;
|
|
1239
|
-
}
|
|
1240
|
-
ngOnInit() {
|
|
1241
|
-
this.listConfig = {
|
|
1242
|
-
paging: false,
|
|
1243
|
-
rowActions: [
|
|
1244
|
-
{
|
|
1245
|
-
click: (verificationMethod) => {
|
|
1246
|
-
this._prompt.confirm({
|
|
1247
|
-
title: 'Confirm',
|
|
1248
|
-
template: 'Would you like to delete this verification method?',
|
|
1249
|
-
})
|
|
1250
|
-
.pipe(switchMap(() => this.accountVerify()), switchMap(() => this.verificationMethodDelete(verificationMethod)))
|
|
1251
|
-
.subscribe(() => {
|
|
1252
|
-
this.list.reload();
|
|
1253
|
-
});
|
|
1254
|
-
},
|
|
1255
|
-
label: 'Delete',
|
|
1256
|
-
},
|
|
1257
|
-
],
|
|
1258
|
-
fetch: (query) => {
|
|
1259
|
-
return this.verificationMethodsFetch(query)
|
|
1260
|
-
.pipe(map((verificationMethods) => ({
|
|
1261
|
-
data: verificationMethods,
|
|
1262
|
-
})));
|
|
1263
|
-
},
|
|
1264
|
-
};
|
|
1265
|
-
}
|
|
1266
|
-
}
|
|
1267
|
-
VerificationMethodsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: VerificationMethodsComponent, deps: [{ token: i1$3.FsPrompt }], target: i0.ɵɵFactoryTarget.Component });
|
|
1268
|
-
VerificationMethodsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: VerificationMethodsComponent, selector: "fs-2fa-verification-methods", inputs: { accountVerify: "accountVerify", verificationMethodsFetch: "verificationMethodsFetch", verificationMethodDelete: "verificationMethodDelete" }, 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"], components: [{ type: i2$1.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3$2.FsCountryComponent, selector: "fs-country", inputs: ["code", "showIcon", "showName", "region", "width"] }, { type: DefaultedComponent, selector: "app-defaulted" }], directives: [{ type: i2$1.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$1.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i9$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "fsPhone": i6$2.FsPhonePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1269
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: VerificationMethodsComponent, decorators: [{
|
|
1270
|
-
type: Component,
|
|
1271
|
-
args: [{
|
|
1272
|
-
selector: 'fs-2fa-verification-methods',
|
|
1273
|
-
templateUrl: './verification-methods.component.html',
|
|
1274
|
-
styleUrls: ['./verification-methods.component.scss'],
|
|
1275
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1276
|
-
}]
|
|
1277
|
-
}], ctorParameters: function () { return [{ type: i1$3.FsPrompt }]; }, propDecorators: { list: [{
|
|
1278
|
-
type: ViewChild,
|
|
1279
|
-
args: [FsListComponent]
|
|
1280
|
-
}], accountVerify: [{
|
|
1281
|
-
type: Input
|
|
1282
|
-
}], verificationMethodsFetch: [{
|
|
1283
|
-
type: Input
|
|
1284
|
-
}], verificationMethodDelete: [{
|
|
1285
|
-
type: Input
|
|
1286
|
-
}] } });
|
|
1287
|
-
|
|
1288
|
-
class Fs2faVerificationMethodsModule {
|
|
1289
|
-
}
|
|
1290
|
-
Fs2faVerificationMethodsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationMethodsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1291
|
-
Fs2faVerificationMethodsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationMethodsModule, declarations: [VerificationMethodsComponent], imports: [CommonModule,
|
|
1292
|
-
FormsModule,
|
|
1293
|
-
MatIconModule,
|
|
1294
|
-
FsListModule,
|
|
1295
|
-
FsPhoneModule,
|
|
1296
|
-
FsCountryModule,
|
|
1297
|
-
DefautledModule], exports: [VerificationMethodsComponent] });
|
|
1298
|
-
Fs2faVerificationMethodsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationMethodsModule, imports: [[
|
|
1299
|
-
CommonModule,
|
|
1300
|
-
FormsModule,
|
|
1301
|
-
MatIconModule,
|
|
1302
|
-
FsListModule,
|
|
1303
|
-
FsPhoneModule,
|
|
1304
|
-
FsCountryModule,
|
|
1305
|
-
DefautledModule,
|
|
1306
|
-
]] });
|
|
1307
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationMethodsModule, decorators: [{
|
|
1308
|
-
type: NgModule,
|
|
1309
|
-
args: [{
|
|
1310
|
-
imports: [
|
|
1311
|
-
CommonModule,
|
|
1312
|
-
FormsModule,
|
|
1313
|
-
MatIconModule,
|
|
1314
|
-
FsListModule,
|
|
1315
|
-
FsPhoneModule,
|
|
1316
|
-
FsCountryModule,
|
|
1317
|
-
DefautledModule,
|
|
1318
|
-
],
|
|
1319
|
-
declarations: [
|
|
1320
|
-
VerificationMethodsComponent,
|
|
1321
|
-
],
|
|
1322
|
-
exports: [VerificationMethodsComponent],
|
|
1323
|
-
}]
|
|
1324
|
-
}] });
|
|
1325
|
-
|
|
1326
1351
|
/**
|
|
1327
1352
|
* Generated bundle index. Do not edit.
|
|
1328
1353
|
*/
|