@firestitch/2fa 12.11.7 → 13.0.1

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