@dereekb/firebase 7.2.0 → 7.3.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/CHANGELOG.md +9 -0
- package/package.json +6 -6
- package/src/lib/common/firestore/collection/collection.key.d.ts +53 -0
- package/src/lib/common/firestore/collection/collection.key.js +3 -0
- package/src/lib/common/firestore/collection/collection.key.js.map +1 -0
- package/src/lib/common/firestore/collection/index.d.ts +1 -0
- package/src/lib/common/firestore/collection/index.js +1 -0
- package/src/lib/common/firestore/collection/index.js.map +1 -1
- package/src/lib/common/firestore/query/constraint.d.ts +1 -2
- package/src/lib/common/firestore/snapshot/snapshot.field.d.ts +71 -1
- package/src/lib/common/firestore/snapshot/snapshot.field.js +81 -1
- package/src/lib/common/firestore/snapshot/snapshot.field.js.map +1 -1
- package/src/lib/common/firestore/snapshot/snapshot.js.map +1 -1
- package/test/CHANGELOG.md +4 -0
- package/test/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
# [7.3.0](https://github.com/dereekb/dbx-components/compare/v7.2.0-dev...v7.3.0) (2022-06-08)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* added FirestoreMap, FirestoreArrayMap snapshot fields ([bd23fd3](https://github.com/dereekb/dbx-components/commit/bd23fd372e3f2180980d7aec9c1b6ee1ec2bb3c7))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
5
14
|
# [7.2.0](https://github.com/dereekb/dbx-components/compare/v7.1.0-dev...v7.2.0) (2022-06-06)
|
|
6
15
|
|
|
7
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/firebase",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0",
|
|
4
4
|
"devDependencies": {
|
|
5
5
|
"@firebase/rules-unit-testing": "^2.0.0"
|
|
6
6
|
},
|
|
@@ -22,19 +22,19 @@
|
|
|
22
22
|
"rxjs": "^7.0.0",
|
|
23
23
|
"rxfire": "^6.0.3",
|
|
24
24
|
"firebase": "^9.8.0",
|
|
25
|
-
"@dereekb/util": "7.
|
|
25
|
+
"@dereekb/util": "7.3.0",
|
|
26
26
|
"make-error": "^1.3.0",
|
|
27
27
|
"ts-essentials": "^9.1.2",
|
|
28
28
|
"extra-set": "^2.2.11",
|
|
29
|
-
"@dereekb/rxjs": "7.
|
|
29
|
+
"@dereekb/rxjs": "7.3.0",
|
|
30
30
|
"ms": "^3.0.0-canary.1",
|
|
31
|
-
"@dereekb/
|
|
31
|
+
"@dereekb/model": "7.3.0",
|
|
32
32
|
"class-transformer": "^0.5.1",
|
|
33
|
-
"date-fns": "^2.28.0",
|
|
34
33
|
"class-validator": "^0.13.2",
|
|
34
|
+
"@dereekb/date": "7.3.0",
|
|
35
|
+
"date-fns": "^2.28.0",
|
|
35
36
|
"date-fns-tz": "^1.3.0",
|
|
36
37
|
"rrule": "git+https://git@github.com/dereekb/rrule.git#17adf5708d6567b4d01a3a8afd106261421ea492",
|
|
37
|
-
"@dereekb/model": "7.2.0",
|
|
38
38
|
"tslib": "^2.0.0"
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { GrantedRole } from '@dereekb/model';
|
|
2
|
+
import { FirebaseAuthUserId } from '../../auth';
|
|
3
|
+
import { FirestoreModelId, FirestoreModelKey } from './collection';
|
|
4
|
+
export declare type FirestoreModelKeyMap<T> = {
|
|
5
|
+
[key: FirestoreModelKey]: T;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Array of FirestoreModelKey values.
|
|
9
|
+
*/
|
|
10
|
+
export declare type FirestoreModelKeyArray = FirestoreModelKey[];
|
|
11
|
+
/**
|
|
12
|
+
* A map with a single GrantedRole provided for a given model.
|
|
13
|
+
*/
|
|
14
|
+
export declare type FirestoreModelKeyGrantedRoleMap<R extends GrantedRole> = {
|
|
15
|
+
[key: FirestoreModelKey]: R;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* A map with multiple GrantedRoles provided for a given model.
|
|
19
|
+
*/
|
|
20
|
+
export declare type FirestoreModelKeyGrantedRoleArrayMap<R extends GrantedRole> = {
|
|
21
|
+
[key: FirestoreModelKey]: R[];
|
|
22
|
+
};
|
|
23
|
+
export declare type FirestoreModelIdMap<T> = {
|
|
24
|
+
[key: FirestoreModelId]: T;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Array of FirestoreModelId values.
|
|
28
|
+
*/
|
|
29
|
+
export declare type FirestoreModelIdArray = FirestoreModelId[];
|
|
30
|
+
/**
|
|
31
|
+
* A map with a single GrantedRole provided for a given model.
|
|
32
|
+
*/
|
|
33
|
+
export declare type FirestoreModelIdGrantedRoleMap<R extends GrantedRole> = {
|
|
34
|
+
[key: FirestoreModelId]: R;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* A map with multiple GrantedRoles provided for a given model.
|
|
38
|
+
*/
|
|
39
|
+
export declare type FirestoreModelIdGrantedRoleArrayMap<R extends GrantedRole> = {
|
|
40
|
+
[key: FirestoreModelId]: R[];
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* A map with a single GrantedRole provided for a given user.
|
|
44
|
+
*/
|
|
45
|
+
export declare type FirebaseAuthUserGrantedRoleMap<R extends GrantedRole> = {
|
|
46
|
+
[key: FirebaseAuthUserId]: R;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* A map with multiple GrantedRoles provided for a given user.
|
|
50
|
+
*/
|
|
51
|
+
export declare type FirebaseAuthUserRoleArrayMap<R extends GrantedRole> = {
|
|
52
|
+
[key: FirestoreModelKey]: R[];
|
|
53
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection.key.js","sourceRoot":"","sources":["../../../../../../../../packages/firebase/src/lib/common/firestore/collection/collection.key.ts"],"names":[],"mappings":""}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./collection"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./collection.key"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./collection.group"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./subcollection"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./subcollection.single"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/firebase/src/lib/common/firestore/collection/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B;AAC7B,6DAAmC;AACnC,0DAAgC;AAChC,iEAAuC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/firebase/src/lib/common/firestore/collection/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B;AAC7B,2DAAiC;AACjC,6DAAmC;AACnC,0DAAgC;AAChC,iEAAuC"}
|
|
@@ -47,8 +47,7 @@ export interface WhereQueryConstraintData {
|
|
|
47
47
|
export declare function where<T>(fieldPath: keyof T, opStr: WhereFilterOp, value: unknown): FirestoreQueryConstraint<WhereQueryConstraintData>;
|
|
48
48
|
export declare function where(fieldPath: string | FieldPath, opStr: WhereFilterOp, value: unknown): FirestoreQueryConstraint<WhereQueryConstraintData>;
|
|
49
49
|
export declare const FIRESTORE_WHERE_DOCUMENT_ID_QUERY_CONSTRAINT_TYPE = "where_doc_id";
|
|
50
|
-
export
|
|
51
|
-
}
|
|
50
|
+
export declare type WhereDocumentIdQueryConstraintData = Omit<WhereQueryConstraintData, 'fieldPath'>;
|
|
52
51
|
export declare function whereDocumentId(opStr: WhereFilterOp, value: unknown): FirestoreQueryConstraint<WhereDocumentIdQueryConstraintData>;
|
|
53
52
|
export declare const FIRESTORE_ORDER_BY_QUERY_CONSTRAINT_TYPE = "order_by";
|
|
54
53
|
export declare type OrderByDirection = SortingOrder;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ModelFieldMapFunctionsConfig, GetterOrValue, Maybe, ModelFieldMapConvertFunction, PrimativeKey, ReadKeyFunction, ModelFieldMapFunctionsWithDefaultsConfig, FindUniqueFunction, FindUniqueStringsTransformConfig, MapFunction } from '@dereekb/util';
|
|
1
|
+
import { ModelFieldMapFunctionsConfig, GetterOrValue, Maybe, ModelFieldMapConvertFunction, PrimativeKey, ReadKeyFunction, ModelFieldMapFunctionsWithDefaultsConfig, FindUniqueFunction, FindUniqueStringsTransformConfig, MapFunction, FilterKeyValueTuplesInput } from '@dereekb/util';
|
|
2
2
|
export interface BaseFirestoreFieldConfig<V, D = unknown> {
|
|
3
3
|
fromData: ModelFieldMapConvertFunction<D, V>;
|
|
4
4
|
toData: ModelFieldMapConvertFunction<V, D>;
|
|
@@ -57,6 +57,18 @@ export declare type FirestoreUniqueKeyedArrayFieldConfig<T, K extends PrimativeK
|
|
|
57
57
|
export declare function firestoreUniqueKeyedArray<T, K extends PrimativeKey = PrimativeKey>(config: FirestoreUniqueKeyedArrayFieldConfig<T, K>): FirestoreModelFieldMapFunctionsConfig<T[], T[]>;
|
|
58
58
|
export declare type FirestoreUniqueStringArrayFieldConfig = Omit<FirestoreUniqueArrayFieldConfig<string>, 'findUnique'> & FindUniqueStringsTransformConfig;
|
|
59
59
|
export declare function firestoreUniqueStringArray(config: FirestoreUniqueStringArrayFieldConfig): FirestoreModelFieldMapFunctionsConfig<string[], string[]>;
|
|
60
|
+
/**
|
|
61
|
+
* FirestoreField configuration for an array of ModelKey values.
|
|
62
|
+
*
|
|
63
|
+
* @returns
|
|
64
|
+
*/
|
|
65
|
+
export declare function firestoreModelKeyArray(): FirestoreModelFieldMapFunctionsConfig<string[], string[]>;
|
|
66
|
+
/**
|
|
67
|
+
* FirestoreField configuration for an array of ModelId values.
|
|
68
|
+
*
|
|
69
|
+
* @returns
|
|
70
|
+
*/
|
|
71
|
+
export declare const firestoreModelIdArray: typeof firestoreModelKeyArray;
|
|
60
72
|
export declare type FirestoreEncodedArrayFieldConfig<T, E extends string | number> = DefaultMapConfiguredFirestoreFieldConfig<T[], E[]> & {
|
|
61
73
|
readonly convert: {
|
|
62
74
|
fromData: MapFunction<E, T>;
|
|
@@ -70,6 +82,64 @@ export declare type FirestoreEncodedArrayFieldConfig<T, E extends string | numbe
|
|
|
70
82
|
* @returns
|
|
71
83
|
*/
|
|
72
84
|
export declare function firestoreEncodedArray<T, E extends string | number>(config: FirestoreEncodedArrayFieldConfig<T, E>): FirestoreModelFieldMapFunctionsConfig<T[], E[]>;
|
|
85
|
+
/**
|
|
86
|
+
* Firestore/JSON maps only have string keys.
|
|
87
|
+
*/
|
|
88
|
+
export declare type FirestoreMapFieldType<T, K extends string = string> = Record<K, T>;
|
|
89
|
+
export declare type FirestoreMapFieldConfig<T, K extends string = string> = DefaultMapConfiguredFirestoreFieldConfig<FirestoreMapFieldType<T, K>, FirestoreMapFieldType<T, K>> & Partial<FirestoreFieldDefault<FirestoreMapFieldType<T, K>>> & {
|
|
90
|
+
/**
|
|
91
|
+
* Optional filter to apply when saving to data.
|
|
92
|
+
*
|
|
93
|
+
* By default will filter all null/undefined values from maps.
|
|
94
|
+
*/
|
|
95
|
+
mapFilter?: FilterKeyValueTuplesInput<FirestoreMapFieldType<K>>;
|
|
96
|
+
/**
|
|
97
|
+
* Optional map function to apply to each input value before
|
|
98
|
+
*/
|
|
99
|
+
mapFieldValues?: MapFunction<Maybe<T>, Maybe<T>>;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* FirestoreField configuration for a map-type object.
|
|
103
|
+
*
|
|
104
|
+
* By default it will remove all null/undefined keys from objects before saving.
|
|
105
|
+
*
|
|
106
|
+
* @param config
|
|
107
|
+
* @returns
|
|
108
|
+
*/
|
|
109
|
+
export declare function firestoreMap<T, K extends string = string>(config?: FirestoreMapFieldConfig<T, K>): FirestoreModelFieldMapFunctionsConfig<FirestoreMapFieldType<T, K>, FirestoreMapFieldType<T, K>>;
|
|
110
|
+
/**
|
|
111
|
+
* FirestoreField configuration for a map of granted roles, keyed by model keys.
|
|
112
|
+
*
|
|
113
|
+
* Filters out models with no/null roles by default.
|
|
114
|
+
*/
|
|
115
|
+
export declare function firestoreModelKeyGrantedRoleMap(): FirestoreModelFieldMapFunctionsConfig<FirestoreMapFieldType<string, string>, FirestoreMapFieldType<string, string>>;
|
|
116
|
+
/**
|
|
117
|
+
* FirestoreField configuration for a map of granted roles, keyed by model ids.
|
|
118
|
+
*
|
|
119
|
+
* Filters out models with no/null roles by default.
|
|
120
|
+
*/
|
|
121
|
+
export declare const firestoreModelIdGrantedRoleMap: typeof firestoreModelKeyGrantedRoleMap;
|
|
122
|
+
/**
|
|
123
|
+
* FirestoreField configuration for a map-type object with array values.
|
|
124
|
+
*
|
|
125
|
+
* @param config
|
|
126
|
+
* @returns
|
|
127
|
+
*/
|
|
128
|
+
export declare type FirestoreArrayMapFieldType<T, K extends string = string> = FirestoreMapFieldType<T[], K>;
|
|
129
|
+
export declare type FirestoreArrayMapFieldConfig<T, K extends string = string> = FirestoreMapFieldConfig<T[], K>;
|
|
130
|
+
export declare function firestoreArrayMap<T, K extends string = string>(config?: FirestoreArrayMapFieldConfig<T, K>): FirestoreModelFieldMapFunctionsConfig<FirestoreMapFieldType<T[], K>, FirestoreMapFieldType<T[], K>>;
|
|
131
|
+
/**
|
|
132
|
+
* FirestoreField configuration for a map of granted roles, keyed by models keys.
|
|
133
|
+
*
|
|
134
|
+
* Filters empty roles/arrays by default.
|
|
135
|
+
*/
|
|
136
|
+
export declare function firestoreModelKeyGrantedRoleArrayMap(): FirestoreModelFieldMapFunctionsConfig<FirestoreMapFieldType<string[], string>, FirestoreMapFieldType<string[], string>>;
|
|
137
|
+
/**
|
|
138
|
+
* FirestoreField configuration for a map of granted roles, keyed by models ids.
|
|
139
|
+
*
|
|
140
|
+
* Filters empty roles/arrays by default.
|
|
141
|
+
*/
|
|
142
|
+
export declare const firestoreModelIdGrantedRoleArrayMap: typeof firestoreModelKeyGrantedRoleArrayMap;
|
|
73
143
|
export declare type FirestoreSetFieldConfig<T extends string | number> = DefaultMapConfiguredFirestoreFieldConfig<Set<T>, T[]>;
|
|
74
144
|
/**
|
|
75
145
|
* Do not use.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.firestoreSet = exports.firestoreEncodedArray = exports.firestoreUniqueStringArray = exports.firestoreUniqueKeyedArray = exports.firestoreUniqueArray = exports.optionalFirestoreArray = exports.firestoreArray = exports.optionalFirestoreNumber = exports.firestoreNumber = exports.optionalFirestoreBoolean = exports.firestoreBoolean = exports.optionalFirestoreDate = exports.firestoreDate = exports.optionalFirestoreUID = exports.firestoreUID = exports.optionalFirestoreString = exports.firestoreString = exports.firestorePassThroughField = exports.FIRESTORE_PASSTHROUGH_FIELD = exports.firestoreField = void 0;
|
|
3
|
+
exports.firestoreSet = exports.firestoreModelIdGrantedRoleArrayMap = exports.firestoreModelKeyGrantedRoleArrayMap = exports.firestoreArrayMap = exports.firestoreModelIdGrantedRoleMap = exports.firestoreModelKeyGrantedRoleMap = exports.firestoreMap = exports.firestoreEncodedArray = exports.firestoreModelIdArray = exports.firestoreModelKeyArray = exports.firestoreUniqueStringArray = exports.firestoreUniqueKeyedArray = exports.firestoreUniqueArray = exports.optionalFirestoreArray = exports.firestoreArray = exports.optionalFirestoreNumber = exports.firestoreNumber = exports.optionalFirestoreBoolean = exports.firestoreBoolean = exports.optionalFirestoreDate = exports.firestoreDate = exports.optionalFirestoreUID = exports.firestoreUID = exports.optionalFirestoreString = exports.firestoreString = exports.firestorePassThroughField = exports.FIRESTORE_PASSTHROUGH_FIELD = exports.firestoreField = void 0;
|
|
4
4
|
const date_1 = require("@dereekb/date");
|
|
5
5
|
const util_1 = require("@dereekb/util");
|
|
6
6
|
const snapshot_1 = require("./snapshot");
|
|
@@ -124,6 +124,22 @@ function firestoreUniqueStringArray(config) {
|
|
|
124
124
|
return firestoreUniqueArray(Object.assign(Object.assign({}, config), { findUnique }));
|
|
125
125
|
}
|
|
126
126
|
exports.firestoreUniqueStringArray = firestoreUniqueStringArray;
|
|
127
|
+
/**
|
|
128
|
+
* FirestoreField configuration for an array of ModelKey values.
|
|
129
|
+
*
|
|
130
|
+
* @returns
|
|
131
|
+
*/
|
|
132
|
+
function firestoreModelKeyArray() {
|
|
133
|
+
// firestore model key paths are case-sensitive, so don't transform them.
|
|
134
|
+
return firestoreUniqueStringArray({});
|
|
135
|
+
}
|
|
136
|
+
exports.firestoreModelKeyArray = firestoreModelKeyArray;
|
|
137
|
+
/**
|
|
138
|
+
* FirestoreField configuration for an array of ModelId values.
|
|
139
|
+
*
|
|
140
|
+
* @returns
|
|
141
|
+
*/
|
|
142
|
+
exports.firestoreModelIdArray = firestoreModelKeyArray;
|
|
127
143
|
/**
|
|
128
144
|
* A Firestore array that encodes values to either string or number values using another FirestoreModelField config for encoding/decoding.
|
|
129
145
|
*
|
|
@@ -140,6 +156,70 @@ function firestoreEncodedArray(config) {
|
|
|
140
156
|
});
|
|
141
157
|
}
|
|
142
158
|
exports.firestoreEncodedArray = firestoreEncodedArray;
|
|
159
|
+
/**
|
|
160
|
+
* FirestoreField configuration for a map-type object.
|
|
161
|
+
*
|
|
162
|
+
* By default it will remove all null/undefined keys from objects before saving.
|
|
163
|
+
*
|
|
164
|
+
* @param config
|
|
165
|
+
* @returns
|
|
166
|
+
*/
|
|
167
|
+
function firestoreMap(config = {}) {
|
|
168
|
+
var _a;
|
|
169
|
+
const { mapFilter: filter = util_1.KeyValueTypleValueFilter.NULL, mapFieldValues } = config;
|
|
170
|
+
const filterFinalMapValuesFn = (0, util_1.filterFromPOJOFunction)({
|
|
171
|
+
copy: false,
|
|
172
|
+
filter
|
|
173
|
+
});
|
|
174
|
+
const makeCopy = (mapFieldValues ? (0, util_1.mapObjectMapFunction)(mapFieldValues) : util_1.copyObject);
|
|
175
|
+
return firestoreField({
|
|
176
|
+
default: (_a = config.default) !== null && _a !== void 0 ? _a : {},
|
|
177
|
+
fromData: util_1.passThrough,
|
|
178
|
+
toData: (model) => {
|
|
179
|
+
const copy = makeCopy(model);
|
|
180
|
+
return filterFinalMapValuesFn(copy);
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
exports.firestoreMap = firestoreMap;
|
|
185
|
+
/**
|
|
186
|
+
* FirestoreField configuration for a map of granted roles, keyed by model keys.
|
|
187
|
+
*
|
|
188
|
+
* Filters out models with no/null roles by default.
|
|
189
|
+
*/
|
|
190
|
+
function firestoreModelKeyGrantedRoleMap() {
|
|
191
|
+
return firestoreMap({
|
|
192
|
+
mapFilter: util_1.KeyValueTypleValueFilter.EMPTY
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
exports.firestoreModelKeyGrantedRoleMap = firestoreModelKeyGrantedRoleMap;
|
|
196
|
+
/**
|
|
197
|
+
* FirestoreField configuration for a map of granted roles, keyed by model ids.
|
|
198
|
+
*
|
|
199
|
+
* Filters out models with no/null roles by default.
|
|
200
|
+
*/
|
|
201
|
+
exports.firestoreModelIdGrantedRoleMap = firestoreModelKeyGrantedRoleMap;
|
|
202
|
+
function firestoreArrayMap(config = {}) {
|
|
203
|
+
return firestoreMap(Object.assign({ mapFilter: util_1.KeyValueTypleValueFilter.EMPTY, mapFieldValues: util_1.filterMaybeValues }, config));
|
|
204
|
+
}
|
|
205
|
+
exports.firestoreArrayMap = firestoreArrayMap;
|
|
206
|
+
/**
|
|
207
|
+
* FirestoreField configuration for a map of granted roles, keyed by models keys.
|
|
208
|
+
*
|
|
209
|
+
* Filters empty roles/arrays by default.
|
|
210
|
+
*/
|
|
211
|
+
function firestoreModelKeyGrantedRoleArrayMap() {
|
|
212
|
+
return firestoreArrayMap({
|
|
213
|
+
mapFieldValues: util_1.filterEmptyValues
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
exports.firestoreModelKeyGrantedRoleArrayMap = firestoreModelKeyGrantedRoleArrayMap;
|
|
217
|
+
/**
|
|
218
|
+
* FirestoreField configuration for a map of granted roles, keyed by models ids.
|
|
219
|
+
*
|
|
220
|
+
* Filters empty roles/arrays by default.
|
|
221
|
+
*/
|
|
222
|
+
exports.firestoreModelIdGrantedRoleArrayMap = firestoreModelKeyGrantedRoleArrayMap;
|
|
143
223
|
/**
|
|
144
224
|
* Do not use.
|
|
145
225
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snapshot.field.js","sourceRoot":"","sources":["../../../../../../../../packages/firebase/src/lib/common/firestore/snapshot/snapshot.field.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"snapshot.field.js","sourceRoot":"","sources":["../../../../../../../../packages/firebase/src/lib/common/firestore/snapshot/snapshot.field.ts"],"names":[],"mappings":";;;AAEA,wCAA4E;AAC5E,wCAAye;AACze,yCAAmD;AA4BnD,SAAgB,cAAc,CAAiB,MAAkC;;IAC/E,OAAO;QACL,IAAI,EAAG,MAAgD,CAAC,OAAO;YAC7D,CAAC,CAAC;gBACE,OAAO,EAAG,MAAgD,CAAC,OAAO;gBAClE,OAAO,EAAE,MAAM,CAAC,QAAQ;aACzB;YACH,CAAC,CAAC;gBACE,YAAY,EAAG,MAAoD,CAAC,WAAW;gBAC/E,OAAO,EAAE,MAAM,CAAC,QAAQ;aACzB;QACL,EAAE,EAAE;YACF,OAAO,EAAE,CAAC,MAAA,MAAM,CAAC,iBAAiB,mCAAI,gCAAqB,CAAqB;YAChF,OAAO,EAAE,MAAM,CAAC,MAAM;SACvB;KAC6C,CAAC;AACnD,CAAC;AAhBD,wCAgBC;AAEY,QAAA,2BAA2B,GAAG,cAAc,CAAmB;IAC1E,OAAO,EAAE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AM,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;KACjC,CAAC,CAAC;AACL,CAAC;AAND,oCAMC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../../../../../../../../packages/firebase/src/lib/common/firestore/snapshot/snapshot.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../../../../../../../../packages/firebase/src/lib/common/firestore/snapshot/snapshot.ts"],"names":[],"mappings":";;;AAAA,wCAA0R;AAC1R,oCAAsM;AAEtM,aAAa;AACb;;GAEG;AACU,QAAA,qBAAqB,GAAG,IAAI,CAAC;AAqE1C,SAAgB,0BAA0B,CAA6D,MAAqC;;IAC1I,MAAM,WAAW,GAAgC,MAAC,MAAuD,CAAC,gBAAgB,mCAAI,IAAA,4BAAqB,EAAQ,MAAkD,CAAC,MAAM,CAAC,CAAC;IACtN,MAAM,YAAY,GAAG,IAAA,4BAAqB,EAAO,WAAW,CAAC,CAAC;IAC9D,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAA,8BAAuB,EAAC,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC;IAEhJ,MAAM,IAAI,GAAwC,CAAC,KAAuB,EAAE,MAA0B,EAAE,EAAE;QACxG,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;QAC1B,OAAO,QAAQ,CAAC,IAAS,EAAE,MAAM,CAAC,CAAC;IACrC,CAAC,CAAC;IAEF,MAAM,EAAE,GAAsC,CAAC,KAAQ,EAAE,MAA0B,EAAE,OAA2B,EAAE,EAAE;QAClH,IAAI,SAA2C,CAAC;QAEhD,IAAI,OAAO,EAAE;YACX,MAAM,WAAW,GAAI,OAAiC,CAAC,WAAW,CAAC;YAEnE,IAAK,OAA2B,CAAC,KAAK,EAAE;gBACtC,SAAS,GAAG;oBACV,WAAW,EAAE,IAAI;iBAClB,CAAC;aACH;YAED,IAAI,WAAW,EAAE;gBACf,SAAS,mCACJ,SAAS,KACZ,MAAM,EAAE,IAAA,4BAAoB,EAAC,WAAW,CAAgB,GACzD,CAAC;aACH;SACF;QAED,OAAO,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;IAC1C,CAAC,CAAC;IAEF,OAAO;QACL,IAAI;QACJ,EAAE;QACF,aAAa,EAAE,CAAC,QAA6B,EAAE,OAAyB,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC;QAC/G,WAAW,EAAE,CAAC,WAAyD,EAAE,OAAoB,EAAE,EAAE,CAAC,EAAE,CAAC,WAAgB,EAAE,SAAS,EAAE,OAAO,CAAC;KAC3I,CAAC;AACJ,CAAC;AAvCD,gEAuCC"}
|
package/test/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
# [7.3.0](https://github.com/dereekb/dbx-components/compare/v7.2.0-dev...v7.3.0) (2022-06-08)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
5
9
|
# [7.2.0](https://github.com/dereekb/dbx-components/compare/v7.1.0-dev...v7.2.0) (2022-06-06)
|
|
6
10
|
|
|
7
11
|
|
package/test/package.json
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/firebase/test",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"typings": "./src/index.d.ts",
|
|
6
6
|
"dependencies": {},
|
|
7
7
|
"peerDependencies": {
|
|
8
|
-
"@dereekb/util/test": "7.
|
|
9
|
-
"@dereekb/util": "7.
|
|
8
|
+
"@dereekb/util/test": "7.3.0",
|
|
9
|
+
"@dereekb/util": "7.3.0",
|
|
10
10
|
"make-error": "^1.3.0",
|
|
11
11
|
"ts-essentials": "^9.1.2",
|
|
12
12
|
"extra-set": "^2.2.11",
|
|
13
|
-
"@dereekb/firebase": "7.
|
|
13
|
+
"@dereekb/firebase": "7.3.0",
|
|
14
14
|
"rxjs": "^7.0.0",
|
|
15
15
|
"rxfire": "^6.0.3",
|
|
16
16
|
"firebase": "^9.8.0",
|
|
17
|
-
"@dereekb/rxjs": "7.
|
|
17
|
+
"@dereekb/rxjs": "7.3.0",
|
|
18
18
|
"ms": "^3.0.0-canary.1",
|
|
19
|
-
"@dereekb/
|
|
19
|
+
"@dereekb/model": "7.3.0",
|
|
20
20
|
"class-transformer": "^0.5.1",
|
|
21
|
-
"date-fns": "^2.28.0",
|
|
22
21
|
"class-validator": "^0.13.2",
|
|
22
|
+
"@dereekb/date": "7.3.0",
|
|
23
|
+
"date-fns": "^2.28.0",
|
|
23
24
|
"date-fns-tz": "^1.3.0",
|
|
24
25
|
"rrule": "git+https://git@github.com/dereekb/rrule.git#17adf5708d6567b4d01a3a8afd106261421ea492",
|
|
25
|
-
"@dereekb/model": "7.2.0",
|
|
26
26
|
"tslib": "^2.0.0"
|
|
27
27
|
}
|
|
28
28
|
}
|