@dereekb/dbx-firebase 11.0.15 → 11.0.17
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.
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { mapLoadingState } from '@dereekb/rxjs';
|
|
2
2
|
import { map, shareReplay } from 'rxjs';
|
|
3
3
|
import { SystemStateDocumentStore } from './systemstate.document.store';
|
|
4
|
-
import { Injectable, inject } from '@angular/core';
|
|
4
|
+
import { Inject, Injectable, Injector, Optional, inject } from '@angular/core';
|
|
5
|
+
import { newWithInjector } from '@dereekb/dbx-core';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
/**
|
|
7
8
|
* Abstract class used for accessing a SystemStateDocumentStore's data.
|
|
8
9
|
*/
|
|
9
10
|
export class AbstractSystemStateDocumentStoreAccessor {
|
|
10
|
-
systemStateDocumentStore =
|
|
11
|
+
systemStateDocumentStore = newWithInjector((SystemStateDocumentStore), inject(Injector));
|
|
11
12
|
documentData$ = this.systemStateDocumentStore.data$;
|
|
12
13
|
data$ = this.documentData$.pipe(map((x) => x.data), shareReplay(1));
|
|
13
14
|
dataState$ = this.systemStateDocumentStore.dataLoadingState$.pipe(mapLoadingState({ mapValue: (x) => x.data }), shareReplay(1));
|
|
@@ -17,10 +18,18 @@ export class AbstractSystemStateDocumentStoreAccessor {
|
|
|
17
18
|
constructor(type) {
|
|
18
19
|
this.systemStateDocumentStore.setId(type);
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
+
ngOnDestroy() {
|
|
22
|
+
this.systemStateDocumentStore.ngOnDestroy();
|
|
23
|
+
}
|
|
24
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractSystemStateDocumentStoreAccessor, deps: [{ token: null, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
21
25
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractSystemStateDocumentStoreAccessor });
|
|
22
26
|
}
|
|
23
27
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractSystemStateDocumentStoreAccessor, decorators: [{
|
|
24
28
|
type: Injectable
|
|
25
|
-
}], ctorParameters: function () { return [{ type: undefined
|
|
26
|
-
|
|
29
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
30
|
+
type: Inject,
|
|
31
|
+
args: [null]
|
|
32
|
+
}, {
|
|
33
|
+
type: Optional
|
|
34
|
+
}] }]; } });
|
|
35
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3lzdGVtc3RhdGUuZG9jdW1lbnQuc3RvcmUuYWNjZXNzb3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9kYngtZmlyZWJhc2Uvc3JjL2xpYi9tb2RlbC9zeXN0ZW0vc3lzdGVtc3RhdGUuZG9jdW1lbnQuc3RvcmUuYWNjZXNzb3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFnQixlQUFlLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDOUQsT0FBTyxFQUFFLEdBQUcsRUFBYyxXQUFXLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFDcEQsT0FBTyxFQUFFLHdCQUF3QixFQUFFLE1BQU0sOEJBQThCLENBQUM7QUFDeEUsT0FBTyxFQUFFLE1BQU0sRUFBRSxVQUFVLEVBQUUsUUFBUSxFQUFhLFFBQVEsRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDMUYsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLG1CQUFtQixDQUFDOztBQUVwRDs7R0FFRztBQUVILE1BQU0sT0FBZ0Isd0NBQXdDO0lBQ25ELHd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IHZvaWQge1xuICAgIHRoaXMuc3lzdGVtU3RhdGVEb2N1bWVudFN0b3JlLm5nT25EZXN0cm95KCk7XG4gIH1cbn1cbiJdfQ==
|
|
@@ -4,7 +4,7 @@ import { DbxAnalyticsService } from '@dereekb/dbx-analytics';
|
|
|
4
4
|
import { asObservable, timeoutStartWith, filterMaybe, isNot, SubscriptionObject, lazyFrom, switchMapWhileTrue, loadingStateFromObs, cleanupDestroyable, pageItemAccumulatorCurrentPage, accumulatorFlattenPageListLoadingState, useFirst, itemAccumulatorNextPageUntilResultsCount, iteratorNextPageUntilPage, iteratorNextPageUntilMaxPageLoadLimit, pageLoadingStateFromObs, useAsObservable, mapEachAsync, invertObservableDecision, filterItemsWithObservableDecision, distinctUntilModelKeyChange, successResult, beginLoading, errorResult, isLoadingStateLoading, cleanup, mapLoadingState } from '@dereekb/rxjs';
|
|
5
5
|
import { switchMap, of, shareReplay, map, distinctUntilChanged, EMPTY, catchError, firstValueFrom, BehaviorSubject, combineLatest, first, from, tap, interval, exhaustMap, filter, take, startWith, Subject, throttleTime, NEVER, combineLatestWith } from 'rxjs';
|
|
6
6
|
import * as i3 from '@dereekb/dbx-core';
|
|
7
|
-
import { loggedInObsFromIsLoggedIn, loggedOutObsFromIsLoggedIn, authUserIdentifier, DbxInjectionContext, AbstractForwardDbxInjectionContextDirective, DBX_INJECTION_COMPONENT_DATA, DbxInjectionComponentModule, DbxAuthService, AbstractSubscriptionDirective, AbstractIfDirective, dbxRouteParamReaderInstance, DbxRouteParamDefaultRedirectInstance, DbxRouterService, LockSetComponentStore } from '@dereekb/dbx-core';
|
|
7
|
+
import { loggedInObsFromIsLoggedIn, loggedOutObsFromIsLoggedIn, authUserIdentifier, DbxInjectionContext, AbstractForwardDbxInjectionContextDirective, DBX_INJECTION_COMPONENT_DATA, DbxInjectionComponentModule, DbxAuthService, AbstractSubscriptionDirective, AbstractIfDirective, dbxRouteParamReaderInstance, DbxRouteParamDefaultRedirectInstance, DbxRouterService, LockSetComponentStore, newWithInjector } from '@dereekb/dbx-core';
|
|
8
8
|
import * as i3$1 from '@angular/fire/auth';
|
|
9
9
|
import { Auth, authState, idToken, GoogleAuthProvider, FacebookAuthProvider, TwitterAuthProvider, GithubAuthProvider, signInWithPopup, createUserWithEmailAndPassword, signInWithEmailAndPassword, signInAnonymously, reauthenticateWithPopup, provideAuth, getAuth, connectAuthEmulator } from '@angular/fire/auth';
|
|
10
10
|
import { AUTH_ADMIN_ROLE, cachedGetter, urlWithoutParameters, addToSet, removeFromSet, filterMaybeValues, mapIterable, asArray, excludeValuesFromArray, containsStringAnyCase, addToSetCopy, iterableToArray, runAsyncTasksForValues, forEachKeyValue, countAllInNestedArray, invertDecision, readableError, isMaybeSo, firstValue } from '@dereekb/util';
|
|
@@ -4394,7 +4394,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
4394
4394
|
* Abstract class used for accessing a SystemStateDocumentStore's data.
|
|
4395
4395
|
*/
|
|
4396
4396
|
class AbstractSystemStateDocumentStoreAccessor {
|
|
4397
|
-
systemStateDocumentStore =
|
|
4397
|
+
systemStateDocumentStore = newWithInjector((SystemStateDocumentStore), inject(Injector));
|
|
4398
4398
|
documentData$ = this.systemStateDocumentStore.data$;
|
|
4399
4399
|
data$ = this.documentData$.pipe(map((x) => x.data), shareReplay(1));
|
|
4400
4400
|
dataState$ = this.systemStateDocumentStore.dataLoadingState$.pipe(mapLoadingState({ mapValue: (x) => x.data }), shareReplay(1));
|
|
@@ -4404,12 +4404,20 @@ class AbstractSystemStateDocumentStoreAccessor {
|
|
|
4404
4404
|
constructor(type) {
|
|
4405
4405
|
this.systemStateDocumentStore.setId(type);
|
|
4406
4406
|
}
|
|
4407
|
-
|
|
4407
|
+
ngOnDestroy() {
|
|
4408
|
+
this.systemStateDocumentStore.ngOnDestroy();
|
|
4409
|
+
}
|
|
4410
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractSystemStateDocumentStoreAccessor, deps: [{ token: null, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4408
4411
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractSystemStateDocumentStoreAccessor });
|
|
4409
4412
|
}
|
|
4410
4413
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractSystemStateDocumentStoreAccessor, decorators: [{
|
|
4411
4414
|
type: Injectable
|
|
4412
|
-
}], ctorParameters: function () { return [{ type: undefined
|
|
4415
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
4416
|
+
type: Inject,
|
|
4417
|
+
args: [null]
|
|
4418
|
+
}, {
|
|
4419
|
+
type: Optional
|
|
4420
|
+
}] }]; } });
|
|
4413
4421
|
|
|
4414
4422
|
class DbxFirebaseSystemStateDocumentStoreDirective extends DbxFirebaseDocumentStoreDirective {
|
|
4415
4423
|
constructor() {
|