@firestitch/2fa 12.11.1 → 12.11.3
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/index.d.ts +1 -1
- package/app/enums/verification-method-type.enum.d.ts +5 -5
- package/app/interfaces/index.d.ts +1 -1
- package/app/interfaces/verification-method.interface.d.ts +11 -11
- package/app/modules/code-input/code-input.module.d.ts +9 -9
- 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 +30 -30
- package/app/modules/manage/components/2fa-manage/index.d.ts +1 -1
- package/app/modules/manage/components/app/app.component.d.ts +32 -32
- package/app/modules/manage/components/app/index.d.ts +1 -1
- package/app/modules/manage/components/email/email.component.d.ts +27 -27
- package/app/modules/manage/components/email/index.d.ts +1 -1
- package/app/modules/manage/components/emails/emails.component.d.ts +19 -19
- 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 +28 -28
- package/app/modules/manage/components/numbers/index.d.ts +1 -1
- package/app/modules/manage/components/numbers/numbers.component.d.ts +20 -20
- package/app/modules/manage/components/qr-code/index.d.ts +1 -1
- package/app/modules/manage/components/qr-code/qr-code.component.d.ts +11 -11
- package/app/modules/manage/fs-2f-manage.module.d.ts +33 -33
- package/app/modules/manage/services/index.d.ts +1 -1
- package/app/modules/manage/services/two-factor-manage.service.d.ts +52 -52
- 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 +38 -38
- package/app/modules/verification/components/2fa-verification-code/2fa-verification-code.component.d.ts +20 -20
- package/app/modules/verification/components/2fa-verification-methods/2fa-verification-methods.component.d.ts +22 -22
- package/app/modules/verification/directives/2fa-verification-resend.directive.d.ts +11 -11
- package/app/modules/verification/directives/index.d.ts +1 -1
- package/app/modules/verification/fs-2fa-verification.module.d.ts +25 -25
- package/app/modules/verification-methods/components/verification-methods/index.d.ts +1 -1
- package/app/modules/verification-methods/components/verification-methods/verification-methods.component.d.ts +26 -26
- package/app/modules/verification-methods/fs-2f-verification-methods.module.d.ts +14 -14
- package/app/modules/verification-methods/index.d.ts +1 -1
- package/bundles/firestitch-2fa.umd.js +1464 -1464
- package/bundles/firestitch-2fa.umd.js.map +1 -1
- package/esm2015/app/enums/index.js +1 -1
- package/esm2015/app/enums/verification-method-type.enum.js +6 -6
- package/esm2015/app/interfaces/index.js +1 -1
- package/esm2015/app/interfaces/verification-method.interface.js +1 -1
- package/esm2015/app/modules/code-input/code-input.module.js +29 -29
- package/esm2015/app/modules/code-input/components/code-input/code-input.component.js +36 -36
- 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 +103 -103
- package/esm2015/app/modules/manage/components/2fa-manage/index.js +1 -1
- package/esm2015/app/modules/manage/components/app/app.component.js +87 -87
- 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 +49 -49
- 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 +127 -127
- 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 +50 -50
- package/esm2015/app/modules/manage/components/qr-code/index.js +1 -1
- package/esm2015/app/modules/manage/components/qr-code/qr-code.component.js +35 -35
- package/esm2015/app/modules/manage/fs-2f-manage.module.js +116 -116
- package/esm2015/app/modules/manage/services/index.js +1 -1
- package/esm2015/app/modules/manage/services/two-factor-manage.service.js +160 -160
- 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 +128 -128
- package/esm2015/app/modules/verification/components/2fa-verification-code/2fa-verification-code.component.js +60 -60
- package/esm2015/app/modules/verification/components/2fa-verification-methods/2fa-verification-methods.component.js +60 -60
- package/esm2015/app/modules/verification/directives/2fa-verification-resend.directive.js +31 -31
- package/esm2015/app/modules/verification/directives/index.js +1 -1
- package/esm2015/app/modules/verification/fs-2fa-verification.module.js +96 -96
- package/esm2015/app/modules/verification-methods/components/verification-methods/index.js +1 -1
- package/esm2015/app/modules/verification-methods/components/verification-methods/verification-methods.component.js +120 -120
- package/esm2015/app/modules/verification-methods/fs-2f-verification-methods.module.js +47 -47
- package/esm2015/app/modules/verification-methods/index.js +1 -1
- package/esm2015/firestitch-2fa.js +4 -4
- package/esm2015/public_api.js +8 -8
- package/fesm2015/firestitch-2fa.js +1313 -1313
- 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 +9 -9
|
@@ -1,86 +1,86 @@
|
|
|
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 "../../../verification/components/2fa-verification/2fa-verification.component";
|
|
13
|
-
import * as i5 from "@angular/material/form-field";
|
|
14
|
-
import * as i6 from "@firestitch/phone";
|
|
15
|
-
import * as i7 from "@angular/material/checkbox";
|
|
16
|
-
import * as i8 from "@angular/material/button";
|
|
17
|
-
import * as i9 from "@angular/forms";
|
|
18
|
-
import * as i10 from "@firestitch/form";
|
|
19
|
-
import * as i11 from "@angular/common";
|
|
20
|
-
export class NumberComponent {
|
|
21
|
-
constructor(_data, _dialogRef, _cdRef, _message) {
|
|
22
|
-
this._data = _data;
|
|
23
|
-
this._dialogRef = _dialogRef;
|
|
24
|
-
this._cdRef = _cdRef;
|
|
25
|
-
this._message = _message;
|
|
26
|
-
this.trustDevice = true;
|
|
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, this.trustDevice)
|
|
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
|
-
})
|
|
50
|
-
.pipe(tap((verificationMethod) => {
|
|
51
|
-
this.verificationMethod = verificationMethod;
|
|
52
|
-
this.form.clear();
|
|
53
|
-
this._cdRef.markForCheck();
|
|
54
|
-
}));
|
|
55
|
-
}));
|
|
56
|
-
};
|
|
57
|
-
this.twoFactorManageService = _data.twoFactorManageService;
|
|
58
|
-
this.defaultCountry = _data.defaultCountry;
|
|
59
|
-
this.default = !this.twoFactorManageService.hasVerificationMethods;
|
|
60
|
-
}
|
|
61
|
-
codeCompleted() {
|
|
62
|
-
if (!this.form.submitting) {
|
|
63
|
-
this.form.triggerSubmit();
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
codeChanged(code) {
|
|
67
|
-
this.code = code;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
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 });
|
|
71
|
-
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 <fs-2fa-verification\n [verificationMethod]=\"verificationMethod\"\n (codeChanged)=\"codeChanged($event)\"\n [resend]=\"resend\"\n [formatRecipient]=\"true\"\n [(trustDevice)]=\"trustDevice\">\n </fs-2fa-verification>\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 [mode]=\"'object'\"\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}h1{display:flex;align-items:center}h1 mat-icon{margin-right:5px}\n"], components: [{ type: i3.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i4.Fs2faVerificationComponent, selector: "fs-2fa-verification", inputs: ["verificationMethod", "resend", "showTrustedDevice", "trustDevice", "trustDays", "formatRecipient", "getVerificationMethods", "selectVerificationMethod"], outputs: ["verified", "codeChanged", "codeCompleted", "trustDeviceChange"] }, { type: i5.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i6.FsPhoneFieldComponent, selector: "fs-phone-field", inputs: ["allowNumberExt", "placeholder", "required", "disabled", "mode", "country", "name"] }, { type: i7.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: i8.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: i9.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i9.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i9.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i10.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: i11.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.MatLabel, selector: "mat-label" }, { type: i9.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i9.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i10.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i9.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i10.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 });
|
|
72
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NumberComponent, decorators: [{
|
|
73
|
-
type: Component,
|
|
74
|
-
args: [{
|
|
75
|
-
templateUrl: './number.component.html',
|
|
76
|
-
styleUrls: ['./number.component.scss'],
|
|
77
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
78
|
-
}]
|
|
79
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
80
|
-
type: Inject,
|
|
81
|
-
args: [MAT_DIALOG_DATA]
|
|
82
|
-
}] }, { type: i1.MatDialogRef }, { type: i0.ChangeDetectorRef }, { type: i2.FsMessage }]; }, propDecorators: { form: [{
|
|
83
|
-
type: ViewChild,
|
|
84
|
-
args: [FsFormDirective, { static: false }]
|
|
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 "../../../verification/components/2fa-verification/2fa-verification.component";
|
|
13
|
+
import * as i5 from "@angular/material/form-field";
|
|
14
|
+
import * as i6 from "@firestitch/phone";
|
|
15
|
+
import * as i7 from "@angular/material/checkbox";
|
|
16
|
+
import * as i8 from "@angular/material/button";
|
|
17
|
+
import * as i9 from "@angular/forms";
|
|
18
|
+
import * as i10 from "@firestitch/form";
|
|
19
|
+
import * as i11 from "@angular/common";
|
|
20
|
+
export class NumberComponent {
|
|
21
|
+
constructor(_data, _dialogRef, _cdRef, _message) {
|
|
22
|
+
this._data = _data;
|
|
23
|
+
this._dialogRef = _dialogRef;
|
|
24
|
+
this._cdRef = _cdRef;
|
|
25
|
+
this._message = _message;
|
|
26
|
+
this.trustDevice = true;
|
|
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, this.trustDevice)
|
|
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
|
+
})
|
|
50
|
+
.pipe(tap((verificationMethod) => {
|
|
51
|
+
this.verificationMethod = verificationMethod;
|
|
52
|
+
this.form.clear();
|
|
53
|
+
this._cdRef.markForCheck();
|
|
54
|
+
}));
|
|
55
|
+
}));
|
|
56
|
+
};
|
|
57
|
+
this.twoFactorManageService = _data.twoFactorManageService;
|
|
58
|
+
this.defaultCountry = _data.defaultCountry;
|
|
59
|
+
this.default = !this.twoFactorManageService.hasVerificationMethods;
|
|
60
|
+
}
|
|
61
|
+
codeCompleted() {
|
|
62
|
+
if (!this.form.submitting) {
|
|
63
|
+
this.form.triggerSubmit();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
codeChanged(code) {
|
|
67
|
+
this.code = code;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
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 });
|
|
71
|
+
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 <fs-2fa-verification\n [verificationMethod]=\"verificationMethod\"\n (codeChanged)=\"codeChanged($event)\"\n [resend]=\"resend\"\n [formatRecipient]=\"true\"\n [(trustDevice)]=\"trustDevice\">\n </fs-2fa-verification>\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 [mode]=\"'object'\"\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}h1{display:flex;align-items:center}h1 mat-icon{margin-right:5px}\n"], components: [{ type: i3.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i4.Fs2faVerificationComponent, selector: "fs-2fa-verification", inputs: ["verificationMethod", "resend", "showTrustedDevice", "trustDevice", "trustDays", "formatRecipient", "getVerificationMethods", "selectVerificationMethod"], outputs: ["verified", "codeChanged", "codeCompleted", "trustDeviceChange"] }, { type: i5.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i6.FsPhoneFieldComponent, selector: "fs-phone-field", inputs: ["allowNumberExt", "placeholder", "required", "disabled", "mode", "country", "name"] }, { type: i7.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: i8.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: i9.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i9.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i9.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i10.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: i11.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.MatLabel, selector: "mat-label" }, { type: i9.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i9.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i10.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i9.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i10.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 });
|
|
72
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NumberComponent, decorators: [{
|
|
73
|
+
type: Component,
|
|
74
|
+
args: [{
|
|
75
|
+
templateUrl: './number.component.html',
|
|
76
|
+
styleUrls: ['./number.component.scss'],
|
|
77
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
78
|
+
}]
|
|
79
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
80
|
+
type: Inject,
|
|
81
|
+
args: [MAT_DIALOG_DATA]
|
|
82
|
+
}] }, { type: i1.MatDialogRef }, { type: i0.ChangeDetectorRef }, { type: i2.FsMessage }]; }, propDecorators: { form: [{
|
|
83
|
+
type: ViewChild,
|
|
84
|
+
args: [FsFormDirective, { static: false }]
|
|
85
|
+
}] } });
|
|
86
86
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnVtYmVyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9hcHAvbW9kdWxlcy9tYW5hZ2UvY29tcG9uZW50cy9udW1iZXIvbnVtYmVyLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9hcHAvbW9kdWxlcy9tYW5hZ2UvY29tcG9uZW50cy9udW1iZXIvbnVtYmVyLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxTQUFTLEVBQUUsTUFBTSxFQUFFLHVCQUF1QixFQUFFLGlCQUFpQixFQUFFLFNBQVMsR0FDekUsTUFBTSxlQUFlLENBQUM7QUFFdkIsT0FBTyxFQUFFLGVBQWUsRUFBRSxZQUFZLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUV6RSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDaEQsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBRW5ELE9BQU8sRUFBYyxFQUFFLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFDdEMsT0FBTyxFQUFFLFNBQVMsRUFBRSxHQUFHLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUVoRCxPQUFPLEVBQUUsc0JBQXNCLEVBQUUsTUFBTSxpREFBaUQsQ0FBQzs7Ozs7Ozs7Ozs7OztBQVF6RixNQUFNLE9BQU8sZUFBZTtJQWExQixZQUNtQyxLQUFVLEVBQ25DLFVBQXlDLEVBQ3pDLE1BQXlCLEV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2xvc2UodmVyaWZpY2F0aW9uTWV0aG9kKTtcbiAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgKSA6XG4gICAgICAgICAgICB0aGlzLnR3b0ZhY3Rvck1hbmFnZVNlcnZpY2UudmVyaWZpY2F0aW9uTWV0aG9kQ3JlYXRlJCh7XG4gICAgICAgICAgICAgIHR5cGU6IFZlcmlmaWNhdGlvbk1ldGhvZFR5cGUuU21zLFxuICAgICAgICAgICAgICBwaG9uZU51bWJlcjogdGhpcy5waG9uZS5udW1iZXIsXG4gICAgICAgICAgICAgIHBob25lQ29kZTogdGhpcy5waG9uZS5jb3VudHJ5Q29kZSxcbiAgICAgICAgICAgICAgcGhvbmVDb3VudHJ5OiB0aGlzLnBob25lLmlzb0NvZGUsXG4gICAgICAgICAgICAgIGRlZmF1bHQ6IHRoaXMuZGVmYXVsdCxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAucGlwZShcbiAgICAgICAgICAgICAgdGFwKCh2ZXJpZmljYXRpb25NZXRob2QpID0+IHtcbiAgICAgICAgICAgICAgICB0aGlzLnZlcmlmaWNhdGlvbk1ldGhvZCA9IHZlcmlmaWNhdGlvbk1ldGhvZDtcbiAgICAgICAgICAgICAgICB0aGlzLmZvcm0uY2xlYXIoKTtcbiAgICAgICAgICAgICAgICB0aGlzLl9jZFJlZi5tYXJrRm9yQ2hlY2soKTtcbiAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICApO1xuICAgICAgICB9KSxcbiAgICAgICk7XG4gIH07XG5cbiAgcHVibGljIGNvZGVDb21wbGV0ZWQoKTogdm9pZCB7XG4gICAgaWYoIXRoaXMuZm9ybS5zdWJtaXR0aW5nKSB7XG4gICAgICB0aGlzLmZvcm0udHJpZ2dlclN1Ym1pdCgpO1xuICAgIH1cbiAgfVxuXG4gIHB1YmxpYyBjb2RlQ2hhbmdlZChjb2RlKTogdm9pZCB7XG4gICAgdGhpcy5jb2RlID0gY29kZTtcbiAgfVxuXG59XG4i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xuICAgICAgICAgIDxmcy1waG9uZS1maWVsZFxuICAgICAgICAgICAgWyhuZ01vZGVsKV09XCJwaG9uZVwiXG4gICAgICAgICAgICBbY291bnRyeV09XCJkZWZhdWx0Q291bnRyeVwiXG4gICAgICAgICAgICBuYW1lPVwicGhvbmVcIlxuICAgICAgICAgICAgW21vZGVdPVwiJ29iamVjdCdcIlxuICAgICAgICAgICAgYXV0b2NvbXBsZXRlPVwib2ZmXCJcbiAgICAgICAgICAgIFtyZXF1aXJlZF09XCJ0cnVlXCI+XG4gICAgICAgICAgPC9mcy1waG9uZS1maWVsZD5cbiAgICAgICAgPC9tYXQtZm9ybS1maWVsZD5cbiAgICAgICAgPG1hdC1jaGVja2JveCBcbiAgICAgICAgICAgIG5hbWU9XCJkZWZhdWx0XCJcbiAgICAgICAgICAgIFsobmdNb2RlbCldPVwiZGVmYXVsdFwiXG4gICAgICAgICAgICBbZGlzYWJsZVJpcHBsZV09XCJ0cnVlXCI+XG4gICAgICAgICAgTWFrZSB0aGlzIHRoZSBkZWZhdWx0IDItc3RlcCB2ZXJpZmljYXRpb24gbWV0aG9kXG4gICAgICAgIDwvbWF0LWNoZWNrYm94PlxuICAgICAgPC9uZy10ZW1wbGF0ZT5cbiAgICA8L21hdC1kaWFsb2ctY29udGVudD5cbiAgICA8bWF0LWRpYWxvZy1hY3Rpb25zPlxuICAgICAgPGJ1dHRvblxuICAgICAgICAgIG1hdC1idXR0b25cbiAgICAgICAgICBjb2xvcj1cInByaW1hcnlcIlxuICAgICAgICAgIHR5cGU9XCJzdWJtaXRcIj5cbiAgICAgICAgTmV4dFxuICAgICAgPC9idXR0b24+XG4gICAgICA8YnV0dG9uXG4gICAgICAgICAgbWF0LWJ1dHRvblxuICAgICAgICAgIHR5cGU9XCJidXR0b25cIlxuICAgICAgICAgIFttYXQtZGlhbG9nLWNsb3NlXT1cInVuZGVmaW5lZFwiPlxuICAgICAgICBDYW5jZWxcbiAgICAgIDwvYnV0dG9uPlxuICAgIDwvbWF0LWRpYWxvZy1hY3Rpb25zPlxuICA8L2ZzLWRpYWxvZz5cbjwvZm9ybT5cbiJdfQ==
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './numbers.component';
|
|
1
|
+
export * from './numbers.component';
|
|
2
2
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvbWFuYWdlL2NvbXBvbmVudHMvbnVtYmVycy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHFCQUFxQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9udW1iZXJzLmNvbXBvbmVudCc7XG4iXX0=
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { Component, Inject, ChangeDetectionStrategy, ViewChild, } from '@angular/core';
|
|
2
|
-
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
3
|
-
import { FsMessage } from '@firestitch/message';
|
|
4
|
-
import { VerificationMethodsComponent } from '../../../../modules/verification-methods/components/verification-methods';
|
|
5
|
-
import { VerificationMethodType } from '../../../../enums/verification-method-type.enum';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
import * as i1 from "@angular/material/dialog";
|
|
8
|
-
import * as i2 from "@firestitch/message";
|
|
9
|
-
import * as i3 from "@firestitch/dialog";
|
|
10
|
-
import * as i4 from "@angular/material/icon";
|
|
11
|
-
import * as i5 from "../../../verification-methods/components/verification-methods/verification-methods.component";
|
|
12
|
-
import * as i6 from "@angular/material/button";
|
|
13
|
-
export class NumbersComponent {
|
|
14
|
-
constructor(_data, _dialogRef, _message) {
|
|
15
|
-
this._data = _data;
|
|
16
|
-
this._dialogRef = _dialogRef;
|
|
17
|
-
this._message = _message;
|
|
18
|
-
this.VerificationMethodType = VerificationMethodType;
|
|
19
|
-
this.twoFactorManageService = _data.twoFactorManageService;
|
|
20
|
-
this.defaultCountry = _data.defaultCountry;
|
|
21
|
-
}
|
|
22
|
-
add() {
|
|
23
|
-
this.twoFactorManageService.addSms$(this.defaultCountry)
|
|
24
|
-
.subscribe(() => {
|
|
25
|
-
this.verificationMethods.reload();
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
deleted() {
|
|
29
|
-
this._message.success('Deleted text message verification method');
|
|
30
|
-
if (!this.twoFactorManageService.hasVerificationMethod(VerificationMethodType.Sms)) {
|
|
31
|
-
this._dialogRef.close();
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
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 });
|
|
36
|
-
NumbersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NumbersComponent, selector: "ng-component", viewQueries: [{ propertyName: "verificationMethods", first: true, predicate: VerificationMethodsComponent, descendants: true }], ngImport: i0, template: "<fs-dialog>\n <h1 mat-dialog-title>\n <mat-icon>textsms</mat-icon> Text Message Numbers\n </h1>\n <mat-dialog-content>\n <fs-2fa-verification-methods\n [type]=\"VerificationMethodType.Sms\"\n [twoFactorManageService]=\"twoFactorManageService\"\n (deleted)=\"deleted()\">\n </fs-2fa-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.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i5.VerificationMethodsComponent, selector: "fs-2fa-verification-methods", inputs: ["type", "accountVerify", "verificationMethodsFetch", "verificationMethodDelete", "verificationMethodDefault", "twoFactorManageService"], outputs: ["deleted"] }, { 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: 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 });
|
|
37
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NumbersComponent, decorators: [{
|
|
38
|
-
type: Component,
|
|
39
|
-
args: [{
|
|
40
|
-
templateUrl: './numbers.component.html',
|
|
41
|
-
styleUrls: ['./numbers.component.scss'],
|
|
42
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
43
|
-
}]
|
|
44
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
45
|
-
type: Inject,
|
|
46
|
-
args: [MAT_DIALOG_DATA]
|
|
47
|
-
}] }, { type: i1.MatDialogRef }, { type: i2.FsMessage }]; }, propDecorators: { verificationMethods: [{
|
|
48
|
-
type: ViewChild,
|
|
49
|
-
args: [VerificationMethodsComponent]
|
|
50
|
-
}] } });
|
|
1
|
+
import { Component, Inject, ChangeDetectionStrategy, ViewChild, } from '@angular/core';
|
|
2
|
+
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
3
|
+
import { FsMessage } from '@firestitch/message';
|
|
4
|
+
import { VerificationMethodsComponent } from '../../../../modules/verification-methods/components/verification-methods';
|
|
5
|
+
import { VerificationMethodType } from '../../../../enums/verification-method-type.enum';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
import * as i1 from "@angular/material/dialog";
|
|
8
|
+
import * as i2 from "@firestitch/message";
|
|
9
|
+
import * as i3 from "@firestitch/dialog";
|
|
10
|
+
import * as i4 from "@angular/material/icon";
|
|
11
|
+
import * as i5 from "../../../verification-methods/components/verification-methods/verification-methods.component";
|
|
12
|
+
import * as i6 from "@angular/material/button";
|
|
13
|
+
export class NumbersComponent {
|
|
14
|
+
constructor(_data, _dialogRef, _message) {
|
|
15
|
+
this._data = _data;
|
|
16
|
+
this._dialogRef = _dialogRef;
|
|
17
|
+
this._message = _message;
|
|
18
|
+
this.VerificationMethodType = VerificationMethodType;
|
|
19
|
+
this.twoFactorManageService = _data.twoFactorManageService;
|
|
20
|
+
this.defaultCountry = _data.defaultCountry;
|
|
21
|
+
}
|
|
22
|
+
add() {
|
|
23
|
+
this.twoFactorManageService.addSms$(this.defaultCountry)
|
|
24
|
+
.subscribe(() => {
|
|
25
|
+
this.verificationMethods.reload();
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
deleted() {
|
|
29
|
+
this._message.success('Deleted text message verification method');
|
|
30
|
+
if (!this.twoFactorManageService.hasVerificationMethod(VerificationMethodType.Sms)) {
|
|
31
|
+
this._dialogRef.close();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
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 });
|
|
36
|
+
NumbersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NumbersComponent, selector: "ng-component", viewQueries: [{ propertyName: "verificationMethods", first: true, predicate: VerificationMethodsComponent, descendants: true }], ngImport: i0, template: "<fs-dialog>\n <h1 mat-dialog-title>\n <mat-icon>textsms</mat-icon> Text Message Numbers\n </h1>\n <mat-dialog-content>\n <fs-2fa-verification-methods\n [type]=\"VerificationMethodType.Sms\"\n [twoFactorManageService]=\"twoFactorManageService\"\n (deleted)=\"deleted()\">\n </fs-2fa-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.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i5.VerificationMethodsComponent, selector: "fs-2fa-verification-methods", inputs: ["type", "accountVerify", "verificationMethodsFetch", "verificationMethodDelete", "verificationMethodDefault", "twoFactorManageService"], outputs: ["deleted"] }, { 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: 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 });
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NumbersComponent, decorators: [{
|
|
38
|
+
type: Component,
|
|
39
|
+
args: [{
|
|
40
|
+
templateUrl: './numbers.component.html',
|
|
41
|
+
styleUrls: ['./numbers.component.scss'],
|
|
42
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
43
|
+
}]
|
|
44
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
45
|
+
type: Inject,
|
|
46
|
+
args: [MAT_DIALOG_DATA]
|
|
47
|
+
}] }, { type: i1.MatDialogRef }, { type: i2.FsMessage }]; }, propDecorators: { verificationMethods: [{
|
|
48
|
+
type: ViewChild,
|
|
49
|
+
args: [VerificationMethodsComponent]
|
|
50
|
+
}] } });
|
|
51
51
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnVtYmVycy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvbWFuYWdlL2NvbXBvbmVudHMvbnVtYmVycy9udW1iZXJzLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9hcHAvbW9kdWxlcy9tYW5hZ2UvY29tcG9uZW50cy9udW1iZXJzL251bWJlcnMuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLFNBQVMsRUFBRSxNQUFNLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxHQUN0RCxNQUFNLGVBQWUsQ0FBQztBQUV2QixPQUFPLEVBQUUsWUFBWSxFQUFFLGVBQWUsRUFBRSxNQUFNLDBCQUEwQix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2xvc2VdPVwidW5kZWZpbmVkXCI+XG4gICAgICBDbG9zZVxuICAgIDwvYnV0dG9uPlxuICAgIDxidXR0b25cbiAgICAgICAgbWF0LWJ1dHRvblxuICAgICAgICAoY2xpY2spPVwiYWRkKClcIlxuICAgICAgICB0eXBlPVwiYnV0dG9uXCI+XG4gICAgICBBZGQgTnVtYmVyXG4gICAgPC9idXR0b24+XG4gIDwvbWF0LWRpYWxvZy1hY3Rpb25zPlxuPC9mcy1kaWFsb2c+XG4iXX0=
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './qr-code.component';
|
|
1
|
+
export * from './qr-code.component';
|
|
2
2
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvbWFuYWdlL2NvbXBvbmVudHMvcXItY29kZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHFCQUFxQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9xci1jb2RlLmNvbXBvbmVudCc7XG4iXX0=
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { Component, ChangeDetectorRef, Input, } from '@angular/core';
|
|
2
|
-
import QRCode from 'qrcode';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@angular/common";
|
|
5
|
-
export class QrCodeComponent {
|
|
6
|
-
constructor(_cdRef) {
|
|
7
|
-
this._cdRef = _cdRef;
|
|
8
|
-
}
|
|
9
|
-
ngOnInit() {
|
|
10
|
-
QRCode.toDataURL(this.value, {
|
|
11
|
-
errorCorrectionLevel: 'H',
|
|
12
|
-
width: 300,
|
|
13
|
-
height: 300,
|
|
14
|
-
})
|
|
15
|
-
.then((url) => {
|
|
16
|
-
this.image = url;
|
|
17
|
-
this._cdRef.markForCheck();
|
|
18
|
-
})
|
|
19
|
-
.catch((err) => {
|
|
20
|
-
console.error(err);
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
QrCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: QrCodeComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
25
|
-
QrCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: QrCodeComponent, selector: "app-qr-code", inputs: { value: "value" }, ngImport: i0, template: "<ng-container *ngIf=\"image\">\n <img [src]=\"image\">\n</ng-container>", styles: ["img{display:flex;margin:auto}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: QrCodeComponent, decorators: [{
|
|
27
|
-
type: Component,
|
|
28
|
-
args: [{
|
|
29
|
-
selector: 'app-qr-code',
|
|
30
|
-
templateUrl: './qr-code.component.html',
|
|
31
|
-
styleUrls: ['./qr-code.component.scss'],
|
|
32
|
-
}]
|
|
33
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { value: [{
|
|
34
|
-
type: Input
|
|
35
|
-
}] } });
|
|
1
|
+
import { Component, ChangeDetectorRef, Input, } from '@angular/core';
|
|
2
|
+
import QRCode from 'qrcode';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/common";
|
|
5
|
+
export class QrCodeComponent {
|
|
6
|
+
constructor(_cdRef) {
|
|
7
|
+
this._cdRef = _cdRef;
|
|
8
|
+
}
|
|
9
|
+
ngOnInit() {
|
|
10
|
+
QRCode.toDataURL(this.value, {
|
|
11
|
+
errorCorrectionLevel: 'H',
|
|
12
|
+
width: 300,
|
|
13
|
+
height: 300,
|
|
14
|
+
})
|
|
15
|
+
.then((url) => {
|
|
16
|
+
this.image = url;
|
|
17
|
+
this._cdRef.markForCheck();
|
|
18
|
+
})
|
|
19
|
+
.catch((err) => {
|
|
20
|
+
console.error(err);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
QrCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: QrCodeComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
25
|
+
QrCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: QrCodeComponent, selector: "app-qr-code", inputs: { value: "value" }, ngImport: i0, template: "<ng-container *ngIf=\"image\">\n <img [src]=\"image\">\n</ng-container>", styles: ["img{display:flex;margin:auto}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: QrCodeComponent, decorators: [{
|
|
27
|
+
type: Component,
|
|
28
|
+
args: [{
|
|
29
|
+
selector: 'app-qr-code',
|
|
30
|
+
templateUrl: './qr-code.component.html',
|
|
31
|
+
styleUrls: ['./qr-code.component.scss'],
|
|
32
|
+
}]
|
|
33
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { value: [{
|
|
34
|
+
type: Input
|
|
35
|
+
}] } });
|
|
36
36
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXItY29kZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvbWFuYWdlL2NvbXBvbmVudHMvcXItY29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