@firestitch/2fa 12.0.5 → 12.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -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('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', '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.rxjs.operators, global.ng.material.dialog, global.rxjs));
|
|
5
|
-
})(this, (function (exports, i0, i7, i10, i4, i5,
|
|
5
|
+
})(this, (function (exports, i0, i7, i10, i4, i5, i6, i1$2, i3$1, i4$1, i5$1, i8, i9, i3, i1$1, operators, i1, rxjs) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
|
|
28
28
|
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
29
29
|
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
30
|
-
var
|
|
30
|
+
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
31
31
|
var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
|
|
32
32
|
var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
|
|
33
33
|
var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
|
|
34
|
-
var
|
|
34
|
+
var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
|
|
35
35
|
var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
|
|
36
36
|
var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
|
|
37
37
|
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
return Fs2FaVerificationMethodsComponent;
|
|
90
90
|
}());
|
|
91
91
|
Fs2FaVerificationMethodsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2FaVerificationMethodsComponent, deps: [{ token: FS_2FA_VERIFICATION_PROVIDER }, { token: i1.MAT_DIALOG_DATA }, { token: i1__namespace.MatDialogRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
92
|
-
Fs2FaVerificationMethodsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FaVerificationMethodsComponent, selector: "ng-component", ngImport: i0__namespace, template: "<fs-dialog>\n <h1 mat-dialog-title>\n Verification Methods\n </h1>\n <form fsForm [submit]=\"setVerificationMethod\" [dirtySubmitButton]=\"false\">\n <mat-dialog-content>\n <ng-container *fsSkeleton=\"methods$ | async as methods\">\n <fs-radio-group [(ngModel)]=\"method\" name=\"method\" [compareWith]=\"compareWith\">\n <ng-container *ngFor=\"let methodMap of methods | keyvalue\">\n <div class=\"method\">\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n smartphone\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Text Message</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following mobile number\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n mail\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Email</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following email\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n {{ method.phoneNumber }}\n </mat-radio-button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n {{ method.email }}\n </mat-radio-button>\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n </fs-radio-group>\n </ng-container>\n </mat-dialog-content>\n <mat-dialog-actions>\n <div class=\"actions\">\n <ng-container *ngIf=\"methods$ | async\">\n <button mat-button type=\"submit\" color=\"primary\">Next</button>\n </ng-container>\n <button mat-button type=\"button\" [mat-dialog-close]=\"null\">Cancel</button>\n </div>\n </mat-dialog-actions>\n </form>\n</fs-dialog>\n", styles: [".method{display:block;margin-bottom:20px}.method .method-header{display:flex;align-items:flex-start}.method .method-header .method-name{margin-left:10px}.method .method-header .method-name .method-title{font-size:14px;font-weight:400}.method .method-header .method-name .method-subtitle{font-size:12px;color:#a3a3a3}.method .method-item{display:block;margin:10px 0 0 35px}\n"], components: [{ type: i1__namespace$1.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3__namespace.FsRadioGroupComponent, selector: "fs-radio-group", inputs: ["orientation", "radioPosition", "compareWith", "required", "disabled", "label", "name"] }, { type: i4__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i5__namespace.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { type:
|
|
92
|
+
Fs2FaVerificationMethodsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FaVerificationMethodsComponent, selector: "ng-component", ngImport: i0__namespace, template: "<fs-dialog>\n <h1 mat-dialog-title>\n Verification Methods\n </h1>\n <form fsForm [submit]=\"setVerificationMethod\" [dirtySubmitButton]=\"false\">\n <mat-dialog-content>\n <ng-container *fsSkeleton=\"methods$ | async as methods\">\n <fs-radio-group [(ngModel)]=\"method\" name=\"method\" [compareWith]=\"compareWith\">\n <ng-container *ngFor=\"let methodMap of methods | keyvalue\">\n <div class=\"method\">\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n smartphone\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Text Message</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following mobile number\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n mail\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Email</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following email\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n {{ method.phoneNumber }}\n </mat-radio-button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n {{ method.email }}\n </mat-radio-button>\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n </fs-radio-group>\n </ng-container>\n </mat-dialog-content>\n <mat-dialog-actions>\n <div class=\"actions\">\n <ng-container *ngIf=\"methods$ | async\">\n <button mat-button type=\"submit\" color=\"primary\">Next</button>\n </ng-container>\n <button mat-button type=\"button\" [mat-dialog-close]=\"null\">Cancel</button>\n </div>\n </mat-dialog-actions>\n </form>\n</fs-dialog>\n", styles: [".method{display:block;margin-bottom:20px}.method .method-header{display:flex;align-items:flex-start}.method .method-header .method-name{margin-left:10px}.method .method-header .method-name .method-title{font-size:14px;font-weight:400}.method .method-header .method-name .method-subtitle{font-size:12px;color:#a3a3a3}.method .method-item{display:block;margin:10px 0 0 35px}\n"], components: [{ type: i1__namespace$1.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3__namespace.FsRadioGroupComponent, selector: "fs-radio-group", inputs: ["orientation", "radioPosition", "compareWith", "required", "disabled", "label", "name"] }, { type: i4__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i5__namespace.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { type: i6__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i7__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i7__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i7__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i8__namespace.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "successDelay", "errorDelay", "submit", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i9__namespace.ɵa, selector: "[fsSkeleton]", inputs: ["fsSkeletonPattern", "fsSkeleton"] }, { type: i7__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i10__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8__namespace.ɵw, selector: "button[type=\"submit\"]", inputs: ["dirtySubmit", "name"] }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "async": i10__namespace.AsyncPipe, "keyvalue": i10__namespace.KeyValuePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
93
93
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2FaVerificationMethodsComponent, decorators: [{
|
|
94
94
|
type: i0.Component,
|
|
95
95
|
args: [{
|
|
@@ -234,7 +234,7 @@
|
|
|
234
234
|
return Fs2FAVerificationComponent;
|
|
235
235
|
}());
|
|
236
236
|
Fs2FAVerificationComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2FAVerificationComponent, deps: [{ token: FS_2FA_VERIFICATION_PROVIDER }, { token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace$1.FsDialog }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
237
|
-
Fs2FAVerificationComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FAVerificationComponent, selector: "fs-2fa-verification", inputs: { method: "method" }, outputs: { verified: "verified", backToSignIn: "backToSignIn" }, ngImport: i0__namespace, template: "<form fsForm [submit]=\"verify\" [dirtySubmitButton]=\"false\">\n <h2>2-Step Verification</h2>\n\n <div class=\"code-container\">\n <ng-container *ngIf=\"method.type === 'authenticator' else code\">\n <fs-2fa-verification-otp class=\"otp\"></fs-2fa-verification-otp>\n </ng-container>\n\n <ng-template #code>\n <fs-2fa-verification-code\n [method]=\"method\"\n (codeChange)=\"codeChanged($event)\">\n </fs-2fa-verification-code>\n </ng-template>\n </div>\n\n <div class=\"additional\">\n <mat-checkbox\n name=\"trust-device\"\n [(ngModel)]=\"trustedDevice\">\n Trust this device\n </mat-checkbox>\n\n <span
|
|
237
|
+
Fs2FAVerificationComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FAVerificationComponent, selector: "fs-2fa-verification", inputs: { method: "method" }, outputs: { verified: "verified", backToSignIn: "backToSignIn" }, ngImport: i0__namespace, template: "<form fsForm [submit]=\"verify\" [dirtySubmitButton]=\"false\">\n <h2>2-Step Verification</h2>\n\n <div class=\"code-container\">\n <ng-container *ngIf=\"method.type === 'authenticator' else code\">\n <fs-2fa-verification-otp class=\"otp\"></fs-2fa-verification-otp>\n </ng-container>\n\n <ng-template #code>\n <fs-2fa-verification-code\n [method]=\"method\"\n (codeChange)=\"codeChanged($event)\">\n </fs-2fa-verification-code>\n </ng-template>\n </div>\n\n <div class=\"additional\">\n <mat-checkbox\n name=\"trust-device\"\n [(ngModel)]=\"trustedDevice\">\n Trust this device\n </mat-checkbox>\n\n <span class=\"resend-code-btn\">\n <ng-container *ngIf=\"!resendInProgress else sending\">\n <a (click)=\"resend()\">\n Resend Code\n </a>\n </ng-container>\n <ng-template #sending>\n <mat-spinner [diameter]=\"12\"></mat-spinner> Sending\n </ng-template>\n </span>\n </div>\n\n <div class=\"actions\">\n <button mat-raised-button\n color=\"primary\"\n type=\"submit\">\n Verify\n </button>\n\n <button mat-button type=\"button\" (click)=\"showVerificationMethods()\">\n Try other ways to verify\n </button>\n\n <button mat-button type=\"button\" (click)=\"toSignIn()\">\n Back to signin\n </button>\n </div>\n</form>\n", styles: [":host{display:block}h2,.code-container{text-align:center}.code-container .otp{margin-bottom:15px}:host ::ng-deep .actions{margin:10px 0}:host ::ng-deep .actions a{width:100%;font-weight:400}:host ::ng-deep .actions button{width:100%;margin-bottom:5px}:host ::ng-deep .actions button[type=button]{font-weight:400}.additional{display:flex;justify-content:space-between;align-items:baseline;margin-top:-5px}.additional .resend-code-btn{cursor:pointer;text-transform:none}.additional .resend-code-btn mat-spinner{display:inline-block;vertical-align:middle}\n"], components: [{ type: Fs2FAVerificationOTPComponent, selector: "fs-2fa-verification-otp", outputs: ["codeChange"] }, { type: Fs2FAVerificationSMSComponent, selector: "fs-2fa-verification-code", inputs: ["method"], outputs: ["codeChange"] }, { type: i4__namespace$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i5__namespace$1.MatSpinner, selector: "mat-spinner", inputs: ["color"] }, { type: i6__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i7__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i7__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i7__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i8__namespace.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "successDelay", "errorDelay", "submit", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i8__namespace.ɵw, selector: "button[type=\"submit\"]", inputs: ["dirtySubmit", "name"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
238
238
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2FAVerificationComponent, decorators: [{
|
|
239
239
|
type: i0.Component,
|
|
240
240
|
args: [{
|
|
@@ -271,13 +271,13 @@
|
|
|
271
271
|
i7.FormsModule,
|
|
272
272
|
i1$2.MatFormFieldModule,
|
|
273
273
|
i3$1.MatInputModule,
|
|
274
|
-
|
|
274
|
+
i6.MatButtonModule,
|
|
275
275
|
i8.FsFormModule,
|
|
276
276
|
i3.FsRadioGroupModule,
|
|
277
277
|
i1$1.FsDialogModule,
|
|
278
278
|
// CodeInputModule,
|
|
279
279
|
i4$1.MatCheckboxModule,
|
|
280
|
-
|
|
280
|
+
i5$1.MatProgressSpinnerModule,
|
|
281
281
|
i9.FsSkeletonModule,
|
|
282
282
|
i9.FsSkeletonModule,
|
|
283
283
|
i4.MatIconModule,
|
|
@@ -287,13 +287,13 @@
|
|
|
287
287
|
i7.FormsModule,
|
|
288
288
|
i1$2.MatFormFieldModule,
|
|
289
289
|
i3$1.MatInputModule,
|
|
290
|
-
|
|
290
|
+
i6.MatButtonModule,
|
|
291
291
|
i8.FsFormModule,
|
|
292
292
|
i3.FsRadioGroupModule,
|
|
293
293
|
i1$1.FsDialogModule,
|
|
294
294
|
// CodeInputModule,
|
|
295
295
|
i4$1.MatCheckboxModule,
|
|
296
|
-
|
|
296
|
+
i5$1.MatProgressSpinnerModule,
|
|
297
297
|
i9.FsSkeletonModule,
|
|
298
298
|
i9.FsSkeletonModule,
|
|
299
299
|
i4.MatIconModule,
|
|
@@ -307,13 +307,13 @@
|
|
|
307
307
|
i7.FormsModule,
|
|
308
308
|
i1$2.MatFormFieldModule,
|
|
309
309
|
i3$1.MatInputModule,
|
|
310
|
-
|
|
310
|
+
i6.MatButtonModule,
|
|
311
311
|
i8.FsFormModule,
|
|
312
312
|
i3.FsRadioGroupModule,
|
|
313
313
|
i1$1.FsDialogModule,
|
|
314
314
|
// CodeInputModule,
|
|
315
315
|
i4$1.MatCheckboxModule,
|
|
316
|
-
|
|
316
|
+
i5$1.MatProgressSpinnerModule,
|
|
317
317
|
i9.FsSkeletonModule,
|
|
318
318
|
i9.FsSkeletonModule,
|
|
319
319
|
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-otp/2fa-verification-otp.component.ts","../../src/app/components/2fa-verification-otp/2fa-verification-otp.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 Authenticator = 'authenticator',\n Code = 'code',\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 smartphone\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Text Message</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following mobile number\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n mail\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Email</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following email\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n {{ method.phoneNumber }}\n </mat-radio-button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n {{ method.email }}\n </mat-radio-button>\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n </fs-radio-group>\n </ng-container>\n </mat-dialog-content>\n <mat-dialog-actions>\n <div class=\"actions\">\n <ng-container *ngIf=\"methods$ | async\">\n <button mat-button type=\"submit\" color=\"primary\">Next</button>\n </ng-container>\n <button mat-button type=\"button\" [mat-dialog-close]=\"null\">Cancel</button>\n </div>\n </mat-dialog-actions>\n </form>\n</fs-dialog>\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Output,\n} from '@angular/core';\n\nimport { FsFormDirective } from '@firestitch/form';\n\n\n@Component({\n selector: 'fs-2fa-verification-otp',\n templateUrl: './2fa-verification-otp.component.html',\n styleUrls: [\n './2fa-verification-otp.component.scss'\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Fs2FAVerificationOTPComponent {\n\n @Output()\n public codeChange = new EventEmitter<string>();\n\n constructor(\n public form: FsFormDirective,\n ) {}\n\n public codeChanged(event: string): void {\n this.codeChange.emit(event);\n this.form.dirty();\n }\n\n public codeCompleted(): void {\n this.form.triggerSubmit();\n }\n}\n","<p class=\"description\">\n Enter the verification code generated by your 2 factor authenticator\n app to verify it's you\n</p>\n\n<!--\n<code-input [initialFocusField]=\"0\"\n [codeLength]=\"6\"\n (codeChanged)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted()\">>\n</code-input>\n-->\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n} from '@angular/core';\nimport { ControlContainer, NgForm } from '@angular/forms';\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 Fs2FAVerificationSMSComponent {\n\n @Input()\n public method: IFsVerificationMethod;\n\n @Output()\n public codeChange = new EventEmitter<string>();\n\n public code: string;\n\n public codeChanged(): void {\n this.codeChange.emit(this.code);\n }\n\n}\n","<p class=\"description\">\n <ng-container *ngIf=\"method.phoneNumber && method.type === 'sms'\">\n A text message with a verification code was just\n sent to <span style=\"white-space: nowrap;\">{{ method.phoneNumber }}</span> to verify it's you.\n </ng-container>\n\n <ng-container *ngIf=\"method.type === 'email'\">\n A email with a verification code was just sent to {{ method.email }} to verify it's you.\n </ng-container>\n\n <ng-container *ngIf=\"false\">\n Enter the one time code generated by the app administrator to verify it's you.\n </ng-container>\n</p>\n\n<mat-form-field>\n <mat-label>Code</mat-label>\n <input type=\"text\"\n matInput\n name=\"code\"\n autocomplete=\"one-time-code\"\n [(ngModel)]=\"code\"\n (ngModelChange)=\"codeChanged()\"\n required\n placeholder=\"Enter the code\"\n inputmode=\"numeric\">\n</mat-form-field>\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n Output,\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';\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 {\n\n @Input()\n public method: IFsVerificationMethod;\n\n @Output()\n public verified = new EventEmitter<unknown>();\n\n @Output()\n public backToSignIn = new EventEmitter<void>();\n\n\n public resendInProgress = false;\n public trustedDevice = false;\n\n private _code: string;\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 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 codeChanged(code: string): void {\n this._code = code;\n }\n\n public resend(): void {\n this.resendInProgress = true;\n\n this.verificationProvider\n .resend()\n .pipe(\n takeUntil(this._destroy$),\n )\n .subscribe(() => {\n this.resendInProgress = false;\n\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\n this._cdRef.markForCheck();\n });\n }\n\n public toSignIn(): void {\n this.backToSignIn.emit();\n }\n\n}\n","<form fsForm [submit]=\"verify\" [dirtySubmitButton]=\"false\">\n <h2>2-Step Verification</h2>\n\n <div class=\"code-container\">\n <ng-container *ngIf=\"method.type === 'authenticator' else code\">\n <fs-2fa-verification-otp class=\"otp\"></fs-2fa-verification-otp>\n </ng-container>\n\n <ng-template #code>\n <fs-2fa-verification-code\n [method]=\"method\"\n (codeChange)=\"codeChanged($event)\">\n </fs-2fa-verification-code>\n </ng-template>\n </div>\n\n <div class=\"additional\">\n <mat-checkbox\n name=\"trust-device\"\n [(ngModel)]=\"trustedDevice\">\n Trust this device\n </mat-checkbox>\n\n <span matSuffix>\n <a mat-button\n type=\"button\"\n color=\"primary\"\n (click)=\"resend()\"\n [disabled]=\"resendInProgress\"\n class=\"resend-code-btn\">\n <ng-container *ngIf=\"!resendInProgress else sending\">\n Resend Code\n </ng-container>\n <ng-template #sending>\n <mat-spinner [diameter]=\"12\"></mat-spinner> Sending\n </ng-template>\n </a>\n </span>\n </div>\n\n <div class=\"actions\">\n <button mat-raised-button\n color=\"primary\"\n type=\"submit\">\n Verify\n </button>\n\n <button mat-button type=\"button\" (click)=\"showVerificationMethods()\">\n Try other ways to verify\n </button>\n\n <button mat-button type=\"button\" (click)=\"toSignIn()\">\n Back to signin\n </button>\n </div>\n</form>\n","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\n// import { CodeInputModule } from 'angular-code-input';\n\nimport { Fs2FAVerificationComponent } from './components/2fa-verification/2fa-verification.component';\nimport { Fs2FAVerificationSMSComponent } from './components/2fa-verification-code/2fa-verification-code.component';\nimport { Fs2FAVerificationOTPComponent } from './components/2fa-verification-otp/2fa-verification-otp.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\n Fs2FAVerificationSMSComponent,\n Fs2FAVerificationOTPComponent,\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","Output","ControlContainer","NgForm","Input","Subject","takeUntil","filter","CommonModule","FormsModule","MatFormFieldModule","MatInputModule","MatButtonModule","FsFormModule","FsRadioGroupModule","FsDialogModule","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AAE;4BACP,0BAA0B;yBAC3B;wBACD,SAAS,EAAE,EAAE;qBACd;;;ICzDD;;;;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-otp/2fa-verification-otp.component.ts","../../src/app/components/2fa-verification-otp/2fa-verification-otp.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 Authenticator = 'authenticator',\n Code = 'code',\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 smartphone\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Text Message</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following mobile number\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n mail\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Email</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following email\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n {{ method.phoneNumber }}\n </mat-radio-button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n {{ method.email }}\n </mat-radio-button>\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n </fs-radio-group>\n </ng-container>\n </mat-dialog-content>\n <mat-dialog-actions>\n <div class=\"actions\">\n <ng-container *ngIf=\"methods$ | async\">\n <button mat-button type=\"submit\" color=\"primary\">Next</button>\n </ng-container>\n <button mat-button type=\"button\" [mat-dialog-close]=\"null\">Cancel</button>\n </div>\n </mat-dialog-actions>\n </form>\n</fs-dialog>\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Output,\n} from '@angular/core';\n\nimport { FsFormDirective } from '@firestitch/form';\n\n\n@Component({\n selector: 'fs-2fa-verification-otp',\n templateUrl: './2fa-verification-otp.component.html',\n styleUrls: [\n './2fa-verification-otp.component.scss'\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Fs2FAVerificationOTPComponent {\n\n @Output()\n public codeChange = new EventEmitter<string>();\n\n constructor(\n public form: FsFormDirective,\n ) {}\n\n public codeChanged(event: string): void {\n this.codeChange.emit(event);\n this.form.dirty();\n }\n\n public codeCompleted(): void {\n this.form.triggerSubmit();\n }\n}\n","<p class=\"description\">\n Enter the verification code generated by your 2 factor authenticator\n app to verify it's you\n</p>\n\n<!--\n<code-input [initialFocusField]=\"0\"\n [codeLength]=\"6\"\n (codeChanged)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted()\">>\n</code-input>\n-->\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n} from '@angular/core';\nimport { ControlContainer, NgForm } from '@angular/forms';\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 Fs2FAVerificationSMSComponent {\n\n @Input()\n public method: IFsVerificationMethod;\n\n @Output()\n public codeChange = new EventEmitter<string>();\n\n public code: string;\n\n public codeChanged(): void {\n this.codeChange.emit(this.code);\n }\n\n}\n","<p class=\"description\">\n <ng-container *ngIf=\"method.phoneNumber && method.type === 'sms'\">\n A text message with a verification code was just\n sent to <span style=\"white-space: nowrap;\">{{ method.phoneNumber }}</span> to verify it's you.\n </ng-container>\n\n <ng-container *ngIf=\"method.type === 'email'\">\n A email with a verification code was just sent to {{ method.email }} to verify it's you.\n </ng-container>\n\n <ng-container *ngIf=\"false\">\n Enter the one time code generated by the app administrator to verify it's you.\n </ng-container>\n</p>\n\n<mat-form-field>\n <mat-label>Code</mat-label>\n <input type=\"text\"\n matInput\n name=\"code\"\n autocomplete=\"one-time-code\"\n [(ngModel)]=\"code\"\n (ngModelChange)=\"codeChanged()\"\n required\n placeholder=\"Enter the code\"\n inputmode=\"numeric\">\n</mat-form-field>\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n Output,\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';\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 {\n\n @Input()\n public method: IFsVerificationMethod;\n\n @Output()\n public verified = new EventEmitter<unknown>();\n\n @Output()\n public backToSignIn = new EventEmitter<void>();\n\n\n public resendInProgress = false;\n public trustedDevice = false;\n\n private _code: string;\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 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 codeChanged(code: string): void {\n this._code = code;\n }\n\n public resend(): void {\n this.resendInProgress = true;\n\n this.verificationProvider\n .resend()\n .pipe(\n takeUntil(this._destroy$),\n )\n .subscribe(() => {\n this.resendInProgress = false;\n\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\n this._cdRef.markForCheck();\n });\n }\n\n public toSignIn(): void {\n this.backToSignIn.emit();\n }\n\n}\n","<form fsForm [submit]=\"verify\" [dirtySubmitButton]=\"false\">\n <h2>2-Step Verification</h2>\n\n <div class=\"code-container\">\n <ng-container *ngIf=\"method.type === 'authenticator' else code\">\n <fs-2fa-verification-otp class=\"otp\"></fs-2fa-verification-otp>\n </ng-container>\n\n <ng-template #code>\n <fs-2fa-verification-code\n [method]=\"method\"\n (codeChange)=\"codeChanged($event)\">\n </fs-2fa-verification-code>\n </ng-template>\n </div>\n\n <div class=\"additional\">\n <mat-checkbox\n name=\"trust-device\"\n [(ngModel)]=\"trustedDevice\">\n Trust this device\n </mat-checkbox>\n\n <span class=\"resend-code-btn\">\n <ng-container *ngIf=\"!resendInProgress else sending\">\n <a (click)=\"resend()\">\n Resend Code\n </a>\n </ng-container>\n <ng-template #sending>\n <mat-spinner [diameter]=\"12\"></mat-spinner> Sending\n </ng-template>\n </span>\n </div>\n\n <div class=\"actions\">\n <button mat-raised-button\n color=\"primary\"\n type=\"submit\">\n Verify\n </button>\n\n <button mat-button type=\"button\" (click)=\"showVerificationMethods()\">\n Try other ways to verify\n </button>\n\n <button mat-button type=\"button\" (click)=\"toSignIn()\">\n Back to signin\n </button>\n </div>\n</form>\n","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\n// import { CodeInputModule } from 'angular-code-input';\n\nimport { Fs2FAVerificationComponent } from './components/2fa-verification/2fa-verification.component';\nimport { Fs2FAVerificationSMSComponent } from './components/2fa-verification-code/2fa-verification-code.component';\nimport { Fs2FAVerificationOTPComponent } from './components/2fa-verification-otp/2fa-verification-otp.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\n Fs2FAVerificationSMSComponent,\n Fs2FAVerificationOTPComponent,\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","Output","ControlContainer","NgForm","Input","Subject","takeUntil","filter","CommonModule","FormsModule","MatFormFieldModule","MatInputModule","MatButtonModule","FsFormModule","FsRadioGroupModule","FsDialogModule","MatCheckboxModule","MatProgressSpinnerModule","FsSkeletonModule","MatIconModule","MatRadioModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAIa,4BAA4B,GAAG,IAAIA,iBAAc,CAC5D,mCAAmC;;ACLzBC;IAAZ,WAAY,wBAAwB;QAClC,uCAAW,CAAA;QACX,2CAAe,CAAA;QAC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AAY;0BADlBA,SAAM;;;;QEoBT;;;;mIAAa,WAAW;oIAAX,WAAW,iBAXpB,0BAA0B;YAE1B,6BAA6B;YAC7B,6BAA6B;YAC7B,iCAAiC,aAxBjCO,gBAAY;YACZC,cAAW;YAEXC,uBAAkB;YAClBC,mBAAc;YACdC,kBAAe;YAEfC,eAAY;YACZC,qBAAkB;YAClBC,mBAAc;;YAGdC,sBAAiB;YACjBC,6BAAwB;YACxBC,mBAAgB;YAChBA,mBAAgB;YAChBC,gBAAa;YACbC,iBAAc,aAUd,0BAA0B;oIAIjB,WAAW,aAFX,EAAE,YA9BJ;gBACPZ,gBAAY;gBACZC,cAAW;gBAEXC,uBAAkB;gBAClBC,mBAAc;gBACdC,kBAAe;gBAEfC,eAAY;gBACZC,qBAAkB;gBAClBC,mBAAc;;gBAGdC,sBAAiB;gBACjBC,6BAAwB;gBACxBC,mBAAgB;gBAChBA,mBAAgB;gBAChBC,gBAAa;gBACbC,iBAAc;aACf;sHAaU,WAAW;sBAjCvBC,WAAQ;uBAAC;wBACR,OAAO,EAAE;4BACPb,gBAAY;4BACZC,cAAW;4BAEXC,uBAAkB;4BAClBC,mBAAc;4BACdC,kBAAe;4BAEfC,eAAY;4BACZC,qBAAkB;4BAClBC,mBAAc;;4BAGdC,sBAAiB;4BACjBC,6BAAwB;4BACxBC,mBAAgB;4BAChBA,mBAAgB;4BAChBC,gBAAa;4BACbC,iBAAc;yBACf;wBACD,YAAY,EAAE;4BACZ,0BAA0B;4BAE1B,6BAA6B;4BAC7B,6BAA6B;4BAC7B,iCAAiC;yBAClC;wBACD,OAAO,EAAE;4BACP,0BAA0B;yBAC3B;wBACD,SAAS,EAAE,EAAE;qBACd;;;ICzDD;;;;ICAA;;;;;;;;;;;;;;"}
|
|
@@ -9,12 +9,11 @@ import * as i1 from "@firestitch/dialog";
|
|
|
9
9
|
import * as i2 from "../2fa-verification-otp/2fa-verification-otp.component";
|
|
10
10
|
import * as i3 from "../2fa-verification-code/2fa-verification-code.component";
|
|
11
11
|
import * as i4 from "@angular/material/checkbox";
|
|
12
|
-
import * as i5 from "@angular/material/
|
|
13
|
-
import * as i6 from "@angular/material/
|
|
12
|
+
import * as i5 from "@angular/material/progress-spinner";
|
|
13
|
+
import * as i6 from "@angular/material/button";
|
|
14
14
|
import * as i7 from "@angular/forms";
|
|
15
15
|
import * as i8 from "@firestitch/form";
|
|
16
16
|
import * as i9 from "@angular/common";
|
|
17
|
-
import * as i10 from "@angular/material/form-field";
|
|
18
17
|
export class Fs2FAVerificationComponent {
|
|
19
18
|
constructor(verificationProvider, _cdRef, _dialog) {
|
|
20
19
|
this.verificationProvider = verificationProvider;
|
|
@@ -68,7 +67,7 @@ export class Fs2FAVerificationComponent {
|
|
|
68
67
|
}
|
|
69
68
|
}
|
|
70
69
|
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 });
|
|
71
|
-
Fs2FAVerificationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FAVerificationComponent, selector: "fs-2fa-verification", inputs: { method: "method" }, outputs: { verified: "verified", backToSignIn: "backToSignIn" }, ngImport: i0, template: "<form fsForm [submit]=\"verify\" [dirtySubmitButton]=\"false\">\n <h2>2-Step Verification</h2>\n\n <div class=\"code-container\">\n <ng-container *ngIf=\"method.type === 'authenticator' else code\">\n <fs-2fa-verification-otp class=\"otp\"></fs-2fa-verification-otp>\n </ng-container>\n\n <ng-template #code>\n <fs-2fa-verification-code\n [method]=\"method\"\n (codeChange)=\"codeChanged($event)\">\n </fs-2fa-verification-code>\n </ng-template>\n </div>\n\n <div class=\"additional\">\n <mat-checkbox\n name=\"trust-device\"\n [(ngModel)]=\"trustedDevice\">\n Trust this device\n </mat-checkbox>\n\n <span
|
|
70
|
+
Fs2FAVerificationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FAVerificationComponent, selector: "fs-2fa-verification", inputs: { method: "method" }, outputs: { verified: "verified", backToSignIn: "backToSignIn" }, ngImport: i0, template: "<form fsForm [submit]=\"verify\" [dirtySubmitButton]=\"false\">\n <h2>2-Step Verification</h2>\n\n <div class=\"code-container\">\n <ng-container *ngIf=\"method.type === 'authenticator' else code\">\n <fs-2fa-verification-otp class=\"otp\"></fs-2fa-verification-otp>\n </ng-container>\n\n <ng-template #code>\n <fs-2fa-verification-code\n [method]=\"method\"\n (codeChange)=\"codeChanged($event)\">\n </fs-2fa-verification-code>\n </ng-template>\n </div>\n\n <div class=\"additional\">\n <mat-checkbox\n name=\"trust-device\"\n [(ngModel)]=\"trustedDevice\">\n Trust this device\n </mat-checkbox>\n\n <span class=\"resend-code-btn\">\n <ng-container *ngIf=\"!resendInProgress else sending\">\n <a (click)=\"resend()\">\n Resend Code\n </a>\n </ng-container>\n <ng-template #sending>\n <mat-spinner [diameter]=\"12\"></mat-spinner> Sending\n </ng-template>\n </span>\n </div>\n\n <div class=\"actions\">\n <button mat-raised-button\n color=\"primary\"\n type=\"submit\">\n Verify\n </button>\n\n <button mat-button type=\"button\" (click)=\"showVerificationMethods()\">\n Try other ways to verify\n </button>\n\n <button mat-button type=\"button\" (click)=\"toSignIn()\">\n Back to signin\n </button>\n </div>\n</form>\n", styles: [":host{display:block}h2,.code-container{text-align:center}.code-container .otp{margin-bottom:15px}:host ::ng-deep .actions{margin:10px 0}:host ::ng-deep .actions a{width:100%;font-weight:400}:host ::ng-deep .actions button{width:100%;margin-bottom:5px}:host ::ng-deep .actions button[type=button]{font-weight:400}.additional{display:flex;justify-content:space-between;align-items:baseline;margin-top:-5px}.additional .resend-code-btn{cursor:pointer;text-transform:none}.additional .resend-code-btn mat-spinner{display:inline-block;vertical-align:middle}\n"], components: [{ type: i2.Fs2FAVerificationOTPComponent, selector: "fs-2fa-verification-otp", outputs: ["codeChange"] }, { type: i3.Fs2FAVerificationSMSComponent, selector: "fs-2fa-verification-code", inputs: ["method"], outputs: ["codeChange"] }, { 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"] }, { type: i6.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i7.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i7.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i8.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "successDelay", "errorDelay", "submit", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i8.ɵw, selector: "button[type=\"submit\"]", inputs: ["dirtySubmit", "name"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
72
71
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FAVerificationComponent, decorators: [{
|
|
73
72
|
type: Component,
|
|
74
73
|
args: [{
|
|
@@ -89,4 +88,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
89
88
|
}], backToSignIn: [{
|
|
90
89
|
type: Output
|
|
91
90
|
}] } });
|
|
92
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
91
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMmZhLXZlcmlmaWNhdGlvbi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvYXBwL2NvbXBvbmVudHMvMmZhLXZlcmlmaWNhdGlvbi8yZmEtdmVyaWZpY2F0aW9uLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL3NyYy9hcHAvY29tcG9uZW50cy8yZmEtdmVyaWZpY2F0aW9uLzJmYS12ZXJpZmljYXRpb24uY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLHVCQUF1QixFQUN2QixpQkFBaUIsRUFDakIsU0FBUyxFQUNULFlBQVksRUFDWixNQUFNLEVBQ04sS0FBSyxFQUVMLE1BQU0sR0FDUCxNQUFNLGVBQWUsQ0FBQztBQUV2QixPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFFOUMsT0FBTyxFQUFFLE1BQU0sRUFBRSxTQUFTLEVBQUUsR0FBRyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFHeEQsT0FBTyxFQUFFLGlDQUFpQyxFQUFFLE1BQU0sZ0VBQWdFLENBQUM7QUFDbkg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4gICAgICAgICAgICB0eXBlPVwic3VibWl0XCI+XG4gICAgICBWZXJpZnlcbiAgICA8L2J1dHRvbj5cblxuICAgIDxidXR0b24gbWF0LWJ1dHRvbiB0eXBlPVwiYnV0dG9uXCIgKGNsaWNrKT1cInNob3dWZXJpZmljYXRpb25NZXRob2RzKClcIj5cbiAgICAgIFRyeSBvdGhlciB3YXlzIHRvIHZlcmlmeVxuICAgIDwvYnV0dG9uPlxuXG4gICAgPGJ1dHRvbiBtYXQtYnV0dG9uIHR5cGU9XCJidXR0b25cIiAoY2xpY2spPVwidG9TaWduSW4oKVwiPlxuICAgICAgQmFjayB0byBzaWduaW5cbiAgICA8L2J1dHRvbj5cbiAgPC9kaXY+XG48L2Zvcm0+XG4iXX0=
|
|
@@ -8,7 +8,7 @@ import * as i4 from '@angular/material/icon';
|
|
|
8
8
|
import { MatIconModule } from '@angular/material/icon';
|
|
9
9
|
import * as i5 from '@angular/material/radio';
|
|
10
10
|
import { MatRadioModule } from '@angular/material/radio';
|
|
11
|
-
import * as
|
|
11
|
+
import * as i6 from '@angular/material/button';
|
|
12
12
|
import { MatButtonModule } from '@angular/material/button';
|
|
13
13
|
import * as i1$2 from '@angular/material/form-field';
|
|
14
14
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
@@ -16,7 +16,7 @@ import * as i3$1 from '@angular/material/input';
|
|
|
16
16
|
import { MatInputModule } from '@angular/material/input';
|
|
17
17
|
import * as i4$1 from '@angular/material/checkbox';
|
|
18
18
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
19
|
-
import * as
|
|
19
|
+
import * as i5$1 from '@angular/material/progress-spinner';
|
|
20
20
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
21
21
|
import * as i8 from '@firestitch/form';
|
|
22
22
|
import { FsFormModule } from '@firestitch/form';
|
|
@@ -80,7 +80,7 @@ class Fs2FaVerificationMethodsComponent {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
Fs2FaVerificationMethodsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FaVerificationMethodsComponent, deps: [{ token: FS_2FA_VERIFICATION_PROVIDER }, { token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
83
|
-
Fs2FaVerificationMethodsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FaVerificationMethodsComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog>\n <h1 mat-dialog-title>\n Verification Methods\n </h1>\n <form fsForm [submit]=\"setVerificationMethod\" [dirtySubmitButton]=\"false\">\n <mat-dialog-content>\n <ng-container *fsSkeleton=\"methods$ | async as methods\">\n <fs-radio-group [(ngModel)]=\"method\" name=\"method\" [compareWith]=\"compareWith\">\n <ng-container *ngFor=\"let methodMap of methods | keyvalue\">\n <div class=\"method\">\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n smartphone\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Text Message</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following mobile number\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n mail\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Email</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following email\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n {{ method.phoneNumber }}\n </mat-radio-button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n {{ method.email }}\n </mat-radio-button>\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n </fs-radio-group>\n </ng-container>\n </mat-dialog-content>\n <mat-dialog-actions>\n <div class=\"actions\">\n <ng-container *ngIf=\"methods$ | async\">\n <button mat-button type=\"submit\" color=\"primary\">Next</button>\n </ng-container>\n <button mat-button type=\"button\" [mat-dialog-close]=\"null\">Cancel</button>\n </div>\n </mat-dialog-actions>\n </form>\n</fs-dialog>\n", styles: [".method{display:block;margin-bottom:20px}.method .method-header{display:flex;align-items:flex-start}.method .method-header .method-name{margin-left:10px}.method .method-header .method-name .method-title{font-size:14px;font-weight:400}.method .method-header .method-name .method-subtitle{font-size:12px;color:#a3a3a3}.method .method-item{display:block;margin:10px 0 0 35px}\n"], components: [{ type: i1$1.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3.FsRadioGroupComponent, selector: "fs-radio-group", inputs: ["orientation", "radioPosition", "compareWith", "required", "disabled", "label", "name"] }, { type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i5.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { type:
|
|
83
|
+
Fs2FaVerificationMethodsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FaVerificationMethodsComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog>\n <h1 mat-dialog-title>\n Verification Methods\n </h1>\n <form fsForm [submit]=\"setVerificationMethod\" [dirtySubmitButton]=\"false\">\n <mat-dialog-content>\n <ng-container *fsSkeleton=\"methods$ | async as methods\">\n <fs-radio-group [(ngModel)]=\"method\" name=\"method\" [compareWith]=\"compareWith\">\n <ng-container *ngFor=\"let methodMap of methods | keyvalue\">\n <div class=\"method\">\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n smartphone\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Text Message</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following mobile number\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n mail\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Email</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following email\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n {{ method.phoneNumber }}\n </mat-radio-button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n {{ method.email }}\n </mat-radio-button>\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n </fs-radio-group>\n </ng-container>\n </mat-dialog-content>\n <mat-dialog-actions>\n <div class=\"actions\">\n <ng-container *ngIf=\"methods$ | async\">\n <button mat-button type=\"submit\" color=\"primary\">Next</button>\n </ng-container>\n <button mat-button type=\"button\" [mat-dialog-close]=\"null\">Cancel</button>\n </div>\n </mat-dialog-actions>\n </form>\n</fs-dialog>\n", styles: [".method{display:block;margin-bottom:20px}.method .method-header{display:flex;align-items:flex-start}.method .method-header .method-name{margin-left:10px}.method .method-header .method-name .method-title{font-size:14px;font-weight:400}.method .method-header .method-name .method-subtitle{font-size:12px;color:#a3a3a3}.method .method-item{display:block;margin:10px 0 0 35px}\n"], components: [{ type: i1$1.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3.FsRadioGroupComponent, selector: "fs-radio-group", inputs: ["orientation", "radioPosition", "compareWith", "required", "disabled", "label", "name"] }, { type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i5.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { type: i6.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i7.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i7.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i8.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "successDelay", "errorDelay", "submit", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i9.ɵa, selector: "[fsSkeleton]", inputs: ["fsSkeletonPattern", "fsSkeleton"] }, { type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i10.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.ɵw, selector: "button[type=\"submit\"]", inputs: ["dirtySubmit", "name"] }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "async": i10.AsyncPipe, "keyvalue": i10.KeyValuePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
84
84
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FaVerificationMethodsComponent, decorators: [{
|
|
85
85
|
type: Component,
|
|
86
86
|
args: [{
|
|
@@ -217,7 +217,7 @@ class Fs2FAVerificationComponent {
|
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
Fs2FAVerificationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FAVerificationComponent, deps: [{ token: FS_2FA_VERIFICATION_PROVIDER }, { token: i0.ChangeDetectorRef }, { token: i1$1.FsDialog }], target: i0.ɵɵFactoryTarget.Component });
|
|
220
|
-
Fs2FAVerificationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FAVerificationComponent, selector: "fs-2fa-verification", inputs: { method: "method" }, outputs: { verified: "verified", backToSignIn: "backToSignIn" }, ngImport: i0, template: "<form fsForm [submit]=\"verify\" [dirtySubmitButton]=\"false\">\n <h2>2-Step Verification</h2>\n\n <div class=\"code-container\">\n <ng-container *ngIf=\"method.type === 'authenticator' else code\">\n <fs-2fa-verification-otp class=\"otp\"></fs-2fa-verification-otp>\n </ng-container>\n\n <ng-template #code>\n <fs-2fa-verification-code\n [method]=\"method\"\n (codeChange)=\"codeChanged($event)\">\n </fs-2fa-verification-code>\n </ng-template>\n </div>\n\n <div class=\"additional\">\n <mat-checkbox\n name=\"trust-device\"\n [(ngModel)]=\"trustedDevice\">\n Trust this device\n </mat-checkbox>\n\n <span
|
|
220
|
+
Fs2FAVerificationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FAVerificationComponent, selector: "fs-2fa-verification", inputs: { method: "method" }, outputs: { verified: "verified", backToSignIn: "backToSignIn" }, ngImport: i0, template: "<form fsForm [submit]=\"verify\" [dirtySubmitButton]=\"false\">\n <h2>2-Step Verification</h2>\n\n <div class=\"code-container\">\n <ng-container *ngIf=\"method.type === 'authenticator' else code\">\n <fs-2fa-verification-otp class=\"otp\"></fs-2fa-verification-otp>\n </ng-container>\n\n <ng-template #code>\n <fs-2fa-verification-code\n [method]=\"method\"\n (codeChange)=\"codeChanged($event)\">\n </fs-2fa-verification-code>\n </ng-template>\n </div>\n\n <div class=\"additional\">\n <mat-checkbox\n name=\"trust-device\"\n [(ngModel)]=\"trustedDevice\">\n Trust this device\n </mat-checkbox>\n\n <span class=\"resend-code-btn\">\n <ng-container *ngIf=\"!resendInProgress else sending\">\n <a (click)=\"resend()\">\n Resend Code\n </a>\n </ng-container>\n <ng-template #sending>\n <mat-spinner [diameter]=\"12\"></mat-spinner> Sending\n </ng-template>\n </span>\n </div>\n\n <div class=\"actions\">\n <button mat-raised-button\n color=\"primary\"\n type=\"submit\">\n Verify\n </button>\n\n <button mat-button type=\"button\" (click)=\"showVerificationMethods()\">\n Try other ways to verify\n </button>\n\n <button mat-button type=\"button\" (click)=\"toSignIn()\">\n Back to signin\n </button>\n </div>\n</form>\n", styles: [":host{display:block}h2,.code-container{text-align:center}.code-container .otp{margin-bottom:15px}:host ::ng-deep .actions{margin:10px 0}:host ::ng-deep .actions a{width:100%;font-weight:400}:host ::ng-deep .actions button{width:100%;margin-bottom:5px}:host ::ng-deep .actions button[type=button]{font-weight:400}.additional{display:flex;justify-content:space-between;align-items:baseline;margin-top:-5px}.additional .resend-code-btn{cursor:pointer;text-transform:none}.additional .resend-code-btn mat-spinner{display:inline-block;vertical-align:middle}\n"], components: [{ type: Fs2FAVerificationOTPComponent, selector: "fs-2fa-verification-otp", outputs: ["codeChange"] }, { type: Fs2FAVerificationSMSComponent, selector: "fs-2fa-verification-code", inputs: ["method"], outputs: ["codeChange"] }, { type: i4$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i5$1.MatSpinner, selector: "mat-spinner", inputs: ["color"] }, { type: i6.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i7.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i7.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i8.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "successDelay", "errorDelay", "submit", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i8.ɵw, selector: "button[type=\"submit\"]", inputs: ["dirtySubmit", "name"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
221
221
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FAVerificationComponent, decorators: [{
|
|
222
222
|
type: Component,
|
|
223
223
|
args: [{
|
|
@@ -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-otp/2fa-verification-otp.component.ts","../../src/app/components/2fa-verification-otp/2fa-verification-otp.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 Authenticator = 'authenticator',\n Code = 'code',\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 smartphone\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Text Message</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following mobile number\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n mail\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Email</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following email\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n {{ method.phoneNumber }}\n </mat-radio-button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n {{ method.email }}\n </mat-radio-button>\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n </fs-radio-group>\n </ng-container>\n </mat-dialog-content>\n <mat-dialog-actions>\n <div class=\"actions\">\n <ng-container *ngIf=\"methods$ | async\">\n <button mat-button type=\"submit\" color=\"primary\">Next</button>\n </ng-container>\n <button mat-button type=\"button\" [mat-dialog-close]=\"null\">Cancel</button>\n </div>\n </mat-dialog-actions>\n </form>\n</fs-dialog>\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Output,\n} from '@angular/core';\n\nimport { FsFormDirective } from '@firestitch/form';\n\n\n@Component({\n selector: 'fs-2fa-verification-otp',\n templateUrl: './2fa-verification-otp.component.html',\n styleUrls: [\n './2fa-verification-otp.component.scss'\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Fs2FAVerificationOTPComponent {\n\n @Output()\n public codeChange = new EventEmitter<string>();\n\n constructor(\n public form: FsFormDirective,\n ) {}\n\n public codeChanged(event: string): void {\n this.codeChange.emit(event);\n this.form.dirty();\n }\n\n public codeCompleted(): void {\n this.form.triggerSubmit();\n }\n}\n","<p class=\"description\">\n Enter the verification code generated by your 2 factor authenticator\n app to verify it's you\n</p>\n\n<!--\n<code-input [initialFocusField]=\"0\"\n [codeLength]=\"6\"\n (codeChanged)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted()\">>\n</code-input>\n-->\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n} from '@angular/core';\nimport { ControlContainer, NgForm } from '@angular/forms';\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 Fs2FAVerificationSMSComponent {\n\n @Input()\n public method: IFsVerificationMethod;\n\n @Output()\n public codeChange = new EventEmitter<string>();\n\n public code: string;\n\n public codeChanged(): void {\n this.codeChange.emit(this.code);\n }\n\n}\n","<p class=\"description\">\n <ng-container *ngIf=\"method.phoneNumber && method.type === 'sms'\">\n A text message with a verification code was just\n sent to <span style=\"white-space: nowrap;\">{{ method.phoneNumber }}</span> to verify it's you.\n </ng-container>\n\n <ng-container *ngIf=\"method.type === 'email'\">\n A email with a verification code was just sent to {{ method.email }} to verify it's you.\n </ng-container>\n\n <ng-container *ngIf=\"false\">\n Enter the one time code generated by the app administrator to verify it's you.\n </ng-container>\n</p>\n\n<mat-form-field>\n <mat-label>Code</mat-label>\n <input type=\"text\"\n matInput\n name=\"code\"\n autocomplete=\"one-time-code\"\n [(ngModel)]=\"code\"\n (ngModelChange)=\"codeChanged()\"\n required\n placeholder=\"Enter the code\"\n inputmode=\"numeric\">\n</mat-form-field>\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n Output,\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';\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 {\n\n @Input()\n public method: IFsVerificationMethod;\n\n @Output()\n public verified = new EventEmitter<unknown>();\n\n @Output()\n public backToSignIn = new EventEmitter<void>();\n\n\n public resendInProgress = false;\n public trustedDevice = false;\n\n private _code: string;\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 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 codeChanged(code: string): void {\n this._code = code;\n }\n\n public resend(): void {\n this.resendInProgress = true;\n\n this.verificationProvider\n .resend()\n .pipe(\n takeUntil(this._destroy$),\n )\n .subscribe(() => {\n this.resendInProgress = false;\n\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\n this._cdRef.markForCheck();\n });\n }\n\n public toSignIn(): void {\n this.backToSignIn.emit();\n }\n\n}\n","<form fsForm [submit]=\"verify\" [dirtySubmitButton]=\"false\">\n <h2>2-Step Verification</h2>\n\n <div class=\"code-container\">\n <ng-container *ngIf=\"method.type === 'authenticator' else code\">\n <fs-2fa-verification-otp class=\"otp\"></fs-2fa-verification-otp>\n </ng-container>\n\n <ng-template #code>\n <fs-2fa-verification-code\n [method]=\"method\"\n (codeChange)=\"codeChanged($event)\">\n </fs-2fa-verification-code>\n </ng-template>\n </div>\n\n <div class=\"additional\">\n <mat-checkbox\n name=\"trust-device\"\n [(ngModel)]=\"trustedDevice\">\n Trust this device\n </mat-checkbox>\n\n <span matSuffix>\n <a mat-button\n type=\"button\"\n color=\"primary\"\n (click)=\"resend()\"\n [disabled]=\"resendInProgress\"\n class=\"resend-code-btn\">\n <ng-container *ngIf=\"!resendInProgress else sending\">\n Resend Code\n </ng-container>\n <ng-template #sending>\n <mat-spinner [diameter]=\"12\"></mat-spinner> Sending\n </ng-template>\n </a>\n </span>\n </div>\n\n <div class=\"actions\">\n <button mat-raised-button\n color=\"primary\"\n type=\"submit\">\n Verify\n </button>\n\n <button mat-button type=\"button\" (click)=\"showVerificationMethods()\">\n Try other ways to verify\n </button>\n\n <button mat-button type=\"button\" (click)=\"toSignIn()\">\n Back to signin\n </button>\n </div>\n</form>\n","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\n// import { CodeInputModule } from 'angular-code-input';\n\nimport { Fs2FAVerificationComponent } from './components/2fa-verification/2fa-verification.component';\nimport { Fs2FAVerificationSMSComponent } from './components/2fa-verification-code/2fa-verification-code.component';\nimport { Fs2FAVerificationOTPComponent } from './components/2fa-verification-otp/2fa-verification-otp.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\n Fs2FAVerificationSMSComponent,\n Fs2FAVerificationOTPComponent,\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","/**\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BAIC,QAAQ;sBADd,MAAM;gBAIA,YAAY;sBADlB,MAAM;;;MEoBI,WAAW;;yGAAX,WAAW;0GAAX,WAAW,iBAXpB,0BAA0B;QAE1B,6BAA6B;QAC7B,6BAA6B;QAC7B,iCAAiC,aAxBjC,YAAY;QACZ,WAAW;QAEX,kBAAkB;QAClB,cAAc;QACd,eAAe;QAEf,YAAY;QACZ,kBAAkB;QAClB,cAAc;;QAGd,iBAAiB;QACjB,wBAAwB;QACxB,gBAAgB;QAChB,gBAAgB;QAChB,aAAa;QACb,cAAc,aAUd,0BAA0B;0GAIjB,WAAW,aAFX,EAAE,YA9BJ;YACP,YAAY;YACZ,WAAW;YAEX,kBAAkB;YAClB,cAAc;YACd,eAAe;YAEf,YAAY;YACZ,kBAAkB;YAClB,cAAc;;YAGd,iBAAiB;YACjB,wBAAwB;YACxB,gBAAgB;YAChB,gBAAgB;YAChB,aAAa;YACb,cAAc;SACf;4FAaU,WAAW;kBAjCvB,QAAQ;mBAAC;oBACR,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBAEX,kBAAkB;wBAClB,cAAc;wBACd,eAAe;wBAEf,YAAY;wBACZ,kBAAkB;wBAClB,cAAc;;wBAGd,iBAAiB;wBACjB,wBAAwB;wBACxB,gBAAgB;wBAChB,gBAAgB;wBAChB,aAAa;wBACb,cAAc;qBACf;oBACD,YAAY,EAAE;wBACZ,0BAA0B;wBAE1B,6BAA6B;wBAC7B,6BAA6B;wBAC7B,iCAAiC;qBAClC;oBACD,OAAO,EAAE;wBACP,0BAA0B;qBAC3B;oBACD,SAAS,EAAE,EAAE;iBACd;;;ACzDD;;;;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-otp/2fa-verification-otp.component.ts","../../src/app/components/2fa-verification-otp/2fa-verification-otp.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 Authenticator = 'authenticator',\n Code = 'code',\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 smartphone\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Text Message</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following mobile number\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n mail\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Email</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following email\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n {{ method.phoneNumber }}\n </mat-radio-button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n {{ method.email }}\n </mat-radio-button>\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n </fs-radio-group>\n </ng-container>\n </mat-dialog-content>\n <mat-dialog-actions>\n <div class=\"actions\">\n <ng-container *ngIf=\"methods$ | async\">\n <button mat-button type=\"submit\" color=\"primary\">Next</button>\n </ng-container>\n <button mat-button type=\"button\" [mat-dialog-close]=\"null\">Cancel</button>\n </div>\n </mat-dialog-actions>\n </form>\n</fs-dialog>\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Output,\n} from '@angular/core';\n\nimport { FsFormDirective } from '@firestitch/form';\n\n\n@Component({\n selector: 'fs-2fa-verification-otp',\n templateUrl: './2fa-verification-otp.component.html',\n styleUrls: [\n './2fa-verification-otp.component.scss'\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Fs2FAVerificationOTPComponent {\n\n @Output()\n public codeChange = new EventEmitter<string>();\n\n constructor(\n public form: FsFormDirective,\n ) {}\n\n public codeChanged(event: string): void {\n this.codeChange.emit(event);\n this.form.dirty();\n }\n\n public codeCompleted(): void {\n this.form.triggerSubmit();\n }\n}\n","<p class=\"description\">\n Enter the verification code generated by your 2 factor authenticator\n app to verify it's you\n</p>\n\n<!--\n<code-input [initialFocusField]=\"0\"\n [codeLength]=\"6\"\n (codeChanged)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted()\">>\n</code-input>\n-->\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n} from '@angular/core';\nimport { ControlContainer, NgForm } from '@angular/forms';\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 Fs2FAVerificationSMSComponent {\n\n @Input()\n public method: IFsVerificationMethod;\n\n @Output()\n public codeChange = new EventEmitter<string>();\n\n public code: string;\n\n public codeChanged(): void {\n this.codeChange.emit(this.code);\n }\n\n}\n","<p class=\"description\">\n <ng-container *ngIf=\"method.phoneNumber && method.type === 'sms'\">\n A text message with a verification code was just\n sent to <span style=\"white-space: nowrap;\">{{ method.phoneNumber }}</span> to verify it's you.\n </ng-container>\n\n <ng-container *ngIf=\"method.type === 'email'\">\n A email with a verification code was just sent to {{ method.email }} to verify it's you.\n </ng-container>\n\n <ng-container *ngIf=\"false\">\n Enter the one time code generated by the app administrator to verify it's you.\n </ng-container>\n</p>\n\n<mat-form-field>\n <mat-label>Code</mat-label>\n <input type=\"text\"\n matInput\n name=\"code\"\n autocomplete=\"one-time-code\"\n [(ngModel)]=\"code\"\n (ngModelChange)=\"codeChanged()\"\n required\n placeholder=\"Enter the code\"\n inputmode=\"numeric\">\n</mat-form-field>\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n Output,\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';\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 {\n\n @Input()\n public method: IFsVerificationMethod;\n\n @Output()\n public verified = new EventEmitter<unknown>();\n\n @Output()\n public backToSignIn = new EventEmitter<void>();\n\n\n public resendInProgress = false;\n public trustedDevice = false;\n\n private _code: string;\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 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 codeChanged(code: string): void {\n this._code = code;\n }\n\n public resend(): void {\n this.resendInProgress = true;\n\n this.verificationProvider\n .resend()\n .pipe(\n takeUntil(this._destroy$),\n )\n .subscribe(() => {\n this.resendInProgress = false;\n\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\n this._cdRef.markForCheck();\n });\n }\n\n public toSignIn(): void {\n this.backToSignIn.emit();\n }\n\n}\n","<form fsForm [submit]=\"verify\" [dirtySubmitButton]=\"false\">\n <h2>2-Step Verification</h2>\n\n <div class=\"code-container\">\n <ng-container *ngIf=\"method.type === 'authenticator' else code\">\n <fs-2fa-verification-otp class=\"otp\"></fs-2fa-verification-otp>\n </ng-container>\n\n <ng-template #code>\n <fs-2fa-verification-code\n [method]=\"method\"\n (codeChange)=\"codeChanged($event)\">\n </fs-2fa-verification-code>\n </ng-template>\n </div>\n\n <div class=\"additional\">\n <mat-checkbox\n name=\"trust-device\"\n [(ngModel)]=\"trustedDevice\">\n Trust this device\n </mat-checkbox>\n\n <span class=\"resend-code-btn\">\n <ng-container *ngIf=\"!resendInProgress else sending\">\n <a (click)=\"resend()\">\n Resend Code\n </a>\n </ng-container>\n <ng-template #sending>\n <mat-spinner [diameter]=\"12\"></mat-spinner> Sending\n </ng-template>\n </span>\n </div>\n\n <div class=\"actions\">\n <button mat-raised-button\n color=\"primary\"\n type=\"submit\">\n Verify\n </button>\n\n <button mat-button type=\"button\" (click)=\"showVerificationMethods()\">\n Try other ways to verify\n </button>\n\n <button mat-button type=\"button\" (click)=\"toSignIn()\">\n Back to signin\n </button>\n </div>\n</form>\n","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\n// import { CodeInputModule } from 'angular-code-input';\n\nimport { Fs2FAVerificationComponent } from './components/2fa-verification/2fa-verification.component';\nimport { Fs2FAVerificationSMSComponent } from './components/2fa-verification-code/2fa-verification-code.component';\nimport { Fs2FAVerificationOTPComponent } from './components/2fa-verification-otp/2fa-verification-otp.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\n Fs2FAVerificationSMSComponent,\n Fs2FAVerificationOTPComponent,\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,2DAA+B,CAAA;IAC/B,yCAAa,CAAA;AACf,CAAC,EALW,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,gBAAgB,EAAE,CAAC;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