@infrab4a/connect-angular 4.10.0-beta.5 → 4.10.0-beta.7

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.
@@ -1762,7 +1762,7 @@ class CatalogService {
1762
1762
  }
1763
1763
  async findCatalog(options, limits) {
1764
1764
  if (this.hasTerm(options) && options.sort === 'most-relevant') {
1765
- const productsIds = await this.findCatalogIdsBySearch(options.term, options.perPage === 9);
1765
+ const productsIds = await this.findCatalogIdsBySearch(options.term);
1766
1766
  return this.findCatalogAndSortByMostRevelantByTerm(productsIds, options, limits);
1767
1767
  }
1768
1768
  if (this.hasCategory(options) && options.sort === 'most-relevant') {
@@ -1870,11 +1870,11 @@ class CatalogService {
1870
1870
  distinct: totalResult.distinct,
1871
1871
  };
1872
1872
  }
1873
- async findCatalogIdsBySearch(term, preview) {
1873
+ async findCatalogIdsBySearch(term, preview = false) {
1874
1874
  if (this.productsByTerm[term])
1875
1875
  return this.productsByTerm[term];
1876
1876
  return (this.productsByTerm[term] = await this.productSearch
1877
- .search(term, preview ? 9 : 9999, this.shop == Shops.GLAMSHOP ? 'female' : 'male')
1877
+ .search(term, 999, this.shop == Shops.GLAMSHOP ? 'female' : 'male')
1878
1878
  .then((products) => {
1879
1879
  const withStock = products.filter((_source) => _source.stock > 0);
1880
1880
  const withOutStock = products.filter((_source) => _source.stock <= 0);
@@ -1972,11 +1972,12 @@ __decorate([
1972
1972
  ], CategoryWithTree.prototype, "children", void 0);
1973
1973
 
1974
1974
  class WishlistService {
1975
- constructor(wishlistRepository, shop, productRepository, categoryFilterRepository, categoryRepository, productStockNotificationRepository, productVertexSearch) {
1975
+ constructor(wishlistRepository, shop, productRepository, categoryFilterRepository, categoryRepository, productStockNotificationRepository, productSearch) {
1976
1976
  this.wishlistRepository = wishlistRepository;
1977
1977
  this.shop = shop;
1978
+ this.productSearch = productSearch;
1978
1979
  const categoryStructureAdapter = new NewCategoryStructureAdapter(wishlistRepository);
1979
- this.catalogService = new CatalogService(productRepository, productStockNotificationRepository, categoryRepository, categoryStructureAdapter, shop, productVertexSearch);
1980
+ this.catalogService = new CatalogService(productRepository, productStockNotificationRepository, categoryRepository, categoryStructureAdapter, shop, productSearch);
1980
1981
  this.categoryService = new CategoryService(productRepository, categoryRepository, categoryFilterRepository, categoryStructureAdapter, shop);
1981
1982
  }
1982
1983
  getCatalogService() {
@@ -2068,7 +2069,7 @@ class WishlistService {
2068
2069
  return wishlist;
2069
2070
  }
2070
2071
  }
2071
- WishlistService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, deps: [{ token: 'WishlistRepository' }, { token: DEFAULT_SHOP }, { token: 'ProductRepository' }, { token: 'CategoryFilterRepository' }, { token: 'CategoryRepository' }, { token: 'ProductStockNotificationRepository' }, { token: i1$2.ProductsVertexSearch }], target: i0.ɵɵFactoryTarget.Injectable });
2072
+ WishlistService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, deps: [{ token: 'WishlistRepository' }, { token: DEFAULT_SHOP }, { token: 'ProductRepository' }, { token: 'CategoryFilterRepository' }, { token: 'CategoryRepository' }, { token: 'ProductStockNotificationRepository' }, { token: 'ProductSearch' }], target: i0.ɵɵFactoryTarget.Injectable });
2072
2073
  WishlistService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService });
2073
2074
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, decorators: [{
2074
2075
  type: Injectable
@@ -2090,7 +2091,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
2090
2091
  }] }, { type: undefined, decorators: [{
2091
2092
  type: Inject,
2092
2093
  args: ['ProductStockNotificationRepository']
2093
- }] }, { type: i1$2.ProductsVertexSearch }]; } });
2094
+ }] }, { type: undefined, decorators: [{
2095
+ type: Inject,
2096
+ args: ['ProductSearch']
2097
+ }] }]; } });
2094
2098
 
2095
2099
  class CheckoutSubscriptionService {
2096
2100
  constructor(checkoutSubscriptionRepository, dataPersistence, couponService) {