@infrab4a/connect-angular 5.5.0-beta.13 → 5.5.0-beta.15

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.
@@ -1693,6 +1693,7 @@ class TermSearchStrategy {
1693
1693
  limits,
1694
1694
  shop,
1695
1695
  mainGender,
1696
+ sort,
1696
1697
  fields: this.helpersService.getFieldsHelper().getStandardFields(),
1697
1698
  });
1698
1699
  }
@@ -1722,9 +1723,10 @@ class TermSearchStrategy {
1722
1723
  });
1723
1724
  }
1724
1725
  async searchDefault(params) {
1725
- const { productIds, filters, limits, shop, mainGender, fields } = params;
1726
+ const { productIds, filters, limits, sort, shop, mainGender, fields } = params;
1726
1727
  const productCatalog = this.repositoryService.getProductCatalog();
1727
1728
  const filterHelper = this.helpersService.getFilterHelper();
1729
+ const sortHelper = this.helpersService.getSortHelper();
1728
1730
  return productCatalog.productCatalogRepository.findCatalog({
1729
1731
  fields,
1730
1732
  filters: {
@@ -1733,6 +1735,7 @@ class TermSearchStrategy {
1733
1735
  ...filterHelper.buildFilterQuery(filters || {}),
1734
1736
  },
1735
1737
  limits,
1738
+ ...(sort ? { orderBy: sortHelper.buildSortQuery(sort) } : {}),
1736
1739
  options: {
1737
1740
  minimal: ['price'],
1738
1741
  maximum: ['price'],