@firestitch/2fa 12.2.0 → 12.3.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.
Files changed (75) hide show
  1. package/app/enums/verification-method-type.enum.d.ts +5 -5
  2. package/app/interfaces/verification-method.interface.d.ts +11 -11
  3. package/app/modules/code-input/code-input.module.d.ts +8 -8
  4. package/app/modules/code-input/components/code-input/code-input.component.d.ts +13 -13
  5. package/app/modules/code-input/components/code-input/index.d.ts +1 -1
  6. package/app/modules/code-input/index.d.ts +1 -1
  7. package/app/modules/manage/components/2fa-manage/2fa-manage.component.d.ts +26 -26
  8. package/app/modules/manage/components/2fa-manage/index.d.ts +1 -1
  9. package/app/modules/manage/components/app/app.component.d.ts +31 -31
  10. package/app/modules/manage/components/app/index.d.ts +1 -1
  11. package/app/modules/manage/components/defaulted/defaulted.component.d.ts +5 -5
  12. package/app/modules/manage/components/defaulted/index.d.ts +1 -1
  13. package/app/modules/manage/components/email/email.component.d.ts +25 -25
  14. package/app/modules/manage/components/email/index.d.ts +1 -1
  15. package/app/modules/manage/components/emails/emails.component.d.ts +17 -17
  16. package/app/modules/manage/components/emails/index.d.ts +1 -1
  17. package/app/modules/manage/components/manage-methods/index.d.ts +1 -1
  18. package/app/modules/manage/components/manage-methods/manage-methods.component.d.ts +32 -32
  19. package/app/modules/manage/components/number/index.d.ts +1 -1
  20. package/app/modules/manage/components/number/number.component.d.ts +26 -26
  21. package/app/modules/manage/components/numbers/index.d.ts +1 -1
  22. package/app/modules/manage/components/numbers/numbers.component.d.ts +18 -18
  23. package/app/modules/manage/components/verification-methods/index.d.ts +1 -1
  24. package/app/modules/manage/components/verification-methods/verification-methods.component.d.ts +18 -18
  25. package/app/modules/manage/fs-2f-manage.module.d.ts +31 -31
  26. package/app/modules/manage/services/index.d.ts +1 -1
  27. package/app/modules/manage/services/two-factor-manage.service.d.ts +42 -42
  28. package/app/modules/verification/components/2fa-verification/2fa-verification.component.d.ts +32 -31
  29. package/app/modules/verification/components/2fa-verification-code/2fa-verification-code.component.d.ts +17 -17
  30. package/app/modules/verification/components/2fa-verification-methods/2fa-verification-methods.component.d.ts +23 -23
  31. package/app/modules/verification/fs-2fa-verification.module.d.ts +23 -23
  32. package/bundles/firestitch-2fa.umd.js +1110 -1125
  33. package/bundles/firestitch-2fa.umd.js.map +1 -1
  34. package/esm2015/app/enums/verification-method-type.enum.js +6 -6
  35. package/esm2015/app/interfaces/verification-method.interface.js +1 -1
  36. package/esm2015/app/modules/code-input/code-input.module.js +25 -25
  37. package/esm2015/app/modules/code-input/components/code-input/code-input.component.js +36 -36
  38. package/esm2015/app/modules/code-input/components/code-input/index.js +1 -1
  39. package/esm2015/app/modules/code-input/index.js +1 -1
  40. package/esm2015/app/modules/manage/components/2fa-manage/2fa-manage.component.js +91 -91
  41. package/esm2015/app/modules/manage/components/2fa-manage/index.js +1 -1
  42. package/esm2015/app/modules/manage/components/app/app.component.js +81 -81
  43. package/esm2015/app/modules/manage/components/app/index.js +1 -1
  44. package/esm2015/app/modules/manage/components/defaulted/defaulted.component.js +15 -15
  45. package/esm2015/app/modules/manage/components/defaulted/index.js +1 -1
  46. package/esm2015/app/modules/manage/components/email/email.component.js +80 -80
  47. package/esm2015/app/modules/manage/components/email/index.js +1 -1
  48. package/esm2015/app/modules/manage/components/emails/emails.component.js +42 -42
  49. package/esm2015/app/modules/manage/components/emails/index.js +1 -1
  50. package/esm2015/app/modules/manage/components/manage-methods/index.js +1 -1
  51. package/esm2015/app/modules/manage/components/manage-methods/manage-methods.component.js +118 -118
  52. package/esm2015/app/modules/manage/components/number/index.js +1 -1
  53. package/esm2015/app/modules/manage/components/number/number.component.js +82 -82
  54. package/esm2015/app/modules/manage/components/numbers/index.js +1 -1
  55. package/esm2015/app/modules/manage/components/numbers/numbers.component.js +43 -43
  56. package/esm2015/app/modules/manage/components/verification-methods/index.js +1 -1
  57. package/esm2015/app/modules/manage/components/verification-methods/verification-methods.component.js +62 -62
  58. package/esm2015/app/modules/manage/fs-2f-manage.module.js +107 -107
  59. package/esm2015/app/modules/manage/services/index.js +1 -1
  60. package/esm2015/app/modules/manage/services/two-factor-manage.service.js +132 -132
  61. package/esm2015/app/modules/verification/components/2fa-verification/2fa-verification.component.js +103 -109
  62. package/esm2015/app/modules/verification/components/2fa-verification-code/2fa-verification-code.component.js +56 -56
  63. package/esm2015/app/modules/verification/components/2fa-verification-methods/2fa-verification-methods.component.js +68 -73
  64. package/esm2015/app/modules/verification/fs-2fa-verification.module.js +87 -87
  65. package/esm2015/firestitch-2fa.js +4 -4
  66. package/esm2015/public_api.js +6 -7
  67. package/fesm2015/firestitch-2fa.js +1004 -1015
  68. package/fesm2015/firestitch-2fa.js.map +1 -1
  69. package/firestitch-2fa.d.ts +5 -5
  70. package/package.json +1 -1
  71. package/public_api.d.ts +6 -8
  72. package/app/interfaces/verification-provider.interface.d.ts +0 -8
  73. package/app/tokens/verification.token.d.ts +0 -3
  74. package/esm2015/app/interfaces/verification-provider.interface.js +0 -2
  75. package/esm2015/app/tokens/verification.token.js +0 -3
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, Component, ChangeDetectionStrategy, Inject, EventEmitter, ViewChild, Input, Output, NgModule, Injectable } from '@angular/core';
2
+ import { Component, ChangeDetectionStrategy, Inject, EventEmitter, ViewChild, Input, Output, NgModule, Injectable } from '@angular/core';
3
3
  import * as i8 from '@angular/forms';
4
4
  import { ControlContainer, NgForm, FormsModule } from '@angular/forms';
5
5
  import * as i10 from '@angular/common';
@@ -45,1056 +45,1045 @@ import { QrCodeModule } from 'ng-qrcode';
45
45
  import * as i2 from '@firestitch/message';
46
46
  import * as i1$2 from '@firestitch/prompt';
47
47
 
48
- const FS_2FA_VERIFICATION_PROVIDER = new InjectionToken('Provider for Verification service');
49
-
50
- var FsVerificationMethodType;
51
- (function (FsVerificationMethodType) {
52
- FsVerificationMethodType["Sms"] = "sms";
53
- FsVerificationMethodType["Email"] = "email";
54
- FsVerificationMethodType["App"] = "app";
48
+ var FsVerificationMethodType;
49
+ (function (FsVerificationMethodType) {
50
+ FsVerificationMethodType["Sms"] = "sms";
51
+ FsVerificationMethodType["Email"] = "email";
52
+ FsVerificationMethodType["App"] = "app";
55
53
  })(FsVerificationMethodType || (FsVerificationMethodType = {}));
56
54
 
57
- class Fs2faVerificationMethodsComponent {
58
- constructor(_verificationProvider, _dialogData, _dialogRef) {
59
- this._verificationProvider = _verificationProvider;
60
- this._dialogData = _dialogData;
61
- this._dialogRef = _dialogRef;
62
- this.verificationMethodType = FsVerificationMethodType;
63
- this.setVerificationMethod = () => {
64
- return this._verificationProvider
65
- .updateVerificationMethod(this.method.id)
66
- .pipe(tap((method) => {
67
- this._dialogRef.close(method);
68
- }));
69
- };
70
- this._setActiveMethod();
71
- this._initMethods();
72
- }
73
- compareWith(o1, o2) {
74
- return o1 && o2 && o1.id === o2.id;
75
- }
76
- _setActiveMethod() {
77
- var _a;
78
- this.method = (_a = this._dialogData) === null || _a === void 0 ? void 0 : _a.method;
79
- }
80
- _initMethods() {
81
- this.methods$ = this._verificationProvider
82
- .methods()
83
- .pipe(map((methods) => {
84
- return methods
85
- .reduce((acc, method) => {
86
- if (!acc[method.type]) {
87
- acc[method.type] = [];
88
- }
89
- acc[method.type].push(method);
90
- return acc;
91
- }, {});
92
- }), shareReplay(1));
93
- }
94
- }
95
- Fs2faVerificationMethodsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationMethodsComponent, deps: [{ token: FS_2FA_VERIFICATION_PROVIDER }, { token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
96
- Fs2faVerificationMethodsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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 *fsSkeleton=\"methods$ | async as methods\">\n <fs-radio-group [(ngModel)]=\"method\" name=\"method\" [compareWith]=\"compareWith\">\n <ng-container *ngFor=\"let methodMap of methods | 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 Verification code send to one of following 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 Verification code send to one of following email\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 Verification code generated by an 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 <ng-container *ngIf=\"methods$ | async\">\n <button mat-button type=\"submit\" color=\"primary\">Next</button>\n </ng-container>\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"], components: [{ type: i3.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3$1.FsRadioGroupComponent, selector: "fs-radio-group", inputs: ["orientation", "label", "name", "disabled", "radioPosition", "compareWith", "required"] }, { type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i5.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { type: i7.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: i8.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i8.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i9$1.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i10.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.FsSubmitButtonDirective, selector: "button[type=\"submit\"]", inputs: ["name", "dirtySubmit"] }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "async": i10.AsyncPipe, "keyvalue": i10.KeyValuePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
97
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationMethodsComponent, decorators: [{
98
- type: Component,
99
- args: [{
100
- templateUrl: './2fa-verification-methods.component.html',
101
- styleUrls: [
102
- './2fa-verification-methods.component.scss',
103
- ],
104
- changeDetection: ChangeDetectionStrategy.OnPush,
105
- }]
106
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
107
- type: Inject,
108
- args: [FS_2FA_VERIFICATION_PROVIDER]
109
- }] }, { type: undefined, decorators: [{
110
- type: Inject,
111
- args: [MAT_DIALOG_DATA]
55
+ class Fs2faVerificationMethodsComponent {
56
+ constructor(_dialogData, _dialogRef) {
57
+ this._dialogData = _dialogData;
58
+ this._dialogRef = _dialogRef;
59
+ this.verificationMethodType = FsVerificationMethodType;
60
+ this.setVerificationMethod = () => {
61
+ return this._selectVerificationMethod(this.method)
62
+ .pipe(tap((method) => {
63
+ this._dialogRef.close(method);
64
+ }));
65
+ };
66
+ this._getVerificationMethods = _dialogData.getVerificationMethods;
67
+ this._selectVerificationMethod = _dialogData.selectVerificationMethod;
68
+ this._setActiveMethod();
69
+ this._initMethods();
70
+ }
71
+ compareWith(o1, o2) {
72
+ return o1 && o2 && o1.id === o2.id;
73
+ }
74
+ _setActiveMethod() {
75
+ var _a;
76
+ this.method = (_a = this._dialogData) === null || _a === void 0 ? void 0 : _a.method;
77
+ }
78
+ _initMethods() {
79
+ this.methods$ = this._getVerificationMethods()
80
+ .pipe(map((methods) => {
81
+ return methods
82
+ .reduce((acc, method) => {
83
+ if (!acc[method.type]) {
84
+ acc[method.type] = [];
85
+ }
86
+ acc[method.type].push(method);
87
+ return acc;
88
+ }, {});
89
+ }), shareReplay(1));
90
+ }
91
+ }
92
+ Fs2faVerificationMethodsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationMethodsComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
93
+ Fs2faVerificationMethodsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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 *fsSkeleton=\"methods$ | async as methods\">\n <fs-radio-group [(ngModel)]=\"method\" name=\"method\" [compareWith]=\"compareWith\">\n <ng-container *ngFor=\"let methodMap of methods | 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 Verification code send to one of following 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 Verification code send to one of following email\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 Verification code generated by an 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 <ng-container *ngIf=\"methods$ | async\">\n <button mat-button type=\"submit\" color=\"primary\">Next</button>\n </ng-container>\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"], components: [{ type: i3.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3$1.FsRadioGroupComponent, selector: "fs-radio-group", inputs: ["orientation", "label", "name", "disabled", "radioPosition", "compareWith", "required"] }, { type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i5.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { type: i7.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: i8.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i8.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i9$1.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i10.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.FsSubmitButtonDirective, selector: "button[type=\"submit\"]", inputs: ["name", "dirtySubmit"] }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "async": i10.AsyncPipe, "keyvalue": i10.KeyValuePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
94
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationMethodsComponent, decorators: [{
95
+ type: Component,
96
+ args: [{
97
+ templateUrl: './2fa-verification-methods.component.html',
98
+ styleUrls: [
99
+ './2fa-verification-methods.component.scss',
100
+ ],
101
+ changeDetection: ChangeDetectionStrategy.OnPush,
102
+ }]
103
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
104
+ type: Inject,
105
+ args: [MAT_DIALOG_DATA]
112
106
  }] }, { type: i1.MatDialogRef }]; } });
113
107
 
114
- class CodeInputComponent {
115
- constructor() {
116
- this.codeCompleted = new EventEmitter();
117
- this.codeChanged = new EventEmitter();
118
- }
119
- focus() {
120
- this.angularCodeInputComponent.focusOnField(0);
121
- }
122
- }
123
- CodeInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CodeInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
124
- CodeInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CodeInputComponent, selector: "app-code-input", inputs: { codeLength: "codeLength", code: "code" }, outputs: { codeCompleted: "codeCompleted", codeChanged: "codeChanged" }, viewQueries: [{ propertyName: "angularCodeInputComponent", first: true, predicate: CodeInputComponent$1, descendants: true }], ngImport: i0, template: "<code-input\n [initialFocusField]=\"0\"\n [codeLength]=\"6\"\n [code]=\"code\"\n (codeCompleted)=\"codeCompleted.emit($event)\"\n (codeChanged)=\"codeChanged.emit($event)\">\n</code-input>", 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"], components: [{ type: i1$1.CodeInputComponent, selector: "code-input", inputs: ["isNonDigitsCode", "codeLength", "inputType", "initialFocusField", "isCharsCode", "isCodeHidden", "isPrevFocusableAfterClearing", "isFocusingOnLastByClickIfFilled", "code", "disabled", "autocapitalize"], outputs: ["codeChanged", "codeCompleted"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
125
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CodeInputComponent, decorators: [{
126
- type: Component,
127
- args: [{
128
- selector: 'app-code-input',
129
- templateUrl: './code-input.component.html',
130
- styleUrls: ['./code-input.component.scss'],
131
- changeDetection: ChangeDetectionStrategy.OnPush,
132
- }]
133
- }], propDecorators: { angularCodeInputComponent: [{
134
- type: ViewChild,
135
- args: [CodeInputComponent$1]
136
- }], codeLength: [{
137
- type: Input
138
- }], code: [{
139
- type: Input
140
- }], codeCompleted: [{
141
- type: Output
142
- }], codeChanged: [{
143
- type: Output
108
+ class CodeInputComponent {
109
+ constructor() {
110
+ this.codeCompleted = new EventEmitter();
111
+ this.codeChanged = new EventEmitter();
112
+ }
113
+ focus() {
114
+ this.angularCodeInputComponent.focusOnField(0);
115
+ }
116
+ }
117
+ CodeInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CodeInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
118
+ CodeInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CodeInputComponent, selector: "app-code-input", inputs: { codeLength: "codeLength", code: "code" }, outputs: { codeCompleted: "codeCompleted", codeChanged: "codeChanged" }, viewQueries: [{ propertyName: "angularCodeInputComponent", first: true, predicate: CodeInputComponent$1, descendants: true }], ngImport: i0, template: "<code-input\r\n [initialFocusField]=\"0\"\r\n [codeLength]=\"6\"\r\n [code]=\"code\"\r\n (codeCompleted)=\"codeCompleted.emit($event)\"\r\n (codeChanged)=\"codeChanged.emit($event)\">\r\n</code-input>", 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"], components: [{ type: i1$1.CodeInputComponent, selector: "code-input", inputs: ["isNonDigitsCode", "codeLength", "inputType", "initialFocusField", "isCharsCode", "isCodeHidden", "isPrevFocusableAfterClearing", "isFocusingOnLastByClickIfFilled", "code", "disabled", "autocapitalize"], outputs: ["codeChanged", "codeCompleted"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
119
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CodeInputComponent, decorators: [{
120
+ type: Component,
121
+ args: [{
122
+ selector: 'app-code-input',
123
+ templateUrl: './code-input.component.html',
124
+ styleUrls: ['./code-input.component.scss'],
125
+ changeDetection: ChangeDetectionStrategy.OnPush,
126
+ }]
127
+ }], propDecorators: { angularCodeInputComponent: [{
128
+ type: ViewChild,
129
+ args: [CodeInputComponent$1]
130
+ }], codeLength: [{
131
+ type: Input
132
+ }], code: [{
133
+ type: Input
134
+ }], codeCompleted: [{
135
+ type: Output
136
+ }], codeChanged: [{
137
+ type: Output
144
138
  }] } });
145
139
 
146
- class Fs2faVerificationCodeComponent {
147
- constructor() {
148
- this.codeChanged = new EventEmitter();
149
- this.codeCompleted = new EventEmitter();
150
- this.FsVerificationMethodType = FsVerificationMethodType;
151
- }
152
- codeChange(code) {
153
- this.code = code;
154
- this.codeChanged.emit(this.code);
155
- }
156
- focus() {
157
- this.codeInputComponent.focus();
158
- }
159
- }
160
- Fs2faVerificationCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationCodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
161
- Fs2faVerificationCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2faVerificationCodeComponent, selector: "fs-2fa-verification-code", inputs: { method: "method", code: "code" }, outputs: { codeChanged: "codeChanged", codeCompleted: "codeCompleted" }, viewQueries: [{ propertyName: "codeInputComponent", first: true, predicate: CodeInputComponent, descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"method.phoneNumber && method.type === FsVerificationMethodType.Sms\">\n <p class=\"description\">\n A text message with a verification code was just\n sent to <span style=\"white-space: nowrap;\">{{ method.phoneNumber }}</span> to verify it's you.\n </p>\n\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"method.type === FsVerificationMethodType.Email\">\n <p class=\"description\">\n A email with a verification code was just sent to {{ method.email }} to verify it's you.\n </p>\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"method.type === FsVerificationMethodType.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 (codeChanged)=\"codeChange($event)\"\n (codeCompleted)=\"codeCompleted.emit()\">\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"], components: [{ type: CodeInputComponent, selector: "app-code-input", inputs: ["codeLength", "code"], outputs: ["codeCompleted", "codeChanged"] }], directives: [{ type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], viewProviders: [
162
- {
163
- provide: ControlContainer,
164
- useExisting: NgForm,
165
- },
166
- ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
167
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationCodeComponent, decorators: [{
168
- type: Component,
169
- args: [{
170
- selector: 'fs-2fa-verification-code',
171
- templateUrl: './2fa-verification-code.component.html',
172
- styleUrls: [
173
- './2fa-verification-code.component.scss',
174
- ],
175
- changeDetection: ChangeDetectionStrategy.OnPush,
176
- viewProviders: [
177
- {
178
- provide: ControlContainer,
179
- useExisting: NgForm,
180
- },
181
- ],
182
- }]
183
- }], propDecorators: { codeInputComponent: [{
184
- type: ViewChild,
185
- args: [CodeInputComponent]
186
- }], method: [{
187
- type: Input
188
- }], code: [{
189
- type: Input
190
- }], codeChanged: [{
191
- type: Output
192
- }], codeCompleted: [{
193
- type: Output
140
+ class Fs2faVerificationCodeComponent {
141
+ constructor() {
142
+ this.codeChanged = new EventEmitter();
143
+ this.codeCompleted = new EventEmitter();
144
+ this.FsVerificationMethodType = FsVerificationMethodType;
145
+ }
146
+ codeChange(code) {
147
+ this.code = code;
148
+ this.codeChanged.emit(this.code);
149
+ }
150
+ focus() {
151
+ this.codeInputComponent.focus();
152
+ }
153
+ }
154
+ Fs2faVerificationCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationCodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
155
+ Fs2faVerificationCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2faVerificationCodeComponent, selector: "fs-2fa-verification-code", inputs: { method: "method", code: "code" }, outputs: { codeChanged: "codeChanged", codeCompleted: "codeCompleted" }, viewQueries: [{ propertyName: "codeInputComponent", first: true, predicate: CodeInputComponent, descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"method.phoneNumber && method.type === FsVerificationMethodType.Sms\">\n <p class=\"description\">\n A text message with a verification code was just\n sent to <span style=\"white-space: nowrap;\">{{ method.phoneNumber }}</span> to verify it's you.\n </p>\n\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"method.type === FsVerificationMethodType.Email\">\n <p class=\"description\">\n A email with a verification code was just sent to {{ method.email }} to verify it's you.\n </p>\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"method.type === FsVerificationMethodType.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 (codeChanged)=\"codeChange($event)\"\n (codeCompleted)=\"codeCompleted.emit()\">\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"], components: [{ type: CodeInputComponent, selector: "app-code-input", inputs: ["codeLength", "code"], outputs: ["codeCompleted", "codeChanged"] }], directives: [{ type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], viewProviders: [
156
+ {
157
+ provide: ControlContainer,
158
+ useExisting: NgForm,
159
+ },
160
+ ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
161
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationCodeComponent, decorators: [{
162
+ type: Component,
163
+ args: [{
164
+ selector: 'fs-2fa-verification-code',
165
+ templateUrl: './2fa-verification-code.component.html',
166
+ styleUrls: [
167
+ './2fa-verification-code.component.scss',
168
+ ],
169
+ changeDetection: ChangeDetectionStrategy.OnPush,
170
+ viewProviders: [
171
+ {
172
+ provide: ControlContainer,
173
+ useExisting: NgForm,
174
+ },
175
+ ],
176
+ }]
177
+ }], propDecorators: { codeInputComponent: [{
178
+ type: ViewChild,
179
+ args: [CodeInputComponent]
180
+ }], method: [{
181
+ type: Input
182
+ }], code: [{
183
+ type: Input
184
+ }], codeChanged: [{
185
+ type: Output
186
+ }], codeCompleted: [{
187
+ type: Output
194
188
  }] } });
195
189
 
196
- class Fs2faVerificationComponent {
197
- constructor(verificationProvider, _cdRef, _dialog) {
198
- this.verificationProvider = verificationProvider;
199
- this._cdRef = _cdRef;
200
- this._dialog = _dialog;
201
- this.verified = new EventEmitter();
202
- this.codeChanged = new EventEmitter();
203
- this.codeCompleted = new EventEmitter();
204
- this.resendInProgress = false;
205
- this.code = '';
206
- this.trustedDevice = true;
207
- this.FsVerificationMethodType = FsVerificationMethodType;
208
- this._destroy$ = new Subject();
209
- }
210
- ngOnInit() {
211
- this.codeChanged
212
- .pipe(takeUntil(this._destroy$))
213
- .subscribe((code) => {
214
- this.code = code;
215
- });
216
- }
217
- ngOnDestroy() {
218
- this._destroy$.next();
219
- this._destroy$.complete();
220
- }
221
- verify() {
222
- this.verificationProvider
223
- .verify(this.code, this.trustedDevice)
224
- .subscribe((response) => {
225
- this.verified.emit(response);
226
- });
227
- }
228
- ;
229
- ngAfterViewInit() {
230
- this.verificationCodeComponent.focus();
231
- }
232
- resend() {
233
- this.resendInProgress = true;
234
- this.code = '';
235
- this.verificationProvider
236
- .resend()
237
- .pipe(takeUntil(this._destroy$))
238
- .subscribe(() => {
239
- this.resendInProgress = false;
240
- this.verificationCodeComponent.focus();
241
- this._cdRef.markForCheck();
242
- });
243
- }
244
- showVerificationMethods() {
245
- this._dialog.open(Fs2faVerificationMethodsComponent, {
246
- data: {
247
- method: this.method,
248
- }
249
- })
250
- .afterClosed()
251
- .pipe(filter((method) => !!method))
252
- .subscribe((method) => {
253
- this.method = method;
254
- this.code = '';
255
- this._cdRef.markForCheck();
256
- setTimeout(() => {
257
- this.verificationCodeComponent.focus();
258
- });
259
- });
260
- }
261
- }
262
- Fs2faVerificationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationComponent, deps: [{ token: FS_2FA_VERIFICATION_PROVIDER }, { token: i0.ChangeDetectorRef }, { token: i3.FsDialog }], target: i0.ɵɵFactoryTarget.Component });
263
- Fs2faVerificationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2faVerificationComponent, selector: "fs-2fa-verification", inputs: { method: "method" }, outputs: { verified: "verified", codeChanged: "codeChanged", codeCompleted: "codeCompleted" }, viewQueries: [{ propertyName: "verificationCodeComponent", first: true, predicate: Fs2faVerificationCodeComponent, descendants: true }], ngImport: i0, template: "<div class=\"code-container\">\n <fs-2fa-verification-code\n [method]=\"method\"\n [code]=\"code\"\n (codeChanged)=\"codeChanged.emit($event)\"\n (codeCompleted)=\"codeCompleted.emit()\">\n </fs-2fa-verification-code>\n</div>\n\n<div class=\"additional\">\n <mat-checkbox\n name=\"trust-device\"\n [(ngModel)]=\"trustedDevice\">\n Trust this device\n </mat-checkbox>\n\n <span class=\"resend-code-btn\">\n <ng-container *ngIf=\"!resendInProgress else sending\">\n <a (click)=\"resend()\">\n Resend Code\n </a>\n </ng-container>\n <ng-template #sending>\n <mat-spinner [diameter]=\"12\"></mat-spinner> Sending\n </ng-template>\n </span>\n</div>", styles: [".code-container{text-align:center}.additional{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:10px}.additional .resend-code-btn{cursor:pointer;text-transform:none}.additional .resend-code-btn mat-spinner{display:inline-block;vertical-align:middle}\n"], components: [{ type: Fs2faVerificationCodeComponent, selector: "fs-2fa-verification-code", inputs: ["method", "code"], outputs: ["codeChanged", "codeCompleted"] }, { type: i3$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: i4$1.MatSpinner, selector: "mat-spinner", inputs: ["color"] }], directives: [{ type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
264
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationComponent, decorators: [{
265
- type: Component,
266
- args: [{
267
- selector: 'fs-2fa-verification',
268
- templateUrl: './2fa-verification.component.html',
269
- styleUrls: [
270
- './2fa-verification.component.scss',
271
- ],
272
- changeDetection: ChangeDetectionStrategy.OnPush,
273
- }]
274
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
275
- type: Inject,
276
- args: [FS_2FA_VERIFICATION_PROVIDER]
277
- }] }, { type: i0.ChangeDetectorRef }, { type: i3.FsDialog }]; }, propDecorators: { verificationCodeComponent: [{
278
- type: ViewChild,
279
- args: [Fs2faVerificationCodeComponent]
280
- }], method: [{
281
- type: Input
282
- }], verified: [{
283
- type: Output
284
- }], codeChanged: [{
285
- type: Output
286
- }], codeCompleted: [{
287
- type: Output
190
+ class Fs2faVerificationComponent {
191
+ constructor(_cdRef, _dialog) {
192
+ this._cdRef = _cdRef;
193
+ this._dialog = _dialog;
194
+ this.verified = new EventEmitter();
195
+ this.codeChanged = new EventEmitter();
196
+ this.codeCompleted = new EventEmitter();
197
+ this.resendInProgress = false;
198
+ this.code = '';
199
+ this.trustedDevice = true;
200
+ this.FsVerificationMethodType = FsVerificationMethodType;
201
+ this._destroy$ = new Subject();
202
+ }
203
+ ngOnInit() {
204
+ this.codeChanged
205
+ .pipe(takeUntil(this._destroy$))
206
+ .subscribe((code) => {
207
+ this.code = code;
208
+ });
209
+ }
210
+ ngOnDestroy() {
211
+ this._destroy$.next();
212
+ this._destroy$.complete();
213
+ }
214
+ ngAfterViewInit() {
215
+ this.verificationCodeComponent.focus();
216
+ }
217
+ resendCode() {
218
+ this.resendInProgress = true;
219
+ this.code = '';
220
+ this.resend()
221
+ .pipe(takeUntil(this._destroy$))
222
+ .subscribe(() => {
223
+ this.resendInProgress = false;
224
+ this.verificationCodeComponent.focus();
225
+ this._cdRef.markForCheck();
226
+ });
227
+ }
228
+ showVerificationMethods() {
229
+ this._dialog.open(Fs2faVerificationMethodsComponent, {
230
+ data: {
231
+ method: this.method,
232
+ getVerificationMethods: this.getVerificationMethods,
233
+ selectVerificationMethod: this.selectVerificationMethod,
234
+ }
235
+ })
236
+ .afterClosed()
237
+ .pipe(filter((method) => !!method))
238
+ .subscribe((method) => {
239
+ this.method = method;
240
+ this.code = '';
241
+ this._cdRef.markForCheck();
242
+ setTimeout(() => {
243
+ this.verificationCodeComponent.focus();
244
+ });
245
+ });
246
+ }
247
+ }
248
+ Fs2faVerificationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i3.FsDialog }], target: i0.ɵɵFactoryTarget.Component });
249
+ Fs2faVerificationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2faVerificationComponent, selector: "fs-2fa-verification", inputs: { method: "method", resend: "resend", getVerificationMethods: "getVerificationMethods", selectVerificationMethod: "selectVerificationMethod" }, outputs: { verified: "verified", codeChanged: "codeChanged", codeCompleted: "codeCompleted" }, viewQueries: [{ propertyName: "verificationCodeComponent", first: true, predicate: Fs2faVerificationCodeComponent, descendants: true }], ngImport: i0, template: "<div class=\"code-container\">\n <fs-2fa-verification-code\n [method]=\"method\"\n [code]=\"code\"\n (codeChanged)=\"codeChanged.emit($event)\"\n (codeCompleted)=\"codeCompleted.emit()\">\n </fs-2fa-verification-code>\n</div>\n\n<div class=\"additional\">\n <mat-checkbox\n name=\"trust-device\"\n [(ngModel)]=\"trustedDevice\">\n Trust this device\n </mat-checkbox>\n\n <span class=\"resend-code-btn\">\n <ng-container *ngIf=\"!resendInProgress else sending\">\n <a (click)=\"resendCode()\">\n Resend Code\n </a>\n </ng-container>\n <ng-template #sending>\n <mat-spinner [diameter]=\"12\"></mat-spinner> Sending\n </ng-template>\n </span>\n</div>", styles: [".code-container{text-align:center}.additional{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:10px}.additional .resend-code-btn{cursor:pointer;text-transform:none}.additional .resend-code-btn mat-spinner{display:inline-block;vertical-align:middle}\n"], components: [{ type: Fs2faVerificationCodeComponent, selector: "fs-2fa-verification-code", inputs: ["method", "code"], outputs: ["codeChanged", "codeCompleted"] }, { type: i3$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: i4$1.MatSpinner, selector: "mat-spinner", inputs: ["color"] }], directives: [{ type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
250
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationComponent, decorators: [{
251
+ type: Component,
252
+ args: [{
253
+ selector: 'fs-2fa-verification',
254
+ templateUrl: './2fa-verification.component.html',
255
+ styleUrls: [
256
+ './2fa-verification.component.scss',
257
+ ],
258
+ changeDetection: ChangeDetectionStrategy.OnPush,
259
+ }]
260
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i3.FsDialog }]; }, propDecorators: { verificationCodeComponent: [{
261
+ type: ViewChild,
262
+ args: [Fs2faVerificationCodeComponent]
263
+ }], method: [{
264
+ type: Input
265
+ }], resend: [{
266
+ type: Input
267
+ }], getVerificationMethods: [{
268
+ type: Input
269
+ }], selectVerificationMethod: [{
270
+ type: Input
271
+ }], verified: [{
272
+ type: Output
273
+ }], codeChanged: [{
274
+ type: Output
275
+ }], codeCompleted: [{
276
+ type: Output
288
277
  }] } });
289
278
 
290
- class CodeInputModule {
291
- }
292
- CodeInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CodeInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
293
- CodeInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CodeInputModule, declarations: [CodeInputComponent], imports: [CodeInputModule$1], exports: [CodeInputComponent] });
294
- CodeInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CodeInputModule, imports: [[
295
- CodeInputModule$1,
296
- ]] });
297
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CodeInputModule, decorators: [{
298
- type: NgModule,
299
- args: [{
300
- imports: [
301
- CodeInputModule$1,
302
- ],
303
- declarations: [
304
- CodeInputComponent,
305
- ],
306
- exports: [
307
- CodeInputComponent,
308
- ],
309
- }]
279
+ class CodeInputModule {
280
+ }
281
+ CodeInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CodeInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
282
+ CodeInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CodeInputModule, declarations: [CodeInputComponent], imports: [CodeInputModule$1], exports: [CodeInputComponent] });
283
+ CodeInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CodeInputModule, imports: [[
284
+ CodeInputModule$1,
285
+ ]] });
286
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CodeInputModule, decorators: [{
287
+ type: NgModule,
288
+ args: [{
289
+ imports: [
290
+ CodeInputModule$1,
291
+ ],
292
+ declarations: [
293
+ CodeInputComponent,
294
+ ],
295
+ exports: [
296
+ CodeInputComponent,
297
+ ],
298
+ }]
310
299
  }] });
311
300
 
312
- class Fs2faVerificationModule {
313
- }
314
- Fs2faVerificationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
315
- Fs2faVerificationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationModule, declarations: [Fs2faVerificationComponent,
316
- Fs2faVerificationCodeComponent,
317
- Fs2faVerificationMethodsComponent], imports: [CommonModule,
318
- FormsModule,
319
- MatFormFieldModule,
320
- MatInputModule,
321
- MatButtonModule,
322
- FsFormModule,
323
- FsRadioGroupModule,
324
- FsDialogModule,
325
- CodeInputModule,
326
- MatCheckboxModule,
327
- MatProgressSpinnerModule,
328
- FsSkeletonModule,
329
- FsSkeletonModule,
330
- MatIconModule,
331
- MatRadioModule], exports: [Fs2faVerificationComponent] });
332
- Fs2faVerificationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationModule, providers: [], imports: [[
333
- CommonModule,
334
- FormsModule,
335
- MatFormFieldModule,
336
- MatInputModule,
337
- MatButtonModule,
338
- FsFormModule,
339
- FsRadioGroupModule,
340
- FsDialogModule,
341
- CodeInputModule,
342
- MatCheckboxModule,
343
- MatProgressSpinnerModule,
344
- FsSkeletonModule,
345
- FsSkeletonModule,
346
- MatIconModule,
347
- MatRadioModule,
348
- ]] });
349
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationModule, decorators: [{
350
- type: NgModule,
351
- args: [{
352
- imports: [
353
- CommonModule,
354
- FormsModule,
355
- MatFormFieldModule,
356
- MatInputModule,
357
- MatButtonModule,
358
- FsFormModule,
359
- FsRadioGroupModule,
360
- FsDialogModule,
361
- CodeInputModule,
362
- MatCheckboxModule,
363
- MatProgressSpinnerModule,
364
- FsSkeletonModule,
365
- FsSkeletonModule,
366
- MatIconModule,
367
- MatRadioModule,
368
- ],
369
- declarations: [
370
- Fs2faVerificationComponent,
371
- Fs2faVerificationCodeComponent,
372
- Fs2faVerificationMethodsComponent,
373
- ],
374
- exports: [
375
- Fs2faVerificationComponent,
376
- ],
377
- providers: [],
378
- }]
301
+ class Fs2faVerificationModule {
302
+ }
303
+ Fs2faVerificationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
304
+ Fs2faVerificationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationModule, declarations: [Fs2faVerificationComponent,
305
+ Fs2faVerificationCodeComponent,
306
+ Fs2faVerificationMethodsComponent], imports: [CommonModule,
307
+ FormsModule,
308
+ MatFormFieldModule,
309
+ MatInputModule,
310
+ MatButtonModule,
311
+ FsFormModule,
312
+ FsRadioGroupModule,
313
+ FsDialogModule,
314
+ CodeInputModule,
315
+ MatCheckboxModule,
316
+ MatProgressSpinnerModule,
317
+ FsSkeletonModule,
318
+ FsSkeletonModule,
319
+ MatIconModule,
320
+ MatRadioModule], exports: [Fs2faVerificationComponent] });
321
+ Fs2faVerificationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationModule, providers: [], imports: [[
322
+ CommonModule,
323
+ FormsModule,
324
+ MatFormFieldModule,
325
+ MatInputModule,
326
+ MatButtonModule,
327
+ FsFormModule,
328
+ FsRadioGroupModule,
329
+ FsDialogModule,
330
+ CodeInputModule,
331
+ MatCheckboxModule,
332
+ MatProgressSpinnerModule,
333
+ FsSkeletonModule,
334
+ FsSkeletonModule,
335
+ MatIconModule,
336
+ MatRadioModule,
337
+ ]] });
338
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationModule, decorators: [{
339
+ type: NgModule,
340
+ args: [{
341
+ imports: [
342
+ CommonModule,
343
+ FormsModule,
344
+ MatFormFieldModule,
345
+ MatInputModule,
346
+ MatButtonModule,
347
+ FsFormModule,
348
+ FsRadioGroupModule,
349
+ FsDialogModule,
350
+ CodeInputModule,
351
+ MatCheckboxModule,
352
+ MatProgressSpinnerModule,
353
+ FsSkeletonModule,
354
+ FsSkeletonModule,
355
+ MatIconModule,
356
+ MatRadioModule,
357
+ ],
358
+ declarations: [
359
+ Fs2faVerificationComponent,
360
+ Fs2faVerificationCodeComponent,
361
+ Fs2faVerificationMethodsComponent,
362
+ ],
363
+ exports: [
364
+ Fs2faVerificationComponent,
365
+ ],
366
+ providers: [],
367
+ }]
379
368
  }] });
380
369
 
381
- class AppComponent {
382
- constructor(_data, _dialogRef, _cdRef, _message) {
383
- this._data = _data;
384
- this._dialogRef = _dialogRef;
385
- this._cdRef = _cdRef;
386
- this._message = _message;
387
- this.mode = 'qr-code';
388
- this.verify = () => {
389
- return this.twoFactorManageService.verificationMethodVerify(this.code)
390
- .pipe(tap(() => {
391
- this._message.success('Created app authenticator verification method');
392
- this._dialogRef.close(true);
393
- }));
394
- };
395
- }
396
- ngOnInit() {
397
- this.twoFactorManageService = this._data.twoFactorManageService;
398
- this.accountId = this._data.accountId;
399
- this.default = !this.twoFactorManageService.hasVerificationMethods;
400
- }
401
- appTypeGoogle() {
402
- this.appTypeSelect('google');
403
- }
404
- appTypeAuthy() {
405
- this.appTypeSelect('authy');
406
- }
407
- appTypeSelect(appType) {
408
- this.appType = appType;
409
- this.twoFactorManageService.verificationMethodCreate({
410
- type: 'app',
411
- default: this.default,
412
- })
413
- .subscribe((response) => {
414
- this.qrCodeUrl = response.qrCodeUrl;
415
- this._cdRef.markForCheck();
416
- });
417
- }
418
- codeCompleted() {
419
- this.form.triggerSubmit();
420
- }
421
- codeChanged(code) {
422
- this.code = code;
423
- this.form.dirty();
424
- }
425
- next() {
426
- this.mode = 'code-input';
427
- }
428
- }
429
- AppComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AppComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i0.ChangeDetectorRef }, { token: i2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
430
- AppComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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 <qr-code \n *fsSkeleton=\"qrCodeUrl\"\n [value]=\"qrCodeUrl\"\n size=\"200\"\n errorCorrectionLevel=\"H\"\n [margin]=\"0\">\n </qr-code> \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\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 </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 [codeLength]=\"6\"\n (codeChanged)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted()\">\n </app-code-input>\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}qr-code{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}.app-types mat-checkbox{margin-top:20px}.app-types mat-checkbox ::ng-deep .mat-ripple{display:none}\n"], components: [{ type: i3.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i4$2.QrCodeComponent, selector: "qr-code", inputs: ["value", "size", "darkColor", "lightColor", "errorCorrectionLevel", "centerImageSrc", "centerImageSize", "margin"] }, { type: i3$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: CodeInputComponent, selector: "app-code-input", inputs: ["codeLength", "code"], outputs: ["codeCompleted", "codeChanged"] }, { type: i7.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.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i8.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9$1.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i9.FsSubmitButtonDirective, selector: "button[type=\"submit\"]", inputs: ["name", "dirtySubmit"] }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
431
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AppComponent, decorators: [{
432
- type: Component,
433
- args: [{
434
- templateUrl: './app.component.html',
435
- styleUrls: ['./app.component.scss'],
436
- changeDetection: ChangeDetectionStrategy.OnPush,
437
- }]
438
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
439
- type: Inject,
440
- args: [MAT_DIALOG_DATA]
441
- }] }, { type: i1.MatDialogRef }, { type: i0.ChangeDetectorRef }, { type: i2.FsMessage }]; }, propDecorators: { form: [{
442
- type: ViewChild,
443
- args: [FsFormDirective]
370
+ class AppComponent {
371
+ constructor(_data, _dialogRef, _cdRef, _message) {
372
+ this._data = _data;
373
+ this._dialogRef = _dialogRef;
374
+ this._cdRef = _cdRef;
375
+ this._message = _message;
376
+ this.mode = 'qr-code';
377
+ this.verify = () => {
378
+ return this.twoFactorManageService.verificationMethodVerify(this.code)
379
+ .pipe(tap(() => {
380
+ this._message.success('Created app authenticator verification method');
381
+ this._dialogRef.close(true);
382
+ }));
383
+ };
384
+ }
385
+ ngOnInit() {
386
+ this.twoFactorManageService = this._data.twoFactorManageService;
387
+ this.accountId = this._data.accountId;
388
+ this.default = !this.twoFactorManageService.hasVerificationMethods;
389
+ }
390
+ appTypeGoogle() {
391
+ this.appTypeSelect('google');
392
+ }
393
+ appTypeAuthy() {
394
+ this.appTypeSelect('authy');
395
+ }
396
+ appTypeSelect(appType) {
397
+ this.appType = appType;
398
+ this.twoFactorManageService.verificationMethodCreate({
399
+ type: 'app',
400
+ default: this.default,
401
+ })
402
+ .subscribe((response) => {
403
+ this.qrCodeUrl = response.qrCodeUrl;
404
+ this._cdRef.markForCheck();
405
+ });
406
+ }
407
+ codeCompleted() {
408
+ this.form.triggerSubmit();
409
+ }
410
+ codeChanged(code) {
411
+ this.code = code;
412
+ this.form.dirty();
413
+ }
414
+ next() {
415
+ this.mode = 'code-input';
416
+ }
417
+ }
418
+ AppComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AppComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i0.ChangeDetectorRef }, { token: i2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
419
+ AppComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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 <qr-code \n *fsSkeleton=\"qrCodeUrl\"\n [value]=\"qrCodeUrl\"\n size=\"200\"\n errorCorrectionLevel=\"H\"\n [margin]=\"0\">\n </qr-code> \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\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 </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 [codeLength]=\"6\"\n (codeChanged)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted()\">\n </app-code-input>\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}qr-code{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}.app-types mat-checkbox{margin-top:20px}.app-types mat-checkbox ::ng-deep .mat-ripple{display:none}\n"], components: [{ type: i3.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i4$2.QrCodeComponent, selector: "qr-code", inputs: ["value", "size", "darkColor", "lightColor", "errorCorrectionLevel", "centerImageSrc", "centerImageSize", "margin"] }, { type: i3$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: CodeInputComponent, selector: "app-code-input", inputs: ["codeLength", "code"], outputs: ["codeCompleted", "codeChanged"] }, { type: i7.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.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i8.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9$1.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i9.FsSubmitButtonDirective, selector: "button[type=\"submit\"]", inputs: ["name", "dirtySubmit"] }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
420
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AppComponent, decorators: [{
421
+ type: Component,
422
+ args: [{
423
+ templateUrl: './app.component.html',
424
+ styleUrls: ['./app.component.scss'],
425
+ changeDetection: ChangeDetectionStrategy.OnPush,
426
+ }]
427
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
428
+ type: Inject,
429
+ args: [MAT_DIALOG_DATA]
430
+ }] }, { type: i1.MatDialogRef }, { type: i0.ChangeDetectorRef }, { type: i2.FsMessage }]; }, propDecorators: { form: [{
431
+ type: ViewChild,
432
+ args: [FsFormDirective]
444
433
  }] } });
445
434
 
446
- class EmailComponent {
447
- constructor(_data, _dialogRef, _cdRef, _message) {
448
- this._data = _data;
449
- this._dialogRef = _dialogRef;
450
- this._cdRef = _cdRef;
451
- this._message = _message;
452
- this.verificationMethod = null;
453
- this.submit = () => {
454
- return of(true)
455
- .pipe(switchMap(() => {
456
- return this.verificationMethod ?
457
- this.twoFactorManageService.verificationMethodVerify(this.code)
458
- .pipe(tap((verificationMethod) => {
459
- this._message.success('Created email verification method');
460
- this._dialogRef.close(verificationMethod);
461
- })) :
462
- this.twoFactorManageService.verificationMethodCreate({
463
- type: 'email',
464
- email: this.email,
465
- default: this.default,
466
- })
467
- .pipe(tap((verificationMethod) => {
468
- this.verificationMethod = verificationMethod;
469
- this.form.clear();
470
- this._cdRef.markForCheck();
471
- }));
472
- }));
473
- };
474
- this.twoFactorManageService = _data.twoFactorManageService;
475
- this.default = !this.twoFactorManageService.hasVerificationMethods;
476
- }
477
- resend() {
478
- this.twoFactorManageService.verificationMethodResend()
479
- .subscribe(() => {
480
- this._message.success('Resent verification code');
481
- });
482
- }
483
- codeCompleted() {
484
- if (!this.form.submitting) {
485
- this.form.triggerSubmit();
486
- }
487
- }
488
- codeChanged(code) {
489
- this.code = code;
490
- }
491
- }
492
- EmailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EmailComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i0.ChangeDetectorRef }, { token: i2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
493
- EmailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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 <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.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: CodeInputComponent, selector: "app-code-input", inputs: ["codeLength", "code"], outputs: ["codeCompleted", "codeChanged"] }, { type: i5$1.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i3$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.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.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i8.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.MatLabel, selector: "mat-label" }, { type: i11.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.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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i9.FsFormEmailDirective, selector: "[fsFormEmail]", inputs: ["fsFormEmail", "fsFormEmailMessage"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i9.FsSubmitButtonDirective, selector: "button[type=\"submit\"]", inputs: ["name", "dirtySubmit"] }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
494
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EmailComponent, decorators: [{
495
- type: Component,
496
- args: [{
497
- templateUrl: './email.component.html',
498
- styleUrls: ['./email.component.scss'],
499
- changeDetection: ChangeDetectionStrategy.OnPush,
500
- }]
501
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
502
- type: Inject,
503
- args: [MAT_DIALOG_DATA]
504
- }] }, { type: i1.MatDialogRef }, { type: i0.ChangeDetectorRef }, { type: i2.FsMessage }]; }, propDecorators: { form: [{
505
- type: ViewChild,
506
- args: [FsFormDirective, { static: false }]
435
+ class EmailComponent {
436
+ constructor(_data, _dialogRef, _cdRef, _message) {
437
+ this._data = _data;
438
+ this._dialogRef = _dialogRef;
439
+ this._cdRef = _cdRef;
440
+ this._message = _message;
441
+ this.verificationMethod = null;
442
+ this.submit = () => {
443
+ return of(true)
444
+ .pipe(switchMap(() => {
445
+ return this.verificationMethod ?
446
+ this.twoFactorManageService.verificationMethodVerify(this.code)
447
+ .pipe(tap((verificationMethod) => {
448
+ this._message.success('Created email verification method');
449
+ this._dialogRef.close(verificationMethod);
450
+ })) :
451
+ this.twoFactorManageService.verificationMethodCreate({
452
+ type: 'email',
453
+ email: this.email,
454
+ default: this.default,
455
+ })
456
+ .pipe(tap((verificationMethod) => {
457
+ this.verificationMethod = verificationMethod;
458
+ this.form.clear();
459
+ this._cdRef.markForCheck();
460
+ }));
461
+ }));
462
+ };
463
+ this.twoFactorManageService = _data.twoFactorManageService;
464
+ this.default = !this.twoFactorManageService.hasVerificationMethods;
465
+ }
466
+ resend() {
467
+ this.twoFactorManageService.verificationMethodResend()
468
+ .subscribe(() => {
469
+ this._message.success('Resent verification code');
470
+ });
471
+ }
472
+ codeCompleted() {
473
+ if (!this.form.submitting) {
474
+ this.form.triggerSubmit();
475
+ }
476
+ }
477
+ codeChanged(code) {
478
+ this.code = code;
479
+ }
480
+ }
481
+ EmailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EmailComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i0.ChangeDetectorRef }, { token: i2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
482
+ EmailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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 <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.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: CodeInputComponent, selector: "app-code-input", inputs: ["codeLength", "code"], outputs: ["codeCompleted", "codeChanged"] }, { type: i5$1.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i3$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.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.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i8.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.MatLabel, selector: "mat-label" }, { type: i11.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.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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i9.FsFormEmailDirective, selector: "[fsFormEmail]", inputs: ["fsFormEmail", "fsFormEmailMessage"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i9.FsSubmitButtonDirective, selector: "button[type=\"submit\"]", inputs: ["name", "dirtySubmit"] }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
483
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EmailComponent, decorators: [{
484
+ type: Component,
485
+ args: [{
486
+ templateUrl: './email.component.html',
487
+ styleUrls: ['./email.component.scss'],
488
+ changeDetection: ChangeDetectionStrategy.OnPush,
489
+ }]
490
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
491
+ type: Inject,
492
+ args: [MAT_DIALOG_DATA]
493
+ }] }, { type: i1.MatDialogRef }, { type: i0.ChangeDetectorRef }, { type: i2.FsMessage }]; }, propDecorators: { form: [{
494
+ type: ViewChild,
495
+ args: [FsFormDirective, { static: false }]
507
496
  }] } });
508
497
 
509
- class NumberComponent {
510
- constructor(_data, _dialogRef, _cdRef, _message) {
511
- this._data = _data;
512
- this._dialogRef = _dialogRef;
513
- this._cdRef = _cdRef;
514
- this._message = _message;
515
- this.verificationMethod = null;
516
- this.submit = () => {
517
- return of(true)
518
- .pipe(switchMap(() => {
519
- return this.verificationMethod ?
520
- this.twoFactorManageService.verificationMethodVerify(this.code)
521
- .pipe(tap((verificationMethod) => {
522
- this._message.success('Created text message verification method');
523
- this._dialogRef.close(verificationMethod);
524
- })) :
525
- this.twoFactorManageService.verificationMethodCreate({
526
- type: 'sms',
527
- phoneNumber: this.phone.number,
528
- phoneCode: this.phone.countryCode,
529
- phoneCountry: this.phone.isoCode,
530
- default: this.default,
531
- }).pipe(tap((verificationMethod) => {
532
- this.verificationMethod = verificationMethod;
533
- this.form.clear();
534
- this._cdRef.markForCheck();
535
- }));
536
- }));
537
- };
538
- this.twoFactorManageService = _data.twoFactorManageService;
539
- this.defaultCountry = _data.defaultCountry;
540
- this.default = !this.twoFactorManageService.hasVerificationMethods;
541
- }
542
- resend() {
543
- this.twoFactorManageService.verificationMethodResend()
544
- .subscribe(() => {
545
- this._message.success('Resent verification code');
546
- });
547
- }
548
- codeCompleted() {
549
- if (!this.form.submitting) {
550
- this.form.triggerSubmit();
551
- }
552
- }
553
- codeChanged(code) {
554
- this.code = code;
555
- }
556
- }
557
- NumberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NumberComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i0.ChangeDetectorRef }, { token: i2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
558
- NumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NumberComponent, selector: "ng-component", viewQueries: [{ propertyName: "form", first: true, predicate: FsFormDirective, descendants: true }], ngImport: i0, template: "<form fsForm [submit]=\"submit\" autocomplete=\"off\">\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 <p>The app just sent you a text message 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 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 <fs-phone-field\n [(ngModel)]=\"phone\"\n [country]=\"defaultCountry\"\n name=\"phone\"\n autocomplete=\"off\"\n [required]=\"true\">\n </fs-phone-field>\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}app-code-input{margin-bottom:10px;display:block}mat-form-field{width:100%}mat-dialog-content{width:400px}p{margin-top:0}\n"], components: [{ type: i3.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: CodeInputComponent, selector: "app-code-input", inputs: ["codeLength", "code"], outputs: ["codeCompleted", "codeChanged"] }, { type: i5$1.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i6.FsPhoneFieldComponent, selector: "fs-phone-field", inputs: ["allowNumberExt", "placeholder", "required", "disabled", "mode", "country"] }, { type: i3$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.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.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i8.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.MatLabel, selector: "mat-label" }, { type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i8.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i9.FsSubmitButtonDirective, selector: "button[type=\"submit\"]", inputs: ["name", "dirtySubmit"] }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
559
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NumberComponent, decorators: [{
560
- type: Component,
561
- args: [{
562
- templateUrl: './number.component.html',
563
- styleUrls: ['./number.component.scss'],
564
- changeDetection: ChangeDetectionStrategy.OnPush,
565
- }]
566
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
567
- type: Inject,
568
- args: [MAT_DIALOG_DATA]
569
- }] }, { type: i1.MatDialogRef }, { type: i0.ChangeDetectorRef }, { type: i2.FsMessage }]; }, propDecorators: { form: [{
570
- type: ViewChild,
571
- args: [FsFormDirective, { static: false }]
498
+ class NumberComponent {
499
+ constructor(_data, _dialogRef, _cdRef, _message) {
500
+ this._data = _data;
501
+ this._dialogRef = _dialogRef;
502
+ this._cdRef = _cdRef;
503
+ this._message = _message;
504
+ this.verificationMethod = null;
505
+ this.submit = () => {
506
+ return of(true)
507
+ .pipe(switchMap(() => {
508
+ return this.verificationMethod ?
509
+ this.twoFactorManageService.verificationMethodVerify(this.code)
510
+ .pipe(tap((verificationMethod) => {
511
+ this._message.success('Created text message verification method');
512
+ this._dialogRef.close(verificationMethod);
513
+ })) :
514
+ this.twoFactorManageService.verificationMethodCreate({
515
+ type: 'sms',
516
+ phoneNumber: this.phone.number,
517
+ phoneCode: this.phone.countryCode,
518
+ phoneCountry: this.phone.isoCode,
519
+ default: this.default,
520
+ }).pipe(tap((verificationMethod) => {
521
+ this.verificationMethod = verificationMethod;
522
+ this.form.clear();
523
+ this._cdRef.markForCheck();
524
+ }));
525
+ }));
526
+ };
527
+ this.twoFactorManageService = _data.twoFactorManageService;
528
+ this.defaultCountry = _data.defaultCountry;
529
+ this.default = !this.twoFactorManageService.hasVerificationMethods;
530
+ }
531
+ resend() {
532
+ this.twoFactorManageService.verificationMethodResend()
533
+ .subscribe(() => {
534
+ this._message.success('Resent verification code');
535
+ });
536
+ }
537
+ codeCompleted() {
538
+ if (!this.form.submitting) {
539
+ this.form.triggerSubmit();
540
+ }
541
+ }
542
+ codeChanged(code) {
543
+ this.code = code;
544
+ }
545
+ }
546
+ NumberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NumberComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i0.ChangeDetectorRef }, { token: i2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
547
+ NumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NumberComponent, selector: "ng-component", viewQueries: [{ propertyName: "form", first: true, predicate: FsFormDirective, descendants: true }], ngImport: i0, template: "<form fsForm [submit]=\"submit\" autocomplete=\"off\">\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 <p>The app just sent you a text message 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 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 <fs-phone-field\n [(ngModel)]=\"phone\"\n [country]=\"defaultCountry\"\n name=\"phone\"\n autocomplete=\"off\"\n [required]=\"true\">\n </fs-phone-field>\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}app-code-input{margin-bottom:10px;display:block}mat-form-field{width:100%}mat-dialog-content{width:400px}p{margin-top:0}\n"], components: [{ type: i3.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: CodeInputComponent, selector: "app-code-input", inputs: ["codeLength", "code"], outputs: ["codeCompleted", "codeChanged"] }, { type: i5$1.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i6.FsPhoneFieldComponent, selector: "fs-phone-field", inputs: ["allowNumberExt", "placeholder", "required", "disabled", "mode", "country"] }, { type: i3$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.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.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i8.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.MatLabel, selector: "mat-label" }, { type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i8.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i9.FsSubmitButtonDirective, selector: "button[type=\"submit\"]", inputs: ["name", "dirtySubmit"] }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
548
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NumberComponent, decorators: [{
549
+ type: Component,
550
+ args: [{
551
+ templateUrl: './number.component.html',
552
+ styleUrls: ['./number.component.scss'],
553
+ changeDetection: ChangeDetectionStrategy.OnPush,
554
+ }]
555
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
556
+ type: Inject,
557
+ args: [MAT_DIALOG_DATA]
558
+ }] }, { type: i1.MatDialogRef }, { type: i0.ChangeDetectorRef }, { type: i2.FsMessage }]; }, propDecorators: { form: [{
559
+ type: ViewChild,
560
+ args: [FsFormDirective, { static: false }]
572
561
  }] } });
573
562
 
574
- class TwoFactorManageService {
575
- constructor(_dialog) {
576
- this._dialog = _dialog;
577
- this._destroy$ = new Subject();
578
- this._verificationMethods$ = new BehaviorSubject([]);
579
- }
580
- get verificationMethods$() {
581
- return this._verificationMethods$
582
- .pipe(takeUntil(this._destroy$));
583
- }
584
- get verificationMethods() {
585
- return this._verificationMethods$.getValue();
586
- }
587
- get hasVerificationMethods() {
588
- return !!this._verificationMethods$.getValue().length;
589
- }
590
- get emailVerificationMethods() {
591
- return this.getVerificationMethods(FsVerificationMethodType.Email);
592
- }
593
- get smsVerificationMethods() {
594
- return this.getVerificationMethods(FsVerificationMethodType.Sms);
595
- }
596
- get appVerificationMethods() {
597
- return this.getVerificationMethods(FsVerificationMethodType.App);
598
- }
599
- getVerificationMethods(type) {
600
- return this.verificationMethods
601
- .filter((verificationMethod) => {
602
- return verificationMethod.type === type;
603
- });
604
- }
605
- hasVerificationMethod(type) {
606
- return this.verificationMethods
607
- .some((verificationMethod) => {
608
- return verificationMethod.type === type;
609
- });
610
- }
611
- registerVerificationMethodResend(value) {
612
- this._verificationMethodResend = value;
613
- }
614
- registerVerificationMethodFetch(value) {
615
- this._verificationMethodFetch = value;
616
- }
617
- registerVerificationMethodDelete(value) {
618
- this._verificationMethodDelete = value;
619
- }
620
- registerVerificationMethodCreate(value) {
621
- this._verificationMethodCreate = value;
622
- }
623
- registerVerificationMethodVerify(value) {
624
- this._verificationMethodVerify = value;
625
- }
626
- registerAccountVerify(value) {
627
- this._accountVerify = value;
628
- }
629
- verificationMethodDelete(verificationMethod) {
630
- return this._verificationMethodDelete(verificationMethod)
631
- .pipe(tap(() => {
632
- this.verificationMethodFetch();
633
- }));
634
- }
635
- verificationMethodVerify(verificationMethod) {
636
- return this._verificationMethodVerify(verificationMethod)
637
- .pipe(tap(() => {
638
- this.verificationMethodFetch();
639
- }));
640
- }
641
- verificationMethodCreate(verificationMethod) {
642
- return this._verificationMethodCreate(verificationMethod);
643
- }
644
- verificationMethodResend() {
645
- return this._verificationMethodResend();
646
- }
647
- verificationMethodFetch() {
648
- this._verificationMethodFetch()
649
- .subscribe((verificationMethods) => {
650
- this._verificationMethods$.next(verificationMethods);
651
- });
652
- }
653
- accountVerify() {
654
- return this._accountVerify();
655
- }
656
- ngOnDestroy() {
657
- this._destroy$.next();
658
- this._destroy$.complete();
659
- }
660
- addSms(defaultCountry) {
661
- return this.accountVerify()
662
- .pipe(switchMap(() => this._dialog.open(NumberComponent, {
663
- data: {
664
- defaultCountry,
665
- twoFactorManageService: this,
666
- },
667
- })
668
- .afterClosed()), tap(() => {
669
- this.verificationMethodFetch();
670
- }), takeUntil(this._destroy$));
671
- }
672
- addEmail() {
673
- return this.accountVerify()
674
- .pipe(switchMap(() => this._dialog.open(EmailComponent, {
675
- data: { twoFactorManageService: this },
676
- })
677
- .afterClosed()), tap(() => {
678
- this.verificationMethodFetch();
679
- }), takeUntil(this._destroy$));
680
- }
681
- addApp() {
682
- return this.accountVerify()
683
- .pipe(switchMap(() => this._dialog.open(AppComponent, {
684
- data: { twoFactorManageService: this },
685
- })
686
- .afterClosed()), tap(() => {
687
- this.verificationMethodFetch();
688
- }), takeUntil(this._destroy$));
689
- }
690
- }
691
- TwoFactorManageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TwoFactorManageService, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
692
- TwoFactorManageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TwoFactorManageService });
693
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TwoFactorManageService, decorators: [{
694
- type: Injectable
563
+ class TwoFactorManageService {
564
+ constructor(_dialog) {
565
+ this._dialog = _dialog;
566
+ this._destroy$ = new Subject();
567
+ this._verificationMethods$ = new BehaviorSubject([]);
568
+ }
569
+ get verificationMethods$() {
570
+ return this._verificationMethods$
571
+ .pipe(takeUntil(this._destroy$));
572
+ }
573
+ get verificationMethods() {
574
+ return this._verificationMethods$.getValue();
575
+ }
576
+ get hasVerificationMethods() {
577
+ return !!this._verificationMethods$.getValue().length;
578
+ }
579
+ get emailVerificationMethods() {
580
+ return this.getVerificationMethods(FsVerificationMethodType.Email);
581
+ }
582
+ get smsVerificationMethods() {
583
+ return this.getVerificationMethods(FsVerificationMethodType.Sms);
584
+ }
585
+ get appVerificationMethods() {
586
+ return this.getVerificationMethods(FsVerificationMethodType.App);
587
+ }
588
+ getVerificationMethods(type) {
589
+ return this.verificationMethods
590
+ .filter((verificationMethod) => {
591
+ return verificationMethod.type === type;
592
+ });
593
+ }
594
+ hasVerificationMethod(type) {
595
+ return this.verificationMethods
596
+ .some((verificationMethod) => {
597
+ return verificationMethod.type === type;
598
+ });
599
+ }
600
+ registerVerificationMethodResend(value) {
601
+ this._verificationMethodResend = value;
602
+ }
603
+ registerVerificationMethodFetch(value) {
604
+ this._verificationMethodFetch = value;
605
+ }
606
+ registerVerificationMethodDelete(value) {
607
+ this._verificationMethodDelete = value;
608
+ }
609
+ registerVerificationMethodCreate(value) {
610
+ this._verificationMethodCreate = value;
611
+ }
612
+ registerVerificationMethodVerify(value) {
613
+ this._verificationMethodVerify = value;
614
+ }
615
+ registerAccountVerify(value) {
616
+ this._accountVerify = value;
617
+ }
618
+ verificationMethodDelete(verificationMethod) {
619
+ return this._verificationMethodDelete(verificationMethod)
620
+ .pipe(tap(() => {
621
+ this.verificationMethodFetch();
622
+ }));
623
+ }
624
+ verificationMethodVerify(verificationMethod) {
625
+ return this._verificationMethodVerify(verificationMethod)
626
+ .pipe(tap(() => {
627
+ this.verificationMethodFetch();
628
+ }));
629
+ }
630
+ verificationMethodCreate(verificationMethod) {
631
+ return this._verificationMethodCreate(verificationMethod);
632
+ }
633
+ verificationMethodResend() {
634
+ return this._verificationMethodResend();
635
+ }
636
+ verificationMethodFetch() {
637
+ this._verificationMethodFetch()
638
+ .subscribe((verificationMethods) => {
639
+ this._verificationMethods$.next(verificationMethods);
640
+ });
641
+ }
642
+ accountVerify() {
643
+ return this._accountVerify();
644
+ }
645
+ ngOnDestroy() {
646
+ this._destroy$.next();
647
+ this._destroy$.complete();
648
+ }
649
+ addSms(defaultCountry) {
650
+ return this.accountVerify()
651
+ .pipe(switchMap(() => this._dialog.open(NumberComponent, {
652
+ data: {
653
+ defaultCountry,
654
+ twoFactorManageService: this,
655
+ },
656
+ })
657
+ .afterClosed()), tap(() => {
658
+ this.verificationMethodFetch();
659
+ }), takeUntil(this._destroy$));
660
+ }
661
+ addEmail() {
662
+ return this.accountVerify()
663
+ .pipe(switchMap(() => this._dialog.open(EmailComponent, {
664
+ data: { twoFactorManageService: this },
665
+ })
666
+ .afterClosed()), tap(() => {
667
+ this.verificationMethodFetch();
668
+ }), takeUntil(this._destroy$));
669
+ }
670
+ addApp() {
671
+ return this.accountVerify()
672
+ .pipe(switchMap(() => this._dialog.open(AppComponent, {
673
+ data: { twoFactorManageService: this },
674
+ })
675
+ .afterClosed()), tap(() => {
676
+ this.verificationMethodFetch();
677
+ }), takeUntil(this._destroy$));
678
+ }
679
+ }
680
+ TwoFactorManageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TwoFactorManageService, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
681
+ TwoFactorManageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TwoFactorManageService });
682
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TwoFactorManageService, decorators: [{
683
+ type: Injectable
695
684
  }], ctorParameters: function () { return [{ type: i1.MatDialog }]; } });
696
685
 
697
- class DefaultedComponent {
698
- }
699
- DefaultedComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DefaultedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
700
- DefaultedComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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 });
701
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DefaultedComponent, decorators: [{
702
- type: Component,
703
- args: [{
704
- selector: 'app-defaulted',
705
- templateUrl: './defaulted.component.html',
706
- styleUrls: ['./defaulted.component.scss'],
707
- changeDetection: ChangeDetectionStrategy.OnPush,
708
- }]
686
+ class DefaultedComponent {
687
+ }
688
+ DefaultedComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DefaultedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
689
+ DefaultedComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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 });
690
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DefaultedComponent, decorators: [{
691
+ type: Component,
692
+ args: [{
693
+ selector: 'app-defaulted',
694
+ templateUrl: './defaulted.component.html',
695
+ styleUrls: ['./defaulted.component.scss'],
696
+ changeDetection: ChangeDetectionStrategy.OnPush,
697
+ }]
709
698
  }] });
710
699
 
711
- class VerificationMethodsComponent {
712
- constructor(_prompt) {
713
- this._prompt = _prompt;
714
- this.deleted = new EventEmitter();
715
- }
716
- ngOnInit() {
717
- this.listConfig = {
718
- rowActions: [
719
- {
720
- click: (verificationMethod) => {
721
- this._prompt.confirm({
722
- title: 'Confirm',
723
- template: 'Would you like to delete this verification method?',
724
- })
725
- .pipe(switchMap(() => this.twoFactorManageService
726
- .verificationMethodDelete(verificationMethod)))
727
- .subscribe(() => {
728
- this.deleted.emit(verificationMethod);
729
- });
730
- },
731
- label: 'Delete',
732
- },
733
- ],
734
- fetch: () => {
735
- return this.twoFactorManageService.verificationMethods$
736
- .pipe(map((verificationMethods) => ({
737
- data: verificationMethods.filter((verificationMethod) => {
738
- return verificationMethod.type === this.type;
739
- }),
740
- })));
741
- },
742
- };
743
- }
744
- }
745
- VerificationMethodsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: VerificationMethodsComponent, deps: [{ token: i1$2.FsPrompt }], target: i0.ɵɵFactoryTarget.Component });
746
- VerificationMethodsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: VerificationMethodsComponent, selector: "app-verification-methods", inputs: { twoFactorManageService: "twoFactorManageService", type: "type" }, outputs: { deleted: "deleted" }, ngImport: i0, template: "<fs-list [config]=\"listConfig\">\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 === 'sms'\">\n <fs-country [code]=\"row.phoneCountry\" [showName]=\"false\"></fs-country> {{row.phoneNumber | fsPhone}}\n </ng-container>\n\n <ng-container *ngIf=\"row.type === 'email'\">\n {{row.email}}\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}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: i3$3.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: ["title", "name", "show", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$1.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "fsPhone": i6.FsPhonePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
747
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: VerificationMethodsComponent, decorators: [{
748
- type: Component,
749
- args: [{
750
- selector: 'app-verification-methods',
751
- templateUrl: './verification-methods.component.html',
752
- styleUrls: ['./verification-methods.component.scss'],
753
- changeDetection: ChangeDetectionStrategy.OnPush,
754
- }]
755
- }], ctorParameters: function () { return [{ type: i1$2.FsPrompt }]; }, propDecorators: { twoFactorManageService: [{
756
- type: Input
757
- }], type: [{
758
- type: Input
759
- }], deleted: [{
760
- type: Output
700
+ class VerificationMethodsComponent {
701
+ constructor(_prompt) {
702
+ this._prompt = _prompt;
703
+ this.deleted = new EventEmitter();
704
+ }
705
+ ngOnInit() {
706
+ this.listConfig = {
707
+ rowActions: [
708
+ {
709
+ click: (verificationMethod) => {
710
+ this._prompt.confirm({
711
+ title: 'Confirm',
712
+ template: 'Would you like to delete this verification method?',
713
+ })
714
+ .pipe(switchMap(() => this.twoFactorManageService
715
+ .verificationMethodDelete(verificationMethod)))
716
+ .subscribe(() => {
717
+ this.deleted.emit(verificationMethod);
718
+ });
719
+ },
720
+ label: 'Delete',
721
+ },
722
+ ],
723
+ fetch: () => {
724
+ return this.twoFactorManageService.verificationMethods$
725
+ .pipe(map((verificationMethods) => ({
726
+ data: verificationMethods.filter((verificationMethod) => {
727
+ return verificationMethod.type === this.type;
728
+ }),
729
+ })));
730
+ },
731
+ };
732
+ }
733
+ }
734
+ VerificationMethodsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: VerificationMethodsComponent, deps: [{ token: i1$2.FsPrompt }], target: i0.ɵɵFactoryTarget.Component });
735
+ VerificationMethodsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: VerificationMethodsComponent, selector: "app-verification-methods", inputs: { twoFactorManageService: "twoFactorManageService", type: "type" }, outputs: { deleted: "deleted" }, ngImport: i0, template: "<fs-list [config]=\"listConfig\">\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 === 'sms'\">\n <fs-country [code]=\"row.phoneCountry\" [showName]=\"false\"></fs-country> {{row.phoneNumber | fsPhone}}\n </ng-container>\n\n <ng-container *ngIf=\"row.type === 'email'\">\n {{row.email}}\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}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: i3$3.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: ["title", "name", "show", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$1.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "fsPhone": i6.FsPhonePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
736
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: VerificationMethodsComponent, decorators: [{
737
+ type: Component,
738
+ args: [{
739
+ selector: 'app-verification-methods',
740
+ templateUrl: './verification-methods.component.html',
741
+ styleUrls: ['./verification-methods.component.scss'],
742
+ changeDetection: ChangeDetectionStrategy.OnPush,
743
+ }]
744
+ }], ctorParameters: function () { return [{ type: i1$2.FsPrompt }]; }, propDecorators: { twoFactorManageService: [{
745
+ type: Input
746
+ }], type: [{
747
+ type: Input
748
+ }], deleted: [{
749
+ type: Output
761
750
  }] } });
762
751
 
763
- class NumbersComponent {
764
- constructor(_data, _dialogRef, _message) {
765
- this._data = _data;
766
- this._dialogRef = _dialogRef;
767
- this._message = _message;
768
- this.FsVerificationMethodType = FsVerificationMethodType;
769
- this.twoFactorManageService = _data.twoFactorManageService;
770
- this.defaultCountry = _data.defaultCountry;
771
- }
772
- add() {
773
- this.twoFactorManageService.addSms(this.defaultCountry)
774
- .subscribe();
775
- }
776
- deleted() {
777
- this._message.success('Deleted text message verification method');
778
- if (!this.twoFactorManageService.hasVerificationMethod(FsVerificationMethodType.Sms)) {
779
- this._dialogRef.close();
780
- }
781
- }
782
- }
783
- 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 });
784
- 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 Text Message Numbers\n </h1>\n <mat-dialog-content>\n <app-verification-methods\n [type]=\"FsVerificationMethodType.Sms\"\n [twoFactorManageService]=\"twoFactorManageService\"\n (deleted)=\"deleted()\">\n </app-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: VerificationMethodsComponent, selector: "app-verification-methods", inputs: ["twoFactorManageService", "type"], outputs: ["deleted"] }, { type: i7.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 });
785
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NumbersComponent, decorators: [{
786
- type: Component,
787
- args: [{
788
- templateUrl: './numbers.component.html',
789
- styleUrls: ['./numbers.component.scss'],
790
- changeDetection: ChangeDetectionStrategy.OnPush,
791
- }]
792
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
793
- type: Inject,
794
- args: [MAT_DIALOG_DATA]
752
+ class NumbersComponent {
753
+ constructor(_data, _dialogRef, _message) {
754
+ this._data = _data;
755
+ this._dialogRef = _dialogRef;
756
+ this._message = _message;
757
+ this.FsVerificationMethodType = FsVerificationMethodType;
758
+ this.twoFactorManageService = _data.twoFactorManageService;
759
+ this.defaultCountry = _data.defaultCountry;
760
+ }
761
+ add() {
762
+ this.twoFactorManageService.addSms(this.defaultCountry)
763
+ .subscribe();
764
+ }
765
+ deleted() {
766
+ this._message.success('Deleted text message verification method');
767
+ if (!this.twoFactorManageService.hasVerificationMethod(FsVerificationMethodType.Sms)) {
768
+ this._dialogRef.close();
769
+ }
770
+ }
771
+ }
772
+ 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 });
773
+ 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 Text Message Numbers\n </h1>\n <mat-dialog-content>\n <app-verification-methods\n [type]=\"FsVerificationMethodType.Sms\"\n [twoFactorManageService]=\"twoFactorManageService\"\n (deleted)=\"deleted()\">\n </app-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: VerificationMethodsComponent, selector: "app-verification-methods", inputs: ["twoFactorManageService", "type"], outputs: ["deleted"] }, { type: i7.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 });
774
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NumbersComponent, decorators: [{
775
+ type: Component,
776
+ args: [{
777
+ templateUrl: './numbers.component.html',
778
+ styleUrls: ['./numbers.component.scss'],
779
+ changeDetection: ChangeDetectionStrategy.OnPush,
780
+ }]
781
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
782
+ type: Inject,
783
+ args: [MAT_DIALOG_DATA]
795
784
  }] }, { type: i1.MatDialogRef }, { type: i2.FsMessage }]; } });
796
785
 
797
- class EmailsComponent {
798
- constructor(_data, _dialogRef, _message) {
799
- this._data = _data;
800
- this._dialogRef = _dialogRef;
801
- this._message = _message;
802
- this.FsVerificationMethodType = FsVerificationMethodType;
803
- this.twoFactorManageService = _data.twoFactorManageService;
804
- }
805
- add() {
806
- this.twoFactorManageService.addEmail()
807
- .subscribe();
808
- }
809
- deleted() {
810
- this._message.success('Deleted email verification method');
811
- if (!this.twoFactorManageService.hasVerificationMethod(FsVerificationMethodType.Email)) {
812
- this._dialogRef.close();
813
- }
814
- }
815
- }
816
- 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 });
817
- 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 Emails\n </h1>\n <mat-dialog-content>\n <app-verification-methods\n [type]=\"FsVerificationMethodType.Email\"\n [twoFactorManageService]=\"twoFactorManageService\"\n (deleted)=\"deleted()\">\n </app-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: [""], components: [{ type: i3.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: VerificationMethodsComponent, selector: "app-verification-methods", inputs: ["twoFactorManageService", "type"], outputs: ["deleted"] }, { type: i7.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 });
818
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EmailsComponent, decorators: [{
819
- type: Component,
820
- args: [{
821
- templateUrl: './emails.component.html',
822
- styleUrls: ['./emails.component.scss'],
823
- changeDetection: ChangeDetectionStrategy.OnPush,
824
- }]
825
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
826
- type: Inject,
827
- args: [MAT_DIALOG_DATA]
786
+ class EmailsComponent {
787
+ constructor(_data, _dialogRef, _message) {
788
+ this._data = _data;
789
+ this._dialogRef = _dialogRef;
790
+ this._message = _message;
791
+ this.FsVerificationMethodType = FsVerificationMethodType;
792
+ this.twoFactorManageService = _data.twoFactorManageService;
793
+ }
794
+ add() {
795
+ this.twoFactorManageService.addEmail()
796
+ .subscribe();
797
+ }
798
+ deleted() {
799
+ this._message.success('Deleted email verification method');
800
+ if (!this.twoFactorManageService.hasVerificationMethod(FsVerificationMethodType.Email)) {
801
+ this._dialogRef.close();
802
+ }
803
+ }
804
+ }
805
+ 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 });
806
+ 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 Emails\n </h1>\n <mat-dialog-content>\n <app-verification-methods\n [type]=\"FsVerificationMethodType.Email\"\n [twoFactorManageService]=\"twoFactorManageService\"\n (deleted)=\"deleted()\">\n </app-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: [""], components: [{ type: i3.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: VerificationMethodsComponent, selector: "app-verification-methods", inputs: ["twoFactorManageService", "type"], outputs: ["deleted"] }, { type: i7.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 });
807
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EmailsComponent, decorators: [{
808
+ type: Component,
809
+ args: [{
810
+ templateUrl: './emails.component.html',
811
+ styleUrls: ['./emails.component.scss'],
812
+ changeDetection: ChangeDetectionStrategy.OnPush,
813
+ }]
814
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
815
+ type: Inject,
816
+ args: [MAT_DIALOG_DATA]
828
817
  }] }, { type: i1.MatDialogRef }, { type: i2.FsMessage }]; } });
829
818
 
830
- class ManageMethodsComponent {
831
- constructor(_data, _cdRef, _dialog, _message) {
832
- this._data = _data;
833
- this._cdRef = _cdRef;
834
- this._dialog = _dialog;
835
- this._message = _message;
836
- this._destroy$ = new Subject();
837
- }
838
- ngOnInit() {
839
- this._defaultCountry = this._data.defaultCountry;
840
- this.twoFactorManageService = this._data.twoFactorManageService;
841
- this.twoFactorManageService.verificationMethods$
842
- .subscribe((verificationMethods) => {
843
- this.verificationMethods = verificationMethods;
844
- this._cdRef.markForCheck();
845
- });
846
- }
847
- get defaultSms() {
848
- return this.twoFactorManageService.smsVerificationMethods
849
- .some((verificationMethod) => {
850
- return verificationMethod.default;
851
- });
852
- }
853
- get defaultApp() {
854
- return this.twoFactorManageService.appVerificationMethods
855
- .some((verificationMethod) => {
856
- return verificationMethod.default;
857
- });
858
- }
859
- get defaultEmail() {
860
- return this.twoFactorManageService.emailVerificationMethods
861
- .some((verificationMethod) => {
862
- return verificationMethod.default;
863
- });
864
- }
865
- get textHasVerificationMethod() {
866
- return this.twoFactorManageService.hasVerificationMethod(FsVerificationMethodType.Sms);
867
- }
868
- get appHasVerificationMethod() {
869
- return this.twoFactorManageService.hasVerificationMethod(FsVerificationMethodType.App);
870
- }
871
- get emailHasVerificationMethod() {
872
- return this.twoFactorManageService.hasVerificationMethod(FsVerificationMethodType.Email);
873
- }
874
- textMessageManage() {
875
- this._dialog.open(NumbersComponent, {
876
- data: {
877
- twoFactorManageService: this.twoFactorManageService,
878
- defaultCountry: this._defaultCountry,
879
- },
880
- });
881
- }
882
- textMessageAdd() {
883
- this.twoFactorManageService.addSms(this._defaultCountry)
884
- .subscribe();
885
- }
886
- emailMessageManage() {
887
- this._dialog.open(EmailsComponent, {
888
- data: {
889
- twoFactorManageService: this.twoFactorManageService,
890
- },
891
- });
892
- }
893
- emailMessageAdd() {
894
- this.twoFactorManageService.addEmail()
895
- .subscribe();
896
- }
897
- appRemove() {
898
- this._message.success('Removed App Authenticator verification method');
899
- const verificationMethod = this.verificationMethods
900
- .find((_verificationMethod) => {
901
- return _verificationMethod.type === FsVerificationMethodType.App;
902
- });
903
- if (verificationMethod) {
904
- this.twoFactorManageService.verificationMethodDelete(verificationMethod)
905
- .subscribe(() => {
906
- this._cdRef.markForCheck();
907
- });
908
- }
909
- }
910
- appAdd() {
911
- this.twoFactorManageService.addApp()
912
- .subscribe();
913
- }
914
- ngOnDestroy() {
915
- this._destroy$.next();
916
- this._destroy$.complete();
917
- }
918
- }
919
- ManageMethodsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ManageMethodsComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i0.ChangeDetectorRef }, { token: i1.MatDialog }, { token: i2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
920
- ManageMethodsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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>\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.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: DefaultedComponent, selector: "app-defaulted" }, { type: i7.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: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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"] }], pipes: { "fsPhone": i6.FsPhonePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
921
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ManageMethodsComponent, decorators: [{
922
- type: Component,
923
- args: [{
924
- templateUrl: './manage-methods.component.html',
925
- styleUrls: ['./manage-methods.component.scss'],
926
- changeDetection: ChangeDetectionStrategy.OnPush,
927
- }]
928
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
929
- type: Inject,
930
- args: [MAT_DIALOG_DATA]
819
+ class ManageMethodsComponent {
820
+ constructor(_data, _cdRef, _dialog, _message) {
821
+ this._data = _data;
822
+ this._cdRef = _cdRef;
823
+ this._dialog = _dialog;
824
+ this._message = _message;
825
+ this._destroy$ = new Subject();
826
+ }
827
+ ngOnInit() {
828
+ this._defaultCountry = this._data.defaultCountry;
829
+ this.twoFactorManageService = this._data.twoFactorManageService;
830
+ this.twoFactorManageService.verificationMethods$
831
+ .subscribe((verificationMethods) => {
832
+ this.verificationMethods = verificationMethods;
833
+ this._cdRef.markForCheck();
834
+ });
835
+ }
836
+ get defaultSms() {
837
+ return this.twoFactorManageService.smsVerificationMethods
838
+ .some((verificationMethod) => {
839
+ return verificationMethod.default;
840
+ });
841
+ }
842
+ get defaultApp() {
843
+ return this.twoFactorManageService.appVerificationMethods
844
+ .some((verificationMethod) => {
845
+ return verificationMethod.default;
846
+ });
847
+ }
848
+ get defaultEmail() {
849
+ return this.twoFactorManageService.emailVerificationMethods
850
+ .some((verificationMethod) => {
851
+ return verificationMethod.default;
852
+ });
853
+ }
854
+ get textHasVerificationMethod() {
855
+ return this.twoFactorManageService.hasVerificationMethod(FsVerificationMethodType.Sms);
856
+ }
857
+ get appHasVerificationMethod() {
858
+ return this.twoFactorManageService.hasVerificationMethod(FsVerificationMethodType.App);
859
+ }
860
+ get emailHasVerificationMethod() {
861
+ return this.twoFactorManageService.hasVerificationMethod(FsVerificationMethodType.Email);
862
+ }
863
+ textMessageManage() {
864
+ this._dialog.open(NumbersComponent, {
865
+ data: {
866
+ twoFactorManageService: this.twoFactorManageService,
867
+ defaultCountry: this._defaultCountry,
868
+ },
869
+ });
870
+ }
871
+ textMessageAdd() {
872
+ this.twoFactorManageService.addSms(this._defaultCountry)
873
+ .subscribe();
874
+ }
875
+ emailMessageManage() {
876
+ this._dialog.open(EmailsComponent, {
877
+ data: {
878
+ twoFactorManageService: this.twoFactorManageService,
879
+ },
880
+ });
881
+ }
882
+ emailMessageAdd() {
883
+ this.twoFactorManageService.addEmail()
884
+ .subscribe();
885
+ }
886
+ appRemove() {
887
+ this._message.success('Removed App Authenticator verification method');
888
+ const verificationMethod = this.verificationMethods
889
+ .find((_verificationMethod) => {
890
+ return _verificationMethod.type === FsVerificationMethodType.App;
891
+ });
892
+ if (verificationMethod) {
893
+ this.twoFactorManageService.verificationMethodDelete(verificationMethod)
894
+ .subscribe(() => {
895
+ this._cdRef.markForCheck();
896
+ });
897
+ }
898
+ }
899
+ appAdd() {
900
+ this.twoFactorManageService.addApp()
901
+ .subscribe();
902
+ }
903
+ ngOnDestroy() {
904
+ this._destroy$.next();
905
+ this._destroy$.complete();
906
+ }
907
+ }
908
+ ManageMethodsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ManageMethodsComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i0.ChangeDetectorRef }, { token: i1.MatDialog }, { token: i2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
909
+ ManageMethodsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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>\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.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: DefaultedComponent, selector: "app-defaulted" }, { type: i7.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: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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"] }], pipes: { "fsPhone": i6.FsPhonePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
910
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ManageMethodsComponent, decorators: [{
911
+ type: Component,
912
+ args: [{
913
+ templateUrl: './manage-methods.component.html',
914
+ styleUrls: ['./manage-methods.component.scss'],
915
+ changeDetection: ChangeDetectionStrategy.OnPush,
916
+ }]
917
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
918
+ type: Inject,
919
+ args: [MAT_DIALOG_DATA]
931
920
  }] }, { type: i0.ChangeDetectorRef }, { type: i1.MatDialog }, { type: i2.FsMessage }]; } });
932
921
 
933
- class Fs2faManageComponent {
934
- constructor(_cdRef, _dialog, _twoFactorManageService) {
935
- this._cdRef = _cdRef;
936
- this._dialog = _dialog;
937
- this._twoFactorManageService = _twoFactorManageService;
938
- this._destroy$ = new Subject();
939
- }
940
- ngOnInit() {
941
- this._twoFactorManageService.registerVerificationMethodFetch(this.verificationMethodsFetch);
942
- this._twoFactorManageService.registerVerificationMethodDelete(this.verificationMethodDelete);
943
- this._twoFactorManageService.registerVerificationMethodCreate(this.verificationMethodCreate);
944
- this._twoFactorManageService.registerVerificationMethodVerify(this.verificationMethodVerify);
945
- this._twoFactorManageService.registerVerificationMethodResend(this.verificationMethodResend);
946
- this._twoFactorManageService.registerAccountVerify(this.accountVerify);
947
- this._twoFactorManageService.verificationMethods$
948
- .subscribe((verificationMethods) => {
949
- const types = {
950
- sms: 'Text Message',
951
- email: 'Email',
952
- app: 'Authenticator App',
953
- };
954
- this.statuses = Object.keys(verificationMethods.reduce((accum, verificationMethod) => {
955
- accum[verificationMethod.type] = true;
956
- return accum;
957
- }, {}))
958
- .map((type) => {
959
- return types[type];
960
- });
961
- this._cdRef.markForCheck();
962
- });
963
- this._twoFactorManageService.verificationMethodFetch();
964
- }
965
- manage() {
966
- const dialogRef = this._dialog.open(ManageMethodsComponent, {
967
- autoFocus: false,
968
- data: {
969
- defaultCountry: this.defaultCountry,
970
- twoFactorManageService: this._twoFactorManageService,
971
- },
972
- });
973
- dialogRef.afterClosed()
974
- .pipe(takeUntil(this._destroy$))
975
- .subscribe(() => {
976
- this._cdRef.markForCheck();
977
- });
978
- }
979
- reload() {
980
- this._twoFactorManageService.verificationMethodFetch();
981
- }
982
- ngOnDestroy() {
983
- this._destroy$.next();
984
- this._destroy$.complete();
985
- }
986
- }
987
- 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 });
988
- Fs2faManageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2faManageComponent, selector: "fs-2fa-manage", inputs: { accountVerify: "accountVerify", defaultCountry: "defaultCountry", 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$4.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i3$4.FsLabelComponent, selector: "fs-label" }], directives: [{ type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
989
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faManageComponent, decorators: [{
990
- type: Component,
991
- args: [{
992
- selector: 'fs-2fa-manage',
993
- templateUrl: './2fa-manage.component.html',
994
- styleUrls: ['./2fa-manage.component.scss'],
995
- changeDetection: ChangeDetectionStrategy.OnPush,
996
- providers: [TwoFactorManageService],
997
- }]
998
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.MatDialog }, { type: TwoFactorManageService }]; }, propDecorators: { accountVerify: [{
999
- type: Input
1000
- }], defaultCountry: [{
1001
- type: Input
1002
- }], verificationMethodsFetch: [{
1003
- type: Input
1004
- }], verificationMethodDelete: [{
1005
- type: Input
1006
- }], verificationMethodCreate: [{
1007
- type: Input
1008
- }], verificationMethodVerify: [{
1009
- type: Input
1010
- }], verificationMethodResend: [{
1011
- type: Input
922
+ class Fs2faManageComponent {
923
+ constructor(_cdRef, _dialog, _twoFactorManageService) {
924
+ this._cdRef = _cdRef;
925
+ this._dialog = _dialog;
926
+ this._twoFactorManageService = _twoFactorManageService;
927
+ this._destroy$ = new Subject();
928
+ }
929
+ ngOnInit() {
930
+ this._twoFactorManageService.registerVerificationMethodFetch(this.verificationMethodsFetch);
931
+ this._twoFactorManageService.registerVerificationMethodDelete(this.verificationMethodDelete);
932
+ this._twoFactorManageService.registerVerificationMethodCreate(this.verificationMethodCreate);
933
+ this._twoFactorManageService.registerVerificationMethodVerify(this.verificationMethodVerify);
934
+ this._twoFactorManageService.registerVerificationMethodResend(this.verificationMethodResend);
935
+ this._twoFactorManageService.registerAccountVerify(this.accountVerify);
936
+ this._twoFactorManageService.verificationMethods$
937
+ .subscribe((verificationMethods) => {
938
+ const types = {
939
+ sms: 'Text Message',
940
+ email: 'Email',
941
+ app: 'Authenticator App',
942
+ };
943
+ this.statuses = Object.keys(verificationMethods.reduce((accum, verificationMethod) => {
944
+ accum[verificationMethod.type] = true;
945
+ return accum;
946
+ }, {}))
947
+ .map((type) => {
948
+ return types[type];
949
+ });
950
+ this._cdRef.markForCheck();
951
+ });
952
+ this._twoFactorManageService.verificationMethodFetch();
953
+ }
954
+ manage() {
955
+ const dialogRef = this._dialog.open(ManageMethodsComponent, {
956
+ autoFocus: false,
957
+ data: {
958
+ defaultCountry: this.defaultCountry,
959
+ twoFactorManageService: this._twoFactorManageService,
960
+ },
961
+ });
962
+ dialogRef.afterClosed()
963
+ .pipe(takeUntil(this._destroy$))
964
+ .subscribe(() => {
965
+ this._cdRef.markForCheck();
966
+ });
967
+ }
968
+ reload() {
969
+ this._twoFactorManageService.verificationMethodFetch();
970
+ }
971
+ ngOnDestroy() {
972
+ this._destroy$.next();
973
+ this._destroy$.complete();
974
+ }
975
+ }
976
+ 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 });
977
+ Fs2faManageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2faManageComponent, selector: "fs-2fa-manage", inputs: { accountVerify: "accountVerify", defaultCountry: "defaultCountry", 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$4.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i3$4.FsLabelComponent, selector: "fs-label" }], directives: [{ type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
978
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faManageComponent, decorators: [{
979
+ type: Component,
980
+ args: [{
981
+ selector: 'fs-2fa-manage',
982
+ templateUrl: './2fa-manage.component.html',
983
+ styleUrls: ['./2fa-manage.component.scss'],
984
+ changeDetection: ChangeDetectionStrategy.OnPush,
985
+ providers: [TwoFactorManageService],
986
+ }]
987
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.MatDialog }, { type: TwoFactorManageService }]; }, propDecorators: { accountVerify: [{
988
+ type: Input
989
+ }], defaultCountry: [{
990
+ type: Input
991
+ }], verificationMethodsFetch: [{
992
+ type: Input
993
+ }], verificationMethodDelete: [{
994
+ type: Input
995
+ }], verificationMethodCreate: [{
996
+ type: Input
997
+ }], verificationMethodVerify: [{
998
+ type: Input
999
+ }], verificationMethodResend: [{
1000
+ type: Input
1012
1001
  }] } });
1013
1002
 
1014
- class Fs2faManageModule {
1015
- }
1016
- Fs2faManageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faManageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1017
- Fs2faManageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faManageModule, declarations: [Fs2faManageComponent,
1018
- ManageMethodsComponent,
1019
- NumbersComponent,
1020
- AppComponent,
1021
- EmailComponent,
1022
- VerificationMethodsComponent,
1023
- NumberComponent,
1024
- EmailsComponent,
1025
- DefaultedComponent], imports: [CommonModule,
1026
- FormsModule,
1027
- MatButtonModule,
1028
- MatDialogModule,
1029
- MatInputModule,
1030
- MatIconModule,
1031
- MatCheckboxModule,
1032
- FsDialogModule,
1033
- FsListModule,
1034
- FsFormModule,
1035
- FsLabelModule,
1036
- FsPhoneModule,
1037
- FsSkeletonModule,
1038
- FsCountryModule,
1039
- CodeInputModule,
1040
- QrCodeModule], exports: [Fs2faManageComponent] });
1041
- Fs2faManageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faManageModule, imports: [[
1042
- CommonModule,
1043
- FormsModule,
1044
- MatButtonModule,
1045
- MatDialogModule,
1046
- MatInputModule,
1047
- MatIconModule,
1048
- MatCheckboxModule,
1049
- FsDialogModule,
1050
- FsListModule,
1051
- FsFormModule,
1052
- FsLabelModule,
1053
- FsPhoneModule,
1054
- FsSkeletonModule,
1055
- FsCountryModule,
1056
- CodeInputModule,
1057
- QrCodeModule,
1058
- ]] });
1059
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faManageModule, decorators: [{
1060
- type: NgModule,
1061
- args: [{
1062
- imports: [
1063
- CommonModule,
1064
- FormsModule,
1065
- MatButtonModule,
1066
- MatDialogModule,
1067
- MatInputModule,
1068
- MatIconModule,
1069
- MatCheckboxModule,
1070
- FsDialogModule,
1071
- FsListModule,
1072
- FsFormModule,
1073
- FsLabelModule,
1074
- FsPhoneModule,
1075
- FsSkeletonModule,
1076
- FsCountryModule,
1077
- CodeInputModule,
1078
- QrCodeModule,
1079
- ],
1080
- declarations: [
1081
- Fs2faManageComponent,
1082
- ManageMethodsComponent,
1083
- NumbersComponent,
1084
- AppComponent,
1085
- EmailComponent,
1086
- VerificationMethodsComponent,
1087
- NumberComponent,
1088
- EmailsComponent,
1089
- DefaultedComponent,
1090
- ],
1091
- exports: [Fs2faManageComponent],
1092
- }]
1003
+ class Fs2faManageModule {
1004
+ }
1005
+ Fs2faManageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faManageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1006
+ Fs2faManageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faManageModule, declarations: [Fs2faManageComponent,
1007
+ ManageMethodsComponent,
1008
+ NumbersComponent,
1009
+ AppComponent,
1010
+ EmailComponent,
1011
+ VerificationMethodsComponent,
1012
+ NumberComponent,
1013
+ EmailsComponent,
1014
+ DefaultedComponent], imports: [CommonModule,
1015
+ FormsModule,
1016
+ MatButtonModule,
1017
+ MatDialogModule,
1018
+ MatInputModule,
1019
+ MatIconModule,
1020
+ MatCheckboxModule,
1021
+ FsDialogModule,
1022
+ FsListModule,
1023
+ FsFormModule,
1024
+ FsLabelModule,
1025
+ FsPhoneModule,
1026
+ FsSkeletonModule,
1027
+ FsCountryModule,
1028
+ CodeInputModule,
1029
+ QrCodeModule], exports: [Fs2faManageComponent] });
1030
+ Fs2faManageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faManageModule, imports: [[
1031
+ CommonModule,
1032
+ FormsModule,
1033
+ MatButtonModule,
1034
+ MatDialogModule,
1035
+ MatInputModule,
1036
+ MatIconModule,
1037
+ MatCheckboxModule,
1038
+ FsDialogModule,
1039
+ FsListModule,
1040
+ FsFormModule,
1041
+ FsLabelModule,
1042
+ FsPhoneModule,
1043
+ FsSkeletonModule,
1044
+ FsCountryModule,
1045
+ CodeInputModule,
1046
+ QrCodeModule,
1047
+ ]] });
1048
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faManageModule, decorators: [{
1049
+ type: NgModule,
1050
+ args: [{
1051
+ imports: [
1052
+ CommonModule,
1053
+ FormsModule,
1054
+ MatButtonModule,
1055
+ MatDialogModule,
1056
+ MatInputModule,
1057
+ MatIconModule,
1058
+ MatCheckboxModule,
1059
+ FsDialogModule,
1060
+ FsListModule,
1061
+ FsFormModule,
1062
+ FsLabelModule,
1063
+ FsPhoneModule,
1064
+ FsSkeletonModule,
1065
+ FsCountryModule,
1066
+ CodeInputModule,
1067
+ QrCodeModule,
1068
+ ],
1069
+ declarations: [
1070
+ Fs2faManageComponent,
1071
+ ManageMethodsComponent,
1072
+ NumbersComponent,
1073
+ AppComponent,
1074
+ EmailComponent,
1075
+ VerificationMethodsComponent,
1076
+ NumberComponent,
1077
+ EmailsComponent,
1078
+ DefaultedComponent,
1079
+ ],
1080
+ exports: [Fs2faManageComponent],
1081
+ }]
1093
1082
  }] });
1094
1083
 
1095
- /**
1096
- * Generated bundle index. Do not edit.
1084
+ /**
1085
+ * Generated bundle index. Do not edit.
1097
1086
  */
1098
1087
 
1099
- export { FS_2FA_VERIFICATION_PROVIDER, Fs2faManageComponent, Fs2faManageModule, Fs2faVerificationComponent, Fs2faVerificationModule, FsVerificationMethodType };
1088
+ export { Fs2faManageComponent, Fs2faManageModule, Fs2faVerificationComponent, Fs2faVerificationModule, FsVerificationMethodType };
1100
1089
  //# sourceMappingURL=firestitch-2fa.js.map