@infrab4a/connect-angular 5.5.0-beta.9 → 5.5.0
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/angular-firestore.module.mjs +16 -2
- package/esm2020/angular-hasura-graphql.module.mjs +2 -24
- package/esm2020/services/catalog/category.service.mjs +2 -2
- package/esm2020/services/catalog/facades/product-catalog.facade.mjs +5 -5
- package/esm2020/services/catalog/helpers/brand-manager.helper.mjs +8 -9
- package/esm2020/services/catalog/helpers/product-fields.helper.mjs +1 -3
- package/esm2020/services/catalog/strategies/category-search.strategy.mjs +4 -4
- package/esm2020/services/catalog/strategies/profile-search.strategy.mjs +2 -2
- package/esm2020/services/catalog/strategies/term-search.strategy.mjs +4 -4
- package/esm2020/services/catalog/wishlist.service.mjs +4 -8
- package/esm2020/services/checkout.service.mjs +2 -2
- package/esm2020/services/order-product-review.service.mjs +4 -20
- package/fesm2015/infrab4a-connect-angular.mjs +52 -87
- package/fesm2015/infrab4a-connect-angular.mjs.map +1 -1
- package/fesm2020/infrab4a-connect-angular.mjs +52 -82
- package/fesm2020/infrab4a-connect-angular.mjs.map +1 -1
- package/package.json +2 -2
- package/services/catalog/facades/product-catalog.facade.d.ts +3 -3
- package/services/catalog/wishlist.service.d.ts +2 -3
- package/services/order-product-review.service.d.ts +2 -4
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { NgModule, InjectionToken, PLATFORM_ID, Injectable, Inject } from '@angular/core';
|
|
3
|
-
import * as i1$
|
|
3
|
+
import * as i1$3 from '@angular/fire/app';
|
|
4
4
|
import { FirebaseApp, provideFirebaseApp, getApp, initializeApp } from '@angular/fire/app';
|
|
5
5
|
import * as i2 from '@angular/fire/app-check';
|
|
6
6
|
import { provideAppCheck, initializeAppCheck } from '@angular/fire/app-check';
|
|
7
|
-
import * as i3 from '@angular/fire/storage';
|
|
7
|
+
import * as i3$1 from '@angular/fire/storage';
|
|
8
8
|
import { Storage, provideStorage, getStorage } from '@angular/fire/storage';
|
|
9
|
-
import * as
|
|
10
|
-
import { ProductsIndex, AxiosAdapter, Authentication, AuthenticationFirebaseAuthService, Register, RegisterFirebaseAuthService, SignOut, RecoveryPassword, ConnectFirestoreService, UserBeautyProfileFirestoreRepository, Buy2WinFirestoreRepository, CategoryFirestoreRepository, CheckoutFirestoreRepository, CheckoutSubscriptionFirestoreRepository, CouponFirestoreRepository, CampaignHashtagFirestoreRepository, CampaignDashboardFirestoreRepository, SubscriptionEditionFirestoreRepository, GroupFirestoreRepository, HomeFirestoreRepository, LeadFirestoreRepository, LegacyOrderFirestoreRepository, ShopMenuFirestoreRepository, OrderFirestoreRepository, PaymentFirestoreRepository, ProductFirestoreRepository, ShopSettingsFirestoreRepository, SubscriptionPaymentFirestoreRepository, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, SubscriptionFirestoreRepository, UserFirestoreRepository, UserAddressFirestoreRepository, UserPaymentMethodFirestoreRepository, SubscriptionMaterializationFirestoreRepository, SubscriptionSummaryFirestoreRepository, ProductVariantFirestoreRepository, OrderBlockedFirestoreRepository, LogFirestoreRepository, SequenceFirestoreRepository, CategoryHasuraGraphQLRepository, ProductHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository, ProductReviewHasuraGraphQLRepository, VariantHasuraGraphQLRepository, ProductStockNotificationHasuraGraphQLRepository, FilterOptionHasuraGraphQLRepository, FilterHasuraGraphQLRepository, CategoryCollectionChildrenHasuraGraphQLRepository, CategoryProductHasuraGraphQLRepository, WishlistHasuraGraphQLRepository, ProductErrorsHasuraGraphQLRepository,
|
|
9
|
+
import * as i3 from '@infrab4a/connect';
|
|
10
|
+
import { ProductsIndex, AxiosAdapter, Authentication, AuthenticationFirebaseAuthService, Register, RegisterFirebaseAuthService, SignOut, RecoveryPassword, ConnectFirestoreService, UserBeautyProfileFirestoreRepository, Buy2WinFirestoreRepository, CategoryFirestoreRepository, CheckoutFirestoreRepository, CheckoutSubscriptionFirestoreRepository, CouponFirestoreRepository, CampaignHashtagFirestoreRepository, CampaignDashboardFirestoreRepository, SubscriptionEditionFirestoreRepository, GroupFirestoreRepository, HomeFirestoreRepository, LeadFirestoreRepository, LegacyOrderFirestoreRepository, ShopMenuFirestoreRepository, OrderFirestoreRepository, PaymentFirestoreRepository, ProductFirestoreRepository, ShopSettingsFirestoreRepository, SubscriptionPaymentFirestoreRepository, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, SubscriptionFirestoreRepository, UserFirestoreRepository, UserAddressFirestoreRepository, UserPaymentMethodFirestoreRepository, SubscriptionMaterializationFirestoreRepository, SubscriptionSummaryFirestoreRepository, ProductVariantFirestoreRepository, OrderBlockedFirestoreRepository, LogFirestoreRepository, SequenceFirestoreRepository, BrandCategoryFirestoreRepository, CategoryHasuraGraphQLRepository, ProductHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository, ProductReviewHasuraGraphQLRepository, VariantHasuraGraphQLRepository, ProductStockNotificationHasuraGraphQLRepository, FilterOptionHasuraGraphQLRepository, FilterHasuraGraphQLRepository, CategoryCollectionChildrenHasuraGraphQLRepository, CategoryProductHasuraGraphQLRepository, WishlistHasuraGraphQLRepository, ProductErrorsHasuraGraphQLRepository, ProductsVertexSearch, VertexAxiosAdapter, isNil, NotFoundError, Checkout, pick, LineItem, Where, isEmpty, Shops, set, InvalidArgumentError, RoundProductPricesHelper, Category, WishlistLogType, PersonTypes, Wishlist, CheckoutTypes, CouponTypes, Exclusivities, OrderStatus, CheckoutSubscription, Product, RequiredArgumentError, add, ProductReview, Order, UpdateUserImage, FirebaseFileUploaderService } from '@infrab4a/connect';
|
|
11
11
|
import * as i1 from '@angular/fire/auth';
|
|
12
12
|
import { Auth, provideAuth, initializeAuth, indexedDBLocalPersistence, browserLocalPersistence, browserSessionPersistence, getAuth, getIdToken, authState } from '@angular/fire/auth';
|
|
13
13
|
import { isPlatformBrowser, isPlatformServer } from '@angular/common';
|
|
@@ -463,6 +463,13 @@ AngularFirestoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
|
|
|
463
463
|
},
|
|
464
464
|
deps: ['FirestoreOptions'],
|
|
465
465
|
},
|
|
466
|
+
{
|
|
467
|
+
provide: 'BrandCategoryRepository',
|
|
468
|
+
useFactory: (options) => {
|
|
469
|
+
return new BrandCategoryFirestoreRepository(options);
|
|
470
|
+
},
|
|
471
|
+
deps: ['FirestoreOptions'],
|
|
472
|
+
},
|
|
466
473
|
], imports: [AngularElasticSeachModule,
|
|
467
474
|
provideFirestore((injector) => {
|
|
468
475
|
const platformId = injector.get(PLATFORM_ID);
|
|
@@ -736,6 +743,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
736
743
|
},
|
|
737
744
|
deps: ['FirestoreOptions'],
|
|
738
745
|
},
|
|
746
|
+
{
|
|
747
|
+
provide: 'BrandCategoryRepository',
|
|
748
|
+
useFactory: (options) => {
|
|
749
|
+
return new BrandCategoryFirestoreRepository(options);
|
|
750
|
+
},
|
|
751
|
+
deps: ['FirestoreOptions'],
|
|
752
|
+
},
|
|
739
753
|
],
|
|
740
754
|
}]
|
|
741
755
|
}] });
|
|
@@ -905,17 +919,6 @@ AngularHasuraGraphQLModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.
|
|
|
905
919
|
provide: 'ProductErrorsRepository',
|
|
906
920
|
useExisting: ProductErrorsHasuraGraphQLRepository,
|
|
907
921
|
},
|
|
908
|
-
{
|
|
909
|
-
provide: ProductCatalogHasuraGraphQLRepository,
|
|
910
|
-
useFactory: (options) => {
|
|
911
|
-
return new ProductCatalogHasuraGraphQLRepository(options);
|
|
912
|
-
},
|
|
913
|
-
deps: ['HasuraConfig'],
|
|
914
|
-
},
|
|
915
|
-
{
|
|
916
|
-
provide: 'ProductCatalogRepository',
|
|
917
|
-
useExisting: ProductCatalogHasuraGraphQLRepository,
|
|
918
|
-
},
|
|
919
922
|
] });
|
|
920
923
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularHasuraGraphQLModule, decorators: [{
|
|
921
924
|
type: NgModule,
|
|
@@ -1075,17 +1078,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1075
1078
|
provide: 'ProductErrorsRepository',
|
|
1076
1079
|
useExisting: ProductErrorsHasuraGraphQLRepository,
|
|
1077
1080
|
},
|
|
1078
|
-
{
|
|
1079
|
-
provide: ProductCatalogHasuraGraphQLRepository,
|
|
1080
|
-
useFactory: (options) => {
|
|
1081
|
-
return new ProductCatalogHasuraGraphQLRepository(options);
|
|
1082
|
-
},
|
|
1083
|
-
deps: ['HasuraConfig'],
|
|
1084
|
-
},
|
|
1085
|
-
{
|
|
1086
|
-
provide: 'ProductCatalogRepository',
|
|
1087
|
-
useExisting: ProductCatalogHasuraGraphQLRepository,
|
|
1088
|
-
},
|
|
1089
1081
|
],
|
|
1090
1082
|
}]
|
|
1091
1083
|
}] });
|
|
@@ -1219,7 +1211,7 @@ ConfigurationFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", vers
|
|
|
1219
1211
|
ConfigurationFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ConfigurationFacade });
|
|
1220
1212
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ConfigurationFacade, decorators: [{
|
|
1221
1213
|
type: Injectable
|
|
1222
|
-
}], ctorParameters: function () { return [{ type:
|
|
1214
|
+
}], ctorParameters: function () { return [{ type: i3.Shops, decorators: [{
|
|
1223
1215
|
type: Inject,
|
|
1224
1216
|
args: [DEFAULT_SHOP]
|
|
1225
1217
|
}] }, { type: undefined, decorators: [{
|
|
@@ -1300,7 +1292,7 @@ class CheckoutService {
|
|
|
1300
1292
|
})), concatMap(() => this.getCheckout()));
|
|
1301
1293
|
}
|
|
1302
1294
|
createOrder(checkoutPayload, paymentProvider, applicationVersion) {
|
|
1303
|
-
return this.dependenciesFacade.httpClient.post(`${this.checkoutUrl}/
|
|
1295
|
+
return this.dependenciesFacade.httpClient.post(`${this.checkoutUrl}/checkout`, {
|
|
1304
1296
|
data: {
|
|
1305
1297
|
...checkoutPayload,
|
|
1306
1298
|
applicationVersion,
|
|
@@ -1568,12 +1560,12 @@ class CategorySearchStrategy {
|
|
|
1568
1560
|
distinct: ['brand'],
|
|
1569
1561
|
},
|
|
1570
1562
|
};
|
|
1571
|
-
return productCatalog.
|
|
1563
|
+
return productCatalog.productRepository.findCatalog(repoParams, null, optionsCache);
|
|
1572
1564
|
}
|
|
1573
1565
|
async getProductIds(category, filters, optionsCache) {
|
|
1574
1566
|
const productCatalog = this.repositoryService.getProductCatalog();
|
|
1575
1567
|
const filterHelper = this.helpersService.getFilterHelper();
|
|
1576
|
-
return productCatalog.
|
|
1568
|
+
return productCatalog.productRepository
|
|
1577
1569
|
.findCatalog({
|
|
1578
1570
|
fields: ['id'],
|
|
1579
1571
|
filters: {
|
|
@@ -1589,7 +1581,7 @@ class CategorySearchStrategy {
|
|
|
1589
1581
|
const filterHelper = this.helpersService.getFilterHelper();
|
|
1590
1582
|
const sortHelper = this.helpersService.getSortHelper();
|
|
1591
1583
|
const mostRelevantProductsIds = [...new Set(mostRelevants.concat(productIds))];
|
|
1592
|
-
const totalResult = await productCatalog.
|
|
1584
|
+
const totalResult = await productCatalog.productRepository.findCatalog({
|
|
1593
1585
|
fields,
|
|
1594
1586
|
filters: {
|
|
1595
1587
|
id: { operator: Where.IN, value: mostRelevantProductsIds },
|
|
@@ -1657,7 +1649,7 @@ class ProfileSearchStrategy {
|
|
|
1657
1649
|
distinct: ['brand'],
|
|
1658
1650
|
},
|
|
1659
1651
|
};
|
|
1660
|
-
return productCatalog.
|
|
1652
|
+
return productCatalog.productRepository.findCatalog(repoParams, mainGender || (shop === Shops.MENSMARKET ? 'male' : 'female'), optionsCache);
|
|
1661
1653
|
}
|
|
1662
1654
|
}
|
|
1663
1655
|
ProfileSearchStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ProfileSearchStrategy, deps: [{ token: CatalogRepositoryService }, { token: CatalogHelpersService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -1700,7 +1692,7 @@ class TermSearchStrategy {
|
|
|
1700
1692
|
const { productIds, filters, shop, mainGender } = params;
|
|
1701
1693
|
const productCatalog = this.repositoryService.getProductCatalog();
|
|
1702
1694
|
const filterHelper = this.helpersService.getFilterHelper();
|
|
1703
|
-
const totalResult = await productCatalog.
|
|
1695
|
+
const totalResult = await productCatalog.productRepository.findCatalog({
|
|
1704
1696
|
fields: ['id', 'stock', 'gender'],
|
|
1705
1697
|
filters: {
|
|
1706
1698
|
id: { operator: Where.IN, value: productIds },
|
|
@@ -1725,7 +1717,7 @@ class TermSearchStrategy {
|
|
|
1725
1717
|
const { productIds, filters, limits, shop, mainGender, fields } = params;
|
|
1726
1718
|
const productCatalog = this.repositoryService.getProductCatalog();
|
|
1727
1719
|
const filterHelper = this.helpersService.getFilterHelper();
|
|
1728
|
-
return productCatalog.
|
|
1720
|
+
return productCatalog.productRepository.findCatalog({
|
|
1729
1721
|
fields,
|
|
1730
1722
|
filters: {
|
|
1731
1723
|
id: { operator: Where.IN, value: productIds },
|
|
@@ -1755,7 +1747,7 @@ class TermSearchStrategy {
|
|
|
1755
1747
|
async getDetailedProducts(orderedId, totalResult, fieldsHelper) {
|
|
1756
1748
|
const productCatalog = this.repositoryService.getProductCatalog();
|
|
1757
1749
|
const fields = fieldsHelper.getStandardFields();
|
|
1758
|
-
const productResult = await productCatalog.
|
|
1750
|
+
const productResult = await productCatalog.productRepository.findCatalog({
|
|
1759
1751
|
filters: {
|
|
1760
1752
|
id: { operator: Where.IN, value: orderedId },
|
|
1761
1753
|
},
|
|
@@ -1813,7 +1805,7 @@ CatalogServiceFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", ver
|
|
|
1813
1805
|
CatalogServiceFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogServiceFacade });
|
|
1814
1806
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogServiceFacade, decorators: [{
|
|
1815
1807
|
type: Injectable
|
|
1816
|
-
}], ctorParameters: function () { return [{ type: CatalogHelpersService }, { type: CatalogStrategiesFacade }, { type:
|
|
1808
|
+
}], ctorParameters: function () { return [{ type: CatalogHelpersService }, { type: CatalogStrategiesFacade }, { type: i3.Shops, decorators: [{
|
|
1817
1809
|
type: Inject,
|
|
1818
1810
|
args: [DEFAULT_SHOP]
|
|
1819
1811
|
}] }]; } });
|
|
@@ -1843,7 +1835,7 @@ class CategoryService {
|
|
|
1843
1835
|
this.shop = shop;
|
|
1844
1836
|
}
|
|
1845
1837
|
async fetchBrands(category, options, optionsCache) {
|
|
1846
|
-
const brands = await this.productCatalog.
|
|
1838
|
+
const brands = await this.productCatalog.productRepository
|
|
1847
1839
|
.findCatalog({
|
|
1848
1840
|
filters: await this.productCatalog.categoryStructureAdapter.buildProductFilterByCategory(category),
|
|
1849
1841
|
fields: ['brand'],
|
|
@@ -1866,24 +1858,24 @@ CategoryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version:
|
|
|
1866
1858
|
CategoryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryService });
|
|
1867
1859
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryService, decorators: [{
|
|
1868
1860
|
type: Injectable
|
|
1869
|
-
}], ctorParameters: function () { return [{ type: CategoryRepositoryFacade }, { type: ProductCatalogFacade }, { type:
|
|
1861
|
+
}], ctorParameters: function () { return [{ type: CategoryRepositoryFacade }, { type: ProductCatalogFacade }, { type: i3.Shops, decorators: [{
|
|
1870
1862
|
type: Inject,
|
|
1871
1863
|
args: [DEFAULT_SHOP]
|
|
1872
1864
|
}] }]; } });
|
|
1873
1865
|
|
|
1874
1866
|
class ProductCatalogFacade {
|
|
1875
|
-
constructor(
|
|
1876
|
-
this.
|
|
1867
|
+
constructor(productRepository, categoryStructureAdapter) {
|
|
1868
|
+
this.productRepository = productRepository;
|
|
1877
1869
|
this.categoryStructureAdapter = categoryStructureAdapter;
|
|
1878
1870
|
}
|
|
1879
1871
|
}
|
|
1880
|
-
ProductCatalogFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ProductCatalogFacade, deps: [{ token: '
|
|
1872
|
+
ProductCatalogFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ProductCatalogFacade, deps: [{ token: 'ProductRepository' }, { token: CATEGORY_STRUCTURE }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1881
1873
|
ProductCatalogFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ProductCatalogFacade });
|
|
1882
1874
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ProductCatalogFacade, decorators: [{
|
|
1883
1875
|
type: Injectable
|
|
1884
1876
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1885
1877
|
type: Inject,
|
|
1886
|
-
args: ['
|
|
1878
|
+
args: ['ProductRepository']
|
|
1887
1879
|
}] }, { type: undefined, decorators: [{
|
|
1888
1880
|
type: Inject,
|
|
1889
1881
|
args: [CATEGORY_STRUCTURE]
|
|
@@ -1904,7 +1896,7 @@ CategoryServiceFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", ve
|
|
|
1904
1896
|
CategoryServiceFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryServiceFacade });
|
|
1905
1897
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryServiceFacade, decorators: [{
|
|
1906
1898
|
type: Injectable
|
|
1907
|
-
}], ctorParameters: function () { return [{ type: CategoryRepositoryFacade }, { type: ProductCatalogFacade }, { type:
|
|
1899
|
+
}], ctorParameters: function () { return [{ type: CategoryRepositoryFacade }, { type: ProductCatalogFacade }, { type: i3.Shops, decorators: [{
|
|
1908
1900
|
type: Inject,
|
|
1909
1901
|
args: [DEFAULT_SHOP]
|
|
1910
1902
|
}] }]; } });
|
|
@@ -1920,13 +1912,7 @@ class BrandManagerHelper {
|
|
|
1920
1912
|
if (isEmpty(brands) && options.filters) {
|
|
1921
1913
|
delete options.filters.brands;
|
|
1922
1914
|
}
|
|
1923
|
-
|
|
1924
|
-
this.brandsList[indexKey] = await this.fetchBrandsOnly(options);
|
|
1925
|
-
}
|
|
1926
|
-
else {
|
|
1927
|
-
this.brandsList[indexKey] = this.brandsList[indexKey] || brands;
|
|
1928
|
-
}
|
|
1929
|
-
// this.brandsList[indexKey] = this.brandsList[indexKey] || brands || (await this.fetchBrandsOnly(options))
|
|
1915
|
+
this.brandsList[indexKey] = this.brandsList[indexKey] || brands || (await this.fetchBrandsOnly(options));
|
|
1930
1916
|
this.brandsList[indexKey] = this.brandsList[indexKey].filter(Boolean);
|
|
1931
1917
|
if (options.filters) {
|
|
1932
1918
|
options.filters = {
|
|
@@ -1948,10 +1934,15 @@ class BrandManagerHelper {
|
|
|
1948
1934
|
return '';
|
|
1949
1935
|
}
|
|
1950
1936
|
async fetchBrandsOnly(options) {
|
|
1951
|
-
|
|
1937
|
+
let filters = {};
|
|
1938
|
+
if (options.category) {
|
|
1939
|
+
filters = await this.productCatalog.categoryStructureAdapter.buildProductFilterByCategory(options.category);
|
|
1940
|
+
}
|
|
1941
|
+
return this.productCatalog.productRepository
|
|
1952
1942
|
.findCatalog({
|
|
1953
1943
|
fields: ['id'],
|
|
1954
1944
|
filters: {
|
|
1945
|
+
...filters,
|
|
1955
1946
|
published: { operator: Where.EQUALS, value: true },
|
|
1956
1947
|
},
|
|
1957
1948
|
options: {
|
|
@@ -2065,7 +2056,6 @@ class ProductFieldsHelper {
|
|
|
2065
2056
|
'name',
|
|
2066
2057
|
'slug',
|
|
2067
2058
|
'images',
|
|
2068
|
-
'imagesCard',
|
|
2069
2059
|
'miniatures',
|
|
2070
2060
|
'price',
|
|
2071
2061
|
'stock',
|
|
@@ -2088,7 +2078,6 @@ class ProductFieldsHelper {
|
|
|
2088
2078
|
'label',
|
|
2089
2079
|
'outlet',
|
|
2090
2080
|
'group',
|
|
2091
|
-
'variantSlug',
|
|
2092
2081
|
];
|
|
2093
2082
|
}
|
|
2094
2083
|
}
|
|
@@ -2286,7 +2275,7 @@ CatalogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version:
|
|
|
2286
2275
|
CatalogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService });
|
|
2287
2276
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService, decorators: [{
|
|
2288
2277
|
type: Injectable
|
|
2289
|
-
}], ctorParameters: function () { return [{ type: CatalogSearchContext }, { type: CatalogHelpersService }, { type:
|
|
2278
|
+
}], ctorParameters: function () { return [{ type: CatalogSearchContext }, { type: CatalogHelpersService }, { type: i3.Shops, decorators: [{
|
|
2290
2279
|
type: Inject,
|
|
2291
2280
|
args: [DEFAULT_SHOP]
|
|
2292
2281
|
}] }]; } });
|
|
@@ -2310,10 +2299,9 @@ __decorate([
|
|
|
2310
2299
|
], CategoryWithTree.prototype, "children", void 0);
|
|
2311
2300
|
|
|
2312
2301
|
class WishlistService {
|
|
2313
|
-
constructor(wishlistRepository, productRepository,
|
|
2302
|
+
constructor(wishlistRepository, productRepository, logRepository, shop) {
|
|
2314
2303
|
this.wishlistRepository = wishlistRepository;
|
|
2315
2304
|
this.productRepository = productRepository;
|
|
2316
|
-
this.productCatalogRepository = productCatalogRepository;
|
|
2317
2305
|
this.logRepository = logRepository;
|
|
2318
2306
|
this.shop = shop;
|
|
2319
2307
|
}
|
|
@@ -2464,7 +2452,7 @@ class WishlistService {
|
|
|
2464
2452
|
.then((res) => res.data.at(0));
|
|
2465
2453
|
}
|
|
2466
2454
|
async findProductById(id) {
|
|
2467
|
-
return this.
|
|
2455
|
+
return this.productRepository
|
|
2468
2456
|
.find({
|
|
2469
2457
|
fields: ['id', 'sku', 'EAN', 'name', 'brand'],
|
|
2470
2458
|
filters: {
|
|
@@ -2541,7 +2529,7 @@ class WishlistService {
|
|
|
2541
2529
|
};
|
|
2542
2530
|
}
|
|
2543
2531
|
}
|
|
2544
|
-
WishlistService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, deps: [{ token: 'WishlistRepository' }, { token: 'ProductRepository' }, { token: '
|
|
2532
|
+
WishlistService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, deps: [{ token: 'WishlistRepository' }, { token: 'ProductRepository' }, { token: 'LogRepository' }, { token: DEFAULT_SHOP }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2545
2533
|
WishlistService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService });
|
|
2546
2534
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, decorators: [{
|
|
2547
2535
|
type: Injectable
|
|
@@ -2551,13 +2539,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
2551
2539
|
}] }, { type: undefined, decorators: [{
|
|
2552
2540
|
type: Inject,
|
|
2553
2541
|
args: ['ProductRepository']
|
|
2554
|
-
}] }, { type: undefined, decorators: [{
|
|
2555
|
-
type: Inject,
|
|
2556
|
-
args: ['ProductCatalogRepository']
|
|
2557
2542
|
}] }, { type: undefined, decorators: [{
|
|
2558
2543
|
type: Inject,
|
|
2559
2544
|
args: ['LogRepository']
|
|
2560
|
-
}] }, { type:
|
|
2545
|
+
}] }, { type: i3.Shops, decorators: [{
|
|
2561
2546
|
type: Inject,
|
|
2562
2547
|
args: [DEFAULT_SHOP]
|
|
2563
2548
|
}] }]; } });
|
|
@@ -3022,11 +3007,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
3022
3007
|
}], ctorParameters: function () { return [{ type: HomeShopRepositoriesFacade }, { type: ConfigurationFacade }]; } });
|
|
3023
3008
|
|
|
3024
3009
|
class OrderProductReviewService {
|
|
3025
|
-
constructor(orderRepository, productReviewRepository, variantRepository
|
|
3010
|
+
constructor(orderRepository, productReviewRepository, variantRepository) {
|
|
3026
3011
|
this.orderRepository = orderRepository;
|
|
3027
3012
|
this.productReviewRepository = productReviewRepository;
|
|
3028
3013
|
this.variantRepository = variantRepository;
|
|
3029
|
-
this.defaultShop = defaultShop;
|
|
3030
3014
|
}
|
|
3031
3015
|
async getPendingReviewsByEmail(email) {
|
|
3032
3016
|
const products = [];
|
|
@@ -3050,7 +3034,6 @@ class OrderProductReviewService {
|
|
|
3050
3034
|
user: {
|
|
3051
3035
|
email: email,
|
|
3052
3036
|
},
|
|
3053
|
-
shop: this.defaultShop,
|
|
3054
3037
|
status: OrderStatus.ENTREGUE,
|
|
3055
3038
|
createdAt: {
|
|
3056
3039
|
operator: Where.GTE,
|
|
@@ -3113,22 +3096,12 @@ class OrderProductReviewService {
|
|
|
3113
3096
|
orderId: review.orderId,
|
|
3114
3097
|
}));
|
|
3115
3098
|
}
|
|
3116
|
-
async verifyReviewProductAndOrder(orderId, productId) {
|
|
3117
|
-
return this.productReviewRepository
|
|
3118
|
-
.find({
|
|
3119
|
-
filters: {
|
|
3120
|
-
orderId: { operator: Where.IN, value: orderId },
|
|
3121
|
-
productId: productId,
|
|
3122
|
-
},
|
|
3123
|
-
})
|
|
3124
|
-
.then((res) => res.data);
|
|
3125
|
-
}
|
|
3126
3099
|
}
|
|
3127
|
-
OrderProductReviewService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderProductReviewService, deps: [{ token: 'OrderRepository' }, { token: 'ProductReviewRepository' }, { token: 'VariantRepository' }
|
|
3100
|
+
OrderProductReviewService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderProductReviewService, deps: [{ token: 'OrderRepository' }, { token: 'ProductReviewRepository' }, { token: 'VariantRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3128
3101
|
OrderProductReviewService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderProductReviewService });
|
|
3129
3102
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderProductReviewService, decorators: [{
|
|
3130
3103
|
type: Injectable
|
|
3131
|
-
}], ctorParameters: function () { return [{ type:
|
|
3104
|
+
}], ctorParameters: function () { return [{ type: i3.OrderFirestoreRepository, decorators: [{
|
|
3132
3105
|
type: Inject,
|
|
3133
3106
|
args: ['OrderRepository']
|
|
3134
3107
|
}] }, { type: undefined, decorators: [{
|
|
@@ -3137,9 +3110,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
3137
3110
|
}] }, { type: undefined, decorators: [{
|
|
3138
3111
|
type: Inject,
|
|
3139
3112
|
args: ['VariantRepository']
|
|
3140
|
-
}] }, { type: i1$3.Shops, decorators: [{
|
|
3141
|
-
type: Inject,
|
|
3142
|
-
args: [DEFAULT_SHOP]
|
|
3143
3113
|
}] }]; } });
|
|
3144
3114
|
|
|
3145
3115
|
class OrderService {
|
|
@@ -3159,7 +3129,7 @@ OrderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "1
|
|
|
3159
3129
|
OrderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService });
|
|
3160
3130
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService, decorators: [{
|
|
3161
3131
|
type: Injectable
|
|
3162
|
-
}], ctorParameters: function () { return [{ type: i1$1.Firestore }, { type:
|
|
3132
|
+
}], ctorParameters: function () { return [{ type: i1$1.Firestore }, { type: i3.OrderFirestoreRepository, decorators: [{
|
|
3163
3133
|
type: Inject,
|
|
3164
3134
|
args: ['OrderRepository']
|
|
3165
3135
|
}] }]; } });
|
|
@@ -3206,7 +3176,7 @@ class AngularConnectModule {
|
|
|
3206
3176
|
}
|
|
3207
3177
|
}
|
|
3208
3178
|
AngularConnectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3209
|
-
AngularConnectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, imports: [i1$
|
|
3179
|
+
AngularConnectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, imports: [i1$3.FirebaseAppModule, i2.AppCheckModule, i3$1.StorageModule, AngularElasticSeachModule,
|
|
3210
3180
|
AngularVertexSeachModule,
|
|
3211
3181
|
AngularFirebaseAuthModule,
|
|
3212
3182
|
AngularFirestoreModule,
|