ng-miam 9.0.10 → 9.0.12

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 (44) hide show
  1. package/bundles/ng-miam.umd.js +132 -112
  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/_services/basket-transfer.service.js +3 -2
  6. package/esm2015/lib/_services/baskets.service.js +3 -9
  7. package/esm2015/lib/_services/context.service.js +2 -1
  8. package/esm2015/lib/_services/interceptor.service.js +10 -3
  9. package/esm2015/lib/_services/recipe-details.service.js +16 -6
  10. package/esm2015/lib/_services/store-locator.service.js +10 -3
  11. package/esm2015/lib/_services/user.service.js +3 -3
  12. package/esm2015/lib/_types/builded/mealz-interface.js +1 -1
  13. package/esm2015/lib/_web-components/basket-preview/basket-preview-block/basket-preview-block.component.js +3 -2
  14. package/esm2015/lib/_web-components/basket-preview/replace-item/replace-item.component.js +3 -3
  15. package/esm2015/lib/_web-components/no-supplier-onboarding/no-supplier-onboarding.component.js +4 -4
  16. package/esm2015/lib/_web-components/recipe-cards/recipe-card/recipe-card.component.js +68 -70
  17. package/esm2015/lib/_web-components/recipe-cards/recipe-card-cta/recipe-card-cta.component.js +6 -4
  18. package/esm2015/lib/_web-components/recipe-details/recipe-details.component.js +7 -10
  19. package/esm2015/lib/_web-components/recipe-modal/recipe-modal.component.js +7 -2
  20. package/esm2015/lib/environments/version.js +2 -2
  21. package/fesm2015/ng-miam.js +129 -106
  22. package/fesm2015/ng-miam.js.map +1 -1
  23. package/lib/_services/basket-transfer.service.d.ts.map +1 -1
  24. package/lib/_services/baskets.service.d.ts +1 -1
  25. package/lib/_services/baskets.service.d.ts.map +1 -1
  26. package/lib/_services/context.service.d.ts.map +1 -1
  27. package/lib/_services/interceptor.service.d.ts +1 -0
  28. package/lib/_services/interceptor.service.d.ts.map +1 -1
  29. package/lib/_services/recipe-details.service.d.ts +1 -1
  30. package/lib/_services/recipe-details.service.d.ts.map +1 -1
  31. package/lib/_services/store-locator.service.d.ts +1 -0
  32. package/lib/_services/store-locator.service.d.ts.map +1 -1
  33. package/lib/_services/user.service.d.ts +2 -2
  34. package/lib/_services/user.service.d.ts.map +1 -1
  35. package/lib/_types/builded/mealz-interface.d.ts +4 -0
  36. package/lib/_types/builded/mealz-interface.d.ts.map +1 -1
  37. package/lib/_web-components/recipe-cards/recipe-card-cta/recipe-card-cta.component.d.ts +1 -1
  38. package/lib/_web-components/recipe-cards/recipe-card-cta/recipe-card-cta.component.d.ts.map +1 -1
  39. package/lib/_web-components/recipe-details/recipe-details.component.d.ts +1 -1
  40. package/lib/_web-components/recipe-details/recipe-details.component.d.ts.map +1 -1
  41. package/lib/_web-components/recipe-modal/recipe-modal.component.d.ts.map +1 -1
  42. package/lib/environments/version.d.ts +1 -1
  43. package/lib/environments/version.d.ts.map +1 -1
  44. package/package.json +1 -1
@@ -3730,7 +3730,7 @@
3730
3730
  _this.ignoredBasketsService.resetIgnoredIngredients();
3731
3731
  }
3732
3732
  _this.initRoles();
3733
- return rxjs.combineLatest([_this.initProvider(), _this.initSupplier()]); // forkJoin does not work with BehaviorSubject as it never completes
3733
+ return rxjs.combineLatest([_this.initProvider(), _this.initSupplier()]);
3734
3734
  }), operators.skipWhile(function (res) { return res[0] === undefined || res[1] === undefined; }), operators.take(1));
3735
3735
  };
3736
3736
  UserService.prototype.resetUserInfo = function () {
@@ -4177,7 +4177,7 @@
4177
4177
  }], function () { return [{ type: i1__namespace$1.HttpClient }]; }, null);
4178
4178
  })();
4179
4179
 
4180
- var VERSION = '9.0.8'; // TODO: replace by ##VERSION## and update it in the CI/CD
4180
+ var VERSION = '9.0.11'; // TODO: replace by ##VERSION## and update it in the CI/CD
4181
4181
 
4182
4182
  /**
4183
4183
  * Analytics library cannot refer to "this." so we use a global variable
@@ -4768,6 +4768,7 @@
4768
4768
  this.storeLocatorOpened$ = new rxjs.BehaviorSubject(false);
4769
4769
  this.newStoreSelected$ = new rxjs.Subject();
4770
4770
  this.closeModalOnSelected = false;
4771
+ this.closeModalOnCancel = false;
4771
4772
  this.showStoreLocatorWarning = new rxjs.BehaviorSubject(false);
4772
4773
  this.showNoSupplierOnboarding = new rxjs.BehaviorSubject(false);
4773
4774
  this.changePosAfterWarnConfirm = true;
@@ -4797,7 +4798,8 @@
4797
4798
  }
4798
4799
  };
4799
4800
  StoreLocatorService.prototype.isStoreLocatorWarningNeeded = function (supplierId) {
4800
- return /Mobi|Android|iPhone/i.test(navigator.userAgent) && supplierId === '7';
4801
+ // return /Mobi|Android|iPhone/i.test(navigator.userAgent) && supplierId === '7';
4802
+ return false; // deactivated for now
4801
4803
  };
4802
4804
  StoreLocatorService.prototype.changePos = function () {
4803
4805
  var _this = this;
@@ -4819,7 +4821,12 @@
4819
4821
  };
4820
4822
  StoreLocatorService.prototype.closeStoreLocator = function () {
4821
4823
  if (this.storeLocatorOpened$.value) {
4822
- mealzSharedAnalytics.sendLocatorCloseEvent(url(this.storeLocatorEventTrace.originPath + "/locator"), ((Date.now() - this.storeLocatorOpenedTimestamp) / 1000).toString());
4824
+ if (this.storeLocatorEventTrace) {
4825
+ mealzSharedAnalytics.sendLocatorCloseEvent(url(this.storeLocatorEventTrace.originPath + "/locator"), ((Date.now() - this.storeLocatorOpenedTimestamp) / 1000).toString());
4826
+ }
4827
+ else {
4828
+ this.closeModalOnCancel = true;
4829
+ }
4823
4830
  this.storeLocatorOpenedTimestamp = 0;
4824
4831
  }
4825
4832
  this.storeLocatorOpened$.next(false);
@@ -5702,20 +5709,13 @@
5702
5709
  * Fetches the BasketEntry for an ingredient if it exists
5703
5710
  * Returns a fake BasketEntry with id = -1 if it doesn't exist
5704
5711
  */
5705
- BasketsService.prototype.basketEntryFromIngredient = function (ingredientId, guests, onlyQuantity, selectedItemId) {
5712
+ BasketsService.prototype.basketEntryFromIngredient = function (ingredientId, guests, selectedItemId) {
5706
5713
  var _this = this;
5707
- if (onlyQuantity === void 0) { onlyQuantity = false; }
5708
5714
  return this.waitForBasket.pipe(operators.switchMap(function (basket) {
5709
- var url = environment$1.miamAPI + "/api/v1/baskets/" + basket.id + "/basket-entries/from-ingredient?ingredient_id=" + ingredientId + "&guests=" + guests;
5715
+ var url = environment$1.miamAPI + "/api/v1/baskets/" + basket.id + "/basket-entries/from-ingredient?ingredient_id=" + ingredientId + "&guests=" + guests + "&include=selected-item";
5710
5716
  if (selectedItemId) {
5711
5717
  url += "&selected_item_id=" + selectedItemId;
5712
5718
  }
5713
- if (onlyQuantity) {
5714
- url += '&fields[basket-entries]=quantity,quantity-to-add';
5715
- }
5716
- else {
5717
- url += '&include=selected-item';
5718
- }
5719
5719
  return _this.http.get(url);
5720
5720
  }), operators.skipWhile(function (result) { return !result; }), operators.map(function (res) {
5721
5721
  var entry = _this.basketEntriesService.new();
@@ -7521,6 +7521,7 @@
7521
7521
  },
7522
7522
  getByAddress: this.posService.getByAddress.bind(this.posService),
7523
7523
  getByCoordinates: this.posService.getByCoordinates.bind(this.posService),
7524
+ openNoSupplierOnboarding: function () { return _this.storeLocatorService.showNoSupplierOnboarding.next(true); }
7524
7525
  },
7525
7526
  recipes: {
7526
7527
  hidden: this.recipesService.hidden,
@@ -9116,7 +9117,8 @@
9116
9117
  BasketTransferService.prototype.navigateToTransferUrl = function () {
9117
9118
  var transferUrl = sessionStorage.getItem('_miam/transferUrl');
9118
9119
  if (transferUrl) {
9119
- window.open(transferUrl, '_blank');
9120
+ // Apparently Safari blocks window.open(..., "_blank") if called in an async function and setTimeout makes it run on the main thread
9121
+ setTimeout(function () { return window.open(transferUrl, '_blank'); });
9120
9122
  }
9121
9123
  };
9122
9124
  BasketTransferService.prototype.abortTransfer = function () {
@@ -9400,7 +9402,7 @@
9400
9402
  request = request.clone({ withCredentials: true });
9401
9403
  request = this.setUserProfiling(request);
9402
9404
  request = this.setSessionId(request);
9403
- return this.context.origin.pipe(operators.skipWhile(function (origin) { return !origin; }), operators.take(1), operators.switchMap(function () {
9405
+ return this.context.origin.pipe(operators.skipWhile(function (origin) { return !origin; }), operators.switchMap(function () { return rxjs.combineLatest([_this.usersService.userInfo$, _this.usersService.generatingAuthlessId$]); }), operators.skipWhile(function () { return _this.shouldWaitForAuthentication(request); }), operators.take(1), operators.switchMap(function () {
9404
9406
  request = _this.setMiamHeaders(request);
9405
9407
  return next.handle(request).pipe(operators.map(function (event) {
9406
9408
  var _a;
@@ -9482,6 +9484,13 @@
9482
9484
  this.context.setCORSIssueState(true);
9483
9485
  }
9484
9486
  };
9487
+ MiamInterceptor.prototype.shouldWaitForAuthentication = function (request) {
9488
+ // Skip all requests except the ones which sets the user / authless until we have a user / authless
9489
+ if (request.url.includes('user_info') || request.url.includes('users/authless')) {
9490
+ return false;
9491
+ }
9492
+ return !localStorage.getItem('_miam/userId') && !localStorage.getItem('_miam/authlessId');
9493
+ };
9485
9494
  return MiamInterceptor;
9486
9495
  }());
9487
9496
  MiamInterceptor.ɵfac = function MiamInterceptor_Factory(t) { return new (t || MiamInterceptor)(i0__namespace.ɵɵinject(ContextService), i0__namespace.ɵɵinject(UserService)); };
@@ -9801,7 +9810,7 @@
9801
9810
  this.recipeLoading$ = new rxjs.BehaviorSubject(false);
9802
9811
  this.basketEntryToReplace$ = new rxjs.BehaviorSubject(null);
9803
9812
  this.updateFooterDisplay$ = new rxjs.Subject();
9804
- this.displayEventWasSent = false;
9813
+ this.pageviewEventWasSent = false;
9805
9814
  this.onlyShowPreparation = false;
9806
9815
  this.noPosDisplay = false;
9807
9816
  this.invalidPosDisplay = false;
@@ -10016,14 +10025,24 @@
10016
10025
  if (!fromInit) {
10017
10026
  this.ingredientToBasketLoading = true;
10018
10027
  }
10019
- var basketEntries$ = this.recipe.ingredients.map(function (ingredient) { return _this.basketsService.basketEntryFromIngredient(ingredient.id, _this.recipe.modifiedGuests, !fromInit).pipe(operators.map(function (basketEntry) { return ({ ingredient: ingredient, basketEntry: basketEntry }); })); });
10028
+ var basketEntries$ = this.recipe.ingredients.map(function (ingredient) { return _this.basketsService.basketEntryFromIngredient(ingredient.id, _this.recipe.modifiedGuests).pipe(operators.map(function (basketEntry) { return ({ ingredient: ingredient, basketEntry: basketEntry }); })); });
10020
10029
  return rxjs.forkJoin(basketEntries$).pipe(operators.switchMap(function (basketEntriesResult) {
10021
- if (fromInit) {
10030
+ var updateProducts = function () {
10022
10031
  _this.products = basketEntriesResult;
10023
- return _this.setProductsByCategory();
10032
+ _this.setProductsByCategory();
10033
+ };
10034
+ if (fromInit) {
10035
+ updateProducts();
10036
+ return rxjs.of([]);
10024
10037
  }
10025
10038
  else {
10026
- _this.updatePriceOnGuestChange(basketEntriesResult);
10039
+ var hasSelectedItemChanged = basketEntriesResult.some(function (incomingProduct) { return _this.products.some(function (p) { return p.basketEntry.attributes['selected-item-id'] ===
10040
+ incomingProduct.basketEntry.attributes['selected-item-id']; }); });
10041
+ // If at least one selected item has changed, we need to refresh categories
10042
+ // and prices entirely instead of only updating quantities
10043
+ hasSelectedItemChanged
10044
+ ? updateProducts()
10045
+ : _this.updatePriceOnGuestChange(basketEntriesResult);
10027
10046
  return rxjs.of(_this.products);
10028
10047
  }
10029
10048
  }), operators.switchMap(function () { return rxjs.of(_this.products); }));
@@ -16995,7 +17014,7 @@
16995
17014
  _this.rollbackReplace();
16996
17015
  });
16997
17016
  this.basketSynchroService.addToActionList([removeIngredient]);
16998
- this.subscriptions.push(this.basketsService.basketEntryFromIngredient(this.ingredient.id, +this.recipe.modifiedGuests, true, item.id).pipe(operators.switchMap(function (newEntry) {
17017
+ this.subscriptions.push(this.basketsService.basketEntryFromIngredient(this.ingredient.id, +this.recipe.modifiedGuests, item.id).pipe(operators.switchMap(function (newEntry) {
16999
17018
  var newBasketEntry = deepCloneWithClass(_this.basketEntry);
17000
17019
  newBasketEntry.quantityToAdd = newEntry.quantityToAdd;
17001
17020
  _this.replaceRelationship(newBasketEntry, item);
@@ -17023,7 +17042,7 @@
17023
17042
  };
17024
17043
  ReplaceItemComponent.prototype.addToBasket = function (item) {
17025
17044
  var _this = this;
17026
- this.subscriptions.push(this.recipeDetailsService.canAddProductToBasket(this.getAddIngredientMethod(), this.eventTrace).pipe(operators.filter(function (passed) { return passed; }), operators.switchMap(function () { return _this.basketsService.basketEntryFromIngredient(_this.ingredient.id, +_this.recipe.modifiedGuests, true, item.id); })).subscribe(function (newEntry) { return _this.handleAddToBasketResponse(newEntry); }));
17045
+ this.subscriptions.push(this.recipeDetailsService.canAddProductToBasket(this.getAddIngredientMethod(), this.eventTrace).pipe(operators.filter(function (passed) { return passed; }), operators.switchMap(function () { return _this.basketsService.basketEntryFromIngredient(_this.ingredient.id, +_this.recipe.modifiedGuests, item.id); })).subscribe(function (newEntry) { return _this.handleAddToBasketResponse(newEntry); }));
17027
17046
  this.cdr.detectChanges();
17028
17047
  };
17029
17048
  ReplaceItemComponent.prototype.getAddIngredientMethod = function () {
@@ -17633,12 +17652,13 @@
17633
17652
  }
17634
17653
  };
17635
17654
  BasketPreviewBlockComponent.prototype.ngOnChanges = function (changes) {
17655
+ var _a;
17636
17656
  if (Object.keys(changes).includes('recipeId')) {
17637
17657
  this.loading.next(true);
17638
17658
  }
17639
17659
  if (changes.isStoreLocatorDisplayed &&
17640
17660
  changes.isStoreLocatorDisplayed.previousValue !== changes.isStoreLocatorDisplayed.currentValue &&
17641
- !this.isStoreLocatorDisplayed) {
17661
+ !this.isStoreLocatorDisplayed && ((_a = this.recipeService.displayedRecipe$.value) === null || _a === void 0 ? void 0 : _a.previewMode)) {
17642
17662
  this.pageview();
17643
17663
  }
17644
17664
  };
@@ -17692,8 +17712,8 @@
17692
17712
  recipe: recipe,
17693
17713
  basketEntries: basketEntries
17694
17714
  }); }));
17695
- })).subscribe(function (_a) {
17696
- var recipe = _a.recipe, basketEntries = _a.basketEntries;
17715
+ })).subscribe(function (_b) {
17716
+ var recipe = _b.recipe, basketEntries = _b.basketEntries;
17697
17717
  var clonedEntries = deepCloneWithClass(basketEntries);
17698
17718
  var matchedProducts = clonedEntries.map(function (basketEntry, index) { return ({
17699
17719
  basketEntry: basketEntry,
@@ -19333,7 +19353,7 @@
19333
19353
  var _r5_1 = i0__namespace.ɵɵgetCurrentView();
19334
19354
  i0__namespace.ɵɵelementStart(0, "div", 1);
19335
19355
  i0__namespace.ɵɵelementStart(1, "button", 2);
19336
- i0__namespace.ɵɵlistener("click", function RecipeCardCtaComponent_div_0_Template_button_click_1_listener() { i0__namespace.ɵɵrestoreView(_r5_1); var ctx_r4 = i0__namespace.ɵɵnextContext(); return ctx_r4.openRecipe(); });
19356
+ i0__namespace.ɵɵlistener("click", function RecipeCardCtaComponent_div_0_Template_button_click_1_listener($event) { i0__namespace.ɵɵrestoreView(_r5_1); var ctx_r4 = i0__namespace.ɵɵnextContext(); return ctx_r4.openRecipe($event); });
19337
19357
  i0__namespace.ɵɵtemplate(2, RecipeCardCtaComponent_div_0_ng_container_2_Template, 2, 0, "ng-container", 3);
19338
19358
  i0__namespace.ɵɵpipe(3, "async");
19339
19359
  i0__namespace.ɵɵtemplate(4, RecipeCardCtaComponent_div_0_ng_template_4_Template, 1, 0, "ng-template", null, 4, i0__namespace.ɵɵtemplateRefExtractor);
@@ -19443,8 +19463,9 @@
19443
19463
  RecipeCardCtaComponent.prototype.currentPath = function () {
19444
19464
  return '';
19445
19465
  };
19446
- RecipeCardCtaComponent.prototype.openRecipe = function () {
19466
+ RecipeCardCtaComponent.prototype.openRecipe = function (event) {
19447
19467
  // const videoEvent = this.contextService.videoRecipesEnabled && this.recipe.videoId;
19468
+ event.stopPropagation();
19448
19469
  this.clicked.emit();
19449
19470
  this.recipeService.displayObject(this.recipe, {
19450
19471
  previewAllowed: this.previewAllowed,
@@ -19452,6 +19473,7 @@
19452
19473
  displayGuests: this.displayGuests,
19453
19474
  helpButtonAllowed: this.helpButtonAllowed
19454
19475
  }, this.eventTrace);
19476
+ mealzSharedAnalytics.sendRecipeDisplayEvent(this.path, this.recipe.id, this.eventTrace.props.category_id);
19455
19477
  this.displayed.emit();
19456
19478
  };
19457
19479
  RecipeCardCtaComponent.prototype.sendShowEvent = function () {
@@ -19504,36 +19526,32 @@
19504
19526
  }] });
19505
19527
  })();
19506
19528
 
19507
- function RecipeCardComponent_div_1_div_7_ng_template_1_ng_miam_like_button_0_Template(rf, ctx) {
19529
+ function RecipeCardComponent_div_1_div_7_ng_miam_like_button_1_Template(rf, ctx) {
19508
19530
  if (rf & 1) {
19509
- i0__namespace.ɵɵelement(0, "ng-miam-like-button", 30);
19531
+ i0__namespace.ɵɵelement(0, "ng-miam-like-button", 29);
19510
19532
  }
19511
19533
  if (rf & 2) {
19512
- var ctx_r13 = i0__namespace.ɵɵnextContext(4);
19513
- i0__namespace.ɵɵproperty("recipe", ctx_r13.recipe)("originTrace", ctx_r13.eventTrace);
19514
- }
19515
- }
19516
- function RecipeCardComponent_div_1_div_7_ng_template_1_Template(rf, ctx) {
19517
- if (rf & 1) {
19518
- i0__namespace.ɵɵtemplate(0, RecipeCardComponent_div_1_div_7_ng_template_1_ng_miam_like_button_0_Template, 1, 2, "ng-miam-like-button", 24);
19519
- i0__namespace.ɵɵpipe(1, "async");
19520
- }
19521
- if (rf & 2) {
19522
- var ctx_r12 = i0__namespace.ɵɵnextContext(3);
19523
- i0__namespace.ɵɵproperty("ngIf", !ctx_r12.displayLikesBottom && i0__namespace.ɵɵpipeBind1(1, 1, ctx_r12.userService.isLogged$));
19534
+ var ctx_r11 = i0__namespace.ɵɵnextContext(3);
19535
+ i0__namespace.ɵɵproperty("recipe", ctx_r11.recipe)("originTrace", ctx_r11.eventTrace);
19524
19536
  }
19525
19537
  }
19526
19538
  function RecipeCardComponent_div_1_div_7_Template(rf, ctx) {
19527
19539
  if (rf & 1) {
19528
19540
  i0__namespace.ɵɵelementStart(0, "div", 28);
19529
- i0__namespace.ɵɵtemplate(1, RecipeCardComponent_div_1_div_7_ng_template_1_Template, 2, 3, "ng-template", null, 29, i0__namespace.ɵɵtemplateRefExtractor);
19541
+ i0__namespace.ɵɵtemplate(1, RecipeCardComponent_div_1_div_7_ng_miam_like_button_1_Template, 1, 2, "ng-miam-like-button", 24);
19542
+ i0__namespace.ɵɵpipe(2, "async");
19530
19543
  i0__namespace.ɵɵelementEnd();
19531
19544
  }
19545
+ if (rf & 2) {
19546
+ var ctx_r1 = i0__namespace.ɵɵnextContext(2);
19547
+ i0__namespace.ɵɵadvance(1);
19548
+ i0__namespace.ɵɵproperty("ngIf", !ctx_r1.displayLikesBottom && i0__namespace.ɵɵpipeBind1(2, 1, ctx_r1.userService.isLogged$));
19549
+ }
19532
19550
  }
19533
19551
  function RecipeCardComponent_div_1_div_8_Template(rf, ctx) {
19534
19552
  if (rf & 1) {
19535
- i0__namespace.ɵɵelementStart(0, "div", 31);
19536
- i0__namespace.ɵɵelement(1, "img", 32);
19553
+ i0__namespace.ɵɵelementStart(0, "div", 30);
19554
+ i0__namespace.ɵɵelement(1, "img", 31);
19537
19555
  i0__namespace.ɵɵelementEnd();
19538
19556
  }
19539
19557
  if (rf & 2) {
@@ -19544,19 +19562,19 @@
19544
19562
  }
19545
19563
  function RecipeCardComponent_div_1_div_9_img_1_Template(rf, ctx) {
19546
19564
  if (rf & 1) {
19547
- i0__namespace.ɵɵelement(0, "img", 36);
19565
+ i0__namespace.ɵɵelement(0, "img", 35);
19548
19566
  }
19549
19567
  }
19550
19568
  function RecipeCardComponent_div_1_div_9_img_2_Template(rf, ctx) {
19551
19569
  if (rf & 1) {
19552
- i0__namespace.ɵɵelement(0, "img", 37);
19570
+ i0__namespace.ɵɵelement(0, "img", 36);
19553
19571
  }
19554
19572
  }
19555
19573
  function RecipeCardComponent_div_1_div_9_Template(rf, ctx) {
19556
19574
  if (rf & 1) {
19557
- i0__namespace.ɵɵelementStart(0, "div", 33);
19558
- i0__namespace.ɵɵtemplate(1, RecipeCardComponent_div_1_div_9_img_1_Template, 1, 0, "img", 34);
19559
- i0__namespace.ɵɵtemplate(2, RecipeCardComponent_div_1_div_9_img_2_Template, 1, 0, "img", 35);
19575
+ i0__namespace.ɵɵelementStart(0, "div", 32);
19576
+ i0__namespace.ɵɵtemplate(1, RecipeCardComponent_div_1_div_9_img_1_Template, 1, 0, "img", 33);
19577
+ i0__namespace.ɵɵtemplate(2, RecipeCardComponent_div_1_div_9_img_2_Template, 1, 0, "img", 34);
19560
19578
  i0__namespace.ɵɵelementEnd();
19561
19579
  }
19562
19580
  if (rf & 2) {
@@ -19570,31 +19588,31 @@
19570
19588
  }
19571
19589
  function RecipeCardComponent_div_1_div_19_div_5_Template(rf, ctx) {
19572
19590
  if (rf & 1) {
19573
- i0__namespace.ɵɵelementStart(0, "div", 43);
19591
+ i0__namespace.ɵɵelementStart(0, "div", 42);
19574
19592
  i0__namespace.ɵɵtext(1);
19575
19593
  i0__namespace.ɵɵelementEnd();
19576
19594
  }
19577
19595
  if (rf & 2) {
19578
- var ctx_r16 = i0__namespace.ɵɵnextContext(3);
19596
+ var ctx_r14 = i0__namespace.ɵɵnextContext(3);
19579
19597
  i0__namespace.ɵɵadvance(1);
19580
- i0__namespace.ɵɵtextInterpolate1(" + ", ctx_r16.recipe.modifiedIngredients.length - 2, " ");
19598
+ i0__namespace.ɵɵtextInterpolate1(" + ", ctx_r14.recipe.modifiedIngredients.length - 2, " ");
19581
19599
  }
19582
19600
  }
19583
19601
  function RecipeCardComponent_div_1_div_19_Template(rf, ctx) {
19584
19602
  if (rf & 1) {
19585
- var _r18_1 = i0__namespace.ɵɵgetCurrentView();
19586
- i0__namespace.ɵɵelementStart(0, "div", 38);
19587
- i0__namespace.ɵɵelementStart(1, "div", 39);
19588
- i0__namespace.ɵɵelementStart(2, "img", 40);
19589
- i0__namespace.ɵɵlistener("error", function RecipeCardComponent_div_1_div_19_Template_img_error_2_listener($event) { i0__namespace.ɵɵrestoreView(_r18_1); var ctx_r17 = i0__namespace.ɵɵnextContext(2); return ($event.target["src"] = ctx_r17.contextService.defaultIngredientPicture); });
19603
+ var _r16_1 = i0__namespace.ɵɵgetCurrentView();
19604
+ i0__namespace.ɵɵelementStart(0, "div", 37);
19605
+ i0__namespace.ɵɵelementStart(1, "div", 38);
19606
+ i0__namespace.ɵɵelementStart(2, "img", 39);
19607
+ i0__namespace.ɵɵlistener("error", function RecipeCardComponent_div_1_div_19_Template_img_error_2_listener($event) { i0__namespace.ɵɵrestoreView(_r16_1); var ctx_r15 = i0__namespace.ɵɵnextContext(2); return ($event.target["src"] = ctx_r15.contextService.defaultIngredientPicture); });
19590
19608
  i0__namespace.ɵɵelementEnd();
19591
19609
  i0__namespace.ɵɵelementEnd();
19592
- i0__namespace.ɵɵelementStart(3, "div", 39);
19593
- i0__namespace.ɵɵelementStart(4, "img", 41);
19594
- i0__namespace.ɵɵlistener("error", function RecipeCardComponent_div_1_div_19_Template_img_error_4_listener($event) { i0__namespace.ɵɵrestoreView(_r18_1); var ctx_r19 = i0__namespace.ɵɵnextContext(2); return ($event.target["src"] = ctx_r19.contextService.defaultIngredientPicture); });
19610
+ i0__namespace.ɵɵelementStart(3, "div", 38);
19611
+ i0__namespace.ɵɵelementStart(4, "img", 40);
19612
+ i0__namespace.ɵɵlistener("error", function RecipeCardComponent_div_1_div_19_Template_img_error_4_listener($event) { i0__namespace.ɵɵrestoreView(_r16_1); var ctx_r17 = i0__namespace.ɵɵnextContext(2); return ($event.target["src"] = ctx_r17.contextService.defaultIngredientPicture); });
19595
19613
  i0__namespace.ɵɵelementEnd();
19596
19614
  i0__namespace.ɵɵelementEnd();
19597
- i0__namespace.ɵɵtemplate(5, RecipeCardComponent_div_1_div_19_div_5_Template, 2, 1, "div", 42);
19615
+ i0__namespace.ɵɵtemplate(5, RecipeCardComponent_div_1_div_19_div_5_Template, 2, 1, "div", 41);
19598
19616
  i0__namespace.ɵɵelementEnd();
19599
19617
  }
19600
19618
  if (rf & 2) {
@@ -19609,39 +19627,39 @@
19609
19627
  }
19610
19628
  function RecipeCardComponent_div_1_div_22_div_1_Template(rf, ctx) {
19611
19629
  if (rf & 1) {
19612
- i0__namespace.ɵɵelementStart(0, "div", 47);
19613
- i0__namespace.ɵɵelement(1, "img", 48);
19614
- i0__namespace.ɵɵelementStart(2, "span", 49);
19630
+ i0__namespace.ɵɵelementStart(0, "div", 46);
19631
+ i0__namespace.ɵɵelement(1, "img", 47);
19632
+ i0__namespace.ɵɵelementStart(2, "span", 48);
19615
19633
  i0__namespace.ɵɵtext(3);
19616
19634
  i0__namespace.ɵɵelementEnd();
19617
19635
  i0__namespace.ɵɵelementEnd();
19618
19636
  }
19619
19637
  if (rf & 2) {
19620
- var ctx_r20 = i0__namespace.ɵɵnextContext(3);
19638
+ var ctx_r18 = i0__namespace.ɵɵnextContext(3);
19621
19639
  i0__namespace.ɵɵadvance(3);
19622
- i0__namespace.ɵɵtextInterpolate(ctx_r20.recipeService.difficultyLevels[ctx_r20.recipe.difficulty - 1].label);
19640
+ i0__namespace.ɵɵtextInterpolate(ctx_r18.recipeService.difficultyLevels[ctx_r18.recipe.difficulty - 1].label);
19623
19641
  }
19624
19642
  }
19625
19643
  function RecipeCardComponent_div_1_div_22_div_2_Template(rf, ctx) {
19626
19644
  if (rf & 1) {
19627
- i0__namespace.ɵɵelementStart(0, "div", 50);
19628
- i0__namespace.ɵɵelement(1, "img", 51);
19629
- i0__namespace.ɵɵelementStart(2, "span", 49);
19645
+ i0__namespace.ɵɵelementStart(0, "div", 49);
19646
+ i0__namespace.ɵɵelement(1, "img", 50);
19647
+ i0__namespace.ɵɵelementStart(2, "span", 48);
19630
19648
  i0__namespace.ɵɵtext(3);
19631
19649
  i0__namespace.ɵɵelementEnd();
19632
19650
  i0__namespace.ɵɵelementEnd();
19633
19651
  }
19634
19652
  if (rf & 2) {
19635
- var ctx_r21 = i0__namespace.ɵɵnextContext(3);
19653
+ var ctx_r19 = i0__namespace.ɵɵnextContext(3);
19636
19654
  i0__namespace.ɵɵadvance(3);
19637
- i0__namespace.ɵɵtextInterpolate(ctx_r21.recipe.totalTime);
19655
+ i0__namespace.ɵɵtextInterpolate(ctx_r19.recipe.totalTime);
19638
19656
  }
19639
19657
  }
19640
19658
  function RecipeCardComponent_div_1_div_22_Template(rf, ctx) {
19641
19659
  if (rf & 1) {
19642
- i0__namespace.ɵɵelementStart(0, "div", 44);
19643
- i0__namespace.ɵɵtemplate(1, RecipeCardComponent_div_1_div_22_div_1_Template, 4, 1, "div", 45);
19644
- i0__namespace.ɵɵtemplate(2, RecipeCardComponent_div_1_div_22_div_2_Template, 4, 1, "div", 46);
19660
+ i0__namespace.ɵɵelementStart(0, "div", 43);
19661
+ i0__namespace.ɵɵtemplate(1, RecipeCardComponent_div_1_div_22_div_1_Template, 4, 1, "div", 44);
19662
+ i0__namespace.ɵɵtemplate(2, RecipeCardComponent_div_1_div_22_div_2_Template, 4, 1, "div", 45);
19645
19663
  i0__namespace.ɵɵelementEnd();
19646
19664
  }
19647
19665
  if (rf & 2) {
@@ -19654,8 +19672,8 @@
19654
19672
  }
19655
19673
  function RecipeCardComponent_div_1_div_23_Template(rf, ctx) {
19656
19674
  if (rf & 1) {
19657
- i0__namespace.ɵɵelementStart(0, "div", 52);
19658
- i0__namespace.ɵɵelement(1, "ng-miam-recipe-pricing", 53);
19675
+ i0__namespace.ɵɵelementStart(0, "div", 51);
19676
+ i0__namespace.ɵɵelement(1, "ng-miam-recipe-pricing", 52);
19659
19677
  i0__namespace.ɵɵelementEnd();
19660
19678
  }
19661
19679
  if (rf & 2) {
@@ -19666,7 +19684,7 @@
19666
19684
  }
19667
19685
  function RecipeCardComponent_div_1_ng_miam_like_button_25_Template(rf, ctx) {
19668
19686
  if (rf & 1) {
19669
- i0__namespace.ɵɵelement(0, "ng-miam-like-button", 30);
19687
+ i0__namespace.ɵɵelement(0, "ng-miam-like-button", 29);
19670
19688
  }
19671
19689
  if (rf & 2) {
19672
19690
  var ctx_r7 = i0__namespace.ɵɵnextContext(2);
@@ -19675,9 +19693,9 @@
19675
19693
  }
19676
19694
  function RecipeCardComponent_div_1_ng_miam_recipe_card_cta_27_Template(rf, ctx) {
19677
19695
  if (rf & 1) {
19678
- var _r23_1 = i0__namespace.ɵɵgetCurrentView();
19679
- i0__namespace.ɵɵelementStart(0, "ng-miam-recipe-card-cta", 54);
19680
- i0__namespace.ɵɵlistener("displayed", function RecipeCardComponent_div_1_ng_miam_recipe_card_cta_27_Template_ng_miam_recipe_card_cta_displayed_0_listener() { i0__namespace.ɵɵrestoreView(_r23_1); var ctx_r22 = i0__namespace.ɵɵnextContext(2); return ctx_r22.displayed.emit(); })("clicked", function RecipeCardComponent_div_1_ng_miam_recipe_card_cta_27_Template_ng_miam_recipe_card_cta_clicked_0_listener($event) { i0__namespace.ɵɵrestoreView(_r23_1); var ctx_r24 = i0__namespace.ɵɵnextContext(2); return ctx_r24.primaryButtonClicked$.emit($event); });
19696
+ var _r21_1 = i0__namespace.ɵɵgetCurrentView();
19697
+ i0__namespace.ɵɵelementStart(0, "ng-miam-recipe-card-cta", 53);
19698
+ i0__namespace.ɵɵlistener("displayed", function RecipeCardComponent_div_1_ng_miam_recipe_card_cta_27_Template_ng_miam_recipe_card_cta_displayed_0_listener() { i0__namespace.ɵɵrestoreView(_r21_1); var ctx_r20 = i0__namespace.ɵɵnextContext(2); return ctx_r20.displayed.emit(); })("clicked", function RecipeCardComponent_div_1_ng_miam_recipe_card_cta_27_Template_ng_miam_recipe_card_cta_clicked_0_listener($event) { i0__namespace.ɵɵrestoreView(_r21_1); var ctx_r22 = i0__namespace.ɵɵnextContext(2); return ctx_r22.primaryButtonClicked$.emit($event); });
19681
19699
  i0__namespace.ɵɵelementEnd();
19682
19700
  }
19683
19701
  if (rf & 2) {
@@ -19687,17 +19705,17 @@
19687
19705
  }
19688
19706
  function RecipeCardComponent_div_1_div_28_Template(rf, ctx) {
19689
19707
  if (rf & 1) {
19690
- var _r26_1 = i0__namespace.ɵɵgetCurrentView();
19691
- i0__namespace.ɵɵelementStart(0, "div", 55);
19692
- i0__namespace.ɵɵelementStart(1, "button", 56);
19693
- i0__namespace.ɵɵlistener("click", function RecipeCardComponent_div_1_div_28_Template_button_click_1_listener() { i0__namespace.ɵɵrestoreView(_r26_1); var ctx_r25 = i0__namespace.ɵɵnextContext(2); return ctx_r25.openCatalog.emit(); });
19708
+ var _r24_1 = i0__namespace.ɵɵgetCurrentView();
19709
+ i0__namespace.ɵɵelementStart(0, "div", 54);
19710
+ i0__namespace.ɵɵelementStart(1, "button", 55);
19711
+ i0__namespace.ɵɵlistener("click", function RecipeCardComponent_div_1_div_28_Template_button_click_1_listener() { i0__namespace.ɵɵrestoreView(_r24_1); var ctx_r23 = i0__namespace.ɵɵnextContext(2); return ctx_r23.openCatalog.emit(); });
19694
19712
  i0__namespace.ɵɵelementStart(2, "span");
19695
- i0__namespace.ɵɵi18n(3, 57);
19713
+ i0__namespace.ɵɵi18n(3, 56);
19696
19714
  i0__namespace.ɵɵelementEnd();
19697
19715
  i0__namespace.ɵɵelementEnd();
19698
- i0__namespace.ɵɵelementStart(4, "button", 58);
19699
- i0__namespace.ɵɵlistener("click", function RecipeCardComponent_div_1_div_28_Template_button_click_4_listener() { i0__namespace.ɵɵrestoreView(_r26_1); var ctx_r27 = i0__namespace.ɵɵnextContext(2); return ctx_r27.removeFromMealsPlanner.emit(); });
19700
- i0__namespace.ɵɵelement(5, "ng-miam-icon", 59);
19716
+ i0__namespace.ɵɵelementStart(4, "button", 57);
19717
+ i0__namespace.ɵɵlistener("click", function RecipeCardComponent_div_1_div_28_Template_button_click_4_listener() { i0__namespace.ɵɵrestoreView(_r24_1); var ctx_r25 = i0__namespace.ɵɵnextContext(2); return ctx_r25.removeFromMealsPlanner.emit(); });
19718
+ i0__namespace.ɵɵelement(5, "ng-miam-icon", 58);
19701
19719
  i0__namespace.ɵɵelementEnd();
19702
19720
  i0__namespace.ɵɵelementEnd();
19703
19721
  }
@@ -19709,31 +19727,31 @@
19709
19727
  }
19710
19728
  function RecipeCardComponent_div_1_button_29_Template(rf, ctx) {
19711
19729
  if (rf & 1) {
19712
- var _r29_1 = i0__namespace.ɵɵgetCurrentView();
19713
- i0__namespace.ɵɵelementStart(0, "button", 56);
19714
- i0__namespace.ɵɵlistener("click", function RecipeCardComponent_div_1_button_29_Template_button_click_0_listener() { i0__namespace.ɵɵrestoreView(_r29_1); var ctx_r28 = i0__namespace.ɵɵnextContext(2); return ctx_r28.addToMealsPlanner.emit(ctx_r28.recipe); });
19730
+ var _r27_1 = i0__namespace.ɵɵgetCurrentView();
19731
+ i0__namespace.ɵɵelementStart(0, "button", 55);
19732
+ i0__namespace.ɵɵlistener("click", function RecipeCardComponent_div_1_button_29_Template_button_click_0_listener() { i0__namespace.ɵɵrestoreView(_r27_1); var ctx_r26 = i0__namespace.ɵɵnextContext(2); return ctx_r26.addToMealsPlanner.emit(ctx_r26.recipe); });
19715
19733
  i0__namespace.ɵɵelementStart(1, "span");
19716
- i0__namespace.ɵɵi18n(2, 60);
19734
+ i0__namespace.ɵɵi18n(2, 59);
19717
19735
  i0__namespace.ɵɵelementEnd();
19718
19736
  i0__namespace.ɵɵelementEnd();
19719
19737
  }
19720
19738
  }
19721
19739
  function RecipeCardComponent_div_1_Template(rf, ctx) {
19722
19740
  if (rf & 1) {
19723
- var _r31_1 = i0__namespace.ɵɵgetCurrentView();
19741
+ var _r29_1 = i0__namespace.ɵɵgetCurrentView();
19724
19742
  i0__namespace.ɵɵelementStart(0, "div", 2);
19725
- i0__namespace.ɵɵlistener("inViewport", function RecipeCardComponent_div_1_Template_div_inViewport_0_listener() { i0__namespace.ɵɵrestoreView(_r31_1); var ctx_r30 = i0__namespace.ɵɵnextContext(); return ctx_r30.cardInViewport(); });
19743
+ i0__namespace.ɵɵlistener("inViewport", function RecipeCardComponent_div_1_Template_div_inViewport_0_listener() { i0__namespace.ɵɵrestoreView(_r29_1); var ctx_r28 = i0__namespace.ɵɵnextContext(); return ctx_r28.cardInViewport(); });
19726
19744
  i0__namespace.ɵɵelementStart(1, "div", 3);
19727
- i0__namespace.ɵɵlistener("click", function RecipeCardComponent_div_1_Template_div_click_1_listener() { i0__namespace.ɵɵrestoreView(_r31_1); var ctx_r32 = i0__namespace.ɵɵnextContext(); return ctx_r32.openRecipe(); });
19745
+ i0__namespace.ɵɵlistener("click", function RecipeCardComponent_div_1_Template_div_click_1_listener() { i0__namespace.ɵɵrestoreView(_r29_1); var ctx_r30 = i0__namespace.ɵɵnextContext(); return ctx_r30.openRecipe(); });
19728
19746
  i0__namespace.ɵɵelementStart(2, "div", 4);
19729
19747
  i0__namespace.ɵɵelementStart(3, "img", 5);
19730
- i0__namespace.ɵɵlistener("error", function RecipeCardComponent_div_1_Template_img_error_3_listener($event) { i0__namespace.ɵɵrestoreView(_r31_1); var ctx_r33 = i0__namespace.ɵɵnextContext(); return ($event.target["src"] = ctx_r33.contextService.defaultRecipePicture); });
19748
+ i0__namespace.ɵɵlistener("error", function RecipeCardComponent_div_1_Template_img_error_3_listener($event) { i0__namespace.ɵɵrestoreView(_r29_1); var ctx_r31 = i0__namespace.ɵɵnextContext(); return ($event.target["src"] = ctx_r31.contextService.defaultRecipePicture); });
19731
19749
  i0__namespace.ɵɵelementEnd();
19732
19750
  i0__namespace.ɵɵelementEnd();
19733
19751
  i0__namespace.ɵɵelement(4, "div", 6);
19734
19752
  i0__namespace.ɵɵelementStart(5, "div", 7);
19735
19753
  i0__namespace.ɵɵelementStart(6, "div", 8);
19736
- i0__namespace.ɵɵtemplate(7, RecipeCardComponent_div_1_div_7_Template, 3, 0, "div", 9);
19754
+ i0__namespace.ɵɵtemplate(7, RecipeCardComponent_div_1_div_7_Template, 3, 3, "div", 9);
19737
19755
  i0__namespace.ɵɵtemplate(8, RecipeCardComponent_div_1_div_8_Template, 2, 1, "div", 10);
19738
19756
  i0__namespace.ɵɵtemplate(9, RecipeCardComponent_div_1_div_9_Template, 3, 3, "div", 11);
19739
19757
  i0__namespace.ɵɵelementEnd();
@@ -19753,7 +19771,7 @@
19753
19771
  i0__namespace.ɵɵelementEnd();
19754
19772
  i0__namespace.ɵɵelementEnd();
19755
19773
  i0__namespace.ɵɵelementStart(18, "div", 17);
19756
- i0__namespace.ɵɵlistener("click", function RecipeCardComponent_div_1_Template_div_click_18_listener() { i0__namespace.ɵɵrestoreView(_r31_1); var ctx_r34 = i0__namespace.ɵɵnextContext(); return ctx_r34.openRecipe(); });
19774
+ i0__namespace.ɵɵlistener("click", function RecipeCardComponent_div_1_Template_div_click_18_listener() { i0__namespace.ɵɵrestoreView(_r29_1); var ctx_r32 = i0__namespace.ɵɵnextContext(); return ctx_r32.openRecipe(); });
19757
19775
  i0__namespace.ɵɵtemplate(19, RecipeCardComponent_div_1_div_19_Template, 6, 3, "div", 18);
19758
19776
  i0__namespace.ɵɵelementStart(20, "div", 19);
19759
19777
  i0__namespace.ɵɵelementStart(21, "div", 20);
@@ -20026,7 +20044,7 @@
20026
20044
  else {
20027
20045
  i18n_2 = $localize(templateObject_2$j || (templateObject_2$j = __makeTemplateObject([":\u241F8aa969e69241c7c5838b40348f913519d6349371\u241F70397346439942337:Ajouter"], [":\u241F8aa969e69241c7c5838b40348f913519d6349371\u241F70397346439942337:Ajouter"])));
20028
20046
  }
20029
- return [["ngMiamInViewport", "", 1, "miam-recipe-card", 3, "condition", "ngClass", "inViewport"], ["class", "miam-recipe-card__container", "ngMiamInViewport", "", 3, "threshold", "debounceTime", "inViewport", 4, "ngIf"], ["ngMiamInViewport", "", 1, "miam-recipe-card__container", 3, "threshold", "debounceTime", "inViewport"], [1, "miam-recipe-card__top", 3, "click"], [1, "miam-recipe-card__picture"], ["loading", "lazy", 3, "src", "alt", "error"], [1, "miam-recipe-card__gradient"], [1, "miam-recipe-card__content"], [1, "miam-recipe-card__top-container"], ["class", "miam-recipe-card__like", 4, "ngIf"], ["class", "miam-recipe-card__sponsor-container", 4, "ngIf"], ["class", "miam-recipe-card__badge-container", 3, "ngClass", 4, "ngIf"], [1, "miam-recipe-card__picture__bottom"], [1, "miam-recipe-card__title", "miam-ds-text", "weight-xxl", "size-m"], [1, "miam-recipe-card__counter"], [1, "miam-ds-text", "weight-xxl", "size-m"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/recipe-counter.svg", "alt", "people"], [1, "miam-recipe-card__bottom", 3, "click"], ["class", "miam-recipe-card__ingredients__pictures", 4, "ngIf"], [1, "miam-recipe-card__actions"], [1, "miam-recipe-card__infos"], ["class", "miam-recipe-card__difficulty-and-time", 4, "ngIf"], ["class", "miam-recipe-card__price", 4, "ngIf"], [1, "miam-recipe-card__cta"], ["class", "miam-recipe-card__actions__icon", 3, "recipe", "originTrace", 4, "ngIf"], [3, "recipe", "previewAllowed", "displayGuests", "helpButtonAllowed", "originTrace", "displayed", "clicked", 4, "ngIf"], ["class", "miam-recipe-card__actions__replace", 4, "ngIf"], ["class", "miam-ds-button ghost", 3, "click", 4, "ngIf"], [1, "miam-recipe-card__like"], ["like", ""], [1, "miam-recipe-card__actions__icon", 3, "recipe", "originTrace"], [1, "miam-recipe-card__sponsor-container"], ["alt", "sponsor picture", 1, "miam-recipe-card__sponsor-picture", 3, "src"], [1, "miam-recipe-card__badge-container", 3, "ngClass"], ["class", "miam-recipe-card__badge", "src", "https://storage.googleapis.com/assets.miam.tech/generic/images/recipe_card-badge.svg", "alt", "recipe badge", 4, "ngIf"], ["class", "miam-recipe-card__badge", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/9.0/recipe-card-badge-drinks.svg", "alt", "drink badge", 4, "ngIf"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/images/recipe_card-badge.svg", "alt", "recipe badge", 1, "miam-recipe-card__badge"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/9.0/recipe-card-badge-drinks.svg", "alt", "drink badge", 1, "miam-recipe-card__badge"], [1, "miam-recipe-card__ingredients__pictures"], [1, "miam-recipe-card__ingredients__picture"], ["alt", "first ingredient picture", 3, "src", "error"], ["alt", "second ingredient picture", 3, "src", "error"], ["class", "miam-recipe-card__ingredients__more", 4, "ngIf"], [1, "miam-recipe-card__ingredients__more"], [1, "miam-recipe-card__difficulty-and-time"], ["class", "miam-recipe-card__difficulty", 4, "ngIf"], ["class", "miam-recipe-card__time", 4, "ngIf"], [1, "miam-recipe-card__difficulty"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/ChefHat.svg", "alt", "difficulty"], [1, "miam-ds-text", "size-s", "weight-m"], [1, "miam-recipe-card__time"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/Clock.svg", "alt", "time"], [1, "miam-recipe-card__price"], [1, "miam-ds-text", "weight-xxl", 3, "recipeId", "serves", "inViewport"], [3, "recipe", "previewAllowed", "displayGuests", "helpButtonAllowed", "originTrace", "displayed", "clicked"], [1, "miam-recipe-card__actions__replace"], [1, "miam-ds-button", "ghost", 3, "click"], i18n_0, [1, "miam-ds-button", "ghost", "square", 3, "click"], ["primaryColor", "var(--m-color-primary)", 3, "iconName"], i18n_2];
20047
+ return [["ngMiamInViewport", "", 1, "miam-recipe-card", 3, "condition", "ngClass", "inViewport"], ["class", "miam-recipe-card__container", "ngMiamInViewport", "", 3, "threshold", "debounceTime", "inViewport", 4, "ngIf"], ["ngMiamInViewport", "", 1, "miam-recipe-card__container", 3, "threshold", "debounceTime", "inViewport"], [1, "miam-recipe-card__top", 3, "click"], [1, "miam-recipe-card__picture"], ["loading", "lazy", 3, "src", "alt", "error"], [1, "miam-recipe-card__gradient"], [1, "miam-recipe-card__content"], [1, "miam-recipe-card__top-container"], ["class", "miam-recipe-card__like", 4, "ngIf"], ["class", "miam-recipe-card__sponsor-container", 4, "ngIf"], ["class", "miam-recipe-card__badge-container", 3, "ngClass", 4, "ngIf"], [1, "miam-recipe-card__picture__bottom"], [1, "miam-recipe-card__title", "miam-ds-text", "weight-xxl", "size-m"], [1, "miam-recipe-card__counter"], [1, "miam-ds-text", "weight-xxl", "size-m"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/recipe-counter.svg", "alt", "people"], [1, "miam-recipe-card__bottom", 3, "click"], ["class", "miam-recipe-card__ingredients__pictures", 4, "ngIf"], [1, "miam-recipe-card__actions"], [1, "miam-recipe-card__infos"], ["class", "miam-recipe-card__difficulty-and-time", 4, "ngIf"], ["class", "miam-recipe-card__price", 4, "ngIf"], [1, "miam-recipe-card__cta"], ["class", "miam-recipe-card__actions__icon", 3, "recipe", "originTrace", 4, "ngIf"], [3, "recipe", "previewAllowed", "displayGuests", "helpButtonAllowed", "originTrace", "displayed", "clicked", 4, "ngIf"], ["class", "miam-recipe-card__actions__replace", 4, "ngIf"], ["class", "miam-ds-button ghost", 3, "click", 4, "ngIf"], [1, "miam-recipe-card__like"], [1, "miam-recipe-card__actions__icon", 3, "recipe", "originTrace"], [1, "miam-recipe-card__sponsor-container"], ["alt", "sponsor picture", 1, "miam-recipe-card__sponsor-picture", 3, "src"], [1, "miam-recipe-card__badge-container", 3, "ngClass"], ["class", "miam-recipe-card__badge", "src", "https://storage.googleapis.com/assets.miam.tech/generic/images/recipe_card-badge.svg", "alt", "recipe badge", 4, "ngIf"], ["class", "miam-recipe-card__badge", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/9.0/recipe-card-badge-drinks.svg", "alt", "drink badge", 4, "ngIf"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/images/recipe_card-badge.svg", "alt", "recipe badge", 1, "miam-recipe-card__badge"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/9.0/recipe-card-badge-drinks.svg", "alt", "drink badge", 1, "miam-recipe-card__badge"], [1, "miam-recipe-card__ingredients__pictures"], [1, "miam-recipe-card__ingredients__picture"], ["alt", "first ingredient picture", 3, "src", "error"], ["alt", "second ingredient picture", 3, "src", "error"], ["class", "miam-recipe-card__ingredients__more", 4, "ngIf"], [1, "miam-recipe-card__ingredients__more"], [1, "miam-recipe-card__difficulty-and-time"], ["class", "miam-recipe-card__difficulty", 4, "ngIf"], ["class", "miam-recipe-card__time", 4, "ngIf"], [1, "miam-recipe-card__difficulty"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/ChefHat.svg", "alt", "difficulty"], [1, "miam-ds-text", "size-s", "weight-m"], [1, "miam-recipe-card__time"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/Clock.svg", "alt", "time"], [1, "miam-recipe-card__price"], [1, "miam-ds-text", "weight-xxl", 3, "recipeId", "serves", "inViewport"], [3, "recipe", "previewAllowed", "displayGuests", "helpButtonAllowed", "originTrace", "displayed", "clicked"], [1, "miam-recipe-card__actions__replace"], [1, "miam-ds-button", "ghost", 3, "click"], i18n_0, [1, "miam-ds-button", "ghost", "square", 3, "click"], ["primaryColor", "var(--m-color-primary)", 3, "iconName"], i18n_2];
20030
20048
  }, template: function RecipeCardComponent_Template(rf, ctx) {
20031
20049
  if (rf & 1) {
20032
20050
  i0__namespace.ɵɵelementStart(0, "div", 0);
@@ -25766,9 +25784,6 @@
25766
25784
  this.activeTabIndex = 1;
25767
25785
  }
25768
25786
  this.subscriptions.push(this.storeLocatorService.storeLocatorOpened$.subscribe(function (storeLocatorOpened) {
25769
- if (_this.showStoreSelector !== storeLocatorOpened && !storeLocatorOpened && _this.isRecipeFetched) {
25770
- _this.sendPageViewEvent();
25771
- }
25772
25787
  _this.showStoreSelector = storeLocatorOpened;
25773
25788
  _this.cdr.detectChanges();
25774
25789
  }), this.recipeDetailsService.productsLoading$.pipe(operators.map(function (productsLoading) { return !productsLoading && !_this.recipeDetailsService.onlyShowPreparation; })).subscribe(function (show) {
@@ -25823,7 +25838,7 @@
25823
25838
  this.recipeDetailsService.allIngredientsToBasketLoading = false;
25824
25839
  };
25825
25840
  RecipeDetailsComponent.prototype.ngOnDestroy = function () {
25826
- this.recipeDetailsService.displayEventWasSent = false;
25841
+ this.recipeDetailsService.pageviewEventWasSent = false;
25827
25842
  this.subscriptions.forEach(function (sub) { return sub === null || sub === void 0 ? void 0 : sub.unsubscribe(); });
25828
25843
  if (this.contextService.seoEnabled) {
25829
25844
  this.seoService.removeSEOData();
@@ -25844,7 +25859,7 @@
25844
25859
  }
25845
25860
  _this.recipeDetailsService.recipe.modifiedGuests = +_this.guestNumber || +result.guests;
25846
25861
  _this.recipeDetailsService.getProducts(true);
25847
- _this.sendPageViewEvent();
25862
+ _this.sendPageviewEvent();
25848
25863
  _this.setupYoutubePlayer();
25849
25864
  setTimeout(function () {
25850
25865
  _this.initScrollListenerOnTitle();
@@ -25941,7 +25956,7 @@
25941
25956
  };
25942
25957
  RecipeDetailsComponent.prototype.onClose = function (openBasket) {
25943
25958
  if (openBasket === void 0) { openBasket = false; }
25944
- this.recipeDetailsService.displayEventWasSent = false;
25959
+ this.recipeDetailsService.pageviewEventWasSent = false;
25945
25960
  this.storeLocatorService.closeStoreLocator();
25946
25961
  this.activeTabIndex = 0;
25947
25962
  if (openBasket) {
@@ -25956,9 +25971,9 @@
25956
25971
  RecipeDetailsComponent.prototype.print = function () {
25957
25972
  window.print();
25958
25973
  };
25959
- RecipeDetailsComponent.prototype.sendPageViewEvent = function () {
25960
- if (!this.recipeDetailsService.displayEventWasSent) {
25961
- this.recipeDetailsService.displayEventWasSent = true;
25974
+ RecipeDetailsComponent.prototype.sendPageviewEvent = function () {
25975
+ if (!this.recipeDetailsService.pageviewEventWasSent) {
25976
+ this.recipeDetailsService.pageviewEventWasSent = true;
25962
25977
  this.pageview();
25963
25978
  }
25964
25979
  };
@@ -27193,6 +27208,11 @@
27193
27208
  else {
27194
27209
  if (!_this.showStoreLocator) {
27195
27210
  _this.storeLocatorService.closeModalOnSelected = false; // reset variable even if storeLocator was closed early
27211
+ // If the user closes the store locator without selecting a POS, close the modal
27212
+ if (_this.storeLocatorService.closeModalOnCancel) {
27213
+ _this.storeLocatorService.closeModalOnCancel = false;
27214
+ _this.hide();
27215
+ }
27196
27216
  }
27197
27217
  _this.cdr.detectChanges(); // hide does a detectChanges so we avoid a double change
27198
27218
  }
@@ -27265,7 +27285,7 @@
27265
27285
  RecipeModalComponent.prototype.hide = function (isDetail) {
27266
27286
  if (isDetail === void 0) { isDetail = false; }
27267
27287
  if (this.canCloseModal) {
27268
- this.recipeDetailsService.displayEventWasSent = false;
27288
+ this.recipeDetailsService.pageviewEventWasSent = false;
27269
27289
  this.recipe = null; // trigger again a change on recipe if we re-open the view
27270
27290
  if (isDetail) {
27271
27291
  // Removes all occurences of /basket-preview or /my-meals from the originPath
@@ -27618,11 +27638,11 @@
27618
27638
  }
27619
27639
  var i18n_10;
27620
27640
  if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
27621
- var MSG_EXTERNAL_2810787844840265356$$LIB__WEB_COMPONENTS_NO_SUPPLIER_ONBOARDING_NO_SUPPLIER_ONBOARDING_COMPONENT_TS__11 = goog.getMsg("\u201CMes courses\u201D");
27622
- i18n_10 = MSG_EXTERNAL_2810787844840265356$$LIB__WEB_COMPONENTS_NO_SUPPLIER_ONBOARDING_NO_SUPPLIER_ONBOARDING_COMPONENT_TS__11;
27641
+ var MSG_EXTERNAL_4989457896049213714$$LIB__WEB_COMPONENTS_NO_SUPPLIER_ONBOARDING_NO_SUPPLIER_ONBOARDING_COMPONENT_TS__11 = goog.getMsg("\u201CAjouter au panier\u201D");
27642
+ i18n_10 = MSG_EXTERNAL_4989457896049213714$$LIB__WEB_COMPONENTS_NO_SUPPLIER_ONBOARDING_NO_SUPPLIER_ONBOARDING_COMPONENT_TS__11;
27623
27643
  }
27624
27644
  else {
27625
- i18n_10 = $localize(templateObject_6 || (templateObject_6 = __makeTemplateObject([":\u241F5439dd52739003fa2f45e44996164896666b1c44\u241F2810787844840265356:\u201CMes courses\u201D"], [":\u241F5439dd52739003fa2f45e44996164896666b1c44\u241F2810787844840265356:\u201CMes courses\u201D"])));
27645
+ i18n_10 = $localize(templateObject_6 || (templateObject_6 = __makeTemplateObject([":\u241F44ab3c897b11ad9bb47769e66a067cbe3d2439bd\u241F4989457896049213714:\u201CAjouter au panier\u201D"], [":\u241F44ab3c897b11ad9bb47769e66a067cbe3d2439bd\u241F4989457896049213714:\u201CAjouter au panier\u201D"])));
27626
27646
  }
27627
27647
  var i18n_12;
27628
27648
  if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {