@infrab4a/connect-angular 5.0.0-beta.8 → 5.0.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/angular-connect.module.d.ts +3 -1
- package/consts/index.d.ts +1 -0
- package/consts/persistence.const.d.ts +1 -0
- package/esm2020/angular-connect.module.mjs +115 -0
- package/esm2020/angular-elastic-search.module.mjs +34 -0
- package/esm2020/angular-firebase-auth.module.mjs +115 -0
- package/esm2020/angular-firestore.module.mjs +502 -0
- package/esm2020/angular-hasura-graphql.module.mjs +265 -0
- package/{esm2022 → esm2020}/consts/category-structure.mjs +1 -1
- package/{esm2022 → esm2020}/consts/default-shop.const.mjs +1 -1
- package/{esm2022 → esm2020}/consts/es-config.const.mjs +1 -1
- package/{esm2022 → esm2020}/consts/firebase-const.mjs +1 -1
- package/{esm2022 → esm2020}/consts/hasura-options.const.mjs +1 -1
- package/{esm2022 → esm2020}/consts/index.mjs +2 -1
- package/esm2020/consts/persistence.const.mjs +2 -0
- package/{esm2022 → esm2020}/consts/storage-base-url.const.mjs +1 -1
- package/{esm2022 → esm2020}/helpers/index.mjs +1 -1
- package/{esm2022 → esm2020}/helpers/mobile-operation-system-checker.helper.mjs +1 -1
- package/{esm2022 → esm2020}/index.mjs +2 -1
- package/esm2020/persistence/cookie-data-persistence.mjs +23 -0
- package/esm2020/persistence/data-persistence.mjs +2 -0
- package/esm2020/persistence/index.mjs +3 -0
- package/{esm2022 → esm2020}/services/auth.service.mjs +6 -6
- package/esm2020/services/cart.service.mjs +281 -0
- package/{esm2022 → esm2020}/services/catalog/adapters/category-structure.adapter.mjs +1 -1
- package/{esm2022 → esm2020}/services/catalog/adapters/index.mjs +1 -1
- package/{esm2022 → esm2020}/services/catalog/adapters/new-category-structure.adapter.mjs +6 -6
- package/{esm2022 → esm2020}/services/catalog/adapters/old-category-structure.adapter.mjs +6 -6
- package/{esm2022 → esm2020}/services/catalog/catalog.service.mjs +6 -6
- package/esm2020/services/catalog/category.service.mjs +51 -0
- package/{esm2022 → esm2020}/services/catalog/enums/index.mjs +1 -1
- package/{esm2022 → esm2020}/services/catalog/enums/product-sorts.enum.mjs +1 -1
- package/{esm2022 → esm2020}/services/catalog/index.mjs +1 -1
- package/{esm2022 → esm2020}/services/catalog/models/category-with-tree.model.mjs +1 -1
- package/{esm2022 → esm2020}/services/catalog/models/index.mjs +1 -1
- package/{esm2022 → esm2020}/services/catalog/types/index.mjs +1 -1
- package/{esm2022 → esm2020}/services/catalog/types/product-sort.type.mjs +1 -1
- package/{esm2022 → esm2020}/services/catalog/wishlist.service.mjs +6 -6
- package/esm2020/services/checkout-subscription.service.mjs +50 -0
- package/esm2020/services/checkout.service.mjs +68 -0
- package/{esm2022 → esm2020}/services/coupon.service.mjs +6 -6
- package/{esm2022 → esm2020}/services/helpers/index.mjs +1 -1
- package/{esm2022 → esm2020}/services/helpers/util.helper.mjs +1 -1
- package/{esm2022 → esm2020}/services/home-shop.service.mjs +6 -6
- package/{esm2022 → esm2020}/services/index.mjs +1 -1
- package/{esm2022 → esm2020}/services/order.service.mjs +6 -6
- package/{esm2022 → esm2020}/services/shipping.service.mjs +6 -6
- package/{esm2022 → esm2020}/services/types/index.mjs +1 -1
- package/{esm2022 → esm2020}/services/types/required-checkout-data.type.mjs +1 -1
- package/{esm2022 → esm2020}/services/types/required-checkout-subscription-data.type.mjs +1 -1
- package/esm2020/services/types/shipping-methods.type.mjs +2 -0
- package/{esm2022 → esm2020}/types/firebase-app-config.type.mjs +1 -1
- package/{esm2022 → esm2020}/types/index.mjs +1 -1
- package/fesm2015/infrab4a-connect-angular.mjs +2408 -0
- package/fesm2015/infrab4a-connect-angular.mjs.map +1 -0
- package/{fesm2022 → fesm2020}/infrab4a-connect-angular.mjs +567 -550
- package/fesm2020/infrab4a-connect-angular.mjs.map +1 -0
- package/index.d.ts +1 -0
- package/package.json +13 -7
- package/persistence/cookie-data-persistence.d.ts +10 -0
- package/persistence/data-persistence.d.ts +6 -0
- package/persistence/index.d.ts +2 -0
- package/services/catalog/category.service.d.ts +6 -1
- package/services/checkout-subscription.service.d.ts +5 -4
- package/services/checkout.service.d.ts +4 -3
- package/esm2022/angular-connect.module.mjs +0 -113
- package/esm2022/angular-elastic-search.module.mjs +0 -34
- package/esm2022/angular-firebase-auth.module.mjs +0 -115
- package/esm2022/angular-firestore.module.mjs +0 -502
- package/esm2022/angular-hasura-graphql.module.mjs +0 -265
- package/esm2022/services/cart.service.mjs +0 -281
- package/esm2022/services/catalog/category.service.mjs +0 -51
- package/esm2022/services/checkout-subscription.service.mjs +0 -53
- package/esm2022/services/checkout.service.mjs +0 -71
- package/esm2022/services/types/shipping-methods.type.mjs +0 -2
- package/fesm2022/infrab4a-connect-angular.mjs.map +0 -1
- /package/{esm2022 → esm2020}/consts/backend-url.const.mjs +0 -0
- /package/{esm2022 → esm2020}/infrab4a-connect-angular.mjs +0 -0
|
@@ -11,9 +11,9 @@ import * as i1$1 from '@angular/fire/firestore';
|
|
|
11
11
|
import { Firestore, provideFirestore, getFirestore, initializeFirestore, memoryLocalCache, docSnapshots, doc } from '@angular/fire/firestore';
|
|
12
12
|
import * as i2 from '@angular/fire/storage';
|
|
13
13
|
import { Storage, provideStorage, getStorage } from '@angular/fire/storage';
|
|
14
|
-
import { combineLatest, from, of, throwError, Subject, iif, forkJoin } from 'rxjs';
|
|
15
|
-
import { map, mergeMap, catchError, concatMap, tap } from 'rxjs/operators';
|
|
16
14
|
import cookie from 'js-cookie';
|
|
15
|
+
import { of, from, combineLatest, throwError, Subject, iif, forkJoin } from 'rxjs';
|
|
16
|
+
import { map, mergeMap, catchError, concatMap, tap } from 'rxjs/operators';
|
|
17
17
|
import { __decorate, __metadata } from 'tslib';
|
|
18
18
|
import { Type } from 'class-transformer';
|
|
19
19
|
import * as i1$3 from '@angular/common/http';
|
|
@@ -27,17 +27,17 @@ class AngularElasticSeachModule {
|
|
|
27
27
|
providers: [{ provide: ES_CONFIG, useValue: options }],
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularElasticSeachModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
31
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.3", ngImport: i0, type: AngularElasticSeachModule }); }
|
|
32
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularElasticSeachModule, providers: [
|
|
33
|
-
{
|
|
34
|
-
provide: ProductsIndex,
|
|
35
|
-
useFactory: (configuration) => new ProductsIndex(new AxiosAdapter(configuration)),
|
|
36
|
-
deps: [ES_CONFIG],
|
|
37
|
-
},
|
|
38
|
-
] }); }
|
|
39
30
|
}
|
|
40
|
-
i0.ɵɵ
|
|
31
|
+
AngularElasticSeachModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
32
|
+
AngularElasticSeachModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule });
|
|
33
|
+
AngularElasticSeachModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule, providers: [
|
|
34
|
+
{
|
|
35
|
+
provide: ProductsIndex,
|
|
36
|
+
useFactory: (configuration) => new ProductsIndex(new AxiosAdapter(configuration)),
|
|
37
|
+
deps: [ES_CONFIG],
|
|
38
|
+
},
|
|
39
|
+
] });
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule, decorators: [{
|
|
41
41
|
type: NgModule,
|
|
42
42
|
args: [{
|
|
43
43
|
providers: [
|
|
@@ -61,6 +61,8 @@ const FIREBASE_OPTIONS = new InjectionToken('firebaseOptions');
|
|
|
61
61
|
|
|
62
62
|
const HASURA_OPTIONS = 'HASURA_OPTIONS';
|
|
63
63
|
|
|
64
|
+
const PERSISTENCE_PROVIDER = 'PERSISTENCE_PROVIDER';
|
|
65
|
+
|
|
64
66
|
class AngularFirebaseAuthModule {
|
|
65
67
|
static initializeApp(options, nameOrConfig) {
|
|
66
68
|
return {
|
|
@@ -71,54 +73,54 @@ class AngularFirebaseAuthModule {
|
|
|
71
73
|
],
|
|
72
74
|
};
|
|
73
75
|
}
|
|
74
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularFirebaseAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
75
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.3", ngImport: i0, type: AngularFirebaseAuthModule, imports: [i1.AuthModule] }); }
|
|
76
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularFirebaseAuthModule, providers: [
|
|
77
|
-
{
|
|
78
|
-
provide: 'Authentication',
|
|
79
|
-
useFactory: (authenticationService, userRepository) => {
|
|
80
|
-
return new Authentication(authenticationService, userRepository);
|
|
81
|
-
},
|
|
82
|
-
deps: ['AuthenticationService', 'UserRepository'],
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
provide: 'AuthenticationService',
|
|
86
|
-
useFactory: (angularFireAuth) => {
|
|
87
|
-
return new AuthenticationFirebaseAuthService(angularFireAuth);
|
|
88
|
-
},
|
|
89
|
-
deps: [Auth],
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
provide: 'Register',
|
|
93
|
-
useFactory: (registerService, userRepository) => {
|
|
94
|
-
return new Register(registerService, userRepository);
|
|
95
|
-
},
|
|
96
|
-
deps: ['RegisterService', 'UserRepository'],
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
provide: 'RegisterService',
|
|
100
|
-
useFactory: (angularFireAuth) => {
|
|
101
|
-
return new RegisterFirebaseAuthService(angularFireAuth);
|
|
102
|
-
},
|
|
103
|
-
deps: [Auth],
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
provide: 'SignOut',
|
|
107
|
-
useFactory: (authenticationService) => {
|
|
108
|
-
return new SignOut(authenticationService);
|
|
109
|
-
},
|
|
110
|
-
deps: ['AuthenticationService'],
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
provide: 'RecoveryPassword',
|
|
114
|
-
useFactory: (authenticationService) => {
|
|
115
|
-
return new RecoveryPassword(authenticationService);
|
|
116
|
-
},
|
|
117
|
-
deps: ['AuthenticationService'],
|
|
118
|
-
},
|
|
119
|
-
], imports: [provideAuth((injector) => getAuth(injector.get(FirebaseApp)))] }); }
|
|
120
76
|
}
|
|
121
|
-
i0.ɵɵ
|
|
77
|
+
AngularFirebaseAuthModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirebaseAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
78
|
+
AngularFirebaseAuthModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularFirebaseAuthModule, imports: [i1.AuthModule] });
|
|
79
|
+
AngularFirebaseAuthModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirebaseAuthModule, providers: [
|
|
80
|
+
{
|
|
81
|
+
provide: 'Authentication',
|
|
82
|
+
useFactory: (authenticationService, userRepository) => {
|
|
83
|
+
return new Authentication(authenticationService, userRepository);
|
|
84
|
+
},
|
|
85
|
+
deps: ['AuthenticationService', 'UserRepository'],
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
provide: 'AuthenticationService',
|
|
89
|
+
useFactory: (angularFireAuth) => {
|
|
90
|
+
return new AuthenticationFirebaseAuthService(angularFireAuth);
|
|
91
|
+
},
|
|
92
|
+
deps: [Auth],
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
provide: 'Register',
|
|
96
|
+
useFactory: (registerService, userRepository) => {
|
|
97
|
+
return new Register(registerService, userRepository);
|
|
98
|
+
},
|
|
99
|
+
deps: ['RegisterService', 'UserRepository'],
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
provide: 'RegisterService',
|
|
103
|
+
useFactory: (angularFireAuth) => {
|
|
104
|
+
return new RegisterFirebaseAuthService(angularFireAuth);
|
|
105
|
+
},
|
|
106
|
+
deps: [Auth],
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
provide: 'SignOut',
|
|
110
|
+
useFactory: (authenticationService) => {
|
|
111
|
+
return new SignOut(authenticationService);
|
|
112
|
+
},
|
|
113
|
+
deps: ['AuthenticationService'],
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
provide: 'RecoveryPassword',
|
|
117
|
+
useFactory: (authenticationService) => {
|
|
118
|
+
return new RecoveryPassword(authenticationService);
|
|
119
|
+
},
|
|
120
|
+
deps: ['AuthenticationService'],
|
|
121
|
+
},
|
|
122
|
+
], imports: [provideAuth((injector) => getAuth(injector.get(FirebaseApp)))] });
|
|
123
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirebaseAuthModule, decorators: [{
|
|
122
124
|
type: NgModule,
|
|
123
125
|
args: [{
|
|
124
126
|
imports: [provideAuth((injector) => getAuth(injector.get(FirebaseApp)))],
|
|
@@ -189,243 +191,243 @@ class AngularFirestoreModule {
|
|
|
189
191
|
],
|
|
190
192
|
};
|
|
191
193
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
const interval = setInterval(() => { }, 100);
|
|
204
|
-
request.interval = interval;
|
|
194
|
+
}
|
|
195
|
+
AngularFirestoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirestoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
196
|
+
AngularFirestoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularFirestoreModule, imports: [AngularElasticSeachModule, i1$1.FirestoreModule, i2.StorageModule] });
|
|
197
|
+
AngularFirestoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirestoreModule, providers: [
|
|
198
|
+
{
|
|
199
|
+
provide: 'FirestoreOptions',
|
|
200
|
+
useFactory: (firestore, platformId) => ({
|
|
201
|
+
firestore,
|
|
202
|
+
interceptors: {
|
|
203
|
+
request: (request) => {
|
|
204
|
+
if (isPlatformBrowser(platformId))
|
|
205
205
|
return request;
|
|
206
|
-
},
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
206
|
+
const interval = setInterval(() => { }, 100);
|
|
207
|
+
request.interval = interval;
|
|
208
|
+
return request;
|
|
209
|
+
},
|
|
210
|
+
response: (response, request) => {
|
|
211
|
+
if (isPlatformBrowser(platformId))
|
|
211
212
|
return response;
|
|
212
|
-
|
|
213
|
+
clearInterval(request.interval);
|
|
214
|
+
return response;
|
|
213
215
|
},
|
|
214
|
-
}),
|
|
215
|
-
deps: [Firestore, PLATFORM_ID],
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
provide: 'BeautyProfileRepository',
|
|
219
|
-
useFactory: (config, userRepository) => {
|
|
220
|
-
return new UserBeautyProfileFirestoreRepository(config, userRepository);
|
|
221
|
-
},
|
|
222
|
-
deps: ['FirestoreOptions', 'UserRepository'],
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
provide: 'Buy2WinRepository',
|
|
226
|
-
useFactory: (options) => {
|
|
227
|
-
return new Buy2WinFirestoreRepository(options);
|
|
228
|
-
},
|
|
229
|
-
deps: ['FirestoreOptions'],
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
provide: CategoryFirestoreRepository,
|
|
233
|
-
useFactory: (options) => {
|
|
234
|
-
return new CategoryFirestoreRepository(options);
|
|
235
|
-
},
|
|
236
|
-
deps: ['FirestoreOptions'],
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
provide: 'CheckoutRepository',
|
|
240
|
-
useFactory: (options) => {
|
|
241
|
-
return new CheckoutFirestoreRepository(options);
|
|
242
|
-
},
|
|
243
|
-
deps: ['FirestoreOptions'],
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
provide: 'CheckoutSubscriptionRepository',
|
|
247
|
-
useFactory: (options) => {
|
|
248
|
-
return new CheckoutSubscriptionFirestoreRepository(options);
|
|
249
|
-
},
|
|
250
|
-
deps: ['FirestoreOptions'],
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
provide: 'CouponRepository',
|
|
254
|
-
useFactory: (options) => {
|
|
255
|
-
return new CouponFirestoreRepository(options);
|
|
256
|
-
},
|
|
257
|
-
deps: ['FirestoreOptions'],
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
provide: 'CampaignHashtagRepository',
|
|
261
|
-
useFactory: (options) => {
|
|
262
|
-
return new CampaignHashtagFirestoreRepository(options);
|
|
263
|
-
},
|
|
264
|
-
deps: ['FirestoreOptions'],
|
|
265
|
-
},
|
|
266
|
-
{
|
|
267
|
-
provide: 'CampaignDashboardRepository',
|
|
268
|
-
useFactory: (options) => {
|
|
269
|
-
return new CampaignDashboardFirestoreRepository(options);
|
|
270
|
-
},
|
|
271
|
-
deps: ['FirestoreOptions'],
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
provide: 'EditionRepository',
|
|
275
|
-
useFactory: (options, subscriptionRepository) => {
|
|
276
|
-
return new SubscriptionEditionFirestoreRepository(options, subscriptionRepository);
|
|
277
|
-
},
|
|
278
|
-
deps: ['FirestoreOptions', 'SubscriptionRepository'],
|
|
279
|
-
},
|
|
280
|
-
{
|
|
281
|
-
provide: 'HomeRepository',
|
|
282
|
-
useFactory: (options) => {
|
|
283
|
-
return new HomeFirestoreRepository(options);
|
|
284
|
-
},
|
|
285
|
-
deps: ['FirestoreOptions'],
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
provide: 'LeadRepository',
|
|
289
|
-
useFactory: (options) => {
|
|
290
|
-
return new LeadFirestoreRepository(options);
|
|
291
|
-
},
|
|
292
|
-
deps: ['FirestoreOptions'],
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
provide: 'LegacyOrderRepository',
|
|
296
|
-
useFactory: (options) => {
|
|
297
|
-
return new LegacyOrderFirestoreRepository(options);
|
|
298
|
-
},
|
|
299
|
-
deps: ['FirestoreOptions'],
|
|
300
|
-
},
|
|
301
|
-
{
|
|
302
|
-
provide: 'ShopMenuRepository',
|
|
303
|
-
useFactory: (options) => {
|
|
304
|
-
return new ShopMenuFirestoreRepository(options);
|
|
305
|
-
},
|
|
306
|
-
deps: ['FirestoreOptions'],
|
|
307
|
-
},
|
|
308
|
-
{
|
|
309
|
-
provide: 'OrderRepository',
|
|
310
|
-
useFactory: (options) => {
|
|
311
|
-
return new OrderFirestoreRepository(options);
|
|
312
|
-
},
|
|
313
|
-
deps: ['FirestoreOptions'],
|
|
314
|
-
},
|
|
315
|
-
{
|
|
316
|
-
provide: 'PaymentRepository',
|
|
317
|
-
useFactory: (options) => {
|
|
318
|
-
return new PaymentFirestoreRepository(options);
|
|
319
|
-
},
|
|
320
|
-
deps: ['FirestoreOptions'],
|
|
321
|
-
},
|
|
322
|
-
{
|
|
323
|
-
provide: ProductFirestoreRepository,
|
|
324
|
-
useFactory: (options) => {
|
|
325
|
-
return new ProductFirestoreRepository(options);
|
|
326
|
-
},
|
|
327
|
-
deps: ['FirestoreOptions'],
|
|
328
|
-
},
|
|
329
|
-
{
|
|
330
|
-
provide: 'ShopSettingsRepository',
|
|
331
|
-
useFactory: (options) => {
|
|
332
|
-
return new ShopSettingsFirestoreRepository(options);
|
|
333
|
-
},
|
|
334
|
-
deps: ['FirestoreOptions'],
|
|
335
|
-
},
|
|
336
|
-
{
|
|
337
|
-
provide: 'SubscriptionPaymentRepository',
|
|
338
|
-
useFactory: (options, subscriptionRepository) => {
|
|
339
|
-
return new SubscriptionPaymentFirestoreRepository(options, subscriptionRepository);
|
|
340
|
-
},
|
|
341
|
-
deps: ['FirestoreOptions', 'SubscriptionRepository'],
|
|
342
|
-
},
|
|
343
|
-
{
|
|
344
|
-
provide: 'SubscriptionPlanRepository',
|
|
345
|
-
useFactory: (options) => {
|
|
346
|
-
return new SubscriptionPlanFirestoreRepository(options);
|
|
347
|
-
},
|
|
348
|
-
deps: ['FirestoreOptions'],
|
|
349
|
-
},
|
|
350
|
-
{
|
|
351
|
-
provide: 'SubscriptionProductRepository',
|
|
352
|
-
useFactory: (options) => {
|
|
353
|
-
return new SubscriptionProductFirestoreRepository(options);
|
|
354
|
-
},
|
|
355
|
-
deps: ['FirestoreOptions'],
|
|
356
|
-
},
|
|
357
|
-
{
|
|
358
|
-
provide: 'SubscriptionRepository',
|
|
359
|
-
useFactory: (options) => {
|
|
360
|
-
return new SubscriptionFirestoreRepository(options);
|
|
361
|
-
},
|
|
362
|
-
deps: ['FirestoreOptions'],
|
|
363
|
-
},
|
|
364
|
-
{
|
|
365
|
-
provide: 'UserRepository',
|
|
366
|
-
useFactory: (options) => {
|
|
367
|
-
return new UserFirestoreRepository(options);
|
|
368
|
-
},
|
|
369
|
-
deps: ['FirestoreOptions'],
|
|
370
|
-
},
|
|
371
|
-
{
|
|
372
|
-
provide: 'UserAddressRepository',
|
|
373
|
-
useFactory: (options, userRepository) => {
|
|
374
|
-
return new UserAddressFirestoreRepository(options, userRepository);
|
|
375
|
-
},
|
|
376
|
-
deps: ['FirestoreOptions', 'UserRepository'],
|
|
377
|
-
},
|
|
378
|
-
{
|
|
379
|
-
provide: 'UserPaymentMethodRepository',
|
|
380
|
-
useFactory: (options, userRepository) => {
|
|
381
|
-
return new UserPaymentMethodFirestoreRepository(options, userRepository);
|
|
382
|
-
},
|
|
383
|
-
deps: ['FirestoreOptions', 'UserRepository'],
|
|
384
|
-
},
|
|
385
|
-
{
|
|
386
|
-
provide: 'SubscriptionMaterializationRepository',
|
|
387
|
-
useFactory: (options) => {
|
|
388
|
-
return new SubscriptionMaterializationFirestoreRepository(options);
|
|
389
|
-
},
|
|
390
|
-
deps: ['FirestoreOptions'],
|
|
391
|
-
},
|
|
392
|
-
{
|
|
393
|
-
provide: 'SubscriptionSummaryRepository',
|
|
394
|
-
useFactory: (options) => {
|
|
395
|
-
return new SubscriptionSummaryFirestoreRepository(options);
|
|
396
|
-
},
|
|
397
|
-
deps: ['FirestoreOptions'],
|
|
398
|
-
},
|
|
399
|
-
{
|
|
400
|
-
provide: ProductVariantFirestoreRepository,
|
|
401
|
-
useFactory: (options, productRepository) => {
|
|
402
|
-
return new ProductVariantFirestoreRepository(options, productRepository);
|
|
403
216
|
},
|
|
404
|
-
deps: ['FirestoreOptions', ProductFirestoreRepository],
|
|
405
|
-
},
|
|
406
|
-
{
|
|
407
|
-
provide: 'FileUploaderService',
|
|
408
|
-
useFactory: (storage, baseUrl) => {
|
|
409
|
-
return new FirebaseFileUploaderService(storage, baseUrl);
|
|
410
|
-
},
|
|
411
|
-
deps: [Storage, STORAGE_BASE_URL],
|
|
412
|
-
},
|
|
413
|
-
], imports: [AngularElasticSeachModule,
|
|
414
|
-
provideFirestore((injector) => {
|
|
415
|
-
const platformId = injector.get(PLATFORM_ID);
|
|
416
|
-
if (isPlatformServer(platformId))
|
|
417
|
-
return getFirestore(injector.get(FirebaseApp));
|
|
418
|
-
if (!MobileOperationSystemCheckerHelper.isAppleDevice())
|
|
419
|
-
return getFirestore(injector.get(FirebaseApp));
|
|
420
|
-
const firestore = initializeFirestore(injector.get(FirebaseApp), {
|
|
421
|
-
experimentalForceLongPolling: true,
|
|
422
|
-
localCache: memoryLocalCache(),
|
|
423
|
-
});
|
|
424
|
-
return firestore;
|
|
425
217
|
}),
|
|
426
|
-
|
|
427
|
-
}
|
|
428
|
-
|
|
218
|
+
deps: [Firestore, PLATFORM_ID],
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
provide: 'BeautyProfileRepository',
|
|
222
|
+
useFactory: (config, userRepository) => {
|
|
223
|
+
return new UserBeautyProfileFirestoreRepository(config, userRepository);
|
|
224
|
+
},
|
|
225
|
+
deps: ['FirestoreOptions', 'UserRepository'],
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
provide: 'Buy2WinRepository',
|
|
229
|
+
useFactory: (options) => {
|
|
230
|
+
return new Buy2WinFirestoreRepository(options);
|
|
231
|
+
},
|
|
232
|
+
deps: ['FirestoreOptions'],
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
provide: CategoryFirestoreRepository,
|
|
236
|
+
useFactory: (options) => {
|
|
237
|
+
return new CategoryFirestoreRepository(options);
|
|
238
|
+
},
|
|
239
|
+
deps: ['FirestoreOptions'],
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
provide: 'CheckoutRepository',
|
|
243
|
+
useFactory: (options) => {
|
|
244
|
+
return new CheckoutFirestoreRepository(options);
|
|
245
|
+
},
|
|
246
|
+
deps: ['FirestoreOptions'],
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
provide: 'CheckoutSubscriptionRepository',
|
|
250
|
+
useFactory: (options) => {
|
|
251
|
+
return new CheckoutSubscriptionFirestoreRepository(options);
|
|
252
|
+
},
|
|
253
|
+
deps: ['FirestoreOptions'],
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
provide: 'CouponRepository',
|
|
257
|
+
useFactory: (options) => {
|
|
258
|
+
return new CouponFirestoreRepository(options);
|
|
259
|
+
},
|
|
260
|
+
deps: ['FirestoreOptions'],
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
provide: 'CampaignHashtagRepository',
|
|
264
|
+
useFactory: (options) => {
|
|
265
|
+
return new CampaignHashtagFirestoreRepository(options);
|
|
266
|
+
},
|
|
267
|
+
deps: ['FirestoreOptions'],
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
provide: 'CampaignDashboardRepository',
|
|
271
|
+
useFactory: (options) => {
|
|
272
|
+
return new CampaignDashboardFirestoreRepository(options);
|
|
273
|
+
},
|
|
274
|
+
deps: ['FirestoreOptions'],
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
provide: 'EditionRepository',
|
|
278
|
+
useFactory: (options, subscriptionRepository) => {
|
|
279
|
+
return new SubscriptionEditionFirestoreRepository(options, subscriptionRepository);
|
|
280
|
+
},
|
|
281
|
+
deps: ['FirestoreOptions', 'SubscriptionRepository'],
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
provide: 'HomeRepository',
|
|
285
|
+
useFactory: (options) => {
|
|
286
|
+
return new HomeFirestoreRepository(options);
|
|
287
|
+
},
|
|
288
|
+
deps: ['FirestoreOptions'],
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
provide: 'LeadRepository',
|
|
292
|
+
useFactory: (options) => {
|
|
293
|
+
return new LeadFirestoreRepository(options);
|
|
294
|
+
},
|
|
295
|
+
deps: ['FirestoreOptions'],
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
provide: 'LegacyOrderRepository',
|
|
299
|
+
useFactory: (options) => {
|
|
300
|
+
return new LegacyOrderFirestoreRepository(options);
|
|
301
|
+
},
|
|
302
|
+
deps: ['FirestoreOptions'],
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
provide: 'ShopMenuRepository',
|
|
306
|
+
useFactory: (options) => {
|
|
307
|
+
return new ShopMenuFirestoreRepository(options);
|
|
308
|
+
},
|
|
309
|
+
deps: ['FirestoreOptions'],
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
provide: 'OrderRepository',
|
|
313
|
+
useFactory: (options) => {
|
|
314
|
+
return new OrderFirestoreRepository(options);
|
|
315
|
+
},
|
|
316
|
+
deps: ['FirestoreOptions'],
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
provide: 'PaymentRepository',
|
|
320
|
+
useFactory: (options) => {
|
|
321
|
+
return new PaymentFirestoreRepository(options);
|
|
322
|
+
},
|
|
323
|
+
deps: ['FirestoreOptions'],
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
provide: ProductFirestoreRepository,
|
|
327
|
+
useFactory: (options) => {
|
|
328
|
+
return new ProductFirestoreRepository(options);
|
|
329
|
+
},
|
|
330
|
+
deps: ['FirestoreOptions'],
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
provide: 'ShopSettingsRepository',
|
|
334
|
+
useFactory: (options) => {
|
|
335
|
+
return new ShopSettingsFirestoreRepository(options);
|
|
336
|
+
},
|
|
337
|
+
deps: ['FirestoreOptions'],
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
provide: 'SubscriptionPaymentRepository',
|
|
341
|
+
useFactory: (options, subscriptionRepository) => {
|
|
342
|
+
return new SubscriptionPaymentFirestoreRepository(options, subscriptionRepository);
|
|
343
|
+
},
|
|
344
|
+
deps: ['FirestoreOptions', 'SubscriptionRepository'],
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
provide: 'SubscriptionPlanRepository',
|
|
348
|
+
useFactory: (options) => {
|
|
349
|
+
return new SubscriptionPlanFirestoreRepository(options);
|
|
350
|
+
},
|
|
351
|
+
deps: ['FirestoreOptions'],
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
provide: 'SubscriptionProductRepository',
|
|
355
|
+
useFactory: (options) => {
|
|
356
|
+
return new SubscriptionProductFirestoreRepository(options);
|
|
357
|
+
},
|
|
358
|
+
deps: ['FirestoreOptions'],
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
provide: 'SubscriptionRepository',
|
|
362
|
+
useFactory: (options) => {
|
|
363
|
+
return new SubscriptionFirestoreRepository(options);
|
|
364
|
+
},
|
|
365
|
+
deps: ['FirestoreOptions'],
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
provide: 'UserRepository',
|
|
369
|
+
useFactory: (options) => {
|
|
370
|
+
return new UserFirestoreRepository(options);
|
|
371
|
+
},
|
|
372
|
+
deps: ['FirestoreOptions'],
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
provide: 'UserAddressRepository',
|
|
376
|
+
useFactory: (options, userRepository) => {
|
|
377
|
+
return new UserAddressFirestoreRepository(options, userRepository);
|
|
378
|
+
},
|
|
379
|
+
deps: ['FirestoreOptions', 'UserRepository'],
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
provide: 'UserPaymentMethodRepository',
|
|
383
|
+
useFactory: (options, userRepository) => {
|
|
384
|
+
return new UserPaymentMethodFirestoreRepository(options, userRepository);
|
|
385
|
+
},
|
|
386
|
+
deps: ['FirestoreOptions', 'UserRepository'],
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
provide: 'SubscriptionMaterializationRepository',
|
|
390
|
+
useFactory: (options) => {
|
|
391
|
+
return new SubscriptionMaterializationFirestoreRepository(options);
|
|
392
|
+
},
|
|
393
|
+
deps: ['FirestoreOptions'],
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
provide: 'SubscriptionSummaryRepository',
|
|
397
|
+
useFactory: (options) => {
|
|
398
|
+
return new SubscriptionSummaryFirestoreRepository(options);
|
|
399
|
+
},
|
|
400
|
+
deps: ['FirestoreOptions'],
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
provide: ProductVariantFirestoreRepository,
|
|
404
|
+
useFactory: (options, productRepository) => {
|
|
405
|
+
return new ProductVariantFirestoreRepository(options, productRepository);
|
|
406
|
+
},
|
|
407
|
+
deps: ['FirestoreOptions', ProductFirestoreRepository],
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
provide: 'FileUploaderService',
|
|
411
|
+
useFactory: (storage, baseUrl) => {
|
|
412
|
+
return new FirebaseFileUploaderService(storage, baseUrl);
|
|
413
|
+
},
|
|
414
|
+
deps: [Storage, STORAGE_BASE_URL],
|
|
415
|
+
},
|
|
416
|
+
], imports: [AngularElasticSeachModule,
|
|
417
|
+
provideFirestore((injector) => {
|
|
418
|
+
const platformId = injector.get(PLATFORM_ID);
|
|
419
|
+
if (isPlatformServer(platformId))
|
|
420
|
+
return getFirestore(injector.get(FirebaseApp));
|
|
421
|
+
if (!MobileOperationSystemCheckerHelper.isAppleDevice())
|
|
422
|
+
return getFirestore(injector.get(FirebaseApp));
|
|
423
|
+
const firestore = initializeFirestore(injector.get(FirebaseApp), {
|
|
424
|
+
experimentalForceLongPolling: true,
|
|
425
|
+
localCache: memoryLocalCache(),
|
|
426
|
+
});
|
|
427
|
+
return firestore;
|
|
428
|
+
}),
|
|
429
|
+
provideStorage(() => getStorage())] });
|
|
430
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirestoreModule, decorators: [{
|
|
429
431
|
type: NgModule,
|
|
430
432
|
args: [{
|
|
431
433
|
imports: [
|
|
@@ -674,132 +676,132 @@ class AngularHasuraGraphQLModule {
|
|
|
674
676
|
providers: [{ provide: HASURA_OPTIONS, useValue: options }],
|
|
675
677
|
};
|
|
676
678
|
}
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
const interval = setInterval(() => { }, 100);
|
|
690
|
-
request.interval = interval;
|
|
679
|
+
}
|
|
680
|
+
AngularHasuraGraphQLModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularHasuraGraphQLModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
681
|
+
AngularHasuraGraphQLModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularHasuraGraphQLModule });
|
|
682
|
+
AngularHasuraGraphQLModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularHasuraGraphQLModule, providers: [
|
|
683
|
+
{
|
|
684
|
+
provide: 'HasuraConfig',
|
|
685
|
+
useFactory: (options, platformId) => ({
|
|
686
|
+
endpoint: options.endpoint,
|
|
687
|
+
authOptions: options.credentials,
|
|
688
|
+
interceptors: {
|
|
689
|
+
request: (request) => {
|
|
690
|
+
if (isPlatformBrowser(platformId))
|
|
691
691
|
return request;
|
|
692
|
-
},
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
692
|
+
const interval = setInterval(() => { }, 100);
|
|
693
|
+
request.interval = interval;
|
|
694
|
+
return request;
|
|
695
|
+
},
|
|
696
|
+
response: (response, request) => {
|
|
697
|
+
if (isPlatformBrowser(platformId))
|
|
697
698
|
return response;
|
|
698
|
-
|
|
699
|
+
clearInterval(request.interval);
|
|
700
|
+
return response;
|
|
699
701
|
},
|
|
700
|
-
}),
|
|
701
|
-
deps: [HASURA_OPTIONS, PLATFORM_ID],
|
|
702
|
-
},
|
|
703
|
-
{
|
|
704
|
-
provide: 'CategoryRepository',
|
|
705
|
-
useExisting: CategoryHasuraGraphQLRepository,
|
|
706
|
-
},
|
|
707
|
-
{
|
|
708
|
-
provide: CategoryHasuraGraphQLRepository,
|
|
709
|
-
useFactory: (options, productRepository, categoryFilterRepository) => {
|
|
710
|
-
return new CategoryHasuraGraphQLRepository(options, productRepository, categoryFilterRepository);
|
|
711
|
-
},
|
|
712
|
-
deps: ['HasuraConfig', ProductHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository],
|
|
713
|
-
},
|
|
714
|
-
{
|
|
715
|
-
provide: 'ProductRepository',
|
|
716
|
-
useExisting: ProductHasuraGraphQLRepository,
|
|
717
|
-
},
|
|
718
|
-
{
|
|
719
|
-
provide: ProductHasuraGraphQLRepository,
|
|
720
|
-
useFactory: (hasuraConfig) => {
|
|
721
|
-
return new ProductHasuraGraphQLRepository(hasuraConfig);
|
|
722
|
-
},
|
|
723
|
-
deps: ['HasuraConfig'],
|
|
724
|
-
},
|
|
725
|
-
{
|
|
726
|
-
provide: 'ProductReviewsRepository',
|
|
727
|
-
useExisting: ProductReviewsHasuraGraphQLRepository,
|
|
728
|
-
},
|
|
729
|
-
{
|
|
730
|
-
provide: ProductReviewsHasuraGraphQLRepository,
|
|
731
|
-
useFactory: (hasuraConfig) => {
|
|
732
|
-
return new ProductReviewsHasuraGraphQLRepository(hasuraConfig);
|
|
733
702
|
},
|
|
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
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
703
|
+
}),
|
|
704
|
+
deps: [HASURA_OPTIONS, PLATFORM_ID],
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
provide: 'CategoryRepository',
|
|
708
|
+
useExisting: CategoryHasuraGraphQLRepository,
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
provide: CategoryHasuraGraphQLRepository,
|
|
712
|
+
useFactory: (options, productRepository, categoryFilterRepository) => {
|
|
713
|
+
return new CategoryHasuraGraphQLRepository(options, productRepository, categoryFilterRepository);
|
|
714
|
+
},
|
|
715
|
+
deps: ['HasuraConfig', ProductHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository],
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
provide: 'ProductRepository',
|
|
719
|
+
useExisting: ProductHasuraGraphQLRepository,
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
provide: ProductHasuraGraphQLRepository,
|
|
723
|
+
useFactory: (hasuraConfig) => {
|
|
724
|
+
return new ProductHasuraGraphQLRepository(hasuraConfig);
|
|
725
|
+
},
|
|
726
|
+
deps: ['HasuraConfig'],
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
provide: 'ProductReviewsRepository',
|
|
730
|
+
useExisting: ProductReviewsHasuraGraphQLRepository,
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
provide: ProductReviewsHasuraGraphQLRepository,
|
|
734
|
+
useFactory: (hasuraConfig) => {
|
|
735
|
+
return new ProductReviewsHasuraGraphQLRepository(hasuraConfig);
|
|
736
|
+
},
|
|
737
|
+
deps: ['HasuraConfig'],
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
provide: 'VariantRepository',
|
|
741
|
+
useExisting: VariantHasuraGraphQLRepository,
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
provide: VariantHasuraGraphQLRepository,
|
|
745
|
+
useFactory: (hasuraConfig) => {
|
|
746
|
+
return new VariantHasuraGraphQLRepository(hasuraConfig);
|
|
747
|
+
},
|
|
748
|
+
deps: ['HasuraConfig'],
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
provide: 'CategoryFilterRepository',
|
|
752
|
+
useExisting: CategoryFilterHasuraGraphQLRepository,
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
provide: CategoryFilterHasuraGraphQLRepository,
|
|
756
|
+
useFactory: (options) => {
|
|
757
|
+
return new CategoryFilterHasuraGraphQLRepository(options);
|
|
758
|
+
},
|
|
759
|
+
deps: ['HasuraConfig'],
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
provide: 'FilterOptionRepository',
|
|
763
|
+
useExisting: FilterOptionHasuraGraphQLRepository,
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
provide: FilterOptionHasuraGraphQLRepository,
|
|
767
|
+
useFactory: (options) => {
|
|
768
|
+
return new FilterOptionHasuraGraphQLRepository(options);
|
|
769
|
+
},
|
|
770
|
+
deps: ['HasuraConfig'],
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
provide: 'FilterRepository',
|
|
774
|
+
useExisting: FilterHasuraGraphQLRepository,
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
provide: FilterHasuraGraphQLRepository,
|
|
778
|
+
useFactory: (options, filterOptionRepository, categoryFilterRepository) => {
|
|
779
|
+
return new FilterHasuraGraphQLRepository(options, filterOptionRepository, categoryFilterRepository);
|
|
780
|
+
},
|
|
781
|
+
deps: ['HasuraConfig', FilterOptionHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository],
|
|
782
|
+
},
|
|
783
|
+
{
|
|
784
|
+
provide: CategoryCollectionChildrenHasuraGraphQLRepository,
|
|
785
|
+
useFactory: (options) => new CategoryCollectionChildrenHasuraGraphQLRepository(options),
|
|
786
|
+
deps: ['HasuraConfig'],
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
provide: 'CategoryCollectionChildrenRepository',
|
|
790
|
+
useExisting: CategoryCollectionChildrenHasuraGraphQLRepository,
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
provide: WishlistHasuraGraphQLRepository,
|
|
794
|
+
useFactory: (options, categoryFilterRepository) => {
|
|
795
|
+
return new WishlistHasuraGraphQLRepository(options, categoryFilterRepository);
|
|
796
|
+
},
|
|
797
|
+
deps: ['HasuraConfig', CategoryFilterHasuraGraphQLRepository],
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
provide: 'WishlistRepository',
|
|
801
|
+
useExisting: WishlistHasuraGraphQLRepository,
|
|
802
|
+
},
|
|
803
|
+
] });
|
|
804
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularHasuraGraphQLModule, decorators: [{
|
|
803
805
|
type: NgModule,
|
|
804
806
|
args: [{
|
|
805
807
|
providers: [
|
|
@@ -927,6 +929,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImpor
|
|
|
927
929
|
}]
|
|
928
930
|
}] });
|
|
929
931
|
|
|
932
|
+
class CookieDataPersistence {
|
|
933
|
+
get(key) {
|
|
934
|
+
return of(cookie.get(key));
|
|
935
|
+
}
|
|
936
|
+
remove(key) {
|
|
937
|
+
cookie.remove(key);
|
|
938
|
+
return;
|
|
939
|
+
}
|
|
940
|
+
set(key, value) {
|
|
941
|
+
return from(cookie.set(key, value)).pipe(map(() => { }));
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
CookieDataPersistence.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CookieDataPersistence, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
945
|
+
CookieDataPersistence.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CookieDataPersistence });
|
|
946
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CookieDataPersistence, decorators: [{
|
|
947
|
+
type: Injectable
|
|
948
|
+
}] });
|
|
949
|
+
|
|
930
950
|
class AuthService {
|
|
931
951
|
constructor(angularFireAuth, userRepository) {
|
|
932
952
|
this.angularFireAuth = angularFireAuth;
|
|
@@ -948,15 +968,15 @@ class AuthService {
|
|
|
948
968
|
getFireUser() {
|
|
949
969
|
return authState(this.angularFireAuth).pipe(catchError(() => of(null)));
|
|
950
970
|
}
|
|
951
|
-
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 }); }
|
|
952
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AuthService }); }
|
|
953
971
|
}
|
|
954
|
-
i0.ɵɵ
|
|
972
|
+
AuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AuthService, deps: [{ token: i1.Auth }, { token: 'UserRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
973
|
+
AuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AuthService });
|
|
974
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AuthService, decorators: [{
|
|
955
975
|
type: Injectable
|
|
956
|
-
}], ctorParameters: ()
|
|
976
|
+
}], ctorParameters: function () { return [{ type: i1.Auth }, { type: undefined, decorators: [{
|
|
957
977
|
type: Inject,
|
|
958
978
|
args: ['UserRepository']
|
|
959
|
-
}] }] });
|
|
979
|
+
}] }]; } });
|
|
960
980
|
|
|
961
981
|
class CouponService {
|
|
962
982
|
constructor(couponRepository, defaultShop, orderRepository, categoryRepository) {
|
|
@@ -1164,15 +1184,15 @@ class CouponService {
|
|
|
1164
1184
|
}
|
|
1165
1185
|
return couponUseLimits;
|
|
1166
1186
|
}
|
|
1167
|
-
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 }); }
|
|
1168
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CouponService, providedIn: 'root' }); }
|
|
1169
1187
|
}
|
|
1170
|
-
i0.ɵɵ
|
|
1188
|
+
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 });
|
|
1189
|
+
CouponService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CouponService, providedIn: 'root' });
|
|
1190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CouponService, decorators: [{
|
|
1171
1191
|
type: Injectable,
|
|
1172
1192
|
args: [{
|
|
1173
1193
|
providedIn: 'root',
|
|
1174
1194
|
}]
|
|
1175
|
-
}], ctorParameters: ()
|
|
1195
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1176
1196
|
type: Inject,
|
|
1177
1197
|
args: ['CouponRepository']
|
|
1178
1198
|
}] }, { type: i1$2.Shops, decorators: [{
|
|
@@ -1184,21 +1204,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImpor
|
|
|
1184
1204
|
}] }, { type: undefined, decorators: [{
|
|
1185
1205
|
type: Inject,
|
|
1186
1206
|
args: ['CategoryRepository']
|
|
1187
|
-
}] }] });
|
|
1207
|
+
}] }]; } });
|
|
1188
1208
|
|
|
1189
1209
|
class CheckoutService {
|
|
1190
|
-
constructor(couponService, checkoutRepository,
|
|
1210
|
+
constructor(couponService, checkoutRepository, userRepository, defaultShop, dataPersistence) {
|
|
1191
1211
|
this.couponService = couponService;
|
|
1192
1212
|
this.checkoutRepository = checkoutRepository;
|
|
1193
|
-
this.orderRepository = orderRepository;
|
|
1194
1213
|
this.userRepository = userRepository;
|
|
1195
1214
|
this.defaultShop = defaultShop;
|
|
1215
|
+
this.dataPersistence = dataPersistence;
|
|
1196
1216
|
}
|
|
1197
1217
|
getCheckout(checkoutData) {
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
return from(this.createCheckout(checkoutData));
|
|
1218
|
+
return this.dataPersistence
|
|
1219
|
+
.get('checkoutId')
|
|
1220
|
+
.pipe(concatMap((id) => (!isNil(id) ? this.checkoutRepository.get({ id }) : this.createCheckout(checkoutData))));
|
|
1202
1221
|
}
|
|
1203
1222
|
getUserByCheckout(checkoutId) {
|
|
1204
1223
|
return from(this.checkoutRepository.get({ id: checkoutId })).pipe(concatMap((checkout) => checkout?.user?.id ? of(checkout.user) : from(this.userRepository.get({ id: checkout.user.id }))), concatMap((user) => of(user) || throwError(() => new NotFoundError('User is not found'))));
|
|
@@ -1210,8 +1229,7 @@ class CheckoutService {
|
|
|
1210
1229
|
return from(this.checkoutRepository.update(Checkout.toInstance({ id: checkout.id, user: checkout.user })));
|
|
1211
1230
|
}
|
|
1212
1231
|
clearCheckoutFromSession() {
|
|
1213
|
-
|
|
1214
|
-
return of();
|
|
1232
|
+
return this.dataPersistence.remove('checkoutId');
|
|
1215
1233
|
}
|
|
1216
1234
|
calcDiscount(coupon) {
|
|
1217
1235
|
return this.getCheckout().pipe(concatMap(async (checkout) => await this.couponService.calcDiscountShopping(coupon, checkout)));
|
|
@@ -1225,27 +1243,27 @@ class CheckoutService {
|
|
|
1225
1243
|
...Checkout.toInstance(pick(checkoutData, ['user', 'shop'])).toPlain(),
|
|
1226
1244
|
shop: checkoutData?.shop || this.defaultShop,
|
|
1227
1245
|
});
|
|
1228
|
-
|
|
1246
|
+
await this.dataPersistence.set('checkoutId', checkout.id).toPromise();
|
|
1229
1247
|
return checkout;
|
|
1230
1248
|
}
|
|
1231
|
-
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 }); }
|
|
1232
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CheckoutService }); }
|
|
1233
1249
|
}
|
|
1234
|
-
i0.ɵɵ
|
|
1250
|
+
CheckoutService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutService, deps: [{ token: CouponService }, { token: 'CheckoutRepository' }, { token: 'UserRepository' }, { token: DEFAULT_SHOP }, { token: PERSISTENCE_PROVIDER }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1251
|
+
CheckoutService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutService });
|
|
1252
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutService, decorators: [{
|
|
1235
1253
|
type: Injectable
|
|
1236
|
-
}], ctorParameters: ()
|
|
1254
|
+
}], ctorParameters: function () { return [{ type: CouponService }, { type: undefined, decorators: [{
|
|
1237
1255
|
type: Inject,
|
|
1238
1256
|
args: ['CheckoutRepository']
|
|
1239
|
-
}] }, { type: undefined, decorators: [{
|
|
1240
|
-
type: Inject,
|
|
1241
|
-
args: ['OrderRepository']
|
|
1242
1257
|
}] }, { type: undefined, decorators: [{
|
|
1243
1258
|
type: Inject,
|
|
1244
1259
|
args: ['UserRepository']
|
|
1245
1260
|
}] }, { type: i1$2.Shops, decorators: [{
|
|
1246
1261
|
type: Inject,
|
|
1247
1262
|
args: [DEFAULT_SHOP]
|
|
1248
|
-
}] }
|
|
1263
|
+
}] }, { type: undefined, decorators: [{
|
|
1264
|
+
type: Inject,
|
|
1265
|
+
args: [PERSISTENCE_PROVIDER]
|
|
1266
|
+
}] }]; } });
|
|
1249
1267
|
|
|
1250
1268
|
class CartService {
|
|
1251
1269
|
constructor(authService, checkoutService, defaultShop, productRepository, categoryRepository, variantRepository, buy2WinRepository) {
|
|
@@ -1357,7 +1375,7 @@ class CartService {
|
|
|
1357
1375
|
}), concatMap((checkout) => this.checkoutService.updateCheckoutLineItems(checkout)), map((checkout) => this.generateCartObject(checkout.lineItems)), tap((cart) => this.cartSubject.next(cart)));
|
|
1358
1376
|
}
|
|
1359
1377
|
updateUserCart(user) {
|
|
1360
|
-
return this.checkoutService.getCheckout().pipe(concatMap((checkout) => this.checkoutService.updateCheckoutUser(Checkout.toInstance({ ...checkout.toPlain(), user }))), concatMap(async (checkout) => this.checkoutService
|
|
1378
|
+
return this.checkoutService.getCheckout().pipe(concatMap((checkout) => this.checkoutService.updateCheckoutUser(Checkout.toInstance({ ...checkout.toPlain(), user }))), concatMap(async (checkout) => await this.checkoutService
|
|
1361
1379
|
.updateCheckoutLineItems(Checkout.toInstance({
|
|
1362
1380
|
...checkout.toPlain(),
|
|
1363
1381
|
lineItems: checkout.lineItems?.length
|
|
@@ -1495,12 +1513,12 @@ class CartService {
|
|
|
1495
1513
|
});
|
|
1496
1514
|
});
|
|
1497
1515
|
}
|
|
1498
|
-
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 }); }
|
|
1499
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CartService }); }
|
|
1500
1516
|
}
|
|
1501
|
-
i0.ɵɵ
|
|
1517
|
+
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 });
|
|
1518
|
+
CartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CartService });
|
|
1519
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CartService, decorators: [{
|
|
1502
1520
|
type: Injectable
|
|
1503
|
-
}], ctorParameters: ()
|
|
1521
|
+
}], ctorParameters: function () { return [{ type: AuthService }, { type: CheckoutService }, { type: i1$2.Shops, decorators: [{
|
|
1504
1522
|
type: Inject,
|
|
1505
1523
|
args: [DEFAULT_SHOP]
|
|
1506
1524
|
}] }, { type: undefined, decorators: [{
|
|
@@ -1515,7 +1533,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImpor
|
|
|
1515
1533
|
}] }, { type: i1$2.Buy2WinFirestoreRepository, decorators: [{
|
|
1516
1534
|
type: Inject,
|
|
1517
1535
|
args: ['Buy2WinRepository']
|
|
1518
|
-
}] }] });
|
|
1536
|
+
}] }]; } });
|
|
1519
1537
|
|
|
1520
1538
|
class NewCategoryStructureAdapter {
|
|
1521
1539
|
constructor(categoryRepository) {
|
|
@@ -1545,15 +1563,15 @@ class NewCategoryStructureAdapter {
|
|
|
1545
1563
|
? this.categoryRepository.get({ id: category.id })
|
|
1546
1564
|
: category;
|
|
1547
1565
|
}
|
|
1548
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: NewCategoryStructureAdapter, deps: [{ token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1549
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: NewCategoryStructureAdapter }); }
|
|
1550
1566
|
}
|
|
1551
|
-
i0.ɵɵ
|
|
1567
|
+
NewCategoryStructureAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: NewCategoryStructureAdapter, deps: [{ token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1568
|
+
NewCategoryStructureAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: NewCategoryStructureAdapter });
|
|
1569
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: NewCategoryStructureAdapter, decorators: [{
|
|
1552
1570
|
type: Injectable
|
|
1553
|
-
}], ctorParameters: ()
|
|
1571
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1554
1572
|
type: Inject,
|
|
1555
1573
|
args: ['CategoryRepository']
|
|
1556
|
-
}] }] });
|
|
1574
|
+
}] }]; } });
|
|
1557
1575
|
|
|
1558
1576
|
class OldCategoryStructureAdapter {
|
|
1559
1577
|
constructor(categoryRepository) {
|
|
@@ -1565,15 +1583,15 @@ class OldCategoryStructureAdapter {
|
|
|
1565
1583
|
: await this.categoryRepository.get({ id: category.id }).then((categoryFound) => categoryFound.products);
|
|
1566
1584
|
return { id: { operator: Where.IN, value: productsIds } };
|
|
1567
1585
|
}
|
|
1568
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: OldCategoryStructureAdapter, deps: [{ token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1569
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: OldCategoryStructureAdapter }); }
|
|
1570
1586
|
}
|
|
1571
|
-
i0.ɵɵ
|
|
1587
|
+
OldCategoryStructureAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OldCategoryStructureAdapter, deps: [{ token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1588
|
+
OldCategoryStructureAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OldCategoryStructureAdapter });
|
|
1589
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OldCategoryStructureAdapter, decorators: [{
|
|
1572
1590
|
type: Injectable
|
|
1573
|
-
}], ctorParameters: ()
|
|
1591
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1574
1592
|
type: Inject,
|
|
1575
1593
|
args: ['CategoryRepository']
|
|
1576
|
-
}] }] });
|
|
1594
|
+
}] }]; } });
|
|
1577
1595
|
|
|
1578
1596
|
class CatalogService {
|
|
1579
1597
|
constructor(productRepository, categoryRepository, categoryStructureAdapter, shop, productIndex) {
|
|
@@ -1736,12 +1754,12 @@ class CatalogService {
|
|
|
1736
1754
|
return [...new Set(sorted.map(({ _source }) => _source.id))];
|
|
1737
1755
|
}));
|
|
1738
1756
|
}
|
|
1739
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CatalogService, deps: [{ token: 'ProductRepository' }, { token: 'CategoryRepository' }, { token: CATEGORY_STRUCTURE }, { token: DEFAULT_SHOP }, { token: i1$2.ProductsIndex }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1740
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CatalogService }); }
|
|
1741
1757
|
}
|
|
1742
|
-
i0.ɵɵ
|
|
1758
|
+
CatalogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService, deps: [{ token: 'ProductRepository' }, { token: 'CategoryRepository' }, { token: CATEGORY_STRUCTURE }, { token: DEFAULT_SHOP }, { token: i1$2.ProductsIndex }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1759
|
+
CatalogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService });
|
|
1760
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService, decorators: [{
|
|
1743
1761
|
type: Injectable
|
|
1744
|
-
}], ctorParameters: ()
|
|
1762
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1745
1763
|
type: Inject,
|
|
1746
1764
|
args: ['ProductRepository']
|
|
1747
1765
|
}] }, { type: undefined, decorators: [{
|
|
@@ -1753,7 +1771,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImpor
|
|
|
1753
1771
|
}] }, { type: i1$2.Shops, decorators: [{
|
|
1754
1772
|
type: Inject,
|
|
1755
1773
|
args: [DEFAULT_SHOP]
|
|
1756
|
-
}] }, { type: i1$2.ProductsIndex }] });
|
|
1774
|
+
}] }, { type: i1$2.ProductsIndex }]; } });
|
|
1757
1775
|
|
|
1758
1776
|
class CategoryService {
|
|
1759
1777
|
constructor(productRepository, categoryRepository, categoryFilterRepository, categoryStructureAdapter, shop) {
|
|
@@ -1763,15 +1781,15 @@ class CategoryService {
|
|
|
1763
1781
|
this.categoryStructureAdapter = categoryStructureAdapter;
|
|
1764
1782
|
this.shop = shop;
|
|
1765
1783
|
}
|
|
1766
|
-
async fetchBrands(category,
|
|
1784
|
+
async fetchBrands(category, options) {
|
|
1767
1785
|
const brands = await this.productRepository
|
|
1768
1786
|
.findCatalog({
|
|
1769
1787
|
filters: await this.categoryStructureAdapter.buildProductFilterByCategory(category),
|
|
1770
1788
|
fields: ['brand'],
|
|
1771
|
-
}, mainGender
|
|
1789
|
+
}, options?.mainGender ? options?.mainGender : this.shop === Shops.MENSMARKET ? 'male' : 'female')
|
|
1772
1790
|
.then(({ data }) => Object.keys(data.map((product) => product.brand).reduce((brands, brand) => ({ ...brands, [brand]: true }), {})));
|
|
1773
1791
|
return this.categoryRepository
|
|
1774
|
-
.find({ filters: { brandCategory: true, shop: this.shop }, orderBy: { name: 'asc' } })
|
|
1792
|
+
.find({ filters: { brandCategory: true, shop: options?.shop || this.shop }, orderBy: { name: 'asc' } })
|
|
1775
1793
|
.then(({ data }) => data.filter((category) => brands.includes(category.conditions.brand)));
|
|
1776
1794
|
}
|
|
1777
1795
|
async fetchFilterOptions(category) {
|
|
@@ -1779,12 +1797,12 @@ class CategoryService {
|
|
|
1779
1797
|
.find({ filters: { categoryId: +category.id } })
|
|
1780
1798
|
.then(({ data }) => data.map((categoryFilter) => categoryFilter.filter));
|
|
1781
1799
|
}
|
|
1782
|
-
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 }); }
|
|
1783
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CategoryService }); }
|
|
1784
1800
|
}
|
|
1785
|
-
i0.ɵɵ
|
|
1801
|
+
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 });
|
|
1802
|
+
CategoryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryService });
|
|
1803
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryService, decorators: [{
|
|
1786
1804
|
type: Injectable
|
|
1787
|
-
}], ctorParameters: ()
|
|
1805
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1788
1806
|
type: Inject,
|
|
1789
1807
|
args: ['ProductRepository']
|
|
1790
1808
|
}] }, { type: undefined, decorators: [{
|
|
@@ -1799,7 +1817,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImpor
|
|
|
1799
1817
|
}] }, { type: i1$2.Shops, decorators: [{
|
|
1800
1818
|
type: Inject,
|
|
1801
1819
|
args: [DEFAULT_SHOP]
|
|
1802
|
-
}] }] });
|
|
1820
|
+
}] }]; } });
|
|
1803
1821
|
|
|
1804
1822
|
var ProductSorts;
|
|
1805
1823
|
(function (ProductSorts) {
|
|
@@ -1904,12 +1922,12 @@ class WishlistService {
|
|
|
1904
1922
|
}
|
|
1905
1923
|
return wishlist;
|
|
1906
1924
|
}
|
|
1907
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: WishlistService, deps: [{ token: 'WishlistRepository' }, { token: DEFAULT_SHOP }, { token: 'ProductRepository' }, { token: 'CategoryFilterRepository' }, { token: 'CategoryRepository' }, { token: i1$2.ProductsIndex }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1908
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: WishlistService }); }
|
|
1909
1925
|
}
|
|
1910
|
-
i0.ɵɵ
|
|
1926
|
+
WishlistService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, deps: [{ token: 'WishlistRepository' }, { token: DEFAULT_SHOP }, { token: 'ProductRepository' }, { token: 'CategoryFilterRepository' }, { token: 'CategoryRepository' }, { token: i1$2.ProductsIndex }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1927
|
+
WishlistService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService });
|
|
1928
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, decorators: [{
|
|
1911
1929
|
type: Injectable
|
|
1912
|
-
}], ctorParameters: ()
|
|
1930
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1913
1931
|
type: Inject,
|
|
1914
1932
|
args: ['WishlistRepository']
|
|
1915
1933
|
}] }, { type: i1$2.Shops, decorators: [{
|
|
@@ -1924,31 +1942,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImpor
|
|
|
1924
1942
|
}] }, { type: undefined, decorators: [{
|
|
1925
1943
|
type: Inject,
|
|
1926
1944
|
args: ['CategoryRepository']
|
|
1927
|
-
}] }, { type: i1$2.ProductsIndex }] });
|
|
1945
|
+
}] }, { type: i1$2.ProductsIndex }]; } });
|
|
1928
1946
|
|
|
1929
1947
|
class CheckoutSubscriptionService {
|
|
1930
|
-
constructor(checkoutSubscriptionRepository,
|
|
1948
|
+
constructor(checkoutSubscriptionRepository, dataPersistence, couponService) {
|
|
1931
1949
|
this.checkoutSubscriptionRepository = checkoutSubscriptionRepository;
|
|
1932
|
-
this.
|
|
1950
|
+
this.dataPersistence = dataPersistence;
|
|
1933
1951
|
this.couponService = couponService;
|
|
1934
1952
|
}
|
|
1935
1953
|
getCheckoutSubscription(checkoutData) {
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
return from(this.createCheckoutSubscription(checkoutData));
|
|
1940
|
-
}
|
|
1941
|
-
async createCheckoutSubscription(checkoutData) {
|
|
1942
|
-
const checkout = await this.checkoutSubscriptionRepository.create({
|
|
1943
|
-
createdAt: new Date(),
|
|
1944
|
-
...CheckoutSubscription.toInstance(pick(checkoutData, ['user', 'shop'])).toPlain(),
|
|
1945
|
-
});
|
|
1946
|
-
cookie.set('checkoutSubscriptionId', checkout.id);
|
|
1947
|
-
return checkout;
|
|
1954
|
+
return this.dataPersistence
|
|
1955
|
+
.get('checkoutSubscriptionId')
|
|
1956
|
+
.pipe(concatMap((id) => !isNil(id) ? this.checkoutSubscriptionRepository.get({ id }) : this.createCheckoutSubscription(checkoutData)));
|
|
1948
1957
|
}
|
|
1949
1958
|
clearCheckoutSubscriptionFromSession() {
|
|
1950
|
-
|
|
1951
|
-
return of();
|
|
1959
|
+
return this.dataPersistence.remove('checkoutSubscriptionId');
|
|
1952
1960
|
}
|
|
1953
1961
|
checkCoupon(nickname, userEmail) {
|
|
1954
1962
|
return this.getCheckoutSubscription().pipe(concatMap((checkout) => this.couponService
|
|
@@ -1958,18 +1966,26 @@ class CheckoutSubscriptionService {
|
|
|
1958
1966
|
calcDiscountSubscription(coupon) {
|
|
1959
1967
|
return this.getCheckoutSubscription().pipe(concatMap((checkout) => this.couponService.calcDiscountSubscription(coupon, checkout).pipe()));
|
|
1960
1968
|
}
|
|
1961
|
-
|
|
1962
|
-
|
|
1969
|
+
async createCheckoutSubscription(checkoutData) {
|
|
1970
|
+
const checkout = await this.checkoutSubscriptionRepository.create({
|
|
1971
|
+
createdAt: new Date(),
|
|
1972
|
+
...CheckoutSubscription.toInstance(pick(checkoutData, ['user', 'shop'])).toPlain(),
|
|
1973
|
+
});
|
|
1974
|
+
await this.dataPersistence.set('checkoutSubscriptionId', checkout.id).toPromise();
|
|
1975
|
+
return checkout;
|
|
1976
|
+
}
|
|
1963
1977
|
}
|
|
1964
|
-
i0.ɵɵ
|
|
1978
|
+
CheckoutSubscriptionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutSubscriptionService, deps: [{ token: 'CheckoutSubscriptionRepository' }, { token: PERSISTENCE_PROVIDER }, { token: CouponService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1979
|
+
CheckoutSubscriptionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutSubscriptionService });
|
|
1980
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutSubscriptionService, decorators: [{
|
|
1965
1981
|
type: Injectable
|
|
1966
|
-
}], ctorParameters: ()
|
|
1982
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1967
1983
|
type: Inject,
|
|
1968
1984
|
args: ['CheckoutSubscriptionRepository']
|
|
1969
1985
|
}] }, { type: undefined, decorators: [{
|
|
1970
1986
|
type: Inject,
|
|
1971
|
-
args: [
|
|
1972
|
-
}] }, { type: CouponService }] });
|
|
1987
|
+
args: [PERSISTENCE_PROVIDER]
|
|
1988
|
+
}] }, { type: CouponService }]; } });
|
|
1973
1989
|
|
|
1974
1990
|
class UtilHelper {
|
|
1975
1991
|
static createSlug(name) {
|
|
@@ -2088,12 +2104,12 @@ class HomeShopService {
|
|
|
2088
2104
|
get gender() {
|
|
2089
2105
|
return this.homeId === 'mens_market' ? 'masculino' : undefined;
|
|
2090
2106
|
}
|
|
2091
|
-
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 }); }
|
|
2092
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: HomeShopService }); }
|
|
2093
2107
|
}
|
|
2094
|
-
i0.ɵɵ
|
|
2108
|
+
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 });
|
|
2109
|
+
HomeShopService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: HomeShopService });
|
|
2110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: HomeShopService, decorators: [{
|
|
2095
2111
|
type: Injectable
|
|
2096
|
-
}], ctorParameters: ()
|
|
2112
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
2097
2113
|
type: Inject,
|
|
2098
2114
|
args: ['CategoryRepository']
|
|
2099
2115
|
}] }, { type: undefined, decorators: [{
|
|
@@ -2105,7 +2121,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImpor
|
|
|
2105
2121
|
}] }, { type: i1$2.Shops, decorators: [{
|
|
2106
2122
|
type: Inject,
|
|
2107
2123
|
args: [DEFAULT_SHOP]
|
|
2108
|
-
}] }] });
|
|
2124
|
+
}] }]; } });
|
|
2109
2125
|
|
|
2110
2126
|
class OrderService {
|
|
2111
2127
|
constructor(angularFirestore, orderRepository) {
|
|
@@ -2119,15 +2135,15 @@ class OrderService {
|
|
|
2119
2135
|
.subscribe((doc) => this.orderSubject.next(doc));
|
|
2120
2136
|
return this.orderSubject;
|
|
2121
2137
|
}
|
|
2122
|
-
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 }); }
|
|
2123
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: OrderService }); }
|
|
2124
2138
|
}
|
|
2125
|
-
i0.ɵɵ
|
|
2139
|
+
OrderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService, deps: [{ token: i1$1.Firestore }, { token: 'OrderRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2140
|
+
OrderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService });
|
|
2141
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService, decorators: [{
|
|
2126
2142
|
type: Injectable
|
|
2127
|
-
}], ctorParameters: ()
|
|
2143
|
+
}], ctorParameters: function () { return [{ type: i1$1.Firestore }, { type: i1$2.OrderFirestoreRepository, decorators: [{
|
|
2128
2144
|
type: Inject,
|
|
2129
2145
|
args: ['OrderRepository']
|
|
2130
|
-
}] }] });
|
|
2146
|
+
}] }]; } });
|
|
2131
2147
|
|
|
2132
2148
|
class ShippingService {
|
|
2133
2149
|
constructor(http, apiUrl, homeService) {
|
|
@@ -2205,15 +2221,15 @@ class ShippingService {
|
|
|
2205
2221
|
}
|
|
2206
2222
|
return false;
|
|
2207
2223
|
}
|
|
2208
|
-
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 }); }
|
|
2209
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: ShippingService }); }
|
|
2210
2224
|
}
|
|
2211
|
-
i0.ɵɵ
|
|
2225
|
+
ShippingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ShippingService, deps: [{ token: i1$3.HttpClient }, { token: BACKEND_URL }, { token: HomeShopService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2226
|
+
ShippingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ShippingService });
|
|
2227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ShippingService, decorators: [{
|
|
2212
2228
|
type: Injectable
|
|
2213
|
-
}], ctorParameters: ()
|
|
2229
|
+
}], ctorParameters: function () { return [{ type: i1$3.HttpClient }, { type: undefined, decorators: [{
|
|
2214
2230
|
type: Inject,
|
|
2215
2231
|
args: [BACKEND_URL]
|
|
2216
|
-
}] }, { type: HomeShopService }] });
|
|
2232
|
+
}] }, { type: HomeShopService }]; } });
|
|
2217
2233
|
|
|
2218
2234
|
class AngularConnectModule {
|
|
2219
2235
|
static initializeApp(defaultShop, options, nameOrConfig) {
|
|
@@ -2226,6 +2242,7 @@ class AngularConnectModule {
|
|
|
2226
2242
|
? OldCategoryStructureAdapter
|
|
2227
2243
|
: NewCategoryStructureAdapter,
|
|
2228
2244
|
},
|
|
2245
|
+
{ provide: PERSISTENCE_PROVIDER, useClass: options?.persistenceProvider || CookieDataPersistence },
|
|
2229
2246
|
...(isNil(defaultShop) ? [] : [{ provide: DEFAULT_SHOP, useValue: defaultShop }]),
|
|
2230
2247
|
...(isNil(options?.firebase) ? [] : [{ provide: FIREBASE_OPTIONS, useValue: options?.firebase }]),
|
|
2231
2248
|
...(isNil(options?.firebase) ? [] : [{ provide: FIREBASE_APP_NAME, useValue: nameOrConfig }]),
|
|
@@ -2236,45 +2253,45 @@ class AngularConnectModule {
|
|
|
2236
2253
|
],
|
|
2237
2254
|
};
|
|
2238
2255
|
}
|
|
2239
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularConnectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2240
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.3", ngImport: i0, type: AngularConnectModule, imports: [i1$4.FirebaseAppModule, AngularElasticSeachModule,
|
|
2241
|
-
AngularFirebaseAuthModule,
|
|
2242
|
-
AngularFirestoreModule,
|
|
2243
|
-
AngularHasuraGraphQLModule] }); }
|
|
2244
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularConnectModule, providers: [
|
|
2245
|
-
AuthService,
|
|
2246
|
-
CartService,
|
|
2247
|
-
CatalogService,
|
|
2248
|
-
CategoryService,
|
|
2249
|
-
CheckoutService,
|
|
2250
|
-
CheckoutSubscriptionService,
|
|
2251
|
-
CouponService,
|
|
2252
|
-
HomeShopService,
|
|
2253
|
-
OrderService,
|
|
2254
|
-
ShippingService,
|
|
2255
|
-
WishlistService,
|
|
2256
|
-
{
|
|
2257
|
-
provide: UpdateUserImage,
|
|
2258
|
-
useFactory: (userRepository, fileUploader) => {
|
|
2259
|
-
return new UpdateUserImage(userRepository, fileUploader);
|
|
2260
|
-
},
|
|
2261
|
-
deps: ['UserRepository', 'FileUploaderService'],
|
|
2262
|
-
},
|
|
2263
|
-
], imports: [provideFirebaseApp((injector) => {
|
|
2264
|
-
const appName = injector.get(FIREBASE_APP_NAME) || '[DEFAULT]';
|
|
2265
|
-
try {
|
|
2266
|
-
return getApp(appName);
|
|
2267
|
-
}
|
|
2268
|
-
catch (error) {
|
|
2269
|
-
return initializeApp(injector.get(FIREBASE_OPTIONS), appName);
|
|
2270
|
-
}
|
|
2271
|
-
}),
|
|
2272
|
-
AngularElasticSeachModule,
|
|
2273
|
-
AngularFirebaseAuthModule,
|
|
2274
|
-
AngularFirestoreModule,
|
|
2275
|
-
AngularHasuraGraphQLModule] }); }
|
|
2276
2256
|
}
|
|
2277
|
-
i0.ɵɵ
|
|
2257
|
+
AngularConnectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2258
|
+
AngularConnectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, imports: [i1$4.FirebaseAppModule, AngularElasticSeachModule,
|
|
2259
|
+
AngularFirebaseAuthModule,
|
|
2260
|
+
AngularFirestoreModule,
|
|
2261
|
+
AngularHasuraGraphQLModule] });
|
|
2262
|
+
AngularConnectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, providers: [
|
|
2263
|
+
AuthService,
|
|
2264
|
+
CartService,
|
|
2265
|
+
CatalogService,
|
|
2266
|
+
CategoryService,
|
|
2267
|
+
CheckoutService,
|
|
2268
|
+
CheckoutSubscriptionService,
|
|
2269
|
+
CouponService,
|
|
2270
|
+
HomeShopService,
|
|
2271
|
+
OrderService,
|
|
2272
|
+
ShippingService,
|
|
2273
|
+
WishlistService,
|
|
2274
|
+
{
|
|
2275
|
+
provide: UpdateUserImage,
|
|
2276
|
+
useFactory: (userRepository, fileUploader) => {
|
|
2277
|
+
return new UpdateUserImage(userRepository, fileUploader);
|
|
2278
|
+
},
|
|
2279
|
+
deps: ['UserRepository', 'FileUploaderService'],
|
|
2280
|
+
},
|
|
2281
|
+
], imports: [provideFirebaseApp((injector) => {
|
|
2282
|
+
const appName = injector.get(FIREBASE_APP_NAME) || '[DEFAULT]';
|
|
2283
|
+
try {
|
|
2284
|
+
return getApp(appName);
|
|
2285
|
+
}
|
|
2286
|
+
catch (error) {
|
|
2287
|
+
return initializeApp(injector.get(FIREBASE_OPTIONS), appName);
|
|
2288
|
+
}
|
|
2289
|
+
}),
|
|
2290
|
+
AngularElasticSeachModule,
|
|
2291
|
+
AngularFirebaseAuthModule,
|
|
2292
|
+
AngularFirestoreModule,
|
|
2293
|
+
AngularHasuraGraphQLModule] });
|
|
2294
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, decorators: [{
|
|
2278
2295
|
type: NgModule,
|
|
2279
2296
|
args: [{
|
|
2280
2297
|
imports: [
|
|
@@ -2319,5 +2336,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImpor
|
|
|
2319
2336
|
* Generated bundle index. Do not edit.
|
|
2320
2337
|
*/
|
|
2321
2338
|
|
|
2322
|
-
export { AngularConnectModule, AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule, AuthService, CartService, CatalogService, CategoryService, CategoryWithTree, CheckoutService, CheckoutSubscriptionService, CouponService, HomeShopService, NewCategoryStructureAdapter, OldCategoryStructureAdapter, OrderService, ProductSorts, ShippingService, UtilHelper, WishlistService };
|
|
2339
|
+
export { AngularConnectModule, AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule, AuthService, CartService, CatalogService, CategoryService, CategoryWithTree, CheckoutService, CheckoutSubscriptionService, CookieDataPersistence, CouponService, HomeShopService, NewCategoryStructureAdapter, OldCategoryStructureAdapter, OrderService, ProductSorts, ShippingService, UtilHelper, WishlistService };
|
|
2323
2340
|
//# sourceMappingURL=infrab4a-connect-angular.mjs.map
|