@infrab4a/connect-angular 4.3.0-beta.0 → 4.3.0-beta.2

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.
Files changed (59) hide show
  1. package/esm2020/angular-connect.module.mjs +97 -0
  2. package/esm2020/angular-elastic-search.module.mjs +34 -0
  3. package/esm2020/angular-firebase-auth.module.mjs +115 -0
  4. package/esm2020/angular-firestore.module.mjs +483 -0
  5. package/esm2020/angular-hasura-graphql.module.mjs +265 -0
  6. package/{esm2022 → esm2020}/services/auth.service.mjs +4 -4
  7. package/{esm2022 → esm2020}/services/cart.service.mjs +4 -4
  8. package/{esm2022 → esm2020}/services/catalog/adapters/new-category-structure.adapter.mjs +4 -4
  9. package/{esm2022 → esm2020}/services/catalog/adapters/old-category-structure.adapter.mjs +4 -4
  10. package/esm2020/services/catalog/catalog.service.mjs +163 -0
  11. package/{esm2022 → esm2020}/services/catalog/category.service.mjs +4 -4
  12. package/{esm2022 → esm2020}/services/catalog/wishlist.service.mjs +4 -4
  13. package/{esm2022 → esm2020}/services/checkout-subscription.service.mjs +4 -4
  14. package/{esm2022 → esm2020}/services/checkout.service.mjs +4 -4
  15. package/{esm2022 → esm2020}/services/coupon.service.mjs +4 -4
  16. package/{esm2022 → esm2020}/services/home-shop.service.mjs +4 -4
  17. package/{esm2022 → esm2020}/services/order.service.mjs +4 -4
  18. package/{esm2022 → esm2020}/services/shipping.service.mjs +4 -4
  19. package/fesm2015/infrab4a-connect-angular.mjs +2301 -0
  20. package/fesm2015/infrab4a-connect-angular.mjs.map +1 -0
  21. package/{fesm2022 → fesm2020}/infrab4a-connect-angular.mjs +480 -487
  22. package/fesm2020/infrab4a-connect-angular.mjs.map +1 -0
  23. package/package.json +16 -9
  24. package/esm2022/angular-connect.module.mjs +0 -97
  25. package/esm2022/angular-elastic-search.module.mjs +0 -34
  26. package/esm2022/angular-firebase-auth.module.mjs +0 -115
  27. package/esm2022/angular-firestore.module.mjs +0 -483
  28. package/esm2022/angular-hasura-graphql.module.mjs +0 -265
  29. package/esm2022/services/catalog/catalog.service.mjs +0 -170
  30. package/fesm2022/infrab4a-connect-angular.mjs.map +0 -1
  31. /package/{esm2022 → esm2020}/consts/backend-url.const.mjs +0 -0
  32. /package/{esm2022 → esm2020}/consts/category-structure.mjs +0 -0
  33. /package/{esm2022 → esm2020}/consts/default-shop.const.mjs +0 -0
  34. /package/{esm2022 → esm2020}/consts/es-config.const.mjs +0 -0
  35. /package/{esm2022 → esm2020}/consts/firebase-const.mjs +0 -0
  36. /package/{esm2022 → esm2020}/consts/hasura-options.const.mjs +0 -0
  37. /package/{esm2022 → esm2020}/consts/index.mjs +0 -0
  38. /package/{esm2022 → esm2020}/helpers/index.mjs +0 -0
  39. /package/{esm2022 → esm2020}/helpers/mobile-operation-system-checker.helper.mjs +0 -0
  40. /package/{esm2022 → esm2020}/index.mjs +0 -0
  41. /package/{esm2022 → esm2020}/infrab4a-connect-angular.mjs +0 -0
  42. /package/{esm2022 → esm2020}/services/catalog/adapters/category-structure.adapter.mjs +0 -0
  43. /package/{esm2022 → esm2020}/services/catalog/adapters/index.mjs +0 -0
  44. /package/{esm2022 → esm2020}/services/catalog/enums/index.mjs +0 -0
  45. /package/{esm2022 → esm2020}/services/catalog/enums/product-sorts.enum.mjs +0 -0
  46. /package/{esm2022 → esm2020}/services/catalog/index.mjs +0 -0
  47. /package/{esm2022 → esm2020}/services/catalog/models/category-with-tree.model.mjs +0 -0
  48. /package/{esm2022 → esm2020}/services/catalog/models/index.mjs +0 -0
  49. /package/{esm2022 → esm2020}/services/catalog/types/index.mjs +0 -0
  50. /package/{esm2022 → esm2020}/services/catalog/types/product-sort.type.mjs +0 -0
  51. /package/{esm2022 → esm2020}/services/helpers/index.mjs +0 -0
  52. /package/{esm2022 → esm2020}/services/helpers/util.helper.mjs +0 -0
  53. /package/{esm2022 → esm2020}/services/index.mjs +0 -0
  54. /package/{esm2022 → esm2020}/services/types/index.mjs +0 -0
  55. /package/{esm2022 → esm2020}/services/types/required-checkout-data.type.mjs +0 -0
  56. /package/{esm2022 → esm2020}/services/types/required-checkout-subscription-data.type.mjs +0 -0
  57. /package/{esm2022 → esm2020}/services/types/shipping-methods.type.mjs +0 -0
  58. /package/{esm2022 → esm2020}/types/firebase-app-config.type.mjs +0 -0
  59. /package/{esm2022 → esm2020}/types/index.mjs +0 -0
@@ -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: "16.0.6", ngImport: i0, type: AngularElasticSeachModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
29
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.6", ngImport: i0, type: AngularElasticSeachModule }); }
30
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AngularElasticSeachModule, providers: [
31
- {
32
- provide: ProductsIndex,
33
- useFactory: (configuration) => new ProductsIndex(new AxiosAdapter(configuration)),
34
- deps: [ES_CONFIG],
35
- },
36
- ] }); }
37
28
  }
38
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AngularElasticSeachModule, decorators: [{
29
+ AngularElasticSeachModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
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: [{
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: "16.0.6", ngImport: i0, type: AngularFirebaseAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
73
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.6", ngImport: i0, type: AngularFirebaseAuthModule, imports: [i1.AuthModule] }); }
74
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.6", 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)))] }); }
118
72
  }
119
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AngularFirebaseAuthModule, decorators: [{
73
+ AngularFirebaseAuthModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirebaseAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
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: [{
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
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AngularFirestoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
189
- static { thismod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.6", ngImport: i0, type: AngularFirestoreModule, imports: [AngularElasticSeachModule, i1$1.FirestoreModule] }); }
190
- static { thisinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.6", 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;
188
+ }
189
+ AngularFirestoreModulefac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirestoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
190
+ AngularFirestoreModulemod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularFirestoreModule, imports: [AngularElasticSeachModule, i1$1.FirestoreModule] });
191
+ AngularFirestoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirestoreModule, providers: [
192
+ {
193
+ provide: 'FirestoreOptions',
194
+ useFactory: (firestore, platformId) => ({
195
+ firestore,
196
+ interceptors: {
197
+ request: (request) => {
198
+ if (isPlatformBrowser(platformId))
201
199
  return request;
202
- },
203
- response: (response, request) => {
204
- if (isPlatformBrowser(platformId))
205
- return response;
206
- clearInterval(request.interval);
200
+ const interval = setInterval(() => { }, 100);
201
+ request.interval = interval;
202
+ return request;
203
+ },
204
+ response: (response, request) => {
205
+ if (isPlatformBrowser(platformId))
207
206
  return response;
208
- },
207
+ clearInterval(request.interval);
208
+ return response;
209
209
  },
210
- }),
211
- deps: [Firestore, PLATFORM_ID],
212
- },
213
- {
214
- provide: 'BeautyProfileRepository',
215
- useFactory: (config, userRepository) => {
216
- return new UserBeautyProfileFirestoreRepository(config, userRepository);
217
- },
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
210
  },
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: "16.0.6", ngImport: i0, type: AngularFirestoreModule, decorators: [{
211
+ }),
212
+ deps: [Firestore, PLATFORM_ID],
213
+ },
214
+ {
215
+ provide: 'BeautyProfileRepository',
216
+ useFactory: (config, userRepository) => {
217
+ return new UserBeautyProfileFirestoreRepository(config, userRepository);
218
+ },
219
+ deps: ['FirestoreOptions', 'UserRepository'],
220
+ },
221
+ {
222
+ provide: 'Buy2WinRepository',
223
+ useFactory: (options) => {
224
+ return new Buy2WinFirestoreRepository(options);
225
+ },
226
+ deps: ['FirestoreOptions'],
227
+ },
228
+ {
229
+ provide: CategoryFirestoreRepository,
230
+ useFactory: (options) => {
231
+ return new CategoryFirestoreRepository(options);
232
+ },
233
+ deps: ['FirestoreOptions'],
234
+ },
235
+ {
236
+ provide: 'CheckoutRepository',
237
+ useFactory: (options) => {
238
+ return new CheckoutFirestoreRepository(options);
239
+ },
240
+ deps: ['FirestoreOptions'],
241
+ },
242
+ {
243
+ provide: 'CheckoutSubscriptionRepository',
244
+ useFactory: (options) => {
245
+ return new CheckoutSubscriptionFirestoreRepository(options);
246
+ },
247
+ deps: ['FirestoreOptions'],
248
+ },
249
+ {
250
+ provide: 'CouponRepository',
251
+ useFactory: (options) => {
252
+ return new CouponFirestoreRepository(options);
253
+ },
254
+ deps: ['FirestoreOptions'],
255
+ },
256
+ {
257
+ provide: 'CampaignHashtagRepository',
258
+ useFactory: (options) => {
259
+ return new CampaignHashtagFirestoreRepository(options);
260
+ },
261
+ deps: ['FirestoreOptions'],
262
+ },
263
+ {
264
+ provide: 'CampaignDashboardRepository',
265
+ useFactory: (options) => {
266
+ return new CampaignDashboardFirestoreRepository(options);
267
+ },
268
+ deps: ['FirestoreOptions'],
269
+ },
270
+ {
271
+ provide: 'EditionRepository',
272
+ useFactory: (options, subscriptionRepository) => {
273
+ return new SubscriptionEditionFirestoreRepository(options, subscriptionRepository);
274
+ },
275
+ deps: ['FirestoreOptions', 'SubscriptionRepository'],
276
+ },
277
+ {
278
+ provide: 'HomeRepository',
279
+ useFactory: (options) => {
280
+ return new HomeFirestoreRepository(options);
281
+ },
282
+ deps: ['FirestoreOptions'],
283
+ },
284
+ {
285
+ provide: 'LeadRepository',
286
+ useFactory: (options) => {
287
+ return new LeadFirestoreRepository(options);
288
+ },
289
+ deps: ['FirestoreOptions'],
290
+ },
291
+ {
292
+ provide: 'LegacyOrderRepository',
293
+ useFactory: (options) => {
294
+ return new LegacyOrderFirestoreRepository(options);
295
+ },
296
+ deps: ['FirestoreOptions'],
297
+ },
298
+ {
299
+ provide: 'ShopMenuRepository',
300
+ useFactory: (options) => {
301
+ return new ShopMenuFirestoreRepository(options);
302
+ },
303
+ deps: ['FirestoreOptions'],
304
+ },
305
+ {
306
+ provide: 'OrderRepository',
307
+ useFactory: (options) => {
308
+ return new OrderFirestoreRepository(options);
309
+ },
310
+ deps: ['FirestoreOptions'],
311
+ },
312
+ {
313
+ provide: 'PaymentRepository',
314
+ useFactory: (options) => {
315
+ return new PaymentFirestoreRepository(options);
316
+ },
317
+ deps: ['FirestoreOptions'],
318
+ },
319
+ {
320
+ provide: ProductFirestoreRepository,
321
+ useFactory: (options) => {
322
+ return new ProductFirestoreRepository(options);
323
+ },
324
+ deps: ['FirestoreOptions'],
325
+ },
326
+ {
327
+ provide: 'ShopSettingsRepository',
328
+ useFactory: (options) => {
329
+ return new ShopSettingsFirestoreRepository(options);
330
+ },
331
+ deps: ['FirestoreOptions'],
332
+ },
333
+ {
334
+ provide: 'SubscriptionPaymentRepository',
335
+ useFactory: (options, subscriptionRepository) => {
336
+ return new SubscriptionPaymentFirestoreRepository(options, subscriptionRepository);
337
+ },
338
+ deps: ['FirestoreOptions', 'SubscriptionRepository'],
339
+ },
340
+ {
341
+ provide: 'SubscriptionPlanRepository',
342
+ useFactory: (options) => {
343
+ return new SubscriptionPlanFirestoreRepository(options);
344
+ },
345
+ deps: ['FirestoreOptions'],
346
+ },
347
+ {
348
+ provide: 'SubscriptionProductRepository',
349
+ useFactory: (options) => {
350
+ return new SubscriptionProductFirestoreRepository(options);
351
+ },
352
+ deps: ['FirestoreOptions'],
353
+ },
354
+ {
355
+ provide: 'SubscriptionRepository',
356
+ useFactory: (options) => {
357
+ return new SubscriptionFirestoreRepository(options);
358
+ },
359
+ deps: ['FirestoreOptions'],
360
+ },
361
+ {
362
+ provide: 'UserRepository',
363
+ useFactory: (options) => {
364
+ return new UserFirestoreRepository(options);
365
+ },
366
+ deps: ['FirestoreOptions'],
367
+ },
368
+ {
369
+ provide: 'UserAddressRepository',
370
+ useFactory: (options, userRepository) => {
371
+ return new UserAddressFirestoreRepository(options, userRepository);
372
+ },
373
+ deps: ['FirestoreOptions', 'UserRepository'],
374
+ },
375
+ {
376
+ provide: 'UserPaymentMethodRepository',
377
+ useFactory: (options, userRepository) => {
378
+ return new UserPaymentMethodFirestoreRepository(options, userRepository);
379
+ },
380
+ deps: ['FirestoreOptions', 'UserRepository'],
381
+ },
382
+ {
383
+ provide: 'SubscriptionMaterializationRepository',
384
+ useFactory: (options) => {
385
+ return new SubscriptionMaterializationFirestoreRepository(options);
386
+ },
387
+ deps: ['FirestoreOptions'],
388
+ },
389
+ {
390
+ provide: 'SubscriptionSummaryRepository',
391
+ useFactory: (options) => {
392
+ return new SubscriptionSummaryFirestoreRepository(options);
393
+ },
394
+ deps: ['FirestoreOptions'],
395
+ },
396
+ {
397
+ provide: ProductVariantFirestoreRepository,
398
+ useFactory: (options, productRepository) => {
399
+ return new ProductVariantFirestoreRepository(options, productRepository);
400
+ },
401
+ deps: ['FirestoreOptions', ProductFirestoreRepository],
402
+ },
403
+ ], imports: [AngularElasticSeachModule,
404
+ provideFirestore((injector) => {
405
+ const platformId = injector.get(PLATFORM_ID);
406
+ if (isPlatformServer(platformId))
407
+ return getFirestore(injector.get(FirebaseApp));
408
+ if (!MobileOperationSystemCheckerHelper.isAppleDevice())
409
+ return getFirestore(injector.get(FirebaseApp));
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: [{
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
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AngularHasuraGraphQLModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
658
- static { thismod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.6", ngImport: i0, type: AngularHasuraGraphQLModule }); }
659
- static { thisinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.6", 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;
657
+ }
658
+ AngularHasuraGraphQLModulefac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularHasuraGraphQLModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
659
+ AngularHasuraGraphQLModulemod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularHasuraGraphQLModule });
660
+ AngularHasuraGraphQLModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularHasuraGraphQLModule, providers: [
661
+ {
662
+ provide: 'HasuraConfig',
663
+ useFactory: (options, platformId) => ({
664
+ endpoint: options.endpoint,
665
+ authOptions: options.credentials,
666
+ interceptors: {
667
+ request: (request) => {
668
+ if (isPlatformBrowser(platformId))
671
669
  return request;
672
- },
673
- response: (response, request) => {
674
- if (isPlatformBrowser(platformId))
675
- return response;
676
- clearInterval(request.interval);
670
+ const interval = setInterval(() => { }, 100);
671
+ request.interval = interval;
672
+ return request;
673
+ },
674
+ response: (response, request) => {
675
+ if (isPlatformBrowser(platformId))
677
676
  return response;
678
- },
677
+ clearInterval(request.interval);
678
+ return response;
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);
691
- },
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
680
  },
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: "16.0.6", ngImport: i0, type: AngularHasuraGraphQLModule, decorators: [{
681
+ }),
682
+ deps: [HASURA_OPTIONS, PLATFORM_ID],
683
+ },
684
+ {
685
+ provide: 'CategoryRepository',
686
+ useExisting: CategoryHasuraGraphQLRepository,
687
+ },
688
+ {
689
+ provide: CategoryHasuraGraphQLRepository,
690
+ useFactory: (options, productRepository, categoryFilterRepository) => {
691
+ return new CategoryHasuraGraphQLRepository(options, productRepository, categoryFilterRepository);
692
+ },
693
+ deps: ['HasuraConfig', ProductHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository],
694
+ },
695
+ {
696
+ provide: 'ProductRepository',
697
+ useExisting: ProductHasuraGraphQLRepository,
698
+ },
699
+ {
700
+ provide: ProductHasuraGraphQLRepository,
701
+ useFactory: (hasuraConfig) => {
702
+ return new ProductHasuraGraphQLRepository(hasuraConfig);
703
+ },
704
+ deps: ['HasuraConfig'],
705
+ },
706
+ {
707
+ provide: 'ProductReviewsRepository',
708
+ useExisting: ProductReviewsHasuraGraphQLRepository,
709
+ },
710
+ {
711
+ provide: ProductReviewsHasuraGraphQLRepository,
712
+ useFactory: (hasuraConfig) => {
713
+ return new ProductReviewsHasuraGraphQLRepository(hasuraConfig);
714
+ },
715
+ deps: ['HasuraConfig'],
716
+ },
717
+ {
718
+ provide: 'VariantRepository',
719
+ useExisting: VariantHasuraGraphQLRepository,
720
+ },
721
+ {
722
+ provide: VariantHasuraGraphQLRepository,
723
+ useFactory: (hasuraConfig) => {
724
+ return new VariantHasuraGraphQLRepository(hasuraConfig);
725
+ },
726
+ deps: ['HasuraConfig'],
727
+ },
728
+ {
729
+ provide: 'CategoryFilterRepository',
730
+ useExisting: CategoryFilterHasuraGraphQLRepository,
731
+ },
732
+ {
733
+ provide: CategoryFilterHasuraGraphQLRepository,
734
+ useFactory: (options) => {
735
+ return new CategoryFilterHasuraGraphQLRepository(options);
736
+ },
737
+ deps: ['HasuraConfig'],
738
+ },
739
+ {
740
+ provide: 'FilterOptionRepository',
741
+ useExisting: FilterOptionHasuraGraphQLRepository,
742
+ },
743
+ {
744
+ provide: FilterOptionHasuraGraphQLRepository,
745
+ useFactory: (options) => {
746
+ return new FilterOptionHasuraGraphQLRepository(options);
747
+ },
748
+ deps: ['HasuraConfig'],
749
+ },
750
+ {
751
+ provide: 'FilterRepository',
752
+ useExisting: FilterHasuraGraphQLRepository,
753
+ },
754
+ {
755
+ provide: FilterHasuraGraphQLRepository,
756
+ useFactory: (options, filterOptionRepository, categoryFilterRepository) => {
757
+ return new FilterHasuraGraphQLRepository(options, filterOptionRepository, categoryFilterRepository);
758
+ },
759
+ deps: ['HasuraConfig', FilterOptionHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository],
760
+ },
761
+ {
762
+ provide: CategoryCollectionChildrenHasuraGraphQLRepository,
763
+ useFactory: (options) => new CategoryCollectionChildrenHasuraGraphQLRepository(options),
764
+ deps: ['HasuraConfig'],
765
+ },
766
+ {
767
+ provide: 'CategoryCollectionChildrenRepository',
768
+ useExisting: CategoryCollectionChildrenHasuraGraphQLRepository,
769
+ },
770
+ {
771
+ provide: WishlistHasuraGraphQLRepository,
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: [{
783
783
  type: NgModule,
784
784
  args: [{
785
785
  providers: [
@@ -928,10 +928,10 @@ 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: "16.0.6", 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: "16.0.6", ngImport: i0, type: AuthService }); }
933
931
  }
934
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AuthService, decorators: [{
932
+ 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 });
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: [{
935
935
  type: Injectable
936
936
  }], ctorParameters: function () { return [{ type: i1.Auth }, { type: undefined, decorators: [{
937
937
  type: Inject,
@@ -1127,10 +1127,10 @@ class CouponService {
1127
1127
  }
1128
1128
  return couponUseLimits;
1129
1129
  }
1130
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CouponService, deps: [{ token: 'CouponRepository' }, { token: DEFAULT_SHOP }, { token: 'OrderRepository' }, { token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable }); }
1131
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CouponService, providedIn: 'root' }); }
1132
1130
  }
1133
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CouponService, decorators: [{
1131
+ 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 });
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: [{
1134
1134
  type: Injectable,
1135
1135
  args: [{
1136
1136
  providedIn: 'root',
@@ -1191,10 +1191,10 @@ class CheckoutService {
1191
1191
  cookie.set('checkoutId', checkout.id);
1192
1192
  return checkout;
1193
1193
  }
1194
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CheckoutService, deps: [{ token: CouponService }, { token: 'CheckoutRepository' }, { token: 'OrderRepository' }, { token: 'UserRepository' }, { token: DEFAULT_SHOP }], target: i0.ɵɵFactoryTarget.Injectable }); }
1195
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CheckoutService }); }
1196
1194
  }
1197
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CheckoutService, decorators: [{
1195
+ CheckoutService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutService, deps: [{ token: CouponService }, { token: 'CheckoutRepository' }, { token: 'OrderRepository' }, { token: 'UserRepository' }, { token: DEFAULT_SHOP }], target: i0.ɵɵFactoryTarget.Injectable });
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: [{
1198
1198
  type: Injectable
1199
1199
  }], ctorParameters: function () { return [{ type: CouponService }, { type: undefined, decorators: [{
1200
1200
  type: Inject,
@@ -1458,10 +1458,10 @@ class CartService {
1458
1458
  });
1459
1459
  });
1460
1460
  }
1461
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CartService, deps: [{ token: AuthService }, { token: CheckoutService }, { token: DEFAULT_SHOP }, { token: 'ProductRepository' }, { token: 'CategoryRepository' }, { token: 'VariantRepository' }, { token: 'Buy2WinRepository' }], target: i0.ɵɵFactoryTarget.Injectable }); }
1462
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CartService }); }
1463
1461
  }
1464
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CartService, decorators: [{
1462
+ 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 });
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: [{
1465
1465
  type: Injectable
1466
1466
  }], ctorParameters: function () { return [{ type: AuthService }, { type: CheckoutService }, { type: i1$2.Shops, decorators: [{
1467
1467
  type: Inject,
@@ -1588,27 +1588,20 @@ class CatalogService {
1588
1588
  }
1589
1589
  async findCatalogByTermAndSortByMostRevelant(options, limits) {
1590
1590
  const productIds = await this.findCatalogIdsByElasticSearch(options.term);
1591
+ const limitedProductId = productIds.slice(limits.offset, limits.offset + limits.limit);
1592
+ const productResult = await this.productRepository.findCatalog({
1593
+ filters: { id: { operator: Where.IN, value: limitedProductId } },
1594
+ }, options?.mainGender || this.shop === Shops.MENSMARKET ? 'male' : 'female');
1591
1595
  const totalResult = await this.productRepository.findCatalog({
1592
1596
  fields: ['id'],
1593
- filters: {
1594
- id: { operator: Where.IN, value: productIds },
1595
- ...this.buildFilterQuery(options?.filters || {}),
1596
- },
1597
+ filters: { id: { operator: Where.IN, value: productIds } },
1598
+ limits: { limit: 1, offset: 0 },
1597
1599
  options: {
1598
1600
  minimal: ['price'],
1599
1601
  maximum: ['price'],
1600
1602
  distinct: ['brand'],
1601
1603
  },
1602
1604
  }, options?.mainGender || this.shop === Shops.MENSMARKET ? 'male' : 'female');
1603
- const limitedProductId = totalResult.data
1604
- .slice(limits.offset, limits.offset + limits.limit)
1605
- .map((product) => product.id);
1606
- const orderedId = productIds.filter((product) => limitedProductId.includes(product));
1607
- const productResult = await this.productRepository.findCatalog({
1608
- filters: {
1609
- id: { operator: Where.IN, value: orderedId },
1610
- },
1611
- });
1612
1605
  return {
1613
1606
  data: limitedProductId.map((id) => productResult.data.find((product) => product.id === id)).filter(Boolean),
1614
1607
  count: totalResult.count,
@@ -1629,10 +1622,10 @@ class CatalogService {
1629
1622
  return [...new Set(sorted.map(({ _source }) => _source.id))];
1630
1623
  }));
1631
1624
  }
1632
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CatalogService, deps: [{ token: 'ProductRepository' }, { token: CATEGORY_STRUCTURE }, { token: DEFAULT_SHOP }, { token: i1$2.ProductsIndex }], target: i0.ɵɵFactoryTarget.Injectable }); }
1633
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CatalogService }); }
1634
1625
  }
1635
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CatalogService, decorators: [{
1626
+ CatalogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService, deps: [{ token: 'ProductRepository' }, { token: CATEGORY_STRUCTURE }, { token: DEFAULT_SHOP }, { token: i1$2.ProductsIndex }], target: i0.ɵɵFactoryTarget.Injectable });
1627
+ CatalogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService });
1628
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService, decorators: [{
1636
1629
  type: Injectable
1637
1630
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1638
1631
  type: Inject,
@@ -1669,10 +1662,10 @@ class CategoryService {
1669
1662
  .find({ filters: { categoryId: +category.id } })
1670
1663
  .then(({ data }) => data.map((categoryFilter) => categoryFilter.filter));
1671
1664
  }
1672
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CategoryService, deps: [{ token: 'ProductRepository' }, { token: 'CategoryRepository' }, { token: 'CategoryFilterRepository' }, { token: CATEGORY_STRUCTURE }, { token: DEFAULT_SHOP }], target: i0.ɵɵFactoryTarget.Injectable }); }
1673
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CategoryService }); }
1674
1665
  }
1675
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CategoryService, decorators: [{
1666
+ 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 });
1667
+ CategoryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryService });
1668
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryService, decorators: [{
1676
1669
  type: Injectable
1677
1670
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1678
1671
  type: Inject,
@@ -1737,10 +1730,10 @@ class NewCategoryStructureAdapter {
1737
1730
  ? this.categoryRepository.get({ id: category.id })
1738
1731
  : category;
1739
1732
  }
1740
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: NewCategoryStructureAdapter, deps: [{ token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable }); }
1741
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: NewCategoryStructureAdapter }); }
1742
1733
  }
1743
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: NewCategoryStructureAdapter, decorators: [{
1734
+ NewCategoryStructureAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: NewCategoryStructureAdapter, deps: [{ token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
1735
+ NewCategoryStructureAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: NewCategoryStructureAdapter });
1736
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: NewCategoryStructureAdapter, decorators: [{
1744
1737
  type: Injectable
1745
1738
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1746
1739
  type: Inject,
@@ -1757,10 +1750,10 @@ class OldCategoryStructureAdapter {
1757
1750
  : await this.categoryRepository.get({ id: category.id }).then((categoryFound) => categoryFound.products);
1758
1751
  return { id: { operator: Where.IN, value: productsIds } };
1759
1752
  }
1760
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: OldCategoryStructureAdapter, deps: [{ token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable }); }
1761
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: OldCategoryStructureAdapter }); }
1762
1753
  }
1763
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: OldCategoryStructureAdapter, decorators: [{
1754
+ OldCategoryStructureAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OldCategoryStructureAdapter, deps: [{ token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
1755
+ OldCategoryStructureAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OldCategoryStructureAdapter });
1756
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OldCategoryStructureAdapter, decorators: [{
1764
1757
  type: Injectable
1765
1758
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1766
1759
  type: Inject,
@@ -1847,10 +1840,10 @@ class WishlistService {
1847
1840
  }
1848
1841
  return wishlist;
1849
1842
  }
1850
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: WishlistService, deps: [{ token: 'WishlistRepository' }, { token: DEFAULT_SHOP }, { token: 'ProductRepository' }, { token: 'CategoryFilterRepository' }, { token: i1$2.ProductsIndex }], target: i0.ɵɵFactoryTarget.Injectable }); }
1851
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: WishlistService }); }
1852
1843
  }
1853
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: WishlistService, decorators: [{
1844
+ WishlistService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, deps: [{ token: 'WishlistRepository' }, { token: DEFAULT_SHOP }, { token: 'ProductRepository' }, { token: 'CategoryFilterRepository' }, { token: i1$2.ProductsIndex }], target: i0.ɵɵFactoryTarget.Injectable });
1845
+ WishlistService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService });
1846
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, decorators: [{
1854
1847
  type: Injectable
1855
1848
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1856
1849
  type: Inject,
@@ -1898,10 +1891,10 @@ class CheckoutSubscriptionService {
1898
1891
  calcDiscountSubscription(coupon) {
1899
1892
  return this.getCheckoutSubscription().pipe(concatMap((checkout) => this.couponService.calcDiscountSubscription(coupon, checkout).pipe()));
1900
1893
  }
1901
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CheckoutSubscriptionService, deps: [{ token: 'CheckoutSubscriptionRepository' }, { token: 'SubscriptionRepository' }, { token: CouponService }], target: i0.ɵɵFactoryTarget.Injectable }); }
1902
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CheckoutSubscriptionService }); }
1903
1894
  }
1904
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: CheckoutSubscriptionService, decorators: [{
1895
+ CheckoutSubscriptionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutSubscriptionService, deps: [{ token: 'CheckoutSubscriptionRepository' }, { token: 'SubscriptionRepository' }, { token: CouponService }], target: i0.ɵɵFactoryTarget.Injectable });
1896
+ CheckoutSubscriptionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutSubscriptionService });
1897
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutSubscriptionService, decorators: [{
1905
1898
  type: Injectable
1906
1899
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1907
1900
  type: Inject,
@@ -2017,10 +2010,10 @@ class HomeShopService {
2017
2010
  data,
2018
2011
  })).pipe(tap(() => (this.homeConfiguration.data = data)), map(() => this.homeConfiguration));
2019
2012
  }
2020
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: HomeShopService, deps: [{ token: 'CategoryRepository' }, { token: 'HomeRepository' }, { token: 'ProductRepository' }, { token: DEFAULT_SHOP }], target: i0.ɵɵFactoryTarget.Injectable }); }
2021
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: HomeShopService }); }
2022
2013
  }
2023
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: HomeShopService, decorators: [{
2014
+ 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 });
2015
+ HomeShopService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: HomeShopService });
2016
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: HomeShopService, decorators: [{
2024
2017
  type: Injectable
2025
2018
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
2026
2019
  type: Inject,
@@ -2048,10 +2041,10 @@ class OrderService {
2048
2041
  .subscribe((doc) => this.orderSubject.next(doc));
2049
2042
  return this.orderSubject;
2050
2043
  }
2051
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: OrderService, deps: [{ token: i1$1.Firestore }, { token: 'OrderRepository' }], target: i0.ɵɵFactoryTarget.Injectable }); }
2052
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: OrderService }); }
2053
2044
  }
2054
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: OrderService, decorators: [{
2045
+ 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 });
2046
+ OrderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService });
2047
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService, decorators: [{
2055
2048
  type: Injectable
2056
2049
  }], ctorParameters: function () { return [{ type: i1$1.Firestore }, { type: i1$2.OrderFirestoreRepository, decorators: [{
2057
2050
  type: Inject,
@@ -2134,10 +2127,10 @@ class ShippingService {
2134
2127
  }
2135
2128
  return false;
2136
2129
  }
2137
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: ShippingService, deps: [{ token: i1$3.HttpClient }, { token: BACKEND_URL }, { token: HomeShopService }], target: i0.ɵɵFactoryTarget.Injectable }); }
2138
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: ShippingService }); }
2139
2130
  }
2140
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: ShippingService, decorators: [{
2131
+ 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 });
2132
+ ShippingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ShippingService });
2133
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ShippingService, decorators: [{
2141
2134
  type: Injectable
2142
2135
  }], ctorParameters: function () { return [{ type: i1$3.HttpClient }, { type: undefined, decorators: [{
2143
2136
  type: Inject,
@@ -2164,38 +2157,38 @@ class AngularConnectModule {
2164
2157
  ],
2165
2158
  };
2166
2159
  }
2167
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AngularConnectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2168
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.6", ngImport: i0, type: AngularConnectModule, imports: [i1$4.FirebaseAppModule, AngularElasticSeachModule,
2169
- AngularFirebaseAuthModule,
2170
- AngularFirestoreModule,
2171
- AngularHasuraGraphQLModule] }); }
2172
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AngularConnectModule, providers: [
2173
- AuthService,
2174
- CartService,
2175
- CatalogService,
2176
- CategoryService,
2177
- CheckoutService,
2178
- CheckoutSubscriptionService,
2179
- CouponService,
2180
- HomeShopService,
2181
- OrderService,
2182
- ShippingService,
2183
- WishlistService,
2184
- ], imports: [provideFirebaseApp((injector) => {
2185
- const appName = injector.get(FIREBASE_APP_NAME) || '[DEFAULT]';
2186
- try {
2187
- return getApp(appName);
2188
- }
2189
- catch (error) {
2190
- return initializeApp(injector.get(FIREBASE_OPTIONS), appName);
2191
- }
2192
- }),
2193
- AngularElasticSeachModule,
2194
- AngularFirebaseAuthModule,
2195
- AngularFirestoreModule,
2196
- AngularHasuraGraphQLModule] }); }
2197
2160
  }
2198
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AngularConnectModule, decorators: [{
2161
+ AngularConnectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2162
+ AngularConnectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, imports: [i1$4.FirebaseAppModule, AngularElasticSeachModule,
2163
+ AngularFirebaseAuthModule,
2164
+ AngularFirestoreModule,
2165
+ AngularHasuraGraphQLModule] });
2166
+ AngularConnectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, providers: [
2167
+ AuthService,
2168
+ CartService,
2169
+ CatalogService,
2170
+ CategoryService,
2171
+ CheckoutService,
2172
+ CheckoutSubscriptionService,
2173
+ CouponService,
2174
+ HomeShopService,
2175
+ OrderService,
2176
+ ShippingService,
2177
+ WishlistService,
2178
+ ], imports: [provideFirebaseApp((injector) => {
2179
+ const appName = injector.get(FIREBASE_APP_NAME) || '[DEFAULT]';
2180
+ try {
2181
+ return getApp(appName);
2182
+ }
2183
+ catch (error) {
2184
+ return initializeApp(injector.get(FIREBASE_OPTIONS), appName);
2185
+ }
2186
+ }),
2187
+ AngularElasticSeachModule,
2188
+ AngularFirebaseAuthModule,
2189
+ AngularFirestoreModule,
2190
+ AngularHasuraGraphQLModule] });
2191
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, decorators: [{
2199
2192
  type: NgModule,
2200
2193
  args: [{
2201
2194
  imports: [