@firestitch/2fa 12.11.4 → 12.11.5

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