@firestitch/2fa 12.0.3 → 12.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/components/2fa-verification/2fa-verification.component.d.ts +17 -8
- package/app/components/2fa-verification-methods/2fa-verification-methods.component.d.ts +7 -8
- package/app/fs-2fa.module.d.ts +17 -17
- package/bundles/firestitch-2fa.umd.js +159 -187
- package/bundles/firestitch-2fa.umd.js.map +1 -1
- package/esm2015/app/components/2fa-verification/2fa-verification.component.js +62 -20
- package/esm2015/app/components/2fa-verification-code/2fa-verification-code.component.js +2 -2
- package/esm2015/app/components/2fa-verification-methods/2fa-verification-methods.component.js +27 -28
- package/esm2015/app/fs-2fa.module.js +9 -8
- package/fesm2015/firestitch-2fa.js +115 -137
- package/fesm2015/firestitch-2fa.js.map +1 -1
- package/package.json +5 -1
- package/app/components/2fa-verification-form/2fa-verification-form.component.d.ts +0 -21
- package/esm2015/app/components/2fa-verification-form/2fa-verification-form.component.js +0 -69
|
@@ -1,8 +1,8 @@
|
|
|
1
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('@angular/material/progress-spinner'), require('@firestitch/form'), require('@firestitch/skeleton'), require('@firestitch/radiogroup'), require('
|
|
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', '@angular/material/progress-spinner', '@firestitch/form', '@firestitch/skeleton', '@firestitch/radiogroup', '
|
|
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.ng.material.progressSpinner, global.
|
|
5
|
-
})(this, (function (exports, i0,
|
|
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('@angular/material/progress-spinner'), require('@firestitch/form'), require('@firestitch/skeleton'), require('@firestitch/radiogroup'), require('@firestitch/dialog'), require('rxjs/operators'), require('@angular/material/dialog'), require('rxjs')) :
|
|
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', '@angular/material/progress-spinner', '@firestitch/form', '@firestitch/skeleton', '@firestitch/radiogroup', '@firestitch/dialog', 'rxjs/operators', '@angular/material/dialog', 'rxjs'], 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.ng.material.progressSpinner, global.i8, global.i9, global.i3, global.i1$1, global.rxjs.operators, global.ng.material.dialog, global.rxjs));
|
|
5
|
+
})(this, (function (exports, i0, i7, i10, i4, i5, i6, i1$2, i3$1, i4$1, i5$1, i8, i9, i3, i1$1, operators, i1, rxjs) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -23,21 +23,92 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
|
+
var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
|
|
27
|
+
var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
|
|
28
|
+
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
29
|
+
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
26
30
|
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
31
|
+
var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
|
|
32
|
+
var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
|
|
33
|
+
var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
|
|
34
|
+
var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
|
|
27
35
|
var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
|
|
28
|
-
var
|
|
29
|
-
var i3__namespace$2 = /*#__PURE__*/_interopNamespace(i3$2);
|
|
30
|
-
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
31
|
-
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
36
|
+
var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
|
|
32
37
|
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
33
|
-
var
|
|
34
|
-
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
38
|
+
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
35
39
|
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
36
|
-
var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
|
|
37
|
-
var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
|
|
38
40
|
|
|
39
41
|
var FS_2FA_VERIFICATION_PROVIDER = new i0.InjectionToken('Provider for Verification service');
|
|
40
42
|
|
|
43
|
+
exports.FsVerificationMethodType = void 0;
|
|
44
|
+
(function (FsVerificationMethodType) {
|
|
45
|
+
FsVerificationMethodType["Sms"] = "sms";
|
|
46
|
+
FsVerificationMethodType["Email"] = "email";
|
|
47
|
+
FsVerificationMethodType["Authenticator"] = "authenticator";
|
|
48
|
+
FsVerificationMethodType["Code"] = "code";
|
|
49
|
+
})(exports.FsVerificationMethodType || (exports.FsVerificationMethodType = {}));
|
|
50
|
+
|
|
51
|
+
var Fs2FaVerificationMethodsComponent = /** @class */ (function () {
|
|
52
|
+
function Fs2FaVerificationMethodsComponent(_verificationProvider, _dialogData, _dialogRef) {
|
|
53
|
+
var _this = this;
|
|
54
|
+
this._verificationProvider = _verificationProvider;
|
|
55
|
+
this._dialogData = _dialogData;
|
|
56
|
+
this._dialogRef = _dialogRef;
|
|
57
|
+
this.verificationMethodType = exports.FsVerificationMethodType;
|
|
58
|
+
this.setVerificationMethod = function () {
|
|
59
|
+
return _this._verificationProvider
|
|
60
|
+
.updateVerificationMethod(_this.method.id)
|
|
61
|
+
.pipe(operators.tap(function (method) {
|
|
62
|
+
_this._dialogRef.close(method);
|
|
63
|
+
}));
|
|
64
|
+
};
|
|
65
|
+
this._setActiveMethod();
|
|
66
|
+
this._initMethods();
|
|
67
|
+
}
|
|
68
|
+
Fs2FaVerificationMethodsComponent.prototype.compareWith = function (o1, o2) {
|
|
69
|
+
return o1 && o2 && o1.id === o2.id;
|
|
70
|
+
};
|
|
71
|
+
Fs2FaVerificationMethodsComponent.prototype._setActiveMethod = function () {
|
|
72
|
+
var _a;
|
|
73
|
+
this.method = (_a = this._dialogData) === null || _a === void 0 ? void 0 : _a.method;
|
|
74
|
+
};
|
|
75
|
+
Fs2FaVerificationMethodsComponent.prototype._initMethods = function () {
|
|
76
|
+
this.methods$ = this._verificationProvider
|
|
77
|
+
.methods()
|
|
78
|
+
.pipe(operators.map(function (methods) {
|
|
79
|
+
return methods
|
|
80
|
+
.reduce(function (acc, method) {
|
|
81
|
+
if (!acc[method.type]) {
|
|
82
|
+
acc[method.type] = [];
|
|
83
|
+
}
|
|
84
|
+
acc[method.type].push(method);
|
|
85
|
+
return acc;
|
|
86
|
+
}, {});
|
|
87
|
+
}), operators.shareReplay(1));
|
|
88
|
+
};
|
|
89
|
+
return Fs2FaVerificationMethodsComponent;
|
|
90
|
+
}());
|
|
91
|
+
Fs2FaVerificationMethodsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2FaVerificationMethodsComponent, deps: [{ token: FS_2FA_VERIFICATION_PROVIDER }, { token: i1.MAT_DIALOG_DATA }, { token: i1__namespace.MatDialogRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
92
|
+
Fs2FaVerificationMethodsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FaVerificationMethodsComponent, selector: "ng-component", ngImport: i0__namespace, template: "<fs-dialog>\n <h1 mat-dialog-title>\n Verification Methods\n </h1>\n <form fsForm [submit]=\"setVerificationMethod\" [dirtySubmitButton]=\"false\">\n <mat-dialog-content>\n <ng-container *fsSkeleton=\"methods$ | async as methods\">\n <fs-radio-group [(ngModel)]=\"method\" name=\"method\" [compareWith]=\"compareWith\">\n <ng-container *ngFor=\"let methodMap of methods | 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 smartphone\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Text Message</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following mobile number\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n mail\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Email</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following email\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n {{ method.phoneNumber }}\n </mat-radio-button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n {{ method.email }}\n </mat-radio-button>\n </ng-container>\n </ng-container>\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 <ng-container *ngIf=\"methods$ | async\">\n <button mat-button type=\"submit\" color=\"primary\">Next</button>\n </ng-container>\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: i1__namespace$1.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3__namespace.FsRadioGroupComponent, selector: "fs-radio-group", inputs: ["orientation", "radioPosition", "compareWith", "required", "disabled", "label", "name"] }, { 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: i7__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i7__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i7__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i8__namespace.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "successDelay", "errorDelay", "submit", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i9__namespace.ɵa, selector: "[fsSkeleton]", inputs: ["fsSkeletonPattern", "fsSkeleton"] }, { type: i7__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i10__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8__namespace.ɵw, selector: "button[type=\"submit\"]", inputs: ["dirtySubmit", "name"] }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "async": i10__namespace.AsyncPipe, "keyvalue": i10__namespace.KeyValuePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
93
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2FaVerificationMethodsComponent, decorators: [{
|
|
94
|
+
type: i0.Component,
|
|
95
|
+
args: [{
|
|
96
|
+
templateUrl: './2fa-verification-methods.component.html',
|
|
97
|
+
styleUrls: [
|
|
98
|
+
'./2fa-verification-methods.component.scss',
|
|
99
|
+
],
|
|
100
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
101
|
+
}]
|
|
102
|
+
}], ctorParameters: function () {
|
|
103
|
+
return [{ type: undefined, decorators: [{
|
|
104
|
+
type: i0.Inject,
|
|
105
|
+
args: [FS_2FA_VERIFICATION_PROVIDER]
|
|
106
|
+
}] }, { type: undefined, decorators: [{
|
|
107
|
+
type: i0.Inject,
|
|
108
|
+
args: [i1.MAT_DIALOG_DATA]
|
|
109
|
+
}] }, { type: i1__namespace.MatDialogRef }];
|
|
110
|
+
} });
|
|
111
|
+
|
|
41
112
|
var Fs2FAVerificationOTPComponent = /** @class */ (function () {
|
|
42
113
|
function Fs2FAVerificationOTPComponent(form) {
|
|
43
114
|
this.form = form;
|
|
@@ -52,7 +123,7 @@
|
|
|
52
123
|
};
|
|
53
124
|
return Fs2FAVerificationOTPComponent;
|
|
54
125
|
}());
|
|
55
|
-
Fs2FAVerificationOTPComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2FAVerificationOTPComponent, deps: [{ token:
|
|
126
|
+
Fs2FAVerificationOTPComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2FAVerificationOTPComponent, deps: [{ token: i8__namespace.FsFormDirective }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
56
127
|
Fs2FAVerificationOTPComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FAVerificationOTPComponent, selector: "fs-2fa-verification-otp", outputs: { codeChange: "codeChange" }, ngImport: i0__namespace, template: "<p class=\"description\">\n Enter the verification code generated by your 2 factor authenticator\n app to verify it's you\n</p>\n\n<!--\n<code-input [initialFocusField]=\"0\"\n [codeLength]=\"6\"\n (codeChanged)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted()\">>\n</code-input>\n-->\n", styles: [":host{display:block}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"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
57
128
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2FAVerificationOTPComponent, decorators: [{
|
|
58
129
|
type: i0.Component,
|
|
@@ -64,7 +135,7 @@
|
|
|
64
135
|
],
|
|
65
136
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
66
137
|
}]
|
|
67
|
-
}], ctorParameters: function () { return [{ type:
|
|
138
|
+
}], ctorParameters: function () { return [{ type: i8__namespace.FsFormDirective }]; }, propDecorators: { codeChange: [{
|
|
68
139
|
type: i0.Output
|
|
69
140
|
}] } });
|
|
70
141
|
|
|
@@ -78,10 +149,10 @@
|
|
|
78
149
|
return Fs2FAVerificationSMSComponent;
|
|
79
150
|
}());
|
|
80
151
|
Fs2FAVerificationSMSComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2FAVerificationSMSComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
81
|
-
Fs2FAVerificationSMSComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FAVerificationSMSComponent, selector: "fs-2fa-verification-code", inputs: { method: "method" }, outputs: { codeChange: "codeChange" }, ngImport: i0__namespace, template: "<p class=\"description\">\n <ng-container *ngIf=\"method.
|
|
152
|
+
Fs2FAVerificationSMSComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FAVerificationSMSComponent, selector: "fs-2fa-verification-code", inputs: { method: "method" }, outputs: { codeChange: "codeChange" }, ngImport: i0__namespace, template: "<p class=\"description\">\n <ng-container *ngIf=\"method.phoneNumber && method.type === 'sms'\">\n A text message with a verification code was just\n sent to <span style=\"white-space: nowrap;\">{{ method.phoneNumber }}</span> to verify it's you.\n </ng-container>\n\n <ng-container *ngIf=\"method.type === 'email'\">\n A email with a verification code was just sent to {{ method.email }} to verify it's you.\n </ng-container>\n\n <ng-container *ngIf=\"false\">\n Enter the one time code generated by the app administrator to verify it's you.\n </ng-container>\n</p>\n\n<mat-form-field>\n <mat-label>Code</mat-label>\n <input type=\"text\"\n matInput\n name=\"code\"\n autocomplete=\"one-time-code\"\n [(ngModel)]=\"code\"\n (ngModelChange)=\"codeChanged()\"\n required\n placeholder=\"Enter the code\"\n inputmode=\"numeric\">\n</mat-form-field>\n", styles: [":host{display:block}mat-form-field{width:100%}\n"], components: [{ type: i1__namespace$2.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace$2.MatLabel, selector: "mat-label" }, { type: i3__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: i7__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: i7__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i7__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i8__namespace.ɵf, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }], viewProviders: [
|
|
82
153
|
{
|
|
83
|
-
provide:
|
|
84
|
-
useExisting:
|
|
154
|
+
provide: i7.ControlContainer,
|
|
155
|
+
useExisting: i7.NgForm,
|
|
85
156
|
},
|
|
86
157
|
], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
87
158
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2FAVerificationSMSComponent, decorators: [{
|
|
@@ -95,8 +166,8 @@
|
|
|
95
166
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
96
167
|
viewProviders: [
|
|
97
168
|
{
|
|
98
|
-
provide:
|
|
99
|
-
useExisting:
|
|
169
|
+
provide: i7.ControlContainer,
|
|
170
|
+
useExisting: i7.NgForm,
|
|
100
171
|
},
|
|
101
172
|
],
|
|
102
173
|
}]
|
|
@@ -106,12 +177,14 @@
|
|
|
106
177
|
type: i0.Output
|
|
107
178
|
}] } });
|
|
108
179
|
|
|
109
|
-
var
|
|
110
|
-
function
|
|
180
|
+
var Fs2FAVerificationComponent = /** @class */ (function () {
|
|
181
|
+
function Fs2FAVerificationComponent(verificationProvider, _cdRef, _dialog) {
|
|
111
182
|
var _this = this;
|
|
112
183
|
this.verificationProvider = verificationProvider;
|
|
113
184
|
this._cdRef = _cdRef;
|
|
185
|
+
this._dialog = _dialog;
|
|
114
186
|
this.verified = new i0.EventEmitter();
|
|
187
|
+
this.backToSignIn = new i0.EventEmitter();
|
|
115
188
|
this.resendInProgress = false;
|
|
116
189
|
this.trustedDevice = false;
|
|
117
190
|
this._destroy$ = new rxjs.Subject();
|
|
@@ -123,14 +196,14 @@
|
|
|
123
196
|
}));
|
|
124
197
|
};
|
|
125
198
|
}
|
|
126
|
-
|
|
199
|
+
Fs2FAVerificationComponent.prototype.ngOnDestroy = function () {
|
|
127
200
|
this._destroy$.next();
|
|
128
201
|
this._destroy$.complete();
|
|
129
202
|
};
|
|
130
|
-
|
|
203
|
+
Fs2FAVerificationComponent.prototype.codeChanged = function (code) {
|
|
131
204
|
this._code = code;
|
|
132
205
|
};
|
|
133
|
-
|
|
206
|
+
Fs2FAVerificationComponent.prototype.resend = function () {
|
|
134
207
|
var _this = this;
|
|
135
208
|
this.resendInProgress = true;
|
|
136
209
|
this.verificationProvider
|
|
@@ -141,134 +214,27 @@
|
|
|
141
214
|
_this._cdRef.markForCheck();
|
|
142
215
|
});
|
|
143
216
|
};
|
|
144
|
-
|
|
145
|
-
}());
|
|
146
|
-
Fs2FAVerificationFormComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2FAVerificationFormComponent, deps: [{ token: FS_2FA_VERIFICATION_PROVIDER }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
147
|
-
Fs2FAVerificationFormComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FAVerificationFormComponent, selector: "fs-2fa-verification-form", inputs: { method: "method" }, outputs: { verified: "verified" }, ngImport: i0__namespace, template: "<form fsForm [submit]=\"verify\">\n <h2>2-Step Verification</h2>\n\n <div class=\"code-container\">\n <ng-container *ngIf=\"method.type === 'authenticator' else code\">\n <fs-2fa-verification-otp class=\"otp\"></fs-2fa-verification-otp>\n </ng-container>\n\n <ng-template #code>\n <fs-2fa-verification-code\n [method]=\"method\"\n (codeChange)=\"codeChanged($event)\">\n </fs-2fa-verification-code>\n </ng-template>\n </div>\n\n <div class=\"additional\">\n <mat-checkbox\n name=\"trust-device\"\n [(ngModel)]=\"trustedDevice\">\n Trust this device\n </mat-checkbox>\n\n <span matSuffix>\n <button mat-button\n type=\"button\"\n color=\"primary\"\n (click)=\"resend()\"\n [disabled]=\"resendInProgress\"\n class=\"resend-code-btn\">\n <ng-container *ngIf=\"!resendInProgress else sending\">\n Resend Code\n </ng-container>\n <ng-template #sending>\n <mat-spinner [diameter]=\"12\"></mat-spinner> Sending\n </ng-template>\n </button>\n </span>\n </div>\n\n <div class=\"actions\">\n <button mat-raised-button\n color=\"primary\"\n type=\"submit\">\n Verify\n </button>\n\n <ng-content></ng-content>\n </div>\n</form>\n", styles: ["h2,.code-container{text-align:center}.code-container .otp{margin-bottom:15px}:host ::ng-deep .actions{margin:10px 0}:host ::ng-deep .actions a{width:100%;font-weight:400}:host ::ng-deep .actions button{width:100%}:host ::ng-deep .actions button[type=button]{font-weight:400;text-transform:none}.additional{display:flex;justify-content:space-between;align-items:baseline;margin-top:-5px}.additional .resend-code-btn{text-transform:none}.additional .resend-code-btn mat-spinner{display:inline-block;vertical-align:middle}\n"], components: [{ type: Fs2FAVerificationOTPComponent, selector: "fs-2fa-verification-otp", outputs: ["codeChange"] }, { type: Fs2FAVerificationSMSComponent, selector: "fs-2fa-verification-code", inputs: ["method"], outputs: ["codeChange"] }, { type: i3__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: i4__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"] }, { type: i5__namespace.MatSpinner, selector: "mat-spinner", inputs: ["color"] }], directives: [{ type: i6__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1__namespace.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "successDelay", "errorDelay", "submit", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i8__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1__namespace$1.MatSuffix, selector: "[matSuffix]" }, { type: i1__namespace.ɵw, selector: "button[type=\"submit\"]", inputs: ["dirtySubmit", "name"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
148
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2FAVerificationFormComponent, decorators: [{
|
|
149
|
-
type: i0.Component,
|
|
150
|
-
args: [{
|
|
151
|
-
selector: 'fs-2fa-verification-form',
|
|
152
|
-
templateUrl: './2fa-verification-form.component.html',
|
|
153
|
-
styleUrls: [
|
|
154
|
-
'./2fa-verification-form.component.scss',
|
|
155
|
-
],
|
|
156
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
157
|
-
}]
|
|
158
|
-
}], ctorParameters: function () {
|
|
159
|
-
return [{ type: undefined, decorators: [{
|
|
160
|
-
type: i0.Inject,
|
|
161
|
-
args: [FS_2FA_VERIFICATION_PROVIDER]
|
|
162
|
-
}] }, { type: i0__namespace.ChangeDetectorRef }];
|
|
163
|
-
}, propDecorators: { method: [{
|
|
164
|
-
type: i0.Input
|
|
165
|
-
}], verified: [{
|
|
166
|
-
type: i0.Output
|
|
167
|
-
}] } });
|
|
168
|
-
|
|
169
|
-
exports.FsVerificationMethodType = void 0;
|
|
170
|
-
(function (FsVerificationMethodType) {
|
|
171
|
-
FsVerificationMethodType["Sms"] = "sms";
|
|
172
|
-
FsVerificationMethodType["Email"] = "email";
|
|
173
|
-
FsVerificationMethodType["Authenticator"] = "authenticator";
|
|
174
|
-
FsVerificationMethodType["Code"] = "code";
|
|
175
|
-
})(exports.FsVerificationMethodType || (exports.FsVerificationMethodType = {}));
|
|
176
|
-
|
|
177
|
-
var Fs2FaVerificationMethodsComponent = /** @class */ (function () {
|
|
178
|
-
function Fs2FaVerificationMethodsComponent(_verificationProvider) {
|
|
217
|
+
Fs2FAVerificationComponent.prototype.showVerificationMethods = function () {
|
|
179
218
|
var _this = this;
|
|
180
|
-
this.
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
};
|
|
191
|
-
this._initMethods();
|
|
192
|
-
}
|
|
193
|
-
Fs2FaVerificationMethodsComponent.prototype.ngOnInit = function () {
|
|
194
|
-
};
|
|
195
|
-
Fs2FaVerificationMethodsComponent.prototype.compareWith = function (o1, o2) {
|
|
196
|
-
return o1 && o2 && o1.id === o2.id;
|
|
197
|
-
};
|
|
198
|
-
Fs2FaVerificationMethodsComponent.prototype.cancel = function () {
|
|
199
|
-
this.cancelled.emit();
|
|
200
|
-
};
|
|
201
|
-
Fs2FaVerificationMethodsComponent.prototype._initMethods = function () {
|
|
202
|
-
this.methods$ = this._verificationProvider
|
|
203
|
-
.methods()
|
|
204
|
-
.pipe(operators.map(function (methods) {
|
|
205
|
-
return methods
|
|
206
|
-
.reduce(function (acc, method) {
|
|
207
|
-
if (!acc[method.type]) {
|
|
208
|
-
acc[method.type] = [];
|
|
209
|
-
}
|
|
210
|
-
acc[method.type].push(method);
|
|
211
|
-
return acc;
|
|
212
|
-
}, {});
|
|
213
|
-
}), operators.shareReplay(1));
|
|
214
|
-
};
|
|
215
|
-
return Fs2FaVerificationMethodsComponent;
|
|
216
|
-
}());
|
|
217
|
-
Fs2FaVerificationMethodsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2FaVerificationMethodsComponent, deps: [{ token: FS_2FA_VERIFICATION_PROVIDER }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
218
|
-
Fs2FaVerificationMethodsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FaVerificationMethodsComponent, selector: "fs-2fa-verification-methods", inputs: { method: "method" }, outputs: { methodChange: "methodChange", cancelled: "cancelled" }, ngImport: i0__namespace, template: "<h2>\n Verification Methods\n</h2>\n<form fsForm [submit]=\"setVerificationMethod\">\n <ng-container *fsSkeleton=\"methods$ | async as methods\">\n <fs-radio-group [(ngModel)]=\"method\" name=\"method\" [compareWith]=\"compareWith\">\n <ng-container *ngFor=\"let methodMap of methods | 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 smartphone\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Text Message</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following mobile number\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n mail\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Email</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following email\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n + {{ method.phoneCode }} {{ method.phoneNumber }}\n </mat-radio-button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n {{ method.email }}\n </mat-radio-button>\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n </fs-radio-group>\n </ng-container>\n\n <div class=\"actions\">\n <ng-container *ngIf=\"methods$ | async\">\n <button mat-button type=\"submit\" color=\"primary\">Next</button>\n </ng-container>\n <button mat-button type=\"button\" (click)=\"cancel()\">Cancel</button>\n </div>\n</form>\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: i1__namespace$2.FsRadioGroupComponent, selector: "fs-radio-group", inputs: ["orientation", "radioPosition", "compareWith", "required", "disabled", "label", "name"] }, { type: i2__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3__namespace$2.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { type: i4__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: i6__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1__namespace.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "successDelay", "errorDelay", "submit", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i7__namespace.ɵa, selector: "[fsSkeleton]", inputs: ["fsSkeletonPattern", "fsSkeleton"] }, { type: i6__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i8__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i8__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i8__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.ɵw, selector: "button[type=\"submit\"]", inputs: ["dirtySubmit", "name"] }], pipes: { "async": i8__namespace.AsyncPipe, "keyvalue": i8__namespace.KeyValuePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
219
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2FaVerificationMethodsComponent, decorators: [{
|
|
220
|
-
type: i0.Component,
|
|
221
|
-
args: [{
|
|
222
|
-
selector: 'fs-2fa-verification-methods',
|
|
223
|
-
templateUrl: './2fa-verification-methods.component.html',
|
|
224
|
-
styleUrls: [
|
|
225
|
-
'./2fa-verification-methods.component.scss',
|
|
226
|
-
],
|
|
227
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
228
|
-
}]
|
|
229
|
-
}], ctorParameters: function () {
|
|
230
|
-
return [{ type: undefined, decorators: [{
|
|
231
|
-
type: i0.Inject,
|
|
232
|
-
args: [FS_2FA_VERIFICATION_PROVIDER]
|
|
233
|
-
}] }];
|
|
234
|
-
}, propDecorators: { method: [{
|
|
235
|
-
type: i0.Input
|
|
236
|
-
}], methodChange: [{
|
|
237
|
-
type: i0.Output
|
|
238
|
-
}], cancelled: [{
|
|
239
|
-
type: i0.Output
|
|
240
|
-
}] } });
|
|
241
|
-
|
|
242
|
-
var Fs2FAVerificationComponent = /** @class */ (function () {
|
|
243
|
-
function Fs2FAVerificationComponent() {
|
|
244
|
-
this.verified = new i0.EventEmitter();
|
|
245
|
-
this.backToSignIn = new i0.EventEmitter();
|
|
246
|
-
this._view = 'code';
|
|
247
|
-
}
|
|
248
|
-
Object.defineProperty(Fs2FAVerificationComponent.prototype, "view", {
|
|
249
|
-
get: function () {
|
|
250
|
-
return this._view;
|
|
251
|
-
},
|
|
252
|
-
enumerable: false,
|
|
253
|
-
configurable: true
|
|
254
|
-
});
|
|
255
|
-
Fs2FAVerificationComponent.prototype.switchVerificationMethod = function (method) {
|
|
256
|
-
this._view = method;
|
|
257
|
-
};
|
|
258
|
-
Fs2FAVerificationComponent.prototype.setActiveMethod = function (method) {
|
|
259
|
-
this.method = method;
|
|
260
|
-
this.switchVerificationMethod('code');
|
|
261
|
-
};
|
|
262
|
-
Fs2FAVerificationComponent.prototype.cancel = function () {
|
|
263
|
-
this.switchVerificationMethod('code');
|
|
219
|
+
this._dialog.open(Fs2FaVerificationMethodsComponent, {
|
|
220
|
+
data: {
|
|
221
|
+
method: this.method,
|
|
222
|
+
}
|
|
223
|
+
})
|
|
224
|
+
.afterClosed()
|
|
225
|
+
.pipe(operators.filter(function (method) { return !!method; }))
|
|
226
|
+
.subscribe(function (method) {
|
|
227
|
+
_this.method = method;
|
|
228
|
+
_this._cdRef.markForCheck();
|
|
229
|
+
});
|
|
264
230
|
};
|
|
265
231
|
Fs2FAVerificationComponent.prototype.toSignIn = function () {
|
|
266
232
|
this.backToSignIn.emit();
|
|
267
233
|
};
|
|
268
234
|
return Fs2FAVerificationComponent;
|
|
269
235
|
}());
|
|
270
|
-
Fs2FAVerificationComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2FAVerificationComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
271
|
-
Fs2FAVerificationComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FAVerificationComponent, selector: "fs-2fa-verification", inputs: { method: "method" }, outputs: { verified: "verified", backToSignIn: "backToSignIn" }, ngImport: i0__namespace, template: "<
|
|
236
|
+
Fs2FAVerificationComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2FAVerificationComponent, deps: [{ token: FS_2FA_VERIFICATION_PROVIDER }, { token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace$1.FsDialog }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
237
|
+
Fs2FAVerificationComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FAVerificationComponent, selector: "fs-2fa-verification", inputs: { method: "method" }, outputs: { verified: "verified", backToSignIn: "backToSignIn" }, ngImport: i0__namespace, template: "<form fsForm [submit]=\"verify\" [dirtySubmitButton]=\"false\">\n <h2>2-Step Verification</h2>\n\n <div class=\"code-container\">\n <ng-container *ngIf=\"method.type === 'authenticator' else code\">\n <fs-2fa-verification-otp class=\"otp\"></fs-2fa-verification-otp>\n </ng-container>\n\n <ng-template #code>\n <fs-2fa-verification-code\n [method]=\"method\"\n (codeChange)=\"codeChanged($event)\">\n </fs-2fa-verification-code>\n </ng-template>\n </div>\n\n <div class=\"additional\">\n <mat-checkbox\n name=\"trust-device\"\n [(ngModel)]=\"trustedDevice\">\n Trust this device\n </mat-checkbox>\n\n <span class=\"resend-code-btn\">\n <ng-container *ngIf=\"!resendInProgress else sending\">\n <a (click)=\"resend()\">\n Resend Code\n </a>\n </ng-container>\n <ng-template #sending>\n <mat-spinner [diameter]=\"12\"></mat-spinner> Sending\n </ng-template>\n </span>\n </div>\n\n <div class=\"actions\">\n <button mat-raised-button\n color=\"primary\"\n type=\"submit\">\n Verify\n </button>\n\n <button mat-button type=\"button\" (click)=\"showVerificationMethods()\">\n Try other ways to verify\n </button>\n\n <button mat-button type=\"button\" (click)=\"toSignIn()\">\n Back to signin\n </button>\n </div>\n</form>\n", styles: [":host{display:block}h2,.code-container{text-align:center}.code-container .otp{margin-bottom:15px}:host ::ng-deep .actions{margin:10px 0}:host ::ng-deep .actions a{width:100%;font-weight:400}:host ::ng-deep .actions button{width:100%;margin-bottom:5px}:host ::ng-deep .actions button[type=button]{font-weight:400}.additional{display:flex;justify-content:space-between;align-items:baseline;margin-top:-5px}.additional .resend-code-btn{cursor:pointer;text-transform:none}.additional .resend-code-btn mat-spinner{display:inline-block;vertical-align:middle}\n"], components: [{ type: Fs2FAVerificationOTPComponent, selector: "fs-2fa-verification-otp", outputs: ["codeChange"] }, { type: Fs2FAVerificationSMSComponent, selector: "fs-2fa-verification-code", inputs: ["method"], outputs: ["codeChange"] }, { type: i4__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: i5__namespace$1.MatSpinner, selector: "mat-spinner", inputs: ["color"] }, { 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: i7__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i7__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i7__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i8__namespace.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "successDelay", "errorDelay", "submit", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i8__namespace.ɵw, selector: "button[type=\"submit\"]", inputs: ["dirtySubmit", "name"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
272
238
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2FAVerificationComponent, decorators: [{
|
|
273
239
|
type: i0.Component,
|
|
274
240
|
args: [{
|
|
@@ -279,7 +245,12 @@
|
|
|
279
245
|
],
|
|
280
246
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
281
247
|
}]
|
|
282
|
-
}], ctorParameters: function () {
|
|
248
|
+
}], ctorParameters: function () {
|
|
249
|
+
return [{ type: undefined, decorators: [{
|
|
250
|
+
type: i0.Inject,
|
|
251
|
+
args: [FS_2FA_VERIFICATION_PROVIDER]
|
|
252
|
+
}] }, { type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace$1.FsDialog }];
|
|
253
|
+
}, propDecorators: { method: [{
|
|
283
254
|
type: i0.Input
|
|
284
255
|
}], verified: [{
|
|
285
256
|
type: i0.Output
|
|
@@ -294,61 +265,62 @@
|
|
|
294
265
|
}());
|
|
295
266
|
Fs2FaModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2FaModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
296
267
|
Fs2FaModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2FaModule, declarations: [Fs2FAVerificationComponent,
|
|
297
|
-
Fs2FAVerificationFormComponent,
|
|
298
268
|
Fs2FAVerificationSMSComponent,
|
|
299
269
|
Fs2FAVerificationOTPComponent,
|
|
300
|
-
Fs2FaVerificationMethodsComponent], imports: [
|
|
301
|
-
|
|
302
|
-
i1$
|
|
303
|
-
i3.MatInputModule,
|
|
304
|
-
|
|
305
|
-
|
|
270
|
+
Fs2FaVerificationMethodsComponent], imports: [i10.CommonModule,
|
|
271
|
+
i7.FormsModule,
|
|
272
|
+
i1$2.MatFormFieldModule,
|
|
273
|
+
i3$1.MatInputModule,
|
|
274
|
+
i6.MatButtonModule,
|
|
275
|
+
i8.FsFormModule,
|
|
276
|
+
i3.FsRadioGroupModule,
|
|
277
|
+
i1$1.FsDialogModule,
|
|
306
278
|
// CodeInputModule,
|
|
307
|
-
|
|
308
|
-
i5.MatProgressSpinnerModule,
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
i1$2.FsRadioGroupModule], exports: [Fs2FAVerificationComponent] });
|
|
279
|
+
i4$1.MatCheckboxModule,
|
|
280
|
+
i5$1.MatProgressSpinnerModule,
|
|
281
|
+
i9.FsSkeletonModule,
|
|
282
|
+
i9.FsSkeletonModule,
|
|
283
|
+
i4.MatIconModule,
|
|
284
|
+
i5.MatRadioModule], exports: [Fs2FAVerificationComponent] });
|
|
314
285
|
Fs2FaModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2FaModule, providers: [], imports: [[
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
i1$
|
|
318
|
-
i3.MatInputModule,
|
|
319
|
-
|
|
320
|
-
|
|
286
|
+
i10.CommonModule,
|
|
287
|
+
i7.FormsModule,
|
|
288
|
+
i1$2.MatFormFieldModule,
|
|
289
|
+
i3$1.MatInputModule,
|
|
290
|
+
i6.MatButtonModule,
|
|
291
|
+
i8.FsFormModule,
|
|
292
|
+
i3.FsRadioGroupModule,
|
|
293
|
+
i1$1.FsDialogModule,
|
|
321
294
|
// CodeInputModule,
|
|
322
|
-
|
|
323
|
-
i5.MatProgressSpinnerModule,
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
i1$2.FsRadioGroupModule,
|
|
295
|
+
i4$1.MatCheckboxModule,
|
|
296
|
+
i5$1.MatProgressSpinnerModule,
|
|
297
|
+
i9.FsSkeletonModule,
|
|
298
|
+
i9.FsSkeletonModule,
|
|
299
|
+
i4.MatIconModule,
|
|
300
|
+
i5.MatRadioModule,
|
|
329
301
|
]] });
|
|
330
302
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2FaModule, decorators: [{
|
|
331
303
|
type: i0.NgModule,
|
|
332
304
|
args: [{
|
|
333
305
|
imports: [
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
i1$
|
|
337
|
-
i3.MatInputModule,
|
|
338
|
-
|
|
339
|
-
|
|
306
|
+
i10.CommonModule,
|
|
307
|
+
i7.FormsModule,
|
|
308
|
+
i1$2.MatFormFieldModule,
|
|
309
|
+
i3$1.MatInputModule,
|
|
310
|
+
i6.MatButtonModule,
|
|
311
|
+
i8.FsFormModule,
|
|
312
|
+
i3.FsRadioGroupModule,
|
|
313
|
+
i1$1.FsDialogModule,
|
|
340
314
|
// CodeInputModule,
|
|
341
|
-
|
|
342
|
-
i5.MatProgressSpinnerModule,
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
i1$2.FsRadioGroupModule,
|
|
315
|
+
i4$1.MatCheckboxModule,
|
|
316
|
+
i5$1.MatProgressSpinnerModule,
|
|
317
|
+
i9.FsSkeletonModule,
|
|
318
|
+
i9.FsSkeletonModule,
|
|
319
|
+
i4.MatIconModule,
|
|
320
|
+
i5.MatRadioModule,
|
|
348
321
|
],
|
|
349
322
|
declarations: [
|
|
350
323
|
Fs2FAVerificationComponent,
|
|
351
|
-
Fs2FAVerificationFormComponent,
|
|
352
324
|
Fs2FAVerificationSMSComponent,
|
|
353
325
|
Fs2FAVerificationOTPComponent,
|
|
354
326
|
Fs2FaVerificationMethodsComponent,
|