@infrab4a/connect-angular 4.10.0-beta.0 → 4.10.0-beta.10
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/angular-connect.module.d.ts +8 -7
- package/angular-vertex-search.module.d.ts +2 -2
- package/esm2020/angular-connect.module.mjs +15 -7
- package/esm2020/angular-vertex-search.module.mjs +4 -4
- package/esm2020/services/catalog/catalog.service.mjs +60 -32
- package/esm2020/services/catalog/wishlist.service.mjs +10 -6
- package/fesm2015/infrab4a-connect-angular.mjs +115 -76
- package/fesm2015/infrab4a-connect-angular.mjs.map +1 -1
- package/fesm2020/infrab4a-connect-angular.mjs +114 -75
- package/fesm2020/infrab4a-connect-angular.mjs.map +1 -1
- package/package.json +2 -2
- package/services/catalog/catalog.service.d.ts +4 -4
- package/services/catalog/wishlist.service.d.ts +3 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { NgModule, InjectionToken, PLATFORM_ID, Injectable, Inject } from '@angular/core';
|
|
3
3
|
import * as i1$4 from '@angular/fire/app';
|
|
4
4
|
import { FirebaseApp, provideFirebaseApp, getApp, initializeApp } from '@angular/fire/app';
|
|
5
5
|
import * as i2 from '@angular/fire/storage';
|
|
6
6
|
import { Storage, provideStorage, getStorage } from '@angular/fire/storage';
|
|
7
7
|
import * as i1$2 from '@infrab4a/connect';
|
|
8
|
-
import { Authentication, AuthenticationFirebaseAuthService, Register, RegisterFirebaseAuthService, SignOut, RecoveryPassword,
|
|
8
|
+
import { ProductsIndex, AxiosAdapter, Authentication, AuthenticationFirebaseAuthService, Register, RegisterFirebaseAuthService, SignOut, RecoveryPassword, ConnectFirestoreService, UserBeautyProfileFirestoreRepository, Buy2WinFirestoreRepository, CategoryFirestoreRepository, CheckoutFirestoreRepository, CheckoutSubscriptionFirestoreRepository, CouponFirestoreRepository, CampaignHashtagFirestoreRepository, CampaignDashboardFirestoreRepository, SubscriptionEditionFirestoreRepository, HomeFirestoreRepository, LeadFirestoreRepository, LegacyOrderFirestoreRepository, ShopMenuFirestoreRepository, OrderFirestoreRepository, PaymentFirestoreRepository, ProductFirestoreRepository, ShopSettingsFirestoreRepository, SubscriptionPaymentFirestoreRepository, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, SubscriptionFirestoreRepository, UserFirestoreRepository, UserAddressFirestoreRepository, UserPaymentMethodFirestoreRepository, SubscriptionMaterializationFirestoreRepository, SubscriptionSummaryFirestoreRepository, ProductVariantFirestoreRepository, OrderBlockedFirestoreRepository, CategoryHasuraGraphQLRepository, ProductHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository, ProductReviewsHasuraGraphQLRepository, VariantHasuraGraphQLRepository, ProductStockNotificationHasuraGraphQLRepository, FilterOptionHasuraGraphQLRepository, FilterHasuraGraphQLRepository, CategoryCollectionChildrenHasuraGraphQLRepository, WishlistHasuraGraphQLRepository, ProductsVertexSearch, VertexAxiosAdapter, Where, Shops, CheckoutTypes, CouponTypes, Exclusivities, isNil, NotFoundError, Checkout, pick, LineItem, RoundProductPricesHelper, set, InvalidArgumentError, Category, PersonTypes, Wishlist, CheckoutSubscription, Product, RequiredArgumentError, add, Order, UpdateUserImage, FirebaseFileUploaderService } from '@infrab4a/connect';
|
|
9
9
|
import * as i1 from '@angular/fire/auth';
|
|
10
10
|
import { Auth, provideAuth, getAuth, getIdToken, authState } from '@angular/fire/auth';
|
|
11
11
|
import { isPlatformBrowser, isPlatformServer } from '@angular/common';
|
|
@@ -18,14 +18,44 @@ import { __decorate, __metadata } from 'tslib';
|
|
|
18
18
|
import { Type } from 'class-transformer';
|
|
19
19
|
import * as i1$3 from '@angular/common/http';
|
|
20
20
|
|
|
21
|
+
const ES_CONFIG = 'ES_CONFIG';
|
|
22
|
+
|
|
23
|
+
class AngularElasticSeachModule {
|
|
24
|
+
static initializeApp(options) {
|
|
25
|
+
return {
|
|
26
|
+
ngModule: AngularElasticSeachModule,
|
|
27
|
+
providers: [{ provide: ES_CONFIG, useValue: options }],
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
AngularElasticSeachModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
32
|
+
AngularElasticSeachModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule });
|
|
33
|
+
AngularElasticSeachModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule, providers: [
|
|
34
|
+
{
|
|
35
|
+
provide: ProductsIndex,
|
|
36
|
+
useFactory: (configuration) => new ProductsIndex(new AxiosAdapter(configuration)),
|
|
37
|
+
deps: [ES_CONFIG],
|
|
38
|
+
},
|
|
39
|
+
] });
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule, decorators: [{
|
|
41
|
+
type: NgModule,
|
|
42
|
+
args: [{
|
|
43
|
+
providers: [
|
|
44
|
+
{
|
|
45
|
+
provide: ProductsIndex,
|
|
46
|
+
useFactory: (configuration) => new ProductsIndex(new AxiosAdapter(configuration)),
|
|
47
|
+
deps: [ES_CONFIG],
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
}]
|
|
51
|
+
}] });
|
|
52
|
+
|
|
21
53
|
const BACKEND_URL = 'BACKEND_URL';
|
|
22
54
|
|
|
23
55
|
const CATEGORY_STRUCTURE = 'CATEGORY_STRUCTURE';
|
|
24
56
|
|
|
25
57
|
const DEFAULT_SHOP = 'DEFAULT_SHOP';
|
|
26
58
|
|
|
27
|
-
const ES_CONFIG = 'ES_CONFIG';
|
|
28
|
-
|
|
29
59
|
const FIREBASE_APP_NAME = new InjectionToken('firebaseAppName');
|
|
30
60
|
const FIREBASE_OPTIONS = new InjectionToken('firebaseOptions');
|
|
31
61
|
|
|
@@ -143,36 +173,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
143
173
|
}]
|
|
144
174
|
}] });
|
|
145
175
|
|
|
146
|
-
class AngularElasticSeachModule {
|
|
147
|
-
static initializeApp(options) {
|
|
148
|
-
return {
|
|
149
|
-
ngModule: AngularElasticSeachModule,
|
|
150
|
-
providers: [{ provide: ES_CONFIG, useValue: options }],
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
AngularElasticSeachModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
155
|
-
AngularElasticSeachModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule });
|
|
156
|
-
AngularElasticSeachModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule, providers: [
|
|
157
|
-
{
|
|
158
|
-
provide: ProductsIndex,
|
|
159
|
-
useFactory: (configuration) => new ProductsIndex(new AxiosAdapter(configuration)),
|
|
160
|
-
deps: [ES_CONFIG],
|
|
161
|
-
},
|
|
162
|
-
] });
|
|
163
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule, decorators: [{
|
|
164
|
-
type: NgModule,
|
|
165
|
-
args: [{
|
|
166
|
-
providers: [
|
|
167
|
-
{
|
|
168
|
-
provide: ProductsIndex,
|
|
169
|
-
useFactory: (configuration) => new ProductsIndex(new AxiosAdapter(configuration)),
|
|
170
|
-
deps: [ES_CONFIG],
|
|
171
|
-
},
|
|
172
|
-
],
|
|
173
|
-
}]
|
|
174
|
-
}] });
|
|
175
|
-
|
|
176
176
|
class MobileOperationSystemCheckerHelper {
|
|
177
177
|
static isAppleDevice() {
|
|
178
178
|
return (['iPad Simulator', 'iPhone Simulator', 'iPod Simulator', 'iPad', 'iPhone', 'iPod'].includes(navigator?.platform) ||
|
|
@@ -964,7 +964,7 @@ AngularVertexSeachModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0"
|
|
|
964
964
|
AngularVertexSeachModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularVertexSeachModule, providers: [
|
|
965
965
|
{
|
|
966
966
|
provide: ProductsVertexSearch,
|
|
967
|
-
useFactory: (configuration) => new ProductsVertexSearch(new
|
|
967
|
+
useFactory: (configuration) => new ProductsVertexSearch(new VertexAxiosAdapter(configuration)),
|
|
968
968
|
deps: [VERTEX_CONFIG],
|
|
969
969
|
},
|
|
970
970
|
] });
|
|
@@ -974,7 +974,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
974
974
|
providers: [
|
|
975
975
|
{
|
|
976
976
|
provide: ProductsVertexSearch,
|
|
977
|
-
useFactory: (configuration) => new ProductsVertexSearch(new
|
|
977
|
+
useFactory: (configuration) => new ProductsVertexSearch(new VertexAxiosAdapter(configuration)),
|
|
978
978
|
deps: [VERTEX_CONFIG],
|
|
979
979
|
},
|
|
980
980
|
],
|
|
@@ -1675,15 +1675,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1675
1675
|
}] }]; } });
|
|
1676
1676
|
|
|
1677
1677
|
class CatalogService {
|
|
1678
|
-
constructor(productRepository, productStockNotificationRepository, categoryRepository, categoryStructureAdapter, shop,
|
|
1679
|
-
// private readonly productIndex: ProductsIndex,
|
|
1680
|
-
productVertexSearch) {
|
|
1678
|
+
constructor(productRepository, productStockNotificationRepository, categoryRepository, categoryStructureAdapter, shop, productSearch) {
|
|
1681
1679
|
this.productRepository = productRepository;
|
|
1682
1680
|
this.productStockNotificationRepository = productStockNotificationRepository;
|
|
1683
1681
|
this.categoryRepository = categoryRepository;
|
|
1684
1682
|
this.categoryStructureAdapter = categoryStructureAdapter;
|
|
1685
1683
|
this.shop = shop;
|
|
1686
|
-
this.
|
|
1684
|
+
this.productSearch = productSearch;
|
|
1687
1685
|
this.productsByTerm = {};
|
|
1688
1686
|
this.buildFilterQuery = ({ clubDiscount, brands, prices, gender, tags, rate, customOptions, }) => {
|
|
1689
1687
|
const filters = {};
|
|
@@ -1746,6 +1744,7 @@ class CatalogService {
|
|
|
1746
1744
|
throw new InvalidArgumentError(`It couldn't filled tags when profile is given`);
|
|
1747
1745
|
if (this.hasTerm(options) && options.filters?.customOptions)
|
|
1748
1746
|
throw new InvalidArgumentError(`It couldn't filled customOptions when term is given`);
|
|
1747
|
+
console.log('fetchProducts', options);
|
|
1749
1748
|
return await this.findCatalog(options, limits).then(({ data, count: total, maximum, minimal, distinct }) => ({
|
|
1750
1749
|
products: { data: data.map((product) => RoundProductPricesHelper.roundProductPrices(product)), total },
|
|
1751
1750
|
pages: Math.ceil(total / limits.limit),
|
|
@@ -1764,7 +1763,8 @@ class CatalogService {
|
|
|
1764
1763
|
}
|
|
1765
1764
|
async findCatalog(options, limits) {
|
|
1766
1765
|
if (this.hasTerm(options) && options.sort === 'most-relevant') {
|
|
1767
|
-
|
|
1766
|
+
// console.log('Step 1')
|
|
1767
|
+
const productsIds = await this.findCatalogIdsBySearch(options.term);
|
|
1768
1768
|
return this.findCatalogAndSortByMostRevelantByTerm(productsIds, options, limits);
|
|
1769
1769
|
}
|
|
1770
1770
|
if (this.hasCategory(options) && options.sort === 'most-relevant') {
|
|
@@ -1803,8 +1803,8 @@ class CatalogService {
|
|
|
1803
1803
|
if (profile)
|
|
1804
1804
|
return { tags: { operator: Where.LIKE, value: profile } };
|
|
1805
1805
|
if (term)
|
|
1806
|
-
return this.
|
|
1807
|
-
.search(term, 999, this.shop)
|
|
1806
|
+
return this.productSearch
|
|
1807
|
+
.search(term, 999, this.shop == Shops.GLAMSHOP ? 'female' : 'male')
|
|
1808
1808
|
.then((data) => ({ id: { operator: Where.IN, value: data.map((_source) => _source.id) } }));
|
|
1809
1809
|
}
|
|
1810
1810
|
async findCatalogAndSortByMostRevelant(mostRelevants, productIds, options, limits) {
|
|
@@ -1839,10 +1839,18 @@ class CatalogService {
|
|
|
1839
1839
|
};
|
|
1840
1840
|
}
|
|
1841
1841
|
async findCatalogAndSortByMostRevelantByTerm(productIds, options, limits) {
|
|
1842
|
+
// console.log('findCatalogAndSortByMostRevelantByTerm', this.shop, options, limits)
|
|
1843
|
+
// console.log(
|
|
1844
|
+
// 'productIds from search',
|
|
1845
|
+
// productIds.length,
|
|
1846
|
+
// 'preview -> ',
|
|
1847
|
+
// productIds.slice(limits.offset, limits.offset + limits.limit),
|
|
1848
|
+
// )
|
|
1842
1849
|
const totalResult = await this.productRepository.findCatalog({
|
|
1843
|
-
fields: ['id', 'stock'],
|
|
1850
|
+
fields: ['id', 'stock', 'gender'],
|
|
1844
1851
|
filters: {
|
|
1845
1852
|
id: { operator: Where.IN, value: productIds },
|
|
1853
|
+
published: { operator: Where.EQUALS, value: true },
|
|
1846
1854
|
...this.buildFilterQuery(options?.filters || {}),
|
|
1847
1855
|
},
|
|
1848
1856
|
options: {
|
|
@@ -1851,19 +1859,50 @@ class CatalogService {
|
|
|
1851
1859
|
distinct: ['brand'],
|
|
1852
1860
|
},
|
|
1853
1861
|
}, options?.mainGender || this.shop === Shops.MENSMARKET ? 'male' : 'female');
|
|
1862
|
+
// const productsTotalResult = totalResult.data.slice(limits.offset, limits.offset + limits.limit)
|
|
1863
|
+
// console.log(
|
|
1864
|
+
// 'productsTotalResult',
|
|
1865
|
+
// productsTotalResult.map((p) => {
|
|
1866
|
+
// return {
|
|
1867
|
+
// id: p.id,
|
|
1868
|
+
// stock: p.stock.quantity,
|
|
1869
|
+
// }
|
|
1870
|
+
// }),
|
|
1871
|
+
// )
|
|
1872
|
+
const defaultGender = options?.filters?.gender
|
|
1873
|
+
? options?.filters?.gender.at(0)
|
|
1874
|
+
: this.shop === Shops.GLAMSHOP
|
|
1875
|
+
? 'female'
|
|
1876
|
+
: 'male';
|
|
1854
1877
|
const stockData = totalResult.data.filter((product) => product.stock.quantity > 0);
|
|
1855
1878
|
const stockOut = totalResult.data.filter((product) => product.stock.quantity <= 0);
|
|
1856
|
-
const
|
|
1857
|
-
const
|
|
1879
|
+
const productIdsStockGender = productIds.filter((product) => stockData.some((result) => result.id === product && (result.gender?.includes(defaultGender) || result.gender?.includes('unisex'))));
|
|
1880
|
+
const productIdsStockNotGender = productIds.filter((product) => stockData.some((result) => result.id === product && !result.gender?.includes(defaultGender) && !result.gender?.includes('unisex')));
|
|
1881
|
+
const productIdsStock = productIdsStockGender.concat(productIdsStockNotGender);
|
|
1882
|
+
const productIdsStockOut = productIds.filter((product) => stockOut.some((result) => result.id === product));
|
|
1858
1883
|
const limitedProductId = productIdsStock
|
|
1859
1884
|
.concat(productIdsStockOut)
|
|
1860
1885
|
.slice(limits.offset, limits.offset + limits.limit);
|
|
1886
|
+
// console.log('limitedProductId', limitedProductId)
|
|
1861
1887
|
const orderedId = productIds.filter((product) => limitedProductId.includes(product));
|
|
1862
1888
|
const productResult = await this.productRepository.findCatalog({
|
|
1863
1889
|
filters: {
|
|
1864
1890
|
id: { operator: Where.IN, value: orderedId },
|
|
1865
1891
|
},
|
|
1866
1892
|
});
|
|
1893
|
+
const finalResult = limitedProductId
|
|
1894
|
+
.map((id) => productResult.data.find((product) => product.id === id))
|
|
1895
|
+
.filter(Boolean);
|
|
1896
|
+
// console.log(
|
|
1897
|
+
// 'finalResult',
|
|
1898
|
+
// finalResult.map((p) => {
|
|
1899
|
+
// return {
|
|
1900
|
+
// id: p.id,
|
|
1901
|
+
// name: p.name,
|
|
1902
|
+
// brand: p.brand,
|
|
1903
|
+
// }
|
|
1904
|
+
// }),
|
|
1905
|
+
// )
|
|
1867
1906
|
return {
|
|
1868
1907
|
data: limitedProductId.map((id) => productResult.data.find((product) => product.id === id)).filter(Boolean),
|
|
1869
1908
|
count: totalResult.count,
|
|
@@ -1872,29 +1911,15 @@ class CatalogService {
|
|
|
1872
1911
|
distinct: totalResult.distinct,
|
|
1873
1912
|
};
|
|
1874
1913
|
}
|
|
1875
|
-
|
|
1876
|
-
// if (this.productsByTerm[term]) return this.productsByTerm[term]
|
|
1877
|
-
// return (this.productsByTerm[term] = await this.productIndex
|
|
1878
|
-
// .search(term, 999, this.shop)
|
|
1879
|
-
// .then(({ hits: products }) => {
|
|
1880
|
-
// const withStock = products.filter(({ _source }) => _source.stock.quantity > 0)
|
|
1881
|
-
// const withOutStock = products.filter(({ _source }) => _source.stock.quantity <= 0)
|
|
1882
|
-
// const sorted = [...withStock, ...withOutStock]
|
|
1883
|
-
// return [...new Set(sorted.map(({ _source }) => _source.id))]
|
|
1884
|
-
// }))
|
|
1885
|
-
// }
|
|
1886
|
-
async findCatalogIdsByVertexAiSearch(term) {
|
|
1914
|
+
async findCatalogIdsBySearch(term, preview = false) {
|
|
1887
1915
|
if (this.productsByTerm[term])
|
|
1888
1916
|
return this.productsByTerm[term];
|
|
1889
|
-
return (this.productsByTerm[term] = await this.
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
const sorted = [...withStock, ...withOutStock];
|
|
1893
|
-
return [...new Set(sorted.map((products) => products.id))];
|
|
1894
|
-
}));
|
|
1917
|
+
return (this.productsByTerm[term] = await this.productSearch
|
|
1918
|
+
.search(term, 999, this.shop == Shops.GLAMSHOP ? 'female' : 'male')
|
|
1919
|
+
.then((products) => [...new Set(products.map((product) => product.id))]));
|
|
1895
1920
|
}
|
|
1896
1921
|
}
|
|
1897
|
-
CatalogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService, deps: [{ token: 'ProductRepository' }, { token: 'ProductStockNotificationRepository' }, { token: 'CategoryRepository' }, { token: CATEGORY_STRUCTURE }, { token: DEFAULT_SHOP }, { token:
|
|
1922
|
+
CatalogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService, deps: [{ token: 'ProductRepository' }, { token: 'ProductStockNotificationRepository' }, { token: 'CategoryRepository' }, { token: CATEGORY_STRUCTURE }, { token: DEFAULT_SHOP }, { token: 'ProductSearch' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1898
1923
|
CatalogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService });
|
|
1899
1924
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService, decorators: [{
|
|
1900
1925
|
type: Injectable
|
|
@@ -1913,7 +1938,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1913
1938
|
}] }, { type: i1$2.Shops, decorators: [{
|
|
1914
1939
|
type: Inject,
|
|
1915
1940
|
args: [DEFAULT_SHOP]
|
|
1916
|
-
}] }, { type:
|
|
1941
|
+
}] }, { type: undefined, decorators: [{
|
|
1942
|
+
type: Inject,
|
|
1943
|
+
args: ['ProductSearch']
|
|
1944
|
+
}] }]; } });
|
|
1917
1945
|
|
|
1918
1946
|
class CategoryService {
|
|
1919
1947
|
constructor(productRepository, categoryRepository, categoryFilterRepository, categoryStructureAdapter, shop) {
|
|
@@ -1980,11 +2008,12 @@ __decorate([
|
|
|
1980
2008
|
], CategoryWithTree.prototype, "children", void 0);
|
|
1981
2009
|
|
|
1982
2010
|
class WishlistService {
|
|
1983
|
-
constructor(wishlistRepository, shop, productRepository, categoryFilterRepository, categoryRepository, productStockNotificationRepository,
|
|
2011
|
+
constructor(wishlistRepository, shop, productRepository, categoryFilterRepository, categoryRepository, productStockNotificationRepository, productSearch) {
|
|
1984
2012
|
this.wishlistRepository = wishlistRepository;
|
|
1985
2013
|
this.shop = shop;
|
|
2014
|
+
this.productSearch = productSearch;
|
|
1986
2015
|
const categoryStructureAdapter = new NewCategoryStructureAdapter(wishlistRepository);
|
|
1987
|
-
this.catalogService = new CatalogService(productRepository, productStockNotificationRepository, categoryRepository, categoryStructureAdapter, shop,
|
|
2016
|
+
this.catalogService = new CatalogService(productRepository, productStockNotificationRepository, categoryRepository, categoryStructureAdapter, shop, productSearch);
|
|
1988
2017
|
this.categoryService = new CategoryService(productRepository, categoryRepository, categoryFilterRepository, categoryStructureAdapter, shop);
|
|
1989
2018
|
}
|
|
1990
2019
|
getCatalogService() {
|
|
@@ -2076,7 +2105,7 @@ class WishlistService {
|
|
|
2076
2105
|
return wishlist;
|
|
2077
2106
|
}
|
|
2078
2107
|
}
|
|
2079
|
-
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:
|
|
2108
|
+
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 });
|
|
2080
2109
|
WishlistService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService });
|
|
2081
2110
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, decorators: [{
|
|
2082
2111
|
type: Injectable
|
|
@@ -2098,7 +2127,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
2098
2127
|
}] }, { type: undefined, decorators: [{
|
|
2099
2128
|
type: Inject,
|
|
2100
2129
|
args: ['ProductStockNotificationRepository']
|
|
2101
|
-
}] }, { type:
|
|
2130
|
+
}] }, { type: undefined, decorators: [{
|
|
2131
|
+
type: Inject,
|
|
2132
|
+
args: ['ProductSearch']
|
|
2133
|
+
}] }]; } });
|
|
2102
2134
|
|
|
2103
2135
|
class CheckoutSubscriptionService {
|
|
2104
2136
|
constructor(checkoutSubscriptionRepository, dataPersistence, couponService) {
|
|
@@ -2403,7 +2435,7 @@ class AngularConnectModule {
|
|
|
2403
2435
|
...(isNil(options?.firebase) ? [] : [{ provide: FIREBASE_OPTIONS, useValue: options?.firebase }]),
|
|
2404
2436
|
...(isNil(options?.firebase) ? [] : [{ provide: FIREBASE_APP_NAME, useValue: nameOrConfig }]),
|
|
2405
2437
|
...(isNil(options?.elasticSearch) ? [] : [{ provide: ES_CONFIG, useValue: options.elasticSearch }]),
|
|
2406
|
-
...(isNil(options?.
|
|
2438
|
+
...(isNil(options?.vertexConfig) ? [] : [{ provide: VERTEX_CONFIG, useValue: options.vertexConfig }]),
|
|
2407
2439
|
...(isNil(options?.hasura) ? [] : [{ provide: HASURA_OPTIONS, useValue: options.hasura }]),
|
|
2408
2440
|
...(isNil(options?.backendUrl) ? [] : [{ provide: BACKEND_URL, useValue: options.backendUrl }]),
|
|
2409
2441
|
...(isNil(options?.storageBaseUrl) ? [] : [{ provide: STORAGE_BASE_URL, useValue: options.storageBaseUrl }]),
|
|
@@ -2412,8 +2444,7 @@ class AngularConnectModule {
|
|
|
2412
2444
|
}
|
|
2413
2445
|
}
|
|
2414
2446
|
AngularConnectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2415
|
-
AngularConnectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, imports: [i1$4.FirebaseAppModule, i2.StorageModule,
|
|
2416
|
-
// AngularElasticSeachModule,
|
|
2447
|
+
AngularConnectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, imports: [i1$4.FirebaseAppModule, i2.StorageModule, AngularElasticSeachModule,
|
|
2417
2448
|
AngularVertexSeachModule,
|
|
2418
2449
|
AngularFirebaseAuthModule,
|
|
2419
2450
|
AngularFirestoreModule,
|
|
@@ -2444,6 +2475,10 @@ AngularConnectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ve
|
|
|
2444
2475
|
},
|
|
2445
2476
|
deps: [Storage, STORAGE_BASE_URL],
|
|
2446
2477
|
},
|
|
2478
|
+
{
|
|
2479
|
+
provide: 'ProductSearch',
|
|
2480
|
+
useExisting: ProductsVertexSearch,
|
|
2481
|
+
},
|
|
2447
2482
|
], imports: [provideFirebaseApp((injector) => {
|
|
2448
2483
|
const appName = injector.get(FIREBASE_APP_NAME) || '[DEFAULT]';
|
|
2449
2484
|
try {
|
|
@@ -2454,7 +2489,7 @@ AngularConnectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ve
|
|
|
2454
2489
|
}
|
|
2455
2490
|
}),
|
|
2456
2491
|
provideStorage((injector) => getStorage(injector.get(FirebaseApp))),
|
|
2457
|
-
|
|
2492
|
+
AngularElasticSeachModule,
|
|
2458
2493
|
AngularVertexSeachModule,
|
|
2459
2494
|
AngularFirebaseAuthModule,
|
|
2460
2495
|
AngularFirestoreModule,
|
|
@@ -2473,7 +2508,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
2473
2508
|
}
|
|
2474
2509
|
}),
|
|
2475
2510
|
provideStorage((injector) => getStorage(injector.get(FirebaseApp))),
|
|
2476
|
-
|
|
2511
|
+
AngularElasticSeachModule,
|
|
2477
2512
|
AngularVertexSeachModule,
|
|
2478
2513
|
AngularFirebaseAuthModule,
|
|
2479
2514
|
AngularFirestoreModule,
|
|
@@ -2505,6 +2540,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
2505
2540
|
},
|
|
2506
2541
|
deps: [Storage, STORAGE_BASE_URL],
|
|
2507
2542
|
},
|
|
2543
|
+
{
|
|
2544
|
+
provide: 'ProductSearch',
|
|
2545
|
+
useExisting: ProductsVertexSearch,
|
|
2546
|
+
},
|
|
2508
2547
|
],
|
|
2509
2548
|
}]
|
|
2510
2549
|
}] });
|