@infrab4a/connect 1.0.0-beta.14 → 1.0.0-beta.16
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/bundles/infrab4a-connect.umd.js +4 -4
- package/bundles/infrab4a-connect.umd.js.map +1 -1
- package/esm2015/infra/firebase/firestore/mixins/with-find-firestore.mixin.js +2 -2
- package/esm2015/infra/firebase/firestore/mixins/with-firestore.mixin.js +2 -3
- package/esm2015/infra/hasura-graphql/mixins/with-update-hasura-graphql.mixin.js +2 -2
- package/esm2015/infra/hasura-graphql/repositories/catalog/variant-hasura-graphql.repository.js +2 -2
- package/fesm2015/infrab4a-connect.js +4 -4
- package/fesm2015/infrab4a-connect.js.map +1 -1
- package/infra/firebase/firestore/mixins/with-find-firestore.mixin.d.ts +1 -1
- package/infra/firebase/firestore/mixins/with-firestore.mixin.d.ts +1 -1
- package/infra/hasura-graphql/mixins/with-update-hasura-graphql.mixin.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1729,7 +1729,7 @@
|
|
|
1729
1729
|
fromFirestore: function (snap) {
|
|
1730
1730
|
var data = snap.data();
|
|
1731
1731
|
Object.keys(data).forEach(function (key) {
|
|
1732
|
-
if (data[key]
|
|
1732
|
+
if (typeof data[key] === 'object' && '_seconds' in data[key]) {
|
|
1733
1733
|
data[key] = data[key].toDate();
|
|
1734
1734
|
}
|
|
1735
1735
|
});
|
|
@@ -1843,7 +1843,7 @@
|
|
|
1843
1843
|
case 0:
|
|
1844
1844
|
query = this.collection(this.buildCollectionPathForFind(filters));
|
|
1845
1845
|
query = this.makeFirestoreWhere(query, filters);
|
|
1846
|
-
Object.keys(orderBy).forEach(function (fieldName) { return (query = query.orderBy(fieldName, orderBy[fieldName])); });
|
|
1846
|
+
Object.keys(orderBy || {}).forEach(function (fieldName) { return (query = query.orderBy(fieldName, orderBy[fieldName])); });
|
|
1847
1847
|
return [4 /*yield*/, this.defineLimits(query, filters, limits)];
|
|
1848
1848
|
case 1:
|
|
1849
1849
|
query = _a.sent();
|
|
@@ -3157,7 +3157,7 @@
|
|
|
3157
3157
|
return params.toPlain();
|
|
3158
3158
|
return Object.keys(params).reduce(function (data, currentKey) {
|
|
3159
3159
|
var _a;
|
|
3160
|
-
return (Object.assign(Object.assign({}, data), (_a = {}, _a[currentKey] = getValueByAction(params[currentKey]), _a)));
|
|
3160
|
+
return (Object.assign(Object.assign({}, data), (params[currentKey] && (_a = {}, _a[currentKey] = getValueByAction(params[currentKey]), _a))));
|
|
3161
3161
|
}, {});
|
|
3162
3162
|
};
|
|
3163
3163
|
UpdateHasuraGraphQLMixin.prototype.getUpdateModelKeys = function (data) {
|
|
@@ -3783,7 +3783,7 @@
|
|
|
3783
3783
|
fields: [
|
|
3784
3784
|
{ id: { columnName: 'id', to: function (value) { return +value; }, from: function (value) { return value.toString(); } } },
|
|
3785
3785
|
{ firestoreId: { columnName: 'firestore_id' } },
|
|
3786
|
-
{ productId: { columnName: 'main_product_id', to: function (value) { return +value; }, from: function (value) { return value.toString(); } } },
|
|
3786
|
+
{ productId: { columnName: 'main_product_id', to: function (value) { return +value; }, from: function (value) { return value === null || value === void 0 ? void 0 : value.toString(); } } },
|
|
3787
3787
|
{ EAN: { columnName: 'ean' } },
|
|
3788
3788
|
{ costPrice: { columnName: 'cost_price' } },
|
|
3789
3789
|
{
|