@infrab4a/connect-angular 4.2.10-beta.1 → 4.2.10-beta.3
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/esm2022/angular-connect.module.mjs +97 -0
- package/esm2022/angular-elastic-search.module.mjs +34 -0
- package/esm2022/angular-firebase-auth.module.mjs +115 -0
- package/esm2022/angular-firestore.module.mjs +483 -0
- package/esm2022/angular-hasura-graphql.module.mjs +265 -0
- package/{esm2020 → esm2022}/consts/category-structure.mjs +1 -1
- package/{esm2020 → esm2022}/consts/default-shop.const.mjs +1 -1
- package/{esm2020 → esm2022}/consts/es-config.const.mjs +1 -1
- package/{esm2020 → esm2022}/consts/firebase-const.mjs +1 -1
- package/{esm2020 → esm2022}/consts/hasura-options.const.mjs +1 -1
- package/{esm2020 → esm2022}/consts/index.mjs +1 -1
- package/{esm2020 → esm2022}/helpers/index.mjs +1 -1
- package/{esm2020 → esm2022}/helpers/mobile-operation-system-checker.helper.mjs +1 -1
- package/{esm2020 → esm2022}/index.mjs +1 -1
- package/{esm2020 → esm2022}/services/auth.service.mjs +6 -6
- package/{esm2020 → esm2022}/services/cart.service.mjs +6 -6
- package/{esm2020 → esm2022}/services/catalog/adapters/category-structure.adapter.mjs +1 -1
- package/{esm2020 → esm2022}/services/catalog/adapters/index.mjs +1 -1
- package/{esm2020 → esm2022}/services/catalog/adapters/new-category-structure.adapter.mjs +6 -6
- package/{esm2020 → esm2022}/services/catalog/adapters/old-category-structure.adapter.mjs +6 -6
- package/esm2022/services/catalog/catalog.service.mjs +174 -0
- package/{esm2020 → esm2022}/services/catalog/category.service.mjs +6 -6
- package/{esm2020 → esm2022}/services/catalog/enums/index.mjs +1 -1
- package/{esm2020 → esm2022}/services/catalog/enums/product-sorts.enum.mjs +1 -1
- package/{esm2020 → esm2022}/services/catalog/index.mjs +1 -1
- package/{esm2020 → esm2022}/services/catalog/models/category-with-tree.model.mjs +1 -1
- package/{esm2020 → esm2022}/services/catalog/models/index.mjs +1 -1
- package/{esm2020 → esm2022}/services/catalog/types/index.mjs +1 -1
- package/{esm2020 → esm2022}/services/catalog/types/product-sort.type.mjs +1 -1
- package/{esm2020 → esm2022}/services/catalog/wishlist.service.mjs +6 -6
- package/{esm2020 → esm2022}/services/checkout-subscription.service.mjs +6 -6
- package/{esm2020 → esm2022}/services/checkout.service.mjs +6 -6
- package/esm2022/services/coupon.service.mjs +235 -0
- package/{esm2020 → esm2022}/services/helpers/index.mjs +1 -1
- package/{esm2020 → esm2022}/services/helpers/util.helper.mjs +1 -1
- package/esm2022/services/home-shop.service.mjs +115 -0
- package/{esm2020 → esm2022}/services/index.mjs +1 -1
- package/{esm2020 → esm2022}/services/order.service.mjs +6 -6
- package/{esm2020 → esm2022}/services/shipping.service.mjs +6 -6
- package/{esm2020 → esm2022}/services/types/index.mjs +1 -1
- package/{esm2020 → esm2022}/services/types/required-checkout-data.type.mjs +1 -1
- package/{esm2020 → esm2022}/services/types/required-checkout-subscription-data.type.mjs +1 -1
- package/esm2022/services/types/shipping-methods.type.mjs +2 -0
- package/{esm2020 → esm2022}/types/firebase-app-config.type.mjs +1 -1
- package/{esm2020 → esm2022}/types/index.mjs +1 -1
- package/{fesm2020 → fesm2022}/infrab4a-connect-angular.mjs +529 -509
- package/fesm2022/infrab4a-connect-angular.mjs.map +1 -0
- package/package.json +6 -12
- package/services/coupon.service.d.ts +1 -0
- package/esm2020/angular-connect.module.mjs +0 -97
- package/esm2020/angular-elastic-search.module.mjs +0 -34
- package/esm2020/angular-firebase-auth.module.mjs +0 -115
- package/esm2020/angular-firestore.module.mjs +0 -483
- package/esm2020/angular-hasura-graphql.module.mjs +0 -265
- package/esm2020/services/catalog/catalog.service.mjs +0 -170
- package/esm2020/services/coupon.service.mjs +0 -218
- package/esm2020/services/home-shop.service.mjs +0 -116
- package/esm2020/services/types/shipping-methods.type.mjs +0 -2
- package/fesm2015/infrab4a-connect-angular.mjs +0 -2316
- 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}/infrab4a-connect-angular.mjs +0 -0
|
@@ -1,18 +1,18 @@
|
|
|
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$4 from '@angular/fire/app';
|
|
4
|
-
import { FirebaseApp,
|
|
4
|
+
import { FirebaseApp, getApp, initializeApp, provideFirebaseApp } from '@angular/fire/app';
|
|
5
5
|
import * as i1$2 from '@infrab4a/connect';
|
|
6
6
|
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, SubscriptionSummaryFirestoreRepository, ProductVariantFirestoreRepository, CategoryHasuraGraphQLRepository, ProductHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository, ProductReviewsHasuraGraphQLRepository, VariantHasuraGraphQLRepository, FilterOptionHasuraGraphQLRepository, FilterHasuraGraphQLRepository, CategoryCollectionChildrenHasuraGraphQLRepository, WishlistHasuraGraphQLRepository, Where, Shops, CheckoutTypes, CouponTypes, Exclusivities, isNil, NotFoundError, Checkout, pick, LineItem, RoundProductPricesHelper, set, InvalidArgumentError, Category, Wishlist, CheckoutSubscription, Product, RequiredArgumentError, add, Order } from '@infrab4a/connect';
|
|
7
7
|
import * as i1 from '@angular/fire/auth';
|
|
8
|
-
import { Auth,
|
|
8
|
+
import { Auth, getAuth, provideAuth, getIdToken, authState } from '@angular/fire/auth';
|
|
9
9
|
import { isPlatformBrowser, isPlatformServer } from '@angular/common';
|
|
10
10
|
import * as i1$1 from '@angular/fire/firestore';
|
|
11
|
-
import { Firestore,
|
|
12
|
-
import { combineLatest,
|
|
13
|
-
import { map,
|
|
11
|
+
import { Firestore, getFirestore, memoryLocalCache, initializeFirestore, provideFirestore, doc, docSnapshots } from '@angular/fire/firestore';
|
|
12
|
+
import { combineLatest, of, from, throwError, Subject, iif, forkJoin } from 'rxjs';
|
|
13
|
+
import { map, catchError, mergeMap, concatMap, tap } from 'rxjs/operators';
|
|
14
14
|
import cookie from 'js-cookie';
|
|
15
|
-
import {
|
|
15
|
+
import { __metadata, __decorate } from 'tslib';
|
|
16
16
|
import { Type } from 'class-transformer';
|
|
17
17
|
import * as i1$3 from '@angular/common/http';
|
|
18
18
|
|
|
@@ -25,17 +25,17 @@ class AngularElasticSeachModule {
|
|
|
25
25
|
providers: [{ provide: ES_CONFIG, useValue: options }],
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularElasticSeachModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
29
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.3", ngImport: i0, type: AngularElasticSeachModule }); }
|
|
30
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularElasticSeachModule, providers: [
|
|
31
|
+
{
|
|
32
|
+
provide: ProductsIndex,
|
|
33
|
+
useFactory: (configuration) => new ProductsIndex(new AxiosAdapter(configuration)),
|
|
34
|
+
deps: [ES_CONFIG],
|
|
35
|
+
},
|
|
36
|
+
] }); }
|
|
28
37
|
}
|
|
29
|
-
|
|
30
|
-
AngularElasticSeachModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule });
|
|
31
|
-
AngularElasticSeachModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule, providers: [
|
|
32
|
-
{
|
|
33
|
-
provide: ProductsIndex,
|
|
34
|
-
useFactory: (configuration) => new ProductsIndex(new AxiosAdapter(configuration)),
|
|
35
|
-
deps: [ES_CONFIG],
|
|
36
|
-
},
|
|
37
|
-
] });
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule, decorators: [{
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularElasticSeachModule, decorators: [{
|
|
39
39
|
type: NgModule,
|
|
40
40
|
args: [{
|
|
41
41
|
providers: [
|
|
@@ -69,54 +69,54 @@ class AngularFirebaseAuthModule {
|
|
|
69
69
|
],
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularFirebaseAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
73
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.3", ngImport: i0, type: AngularFirebaseAuthModule, imports: [i1.AuthModule] }); }
|
|
74
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularFirebaseAuthModule, providers: [
|
|
75
|
+
{
|
|
76
|
+
provide: 'Authentication',
|
|
77
|
+
useFactory: (authenticationService, userRepository) => {
|
|
78
|
+
return new Authentication(authenticationService, userRepository);
|
|
79
|
+
},
|
|
80
|
+
deps: ['AuthenticationService', 'UserRepository'],
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
provide: 'AuthenticationService',
|
|
84
|
+
useFactory: (angularFireAuth) => {
|
|
85
|
+
return new AuthenticationFirebaseAuthService(angularFireAuth);
|
|
86
|
+
},
|
|
87
|
+
deps: [Auth],
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
provide: 'Register',
|
|
91
|
+
useFactory: (registerService, userRepository) => {
|
|
92
|
+
return new Register(registerService, userRepository);
|
|
93
|
+
},
|
|
94
|
+
deps: ['RegisterService', 'UserRepository'],
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
provide: 'RegisterService',
|
|
98
|
+
useFactory: (angularFireAuth) => {
|
|
99
|
+
return new RegisterFirebaseAuthService(angularFireAuth);
|
|
100
|
+
},
|
|
101
|
+
deps: [Auth],
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
provide: 'SignOut',
|
|
105
|
+
useFactory: (authenticationService) => {
|
|
106
|
+
return new SignOut(authenticationService);
|
|
107
|
+
},
|
|
108
|
+
deps: ['AuthenticationService'],
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
provide: 'RecoveryPassword',
|
|
112
|
+
useFactory: (authenticationService) => {
|
|
113
|
+
return new RecoveryPassword(authenticationService);
|
|
114
|
+
},
|
|
115
|
+
deps: ['AuthenticationService'],
|
|
116
|
+
},
|
|
117
|
+
], imports: [provideAuth((injector) => getAuth(injector.get(FirebaseApp)))] }); }
|
|
72
118
|
}
|
|
73
|
-
|
|
74
|
-
AngularFirebaseAuthModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularFirebaseAuthModule, imports: [i1.AuthModule] });
|
|
75
|
-
AngularFirebaseAuthModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirebaseAuthModule, providers: [
|
|
76
|
-
{
|
|
77
|
-
provide: 'Authentication',
|
|
78
|
-
useFactory: (authenticationService, userRepository) => {
|
|
79
|
-
return new Authentication(authenticationService, userRepository);
|
|
80
|
-
},
|
|
81
|
-
deps: ['AuthenticationService', 'UserRepository'],
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
provide: 'AuthenticationService',
|
|
85
|
-
useFactory: (angularFireAuth) => {
|
|
86
|
-
return new AuthenticationFirebaseAuthService(angularFireAuth);
|
|
87
|
-
},
|
|
88
|
-
deps: [Auth],
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
provide: 'Register',
|
|
92
|
-
useFactory: (registerService, userRepository) => {
|
|
93
|
-
return new Register(registerService, userRepository);
|
|
94
|
-
},
|
|
95
|
-
deps: ['RegisterService', 'UserRepository'],
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
provide: 'RegisterService',
|
|
99
|
-
useFactory: (angularFireAuth) => {
|
|
100
|
-
return new RegisterFirebaseAuthService(angularFireAuth);
|
|
101
|
-
},
|
|
102
|
-
deps: [Auth],
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
provide: 'SignOut',
|
|
106
|
-
useFactory: (authenticationService) => {
|
|
107
|
-
return new SignOut(authenticationService);
|
|
108
|
-
},
|
|
109
|
-
deps: ['AuthenticationService'],
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
provide: 'RecoveryPassword',
|
|
113
|
-
useFactory: (authenticationService) => {
|
|
114
|
-
return new RecoveryPassword(authenticationService);
|
|
115
|
-
},
|
|
116
|
-
deps: ['AuthenticationService'],
|
|
117
|
-
},
|
|
118
|
-
], imports: [provideAuth((injector) => getAuth(injector.get(FirebaseApp)))] });
|
|
119
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirebaseAuthModule, decorators: [{
|
|
119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularFirebaseAuthModule, decorators: [{
|
|
120
120
|
type: NgModule,
|
|
121
121
|
args: [{
|
|
122
122
|
imports: [provideAuth((injector) => getAuth(injector.get(FirebaseApp)))],
|
|
@@ -185,235 +185,235 @@ class AngularFirestoreModule {
|
|
|
185
185
|
],
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
188
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularFirestoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
189
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.3", ngImport: i0, type: AngularFirestoreModule, imports: [AngularElasticSeachModule, i1$1.FirestoreModule] }); }
|
|
190
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularFirestoreModule, providers: [
|
|
191
|
+
{
|
|
192
|
+
provide: 'FirestoreOptions',
|
|
193
|
+
useFactory: (firestore, platformId) => ({
|
|
194
|
+
firestore,
|
|
195
|
+
interceptors: {
|
|
196
|
+
request: (request) => {
|
|
197
|
+
if (isPlatformBrowser(platformId))
|
|
198
|
+
return request;
|
|
199
|
+
const interval = setInterval(() => { }, 100);
|
|
200
|
+
request.interval = interval;
|
|
199
201
|
return request;
|
|
200
|
-
|
|
201
|
-
request
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
if (isPlatformBrowser(platformId))
|
|
202
|
+
},
|
|
203
|
+
response: (response, request) => {
|
|
204
|
+
if (isPlatformBrowser(platformId))
|
|
205
|
+
return response;
|
|
206
|
+
clearInterval(request.interval);
|
|
206
207
|
return response;
|
|
207
|
-
|
|
208
|
-
return response;
|
|
208
|
+
},
|
|
209
209
|
},
|
|
210
|
+
}),
|
|
211
|
+
deps: [Firestore, PLATFORM_ID],
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
provide: 'BeautyProfileRepository',
|
|
215
|
+
useFactory: (config, userRepository) => {
|
|
216
|
+
return new UserBeautyProfileFirestoreRepository(config, userRepository);
|
|
210
217
|
},
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
const firestore = initializeFirestore(injector.get(FirebaseApp), {
|
|
411
|
-
experimentalForceLongPolling: true,
|
|
412
|
-
localCache: memoryLocalCache(),
|
|
413
|
-
});
|
|
414
|
-
return firestore;
|
|
415
|
-
})] });
|
|
416
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirestoreModule, decorators: [{
|
|
218
|
+
deps: ['FirestoreOptions', 'UserRepository'],
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
provide: 'Buy2WinRepository',
|
|
222
|
+
useFactory: (options) => {
|
|
223
|
+
return new Buy2WinFirestoreRepository(options);
|
|
224
|
+
},
|
|
225
|
+
deps: ['FirestoreOptions'],
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
provide: CategoryFirestoreRepository,
|
|
229
|
+
useFactory: (options) => {
|
|
230
|
+
return new CategoryFirestoreRepository(options);
|
|
231
|
+
},
|
|
232
|
+
deps: ['FirestoreOptions'],
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
provide: 'CheckoutRepository',
|
|
236
|
+
useFactory: (options) => {
|
|
237
|
+
return new CheckoutFirestoreRepository(options);
|
|
238
|
+
},
|
|
239
|
+
deps: ['FirestoreOptions'],
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
provide: 'CheckoutSubscriptionRepository',
|
|
243
|
+
useFactory: (options) => {
|
|
244
|
+
return new CheckoutSubscriptionFirestoreRepository(options);
|
|
245
|
+
},
|
|
246
|
+
deps: ['FirestoreOptions'],
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
provide: 'CouponRepository',
|
|
250
|
+
useFactory: (options) => {
|
|
251
|
+
return new CouponFirestoreRepository(options);
|
|
252
|
+
},
|
|
253
|
+
deps: ['FirestoreOptions'],
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
provide: 'CampaignHashtagRepository',
|
|
257
|
+
useFactory: (options) => {
|
|
258
|
+
return new CampaignHashtagFirestoreRepository(options);
|
|
259
|
+
},
|
|
260
|
+
deps: ['FirestoreOptions'],
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
provide: 'CampaignDashboardRepository',
|
|
264
|
+
useFactory: (options) => {
|
|
265
|
+
return new CampaignDashboardFirestoreRepository(options);
|
|
266
|
+
},
|
|
267
|
+
deps: ['FirestoreOptions'],
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
provide: 'EditionRepository',
|
|
271
|
+
useFactory: (options, subscriptionRepository) => {
|
|
272
|
+
return new SubscriptionEditionFirestoreRepository(options, subscriptionRepository);
|
|
273
|
+
},
|
|
274
|
+
deps: ['FirestoreOptions', 'SubscriptionRepository'],
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
provide: 'HomeRepository',
|
|
278
|
+
useFactory: (options) => {
|
|
279
|
+
return new HomeFirestoreRepository(options);
|
|
280
|
+
},
|
|
281
|
+
deps: ['FirestoreOptions'],
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
provide: 'LeadRepository',
|
|
285
|
+
useFactory: (options) => {
|
|
286
|
+
return new LeadFirestoreRepository(options);
|
|
287
|
+
},
|
|
288
|
+
deps: ['FirestoreOptions'],
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
provide: 'LegacyOrderRepository',
|
|
292
|
+
useFactory: (options) => {
|
|
293
|
+
return new LegacyOrderFirestoreRepository(options);
|
|
294
|
+
},
|
|
295
|
+
deps: ['FirestoreOptions'],
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
provide: 'ShopMenuRepository',
|
|
299
|
+
useFactory: (options) => {
|
|
300
|
+
return new ShopMenuFirestoreRepository(options);
|
|
301
|
+
},
|
|
302
|
+
deps: ['FirestoreOptions'],
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
provide: 'OrderRepository',
|
|
306
|
+
useFactory: (options) => {
|
|
307
|
+
return new OrderFirestoreRepository(options);
|
|
308
|
+
},
|
|
309
|
+
deps: ['FirestoreOptions'],
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
provide: 'PaymentRepository',
|
|
313
|
+
useFactory: (options) => {
|
|
314
|
+
return new PaymentFirestoreRepository(options);
|
|
315
|
+
},
|
|
316
|
+
deps: ['FirestoreOptions'],
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
provide: ProductFirestoreRepository,
|
|
320
|
+
useFactory: (options) => {
|
|
321
|
+
return new ProductFirestoreRepository(options);
|
|
322
|
+
},
|
|
323
|
+
deps: ['FirestoreOptions'],
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
provide: 'ShopSettingsRepository',
|
|
327
|
+
useFactory: (options) => {
|
|
328
|
+
return new ShopSettingsFirestoreRepository(options);
|
|
329
|
+
},
|
|
330
|
+
deps: ['FirestoreOptions'],
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
provide: 'SubscriptionPaymentRepository',
|
|
334
|
+
useFactory: (options, subscriptionRepository) => {
|
|
335
|
+
return new SubscriptionPaymentFirestoreRepository(options, subscriptionRepository);
|
|
336
|
+
},
|
|
337
|
+
deps: ['FirestoreOptions', 'SubscriptionRepository'],
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
provide: 'SubscriptionPlanRepository',
|
|
341
|
+
useFactory: (options) => {
|
|
342
|
+
return new SubscriptionPlanFirestoreRepository(options);
|
|
343
|
+
},
|
|
344
|
+
deps: ['FirestoreOptions'],
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
provide: 'SubscriptionProductRepository',
|
|
348
|
+
useFactory: (options) => {
|
|
349
|
+
return new SubscriptionProductFirestoreRepository(options);
|
|
350
|
+
},
|
|
351
|
+
deps: ['FirestoreOptions'],
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
provide: 'SubscriptionRepository',
|
|
355
|
+
useFactory: (options) => {
|
|
356
|
+
return new SubscriptionFirestoreRepository(options);
|
|
357
|
+
},
|
|
358
|
+
deps: ['FirestoreOptions'],
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
provide: 'UserRepository',
|
|
362
|
+
useFactory: (options) => {
|
|
363
|
+
return new UserFirestoreRepository(options);
|
|
364
|
+
},
|
|
365
|
+
deps: ['FirestoreOptions'],
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
provide: 'UserAddressRepository',
|
|
369
|
+
useFactory: (options, userRepository) => {
|
|
370
|
+
return new UserAddressFirestoreRepository(options, userRepository);
|
|
371
|
+
},
|
|
372
|
+
deps: ['FirestoreOptions', 'UserRepository'],
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
provide: 'UserPaymentMethodRepository',
|
|
376
|
+
useFactory: (options, userRepository) => {
|
|
377
|
+
return new UserPaymentMethodFirestoreRepository(options, userRepository);
|
|
378
|
+
},
|
|
379
|
+
deps: ['FirestoreOptions', 'UserRepository'],
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
provide: 'SubscriptionMaterializationRepository',
|
|
383
|
+
useFactory: (options) => {
|
|
384
|
+
return new SubscriptionMaterializationFirestoreRepository(options);
|
|
385
|
+
},
|
|
386
|
+
deps: ['FirestoreOptions'],
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
provide: 'SubscriptionSummaryRepository',
|
|
390
|
+
useFactory: (options) => {
|
|
391
|
+
return new SubscriptionSummaryFirestoreRepository(options);
|
|
392
|
+
},
|
|
393
|
+
deps: ['FirestoreOptions'],
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
provide: ProductVariantFirestoreRepository,
|
|
397
|
+
useFactory: (options, productRepository) => {
|
|
398
|
+
return new ProductVariantFirestoreRepository(options, productRepository);
|
|
399
|
+
},
|
|
400
|
+
deps: ['FirestoreOptions', ProductFirestoreRepository],
|
|
401
|
+
},
|
|
402
|
+
], imports: [AngularElasticSeachModule,
|
|
403
|
+
provideFirestore((injector) => {
|
|
404
|
+
const platformId = injector.get(PLATFORM_ID);
|
|
405
|
+
if (isPlatformServer(platformId))
|
|
406
|
+
return getFirestore(injector.get(FirebaseApp));
|
|
407
|
+
if (!MobileOperationSystemCheckerHelper.isAppleDevice())
|
|
408
|
+
return getFirestore(injector.get(FirebaseApp));
|
|
409
|
+
const firestore = initializeFirestore(injector.get(FirebaseApp), {
|
|
410
|
+
experimentalForceLongPolling: true,
|
|
411
|
+
localCache: memoryLocalCache(),
|
|
412
|
+
});
|
|
413
|
+
return firestore;
|
|
414
|
+
})] }); }
|
|
415
|
+
}
|
|
416
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularFirestoreModule, decorators: [{
|
|
417
417
|
type: NgModule,
|
|
418
418
|
args: [{
|
|
419
419
|
imports: [
|
|
@@ -654,132 +654,132 @@ class AngularHasuraGraphQLModule {
|
|
|
654
654
|
providers: [{ provide: HASURA_OPTIONS, useValue: options }],
|
|
655
655
|
};
|
|
656
656
|
}
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
657
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularHasuraGraphQLModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
658
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.3", ngImport: i0, type: AngularHasuraGraphQLModule }); }
|
|
659
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularHasuraGraphQLModule, providers: [
|
|
660
|
+
{
|
|
661
|
+
provide: 'HasuraConfig',
|
|
662
|
+
useFactory: (options, platformId) => ({
|
|
663
|
+
endpoint: options.endpoint,
|
|
664
|
+
authOptions: options.credentials,
|
|
665
|
+
interceptors: {
|
|
666
|
+
request: (request) => {
|
|
667
|
+
if (isPlatformBrowser(platformId))
|
|
668
|
+
return request;
|
|
669
|
+
const interval = setInterval(() => { }, 100);
|
|
670
|
+
request.interval = interval;
|
|
669
671
|
return request;
|
|
670
|
-
|
|
671
|
-
request
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
if (isPlatformBrowser(platformId))
|
|
672
|
+
},
|
|
673
|
+
response: (response, request) => {
|
|
674
|
+
if (isPlatformBrowser(platformId))
|
|
675
|
+
return response;
|
|
676
|
+
clearInterval(request.interval);
|
|
676
677
|
return response;
|
|
677
|
-
|
|
678
|
-
return response;
|
|
678
|
+
},
|
|
679
679
|
},
|
|
680
|
+
}),
|
|
681
|
+
deps: [HASURA_OPTIONS, PLATFORM_ID],
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
provide: 'CategoryRepository',
|
|
685
|
+
useExisting: CategoryHasuraGraphQLRepository,
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
provide: CategoryHasuraGraphQLRepository,
|
|
689
|
+
useFactory: (options, productRepository, categoryFilterRepository) => {
|
|
690
|
+
return new CategoryHasuraGraphQLRepository(options, productRepository, categoryFilterRepository);
|
|
680
691
|
},
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
useFactory: (options, categoryFilterRepository) => {
|
|
773
|
-
return new WishlistHasuraGraphQLRepository(options, categoryFilterRepository);
|
|
774
|
-
},
|
|
775
|
-
deps: ['HasuraConfig', CategoryFilterHasuraGraphQLRepository],
|
|
776
|
-
},
|
|
777
|
-
{
|
|
778
|
-
provide: 'WishlistRepository',
|
|
779
|
-
useExisting: WishlistHasuraGraphQLRepository,
|
|
780
|
-
},
|
|
781
|
-
] });
|
|
782
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularHasuraGraphQLModule, decorators: [{
|
|
692
|
+
deps: ['HasuraConfig', ProductHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository],
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
provide: 'ProductRepository',
|
|
696
|
+
useExisting: ProductHasuraGraphQLRepository,
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
provide: ProductHasuraGraphQLRepository,
|
|
700
|
+
useFactory: (hasuraConfig) => {
|
|
701
|
+
return new ProductHasuraGraphQLRepository(hasuraConfig);
|
|
702
|
+
},
|
|
703
|
+
deps: ['HasuraConfig'],
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
provide: 'ProductReviewsRepository',
|
|
707
|
+
useExisting: ProductReviewsHasuraGraphQLRepository,
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
provide: ProductReviewsHasuraGraphQLRepository,
|
|
711
|
+
useFactory: (hasuraConfig) => {
|
|
712
|
+
return new ProductReviewsHasuraGraphQLRepository(hasuraConfig);
|
|
713
|
+
},
|
|
714
|
+
deps: ['HasuraConfig'],
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
provide: 'VariantRepository',
|
|
718
|
+
useExisting: VariantHasuraGraphQLRepository,
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
provide: VariantHasuraGraphQLRepository,
|
|
722
|
+
useFactory: (hasuraConfig) => {
|
|
723
|
+
return new VariantHasuraGraphQLRepository(hasuraConfig);
|
|
724
|
+
},
|
|
725
|
+
deps: ['HasuraConfig'],
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
provide: 'CategoryFilterRepository',
|
|
729
|
+
useExisting: CategoryFilterHasuraGraphQLRepository,
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
provide: CategoryFilterHasuraGraphQLRepository,
|
|
733
|
+
useFactory: (options) => {
|
|
734
|
+
return new CategoryFilterHasuraGraphQLRepository(options);
|
|
735
|
+
},
|
|
736
|
+
deps: ['HasuraConfig'],
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
provide: 'FilterOptionRepository',
|
|
740
|
+
useExisting: FilterOptionHasuraGraphQLRepository,
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
provide: FilterOptionHasuraGraphQLRepository,
|
|
744
|
+
useFactory: (options) => {
|
|
745
|
+
return new FilterOptionHasuraGraphQLRepository(options);
|
|
746
|
+
},
|
|
747
|
+
deps: ['HasuraConfig'],
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
provide: 'FilterRepository',
|
|
751
|
+
useExisting: FilterHasuraGraphQLRepository,
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
provide: FilterHasuraGraphQLRepository,
|
|
755
|
+
useFactory: (options, filterOptionRepository, categoryFilterRepository) => {
|
|
756
|
+
return new FilterHasuraGraphQLRepository(options, filterOptionRepository, categoryFilterRepository);
|
|
757
|
+
},
|
|
758
|
+
deps: ['HasuraConfig', FilterOptionHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository],
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
provide: CategoryCollectionChildrenHasuraGraphQLRepository,
|
|
762
|
+
useFactory: (options) => new CategoryCollectionChildrenHasuraGraphQLRepository(options),
|
|
763
|
+
deps: ['HasuraConfig'],
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
provide: 'CategoryCollectionChildrenRepository',
|
|
767
|
+
useExisting: CategoryCollectionChildrenHasuraGraphQLRepository,
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
provide: WishlistHasuraGraphQLRepository,
|
|
771
|
+
useFactory: (options, categoryFilterRepository) => {
|
|
772
|
+
return new WishlistHasuraGraphQLRepository(options, categoryFilterRepository);
|
|
773
|
+
},
|
|
774
|
+
deps: ['HasuraConfig', CategoryFilterHasuraGraphQLRepository],
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
provide: 'WishlistRepository',
|
|
778
|
+
useExisting: WishlistHasuraGraphQLRepository,
|
|
779
|
+
},
|
|
780
|
+
] }); }
|
|
781
|
+
}
|
|
782
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularHasuraGraphQLModule, decorators: [{
|
|
783
783
|
type: NgModule,
|
|
784
784
|
args: [{
|
|
785
785
|
providers: [
|
|
@@ -928,15 +928,15 @@ class AuthService {
|
|
|
928
928
|
getFireUser() {
|
|
929
929
|
return authState(this.angularFireAuth).pipe(catchError(() => of(null)));
|
|
930
930
|
}
|
|
931
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AuthService, deps: [{ token: i1.Auth }, { token: 'UserRepository' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
932
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AuthService }); }
|
|
931
933
|
}
|
|
932
|
-
|
|
933
|
-
AuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AuthService });
|
|
934
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AuthService, decorators: [{
|
|
934
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AuthService, decorators: [{
|
|
935
935
|
type: Injectable
|
|
936
|
-
}], ctorParameters:
|
|
936
|
+
}], ctorParameters: () => [{ type: i1.Auth }, { type: undefined, decorators: [{
|
|
937
937
|
type: Inject,
|
|
938
938
|
args: ['UserRepository']
|
|
939
|
-
}] }]
|
|
939
|
+
}] }] });
|
|
940
940
|
|
|
941
941
|
class CouponService {
|
|
942
942
|
constructor(couponRepository, defaultShop, orderRepository, categoryRepository) {
|
|
@@ -981,6 +981,11 @@ class CouponService {
|
|
|
981
981
|
if (!validUser)
|
|
982
982
|
throw 'Usuário não elegível.';
|
|
983
983
|
const couponUseLimits = this.getCouponUseLimits(coupon, checkoutType, checkout.user);
|
|
984
|
+
if (couponUseLimits.firstOrder) {
|
|
985
|
+
const ordersUser = await this.getOrdersFromUser(checkout.user.email.toLocaleLowerCase());
|
|
986
|
+
if (couponUseLimits.firstOrder && ordersUser.length >= 1)
|
|
987
|
+
throw 'Limite de uso atingido';
|
|
988
|
+
}
|
|
984
989
|
if (!couponUseLimits.unlimited || couponUseLimits.limitedPerUser) {
|
|
985
990
|
const orders = await this.getOrdersWithCoupon(coupon);
|
|
986
991
|
if (!couponUseLimits.unlimited && couponUseLimits.total && orders.length >= couponUseLimits.total)
|
|
@@ -1054,9 +1059,11 @@ class CouponService {
|
|
|
1054
1059
|
if (!user || coupon.exclusivityType.includes(Exclusivities.ALL_USERS))
|
|
1055
1060
|
return true;
|
|
1056
1061
|
let userTypes = [];
|
|
1057
|
-
if (coupon.exclusivityType.includes(Exclusivities.COLLABORATORS) &&
|
|
1062
|
+
if (coupon.exclusivityType.includes(Exclusivities.COLLABORATORS) &&
|
|
1063
|
+
this.emailIsFromCollaborator(user.email.toLocaleLowerCase()))
|
|
1058
1064
|
userTypes.push(Exclusivities.COLLABORATORS);
|
|
1059
|
-
if (coupon.exclusivityType.includes(Exclusivities.SPECIFIC_USER) &&
|
|
1065
|
+
if (coupon.exclusivityType.includes(Exclusivities.SPECIFIC_USER) &&
|
|
1066
|
+
coupon.userExclusiveEmail.includes(user.email.toLocaleLowerCase()))
|
|
1060
1067
|
userTypes.push(Exclusivities.SPECIFIC_USER);
|
|
1061
1068
|
if (coupon.exclusivityType.includes(Exclusivities.ACTIVE_SUBSCRIBER) &&
|
|
1062
1069
|
user.isSubscriber &&
|
|
@@ -1114,6 +1121,16 @@ class CouponService {
|
|
|
1114
1121
|
})
|
|
1115
1122
|
.then((result) => result.data);
|
|
1116
1123
|
}
|
|
1124
|
+
async getOrdersFromUser(email) {
|
|
1125
|
+
return await this.orderRepository
|
|
1126
|
+
.find({
|
|
1127
|
+
filters: {
|
|
1128
|
+
user: { email: { operator: Where.EQUALS, value: email } },
|
|
1129
|
+
payment: { status: 'paid' },
|
|
1130
|
+
},
|
|
1131
|
+
})
|
|
1132
|
+
.then((result) => result.data);
|
|
1133
|
+
}
|
|
1117
1134
|
countOrdersWithUser(orders, email) {
|
|
1118
1135
|
return orders.filter((o) => o.user.email == email).length;
|
|
1119
1136
|
}
|
|
@@ -1127,15 +1144,15 @@ class CouponService {
|
|
|
1127
1144
|
}
|
|
1128
1145
|
return couponUseLimits;
|
|
1129
1146
|
}
|
|
1147
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CouponService, deps: [{ token: 'CouponRepository' }, { token: DEFAULT_SHOP }, { token: 'OrderRepository' }, { token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1148
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CouponService, providedIn: 'root' }); }
|
|
1130
1149
|
}
|
|
1131
|
-
|
|
1132
|
-
CouponService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CouponService, providedIn: 'root' });
|
|
1133
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CouponService, decorators: [{
|
|
1150
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CouponService, decorators: [{
|
|
1134
1151
|
type: Injectable,
|
|
1135
1152
|
args: [{
|
|
1136
1153
|
providedIn: 'root',
|
|
1137
1154
|
}]
|
|
1138
|
-
}], ctorParameters:
|
|
1155
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1139
1156
|
type: Inject,
|
|
1140
1157
|
args: ['CouponRepository']
|
|
1141
1158
|
}] }, { type: i1$2.Shops, decorators: [{
|
|
@@ -1147,7 +1164,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1147
1164
|
}] }, { type: undefined, decorators: [{
|
|
1148
1165
|
type: Inject,
|
|
1149
1166
|
args: ['CategoryRepository']
|
|
1150
|
-
}] }]
|
|
1167
|
+
}] }] });
|
|
1151
1168
|
|
|
1152
1169
|
class CheckoutService {
|
|
1153
1170
|
constructor(couponService, checkoutRepository, orderRepository, userRepository, defaultShop) {
|
|
@@ -1191,12 +1208,12 @@ class CheckoutService {
|
|
|
1191
1208
|
cookie.set('checkoutId', checkout.id);
|
|
1192
1209
|
return checkout;
|
|
1193
1210
|
}
|
|
1211
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CheckoutService, deps: [{ token: CouponService }, { token: 'CheckoutRepository' }, { token: 'OrderRepository' }, { token: 'UserRepository' }, { token: DEFAULT_SHOP }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1212
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CheckoutService }); }
|
|
1194
1213
|
}
|
|
1195
|
-
|
|
1196
|
-
CheckoutService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutService });
|
|
1197
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutService, decorators: [{
|
|
1214
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CheckoutService, decorators: [{
|
|
1198
1215
|
type: Injectable
|
|
1199
|
-
}], ctorParameters:
|
|
1216
|
+
}], ctorParameters: () => [{ type: CouponService }, { type: undefined, decorators: [{
|
|
1200
1217
|
type: Inject,
|
|
1201
1218
|
args: ['CheckoutRepository']
|
|
1202
1219
|
}] }, { type: undefined, decorators: [{
|
|
@@ -1208,7 +1225,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1208
1225
|
}] }, { type: i1$2.Shops, decorators: [{
|
|
1209
1226
|
type: Inject,
|
|
1210
1227
|
args: [DEFAULT_SHOP]
|
|
1211
|
-
}] }]
|
|
1228
|
+
}] }] });
|
|
1212
1229
|
|
|
1213
1230
|
class CartService {
|
|
1214
1231
|
constructor(authService, checkoutService, defaultShop, productRepository, categoryRepository, variantRepository, buy2WinRepository) {
|
|
@@ -1458,12 +1475,12 @@ class CartService {
|
|
|
1458
1475
|
});
|
|
1459
1476
|
});
|
|
1460
1477
|
}
|
|
1478
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CartService, deps: [{ token: AuthService }, { token: CheckoutService }, { token: DEFAULT_SHOP }, { token: 'ProductRepository' }, { token: 'CategoryRepository' }, { token: 'VariantRepository' }, { token: 'Buy2WinRepository' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1479
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CartService }); }
|
|
1461
1480
|
}
|
|
1462
|
-
|
|
1463
|
-
CartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CartService });
|
|
1464
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CartService, decorators: [{
|
|
1481
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CartService, decorators: [{
|
|
1465
1482
|
type: Injectable
|
|
1466
|
-
}], ctorParameters:
|
|
1483
|
+
}], ctorParameters: () => [{ type: AuthService }, { type: CheckoutService }, { type: i1$2.Shops, decorators: [{
|
|
1467
1484
|
type: Inject,
|
|
1468
1485
|
args: [DEFAULT_SHOP]
|
|
1469
1486
|
}] }, { type: undefined, decorators: [{
|
|
@@ -1478,7 +1495,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1478
1495
|
}] }, { type: i1$2.Buy2WinFirestoreRepository, decorators: [{
|
|
1479
1496
|
type: Inject,
|
|
1480
1497
|
args: ['Buy2WinRepository']
|
|
1481
|
-
}] }]
|
|
1498
|
+
}] }] });
|
|
1482
1499
|
|
|
1483
1500
|
class NewCategoryStructureAdapter {
|
|
1484
1501
|
constructor(categoryRepository) {
|
|
@@ -1508,15 +1525,15 @@ class NewCategoryStructureAdapter {
|
|
|
1508
1525
|
? this.categoryRepository.get({ id: category.id })
|
|
1509
1526
|
: category;
|
|
1510
1527
|
}
|
|
1528
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: NewCategoryStructureAdapter, deps: [{ token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1529
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: NewCategoryStructureAdapter }); }
|
|
1511
1530
|
}
|
|
1512
|
-
|
|
1513
|
-
NewCategoryStructureAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: NewCategoryStructureAdapter });
|
|
1514
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: NewCategoryStructureAdapter, decorators: [{
|
|
1531
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: NewCategoryStructureAdapter, decorators: [{
|
|
1515
1532
|
type: Injectable
|
|
1516
|
-
}], ctorParameters:
|
|
1533
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1517
1534
|
type: Inject,
|
|
1518
1535
|
args: ['CategoryRepository']
|
|
1519
|
-
}] }]
|
|
1536
|
+
}] }] });
|
|
1520
1537
|
|
|
1521
1538
|
class OldCategoryStructureAdapter {
|
|
1522
1539
|
constructor(categoryRepository) {
|
|
@@ -1528,15 +1545,15 @@ class OldCategoryStructureAdapter {
|
|
|
1528
1545
|
: await this.categoryRepository.get({ id: category.id }).then((categoryFound) => categoryFound.products);
|
|
1529
1546
|
return { id: { operator: Where.IN, value: productsIds } };
|
|
1530
1547
|
}
|
|
1548
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: OldCategoryStructureAdapter, deps: [{ token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1549
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: OldCategoryStructureAdapter }); }
|
|
1531
1550
|
}
|
|
1532
|
-
|
|
1533
|
-
OldCategoryStructureAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OldCategoryStructureAdapter });
|
|
1534
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OldCategoryStructureAdapter, decorators: [{
|
|
1551
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: OldCategoryStructureAdapter, decorators: [{
|
|
1535
1552
|
type: Injectable
|
|
1536
|
-
}], ctorParameters:
|
|
1553
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1537
1554
|
type: Inject,
|
|
1538
1555
|
args: ['CategoryRepository']
|
|
1539
|
-
}] }]
|
|
1556
|
+
}] }] });
|
|
1540
1557
|
|
|
1541
1558
|
class CatalogService {
|
|
1542
1559
|
constructor(productRepository, categoryStructureAdapter, shop, productIndex) {
|
|
@@ -1646,6 +1663,7 @@ class CatalogService {
|
|
|
1646
1663
|
}
|
|
1647
1664
|
async findCatalogByTermAndSortByMostRevelant(options, limits) {
|
|
1648
1665
|
const productIds = await this.findCatalogIdsByElasticSearch(options.term);
|
|
1666
|
+
console.log('productIds', productIds);
|
|
1649
1667
|
const totalResult = await this.productRepository.findCatalog({
|
|
1650
1668
|
fields: ['id'],
|
|
1651
1669
|
filters: {
|
|
@@ -1658,15 +1676,18 @@ class CatalogService {
|
|
|
1658
1676
|
distinct: ['brand'],
|
|
1659
1677
|
},
|
|
1660
1678
|
}, options?.mainGender || this.shop === Shops.MENSMARKET ? 'male' : 'female');
|
|
1679
|
+
console.log('totalResult', totalResult);
|
|
1661
1680
|
const limitedProductId = totalResult.data
|
|
1662
1681
|
.slice(limits.offset, limits.offset + limits.limit)
|
|
1663
1682
|
.map((product) => product.id);
|
|
1664
1683
|
const orderedId = productIds.filter((product) => limitedProductId.includes(product));
|
|
1684
|
+
console.log('orderedId', orderedId);
|
|
1665
1685
|
const productResult = await this.productRepository.findCatalog({
|
|
1666
1686
|
filters: {
|
|
1667
1687
|
id: { operator: Where.IN, value: orderedId },
|
|
1668
1688
|
},
|
|
1669
1689
|
});
|
|
1690
|
+
console.log('productResult', productResult);
|
|
1670
1691
|
return {
|
|
1671
1692
|
data: limitedProductId.map((id) => productResult.data.find((product) => product.id === id)).filter(Boolean),
|
|
1672
1693
|
count: totalResult.count,
|
|
@@ -1687,12 +1708,12 @@ class CatalogService {
|
|
|
1687
1708
|
return [...new Set(sorted.map(({ _source }) => _source.id))];
|
|
1688
1709
|
}));
|
|
1689
1710
|
}
|
|
1711
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CatalogService, deps: [{ token: 'ProductRepository' }, { token: CATEGORY_STRUCTURE }, { token: DEFAULT_SHOP }, { token: i1$2.ProductsIndex }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1712
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CatalogService }); }
|
|
1690
1713
|
}
|
|
1691
|
-
|
|
1692
|
-
CatalogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService });
|
|
1693
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService, decorators: [{
|
|
1714
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CatalogService, decorators: [{
|
|
1694
1715
|
type: Injectable
|
|
1695
|
-
}], ctorParameters:
|
|
1716
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1696
1717
|
type: Inject,
|
|
1697
1718
|
args: ['ProductRepository']
|
|
1698
1719
|
}] }, { type: undefined, decorators: [{
|
|
@@ -1701,7 +1722,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1701
1722
|
}] }, { type: i1$2.Shops, decorators: [{
|
|
1702
1723
|
type: Inject,
|
|
1703
1724
|
args: [DEFAULT_SHOP]
|
|
1704
|
-
}] }, { type: i1$2.ProductsIndex }]
|
|
1725
|
+
}] }, { type: i1$2.ProductsIndex }] });
|
|
1705
1726
|
|
|
1706
1727
|
class CategoryService {
|
|
1707
1728
|
constructor(productRepository, categoryRepository, categoryFilterRepository, categoryStructureAdapter, shop) {
|
|
@@ -1727,12 +1748,12 @@ class CategoryService {
|
|
|
1727
1748
|
.find({ filters: { categoryId: +category.id } })
|
|
1728
1749
|
.then(({ data }) => data.map((categoryFilter) => categoryFilter.filter));
|
|
1729
1750
|
}
|
|
1751
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CategoryService, deps: [{ token: 'ProductRepository' }, { token: 'CategoryRepository' }, { token: 'CategoryFilterRepository' }, { token: CATEGORY_STRUCTURE }, { token: DEFAULT_SHOP }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1752
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CategoryService }); }
|
|
1730
1753
|
}
|
|
1731
|
-
|
|
1732
|
-
CategoryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryService });
|
|
1733
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryService, decorators: [{
|
|
1754
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CategoryService, decorators: [{
|
|
1734
1755
|
type: Injectable
|
|
1735
|
-
}], ctorParameters:
|
|
1756
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1736
1757
|
type: Inject,
|
|
1737
1758
|
args: ['ProductRepository']
|
|
1738
1759
|
}] }, { type: undefined, decorators: [{
|
|
@@ -1747,7 +1768,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1747
1768
|
}] }, { type: i1$2.Shops, decorators: [{
|
|
1748
1769
|
type: Inject,
|
|
1749
1770
|
args: [DEFAULT_SHOP]
|
|
1750
|
-
}] }]
|
|
1771
|
+
}] }] });
|
|
1751
1772
|
|
|
1752
1773
|
var ProductSorts;
|
|
1753
1774
|
(function (ProductSorts) {
|
|
@@ -1853,12 +1874,12 @@ class WishlistService {
|
|
|
1853
1874
|
}
|
|
1854
1875
|
return wishlist;
|
|
1855
1876
|
}
|
|
1877
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: WishlistService, deps: [{ token: 'WishlistRepository' }, { token: 'CategoryRepository' }, { token: DEFAULT_SHOP }, { token: 'ProductRepository' }, { token: 'CategoryFilterRepository' }, { token: i1$2.ProductsIndex }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1878
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: WishlistService }); }
|
|
1856
1879
|
}
|
|
1857
|
-
|
|
1858
|
-
WishlistService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService });
|
|
1859
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, decorators: [{
|
|
1880
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: WishlistService, decorators: [{
|
|
1860
1881
|
type: Injectable
|
|
1861
|
-
}], ctorParameters:
|
|
1882
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1862
1883
|
type: Inject,
|
|
1863
1884
|
args: ['WishlistRepository']
|
|
1864
1885
|
}] }, { type: undefined, decorators: [{
|
|
@@ -1873,7 +1894,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1873
1894
|
}] }, { type: undefined, decorators: [{
|
|
1874
1895
|
type: Inject,
|
|
1875
1896
|
args: ['CategoryFilterRepository']
|
|
1876
|
-
}] }, { type: i1$2.ProductsIndex }]
|
|
1897
|
+
}] }, { type: i1$2.ProductsIndex }] });
|
|
1877
1898
|
|
|
1878
1899
|
class CheckoutSubscriptionService {
|
|
1879
1900
|
constructor(checkoutSubscriptionRepository, subscriptionRepository, couponService) {
|
|
@@ -1907,18 +1928,18 @@ class CheckoutSubscriptionService {
|
|
|
1907
1928
|
calcDiscountSubscription(coupon) {
|
|
1908
1929
|
return this.getCheckoutSubscription().pipe(concatMap((checkout) => this.couponService.calcDiscountSubscription(coupon, checkout).pipe()));
|
|
1909
1930
|
}
|
|
1931
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CheckoutSubscriptionService, deps: [{ token: 'CheckoutSubscriptionRepository' }, { token: 'SubscriptionRepository' }, { token: CouponService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1932
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CheckoutSubscriptionService }); }
|
|
1910
1933
|
}
|
|
1911
|
-
|
|
1912
|
-
CheckoutSubscriptionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutSubscriptionService });
|
|
1913
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutSubscriptionService, decorators: [{
|
|
1934
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CheckoutSubscriptionService, decorators: [{
|
|
1914
1935
|
type: Injectable
|
|
1915
|
-
}], ctorParameters:
|
|
1936
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1916
1937
|
type: Inject,
|
|
1917
1938
|
args: ['CheckoutSubscriptionRepository']
|
|
1918
1939
|
}] }, { type: undefined, decorators: [{
|
|
1919
1940
|
type: Inject,
|
|
1920
1941
|
args: ['SubscriptionRepository']
|
|
1921
|
-
}] }, { type: CouponService }]
|
|
1942
|
+
}] }, { type: CouponService }] });
|
|
1922
1943
|
|
|
1923
1944
|
class UtilHelper {
|
|
1924
1945
|
static createSlug(name) {
|
|
@@ -1969,7 +1990,6 @@ class HomeShopService {
|
|
|
1969
1990
|
'rate',
|
|
1970
1991
|
'type',
|
|
1971
1992
|
'brand',
|
|
1972
|
-
'tags',
|
|
1973
1993
|
]))) || [],
|
|
1974
1994
|
});
|
|
1975
1995
|
}
|
|
@@ -2028,12 +2048,12 @@ class HomeShopService {
|
|
|
2028
2048
|
data,
|
|
2029
2049
|
})).pipe(tap(() => (this.homeConfiguration.data = data)), map(() => this.homeConfiguration));
|
|
2030
2050
|
}
|
|
2051
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: HomeShopService, deps: [{ token: 'CategoryRepository' }, { token: 'HomeRepository' }, { token: 'ProductRepository' }, { token: DEFAULT_SHOP }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2052
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: HomeShopService }); }
|
|
2031
2053
|
}
|
|
2032
|
-
|
|
2033
|
-
HomeShopService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: HomeShopService });
|
|
2034
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: HomeShopService, decorators: [{
|
|
2054
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: HomeShopService, decorators: [{
|
|
2035
2055
|
type: Injectable
|
|
2036
|
-
}], ctorParameters:
|
|
2056
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
2037
2057
|
type: Inject,
|
|
2038
2058
|
args: ['CategoryRepository']
|
|
2039
2059
|
}] }, { type: undefined, decorators: [{
|
|
@@ -2045,7 +2065,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
2045
2065
|
}] }, { type: i1$2.Shops, decorators: [{
|
|
2046
2066
|
type: Inject,
|
|
2047
2067
|
args: [DEFAULT_SHOP]
|
|
2048
|
-
}] }]
|
|
2068
|
+
}] }] });
|
|
2049
2069
|
|
|
2050
2070
|
class OrderService {
|
|
2051
2071
|
constructor(angularFirestore, orderRepository) {
|
|
@@ -2059,15 +2079,15 @@ class OrderService {
|
|
|
2059
2079
|
.subscribe((doc) => this.orderSubject.next(doc));
|
|
2060
2080
|
return this.orderSubject;
|
|
2061
2081
|
}
|
|
2082
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: OrderService, deps: [{ token: i1$1.Firestore }, { token: 'OrderRepository' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2083
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: OrderService }); }
|
|
2062
2084
|
}
|
|
2063
|
-
|
|
2064
|
-
OrderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService });
|
|
2065
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService, decorators: [{
|
|
2085
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: OrderService, decorators: [{
|
|
2066
2086
|
type: Injectable
|
|
2067
|
-
}], ctorParameters:
|
|
2087
|
+
}], ctorParameters: () => [{ type: i1$1.Firestore }, { type: i1$2.OrderFirestoreRepository, decorators: [{
|
|
2068
2088
|
type: Inject,
|
|
2069
2089
|
args: ['OrderRepository']
|
|
2070
|
-
}] }]
|
|
2090
|
+
}] }] });
|
|
2071
2091
|
|
|
2072
2092
|
class ShippingService {
|
|
2073
2093
|
constructor(http, apiUrl, homeService) {
|
|
@@ -2145,15 +2165,15 @@ class ShippingService {
|
|
|
2145
2165
|
}
|
|
2146
2166
|
return false;
|
|
2147
2167
|
}
|
|
2168
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: ShippingService, deps: [{ token: i1$3.HttpClient }, { token: BACKEND_URL }, { token: HomeShopService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2169
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: ShippingService }); }
|
|
2148
2170
|
}
|
|
2149
|
-
|
|
2150
|
-
ShippingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ShippingService });
|
|
2151
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ShippingService, decorators: [{
|
|
2171
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: ShippingService, decorators: [{
|
|
2152
2172
|
type: Injectable
|
|
2153
|
-
}], ctorParameters:
|
|
2173
|
+
}], ctorParameters: () => [{ type: i1$3.HttpClient }, { type: undefined, decorators: [{
|
|
2154
2174
|
type: Inject,
|
|
2155
2175
|
args: [BACKEND_URL]
|
|
2156
|
-
}] }, { type: HomeShopService }]
|
|
2176
|
+
}] }, { type: HomeShopService }] });
|
|
2157
2177
|
|
|
2158
2178
|
class AngularConnectModule {
|
|
2159
2179
|
static initializeApp(defaultShop, options, nameOrConfig) {
|
|
@@ -2175,38 +2195,38 @@ class AngularConnectModule {
|
|
|
2175
2195
|
],
|
|
2176
2196
|
};
|
|
2177
2197
|
}
|
|
2198
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularConnectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2199
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.3", ngImport: i0, type: AngularConnectModule, imports: [i1$4.FirebaseAppModule, AngularElasticSeachModule,
|
|
2200
|
+
AngularFirebaseAuthModule,
|
|
2201
|
+
AngularFirestoreModule,
|
|
2202
|
+
AngularHasuraGraphQLModule] }); }
|
|
2203
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularConnectModule, providers: [
|
|
2204
|
+
AuthService,
|
|
2205
|
+
CartService,
|
|
2206
|
+
CatalogService,
|
|
2207
|
+
CategoryService,
|
|
2208
|
+
CheckoutService,
|
|
2209
|
+
CheckoutSubscriptionService,
|
|
2210
|
+
CouponService,
|
|
2211
|
+
HomeShopService,
|
|
2212
|
+
OrderService,
|
|
2213
|
+
ShippingService,
|
|
2214
|
+
WishlistService,
|
|
2215
|
+
], imports: [provideFirebaseApp((injector) => {
|
|
2216
|
+
const appName = injector.get(FIREBASE_APP_NAME) || '[DEFAULT]';
|
|
2217
|
+
try {
|
|
2218
|
+
return getApp(appName);
|
|
2219
|
+
}
|
|
2220
|
+
catch (error) {
|
|
2221
|
+
return initializeApp(injector.get(FIREBASE_OPTIONS), appName);
|
|
2222
|
+
}
|
|
2223
|
+
}),
|
|
2224
|
+
AngularElasticSeachModule,
|
|
2225
|
+
AngularFirebaseAuthModule,
|
|
2226
|
+
AngularFirestoreModule,
|
|
2227
|
+
AngularHasuraGraphQLModule] }); }
|
|
2178
2228
|
}
|
|
2179
|
-
|
|
2180
|
-
AngularConnectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, imports: [i1$4.FirebaseAppModule, AngularElasticSeachModule,
|
|
2181
|
-
AngularFirebaseAuthModule,
|
|
2182
|
-
AngularFirestoreModule,
|
|
2183
|
-
AngularHasuraGraphQLModule] });
|
|
2184
|
-
AngularConnectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, providers: [
|
|
2185
|
-
AuthService,
|
|
2186
|
-
CartService,
|
|
2187
|
-
CatalogService,
|
|
2188
|
-
CategoryService,
|
|
2189
|
-
CheckoutService,
|
|
2190
|
-
CheckoutSubscriptionService,
|
|
2191
|
-
CouponService,
|
|
2192
|
-
HomeShopService,
|
|
2193
|
-
OrderService,
|
|
2194
|
-
ShippingService,
|
|
2195
|
-
WishlistService,
|
|
2196
|
-
], imports: [provideFirebaseApp((injector) => {
|
|
2197
|
-
const appName = injector.get(FIREBASE_APP_NAME) || '[DEFAULT]';
|
|
2198
|
-
try {
|
|
2199
|
-
return getApp(appName);
|
|
2200
|
-
}
|
|
2201
|
-
catch (error) {
|
|
2202
|
-
return initializeApp(injector.get(FIREBASE_OPTIONS), appName);
|
|
2203
|
-
}
|
|
2204
|
-
}),
|
|
2205
|
-
AngularElasticSeachModule,
|
|
2206
|
-
AngularFirebaseAuthModule,
|
|
2207
|
-
AngularFirestoreModule,
|
|
2208
|
-
AngularHasuraGraphQLModule] });
|
|
2209
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, decorators: [{
|
|
2229
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularConnectModule, decorators: [{
|
|
2210
2230
|
type: NgModule,
|
|
2211
2231
|
args: [{
|
|
2212
2232
|
imports: [
|