ng-miam 10.5.0 → 10.5.1

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.
@@ -3440,7 +3440,7 @@
3440
3440
  EventJourney["EMPTY"] = "";
3441
3441
  })(EventJourney || (EventJourney = {}));
3442
3442
 
3443
- var VERSION = "10.5.0"; // TODO: replace by ##VERSION## and update it in the CI/CD
3443
+ var VERSION = "10.5.1"; // TODO: replace by ##VERSION## and update it in the CI/CD
3444
3444
 
3445
3445
  var ContextRegistryService = /** @class */ (function () {
3446
3446
  function ContextRegistryService() {
@@ -3563,7 +3563,10 @@
3563
3563
  var _this = this;
3564
3564
  var detectedJourney = journey !== null && journey !== void 0 ? journey : detectJourney();
3565
3565
  actions.forEach(function (action) {
3566
- _this.sendEvent('recipe.add', action.params.eventTrace.originPath, { recipe_id: action.params.recipeId }, detectedJourney);
3566
+ _this.sendEvent('recipe.add', action.params.eventTrace.originPath, {
3567
+ recipe_id: action.params.recipeId,
3568
+ category_id: action.params.eventTrace.props.category_id
3569
+ }, detectedJourney);
3567
3570
  });
3568
3571
  };
3569
3572
  AnalyticsService.prototype.sendUpdateGuestsEvents = function (actions, journey) {
@@ -4568,10 +4571,18 @@
4568
4571
  }
4569
4572
  return this.isCleaning.asObservable().pipe(operators.skipWhile(function (isCleaning) { return isCleaning; }), operators.take(1), operators.switchMap(function () { return _this.afterCleanAddLikesToRecipes(recipes); }));
4570
4573
  };
4571
- RecipeLikesService.prototype.getLikeHTML = function (recipeId) {
4574
+ RecipeLikesService.prototype.getLikeHTML = function (recipeId, path, categoryId) {
4575
+ if (path === void 0) { path = ''; }
4576
+ if (categoryId === void 0) { categoryId = null; }
4572
4577
  var headers = this.httpUtils.buildHeaders();
4573
4578
  var params = new URLSearchParams();
4574
4579
  params.append('recipe-id', recipeId);
4580
+ if (path) {
4581
+ params.append('path', path);
4582
+ }
4583
+ if (categoryId) {
4584
+ params.append('category-id', categoryId);
4585
+ }
4575
4586
  var url = MEALZ_SSR_API$1 + '/like-button?' + params;
4576
4587
  return this.http.get(url, {
4577
4588
  headers: headers,
@@ -11329,11 +11340,13 @@
11329
11340
  getGuestsForRecipe: function (recipeId) { return _this.mealsPlannerService.getGuestsForRecipe(recipeId); }
11330
11341
  },
11331
11342
  recipes: {
11332
- openDetails: function (recipeId, guests, initialTabIndex, path, categoryId) {
11343
+ openDetails: function (recipeId, guests, initialTabIndex, path, plannerOrCategoryId, categoryId) {
11333
11344
  if (initialTabIndex === void 0) { initialTabIndex = 0; }
11334
11345
  if (path === void 0) { path = ''; }
11346
+ if (plannerOrCategoryId === void 0) { plannerOrCategoryId = null; }
11335
11347
  if (categoryId === void 0) { categoryId = null; }
11336
- return _this.recipesService.openRecipeDetails(recipeId, guests, initialTabIndex, path, categoryId);
11348
+ var resolvedCategoryId = typeof plannerOrCategoryId === 'string' ? plannerOrCategoryId : categoryId;
11349
+ return _this.recipesService.openRecipeDetails(recipeId, guests, initialTabIndex, path, resolvedCategoryId);
11337
11350
  },
11338
11351
  loadAndSetupRecipe: function (recipeId, guests) { return _this.loadAndSetupRecipe(recipeId, guests); },
11339
11352
  replaceBasketEntry: function (basketEntry, ignoreSelected) { return _this.recipeDetailsProductsService.replaceBasketEntry(basketEntry, ignoreSelected); },
@@ -11356,9 +11369,13 @@
11356
11369
  remainingBasketEntries$: this.newRecipeDetailsService.remainingBasketEntries$,
11357
11370
  recipePrice$: this.recipeDetailsProductsService.recipePrice$,
11358
11371
  orderHistoryDate$: this.newRecipeDetailsService.orderHistoryDate$,
11359
- updateRecipeLike: function (recipeLikeId, recipeId, isPast, path) {
11372
+ updateRecipeLike: function (recipeLikeId, recipeId, isPast, path, categoryId) {
11360
11373
  if (path === void 0) { path = ''; }
11361
- var eventTrace = { originPath: path, props: { recipe_id: recipeId } };
11374
+ if (categoryId === void 0) { categoryId = null; }
11375
+ var eventTrace = {
11376
+ originPath: path,
11377
+ props: Object.assign({ recipe_id: recipeId }, (categoryId ? { category_id: categoryId } : {}))
11378
+ };
11362
11379
  var recipeLike = _this.recipeLikesService.prepareRecipeLikeForUpdate(recipeId, recipeLikeId, isPast);
11363
11380
  _this.recipeLikesService.updateLike(recipeId, recipeLike, eventTrace);
11364
11381
  },
@@ -11446,7 +11463,11 @@
11446
11463
  }
11447
11464
  },
11448
11465
  html: {
11449
- like: function (recipeId) { return _this.recipeLikesService.getLikeHTML(recipeId); }
11466
+ like: function (recipeId, path, categoryId) {
11467
+ if (path === void 0) { path = ''; }
11468
+ if (categoryId === void 0) { categoryId = null; }
11469
+ return _this.recipeLikesService.getLikeHTML(recipeId, path, categoryId);
11470
+ }
11450
11471
  },
11451
11472
  getStickyHeaderHeight: function () { return _this.supplierHeaderHeight$; },
11452
11473
  preferences: {