@infrab4a/connect-angular 5.5.0-beta.18 → 5.5.0-beta.20
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 +2 -2
- package/esm2020/services/catalog/helpers/product-fields.helper.mjs +1 -4
- 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 +5 -8
- package/esm2020/services/catalog/strategies/types/strategy-params.type.mjs +1 -1
- package/esm2020/services/catalog/wishlist.service.mjs +4 -8
- package/esm2020/services/order-product-review.service.mjs +4 -20
- package/fesm2015/infrab4a-connect-angular.mjs +52 -81
- package/fesm2015/infrab4a-connect-angular.mjs.map +1 -1
- package/fesm2020/infrab4a-connect-angular.mjs +46 -79
- 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/strategies/types/strategy-params.type.d.ts +0 -1
- 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: [{
|
|
@@ -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 });
|
|
@@ -1693,7 +1685,6 @@ class TermSearchStrategy {
|
|
|
1693
1685
|
limits,
|
|
1694
1686
|
shop,
|
|
1695
1687
|
mainGender,
|
|
1696
|
-
sort,
|
|
1697
1688
|
fields: this.helpersService.getFieldsHelper().getStandardFields(),
|
|
1698
1689
|
});
|
|
1699
1690
|
}
|
|
@@ -1701,7 +1692,7 @@ class TermSearchStrategy {
|
|
|
1701
1692
|
const { productIds, filters, shop, mainGender } = params;
|
|
1702
1693
|
const productCatalog = this.repositoryService.getProductCatalog();
|
|
1703
1694
|
const filterHelper = this.helpersService.getFilterHelper();
|
|
1704
|
-
const totalResult = await productCatalog.
|
|
1695
|
+
const totalResult = await productCatalog.productRepository.findCatalog({
|
|
1705
1696
|
fields: ['id', 'stock', 'gender'],
|
|
1706
1697
|
filters: {
|
|
1707
1698
|
id: { operator: Where.IN, value: productIds },
|
|
@@ -1723,11 +1714,10 @@ class TermSearchStrategy {
|
|
|
1723
1714
|
});
|
|
1724
1715
|
}
|
|
1725
1716
|
async searchDefault(params) {
|
|
1726
|
-
const { productIds, filters, limits,
|
|
1717
|
+
const { productIds, filters, limits, shop, mainGender, fields } = params;
|
|
1727
1718
|
const productCatalog = this.repositoryService.getProductCatalog();
|
|
1728
1719
|
const filterHelper = this.helpersService.getFilterHelper();
|
|
1729
|
-
|
|
1730
|
-
return productCatalog.productCatalogRepository.findCatalog({
|
|
1720
|
+
return productCatalog.productRepository.findCatalog({
|
|
1731
1721
|
fields,
|
|
1732
1722
|
filters: {
|
|
1733
1723
|
id: { operator: Where.IN, value: productIds },
|
|
@@ -1735,7 +1725,6 @@ class TermSearchStrategy {
|
|
|
1735
1725
|
...filterHelper.buildFilterQuery(filters || {}),
|
|
1736
1726
|
},
|
|
1737
1727
|
limits,
|
|
1738
|
-
...(sort ? { orderBy: sortHelper.buildSortQuery(sort) } : {}),
|
|
1739
1728
|
options: {
|
|
1740
1729
|
minimal: ['price'],
|
|
1741
1730
|
maximum: ['price'],
|
|
@@ -1758,7 +1747,7 @@ class TermSearchStrategy {
|
|
|
1758
1747
|
async getDetailedProducts(orderedId, totalResult, fieldsHelper) {
|
|
1759
1748
|
const productCatalog = this.repositoryService.getProductCatalog();
|
|
1760
1749
|
const fields = fieldsHelper.getStandardFields();
|
|
1761
|
-
const productResult = await productCatalog.
|
|
1750
|
+
const productResult = await productCatalog.productRepository.findCatalog({
|
|
1762
1751
|
filters: {
|
|
1763
1752
|
id: { operator: Where.IN, value: orderedId },
|
|
1764
1753
|
},
|
|
@@ -1816,7 +1805,7 @@ CatalogServiceFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", ver
|
|
|
1816
1805
|
CatalogServiceFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogServiceFacade });
|
|
1817
1806
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogServiceFacade, decorators: [{
|
|
1818
1807
|
type: Injectable
|
|
1819
|
-
}], ctorParameters: function () { return [{ type: CatalogHelpersService }, { type: CatalogStrategiesFacade }, { type:
|
|
1808
|
+
}], ctorParameters: function () { return [{ type: CatalogHelpersService }, { type: CatalogStrategiesFacade }, { type: i3.Shops, decorators: [{
|
|
1820
1809
|
type: Inject,
|
|
1821
1810
|
args: [DEFAULT_SHOP]
|
|
1822
1811
|
}] }]; } });
|
|
@@ -1846,7 +1835,7 @@ class CategoryService {
|
|
|
1846
1835
|
this.shop = shop;
|
|
1847
1836
|
}
|
|
1848
1837
|
async fetchBrands(category, options, optionsCache) {
|
|
1849
|
-
const brands = await this.productCatalog.
|
|
1838
|
+
const brands = await this.productCatalog.productRepository
|
|
1850
1839
|
.findCatalog({
|
|
1851
1840
|
filters: await this.productCatalog.categoryStructureAdapter.buildProductFilterByCategory(category),
|
|
1852
1841
|
fields: ['brand'],
|
|
@@ -1869,24 +1858,24 @@ CategoryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version:
|
|
|
1869
1858
|
CategoryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryService });
|
|
1870
1859
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryService, decorators: [{
|
|
1871
1860
|
type: Injectable
|
|
1872
|
-
}], ctorParameters: function () { return [{ type: CategoryRepositoryFacade }, { type: ProductCatalogFacade }, { type:
|
|
1861
|
+
}], ctorParameters: function () { return [{ type: CategoryRepositoryFacade }, { type: ProductCatalogFacade }, { type: i3.Shops, decorators: [{
|
|
1873
1862
|
type: Inject,
|
|
1874
1863
|
args: [DEFAULT_SHOP]
|
|
1875
1864
|
}] }]; } });
|
|
1876
1865
|
|
|
1877
1866
|
class ProductCatalogFacade {
|
|
1878
|
-
constructor(
|
|
1879
|
-
this.
|
|
1867
|
+
constructor(productRepository, categoryStructureAdapter) {
|
|
1868
|
+
this.productRepository = productRepository;
|
|
1880
1869
|
this.categoryStructureAdapter = categoryStructureAdapter;
|
|
1881
1870
|
}
|
|
1882
1871
|
}
|
|
1883
|
-
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 });
|
|
1884
1873
|
ProductCatalogFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ProductCatalogFacade });
|
|
1885
1874
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ProductCatalogFacade, decorators: [{
|
|
1886
1875
|
type: Injectable
|
|
1887
1876
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1888
1877
|
type: Inject,
|
|
1889
|
-
args: ['
|
|
1878
|
+
args: ['ProductRepository']
|
|
1890
1879
|
}] }, { type: undefined, decorators: [{
|
|
1891
1880
|
type: Inject,
|
|
1892
1881
|
args: [CATEGORY_STRUCTURE]
|
|
@@ -1907,7 +1896,7 @@ CategoryServiceFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", ve
|
|
|
1907
1896
|
CategoryServiceFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryServiceFacade });
|
|
1908
1897
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryServiceFacade, decorators: [{
|
|
1909
1898
|
type: Injectable
|
|
1910
|
-
}], ctorParameters: function () { return [{ type: CategoryRepositoryFacade }, { type: ProductCatalogFacade }, { type:
|
|
1899
|
+
}], ctorParameters: function () { return [{ type: CategoryRepositoryFacade }, { type: ProductCatalogFacade }, { type: i3.Shops, decorators: [{
|
|
1911
1900
|
type: Inject,
|
|
1912
1901
|
args: [DEFAULT_SHOP]
|
|
1913
1902
|
}] }]; } });
|
|
@@ -1949,7 +1938,7 @@ class BrandManagerHelper {
|
|
|
1949
1938
|
if (options.category) {
|
|
1950
1939
|
filters = await this.productCatalog.categoryStructureAdapter.buildProductFilterByCategory(options.category);
|
|
1951
1940
|
}
|
|
1952
|
-
return this.productCatalog.
|
|
1941
|
+
return this.productCatalog.productRepository
|
|
1953
1942
|
.findCatalog({
|
|
1954
1943
|
fields: ['id'],
|
|
1955
1944
|
filters: {
|
|
@@ -2067,7 +2056,6 @@ class ProductFieldsHelper {
|
|
|
2067
2056
|
'name',
|
|
2068
2057
|
'slug',
|
|
2069
2058
|
'images',
|
|
2070
|
-
'imagesCard',
|
|
2071
2059
|
'miniatures',
|
|
2072
2060
|
'price',
|
|
2073
2061
|
'stock',
|
|
@@ -2090,8 +2078,6 @@ class ProductFieldsHelper {
|
|
|
2090
2078
|
'label',
|
|
2091
2079
|
'outlet',
|
|
2092
2080
|
'group',
|
|
2093
|
-
'variantSlug',
|
|
2094
|
-
'filters',
|
|
2095
2081
|
];
|
|
2096
2082
|
}
|
|
2097
2083
|
}
|
|
@@ -2289,7 +2275,7 @@ CatalogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version:
|
|
|
2289
2275
|
CatalogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService });
|
|
2290
2276
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService, decorators: [{
|
|
2291
2277
|
type: Injectable
|
|
2292
|
-
}], ctorParameters: function () { return [{ type: CatalogSearchContext }, { type: CatalogHelpersService }, { type:
|
|
2278
|
+
}], ctorParameters: function () { return [{ type: CatalogSearchContext }, { type: CatalogHelpersService }, { type: i3.Shops, decorators: [{
|
|
2293
2279
|
type: Inject,
|
|
2294
2280
|
args: [DEFAULT_SHOP]
|
|
2295
2281
|
}] }]; } });
|
|
@@ -2313,10 +2299,9 @@ __decorate([
|
|
|
2313
2299
|
], CategoryWithTree.prototype, "children", void 0);
|
|
2314
2300
|
|
|
2315
2301
|
class WishlistService {
|
|
2316
|
-
constructor(wishlistRepository, productRepository,
|
|
2302
|
+
constructor(wishlistRepository, productRepository, logRepository, shop) {
|
|
2317
2303
|
this.wishlistRepository = wishlistRepository;
|
|
2318
2304
|
this.productRepository = productRepository;
|
|
2319
|
-
this.productCatalogRepository = productCatalogRepository;
|
|
2320
2305
|
this.logRepository = logRepository;
|
|
2321
2306
|
this.shop = shop;
|
|
2322
2307
|
}
|
|
@@ -2467,7 +2452,7 @@ class WishlistService {
|
|
|
2467
2452
|
.then((res) => res.data.at(0));
|
|
2468
2453
|
}
|
|
2469
2454
|
async findProductById(id) {
|
|
2470
|
-
return this.
|
|
2455
|
+
return this.productRepository
|
|
2471
2456
|
.find({
|
|
2472
2457
|
fields: ['id', 'sku', 'EAN', 'name', 'brand'],
|
|
2473
2458
|
filters: {
|
|
@@ -2544,7 +2529,7 @@ class WishlistService {
|
|
|
2544
2529
|
};
|
|
2545
2530
|
}
|
|
2546
2531
|
}
|
|
2547
|
-
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 });
|
|
2548
2533
|
WishlistService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService });
|
|
2549
2534
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, decorators: [{
|
|
2550
2535
|
type: Injectable
|
|
@@ -2554,13 +2539,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
2554
2539
|
}] }, { type: undefined, decorators: [{
|
|
2555
2540
|
type: Inject,
|
|
2556
2541
|
args: ['ProductRepository']
|
|
2557
|
-
}] }, { type: undefined, decorators: [{
|
|
2558
|
-
type: Inject,
|
|
2559
|
-
args: ['ProductCatalogRepository']
|
|
2560
2542
|
}] }, { type: undefined, decorators: [{
|
|
2561
2543
|
type: Inject,
|
|
2562
2544
|
args: ['LogRepository']
|
|
2563
|
-
}] }, { type:
|
|
2545
|
+
}] }, { type: i3.Shops, decorators: [{
|
|
2564
2546
|
type: Inject,
|
|
2565
2547
|
args: [DEFAULT_SHOP]
|
|
2566
2548
|
}] }]; } });
|
|
@@ -3025,11 +3007,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
3025
3007
|
}], ctorParameters: function () { return [{ type: HomeShopRepositoriesFacade }, { type: ConfigurationFacade }]; } });
|
|
3026
3008
|
|
|
3027
3009
|
class OrderProductReviewService {
|
|
3028
|
-
constructor(orderRepository, productReviewRepository, variantRepository
|
|
3010
|
+
constructor(orderRepository, productReviewRepository, variantRepository) {
|
|
3029
3011
|
this.orderRepository = orderRepository;
|
|
3030
3012
|
this.productReviewRepository = productReviewRepository;
|
|
3031
3013
|
this.variantRepository = variantRepository;
|
|
3032
|
-
this.defaultShop = defaultShop;
|
|
3033
3014
|
}
|
|
3034
3015
|
async getPendingReviewsByEmail(email) {
|
|
3035
3016
|
const products = [];
|
|
@@ -3053,7 +3034,6 @@ class OrderProductReviewService {
|
|
|
3053
3034
|
user: {
|
|
3054
3035
|
email: email,
|
|
3055
3036
|
},
|
|
3056
|
-
shop: this.defaultShop,
|
|
3057
3037
|
status: OrderStatus.ENTREGUE,
|
|
3058
3038
|
createdAt: {
|
|
3059
3039
|
operator: Where.GTE,
|
|
@@ -3116,22 +3096,12 @@ class OrderProductReviewService {
|
|
|
3116
3096
|
orderId: review.orderId,
|
|
3117
3097
|
}));
|
|
3118
3098
|
}
|
|
3119
|
-
async verifyReviewProductAndOrder(orderId, productId) {
|
|
3120
|
-
return this.productReviewRepository
|
|
3121
|
-
.find({
|
|
3122
|
-
filters: {
|
|
3123
|
-
orderId: { operator: Where.IN, value: orderId },
|
|
3124
|
-
productId: productId,
|
|
3125
|
-
},
|
|
3126
|
-
})
|
|
3127
|
-
.then((res) => res.data);
|
|
3128
|
-
}
|
|
3129
3099
|
}
|
|
3130
|
-
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 });
|
|
3131
3101
|
OrderProductReviewService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderProductReviewService });
|
|
3132
3102
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderProductReviewService, decorators: [{
|
|
3133
3103
|
type: Injectable
|
|
3134
|
-
}], ctorParameters: function () { return [{ type:
|
|
3104
|
+
}], ctorParameters: function () { return [{ type: i3.OrderFirestoreRepository, decorators: [{
|
|
3135
3105
|
type: Inject,
|
|
3136
3106
|
args: ['OrderRepository']
|
|
3137
3107
|
}] }, { type: undefined, decorators: [{
|
|
@@ -3140,9 +3110,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
3140
3110
|
}] }, { type: undefined, decorators: [{
|
|
3141
3111
|
type: Inject,
|
|
3142
3112
|
args: ['VariantRepository']
|
|
3143
|
-
}] }, { type: i1$3.Shops, decorators: [{
|
|
3144
|
-
type: Inject,
|
|
3145
|
-
args: [DEFAULT_SHOP]
|
|
3146
3113
|
}] }]; } });
|
|
3147
3114
|
|
|
3148
3115
|
class OrderService {
|
|
@@ -3162,7 +3129,7 @@ OrderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "1
|
|
|
3162
3129
|
OrderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService });
|
|
3163
3130
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService, decorators: [{
|
|
3164
3131
|
type: Injectable
|
|
3165
|
-
}], ctorParameters: function () { return [{ type: i1$1.Firestore }, { type:
|
|
3132
|
+
}], ctorParameters: function () { return [{ type: i1$1.Firestore }, { type: i3.OrderFirestoreRepository, decorators: [{
|
|
3166
3133
|
type: Inject,
|
|
3167
3134
|
args: ['OrderRepository']
|
|
3168
3135
|
}] }]; } });
|
|
@@ -3209,7 +3176,7 @@ class AngularConnectModule {
|
|
|
3209
3176
|
}
|
|
3210
3177
|
}
|
|
3211
3178
|
AngularConnectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3212
|
-
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,
|
|
3213
3180
|
AngularVertexSeachModule,
|
|
3214
3181
|
AngularFirebaseAuthModule,
|
|
3215
3182
|
AngularFirestoreModule,
|