@dereekb/dbx-firebase 9.20.20 → 9.21.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.
- package/esm2020/lib/firebase/firebase.module.mjs +7 -7
- package/esm2020/lib/firebase/options.mjs +1 -1
- package/esm2020/lib/model/modules/store/store.collection.list.directive.mjs +12 -4
- package/fesm2015/dereekb-dbx-firebase.mjs +18 -11
- package/fesm2015/dereekb-dbx-firebase.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-firebase.mjs +17 -11
- package/fesm2020/dereekb-dbx-firebase.mjs.map +1 -1
- package/lib/firebase/options.d.ts +5 -5
- package/lib/model/modules/store/store.collection.list.directive.d.ts +4 -1
- package/package.json +5 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, Optional, InjectionToken, Inject, Component, Input, Directive, EventEmitter, Output, NgModule, Injector, ViewChild, HostListener, forwardRef, Host } from '@angular/core';
|
|
3
3
|
import * as i3 from '@dereekb/dbx-analytics';
|
|
4
|
-
import { asObservable, timeoutStartWith, filterMaybe, isNot, SubscriptionObject, lazyFrom, switchMapWhileTrue, loadingStateFromObs, cleanupDestroyable, accumulatorFlattenPageListLoadingState, useFirst, pageLoadingStateFromObs, useAsObservable, distinctUntilModelKeyChange, successResult, beginLoading, errorResult, cleanup, mapLoadingState } from '@dereekb/rxjs';
|
|
4
|
+
import { asObservable, timeoutStartWith, filterMaybe, isNot, SubscriptionObject, lazyFrom, switchMapWhileTrue, loadingStateFromObs, cleanupDestroyable, accumulatorFlattenPageListLoadingState, useFirst, pageLoadingStateFromObs, useAsObservable, distinctUntilModelKeyChange, tapLog, successResult, beginLoading, errorResult, cleanup, mapLoadingState } from '@dereekb/rxjs';
|
|
5
5
|
import { switchMap, of, shareReplay, map, distinctUntilChanged, catchError, firstValueFrom, BehaviorSubject, combineLatest, first, from, tap, interval, exhaustMap, filter, take, startWith, EMPTY, Subject, throttleTime, NEVER, combineLatestWith } from 'rxjs';
|
|
6
6
|
import * as i2$2 from '@dereekb/dbx-core';
|
|
7
7
|
import { loggedInObsFromIsLoggedIn, loggedOutObsFromIsLoggedIn, authUserIdentifier, DbxInjectionContext, AbstractForwardDbxInjectionContextDirective, DBX_INJECTION_COMPONENT_DATA, DbxInjectionComponentModule, DbxAuthService, AbstractSubscriptionDirective, AbstractIfDirective, DbxRouteParamReaderInstance, DbxRouteParamDefaultRedirectInstance, LockSetComponentStore } from '@dereekb/dbx-core';
|
|
@@ -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,
|
|
36
|
+
import { provideFirestore, getFirestore, connectFirestoreEmulator, enableMultiTabIndexedDbPersistence, enableIndexedDbPersistence, 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';
|
|
@@ -1814,12 +1814,12 @@ DbxFirebaseDefaultFirestoreProviderModule.ɵinj = i0.ɵɵngDeclareInjector({ min
|
|
|
1814
1814
|
if (emulators?.useEmulators && emulators?.firestore) {
|
|
1815
1815
|
connectFirestoreEmulator(firestore, emulators.firestore.host, emulators.firestore.port, {});
|
|
1816
1816
|
}
|
|
1817
|
-
if (firebaseOptions.enableIndexedDbPersistence !== false) {
|
|
1818
|
-
enableIndexedDbPersistence(firestore);
|
|
1819
|
-
}
|
|
1820
1817
|
if (firebaseOptions.enableMultiTabIndexedDbPersistence !== false) {
|
|
1821
1818
|
enableMultiTabIndexedDbPersistence(firestore);
|
|
1822
1819
|
}
|
|
1820
|
+
else if (firebaseOptions.enableIndexedDbPersistence !== false) {
|
|
1821
|
+
enableIndexedDbPersistence(firestore);
|
|
1822
|
+
}
|
|
1823
1823
|
return firestore;
|
|
1824
1824
|
}))] });
|
|
1825
1825
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseDefaultFirestoreProviderModule, decorators: [{
|
|
@@ -1834,12 +1834,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
1834
1834
|
if (emulators?.useEmulators && emulators?.firestore) {
|
|
1835
1835
|
connectFirestoreEmulator(firestore, emulators.firestore.host, emulators.firestore.port, {});
|
|
1836
1836
|
}
|
|
1837
|
-
if (firebaseOptions.enableIndexedDbPersistence !== false) {
|
|
1838
|
-
enableIndexedDbPersistence(firestore);
|
|
1839
|
-
}
|
|
1840
1837
|
if (firebaseOptions.enableMultiTabIndexedDbPersistence !== false) {
|
|
1841
1838
|
enableMultiTabIndexedDbPersistence(firestore);
|
|
1842
1839
|
}
|
|
1840
|
+
else if (firebaseOptions.enableIndexedDbPersistence !== false) {
|
|
1841
|
+
enableIndexedDbPersistence(firestore);
|
|
1842
|
+
}
|
|
1843
1843
|
return firestore;
|
|
1844
1844
|
}))
|
|
1845
1845
|
]
|
|
@@ -3397,15 +3397,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
3397
3397
|
/**
|
|
3398
3398
|
* Directive that connects a host DbxListView to a DbxFirebaseCollectionStoreDirective to pass data for rendering items from a collection and query parameters.
|
|
3399
3399
|
*/
|
|
3400
|
-
class DbxFirebaseCollectionListDirective {
|
|
3400
|
+
class DbxFirebaseCollectionListDirective extends AbstractSubscriptionDirective {
|
|
3401
3401
|
constructor(dbxFirebaseCollectionStoreDirective, dbxListViewWrapper) {
|
|
3402
|
+
super();
|
|
3402
3403
|
this.dbxFirebaseCollectionStoreDirective = dbxFirebaseCollectionStoreDirective;
|
|
3403
3404
|
this.dbxListViewWrapper = dbxListViewWrapper;
|
|
3404
|
-
this.dbxListViewWrapper.state$ = this.dbxFirebaseCollectionStoreDirective.pageLoadingState
|
|
3405
|
+
this.dbxListViewWrapper.state$ = this.dbxFirebaseCollectionStoreDirective.pageLoadingState$.pipe(tapLog('xxx'));
|
|
3406
|
+
}
|
|
3407
|
+
ngOnInit() {
|
|
3408
|
+
this.sub = this.dbxListViewWrapper.loadMore?.subscribe(() => {
|
|
3409
|
+
this.dbxFirebaseCollectionStoreDirective.next();
|
|
3410
|
+
});
|
|
3405
3411
|
}
|
|
3406
3412
|
}
|
|
3407
3413
|
DbxFirebaseCollectionListDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseCollectionListDirective, deps: [{ token: DbxFirebaseCollectionStoreDirective }, { token: i1$2.DbxListViewWrapper, host: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3408
|
-
DbxFirebaseCollectionListDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: DbxFirebaseCollectionListDirective, selector: "[dbxFirebaseCollectionList]", ngImport: i0 });
|
|
3414
|
+
DbxFirebaseCollectionListDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: DbxFirebaseCollectionListDirective, selector: "[dbxFirebaseCollectionList]", usesInheritance: true, ngImport: i0 });
|
|
3409
3415
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseCollectionListDirective, decorators: [{
|
|
3410
3416
|
type: Directive,
|
|
3411
3417
|
args: [{
|