@infrab4a/connect-angular 5.0.0-beta.58 → 5.0.0-beta.59

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.
Files changed (61) hide show
  1. package/angular-connect.module.d.ts +8 -6
  2. package/angular-vertex-search.module.d.ts +9 -0
  3. package/consts/index.d.ts +1 -0
  4. package/consts/vertex-config.const.d.ts +1 -0
  5. package/esm2022/angular-connect.module.mjs +17 -4
  6. package/esm2022/angular-elastic-search.module.mjs +1 -1
  7. package/esm2022/angular-firebase-auth.module.mjs +1 -1
  8. package/esm2022/angular-firestore.module.mjs +1 -1
  9. package/esm2022/angular-hasura-graphql.module.mjs +1 -1
  10. package/esm2022/angular-vertex-search.module.mjs +34 -0
  11. package/esm2022/consts/category-structure.mjs +1 -1
  12. package/esm2022/consts/default-shop.const.mjs +1 -1
  13. package/esm2022/consts/es-config.const.mjs +1 -1
  14. package/esm2022/consts/firebase-const.mjs +1 -1
  15. package/esm2022/consts/hasura-options.const.mjs +1 -1
  16. package/esm2022/consts/index.mjs +2 -1
  17. package/esm2022/consts/persistence.const.mjs +1 -1
  18. package/esm2022/consts/storage-base-url.const.mjs +1 -1
  19. package/esm2022/consts/vertex-config.const.mjs +2 -0
  20. package/esm2022/helpers/index.mjs +1 -1
  21. package/esm2022/helpers/mobile-operation-system-checker.helper.mjs +1 -1
  22. package/esm2022/index.mjs +1 -1
  23. package/esm2022/persistence/cookie-data-persistence.mjs +1 -1
  24. package/esm2022/persistence/data-persistence.mjs +1 -1
  25. package/esm2022/persistence/index.mjs +1 -1
  26. package/esm2022/services/auth.service.mjs +1 -1
  27. package/esm2022/services/cart.service.mjs +1 -1
  28. package/esm2022/services/catalog/adapters/category-structure.adapter.mjs +1 -1
  29. package/esm2022/services/catalog/adapters/index.mjs +1 -1
  30. package/esm2022/services/catalog/adapters/new-category-structure.adapter.mjs +1 -1
  31. package/esm2022/services/catalog/adapters/old-category-structure.adapter.mjs +1 -1
  32. package/esm2022/services/catalog/catalog.service.mjs +28 -22
  33. package/esm2022/services/catalog/category.service.mjs +1 -1
  34. package/esm2022/services/catalog/enums/index.mjs +1 -1
  35. package/esm2022/services/catalog/enums/product-sorts.enum.mjs +1 -1
  36. package/esm2022/services/catalog/index.mjs +1 -1
  37. package/esm2022/services/catalog/models/category-with-tree.model.mjs +1 -1
  38. package/esm2022/services/catalog/models/index.mjs +1 -1
  39. package/esm2022/services/catalog/types/index.mjs +1 -1
  40. package/esm2022/services/catalog/types/product-sort.type.mjs +1 -1
  41. package/esm2022/services/catalog/wishlist.service.mjs +25 -6
  42. package/esm2022/services/checkout-subscription.service.mjs +1 -1
  43. package/esm2022/services/checkout.service.mjs +1 -1
  44. package/esm2022/services/coupon.service.mjs +8 -3
  45. package/esm2022/services/helpers/index.mjs +1 -1
  46. package/esm2022/services/helpers/util.helper.mjs +1 -1
  47. package/esm2022/services/home-shop.service.mjs +1 -1
  48. package/esm2022/services/index.mjs +1 -1
  49. package/esm2022/services/order.service.mjs +1 -1
  50. package/esm2022/services/shipping.service.mjs +1 -1
  51. package/esm2022/services/types/index.mjs +1 -1
  52. package/esm2022/services/types/required-checkout-data.type.mjs +1 -1
  53. package/esm2022/services/types/required-checkout-subscription-data.type.mjs +1 -1
  54. package/esm2022/services/types/shipping-methods.type.mjs +1 -1
  55. package/esm2022/types/firebase-app-config.type.mjs +1 -1
  56. package/esm2022/types/index.mjs +1 -1
  57. package/fesm2022/infrab4a-connect-angular.mjs +101 -27
  58. package/fesm2022/infrab4a-connect-angular.mjs.map +1 -1
  59. package/package.json +2 -2
  60. package/services/catalog/catalog.service.d.ts +4 -4
  61. package/services/catalog/wishlist.service.d.ts +3 -2
@@ -5,7 +5,7 @@ import { FirebaseApp, provideFirebaseApp, getApp, initializeApp } from '@angular
5
5
  import * as i2 from '@angular/fire/storage';
6
6
  import { Storage, provideStorage, getStorage } from '@angular/fire/storage';
7
7
  import * as i1$2 from '@infrab4a/connect';
8
- import { ProductsIndex, AxiosAdapter, Authentication, AuthenticationFirebaseAuthService, Register, RegisterFirebaseAuthService, SignOut, RecoveryPassword, ConnectFirestoreService, UserBeautyProfileFirestoreRepository, Buy2WinFirestoreRepository, CategoryFirestoreRepository, CheckoutFirestoreRepository, CheckoutSubscriptionFirestoreRepository, CouponFirestoreRepository, CampaignHashtagFirestoreRepository, CampaignDashboardFirestoreRepository, SubscriptionEditionFirestoreRepository, HomeFirestoreRepository, LeadFirestoreRepository, LegacyOrderFirestoreRepository, ShopMenuFirestoreRepository, OrderFirestoreRepository, PaymentFirestoreRepository, ProductFirestoreRepository, ShopSettingsFirestoreRepository, SubscriptionPaymentFirestoreRepository, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, SubscriptionFirestoreRepository, UserFirestoreRepository, UserAddressFirestoreRepository, UserPaymentMethodFirestoreRepository, SubscriptionMaterializationFirestoreRepository, SubscriptionSummaryFirestoreRepository, ProductVariantFirestoreRepository, OrderBlockedFirestoreRepository, CategoryHasuraGraphQLRepository, ProductHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository, ProductReviewsHasuraGraphQLRepository, VariantHasuraGraphQLRepository, ProductStockNotificationHasuraGraphQLRepository, FilterOptionHasuraGraphQLRepository, FilterHasuraGraphQLRepository, CategoryCollectionChildrenHasuraGraphQLRepository, WishlistHasuraGraphQLRepository, Where, Shops, CheckoutTypes, CouponTypes, Exclusivities, OrderStatus, isNil, NotFoundError, Checkout, pick, LineItem, RoundProductPricesHelper, set, InvalidArgumentError, Category, PersonTypes, Wishlist, CheckoutSubscription, Product, RequiredArgumentError, add, Order, UpdateUserImage, FirebaseFileUploaderService } from '@infrab4a/connect';
8
+ import { ProductsIndex, AxiosAdapter, Authentication, AuthenticationFirebaseAuthService, Register, RegisterFirebaseAuthService, SignOut, RecoveryPassword, ConnectFirestoreService, UserBeautyProfileFirestoreRepository, Buy2WinFirestoreRepository, CategoryFirestoreRepository, CheckoutFirestoreRepository, CheckoutSubscriptionFirestoreRepository, CouponFirestoreRepository, CampaignHashtagFirestoreRepository, CampaignDashboardFirestoreRepository, SubscriptionEditionFirestoreRepository, HomeFirestoreRepository, LeadFirestoreRepository, LegacyOrderFirestoreRepository, ShopMenuFirestoreRepository, OrderFirestoreRepository, PaymentFirestoreRepository, ProductFirestoreRepository, ShopSettingsFirestoreRepository, SubscriptionPaymentFirestoreRepository, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, SubscriptionFirestoreRepository, UserFirestoreRepository, UserAddressFirestoreRepository, UserPaymentMethodFirestoreRepository, SubscriptionMaterializationFirestoreRepository, SubscriptionSummaryFirestoreRepository, ProductVariantFirestoreRepository, OrderBlockedFirestoreRepository, CategoryHasuraGraphQLRepository, ProductHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository, ProductReviewsHasuraGraphQLRepository, VariantHasuraGraphQLRepository, ProductStockNotificationHasuraGraphQLRepository, FilterOptionHasuraGraphQLRepository, FilterHasuraGraphQLRepository, CategoryCollectionChildrenHasuraGraphQLRepository, WishlistHasuraGraphQLRepository, ProductsVertexSearch, VertexAxiosAdapter, Where, Shops, CheckoutTypes, CouponTypes, Exclusivities, OrderStatus, isNil, NotFoundError, Checkout, pick, LineItem, RoundProductPricesHelper, set, InvalidArgumentError, Category, PersonTypes, Wishlist, CheckoutSubscription, Product, RequiredArgumentError, add, Order, UpdateUserImage, FirebaseFileUploaderService } from '@infrab4a/connect';
9
9
  import * as i1 from '@angular/fire/auth';
10
10
  import { Auth, provideAuth, getAuth, getIdToken, authState } from '@angular/fire/auth';
11
11
  import { isPlatformBrowser, isPlatformServer } from '@angular/common';
@@ -63,6 +63,8 @@ const HASURA_OPTIONS = 'HASURA_OPTIONS';
63
63
 
64
64
  const PERSISTENCE_PROVIDER = 'PERSISTENCE_PROVIDER';
65
65
 
66
+ const VERTEX_CONFIG = 'VERTEX_CONFIG';
67
+
66
68
  class AngularFirebaseAuthModule {
67
69
  static initializeApp(options, nameOrConfig) {
68
70
  return {
@@ -949,6 +951,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImpor
949
951
  }]
950
952
  }] });
951
953
 
954
+ class AngularVertexSeachModule {
955
+ static initializeApp(options) {
956
+ return {
957
+ ngModule: AngularVertexSeachModule,
958
+ providers: [{ provide: VERTEX_CONFIG, useValue: options }],
959
+ };
960
+ }
961
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularVertexSeachModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
962
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.3", ngImport: i0, type: AngularVertexSeachModule }); }
963
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularVertexSeachModule, providers: [
964
+ {
965
+ provide: ProductsVertexSearch,
966
+ useFactory: (configuration) => new ProductsVertexSearch(new VertexAxiosAdapter(configuration)),
967
+ deps: [VERTEX_CONFIG],
968
+ },
969
+ ] }); }
970
+ }
971
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularVertexSeachModule, decorators: [{
972
+ type: NgModule,
973
+ args: [{
974
+ providers: [
975
+ {
976
+ provide: ProductsVertexSearch,
977
+ useFactory: (configuration) => new ProductsVertexSearch(new VertexAxiosAdapter(configuration)),
978
+ deps: [VERTEX_CONFIG],
979
+ },
980
+ ],
981
+ }]
982
+ }] });
983
+
952
984
  const STORAGE_BASE_URL = 'STORAGE_BASE_URL';
953
985
 
954
986
  class CookieDataPersistence {
@@ -1085,13 +1117,18 @@ class CouponService {
1085
1117
  }
1086
1118
  async calcDiscountByType(type, value, categories, checkout) {
1087
1119
  let discount = 0;
1120
+ if (type == CouponTypes.SHIPPING) {
1121
+ const subTotal = checkout.shipping.ShippingPrice;
1122
+ const discount = subTotal * ((value > 100 ? 100 : value) / 100);
1123
+ return { discount, lineItems: checkout.lineItems };
1124
+ }
1088
1125
  let lineItensElegibleForDiscount = await this.getLineItensEligebleForDiscount(categories, checkout);
1089
1126
  const subTotal = this.calcCheckoutSubtotal(lineItensElegibleForDiscount, checkout.user);
1090
1127
  if (type == CouponTypes.ABSOLUTE) {
1091
1128
  discount = value > subTotal ? subTotal : value;
1092
1129
  }
1093
1130
  else {
1094
- discount = subTotal * (value / 100);
1131
+ discount = subTotal * ((value > 100 ? 100 : value) / 100);
1095
1132
  }
1096
1133
  const lineItems = this.calcLineItenDiscount(type, lineItensElegibleForDiscount, value, subTotal);
1097
1134
  return { discount, lineItems };
@@ -1106,7 +1143,7 @@ class CouponService {
1106
1143
  return false;
1107
1144
  }
1108
1145
  async hasProductCategories(coupon, checkout) {
1109
- if (!coupon.productsCategories || !coupon.productsCategories.length) {
1146
+ if (!coupon.productsCategories || !coupon.productsCategories?.length) {
1110
1147
  return true;
1111
1148
  }
1112
1149
  const couponCategories = await this.getCouponCategoriesId(coupon.productsCategories);
@@ -1650,13 +1687,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImpor
1650
1687
  }] }] });
1651
1688
 
1652
1689
  class CatalogService {
1653
- constructor(productRepository, productStockNotificationRepository, categoryRepository, categoryStructureAdapter, shop, productIndex) {
1690
+ constructor(productRepository, productStockNotificationRepository, categoryRepository, categoryStructureAdapter, shop, productSearch) {
1654
1691
  this.productRepository = productRepository;
1655
1692
  this.productStockNotificationRepository = productStockNotificationRepository;
1656
1693
  this.categoryRepository = categoryRepository;
1657
1694
  this.categoryStructureAdapter = categoryStructureAdapter;
1658
1695
  this.shop = shop;
1659
- this.productIndex = productIndex;
1696
+ this.productSearch = productSearch;
1660
1697
  this.productsByTerm = {};
1661
1698
  this.buildFilterQuery = ({ clubDiscount, brands, prices, gender, tags, rate, customOptions, }) => {
1662
1699
  const filters = {};
@@ -1737,7 +1774,7 @@ class CatalogService {
1737
1774
  }
1738
1775
  async findCatalog(options, limits) {
1739
1776
  if (this.hasTerm(options) && options.sort === 'most-relevant') {
1740
- const productsIds = await this.findCatalogIdsByElasticSearch(options.term);
1777
+ const productsIds = await this.findCatalogIdsBySearch(options.term);
1741
1778
  return this.findCatalogAndSortByMostRevelantByTerm(productsIds, options, limits);
1742
1779
  }
1743
1780
  if (this.hasCategory(options) && options.sort === 'most-relevant') {
@@ -1776,9 +1813,9 @@ class CatalogService {
1776
1813
  if (profile)
1777
1814
  return { tags: { operator: Where.LIKE, value: profile } };
1778
1815
  if (term)
1779
- return this.productIndex
1780
- .search(term, 999, this.shop)
1781
- .then((data) => ({ id: { operator: Where.IN, value: data.hits.map(({ _source }) => _source.id) } }));
1816
+ return this.productSearch
1817
+ .search(term, 999, this.shop == Shops.GLAMSHOP ? 'female' : 'male')
1818
+ .then((data) => ({ id: { operator: Where.IN, value: data.map((_source) => _source.id) } }));
1782
1819
  }
1783
1820
  async findCatalogAndSortByMostRevelant(mostRelevants, productIds, options, limits) {
1784
1821
  const mostRelevantProductsIds = [...new Set(mostRelevants.concat(productIds))];
@@ -1813,9 +1850,10 @@ class CatalogService {
1813
1850
  }
1814
1851
  async findCatalogAndSortByMostRevelantByTerm(productIds, options, limits) {
1815
1852
  const totalResult = await this.productRepository.findCatalog({
1816
- fields: ['id', 'stock'],
1853
+ fields: ['id', 'stock', 'gender'],
1817
1854
  filters: {
1818
1855
  id: { operator: Where.IN, value: productIds },
1856
+ published: { operator: Where.EQUALS, value: true },
1819
1857
  ...this.buildFilterQuery(options?.filters || {}),
1820
1858
  },
1821
1859
  options: {
@@ -1824,10 +1862,17 @@ class CatalogService {
1824
1862
  distinct: ['brand'],
1825
1863
  },
1826
1864
  }, options?.mainGender || this.shop === Shops.MENSMARKET ? 'male' : 'female');
1865
+ const defaultGender = options?.filters?.gender
1866
+ ? options?.filters?.gender.at(0)
1867
+ : this.shop === Shops.GLAMSHOP
1868
+ ? 'female'
1869
+ : 'male';
1827
1870
  const stockData = totalResult.data.filter((product) => product.stock.quantity > 0);
1828
1871
  const stockOut = totalResult.data.filter((product) => product.stock.quantity <= 0);
1829
- const productIdsStock = productIds.filter((product) => stockData.some((result) => result.id == product));
1830
- const productIdsStockOut = productIds.filter((product) => stockOut.some((result) => result.id == product));
1872
+ const productIdsStockGender = productIds.filter((product) => stockData.some((result) => result.id === product && (result.gender?.includes(defaultGender) || result.gender?.includes('unisex'))));
1873
+ const productIdsStockNotGender = productIds.filter((product) => stockData.some((result) => result.id === product && !result.gender?.includes(defaultGender) && !result.gender?.includes('unisex')));
1874
+ const productIdsStock = productIdsStockGender.concat(productIdsStockNotGender);
1875
+ const productIdsStockOut = productIds.filter((product) => stockOut.some((result) => result.id === product));
1831
1876
  const limitedProductId = productIdsStock
1832
1877
  .concat(productIdsStockOut)
1833
1878
  .slice(limits.offset, limits.offset + limits.limit);
@@ -1845,19 +1890,14 @@ class CatalogService {
1845
1890
  distinct: totalResult.distinct,
1846
1891
  };
1847
1892
  }
1848
- async findCatalogIdsByElasticSearch(term) {
1893
+ async findCatalogIdsBySearch(term, preview = false) {
1849
1894
  if (this.productsByTerm[term])
1850
1895
  return this.productsByTerm[term];
1851
- return (this.productsByTerm[term] = await this.productIndex
1852
- .search(term, 999, this.shop)
1853
- .then(({ hits: products }) => {
1854
- const withStock = products.filter(({ _source }) => _source.stock.quantity > 0);
1855
- const withOutStock = products.filter(({ _source }) => _source.stock.quantity <= 0);
1856
- const sorted = [...withStock, ...withOutStock];
1857
- return [...new Set(sorted.map(({ _source }) => _source.id))];
1858
- }));
1896
+ return (this.productsByTerm[term] = await this.productSearch
1897
+ .search(term, 999, this.shop == Shops.GLAMSHOP ? 'female' : 'male')
1898
+ .then((products) => [...new Set(products.map((product) => product.id))]));
1859
1899
  }
1860
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CatalogService, deps: [{ token: 'ProductRepository' }, { token: 'ProductStockNotificationRepository' }, { token: 'CategoryRepository' }, { token: CATEGORY_STRUCTURE }, { token: DEFAULT_SHOP }, { token: i1$2.ProductsIndex }], target: i0.ɵɵFactoryTarget.Injectable }); }
1900
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CatalogService, deps: [{ token: 'ProductRepository' }, { token: 'ProductStockNotificationRepository' }, { token: 'CategoryRepository' }, { token: CATEGORY_STRUCTURE }, { token: DEFAULT_SHOP }, { token: 'ProductSearch' }], target: i0.ɵɵFactoryTarget.Injectable }); }
1861
1901
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CatalogService }); }
1862
1902
  }
1863
1903
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CatalogService, decorators: [{
@@ -1877,7 +1917,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImpor
1877
1917
  }] }, { type: i1$2.Shops, decorators: [{
1878
1918
  type: Inject,
1879
1919
  args: [DEFAULT_SHOP]
1880
- }] }, { type: i1$2.ProductsIndex }] });
1920
+ }] }, { type: undefined, decorators: [{
1921
+ type: Inject,
1922
+ args: ['ProductSearch']
1923
+ }] }] });
1881
1924
 
1882
1925
  class CategoryService {
1883
1926
  constructor(productRepository, categoryRepository, categoryFilterRepository, categoryStructureAdapter, shop) {
@@ -1944,11 +1987,12 @@ __decorate([
1944
1987
  ], CategoryWithTree.prototype, "children", void 0);
1945
1988
 
1946
1989
  class WishlistService {
1947
- constructor(wishlistRepository, shop, productRepository, categoryFilterRepository, categoryRepository, productStockNotificationRepository, productIndex) {
1990
+ constructor(wishlistRepository, shop, productRepository, categoryFilterRepository, categoryRepository, productStockNotificationRepository, productSearch) {
1948
1991
  this.wishlistRepository = wishlistRepository;
1949
1992
  this.shop = shop;
1993
+ this.productSearch = productSearch;
1950
1994
  const categoryStructureAdapter = new NewCategoryStructureAdapter(wishlistRepository);
1951
- this.catalogService = new CatalogService(productRepository, productStockNotificationRepository, categoryRepository, categoryStructureAdapter, shop, productIndex);
1995
+ this.catalogService = new CatalogService(productRepository, productStockNotificationRepository, categoryRepository, categoryStructureAdapter, shop, productSearch);
1952
1996
  this.categoryService = new CategoryService(productRepository, categoryRepository, categoryFilterRepository, categoryStructureAdapter, shop);
1953
1997
  }
1954
1998
  getCatalogService() {
@@ -1981,6 +2025,21 @@ class WishlistService {
1981
2025
  personType: personType ?? PersonTypes.NONE,
1982
2026
  personIsSubscriber: personIsSubscriber ?? false,
1983
2027
  };
2028
+ const hasWishlist = await this.wishlistRepository
2029
+ .find({
2030
+ filters: {
2031
+ personId,
2032
+ },
2033
+ options: {
2034
+ enableCount: false,
2035
+ },
2036
+ orderBy: {
2037
+ id: 'asc',
2038
+ },
2039
+ })
2040
+ .then((res) => res.data);
2041
+ if (hasWishlist.length)
2042
+ return hasWishlist.at(0);
1984
2043
  const newWishlist = await this.wishlistRepository.create(data);
1985
2044
  await this.wishlistRepository.update({ id: newWishlist.id, slug: newWishlist.id });
1986
2045
  return Wishlist.toInstance({ ...newWishlist.toPlain(), slug: newWishlist.id });
@@ -2039,7 +2098,7 @@ class WishlistService {
2039
2098
  }
2040
2099
  return wishlist;
2041
2100
  }
2042
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: WishlistService, deps: [{ token: 'WishlistRepository' }, { token: DEFAULT_SHOP }, { token: 'ProductRepository' }, { token: 'CategoryFilterRepository' }, { token: 'CategoryRepository' }, { token: 'ProductStockNotificationRepository' }, { token: i1$2.ProductsIndex }], target: i0.ɵɵFactoryTarget.Injectable }); }
2101
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: WishlistService, deps: [{ token: 'WishlistRepository' }, { token: DEFAULT_SHOP }, { token: 'ProductRepository' }, { token: 'CategoryFilterRepository' }, { token: 'CategoryRepository' }, { token: 'ProductStockNotificationRepository' }, { token: 'ProductSearch' }], target: i0.ɵɵFactoryTarget.Injectable }); }
2043
2102
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: WishlistService }); }
2044
2103
  }
2045
2104
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: WishlistService, decorators: [{
@@ -2062,7 +2121,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImpor
2062
2121
  }] }, { type: undefined, decorators: [{
2063
2122
  type: Inject,
2064
2123
  args: ['ProductStockNotificationRepository']
2065
- }] }, { type: i1$2.ProductsIndex }] });
2124
+ }] }, { type: undefined, decorators: [{
2125
+ type: Inject,
2126
+ args: ['ProductSearch']
2127
+ }] }] });
2066
2128
 
2067
2129
  class CheckoutSubscriptionService {
2068
2130
  constructor(checkoutSubscriptionRepository, dataPersistence, couponService) {
@@ -2367,6 +2429,7 @@ class AngularConnectModule {
2367
2429
  ...(isNil(options?.firebase) ? [] : [{ provide: FIREBASE_OPTIONS, useValue: options?.firebase }]),
2368
2430
  ...(isNil(options?.firebase) ? [] : [{ provide: FIREBASE_APP_NAME, useValue: nameOrConfig }]),
2369
2431
  ...(isNil(options?.elasticSearch) ? [] : [{ provide: ES_CONFIG, useValue: options.elasticSearch }]),
2432
+ ...(isNil(options?.vertexConfig) ? [] : [{ provide: VERTEX_CONFIG, useValue: options.vertexConfig }]),
2370
2433
  ...(isNil(options?.hasura) ? [] : [{ provide: HASURA_OPTIONS, useValue: options.hasura }]),
2371
2434
  ...(isNil(options?.backendUrl) ? [] : [{ provide: BACKEND_URL, useValue: options.backendUrl }]),
2372
2435
  ...(isNil(options?.storageBaseUrl) ? [] : [{ provide: STORAGE_BASE_URL, useValue: options.storageBaseUrl }]),
@@ -2375,6 +2438,7 @@ class AngularConnectModule {
2375
2438
  }
2376
2439
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularConnectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2377
2440
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.3", ngImport: i0, type: AngularConnectModule, imports: [i1$4.FirebaseAppModule, i2.StorageModule, AngularElasticSeachModule,
2441
+ AngularVertexSeachModule,
2378
2442
  AngularFirebaseAuthModule,
2379
2443
  AngularFirestoreModule,
2380
2444
  AngularHasuraGraphQLModule] }); }
@@ -2404,6 +2468,10 @@ class AngularConnectModule {
2404
2468
  },
2405
2469
  deps: [Storage, STORAGE_BASE_URL],
2406
2470
  },
2471
+ {
2472
+ provide: 'ProductSearch',
2473
+ useExisting: ProductsVertexSearch,
2474
+ },
2407
2475
  ], imports: [provideFirebaseApp((injector) => {
2408
2476
  const appName = injector.get(FIREBASE_APP_NAME) || '[DEFAULT]';
2409
2477
  try {
@@ -2415,6 +2483,7 @@ class AngularConnectModule {
2415
2483
  }),
2416
2484
  provideStorage((injector) => getStorage(injector.get(FirebaseApp))),
2417
2485
  AngularElasticSeachModule,
2486
+ AngularVertexSeachModule,
2418
2487
  AngularFirebaseAuthModule,
2419
2488
  AngularFirestoreModule,
2420
2489
  AngularHasuraGraphQLModule] }); }
@@ -2434,6 +2503,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImpor
2434
2503
  }),
2435
2504
  provideStorage((injector) => getStorage(injector.get(FirebaseApp))),
2436
2505
  AngularElasticSeachModule,
2506
+ AngularVertexSeachModule,
2437
2507
  AngularFirebaseAuthModule,
2438
2508
  AngularFirestoreModule,
2439
2509
  AngularHasuraGraphQLModule,
@@ -2464,6 +2534,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImpor
2464
2534
  },
2465
2535
  deps: [Storage, STORAGE_BASE_URL],
2466
2536
  },
2537
+ {
2538
+ provide: 'ProductSearch',
2539
+ useExisting: ProductsVertexSearch,
2540
+ },
2467
2541
  ],
2468
2542
  }]
2469
2543
  }] });