@infrab4a/connect 4.9.0-beta.3 → 4.9.0-beta.4
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/index.cjs.js +6 -4
- package/index.esm.js +6 -4
- package/package.json +2 -2
package/index.cjs.js
CHANGED
|
@@ -2930,6 +2930,7 @@ const withFindFirestore = (MixinBase) => {
|
|
|
2930
2930
|
...this.buildWhereSentence(fieldName, is(filter[fieldName])),
|
|
2931
2931
|
], []);
|
|
2932
2932
|
this.buildWhereSentence = (fieldName, options) => {
|
|
2933
|
+
var _a, _b, _c, _d;
|
|
2933
2934
|
if (this.isSubCollection(this) && fieldName === this.parentIdField)
|
|
2934
2935
|
return [];
|
|
2935
2936
|
const value = (options === null || options === void 0 ? void 0 : options.value) || options;
|
|
@@ -2941,9 +2942,9 @@ const withFindFirestore = (MixinBase) => {
|
|
|
2941
2942
|
: Object.keys(plainInstance).find((key) => plainInstance[key]);
|
|
2942
2943
|
if ((options === null || options === void 0 ? void 0 : options.operator) === exports.Where.LIKE) {
|
|
2943
2944
|
if (Array.isArray(options === null || options === void 0 ? void 0 : options.value) &&
|
|
2944
|
-
(this.fields[firestoreFieldName] ===
|
|
2945
|
+
(((_a = this.fields) === null || _a === void 0 ? void 0 : _a[firestoreFieldName]) ===
|
|
2945
2946
|
FirestoreFieldType.Array ||
|
|
2946
|
-
!this.fields[firestoreFieldName]))
|
|
2947
|
+
!((_b = this.fields) === null || _b === void 0 ? void 0 : _b[firestoreFieldName])))
|
|
2947
2948
|
return [[firestoreFieldName, 'array-contains-any', options.value]];
|
|
2948
2949
|
return [
|
|
2949
2950
|
[firestoreFieldName, '>=', options.value],
|
|
@@ -2952,8 +2953,9 @@ const withFindFirestore = (MixinBase) => {
|
|
|
2952
2953
|
}
|
|
2953
2954
|
if ((options === null || options === void 0 ? void 0 : options.operator) === exports.Where.IN &&
|
|
2954
2955
|
Array.isArray(options === null || options === void 0 ? void 0 : options.value) &&
|
|
2955
|
-
(this.fields[firestoreFieldName] ===
|
|
2956
|
-
|
|
2956
|
+
(((_c = this.fields) === null || _c === void 0 ? void 0 : _c[firestoreFieldName]) ===
|
|
2957
|
+
FirestoreFieldType.Array ||
|
|
2958
|
+
!((_d = this.fields) === null || _d === void 0 ? void 0 : _d[firestoreFieldName])))
|
|
2957
2959
|
return [[firestoreFieldName, 'array-contains', options.value]];
|
|
2958
2960
|
if (lodash.isObject(options) && lodash.isNil(options === null || options === void 0 ? void 0 : options.operator) && lodash.isNil(options === null || options === void 0 ? void 0 : options.value)) {
|
|
2959
2961
|
return Object.keys(options).reduce((queries, key) => [
|
package/index.esm.js
CHANGED
|
@@ -2906,6 +2906,7 @@ const withFindFirestore = (MixinBase) => {
|
|
|
2906
2906
|
...this.buildWhereSentence(fieldName, is(filter[fieldName])),
|
|
2907
2907
|
], []);
|
|
2908
2908
|
this.buildWhereSentence = (fieldName, options) => {
|
|
2909
|
+
var _a, _b, _c, _d;
|
|
2909
2910
|
if (this.isSubCollection(this) && fieldName === this.parentIdField)
|
|
2910
2911
|
return [];
|
|
2911
2912
|
const value = (options === null || options === void 0 ? void 0 : options.value) || options;
|
|
@@ -2917,9 +2918,9 @@ const withFindFirestore = (MixinBase) => {
|
|
|
2917
2918
|
: Object.keys(plainInstance).find((key) => plainInstance[key]);
|
|
2918
2919
|
if ((options === null || options === void 0 ? void 0 : options.operator) === Where.LIKE) {
|
|
2919
2920
|
if (Array.isArray(options === null || options === void 0 ? void 0 : options.value) &&
|
|
2920
|
-
(this.fields[firestoreFieldName] ===
|
|
2921
|
+
(((_a = this.fields) === null || _a === void 0 ? void 0 : _a[firestoreFieldName]) ===
|
|
2921
2922
|
FirestoreFieldType.Array ||
|
|
2922
|
-
!this.fields[firestoreFieldName]))
|
|
2923
|
+
!((_b = this.fields) === null || _b === void 0 ? void 0 : _b[firestoreFieldName])))
|
|
2923
2924
|
return [[firestoreFieldName, 'array-contains-any', options.value]];
|
|
2924
2925
|
return [
|
|
2925
2926
|
[firestoreFieldName, '>=', options.value],
|
|
@@ -2928,8 +2929,9 @@ const withFindFirestore = (MixinBase) => {
|
|
|
2928
2929
|
}
|
|
2929
2930
|
if ((options === null || options === void 0 ? void 0 : options.operator) === Where.IN &&
|
|
2930
2931
|
Array.isArray(options === null || options === void 0 ? void 0 : options.value) &&
|
|
2931
|
-
(this.fields[firestoreFieldName] ===
|
|
2932
|
-
|
|
2932
|
+
(((_c = this.fields) === null || _c === void 0 ? void 0 : _c[firestoreFieldName]) ===
|
|
2933
|
+
FirestoreFieldType.Array ||
|
|
2934
|
+
!((_d = this.fields) === null || _d === void 0 ? void 0 : _d[firestoreFieldName])))
|
|
2933
2935
|
return [[firestoreFieldName, 'array-contains', options.value]];
|
|
2934
2936
|
if (isObject$1(options) && isNil(options === null || options === void 0 ? void 0 : options.operator) && isNil(options === null || options === void 0 ? void 0 : options.value)) {
|
|
2935
2937
|
return Object.keys(options).reduce((queries, key) => [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infrab4a/connect",
|
|
3
|
-
"version": "4.9.0-beta.
|
|
3
|
+
"version": "4.9.0-beta.4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org"
|
|
6
6
|
},
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"class-transformer": "^0.5.1",
|
|
14
14
|
"date-fns": "^2.28.0",
|
|
15
15
|
"debug": "^4.3.4",
|
|
16
|
-
"firebase": "
|
|
16
|
+
"firebase": "9.18.0",
|
|
17
17
|
"gql-query-builder": "3.7.0",
|
|
18
18
|
"lodash": "^4.17.21",
|
|
19
19
|
"reflect-metadata": "^0.1.13",
|