ng-miam 8.1.3 → 8.1.4

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 (36) hide show
  1. package/bundles/ng-miam.umd.js +181 -17
  2. package/bundles/ng-miam.umd.js.map +1 -1
  3. package/bundles/ng-miam.umd.min.js +1 -1
  4. package/bundles/ng-miam.umd.min.js.map +1 -1
  5. package/esm2015/lib/_components/addon-link/addon-link.component.js +1 -1
  6. package/esm2015/lib/_components/modal/modal.component.js +2 -2
  7. package/esm2015/lib/_models/point-of-sale.js +9 -2
  8. package/esm2015/lib/_services/basket-transfer.service.js +119 -0
  9. package/esm2015/lib/_services/baskets-synchronizing/baskets-comparator.service.js +25 -7
  10. package/esm2015/lib/_services/baskets-synchronizing/baskets-synchronizer.service.js +11 -4
  11. package/esm2015/lib/_services/context.service.js +12 -1
  12. package/esm2015/lib/_services/index.js +2 -1
  13. package/esm2015/lib/_services/interceptor.service.js +2 -2
  14. package/esm2015/lib/_types/builded/miam-interface.js +1 -1
  15. package/esm2015/lib/_web-components/recipe-catalog/catalog-category/catalog-category.component.js +12 -13
  16. package/esm2015/lib/_web-components/recipe-details/recipe-addon/recipe-addon.component.js +1 -1
  17. package/esm2015/lib/ng-miam.module.js +4 -2
  18. package/fesm2015/ng-miam.js +168 -18
  19. package/fesm2015/ng-miam.js.map +1 -1
  20. package/lib/_models/point-of-sale.d.ts +3 -0
  21. package/lib/_models/point-of-sale.d.ts.map +1 -1
  22. package/lib/_services/basket-transfer.service.d.ts +31 -0
  23. package/lib/_services/basket-transfer.service.d.ts.map +1 -0
  24. package/lib/_services/baskets-synchronizing/baskets-comparator.service.d.ts +1 -1
  25. package/lib/_services/baskets-synchronizing/baskets-comparator.service.d.ts.map +1 -1
  26. package/lib/_services/baskets-synchronizing/baskets-synchronizer.service.d.ts.map +1 -1
  27. package/lib/_services/context.service.d.ts +1 -0
  28. package/lib/_services/context.service.d.ts.map +1 -1
  29. package/lib/_services/index.d.ts +1 -0
  30. package/lib/_services/index.d.ts.map +1 -1
  31. package/lib/_types/builded/miam-interface.d.ts +1 -0
  32. package/lib/_types/builded/miam-interface.d.ts.map +1 -1
  33. package/lib/_web-components/recipe-catalog/catalog-category/catalog-category.component.d.ts +3 -3
  34. package/lib/_web-components/recipe-catalog/catalog-category/catalog-category.component.d.ts.map +1 -1
  35. package/lib/ng-miam.module.d.ts.map +1 -1
  36. package/package.json +1 -1
@@ -597,7 +597,8 @@
597
597
  distance: 0.0,
598
598
  address: '',
599
599
  latitude: '',
600
- longitude: ''
600
+ longitude: '',
601
+ 'ext-id': ''
601
602
  };
602
603
  _this.relationships = {
603
604
  supplier: new i2.DocumentResource(),
@@ -628,6 +629,16 @@
628
629
  enumerable: false,
629
630
  configurable: true
630
631
  });
632
+ Object.defineProperty(PointOfSale.prototype, "extId", {
633
+ get: function () {
634
+ return this.attributes['ext-id'];
635
+ },
636
+ set: function (id) {
637
+ this.attributes['ext-id'] = id;
638
+ },
639
+ enumerable: false,
640
+ configurable: true
641
+ });
631
642
  return PointOfSale;
632
643
  }(i2.Resource));
633
644
 
@@ -4488,12 +4499,17 @@
4488
4499
  * from Miam's basket, and create ItemsComparators for entries whose extId hasn't got an ItemsComparator yet.
4489
4500
  * Then check for items to remove from Miam's basket & send update event to Miam
4490
4501
  */
4491
- BasketsComparatorService.prototype.initBasketComparator = function (firstMiamBasket, firstRetailerBasket) {
4502
+ BasketsComparatorService.prototype.initBasketComparator = function (firstMiamBasket, firstRetailerBasket, fromRetailer) {
4492
4503
  this.extIdToItemsComparator = {};
4493
4504
  this.updateRetailerProducts(firstRetailerBasket);
4494
4505
  this.updateEntriesFromMiam(firstMiamBasket);
4495
4506
  this.addEntriesFromMiam(firstMiamBasket);
4496
- return this.resolveFromRetailer();
4507
+ if (fromRetailer) {
4508
+ return this.resolveFromRetailer();
4509
+ }
4510
+ else {
4511
+ return this.resolveFromMiam(firstMiamBasket);
4512
+ }
4497
4513
  };
4498
4514
  // -----------------------------------------------------------------------------------------------------------------------------
4499
4515
  // ------------------------------------------------------ Coming from Miam -----------------------------------------------------
@@ -4506,12 +4522,18 @@
4506
4522
  BasketsComparatorService.prototype.updateReceivedFromMiam = function (miamBasket) {
4507
4523
  var _this = this;
4508
4524
  // eslint-disable-next-line no-console
4509
- console.debug("[Miam] update received from Miam\n - " + JSON.stringify(miamBasket === null || miamBasket === void 0 ? void 0 : miamBasket.map(function (e) { var _a; return ({ id: e.id, extId: (_a = e.selectedItem) === null || _a === void 0 ? void 0 : _a.attributes['ext-id'], quantity: e.attributes.quantity }); })) + "\n - current comparison: " + JSON.stringify(Object.keys(this.extIdToItemsComparator).map(function (key) { return ({ id: key, MQ: _this.extIdToItemsComparator[key].miamQuantity, RQ: _this.extIdToItemsComparator[key].retailerQuantity }); })));
4525
+ console.debug("[Miam] update received from Miam\n - " + JSON.stringify(miamBasket === null || miamBasket === void 0 ? void 0 : miamBasket.map(function (e) {
4526
+ var _a;
4527
+ return ({
4528
+ id: e.id,
4529
+ extId: (_a = e.selectedItem) === null || _a === void 0 ? void 0 : _a.attributes['ext-id'],
4530
+ quantity: e.attributes.quantity
4531
+ });
4532
+ })) + "\n - current comparison: " + JSON.stringify(Object.keys(this.extIdToItemsComparator).map(function (key) { return ({ id: key, MQ: _this.extIdToItemsComparator[key].miamQuantity, RQ: _this.extIdToItemsComparator[key].retailerQuantity }); })));
4510
4533
  // Note: MQ means Miam Quantity and RQ means Retailer Quantity but this makes the logs more compact and thus readable
4511
4534
  this.updateEntriesFromMiam(miamBasket);
4512
4535
  this.addEntriesFromMiam(miamBasket);
4513
- var toPushToRetailer = this.resolveFromMiam(miamBasket);
4514
- return toPushToRetailer;
4536
+ return this.resolveFromMiam(miamBasket);
4515
4537
  };
4516
4538
  /**
4517
4539
  * For every entry in Miam's basket whose associated extId has an ItemsComparator, update the comparator with the entry
@@ -4555,7 +4577,14 @@
4555
4577
  BasketsComparatorService.prototype.resolveFromMiam = function (miamBasket) {
4556
4578
  var _this = this;
4557
4579
  // eslint-disable-next-line no-console
4558
- console.debug("[Miam] resolve from Miam basket\n - " + JSON.stringify(miamBasket === null || miamBasket === void 0 ? void 0 : miamBasket.map(function (e) { var _a; return ({ id: e.id, extId: (_a = e.selectedItem) === null || _a === void 0 ? void 0 : _a.attributes['ext-id'], quantity: e.attributes.quantity }); })) + "\n - current comparison: " + JSON.stringify(Object.keys(this.extIdToItemsComparator).map(function (key) { return ({ id: key, MQ: _this.extIdToItemsComparator[key].miamQuantity, RQ: _this.extIdToItemsComparator[key].retailerQuantity }); })));
4580
+ console.debug("[Miam] resolve from Miam basket\n - " + JSON.stringify(miamBasket === null || miamBasket === void 0 ? void 0 : miamBasket.map(function (e) {
4581
+ var _a;
4582
+ return ({
4583
+ id: e.id,
4584
+ extId: (_a = e.selectedItem) === null || _a === void 0 ? void 0 : _a.attributes['ext-id'],
4585
+ quantity: e.attributes.quantity
4586
+ });
4587
+ })) + "\n - current comparison: " + JSON.stringify(Object.keys(this.extIdToItemsComparator).map(function (key) { return ({ id: key, MQ: _this.extIdToItemsComparator[key].miamQuantity, RQ: _this.extIdToItemsComparator[key].retailerQuantity }); })));
4559
4588
  // Note: MQ means Miam Quantity and RQ means Retailer Quantity but this makes the logs more compact and thus readable
4560
4589
  var toPushToRetailer = [];
4561
4590
  Object.keys(this.extIdToItemsComparator).forEach(function (extId) {
@@ -4725,9 +4754,16 @@
4725
4754
  if (!this.isReady()) {
4726
4755
  return;
4727
4756
  }
4728
- this.isProcessingRetailerEvent = true;
4729
- var toRemoveFromMiam = this.comparatorService.initBasketComparator(this.firstMiamBasket, this.firstRetailerBasket);
4730
- this.sendUpdateToMiam(toRemoveFromMiam);
4757
+ if (sessionStorage.getItem('_miam/basketActionInterrupted') === 'true') {
4758
+ var itemsToPush = this.comparatorService.initBasketComparator(this.firstMiamBasket, this.firstRetailerBasket, false);
4759
+ this.sendUpdateToRetailer(itemsToPush);
4760
+ sessionStorage.removeItem('_miam/basketActionInterrupted');
4761
+ }
4762
+ else {
4763
+ this.isProcessingRetailerEvent = true;
4764
+ var toRemoveFromMiam = this.comparatorService.initBasketComparator(this.firstMiamBasket, this.firstRetailerBasket, true);
4765
+ this.sendUpdateToMiam(toRemoveFromMiam);
4766
+ }
4731
4767
  };
4732
4768
  /**
4733
4769
  * @returns true is first baskets have been received for Miam & retailer
@@ -4856,6 +4892,14 @@
4856
4892
  this.videoRecipesEnabled = false;
4857
4893
  this.articlesInCatalogEnabled = false;
4858
4894
  this.tagsOnRecipesEnabled = false;
4895
+ this.hookCallback = function (isLogged, isPosValid) {
4896
+ console.warn('[Miam] hookCallback (used to force user login) not set');
4897
+ return false;
4898
+ };
4899
+ this.forcePosCallback = function (posExtId) {
4900
+ console.warn('[Miam] forcePosCallback (used to force selected shop) not set');
4901
+ return false;
4902
+ };
4859
4903
  this.defaultIngredientPicture = 'https://storage.googleapis.com/assets.miam.tech/generic/images/default-ingredient-picture.svg';
4860
4904
  this.globalScrollableElement = document.body;
4861
4905
  this.isSmallScreen$ = new rxjs.BehaviorSubject(false);
@@ -4944,6 +4988,9 @@
4944
4988
  hook: {
4945
4989
  setHookCallback: function (callback) {
4946
4990
  _this.hookCallback = callback;
4991
+ },
4992
+ setForcePosCallback: function (callback) {
4993
+ _this.forcePosCallback = callback;
4947
4994
  }
4948
4995
  },
4949
4996
  pos: {
@@ -6731,7 +6778,7 @@
6731
6778
  i0__namespace.ɵɵadvance(1);
6732
6779
  i0__namespace.ɵɵproperty("ngIf", ctx.recipe == null ? null : ctx.recipe.sponsorLogoUrl);
6733
6780
  }
6734
- }, directives: [i2__namespace$1.NgIf], styles: [".miam-addon-link{flex-direction:row;padding:12px 16px;font-size:16px}.miam-addon-link,.miam-addon-link .miam-addon-link__info{display:flex;align-items:center;justify-content:space-between}.miam-addon-link .miam-addon-link__info{flex-direction:row;flex:1}.miam-addon-link .miam-addon-link__info .miam-addon-link__sponsor-name{white-space:nowrap}@media (max-width:1023px){.miam-addon-link .miam-addon-link__info{flex-direction:column;align-items:flex-start}}.miam-addon-link .miam-addon-link__info .miam-addon-link__link{color:var(--m-color-primary);cursor:pointer;-webkit-tap-highlight-color:transparent;white-space:nowrap;margin-left:16px}@media (max-width:1023px){.miam-addon-link .miam-addon-link__info .miam-addon-link__link{margin-left:unset;margin-top:8px}}.miam-addon-link .miam-addon-link__logo{width:auto;height:48px;justify-content:flex-end;display:flex;order:2;align-items:center;padding-left:16px}.miam-addon-link .miam-addon-link__logo img{max-height:100%;max-width:100%;-o-object-fit:contain;object-fit:contain}"], encapsulation: 2, changeDetection: 0 });
6781
+ }, directives: [i2__namespace$1.NgIf], styles: [".miam-addon-link{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:12px 16px;font-size:16px}.miam-addon-link .miam-addon-link__info{display:flex;flex-direction:column;flex:1;justify-content:space-between;align-items:flex-start}.miam-addon-link .miam-addon-link__info .miam-addon-link__sponsor-name{white-space:nowrap}.miam-addon-link .miam-addon-link__info .miam-addon-link__link{color:var(--m-color-primary);cursor:pointer;-webkit-tap-highlight-color:transparent;white-space:nowrap;margin-top:8px}.miam-addon-link .miam-addon-link__logo{width:auto;height:48px;justify-content:flex-end;display:flex;order:2;align-items:center;padding-left:16px}.miam-addon-link .miam-addon-link__logo img{max-height:100%;max-width:100%;-o-object-fit:contain;object-fit:contain}"], encapsulation: 2, changeDetection: 0 });
6735
6782
  (function () {
6736
6783
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(AddonLinkComponent, [{
6737
6784
  type: i0.Component,
@@ -8298,6 +8345,119 @@
8298
8345
  }], function () { return [{ type: SponsorBlockTypeService }]; }, null);
8299
8346
  })();
8300
8347
 
8348
+ var BasketTransferService = /** @class */ (function () {
8349
+ function BasketTransferService(basketsService, contextService, posService, http, userService) {
8350
+ this.basketsService = basketsService;
8351
+ this.contextService = contextService;
8352
+ this.posService = posService;
8353
+ this.http = http;
8354
+ this.userService = userService;
8355
+ this.handleBasketTransfer();
8356
+ }
8357
+ BasketTransferService.prototype.handleBasketTransfer = function () {
8358
+ var _this = this;
8359
+ var transferData = this.getTransferData();
8360
+ if (transferData) {
8361
+ this.basketsService.waitForBasket.pipe(operators.take(1), operators.switchMap(function () { return _this.applyBasketTransfer(transferData); }), operators.switchMap(function () { return _this.basketsService.reloadBasket(); })).subscribe();
8362
+ }
8363
+ };
8364
+ BasketTransferService.prototype.applyBasketTransfer = function (params) {
8365
+ var _this = this;
8366
+ this.setSessionData(params);
8367
+ return this.callHookbackIfNotLogged().pipe(operators.skipWhile(function (isLogged) { return !isLogged; }), operators.switchMap(function () { return _this.forcePosIfUnset(params.posExtId); }), operators.skipWhile(function (isPosSet) { return !isPosSet; }), operators.switchMap(function () {
8368
+ return _this.posService.pos$.pipe(operators.skipWhile(function (pos) { return !pos; }), operators.take(1), operators.switchMap(function (pos) {
8369
+ var posId = pos.id;
8370
+ var transferBasketUrl = environment$1.miamAPI + "/api/v1/baskets/transfer?point_of_sale_id=" + posId + "&transferred_basket_token=" + params.basketToken;
8371
+ _this.clearTransferSessionData();
8372
+ sessionStorage.setItem('_miam/basketActionInterrupted', 'true');
8373
+ return _this.http.patch(transferBasketUrl, {}).pipe(operators.switchMap(function () {
8374
+ var getCurrentBasketUrl = environment$1.miamAPI + "/api/v1/baskets/current?point_of_sale_id=" + posId;
8375
+ return _this.http.get(getCurrentBasketUrl, {}).pipe(operators.switchMap(function () {
8376
+ sessionStorage.removeItem('_miam/basketActionInterrupted');
8377
+ return rxjs.of(true);
8378
+ }));
8379
+ }));
8380
+ }));
8381
+ }));
8382
+ };
8383
+ BasketTransferService.prototype.setSessionData = function (params) {
8384
+ var basketTokenFromSession = sessionStorage.getItem('_miam/transferredBasketToken');
8385
+ var posExtIdFromSession = sessionStorage.getItem('_miam/pointOfSaleExtId');
8386
+ var isSessionDataMatching = basketTokenFromSession === params.basketToken && posExtIdFromSession === params.posExtId;
8387
+ if (!isSessionDataMatching) {
8388
+ sessionStorage.setItem('_miam/transferredBasketToken', params.basketToken);
8389
+ sessionStorage.setItem('_miam/posOfSaleExtId', params.posExtId);
8390
+ }
8391
+ };
8392
+ BasketTransferService.prototype.clearTransferSessionData = function () {
8393
+ sessionStorage.removeItem('_miam/transferredBasketToken');
8394
+ sessionStorage.removeItem('_miam/pointOfSaleExtId');
8395
+ };
8396
+ BasketTransferService.prototype.confirmBasket = function () {
8397
+ var _this = this;
8398
+ var posId;
8399
+ this.posService.pos$.asObservable().pipe(operators.skipWhile(function (pos) { return !pos; }), operators.take(1)).subscribe(function (pos) {
8400
+ posId = pos.id;
8401
+ var getCurrentBasketUrl = environment$1.miamAPI + "/api/v1/baskets/current?point_of_sale_id=" + posId;
8402
+ _this.http.get(getCurrentBasketUrl, {}).subscribe(function () {
8403
+ var startTransferUrl = environment$1.miamAPI + "/api/v1/baskets/start_transfer?point_of_sale_id=" + posId;
8404
+ _this.http.patch(startTransferUrl, {}).subscribe(function (transferResponse) {
8405
+ console.log('PATCH transfer:', transferResponse);
8406
+ _this.http.get(getCurrentBasketUrl, {}).subscribe(function () {
8407
+ var transferUrl = transferResponse['transfer_url'];
8408
+ window.open(transferUrl, '_blank');
8409
+ });
8410
+ });
8411
+ });
8412
+ });
8413
+ };
8414
+ BasketTransferService.prototype.callHookbackIfNotLogged = function () {
8415
+ var _this = this;
8416
+ return rxjs.combineLatest([
8417
+ this.userService.isLogged$,
8418
+ this.posService.posWasInitialized()
8419
+ ]).pipe(operators.take(1), operators.map(function (_a) {
8420
+ var _b = __read(_a, 2), isLogged = _b[0], isPosValid = _b[1];
8421
+ return _this.contextService.hookCallback(isLogged, isPosValid);
8422
+ }));
8423
+ };
8424
+ BasketTransferService.prototype.forcePosIfUnset = function (transferPosExtId) {
8425
+ var _this = this;
8426
+ return this.posService.pos$.pipe(operators.map(function (pos) {
8427
+ var posSet = pos && pos.extId === transferPosExtId;
8428
+ if (!posSet) {
8429
+ _this.contextService.forcePosCallback(transferPosExtId);
8430
+ }
8431
+ return posSet;
8432
+ }));
8433
+ };
8434
+ BasketTransferService.prototype.getTransferData = function () {
8435
+ var currentUrl = window.location.href;
8436
+ var urlParams = new URL(currentUrl).searchParams;
8437
+ var basketToken = urlParams.get('transferred_basket_token') || sessionStorage.getItem('_miam/transferredBasketToken');
8438
+ var posExtId = urlParams.get('point_of_sale_ext_id') || sessionStorage.getItem('_miam/posOfSaleExtId');
8439
+ var urlWithoutParams = currentUrl.split('?')[0];
8440
+ history.replaceState({}, document.title, urlWithoutParams);
8441
+ if (basketToken && posExtId) {
8442
+ return { basketToken: basketToken, posExtId: posExtId };
8443
+ }
8444
+ else {
8445
+ return null;
8446
+ }
8447
+ };
8448
+ return BasketTransferService;
8449
+ }());
8450
+ BasketTransferService.ɵfac = function BasketTransferService_Factory(t) { return new (t || BasketTransferService)(i0__namespace.ɵɵinject(BasketsService), i0__namespace.ɵɵinject(ContextService), i0__namespace.ɵɵinject(PointOfSalesService), i0__namespace.ɵɵinject(i1__namespace.HttpClient), i0__namespace.ɵɵinject(UserService)); };
8451
+ BasketTransferService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: BasketTransferService, factory: BasketTransferService.ɵfac, providedIn: 'root' });
8452
+ (function () {
8453
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(BasketTransferService, [{
8454
+ type: i0.Injectable,
8455
+ args: [{
8456
+ providedIn: 'root'
8457
+ }]
8458
+ }], function () { return [{ type: BasketsService }, { type: ContextService }, { type: PointOfSalesService }, { type: i1__namespace.HttpClient }, { type: UserService }]; }, null);
8459
+ })();
8460
+
8301
8461
  var environment = {
8302
8462
  env: 'prod',
8303
8463
  miamAPI: 'https://api.miam.tech',
@@ -8356,7 +8516,7 @@
8356
8516
  request = request.clone({
8357
8517
  setHeaders: {
8358
8518
  'miam-origin': this.context.origin.value,
8359
- 'miam-front-version': '8.1.2',
8519
+ 'miam-front-version': '8.1.4',
8360
8520
  'miam-front-type': 'web',
8361
8521
  'miam-api-version': '4.7.0'
8362
8522
  }
@@ -8905,7 +9065,7 @@
8905
9065
  var _this = this;
8906
9066
  this.currentPath = window.location.href;
8907
9067
  this.mutationObserver = new MutationObserver(function () {
8908
- if (_this.currentPath !== window.location.href) {
9068
+ if (_this.display && _this.currentPath !== window.location.href) {
8909
9069
  _this.onClose();
8910
9070
  }
8911
9071
  });
@@ -20067,13 +20227,14 @@
20067
20227
  _c);
20068
20228
  var CatalogCategoryComponent = /** @class */ (function (_super) {
20069
20229
  __extends(CatalogCategoryComponent, _super);
20070
- function CatalogCategoryComponent(recipesService, articlesService, context, cdr, analyticsService) {
20230
+ function CatalogCategoryComponent(recipesService, articlesService, context, cdr, analyticsService, basketTransfer) {
20071
20231
  var _this = _super.call(this, analyticsService) || this;
20072
20232
  _this.recipesService = recipesService;
20073
20233
  _this.articlesService = articlesService;
20074
20234
  _this.context = context;
20075
20235
  _this.cdr = cdr;
20076
20236
  _this.analyticsService = analyticsService;
20237
+ _this.basketTransfer = basketTransfer;
20077
20238
  _this.title = '';
20078
20239
  _this.maxRecipeNumber = 20;
20079
20240
  _this.displayPricing = true;
@@ -20145,7 +20306,7 @@
20145
20306
  };
20146
20307
  return CatalogCategoryComponent;
20147
20308
  }(EventTracerComponent));
20148
- CatalogCategoryComponent.ɵfac = function CatalogCategoryComponent_Factory(t) { return new (t || CatalogCategoryComponent)(i0__namespace.ɵɵdirectiveInject(RecipesService), i0__namespace.ɵɵdirectiveInject(ArticlesService), i0__namespace.ɵɵdirectiveInject(ContextService), i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(AnalyticsService)); };
20309
+ CatalogCategoryComponent.ɵfac = function CatalogCategoryComponent_Factory(t) { return new (t || CatalogCategoryComponent)(i0__namespace.ɵɵdirectiveInject(RecipesService), i0__namespace.ɵɵdirectiveInject(ArticlesService), i0__namespace.ɵɵdirectiveInject(ContextService), i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(AnalyticsService), i0__namespace.ɵɵdirectiveInject(BasketTransferService)); };
20149
20310
  CatalogCategoryComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CatalogCategoryComponent, selectors: [["ng-miam-catalog-category"]], viewQuery: function CatalogCategoryComponent_Query(rf, ctx) {
20150
20311
  if (rf & 1) {
20151
20312
  i0__namespace.ɵɵviewQuery(_c0$5, 1);
@@ -20194,7 +20355,7 @@
20194
20355
  encapsulation: i0.ViewEncapsulation.None,
20195
20356
  changeDetection: i0.ChangeDetectionStrategy.OnPush
20196
20357
  }]
20197
- }], function () { return [{ type: RecipesService }, { type: ArticlesService }, { type: ContextService }, { type: i0__namespace.ChangeDetectorRef }, { type: AnalyticsService }]; }, { filters: [{
20358
+ }], function () { return [{ type: RecipesService }, { type: ArticlesService }, { type: ContextService }, { type: i0__namespace.ChangeDetectorRef }, { type: AnalyticsService }, { type: BasketTransferService }]; }, { filters: [{
20198
20359
  type: i0.Input
20199
20360
  }], title: [{
20200
20361
  type: i0.Input
@@ -23563,7 +23724,7 @@
23563
23724
  var _r1 = i0__namespace.ɵɵreference(2);
23564
23725
  i0__namespace.ɵɵproperty("ngIf", !ctx.loading)("ngIfElse", _r1);
23565
23726
  }
23566
- }, directives: [i2__namespace$1.NgIf, IconComponent, SponsorStorytellingComponent, LoaderComponent], pipes: [SafePipe], styles: [".miam-recipe-addon{height:100%;width:100%;display:flex;flex-direction:column}.miam-recipe-addon .miam-recipe-addon__header{padding:26px 80px 26px 16px;width:100%;display:flex;justify-content:space-between;align-items:center;box-shadow:0 8px 28px rgba(0,0,0,.07)}@media (max-width:1023px){.miam-recipe-addon .miam-recipe-addon__header{padding:16px 80px 16px 16px}}.miam-recipe-addon .miam-recipe-addon__header button{max-width:150px;padding:0;color:var(--m-color-black);font-weight:700;font-size:19px;background-color:transparent;border:none}.miam-recipe-addon .miam-recipe-addon__header button ng-miam-icon{margin:0;height:16px;transform:rotate(90deg) scale(1.5)}.miam-recipe-addon .miam-recipe-addon__header button ng-miam-icon svg path{fill:var(--m-color-black)}.miam-recipe-addon .miam-recipe-addon__header button ng-miam-icon svg path:first-of-type{fill:transparent}.miam-recipe-addon .miam-recipe-addon__header button:hover{background-color:transparent;border:none}.miam-recipe-addon .miam-recipe-addon__header button:hover ng-miam-icon svg path{fill:var(--m-color-black)}.miam-recipe-addon .miam-recipe-addon__header button:hover ng-miam-icon svg path:first-of-type{fill:transparent}.miam-recipe-addon .miam-recipe-addon__header button span{margin-left:8px}.miam-recipe-addon .miam-recipe-addon__header img{height:25px}.miam-recipe-addon .miam-recipe-addon__content{flex:1 1;width:calc(100% - 8px);height:100%;padding-top:16px;overflow-x:hidden;overflow-y:auto;margin-right:8px;background-color:#fff}.miam-recipe-addon .miam-recipe-addon__content::-webkit-scrollbar-button{height:20px}.miam-recipe-addon .miam-recipe-addon__content::-webkit-scrollbar-track{background:var(--m-color-grey)}.miam-recipe-addon .miam-recipe-addon__content::-webkit-scrollbar{cursor:-webkit-grab;height:7px;width:5px}.miam-recipe-addon .miam-recipe-addon__content::-webkit-scrollbar-thumb{background:var(--m-color-primary);border-radius:5px}.miam-recipe-addon .miam-recipe-addon__content .miam-recipe-addon__content__iframe{height:calc(100dvh - 98px);width:100%}.miam-recipe-addon__loader{height:100%;width:100%;display:flex;justify-content:center;align-items:center}"], encapsulation: 2, changeDetection: 0 });
23727
+ }, directives: [i2__namespace$1.NgIf, IconComponent, SponsorStorytellingComponent, LoaderComponent], pipes: [SafePipe], styles: [".miam-recipe-addon{height:100%;width:100%;display:flex;flex-direction:column}.miam-recipe-addon .miam-recipe-addon__header{padding:16px;display:flex;justify-content:space-between;align-items:center;box-shadow:0 8px 28px rgba(0,0,0,.07)}.miam-recipe-addon .miam-recipe-addon__header button{max-width:150px;padding:0;color:var(--m-color-black);font-weight:700;font-size:19px;background-color:transparent;border:none}.miam-recipe-addon .miam-recipe-addon__header button ng-miam-icon{margin:0;height:16px;transform:rotate(90deg) scale(1.5)}.miam-recipe-addon .miam-recipe-addon__header button ng-miam-icon svg path{fill:var(--m-color-black)}.miam-recipe-addon .miam-recipe-addon__header button ng-miam-icon svg path:first-of-type{fill:transparent}.miam-recipe-addon .miam-recipe-addon__header button:hover{background-color:transparent;border:none}.miam-recipe-addon .miam-recipe-addon__header button:hover ng-miam-icon svg path{fill:var(--m-color-black)}.miam-recipe-addon .miam-recipe-addon__header button:hover ng-miam-icon svg path:first-of-type{fill:transparent}.miam-recipe-addon .miam-recipe-addon__header button span{margin-left:8px}.miam-recipe-addon .miam-recipe-addon__header img{height:25px}.miam-recipe-addon .miam-recipe-addon__content{background-color:#fff}.miam-recipe-addon .miam-recipe-addon__content .miam-recipe-addon__content__iframe{height:calc(100dvh - 98px);width:100%}.miam-recipe-addon__loader{height:100%;width:100%;display:flex;justify-content:center;align-items:center}"], encapsulation: 2, changeDetection: 0 });
23567
23728
  (function () {
23568
23729
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(RecipeAddonComponent, [{
23569
23730
  type: i0.Component,
@@ -25978,6 +26139,7 @@
25978
26139
  RecipesService,
25979
26140
  RecipeLikesService,
25980
26141
  RecipeDetailsService,
26142
+ BasketTransferService,
25981
26143
  BasketsService,
25982
26144
  BasketEntriesService,
25983
26145
  ItemsService,
@@ -26013,6 +26175,7 @@
26013
26175
  RecipesService,
26014
26176
  RecipeLikesService,
26015
26177
  RecipeDetailsService,
26178
+ BasketTransferService,
26016
26179
  BasketsService,
26017
26180
  BasketEntriesService,
26018
26181
  ItemsService,
@@ -26057,6 +26220,7 @@
26057
26220
  exports.BasketPreviewLine = BasketPreviewLine;
26058
26221
  exports.BasketPreviewLineComponent = BasketPreviewLineComponent;
26059
26222
  exports.BasketPreviewModule = BasketPreviewModule;
26223
+ exports.BasketTransferService = BasketTransferService;
26060
26224
  exports.BasketsComparatorService = BasketsComparatorService;
26061
26225
  exports.BasketsService = BasketsService;
26062
26226
  exports.BasketsSynchronizerService = BasketsSynchronizerService;