ng-miam 8.6.1 → 8.6.3

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 (50) hide show
  1. package/bundles/ng-miam.umd.js +287 -191
  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 +15 -13
  6. package/esm2015/lib/_services/baskets-synchronizing/baskets-comparator.service.js +3 -3
  7. package/esm2015/lib/_services/baskets-synchronizing/baskets-synchronizer.service.js +44 -17
  8. package/esm2015/lib/_services/baskets.service.js +32 -25
  9. package/esm2015/lib/_services/context.service.js +4 -4
  10. package/esm2015/lib/_services/interceptor.service.js +2 -2
  11. package/esm2015/lib/_services/items.service.js +4 -4
  12. package/esm2015/lib/_services/point-of-sales.service.js +18 -7
  13. package/esm2015/lib/_services/recipes.service.js +8 -5
  14. package/esm2015/lib/_services/user.service.js +4 -7
  15. package/esm2015/lib/_types/items-comparator.js +3 -3
  16. package/esm2015/lib/_web-components/basket-transfer-modal/basket-transfer-modal.component.js +3 -3
  17. package/esm2015/lib/_web-components/list-scan/list-scan.component.js +12 -5
  18. package/esm2015/lib/_web-components/meals-planner/meals-planner.component.js +2 -2
  19. package/esm2015/lib/_web-components/recipe-catalog/catalog-category/catalog-category.component.js +8 -2
  20. package/esm2015/lib/_web-components/recipe-catalog/recipe-catalog.component.js +30 -14
  21. package/esm2015/lib/_web-components/recipe-details/recipe-details-infos/recipe-details-infos.component.js +5 -5
  22. package/esm2015/lib/_web-components/recipe-details/recipe-details.component.js +90 -84
  23. package/esm2015/lib/_web-components/recipe-details/store-locator-link/store-locator-link.component.js +2 -2
  24. package/esm2015/lib/_web-components/recipe-modal/recipe-modal.component.js +3 -3
  25. package/esm2015/lib/_web-components/recipe-pricing/recipe-pricing.component.js +3 -3
  26. package/fesm2015/ng-miam.js +267 -185
  27. package/fesm2015/ng-miam.js.map +1 -1
  28. package/lib/_services/basket-transfer.service.d.ts +2 -1
  29. package/lib/_services/basket-transfer.service.d.ts.map +1 -1
  30. package/lib/_services/baskets-synchronizing/baskets-synchronizer.service.d.ts +15 -0
  31. package/lib/_services/baskets-synchronizing/baskets-synchronizer.service.d.ts.map +1 -1
  32. package/lib/_services/baskets.service.d.ts +10 -1
  33. package/lib/_services/baskets.service.d.ts.map +1 -1
  34. package/lib/_services/context.service.d.ts.map +1 -1
  35. package/lib/_services/items.service.d.ts.map +1 -1
  36. package/lib/_services/point-of-sales.service.d.ts +5 -1
  37. package/lib/_services/point-of-sales.service.d.ts.map +1 -1
  38. package/lib/_services/recipes.service.d.ts.map +1 -1
  39. package/lib/_services/user.service.d.ts +1 -1
  40. package/lib/_services/user.service.d.ts.map +1 -1
  41. package/lib/_types/items-comparator.d.ts +1 -1
  42. package/lib/_types/items-comparator.d.ts.map +1 -1
  43. package/lib/_web-components/basket-transfer-modal/basket-transfer-modal.component.d.ts.map +1 -1
  44. package/lib/_web-components/list-scan/list-scan.component.d.ts +3 -2
  45. package/lib/_web-components/list-scan/list-scan.component.d.ts.map +1 -1
  46. package/lib/_web-components/recipe-catalog/catalog-category/catalog-category.component.d.ts +2 -1
  47. package/lib/_web-components/recipe-catalog/catalog-category/catalog-category.component.d.ts.map +1 -1
  48. package/lib/_web-components/recipe-catalog/recipe-catalog.component.d.ts +2 -0
  49. package/lib/_web-components/recipe-catalog/recipe-catalog.component.d.ts.map +1 -1
  50. package/package.json +1 -1
@@ -2027,6 +2027,29 @@
2027
2027
  _this.navigateToCachedRecipeOnPosChange();
2028
2028
  return _this;
2029
2029
  }
2030
+ Object.defineProperty(PointOfSalesService.prototype, "waitForPos", {
2031
+ /**
2032
+ * Waits for POS to be initialised and non-null, then returns pos$
2033
+ */
2034
+ get: function () {
2035
+ var _this = this;
2036
+ return this.posWasInitialized().pipe(operators.skipWhile(function (wasInitialized) { return !wasInitialized; }), operators.switchMap(function () { return _this.pos$; }), operators.skipWhile(function (pos) { return !(pos === null || pos === void 0 ? void 0 : pos.id); }));
2037
+ },
2038
+ enumerable: false,
2039
+ configurable: true
2040
+ });
2041
+ PointOfSalesService.prototype.posWasInitialized = function () {
2042
+ return rxjs.combineLatest([
2043
+ this.pos$,
2044
+ this.posIsLoading$
2045
+ ]).pipe(operators.skipWhile(function (_d) {
2046
+ var _e = __read(_d, 2), _pos = _e[0], loading = _e[1];
2047
+ return loading;
2048
+ }), operators.map(function (_d) {
2049
+ var _e = __read(_d, 2), pos = _e[0], _isLoading = _e[1];
2050
+ return pos !== undefined;
2051
+ }));
2052
+ };
2030
2053
  PointOfSalesService.prototype.loadPos = function (posId) {
2031
2054
  var _this = this;
2032
2055
  this.posIsLoading$.next(true);
@@ -2041,20 +2064,13 @@
2041
2064
  PointOfSalesService.prototype.isPosValid = function () {
2042
2065
  return this.pos$.pipe(operators.map(function (pos) { var _a, _b, _c; return !!((_c = (_b = (_a = pos === null || pos === void 0 ? void 0 : pos.relationships) === null || _a === void 0 ? void 0 : _a.supplier) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.id); }));
2043
2066
  };
2044
- PointOfSalesService.prototype.posWasInitialized = function () {
2045
- return rxjs.combineLatest([
2046
- this.pos$,
2047
- this.posIsLoading$
2048
- ]).pipe(operators.skipWhile(function (_d) {
2049
- var _e = __read(_d, 2), _pos = _e[0], loading = _e[1];
2050
- return loading;
2051
- }), operators.map(function (_d) {
2052
- var _e = __read(_d, 2), pos = _e[0], _isLoading = _e[1];
2053
- return pos !== undefined;
2054
- }));
2055
- };
2056
2067
  PointOfSalesService.prototype.loadPosWithExtId = function (extId) {
2057
2068
  var _this = this;
2069
+ if (!extId) {
2070
+ this.pos$.next(null);
2071
+ this.posIsLoading$.next(false);
2072
+ return this.pos$;
2073
+ }
2058
2074
  this.posIsLoading$.next(true);
2059
2075
  this.suppliersService.supplier$.pipe(operators.skipWhile(function (supplier) { return !(supplier === null || supplier === void 0 ? void 0 : supplier.id); }), operators.take(1), operators.switchMap(function (supplier) { return _this.all({
2060
2076
  remotefilter: {
@@ -2493,11 +2509,8 @@
2493
2509
  _this.ignoredBasketsService.resetIgnoredIngredients();
2494
2510
  }
2495
2511
  _this.initRoles();
2496
- return rxjs.forkJoin([
2497
- _this.initProvider(),
2498
- _this.initSupplier()
2499
- ]);
2500
- }));
2512
+ return rxjs.combineLatest([_this.initProvider(), _this.initSupplier()]); // forkJoin does not work with BehaviorSubject as it never completes
2513
+ }), operators.skipWhile(function (res) { return res[0] === undefined || res[1] === undefined; }), operators.take(1));
2501
2514
  };
2502
2515
  UserService.prototype.resetUserInfo = function () {
2503
2516
  this.userInfo$.next(null);
@@ -3757,12 +3770,13 @@
3757
3770
  * Adds mandatory data (guest, pos id) completion to the given filters.
3758
3771
  */
3759
3772
  RecipesService.prototype.addMandatoryCompletionToFilter = function (filters) {
3773
+ var _this = this;
3760
3774
  var _a;
3761
3775
  // only set primary_completion_perc if not searching favorite recipes
3762
3776
  if ((_a = filters.additionalFilters) === null || _a === void 0 ? void 0 : _a.filters.liked) {
3763
3777
  return rxjs.of(filters);
3764
3778
  }
3765
- return this.posService.pos$.pipe(operators.take(1), operators.map(function (pos) {
3779
+ return this.posService.posWasInitialized().pipe(operators.skipWhile(function (wasInitialized) { return !wasInitialized; }), operators.switchMap(function () { return _this.posService.pos$; }), operators.take(1), operators.map(function (pos) {
3766
3780
  var _a;
3767
3781
  if (pos === null || pos === void 0 ? void 0 : pos.id) {
3768
3782
  // number of guests and point of sale id are mandatory in order to use primary_completion_perc filter
@@ -3890,7 +3904,10 @@
3890
3904
  Object.keys(fields).forEach(function (key) {
3891
3905
  suggestionFields += "&fields[" + key + "]=" + fields[key].join(',');
3892
3906
  });
3893
- return rxjs.combineLatest([this.suppliersService.supplier$, this.posService.pos$]).pipe(operators.skipWhile(function (results) { return !results[0]; }), operators.debounceTime(100), operators.switchMap(function (results) {
3907
+ return rxjs.combineLatest([
3908
+ this.suppliersService.supplier$,
3909
+ this.posService.posWasInitialized().pipe(operators.skipWhile(function (wasInitialized) { return !wasInitialized; }), operators.switchMap(function () { return _this.posService.pos$; }))
3910
+ ]).pipe(operators.skipWhile(function (results) { return !results[0]; }), operators.debounceTime(100), operators.switchMap(function (results) {
3894
3911
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
3895
3912
  var body = _this.buildSuggestionBody(context);
3896
3913
  var supplierFilter = "supplier_id=" + results[0].id;
@@ -3994,7 +4011,7 @@
3994
4011
  url += "&include=" + includes.join(',') + plannerFields + "&filter[recipe_type_id]=main-dish&filter[primary_completion_perc]=100,100";
3995
4012
  url += inBasket === undefined ? '' : "&filter[in_basket]=" + inBasket;
3996
4013
  url += this.buildfilterUrlFromPreferences();
3997
- return this.posService.pos$.pipe(operators.skipWhile(function (pos) { return !(pos === null || pos === void 0 ? void 0 : pos.id); }), operators.take(1), operators.switchMap(function (pos) {
4014
+ return this.posService.waitForPos.pipe(operators.take(1), operators.switchMap(function (pos) {
3998
4015
  url += "&filter[point_of_sale_id]=" + pos.id;
3999
4016
  return _this.http.get(url, {}).pipe(operators.map(function (returnedRecipes) {
4000
4017
  var recipes = _this.newCollection();
@@ -4009,7 +4026,7 @@
4009
4026
  url += "?budget=" + budget + "&filter[guests]=" + guests + "&filter[recipe_type_id]=main-dish&filter[primary_completion_perc]=100,100";
4010
4027
  url += inBasket === undefined ? '' : "&filter[in_basket]=" + inBasket;
4011
4028
  url += this.buildfilterUrlFromPreferences();
4012
- return this.posService.pos$.pipe(operators.skipWhile(function (pos) { return !(pos === null || pos === void 0 ? void 0 : pos.id); }), operators.take(1), operators.switchMap(function (pos) { return _this.http.get(url += "&filter[point_of_sale_id]=" + pos.id, {}); }), operators.map(function (result) { return result.max_recipes; }));
4029
+ return this.posService.waitForPos.pipe(operators.take(1), operators.switchMap(function (pos) { return _this.http.get(url += "&filter[point_of_sale_id]=" + pos.id, {}); }), operators.map(function (result) { return result.max_recipes; }));
4013
4030
  };
4014
4031
  // DEPRECATED / use TTL instead
4015
4032
  RecipesService.prototype.getOrFetch = function (recipeId) {
@@ -4276,7 +4293,7 @@
4276
4293
  BasketsService.prototype.refreshCurrentBasket = function () {
4277
4294
  var _this = this;
4278
4295
  this.currentAndPreviewFetching.next(true);
4279
- return this.posService.pos$.pipe(operators.skipWhile(function (pos) { return !pos; }), operators.take(1), operators.switchMap(function (pos) {
4296
+ return this.posService.waitForPos.pipe(operators.take(1), operators.switchMap(function (pos) {
4280
4297
  console.debug('[Miam] refreshing basket');
4281
4298
  var authlessId = localStorage.getItem('_miam/authlessId');
4282
4299
  var userId = localStorage.getItem('_miam/userId');
@@ -4323,33 +4340,41 @@
4323
4340
  this.analyticsService.sendEventWhenReady(this.analyticsService.EVENT_RECIPE_RESET, eventTrace.originPath, eventTrace.props);
4324
4341
  localStorage.removeItem('_miam/affiliate');
4325
4342
  this.ignoredBasketsService.resetIgnoredIngredients();
4326
- return this.posService.pos$.pipe(operators.skipWhile(function (pos) { return !pos; }), operators.take(1), operators.switchMap(function (pos) { return _this.waitForBasket.pipe(operators.tap(function (basket) { return _this.analyticsService.sendEventsOfResetBasket(basket, eventTrace); }), operators.switchMap(function () { return _this.get("reset?point_of_sale_id=" + pos.id + "&fields[baskets]=" + BASKET_SPARSE_FIELDS.baskets.join(',')).pipe(operators.skipWhile(function (basket) { return basket.is_loading; }), operators.switchMap(function (basket) { return _this.updateLocalBasket(basket); })); })); }));
4343
+ return this.posService.waitForPos.pipe(operators.take(1), operators.switchMap(function (pos) { return _this.waitForBasket.pipe(operators.tap(function (basket) { return _this.analyticsService.sendEventsOfResetBasket(basket, eventTrace); }), operators.switchMap(function () { return _this.get("reset?point_of_sale_id=" + pos.id + "&fields[baskets]=" + BASKET_SPARSE_FIELDS.baskets.join(',')).pipe(operators.skipWhile(function (basket) { return basket.is_loading; }), operators.switchMap(function (basket) { return _this.updateLocalBasket(basket); })); })); }));
4327
4344
  };
4328
4345
  /** ********************************************************* CONFIRM BASKET ********************************************************* **/
4329
- // Set basket as confirmed, and returns only once the new current list is returned
4330
- BasketsService.prototype.confirmBasket = function (totalPrice) {
4346
+ /**
4347
+ * Sends payment.confirm event then confirm basket if retailer's cart price and Mealz basket price are both non-zero
4348
+ * @param totalPrice The price of retailer's basket
4349
+ * @returns the current basket
4350
+ */
4351
+ BasketsService.prototype.confirmPaymentAndBasket = function (totalPrice) {
4331
4352
  var _this = this;
4332
- var confirmedBasket;
4333
- console.debug("[Miam] Confirm basket " + JSON.stringify(confirmedBasket));
4334
- return this.waitForBasket.pipe(operators.tap(function (basket) {
4335
- if (basket.totalPrice > 0) {
4353
+ return this.waitForBasket.pipe(operators.switchMap(function (basket) {
4354
+ if (+totalPrice > 0 && basket.totalPrice > 0) {
4336
4355
  _this.analyticsService.sendEventWhenReady(_this.analyticsService.EVENT_PAYMENT_CONFIRMED, null, _this.eventProps(basket, totalPrice));
4356
+ return _this.confirmBasket(basket, totalPrice);
4337
4357
  }
4338
- }), operators.switchMap(function (basket) {
4339
- console.debug('[Miam] Save basket with confirmed=true');
4340
- basket.attributes.confirmed = true;
4341
- return basket.save({ fields: { baskets: __spread(BASKET_SPARSE_FIELDS.baskets, ['token']) } });
4342
- }), operators.switchMap(function (resp) {
4343
- confirmedBasket = _this.new();
4344
- confirmedBasket.fill(resp);
4345
- console.debug("[Miam] send push analytics event if > 0: " + JSON.stringify(confirmedBasket.totalPrice) + " " + JSON.stringify(confirmedBasket));
4346
- if (confirmedBasket.totalPrice > 0 && confirmedBasket.token) {
4347
- _this.analyticsService.sendEventWhenReady(_this.analyticsService.EVENT_BASKET_CONFIRMED, null, _this.eventProps(confirmedBasket, totalPrice));
4348
- localStorage.removeItem('_miam/affiliate');
4358
+ return _this._basket$;
4359
+ }));
4360
+ };
4361
+ /**
4362
+ * Tries to confirm basket. Sends analytic event and refresh current basket on successfull confirmation
4363
+ */
4364
+ BasketsService.prototype.confirmBasket = function (basket, totalPrice) {
4365
+ var _this = this;
4366
+ console.debug('[Miam] Confirm Mealz basket');
4367
+ return this.posService.waitForPos.pipe(operators.take(1), operators.switchMap(function (pos) {
4368
+ var url = environment$1.miamAPI + "/api/v1/baskets/confirm?point_of_sale_id=" + pos.id;
4369
+ return _this.http.patch(url, {});
4370
+ }), operators.catchError(function () { return rxjs.of(null); }), operators.switchMap(function (result) {
4371
+ if (!result) {
4372
+ return rxjs.of(null);
4349
4373
  }
4350
- _this._basket$.next(undefined);
4351
- return _this.resetBasket();
4352
- }), operators.switchMap(function () { return _this._basket$; }), operators.skipWhile(function (b) { return !b; }), operators.map(function () { return confirmedBasket; }));
4374
+ localStorage.removeItem('_miam/affiliate');
4375
+ _this.analyticsService.sendEventWhenReady(_this.analyticsService.EVENT_BASKET_CONFIRMED, null, _this.eventProps(basket, totalPrice));
4376
+ return _this.refreshCurrentBasket();
4377
+ }), operators.take(1));
4353
4378
  };
4354
4379
  BasketsService.prototype.eventProps = function (basket, totalPrice) {
4355
4380
  return {
@@ -4456,7 +4481,7 @@
4456
4481
  var _this = this;
4457
4482
  if (include === void 0) { include = []; }
4458
4483
  if (isSchoolList === void 0) { isSchoolList = false; }
4459
- return this.waitForBasket.pipe(operators.switchMap(function (basket) { return _this.posService.pos$.pipe(operators.skipWhile(function (pos) { return !pos; }), operators.take(1), operators.map(function (pos) { return [basket, pos]; })); }), operators.switchMap(function (_b) {
4484
+ return this.waitForBasket.pipe(operators.switchMap(function (basket) { return _this.posService.waitForPos.pipe(operators.take(1), operators.map(function (pos) { return [basket, pos]; })); }), operators.switchMap(function (_b) {
4460
4485
  var _c = __read(_b, 2), basket = _c[0], pos = _c[1];
4461
4486
  var url;
4462
4487
  if (isSchoolList) {
@@ -4845,7 +4870,7 @@
4845
4870
  */
4846
4871
  BasketsService.prototype.loadBasket = function () {
4847
4872
  var _this = this;
4848
- return this.posService.pos$.pipe(operators.skipWhile(function (pos) { return !pos; }), operators.switchMap(function () { return _this.refreshCurrentBasket(); }));
4873
+ return this.posService.waitForPos.pipe(operators.switchMap(function () { return _this.refreshCurrentBasket(); }));
4849
4874
  };
4850
4875
  BasketsService.prototype.loadPreview = function () {
4851
4876
  var _this = this;
@@ -5054,11 +5079,12 @@
5054
5079
  }
5055
5080
  };
5056
5081
  /**
5057
- * Remove any entries that are not in the current basket
5082
+ * Remove any entries that are not in the current basket or any remaining entry that does not have the same ext-id as the product compared
5058
5083
  * @param entriesInBasket Content of the last received Miam basket
5059
5084
  */
5060
5085
  ItemsComparator.prototype.cleanBasketEntries = function (entriesInBasket) {
5061
- this.miamBasketEntries = this.miamBasketEntries.filter(function (entry) { return entriesInBasket.find(function (e) { return e.id === entry.id; }); });
5086
+ var _this = this;
5087
+ this.miamBasketEntries = this.miamBasketEntries.filter(function (entry) { var _a, _b, _c; return ((_b = (_a = entriesInBasket.find(function (e) { return e.id === entry.id; })) === null || _a === void 0 ? void 0 : _a.selectedItem) === null || _b === void 0 ? void 0 : _b.attributes['ext-id']) === ((_c = _this.retailerProduct) === null || _c === void 0 ? void 0 : _c.id); });
5062
5088
  };
5063
5089
  /**
5064
5090
  * Clear miamBasketEntries
@@ -5104,8 +5130,8 @@
5104
5130
  BasketsComparatorService.prototype.initBasketComparator = function (firstMiamBasket, firstRetailerBasket, fromRetailer) {
5105
5131
  this.extIdToItemsComparator = {};
5106
5132
  this.updateRetailerProducts(firstRetailerBasket);
5107
- this.updateEntriesFromMiam(firstMiamBasket);
5108
5133
  this.addEntriesFromMiam(firstMiamBasket);
5134
+ this.updateEntriesFromMiam(firstMiamBasket);
5109
5135
  if (fromRetailer) {
5110
5136
  return this.resolveFromRetailer();
5111
5137
  }
@@ -5134,8 +5160,8 @@
5134
5160
  })) + "\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 }); })));
5135
5161
  // Note: MQ means Miam Quantity and RQ means Retailer Quantity but this makes the logs more compact and thus readable
5136
5162
  this.cleanMiamEntries(miamBasket);
5137
- this.updateEntriesFromMiam(miamBasket);
5138
5163
  this.addEntriesFromMiam(miamBasket);
5164
+ this.updateEntriesFromMiam(miamBasket);
5139
5165
  return this.resolveFromMiam(miamBasket);
5140
5166
  };
5141
5167
  /**
@@ -5300,6 +5326,8 @@
5300
5326
  this.comparatorService = comparatorService;
5301
5327
  this.basketsService = basketsService;
5302
5328
  this.supplierService = supplierService;
5329
+ this.ignoreUpdatesFromMiam = false;
5330
+ this.firstMiamBasketProcess = true;
5303
5331
  /**
5304
5332
  * This method needs to be passed to Miam by the retailer
5305
5333
  */
@@ -5312,26 +5340,46 @@
5312
5340
  _this.listenToMiam();
5313
5341
  })).subscribe();
5314
5342
  }
5343
+ Object.defineProperty(BasketsSynchronizerService.prototype, "ignoreMiam", {
5344
+ /**
5345
+ * The scan-list is not supposed to add product to the retailer's cart before it is confirmed so the easiest way to prevent this is to
5346
+ * ignore updates from Miam until then.
5347
+ * When stopping ignoring updates from Miam, trigger and update from Miam
5348
+ */
5349
+ set: function (ignore) {
5350
+ var _this = this;
5351
+ this.ignoreUpdatesFromMiam = ignore;
5352
+ if (!ignore) {
5353
+ this.basketsService.activeBasketEntries().pipe(operators.take(1)).subscribe(function (miamBasket) { return _this.processMiamBasket(miamBasket); });
5354
+ }
5355
+ },
5356
+ enumerable: false,
5357
+ configurable: true
5358
+ });
5315
5359
  /**
5316
5360
  * Start listening on Miam's basket
5317
5361
  */
5318
5362
  BasketsSynchronizerService.prototype.listenToMiam = function () {
5319
5363
  var _this = this;
5320
- var isFirstSubscribe = true;
5321
5364
  this.basketsService.activeBasketEntries().subscribe(function (miamBasket) {
5322
- var _a;
5323
- // eslint-disable-next-line no-console
5324
- console.debug("[Miam] Miam basket received\n - " + JSON.stringify(miamBasket === null || miamBasket === void 0 ? void 0 : miamBasket.map(function (e) { return ({ id: e.id, quantity: e.attributes.quantity }); })) + "\n - First Miam basket was: " + JSON.stringify((_a = _this.firstMiamBasket) === null || _a === void 0 ? void 0 : _a.map(function (e) { return ({ id: e.id, quantity: e.attributes.quantity }); })));
5325
- if (!_this.firstMiamBasket && miamBasket.length === 0 && isFirstSubscribe) {
5326
- // Skip first empty arrays received
5327
- isFirstSubscribe = false;
5328
- return;
5329
- }
5330
- else {
5331
- _this.miamBasketChanged(miamBasket);
5365
+ if (!_this.ignoreUpdatesFromMiam) {
5366
+ _this.processMiamBasket(miamBasket);
5332
5367
  }
5333
5368
  });
5334
5369
  };
5370
+ BasketsSynchronizerService.prototype.processMiamBasket = function (miamBasket) {
5371
+ var _a;
5372
+ // eslint-disable-next-line no-console
5373
+ console.debug("[Miam] Miam basket received\n - " + JSON.stringify(miamBasket === null || miamBasket === void 0 ? void 0 : miamBasket.map(function (e) { return ({ id: e.id, quantity: e.attributes.quantity }); })) + "\n - First Miam basket was: " + JSON.stringify((_a = this.firstMiamBasket) === null || _a === void 0 ? void 0 : _a.map(function (e) { return ({ id: e.id, quantity: e.attributes.quantity }); })));
5374
+ if (!this.firstMiamBasket && miamBasket.length === 0 && this.firstMiamBasketProcess) {
5375
+ // Skip first empty arrays received
5376
+ this.firstMiamBasketProcess = false;
5377
+ return;
5378
+ }
5379
+ else {
5380
+ this.miamBasketChanged(miamBasket);
5381
+ }
5382
+ };
5335
5383
  /**
5336
5384
  * Process the new basket from Miam
5337
5385
  * @param miamBasket entries from updated basket
@@ -5445,12 +5493,22 @@
5445
5493
  this.isProcessingRetailerEvent = false;
5446
5494
  return;
5447
5495
  }
5448
- this.basketsService.removeBasketEntries(entriesToRemove).subscribe(function () {
5496
+ this.entriesToClean().pipe(operators.switchMap(function (entries) {
5497
+ entriesToRemove = __spread(entriesToRemove, entries);
5498
+ return _this.basketsService.removeBasketEntries(entriesToRemove);
5499
+ })).subscribe(function () {
5449
5500
  // eslint-disable-next-line no-console
5450
5501
  console.debug('[Miam] stop processing retailer event');
5451
5502
  _this.isProcessingRetailerEvent = false;
5452
5503
  });
5453
5504
  };
5505
+ /**
5506
+ * Only in the scan-list can entries with no selectedItem can be added to the basket. If there are any when the retailer
5507
+ * sends an update, return them so we can add them to entriesToRemove
5508
+ */
5509
+ BasketsSynchronizerService.prototype.entriesToClean = function () {
5510
+ return this.basketsService.activeBasketEntries().pipe(operators.take(1), operators.map(function (entries) { return entries.filter(function (entry) { return !entry.selectedItem; }).map(function (entry) { return ({ id: entry.id, quantity: entry.quantity }); }); }));
5511
+ };
5454
5512
  // -----------------------------------------------------------------------------------------------------------------------------
5455
5513
  // ---------------------------------------------- To be called on retailer's side ----------------------------------------------
5456
5514
  // -----------------------------------------------------------------------------------------------------------------------------
@@ -5477,7 +5535,7 @@
5477
5535
  BasketsSynchronizerService.prototype.handlePayment = function (total) {
5478
5536
  var _this = this;
5479
5537
  if (total) {
5480
- this.basketsService.confirmBasket(total).subscribe(function () {
5538
+ this.basketsService.confirmPaymentAndBasket(total).subscribe(function () {
5481
5539
  _this.firstRetailerBasket = [];
5482
5540
  });
5483
5541
  }
@@ -5813,9 +5871,9 @@
5813
5871
  ContextService.prototype.onBasketAndPosSendEvent = function (eventType, totalPrice) {
5814
5872
  var _this = this;
5815
5873
  rxjs.forkJoin([
5816
- this.basketsService.basket$.asObservable().pipe(operators.skipWhile(function (res) { return !res; }), operators.take(1)),
5817
- this.posService.pos$.asObservable().pipe(operators.skipWhile(function (res) { return !res; }), operators.take(1))
5818
- ]).pipe(operators.skipWhile(function (res) { return !res[0] || !res[1]; }), operators.take(1)).subscribe(function (res) {
5874
+ this.basketsService.waitForBasket,
5875
+ this.posService.waitForPos.pipe(operators.take(1))
5876
+ ]).subscribe(function (res) {
5819
5877
  var basket = res[0];
5820
5878
  var pos = res[1];
5821
5879
  if (basket.totalPrice > 0) {
@@ -8386,6 +8444,7 @@
8386
8444
  this.recipesService = recipesService;
8387
8445
  this.supplierService = supplierService;
8388
8446
  this.basketIsBeingTransferred = new rxjs.BehaviorSubject(false);
8447
+ this.transferComplete$ = new rxjs.Subject();
8389
8448
  this.subscriptions = [];
8390
8449
  this.subscriptions.push(this.startTransferOnSupplierLoaded(), this.checkBasketStatus());
8391
8450
  }
@@ -8419,7 +8478,7 @@
8419
8478
  };
8420
8479
  BasketTransferService.prototype.confirmBasket = function () {
8421
8480
  var _this = this;
8422
- this.subscriptions.push(this.posService.pos$.pipe(operators.skipWhile(function (pos) { return !pos; }), operators.take(1), operators.switchMap(function (pos) {
8481
+ this.subscriptions.push(this.posService.waitForPos.pipe(operators.take(1), operators.switchMap(function (pos) {
8423
8482
  var startTransferUrl = environment$1.miamAPI + "/api/v1/baskets/start_transfer?point_of_sale_id=" + pos.id;
8424
8483
  return _this.http.patch(startTransferUrl, {});
8425
8484
  }), operators.switchMap(function (transferResponse) { return _this.basketsService.reloadBasket().pipe(operators.switchMap(function () { return rxjs.of(transferResponse); })); }), operators.switchMap(function (transferResponse) {
@@ -8437,7 +8496,7 @@
8437
8496
  };
8438
8497
  BasketTransferService.prototype.abortTransfer = function () {
8439
8498
  var _this = this;
8440
- return this.posService.pos$.pipe(operators.skipWhile(function (pos) { return !pos; }), operators.take(1), operators.switchMap(function (pos) {
8499
+ return this.posService.waitForPos.pipe(operators.take(1), operators.switchMap(function (pos) {
8441
8500
  var startTransferUrl = environment$1.miamAPI + "/api/v1/baskets/abort_transfer?point_of_sale_id=" + pos.id;
8442
8501
  return _this.http.patch(startTransferUrl, {});
8443
8502
  }), operators.switchMap(function () { return _this.basketsService.reloadBasket(); }), operators.switchMap(function () {
@@ -8455,7 +8514,7 @@
8455
8514
  };
8456
8515
  BasketTransferService.prototype.tryToTransferBasket = function (params) {
8457
8516
  var _this = this;
8458
- 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 () { return _this.posService.pos$.pipe(operators.skipWhile(function (pos) { return !pos; }), operators.take(1), operators.switchMap(function (pos) { return _this.basketsService.waitForBasket.pipe(operators.map(function () { return pos; })); }), operators.switchMap(function (pos) { return _this.transferBasketForPos(pos, params.basketToken); }), operators.take(1)); }));
8517
+ 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 () { return _this.posService.waitForPos.pipe(operators.take(1), operators.switchMap(function (pos) { return _this.basketsService.waitForBasket.pipe(operators.map(function () { return pos; })); }), operators.switchMap(function (pos) { return _this.transferBasketForPos(pos, params.basketToken); }), operators.take(1)); }));
8459
8518
  };
8460
8519
  BasketTransferService.prototype.transferBasketForPos = function (pos, basketToken) {
8461
8520
  var _this = this;
@@ -8465,29 +8524,27 @@
8465
8524
  sessionStorage.setItem('_miam/basketActionInterrupted', 'true');
8466
8525
  return this.http.patch(transferBasketUrl, {}).pipe(
8467
8526
  // If basket transfer was aborted on affiliated website, PATCH returns an error, but we don't need to do anything about it
8468
- operators.catchError(function () { return rxjs.of(null); }), operators.switchMap(function () { return _this.basketsService.refreshCurrentBasket().pipe(operators.switchMap(function () {
8527
+ operators.catchError(function () {
8528
+ _this.transferComplete$.next();
8529
+ return rxjs.of(null);
8530
+ }), operators.switchMap(function () { return _this.basketsService.refreshCurrentBasket().pipe(operators.switchMap(function () {
8531
+ _this.transferComplete$.next();
8469
8532
  sessionStorage.removeItem('_miam/basketActionInterrupted');
8470
8533
  return rxjs.of(true);
8471
8534
  })); }));
8472
8535
  };
8473
8536
  BasketTransferService.prototype.callHookbackIfNotLogged = function () {
8474
8537
  var _this = this;
8475
- return rxjs.combineLatest([
8476
- this.userService.isLogged$,
8477
- this.posService.posWasInitialized()
8478
- ]).pipe(operators.take(1), operators.map(function (_b) {
8479
- var _c = __read(_b, 2), isLogged = _c[0], isPosValid = _c[1];
8480
- return _this.contextService.hookCallback(isLogged, isPosValid);
8481
- }));
8538
+ return this.userService.isLogged$.pipe(operators.take(1), operators.map(function (isLogged) { return _this.contextService.hookCallback(isLogged, true); }));
8482
8539
  };
8483
8540
  BasketTransferService.prototype.forcePosIfUnset = function (transferPosExtId) {
8484
8541
  var _this = this;
8485
- return this.posService.pos$.pipe(operators.map(function (pos) {
8542
+ return this.posService.pos$.pipe(operators.takeUntil(this.transferComplete$), operators.switchMap(function (pos) {
8486
8543
  var posSet = pos && pos.extId === transferPosExtId;
8487
8544
  if (!posSet) {
8488
8545
  _this.contextService.forcePosCallback(transferPosExtId);
8489
8546
  }
8490
- return posSet;
8547
+ return rxjs.of(posSet);
8491
8548
  }));
8492
8549
  };
8493
8550
  BasketTransferService.prototype.getTransferData = function () {
@@ -8623,7 +8680,7 @@
8623
8680
  }
8624
8681
  ItemsService.prototype.searchForIngredient = function (searchString, ingredientId) {
8625
8682
  var _this = this;
8626
- return this.posService.pos$.pipe(operators.skipWhile(function (pos) { return !pos; }), operators.take(1), operators.switchMap(function (pos) {
8683
+ return this.posService.waitForPos.pipe(operators.take(1), operators.switchMap(function (pos) {
8627
8684
  var url = environment$1.miamAPI + "/api/v1/items/search?" + (ingredientId ? "ingredient_id=" + ingredientId + "&" : '') + "point_of_sale_id=" + pos.id;
8628
8685
  if (searchString) {
8629
8686
  url += "&name=" + searchString;
@@ -8633,7 +8690,7 @@
8633
8690
  };
8634
8691
  ItemsService.prototype.getPriceForItem = function (selectedItemId) {
8635
8692
  var _this = this;
8636
- return this.posService.pos$.pipe(operators.skipWhile(function (pos) { return !pos; }), operators.take(1), operators.switchMap(function (pos) {
8693
+ return this.posService.waitForPos.pipe(operators.take(1), operators.switchMap(function (pos) {
8637
8694
  var url = environment$1.miamAPI + "/api/v1/items/" + selectedItemId + "/price?pricebook_key=DEFAULT&point_of_sale_id=" + pos.id;
8638
8695
  return _this.http.get(url);
8639
8696
  }));
@@ -8717,7 +8774,7 @@
8717
8774
  MiamInterceptor.prototype.setMiamHeaders = function (request) {
8718
8775
  var headersToAdd = {
8719
8776
  'miam-origin': this.context.origin.value,
8720
- 'miam-front-version': '8.6.1',
8777
+ 'miam-front-version': '8.6.3',
8721
8778
  'miam-front-type': 'web',
8722
8779
  'miam-api-version': '4.7.0'
8723
8780
  };
@@ -12171,12 +12228,12 @@
12171
12228
  // So if changes contains only a recipe and no serves, we also avoid re-fetching
12172
12229
  var wasInBasketBefore;
12173
12230
  return rxjs.combineLatest([
12174
- this.posService.pos$,
12231
+ this.posService.waitForPos,
12175
12232
  this.isInView$,
12176
12233
  this.guests$,
12177
12234
  this.pricebookKey,
12178
12235
  this.basketsService.recipeIsInBasket(this.recipeId)
12179
- ]).pipe(operators.skipWhile(function (results) { return !results[0] || !results[1] || !results[3]; })).subscribe(function (results) {
12236
+ ]).pipe(operators.skipWhile(function (results) { return !results[1] || !results[3]; })).subscribe(function (results) {
12180
12237
  _this.pos = results[0];
12181
12238
  // fetch the price if the recipe isn't in the basket and if it was last time we check or on startup
12182
12239
  if (!results[4] && wasInBasketBefore !== false && _this.inViewport) {
@@ -17908,7 +17965,7 @@
17908
17965
  if (!transferred) {
17909
17966
  _this.close();
17910
17967
  }
17911
- }), this.posService.pos$.pipe(operators.skipWhile(function (pos) { return !pos; })).subscribe(function (pos) {
17968
+ }), this.posService.waitForPos.subscribe(function (pos) {
17912
17969
  _this.supplierName = pos.relationships.supplier.data.attributes.name;
17913
17970
  _this.cdr.detectChanges();
17914
17971
  }));
@@ -18356,11 +18413,12 @@
18356
18413
 
18357
18414
  var ListScanComponent = /** @class */ (function (_super) {
18358
18415
  __extends(ListScanComponent, _super);
18359
- function ListScanComponent(cdr, analyticsService, listScanService) {
18416
+ function ListScanComponent(cdr, analyticsService, listScanService, basketSynchro) {
18360
18417
  var _this = _super.call(this, analyticsService) || this;
18361
18418
  _this.cdr = cdr;
18362
18419
  _this.analyticsService = analyticsService;
18363
18420
  _this.listScanService = listScanService;
18421
+ _this.basketSynchro = basketSynchro;
18364
18422
  /**
18365
18423
  * DEPRECATED TODO REMOVE FOR 9.0
18366
18424
  */
@@ -18374,8 +18432,14 @@
18374
18432
  return _this;
18375
18433
  }
18376
18434
  ListScanComponent.prototype.ngOnInit = function () {
18435
+ var _this = this;
18377
18436
  this.listenEntries();
18378
18437
  this.listenCancelling();
18438
+ this.subscriptions.push(this.listScanService.sendingFile.subscribe(function (sending) {
18439
+ if (sending) {
18440
+ _this.basketSynchro.ignoreMiam = true;
18441
+ }
18442
+ }));
18379
18443
  };
18380
18444
  ListScanComponent.prototype.ngOnChanges = function (changes) {
18381
18445
  if (changes.isSchoolList) {
@@ -18409,6 +18473,7 @@
18409
18473
  }));
18410
18474
  };
18411
18475
  ListScanComponent.prototype.confirm = function () {
18476
+ this.basketSynchro.ignoreMiam = false;
18412
18477
  this.basketPreviewShown = false;
18413
18478
  this.cdr.detectChanges();
18414
18479
  this.confirmed.emit();
@@ -18423,7 +18488,7 @@
18423
18488
  };
18424
18489
  return ListScanComponent;
18425
18490
  }(EventTracerComponent));
18426
- ListScanComponent.ɵfac = function ListScanComponent_Factory(t) { return new (t || ListScanComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(AnalyticsService), i0__namespace.ɵɵdirectiveInject(ListScanService)); };
18491
+ ListScanComponent.ɵfac = function ListScanComponent_Factory(t) { return new (t || ListScanComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(AnalyticsService), i0__namespace.ɵɵdirectiveInject(ListScanService), i0__namespace.ɵɵdirectiveInject(BasketsSynchronizerService)); };
18427
18492
  ListScanComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: ListScanComponent, selectors: [["ng-miam-list-scan"]], inputs: { disableIngredientsMatching: "disableIngredientsMatching", isSchoolList: "isSchoolList" }, outputs: { confirmed: "confirmed" }, features: [i0__namespace.ɵɵInheritDefinitionFeature, i0__namespace.ɵɵNgOnChangesFeature], decls: 7, vars: 8, consts: function () {
18428
18493
  var i18n_0;
18429
18494
  if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
@@ -18519,7 +18584,7 @@
18519
18584
  encapsulation: i0.ViewEncapsulation.None,
18520
18585
  changeDetection: i0.ChangeDetectionStrategy.OnPush
18521
18586
  }]
18522
- }], function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: AnalyticsService }, { type: ListScanService }]; }, { disableIngredientsMatching: [{
18587
+ }], function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: AnalyticsService }, { type: ListScanService }, { type: BasketsSynchronizerService }]; }, { disableIngredientsMatching: [{
18523
18588
  type: i0.Input
18524
18589
  }], isSchoolList: [{
18525
18590
  type: i0.Input
@@ -21752,7 +21817,7 @@
21752
21817
  };
21753
21818
  MealsPlannerComponent.prototype.initRecipesPricing = function () {
21754
21819
  var _this = this;
21755
- return rxjs.combineLatest([this.posService.pos$, this.basketsService.basket$]).pipe(operators.skipWhile(function (result) { return !result[0] || !result[1]; })).subscribe(function (result) {
21820
+ return rxjs.combineLatest([this.posService.waitForPos, this.basketsService.basket$]).pipe(operators.skipWhile(function (result) { return !result[1]; })).subscribe(function (result) {
21756
21821
  _this.pos = result[0];
21757
21822
  _this.pricebookKey = result[1].pricebookKey;
21758
21823
  });
@@ -22027,6 +22092,7 @@
22027
22092
  _this.displayPricing = true;
22028
22093
  _this.displayRecipeVariant = 1;
22029
22094
  _this.loading = new i0.EventEmitter(true);
22095
+ _this.isHidden = new i0.EventEmitter(false);
22030
22096
  _this.recipes = [];
22031
22097
  _this.articles = [];
22032
22098
  _this.hide = false;
@@ -22044,6 +22110,9 @@
22044
22110
  if (changes.filters || changes.maxRecipeNumber || changes.modifiedGuests) {
22045
22111
  this.subscriptions.push(rxjs.forkJoin([this.loadRecipes(), this.loadArticles()]).pipe(operators.finalize(function () {
22046
22112
  _this.hide = _this.recipes.length === 0 && _this.articles.length === 0;
22113
+ if (_this.hide) {
22114
+ _this.isHidden.emit(true);
22115
+ }
22047
22116
  _this.loading.emit(false);
22048
22117
  _this.cdr.detectChanges();
22049
22118
  })).subscribe());
@@ -22112,7 +22181,7 @@
22112
22181
  i0__namespace.ɵɵqueryRefresh(_t = i0__namespace.ɵɵloadQuery()) && (ctx.categoryCards = _t.first);
22113
22182
  i0__namespace.ɵɵqueryRefresh(_t = i0__namespace.ɵɵloadQuery()) && (ctx.recipeCards = _t);
22114
22183
  }
22115
- }, inputs: { filters: "filters", title: "title", subtitle: "subtitle", maxRecipeNumber: "maxRecipeNumber", modifiedGuests: "modifiedGuests", displayInfos: "displayInfos", displayPricing: "displayPricing", displayRecipeVariant: "displayRecipeVariant" }, outputs: { displayList: "displayList", loading: "loading" }, features: [i0__namespace.ɵɵInheritDefinitionFeature, i0__namespace.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: function () {
22184
+ }, inputs: { filters: "filters", title: "title", subtitle: "subtitle", maxRecipeNumber: "maxRecipeNumber", modifiedGuests: "modifiedGuests", displayInfos: "displayInfos", displayPricing: "displayPricing", displayRecipeVariant: "displayRecipeVariant" }, outputs: { displayList: "displayList", loading: "loading", isHidden: "isHidden" }, features: [i0__namespace.ɵɵInheritDefinitionFeature, i0__namespace.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: function () {
22116
22185
  var i18n_2;
22117
22186
  if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
22118
22187
  var MSG_EXTERNAL_8874543985358049965$$LIB__WEB_COMPONENTS_RECIPE_CATALOG_CATALOG_CATEGORY_CATALOG_CATEGORY_COMPONENT_TS__3 = goog.getMsg("Voir tout");
@@ -22168,6 +22237,8 @@
22168
22237
  type: i0.Output
22169
22238
  }], loading: [{
22170
22239
  type: i0.Output
22240
+ }], isHidden: [{
22241
+ type: i0.Output
22171
22242
  }], categoryContent: [{
22172
22243
  type: i0.ViewChild,
22173
22244
  args: ['categoryContent']
@@ -25453,7 +25524,7 @@
25453
25524
  i0__namespace.ɵɵtemplate(1, RecipeCatalogComponent_div_2_ng_template_9_div_0_ng_container_1_ng_template_2_ng_miam_meals_planner_link_1_Template, 1, 0, "ng-miam-meals-planner-link", 57);
25454
25525
  i0__namespace.ɵɵpipe(2, "async");
25455
25526
  i0__namespace.ɵɵelementStart(3, "ng-miam-catalog-category", 58);
25456
- i0__namespace.ɵɵlistener("displayList", function RecipeCatalogComponent_div_2_ng_template_9_div_0_ng_container_1_ng_template_2_Template_ng_miam_catalog_category_displayList_3_listener($event) { i0__namespace.ɵɵrestoreView(_r52_1); var ctx_r51 = i0__namespace.ɵɵnextContext(5); return ctx_r51.categoryTitleClicked($event); });
25527
+ i0__namespace.ɵɵlistener("displayList", function RecipeCatalogComponent_div_2_ng_template_9_div_0_ng_container_1_ng_template_2_Template_ng_miam_catalog_category_displayList_3_listener($event) { i0__namespace.ɵɵrestoreView(_r52_1); var ctx_r51 = i0__namespace.ɵɵnextContext(5); return ctx_r51.categoryTitleClicked($event); })("isHidden", function RecipeCatalogComponent_div_2_ng_template_9_div_0_ng_container_1_ng_template_2_Template_ng_miam_catalog_category_isHidden_3_listener($event) { i0__namespace.ɵɵrestoreView(_r52_1); var ctx_r53 = i0__namespace.ɵɵnextContext(5); return ctx_r53.categoryHidden($event); });
25457
25528
  i0__namespace.ɵɵelementEnd();
25458
25529
  i0__namespace.ɵɵelementEnd();
25459
25530
  }
@@ -25503,11 +25574,11 @@
25503
25574
  }
25504
25575
  function RecipeCatalogComponent_div_2_Template(rf, ctx) {
25505
25576
  if (rf & 1) {
25506
- var _r55_1 = i0__namespace.ɵɵgetCurrentView();
25577
+ var _r56_1 = i0__namespace.ɵɵgetCurrentView();
25507
25578
  i0__namespace.ɵɵelementStart(0, "div", 4);
25508
25579
  i0__namespace.ɵɵelementStart(1, "div", 5);
25509
25580
  i0__namespace.ɵɵelementStart(2, "ng-miam-catalog-header", 6);
25510
- i0__namespace.ɵɵlistener("returnButtonPressed", function RecipeCatalogComponent_div_2_Template_ng_miam_catalog_header_returnButtonPressed_2_listener() { i0__namespace.ɵɵrestoreView(_r55_1); var ctx_r54 = i0__namespace.ɵɵnextContext(); return ctx_r54.returnToHomePage(); });
25581
+ i0__namespace.ɵɵlistener("returnButtonPressed", function RecipeCatalogComponent_div_2_Template_ng_miam_catalog_header_returnButtonPressed_2_listener() { i0__namespace.ɵɵrestoreView(_r56_1); var ctx_r55 = i0__namespace.ɵɵnextContext(); return ctx_r55.returnToHomePage(); });
25511
25582
  i0__namespace.ɵɵelementEnd();
25512
25583
  i0__namespace.ɵɵtemplate(3, RecipeCatalogComponent_div_2_div_3_Template, 1, 0, "div", 7);
25513
25584
  i0__namespace.ɵɵtemplate(4, RecipeCatalogComponent_div_2_div_4_Template, 4, 9, "div", 8);
@@ -25515,10 +25586,10 @@
25515
25586
  i0__namespace.ɵɵtemplate(6, RecipeCatalogComponent_div_2_div_6_Template, 17, 30, "div", 10);
25516
25587
  i0__namespace.ɵɵelementEnd();
25517
25588
  i0__namespace.ɵɵelementStart(7, "ng-miam-recipe-filters", 11);
25518
- i0__namespace.ɵɵlistener("filterChanged", function RecipeCatalogComponent_div_2_Template_ng_miam_recipe_filters_filterChanged_7_listener($event) { i0__namespace.ɵɵrestoreView(_r55_1); var ctx_r56 = i0__namespace.ɵɵnextContext(); return ctx_r56.updateFilters($event); })("filterCollapsed", function RecipeCatalogComponent_div_2_Template_ng_miam_recipe_filters_filterCollapsed_7_listener() { i0__namespace.ɵɵrestoreView(_r55_1); var ctx_r57 = i0__namespace.ɵɵnextContext(); return ctx_r57.onFilterCollapsed(); })("preferencesChanged", function RecipeCatalogComponent_div_2_Template_ng_miam_recipe_filters_preferencesChanged_7_listener() { i0__namespace.ɵɵrestoreView(_r55_1); var ctx_r58 = i0__namespace.ɵɵnextContext(); return ctx_r58.reloadPackages(); });
25589
+ i0__namespace.ɵɵlistener("filterChanged", function RecipeCatalogComponent_div_2_Template_ng_miam_recipe_filters_filterChanged_7_listener($event) { i0__namespace.ɵɵrestoreView(_r56_1); var ctx_r57 = i0__namespace.ɵɵnextContext(); return ctx_r57.updateFilters($event); })("filterCollapsed", function RecipeCatalogComponent_div_2_Template_ng_miam_recipe_filters_filterCollapsed_7_listener() { i0__namespace.ɵɵrestoreView(_r56_1); var ctx_r58 = i0__namespace.ɵɵnextContext(); return ctx_r58.onFilterCollapsed(); })("preferencesChanged", function RecipeCatalogComponent_div_2_Template_ng_miam_recipe_filters_preferencesChanged_7_listener() { i0__namespace.ɵɵrestoreView(_r56_1); var ctx_r59 = i0__namespace.ɵɵnextContext(); return ctx_r59.reloadPackages(); });
25519
25590
  i0__namespace.ɵɵelementEnd();
25520
25591
  i0__namespace.ɵɵelementStart(8, "ng-miam-preferences", 12);
25521
- i0__namespace.ɵɵlistener("isOpenChange", function RecipeCatalogComponent_div_2_Template_ng_miam_preferences_isOpenChange_8_listener($event) { i0__namespace.ɵɵrestoreView(_r55_1); var ctx_r59 = i0__namespace.ɵɵnextContext(); return ctx_r59.isPreferenceModalOpen = $event; })("preferencesChanged", function RecipeCatalogComponent_div_2_Template_ng_miam_preferences_preferencesChanged_8_listener() { i0__namespace.ɵɵrestoreView(_r55_1); var ctx_r60 = i0__namespace.ɵɵnextContext(); ctx_r60.updateFilters(ctx_r60.filters); return ctx_r60.reloadPackages(); });
25592
+ i0__namespace.ɵɵlistener("isOpenChange", function RecipeCatalogComponent_div_2_Template_ng_miam_preferences_isOpenChange_8_listener($event) { i0__namespace.ɵɵrestoreView(_r56_1); var ctx_r60 = i0__namespace.ɵɵnextContext(); return ctx_r60.isPreferenceModalOpen = $event; })("preferencesChanged", function RecipeCatalogComponent_div_2_Template_ng_miam_preferences_preferencesChanged_8_listener() { i0__namespace.ɵɵrestoreView(_r56_1); var ctx_r61 = i0__namespace.ɵɵnextContext(); ctx_r61.updateFilters(ctx_r61.filters); return ctx_r61.reloadPackages(); });
25522
25593
  i0__namespace.ɵɵelementEnd();
25523
25594
  i0__namespace.ɵɵtemplate(9, RecipeCatalogComponent_div_2_ng_template_9_Template, 1, 1, "ng-template", null, 13, i0__namespace.ɵɵtemplateRefExtractor);
25524
25595
  i0__namespace.ɵɵelementEnd();
@@ -25535,7 +25606,7 @@
25535
25606
  i0__namespace.ɵɵadvance(1);
25536
25607
  i0__namespace.ɵɵproperty("ngIf", ctx_r1.recipeCount > 0);
25537
25608
  i0__namespace.ɵɵadvance(1);
25538
- i0__namespace.ɵɵproperty("ngIf", !ctx_r1.displayHomePage())("ngIfElse", _r8);
25609
+ i0__namespace.ɵɵproperty("ngIf", !ctx_r1.displayHomePage() || ctx_r1.forceListView)("ngIfElse", _r8);
25539
25610
  i0__namespace.ɵɵadvance(1);
25540
25611
  i0__namespace.ɵɵproperty("filters", ctx_r1.filters)("isFilterCollapsed", ctx_r1.isFilterCollapsed)("filterToRemove", ctx_r1.filterToRemove)("position", ctx_r1.filtersPosition)("originTrace", ctx_r1.eventTrace());
25541
25612
  i0__namespace.ɵɵadvance(1);
@@ -25544,14 +25615,14 @@
25544
25615
  }
25545
25616
  function RecipeCatalogComponent_ng_template_3_ng_miam_recipe_stepper_0_Template(rf, ctx) {
25546
25617
  if (rf & 1) {
25547
- var _r63_1 = i0__namespace.ɵɵgetCurrentView();
25618
+ var _r64_1 = i0__namespace.ɵɵgetCurrentView();
25548
25619
  i0__namespace.ɵɵelementStart(0, "ng-miam-recipe-stepper", 60);
25549
- i0__namespace.ɵɵlistener("recipeChange", function RecipeCatalogComponent_ng_template_3_ng_miam_recipe_stepper_0_Template_ng_miam_recipe_stepper_recipeChange_0_listener() { i0__namespace.ɵɵrestoreView(_r63_1); var ctx_r62 = i0__namespace.ɵɵnextContext(2); return ctx_r62.leaveCreatePage(); })("canceled", function RecipeCatalogComponent_ng_template_3_ng_miam_recipe_stepper_0_Template_ng_miam_recipe_stepper_canceled_0_listener() { i0__namespace.ɵɵrestoreView(_r63_1); var ctx_r64 = i0__namespace.ɵɵnextContext(2); return ctx_r64.leaveCreatePage(); });
25620
+ i0__namespace.ɵɵlistener("recipeChange", function RecipeCatalogComponent_ng_template_3_ng_miam_recipe_stepper_0_Template_ng_miam_recipe_stepper_recipeChange_0_listener() { i0__namespace.ɵɵrestoreView(_r64_1); var ctx_r63 = i0__namespace.ɵɵnextContext(2); return ctx_r63.leaveCreatePage(); })("canceled", function RecipeCatalogComponent_ng_template_3_ng_miam_recipe_stepper_0_Template_ng_miam_recipe_stepper_canceled_0_listener() { i0__namespace.ɵɵrestoreView(_r64_1); var ctx_r65 = i0__namespace.ɵɵnextContext(2); return ctx_r65.leaveCreatePage(); });
25550
25621
  i0__namespace.ɵɵelementEnd();
25551
25622
  }
25552
25623
  if (rf & 2) {
25553
- var ctx_r61 = i0__namespace.ɵɵnextContext(2);
25554
- i0__namespace.ɵɵproperty("recipeToUpdate", ctx_r61.recipeToUpdate)("originTrace", ctx_r61.eventTrace());
25624
+ var ctx_r62 = i0__namespace.ɵɵnextContext(2);
25625
+ i0__namespace.ɵɵproperty("recipeToUpdate", ctx_r62.recipeToUpdate)("originTrace", ctx_r62.eventTrace());
25555
25626
  }
25556
25627
  }
25557
25628
  function RecipeCatalogComponent_ng_template_3_Template(rf, ctx) {
@@ -25597,6 +25668,7 @@
25597
25668
  _this.isMyMealClose = true;
25598
25669
  _this.catalogSettingHasLoaded = false;
25599
25670
  _this.guests = +localStorage.getItem('_miam/preferences/guests');
25671
+ _this.forceListView = false;
25600
25672
  _this.subscriptions = [];
25601
25673
  _this.headerHeightSubscription = new rxjs.Subscription();
25602
25674
  _this.isMobile = mediaMatcher.matchMedia('(max-width: 1022px)').matches;
@@ -25658,7 +25730,7 @@
25658
25730
  }
25659
25731
  };
25660
25732
  RecipeCatalogComponent.prototype.displayHomePage = function () {
25661
- return this.filters.isEmpty();
25733
+ return this.filters.isEmpty() && !this.forceListView;
25662
25734
  };
25663
25735
  // init the value of the image and the text for the catalog header, using the catalog setting of the supplier
25664
25736
  RecipeCatalogComponent.prototype.initCatalogHeader = function (supplier) {
@@ -25673,6 +25745,12 @@
25673
25745
  _this.setStickyObserver();
25674
25746
  })).subscribe());
25675
25747
  }
25748
+ else {
25749
+ // No catalog setting returned by api => load catalog header nevertheless in default mode
25750
+ this.catalogSettingHasLoaded = true;
25751
+ this.cdr.detectChanges();
25752
+ this.setStickyObserver();
25753
+ }
25676
25754
  };
25677
25755
  RecipeCatalogComponent.prototype.deepCloneAndResetValues = function (filters) {
25678
25756
  return filters.map(function (filter) { return (Object.assign(Object.assign({}, filter), { value: false })); });
@@ -25680,6 +25758,7 @@
25680
25758
  // Used on load to build the filters attribute, and on click on the link to reset the filters
25681
25759
  RecipeCatalogComponent.prototype.initFilters = function () {
25682
25760
  var _this = this;
25761
+ this.forceListView = false;
25683
25762
  this.filters = new RecipeFilters({
25684
25763
  difficulty: this.recipesService.difficultyLevels.map(function (f) { return ({ name: f.value.toString(), text: f.label, value: false }); }),
25685
25764
  cost: [
@@ -25708,6 +25787,7 @@
25708
25787
  };
25709
25788
  RecipeCatalogComponent.prototype.updateFilters = function (filters) {
25710
25789
  this.filters = filters.copy(); // necessary to trigger child component change
25790
+ this.forceListView = true;
25711
25791
  this.filterToRemove = undefined;
25712
25792
  this.cdr.detectChanges();
25713
25793
  this.setStickyObserver();
@@ -25719,6 +25799,13 @@
25719
25799
  this.updateFilters(filters);
25720
25800
  }
25721
25801
  };
25802
+ RecipeCatalogComponent.prototype.categoryHidden = function (hidden) {
25803
+ if (!hidden) {
25804
+ return;
25805
+ }
25806
+ this.categories.splice(0, 1);
25807
+ this.cdr.detectChanges();
25808
+ };
25722
25809
  RecipeCatalogComponent.prototype.categoryTitleClicked = function (event) {
25723
25810
  var filters = Object.assign(this.filters, {
25724
25811
  additionalFilters: { filters: event.filters, title: event.title, subtitle: event.subtitle }
@@ -26055,7 +26142,7 @@
26055
26142
  else {
26056
26143
  i18n_12 = $localize(templateObject_6$2 || (templateObject_6$2 = __makeTemplateObject([":\u241F3b0b12b85604af610c07cfbd5d4f74662b9a881a\u241F1931799427977453728:Ajouter une id\u00E9e repas"], [":\u241F3b0b12b85604af610c07cfbd5d4f74662b9a881a\u241F1931799427977453728:Ajouter une id\u00E9e repas"])));
26057
26144
  }
26058
- return [[1, "miam-catalog-anchor"], ["miamCatalogTopAnchor", ""], ["class", "miam-recipe-catalog", 4, "ngIf", "ngIfElse"], ["creationPage", ""], [1, "miam-recipe-catalog"], [1, "miam-recipe-catalog__content"], [3, "home", "searchTerm", "additionalFiltersTitle", "homeLabel", "pictureUrl", "catalogSetting", "returnButtonPressed"], ["class", "miam-recipe-catalog__toolbar-container-anchor", 4, "ngIf"], ["class", "miam-recipe-catalog__toolbar-container", 4, "ngIf"], ["class", "miam-recipe-catalog__content__myMeal__button", 3, "click", 4, "ngIf"], ["class", "miam-recipe-catalog__list", 4, "ngIf", "ngIfElse"], [3, "filters", "isFilterCollapsed", "filterToRemove", "position", "originTrace", "filterChanged", "filterCollapsed", "preferencesChanged"], [3, "isOpen", "filters", "isOpenChange", "preferencesChanged"], ["categoriesComponents", ""], [1, "miam-recipe-catalog__toolbar-container-anchor"], [1, "miam-recipe-catalog__toolbar-container"], ["stickyToolbar", ""], [3, "home", "searchTerm", "additionalFiltersTitle", "favoritesButtonHidden", "personalButtonHidden", "filterBadgeCount", "reduced", "filterButtonPressed", "preferencesButtonPressed", "searchStringChanged", "personalButtonPressed", "favoritesButtonPressed", "returnHomePressed"], [1, "miam-recipe-catalog__content__myMeal__button", 3, "click"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/cutlery-white.svg", "alt", "Cutlery", 1, "miam-recipe-catalog__myMeal__first__icon"], [1, "miam-recipe-catalog__myMeal__button__text", "miam-ds-text", "weight-xl"], i18n_2, ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/chevron-down-white.svg", "alt", "Caret", 1, "miam-recipe-catalog__myMeal__second__icon"], [1, "miam-recipe-catalog__list"], [1, "miam-recipe-catalog__content__title"], [1, "miam-recipe-catalog__content__title-icon", "miam-ds-button", "primary", "square", 3, "click"], ["alt", "return", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/ArrowLeft_white.svg"], ["class", "miam-recipe-catalog__content__title__search__text", 4, "ngIf"], ["class", "miam-recipe-catalog__content__title__favorites__text", 4, "ngIf"], ["class", "miam-recipe-catalog__content__title__personal__text", 4, "ngIf"], ["class", "miam-recipe-catalog__content__title__category", 4, "ngIf"], ["class", "miam-recipe-catalog__content__default__text", 4, "ngIf"], ["stickyToolbarCollection", ""], ["class", "miam-recipe-catalog__list__create___button", 3, "click", 4, "ngIf"], [3, "ngClass", "filters", "originTrace", "displayPricing", "displayInfos", "modifiedGuests", "displayRecipeVariant", "filterRemoved", "recipeActionTriggered"], [1, "miam-recipe-catalog__content__title__search__text"], i18n_4, [1, "miam-recipe-catalog__content__title__favorites__text"], i18n_6, [1, "miam-recipe-catalog__content__title__personal__text"], i18n_8, [1, "miam-recipe-catalog__content__title__category"], [1, "miam-ds-text", "size-l", "weight-xxl"], ["class", "miam-ds-text size-s weight-l", 4, "ngIf"], [1, "miam-ds-text", "size-s", "weight-l"], [1, "miam-recipe-catalog__content__default__text"], i18n_10, [1, "miam-recipe-catalog__list__create___button", 3, "click"], ["width", "24", "height", "24", "primaryColor", "var(--m-color-primary)", 3, "iconName"], i18n_12, ["class", "miam-recipe-catalog__categories", 4, "ngIf"], [1, "miam-recipe-catalog__categories"], [4, "ngFor", "ngForOf"], [4, "ngIf", "ngIfElse"], ["firstCategory", ""], [3, "title", "subtitle", "filters", "maxRecipeNumber", "displayInfos", "displayPricing", "originTrace", "modifiedGuests", "displayRecipeVariant", "displayList"], [1, "miam-recipe-catalog__first-category"], [4, "ngIf"], [3, "title", "subtitle", "filters", "displayInfos", "displayPricing", "maxRecipeNumber", "modifiedGuests", "displayRecipeVariant", "originTrace", "displayList"], [3, "recipeToUpdate", "originTrace", "recipeChange", "canceled", 4, "ngIf"], [3, "recipeToUpdate", "originTrace", "recipeChange", "canceled"]];
26145
+ return [[1, "miam-catalog-anchor"], ["miamCatalogTopAnchor", ""], ["class", "miam-recipe-catalog", 4, "ngIf", "ngIfElse"], ["creationPage", ""], [1, "miam-recipe-catalog"], [1, "miam-recipe-catalog__content"], [3, "home", "searchTerm", "additionalFiltersTitle", "homeLabel", "pictureUrl", "catalogSetting", "returnButtonPressed"], ["class", "miam-recipe-catalog__toolbar-container-anchor", 4, "ngIf"], ["class", "miam-recipe-catalog__toolbar-container", 4, "ngIf"], ["class", "miam-recipe-catalog__content__myMeal__button", 3, "click", 4, "ngIf"], ["class", "miam-recipe-catalog__list", 4, "ngIf", "ngIfElse"], [3, "filters", "isFilterCollapsed", "filterToRemove", "position", "originTrace", "filterChanged", "filterCollapsed", "preferencesChanged"], [3, "isOpen", "filters", "isOpenChange", "preferencesChanged"], ["categoriesComponents", ""], [1, "miam-recipe-catalog__toolbar-container-anchor"], [1, "miam-recipe-catalog__toolbar-container"], ["stickyToolbar", ""], [3, "home", "searchTerm", "additionalFiltersTitle", "favoritesButtonHidden", "personalButtonHidden", "filterBadgeCount", "reduced", "filterButtonPressed", "preferencesButtonPressed", "searchStringChanged", "personalButtonPressed", "favoritesButtonPressed", "returnHomePressed"], [1, "miam-recipe-catalog__content__myMeal__button", 3, "click"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/cutlery-white.svg", "alt", "Cutlery", 1, "miam-recipe-catalog__myMeal__first__icon"], [1, "miam-recipe-catalog__myMeal__button__text", "miam-ds-text", "weight-xl"], i18n_2, ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/chevron-down-white.svg", "alt", "Caret", 1, "miam-recipe-catalog__myMeal__second__icon"], [1, "miam-recipe-catalog__list"], [1, "miam-recipe-catalog__content__title"], [1, "miam-recipe-catalog__content__title-icon", "miam-ds-button", "primary", "square", 3, "click"], ["alt", "return", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/ArrowLeft_white.svg"], ["class", "miam-recipe-catalog__content__title__search__text", 4, "ngIf"], ["class", "miam-recipe-catalog__content__title__favorites__text", 4, "ngIf"], ["class", "miam-recipe-catalog__content__title__personal__text", 4, "ngIf"], ["class", "miam-recipe-catalog__content__title__category", 4, "ngIf"], ["class", "miam-recipe-catalog__content__default__text", 4, "ngIf"], ["stickyToolbarCollection", ""], ["class", "miam-recipe-catalog__list__create___button", 3, "click", 4, "ngIf"], [3, "ngClass", "filters", "originTrace", "displayPricing", "displayInfos", "modifiedGuests", "displayRecipeVariant", "filterRemoved", "recipeActionTriggered"], [1, "miam-recipe-catalog__content__title__search__text"], i18n_4, [1, "miam-recipe-catalog__content__title__favorites__text"], i18n_6, [1, "miam-recipe-catalog__content__title__personal__text"], i18n_8, [1, "miam-recipe-catalog__content__title__category"], [1, "miam-ds-text", "size-l", "weight-xxl"], ["class", "miam-ds-text size-s weight-l", 4, "ngIf"], [1, "miam-ds-text", "size-s", "weight-l"], [1, "miam-recipe-catalog__content__default__text"], i18n_10, [1, "miam-recipe-catalog__list__create___button", 3, "click"], ["width", "24", "height", "24", "primaryColor", "var(--m-color-primary)", 3, "iconName"], i18n_12, ["class", "miam-recipe-catalog__categories", 4, "ngIf"], [1, "miam-recipe-catalog__categories"], [4, "ngFor", "ngForOf"], [4, "ngIf", "ngIfElse"], ["firstCategory", ""], [3, "title", "subtitle", "filters", "maxRecipeNumber", "displayInfos", "displayPricing", "originTrace", "modifiedGuests", "displayRecipeVariant", "displayList"], [1, "miam-recipe-catalog__first-category"], [4, "ngIf"], [3, "title", "subtitle", "filters", "displayInfos", "displayPricing", "maxRecipeNumber", "modifiedGuests", "displayRecipeVariant", "originTrace", "displayList", "isHidden"], [3, "recipeToUpdate", "originTrace", "recipeChange", "canceled", 4, "ngIf"], [3, "recipeToUpdate", "originTrace", "recipeChange", "canceled"]];
26059
26146
  }, template: function RecipeCatalogComponent_Template(rf, ctx) {
26060
26147
  if (rf & 1) {
26061
26148
  i0__namespace.ɵɵelement(0, "div", 0, 1);
@@ -26067,7 +26154,7 @@
26067
26154
  i0__namespace.ɵɵadvance(2);
26068
26155
  i0__namespace.ɵɵproperty("ngIf", !ctx.creatingRecipe && ctx.catalogSettingHasLoaded)("ngIfElse", _r2);
26069
26156
  }
26070
- }, directives: [i2__namespace$2.NgIf, CatalogHeaderComponent, RecipeFiltersComponent, PreferencesComponent, CatalogToolbarComponent, CatalogListComponent, i2__namespace$2.NgClass, IconComponent, i2__namespace$2.NgForOf, CatalogCategoryComponent, MealsPlannerLinkComponent, RecipeStepperComponent], pipes: [i2__namespace$2.AsyncPipe], styles: [".miam-recipe-catalog{display:flex;justify-content:space-between;width:100%;position:relative;background-color:var(--miam-ds-color-neutral-white)}.miam-recipe-catalog .miam-recipe-catalog__toolbar-container{width:-webkit-fill-available;padding:33px 80px 0;box-sizing:border-box;z-index:10;background-color:var(--miam-ds-color-neutral-white);transition:padding .3s ease}.miam-recipe-catalog .miam-recipe-catalog__toolbar-container.sticking{position:fixed;top:0;border-bottom:1px solid var(--miam-ds-color-neutral-200,#d9dde1);padding:16px 40px}@media (max-width:1023px){.miam-recipe-catalog .miam-recipe-catalog__toolbar-container{padding:24px 16px 0}.miam-recipe-catalog .miam-recipe-catalog__toolbar-container.sticking{padding:8px}}.miam-recipe-catalog .miam-recipe-catalog__content{width:100%;position:relative}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title{width:100%;padding:0 80px;font-size:20px;line-height:34px;font-weight:900;display:flex;align-items:center;gap:16px;color:var(--miam-ds-color-neutral-black,#1f3543);box-sizing:border-box}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title .miam-recipe-catalog__content__title__search__text{display:flex;flex-wrap:wrap;gap:6px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title .miam-recipe-catalog__content__title-icon{width:32px;height:32px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title .miam-recipe-catalog__content__title-icon img{cursor:pointer;width:13px;height:13px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title .miam-recipe-catalog__content__title__category{display:flex;flex-direction:column;gap:4px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title .miam-recipe-catalog__content__title__category .size-s{color:var(--miam-ds-color-neutral-500)}@media (max-width:1023px){.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title{width:100%;padding:0 24px;box-sizing:border-box}}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories{display:flex;flex-direction:column;width:100%;padding:24px 80px 48px;box-sizing:border-box}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category{display:flex;flex-direction:row;width:100%;align-items:flex-end}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category ng-miam-meals-planner-link{margin:0 16px 56px 0}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category ng-miam-catalog-category{flex:1}@media (max-width:1023px){.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories{padding:24px 0 48px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category{flex-direction:column;align-items:flex-start}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category ng-miam-catalog-category{width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category ng-miam-meals-planner-link{width:100%;padding:0 24px 24px;box-sizing:border-box;margin:unset}}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__list{width:100%;padding:24px 0;box-sizing:border-box}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__list .miam-recipe-catalog__toolbar-container:not(.sticking){padding-bottom:24px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__list .miam-recipe-catalog__toolbar-container.sticking{padding:8px 24px}@media (max-width:1023px){.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__list .miam-recipe-catalog__toolbar-container .sticking{padding:8px}}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__list .miam-recipe-catalog__list__create___button{display:flex;align-items:center;border:1px solid var(--miam-color-primary);border-radius:20px;padding:4px 8px;width:-moz-fit-content;width:fit-content;cursor:pointer;color:var(--miam-color-primary);margin-bottom:24px}.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button{cursor:pointer;width:400px;position:fixed;left:50%;bottom:16px;transform:translate(-50%);z-index:1;display:inline-flex;min-height:48px;padding:0 16px;justify-content:space-between;align-items:center;gap:12px;border-radius:1000px;background:var(--miam-color-primary-900,#10323f);box-shadow:0 8px 16px 0 rgba(0,0,0,.2)}.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button .miam-recipe-catalog__myMeal__button__text{font-weight:700;color:var(--miam-ds-color-neutral-white,#fff);white-space:nowrap}.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button .miam-recipe-catalog__myMeal__second__icon{transform:rotate(-90deg)}@media (max-width:607px){.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button{width:auto;z-index:2}}.miam-recipe-catalog ng-miam-recipe-card .miam-recipe-card{height:var(--m-catalog-card-height);width:var(--m-catalog-card-width)}"], encapsulation: 2, changeDetection: 0 });
26157
+ }, directives: [i2__namespace$2.NgIf, CatalogHeaderComponent, RecipeFiltersComponent, PreferencesComponent, CatalogToolbarComponent, CatalogListComponent, i2__namespace$2.NgClass, IconComponent, i2__namespace$2.NgForOf, CatalogCategoryComponent, MealsPlannerLinkComponent, RecipeStepperComponent], pipes: [i2__namespace$2.AsyncPipe], styles: [".miam-recipe-catalog{display:flex;justify-content:space-between;width:100%;position:relative;background-color:var(--miam-ds-color-neutral-white)}.miam-recipe-catalog .miam-recipe-catalog__toolbar-container-anchor{width:100%}.miam-recipe-catalog .miam-recipe-catalog__toolbar-container{width:-webkit-fill-available;padding:33px 80px 0;box-sizing:border-box;z-index:10;background-color:var(--miam-ds-color-neutral-white);transition:padding .3s ease}.miam-recipe-catalog .miam-recipe-catalog__toolbar-container.sticking{position:fixed;top:0;border-bottom:1px solid var(--miam-ds-color-neutral-200,#d9dde1);padding:16px 40px}@media (max-width:1023px){.miam-recipe-catalog .miam-recipe-catalog__toolbar-container{padding:24px 16px 0}.miam-recipe-catalog .miam-recipe-catalog__toolbar-container.sticking{padding:8px}}.miam-recipe-catalog .miam-recipe-catalog__content{width:100%;position:relative}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title{width:100%;padding:0 80px;font-size:20px;line-height:34px;font-weight:900;display:flex;align-items:center;gap:16px;color:var(--miam-ds-color-neutral-black,#1f3543);box-sizing:border-box}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title .miam-recipe-catalog__content__title__search__text{display:flex;flex-wrap:wrap;gap:6px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title .miam-recipe-catalog__content__title-icon{width:32px;height:32px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title .miam-recipe-catalog__content__title-icon img{cursor:pointer;width:13px;height:13px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title .miam-recipe-catalog__content__title__category{display:flex;flex-direction:column;gap:4px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title .miam-recipe-catalog__content__title__category .size-s{color:var(--miam-ds-color-neutral-500)}@media (max-width:1023px){.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title{width:100%;padding:0 24px;box-sizing:border-box}}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories{display:flex;flex-direction:column;width:100%;padding:24px 80px 48px;box-sizing:border-box}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category{display:flex;flex-direction:row;width:100%;align-items:flex-end}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category ng-miam-meals-planner-link{margin:0 16px 56px 0}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category ng-miam-catalog-category{flex:1}@media (max-width:1023px){.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories{padding:24px 0 48px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category{flex-direction:column;align-items:flex-start}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category ng-miam-catalog-category{width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category ng-miam-meals-planner-link{width:100%;padding:0 24px 24px;box-sizing:border-box;margin:unset}}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__list{width:100%;padding:24px 0;box-sizing:border-box}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__list .miam-recipe-catalog__toolbar-container:not(.sticking){padding-bottom:24px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__list .miam-recipe-catalog__toolbar-container.sticking{padding:8px 24px}@media (max-width:1023px){.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__list .miam-recipe-catalog__toolbar-container .sticking{padding:8px}}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__list .miam-recipe-catalog__list__create___button{display:flex;align-items:center;border:1px solid var(--miam-color-primary);border-radius:20px;padding:4px 8px;width:-moz-fit-content;width:fit-content;cursor:pointer;color:var(--miam-color-primary);margin-bottom:24px}.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button{cursor:pointer;width:400px;position:fixed;left:50%;bottom:16px;transform:translate(-50%);z-index:1;display:inline-flex;min-height:48px;padding:0 16px;justify-content:space-between;align-items:center;gap:12px;border-radius:1000px;background:var(--miam-color-primary-900,#10323f);box-shadow:0 8px 16px 0 rgba(0,0,0,.2)}.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button .miam-recipe-catalog__myMeal__button__text{font-weight:700;color:var(--miam-ds-color-neutral-white,#fff);white-space:nowrap}.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button .miam-recipe-catalog__myMeal__second__icon{transform:rotate(-90deg)}@media (max-width:607px){.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button{width:auto;z-index:2}}.miam-recipe-catalog ng-miam-recipe-card .miam-recipe-card{height:var(--m-catalog-card-height);width:var(--m-catalog-card-width)}"], encapsulation: 2, changeDetection: 0 });
26071
26158
  (function () {
26072
26159
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(RecipeCatalogComponent, [{
26073
26160
  type: i0.Component,
@@ -26615,7 +26702,7 @@
26615
26702
  i0__namespace.ɵɵtextInterpolate1("", ctx_r9.recipesService.difficultyLevels[ctx_r9.recipe.difficulty - 1].label, " ");
26616
26703
  }
26617
26704
  }
26618
- var _c2$2 = function (a0, a1, a2) { return { "easy": a0, "medium": a1, "hard": a2 }; };
26705
+ var _c2$2 = function (a0, a1, a2, a3) { return { "easy": a0, "medium": a1, "hard": a2, "no-difficulty-defined": a3 }; };
26619
26706
  function RecipeDetailsInfosComponent_div_11_Template(rf, ctx) {
26620
26707
  if (rf & 1) {
26621
26708
  i0__namespace.ɵɵelementStart(0, "div", 14);
@@ -26626,7 +26713,7 @@
26626
26713
  if (rf & 2) {
26627
26714
  var ctx_r6 = i0__namespace.ɵɵnextContext();
26628
26715
  var _r2 = i0__namespace.ɵɵreference(3);
26629
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction3(3, _c2$2, ctx_r6.recipe.difficulty === 1, ctx_r6.recipe.difficulty === 2, ctx_r6.recipe.difficulty === 3));
26716
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction4(3, _c2$2, ctx_r6.recipe.difficulty === 1, ctx_r6.recipe.difficulty === 2, ctx_r6.recipe.difficulty === 3, !ctx_r6.recipe.difficulty));
26630
26717
  i0__namespace.ɵɵadvance(2);
26631
26718
  i0__namespace.ɵɵproperty("ngIf", ctx_r6.recipe.difficulty)("ngIfElse", _r2);
26632
26719
  }
@@ -26693,7 +26780,7 @@
26693
26780
  i0__namespace.ɵɵelement(9, "img", 7);
26694
26781
  i0__namespace.ɵɵtemplate(10, RecipeDetailsInfosComponent_span_10_Template, 2, 1, "span", 5);
26695
26782
  i0__namespace.ɵɵelementEnd();
26696
- i0__namespace.ɵɵtemplate(11, RecipeDetailsInfosComponent_div_11_Template, 3, 7, "div", 8);
26783
+ i0__namespace.ɵɵtemplate(11, RecipeDetailsInfosComponent_div_11_Template, 3, 8, "div", 8);
26697
26784
  i0__namespace.ɵɵtemplate(12, RecipeDetailsInfosComponent_div_12_Template, 2, 0, "div", 9);
26698
26785
  i0__namespace.ɵɵtemplate(13, RecipeDetailsInfosComponent_div_13_Template, 3, 1, "div", 10);
26699
26786
  i0__namespace.ɵɵelementEnd();
@@ -26717,7 +26804,7 @@
26717
26804
  i0__namespace.ɵɵadvance(1);
26718
26805
  i0__namespace.ɵɵproperty("ngForOf", ctx.recipe.relationships.tags.data);
26719
26806
  }
26720
- }, directives: [i2__namespace$2.NgClass, i2__namespace$2.NgIf, i2__namespace$2.NgForOf], styles: [".miam-recipe-details-infos__container{display:flex;flex-wrap:wrap;gap:8px}.miam-recipe-details-infos__container.tags-displayed .miam-recipe-details-infos__badge.more-info{display:none}.miam-recipe-details-infos__container.tags-displayed .miam-recipe-details-infos__badge.tag{display:flex}.miam-recipe-details-infos__container .miam-recipe-details-infos__badge{display:flex;gap:8px;align-items:center;color:var(--miam-ds-color-neutral-black,#1f3543)}.miam-recipe-details-infos__container .miam-recipe-details-infos__badge.tag{display:none}.miam-recipe-details-infos__container .miam-recipe-details-infos__badge.more-info{cursor:pointer}"], encapsulation: 2, changeDetection: 0 });
26807
+ }, directives: [i2__namespace$2.NgClass, i2__namespace$2.NgIf, i2__namespace$2.NgForOf], styles: [".miam-recipe-details-infos__container{display:flex;flex-wrap:wrap;gap:8px}.miam-recipe-details-infos__container.tags-displayed .miam-recipe-details-infos__badge.more-info{display:none}.miam-recipe-details-infos__container.tags-displayed .miam-recipe-details-infos__badge.tag{display:flex}.miam-recipe-details-infos__container .miam-recipe-details-infos__badge{display:flex;gap:8px;align-items:center;color:var(--miam-ds-color-neutral-black,#1f3543)}.miam-recipe-details-infos__container .miam-recipe-details-infos__badge.tag{display:none}.miam-recipe-details-infos__container .miam-recipe-details-infos__badge.more-info{cursor:pointer}.miam-recipe-details-infos__container .miam-recipe-details-infos__badge__cooking-time.no-cooking-time-defined,.miam-recipe-details-infos__container .miam-recipe-details-infos__badge__difficulty.no-difficulty-defined,.miam-recipe-details-infos__container .miam-recipe-details-infos__badge__preparation-time.no-preparation-time-defined{display:none}"], encapsulation: 2, changeDetection: 0 });
26721
26808
  (function () {
26722
26809
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(RecipeDetailsInfosComponent, [{
26723
26810
  type: i0.Component,
@@ -27030,7 +27117,7 @@
27030
27117
  i0__namespace.ɵɵpipe(1, "async");
27031
27118
  }
27032
27119
  if (rf & 2) {
27033
- i0__namespace.ɵɵproperty("ngIf", i0__namespace.ɵɵpipeBind1(1, 1, ctx.posService.pos$));
27120
+ i0__namespace.ɵɵproperty("ngIf", i0__namespace.ɵɵpipeBind1(1, 1, ctx.posService.waitForPos));
27034
27121
  }
27035
27122
  }, directives: [i2__namespace$2.NgIf], pipes: [i2__namespace$2.AsyncPipe], styles: [".miam-store-locator-link{padding:8px 16px;display:flex;align-items:center;justify-content:space-between;background:var(--miam-ds-color-primary-100)}.miam-store-locator-link .miam-store-locator-link__swap-pos-button{border-radius:16px;display:flex;gap:8px}.miam-store-locator-link .miam-store-locator-link__swap-pos-button.miam-ds-button.primary.reverse.small{padding:8px 12px}.miam-store-locator-link .miam-store-locator-link__swap-pos-button.miam-ds-button.primary.reverse.small:hover{background-color:var(--miam-ds-color-primary-text);color:var(--miam-ds-color-primary)}"], encapsulation: 2, changeDetection: 0 });
27036
27123
  (function () {
@@ -27144,41 +27231,50 @@
27144
27231
  i0__namespace.ɵɵproperty("selectedTabIndex", ctx_r13.activeTabIndex);
27145
27232
  }
27146
27233
  }
27147
- function RecipeDetailsComponent_div_0_div_3_ng_container_35_ng_miam_no_pos_selected_2_Template(rf, ctx) {
27234
+ function RecipeDetailsComponent_div_0_div_3_ng_container_35_ng_miam_products_picker_1_Template(rf, ctx) {
27148
27235
  if (rf & 1) {
27149
- var _r26_1 = i0__namespace.ɵɵgetCurrentView();
27150
- i0__namespace.ɵɵelementStart(0, "ng-miam-no-pos-selected", 49);
27151
- i0__namespace.ɵɵlistener("posSelected", function RecipeDetailsComponent_div_0_div_3_ng_container_35_ng_miam_no_pos_selected_2_Template_ng_miam_no_pos_selected_posSelected_0_listener() { i0__namespace.ɵɵrestoreView(_r26_1); var ctx_r25 = i0__namespace.ɵɵnextContext(4); return ctx_r25.checkPos(); });
27236
+ var _r27_1 = i0__namespace.ɵɵgetCurrentView();
27237
+ i0__namespace.ɵɵelementStart(0, "ng-miam-products-picker", 49);
27238
+ i0__namespace.ɵɵlistener("closeModal", function RecipeDetailsComponent_div_0_div_3_ng_container_35_ng_miam_products_picker_1_Template_ng_miam_products_picker_closeModal_0_listener() { i0__namespace.ɵɵrestoreView(_r27_1); var ctx_r26 = i0__namespace.ɵɵnextContext(4); return ctx_r26.onClose(); })("guestsChange", function RecipeDetailsComponent_div_0_div_3_ng_container_35_ng_miam_products_picker_1_Template_ng_miam_products_picker_guestsChange_0_listener($event) { i0__namespace.ɵɵrestoreView(_r27_1); var ctx_r28 = i0__namespace.ɵɵnextContext(4); return ctx_r28.updateGuests($event); });
27152
27239
  i0__namespace.ɵɵelementEnd();
27153
27240
  }
27154
27241
  if (rf & 2) {
27155
27242
  var ctx_r24 = i0__namespace.ɵɵnextContext(4);
27156
- i0__namespace.ɵɵproperty("invalidPos", ctx_r24.recipeDetailsService.invalidPosDisplay);
27243
+ i0__namespace.ɵɵproperty("originTrace", ctx_r24.eventTrace());
27244
+ }
27245
+ }
27246
+ function RecipeDetailsComponent_div_0_div_3_ng_container_35_ng_miam_no_pos_selected_2_Template(rf, ctx) {
27247
+ if (rf & 1) {
27248
+ var _r30_1 = i0__namespace.ɵɵgetCurrentView();
27249
+ i0__namespace.ɵɵelementStart(0, "ng-miam-no-pos-selected", 50);
27250
+ i0__namespace.ɵɵlistener("posSelected", function RecipeDetailsComponent_div_0_div_3_ng_container_35_ng_miam_no_pos_selected_2_Template_ng_miam_no_pos_selected_posSelected_0_listener() { i0__namespace.ɵɵrestoreView(_r30_1); var ctx_r29 = i0__namespace.ɵɵnextContext(4); return ctx_r29.checkPos(); });
27251
+ i0__namespace.ɵɵelementEnd();
27252
+ }
27253
+ if (rf & 2) {
27254
+ var ctx_r25 = i0__namespace.ɵɵnextContext(4);
27255
+ i0__namespace.ɵɵproperty("invalidPos", ctx_r25.recipeDetailsService.invalidPosDisplay);
27157
27256
  }
27158
27257
  }
27159
27258
  function RecipeDetailsComponent_div_0_div_3_ng_container_35_Template(rf, ctx) {
27160
27259
  if (rf & 1) {
27161
- var _r28_1 = i0__namespace.ɵɵgetCurrentView();
27162
27260
  i0__namespace.ɵɵelementContainerStart(0);
27163
- i0__namespace.ɵɵelementStart(1, "ng-miam-products-picker", 47);
27164
- i0__namespace.ɵɵlistener("closeModal", function RecipeDetailsComponent_div_0_div_3_ng_container_35_Template_ng_miam_products_picker_closeModal_1_listener() { i0__namespace.ɵɵrestoreView(_r28_1); var ctx_r27 = i0__namespace.ɵɵnextContext(3); return ctx_r27.onClose(); })("guestsChange", function RecipeDetailsComponent_div_0_div_3_ng_container_35_Template_ng_miam_products_picker_guestsChange_1_listener($event) { i0__namespace.ɵɵrestoreView(_r28_1); var ctx_r29 = i0__namespace.ɵɵnextContext(3); return ctx_r29.updateGuests($event); });
27165
- i0__namespace.ɵɵelementEnd();
27261
+ i0__namespace.ɵɵtemplate(1, RecipeDetailsComponent_div_0_div_3_ng_container_35_ng_miam_products_picker_1_Template, 1, 1, "ng-miam-products-picker", 47);
27166
27262
  i0__namespace.ɵɵtemplate(2, RecipeDetailsComponent_div_0_div_3_ng_container_35_ng_miam_no_pos_selected_2_Template, 1, 1, "ng-miam-no-pos-selected", 48);
27167
27263
  i0__namespace.ɵɵelementContainerEnd();
27168
27264
  }
27169
27265
  if (rf & 2) {
27170
27266
  var ctx_r14 = i0__namespace.ɵɵnextContext(3);
27171
27267
  i0__namespace.ɵɵadvance(1);
27172
- i0__namespace.ɵɵproperty("originTrace", ctx_r14.eventTrace());
27268
+ i0__namespace.ɵɵproperty("ngIf", !ctx_r14.recipeDetailsService.noPosDisplay && !ctx_r14.recipeDetailsService.invalidPosDisplay);
27173
27269
  i0__namespace.ɵɵadvance(1);
27174
27270
  i0__namespace.ɵɵproperty("ngIf", ctx_r14.recipeDetailsService.noPosDisplay || ctx_r14.recipeDetailsService.invalidPosDisplay);
27175
27271
  }
27176
27272
  }
27177
27273
  function RecipeDetailsComponent_div_0_div_3_div_36_Template(rf, ctx) {
27178
27274
  if (rf & 1) {
27179
- i0__namespace.ɵɵelementStart(0, "div", 50);
27180
- i0__namespace.ɵɵelement(1, "ng-miam-recipe-details-ingredients", 51);
27181
- i0__namespace.ɵɵelement(2, "ng-miam-recipe-details-steps", 52);
27275
+ i0__namespace.ɵɵelementStart(0, "div", 51);
27276
+ i0__namespace.ɵɵelement(1, "ng-miam-recipe-details-ingredients", 52);
27277
+ i0__namespace.ɵɵelement(2, "ng-miam-recipe-details-steps", 53);
27182
27278
  i0__namespace.ɵɵelementEnd();
27183
27279
  }
27184
27280
  if (rf & 2) {
@@ -27192,40 +27288,40 @@
27192
27288
  function RecipeDetailsComponent_div_0_div_3_div_37_ng_container_1_button_1_span_7_Template(rf, ctx) {
27193
27289
  if (rf & 1) {
27194
27290
  i0__namespace.ɵɵelementStart(0, "span");
27195
- i0__namespace.ɵɵi18n(1, 64);
27291
+ i0__namespace.ɵɵi18n(1, 65);
27196
27292
  i0__namespace.ɵɵelementEnd();
27197
27293
  }
27198
27294
  }
27199
27295
  function RecipeDetailsComponent_div_0_div_3_div_37_ng_container_1_button_1_span_8_Template(rf, ctx) {
27200
27296
  if (rf & 1) {
27201
27297
  i0__namespace.ɵɵelementStart(0, "span");
27202
- i0__namespace.ɵɵi18n(1, 65);
27298
+ i0__namespace.ɵɵi18n(1, 66);
27203
27299
  i0__namespace.ɵɵelementEnd();
27204
27300
  }
27205
27301
  }
27206
27302
  function RecipeDetailsComponent_div_0_div_3_div_37_ng_container_1_button_1_Template(rf, ctx) {
27207
27303
  if (rf & 1) {
27208
- var _r39_1 = i0__namespace.ɵɵgetCurrentView();
27209
- i0__namespace.ɵɵelementStart(0, "button", 58);
27210
- i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_div_37_ng_container_1_button_1_Template_button_click_0_listener() { i0__namespace.ɵɵrestoreView(_r39_1); var ctx_r38 = i0__namespace.ɵɵnextContext(5); return ctx_r38.recipeDetailsService.addAllIngredientsToBasket(ctx_r38.eventTrace()); });
27211
- i0__namespace.ɵɵelement(1, "img", 59);
27212
- i0__namespace.ɵɵelementStart(2, "div", 60);
27304
+ var _r40_1 = i0__namespace.ɵɵgetCurrentView();
27305
+ i0__namespace.ɵɵelementStart(0, "button", 59);
27306
+ i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_div_37_ng_container_1_button_1_Template_button_click_0_listener() { i0__namespace.ɵɵrestoreView(_r40_1); var ctx_r39 = i0__namespace.ɵɵnextContext(5); return ctx_r39.recipeDetailsService.addAllIngredientsToBasket(ctx_r39.eventTrace()); });
27307
+ i0__namespace.ɵɵelement(1, "img", 60);
27308
+ i0__namespace.ɵɵelementStart(2, "div", 61);
27213
27309
  i0__namespace.ɵɵelementStart(3, "span");
27214
- i0__namespace.ɵɵi18n(4, 61);
27310
+ i0__namespace.ɵɵi18n(4, 62);
27215
27311
  i0__namespace.ɵɵelementEnd();
27216
27312
  i0__namespace.ɵɵelementStart(5, "span");
27217
27313
  i0__namespace.ɵɵtext(6);
27218
27314
  i0__namespace.ɵɵelementEnd();
27219
27315
  i0__namespace.ɵɵtemplate(7, RecipeDetailsComponent_div_0_div_3_div_37_ng_container_1_button_1_span_7_Template, 2, 0, "span", 35);
27220
27316
  i0__namespace.ɵɵtemplate(8, RecipeDetailsComponent_div_0_div_3_div_37_ng_container_1_button_1_span_8_Template, 2, 0, "span", 35);
27221
- i0__namespace.ɵɵelementStart(9, "div", 62);
27317
+ i0__namespace.ɵɵelementStart(9, "div", 63);
27222
27318
  i0__namespace.ɵɵtext(10, " ( ");
27223
27319
  i0__namespace.ɵɵelementStart(11, "span");
27224
27320
  i0__namespace.ɵɵpipe(12, "async");
27225
27321
  i0__namespace.ɵɵtext(13);
27226
27322
  i0__namespace.ɵɵpipe(14, "currency");
27227
27323
  i0__namespace.ɵɵelementEnd();
27228
- i0__namespace.ɵɵelement(15, "div", 63);
27324
+ i0__namespace.ɵɵelement(15, "div", 64);
27229
27325
  i0__namespace.ɵɵpipe(16, "async");
27230
27326
  i0__namespace.ɵɵtext(17, " ) ");
27231
27327
  i0__namespace.ɵɵelementEnd();
@@ -27233,126 +27329,126 @@
27233
27329
  i0__namespace.ɵɵelementEnd();
27234
27330
  }
27235
27331
  if (rf & 2) {
27236
- var ctx_r33 = i0__namespace.ɵɵnextContext(5);
27332
+ var ctx_r34 = i0__namespace.ɵɵnextContext(5);
27237
27333
  i0__namespace.ɵɵadvance(6);
27238
- i0__namespace.ɵɵtextInterpolate(ctx_r33.recipeDetailsService.remainingBasketEntries.length);
27334
+ i0__namespace.ɵɵtextInterpolate(ctx_r34.recipeDetailsService.remainingBasketEntries.length);
27239
27335
  i0__namespace.ɵɵadvance(1);
27240
- i0__namespace.ɵɵproperty("ngIf", ctx_r33.recipeDetailsService.remainingBasketEntries.length <= 1);
27336
+ i0__namespace.ɵɵproperty("ngIf", ctx_r34.recipeDetailsService.remainingBasketEntries.length <= 1);
27241
27337
  i0__namespace.ɵɵadvance(1);
27242
- i0__namespace.ɵɵproperty("ngIf", ctx_r33.recipeDetailsService.remainingBasketEntries.length > 1);
27338
+ i0__namespace.ɵɵproperty("ngIf", ctx_r34.recipeDetailsService.remainingBasketEntries.length > 1);
27243
27339
  i0__namespace.ɵɵadvance(3);
27244
- i0__namespace.ɵɵclassProp("hidden", i0__namespace.ɵɵpipeBind1(12, 8, ctx_r33.recipeDetailsService.ingredientToBasketLoading$));
27340
+ i0__namespace.ɵɵclassProp("hidden", i0__namespace.ɵɵpipeBind1(12, 8, ctx_r34.recipeDetailsService.ingredientToBasketLoading$));
27245
27341
  i0__namespace.ɵɵadvance(2);
27246
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind2(14, 10, ctx_r33.recipeDetailsService.recipePrice.remaining, ctx_r33.currencyService.code), " ");
27342
+ i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind2(14, 10, ctx_r34.recipeDetailsService.recipePrice.remaining, ctx_r34.currencyService.code), " ");
27247
27343
  i0__namespace.ɵɵadvance(2);
27248
- i0__namespace.ɵɵclassProp("hidden", !i0__namespace.ɵɵpipeBind1(16, 13, ctx_r33.recipeDetailsService.ingredientToBasketLoading$));
27344
+ i0__namespace.ɵɵclassProp("hidden", !i0__namespace.ɵɵpipeBind1(16, 13, ctx_r34.recipeDetailsService.ingredientToBasketLoading$));
27249
27345
  }
27250
27346
  }
27251
27347
  function RecipeDetailsComponent_div_0_div_3_div_37_ng_container_1_button_3_Template(rf, ctx) {
27252
27348
  if (rf & 1) {
27253
- i0__namespace.ɵɵelementStart(0, "button", 66);
27254
- i0__namespace.ɵɵelement(1, "div", 63);
27349
+ i0__namespace.ɵɵelementStart(0, "button", 67);
27350
+ i0__namespace.ɵɵelement(1, "div", 64);
27255
27351
  i0__namespace.ɵɵelementEnd();
27256
27352
  }
27257
27353
  }
27258
27354
  function RecipeDetailsComponent_div_0_div_3_div_37_ng_container_1_div_5_button_4_Template(rf, ctx) {
27259
27355
  if (rf & 1) {
27260
- var _r42_1 = i0__namespace.ɵɵgetCurrentView();
27261
- i0__namespace.ɵɵelementStart(0, "button", 71);
27262
- i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_div_37_ng_container_1_div_5_button_4_Template_button_click_0_listener() { i0__namespace.ɵɵrestoreView(_r42_1); var ctx_r41 = i0__namespace.ɵɵnextContext(6); return ctx_r41.onClose(true); });
27263
- i0__namespace.ɵɵelementStart(1, "span", 72);
27264
- i0__namespace.ɵɵi18n(2, 73);
27356
+ var _r43_1 = i0__namespace.ɵɵgetCurrentView();
27357
+ i0__namespace.ɵɵelementStart(0, "button", 72);
27358
+ i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_div_37_ng_container_1_div_5_button_4_Template_button_click_0_listener() { i0__namespace.ɵɵrestoreView(_r43_1); var ctx_r42 = i0__namespace.ɵɵnextContext(6); return ctx_r42.onClose(true); });
27359
+ i0__namespace.ɵɵelementStart(1, "span", 73);
27360
+ i0__namespace.ɵɵi18n(2, 74);
27265
27361
  i0__namespace.ɵɵelementEnd();
27266
- i0__namespace.ɵɵelement(3, "img", 59);
27362
+ i0__namespace.ɵɵelement(3, "img", 60);
27267
27363
  i0__namespace.ɵɵelementEnd();
27268
27364
  }
27269
27365
  }
27270
27366
  function RecipeDetailsComponent_div_0_div_3_div_37_ng_container_1_div_5_Template(rf, ctx) {
27271
27367
  if (rf & 1) {
27272
- var _r44_1 = i0__namespace.ɵɵgetCurrentView();
27273
- i0__namespace.ɵɵelementStart(0, "div", 67);
27274
- i0__namespace.ɵɵelementStart(1, "button", 68);
27275
- i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_div_37_ng_container_1_div_5_Template_button_click_1_listener() { i0__namespace.ɵɵrestoreView(_r44_1); var ctx_r43 = i0__namespace.ɵɵnextContext(5); return ctx_r43.onClose(); });
27276
- i0__namespace.ɵɵelementStart(2, "span", 60);
27277
- i0__namespace.ɵɵi18n(3, 69);
27368
+ var _r45_1 = i0__namespace.ɵɵgetCurrentView();
27369
+ i0__namespace.ɵɵelementStart(0, "div", 68);
27370
+ i0__namespace.ɵɵelementStart(1, "button", 69);
27371
+ i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_div_37_ng_container_1_div_5_Template_button_click_1_listener() { i0__namespace.ɵɵrestoreView(_r45_1); var ctx_r44 = i0__namespace.ɵɵnextContext(5); return ctx_r44.onClose(); });
27372
+ i0__namespace.ɵɵelementStart(2, "span", 61);
27373
+ i0__namespace.ɵɵi18n(3, 70);
27278
27374
  i0__namespace.ɵɵelementEnd();
27279
27375
  i0__namespace.ɵɵelementEnd();
27280
- i0__namespace.ɵɵtemplate(4, RecipeDetailsComponent_div_0_div_3_div_37_ng_container_1_div_5_button_4_Template, 4, 0, "button", 70);
27376
+ i0__namespace.ɵɵtemplate(4, RecipeDetailsComponent_div_0_div_3_div_37_ng_container_1_div_5_button_4_Template, 4, 0, "button", 71);
27281
27377
  i0__namespace.ɵɵelementEnd();
27282
27378
  }
27283
27379
  if (rf & 2) {
27284
- var ctx_r35 = i0__namespace.ɵɵnextContext(5);
27380
+ var ctx_r36 = i0__namespace.ɵɵnextContext(5);
27285
27381
  i0__namespace.ɵɵadvance(1);
27286
- i0__namespace.ɵɵclassProp("mobile-hidden", ctx_r35.contextService.noSupplier);
27382
+ i0__namespace.ɵɵclassProp("mobile-hidden", ctx_r36.contextService.noSupplier);
27287
27383
  i0__namespace.ɵɵadvance(3);
27288
- i0__namespace.ɵɵproperty("ngIf", ctx_r35.contextService.noSupplier);
27384
+ i0__namespace.ɵɵproperty("ngIf", ctx_r36.contextService.noSupplier);
27289
27385
  }
27290
27386
  }
27291
27387
  function RecipeDetailsComponent_div_0_div_3_div_37_ng_container_1_Template(rf, ctx) {
27292
27388
  if (rf & 1) {
27293
27389
  i0__namespace.ɵɵelementContainerStart(0);
27294
- i0__namespace.ɵɵtemplate(1, RecipeDetailsComponent_div_0_div_3_div_37_ng_container_1_button_1_Template, 18, 15, "button", 55);
27390
+ i0__namespace.ɵɵtemplate(1, RecipeDetailsComponent_div_0_div_3_div_37_ng_container_1_button_1_Template, 18, 15, "button", 56);
27295
27391
  i0__namespace.ɵɵpipe(2, "async");
27296
- i0__namespace.ɵɵtemplate(3, RecipeDetailsComponent_div_0_div_3_div_37_ng_container_1_button_3_Template, 2, 0, "button", 56);
27392
+ i0__namespace.ɵɵtemplate(3, RecipeDetailsComponent_div_0_div_3_div_37_ng_container_1_button_3_Template, 2, 0, "button", 57);
27297
27393
  i0__namespace.ɵɵpipe(4, "async");
27298
- i0__namespace.ɵɵtemplate(5, RecipeDetailsComponent_div_0_div_3_div_37_ng_container_1_div_5_Template, 5, 3, "div", 57);
27394
+ i0__namespace.ɵɵtemplate(5, RecipeDetailsComponent_div_0_div_3_div_37_ng_container_1_div_5_Template, 5, 3, "div", 58);
27299
27395
  i0__namespace.ɵɵelementContainerEnd();
27300
27396
  }
27301
27397
  if (rf & 2) {
27302
- var ctx_r30 = i0__namespace.ɵɵnextContext(4);
27398
+ var ctx_r31 = i0__namespace.ɵɵnextContext(4);
27303
27399
  i0__namespace.ɵɵadvance(1);
27304
- i0__namespace.ɵɵproperty("ngIf", ctx_r30.recipeDetailsService.remainingBasketEntries.length > 0 && !i0__namespace.ɵɵpipeBind1(2, 3, ctx_r30.recipeDetailsService.allIngredientsToBasketLoading$));
27400
+ i0__namespace.ɵɵproperty("ngIf", ctx_r31.recipeDetailsService.remainingBasketEntries.length > 0 && !i0__namespace.ɵɵpipeBind1(2, 3, ctx_r31.recipeDetailsService.allIngredientsToBasketLoading$));
27305
27401
  i0__namespace.ɵɵadvance(2);
27306
- i0__namespace.ɵɵproperty("ngIf", ctx_r30.recipeDetailsService.remainingBasketEntries.length > 0 && i0__namespace.ɵɵpipeBind1(4, 5, ctx_r30.recipeDetailsService.allIngredientsToBasketLoading$));
27402
+ i0__namespace.ɵɵproperty("ngIf", ctx_r31.recipeDetailsService.remainingBasketEntries.length > 0 && i0__namespace.ɵɵpipeBind1(4, 5, ctx_r31.recipeDetailsService.allIngredientsToBasketLoading$));
27307
27403
  i0__namespace.ɵɵadvance(2);
27308
- i0__namespace.ɵɵproperty("ngIf", ctx_r30.recipeDetailsService.remainingBasketEntries.length === 0);
27404
+ i0__namespace.ɵɵproperty("ngIf", ctx_r31.recipeDetailsService.remainingBasketEntries.length === 0);
27309
27405
  }
27310
27406
  }
27311
27407
  function RecipeDetailsComponent_div_0_div_3_div_37_ng_container_3_Template(rf, ctx) {
27312
27408
  if (rf & 1) {
27313
27409
  i0__namespace.ɵɵelementContainerStart(0);
27314
- i0__namespace.ɵɵelement(1, "ng-miam-recipe-pricing", 74);
27410
+ i0__namespace.ɵɵelement(1, "ng-miam-recipe-pricing", 75);
27315
27411
  i0__namespace.ɵɵelementContainerEnd();
27316
27412
  }
27317
27413
  if (rf & 2) {
27318
- var ctx_r31 = i0__namespace.ɵɵnextContext(4);
27414
+ var ctx_r32 = i0__namespace.ɵɵnextContext(4);
27319
27415
  i0__namespace.ɵɵadvance(1);
27320
- i0__namespace.ɵɵproperty("recipeId", ctx_r31.recipeDetailsService.recipe.id)("serves", ctx_r31.recipeDetailsService.recipe.modifiedGuests)("fetchPricingOnScroll", false);
27416
+ i0__namespace.ɵɵproperty("recipeId", ctx_r32.recipeDetailsService.recipe.id)("serves", ctx_r32.recipeDetailsService.recipe.modifiedGuests)("fetchPricingOnScroll", false);
27321
27417
  }
27322
27418
  }
27323
27419
  function RecipeDetailsComponent_div_0_div_3_div_37_div_4_Template(rf, ctx) {
27324
27420
  if (rf & 1) {
27325
- i0__namespace.ɵɵelementStart(0, "div", 75);
27326
- i0__namespace.ɵɵelementStart(1, "div", 76);
27327
- i0__namespace.ɵɵelement(2, "ng-miam-price", 77);
27421
+ i0__namespace.ɵɵelementStart(0, "div", 76);
27422
+ i0__namespace.ɵɵelementStart(1, "div", 77);
27423
+ i0__namespace.ɵɵelement(2, "ng-miam-price", 78);
27328
27424
  i0__namespace.ɵɵpipe(3, "async");
27329
27425
  i0__namespace.ɵɵpipe(4, "async");
27330
27426
  i0__namespace.ɵɵpipe(5, "currency");
27331
- i0__namespace.ɵɵelement(6, "div", 78);
27427
+ i0__namespace.ɵɵelement(6, "div", 79);
27332
27428
  i0__namespace.ɵɵpipe(7, "async");
27333
27429
  i0__namespace.ɵɵpipe(8, "async");
27334
27430
  i0__namespace.ɵɵelementEnd();
27335
- i0__namespace.ɵɵelementStart(9, "span", 79);
27336
- i0__namespace.ɵɵi18n(10, 80);
27431
+ i0__namespace.ɵɵelementStart(9, "span", 80);
27432
+ i0__namespace.ɵɵi18n(10, 81);
27337
27433
  i0__namespace.ɵɵelementEnd();
27338
27434
  i0__namespace.ɵɵelementEnd();
27339
27435
  }
27340
27436
  if (rf & 2) {
27341
- var ctx_r32 = i0__namespace.ɵɵnextContext(4);
27437
+ var ctx_r33 = i0__namespace.ɵɵnextContext(4);
27342
27438
  i0__namespace.ɵɵadvance(2);
27343
- i0__namespace.ɵɵclassProp("hidden", i0__namespace.ɵɵpipeBind1(3, 5, ctx_r32.recipeDetailsService.ingredientToBasketLoading$) || i0__namespace.ɵɵpipeBind1(4, 7, ctx_r32.recipeDetailsService.updateIngredientFromBasketLoading$));
27344
- i0__namespace.ɵɵproperty("price", i0__namespace.ɵɵpipeBind2(5, 9, ctx_r32.recipeDetailsService.recipePrice.inBasket, ctx_r32.currencyService.code));
27439
+ i0__namespace.ɵɵclassProp("hidden", i0__namespace.ɵɵpipeBind1(3, 5, ctx_r33.recipeDetailsService.ingredientToBasketLoading$) || i0__namespace.ɵɵpipeBind1(4, 7, ctx_r33.recipeDetailsService.updateIngredientFromBasketLoading$));
27440
+ i0__namespace.ɵɵproperty("price", i0__namespace.ɵɵpipeBind2(5, 9, ctx_r33.recipeDetailsService.recipePrice.inBasket, ctx_r33.currencyService.code));
27345
27441
  i0__namespace.ɵɵadvance(4);
27346
- i0__namespace.ɵɵclassProp("hidden", !(i0__namespace.ɵɵpipeBind1(7, 12, ctx_r32.recipeDetailsService.ingredientToBasketLoading$) || i0__namespace.ɵɵpipeBind1(8, 14, ctx_r32.recipeDetailsService.updateIngredientFromBasketLoading$)));
27442
+ i0__namespace.ɵɵclassProp("hidden", !(i0__namespace.ɵɵpipeBind1(7, 12, ctx_r33.recipeDetailsService.ingredientToBasketLoading$) || i0__namespace.ɵɵpipeBind1(8, 14, ctx_r33.recipeDetailsService.updateIngredientFromBasketLoading$)));
27347
27443
  }
27348
27444
  }
27349
27445
  function RecipeDetailsComponent_div_0_div_3_div_37_Template(rf, ctx) {
27350
27446
  if (rf & 1) {
27351
- i0__namespace.ɵɵelementStart(0, "div", 53);
27447
+ i0__namespace.ɵɵelementStart(0, "div", 54);
27352
27448
  i0__namespace.ɵɵtemplate(1, RecipeDetailsComponent_div_0_div_3_div_37_ng_container_1_Template, 6, 7, "ng-container", 35);
27353
27449
  i0__namespace.ɵɵpipe(2, "async");
27354
27450
  i0__namespace.ɵɵtemplate(3, RecipeDetailsComponent_div_0_div_3_div_37_ng_container_3_Template, 2, 3, "ng-container", 35);
27355
- i0__namespace.ɵɵtemplate(4, RecipeDetailsComponent_div_0_div_3_div_37_div_4_Template, 11, 16, "div", 54);
27451
+ i0__namespace.ɵɵtemplate(4, RecipeDetailsComponent_div_0_div_3_div_37_div_4_Template, 11, 16, "div", 55);
27356
27452
  i0__namespace.ɵɵelementEnd();
27357
27453
  }
27358
27454
  if (rf & 2) {
@@ -27368,18 +27464,18 @@
27368
27464
  }
27369
27465
  function RecipeDetailsComponent_div_0_div_3_Template(rf, ctx) {
27370
27466
  if (rf & 1) {
27371
- var _r46_1 = i0__namespace.ɵɵgetCurrentView();
27467
+ var _r47_1 = i0__namespace.ɵɵgetCurrentView();
27372
27468
  i0__namespace.ɵɵelementStart(0, "div", 7);
27373
27469
  i0__namespace.ɵɵelementStart(1, "div", 8, 9);
27374
27470
  i0__namespace.ɵɵelementStart(3, "div", 10);
27375
27471
  i0__namespace.ɵɵelementStart(4, "div", 11);
27376
27472
  i0__namespace.ɵɵelementStart(5, "button", 12);
27377
- i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_Template_button_click_5_listener() { i0__namespace.ɵɵrestoreView(_r46_1); var ctx_r45 = i0__namespace.ɵɵnextContext(2); return ctx_r45.onClose(); });
27473
+ i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_Template_button_click_5_listener() { i0__namespace.ɵɵrestoreView(_r47_1); var ctx_r46 = i0__namespace.ɵɵnextContext(2); return ctx_r46.onClose(); });
27378
27474
  i0__namespace.ɵɵelement(6, "img", 13);
27379
27475
  i0__namespace.ɵɵelementEnd();
27380
27476
  i0__namespace.ɵɵelementStart(7, "div", 14);
27381
27477
  i0__namespace.ɵɵelementStart(8, "button", 15);
27382
- i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_Template_button_click_8_listener() { i0__namespace.ɵɵrestoreView(_r46_1); var ctx_r47 = i0__namespace.ɵɵnextContext(2); return ctx_r47.onClose(); });
27478
+ i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_Template_button_click_8_listener() { i0__namespace.ɵɵrestoreView(_r47_1); var ctx_r48 = i0__namespace.ɵɵnextContext(2); return ctx_r48.onClose(); });
27383
27479
  i0__namespace.ɵɵelement(9, "img", 16);
27384
27480
  i0__namespace.ɵɵelementEnd();
27385
27481
  i0__namespace.ɵɵtemplate(10, RecipeDetailsComponent_div_0_div_3_ng_miam_like_button_10_Template, 1, 2, "ng-miam-like-button", 17);
@@ -27387,7 +27483,7 @@
27387
27483
  i0__namespace.ɵɵelementEnd();
27388
27484
  i0__namespace.ɵɵelementEnd();
27389
27485
  i0__namespace.ɵɵelementStart(12, "ng-miam-counter-input", 18);
27390
- i0__namespace.ɵɵlistener("valueChange", function RecipeDetailsComponent_div_0_div_3_Template_ng_miam_counter_input_valueChange_12_listener($event) { i0__namespace.ɵɵrestoreView(_r46_1); var ctx_r48 = i0__namespace.ɵɵnextContext(2); return ctx_r48.updateGuests($event); });
27486
+ i0__namespace.ɵɵlistener("valueChange", function RecipeDetailsComponent_div_0_div_3_Template_ng_miam_counter_input_valueChange_12_listener($event) { i0__namespace.ɵɵrestoreView(_r47_1); var ctx_r49 = i0__namespace.ɵɵnextContext(2); return ctx_r49.updateGuests($event); });
27391
27487
  i0__namespace.ɵɵtext(13, " > ");
27392
27488
  i0__namespace.ɵɵelementEnd();
27393
27489
  i0__namespace.ɵɵelementEnd();
@@ -27403,7 +27499,7 @@
27403
27499
  i0__namespace.ɵɵelementStart(21, "div", 26);
27404
27500
  i0__namespace.ɵɵelementStart(22, "div", 27);
27405
27501
  i0__namespace.ɵɵelementStart(23, "button", 28);
27406
- i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_Template_button_click_23_listener() { i0__namespace.ɵɵrestoreView(_r46_1); var ctx_r49 = i0__namespace.ɵɵnextContext(2); return ctx_r49.onClose(); });
27502
+ i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_Template_button_click_23_listener() { i0__namespace.ɵɵrestoreView(_r47_1); var ctx_r50 = i0__namespace.ɵɵnextContext(2); return ctx_r50.onClose(); });
27407
27503
  i0__namespace.ɵɵelement(24, "img", 29);
27408
27504
  i0__namespace.ɵɵelementEnd();
27409
27505
  i0__namespace.ɵɵelementEnd();
@@ -27415,7 +27511,7 @@
27415
27511
  i0__namespace.ɵɵpipe(29, "async");
27416
27512
  i0__namespace.ɵɵelementStart(30, "div", 32);
27417
27513
  i0__namespace.ɵɵelementStart(31, "button", 33);
27418
- i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_Template_button_click_31_listener() { i0__namespace.ɵɵrestoreView(_r46_1); var ctx_r50 = i0__namespace.ɵɵnextContext(2); return ctx_r50.onClose(); });
27514
+ i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_Template_button_click_31_listener() { i0__namespace.ɵɵrestoreView(_r47_1); var ctx_r51 = i0__namespace.ɵɵnextContext(2); return ctx_r51.onClose(); });
27419
27515
  i0__namespace.ɵɵelement(32, "img", 34);
27420
27516
  i0__namespace.ɵɵelementEnd();
27421
27517
  i0__namespace.ɵɵelementEnd();
@@ -27483,9 +27579,9 @@
27483
27579
  }
27484
27580
  function RecipeDetailsComponent_ng_miam_recipe_addon_2_Template(rf, ctx) {
27485
27581
  if (rf & 1) {
27486
- var _r52_1 = i0__namespace.ɵɵgetCurrentView();
27487
- i0__namespace.ɵɵelementStart(0, "ng-miam-recipe-addon", 81);
27488
- i0__namespace.ɵɵlistener("hideAddon", function RecipeDetailsComponent_ng_miam_recipe_addon_2_Template_ng_miam_recipe_addon_hideAddon_0_listener() { i0__namespace.ɵɵrestoreView(_r52_1); var ctx_r51 = i0__namespace.ɵɵnextContext(); return ctx_r51.toggleAddon(); });
27582
+ var _r53_1 = i0__namespace.ɵɵgetCurrentView();
27583
+ i0__namespace.ɵɵelementStart(0, "ng-miam-recipe-addon", 82);
27584
+ i0__namespace.ɵɵlistener("hideAddon", function RecipeDetailsComponent_ng_miam_recipe_addon_2_Template_ng_miam_recipe_addon_hideAddon_0_listener() { i0__namespace.ɵɵrestoreView(_r53_1); var ctx_r52 = i0__namespace.ɵɵnextContext(); return ctx_r52.toggleAddon(); });
27489
27585
  i0__namespace.ɵɵelementEnd();
27490
27586
  }
27491
27587
  if (rf & 2) {
@@ -27495,9 +27591,9 @@
27495
27591
  }
27496
27592
  function RecipeDetailsComponent_ng_miam_replace_item_3_Template(rf, ctx) {
27497
27593
  if (rf & 1) {
27498
- var _r54_1 = i0__namespace.ɵɵgetCurrentView();
27499
- i0__namespace.ɵɵelementStart(0, "ng-miam-replace-item", 82);
27500
- i0__namespace.ɵɵlistener("selected", function RecipeDetailsComponent_ng_miam_replace_item_3_Template_ng_miam_replace_item_selected_0_listener() { i0__namespace.ɵɵrestoreView(_r54_1); var ctx_r53 = i0__namespace.ɵɵnextContext(); return ctx_r53.recipeDetailsService.basketEntryToReplace = null; });
27594
+ var _r55_1 = i0__namespace.ɵɵgetCurrentView();
27595
+ i0__namespace.ɵɵelementStart(0, "ng-miam-replace-item", 83);
27596
+ i0__namespace.ɵɵlistener("selected", function RecipeDetailsComponent_ng_miam_replace_item_3_Template_ng_miam_replace_item_selected_0_listener() { i0__namespace.ɵɵrestoreView(_r55_1); var ctx_r54 = i0__namespace.ɵɵnextContext(); return ctx_r54.recipeDetailsService.basketEntryToReplace = null; });
27501
27597
  i0__namespace.ɵɵelementEnd();
27502
27598
  }
27503
27599
  if (rf & 2) {
@@ -27830,7 +27926,7 @@
27830
27926
  else {
27831
27927
  i18n_14 = $localize(templateObject_7$1 || (templateObject_7$1 = __makeTemplateObject([":\u241Fddc8d487566c6a50356eb269a281761ef8ccffa8\u241F4122997114884311871:dans mon panier"], [":\u241Fddc8d487566c6a50356eb269a281761ef8ccffa8\u241F4122997114884311871:dans mon panier"])));
27832
27928
  }
27833
- return [["class", "miam-recipe-details", 3, "hidden", 4, "ngIf"], [3, "recipe", "hideAddon", 4, "ngIf"], [3, "recipe", "basketEntry", "ingredient", "ignoreSelected", "loadOnSelect", "originTrace", "selected", 4, "ngIf"], [1, "miam-recipe-details"], ["class", "miam-ds-loader miam-recipe-details__loader", 4, "ngIf"], ["class", "miam-recipe-details__container", 4, "ngIf"], [1, "miam-ds-loader", "miam-recipe-details__loader"], [1, "miam-recipe-details__container"], [1, "miam-recipe-details__picture"], ["topContainerImg", ""], [1, "miam-recipe-details__banner_buttons"], [1, "miam-recipe-details__top-button-wrapper"], [1, "miam-recipe-details__close-button", "miam-ds-button", "square", "primary", "reverse", 3, "click"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/Cross_primary.svg", "alt", "modal close button", 1, "miam-recipe-details__close-icon"], [1, "miam-recipe-details__mobile-header-buttons"], [1, "miam-recipe-details__back-button", "miam-ds-button", "square", "primary", "reverse", 3, "click"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/chevron-down-primary.svg", "alt", "modal back button", 1, "miam-recipe-details__back-icon"], ["class", "miam-recipe-details__like-button", 3, "recipe", "originTrace", 4, "ngIf"], [1, "miam-recipe-details__guest-counter", 3, "floating", "value", "minRange", "valueChange"], ["alt", "recipe picture", "class", "miam-recipe-details__picture-img", 3, "src", "error", 4, "ngIf"], [3, "videoId", "width", "height", "playerVars", 4, "ngIf"], ["class", "miam-recipe-details__picture__filigrane", 4, "ngIf"], [1, "miam-recipe-details__sponsor"], [3, "hasStorytelling", "recipe", "showAddon", 4, "ngIf"], [1, "miam-recipe-details__sponsor-separator"], [1, "miam-recipe-details__sticky-header"], ["ngMiamReachTop", "", 1, "miam-recipe-details__title-container", 3, "stickyByDefault"], [1, "miam-recipe-details__back-button-mobile-container"], [1, "miam-recipe-details__back-button", "miam-ds-button", "small", "square", "ghost", 3, "click"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/chevron-down-primary.svg", "alt", "modal close button", 1, "miam-recipe-details__back-icon"], [1, "miam-recipe-details__title", "miam-ds-text", "size-xl", "weight-xxl"], [1, "miam-recipe-details__actions__icon"], [1, "miam-recipe-details__hideable-actions"], [1, "miam-recipe-details__close-button", "miam-ds-button", "square", "ghost", 3, "click"], ["alt", "modal close button", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/Cross_primary.svg", 1, "miam-recipe-details__close-icon"], [4, "ngIf"], ["class", "miam-recipe-details__preparation-tab", 4, "ngIf"], ["class", "miam-recipe-details__footer", 3, "center", 4, "ngIf"], [1, "miam-recipe-details__like-button", 3, "recipe", "originTrace"], ["alt", "recipe picture", 1, "miam-recipe-details__picture-img", 3, "src", "error"], [3, "videoId", "width", "height", "playerVars"], [1, "miam-recipe-details__picture__filigrane"], ["alt", "filigrane logo", 3, "src"], [3, "hasStorytelling", "recipe", "showAddon"], [1, "miam-recipe-details__infos", 3, "recipe"], [1, "miam-recipe-details__tabs", 3, "ngClass"], ["tabs", i18n_1, 3, "selectedTabIndex", "selectedTabIndexChange"], [1, "miam-recipe-details__products-picker", 3, "originTrace", "closeModal", "guestsChange"], [3, "invalidPos", "posSelected", 4, "ngIf"], [3, "invalidPos", "posSelected"], [1, "miam-recipe-details__preparation-tab"], [3, "ingredients"], [3, "recipe"], [1, "miam-recipe-details__footer"], ["class", "miam-recipe-details__price", 4, "ngIf"], ["class", "miam-recipe-details__add-to-basket-cta miam-ds-button primary", 3, "click", 4, "ngIf"], ["class", "miam-recipe-details__add-to-basket-cta miam-ds-button primary", 4, "ngIf"], ["class", "miam-recipe-details__recipe-is-in-basket-cta-container", 4, "ngIf"], [1, "miam-recipe-details__add-to-basket-cta", "miam-ds-button", "primary", 3, "click"], ["alt", "basket icon", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/Basket.svg"], [1, "miam-recipe-details__add-to-basket-cta__text"], i18n_4, [1, "miam-recipe-details__add-to-basket-remaining-price"], [1, "miam-ds-loader"], i18n_6, i18n_8, [1, "miam-recipe-details__add-to-basket-cta", "miam-ds-button", "primary"], [1, "miam-recipe-details__recipe-is-in-basket-cta-container"], [1, "miam-ds-button", "secondary", "miam-recipe-details__continue-shopping-cta", 3, "click"], i18n_10, ["class", "miam-ds-button primary miam-recipe-details__see-basket-cta", 3, "click", 4, "ngIf"], [1, "miam-ds-button", "primary", "miam-recipe-details__see-basket-cta", 3, "click"], [1, "miam-recipe-details__see-basket__text"], i18n_12, [3, "recipeId", "serves", "fetchPricingOnScroll"], [1, "miam-recipe-details__price"], [1, "miam-recipe-details__price-label", "miam-ds-text", "size-l", "weight-xxl"], [3, "price"], [1, "miam-ds-loader", "primary"], [1, "miam-recipe-details__price-in-basket-label", "miam-ds-text", "size-xs"], i18n_14, [3, "recipe", "hideAddon"], [3, "recipe", "basketEntry", "ingredient", "ignoreSelected", "loadOnSelect", "originTrace", "selected"]];
27929
+ return [["class", "miam-recipe-details", 3, "hidden", 4, "ngIf"], [3, "recipe", "hideAddon", 4, "ngIf"], [3, "recipe", "basketEntry", "ingredient", "ignoreSelected", "loadOnSelect", "originTrace", "selected", 4, "ngIf"], [1, "miam-recipe-details"], ["class", "miam-ds-loader miam-recipe-details__loader", 4, "ngIf"], ["class", "miam-recipe-details__container", 4, "ngIf"], [1, "miam-ds-loader", "miam-recipe-details__loader"], [1, "miam-recipe-details__container"], [1, "miam-recipe-details__picture"], ["topContainerImg", ""], [1, "miam-recipe-details__banner_buttons"], [1, "miam-recipe-details__top-button-wrapper"], [1, "miam-recipe-details__close-button", "miam-ds-button", "square", "primary", "reverse", 3, "click"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/Cross_primary.svg", "alt", "modal close button", 1, "miam-recipe-details__close-icon"], [1, "miam-recipe-details__mobile-header-buttons"], [1, "miam-recipe-details__back-button", "miam-ds-button", "square", "primary", "reverse", 3, "click"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/chevron-down-primary.svg", "alt", "modal back button", 1, "miam-recipe-details__back-icon"], ["class", "miam-recipe-details__like-button", 3, "recipe", "originTrace", 4, "ngIf"], [1, "miam-recipe-details__guest-counter", 3, "floating", "value", "minRange", "valueChange"], ["alt", "recipe picture", "class", "miam-recipe-details__picture-img", 3, "src", "error", 4, "ngIf"], [3, "videoId", "width", "height", "playerVars", 4, "ngIf"], ["class", "miam-recipe-details__picture__filigrane", 4, "ngIf"], [1, "miam-recipe-details__sponsor"], [3, "hasStorytelling", "recipe", "showAddon", 4, "ngIf"], [1, "miam-recipe-details__sponsor-separator"], [1, "miam-recipe-details__sticky-header"], ["ngMiamReachTop", "", 1, "miam-recipe-details__title-container", 3, "stickyByDefault"], [1, "miam-recipe-details__back-button-mobile-container"], [1, "miam-recipe-details__back-button", "miam-ds-button", "small", "square", "ghost", 3, "click"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/chevron-down-primary.svg", "alt", "modal close button", 1, "miam-recipe-details__back-icon"], [1, "miam-recipe-details__title", "miam-ds-text", "size-xl", "weight-xxl"], [1, "miam-recipe-details__actions__icon"], [1, "miam-recipe-details__hideable-actions"], [1, "miam-recipe-details__close-button", "miam-ds-button", "square", "ghost", 3, "click"], ["alt", "modal close button", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/Cross_primary.svg", 1, "miam-recipe-details__close-icon"], [4, "ngIf"], ["class", "miam-recipe-details__preparation-tab", 4, "ngIf"], ["class", "miam-recipe-details__footer", 3, "center", 4, "ngIf"], [1, "miam-recipe-details__like-button", 3, "recipe", "originTrace"], ["alt", "recipe picture", 1, "miam-recipe-details__picture-img", 3, "src", "error"], [3, "videoId", "width", "height", "playerVars"], [1, "miam-recipe-details__picture__filigrane"], ["alt", "filigrane logo", 3, "src"], [3, "hasStorytelling", "recipe", "showAddon"], [1, "miam-recipe-details__infos", 3, "recipe"], [1, "miam-recipe-details__tabs", 3, "ngClass"], ["tabs", i18n_1, 3, "selectedTabIndex", "selectedTabIndexChange"], ["class", "miam-recipe-details__products-picker", 3, "originTrace", "closeModal", "guestsChange", 4, "ngIf"], [3, "invalidPos", "posSelected", 4, "ngIf"], [1, "miam-recipe-details__products-picker", 3, "originTrace", "closeModal", "guestsChange"], [3, "invalidPos", "posSelected"], [1, "miam-recipe-details__preparation-tab"], [3, "ingredients"], [3, "recipe"], [1, "miam-recipe-details__footer"], ["class", "miam-recipe-details__price", 4, "ngIf"], ["class", "miam-recipe-details__add-to-basket-cta miam-ds-button primary", 3, "click", 4, "ngIf"], ["class", "miam-recipe-details__add-to-basket-cta miam-ds-button primary", 4, "ngIf"], ["class", "miam-recipe-details__recipe-is-in-basket-cta-container", 4, "ngIf"], [1, "miam-recipe-details__add-to-basket-cta", "miam-ds-button", "primary", 3, "click"], ["alt", "basket icon", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/Basket.svg"], [1, "miam-recipe-details__add-to-basket-cta__text"], i18n_4, [1, "miam-recipe-details__add-to-basket-remaining-price"], [1, "miam-ds-loader"], i18n_6, i18n_8, [1, "miam-recipe-details__add-to-basket-cta", "miam-ds-button", "primary"], [1, "miam-recipe-details__recipe-is-in-basket-cta-container"], [1, "miam-ds-button", "secondary", "miam-recipe-details__continue-shopping-cta", 3, "click"], i18n_10, ["class", "miam-ds-button primary miam-recipe-details__see-basket-cta", 3, "click", 4, "ngIf"], [1, "miam-ds-button", "primary", "miam-recipe-details__see-basket-cta", 3, "click"], [1, "miam-recipe-details__see-basket__text"], i18n_12, [3, "recipeId", "serves", "fetchPricingOnScroll"], [1, "miam-recipe-details__price"], [1, "miam-recipe-details__price-label", "miam-ds-text", "size-l", "weight-xxl"], [3, "price"], [1, "miam-ds-loader", "primary"], [1, "miam-recipe-details__price-in-basket-label", "miam-ds-text", "size-xs"], i18n_14, [3, "recipe", "hideAddon"], [3, "recipe", "basketEntry", "ingredient", "ignoreSelected", "loadOnSelect", "originTrace", "selected"]];
27834
27930
  }, template: function RecipeDetailsComponent_Template(rf, ctx) {
27835
27931
  if (rf & 1) {
27836
27932
  i0__namespace.ɵɵtemplate(0, RecipeDetailsComponent_div_0_Template, 5, 8, "div", 0);
@@ -28975,7 +29071,7 @@
28975
29071
  _this.basketChangedSinceOpened = true;
28976
29072
  _this.cdr.detectChanges();
28977
29073
  }
28978
- }), this.basketsService.basket$.pipe(operators.filter(function (basket) { return basket !== null; }), operators.map(function (basket) { return basket.totalPrice; })).subscribe(function (totalPrice) {
29074
+ }), this.basketsService.basket$.pipe(operators.skipWhile(function (basket) { return !basket; }), operators.map(function (basket) { return basket.totalPrice; })).subscribe(function (totalPrice) {
28979
29075
  _this.totalPrice = totalPrice;
28980
29076
  _this.updateShowPlaceOrderFooter();
28981
29077
  _this.cdr.detectChanges();