@firestitch/2fa 12.5.0 → 12.5.1

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