@firestitch/2fa 12.11.4 → 12.11.6

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 +14 -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 +39 -38
  35. package/app/modules/verification/components/2fa-verification-code/2fa-verification-code.component.d.ts +21 -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 +1474 -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 +42 -37
  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 +88 -88
  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 +130 -128
  80. package/esm2015/app/modules/verification/components/2fa-verification-code/2fa-verification-code.component.js +63 -61
  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 +1323 -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,1377 @@ 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
+ ngOnInit() {
107
+ if (!this.codeLength) {
108
+ this.codeLength = 6;
109
+ }
110
+ }
111
+ focus() {
112
+ this.codeInput.focusOnField(0);
113
+ }
114
+ }
115
+ CodeInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CodeInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
116
+ 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]=\"codeLength\"\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 });
117
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CodeInputComponent, decorators: [{
118
+ type: Component,
119
+ args: [{
120
+ selector: 'app-code-input',
121
+ templateUrl: './code-input.component.html',
122
+ styleUrls: ['./code-input.component.scss'],
123
+ changeDetection: ChangeDetectionStrategy.OnPush,
124
+ }]
125
+ }], propDecorators: { codeInput: [{
126
+ type: ViewChild,
127
+ args: [FsCodeInputComponent]
128
+ }], codeLength: [{
129
+ type: Input
130
+ }], code: [{
131
+ type: Input
132
+ }], codeCompleted: [{
133
+ type: Output
134
+ }], codeChanged: [{
135
+ type: Output
131
136
  }] } });
132
137
 
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
138
+ class Fs2faVerificationCodeComponent {
139
+ constructor(_form) {
140
+ this._form = _form;
141
+ this.codeChanged = new EventEmitter();
142
+ this.codeCompleted = new EventEmitter();
143
+ this.VerificationMethodType = VerificationMethodType;
144
+ }
145
+ codeChange(code) {
146
+ this.code = code;
147
+ this.codeChanged.emit(this.code);
148
+ this._form.dirty();
149
+ }
150
+ focus() {
151
+ this.codeInputComponent.focus();
152
+ }
153
+ }
154
+ Fs2faVerificationCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationCodeComponent, deps: [{ token: i9.FsFormDirective }], target: i0.ɵɵFactoryTarget.Component });
155
+ Fs2faVerificationCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2faVerificationCodeComponent, selector: "fs-2fa-verification-code", inputs: { type: "type", recipient: "recipient", codeLength: "codeLength", 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 [codeLength]=\"codeLength\"\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: [
156
+ {
157
+ provide: ControlContainer,
158
+ useExisting: NgForm,
159
+ },
160
+ ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
161
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationCodeComponent, decorators: [{
162
+ type: Component,
163
+ args: [{
164
+ selector: 'fs-2fa-verification-code',
165
+ templateUrl: './2fa-verification-code.component.html',
166
+ styleUrls: ['./2fa-verification-code.component.scss'],
167
+ changeDetection: ChangeDetectionStrategy.OnPush,
168
+ viewProviders: [
169
+ {
170
+ provide: ControlContainer,
171
+ useExisting: NgForm,
172
+ },
173
+ ],
174
+ }]
175
+ }], ctorParameters: function () { return [{ type: i9.FsFormDirective }]; }, propDecorators: { codeInputComponent: [{
176
+ type: ViewChild,
177
+ args: [CodeInputComponent]
178
+ }], type: [{
179
+ type: Input
180
+ }], recipient: [{
181
+ type: Input
182
+ }], codeLength: [{
183
+ type: Input
184
+ }], code: [{
185
+ type: Input
186
+ }], codeChanged: [{
187
+ type: Output
188
+ }], codeCompleted: [{
189
+ type: Output
183
190
  }] } });
184
191
 
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
192
+ class Fs2faVerificationComponent {
193
+ constructor(_cdRef, _dialog, _message) {
194
+ this._cdRef = _cdRef;
195
+ this._dialog = _dialog;
196
+ this._message = _message;
197
+ this.showTrustedDevice = true;
198
+ this.trustDevice = true;
199
+ this.formatRecipient = false;
200
+ this.verified = new EventEmitter();
201
+ this.codeChanged = new EventEmitter();
202
+ this.codeCompleted = new EventEmitter();
203
+ this.trustDeviceChange = new EventEmitter();
204
+ this.code = '';
205
+ this.VerificationMethodType = VerificationMethodType;
206
+ this._destroy$ = new Subject();
207
+ }
208
+ get recipient() {
209
+ if (this.verificationMethod.type === VerificationMethodType.Email) {
210
+ return this.verificationMethod.email;
211
+ }
212
+ if (this.verificationMethod.type === VerificationMethodType.Sms) {
213
+ return this.verificationMethod.phoneNumber;
214
+ }
215
+ }
216
+ ngOnInit() {
217
+ this.codeChanged
218
+ .pipe(takeUntil(this._destroy$))
219
+ .subscribe((code) => {
220
+ this.code = code;
221
+ });
222
+ }
223
+ ngOnDestroy() {
224
+ this._destroy$.next();
225
+ this._destroy$.complete();
226
+ }
227
+ ngAfterViewInit() {
228
+ this.verificationCodeComponent.focus();
229
+ }
230
+ resendCode() {
231
+ return this.resend()
232
+ .pipe(tap(() => {
233
+ this.code = '';
234
+ this._message.success('Resent Code');
235
+ }), finalize(() => {
236
+ this.verificationCodeComponent.focus();
237
+ }));
238
+ }
239
+ showVerificationMethods() {
240
+ this.getVerificationMethods()
241
+ .subscribe((verificationMethods) => {
242
+ this._dialog.open(Fs2faVerificationMethodsComponent, {
243
+ data: {
244
+ verificationMethod: this.verificationMethod,
245
+ verificationMethods,
246
+ selectVerificationMethod: this.selectVerificationMethod,
247
+ }
248
+ })
249
+ .afterClosed()
250
+ .pipe(filter((verificationMethod) => !!verificationMethod))
251
+ .subscribe((verificationMethod) => {
252
+ this.verificationMethod = verificationMethod;
253
+ this.code = '';
254
+ this._cdRef.markForCheck();
255
+ setTimeout(() => {
256
+ this.verificationCodeComponent.focus();
257
+ });
258
+ });
259
+ });
260
+ }
261
+ }
262
+ 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 });
263
+ 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", codeLength: "codeLength", 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 [codeLength]=\"codeLength\"\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", "codeLength", "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 });
264
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationComponent, decorators: [{
265
+ type: Component,
266
+ args: [{
267
+ selector: 'fs-2fa-verification',
268
+ templateUrl: './2fa-verification.component.html',
269
+ styleUrls: ['./2fa-verification.component.scss'],
270
+ changeDetection: ChangeDetectionStrategy.OnPush,
271
+ viewProviders: [{ provide: ControlContainer, useExisting: NgForm }],
272
+ }]
273
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i3.FsDialog }, { type: i2.FsMessage }]; }, propDecorators: { verificationCodeComponent: [{
274
+ type: ViewChild,
275
+ args: [Fs2faVerificationCodeComponent]
276
+ }], verificationMethod: [{
277
+ type: Input
278
+ }], resend: [{
279
+ type: Input
280
+ }], showTrustedDevice: [{
281
+ type: Input
282
+ }], trustDevice: [{
283
+ type: Input
284
+ }], codeLength: [{
285
+ type: Input
286
+ }], trustDays: [{
287
+ type: Input
288
+ }], formatRecipient: [{
289
+ type: Input
290
+ }], getVerificationMethods: [{
291
+ type: Input
292
+ }], selectVerificationMethod: [{
293
+ type: Input
294
+ }], verified: [{
295
+ type: Output
296
+ }], codeChanged: [{
297
+ type: Output
298
+ }], codeCompleted: [{
299
+ type: Output
300
+ }], trustDeviceChange: [{
301
+ type: Output
293
302
  }] } });
294
303
 
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
- }]
304
+ class CodeInputModule {
305
+ }
306
+ CodeInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CodeInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
307
+ CodeInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CodeInputModule, declarations: [CodeInputComponent], imports: [FormsModule,
308
+ FsCodeInputModule], exports: [CodeInputComponent] });
309
+ CodeInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CodeInputModule, imports: [[
310
+ FormsModule,
311
+ FsCodeInputModule,
312
+ ]] });
313
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CodeInputModule, decorators: [{
314
+ type: NgModule,
315
+ args: [{
316
+ imports: [
317
+ FormsModule,
318
+ FsCodeInputModule,
319
+ ],
320
+ declarations: [
321
+ CodeInputComponent,
322
+ ],
323
+ exports: [
324
+ CodeInputComponent,
325
+ ],
326
+ }]
318
327
  }] });
319
328
 
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
329
+ class ResendComponent {
330
+ constructor(_cdRef) {
331
+ this._cdRef = _cdRef;
332
+ this.resendInProgress = false;
333
+ this._destroy$ = new Subject();
334
+ }
335
+ resendClick() {
336
+ this.resendInProgress = true;
337
+ this.resend()
338
+ .pipe(finalize(() => {
339
+ this.resendInProgress = false;
340
+ this._cdRef.markForCheck();
341
+ }), takeUntil(this._destroy$))
342
+ .subscribe();
343
+ }
344
+ ngOnDestroy() {
345
+ this._destroy$.next();
346
+ this._destroy$.complete();
347
+ }
348
+ }
349
+ ResendComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ResendComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
350
+ 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 });
351
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ResendComponent, decorators: [{
352
+ type: Component,
353
+ args: [{
354
+ selector: 'app-resend',
355
+ templateUrl: './resend.component.html',
356
+ styleUrls: ['./resend.component.scss'],
357
+ changeDetection: ChangeDetectionStrategy.OnPush,
358
+ }]
359
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { resend: [{
360
+ type: Input
352
361
  }] } });
353
362
 
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
- }]
363
+ class ResendModule {
364
+ }
365
+ ResendModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ResendModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
366
+ ResendModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ResendModule, declarations: [ResendComponent], imports: [CommonModule,
367
+ MatProgressSpinnerModule], exports: [ResendComponent] });
368
+ ResendModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ResendModule, imports: [[
369
+ CommonModule,
370
+ MatProgressSpinnerModule,
371
+ ]] });
372
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ResendModule, decorators: [{
373
+ type: NgModule,
374
+ args: [{
375
+ imports: [
376
+ CommonModule,
377
+ MatProgressSpinnerModule,
378
+ ],
379
+ declarations: [
380
+ ResendComponent,
381
+ ],
382
+ exports: [
383
+ ResendComponent,
384
+ ],
385
+ }]
377
386
  }] });
378
387
 
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']
388
+ class Fs2faVerificationResendDirective {
389
+ constructor(_button) {
390
+ this._button = _button;
391
+ }
392
+ click() {
393
+ this._button.disabled = true;
394
+ this.verification.resendCode()
395
+ .pipe(finalize(() => this._button.disabled = false))
396
+ .subscribe();
397
+ }
398
+ }
399
+ Fs2faVerificationResendDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationResendDirective, deps: [{ token: i6.MatButton }], target: i0.ɵɵFactoryTarget.Directive });
400
+ 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 });
401
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationResendDirective, decorators: [{
402
+ type: Directive,
403
+ args: [{
404
+ selector: '[fs2faVerificationResend]',
405
+ }]
406
+ }], ctorParameters: function () { return [{ type: i6.MatButton }]; }, propDecorators: { verification: [{
407
+ type: Input,
408
+ args: ['fs2faVerificationResend']
409
+ }], click: [{
410
+ type: HostListener,
411
+ args: ['click']
403
412
  }] } });
404
413
 
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
- }]
414
+ class Fs2faVerificationModule {
415
+ }
416
+ Fs2faVerificationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
417
+ Fs2faVerificationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationModule, declarations: [Fs2faVerificationComponent,
418
+ Fs2faVerificationCodeComponent,
419
+ Fs2faVerificationMethodsComponent,
420
+ Fs2faVerificationResendDirective], imports: [CommonModule,
421
+ FormsModule,
422
+ MatFormFieldModule,
423
+ MatInputModule,
424
+ MatButtonModule,
425
+ MatIconModule,
426
+ MatRadioModule,
427
+ MatCheckboxModule,
428
+ FsFormModule,
429
+ FsRadioGroupModule,
430
+ FsDialogModule,
431
+ FsSkeletonModule,
432
+ FsPhoneModule,
433
+ FsSkeletonModule,
434
+ ResendModule,
435
+ CodeInputModule], exports: [Fs2faVerificationComponent,
436
+ Fs2faVerificationResendDirective] });
437
+ Fs2faVerificationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationModule, providers: [], imports: [[
438
+ CommonModule,
439
+ FormsModule,
440
+ MatFormFieldModule,
441
+ MatInputModule,
442
+ MatButtonModule,
443
+ MatIconModule,
444
+ MatRadioModule,
445
+ MatCheckboxModule,
446
+ FsFormModule,
447
+ FsRadioGroupModule,
448
+ FsDialogModule,
449
+ FsSkeletonModule,
450
+ FsPhoneModule,
451
+ FsSkeletonModule,
452
+ ResendModule,
453
+ CodeInputModule,
454
+ ]] });
455
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationModule, decorators: [{
456
+ type: NgModule,
457
+ args: [{
458
+ imports: [
459
+ CommonModule,
460
+ FormsModule,
461
+ MatFormFieldModule,
462
+ MatInputModule,
463
+ MatButtonModule,
464
+ MatIconModule,
465
+ MatRadioModule,
466
+ MatCheckboxModule,
467
+ FsFormModule,
468
+ FsRadioGroupModule,
469
+ FsDialogModule,
470
+ FsSkeletonModule,
471
+ FsPhoneModule,
472
+ FsSkeletonModule,
473
+ ResendModule,
474
+ CodeInputModule,
475
+ ],
476
+ declarations: [
477
+ Fs2faVerificationComponent,
478
+ Fs2faVerificationCodeComponent,
479
+ Fs2faVerificationMethodsComponent,
480
+ Fs2faVerificationResendDirective,
481
+ ],
482
+ exports: [
483
+ Fs2faVerificationComponent,
484
+ Fs2faVerificationResendDirective,
485
+ ],
486
+ providers: [],
487
+ }]
479
488
  }] });
480
489
 
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
490
+ class QrCodeComponent {
491
+ constructor(_cdRef) {
492
+ this._cdRef = _cdRef;
493
+ }
494
+ ngOnInit() {
495
+ QRCode.toDataURL(this.value, {
496
+ errorCorrectionLevel: 'H',
497
+ width: 300,
498
+ height: 300,
499
+ })
500
+ .then((url) => {
501
+ this.image = url;
502
+ this._cdRef.markForCheck();
503
+ })
504
+ .catch((err) => {
505
+ console.error(err);
506
+ });
507
+ }
508
+ }
509
+ QrCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: QrCodeComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
510
+ 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 });
511
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: QrCodeComponent, decorators: [{
512
+ type: Component,
513
+ args: [{
514
+ selector: 'app-qr-code',
515
+ templateUrl: './qr-code.component.html',
516
+ styleUrls: ['./qr-code.component.scss'],
517
+ changeDetection: ChangeDetectionStrategy.OnPush,
518
+ }]
519
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { value: [{
520
+ type: Input
511
521
  }] } });
512
522
 
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]
523
+ class AppComponent {
524
+ constructor(_data, _dialogRef, _cdRef, _message) {
525
+ this._data = _data;
526
+ this._dialogRef = _dialogRef;
527
+ this._cdRef = _cdRef;
528
+ this._message = _message;
529
+ this.mode = 'qr-code';
530
+ this.verify = () => {
531
+ return this.twoFactorManageService.verificationMethodVerify$(this.code, true)
532
+ .pipe(switchMap(() => {
533
+ return this.default && this.twoFactorManageService.verificationMethodDefault$ ?
534
+ this.twoFactorManageService.verificationMethodDefault$(this.verificationMethod) :
535
+ of(true);
536
+ }), tap(() => {
537
+ this._message.success('Created app authenticator verification method');
538
+ this._dialogRef.close(true);
539
+ }));
540
+ };
541
+ }
542
+ ngOnInit() {
543
+ this.twoFactorManageService = this._data.twoFactorManageService;
544
+ this.accountId = this._data.accountId;
545
+ this.default = !this.twoFactorManageService.hasVerificationMethods;
546
+ }
547
+ appTypeGoogle() {
548
+ this.appTypeSelect('google');
549
+ }
550
+ appTypeAuthy() {
551
+ this.appTypeSelect('authy');
552
+ }
553
+ appTypeSelect(appType) {
554
+ this.appType = appType;
555
+ this.twoFactorManageService.verificationMethodCreate$({
556
+ type: VerificationMethodType.App,
557
+ })
558
+ .subscribe((verificationMethod) => {
559
+ this.verificationMethod = verificationMethod;
560
+ this.qrCodeUrl = verificationMethod.qrCodeUrl;
561
+ this._cdRef.markForCheck();
562
+ });
563
+ }
564
+ codeCompleted() {
565
+ this.form.triggerSubmit();
566
+ }
567
+ codeChanged(code) {
568
+ this.code = code;
569
+ this.form.dirty();
570
+ }
571
+ next() {
572
+ this.mode = 'code-input';
573
+ }
574
+ }
575
+ 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 });
576
+ 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 (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 });
577
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AppComponent, decorators: [{
578
+ type: Component,
579
+ args: [{
580
+ templateUrl: './app.component.html',
581
+ styleUrls: ['./app.component.scss'],
582
+ changeDetection: ChangeDetectionStrategy.OnPush,
583
+ }]
584
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
585
+ type: Inject,
586
+ args: [MAT_DIALOG_DATA]
587
+ }] }, { type: i1.MatDialogRef }, { type: i0.ChangeDetectorRef }, { type: i2.FsMessage }]; }, propDecorators: { form: [{
588
+ type: ViewChild,
589
+ args: [FsFormDirective]
580
590
  }] } });
581
591
 
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 }]
592
+ class EmailComponent {
593
+ constructor(_data, _dialogRef, _cdRef, _message) {
594
+ this._data = _data;
595
+ this._dialogRef = _dialogRef;
596
+ this._cdRef = _cdRef;
597
+ this._message = _message;
598
+ this.verificationMethod = null;
599
+ this.trustDevice = true;
600
+ this.resend = () => {
601
+ return this.twoFactorManageService.verificationMethodResend()
602
+ .pipe(tap(() => {
603
+ this._message.success('Resent verification code');
604
+ }));
605
+ };
606
+ this.submit = () => {
607
+ return of(true)
608
+ .pipe(switchMap(() => {
609
+ return this.verificationMethod ?
610
+ this.twoFactorManageService.verificationMethodVerify$(this.code, this.trustDevice)
611
+ .pipe(tap((verificationMethod) => {
612
+ this._message.success('Created email verification method');
613
+ this._dialogRef.close(verificationMethod);
614
+ })) :
615
+ this.twoFactorManageService.verificationMethodCreate$({
616
+ type: VerificationMethodType.Email,
617
+ email: this.email,
618
+ default: this.default,
619
+ })
620
+ .pipe(tap((verificationMethod) => {
621
+ this.verificationMethod = verificationMethod;
622
+ this.form.clear();
623
+ this._cdRef.markForCheck();
624
+ }));
625
+ }));
626
+ };
627
+ this.twoFactorManageService = _data.twoFactorManageService;
628
+ this.default = !this.twoFactorManageService.hasVerificationMethods;
629
+ }
630
+ codeCompleted() {
631
+ if (!this.form.submitting) {
632
+ this.form.triggerSubmit();
633
+ }
634
+ }
635
+ codeChanged(code) {
636
+ this.code = code;
637
+ }
638
+ }
639
+ 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 });
640
+ 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", "codeLength", "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 });
641
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EmailComponent, decorators: [{
642
+ type: Component,
643
+ args: [{
644
+ templateUrl: './email.component.html',
645
+ styleUrls: ['./email.component.scss'],
646
+ changeDetection: ChangeDetectionStrategy.OnPush,
647
+ }]
648
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
649
+ type: Inject,
650
+ args: [MAT_DIALOG_DATA]
651
+ }] }, { type: i1.MatDialogRef }, { type: i0.ChangeDetectorRef }, { type: i2.FsMessage }]; }, propDecorators: { form: [{
652
+ type: ViewChild,
653
+ args: [FsFormDirective, { static: false }]
644
654
  }] } });
645
655
 
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 }]
656
+ class NumberComponent {
657
+ constructor(_data, _dialogRef, _cdRef, _message) {
658
+ this._data = _data;
659
+ this._dialogRef = _dialogRef;
660
+ this._cdRef = _cdRef;
661
+ this._message = _message;
662
+ this.trustDevice = true;
663
+ this.verificationMethod = null;
664
+ this.resend = () => {
665
+ return this.twoFactorManageService.verificationMethodResend()
666
+ .pipe(tap(() => {
667
+ this._message.success('Resent verification code');
668
+ }));
669
+ };
670
+ this.submit = () => {
671
+ return of(true)
672
+ .pipe(switchMap(() => {
673
+ return this.verificationMethod ?
674
+ this.twoFactorManageService.verificationMethodVerify$(this.code, this.trustDevice)
675
+ .pipe(tap((verificationMethod) => {
676
+ this._message.success('Created text message verification method');
677
+ this._dialogRef.close(verificationMethod);
678
+ })) :
679
+ this.twoFactorManageService.verificationMethodCreate$({
680
+ type: VerificationMethodType.Sms,
681
+ phoneNumber: this.phone.number,
682
+ phoneCode: this.phone.countryCode,
683
+ phoneCountry: this.phone.isoCode,
684
+ default: this.default,
685
+ })
686
+ .pipe(tap((verificationMethod) => {
687
+ this.verificationMethod = verificationMethod;
688
+ this.form.clear();
689
+ this._cdRef.markForCheck();
690
+ }));
691
+ }));
692
+ };
693
+ this.twoFactorManageService = _data.twoFactorManageService;
694
+ this.defaultCountry = _data.defaultCountry;
695
+ this.default = !this.twoFactorManageService.hasVerificationMethods;
696
+ }
697
+ codeCompleted() {
698
+ if (!this.form.submitting) {
699
+ this.form.triggerSubmit();
700
+ }
701
+ }
702
+ codeChanged(code) {
703
+ this.code = code;
704
+ }
705
+ }
706
+ 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 });
707
+ 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", "codeLength", "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 });
708
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NumberComponent, decorators: [{
709
+ type: Component,
710
+ args: [{
711
+ templateUrl: './number.component.html',
712
+ styleUrls: ['./number.component.scss'],
713
+ changeDetection: ChangeDetectionStrategy.OnPush,
714
+ }]
715
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
716
+ type: Inject,
717
+ args: [MAT_DIALOG_DATA]
718
+ }] }, { type: i1.MatDialogRef }, { type: i0.ChangeDetectorRef }, { type: i2.FsMessage }]; }, propDecorators: { form: [{
719
+ type: ViewChild,
720
+ args: [FsFormDirective, { static: false }]
711
721
  }] } });
712
722
 
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
723
+ class TwoFactorManageService {
724
+ constructor(_dialog) {
725
+ this._dialog = _dialog;
726
+ this._destroy$ = new Subject();
727
+ this._verificationMethods$ = new BehaviorSubject([]);
728
+ }
729
+ get verificationMethods$() {
730
+ return this._verificationMethods$
731
+ .pipe(takeUntil(this._destroy$));
732
+ }
733
+ get verificationMethods() {
734
+ return this._verificationMethods$.getValue();
735
+ }
736
+ get hasVerificationMethods() {
737
+ return !!this._verificationMethods$.getValue().length;
738
+ }
739
+ get emailVerificationMethods() {
740
+ return this.getVerificationMethods(VerificationMethodType.Email);
741
+ }
742
+ get smsVerificationMethods() {
743
+ return this.getVerificationMethods(VerificationMethodType.Sms);
744
+ }
745
+ get appVerificationMethods() {
746
+ return this.getVerificationMethods(VerificationMethodType.App);
747
+ }
748
+ getVerificationMethods(type) {
749
+ return this.verificationMethods
750
+ .filter((verificationMethod) => {
751
+ return verificationMethod.type === type;
752
+ });
753
+ }
754
+ hasVerificationMethod(type) {
755
+ return this.verificationMethods
756
+ .some((verificationMethod) => {
757
+ return verificationMethod.type === type;
758
+ });
759
+ }
760
+ registerVerificationMethodDefault(value) {
761
+ this._verificationMethodDefault = value;
762
+ }
763
+ registerVerificationMethodResend(value) {
764
+ this._verificationMethodResend = value;
765
+ }
766
+ registerVerificationMethodsFetch(value) {
767
+ this._verificationMethodsFetch = value;
768
+ }
769
+ registerVerificationMethodDelete(value) {
770
+ this._verificationMethodDelete = value;
771
+ }
772
+ registerVerificationMethodCreate(value) {
773
+ this._verificationMethodCreate = value;
774
+ }
775
+ registerVerificationMethodVerify(value) {
776
+ this._verificationMethodVerify = value;
777
+ }
778
+ registerAccountVerify(value) {
779
+ this._accountVerify = value;
780
+ }
781
+ get hasVerificationMethodResend() {
782
+ return !!this._verificationMethodResend;
783
+ }
784
+ get hasVerificationMethodDefault() {
785
+ return !!this._verificationMethodDefault;
786
+ }
787
+ get hasVerificationMethodsFetch() {
788
+ return !!this._verificationMethodsFetch;
789
+ }
790
+ get hasVerificationMethodDelete() {
791
+ return !!this._verificationMethodDelete;
792
+ }
793
+ get hasVerificationMethodCreate() {
794
+ return !!this._verificationMethodCreate;
795
+ }
796
+ get hasVerificationMethodVerify() {
797
+ return !!this._verificationMethodVerify;
798
+ }
799
+ verificationMethodDelete$(verificationMethod) {
800
+ return this._verificationMethodDelete(verificationMethod)
801
+ .pipe(tap(() => {
802
+ this.verificationMethodsFetch();
803
+ }));
804
+ }
805
+ verificationMethodVerify$(code, trustDevice) {
806
+ return this._verificationMethodVerify(code, trustDevice)
807
+ .pipe(tap(() => {
808
+ this.verificationMethodsFetch();
809
+ }));
810
+ }
811
+ verificationMethodCreate$(verificationMethod) {
812
+ return this._verificationMethodCreate(verificationMethod);
813
+ }
814
+ verificationMethodDefault$(verificationMethod) {
815
+ return this._verificationMethodDefault(verificationMethod);
816
+ }
817
+ verificationMethodResend() {
818
+ return this._verificationMethodResend();
819
+ }
820
+ verificationMethodsFetch(query) {
821
+ this.verificationMethodsFetch$(query)
822
+ .subscribe();
823
+ }
824
+ verificationMethodsFetch$(query) {
825
+ return this._verificationMethodsFetch(query)
826
+ .pipe(tap((verificationMethods) => {
827
+ this._verificationMethods$.next(verificationMethods);
828
+ }));
829
+ }
830
+ accountVerify$() {
831
+ return this._accountVerify ? this._accountVerify() : of(true);
832
+ }
833
+ ngOnDestroy() {
834
+ this._destroy$.next();
835
+ this._destroy$.complete();
836
+ }
837
+ addSms$(defaultCountry) {
838
+ return this.accountVerify$()
839
+ .pipe(switchMap(() => this._dialog.open(NumberComponent, {
840
+ data: {
841
+ defaultCountry,
842
+ twoFactorManageService: this,
843
+ },
844
+ })
845
+ .afterClosed()), tap(() => {
846
+ this.verificationMethodsFetch();
847
+ }), takeUntil(this._destroy$));
848
+ }
849
+ addEmail$() {
850
+ return this.accountVerify$()
851
+ .pipe(switchMap(() => this._dialog.open(EmailComponent, {
852
+ data: { twoFactorManageService: this },
853
+ })
854
+ .afterClosed()), tap(() => {
855
+ this.verificationMethodsFetch();
856
+ }), takeUntil(this._destroy$));
857
+ }
858
+ addApp$() {
859
+ return this.accountVerify$()
860
+ .pipe(switchMap(() => this._dialog.open(AppComponent, {
861
+ data: { twoFactorManageService: this },
862
+ })
863
+ .afterClosed()), tap(() => {
864
+ this.verificationMethodsFetch();
865
+ }), takeUntil(this._destroy$));
866
+ }
867
+ }
868
+ TwoFactorManageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TwoFactorManageService, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
869
+ TwoFactorManageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TwoFactorManageService });
870
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TwoFactorManageService, decorators: [{
871
+ type: Injectable
862
872
  }], ctorParameters: function () { return [{ type: i1.MatDialog }]; } });
863
873
 
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
- }]
874
+ class DefaultedComponent {
875
+ }
876
+ DefaultedComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DefaultedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
877
+ 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 });
878
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DefaultedComponent, decorators: [{
879
+ type: Component,
880
+ args: [{
881
+ selector: 'app-defaulted',
882
+ templateUrl: './defaulted.component.html',
883
+ styleUrls: ['./defaulted.component.scss'],
884
+ changeDetection: ChangeDetectionStrategy.OnPush,
885
+ }]
876
886
  }] });
877
887
 
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
888
+ class VerificationMethodsComponent {
889
+ constructor(_prompt) {
890
+ this._prompt = _prompt;
891
+ this.deleted = new EventEmitter();
892
+ this.VerificationMethodType = VerificationMethodType;
893
+ }
894
+ ngOnInit() {
895
+ var _a, _b, _c, _d;
896
+ if (!this.verificationMethodDefault && ((_a = this.twoFactorManageService) === null || _a === void 0 ? void 0 : _a.hasVerificationMethodDefault)) {
897
+ this.verificationMethodDefault = (verificationMethod) => {
898
+ return this.twoFactorManageService.verificationMethodDefault$(verificationMethod);
899
+ };
900
+ }
901
+ if (!this.verificationMethodDelete && ((_b = this.twoFactorManageService) === null || _b === void 0 ? void 0 : _b.hasVerificationMethodDelete)) {
902
+ this.verificationMethodDelete = (verificationMethod) => {
903
+ return this.twoFactorManageService.verificationMethodDelete$(verificationMethod);
904
+ };
905
+ }
906
+ if (!this.verificationMethodsFetch && ((_c = this.twoFactorManageService) === null || _c === void 0 ? void 0 : _c.hasVerificationMethodsFetch)) {
907
+ this.verificationMethodsFetch = (query) => {
908
+ return this.twoFactorManageService.verificationMethodsFetch$(query);
909
+ };
910
+ }
911
+ if (!this.accountVerify && ((_d = this.twoFactorManageService) === null || _d === void 0 ? void 0 : _d.hasVerificationMethodVerify)) {
912
+ this.accountVerify = () => {
913
+ var _a;
914
+ return (_a = this.twoFactorManageService) === null || _a === void 0 ? void 0 : _a.accountVerify$();
915
+ };
916
+ }
917
+ this.listConfig = {
918
+ paging: false,
919
+ rowActions: [
920
+ {
921
+ click: (verificationMethod) => {
922
+ this.accountVerify()
923
+ .pipe(switchMap(() => this.verificationMethodDefault(verificationMethod)))
924
+ .subscribe(() => {
925
+ this.list.reload();
926
+ });
927
+ },
928
+ show: (data) => {
929
+ return !!this.verificationMethodDefault && !data.default;
930
+ },
931
+ label: 'Set as Default',
932
+ },
933
+ {
934
+ click: (verificationMethod) => {
935
+ this._prompt.confirm({
936
+ title: 'Confirm',
937
+ template: 'Would you like to delete this verification method?',
938
+ })
939
+ .pipe(switchMap(() => this.accountVerify()), switchMap(() => this.verificationMethodDelete(verificationMethod)))
940
+ .subscribe(() => {
941
+ this.deleted.emit();
942
+ this.list.reload();
943
+ });
944
+ },
945
+ show: () => {
946
+ return !!this.verificationMethodDelete;
947
+ },
948
+ label: 'Delete',
949
+ },
950
+ ],
951
+ fetch: (query) => {
952
+ query = Object.assign(Object.assign({}, query), { type: this.type });
953
+ return this.verificationMethodsFetch(query)
954
+ .pipe(map((verificationMethods) => ({
955
+ data: verificationMethods.filter((verificationMethod) => {
956
+ return !this.type || verificationMethod.type === this.type;
957
+ }),
958
+ })));
959
+ },
960
+ };
961
+ }
962
+ reload() {
963
+ this.list.reload();
964
+ }
965
+ }
966
+ 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 });
967
+ 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 });
968
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: VerificationMethodsComponent, decorators: [{
969
+ type: Component,
970
+ args: [{
971
+ selector: 'fs-2fa-verification-methods',
972
+ templateUrl: './verification-methods.component.html',
973
+ styleUrls: ['./verification-methods.component.scss'],
974
+ changeDetection: ChangeDetectionStrategy.OnPush,
975
+ }]
976
+ }], ctorParameters: function () { return [{ type: i1$3.FsPrompt }]; }, propDecorators: { list: [{
977
+ type: ViewChild,
978
+ args: [FsListComponent]
979
+ }], type: [{
980
+ type: Input
981
+ }], accountVerify: [{
982
+ type: Input
983
+ }], verificationMethodsFetch: [{
984
+ type: Input
985
+ }], verificationMethodDelete: [{
986
+ type: Input
987
+ }], verificationMethodDefault: [{
988
+ type: Input
989
+ }], twoFactorManageService: [{
990
+ type: Input
991
+ }], deleted: [{
992
+ type: Output
983
993
  }] } });
984
994
 
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]
995
+ class NumbersComponent {
996
+ constructor(_data, _dialogRef, _message) {
997
+ this._data = _data;
998
+ this._dialogRef = _dialogRef;
999
+ this._message = _message;
1000
+ this.VerificationMethodType = VerificationMethodType;
1001
+ this.twoFactorManageService = _data.twoFactorManageService;
1002
+ this.defaultCountry = _data.defaultCountry;
1003
+ }
1004
+ add() {
1005
+ this.twoFactorManageService.addSms$(this.defaultCountry)
1006
+ .subscribe(() => {
1007
+ this.verificationMethods.reload();
1008
+ });
1009
+ }
1010
+ deleted() {
1011
+ this._message.success('Deleted text message verification method');
1012
+ if (!this.twoFactorManageService.hasVerificationMethod(VerificationMethodType.Sms)) {
1013
+ this._dialogRef.close();
1014
+ }
1015
+ }
1016
+ }
1017
+ 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 });
1018
+ 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 });
1019
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NumbersComponent, decorators: [{
1020
+ type: Component,
1021
+ args: [{
1022
+ templateUrl: './numbers.component.html',
1023
+ styleUrls: ['./numbers.component.scss'],
1024
+ changeDetection: ChangeDetectionStrategy.OnPush,
1025
+ }]
1026
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1027
+ type: Inject,
1028
+ args: [MAT_DIALOG_DATA]
1029
+ }] }, { type: i1.MatDialogRef }, { type: i2.FsMessage }]; }, propDecorators: { verificationMethods: [{
1030
+ type: ViewChild,
1031
+ args: [VerificationMethodsComponent]
1022
1032
  }] } });
1023
1033
 
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]
1034
+ class EmailsComponent {
1035
+ constructor(_data, _dialogRef, _message) {
1036
+ this._data = _data;
1037
+ this._dialogRef = _dialogRef;
1038
+ this._message = _message;
1039
+ this.VerificationMethodType = VerificationMethodType;
1040
+ this.twoFactorManageService = _data.twoFactorManageService;
1041
+ }
1042
+ add() {
1043
+ this.twoFactorManageService.addEmail$()
1044
+ .subscribe(() => {
1045
+ this.verificationMethods.reload();
1046
+ });
1047
+ }
1048
+ deleted() {
1049
+ this._message.success('Deleted email verification method');
1050
+ if (!this.twoFactorManageService.hasVerificationMethod(VerificationMethodType.Email)) {
1051
+ this._dialogRef.close();
1052
+ }
1053
+ }
1054
+ }
1055
+ 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 });
1056
+ 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 });
1057
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EmailsComponent, decorators: [{
1058
+ type: Component,
1059
+ args: [{
1060
+ templateUrl: './emails.component.html',
1061
+ styleUrls: ['./emails.component.scss'],
1062
+ changeDetection: ChangeDetectionStrategy.OnPush,
1063
+ }]
1064
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1065
+ type: Inject,
1066
+ args: [MAT_DIALOG_DATA]
1067
+ }] }, { type: i1.MatDialogRef }, { type: i2.FsMessage }]; }, propDecorators: { verificationMethods: [{
1068
+ type: ViewChild,
1069
+ args: [VerificationMethodsComponent]
1060
1070
  }] } });
1061
1071
 
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]
1072
+ class ManageMethodsComponent {
1073
+ constructor(_data, _cdRef, _dialog, _message) {
1074
+ this._data = _data;
1075
+ this._cdRef = _cdRef;
1076
+ this._dialog = _dialog;
1077
+ this._message = _message;
1078
+ this.verificationMethodTypes = {};
1079
+ this.VerificationMethodType = VerificationMethodType;
1080
+ this._destroy$ = new Subject();
1081
+ }
1082
+ ngOnInit() {
1083
+ this._defaultCountry = this._data.defaultCountry;
1084
+ this.twoFactorManageService = this._data.twoFactorManageService;
1085
+ this.verificationMethodTypes = this._data.verificationMethodTypes
1086
+ .reduce((verificationMethodTypes, verificationMethodType) => {
1087
+ verificationMethodTypes[verificationMethodType] = true;
1088
+ return verificationMethodTypes;
1089
+ }, {});
1090
+ this.twoFactorManageService.verificationMethods$
1091
+ .subscribe((verificationMethods) => {
1092
+ this.verificationMethods = verificationMethods;
1093
+ this._cdRef.markForCheck();
1094
+ });
1095
+ }
1096
+ get defaultSms() {
1097
+ return this.twoFactorManageService.smsVerificationMethods
1098
+ .some((verificationMethod) => {
1099
+ return verificationMethod.default;
1100
+ });
1101
+ }
1102
+ get defaultApp() {
1103
+ return this.twoFactorManageService.appVerificationMethods
1104
+ .some((verificationMethod) => {
1105
+ return verificationMethod.default;
1106
+ });
1107
+ }
1108
+ get defaultEmail() {
1109
+ return this.twoFactorManageService.emailVerificationMethods
1110
+ .some((verificationMethod) => {
1111
+ return verificationMethod.default;
1112
+ });
1113
+ }
1114
+ get textHasVerificationMethod() {
1115
+ return this.twoFactorManageService.hasVerificationMethod(VerificationMethodType.Sms);
1116
+ }
1117
+ get appHasVerificationMethod() {
1118
+ return this.twoFactorManageService.hasVerificationMethod(VerificationMethodType.App);
1119
+ }
1120
+ get emailHasVerificationMethod() {
1121
+ return this.twoFactorManageService.hasVerificationMethod(VerificationMethodType.Email);
1122
+ }
1123
+ textMessageManage() {
1124
+ this._dialog.open(NumbersComponent, {
1125
+ data: {
1126
+ twoFactorManageService: this.twoFactorManageService,
1127
+ defaultCountry: this._defaultCountry,
1128
+ },
1129
+ });
1130
+ }
1131
+ textMessageAdd() {
1132
+ this.twoFactorManageService.addSms$(this._defaultCountry)
1133
+ .subscribe();
1134
+ }
1135
+ emailMessageManage() {
1136
+ this._dialog.open(EmailsComponent, {
1137
+ data: {
1138
+ twoFactorManageService: this.twoFactorManageService,
1139
+ },
1140
+ });
1141
+ }
1142
+ emailMessageAdd() {
1143
+ this.twoFactorManageService.addEmail$()
1144
+ .subscribe();
1145
+ }
1146
+ appRemove() {
1147
+ const verificationMethod = this.verificationMethods
1148
+ .find((_verificationMethod) => {
1149
+ return _verificationMethod.type === VerificationMethodType.App;
1150
+ });
1151
+ if (verificationMethod) {
1152
+ this.twoFactorManageService.accountVerify$()
1153
+ .pipe(switchMap(() => this.twoFactorManageService.verificationMethodDelete$(verificationMethod)))
1154
+ .subscribe(() => {
1155
+ this._message.success('Removed App Authenticator verification method');
1156
+ this._cdRef.markForCheck();
1157
+ });
1158
+ }
1159
+ }
1160
+ appAdd() {
1161
+ this.twoFactorManageService.addApp$()
1162
+ .subscribe();
1163
+ }
1164
+ ngOnDestroy() {
1165
+ this._destroy$.next();
1166
+ this._destroy$.complete();
1167
+ }
1168
+ }
1169
+ 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 });
1170
+ 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 });
1171
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ManageMethodsComponent, decorators: [{
1172
+ type: Component,
1173
+ args: [{
1174
+ templateUrl: './manage-methods.component.html',
1175
+ styleUrls: ['./manage-methods.component.scss'],
1176
+ changeDetection: ChangeDetectionStrategy.OnPush,
1177
+ }]
1178
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1179
+ type: Inject,
1180
+ args: [MAT_DIALOG_DATA]
1171
1181
  }] }, { type: i0.ChangeDetectorRef }, { type: i1.MatDialog }, { type: i2.FsMessage }]; } });
1172
1182
 
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
1183
+ class Fs2faManageComponent {
1184
+ constructor(_cdRef, _dialog, _twoFactorManageService) {
1185
+ this._cdRef = _cdRef;
1186
+ this._dialog = _dialog;
1187
+ this._twoFactorManageService = _twoFactorManageService;
1188
+ this._destroy$ = new Subject();
1189
+ }
1190
+ ngOnInit() {
1191
+ this.verificationMethodTypes = this.verificationMethodTypes || [
1192
+ VerificationMethodType.Sms,
1193
+ VerificationMethodType.Email,
1194
+ VerificationMethodType.App
1195
+ ];
1196
+ this._twoFactorManageService.registerVerificationMethodsFetch(this.verificationMethodsFetch);
1197
+ this._twoFactorManageService.registerVerificationMethodDelete(this.verificationMethodDelete);
1198
+ this._twoFactorManageService.registerVerificationMethodCreate(this.verificationMethodCreate);
1199
+ this._twoFactorManageService.registerVerificationMethodVerify(this.verificationMethodVerify);
1200
+ this._twoFactorManageService.registerVerificationMethodResend(this.verificationMethodResend);
1201
+ this._twoFactorManageService.registerVerificationMethodDefault(this.verificationMethodDefault);
1202
+ this._twoFactorManageService.registerAccountVerify(this.accountVerify);
1203
+ this._twoFactorManageService.verificationMethods$
1204
+ .subscribe((verificationMethods) => {
1205
+ const types = {
1206
+ sms: 'Text Message',
1207
+ email: 'Email',
1208
+ app: 'Authenticator App',
1209
+ };
1210
+ this.statuses = Object.keys(verificationMethods.reduce((accum, verificationMethod) => {
1211
+ accum[verificationMethod.type] = true;
1212
+ return accum;
1213
+ }, {}))
1214
+ .map((type) => {
1215
+ return types[type];
1216
+ });
1217
+ this._cdRef.markForCheck();
1218
+ });
1219
+ this._twoFactorManageService.verificationMethodsFetch();
1220
+ }
1221
+ manage() {
1222
+ const dialogRef = this._dialog.open(ManageMethodsComponent, {
1223
+ autoFocus: false,
1224
+ data: {
1225
+ defaultCountry: this.defaultCountry,
1226
+ twoFactorManageService: this._twoFactorManageService,
1227
+ verificationMethodTypes: this.verificationMethodTypes,
1228
+ },
1229
+ });
1230
+ dialogRef.afterClosed()
1231
+ .pipe(takeUntil(this._destroy$))
1232
+ .subscribe(() => {
1233
+ this._cdRef.markForCheck();
1234
+ });
1235
+ }
1236
+ reload() {
1237
+ this._twoFactorManageService.verificationMethodsFetch();
1238
+ }
1239
+ ngOnDestroy() {
1240
+ this._destroy$.next();
1241
+ this._destroy$.complete();
1242
+ }
1243
+ }
1244
+ 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 });
1245
+ 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 });
1246
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faManageComponent, decorators: [{
1247
+ type: Component,
1248
+ args: [{
1249
+ selector: 'fs-2fa-manage',
1250
+ templateUrl: './2fa-manage.component.html',
1251
+ styleUrls: ['./2fa-manage.component.scss'],
1252
+ changeDetection: ChangeDetectionStrategy.OnPush,
1253
+ providers: [TwoFactorManageService],
1254
+ }]
1255
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.MatDialog }, { type: TwoFactorManageService }]; }, propDecorators: { accountVerify: [{
1256
+ type: Input
1257
+ }], defaultCountry: [{
1258
+ type: Input
1259
+ }], verificationMethodTypes: [{
1260
+ type: Input
1261
+ }], verificationMethodsFetch: [{
1262
+ type: Input
1263
+ }], verificationMethodDelete: [{
1264
+ type: Input
1265
+ }], verificationMethodCreate: [{
1266
+ type: Input
1267
+ }], verificationMethodDefault: [{
1268
+ type: Input
1269
+ }], verificationMethodVerify: [{
1270
+ type: Input
1271
+ }], verificationMethodResend: [{
1272
+ type: Input
1263
1273
  }] } });
1264
1274
 
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
- }]
1275
+ class DefautledModule {
1276
+ }
1277
+ DefautledModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DefautledModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1278
+ DefautledModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DefautledModule, declarations: [DefaultedComponent], exports: [DefaultedComponent] });
1279
+ DefautledModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DefautledModule });
1280
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DefautledModule, decorators: [{
1281
+ type: NgModule,
1282
+ args: [{
1283
+ declarations: [
1284
+ DefaultedComponent,
1285
+ ],
1286
+ exports: [DefaultedComponent],
1287
+ }]
1278
1288
  }] });
1279
1289
 
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
- }]
1290
+ class Fs2faVerificationMethodsModule {
1291
+ }
1292
+ Fs2faVerificationMethodsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationMethodsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1293
+ Fs2faVerificationMethodsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationMethodsModule, declarations: [VerificationMethodsComponent], imports: [CommonModule,
1294
+ FormsModule,
1295
+ MatIconModule,
1296
+ FsListModule,
1297
+ FsPhoneModule,
1298
+ FsCountryModule,
1299
+ DefautledModule], exports: [VerificationMethodsComponent] });
1300
+ Fs2faVerificationMethodsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationMethodsModule, imports: [[
1301
+ CommonModule,
1302
+ FormsModule,
1303
+ MatIconModule,
1304
+ FsListModule,
1305
+ FsPhoneModule,
1306
+ FsCountryModule,
1307
+ DefautledModule,
1308
+ ]] });
1309
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationMethodsModule, decorators: [{
1310
+ type: NgModule,
1311
+ args: [{
1312
+ imports: [
1313
+ CommonModule,
1314
+ FormsModule,
1315
+ MatIconModule,
1316
+ FsListModule,
1317
+ FsPhoneModule,
1318
+ FsCountryModule,
1319
+ DefautledModule,
1320
+ ],
1321
+ declarations: [
1322
+ VerificationMethodsComponent,
1323
+ ],
1324
+ exports: [VerificationMethodsComponent],
1325
+ }]
1316
1326
  }] });
1317
1327
 
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
- }]
1328
+ class Fs2faManageModule {
1329
+ }
1330
+ Fs2faManageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faManageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1331
+ Fs2faManageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faManageModule, declarations: [Fs2faManageComponent,
1332
+ ManageMethodsComponent,
1333
+ NumbersComponent,
1334
+ AppComponent,
1335
+ EmailComponent,
1336
+ NumberComponent,
1337
+ EmailsComponent,
1338
+ QrCodeComponent], imports: [CommonModule,
1339
+ FormsModule,
1340
+ MatButtonModule,
1341
+ MatDialogModule,
1342
+ MatInputModule,
1343
+ MatIconModule,
1344
+ MatCheckboxModule,
1345
+ FsDialogModule,
1346
+ FsListModule,
1347
+ FsFormModule,
1348
+ FsLabelModule,
1349
+ FsPhoneModule,
1350
+ FsSkeletonModule,
1351
+ FsCountryModule,
1352
+ CodeInputModule,
1353
+ ResendModule,
1354
+ DefautledModule,
1355
+ Fs2faVerificationModule,
1356
+ Fs2faVerificationMethodsModule], exports: [Fs2faManageComponent] });
1357
+ Fs2faManageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faManageModule, imports: [[
1358
+ CommonModule,
1359
+ FormsModule,
1360
+ MatButtonModule,
1361
+ MatDialogModule,
1362
+ MatInputModule,
1363
+ MatIconModule,
1364
+ MatCheckboxModule,
1365
+ FsDialogModule,
1366
+ FsListModule,
1367
+ FsFormModule,
1368
+ FsLabelModule,
1369
+ FsPhoneModule,
1370
+ FsSkeletonModule,
1371
+ FsCountryModule,
1372
+ CodeInputModule,
1373
+ ResendModule,
1374
+ DefautledModule,
1375
+ Fs2faVerificationModule,
1376
+ Fs2faVerificationMethodsModule,
1377
+ ]] });
1378
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faManageModule, decorators: [{
1379
+ type: NgModule,
1380
+ args: [{
1381
+ imports: [
1382
+ CommonModule,
1383
+ FormsModule,
1384
+ MatButtonModule,
1385
+ MatDialogModule,
1386
+ MatInputModule,
1387
+ MatIconModule,
1388
+ MatCheckboxModule,
1389
+ FsDialogModule,
1390
+ FsListModule,
1391
+ FsFormModule,
1392
+ FsLabelModule,
1393
+ FsPhoneModule,
1394
+ FsSkeletonModule,
1395
+ FsCountryModule,
1396
+ CodeInputModule,
1397
+ ResendModule,
1398
+ DefautledModule,
1399
+ Fs2faVerificationModule,
1400
+ Fs2faVerificationMethodsModule,
1401
+ ],
1402
+ declarations: [
1403
+ Fs2faManageComponent,
1404
+ ManageMethodsComponent,
1405
+ NumbersComponent,
1406
+ AppComponent,
1407
+ EmailComponent,
1408
+ NumberComponent,
1409
+ EmailsComponent,
1410
+ QrCodeComponent,
1411
+ ],
1412
+ exports: [Fs2faManageComponent],
1413
+ }]
1404
1414
  }] });
1405
1415
 
1406
- /**
1407
- * Generated bundle index. Do not edit.
1416
+ /**
1417
+ * Generated bundle index. Do not edit.
1408
1418
  */
1409
1419
 
1410
1420
  export { Fs2faManageComponent, Fs2faManageModule, Fs2faVerificationComponent, Fs2faVerificationMethodsModule, Fs2faVerificationModule, Fs2faVerificationResendDirective, VerificationMethodType, VerificationMethodsComponent };