@firestitch/2fa 12.4.4 → 12.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/app/modules/{manage → defaulted}/components/defaulted/defaulted.component.d.ts +0 -0
  2. package/app/modules/{manage → defaulted}/components/defaulted/index.d.ts +0 -0
  3. package/app/modules/defaulted/defaulted.module.d.ts +7 -0
  4. package/app/modules/manage/components/verification-methods/verification-methods.component.d.ts +2 -0
  5. package/app/modules/manage/fs-2f-manage.module.d.ts +19 -19
  6. package/app/modules/verification-methods/components/verification-methods/verification-methods.component.d.ts +21 -0
  7. package/app/modules/verification-methods/fs-2f-verification-methods.module.d.ts +14 -0
  8. package/bundles/firestitch-2fa.umd.js +133 -15
  9. package/bundles/firestitch-2fa.umd.js.map +1 -1
  10. package/esm2015/app/modules/{manage → defaulted}/components/defaulted/defaulted.component.js +1 -1
  11. package/esm2015/app/modules/defaulted/components/defaulted/index.js +2 -0
  12. package/esm2015/app/modules/defaulted/defaulted.module.js +18 -0
  13. package/esm2015/app/modules/manage/components/app/app.component.js +3 -2
  14. package/esm2015/app/modules/manage/components/email/email.component.js +3 -2
  15. package/esm2015/app/modules/manage/components/manage-methods/manage-methods.component.js +1 -1
  16. package/esm2015/app/modules/manage/components/number/number.component.js +3 -2
  17. package/esm2015/app/modules/manage/components/verification-methods/verification-methods.component.js +5 -3
  18. package/esm2015/app/modules/manage/fs-2f-manage.module.js +7 -6
  19. package/esm2015/app/modules/verification-methods/components/verification-methods/verification-methods.component.js +66 -0
  20. package/esm2015/app/modules/verification-methods/fs-2f-verification-methods.module.js +48 -0
  21. package/esm2015/public_api.js +3 -1
  22. package/fesm2015/firestitch-2fa.js +125 -17
  23. package/fesm2015/firestitch-2fa.js.map +1 -1
  24. package/package.json +1 -1
  25. package/public_api.d.ts +2 -0
  26. package/esm2015/app/modules/manage/components/defaulted/index.js +0 -2
@@ -33,7 +33,7 @@ import { CodeInputComponent as CodeInputComponent$1, CodeInputModule as CodeInpu
33
33
  import * as i1$2 from '@angular/material/progress-spinner';
34
34
  import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
35
35
  import * as i2$1 from '@firestitch/list';
36
- import { FsListModule } from '@firestitch/list';
36
+ import { FsListModule, FsListComponent } from '@firestitch/list';
37
37
  import * as i3$4 from '@firestitch/label';
38
38
  import { FsLabelModule } from '@firestitch/label';
39
39
  import * as i7 from '@firestitch/phone';
@@ -463,7 +463,7 @@ class AppComponent {
463
463
  appTypeSelect(appType) {
464
464
  this.appType = appType;
465
465
  this.twoFactorManageService.verificationMethodCreate({
466
- type: 'app',
466
+ type: VerificationMethodType.App,
467
467
  default: this.default,
468
468
  })
469
469
  .subscribe((response) => {
@@ -522,7 +522,7 @@ class EmailComponent {
522
522
  this._dialogRef.close(verificationMethod);
523
523
  })) :
524
524
  this.twoFactorManageService.verificationMethodCreate({
525
- type: 'email',
525
+ type: VerificationMethodType.Email,
526
526
  email: this.email,
527
527
  default: this.default,
528
528
  })
@@ -585,7 +585,7 @@ class NumberComponent {
585
585
  this._dialogRef.close(verificationMethod);
586
586
  })) :
587
587
  this.twoFactorManageService.verificationMethodCreate({
588
- type: 'sms',
588
+ type: VerificationMethodType.Sms,
589
589
  phoneNumber: this.phone.number,
590
590
  phoneCode: this.phone.countryCode,
591
591
  phoneCountry: this.phone.isoCode,
@@ -764,10 +764,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
764
764
  }]
765
765
  }] });
766
766
 
767
- class VerificationMethodsComponent {
767
+ class VerificationMethodsComponent$1 {
768
768
  constructor(_prompt) {
769
769
  this._prompt = _prompt;
770
770
  this.deleted = new EventEmitter();
771
+ this.VerificationMethodType = VerificationMethodType;
771
772
  }
772
773
  ngOnInit() {
773
774
  this.listConfig = {
@@ -798,9 +799,9 @@ class VerificationMethodsComponent {
798
799
  };
799
800
  }
800
801
  }
801
- VerificationMethodsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: VerificationMethodsComponent, deps: [{ token: i1$3.FsPrompt }], target: i0.ɵɵFactoryTarget.Component });
802
- 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 === 'sms'\">\n <fs-country [code]=\"row.phoneCountry\" [showName]=\"false\"></fs-country> {{row.phoneNumber | fsPhone}}\n </ng-container>\n\n <ng-container *ngIf=\"row.type === '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$1.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i3$3.FsCountryComponent, selector: "fs-country", inputs: ["code", "showIcon", "showName", "region", "width"] }, { type: DefaultedComponent, selector: "app-defaulted" }], directives: [{ type: i2$1.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$1.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i9$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "fsPhone": i7.FsPhonePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
803
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: VerificationMethodsComponent, decorators: [{
802
+ VerificationMethodsComponent$1.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: VerificationMethodsComponent$1, deps: [{ token: i1$3.FsPrompt }], target: i0.ɵɵFactoryTarget.Component });
803
+ VerificationMethodsComponent$1.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: VerificationMethodsComponent$1, 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$1.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i3$3.FsCountryComponent, selector: "fs-country", inputs: ["code", "showIcon", "showName", "region", "width"] }, { type: DefaultedComponent, selector: "app-defaulted" }], directives: [{ type: i2$1.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$1.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i9$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "fsPhone": i7.FsPhonePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
804
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: VerificationMethodsComponent$1, decorators: [{
804
805
  type: Component,
805
806
  args: [{
806
807
  selector: 'app-verification-methods',
@@ -837,7 +838,7 @@ class NumbersComponent {
837
838
  }
838
839
  }
839
840
  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 });
840
- 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: VerificationMethodsComponent, selector: "app-verification-methods", inputs: ["twoFactorManageService", "type"], outputs: ["deleted"] }, { type: i5$1.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 });
841
+ 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: VerificationMethodsComponent$1, selector: "app-verification-methods", inputs: ["twoFactorManageService", "type"], outputs: ["deleted"] }, { type: i5$1.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 });
841
842
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NumbersComponent, decorators: [{
842
843
  type: Component,
843
844
  args: [{
@@ -870,7 +871,7 @@ class EmailsComponent {
870
871
  }
871
872
  }
872
873
  EmailsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EmailsComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
873
- EmailsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: EmailsComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog>\n <h1 mat-dialog-title>\n Emails\n </h1>\n <mat-dialog-content>\n <app-verification-methods\n [type]=\"VerificationMethodType.Email\"\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 Email\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [""], components: [{ type: i3.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: VerificationMethodsComponent, selector: "app-verification-methods", inputs: ["twoFactorManageService", "type"], outputs: ["deleted"] }, { type: i5$1.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 });
874
+ EmailsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: EmailsComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog>\n <h1 mat-dialog-title>\n Emails\n </h1>\n <mat-dialog-content>\n <app-verification-methods\n [type]=\"VerificationMethodType.Email\"\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 Email\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [""], components: [{ type: i3.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: VerificationMethodsComponent$1, selector: "app-verification-methods", inputs: ["twoFactorManageService", "type"], outputs: ["deleted"] }, { type: i5$1.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 });
874
875
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EmailsComponent, decorators: [{
875
876
  type: Component,
876
877
  args: [{
@@ -1082,6 +1083,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1082
1083
  type: Input
1083
1084
  }] } });
1084
1085
 
1086
+ class DefautledModule {
1087
+ }
1088
+ DefautledModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DefautledModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1089
+ DefautledModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DefautledModule, declarations: [DefaultedComponent], exports: [DefaultedComponent] });
1090
+ DefautledModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DefautledModule });
1091
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DefautledModule, decorators: [{
1092
+ type: NgModule,
1093
+ args: [{
1094
+ declarations: [
1095
+ DefaultedComponent,
1096
+ ],
1097
+ exports: [DefaultedComponent],
1098
+ }]
1099
+ }] });
1100
+
1085
1101
  class Fs2faManageModule {
1086
1102
  }
1087
1103
  Fs2faManageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faManageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
@@ -1090,10 +1106,9 @@ Fs2faManageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versi
1090
1106
  NumbersComponent,
1091
1107
  AppComponent,
1092
1108
  EmailComponent,
1093
- VerificationMethodsComponent,
1109
+ VerificationMethodsComponent$1,
1094
1110
  NumberComponent,
1095
- EmailsComponent,
1096
- DefaultedComponent], imports: [CommonModule,
1111
+ EmailsComponent], imports: [CommonModule,
1097
1112
  FormsModule,
1098
1113
  MatButtonModule,
1099
1114
  MatDialogModule,
@@ -1109,7 +1124,8 @@ Fs2faManageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versi
1109
1124
  FsCountryModule,
1110
1125
  CodeInputModule,
1111
1126
  QrCodeModule,
1112
- ResendModule], exports: [Fs2faManageComponent] });
1127
+ ResendModule,
1128
+ DefautledModule], exports: [Fs2faManageComponent] });
1113
1129
  Fs2faManageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faManageModule, imports: [[
1114
1130
  CommonModule,
1115
1131
  FormsModule,
@@ -1128,6 +1144,7 @@ Fs2faManageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versi
1128
1144
  CodeInputModule,
1129
1145
  QrCodeModule,
1130
1146
  ResendModule,
1147
+ DefautledModule,
1131
1148
  ]] });
1132
1149
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faManageModule, decorators: [{
1133
1150
  type: NgModule,
@@ -1150,6 +1167,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1150
1167
  CodeInputModule,
1151
1168
  QrCodeModule,
1152
1169
  ResendModule,
1170
+ DefautledModule,
1153
1171
  ],
1154
1172
  declarations: [
1155
1173
  Fs2faManageComponent,
@@ -1157,18 +1175,108 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1157
1175
  NumbersComponent,
1158
1176
  AppComponent,
1159
1177
  EmailComponent,
1160
- VerificationMethodsComponent,
1178
+ VerificationMethodsComponent$1,
1161
1179
  NumberComponent,
1162
1180
  EmailsComponent,
1163
- DefaultedComponent,
1164
1181
  ],
1165
1182
  exports: [Fs2faManageComponent],
1166
1183
  }]
1167
1184
  }] });
1168
1185
 
1186
+ class VerificationMethodsComponent {
1187
+ constructor(_prompt) {
1188
+ this._prompt = _prompt;
1189
+ this.VerificationMethodType = VerificationMethodType;
1190
+ }
1191
+ ngOnInit() {
1192
+ this.listConfig = {
1193
+ paging: false,
1194
+ rowActions: [
1195
+ {
1196
+ click: (verificationMethod) => {
1197
+ this._prompt.confirm({
1198
+ title: 'Confirm',
1199
+ template: 'Would you like to delete this verification method?',
1200
+ })
1201
+ .pipe(switchMap(() => this.accountVerify()), switchMap(() => this.verificationMethodDelete(verificationMethod)))
1202
+ .subscribe(() => {
1203
+ this.list.reload();
1204
+ });
1205
+ },
1206
+ label: 'Delete',
1207
+ },
1208
+ ],
1209
+ fetch: (query) => {
1210
+ return this.verificationMethodsFetch(query)
1211
+ .pipe(map((verificationMethods) => ({
1212
+ data: verificationMethods,
1213
+ })));
1214
+ },
1215
+ };
1216
+ }
1217
+ }
1218
+ VerificationMethodsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: VerificationMethodsComponent, deps: [{ token: i1$3.FsPrompt }], target: i0.ɵɵFactoryTarget.Component });
1219
+ VerificationMethodsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: VerificationMethodsComponent, selector: "fs-2fa-verification-methods", inputs: { accountVerify: "accountVerify", verificationMethodsFetch: "verificationMethodsFetch", verificationMethodDelete: "verificationMethodDelete" }, viewQueries: [{ propertyName: "list", first: true, predicate: FsListComponent, descendants: true }], ngImport: i0, template: "<fs-list [config]=\"listConfig\">\n <fs-list-column class=\"col-icon\" width=\"1%\">\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.type === VerificationMethodType.Sms\">\n <mat-icon>textsms</mat-icon>\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.Email\">\n <mat-icon>email</mat-icon>\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.App\">\n <mat-icon>phone_iphone</mat-icon>\n </ng-container>\n </ng-template>\n </fs-list-column>\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 <div class=\"row\">\n <fs-country [code]=\"row.phoneCountry\" [showName]=\"false\"></fs-country> \n <span>{{row.phoneNumber | fsPhone}}</span>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.Email\">\n {{row.email}}\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.App\">\n App\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}:host ::ng-deep .col-name fs-country img{display:flex}fs-country{margin-right:5px}app-defaulted{margin-left:5px}\n"], components: [{ type: i2$1.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3$3.FsCountryComponent, selector: "fs-country", inputs: ["code", "showIcon", "showName", "region", "width"] }, { type: DefaultedComponent, selector: "app-defaulted" }], directives: [{ type: i2$1.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$1.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i9$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "fsPhone": i7.FsPhonePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1220
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: VerificationMethodsComponent, decorators: [{
1221
+ type: Component,
1222
+ args: [{
1223
+ selector: 'fs-2fa-verification-methods',
1224
+ templateUrl: './verification-methods.component.html',
1225
+ styleUrls: ['./verification-methods.component.scss'],
1226
+ changeDetection: ChangeDetectionStrategy.OnPush,
1227
+ }]
1228
+ }], ctorParameters: function () { return [{ type: i1$3.FsPrompt }]; }, propDecorators: { list: [{
1229
+ type: ViewChild,
1230
+ args: [FsListComponent]
1231
+ }], accountVerify: [{
1232
+ type: Input
1233
+ }], verificationMethodsFetch: [{
1234
+ type: Input
1235
+ }], verificationMethodDelete: [{
1236
+ type: Input
1237
+ }] } });
1238
+
1239
+ class Fs2faVerificationMethodsModule {
1240
+ }
1241
+ Fs2faVerificationMethodsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationMethodsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1242
+ Fs2faVerificationMethodsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationMethodsModule, declarations: [VerificationMethodsComponent], imports: [CommonModule,
1243
+ FormsModule,
1244
+ MatIconModule,
1245
+ FsListModule,
1246
+ FsPhoneModule,
1247
+ FsCountryModule,
1248
+ DefautledModule], exports: [VerificationMethodsComponent] });
1249
+ Fs2faVerificationMethodsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationMethodsModule, imports: [[
1250
+ CommonModule,
1251
+ FormsModule,
1252
+ MatIconModule,
1253
+ FsListModule,
1254
+ FsPhoneModule,
1255
+ FsCountryModule,
1256
+ DefautledModule,
1257
+ ]] });
1258
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faVerificationMethodsModule, decorators: [{
1259
+ type: NgModule,
1260
+ args: [{
1261
+ imports: [
1262
+ CommonModule,
1263
+ FormsModule,
1264
+ MatIconModule,
1265
+ FsListModule,
1266
+ FsPhoneModule,
1267
+ FsCountryModule,
1268
+ DefautledModule,
1269
+ ],
1270
+ declarations: [
1271
+ VerificationMethodsComponent,
1272
+ ],
1273
+ exports: [VerificationMethodsComponent],
1274
+ }]
1275
+ }] });
1276
+
1169
1277
  /**
1170
1278
  * Generated bundle index. Do not edit.
1171
1279
  */
1172
1280
 
1173
- export { Fs2faManageComponent, Fs2faManageModule, Fs2faVerificationComponent, Fs2faVerificationModule, VerificationMethodType };
1281
+ export { Fs2faManageComponent, Fs2faManageModule, Fs2faVerificationComponent, Fs2faVerificationMethodsModule, Fs2faVerificationModule, VerificationMethodType, VerificationMethodsComponent };
1174
1282
  //# sourceMappingURL=firestitch-2fa.js.map