@dereekb/dbx-firebase 3.0.0 → 5.0.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 (70) hide show
  1. package/LICENSE +21 -0
  2. package/esm2020/lib/auth/auth.mjs +1 -1
  3. package/esm2020/lib/auth/error.mjs +1 -1
  4. package/esm2020/lib/auth/login/firebase.login.module.mjs +1 -1
  5. package/esm2020/lib/auth/login/login.anonymous.component.mjs +1 -1
  6. package/esm2020/lib/auth/login/login.apple.component.mjs +1 -1
  7. package/esm2020/lib/auth/login/login.button.component.mjs +3 -3
  8. package/esm2020/lib/auth/login/login.context.back.component.mjs +5 -5
  9. package/esm2020/lib/auth/login/login.email.component.mjs +1 -1
  10. package/esm2020/lib/auth/login/login.email.content.component.mjs +8 -8
  11. package/esm2020/lib/auth/login/login.email.form.component.mjs +4 -4
  12. package/esm2020/lib/auth/login/login.email.recovery.form.component.mjs +4 -4
  13. package/esm2020/lib/auth/login/login.facebook.component.mjs +1 -1
  14. package/esm2020/lib/auth/login/login.github.component.mjs +1 -1
  15. package/esm2020/lib/auth/login/login.google.component.mjs +1 -1
  16. package/esm2020/lib/auth/login/login.microsoft.component.mjs +1 -1
  17. package/esm2020/lib/auth/login/login.password.mjs +1 -1
  18. package/esm2020/lib/auth/login/login.service.mjs +1 -1
  19. package/esm2020/lib/auth/login/login.twitter.component.mjs +1 -1
  20. package/esm2020/lib/auth/login/register.email.component.mjs +1 -1
  21. package/esm2020/lib/firebase/firebase.module.mjs +33 -21
  22. package/esm2020/lib/firebase/options.mjs +1 -1
  23. package/esm2020/lib/function/firebase.function.module.mjs +1 -1
  24. package/esm2020/lib/model/loader/collection.loader.instance.mjs +1 -1
  25. package/esm2020/lib/model/loader/collection.loader.mjs +1 -1
  26. package/esm2020/lib/model/store/store.collection.change.directive.mjs +1 -1
  27. package/esm2020/lib/model/store/store.collection.change.if.directive.mjs +1 -1
  28. package/esm2020/lib/model/store/store.collection.directive.mjs +1 -1
  29. package/esm2020/lib/model/store/store.collection.mjs +1 -1
  30. package/esm2020/lib/model/store/store.document.directive.mjs +1 -1
  31. package/esm2020/lib/model/store/store.document.mjs +2 -2
  32. package/esm2020/lib/model/store/store.document.router.directive.mjs +2 -4
  33. package/esm2020/lib/model/store/store.subcollection.rxjs.mjs +1 -1
  34. package/fesm2015/dereekb-dbx-firebase.mjs +51 -39
  35. package/fesm2015/dereekb-dbx-firebase.mjs.map +1 -1
  36. package/fesm2020/dereekb-dbx-firebase.mjs +51 -39
  37. package/fesm2020/dereekb-dbx-firebase.mjs.map +1 -1
  38. package/lib/auth/auth.d.ts +1 -2
  39. package/lib/auth/error.d.ts +1 -1
  40. package/lib/auth/login/firebase.login.module.d.ts +1 -1
  41. package/lib/auth/login/login.anonymous.component.d.ts +1 -1
  42. package/lib/auth/login/login.apple.component.d.ts +1 -1
  43. package/lib/auth/login/login.button.component.d.ts +6 -7
  44. package/lib/auth/login/login.context.back.component.d.ts +2 -2
  45. package/lib/auth/login/login.email.component.d.ts +1 -1
  46. package/lib/auth/login/login.email.content.component.d.ts +3 -3
  47. package/lib/auth/login/login.email.form.component.d.ts +1 -2
  48. package/lib/auth/login/login.facebook.component.d.ts +1 -1
  49. package/lib/auth/login/login.github.component.d.ts +1 -1
  50. package/lib/auth/login/login.google.component.d.ts +1 -1
  51. package/lib/auth/login/login.list.component.d.ts +1 -1
  52. package/lib/auth/login/login.microsoft.component.d.ts +1 -1
  53. package/lib/auth/login/login.password.d.ts +1 -2
  54. package/lib/auth/login/login.service.d.ts +6 -6
  55. package/lib/auth/login/login.twitter.component.d.ts +1 -1
  56. package/lib/auth/login/register.email.component.d.ts +1 -1
  57. package/lib/firebase/firebase.module.d.ts +1 -1
  58. package/lib/firebase/options.d.ts +4 -0
  59. package/lib/function/firebase.function.module.d.ts +4 -4
  60. package/lib/model/loader/collection.loader.d.ts +1 -1
  61. package/lib/model/loader/collection.loader.instance.d.ts +4 -4
  62. package/lib/model/store/store.collection.change.directive.d.ts +3 -2
  63. package/lib/model/store/store.collection.change.if.directive.d.ts +2 -2
  64. package/lib/model/store/store.collection.d.ts +3 -3
  65. package/lib/model/store/store.collection.directive.d.ts +1 -1
  66. package/lib/model/store/store.document.d.ts +4 -4
  67. package/lib/model/store/store.document.directive.d.ts +1 -1
  68. package/lib/model/store/store.document.router.directive.d.ts +8 -9
  69. package/lib/model/store/store.subcollection.rxjs.d.ts +1 -1
  70. package/package.json +6 -6
@@ -17,10 +17,10 @@ import { addToSet, removeFromSet, filterMaybeValues, mapIterable, asArray, exclu
17
17
  import * as i3 from '@dereekb/dbx-web';
18
18
  import { DbxRouterAnchorModule, DbxReadableErrorModule, DbxActionModule, DbxButtonModule } from '@dereekb/dbx-web';
19
19
  import * as i1$1 from '@dereekb/dbx-form';
20
- import { AbstractAsyncFormlyFormDirective, usernamePasswordLoginFields, ProvideFormlyContext, AbstractSyncFormlyFormDirective, emailField, DbxFormIoModule, DbxFormModule, DbxFormlyModule, DbxFormActionModule, DbxFormFormlyTextFieldModule } from '@dereekb/dbx-form';
20
+ import { AbstractAsyncFormlyFormDirective, usernamePasswordLoginFields, provideFormlyContext, AbstractSyncFormlyFormDirective, emailField, DbxFormIoModule, DbxFormModule, DbxFormlyModule, DbxFormActionModule, DbxFormFormlyTextFieldModule } from '@dereekb/dbx-form';
21
21
  import { initializeApp } from 'firebase/app';
22
22
  import * as i5 from '@angular/fire/app';
23
- import { provideFirebaseApp } from '@angular/fire/app';
23
+ import { FirebaseApp, provideFirebaseApp } from '@angular/fire/app';
24
24
  import * as i3$2 from '@angular/fire/storage';
25
25
  import { provideStorage, getStorage, connectStorageEmulator } from '@angular/fire/storage';
26
26
  import * as i4$1 from '@angular/fire/functions';
@@ -28,7 +28,6 @@ import { provideFunctions, getFunctions, connectFunctionsEmulator, Functions } f
28
28
  import * as i1$2 from '@angular/fire/firestore';
29
29
  import { provideFirestore, getFirestore, connectFirestoreEmulator, enableIndexedDbPersistence, Firestore } from '@angular/fire/firestore';
30
30
  import { firebaseFirestoreContextFactory, iterationQueryDocChangeWatcher, firebaseQueryItemAccumulator, documentDataWithId } from '@dereekb/firebase';
31
- import { shareReplay as shareReplay$1 } from 'rxjs/operators';
32
31
 
33
32
  /**
34
33
  * Derives a user state from the input firebase auth service.
@@ -348,11 +347,11 @@ class DbxFirebaseLoginContext extends DbxInjectionContext {
348
347
  */
349
348
  class DbxFirebaseLoginButtonComponent {
350
349
  constructor() {
351
- this.handleAction = (value) => {
350
+ this.handleAction = () => {
352
351
  const loginPromise = this.config.handleLogin();
353
352
  return from(loginPromise);
354
353
  };
355
- this.onActionSuccess = (value) => {
354
+ this.onActionSuccess = () => {
356
355
  // todo: show checkmark on success?
357
356
  };
358
357
  }
@@ -692,13 +691,13 @@ class DbxFirebaseEmailFormComponent extends AbstractAsyncFormlyFormDirective {
692
691
  }
693
692
  }
694
693
  DbxFirebaseEmailFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseEmailFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
695
- DbxFirebaseEmailFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFirebaseEmailFormComponent, selector: "dbx-firebase-email-form", inputs: { config: "config" }, providers: [ProvideFormlyContext()], usesInheritance: true, ngImport: i0, template: `<dbx-formly></dbx-formly>`, isInline: true, components: [{ type: i1$1.DbxFormlyFormComponent, selector: "dbx-formly", exportAs: ["formly"] }] });
694
+ DbxFirebaseEmailFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFirebaseEmailFormComponent, selector: "dbx-firebase-email-form", inputs: { config: "config" }, providers: [provideFormlyContext()], usesInheritance: true, ngImport: i0, template: `<dbx-formly></dbx-formly>`, isInline: true, components: [{ type: i1$1.DbxFormlyFormComponent, selector: "dbx-formly", exportAs: ["formly"] }] });
696
695
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseEmailFormComponent, decorators: [{
697
696
  type: Component,
698
697
  args: [{
699
698
  template: `<dbx-formly></dbx-formly>`,
700
699
  selector: 'dbx-firebase-email-form',
701
- providers: [ProvideFormlyContext()]
700
+ providers: [provideFormlyContext()]
702
701
  }]
703
702
  }], propDecorators: { config: [{
704
703
  type: Input
@@ -711,13 +710,13 @@ class DbxFirebaseEmailRecoveryFormComponent extends AbstractSyncFormlyFormDirect
711
710
  }
712
711
  }
713
712
  DbxFirebaseEmailRecoveryFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseEmailRecoveryFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
714
- DbxFirebaseEmailRecoveryFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFirebaseEmailRecoveryFormComponent, selector: "dbx-firebase-email-recovery-form", providers: [ProvideFormlyContext()], usesInheritance: true, ngImport: i0, template: `<dbx-formly></dbx-formly>`, isInline: true, components: [{ type: i1$1.DbxFormlyFormComponent, selector: "dbx-formly", exportAs: ["formly"] }] });
713
+ DbxFirebaseEmailRecoveryFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFirebaseEmailRecoveryFormComponent, selector: "dbx-firebase-email-recovery-form", providers: [provideFormlyContext()], usesInheritance: true, ngImport: i0, template: `<dbx-formly></dbx-formly>`, isInline: true, components: [{ type: i1$1.DbxFormlyFormComponent, selector: "dbx-formly", exportAs: ["formly"] }] });
715
714
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseEmailRecoveryFormComponent, decorators: [{
716
715
  type: Component,
717
716
  args: [{
718
717
  template: `<dbx-formly></dbx-formly>`,
719
718
  selector: 'dbx-firebase-email-recovery-form',
720
- providers: [ProvideFormlyContext()]
719
+ providers: [provideFormlyContext()]
721
720
  }]
722
721
  }] });
723
722
 
@@ -756,15 +755,12 @@ class DbxFirebaseLoginEmailContentComponent {
756
755
  this.handleRecoveryAction = (value) => {
757
756
  this.recoveryFormValue = value;
758
757
  this.emailFormValue = { username: value.email, password: '' };
759
- let result = this.dbxFirebaseAuthService.sendPasswordResetEmail(value.email);
758
+ const result = this.dbxFirebaseAuthService.sendPasswordResetEmail(value.email);
760
759
  return from(result).pipe(tap(() => {
761
760
  this.onRecoveringSuccess();
762
761
  }));
763
762
  };
764
763
  }
765
- ngOnDestroy() {
766
- this._emailMode.complete();
767
- }
768
764
  static openEmailLoginContext(dbxFirebaseLoginContext, config) {
769
765
  return dbxFirebaseLoginContext.showContext({
770
766
  config: {
@@ -774,6 +770,9 @@ class DbxFirebaseLoginEmailContentComponent {
774
770
  use: (instance) => firstValueFrom(instance.doneOrCancelled)
775
771
  });
776
772
  }
773
+ ngOnDestroy() {
774
+ this._emailMode.complete();
775
+ }
777
776
  get loginMode() {
778
777
  return this.config.loginMode;
779
778
  }
@@ -792,6 +791,7 @@ class DbxFirebaseLoginEmailContentComponent {
792
791
  }
793
792
  // MARK: Recovering
794
793
  onRecoveringSuccess() {
794
+ // optionally override in parent
795
795
  }
796
796
  // MARK: Cancel
797
797
  onCancel() {
@@ -802,7 +802,7 @@ class DbxFirebaseLoginEmailContentComponent {
802
802
  }
803
803
  }
804
804
  DbxFirebaseLoginEmailContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseLoginEmailContentComponent, deps: [{ token: DbxFirebaseAuthService }, { token: DBX_INJECTION_COMPONENT_DATA }], target: i0.ɵɵFactoryTarget.Component });
805
- DbxFirebaseLoginEmailContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFirebaseLoginEmailContentComponent, selector: "ng-component", ngImport: i0, template: "<div class=\"dbx-firebase-login-email-content\">\n <ng-container [ngSwitch]=\"emailMode$ | async\">\n <ng-container *ngSwitchCase=\"'login'\">\n <ng-container *ngTemplateOutlet=\"loginView\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'recover'\">\n <ng-container *ngTemplateOutlet=\"resetPassword\"></ng-container>\n </ng-container>\n </ng-container>\n</div>\n\n<!-- Login View -->\n<ng-template #loginView>\n <ng-container dbxAction [dbxActionHandler]=\"handleLoginAction\">\n <dbx-firebase-email-form [config]=\"formConfig\" dbxActionForm [dbxFormSource]=\"emailFormValue\">\n </dbx-firebase-email-form>\n <div class=\"dbx-firebase-login-email-forgot-prompt\" *ngIf=\"isLoginMode\">\n <dbx-link [anchor]=\"forgotAnchor\">Forgot Password?</dbx-link>\n </div>\n <div class=\"dbx-flex\">\n <dbx-button class=\"dbx-wide-button\" [text]=\"buttonText\" [raised]=\"true\" color=\"primary\" dbxActionButton>\n </dbx-button>\n <dbx-button-spacer></dbx-button-spacer>\n <span class=\"dbx-spacer\"></span>\n <button mat-flat-button (click)=\"onCancel()\">Cancel</button>\n </div>\n <dbx-error dbxActionError></dbx-error>\n </ng-container>\n</ng-template>\n\n<!-- Reset Password View -->\n<ng-template #resetPassword>\n <ng-container dbxAction [dbxActionHandler]=\"handleRecoveryAction\">\n <dbx-firebase-email-recovery-form dbxActionForm [dbxFormSource]=\"recoveryFormValue\">\n </dbx-firebase-email-recovery-form>\n <p class=\"dbx-hint\">An email will be sent to the above address to help you reset your password.</p>\n <div class=\"dbx-flex\">\n <dbx-button class=\"dbx-wide-button\" text=\"Send Recovery Email\" [raised]=\"true\" color=\"primary\" dbxActionButton>\n </dbx-button>\n <span class=\"dbx-spacer\"></span>\n <button mat-flat-button (click)=\"onCancelReset()\">Cancel Recovery</button>\n </div>\n <dbx-error dbxActionError></dbx-error>\n </ng-container>\n</ng-template>\n", components: [{ type: DbxFirebaseEmailFormComponent, selector: "dbx-firebase-email-form", inputs: ["config"] }, { type: i3.DbxAnchorLinkComponent, selector: "dbx-link", inputs: ["anchor", "ref", "href"] }, { type: i3.DbxButtonComponent, selector: "dbx-button", inputs: ["type", "raised", "stroked", "flat", "color", "customButtonColor", "customTextColor", "customSpinnerColor"] }, { type: i4.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"] }, { type: i3.DbxReadableErrorComponent, selector: "dbx-error", inputs: ["error"] }, { type: DbxFirebaseEmailRecoveryFormComponent, selector: "dbx-firebase-email-recovery-form" }], directives: [{ type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3$1.DbxActionDirective, selector: "dbx-action,[dbxAction],dbx-action-context,[dbxActionContext]", exportAs: ["action", "dbxAction"] }, { type: i3$1.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { type: i1$1.DbxActionFormDirective, selector: "[dbxActionForm]", inputs: ["dbxActionFormValidator", "dbxActionFormModified", "formDisabledOnWorking"] }, { type: i1$1.DbxFormSourceDirective, selector: "[dbxFormSource]", inputs: ["dbxFormSourceMode", "dbxFormSource"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.DbxActionButtonDirective, selector: "[dbxActionButton]" }, { type: i3.DbxButtonSpacerDirective, selector: "dbx-button-spacer,dbxButtonSpacer" }, { type: i3.DbxActionErrorDirective, selector: "[dbxActionError]" }], pipes: { "async": i6.AsyncPipe } });
805
+ DbxFirebaseLoginEmailContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFirebaseLoginEmailContentComponent, selector: "ng-component", ngImport: i0, template: "<div class=\"dbx-firebase-login-email-content\">\n <ng-container [ngSwitch]=\"emailMode$ | async\">\n <ng-container *ngSwitchCase=\"'login'\">\n <ng-container *ngTemplateOutlet=\"loginView\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'recover'\">\n <ng-container *ngTemplateOutlet=\"resetPassword\"></ng-container>\n </ng-container>\n </ng-container>\n</div>\n\n<!-- Login View -->\n<ng-template #loginView>\n <ng-container dbxAction [dbxActionHandler]=\"handleLoginAction\">\n <dbx-firebase-email-form [config]=\"formConfig\" dbxActionForm [dbxFormSource]=\"emailFormValue\">\n </dbx-firebase-email-form>\n <div class=\"dbx-firebase-login-email-forgot-prompt\" *ngIf=\"isLoginMode\">\n <dbx-link [anchor]=\"forgotAnchor\">Forgot Password?</dbx-link>\n </div>\n <div class=\"dbx-flex\">\n <dbx-button class=\"dbx-wide-button\" [text]=\"buttonText\" [raised]=\"true\" color=\"primary\" dbxActionButton>\n </dbx-button>\n <dbx-button-spacer></dbx-button-spacer>\n <span class=\"dbx-spacer\"></span>\n <button mat-flat-button (click)=\"onCancel()\">Cancel</button>\n </div>\n <dbx-error dbxActionError></dbx-error>\n </ng-container>\n</ng-template>\n\n<!-- Reset Password View -->\n<ng-template #resetPassword>\n <ng-container dbxAction [dbxActionHandler]=\"handleRecoveryAction\">\n <dbx-firebase-email-recovery-form dbxActionForm [dbxFormSource]=\"recoveryFormValue\">\n </dbx-firebase-email-recovery-form>\n <p class=\"dbx-hint\">An email will be sent to the above address to help you reset your password.</p>\n <div class=\"dbx-flex\">\n <dbx-button class=\"dbx-wide-button\" text=\"Send Recovery Email\" [raised]=\"true\" color=\"primary\" dbxActionButton>\n </dbx-button>\n <span class=\"dbx-spacer\"></span>\n <button mat-flat-button (click)=\"onCancelReset()\">Cancel Recovery</button>\n </div>\n <dbx-error dbxActionError></dbx-error>\n </ng-container>\n</ng-template>\n", components: [{ type: DbxFirebaseEmailFormComponent, selector: "dbx-firebase-email-form", inputs: ["config"] }, { type: i3.DbxAnchorLinkComponent, selector: "dbx-link", inputs: ["anchor", "ref", "href"] }, { type: i3.DbxButtonComponent, selector: "dbx-button", inputs: ["type", "raised", "stroked", "flat", "color", "customButtonColor", "customTextColor", "customSpinnerColor"] }, { type: i4.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"] }, { type: i3.DbxReadableErrorComponent, selector: "dbx-error", inputs: ["error"] }, { type: DbxFirebaseEmailRecoveryFormComponent, selector: "dbx-firebase-email-recovery-form" }], directives: [{ type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3$1.DbxActionDirective, selector: "dbx-action,[dbxAction],dbx-action-context,[dbxActionContext]", exportAs: ["action", "dbxAction"] }, { type: i3$1.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { type: i1$1.DbxActionFormDirective, selector: "[dbxActionForm]", inputs: ["dbxActionFormValidator", "dbxActionFormModified", "formDisabledOnWorking"] }, { type: i1$1.DbxFormSourceDirective, selector: "[dbxFormSource]", inputs: ["dbxFormSourceMode", "dbxFormSource"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.DbxActionButtonDirective, selector: "[dbxActionButton]" }, { type: i3.DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { type: i3.DbxActionErrorDirective, selector: "[dbxActionError]" }], pipes: { "async": i6.AsyncPipe } });
806
806
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseLoginEmailContentComponent, decorators: [{
807
807
  type: Component,
808
808
  args: [{ template: "<div class=\"dbx-firebase-login-email-content\">\n <ng-container [ngSwitch]=\"emailMode$ | async\">\n <ng-container *ngSwitchCase=\"'login'\">\n <ng-container *ngTemplateOutlet=\"loginView\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'recover'\">\n <ng-container *ngTemplateOutlet=\"resetPassword\"></ng-container>\n </ng-container>\n </ng-container>\n</div>\n\n<!-- Login View -->\n<ng-template #loginView>\n <ng-container dbxAction [dbxActionHandler]=\"handleLoginAction\">\n <dbx-firebase-email-form [config]=\"formConfig\" dbxActionForm [dbxFormSource]=\"emailFormValue\">\n </dbx-firebase-email-form>\n <div class=\"dbx-firebase-login-email-forgot-prompt\" *ngIf=\"isLoginMode\">\n <dbx-link [anchor]=\"forgotAnchor\">Forgot Password?</dbx-link>\n </div>\n <div class=\"dbx-flex\">\n <dbx-button class=\"dbx-wide-button\" [text]=\"buttonText\" [raised]=\"true\" color=\"primary\" dbxActionButton>\n </dbx-button>\n <dbx-button-spacer></dbx-button-spacer>\n <span class=\"dbx-spacer\"></span>\n <button mat-flat-button (click)=\"onCancel()\">Cancel</button>\n </div>\n <dbx-error dbxActionError></dbx-error>\n </ng-container>\n</ng-template>\n\n<!-- Reset Password View -->\n<ng-template #resetPassword>\n <ng-container dbxAction [dbxActionHandler]=\"handleRecoveryAction\">\n <dbx-firebase-email-recovery-form dbxActionForm [dbxFormSource]=\"recoveryFormValue\">\n </dbx-firebase-email-recovery-form>\n <p class=\"dbx-hint\">An email will be sent to the above address to help you reset your password.</p>\n <div class=\"dbx-flex\">\n <dbx-button class=\"dbx-wide-button\" text=\"Send Recovery Email\" [raised]=\"true\" color=\"primary\" dbxActionButton>\n </dbx-button>\n <span class=\"dbx-spacer\"></span>\n <button mat-flat-button (click)=\"onCancelReset()\">Cancel Recovery</button>\n </div>\n <dbx-error dbxActionError></dbx-error>\n </ng-container>\n</ng-template>\n" }]
@@ -979,14 +979,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
979
979
 
980
980
  class DbxFirebaseLoginContextBackButtonComponent {
981
981
  constructor() {
982
- this.onCancel = new EventEmitter();
982
+ this.cancelLogin = new EventEmitter();
983
983
  this.anchor = {
984
- onClick: () => this.onCancel.emit()
984
+ onClick: () => this.cancelLogin.emit()
985
985
  };
986
986
  }
987
987
  }
988
988
  DbxFirebaseLoginContextBackButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseLoginContextBackButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
989
- DbxFirebaseLoginContextBackButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFirebaseLoginContextBackButtonComponent, selector: "dbx-firebase-login-context-back-button", outputs: { onCancel: "onCancel" }, ngImport: i0, template: `
989
+ DbxFirebaseLoginContextBackButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFirebaseLoginContextBackButtonComponent, selector: "dbx-firebase-login-context-back-button", outputs: { cancelLogin: "cancelLogin" }, ngImport: i0, template: `
990
990
  <dbx-link [anchor]="anchor">Choose other login method.</dbx-link>
991
991
  `, isInline: true, components: [{ type: i3.DbxAnchorLinkComponent, selector: "dbx-link", inputs: ["anchor", "ref", "href"] }] });
992
992
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseLoginContextBackButtonComponent, decorators: [{
@@ -997,7 +997,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
997
997
  <dbx-link [anchor]="anchor">Choose other login method.</dbx-link>
998
998
  `
999
999
  }]
1000
- }], propDecorators: { onCancel: [{
1000
+ }], propDecorators: { cancelLogin: [{
1001
1001
  type: Output
1002
1002
  }] } });
1003
1003
 
@@ -1286,7 +1286,8 @@ DbxFirebaseDefaultFirestoreProviderModule.ɵfac = i0.ɵɵngDeclareFactory({ minV
1286
1286
  DbxFirebaseDefaultFirestoreProviderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultFirestoreProviderModule, imports: [i1$2.FirestoreModule] });
1287
1287
  DbxFirebaseDefaultFirestoreProviderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultFirestoreProviderModule, imports: [[
1288
1288
  provideFirestore(((injector) => {
1289
- const firestore = getFirestore();
1289
+ const firebaseApp = injector.get(FirebaseApp);
1290
+ const firestore = getFirestore(firebaseApp);
1290
1291
  const emulators = injector.get(DbxFirebaseParsedEmulatorsConfig, undefined);
1291
1292
  if (emulators?.useEmulators && emulators?.firestore) {
1292
1293
  connectFirestoreEmulator(firestore, emulators.firestore.host, emulators.firestore.port, {});
@@ -1300,7 +1301,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
1300
1301
  args: [{
1301
1302
  imports: [
1302
1303
  provideFirestore(((injector) => {
1303
- const firestore = getFirestore();
1304
+ const firebaseApp = injector.get(FirebaseApp);
1305
+ const firestore = getFirestore(firebaseApp);
1304
1306
  const emulators = injector.get(DbxFirebaseParsedEmulatorsConfig, undefined);
1305
1307
  if (emulators?.useEmulators && emulators?.firestore) {
1306
1308
  connectFirestoreEmulator(firestore, emulators.firestore.host, emulators.firestore.port, {});
@@ -1320,7 +1322,8 @@ DbxFirebaseDefaultAuthProviderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersio
1320
1322
  DbxFirebaseDefaultAuthProviderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultAuthProviderModule, imports: [i1.AuthModule] });
1321
1323
  DbxFirebaseDefaultAuthProviderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultAuthProviderModule, imports: [[
1322
1324
  provideAuth(((injector) => {
1323
- const auth = getAuth();
1325
+ const firebaseApp = injector.get(FirebaseApp);
1326
+ const auth = getAuth(firebaseApp);
1324
1327
  const emulators = injector.get(DbxFirebaseParsedEmulatorsConfig, undefined);
1325
1328
  if (emulators?.useEmulators && emulators?.auth) {
1326
1329
  connectAuthEmulator(auth, `http://${emulators.auth.host}:${emulators.auth.port}`);
@@ -1333,7 +1336,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
1333
1336
  args: [{
1334
1337
  imports: [
1335
1338
  provideAuth(((injector) => {
1336
- const auth = getAuth();
1339
+ const firebaseApp = injector.get(FirebaseApp);
1340
+ const auth = getAuth(firebaseApp);
1337
1341
  const emulators = injector.get(DbxFirebaseParsedEmulatorsConfig, undefined);
1338
1342
  if (emulators?.useEmulators && emulators?.auth) {
1339
1343
  connectAuthEmulator(auth, `http://${emulators.auth.host}:${emulators.auth.port}`);
@@ -1352,7 +1356,8 @@ DbxFirebaseDefaultStorageProviderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVer
1352
1356
  DbxFirebaseDefaultStorageProviderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultStorageProviderModule, imports: [i3$2.StorageModule] });
1353
1357
  DbxFirebaseDefaultStorageProviderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultStorageProviderModule, imports: [[
1354
1358
  provideStorage(((injector) => {
1355
- const storage = getStorage();
1359
+ const firebaseApp = injector.get(FirebaseApp);
1360
+ const storage = getStorage(firebaseApp);
1356
1361
  const emulators = injector.get(DbxFirebaseParsedEmulatorsConfig, undefined);
1357
1362
  if (emulators?.useEmulators && emulators?.storage) {
1358
1363
  connectStorageEmulator(storage, emulators.storage.host, emulators.storage.port, {});
@@ -1365,7 +1370,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
1365
1370
  args: [{
1366
1371
  imports: [
1367
1372
  provideStorage(((injector) => {
1368
- const storage = getStorage();
1373
+ const firebaseApp = injector.get(FirebaseApp);
1374
+ const storage = getStorage(firebaseApp);
1369
1375
  const emulators = injector.get(DbxFirebaseParsedEmulatorsConfig, undefined);
1370
1376
  if (emulators?.useEmulators && emulators?.storage) {
1371
1377
  connectStorageEmulator(storage, emulators.storage.host, emulators.storage.port, {});
@@ -1384,7 +1390,10 @@ DbxFirebaseDefaultFunctionsProviderModule.ɵfac = i0.ɵɵngDeclareFactory({ minV
1384
1390
  DbxFirebaseDefaultFunctionsProviderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultFunctionsProviderModule, imports: [i4$1.FunctionsModule] });
1385
1391
  DbxFirebaseDefaultFunctionsProviderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultFunctionsProviderModule, imports: [[
1386
1392
  provideFunctions(((injector) => {
1387
- const functions = getFunctions();
1393
+ const firebaseApp = injector.get(FirebaseApp);
1394
+ const firebaseOptions = injector.get(DBX_FIREBASE_OPTIONS_TOKEN);
1395
+ const { functionsRegionOrCustomDomain } = firebaseOptions;
1396
+ const functions = getFunctions(firebaseApp, functionsRegionOrCustomDomain);
1388
1397
  const emulators = injector.get(DbxFirebaseParsedEmulatorsConfig, undefined);
1389
1398
  if (emulators?.useEmulators && emulators?.functions) {
1390
1399
  connectFunctionsEmulator(functions, emulators.functions.host, emulators.functions.port);
@@ -1397,7 +1406,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
1397
1406
  args: [{
1398
1407
  imports: [
1399
1408
  provideFunctions(((injector) => {
1400
- const functions = getFunctions();
1409
+ const firebaseApp = injector.get(FirebaseApp);
1410
+ const firebaseOptions = injector.get(DBX_FIREBASE_OPTIONS_TOKEN);
1411
+ const { functionsRegionOrCustomDomain } = firebaseOptions;
1412
+ const functions = getFunctions(firebaseApp, functionsRegionOrCustomDomain);
1401
1413
  const emulators = injector.get(DbxFirebaseParsedEmulatorsConfig, undefined);
1402
1414
  if (emulators?.useEmulators && emulators?.functions) {
1403
1415
  connectFunctionsEmulator(functions, emulators.functions.host, emulators.functions.port);
@@ -1423,29 +1435,29 @@ class DbxFirebaseDefaultFirebaseProvidersModule {
1423
1435
  }
1424
1436
  }
1425
1437
  DbxFirebaseDefaultFirebaseProvidersModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultFirebaseProvidersModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1426
- DbxFirebaseDefaultFirebaseProvidersModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultFirebaseProvidersModule, imports: [DbxFirebaseDefaultFirestoreProviderModule, DbxFirebaseDefaultAuthProviderModule, DbxFirebaseDefaultStorageProviderModule, DbxFirebaseDefaultFunctionsProviderModule, i5.FirebaseAppModule] });
1438
+ DbxFirebaseDefaultFirebaseProvidersModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultFirebaseProvidersModule, imports: [i5.FirebaseAppModule, DbxFirebaseDefaultFirestoreProviderModule, DbxFirebaseDefaultAuthProviderModule, DbxFirebaseDefaultStorageProviderModule, DbxFirebaseDefaultFunctionsProviderModule] });
1427
1439
  DbxFirebaseDefaultFirebaseProvidersModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultFirebaseProvidersModule, imports: [[
1428
- DbxFirebaseDefaultFirestoreProviderModule,
1429
- DbxFirebaseDefaultAuthProviderModule,
1430
- DbxFirebaseDefaultStorageProviderModule,
1431
- DbxFirebaseDefaultFunctionsProviderModule,
1432
1440
  provideFirebaseApp(((injector) => {
1433
1441
  const firebaseOptions = injector.get(DBX_FIREBASE_OPTIONS_TOKEN);
1434
1442
  return initializeApp(firebaseOptions);
1435
- }))
1443
+ })),
1444
+ DbxFirebaseDefaultFirestoreProviderModule,
1445
+ DbxFirebaseDefaultAuthProviderModule,
1446
+ DbxFirebaseDefaultStorageProviderModule,
1447
+ DbxFirebaseDefaultFunctionsProviderModule
1436
1448
  ]] });
1437
1449
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultFirebaseProvidersModule, decorators: [{
1438
1450
  type: NgModule,
1439
1451
  args: [{
1440
1452
  imports: [
1441
- DbxFirebaseDefaultFirestoreProviderModule,
1442
- DbxFirebaseDefaultAuthProviderModule,
1443
- DbxFirebaseDefaultStorageProviderModule,
1444
- DbxFirebaseDefaultFunctionsProviderModule,
1445
1453
  provideFirebaseApp(((injector) => {
1446
1454
  const firebaseOptions = injector.get(DBX_FIREBASE_OPTIONS_TOKEN);
1447
1455
  return initializeApp(firebaseOptions);
1448
- }))
1456
+ })),
1457
+ DbxFirebaseDefaultFirestoreProviderModule,
1458
+ DbxFirebaseDefaultAuthProviderModule,
1459
+ DbxFirebaseDefaultStorageProviderModule,
1460
+ DbxFirebaseDefaultFunctionsProviderModule
1449
1461
  ]
1450
1462
  }]
1451
1463
  }] });
@@ -1928,7 +1940,7 @@ class DbxFirebaseDocumentStoreRouteIdDirective extends AbstractSubscriptionDirec
1928
1940
  this.idParamKey$ = this._idParamKey.asObservable();
1929
1941
  this.idFromParams$ = combineLatest([this.idParamKey$, this.dbxRouterService.params$]).pipe(map(([key, params]) => {
1930
1942
  return params[key] ?? undefined;
1931
- }), distinctUntilChanged(), shareReplay$1(1));
1943
+ }), distinctUntilChanged(), shareReplay(1));
1932
1944
  }
1933
1945
  ngOnInit() {
1934
1946
  this.sub = this.dbxFirebaseDocumentStoreDirective.store.setId(this.idFromParams$);
@@ -2073,7 +2085,7 @@ class AbstractDbxFirebaseDocumentStore extends LockSetComponentStore {
2073
2085
  this.id$ = this.document$.pipe(map(x => x.id), shareReplay());
2074
2086
  this.ref$ = this.document$.pipe(map(x => x.documentRef), shareReplay());
2075
2087
  this.snapshot$ = this.document$.pipe(switchMap(x => x.accessor.stream()), shareReplay(1));
2076
- this.snapshotLoadingState$ = this.currentDocument$.pipe(switchMap(_ => loadingStateFromObs(this.snapshot$)), shareReplay(1));
2088
+ this.snapshotLoadingState$ = this.currentDocument$.pipe(switchMap(() => loadingStateFromObs(this.snapshot$)), shareReplay(1));
2077
2089
  this.currentData$ = this.document$.pipe(switchMap(x => x.accessor.stream().pipe(map(y => documentDataWithId(y)))), shareReplay(1));
2078
2090
  this.data$ = this.currentDocument$.pipe(switchMap(() => this.currentData$.pipe(filterMaybe())), shareReplay(1));
2079
2091
  this.dataLoadingState$ = this.snapshotLoadingState$.pipe(map((x) => {