@dereekb/dbx-firebase 9.20.18 → 9.20.20

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.
@@ -33,7 +33,7 @@ import { provideStorage, getStorage, connectStorageEmulator, Storage } from '@an
33
33
  import * as i5 from '@angular/fire/functions';
34
34
  import { provideFunctions, getFunctions, connectFunctionsEmulator, Functions } from '@angular/fire/functions';
35
35
  import * as i1$5 from '@angular/fire/firestore';
36
- import { provideFirestore, getFirestore, connectFirestoreEmulator, enableIndexedDbPersistence, Firestore } from '@angular/fire/firestore';
36
+ import { provideFirestore, getFirestore, connectFirestoreEmulator, enableIndexedDbPersistence, enableMultiTabIndexedDbPersistence, Firestore } from '@angular/fire/firestore';
37
37
  import { HTTP_INTERCEPTORS } from '@angular/common/http';
38
38
  import * as i2$3 from '@angular/material/snack-bar';
39
39
  import { __decorate, __param, __metadata } from 'tslib';
@@ -1808,12 +1808,18 @@ DbxFirebaseDefaultFirestoreProviderModule.ɵfac = i0.ɵɵngDeclareFactory({ minV
1808
1808
  DbxFirebaseDefaultFirestoreProviderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseDefaultFirestoreProviderModule, imports: [i1$5.FirestoreModule] });
1809
1809
  DbxFirebaseDefaultFirestoreProviderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseDefaultFirestoreProviderModule, imports: [provideFirestore(((injector) => {
1810
1810
  const firebaseApp = injector.get(FirebaseApp);
1811
+ const firebaseOptions = injector.get(DBX_FIREBASE_OPTIONS_TOKEN);
1811
1812
  const firestore = getFirestore(firebaseApp);
1812
1813
  const emulators = injector.get(DbxFirebaseParsedEmulatorsConfig, undefined);
1813
1814
  if (emulators?.useEmulators && emulators?.firestore) {
1814
1815
  connectFirestoreEmulator(firestore, emulators.firestore.host, emulators.firestore.port, {});
1815
1816
  }
1816
- enableIndexedDbPersistence(firestore);
1817
+ if (firebaseOptions.enableIndexedDbPersistence !== false) {
1818
+ enableIndexedDbPersistence(firestore);
1819
+ }
1820
+ if (firebaseOptions.enableMultiTabIndexedDbPersistence !== false) {
1821
+ enableMultiTabIndexedDbPersistence(firestore);
1822
+ }
1817
1823
  return firestore;
1818
1824
  }))] });
1819
1825
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseDefaultFirestoreProviderModule, decorators: [{
@@ -1822,12 +1828,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
1822
1828
  imports: [
1823
1829
  provideFirestore(((injector) => {
1824
1830
  const firebaseApp = injector.get(FirebaseApp);
1831
+ const firebaseOptions = injector.get(DBX_FIREBASE_OPTIONS_TOKEN);
1825
1832
  const firestore = getFirestore(firebaseApp);
1826
1833
  const emulators = injector.get(DbxFirebaseParsedEmulatorsConfig, undefined);
1827
1834
  if (emulators?.useEmulators && emulators?.firestore) {
1828
1835
  connectFirestoreEmulator(firestore, emulators.firestore.host, emulators.firestore.port, {});
1829
1836
  }
1830
- enableIndexedDbPersistence(firestore);
1837
+ if (firebaseOptions.enableIndexedDbPersistence !== false) {
1838
+ enableIndexedDbPersistence(firestore);
1839
+ }
1840
+ if (firebaseOptions.enableMultiTabIndexedDbPersistence !== false) {
1841
+ enableMultiTabIndexedDbPersistence(firestore);
1842
+ }
1831
1843
  return firestore;
1832
1844
  }))
1833
1845
  ]