@firestitch/2fa 12.6.0 → 12.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/enums/verification-method-type.enum.d.ts +5 -5
- package/app/interfaces/verification-method.interface.d.ts +11 -11
- package/app/modules/code-input/code-input.module.d.ts +8 -8
- package/app/modules/code-input/components/code-input/code-input.component.d.ts +13 -13
- package/app/modules/code-input/components/code-input/index.d.ts +1 -1
- package/app/modules/code-input/index.d.ts +1 -1
- package/app/modules/defaulted/components/defaulted/defaulted.component.d.ts +5 -5
- package/app/modules/defaulted/components/defaulted/index.d.ts +1 -1
- package/app/modules/defaulted/defaulted.module.d.ts +7 -7
- package/app/modules/manage/components/2fa-manage/2fa-manage.component.d.ts +28 -28
- package/app/modules/manage/components/2fa-manage/index.d.ts +1 -1
- package/app/modules/manage/components/app/app.component.d.ts +31 -31
- package/app/modules/manage/components/app/index.d.ts +1 -1
- package/app/modules/manage/components/email/email.component.d.ts +26 -26
- package/app/modules/manage/components/email/index.d.ts +1 -1
- package/app/modules/manage/components/emails/emails.component.d.ts +17 -17
- package/app/modules/manage/components/emails/index.d.ts +1 -1
- package/app/modules/manage/components/manage-methods/index.d.ts +1 -1
- package/app/modules/manage/components/manage-methods/manage-methods.component.d.ts +35 -35
- package/app/modules/manage/components/number/index.d.ts +1 -1
- package/app/modules/manage/components/number/number.component.d.ts +27 -27
- package/app/modules/manage/components/numbers/index.d.ts +1 -1
- package/app/modules/manage/components/numbers/numbers.component.d.ts +18 -18
- package/app/modules/manage/components/verification-methods/index.d.ts +1 -1
- package/app/modules/manage/components/verification-methods/verification-methods.component.d.ts +20 -20
- package/app/modules/manage/fs-2f-manage.module.d.ts +32 -32
- package/app/modules/manage/services/index.d.ts +1 -1
- package/app/modules/manage/services/two-factor-manage.service.d.ts +42 -42
- package/app/modules/resend/components/resend/index.d.ts +1 -1
- package/app/modules/resend/components/resend/resend.component.d.ts +14 -14
- package/app/modules/resend/resend.module.d.ts +9 -9
- package/app/modules/verification/components/2fa-verification/2fa-verification.component.d.ts +33 -33
- package/app/modules/verification/components/2fa-verification-code/2fa-verification-code.component.d.ts +17 -17
- package/app/modules/verification/components/2fa-verification-methods/2fa-verification-methods.component.d.ts +22 -22
- package/app/modules/verification/fs-2fa-verification.module.d.ts +23 -23
- package/app/modules/verification-methods/components/verification-methods/verification-methods.component.d.ts +21 -21
- package/app/modules/verification-methods/fs-2f-verification-methods.module.d.ts +14 -14
- package/bundles/firestitch-2fa.umd.js +1308 -1308
- package/bundles/firestitch-2fa.umd.js.map +1 -1
- package/esm2015/app/enums/verification-method-type.enum.js +6 -6
- package/esm2015/app/interfaces/verification-method.interface.js +1 -1
- package/esm2015/app/modules/code-input/code-input.module.js +25 -25
- package/esm2015/app/modules/code-input/components/code-input/code-input.component.js +35 -35
- package/esm2015/app/modules/code-input/components/code-input/index.js +1 -1
- package/esm2015/app/modules/code-input/index.js +1 -1
- package/esm2015/app/modules/defaulted/components/defaulted/defaulted.component.js +15 -15
- package/esm2015/app/modules/defaulted/components/defaulted/index.js +1 -1
- package/esm2015/app/modules/defaulted/defaulted.module.js +17 -17
- package/esm2015/app/modules/manage/components/2fa-manage/2fa-manage.component.js +100 -100
- package/esm2015/app/modules/manage/components/2fa-manage/index.js +1 -1
- package/esm2015/app/modules/manage/components/app/app.component.js +82 -82
- package/esm2015/app/modules/manage/components/app/index.js +1 -1
- package/esm2015/app/modules/manage/components/email/email.component.js +82 -82
- package/esm2015/app/modules/manage/components/email/index.js +1 -1
- package/esm2015/app/modules/manage/components/emails/emails.component.js +42 -42
- package/esm2015/app/modules/manage/components/emails/index.js +1 -1
- package/esm2015/app/modules/manage/components/manage-methods/index.js +1 -1
- package/esm2015/app/modules/manage/components/manage-methods/manage-methods.component.js +125 -125
- package/esm2015/app/modules/manage/components/number/index.js +1 -1
- package/esm2015/app/modules/manage/components/number/number.component.js +85 -85
- package/esm2015/app/modules/manage/components/numbers/index.js +1 -1
- package/esm2015/app/modules/manage/components/numbers/numbers.component.js +43 -43
- package/esm2015/app/modules/manage/components/verification-methods/index.js +1 -1
- package/esm2015/app/modules/manage/components/verification-methods/verification-methods.component.js +64 -64
- package/esm2015/app/modules/manage/fs-2f-manage.module.js +112 -112
- package/esm2015/app/modules/manage/services/index.js +1 -1
- package/esm2015/app/modules/manage/services/two-factor-manage.service.js +132 -132
- package/esm2015/app/modules/resend/components/resend/index.js +1 -1
- package/esm2015/app/modules/resend/components/resend/resend.component.js +39 -39
- package/esm2015/app/modules/resend/resend.module.js +29 -29
- package/esm2015/app/modules/verification/components/2fa-verification/2fa-verification.component.js +112 -112
- package/esm2015/app/modules/verification/components/2fa-verification-code/2fa-verification-code.component.js +58 -58
- package/esm2015/app/modules/verification/components/2fa-verification-methods/2fa-verification-methods.component.js +62 -62
- package/esm2015/app/modules/verification/fs-2fa-verification.module.js +87 -87
- package/esm2015/app/modules/verification-methods/components/verification-methods/verification-methods.component.js +65 -65
- package/esm2015/app/modules/verification-methods/fs-2f-verification-methods.module.js +47 -47
- package/esm2015/firestitch-2fa.js +4 -4
- package/esm2015/public_api.js +7 -7
- package/fesm2015/firestitch-2fa.js +1185 -1185
- package/fesm2015/firestitch-2fa.js.map +1 -1
- package/firestitch-2fa.d.ts +5 -5
- package/package.json +1 -1
- package/public_api.d.ts +8 -8
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
import { Component, Inject, ChangeDetectionStrategy, ChangeDetectorRef, ViewChild, } from '@angular/core';
|
|
2
|
-
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
|
3
|
-
import { FsMessage } from '@firestitch/message';
|
|
4
|
-
import { FsFormDirective } from '@firestitch/form';
|
|
5
|
-
import { of } from 'rxjs';
|
|
6
|
-
import { switchMap, tap } from 'rxjs/operators';
|
|
7
|
-
import { VerificationMethodType } from '../../../../enums/verification-method-type.enum';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
import * as i1 from "@angular/material/dialog";
|
|
10
|
-
import * as i2 from "@firestitch/message";
|
|
11
|
-
import * as i3 from "@firestitch/dialog";
|
|
12
|
-
import * as i4 from "../../../code-input/components/code-input/code-input.component";
|
|
13
|
-
import * as i5 from "../../../resend/components/resend/resend.component";
|
|
14
|
-
import * as i6 from "@angular/material/form-field";
|
|
15
|
-
import * as i7 from "@firestitch/phone";
|
|
16
|
-
import * as i8 from "@angular/material/checkbox";
|
|
17
|
-
import * as i9 from "@angular/material/button";
|
|
18
|
-
import * as i10 from "@angular/forms";
|
|
19
|
-
import * as i11 from "@firestitch/form";
|
|
20
|
-
import * as i12 from "@angular/common";
|
|
21
|
-
export class NumberComponent {
|
|
22
|
-
constructor(_data, _dialogRef, _cdRef, _message) {
|
|
23
|
-
this._data = _data;
|
|
24
|
-
this._dialogRef = _dialogRef;
|
|
25
|
-
this._cdRef = _cdRef;
|
|
26
|
-
this._message = _message;
|
|
27
|
-
this.verificationMethod = null;
|
|
28
|
-
this.resend = () => {
|
|
29
|
-
return this.twoFactorManageService.verificationMethodResend()
|
|
30
|
-
.pipe(tap(() => {
|
|
31
|
-
this._message.success('Resent verification code');
|
|
32
|
-
}));
|
|
33
|
-
};
|
|
34
|
-
this.submit = () => {
|
|
35
|
-
return of(true)
|
|
36
|
-
.pipe(switchMap(() => {
|
|
37
|
-
return this.verificationMethod ?
|
|
38
|
-
this.twoFactorManageService.verificationMethodVerify(this.code)
|
|
39
|
-
.pipe(tap((verificationMethod) => {
|
|
40
|
-
this._message.success('Created text message verification method');
|
|
41
|
-
this._dialogRef.close(verificationMethod);
|
|
42
|
-
})) :
|
|
43
|
-
this.twoFactorManageService.verificationMethodCreate({
|
|
44
|
-
type: VerificationMethodType.Sms,
|
|
45
|
-
phoneNumber: this.phone.number,
|
|
46
|
-
phoneCode: this.phone.countryCode,
|
|
47
|
-
phoneCountry: this.phone.isoCode,
|
|
48
|
-
default: this.default,
|
|
49
|
-
}).pipe(tap((verificationMethod) => {
|
|
50
|
-
this.verificationMethod = verificationMethod;
|
|
51
|
-
this.form.clear();
|
|
52
|
-
this._cdRef.markForCheck();
|
|
53
|
-
}));
|
|
54
|
-
}));
|
|
55
|
-
};
|
|
56
|
-
this.twoFactorManageService = _data.twoFactorManageService;
|
|
57
|
-
this.defaultCountry = _data.defaultCountry;
|
|
58
|
-
this.default = !this.twoFactorManageService.hasVerificationMethods;
|
|
59
|
-
}
|
|
60
|
-
codeCompleted() {
|
|
61
|
-
if (!this.form.submitting) {
|
|
62
|
-
this.form.triggerSubmit();
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
codeChanged(code) {
|
|
66
|
-
this.code = code;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
NumberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NumberComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i0.ChangeDetectorRef }, { token: i2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
|
|
70
|
-
NumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NumberComponent, selector: "ng-component", viewQueries: [{ propertyName: "form", first: true, predicate: FsFormDirective, descendants: true }], ngImport: i0, template: "<form fsForm [submit]=\"submit\" autocomplete=\"
|
|
71
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NumberComponent, decorators: [{
|
|
72
|
-
type: Component,
|
|
73
|
-
args: [{
|
|
74
|
-
templateUrl: './number.component.html',
|
|
75
|
-
styleUrls: ['./number.component.scss'],
|
|
76
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
77
|
-
}]
|
|
78
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
79
|
-
type: Inject,
|
|
80
|
-
args: [MAT_DIALOG_DATA]
|
|
81
|
-
}] }, { type: i1.MatDialogRef }, { type: i0.ChangeDetectorRef }, { type: i2.FsMessage }]; }, propDecorators: { form: [{
|
|
82
|
-
type: ViewChild,
|
|
83
|
-
args: [FsFormDirective, { static: false }]
|
|
84
|
-
}] } });
|
|
85
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Component, Inject, ChangeDetectionStrategy, ChangeDetectorRef, ViewChild, } from '@angular/core';
|
|
2
|
+
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
|
3
|
+
import { FsMessage } from '@firestitch/message';
|
|
4
|
+
import { FsFormDirective } from '@firestitch/form';
|
|
5
|
+
import { of } from 'rxjs';
|
|
6
|
+
import { switchMap, tap } from 'rxjs/operators';
|
|
7
|
+
import { VerificationMethodType } from '../../../../enums/verification-method-type.enum';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "@angular/material/dialog";
|
|
10
|
+
import * as i2 from "@firestitch/message";
|
|
11
|
+
import * as i3 from "@firestitch/dialog";
|
|
12
|
+
import * as i4 from "../../../code-input/components/code-input/code-input.component";
|
|
13
|
+
import * as i5 from "../../../resend/components/resend/resend.component";
|
|
14
|
+
import * as i6 from "@angular/material/form-field";
|
|
15
|
+
import * as i7 from "@firestitch/phone";
|
|
16
|
+
import * as i8 from "@angular/material/checkbox";
|
|
17
|
+
import * as i9 from "@angular/material/button";
|
|
18
|
+
import * as i10 from "@angular/forms";
|
|
19
|
+
import * as i11 from "@firestitch/form";
|
|
20
|
+
import * as i12 from "@angular/common";
|
|
21
|
+
export class NumberComponent {
|
|
22
|
+
constructor(_data, _dialogRef, _cdRef, _message) {
|
|
23
|
+
this._data = _data;
|
|
24
|
+
this._dialogRef = _dialogRef;
|
|
25
|
+
this._cdRef = _cdRef;
|
|
26
|
+
this._message = _message;
|
|
27
|
+
this.verificationMethod = null;
|
|
28
|
+
this.resend = () => {
|
|
29
|
+
return this.twoFactorManageService.verificationMethodResend()
|
|
30
|
+
.pipe(tap(() => {
|
|
31
|
+
this._message.success('Resent verification code');
|
|
32
|
+
}));
|
|
33
|
+
};
|
|
34
|
+
this.submit = () => {
|
|
35
|
+
return of(true)
|
|
36
|
+
.pipe(switchMap(() => {
|
|
37
|
+
return this.verificationMethod ?
|
|
38
|
+
this.twoFactorManageService.verificationMethodVerify(this.code)
|
|
39
|
+
.pipe(tap((verificationMethod) => {
|
|
40
|
+
this._message.success('Created text message verification method');
|
|
41
|
+
this._dialogRef.close(verificationMethod);
|
|
42
|
+
})) :
|
|
43
|
+
this.twoFactorManageService.verificationMethodCreate({
|
|
44
|
+
type: VerificationMethodType.Sms,
|
|
45
|
+
phoneNumber: this.phone.number,
|
|
46
|
+
phoneCode: this.phone.countryCode,
|
|
47
|
+
phoneCountry: this.phone.isoCode,
|
|
48
|
+
default: this.default,
|
|
49
|
+
}).pipe(tap((verificationMethod) => {
|
|
50
|
+
this.verificationMethod = verificationMethod;
|
|
51
|
+
this.form.clear();
|
|
52
|
+
this._cdRef.markForCheck();
|
|
53
|
+
}));
|
|
54
|
+
}));
|
|
55
|
+
};
|
|
56
|
+
this.twoFactorManageService = _data.twoFactorManageService;
|
|
57
|
+
this.defaultCountry = _data.defaultCountry;
|
|
58
|
+
this.default = !this.twoFactorManageService.hasVerificationMethods;
|
|
59
|
+
}
|
|
60
|
+
codeCompleted() {
|
|
61
|
+
if (!this.form.submitting) {
|
|
62
|
+
this.form.triggerSubmit();
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
codeChanged(code) {
|
|
66
|
+
this.code = code;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
NumberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NumberComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i0.ChangeDetectorRef }, { token: i2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
|
|
70
|
+
NumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NumberComponent, selector: "ng-component", viewQueries: [{ propertyName: "form", first: true, predicate: FsFormDirective, descendants: true }], ngImport: i0, template: "<form fsForm [submit]=\"submit\" [autocomplete]=\"false\">\n <fs-dialog>\n <h1 mat-dialog-title>\n Text Message Setup\n </h1>\n <mat-dialog-content>\n <ng-container *ngIf=\"verificationMethod; else notVerificationMethod\">\n <p>The app just sent you a text message with a verification code.</p>\n\n <app-code-input \n [code]=\"code\"\n (codeChanged)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted()\">\n </app-code-input> \n \n <app-resend [resend]=\"resend\"></app-resend>\n </ng-container>\n\n <ng-template #notVerificationMethod>\n <p>The app will only use this number for verifying your account security. Message and data rates may apply by your cell phone provider.</p>\n <mat-form-field>\n <mat-label>Phone number</mat-label>\n <fs-phone-field\n [(ngModel)]=\"phone\"\n [country]=\"defaultCountry\"\n name=\"phone\"\n autocomplete=\"off\"\n [required]=\"true\">\n </fs-phone-field>\n </mat-form-field>\n <mat-checkbox \n name=\"default\"\n [(ngModel)]=\"default\"\n [disableRipple]=\"true\">\n Make this the default 2-step verification method\n </mat-checkbox>\n </ng-template>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n type=\"submit\">\n Next\n </button>\n <button\n mat-button\n type=\"button\"\n [mat-dialog-close]=\"undefined\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: [":host ::ng-deep mat-checkbox .mat-ripple{display:none}app-code-input{margin-bottom:5px;display:block}mat-form-field{width:100%}mat-dialog-content{width:400px}p{margin-top:0}\n"], components: [{ type: i3.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i4.CodeInputComponent, selector: "app-code-input", inputs: ["codeLength", "code"], outputs: ["codeCompleted", "codeChanged"] }, { type: i5.ResendComponent, selector: "app-resend", inputs: ["resend"] }, { type: i6.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i7.FsPhoneFieldComponent, selector: "fs-phone-field", inputs: ["allowNumberExt", "placeholder", "required", "disabled", "mode", "country"] }, { type: i8.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: i9.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: i10.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i10.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i10.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i11.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i12.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.MatLabel, selector: "mat-label" }, { type: i10.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i10.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i11.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i10.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i11.FsSubmitButtonDirective, selector: "button[type=\"submit\"]", inputs: ["name", "dirtySubmit"] }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NumberComponent, decorators: [{
|
|
72
|
+
type: Component,
|
|
73
|
+
args: [{
|
|
74
|
+
templateUrl: './number.component.html',
|
|
75
|
+
styleUrls: ['./number.component.scss'],
|
|
76
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
77
|
+
}]
|
|
78
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
79
|
+
type: Inject,
|
|
80
|
+
args: [MAT_DIALOG_DATA]
|
|
81
|
+
}] }, { type: i1.MatDialogRef }, { type: i0.ChangeDetectorRef }, { type: i2.FsMessage }]; }, propDecorators: { form: [{
|
|
82
|
+
type: ViewChild,
|
|
83
|
+
args: [FsFormDirective, { static: false }]
|
|
84
|
+
}] } });
|
|
85
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnVtYmVyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9hcHAvbW9kdWxlcy9tYW5hZ2UvY29tcG9uZW50cy9udW1i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KCgpID0+IHtcbiAgICAgICAgICB0aGlzLl9tZXNzYWdlLnN1Y2Nlc3MoJ1Jlc2VudCB2ZXJpZmljYXRpb24gY29kZScpO1xuICAgICAgICB9KSxcbiAgICAgICk7XG4gIH1cblxuICBwdWJsaWMgc3VibWl0ID0gKCkgPT4ge1xuICAgIHJldHVybiBvZih0cnVlKVxuICAgICAgLnBpcGUoXG4gICAgICAgIHN3aXRjaE1hcCgoKSA9PiB7XG4gICAgICAgICAgcmV0dXJuIHRoaXMudmVyaWZpY2F0aW9uTWV0aG9kID9cbiAgICAgICAgICAgIHRoaXMudHdvRmFjdG9yTWFuYWdlU2VydmljZS52ZXJpZmljYXRpb25NZXRob2RWZXJpZnkodGhpcy5jb2RlKVxuICAgICAgICAgICAgICAucGlwZShcbiAgICAgICAgICAgICAgICB0YXAoKHZlcmlmaWNhdGlvbk1ldGhvZCkgPT4ge1xuICAgICAgICAgICAgICAgICAgdGhpcy5fbWVzc2FnZS5zdWNjZXNzKCdDcmVhdGVkIHRleHQgbWVzc2FnZSB2ZXJpZmljYXRpb24gbWV0aG9kJyk7XG4gICAgICAgICAgICAgICAgICB0aGlzLl9kaWFsb2dSZWYuY2xvc2UodmVyaWZpY2F0aW9uTWV0aG9kKTtcbiAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgKSA6XG4gICAgICAgICAgICB0aGlzLnR3b0ZhY3Rvck1hbmFnZVNlcnZpY2UudmVyaWZpY2F0aW9uTWV0aG9kQ3JlYXRlKHtcbiAgICAgICAgICAgICAgdHlwZTogVmVyaWZpY2F0aW9uTWV0aG9kVHlwZS5TbXMsXG4gICAgICAgICAgICAgIHBob25lTnVtYmVyOiB0aGlzLnBob25lLm51bWJlcixcbiAgICAgICAgICAgICAgcGhvbmVDb2RlOiB0aGlzLnBob25lLmNvdW50cnlDb2RlLFxuICAgICAgICAgICAgICBwaG9uZUNvdW50cnk6IHRoaXMucGhvbmUuaXNvQ29kZSxcbiAgICAgICAgICAgICAgZGV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wiXG4gICAgICAgICAgICBbKG5nTW9kZWwpXT1cImRlZmF1bHRcIlxuICAgICAgICAgICAgW2Rpc2FibGVSaXBwbGVdPVwidHJ1ZVwiPlxuICAgICAgICAgIE1ha2UgdGhpcyB0aGUgZGVmYXVsdCAyLXN0ZXAgdmVyaWZpY2F0aW9uIG1ldGhvZFxuICAgICAgICA8L21hdC1jaGVja2JveD5cbiAgICAgIDwvbmctdGVtcGxhdGU+XG4gICAgPC9tYXQtZGlhbG9nLWNvbnRlbnQ+XG4gICAgPG1hdC1kaWFsb2ctYWN0aW9ucz5cbiAgICAgIDxidXR0b25cbiAgICAgICAgICBtYXQtYnV0dG9uXG4gICAgICAgICAgY29sb3I9XCJwcmltYXJ5XCJcbiAgICAgICAgICB0eXBlPVwic3VibWl0XCI+XG4gICAgICAgIE5leHRcbiAgICAgIDwvYnV0dG9uPlxuICAgICAgPGJ1dHRvblxuICAgICAgICAgIG1hdC1idXR0b25cbiAgICAgICAgICB0eXBlPVwiYnV0dG9uXCJcbiAgICAgICAgICBbbWF0LWRpYWxvZy1jbG9zZV09XCJ1bmRlZmluZWRcIj5cbiAgICAgICAgQ2FuY2VsXG4gICAgICA8L2J1dHRvbj5cbiAgICA8L21hdC1kaWFsb2ctYWN0aW9ucz5cbiAgPC9mcy1kaWFsb2c+XG48L2Zvcm0+XG4iXX0=
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './numbers.component';
|
|
1
|
+
export * from './numbers.component';
|
|
2
2
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvbWFuYWdlL2NvbXBvbmVudHMvbnVtYmVycy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHFCQUFxQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9udW1iZXJzLmNvbXBvbmVudCc7XG4iXX0=
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { Component, Inject, ChangeDetectionStrategy, } from '@angular/core';
|
|
2
|
-
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
3
|
-
import { FsMessage } from '@firestitch/message';
|
|
4
|
-
import { VerificationMethodType } from '../../../../enums/verification-method-type.enum';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
import * as i1 from "@angular/material/dialog";
|
|
7
|
-
import * as i2 from "@firestitch/message";
|
|
8
|
-
import * as i3 from "@firestitch/dialog";
|
|
9
|
-
import * as i4 from "../verification-methods/verification-methods.component";
|
|
10
|
-
import * as i5 from "@angular/material/button";
|
|
11
|
-
export class NumbersComponent {
|
|
12
|
-
constructor(_data, _dialogRef, _message) {
|
|
13
|
-
this._data = _data;
|
|
14
|
-
this._dialogRef = _dialogRef;
|
|
15
|
-
this._message = _message;
|
|
16
|
-
this.VerificationMethodType = VerificationMethodType;
|
|
17
|
-
this.twoFactorManageService = _data.twoFactorManageService;
|
|
18
|
-
this.defaultCountry = _data.defaultCountry;
|
|
19
|
-
}
|
|
20
|
-
add() {
|
|
21
|
-
this.twoFactorManageService.addSms(this.defaultCountry)
|
|
22
|
-
.subscribe();
|
|
23
|
-
}
|
|
24
|
-
deleted() {
|
|
25
|
-
this._message.success('Deleted text message verification method');
|
|
26
|
-
if (!this.twoFactorManageService.hasVerificationMethod(VerificationMethodType.Sms)) {
|
|
27
|
-
this._dialogRef.close();
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
NumbersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NumbersComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
|
|
32
|
-
NumbersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NumbersComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog>\n <h1 mat-dialog-title>\n Text Message Numbers\n </h1>\n <mat-dialog-content>\n <app-verification-methods\n [type]=\"VerificationMethodType.Sms\"\n [twoFactorManageService]=\"twoFactorManageService\"\n (deleted)=\"deleted()\">\n </app-verification-methods>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [mat-dialog-close]=\"undefined\">\n Close\n </button>\n <button\n mat-button\n (click)=\"add()\"\n type=\"button\">\n Add Number\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [""], components: [{ type: i3.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i4.VerificationMethodsComponent, selector: "app-verification-methods", inputs: ["twoFactorManageService", "type"], outputs: ["deleted"] }, { type: i5.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: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NumbersComponent, decorators: [{
|
|
34
|
-
type: Component,
|
|
35
|
-
args: [{
|
|
36
|
-
templateUrl: './numbers.component.html',
|
|
37
|
-
styleUrls: ['./numbers.component.scss'],
|
|
38
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
39
|
-
}]
|
|
40
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
41
|
-
type: Inject,
|
|
42
|
-
args: [MAT_DIALOG_DATA]
|
|
43
|
-
}] }, { type: i1.MatDialogRef }, { type: i2.FsMessage }]; } });
|
|
1
|
+
import { Component, Inject, ChangeDetectionStrategy, } from '@angular/core';
|
|
2
|
+
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
3
|
+
import { FsMessage } from '@firestitch/message';
|
|
4
|
+
import { VerificationMethodType } from '../../../../enums/verification-method-type.enum';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "@angular/material/dialog";
|
|
7
|
+
import * as i2 from "@firestitch/message";
|
|
8
|
+
import * as i3 from "@firestitch/dialog";
|
|
9
|
+
import * as i4 from "../verification-methods/verification-methods.component";
|
|
10
|
+
import * as i5 from "@angular/material/button";
|
|
11
|
+
export class NumbersComponent {
|
|
12
|
+
constructor(_data, _dialogRef, _message) {
|
|
13
|
+
this._data = _data;
|
|
14
|
+
this._dialogRef = _dialogRef;
|
|
15
|
+
this._message = _message;
|
|
16
|
+
this.VerificationMethodType = VerificationMethodType;
|
|
17
|
+
this.twoFactorManageService = _data.twoFactorManageService;
|
|
18
|
+
this.defaultCountry = _data.defaultCountry;
|
|
19
|
+
}
|
|
20
|
+
add() {
|
|
21
|
+
this.twoFactorManageService.addSms(this.defaultCountry)
|
|
22
|
+
.subscribe();
|
|
23
|
+
}
|
|
24
|
+
deleted() {
|
|
25
|
+
this._message.success('Deleted text message verification method');
|
|
26
|
+
if (!this.twoFactorManageService.hasVerificationMethod(VerificationMethodType.Sms)) {
|
|
27
|
+
this._dialogRef.close();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
NumbersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NumbersComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
|
|
32
|
+
NumbersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NumbersComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog>\n <h1 mat-dialog-title>\n Text Message Numbers\n </h1>\n <mat-dialog-content>\n <app-verification-methods\n [type]=\"VerificationMethodType.Sms\"\n [twoFactorManageService]=\"twoFactorManageService\"\n (deleted)=\"deleted()\">\n </app-verification-methods>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [mat-dialog-close]=\"undefined\">\n Close\n </button>\n <button\n mat-button\n (click)=\"add()\"\n type=\"button\">\n Add Number\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [""], components: [{ type: i3.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i4.VerificationMethodsComponent, selector: "app-verification-methods", inputs: ["twoFactorManageService", "type"], outputs: ["deleted"] }, { type: i5.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: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NumbersComponent, decorators: [{
|
|
34
|
+
type: Component,
|
|
35
|
+
args: [{
|
|
36
|
+
templateUrl: './numbers.component.html',
|
|
37
|
+
styleUrls: ['./numbers.component.scss'],
|
|
38
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
39
|
+
}]
|
|
40
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
41
|
+
type: Inject,
|
|
42
|
+
args: [MAT_DIALOG_DATA]
|
|
43
|
+
}] }, { type: i1.MatDialogRef }, { type: i2.FsMessage }]; } });
|
|
44
44
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnVtYmVycy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvbWFuYWdlL2NvbXBvbmVudHMvbnVtYmVycy9udW1iZXJzLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9hcHAvbW9kdWxlcy9tYW5hZ2UvY29tcG9uZW50cy9udW1iZXJzL251bWJlcnMuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLFNBQVMsRUFBRSxNQUFNLEVBQUUsdUJBQXVCLEdBQzNDLE1BQU0sZUFBZSxDQUFDO0FBRXZCLE9BQU8sRUFBRSxZQUFZLEVBQUUsZUFBZSxFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFDekUsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQ2hELE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLGlEQUFpRCxDQUFDOzs7Ozs7O0FBU3pGLE1BQU0sT0FBTyxnQkFBZ0I7SUFNM0IsWUFDbUMsS0FBV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bi1tZXRob2RzPlxuICA8L21hdC1kaWFsb2ctY29udGVudD5cbiAgPG1hdC1kaWFsb2ctYWN0aW9ucz5cbiAgICA8YnV0dG9uXG4gICAgICAgIG1hdC1idXR0b25cbiAgICAgICAgdHlwZT1cImJ1dHRvblwiXG4gICAgICAgIGNvbG9yPVwicHJpbWFyeVwiXG4gICAgICAgIFttYXQtZGlhbG9nLWNsb3NlXT1cInVuZGVmaW5lZFwiPlxuICAgICAgQ2xvc2VcbiAgICA8L2J1dHRvbj5cbiAgICA8YnV0dG9uXG4gICAgICAgIG1hdC1idXR0b25cbiAgICAgICAgKGNsaWNrKT1cImFkZCgpXCJcbiAgICAgICAgdHlwZT1cImJ1dHRvblwiPlxuICAgICAgQWRkIE51bWJlclxuICAgIDwvYnV0dG9uPlxuICA8L21hdC1kaWFsb2ctYWN0aW9ucz5cbjwvZnMtZGlhbG9nPlxuIl19
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './verification-methods.component';
|
|
1
|
+
export * from './verification-methods.component';
|
|
2
2
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvbWFuYWdlL2NvbXBvbmVudHMvdmVyaWZpY2F0aW9uLW1ldGhvZHMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxrQ0FBa0MsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vdmVyaWZpY2F0aW9uLW1ldGhvZHMuY29tcG9uZW50JztcbiJdfQ==
|
package/esm2015/app/modules/manage/components/verification-methods/verification-methods.component.js
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import { Component, ChangeDetectionStrategy, Input, Output, EventEmitter, } from '@angular/core';
|
|
2
|
-
import { FsPrompt } from '@firestitch/prompt';
|
|
3
|
-
import { map, switchMap } from 'rxjs/operators';
|
|
4
|
-
import { TwoFactorManageService } from '../../services';
|
|
5
|
-
import { VerificationMethodType } from '../../../../enums/verification-method-type.enum';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
import * as i1 from "@firestitch/prompt";
|
|
8
|
-
import * as i2 from "@firestitch/list";
|
|
9
|
-
import * as i3 from "@firestitch/country";
|
|
10
|
-
import * as i4 from "../../../defaulted/components/defaulted/defaulted.component";
|
|
11
|
-
import * as i5 from "@angular/common";
|
|
12
|
-
import * as i6 from "@firestitch/phone";
|
|
13
|
-
export class VerificationMethodsComponent {
|
|
14
|
-
constructor(_prompt) {
|
|
15
|
-
this._prompt = _prompt;
|
|
16
|
-
this.deleted = new EventEmitter();
|
|
17
|
-
this.VerificationMethodType = VerificationMethodType;
|
|
18
|
-
}
|
|
19
|
-
ngOnInit() {
|
|
20
|
-
this.listConfig = {
|
|
21
|
-
rowActions: [
|
|
22
|
-
{
|
|
23
|
-
click: (verificationMethod) => {
|
|
24
|
-
this._prompt.confirm({
|
|
25
|
-
title: 'Confirm',
|
|
26
|
-
template: 'Would you like to delete this verification method?',
|
|
27
|
-
})
|
|
28
|
-
.pipe(switchMap(() => this.twoFactorManageService.accountVerify()), switchMap(() => this.twoFactorManageService
|
|
29
|
-
.verificationMethodDelete(verificationMethod)))
|
|
30
|
-
.subscribe(() => {
|
|
31
|
-
this.deleted.emit(verificationMethod);
|
|
32
|
-
});
|
|
33
|
-
},
|
|
34
|
-
label: 'Delete',
|
|
35
|
-
},
|
|
36
|
-
],
|
|
37
|
-
fetch: () => {
|
|
38
|
-
return this.twoFactorManageService.verificationMethods$
|
|
39
|
-
.pipe(map((verificationMethods) => ({
|
|
40
|
-
data: verificationMethods.filter((verificationMethod) => {
|
|
41
|
-
return verificationMethod.type === this.type;
|
|
42
|
-
}),
|
|
43
|
-
})));
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
VerificationMethodsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: VerificationMethodsComponent, deps: [{ token: i1.FsPrompt }], target: i0.ɵɵFactoryTarget.Component });
|
|
49
|
-
VerificationMethodsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: VerificationMethodsComponent, selector: "app-verification-methods", inputs: { twoFactorManageService: "twoFactorManageService", type: "type" }, outputs: { deleted: "deleted" }, ngImport: i0, template: "<fs-list [config]=\"listConfig\">\n <fs-list-column class=\"col-name\">\n <ng-template fs-list-cell let-row=\"row\">\n <div class=\"row\">\n <ng-container *ngIf=\"row.type === VerificationMethodType.Sms\">\n <fs-country [code]=\"row.phoneCountry\" [showName]=\"false\"></fs-country> {{row.phoneNumber | fsPhone}}\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.Email\">\n {{row.email}}\n </ng-container>\n \n <app-defaulted *ngIf=\"row.default\"></app-defaulted>\n </div>\n </ng-template>\n </fs-list-column>\n</fs-list>", styles: [":host ::ng-deep .col-name .row{display:flex;align-items:center}fs-country{margin-right:5px}app-defaulted{margin-left:5px}\n"], components: [{ type: i2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i3.FsCountryComponent, selector: "fs-country", inputs: ["code", "showIcon", "showName", "region", "width"] }, { type: i4.DefaultedComponent, selector: "app-defaulted" }], directives: [{ type: i2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "fsPhone": i6.FsPhonePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: VerificationMethodsComponent, decorators: [{
|
|
51
|
-
type: Component,
|
|
52
|
-
args: [{
|
|
53
|
-
selector: 'app-verification-methods',
|
|
54
|
-
templateUrl: './verification-methods.component.html',
|
|
55
|
-
styleUrls: ['./verification-methods.component.scss'],
|
|
56
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
57
|
-
}]
|
|
58
|
-
}], ctorParameters: function () { return [{ type: i1.FsPrompt }]; }, propDecorators: { twoFactorManageService: [{
|
|
59
|
-
type: Input
|
|
60
|
-
}], type: [{
|
|
61
|
-
type: Input
|
|
62
|
-
}], deleted: [{
|
|
63
|
-
type: Output
|
|
64
|
-
}] } });
|
|
1
|
+
import { Component, ChangeDetectionStrategy, Input, Output, EventEmitter, } from '@angular/core';
|
|
2
|
+
import { FsPrompt } from '@firestitch/prompt';
|
|
3
|
+
import { map, switchMap } from 'rxjs/operators';
|
|
4
|
+
import { TwoFactorManageService } from '../../services';
|
|
5
|
+
import { VerificationMethodType } from '../../../../enums/verification-method-type.enum';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
import * as i1 from "@firestitch/prompt";
|
|
8
|
+
import * as i2 from "@firestitch/list";
|
|
9
|
+
import * as i3 from "@firestitch/country";
|
|
10
|
+
import * as i4 from "../../../defaulted/components/defaulted/defaulted.component";
|
|
11
|
+
import * as i5 from "@angular/common";
|
|
12
|
+
import * as i6 from "@firestitch/phone";
|
|
13
|
+
export class VerificationMethodsComponent {
|
|
14
|
+
constructor(_prompt) {
|
|
15
|
+
this._prompt = _prompt;
|
|
16
|
+
this.deleted = new EventEmitter();
|
|
17
|
+
this.VerificationMethodType = VerificationMethodType;
|
|
18
|
+
}
|
|
19
|
+
ngOnInit() {
|
|
20
|
+
this.listConfig = {
|
|
21
|
+
rowActions: [
|
|
22
|
+
{
|
|
23
|
+
click: (verificationMethod) => {
|
|
24
|
+
this._prompt.confirm({
|
|
25
|
+
title: 'Confirm',
|
|
26
|
+
template: 'Would you like to delete this verification method?',
|
|
27
|
+
})
|
|
28
|
+
.pipe(switchMap(() => this.twoFactorManageService.accountVerify()), switchMap(() => this.twoFactorManageService
|
|
29
|
+
.verificationMethodDelete(verificationMethod)))
|
|
30
|
+
.subscribe(() => {
|
|
31
|
+
this.deleted.emit(verificationMethod);
|
|
32
|
+
});
|
|
33
|
+
},
|
|
34
|
+
label: 'Delete',
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
fetch: () => {
|
|
38
|
+
return this.twoFactorManageService.verificationMethods$
|
|
39
|
+
.pipe(map((verificationMethods) => ({
|
|
40
|
+
data: verificationMethods.filter((verificationMethod) => {
|
|
41
|
+
return verificationMethod.type === this.type;
|
|
42
|
+
}),
|
|
43
|
+
})));
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
VerificationMethodsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: VerificationMethodsComponent, deps: [{ token: i1.FsPrompt }], target: i0.ɵɵFactoryTarget.Component });
|
|
49
|
+
VerificationMethodsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: VerificationMethodsComponent, selector: "app-verification-methods", inputs: { twoFactorManageService: "twoFactorManageService", type: "type" }, outputs: { deleted: "deleted" }, ngImport: i0, template: "<fs-list [config]=\"listConfig\">\n <fs-list-column class=\"col-name\">\n <ng-template fs-list-cell let-row=\"row\">\n <div class=\"row\">\n <ng-container *ngIf=\"row.type === VerificationMethodType.Sms\">\n <fs-country [code]=\"row.phoneCountry\" [showName]=\"false\"></fs-country> {{row.phoneNumber | fsPhone}}\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.Email\">\n {{row.email}}\n </ng-container>\n \n <app-defaulted *ngIf=\"row.default\"></app-defaulted>\n </div>\n </ng-template>\n </fs-list-column>\n</fs-list>", styles: [":host ::ng-deep .col-name .row{display:flex;align-items:center}fs-country{margin-right:5px}app-defaulted{margin-left:5px}\n"], components: [{ type: i2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i3.FsCountryComponent, selector: "fs-country", inputs: ["code", "showIcon", "showName", "region", "width"] }, { type: i4.DefaultedComponent, selector: "app-defaulted" }], directives: [{ type: i2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "fsPhone": i6.FsPhonePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: VerificationMethodsComponent, decorators: [{
|
|
51
|
+
type: Component,
|
|
52
|
+
args: [{
|
|
53
|
+
selector: 'app-verification-methods',
|
|
54
|
+
templateUrl: './verification-methods.component.html',
|
|
55
|
+
styleUrls: ['./verification-methods.component.scss'],
|
|
56
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
57
|
+
}]
|
|
58
|
+
}], ctorParameters: function () { return [{ type: i1.FsPrompt }]; }, propDecorators: { twoFactorManageService: [{
|
|
59
|
+
type: Input
|
|
60
|
+
}], type: [{
|
|
61
|
+
type: Input
|
|
62
|
+
}], deleted: [{
|
|
63
|
+
type: Output
|
|
64
|
+
}] } });
|
|
65
65
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyaWZpY2F0aW9uLW1ldGhvZHMuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2FwcC9tb2R1bGVzL21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ZXRob2Q/JyxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgIC5waXBlKFxuICAgICAgICAgICAgICAgIHN3aXRjaE1hcCgoKSA9PiB0aGlzLnR3b0ZhY3Rvck1hbmFnZVNlcnZpY2UuYWNjb3VudFZlcmlmeSgpKSxcbiAgICAgICAgICAgICAgICBzd2l0Y2hNYXAoKCkgPT4gdGhpcy50d29GYWN0b3JNYW5hZ2VTZXJ2aWNlXG4gICAgICAgICAgICAgICAgICAudmVyaWZpY2F0aW9uTWV0aG9kRGVsZXRlKHZlcmlmaWNhdGlvbk1ldGhvZCkpLFxuICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgIC5zdWJzY3JpYmUoKCkgPT4ge1xuICAgICAgICAgICAgICAgIHRoaXMuZGVsZXRlZC5lbWl0KHZlcmlmaWNhdGlvbk1ldGhvZCk7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0sXG4gICAgICAgICAgbGFiZWw6ICdEZWxldGUnLFxuICAgICAgICB9LFxuICAgICAgXSxcbiAgICAgIGZldGNoOiAoKSA9PiB7XG4gICAgICAgIHJldHVybiB0aGlzLnR3b0ZhY3Rvck1hbmFnZVNlcnZpY2UudmVyaWZpY2F0aW9uTWV0aG9kcyRcbiAgICAgICAgICAucGlwZShcbiAgICAgICAgICAgIG1hcCgodmVyaWZpY2F0aW9uTWV0aG9kcykgPT4gKHtcbiAgICAgICAgICAgICAgZGF0YTogdmVyaWZpY2F0aW9uTWV0aG9kcy5maWx0ZXIoKHZlcmlmaWNhdGlvbk1ldGhvZCkgPT4ge1xuICAgICAgICAgICAgICAgIHJldHVybiB2ZXJpZmljYXRpb25NZXRob2QudHlwZSA9PT0gdGhpcy50eXBlO1xuICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgfSxcbiAgICB9O1xuICB9XG59XG4iLCI8ZnMtbGlzdCBbY29uZmlnXT1cImxpc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