@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';
|
|
@@ -464,6 +464,13 @@ AngularFirestoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
|
|
|
464
464
|
},
|
|
465
465
|
deps: ['FirestoreOptions'],
|
|
466
466
|
},
|
|
467
|
+
{
|
|
468
|
+
provide: 'BrandCategoryRepository',
|
|
469
|
+
useFactory: (options) => {
|
|
470
|
+
return new BrandCategoryFirestoreRepository(options);
|
|
471
|
+
},
|
|
472
|
+
deps: ['FirestoreOptions'],
|
|
473
|
+
},
|
|
467
474
|
], imports: [AngularElasticSeachModule,
|
|
468
475
|
provideFirestore((injector) => {
|
|
469
476
|
const platformId = injector.get(PLATFORM_ID);
|
|
@@ -737,6 +744,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
737
744
|
},
|
|
738
745
|
deps: ['FirestoreOptions'],
|
|
739
746
|
},
|
|
747
|
+
{
|
|
748
|
+
provide: 'BrandCategoryRepository',
|
|
749
|
+
useFactory: (options) => {
|
|
750
|
+
return new BrandCategoryFirestoreRepository(options);
|
|
751
|
+
},
|
|
752
|
+
deps: ['FirestoreOptions'],
|
|
753
|
+
},
|
|
740
754
|
],
|
|
741
755
|
}]
|
|
742
756
|
}] });
|
|
@@ -906,17 +920,6 @@ AngularHasuraGraphQLModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.
|
|
|
906
920
|
provide: 'ProductErrorsRepository',
|
|
907
921
|
useExisting: ProductErrorsHasuraGraphQLRepository,
|
|
908
922
|
},
|
|
909
|
-
{
|
|
910
|
-
provide: ProductCatalogHasuraGraphQLRepository,
|
|
911
|
-
useFactory: (options) => {
|
|
912
|
-
return new ProductCatalogHasuraGraphQLRepository(options);
|
|
913
|
-
},
|
|
914
|
-
deps: ['HasuraConfig'],
|
|
915
|
-
},
|
|
916
|
-
{
|
|
917
|
-
provide: 'ProductCatalogRepository',
|
|
918
|
-
useExisting: ProductCatalogHasuraGraphQLRepository,
|
|
919
|
-
},
|
|
920
923
|
] });
|
|
921
924
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularHasuraGraphQLModule, decorators: [{
|
|
922
925
|
type: NgModule,
|
|
@@ -1076,17 +1079,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1076
1079
|
provide: 'ProductErrorsRepository',
|
|
1077
1080
|
useExisting: ProductErrorsHasuraGraphQLRepository,
|
|
1078
1081
|
},
|
|
1079
|
-
{
|
|
1080
|
-
provide: ProductCatalogHasuraGraphQLRepository,
|
|
1081
|
-
useFactory: (options) => {
|
|
1082
|
-
return new ProductCatalogHasuraGraphQLRepository(options);
|
|
1083
|
-
},
|
|
1084
|
-
deps: ['HasuraConfig'],
|
|
1085
|
-
},
|
|
1086
|
-
{
|
|
1087
|
-
provide: 'ProductCatalogRepository',
|
|
1088
|
-
useExisting: ProductCatalogHasuraGraphQLRepository,
|
|
1089
|
-
},
|
|
1090
1082
|
],
|
|
1091
1083
|
}]
|
|
1092
1084
|
}] });
|
|
@@ -1227,7 +1219,7 @@ ConfigurationFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0",
|
|
|
1227
1219
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ConfigurationFacade, decorators: [{
|
|
1228
1220
|
type: Injectable
|
|
1229
1221
|
}], ctorParameters: function () {
|
|
1230
|
-
return [{ type:
|
|
1222
|
+
return [{ type: i3.Shops, decorators: [{
|
|
1231
1223
|
type: Inject,
|
|
1232
1224
|
args: [DEFAULT_SHOP]
|
|
1233
1225
|
}] }, { type: undefined, decorators: [{
|
|
@@ -1585,14 +1577,14 @@ class CategorySearchStrategy {
|
|
|
1585
1577
|
maximum: ['price'],
|
|
1586
1578
|
distinct: ['brand'],
|
|
1587
1579
|
} });
|
|
1588
|
-
return productCatalog.
|
|
1580
|
+
return productCatalog.productRepository.findCatalog(repoParams, null, optionsCache);
|
|
1589
1581
|
});
|
|
1590
1582
|
}
|
|
1591
1583
|
getProductIds(category, filters, optionsCache) {
|
|
1592
1584
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1593
1585
|
const productCatalog = this.repositoryService.getProductCatalog();
|
|
1594
1586
|
const filterHelper = this.helpersService.getFilterHelper();
|
|
1595
|
-
return productCatalog.
|
|
1587
|
+
return productCatalog.productRepository
|
|
1596
1588
|
.findCatalog({
|
|
1597
1589
|
fields: ['id'],
|
|
1598
1590
|
filters: Object.assign(Object.assign({}, (yield productCatalog.categoryStructureAdapter.buildProductFilterByCategory(category))), filterHelper.buildFilterQuery(filters || {})),
|
|
@@ -1607,7 +1599,7 @@ class CategorySearchStrategy {
|
|
|
1607
1599
|
const filterHelper = this.helpersService.getFilterHelper();
|
|
1608
1600
|
const sortHelper = this.helpersService.getSortHelper();
|
|
1609
1601
|
const mostRelevantProductsIds = [...new Set(mostRelevants.concat(productIds))];
|
|
1610
|
-
const totalResult = yield productCatalog.
|
|
1602
|
+
const totalResult = yield productCatalog.productRepository.findCatalog({
|
|
1611
1603
|
fields,
|
|
1612
1604
|
filters: Object.assign({ id: { operator: Where.IN, value: mostRelevantProductsIds } }, filterHelper.buildFilterQuery(filters || {})),
|
|
1613
1605
|
orderBy: sortHelper.buildSortQuery('best-sellers'),
|
|
@@ -1661,7 +1653,7 @@ class ProfileSearchStrategy {
|
|
|
1661
1653
|
maximum: ['price'],
|
|
1662
1654
|
distinct: ['brand'],
|
|
1663
1655
|
} });
|
|
1664
|
-
return productCatalog.
|
|
1656
|
+
return productCatalog.productRepository.findCatalog(repoParams, mainGender || (shop === Shops.MENSMARKET ? 'male' : 'female'), optionsCache);
|
|
1665
1657
|
});
|
|
1666
1658
|
}
|
|
1667
1659
|
}
|
|
@@ -1699,7 +1691,6 @@ class TermSearchStrategy {
|
|
|
1699
1691
|
limits,
|
|
1700
1692
|
shop,
|
|
1701
1693
|
mainGender,
|
|
1702
|
-
sort,
|
|
1703
1694
|
fields: this.helpersService.getFieldsHelper().getStandardFields(),
|
|
1704
1695
|
});
|
|
1705
1696
|
});
|
|
@@ -1709,7 +1700,7 @@ class TermSearchStrategy {
|
|
|
1709
1700
|
const { productIds, filters, shop, mainGender } = params;
|
|
1710
1701
|
const productCatalog = this.repositoryService.getProductCatalog();
|
|
1711
1702
|
const filterHelper = this.helpersService.getFilterHelper();
|
|
1712
|
-
const totalResult = yield productCatalog.
|
|
1703
|
+
const totalResult = yield productCatalog.productRepository.findCatalog({
|
|
1713
1704
|
fields: ['id', 'stock', 'gender'],
|
|
1714
1705
|
filters: Object.assign({ id: { operator: Where.IN, value: productIds }, published: { operator: Where.EQUALS, value: true } }, filterHelper.buildFilterQuery(filters || {})),
|
|
1715
1706
|
options: Object.assign({ minimal: ['price'], maximum: ['price'] }, (isEmpty(filters === null || filters === void 0 ? void 0 : filters.brands) ? { distinct: ['brand'] } : {})),
|
|
@@ -1725,15 +1716,19 @@ class TermSearchStrategy {
|
|
|
1725
1716
|
}
|
|
1726
1717
|
searchDefault(params) {
|
|
1727
1718
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1728
|
-
const { productIds, filters, limits,
|
|
1719
|
+
const { productIds, filters, limits, shop, mainGender, fields } = params;
|
|
1729
1720
|
const productCatalog = this.repositoryService.getProductCatalog();
|
|
1730
1721
|
const filterHelper = this.helpersService.getFilterHelper();
|
|
1731
|
-
|
|
1732
|
-
|
|
1722
|
+
return productCatalog.productRepository.findCatalog({
|
|
1723
|
+
fields,
|
|
1724
|
+
filters: Object.assign({ id: { operator: Where.IN, value: productIds }, published: { operator: Where.EQUALS, value: true } }, filterHelper.buildFilterQuery(filters || {})),
|
|
1725
|
+
limits,
|
|
1726
|
+
options: {
|
|
1733
1727
|
minimal: ['price'],
|
|
1734
1728
|
maximum: ['price'],
|
|
1735
1729
|
distinct: ['brand'],
|
|
1736
|
-
}
|
|
1730
|
+
},
|
|
1731
|
+
});
|
|
1737
1732
|
});
|
|
1738
1733
|
}
|
|
1739
1734
|
sortByTermRelevance(params) {
|
|
@@ -1752,7 +1747,7 @@ class TermSearchStrategy {
|
|
|
1752
1747
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1753
1748
|
const productCatalog = this.repositoryService.getProductCatalog();
|
|
1754
1749
|
const fields = fieldsHelper.getStandardFields();
|
|
1755
|
-
const productResult = yield productCatalog.
|
|
1750
|
+
const productResult = yield productCatalog.productRepository.findCatalog({
|
|
1756
1751
|
filters: {
|
|
1757
1752
|
id: { operator: Where.IN, value: orderedId },
|
|
1758
1753
|
},
|
|
@@ -1814,7 +1809,7 @@ CatalogServiceFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0",
|
|
|
1814
1809
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogServiceFacade, decorators: [{
|
|
1815
1810
|
type: Injectable
|
|
1816
1811
|
}], ctorParameters: function () {
|
|
1817
|
-
return [{ type: CatalogHelpersService }, { type: CatalogStrategiesFacade }, { type:
|
|
1812
|
+
return [{ type: CatalogHelpersService }, { type: CatalogStrategiesFacade }, { type: i3.Shops, decorators: [{
|
|
1818
1813
|
type: Inject,
|
|
1819
1814
|
args: [DEFAULT_SHOP]
|
|
1820
1815
|
}] }];
|
|
@@ -1848,7 +1843,7 @@ class CategoryService {
|
|
|
1848
1843
|
}
|
|
1849
1844
|
fetchBrands(category, options, optionsCache) {
|
|
1850
1845
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1851
|
-
const brands = yield this.productCatalog.
|
|
1846
|
+
const brands = yield this.productCatalog.productRepository
|
|
1852
1847
|
.findCatalog({
|
|
1853
1848
|
filters: yield this.productCatalog.categoryStructureAdapter.buildProductFilterByCategory(category),
|
|
1854
1849
|
fields: ['brand'],
|
|
@@ -1877,26 +1872,26 @@ CategoryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", vers
|
|
|
1877
1872
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryService, decorators: [{
|
|
1878
1873
|
type: Injectable
|
|
1879
1874
|
}], ctorParameters: function () {
|
|
1880
|
-
return [{ type: CategoryRepositoryFacade }, { type: ProductCatalogFacade }, { type:
|
|
1875
|
+
return [{ type: CategoryRepositoryFacade }, { type: ProductCatalogFacade }, { type: i3.Shops, decorators: [{
|
|
1881
1876
|
type: Inject,
|
|
1882
1877
|
args: [DEFAULT_SHOP]
|
|
1883
1878
|
}] }];
|
|
1884
1879
|
} });
|
|
1885
1880
|
|
|
1886
1881
|
class ProductCatalogFacade {
|
|
1887
|
-
constructor(
|
|
1888
|
-
this.
|
|
1882
|
+
constructor(productRepository, categoryStructureAdapter) {
|
|
1883
|
+
this.productRepository = productRepository;
|
|
1889
1884
|
this.categoryStructureAdapter = categoryStructureAdapter;
|
|
1890
1885
|
}
|
|
1891
1886
|
}
|
|
1892
|
-
ProductCatalogFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ProductCatalogFacade, deps: [{ token: '
|
|
1887
|
+
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 });
|
|
1893
1888
|
ProductCatalogFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ProductCatalogFacade });
|
|
1894
1889
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ProductCatalogFacade, decorators: [{
|
|
1895
1890
|
type: Injectable
|
|
1896
1891
|
}], ctorParameters: function () {
|
|
1897
1892
|
return [{ type: undefined, decorators: [{
|
|
1898
1893
|
type: Inject,
|
|
1899
|
-
args: ['
|
|
1894
|
+
args: ['ProductRepository']
|
|
1900
1895
|
}] }, { type: undefined, decorators: [{
|
|
1901
1896
|
type: Inject,
|
|
1902
1897
|
args: [CATEGORY_STRUCTURE]
|
|
@@ -1919,7 +1914,7 @@ CategoryServiceFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0"
|
|
|
1919
1914
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryServiceFacade, decorators: [{
|
|
1920
1915
|
type: Injectable
|
|
1921
1916
|
}], ctorParameters: function () {
|
|
1922
|
-
return [{ type: CategoryRepositoryFacade }, { type: ProductCatalogFacade }, { type:
|
|
1917
|
+
return [{ type: CategoryRepositoryFacade }, { type: ProductCatalogFacade }, { type: i3.Shops, decorators: [{
|
|
1923
1918
|
type: Inject,
|
|
1924
1919
|
args: [DEFAULT_SHOP]
|
|
1925
1920
|
}] }];
|
|
@@ -1963,7 +1958,7 @@ class BrandManagerHelper {
|
|
|
1963
1958
|
if (options.category) {
|
|
1964
1959
|
filters = yield this.productCatalog.categoryStructureAdapter.buildProductFilterByCategory(options.category);
|
|
1965
1960
|
}
|
|
1966
|
-
return this.productCatalog.
|
|
1961
|
+
return this.productCatalog.productRepository
|
|
1967
1962
|
.findCatalog({
|
|
1968
1963
|
fields: ['id'],
|
|
1969
1964
|
filters: Object.assign(Object.assign({}, filters), { published: { operator: Where.EQUALS, value: true } }),
|
|
@@ -2080,7 +2075,6 @@ class ProductFieldsHelper {
|
|
|
2080
2075
|
'name',
|
|
2081
2076
|
'slug',
|
|
2082
2077
|
'images',
|
|
2083
|
-
'imagesCard',
|
|
2084
2078
|
'miniatures',
|
|
2085
2079
|
'price',
|
|
2086
2080
|
'stock',
|
|
@@ -2103,8 +2097,6 @@ class ProductFieldsHelper {
|
|
|
2103
2097
|
'label',
|
|
2104
2098
|
'outlet',
|
|
2105
2099
|
'group',
|
|
2106
|
-
'variantSlug',
|
|
2107
|
-
'filters',
|
|
2108
2100
|
];
|
|
2109
2101
|
}
|
|
2110
2102
|
}
|
|
@@ -2313,7 +2305,7 @@ CatalogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", versi
|
|
|
2313
2305
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService, decorators: [{
|
|
2314
2306
|
type: Injectable
|
|
2315
2307
|
}], ctorParameters: function () {
|
|
2316
|
-
return [{ type: CatalogSearchContext }, { type: CatalogHelpersService }, { type:
|
|
2308
|
+
return [{ type: CatalogSearchContext }, { type: CatalogHelpersService }, { type: i3.Shops, decorators: [{
|
|
2317
2309
|
type: Inject,
|
|
2318
2310
|
args: [DEFAULT_SHOP]
|
|
2319
2311
|
}] }];
|
|
@@ -2338,10 +2330,9 @@ __decorate([
|
|
|
2338
2330
|
], CategoryWithTree.prototype, "children", void 0);
|
|
2339
2331
|
|
|
2340
2332
|
class WishlistService {
|
|
2341
|
-
constructor(wishlistRepository, productRepository,
|
|
2333
|
+
constructor(wishlistRepository, productRepository, logRepository, shop) {
|
|
2342
2334
|
this.wishlistRepository = wishlistRepository;
|
|
2343
2335
|
this.productRepository = productRepository;
|
|
2344
|
-
this.productCatalogRepository = productCatalogRepository;
|
|
2345
2336
|
this.logRepository = logRepository;
|
|
2346
2337
|
this.shop = shop;
|
|
2347
2338
|
}
|
|
@@ -2509,7 +2500,7 @@ class WishlistService {
|
|
|
2509
2500
|
}
|
|
2510
2501
|
findProductById(id) {
|
|
2511
2502
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2512
|
-
return this.
|
|
2503
|
+
return this.productRepository
|
|
2513
2504
|
.find({
|
|
2514
2505
|
fields: ['id', 'sku', 'EAN', 'name', 'brand'],
|
|
2515
2506
|
filters: {
|
|
@@ -2590,7 +2581,7 @@ class WishlistService {
|
|
|
2590
2581
|
};
|
|
2591
2582
|
}
|
|
2592
2583
|
}
|
|
2593
|
-
WishlistService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, deps: [{ token: 'WishlistRepository' }, { token: 'ProductRepository' }, { token: '
|
|
2584
|
+
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 });
|
|
2594
2585
|
WishlistService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService });
|
|
2595
2586
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, decorators: [{
|
|
2596
2587
|
type: Injectable
|
|
@@ -2601,13 +2592,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
2601
2592
|
}] }, { type: undefined, decorators: [{
|
|
2602
2593
|
type: Inject,
|
|
2603
2594
|
args: ['ProductRepository']
|
|
2604
|
-
}] }, { type: undefined, decorators: [{
|
|
2605
|
-
type: Inject,
|
|
2606
|
-
args: ['ProductCatalogRepository']
|
|
2607
2595
|
}] }, { type: undefined, decorators: [{
|
|
2608
2596
|
type: Inject,
|
|
2609
2597
|
args: ['LogRepository']
|
|
2610
|
-
}] }, { type:
|
|
2598
|
+
}] }, { type: i3.Shops, decorators: [{
|
|
2611
2599
|
type: Inject,
|
|
2612
2600
|
args: [DEFAULT_SHOP]
|
|
2613
2601
|
}] }];
|
|
@@ -3110,11 +3098,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
3110
3098
|
}], ctorParameters: function () { return [{ type: HomeShopRepositoriesFacade }, { type: ConfigurationFacade }]; } });
|
|
3111
3099
|
|
|
3112
3100
|
class OrderProductReviewService {
|
|
3113
|
-
constructor(orderRepository, productReviewRepository, variantRepository
|
|
3101
|
+
constructor(orderRepository, productReviewRepository, variantRepository) {
|
|
3114
3102
|
this.orderRepository = orderRepository;
|
|
3115
3103
|
this.productReviewRepository = productReviewRepository;
|
|
3116
3104
|
this.variantRepository = variantRepository;
|
|
3117
|
-
this.defaultShop = defaultShop;
|
|
3118
3105
|
}
|
|
3119
3106
|
getPendingReviewsByEmail(email) {
|
|
3120
3107
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -3141,7 +3128,6 @@ class OrderProductReviewService {
|
|
|
3141
3128
|
user: {
|
|
3142
3129
|
email: email,
|
|
3143
3130
|
},
|
|
3144
|
-
shop: this.defaultShop,
|
|
3145
3131
|
status: OrderStatus.ENTREGUE,
|
|
3146
3132
|
createdAt: {
|
|
3147
3133
|
operator: Where.GTE,
|
|
@@ -3209,25 +3195,13 @@ class OrderProductReviewService {
|
|
|
3209
3195
|
}));
|
|
3210
3196
|
});
|
|
3211
3197
|
}
|
|
3212
|
-
verifyReviewProductAndOrder(orderId, productId) {
|
|
3213
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
3214
|
-
return this.productReviewRepository
|
|
3215
|
-
.find({
|
|
3216
|
-
filters: {
|
|
3217
|
-
orderId: { operator: Where.IN, value: orderId },
|
|
3218
|
-
productId: productId,
|
|
3219
|
-
},
|
|
3220
|
-
})
|
|
3221
|
-
.then((res) => res.data);
|
|
3222
|
-
});
|
|
3223
|
-
}
|
|
3224
3198
|
}
|
|
3225
|
-
OrderProductReviewService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderProductReviewService, deps: [{ token: 'OrderRepository' }, { token: 'ProductReviewRepository' }, { token: 'VariantRepository' }
|
|
3199
|
+
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 });
|
|
3226
3200
|
OrderProductReviewService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderProductReviewService });
|
|
3227
3201
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderProductReviewService, decorators: [{
|
|
3228
3202
|
type: Injectable
|
|
3229
3203
|
}], ctorParameters: function () {
|
|
3230
|
-
return [{ type:
|
|
3204
|
+
return [{ type: i3.OrderFirestoreRepository, decorators: [{
|
|
3231
3205
|
type: Inject,
|
|
3232
3206
|
args: ['OrderRepository']
|
|
3233
3207
|
}] }, { type: undefined, decorators: [{
|
|
@@ -3236,9 +3210,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
3236
3210
|
}] }, { type: undefined, decorators: [{
|
|
3237
3211
|
type: Inject,
|
|
3238
3212
|
args: ['VariantRepository']
|
|
3239
|
-
}] }, { type: i1$3.Shops, decorators: [{
|
|
3240
|
-
type: Inject,
|
|
3241
|
-
args: [DEFAULT_SHOP]
|
|
3242
3213
|
}] }];
|
|
3243
3214
|
} });
|
|
3244
3215
|
|
|
@@ -3260,7 +3231,7 @@ OrderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version
|
|
|
3260
3231
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService, decorators: [{
|
|
3261
3232
|
type: Injectable
|
|
3262
3233
|
}], ctorParameters: function () {
|
|
3263
|
-
return [{ type: i1$1.Firestore }, { type:
|
|
3234
|
+
return [{ type: i1$1.Firestore }, { type: i3.OrderFirestoreRepository, decorators: [{
|
|
3264
3235
|
type: Inject,
|
|
3265
3236
|
args: ['OrderRepository']
|
|
3266
3237
|
}] }];
|
|
@@ -3308,7 +3279,7 @@ class AngularConnectModule {
|
|
|
3308
3279
|
}
|
|
3309
3280
|
}
|
|
3310
3281
|
AngularConnectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3311
|
-
AngularConnectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, imports: [i1$
|
|
3282
|
+
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,
|
|
3312
3283
|
AngularVertexSeachModule,
|
|
3313
3284
|
AngularFirebaseAuthModule,
|
|
3314
3285
|
AngularFirestoreModule,
|