@infrab4a/connect-angular 4.0.0-beta.50 → 4.0.0-beta.52

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.
@@ -738,7 +738,8 @@ AngularHasuraGraphQLModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.
738
738
  },
739
739
  {
740
740
  provide: CategoryCollectionChildrenHasuraGraphQLRepository,
741
- useFactory: (options) => new CategoryCollectionChildrenHasuraGraphQLRepository(options.endpoint, options.credentials),
741
+ useFactory: (options) => new CategoryCollectionChildrenHasuraGraphQLRepository(options),
742
+ deps: ['HasuraConfig'],
742
743
  },
743
744
  {
744
745
  provide: 'CategoryCollectionChildrenRepository',
@@ -851,7 +852,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
851
852
  },
852
853
  {
853
854
  provide: CategoryCollectionChildrenHasuraGraphQLRepository,
854
- useFactory: (options) => new CategoryCollectionChildrenHasuraGraphQLRepository(options.endpoint, options.credentials),
855
+ useFactory: (options) => new CategoryCollectionChildrenHasuraGraphQLRepository(options),
856
+ deps: ['HasuraConfig'],
855
857
  },
856
858
  {
857
859
  provide: 'CategoryCollectionChildrenRepository',
@@ -1603,8 +1605,7 @@ __decorate([
1603
1605
  ], CategoryWithTree.prototype, "children", void 0);
1604
1606
 
1605
1607
  class UtilService {
1606
- constructor() { }
1607
- createSlug(name) {
1608
+ static createSlug(name) {
1608
1609
  return name
1609
1610
  .toLowerCase()
1610
1611
  .replace(/\s+/g, '-') // Replace spaces with -
@@ -1620,11 +1621,6 @@ class UtilService {
1620
1621
  .replace(/\-\-+/g, '-'); // Replace multiple - with single -
1621
1622
  }
1622
1623
  }
1623
- UtilService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: UtilService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1624
- UtilService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: UtilService });
1625
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: UtilService, decorators: [{
1626
- type: Injectable
1627
- }], ctorParameters: function () { return []; } });
1628
1624
 
1629
1625
  class NewCategoryStructureAdapter {
1630
1626
  constructor(categoryRepository, categoryCollectionChildrenRepository) {
@@ -1686,12 +1682,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
1686
1682
  }] }]; } });
1687
1683
 
1688
1684
  class WishlistService {
1689
- constructor(wishlistRepository, shop, productRepository, categoryFilterRepository, categoryCollectionChildrenRepository, categoryStructureAdapter = new NewCategoryStructureAdapter(wishlistRepository, categoryCollectionChildrenRepository), catalogService = new CatalogService(productRepository, categoryStructureAdapter, shop), categoryService = new CategoryService(productRepository, wishlistRepository, categoryFilterRepository, categoryStructureAdapter, shop), utilService) {
1685
+ constructor(wishlistRepository, shop, productRepository, categoryFilterRepository, categoryCollectionChildrenRepository) {
1690
1686
  this.wishlistRepository = wishlistRepository;
1691
1687
  this.shop = shop;
1692
- this.catalogService = catalogService;
1693
- this.categoryService = categoryService;
1694
- this.utilService = utilService;
1688
+ const categoryStructureAdapter = new NewCategoryStructureAdapter(wishlistRepository, categoryCollectionChildrenRepository);
1689
+ this.catalogService = new CatalogService(productRepository, categoryStructureAdapter, shop);
1690
+ this.categoryService = new CategoryService(productRepository, wishlistRepository, categoryFilterRepository, categoryStructureAdapter, shop);
1695
1691
  }
1696
1692
  getCatalogService() {
1697
1693
  return this.catalogService;
@@ -1701,7 +1697,7 @@ class WishlistService {
1701
1697
  }
1702
1698
  async create(personId, title, description, userFullName) {
1703
1699
  const data = {
1704
- slug: this.utilService.createSlug(`favoritos ${userFullName} ${title}`),
1700
+ slug: UtilService.createSlug(`favoritos ${userFullName} ${title}`),
1705
1701
  name: title,
1706
1702
  description,
1707
1703
  metadata: {
@@ -1720,7 +1716,7 @@ class WishlistService {
1720
1716
  update(id, title, description, userFullName) {
1721
1717
  const data = {
1722
1718
  id,
1723
- slug: this.utilService.createSlug(`${id}-favoritos ${userFullName} ${title}`),
1719
+ slug: UtilService.createSlug(`${id}-favoritos ${userFullName} ${title}`),
1724
1720
  name: title,
1725
1721
  description,
1726
1722
  metadata: {
@@ -1760,7 +1756,7 @@ class WishlistService {
1760
1756
  return wishlist;
1761
1757
  }
1762
1758
  }
1763
- WishlistService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
1759
+ WishlistService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, deps: [{ token: 'WishlistRepository' }, { token: DEFAULT_SHOP }, { token: 'ProductRepository' }, { token: 'CategoryFilterRepository' }, { token: 'CategoryCollectionChildrenRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
1764
1760
  WishlistService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService });
1765
1761
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, decorators: [{
1766
1762
  type: Injectable
@@ -1779,7 +1775,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
1779
1775
  }] }, { type: undefined, decorators: [{
1780
1776
  type: Inject,
1781
1777
  args: ['CategoryCollectionChildrenRepository']
1782
- }] }, { type: undefined }, { type: undefined }, { type: undefined }, { type: UtilService }]; } });
1778
+ }] }]; } });
1783
1779
 
1784
1780
  class CheckoutSubscriptionService {
1785
1781
  constructor(checkoutSubscriptionRepository, subscriptionRepository, couponService) {