@dereekb/dbx-firebase 12.4.4 → 12.5.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/esm2022/lib/auth/login/login.button.component.mjs +1 -1
- package/esm2022/lib/auth/login/login.email.content.component.mjs +2 -2
- package/esm2022/lib/development/development.scheduler.list.component.mjs +1 -1
- package/esm2022/lib/firestore/firebase.firestore.providers.mjs +21 -2
- package/esm2022/lib/model/loader/collection.loader.instance.mjs +65 -5
- package/esm2022/lib/model/modules/store/index.mjs +2 -1
- package/esm2022/lib/model/modules/store/store.collection.crud.mjs +28 -0
- package/esm2022/lib/model/modules/store/store.collection.directive.mjs +20 -2
- package/esm2022/lib/model/modules/store/store.collection.mjs +14 -1
- package/esm2022/lib/modules/index.mjs +2 -1
- package/esm2022/lib/modules/storagefile/container/index.mjs +7 -0
- package/esm2022/lib/modules/storagefile/container/storagefile.upload.action.handler.directive.mjs +118 -0
- package/esm2022/lib/modules/storagefile/container/storagefile.upload.error.mjs +12 -0
- package/esm2022/lib/modules/storagefile/container/storagefile.upload.handler.mjs +254 -0
- package/esm2022/lib/modules/storagefile/container/storagefile.upload.initialize.document.directive.mjs +39 -0
- package/esm2022/lib/modules/storagefile/container/storagefile.upload.store.directive.mjs +38 -0
- package/esm2022/lib/modules/storagefile/container/storagefile.upload.sync.directive.mjs +36 -0
- package/esm2022/lib/modules/storagefile/index.mjs +4 -0
- package/esm2022/lib/modules/storagefile/storagefile.upload.module.mjs +83 -0
- package/esm2022/lib/modules/storagefile/store/index.mjs +6 -0
- package/esm2022/lib/modules/storagefile/store/storagefile.collection.store.directive.mjs +22 -0
- package/esm2022/lib/modules/storagefile/store/storagefile.collection.store.mjs +18 -0
- package/esm2022/lib/modules/storagefile/store/storagefile.document.store.directive.mjs +21 -0
- package/esm2022/lib/modules/storagefile/store/storagefile.document.store.mjs +22 -0
- package/esm2022/lib/modules/storagefile/store/storagefile.upload.store.mjs +63 -0
- package/esm2022/lib/storage/firebase.storage.module.mjs +2 -2
- package/fesm2022/dereekb-dbx-firebase.mjs +833 -30
- package/fesm2022/dereekb-dbx-firebase.mjs.map +1 -1
- package/lib/firestore/firebase.firestore.providers.d.ts +14 -1
- package/lib/model/loader/collection.loader.instance.d.ts +26 -1
- package/lib/model/modules/store/index.d.ts +1 -0
- package/lib/model/modules/store/store.collection.crud.d.ts +21 -0
- package/lib/model/modules/store/store.collection.d.ts +19 -2
- package/lib/model/modules/store/store.collection.directive.d.ts +12 -2
- package/lib/modules/index.d.ts +1 -0
- package/lib/modules/storagefile/container/index.d.ts +6 -0
- package/lib/modules/storagefile/container/storagefile.upload.action.handler.directive.d.ts +47 -0
- package/lib/modules/storagefile/container/storagefile.upload.error.d.ts +9 -0
- package/lib/modules/storagefile/container/storagefile.upload.handler.d.ts +183 -0
- package/lib/modules/storagefile/container/storagefile.upload.initialize.document.directive.d.ts +14 -0
- package/lib/modules/storagefile/container/storagefile.upload.store.directive.d.ts +20 -0
- package/lib/modules/storagefile/container/storagefile.upload.sync.directive.d.ts +18 -0
- package/lib/modules/storagefile/index.d.ts +3 -0
- package/lib/modules/storagefile/storagefile.upload.module.d.ts +29 -0
- package/lib/modules/storagefile/store/index.d.ts +5 -0
- package/lib/modules/storagefile/store/storagefile.collection.store.d.ts +10 -0
- package/lib/modules/storagefile/store/storagefile.collection.store.directive.d.ts +9 -0
- package/lib/modules/storagefile/store/storagefile.document.store.d.ts +15 -0
- package/lib/modules/storagefile/store/storagefile.document.store.directive.d.ts +9 -0
- package/lib/modules/storagefile/store/storagefile.upload.store.d.ts +166 -0
- package/lib/storage/firebase.storage.module.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EnvironmentProviders } from '@angular/core';
|
|
2
|
-
import { FirestoreContext, NotificationFirestoreCollections, SystemStateFirestoreCollections } from '@dereekb/firebase';
|
|
2
|
+
import { FirestoreContext, NotificationFirestoreCollections, StorageFileFirestoreCollections, SystemStateFirestoreCollections } from '@dereekb/firebase';
|
|
3
3
|
import { ClassLikeType } from '@dereekb/util';
|
|
4
4
|
/**
|
|
5
5
|
* Provider factory for the SystemStateFirestoreCollections.
|
|
@@ -15,6 +15,13 @@ export declare function provideSystemStateFirestoreCollections(appCollection: Sy
|
|
|
15
15
|
* @returns Provider factory for the NotificationFirestoreCollections.
|
|
16
16
|
*/
|
|
17
17
|
export declare function provideNotificationFirestoreCollections(appCollection: NotificationFirestoreCollections): NotificationFirestoreCollections;
|
|
18
|
+
/**
|
|
19
|
+
* Provider factory for the StorageFileFirestoreCollections.
|
|
20
|
+
*
|
|
21
|
+
* @param appCollection The app collection class to use.
|
|
22
|
+
* @returns Provider factory for the StorageFileFirestoreCollections.
|
|
23
|
+
*/
|
|
24
|
+
export declare function provideStorageFileFirestoreCollections(appCollection: StorageFileFirestoreCollections): StorageFileFirestoreCollections;
|
|
18
25
|
/**
|
|
19
26
|
* Configuration for provideDbxFirestoreCollection().
|
|
20
27
|
*/
|
|
@@ -39,6 +46,12 @@ export interface ProvideDbxFirebaseFirestoreCollectionConfig<T> {
|
|
|
39
46
|
* False by default.
|
|
40
47
|
*/
|
|
41
48
|
readonly provideNotificationFirestoreCollections?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Whether or not to provide the StorageFileFirestoreCollections.
|
|
51
|
+
*
|
|
52
|
+
* False by default.
|
|
53
|
+
*/
|
|
54
|
+
readonly provideStorageFileFirestoreCollections?: boolean;
|
|
42
55
|
}
|
|
43
56
|
/**
|
|
44
57
|
* Creates EnvironmentProviders for the DBX_FIRESTORE_CONTEXT_TOKEN, appCollectionClass, and optionally the SystemStateFirestoreCollections and NotificationFirestoreCollections.
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import { PageListLoadingState, ItemAccumulatorNextPageUntilResultsCountResult } from '@dereekb/rxjs';
|
|
2
2
|
import { BehaviorSubject, Subject, Observable } from 'rxjs';
|
|
3
|
-
import { DocumentDataWithIdAndKey, DocumentReference, FirebaseQueryItemAccumulator, FirebaseQueryItemAccumulatorNextPageUntilResultsCountFunction, FirebaseQuerySnapshotAccumulator, FirestoreCollectionLike, FirestoreDocument, FirestoreItemPageIterationInstance, FirestoreItemPageIteratorFilter, FirestoreQueryConstraint, IterationQueryDocChangeWatcher } from '@dereekb/firebase';
|
|
3
|
+
import { DocumentDataWithIdAndKey, DocumentReference, FirebaseQueryItemAccumulator, FirebaseQueryItemAccumulatorNextPageUntilResultsCountFunction, FirebaseQuerySnapshotAccumulator, FirestoreCollectionLike, FirestoreDocument, FirestoreItemPageIterationInstance, FirestoreItemPageIteratorFilter, FirestoreModelKey, FirestoreQueryConstraint, IterationQueryDocChangeWatcher } from '@dereekb/firebase';
|
|
4
4
|
import { ArrayOrValue, Destroyable, GetterOrValue, Initialized, Maybe, PageNumber } from '@dereekb/util';
|
|
5
5
|
import { DbxFirebaseCollectionLoaderAccessor, DbxFirebaseCollectionLoaderWithAccumulator } from './collection.loader';
|
|
6
|
+
/**
|
|
7
|
+
* The store mode.
|
|
8
|
+
*
|
|
9
|
+
* - query: The store will load documents from a query, using the given collection.
|
|
10
|
+
* - references: The store will load documents from the input references (keys, refs, etc.).
|
|
11
|
+
*/
|
|
12
|
+
export type DbxFirebaseCollectionMode = 'query' | 'references';
|
|
6
13
|
export interface DbxFirebaseCollectionLoaderInstanceInitConfig<T, D extends FirestoreDocument<T> = FirestoreDocument<T>> {
|
|
7
14
|
readonly collection?: Maybe<FirestoreCollectionLike<T, D>>;
|
|
15
|
+
readonly collectionMode?: DbxFirebaseCollectionMode;
|
|
16
|
+
readonly collectionKeys?: Maybe<FirestoreModelKey[]>;
|
|
17
|
+
readonly collectionRefs?: Maybe<DocumentReference<T>[]>;
|
|
8
18
|
readonly maxPages?: Maybe<number>;
|
|
9
19
|
readonly itemsPerPage?: Maybe<number>;
|
|
10
20
|
readonly constraints?: Maybe<ArrayOrValue<FirestoreQueryConstraint>>;
|
|
@@ -22,12 +32,18 @@ export type DbxFirebaseCollectionLoaderInstanceData<T, D extends FirestoreDocume
|
|
|
22
32
|
export declare class DbxFirebaseCollectionLoaderInstance<T = unknown, D extends FirestoreDocument<T> = FirestoreDocument<T>> implements DbxFirebaseCollectionLoaderWithAccumulator<T>, DbxFirebaseCollectionLoaderInstanceData<T, D>, Initialized, Destroyable {
|
|
23
33
|
private readonly _maxPagesSub;
|
|
24
34
|
protected readonly _collection: BehaviorSubject<Maybe<FirestoreCollectionLike<T, D, import("@dereekb/firebase").LimitedFirestoreDocumentAccessor<T, D>>>>;
|
|
35
|
+
protected readonly _collectionMode: BehaviorSubject<DbxFirebaseCollectionMode>;
|
|
36
|
+
protected readonly _collectionRefs: BehaviorSubject<Maybe<DocumentReference<T>[]>>;
|
|
25
37
|
protected readonly _maxPages: BehaviorSubject<Maybe<number>>;
|
|
26
38
|
protected readonly _itemsPerPage: BehaviorSubject<Maybe<number>>;
|
|
27
39
|
protected readonly _constraints: BehaviorSubject<Maybe<ArrayOrValue<FirestoreQueryConstraint<unknown>>>>;
|
|
28
40
|
protected readonly _waitForNonNullConstraints: BehaviorSubject<Maybe<boolean>>;
|
|
29
41
|
protected readonly _restart: Subject<void>;
|
|
30
42
|
readonly collection$: Observable<Maybe<FirestoreCollectionLike<T, D, import("@dereekb/firebase").LimitedFirestoreDocumentAccessor<T, D>>>>;
|
|
43
|
+
readonly collectionMode$: Observable<DbxFirebaseCollectionMode>;
|
|
44
|
+
readonly currentCollectionRefs$: Observable<Maybe<DocumentReference<T>[]>>;
|
|
45
|
+
readonly collectionRefs$: Observable<DocumentReference<T>[]>;
|
|
46
|
+
readonly collectionKeys$: Observable<string[]>;
|
|
31
47
|
readonly currentConstraints$: Observable<Maybe<ArrayOrValue<FirestoreQueryConstraint<unknown>>>>;
|
|
32
48
|
readonly constraints$: Observable<Maybe<ArrayOrValue<FirestoreQueryConstraint<unknown>>>>;
|
|
33
49
|
readonly iteratorFilter$: Observable<FirestoreItemPageIteratorFilter>;
|
|
@@ -60,6 +76,12 @@ export declare class DbxFirebaseCollectionLoaderInstance<T = unknown, D extends
|
|
|
60
76
|
constructor(initConfig?: DbxFirebaseCollectionLoaderInstanceInitConfig<T, D>);
|
|
61
77
|
init(): void;
|
|
62
78
|
destroy(): void;
|
|
79
|
+
get collectionMode(): DbxFirebaseCollectionMode;
|
|
80
|
+
set collectionMode(mode: DbxFirebaseCollectionMode);
|
|
81
|
+
get collectionKeys(): Maybe<FirestoreModelKey[]>;
|
|
82
|
+
set collectionKeys(keys: Maybe<FirestoreModelKey[]>);
|
|
83
|
+
get collectionRefs(): Maybe<DocumentReference<T>[]>;
|
|
84
|
+
set collectionRefs(refs: Maybe<DocumentReference<T>[]>);
|
|
63
85
|
get maxPages(): Maybe<number>;
|
|
64
86
|
set maxPages(maxPages: Maybe<number>);
|
|
65
87
|
get itemsPerPage(): Maybe<number>;
|
|
@@ -72,6 +94,9 @@ export declare class DbxFirebaseCollectionLoaderInstance<T = unknown, D extends
|
|
|
72
94
|
set collection(collection: Maybe<FirestoreCollectionLike<T, D>>);
|
|
73
95
|
next(): void;
|
|
74
96
|
restart(): void;
|
|
97
|
+
setCollectionMode(mode: DbxFirebaseCollectionMode): void;
|
|
98
|
+
setCollectionKeys(keys: Maybe<FirestoreModelKey[]>): void;
|
|
99
|
+
setCollectionRefs(refs: Maybe<DocumentReference<T>[]>): void;
|
|
75
100
|
setMaxPages(maxPages: Maybe<number>): void;
|
|
76
101
|
setItemsPerPage(itemsPerPage: Maybe<number>): void;
|
|
77
102
|
setConstraints(constraints: Maybe<ArrayOrValue<FirestoreQueryConstraint>>): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './model.store.module';
|
|
2
2
|
export * from './store.collection';
|
|
3
|
+
export * from './store.collection.crud';
|
|
3
4
|
export * from './store.collection.change.directive';
|
|
4
5
|
export * from './store.collection.change.if.directive';
|
|
5
6
|
export * from './store.collection.directive';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ModelFirebaseCreateFunction, ModelFirebaseCrudFunction, OnCallCreateModelResult } from '@dereekb/firebase';
|
|
2
|
+
import { LoadingState } from '@dereekb/rxjs';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { DbxFirebaseCollectionStore } from './store.collection';
|
|
5
|
+
export type DbxFirebaseCollectionStoreCreateFunction<I, O extends OnCallCreateModelResult = OnCallCreateModelResult> = (params: I) => Observable<LoadingState<O>>;
|
|
6
|
+
/**
|
|
7
|
+
* Creates a function for a store that DbxFirebaseDocumentStore captures the ModelFirebaseCreateFunction result and sets the key of the created value.
|
|
8
|
+
*
|
|
9
|
+
* @param store
|
|
10
|
+
* @param fn
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
export declare function firebaseCollectionStoreCreateFunction<I, O extends OnCallCreateModelResult = OnCallCreateModelResult>(store: DbxFirebaseCollectionStore<any, any>, fn: ModelFirebaseCreateFunction<I, O>): DbxFirebaseCollectionStoreCreateFunction<I, O>;
|
|
14
|
+
export type DbxFirebaseCollectionStoreCrudFunction<I, O = void> = (input: I) => Observable<LoadingState<O>>;
|
|
15
|
+
/**
|
|
16
|
+
* Creates a DbxfirebaseDocumentStoreCrudFunction from the input ModelFirebaseCrudFunction.
|
|
17
|
+
*
|
|
18
|
+
* @param fn
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
export declare function firebaseCollectionStoreCrudFunction<I, O = void>(fn: ModelFirebaseCrudFunction<I, O>): DbxFirebaseCollectionStoreCrudFunction<I, O>;
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
import { Observable, Subscription } from 'rxjs';
|
|
2
|
-
import { FirebaseQueryItemAccumulator, FirestoreCollectionLike, FirestoreDocument, FirestoreItemPageIterationInstance, FirestoreQueryConstraint, IterationQueryDocChangeWatcher, DocumentDataWithIdAndKey, DocumentReference, FirebaseQuerySnapshotAccumulator, FirebaseQueryItemAccumulatorNextPageUntilResultsCountFunction } from '@dereekb/firebase';
|
|
2
|
+
import { FirebaseQueryItemAccumulator, FirestoreCollectionLike, FirestoreDocument, FirestoreItemPageIterationInstance, FirestoreQueryConstraint, IterationQueryDocChangeWatcher, DocumentDataWithIdAndKey, DocumentReference, FirebaseQuerySnapshotAccumulator, FirebaseQueryItemAccumulatorNextPageUntilResultsCountFunction, FirestoreModelKey } from '@dereekb/firebase';
|
|
3
3
|
import { ObservableOrValue, PageListLoadingState, ItemAccumulatorNextPageUntilResultsCountResult } from '@dereekb/rxjs';
|
|
4
4
|
import { ArrayOrValue, Maybe, PageNumber } from '@dereekb/util';
|
|
5
5
|
import { LockSetComponentStore } from '@dereekb/dbx-core';
|
|
6
|
-
import { DbxFirebaseCollectionLoaderInstance, DbxFirebaseCollectionLoaderInstanceData, DbxFirebaseCollectionLoaderInstanceInitConfig } from '../../loader/collection.loader.instance';
|
|
6
|
+
import { DbxFirebaseCollectionLoaderInstance, DbxFirebaseCollectionLoaderInstanceData, DbxFirebaseCollectionLoaderInstanceInitConfig, DbxFirebaseCollectionMode } from '../../loader/collection.loader.instance';
|
|
7
7
|
import { DbxFirebaseCollectionLoaderAccessorWithAccumulator } from '../../loader/collection.loader';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
export interface DbxFirebaseCollectionStore<T, D extends FirestoreDocument<T> = FirestoreDocument<T>> extends DbxFirebaseCollectionLoaderAccessorWithAccumulator<T>, DbxFirebaseCollectionLoaderInstanceData<T, D> {
|
|
10
|
+
/**
|
|
11
|
+
* The current collection that documents are loaded from.
|
|
12
|
+
*/
|
|
10
13
|
readonly firestoreCollection$: Observable<Maybe<FirestoreCollectionLike<T, D>>>;
|
|
14
|
+
/**
|
|
15
|
+
* The current store mode.
|
|
16
|
+
*/
|
|
17
|
+
readonly collectionMode$: Observable<DbxFirebaseCollectionMode>;
|
|
18
|
+
/**
|
|
19
|
+
* The loader instance.
|
|
20
|
+
*/
|
|
11
21
|
readonly loader$: Observable<DbxFirebaseCollectionLoaderInstance<T, D>>;
|
|
12
22
|
/**
|
|
13
23
|
* Whether or not the iterator has more pages to load.
|
|
@@ -37,6 +47,9 @@ export interface DbxFirebaseCollectionStore<T, D extends FirestoreDocument<T> =
|
|
|
37
47
|
* Returns all documents data loaded by the accumulator.
|
|
38
48
|
*/
|
|
39
49
|
readonly allDocumentData$: Observable<DocumentDataWithIdAndKey<T>[]>;
|
|
50
|
+
setCollectionMode(observableOrValue: ObservableOrValue<DbxFirebaseCollectionMode>): Subscription;
|
|
51
|
+
setCollectionKeys(observableOrValue: ObservableOrValue<Maybe<FirestoreModelKey[]>>): Subscription;
|
|
52
|
+
setCollectionRefs(observableOrValue: ObservableOrValue<Maybe<DocumentReference<T>[]>>): Subscription;
|
|
40
53
|
setMaxPages(observableOrValue: ObservableOrValue<Maybe<number>>): Subscription;
|
|
41
54
|
setItemsPerPage(observableOrValue: ObservableOrValue<Maybe<number>>): Subscription;
|
|
42
55
|
setConstraints(observableOrValue: ObservableOrValue<Maybe<ArrayOrValue<FirestoreQueryConstraint>>>): Subscription;
|
|
@@ -49,6 +62,9 @@ export interface DbxFirebaseCollectionStoreContextState<T, D extends FirestoreDo
|
|
|
49
62
|
readonly firestoreCollection?: Maybe<FirestoreCollectionLike<T, D>>;
|
|
50
63
|
}
|
|
51
64
|
export declare class AbstractDbxFirebaseCollectionStore<T, D extends FirestoreDocument<T> = FirestoreDocument<T>, C extends DbxFirebaseCollectionStoreContextState<T, D> = DbxFirebaseCollectionStoreContextState<T, D>> extends LockSetComponentStore<C> implements DbxFirebaseCollectionStore<T, D> {
|
|
65
|
+
readonly setCollectionMode: (observableOrValue: DbxFirebaseCollectionMode | Observable<DbxFirebaseCollectionMode>) => Subscription;
|
|
66
|
+
readonly setCollectionKeys: (observableOrValue: Maybe<string[]> | Observable<Maybe<string[]>>) => Subscription;
|
|
67
|
+
readonly setCollectionRefs: (observableOrValue: Maybe<DocumentReference<T>[]> | Observable<Maybe<DocumentReference<T>[]>>) => Subscription;
|
|
52
68
|
readonly setMaxPages: (observableOrValue: Maybe<number> | Observable<Maybe<number>>) => Subscription;
|
|
53
69
|
readonly setItemsPerPage: (observableOrValue: Maybe<number> | Observable<Maybe<number>>) => Subscription;
|
|
54
70
|
readonly setConstraints: (observableOrValue: Maybe<ArrayOrValue<FirestoreQueryConstraint<unknown>>> | Observable<Maybe<ArrayOrValue<FirestoreQueryConstraint<unknown>>>>) => Subscription;
|
|
@@ -58,6 +74,7 @@ export declare class AbstractDbxFirebaseCollectionStore<T, D extends FirestoreDo
|
|
|
58
74
|
readonly currentFirestoreCollection$: Observable<Maybe<FirestoreCollectionLike<T, D>>>;
|
|
59
75
|
readonly firestoreCollection$: Observable<FirestoreCollectionLike<T, D>>;
|
|
60
76
|
readonly loader$: Observable<DbxFirebaseCollectionLoaderInstance<T, D>>;
|
|
77
|
+
readonly collectionMode$: Observable<DbxFirebaseCollectionMode>;
|
|
61
78
|
readonly constraints$: Observable<Maybe<ArrayOrValue<FirestoreQueryConstraint>>>;
|
|
62
79
|
readonly firestoreIteration$: Observable<FirestoreItemPageIterationInstance<T>>;
|
|
63
80
|
readonly queryChangeWatcher$: Observable<IterationQueryDocChangeWatcher<T>>;
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
import { OnDestroy, Provider, Type } from '@angular/core';
|
|
2
|
-
import { FirestoreDocument, FirestoreQueryConstraint } from '@dereekb/firebase';
|
|
2
|
+
import { DocumentReference, FirestoreDocument, FirestoreModelKey, FirestoreQueryConstraint } from '@dereekb/firebase';
|
|
3
3
|
import { Maybe, ArrayOrValue } from '@dereekb/util';
|
|
4
4
|
import { DbxFirebaseCollectionStore } from './store.collection';
|
|
5
|
+
import { DbxFirebaseCollectionMode } from '../../loader/collection.loader.instance';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
/**
|
|
7
8
|
* Abstract directive that contains a DbxFirebaseCollectionStore and provides an interface for communicating with other directives.
|
|
8
9
|
*/
|
|
9
10
|
export declare abstract class DbxFirebaseCollectionStoreDirective<T = unknown, D extends FirestoreDocument<T> = FirestoreDocument<T>, S extends DbxFirebaseCollectionStore<T, D> = DbxFirebaseCollectionStore<T, D>> implements OnDestroy {
|
|
11
|
+
readonly collectionMode: import("@angular/core").ModelSignal<DbxFirebaseCollectionMode>;
|
|
12
|
+
readonly collectionKeys: import("@angular/core").ModelSignal<Maybe<string[]>>;
|
|
13
|
+
readonly collectionRefs: import("@angular/core").ModelSignal<Maybe<DocumentReference<T>[]>>;
|
|
10
14
|
readonly maxPages: import("@angular/core").ModelSignal<Maybe<number>>;
|
|
11
15
|
readonly itemsPerPage: import("@angular/core").ModelSignal<Maybe<number>>;
|
|
12
16
|
readonly constraints: import("@angular/core").ModelSignal<Maybe<ArrayOrValue<FirestoreQueryConstraint<unknown>>>>;
|
|
13
17
|
readonly waitForNonNullConstraints: import("@angular/core").ModelSignal<Maybe<boolean>>;
|
|
18
|
+
private readonly _collectionMode;
|
|
19
|
+
private readonly _collectionKeys;
|
|
20
|
+
private readonly _collectionRefs;
|
|
14
21
|
private readonly _maxPages;
|
|
15
22
|
private readonly _itemsPerPage;
|
|
16
23
|
private readonly _constraints;
|
|
@@ -26,6 +33,9 @@ export declare abstract class DbxFirebaseCollectionStoreDirective<T = unknown, D
|
|
|
26
33
|
* Replaces the internal store.
|
|
27
34
|
*/
|
|
28
35
|
replaceStore(store: S): void;
|
|
36
|
+
setCollectionMode(collectionMode: DbxFirebaseCollectionMode): void;
|
|
37
|
+
setCollectionKeys(collectionKeys: Maybe<FirestoreModelKey[]>): void;
|
|
38
|
+
setCollectionRefs(collectionRefs: Maybe<DocumentReference<T>[]>): void;
|
|
29
39
|
setMaxPages(maxPages: Maybe<number>): void;
|
|
30
40
|
setItemsPerPage(itemsPerPage: Maybe<number>): void;
|
|
31
41
|
setConstraints(constraints: Maybe<ArrayOrValue<FirestoreQueryConstraint>>): void;
|
|
@@ -33,7 +43,7 @@ export declare abstract class DbxFirebaseCollectionStoreDirective<T = unknown, D
|
|
|
33
43
|
next(): void;
|
|
34
44
|
restart(): void;
|
|
35
45
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFirebaseCollectionStoreDirective<any, any, any>, never>;
|
|
36
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxFirebaseCollectionStoreDirective<any, any, any>, never, never, { "maxPages": { "alias": "maxPages"; "required": false; "isSignal": true; }; "itemsPerPage": { "alias": "itemsPerPage"; "required": false; "isSignal": true; }; "constraints": { "alias": "constraints"; "required": false; "isSignal": true; }; "waitForNonNullConstraints": { "alias": "waitForNonNullConstraints"; "required": false; "isSignal": true; }; }, { "maxPages": "maxPagesChange"; "itemsPerPage": "itemsPerPageChange"; "constraints": "constraintsChange"; "waitForNonNullConstraints": "waitForNonNullConstraintsChange"; }, never, never, false, never>;
|
|
46
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxFirebaseCollectionStoreDirective<any, any, any>, never, never, { "collectionMode": { "alias": "collectionMode"; "required": false; "isSignal": true; }; "collectionKeys": { "alias": "collectionKeys"; "required": false; "isSignal": true; }; "collectionRefs": { "alias": "collectionRefs"; "required": false; "isSignal": true; }; "maxPages": { "alias": "maxPages"; "required": false; "isSignal": true; }; "itemsPerPage": { "alias": "itemsPerPage"; "required": false; "isSignal": true; }; "constraints": { "alias": "constraints"; "required": false; "isSignal": true; }; "waitForNonNullConstraints": { "alias": "waitForNonNullConstraints"; "required": false; "isSignal": true; }; }, { "collectionMode": "collectionModeChange"; "collectionKeys": "collectionKeysChange"; "collectionRefs": "collectionRefsChange"; "maxPages": "maxPagesChange"; "itemsPerPage": "itemsPerPageChange"; "constraints": "constraintsChange"; "waitForNonNullConstraints": "waitForNonNullConstraintsChange"; }, never, never, false, never>;
|
|
37
47
|
}
|
|
38
48
|
/**
|
|
39
49
|
* Configures providers for a DbxFirebaseCollectionStoreDirective.
|
package/lib/modules/index.d.ts
CHANGED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './storagefile.upload.action.handler.directive';
|
|
2
|
+
export * from './storagefile.upload.error';
|
|
3
|
+
export * from './storagefile.upload.handler';
|
|
4
|
+
export * from './storagefile.upload.initialize.document.directive';
|
|
5
|
+
export * from './storagefile.upload.store.directive';
|
|
6
|
+
export * from './storagefile.upload.sync.directive';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { Maybe } from '@dereekb/util';
|
|
3
|
+
import { DbxFirebaseStorageFileUploadStore } from '../store/storagefile.upload.store';
|
|
4
|
+
import { StorageFileUploadFilesFinalResult, StorageFileUploadHandler } from './storagefile.upload.handler';
|
|
5
|
+
import { DbxActionContextStoreSourceInstance, DbxActionHandlerInstance } from '@dereekb/dbx-core';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Connects a DbxFirebaseStorageFileUploadStore to a DbxActionContext, and handles the upload action.
|
|
9
|
+
*/
|
|
10
|
+
export declare class DbxFirebaseStorageFileUploadActionHandlerDirective implements OnInit, OnDestroy {
|
|
11
|
+
private readonly _triggerSub;
|
|
12
|
+
private readonly _readySub;
|
|
13
|
+
private readonly _isWorkingSub;
|
|
14
|
+
private readonly _progressSub;
|
|
15
|
+
readonly source: DbxActionContextStoreSourceInstance<File[], StorageFileUploadFilesFinalResult>;
|
|
16
|
+
readonly uploadStore: DbxFirebaseStorageFileUploadStore;
|
|
17
|
+
readonly _dbxActionHandlerInstance: DbxActionHandlerInstance<File[], StorageFileUploadFilesFinalResult>;
|
|
18
|
+
/**
|
|
19
|
+
* If true, the action will be triggered when files are set.
|
|
20
|
+
*
|
|
21
|
+
* Defaults to false.
|
|
22
|
+
*/
|
|
23
|
+
readonly triggerOnFiles: import("@angular/core").InputSignal<boolean>;
|
|
24
|
+
readonly triggerOnFiles$: import("rxjs").Observable<boolean>;
|
|
25
|
+
/**
|
|
26
|
+
* Uploading of all/any files should be cancelled if any file fails to upload.
|
|
27
|
+
*
|
|
28
|
+
* Any file that was successfully uploaded will not be reverted.
|
|
29
|
+
*
|
|
30
|
+
* Defaults to false.
|
|
31
|
+
*/
|
|
32
|
+
readonly cancelUploadsOnUploadError: import("@angular/core").InputSignal<boolean>;
|
|
33
|
+
/**
|
|
34
|
+
* The upload should fail if any file fails to upload, rather than if all files fail to upload.
|
|
35
|
+
*
|
|
36
|
+
* Defaults to false.
|
|
37
|
+
*/
|
|
38
|
+
readonly actionFailureOnUploadError: import("@angular/core").InputSignal<boolean>;
|
|
39
|
+
readonly uploadHandler: import("@angular/core").InputSignal<Maybe<StorageFileUploadHandler>>;
|
|
40
|
+
protected readonly _uploadHandlerEffect: import("@angular/core").EffectRef;
|
|
41
|
+
readonly files$: import("rxjs").Observable<File[]>;
|
|
42
|
+
readonly uploadHandler$: import("rxjs").Observable<Maybe<StorageFileUploadHandler>>;
|
|
43
|
+
ngOnInit(): void;
|
|
44
|
+
ngOnDestroy(): void;
|
|
45
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFirebaseStorageFileUploadActionHandlerDirective, never>;
|
|
46
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxFirebaseStorageFileUploadActionHandlerDirective, "[dbxFirebaseStorageFileUploadActionHandler]", never, { "triggerOnFiles": { "alias": "triggerOnFiles"; "required": false; "isSignal": true; }; "cancelUploadsOnUploadError": { "alias": "cancelUploadsOnUploadError"; "required": false; "isSignal": true; }; "actionFailureOnUploadError": { "alias": "actionFailureOnUploadError"; "required": false; "isSignal": true; }; "uploadHandler": { "alias": "dbxFirebaseStorageFileUploadActionHandler"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
47
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseError } from 'make-error';
|
|
2
|
+
import { StorageFileUploadFilesFinalResult } from './storagefile.upload.handler';
|
|
3
|
+
/**
|
|
4
|
+
* Error that is thrown when a single file fails to upload.
|
|
5
|
+
*/
|
|
6
|
+
export declare class StorageFileUploadFilesError extends BaseError {
|
|
7
|
+
readonly result: StorageFileUploadFilesFinalResult;
|
|
8
|
+
constructor(result: StorageFileUploadFilesFinalResult);
|
|
9
|
+
}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { DbxFirebaseStorageFileUploadStoreFileProgress } from '../store';
|
|
3
|
+
import { DbxFirebaseStorageService } from '../../../storage/firebase.storage.service';
|
|
4
|
+
import { Maybe, PercentNumber, PromiseOrValue } from '@dereekb/util';
|
|
5
|
+
import { FirebaseStorageAccessorFile, StorageCustomMetadata, StoragePathInput, StorageUploadOptions, StorageUploadTask } from '@dereekb/firebase';
|
|
6
|
+
/**
|
|
7
|
+
* Creates a new observable for uploading a file.
|
|
8
|
+
*/
|
|
9
|
+
export type StorageFileUploadHandlerFunction = (file: File) => Promise<StorageFileUploadHandlerInstance>;
|
|
10
|
+
export interface StorageFileUploadHandlerInstance extends Pick<StorageUploadTask<FirebaseStorageAccessorFile>, 'taskRef' | 'pause' | 'resume' | 'cancel'> {
|
|
11
|
+
/**
|
|
12
|
+
* The upload observable.
|
|
13
|
+
*
|
|
14
|
+
* Must be subscribed to in order for the upload to begin.
|
|
15
|
+
*/
|
|
16
|
+
readonly upload: Observable<DbxFirebaseStorageFileUploadStoreFileProgress>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Handles uploading files.
|
|
20
|
+
*/
|
|
21
|
+
export interface StorageFileUploadHandler {
|
|
22
|
+
/**
|
|
23
|
+
* Uploads a file, and returns the file progress as it is uploading.
|
|
24
|
+
*/
|
|
25
|
+
readonly uploadFile: StorageFileUploadHandlerFunction;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Configuration for a single file upload.
|
|
29
|
+
*/
|
|
30
|
+
export interface StorageFileUploadConfig {
|
|
31
|
+
/**
|
|
32
|
+
* Path for where to upload the file to
|
|
33
|
+
*/
|
|
34
|
+
readonly storagePath: StoragePathInput;
|
|
35
|
+
/**
|
|
36
|
+
* Upload options for the file.
|
|
37
|
+
*
|
|
38
|
+
* Resumable is not supported.
|
|
39
|
+
*/
|
|
40
|
+
readonly uploadOptions?: StorageFileUploadConfigOptions;
|
|
41
|
+
/**
|
|
42
|
+
* Custom metadata for the file.
|
|
43
|
+
*
|
|
44
|
+
* Is merged with uploadOptions's metadata.
|
|
45
|
+
*/
|
|
46
|
+
readonly customMetadata?: StorageCustomMetadata;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* StorageFileUploadConfig upload options.
|
|
50
|
+
*/
|
|
51
|
+
export type StorageFileUploadConfigOptions = Omit<StorageUploadOptions, 'resumable'>;
|
|
52
|
+
/**
|
|
53
|
+
* Function used to generate file names for the uploaded files.
|
|
54
|
+
*
|
|
55
|
+
* If not set, the file name will be used as is.
|
|
56
|
+
*/
|
|
57
|
+
export type StorageFileUploadConfigFactory = (file: File) => PromiseOrValue<StorageFileUploadConfig>;
|
|
58
|
+
/**
|
|
59
|
+
* Configuration for StorageFileUploadHandler().
|
|
60
|
+
*/
|
|
61
|
+
export interface StorageFileUploadHandlerConfig {
|
|
62
|
+
readonly storageService: DbxFirebaseStorageService;
|
|
63
|
+
readonly storageFileUploadConfigFactory: StorageFileUploadConfigFactory;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Default implementation of StorageFileUploadHandler.
|
|
67
|
+
*/
|
|
68
|
+
export declare function storageFileUploadHandler(config: StorageFileUploadHandlerConfig): StorageFileUploadHandler;
|
|
69
|
+
export interface StorageFileUploadFilesInput {
|
|
70
|
+
readonly uploadHandler: StorageFileUploadHandler;
|
|
71
|
+
/**
|
|
72
|
+
* Files to upload
|
|
73
|
+
*/
|
|
74
|
+
readonly files: File[];
|
|
75
|
+
/**
|
|
76
|
+
* The number of max parallel uploads to perform at a time.
|
|
77
|
+
*
|
|
78
|
+
* Defaults to 3
|
|
79
|
+
*/
|
|
80
|
+
readonly maxParallelUploads?: number;
|
|
81
|
+
}
|
|
82
|
+
export interface StorageFileUploadFilesInstance {
|
|
83
|
+
/**
|
|
84
|
+
* Cancels the upload of the remaining files.
|
|
85
|
+
*/
|
|
86
|
+
cancel(): void;
|
|
87
|
+
/**
|
|
88
|
+
* The upload observable.
|
|
89
|
+
*
|
|
90
|
+
* Must be subscribed to in order for the upload to begin.
|
|
91
|
+
*/
|
|
92
|
+
readonly upload: Observable<StorageFileUploadFilesEvent>;
|
|
93
|
+
}
|
|
94
|
+
export interface StorageFileUploadFilesEvent {
|
|
95
|
+
/**
|
|
96
|
+
* All files being uploaded
|
|
97
|
+
*/
|
|
98
|
+
readonly allFiles: File[];
|
|
99
|
+
/**
|
|
100
|
+
* Returns true if all files have been uploaded.
|
|
101
|
+
*
|
|
102
|
+
* The result value should be available.
|
|
103
|
+
*/
|
|
104
|
+
readonly isComplete: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Returns true if the upload was canceled.
|
|
107
|
+
*/
|
|
108
|
+
readonly isCanceled?: Maybe<boolean>;
|
|
109
|
+
/**
|
|
110
|
+
* The overall progress of all files being uploaded.
|
|
111
|
+
*/
|
|
112
|
+
readonly overallProgress: PercentNumber;
|
|
113
|
+
/**
|
|
114
|
+
* The upload progress that triggered this event.
|
|
115
|
+
*/
|
|
116
|
+
readonly uploadProgress?: Maybe<DbxFirebaseStorageFileUploadStoreFileProgress>;
|
|
117
|
+
/**
|
|
118
|
+
* The final result.
|
|
119
|
+
*
|
|
120
|
+
* Set when the final file has been uploaded or failed.
|
|
121
|
+
*/
|
|
122
|
+
readonly result?: StorageFileUploadFilesFinalResult;
|
|
123
|
+
/**
|
|
124
|
+
* The number of files that are still uploading or queued for upload.
|
|
125
|
+
*/
|
|
126
|
+
readonly incompleteFileCount: number;
|
|
127
|
+
/**
|
|
128
|
+
* The number of files that are active.
|
|
129
|
+
*/
|
|
130
|
+
readonly activeFileCount: number;
|
|
131
|
+
/**
|
|
132
|
+
* The number of files that are done.
|
|
133
|
+
*/
|
|
134
|
+
readonly doneFileCount: number;
|
|
135
|
+
}
|
|
136
|
+
export interface StorageFileUploadFilesFinalResult {
|
|
137
|
+
readonly startTime: Date;
|
|
138
|
+
readonly endTime: Date;
|
|
139
|
+
readonly fileResults: StorageFileUploadFilesFinalFileResult[];
|
|
140
|
+
readonly successFileResults: StorageFileUploadFilesFinalFileResult[];
|
|
141
|
+
readonly errorFileResults: StorageFileUploadFilesFinalFileResult[];
|
|
142
|
+
}
|
|
143
|
+
export interface StorageFileUploadFilesFinalFileResult {
|
|
144
|
+
/**
|
|
145
|
+
* The start time of the file upload.
|
|
146
|
+
*/
|
|
147
|
+
readonly startTime: Date;
|
|
148
|
+
/**
|
|
149
|
+
* The end time of the file upload, or when it failed or was canceled.
|
|
150
|
+
*/
|
|
151
|
+
readonly endTime: Date;
|
|
152
|
+
/**
|
|
153
|
+
* The file that was uploaded.
|
|
154
|
+
*/
|
|
155
|
+
readonly file: File;
|
|
156
|
+
/**
|
|
157
|
+
* The accessor file for the file, if available.
|
|
158
|
+
*
|
|
159
|
+
* Is generally available if success is true.
|
|
160
|
+
*/
|
|
161
|
+
readonly fileRef?: Maybe<FirebaseStorageAccessorFile>;
|
|
162
|
+
/**
|
|
163
|
+
* True if the file was uploaded successfully.
|
|
164
|
+
*/
|
|
165
|
+
readonly success: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* Error if the file failed to upload.
|
|
168
|
+
*/
|
|
169
|
+
readonly error?: Maybe<unknown>;
|
|
170
|
+
/**
|
|
171
|
+
* True if the file upload was cancelled.
|
|
172
|
+
*/
|
|
173
|
+
readonly canceled?: Maybe<boolean>;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Uploads files using the provided upload handler and files.
|
|
177
|
+
*
|
|
178
|
+
* An observable is returned that emits the latest file events from any file that is being uploaded.
|
|
179
|
+
*
|
|
180
|
+
* @param input
|
|
181
|
+
* @returns
|
|
182
|
+
*/
|
|
183
|
+
export declare function storageFileUploadFiles(input: StorageFileUploadFilesInput): StorageFileUploadFilesInstance;
|
package/lib/modules/storagefile/container/storagefile.upload.initialize.document.directive.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { DbxFirebaseStorageFileUploadStore, StorageFileDocumentStore } from '../store';
|
|
3
|
+
import { AbstractSubscriptionDirective } from '@dereekb/dbx-core';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Directive that passes the upload result to a StorageFileDocumentStore to initialize the document immediately.
|
|
7
|
+
*/
|
|
8
|
+
export declare class DbxFirebaseStorageFileUploadInitializeDocumentDirective extends AbstractSubscriptionDirective implements OnDestroy {
|
|
9
|
+
readonly uploadStore: DbxFirebaseStorageFileUploadStore;
|
|
10
|
+
readonly storageFileDocumentStore: StorageFileDocumentStore;
|
|
11
|
+
constructor();
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFirebaseStorageFileUploadInitializeDocumentDirective, never>;
|
|
13
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxFirebaseStorageFileUploadInitializeDocumentDirective, "[dbxFirebaseStorageFileUploadInitializeDocument]", ["dbxFirebaseStorageFileUploadInitializeDocument"], {}, {}, never, never, true, never>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { DbxFirebaseStorageFileUploadStore } from '../store';
|
|
3
|
+
import { ArrayOrValue, Maybe } from '@dereekb/util';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Directive that provides a DbxFirebaseStorageFileUploadStore, and sync's the inputs to the store.
|
|
7
|
+
*/
|
|
8
|
+
export declare class DbxFirebaseStorageFileUploadStoreDirective implements OnDestroy {
|
|
9
|
+
private readonly _allowedSub;
|
|
10
|
+
private readonly _multiSub;
|
|
11
|
+
readonly uploadStore: DbxFirebaseStorageFileUploadStore;
|
|
12
|
+
readonly multipleUpload: import("@angular/core").InputSignal<Maybe<boolean>>;
|
|
13
|
+
readonly fileTypesAccepted: import("@angular/core").InputSignal<Maybe<ArrayOrValue<string>>>;
|
|
14
|
+
readonly fileTypesAccepted$: import("rxjs").Observable<Maybe<ArrayOrValue<string>>>;
|
|
15
|
+
readonly isMultiUploadAllowed$: import("rxjs").Observable<Maybe<boolean>>;
|
|
16
|
+
constructor();
|
|
17
|
+
ngOnDestroy(): void;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFirebaseStorageFileUploadStoreDirective, never>;
|
|
19
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxFirebaseStorageFileUploadStoreDirective, "[dbxFirebaseStorageFileUploadStore]", ["dbxFirebaseStorageFileUploadStore"], { "multipleUpload": { "alias": "multipleUpload"; "required": false; "isSignal": true; }; "fileTypesAccepted": { "alias": "fileTypesAccepted"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { DbxFirebaseStorageFileUploadStore } from '../store';
|
|
3
|
+
import { DbxFileUploadComponent } from '@dereekb/dbx-web';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Directive that syncs a DbxFirebaseStorageFileUploadStore's configuration to a DbxFileUploadComponent.
|
|
7
|
+
*/
|
|
8
|
+
export declare class DbxFirebaseStorageFileUploadSyncDirective implements OnDestroy {
|
|
9
|
+
private readonly _allowedSub;
|
|
10
|
+
private readonly _multiSub;
|
|
11
|
+
private readonly _filesSub;
|
|
12
|
+
readonly uploadStore: DbxFirebaseStorageFileUploadStore;
|
|
13
|
+
readonly uploadComponent: DbxFileUploadComponent;
|
|
14
|
+
constructor();
|
|
15
|
+
ngOnDestroy(): void;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFirebaseStorageFileUploadSyncDirective, never>;
|
|
17
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxFirebaseStorageFileUploadSyncDirective, "[dbxFirebaseStorageFileUploadSync]", ["dbxFirebaseStorageFileUploadSync"], {}, {}, never, never, true, never>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { DbxActionLoadingContextDirective, DbxActionModule, DbxActionSnackbarErrorDirective, DbxFileUploadComponent, DbxFileUploadActionSyncDirective, DbxLoadingComponent } from '@dereekb/dbx-web';
|
|
2
|
+
import { DbxFirebaseStorageFileUploadActionHandlerDirective, DbxFirebaseStorageFileUploadStoreDirective, DbxFirebaseStorageFileUploadSyncDirective, DbxFirebaseStorageFileUploadInitializeDocumentDirective } from './container';
|
|
3
|
+
import { DbxFirebaseStorageFileDocumentStoreDirective } from './store/storagefile.document.store.directive';
|
|
4
|
+
import { DbxFirebaseStorageFileCollectionStoreDirective } from './store';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "@dereekb/dbx-web";
|
|
7
|
+
import * as i2 from "./container/storagefile.upload.action.handler.directive";
|
|
8
|
+
import * as i3 from "./container/storagefile.upload.store.directive";
|
|
9
|
+
import * as i4 from "./container/storagefile.upload.sync.directive";
|
|
10
|
+
import * as i5 from "./container/storagefile.upload.initialize.document.directive";
|
|
11
|
+
import * as i6 from "./store/storagefile.collection.store.directive";
|
|
12
|
+
import * as i7 from "./store/storagefile.document.store.directive";
|
|
13
|
+
export declare const importsAndExports: (typeof DbxActionModule | typeof DbxFirebaseStorageFileCollectionStoreDirective | typeof DbxFirebaseStorageFileDocumentStoreDirective | typeof DbxFirebaseStorageFileUploadActionHandlerDirective | typeof DbxFirebaseStorageFileUploadInitializeDocumentDirective | typeof DbxFirebaseStorageFileUploadStoreDirective | typeof DbxFirebaseStorageFileUploadSyncDirective | typeof DbxFileUploadComponent | typeof DbxLoadingComponent | typeof DbxActionLoadingContextDirective | typeof DbxActionSnackbarErrorDirective | typeof DbxFileUploadActionSyncDirective)[];
|
|
14
|
+
/**
|
|
15
|
+
* Convenience module for importing various modules/components that are relevant to the storage file upload feature.
|
|
16
|
+
*
|
|
17
|
+
* - DbxActionModule
|
|
18
|
+
* - DbxFileUploadComponent
|
|
19
|
+
* - DbxFirebaseStorageFileUploadActionHandlerDirective
|
|
20
|
+
* - DbxFirebaseStorageFileUploadStoreDirective
|
|
21
|
+
* - DbxFirebaseStorageFileUploadSyncDirective
|
|
22
|
+
* - DbxFirebaseStorageFileUploadInitializeDocumentDirective
|
|
23
|
+
* - DbxFirebaseStorageFileUploadStore
|
|
24
|
+
*/
|
|
25
|
+
export declare class DbxFirebaseStorageFileUploadModule {
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFirebaseStorageFileUploadModule, never>;
|
|
27
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFirebaseStorageFileUploadModule, never, [typeof i1.DbxActionModule, typeof i1.DbxLoadingComponent, typeof i1.DbxActionLoadingContextDirective, typeof i1.DbxActionSnackbarErrorDirective, typeof i1.DbxFileUploadComponent, typeof i1.DbxFileUploadActionSyncDirective, typeof i2.DbxFirebaseStorageFileUploadActionHandlerDirective, typeof i3.DbxFirebaseStorageFileUploadStoreDirective, typeof i4.DbxFirebaseStorageFileUploadSyncDirective, typeof i5.DbxFirebaseStorageFileUploadInitializeDocumentDirective, typeof i6.DbxFirebaseStorageFileCollectionStoreDirective, typeof i7.DbxFirebaseStorageFileDocumentStoreDirective], [typeof i1.DbxActionModule, typeof i1.DbxLoadingComponent, typeof i1.DbxActionLoadingContextDirective, typeof i1.DbxActionSnackbarErrorDirective, typeof i1.DbxFileUploadComponent, typeof i1.DbxFileUploadActionSyncDirective, typeof i2.DbxFirebaseStorageFileUploadActionHandlerDirective, typeof i3.DbxFirebaseStorageFileUploadStoreDirective, typeof i4.DbxFirebaseStorageFileUploadSyncDirective, typeof i5.DbxFirebaseStorageFileUploadInitializeDocumentDirective, typeof i6.DbxFirebaseStorageFileCollectionStoreDirective, typeof i7.DbxFirebaseStorageFileDocumentStoreDirective]>;
|
|
28
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DbxFirebaseStorageFileUploadModule>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AbstractDbxFirebaseCollectionStore } from '../../../model/modules/store';
|
|
2
|
+
import { StorageFileFirestoreCollections, StorageFile, StorageFileDocument, StorageFileFunctions } from '@dereekb/firebase';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class StorageFileCollectionStore extends AbstractDbxFirebaseCollectionStore<StorageFile, StorageFileDocument> {
|
|
5
|
+
readonly storageFileFunctions: StorageFileFunctions;
|
|
6
|
+
constructor(collections: StorageFileFirestoreCollections);
|
|
7
|
+
readonly initializeAllStorageFilesFromUpload: import("../../../model/modules/store").DbxFirebaseCollectionStoreCreateFunction<import("@dereekb/firebase").InitializeAllStorageFilesFromUploadsParams, import("@dereekb/firebase").InitializeAllStorageFilesFromUploadsResult>;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StorageFileCollectionStore, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<StorageFileCollectionStore>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DbxFirebaseCollectionStoreDirective } from '../../../model/modules/store';
|
|
2
|
+
import { StorageFileCollectionStore } from './storagefile.collection.store';
|
|
3
|
+
import { StorageFile, StorageFileDocument } from '@dereekb/firebase';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class DbxFirebaseStorageFileCollectionStoreDirective extends DbxFirebaseCollectionStoreDirective<StorageFile, StorageFileDocument, StorageFileCollectionStore> {
|
|
6
|
+
constructor(store: StorageFileCollectionStore);
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFirebaseStorageFileCollectionStoreDirective, never>;
|
|
8
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxFirebaseStorageFileCollectionStoreDirective, "[dbxFirebaseStorageFileCollection]", never, {}, {}, never, never, true, never>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AbstractDbxFirebaseDocumentStore } from '../../../model/modules/store';
|
|
2
|
+
import { StorageFile, StorageFileDocument, StorageFileFunctions } from '@dereekb/firebase';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class StorageFileDocumentStore extends AbstractDbxFirebaseDocumentStore<StorageFile, StorageFileDocument> {
|
|
5
|
+
readonly storageFileFunctions: StorageFileFunctions;
|
|
6
|
+
constructor();
|
|
7
|
+
readonly createStorageFileFromUpload: import("../../../model/modules/store").DbxFirebaseDocumentStoreCreateFunction<import("@dereekb/firebase").CreateStorageFileParams, import("@dereekb/firebase").OnCallCreateModelResult>;
|
|
8
|
+
readonly initializeStorageFileFromUpload: import("../../../model/modules/store").DbxFirebaseDocumentStoreCreateFunction<import("@dereekb/firebase").InitializeStorageFileFromUploadParams, import("@dereekb/firebase").OnCallCreateModelResult>;
|
|
9
|
+
readonly initializeAllStorageFilesFromUpload: import("../../../model/modules/store").DbxFirebaseDocumentStoreCrudFunction<import("@dereekb/firebase").InitializeAllStorageFilesFromUploadsParams, import("@dereekb/firebase").InitializeAllStorageFilesFromUploadsResult>;
|
|
10
|
+
readonly updateStorageFile: import("../../../model/modules/store").DbxFirebaseDocumentStoreFunction<import("@dereekb/firebase").UpdateStorageFileParams, void>;
|
|
11
|
+
readonly processStorageFile: import("../../../model/modules/store").DbxFirebaseDocumentStoreFunction<import("@dereekb/firebase").ProcessStorageFileParams, import("@dereekb/firebase").ProcessStorageFileResult>;
|
|
12
|
+
readonly deleteStorageFile: import("../../../model/modules/store").DbxFirebaseDocumentStoreFunction<import("@dereekb/firebase").DeleteStorageFileParams, void>;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StorageFileDocumentStore, never>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<StorageFileDocumentStore>;
|
|
15
|
+
}
|