ng-miam 7.0.6 → 7.0.7

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.
@@ -3022,15 +3022,15 @@
3022
3022
  * Adds mandatory data (guest, pos id) completion to the given filters.
3023
3023
  */
3024
3024
  RecipesService.prototype.addMandatoryCompletionToFilter = function (filters) {
3025
+ // only set primary_completion_perc if not searching favorite recipes
3026
+ if (filters.additionalFilters.filters.liked) {
3027
+ return rxjs.of(filters);
3028
+ }
3025
3029
  return this.posService.pos$.pipe(operators.take(1), operators.map(function (pos) {
3026
3030
  var _a;
3027
3031
  if (pos === null || pos === void 0 ? void 0 : pos.id) {
3028
3032
  // number of guests and point of sale id are mandatory in order to use primary_completion_perc filter
3029
- filters.additionalFilters = Object.assign(Object.assign({}, filters.additionalFilters), { filters: Object.assign({ guests: '4', point_of_sale_id: pos.id }, (_a = filters.additionalFilters) === null || _a === void 0 ? void 0 : _a.filters) });
3030
- // only set primary_completion_perc if not searching favorite recipes
3031
- if (!filters.additionalFilters.filters.liked) {
3032
- filters.additionalFilters.filters.primary_completion_perc = '100,100';
3033
- }
3033
+ filters.additionalFilters = Object.assign(Object.assign({}, filters.additionalFilters), { filters: Object.assign({ guests: '4', point_of_sale_id: pos.id, primary_completion_perc: '100,100' }, (_a = filters.additionalFilters) === null || _a === void 0 ? void 0 : _a.filters) });
3034
3034
  }
3035
3035
  return filters;
3036
3036
  }));
@@ -13088,7 +13088,7 @@
13088
13088
  request = request.clone({
13089
13089
  setHeaders: {
13090
13090
  'miam-origin': context.origin.value,
13091
- 'miam-front-version': '7.0.6',
13091
+ 'miam-front-version': '7.0.7',
13092
13092
  'miam-front-type': 'web',
13093
13093
  'miam-api-version': '4.7.0'
13094
13094
  }
@@ -22864,34 +22864,49 @@
22864
22864
  i0.ɵɵtextInterpolate(ctx_r5.recipe.cookingTime);
22865
22865
  }
22866
22866
  }
22867
- function RecipeDetailsInfosComponent_span_13_Template(rf, ctx) {
22867
+ function RecipeDetailsInfosComponent_div_11_span_2_Template(rf, ctx) {
22868
22868
  if (rf & 1) {
22869
22869
  i0.ɵɵelementStart(0, "span");
22870
22870
  i0.ɵɵtext(1);
22871
22871
  i0.ɵɵelementEnd();
22872
22872
  }
22873
22873
  if (rf & 2) {
22874
- var ctx_r6 = i0.ɵɵnextContext();
22874
+ var ctx_r8 = i0.ɵɵnextContext(2);
22875
22875
  i0.ɵɵadvance(1);
22876
- i0.ɵɵtextInterpolate1("", ctx_r6.recipesService.difficultyLevels[ctx_r6.recipe.difficulty - 1].label, " ");
22876
+ i0.ɵɵtextInterpolate1("", ctx_r8.recipesService.difficultyLevels[ctx_r8.recipe.difficulty - 1].label, " ");
22877
22877
  }
22878
22878
  }
22879
- function RecipeDetailsInfosComponent_div_16_Template(rf, ctx) {
22879
+ var _c0$q = function (a0, a1, a2) { return { "easy": a0, "medium": a1, "hard": a2 }; };
22880
+ function RecipeDetailsInfosComponent_div_11_Template(rf, ctx) {
22880
22881
  if (rf & 1) {
22881
- i0.ɵɵelementStart(0, "div", 12);
22882
+ i0.ɵɵelementStart(0, "div", 11);
22883
+ i0.ɵɵelement(1, "img", 12);
22884
+ i0.ɵɵtemplate(2, RecipeDetailsInfosComponent_div_11_span_2_Template, 2, 1, "span", 5);
22885
+ i0.ɵɵelementEnd();
22886
+ }
22887
+ if (rf & 2) {
22888
+ var ctx_r6 = i0.ɵɵnextContext();
22889
+ var _r2 = i0.ɵɵreference(3);
22890
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction3(3, _c0$q, ctx_r6.recipe.difficulty === 1, ctx_r6.recipe.difficulty === 2, ctx_r6.recipe.difficulty === 3));
22891
+ i0.ɵɵadvance(2);
22892
+ i0.ɵɵproperty("ngIf", ctx_r6.recipe.difficulty)("ngIfElse", _r2);
22893
+ }
22894
+ }
22895
+ function RecipeDetailsInfosComponent_div_14_Template(rf, ctx) {
22896
+ if (rf & 1) {
22897
+ i0.ɵɵelementStart(0, "div", 13);
22882
22898
  i0.ɵɵelementStart(1, "span");
22883
22899
  i0.ɵɵtext(2);
22884
22900
  i0.ɵɵelementEnd();
22885
22901
  i0.ɵɵelementEnd();
22886
22902
  }
22887
22903
  if (rf & 2) {
22888
- var tag_r8 = ctx.$implicit;
22904
+ var tag_r9 = ctx.$implicit;
22889
22905
  i0.ɵɵadvance(2);
22890
- i0.ɵɵtextInterpolate(tag_r8.attributes.name);
22906
+ i0.ɵɵtextInterpolate(tag_r9.attributes.name);
22891
22907
  }
22892
22908
  }
22893
- var _c0$q = function (a0) { return { "tags-displayed": a0 }; };
22894
- var _c1$h = function (a0, a1, a2) { return { "easy": a0, "medium": a1, "hard": a2 }; };
22909
+ var _c1$h = function (a0) { return { "tags-displayed": a0 }; };
22895
22910
  var RecipeDetailsInfosComponent = /** @class */ (function () {
22896
22911
  function RecipeDetailsInfosComponent(cdr, recipesService) {
22897
22912
  this.cdr = cdr;
@@ -22905,7 +22920,7 @@
22905
22920
  return RecipeDetailsInfosComponent;
22906
22921
  }());
22907
22922
  RecipeDetailsInfosComponent.ɵfac = function RecipeDetailsInfosComponent_Factory(t) { return new (t || RecipeDetailsInfosComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(RecipesService)); };
22908
- RecipeDetailsInfosComponent.ɵcmp = i0.ɵɵdefineComponent({ type: RecipeDetailsInfosComponent, selectors: [["ng-miam-recipe-details-infos"]], inputs: { recipe: "recipe" }, decls: 17, vars: 15, consts: [["defaultTime", ""], ["defaultText", ""], [1, "miam-recipe-details-infos__container", 3, "ngClass"], [1, "miam-ds-badge", "size-l", "miam-recipe-details-infos__badge"], ["alt", "preparation time icon", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/knife-primary.svg"], [4, "ngIf", "ngIfElse"], ["alt", "cooking time icon", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/pan-primary.svg"], [1, "miam-ds-badge", "size-l", "miam-recipe-details-infos__badge", 3, "ngClass"], ["alt", "difficulty icon", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/chef-hat-primary.svg"], [1, "miam-ds-badge", "size-l", "miam-recipe-details-infos__badge", "more-info", 3, "click"], ["alt", "more info icon", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/meatball-primary.svg"], ["class", "miam-ds-badge size-l miam-recipe-details-infos__badge tag", 4, "ngFor", "ngForOf"], [1, "miam-ds-badge", "size-l", "miam-recipe-details-infos__badge", "tag"]], template: function RecipeDetailsInfosComponent_Template(rf, ctx) {
22923
+ RecipeDetailsInfosComponent.ɵcmp = i0.ɵɵdefineComponent({ type: RecipeDetailsInfosComponent, selectors: [["ng-miam-recipe-details-infos"]], inputs: { recipe: "recipe" }, decls: 15, vars: 9, consts: [["defaultTime", ""], ["defaultText", ""], [1, "miam-recipe-details-infos__container", 3, "ngClass"], [1, "miam-ds-badge", "size-l", "miam-recipe-details-infos__badge"], ["alt", "preparation time icon", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/knife-primary.svg"], [4, "ngIf", "ngIfElse"], ["alt", "cooking time icon", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/pan-primary.svg"], ["class", "miam-ds-badge size-l miam-recipe-details-infos__badge", 3, "ngClass", 4, "ngIf"], [1, "miam-ds-badge", "size-l", "miam-recipe-details-infos__badge", "more-info", 3, "click"], ["alt", "more info icon", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/meatball-primary.svg"], ["class", "miam-ds-badge size-l miam-recipe-details-infos__badge tag", 4, "ngFor", "ngForOf"], [1, "miam-ds-badge", "size-l", "miam-recipe-details-infos__badge", 3, "ngClass"], ["alt", "difficulty icon", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/chef-hat-primary.svg"], [1, "miam-ds-badge", "size-l", "miam-recipe-details-infos__badge", "tag"]], template: function RecipeDetailsInfosComponent_Template(rf, ctx) {
22909
22924
  if (rf & 1) {
22910
22925
  i0.ɵɵtemplate(0, RecipeDetailsInfosComponent_ng_template_0_Template, 2, 0, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
22911
22926
  i0.ɵɵtemplate(2, RecipeDetailsInfosComponent_ng_template_2_Template, 2, 0, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
@@ -22918,30 +22933,24 @@
22918
22933
  i0.ɵɵelement(9, "img", 6);
22919
22934
  i0.ɵɵtemplate(10, RecipeDetailsInfosComponent_span_10_Template, 2, 1, "span", 5);
22920
22935
  i0.ɵɵelementEnd();
22921
- i0.ɵɵelementStart(11, "div", 7);
22922
- i0.ɵɵelement(12, "img", 8);
22923
- i0.ɵɵtemplate(13, RecipeDetailsInfosComponent_span_13_Template, 2, 1, "span", 5);
22924
- i0.ɵɵelementEnd();
22925
- i0.ɵɵelementStart(14, "div", 9);
22926
- i0.ɵɵlistener("click", function RecipeDetailsInfosComponent_Template_div_click_14_listener() { return ctx.displayTags(); });
22927
- i0.ɵɵelement(15, "img", 10);
22936
+ i0.ɵɵtemplate(11, RecipeDetailsInfosComponent_div_11_Template, 3, 7, "div", 7);
22937
+ i0.ɵɵelementStart(12, "div", 8);
22938
+ i0.ɵɵlistener("click", function RecipeDetailsInfosComponent_Template_div_click_12_listener() { return ctx.displayTags(); });
22939
+ i0.ɵɵelement(13, "img", 9);
22928
22940
  i0.ɵɵelementEnd();
22929
- i0.ɵɵtemplate(16, RecipeDetailsInfosComponent_div_16_Template, 3, 1, "div", 11);
22941
+ i0.ɵɵtemplate(14, RecipeDetailsInfosComponent_div_14_Template, 3, 1, "div", 10);
22930
22942
  i0.ɵɵelementEnd();
22931
22943
  }
22932
22944
  if (rf & 2) {
22933
22945
  var _r0 = i0.ɵɵreference(1);
22934
- var _r2 = i0.ɵɵreference(3);
22935
22946
  i0.ɵɵadvance(4);
22936
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$q, ctx.tagsDisplayed));
22947
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$h, ctx.tagsDisplayed));
22937
22948
  i0.ɵɵadvance(3);
22938
22949
  i0.ɵɵproperty("ngIf", ctx.recipe.preparationTime)("ngIfElse", _r0);
22939
22950
  i0.ɵɵadvance(3);
22940
22951
  i0.ɵɵproperty("ngIf", ctx.recipe.cookingTime)("ngIfElse", _r0);
22941
22952
  i0.ɵɵadvance(1);
22942
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction3(11, _c1$h, ctx.recipe.difficulty === 1, ctx.recipe.difficulty === 2, ctx.recipe.difficulty === 3));
22943
- i0.ɵɵadvance(2);
22944
- i0.ɵɵproperty("ngIf", ctx.recipe.difficulty)("ngIfElse", _r2);
22953
+ i0.ɵɵproperty("ngIf", ctx.recipe.difficulty);
22945
22954
  i0.ɵɵadvance(3);
22946
22955
  i0.ɵɵproperty("ngForOf", ctx.recipe.relationships.tags.data);
22947
22956
  }
@@ -23605,6 +23614,7 @@
23605
23614
  }).pipe(operators.skipWhile(function (result) { return result.is_loading; }), operators.tap(function (result) {
23606
23615
  _this.recipeDetailsService.recipe = result;
23607
23616
  _this.recipeDetailsService.recipeLoading = false;
23617
+ _this.recipeDetailsService.recipe.modifiedGuests = +result.guests;
23608
23618
  _this.getProducts();
23609
23619
  _this.sendDisplayRecipeEvent();
23610
23620
  _this.setupYoutubePlayer();