@infrab4a/connect-angular 4.9.3 → 4.10.0-beta.0
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/angular-connect.module.d.ts +5 -4
- package/angular-vertex-search.module.d.ts +9 -0
- package/consts/index.d.ts +1 -0
- package/consts/vertex-config.const.d.ts +1 -0
- package/esm2020/angular-connect.module.mjs +13 -8
- package/esm2020/angular-vertex-search.module.mjs +34 -0
- package/esm2020/consts/index.mjs +2 -1
- package/esm2020/consts/vertex-config.const.mjs +2 -0
- package/esm2020/services/cart.service.mjs +7 -9
- package/esm2020/services/catalog/catalog.service.mjs +27 -16
- package/esm2020/services/catalog/wishlist.service.mjs +6 -6
- package/esm2020/services/coupon.service.mjs +8 -13
- package/fesm2015/infrab4a-connect-angular.mjs +113 -72
- package/fesm2015/infrab4a-connect-angular.mjs.map +1 -1
- package/fesm2020/infrab4a-connect-angular.mjs +113 -72
- 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/wishlist.service.d.ts +2 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { InjectionToken, NgModule, PLATFORM_ID, Injectable, Inject } from '@angular/core';
|
|
3
3
|
import * as i1$4 from '@angular/fire/app';
|
|
4
4
|
import { FirebaseApp, provideFirebaseApp, getApp, initializeApp } from '@angular/fire/app';
|
|
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 {
|
|
8
|
+
import { Authentication, AuthenticationFirebaseAuthService, Register, RegisterFirebaseAuthService, SignOut, RecoveryPassword, ProductsIndex, AxiosAdapter, 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, DiscoveryEngineSearch, Where, Shops, CheckoutTypes, CouponTypes, Exclusivities, 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';
|
|
@@ -18,44 +18,14 @@ import { __awaiter, __decorate, __metadata } from 'tslib';
|
|
|
18
18
|
import { Type } from 'class-transformer';
|
|
19
19
|
import * as i1$3 from '@angular/common/http';
|
|
20
20
|
|
|
21
|
-
const ES_CONFIG = 'ES_CONFIG';
|
|
22
|
-
|
|
23
|
-
class AngularElasticSeachModule {
|
|
24
|
-
static initializeApp(options) {
|
|
25
|
-
return {
|
|
26
|
-
ngModule: AngularElasticSeachModule,
|
|
27
|
-
providers: [{ provide: ES_CONFIG, useValue: options }],
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
AngularElasticSeachModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
32
|
-
AngularElasticSeachModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule });
|
|
33
|
-
AngularElasticSeachModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule, providers: [
|
|
34
|
-
{
|
|
35
|
-
provide: ProductsIndex,
|
|
36
|
-
useFactory: (configuration) => new ProductsIndex(new AxiosAdapter(configuration)),
|
|
37
|
-
deps: [ES_CONFIG],
|
|
38
|
-
},
|
|
39
|
-
] });
|
|
40
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule, decorators: [{
|
|
41
|
-
type: NgModule,
|
|
42
|
-
args: [{
|
|
43
|
-
providers: [
|
|
44
|
-
{
|
|
45
|
-
provide: ProductsIndex,
|
|
46
|
-
useFactory: (configuration) => new ProductsIndex(new AxiosAdapter(configuration)),
|
|
47
|
-
deps: [ES_CONFIG],
|
|
48
|
-
},
|
|
49
|
-
],
|
|
50
|
-
}]
|
|
51
|
-
}] });
|
|
52
|
-
|
|
53
21
|
const BACKEND_URL = 'BACKEND_URL';
|
|
54
22
|
|
|
55
23
|
const CATEGORY_STRUCTURE = 'CATEGORY_STRUCTURE';
|
|
56
24
|
|
|
57
25
|
const DEFAULT_SHOP = 'DEFAULT_SHOP';
|
|
58
26
|
|
|
27
|
+
const ES_CONFIG = 'ES_CONFIG';
|
|
28
|
+
|
|
59
29
|
const FIREBASE_APP_NAME = new InjectionToken('firebaseAppName');
|
|
60
30
|
const FIREBASE_OPTIONS = new InjectionToken('firebaseOptions');
|
|
61
31
|
|
|
@@ -63,6 +33,8 @@ const HASURA_OPTIONS = 'HASURA_OPTIONS';
|
|
|
63
33
|
|
|
64
34
|
const PERSISTENCE_PROVIDER = 'PERSISTENCE_PROVIDER';
|
|
65
35
|
|
|
36
|
+
const VERTEX_CONFIG = 'VERTEX_CONFIG';
|
|
37
|
+
|
|
66
38
|
class AngularFirebaseAuthModule {
|
|
67
39
|
static initializeApp(options, nameOrConfig) {
|
|
68
40
|
return {
|
|
@@ -171,6 +143,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
171
143
|
}]
|
|
172
144
|
}] });
|
|
173
145
|
|
|
146
|
+
class AngularElasticSeachModule {
|
|
147
|
+
static initializeApp(options) {
|
|
148
|
+
return {
|
|
149
|
+
ngModule: AngularElasticSeachModule,
|
|
150
|
+
providers: [{ provide: ES_CONFIG, useValue: options }],
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
AngularElasticSeachModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
155
|
+
AngularElasticSeachModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule });
|
|
156
|
+
AngularElasticSeachModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule, providers: [
|
|
157
|
+
{
|
|
158
|
+
provide: ProductsIndex,
|
|
159
|
+
useFactory: (configuration) => new ProductsIndex(new AxiosAdapter(configuration)),
|
|
160
|
+
deps: [ES_CONFIG],
|
|
161
|
+
},
|
|
162
|
+
] });
|
|
163
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule, decorators: [{
|
|
164
|
+
type: NgModule,
|
|
165
|
+
args: [{
|
|
166
|
+
providers: [
|
|
167
|
+
{
|
|
168
|
+
provide: ProductsIndex,
|
|
169
|
+
useFactory: (configuration) => new ProductsIndex(new AxiosAdapter(configuration)),
|
|
170
|
+
deps: [ES_CONFIG],
|
|
171
|
+
},
|
|
172
|
+
],
|
|
173
|
+
}]
|
|
174
|
+
}] });
|
|
175
|
+
|
|
174
176
|
class MobileOperationSystemCheckerHelper {
|
|
175
177
|
static isAppleDevice() {
|
|
176
178
|
var _a, _b;
|
|
@@ -950,6 +952,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
950
952
|
}]
|
|
951
953
|
}] });
|
|
952
954
|
|
|
955
|
+
class AngularVertexSeachModule {
|
|
956
|
+
static initializeApp(options) {
|
|
957
|
+
return {
|
|
958
|
+
ngModule: AngularVertexSeachModule,
|
|
959
|
+
providers: [{ provide: VERTEX_CONFIG, useValue: options }],
|
|
960
|
+
};
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
AngularVertexSeachModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularVertexSeachModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
964
|
+
AngularVertexSeachModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularVertexSeachModule });
|
|
965
|
+
AngularVertexSeachModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularVertexSeachModule, providers: [
|
|
966
|
+
{
|
|
967
|
+
provide: ProductsVertexSearch,
|
|
968
|
+
useFactory: (configuration) => new ProductsVertexSearch(new DiscoveryEngineSearch(configuration)),
|
|
969
|
+
deps: [VERTEX_CONFIG],
|
|
970
|
+
},
|
|
971
|
+
] });
|
|
972
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularVertexSeachModule, decorators: [{
|
|
973
|
+
type: NgModule,
|
|
974
|
+
args: [{
|
|
975
|
+
providers: [
|
|
976
|
+
{
|
|
977
|
+
provide: ProductsVertexSearch,
|
|
978
|
+
useFactory: (configuration) => new ProductsVertexSearch(new DiscoveryEngineSearch(configuration)),
|
|
979
|
+
deps: [VERTEX_CONFIG],
|
|
980
|
+
},
|
|
981
|
+
],
|
|
982
|
+
}]
|
|
983
|
+
}] });
|
|
984
|
+
|
|
953
985
|
const STORAGE_BASE_URL = 'STORAGE_BASE_URL';
|
|
954
986
|
|
|
955
987
|
class CookieDataPersistence {
|
|
@@ -1054,11 +1086,11 @@ class CouponService {
|
|
|
1054
1086
|
throw 'Limite de uso atingido';
|
|
1055
1087
|
}
|
|
1056
1088
|
if (!couponUseLimits.unlimited || couponUseLimits.limitedPerUser) {
|
|
1057
|
-
const
|
|
1058
|
-
if (!couponUseLimits.unlimited && couponUseLimits.total &&
|
|
1089
|
+
const orders = yield this.getOrdersWithCoupon(coupon);
|
|
1090
|
+
if (!couponUseLimits.unlimited && couponUseLimits.total && orders.length >= couponUseLimits.total)
|
|
1059
1091
|
throw 'Limite de uso atingido.';
|
|
1060
1092
|
if (couponUseLimits.limitedPerUser) {
|
|
1061
|
-
const ordersWithUser = this.countOrdersWithUser(
|
|
1093
|
+
const ordersWithUser = this.countOrdersWithUser(orders, checkout.user.email);
|
|
1062
1094
|
if (ordersWithUser > 0)
|
|
1063
1095
|
throw 'Limite de uso por usuário atingido.';
|
|
1064
1096
|
}
|
|
@@ -1205,7 +1237,7 @@ class CouponService {
|
|
|
1205
1237
|
.find({
|
|
1206
1238
|
filters: {
|
|
1207
1239
|
coupon: { id: coupon.id },
|
|
1208
|
-
|
|
1240
|
+
payment: { status: 'paid' },
|
|
1209
1241
|
},
|
|
1210
1242
|
})
|
|
1211
1243
|
.then((result) => result.data);
|
|
@@ -1217,7 +1249,7 @@ class CouponService {
|
|
|
1217
1249
|
.find({
|
|
1218
1250
|
filters: {
|
|
1219
1251
|
user: { email: { operator: Where.EQUALS, value: email } },
|
|
1220
|
-
|
|
1252
|
+
payment: { status: 'paid' },
|
|
1221
1253
|
},
|
|
1222
1254
|
})
|
|
1223
1255
|
.then((result) => result.data);
|
|
@@ -1229,12 +1261,7 @@ class CouponService {
|
|
|
1229
1261
|
getCouponUseLimits(coupon, checkoutType, user) {
|
|
1230
1262
|
let couponUseLimits;
|
|
1231
1263
|
if (checkoutType == CheckoutTypes.ECOMMERCE || checkoutType == CheckoutTypes.ALL) {
|
|
1232
|
-
|
|
1233
|
-
(coupon.exclusivityType.at(0) === Exclusivities.SPECIFIC_USER ||
|
|
1234
|
-
coupon.exclusivityType.at(0) === Exclusivities.COLLABORATORS))
|
|
1235
|
-
couponUseLimits = coupon.useLimits.non_subscriber;
|
|
1236
|
-
else
|
|
1237
|
-
couponUseLimits = user && user.isSubscriber ? coupon.useLimits.subscriber : coupon.useLimits.non_subscriber;
|
|
1264
|
+
couponUseLimits = user && user.isSubscriber ? coupon.useLimits.subscriber : coupon.useLimits.non_subscriber;
|
|
1238
1265
|
}
|
|
1239
1266
|
else {
|
|
1240
1267
|
couponUseLimits = coupon.useLimits.subscription;
|
|
@@ -1359,7 +1386,6 @@ class CartService {
|
|
|
1359
1386
|
if (index > -1) {
|
|
1360
1387
|
checkoutLoaded.lineItems[index].quantity += quantity;
|
|
1361
1388
|
checkoutLoaded.lineItems[index].pricePaid = lineItem.pricePaid;
|
|
1362
|
-
checkoutLoaded.lineItems[index].price = lineItem.price;
|
|
1363
1389
|
}
|
|
1364
1390
|
else
|
|
1365
1391
|
checkoutLoaded.lineItems = items.concat(checkoutLoaded.lineItems ? checkoutLoaded.lineItems.concat([lineItem]) : [lineItem]);
|
|
@@ -1378,15 +1404,14 @@ class CartService {
|
|
|
1378
1404
|
if (this.checkMaxStock(product.stock.quantity, item.quantity || 0, quantity || 0))
|
|
1379
1405
|
throw new Error('Desculpe! Temos apenas ' + ((_c = product.stock) === null || _c === void 0 ? void 0 : _c.quantity) + ' em estoque.');
|
|
1380
1406
|
const image = item.image || ((_d = item.images) === null || _d === void 0 ? void 0 : _d.shift());
|
|
1381
|
-
const { id, name, EAN, slug, weight, sku, type } = item;
|
|
1407
|
+
const { id, name, EAN, slug, stock, price, weight, sku, type } = item;
|
|
1382
1408
|
const isGift = item.isGift || null;
|
|
1383
1409
|
const pricePaid = this.getProductPrice({
|
|
1384
|
-
product:
|
|
1410
|
+
product: item,
|
|
1385
1411
|
shop: checkout.shop || this.defaultShop,
|
|
1386
1412
|
isSubscriber: (_e = checkout.user) === null || _e === void 0 ? void 0 : _e.isSubscriber,
|
|
1387
1413
|
});
|
|
1388
1414
|
RoundProductPricesHelper.roundProductPrices(item);
|
|
1389
|
-
RoundProductPricesHelper.roundProductPrices(product);
|
|
1390
1415
|
return {
|
|
1391
1416
|
checkout,
|
|
1392
1417
|
lineItem: LineItem.toInstance({
|
|
@@ -1396,8 +1421,8 @@ class CartService {
|
|
|
1396
1421
|
brand: product.brand,
|
|
1397
1422
|
slug: slug !== null && slug !== void 0 ? slug : product.slug,
|
|
1398
1423
|
sku: sku !== null && sku !== void 0 ? sku : product.sku,
|
|
1399
|
-
stock
|
|
1400
|
-
price: this.roundPrice(
|
|
1424
|
+
stock,
|
|
1425
|
+
price: this.roundPrice(price),
|
|
1401
1426
|
image,
|
|
1402
1427
|
weight: weight !== null && weight !== void 0 ? weight : product.weight,
|
|
1403
1428
|
quantity: (item.quantity || 0) + (quantity || 0),
|
|
@@ -1688,13 +1713,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1688
1713
|
} });
|
|
1689
1714
|
|
|
1690
1715
|
class CatalogService {
|
|
1691
|
-
constructor(productRepository, productStockNotificationRepository, categoryRepository, categoryStructureAdapter, shop,
|
|
1716
|
+
constructor(productRepository, productStockNotificationRepository, categoryRepository, categoryStructureAdapter, shop,
|
|
1717
|
+
// private readonly productIndex: ProductsIndex,
|
|
1718
|
+
productVertexSearch) {
|
|
1692
1719
|
this.productRepository = productRepository;
|
|
1693
1720
|
this.productStockNotificationRepository = productStockNotificationRepository;
|
|
1694
1721
|
this.categoryRepository = categoryRepository;
|
|
1695
1722
|
this.categoryStructureAdapter = categoryStructureAdapter;
|
|
1696
1723
|
this.shop = shop;
|
|
1697
|
-
this.
|
|
1724
|
+
this.productVertexSearch = productVertexSearch;
|
|
1698
1725
|
this.productsByTerm = {};
|
|
1699
1726
|
this.buildFilterQuery = ({ clubDiscount, brands, prices, gender, tags, rate, customOptions, }) => {
|
|
1700
1727
|
const filters = {};
|
|
@@ -1784,7 +1811,7 @@ class CatalogService {
|
|
|
1784
1811
|
findCatalog(options, limits) {
|
|
1785
1812
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1786
1813
|
if (this.hasTerm(options) && options.sort === 'most-relevant') {
|
|
1787
|
-
const productsIds = yield this.
|
|
1814
|
+
const productsIds = yield this.findCatalogIdsByVertexAiSearch(options.term);
|
|
1788
1815
|
return this.findCatalogAndSortByMostRevelantByTerm(productsIds, options, limits);
|
|
1789
1816
|
}
|
|
1790
1817
|
if (this.hasCategory(options) && options.sort === 'most-relevant') {
|
|
@@ -1810,9 +1837,9 @@ class CatalogService {
|
|
|
1810
1837
|
if (profile)
|
|
1811
1838
|
return { tags: { operator: Where.LIKE, value: profile } };
|
|
1812
1839
|
if (term)
|
|
1813
|
-
return this.
|
|
1840
|
+
return this.productVertexSearch
|
|
1814
1841
|
.search(term, 999, this.shop)
|
|
1815
|
-
.then((data) => ({ id: { operator: Where.IN, value: data.
|
|
1842
|
+
.then((data) => ({ id: { operator: Where.IN, value: data.map((_source) => _source.id) } }));
|
|
1816
1843
|
});
|
|
1817
1844
|
}
|
|
1818
1845
|
findCatalogAndSortByMostRevelant(mostRelevants, productIds, options, limits) {
|
|
@@ -1878,22 +1905,31 @@ class CatalogService {
|
|
|
1878
1905
|
};
|
|
1879
1906
|
});
|
|
1880
1907
|
}
|
|
1881
|
-
findCatalogIdsByElasticSearch(term) {
|
|
1908
|
+
// private async findCatalogIdsByElasticSearch(term: string): Promise<string[]> {
|
|
1909
|
+
// if (this.productsByTerm[term]) return this.productsByTerm[term]
|
|
1910
|
+
// return (this.productsByTerm[term] = await this.productIndex
|
|
1911
|
+
// .search(term, 999, this.shop)
|
|
1912
|
+
// .then(({ hits: products }) => {
|
|
1913
|
+
// const withStock = products.filter(({ _source }) => _source.stock.quantity > 0)
|
|
1914
|
+
// const withOutStock = products.filter(({ _source }) => _source.stock.quantity <= 0)
|
|
1915
|
+
// const sorted = [...withStock, ...withOutStock]
|
|
1916
|
+
// return [...new Set(sorted.map(({ _source }) => _source.id))]
|
|
1917
|
+
// }))
|
|
1918
|
+
// }
|
|
1919
|
+
findCatalogIdsByVertexAiSearch(term) {
|
|
1882
1920
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1883
1921
|
if (this.productsByTerm[term])
|
|
1884
1922
|
return this.productsByTerm[term];
|
|
1885
|
-
return (this.productsByTerm[term] = yield this.
|
|
1886
|
-
.
|
|
1887
|
-
.
|
|
1888
|
-
const withStock = products.filter(({ _source }) => _source.stock.quantity > 0);
|
|
1889
|
-
const withOutStock = products.filter(({ _source }) => _source.stock.quantity <= 0);
|
|
1923
|
+
return (this.productsByTerm[term] = yield this.productVertexSearch.search(term, 999, this.shop).then((products) => {
|
|
1924
|
+
const withStock = products.filter((_source) => _source.stock > 0);
|
|
1925
|
+
const withOutStock = products.filter((_source) => _source.stock <= 0);
|
|
1890
1926
|
const sorted = [...withStock, ...withOutStock];
|
|
1891
|
-
return [...new Set(sorted.map((
|
|
1927
|
+
return [...new Set(sorted.map((products) => products.id))];
|
|
1892
1928
|
}));
|
|
1893
1929
|
});
|
|
1894
1930
|
}
|
|
1895
1931
|
}
|
|
1896
|
-
CatalogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService, deps: [{ token: 'ProductRepository' }, { token: 'ProductStockNotificationRepository' }, { token: 'CategoryRepository' }, { token: CATEGORY_STRUCTURE }, { token: DEFAULT_SHOP }, { token: i1$2.
|
|
1932
|
+
CatalogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService, deps: [{ token: 'ProductRepository' }, { token: 'ProductStockNotificationRepository' }, { token: 'CategoryRepository' }, { token: CATEGORY_STRUCTURE }, { token: DEFAULT_SHOP }, { token: i1$2.ProductsVertexSearch }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1897
1933
|
CatalogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService });
|
|
1898
1934
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService, decorators: [{
|
|
1899
1935
|
type: Injectable
|
|
@@ -1913,7 +1949,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1913
1949
|
}] }, { type: i1$2.Shops, decorators: [{
|
|
1914
1950
|
type: Inject,
|
|
1915
1951
|
args: [DEFAULT_SHOP]
|
|
1916
|
-
}] }, { type: i1$2.
|
|
1952
|
+
}] }, { type: i1$2.ProductsVertexSearch }];
|
|
1917
1953
|
} });
|
|
1918
1954
|
|
|
1919
1955
|
class CategoryService {
|
|
@@ -1987,11 +2023,11 @@ __decorate([
|
|
|
1987
2023
|
], CategoryWithTree.prototype, "children", void 0);
|
|
1988
2024
|
|
|
1989
2025
|
class WishlistService {
|
|
1990
|
-
constructor(wishlistRepository, shop, productRepository, categoryFilterRepository, categoryRepository, productStockNotificationRepository,
|
|
2026
|
+
constructor(wishlistRepository, shop, productRepository, categoryFilterRepository, categoryRepository, productStockNotificationRepository, productVertexSearch) {
|
|
1991
2027
|
this.wishlistRepository = wishlistRepository;
|
|
1992
2028
|
this.shop = shop;
|
|
1993
2029
|
const categoryStructureAdapter = new NewCategoryStructureAdapter(wishlistRepository);
|
|
1994
|
-
this.catalogService = new CatalogService(productRepository, productStockNotificationRepository, categoryRepository, categoryStructureAdapter, shop,
|
|
2030
|
+
this.catalogService = new CatalogService(productRepository, productStockNotificationRepository, categoryRepository, categoryStructureAdapter, shop, productVertexSearch);
|
|
1995
2031
|
this.categoryService = new CategoryService(productRepository, categoryRepository, categoryFilterRepository, categoryStructureAdapter, shop);
|
|
1996
2032
|
}
|
|
1997
2033
|
getCatalogService() {
|
|
@@ -2089,7 +2125,7 @@ class WishlistService {
|
|
|
2089
2125
|
});
|
|
2090
2126
|
}
|
|
2091
2127
|
}
|
|
2092
|
-
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: 'CategoryRepository' }, { token: 'ProductStockNotificationRepository' }, { token: i1$2.
|
|
2128
|
+
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: 'CategoryRepository' }, { token: 'ProductStockNotificationRepository' }, { token: i1$2.ProductsVertexSearch }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2093
2129
|
WishlistService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService });
|
|
2094
2130
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, decorators: [{
|
|
2095
2131
|
type: Injectable
|
|
@@ -2112,7 +2148,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
2112
2148
|
}] }, { type: undefined, decorators: [{
|
|
2113
2149
|
type: Inject,
|
|
2114
2150
|
args: ['ProductStockNotificationRepository']
|
|
2115
|
-
}] }, { type: i1$2.
|
|
2151
|
+
}] }, { type: i1$2.ProductsVertexSearch }];
|
|
2116
2152
|
} });
|
|
2117
2153
|
|
|
2118
2154
|
class CheckoutSubscriptionService {
|
|
@@ -2425,6 +2461,7 @@ class AngularConnectModule {
|
|
|
2425
2461
|
...(isNil(options === null || options === void 0 ? void 0 : options.firebase) ? [] : [{ provide: FIREBASE_OPTIONS, useValue: options === null || options === void 0 ? void 0 : options.firebase }]),
|
|
2426
2462
|
...(isNil(options === null || options === void 0 ? void 0 : options.firebase) ? [] : [{ provide: FIREBASE_APP_NAME, useValue: nameOrConfig }]),
|
|
2427
2463
|
...(isNil(options === null || options === void 0 ? void 0 : options.elasticSearch) ? [] : [{ provide: ES_CONFIG, useValue: options.elasticSearch }]),
|
|
2464
|
+
...(isNil(options === null || options === void 0 ? void 0 : options.vertexAiConfig) ? [] : [{ provide: VERTEX_CONFIG, useValue: options.vertexAiConfig }]),
|
|
2428
2465
|
...(isNil(options === null || options === void 0 ? void 0 : options.hasura) ? [] : [{ provide: HASURA_OPTIONS, useValue: options.hasura }]),
|
|
2429
2466
|
...(isNil(options === null || options === void 0 ? void 0 : options.backendUrl) ? [] : [{ provide: BACKEND_URL, useValue: options.backendUrl }]),
|
|
2430
2467
|
...(isNil(options === null || options === void 0 ? void 0 : options.storageBaseUrl) ? [] : [{ provide: STORAGE_BASE_URL, useValue: options.storageBaseUrl }]),
|
|
@@ -2433,7 +2470,9 @@ class AngularConnectModule {
|
|
|
2433
2470
|
}
|
|
2434
2471
|
}
|
|
2435
2472
|
AngularConnectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2436
|
-
AngularConnectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, imports: [i1$4.FirebaseAppModule, i2.StorageModule,
|
|
2473
|
+
AngularConnectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, imports: [i1$4.FirebaseAppModule, i2.StorageModule,
|
|
2474
|
+
// AngularElasticSeachModule,
|
|
2475
|
+
AngularVertexSeachModule,
|
|
2437
2476
|
AngularFirebaseAuthModule,
|
|
2438
2477
|
AngularFirestoreModule,
|
|
2439
2478
|
AngularHasuraGraphQLModule] });
|
|
@@ -2473,7 +2512,8 @@ AngularConnectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ve
|
|
|
2473
2512
|
}
|
|
2474
2513
|
}),
|
|
2475
2514
|
provideStorage((injector) => getStorage(injector.get(FirebaseApp))),
|
|
2476
|
-
AngularElasticSeachModule,
|
|
2515
|
+
// AngularElasticSeachModule,
|
|
2516
|
+
AngularVertexSeachModule,
|
|
2477
2517
|
AngularFirebaseAuthModule,
|
|
2478
2518
|
AngularFirestoreModule,
|
|
2479
2519
|
AngularHasuraGraphQLModule] });
|
|
@@ -2491,7 +2531,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
2491
2531
|
}
|
|
2492
2532
|
}),
|
|
2493
2533
|
provideStorage((injector) => getStorage(injector.get(FirebaseApp))),
|
|
2494
|
-
AngularElasticSeachModule,
|
|
2534
|
+
// AngularElasticSeachModule,
|
|
2535
|
+
AngularVertexSeachModule,
|
|
2495
2536
|
AngularFirebaseAuthModule,
|
|
2496
2537
|
AngularFirestoreModule,
|
|
2497
2538
|
AngularHasuraGraphQLModule,
|