@infrab4a/connect-angular 4.1.0-beta.0 → 4.1.0-beta.1
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/{esm2022 → esm2020}/angular-connect.module.mjs +17 -17
- package/esm2020/angular-elastic-search.module.mjs +34 -0
- package/esm2020/angular-firebase-auth.module.mjs +130 -0
- package/esm2020/angular-firestore.module.mjs +473 -0
- package/esm2020/angular-hasura-graphql.module.mjs +243 -0
- package/{esm2022 → esm2020}/services/auth.service.mjs +4 -4
- package/{esm2022 → esm2020}/services/cart.service.mjs +4 -4
- package/esm2020/services/catalog/adapters/new-category-structure.adapter.mjs +41 -0
- package/{esm2022 → esm2020}/services/catalog/adapters/old-category-structure.adapter.mjs +4 -4
- package/esm2020/services/catalog/catalog.service.mjs +124 -0
- package/esm2020/services/catalog/category.service.mjs +51 -0
- package/esm2020/services/catalog/wishlist.service.mjs +106 -0
- package/{esm2022 → esm2020}/services/checkout-subscription.service.mjs +4 -4
- package/{esm2022 → esm2020}/services/checkout.service.mjs +4 -4
- package/{esm2022 → esm2020}/services/coupon.service.mjs +4 -4
- package/{esm2022 → esm2020}/services/home-shop.service.mjs +11 -11
- package/{esm2022 → esm2020}/services/order.service.mjs +4 -4
- package/{esm2022 → esm2020}/services/shipping.service.mjs +4 -4
- package/fesm2015/infrab4a-connect-angular.mjs +2208 -0
- package/fesm2015/infrab4a-connect-angular.mjs.map +1 -0
- package/{fesm2022 → fesm2020}/infrab4a-connect-angular.mjs +456 -484
- package/fesm2020/infrab4a-connect-angular.mjs.map +1 -0
- package/package.json +16 -9
- package/services/cart.service.d.ts +1 -1
- package/services/catalog/adapters/new-category-structure.adapter.d.ts +3 -5
- 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/esm2022/angular-elastic-search.module.mjs +0 -34
- package/esm2022/angular-firebase-auth.module.mjs +0 -130
- package/esm2022/angular-firestore.module.mjs +0 -503
- package/esm2022/angular-hasura-graphql.module.mjs +0 -243
- package/esm2022/services/catalog/adapters/new-category-structure.adapter.mjs +0 -42
- package/esm2022/services/catalog/catalog.service.mjs +0 -122
- package/esm2022/services/catalog/category.service.mjs +0 -51
- package/esm2022/services/catalog/wishlist.service.mjs +0 -105
- package/fesm2022/infrab4a-connect-angular.mjs.map +0 -1
- /package/{esm2022 → esm2020}/consts/backend-url.const.mjs +0 -0
- /package/{esm2022 → esm2020}/consts/category-structure.mjs +0 -0
- /package/{esm2022 → esm2020}/consts/default-shop.const.mjs +0 -0
- /package/{esm2022 → esm2020}/consts/es-config.const.mjs +0 -0
- /package/{esm2022 → esm2020}/consts/firebase-const.mjs +0 -0
- /package/{esm2022 → esm2020}/consts/hasura-options.const.mjs +0 -0
- /package/{esm2022 → esm2020}/consts/index.mjs +0 -0
- /package/{esm2022 → esm2020}/helpers/index.mjs +0 -0
- /package/{esm2022 → esm2020}/helpers/mobile-operation-system-checker.helper.mjs +0 -0
- /package/{esm2022 → esm2020}/index.mjs +0 -0
- /package/{esm2022 → esm2020}/infrab4a-connect-angular.mjs +0 -0
- /package/{esm2022 → esm2020}/services/catalog/adapters/category-structure.adapter.mjs +0 -0
- /package/{esm2022 → esm2020}/services/catalog/adapters/index.mjs +0 -0
- /package/{esm2022 → esm2020}/services/catalog/enums/index.mjs +0 -0
- /package/{esm2022 → esm2020}/services/catalog/enums/product-sorts.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/services/catalog/index.mjs +0 -0
- /package/{esm2022 → esm2020}/services/catalog/models/category-with-tree.model.mjs +0 -0
- /package/{esm2022 → esm2020}/services/catalog/models/index.mjs +0 -0
- /package/{esm2022 → esm2020}/services/catalog/types/index.mjs +0 -0
- /package/{esm2022 → esm2020}/services/catalog/types/product-sort.type.mjs +0 -0
- /package/{esm2022 → esm2020}/services/helpers/index.mjs +0 -0
- /package/{esm2022 → esm2020}/services/helpers/util.helper.mjs +0 -0
- /package/{esm2022 → esm2020}/services/index.mjs +0 -0
- /package/{esm2022 → esm2020}/services/types/index.mjs +0 -0
- /package/{esm2022 → esm2020}/services/types/required-checkout-data.type.mjs +0 -0
- /package/{esm2022 → esm2020}/services/types/required-checkout-subscription-data.type.mjs +0 -0
- /package/{esm2022 → esm2020}/services/types/shipping-methods.type.mjs +0 -0
- /package/{esm2022 → esm2020}/types/firebase-app-config.type.mjs +0 -0
- /package/{esm2022 → esm2020}/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,
|
|
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, SubscriptionMaterializationFirestoreRepository, 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';
|
|
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
|
-
] }); }
|
|
38
29
|
}
|
|
39
|
-
i0.ɵɵ
|
|
30
|
+
AngularElasticSeachModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
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: [{
|
|
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
|
-
|
|
81
|
-
deps: ['AuthenticationService', 'UserRepository'],
|
|
73
|
+
}
|
|
74
|
+
AngularFirebaseAuthModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirebaseAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
75
|
+
AngularFirebaseAuthModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularFirebaseAuthModule, imports: [i1.FirebaseAppModule, i1$1.AuthModule] });
|
|
76
|
+
AngularFirebaseAuthModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirebaseAuthModule, providers: [
|
|
77
|
+
{
|
|
78
|
+
provide: 'Authentication',
|
|
79
|
+
useFactory: (authenticationService, userRepository) => {
|
|
80
|
+
return new Authentication(authenticationService, userRepository);
|
|
82
81
|
},
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
82
|
+
deps: ['AuthenticationService', 'UserRepository'],
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
provide: 'AuthenticationService',
|
|
86
|
+
useFactory: (angularFireAuth) => {
|
|
87
|
+
return new AuthenticationFirebaseAuthService(angularFireAuth);
|
|
89
88
|
},
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
89
|
+
deps: [Auth],
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
provide: 'Register',
|
|
93
|
+
useFactory: (registerService, userRepository) => {
|
|
94
|
+
return new Register(registerService, userRepository);
|
|
96
95
|
},
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
96
|
+
deps: ['RegisterService', 'UserRepository'],
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
provide: 'RegisterService',
|
|
100
|
+
useFactory: (angularFireAuth) => {
|
|
101
|
+
return new RegisterFirebaseAuthService(angularFireAuth);
|
|
103
102
|
},
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
103
|
+
deps: [Auth],
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
provide: 'SignOut',
|
|
107
|
+
useFactory: (authenticationService) => {
|
|
108
|
+
return new SignOut(authenticationService);
|
|
110
109
|
},
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
110
|
+
deps: ['AuthenticationService'],
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
provide: 'RecoveryPassword',
|
|
114
|
+
useFactory: (authenticationService) => {
|
|
115
|
+
return new RecoveryPassword(authenticationService);
|
|
117
116
|
},
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
|
|
117
|
+
deps: ['AuthenticationService'],
|
|
118
|
+
},
|
|
119
|
+
], imports: [provideFirebaseApp((injector) => {
|
|
120
|
+
const appName = injector.get(FIREBASE_APP_NAME);
|
|
121
|
+
return appName
|
|
122
|
+
? initializeApp(injector.get(FIREBASE_OPTIONS), appName)
|
|
123
|
+
: initializeApp(injector.get(FIREBASE_OPTIONS));
|
|
124
|
+
}),
|
|
125
|
+
provideAuth(() => getAuth())] });
|
|
126
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirebaseAuthModule, decorators: [{
|
|
127
127
|
type: NgModule,
|
|
128
128
|
args: [{
|
|
129
129
|
imports: [
|
|
@@ -200,244 +200,229 @@ class AngularFirestoreModule {
|
|
|
200
200
|
],
|
|
201
201
|
};
|
|
202
202
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
const interval = setInterval(() => { }, 100);
|
|
215
|
-
request.interval = interval;
|
|
203
|
+
}
|
|
204
|
+
AngularFirestoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirestoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
205
|
+
AngularFirestoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularFirestoreModule, imports: [AngularElasticSeachModule, i1.FirebaseAppModule, i1$2.FirestoreModule] });
|
|
206
|
+
AngularFirestoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirestoreModule, providers: [
|
|
207
|
+
{
|
|
208
|
+
provide: 'FirestoreOptions',
|
|
209
|
+
useFactory: (firestore, platformId) => ({
|
|
210
|
+
firestore,
|
|
211
|
+
interceptors: {
|
|
212
|
+
request: (request) => {
|
|
213
|
+
if (isPlatformBrowser(platformId))
|
|
216
214
|
return request;
|
|
217
|
-
},
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
215
|
+
const interval = setInterval(() => { }, 100);
|
|
216
|
+
request.interval = interval;
|
|
217
|
+
return request;
|
|
218
|
+
},
|
|
219
|
+
response: (response, request) => {
|
|
220
|
+
if (isPlatformBrowser(platformId))
|
|
222
221
|
return response;
|
|
223
|
-
|
|
222
|
+
clearInterval(request.interval);
|
|
223
|
+
return response;
|
|
224
224
|
},
|
|
225
|
-
}),
|
|
226
|
-
deps: [Firestore, PLATFORM_ID],
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
provide: 'BeautyProfileRepository',
|
|
230
|
-
useFactory: (config, userRepository) => {
|
|
231
|
-
return new UserBeautyProfileFirestoreRepository(config, userRepository);
|
|
232
|
-
},
|
|
233
|
-
deps: ['FirestoreOptions', 'UserRepository'],
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
provide: 'Buy2WinRepository',
|
|
237
|
-
useFactory: (options) => {
|
|
238
|
-
return new Buy2WinFirestoreRepository(options);
|
|
239
|
-
},
|
|
240
|
-
deps: ['FirestoreOptions'],
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
provide: CategoryFirestoreRepository,
|
|
244
|
-
useFactory: (options) => {
|
|
245
|
-
return new CategoryFirestoreRepository(options);
|
|
246
|
-
},
|
|
247
|
-
deps: ['FirestoreOptions'],
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
provide: 'CheckoutRepository',
|
|
251
|
-
useFactory: (options) => {
|
|
252
|
-
return new CheckoutFirestoreRepository(options);
|
|
253
225
|
},
|
|
254
|
-
|
|
226
|
+
}),
|
|
227
|
+
deps: [Firestore, PLATFORM_ID],
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
provide: 'BeautyProfileRepository',
|
|
231
|
+
useFactory: (config, userRepository) => {
|
|
232
|
+
return new UserBeautyProfileFirestoreRepository(config, userRepository);
|
|
255
233
|
},
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
234
|
+
deps: ['FirestoreOptions', 'UserRepository'],
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
provide: 'Buy2WinRepository',
|
|
238
|
+
useFactory: (options) => {
|
|
239
|
+
return new Buy2WinFirestoreRepository(options);
|
|
262
240
|
},
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
241
|
+
deps: ['FirestoreOptions'],
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
provide: CategoryFirestoreRepository,
|
|
245
|
+
useFactory: (options) => {
|
|
246
|
+
return new CategoryFirestoreRepository(options);
|
|
269
247
|
},
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
248
|
+
deps: ['FirestoreOptions'],
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
provide: 'CheckoutRepository',
|
|
252
|
+
useFactory: (options) => {
|
|
253
|
+
return new CheckoutFirestoreRepository(options);
|
|
276
254
|
},
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
255
|
+
deps: ['FirestoreOptions'],
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
provide: 'CheckoutSubscriptionRepository',
|
|
259
|
+
useFactory: (options) => {
|
|
260
|
+
return new CheckoutSubscriptionFirestoreRepository(options);
|
|
283
261
|
},
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
262
|
+
deps: ['FirestoreOptions'],
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
provide: 'CouponRepository',
|
|
266
|
+
useFactory: (options) => {
|
|
267
|
+
return new CouponFirestoreRepository(options);
|
|
290
268
|
},
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
269
|
+
deps: ['FirestoreOptions'],
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
provide: 'CampaignHashtagRepository',
|
|
273
|
+
useFactory: (options) => {
|
|
274
|
+
return new CampaignHashtagFirestoreRepository(options);
|
|
297
275
|
},
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
276
|
+
deps: ['FirestoreOptions'],
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
provide: 'CampaignDashboardRepository',
|
|
280
|
+
useFactory: (options) => {
|
|
281
|
+
return new CampaignDashboardFirestoreRepository(options);
|
|
304
282
|
},
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
283
|
+
deps: ['FirestoreOptions'],
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
provide: 'EditionRepository',
|
|
287
|
+
useFactory: (options, subscriptionRepository) => {
|
|
288
|
+
return new SubscriptionEditionFirestoreRepository(options, subscriptionRepository);
|
|
311
289
|
},
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
290
|
+
deps: ['FirestoreOptions', 'SubscriptionRepository'],
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
provide: 'HomeRepository',
|
|
294
|
+
useFactory: (options) => {
|
|
295
|
+
return new HomeFirestoreRepository(options);
|
|
318
296
|
},
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
297
|
+
deps: ['FirestoreOptions'],
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
provide: 'LeadRepository',
|
|
301
|
+
useFactory: (options) => {
|
|
302
|
+
return new LeadFirestoreRepository(options);
|
|
325
303
|
},
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
304
|
+
deps: ['FirestoreOptions'],
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
provide: 'LegacyOrderRepository',
|
|
308
|
+
useFactory: (options) => {
|
|
309
|
+
return new LegacyOrderFirestoreRepository(options);
|
|
332
310
|
},
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
311
|
+
deps: ['FirestoreOptions'],
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
provide: 'ShopMenuRepository',
|
|
315
|
+
useFactory: (options) => {
|
|
316
|
+
return new ShopMenuFirestoreRepository(options);
|
|
339
317
|
},
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
318
|
+
deps: ['FirestoreOptions'],
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
provide: 'OrderRepository',
|
|
322
|
+
useFactory: (options) => {
|
|
323
|
+
return new OrderFirestoreRepository(options);
|
|
346
324
|
},
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
325
|
+
deps: ['FirestoreOptions'],
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
provide: 'PaymentRepository',
|
|
329
|
+
useFactory: (options) => {
|
|
330
|
+
return new PaymentFirestoreRepository(options);
|
|
353
331
|
},
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
332
|
+
deps: ['FirestoreOptions'],
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
provide: ProductFirestoreRepository,
|
|
336
|
+
useFactory: (options) => {
|
|
337
|
+
return new ProductFirestoreRepository(options);
|
|
360
338
|
},
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
339
|
+
deps: ['FirestoreOptions'],
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
provide: 'ShopSettingsRepository',
|
|
343
|
+
useFactory: (options) => {
|
|
344
|
+
return new ShopSettingsFirestoreRepository(options);
|
|
367
345
|
},
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
346
|
+
deps: ['FirestoreOptions'],
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
provide: 'SubscriptionPaymentRepository',
|
|
350
|
+
useFactory: (options, subscriptionRepository) => {
|
|
351
|
+
return new SubscriptionPaymentFirestoreRepository(options, subscriptionRepository);
|
|
374
352
|
},
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
353
|
+
deps: ['FirestoreOptions', 'SubscriptionRepository'],
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
provide: 'SubscriptionPlanRepository',
|
|
357
|
+
useFactory: (options) => {
|
|
358
|
+
return new SubscriptionPlanFirestoreRepository(options);
|
|
381
359
|
},
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
360
|
+
deps: ['FirestoreOptions'],
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
provide: 'SubscriptionProductRepository',
|
|
364
|
+
useFactory: (options) => {
|
|
365
|
+
return new SubscriptionProductFirestoreRepository(options);
|
|
388
366
|
},
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
367
|
+
deps: ['FirestoreOptions'],
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
provide: 'SubscriptionRepository',
|
|
371
|
+
useFactory: (options) => {
|
|
372
|
+
return new SubscriptionFirestoreRepository(options);
|
|
395
373
|
},
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
374
|
+
deps: ['FirestoreOptions'],
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
provide: 'UserRepository',
|
|
378
|
+
useFactory: (options) => {
|
|
379
|
+
return new UserFirestoreRepository(options);
|
|
402
380
|
},
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
381
|
+
deps: ['FirestoreOptions'],
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
provide: 'UserAddressRepository',
|
|
385
|
+
useFactory: (options, userRepository) => {
|
|
386
|
+
return new UserAddressFirestoreRepository(options, userRepository);
|
|
409
387
|
},
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
388
|
+
deps: ['FirestoreOptions', 'UserRepository'],
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
provide: 'UserPaymentMethodRepository',
|
|
392
|
+
useFactory: (options, userRepository) => {
|
|
393
|
+
return new UserPaymentMethodFirestoreRepository(options, userRepository);
|
|
413
394
|
},
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
395
|
+
deps: ['FirestoreOptions', 'UserRepository'],
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
provide: 'SubscriptionMaterializationRepository',
|
|
399
|
+
useFactory: (options) => {
|
|
400
|
+
return new SubscriptionMaterializationFirestoreRepository(options);
|
|
420
401
|
},
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
402
|
+
deps: ['FirestoreOptions'],
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
provide: ProductVariantFirestoreRepository,
|
|
406
|
+
useFactory: (options, productRepository) => {
|
|
407
|
+
return new ProductVariantFirestoreRepository(options, productRepository);
|
|
424
408
|
},
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
409
|
+
deps: ['FirestoreOptions', ProductFirestoreRepository],
|
|
410
|
+
},
|
|
411
|
+
], imports: [AngularElasticSeachModule,
|
|
412
|
+
provideFirebaseApp((injector) => {
|
|
413
|
+
const appName = injector.get(FIREBASE_APP_NAME);
|
|
414
|
+
return appName
|
|
415
|
+
? initializeApp$1(injector.get(FIREBASE_OPTIONS), appName)
|
|
416
|
+
: initializeApp$1(injector.get(FIREBASE_OPTIONS));
|
|
417
|
+
}),
|
|
418
|
+
provideFirestore((injector) => {
|
|
419
|
+
if (!MobileOperationSystemCheckerHelper.isAppleDevice())
|
|
420
|
+
return getFirestore();
|
|
421
|
+
const firestore = initializeFirestore(injector.get(FirebaseApp), { experimentalForceLongPolling: true });
|
|
422
|
+
enableIndexedDbPersistence(firestore).catch(console.error);
|
|
423
|
+
return firestore;
|
|
424
|
+
})] });
|
|
425
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirestoreModule, decorators: [{
|
|
441
426
|
type: NgModule,
|
|
442
427
|
args: [{
|
|
443
428
|
imports: [
|
|
@@ -648,33 +633,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImpor
|
|
|
648
633
|
deps: ['FirestoreOptions', 'UserRepository'],
|
|
649
634
|
},
|
|
650
635
|
{
|
|
651
|
-
provide:
|
|
652
|
-
useFactory: (options, productRepository) => {
|
|
653
|
-
return new ProductVariantFirestoreRepository(options, productRepository);
|
|
654
|
-
},
|
|
655
|
-
deps: ['FirestoreOptions', ProductFirestoreRepository],
|
|
656
|
-
},
|
|
657
|
-
{
|
|
658
|
-
provide: CampaignBannerFirestoreRepository,
|
|
636
|
+
provide: 'SubscriptionMaterializationRepository',
|
|
659
637
|
useFactory: (options) => {
|
|
660
|
-
return new
|
|
638
|
+
return new SubscriptionMaterializationFirestoreRepository(options);
|
|
661
639
|
},
|
|
662
640
|
deps: ['FirestoreOptions'],
|
|
663
641
|
},
|
|
664
642
|
{
|
|
665
|
-
provide:
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
{
|
|
669
|
-
provide: CampaignFirestoreRepository,
|
|
670
|
-
useFactory: (options) => {
|
|
671
|
-
return new CampaignFirestoreRepository(options);
|
|
643
|
+
provide: ProductVariantFirestoreRepository,
|
|
644
|
+
useFactory: (options, productRepository) => {
|
|
645
|
+
return new ProductVariantFirestoreRepository(options, productRepository);
|
|
672
646
|
},
|
|
673
|
-
deps: ['FirestoreOptions'],
|
|
674
|
-
},
|
|
675
|
-
{
|
|
676
|
-
provide: 'CampaignRepository',
|
|
677
|
-
useExisting: CampaignFirestoreRepository,
|
|
647
|
+
deps: ['FirestoreOptions', ProductFirestoreRepository],
|
|
678
648
|
},
|
|
679
649
|
],
|
|
680
650
|
}]
|
|
@@ -687,121 +657,121 @@ class AngularHasuraGraphQLModule {
|
|
|
687
657
|
providers: [{ provide: HASURA_OPTIONS, useValue: options }],
|
|
688
658
|
};
|
|
689
659
|
}
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
const interval = setInterval(() => { }, 100);
|
|
703
|
-
request.interval = interval;
|
|
660
|
+
}
|
|
661
|
+
AngularHasuraGraphQLModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularHasuraGraphQLModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
662
|
+
AngularHasuraGraphQLModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularHasuraGraphQLModule });
|
|
663
|
+
AngularHasuraGraphQLModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularHasuraGraphQLModule, providers: [
|
|
664
|
+
{
|
|
665
|
+
provide: 'HasuraConfig',
|
|
666
|
+
useFactory: (options, platformId) => ({
|
|
667
|
+
endpoint: options.endpoint,
|
|
668
|
+
authOptions: options.credentials,
|
|
669
|
+
interceptors: {
|
|
670
|
+
request: (request) => {
|
|
671
|
+
if (isPlatformBrowser(platformId))
|
|
704
672
|
return request;
|
|
705
|
-
},
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
673
|
+
const interval = setInterval(() => { }, 100);
|
|
674
|
+
request.interval = interval;
|
|
675
|
+
return request;
|
|
676
|
+
},
|
|
677
|
+
response: (response, request) => {
|
|
678
|
+
if (isPlatformBrowser(platformId))
|
|
710
679
|
return response;
|
|
711
|
-
|
|
680
|
+
clearInterval(request.interval);
|
|
681
|
+
return response;
|
|
712
682
|
},
|
|
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);
|
|
724
|
-
},
|
|
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,
|
|
752
|
-
},
|
|
753
|
-
{
|
|
754
|
-
provide: CategoryFilterHasuraGraphQLRepository,
|
|
755
|
-
useFactory: (options) => {
|
|
756
|
-
return new CategoryFilterHasuraGraphQLRepository(options);
|
|
757
|
-
},
|
|
758
|
-
deps: ['HasuraConfig'],
|
|
759
|
-
},
|
|
760
|
-
{
|
|
761
|
-
provide: 'FilterOptionRepository',
|
|
762
|
-
useExisting: FilterOptionHasuraGraphQLRepository,
|
|
763
|
-
},
|
|
764
|
-
{
|
|
765
|
-
provide: FilterOptionHasuraGraphQLRepository,
|
|
766
|
-
useFactory: (options) => {
|
|
767
|
-
return new FilterOptionHasuraGraphQLRepository(options);
|
|
768
683
|
},
|
|
769
|
-
|
|
684
|
+
}),
|
|
685
|
+
deps: [HASURA_OPTIONS, PLATFORM_ID],
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
provide: 'CategoryRepository',
|
|
689
|
+
useExisting: CategoryHasuraGraphQLRepository,
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
provide: CategoryHasuraGraphQLRepository,
|
|
693
|
+
useFactory: (options, productRepository, categoryFilterRepository) => {
|
|
694
|
+
return new CategoryHasuraGraphQLRepository(options, productRepository, categoryFilterRepository);
|
|
770
695
|
},
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
696
|
+
deps: ['HasuraConfig', ProductHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository],
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
provide: 'ProductRepository',
|
|
700
|
+
useExisting: ProductHasuraGraphQLRepository,
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
provide: ProductHasuraGraphQLRepository,
|
|
704
|
+
useFactory: (hasuraConfig) => {
|
|
705
|
+
return new ProductHasuraGraphQLRepository(hasuraConfig);
|
|
774
706
|
},
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
707
|
+
deps: ['HasuraConfig'],
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
provide: 'VariantRepository',
|
|
711
|
+
useExisting: VariantHasuraGraphQLRepository,
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
provide: VariantHasuraGraphQLRepository,
|
|
715
|
+
useFactory: (hasuraConfig) => {
|
|
716
|
+
return new VariantHasuraGraphQLRepository(hasuraConfig);
|
|
781
717
|
},
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
718
|
+
deps: ['HasuraConfig'],
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
provide: 'CategoryFilterRepository',
|
|
722
|
+
useExisting: CategoryFilterHasuraGraphQLRepository,
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
provide: CategoryFilterHasuraGraphQLRepository,
|
|
726
|
+
useFactory: (options) => {
|
|
727
|
+
return new CategoryFilterHasuraGraphQLRepository(options);
|
|
786
728
|
},
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
729
|
+
deps: ['HasuraConfig'],
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
provide: 'FilterOptionRepository',
|
|
733
|
+
useExisting: FilterOptionHasuraGraphQLRepository,
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
provide: FilterOptionHasuraGraphQLRepository,
|
|
737
|
+
useFactory: (options) => {
|
|
738
|
+
return new FilterOptionHasuraGraphQLRepository(options);
|
|
790
739
|
},
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
740
|
+
deps: ['HasuraConfig'],
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
provide: 'FilterRepository',
|
|
744
|
+
useExisting: FilterHasuraGraphQLRepository,
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
provide: FilterHasuraGraphQLRepository,
|
|
748
|
+
useFactory: (options, filterOptionRepository, categoryFilterRepository) => {
|
|
749
|
+
return new FilterHasuraGraphQLRepository(options, filterOptionRepository, categoryFilterRepository);
|
|
797
750
|
},
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
751
|
+
deps: ['HasuraConfig', FilterOptionHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository],
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
provide: CategoryCollectionChildrenHasuraGraphQLRepository,
|
|
755
|
+
useFactory: (options) => new CategoryCollectionChildrenHasuraGraphQLRepository(options),
|
|
756
|
+
deps: ['HasuraConfig'],
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
provide: 'CategoryCollectionChildrenRepository',
|
|
760
|
+
useExisting: CategoryCollectionChildrenHasuraGraphQLRepository,
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
provide: WishlistHasuraGraphQLRepository,
|
|
764
|
+
useFactory: (options, categoryFilterRepository) => {
|
|
765
|
+
return new WishlistHasuraGraphQLRepository(options, categoryFilterRepository);
|
|
801
766
|
},
|
|
802
|
-
|
|
803
|
-
}
|
|
804
|
-
|
|
767
|
+
deps: ['HasuraConfig', CategoryFilterHasuraGraphQLRepository],
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
provide: 'WishlistRepository',
|
|
771
|
+
useExisting: WishlistHasuraGraphQLRepository,
|
|
772
|
+
},
|
|
773
|
+
] });
|
|
774
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularHasuraGraphQLModule, decorators: [{
|
|
805
775
|
type: NgModule,
|
|
806
776
|
args: [{
|
|
807
777
|
providers: [
|
|
@@ -939,10 +909,10 @@ class AuthService {
|
|
|
939
909
|
getFireUser() {
|
|
940
910
|
return authState(this.angularFireAuth).pipe(catchError(() => of(null)));
|
|
941
911
|
}
|
|
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 }); }
|
|
944
912
|
}
|
|
945
|
-
i0.ɵɵ
|
|
913
|
+
AuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AuthService, deps: [{ token: i1$1.Auth }, { token: 'UserRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
914
|
+
AuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AuthService });
|
|
915
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AuthService, decorators: [{
|
|
946
916
|
type: Injectable
|
|
947
917
|
}], ctorParameters: function () { return [{ type: i1$1.Auth }, { type: undefined, decorators: [{
|
|
948
918
|
type: Inject,
|
|
@@ -1138,10 +1108,10 @@ class CouponService {
|
|
|
1138
1108
|
}
|
|
1139
1109
|
return couponUseLimits;
|
|
1140
1110
|
}
|
|
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' }); }
|
|
1143
1111
|
}
|
|
1144
|
-
i0.ɵɵ
|
|
1112
|
+
CouponService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CouponService, deps: [{ token: 'CouponRepository' }, { token: DEFAULT_SHOP }, { token: 'OrderRepository' }, { token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1113
|
+
CouponService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CouponService, providedIn: 'root' });
|
|
1114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CouponService, decorators: [{
|
|
1145
1115
|
type: Injectable,
|
|
1146
1116
|
args: [{
|
|
1147
1117
|
providedIn: 'root',
|
|
@@ -1202,10 +1172,10 @@ class CheckoutService {
|
|
|
1202
1172
|
cookie.set('checkoutId', checkout.id);
|
|
1203
1173
|
return checkout;
|
|
1204
1174
|
}
|
|
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 }); }
|
|
1207
1175
|
}
|
|
1208
|
-
i0.ɵɵ
|
|
1176
|
+
CheckoutService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutService, deps: [{ token: CouponService }, { token: 'CheckoutRepository' }, { token: 'OrderRepository' }, { token: 'UserRepository' }, { token: DEFAULT_SHOP }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1177
|
+
CheckoutService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutService });
|
|
1178
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutService, decorators: [{
|
|
1209
1179
|
type: Injectable
|
|
1210
1180
|
}], ctorParameters: function () { return [{ type: CouponService }, { type: undefined, decorators: [{
|
|
1211
1181
|
type: Inject,
|
|
@@ -1469,10 +1439,10 @@ class CartService {
|
|
|
1469
1439
|
});
|
|
1470
1440
|
});
|
|
1471
1441
|
}
|
|
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 }); }
|
|
1474
1442
|
}
|
|
1475
|
-
i0.ɵɵ
|
|
1443
|
+
CartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CartService, deps: [{ token: AuthService }, { token: CheckoutService }, { token: DEFAULT_SHOP }, { token: 'ProductRepository' }, { token: 'CategoryRepository' }, { token: 'VariantRepository' }, { token: 'Buy2WinRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1444
|
+
CartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CartService });
|
|
1445
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CartService, decorators: [{
|
|
1476
1446
|
type: Injectable
|
|
1477
1447
|
}], ctorParameters: function () { return [{ type: AuthService }, { type: CheckoutService }, { type: i1$3.Shops, decorators: [{
|
|
1478
1448
|
type: Inject,
|
|
@@ -1531,6 +1501,8 @@ class CatalogService {
|
|
|
1531
1501
|
return { rate: 'desc' };
|
|
1532
1502
|
if (sort === 'news')
|
|
1533
1503
|
return { createdAt: 'desc' };
|
|
1504
|
+
if (sort === 'biggest-discount')
|
|
1505
|
+
return { subscriberDiscountPercentage: 'desc' };
|
|
1534
1506
|
};
|
|
1535
1507
|
this.buildLimitQuery = (options) => {
|
|
1536
1508
|
const limit = options?.perPage || 20;
|
|
@@ -1589,13 +1561,13 @@ class CatalogService {
|
|
|
1589
1561
|
return { tags: { operator: Where.LIKE, value: profile } };
|
|
1590
1562
|
if (term)
|
|
1591
1563
|
return this.productIndex
|
|
1592
|
-
.search(term,
|
|
1564
|
+
.search(term, 999, this.shop)
|
|
1593
1565
|
.then((data) => ({ id: { operator: Where.IN, value: data.hits.map(({ _source }) => _source.id) } }));
|
|
1594
1566
|
}
|
|
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 }); }
|
|
1597
1567
|
}
|
|
1598
|
-
i0.ɵɵ
|
|
1568
|
+
CatalogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService, deps: [{ token: 'ProductRepository' }, { token: CATEGORY_STRUCTURE }, { token: DEFAULT_SHOP }, { token: i1$3.ProductsIndex }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1569
|
+
CatalogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService });
|
|
1570
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService, decorators: [{
|
|
1599
1571
|
type: Injectable
|
|
1600
1572
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1601
1573
|
type: Inject,
|
|
@@ -1624,18 +1596,18 @@ class CategoryService {
|
|
|
1624
1596
|
}, mainGender || this.shop === Shops.MENSMARKET ? 'male' : 'female')
|
|
1625
1597
|
.then(({ data }) => Object.keys(data.map((product) => product.brand).reduce((brands, brand) => ({ ...brands, [brand]: true }), {})));
|
|
1626
1598
|
return this.categoryRepository
|
|
1627
|
-
.find({ filters: { brandCategory: true }, orderBy: { name: 'asc' } })
|
|
1599
|
+
.find({ filters: { brandCategory: true, shop: this.shop }, orderBy: { name: 'asc' } })
|
|
1628
1600
|
.then(({ data }) => data.filter((category) => brands.includes(category.conditions.brand)));
|
|
1629
1601
|
}
|
|
1630
|
-
async fetchFilterOptions(category
|
|
1602
|
+
async fetchFilterOptions(category) {
|
|
1631
1603
|
return await this.categoryFilterRepository
|
|
1632
1604
|
.find({ filters: { categoryId: +category.id } })
|
|
1633
1605
|
.then(({ data }) => data.map((categoryFilter) => categoryFilter.filter));
|
|
1634
1606
|
}
|
|
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 }); }
|
|
1637
1607
|
}
|
|
1638
|
-
i0.ɵɵ
|
|
1608
|
+
CategoryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryService, deps: [{ token: 'ProductRepository' }, { token: 'CategoryRepository' }, { token: 'CategoryFilterRepository' }, { token: CATEGORY_STRUCTURE }, { token: DEFAULT_SHOP }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1609
|
+
CategoryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryService });
|
|
1610
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryService, decorators: [{
|
|
1639
1611
|
type: Injectable
|
|
1640
1612
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1641
1613
|
type: Inject,
|
|
@@ -1691,42 +1663,41 @@ class UtilHelper {
|
|
|
1691
1663
|
}
|
|
1692
1664
|
|
|
1693
1665
|
class NewCategoryStructureAdapter {
|
|
1694
|
-
constructor(categoryRepository
|
|
1666
|
+
constructor(categoryRepository) {
|
|
1695
1667
|
this.categoryRepository = categoryRepository;
|
|
1696
|
-
this.categoryCollectionChildrenRepository = categoryCollectionChildrenRepository;
|
|
1697
1668
|
}
|
|
1698
1669
|
async buildProductFilterByCategory(category) {
|
|
1699
|
-
const
|
|
1700
|
-
|
|
1701
|
-
:
|
|
1702
|
-
|
|
1670
|
+
const loadedCategory = await this.getCategory(category);
|
|
1671
|
+
if (loadedCategory.isCollection)
|
|
1672
|
+
return { id: { operator: Where.IN, value: loadedCategory.products } };
|
|
1673
|
+
const categoryIds = [...(await this.getAllCategoriesIdFromCategory(category)), category.id.toString()];
|
|
1674
|
+
return {
|
|
1675
|
+
category: {
|
|
1676
|
+
id: {
|
|
1677
|
+
operator: Where.IN,
|
|
1678
|
+
value: categoryIds,
|
|
1679
|
+
},
|
|
1680
|
+
},
|
|
1681
|
+
};
|
|
1703
1682
|
}
|
|
1704
1683
|
async getAllCategoriesIdFromCategory(category) {
|
|
1705
1684
|
return this.categoryRepository
|
|
1706
1685
|
.getChildren(+category.id)
|
|
1707
1686
|
.then((categories) => categories.map((category) => category.id.toString()));
|
|
1708
1687
|
}
|
|
1709
|
-
async
|
|
1710
|
-
return
|
|
1711
|
-
.
|
|
1712
|
-
|
|
1688
|
+
async getCategory(category) {
|
|
1689
|
+
return isNil(category.isCollection) || (category.isCollection && !category.products?.length)
|
|
1690
|
+
? this.categoryRepository.get({ id: category.id })
|
|
1691
|
+
: category;
|
|
1713
1692
|
}
|
|
1714
|
-
async isCollection(category) {
|
|
1715
|
-
return !isNil(category.isCollection)
|
|
1716
|
-
? category.isCollection
|
|
1717
|
-
: this.categoryRepository.get({ id: category.id }).then((category) => category.isCollection);
|
|
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 }); }
|
|
1721
1693
|
}
|
|
1722
|
-
i0.ɵɵ
|
|
1694
|
+
NewCategoryStructureAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: NewCategoryStructureAdapter, deps: [{ token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1695
|
+
NewCategoryStructureAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: NewCategoryStructureAdapter });
|
|
1696
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: NewCategoryStructureAdapter, decorators: [{
|
|
1723
1697
|
type: Injectable
|
|
1724
1698
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1725
1699
|
type: Inject,
|
|
1726
1700
|
args: ['CategoryRepository']
|
|
1727
|
-
}] }, { type: undefined, decorators: [{
|
|
1728
|
-
type: Inject,
|
|
1729
|
-
args: ['CategoryCollectionChildrenRepository']
|
|
1730
1701
|
}] }]; } });
|
|
1731
1702
|
|
|
1732
1703
|
class OldCategoryStructureAdapter {
|
|
@@ -1739,10 +1710,10 @@ class OldCategoryStructureAdapter {
|
|
|
1739
1710
|
: await this.categoryRepository.get({ id: category.id }).then((categoryFound) => categoryFound.products);
|
|
1740
1711
|
return { id: { operator: Where.IN, value: productsIds } };
|
|
1741
1712
|
}
|
|
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 }); }
|
|
1744
1713
|
}
|
|
1745
|
-
i0.ɵɵ
|
|
1714
|
+
OldCategoryStructureAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OldCategoryStructureAdapter, deps: [{ token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1715
|
+
OldCategoryStructureAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OldCategoryStructureAdapter });
|
|
1716
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OldCategoryStructureAdapter, decorators: [{
|
|
1746
1717
|
type: Injectable
|
|
1747
1718
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1748
1719
|
type: Inject,
|
|
@@ -1750,10 +1721,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImpor
|
|
|
1750
1721
|
}] }]; } });
|
|
1751
1722
|
|
|
1752
1723
|
class WishlistService {
|
|
1753
|
-
constructor(wishlistRepository, shop, productRepository, categoryFilterRepository,
|
|
1724
|
+
constructor(wishlistRepository, shop, productRepository, categoryFilterRepository, productIndex) {
|
|
1754
1725
|
this.wishlistRepository = wishlistRepository;
|
|
1755
1726
|
this.shop = shop;
|
|
1756
|
-
const categoryStructureAdapter = new NewCategoryStructureAdapter(wishlistRepository
|
|
1727
|
+
const categoryStructureAdapter = new NewCategoryStructureAdapter(wishlistRepository);
|
|
1757
1728
|
this.catalogService = new CatalogService(productRepository, categoryStructureAdapter, shop, productIndex);
|
|
1758
1729
|
this.categoryService = new CategoryService(productRepository, wishlistRepository, categoryFilterRepository, categoryStructureAdapter, shop);
|
|
1759
1730
|
}
|
|
@@ -1763,9 +1734,9 @@ class WishlistService {
|
|
|
1763
1734
|
getCategoryService() {
|
|
1764
1735
|
return this.categoryService;
|
|
1765
1736
|
}
|
|
1766
|
-
async create(personId, title, description, userFullName) {
|
|
1737
|
+
async create(personId, title, description, userFullName, userPhoto) {
|
|
1767
1738
|
const data = {
|
|
1768
|
-
slug: UtilHelper.createSlug(`favoritos ${
|
|
1739
|
+
slug: UtilHelper.createSlug(`favoritos ${title}`),
|
|
1769
1740
|
name: title,
|
|
1770
1741
|
description,
|
|
1771
1742
|
metadata: {
|
|
@@ -1775,22 +1746,26 @@ class WishlistService {
|
|
|
1775
1746
|
shop: this.shop,
|
|
1776
1747
|
shops: [this.shop],
|
|
1777
1748
|
personId,
|
|
1749
|
+
personName: userFullName,
|
|
1750
|
+
personPhoto: userPhoto,
|
|
1778
1751
|
brandCategory: false,
|
|
1779
1752
|
published: true,
|
|
1780
1753
|
};
|
|
1781
1754
|
const newWishlist = await this.wishlistRepository.create(data);
|
|
1782
1755
|
return this.wishlistRepository.update({ id: newWishlist.id, slug: `${newWishlist.id}-${newWishlist.slug}` });
|
|
1783
1756
|
}
|
|
1784
|
-
update(id, title, description, userFullName) {
|
|
1757
|
+
update(id, title, description, userFullName, userPhoto) {
|
|
1785
1758
|
const data = {
|
|
1786
1759
|
id,
|
|
1787
|
-
slug: UtilHelper.createSlug(`${id}-favoritos ${
|
|
1760
|
+
slug: UtilHelper.createSlug(`${id}-favoritos ${title}`),
|
|
1788
1761
|
name: title,
|
|
1789
1762
|
description,
|
|
1790
1763
|
metadata: {
|
|
1791
1764
|
title: `${userFullName} - ${title}`,
|
|
1792
1765
|
description: `${userFullName} - ${description}`,
|
|
1793
1766
|
},
|
|
1767
|
+
personName: userFullName,
|
|
1768
|
+
personPhoto: userPhoto,
|
|
1794
1769
|
};
|
|
1795
1770
|
return this.wishlistRepository.update(data);
|
|
1796
1771
|
}
|
|
@@ -1823,10 +1798,10 @@ class WishlistService {
|
|
|
1823
1798
|
}
|
|
1824
1799
|
return wishlist;
|
|
1825
1800
|
}
|
|
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 }); }
|
|
1828
1801
|
}
|
|
1829
|
-
i0.ɵɵ
|
|
1802
|
+
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: i1$3.ProductsIndex }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1803
|
+
WishlistService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService });
|
|
1804
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, decorators: [{
|
|
1830
1805
|
type: Injectable
|
|
1831
1806
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1832
1807
|
type: Inject,
|
|
@@ -1840,9 +1815,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImpor
|
|
|
1840
1815
|
}] }, { type: undefined, decorators: [{
|
|
1841
1816
|
type: Inject,
|
|
1842
1817
|
args: ['CategoryFilterRepository']
|
|
1843
|
-
}] }, { type: undefined, decorators: [{
|
|
1844
|
-
type: Inject,
|
|
1845
|
-
args: ['CategoryCollectionChildrenRepository']
|
|
1846
1818
|
}] }, { type: i1$3.ProductsIndex }]; } });
|
|
1847
1819
|
|
|
1848
1820
|
class CheckoutSubscriptionService {
|
|
@@ -1877,10 +1849,10 @@ class CheckoutSubscriptionService {
|
|
|
1877
1849
|
calcDiscountSubscription(coupon) {
|
|
1878
1850
|
return this.getCheckoutSubscription().pipe(concatMap((checkout) => this.couponService.calcDiscountSubscription(coupon, checkout).pipe()));
|
|
1879
1851
|
}
|
|
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 }); }
|
|
1882
1852
|
}
|
|
1883
|
-
i0.ɵɵ
|
|
1853
|
+
CheckoutSubscriptionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutSubscriptionService, deps: [{ token: 'CheckoutSubscriptionRepository' }, { token: 'SubscriptionRepository' }, { token: CouponService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1854
|
+
CheckoutSubscriptionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutSubscriptionService });
|
|
1855
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutSubscriptionService, decorators: [{
|
|
1884
1856
|
type: Injectable
|
|
1885
1857
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1886
1858
|
type: Inject,
|
|
@@ -1891,13 +1863,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImpor
|
|
|
1891
1863
|
}] }, { type: CouponService }]; } });
|
|
1892
1864
|
|
|
1893
1865
|
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
|
-
}
|
|
1901
1866
|
constructor(categoryRepository, homeRepository, productRepository, defaultShop) {
|
|
1902
1867
|
this.categoryRepository = categoryRepository;
|
|
1903
1868
|
this.homeRepository = homeRepository;
|
|
@@ -1923,6 +1888,13 @@ class HomeShopService {
|
|
|
1923
1888
|
]))) || [],
|
|
1924
1889
|
});
|
|
1925
1890
|
}
|
|
1891
|
+
get homeId() {
|
|
1892
|
+
if (this.defaultShop === Shops.GLAMSHOP)
|
|
1893
|
+
return 'glamshop';
|
|
1894
|
+
if (this.defaultShop === Shops.MENSMARKET)
|
|
1895
|
+
return 'mens_market';
|
|
1896
|
+
return null;
|
|
1897
|
+
}
|
|
1926
1898
|
getHomeData() {
|
|
1927
1899
|
return this.getHomeConfiguration().pipe(map((home) => (home?.data?.expiresAt > new Date() ? home : null)), concatMap((home) => home
|
|
1928
1900
|
? of(home)
|
|
@@ -1978,10 +1950,10 @@ class HomeShopService {
|
|
|
1978
1950
|
data,
|
|
1979
1951
|
})).pipe(tap(() => (this.homeConfiguration.data = data)), map(() => this.homeConfiguration));
|
|
1980
1952
|
}
|
|
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 }); }
|
|
1983
1953
|
}
|
|
1984
|
-
i0.ɵɵ
|
|
1954
|
+
HomeShopService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: HomeShopService, deps: [{ token: 'CategoryRepository' }, { token: 'HomeRepository' }, { token: 'ProductRepository' }, { token: DEFAULT_SHOP }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1955
|
+
HomeShopService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: HomeShopService });
|
|
1956
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: HomeShopService, decorators: [{
|
|
1985
1957
|
type: Injectable
|
|
1986
1958
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1987
1959
|
type: Inject,
|
|
@@ -2009,10 +1981,10 @@ class OrderService {
|
|
|
2009
1981
|
.subscribe((doc) => this.orderSubject.next(doc));
|
|
2010
1982
|
return this.orderSubject;
|
|
2011
1983
|
}
|
|
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 }); }
|
|
2014
1984
|
}
|
|
2015
|
-
i0.ɵɵ
|
|
1985
|
+
OrderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService, deps: [{ token: i1$2.Firestore }, { token: 'OrderRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1986
|
+
OrderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService });
|
|
1987
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService, decorators: [{
|
|
2016
1988
|
type: Injectable
|
|
2017
1989
|
}], ctorParameters: function () { return [{ type: i1$2.Firestore }, { type: i1$3.OrderFirestoreRepository, decorators: [{
|
|
2018
1990
|
type: Inject,
|
|
@@ -2095,10 +2067,10 @@ class ShippingService {
|
|
|
2095
2067
|
}
|
|
2096
2068
|
return false;
|
|
2097
2069
|
}
|
|
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 }); }
|
|
2100
2070
|
}
|
|
2101
|
-
i0.ɵɵ
|
|
2071
|
+
ShippingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ShippingService, deps: [{ token: i1$4.HttpClient }, { token: BACKEND_URL }, { token: HomeShopService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2072
|
+
ShippingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ShippingService });
|
|
2073
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ShippingService, decorators: [{
|
|
2102
2074
|
type: Injectable
|
|
2103
2075
|
}], ctorParameters: function () { return [{ type: i1$4.HttpClient }, { type: undefined, decorators: [{
|
|
2104
2076
|
type: Inject,
|
|
@@ -2125,23 +2097,23 @@ class AngularConnectModule {
|
|
|
2125
2097
|
],
|
|
2126
2098
|
};
|
|
2127
2099
|
}
|
|
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] }); }
|
|
2143
2100
|
}
|
|
2144
|
-
i0.ɵɵ
|
|
2101
|
+
AngularConnectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2102
|
+
AngularConnectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, imports: [AngularElasticSeachModule, AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule] });
|
|
2103
|
+
AngularConnectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, providers: [
|
|
2104
|
+
AuthService,
|
|
2105
|
+
CartService,
|
|
2106
|
+
CatalogService,
|
|
2107
|
+
CategoryService,
|
|
2108
|
+
CheckoutService,
|
|
2109
|
+
CheckoutSubscriptionService,
|
|
2110
|
+
CouponService,
|
|
2111
|
+
HomeShopService,
|
|
2112
|
+
OrderService,
|
|
2113
|
+
ShippingService,
|
|
2114
|
+
WishlistService,
|
|
2115
|
+
], imports: [AngularElasticSeachModule, AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule] });
|
|
2116
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, decorators: [{
|
|
2145
2117
|
type: NgModule,
|
|
2146
2118
|
args: [{
|
|
2147
2119
|
imports: [AngularElasticSeachModule, AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule],
|