@infrab4a/connect-angular 4.0.0-beta.46 → 4.0.0-beta.48
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-connect.module.mjs +4 -2
- package/esm2020/angular-hasura-graphql.module.mjs +10 -2
- package/esm2020/services/catalog/catalog.service.mjs +1 -1
- package/esm2020/services/catalog/index.mjs +2 -1
- package/esm2020/services/catalog/wishlist.service.mjs +103 -0
- package/esm2020/services/helpers/index.mjs +2 -0
- package/esm2020/services/helpers/util.service.mjs +29 -0
- package/esm2020/services/index.mjs +2 -1
- package/fesm2015/infrab4a-connect-angular.mjs +214 -76
- package/fesm2015/infrab4a-connect-angular.mjs.map +1 -1
- package/fesm2020/infrab4a-connect-angular.mjs +191 -61
- 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/index.d.ts +1 -0
- package/services/catalog/wishlist.service.d.ts +25 -0
- package/services/helpers/index.d.ts +1 -0
- package/services/helpers/util.service.d.ts +7 -0
- package/services/index.d.ts +1 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, NgModule, PLATFORM_ID, Injectable, Inject } from '@angular/core';
|
|
3
3
|
import * as i1$3 from '@infrab4a/connect';
|
|
4
|
-
import { Authentication, AuthenticationFirebaseAuthService, Register, RegisterFirebaseAuthService, SignOut, RecoveryPassword, ProductsIndex, AxiosAdapter, UserBeautyProfileFirestoreRepository, Buy2WinFirestoreRepository, CategoryFirestoreRepository, CheckoutFirestoreRepository, CheckoutSubscriptionFirestoreRepository, CouponFirestoreRepository, CampaignHashtagFirestoreRepository, CampaignDashboardFirestoreRepository, SubscriptionEditionFirestoreRepository, HomeFirestoreRepository, LeadFirestoreRepository, LegacyOrderFirestoreRepository, ShopMenuFirestoreRepository, OrderFirestoreRepository, PaymentFirestoreRepository, ProductFirestoreRepository, ShopSettingsFirestoreRepository, SubscriptionPaymentFirestoreRepository, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, SubscriptionFirestoreRepository, UserFirestoreRepository, UserAddressFirestoreRepository, UserPaymentMethodFirestoreRepository, ProductVariantFirestoreRepository, CategoryHasuraGraphQLRepository, ProductHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository, VariantHasuraGraphQLRepository, FilterOptionHasuraGraphQLRepository, FilterHasuraGraphQLRepository, CategoryCollectionChildrenHasuraGraphQLRepository, Where, Shops, CheckoutTypes, CouponTypes, Exclusivities, isNil, NotFoundError, Checkout, pick, LineItem, RoundProductPricesHelper, set, Category, CheckoutSubscription, Product, RequiredArgumentError, add, Order } from '@infrab4a/connect';
|
|
4
|
+
import { Authentication, AuthenticationFirebaseAuthService, Register, RegisterFirebaseAuthService, SignOut, RecoveryPassword, ProductsIndex, AxiosAdapter, UserBeautyProfileFirestoreRepository, Buy2WinFirestoreRepository, CategoryFirestoreRepository, CheckoutFirestoreRepository, CheckoutSubscriptionFirestoreRepository, CouponFirestoreRepository, CampaignHashtagFirestoreRepository, CampaignDashboardFirestoreRepository, SubscriptionEditionFirestoreRepository, HomeFirestoreRepository, LeadFirestoreRepository, LegacyOrderFirestoreRepository, ShopMenuFirestoreRepository, OrderFirestoreRepository, PaymentFirestoreRepository, ProductFirestoreRepository, ShopSettingsFirestoreRepository, SubscriptionPaymentFirestoreRepository, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, SubscriptionFirestoreRepository, UserFirestoreRepository, UserAddressFirestoreRepository, UserPaymentMethodFirestoreRepository, ProductVariantFirestoreRepository, CategoryHasuraGraphQLRepository, ProductHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository, VariantHasuraGraphQLRepository, FilterOptionHasuraGraphQLRepository, FilterHasuraGraphQLRepository, CategoryCollectionChildrenHasuraGraphQLRepository, WishlistHasuraGraphQLRepository, Where, Shops, CheckoutTypes, CouponTypes, Exclusivities, isNil, NotFoundError, Checkout, pick, LineItem, RoundProductPricesHelper, set, Category, CheckoutSubscription, Product, RequiredArgumentError, add, Order } from '@infrab4a/connect';
|
|
5
5
|
import * as i1 from '@angular/fire/app';
|
|
6
6
|
import { provideFirebaseApp, initializeApp, FirebaseApp } from '@angular/fire/app';
|
|
7
7
|
import * as i1$1 from '@angular/fire/auth';
|
|
@@ -744,6 +744,10 @@ AngularHasuraGraphQLModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.
|
|
|
744
744
|
provide: 'CategoryCollectionChildrenRepository',
|
|
745
745
|
useExisting: CategoryCollectionChildrenHasuraGraphQLRepository,
|
|
746
746
|
},
|
|
747
|
+
{
|
|
748
|
+
provide: 'WishlistRepository',
|
|
749
|
+
useExisting: WishlistHasuraGraphQLRepository,
|
|
750
|
+
},
|
|
747
751
|
] });
|
|
748
752
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularHasuraGraphQLModule, decorators: [{
|
|
749
753
|
type: NgModule,
|
|
@@ -846,6 +850,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
846
850
|
provide: 'CategoryCollectionChildrenRepository',
|
|
847
851
|
useExisting: CategoryCollectionChildrenHasuraGraphQLRepository,
|
|
848
852
|
},
|
|
853
|
+
{
|
|
854
|
+
provide: 'WishlistRepository',
|
|
855
|
+
useExisting: WishlistHasuraGraphQLRepository,
|
|
856
|
+
},
|
|
849
857
|
],
|
|
850
858
|
}]
|
|
851
859
|
}] });
|
|
@@ -1580,6 +1588,185 @@ __decorate([
|
|
|
1580
1588
|
__metadata("design:type", Array)
|
|
1581
1589
|
], CategoryWithTree.prototype, "children", void 0);
|
|
1582
1590
|
|
|
1591
|
+
class UtilService {
|
|
1592
|
+
constructor() { }
|
|
1593
|
+
createSlug(name) {
|
|
1594
|
+
return name
|
|
1595
|
+
.toLowerCase()
|
|
1596
|
+
.replace(/\s+/g, '-') // Replace spaces with -
|
|
1597
|
+
.replace(/[ãàáäâ]/g, 'a') // Replace spaces with -
|
|
1598
|
+
.replace(/[ẽèéëê]/g, 'e') // Replace spaces with -
|
|
1599
|
+
.replace(/[ìíïî]/g, 'i') // Replace spaces with -
|
|
1600
|
+
.replace(/[õòóöô]/g, 'o') // Replace spaces with -
|
|
1601
|
+
.replace(/[ùúüû]/g, 'u') // Replace spaces with -
|
|
1602
|
+
.replace(/[ñ]/g, 'n') // Replace spaces with -
|
|
1603
|
+
.replace(/[ç]/g, 'c') // Replace spaces with -
|
|
1604
|
+
.replace(/[&]/g, 'and') // Replace spaces with -
|
|
1605
|
+
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
|
|
1606
|
+
.replace(/\-\-+/g, '-'); // Replace multiple - with single -
|
|
1607
|
+
}
|
|
1608
|
+
}
|
|
1609
|
+
UtilService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: UtilService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1610
|
+
UtilService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: UtilService, providedIn: 'root' });
|
|
1611
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: UtilService, decorators: [{
|
|
1612
|
+
type: Injectable,
|
|
1613
|
+
args: [{
|
|
1614
|
+
providedIn: 'root',
|
|
1615
|
+
}]
|
|
1616
|
+
}], ctorParameters: function () { return []; } });
|
|
1617
|
+
|
|
1618
|
+
class NewCategoryStructureAdapter {
|
|
1619
|
+
constructor(categoryRepository, categoryCollectionChildrenRepository) {
|
|
1620
|
+
this.categoryRepository = categoryRepository;
|
|
1621
|
+
this.categoryCollectionChildrenRepository = categoryCollectionChildrenRepository;
|
|
1622
|
+
}
|
|
1623
|
+
async buildProductFilterByCategory(category) {
|
|
1624
|
+
const categoriesIds = (await this.isCollection(category))
|
|
1625
|
+
? await this.getAllCategoriesIdFromCollection(category)
|
|
1626
|
+
: [...(await this.getAllCategoriesIdFromCategory(category)), category.id.toString()];
|
|
1627
|
+
return { category: { id: { operator: Where.IN, value: categoriesIds } } };
|
|
1628
|
+
}
|
|
1629
|
+
async getAllCategoriesIdFromCategory(category) {
|
|
1630
|
+
return this.categoryRepository
|
|
1631
|
+
.getChildren(+category.id)
|
|
1632
|
+
.then((categories) => categories.map((category) => category.id.toString()));
|
|
1633
|
+
}
|
|
1634
|
+
async getAllCategoriesIdFromCollection(category) {
|
|
1635
|
+
return this.categoryCollectionChildrenRepository
|
|
1636
|
+
.find({ filters: { collectionId: +category.id } })
|
|
1637
|
+
.then(({ data }) => data.map((categoryCollection) => categoryCollection.categoryId.toString()));
|
|
1638
|
+
}
|
|
1639
|
+
async isCollection(category) {
|
|
1640
|
+
return !isNil(category.isCollection)
|
|
1641
|
+
? category.isCollection
|
|
1642
|
+
: this.categoryRepository.get({ id: category.id }).then((category) => category.isCollection);
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
NewCategoryStructureAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: NewCategoryStructureAdapter, deps: [{ token: 'CategoryRepository' }, { token: 'CategoryCollectionChildrenRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1646
|
+
NewCategoryStructureAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: NewCategoryStructureAdapter });
|
|
1647
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: NewCategoryStructureAdapter, decorators: [{
|
|
1648
|
+
type: Injectable
|
|
1649
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1650
|
+
type: Inject,
|
|
1651
|
+
args: ['CategoryRepository']
|
|
1652
|
+
}] }, { type: undefined, decorators: [{
|
|
1653
|
+
type: Inject,
|
|
1654
|
+
args: ['CategoryCollectionChildrenRepository']
|
|
1655
|
+
}] }]; } });
|
|
1656
|
+
|
|
1657
|
+
class OldCategoryStructureAdapter {
|
|
1658
|
+
constructor(categoryRepository) {
|
|
1659
|
+
this.categoryRepository = categoryRepository;
|
|
1660
|
+
}
|
|
1661
|
+
async buildProductFilterByCategory(category) {
|
|
1662
|
+
const productsIds = category.products?.length
|
|
1663
|
+
? category.products
|
|
1664
|
+
: await this.categoryRepository.get({ id: category.id }).then((categoryFound) => categoryFound.products);
|
|
1665
|
+
return { id: { operator: Where.IN, value: productsIds } };
|
|
1666
|
+
}
|
|
1667
|
+
}
|
|
1668
|
+
OldCategoryStructureAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OldCategoryStructureAdapter, deps: [{ token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1669
|
+
OldCategoryStructureAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OldCategoryStructureAdapter });
|
|
1670
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OldCategoryStructureAdapter, decorators: [{
|
|
1671
|
+
type: Injectable
|
|
1672
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1673
|
+
type: Inject,
|
|
1674
|
+
args: ['CategoryRepository']
|
|
1675
|
+
}] }]; } });
|
|
1676
|
+
|
|
1677
|
+
class WishlistService {
|
|
1678
|
+
constructor(wishlistRepository, productRepository, categoryFilterRepository, categoryCollectionChildrenRepository, categoryStructureAdapter = new NewCategoryStructureAdapter(wishlistRepository, categoryCollectionChildrenRepository), shop, catalogService = new CatalogService(productRepository, categoryStructureAdapter, shop), categoryService = new CategoryService(productRepository, wishlistRepository, categoryFilterRepository, categoryStructureAdapter, shop), utilService) {
|
|
1679
|
+
this.wishlistRepository = wishlistRepository;
|
|
1680
|
+
this.shop = shop;
|
|
1681
|
+
this.catalogService = catalogService;
|
|
1682
|
+
this.categoryService = categoryService;
|
|
1683
|
+
this.utilService = utilService;
|
|
1684
|
+
}
|
|
1685
|
+
getCatalogService() {
|
|
1686
|
+
return this.catalogService;
|
|
1687
|
+
}
|
|
1688
|
+
getCategoryService() {
|
|
1689
|
+
return this.categoryService;
|
|
1690
|
+
}
|
|
1691
|
+
async create(personId, title, description, userFullName) {
|
|
1692
|
+
const data = {
|
|
1693
|
+
slug: this.utilService.createSlug(`favoritos ${userFullName} ${title}`),
|
|
1694
|
+
name: title,
|
|
1695
|
+
description,
|
|
1696
|
+
metadata: {
|
|
1697
|
+
title: `${userFullName} - ${title}`,
|
|
1698
|
+
description: `${userFullName} - ${description}`,
|
|
1699
|
+
},
|
|
1700
|
+
shop: this.shop,
|
|
1701
|
+
shops: [this.shop],
|
|
1702
|
+
personId,
|
|
1703
|
+
brandCategory: false,
|
|
1704
|
+
published: true,
|
|
1705
|
+
};
|
|
1706
|
+
const newWishlist = await this.wishlistRepository.create(data);
|
|
1707
|
+
return this.wishlistRepository.update({ id: newWishlist.id, slug: `${newWishlist.id}-${newWishlist.slug}` });
|
|
1708
|
+
}
|
|
1709
|
+
update(id, title, description, userFullName) {
|
|
1710
|
+
const data = {
|
|
1711
|
+
id,
|
|
1712
|
+
slug: this.utilService.createSlug(`${id}-favoritos ${userFullName} ${title}`),
|
|
1713
|
+
name: title,
|
|
1714
|
+
description,
|
|
1715
|
+
metadata: {
|
|
1716
|
+
title: `${userFullName} - ${title}`,
|
|
1717
|
+
description: `${userFullName} - ${description}`,
|
|
1718
|
+
},
|
|
1719
|
+
};
|
|
1720
|
+
return this.wishlistRepository.update(data);
|
|
1721
|
+
}
|
|
1722
|
+
delete(wishlistId) {
|
|
1723
|
+
return this.wishlistRepository.delete({ id: wishlistId });
|
|
1724
|
+
}
|
|
1725
|
+
getWishlistBySlug(slug) {
|
|
1726
|
+
return this.wishlistRepository.getWishlistBySlug(slug);
|
|
1727
|
+
}
|
|
1728
|
+
getWishlistsByPerson(personId) {
|
|
1729
|
+
return this.wishlistRepository.getWishlistByPerson(personId);
|
|
1730
|
+
}
|
|
1731
|
+
async addProduct(wishlistId, productId) {
|
|
1732
|
+
const wishlist = await this.wishlistRepository.get({ id: wishlistId });
|
|
1733
|
+
const hasProduct = wishlist.products.some((p) => p == productId);
|
|
1734
|
+
if (!hasProduct) {
|
|
1735
|
+
wishlist.products = [...wishlist.products, productId];
|
|
1736
|
+
return this.wishlistRepository.update({ id: wishlistId, products: wishlist.products });
|
|
1737
|
+
}
|
|
1738
|
+
return wishlist;
|
|
1739
|
+
}
|
|
1740
|
+
async removeProduct(wishlistId, productId) {
|
|
1741
|
+
const wishlist = await this.wishlistRepository.get({ id: wishlistId });
|
|
1742
|
+
const productIndex = wishlist.products.findIndex((p) => p == productId);
|
|
1743
|
+
if (productIndex != -1) {
|
|
1744
|
+
wishlist.products.splice(productIndex, 1);
|
|
1745
|
+
if (!wishlist.products.length)
|
|
1746
|
+
return this.wishlistRepository.update({ id: wishlistId, products: { action: 'remove' } });
|
|
1747
|
+
return this.wishlistRepository.update({ id: wishlistId, products: wishlist.products });
|
|
1748
|
+
}
|
|
1749
|
+
return wishlist;
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
WishlistService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
|
|
1753
|
+
WishlistService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService });
|
|
1754
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, decorators: [{
|
|
1755
|
+
type: Injectable
|
|
1756
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1757
|
+
type: Inject,
|
|
1758
|
+
args: ['WishlistRepository']
|
|
1759
|
+
}] }, { type: undefined, decorators: [{
|
|
1760
|
+
type: Inject,
|
|
1761
|
+
args: ['ProductRepository']
|
|
1762
|
+
}] }, { type: undefined, decorators: [{
|
|
1763
|
+
type: Inject,
|
|
1764
|
+
args: ['CategoryFilterRepository']
|
|
1765
|
+
}] }, { type: undefined }, { type: undefined }, { type: i1$3.Shops, decorators: [{
|
|
1766
|
+
type: Inject,
|
|
1767
|
+
args: [DEFAULT_SHOP]
|
|
1768
|
+
}] }, { type: undefined }, { type: undefined }, { type: UtilService }]; } });
|
|
1769
|
+
|
|
1583
1770
|
class CheckoutSubscriptionService {
|
|
1584
1771
|
constructor(checkoutSubscriptionRepository, subscriptionRepository, couponService) {
|
|
1585
1772
|
this.checkoutSubscriptionRepository = checkoutSubscriptionRepository;
|
|
@@ -1840,65 +2027,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1840
2027
|
args: [BACKEND_URL]
|
|
1841
2028
|
}] }, { type: HomeShopService }]; } });
|
|
1842
2029
|
|
|
1843
|
-
class NewCategoryStructureAdapter {
|
|
1844
|
-
constructor(categoryRepository, categoryCollectionChildrenRepository) {
|
|
1845
|
-
this.categoryRepository = categoryRepository;
|
|
1846
|
-
this.categoryCollectionChildrenRepository = categoryCollectionChildrenRepository;
|
|
1847
|
-
}
|
|
1848
|
-
async buildProductFilterByCategory(category) {
|
|
1849
|
-
const categoriesIds = (await this.isCollection(category))
|
|
1850
|
-
? await this.getAllCategoriesIdFromCollection(category)
|
|
1851
|
-
: [...(await this.getAllCategoriesIdFromCategory(category)), category.id.toString()];
|
|
1852
|
-
return { category: { id: { operator: Where.IN, value: categoriesIds } } };
|
|
1853
|
-
}
|
|
1854
|
-
async getAllCategoriesIdFromCategory(category) {
|
|
1855
|
-
return this.categoryRepository
|
|
1856
|
-
.getChildren(+category.id)
|
|
1857
|
-
.then((categories) => categories.map((category) => category.id.toString()));
|
|
1858
|
-
}
|
|
1859
|
-
async getAllCategoriesIdFromCollection(category) {
|
|
1860
|
-
return this.categoryCollectionChildrenRepository
|
|
1861
|
-
.find({ filters: { collectionId: +category.id } })
|
|
1862
|
-
.then(({ data }) => data.map((categoryCollection) => categoryCollection.categoryId.toString()));
|
|
1863
|
-
}
|
|
1864
|
-
async isCollection(category) {
|
|
1865
|
-
return !isNil(category.isCollection)
|
|
1866
|
-
? category.isCollection
|
|
1867
|
-
: this.categoryRepository.get({ id: category.id }).then((category) => category.isCollection);
|
|
1868
|
-
}
|
|
1869
|
-
}
|
|
1870
|
-
NewCategoryStructureAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: NewCategoryStructureAdapter, deps: [{ token: 'CategoryRepository' }, { token: 'CategoryCollectionChildrenRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1871
|
-
NewCategoryStructureAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: NewCategoryStructureAdapter });
|
|
1872
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: NewCategoryStructureAdapter, decorators: [{
|
|
1873
|
-
type: Injectable
|
|
1874
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1875
|
-
type: Inject,
|
|
1876
|
-
args: ['CategoryRepository']
|
|
1877
|
-
}] }, { type: undefined, decorators: [{
|
|
1878
|
-
type: Inject,
|
|
1879
|
-
args: ['CategoryCollectionChildrenRepository']
|
|
1880
|
-
}] }]; } });
|
|
1881
|
-
|
|
1882
|
-
class OldCategoryStructureAdapter {
|
|
1883
|
-
constructor(categoryRepository) {
|
|
1884
|
-
this.categoryRepository = categoryRepository;
|
|
1885
|
-
}
|
|
1886
|
-
async buildProductFilterByCategory(category) {
|
|
1887
|
-
const productsIds = category.products?.length
|
|
1888
|
-
? category.products
|
|
1889
|
-
: await this.categoryRepository.get({ id: category.id }).then((categoryFound) => categoryFound.products);
|
|
1890
|
-
return { id: { operator: Where.IN, value: productsIds } };
|
|
1891
|
-
}
|
|
1892
|
-
}
|
|
1893
|
-
OldCategoryStructureAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OldCategoryStructureAdapter, deps: [{ token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1894
|
-
OldCategoryStructureAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OldCategoryStructureAdapter });
|
|
1895
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OldCategoryStructureAdapter, decorators: [{
|
|
1896
|
-
type: Injectable
|
|
1897
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1898
|
-
type: Inject,
|
|
1899
|
-
args: ['CategoryRepository']
|
|
1900
|
-
}] }]; } });
|
|
1901
|
-
|
|
1902
2030
|
class AngularConnectModule {
|
|
1903
2031
|
static initializeApp(defaultShop, options, nameOrConfig) {
|
|
1904
2032
|
return {
|
|
@@ -1933,6 +2061,7 @@ AngularConnectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ve
|
|
|
1933
2061
|
HomeShopService,
|
|
1934
2062
|
OrderService,
|
|
1935
2063
|
ShippingService,
|
|
2064
|
+
WishlistService,
|
|
1936
2065
|
], imports: [AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule] });
|
|
1937
2066
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, decorators: [{
|
|
1938
2067
|
type: NgModule,
|
|
@@ -1949,6 +2078,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1949
2078
|
HomeShopService,
|
|
1950
2079
|
OrderService,
|
|
1951
2080
|
ShippingService,
|
|
2081
|
+
WishlistService,
|
|
1952
2082
|
],
|
|
1953
2083
|
}]
|
|
1954
2084
|
}] });
|
|
@@ -1957,5 +2087,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1957
2087
|
* Generated bundle index. Do not edit.
|
|
1958
2088
|
*/
|
|
1959
2089
|
|
|
1960
|
-
export { AngularConnectModule, AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule, AuthService, CartService, CatalogService, CategoryService, CategoryWithTree, CheckoutService, CheckoutSubscriptionService, CouponService, HomeShopService, OrderService, ProductSorts, ShippingService };
|
|
2090
|
+
export { AngularConnectModule, AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule, AuthService, CartService, CatalogService, CategoryService, CategoryWithTree, CheckoutService, CheckoutSubscriptionService, CouponService, HomeShopService, OrderService, ProductSorts, ShippingService, UtilService, WishlistService };
|
|
1961
2091
|
//# sourceMappingURL=infrab4a-connect-angular.mjs.map
|