@dereekb/dbx-firebase 9.19.5 → 9.20.1
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/model/index.mjs +2 -2
- package/esm2020/lib/model/model.module.mjs +6 -5
- package/esm2020/lib/model/modules/index.mjs +3 -0
- package/esm2020/lib/model/modules/model/index.mjs +6 -0
- package/esm2020/lib/model/modules/model/model.tracker.service.mjs +30 -0
- package/esm2020/lib/model/modules/model/model.types.list.component.mjs +67 -0
- package/esm2020/lib/model/modules/model/model.types.module.mjs +21 -0
- package/esm2020/lib/model/modules/model/model.types.service.mjs +114 -0
- package/esm2020/lib/model/modules/model/model.types.view.directive.mjs +51 -0
- package/esm2020/lib/model/modules/store/index.mjs +17 -0
- package/esm2020/lib/model/modules/store/model.store.module.mjs +23 -0
- package/esm2020/lib/model/modules/store/store.collection.change.directive.mjs +52 -0
- package/esm2020/lib/model/modules/store/store.collection.change.if.directive.mjs +57 -0
- package/esm2020/lib/model/modules/store/store.collection.directive.mjs +54 -0
- package/esm2020/lib/model/{store → modules/store}/store.collection.list.directive.mjs +1 -1
- package/esm2020/lib/model/modules/store/store.collection.mjs +55 -0
- package/esm2020/lib/model/modules/store/store.document.auth.directive.mjs +33 -0
- package/esm2020/lib/model/modules/store/store.document.crud.mjs +80 -0
- package/esm2020/lib/model/modules/store/store.document.directive.mjs +61 -0
- package/esm2020/lib/model/modules/store/store.document.mjs +109 -0
- package/esm2020/lib/model/modules/store/store.document.router.directive.mjs +67 -0
- package/esm2020/lib/model/modules/store/store.document.router.key.directive.mjs +67 -0
- package/esm2020/lib/model/modules/store/store.subcollection.directive.mjs +30 -0
- package/esm2020/lib/model/modules/store/store.subcollection.document.mjs +98 -0
- package/esm2020/lib/model/modules/store/store.subcollection.mjs +79 -0
- package/esm2020/lib/model/modules/store/store.subcollection.rxjs.mjs +23 -0
- package/esm2020/lib/model/service/index.mjs +3 -1
- package/esm2020/lib/model/service/model.context.instance.mjs +54 -0
- package/esm2020/lib/model/service/model.context.mjs +2 -35
- package/esm2020/lib/model/service/model.context.service.mjs +38 -0
- package/esm2020/lib/model/system/systemstate.collection.store.directive.mjs +2 -2
- package/esm2020/lib/model/system/systemstate.collection.store.mjs +2 -2
- package/esm2020/lib/model/system/systemstate.document.store.directive.mjs +2 -2
- package/esm2020/lib/model/system/systemstate.document.store.mjs +2 -2
- package/fesm2015/dereekb-dbx-firebase.mjs +364 -65
- package/fesm2015/dereekb-dbx-firebase.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-firebase.mjs +365 -65
- package/fesm2020/dereekb-dbx-firebase.mjs.map +1 -1
- package/lib/model/index.d.ts +1 -1
- package/lib/model/model.module.d.ts +3 -2
- package/lib/model/modules/index.d.ts +2 -0
- package/lib/model/modules/model/index.d.ts +5 -0
- package/lib/model/modules/model/model.tracker.service.d.ts +13 -0
- package/lib/model/modules/model/model.types.list.component.d.ts +22 -0
- package/lib/model/modules/model/model.types.module.d.ts +10 -0
- package/lib/model/modules/model/model.types.service.d.ts +88 -0
- package/lib/model/modules/model/model.types.view.directive.d.ts +19 -0
- package/lib/model/{store → modules/store}/index.d.ts +0 -0
- package/lib/model/{store → modules/store}/model.store.module.d.ts +0 -0
- package/lib/model/{store → modules/store}/store.collection.change.directive.d.ts +1 -1
- package/lib/model/{store → modules/store}/store.collection.change.if.directive.d.ts +0 -0
- package/lib/model/{store → modules/store}/store.collection.d.ts +2 -2
- package/lib/model/{store → modules/store}/store.collection.directive.d.ts +1 -1
- package/lib/model/{store → modules/store}/store.collection.list.directive.d.ts +0 -0
- package/lib/model/{store → modules/store}/store.document.auth.directive.d.ts +1 -1
- package/lib/model/{store → modules/store}/store.document.crud.d.ts +0 -0
- package/lib/model/{store → modules/store}/store.document.d.ts +0 -0
- package/lib/model/{store → modules/store}/store.document.directive.d.ts +5 -3
- package/lib/model/{store → modules/store}/store.document.router.directive.d.ts +0 -0
- package/lib/model/{store → modules/store}/store.document.router.key.directive.d.ts +0 -0
- package/lib/model/{store → modules/store}/store.subcollection.d.ts +0 -0
- package/lib/model/{store → modules/store}/store.subcollection.directive.d.ts +0 -0
- package/lib/model/{store → modules/store}/store.subcollection.document.d.ts +0 -0
- package/lib/model/{store → modules/store}/store.subcollection.rxjs.d.ts +0 -0
- package/lib/model/service/index.d.ts +2 -0
- package/lib/model/service/model.context.d.ts +16 -16
- package/lib/model/service/model.context.instance.d.ts +31 -0
- package/lib/model/service/model.context.service.d.ts +31 -0
- package/lib/model/system/systemstate.collection.store.d.ts +1 -1
- package/lib/model/system/systemstate.collection.store.directive.d.ts +1 -1
- package/lib/model/system/systemstate.document.store.d.ts +1 -1
- package/lib/model/system/systemstate.document.store.directive.d.ts +1 -1
- package/package.json +5 -5
- package/esm2020/lib/model/store/index.mjs +0 -17
- package/esm2020/lib/model/store/model.store.module.mjs +0 -23
- package/esm2020/lib/model/store/store.collection.change.directive.mjs +0 -52
- package/esm2020/lib/model/store/store.collection.change.if.directive.mjs +0 -57
- package/esm2020/lib/model/store/store.collection.directive.mjs +0 -54
- package/esm2020/lib/model/store/store.collection.mjs +0 -55
- package/esm2020/lib/model/store/store.document.auth.directive.mjs +0 -33
- package/esm2020/lib/model/store/store.document.crud.mjs +0 -80
- package/esm2020/lib/model/store/store.document.directive.mjs +0 -59
- package/esm2020/lib/model/store/store.document.mjs +0 -109
- package/esm2020/lib/model/store/store.document.router.directive.mjs +0 -67
- package/esm2020/lib/model/store/store.document.router.key.directive.mjs +0 -67
- package/esm2020/lib/model/store/store.subcollection.directive.mjs +0 -30
- package/esm2020/lib/model/store/store.subcollection.document.mjs +0 -98
- package/esm2020/lib/model/store/store.subcollection.mjs +0 -79
- package/esm2020/lib/model/store/store.subcollection.rxjs.mjs +0 -23
|
@@ -1,9 +1,9 @@
|
|
|
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
|
-
import { switchMap, of, shareReplay, map, distinctUntilChanged, catchError, firstValueFrom, BehaviorSubject, combineLatest, from, first, tap, interval, exhaustMap, filter, take, startWith, EMPTY, Subject, throttleTime, NEVER } from 'rxjs';
|
|
4
|
-
import { asObservable, timeoutStartWith, filterMaybe, isNot, SubscriptionObject, lazyFrom, switchMapWhileTrue, loadingStateFromObs, tapLog, cleanupDestroyable, accumulatorFlattenPageListLoadingState, useFirst, pageLoadingStateFromObs, useAsObservable, successResult, beginLoading, errorResult, cleanup, mapLoadingState } from '@dereekb/rxjs';
|
|
3
|
+
import { switchMap, of, shareReplay, map, distinctUntilChanged, catchError, firstValueFrom, BehaviorSubject, combineLatest, from, first, tap, interval, exhaustMap, filter, take, startWith, EMPTY, Subject, throttleTime, NEVER, combineLatestWith } from 'rxjs';
|
|
4
|
+
import { asObservable, timeoutStartWith, filterMaybe, isNot, SubscriptionObject, lazyFrom, switchMapWhileTrue, loadingStateFromObs, tapLog, cleanupDestroyable, accumulatorFlattenPageListLoadingState, useFirst, pageLoadingStateFromObs, useAsObservable, distinctUntilModelKeyChange, successResult, beginLoading, errorResult, cleanup, mapLoadingState } from '@dereekb/rxjs';
|
|
5
5
|
import * as i2$2 from '@dereekb/dbx-core';
|
|
6
|
-
import { loggedInObsFromIsLoggedIn, loggedOutObsFromIsLoggedIn, authUserIdentifier, DbxInjectionContext, AbstractForwardDbxInjectionContextDirective, DBX_INJECTION_COMPONENT_DATA, DbxInjectionComponentModule, DbxAuthService,
|
|
6
|
+
import { loggedInObsFromIsLoggedIn, loggedOutObsFromIsLoggedIn, authUserIdentifier, DbxInjectionContext, AbstractForwardDbxInjectionContextDirective, DBX_INJECTION_COMPONENT_DATA, DbxInjectionComponentModule, DbxAuthService, AbstractSubscriptionDirective, AbstractIfDirective, DbxRouteParamReaderInstance, DbxRouteParamDefaultRedirectInstance, LockSetComponentStore } from '@dereekb/dbx-core';
|
|
7
7
|
import * as i1 from '@angular/fire/auth';
|
|
8
8
|
import { authState, idToken, GoogleAuthProvider, FacebookAuthProvider, TwitterAuthProvider, GithubAuthProvider, signInWithPopup, createUserWithEmailAndPassword, signInWithEmailAndPassword, signInAnonymously, provideAuth, getAuth, connectAuthEmulator } from '@angular/fire/auth';
|
|
9
9
|
import { AUTH_ADMIN_ROLE, cachedGetter, urlWithoutParameters, addToSet, removeFromSet, filterMaybeValues, mapIterable, asArray, excludeValuesFromArray, containsStringAnyCase, addToSetCopy, iterableToArray, PromiseUtility, forEachKeyValue, readableError, isMaybeSo, firstValue } from '@dereekb/util';
|
|
@@ -18,9 +18,9 @@ import { MatIconModule } from '@angular/material/icon';
|
|
|
18
18
|
import * as i2 from '@angular/common';
|
|
19
19
|
import { CommonModule } from '@angular/common';
|
|
20
20
|
import * as i1$2 from '@dereekb/dbx-web';
|
|
21
|
-
import { DbxRouterAnchorModule, DbxReadableErrorModule, DbxActionModule, DbxButtonModule, AbstractDbxSelectionListWrapperDirective, provideDbxListViewWrapper, DEFAULT_LIST_WRAPPER_DIRECTIVE_TEMPLATE, AbstractDbxSelectionListViewDirective, provideDbxListView, DEFAULT_DBX_SELECTION_VALUE_LIST_DIRECTIVE_TEMPLATE, AbstractDbxValueListViewItemComponent, DBX_VALUE_LIST_VIEW_ITEM, TwoColumnsContextStore, AbstractPopupDirective, DbxWidgetModule, DbxTextModule, DbxBlockLayoutModule, DbxTwoColumnLayoutModule, DbxPopupInteractionModule, DbxListLayoutModule } from '@dereekb/dbx-web';
|
|
21
|
+
import { DbxRouterAnchorModule, DbxReadableErrorModule, DbxActionModule, DbxButtonModule, AbstractDbxSelectionListWrapperDirective, provideDbxListViewWrapper, DEFAULT_LIST_WRAPPER_DIRECTIVE_TEMPLATE, AbstractDbxSelectionListViewDirective, provideDbxListView, DEFAULT_DBX_SELECTION_VALUE_LIST_DIRECTIVE_TEMPLATE, AbstractDbxValueListViewItemComponent, DBX_VALUE_LIST_VIEW_ITEM, TwoColumnsContextStore, AbstractPopupDirective, DbxWidgetModule, DbxTextModule, DbxBlockLayoutModule, DbxTwoColumnLayoutModule, DbxPopupInteractionModule, DbxListLayoutModule, allDbxModelViewTrackerEventModelKeys, DbxModelInfoModule } from '@dereekb/dbx-web';
|
|
22
22
|
import * as i1$4 from '@dereekb/firebase';
|
|
23
|
-
import { firebaseAuthErrorToReadableError, ScheduledFunctionDevelopmentFunctionTypeEnum, clientFirebaseFirestoreContextFactory, SystemStateFirestoreCollections, FIREBASE_DEVELOPMENT_FUNCTIONS_MAP_KEY, FirebaseDevelopmentFunctions, iterationQueryDocChangeWatcher, firebaseQuerySnapshotAccumulator, firebaseQueryItemAccumulator, firestoreModelKeysFromDocuments, firestoreModelIdsFromDocuments, documentReferencesFromDocuments, getDocumentSnapshots, getDataFromDocumentSnapshots, latestSnapshotsFromDocuments, dataFromDocumentSnapshots, loadDocumentsForKeys, loadDocumentsForDocumentReferences, loadDocumentsForIds, FirestoreAccessorStreamMode, firestoreModelIdsFromKey, firestoreModelKeyPartPairs, firestoreModelKeyPairObject, documentDataWithIdAndKey, inferKeyFromTwoWayFlatFirestoreModelKey, clientFirebaseStorageContextFactory } from '@dereekb/firebase';
|
|
23
|
+
import { firebaseAuthErrorToReadableError, ScheduledFunctionDevelopmentFunctionTypeEnum, clientFirebaseFirestoreContextFactory, SystemStateFirestoreCollections, FIREBASE_DEVELOPMENT_FUNCTIONS_MAP_KEY, FirebaseDevelopmentFunctions, iterationQueryDocChangeWatcher, firebaseQuerySnapshotAccumulator, firebaseQueryItemAccumulator, firestoreModelKeysFromDocuments, firestoreModelIdsFromDocuments, documentReferencesFromDocuments, getDocumentSnapshots, getDataFromDocumentSnapshots, latestSnapshotsFromDocuments, dataFromDocumentSnapshots, loadDocumentsForKeys, loadDocumentsForDocumentReferences, loadDocumentsForIds, asFirestoreModelKeyCollectionType, buildFirebaseCollectionTypeModelTypeMap, FirestoreAccessorStreamMode, firestoreModelIdsFromKey, firestoreModelKeyPartPairs, firestoreModelKeyPairObject, documentDataWithIdAndKey, inferKeyFromTwoWayFlatFirestoreModelKey, clientFirebaseStorageContextFactory } from '@dereekb/firebase';
|
|
24
24
|
import * as i1$3 from '@dereekb/dbx-form';
|
|
25
25
|
import { AbstractAsyncFormlyFormDirective, usernamePasswordLoginFields, provideFormlyContext, AbstractSyncFormlyFormDirective, emailField, DbxFormIoModule, DbxFormModule, DbxFormlyModule, DbxFormActionModule, DbxFormFormlyTextFieldModule, AbstractConfigAsyncFormlyFormDirective, pickableItemChipField, filterPickableItemFieldValuesByLabel } from '@dereekb/dbx-form';
|
|
26
26
|
import { msToSeconds } from '@dereekb/date';
|
|
@@ -2796,17 +2796,35 @@ function dbxFirebaseDocumentLoaderInstanceWithAccessor(accessor) {
|
|
|
2796
2796
|
return new DbxFirebaseDocumentLoaderInstance({ accessor });
|
|
2797
2797
|
}
|
|
2798
2798
|
|
|
2799
|
+
function dbxFirebaseInContextFirebaseModelServiceInstanceFactory(context$) {
|
|
2800
|
+
return (type, keyObs) => {
|
|
2801
|
+
const key$ = asObservable(keyObs);
|
|
2802
|
+
const modelServiceObs = context$.pipe(map((x) => x(type)), switchMap((service) => key$.pipe(map((key) => service(key)))));
|
|
2803
|
+
return new DbxFirebaseInContextFirebaseModelServiceInstance(modelServiceObs);
|
|
2804
|
+
};
|
|
2805
|
+
}
|
|
2799
2806
|
/**
|
|
2800
2807
|
* Wraps an InModelContextFirebaseModelService observable and provides different piped observables.
|
|
2801
2808
|
*/
|
|
2802
2809
|
class DbxFirebaseInContextFirebaseModelServiceInstance {
|
|
2803
2810
|
constructor(modelService$) {
|
|
2804
2811
|
this.modelService$ = modelService$;
|
|
2812
|
+
this.key$ = this.modelService$.pipe(map((x) => x.model.key));
|
|
2813
|
+
// MARK: Model
|
|
2814
|
+
this.modelType$ = this.modelService$.pipe(map((x) => x.model.modelType), distinctUntilChanged());
|
|
2815
|
+
this.model$ = this.modelService$.pipe(map((x) => x.model), distinctUntilChanged((a, b) => a.key === b.key), shareReplay(1));
|
|
2816
|
+
this.snapshotData$ = this.model$.pipe(switchMap((x) => x.snapshotData()), shareReplay(1));
|
|
2805
2817
|
// MARK: Roles
|
|
2806
2818
|
this.roleReader$ = this.modelService$.pipe(switchMap((x) => x.roleReader()), shareReplay(1));
|
|
2807
2819
|
this.roleMap$ = this.roleReader$.pipe(map((x) => x.roleMap), shareReplay(1));
|
|
2808
2820
|
this.hasNoAccess$ = this.roleReader$.pipe(map((x) => x.hasNoAccess()), shareReplay(1));
|
|
2809
2821
|
}
|
|
2822
|
+
snapshotStream(mode) {
|
|
2823
|
+
return this.model$.pipe(switchMap((x) => x.snapshotStream(mode)), shareReplay(1));
|
|
2824
|
+
}
|
|
2825
|
+
snapshotDataStream(mode, options) {
|
|
2826
|
+
return this.model$.pipe(switchMap((x) => x.snapshotDataStream(mode)), shareReplay(1));
|
|
2827
|
+
}
|
|
2810
2828
|
truthMap(input) {
|
|
2811
2829
|
return this.roleReader$.pipe(map((x) => x.truthMap(input)), shareReplay(1));
|
|
2812
2830
|
}
|
|
@@ -2830,6 +2848,344 @@ class DbxFirebaseInContextFirebaseModelServiceInstance {
|
|
|
2830
2848
|
}
|
|
2831
2849
|
}
|
|
2832
2850
|
|
|
2851
|
+
/**
|
|
2852
|
+
* Used for retrieving contexts for a specific model type/identity.
|
|
2853
|
+
*/
|
|
2854
|
+
class DbxFirebaseModelContextService {
|
|
2855
|
+
}
|
|
2856
|
+
function dbxFirebaseModelContextServiceInfoInstanceFactory(config) {
|
|
2857
|
+
const { modelService, entityMap$ } = config;
|
|
2858
|
+
return (keyObs) => {
|
|
2859
|
+
const key$ = asObservable(keyObs);
|
|
2860
|
+
return key$.pipe(asFirestoreModelKeyCollectionType(), switchMap((pair) => {
|
|
2861
|
+
return entityMap$.pipe(map((entityMap) => {
|
|
2862
|
+
const modelType = entityMap.get(pair.collectionType);
|
|
2863
|
+
if (!modelType) {
|
|
2864
|
+
const message = `dbxFirebaseModelContextServiceInfoInstanceFactory Error: Failed to retrieve model type for collection type "${pair.collectionType}"`;
|
|
2865
|
+
console.error(message);
|
|
2866
|
+
throw new Error(message);
|
|
2867
|
+
}
|
|
2868
|
+
return modelService(modelType, pair.key);
|
|
2869
|
+
}));
|
|
2870
|
+
}));
|
|
2871
|
+
};
|
|
2872
|
+
}
|
|
2873
|
+
/**
|
|
2874
|
+
* Operator function that builds a FirestoreModelIdentityTypeMap from the input context and shares the replay.
|
|
2875
|
+
*
|
|
2876
|
+
* Since the output won't change with different contexts, the map is built once and then shared.
|
|
2877
|
+
*
|
|
2878
|
+
* @returns
|
|
2879
|
+
*/
|
|
2880
|
+
function firebaseContextServiceEntityMap() {
|
|
2881
|
+
return (obs) => {
|
|
2882
|
+
return obs.pipe(map((x) => buildFirebaseCollectionTypeModelTypeMap(x)), first(), shareReplay(1));
|
|
2883
|
+
};
|
|
2884
|
+
}
|
|
2885
|
+
|
|
2886
|
+
/**
|
|
2887
|
+
* Configuration provided in the root module for configuring entries.
|
|
2888
|
+
*/
|
|
2889
|
+
class DbxFirebaseModelTypesServiceConfig {
|
|
2890
|
+
}
|
|
2891
|
+
/**
|
|
2892
|
+
* Provides model type information about models registered within Firebase.
|
|
2893
|
+
*
|
|
2894
|
+
* Automatically configures the DbxModelTypesService.
|
|
2895
|
+
*/
|
|
2896
|
+
class DbxFirebaseModelTypesService {
|
|
2897
|
+
constructor(dbxFirebaseModelContextService, dbxModelTypesService, config) {
|
|
2898
|
+
this.dbxFirebaseModelContextService = dbxFirebaseModelContextService;
|
|
2899
|
+
this.dbxModelTypesService = dbxModelTypesService;
|
|
2900
|
+
if (config) {
|
|
2901
|
+
this.register(config.entries);
|
|
2902
|
+
}
|
|
2903
|
+
}
|
|
2904
|
+
getDisplayInfo(typeInfo, data) {
|
|
2905
|
+
let displayInfo;
|
|
2906
|
+
if (data != null) {
|
|
2907
|
+
displayInfo = typeInfo.displayInfoFactory(data);
|
|
2908
|
+
displayInfo.icon = displayInfo.icon || typeInfo.icon; // set default icon
|
|
2909
|
+
}
|
|
2910
|
+
else {
|
|
2911
|
+
displayInfo = this.getDefaultDisplayInfo(typeInfo);
|
|
2912
|
+
}
|
|
2913
|
+
return displayInfo;
|
|
2914
|
+
}
|
|
2915
|
+
getDefaultDisplayInfo(typeInfo) {
|
|
2916
|
+
// TODO: Make configurable
|
|
2917
|
+
return {
|
|
2918
|
+
title: typeInfo.label ?? '',
|
|
2919
|
+
icon: 'warning'
|
|
2920
|
+
};
|
|
2921
|
+
}
|
|
2922
|
+
// MARK: Register
|
|
2923
|
+
register(entries) {
|
|
2924
|
+
const typeConfigs = asArray(entries).map((x) => ({ ...x, modelType: x.identity.modelType }));
|
|
2925
|
+
this.dbxModelTypesService.addTypeConfigs(typeConfigs);
|
|
2926
|
+
}
|
|
2927
|
+
// MARK: Retrieval
|
|
2928
|
+
currentInfoForType(type) {
|
|
2929
|
+
return this.dbxModelTypesService.typesMap$.pipe(map((x) => x[type]));
|
|
2930
|
+
}
|
|
2931
|
+
infoForType(type) {
|
|
2932
|
+
return this.currentInfoForType(type).pipe(map((x) => {
|
|
2933
|
+
if (!x) {
|
|
2934
|
+
console.error(`DbxFirebaseModelTypesService: contained no info for type "${type}". Ensure the correct type was entered, and that the type is registered with the DbxFirebaseModelTypesService.`);
|
|
2935
|
+
throw x;
|
|
2936
|
+
}
|
|
2937
|
+
return x;
|
|
2938
|
+
}));
|
|
2939
|
+
}
|
|
2940
|
+
instanceForKey(key$) {
|
|
2941
|
+
return new DbxFirebaseModelTypesServiceInstance(this.dbxFirebaseModelContextService.modelInfoInstance(key$), this);
|
|
2942
|
+
}
|
|
2943
|
+
instancePairsForKeys(keys) {
|
|
2944
|
+
return dbxFirebaseModelTypesServiceInstancePairForKeysFactory(this)(keys);
|
|
2945
|
+
}
|
|
2946
|
+
}
|
|
2947
|
+
DbxFirebaseModelTypesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseModelTypesService, deps: [{ token: DbxFirebaseModelContextService }, { token: i1$2.DbxModelTypesService }, { token: DbxFirebaseModelTypesServiceConfig, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2948
|
+
DbxFirebaseModelTypesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseModelTypesService, providedIn: 'root' });
|
|
2949
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseModelTypesService, decorators: [{
|
|
2950
|
+
type: Injectable,
|
|
2951
|
+
args: [{
|
|
2952
|
+
providedIn: 'root'
|
|
2953
|
+
}]
|
|
2954
|
+
}], ctorParameters: function () { return [{ type: DbxFirebaseModelContextService }, { type: i1$2.DbxModelTypesService }, { type: DbxFirebaseModelTypesServiceConfig, decorators: [{
|
|
2955
|
+
type: Optional
|
|
2956
|
+
}] }]; } });
|
|
2957
|
+
function dbxFirebaseModelTypesServiceInstancePairForKeysFactory(service) {
|
|
2958
|
+
return (keys) => {
|
|
2959
|
+
const instances = asArray(keys).map((x) => service.instanceForKey(x).instancePair$);
|
|
2960
|
+
return combineLatest(instances);
|
|
2961
|
+
};
|
|
2962
|
+
}
|
|
2963
|
+
/**
|
|
2964
|
+
* DbxFirebaseModelTypesService instance
|
|
2965
|
+
*/
|
|
2966
|
+
class DbxFirebaseModelTypesServiceInstance {
|
|
2967
|
+
constructor(modelInfoInstance$, dbxFirebaseModelTypesService) {
|
|
2968
|
+
this.modelInfoInstance$ = modelInfoInstance$;
|
|
2969
|
+
this.dbxFirebaseModelTypesService = dbxFirebaseModelTypesService;
|
|
2970
|
+
this.key$ = this.modelInfoInstance$.pipe(switchMap((x) => x.key$));
|
|
2971
|
+
this.modelType$ = this.modelInfoInstance$.pipe(switchMap((x) => x.modelType$));
|
|
2972
|
+
this.snapshotData$ = this.modelInfoInstance$.pipe(switchMap((x) => x.snapshotData$));
|
|
2973
|
+
this.typeInfo$ = this.modelType$.pipe(switchMap((x) => this.dbxFirebaseModelTypesService.infoForType(x)), distinctUntilChanged(), shareReplay(1));
|
|
2974
|
+
this.identity$ = this.typeInfo$.pipe(map((x) => x.identity), distinctUntilChanged());
|
|
2975
|
+
this.segueRef$ = combineLatest([this.key$, this.typeInfo$]).pipe(map(([key, info]) => (info.sref ? info.sref(key) : undefined)), shareReplay(1));
|
|
2976
|
+
this.displayInfo$ = combineLatest([this.typeInfo$, this.snapshotData$]).pipe(map(([typeInfo, data]) => this.dbxFirebaseModelTypesService.getDisplayInfo(typeInfo, data)), shareReplay(1));
|
|
2977
|
+
this.clickableSegueRef$ = combineLatest([this.segueRef$, this.displayInfo$]).pipe(map(([segueRef, displayInfo]) => {
|
|
2978
|
+
let ref = undefined;
|
|
2979
|
+
if (segueRef) {
|
|
2980
|
+
ref = {
|
|
2981
|
+
...segueRef,
|
|
2982
|
+
title: displayInfo.title,
|
|
2983
|
+
icon: displayInfo.icon
|
|
2984
|
+
};
|
|
2985
|
+
}
|
|
2986
|
+
return ref;
|
|
2987
|
+
}), shareReplay(1));
|
|
2988
|
+
this.instancePair$ = combineLatest([this.clickableSegueRef$, this.displayInfo$, this.key$]).pipe(map(([segueRef, displayInfo, key]) => ({ segueRef, displayInfo, key, instance: this })), shareReplay(1));
|
|
2989
|
+
}
|
|
2990
|
+
}
|
|
2991
|
+
|
|
2992
|
+
class DbxFirebaseModelTrackerService {
|
|
2993
|
+
constructor(dbxModelTrackerService, dbxFirebaseModelTypesService) {
|
|
2994
|
+
this.dbxModelTrackerService = dbxModelTrackerService;
|
|
2995
|
+
this.dbxFirebaseModelTypesService = dbxFirebaseModelTypesService;
|
|
2996
|
+
}
|
|
2997
|
+
// TODO: Expose as observables directly that update when history events change.
|
|
2998
|
+
loadHistoryKeys() {
|
|
2999
|
+
return this.dbxModelTrackerService.getAllViewEvents().pipe(map(allDbxModelViewTrackerEventModelKeys));
|
|
3000
|
+
}
|
|
3001
|
+
loadHistoryPairs() {
|
|
3002
|
+
const historyKeys$ = this.loadHistoryKeys();
|
|
3003
|
+
return historyKeys$.pipe(switchMap((x) => this.dbxFirebaseModelTypesService.instancePairsForKeys(x)));
|
|
3004
|
+
}
|
|
3005
|
+
}
|
|
3006
|
+
DbxFirebaseModelTrackerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseModelTrackerService, deps: [{ token: i1$2.DbxModelTrackerService }, { token: DbxFirebaseModelTypesService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3007
|
+
DbxFirebaseModelTrackerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseModelTrackerService, providedIn: 'root' });
|
|
3008
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseModelTrackerService, decorators: [{
|
|
3009
|
+
type: Injectable,
|
|
3010
|
+
args: [{
|
|
3011
|
+
providedIn: 'root'
|
|
3012
|
+
}]
|
|
3013
|
+
}], ctorParameters: function () { return [{ type: i1$2.DbxModelTrackerService }, { type: DbxFirebaseModelTypesService }]; } });
|
|
3014
|
+
|
|
3015
|
+
/**
|
|
3016
|
+
* Renders an item as configured from the DbxFirebaseModelTypesServiceInstancePair.
|
|
3017
|
+
*/
|
|
3018
|
+
class DbxFirebaseModelTypeInstanceComponent extends AbstractDbxSelectionListWrapperDirective {
|
|
3019
|
+
constructor() {
|
|
3020
|
+
super({
|
|
3021
|
+
componentClass: DbxFirebaseModelTypeInstanceViewComponent,
|
|
3022
|
+
defaultSelectionMode: 'view'
|
|
3023
|
+
});
|
|
3024
|
+
}
|
|
3025
|
+
}
|
|
3026
|
+
DbxFirebaseModelTypeInstanceComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseModelTypeInstanceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3027
|
+
DbxFirebaseModelTypeInstanceComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxFirebaseModelTypeInstanceComponent, selector: "dbx-firebase-model-type-instance-list", providers: provideDbxListViewWrapper(DbxFirebaseModelTypeInstanceComponent), usesInheritance: true, ngImport: i0, template: "\n<dbx-list [state$]=\"state$\" [config]=\"config$ | async\" [disabled]=\"disabled\" [selectionMode]=\"selectionMode\">\n <ng-content top select=\"[top]\"></ng-content>\n <ng-content bottom select=\"[bottom]\"></ng-content>\n <ng-content empty select=\"[empty]\"></ng-content>\n</dbx-list>\n", isInline: true, dependencies: [{ kind: "component", type: i1$2.DbxListComponent, selector: "dbx-list", inputs: ["padded", "state$", "config", "disabled", "selectionMode"], outputs: ["contentScrolled"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] });
|
|
3028
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseModelTypeInstanceComponent, decorators: [{
|
|
3029
|
+
type: Component,
|
|
3030
|
+
args: [{
|
|
3031
|
+
selector: 'dbx-firebase-model-type-instance-list',
|
|
3032
|
+
template: DEFAULT_LIST_WRAPPER_DIRECTIVE_TEMPLATE,
|
|
3033
|
+
providers: provideDbxListViewWrapper(DbxFirebaseModelTypeInstanceComponent)
|
|
3034
|
+
}]
|
|
3035
|
+
}], ctorParameters: function () { return []; } });
|
|
3036
|
+
class DbxFirebaseModelTypeInstanceViewComponent extends AbstractDbxSelectionListViewDirective {
|
|
3037
|
+
constructor() {
|
|
3038
|
+
super(...arguments);
|
|
3039
|
+
this.config = {
|
|
3040
|
+
componentClass: DbxFirebaseModelTypeInstanceViewItemComponent,
|
|
3041
|
+
mapValuesToItemValues: (x) => of(x.map((y) => ({ itemValue: y, icon: y.displayInfo.icon ?? y.icon, anchor: y.segueRef })))
|
|
3042
|
+
};
|
|
3043
|
+
}
|
|
3044
|
+
}
|
|
3045
|
+
DbxFirebaseModelTypeInstanceViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseModelTypeInstanceViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3046
|
+
DbxFirebaseModelTypeInstanceViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxFirebaseModelTypeInstanceViewComponent, selector: "ng-component", providers: provideDbxListView(DbxFirebaseModelTypeInstanceViewComponent), usesInheritance: true, ngImport: i0, template: "<dbx-selection-list-view [config]=\"config\"></dbx-selection-list-view>", isInline: true, dependencies: [{ kind: "component", type: i1$2.DbxSelectionValueListViewComponent, selector: "dbx-selection-list-view" }] });
|
|
3047
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseModelTypeInstanceViewComponent, decorators: [{
|
|
3048
|
+
type: Component,
|
|
3049
|
+
args: [{
|
|
3050
|
+
template: DEFAULT_DBX_SELECTION_VALUE_LIST_DIRECTIVE_TEMPLATE,
|
|
3051
|
+
providers: provideDbxListView(DbxFirebaseModelTypeInstanceViewComponent)
|
|
3052
|
+
}]
|
|
3053
|
+
}] });
|
|
3054
|
+
class DbxFirebaseModelTypeInstanceViewItemComponent extends AbstractDbxValueListViewItemComponent {
|
|
3055
|
+
get title() {
|
|
3056
|
+
return this.itemValue.displayInfo.title;
|
|
3057
|
+
}
|
|
3058
|
+
}
|
|
3059
|
+
DbxFirebaseModelTypeInstanceViewItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseModelTypeInstanceViewItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3060
|
+
DbxFirebaseModelTypeInstanceViewItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxFirebaseModelTypeInstanceViewItemComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
|
3061
|
+
<div>
|
|
3062
|
+
<p>{{ title }}</p>
|
|
3063
|
+
</div>
|
|
3064
|
+
`, isInline: true });
|
|
3065
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseModelTypeInstanceViewItemComponent, decorators: [{
|
|
3066
|
+
type: Component,
|
|
3067
|
+
args: [{
|
|
3068
|
+
template: `
|
|
3069
|
+
<div>
|
|
3070
|
+
<p>{{ title }}</p>
|
|
3071
|
+
</div>
|
|
3072
|
+
`
|
|
3073
|
+
}]
|
|
3074
|
+
}] });
|
|
3075
|
+
|
|
3076
|
+
/**
|
|
3077
|
+
* Abstract directive that contains a DbxFirebaseDocumentStore and provides an interface for communicating with other directives.
|
|
3078
|
+
*/
|
|
3079
|
+
class DbxFirebaseDocumentStoreDirective {
|
|
3080
|
+
constructor(store) {
|
|
3081
|
+
this.store = store;
|
|
3082
|
+
this.exists$ = this.store.exists$;
|
|
3083
|
+
this.document$ = this.store.document$;
|
|
3084
|
+
this.documentLoadingState$ = this.store.documentLoadingState$;
|
|
3085
|
+
this.id$ = this.store.id$;
|
|
3086
|
+
this.key$ = this.store.key$;
|
|
3087
|
+
this.ref$ = this.store.ref$;
|
|
3088
|
+
this.snapshot$ = this.store.snapshot$;
|
|
3089
|
+
this.snapshotLoadingState$ = this.store.snapshotLoadingState$;
|
|
3090
|
+
this.modelIdentity$ = this.store.modelIdentity$;
|
|
3091
|
+
this.data$ = this.store.data$;
|
|
3092
|
+
this.loadingState$ = this.store.dataLoadingState$;
|
|
3093
|
+
}
|
|
3094
|
+
// MARK: Inputs
|
|
3095
|
+
set id(id) {
|
|
3096
|
+
this.store.setId(id);
|
|
3097
|
+
}
|
|
3098
|
+
set key(key) {
|
|
3099
|
+
this.store.setKey(key);
|
|
3100
|
+
}
|
|
3101
|
+
set ref(ref) {
|
|
3102
|
+
this.store.setRef(ref);
|
|
3103
|
+
}
|
|
3104
|
+
set streamMode(streamMode) {
|
|
3105
|
+
this.store.setStreamMode(streamMode);
|
|
3106
|
+
}
|
|
3107
|
+
}
|
|
3108
|
+
DbxFirebaseDocumentStoreDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseDocumentStoreDirective, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
3109
|
+
DbxFirebaseDocumentStoreDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: DbxFirebaseDocumentStoreDirective, inputs: { id: "id", key: "key", ref: "ref", streamMode: "streamMode" }, ngImport: i0 });
|
|
3110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseDocumentStoreDirective, decorators: [{
|
|
3111
|
+
type: Directive
|
|
3112
|
+
}], ctorParameters: function () { return [{ type: undefined }]; }, propDecorators: { id: [{
|
|
3113
|
+
type: Input
|
|
3114
|
+
}], key: [{
|
|
3115
|
+
type: Input
|
|
3116
|
+
}], ref: [{
|
|
3117
|
+
type: Input
|
|
3118
|
+
}], streamMode: [{
|
|
3119
|
+
type: Input
|
|
3120
|
+
}] } });
|
|
3121
|
+
function provideDbxFirebaseDocumentStoreDirective(sourceType, storeType) {
|
|
3122
|
+
const providers = [
|
|
3123
|
+
{
|
|
3124
|
+
provide: DbxFirebaseDocumentStoreDirective,
|
|
3125
|
+
useExisting: forwardRef(() => sourceType)
|
|
3126
|
+
}
|
|
3127
|
+
];
|
|
3128
|
+
if (storeType) {
|
|
3129
|
+
providers.push(storeType);
|
|
3130
|
+
}
|
|
3131
|
+
return providers;
|
|
3132
|
+
}
|
|
3133
|
+
|
|
3134
|
+
/**
|
|
3135
|
+
* Used with a DbxFirebaseDocumentStoreDirective to emit model viewed events.
|
|
3136
|
+
*/
|
|
3137
|
+
class DbxfirebaseModelViewedEventDirective extends AbstractSubscriptionDirective {
|
|
3138
|
+
constructor(dbxFirebaseDocumentStoreDirective, dbxModelObjectStateService, dbxFirebaseModelTypesService) {
|
|
3139
|
+
super();
|
|
3140
|
+
this.dbxFirebaseDocumentStoreDirective = dbxFirebaseDocumentStoreDirective;
|
|
3141
|
+
this.dbxModelObjectStateService = dbxModelObjectStateService;
|
|
3142
|
+
this.dbxFirebaseModelTypesService = dbxFirebaseModelTypesService;
|
|
3143
|
+
}
|
|
3144
|
+
ngOnInit() {
|
|
3145
|
+
this.sub = this.dbxFirebaseDocumentStoreDirective.data$
|
|
3146
|
+
.pipe(
|
|
3147
|
+
//
|
|
3148
|
+
distinctUntilModelKeyChange(), combineLatestWith(this.dbxFirebaseDocumentStoreDirective.modelIdentity$.pipe(switchMap((x) => this.dbxFirebaseModelTypesService.infoForType(x.modelType)), first()), this.dbxFirebaseDocumentStoreDirective.key$), map(([data, typeInfo, key]) => {
|
|
3149
|
+
const displayInfo = this.dbxFirebaseModelTypesService.getDisplayInfo(typeInfo, data);
|
|
3150
|
+
const pair = {
|
|
3151
|
+
key,
|
|
3152
|
+
type: typeInfo.modelType,
|
|
3153
|
+
name: displayInfo.title
|
|
3154
|
+
};
|
|
3155
|
+
return pair;
|
|
3156
|
+
}))
|
|
3157
|
+
.subscribe((modelKeyTypeNamePair) => {
|
|
3158
|
+
this.dbxModelObjectStateService.emitModelViewEvent({ modelKeyTypeNamePair, context: this.context || undefined });
|
|
3159
|
+
});
|
|
3160
|
+
}
|
|
3161
|
+
}
|
|
3162
|
+
DbxfirebaseModelViewedEventDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxfirebaseModelViewedEventDirective, deps: [{ token: DbxFirebaseDocumentStoreDirective }, { token: i1$2.DbxModelObjectStateService }, { token: DbxFirebaseModelTypesService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3163
|
+
DbxfirebaseModelViewedEventDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: DbxfirebaseModelViewedEventDirective, selector: "[dbxFirebaseModelViewedEvent]", inputs: { context: ["dbxFirebaseModelViewedEvent", "context"] }, usesInheritance: true, ngImport: i0 });
|
|
3164
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxfirebaseModelViewedEventDirective, decorators: [{
|
|
3165
|
+
type: Directive,
|
|
3166
|
+
args: [{
|
|
3167
|
+
selector: '[dbxFirebaseModelViewedEvent]'
|
|
3168
|
+
}]
|
|
3169
|
+
}], ctorParameters: function () { return [{ type: DbxFirebaseDocumentStoreDirective }, { type: i1$2.DbxModelObjectStateService }, { type: DbxFirebaseModelTypesService }]; }, propDecorators: { context: [{
|
|
3170
|
+
type: Input,
|
|
3171
|
+
args: ['dbxFirebaseModelViewedEvent']
|
|
3172
|
+
}] } });
|
|
3173
|
+
|
|
3174
|
+
const declarations$1 = [DbxfirebaseModelViewedEventDirective, DbxFirebaseModelTypeInstanceComponent, DbxFirebaseModelTypeInstanceViewComponent, DbxFirebaseModelTypeInstanceViewItemComponent];
|
|
3175
|
+
class DbxFirebaseModelTypesModule {
|
|
3176
|
+
}
|
|
3177
|
+
DbxFirebaseModelTypesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseModelTypesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3178
|
+
DbxFirebaseModelTypesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseModelTypesModule, declarations: [DbxfirebaseModelViewedEventDirective, DbxFirebaseModelTypeInstanceComponent, DbxFirebaseModelTypeInstanceViewComponent, DbxFirebaseModelTypeInstanceViewItemComponent], imports: [CommonModule, DbxModelInfoModule, DbxListLayoutModule], exports: [DbxfirebaseModelViewedEventDirective, DbxFirebaseModelTypeInstanceComponent, DbxFirebaseModelTypeInstanceViewComponent, DbxFirebaseModelTypeInstanceViewItemComponent] });
|
|
3179
|
+
DbxFirebaseModelTypesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseModelTypesModule, imports: [CommonModule, DbxModelInfoModule, DbxListLayoutModule] });
|
|
3180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseModelTypesModule, decorators: [{
|
|
3181
|
+
type: NgModule,
|
|
3182
|
+
args: [{
|
|
3183
|
+
imports: [CommonModule, DbxModelInfoModule, DbxListLayoutModule],
|
|
3184
|
+
declarations: declarations$1,
|
|
3185
|
+
exports: declarations$1
|
|
3186
|
+
}]
|
|
3187
|
+
}] });
|
|
3188
|
+
|
|
2833
3189
|
/**
|
|
2834
3190
|
* Abstract directive that contains a DbxFirebaseCollectionStore and provides an interface for communicating with other directives.
|
|
2835
3191
|
*/
|
|
@@ -3000,62 +3356,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
3000
3356
|
type: Host
|
|
3001
3357
|
}] }]; } });
|
|
3002
3358
|
|
|
3003
|
-
/**
|
|
3004
|
-
* Abstract directive that contains a DbxFirebaseDocumentStore and provides an interface for communicating with other directives.
|
|
3005
|
-
*/
|
|
3006
|
-
class DbxFirebaseDocumentStoreDirective {
|
|
3007
|
-
constructor(store) {
|
|
3008
|
-
this.store = store;
|
|
3009
|
-
this.exists$ = this.store.exists$;
|
|
3010
|
-
this.document$ = this.store.document$;
|
|
3011
|
-
this.documentLoadingState$ = this.store.documentLoadingState$;
|
|
3012
|
-
this.id$ = this.store.id$;
|
|
3013
|
-
this.ref$ = this.store.ref$;
|
|
3014
|
-
this.snapshot$ = this.store.snapshot$;
|
|
3015
|
-
this.snapshotLoadingState$ = this.store.snapshotLoadingState$;
|
|
3016
|
-
this.data$ = this.store.data$;
|
|
3017
|
-
this.loadingState$ = this.store.dataLoadingState$;
|
|
3018
|
-
}
|
|
3019
|
-
// MARK: Inputs
|
|
3020
|
-
set id(id) {
|
|
3021
|
-
this.store.setId(id);
|
|
3022
|
-
}
|
|
3023
|
-
set key(key) {
|
|
3024
|
-
this.store.setKey(key);
|
|
3025
|
-
}
|
|
3026
|
-
set ref(ref) {
|
|
3027
|
-
this.store.setRef(ref);
|
|
3028
|
-
}
|
|
3029
|
-
set streamMode(streamMode) {
|
|
3030
|
-
this.store.setStreamMode(streamMode);
|
|
3031
|
-
}
|
|
3032
|
-
}
|
|
3033
|
-
DbxFirebaseDocumentStoreDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseDocumentStoreDirective, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
3034
|
-
DbxFirebaseDocumentStoreDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: DbxFirebaseDocumentStoreDirective, inputs: { id: "id", key: "key", ref: "ref", streamMode: "streamMode" }, ngImport: i0 });
|
|
3035
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseDocumentStoreDirective, decorators: [{
|
|
3036
|
-
type: Directive
|
|
3037
|
-
}], ctorParameters: function () { return [{ type: undefined }]; }, propDecorators: { id: [{
|
|
3038
|
-
type: Input
|
|
3039
|
-
}], key: [{
|
|
3040
|
-
type: Input
|
|
3041
|
-
}], ref: [{
|
|
3042
|
-
type: Input
|
|
3043
|
-
}], streamMode: [{
|
|
3044
|
-
type: Input
|
|
3045
|
-
}] } });
|
|
3046
|
-
function provideDbxFirebaseDocumentStoreDirective(sourceType, storeType) {
|
|
3047
|
-
const providers = [
|
|
3048
|
-
{
|
|
3049
|
-
provide: DbxFirebaseDocumentStoreDirective,
|
|
3050
|
-
useExisting: forwardRef(() => sourceType)
|
|
3051
|
-
}
|
|
3052
|
-
];
|
|
3053
|
-
if (storeType) {
|
|
3054
|
-
providers.push(storeType);
|
|
3055
|
-
}
|
|
3056
|
-
return providers;
|
|
3057
|
-
}
|
|
3058
|
-
|
|
3059
3359
|
/**
|
|
3060
3360
|
* Utility directive for a host DbxFirebaseDocumentStoreDirective that sets the document's ID to match the ID of the current user.
|
|
3061
3361
|
*
|
|
@@ -3801,12 +4101,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
3801
4101
|
class DbxFirebaseModelModule {
|
|
3802
4102
|
}
|
|
3803
4103
|
DbxFirebaseModelModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseModelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3804
|
-
DbxFirebaseModelModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseModelModule, exports: [DbxFirebaseModelStoreModule] });
|
|
3805
|
-
DbxFirebaseModelModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseModelModule, imports: [DbxFirebaseModelStoreModule] });
|
|
4104
|
+
DbxFirebaseModelModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseModelModule, exports: [DbxFirebaseModelStoreModule, DbxFirebaseModelTypesModule] });
|
|
4105
|
+
DbxFirebaseModelModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseModelModule, imports: [DbxFirebaseModelStoreModule, DbxFirebaseModelTypesModule] });
|
|
3806
4106
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFirebaseModelModule, decorators: [{
|
|
3807
4107
|
type: NgModule,
|
|
3808
4108
|
args: [{
|
|
3809
|
-
exports: [DbxFirebaseModelStoreModule]
|
|
4109
|
+
exports: [DbxFirebaseModelStoreModule, DbxFirebaseModelTypesModule]
|
|
3810
4110
|
}]
|
|
3811
4111
|
}] });
|
|
3812
4112
|
|
|
@@ -3902,5 +4202,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
3902
4202
|
* Generated bundle index. Do not edit.
|
|
3903
4203
|
*/
|
|
3904
4204
|
|
|
3905
|
-
export { AbstractConfiguredDbxFirebaseLoginButtonDirective, AbstractDbxFirebaseCollectionStore, AbstractDbxFirebaseCollectionWithParentStore, AbstractDbxFirebaseDocumentStore, AbstractDbxFirebaseDocumentWithParentStore, AbstractSingleItemDbxFirebaseDocument, AbstractSystemStateDocumentStoreAccessor, DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_ID_PARAM_KEY, DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_KEY_PARAM_KEY, DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_USE_PARAM_VALUE, DBX_FIREBASE_MODEL_DOES_NOT_EXIST_ERROR, DBX_FIREBASE_OPTIONS_TOKEN, DBX_FIREBASE_STORAGE_CONTEXT_CONFIG_TOKEN, DBX_FIREBASE_STORAGE_CONTEXT_TOKEN, DBX_FIRESTORE_CONTEXT_TOKEN, DEFAULT_CONFIGURED_DBX_FIREBASE_LOGIN_BUTTON_TEMPLATE, DEFAULT_DBX_FIREBASE_ANALYTICS_USER_PROPERTIES_FACTORY, DEFAULT_DBX_FIREBASE_AUTH_SERVICE_DELEGATE, DEFAULT_FIREBASE_AUTH_LOGIN_PASSWORD_CONFIG, DEFAULT_FIREBASE_AUTH_LOGIN_PASSWORD_CONFIG_TOKEN, DEFAULT_FIREBASE_AUTH_LOGIN_PROVIDERS_TOKEN, DEFAULT_FIREBASE_AUTH_LOGIN_TERMS_COMPONENT_CLASS_TOKEN, DEFAULT_FIREBASE_COLLECTION_CHANGE_TRIGGER_FUNCTION, DEFAULT_FIREBASE_DEVELOPMENT_ENABLED_TOKEN, DEFAULT_FIREBASE_DEVELOPMENT_POPUP_KEY, DEFAULT_FIREBASE_DEVELOPMENT_SCHEDULER_ENABLED_TOKEN, DEFAULT_FIREBASE_DEVELOPMENT_WIDGET_PROVIDERS_TOKEN, DEFAULT_FIREBASE_LOGIN_METHOD_CATEGORY, DEVELOPMENT_FIREBASE_SERVER_SCHEDULER_WIDGET_KEY, DbxFirebaseAnalyticsUserSource, DbxFirebaseAppCheckHttpInterceptor, DbxFirebaseAuthContextInfo, DbxFirebaseAuthLoginService, DbxFirebaseAuthModule, DbxFirebaseAuthService, DbxFirebaseAuthServiceDelegate, DbxFirebaseCollectionChangeDirective, DbxFirebaseCollectionChangeTriggerInstance, DbxFirebaseCollectionChangeWatcherInstance, DbxFirebaseCollectionHasChangeDirective, DbxFirebaseCollectionListDirective, DbxFirebaseCollectionLoaderInstance, DbxFirebaseCollectionStoreDirective, DbxFirebaseCollectionWithParentStoreDirective, DbxFirebaseDefaultAppCheckProviderModule, DbxFirebaseDefaultAuthProviderModule, DbxFirebaseDefaultFirebaseProvidersModule, DbxFirebaseDefaultFirestoreProviderModule, DbxFirebaseDefaultFunctionsProviderModule, DbxFirebaseDefaultStorageProviderModule, DbxFirebaseDevelopmentDirective, DbxFirebaseDevelopmentModule, DbxFirebaseDevelopmentModuleRootConfig, DbxFirebaseDevelopmentPopupComponent, DbxFirebaseDevelopmentPopupContentComponent, DbxFirebaseDevelopmentPopupContentFormComponent, DbxFirebaseDevelopmentSchedulerListComponent, DbxFirebaseDevelopmentSchedulerListViewComponent, DbxFirebaseDevelopmentSchedulerListViewItemComponent, DbxFirebaseDevelopmentSchedulerService, DbxFirebaseDevelopmentSchedulerWidgetComponent, DbxFirebaseDevelopmentService, DbxFirebaseDevelopmentWidgetService, DbxFirebaseDocumentAuthIdDirective, DbxFirebaseDocumentLoaderInstance, DbxFirebaseDocumentStoreDirective, DbxFirebaseDocumentStoreRouteIdDirective, DbxFirebaseDocumentStoreRouteKeyDirective, DbxFirebaseEmailFormComponent, DbxFirebaseEmailRecoveryFormComponent, DbxFirebaseEmulatorModule, DbxFirebaseEmulatorService, DbxFirebaseFirestoreCollectionModule, DbxFirebaseFunctionsModule, DbxFirebaseIdRouteParamRedirectInstance, DbxFirebaseInContextFirebaseModelServiceInstance, DbxFirebaseLoginAnonymousComponent, DbxFirebaseLoginAppleComponent, DbxFirebaseLoginButtonComponent, DbxFirebaseLoginButtonContainerComponent, DbxFirebaseLoginComponent, DbxFirebaseLoginContext, DbxFirebaseLoginContextBackButtonComponent, DbxFirebaseLoginContextDirective, DbxFirebaseLoginEmailComponent, DbxFirebaseLoginEmailContentComponent, DbxFirebaseLoginFacebookComponent, DbxFirebaseLoginGitHubComponent, DbxFirebaseLoginGoogleComponent, DbxFirebaseLoginListComponent, DbxFirebaseLoginMicrosoftComponent, DbxFirebaseLoginModule, DbxFirebaseLoginModuleRootConfig, DbxFirebaseLoginTermsComponent, DbxFirebaseLoginTermsSimpleComponent, DbxFirebaseLoginTwitterComponent, DbxFirebaseModelModule, DbxFirebaseModelStoreModule, DbxFirebaseModule, DbxFirebaseParsedEmulatorsConfig, DbxFirebaseRegisterComponent, DbxFirebaseRegisterEmailComponent, DbxFirebaseStorageModule, DbxFirebaseStorageService, DbxFirebaseSystemStateCollectionStoreDirective, DbxFirebaseSystemStateDocumentStoreDirective, DbxFirestoreContextService, DbxLimitedFirebaseDocumentLoaderInstance, OAUTH_FIREBASE_LOGIN_METHOD_CATEGORY, SystemStateCollectionStore, SystemStateDocumentStore, authRolesObsWithClaimsService, authUserInfoFromAuthUser, authUserStateFromFirebaseAuthServiceFunction, dbxFirebaseCollectionChangeTrigger, dbxFirebaseCollectionChangeTriggerForStore, dbxFirebaseCollectionChangeTriggerForWatcher, dbxFirebaseCollectionChangeWatcher, dbxFirebaseCollectionLoaderInstance, dbxFirebaseCollectionLoaderInstanceWithCollection, dbxFirebaseDocumentLoaderInstance, dbxFirebaseDocumentLoaderInstanceWithAccessor, dbxFirebaseIdRouteParamRedirect, dbxFirebaseKeyRouteParamRedirect, dbxFirebaseStorageModuleContextConfigFactory, dbxLimitedFirebaseDocumentLoaderInstance, dbxLimitedFirebaseDocumentLoaderInstanceWithAccessor, defaultDbxFirebaseAuthServiceDelegateWithClaimsService, defaultFirebaseAuthLoginProvidersFactory, developmentFirebaseServerSchedulerWidgetEntry, enableAppCheckDebugTokenGeneration, firebaseAuthTokenFromUser, firebaseDocumentStoreCreateFunction, firebaseDocumentStoreCrudFunction, firebaseDocumentStoreDeleteFunction, firebaseDocumentStoreReadFunction, firebaseDocumentStoreUpdateFunction, modelDoesNotExistError, provideDbxFirebaseCollectionStoreDirective, provideDbxFirebaseCollectionWithParentStoreDirective, provideDbxFirebaseDocumentStoreDirective, provideSystemStateFirestoreCollections, readDbxAnalyticsUserPropertiesFromAuthUserInfo, readValueFromIdToken, setParentStoreEffect, stateFromTokenForLoggedInUserFunction };
|
|
4205
|
+
export { AbstractConfiguredDbxFirebaseLoginButtonDirective, AbstractDbxFirebaseCollectionStore, AbstractDbxFirebaseCollectionWithParentStore, AbstractDbxFirebaseDocumentStore, AbstractDbxFirebaseDocumentWithParentStore, AbstractSingleItemDbxFirebaseDocument, AbstractSystemStateDocumentStoreAccessor, DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_ID_PARAM_KEY, DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_KEY_PARAM_KEY, DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_USE_PARAM_VALUE, DBX_FIREBASE_MODEL_DOES_NOT_EXIST_ERROR, DBX_FIREBASE_OPTIONS_TOKEN, DBX_FIREBASE_STORAGE_CONTEXT_CONFIG_TOKEN, DBX_FIREBASE_STORAGE_CONTEXT_TOKEN, DBX_FIRESTORE_CONTEXT_TOKEN, DEFAULT_CONFIGURED_DBX_FIREBASE_LOGIN_BUTTON_TEMPLATE, DEFAULT_DBX_FIREBASE_ANALYTICS_USER_PROPERTIES_FACTORY, DEFAULT_DBX_FIREBASE_AUTH_SERVICE_DELEGATE, DEFAULT_FIREBASE_AUTH_LOGIN_PASSWORD_CONFIG, DEFAULT_FIREBASE_AUTH_LOGIN_PASSWORD_CONFIG_TOKEN, DEFAULT_FIREBASE_AUTH_LOGIN_PROVIDERS_TOKEN, DEFAULT_FIREBASE_AUTH_LOGIN_TERMS_COMPONENT_CLASS_TOKEN, DEFAULT_FIREBASE_COLLECTION_CHANGE_TRIGGER_FUNCTION, DEFAULT_FIREBASE_DEVELOPMENT_ENABLED_TOKEN, DEFAULT_FIREBASE_DEVELOPMENT_POPUP_KEY, DEFAULT_FIREBASE_DEVELOPMENT_SCHEDULER_ENABLED_TOKEN, DEFAULT_FIREBASE_DEVELOPMENT_WIDGET_PROVIDERS_TOKEN, DEFAULT_FIREBASE_LOGIN_METHOD_CATEGORY, DEVELOPMENT_FIREBASE_SERVER_SCHEDULER_WIDGET_KEY, DbxFirebaseAnalyticsUserSource, DbxFirebaseAppCheckHttpInterceptor, DbxFirebaseAuthContextInfo, DbxFirebaseAuthLoginService, DbxFirebaseAuthModule, DbxFirebaseAuthService, DbxFirebaseAuthServiceDelegate, DbxFirebaseCollectionChangeDirective, DbxFirebaseCollectionChangeTriggerInstance, DbxFirebaseCollectionChangeWatcherInstance, DbxFirebaseCollectionHasChangeDirective, DbxFirebaseCollectionListDirective, DbxFirebaseCollectionLoaderInstance, DbxFirebaseCollectionStoreDirective, DbxFirebaseCollectionWithParentStoreDirective, DbxFirebaseDefaultAppCheckProviderModule, DbxFirebaseDefaultAuthProviderModule, DbxFirebaseDefaultFirebaseProvidersModule, DbxFirebaseDefaultFirestoreProviderModule, DbxFirebaseDefaultFunctionsProviderModule, DbxFirebaseDefaultStorageProviderModule, DbxFirebaseDevelopmentDirective, DbxFirebaseDevelopmentModule, DbxFirebaseDevelopmentModuleRootConfig, DbxFirebaseDevelopmentPopupComponent, DbxFirebaseDevelopmentPopupContentComponent, DbxFirebaseDevelopmentPopupContentFormComponent, DbxFirebaseDevelopmentSchedulerListComponent, DbxFirebaseDevelopmentSchedulerListViewComponent, DbxFirebaseDevelopmentSchedulerListViewItemComponent, DbxFirebaseDevelopmentSchedulerService, DbxFirebaseDevelopmentSchedulerWidgetComponent, DbxFirebaseDevelopmentService, DbxFirebaseDevelopmentWidgetService, DbxFirebaseDocumentAuthIdDirective, DbxFirebaseDocumentLoaderInstance, DbxFirebaseDocumentStoreDirective, DbxFirebaseDocumentStoreRouteIdDirective, DbxFirebaseDocumentStoreRouteKeyDirective, DbxFirebaseEmailFormComponent, DbxFirebaseEmailRecoveryFormComponent, DbxFirebaseEmulatorModule, DbxFirebaseEmulatorService, DbxFirebaseFirestoreCollectionModule, DbxFirebaseFunctionsModule, DbxFirebaseIdRouteParamRedirectInstance, DbxFirebaseInContextFirebaseModelServiceInstance, DbxFirebaseLoginAnonymousComponent, DbxFirebaseLoginAppleComponent, DbxFirebaseLoginButtonComponent, DbxFirebaseLoginButtonContainerComponent, DbxFirebaseLoginComponent, DbxFirebaseLoginContext, DbxFirebaseLoginContextBackButtonComponent, DbxFirebaseLoginContextDirective, DbxFirebaseLoginEmailComponent, DbxFirebaseLoginEmailContentComponent, DbxFirebaseLoginFacebookComponent, DbxFirebaseLoginGitHubComponent, DbxFirebaseLoginGoogleComponent, DbxFirebaseLoginListComponent, DbxFirebaseLoginMicrosoftComponent, DbxFirebaseLoginModule, DbxFirebaseLoginModuleRootConfig, DbxFirebaseLoginTermsComponent, DbxFirebaseLoginTermsSimpleComponent, DbxFirebaseLoginTwitterComponent, DbxFirebaseModelContextService, DbxFirebaseModelModule, DbxFirebaseModelStoreModule, DbxFirebaseModelTrackerService, DbxFirebaseModelTypeInstanceComponent, DbxFirebaseModelTypeInstanceViewComponent, DbxFirebaseModelTypeInstanceViewItemComponent, DbxFirebaseModelTypesModule, DbxFirebaseModelTypesService, DbxFirebaseModelTypesServiceConfig, DbxFirebaseModelTypesServiceInstance, DbxFirebaseModule, DbxFirebaseParsedEmulatorsConfig, DbxFirebaseRegisterComponent, DbxFirebaseRegisterEmailComponent, DbxFirebaseStorageModule, DbxFirebaseStorageService, DbxFirebaseSystemStateCollectionStoreDirective, DbxFirebaseSystemStateDocumentStoreDirective, DbxFirestoreContextService, DbxLimitedFirebaseDocumentLoaderInstance, DbxfirebaseModelViewedEventDirective, OAUTH_FIREBASE_LOGIN_METHOD_CATEGORY, SystemStateCollectionStore, SystemStateDocumentStore, authRolesObsWithClaimsService, authUserInfoFromAuthUser, authUserStateFromFirebaseAuthServiceFunction, dbxFirebaseCollectionChangeTrigger, dbxFirebaseCollectionChangeTriggerForStore, dbxFirebaseCollectionChangeTriggerForWatcher, dbxFirebaseCollectionChangeWatcher, dbxFirebaseCollectionLoaderInstance, dbxFirebaseCollectionLoaderInstanceWithCollection, dbxFirebaseDocumentLoaderInstance, dbxFirebaseDocumentLoaderInstanceWithAccessor, dbxFirebaseIdRouteParamRedirect, dbxFirebaseInContextFirebaseModelServiceInstanceFactory, dbxFirebaseKeyRouteParamRedirect, dbxFirebaseModelContextServiceInfoInstanceFactory, dbxFirebaseModelTypesServiceInstancePairForKeysFactory, dbxFirebaseStorageModuleContextConfigFactory, dbxLimitedFirebaseDocumentLoaderInstance, dbxLimitedFirebaseDocumentLoaderInstanceWithAccessor, defaultDbxFirebaseAuthServiceDelegateWithClaimsService, defaultFirebaseAuthLoginProvidersFactory, developmentFirebaseServerSchedulerWidgetEntry, enableAppCheckDebugTokenGeneration, firebaseAuthTokenFromUser, firebaseContextServiceEntityMap, firebaseDocumentStoreCreateFunction, firebaseDocumentStoreCrudFunction, firebaseDocumentStoreDeleteFunction, firebaseDocumentStoreReadFunction, firebaseDocumentStoreUpdateFunction, modelDoesNotExistError, provideDbxFirebaseCollectionStoreDirective, provideDbxFirebaseCollectionWithParentStoreDirective, provideDbxFirebaseDocumentStoreDirective, provideSystemStateFirestoreCollections, readDbxAnalyticsUserPropertiesFromAuthUserInfo, readValueFromIdToken, setParentStoreEffect, stateFromTokenForLoggedInUserFunction };
|
|
3906
4206
|
//# sourceMappingURL=dereekb-dbx-firebase.mjs.map
|