@infrab4a/connect-angular 5.0.0-beta.17 → 5.0.0-beta.18

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 (69) hide show
  1. package/esm2022/angular-connect.module.mjs +115 -0
  2. package/esm2022/angular-elastic-search.module.mjs +34 -0
  3. package/esm2022/angular-firebase-auth.module.mjs +115 -0
  4. package/esm2022/angular-firestore.module.mjs +504 -0
  5. package/esm2022/angular-hasura-graphql.module.mjs +265 -0
  6. package/{esm2020 → esm2022}/persistence/cookie-data-persistence.mjs +4 -4
  7. package/{esm2020 → esm2022}/services/auth.service.mjs +6 -6
  8. package/esm2022/services/cart.service.mjs +282 -0
  9. package/{esm2020 → esm2022}/services/catalog/adapters/new-category-structure.adapter.mjs +6 -6
  10. package/{esm2020 → esm2022}/services/catalog/adapters/old-category-structure.adapter.mjs +6 -6
  11. package/{esm2020 → esm2022}/services/catalog/catalog.service.mjs +6 -6
  12. package/{esm2020 → esm2022}/services/catalog/category.service.mjs +6 -6
  13. package/{esm2020 → esm2022}/services/catalog/models/category-with-tree.model.mjs +1 -1
  14. package/esm2022/services/catalog/wishlist.service.mjs +116 -0
  15. package/{esm2020 → esm2022}/services/checkout-subscription.service.mjs +6 -6
  16. package/{esm2020 → esm2022}/services/checkout.service.mjs +6 -6
  17. package/esm2022/services/coupon.service.mjs +260 -0
  18. package/{esm2020 → esm2022}/services/home-shop.service.mjs +6 -6
  19. package/{esm2020 → esm2022}/services/order.service.mjs +6 -6
  20. package/{esm2020 → esm2022}/services/shipping.service.mjs +6 -6
  21. package/{fesm2020 → fesm2022}/infrab4a-connect-angular.mjs +556 -529
  22. package/fesm2022/infrab4a-connect-angular.mjs.map +1 -0
  23. package/package.json +6 -12
  24. package/services/catalog/wishlist.service.d.ts +4 -2
  25. package/services/checkout.service.d.ts +4 -1
  26. package/services/coupon.service.d.ts +6 -2
  27. package/esm2020/angular-connect.module.mjs +0 -115
  28. package/esm2020/angular-elastic-search.module.mjs +0 -34
  29. package/esm2020/angular-firebase-auth.module.mjs +0 -115
  30. package/esm2020/angular-firestore.module.mjs +0 -504
  31. package/esm2020/angular-hasura-graphql.module.mjs +0 -265
  32. package/esm2020/services/cart.service.mjs +0 -281
  33. package/esm2020/services/catalog/wishlist.service.mjs +0 -115
  34. package/esm2020/services/coupon.service.mjs +0 -235
  35. package/fesm2015/infrab4a-connect-angular.mjs +0 -2417
  36. package/fesm2015/infrab4a-connect-angular.mjs.map +0 -1
  37. package/fesm2020/infrab4a-connect-angular.mjs.map +0 -1
  38. /package/{esm2020 → esm2022}/consts/backend-url.const.mjs +0 -0
  39. /package/{esm2020 → esm2022}/consts/category-structure.mjs +0 -0
  40. /package/{esm2020 → esm2022}/consts/default-shop.const.mjs +0 -0
  41. /package/{esm2020 → esm2022}/consts/es-config.const.mjs +0 -0
  42. /package/{esm2020 → esm2022}/consts/firebase-const.mjs +0 -0
  43. /package/{esm2020 → esm2022}/consts/hasura-options.const.mjs +0 -0
  44. /package/{esm2020 → esm2022}/consts/index.mjs +0 -0
  45. /package/{esm2020 → esm2022}/consts/persistence.const.mjs +0 -0
  46. /package/{esm2020 → esm2022}/consts/storage-base-url.const.mjs +0 -0
  47. /package/{esm2020 → esm2022}/helpers/index.mjs +0 -0
  48. /package/{esm2020 → esm2022}/helpers/mobile-operation-system-checker.helper.mjs +0 -0
  49. /package/{esm2020 → esm2022}/index.mjs +0 -0
  50. /package/{esm2020 → esm2022}/infrab4a-connect-angular.mjs +0 -0
  51. /package/{esm2020 → esm2022}/persistence/data-persistence.mjs +0 -0
  52. /package/{esm2020 → esm2022}/persistence/index.mjs +0 -0
  53. /package/{esm2020 → esm2022}/services/catalog/adapters/category-structure.adapter.mjs +0 -0
  54. /package/{esm2020 → esm2022}/services/catalog/adapters/index.mjs +0 -0
  55. /package/{esm2020 → esm2022}/services/catalog/enums/index.mjs +0 -0
  56. /package/{esm2020 → esm2022}/services/catalog/enums/product-sorts.enum.mjs +0 -0
  57. /package/{esm2020 → esm2022}/services/catalog/index.mjs +0 -0
  58. /package/{esm2020 → esm2022}/services/catalog/models/index.mjs +0 -0
  59. /package/{esm2020 → esm2022}/services/catalog/types/index.mjs +0 -0
  60. /package/{esm2020 → esm2022}/services/catalog/types/product-sort.type.mjs +0 -0
  61. /package/{esm2020 → esm2022}/services/helpers/index.mjs +0 -0
  62. /package/{esm2020 → esm2022}/services/helpers/util.helper.mjs +0 -0
  63. /package/{esm2020 → esm2022}/services/index.mjs +0 -0
  64. /package/{esm2020 → esm2022}/services/types/index.mjs +0 -0
  65. /package/{esm2020 → esm2022}/services/types/required-checkout-data.type.mjs +0 -0
  66. /package/{esm2020 → esm2022}/services/types/required-checkout-subscription-data.type.mjs +0 -0
  67. /package/{esm2020 → esm2022}/services/types/shipping-methods.type.mjs +0 -0
  68. /package/{esm2020 → esm2022}/types/firebase-app-config.type.mjs +0 -0
  69. /package/{esm2020 → esm2022}/types/index.mjs +0 -0
@@ -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
+ ] }); }
30
39
  }
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: [{
40
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularElasticSeachModule, decorators: [{
41
41
  type: NgModule,
42
42
  args: [{
43
43
  providers: [
@@ -73,54 +73,54 @@ class AngularFirebaseAuthModule {
73
73
  ],
74
74
  };
75
75
  }
76
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularFirebaseAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
77
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.3", ngImport: i0, type: AngularFirebaseAuthModule, imports: [i1.AuthModule] }); }
78
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularFirebaseAuthModule, providers: [
79
+ {
80
+ provide: 'Authentication',
81
+ useFactory: (authenticationService, userRepository) => {
82
+ return new Authentication(authenticationService, userRepository);
83
+ },
84
+ deps: ['AuthenticationService', 'UserRepository'],
85
+ },
86
+ {
87
+ provide: 'AuthenticationService',
88
+ useFactory: (angularFireAuth) => {
89
+ return new AuthenticationFirebaseAuthService(angularFireAuth);
90
+ },
91
+ deps: [Auth],
92
+ },
93
+ {
94
+ provide: 'Register',
95
+ useFactory: (registerService, userRepository) => {
96
+ return new Register(registerService, userRepository);
97
+ },
98
+ deps: ['RegisterService', 'UserRepository'],
99
+ },
100
+ {
101
+ provide: 'RegisterService',
102
+ useFactory: (angularFireAuth) => {
103
+ return new RegisterFirebaseAuthService(angularFireAuth);
104
+ },
105
+ deps: [Auth],
106
+ },
107
+ {
108
+ provide: 'SignOut',
109
+ useFactory: (authenticationService) => {
110
+ return new SignOut(authenticationService);
111
+ },
112
+ deps: ['AuthenticationService'],
113
+ },
114
+ {
115
+ provide: 'RecoveryPassword',
116
+ useFactory: (authenticationService) => {
117
+ return new RecoveryPassword(authenticationService);
118
+ },
119
+ deps: ['AuthenticationService'],
120
+ },
121
+ ], imports: [provideAuth((injector) => getAuth(injector.get(FirebaseApp)))] }); }
76
122
  }
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: [{
123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularFirebaseAuthModule, decorators: [{
124
124
  type: NgModule,
125
125
  args: [{
126
126
  imports: [provideAuth((injector) => getAuth(injector.get(FirebaseApp)))],
@@ -191,244 +191,244 @@ class AngularFirestoreModule {
191
191
  ],
192
192
  };
193
193
  }
194
- }
195
- AngularFirestoreModulefac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirestoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
196
- AngularFirestoreModulemod = 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: new ConnectFirestoreService(firestore),
202
- interceptors: {
203
- request: (request) => {
204
- if (isPlatformBrowser(platformId))
194
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularFirestoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
195
+ static { thismod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.3", ngImport: i0, type: AngularFirestoreModule, imports: [AngularElasticSeachModule, i1$1.FirestoreModule, i2.StorageModule] }); }
196
+ static { thisinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularFirestoreModule, providers: [
197
+ {
198
+ provide: 'FirestoreOptions',
199
+ useFactory: (firestore, platformId) => ({
200
+ firestore: new ConnectFirestoreService(firestore),
201
+ interceptors: {
202
+ request: (request) => {
203
+ if (isPlatformBrowser(platformId))
204
+ return request;
205
+ const interval = setInterval(() => { }, 100);
206
+ request.interval = interval;
205
207
  return request;
206
- const interval = setInterval(() => { }, 100);
207
- request.interval = interval;
208
- return request;
209
- },
210
- response: (response, request) => {
211
- if (isPlatformBrowser(platformId))
208
+ },
209
+ response: (response, request) => {
210
+ if (isPlatformBrowser(platformId))
211
+ return response;
212
+ clearInterval(request.interval);
212
213
  return response;
213
- clearInterval(request.interval);
214
- return response;
214
+ },
215
215
  },
216
+ }),
217
+ deps: [Firestore, PLATFORM_ID],
218
+ },
219
+ {
220
+ provide: 'BeautyProfileRepository',
221
+ useFactory: (config, userRepository) => {
222
+ return new UserBeautyProfileFirestoreRepository(config, userRepository);
216
223
  },
217
- }),
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) || !MobileOperationSystemCheckerHelper.isAppleDevice())
420
- return initializeFirestore(injector.get(FirebaseApp), {
224
+ deps: ['FirestoreOptions', 'UserRepository'],
225
+ },
226
+ {
227
+ provide: 'Buy2WinRepository',
228
+ useFactory: (options) => {
229
+ return new Buy2WinFirestoreRepository(options);
230
+ },
231
+ deps: ['FirestoreOptions'],
232
+ },
233
+ {
234
+ provide: CategoryFirestoreRepository,
235
+ useFactory: (options) => {
236
+ return new CategoryFirestoreRepository(options);
237
+ },
238
+ deps: ['FirestoreOptions'],
239
+ },
240
+ {
241
+ provide: 'CheckoutRepository',
242
+ useFactory: (options) => {
243
+ return new CheckoutFirestoreRepository(options);
244
+ },
245
+ deps: ['FirestoreOptions'],
246
+ },
247
+ {
248
+ provide: 'CheckoutSubscriptionRepository',
249
+ useFactory: (options) => {
250
+ return new CheckoutSubscriptionFirestoreRepository(options);
251
+ },
252
+ deps: ['FirestoreOptions'],
253
+ },
254
+ {
255
+ provide: 'CouponRepository',
256
+ useFactory: (options) => {
257
+ return new CouponFirestoreRepository(options);
258
+ },
259
+ deps: ['FirestoreOptions'],
260
+ },
261
+ {
262
+ provide: 'CampaignHashtagRepository',
263
+ useFactory: (options) => {
264
+ return new CampaignHashtagFirestoreRepository(options);
265
+ },
266
+ deps: ['FirestoreOptions'],
267
+ },
268
+ {
269
+ provide: 'CampaignDashboardRepository',
270
+ useFactory: (options) => {
271
+ return new CampaignDashboardFirestoreRepository(options);
272
+ },
273
+ deps: ['FirestoreOptions'],
274
+ },
275
+ {
276
+ provide: 'EditionRepository',
277
+ useFactory: (options, subscriptionRepository) => {
278
+ return new SubscriptionEditionFirestoreRepository(options, subscriptionRepository);
279
+ },
280
+ deps: ['FirestoreOptions', 'SubscriptionRepository'],
281
+ },
282
+ {
283
+ provide: 'HomeRepository',
284
+ useFactory: (options) => {
285
+ return new HomeFirestoreRepository(options);
286
+ },
287
+ deps: ['FirestoreOptions'],
288
+ },
289
+ {
290
+ provide: 'LeadRepository',
291
+ useFactory: (options) => {
292
+ return new LeadFirestoreRepository(options);
293
+ },
294
+ deps: ['FirestoreOptions'],
295
+ },
296
+ {
297
+ provide: 'LegacyOrderRepository',
298
+ useFactory: (options) => {
299
+ return new LegacyOrderFirestoreRepository(options);
300
+ },
301
+ deps: ['FirestoreOptions'],
302
+ },
303
+ {
304
+ provide: 'ShopMenuRepository',
305
+ useFactory: (options) => {
306
+ return new ShopMenuFirestoreRepository(options);
307
+ },
308
+ deps: ['FirestoreOptions'],
309
+ },
310
+ {
311
+ provide: 'OrderRepository',
312
+ useFactory: (options) => {
313
+ return new OrderFirestoreRepository(options);
314
+ },
315
+ deps: ['FirestoreOptions'],
316
+ },
317
+ {
318
+ provide: 'PaymentRepository',
319
+ useFactory: (options) => {
320
+ return new PaymentFirestoreRepository(options);
321
+ },
322
+ deps: ['FirestoreOptions'],
323
+ },
324
+ {
325
+ provide: ProductFirestoreRepository,
326
+ useFactory: (options) => {
327
+ return new ProductFirestoreRepository(options);
328
+ },
329
+ deps: ['FirestoreOptions'],
330
+ },
331
+ {
332
+ provide: 'ShopSettingsRepository',
333
+ useFactory: (options) => {
334
+ return new ShopSettingsFirestoreRepository(options);
335
+ },
336
+ deps: ['FirestoreOptions'],
337
+ },
338
+ {
339
+ provide: 'SubscriptionPaymentRepository',
340
+ useFactory: (options, subscriptionRepository) => {
341
+ return new SubscriptionPaymentFirestoreRepository(options, subscriptionRepository);
342
+ },
343
+ deps: ['FirestoreOptions', 'SubscriptionRepository'],
344
+ },
345
+ {
346
+ provide: 'SubscriptionPlanRepository',
347
+ useFactory: (options) => {
348
+ return new SubscriptionPlanFirestoreRepository(options);
349
+ },
350
+ deps: ['FirestoreOptions'],
351
+ },
352
+ {
353
+ provide: 'SubscriptionProductRepository',
354
+ useFactory: (options) => {
355
+ return new SubscriptionProductFirestoreRepository(options);
356
+ },
357
+ deps: ['FirestoreOptions'],
358
+ },
359
+ {
360
+ provide: 'SubscriptionRepository',
361
+ useFactory: (options) => {
362
+ return new SubscriptionFirestoreRepository(options);
363
+ },
364
+ deps: ['FirestoreOptions'],
365
+ },
366
+ {
367
+ provide: 'UserRepository',
368
+ useFactory: (options) => {
369
+ return new UserFirestoreRepository(options);
370
+ },
371
+ deps: ['FirestoreOptions'],
372
+ },
373
+ {
374
+ provide: 'UserAddressRepository',
375
+ useFactory: (options, userRepository) => {
376
+ return new UserAddressFirestoreRepository(options, userRepository);
377
+ },
378
+ deps: ['FirestoreOptions', 'UserRepository'],
379
+ },
380
+ {
381
+ provide: 'UserPaymentMethodRepository',
382
+ useFactory: (options, userRepository) => {
383
+ return new UserPaymentMethodFirestoreRepository(options, userRepository);
384
+ },
385
+ deps: ['FirestoreOptions', 'UserRepository'],
386
+ },
387
+ {
388
+ provide: 'SubscriptionMaterializationRepository',
389
+ useFactory: (options) => {
390
+ return new SubscriptionMaterializationFirestoreRepository(options);
391
+ },
392
+ deps: ['FirestoreOptions'],
393
+ },
394
+ {
395
+ provide: 'SubscriptionSummaryRepository',
396
+ useFactory: (options) => {
397
+ return new SubscriptionSummaryFirestoreRepository(options);
398
+ },
399
+ deps: ['FirestoreOptions'],
400
+ },
401
+ {
402
+ provide: ProductVariantFirestoreRepository,
403
+ useFactory: (options, productRepository) => {
404
+ return new ProductVariantFirestoreRepository(options, productRepository);
405
+ },
406
+ deps: ['FirestoreOptions', ProductFirestoreRepository],
407
+ },
408
+ {
409
+ provide: 'FileUploaderService',
410
+ useFactory: (storage, baseUrl) => {
411
+ return new FirebaseFileUploaderService(storage, baseUrl);
412
+ },
413
+ deps: [Storage, STORAGE_BASE_URL],
414
+ },
415
+ ], imports: [AngularElasticSeachModule,
416
+ provideFirestore((injector) => {
417
+ const platformId = injector.get(PLATFORM_ID);
418
+ if (isPlatformServer(platformId) || !MobileOperationSystemCheckerHelper.isAppleDevice())
419
+ return initializeFirestore(injector.get(FirebaseApp), {
420
+ ignoreUndefinedProperties: true,
421
+ });
422
+ const firestore = initializeFirestore(injector.get(FirebaseApp), {
423
+ experimentalForceLongPolling: true,
421
424
  ignoreUndefinedProperties: true,
425
+ localCache: memoryLocalCache(),
422
426
  });
423
- const firestore = initializeFirestore(injector.get(FirebaseApp), {
424
- experimentalForceLongPolling: true,
425
- ignoreUndefinedProperties: true,
426
- localCache: memoryLocalCache(),
427
- });
428
- return firestore;
429
- }),
430
- provideStorage(() => getStorage())] });
431
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirestoreModule, decorators: [{
427
+ return firestore;
428
+ }),
429
+ provideStorage(() => getStorage())] }); }
430
+ }
431
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularFirestoreModule, decorators: [{
432
432
  type: NgModule,
433
433
  args: [{
434
434
  imports: [
@@ -678,132 +678,132 @@ class AngularHasuraGraphQLModule {
678
678
  providers: [{ provide: HASURA_OPTIONS, useValue: options }],
679
679
  };
680
680
  }
681
- }
682
- AngularHasuraGraphQLModulefac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularHasuraGraphQLModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
683
- AngularHasuraGraphQLModulemod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularHasuraGraphQLModule });
684
- AngularHasuraGraphQLModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularHasuraGraphQLModule, providers: [
685
- {
686
- provide: 'HasuraConfig',
687
- useFactory: (options, platformId) => ({
688
- endpoint: options.endpoint,
689
- authOptions: options.credentials,
690
- interceptors: {
691
- request: (request) => {
692
- if (isPlatformBrowser(platformId))
681
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularHasuraGraphQLModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
682
+ static { thismod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.3", ngImport: i0, type: AngularHasuraGraphQLModule }); }
683
+ static { thisinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularHasuraGraphQLModule, providers: [
684
+ {
685
+ provide: 'HasuraConfig',
686
+ useFactory: (options, platformId) => ({
687
+ endpoint: options.endpoint,
688
+ authOptions: options.credentials,
689
+ interceptors: {
690
+ request: (request) => {
691
+ if (isPlatformBrowser(platformId))
692
+ return request;
693
+ const interval = setInterval(() => { }, 100);
694
+ request.interval = interval;
693
695
  return request;
694
- const interval = setInterval(() => { }, 100);
695
- request.interval = interval;
696
- return request;
697
- },
698
- response: (response, request) => {
699
- if (isPlatformBrowser(platformId))
696
+ },
697
+ response: (response, request) => {
698
+ if (isPlatformBrowser(platformId))
699
+ return response;
700
+ clearInterval(request.interval);
700
701
  return response;
701
- clearInterval(request.interval);
702
- return response;
702
+ },
703
703
  },
704
+ }),
705
+ deps: [HASURA_OPTIONS, PLATFORM_ID],
706
+ },
707
+ {
708
+ provide: 'CategoryRepository',
709
+ useExisting: CategoryHasuraGraphQLRepository,
710
+ },
711
+ {
712
+ provide: CategoryHasuraGraphQLRepository,
713
+ useFactory: (options, productRepository, categoryFilterRepository) => {
714
+ return new CategoryHasuraGraphQLRepository(options, productRepository, categoryFilterRepository);
704
715
  },
705
- }),
706
- deps: [HASURA_OPTIONS, PLATFORM_ID],
707
- },
708
- {
709
- provide: 'CategoryRepository',
710
- useExisting: CategoryHasuraGraphQLRepository,
711
- },
712
- {
713
- provide: CategoryHasuraGraphQLRepository,
714
- useFactory: (options, productRepository, categoryFilterRepository) => {
715
- return new CategoryHasuraGraphQLRepository(options, productRepository, categoryFilterRepository);
716
- },
717
- deps: ['HasuraConfig', ProductHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository],
718
- },
719
- {
720
- provide: 'ProductRepository',
721
- useExisting: ProductHasuraGraphQLRepository,
722
- },
723
- {
724
- provide: ProductHasuraGraphQLRepository,
725
- useFactory: (hasuraConfig) => {
726
- return new ProductHasuraGraphQLRepository(hasuraConfig);
727
- },
728
- deps: ['HasuraConfig'],
729
- },
730
- {
731
- provide: 'ProductReviewsRepository',
732
- useExisting: ProductReviewsHasuraGraphQLRepository,
733
- },
734
- {
735
- provide: ProductReviewsHasuraGraphQLRepository,
736
- useFactory: (hasuraConfig) => {
737
- return new ProductReviewsHasuraGraphQLRepository(hasuraConfig);
738
- },
739
- deps: ['HasuraConfig'],
740
- },
741
- {
742
- provide: 'VariantRepository',
743
- useExisting: VariantHasuraGraphQLRepository,
744
- },
745
- {
746
- provide: VariantHasuraGraphQLRepository,
747
- useFactory: (hasuraConfig) => {
748
- return new VariantHasuraGraphQLRepository(hasuraConfig);
749
- },
750
- deps: ['HasuraConfig'],
751
- },
752
- {
753
- provide: 'CategoryFilterRepository',
754
- useExisting: CategoryFilterHasuraGraphQLRepository,
755
- },
756
- {
757
- provide: CategoryFilterHasuraGraphQLRepository,
758
- useFactory: (options) => {
759
- return new CategoryFilterHasuraGraphQLRepository(options);
760
- },
761
- deps: ['HasuraConfig'],
762
- },
763
- {
764
- provide: 'FilterOptionRepository',
765
- useExisting: FilterOptionHasuraGraphQLRepository,
766
- },
767
- {
768
- provide: FilterOptionHasuraGraphQLRepository,
769
- useFactory: (options) => {
770
- return new FilterOptionHasuraGraphQLRepository(options);
771
- },
772
- deps: ['HasuraConfig'],
773
- },
774
- {
775
- provide: 'FilterRepository',
776
- useExisting: FilterHasuraGraphQLRepository,
777
- },
778
- {
779
- provide: FilterHasuraGraphQLRepository,
780
- useFactory: (options, filterOptionRepository, categoryFilterRepository) => {
781
- return new FilterHasuraGraphQLRepository(options, filterOptionRepository, categoryFilterRepository);
782
- },
783
- deps: ['HasuraConfig', FilterOptionHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository],
784
- },
785
- {
786
- provide: CategoryCollectionChildrenHasuraGraphQLRepository,
787
- useFactory: (options) => new CategoryCollectionChildrenHasuraGraphQLRepository(options),
788
- deps: ['HasuraConfig'],
789
- },
790
- {
791
- provide: 'CategoryCollectionChildrenRepository',
792
- useExisting: CategoryCollectionChildrenHasuraGraphQLRepository,
793
- },
794
- {
795
- provide: WishlistHasuraGraphQLRepository,
796
- useFactory: (options, categoryFilterRepository) => {
797
- return new WishlistHasuraGraphQLRepository(options, categoryFilterRepository);
798
- },
799
- deps: ['HasuraConfig', CategoryFilterHasuraGraphQLRepository],
800
- },
801
- {
802
- provide: 'WishlistRepository',
803
- useExisting: WishlistHasuraGraphQLRepository,
804
- },
805
- ] });
806
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularHasuraGraphQLModule, decorators: [{
716
+ deps: ['HasuraConfig', ProductHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository],
717
+ },
718
+ {
719
+ provide: 'ProductRepository',
720
+ useExisting: ProductHasuraGraphQLRepository,
721
+ },
722
+ {
723
+ provide: ProductHasuraGraphQLRepository,
724
+ useFactory: (hasuraConfig) => {
725
+ return new ProductHasuraGraphQLRepository(hasuraConfig);
726
+ },
727
+ deps: ['HasuraConfig'],
728
+ },
729
+ {
730
+ provide: 'ProductReviewsRepository',
731
+ useExisting: ProductReviewsHasuraGraphQLRepository,
732
+ },
733
+ {
734
+ provide: ProductReviewsHasuraGraphQLRepository,
735
+ useFactory: (hasuraConfig) => {
736
+ return new ProductReviewsHasuraGraphQLRepository(hasuraConfig);
737
+ },
738
+ deps: ['HasuraConfig'],
739
+ },
740
+ {
741
+ provide: 'VariantRepository',
742
+ useExisting: VariantHasuraGraphQLRepository,
743
+ },
744
+ {
745
+ provide: VariantHasuraGraphQLRepository,
746
+ useFactory: (hasuraConfig) => {
747
+ return new VariantHasuraGraphQLRepository(hasuraConfig);
748
+ },
749
+ deps: ['HasuraConfig'],
750
+ },
751
+ {
752
+ provide: 'CategoryFilterRepository',
753
+ useExisting: CategoryFilterHasuraGraphQLRepository,
754
+ },
755
+ {
756
+ provide: CategoryFilterHasuraGraphQLRepository,
757
+ useFactory: (options) => {
758
+ return new CategoryFilterHasuraGraphQLRepository(options);
759
+ },
760
+ deps: ['HasuraConfig'],
761
+ },
762
+ {
763
+ provide: 'FilterOptionRepository',
764
+ useExisting: FilterOptionHasuraGraphQLRepository,
765
+ },
766
+ {
767
+ provide: FilterOptionHasuraGraphQLRepository,
768
+ useFactory: (options) => {
769
+ return new FilterOptionHasuraGraphQLRepository(options);
770
+ },
771
+ deps: ['HasuraConfig'],
772
+ },
773
+ {
774
+ provide: 'FilterRepository',
775
+ useExisting: FilterHasuraGraphQLRepository,
776
+ },
777
+ {
778
+ provide: FilterHasuraGraphQLRepository,
779
+ useFactory: (options, filterOptionRepository, categoryFilterRepository) => {
780
+ return new FilterHasuraGraphQLRepository(options, filterOptionRepository, categoryFilterRepository);
781
+ },
782
+ deps: ['HasuraConfig', FilterOptionHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository],
783
+ },
784
+ {
785
+ provide: CategoryCollectionChildrenHasuraGraphQLRepository,
786
+ useFactory: (options) => new CategoryCollectionChildrenHasuraGraphQLRepository(options),
787
+ deps: ['HasuraConfig'],
788
+ },
789
+ {
790
+ provide: 'CategoryCollectionChildrenRepository',
791
+ useExisting: CategoryCollectionChildrenHasuraGraphQLRepository,
792
+ },
793
+ {
794
+ provide: WishlistHasuraGraphQLRepository,
795
+ useFactory: (options, categoryFilterRepository) => {
796
+ return new WishlistHasuraGraphQLRepository(options, categoryFilterRepository);
797
+ },
798
+ deps: ['HasuraConfig', CategoryFilterHasuraGraphQLRepository],
799
+ },
800
+ {
801
+ provide: 'WishlistRepository',
802
+ useExisting: WishlistHasuraGraphQLRepository,
803
+ },
804
+ ] }); }
805
+ }
806
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularHasuraGraphQLModule, decorators: [{
807
807
  type: NgModule,
808
808
  args: [{
809
809
  providers: [
@@ -941,10 +941,10 @@ class CookieDataPersistence {
941
941
  set(key, value) {
942
942
  return from(cookie.set(key, value)).pipe(map(() => { }));
943
943
  }
944
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CookieDataPersistence, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
945
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CookieDataPersistence }); }
944
946
  }
945
- CookieDataPersistence.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CookieDataPersistence, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
946
- CookieDataPersistence.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CookieDataPersistence });
947
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CookieDataPersistence, decorators: [{
947
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CookieDataPersistence, decorators: [{
948
948
  type: Injectable
949
949
  }] });
950
950
 
@@ -969,15 +969,15 @@ class AuthService {
969
969
  getFireUser() {
970
970
  return authState(this.angularFireAuth).pipe(catchError(() => of(null)));
971
971
  }
972
+ 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 }); }
973
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AuthService }); }
972
974
  }
973
- 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 });
974
- AuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AuthService });
975
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AuthService, decorators: [{
975
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AuthService, decorators: [{
976
976
  type: Injectable
977
- }], ctorParameters: function () { return [{ type: i1.Auth }, { type: undefined, decorators: [{
977
+ }], ctorParameters: () => [{ type: i1.Auth }, { type: undefined, decorators: [{
978
978
  type: Inject,
979
979
  args: ['UserRepository']
980
- }] }]; } });
980
+ }] }] });
981
981
 
982
982
  class CouponService {
983
983
  constructor(couponRepository, defaultShop, orderRepository, categoryRepository) {
@@ -1054,32 +1054,33 @@ class CouponService {
1054
1054
  return of(discount);
1055
1055
  }
1056
1056
  async calcDiscountShopping(coupon, checkout) {
1057
- let discount = 0;
1057
+ let discountInfo = null;
1058
1058
  if (checkout.user.isSubscriber && coupon.discount.subscriber.value) {
1059
- discount = await this.calcDiscountByType(coupon.discount.subscriber.type, coupon.discount.subscriber.value, coupon.productsCategories, checkout);
1059
+ discountInfo = await this.calcDiscountByType(coupon.discount.subscriber.type, coupon.discount.subscriber.value, coupon.productsCategories, checkout);
1060
1060
  }
1061
1061
  else {
1062
- discount = await this.calcDiscountByType(coupon.discount.non_subscriber.type, coupon.discount.non_subscriber.value, coupon.productsCategories, checkout);
1062
+ discountInfo = await this.calcDiscountByType(coupon.discount.non_subscriber.type, coupon.discount.non_subscriber.value, coupon.productsCategories, checkout);
1063
1063
  }
1064
- return discount;
1064
+ return { discount: discountInfo.discount, lineItems: discountInfo.lineItems };
1065
1065
  }
1066
1066
  async calcDiscountByType(type, value, categories, checkout) {
1067
1067
  let discount = 0;
1068
- let lineItensDiscount = await this.getLineItensEligebleForDiscount(categories, checkout);
1069
- const subTotal = this.calcCheckoutSubtotal(lineItensDiscount, checkout.user, checkout.shop);
1068
+ let lineItensElegibleForDiscount = await this.getLineItensEligebleForDiscount(categories, checkout);
1069
+ const subTotal = this.calcCheckoutSubtotal(lineItensElegibleForDiscount, checkout.user);
1070
1070
  if (type == CouponTypes.ABSOLUTE) {
1071
1071
  discount = value > subTotal ? subTotal : value;
1072
1072
  }
1073
1073
  else {
1074
1074
  discount = subTotal * (value / 100);
1075
1075
  }
1076
- return discount;
1076
+ const lineItems = this.calcLineItenDiscount(type, lineItensElegibleForDiscount, value, subTotal);
1077
+ return { discount, lineItems };
1077
1078
  }
1078
1079
  async hasMinSubTotal(coupon, checkout) {
1079
1080
  if (!coupon.minSubTotalValue)
1080
1081
  return true;
1081
1082
  let lineItensDiscount = await this.getLineItensEligebleForDiscount(coupon.productsCategories, checkout);
1082
- const subTotal = this.calcCheckoutSubtotal(lineItensDiscount, checkout.user, checkout.shop);
1083
+ const subTotal = this.calcCheckoutSubtotal(lineItensDiscount, checkout.user);
1083
1084
  if (coupon.minSubTotalValue <= subTotal)
1084
1085
  return true;
1085
1086
  return false;
@@ -1147,7 +1148,7 @@ class CouponService {
1147
1148
  }
1148
1149
  return lineItensDiscount;
1149
1150
  }
1150
- calcCheckoutSubtotal(lineItens, user, shop) {
1151
+ calcCheckoutSubtotal(lineItens, user) {
1151
1152
  return (lineItens?.reduce((acc, curr) => user?.isSubscriber && curr.price.subscriberPrice
1152
1153
  ? acc + curr.price?.subscriberPrice * curr.quantity
1153
1154
  : acc + curr.pricePaid * curr.quantity, 0) || 0);
@@ -1185,15 +1186,39 @@ class CouponService {
1185
1186
  }
1186
1187
  return couponUseLimits;
1187
1188
  }
1189
+ calcLineItenDiscount(type, lineItems, couponDiscount, subTotal) {
1190
+ let lineItemsDiscount = [];
1191
+ if (type === CouponTypes.ABSOLUTE) {
1192
+ const couponDiscountMax = couponDiscount > subTotal ? subTotal : couponDiscount;
1193
+ lineItemsDiscount = lineItems.map((item) => {
1194
+ const totalItemPercentage = item.pricePaid / subTotal;
1195
+ const discountItem = couponDiscountMax * totalItemPercentage;
1196
+ return {
1197
+ ...item,
1198
+ discount: Number(discountItem.toFixed(2)),
1199
+ };
1200
+ });
1201
+ }
1202
+ else {
1203
+ lineItemsDiscount = lineItems.map((item) => {
1204
+ const discountItem = item.pricePaid * (couponDiscount / 100);
1205
+ return {
1206
+ ...item,
1207
+ discount: Number(discountItem.toFixed(2)),
1208
+ };
1209
+ });
1210
+ }
1211
+ return lineItemsDiscount;
1212
+ }
1213
+ 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 }); }
1214
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CouponService, providedIn: 'root' }); }
1188
1215
  }
1189
- 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 });
1190
- CouponService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CouponService, providedIn: 'root' });
1191
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CouponService, decorators: [{
1216
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CouponService, decorators: [{
1192
1217
  type: Injectable,
1193
1218
  args: [{
1194
1219
  providedIn: 'root',
1195
1220
  }]
1196
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1221
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1197
1222
  type: Inject,
1198
1223
  args: ['CouponRepository']
1199
1224
  }] }, { type: i1$2.Shops, decorators: [{
@@ -1205,7 +1230,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
1205
1230
  }] }, { type: undefined, decorators: [{
1206
1231
  type: Inject,
1207
1232
  args: ['CategoryRepository']
1208
- }] }]; } });
1233
+ }] }] });
1209
1234
 
1210
1235
  class CheckoutService {
1211
1236
  constructor(couponService, checkoutRepository, userRepository, defaultShop, dataPersistence) {
@@ -1247,12 +1272,12 @@ class CheckoutService {
1247
1272
  await this.dataPersistence.set('checkoutId', checkout.id).toPromise();
1248
1273
  return checkout;
1249
1274
  }
1275
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CheckoutService, deps: [{ token: CouponService }, { token: 'CheckoutRepository' }, { token: 'UserRepository' }, { token: DEFAULT_SHOP }, { token: PERSISTENCE_PROVIDER }], target: i0.ɵɵFactoryTarget.Injectable }); }
1276
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CheckoutService }); }
1250
1277
  }
1251
- 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 });
1252
- CheckoutService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutService });
1253
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutService, decorators: [{
1278
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CheckoutService, decorators: [{
1254
1279
  type: Injectable
1255
- }], ctorParameters: function () { return [{ type: CouponService }, { type: undefined, decorators: [{
1280
+ }], ctorParameters: () => [{ type: CouponService }, { type: undefined, decorators: [{
1256
1281
  type: Inject,
1257
1282
  args: ['CheckoutRepository']
1258
1283
  }] }, { type: undefined, decorators: [{
@@ -1264,7 +1289,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
1264
1289
  }] }, { type: undefined, decorators: [{
1265
1290
  type: Inject,
1266
1291
  args: [PERSISTENCE_PROVIDER]
1267
- }] }]; } });
1292
+ }] }] });
1268
1293
 
1269
1294
  class CartService {
1270
1295
  constructor(authService, checkoutService, defaultShop, productRepository, categoryRepository, variantRepository, buy2WinRepository) {
@@ -1325,6 +1350,7 @@ class CartService {
1325
1350
  weight: weight ?? product.weight,
1326
1351
  quantity: (item.quantity || 0) + (quantity || 0),
1327
1352
  pricePaid,
1353
+ discount: 0,
1328
1354
  categories: product.categories ?? [],
1329
1355
  isGift: isGift ?? null,
1330
1356
  costPrice: product.costPrice ?? 0,
@@ -1514,12 +1540,12 @@ class CartService {
1514
1540
  });
1515
1541
  });
1516
1542
  }
1543
+ 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 }); }
1544
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CartService }); }
1517
1545
  }
1518
- 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 });
1519
- CartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CartService });
1520
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CartService, decorators: [{
1546
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CartService, decorators: [{
1521
1547
  type: Injectable
1522
- }], ctorParameters: function () { return [{ type: AuthService }, { type: CheckoutService }, { type: i1$2.Shops, decorators: [{
1548
+ }], ctorParameters: () => [{ type: AuthService }, { type: CheckoutService }, { type: i1$2.Shops, decorators: [{
1523
1549
  type: Inject,
1524
1550
  args: [DEFAULT_SHOP]
1525
1551
  }] }, { type: undefined, decorators: [{
@@ -1534,7 +1560,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
1534
1560
  }] }, { type: i1$2.Buy2WinFirestoreRepository, decorators: [{
1535
1561
  type: Inject,
1536
1562
  args: ['Buy2WinRepository']
1537
- }] }]; } });
1563
+ }] }] });
1538
1564
 
1539
1565
  class NewCategoryStructureAdapter {
1540
1566
  constructor(categoryRepository) {
@@ -1566,15 +1592,15 @@ class NewCategoryStructureAdapter {
1566
1592
  category.brandCategory;
1567
1593
  return collectionCategory ? this.categoryRepository.get({ id: category.id }) : category;
1568
1594
  }
1595
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: NewCategoryStructureAdapter, deps: [{ token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable }); }
1596
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: NewCategoryStructureAdapter }); }
1569
1597
  }
1570
- NewCategoryStructureAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: NewCategoryStructureAdapter, deps: [{ token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
1571
- NewCategoryStructureAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: NewCategoryStructureAdapter });
1572
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: NewCategoryStructureAdapter, decorators: [{
1598
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: NewCategoryStructureAdapter, decorators: [{
1573
1599
  type: Injectable
1574
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1600
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1575
1601
  type: Inject,
1576
1602
  args: ['CategoryRepository']
1577
- }] }]; } });
1603
+ }] }] });
1578
1604
 
1579
1605
  class OldCategoryStructureAdapter {
1580
1606
  constructor(categoryRepository) {
@@ -1586,15 +1612,15 @@ class OldCategoryStructureAdapter {
1586
1612
  : await this.categoryRepository.get({ id: category.id }).then((categoryFound) => categoryFound.products);
1587
1613
  return { id: { operator: Where.IN, value: productsIds } };
1588
1614
  }
1615
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: OldCategoryStructureAdapter, deps: [{ token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable }); }
1616
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: OldCategoryStructureAdapter }); }
1589
1617
  }
1590
- OldCategoryStructureAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OldCategoryStructureAdapter, deps: [{ token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
1591
- OldCategoryStructureAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OldCategoryStructureAdapter });
1592
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OldCategoryStructureAdapter, decorators: [{
1618
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: OldCategoryStructureAdapter, decorators: [{
1593
1619
  type: Injectable
1594
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1620
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1595
1621
  type: Inject,
1596
1622
  args: ['CategoryRepository']
1597
- }] }]; } });
1623
+ }] }] });
1598
1624
 
1599
1625
  class CatalogService {
1600
1626
  constructor(productRepository, categoryRepository, categoryStructureAdapter, shop, productIndex) {
@@ -1766,12 +1792,12 @@ class CatalogService {
1766
1792
  return [...new Set(sorted.map(({ _source }) => _source.id))];
1767
1793
  }));
1768
1794
  }
1795
+ 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 }); }
1796
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CatalogService }); }
1769
1797
  }
1770
- 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 });
1771
- CatalogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService });
1772
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService, decorators: [{
1798
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CatalogService, decorators: [{
1773
1799
  type: Injectable
1774
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1800
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1775
1801
  type: Inject,
1776
1802
  args: ['ProductRepository']
1777
1803
  }] }, { type: undefined, decorators: [{
@@ -1783,7 +1809,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
1783
1809
  }] }, { type: i1$2.Shops, decorators: [{
1784
1810
  type: Inject,
1785
1811
  args: [DEFAULT_SHOP]
1786
- }] }, { type: i1$2.ProductsIndex }]; } });
1812
+ }] }, { type: i1$2.ProductsIndex }] });
1787
1813
 
1788
1814
  class CategoryService {
1789
1815
  constructor(productRepository, categoryRepository, categoryFilterRepository, categoryStructureAdapter, shop) {
@@ -1809,12 +1835,12 @@ class CategoryService {
1809
1835
  .find({ filters: { categoryId: +category.id } })
1810
1836
  .then(({ data }) => data.map((categoryFilter) => categoryFilter.filter));
1811
1837
  }
1838
+ 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 }); }
1839
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CategoryService }); }
1812
1840
  }
1813
- 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 });
1814
- CategoryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryService });
1815
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryService, decorators: [{
1841
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CategoryService, decorators: [{
1816
1842
  type: Injectable
1817
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1843
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1818
1844
  type: Inject,
1819
1845
  args: ['ProductRepository']
1820
1846
  }] }, { type: undefined, decorators: [{
@@ -1829,7 +1855,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
1829
1855
  }] }, { type: i1$2.Shops, decorators: [{
1830
1856
  type: Inject,
1831
1857
  args: [DEFAULT_SHOP]
1832
- }] }]; } });
1858
+ }] }] });
1833
1859
 
1834
1860
  var ProductSorts;
1835
1861
  (function (ProductSorts) {
@@ -1863,7 +1889,7 @@ class WishlistService {
1863
1889
  getCategoryService() {
1864
1890
  return this.categoryService;
1865
1891
  }
1866
- async create({ personId, title, description, userFullName, userPhoto, theme, bannerUrl, }) {
1892
+ async create({ personId, title, description, published, userFullName, userPhoto, theme, bannerUrl, }) {
1867
1893
  const data = {
1868
1894
  slug: '',
1869
1895
  name: title,
@@ -1878,7 +1904,7 @@ class WishlistService {
1878
1904
  personName: userFullName,
1879
1905
  personPhoto: userPhoto,
1880
1906
  brandCategory: false,
1881
- published: true,
1907
+ published,
1882
1908
  theme,
1883
1909
  bannerUrl,
1884
1910
  };
@@ -1886,11 +1912,12 @@ class WishlistService {
1886
1912
  await this.wishlistRepository.update({ id: newWishlist.id, slug: newWishlist.id });
1887
1913
  return Wishlist.toInstance({ ...newWishlist.toPlain(), slug: newWishlist.id });
1888
1914
  }
1889
- update({ id, title, description, userFullName, userPhoto, theme, bannerUrl, }) {
1915
+ update({ id, title, description, published, userFullName, userPhoto, theme, bannerUrl, }) {
1890
1916
  const data = {
1891
1917
  id,
1892
1918
  name: title,
1893
1919
  description,
1920
+ published,
1894
1921
  metadata: {
1895
1922
  title: `${userFullName} - ${title}`,
1896
1923
  description: `${userFullName} - ${description}`,
@@ -1934,12 +1961,12 @@ class WishlistService {
1934
1961
  }
1935
1962
  return wishlist;
1936
1963
  }
1964
+ 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 }); }
1965
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: WishlistService }); }
1937
1966
  }
1938
- 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 });
1939
- WishlistService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService });
1940
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, decorators: [{
1967
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: WishlistService, decorators: [{
1941
1968
  type: Injectable
1942
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1969
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1943
1970
  type: Inject,
1944
1971
  args: ['WishlistRepository']
1945
1972
  }] }, { type: i1$2.Shops, decorators: [{
@@ -1954,7 +1981,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
1954
1981
  }] }, { type: undefined, decorators: [{
1955
1982
  type: Inject,
1956
1983
  args: ['CategoryRepository']
1957
- }] }, { type: i1$2.ProductsIndex }]; } });
1984
+ }] }, { type: i1$2.ProductsIndex }] });
1958
1985
 
1959
1986
  class CheckoutSubscriptionService {
1960
1987
  constructor(checkoutSubscriptionRepository, dataPersistence, couponService) {
@@ -1986,18 +2013,18 @@ class CheckoutSubscriptionService {
1986
2013
  await this.dataPersistence.set('checkoutSubscriptionId', checkout.id).toPromise();
1987
2014
  return checkout;
1988
2015
  }
2016
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CheckoutSubscriptionService, deps: [{ token: 'CheckoutSubscriptionRepository' }, { token: PERSISTENCE_PROVIDER }, { token: CouponService }], target: i0.ɵɵFactoryTarget.Injectable }); }
2017
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CheckoutSubscriptionService }); }
1989
2018
  }
1990
- 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 });
1991
- CheckoutSubscriptionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutSubscriptionService });
1992
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutSubscriptionService, decorators: [{
2019
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CheckoutSubscriptionService, decorators: [{
1993
2020
  type: Injectable
1994
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
2021
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1995
2022
  type: Inject,
1996
2023
  args: ['CheckoutSubscriptionRepository']
1997
2024
  }] }, { type: undefined, decorators: [{
1998
2025
  type: Inject,
1999
2026
  args: [PERSISTENCE_PROVIDER]
2000
- }] }, { type: CouponService }]; } });
2027
+ }] }, { type: CouponService }] });
2001
2028
 
2002
2029
  class UtilHelper {
2003
2030
  static createSlug(name) {
@@ -2116,12 +2143,12 @@ class HomeShopService {
2116
2143
  get gender() {
2117
2144
  return this.homeId === 'mens_market' ? 'masculino' : undefined;
2118
2145
  }
2146
+ 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 }); }
2147
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: HomeShopService }); }
2119
2148
  }
2120
- 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 });
2121
- HomeShopService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: HomeShopService });
2122
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: HomeShopService, decorators: [{
2149
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: HomeShopService, decorators: [{
2123
2150
  type: Injectable
2124
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
2151
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
2125
2152
  type: Inject,
2126
2153
  args: ['CategoryRepository']
2127
2154
  }] }, { type: undefined, decorators: [{
@@ -2133,7 +2160,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
2133
2160
  }] }, { type: i1$2.Shops, decorators: [{
2134
2161
  type: Inject,
2135
2162
  args: [DEFAULT_SHOP]
2136
- }] }]; } });
2163
+ }] }] });
2137
2164
 
2138
2165
  class OrderService {
2139
2166
  constructor(angularFirestore, orderRepository) {
@@ -2147,15 +2174,15 @@ class OrderService {
2147
2174
  .subscribe((doc) => this.orderSubject.next(doc));
2148
2175
  return this.orderSubject;
2149
2176
  }
2177
+ 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 }); }
2178
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: OrderService }); }
2150
2179
  }
2151
- 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 });
2152
- OrderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService });
2153
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService, decorators: [{
2180
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: OrderService, decorators: [{
2154
2181
  type: Injectable
2155
- }], ctorParameters: function () { return [{ type: i1$1.Firestore }, { type: i1$2.OrderFirestoreRepository, decorators: [{
2182
+ }], ctorParameters: () => [{ type: i1$1.Firestore }, { type: i1$2.OrderFirestoreRepository, decorators: [{
2156
2183
  type: Inject,
2157
2184
  args: ['OrderRepository']
2158
- }] }]; } });
2185
+ }] }] });
2159
2186
 
2160
2187
  class ShippingService {
2161
2188
  constructor(http, apiUrl, homeService) {
@@ -2233,15 +2260,15 @@ class ShippingService {
2233
2260
  }
2234
2261
  return false;
2235
2262
  }
2263
+ 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 }); }
2264
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: ShippingService }); }
2236
2265
  }
2237
- 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 });
2238
- ShippingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ShippingService });
2239
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ShippingService, decorators: [{
2266
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: ShippingService, decorators: [{
2240
2267
  type: Injectable
2241
- }], ctorParameters: function () { return [{ type: i1$3.HttpClient }, { type: undefined, decorators: [{
2268
+ }], ctorParameters: () => [{ type: i1$3.HttpClient }, { type: undefined, decorators: [{
2242
2269
  type: Inject,
2243
2270
  args: [BACKEND_URL]
2244
- }] }, { type: HomeShopService }]; } });
2271
+ }] }, { type: HomeShopService }] });
2245
2272
 
2246
2273
  class AngularConnectModule {
2247
2274
  static initializeApp(defaultShop, options, nameOrConfig) {
@@ -2265,45 +2292,45 @@ class AngularConnectModule {
2265
2292
  ],
2266
2293
  };
2267
2294
  }
2295
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularConnectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2296
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.3", ngImport: i0, type: AngularConnectModule, imports: [i1$4.FirebaseAppModule, AngularElasticSeachModule,
2297
+ AngularFirebaseAuthModule,
2298
+ AngularFirestoreModule,
2299
+ AngularHasuraGraphQLModule] }); }
2300
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularConnectModule, providers: [
2301
+ AuthService,
2302
+ CartService,
2303
+ CatalogService,
2304
+ CategoryService,
2305
+ CheckoutService,
2306
+ CheckoutSubscriptionService,
2307
+ CouponService,
2308
+ HomeShopService,
2309
+ OrderService,
2310
+ ShippingService,
2311
+ WishlistService,
2312
+ {
2313
+ provide: UpdateUserImage,
2314
+ useFactory: (userRepository, fileUploader) => {
2315
+ return new UpdateUserImage(userRepository, fileUploader);
2316
+ },
2317
+ deps: ['UserRepository', 'FileUploaderService'],
2318
+ },
2319
+ ], imports: [provideFirebaseApp((injector) => {
2320
+ const appName = injector.get(FIREBASE_APP_NAME) || '[DEFAULT]';
2321
+ try {
2322
+ return getApp(appName);
2323
+ }
2324
+ catch (error) {
2325
+ return initializeApp(injector.get(FIREBASE_OPTIONS), appName);
2326
+ }
2327
+ }),
2328
+ AngularElasticSeachModule,
2329
+ AngularFirebaseAuthModule,
2330
+ AngularFirestoreModule,
2331
+ AngularHasuraGraphQLModule] }); }
2268
2332
  }
2269
- AngularConnectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2270
- AngularConnectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, imports: [i1$4.FirebaseAppModule, AngularElasticSeachModule,
2271
- AngularFirebaseAuthModule,
2272
- AngularFirestoreModule,
2273
- AngularHasuraGraphQLModule] });
2274
- AngularConnectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, providers: [
2275
- AuthService,
2276
- CartService,
2277
- CatalogService,
2278
- CategoryService,
2279
- CheckoutService,
2280
- CheckoutSubscriptionService,
2281
- CouponService,
2282
- HomeShopService,
2283
- OrderService,
2284
- ShippingService,
2285
- WishlistService,
2286
- {
2287
- provide: UpdateUserImage,
2288
- useFactory: (userRepository, fileUploader) => {
2289
- return new UpdateUserImage(userRepository, fileUploader);
2290
- },
2291
- deps: ['UserRepository', 'FileUploaderService'],
2292
- },
2293
- ], imports: [provideFirebaseApp((injector) => {
2294
- const appName = injector.get(FIREBASE_APP_NAME) || '[DEFAULT]';
2295
- try {
2296
- return getApp(appName);
2297
- }
2298
- catch (error) {
2299
- return initializeApp(injector.get(FIREBASE_OPTIONS), appName);
2300
- }
2301
- }),
2302
- AngularElasticSeachModule,
2303
- AngularFirebaseAuthModule,
2304
- AngularFirestoreModule,
2305
- AngularHasuraGraphQLModule] });
2306
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, decorators: [{
2333
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularConnectModule, decorators: [{
2307
2334
  type: NgModule,
2308
2335
  args: [{
2309
2336
  imports: [