@infrab4a/connect-angular 4.10.0-beta.6 → 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.
- package/esm2020/services/catalog/catalog.service.mjs +4 -5
- package/esm2020/services/catalog/wishlist.service.mjs +10 -6
- package/fesm2015/infrab4a-connect-angular.mjs +11 -8
- package/fesm2015/infrab4a-connect-angular.mjs.map +1 -1
- package/fesm2020/infrab4a-connect-angular.mjs +11 -8
- package/fesm2020/infrab4a-connect-angular.mjs.map +1 -1
- package/package.json +1 -1
- package/services/catalog/wishlist.service.d.ts +3 -2
|
@@ -1762,8 +1762,7 @@ class CatalogService {
|
|
|
1762
1762
|
}
|
|
1763
1763
|
async findCatalog(options, limits) {
|
|
1764
1764
|
if (this.hasTerm(options) && options.sort === 'most-relevant') {
|
|
1765
|
-
|
|
1766
|
-
const productsIds = await this.findCatalogIdsBySearch(options.term, options.perPage === 9);
|
|
1765
|
+
const productsIds = await this.findCatalogIdsBySearch(options.term);
|
|
1767
1766
|
return this.findCatalogAndSortByMostRevelantByTerm(productsIds, options, limits);
|
|
1768
1767
|
}
|
|
1769
1768
|
if (this.hasCategory(options) && options.sort === 'most-relevant') {
|
|
@@ -1871,11 +1870,11 @@ class CatalogService {
|
|
|
1871
1870
|
distinct: totalResult.distinct,
|
|
1872
1871
|
};
|
|
1873
1872
|
}
|
|
1874
|
-
async findCatalogIdsBySearch(term, preview) {
|
|
1873
|
+
async findCatalogIdsBySearch(term, preview = false) {
|
|
1875
1874
|
if (this.productsByTerm[term])
|
|
1876
1875
|
return this.productsByTerm[term];
|
|
1877
1876
|
return (this.productsByTerm[term] = await this.productSearch
|
|
1878
|
-
.search(term,
|
|
1877
|
+
.search(term, 999, this.shop == Shops.GLAMSHOP ? 'female' : 'male')
|
|
1879
1878
|
.then((products) => {
|
|
1880
1879
|
const withStock = products.filter((_source) => _source.stock > 0);
|
|
1881
1880
|
const withOutStock = products.filter((_source) => _source.stock <= 0);
|
|
@@ -1973,11 +1972,12 @@ __decorate([
|
|
|
1973
1972
|
], CategoryWithTree.prototype, "children", void 0);
|
|
1974
1973
|
|
|
1975
1974
|
class WishlistService {
|
|
1976
|
-
constructor(wishlistRepository, shop, productRepository, categoryFilterRepository, categoryRepository, productStockNotificationRepository,
|
|
1975
|
+
constructor(wishlistRepository, shop, productRepository, categoryFilterRepository, categoryRepository, productStockNotificationRepository, productSearch) {
|
|
1977
1976
|
this.wishlistRepository = wishlistRepository;
|
|
1978
1977
|
this.shop = shop;
|
|
1978
|
+
this.productSearch = productSearch;
|
|
1979
1979
|
const categoryStructureAdapter = new NewCategoryStructureAdapter(wishlistRepository);
|
|
1980
|
-
this.catalogService = new CatalogService(productRepository, productStockNotificationRepository, categoryRepository, categoryStructureAdapter, shop,
|
|
1980
|
+
this.catalogService = new CatalogService(productRepository, productStockNotificationRepository, categoryRepository, categoryStructureAdapter, shop, productSearch);
|
|
1981
1981
|
this.categoryService = new CategoryService(productRepository, categoryRepository, categoryFilterRepository, categoryStructureAdapter, shop);
|
|
1982
1982
|
}
|
|
1983
1983
|
getCatalogService() {
|
|
@@ -2069,7 +2069,7 @@ class WishlistService {
|
|
|
2069
2069
|
return wishlist;
|
|
2070
2070
|
}
|
|
2071
2071
|
}
|
|
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:
|
|
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 });
|
|
2073
2073
|
WishlistService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService });
|
|
2074
2074
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, decorators: [{
|
|
2075
2075
|
type: Injectable
|
|
@@ -2091,7 +2091,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
2091
2091
|
}] }, { type: undefined, decorators: [{
|
|
2092
2092
|
type: Inject,
|
|
2093
2093
|
args: ['ProductStockNotificationRepository']
|
|
2094
|
-
}] }, { type:
|
|
2094
|
+
}] }, { type: undefined, decorators: [{
|
|
2095
|
+
type: Inject,
|
|
2096
|
+
args: ['ProductSearch']
|
|
2097
|
+
}] }]; } });
|
|
2095
2098
|
|
|
2096
2099
|
class CheckoutSubscriptionService {
|
|
2097
2100
|
constructor(checkoutSubscriptionRepository, dataPersistence, couponService) {
|