@firestitch/2fa 12.0.6 → 12.0.9

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 (27) hide show
  1. package/app/components/2fa-verification/2fa-verification.component.d.ts +31 -26
  2. package/app/components/2fa-verification-code/2fa-verification-code.component.d.ts +17 -11
  3. package/app/components/2fa-verification-methods/2fa-verification-methods.component.d.ts +23 -23
  4. package/app/enums/verification-method-type.enum.d.ts +5 -6
  5. package/app/fs-2fa.module.d.ts +23 -23
  6. package/app/interfaces/verification-method.interface.d.ts +11 -11
  7. package/app/interfaces/verification-provider.interface.d.ts +8 -8
  8. package/app/tokens/verification.token.d.ts +3 -3
  9. package/bundles/firestitch-2fa.umd.js +289 -292
  10. package/bundles/firestitch-2fa.umd.js.map +1 -1
  11. package/esm2015/app/components/2fa-verification/2fa-verification.component.js +107 -91
  12. package/esm2015/app/components/2fa-verification-code/2fa-verification-code.component.js +57 -45
  13. package/esm2015/app/components/2fa-verification-methods/2fa-verification-methods.component.js +73 -73
  14. package/esm2015/app/enums/verification-method-type.enum.js +7 -8
  15. package/esm2015/app/fs-2fa.module.js +88 -91
  16. package/esm2015/app/interfaces/verification-method.interface.js +1 -1
  17. package/esm2015/app/interfaces/verification-provider.interface.js +1 -1
  18. package/esm2015/app/tokens/verification.token.js +2 -2
  19. package/esm2015/firestitch-2fa.js +4 -4
  20. package/esm2015/public_api.js +8 -8
  21. package/fesm2015/firestitch-2fa.js +274 -276
  22. package/fesm2015/firestitch-2fa.js.map +1 -1
  23. package/firestitch-2fa.d.ts +5 -5
  24. package/package.json +1 -1
  25. package/public_api.d.ts +6 -6
  26. package/app/components/2fa-verification-otp/2fa-verification-otp.component.d.ts +0 -12
  27. package/esm2015/app/components/2fa-verification-otp/2fa-verification-otp.component.js +0 -33
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, Component, ChangeDetectionStrategy, Inject, EventEmitter, Output, Input, NgModule } from '@angular/core';
2
+ import { InjectionToken, Component, ChangeDetectionStrategy, Inject, EventEmitter, ViewChild, Input, Output, NgModule } from '@angular/core';
3
3
  import * as i7 from '@angular/forms';
4
4
  import { ControlContainer, NgForm, FormsModule } from '@angular/forms';
5
5
  import * as i10 from '@angular/common';
@@ -10,13 +10,11 @@ import * as i5 from '@angular/material/radio';
10
10
  import { MatRadioModule } from '@angular/material/radio';
11
11
  import * as i6 from '@angular/material/button';
12
12
  import { MatButtonModule } from '@angular/material/button';
13
- import * as i1$2 from '@angular/material/form-field';
14
13
  import { MatFormFieldModule } from '@angular/material/form-field';
15
- import * as i3$1 from '@angular/material/input';
16
14
  import { MatInputModule } from '@angular/material/input';
17
- import * as i4$1 from '@angular/material/checkbox';
15
+ import * as i3$1 from '@angular/material/checkbox';
18
16
  import { MatCheckboxModule } from '@angular/material/checkbox';
19
- import * as i5$1 from '@angular/material/progress-spinner';
17
+ import * as i4$1 from '@angular/material/progress-spinner';
20
18
  import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
21
19
  import * as i8 from '@firestitch/form';
22
20
  import { FsFormModule } from '@firestitch/form';
@@ -26,6 +24,8 @@ import * as i3 from '@firestitch/radiogroup';
26
24
  import { FsRadioGroupModule } from '@firestitch/radiogroup';
27
25
  import * as i1$1 from '@firestitch/dialog';
28
26
  import { FsDialogModule } from '@firestitch/dialog';
27
+ import * as i1$2 from 'angular-code-input';
28
+ import { CodeInputComponent, CodeInputModule } from 'angular-code-input';
29
29
  import { tap, map, shareReplay, takeUntil, filter } from 'rxjs/operators';
30
30
  import * as i1 from '@angular/material/dialog';
31
31
  import { MAT_DIALOG_DATA } from '@angular/material/dialog';
@@ -33,289 +33,287 @@ import { Subject } from 'rxjs';
33
33
 
34
34
  const FS_2FA_VERIFICATION_PROVIDER = new InjectionToken('Provider for Verification service');
35
35
 
36
- var FsVerificationMethodType;
37
- (function (FsVerificationMethodType) {
38
- FsVerificationMethodType["Sms"] = "sms";
39
- FsVerificationMethodType["Email"] = "email";
40
- FsVerificationMethodType["Authenticator"] = "authenticator";
41
- FsVerificationMethodType["Code"] = "code";
36
+ var FsVerificationMethodType;
37
+ (function (FsVerificationMethodType) {
38
+ FsVerificationMethodType["Sms"] = "sms";
39
+ FsVerificationMethodType["Email"] = "email";
40
+ FsVerificationMethodType["App"] = "app";
42
41
  })(FsVerificationMethodType || (FsVerificationMethodType = {}));
43
42
 
44
- class Fs2FaVerificationMethodsComponent {
45
- constructor(_verificationProvider, _dialogData, _dialogRef) {
46
- this._verificationProvider = _verificationProvider;
47
- this._dialogData = _dialogData;
48
- this._dialogRef = _dialogRef;
49
- this.verificationMethodType = FsVerificationMethodType;
50
- this.setVerificationMethod = () => {
51
- return this._verificationProvider
52
- .updateVerificationMethod(this.method.id)
53
- .pipe(tap((method) => {
54
- this._dialogRef.close(method);
55
- }));
56
- };
57
- this._setActiveMethod();
58
- this._initMethods();
59
- }
60
- compareWith(o1, o2) {
61
- return o1 && o2 && o1.id === o2.id;
62
- }
63
- _setActiveMethod() {
64
- var _a;
65
- this.method = (_a = this._dialogData) === null || _a === void 0 ? void 0 : _a.method;
66
- }
67
- _initMethods() {
68
- this.methods$ = this._verificationProvider
69
- .methods()
70
- .pipe(map((methods) => {
71
- return methods
72
- .reduce((acc, method) => {
73
- if (!acc[method.type]) {
74
- acc[method.type] = [];
75
- }
76
- acc[method.type].push(method);
77
- return acc;
78
- }, {});
79
- }), shareReplay(1));
80
- }
81
- }
82
- Fs2FaVerificationMethodsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FaVerificationMethodsComponent, deps: [{ token: FS_2FA_VERIFICATION_PROVIDER }, { token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
83
- Fs2FaVerificationMethodsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FaVerificationMethodsComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog>\n <h1 mat-dialog-title>\n Verification Methods\n </h1>\n <form fsForm [submit]=\"setVerificationMethod\" [dirtySubmitButton]=\"false\">\n <mat-dialog-content>\n <ng-container *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$1.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3.FsRadioGroupComponent, selector: "fs-radio-group", inputs: ["orientation", "radioPosition", "compareWith", "required", "disabled", "label", "name"] }, { type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i5.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { type: i6.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i7.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i7.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i8.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.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i9.ɵa, selector: "[fsSkeleton]", inputs: ["fsSkeletonPattern", "fsSkeleton"] }, { type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i10.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.ɵw, selector: "button[type=\"submit\"]", inputs: ["dirtySubmit", "name"] }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "async": i10.AsyncPipe, "keyvalue": i10.KeyValuePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
84
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FaVerificationMethodsComponent, decorators: [{
85
- type: Component,
86
- args: [{
87
- templateUrl: './2fa-verification-methods.component.html',
88
- styleUrls: [
89
- './2fa-verification-methods.component.scss',
90
- ],
91
- changeDetection: ChangeDetectionStrategy.OnPush,
92
- }]
93
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
94
- type: Inject,
95
- args: [FS_2FA_VERIFICATION_PROVIDER]
96
- }] }, { type: undefined, decorators: [{
97
- type: Inject,
98
- args: [MAT_DIALOG_DATA]
43
+ class Fs2FaVerificationMethodsComponent {
44
+ constructor(_verificationProvider, _dialogData, _dialogRef) {
45
+ this._verificationProvider = _verificationProvider;
46
+ this._dialogData = _dialogData;
47
+ this._dialogRef = _dialogRef;
48
+ this.verificationMethodType = FsVerificationMethodType;
49
+ this.setVerificationMethod = () => {
50
+ return this._verificationProvider
51
+ .updateVerificationMethod(this.method.id)
52
+ .pipe(tap((method) => {
53
+ this._dialogRef.close(method);
54
+ }));
55
+ };
56
+ this._setActiveMethod();
57
+ this._initMethods();
58
+ }
59
+ compareWith(o1, o2) {
60
+ return o1 && o2 && o1.id === o2.id;
61
+ }
62
+ _setActiveMethod() {
63
+ var _a;
64
+ this.method = (_a = this._dialogData) === null || _a === void 0 ? void 0 : _a.method;
65
+ }
66
+ _initMethods() {
67
+ this.methods$ = this._verificationProvider
68
+ .methods()
69
+ .pipe(map((methods) => {
70
+ return methods
71
+ .reduce((acc, method) => {
72
+ if (!acc[method.type]) {
73
+ acc[method.type] = [];
74
+ }
75
+ acc[method.type].push(method);
76
+ return acc;
77
+ }, {});
78
+ }), shareReplay(1));
79
+ }
80
+ }
81
+ Fs2FaVerificationMethodsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FaVerificationMethodsComponent, deps: [{ token: FS_2FA_VERIFICATION_PROVIDER }, { token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
82
+ Fs2FaVerificationMethodsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FaVerificationMethodsComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog>\n <h1 mat-dialog-title>\n Verification Methods\n </h1>\n <form fsForm [submit]=\"setVerificationMethod\" [dirtySubmitButton]=\"false\">\n <mat-dialog-content>\n <ng-container *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 textsms\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Text Message</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following mobile number\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n mail\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Email</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following email\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.App\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n phone_iphone\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Authenticator App</div>\n <div class=\"method-subtitle\">\n Verification code generated by an authenticator app\n </div>\n </div>\n </div>\n </ng-container> \n </ng-container>\n\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n {{ method.phoneNumber }}\n </ng-container>\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n {{ method.email }}\n </ng-container>\n <ng-container *ngSwitchCase=\"verificationMethodType.App\">\n Authenticator App\n </ng-container> \n </ng-container>\n </mat-radio-button>\n </div>\n </ng-container>\n </fs-radio-group>\n </ng-container>\n </mat-dialog-content>\n <mat-dialog-actions>\n <div class=\"actions\">\n <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$1.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3.FsRadioGroupComponent, selector: "fs-radio-group", inputs: ["orientation", "radioPosition", "compareWith", "required", "disabled", "label", "name"] }, { type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i5.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { type: i6.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i7.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i7.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i8.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.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i9.ɵa, selector: "[fsSkeleton]", inputs: ["fsSkeletonPattern", "fsSkeleton"] }, { type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i10.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.ɵw, selector: "button[type=\"submit\"]", inputs: ["dirtySubmit", "name"] }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "async": i10.AsyncPipe, "keyvalue": i10.KeyValuePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
83
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FaVerificationMethodsComponent, decorators: [{
84
+ type: Component,
85
+ args: [{
86
+ templateUrl: './2fa-verification-methods.component.html',
87
+ styleUrls: [
88
+ './2fa-verification-methods.component.scss',
89
+ ],
90
+ changeDetection: ChangeDetectionStrategy.OnPush,
91
+ }]
92
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
93
+ type: Inject,
94
+ args: [FS_2FA_VERIFICATION_PROVIDER]
95
+ }] }, { type: undefined, decorators: [{
96
+ type: Inject,
97
+ args: [MAT_DIALOG_DATA]
99
98
  }] }, { type: i1.MatDialogRef }]; } });
100
99
 
101
- class Fs2FAVerificationOTPComponent {
102
- constructor(form) {
103
- this.form = form;
104
- this.codeChange = new EventEmitter();
105
- }
106
- codeChanged(event) {
107
- this.codeChange.emit(event);
108
- this.form.dirty();
109
- }
110
- codeCompleted() {
111
- this.form.triggerSubmit();
112
- }
113
- }
114
- Fs2FAVerificationOTPComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FAVerificationOTPComponent, deps: [{ token: i8.FsFormDirective }], target: i0.ɵɵFactoryTarget.Component });
115
- Fs2FAVerificationOTPComponentcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FAVerificationOTPComponent, selector: "fs-2fa-verification-otp", outputs: { codeChange: "codeChange" }, ngImport: i0, 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.ChangeDetectionStrategy.OnPush });
116
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FAVerificationOTPComponent, decorators: [{
117
- type: Component,
118
- args: [{
119
- selector: 'fs-2fa-verification-otp',
120
- templateUrl: './2fa-verification-otp.component.html',
121
- styleUrls: [
122
- './2fa-verification-otp.component.scss'
123
- ],
124
- changeDetection: ChangeDetectionStrategy.OnPush,
125
- }]
126
- }], ctorParameters: function () { return [{ type: i8.FsFormDirective }]; }, propDecorators: { codeChange: [{
127
- type: Output
100
+ class Fs2FAVerificationCodeComponent {
101
+ constructor() {
102
+ this.codeChanged = new EventEmitter();
103
+ this.codeCompleted = new EventEmitter();
104
+ this.FsVerificationMethodType = FsVerificationMethodType;
105
+ }
106
+ codeChange(code) {
107
+ this.code = code;
108
+ this.codeChanged.emit(this.code);
109
+ }
110
+ focus() {
111
+ this.codeInputComponent.focusOnField(0);
112
+ }
113
+ }
114
+ Fs2FAVerificationCodeComponentfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FAVerificationCodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
115
+ Fs2FAVerificationCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FAVerificationCodeComponent, selector: "fs-2fa-verification-code", inputs: { method: "method", code: "code" }, outputs: { codeChanged: "codeChanged", codeCompleted: "codeCompleted" }, viewQueries: [{ propertyName: "codeInputComponent", first: true, predicate: CodeInputComponent, descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"method.phoneNumber && method.type === FsVerificationMethodType.Sms\">\n <p class=\"description\">\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 </p>\n\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"method.type === FsVerificationMethodType.Email\">\n <p class=\"description\">\n A email with a verification code was just sent to {{ method.email }} to verify it's you.\n </p>\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"method.type === FsVerificationMethodType.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\n<ng-template #input> \n <code-input \n [code]=\"code\"\n [initialFocusField]=\"0\"\n [codeLength]=\"6\"\n (codeChanged)=\"codeChange($event)\"\n (codeCompleted)=\"codeCompleted.emit()\">\n </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}code-input{margin-bottom:5px;--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$2.CodeInputComponent, selector: "code-input", inputs: ["isNonDigitsCode", "codeLength", "inputType", "initialFocusField", "isCharsCode", "isCodeHidden", "isPrevFocusableAfterClearing", "isFocusingOnLastByClickIfFilled", "code", "disabled", "autocapitalize"], outputs: ["codeChanged", "codeCompleted"] }], directives: [{ type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], viewProviders: [
116
+ {
117
+ provide: ControlContainer,
118
+ useExisting: NgForm,
119
+ },
120
+ ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
121
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FAVerificationCodeComponent, decorators: [{
122
+ type: Component,
123
+ args: [{
124
+ selector: 'fs-2fa-verification-code',
125
+ templateUrl: './2fa-verification-code.component.html',
126
+ styleUrls: [
127
+ './2fa-verification-code.component.scss',
128
+ ],
129
+ changeDetection: ChangeDetectionStrategy.OnPush,
130
+ viewProviders: [
131
+ {
132
+ provide: ControlContainer,
133
+ useExisting: NgForm,
134
+ },
135
+ ],
136
+ }]
137
+ }], propDecorators: { codeInputComponent: [{
138
+ type: ViewChild,
139
+ args: [CodeInputComponent]
140
+ }], method: [{
141
+ type: Input
142
+ }], code: [{
143
+ type: Input
144
+ }], codeChanged: [{
145
+ type: Output
146
+ }], codeCompleted: [{
147
+ type: Output
128
148
  }] } });
129
149
 
130
- class Fs2FAVerificationSMSComponent {
131
- constructor() {
132
- this.codeChange = new EventEmitter();
133
- }
134
- codeChanged() {
135
- this.codeChange.emit(this.code);
136
- }
137
- }
138
- Fs2FAVerificationSMSComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FAVerificationSMSComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
139
- Fs2FAVerificationSMSComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FAVerificationSMSComponent, selector: "fs-2fa-verification-code", inputs: { method: "method" }, outputs: { codeChange: "codeChange" }, ngImport: i0, 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$2.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }], directives: [{ type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$2.MatLabel, selector: "mat-label" }, { type: i3$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.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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i8.ɵf, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }], viewProviders: [
140
- {
141
- provide: ControlContainer,
142
- useExisting: NgForm,
143
- },
144
- ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
145
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FAVerificationSMSComponent, decorators: [{
146
- type: Component,
147
- args: [{
148
- selector: 'fs-2fa-verification-code',
149
- templateUrl: './2fa-verification-code.component.html',
150
- styleUrls: [
151
- './2fa-verification-code.component.scss',
152
- ],
153
- changeDetection: ChangeDetectionStrategy.OnPush,
154
- viewProviders: [
155
- {
156
- provide: ControlContainer,
157
- useExisting: NgForm,
158
- },
159
- ],
160
- }]
161
- }], propDecorators: { method: [{
162
- type: Input
163
- }], codeChange: [{
164
- type: Output
150
+ class Fs2FAVerificationComponent {
151
+ constructor(verificationProvider, _cdRef, _dialog) {
152
+ this.verificationProvider = verificationProvider;
153
+ this._cdRef = _cdRef;
154
+ this._dialog = _dialog;
155
+ this.verified = new EventEmitter();
156
+ this.codeChanged = new EventEmitter();
157
+ this.codeCompleted = new EventEmitter();
158
+ this.resendInProgress = false;
159
+ this.code = '';
160
+ this.trustedDevice = true;
161
+ this.FsVerificationMethodType = FsVerificationMethodType;
162
+ this._destroy$ = new Subject();
163
+ this.verify = () => {
164
+ return this.verificationProvider
165
+ .verify(this.code, this.trustedDevice)
166
+ .pipe(tap((response) => {
167
+ this.verified.emit(response);
168
+ }));
169
+ };
170
+ }
171
+ ngOnInit() {
172
+ this.codeChanged
173
+ .pipe(takeUntil(this._destroy$))
174
+ .subscribe((code) => {
175
+ this.code = code;
176
+ });
177
+ }
178
+ ngOnDestroy() {
179
+ this._destroy$.next();
180
+ this._destroy$.complete();
181
+ }
182
+ ngAfterViewInit() {
183
+ this.verificationCodeComponent.focus();
184
+ }
185
+ resend() {
186
+ this.resendInProgress = true;
187
+ this.code = '';
188
+ this.verificationProvider
189
+ .resend()
190
+ .pipe(takeUntil(this._destroy$))
191
+ .subscribe(() => {
192
+ this.resendInProgress = false;
193
+ this._cdRef.markForCheck();
194
+ });
195
+ }
196
+ showVerificationMethods() {
197
+ this._dialog.open(Fs2FaVerificationMethodsComponent, {
198
+ data: {
199
+ method: this.method,
200
+ }
201
+ })
202
+ .afterClosed()
203
+ .pipe(filter((method) => !!method))
204
+ .subscribe((method) => {
205
+ this.method = method;
206
+ this.code = '';
207
+ this._cdRef.markForCheck();
208
+ setTimeout(() => {
209
+ this.verificationCodeComponent.focus();
210
+ });
211
+ });
212
+ }
213
+ }
214
+ Fs2FAVerificationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FAVerificationComponent, deps: [{ token: FS_2FA_VERIFICATION_PROVIDER }, { token: i0.ChangeDetectorRef }, { token: i1$1.FsDialog }], target: i0.ɵɵFactoryTarget.Component });
215
+ Fs2FAVerificationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FAVerificationComponent, selector: "fs-2fa-verification", inputs: { method: "method" }, outputs: { verified: "verified", codeChanged: "codeChanged", codeCompleted: "codeCompleted" }, viewQueries: [{ propertyName: "verificationCodeComponent", first: true, predicate: Fs2FAVerificationCodeComponent, descendants: true }], ngImport: i0, template: "<div class=\"code-container\">\n <fs-2fa-verification-code\n [method]=\"method\"\n [code]=\"code\"\n (codeChanged)=\"codeChanged.emit($event)\"\n (codeCompleted)=\"codeCompleted.emit()\">\n </fs-2fa-verification-code>\n</div>\n\n<div class=\"additional\">\n <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>", styles: [".code-container{text-align:center}.additional{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:10px}.additional .resend-code-btn{cursor:pointer;text-transform:none}.additional .resend-code-btn mat-spinner{display:inline-block;vertical-align:middle}\n"], components: [{ type: Fs2FAVerificationCodeComponent, selector: "fs-2fa-verification-code", inputs: ["method", "code"], outputs: ["codeChanged", "codeCompleted"] }, { type: i3$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$1.MatSpinner, selector: "mat-spinner", inputs: ["color"] }], directives: [{ type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
216
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FAVerificationComponent, decorators: [{
217
+ type: Component,
218
+ args: [{
219
+ selector: 'fs-2fa-verification',
220
+ templateUrl: './2fa-verification.component.html',
221
+ styleUrls: [
222
+ './2fa-verification.component.scss',
223
+ ],
224
+ changeDetection: ChangeDetectionStrategy.OnPush,
225
+ }]
226
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
227
+ type: Inject,
228
+ args: [FS_2FA_VERIFICATION_PROVIDER]
229
+ }] }, { type: i0.ChangeDetectorRef }, { type: i1$1.FsDialog }]; }, propDecorators: { verificationCodeComponent: [{
230
+ type: ViewChild,
231
+ args: [Fs2FAVerificationCodeComponent]
232
+ }], method: [{
233
+ type: Input
234
+ }], verified: [{
235
+ type: Output
236
+ }], codeChanged: [{
237
+ type: Output
238
+ }], codeCompleted: [{
239
+ type: Output
165
240
  }] } });
166
241
 
167
- class Fs2FAVerificationComponent {
168
- constructor(verificationProvider, _cdRef, _dialog) {
169
- this.verificationProvider = verificationProvider;
170
- this._cdRef = _cdRef;
171
- this._dialog = _dialog;
172
- this.verified = new EventEmitter();
173
- this.backToSignIn = new EventEmitter();
174
- this.resendInProgress = false;
175
- this.trustedDevice = false;
176
- this._destroy$ = new Subject();
177
- this.verify = () => {
178
- return this.verificationProvider
179
- .verify(this._code, this.trustedDevice)
180
- .pipe(tap((response) => {
181
- this.verified.emit(response);
182
- }));
183
- };
184
- }
185
- ngOnDestroy() {
186
- this._destroy$.next();
187
- this._destroy$.complete();
188
- }
189
- codeChanged(code) {
190
- this._code = code;
191
- }
192
- resend() {
193
- this.resendInProgress = true;
194
- this.verificationProvider
195
- .resend()
196
- .pipe(takeUntil(this._destroy$))
197
- .subscribe(() => {
198
- this.resendInProgress = false;
199
- this._cdRef.markForCheck();
200
- });
201
- }
202
- showVerificationMethods() {
203
- this._dialog.open(Fs2FaVerificationMethodsComponent, {
204
- data: {
205
- method: this.method,
206
- }
207
- })
208
- .afterClosed()
209
- .pipe(filter((method) => !!method))
210
- .subscribe((method) => {
211
- this.method = method;
212
- this._cdRef.markForCheck();
213
- });
214
- }
215
- toSignIn() {
216
- this.backToSignIn.emit();
217
- }
218
- }
219
- Fs2FAVerificationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FAVerificationComponent, deps: [{ token: FS_2FA_VERIFICATION_PROVIDER }, { token: i0.ChangeDetectorRef }, { token: i1$1.FsDialog }], target: i0.ɵɵFactoryTarget.Component });
220
- Fs2FAVerificationComponent.ɵcmp = i0.ɵɵ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, 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$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$1.MatSpinner, selector: "mat-spinner", inputs: ["color"] }, { type: i6.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i7.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i7.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i8.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.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i8.ɵw, selector: "button[type=\"submit\"]", inputs: ["dirtySubmit", "name"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
221
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FAVerificationComponent, decorators: [{
222
- type: Component,
223
- args: [{
224
- selector: 'fs-2fa-verification',
225
- templateUrl: './2fa-verification.component.html',
226
- styleUrls: [
227
- './2fa-verification.component.scss',
228
- ],
229
- changeDetection: ChangeDetectionStrategy.OnPush,
230
- }]
231
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
232
- type: Inject,
233
- args: [FS_2FA_VERIFICATION_PROVIDER]
234
- }] }, { type: i0.ChangeDetectorRef }, { type: i1$1.FsDialog }]; }, propDecorators: { method: [{
235
- type: Input
236
- }], verified: [{
237
- type: Output
238
- }], backToSignIn: [{
239
- type: Output
240
- }] } });
241
-
242
- class Fs2FaModule {
243
- }
244
- Fs2FaModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
245
- Fs2FaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FaModule, declarations: [Fs2FAVerificationComponent,
246
- Fs2FAVerificationSMSComponent,
247
- Fs2FAVerificationOTPComponent,
248
- Fs2FaVerificationMethodsComponent], imports: [CommonModule,
249
- FormsModule,
250
- MatFormFieldModule,
251
- MatInputModule,
252
- MatButtonModule,
253
- FsFormModule,
254
- FsRadioGroupModule,
255
- FsDialogModule,
256
- // CodeInputModule,
257
- MatCheckboxModule,
258
- MatProgressSpinnerModule,
259
- FsSkeletonModule,
260
- FsSkeletonModule,
261
- MatIconModule,
262
- MatRadioModule], exports: [Fs2FAVerificationComponent] });
263
- Fs2FaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FaModule, providers: [], imports: [[
264
- CommonModule,
265
- FormsModule,
266
- MatFormFieldModule,
267
- MatInputModule,
268
- MatButtonModule,
269
- FsFormModule,
270
- FsRadioGroupModule,
271
- FsDialogModule,
272
- // CodeInputModule,
273
- MatCheckboxModule,
274
- MatProgressSpinnerModule,
275
- FsSkeletonModule,
276
- FsSkeletonModule,
277
- MatIconModule,
278
- MatRadioModule,
279
- ]] });
280
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FaModule, decorators: [{
281
- type: NgModule,
282
- args: [{
283
- imports: [
284
- CommonModule,
285
- FormsModule,
286
- MatFormFieldModule,
287
- MatInputModule,
288
- MatButtonModule,
289
- FsFormModule,
290
- FsRadioGroupModule,
291
- FsDialogModule,
292
- // CodeInputModule,
293
- MatCheckboxModule,
294
- MatProgressSpinnerModule,
295
- FsSkeletonModule,
296
- FsSkeletonModule,
297
- MatIconModule,
298
- MatRadioModule,
299
- ],
300
- declarations: [
301
- Fs2FAVerificationComponent,
302
- Fs2FAVerificationSMSComponent,
303
- Fs2FAVerificationOTPComponent,
304
- Fs2FaVerificationMethodsComponent,
305
- ],
306
- exports: [
307
- Fs2FAVerificationComponent,
308
- ],
309
- providers: [],
310
- }]
242
+ class Fs2FaModule {
243
+ }
244
+ Fs2FaModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
245
+ Fs2FaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FaModule, declarations: [Fs2FAVerificationComponent,
246
+ Fs2FAVerificationCodeComponent,
247
+ Fs2FaVerificationMethodsComponent], imports: [CommonModule,
248
+ FormsModule,
249
+ MatFormFieldModule,
250
+ MatInputModule,
251
+ MatButtonModule,
252
+ FsFormModule,
253
+ FsRadioGroupModule,
254
+ FsDialogModule,
255
+ CodeInputModule,
256
+ MatCheckboxModule,
257
+ MatProgressSpinnerModule,
258
+ FsSkeletonModule,
259
+ FsSkeletonModule,
260
+ MatIconModule,
261
+ MatRadioModule], exports: [Fs2FAVerificationComponent] });
262
+ Fs2FaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FaModule, providers: [], imports: [[
263
+ CommonModule,
264
+ FormsModule,
265
+ MatFormFieldModule,
266
+ MatInputModule,
267
+ MatButtonModule,
268
+ FsFormModule,
269
+ FsRadioGroupModule,
270
+ FsDialogModule,
271
+ CodeInputModule,
272
+ MatCheckboxModule,
273
+ MatProgressSpinnerModule,
274
+ FsSkeletonModule,
275
+ FsSkeletonModule,
276
+ MatIconModule,
277
+ MatRadioModule,
278
+ ]] });
279
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FaModule, decorators: [{
280
+ type: NgModule,
281
+ args: [{
282
+ imports: [
283
+ CommonModule,
284
+ FormsModule,
285
+ MatFormFieldModule,
286
+ MatInputModule,
287
+ MatButtonModule,
288
+ FsFormModule,
289
+ FsRadioGroupModule,
290
+ FsDialogModule,
291
+ CodeInputModule,
292
+ MatCheckboxModule,
293
+ MatProgressSpinnerModule,
294
+ FsSkeletonModule,
295
+ FsSkeletonModule,
296
+ MatIconModule,
297
+ MatRadioModule,
298
+ ],
299
+ declarations: [
300
+ Fs2FAVerificationComponent,
301
+ Fs2FAVerificationCodeComponent,
302
+ Fs2FaVerificationMethodsComponent,
303
+ ],
304
+ exports: [
305
+ Fs2FAVerificationComponent,
306
+ ],
307
+ providers: [],
308
+ }]
311
309
  }] });
312
310
 
313
- /*
314
- * Public API Surface of fs-2fa
311
+ /*
312
+ * Public API Surface of fs-2fa
315
313
  */
316
314
 
317
- /**
318
- * Generated bundle index. Do not edit.
315
+ /**
316
+ * Generated bundle index. Do not edit.
319
317
  */
320
318
 
321
319
  export { FS_2FA_VERIFICATION_PROVIDER, Fs2FAVerificationComponent, Fs2FaModule, FsVerificationMethodType };