@infrab4a/connect-angular 4.19.0-beta.1 → 4.19.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.
@@ -1390,6 +1390,30 @@ class CatalogService {
1390
1390
  this.productSearch = productSearch;
1391
1391
  this.productsByTerm = {};
1392
1392
  this.brandsList = {};
1393
+ this.fields = [
1394
+ 'id',
1395
+ 'name',
1396
+ 'slug',
1397
+ 'images',
1398
+ 'miniatures',
1399
+ 'price',
1400
+ 'stock',
1401
+ 'published',
1402
+ 'CEST',
1403
+ 'EAN',
1404
+ 'NCM',
1405
+ 'brand',
1406
+ 'costPrice',
1407
+ 'hasVariants',
1408
+ 'isKit',
1409
+ 'sku',
1410
+ 'rate',
1411
+ 'tags',
1412
+ 'type',
1413
+ 'shoppingCount',
1414
+ 'gender',
1415
+ 'createdAt',
1416
+ ];
1393
1417
  this.buildFilterQuery = ({ clubDiscount, brands, prices, gender, tags, rate, customOptions, }) => {
1394
1418
  const filters = {};
1395
1419
  if (clubDiscount?.length)
@@ -1498,6 +1522,7 @@ class CatalogService {
1498
1522
  return this.findCatalogAndSortByMostRevelant(mostRelevant, productsIds, options, limits, optionsCache);
1499
1523
  }
1500
1524
  const repoParams = {
1525
+ fields: this.fields,
1501
1526
  filters: {
1502
1527
  ...(await this.buildMainFilter(options)),
1503
1528
  ...this.buildFilterQuery(options?.filters || {}),
@@ -1530,6 +1555,7 @@ class CatalogService {
1530
1555
  const brandsList = this.brandsList[this.buildIndexBrands(options)];
1531
1556
  const mostRelevantProductsIds = [...new Set(mostRelevants.concat(productIds))];
1532
1557
  const totalResult = await this.productRepository.findCatalog({
1558
+ fields: this.fields,
1533
1559
  filters: {
1534
1560
  id: { operator: Where.IN, value: mostRelevantProductsIds },
1535
1561
  ...this.buildFilterQuery(options?.filters || {}),
@@ -1596,6 +1622,7 @@ class CatalogService {
1596
1622
  filters: {
1597
1623
  id: { operator: Where.IN, value: orderedId },
1598
1624
  },
1625
+ fields: this.fields,
1599
1626
  });
1600
1627
  await this.setBrandsList(options, totalResult.distinct?.brand);
1601
1628
  return {