@firestitch/2fa 13.1.4 → 13.1.5

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.
@@ -26,7 +26,7 @@ import * as i3 from '@firestitch/dialog';
26
26
  import { FsDialogModule } from '@firestitch/dialog';
27
27
  import * as i2 from '@firestitch/message';
28
28
  import { Subject, of, BehaviorSubject } from 'rxjs';
29
- import { tap, finalize, filter, takeUntil, switchMap, map } from 'rxjs/operators';
29
+ import { tap, finalize, switchMap, filter, takeUntil, map } from 'rxjs/operators';
30
30
  import * as i1 from '@firestitch/code-input';
31
31
  import { FsCodeInputComponent, FsCodeInputModule } from '@firestitch/code-input';
32
32
  import * as i1$1 from '@angular/material/dialog';
@@ -220,8 +220,8 @@ class Fs2faVerificationComponent {
220
220
  }
221
221
  showVerificationMethods() {
222
222
  this.getVerificationMethods()
223
- .subscribe((verificationMethods) => {
224
- this._dialog.open(Fs2faVerificationMethodsComponent, {
223
+ .pipe(switchMap((verificationMethods) => {
224
+ return this._dialog.open(Fs2faVerificationMethodsComponent, {
225
225
  data: {
226
226
  verificationMethod: this.verificationMethod,
227
227
  verificationMethods,
@@ -229,14 +229,14 @@ class Fs2faVerificationComponent {
229
229
  },
230
230
  })
231
231
  .afterClosed()
232
- .pipe(filter((verificationMethod) => !!verificationMethod))
233
- .subscribe((verificationMethod) => {
234
- this.verificationMethod = verificationMethod;
235
- this.code = '';
236
- this._cdRef.markForCheck();
237
- setTimeout(() => {
238
- this.verificationCodeComponent.focus();
239
- });
232
+ .pipe(filter((verificationMethod) => !!verificationMethod));
233
+ }))
234
+ .subscribe((verificationMethod) => {
235
+ this.verificationMethod = verificationMethod;
236
+ this.code = '';
237
+ this._cdRef.markForCheck();
238
+ setTimeout(() => {
239
+ this.verificationCodeComponent.focus();
240
240
  });
241
241
  });
242
242
  }
@@ -592,9 +592,12 @@ class EmailComponent {
592
592
  this.default = !this.twoFactorManageService.hasVerificationMethods;
593
593
  }
594
594
  codeCompleted() {
595
- if (!this.form.submitting) {
596
- this.form.triggerSubmit();
597
- }
595
+ //Legacy support
596
+ setTimeout(() => {
597
+ if (!this.form.submitting) {
598
+ this.form.triggerSubmit();
599
+ }
600
+ });
598
601
  }
599
602
  codeChanged(code) {
600
603
  this.code = code;
@@ -655,9 +658,12 @@ class NumberComponent {
655
658
  this.default = !this.twoFactorManageService.hasVerificationMethods;
656
659
  }
657
660
  codeCompleted() {
658
- if (!this.form.submitting) {
659
- this.form.triggerSubmit();
660
- }
661
+ //Legacy support
662
+ setTimeout(() => {
663
+ if (!this.form.submitting) {
664
+ this.form.triggerSubmit();
665
+ }
666
+ });
661
667
  }
662
668
  codeChanged(code) {
663
669
  this.code = code;