@infrab4a/connect 1.0.0-beta.10 → 1.0.0-beta.11
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 +9 -2
- package/bundles/infrab4a-connect.umd.js.map +1 -1
- package/esm2015/infra/hasura-graphql/mixins/helpers/filter-option.helper.js +2 -2
- package/esm2015/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.js +8 -3
- package/esm2015/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.js +7 -4
- package/esm2015/infra/hasura-graphql/types/hasura-graphql-fields.type.js +1 -1
- package/fesm2015/infrab4a-connect.js +9 -2
- package/fesm2015/infrab4a-connect.js.map +1 -1
- package/infra/hasura-graphql/mixins/helpers/filter-option.helper.d.ts +2 -2
- package/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.d.ts +2 -2
- package/infra/hasura-graphql/types/hasura-graphql-fields.type.d.ts +3 -3
- package/package.json +1 -1
|
@@ -2889,7 +2889,7 @@
|
|
|
2889
2889
|
if (filter.operator === exports.Where.ISNOTNULL)
|
|
2890
2890
|
return false;
|
|
2891
2891
|
var converter = fieldOption.to ? fieldOption.to : function (value) { return value; };
|
|
2892
|
-
return Array.isArray(filter.value) && [exports.Where.IN, exports.Where.NOTIN].includes(filter.operator)
|
|
2892
|
+
return Array.isArray(filter.value) && !fieldOption.fields && [exports.Where.IN, exports.Where.NOTIN].includes(filter.operator)
|
|
2893
2893
|
? filter.value.map(function (fieldValue) { return converter(fieldValue); })
|
|
2894
2894
|
: converter(filter.value);
|
|
2895
2895
|
};
|
|
@@ -3389,6 +3389,7 @@
|
|
|
3389
3389
|
{
|
|
3390
3390
|
conditions: {
|
|
3391
3391
|
columnName: 'tag_condition',
|
|
3392
|
+
type: HasuraGraphQLColumnType.Jsonb,
|
|
3392
3393
|
from: function (tags, row) { return ({ brand: row.brand_condition, tags: tags }); },
|
|
3393
3394
|
bindPersistData: function (value) {
|
|
3394
3395
|
return {
|
|
@@ -3396,6 +3397,9 @@
|
|
|
3396
3397
|
tag_condition: "{\"" + value.tags.join('","') + "\"}",
|
|
3397
3398
|
};
|
|
3398
3399
|
},
|
|
3400
|
+
bindFindFilter: function (sentence) {
|
|
3401
|
+
return Object.assign(Object.assign({}, (sentence.brand ? { brand_condition: sentence.brand } : {})), (sentence.tags ? { tag_condition: sentence.tags } : {}));
|
|
3402
|
+
},
|
|
3399
3403
|
},
|
|
3400
3404
|
},
|
|
3401
3405
|
'filters',
|
|
@@ -3621,7 +3625,10 @@
|
|
|
3621
3625
|
categories: {
|
|
3622
3626
|
columnName: 'categories',
|
|
3623
3627
|
fields: ['category_id'],
|
|
3624
|
-
|
|
3628
|
+
bindPersistData: function (value) { return ({
|
|
3629
|
+
categories: { data: value.map(function (category) { return ({ category_id: +category }); }) },
|
|
3630
|
+
}); },
|
|
3631
|
+
to: function (categories) { return categories.map(function (categoryId) { return +categoryId; }); },
|
|
3625
3632
|
from: function (categories) { return (categories === null || categories === void 0 ? void 0 : categories.map(function (category) { var _a; return (_a = category === null || category === void 0 ? void 0 : category.category_id) === null || _a === void 0 ? void 0 : _a.toString(); })) || []; },
|
|
3626
3633
|
},
|
|
3627
3634
|
},
|