@firestitch/2fa 12.0.7 → 12.0.10

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.
@@ -1,32 +1,31 @@
1
- import { AfterViewInit, ChangeDetectorRef, EventEmitter, OnDestroy } from '@angular/core';
1
+ import { AfterViewInit, ChangeDetectorRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
2
  import { FsDialog } from '@firestitch/dialog';
3
3
  import { IFsVerificationMethod } from '../../interfaces/verification-method.interface';
4
4
  import { IFsVerificationProvider } from '../../interfaces/verification-provider.interface';
5
5
  import { FsVerificationMethodType } from '../../enums/verification-method-type.enum';
6
6
  import { Fs2FAVerificationCodeComponent } from '../2fa-verification-code/2fa-verification-code.component';
7
- import { NgForm } from '@angular/forms';
8
7
  import * as i0 from "@angular/core";
9
- export declare class Fs2FAVerificationComponent implements OnDestroy, AfterViewInit {
8
+ export declare class Fs2FAVerificationComponent implements OnDestroy, AfterViewInit, OnInit {
10
9
  verificationProvider: IFsVerificationProvider;
11
10
  private _cdRef;
12
11
  private _dialog;
13
- private _form;
14
12
  verificationCodeComponent: Fs2FAVerificationCodeComponent;
15
13
  method: IFsVerificationMethod;
16
14
  verified: EventEmitter<unknown>;
15
+ codeChanged: EventEmitter<unknown>;
16
+ codeCompleted: EventEmitter<unknown>;
17
17
  resendInProgress: boolean;
18
18
  code: string;
19
19
  trustedDevice: boolean;
20
20
  FsVerificationMethodType: typeof FsVerificationMethodType;
21
21
  private _destroy$;
22
- constructor(verificationProvider: IFsVerificationProvider, _cdRef: ChangeDetectorRef, _dialog: FsDialog, _form: NgForm);
22
+ constructor(verificationProvider: IFsVerificationProvider, _cdRef: ChangeDetectorRef, _dialog: FsDialog);
23
+ ngOnInit(): void;
23
24
  ngOnDestroy(): void;
24
- verify: () => import("rxjs").Observable<unknown>;
25
+ verify(): void;
25
26
  ngAfterViewInit(): void;
26
- codeChange(code: string): void;
27
- codeComplete(): void;
28
27
  resend(): void;
29
28
  showVerificationMethods(): void;
30
- static ɵfac: i0.ɵɵFactoryDeclaration<Fs2FAVerificationComponent, [null, null, null, { optional: true; }]>;
31
- static ɵcmp: i0.ɵɵComponentDeclaration<Fs2FAVerificationComponent, "fs-2fa-verification", never, { "method": "method"; }, { "verified": "verified"; }, never, never>;
29
+ static ɵfac: i0.ɵɵFactoryDeclaration<Fs2FAVerificationComponent, never>;
30
+ static ɵcmp: i0.ɵɵComponentDeclaration<Fs2FAVerificationComponent, "fs-2fa-verification", never, { "method": "method"; }, { "verified": "verified"; "codeChanged": "codeChanged"; "codeCompleted": "codeCompleted"; }, never, never>;
32
31
  }
@@ -7,12 +7,11 @@ export declare class Fs2FAVerificationCodeComponent {
7
7
  codeInputComponent: CodeInputComponent;
8
8
  method: IFsVerificationMethod;
9
9
  code: any;
10
- codeChange: EventEmitter<string>;
11
- codeComplete: EventEmitter<void>;
10
+ codeChanged: EventEmitter<string>;
11
+ codeCompleted: EventEmitter<void>;
12
12
  FsVerificationMethodType: typeof FsVerificationMethodType;
13
- codeChanged(code: any): void;
14
- codeCompleted(): void;
13
+ codeChange(code: any): void;
15
14
  focus(): void;
16
15
  static ɵfac: i0.ɵɵFactoryDeclaration<Fs2FAVerificationCodeComponent, never>;
17
- static ɵcmp: i0.ɵɵComponentDeclaration<Fs2FAVerificationCodeComponent, "fs-2fa-verification-code", never, { "method": "method"; "code": "code"; }, { "codeChange": "codeChange"; "codeComplete": "codeComplete"; }, never, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<Fs2FAVerificationCodeComponent, "fs-2fa-verification-code", never, { "method": "method"; "code": "code"; }, { "codeChanged": "codeChanged"; "codeCompleted": "codeCompleted"; }, never, never>;
18
17
  }
@@ -2,7 +2,7 @@
2
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('angular-code-input'), require('rxjs/operators'), require('@angular/material/dialog'), require('rxjs')) :
3
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', 'angular-code-input', 'rxjs/operators', '@angular/material/dialog', 'rxjs'], factory) :
4
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.i1$2, global.rxjs.operators, global.ng.material.dialog, global.rxjs));
5
- })(this, (function (exports, i0, i7, i10, i4, i5, i6, formField, input, i4$1, i5$1, i8, i9, i3, i1$1, i1$2, operators, i1, rxjs) { 'use strict';
5
+ })(this, (function (exports, i0, i7, i10, i4, i5, i6, formField, input, i3$1, i4$1, i8, i9, i3, i1$1, i1$2, operators, i1, rxjs) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -28,8 +28,8 @@
28
28
  var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
29
29
  var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
30
30
  var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
31
+ var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
31
32
  var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
32
- var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
33
33
  var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
34
34
  var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
35
35
  var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
@@ -109,16 +109,13 @@
109
109
 
110
110
  var Fs2FAVerificationCodeComponent = /** @class */ (function () {
111
111
  function Fs2FAVerificationCodeComponent() {
112
- this.codeChange = new i0.EventEmitter();
113
- this.codeComplete = new i0.EventEmitter();
112
+ this.codeChanged = new i0.EventEmitter();
113
+ this.codeCompleted = new i0.EventEmitter();
114
114
  this.FsVerificationMethodType = exports.FsVerificationMethodType;
115
115
  }
116
- Fs2FAVerificationCodeComponent.prototype.codeChanged = function (code) {
116
+ Fs2FAVerificationCodeComponent.prototype.codeChange = function (code) {
117
117
  this.code = code;
118
- this.codeChange.emit(this.code);
119
- };
120
- Fs2FAVerificationCodeComponent.prototype.codeCompleted = function () {
121
- this.codeComplete.emit();
118
+ this.codeChanged.emit(this.code);
122
119
  };
123
120
  Fs2FAVerificationCodeComponent.prototype.focus = function () {
124
121
  this.codeInputComponent.focusOnField(0);
@@ -126,7 +123,7 @@
126
123
  return Fs2FAVerificationCodeComponent;
127
124
  }());
128
125
  Fs2FAVerificationCodeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2FAVerificationCodeComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
129
- Fs2FAVerificationCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FAVerificationCodeComponent, selector: "fs-2fa-verification-code", inputs: { method: "method", code: "code" }, outputs: { codeChange: "codeChange", codeComplete: "codeComplete" }, viewQueries: [{ propertyName: "codeInputComponent", first: true, predicate: i1$2.CodeInputComponent, descendants: true }], ngImport: i0__namespace, 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)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted()\">\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:15px;--item-spacing: 10px;--item-height: 20px;--item-border: none;--item-border-bottom: 2px solid #949494;--item-border-has-value: none;--item-border-bottom-has-value: 2px solid #949494;--item-border-focused: none;--item-border-bottom-focused: 2px solid #0061AF;--item-shadow-focused: none;--item-border-radius: 0px}code-input ::ng-deep span:first-child{padding-left:0!important}code-input ::ng-deep span:last-child{padding-right:0!important}code-input ::ng-deep input{font-size:20px!important;height:40px!important;padding:0!important}\n"], components: [{ type: i1__namespace$2.CodeInputComponent, selector: "code-input", inputs: ["isNonDigitsCode", "codeLength", "inputType", "initialFocusField", "isCharsCode", "isCodeHidden", "isPrevFocusableAfterClearing", "isFocusingOnLastByClickIfFilled", "code", "disabled", "autocapitalize"], outputs: ["codeChanged", "codeCompleted"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], viewProviders: [
126
+ Fs2FAVerificationCodeComponent.ɵcmp = i0__namespace.ɵɵ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: i1$2.CodeInputComponent, descendants: true }], ngImport: i0__namespace, 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__namespace$2.CodeInputComponent, selector: "code-input", inputs: ["isNonDigitsCode", "codeLength", "inputType", "initialFocusField", "isCharsCode", "isCodeHidden", "isPrevFocusableAfterClearing", "isFocusingOnLastByClickIfFilled", "code", "disabled", "autocapitalize"], outputs: ["codeChanged", "codeCompleted"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], viewProviders: [
130
127
  {
131
128
  provide: i7.ControlContainer,
132
129
  useExisting: i7.NgForm,
@@ -155,48 +152,50 @@
155
152
  type: i0.Input
156
153
  }], code: [{
157
154
  type: i0.Input
158
- }], codeChange: [{
155
+ }], codeChanged: [{
159
156
  type: i0.Output
160
- }], codeComplete: [{
157
+ }], codeCompleted: [{
161
158
  type: i0.Output
162
159
  }] } });
163
160
 
164
161
  var Fs2FAVerificationComponent = /** @class */ (function () {
165
- function Fs2FAVerificationComponent(verificationProvider, _cdRef, _dialog, _form) {
166
- var _this = this;
162
+ function Fs2FAVerificationComponent(verificationProvider, _cdRef, _dialog) {
167
163
  this.verificationProvider = verificationProvider;
168
164
  this._cdRef = _cdRef;
169
165
  this._dialog = _dialog;
170
- this._form = _form;
171
166
  this.verified = new i0.EventEmitter();
167
+ this.codeChanged = new i0.EventEmitter();
168
+ this.codeCompleted = new i0.EventEmitter();
172
169
  this.resendInProgress = false;
173
170
  this.code = '';
174
171
  this.trustedDevice = true;
175
172
  this.FsVerificationMethodType = exports.FsVerificationMethodType;
176
173
  this._destroy$ = new rxjs.Subject();
177
- this.verify = function () {
178
- return _this.verificationProvider
179
- .verify(_this.code, _this.trustedDevice)
180
- .pipe(operators.tap(function (response) {
181
- _this.verified.emit(response);
182
- }));
183
- };
184
174
  }
175
+ Fs2FAVerificationComponent.prototype.ngOnInit = function () {
176
+ var _this = this;
177
+ this.codeChanged
178
+ .pipe(operators.takeUntil(this._destroy$))
179
+ .subscribe(function (code) {
180
+ _this.code = code;
181
+ });
182
+ };
185
183
  Fs2FAVerificationComponent.prototype.ngOnDestroy = function () {
186
184
  this._destroy$.next();
187
185
  this._destroy$.complete();
188
186
  };
187
+ Fs2FAVerificationComponent.prototype.verify = function () {
188
+ var _this = this;
189
+ this.verificationProvider
190
+ .verify(this.code, this.trustedDevice)
191
+ .subscribe(function (response) {
192
+ _this.verified.emit(response);
193
+ });
194
+ };
195
+ ;
189
196
  Fs2FAVerificationComponent.prototype.ngAfterViewInit = function () {
190
197
  this.verificationCodeComponent.focus();
191
198
  };
192
- Fs2FAVerificationComponent.prototype.codeChange = function (code) {
193
- this.code = code;
194
- };
195
- Fs2FAVerificationComponent.prototype.codeComplete = function () {
196
- if (this._form) {
197
- this._form.ngSubmit.next();
198
- }
199
- };
200
199
  Fs2FAVerificationComponent.prototype.resend = function () {
201
200
  var _this = this;
202
201
  this.resendInProgress = true;
@@ -229,8 +228,8 @@
229
228
  };
230
229
  return Fs2FAVerificationComponent;
231
230
  }());
232
- 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 }, { token: i7__namespace.NgForm, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
233
- 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" }, viewQueries: [{ propertyName: "verificationCodeComponent", first: true, predicate: Fs2FAVerificationCodeComponent, descendants: true }], ngImport: i0__namespace, template: "<div class=\"code-container\">\n <fs-2fa-verification-code\n [method]=\"method\"\n [code]=\"code\"\n (codeChange)=\"codeChange($event)\"\n (codeComplete)=\"codeComplete()\">\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}.code-container .otp{margin-bottom:15px}.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: Fs2FAVerificationCodeComponent, selector: "fs-2fa-verification-code", inputs: ["method", "code"], outputs: ["codeChange", "codeComplete"] }, { 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"] }], directives: [{ 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.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
231
+ 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 });
232
+ 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", codeChanged: "codeChanged", codeCompleted: "codeCompleted" }, viewQueries: [{ propertyName: "verificationCodeComponent", first: true, predicate: Fs2FAVerificationCodeComponent, descendants: true }], ngImport: i0__namespace, template: "<div class=\"code-container\">\n <fs-2fa-verification-code\n [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__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$1.MatSpinner, selector: "mat-spinner", inputs: ["color"] }], directives: [{ 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.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
234
233
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2FAVerificationComponent, decorators: [{
235
234
  type: i0.Component,
236
235
  args: [{
@@ -245,9 +244,7 @@
245
244
  return [{ type: undefined, decorators: [{
246
245
  type: i0.Inject,
247
246
  args: [FS_2FA_VERIFICATION_PROVIDER]
248
- }] }, { type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace$1.FsDialog }, { type: i7__namespace.NgForm, decorators: [{
249
- type: i0.Optional
250
- }] }];
247
+ }] }, { type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace$1.FsDialog }];
251
248
  }, propDecorators: { verificationCodeComponent: [{
252
249
  type: i0.ViewChild,
253
250
  args: [Fs2FAVerificationCodeComponent]
@@ -255,6 +252,10 @@
255
252
  type: i0.Input
256
253
  }], verified: [{
257
254
  type: i0.Output
255
+ }], codeChanged: [{
256
+ type: i0.Output
257
+ }], codeCompleted: [{
258
+ type: i0.Output
258
259
  }] } });
259
260
 
260
261
  var Fs2FaModule = /** @class */ (function () {
@@ -274,8 +275,8 @@
274
275
  i3.FsRadioGroupModule,
275
276
  i1$1.FsDialogModule,
276
277
  i1$2.CodeInputModule,
277
- i4$1.MatCheckboxModule,
278
- i5$1.MatProgressSpinnerModule,
278
+ i3$1.MatCheckboxModule,
279
+ i4$1.MatProgressSpinnerModule,
279
280
  i9.FsSkeletonModule,
280
281
  i9.FsSkeletonModule,
281
282
  i4.MatIconModule,
@@ -290,8 +291,8 @@
290
291
  i3.FsRadioGroupModule,
291
292
  i1$1.FsDialogModule,
292
293
  i1$2.CodeInputModule,
293
- i4$1.MatCheckboxModule,
294
- i5$1.MatProgressSpinnerModule,
294
+ i3$1.MatCheckboxModule,
295
+ i4$1.MatProgressSpinnerModule,
295
296
  i9.FsSkeletonModule,
296
297
  i9.FsSkeletonModule,
297
298
  i4.MatIconModule,
@@ -310,8 +311,8 @@
310
311
  i3.FsRadioGroupModule,
311
312
  i1$1.FsDialogModule,
312
313
  i1$2.CodeInputModule,
313
- i4$1.MatCheckboxModule,
314
- i5$1.MatProgressSpinnerModule,
314
+ i3$1.MatCheckboxModule,
315
+ i4$1.MatProgressSpinnerModule,
315
316
  i9.FsSkeletonModule,
316
317
  i9.FsSkeletonModule,
317
318
  i4.MatIconModule,
@@ -1 +1 @@
1
- {"version":3,"file":"firestitch-2fa.umd.js","sources":["../../src/app/tokens/verification.token.ts","../../src/app/enums/verification-method-type.enum.ts","../../src/app/components/2fa-verification-methods/2fa-verification-methods.component.ts","../../src/app/components/2fa-verification-methods/2fa-verification-methods.component.html","../../src/app/components/2fa-verification-code/2fa-verification-code.component.ts","../../src/app/components/2fa-verification-code/2fa-verification-code.component.html","../../src/app/components/2fa-verification/2fa-verification.component.ts","../../src/app/components/2fa-verification/2fa-verification.component.html","../../src/app/fs-2fa.module.ts","../../src/public_api.ts","../../src/firestitch-2fa.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nimport { IFsVerificationProvider } from '../interfaces/verification-provider.interface';\n\nexport const FS_2FA_VERIFICATION_PROVIDER = new InjectionToken<IFsVerificationProvider>(\n 'Provider for Verification service',\n);\n","export enum FsVerificationMethodType {\n Sms = 'sms',\n Email = 'email',\n App = 'app',\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n Inject,\n} from '@angular/core';\n\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\n\nimport { Observable } from 'rxjs';\nimport { map, shareReplay, tap } from 'rxjs/operators';\n\nimport { FS_2FA_VERIFICATION_PROVIDER } from '../../tokens/verification.token';\nimport { FsVerificationMethodType } from '../../enums/verification-method-type.enum';\nimport { IFsVerificationProvider } from '../../interfaces/verification-provider.interface';\nimport { IFsVerificationMethod } from '../../interfaces/verification-method.interface';\n\n\n@Component({\n templateUrl: './2fa-verification-methods.component.html',\n styleUrls: [\n './2fa-verification-methods.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Fs2FaVerificationMethodsComponent {\n\n public method: IFsVerificationMethod;\n public phone: string;\n public code: string;\n public methods$: Observable<Record<string, IFsVerificationMethod[]>>;\n public readonly verificationMethodType = FsVerificationMethodType;\n\n constructor(\n @Inject(FS_2FA_VERIFICATION_PROVIDER)\n private _verificationProvider: IFsVerificationProvider,\n @Inject(MAT_DIALOG_DATA)\n private _dialogData: any,\n private _dialogRef: MatDialogRef<Fs2FaVerificationMethodsComponent>,\n ) {\n this._setActiveMethod();\n this._initMethods();\n }\n\n public compareWith(o1, o2) {\n return o1 && o2 && o1.id === o2.id\n }\n\n public setVerificationMethod = () => {\n return this._verificationProvider\n .updateVerificationMethod(this.method.id)\n .pipe(\n tap((method: IFsVerificationMethod) => {\n this._dialogRef.close(method);\n })\n );\n };\n\n private _setActiveMethod(): void {\n this.method = this._dialogData?.method;\n }\n\n private _initMethods(): void {\n this.methods$ = this._verificationProvider\n .methods()\n .pipe(\n map((methods) => {\n return methods\n .reduce((acc, method) => {\n if (!acc[method.type]) {\n acc[method.type] = [];\n }\n\n acc[method.type].push(method);\n\n return acc;\n }, {});\n }),\n shareReplay(1),\n );\n }\n}\n","<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","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { ControlContainer, NgForm } from '@angular/forms';\nimport { MatInput } from '@angular/material/input';\nimport { CodeInputComponent } from 'angular-code-input';\nimport { FsVerificationMethodType } from '../../enums/verification-method-type.enum';\n\nimport { IFsVerificationMethod } from '../../interfaces/verification-method.interface';\n\n\n@Component({\n selector: 'fs-2fa-verification-code',\n templateUrl: './2fa-verification-code.component.html',\n styleUrls: [\n './2fa-verification-code.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n viewProviders: [\n {\n provide: ControlContainer,\n useExisting: NgForm,\n },\n ],\n})\nexport class Fs2FAVerificationCodeComponent {\n\n @ViewChild(CodeInputComponent)\n public codeInputComponent: CodeInputComponent;\n\n @Input()\n public method: IFsVerificationMethod;\n\n @Input()\n public code;\n\n @Output()\n public codeChange = new EventEmitter<string>();\n\n @Output()\n public codeComplete = new EventEmitter<void>();\n\n public FsVerificationMethodType = FsVerificationMethodType;\n\n public codeChanged(code): void {\n this.code = code;\n this.codeChange.emit(this.code);\n }\n\n public codeCompleted(): void {\n this.codeComplete.emit();\n }\n\n public focus(): void {\n this.codeInputComponent.focusOnField(0);\n }\n\n}\n","<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)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted()\">\n </code-input> \n</ng-template> ","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n ViewChild,\n} from '@angular/core';\n\nimport { FsDialog } from '@firestitch/dialog';\n\nimport { filter, takeUntil, tap } from 'rxjs/operators';\n\nimport { IFsVerificationMethod } from '../../interfaces/verification-method.interface';\nimport { Fs2FaVerificationMethodsComponent } from '../2fa-verification-methods/2fa-verification-methods.component';\nimport { Subject } from 'rxjs';\nimport { FS_2FA_VERIFICATION_PROVIDER } from '../../tokens/verification.token';\nimport { IFsVerificationProvider } from '../../interfaces/verification-provider.interface';\nimport { FsVerificationMethodType } from '../../enums/verification-method-type.enum';\nimport { Fs2FAVerificationCodeComponent } from '../2fa-verification-code/2fa-verification-code.component';\nimport { NgControl, NgForm } from '@angular/forms';\n\n\n@Component({\n selector: 'fs-2fa-verification',\n templateUrl: './2fa-verification.component.html',\n styleUrls: [\n './2fa-verification.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Fs2FAVerificationComponent implements OnDestroy, AfterViewInit {\n\n @ViewChild(Fs2FAVerificationCodeComponent)\n public verificationCodeComponent: Fs2FAVerificationCodeComponent;\n\n @Input()\n public method: IFsVerificationMethod;\n\n @Output()\n public verified = new EventEmitter<unknown>();\n\n public resendInProgress = false;\n public code = '';\n public trustedDevice = true;\n public FsVerificationMethodType = FsVerificationMethodType;\n\n private _destroy$ = new Subject<void>();\n\n constructor(\n @Inject(FS_2FA_VERIFICATION_PROVIDER)\n public verificationProvider: IFsVerificationProvider,\n private _cdRef: ChangeDetectorRef,\n private _dialog: FsDialog,\n @Optional() private _form: NgForm,\n ) {\n }\n\n public ngOnDestroy(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n\n public verify = () => {\n return this.verificationProvider\n .verify(this.code, this.trustedDevice)\n .pipe(\n tap((response) => {\n this.verified.emit(response);\n }),\n );\n };\n\n public ngAfterViewInit(): void {\n this.verificationCodeComponent.focus(); \n }\n\n public codeChange(code: string): void {\n this.code = code;\n }\n\n public codeComplete(): void {\n if(this._form) {\n this._form.ngSubmit.next();\n }\n }\n\n public resend(): void {\n this.resendInProgress = true;\n this.code = '';\n \n this.verificationProvider\n .resend()\n .pipe(\n takeUntil(this._destroy$),\n )\n .subscribe(() => {\n this.resendInProgress = false; \n this._cdRef.markForCheck();\n })\n }\n\n public showVerificationMethods(): void {\n this._dialog.open(\n Fs2FaVerificationMethodsComponent,\n {\n data: {\n method: this.method,\n }\n }\n )\n .afterClosed()\n .pipe(\n filter((method) => !!method),\n )\n .subscribe((method) => {\n this.method = method;\n this.code = '';\n\n this._cdRef.markForCheck();\n\n setTimeout(() => {\n this.verificationCodeComponent.focus();\n });\n });\n }\n\n}\n","<div class=\"code-container\">\n <fs-2fa-verification-code\n [method]=\"method\"\n [code]=\"code\"\n (codeChange)=\"codeChange($event)\"\n (codeComplete)=\"codeComplete()\">\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>","import { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\n\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\n\nimport { FsFormModule } from '@firestitch/form';\nimport { FsSkeletonModule } from '@firestitch/skeleton';\nimport { FsRadioGroupModule } from '@firestitch/radiogroup';\nimport { FsDialogModule } from '@firestitch/dialog';\n\nimport { CodeInputModule } from 'angular-code-input';\n\nimport { Fs2FAVerificationComponent } from './components/2fa-verification/2fa-verification.component';\nimport { Fs2FAVerificationCodeComponent } from './components/2fa-verification-code/2fa-verification-code.component';\nimport { Fs2FaVerificationMethodsComponent } from './components/2fa-verification-methods/2fa-verification-methods.component';\n\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n\n MatFormFieldModule,\n MatInputModule,\n MatButtonModule,\n\n FsFormModule,\n FsRadioGroupModule,\n FsDialogModule,\n\n CodeInputModule,\n MatCheckboxModule,\n MatProgressSpinnerModule,\n FsSkeletonModule,\n FsSkeletonModule,\n MatIconModule,\n MatRadioModule,\n ],\n declarations: [\n Fs2FAVerificationComponent,\n Fs2FAVerificationCodeComponent,\n Fs2FaVerificationMethodsComponent,\n ],\n exports: [\n Fs2FAVerificationComponent,\n ],\n providers: [],\n})\nexport class Fs2FaModule {}\n","/*\n * Public API Surface of fs-2fa\n */\n\nexport { Fs2FaModule } from './app/fs-2fa.module';\n\n// Components\nexport { Fs2FAVerificationComponent } from './app/components/2fa-verification/2fa-verification.component';\n\nexport { IFsVerificationProvider } from './app/interfaces/verification-provider.interface';\nexport { IFsVerificationMethod } from './app/interfaces/verification-method.interface';\n\nexport { FsVerificationMethodType } from './app/enums/verification-method-type.enum';\n\nexport { FS_2FA_VERIFICATION_PROVIDER } from './app/tokens/verification.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["InjectionToken","FsVerificationMethodType","tap","map","shareReplay","MAT_DIALOG_DATA","Component","ChangeDetectionStrategy","Inject","EventEmitter","CodeInputComponent","ControlContainer","NgForm","ViewChild","Input","Output","Subject","takeUntil","filter","Optional","CommonModule","FormsModule","MatFormFieldModule","MatInputModule","MatButtonModule","FsFormModule","FsRadioGroupModule","FsDialogModule","CodeInputModule","MatCheckboxModule","MatProgressSpinnerModule","FsSkeletonModule","MatIconModule","MatRadioModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAIa,4BAA4B,GAAG,IAAIA,iBAAc,CAC5D,mCAAmC;;ACLzBC;IAAZ,WAAY,wBAAwB;QAClC,uCAAW,CAAA;QACX,2CAAe,CAAA;QACf,uCAAW,CAAA;IACb,CAAC,EAJWA,gCAAwB,KAAxBA,gCAAwB;;ICwBpC;QAQE,2CAEU,qBAA8C,EAE9C,WAAgB,EAChB,UAA2D;YALrE,iBASC;YAPS,0BAAqB,GAArB,qBAAqB,CAAyB;YAE9C,gBAAW,GAAX,WAAW,CAAK;YAChB,eAAU,GAAV,UAAU,CAAiD;YAPrD,2BAAsB,GAAGA,gCAAwB,CAAC;YAiB3D,0BAAqB,GAAG;gBAC7B,OAAO,KAAI,CAAC,qBAAqB;qBAC9B,wBAAwB,CAAC,KAAI,CAAC,MAAM,CAAC,EAAE,CAAC;qBACxC,IAAI,CACHC,aAAG,CAAC,UAAC,MAA6B;oBAChC,KAAI,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;iBAC/B,CAAC,CACH,CAAC;aACL,CAAC;YAhBA,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACxB,IAAI,CAAC,YAAY,EAAE,CAAC;SACrB;QAEM,uDAAW,GAAX,UAAY,EAAE,EAAE,EAAE;YACvB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAA;SACnC;QAYO,4DA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BACxBC,mBAAgB;gBAChBA,mBAAgB;gBAChBC,gBAAa;gBACbC,iBAAc;aACf;sHAWU,WAAW;sBA/BvBC,WAAQ;uBAAC;wBACR,OAAO,EAAE;4BACPd,gBAAY;4BACZC,cAAW;4BAEXC,4BAAkB;4BAClBC,oBAAc;4BACdC,kBAAe;4BAEfC,eAAY;4BACZC,qBAAkB;4BAClBC,mBAAc;4BAEdC,oBAAe;4BACfC,sBAAiB;4BACjBC,6BAAwB;4BACxBC,mBAAgB;4BAChBA,mBAAgB;4BAChBC,gBAAa;4BACbC,iBAAc;yBACf;wBACD,YAAY,EAAE;4BACZ,0BAA0B;4BAC1B,8BAA8B;4BAC9B,iCAAiC;yBAClC;wBACD,OAAO,EAAE;4BACP,0BAA0B;yBAC3B;wBACD,SAAS,EAAE,EAAE;qBACd;;;ICtDD;;;;ICAA;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"firestitch-2fa.umd.js","sources":["../../src/app/tokens/verification.token.ts","../../src/app/enums/verification-method-type.enum.ts","../../src/app/components/2fa-verification-methods/2fa-verification-methods.component.ts","../../src/app/components/2fa-verification-methods/2fa-verification-methods.component.html","../../src/app/components/2fa-verification-code/2fa-verification-code.component.ts","../../src/app/components/2fa-verification-code/2fa-verification-code.component.html","../../src/app/components/2fa-verification/2fa-verification.component.ts","../../src/app/components/2fa-verification/2fa-verification.component.html","../../src/app/fs-2fa.module.ts","../../src/public_api.ts","../../src/firestitch-2fa.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nimport { IFsVerificationProvider } from '../interfaces/verification-provider.interface';\n\nexport const FS_2FA_VERIFICATION_PROVIDER = new InjectionToken<IFsVerificationProvider>(\n 'Provider for Verification service',\n);\n","export enum FsVerificationMethodType {\n Sms = 'sms',\n Email = 'email',\n App = 'app',\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n Inject,\n} from '@angular/core';\n\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\n\nimport { Observable } from 'rxjs';\nimport { map, shareReplay, tap } from 'rxjs/operators';\n\nimport { FS_2FA_VERIFICATION_PROVIDER } from '../../tokens/verification.token';\nimport { FsVerificationMethodType } from '../../enums/verification-method-type.enum';\nimport { IFsVerificationProvider } from '../../interfaces/verification-provider.interface';\nimport { IFsVerificationMethod } from '../../interfaces/verification-method.interface';\n\n\n@Component({\n templateUrl: './2fa-verification-methods.component.html',\n styleUrls: [\n './2fa-verification-methods.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Fs2FaVerificationMethodsComponent {\n\n public method: IFsVerificationMethod;\n public phone: string;\n public code: string;\n public methods$: Observable<Record<string, IFsVerificationMethod[]>>;\n public readonly verificationMethodType = FsVerificationMethodType;\n\n constructor(\n @Inject(FS_2FA_VERIFICATION_PROVIDER)\n private _verificationProvider: IFsVerificationProvider,\n @Inject(MAT_DIALOG_DATA)\n private _dialogData: any,\n private _dialogRef: MatDialogRef<Fs2FaVerificationMethodsComponent>,\n ) {\n this._setActiveMethod();\n this._initMethods();\n }\n\n public compareWith(o1, o2) {\n return o1 && o2 && o1.id === o2.id\n }\n\n public setVerificationMethod = () => {\n return this._verificationProvider\n .updateVerificationMethod(this.method.id)\n .pipe(\n tap((method: IFsVerificationMethod) => {\n this._dialogRef.close(method);\n })\n );\n };\n\n private _setActiveMethod(): void {\n this.method = this._dialogData?.method;\n }\n\n private _initMethods(): void {\n this.methods$ = this._verificationProvider\n .methods()\n .pipe(\n map((methods) => {\n return methods\n .reduce((acc, method) => {\n if (!acc[method.type]) {\n acc[method.type] = [];\n }\n\n acc[method.type].push(method);\n\n return acc;\n }, {});\n }),\n shareReplay(1),\n );\n }\n}\n","<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","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { ControlContainer, NgForm } from '@angular/forms';\nimport { CodeInputComponent } from 'angular-code-input';\nimport { FsVerificationMethodType } from '../../enums/verification-method-type.enum';\n\nimport { IFsVerificationMethod } from '../../interfaces/verification-method.interface';\n\n\n@Component({\n selector: 'fs-2fa-verification-code',\n templateUrl: './2fa-verification-code.component.html',\n styleUrls: [\n './2fa-verification-code.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n viewProviders: [\n {\n provide: ControlContainer,\n useExisting: NgForm,\n },\n ],\n})\nexport class Fs2FAVerificationCodeComponent {\n\n @ViewChild(CodeInputComponent)\n public codeInputComponent: CodeInputComponent;\n\n @Input()\n public method: IFsVerificationMethod;\n\n @Input()\n public code;\n\n @Output()\n public codeChanged = new EventEmitter<string>();\n\n @Output()\n public codeCompleted = new EventEmitter<void>();\n\n public FsVerificationMethodType = FsVerificationMethodType;\n\n public codeChange(code): void {\n this.code = code;\n this.codeChanged.emit(this.code);\n }\n\n public focus(): void {\n this.codeInputComponent.focusOnField(0);\n }\n\n}\n","<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> ","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\n\nimport { FsDialog } from '@firestitch/dialog';\n\nimport { filter, takeUntil, tap } from 'rxjs/operators';\n\nimport { IFsVerificationMethod } from '../../interfaces/verification-method.interface';\nimport { Fs2FaVerificationMethodsComponent } from '../2fa-verification-methods/2fa-verification-methods.component';\nimport { Subject } from 'rxjs';\nimport { FS_2FA_VERIFICATION_PROVIDER } from '../../tokens/verification.token';\nimport { IFsVerificationProvider } from '../../interfaces/verification-provider.interface';\nimport { FsVerificationMethodType } from '../../enums/verification-method-type.enum';\nimport { Fs2FAVerificationCodeComponent } from '../2fa-verification-code/2fa-verification-code.component';\n\n\n@Component({\n selector: 'fs-2fa-verification',\n templateUrl: './2fa-verification.component.html',\n styleUrls: [\n './2fa-verification.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Fs2FAVerificationComponent implements OnDestroy, AfterViewInit, OnInit {\n\n @ViewChild(Fs2FAVerificationCodeComponent)\n public verificationCodeComponent: Fs2FAVerificationCodeComponent;\n\n @Input()\n public method: IFsVerificationMethod;\n\n @Output()\n public verified = new EventEmitter<unknown>();\n\n @Output()\n public codeChanged = new EventEmitter<unknown>();\n\n @Output()\n public codeCompleted = new EventEmitter<unknown>();\n\n public resendInProgress = false;\n public code = '';\n public trustedDevice = true;\n public FsVerificationMethodType = FsVerificationMethodType;\n\n private _destroy$ = new Subject<void>();\n\n constructor(\n @Inject(FS_2FA_VERIFICATION_PROVIDER)\n public verificationProvider: IFsVerificationProvider,\n private _cdRef: ChangeDetectorRef,\n private _dialog: FsDialog,\n ) {\n }\n\n public ngOnInit(): void {\n this.codeChanged\n .pipe(\n takeUntil(this._destroy$),\n )\n .subscribe((code: string) => {\n this.code = code;\n });\n }\n\n public ngOnDestroy(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n\n public verify() {\n this.verificationProvider\n .verify(this.code, this.trustedDevice)\n .subscribe((response) => {\n this.verified.emit(response);\n });\n };\n\n public ngAfterViewInit(): void {\n this.verificationCodeComponent.focus(); \n }\n\n public resend(): void {\n this.resendInProgress = true;\n this.code = '';\n\n this.verificationProvider\n .resend()\n .pipe(\n takeUntil(this._destroy$),\n )\n .subscribe(() => {\n this.resendInProgress = false; \n this._cdRef.markForCheck();\n })\n }\n\n public showVerificationMethods(): void {\n this._dialog.open(\n Fs2FaVerificationMethodsComponent,\n {\n data: {\n method: this.method,\n }\n }\n )\n .afterClosed()\n .pipe(\n filter((method) => !!method),\n )\n .subscribe((method) => {\n this.method = method;\n this.code = '';\n\n this._cdRef.markForCheck();\n\n setTimeout(() => {\n this.verificationCodeComponent.focus();\n });\n });\n }\n\n}\n","<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>","import { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\n\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\n\nimport { FsFormModule } from '@firestitch/form';\nimport { FsSkeletonModule } from '@firestitch/skeleton';\nimport { FsRadioGroupModule } from '@firestitch/radiogroup';\nimport { FsDialogModule } from '@firestitch/dialog';\n\nimport { CodeInputModule } from 'angular-code-input';\n\nimport { Fs2FAVerificationComponent } from './components/2fa-verification/2fa-verification.component';\nimport { Fs2FAVerificationCodeComponent } from './components/2fa-verification-code/2fa-verification-code.component';\nimport { Fs2FaVerificationMethodsComponent } from './components/2fa-verification-methods/2fa-verification-methods.component';\n\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n\n MatFormFieldModule,\n MatInputModule,\n MatButtonModule,\n\n FsFormModule,\n FsRadioGroupModule,\n FsDialogModule,\n\n CodeInputModule,\n MatCheckboxModule,\n MatProgressSpinnerModule,\n FsSkeletonModule,\n FsSkeletonModule,\n MatIconModule,\n MatRadioModule,\n ],\n declarations: [\n Fs2FAVerificationComponent,\n Fs2FAVerificationCodeComponent,\n Fs2FaVerificationMethodsComponent,\n ],\n exports: [\n Fs2FAVerificationComponent,\n ],\n providers: [],\n})\nexport class Fs2FaModule {}\n","/*\n * Public API Surface of fs-2fa\n */\n\nexport { Fs2FaModule } from './app/fs-2fa.module';\n\n// Components\nexport { Fs2FAVerificationComponent } from './app/components/2fa-verification/2fa-verification.component';\n\nexport { IFsVerificationProvider } from './app/interfaces/verification-provider.interface';\nexport { IFsVerificationMethod } from './app/interfaces/verification-method.interface';\n\nexport { FsVerificationMethodType } from './app/enums/verification-method-type.enum';\n\nexport { FS_2FA_VERIFICATION_PROVIDER } from './app/tokens/verification.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["InjectionToken","FsVerificationMethodType","tap","map","shareReplay","MAT_DIALOG_DATA","Component","ChangeDetectionStrategy","Inject","EventEmitter","CodeInputComponent","ControlContainer","NgForm","ViewChild","Input","Output","Subject","takeUntil","filter","CommonModule","FormsModule","MatFormFieldModule","MatInputModule","MatButtonModule","FsFormModule","FsRadioGroupModule","FsDialogModule","CodeInputModule","MatCheckboxModule","MatProgressSpinnerModule","FsSkeletonModule","MatIconModule","MatRadioModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAIa,4BAA4B,GAAG,IAAIA,iBAAc,CAC5D,mCAAmC;;ACLzBC;IAAZ,WAAY,wBAAwB;QAClC,uCAAW,CAAA;QACX,2CAAe,CAAA;QACf,uCAAW,CAAA;IACb,CAAC,EAJWA,gCAAwB,KAAxBA,gCAAwB;;ICwBpC;QAQE,2CAEU,qBAA8C,EAE9C,WAAgB,EAChB,UAA2D;YALrE,iBASC;YAPS,0BAAqB,GAArB,qBAAqB,CAAyB;YAE9C,gBAAW,GAAX,WAAW,CAAK;YAChB,eAAU,GAAV,UAAU,CAAiD;YAPrD,2BAAsB,GAAGA,gCAAwB,CAAC;YAiB3D,0BAAqB,GAAG;gBAC7B,OAAO,KAAI,CAAC,qBAAqB;qBAC9B,wBAAwB,CAAC,KAAI,CAAC,MAAM,CAAC,EAAE,CAAC;qBACxC,IAAI,CACHC,aAAG,CAAC,UAAC,MAA6B;oBAChC,KAAI,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;iBAC/B,CAAC,CACH,CAAC;aACL,CAAC;YAhBA,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACxB,IAAI,CAAC,YAAY,EAAE,CAAC;SACrB;QAEM,uDAAW,GAAX,UAAY,EAAE,EAAE,EAAE;YACvB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAA;SACnC;QAYO,4DAAgB,GAAhB;;YACN,IAAI,CAAC,MAAM,GAAG,MAAA,IAAI,CAAC,WAAW,0CAAE,MAAM,CAAC;SACxC;QAEO,wDAAY,G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WAAQ;uBAAC;wBACR,OAAO,EAAE;4BACPd,gBAAY;4BACZC,cAAW;4BAEXC,4BAAkB;4BAClBC,oBAAc;4BACdC,kBAAe;4BAEfC,eAAY;4BACZC,qBAAkB;4BAClBC,mBAAc;4BAEdC,oBAAe;4BACfC,sBAAiB;4BACjBC,6BAAwB;4BACxBC,mBAAgB;4BAChBA,mBAAgB;4BAChBC,gBAAa;4BACbC,iBAAc;yBACf;wBACD,YAAY,EAAE;4BACZ,0BAA0B;4BAC1B,8BAA8B;4BAC9B,iCAAiC;yBAClC;wBACD,OAAO,EAAE;4BACP,0BAA0B;yBAC3B;wBACD,SAAS,EAAE,EAAE;qBACd;;;ICtDD;;;;ICAA;;;;;;;;;;;;;;"}
@@ -1,54 +1,54 @@
1
- import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Inject, Input, Optional, Output, ViewChild, } from '@angular/core';
1
+ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Inject, Input, Output, ViewChild, } from '@angular/core';
2
2
  import { FsDialog } from '@firestitch/dialog';
3
- import { filter, takeUntil, tap } from 'rxjs/operators';
3
+ import { filter, takeUntil } from 'rxjs/operators';
4
4
  import { Fs2FaVerificationMethodsComponent } from '../2fa-verification-methods/2fa-verification-methods.component';
5
5
  import { Subject } from 'rxjs';
6
6
  import { FS_2FA_VERIFICATION_PROVIDER } from '../../tokens/verification.token';
7
7
  import { FsVerificationMethodType } from '../../enums/verification-method-type.enum';
8
8
  import { Fs2FAVerificationCodeComponent } from '../2fa-verification-code/2fa-verification-code.component';
9
- import { NgForm } from '@angular/forms';
10
9
  import * as i0 from "@angular/core";
11
10
  import * as i1 from "@firestitch/dialog";
12
- import * as i2 from "@angular/forms";
13
- import * as i3 from "../2fa-verification-code/2fa-verification-code.component";
14
- import * as i4 from "@angular/material/checkbox";
15
- import * as i5 from "@angular/material/progress-spinner";
11
+ import * as i2 from "../2fa-verification-code/2fa-verification-code.component";
12
+ import * as i3 from "@angular/material/checkbox";
13
+ import * as i4 from "@angular/material/progress-spinner";
14
+ import * as i5 from "@angular/forms";
16
15
  import * as i6 from "@angular/common";
17
16
  export class Fs2FAVerificationComponent {
18
- constructor(verificationProvider, _cdRef, _dialog, _form) {
17
+ constructor(verificationProvider, _cdRef, _dialog) {
19
18
  this.verificationProvider = verificationProvider;
20
19
  this._cdRef = _cdRef;
21
20
  this._dialog = _dialog;
22
- this._form = _form;
23
21
  this.verified = new EventEmitter();
22
+ this.codeChanged = new EventEmitter();
23
+ this.codeCompleted = new EventEmitter();
24
24
  this.resendInProgress = false;
25
25
  this.code = '';
26
26
  this.trustedDevice = true;
27
27
  this.FsVerificationMethodType = FsVerificationMethodType;
28
28
  this._destroy$ = new Subject();
29
- this.verify = () => {
30
- return this.verificationProvider
31
- .verify(this.code, this.trustedDevice)
32
- .pipe(tap((response) => {
33
- this.verified.emit(response);
34
- }));
35
- };
29
+ }
30
+ ngOnInit() {
31
+ this.codeChanged
32
+ .pipe(takeUntil(this._destroy$))
33
+ .subscribe((code) => {
34
+ this.code = code;
35
+ });
36
36
  }
37
37
  ngOnDestroy() {
38
38
  this._destroy$.next();
39
39
  this._destroy$.complete();
40
40
  }
41
+ verify() {
42
+ this.verificationProvider
43
+ .verify(this.code, this.trustedDevice)
44
+ .subscribe((response) => {
45
+ this.verified.emit(response);
46
+ });
47
+ }
48
+ ;
41
49
  ngAfterViewInit() {
42
50
  this.verificationCodeComponent.focus();
43
51
  }
44
- codeChange(code) {
45
- this.code = code;
46
- }
47
- codeComplete() {
48
- if (this._form) {
49
- this._form.ngSubmit.next();
50
- }
51
- }
52
52
  resend() {
53
53
  this.resendInProgress = true;
54
54
  this.code = '';
@@ -78,8 +78,8 @@ export class Fs2FAVerificationComponent {
78
78
  });
79
79
  }
80
80
  }
81
- 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.FsDialog }, { token: i2.NgForm, optional: true }], target: i0.ɵɵFactoryTarget.Component });
82
- Fs2FAVerificationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FAVerificationComponent, selector: "fs-2fa-verification", inputs: { method: "method" }, outputs: { verified: "verified" }, 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 (codeChange)=\"codeChange($event)\"\n (codeComplete)=\"codeComplete()\">\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}.code-container .otp{margin-bottom:15px}.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: i3.Fs2FAVerificationCodeComponent, selector: "fs-2fa-verification-code", inputs: ["method", "code"], outputs: ["codeChange", "codeComplete"] }, { type: i4.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.MatSpinner, selector: "mat-spinner", inputs: ["color"] }], directives: [{ type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
81
+ 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.FsDialog }], target: i0.ɵɵFactoryTarget.Component });
82
+ 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: i2.Fs2FAVerificationCodeComponent, selector: "fs-2fa-verification-code", inputs: ["method", "code"], outputs: ["codeChanged", "codeCompleted"] }, { type: i3.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.MatSpinner, selector: "mat-spinner", inputs: ["color"] }], directives: [{ type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
83
83
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FAVerificationComponent, decorators: [{
84
84
  type: Component,
85
85
  args: [{
@@ -93,14 +93,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
93
93
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
94
94
  type: Inject,
95
95
  args: [FS_2FA_VERIFICATION_PROVIDER]
96
- }] }, { type: i0.ChangeDetectorRef }, { type: i1.FsDialog }, { type: i2.NgForm, decorators: [{
97
- type: Optional
98
- }] }]; }, propDecorators: { verificationCodeComponent: [{
96
+ }] }, { type: i0.ChangeDetectorRef }, { type: i1.FsDialog }]; }, propDecorators: { verificationCodeComponent: [{
99
97
  type: ViewChild,
100
98
  args: [Fs2FAVerificationCodeComponent]
101
99
  }], method: [{
102
100
  type: Input
103
101
  }], verified: [{
104
102
  type: Output
103
+ }], codeChanged: [{
104
+ type: Output
105
+ }], codeCompleted: [{
106
+ type: Output
105
107
  }] } });
106
- //# sourceMappingURL=data:application/json;base64,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aXY+XG5cbjxkaXYgY2xhc3M9XCJhZGRpdGlvbmFsXCI+XG4gIDxtYXQtY2hlY2tib3hcbiAgICBuYW1lPVwidHJ1c3QtZGV2aWNlXCJcbiAgICBbKG5nTW9kZWwpXT1cInRydXN0ZWREZXZpY2VcIj5cbiAgICBUcnVzdCB0aGlzIGRldmljZVxuICA8L21hdC1jaGVja2JveD5cblxuICA8c3BhbiBjbGFzcz1cInJlc2VuZC1jb2RlLWJ0blwiPlxuICAgIDxuZy1jb250YWluZXIgKm5nSWY9XCIhcmVzZW5kSW5Qcm9ncmVzcyBlbHNlIHNlbmRpbmdcIj5cbiAgICAgIDxhIChjbGljayk9XCJyZXNlbmQoKVwiPlxuICAgICAgICBSZXNlbmQgQ29kZVxuICAgICAgPC9hPlxuICAgIDwvbmctY29udGFpbmVyPlxuICAgIDxuZy10ZW1wbGF0ZSAjc2VuZGluZz5cbiAgICAgIDxtYXQtc3Bpbm5lciBbZGlhbWV0ZXJdPVwiMTJcIj48L21hdC1zcGlubmVyPiBTZW5kaW5nXG4gICAgPC9uZy10ZW1wbGF0ZT5cbiAgPC9zcGFuPlxuPC9kaXY+Il19
@@ -7,23 +7,20 @@ import * as i1 from "angular-code-input";
7
7
  import * as i2 from "@angular/common";
8
8
  export class Fs2FAVerificationCodeComponent {
9
9
  constructor() {
10
- this.codeChange = new EventEmitter();
11
- this.codeComplete = new EventEmitter();
10
+ this.codeChanged = new EventEmitter();
11
+ this.codeCompleted = new EventEmitter();
12
12
  this.FsVerificationMethodType = FsVerificationMethodType;
13
13
  }
14
- codeChanged(code) {
14
+ codeChange(code) {
15
15
  this.code = code;
16
- this.codeChange.emit(this.code);
17
- }
18
- codeCompleted() {
19
- this.codeComplete.emit();
16
+ this.codeChanged.emit(this.code);
20
17
  }
21
18
  focus() {
22
19
  this.codeInputComponent.focusOnField(0);
23
20
  }
24
21
  }
25
22
  Fs2FAVerificationCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FAVerificationCodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
26
- 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: { codeChange: "codeChange", codeComplete: "codeComplete" }, 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)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted()\">\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:15px;--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.CodeInputComponent, selector: "code-input", inputs: ["isNonDigitsCode", "codeLength", "inputType", "initialFocusField", "isCharsCode", "isCodeHidden", "isPrevFocusableAfterClearing", "isFocusingOnLastByClickIfFilled", "code", "disabled", "autocapitalize"], outputs: ["codeChanged", "codeCompleted"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], viewProviders: [
23
+ 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.CodeInputComponent, selector: "code-input", inputs: ["isNonDigitsCode", "codeLength", "inputType", "initialFocusField", "isCharsCode", "isCodeHidden", "isPrevFocusableAfterClearing", "isFocusingOnLastByClickIfFilled", "code", "disabled", "autocapitalize"], outputs: ["codeChanged", "codeCompleted"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], viewProviders: [
27
24
  {
28
25
  provide: ControlContainer,
29
26
  useExisting: NgForm,
@@ -52,9 +49,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
52
49
  type: Input
53
50
  }], code: [{
54
51
  type: Input
55
- }], codeChange: [{
52
+ }], codeChanged: [{
56
53
  type: Output
57
- }], codeComplete: [{
54
+ }], codeCompleted: [{
58
55
  type: Output
59
56
  }] } });
60
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMmZhLXZlcmlmaWNhdGlvbi1jb2RlLmNv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8L2NvZGUtaW5wdXQ+IFxuPC9uZy10ZW1wbGF0ZT4gIl19
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, Component, ChangeDetectionStrategy, Inject, EventEmitter, ViewChild, Input, Output, Optional, 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';
@@ -12,9 +12,9 @@ import * as i6 from '@angular/material/button';
12
12
  import { MatButtonModule } from '@angular/material/button';
13
13
  import { MatFormFieldModule } from '@angular/material/form-field';
14
14
  import { MatInputModule } from '@angular/material/input';
15
- import * as i4$1 from '@angular/material/checkbox';
15
+ import * as i3$1 from '@angular/material/checkbox';
16
16
  import { MatCheckboxModule } from '@angular/material/checkbox';
17
- import * as i5$1 from '@angular/material/progress-spinner';
17
+ import * as i4$1 from '@angular/material/progress-spinner';
18
18
  import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
19
19
  import * as i8 from '@firestitch/form';
20
20
  import { FsFormModule } from '@firestitch/form';
@@ -99,23 +99,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
99
99
 
100
100
  class Fs2FAVerificationCodeComponent {
101
101
  constructor() {
102
- this.codeChange = new EventEmitter();
103
- this.codeComplete = new EventEmitter();
102
+ this.codeChanged = new EventEmitter();
103
+ this.codeCompleted = new EventEmitter();
104
104
  this.FsVerificationMethodType = FsVerificationMethodType;
105
105
  }
106
- codeChanged(code) {
106
+ codeChange(code) {
107
107
  this.code = code;
108
- this.codeChange.emit(this.code);
109
- }
110
- codeCompleted() {
111
- this.codeComplete.emit();
108
+ this.codeChanged.emit(this.code);
112
109
  }
113
110
  focus() {
114
111
  this.codeInputComponent.focusOnField(0);
115
112
  }
116
113
  }
117
114
  Fs2FAVerificationCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FAVerificationCodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
118
- 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: { codeChange: "codeChange", codeComplete: "codeComplete" }, 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)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted()\">\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:15px;--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: [
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: [
119
116
  {
120
117
  provide: ControlContainer,
121
118
  useExisting: NgForm,
@@ -144,47 +141,48 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
144
141
  type: Input
145
142
  }], code: [{
146
143
  type: Input
147
- }], codeChange: [{
144
+ }], codeChanged: [{
148
145
  type: Output
149
- }], codeComplete: [{
146
+ }], codeCompleted: [{
150
147
  type: Output
151
148
  }] } });
152
149
 
153
150
  class Fs2FAVerificationComponent {
154
- constructor(verificationProvider, _cdRef, _dialog, _form) {
151
+ constructor(verificationProvider, _cdRef, _dialog) {
155
152
  this.verificationProvider = verificationProvider;
156
153
  this._cdRef = _cdRef;
157
154
  this._dialog = _dialog;
158
- this._form = _form;
159
155
  this.verified = new EventEmitter();
156
+ this.codeChanged = new EventEmitter();
157
+ this.codeCompleted = new EventEmitter();
160
158
  this.resendInProgress = false;
161
159
  this.code = '';
162
160
  this.trustedDevice = true;
163
161
  this.FsVerificationMethodType = FsVerificationMethodType;
164
162
  this._destroy$ = new Subject();
165
- this.verify = () => {
166
- return this.verificationProvider
167
- .verify(this.code, this.trustedDevice)
168
- .pipe(tap((response) => {
169
- this.verified.emit(response);
170
- }));
171
- };
163
+ }
164
+ ngOnInit() {
165
+ this.codeChanged
166
+ .pipe(takeUntil(this._destroy$))
167
+ .subscribe((code) => {
168
+ this.code = code;
169
+ });
172
170
  }
173
171
  ngOnDestroy() {
174
172
  this._destroy$.next();
175
173
  this._destroy$.complete();
176
174
  }
175
+ verify() {
176
+ this.verificationProvider
177
+ .verify(this.code, this.trustedDevice)
178
+ .subscribe((response) => {
179
+ this.verified.emit(response);
180
+ });
181
+ }
182
+ ;
177
183
  ngAfterViewInit() {
178
184
  this.verificationCodeComponent.focus();
179
185
  }
180
- codeChange(code) {
181
- this.code = code;
182
- }
183
- codeComplete() {
184
- if (this._form) {
185
- this._form.ngSubmit.next();
186
- }
187
- }
188
186
  resend() {
189
187
  this.resendInProgress = true;
190
188
  this.code = '';
@@ -214,8 +212,8 @@ class Fs2FAVerificationComponent {
214
212
  });
215
213
  }
216
214
  }
217
- 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 }, { token: i7.NgForm, optional: true }], target: i0.ɵɵFactoryTarget.Component });
218
- Fs2FAVerificationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FAVerificationComponent, selector: "fs-2fa-verification", inputs: { method: "method" }, outputs: { verified: "verified" }, 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 (codeChange)=\"codeChange($event)\"\n (codeComplete)=\"codeComplete()\">\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}.code-container .otp{margin-bottom:15px}.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: Fs2FAVerificationCodeComponent, selector: "fs-2fa-verification-code", inputs: ["method", "code"], outputs: ["codeChange", "codeComplete"] }, { 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"] }], 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 });
215
+ 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 });
216
+ 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 });
219
217
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FAVerificationComponent, decorators: [{
220
218
  type: Component,
221
219
  args: [{
@@ -229,15 +227,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
229
227
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
230
228
  type: Inject,
231
229
  args: [FS_2FA_VERIFICATION_PROVIDER]
232
- }] }, { type: i0.ChangeDetectorRef }, { type: i1$1.FsDialog }, { type: i7.NgForm, decorators: [{
233
- type: Optional
234
- }] }]; }, propDecorators: { verificationCodeComponent: [{
230
+ }] }, { type: i0.ChangeDetectorRef }, { type: i1$1.FsDialog }]; }, propDecorators: { verificationCodeComponent: [{
235
231
  type: ViewChild,
236
232
  args: [Fs2FAVerificationCodeComponent]
237
233
  }], method: [{
238
234
  type: Input
239
235
  }], verified: [{
240
236
  type: Output
237
+ }], codeChanged: [{
238
+ type: Output
239
+ }], codeCompleted: [{
240
+ type: Output
241
241
  }] } });
242
242
 
243
243
  class Fs2FaModule {
@@ -1 +1 @@
1
- {"version":3,"file":"firestitch-2fa.js","sources":["../../src/app/tokens/verification.token.ts","../../src/app/enums/verification-method-type.enum.ts","../../src/app/components/2fa-verification-methods/2fa-verification-methods.component.ts","../../src/app/components/2fa-verification-methods/2fa-verification-methods.component.html","../../src/app/components/2fa-verification-code/2fa-verification-code.component.ts","../../src/app/components/2fa-verification-code/2fa-verification-code.component.html","../../src/app/components/2fa-verification/2fa-verification.component.ts","../../src/app/components/2fa-verification/2fa-verification.component.html","../../src/app/fs-2fa.module.ts","../../src/public_api.ts","../../src/firestitch-2fa.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nimport { IFsVerificationProvider } from '../interfaces/verification-provider.interface';\n\nexport const FS_2FA_VERIFICATION_PROVIDER = new InjectionToken<IFsVerificationProvider>(\n 'Provider for Verification service',\n);\n","export enum FsVerificationMethodType {\n Sms = 'sms',\n Email = 'email',\n App = 'app',\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n Inject,\n} from '@angular/core';\n\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\n\nimport { Observable } from 'rxjs';\nimport { map, shareReplay, tap } from 'rxjs/operators';\n\nimport { FS_2FA_VERIFICATION_PROVIDER } from '../../tokens/verification.token';\nimport { FsVerificationMethodType } from '../../enums/verification-method-type.enum';\nimport { IFsVerificationProvider } from '../../interfaces/verification-provider.interface';\nimport { IFsVerificationMethod } from '../../interfaces/verification-method.interface';\n\n\n@Component({\n templateUrl: './2fa-verification-methods.component.html',\n styleUrls: [\n './2fa-verification-methods.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Fs2FaVerificationMethodsComponent {\n\n public method: IFsVerificationMethod;\n public phone: string;\n public code: string;\n public methods$: Observable<Record<string, IFsVerificationMethod[]>>;\n public readonly verificationMethodType = FsVerificationMethodType;\n\n constructor(\n @Inject(FS_2FA_VERIFICATION_PROVIDER)\n private _verificationProvider: IFsVerificationProvider,\n @Inject(MAT_DIALOG_DATA)\n private _dialogData: any,\n private _dialogRef: MatDialogRef<Fs2FaVerificationMethodsComponent>,\n ) {\n this._setActiveMethod();\n this._initMethods();\n }\n\n public compareWith(o1, o2) {\n return o1 && o2 && o1.id === o2.id\n }\n\n public setVerificationMethod = () => {\n return this._verificationProvider\n .updateVerificationMethod(this.method.id)\n .pipe(\n tap((method: IFsVerificationMethod) => {\n this._dialogRef.close(method);\n })\n );\n };\n\n private _setActiveMethod(): void {\n this.method = this._dialogData?.method;\n }\n\n private _initMethods(): void {\n this.methods$ = this._verificationProvider\n .methods()\n .pipe(\n map((methods) => {\n return methods\n .reduce((acc, method) => {\n if (!acc[method.type]) {\n acc[method.type] = [];\n }\n\n acc[method.type].push(method);\n\n return acc;\n }, {});\n }),\n shareReplay(1),\n );\n }\n}\n","<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","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { ControlContainer, NgForm } from '@angular/forms';\nimport { MatInput } from '@angular/material/input';\nimport { CodeInputComponent } from 'angular-code-input';\nimport { FsVerificationMethodType } from '../../enums/verification-method-type.enum';\n\nimport { IFsVerificationMethod } from '../../interfaces/verification-method.interface';\n\n\n@Component({\n selector: 'fs-2fa-verification-code',\n templateUrl: './2fa-verification-code.component.html',\n styleUrls: [\n './2fa-verification-code.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n viewProviders: [\n {\n provide: ControlContainer,\n useExisting: NgForm,\n },\n ],\n})\nexport class Fs2FAVerificationCodeComponent {\n\n @ViewChild(CodeInputComponent)\n public codeInputComponent: CodeInputComponent;\n\n @Input()\n public method: IFsVerificationMethod;\n\n @Input()\n public code;\n\n @Output()\n public codeChange = new EventEmitter<string>();\n\n @Output()\n public codeComplete = new EventEmitter<void>();\n\n public FsVerificationMethodType = FsVerificationMethodType;\n\n public codeChanged(code): void {\n this.code = code;\n this.codeChange.emit(this.code);\n }\n\n public codeCompleted(): void {\n this.codeComplete.emit();\n }\n\n public focus(): void {\n this.codeInputComponent.focusOnField(0);\n }\n\n}\n","<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)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted()\">\n </code-input> \n</ng-template> ","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n ViewChild,\n} from '@angular/core';\n\nimport { FsDialog } from '@firestitch/dialog';\n\nimport { filter, takeUntil, tap } from 'rxjs/operators';\n\nimport { IFsVerificationMethod } from '../../interfaces/verification-method.interface';\nimport { Fs2FaVerificationMethodsComponent } from '../2fa-verification-methods/2fa-verification-methods.component';\nimport { Subject } from 'rxjs';\nimport { FS_2FA_VERIFICATION_PROVIDER } from '../../tokens/verification.token';\nimport { IFsVerificationProvider } from '../../interfaces/verification-provider.interface';\nimport { FsVerificationMethodType } from '../../enums/verification-method-type.enum';\nimport { Fs2FAVerificationCodeComponent } from '../2fa-verification-code/2fa-verification-code.component';\nimport { NgControl, NgForm } from '@angular/forms';\n\n\n@Component({\n selector: 'fs-2fa-verification',\n templateUrl: './2fa-verification.component.html',\n styleUrls: [\n './2fa-verification.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Fs2FAVerificationComponent implements OnDestroy, AfterViewInit {\n\n @ViewChild(Fs2FAVerificationCodeComponent)\n public verificationCodeComponent: Fs2FAVerificationCodeComponent;\n\n @Input()\n public method: IFsVerificationMethod;\n\n @Output()\n public verified = new EventEmitter<unknown>();\n\n public resendInProgress = false;\n public code = '';\n public trustedDevice = true;\n public FsVerificationMethodType = FsVerificationMethodType;\n\n private _destroy$ = new Subject<void>();\n\n constructor(\n @Inject(FS_2FA_VERIFICATION_PROVIDER)\n public verificationProvider: IFsVerificationProvider,\n private _cdRef: ChangeDetectorRef,\n private _dialog: FsDialog,\n @Optional() private _form: NgForm,\n ) {\n }\n\n public ngOnDestroy(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n\n public verify = () => {\n return this.verificationProvider\n .verify(this.code, this.trustedDevice)\n .pipe(\n tap((response) => {\n this.verified.emit(response);\n }),\n );\n };\n\n public ngAfterViewInit(): void {\n this.verificationCodeComponent.focus(); \n }\n\n public codeChange(code: string): void {\n this.code = code;\n }\n\n public codeComplete(): void {\n if(this._form) {\n this._form.ngSubmit.next();\n }\n }\n\n public resend(): void {\n this.resendInProgress = true;\n this.code = '';\n \n this.verificationProvider\n .resend()\n .pipe(\n takeUntil(this._destroy$),\n )\n .subscribe(() => {\n this.resendInProgress = false; \n this._cdRef.markForCheck();\n })\n }\n\n public showVerificationMethods(): void {\n this._dialog.open(\n Fs2FaVerificationMethodsComponent,\n {\n data: {\n method: this.method,\n }\n }\n )\n .afterClosed()\n .pipe(\n filter((method) => !!method),\n )\n .subscribe((method) => {\n this.method = method;\n this.code = '';\n\n this._cdRef.markForCheck();\n\n setTimeout(() => {\n this.verificationCodeComponent.focus();\n });\n });\n }\n\n}\n","<div class=\"code-container\">\n <fs-2fa-verification-code\n [method]=\"method\"\n [code]=\"code\"\n (codeChange)=\"codeChange($event)\"\n (codeComplete)=\"codeComplete()\">\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>","import { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\n\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\n\nimport { FsFormModule } from '@firestitch/form';\nimport { FsSkeletonModule } from '@firestitch/skeleton';\nimport { FsRadioGroupModule } from '@firestitch/radiogroup';\nimport { FsDialogModule } from '@firestitch/dialog';\n\nimport { CodeInputModule } from 'angular-code-input';\n\nimport { Fs2FAVerificationComponent } from './components/2fa-verification/2fa-verification.component';\nimport { Fs2FAVerificationCodeComponent } from './components/2fa-verification-code/2fa-verification-code.component';\nimport { Fs2FaVerificationMethodsComponent } from './components/2fa-verification-methods/2fa-verification-methods.component';\n\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n\n MatFormFieldModule,\n MatInputModule,\n MatButtonModule,\n\n FsFormModule,\n FsRadioGroupModule,\n FsDialogModule,\n\n CodeInputModule,\n MatCheckboxModule,\n MatProgressSpinnerModule,\n FsSkeletonModule,\n FsSkeletonModule,\n MatIconModule,\n MatRadioModule,\n ],\n declarations: [\n Fs2FAVerificationComponent,\n Fs2FAVerificationCodeComponent,\n Fs2FaVerificationMethodsComponent,\n ],\n exports: [\n Fs2FAVerificationComponent,\n ],\n providers: [],\n})\nexport class Fs2FaModule {}\n","/*\n * Public API Surface of fs-2fa\n */\n\nexport { Fs2FaModule } from './app/fs-2fa.module';\n\n// Components\nexport { Fs2FAVerificationComponent } from './app/components/2fa-verification/2fa-verification.component';\n\nexport { IFsVerificationProvider } from './app/interfaces/verification-provider.interface';\nexport { IFsVerificationMethod } from './app/interfaces/verification-method.interface';\n\nexport { FsVerificationMethodType } from './app/enums/verification-method-type.enum';\n\nexport { FS_2FA_VERIFICATION_PROVIDER } from './app/tokens/verification.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAIa,4BAA4B,GAAG,IAAI,cAAc,CAC5D,mCAAmC;;ICLzB;AAAZ,WAAY,wBAAwB;IAClC,uCAAW,CAAA;IACX,2CAAe,CAAA;IACf,uCAAW,CAAA;AACb,CAAC,EAJW,wBAAwB,KAAxB,wBAAwB;;MCwBvB,iCAAiC;IAQ5C,YAEU,qBAA8C,EAE9C,WAAgB,EAChB,UAA2D;QAH3D,0BAAqB,GAArB,qBAAqB,CAAyB;QAE9C,gBAAW,GAAX,WAAW,CAAK;QAChB,eAAU,GAAV,UAAU,CAAiD;QAPrD,2BAAsB,GAAG,wBAAwB,CAAC;QAiB3D,0BAAqB,GAAG;YAC7B,OAAO,IAAI,CAAC,qBAAqB;iBAC9B,wBAAwB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;iBACxC,IAAI,CACH,GAAG,CAAC,CAAC,MAA6B;gBAChC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;aAC/B,CAAC,CACH,CAAC;SACL,CAAC;QAhBA,IAAI,CAAC,gBA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AAc;SACf;4FAWU,WAAW;kBA/BvB,QAAQ;mBAAC;oBACR,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBAEX,kBAAkB;wBAClB,cAAc;wBACd,eAAe;wBAEf,YAAY;wBACZ,kBAAkB;wBAClB,cAAc;wBAEd,eAAe;wBACf,iBAAiB;wBACjB,wBAAwB;wBACxB,gBAAgB;wBAChB,gBAAgB;wBAChB,aAAa;wBACb,cAAc;qBACf;oBACD,YAAY,EAAE;wBACZ,0BAA0B;wBAC1B,8BAA8B;wBAC9B,iCAAiC;qBAClC;oBACD,OAAO,EAAE;wBACP,0BAA0B;qBAC3B;oBACD,SAAS,EAAE,EAAE;iBACd;;;ACtDD;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"firestitch-2fa.js","sources":["../../src/app/tokens/verification.token.ts","../../src/app/enums/verification-method-type.enum.ts","../../src/app/components/2fa-verification-methods/2fa-verification-methods.component.ts","../../src/app/components/2fa-verification-methods/2fa-verification-methods.component.html","../../src/app/components/2fa-verification-code/2fa-verification-code.component.ts","../../src/app/components/2fa-verification-code/2fa-verification-code.component.html","../../src/app/components/2fa-verification/2fa-verification.component.ts","../../src/app/components/2fa-verification/2fa-verification.component.html","../../src/app/fs-2fa.module.ts","../../src/public_api.ts","../../src/firestitch-2fa.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nimport { IFsVerificationProvider } from '../interfaces/verification-provider.interface';\n\nexport const FS_2FA_VERIFICATION_PROVIDER = new InjectionToken<IFsVerificationProvider>(\n 'Provider for Verification service',\n);\n","export enum FsVerificationMethodType {\n Sms = 'sms',\n Email = 'email',\n App = 'app',\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n Inject,\n} from '@angular/core';\n\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\n\nimport { Observable } from 'rxjs';\nimport { map, shareReplay, tap } from 'rxjs/operators';\n\nimport { FS_2FA_VERIFICATION_PROVIDER } from '../../tokens/verification.token';\nimport { FsVerificationMethodType } from '../../enums/verification-method-type.enum';\nimport { IFsVerificationProvider } from '../../interfaces/verification-provider.interface';\nimport { IFsVerificationMethod } from '../../interfaces/verification-method.interface';\n\n\n@Component({\n templateUrl: './2fa-verification-methods.component.html',\n styleUrls: [\n './2fa-verification-methods.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Fs2FaVerificationMethodsComponent {\n\n public method: IFsVerificationMethod;\n public phone: string;\n public code: string;\n public methods$: Observable<Record<string, IFsVerificationMethod[]>>;\n public readonly verificationMethodType = FsVerificationMethodType;\n\n constructor(\n @Inject(FS_2FA_VERIFICATION_PROVIDER)\n private _verificationProvider: IFsVerificationProvider,\n @Inject(MAT_DIALOG_DATA)\n private _dialogData: any,\n private _dialogRef: MatDialogRef<Fs2FaVerificationMethodsComponent>,\n ) {\n this._setActiveMethod();\n this._initMethods();\n }\n\n public compareWith(o1, o2) {\n return o1 && o2 && o1.id === o2.id\n }\n\n public setVerificationMethod = () => {\n return this._verificationProvider\n .updateVerificationMethod(this.method.id)\n .pipe(\n tap((method: IFsVerificationMethod) => {\n this._dialogRef.close(method);\n })\n );\n };\n\n private _setActiveMethod(): void {\n this.method = this._dialogData?.method;\n }\n\n private _initMethods(): void {\n this.methods$ = this._verificationProvider\n .methods()\n .pipe(\n map((methods) => {\n return methods\n .reduce((acc, method) => {\n if (!acc[method.type]) {\n acc[method.type] = [];\n }\n\n acc[method.type].push(method);\n\n return acc;\n }, {});\n }),\n shareReplay(1),\n );\n }\n}\n","<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","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { ControlContainer, NgForm } from '@angular/forms';\nimport { CodeInputComponent } from 'angular-code-input';\nimport { FsVerificationMethodType } from '../../enums/verification-method-type.enum';\n\nimport { IFsVerificationMethod } from '../../interfaces/verification-method.interface';\n\n\n@Component({\n selector: 'fs-2fa-verification-code',\n templateUrl: './2fa-verification-code.component.html',\n styleUrls: [\n './2fa-verification-code.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n viewProviders: [\n {\n provide: ControlContainer,\n useExisting: NgForm,\n },\n ],\n})\nexport class Fs2FAVerificationCodeComponent {\n\n @ViewChild(CodeInputComponent)\n public codeInputComponent: CodeInputComponent;\n\n @Input()\n public method: IFsVerificationMethod;\n\n @Input()\n public code;\n\n @Output()\n public codeChanged = new EventEmitter<string>();\n\n @Output()\n public codeCompleted = new EventEmitter<void>();\n\n public FsVerificationMethodType = FsVerificationMethodType;\n\n public codeChange(code): void {\n this.code = code;\n this.codeChanged.emit(this.code);\n }\n\n public focus(): void {\n this.codeInputComponent.focusOnField(0);\n }\n\n}\n","<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> ","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\n\nimport { FsDialog } from '@firestitch/dialog';\n\nimport { filter, takeUntil, tap } from 'rxjs/operators';\n\nimport { IFsVerificationMethod } from '../../interfaces/verification-method.interface';\nimport { Fs2FaVerificationMethodsComponent } from '../2fa-verification-methods/2fa-verification-methods.component';\nimport { Subject } from 'rxjs';\nimport { FS_2FA_VERIFICATION_PROVIDER } from '../../tokens/verification.token';\nimport { IFsVerificationProvider } from '../../interfaces/verification-provider.interface';\nimport { FsVerificationMethodType } from '../../enums/verification-method-type.enum';\nimport { Fs2FAVerificationCodeComponent } from '../2fa-verification-code/2fa-verification-code.component';\n\n\n@Component({\n selector: 'fs-2fa-verification',\n templateUrl: './2fa-verification.component.html',\n styleUrls: [\n './2fa-verification.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Fs2FAVerificationComponent implements OnDestroy, AfterViewInit, OnInit {\n\n @ViewChild(Fs2FAVerificationCodeComponent)\n public verificationCodeComponent: Fs2FAVerificationCodeComponent;\n\n @Input()\n public method: IFsVerificationMethod;\n\n @Output()\n public verified = new EventEmitter<unknown>();\n\n @Output()\n public codeChanged = new EventEmitter<unknown>();\n\n @Output()\n public codeCompleted = new EventEmitter<unknown>();\n\n public resendInProgress = false;\n public code = '';\n public trustedDevice = true;\n public FsVerificationMethodType = FsVerificationMethodType;\n\n private _destroy$ = new Subject<void>();\n\n constructor(\n @Inject(FS_2FA_VERIFICATION_PROVIDER)\n public verificationProvider: IFsVerificationProvider,\n private _cdRef: ChangeDetectorRef,\n private _dialog: FsDialog,\n ) {\n }\n\n public ngOnInit(): void {\n this.codeChanged\n .pipe(\n takeUntil(this._destroy$),\n )\n .subscribe((code: string) => {\n this.code = code;\n });\n }\n\n public ngOnDestroy(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n\n public verify() {\n this.verificationProvider\n .verify(this.code, this.trustedDevice)\n .subscribe((response) => {\n this.verified.emit(response);\n });\n };\n\n public ngAfterViewInit(): void {\n this.verificationCodeComponent.focus(); \n }\n\n public resend(): void {\n this.resendInProgress = true;\n this.code = '';\n\n this.verificationProvider\n .resend()\n .pipe(\n takeUntil(this._destroy$),\n )\n .subscribe(() => {\n this.resendInProgress = false; \n this._cdRef.markForCheck();\n })\n }\n\n public showVerificationMethods(): void {\n this._dialog.open(\n Fs2FaVerificationMethodsComponent,\n {\n data: {\n method: this.method,\n }\n }\n )\n .afterClosed()\n .pipe(\n filter((method) => !!method),\n )\n .subscribe((method) => {\n this.method = method;\n this.code = '';\n\n this._cdRef.markForCheck();\n\n setTimeout(() => {\n this.verificationCodeComponent.focus();\n });\n });\n }\n\n}\n","<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>","import { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\n\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\n\nimport { FsFormModule } from '@firestitch/form';\nimport { FsSkeletonModule } from '@firestitch/skeleton';\nimport { FsRadioGroupModule } from '@firestitch/radiogroup';\nimport { FsDialogModule } from '@firestitch/dialog';\n\nimport { CodeInputModule } from 'angular-code-input';\n\nimport { Fs2FAVerificationComponent } from './components/2fa-verification/2fa-verification.component';\nimport { Fs2FAVerificationCodeComponent } from './components/2fa-verification-code/2fa-verification-code.component';\nimport { Fs2FaVerificationMethodsComponent } from './components/2fa-verification-methods/2fa-verification-methods.component';\n\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n\n MatFormFieldModule,\n MatInputModule,\n MatButtonModule,\n\n FsFormModule,\n FsRadioGroupModule,\n FsDialogModule,\n\n CodeInputModule,\n MatCheckboxModule,\n MatProgressSpinnerModule,\n FsSkeletonModule,\n FsSkeletonModule,\n MatIconModule,\n MatRadioModule,\n ],\n declarations: [\n Fs2FAVerificationComponent,\n Fs2FAVerificationCodeComponent,\n Fs2FaVerificationMethodsComponent,\n ],\n exports: [\n Fs2FAVerificationComponent,\n ],\n providers: [],\n})\nexport class Fs2FaModule {}\n","/*\n * Public API Surface of fs-2fa\n */\n\nexport { Fs2FaModule } from './app/fs-2fa.module';\n\n// Components\nexport { Fs2FAVerificationComponent } from './app/components/2fa-verification/2fa-verification.component';\n\nexport { IFsVerificationProvider } from './app/interfaces/verification-provider.interface';\nexport { IFsVerificationMethod } from './app/interfaces/verification-method.interface';\n\nexport { FsVerificationMethodType } from './app/enums/verification-method-type.enum';\n\nexport { FS_2FA_VERIFICATION_PROVIDER } from './app/tokens/verification.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAIa,4BAA4B,GAAG,IAAI,cAAc,CAC5D,mCAAmC;;ICLzB;AAAZ,WAAY,wBAAwB;IAClC,uCAAW,CAAA;IACX,2CAAe,CAAA;IACf,uCAAW,CAAA;AACb,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;yGAAX,WAAW;0GAAX,WAAW,iBATpB,0BAA0B;QAC1B,8BAA8B;QAC9B,iCAAiC,aAtBjC,YAAY;QACZ,WAAW;QAEX,kBAAkB;QAClB,cAAc;QACd,eAAe;QAEf,YAAY;QACZ,kBAAkB;QAClB,cAAc;QAEd,eAAe;QACf,iBAAiB;QACjB,wBAAwB;QACxB,gBAAgB;QAChB,gBAAgB;QAChB,aAAa;QACb,cAAc,aAQd,0BAA0B;0GAIjB,WAAW,aAFX,EAAE,YA5BJ;YACP,YAAY;YACZ,WAAW;YAEX,kBAAkB;YAClB,cAAc;YACd,eAAe;YAEf,YAAY;YACZ,kBAAkB;YAClB,cAAc;YAEd,eAAe;YACf,iBAAiB;YACjB,wBAAwB;YACxB,gBAAgB;YAChB,gBAAgB;YAChB,aAAa;YACb,cAAc;SACf;4FAWU,WAAW;kBA/BvB,QAAQ;mBAAC;oBACR,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBAEX,kBAAkB;wBAClB,cAAc;wBACd,eAAe;wBAEf,YAAY;wBACZ,kBAAkB;wBAClB,cAAc;wBAEd,eAAe;wBACf,iBAAiB;wBACjB,wBAAwB;wBACxB,gBAAgB;wBAChB,gBAAgB;wBAChB,aAAa;wBACb,cAAc;qBACf;oBACD,YAAY,EAAE;wBACZ,0BAA0B;wBAC1B,8BAA8B;wBAC9B,iCAAiC;qBAClC;oBACD,OAAO,EAAE;wBACP,0BAA0B;qBAC3B;oBACD,SAAS,EAAE,EAAE;iBACd;;;ACtDD;;;;ACAA;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestitch/2fa",
3
- "version": "12.0.7",
3
+ "version": "12.0.10",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/Firestitch/ngx-2fa"