@firestitch/2fa 12.4.4 → 12.6.0

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