@infrab4a/connect-angular 4.0.7-beta.0 → 4.1.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-firestore.module.d.ts +1 -1
- package/angular-hasura-graphql.module.d.ts +1 -1
- package/{esm2020 → esm2022}/angular-connect.module.mjs +17 -17
- package/esm2022/angular-elastic-search.module.mjs +34 -0
- package/esm2022/angular-firebase-auth.module.mjs +130 -0
- package/esm2022/angular-firestore.module.mjs +503 -0
- package/esm2022/angular-hasura-graphql.module.mjs +243 -0
- package/{esm2020 → esm2022}/services/auth.service.mjs +4 -4
- package/{esm2020 → esm2022}/services/cart.service.mjs +4 -4
- package/esm2022/services/catalog/adapters/new-category-structure.adapter.mjs +42 -0
- package/{esm2020 → esm2022}/services/catalog/adapters/old-category-structure.adapter.mjs +4 -4
- package/esm2022/services/catalog/catalog.service.mjs +122 -0
- package/esm2022/services/catalog/category.service.mjs +51 -0
- package/esm2022/services/catalog/wishlist.service.mjs +105 -0
- package/{esm2020 → esm2022}/services/checkout-subscription.service.mjs +4 -4
- package/{esm2020 → esm2022}/services/checkout.service.mjs +4 -4
- package/{esm2020 → esm2022}/services/coupon.service.mjs +4 -4
- package/{esm2020 → esm2022}/services/home-shop.service.mjs +11 -11
- package/{esm2020 → esm2022}/services/order.service.mjs +4 -4
- package/{esm2020 → esm2022}/services/shipping.service.mjs +4 -4
- package/{fesm2020 → fesm2022}/infrab4a-connect-angular.mjs +505 -465
- package/fesm2022/infrab4a-connect-angular.mjs.map +1 -0
- package/package.json +9 -16
- package/services/cart.service.d.ts +1 -1
- package/services/catalog/adapters/new-category-structure.adapter.d.ts +5 -3
- package/services/catalog/catalog.service.d.ts +5 -5
- package/services/catalog/category.service.d.ts +1 -1
- package/services/catalog/types/product-sort.type.d.ts +1 -1
- package/services/catalog/wishlist.service.d.ts +4 -4
- package/services/home-shop.service.d.ts +1 -1
- package/services/types/required-checkout-data.type.d.ts +1 -1
- package/services/types/required-checkout-subscription-data.type.d.ts +1 -1
- package/types/firebase-app-config.type.d.ts +1 -1
- package/esm2020/angular-elastic-search.module.mjs +0 -34
- package/esm2020/angular-firebase-auth.module.mjs +0 -130
- package/esm2020/angular-firestore.module.mjs +0 -459
- package/esm2020/angular-hasura-graphql.module.mjs +0 -243
- package/esm2020/services/catalog/adapters/new-category-structure.adapter.mjs +0 -41
- package/esm2020/services/catalog/catalog.service.mjs +0 -124
- package/esm2020/services/catalog/category.service.mjs +0 -51
- package/esm2020/services/catalog/wishlist.service.mjs +0 -107
- package/fesm2015/infrab4a-connect-angular.mjs +0 -2196
- package/fesm2015/infrab4a-connect-angular.mjs.map +0 -1
- package/fesm2020/infrab4a-connect-angular.mjs.map +0 -1
- /package/{esm2020 → esm2022}/consts/backend-url.const.mjs +0 -0
- /package/{esm2020 → esm2022}/consts/category-structure.mjs +0 -0
- /package/{esm2020 → esm2022}/consts/default-shop.const.mjs +0 -0
- /package/{esm2020 → esm2022}/consts/es-config.const.mjs +0 -0
- /package/{esm2020 → esm2022}/consts/firebase-const.mjs +0 -0
- /package/{esm2020 → esm2022}/consts/hasura-options.const.mjs +0 -0
- /package/{esm2020 → esm2022}/consts/index.mjs +0 -0
- /package/{esm2020 → esm2022}/helpers/index.mjs +0 -0
- /package/{esm2020 → esm2022}/helpers/mobile-operation-system-checker.helper.mjs +0 -0
- /package/{esm2020 → esm2022}/index.mjs +0 -0
- /package/{esm2020 → esm2022}/infrab4a-connect-angular.mjs +0 -0
- /package/{esm2020 → esm2022}/services/catalog/adapters/category-structure.adapter.mjs +0 -0
- /package/{esm2020 → esm2022}/services/catalog/adapters/index.mjs +0 -0
- /package/{esm2020 → esm2022}/services/catalog/enums/index.mjs +0 -0
- /package/{esm2020 → esm2022}/services/catalog/enums/product-sorts.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/services/catalog/index.mjs +0 -0
- /package/{esm2020 → esm2022}/services/catalog/models/category-with-tree.model.mjs +0 -0
- /package/{esm2020 → esm2022}/services/catalog/models/index.mjs +0 -0
- /package/{esm2020 → esm2022}/services/catalog/types/index.mjs +0 -0
- /package/{esm2020 → esm2022}/services/catalog/types/product-sort.type.mjs +0 -0
- /package/{esm2020 → esm2022}/services/helpers/index.mjs +0 -0
- /package/{esm2020 → esm2022}/services/helpers/util.helper.mjs +0 -0
- /package/{esm2020 → esm2022}/services/index.mjs +0 -0
- /package/{esm2020 → esm2022}/services/types/index.mjs +0 -0
- /package/{esm2020 → esm2022}/services/types/required-checkout-data.type.mjs +0 -0
- /package/{esm2020 → esm2022}/services/types/required-checkout-subscription-data.type.mjs +0 -0
- /package/{esm2020 → esm2022}/services/types/shipping-methods.type.mjs +0 -0
- /package/{esm2020 → esm2022}/types/firebase-app-config.type.mjs +0 -0
- /package/{esm2020 → esm2022}/types/index.mjs +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { NgModule, InjectionToken, PLATFORM_ID, Injectable, Inject } from '@angular/core';
|
|
3
3
|
import * as i1$3 from '@infrab4a/connect';
|
|
4
|
-
import { ProductsIndex, AxiosAdapter, Authentication, AuthenticationFirebaseAuthService, Register, RegisterFirebaseAuthService, SignOut, RecoveryPassword, 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, InvalidArgumentError, Category, CheckoutSubscription, Product, RequiredArgumentError, add, Order } from '@infrab4a/connect';
|
|
4
|
+
import { ProductsIndex, AxiosAdapter, Authentication, AuthenticationFirebaseAuthService, Register, RegisterFirebaseAuthService, SignOut, RecoveryPassword, 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, CampaignBannerFirestoreRepository, CampaignFirestoreRepository, CategoryHasuraGraphQLRepository, ProductHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository, VariantHasuraGraphQLRepository, FilterOptionHasuraGraphQLRepository, FilterHasuraGraphQLRepository, CategoryCollectionChildrenHasuraGraphQLRepository, WishlistHasuraGraphQLRepository, Where, Shops, CheckoutTypes, CouponTypes, Exclusivities, isNil, NotFoundError, Checkout, pick, LineItem, RoundProductPricesHelper, set, InvalidArgumentError, 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';
|
|
@@ -26,17 +26,17 @@ class AngularElasticSeachModule {
|
|
|
26
26
|
providers: [{ provide: ES_CONFIG, useValue: options }],
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AngularElasticSeachModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
30
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.6", ngImport: i0, type: AngularElasticSeachModule }); }
|
|
31
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AngularElasticSeachModule, providers: [
|
|
32
|
+
{
|
|
33
|
+
provide: ProductsIndex,
|
|
34
|
+
useFactory: (configuration) => new ProductsIndex(new AxiosAdapter(configuration)),
|
|
35
|
+
deps: [ES_CONFIG],
|
|
36
|
+
},
|
|
37
|
+
] }); }
|
|
29
38
|
}
|
|
30
|
-
|
|
31
|
-
AngularElasticSeachModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule });
|
|
32
|
-
AngularElasticSeachModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule, providers: [
|
|
33
|
-
{
|
|
34
|
-
provide: ProductsIndex,
|
|
35
|
-
useFactory: (configuration) => new ProductsIndex(new AxiosAdapter(configuration)),
|
|
36
|
-
deps: [ES_CONFIG],
|
|
37
|
-
},
|
|
38
|
-
] });
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule, decorators: [{
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AngularElasticSeachModule, decorators: [{
|
|
40
40
|
type: NgModule,
|
|
41
41
|
args: [{
|
|
42
42
|
providers: [
|
|
@@ -70,60 +70,60 @@ class AngularFirebaseAuthModule {
|
|
|
70
70
|
],
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
73
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AngularFirebaseAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
74
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.6", ngImport: i0, type: AngularFirebaseAuthModule, imports: [i1.FirebaseAppModule, i1$1.AuthModule] }); }
|
|
75
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AngularFirebaseAuthModule, providers: [
|
|
76
|
+
{
|
|
77
|
+
provide: 'Authentication',
|
|
78
|
+
useFactory: (authenticationService, userRepository) => {
|
|
79
|
+
return new Authentication(authenticationService, userRepository);
|
|
80
|
+
},
|
|
81
|
+
deps: ['AuthenticationService', 'UserRepository'],
|
|
81
82
|
},
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
{
|
|
84
|
+
provide: 'AuthenticationService',
|
|
85
|
+
useFactory: (angularFireAuth) => {
|
|
86
|
+
return new AuthenticationFirebaseAuthService(angularFireAuth);
|
|
87
|
+
},
|
|
88
|
+
deps: [Auth],
|
|
88
89
|
},
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
{
|
|
91
|
+
provide: 'Register',
|
|
92
|
+
useFactory: (registerService, userRepository) => {
|
|
93
|
+
return new Register(registerService, userRepository);
|
|
94
|
+
},
|
|
95
|
+
deps: ['RegisterService', 'UserRepository'],
|
|
95
96
|
},
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
97
|
+
{
|
|
98
|
+
provide: 'RegisterService',
|
|
99
|
+
useFactory: (angularFireAuth) => {
|
|
100
|
+
return new RegisterFirebaseAuthService(angularFireAuth);
|
|
101
|
+
},
|
|
102
|
+
deps: [Auth],
|
|
102
103
|
},
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
104
|
+
{
|
|
105
|
+
provide: 'SignOut',
|
|
106
|
+
useFactory: (authenticationService) => {
|
|
107
|
+
return new SignOut(authenticationService);
|
|
108
|
+
},
|
|
109
|
+
deps: ['AuthenticationService'],
|
|
109
110
|
},
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
111
|
+
{
|
|
112
|
+
provide: 'RecoveryPassword',
|
|
113
|
+
useFactory: (authenticationService) => {
|
|
114
|
+
return new RecoveryPassword(authenticationService);
|
|
115
|
+
},
|
|
116
|
+
deps: ['AuthenticationService'],
|
|
116
117
|
},
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirebaseAuthModule, decorators: [{
|
|
118
|
+
], imports: [provideFirebaseApp((injector) => {
|
|
119
|
+
const appName = injector.get(FIREBASE_APP_NAME);
|
|
120
|
+
return appName
|
|
121
|
+
? initializeApp(injector.get(FIREBASE_OPTIONS), appName)
|
|
122
|
+
: initializeApp(injector.get(FIREBASE_OPTIONS));
|
|
123
|
+
}),
|
|
124
|
+
provideAuth(() => getAuth())] }); }
|
|
125
|
+
}
|
|
126
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AngularFirebaseAuthModule, decorators: [{
|
|
127
127
|
type: NgModule,
|
|
128
128
|
args: [{
|
|
129
129
|
imports: [
|
|
@@ -200,222 +200,244 @@ class AngularFirestoreModule {
|
|
|
200
200
|
],
|
|
201
201
|
};
|
|
202
202
|
}
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
203
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AngularFirestoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
204
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.6", ngImport: i0, type: AngularFirestoreModule, imports: [AngularElasticSeachModule, i1.FirebaseAppModule, i1$2.FirestoreModule] }); }
|
|
205
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AngularFirestoreModule, providers: [
|
|
206
|
+
{
|
|
207
|
+
provide: 'FirestoreOptions',
|
|
208
|
+
useFactory: (firestore, platformId) => ({
|
|
209
|
+
firestore,
|
|
210
|
+
interceptors: {
|
|
211
|
+
request: (request) => {
|
|
212
|
+
if (isPlatformBrowser(platformId))
|
|
213
|
+
return request;
|
|
214
|
+
const interval = setInterval(() => { }, 100);
|
|
215
|
+
request.interval = interval;
|
|
214
216
|
return request;
|
|
215
|
-
|
|
216
|
-
request
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
if (isPlatformBrowser(platformId))
|
|
217
|
+
},
|
|
218
|
+
response: (response, request) => {
|
|
219
|
+
if (isPlatformBrowser(platformId))
|
|
220
|
+
return response;
|
|
221
|
+
clearInterval(request.interval);
|
|
221
222
|
return response;
|
|
222
|
-
|
|
223
|
-
return response;
|
|
223
|
+
},
|
|
224
224
|
},
|
|
225
|
+
}),
|
|
226
|
+
deps: [Firestore, PLATFORM_ID],
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
provide: 'BeautyProfileRepository',
|
|
230
|
+
useFactory: (config, userRepository) => {
|
|
231
|
+
return new UserBeautyProfileFirestoreRepository(config, userRepository);
|
|
225
232
|
},
|
|
226
|
-
|
|
227
|
-
deps: [Firestore, PLATFORM_ID],
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
provide: 'BeautyProfileRepository',
|
|
231
|
-
useFactory: (config, userRepository) => {
|
|
232
|
-
return new UserBeautyProfileFirestoreRepository(config, userRepository);
|
|
233
|
+
deps: ['FirestoreOptions', 'UserRepository'],
|
|
233
234
|
},
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
235
|
+
{
|
|
236
|
+
provide: 'Buy2WinRepository',
|
|
237
|
+
useFactory: (options) => {
|
|
238
|
+
return new Buy2WinFirestoreRepository(options);
|
|
239
|
+
},
|
|
240
|
+
deps: ['FirestoreOptions'],
|
|
240
241
|
},
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
242
|
+
{
|
|
243
|
+
provide: CategoryFirestoreRepository,
|
|
244
|
+
useFactory: (options) => {
|
|
245
|
+
return new CategoryFirestoreRepository(options);
|
|
246
|
+
},
|
|
247
|
+
deps: ['FirestoreOptions'],
|
|
247
248
|
},
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
249
|
+
{
|
|
250
|
+
provide: 'CheckoutRepository',
|
|
251
|
+
useFactory: (options) => {
|
|
252
|
+
return new CheckoutFirestoreRepository(options);
|
|
253
|
+
},
|
|
254
|
+
deps: ['FirestoreOptions'],
|
|
254
255
|
},
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
256
|
+
{
|
|
257
|
+
provide: 'CheckoutSubscriptionRepository',
|
|
258
|
+
useFactory: (options) => {
|
|
259
|
+
return new CheckoutSubscriptionFirestoreRepository(options);
|
|
260
|
+
},
|
|
261
|
+
deps: ['FirestoreOptions'],
|
|
261
262
|
},
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
263
|
+
{
|
|
264
|
+
provide: 'CouponRepository',
|
|
265
|
+
useFactory: (options) => {
|
|
266
|
+
return new CouponFirestoreRepository(options);
|
|
267
|
+
},
|
|
268
|
+
deps: ['FirestoreOptions'],
|
|
268
269
|
},
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
270
|
+
{
|
|
271
|
+
provide: 'CampaignHashtagRepository',
|
|
272
|
+
useFactory: (options) => {
|
|
273
|
+
return new CampaignHashtagFirestoreRepository(options);
|
|
274
|
+
},
|
|
275
|
+
deps: ['FirestoreOptions'],
|
|
275
276
|
},
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
277
|
+
{
|
|
278
|
+
provide: 'CampaignDashboardRepository',
|
|
279
|
+
useFactory: (options) => {
|
|
280
|
+
return new CampaignDashboardFirestoreRepository(options);
|
|
281
|
+
},
|
|
282
|
+
deps: ['FirestoreOptions'],
|
|
282
283
|
},
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
284
|
+
{
|
|
285
|
+
provide: 'EditionRepository',
|
|
286
|
+
useFactory: (options, subscriptionRepository) => {
|
|
287
|
+
return new SubscriptionEditionFirestoreRepository(options, subscriptionRepository);
|
|
288
|
+
},
|
|
289
|
+
deps: ['FirestoreOptions', 'SubscriptionRepository'],
|
|
289
290
|
},
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
291
|
+
{
|
|
292
|
+
provide: 'HomeRepository',
|
|
293
|
+
useFactory: (options) => {
|
|
294
|
+
return new HomeFirestoreRepository(options);
|
|
295
|
+
},
|
|
296
|
+
deps: ['FirestoreOptions'],
|
|
296
297
|
},
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
298
|
+
{
|
|
299
|
+
provide: 'LeadRepository',
|
|
300
|
+
useFactory: (options) => {
|
|
301
|
+
return new LeadFirestoreRepository(options);
|
|
302
|
+
},
|
|
303
|
+
deps: ['FirestoreOptions'],
|
|
303
304
|
},
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
305
|
+
{
|
|
306
|
+
provide: 'LegacyOrderRepository',
|
|
307
|
+
useFactory: (options) => {
|
|
308
|
+
return new LegacyOrderFirestoreRepository(options);
|
|
309
|
+
},
|
|
310
|
+
deps: ['FirestoreOptions'],
|
|
310
311
|
},
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
312
|
+
{
|
|
313
|
+
provide: 'ShopMenuRepository',
|
|
314
|
+
useFactory: (options) => {
|
|
315
|
+
return new ShopMenuFirestoreRepository(options);
|
|
316
|
+
},
|
|
317
|
+
deps: ['FirestoreOptions'],
|
|
317
318
|
},
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
319
|
+
{
|
|
320
|
+
provide: 'OrderRepository',
|
|
321
|
+
useFactory: (options) => {
|
|
322
|
+
return new OrderFirestoreRepository(options);
|
|
323
|
+
},
|
|
324
|
+
deps: ['FirestoreOptions'],
|
|
324
325
|
},
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
326
|
+
{
|
|
327
|
+
provide: 'PaymentRepository',
|
|
328
|
+
useFactory: (options) => {
|
|
329
|
+
return new PaymentFirestoreRepository(options);
|
|
330
|
+
},
|
|
331
|
+
deps: ['FirestoreOptions'],
|
|
331
332
|
},
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
333
|
+
{
|
|
334
|
+
provide: ProductFirestoreRepository,
|
|
335
|
+
useFactory: (options) => {
|
|
336
|
+
return new ProductFirestoreRepository(options);
|
|
337
|
+
},
|
|
338
|
+
deps: ['FirestoreOptions'],
|
|
338
339
|
},
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
340
|
+
{
|
|
341
|
+
provide: 'ShopSettingsRepository',
|
|
342
|
+
useFactory: (options) => {
|
|
343
|
+
return new ShopSettingsFirestoreRepository(options);
|
|
344
|
+
},
|
|
345
|
+
deps: ['FirestoreOptions'],
|
|
345
346
|
},
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
347
|
+
{
|
|
348
|
+
provide: 'SubscriptionPaymentRepository',
|
|
349
|
+
useFactory: (options, subscriptionRepository) => {
|
|
350
|
+
return new SubscriptionPaymentFirestoreRepository(options, subscriptionRepository);
|
|
351
|
+
},
|
|
352
|
+
deps: ['FirestoreOptions', 'SubscriptionRepository'],
|
|
352
353
|
},
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
354
|
+
{
|
|
355
|
+
provide: 'SubscriptionPlanRepository',
|
|
356
|
+
useFactory: (options) => {
|
|
357
|
+
return new SubscriptionPlanFirestoreRepository(options);
|
|
358
|
+
},
|
|
359
|
+
deps: ['FirestoreOptions'],
|
|
359
360
|
},
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
361
|
+
{
|
|
362
|
+
provide: 'SubscriptionProductRepository',
|
|
363
|
+
useFactory: (options) => {
|
|
364
|
+
return new SubscriptionProductFirestoreRepository(options);
|
|
365
|
+
},
|
|
366
|
+
deps: ['FirestoreOptions'],
|
|
366
367
|
},
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
368
|
+
{
|
|
369
|
+
provide: 'SubscriptionRepository',
|
|
370
|
+
useFactory: (options) => {
|
|
371
|
+
return new SubscriptionFirestoreRepository(options);
|
|
372
|
+
},
|
|
373
|
+
deps: ['FirestoreOptions'],
|
|
373
374
|
},
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
375
|
+
{
|
|
376
|
+
provide: 'UserRepository',
|
|
377
|
+
useFactory: (options) => {
|
|
378
|
+
return new UserFirestoreRepository(options);
|
|
379
|
+
},
|
|
380
|
+
deps: ['FirestoreOptions'],
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
provide: 'UserAddressRepository',
|
|
384
|
+
useFactory: (options, userRepository) => {
|
|
385
|
+
return new UserAddressFirestoreRepository(options, userRepository);
|
|
386
|
+
},
|
|
387
|
+
deps: ['FirestoreOptions', 'UserRepository'],
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
provide: 'UserPaymentMethodRepository',
|
|
391
|
+
useFactory: (options, userRepository) => {
|
|
392
|
+
return new UserPaymentMethodFirestoreRepository(options, userRepository);
|
|
393
|
+
},
|
|
394
|
+
deps: ['FirestoreOptions', 'UserRepository'],
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
provide: ProductVariantFirestoreRepository,
|
|
398
|
+
useFactory: (options, productRepository) => {
|
|
399
|
+
return new ProductVariantFirestoreRepository(options, productRepository);
|
|
400
|
+
},
|
|
401
|
+
deps: ['FirestoreOptions', ProductFirestoreRepository],
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
provide: CampaignBannerFirestoreRepository,
|
|
405
|
+
useFactory: (options) => {
|
|
406
|
+
return new CampaignBannerFirestoreRepository(options);
|
|
407
|
+
},
|
|
408
|
+
deps: ['FirestoreOptions'],
|
|
380
409
|
},
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
provide: 'UserAddressRepository',
|
|
385
|
-
useFactory: (options, userRepository) => {
|
|
386
|
-
return new UserAddressFirestoreRepository(options, userRepository);
|
|
410
|
+
{
|
|
411
|
+
provide: 'CampaignBannerRepository',
|
|
412
|
+
useExisting: CampaignBannerFirestoreRepository,
|
|
387
413
|
},
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
414
|
+
{
|
|
415
|
+
provide: CampaignFirestoreRepository,
|
|
416
|
+
useFactory: (options) => {
|
|
417
|
+
return new CampaignFirestoreRepository(options);
|
|
418
|
+
},
|
|
419
|
+
deps: ['FirestoreOptions'],
|
|
394
420
|
},
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
provide: ProductVariantFirestoreRepository,
|
|
399
|
-
useFactory: (options, productRepository) => {
|
|
400
|
-
return new ProductVariantFirestoreRepository(options, productRepository);
|
|
421
|
+
{
|
|
422
|
+
provide: 'CampaignRepository',
|
|
423
|
+
useExisting: CampaignFirestoreRepository,
|
|
401
424
|
},
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirestoreModule, decorators: [{
|
|
425
|
+
], imports: [AngularElasticSeachModule,
|
|
426
|
+
provideFirebaseApp((injector) => {
|
|
427
|
+
const appName = injector.get(FIREBASE_APP_NAME);
|
|
428
|
+
return appName
|
|
429
|
+
? initializeApp$1(injector.get(FIREBASE_OPTIONS), appName)
|
|
430
|
+
: initializeApp$1(injector.get(FIREBASE_OPTIONS));
|
|
431
|
+
}),
|
|
432
|
+
provideFirestore((injector) => {
|
|
433
|
+
if (!MobileOperationSystemCheckerHelper.isAppleDevice())
|
|
434
|
+
return getFirestore();
|
|
435
|
+
const firestore = initializeFirestore(injector.get(FirebaseApp), { experimentalForceLongPolling: true });
|
|
436
|
+
enableIndexedDbPersistence(firestore).catch(console.error);
|
|
437
|
+
return firestore;
|
|
438
|
+
})] }); }
|
|
439
|
+
}
|
|
440
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AngularFirestoreModule, decorators: [{
|
|
419
441
|
type: NgModule,
|
|
420
442
|
args: [{
|
|
421
443
|
imports: [
|
|
@@ -632,6 +654,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
632
654
|
},
|
|
633
655
|
deps: ['FirestoreOptions', ProductFirestoreRepository],
|
|
634
656
|
},
|
|
657
|
+
{
|
|
658
|
+
provide: CampaignBannerFirestoreRepository,
|
|
659
|
+
useFactory: (options) => {
|
|
660
|
+
return new CampaignBannerFirestoreRepository(options);
|
|
661
|
+
},
|
|
662
|
+
deps: ['FirestoreOptions'],
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
provide: 'CampaignBannerRepository',
|
|
666
|
+
useExisting: CampaignBannerFirestoreRepository,
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
provide: CampaignFirestoreRepository,
|
|
670
|
+
useFactory: (options) => {
|
|
671
|
+
return new CampaignFirestoreRepository(options);
|
|
672
|
+
},
|
|
673
|
+
deps: ['FirestoreOptions'],
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
provide: 'CampaignRepository',
|
|
677
|
+
useExisting: CampaignFirestoreRepository,
|
|
678
|
+
},
|
|
635
679
|
],
|
|
636
680
|
}]
|
|
637
681
|
}] });
|
|
@@ -643,121 +687,121 @@ class AngularHasuraGraphQLModule {
|
|
|
643
687
|
providers: [{ provide: HASURA_OPTIONS, useValue: options }],
|
|
644
688
|
};
|
|
645
689
|
}
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
690
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AngularHasuraGraphQLModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
691
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.6", ngImport: i0, type: AngularHasuraGraphQLModule }); }
|
|
692
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AngularHasuraGraphQLModule, providers: [
|
|
693
|
+
{
|
|
694
|
+
provide: 'HasuraConfig',
|
|
695
|
+
useFactory: (options, platformId) => ({
|
|
696
|
+
endpoint: options.endpoint,
|
|
697
|
+
authOptions: options.credentials,
|
|
698
|
+
interceptors: {
|
|
699
|
+
request: (request) => {
|
|
700
|
+
if (isPlatformBrowser(platformId))
|
|
701
|
+
return request;
|
|
702
|
+
const interval = setInterval(() => { }, 100);
|
|
703
|
+
request.interval = interval;
|
|
658
704
|
return request;
|
|
659
|
-
|
|
660
|
-
request
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
if (isPlatformBrowser(platformId))
|
|
705
|
+
},
|
|
706
|
+
response: (response, request) => {
|
|
707
|
+
if (isPlatformBrowser(platformId))
|
|
708
|
+
return response;
|
|
709
|
+
clearInterval(request.interval);
|
|
665
710
|
return response;
|
|
666
|
-
|
|
667
|
-
return response;
|
|
711
|
+
},
|
|
668
712
|
},
|
|
713
|
+
}),
|
|
714
|
+
deps: [HASURA_OPTIONS, PLATFORM_ID],
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
provide: 'CategoryRepository',
|
|
718
|
+
useExisting: CategoryHasuraGraphQLRepository,
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
provide: CategoryHasuraGraphQLRepository,
|
|
722
|
+
useFactory: (options, productRepository, categoryFilterRepository) => {
|
|
723
|
+
return new CategoryHasuraGraphQLRepository(options, productRepository, categoryFilterRepository);
|
|
669
724
|
},
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
725
|
+
deps: ['HasuraConfig', ProductHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository],
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
provide: 'ProductRepository',
|
|
729
|
+
useExisting: ProductHasuraGraphQLRepository,
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
provide: ProductHasuraGraphQLRepository,
|
|
733
|
+
useFactory: (hasuraConfig) => {
|
|
734
|
+
return new ProductHasuraGraphQLRepository(hasuraConfig);
|
|
735
|
+
},
|
|
736
|
+
deps: ['HasuraConfig'],
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
provide: 'VariantRepository',
|
|
740
|
+
useExisting: VariantHasuraGraphQLRepository,
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
provide: VariantHasuraGraphQLRepository,
|
|
744
|
+
useFactory: (hasuraConfig) => {
|
|
745
|
+
return new VariantHasuraGraphQLRepository(hasuraConfig);
|
|
746
|
+
},
|
|
747
|
+
deps: ['HasuraConfig'],
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
provide: 'CategoryFilterRepository',
|
|
751
|
+
useExisting: CategoryFilterHasuraGraphQLRepository,
|
|
681
752
|
},
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
{
|
|
689
|
-
provide: ProductHasuraGraphQLRepository,
|
|
690
|
-
useFactory: (hasuraConfig) => {
|
|
691
|
-
return new ProductHasuraGraphQLRepository(hasuraConfig);
|
|
753
|
+
{
|
|
754
|
+
provide: CategoryFilterHasuraGraphQLRepository,
|
|
755
|
+
useFactory: (options) => {
|
|
756
|
+
return new CategoryFilterHasuraGraphQLRepository(options);
|
|
757
|
+
},
|
|
758
|
+
deps: ['HasuraConfig'],
|
|
692
759
|
},
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
provide: 'VariantRepository',
|
|
697
|
-
useExisting: VariantHasuraGraphQLRepository,
|
|
698
|
-
},
|
|
699
|
-
{
|
|
700
|
-
provide: VariantHasuraGraphQLRepository,
|
|
701
|
-
useFactory: (hasuraConfig) => {
|
|
702
|
-
return new VariantHasuraGraphQLRepository(hasuraConfig);
|
|
760
|
+
{
|
|
761
|
+
provide: 'FilterOptionRepository',
|
|
762
|
+
useExisting: FilterOptionHasuraGraphQLRepository,
|
|
703
763
|
},
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
{
|
|
711
|
-
provide: CategoryFilterHasuraGraphQLRepository,
|
|
712
|
-
useFactory: (options) => {
|
|
713
|
-
return new CategoryFilterHasuraGraphQLRepository(options);
|
|
764
|
+
{
|
|
765
|
+
provide: FilterOptionHasuraGraphQLRepository,
|
|
766
|
+
useFactory: (options) => {
|
|
767
|
+
return new FilterOptionHasuraGraphQLRepository(options);
|
|
768
|
+
},
|
|
769
|
+
deps: ['HasuraConfig'],
|
|
714
770
|
},
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
provide: 'FilterOptionRepository',
|
|
719
|
-
useExisting: FilterOptionHasuraGraphQLRepository,
|
|
720
|
-
},
|
|
721
|
-
{
|
|
722
|
-
provide: FilterOptionHasuraGraphQLRepository,
|
|
723
|
-
useFactory: (options) => {
|
|
724
|
-
return new FilterOptionHasuraGraphQLRepository(options);
|
|
771
|
+
{
|
|
772
|
+
provide: 'FilterRepository',
|
|
773
|
+
useExisting: FilterHasuraGraphQLRepository,
|
|
725
774
|
},
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
{
|
|
733
|
-
provide: FilterHasuraGraphQLRepository,
|
|
734
|
-
useFactory: (options, filterOptionRepository, categoryFilterRepository) => {
|
|
735
|
-
return new FilterHasuraGraphQLRepository(options, filterOptionRepository, categoryFilterRepository);
|
|
775
|
+
{
|
|
776
|
+
provide: FilterHasuraGraphQLRepository,
|
|
777
|
+
useFactory: (options, filterOptionRepository, categoryFilterRepository) => {
|
|
778
|
+
return new FilterHasuraGraphQLRepository(options, filterOptionRepository, categoryFilterRepository);
|
|
779
|
+
},
|
|
780
|
+
deps: ['HasuraConfig', FilterOptionHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository],
|
|
736
781
|
},
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
useFactory: (options) => new CategoryCollectionChildrenHasuraGraphQLRepository(options),
|
|
742
|
-
deps: ['HasuraConfig'],
|
|
743
|
-
},
|
|
744
|
-
{
|
|
745
|
-
provide: 'CategoryCollectionChildrenRepository',
|
|
746
|
-
useExisting: CategoryCollectionChildrenHasuraGraphQLRepository,
|
|
747
|
-
},
|
|
748
|
-
{
|
|
749
|
-
provide: WishlistHasuraGraphQLRepository,
|
|
750
|
-
useFactory: (options, categoryFilterRepository) => {
|
|
751
|
-
return new WishlistHasuraGraphQLRepository(options, categoryFilterRepository);
|
|
782
|
+
{
|
|
783
|
+
provide: CategoryCollectionChildrenHasuraGraphQLRepository,
|
|
784
|
+
useFactory: (options) => new CategoryCollectionChildrenHasuraGraphQLRepository(options),
|
|
785
|
+
deps: ['HasuraConfig'],
|
|
752
786
|
},
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
787
|
+
{
|
|
788
|
+
provide: 'CategoryCollectionChildrenRepository',
|
|
789
|
+
useExisting: CategoryCollectionChildrenHasuraGraphQLRepository,
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
provide: WishlistHasuraGraphQLRepository,
|
|
793
|
+
useFactory: (options, categoryFilterRepository) => {
|
|
794
|
+
return new WishlistHasuraGraphQLRepository(options, categoryFilterRepository);
|
|
795
|
+
},
|
|
796
|
+
deps: ['HasuraConfig', CategoryFilterHasuraGraphQLRepository],
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
provide: 'WishlistRepository',
|
|
800
|
+
useExisting: WishlistHasuraGraphQLRepository,
|
|
801
|
+
},
|
|
802
|
+
] }); }
|
|
803
|
+
}
|
|
804
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AngularHasuraGraphQLModule, decorators: [{
|
|
761
805
|
type: NgModule,
|
|
762
806
|
args: [{
|
|
763
807
|
providers: [
|
|
@@ -895,10 +939,10 @@ class AuthService {
|
|
|
895
939
|
getFireUser() {
|
|
896
940
|
return authState(this.angularFireAuth).pipe(catchError(() => of(null)));
|
|
897
941
|
}
|
|
942
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AuthService, deps: [{ token: i1$1.Auth }, { token: 'UserRepository' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
943
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AuthService }); }
|
|
898
944
|
}
|
|
899
|
-
|
|
900
|
-
AuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AuthService });
|
|
901
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AuthService, decorators: [{
|
|
945
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AuthService, decorators: [{
|
|
902
946
|
type: Injectable
|
|
903
947
|
}], ctorParameters: function () { return [{ type: i1$1.Auth }, { type: undefined, decorators: [{
|
|
904
948
|
type: Inject,
|
|
@@ -1094,10 +1138,10 @@ class CouponService {
|
|
|
1094
1138
|
}
|
|
1095
1139
|
return couponUseLimits;
|
|
1096
1140
|
}
|
|
1141
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CouponService, deps: [{ token: 'CouponRepository' }, { token: DEFAULT_SHOP }, { token: 'OrderRepository' }, { token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1142
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CouponService, providedIn: 'root' }); }
|
|
1097
1143
|
}
|
|
1098
|
-
|
|
1099
|
-
CouponService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CouponService, providedIn: 'root' });
|
|
1100
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CouponService, decorators: [{
|
|
1144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CouponService, decorators: [{
|
|
1101
1145
|
type: Injectable,
|
|
1102
1146
|
args: [{
|
|
1103
1147
|
providedIn: 'root',
|
|
@@ -1158,10 +1202,10 @@ class CheckoutService {
|
|
|
1158
1202
|
cookie.set('checkoutId', checkout.id);
|
|
1159
1203
|
return checkout;
|
|
1160
1204
|
}
|
|
1205
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CheckoutService, deps: [{ token: CouponService }, { token: 'CheckoutRepository' }, { token: 'OrderRepository' }, { token: 'UserRepository' }, { token: DEFAULT_SHOP }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1206
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CheckoutService }); }
|
|
1161
1207
|
}
|
|
1162
|
-
|
|
1163
|
-
CheckoutService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutService });
|
|
1164
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutService, decorators: [{
|
|
1208
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CheckoutService, decorators: [{
|
|
1165
1209
|
type: Injectable
|
|
1166
1210
|
}], ctorParameters: function () { return [{ type: CouponService }, { type: undefined, decorators: [{
|
|
1167
1211
|
type: Inject,
|
|
@@ -1425,10 +1469,10 @@ class CartService {
|
|
|
1425
1469
|
});
|
|
1426
1470
|
});
|
|
1427
1471
|
}
|
|
1472
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CartService, deps: [{ token: AuthService }, { token: CheckoutService }, { token: DEFAULT_SHOP }, { token: 'ProductRepository' }, { token: 'CategoryRepository' }, { token: 'VariantRepository' }, { token: 'Buy2WinRepository' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1473
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CartService }); }
|
|
1428
1474
|
}
|
|
1429
|
-
|
|
1430
|
-
CartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CartService });
|
|
1431
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CartService, decorators: [{
|
|
1475
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CartService, decorators: [{
|
|
1432
1476
|
type: Injectable
|
|
1433
1477
|
}], ctorParameters: function () { return [{ type: AuthService }, { type: CheckoutService }, { type: i1$3.Shops, decorators: [{
|
|
1434
1478
|
type: Inject,
|
|
@@ -1487,8 +1531,6 @@ class CatalogService {
|
|
|
1487
1531
|
return { rate: 'desc' };
|
|
1488
1532
|
if (sort === 'news')
|
|
1489
1533
|
return { createdAt: 'desc' };
|
|
1490
|
-
if (sort === 'biggest-discount')
|
|
1491
|
-
return { subscriberDiscountPercentage: 'desc' };
|
|
1492
1534
|
};
|
|
1493
1535
|
this.buildLimitQuery = (options) => {
|
|
1494
1536
|
const limit = options?.perPage || 20;
|
|
@@ -1547,13 +1589,13 @@ class CatalogService {
|
|
|
1547
1589
|
return { tags: { operator: Where.LIKE, value: profile } };
|
|
1548
1590
|
if (term)
|
|
1549
1591
|
return this.productIndex
|
|
1550
|
-
.search(term,
|
|
1592
|
+
.search(term, 9999, this.shop)
|
|
1551
1593
|
.then((data) => ({ id: { operator: Where.IN, value: data.hits.map(({ _source }) => _source.id) } }));
|
|
1552
1594
|
}
|
|
1595
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CatalogService, deps: [{ token: 'ProductRepository' }, { token: CATEGORY_STRUCTURE }, { token: DEFAULT_SHOP }, { token: i1$3.ProductsIndex }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1596
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CatalogService }); }
|
|
1553
1597
|
}
|
|
1554
|
-
|
|
1555
|
-
CatalogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService });
|
|
1556
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService, decorators: [{
|
|
1598
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CatalogService, decorators: [{
|
|
1557
1599
|
type: Injectable
|
|
1558
1600
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1559
1601
|
type: Inject,
|
|
@@ -1582,18 +1624,18 @@ class CategoryService {
|
|
|
1582
1624
|
}, mainGender || this.shop === Shops.MENSMARKET ? 'male' : 'female')
|
|
1583
1625
|
.then(({ data }) => Object.keys(data.map((product) => product.brand).reduce((brands, brand) => ({ ...brands, [brand]: true }), {})));
|
|
1584
1626
|
return this.categoryRepository
|
|
1585
|
-
.find({ filters: { brandCategory: true
|
|
1627
|
+
.find({ filters: { brandCategory: true }, orderBy: { name: 'asc' } })
|
|
1586
1628
|
.then(({ data }) => data.filter((category) => brands.includes(category.conditions.brand)));
|
|
1587
1629
|
}
|
|
1588
|
-
async fetchFilterOptions(category) {
|
|
1630
|
+
async fetchFilterOptions(category, filters) {
|
|
1589
1631
|
return await this.categoryFilterRepository
|
|
1590
1632
|
.find({ filters: { categoryId: +category.id } })
|
|
1591
1633
|
.then(({ data }) => data.map((categoryFilter) => categoryFilter.filter));
|
|
1592
1634
|
}
|
|
1635
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CategoryService, deps: [{ token: 'ProductRepository' }, { token: 'CategoryRepository' }, { token: 'CategoryFilterRepository' }, { token: CATEGORY_STRUCTURE }, { token: DEFAULT_SHOP }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1636
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CategoryService }); }
|
|
1593
1637
|
}
|
|
1594
|
-
|
|
1595
|
-
CategoryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryService });
|
|
1596
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryService, decorators: [{
|
|
1638
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CategoryService, decorators: [{
|
|
1597
1639
|
type: Injectable
|
|
1598
1640
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1599
1641
|
type: Inject,
|
|
@@ -1630,42 +1672,61 @@ __decorate([
|
|
|
1630
1672
|
__metadata("design:type", Array)
|
|
1631
1673
|
], CategoryWithTree.prototype, "children", void 0);
|
|
1632
1674
|
|
|
1675
|
+
class UtilHelper {
|
|
1676
|
+
static createSlug(name) {
|
|
1677
|
+
return name
|
|
1678
|
+
.toLowerCase()
|
|
1679
|
+
.replace(/\s+/g, '-') // Replace spaces with -
|
|
1680
|
+
.replace(/[ãàáäâ]/g, 'a') // Replace spaces with -
|
|
1681
|
+
.replace(/[ẽèéëê]/g, 'e') // Replace spaces with -
|
|
1682
|
+
.replace(/[ìíïî]/g, 'i') // Replace spaces with -
|
|
1683
|
+
.replace(/[õòóöô]/g, 'o') // Replace spaces with -
|
|
1684
|
+
.replace(/[ùúüû]/g, 'u') // Replace spaces with -
|
|
1685
|
+
.replace(/[ñ]/g, 'n') // Replace spaces with -
|
|
1686
|
+
.replace(/[ç]/g, 'c') // Replace spaces with -
|
|
1687
|
+
.replace(/[&]/g, 'and') // Replace spaces with -
|
|
1688
|
+
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
|
|
1689
|
+
.replace(/\-\-+/g, '-'); // Replace multiple - with single -
|
|
1690
|
+
}
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1633
1693
|
class NewCategoryStructureAdapter {
|
|
1634
|
-
constructor(categoryRepository) {
|
|
1694
|
+
constructor(categoryRepository, categoryCollectionChildrenRepository) {
|
|
1635
1695
|
this.categoryRepository = categoryRepository;
|
|
1696
|
+
this.categoryCollectionChildrenRepository = categoryCollectionChildrenRepository;
|
|
1636
1697
|
}
|
|
1637
1698
|
async buildProductFilterByCategory(category) {
|
|
1638
|
-
const
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
return {
|
|
1643
|
-
category: {
|
|
1644
|
-
id: {
|
|
1645
|
-
operator: Where.IN,
|
|
1646
|
-
value: categoryIds,
|
|
1647
|
-
},
|
|
1648
|
-
},
|
|
1649
|
-
};
|
|
1699
|
+
const categoriesIds = (await this.isCollection(category))
|
|
1700
|
+
? await this.getAllCategoriesIdFromCollection(category)
|
|
1701
|
+
: [...(await this.getAllCategoriesIdFromCategory(category)), category.id.toString()];
|
|
1702
|
+
return { category: { id: { operator: Where.IN, value: categoriesIds } } };
|
|
1650
1703
|
}
|
|
1651
1704
|
async getAllCategoriesIdFromCategory(category) {
|
|
1652
1705
|
return this.categoryRepository
|
|
1653
1706
|
.getChildren(+category.id)
|
|
1654
1707
|
.then((categories) => categories.map((category) => category.id.toString()));
|
|
1655
1708
|
}
|
|
1656
|
-
async
|
|
1657
|
-
return
|
|
1658
|
-
|
|
1659
|
-
|
|
1709
|
+
async getAllCategoriesIdFromCollection(category) {
|
|
1710
|
+
return this.categoryCollectionChildrenRepository
|
|
1711
|
+
.find({ filters: { collectionId: +category.id } })
|
|
1712
|
+
.then(({ data }) => data.map((categoryCollection) => categoryCollection.categoryId.toString()));
|
|
1713
|
+
}
|
|
1714
|
+
async isCollection(category) {
|
|
1715
|
+
return !isNil(category.isCollection)
|
|
1716
|
+
? category.isCollection
|
|
1717
|
+
: this.categoryRepository.get({ id: category.id }).then((category) => category.isCollection);
|
|
1660
1718
|
}
|
|
1719
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: NewCategoryStructureAdapter, deps: [{ token: 'CategoryRepository' }, { token: 'CategoryCollectionChildrenRepository' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1720
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: NewCategoryStructureAdapter }); }
|
|
1661
1721
|
}
|
|
1662
|
-
|
|
1663
|
-
NewCategoryStructureAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: NewCategoryStructureAdapter });
|
|
1664
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: NewCategoryStructureAdapter, decorators: [{
|
|
1722
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: NewCategoryStructureAdapter, decorators: [{
|
|
1665
1723
|
type: Injectable
|
|
1666
1724
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1667
1725
|
type: Inject,
|
|
1668
1726
|
args: ['CategoryRepository']
|
|
1727
|
+
}] }, { type: undefined, decorators: [{
|
|
1728
|
+
type: Inject,
|
|
1729
|
+
args: ['CategoryCollectionChildrenRepository']
|
|
1669
1730
|
}] }]; } });
|
|
1670
1731
|
|
|
1671
1732
|
class OldCategoryStructureAdapter {
|
|
@@ -1678,10 +1739,10 @@ class OldCategoryStructureAdapter {
|
|
|
1678
1739
|
: await this.categoryRepository.get({ id: category.id }).then((categoryFound) => categoryFound.products);
|
|
1679
1740
|
return { id: { operator: Where.IN, value: productsIds } };
|
|
1680
1741
|
}
|
|
1742
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: OldCategoryStructureAdapter, deps: [{ token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1743
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: OldCategoryStructureAdapter }); }
|
|
1681
1744
|
}
|
|
1682
|
-
|
|
1683
|
-
OldCategoryStructureAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OldCategoryStructureAdapter });
|
|
1684
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OldCategoryStructureAdapter, decorators: [{
|
|
1745
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: OldCategoryStructureAdapter, decorators: [{
|
|
1685
1746
|
type: Injectable
|
|
1686
1747
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1687
1748
|
type: Inject,
|
|
@@ -1689,10 +1750,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1689
1750
|
}] }]; } });
|
|
1690
1751
|
|
|
1691
1752
|
class WishlistService {
|
|
1692
|
-
constructor(wishlistRepository, shop, productRepository, categoryFilterRepository, productIndex) {
|
|
1753
|
+
constructor(wishlistRepository, shop, productRepository, categoryFilterRepository, categoryCollectionChildrenRepository, productIndex) {
|
|
1693
1754
|
this.wishlistRepository = wishlistRepository;
|
|
1694
1755
|
this.shop = shop;
|
|
1695
|
-
const categoryStructureAdapter = new NewCategoryStructureAdapter(wishlistRepository);
|
|
1756
|
+
const categoryStructureAdapter = new NewCategoryStructureAdapter(wishlistRepository, categoryCollectionChildrenRepository);
|
|
1696
1757
|
this.catalogService = new CatalogService(productRepository, categoryStructureAdapter, shop, productIndex);
|
|
1697
1758
|
this.categoryService = new CategoryService(productRepository, wishlistRepository, categoryFilterRepository, categoryStructureAdapter, shop);
|
|
1698
1759
|
}
|
|
@@ -1702,9 +1763,9 @@ class WishlistService {
|
|
|
1702
1763
|
getCategoryService() {
|
|
1703
1764
|
return this.categoryService;
|
|
1704
1765
|
}
|
|
1705
|
-
async create(personId, title, description, userFullName
|
|
1766
|
+
async create(personId, title, description, userFullName) {
|
|
1706
1767
|
const data = {
|
|
1707
|
-
slug:
|
|
1768
|
+
slug: UtilHelper.createSlug(`favoritos ${userFullName} ${title}`),
|
|
1708
1769
|
name: title,
|
|
1709
1770
|
description,
|
|
1710
1771
|
metadata: {
|
|
@@ -1714,25 +1775,22 @@ class WishlistService {
|
|
|
1714
1775
|
shop: this.shop,
|
|
1715
1776
|
shops: [this.shop],
|
|
1716
1777
|
personId,
|
|
1717
|
-
personName: userFullName,
|
|
1718
|
-
personPhoto: userPhoto,
|
|
1719
1778
|
brandCategory: false,
|
|
1720
1779
|
published: true,
|
|
1721
1780
|
};
|
|
1722
1781
|
const newWishlist = await this.wishlistRepository.create(data);
|
|
1723
|
-
return this.wishlistRepository.update({ id: newWishlist.id, slug: newWishlist.id });
|
|
1782
|
+
return this.wishlistRepository.update({ id: newWishlist.id, slug: `${newWishlist.id}-${newWishlist.slug}` });
|
|
1724
1783
|
}
|
|
1725
|
-
update(id, title, description, userFullName
|
|
1784
|
+
update(id, title, description, userFullName) {
|
|
1726
1785
|
const data = {
|
|
1727
1786
|
id,
|
|
1787
|
+
slug: UtilHelper.createSlug(`${id}-favoritos ${userFullName} ${title}`),
|
|
1728
1788
|
name: title,
|
|
1729
1789
|
description,
|
|
1730
1790
|
metadata: {
|
|
1731
1791
|
title: `${userFullName} - ${title}`,
|
|
1732
1792
|
description: `${userFullName} - ${description}`,
|
|
1733
1793
|
},
|
|
1734
|
-
personName: userFullName,
|
|
1735
|
-
personPhoto: userPhoto,
|
|
1736
1794
|
};
|
|
1737
1795
|
return this.wishlistRepository.update(data);
|
|
1738
1796
|
}
|
|
@@ -1740,9 +1798,6 @@ class WishlistService {
|
|
|
1740
1798
|
return this.wishlistRepository.delete({ id: wishlistId });
|
|
1741
1799
|
}
|
|
1742
1800
|
getWishlistBySlug(slug) {
|
|
1743
|
-
const [id] = slug.split('-');
|
|
1744
|
-
if (+id)
|
|
1745
|
-
return this.wishlistRepository.get({ id });
|
|
1746
1801
|
return this.wishlistRepository.getWishlistBySlug(slug);
|
|
1747
1802
|
}
|
|
1748
1803
|
getWishlistsByPerson(personId) {
|
|
@@ -1768,10 +1823,10 @@ class WishlistService {
|
|
|
1768
1823
|
}
|
|
1769
1824
|
return wishlist;
|
|
1770
1825
|
}
|
|
1826
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: WishlistService, deps: [{ token: 'WishlistRepository' }, { token: DEFAULT_SHOP }, { token: 'ProductRepository' }, { token: 'CategoryFilterRepository' }, { token: 'CategoryCollectionChildrenRepository' }, { token: i1$3.ProductsIndex }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1827
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: WishlistService }); }
|
|
1771
1828
|
}
|
|
1772
|
-
|
|
1773
|
-
WishlistService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService });
|
|
1774
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, decorators: [{
|
|
1829
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: WishlistService, decorators: [{
|
|
1775
1830
|
type: Injectable
|
|
1776
1831
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1777
1832
|
type: Inject,
|
|
@@ -1785,6 +1840,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1785
1840
|
}] }, { type: undefined, decorators: [{
|
|
1786
1841
|
type: Inject,
|
|
1787
1842
|
args: ['CategoryFilterRepository']
|
|
1843
|
+
}] }, { type: undefined, decorators: [{
|
|
1844
|
+
type: Inject,
|
|
1845
|
+
args: ['CategoryCollectionChildrenRepository']
|
|
1788
1846
|
}] }, { type: i1$3.ProductsIndex }]; } });
|
|
1789
1847
|
|
|
1790
1848
|
class CheckoutSubscriptionService {
|
|
@@ -1819,10 +1877,10 @@ class CheckoutSubscriptionService {
|
|
|
1819
1877
|
calcDiscountSubscription(coupon) {
|
|
1820
1878
|
return this.getCheckoutSubscription().pipe(concatMap((checkout) => this.couponService.calcDiscountSubscription(coupon, checkout).pipe()));
|
|
1821
1879
|
}
|
|
1880
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CheckoutSubscriptionService, deps: [{ token: 'CheckoutSubscriptionRepository' }, { token: 'SubscriptionRepository' }, { token: CouponService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1881
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CheckoutSubscriptionService }); }
|
|
1822
1882
|
}
|
|
1823
|
-
|
|
1824
|
-
CheckoutSubscriptionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutSubscriptionService });
|
|
1825
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutSubscriptionService, decorators: [{
|
|
1883
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CheckoutSubscriptionService, decorators: [{
|
|
1826
1884
|
type: Injectable
|
|
1827
1885
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1828
1886
|
type: Inject,
|
|
@@ -1832,25 +1890,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1832
1890
|
args: ['SubscriptionRepository']
|
|
1833
1891
|
}] }, { type: CouponService }]; } });
|
|
1834
1892
|
|
|
1835
|
-
class UtilHelper {
|
|
1836
|
-
static createSlug(name) {
|
|
1837
|
-
return name
|
|
1838
|
-
.toLowerCase()
|
|
1839
|
-
.replace(/\s+/g, '-') // Replace spaces with -
|
|
1840
|
-
.replace(/[ãàáäâ]/g, 'a') // Replace spaces with -
|
|
1841
|
-
.replace(/[ẽèéëê]/g, 'e') // Replace spaces with -
|
|
1842
|
-
.replace(/[ìíïî]/g, 'i') // Replace spaces with -
|
|
1843
|
-
.replace(/[õòóöô]/g, 'o') // Replace spaces with -
|
|
1844
|
-
.replace(/[ùúüû]/g, 'u') // Replace spaces with -
|
|
1845
|
-
.replace(/[ñ]/g, 'n') // Replace spaces with -
|
|
1846
|
-
.replace(/[ç]/g, 'c') // Replace spaces with -
|
|
1847
|
-
.replace(/[&]/g, 'and') // Replace spaces with -
|
|
1848
|
-
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
|
|
1849
|
-
.replace(/\-\-+/g, '-'); // Replace multiple - with single -
|
|
1850
|
-
}
|
|
1851
|
-
}
|
|
1852
|
-
|
|
1853
1893
|
class HomeShopService {
|
|
1894
|
+
get homeId() {
|
|
1895
|
+
if (this.defaultShop === Shops.GLAMSHOP)
|
|
1896
|
+
return 'glamshop';
|
|
1897
|
+
if (this.defaultShop === Shops.MENSMARKET)
|
|
1898
|
+
return 'mens_market';
|
|
1899
|
+
return null;
|
|
1900
|
+
}
|
|
1854
1901
|
constructor(categoryRepository, homeRepository, productRepository, defaultShop) {
|
|
1855
1902
|
this.categoryRepository = categoryRepository;
|
|
1856
1903
|
this.homeRepository = homeRepository;
|
|
@@ -1876,13 +1923,6 @@ class HomeShopService {
|
|
|
1876
1923
|
]))) || [],
|
|
1877
1924
|
});
|
|
1878
1925
|
}
|
|
1879
|
-
get homeId() {
|
|
1880
|
-
if (this.defaultShop === Shops.GLAMSHOP)
|
|
1881
|
-
return 'glamshop';
|
|
1882
|
-
if (this.defaultShop === Shops.MENSMARKET)
|
|
1883
|
-
return 'mens_market';
|
|
1884
|
-
return null;
|
|
1885
|
-
}
|
|
1886
1926
|
getHomeData() {
|
|
1887
1927
|
return this.getHomeConfiguration().pipe(map((home) => (home?.data?.expiresAt > new Date() ? home : null)), concatMap((home) => home
|
|
1888
1928
|
? of(home)
|
|
@@ -1938,10 +1978,10 @@ class HomeShopService {
|
|
|
1938
1978
|
data,
|
|
1939
1979
|
})).pipe(tap(() => (this.homeConfiguration.data = data)), map(() => this.homeConfiguration));
|
|
1940
1980
|
}
|
|
1981
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: HomeShopService, deps: [{ token: 'CategoryRepository' }, { token: 'HomeRepository' }, { token: 'ProductRepository' }, { token: DEFAULT_SHOP }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1982
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: HomeShopService }); }
|
|
1941
1983
|
}
|
|
1942
|
-
|
|
1943
|
-
HomeShopService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: HomeShopService });
|
|
1944
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: HomeShopService, decorators: [{
|
|
1984
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: HomeShopService, decorators: [{
|
|
1945
1985
|
type: Injectable
|
|
1946
1986
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1947
1987
|
type: Inject,
|
|
@@ -1969,10 +2009,10 @@ class OrderService {
|
|
|
1969
2009
|
.subscribe((doc) => this.orderSubject.next(doc));
|
|
1970
2010
|
return this.orderSubject;
|
|
1971
2011
|
}
|
|
2012
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: OrderService, deps: [{ token: i1$2.Firestore }, { token: 'OrderRepository' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2013
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: OrderService }); }
|
|
1972
2014
|
}
|
|
1973
|
-
|
|
1974
|
-
OrderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService });
|
|
1975
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService, decorators: [{
|
|
2015
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: OrderService, decorators: [{
|
|
1976
2016
|
type: Injectable
|
|
1977
2017
|
}], ctorParameters: function () { return [{ type: i1$2.Firestore }, { type: i1$3.OrderFirestoreRepository, decorators: [{
|
|
1978
2018
|
type: Inject,
|
|
@@ -2055,10 +2095,10 @@ class ShippingService {
|
|
|
2055
2095
|
}
|
|
2056
2096
|
return false;
|
|
2057
2097
|
}
|
|
2098
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: ShippingService, deps: [{ token: i1$4.HttpClient }, { token: BACKEND_URL }, { token: HomeShopService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2099
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: ShippingService }); }
|
|
2058
2100
|
}
|
|
2059
|
-
|
|
2060
|
-
ShippingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ShippingService });
|
|
2061
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ShippingService, decorators: [{
|
|
2101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: ShippingService, decorators: [{
|
|
2062
2102
|
type: Injectable
|
|
2063
2103
|
}], ctorParameters: function () { return [{ type: i1$4.HttpClient }, { type: undefined, decorators: [{
|
|
2064
2104
|
type: Inject,
|
|
@@ -2085,23 +2125,23 @@ class AngularConnectModule {
|
|
|
2085
2125
|
],
|
|
2086
2126
|
};
|
|
2087
2127
|
}
|
|
2128
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AngularConnectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2129
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.6", ngImport: i0, type: AngularConnectModule, imports: [AngularElasticSeachModule, AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule] }); }
|
|
2130
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AngularConnectModule, providers: [
|
|
2131
|
+
AuthService,
|
|
2132
|
+
CartService,
|
|
2133
|
+
CatalogService,
|
|
2134
|
+
CategoryService,
|
|
2135
|
+
CheckoutService,
|
|
2136
|
+
CheckoutSubscriptionService,
|
|
2137
|
+
CouponService,
|
|
2138
|
+
HomeShopService,
|
|
2139
|
+
OrderService,
|
|
2140
|
+
ShippingService,
|
|
2141
|
+
WishlistService,
|
|
2142
|
+
], imports: [AngularElasticSeachModule, AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule] }); }
|
|
2088
2143
|
}
|
|
2089
|
-
|
|
2090
|
-
AngularConnectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, imports: [AngularElasticSeachModule, AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule] });
|
|
2091
|
-
AngularConnectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, providers: [
|
|
2092
|
-
AuthService,
|
|
2093
|
-
CartService,
|
|
2094
|
-
CatalogService,
|
|
2095
|
-
CategoryService,
|
|
2096
|
-
CheckoutService,
|
|
2097
|
-
CheckoutSubscriptionService,
|
|
2098
|
-
CouponService,
|
|
2099
|
-
HomeShopService,
|
|
2100
|
-
OrderService,
|
|
2101
|
-
ShippingService,
|
|
2102
|
-
WishlistService,
|
|
2103
|
-
], imports: [AngularElasticSeachModule, AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule] });
|
|
2104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, decorators: [{
|
|
2144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AngularConnectModule, decorators: [{
|
|
2105
2145
|
type: NgModule,
|
|
2106
2146
|
args: [{
|
|
2107
2147
|
imports: [AngularElasticSeachModule, AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule],
|