@dereekb/dbx-firebase 9.15.2 → 9.15.3
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/store/store.document.directive.mjs +13 -2
- package/esm2020/lib/model/store/store.document.mjs +6 -13
- package/fesm2015/dereekb-dbx-firebase.mjs +16 -13
- package/fesm2015/dereekb-dbx-firebase.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-firebase.mjs +16 -13
- package/fesm2020/dereekb-dbx-firebase.mjs.map +1 -1
- package/lib/model/store/store.document.d.ts +22 -14
- package/lib/model/store/store.document.directive.d.ts +7 -5
- package/package.json +6 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Observable, Subscription } from 'rxjs';
|
|
2
|
-
import { DocumentSnapshot, DocumentReference, FirestoreCollection, FirestoreDocument, DocumentDataWithIdAndKey, FirestoreModelId, FirestoreModelKey, FirestoreCollectionLike, FirestoreModelIdentity, FirestoreModelCollectionAndIdPair, FirestoreModelCollectionAndIdPairObject } from '@dereekb/firebase';
|
|
2
|
+
import { DocumentSnapshot, DocumentReference, FirestoreCollection, FirestoreDocument, DocumentDataWithIdAndKey, FirestoreModelId, FirestoreModelKey, FirestoreCollectionLike, FirestoreModelIdentity, FirestoreModelCollectionAndIdPair, FirestoreModelCollectionAndIdPairObject, FirestoreAccessorStreamMode } from '@dereekb/firebase';
|
|
3
3
|
import { LoadingState, ObservableOrValue } from '@dereekb/rxjs';
|
|
4
4
|
import { Maybe } from '@dereekb/util';
|
|
5
5
|
import { LockSetComponent, LockSetComponentStore } from '@dereekb/dbx-core';
|
|
@@ -13,6 +13,7 @@ export interface DbxFirebaseDocumentStore<T, D extends FirestoreDocument<T> = Fi
|
|
|
13
13
|
readonly inputKey$: Observable<FirestoreModelKey>;
|
|
14
14
|
readonly currentInputRef$: Observable<Maybe<DocumentReference<T>>>;
|
|
15
15
|
readonly inputRef$: Observable<DocumentReference<T>>;
|
|
16
|
+
readonly streamMode$: Observable<FirestoreAccessorStreamMode>;
|
|
16
17
|
readonly currentDocument$: Observable<Maybe<D>>;
|
|
17
18
|
readonly document$: Observable<D>;
|
|
18
19
|
readonly id$: Observable<FirestoreModelId>;
|
|
@@ -31,13 +32,26 @@ export interface DbxFirebaseDocumentStore<T, D extends FirestoreDocument<T> = Fi
|
|
|
31
32
|
readonly currentExists$: Observable<boolean>;
|
|
32
33
|
readonly exists$: Observable<boolean>;
|
|
33
34
|
readonly modelIdentity$: Observable<FirestoreModelIdentity>;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
/**
|
|
36
|
+
* Sets the id of the document to load.
|
|
37
|
+
*/
|
|
38
|
+
readonly setId: (observableOrValue: ObservableOrValue<Maybe<FirestoreModelId>>) => Subscription;
|
|
39
|
+
/**
|
|
40
|
+
* Sets the key of the document to load.
|
|
41
|
+
*/
|
|
42
|
+
readonly setKey: (observableOrValue: ObservableOrValue<Maybe<FirestoreModelKey>>) => Subscription;
|
|
43
|
+
/**
|
|
44
|
+
* Sets the ref of the document to load.
|
|
45
|
+
*/
|
|
46
|
+
readonly setRef: (observableOrValue: ObservableOrValue<Maybe<DocumentReference<T>>>) => Subscription;
|
|
37
47
|
/**
|
|
38
48
|
* Clears the key/id/ref and current document from the store.
|
|
39
49
|
*/
|
|
40
|
-
clearRefs: () => void;
|
|
50
|
+
readonly clearRefs: () => void;
|
|
51
|
+
/**
|
|
52
|
+
* Sets the stream mode.
|
|
53
|
+
*/
|
|
54
|
+
readonly setStreamMode: (observableOrValue: ObservableOrValue<FirestoreAccessorStreamMode>) => Subscription;
|
|
41
55
|
/**
|
|
42
56
|
* Sets the FirestoreCollection to retrieve documents from.
|
|
43
57
|
*/
|
|
@@ -50,6 +64,7 @@ export interface DbxFirebaseDocumentStore<T, D extends FirestoreDocument<T> = Fi
|
|
|
50
64
|
export interface DbxFirebaseDocumentStoreContextState<T, D extends FirestoreDocument<T> = FirestoreDocument<T>> {
|
|
51
65
|
readonly firestoreCollectionLike?: Maybe<FirestoreCollectionLike<T, D>>;
|
|
52
66
|
readonly firestoreCollection?: Maybe<FirestoreCollection<T, D>>;
|
|
67
|
+
readonly streamMode?: FirestoreAccessorStreamMode;
|
|
53
68
|
readonly id?: Maybe<FirestoreModelId>;
|
|
54
69
|
readonly key?: Maybe<FirestoreModelKey>;
|
|
55
70
|
readonly ref?: Maybe<DocumentReference<T>>;
|
|
@@ -68,6 +83,7 @@ export declare class AbstractDbxFirebaseDocumentStore<T, D extends FirestoreDocu
|
|
|
68
83
|
readonly inputKey$: Observable<FirestoreModelKey>;
|
|
69
84
|
readonly currentInputRef$: Observable<Maybe<DocumentReference<T>>>;
|
|
70
85
|
readonly inputRef$: Observable<DocumentReference<T>>;
|
|
86
|
+
readonly streamMode$: Observable<FirestoreAccessorStreamMode>;
|
|
71
87
|
readonly currentDocument$: Observable<Maybe<D>>;
|
|
72
88
|
/**
|
|
73
89
|
* Whether or not an id/ref/key has been input and currentDocument is not null.
|
|
@@ -93,18 +109,10 @@ export declare class AbstractDbxFirebaseDocumentStore<T, D extends FirestoreDocu
|
|
|
93
109
|
readonly exists$: Observable<boolean>;
|
|
94
110
|
readonly doesNotExist$: Observable<boolean>;
|
|
95
111
|
readonly modelIdentity$: Observable<FirestoreModelIdentity>;
|
|
96
|
-
/**
|
|
97
|
-
* Sets the id of the document to load.
|
|
98
|
-
*/
|
|
99
112
|
readonly setId: (observableOrValue: Maybe<string> | Observable<Maybe<string>>) => Subscription;
|
|
100
|
-
/**
|
|
101
|
-
* Sets the key of the document to load.
|
|
102
|
-
*/
|
|
103
113
|
readonly setKey: (observableOrValue: Maybe<string> | Observable<Maybe<string>>) => Subscription;
|
|
104
|
-
/**
|
|
105
|
-
* Sets the ref of the document to load.
|
|
106
|
-
*/
|
|
107
114
|
readonly setRef: (observableOrValue: Maybe<DocumentReference<T>> | Observable<Maybe<DocumentReference<T>>>) => Subscription;
|
|
115
|
+
readonly setStreamMode: (observableOrValue: FirestoreAccessorStreamMode | Observable<FirestoreAccessorStreamMode>) => Subscription;
|
|
108
116
|
readonly clearRefs: () => void;
|
|
109
117
|
readonly setFirestoreCollection: (() => void) | ((observableOrValue: Maybe<FirestoreCollection<T, D>> | Observable<Maybe<FirestoreCollection<T, D>>>) => Subscription);
|
|
110
118
|
readonly setFirestoreCollectionLike: (() => void) | ((observableOrValue: Maybe<FirestoreCollectionLike<T, D, import("@dereekb/firebase").LimitedFirestoreDocumentAccessor<T, D>>> | Observable<Maybe<FirestoreCollectionLike<T, D, import("@dereekb/firebase").LimitedFirestoreDocumentAccessor<T, D>>>>) => Subscription);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Provider, Type } from '@angular/core';
|
|
2
|
-
import { DocumentReference, FirestoreDocument } from '@dereekb/firebase';
|
|
3
|
-
import {
|
|
2
|
+
import { DocumentReference, FirestoreAccessorStreamMode, FirestoreDocument, FirestoreModelKey, FirestoreModelId } from '@dereekb/firebase';
|
|
3
|
+
import { Maybe } from '@dereekb/util';
|
|
4
4
|
import { DbxFirebaseDocumentStore } from './store.document';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
/**
|
|
@@ -18,10 +18,12 @@ export declare abstract class DbxFirebaseDocumentStoreDirective<T = unknown, D e
|
|
|
18
18
|
readonly snapshotLoadingState$: import("rxjs").Observable<import("../../../../../../dist/packages/rxjs/src").LoadingState<import("@dereekb/firebase").DocumentSnapshot<T>>>;
|
|
19
19
|
readonly data$: import("rxjs").Observable<import("@dereekb/firebase").DocumentDataWithIdAndKey<T>>;
|
|
20
20
|
readonly loadingState$: import("rxjs").Observable<import("../../../../../../dist/packages/rxjs/src").LoadingState<import("@dereekb/firebase").DocumentDataWithIdAndKey<T>>>;
|
|
21
|
-
set id(id:
|
|
22
|
-
set
|
|
21
|
+
set id(id: Maybe<FirestoreModelId>);
|
|
22
|
+
set key(key: Maybe<FirestoreModelKey>);
|
|
23
|
+
set ref(ref: Maybe<DocumentReference<T>>);
|
|
24
|
+
set streamMode(streamMode: FirestoreAccessorStreamMode);
|
|
23
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFirebaseDocumentStoreDirective<any, any, any>, never>;
|
|
24
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxFirebaseDocumentStoreDirective<any, any, any>, never, never, { "id": "id"; "ref": "ref"; }, {}, never, never, false>;
|
|
26
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxFirebaseDocumentStoreDirective<any, any, any>, never, never, { "id": "id"; "key": "key"; "ref": "ref"; "streamMode": "streamMode"; }, {}, never, never, false>;
|
|
25
27
|
}
|
|
26
28
|
/**
|
|
27
29
|
* Configures providers for a DbxFirebaseDocumentStoreDirective.
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/dbx-firebase",
|
|
3
|
-
"version": "9.15.
|
|
3
|
+
"version": "9.15.3",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^14.0.0",
|
|
6
6
|
"@angular/core": "^14.0.0",
|
|
7
|
-
"@dereekb/util": "9.15.
|
|
7
|
+
"@dereekb/util": "9.15.3",
|
|
8
8
|
"firebase": "^9.9.2",
|
|
9
9
|
"rxjs": "^7.5.0",
|
|
10
10
|
"@angular/fire": "^7.4.1",
|
|
11
|
-
"@dereekb/firebase": "9.15.
|
|
12
|
-
"@dereekb/dbx-core": "9.15.
|
|
11
|
+
"@dereekb/firebase": "9.15.3",
|
|
12
|
+
"@dereekb/dbx-core": "9.15.3",
|
|
13
13
|
"@angular/material": "^14.0.0",
|
|
14
|
-
"@dereekb/dbx-web": "9.15.
|
|
15
|
-
"@dereekb/dbx-form": "9.15.
|
|
14
|
+
"@dereekb/dbx-web": "9.15.3",
|
|
15
|
+
"@dereekb/dbx-form": "9.15.3"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"tslib": "^2.3.0"
|